diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1998-05-11 03:50:40 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1998-05-11 03:50:40 -0400 |
commit | 116ac6932821c4a82256313792b26ab28259e8f0 (patch) | |
tree | a076f5e67aaf9b33585da9d079acde9d52def50c /WWW | |
parent | ee5cdfe9af88df5a276ac105bf757a6967522b7a (diff) | |
download | lynx-snapshots-116ac6932821c4a82256313792b26ab28259e8f0.tar.gz |
snapshot of project "lynx", label v2-8-1dev_10
Diffstat (limited to 'WWW')
-rw-r--r-- | WWW/Library/Implementation/HTAABrow.c | 5 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTAABrow.h | 1 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTAAUtil.c | 3 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTAAUtil.h | 1 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTFormat.c | 16 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTPlain.c | 2 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTTP.c | 11 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTUtils.h | 8 | ||||
-rw-r--r-- | WWW/Library/Implementation/SGML.c | 102 | ||||
-rw-r--r-- | WWW/Library/Implementation/tcp.h | 1 |
10 files changed, 56 insertions, 94 deletions
diff --git a/WWW/Library/Implementation/HTAABrow.c b/WWW/Library/Implementation/HTAABrow.c index 1be48c4a..3bba7f3f 100644 --- a/WWW/Library/Implementation/HTAABrow.c +++ b/WWW/Library/Implementation/HTAABrow.c @@ -1052,10 +1052,9 @@ PUBLIC char *HTAA_composeAuth ARGS4( ** field (in function HTAA_composeAuth()). ** NO, otherwise. */ -PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS5( +PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS4( char *, start_of_headers, int, length, - void *, handle, int, soc, BOOL, IsProxy) { @@ -1080,7 +1079,7 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS5( */ CTRACE(tfp, "Server reply header lines:\n"); - HTAA_setupReader(start_of_headers, length, handle, soc); + HTAA_setupReader(start_of_headers, length, soc); while (NULL != (line = HTAA_getUnfoldedLine()) && *line != '\0') { CTRACE(tfp, "%s\n", line); diff --git a/WWW/Library/Implementation/HTAABrow.h b/WWW/Library/Implementation/HTAABrow.h index 9512603a..c62a3c4c 100644 --- a/WWW/Library/Implementation/HTAABrow.h +++ b/WWW/Library/Implementation/HTAABrow.h @@ -115,7 +115,6 @@ extern char *HTAA_composeAuth PARAMS(( extern BOOL HTAA_shouldRetryWithAuth PARAMS(( char * start_of_headers, int length, - void * handle, int soc, BOOL IsProxy)); diff --git a/WWW/Library/Implementation/HTAAUtil.c b/WWW/Library/Implementation/HTAAUtil.c index bbcbc508..2ce86409 100644 --- a/WWW/Library/Implementation/HTAAUtil.c +++ b/WWW/Library/Implementation/HTAAUtil.c @@ -483,9 +483,8 @@ PRIVATE int in_soc = -1; ** will use this buffer first and then ** proceed to read from socket. */ -PUBLIC void HTAA_setupReader ARGS4(char *, start_of_headers, +PUBLIC void HTAA_setupReader ARGS3(char *, start_of_headers, int, length, - void *, handle, int, soc) { start_pointer = buffer; diff --git a/WWW/Library/Implementation/HTAAUtil.h b/WWW/Library/Implementation/HTAAUtil.h index 2f353a63..de6878e6 100644 --- a/WWW/Library/Implementation/HTAAUtil.h +++ b/WWW/Library/Implementation/HTAAUtil.h @@ -328,7 +328,6 @@ Header Line Reader */ PUBLIC void HTAA_setupReader PARAMS((char * start_of_headers, int length, - void * handle, int soc)); diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c index cdd2fa9b..db0b59c1 100644 --- a/WWW/Library/Implementation/HTFormat.c +++ b/WWW/Library/Implementation/HTFormat.c @@ -48,6 +48,7 @@ PUBLIC long int HTMaxBytes = 0; /* No effective limit */ #include <LYexit.h> #include <LYUtils.h> +#include <GridText.h> #include <LYGlobalDefs.h> #include <LYLeaks.h> @@ -577,6 +578,11 @@ PUBLIC int HTCopy ARGS4( (*targetClass.put_block)(sink, input_buffer, status); +#ifdef DISP_PARTIAL + if (display_partial) + HText_pageDisplay(Newline,""); +#endif /* DISP_PARTIAL */ + bytes += status; if (anchor && anchor->content_length > 0) sprintf(line, "Read %d of %d bytes of data.", @@ -637,6 +643,11 @@ PUBLIC int HTFileCopy ARGS2( } (*targetClass.put_block)(sink, input_buffer, status); +#ifdef DISP_PARTIAL + if (display_partial) + HText_pageDisplay(Newline,""); +#endif /* DISP_PARTIAL */ + bytes += status; if (nreads >= 100) { /* @@ -726,6 +737,11 @@ PRIVATE int HTGzFileCopy ARGS2( } (*targetClass.put_block)(sink, input_buffer, status); +#ifdef DISP_PARTIAL + if (display_partial) + HText_pageDisplay(Newline,""); +#endif /* DISP_PARTIAL */ + bytes += status; if (nreads >= 100) { /* diff --git a/WWW/Library/Implementation/HTPlain.c b/WWW/Library/Implementation/HTPlain.c index 363ad9e3..df6cba9a 100644 --- a/WWW/Library/Implementation/HTPlain.c +++ b/WWW/Library/Implementation/HTPlain.c @@ -337,7 +337,7 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l) } if (me->T.trans_to_uni && - (code >= 127 || + (code >= LYlowest_eightbit[me->inUCLYhndl] || (code < 32 && code != 0 && me->T.trans_C0_to_uni))) { /* diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c index c2e48411..870f35b1 100644 --- a/WWW/Library/Implementation/HTTP.c +++ b/WWW/Library/Implementation/HTTP.c @@ -33,6 +33,7 @@ #include <HTAABrow.h> #include <LYGlobalDefs.h> +#include <GridText.h> #include <LYStrings.h> #include <LYLeaks.h> @@ -690,6 +691,10 @@ try_again: goto clean_up; } } +#ifdef DISP_PARTIAL + else if (display_partial) + HText_pageDisplay(Newline,""); +#endif /* DISP_PARTIAL */ bytes_already_read += status; sprintf (line, "Read %d bytes of data.", bytes_already_read); @@ -1462,8 +1467,7 @@ Cookie2_continuation: */ if (show_401) break; - if (HTAA_shouldRetryWithAuth(start_of_data, length, - (void *)handle, s, NO)) { + if (HTAA_shouldRetryWithAuth(start_of_data, length, s, NO)) { HTTP_NETCLOSE(s, handle); if (dump_output_immediately && !authentication_info[0]) { @@ -1512,8 +1516,7 @@ Cookie2_continuation: */ if (!using_proxy || show_407) break; - if (HTAA_shouldRetryWithAuth(start_of_data, length, - (void *)handle, s, YES)) { + if (HTAA_shouldRetryWithAuth(start_of_data, length, s, YES)) { HTTP_NETCLOSE(s, handle); if (dump_output_immediately && !proxyauth_info[0]) { diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h index fa3677d2..68032dab 100644 --- a/WWW/Library/Implementation/HTUtils.h +++ b/WWW/Library/Implementation/HTUtils.h @@ -121,9 +121,6 @@ Debug message control. #define PROGRESS(str) /* nothing for now */ #endif -#define CTRACE if(TRACE)fprintf -#define tfp stderr - /* ERROR TYPE @@ -377,6 +374,11 @@ The local equivalents of CR and LF #define LF FROMASCII('\012') /* ASCII line feed LOCAL EQUIVALENT */ #define CR FROMASCII('\015') /* Will be converted to ^M for transmission */ +#define CTRACE if(TRACE)fprintf +#define tfp TraceFP() + +extern FILE *TraceFP NOPARAMS; + #endif /* HTUTILS_H */ /* diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c index 9c2323cc..66c515f3 100644 --- a/WWW/Library/Implementation/SGML.c +++ b/WWW/Library/Implementation/SGML.c @@ -4,9 +4,9 @@ ** This module implements an HTStream object. To parse an ** SGML file, create this object which is a parser. The object ** is (currently) created by being passed a DTD structure, -** and a target HTStructured oject at which to throw the parsed stuff. +** and a target HTStructured object at which to throw the parsed stuff. ** -** 6 Feb 93 Binary seraches used. Intreface modified. +** 6 Feb 93 Binary searches used. Interface modified. */ #include <HTUtils.h> @@ -31,6 +31,7 @@ #include <HTChunk.h> #include <LYCharSets.h> +#include <LYStrings.h> #include <LYLeaks.h> #define INVALID (-1) @@ -56,7 +57,7 @@ extern int LYlowest_eightbit[]; /* Element Stack ** ------------- -** This allows us to return down the stack reselcting styles. +** This allows us to return down the stack reselecting styles. ** As we return, attribute values will be garbage in general. */ typedef struct _HTElement HTElement; @@ -326,7 +327,7 @@ PRIVATE void handle_attribute_value ARGS2( ** Translate some Unicodes to Lynx special codes and output them. ** Special codes - ones those output depend on parsing. ** -** Additional issue, like handling bidirectional text if nesseccery +** Additional issue, like handling bidirectional text if necessary ** may be called from here: zwnj (8204), zwj (8205), lrm (8206), rlm (8207) ** - currently they are passed to def7_uni.tbl as regular characters. ** @@ -411,9 +412,6 @@ PRIVATE void handle_entity ARGS2( long uck; CONST char *p; CONST char *s = context->string->data; -#ifdef NOTUSED_FOTEMODS - int high, low, i, diff; -#endif /* @@ -467,78 +465,26 @@ PRIVATE void handle_entity ARGS2( FoundEntity = TRUE; return; } -#ifdef NOTUSED_FOTEMODS /* - ** If the value is greater than 255 and we do not - ** have the "7-bit approximations" as our output - ** character set (in which case we did it already) - ** seek a translation for that. - FM + ** Ignore zwnj (8204) and zwj (8205), if we get to here. + ** Note that zwnj may have been handled as <WBR> + ** by the calling function. - FM */ - if ((chk = ((code > 255) && - context->outUCLYhndl != - UCGetLYhndl_byMIME("us-ascii"))) && - (uck = UCTransUniChar(code, - UCGetLYhndl_byMIME("us-ascii")))>= 32 && - uck < 127) { - /* - ** Got an ASCII character (yippey). - FM - */ - PUTC(((char)(uck & 0xff))); - FoundEntity = TRUE; - return; - } else if ((chk && uck == -4) && - (uck = UCTransUniCharStr(replace_buf, - 60, code, - UCGetLYhndl_byMIME("us-ascii"), - 0) >= 0)) { - /* - ** Got a replacement string (yippey). - FM - */ - for (p = replace_buf; *p; p++) - PUTC(*p); + if (!strcmp(s, "zwnj") || + !strcmp(s, "zwj")) { + CTRACE(tfp, "handle_entity: Ignoring '%s'.\n", s); FoundEntity = TRUE; return; } - } - /* - ** Ignore zwnj (8204) and zwj (8205), if we get to here. - ** Note that zwnj may have been handled as <WBR> - ** by the calling function. - FM - */ - if (!strcmp(s, "zwnj") || - !strcmp(s, "zwj")) { - CTRACE(tfp, "handle_entity: Ignoring '%s'.\n", s); - FoundEntity = TRUE; - return; - } - - /* - ** Ignore lrm (8206), and rln (8207), if we get to here. - FM - */ - if (!strcmp(s, "lrm") || - !strcmp(s, "rlm")) { - CTRACE(tfp, "handle_entity: Ignoring '%s'.\n", s); - FoundEntity = TRUE; - return; - } - - /* - ** We haven't succeeded yet, so try the old LYCharSets - ** arrays for translation strings. - FM - */ - for (low = 0, high = context->dtd->number_of_entities; - high > low; - diff < 0 ? (low = i+1) : (high = i)) { /* Binary search */ - i = (low + (high-low)/2); - diff = strcmp(entities[i], s); /* Case sensitive! */ - if (diff == 0) { /* success: found it */ - for (p = LYCharSets[context->outUCLYhndl][i]; *p; p++) { - PUTC(*p); - } + /* + ** Ignore lrm (8206), and rln (8207), if we get to here. - FM + */ + if (!strcmp(s, "lrm") || + !strcmp(s, "rlm")) { + CTRACE(tfp, "handle_entity: Ignoring '%s'.\n", s); FoundEntity = TRUE; return; } -#endif } /* @@ -1008,7 +954,7 @@ PRIVATE void start_element ARGS1( ** ------------------------ ** ** On entry, -** dtd points to dtd structire including valid tag list +** dtd points to dtd structure including valid tag list ** string points to name of tag in question ** ** On exit, @@ -1269,7 +1215,7 @@ PRIVATE void SGML_character ARGS2( ** to Unicode, try that now. - FM */ if (context->T.trans_to_uni && - ((unsign_c >= 127) || + ((unsign_c >= LYlowest_eightbit[context->inUCLYhndl]) || (unsign_c < 32 && unsign_c != 0 && context->T.trans_C0_to_uni))) { /* @@ -1364,7 +1310,7 @@ top0a: ** which unsign_c has been defined), and from below ** when we are recycling a character (e.g., because ** it terminated an entity but is not the standard -** semi-colon). The chararcter will already have +** semi-colon). The character will already have ** been put through the Unicode conversions. - FM */ top1: @@ -1512,7 +1458,7 @@ top1: 0) >= 0)) { /* ** Got a replacement string. - ** No further tests for valididy - assume that whoever + ** No further tests for validity - assume that whoever ** defined replacement strings knew what she was doing. - KW */ for (p = replace_buf; *p; p++) @@ -1523,7 +1469,7 @@ top1: } else if (context->T.output_utf8 && PUTUTF8(clong)) { ; /* do nothing more */ /* - ** If it's any other (> 160) 8-bit chararcter, and + ** If it's any other (> 160) 8-bit character, and ** we have not set HTPassEightBitRaw nor HTCJK, nor ** have the "ISO Latin 1" character set selected, ** back translate for our character set. - FM @@ -2027,6 +1973,7 @@ top1: */ for (p = replace_buf; *p; p++) PUTC(*p); +#endif /* NOTUSED_FOTEMODS */ /* ** Ignore 8205 (zwj), ** 8206 (lrm), and 8207 (rln), if we get to here. - FM @@ -2050,7 +1997,6 @@ top1: if (c != ';') goto top1; break; -#endif /* NOTUSED_FOTEMODS */ /* ** Show the numeric entity if we get to here ** and the value: @@ -3199,7 +3145,7 @@ PUBLIC HTStream* SGML_new ARGS3( ** Added 24-Mar-96 by FM, based on: ** //////////////////////////////////////////////////////////////////////// -Copyright (c) 1993 Electrotechnical Laboratry (ETL) +Copyright (c) 1993 Electrotechnical Laboratory (ETL) Permission to use, copy, modify, and distribute this material for any purpose and without fee is hereby granted, provided diff --git a/WWW/Library/Implementation/tcp.h b/WWW/Library/Implementation/tcp.h index ccd4ccf8..e6f8e2de 100644 --- a/WWW/Library/Implementation/tcp.h +++ b/WWW/Library/Implementation/tcp.h @@ -294,7 +294,6 @@ extern int socket_ioctl(); */ extern int multinet_accept(); extern int multinet_bind(); -extern int bzero(); extern int multinet_connect(); extern int multinet_gethostname(); extern int multinet_getsockname(); |