Mercurial > pidgin.yaz
comparison src/protocols/oscar/oscar.c @ 10636:0f5c5e6fb27f
[gaim-migrate @ 12118]
The strftime warnings fiunally got to me, so I made gaim_strftime to work
around it.
Turns out KingAnt had already discovered this solution for oscar.c but left
it #iffed out.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Thu, 24 Feb 2005 01:11:17 +0000 |
parents | 03aa223a14d9 |
children | 6a618db0a404 |
comparison
equal
deleted
inserted
replaced
10635:6895c4212362 | 10636:0f5c5e6fb27f |
---|---|
5155 static size_t my_strftime(char *s, size_t max, const char *fmt, | 5155 static size_t my_strftime(char *s, size_t max, const char *fmt, |
5156 const struct tm *tm) | 5156 const struct tm *tm) |
5157 { | 5157 { |
5158 return strftime(s, max, fmt, tm); | 5158 return strftime(s, max, fmt, tm); |
5159 } | 5159 } |
5160 | |
5161 /* | |
5162 * Before even realizing this was here, I went and did the same thing in util.c. | |
5163 * | |
5164 * Use gaim_strftime() | |
5165 */ | |
5166 | |
5160 #endif | 5167 #endif |
5161 | 5168 |
5162 static int gaim_icqinfo(aim_session_t *sess, aim_frame_t *fr, ...) | 5169 static int gaim_icqinfo(aim_session_t *sess, aim_frame_t *fr, ...) |
5163 { | 5170 { |
5164 GaimConnection *gc = sess->aux_data; | 5171 GaimConnection *gc = sess->aux_data; |
5218 char date[30]; | 5225 char date[30]; |
5219 struct tm tm; | 5226 struct tm tm; |
5220 tm.tm_mday = (int)info->birthday; | 5227 tm.tm_mday = (int)info->birthday; |
5221 tm.tm_mon = (int)info->birthmonth-1; | 5228 tm.tm_mon = (int)info->birthmonth-1; |
5222 tm.tm_year = (int)info->birthyear-1900; | 5229 tm.tm_year = (int)info->birthyear-1900; |
5223 strftime(date, sizeof(date), "%x", &tm); | 5230 gaim_strftime(date, sizeof(date), "%x", &tm); |
5224 oscar_string_append(str, "\n<br>", _("Birthday"), date); | 5231 oscar_string_append(str, "\n<br>", _("Birthday"), date); |
5225 } | 5232 } |
5226 if (info->age) { | 5233 if (info->age) { |
5227 char age[5]; | 5234 char age[5]; |
5228 snprintf(age, sizeof(age), "%hhd", info->age); | 5235 snprintf(age, sizeof(age), "%hhd", info->age); |