about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTFTP.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1998-03-29 19:00:00 -0500
committerThomas E. Dickey <dickey@invisible-island.net>1998-03-29 19:00:00 -0500
commitaf9be28bc2701ea448898282942bd5b957439f18 (patch)
tree8401b3f99897cbbe4855c7c8b5485a01efa73c59 /WWW/Library/Implementation/HTFTP.c
parent43797ce7b89f70182191e7b41521772c7efa2d25 (diff)
downloadlynx-snapshots-af9be28bc2701ea448898282942bd5b957439f18.tar.gz
snapshot of project "lynx", label v2-8-1dev_5
Diffstat (limited to 'WWW/Library/Implementation/HTFTP.c')
-rw-r--r--WWW/Library/Implementation/HTFTP.c1418
1 files changed, 710 insertions, 708 deletions
diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c
index 8c014f76..48d0aa36 100644
--- a/WWW/Library/Implementation/HTFTP.c
+++ b/WWW/Library/Implementation/HTFTP.c
@@ -20,8 +20,8 @@
 ** Authors
 **	TBL	Tim Berners-lee <timbl@info.cern.ch>
 **	DD	Denis DeLaRoca 310 825-4580 <CSP1DWD@mvs.oac.ucla.edu>
-**      LM      Lou Montulli <montulli@ukanaix.cc.ukans.edu>
-**      FM      Foteos Macrides <macrides@sci.wfeb.edu>
+**	LM	Lou Montulli <montulli@ukanaix.cc.ukans.edu>
+**	FM	Foteos Macrides <macrides@sci.wfeb.edu>
 ** History:
 **	 2 May 91	Written TBL, as a part of the WorldWideWeb project.
 **	15 Jan 92	Bug fix: close() was used for NETCLOSE for control soc
@@ -29,14 +29,14 @@
 **	 8 Dec 92	Bug fix 921208 TBL after DD
 **	17 Dec 92	Anon FTP password now just WWWuser@ suggested by DD
 **			fails on princeton.edu!
-**	27 Dec 93 (FM)  Fixed up so FTP now works with VMS hosts.  Path
+**	27 Dec 93 (FM)	Fixed up so FTP now works with VMS hosts.  Path
 **			must be Unix-style and cannot include the device
 **			or top directory.
-**      ?? ??? ?? (LM)  Added code to prompt and send passwords for non
+**	?? ??? ?? (LM)	Added code to prompt and send passwords for non
 **			anonymous FTP
-**      25 Mar 94 (LM)  Added code to recognize different ftp server types
-**                      and code to parse dates and sizes on most hosts.
-**	27 Mar 93 (FM)  Added code for getting dates and sizes on VMS hosts.
+**	25 Mar 94 (LM)	Added code to recognize different ftp server types
+**			and code to parse dates and sizes on most hosts.
+**	27 Mar 93 (FM)	Added code for getting dates and sizes on VMS hosts.
 **
 ** Options:
 **	LISTEN		We listen, the other guy connects for data.
@@ -44,8 +44,8 @@
 **			internet address!
 **
 ** Notes:
-**     			Portions Copyright 1994 Trustees of Dartmouth College
-** 			Code for recognizing different FTP servers and
+**			Portions Copyright 1994 Trustees of Dartmouth College
+**			Code for recognizing different FTP servers and
 **			parsing "ls -l" output taken from Macintosh Fetch
 **			program with permission from Jim Matthews,
 **			Dartmouth Software Development Team.
@@ -61,7 +61,7 @@
 #endif /* !NOPORT */
 
 /*
-BUGS:	@@@  	Limit connection cache size!
+BUGS:	@@@	Limit connection cache size!
 		Error reporting to user.
 		400 & 500 errors are acked by user with windows.
 		Use configuration file for user names
@@ -75,12 +75,12 @@ BUGS:	@@@  	Limit connection cache size!
 #define u_long unsigned long
 #endif
 
-#include "HTUtils.h"
-#include "tcp.h"
+#include <HTUtils.h>
+#include <tcp.h>
 
-#include "HTAlert.h"
+#include <HTAlert.h>
 
-#include "HTFTP.h"	/* Implemented here */
+#include <HTFTP.h>	/* Implemented here */
 
 /* this define should be in HTFont.h :( */
 #define HT_NON_BREAK_SPACE ((char)1)   /* For now */
@@ -99,23 +99,23 @@ BUGS:	@@@  	Limit connection cache size!
 
 #define INFINITY 512
 
-#include "HTParse.h"
-#include "HTTCP.h"
-#include "HTAnchor.h"
-#include "HTFile.h"	/* For HTFileFormat() */
-#include "HTBTree.h"
-#include "HTChunk.h"
-#include "HTAlert.h"
+#include <HTParse.h>
+#include <HTTCP.h>
+#include <HTAnchor.h>
+#include <HTFile.h>	/* For HTFileFormat() */
+#include <HTBTree.h>
+#include <HTChunk.h>
+#include <HTAlert.h>
 #ifndef IPPORT_FTP
 #define IPPORT_FTP	21
 #endif /* !IPORT_FTP */
 
-#include "LYLeaks.h"
+#include <LYLeaks.h>
 
 typedef struct _connection {
     struct _connection *	next;	/* Link on list 	*/
     u_long			addr;	/* IP address		*/
-    int				socket;	/* Socket number for communication */
+    int 			socket; /* Socket number for communication */
     BOOL			binary; /* Binary mode? */
 } connection;
 
