Mercurial > pidgin.yaz
comparison src/protocols/oscar/locate.c @ 11159:bd8ac1d4b2f2
[gaim-migrate @ 13246]
Get rid of a bunch of gcc4 compile warnings in oscar.
Here's what I'm doing:
-For random bits of binary data, use guchar *
-For textual data (not necessarily utf8), use gchar *
This seems to be what glib and gtk do
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 26 Jul 2005 04:34:37 +0000 |
parents | 1d58cc6c4552 |
children | 7d31d61e6438 |
comparison
equal
deleted
inserted
replaced
11158:2c930d591492 | 11159:bd8ac1d4b2f2 |
---|---|
961 * Gives BOS your profile. | 961 * Gives BOS your profile. |
962 * | 962 * |
963 * profile_encoding and awaymsg_encoding MUST be set if profile or | 963 * profile_encoding and awaymsg_encoding MUST be set if profile or |
964 * away are set, respectively, and their value may or may not be | 964 * away are set, respectively, and their value may or may not be |
965 * restricted to a few choices. I am currently aware of: | 965 * restricted to a few choices. I am currently aware of: |
966 * | 966 * |
967 * us-ascii Just that | 967 * us-ascii Just that |
968 * unicode-2-0 UCS2-BE | 968 * unicode-2-0 UCS2-BE |
969 * | 969 * |
970 * profile_len and awaymsg_len MUST be set similarly, and they MUST | 970 * profile_len and awaymsg_len MUST be set similarly, and they MUST |
971 * be the length of their respective strings in bytes. | 971 * be the length of their respective strings in bytes. |
972 * | 972 * |
973 * To get the previous behavior of awaymsg == "" un-setting the away | 973 * To get the previous behavior of awaymsg == "" un-setting the away |
974 * message, set awaymsg non-NULL and awaymsg_len to 0 (this is the | 974 * message, set awaymsg non-NULL and awaymsg_len to 0 (this is the |
975 * obvious equivalent). | 975 * obvious equivalent). |
976 * | 976 * |
977 */ | 977 */ |
978 faim_export int aim_locate_setprofile(aim_session_t *sess, | 978 faim_export int aim_locate_setprofile(aim_session_t *sess, |
979 const char *profile_encoding, const fu8_t *profile, const int profile_len, | 979 const char *profile_encoding, const gchar *profile, const int profile_len, |
980 const char *awaymsg_encoding, const fu8_t *awaymsg, const int awaymsg_len) | 980 const char *awaymsg_encoding, const gchar *awaymsg, const int awaymsg_len) |
981 { | 981 { |
982 aim_conn_t *conn; | 982 aim_conn_t *conn; |
983 aim_frame_t *fr; | 983 aim_frame_t *fr; |
984 aim_snacid_t snacid; | 984 aim_snacid_t snacid; |
985 aim_tlvlist_t *tl = NULL; | 985 aim_tlvlist_t *tl = NULL; |
1003 if (encoding == NULL) { | 1003 if (encoding == NULL) { |
1004 return -ENOMEM; | 1004 return -ENOMEM; |
1005 } | 1005 } |
1006 snprintf(encoding, strlen(defencoding) + strlen(profile_encoding), defencoding, profile_encoding); | 1006 snprintf(encoding, strlen(defencoding) + strlen(profile_encoding), defencoding, profile_encoding); |
1007 aim_tlvlist_add_str(&tl, 0x0001, encoding); | 1007 aim_tlvlist_add_str(&tl, 0x0001, encoding); |
1008 aim_tlvlist_add_raw(&tl, 0x0002, profile_len, profile); | 1008 aim_tlvlist_add_raw(&tl, 0x0002, profile_len, (const guchar *)profile); |
1009 free(encoding); | 1009 free(encoding); |
1010 } | 1010 } |
1011 | 1011 |
1012 /* | 1012 /* |
1013 * So here's how this works: | 1013 * So here's how this works: |
1023 if (encoding == NULL) { | 1023 if (encoding == NULL) { |
1024 return -ENOMEM; | 1024 return -ENOMEM; |
1025 } | 1025 } |
1026 snprintf(encoding, strlen(defencoding) + strlen(awaymsg_encoding), defencoding, awaymsg_encoding); | 1026 snprintf(encoding, strlen(defencoding) + strlen(awaymsg_encoding), defencoding, awaymsg_encoding); |
1027 aim_tlvlist_add_str(&tl, 0x0003, encoding); | 1027 aim_tlvlist_add_str(&tl, 0x0003, encoding); |
1028 aim_tlvlist_add_raw(&tl, 0x0004, awaymsg_len, awaymsg); | 1028 aim_tlvlist_add_raw(&tl, 0x0004, awaymsg_len, (const guchar *)awaymsg); |
1029 free(encoding); | 1029 free(encoding); |
1030 } else | 1030 } else |
1031 aim_tlvlist_add_noval(&tl, 0x0004); | 1031 aim_tlvlist_add_noval(&tl, 0x0004); |
1032 } | 1032 } |
1033 | 1033 |