comparison src/html.c @ 5512:e41b04bb4afe

[gaim-migrate @ 5911] make, THEN commit :-/ committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 25 May 2003 13:53:11 +0000
parents d64bbc7ab746
children 46d7ad0dfa26
comparison
equal deleted inserted replaced
5511:d64bbc7ab746 5512:e41b04bb4afe
89 return text2; 89 return text2;
90 } 90 }
91 91
92 struct g_url *parse_url(char *url) 92 struct g_url *parse_url(char *url)
93 { 93 {
94 struct g_url *test = g_new0(struct g_url); 94 struct g_url *test = g_new0(struct g_url, 1);
95 char scan_info[255]; 95 char scan_info[255];
96 char port[5]; 96 char port[5];
97 int f; 97 int f;
98 char* turl; 98 char* turl;
99 /* hyphen at end includes it in control set */ 99 /* hyphen at end includes it in control set */
115 addr_ctrl, page_ctrl); 115 addr_ctrl, page_ctrl);
116 f = sscanf(url, scan_info, test->address, test->page); 116 f = sscanf(url, scan_info, test->address, test->page);
117 snprintf(port, sizeof(port), "80"); 117 snprintf(port, sizeof(port), "80");
118 } 118 }
119 if (f == 1) 119 if (f == 1)
120 snprintf(test->page, sizeof(test->page), ""); 120 test->page[0] = '\0';
121 121
122 sscanf(port, "%d", &test->port); 122 sscanf(port, "%d", &test->port);
123 return test; 123 return test;
124 } 124 }
125 125