Mercurial > pidgin
comparison PROGRAMMING_NOTES @ 20407:1122d47583a1
explicit merge of 'd42ad2da81f881b2fbd2fb080cc70a843bc70d02'
and '8582c561c020d2d1e8d358e2e7cd9e3da113ed9e'
to branch 'im.pidgin.cpw.khc.msnp14'
| author | Ka-Hing Cheung <khc@hxbc.us> |
|---|---|
| date | Wed, 02 May 2007 05:25:27 +0000 |
| parents | e8f8d19bf3ee |
| children |
comparison
equal
deleted
inserted
replaced
| 20406:7acc792487f2 | 20407:1122d47583a1 |
|---|---|
| 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. |
| 16 | 16 |
| 17 e.g: fopen("somefile", "wb"); | 17 e.g: fopen("somefile", "wb"); |
| 18 | 18 |
| 19 Not doing so will open files in windows using defaut translation mode. | 19 Not doing so will open files in windows using default translation 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) |
