comparison src/util.c @ 8125:abbfed0b0050

[gaim-migrate @ 8829] there's a right way and a wrong way to kill off warnings committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 16 Jan 2004 17:13:20 +0000
parents 0dc9fffb1e28
children da57fb60680a
comparison
equal deleted inserted replaced
8124:7ce787f82203 8125:abbfed0b0050
248 * Quoted Printable Functions 248 * Quoted Printable Functions
249 **************************************************************************/ 249 **************************************************************************/
250 void 250 void
251 gaim_quotedp_decode(const char *str, char **ret_str, int *ret_len) 251 gaim_quotedp_decode(const char *str, char **ret_str, int *ret_len)
252 { 252 {
253 char *p, *n, *new, *end; 253 char *n, *new;
254 const char *end, *p;
254 int i; 255 int i;
255 256
256 n = new = g_malloc(strlen (str) + 1); 257 n = new = g_malloc(strlen (str) + 1);
257 end = (char *)str + strlen(str); 258 end = str + strlen(str);
258 259
259 for (p = (char *)str; p < end; p++, n++) { 260 for (p = str; p < end; p++, n++) {
260 if (*p == '=') { 261 if (*p == '=') {
261 sscanf(p + 1, "%2x\n", &i); 262 sscanf(p + 1, "%2x\n", &i);
262 *n = (char)i; 263 *n = i;
263 p += 2; 264 p += 2;
264 } 265 }
265 else if (*p == '_') 266 else if (*p == '_')
266 *n = ' '; 267 *n = ' ';
267 else 268 else