PROGRAMMING_NOTES

Fri, 27 Feb 2004 19:25:27 +0000

author
Arun Tharuvai <aatharuv@mit.edu>
date
Fri, 27 Feb 2004 19:25:27 +0000
changeset 8354
61ee455834c5
parent 5338
03c096de0dea
child 9619
2d8adb92f665
permissions
-rw-r--r--

[gaim-migrate @ 9078]
" An update to com_err on debian appears to have broken
the ability of the zephyr plugin to compile with krb4.

Here's a patch, tested against comerr-dev
2.1-1.34+1.35-WIP-2004.01.31-1 in debian, and an older
version of com_err local to MIT, that fixes this. I
haven't tested this against non-kerberized zephyr, or
against other versions of com_err. A lot of the comerr
(error table) related code appears to be unnecessary.

This also fixes two other issues:
1) Upon each login, every entry in the "Anyone" group
was getting added to the Buddies group. I didn't notice
this earlier, since I usually don't restart gaim very
often.

2) No more compile warnings.

This also replaces occurrences of ZGetSender and
ZGetRealm with gaim_zephyr_get_sender and
gaim_zephyr_get_realm(),
in preparation for getting gaim to alternately use an
external program, "tzc" to talk to zephyr."
--Arun A Tharuvai, aka, the lone gaim zepher user

committer: Luke Schierer <lschiere@pidgin.im>

3630
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1 Notes on keeping GAIM OS independant
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2 ------------------------------------
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
4 General
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
5 -------
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
6 - Use G_DIR_SEPARATOR_S and G_DIR_SEPARATOR for paths
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
7
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
8 - Use g_getenv, g_snprintf, g_vsnprintf
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
9
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
10 - Use gaim_home_dir instead of g_get_home_dir or g_getenv("HOME")
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
11
3713
c5e268f28597 [gaim-migrate @ 3846]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
12 - Make sure when including win32dep.h that it is the last header to
c5e268f28597 [gaim-migrate @ 3846]
Herman Bloggs <herman@bluedigits.com>
parents: 3630
diff changeset
13 be included.
3630
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
14
4482
6181b7a53a07 [gaim-migrate @ 4757]
Herman Bloggs <herman@bluedigits.com>
parents: 4062
diff changeset
15 - Open binary files when reading or writing with 'b' mode.
6181b7a53a07 [gaim-migrate @ 4757]
Herman Bloggs <herman@bluedigits.com>
parents: 4062
diff changeset
16
6181b7a53a07 [gaim-migrate @ 4757]
Herman Bloggs <herman@bluedigits.com>
parents: 4062
diff changeset
17 e.g: fopen("somefile", "wb");
6181b7a53a07 [gaim-migrate @ 4757]
Herman Bloggs <herman@bluedigits.com>
parents: 4062
diff changeset
18
6181b7a53a07 [gaim-migrate @ 4757]
Herman Bloggs <herman@bluedigits.com>
parents: 4062
diff changeset
19 Not doing so will open files in windows using defaut translation mode.
6181b7a53a07 [gaim-migrate @ 4757]
Herman Bloggs <herman@bluedigits.com>
parents: 4062
diff changeset
20 i.e. newline -> <CR><LF>
6181b7a53a07 [gaim-migrate @ 4757]
Herman Bloggs <herman@bluedigits.com>
parents: 4062
diff changeset
21
4062
b397c19fe466 [gaim-migrate @ 4272]
Herman Bloggs <herman@bluedigits.com>
parents: 3713
diff changeset
22 Paths
b397c19fe466 [gaim-migrate @ 4272]
Herman Bloggs <herman@bluedigits.com>
parents: 3713
diff changeset
23 -----
b397c19fe466 [gaim-migrate @ 4272]
Herman Bloggs <herman@bluedigits.com>
parents: 3713
diff changeset
24
b397c19fe466 [gaim-migrate @ 4272]
Herman Bloggs <herman@bluedigits.com>
parents: 3713
diff changeset
25 - DATADIR, LOCALEDIR & LIBDIR are defined in wingaim as functions.
b397c19fe466 [gaim-migrate @ 4272]
Herman Bloggs <herman@bluedigits.com>
parents: 3713
diff changeset
26 Doing the following will therefore break the windows build:
b397c19fe466 [gaim-migrate @ 4272]
Herman Bloggs <herman@bluedigits.com>
parents: 3713
diff changeset
27
b397c19fe466 [gaim-migrate @ 4272]
Herman Bloggs <herman@bluedigits.com>
parents: 3713
diff changeset
28 printf("File in DATADIR is: %s\n", DATADIR G_DIR_SEPARATOR_S "pic.png");
b397c19fe466 [gaim-migrate @ 4272]
Herman Bloggs <herman@bluedigits.com>
parents: 3713
diff changeset
29
b397c19fe466 [gaim-migrate @ 4272]
Herman Bloggs <herman@bluedigits.com>
parents: 3713
diff changeset
30 it should be:
b397c19fe466 [gaim-migrate @ 4272]
Herman Bloggs <herman@bluedigits.com>
parents: 3713
diff changeset
31
b397c19fe466 [gaim-migrate @ 4272]
Herman Bloggs <herman@bluedigits.com>
parents: 3713
diff changeset
32 printf("File in DATADIR is: %s%s%s\n", DATADIR, G_DIR_SEPARATOR_S, "pic.png");
b397c19fe466 [gaim-migrate @ 4272]
Herman Bloggs <herman@bluedigits.com>
parents: 3713
diff changeset
33
5338
03c096de0dea [gaim-migrate @ 5714]
Herman Bloggs <herman@bluedigits.com>
parents: 4482
diff changeset
34 - When writing out paths to .gaimrc, use wgaim_escape_dirsep. This is necessary
03c096de0dea [gaim-migrate @ 5714]
Herman Bloggs <herman@bluedigits.com>
parents: 4482
diff changeset
35 because the Windows dir separator '\' is being used to escape characters, when
03c096de0dea [gaim-migrate @ 5714]
Herman Bloggs <herman@bluedigits.com>
parents: 4482
diff changeset
36 paths are read in from the .gaimrc file.
03c096de0dea [gaim-migrate @ 5714]
Herman Bloggs <herman@bluedigits.com>
parents: 4482
diff changeset
37
3630
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
38 PLUGINS & PROTOS
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
39 ----------------
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
40
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
41 - G_MODULE_EXPORT all functions which are to be accessed from outside the
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
42 scope of its "dll" or "so". (E.G. gaim_plugin_init)
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
43
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
44 - G_MODULE_IMPORT all global variables which are located outside your
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
45 dynamic library. (E.G. connections)
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
46
caa952062dc2 [gaim-migrate @ 3753]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
47 (Not doing this will cause "Memory Access Violations" in Win32)

mercurial