about summary refs log tree commit diff stats
path: root/WWW/Library
diff options
context:
space:
mode:
Diffstat (limited to 'WWW/Library')
-rw-r--r--WWW/Library/Implementation/HTFile.h4
-rw-r--r--WWW/Library/Implementation/HTGroup.c2
-rw-r--r--WWW/Library/Implementation/HTMLGen.h2
-rw-r--r--WWW/Library/Implementation/HTStyle.c250
-rw-r--r--WWW/Library/Implementation/HTStyle.h10
-rw-r--r--WWW/Library/Implementation/HTTCP.c12
-rw-r--r--WWW/Library/Implementation/HTWAIS.c6
-rw-r--r--WWW/Library/Implementation/SGML.c4
8 files changed, 13 insertions, 277 deletions
diff --git a/WWW/Library/Implementation/HTFile.h b/WWW/Library/Implementation/HTFile.h
index 0bdfb794..12090900 100644
--- a/WWW/Library/Implementation/HTFile.h
+++ b/WWW/Library/Implementation/HTFile.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTFile.h,v 1.35 2021/07/29 22:54:21 tom Exp $
+ * $LynxId: HTFile.h,v 1.36 2023/10/24 08:07:39 tom Exp $
  *							File access in libwww
  *				FILE ACCESS
  *
