comparison src/util.c @ 9230:b83905afbb55

[gaim-migrate @ 10026] memory leaks are bad committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Mon, 07 Jun 2004 05:29:36 +0000
parents 9171e528d7e5
children 0c352d0e4ddc
comparison
equal deleted inserted replaced
9229:395e62cf7bf6 9230:b83905afbb55
2382 2382
2383 /************************************************************************** 2383 /**************************************************************************
2384 * URI/URL Functions 2384 * URI/URL Functions
2385 **************************************************************************/ 2385 **************************************************************************/
2386 /* 2386 /*
2387 * XXX - Make this also support extracting a username and password?
2388 * Would be nice when dissecting an environmental variable 2387 * Would be nice when dissecting an environmental variable
2389 * that specifies proxy information. 2388 * that specifies proxy information.
2390 */ 2389 */
2391 gboolean 2390 gboolean
2392 gaim_url_parse(const char *url, char **ret_host, int *ret_port, 2391 gaim_url_parse(const char *url, char **ret_host, int *ret_port,
2427 "%%255[%s]^@", user_ctrl); 2426 "%%255[%s]^@", user_ctrl);
2428 f = sscanf(url, scan_info, user); 2427 f = sscanf(url, scan_info, user);
2429 *passwd = '\0'; 2428 *passwd = '\0';
2430 } 2429 }
2431 2430
2432 url = strdup(at+1); /* move pointer after the @ char */ 2431 url = at+1; /* move pointer after the @ char */
2433 } else { 2432 } else {
2434 *user = '\0'; 2433 *user = '\0';
2435 *passwd = '\0'; 2434 *passwd = '\0';
2436 } 2435 }
2437 2436