about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation
diff options
context:
space:
mode:
Diffstat (limited to 'WWW/Library/Implementation')
-rw-r--r--WWW/Library/Implementation/HTACL.c5
-rw-r--r--WWW/Library/Implementation/HTAnchor.c5
-rw-r--r--WWW/Library/Implementation/HTFTP.c3
-rw-r--r--WWW/Library/Implementation/HTFTP.h2
-rw-r--r--WWW/Library/Implementation/HTFile.c4
-rw-r--r--WWW/Library/Implementation/HTFormat.c68
-rw-r--r--WWW/Library/Implementation/HTTCP.c1
-rw-r--r--WWW/Library/Implementation/HTTP.c7
-rw-r--r--WWW/Library/Implementation/HTUtils.h1
-rw-r--r--WWW/Library/Implementation/HTVMSUtils.c4
-rw-r--r--WWW/Library/Implementation/HTWAIS.c1
-rw-r--r--WWW/Library/Implementation/SGML.c7
12 files changed, 58 insertions, 50 deletions
diff --git a/WWW/Library/Implementation/HTACL.c b/WWW/Library/Implementation/HTACL.c
index 20087841..ad6ff3e0 100644
--- a/WWW/Library/Implementation/HTACL.c
+++ b/WWW/Library/Implementation/HTACL.c
@@ -173,10 +173,11 @@ PUBLIC GroupDef *HTAA_getAclEntry ARGS3(FILE *, 	acl_file,
 
     while (EOF != HTAAFile_readField(acl_file, buf, len+1)) {
 #ifdef VMS
-	if (HTAA_templateCaseMatch(buf, filename)) {
+	if (HTAA_templateCaseMatch(buf, filename))
 #else /* not VMS */
-	if (HTAA_templateMatch(buf, filename)) {
+	if (HTAA_templateMatch(buf, filename))
 #endif /* not VMS */
+	{
 	    HTList *methods = HTList_new();
 	    HTAAFile_readList(acl_file, methods, MAX_METHODNAME_LEN);
 	    CTRACE(tfp, "Filename '%s' matched template '%s', allowed methods:",
diff --git a/WWW/Library/Implementation/HTAnchor.c b/WWW/Library/Implementation/HTAnchor.c
index a489eba2..9adf69ce 100644
--- a/WWW/Library/Implementation/HTAnchor.c
+++ b/WWW/Library/Implementation/HTAnchor.c
@@ -182,10 +182,11 @@ PUBLIC HTChildAnchor * HTAnchor_findChild ARGS2(
 	if (tag && *tag) {		/* TBL */
 	    while (NULL != (child=(HTChildAnchor *)HTList_nextObject(kids))) {
 #ifdef CASE_INSENSITIVE_ANCHORS
-		if (HTEquivalent(child->tag, tag)) { /* Case insensitive */
+		if (HTEquivalent(child->tag, tag)) /* Case insensitive */
 #else
-		if (HTIdentical(child->tag, tag)) {  /* Case sensitive - FM */
+		if (HTIdentical(child->tag, tag)) /* Case sensitive - FM */
 #endif /* CASE_INSENSITIVE_ANCHORS */
+		{
 		    CTRACE(tfp, "Child anchor %p of parent %p with name `%s' already exists.\n",
 				(void *)child, (void *)parent, tag);
 		    return child;
diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c
index aeba7dae..8e581838 100644
--- a/WWW/Library/Implementation/HTFTP.c
+++ b/WWW/Library/Implementation/HTFTP.c
@@ -110,6 +110,7 @@ BUGS:	@@@	Limit connection cache size!
 #define IPPORT_FTP	21
 #endif /* !IPORT_FTP */
 
+#include <LYUtils.h>
 #include <LYStrings.h>
 #include <LYLeaks.h>
 
@@ -144,7 +145,7 @@ struct _HTStructured {
 /*	Global Variables
 **	---------------------
 */
-PUBLIC BOOLEAN HTfileSortMethod = FILE_BY_NAME;
+PUBLIC int HTfileSortMethod = FILE_BY_NAME;
 PRIVATE char ThisYear[8];
 PRIVATE char LastYear[8];
 PRIVATE int TheDate;
diff --git a/WWW/Library/Implementation/HTFTP.h b/WWW/Library/Implementation/HTFTP.h
index 6bcec339..db26104a 100644
--- a/WWW/Library/Implementation/HTFTP.h
+++ b/WWW/Library/Implementation/HTFTP.h
@@ -21,7 +21,7 @@
 #define FILE_BY_TYPE 1
 #define FILE_BY_SIZE 2
 #define FILE_BY_DATE 3
-extern BOOLEAN HTfileSortMethod;  /* specifies the method of sorting */
+extern int HTfileSortMethod;  /* specifies the method of sorting */
 
 
 /* PUBLIC						 HTMake_VMS_name()
diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c
index 0474c9ae..cc9a26e4 100644
--- a/WWW/Library/Implementation/HTFile.c
+++ b/WWW/Library/Implementation/HTFile.c
@@ -125,10 +125,6 @@ PUBLIC int HTDirAccess = HT_DIR_OK;
 
 #ifdef DIRED_SUPPORT
 PUBLIC int HTDirReadme = HT_DIR_README_NONE;
-#define FILES_FIRST 1
-#define MIXED_STYLE 2
-extern BOOLEAN lynx_edit_mode;
-extern BOOLEAN dir_list_style;
 #else
 PUBLIC int HTDirReadme = HT_DIR_README_TOP;
 #endif /* DIRED_SUPPORT */
diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c
index e92848dc..43e2081b 100644
--- a/WWW/Library/Implementation/HTFormat.c
+++ b/WWW/Library/Implementation/HTFormat.c
@@ -475,6 +475,36 @@ PUBLIC float HTStackValue ARGS4(
 
 }
 
+/*	Display the page while transfer in progress
+**	-------------------------------------------
+**
+**   Repaint the page only when necessary.
+**
+*/
+#ifdef DISP_PARTIAL
+PRIVATE void HTDisplayPartial NOARGS
+{
+    if (display_partial) {
+	/*
+	**  HText_getNumOfLines() = "current" number of lines received
+	**  NumOfLines_partial = number of lines at the moment of last repaint.
+	**
+	**  Update NumOfLines_partial only if we repaint the display,
+	**  so it corresponds to real number of displayed lines.
+	**  Repaint the page only if Newline_partial
+	**  in our hand is fact:
+	*/
+	if ((Newline_partial <= HText_getNumOfLines()) &&
+		((Newline_partial + display_lines) > NumOfLines_partial))  {
+	    NumOfLines_partial = HText_getNumOfLines();
+	    HText_pageDisplay(Newline_partial, "");
+	}
+    }
+}
+#else
+#define HTDisplayPartial() /*nothing*/
+#endif
+
 /*	Push data from a socket down a stream
 **	-------------------------------------
 **
@@ -575,17 +605,9 @@ PUBLIC int HTCopy ARGS4(
 #endif /* NOT_ASCII */
 
 	(*targetClass.put_block)(sink, input_buffer, status);
-
-#ifdef DISP_PARTIAL
-	if (display_partial &&
-		((Newline_partial + display_lines) > NumOfLines_partial))  {
-	    NumOfLines_partial = HText_getNumOfLines();
-	    HText_pageDisplay(Newline_partial, "");
-	}
-#endif /* DISP_PARTIAL */
-
 	bytes += status;
         HTReadProgress(bytes, anchor ? anchor->content_length : 0);
+	HTDisplayPartial();
 
     } /* next bufferload */
 
@@ -636,18 +658,12 @@ PUBLIC int HTFileCopy ARGS2(
 	    }
 	    break;
 	}
-	(*targetClass.put_block)(sink, input_buffer, status);
-
-#ifdef DISP_PARTIAL
-	if (display_partial &&
-		((Newline_partial + display_lines) > NumOfLines_partial))  {
-	    NumOfLines_partial = HText_getNumOfLines();
-	    HText_pageDisplay(Newline_partial, "");
-	}
-#endif /* DISP_PARTIAL */
 
+	(*targetClass.put_block)(sink, input_buffer, status);
 	bytes += status;
-	HTReadProgress(bytes, -2);
+	HTReadProgress(bytes, 0);
+	HTDisplayPartial();
+
 	if (HTCheckForInterrupt()) {
 	    _HTProgress ("Data transfer interrupted.");
 	    if (bytes) {
@@ -709,18 +725,12 @@ PRIVATE int HTGzFileCopy ARGS2(
 	    }
 	    break;
 	}
-	(*targetClass.put_block)(sink, input_buffer, status);
-
-#ifdef DISP_PARTIAL
-	if (display_partial &&
-		((Newline_partial + display_lines) > NumOfLines_partial))  {
-	    NumOfLines_partial = HText_getNumOfLines();
-	    HText_pageDisplay(Newline_partial, "");
-	}
-#endif /* DISP_PARTIAL */
 
+	(*targetClass.put_block)(sink, input_buffer, status);
 	bytes += status;
-	HTReadProgress(bytes, -2);
+	HTReadProgress(bytes, -1);
+	HTDisplayPartial();
+
 	if (HTCheckForInterrupt()) {
 	    _HTProgress ("Data transfer interrupted.");
 	    if (bytes) {
diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c
index 2a181624..0cd62330 100644
--- a/WWW/Library/Implementation/HTTCP.c
+++ b/WWW/Library/Implementation/HTTCP.c
@@ -726,6 +726,7 @@ PUBLIC int HTDoConnect ARGS4(
     /*
     **	Set up defaults.
     */
+    memset(soc_in, 0, sizeof(*soc_in));
     soc_in->sin_family = AF_INET;
     soc_in->sin_port = htons(default_port);
 
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index a8448c19..bee88b13 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -690,13 +690,6 @@ try_again:
 		goto clean_up;
 	    }
 	}
-#ifdef DISP_PARTIAL
-/*  retrieving HTTP headers: never use display_partial mode at this point!
-
-	else if (display_partial)
-	    HText_pageDisplay(Newline_partial,"");
-*/
-#endif /* DISP_PARTIAL */
 
 	bytes_already_read += status;
 	HTReadProgress (bytes_already_read, 0);
diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h
index 60dbdac0..b8ea24f0 100644
--- a/WWW/Library/Implementation/HTUtils.h
+++ b/WWW/Library/Implementation/HTUtils.h
@@ -44,6 +44,7 @@
 #define NO_UNISTD_H
 #define NO_KEYPAD
 #define NO_UTMP
+#define NO_FILIO_H
 #endif
 
 /* FIXME: these will be removed after completing auto-configure script */
diff --git a/WWW/Library/Implementation/HTVMSUtils.c b/WWW/Library/Implementation/HTVMSUtils.c
index 502f8c3a..a8ec136b 100644
--- a/WWW/Library/Implementation/HTVMSUtils.c
+++ b/WWW/Library/Implementation/HTVMSUtils.c
@@ -728,7 +728,7 @@ typedef struct _VMSEntryInfo {
     BOOLEAN      display;  /* show this entry? */
 } VMSEntryInfo;
 
-PRIVATE void free_VMSEntryInfo_struct_contents ARGS1(VMSEntryInfo *,entry_info)
+PRIVATE void free_VMSEntryInfo_contents ARGS1(VMSEntryInfo *,entry_info)
 {
     if (entry_info) {
 	FREE(entry_info->filename);
@@ -1226,7 +1226,7 @@ PUBLIC int HTVMSBrowseDir ARGS4(
 
 		PUTC('\n'); /* end of this entry */
 
-		free_VMSEntryInfo_struct_contents(entry_info);
+		free_VMSEntryInfo_contents(entry_info);
 	    }
 	}
 
diff --git a/WWW/Library/Implementation/HTWAIS.c b/WWW/Library/Implementation/HTWAIS.c
index a817f1b7..cd11af57 100644
--- a/WWW/Library/Implementation/HTWAIS.c
+++ b/WWW/Library/Implementation/HTWAIS.c
@@ -808,6 +808,7 @@ PUBLIC int HTLoadWAIS ARGS4(
 	    while((c=getc(fp))!=EOF) PUTC(c);	/* Transfer file */
 	    END(HTML_PRE);
 	    fclose(fp);
+	}
 #endif
 	START(HTML_P);
 	PUTS("\nEnter the 's'earch command and then specify search words.\n");
diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c
index 1c711740..051885e0 100644
--- a/WWW/Library/Implementation/SGML.c
+++ b/WWW/Library/Implementation/SGML.c
@@ -645,6 +645,7 @@ PRIVATE canclose_t can_close ARGS2(
 	return ((stacked_tag->tagclass & new_tag->canclose) ?
 		close_error : close_NO);
 }
+
 PRIVATE void do_close_stacked ARGS1(
     HTStream *, context)
 {
@@ -661,6 +662,7 @@ PRIVATE void do_close_stacked ARGS1(
     context->element_stack = stacked->next;
     FREE(stacked);
 }
+
 PRIVATE int is_on_stack ARGS2(
 	HTStream *,	context,
 	HTTag *,	old_tag)
@@ -758,10 +760,11 @@ PRIVATE void end_element ARGS2(
 	return;
     }
 #ifdef WIND_DOWN_STACK
-    while (context->element_stack) { /* Loop is error path only */
+    while (context->element_stack) /* Loop is error path only */
 #else
-    if (context->element_stack) { /* Substitute and remove one stack element */
+    if (context->element_stack) /* Substitute and remove one stack element */
 #endif /* WIND_DOWN_STACK */
+    {
 	HTElement * N = context->element_stack;
 	HTTag * t = N->tag;