@@ -151,7 +151,7 @@ extern "C" {
  *
  *  ON EXIT,
  *
- *  return		The represntation it imagines the file is in.
+ *  return		The representation it imagines the file is in.
  *
  *  *pEncoding		The encoding (binary, 7bit, etc). See HTSetSuffix.
  */
diff --git a/WWW/Library/Implementation/HTGroup.c b/WWW/Library/Implementation/HTGroup.c
index 42d55dc2..ca850315 100644
--- a/WWW/Library/Implementation/HTGroup.c
+++ b/WWW/Library/Implementation/HTGroup.c
@@ -608,7 +608,7 @@ static BOOL ip_in_def_list(AddressDefList *address_def_list,
 
 	while (NULL != (ref = (Ref *) HTList_nextObject(cur))) {
 	    /* Value of ref->translation is ignored, i.e., */
-	    /* no recursion for ip address tamplates.     */
+	    /* no recursion for ip address templates.     */
 	    if (ip_mask_match(ref->name, ip_number, ip_name))
 		return YES;
 	}
diff --git a/WWW/Library/Implementation/HTMLGen.h b/WWW/Library/Implementation/HTMLGen.h
index f2db3d40..42073d38 100644
--- a/WWW/Library/Implementation/HTMLGen.h
+++ b/WWW/Library/Implementation/HTMLGen.h
@@ -1,7 +1,7 @@
 /*                  /Net/dxcern/userd/timbl/hypertext/WWW/Library/Implementation/HTMLGen.html
                                       HTML GENERATOR
                                              
-   This module converts structed stream into stream.  That is, given a stream
+   This module converts structured stream into stream.  That is, given a stream
    to write to, it will give you a structured stream to
    
  */
diff --git a/WWW/Library/Implementation/HTStyle.c b/WWW/Library/Implementation/HTStyle.c
index 54c0bc52..53b38642 100644
--- a/WWW/Library/Implementation/HTStyle.c
+++ b/WWW/Library/Implementation/HTStyle.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTStyle.c,v 1.16 2009/11/27 13:01:48 tom Exp $
+ * $LynxId: HTStyle.c,v 1.17 2023/10/24 08:14:31 tom Exp $
  *
  *	Style Implementation for Hypertext			HTStyle.c
  *	==================================
@@ -49,134 +49,6 @@ HTStyle *HTStyleFree(HTStyle *self)
     return NULL;
 }
 
-#ifdef SUPPRESS			/* Only on the NeXT */
-/*	Read a style from a stream	(without its name)
- *	--------------------------
- *
- *	Reads a style with paragraph information from a stream.
- *	The style name is not read or written by these routines.
- */
-#define NONE_STRING "(None)"
-#define HTStream NXStream
-
-HTStyle *HTStyleRead(HTStyle *style, HTStream *stream)
-{
-    char myTag[STYLE_NAME_LENGTH];
-    char fontName[STYLE_NAME_LENGTH];
-    NXTextStyle *p;
-    int tab;
-    int gotpara;		/* flag: have we got a paragraph definition? */
-
-    NXScanf(stream, "%s%s%f%d",
-	    myTag,
-	    fontName,
-	    &style->fontSize,
-	    &gotpara);
-    if (gotpara) {
-	if (!style->paragraph) {
-	    style->paragraph = malloc(sizeof(*(style->paragraph)));
-	    if (!style->paragraph)
-		outofmem(__FILE__, "HTStyleRead");
-	    style->paragraph->tabs = 0;
-	}
-	p = style->paragraph;
-	NXScanf(stream, "%f%f%f%f%hd%f%f%hd",
-		&p->indent1st,
-		&p->indent2nd,
-		&p->lineHt,
-		&p->descentLine,
-		&p->alignment,
-		&style->spaceBefore,
-		&style->spaceAfter,
-		&p->numTabs);
-	FREE(p->tabs);
-	p->tabs = malloc(p->numTabs * sizeof(p->tabs[0]));
-	if (!p->tabs)
-	    outofmem(__FILE__, "HTStyleRead");
-	for (tab = 0; tab < p->numTabs; tab++) {
-	    NXScanf(stream, "%hd%f",
-		    &p->tabs[tab].kind,
-		    &p->tabs[tab].x);
-	}
-    } else {			/* No paragraph */
-	FREE(style->paragraph);
-    }				/* if no paragraph */
-    StrAllocCopy(style->SGMLTag, myTag);
-    if (strcmp(fontName, NONE_STRING) == 0)
-	style->font = 0;
-    else
-      style->font =[Font newFont: fontName size:style->fontSize];
-    return NULL;
-}
-
-/*	Write a style to a stream in a compatible way
-*/
-HTStyle *HTStyleWrite(HTStyle *style, NXStream * stream)
-{
-    int tab;
-    NXTextStyle *p = style->paragraph;
-
-    NXPrintf(stream, "%s %s %f %d\n",
-	     style->SGMLTag,
-	     style->font ?[style->font name] : NONE_STRING,
-	     style->fontSize,
-	     p != 0);
-
-    if (p) {
-	NXPrintf(stream, "\t%f %f %f %f %d %f %f\t%d\n",
-		 p->indent1st,
-		 p->indent2nd,
-		 p->lineHt,
-		 p->descentLine,
-		 p->alignment,
-		 style->spaceBefore,
-		 style->spaceAfter,
-		 p->numTabs);
-
-	for (tab = 0; tab < p->numTabs; tab++)
-	    NXPrintf(stream, "\t%d %f\n",
-		     p->tabs[tab].kind,
-		     p->tabs[tab].x);
-    }
-    return style;
-}
-
-/*	Write a style to stdout for diagnostics
-*/
-HTStyle *HTStyleDump(HTStyle *style)
-{
-    int tab;
-    NXTextStyle *p = style->paragraph;
-
-    printf(STYLE_DUMP_FONT,
-	   style,
-	   style->name,
-	   style->SGMLTag,
-	   [style->font name],
-	   style->fontSize);
-    if (p) {
-	printf(STYLE_DUMP_IDENT,
-	       p->indent1st,
-	       p->indent2nd,
-	       p->lineHt,
-	       p->descentLine);
-	printf(STYLE_DUMP_ALIGN,
-	       p->alignment,
-	       p->numTabs,
-	       style->spaceBefore,
-	       style->spaceAfter);
-
-	for (tab = 0; tab < p->numTabs; tab++) {
-	    printf(STYLE_DUMP_TAB,
-		   p->tabs[tab].kind,
-		   p->tabs[tab].x);
-	}
-	printf("\n");
-    }				/* if paragraph */
-    return style;
-}
-#endif /* SUPPRESS */
-
 /*			StyleSheet Functions
  *			====================
  */
@@ -194,71 +66,6 @@ HTStyle *HTStyleNamed(HTStyleSheet *self, const char *name)
     return NULL;
 }
 
