diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2010-06-18 00:48:31 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2010-06-18 00:48:31 -0400 |
commit | 511bc0c05c0d5674e5d41490969e11ef5c79de8b (patch) | |
tree | 79fbb7dfd99e3f2ed25894d66f0da0239b0f5427 /WWW/Library/Implementation/HTNews.c | |
parent | 310e655e2b1279d6c088497214e78e99e3fd6f74 (diff) | |
download | lynx-snapshots-511bc0c05c0d5674e5d41490969e11ef5c79de8b.tar.gz |
snapshot of project "lynx", label v2-8-8dev_3e
Diffstat (limited to 'WWW/Library/Implementation/HTNews.c')
-rw-r--r-- | WWW/Library/Implementation/HTNews.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c index c0f1fdfa..bc5825a4 100644 --- a/WWW/Library/Implementation/HTNews.c +++ b/WWW/Library/Implementation/HTNews.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTNews.c,v 1.62 2010/04/29 23:15:07 tom Exp $ + * $LynxId: HTNews.c,v 1.63 2010/06/17 00:10:46 tom Exp $ * * NEWS ACCESS HTNews.c * =========== @@ -297,7 +297,7 @@ static int response(char *command) if (command) { int status; - int length = strlen(command); + int length = (int) strlen(command); CTRACE((tfp, "NNTP command to be sent: %s", command)); #ifdef NOT_ASCII @@ -767,11 +767,14 @@ static void write_anchor(const char *text, const char *addr) const char *p; char *q; - for (p = addr; *p && (*p != '>') && !WHITE(*p) && (*p != ','); p++) ; - if (strlen(NewsHREF) + (p - addr) + 1 < sizeof(href)) { + for (p = addr; *p && (*p != '>') && !WHITE(*p) && (*p != ','); p++) { + ; + } + if (strlen(NewsHREF) + (size_t) (p - addr) + 1 < sizeof(href)) { q = href; strcpy(q, NewsHREF); - strncat(q, addr, p - addr); /* Make complete hypertext reference */ + /* Make complete hypertext reference */ + strncat(q, addr, (size_t) (p - addr)); } else { q = NULL; HTSprintf0(&q, "%s%.*s", NewsHREF, (int) (p - addr), addr); @@ -917,7 +920,7 @@ static void post_article(char *postfile) strcat(buf, "."); blen++; } - llen = strlen(line); + llen = (int) strlen(line); if (in_header && !strncasecomp(line, "From:", 5)) { seen_header = 1; seen_fromline = 1; @@ -1570,7 +1573,7 @@ static int read_list(char *arg) pattern[strlen(pattern) - 1] = '\0'; } if (tail || head) { - len = strlen(pattern); + len = (int) strlen(pattern); } } @@ -2484,8 +2487,8 @@ static int HTLoadNews(const char *arg, } SnipIn(command, "GROUP %.*s", 9, groupName); } else { - int add_open = (strchr(p1, '<') == 0); - int add_close = (strchr(p1, '>') == 0); + size_t add_open = (strchr(p1, '<') == 0); + size_t add_close = (strchr(p1, '>') == 0); if (strlen(p1) + add_open + add_close >= 252) { FREE(ProxyHost); |