- From: Hidekazu SHIOZAWA <shiozawa@myo.inst.keio.ac.jp>
- Date: Fri, 11 Apr 1997 18:18:29 +0900
- To: www-lib@w3.org, www-lib-bugs@w3.org
- Cc: Hidekazu Shiozawa <shiozawa@myo.inst.keio.ac.jp>
The following are patches for libwww 5.1b. They are converted from the patches that have been already reported for libwww 5.0a in the mailinglist. I don't know whether all of them are correct, though some are obviously correct. diff -crN w3c-libwww-5.1b.orig/Library/src/HTAssoc.c w3c-libwww-5.1b/Library/src/HTAssoc.c *** w3c-libwww-5.1b.orig/Library/src/HTAssoc.c Tue Oct 8 00:04:21 1996 --- w3c-libwww-5.1b/Library/src/HTAssoc.c Fri Apr 11 04:53:36 1997 *************** *** 112,117 **** --- 112,118 ---- HTList_removeObject(list, assoc); HT_FREE(assoc); found = YES; + /* break; /* Amaya does this. Correct? */ } } } diff -crN w3c-libwww-5.1b.orig/Library/src/HTCache.c w3c-libwww-5.1b/Library/src/HTCache.c *** w3c-libwww-5.1b.orig/Library/src/HTCache.c Sat Apr 5 09:26:17 1997 --- w3c-libwww-5.1b/Library/src/HTCache.c Fri Apr 11 05:03:15 1997 *************** *** 258,270 **** if (cache_root && CacheTable) { char * index = cache_index_name(cache_root); FILE * fp = NULL; if (CACHE_TRACE) HTTrace("Cache Index. Writing index `%s\'\n", index); /* ** Open the file for writing. Note - we don't take a backup! ** This should probably be fixed! */ - if (!index) return NO; if ((fp = fopen(index, "wb")) == NULL) { if (CACHE_TRACE) HTTrace("Cache Index. Can't open `%s\' for writing\n", index); --- 258,270 ---- if (cache_root && CacheTable) { char * index = cache_index_name(cache_root); FILE * fp = NULL; + if (!index) return NO; if (CACHE_TRACE) HTTrace("Cache Index. Writing index `%s\'\n", index); /* ** Open the file for writing. Note - we don't take a backup! ** This should probably be fixed! */ if ((fp = fopen(index, "wb")) == NULL) { if (CACHE_TRACE) HTTrace("Cache Index. Can't open `%s\' for writing\n", index); *************** *** 357,363 **** &cache->freshness_lifetime, &cache->response_time, &cache->corrected_initial_age, ! &validate) < 0) { if (CACHE_TRACE) HTTrace("Cache Index. Error reading cache index\n"); return NO; } --- 357,363 ---- &cache->freshness_lifetime, &cache->response_time, &cache->corrected_initial_age, ! &validate) != 9) { if (CACHE_TRACE) HTTrace("Cache Index. Error reading cache index\n"); return NO; } *************** *** 949,955 **** if (HTCache_hasLock(pres)) { if (HTCache_breakLock(pres, request) == NO) { ! if (CACHE_TRACE) HTTrace("Cache....... Entry %p already in use\n"); return pres; } } --- 949,955 ---- if (HTCache_hasLock(pres)) { if (HTCache_breakLock(pres, request) == NO) { ! if (CACHE_TRACE) HTTrace("Cache....... Entry %p already in use\n", pres); return pres; } } diff -crN w3c-libwww-5.1b.orig/Library/src/HTEscape.c w3c-libwww-5.1b/Library/src/HTEscape.c *** w3c-libwww-5.1b.orig/Library/src/HTEscape.c Tue Dec 24 06:08:51 1996 --- w3c-libwww-5.1b/Library/src/HTEscape.c Fri Apr 11 04:50:07 1997 *************** *** 112,118 **** if (*p == HEX_ESCAPE) { p++; if (*p) *q = from_hex(*p++) * 16; ! #ifdef UNTESTED /* suggestion from Markku Savela - I just copied it in - EGP */ if (*p) *q = FROMASCII(*q + from_hex(*p)), ++p; q++; #else /* UNTESTED */ --- 112,118 ---- if (*p == HEX_ESCAPE) { p++; if (*p) *q = from_hex(*p++) * 16; ! #if 1 /* suggestion from Markku Savela - I just copied it in - EGP */ if (*p) *q = FROMASCII(*q + from_hex(*p)), ++p; q++; #else /* UNTESTED */ diff -crN w3c-libwww-5.1b.orig/Library/src/HTTPReq.c w3c-libwww-5.1b/Library/src/HTTPReq.c *** w3c-libwww-5.1b.orig/Library/src/HTTPReq.c Tue Oct 8 00:04:40 1996 --- w3c-libwww-5.1b/Library/src/HTTPReq.c Fri Apr 11 05:05:47 1997 *************** *** 170,176 **** ** Otherwise use all the registered converters to generate the ** accept header */ ! if (HTRequest_outputFormat(request) == WWW_PRESENT) { int list; HTList *cur; BOOL first=YES; --- 170,177 ---- ** Otherwise use all the registered converters to generate the ** accept header */ ! if (HTRequest_outputFormat(request) == WWW_PRESENT || ! HTRequest_conversion(request) != (HTList *) NULL) { int list; HTList *cur; BOOL first=YES; diff -crN w3c-libwww-5.1b.orig/Library/src/SGML.c w3c-libwww-5.1b/Library/src/SGML.c *** w3c-libwww-5.1b.orig/Library/src/SGML.c Sat Mar 22 04:34:11 1997 --- w3c-libwww-5.1b/Library/src/SGML.c Fri Apr 11 05:09:21 1997 *************** *** 364,372 **** (context->contents == SGML_LITERAL) ? S_literal : S_nl_tago; } else { ! ++count; goto S_text; } break; --- 364,389 ---- (context->contents == SGML_LITERAL) ? S_literal : S_nl_tago; } + /* + ** The following is a bit tricky/complex, but the + ** goal is to keep the contiguous text runs as long + ** as possible, and the following tries to avoid a + ** need to break after every NL! The first condition + ** verifies that there was no buffer break after NL, + ** and thus the run can simple be extended --msa. + */ + else if (text != b - 1) + { + ++count; + goto S_text; + } else { ! /* NL code was in the previous buffer! Cannot ! extend the text run to cover it. Ouput ! explicitly (count == 0!). ! */ ! PUTC('\n'); goto S_text; } break; diff -crN w3c-libwww-5.1b.orig/Library/src/SGML.h w3c-libwww-5.1b/Library/src/SGML.h *** w3c-libwww-5.1b.orig/Library/src/SGML.h Mon Feb 17 03:47:40 1997 --- w3c-libwww-5.1b/Library/src/SGML.h Fri Apr 11 04:43:20 1997 *************** *** 82,88 **** int number_of_entities; } SGML_dtd; ! #define MAX_ATTRIBUTES 20 /* Max number of attributes per element */ /* CREATE AN SGML PARSER --- 82,88 ---- int number_of_entities; } SGML_dtd; ! #define MAX_ATTRIBUTES 40 /* Max number of attributes per element */ /* CREATE AN SGML PARSER diff -crN w3c-libwww-5.1b.orig/Library/src/SGML.html w3c-libwww-5.1b/Library/src/SGML.html *** w3c-libwww-5.1b.orig/Library/src/SGML.html Mon Feb 17 03:45:43 1997 --- w3c-libwww-5.1b/Library/src/SGML.html Fri Apr 11 04:43:18 1997 *************** *** 88,94 **** int number_of_entities; } SGML_dtd; ! #define MAX_ATTRIBUTES 20 /* Max number of attributes per element */ </PRE> <H2> Create an SGML parser --- 88,94 ---- int number_of_entities; } SGML_dtd; ! #define MAX_ATTRIBUTES 40 /* Max number of attributes per element */ </PRE> <H2> Create an SGML parser Hidekazu Shiozawa Department of Instrumentation Engineering, Keio University shiozawa@myo.inst.keio.ac.jp
Received on Friday, 11 April 1997 05:18:51 UTC