@@ -125,7 +125,7 @@ typedef struct _connection {
 
 /*		Hypertext object building machinery
 */
-#include "HTML.h"
+#include <HTML.h>
 
 #define PUTC(c) (*targetClass.put_character)(target, c)
 #define PUTS(s) (*targetClass.put_string)(target, s)
@@ -168,37 +168,37 @@ PRIVATE char *user_entered_password = NULL;
 PRIVATE char *last_username_and_host = NULL;
 
 #define GENERIC_SERVER	   0
-#define MACHTEN_SERVER 	   1
-#define UNIX_SERVER 	   2
-#define VMS_SERVER 	   3
-#define CMS_SERVER 	   4
-#define DCTS_SERVER    	   5
+#define MACHTEN_SERVER	   1
+#define UNIX_SERVER	   2
+#define VMS_SERVER	   3
+#define CMS_SERVER	   4
+#define DCTS_SERVER	   5
 #define TCPC_SERVER	   6
 #define PETER_LEWIS_SERVER 7
 #define NCSA_SERVER	   8
 #define WINDOWS_NT_SERVER  9
 #define MS_WINDOWS_SERVER 10
-#define MSDOS_SERVER      11
+#define MSDOS_SERVER	  11
 #define APPLESHARE_SERVER 12
 #define NETPRESENZ_SERVER 13
 
-PRIVATE int     server_type = GENERIC_SERVER;   /* the type of ftp host */
-PRIVATE int     unsure_type = FALSE;            /* sure about the type? */
+PRIVATE int	server_type = GENERIC_SERVER;	/* the type of ftp host */
+PRIVATE int	unsure_type = FALSE;		/* sure about the type? */
 PRIVATE BOOLEAN use_list = FALSE;		/* use the LIST command? */
 
 PRIVATE int	interrupted_in_next_data_char = FALSE;
 
 #ifdef POLL_PORTS
-PRIVATE	unsigned short	port_number = FIRST_TCP_PORT;
+PRIVATE unsigned short	port_number = FIRST_TCP_PORT;
 #endif /* POLL_PORTS */
 
 #ifdef LISTEN
-PRIVATE int     master_socket = -1;	/* Listening socket = invalid	*/
+PRIVATE int	master_socket = -1;	/* Listening socket = invalid	*/
 PRIVATE char	port_command[255];	/* Command for setting the port */
-PRIVATE fd_set	open_sockets; 		/* Mask of active channels */
-PRIVATE int	num_sockets;  		/* Number of sockets to scan */
+PRIVATE fd_set	open_sockets;		/* Mask of active channels */
+PRIVATE int	num_sockets;		/* Number of sockets to scan */
 #else
-PRIVATE	unsigned short	passive_port;	/* Port server specified for data */
+PRIVATE unsigned short	passive_port;	/* Port server specified for data */
 #endif /* LISTEN */
 
 
@@ -236,7 +236,7 @@ PRIVATE void free_FTPGlobals NOARGS
 ** ON EXIT:
 **	returns 	vms file specification
 **
-** Bug:	Returns pointer to static -- non-reentrant
+** Bug: Returns pointer to static -- non-reentrant
 */
 PUBLIC char * HTMake_VMS_name ARGS2(
 	CONST char *,	nn,
@@ -254,25 +254,25 @@ PUBLIC char * HTMake_VMS_name ARGS2(
     char * filename = (char*)malloc(strlen(fn)+1);
     char * nodename = (char*)malloc(strlen(nn)+2+1);	/* Copies to hack */
     char *second;		/* 2nd slash */
-    char *last;			/* last slash */
+    char *last; 		/* last slash */
 
     CONST char * hostname = HTHostName();
 
     if (!filename || !nodename)
-        outofmem(__FILE__, "HTVMSname");
+	outofmem(__FILE__, "HTVMSname");
     strcpy(filename, fn);
     strcpy(nodename, "");	/* On same node? Yes if node names match */
     if (strncmp(nn, "localhost", 9)) {
-        CONST char *p;
+	CONST char *p;
 	char *q;
-        for (p = hostname, q = (char *)nn;
+	for (p = hostname, q = (char *)nn;
 	     *p && *p != '.' && *q && *q != '.'; p++, q++){
 	    if (TOUPPER(*p) != TOUPPER(*q)) {
-	        strcpy(nodename, nn);
+		strcpy(nodename, nn);
 		q = strchr(nodename, '.');	/* Mismatch */
 		if (q)
 		    *q = '\0';			/* Chop domain */
-		strcat(nodename, "::");		/* Try decnet anyway */
+		strcat(nodename, "::"); 	/* Try decnet anyway */
 		break;
 	    }
 	}
@@ -284,19 +284,19 @@ PUBLIC char * HTMake_VMS_name ARGS2(
     if (!second) {				/* Only one slash */
 	sprintf(vmsname, "%s%s", nodename, filename + 1);
     } else if (second == last) {		/* Exactly two slashes */
-	*second = '\0';		/* Split filename from disk */
+	*second = '\0'; 	/* Split filename from disk */
 	sprintf(vmsname, "%s%s:%s", nodename, filename+1, second+1);
 	*second = '/';	/* restore */
-    } else { 				/* More than two slashes */
+    } else {				/* More than two slashes */
 	char * p;
-	*second = '\0';		/* Split disk from directories */
+	*second = '\0'; 	/* Split disk from directories */
 	*last = '\0';		/* Split dir from filename */
 	sprintf(vmsname, "%s%s:[%s]%s",
 		nodename, filename+1, second+1, last+1);
 	*second = *last = '/';	/* restore filename */
 	for (p = strchr(vmsname, '['); *p!=']'; p++)
 	    if (*p == '/')
-	        *p = '.';		/* Convert dir sep.  to dots */
+		*p = '.';		/* Convert dir sep.  to dots */
     }
     FREE(nodename);
     FREE(filename);
@@ -312,15 +312,15 @@ PRIVATE char next_data_char NOARGS
     if (data_read_pointer >= data_write_pointer) {
 	status = NETREAD(data_soc, data_buffer, DATA_BUFFER_SIZE);
       if (status == HT_INTERRUPTED)
-        interrupted_in_next_data_char = 1;
+	interrupted_in_next_data_char = 1;
       if (status <= 0)
-        return (char)-1;
+	return (char)-1;
       data_write_pointer = data_buffer + status;
       data_read_pointer = data_buffer;
     }
 #ifdef NOT_ASCII
     {
-        char c = *data_read_pointer++;
+	char c = *data_read_pointer++;
 	return FROMASCII(c);
     }
 #else
@@ -338,7 +338,7 @@ PRIVATE int close_connection ARGS1(
     connection * scan;
     int status = NETCLOSE(con->socket);
     if (TRACE) {
-        fprintf(stderr, "HTFTP: Closing control socket %d\n", con->socket);
+	fprintf(stderr, "HTFTP: Closing control socket %d\n", con->socket);
 #ifdef UNIX
 	if (status != 0)
 	    perror("HTFTP:close_connection");
@@ -346,14 +346,14 @@ PRIVATE int close_connection ARGS1(
     }
     con->socket = -1;
     if (connections == con) {
-        connections = con->next;
+	connections = con->next;
 	return status;
     }
     for (scan = connections; scan; scan = scan->next) {
-        if (scan->next == con) {
+	if (scan->next == con) {
 	    scan->next = con->next;	/* Unlink */
 	    if (control == con)
-	        control = (connection*)0;
+		control = (connection*)0;
 	    return status;
 	} /*if */
     } /* for */
@@ -368,12 +368,12 @@ PRIVATE void init_help_message_cache NOARGS
 }
 
 PRIVATE void help_message_cache_add ARGS1(
-	char *,		string)
+	char *, 	string)
 {
     if (help_message_buffer)
-        StrAllocCat(help_message_buffer, string);
+	StrAllocCat(help_message_buffer, string);
     else
-        StrAllocCopy(help_message_buffer, string);
+	StrAllocCopy(help_message_buffer, string);
 
     if (TRACE)
 	fprintf(stderr,"Adding message to help cache: %s\n",string);
@@ -410,14 +410,14 @@ PRIVATE char *help_message_cache_contents NOARGS
 **		  or negative for communication failure.
 */
 PRIVATE int response ARGS1(
-	char *,		cmd)
+	char *, 	cmd)
 {
-    int result;				/* Three-digit decimal code */
-    int	continuation_response = -1;
+    int result; 			/* Three-digit decimal code */
+    int continuation_response = -1;
     int status;
 
     if (!control) {
-          if (TRACE)
+	  if (TRACE)
 	      fprintf(stderr, "HTFTP: No control connection set up!!\n");
 	  return -99;
     }
@@ -429,15 +429,15 @@ PRIVATE int response ARGS1(
 	{
 	    char * p;
 	    for (p = cmd; *p; p++) {
-	        *p = TOASCII(*p);
+		*p = TOASCII(*p);
 	    }
 	}
 #endif /* NOT_ASCII */
 	status = NETWRITE(control->socket, cmd, (int)strlen(cmd));
 	if (status < 0) {
 	    if (TRACE)
-	        fprintf(stderr,
-	    		"HTFTP: Error %d sending command: closing socket %d\n",
+		fprintf(stderr,
+			"HTFTP: Error %d sending command: closing socket %d\n",
 			status, control->socket);
 	    close_connection(control);
 	    return status;
@@ -452,21 +452,21 @@ PRIVATE int response ARGS1(
 
 		char continuation;
 
-	        if (interrupted_in_htgetcharacter)
-                  {
-                    if (TRACE)
-                      fprintf (stderr,
-		        "HTFTP: Interrupted in HTGetCharacter, apparently.\n");
-                    NETCLOSE (control->socket);
-                    control->socket = -1;
-                    return HT_INTERRUPTED;
-                  }
+		if (interrupted_in_htgetcharacter)
+		  {
+		    if (TRACE)
+		      fprintf (stderr,
+			"HTFTP: Interrupted in HTGetCharacter, apparently.\n");
+		    NETCLOSE (control->socket);
+		    control->socket = -1;
+		    return HT_INTERRUPTED;
+		  }
 
 		*p = '\0';			/* Terminate the string */
 		if (TRACE)
 		    fprintf(stderr, "    Rx: %s", response_text);
 
-                /* Check for login or help messages */
+		/* Check for login or help messages */
 		if (!strncmp(response_text,"230-",4) ||
 		    !strncmp(response_text,"250-",4) ||
 		    !strncmp(response_text,"220-",4))
@@ -476,31 +476,31 @@ PRIVATE int response ARGS1(
 		if  (continuation_response == -1) {
 			if (continuation == '-')  /* start continuation */
 			    continuation_response = result;
-		} else { 	/* continuing */
+		} else {	/* continuing */
 			if (continuation_response == result &&
 			    continuation == ' ')
-			    continuation_response = -1;	/* ended */
+			    continuation_response = -1; /* ended */
 		}
 		break;
 	    } /* if end of line */
 
 	    if (interrupted_in_htgetcharacter)
-               {
-                    if (TRACE)
-                      fprintf (stderr,
-		        "HTFTP: Interrupted in HTGetCharacter, apparently.\n");
-                    NETCLOSE (control->socket);
-                    control->socket = -1;
-                    return HT_INTERRUPTED;
-               }
+	       {
+		    if (TRACE)
+		      fprintf (stderr,
+			"HTFTP: Interrupted in HTGetCharacter, apparently.\n");
+		    NETCLOSE (control->socket);
+		    control->socket = -1;
+		    return HT_INTERRUPTED;
+	       }
 
 	    if (*(p-1) == (char) EOF) {
 		if (TRACE)
 		    fprintf(stderr, "Error on rx: closing socket %d\n",
-		    	    control->socket);
+			    control->socket);
 		strcpy(response_text, "000 *** TCP read error on response\n");
-	        close_connection(control);
-	    	return -1;	/* End of file on response */
+		close_connection(control);
+		return -1;	/* End of file on response */
 	    }
 	} /* Loop over characters */
 
@@ -509,14 +509,14 @@ PRIVATE int response ARGS1(
     if (result == 421) {
 	if (TRACE)
 	    fprintf(stderr, "HTFTP: They close so we close socket %d\n",
-	    	    control->socket);
+		    control->socket);
 	close_connection(control);
 	return -1;
     }
     if ((result == 255 && server_type == CMS_SERVER) &&
-        (0 == strncasecomp(cmd, "CWD", 3) ||
+	(0 == strncasecomp(cmd, "CWD", 3) ||
 	 0 == strcasecomp(cmd, "CDUP"))) {
-        /*
+	/*
 	**  Alas, CMS returns 255 on failure to CWD to parent of root. - PG
 	*/
 	result = 555;
@@ -529,7 +529,7 @@ PRIVATE int response ARGS1(
  *  Some servers need an additional letter after the MACB command.
  */
 PRIVATE int set_mac_binary ARGS1(
-        int,		ServerType)
+	int,		ServerType)
 {
     /* try to set mac binary mode */
     if (ServerType == APPLESHARE_SERVER ||
@@ -556,50 +556,50 @@ PRIVATE void get_ftp_pwd ARGS2(
     /* get the working directory (to see what it looks like) */
     int status = response("PWD\r\n");
     if (status < 0) {
-        return;
+	return;
     } else {
 	cp = strchr(response_text+5,'"');
 	if (cp)
 	    *cp = '\0';
-        if (*ServerType == TCPC_SERVER) {
-            *ServerType = ((response_text[5] == '/') ?
-	    				  NCSA_SERVER : TCPC_SERVER);
+	if (*ServerType == TCPC_SERVER) {
+	    *ServerType = ((response_text[5] == '/') ?
+					  NCSA_SERVER : TCPC_SERVER);
 	     if (TRACE)
-	         fprintf(stderr, "HTFTP: Treating as %s server.\n",
-		 	 ((*ServerType == NCSA_SERVER) ?
-			 			 "NCSA" : "TCPC"));
-        } else if (response_text[5] == '/') {
-            /* path names beginning with / imply Unix,
+		 fprintf(stderr, "HTFTP: Treating as %s server.\n",
+			 ((*ServerType == NCSA_SERVER) ?
+						 "NCSA" : "TCPC"));
+	} else if (response_text[5] == '/') {
+	    /* path names beginning with / imply Unix,
 	     * right?
 	     */
 	    if (set_mac_binary(*ServerType)) {
 		*ServerType = NCSA_SERVER;
 		if (TRACE)
-	            fprintf(stderr, "HTFTP: Treating as NCSA server.\n");
+		    fprintf(stderr, "HTFTP: Treating as NCSA server.\n");
 	    } else {
-                 *ServerType = UNIX_SERVER;
-                 *UseList = TRUE;
+		 *ServerType = UNIX_SERVER;
+		 *UseList = TRUE;
 		 if (TRACE)
-	             fprintf(stderr, "HTFTP: Treating as Unix server.\n");
+		     fprintf(stderr, "HTFTP: Treating as Unix server.\n");
 	    }
 	    return;
-        } else if (response_text[strlen(response_text)-1] == ']') {
-            /* path names ending with ] imply VMS, right? */
-            *ServerType = VMS_SERVER;
+	} else if (response_text[strlen(response_text)-1] == ']') {
+	    /* path names ending with ] imply VMS, right? */
+	    *ServerType = VMS_SERVER;
 	    *UseList = TRUE;
 	    if (TRACE)
-	        fprintf(stderr, "HTFTP: Treating as VMS server.\n");
-        } else {
-            *ServerType = GENERIC_SERVER;
+		fprintf(stderr, "HTFTP: Treating as VMS server.\n");
+	} else {
+	    *ServerType = GENERIC_SERVER;
 	    if (TRACE)
-	        fprintf(stderr, "HTFTP: Treating as Generic server.\n");
+		fprintf(stderr, "HTFTP: Treating as Generic server.\n");
 	}
 
-        if ((*ServerType == NCSA_SERVER) ||
-            (*ServerType == TCPC_SERVER) ||
-            (*ServerType == PETER_LEWIS_SERVER) ||
-            (*ServerType == NETPRESENZ_SERVER))
-            set_mac_binary(*ServerType);
+	if ((*ServerType == NCSA_SERVER) ||
+	    (*ServerType == TCPC_SERVER) ||
+	    (*ServerType == PETER_LEWIS_SERVER) ||
+	    (*ServerType == NETPRESENZ_SERVER))
+	    set_mac_binary(*ServerType);
     }
 }
 
@@ -609,7 +609,7 @@ PRIVATE void get_ftp_pwd ARGS2(
 ** On entry,
 **	arg	points to the name of the host in a hypertext address
 ** On exit,
-**	returns	<0 if error
+**	returns <0 if error
 **		socket number if success
 **
 **	This routine takes care of managing timed-out connections, and
@@ -669,7 +669,7 @@ PRIVATE int get_connection ARGS2(
 
 	if (p2 != NULL) {
 	    username = p1;
-	    *p2 = '\0';			/* terminate */
+	    *p2 = '\0'; 		/* terminate */
 	    p1 = p2+1;			/* point to host */
 	    pw = strchr(username, ':');
 	    if (pw != NULL) {
@@ -680,10 +680,10 @@ PRIVATE int get_connection ARGS2(
 		HTUnEscape(username);
 
 	    /*
-	     *  If the password doesn't exist then we are going to have
-	     *  to ask the user for it.  The only problem is that we
-	     *  don't want to ask for it every time, so we will store
-	     *  away in a primitive fashion.
+	     *	If the password doesn't exist then we are going to have
+	     *	to ask the user for it.  The only problem is that we
+	     *	don't want to ask for it every time, so we will store
+	     *	away in a primitive fashion.
 	     */
 	    if (!password) {
 		char tmp[256];
@@ -700,7 +700,7 @@ PRIVATE int get_connection ARGS2(
 
 		    StrAllocCopy(last_username_and_host, tmp);
 		    sprintf(tmp, "Enter password for user %s@%s:",
-		    		  username, p1);
+				  username, p1);
 		    FREE(user_entered_password);
 		    user_entered_password = (char *)HTPromptPassword(tmp);
 
@@ -718,42 +718,42 @@ PRIVATE int get_connection ARGS2(
   if (status < 0)
     {
       if (TRACE)
-        {
-          if (status == HT_INTERRUPTED)
-            fprintf (stderr,
-                     "HTFTP: Interrupted on connect\n");
-          else
-            fprintf(stderr,
-                    "HTFTP: Unable to connect to remote host for `%s'.\n",
-                    arg);
-        }
+	{
+	  if (status == HT_INTERRUPTED)
+	    fprintf (stderr,
+		     "HTFTP: Interrupted on connect\n");
+	  else
+	    fprintf(stderr,
+		    "HTFTP: Unable to connect to remote host for `%s'.\n",
+		    arg);
+	}
       if (status == HT_INTERRUPTED) {
-        _HTProgress ("Connection interrupted.");
+	_HTProgress ("Connection interrupted.");
 	status = HT_NOT_LOADED;
       } else {
-        HTAlert("Unable to connect to FTP host.");
+	HTAlert("Unable to connect to FTP host.");
       }
       if (con->socket != -1)
-        {
-          NETCLOSE(con->socket);
-        }
+	{
+	  NETCLOSE(con->socket);
+	}
 
       FREE(username);
       if (control == con)
 	  control = NULL;
       FREE(con);
-      return status;                    /* Bad return */
+      return status;			/* Bad return */
     }
 
     if (TRACE) {
- 	fprintf(stderr, "FTP connected, socket %d  control %ld\n",
+	fprintf(stderr, "FTP connected, socket %d  control %ld\n",
 			con->socket, (long)con);
     }
     control = con;		/* Current control connection */
 
     /* Initialise buffering for control connection */
     HTInitInput(control->socket);
-    init_help_message_cache();  /* Clear the login message buffer. */
+    init_help_message_cache();	/* Clear the login message buffer. */
 
 
 /*	Now we log in		Look up username, prompt for pw.
@@ -762,13 +762,13 @@ PRIVATE int get_connection ARGS2(
 
     if (status == HT_INTERRUPTED)
       {
-        if (TRACE)
-          fprintf (stderr,
-                   "HTFTP: Interrupted at beginning of login.\n");
-        _HTProgress ("Connection interrupted.");
-        NETCLOSE(control->socket);
-        control->socket = -1;
-        return HT_INTERRUPTED;
+	if (TRACE)
+	  fprintf (stderr,
+		   "HTFTP: Interrupted at beginning of login.\n");
+	_HTProgress ("Connection interrupted.");
+	NETCLOSE(control->socket);
+	control->socket = -1;
+	return HT_INTERRUPTED;
       }
     server_type = GENERIC_SERVER;	/* reset */
     if (status == 2) {		/* Send username */
@@ -790,26 +790,26 @@ PRIVATE int get_connection ARGS2(
 	if (username && *username) {
 	    command = (char*)malloc(10+strlen(username)+2+1);
 	    if (command == NULL)
-	        outofmem(__FILE__, "get_connection");
+		outofmem(__FILE__, "get_connection");
 	    sprintf(command, "USER %s%c%c", username, CR, LF);
 	} else {
 	    command = (char*)malloc(24);
 	    if (command == NULL)
-	        outofmem(__FILE__, "get_connection");
+		outofmem(__FILE__, "get_connection");
 	    sprintf(command, "USER anonymous%c%c", CR, LF);
-        }
+	}
 	status = response(command);
 	FREE(command);
-        if (status == HT_INTERRUPTED)
-          {
-            if (TRACE)
-              fprintf (stderr,
-                       "HTFTP: Interrupted while sending username.\n");
-            _HTProgress ("Connection interrupted.");
-            NETCLOSE(control->socket);
-            control->socket = -1;
-            return HT_INTERRUPTED;
-          }
+	if (status == HT_INTERRUPTED)
+	  {
+	    if (TRACE)
+	      fprintf (stderr,
+		       "HTFTP: Interrupted while sending username.\n");
+	    _HTProgress ("Connection interrupted.");
+	    NETCLOSE(control->socket);
+	    control->socket = -1;
+	    return HT_INTERRUPTED;
+	  }
     }
     if (status == 3) {		/* Send password */
 	if (password) {
@@ -818,7 +818,7 @@ PRIVATE int get_connection ARGS2(
 	     */
 	    command = (char*)malloc(10+strlen(password)+2+1);
 	    if (command == NULL)
-	        outofmem(__FILE__, "get_connection");
+		outofmem(__FILE__, "get_connection");
 	    sprintf(command, "PASS %s%c%c", password, CR, LF);
 	} else {
 	    /*
@@ -829,11 +829,11 @@ PRIVATE int get_connection ARGS2(
 	    char * cp;
 
 	    if (personal_mail_address && *personal_mail_address) {
-	        /*
+		/*
 		 * We have a non-zero length personal
 		 * mail address, so use that. - FM
 		 */
-	        StrAllocCopy(user, personal_mail_address);
+		StrAllocCopy(user, personal_mail_address);
 		if ((cp=strchr(user, '@')) != NULL) {
 		    *cp++ = '\0';
 		    host = cp;
@@ -841,7 +841,7 @@ PRIVATE int get_connection ARGS2(
 		    host = HTHostName();
 		}
 	    } else {
-	        /*
+		/*
 		 * Use an environment variable and the host global. - FM
 		 */
 		if ((cp=getenv("USER")) != NULL)
@@ -856,151 +856,151 @@ PRIVATE int get_connection ARGS2(
 	     * as ftp.uu.net prefers a blank to a bad name
 	     */
 	    if (!(host) || strchr(host, '.') == NULL)
-	    	host = "";
+		host = "";
 
 	    command = (char*)malloc(10+strlen(user)+1+strlen(host)+2+1);
 	    if (command == NULL)
-	        outofmem(__FILE__, "get_connection");
+		outofmem(__FILE__, "get_connection");
 	    sprintf(command, "PASS %s@%s%c%c", user, host, CR, LF);
 	    FREE(user);
-        }
+	}
 	status = response(command);
 	FREE(command);
-        if (status == HT_INTERRUPTED)
-          {
-            if (TRACE)
-              fprintf (stderr,
-                       "HTFTP: Interrupted while sending password.\n");
-            _HTProgress ("Connection interrupted.");
-            NETCLOSE(control->socket);
-            control->socket = -1;
-            return HT_INTERRUPTED;
-          }
+	if (status == HT_INTERRUPTED)
+	  {
+	    if (TRACE)
+	      fprintf (stderr,
+		       "HTFTP: Interrupted while sending password.\n");
+	    _HTProgress ("Connection interrupted.");
+	    NETCLOSE(control->socket);
+	    control->socket = -1;
+	    return HT_INTERRUPTED;
+	  }
     }
     FREE(username);
 
     if (status == 3) {
-        char temp[80];
+	char temp[80];
 	sprintf(temp, "ACCT noaccount%c%c", CR, LF);
 	status = response(temp);
 	if (status == HT_INTERRUPTED)
-          {
-            if (TRACE)
-              fprintf (stderr,
-                       "HTFTP: Interrupted while sending password.\n");
-            _HTProgress ("Connection interrupted.");
-            NETCLOSE(control->socket);
-            control->socket = -1;
-            return HT_INTERRUPTED;
-          }
+	  {
+	    if (TRACE)
+	      fprintf (stderr,
+		       "HTFTP: Interrupted while sending password.\n");
+	    _HTProgress ("Connection interrupted.");
+	    NETCLOSE(control->socket);
+	    control->socket = -1;
+	    return HT_INTERRUPTED;
+	  }
 
     }
     if (status != 2) {
-        if (TRACE)
+	if (TRACE)
 	    fprintf(stderr, "HTFTP: Login fail: %s", response_text);
-    	/* if (control->socket > 0) close_connection(control->socket); */
-        return -1;		/* Bad return */
+	/* if (control->socket > 0) close_connection(control->socket); */
+	return -1;		/* Bad return */
     }
     if (TRACE) fprintf(stderr, "HTFTP: Logged in.\n");
 
     /** Check for host type **/
     if (server_type != NETPRESENZ_SERVER)
 	server_type = GENERIC_SERVER;	/* reset */
-    use_list = FALSE; 			/* reset */
+    use_list = FALSE;			/* reset */
     if ((status=response("SYST\r\n")) == 2) {
-        /* we got a line -- what kind of server are we talking to? */
-        if (strncmp(response_text+4,
-	 	    "UNIX Type: L8 MAC-OS MachTen", 28) == 0) {
-            server_type = MACHTEN_SERVER;
+	/* we got a line -- what kind of server are we talking to? */
+	if (strncmp(response_text+4,
+		    "UNIX Type: L8 MAC-OS MachTen", 28) == 0) {
+	    server_type = MACHTEN_SERVER;
 	    use_list = TRUE;
 	    if (TRACE)
-	        fprintf(stderr, "HTFTP: Treating as MachTen server.\n");
+		fprintf(stderr, "HTFTP: Treating as MachTen server.\n");
 
-        } else if (strstr(response_text+4, "UNIX") != NULL ||
+	} else if (strstr(response_text+4, "UNIX") != NULL ||
 		   strstr(response_text+4, "Unix") != NULL) {
-            server_type = UNIX_SERVER;
+	    server_type = UNIX_SERVER;
 	    use_list = TRUE;
 	    if (TRACE)
-	        fprintf(stderr, "HTFTP: Treating as Unix server.\n");
+		fprintf(stderr, "HTFTP: Treating as Unix server.\n");
 
-        } else if (strstr(response_text+4, "MSDOS") != NULL) {
-            server_type = MSDOS_SERVER;
+	} else if (strstr(response_text+4, "MSDOS") != NULL) {
+	    server_type = MSDOS_SERVER;
 	    use_list = TRUE;
 	    if (TRACE)
-	        fprintf(stderr,
-	 	 	"HTFTP: Treating as MSDOS (Unix emulation) server.\n");
+		fprintf(stderr,
+			"HTFTP: Treating as MSDOS (Unix emulation) server.\n");
 
-        } else if (strncmp(response_text+4, "VMS", 3) == 0) {
-            server_type = VMS_SERVER;
+	} else if (strncmp(response_text+4, "VMS", 3) == 0) {
+	    server_type = VMS_SERVER;
 	    use_list = TRUE;
 	    if (TRACE)
-	        fprintf(stderr, "HTFTP: Treating as VMS server.\n");
+		fprintf(stderr, "HTFTP: Treating as VMS server.\n");
 
 	} else if ((strncmp(response_text+4, "VM/CMS", 6) == 0) ||
-	 	   (strncmp(response_text+4, "VM ", 3) == 0)) {
-            server_type = CMS_SERVER;
+		   (strncmp(response_text+4, "VM ", 3) == 0)) {
+	    server_type = CMS_SERVER;
 	    use_list = TRUE;
 	    if (TRACE)
-	        fprintf(stderr, "HTFTP: Treating as CMS server.\n");
+		fprintf(stderr, "HTFTP: Treating as CMS server.\n");
 
 	} else if (strncmp(response_text+4, "DCTS", 4) == 0) {
-            server_type = DCTS_SERVER;
+	    server_type = DCTS_SERVER;
 	    if (TRACE)
-	        fprintf(stderr, "HTFTP: Treating as DCTS server.\n");
+		fprintf(stderr, "HTFTP: Treating as DCTS server.\n");
 
 	} else if (strstr(response_text+4, "MAC-OS TCP/Connect II") != NULL) {
-            server_type = TCPC_SERVER;
+	    server_type = TCPC_SERVER;
 	    if (TRACE)
-	        fprintf(stderr, "HTFTP: Looks like a TCPC server.\n");
-            get_ftp_pwd(&server_type, &use_list);
+		fprintf(stderr, "HTFTP: Looks like a TCPC server.\n");
+	    get_ftp_pwd(&server_type, &use_list);
 	    unsure_type = TRUE;
 
-        } else if (server_type == NETPRESENZ_SERVER) { /* already set above */
-            use_list = TRUE;
-            set_mac_binary(server_type);
+	} else if (server_type == NETPRESENZ_SERVER) { /* already set above */
+	    use_list = TRUE;
+	    set_mac_binary(server_type);
 	    if (TRACE)
-	        fprintf(stderr,
-	 	 	"HTFTP: Treating as NetPresenz (MACOS) server.\n");
+		fprintf(stderr,
+			"HTFTP: Treating as NetPresenz (MACOS) server.\n");
 
-        } else if (strncmp(response_text+4, "MACOS Peter's Server", 20) == 0) {
-            server_type = PETER_LEWIS_SERVER;
-            use_list = TRUE;
-            set_mac_binary(server_type);
+	} else if (strncmp(response_text+4, "MACOS Peter's Server", 20) == 0) {
+	    server_type = PETER_LEWIS_SERVER;
+	    use_list = TRUE;
+	    set_mac_binary(server_type);
 	    if (TRACE)
-	        fprintf(stderr,
-	 	 	"HTFTP: Treating as Peter Lewis (MACOS) server.\n");
+		fprintf(stderr,
+			"HTFTP: Treating as Peter Lewis (MACOS) server.\n");
 
-        } else if (strncmp(response_text+4, "Windows_NT", 10) == 0) {
+	} else if (strncmp(response_text+4, "Windows_NT", 10) == 0) {
 	    server_type = WINDOWS_NT_SERVER;
 	    use_list = TRUE;
 	    if (TRACE)
-	        fprintf(stderr, "HTFTP: Treating as Window_NT server.\n");
+		fprintf(stderr, "HTFTP: Treating as Window_NT server.\n");
 
 	} else if (strncmp(response_text+4, "MS Windows", 10) == 0) {
 	    server_type = MS_WINDOWS_SERVER;
 	    use_list = TRUE;
 	    if (TRACE)
-	        fprintf(stderr, "HTFTP: Treating as MS Windows server.\n");
+		fprintf(stderr, "HTFTP: Treating as MS Windows server.\n");
 
-        } else if (strncmp(response_text+4,
+	} else if (strncmp(response_text+4,
 			   "MACOS AppleShare IP FTP Server", 30) == 0) {
-            server_type = APPLESHARE_SERVER;
-            use_list = TRUE;
-            set_mac_binary(server_type);
+	    server_type = APPLESHARE_SERVER;
+	    use_list = TRUE;
+	    set_mac_binary(server_type);
 	    if (TRACE)
-	        fprintf(stderr,
-	 	 	"HTFTP: Treating as AppleShare server.\n");
+		fprintf(stderr,
+			"HTFTP: Treating as AppleShare server.\n");
 
-	} else  {
+	} else	{
 	    server_type = GENERIC_SERVER;
 	    if (TRACE)
-	        fprintf(stderr, "HTFTP: Ugh!  A Generic server.\n");
-            get_ftp_pwd(&server_type, &use_list);
+		fprintf(stderr, "HTFTP: Ugh!  A Generic server.\n");
+	    get_ftp_pwd(&server_type, &use_list);
 	    unsure_type = TRUE;
 	 }
     } else {
 	/* SYST fails :(  try to get the type from the PWD command */
-         get_ftp_pwd(&server_type, &use_list);
+	 get_ftp_pwd(&server_type, &use_list);
     }
 
 /*  Now we inform the server of the port number we will listen on
@@ -1010,14 +1010,14 @@ PRIVATE int get_connection ARGS2(
 	int status = response(port_command);
 	if (status != 2) {
 	    if (control->socket)
-	        close_connection(control->socket);
+		close_connection(control->socket);
 	    return -status;		/* Bad return */
 	}
 	if (TRACE)
 	    fprintf(stderr, "HTFTP: Port defined.\n");
     }
 #endif /* NOTREPEAT_PORT */
-    return con->socket;			/* Good return */
+    return con->socket; 		/* Good return */
 }
 
 
@@ -1034,12 +1034,12 @@ PRIVATE int close_master_socket NOARGS
     FD_CLR(master_socket, &open_sockets);
     status = NETCLOSE(master_socket);
     if (TRACE)
-        fprintf(stderr, "HTFTP: Closed master socket %d\n", master_socket);
+	fprintf(stderr, "HTFTP: Closed master socket %d\n", master_socket);
     master_socket = -1;
     if (status < 0)
-        return HTInetStatus("close master socket");
+	return HTInetStatus("close master socket");
     else
-        return status;
+	return status;
 }
 
 
@@ -1052,7 +1052,7 @@ PRIVATE int close_master_socket NOARGS
 ** On entry,
 **	master_socket	Must be negative if not set up already.
 ** On exit,
-**	Returns		socket number if good
+**	Returns 	socket number if good
 **			less than zero if error.
 **	master_socket	is socket number if good, else negative.
 **	port_number	is valid if good.
@@ -1069,7 +1069,7 @@ PRIVATE int get_listen_socket NOARGS
 
 #ifndef REPEAT_LISTEN
     if (master_socket >= 0)
-        return master_socket;  /* Done already */
+	return master_socket;  /* Done already */
 #endif /* !REPEAT_LISTEN */
 
 /*  Create internet socket
@@ -1080,7 +1080,7 @@ PRIVATE int get_listen_socket NOARGS
 	return HTInetStatus("socket for master socket");
 
     if (TRACE)
-        fprintf(stderr, "HTFTP: Opened master socket number %d\n", new_socket);
+	fprintf(stderr, "HTFTP: Opened master socket number %d\n", new_socket);
 
 /*  Search for a free port.
 */
@@ -1088,7 +1088,7 @@ PRIVATE int get_listen_socket NOARGS
     soc_in->sin_addr.s_addr = INADDR_ANY;   /* Any peer address */
 #ifdef POLL_PORTS
     {
-        unsigned short old_port_number = port_number;
+	unsigned short old_port_number = port_number;
 	for (port_number = (old_port_number+1); ; port_number++) {
 	    int status;
 	    if (port_number > LAST_TCP_PORT)
@@ -1099,7 +1099,7 @@ PRIVATE int get_listen_socket NOARGS
 	    soc_address.sin_port = htons(port_number);
 #ifdef SOCKS
 	    if (socks_flag)
-	        if ((status=Rbind(new_socket,
+		if ((status=Rbind(new_socket,
 			(struct sockaddr*)&soc_address,
 			    /* Cast to generic sockaddr */
 			sizeof(soc_address)
@@ -1116,20 +1116,20 @@ PRIVATE int get_listen_socket NOARGS
 		    sizeof(soc_address))) == 0)
 		break;
 	    if (TRACE)
-	        fprintf(stderr,
-	    		"TCP bind attempt to port %d yields %d, errno=%d\n",
+		fprintf(stderr,
+			"TCP bind attempt to port %d yields %d, errno=%d\n",
 		port_number, status, SOCKET_ERRNO);
 	} /* for */
     }
 #else
     {
-        int status;
+	int status;
 	int address_length = sizeof(soc_address);
 #ifdef SOCKS
 	if (socks_flag)
 	    status = Rgetsockname(control->socket,
 				  (struct sockaddr *)&soc_address,
-			 	  (void *)&address_length);
+				  (void *)&address_length);
 	else
 #endif /* SOCKS */
 	status = getsockname(control->socket,
@@ -1174,12 +1174,12 @@ PRIVATE int get_listen_socket NOARGS
 #endif /* POLL_PORTS */
 
     CTRACE(tfp, "HTFTP: bound to port %d on %s\n",
-    		(int)ntohs(soc_in->sin_port),
+		(int)ntohs(soc_in->sin_port),
 		HTInetString(soc_in));
 
 #ifdef REPEAT_LISTEN
     if (master_socket >= 0)
-        (void) close_master_socket();
+	(void) close_master_socket();
 #endif /* REPEAD_LISTEN */
 
     master_socket = new_socket;
@@ -1203,7 +1203,7 @@ PRIVATE int get_listen_socket NOARGS
     int status;
 #ifdef SOCKS
     if (socks_flag)
-        status = Rlisten(master_socket, 1);
+	status = Rlisten(master_socket, 1);
     else
 #endif /* SOCKS */
     status = listen(master_socket, 1);
@@ -1215,7 +1215,7 @@ PRIVATE int get_listen_socket NOARGS
     CTRACE(tfp, "TCP: Master socket(), bind() and listen() all OK\n");
     FD_SET(master_socket, &open_sockets);
     if ((master_socket+1) > num_sockets)
-        num_sockets = master_socket+1;
+	num_sockets = master_socket+1;
 
     return master_socket;		/* Good */
 
@@ -1246,13 +1246,13 @@ PRIVATE void set_years_and_date NOARGS
     strncpy(day, (char *)ctime(&NowTime)+8, 2);
     day[2] = '\0';
     if (day[0] == ' ') {
-        day[0] = '0';
+	day[0] = '0';
     }
     strncpy(month, (char *)ctime(&NowTime)+4, 3);
     strncpy(month, (char *)ctime(&NowTime)+4, 3);
     month[3] = '\0';
     for (i = 0; i < 12; i++) {
-        if (!strcasecomp(month, months[i])) {
+	if (!strcasecomp(month, months[i])) {
 	    break;
 	}
     }
@@ -1267,38 +1267,38 @@ PRIVATE void set_years_and_date NOARGS
 }
 
 typedef struct _EntryInfo {
-    char *       filename;
-    char *       type;
-    char *       date;
+    char *	 filename;
+    char *	 type;
+    char *	 date;
     unsigned int size;
-    BOOLEAN      display;  /* show this entry? */
+    BOOLEAN	 display;  /* show this entry? */
 } EntryInfo;
 
 PRIVATE void free_entryinfo_struct_contents ARGS1(
 	EntryInfo *,	entry_info)
 {
     if (entry_info) {
-        FREE(entry_info->filename);
-        FREE(entry_info->type);
-        FREE(entry_info->date);
+	FREE(entry_info->filename);
+	FREE(entry_info->type);
+	FREE(entry_info->date);
     }
    /* dont free the struct */
 }
 
 /*
  * is_ls_date() --
- *      Return TRUE if s points to a string of the form:
- *              "Sep  1  1990 " or
- *              "Sep 11 11:59 " or
- *              "Dec 12 1989  " or
- *              "FCv 23 1990  " ...
+ *	Return TRUE if s points to a string of the form:
+ *		"Sep  1  1990 " or
+ *		"Sep 11 11:59 " or
+ *		"Dec 12 1989  " or
+ *		"FCv 23 1990  " ...
  */
 PRIVATE BOOLEAN is_ls_date ARGS1(
-	char *,		s)
+	char *, 	s)
 {
     /* must start with three alpha characters */
     if (!isalpha(*s++) || !isalpha(*s++) || !isalpha(*s++))
-        return FALSE;
+	return FALSE;
 
     /* space or HT_NON_BREAK_SPACE */
     if (!(*s == ' ' || *s == HT_NON_BREAK_SPACE)) {
@@ -1316,11 +1316,11 @@ PRIVATE BOOLEAN is_ls_date ARGS1(
 
     /* digit */
     if (!isdigit(*s++))
-        return FALSE;
+	return FALSE;
 
     /* space */
     if (*s++ != ' ')
-        return FALSE;
+	return FALSE;
 
     /* space or digit */
     if (!(*s == ' ' || isdigit(*s))) {
@@ -1331,7 +1331,7 @@ PRIVATE BOOLEAN is_ls_date ARGS1(
 
     /* digit */
     if (!isdigit(*s++))
-        return FALSE;
+	return FALSE;
 
     /* colon or digit */
     if (!(*s == ':' || isdigit(*s))) {
@@ -1342,7 +1342,7 @@ PRIVATE BOOLEAN is_ls_date ARGS1(
 
     /* digit */
     if (!isdigit(*s++))
-        return FALSE;
+	return FALSE;
 
     /* space or digit */
     if (!(*s == ' ' || isdigit(*s))) {
@@ -1353,17 +1353,17 @@ PRIVATE BOOLEAN is_ls_date ARGS1(
 
     /* space */
     if (*s++ != ' ')
-        return FALSE;
+	return FALSE;
 
     return TRUE;
 } /* is_ls_date() */
 
 /*
  *  parse_eplf_line() --
- *      Extract the name, size, and date from an EPLF line. - 08-06-96 DJB
+ *	Extract the name, size, and date from an EPLF line. - 08-06-96 DJB
  */
 PRIVATE void parse_eplf_line ARGS2(
-	char *,		line,
+	char *, 	line,
 	EntryInfo *,	info)
 {
     char *cp = line;
@@ -1383,12 +1383,12 @@ PRIVATE void parse_eplf_line ARGS2(
     }
 
     while (*cp) {
-    	switch(*cp) {
+	switch(*cp) {
 	    case '\t':
-	        StrAllocCopy(info->filename, cp + 1);
+		StrAllocCopy(info->filename, cp + 1);
 		return;
 	    case 's':
-	        size = 0;
+		size = 0;
 		while (*(++cp) && (*cp != ','))
 		    size = (size * 10) + (*cp - '0');
 		info->size = size;
@@ -1416,10 +1416,10 @@ PRIVATE void parse_eplf_line ARGS2(
 
 /*
  * parse_ls_line() --
- *      Extract the name, size, and date from an ls -l line.
+ *	Extract the name, size, and date from an ls -l line.
  */
 PRIVATE void parse_ls_line ARGS2(
-	char *,		line,
+	char *, 	line,
 	EntryInfo *,	entry_info)
 {
     short  i, j;
@@ -1427,26 +1427,26 @@ PRIVATE void parse_ls_line ARGS2(
     int    size_num=0;
 
     for (i = strlen(line) - 1;
-         (i > 13) && (!isspace(line[i]) || !is_ls_date(&line[i-12])); i--)
-        ; /* null body */
+	 (i > 13) && (!isspace(line[i]) || !is_ls_date(&line[i-12])); i--)
+	; /* null body */
     line[i] = '\0';
     if (i > 13) {
-        StrAllocCopy(entry_info->date, &line[i-12]);
+	StrAllocCopy(entry_info->date, &line[i-12]);
 	/* replace the 4th location with nbsp if it is a space or zero */
 	if (entry_info->date[4] == ' ' || entry_info->date[4] == '0')
 	    entry_info->date[4] = HT_NON_BREAK_SPACE;
 	/* make sure year or time is flush right */
 	if (entry_info->date[11] == ' ') {
 	    for (j = 11; j > 6; j--) {
-	        entry_info->date[j] = entry_info->date[j-1];
+		entry_info->date[j] = entry_info->date[j-1];
 	    }
 	}
     }
     j = i - 14;
     while (isdigit(line[j])) {
-        size_num += (line[j] - '0') * base;
-        base *= 10;
-        j--;
+	size_num += (line[j] - '0') * base;
+	base *= 10;
+	j--;
     }
     entry_info->size = size_num;
     StrAllocCopy(entry_info->filename, &line[i + 1]);
@@ -1454,11 +1454,11 @@ PRIVATE void parse_ls_line ARGS2(
 
 /*
  * parse_vms_dir_entry()
- *      Format the name, date, and size from a VMS LIST line
- *      into the EntryInfo structure - FM
+ *	Format the name, date, and size from a VMS LIST line
+ *	into the EntryInfo structure - FM
  */
 PRIVATE void parse_vms_dir_entry ARGS2(
-	char *,		line,
+	char *, 	line,
 	EntryInfo *,	entry_info)
 {
     int i, j, ialloc;
@@ -1467,8 +1467,8 @@ PRIVATE void parse_vms_dir_entry ARGS2(
     /**  Get rid of blank lines, and information lines.  **/
     /**  Valid lines have the ';' version number token.  **/
     if (!strlen(line) || (cp=strchr(line, ';')) == NULL) {
-        entry_info->display = FALSE;
-        return;
+	entry_info->display = FALSE;
+	return;
     }
 
     /** Cut out file or directory name at VMS version number. **/
@@ -1477,61 +1477,61 @@ PRIVATE void parse_vms_dir_entry ARGS2(
 
     /** Cast VMS non-README file and directory names to lowercase. **/
     if (strstr(entry_info->filename, "READ") == NULL) {
-        for (i = 0; entry_info->filename[i]; i++)
+	for (i = 0; entry_info->filename[i]; i++)
 	    entry_info->filename[i] = TOLOWER(entry_info->filename[i]);
     } else {
-        i = ((strstr(entry_info->filename, "READ") - entry_info->filename) + 4);
+	i = ((strstr(entry_info->filename, "READ") - entry_info->filename) + 4);
 	if (!strncmp((char *)&entry_info->filename[i], "ME", 2)) {
 	    i += 2;
 	    while (entry_info->filename[i] && entry_info->filename[i] != '.') {
-	        i++;
+		i++;
 	    }
 	} else if (!strncmp((char *)&entry_info->filename[i], ".ME", 3)) {
 	    i = strlen(entry_info->filename);
 	} else {
 	    i = 0;
 	}
-        for (; entry_info->filename[i]; i++)
+	for (; entry_info->filename[i]; i++)
 	    entry_info->filename[i] = TOLOWER(entry_info->filename[i]);
     }
 
     /** Uppercase terminal .z's or _z's. **/
     if ((--i > 2) &&
-        entry_info->filename[i] == 'z' &&
-        (entry_info->filename[i-1] == '.' ||
-         entry_info->filename[i-1] == '_'))
-        entry_info->filename[i] = 'Z';
+	entry_info->filename[i] == 'z' &&
+	(entry_info->filename[i-1] == '.' ||
+	 entry_info->filename[i-1] == '_'))
+	entry_info->filename[i] = 'Z';
 
     /** Convert any tabs in rest of line to spaces. **/
     cps = cp-1;
     while ((cps=strchr(cps+1, '\t')) != NULL)
-        *cps = ' ';
+	*cps = ' ';
 
     /** Collapse serial spaces. **/
     i = 0; j = 1;
     cps = cp;
     while (cps[j] != '\0') {
-        if (cps[i] == ' ' && cps[j] == ' ')
-            j++;
-        else
-            cps[++i] = cps[j++];
+	if (cps[i] == ' ' && cps[j] == ' ')
+	    j++;
+	else
+	    cps[++i] = cps[j++];
     }
     cps[++i] = '\0';
 
     /* Set the years and date, if we don't have them yet. **/
     if (!HaveYears) {
-        set_years_and_date();
+	set_years_and_date();
     }
 
     /** Track down the date. **/
     if ((cpd=strchr(cp, '-')) != NULL &&
-        strlen(cpd) > 9 && isdigit(*(cpd-1)) &&
-        isalpha(*(cpd+1)) && *(cpd+4) == '-') {
+	strlen(cpd) > 9 && isdigit(*(cpd-1)) &&
+	isalpha(*(cpd+1)) && *(cpd+4) == '-') {
 
-        /** Month **/
-        *(cpd+4) = '\0';
-        *(cpd+2) = TOLOWER(*(cpd+2));
-        *(cpd+3) = TOLOWER(*(cpd+3));
+	/** Month **/
+	*(cpd+4) = '\0';
+	*(cpd+2) = TOLOWER(*(cpd+2));
+	*(cpd+3) = TOLOWER(*(cpd+3));
 	sprintf(date, "%s ", cpd+1);
 	*(cpd+4) = '-';
 
@@ -1555,39 +1555,39 @@ PRIVATE void parse_vms_dir_entry ARGS2(
 	    *(cpd+9) = ' ';
 	}
 
-        StrAllocCopy(entry_info->date, date);
+	StrAllocCopy(entry_info->date, date);
     }
 
     /** Track down the size **/
     if ((cpd=strchr(cp, '/')) != NULL) {
-        /* Appears be in used/allocated format */
-        cps = cpd;
-        while (isdigit(*(cps-1)))
-            cps--;
-        if (cps < cpd)
-            *cpd = '\0';
-        entry_info->size = atoi(cps);
-        cps = cpd+1;
-        while (isdigit(*cps))
-            cps++;
-        *cps = '\0';
-        ialloc = atoi(cpd+1);
-        /* Check if used is in blocks or bytes */
-        if (entry_info->size <= ialloc)
-            entry_info->size *= 512;
+	/* Appears be in used/allocated format */
+	cps = cpd;
+	while (isdigit(*(cps-1)))
+	    cps--;
+	if (cps < cpd)
+	    *cpd = '\0';
+	entry_info->size = atoi(cps);
+	cps = cpd+1;
+	while (isdigit(*cps))
+	    cps++;
+	*cps = '\0';
+	ialloc = atoi(cpd+1);
+	/* Check if used is in blocks or bytes */
+	if (entry_info->size <= ialloc)
+	    entry_info->size *= 512;
 
     } else if ((cps=strtok(cp, sp)) != NULL) {
-        /* We just initialized on the version number */
-        /* Now let's hunt for a lone, size number    */
-        while ((cps=strtok(NULL, sp)) != NULL) {
-           cpd = cps;
-           while (isdigit(*cpd))
-               cpd++;
-           if (*cpd == '\0') {
-               /* Assume it's blocks */
-               entry_info->size = atoi(cps) * 512;
-               break;
-           }
+	/* We just initialized on the version number */
+	/* Now let's hunt for a lone, size number    */
+	while ((cps=strtok(NULL, sp)) != NULL) {
+	   cpd = cps;
+	   while (isdigit(*cpd))
+	       cpd++;
+	   if (*cpd == '\0') {
+	       /* Assume it's blocks */
+	       entry_info->size = atoi(cps) * 512;
+	       break;
+	   }
        }
     }
 
@@ -1602,11 +1602,11 @@ PRIVATE void parse_vms_dir_entry ARGS2(
 
 /*
  * parse_ms_windows_dir_entry() --
- *      Format the name, date, and size from an MS_WINDOWS LIST line into
- *      the EntryInfo structure (assumes Chameleon NEWT format). - FM
+ *	Format the name, date, and size from an MS_WINDOWS LIST line into
+ *	the EntryInfo structure (assumes Chameleon NEWT format). - FM
  */
 PRIVATE void parse_ms_windows_dir_entry ARGS2(
-	char *,		line,
+	char *, 	line,
 	EntryInfo *,	entry_info)
 {
     char *cp = line;
@@ -1617,8 +1617,8 @@ PRIVATE void parse_ms_windows_dir_entry ARGS2(
     while (*cp && isspace(*cp))
 	cp++;
     if (!(*cp)) {
-        entry_info->display = FALSE;
-        return;
+	entry_info->display = FALSE;
+	return;
     }
 
     /** Cut out file or directory name. **/
@@ -1654,18 +1654,18 @@ PRIVATE void parse_ms_windows_dir_entry ARGS2(
     /** Track down the date. **/
     if (cpd < end) {
 	while (*cpd && isspace(*cpd))
-            cpd++;
+	    cpd++;
 	if (strlen(cpd) > 17) {
 	    *(cpd+6)  = '\0';  /* Month and Day */
 	    *(cpd+11) = '\0';  /* Year */
 	    *(cpd+17) = '\0';  /* Time */
 	    if (strcmp(ThisYear, cpd+7))
-	        /* Not this year, so show the year */
-	        sprintf(date, "%s  %s", cpd, (cpd+7));
+		/* Not this year, so show the year */
+		sprintf(date, "%s  %s", cpd, (cpd+7));
 	    else
-	        /* Is this year, so show the time */
-	        sprintf(date, "%s %s", cpd, (cpd+12));
-            StrAllocCopy(entry_info->date, date);
+		/* Is this year, so show the time */
+		sprintf(date, "%s %s", cpd, (cpd+12));
+	    StrAllocCopy(entry_info->date, date);
 	    if (entry_info->date[4] == ' '|| entry_info->date[4] == '0') {
 		entry_info->date[4] = HT_NON_BREAK_SPACE;
 	    }
@@ -1683,12 +1683,12 @@ PRIVATE void parse_ms_windows_dir_entry ARGS2(
 
 /*
  * parse_windows_nt_dir_entry() --
- *      Format the name, date, and size from a WINDOWS_NT LIST line into
- *      the EntryInfo structure (assumes Chameleon NEWT format). - FM
+ *	Format the name, date, and size from a WINDOWS_NT LIST line into
+ *	the EntryInfo structure (assumes Chameleon NEWT format). - FM
  */
 #ifdef NOTDEFINED
 PRIVATE void parse_windows_nt_dir_entry ARGS2(
-	char *,		line,
+	char *, 	line,
 	EntryInfo *,	entry_info)
 {
     char *cp = line;
@@ -1700,8 +1700,8 @@ PRIVATE void parse_windows_nt_dir_entry ARGS2(
     while (*cp && isspace(*cp))
 	cp++;
     if (!(*cp)) {
-        entry_info->display = FALSE;
-        return;
+	entry_info->display = FALSE;
+	return;
     }
 
     /** Cut out file or directory name. **/
@@ -1711,8 +1711,8 @@ PRIVATE void parse_windows_nt_dir_entry ARGS2(
 	cps--;
     cp = (cps+1);
     if (!strcmp(cp, ".") || !strcmp(cp, "..")) {
-        entry_info->display = FALSE;
-        return;
+	entry_info->display = FALSE;
+	return;
     }
     StrAllocCopy(entry_info->filename, cp);
     if (cps < cpd)
@@ -1731,8 +1731,8 @@ PRIVATE void parse_windows_nt_dir_entry ARGS2(
 	cps++;
     *cps++ ='\0';
     if (cps > end) {
-        entry_info->display = FALSE;
-        return;
+	entry_info->display = FALSE;
+	return;
     }
     while (*cps && isspace(*cps))
 	cps++;
@@ -1741,15 +1741,15 @@ PRIVATE void parse_windows_nt_dir_entry ARGS2(
 	cps++;
     *cps++ ='\0';
     if (cps > end || cpd == cps || strlen(cpd) < 7) {
-        entry_info->display = FALSE;
-        return;
+	entry_info->display = FALSE;
+	return;
     }
     if (strlen(cp) == 8 &&
 	isdigit(*cp) && isdigit(*(cp+1)) && *(cp+2) == '-' &&
 	isdigit(*(cp+3)) && isdigit(*(cp+4)) && *(cp+5) == '-') {
 	*(cp+2)  = '\0';	/* Month */
 	i = atoi(cp) - 1;
-	*(cp+5) = '\0';		/* Day */
+	*(cp+5) = '\0'; 	/* Day */
 	sprintf(date, "%s %s", months[i], (cp+3));
 	if (date[4] == '0')
 	    date[4] = ' ';
@@ -1771,7 +1771,7 @@ PRIVATE void parse_windows_nt_dir_entry ARGS2(
 	    sprintf((char*)&date[6], " %s%d:%s",
 				     (i < 10 ? "0" : ""), i, (cpd+3));
 	}
-        StrAllocCopy(entry_info->date, date);
+	StrAllocCopy(entry_info->date, date);
 	if (entry_info->date[4] == ' '|| entry_info->date[4] == '0') {
 	    entry_info->date[4] = HT_NON_BREAK_SPACE;
 	}
@@ -1806,11 +1806,11 @@ PRIVATE void parse_windows_nt_dir_entry ARGS2(
 
 /*
  * parse_cms_dir_entry() --
- *      Format the name, date, and size from a VM/CMS line into
- *      the EntryInfo structure. - FM
+ *	Format the name, date, and size from a VM/CMS line into
+ *	the EntryInfo structure. - FM
  */
 PRIVATE void parse_cms_dir_entry ARGS2(
-	char *,		line,
+	char *, 	line,
 	EntryInfo *,	entry_info)
 {
     char *cp = line;
@@ -1824,8 +1824,8 @@ PRIVATE void parse_cms_dir_entry ARGS2(
     while (*cp && isspace(*cp))
 	cp++;
     if (!(*cp)) {
-        entry_info->display = FALSE;
-        return;
+	entry_info->display = FALSE;
+	return;
     }
 
     /** Cut out file or directory name. **/
@@ -1836,39 +1836,39 @@ PRIVATE void parse_cms_dir_entry ARGS2(
     StrAllocCopy(entry_info->filename, cp);
     if (strchr(entry_info->filename, '.') != NULL)
 	/** If we already have a dot, we did an NLST. **/
-        return;
+	return;
     cp = cps;
     while (*cp && isspace(*cp))
 	cp++;
     if (!(*cp)) {
-        /** If we don't have more, we've misparsed. **/
-        FREE(entry_info->filename);
-        FREE(entry_info->type);
-        entry_info->display = FALSE;
-        return;
+	/** If we don't have more, we've misparsed. **/
+	FREE(entry_info->filename);
+	FREE(entry_info->type);
+	entry_info->display = FALSE;
+	return;
     }
     cps = cp;
     while (*cps && !isspace(*cps))
 	cps++;
     *cps++ ='\0';
     if ((0 == strcasecomp(cp, "DIR")) && (cp - line) > 17) {
-        /** It's an SFS directory. **/
-        StrAllocCopy(entry_info->type, "Directory");
-        entry_info->size = 0;
+	/** It's an SFS directory. **/
+	StrAllocCopy(entry_info->type, "Directory");
+	entry_info->size = 0;
     } else {
-        /** It's a file. **/
-        cp--;
+	/** It's a file. **/
+	cp--;
 	*cp = '.';
 	StrAllocCat(entry_info->filename, cp);
 
-        /** Track down the VM/CMS RECFM or type. **/
+	/** Track down the VM/CMS RECFM or type. **/
 	cp = cps;
 	if (cp < end) {
 	    while (*cp && isspace(*cp))
-	        cp++;
+		cp++;
 	    cps = cp;
 	    while (*cps && !isspace(*cps))
-	        cps++;
+		cps++;
 	    *cps++ = '\0';
 	    /** Check cp here, if it's relevant someday. **/
 	}
@@ -1914,8 +1914,8 @@ PRIVATE void parse_cms_dir_entry ARGS2(
     /** Track down the date. **/
     cpd = cps;
     if (((cps < end) &&
-         (cps = strchr(cpd, ':')) != NULL) &&
-        (cps < (end - 3) &&
+	 (cps = strchr(cpd, ':')) != NULL) &&
+	(cps < (end - 3) &&
 	 isdigit(*(cps+1)) && isdigit(*(cps+2)) && *(cps+3) == ':')) {
 	cps += 3;
 	*cps = '\0';
@@ -1933,14 +1933,14 @@ PRIVATE void parse_cms_dir_entry ARGS2(
 		date[4] = ' ';
 	    cpd += 6;		/* Year */
 	    if (strcmp((ThisYear+2), cpd)) {
-	        /* Not this year, so show the year. */
+		/* Not this year, so show the year. */
 		if (atoi(cpd) < 70) {
 		    sprintf((char *)&date[6], "  20%s", cpd);
 		} else {
 		    sprintf((char *)&date[6], "  19%s", cpd);
 		}
 	    } else {
-	        /* Is this year, so show the time. */
+		/* Is this year, so show the time. */
 		*(cps+2) = '\0';	/* Hour */
 		i = atoi(cps);
 		sprintf((char*)&date[6], " %s%d:%s",
@@ -1964,14 +1964,14 @@ PRIVATE void parse_cms_dir_entry ARGS2(
 
 /*
  *     parse_dir_entry()
- *      Given a line of LIST/NLST output in entry, return results
- *      and a file/dir name in entry_info struct
+ *	Given a line of LIST/NLST output in entry, return results
+ *	and a file/dir name in entry_info struct
  *
- *      If first is true, this is the first name in a directory.
+ *	If first is true, this is the first name in a directory.
  */
 
 PRIVATE EntryInfo * parse_dir_entry ARGS2(
-	char *,		entry,
+	char *, 	entry,
 	BOOLEAN *,	first)
 {
     EntryInfo *entry_info;
@@ -1988,125 +1988,125 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2(
     entry_info->display = TRUE;
 
     switch (server_type) {
-        case UNIX_SERVER:
-        case PETER_LEWIS_SERVER:
-        case MACHTEN_SERVER:
+	case UNIX_SERVER:
+	case PETER_LEWIS_SERVER:
+	case MACHTEN_SERVER:
 	case MSDOS_SERVER:
-        case WINDOWS_NT_SERVER:
-        case APPLESHARE_SERVER:
-        case NETPRESENZ_SERVER:
+	case WINDOWS_NT_SERVER:
+	case APPLESHARE_SERVER:
+	case NETPRESENZ_SERVER:
 	    /*
-	    **  Check for EPLF output (local times).
+	    **	Check for EPLF output (local times).
 	    */
 	    if (*entry == '+') {
 		parse_eplf_line(entry, entry_info);
 		break;
 	    }
 
-            /*
-	    **  Interpret and edit LIST output from Unix server.
+	    /*
+	    **	Interpret and edit LIST output from Unix server.
 	    */
-            len = strlen(entry);
+	    len = strlen(entry);
 	    if (*first) {
 		if (!strcmp(entry, "can not access directory .")) {
 		    /*
-		     *  Don't reset *first, nothing real will follow. - KW
+		     *	Don't reset *first, nothing real will follow. - KW
 		     */
 		    entry_info->display = FALSE;
 		    return(entry_info);
 		}
-	        *first = FALSE;
-                if (!strncmp(entry, "total ", 6) ||
-                    strstr(entry, "not available") != NULL) {
+		*first = FALSE;
+		if (!strncmp(entry, "total ", 6) ||
+		    strstr(entry, "not available") != NULL) {
 		    entry_info->display=FALSE;
 		    return(entry_info);
 		} else if (unsure_type) {
-                    /* this isn't really a unix server! */
-                    server_type = GENERIC_SERVER;
+		    /* this isn't really a unix server! */
+		    server_type = GENERIC_SERVER;
 		    entry_info->display=FALSE;
 		    return(entry_info);
 		}
 	    }
 
-            /*
-	    **  Check first character of ls -l output.
+	    /*
+	    **	Check first character of ls -l output.
 	    */
-            if (TOUPPER(entry[0]) == 'D')  {
-                /*
+	    if (TOUPPER(entry[0]) == 'D')  {
+		/*
 		**  It's a directory.
 		*/
-                StrAllocCopy(entry_info->type, "Directory");
-	        remove_size=TRUE; /* size is not useful */
+		StrAllocCopy(entry_info->type, "Directory");
+		remove_size=TRUE; /* size is not useful */
 	    } else if (entry[0] == 'l') {
-                /*
+		/*
 		**  It's a symbolic link, does the user care about
-		**  knowing if it is symbolic?  I think so since
+		**  knowing if it is symbolic?	I think so since
 		**  it might be a directory.
 		*/
-                StrAllocCopy(entry_info->type, "Symbolic Link");
+		StrAllocCopy(entry_info->type, "Symbolic Link");
 		remove_size=TRUE; /* size is not useful */
 
-                /*
+		/*
 		**  Strip off " -> pathname".
 		*/
-                for (i = len - 1; (i > 3) &&
-		                  (!isspace(entry[i]) ||
-				   (entry[i-1] != '>')  ||
+		for (i = len - 1; (i > 3) &&
+				  (!isspace(entry[i]) ||
+				   (entry[i-1] != '>')	||
 				   (entry[i-2] != '-') ||
 				   (entry[i-3] != ' ')); i--)
-                    ; /* null body */
-                if (i > 3) {
-                    entry[i-3] = '\0';
-                    len = i - 3;
-                }
-            } /* link */
+		    ; /* null body */
+		if (i > 3) {
+		    entry[i-3] = '\0';
+		    len = i - 3;
+		}
+	    } /* link */
 
 	    parse_ls_line(entry, entry_info);
 
 	    if (!strcmp(entry_info->filename,"..") ||
-	        !strcmp(entry_info->filename,"."))
+		!strcmp(entry_info->filename,"."))
 		entry_info->display=FALSE;
 	    /*
-	    **  Goto the bottom and get real type.
+	    **	Goto the bottom and get real type.
 	    */
-            break;
+	    break;
 
-        case VMS_SERVER:
-            /*
-	    **  Interpret and edit LIST output from VMS server
-	    **  and convert information lines to zero length.
+	case VMS_SERVER:
+	    /*
+	    **	Interpret and edit LIST output from VMS server
+	    **	and convert information lines to zero length.
 	    */
 	    parse_vms_dir_entry(entry, entry_info);
 
-            /*
-	    **  Get rid of any junk lines.
+	    /*
+	    **	Get rid of any junk lines.
 	    */
 	    if (!entry_info->display)
 		return(entry_info);
 
 	    /*
-	    **  Trim off VMS directory extensions.
+	    **	Trim off VMS directory extensions.
 	    */
 	    len = strlen(entry_info->filename);
-            if ((len > 4) && !strcmp(&entry_info->filename[len-4], ".dir")) {
+	    if ((len > 4) && !strcmp(&entry_info->filename[len-4], ".dir")) {
 		entry_info->filename[len-4] = '\0';
-                StrAllocCopy(entry_info->type, "Directory");
+		StrAllocCopy(entry_info->type, "Directory");
 		remove_size=TRUE; /* size is not useful */
 	    }
 	    /*
-	    **  Goto the bottom and get real type.
+	    **	Goto the bottom and get real type.
 	    */
-            break;
+	    break;
 
-        case MS_WINDOWS_SERVER:
-            /*
-	    **  Interpret and edit LIST output from MS_WINDOWS server
-	    **  and convert information lines to zero length.
+	case MS_WINDOWS_SERVER:
+	    /*
+	    **	Interpret and edit LIST output from MS_WINDOWS server
+	    **	and convert information lines to zero length.
 	    */
 	    parse_ms_windows_dir_entry(entry, entry_info);
 
-            /*
-	    **  Get rid of any junk lines.
+	    /*
+	    **	Get rid of any junk lines.
 	    */
 	    if (!entry_info->display)
 		return(entry_info);
@@ -2115,20 +2115,20 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2(
 		return(entry_info);
 	    }
 	    /*
-	    **  Goto the bottom and get real type.
+	    **	Goto the bottom and get real type.
 	    */
 	    break;
 
 #ifdef NOTDEFINED
-        case WINDOWS_NT_SERVER:
-            /*
-	    **  Interpret and edit LIST output from MS_WINDOWS server
-	    **  and convert information lines to zero length.
+	case WINDOWS_NT_SERVER:
+	    /*
+	    **	Interpret and edit LIST output from MS_WINDOWS server
+	    **	and convert information lines to zero length.
 	    */
 	    parse_windows_nt_dir_entry(entry, entry_info);
 
-            /*
-	    **  Get rid of any junk lines.
+	    /*
+	    **	Get rid of any junk lines.
 	    */
 	    if (!entry_info->display)
 		return(entry_info);
@@ -2137,21 +2137,21 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2(
 		return(entry_info);
 	    }
 	    /*
-	    **  Goto the bottom and get real type.
+	    **	Goto the bottom and get real type.
 	    */
 	    break;
 #endif /* NOTDEFINED */
 
-        case CMS_SERVER:
+	case CMS_SERVER:
 	  {
-            /*
-	    **  Interpret and edit LIST output from VM/CMS server
-	    **  and convert any information lines to zero length.
+	    /*
+	    **	Interpret and edit LIST output from VM/CMS server
+	    **	and convert any information lines to zero length.
 	    */
 	    parse_cms_dir_entry(entry, entry_info);
 
-            /*
-	    **  Get rid of any junk lines.
+	    /*
+	    **	Get rid of any junk lines.
 	    */
 	    if (!entry_info->display)
 		return(entry_info);
@@ -2160,35 +2160,35 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2(
 		return(entry_info);
 	    }
 	    /*
-	    **  Goto the bottom and get real type.
+	    **	Goto the bottom and get real type.
 	    */
 	    break;
 	  }
 
-        case NCSA_SERVER:
-        case TCPC_SERVER:
-            /*
-	    **  Directories identified by trailing "/" characters.
+	case NCSA_SERVER:
+	case TCPC_SERVER:
+	    /*
+	    **	Directories identified by trailing "/" characters.
 	    */
 	    StrAllocCopy(entry_info->filename, entry);
-            len = strlen(entry);
-            if (entry[len-1] == '/') {
-                /*
+	    len = strlen(entry);
+	    if (entry[len-1] == '/') {
+		/*
 		**  It's a dir, remove / and mark it as such.
 		*/
-                entry[len-1] = '\0';
-                StrAllocCopy(entry_info->type, "Directory");
+		entry[len-1] = '\0';
+		StrAllocCopy(entry_info->type, "Directory");
 		remove_size=TRUE; /* size is not useful */
-            }
+	    }
 	    /*
-	    **  Goto the bottom and get real type.
+	    **	Goto the bottom and get real type.
 	    */
-            break;
+	    break;
 
 	default:
 	    /*
-	    **  We can't tell if it is a directory since we only
-	    **  did an NLST :(  List bad file types anyways? NOT!
+	    **	We can't tell if it is a directory since we only
+	    **	did an NLST :(	List bad file types anyways? NOT!
 	    */
 	    StrAllocCopy(entry_info->filename, entry);
 	    return(entry_info); /* mostly empty info */
@@ -2205,9 +2205,9 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2(
 	     0 == strncasecomp(cp, ".me", 3)) &&
 	    (cp[3] == '\0' || cp[3] == ';')) {
 	    /*
-	    **  Don't treat this as application/x-Troff-me
-	    **  if it's a Unix server but has the string
-	    **  "read.me", or if it's not a Unix server. - FM
+	    **	Don't treat this as application/x-Troff-me
+	    **	if it's a Unix server but has the string
+	    **	"read.me", or if it's not a Unix server. - FM
 	    */
 	    if ((server_type != UNIX_SERVER) ||
 		(cp > (entry_info->filename + 3) &&
@@ -2218,13 +2218,13 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2(
     }
 
     /*
-    **  Get real types eventually.
+    **	Get real types eventually.
     */
     if (!entry_info->type) {
 	CONST char *cp2;
-        HTFormat format;
-        HTAtom * encoding;  /* @@ not used at all */
-        format = HTFileFormat(entry_info->filename, &encoding, &cp2);
+	HTFormat format;
+	HTAtom * encoding;  /* @@ not used at all */
+	format = HTFileFormat(entry_info->filename, &encoding, &cp2);
 
 	if (cp2 == NULL) {
 	    if (!strncmp(HTAtom_name(format), "application",11)) {
@@ -2236,7 +2236,7 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2(
 	    }
 	}
 
-        StrAllocCopy(entry_info->type, cp2);
+	StrAllocCopy(entry_info->type, cp2);
     }
 
     return(entry_info);
@@ -2250,29 +2250,29 @@ PRIVATE int compare_EntryInfo_structs ARGS2(
     char date1[16], date2[16], time1[8], time2[8], month[4];
 
     switch(HTfileSortMethod) {
-        case FILE_BY_SIZE:
+	case FILE_BY_SIZE:
 	    /* both equal or both 0 */
-            if (entry1->size == entry2->size)
+	    if (entry1->size == entry2->size)
 		return(strcmp(entry1->filename, entry2->filename));
 	    else
 		if (entry1->size > entry2->size)
 		    return(1);
 		else
 		    return(-1);
-            break;
+	    break;
 
-        case FILE_BY_TYPE:
-            if (entry1->type && entry2->type) {
-                status = strcasecomp(entry1->type, entry2->type);
+	case FILE_BY_TYPE:
+	    if (entry1->type && entry2->type) {
+		status = strcasecomp(entry1->type, entry2->type);
 		if (status)
 		    return(status);
 		/* else fall to filename comparison */
 	    }
-            return (strcmp(entry1->filename, entry2->filename));
-            break;
+	    return (strcmp(entry1->filename, entry2->filename));
+	    break;
 
-        case FILE_BY_DATE:
-            if (entry1->date && entry2->date) {
+	case FILE_BY_DATE:
+	    if (entry1->date && entry2->date) {
 		/*
 		** Make sure we have the correct length. - FM
 		*/
@@ -2304,9 +2304,9 @@ PRIVATE int compare_EntryInfo_structs ARGS2(
 		month[3] = '\0';
 		for (i = 0; i < 12; i++) {
 		    if (!strcasecomp(month, months[i])) {
-		        break;
+			break;
 		    }
-	        }
+		}
 		i++;
 		sprintf(month, "%s%d", (i < 10 ? "0" : ""), i);
 		strcat(date1, month);
@@ -2322,20 +2322,20 @@ PRIVATE int compare_EntryInfo_structs ARGS2(
 		}
 		strcat(date1, time1);
 		    if (entry2->date[9] == ':') {
-		        strcpy(date2, "9999");
+			strcpy(date2, "9999");
 			strcpy(time2, (char *)&entry2->date[7]);
 			if (time2[0] == ' ') {
 			    time2[0] = '0';
 			}
 		    } else {
 			strcpy(date2, (char *)&entry2->date[8]);
-		        strcpy(time2, "00:00");
+			strcpy(time2, "00:00");
 		    }
 		strncpy(month, entry2->date, 3);
 		month[3] = '\0';
 		for (i = 0; i < 12; i++) {
 		    if (!strcasecomp(month, months[i])) {
-		        break;
+			break;
 		    }
 		}
 		i++;
@@ -2355,17 +2355,17 @@ PRIVATE int compare_EntryInfo_structs ARGS2(
 		/*
 		** Do the comparison. - FM
 		*/
-                status = strcasecomp(date2, date1);
+		status = strcasecomp(date2, date1);
 		if (status)
 		    return(status);
 		/* else fall to filename comparison */
 	    }
-            return (strcmp(entry1->filename, entry2->filename));
-            break;
+	    return (strcmp(entry1->filename, entry2->filename));
+	    break;
 
-        case FILE_BY_NAME:
-        default:
-            return (strcmp(entry1->filename, entry2->filename));
+	case FILE_BY_NAME:
+	default:
+	    return (strcmp(entry1->filename, entry2->filename));
     }
 }
 
@@ -2375,9 +2375,9 @@ PRIVATE int compare_EntryInfo_structs ARGS2(
 **
 ** On entry,
 **	anchor		Parent anchor to link the this node to
-**	address		Address of the directory
+**	address 	Address of the directory
 ** On exit,
-**	returns		HT_LOADED if OK
+**	returns 	HT_LOADED if OK
 **			<0 if error.
 */
 PRIVATE int read_directory ARGS4(
@@ -2403,29 +2403,29 @@ PRIVATE int read_directory ARGS4(
     _HTProgress ("Receiving FTP directory.");
 
     /*
-    **  Check whether we always want the home
-    **  directory treated as Welcome. - FM
+    **	Check whether we always want the home
+    **	directory treated as Welcome. - FM
     */
     if (server_type == VMS_SERVER)
-        tildeIsTop = TRUE;
+	tildeIsTop = TRUE;
 
     /*
-    **  This should always come back FALSE, since the
-    **  flag is set only for local directory listings
-    **  if LONG_LIST was defined on compilation, but
-    **  we could someday set up an equivalent listing
-    **  for Unix ftp servers. - FM
+    **	This should always come back FALSE, since the
+    **	flag is set only for local directory listings
+    **	if LONG_LIST was defined on compilation, but
+    **	we could someday set up an equivalent listing
+    **	for Unix ftp servers. - FM
     */
     need_parent_link = HTDirTitles(target, (HTAnchor*)parent, tildeIsTop);
 
     data_read_pointer = data_write_pointer = data_buffer;
 
     if (*filename == '\0') {		  /* Empty filename: use root. */
-        StrAllocCopy (lastpath, "/");
-    } else if (!strcmp(filename,"/")) {	  /* Root path. */
-        StrAllocCopy (lastpath, "/foo/..");
+	StrAllocCopy (lastpath, "/");
+    } else if (!strcmp(filename,"/")) {   /* Root path. */
+	StrAllocCopy (lastpath, "/foo/..");
     } else {
-        char * p = strrchr(filename, '/');	     /* Find the lastslash. */
+	char * p = strrchr(filename, '/');	     /* Find the lastslash. */
 	char *cp;
 
 	if (server_type == CMS_SERVER) {
@@ -2435,7 +2435,7 @@ PRIVATE int read_directory ARGS4(
 	}
 	if ((cp = strrchr(lastpath, ';')) != NULL) {   /* Trim type= param. */
 	    if (!strncasecomp((cp+1), "type=", 5)) {
-	        if (TOUPPER(*(cp+6)) == 'D' ||
+		if (TOUPPER(*(cp+6)) == 'D' ||
 		    TOUPPER(*(cp+6)) == 'A' ||
 		    TOUPPER(*(cp+6)) == 'I')
 		    *cp = '\0';
@@ -2446,20 +2446,20 @@ PRIVATE int read_directory ARGS4(
 
 
     {
-        HTBTree * bt = HTBTree_new((HTComparer)compare_EntryInfo_structs);
-        char c;
+	HTBTree * bt = HTBTree_new((HTComparer)compare_EntryInfo_structs);
+	char c;
 	HTChunk * chunk = HTChunkCreate(128);
 	int BytesReceived = 0;
 	int BytesReported = 0;
 	char NumBytes[64];
 	PUTS("\n");  /* prettier LJM */
-	for (c = 0; c != (char)EOF;) {  /* For each entry in the directory */
+	for (c = 0; c != (char)EOF;) {	/* For each entry in the directory */
 	    HTChunkClear(chunk);
 
 	    if (HTCheckForInterrupt()) {
-	    	WasInterrupted = TRUE;
+		WasInterrupted = TRUE;
 		if (BytesReceived) {
-		    goto unload_btree;  /* unload btree */
+		    goto unload_btree;	/* unload btree */
 		} else {
 		    ABORT_TARGET;
 		    HTBTreeAndObject_free(bt);
@@ -2467,80 +2467,80 @@ PRIVATE int read_directory ARGS4(
 		}
 	    }
 
-	    /*   read directory entry
+	    /*	 read directory entry
 	     */
-	    for (;;) {                 /* Read in one line as filename */
+	    for (;;) {		       /* Read in one line as filename */
 		c = NEXT_DATA_CHAR;
 AgainForMultiNet:
 		if (interrupted_in_next_data_char) {
-	    	    WasInterrupted = TRUE;
+		    WasInterrupted = TRUE;
 		    if (BytesReceived) {
-		        goto unload_btree;  /* unload btree */
-                    } else {
-                        ABORT_TARGET;
-                        HTBTreeAndObject_free(bt);
-                        return HT_INTERRUPTED;
-                    }
+			goto unload_btree;  /* unload btree */
+		    } else {
+			ABORT_TARGET;
+			HTBTreeAndObject_free(bt);
+			return HT_INTERRUPTED;
+		    }
 		} else if (c == CR || c == LF) {    /* Terminator? */
 		    if (chunk->size != 0) {  /* got some text */
-		        /* Deal with MultiNet's wrapping of long lines */
-                        if (server_type == VMS_SERVER) {
-                        /* Deal with MultiNet's wrapping of long lines - F.M. */
-                            if (data_read_pointer < data_write_pointer &&
-                                *(data_read_pointer+1) == ' ')
-                                data_read_pointer++;
-                            else if (data_read_pointer >= data_write_pointer) {
-                                status = NETREAD(data_soc, data_buffer,
-                                                 DATA_BUFFER_SIZE);
-                                if (status == HT_INTERRUPTED) {
-                                    interrupted_in_next_data_char = 1;
-                                    goto AgainForMultiNet;
-                                }
-                                if (status <= 0) {
-                                    c = (char)EOF;
-                                    break;
-                                }
-                                data_write_pointer = data_buffer + status;
-                                data_read_pointer = data_buffer;
-                                if (*data_read_pointer == ' ')
-                                    data_read_pointer++;
-                                else
-                                    break;
-                            }
-                            else
-                                break;
-                        }
+			/* Deal with MultiNet's wrapping of long lines */
+			if (server_type == VMS_SERVER) {
+			/* Deal with MultiNet's wrapping of long lines - F.M. */
+			    if (data_read_pointer < data_write_pointer &&
+				*(data_read_pointer+1) == ' ')
+				data_read_pointer++;
+			    else if (data_read_pointer >= data_write_pointer) {
+				status = NETREAD(data_soc, data_buffer,
+						 DATA_BUFFER_SIZE);
+				if (status == HT_INTERRUPTED) {
+				    interrupted_in_next_data_char = 1;
+				    goto AgainForMultiNet;
+				}
+				if (status <= 0) {
+				    c = (char)EOF;
+				    break;
+				}
+				data_write_pointer = data_buffer + status;
+				data_read_pointer = data_buffer;
+				if (*data_read_pointer == ' ')
+				    data_read_pointer++;
+				else
+				    break;
+			    }
+			    else
+				break;
+			}
 			else
-		            break;            /* finish getting one entry */
+			    break;	      /* finish getting one entry */
 		    }
 		} else if (c == (char)EOF) {
-		    break;             /* End of file */
+		    break;	       /* End of file */
 		} else {
 		    HTChunkPutc(chunk, c);
 		}
-            }
+	    }
 	    HTChunkTerminate(chunk);
 
 	    BytesReceived += chunk->size;
 	    if (BytesReceived > BytesReported + 1024) {
-	        sprintf(NumBytes,"Transferred %d bytes",BytesReceived);
+		sprintf(NumBytes,"Transferred %d bytes",BytesReceived);
 		HTProgress(NumBytes);
 		BytesReported = BytesReceived;
 	    }
 
 	    if (c == (char) EOF && chunk->size == 1)
 	    /* 1 means empty: includes terminating 0 */
-	        break;
-            if (TRACE)
-	        fprintf(stderr, "HTFTP: Line in %s is %s\n",
-	    			lastpath, chunk->data);
+		break;
+	    if (TRACE)
+		fprintf(stderr, "HTFTP: Line in %s is %s\n",
+				lastpath, chunk->data);
 
 	    entry_info = parse_dir_entry(chunk->data, &first);
 	    if (entry_info->display) {
 		if (TRACE)
 		    fprintf(stderr, "Adding file to BTree: %s\n",
-		     		    entry_info->filename);
-	        HTBTree_add(bt, (EntryInfo *)entry_info);
+				    entry_info->filename);
+		HTBTree_add(bt, (EntryInfo *)entry_info);
 	    } else {
 		FREE(entry_info);
 	    }
@@ -2549,15 +2549,17 @@ AgainForMultiNet:
 
 unload_btree:
 
-        HTChunkFree(chunk);
+	HTChunkFree(chunk);
 
 	/* print out the handy help message if it exits :) */
 	if (help_message_cache_non_empty()) {
 	    START(HTML_PRE);
 	    START(HTML_HR);
+	    PUTS("\n");
 	    PUTS(help_message_cache_contents());
-	    init_help_message_cache();  /* to free memory */
+	    init_help_message_cache();	/* to free memory */
 	    START(HTML_HR);
+	    PUTS("\n");
 	} else {
 	    START(HTML_PRE);
 	    PUTS("\n");
@@ -2565,7 +2567,7 @@ unload_btree:
 
 	/* Put up header
 	 */
-	/* PUTS("    Date        Type             Size     Filename\n");
+	/* PUTS("    Date	 Type		  Size	   Filename\n");
 	 */
 
 	/* Run through tree printing out in order
@@ -2587,9 +2589,9 @@ unload_btree:
 
 		if (entry_info->type) {
 		    for (i = 0; entry_info->type[i] != '\0' && i < 15; i++)
-		        PUTC(entry_info->type[i]);
+			PUTC(entry_info->type[i]);
 		    for (; i < 17; i++)
-		        PUTC(' ');
+			PUTC(' ');
 		}
 
 		/* start the anchor */
@@ -2603,7 +2605,7 @@ unload_btree:
 					       entry_info->size);
 		    else
 			sprintf(string_buffer, "  %dKb",
-					        entry_info->size/1024);
+						entry_info->size/1024);
 			  PUTS(string_buffer);
 		}
 
@@ -2629,13 +2631,13 @@ unload_btree:
     }
 
     if (WasInterrupted || HTCheckForInterrupt()) {
-        if (server_type != CMS_SERVER)
-            response(NIL);
+	if (server_type != CMS_SERVER)
+	    response(NIL);
 	_HTProgress("Data transfer interrupted.");
 	return HT_LOADED;
     }
     if (server_type != CMS_SERVER)
-        response(NIL);
+	response(NIL);
     return HT_LOADED;
 #ifdef NOTDEFINED
     return response(NIL) == 2 ? HT_LOADED : -1;
@@ -2648,7 +2650,7 @@ unload_btree:
 ** On entry,
 **	name		WWW address of a file: document, including hostname
 ** On exit,
-**	returns		Socket number for file if good.
+**	returns 	Socket number for file if good.
 **			<0 if bad.
 */
 PUBLIC int HTFTPLoad ARGS4(
@@ -2680,10 +2682,10 @@ PUBLIC int HTFTPLoad ARGS4(
 	status = get_listen_socket();
 	if (status < 0) {
 	    NETCLOSE (control->socket);
-            control->socket = -1;
-            close_master_socket ();
-            /* HT_INTERRUPTED would fall through, if we could interrupt
-               somehow in the middle of it, which we currently can't. */
+	    control->socket = -1;
+	    close_master_socket ();
+	    /* HT_INTERRUPTED would fall through, if we could interrupt
+	       somehow in the middle of it, which we currently can't. */
 	    return status;
 	}
 
@@ -2693,22 +2695,22 @@ PUBLIC int HTFTPLoad ARGS4(
 	{
 	    status = response(port_command);
 	    if (status == HT_INTERRUPTED) {
-              if (TRACE)
-                fprintf (stderr,
+	      if (TRACE)
+		fprintf (stderr,
 			 "HTFTP: Interrupted in response (port_command)\n");
-              _HTProgress ("Connection interrupted.");
-              NETCLOSE (control->socket);
-              control->socket = -1;
-              close_master_socket ();
-              return HT_INTERRUPTED;
-            }
+	      _HTProgress ("Connection interrupted.");
+	      NETCLOSE (control->socket);
+	      control->socket = -1;
+	      close_master_socket ();
+	      return HT_INTERRUPTED;
+	    }
 	    if (status != 2) {		/* Could have timed out */
 		if (status < 0)
 		    continue;		/* try again - net error*/
-		return -status;		/* bad reply */
+		return -status; 	/* bad reply */
 	    }
 	    if (TRACE)
-	        fprintf(stderr, "HTFTP: Port defined.\n");
+		fprintf(stderr, "HTFTP: Port defined.\n");
 	}
 #endif /* REPEAT_PORT */
 #else	/* Use PASV */
@@ -2725,7 +2727,7 @@ PUBLIC int HTFTPLoad ARGS4(
 	    if (status != 2) {
 		if (status < 0)
 		    continue;		/* retry or Bad return */
-		return -status;		/* bad reply */
+		return -status; 	/* bad reply */
 	    }
 	    for (p = response_text; *p && *p != ','; p++)
 		; /* null body */
@@ -2733,23 +2735,23 @@ PUBLIC int HTFTPLoad ARGS4(
 	    while (--p > response_text && '0' <= *p && *p <= '9')
 		; /* null body */
 
-           status = sscanf(p+1, "%d,%d,%d,%d,%d,%d",
-                   &h0, &h1, &h2, &h3, &p0, &p1);
-           if (status < 4) {
-               fprintf(stderr, "HTFTP: PASV reply has no inet address!\n");
-               return -99;
-           }
-           passive_port = (p0<<8) + p1;
+	   status = sscanf(p+1, "%d,%d,%d,%d,%d,%d",
+		   &h0, &h1, &h2, &h3, &p0, &p1);
+	   if (status < 4) {
+	       fprintf(stderr, "HTFTP: PASV reply has no inet address!\n");
+	       return -99;
+	   }
+	   passive_port = (p0<<8) + p1;
 	   if (TRACE)
-               fprintf(stderr, "HTFTP: Server is listening on port %d\n",
+	       fprintf(stderr, "HTFTP: Server is listening on port %d\n",
 				passive_port);
 
 
 /*	Open connection for data:
 */
 	    sprintf(command,
-            "ftp://%d.%d.%d.%d:%d/",h0,h1,h2,h3,passive_port);
-            status = HTDoConnect(name, "FTP", passive_port, &data_soc);
+	    "ftp://%d.%d.%d.%d:%d/",h0,h1,h2,h3,passive_port);
+	    status = HTDoConnect(name, "FTP", passive_port, &data_soc);
 
 	    if (status < 0) {
 		(void) HTInetStatus("connect for data");
@@ -2758,21 +2760,21 @@ PUBLIC int HTFTPLoad ARGS4(
 	    }
 
 	    if (TRACE)
-	        fprintf(stderr, "FTP data connected, socket %d\n", data_soc);
+		fprintf(stderr, "FTP data connected, socket %d\n", data_soc);
 	}
 #endif /* use PASV */
 	status = 0;
-        break;	/* No more retries */
+	break;	/* No more retries */
 
     } /* for retries */
     if (status < 0)
-        return status;		/* Failed with this code */
+	return status;		/* Failed with this code */
 
 /*	Ask for the file:
 */
     {
-        char *filename = HTParse(name, "", PARSE_PATH + PARSE_PUNCTUATION);
-	char *fname = filename;	/** Save for subsequent free() **/
+	char *filename = HTParse(name, "", PARSE_PATH + PARSE_PUNCTUATION);
+	char *fname = filename; /** Save for subsequent free() **/
 	BOOL binary;
 	char *type = NULL;
 	char *cp;
@@ -2780,7 +2782,7 @@ PUBLIC int HTFTPLoad ARGS4(
 	if (server_type == CMS_SERVER) {
 	    /** If the unescaped path has a %2f, reject it as illegal. - FM **/
 	    if (((cp = strstr(filename, "%2")) != NULL) &&
-	        TOUPPER(cp[2]) == 'F') {
+		TOUPPER(cp[2]) == 'F') {
 		FREE(fname);
 		init_help_message_cache();  /* to free memory */
 		NETCLOSE(control->socket);
@@ -2798,10 +2800,10 @@ PUBLIC int HTFTPLoad ARGS4(
 	    type = "D";
 	} else if ((type = strrchr(filename, ';')) != NULL) {
 	    /*
-	    **  Check and trim the type= parameter. - FM
+	    **	Check and trim the type= parameter. - FM
 	    */
 	    if (!strncasecomp((type+1), "type=", 5)) {
-	        switch(TOUPPER(*(type+6))) {
+		switch(TOUPPER(*(type+6))) {
 		case 'D':
 		    *type = '\0';
 		    type = "D";
@@ -2824,7 +2826,7 @@ PUBLIC int HTFTPLoad ARGS4(
 		}
 	    }
 	    if (TRACE && *type != '\0') {
-	        fprintf(stderr, "HTFTP: type=%s\n", type);
+		fprintf(stderr, "HTFTP: type=%s\n", type);
 	    }
 	}
 	HTUnEscape(filename);
@@ -2862,22 +2864,22 @@ PUBLIC int HTFTPLoad ARGS4(
 		}
 	    }
 	    if (cp2) {
-	        *cp2 = '/';
+		*cp2 = '/';
 	    }
 	}
 	if (strlen(filename) > 3) {
 	    char *cp2;
 	    if (((cp2=strrchr(filename, '.')) != NULL &&
-	         0 == strncasecomp(cp2, ".me", 3)) &&
+		 0 == strncasecomp(cp2, ".me", 3)) &&
 		(cp2[3] == '\0' || cp2[3] == ';')) {
 		/*
 		**  Don't treat this as application/x-Troff-me
 		**  if it's a Unix server but has the string
 		**  "read.me", or if it's not a Unix server. - FM
 		*/
-	        if ((server_type != UNIX_SERVER) ||
+		if ((server_type != UNIX_SERVER) ||
 		    (cp2 > (filename + 3) &&
-	             0 == strncasecomp((cp2 - 4), "read.me", 7))) {
+		     0 == strncasecomp((cp2 - 4), "read.me", 7))) {
 		    *cp2 = '\0';
 		    format = HTFileFormat(filename, &encoding, NULL);
 		    *cp2 = '.';
@@ -2885,7 +2887,7 @@ PUBLIC int HTFTPLoad ARGS4(
 		    format = HTFileFormat(filename, &encoding, NULL);
 		}
 	    } else {
-	        format = HTFileFormat(filename, &encoding, NULL);
+		format = HTFileFormat(filename, &encoding, NULL);
 	    }
 	} else {
 	    format = HTFileFormat(filename, &encoding, NULL);
@@ -2895,38 +2897,38 @@ PUBLIC int HTFTPLoad ARGS4(
 		  encoding != HTAtom_for("7bit"));
 	if (!binary &&
 	    /*
-	    **  Force binary if we're in source, download or dump
-	    **  mode and this is not a VM/CMS server, so we don't
-	    **  get CRLF instead of LF (or CR) for newlines in text
-	    **  files.  Can't do this for VM/CMS or we'll get
-	    **  raw EBCDIC.  - FM
+	    **	Force binary if we're in source, download or dump
+	    **	mode and this is not a VM/CMS server, so we don't
+	    **	get CRLF instead of LF (or CR) for newlines in text
+	    **	files.	Can't do this for VM/CMS or we'll get
+	    **	raw EBCDIC.  - FM
 	    */
 	    (format_out == WWW_SOURCE ||
-    	     format_out == HTAtom_for("www/download") ||
+	     format_out == HTAtom_for("www/download") ||
 	     format_out == HTAtom_for("www/dump")) &&
 	    (server_type != CMS_SERVER))
 	    binary = TRUE;
 	if (!binary && type && *type == 'I') {
 	    /*
-	    **  Force binary if we had ;type=I - FM
+	    **	Force binary if we had ;type=I - FM
 	    */
 	    binary = TRUE;
 	} else if (binary && type && *type == 'A') {
 	    /*
-	    **  Force ASCII if we had ;type=A - FM
+	    **	Force ASCII if we had ;type=A - FM
 	    */
 	    binary = FALSE;
 	}
-        if (binary != control->binary) {
+	if (binary != control->binary) {
 	    /*
-	    **  Act on our setting if not alread set. - FM
+	    **	Act on our setting if not alread set. - FM
 	    */
 	    char * mode = binary ? "I" : "A";
 	    sprintf(command, "TYPE %s%c%c", mode, CR, LF);
 	    status = response(command);
 	    if (status != 2) {
 		init_help_message_cache();  /* to free memory */
-	        return ((status < 0) ? status : -status);
+		return ((status < 0) ? status : -status);
 	    }
 	    control->binary = binary;
 	}
@@ -2942,7 +2944,7 @@ PUBLIC int HTFTPLoad ARGS4(
 	    BOOL included_device = FALSE;
 	    /** Accept only Unix-style filename **/
 	    if (strchr(filename, ':') != NULL ||
-	        strchr(filename, '[') != NULL) {
+		strchr(filename, '[') != NULL) {
 		FREE(fname);
 		init_help_message_cache();  /* to free memory */
 		NETCLOSE(control->socket);
@@ -2955,7 +2957,7 @@ PUBLIC int HTFTPLoad ARGS4(
 	    }
 	    /** Handle any unescaped "/%2F" path **/
 	    if (!strncmp(filename, "//", 2)) {
-	        int i;
+		int i;
 		included_device = TRUE;
 		for (i = 0; filename[(i+1)]; i++)
 		    filename[i] = filename[(i+1)];
@@ -2970,21 +2972,21 @@ PUBLIC int HTFTPLoad ARGS4(
 		if ((cp1=strrchr(cp, ']')) != NULL) {
 		    cp1++;
 		    for (i = 0; cp1[i]; i++)
-		        filename[i] = cp1[i];
+			filename[i] = cp1[i];
 		    filename[i] = '\0';
 		    if (TRACE) {
-		        fprintf(stderr, "HTFTP: Filename '%s'\n", filename);
+			fprintf(stderr, "HTFTP: Filename '%s'\n", filename);
 		    }
 		    *cp1 = '\0';
 		    sprintf(command, "CWD %s%c%c", cp, CR, LF);
 		    status = response (command);
 		    if (status != 2) {
-		        if ((cp1=strchr(cp, '[')) != NULL) {
+			if ((cp1=strchr(cp, '[')) != NULL) {
 			    *cp1++ = '\0';
 			    sprintf(command, "CWD %s%c%c", cp, CR, LF);
 			    status = response (command);
 			    if (status != 2) {
-			        FREE(fname);
+				FREE(fname);
 				init_help_message_cache(); /* to free memory */
 				NETCLOSE(control->socket);
 				control->socket = -1;
@@ -2993,15 +2995,15 @@ PUBLIC int HTFTPLoad ARGS4(
 			    sprintf(command, "CWD [.%s%c%c", cp1, CR, LF);
 			    status = response (command);
 			    if (status != 2) {
-			        FREE(fname);
+				FREE(fname);
 				init_help_message_cache(); /* to free memory */
 				NETCLOSE(control->socket);
 				control->socket = -1;
 				return ((status < 0) ? status : -status);
 			    }
 			} else {
-		            FREE(fname);
-			    init_help_message_cache();  /* to free memory */
+			    FREE(fname);
+			    init_help_message_cache();	/* to free memory */
 			    NETCLOSE(control->socket);
 			    control->socket = -1;
 			    return ((status < 0) ? status : -status);
@@ -3018,7 +3020,7 @@ PUBLIC int HTFTPLoad ARGS4(
 			if (TRACE) {
 			    fprintf(stderr, "HTFTP: Filename '%s'\n", filename);
 			}
-		        *cp1 = '\0';
+			*cp1 = '\0';
 			strcat(cp, "[");
 			strcat(cp, filename);
 			strcat(cp, "]");
@@ -3030,15 +3032,15 @@ PUBLIC int HTFTPLoad ARGS4(
 			    sprintf(command, "CWD %s%c%c", cp, CR, LF);
 			    status = response (command);
 			    if (status != 2) {
-			        *cp1 = '\0';
+				*cp1 = '\0';
 				sprintf(command, "CWD %s%c%c", cp, CR, LF);
 				status = response (command);
 				if (status != 2) {
-			            FREE(fname);
+				    FREE(fname);
 				    init_help_message_cache();
 				    NETCLOSE(control->socket);
 				    control->socket = -1;
-			            return ((status < 0) ? status : -status);
+				    return ((status < 0) ? status : -status);
 				}
 			    }
 			} else {
@@ -3055,7 +3057,7 @@ PUBLIC int HTFTPLoad ARGS4(
 			status = response (command);
 			if (status != 2) {
 			    FREE(fname);
-			    init_help_message_cache();  /* to free memory */
+			    init_help_message_cache();	/* to free memory */
 			    NETCLOSE(control->socket);
 			    control->socket = -1;
 			    return ((status < 0) ? status : -status);
@@ -3067,35 +3069,35 @@ PUBLIC int HTFTPLoad ARGS4(
 	    }
 	    /** Trim trailing slash if filename is not the top directory **/
 	    if (strlen(filename) > 1 && filename[strlen(filename)-1] == '/')
-	        filename[strlen(filename)-1] = '\0';
+		filename[strlen(filename)-1] = '\0';
 
 #ifdef MAINTAIN_CONNECTION /* Don't need this if always new connection - F.M. */
 	    if (!included_device) {
-	        /** Get the current default VMS device:[directory] **/
-	        sprintf(command, "PWD%c%c", CR, LF);
-	        status = response (command);
-	        if (status != 2) {
-	            FREE(fname);
-		    init_help_message_cache();  /* to free memory */
+		/** Get the current default VMS device:[directory] **/
+		sprintf(command, "PWD%c%c", CR, LF);
+		status = response (command);
+		if (status != 2) {
+		    FREE(fname);
+		    init_help_message_cache();	/* to free memory */
 		    NETCLOSE(control->socket);
 		    control->socket = -1;
 		    return ((status < 0) ? status : -status);
-	        }
-	        /** Go to the VMS account's top directory **/
-	        if ((cp=strchr(response_text, '[')) != NULL &&
-	            (cp1=strrchr(response_text, ']')) != NULL) {
+		}
+		/** Go to the VMS account's top directory **/
+		if ((cp=strchr(response_text, '[')) != NULL &&
+		    (cp1=strrchr(response_text, ']')) != NULL) {
 		    sprintf(command, "CWD %s", cp);
 		    if ((cp2=strchr(cp, '.')) != NULL && cp2 < cp1)
-		        sprintf(command+(cp2-cp)+4, "]%c%c", CR, LF);
+			sprintf(command+(cp2-cp)+4, "]%c%c", CR, LF);
 		    else
-		        sprintf(command+(cp1-cp)+4, "]%c%c", CR, LF);
+			sprintf(command+(cp1-cp)+4, "]%c%c", CR, LF);
 		    status = response (command);
 		    if (status != 2) {
-		        FREE(fname);
+			FREE(fname);
 			init_help_message_cache();  /* to free memory */
 			NETCLOSE(control->socket);
 			control->socket = -1;
-		        return ((status < 0) ? status : -status);
+			return ((status < 0) ? status : -status);
 		    }
 		}
 	    }
@@ -3103,15 +3105,15 @@ PUBLIC int HTFTPLoad ARGS4(
 
 	    /** If we want the VMS account's top directory, list it now **/
 	    if (!(strcmp(filename, "/~")) ||
-	        (included_device && 0==strcmp(filename, "000000")) ||
-	        (strlen(filename) == 1 && *filename == '/')) {
+		(included_device && 0==strcmp(filename, "000000")) ||
+		(strlen(filename) == 1 && *filename == '/')) {
 		isDirectory = YES;
 		sprintf(command, "LIST%c%c", CR, LF);
 		status = response (command);
 		FREE(fname);
 		if (status != 1) {
 		    /* Action not started */
-		    init_help_message_cache();  /* to free memory */
+		    init_help_message_cache();	/* to free memory */
 		    NETCLOSE(control->socket);
 		    control->socket = -1;
 		    return ((status < 0) ? status : -status);
@@ -3121,10 +3123,10 @@ PUBLIC int HTFTPLoad ARGS4(
 	    }
 	    /** Otherwise, go to appropriate directory and doctor filename **/
 	    if (!strncmp(filename, "/~", 2))
-	        filename += 2;
+		filename += 2;
 	    if (!included_device &&
-	        (cp = strchr(filename, '/')) != NULL &&
-	        (cp1 = strrchr(cp, '/')) != NULL && cp != cp1) {
+		(cp = strchr(filename, '/')) != NULL &&
+		(cp1 = strrchr(cp, '/')) != NULL && cp != cp1) {
 		sprintf(command, "CWD [.%s", cp+1);
 		sprintf(command+(cp1-cp)+5, "]%c%c", CR, LF);
 		while ((cp2 = strrchr(command, '/')) != NULL)
@@ -3132,15 +3134,15 @@ PUBLIC int HTFTPLoad ARGS4(
 		status = response(command);
 		if (status != 2) {
 		    FREE(fname);
-		    init_help_message_cache();  /* to free memory */
+		    init_help_message_cache();	/* to free memory */
 		    NETCLOSE(control->socket);
 		    control->socket = -1;
 		    return ((status < 0) ? status : -status);
 		}
 		filename = cp1+1;
 	    } else {
-	        if (!included_device) {
-	            filename += 1;
+		if (!included_device) {
+		    filename += 1;
 		}
 	    }
 	    break;
@@ -3148,12 +3150,12 @@ PUBLIC int HTFTPLoad ARGS4(
 	case CMS_SERVER:
 	  {
 	    /*
-	    **  If we want the CMS account's top directory, or a base
-	    **  SFS or anonymous directory path (i.e., without a slash),
-	    **  list it now. FM
+	    **	If we want the CMS account's top directory, or a base
+	    **	SFS or anonymous directory path (i.e., without a slash),
+	    **	list it now. FM
 	    */
 	    if ((strlen(filename) == 1 && *filename == '/') ||
-	        ((0 == strncasecomp((filename+1), "vmsysu:", 7)) &&
+		((0 == strncasecomp((filename+1), "vmsysu:", 7)) &&
 		 (cp = strchr((filename+1), '.')) != NULL &&
 		 strchr(cp, '/') == NULL) ||
 		(0 == strncasecomp(filename+1, "anonymou.", 9) &&
@@ -3162,7 +3164,7 @@ PUBLIC int HTFTPLoad ARGS4(
 		    sprintf(command, "CWD %s%c%c", (filename+1), CR, LF);
 		    status = response(command);
 		    if (status != 2) {
-		        /* Action not started */
+			/* Action not started */
 			init_help_message_cache();  /* to free memory */
 			NETCLOSE(control->socket);
 			control->socket = -1;
@@ -3178,7 +3180,7 @@ PUBLIC int HTFTPLoad ARGS4(
 		FREE(fname);
 		if (status != 1) {
 		    /* Action not started */
-		    init_help_message_cache();  /* to free memory */
+		    init_help_message_cache();	/* to free memory */
 		    NETCLOSE(control->socket);
 		    control->socket = -1;
 		    return ((status < 0) ? status : -status);
@@ -3190,7 +3192,7 @@ PUBLIC int HTFTPLoad ARGS4(
 
 	    /** Otherwise, go to appropriate directory and adjust filename **/
 	    while ((cp = strchr(filename, '/')) != NULL) {
-	        *cp++ = '\0';
+		*cp++ = '\0';
 		sprintf(command, "CWD %s%c%c", filename, CR, LF);
 		status = response(command);
 		if (status == 2) {
@@ -3204,7 +3206,7 @@ PUBLIC int HTFTPLoad ARGS4(
 			FREE(fname);
 			if (status != 1) {
 			    /** Action not started **/
-			    init_help_message_cache();  /* to free memory */
+			    init_help_message_cache();	/* to free memory */
 			    NETCLOSE(control->socket);
 			    control->socket = -1;
 			    return ((status < 0) ? status : -status);
@@ -3222,7 +3224,7 @@ PUBLIC int HTFTPLoad ARGS4(
 	default:
 	    /** Shift for any unescaped "/%2F" path **/
 	    if (!strncmp(filename, "//", 2))
-	        filename++;
+		filename++;
 	    break;
 	}
 	/*
@@ -3233,34 +3235,34 @@ PUBLIC int HTFTPLoad ARGS4(
 	    sprintf(command, "RETR %s%c%c", filename, CR, LF);
 	    status = response(command);
 	} else {
-	    status = 5;		/* Failed status set as flag. - FM */
+	    status = 5; 	/* Failed status set as flag. - FM */
 	}
 	if (status != 1) {	/* Failed : try to CWD to it */
 	    /** Clear any login messages if this isn't the login directory **/
 	    if (strcmp(filename, "/"))
-	        init_help_message_cache();
+		init_help_message_cache();
 
 	    sprintf(command, "CWD %s%c%c", filename, CR, LF);
 	    status = response(command);
 
-	    if (status == 2) {  /* Successed : let's NAME LIST it */
-	        isDirectory = YES;
+	    if (status == 2) {	/* Successed : let's NAME LIST it */
+		isDirectory = YES;
 	    if (use_list)
-	        sprintf(command, "LIST%c%c", CR, LF);
+		sprintf(command, "LIST%c%c", CR, LF);
 	    else
-	        sprintf(command, "NLST%c%c", CR, LF);
+		sprintf(command, "NLST%c%c", CR, LF);
 	    status = response (command);
 	    }
 	}
 	FREE(fname);
 	if (status != 1) {
-	    init_help_message_cache();  /* to free memory */
+	    init_help_message_cache();	/* to free memory */
 	    NETCLOSE(control->socket);
 	    control->socket = -1;
 	    if (status < 0)
-	        return status;
+		return status;
 	    else
-	        return -status;
+		return -status;
 	}
     }
 
@@ -3270,7 +3272,7 @@ listen:
 */
     {
 	struct sockaddr_in soc_address;
-        int	soc_addrlen=sizeof(soc_address);
+	int	soc_addrlen=sizeof(soc_address);
 #ifdef SOCKS
 	if (socks_flag)
 	    status = Raccept(master_socket,
@@ -3282,7 +3284,7 @@ listen:
 			(struct sockaddr *)&soc_address,
 			(void *)&soc_addrlen);
 	if (status < 0) {
-	    init_help_message_cache();  /* to free memory */
+	    init_help_message_cache();	/* to free memory */
 	    return HTInetStatus("accept");
 	}
 	CTRACE(tfp, "TCP: Accepted new socket %d\n", status);
@@ -3292,15 +3294,15 @@ listen:
 /* @@ */
 #endif /* LISTEN */
     if (isDirectory) {
-        status = read_directory (anchor, name, format_out, sink);
-        NETCLOSE(data_soc);
+	status = read_directory (anchor, name, format_out, sink);
+	NETCLOSE(data_soc);
 	NETCLOSE(control->socket);
 	control->socket = -1;
 	init_help_message_cache();  /* to free memory */
-        return status;
+	return status;
       /* returns HT_LOADED or error */
     } else {
-        int rv;
+	int rv;
 	int len;
 	char *FileName = HTParse(name, "", PARSE_PATH + PARSE_PUNCTUATION);
 
@@ -3311,9 +3313,9 @@ listen:
 	HTUnEscape(FileName);
 	if (!IsUnityEnc(encoding)) {
 	    /*
-	     *  We already know from the call to HTFileFormat above that
-	     *  this is a compressed file, no need to look at the filename
-	     *  again. - kw
+	     *	We already know from the call to HTFileFormat above that
+	     *	this is a compressed file, no need to look at the filename
+	     *	again. - kw
 	     */
 	    StrAllocCopy(anchor->content_type, format->name);
 	    StrAllocCopy(anchor->content_encoding, HTAtom_name(encoding));
@@ -3321,7 +3323,7 @@ listen:
 
 	} else if ((len = strlen(FileName)) > 2) {
 	    if ((FileName[len - 1] == 'Z') &&
-	        (FileName[len - 2] == '.' ||
+		(FileName[len - 2] == '.' ||
 		 FileName[len - 2] == '-' ||
 		 FileName[len - 2] == '_')) {
 
@@ -3332,7 +3334,7 @@ listen:
 		StrAllocCopy(anchor->content_encoding, "x-compress");
 		format = HTAtom_for("www/compressed");
 	    } else if ((len > 3) &&
-	    	       !strcasecomp((char *)&FileName[len - 2], "gz")) {
+		       !strcasecomp((char *)&FileName[len - 2], "gz")) {
 		if (FileName[len - 3] == '.' ||
 		    FileName[len - 3] == '-' ||
 		    FileName[len - 3] == '_') {
@@ -3367,7 +3369,7 @@ listen:
 	    status = response(NIL);		/* Pick up final reply */
 	    if (status != 2 && rv != HT_INTERRUPTED && rv != -1) {
 		init_help_message_cache();  /* to free memory */
-	        return HTLoadError(sink, 500, response_text);
+		return HTLoadError(sink, 500, response_text);
 	    }
 	}
 
@@ -3385,15 +3387,15 @@ listen:
 PUBLIC void HTClearFTPPassword NOARGS
 {
     /*
-    **  Need code to check cached documents from
-    **  non-anonymous ftp accounts and do something
-    **  to ensure that they no longer can be accessed
-    **  without a new retrieval. - FM
+    **	Need code to check cached documents from
+    **	non-anonymous ftp accounts and do something
+    **	to ensure that they no longer can be accessed
+    **	without a new retrieval. - FM
     */
 
     /*
-    **  Now free the current user entered password,
-    **  if any. - FM
+    **	Now free the current user entered password,
+    **	if any. - FM
     */
     FREE(user_entered_password);
 }