Mercurial > pidgin
comparison PROGRAMMING_NOTES @ 16188:e8f8d19bf3ee
Replace an instance of GAIM with "Pidgin, Finch, and libpurple"
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Mon, 16 Apr 2007 00:54:03 +0000 |
| parents | 83ec0b408926 |
| children |
comparison
equal
deleted
inserted
replaced
| 16187:61c2d36a38a3 | 16188:e8f8d19bf3ee |
|---|---|
| 1 Notes on keeping GAIM OS independant | 1 Notes on keeping Pidgin, Finch, and libpurple OS independant |
| 2 ------------------------------------ | 2 ------------------------------------------------------------ |
| 3 | 3 |
| 4 General | 4 General |
| 5 ------- | 5 ------- |
| 6 - Use G_DIR_SEPARATOR_S and G_DIR_SEPARATOR for paths | 6 - Use G_DIR_SEPARATOR_S and G_DIR_SEPARATOR for paths |
| 7 | 7 |
| 8 - Use g_getenv, g_snprintf, g_vsnprintf | 8 - Use g_getenv, g_snprintf, g_vsnprintf |
| 9 | 9 |
| 10 - Use gaim_home_dir instead of g_get_home_dir or g_getenv("HOME") | 10 - Use purple_home_dir instead of g_get_home_dir or g_getenv("HOME") |
| 11 | 11 |
| 12 - Make sure when including win32dep.h that it is the last header to | 12 - Make sure when including win32dep.h that it is the last header to |
| 13 be included. | 13 be included. |
| 14 | 14 |
| 15 - Open binary files when reading or writing with 'b' mode. | 15 - Open binary files when reading or writing with 'b' mode. |
| 20 i.e. newline -> <CR><LF> | 20 i.e. newline -> <CR><LF> |
| 21 | 21 |
| 22 Paths | 22 Paths |
| 23 ----- | 23 ----- |
| 24 | 24 |
| 25 - DATADIR, LOCALEDIR & LIBDIR are defined in wingaim as functions. | 25 - DATADIR, LOCALEDIR & LIBDIR are defined as functions in the win32 build |
| 26 Doing the following will therefore break the windows build: | 26 Doing the following will therefore break the windows build: |
| 27 | 27 |
| 28 printf("File in DATADIR is: %s\n", DATADIR G_DIR_SEPARATOR_S "pic.png"); | 28 printf("File in DATADIR is: %s\n", DATADIR G_DIR_SEPARATOR_S "pic.png"); |
| 29 | 29 |
| 30 it should be: | 30 it should be: |
| 33 | 33 |
| 34 PLUGINS & PROTOS | 34 PLUGINS & PROTOS |
| 35 ---------------- | 35 ---------------- |
| 36 | 36 |
| 37 - G_MODULE_EXPORT all functions which are to be accessed from outside the | 37 - G_MODULE_EXPORT all functions which are to be accessed from outside the |
| 38 scope of its "dll" or "so". (E.G. gaim_plugin_init) | 38 scope of its "dll" or "so". (E.G. purple_plugin_init) |
| 39 | 39 |
| 40 - G_MODULE_IMPORT all global variables which are located outside your | 40 - G_MODULE_IMPORT all global variables which are located outside your |
| 41 dynamic library. (E.G. connections) | 41 dynamic library. (E.G. connections) |
| 42 | 42 |
| 43 (Not doing this will cause "Memory Access Violations" in Win32) | 43 (Not doing this will cause "Memory Access Violations" in win32) |
