Mercurial > pidgin
comparison src/util.c @ 925:1ff824e6bc19
[gaim-migrate @ 935]
, in url I think. Correct me if Im wrong
committer: Tailor Script <tailor@pidgin.im>
| author | Rob Flynn <gaim@robflynn.com> |
|---|---|
| date | Mon, 18 Sep 2000 10:43:38 +0000 |
| parents | f6aa60716419 |
| children | 9b04a3419351 |
comparison
equal
deleted
inserted
replaced
| 924:f6aa60716419 | 925:1ff824e6bc19 |
|---|---|
| 142 } | 142 } |
| 143 } else if ( (!strncasecmp(c, "http://", 7) || (!strncasecmp(c, "https://", 8)))) { | 143 } else if ( (!strncasecmp(c, "http://", 7) || (!strncasecmp(c, "https://", 8)))) { |
| 144 t = c; | 144 t = c; |
| 145 while(1) { | 145 while(1) { |
| 146 if (badchar(*t)) { | 146 if (badchar(*t)) { |
| 147 | |
| 148 if (*(t) == ',' && (*(t+1) != ' ')) | |
| 149 { | |
| 150 t++; | |
| 151 continue; | |
| 152 } | |
| 153 | |
| 147 if (*(t-1) == '.') | 154 if (*(t-1) == '.') |
| 148 t--; | 155 t--; |
| 149 strncpy(url_buf, c, t-c); | 156 strncpy(url_buf, c, t-c); |
| 150 url_buf[t-c] = 0; | 157 url_buf[t-c] = 0; |
| 151 cnt += g_snprintf(&text[cnt++], 1024, "<A HREF=\"%s\">%s</A>", url_buf, url_buf); | 158 cnt += g_snprintf(&text[cnt++], 1024, "<A HREF=\"%s\">%s</A>", url_buf, url_buf); |
| 164 while(1) { | 171 while(1) { |
| 165 if (badchar(*t)) { | 172 if (badchar(*t)) { |
| 166 if (t-c == 4) { | 173 if (t-c == 4) { |
| 167 break; | 174 break; |
| 168 } | 175 } |
| 176 | |
| 177 if (*(t) == ',' && (*(t+1) != ' ')) | |
| 178 { | |
| 179 t++; | |
| 180 continue; | |
| 181 } | |
| 182 | |
| 169 if (*(t-1) == '.') | 183 if (*(t-1) == '.') |
| 170 t--; | 184 t--; |
| 171 strncpy(url_buf, c, t-c); | 185 strncpy(url_buf, c, t-c); |
| 172 url_buf[t-c] = 0; | 186 url_buf[t-c] = 0; |
| 173 cnt += g_snprintf(&text[cnt++], 1024, "<A HREF=\"http://%s\">%s</A>", url_buf, url_buf); | 187 cnt += g_snprintf(&text[cnt++], 1024, "<A HREF=\"http://%s\">%s</A>", url_buf, url_buf); |
