diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2012-08-16 00:48:47 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2012-08-16 00:48:47 -0400 |
commit | fe33fce24581e08142660ab2c17a2f9040d88e18 (patch) | |
tree | d78d2e3aec180456b9b06965a4afc1d1f9d4abf1 /WWW | |
parent | cca7f473d4ac3d75d28ffbe7361c97f1ed80afb4 (diff) | |
download | lynx-snapshots-fe33fce24581e08142660ab2c17a2f9040d88e18.tar.gz |
snapshot of project "lynx", label v2-8-8dev_13
Diffstat (limited to 'WWW')
-rw-r--r-- | WWW/Library/Implementation/HTAnchor.h | 6 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTCJK.h | 6 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTFTP.c | 12 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTFile.c | 4 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTMIME.c | 6 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTTCP.c | 10 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTUtils.h | 9 |
7 files changed, 30 insertions, 23 deletions
diff --git a/WWW/Library/Implementation/HTAnchor.h b/WWW/Library/Implementation/HTAnchor.h index 679a477d..021a930d 100644 --- a/WWW/Library/Implementation/HTAnchor.h +++ b/WWW/Library/Implementation/HTAnchor.h @@ -1,5 +1,5 @@ /* - * $LynxId: HTAnchor.h,v 1.35 2012/08/09 23:50:33 tom Exp $ + * $LynxId: HTAnchor.h,v 1.36 2012/08/15 10:48:24 tom Exp $ * * Hypertext "Anchor" Object HTAnchor.h * ========================== @@ -114,8 +114,8 @@ extern "C" { char *content_md5; /* Content-MD5 */ char *message_id; /* Message-ID */ char *subject; /* Subject */ - long content_length; /* Content-Length */ - long actual_length; /* actual length may differ */ + off_t content_length; /* Content-Length */ + off_t actual_length; /* actual length may differ */ char *date; /* Date */ char *expires; /* Expires */ char *last_modified; /* Last-Modified */ diff --git a/WWW/Library/Implementation/HTCJK.h b/WWW/Library/Implementation/HTCJK.h index 555cff1a..06d816f5 100644 --- a/WWW/Library/Implementation/HTCJK.h +++ b/WWW/Library/Implementation/HTCJK.h @@ -1,5 +1,5 @@ /* - * $LynxId: HTCJK.h,v 1.18 2010/09/25 11:41:29 tom Exp $ + * $LynxId: HTCJK.h,v 1.19 2012/08/15 23:11:03 tom Exp $ * * CJK character converter HTCJK.h * ======================= @@ -33,8 +33,8 @@ extern "C" { #define TO_HANGUL "\033$(C" #define TO_ASCII "\033(B" #define IS_SJIS_LO(lo) ((0x40<=lo)&&(lo!=0x7F)&&(lo<=0xFC)) -#define IS_SJIS_HI1(hi) ((0x81<=hi)&&(hi<=0x9F)) /* 1st lev. */ -#define IS_SJIS_HI2(hi) ((0xE0<=hi)&&(hi<=0xEF)) /* 2nd lev. */ +#define IS_SJIS_HI1(hi) ((0x81 <= (hi)) && ((hi) <= 0x9F)) /* 1st lev. */ +#define IS_SJIS_HI2(hi) ((0xE0 <= (hi)) && ((hi) <= 0xEF)) /* 2nd lev. */ #define IS_SJIS(hi,lo,in_sjis) (!IS_SJIS_LO(lo)?0:IS_SJIS_HI1(hi)?(in_sjis=1):in_sjis&&IS_SJIS_HI2(hi)) #define IS_SJIS_2BYTE(hi,lo) (IS_SJIS_LO(lo)&&(IS_SJIS_HI1(hi)||IS_SJIS_HI2(hi))) #define IS_SJIS_X0201KANA(lo) ((0xA1<=lo)&&(lo<=0xDF)) diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c index 9014247f..5b346f3f 100644 --- a/WWW/Library/Implementation/HTFTP.c +++ b/WWW/Library/Implementation/HTFTP.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTFTP.c,v 1.102 2012/08/03 12:34:58 tom Exp $ + * $LynxId: HTFTP.c,v 1.104 2012/08/15 23:14:42 tom Exp $ * * File Transfer Protocol (FTP) Client * for a WorldWideWeb browser @@ -251,10 +251,8 @@ static char *data_write_pointer; #define NEXT_DATA_CHAR next_data_char() static int close_connection(connection * con); -#ifdef HAVE_ATOLL -#define LYatoll(n) atoll(n) -#else -static off_t LYatoll(const char *value) +#ifndef HAVE_ATOLL +off_t LYatoll(const char *value) { off_t result = 0; @@ -1853,7 +1851,7 @@ static void parse_vms_dir_entry(char *line, EntryInfo *entry_info) { int i, j; - unsigned int ialloc; + off_t ialloc; char *cp, *cpd, *cps, date[16]; const char *sp = " "; @@ -1959,7 +1957,7 @@ static void parse_vms_dir_entry(char *line, while (isdigit(UCH(*cps))) cps++; *cps = '\0'; - ialloc = (unsigned) atoi(cpd + 1); + ialloc = LYatoll(cpd + 1); /* Check if used is in blocks or bytes */ if (entry_info->size <= ialloc) entry_info->size *= 512; diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c index b01bac91..301214aa 100644 --- a/WWW/Library/Implementation/HTFile.c +++ b/WWW/Library/Implementation/HTFile.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTFile.c,v 1.131 2012/08/02 09:04:52 tom Exp $ + * $LynxId: HTFile.c,v 1.132 2012/08/15 22:10:08 tom Exp $ * * File Access HTFile.c * =========== @@ -199,9 +199,11 @@ static char *FormatSize(char **bufp, if (*start) { sprintf(fmt, "%%%.*s" PRI_off_t, (int) sizeof(fmt) - 3, start); + HTSprintf0(bufp, fmt, entry); } else { sprintf(fmt, "%" PRI_off_t, entry); + StrAllocCopy(*bufp, fmt); } return *bufp; diff --git a/WWW/Library/Implementation/HTMIME.c b/WWW/Library/Implementation/HTMIME.c index 688fb58a..66b69ab5 100644 --- a/WWW/Library/Implementation/HTMIME.c +++ b/WWW/Library/Implementation/HTMIME.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTMIME.c,v 1.77 2012/08/10 11:49:03 tom Exp $ + * $LynxId: HTMIME.c,v 1.78 2012/08/15 10:59:12 tom Exp $ * * MIME Message Parse HTMIME.c * ================== @@ -791,10 +791,10 @@ static int dispatchField(HTStream *me) /* * Convert to integer and indicate in anchor. - FM */ - me->anchor->content_length = atoi(me->value); + me->anchor->content_length = LYatoll(me->value); if (me->anchor->content_length < 0) me->anchor->content_length = 0; - CTRACE((tfp, " Converted to integer: '%ld'\n", + CTRACE((tfp, " Converted to integer: '%" PRI_off_t "'\n", me->anchor->content_length)); break; case miCONTENT_LOCATION: diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c index 616c1f0c..cafc4f7c 100644 --- a/WWW/Library/Implementation/HTTCP.c +++ b/WWW/Library/Implementation/HTTCP.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTTCP.c,v 1.112 2012/08/14 23:18:41 tom Exp $ + * $LynxId: HTTCP.c,v 1.113 2012/08/15 22:24:41 tom Exp $ * * Generic Communication Code HTTCP.c * ========================== @@ -1456,7 +1456,7 @@ static void dump_addrinfo(const char *tag, void *data) static size_t fill_addrinfo(char *buffer, const LYNX_ADDRINFO *phost) { - LYNX_ADDRINFO *actual = (LYNX_ADDRINFO *) buffer; + LYNX_ADDRINFO *actual = (LYNX_ADDRINFO *) (void *) buffer; int count = 0; char *heap = (char *) &(actual[MAX_ADDRINFO]); @@ -1475,7 +1475,7 @@ static size_t fill_addrinfo(char *buffer, break; } - actual->ai_addr = (struct sockaddr *) heap; + actual->ai_addr = (struct sockaddr *) (void *) heap; MemCpy(heap, phost->ai_addr, phost->ai_addrlen); heap += phost->ai_addrlen; @@ -1496,13 +1496,13 @@ static size_t fill_addrinfo(char *buffer, static unsigned read_addrinfo(int fd, char *buffer, size_t length) { unsigned result = read_bytes(fd, buffer, length); - LYNX_ADDRINFO *actual = (LYNX_ADDRINFO *) buffer; + LYNX_ADDRINFO *actual = (LYNX_ADDRINFO *) (void *) buffer; int count = 0; char *heap = (char *) &(actual[MAX_ADDRINFO]); while (count++ < MAX_ADDRINFO) { if (actual->ai_addr) { - actual->ai_addr = (struct sockaddr *) heap; + actual->ai_addr = (struct sockaddr *) (void *) heap; heap += actual->ai_addrlen; } if (actual->ai_next == 0) diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h index 606cd1b7..60106f72 100644 --- a/WWW/Library/Implementation/HTUtils.h +++ b/WWW/Library/Implementation/HTUtils.h @@ -1,5 +1,5 @@ /* - * $LynxId: HTUtils.h,v 1.110 2012/07/04 19:37:26 tom Exp $ + * $LynxId: HTUtils.h,v 1.112 2012/08/15 23:11:48 tom Exp $ * * Utility macros for the W3 code library * MACROS FOR GENERAL USE @@ -52,6 +52,7 @@ char *alloca(); #include <limits.h> #endif /* DJGPP */ +#include <sys/types.h> #include <stdio.h> #define DONT_TRACK_INTERNAL_LINKS 1 @@ -185,6 +186,12 @@ extern int ignore_unused; #undef small /* see <w32api/rpcndr.h> */ #endif +#ifdef HAVE_ATOLL +#define LYatoll(n) atoll(n) +#else +extern off_t LYatoll(const char *value); +#endif + /* cygwin, mingw32, etc. */ #ifdef FILE_DOES_NOT_EXIST #undef FILE_DOES_NOT_EXIST /* see <w32api/winnt.h> */ |