-#ifdef NEXT_SUPRESS		/* Not in general common code */
-
-HTStyle *HTStyleMatching(HTStyleSheet *self, HTStyle *style)
-{
-    HTStyle *scan;
-
-    for (scan = self->styles; scan; scan = scan->next)
-	if (scan->paragraph == para)
-	    return scan;
-    return NULL;
-}
-
-/*	Find the style which best fits a given run
- *	------------------------------------------
- *
- *	This heuristic is used for guessing the style for a run of
- *	text which has been pasted in.  In order, we try:
- *
- *	A style whose paragraph structure is actually used by the run.
- *	A style matching in font
- *	A style matching in paragraph style exactly
- *	A style matching in paragraph to a degree
- */
-
-HTStyle *HTStyleForRun(HTStyleSheet *self, NXRun * run)
-{
-    HTStyle *scan;
-    HTStyle *best = 0;
-    int bestMatch = 0;
-    NXTextStyle *rp = run->paraStyle;
-
-    for (scan = self->styles; scan; scan = scan->next)
-	if (scan->paragraph == run->paraStyle)
-	    return scan;	/* Exact */
-
-    for (scan = self->styles; scan; scan = scan->next) {
-	NXTextStyle *sp = scan->paragraph;
-
-	if (sp) {
-	    int match = 0;
-
-	    if (sp->indent1st == rp->indent1st)
-		match = match + 1;
-	    if (sp->indent2nd == rp->indent2nd)
-		match = match + 2;
-	    if (sp->lineHt == rp->lineHt)
-		match = match + 1;
-	    if (sp->numTabs == rp->numTabs)
-		match = match + 1;
-	    if (sp->alignment == rp->alignment)
-		match = match + 3;
-	    if (scan->font == run->font)
-		match = match + 10;
-	    if (match > bestMatch) {
-		best = scan;
-		bestMatch = match;
-	    }
-	}
-    }
-    CTRACE((tfp, "HTStyleForRun: Best match for style is %d out of 18\n",
-	    bestMatch));
-    return best;
-}
-#endif /* NEXT_SUPRESS */
-
 /*	Add a style to a sheet
  *	----------------------
  */
@@ -321,58 +128,3 @@ HTStyleSheet *HTStyleSheetFree(HTStyleSheet *self)
     FREE(self);
     return NULL;
 }
-
-/*	Read a stylesheet from a typed stream
- *	-------------------------------------
- *
- *	Reads a style sheet from a stream.  If new styles have the same names
- *	as existing styles, they replace the old ones without changing the ids.
- */
-
-#ifdef NEXT_SUPRESS		/* Only on the NeXT */
-HTStyleSheet *HTStyleSheetRead(HTStyleSheet *self, NXStream * stream)
-{
-    int numStyles;
-    int i;
-    HTStyle *style;
-    char styleName[80];
-
-    NXScanf(stream, " %d ", &numStyles);
-    CTRACE((tfp, "Stylesheet: Reading %d styles\n", numStyles));
-    for (i = 0; i < numStyles; i++) {
-	NXScanf(stream, "%s", styleName);
-	style = HTStyleNamed(self, styleName);
-	if (!style) {
-	    style = HTStyleNewNamed(styleName);
-	    (void) HTStyleSheetAddStyle(self, style);
-	}
-	(void) HTStyleRead(style, stream);
-	if (TRACE)
-	    HTStyleDump(style);
-    }
-    return self;
-}
-
-/*	Write a stylesheet to a typed stream
- *	------------------------------------
- *
- *	Writes a style sheet to a stream.
- */
-
-HTStyleSheet *HTStyleSheetWrite(HTStyleSheet *self, NXStream * stream)
-{
-    int numStyles = 0;
-    HTStyle *style;
-
-    for (style = self->styles; style; style = style->next)
-	numStyles++;
-    NXPrintf(stream, "%d\n", numStyles);
-
-    CTRACE((tfp, "StyleSheet: Writing %d styles\n", numStyles));
-    for (style = self->styles; style; style = style->next) {
-	NXPrintf(stream, "%s ", style->name);
-	(void) HTStyleWrite(style, stream);
-    }
-    return self;
-}
-#endif /* NEXT_SUPRESS */
diff --git a/WWW/Library/Implementation/HTStyle.h b/WWW/Library/Implementation/HTStyle.h
index 79ba003f..c81436d1 100644
--- a/WWW/Library/Implementation/HTStyle.h
+++ b/WWW/Library/Implementation/HTStyle.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTStyle.h,v 1.18 2020/01/21 22:02:35 tom Exp $
+ * $LynxId: HTStyle.h,v 1.20 2023/10/24 08:14:54 tom Exp $
 					    HTStyle: Style management for libwww
                               STYLE DEFINITION FOR HYPERTEXT
 
