Mercurial > pidgin
comparison src/util.c @ 7162:d14e026611c0
[gaim-migrate @ 7729]
constificating the countryside
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 05 Oct 2003 18:32:43 +0000 |
parents | 67f9b43c402a |
children | 1930e3d00ecd |
comparison
equal
deleted
inserted
replaced
7161:3471c3b1e85c | 7162:d14e026611c0 |
---|---|
242 | 242 |
243 | 243 |
244 /************************************************************************** | 244 /************************************************************************** |
245 * Date/Time Functions | 245 * Date/Time Functions |
246 **************************************************************************/ | 246 **************************************************************************/ |
247 char * | 247 const char * |
248 gaim_date(void) | 248 gaim_date(void) |
249 { | 249 { |
250 static char date[80]; | 250 static char date[80]; |
251 time_t tme; | 251 time_t tme; |
252 | 252 |
254 strftime(date, sizeof(date), "%H:%M:%S", localtime(&tme)); | 254 strftime(date, sizeof(date), "%H:%M:%S", localtime(&tme)); |
255 | 255 |
256 return date; | 256 return date; |
257 } | 257 } |
258 | 258 |
259 char * | 259 const char * |
260 gaim_date_full(void) | 260 gaim_date_full(void) |
261 { | 261 { |
262 char *date; | 262 char *date; |
263 time_t tme; | 263 time_t tme; |
264 | 264 |
1247 | 1247 |
1248 | 1248 |
1249 /************************************************************************** | 1249 /************************************************************************** |
1250 * String Functions | 1250 * String Functions |
1251 **************************************************************************/ | 1251 **************************************************************************/ |
1252 char * | 1252 const char * |
1253 gaim_normalize(const char *s) | 1253 gaim_normalize(const char *s) |
1254 { | 1254 { |
1255 static char buf[BUF_LEN]; | 1255 static char buf[BUF_LEN]; |
1256 char *tmp; | 1256 char *tmp; |
1257 int i, j; | 1257 int i, j; |
1276 return buf; | 1276 return buf; |
1277 } | 1277 } |
1278 | 1278 |
1279 /* Look for %n, %d, or %t in msg, and replace with the sender's name, date, | 1279 /* Look for %n, %d, or %t in msg, and replace with the sender's name, date, |
1280 or time */ | 1280 or time */ |
1281 char * | 1281 const char * |
1282 gaim_str_sub_away_formatters(const char *msg, const char *name) | 1282 gaim_str_sub_away_formatters(const char *msg, const char *name) |
1283 { | 1283 { |
1284 char *c; | 1284 char *c; |
1285 static char cpy[BUF_LONG]; | 1285 static char cpy[BUF_LONG]; |
1286 int cnt = 0; | 1286 int cnt = 0; |
1916 | 1916 |
1917 cb(user_data, g_strdup(_("g003: Error opening connection.\n")), 0); | 1917 cb(user_data, g_strdup(_("g003: Error opening connection.\n")), 0); |
1918 } | 1918 } |
1919 } | 1919 } |
1920 | 1920 |
1921 char * | 1921 const char * |
1922 gaim_url_decode(const char *str) | 1922 gaim_url_decode(const char *str) |
1923 { | 1923 { |
1924 static char buf[BUF_LEN]; | 1924 static char buf[BUF_LEN]; |
1925 int i, j = 0; | 1925 int i, j = 0; |
1926 char *bum; | 1926 char *bum; |
1953 *bum = '\0'; | 1953 *bum = '\0'; |
1954 | 1954 |
1955 return buf; | 1955 return buf; |
1956 } | 1956 } |
1957 | 1957 |
1958 char * | 1958 const char * |
1959 gaim_url_encode(const char *str) | 1959 gaim_url_encode(const char *str) |
1960 { | 1960 { |
1961 static char buf[BUF_LEN]; | 1961 static char buf[BUF_LEN]; |
1962 int i, j = 0; | 1962 int i, j = 0; |
1963 | 1963 |
2035 g_free(a_norm); | 2035 g_free(a_norm); |
2036 g_free(b_norm); | 2036 g_free(b_norm); |
2037 | 2037 |
2038 return ret; | 2038 return ret; |
2039 } | 2039 } |
2040 |