@@ -148,10 +148,6 @@ extern "C" {
     extern HTStyle *HTStyleNewNamed(const char *name);
     extern HTStyle *HTStyleFree(HTStyle *self);
 
-#ifdef SUPRESS
-    extern HTStyle *HTStyleRead(HTStyle *self, HTStream *stream);
-    extern HTStyle *HTStyleWrite(HTStyle *self, HTStream *stream);
-#endif
 /*              Style Sheet
  *              -----------
  */
@@ -172,10 +168,6 @@ extern "C" {
     extern HTStyleSheet *HTStyleSheetAddStyle(HTStyleSheet *self, HTStyle *style);
     extern HTStyleSheet *HTStyleSheetRemoveStyle(HTStyleSheet *self, HTStyle *style);
 
-#ifdef SUPPRESS
-    extern HTStyleSheet *HTStyleSheetRead(HTStyleSheet *self, HTStream *stream);
-    extern HTStyleSheet *HTStyleSheetWrite(HTStyleSheet *self, HTStream *stream);
-#endif
 #define CLEAR_POINTER ((void *)-1)	/* Pointer value means "clear me" */
 
 /* DefaultStyle.c */
diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c
index 087f515a..ee164610 100644
--- a/WWW/Library/Implementation/HTTCP.c
+++ b/WWW/Library/Implementation/HTTCP.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTTCP.c,v 1.164 2023/04/10 22:41:21 tom Exp $
+ * $LynxId: HTTCP.c,v 1.165 2023/10/24 08:15:04 tom Exp $
  *
  *			Generic Communication Code		HTTCP.c
  *			==========================
@@ -1323,16 +1323,6 @@ static int HTParseInet(SockA *soc_in, const char *str)
 	    soc_in->sin_port = htons((PortNumber) strtol(port, &strptr, 10));
 #endif /* Decnet */
 #endif /* Unix vs. VMS */
-#ifdef SUPPRESS			/* 1. crashes!?!.  2. URL syntax has number not name */
-	} else {
-	    struct servent *serv = getservbyname(port, (char *) 0);
-
-	    if (serv) {
-		soc_in->sin_port = serv->s_port;
-	    } else {
-		CTRACE((tfp, "TCP: Unknown service %s\n", port));
-	    }
-#endif /* SUPPRESS */
 	}
 	if (strptr && *strptr != '\0') {
 	    FREE(host);
diff --git a/WWW/Library/Implementation/HTWAIS.c b/WWW/Library/Implementation/HTWAIS.c
index 3c9fb0a6..27b5b054 100644
--- a/WWW/Library/Implementation/HTWAIS.c
+++ b/WWW/Library/Implementation/HTWAIS.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTWAIS.c,v 1.40 2020/01/21 22:22:15 tom Exp $
+ * $LynxId: HTWAIS.c,v 1.42 2023/10/24 08:10:31 tom Exp $
  *
  *	WorldWideWeb - Wide Area Information Server Access	HTWAIS.c
  *	==================================================
@@ -8,7 +8,7 @@
  *	remote	WAIS
  *  server, and provide that data to a WWW client in hypertext form.
  *  Source files, once retrieved, are stored and used to provide
- *  information about the index when that is acessed.
+ *  information about the index when that is accessed.
  *
  *  Authors
  *	BK	Brewster Kahle, Thinking Machines, <Brewster@think.com>
@@ -330,7 +330,7 @@ static any *WAIS_from_WWW(any *docid, char *docname)
     char *z;			/* Output pointer */
     char *sor;			/* Start of record - points to size field. */
     char *p;			/* Input pointer */
-    char *q;			/* Poisition of "=" */
+    char *q;			/* Position of "=" */
     char *s;			/* Position of semicolon */
     int n;			/* size */
 
diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c
index 5bf8db97..c2566856 100644
--- a/WWW/Library/Implementation/SGML.c
+++ b/WWW/Library/Implementation/SGML.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: SGML.c,v 1.185 2023/10/04 23:42:42 tom Exp $
+ * $LynxId: SGML.c,v 1.186 2023/10/25 22:35:29 tom Exp $
  *
  *			General SGML Parser code		SGML.c
  *			========================
@@ -3657,6 +3657,8 @@ static void SGML_character(HTStream *me, int c_in)
 		if ((LYxhtml_parsing || me->extended_html)
 		    && ignore_when_empty(me->current_tag)) {
 		    discard_empty(me);
+		} else {
+		    HTChunkTerminate(string);
 		}
 	    } else {
 		HTChunkTerminate(string);