about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/GridText.c1366
-rw-r--r--src/HTInit.c288
-rw-r--r--src/HTML.c167
-rw-r--r--src/LYCgi.c8
-rw-r--r--src/LYCharSets.c2247
-rw-r--r--src/LYCharSets.h18
-rw-r--r--src/LYCharUtils.c75
-rw-r--r--src/LYClean.c1
-rw-r--r--src/LYCurses.c17
-rw-r--r--src/LYCurses.h6
-rw-r--r--src/LYForms.c24
-rw-r--r--src/LYGetFile.c2
-rw-r--r--src/LYGlobalDefs.h2
-rw-r--r--src/LYLocal.c4
-rw-r--r--src/LYLocal.h4
-rw-r--r--src/LYMain.c419
-rw-r--r--src/LYMainLoop.c3
-rw-r--r--src/LYMap.h1
-rw-r--r--src/LYPrint.c1
-rw-r--r--src/LYStrings.c4
-rw-r--r--src/LYUtils.c18
-rw-r--r--src/UCAuto.c23
-rw-r--r--src/UCAux.c79
-rw-r--r--src/UCdomap.c1153
-rw-r--r--src/chrtrans/cp1250_uni.tbl4
-rw-r--r--src/chrtrans/cp1251_uni.tbl2
-rw-r--r--src/chrtrans/cp1252_uni.tbl4
-rw-r--r--src/chrtrans/cp1253_uni.tbl2
-rw-r--r--src/chrtrans/cp1255_uni.tbl2
-rw-r--r--src/chrtrans/cp1256_uni.tbl2
-rw-r--r--src/chrtrans/cp1257_uni.tbl2
-rw-r--r--src/chrtrans/cp437_uni.tbl6
-rw-r--r--src/chrtrans/cp850_uni.tbl2
-rw-r--r--src/chrtrans/cp852_uni.tbl2
-rw-r--r--src/chrtrans/def7_uni.tbl119
-rw-r--r--src/chrtrans/next_uni.tbl2
-rw-r--r--src/chrtrans/rfc_suni.tbl4
-rw-r--r--src/chrtrans/utf8_uni.tbl5
38 files changed, 2990 insertions, 3098 deletions
diff --git a/src/GridText.c b/src/GridText.c
index 2b8fa027..b7080263 100644
--- a/src/GridText.c
+++ b/src/GridText.c
@@ -12,6 +12,8 @@
 #include "HTTP.h"
 #include "HTAlert.h"
 #include "HTCJK.h"
+#include "UCDefs.h"
+#include "UCAux.h"
 
 #include <assert.h>
 #include <ctype.h>
@@ -33,8 +35,6 @@
 #include "LYList.h"
 #include "LYCharSets.h"
 #include "LYCharUtils.h"	/* LYUCTranslateBack... */
-#include "UCDefs.h"
-#include "UCAux.h"
 #include "UCMap.h"
 #ifdef EXP_CHARTRANS_AUTOSWITCH
 #include "UCAuto.h"
@@ -82,10 +82,8 @@ extern HTCJKlang HTCJK;
 */
 extern HTStyleSheet * styleSheet;	/* Default or overridden */
 
-extern int display_lines; /* number of lines in display */
-
 /*	Exports
-*/ 
+*/
 PUBLIC HText * HTMainText = NULL;		/* Equivalent of main window */
 PUBLIC HTParentAnchor * HTMainAnchor = NULL;	/* Anchor for HTMainText */
 
@@ -112,10 +110,10 @@ PUBLIC BOOLEAN bold_on      = OFF;
 #define MAX_STYLES_ON_LINE 64
 
 typedef struct _stylechange {
-        int     horizpos;       /* horizontal position of this change */
-        int     style;          /* which style to change to */
-        int     direction;      /* on or off */
-        int     previous;       /* previous style */
+	int	horizpos;	/* horizontal position of this change */
+	int	style;		/* which style to change to */
+	int	direction;	/* on or off */
+	int	previous;	/* previous style */
 } HTStyleChange;
 #endif
 
@@ -176,12 +174,12 @@ struct _HText {
 	BOOL			toolbar;	/* Toolbar set? */
 	HTList *		tabs;		/* TAB IDs */
 	HTList *		hidden_links;	/* Content-less links ... */
-        int			hiddenlinkflag;	/*  ... and how to treat them */
+	int			hiddenlinkflag; /*  ... and how to treat them */
 	BOOL			no_cache;	/* Always refresh? */
-	char			LastChar;	/* For aborbing white space */
+	char			LastChar;	/* For absorbing white space */
 	BOOL			IgnoreExcess;	/* Ignore chars at wrap point */
 
-/* For Internal use: */	
+/* For Internal use: */
 	HTStyle *		style;			/* Current style */
 	int			display_on_the_fly;	/* Lines left */
 	int			top_of_screen;		/* Line number */
@@ -199,15 +197,15 @@ struct _HText {
 				state;			/* Escape sequence? */
 	char			kanji_buf;		/* Lead multibyte */
 	int			in_sjis;		/* SJIS flag */
-        int			halted;			/* emergency halt */
+	int			halted; 		/* emergency halt */
 
 	BOOL			have_8bit_chars;   /* Any non-ASCII chars? */
 	LYUCcharset *		UCI;		   /* node_anchor UCInfo */
 	int			UCLYhndl;	   /* charset we are fed */
 	UCTransParams		T;
 
-        HTStream *		target;                 /* Output stream */
-        HTStreamClass		targetClass;            /* Output routines */
+	HTStream *		target; 		/* Output stream */
+	HTStreamClass		targetClass;		/* Output routines */
 };
 
 PRIVATE void HText_AddHiddenLink PARAMS((HText *text, TextAnchor *textanchor));
@@ -231,8 +229,8 @@ PRIVATE int ctrl_chars_on_this_line = 0; /* num of ctrl chars in current line */
 PRIVATE HTStyle default_style =
 	{ 0,  "(Unstyled)", "",
 	(HTFont)0, 1, HT_BLACK,		0, 0,
-	0, 0, 0, HT_LEFT,		1, 0,	0, 
-	NO, NO, 0, 0,			0 };	
+	0, 0, 0, HT_LEFT,		1, 0,	0,
+	NO, NO, 0, 0,			0 };
 
 
 
@@ -320,17 +318,17 @@ PRIVATE void * LY_check_calloc ARGS2(
 	    t = NULL;		/* shouldn't happen */
 	if (TRACE) {
 	    fprintf(stderr,
-		    "\r *** Emergeny freeing document %d/%d for '%s'%s!\n",
+		    "\r *** Emergency freeing document %d/%d for '%s'%s!\n",
 		    i + 1, n,
 		    ((t && t->node_anchor &&
 		      t->node_anchor->address) ?
 		     t->node_anchor->address : "unknown anchor"),
 		    ((t && t->node_anchor &&
-		      t->node_anchor->post_data) ?	
+		      t->node_anchor->post_data) ?
 		     " with POST data" : ""));
 	}
 	HTList_removeObjectAt(loaded_texts, i);
-        HText_free(t);
+	HText_free(t);
 	if (mem_is_avail(4, nmemb * size)) {
 	    return (calloc(nmemb, size));
 	}
@@ -410,12 +408,12 @@ PUBLIC HText *	HText_new ARGS1(
     HTLine * line = NULL;
     HText * self = (HText *) calloc(1, sizeof(*self));
     if (!self)
-        return self;
-    
+	return self;
+
 #if defined(VMS) && defined (VAXC) && !defined(__DECC)
     status = lib$stat_vm(&VMType, &VMTotal);
     if (TRACE)
-        fprintf(stderr, "GritText: VMTotal = %d\n", VMTotal);
+	fprintf(stderr, "GridText: VMTotal = %d\n", VMTotal);
 #endif /* VMS && VAXC && !__DECC */
 
     if (!loaded_texts)	{
@@ -427,13 +425,13 @@ PUBLIC HText *	HText_new ARGS1(
      *  Links between anchors & documents are a 1-1 relationship. If
      *  an anchor is already linked to a document we didn't call
      *  HTuncache_current_document(), e.g., for the showinfo, options,
-     *  dowload, print, etc., temporary file URLs, so we'll check now
+     *  download, print, etc., temporary file URLs, so we'll check now
      *  and free it before reloading. - Dick Wesseling (ftu@fi.ruu.nl)
      */
     if (anchor->document) {
        HTList_removeObject(loaded_texts, anchor->document);
        if (TRACE)
-           fprintf(stderr, "GridText: Auto-uncaching\n") ;
+	   fprintf(stderr, "GridText: Auto-uncaching\n") ;
        ((HText *)anchor->document)->node_anchor = NULL;
        HText_free((HText *)anchor->document);
        anchor->document = NULL;
@@ -442,23 +440,23 @@ PUBLIC HText *	HText_new ARGS1(
     HTList_addObject(loaded_texts, self);
 #if defined(VMS) && defined(VAXC) && !defined(__DECC)
     while (HTList_count(loaded_texts) > HTCacheSize &&
-    	   VMTotal > HTVirtualMemorySize) {
+	   VMTotal > HTVirtualMemorySize) {
 #else
     if (HTList_count(loaded_texts) > HTCacheSize) {
 #endif /* VMS && VAXC && !__DECC */
-        if (TRACE)
-	    fprintf(stderr, "GridText: Freeing off cached doc.\n"); 
-        HText_free((HText *)HTList_removeFirstObject(loaded_texts));
+	if (TRACE)
+	    fprintf(stderr, "GridText: Freeing off cached doc.\n");
+	HText_free((HText *)HTList_removeFirstObject(loaded_texts));
 #if defined(VMS) && defined (VAXC) && !defined(__DECC)
-        status = lib$stat_vm(&VMType, &VMTotal);
-        if (TRACE)
-            fprintf(stderr, "GridText: VMTotal reduced to %d\n", VMTotal);
+	status = lib$stat_vm(&VMType, &VMTotal);
+	if (TRACE)
+	    fprintf(stderr, "GridText: VMTotal reduced to %d\n", VMTotal);
 #endif /* VMS && VAXC && !__DECC */
     }
-    
+
     line = self->last_line = (HTLine *)calloc(1, LINE_SIZE(MAX_LINE));
     if (line == NULL)
-        outofmem(__FILE__, "HText_New");
+	outofmem(__FILE__, "HText_New");
     line->next = line->prev = line;
     line->offset = line->size = 0;
 #ifdef USE_COLOR_STYLE
@@ -484,14 +482,14 @@ PUBLIC HText *	HText_new ARGS1(
 	self->hiddenlinkflag = LYHiddenLinks;
     self->hidden_links = NULL;
     self->no_cache = ((anchor->no_cache || anchor->post_data) ?
-    							  YES : NO);
+							  YES : NO);
     self->LastChar = '\0';
     self->IgnoreExcess = FALSE;
 
     if (HTOutputFormat == WWW_SOURCE)
-        self->source = YES;
+	self->source = YES;
     else
-        self->source = NO;
+	self->source = NO;
     HTAnchor_setDocument(anchor, (HyperDoc *)self);
     HTFormNumber = 0;  /* no forms started yet */
     HTMainText = self;
@@ -512,7 +510,7 @@ PUBLIC HText *	HText_new ARGS1(
      *  Check the kcode setting if the anchor has a charset element. - FM
      */
     if (anchor->charset)
-        HText_setKcode(self, anchor->charset,
+	HText_setKcode(self, anchor->charset,
 		       HTAnchor_getUCInfoStage(anchor, UCT_STAGE_HTEXT));
 
     /*
@@ -520,25 +518,25 @@ PUBLIC HText *	HText_new ARGS1(
      *  05-29-94 Lynx 2-3-1 Garrett Arch Blythe
      *	Check to see if our underline and star_string need initialization
      *		if the underline is not filled with dots.
-     */ 
+     */
     if (underscore_string[0] != '.') {
 	/*
 	 *  Create an array of dots for the UNDERSCORES macro. - FM
 	 */
 	memset(underscore_string, '.', (MAX_LINE-1));
-        underscore_string[(MAX_LINE-1)] = '\0';
-        underscore_string[MAX_LINE] = '\0';
+	underscore_string[(MAX_LINE-1)] = '\0';
+	underscore_string[MAX_LINE] = '\0';
 	/*
 	 *  Create an array of underscores for the STARS macro. - FM
 	 */
 	memset(star_string, '_', (MAX_LINE-1));
-        star_string[(MAX_LINE-1)] = '\0';
-        star_string[MAX_LINE] = '\0';
+	star_string[(MAX_LINE-1)] = '\0';
+	star_string[MAX_LINE] = '\0';
     }
 
     underline_on = FALSE; /* reset */
     bold_on = FALSE;
-    
+
     return self;
 }
 
@@ -555,8 +553,8 @@ PUBLIC HText *  HText_new2 ARGS2(
     HText * this = HText_new(anchor);
 
     if (stream) {
-        this->target = stream;
-        this->targetClass = *stream->isa;       /* copy action procedures */
+	this->target = stream;
+	this->targetClass = *stream->isa;	/* copy action procedures */
     }
     return this;
 }
@@ -568,12 +566,12 @@ PUBLIC void HText_free ARGS1(
 	HText *,	self)
 {
     if (!self)
-        return;
+	return;
 
     HTAnchor_setDocument(self->node_anchor, (HyperDoc *)0);
-    
+
     while (YES) {	/* Free off line array */
-        HTLine * l = self->last_line;
+	HTLine * l = self->last_line;
 	if (l) {
 	    l->next->prev = l->prev;
 	    l->prev->next = l->next;	/* Unlink l */
@@ -589,9 +587,9 @@ PUBLIC void HText_free ARGS1(
 	    break;
 	}
     };
-    
+
     while (self->first_anchor) {		/* Free off anchor array */
-        TextAnchor * l = self->first_anchor;
+	TextAnchor * l = self->first_anchor;
 	self->first_anchor = l->next;
 
 	if (l->link_type == INPUT_ANCHOR && l->input_field) {
@@ -617,8 +615,8 @@ PUBLIC void HText_free ARGS1(
 		    FREE(tmp);
 		}
 		l->input_field->select_list = NULL;
-		/* 
-		 *  Don't free the value field on sane option
+		/*
+		 *  Don't free the value field on option
 		 *  lists since it points to a option value
 		 *  same for orig value.
 		 */
@@ -627,18 +625,18 @@ PUBLIC void HText_free ARGS1(
 		l->input_field->cp_submit_value = NULL;
 		l->input_field->orig_submit_value = NULL;
 	    } else {
-                FREE(l->input_field->value);
-                FREE(l->input_field->orig_value);
-                FREE(l->input_field->cp_submit_value);
-                FREE(l->input_field->orig_submit_value);
+		FREE(l->input_field->value);
+		FREE(l->input_field->orig_value);
+		FREE(l->input_field->cp_submit_value);
+		FREE(l->input_field->orig_submit_value);
 	    }
 	    FREE(l->input_field->name);
-            FREE(l->input_field->submit_action);
-            FREE(l->input_field->submit_enctype);
-            FREE(l->input_field->submit_title);
+	    FREE(l->input_field->submit_action);
+	    FREE(l->input_field->submit_enctype);
+	    FREE(l->input_field->submit_title);
+
+	    FREE(l->input_field->accept_cs);
 
-            FREE(l->input_field->accept_cs);
-		
 	    FREE(l->input_field);
 	}
 
@@ -653,7 +651,7 @@ PUBLIC void HText_free ARGS1(
      *  Free the tabs list. - FM
      */
     if (self->tabs) {
-        HTTabID * Tab = NULL;
+	HTTabID * Tab = NULL;
 	HTList * cur = self->tabs;
 
 	while (NULL != (Tab = (HTTabID *)HTList_nextObject(cur))) {
@@ -668,7 +666,7 @@ PUBLIC void HText_free ARGS1(
      *  Free the hidden links list. - FM
      */
     if (self->hidden_links) {
-        char * href = NULL;
+	char * href = NULL;
 	HTList * cur = self->hidden_links;
 
 	while (NULL != (href = (char *)HTList_nextObject(cur)))
@@ -686,7 +684,7 @@ PUBLIC void HText_free ARGS1(
 				  UCT_SETBY_NONE);
 	HTAnchor_resetUCInfoStage(self->node_anchor, -1, UCT_STAGE_HTEXT,
 				  UCT_SETBY_NONE);
-        if (HTAnchor_delete(self->node_anchor))
+	if (HTAnchor_delete(self->node_anchor))
 	    /*
 	     *  Make sure HTMainAnchor won't point
 	     *  to an invalid structure. - KW
@@ -732,7 +730,7 @@ PRIVATE int display_line ARGS2(
      */
     j = (int)line->offset;
     if (j > (int)LYcols - 1)
-        j = (int)LYcols - 1;
+	j = (int)LYcols - 1;
 #ifdef USE_SLANG
     SLsmg_forward (j);
     i = j;
@@ -743,7 +741,7 @@ PRIVATE int display_line ARGS2(
     else
 #endif
     for (i = 0; i < j; i++)
-        addch (' ');
+	addch (' ');
 #endif /* USE_SLANG */
 
     /*
@@ -765,7 +763,7 @@ PRIVATE int display_line ARGS2(
 		current_style++;
 	}
 #endif
-   	switch (buffer[0]) {
+	switch (buffer[0]) {
 
 #ifndef USE_COLOR_STYLE
 	    case LY_UNDERLINE_START_CHAR:
@@ -914,10 +912,10 @@ PRIVATE void display_title ARGS1(
      *  Make sure we have a text structure. - FM
      */
     if (!text)
-        return;
+	return;
 
     lynx_start_title_color ();
-#ifdef USE_COLOR_STYLE 
+#ifdef USE_COLOR_STYLE
 /* turn the TITLE style on */
     LynxChangeStyle(s_title, ABS_ON, 0);
 #endif /* USE_COLOR_STYLE */
@@ -926,7 +924,7 @@ PRIVATE void display_title ARGS1(
      *  Load the title field. - FM
      */
     StrAllocCopy(title,
-    		 (HTAnchor_title(text->node_anchor) ?
+		 (HTAnchor_title(text->node_anchor) ?
 		  HTAnchor_title(text->node_anchor) : ""));
 
     /*
@@ -952,10 +950,10 @@ PRIVATE void display_title ARGS1(
 	 *    FM 02-08-95
 	 */
 	int total_pages =
-	 	(((text->Lines + 1) + (display_lines - 1))/(display_lines));
+		(((text->Lines + 1) + (display_lines - 1))/(display_lines));
 	int start_of_last_page =
 		((text->Lines + 1) < display_lines) ? 0 :
-		((text->Lines + 1) - display_lines);	
+		((text->Lines + 1) - display_lines);
 
 	sprintf(percent, " (p%d of %d)",
 		((text->top_of_screen >= start_of_last_page) ?
@@ -967,12 +965,12 @@ PRIVATE void display_title ARGS1(
     }
 
     /*
-     *  Generate and display the title string, with page indictator
+     *  Generate and display the title string, with page indicator
      *  if appropriate, preceded by the toolbar token if appropriate,
      *  and truncated if necessary. - FM & KW
      */
     if (HTCJK != NOCJK) {
-        if (*title &&
+	if (*title &&
 	    (tmp = (unsigned char *)calloc(1, (strlen(title) + 1)))) {
 	    if (kanji_code == EUC) {
 	        TO_EUC((unsigned char *)title, tmp);
@@ -988,7 +986,7 @@ PRIVATE void display_title ARGS1(
 	    }
 	    FREE(title);
 	    title = (char *)tmp;
-        }
+	}
     }
     move(0, 0);
     clrtoeol();
@@ -999,7 +997,7 @@ PRIVATE void display_title ARGS1(
     if (i > 0) {
 	move(0, i);
     } else {
-        /*
+	/*
 	 *  Note that this truncation is not taking into
 	 *  account the possibility that multibyte
 	 *  characters might be present. - FM
@@ -1009,10 +1007,10 @@ PRIVATE void display_title ARGS1(
     }
     addstr(title);
     if (percent[0] != '\0')
-        addstr(percent);
+	addstr(percent);
     addch('\n');
     FREE(title);
-   
+
 #ifdef USE_COLOR_STYLE
 /* turn the TITLE style off */
     LynxChangeStyle(s_title, ABS_OFF, 0);
@@ -1042,7 +1040,7 @@ PRIVATE void display_page ARGS3(
     static int charset_last_displayed = -1;
 
     lynx_mode = NORMAL_LYNX_MODE;
- 
+
     if (text == NULL) {
 	/*
 	 *  Check whether to force a screen clear to enable scrollback,
@@ -1054,7 +1052,7 @@ PRIVATE void display_page ARGS3(
 	    refresh();
 	    clear();
 	}
-	addstr("\n\nError accessing document.\nNo data available.\n");
+	addstr("\n\nError accessing document.\nNo data available!\n");
 	refresh();
 	nlinks = 0;  /* set number of links to 0 */
 	return;
@@ -1069,15 +1067,15 @@ PRIVATE void display_page ARGS3(
      *  Constrain the line number to be within the document.
      */
     if (text->Lines < (display_lines))
-        line_number = 0;
+	line_number = 0;
     else if (line_number > text->Lines)
-        line_number = last_screen;
+	line_number = last_screen;
     else if (line_number < 0)
-        line_number = 0;
-    
+	line_number = 0;
+
     for (i = 0, line = text->last_line->next;		/* Find line */
-    	 i < line_number && (line != text->last_line);
-         i++, line = line->next) {			/* Loop */
+	 i < line_number && (line != text->last_line);
+	 i++, line = line->next) {			/* Loop */
 #ifndef VMS
 	if (!LYNoCore) {
 	    assert(line->next != NULL);
@@ -1133,7 +1131,7 @@ PRIVATE void display_page ARGS3(
     text->top_of_screen = line_number;
     display_title(text);  /* will move cursor to top of screen */
     display_flag=TRUE;
-    
+
     /*
      *  Output the page.
      */
@@ -1174,20 +1172,12 @@ PRIVATE void display_page ARGS3(
 		   (case_sensitive ?
 		    (cp = LYno_attr_mbcs_strstr(data,
 						target,
-#ifdef EXP_CHARTRANS
 						text->T.output_utf8,
-#else
-						NO,
-#endif /* EXP_CHARTRANS */
 						&HitOffset,
 						&LenNeeded)) != NULL :
 		    (cp = LYno_attr_mbcs_case_strstr(data,
 						     target,
-#ifdef EXP_CHARTRANS
 						text->T.output_utf8,
-#else
-						NO,
-#endif /* EXP_CHARTRANS */
 						&HitOffset,
 						&LenNeeded)) != NULL) &&
 		   ((int)line->offset + LenNeeded) < LYcols) {
@@ -1221,7 +1211,7 @@ PRIVATE void display_page ARGS3(
 			/*
 			 *  First printable character of target.
 			 */
-            		move((i + 1), x_pos);
+			move((i + 1), x_pos);
 			if (text->T.output_utf8 && !isascii(tmp[0])) {
 			    if ((*tmp & 0xe0) == 0xc0) {
 				utf_extra = 1;
@@ -1267,7 +1257,7 @@ PRIVATE void display_page ARGS3(
 			    written++;
 			}
 
-		    } else if (&data[itmp] > cp) { 
+		    } else if (&data[itmp] > cp) {
 			/*
 			 *  Output all the other printable target chars.
 			 */
@@ -1371,16 +1361,16 @@ PRIVATE void display_page ARGS3(
 	    /*
 	     *  Load normal hypertext anchors.
 	     */
-	    if (Anchor_ptr->show_anchor && Anchor_ptr->hightext && 
-			strlen(Anchor_ptr->hightext) > 0 && 
+	    if (Anchor_ptr->show_anchor && Anchor_ptr->hightext &&
+			strlen(Anchor_ptr->hightext) > 0 &&
 			(Anchor_ptr->link_type & HYPERTEXT_ANCHOR)) {
 
-                links[nlinks].hightext  = Anchor_ptr->hightext;
-                links[nlinks].hightext2 = Anchor_ptr->hightext2;
-                links[nlinks].hightext2_offset = Anchor_ptr->hightext2offset;
+		links[nlinks].hightext	= Anchor_ptr->hightext;
+		links[nlinks].hightext2 = Anchor_ptr->hightext2;
+		links[nlinks].hightext2_offset = Anchor_ptr->hightext2offset;
 		links[nlinks].inUnderline = Anchor_ptr->inUnderline;
 
-                links[nlinks].anchor_number = Anchor_ptr->number;
+		links[nlinks].anchor_number = Anchor_ptr->number;
 		links[nlinks].anchor_line_num = Anchor_ptr->line_num;
 
 		link_dest = HTAnchor_followMainLink(
@@ -1430,7 +1420,7 @@ PRIVATE void display_page ARGS3(
 			StrAllocCopy(links[nlinks].lname, empty_string);
 		}
 
-      	        links[nlinks].lx = Anchor_ptr->line_pos;
+		links[nlinks].lx = Anchor_ptr->line_pos;
 		links[nlinks].ly = ((Anchor_ptr->line_num + 1) - line_number);
 		if (link_dest_intl)
 		    links[nlinks].type = WWW_INTERN_LINK_TYPE;
@@ -1451,10 +1441,10 @@ PRIVATE void display_page ARGS3(
 
 		FormInfo_ptr = Anchor_ptr->input_field;
 
-                links[nlinks].anchor_number = Anchor_ptr->number;
+		links[nlinks].anchor_number = Anchor_ptr->number;
 		links[nlinks].anchor_line_num = Anchor_ptr->line_num;
 
-	   	links[nlinks].form = FormInfo_ptr;
+		links[nlinks].form = FormInfo_ptr;
 		links[nlinks].lx = Anchor_ptr->line_pos;
 		links[nlinks].ly = ((Anchor_ptr->line_num + 1) - line_number);
 		links[nlinks].type = WWW_FORM_LINK_TYPE;
@@ -1481,7 +1471,7 @@ PRIVATE void display_page ARGS3(
 		    links[nlinks].hightext = FormInfo_ptr->value;
 		}
 
-  		/*
+		/*
 		 *  Never a second line on form types.
 		 */
 		links[nlinks].hightext2 = NULL;
@@ -1492,7 +1482,7 @@ PRIVATE void display_page ARGS3(
 		 *  Bold the link after incrementing nlinks.
 		 */
 		highlight(OFF, (nlinks - 1), target);
-	
+
 		display_flag = TRUE;
 
 	    } else {
@@ -1500,12 +1490,12 @@ PRIVATE void display_page ARGS3(
 		 *  Not showing anchor.
 		 */
 		if (TRACE &&
-		    Anchor_ptr->hightext && *Anchor_ptr->hightext) 
+		    Anchor_ptr->hightext && *Anchor_ptr->hightext)
 		    fprintf(stderr,
-		    	    "\nGridText: Not showing link, hightext=%s\n",
+			    "\nGridText: Not showing link, hightext=%s\n",
 			    Anchor_ptr->hightext);
 	    }
-	} 
+	}
 
 	if (Anchor_ptr == text->last_anchor)
 	    /*
@@ -1521,7 +1511,7 @@ PRIVATE void display_page ARGS3(
 	    if (LYCursesON) {
 		_statusline(MAXLINKS_REACHED);
 		sleep(AlertSecs);
-	    } 
+	    }
 	    if (TRACE)
 	        fprintf(stderr, "\ndisplay_page: MAXLINKS reached.\n");
 	    break;
@@ -1533,7 +1523,7 @@ PRIVATE void display_page ARGS3(
      *  from the previous page draw. - FM
      */
     for (i = nlinks; i < last_nlinks; i++)
-        FREE(links[i].lname);
+	FREE(links[i].lname);
     last_nlinks = nlinks;
 
     /*
@@ -1543,8 +1533,8 @@ PRIVATE void display_page ARGS3(
      */
     more_links = FALSE;
     if (traversal && Anchor_ptr) {
-        if (Anchor_ptr->next)
-            more_links = TRUE;
+	if (Anchor_ptr->next)
+	    more_links = TRUE;
     }
 
     if (!display_flag) {
@@ -1555,63 +1545,15 @@ PRIVATE void display_page ARGS3(
     }
 
     if (HTCJK != NOCJK || text->T.output_utf8 || TRACE) {
-        /*
+	/*
 	 *  For non-multibyte curses.
 	 */
-        lynx_force_repaint();
+	lynx_force_repaint();
     }
     refresh();
 
 }
 
-#ifdef NOT_USED
-/*
- *  Refresh a form link on the current page after it may have changed.
- *  Could be used after change_form_link after a popup was opened, IF
- *  refresh of the rest of the screen is not necessary, instead of a
- *  full display_page - probably only for VMS curses. - kw
- */
-PUBLIC void refresh_form_link ARGS2(
-    int,		linkno,
-    char *,		target)
-{
-    FormInfo *FormInfo_ptr;
-    /*
-     *  Update links[] for one input link, and call refresh.
-     *  basically redo some things display_page did.
-     */
-    if (linkno >= 0 && linkno < nlinks &&
-	links[linkno].type == WWW_FORM_LINK_TYPE) {
-	FormInfo_ptr = links[linkno].form;
-
-	if (FormInfo_ptr->type == F_RADIO_TYPE) {
-	    if (FormInfo_ptr->num_value)
-		links[linkno].hightext = checked_radio;
-	    else
-		links[linkno].hightext = unchecked_radio;
-
-	} else if (FormInfo_ptr->type == F_CHECKBOX_TYPE) {
-	    if (FormInfo_ptr->num_value)
-		links[linkno].hightext = checked_box;
-	    else
-		links[linkno].hightext = unchecked_box;
-
-	} else if (FormInfo_ptr->type == F_PASSWORD_TYPE) {
-	    links[linkno].hightext = STARS(strlen(FormInfo_ptr->value));
-
-	} else if (FormInfo_ptr->type == F_HIDDEN_TYPE) {
-	    ;			/* should never happen. */
-	} else {  /* TEXT type */
-	    links[linkno].hightext = FormInfo_ptr->value;
-	}
-	/*
-	 *  Bold the link, then update the screen
-	 */
-	highlight(OFF, linkno, target);
-	refresh();
-    }
-}
-#endif /* NOT_USED */
 
 /*			Object Building methods
 **			-----------------------
@@ -1657,7 +1599,7 @@ PRIVATE void split_line ARGS2(
     int inew;
 #endif
     int indent = text->in_line_1 ?
-    	  text->style->indent1st : text->style->leftIndent;
+	  text->style->indent1st : text->style->leftIndent;
     TextAnchor * a;
     int CurLine = text->Lines;
     int HeadTrim = 0;
@@ -1672,16 +1614,16 @@ PRIVATE void split_line ARGS2(
     char * cp;
     HTLine * line = (HTLine *)LY_CALLOC(1, LINE_SIZE(MAX_LINE));
     if (line == NULL)
-        outofmem(__FILE__, "split_line_1");
+	outofmem(__FILE__, "split_line_1");
 
     ctrl_chars_on_this_line = 0; /*reset since we are going to a new line*/
     text->LastChar = ' ';
 
     if (TRACE)
 	fprintf(stderr,"GridText: split_line called\n");
-    
+
     text->Lines++;
-    
+
     previous->next->prev = line;
     line->prev = previous;
     line->next = previous->next;
@@ -1723,7 +1665,7 @@ PRIVATE void split_line ARGS2(
 	     *  corresponding OFF.  When it finds one, the missing OFF
 	     *  change is appended to the end, and an ON change is added
 	     *  at the beginning of the current line.  The OFF change
-	     *  appended to the pervious line may get removed again in
+	     *  appended to the previous line may get removed again in
 	     *  the next iteration. - kw
 	     */
 	    line->styles[inew].horizpos = 0;
@@ -1797,7 +1739,7 @@ PRIVATE void split_line ARGS2(
      *  If we are not splitting and need an underline char, add it now. - FM
      */
     if ((split < 1) &&
-        !(dump_output_immediately && use_underscore) && underline_on) {
+	!(dump_output_immediately && use_underscore) && underline_on) {
 	line->data[line->size++] = LY_UNDERLINE_START_CHAR;
 	line->data[line->size] = '\0';
 	ctrl_chars_on_this_line++;
@@ -1813,13 +1755,13 @@ PRIVATE void split_line ARGS2(
 
     /*
      *  Split at required point
-     */    
+     */
     if (split > 0) {	/* Delete space at "split" splitting line */
-        char *p, *prevdata = previous->data, *linedata = line->data;
-        unsigned int plen;
+	char *p, *prevdata = previous->data, *linedata = line->data;
+	unsigned int plen;
 	int i;
 
-        /*
+	/*
 	 *  Split the line. - FM
 	 */
 	prevdata[previous->size] = '\0';
@@ -1830,16 +1772,16 @@ PRIVATE void split_line ARGS2(
 	 *  of our new line. - FM
 	 */
 	p = prevdata + split;
-        while (*p == ' ' || *p == LY_SOFT_HYPHEN) {
+	while (*p == ' ' || *p == LY_SOFT_HYPHEN) {
 	    p++;
 	    HeadTrim++;
 	}
-        plen = strlen(p);
+	plen = strlen(p);
 
 	/*
 	 *  Add underline char if needed. - FM
 	 */
-        if (!(dump_output_immediately && use_underscore)) {
+	if (!(dump_output_immediately && use_underscore)) {
 	    /*
 	     * Make sure our global flag is correct. - FM
 	     */
@@ -1936,17 +1878,17 @@ PRIVATE void split_line ARGS2(
      *  Economize on space.
      */
     while ((previous->size > 0) &&
-    	(previous->data[previous->size-1] == ' ')) {
+	(previous->data[previous->size-1] == ' ')) {
 	/*
 	 *  Strip trailers.
 	 */
 	previous->data[previous->size-1] = '\0';
-        previous->size--;
+	previous->size--;
 	TailTrim++;
     }
     temp = (HTLine *)LY_CALLOC(1, LINE_SIZE(previous->size));
     if (temp == NULL)
-        outofmem(__FILE__, "split_line_2");
+	outofmem(__FILE__, "split_line_2");
     memcpy(temp, previous, LINE_SIZE(previous->size));
     FREE(previous);
     previous = temp;
@@ -1958,12 +1900,12 @@ PRIVATE void split_line ARGS2(
      *  Terminate finished line for printing.
      */
     previous->data[previous->size] = '\0';
-    
+
     /*
      *  Align left, right or center.
      */
     for (cp = previous->data; *cp; cp++) {
-        if (*cp == LY_UNDERLINE_START_CHAR ||
+	if (*cp == LY_UNDERLINE_START_CHAR ||
 	    *cp == LY_UNDERLINE_END_CHAR ||
 	    *cp == LY_BOLD_START_CHAR ||
 	    *cp == LY_BOLD_END_CHAR ||
@@ -1973,11 +1915,11 @@ PRIVATE void split_line ARGS2(
     }
     /* @@ first line indent */
     spare =  (LYcols-1) -
-    		(int)style->rightIndent - indent +
-    		ctrl_chars_on_previous_line - previous->size -
+		(int)style->rightIndent - indent +
+		ctrl_chars_on_previous_line - previous->size -
 		((previous->size > 0) &&
 		 (int)(previous->data[previous->size-1] ==
-		 			    LY_SOFT_HYPHEN ?
+					    LY_SOFT_HYPHEN ?
 							 1 : 0));
 
     switch (style->alignment) {
@@ -2075,11 +2017,11 @@ PUBLIC void HText_setStyle ARGS2(
     int after, before;
 
     if (!style)
-        return;				/* Safety */
+	return; 			/* Safety */
     after = text->style->spaceAfter;
     before = style->spaceBefore;
     if (TRACE)
-        fprintf(stderr, "GridText: Change to style %s\n", style->name);
+	fprintf(stderr, "GridText: Change to style %s\n", style->name);
 
     blank_lines (text, ((after > before) ? after : before));
 
@@ -2131,8 +2073,8 @@ PUBLIC void HText_appendCharacter ARGS2(
     /*
      *  Block 8-bit chars not allowed by the current display character
      *  set if they are below what LYlowest_eightbit indicates.
-     *  Slang used its own replacements, so for USE_SLANG blocking her
-     *  is not necessary to protect terminas from those characters.
+     *  Slang used its own replacements, so for USE_SLANG blocking here
+     *  is not necessary to protect terminals from those characters.
      *  They should have been filtered out or translated by an earlier
      *  processing stage anyway. - kw
      */
@@ -2142,15 +2084,13 @@ PUBLIC void HText_appendCharacter ARGS2(
 	return;
 #endif /* USE_SLANG */
     if ((unsigned char)ch == 155 && HTCJK == NOCJK) {	/* octal 233 */
-        if (!HTPassHighCtrlRaw &&
-#ifdef EXP_CHARTRANS
+	if (!HTPassHighCtrlRaw &&
 	    !text->T.transp && !text->T.output_utf8 &&
 	    (155 < LYlowest_eightbit[current_char_set]) &&
-#endif /* EXP_CHARTRANS */
 	    strncmp(LYchar_set_names[current_char_set],
-		    "IBM PC character set", 20) &&
+		    "DosLatin1 (cp850)", 17) &&
 	    strncmp(LYchar_set_names[current_char_set],
-		    "IBM PC codepage 850", 19) &&
+		    "DosLatinUS (cp437)", 18) &&
 	    strncmp(LYchar_set_names[current_char_set],
 		    "Macintosh (8 bit)", 17) &&
 	    strncmp(LYchar_set_names[current_char_set],
@@ -2163,7 +2103,7 @@ PUBLIC void HText_appendCharacter ARGS2(
     style = text->style;
 
     indent = text->in_line_1 ? (int)style->indent1st : (int)style->leftIndent;
-    
+
     if (HTCJK != NOCJK) {
 	switch(text->state) {
 	    case S_text:
@@ -2243,6 +2183,9 @@ PUBLIC void HText_appendCharacter ARGS2(
 		break;
 
 		case S_nonascii_text:
+		/*
+		 *  Expecting CJK ESC after non-ASCII text.
+		 */
 		if (ch == '\033') {
 		    text->state = S_esc;
 		    text->kanji_buf = '\0';
@@ -2267,7 +2210,7 @@ PUBLIC void HText_appendCharacter ARGS2(
 		break;
 	}
 
-        if (!text->kanji_buf) {
+	if (!text->kanji_buf) {
 	    if ((ch & 0200) != 0) {
 		/*
 		 *  JIS X0201 Kana in SJIS support. - by ASATAKU
@@ -2278,7 +2221,7 @@ PUBLIC void HText_appendCharacter ARGS2(
 		    unsigned char c = (unsigned char)ch;
 		    unsigned char kb = (unsigned char)text->kanji_buf;
 		    JISx0201TO0208_SJIS(c,
-		    			(unsigned char *)&kb,
+					(unsigned char *)&kb,
 					(unsigned char *)&c);
 		    ch = (char)c;
 		    text->kanji_buf = (char)kb;
@@ -2300,32 +2243,32 @@ PUBLIC void HText_appendCharacter ARGS2(
 
     if (IsSpecialAttrChar(ch)) {
 #ifndef USE_COLOR_STYLE
-        if (ch == LY_UNDERLINE_START_CHAR) { 
-            line->data[line->size++] = LY_UNDERLINE_START_CHAR;
+	if (ch == LY_UNDERLINE_START_CHAR) {
+	    line->data[line->size++] = LY_UNDERLINE_START_CHAR;
 	    line->data[line->size] = '\0';
 	    underline_on = ON;
 	    if (!(dump_output_immediately && use_underscore))
 		ctrl_chars_on_this_line++;
 	    return;
-        } else if (ch == LY_UNDERLINE_END_CHAR) {
-            line->data[line->size++] = LY_UNDERLINE_END_CHAR;
+	} else if (ch == LY_UNDERLINE_END_CHAR) {
+	    line->data[line->size++] = LY_UNDERLINE_END_CHAR;
 	    line->data[line->size] = '\0';
 	    underline_on = OFF;
 	    if (!(dump_output_immediately && use_underscore))
-	    	ctrl_chars_on_this_line++;
+		ctrl_chars_on_this_line++;
 	    return;
-        } else if (ch == LY_BOLD_START_CHAR) {
-            line->data[line->size++] = LY_BOLD_START_CHAR;
+	} else if (ch == LY_BOLD_START_CHAR) {
+	    line->data[line->size++] = LY_BOLD_START_CHAR;
 	    line->data[line->size] = '\0';
-            bold_on = ON;
+	    bold_on = ON;
 	    ctrl_chars_on_this_line++;
-            return;
-        } else if (ch == LY_BOLD_END_CHAR) {
-            line->data[line->size++] = LY_BOLD_END_CHAR;
+	    return;
+	} else if (ch == LY_BOLD_END_CHAR) {
+	    line->data[line->size++] = LY_BOLD_END_CHAR;
 	    line->data[line->size] = '\0';
-            bold_on = OFF;
+	    bold_on = OFF;
 	    ctrl_chars_on_this_line++;
-            return;
+	    return;
 	} else if (ch == LY_SOFT_HYPHEN) {
 	    int i;
 
@@ -2386,7 +2329,7 @@ PUBLIC void HText_appendCharacter ARGS2(
     /*
      *  I'm going to cheat here in a BIG way.  Since I know that all
      *  \r's will be trapped by HTML_put_character I'm going to use
-     *  \r to mean go down a line but don't start a new paragraph.  
+     *  \r to mean go down a line but don't start a new paragraph.
      *  i.e. use the second line indenting.
      */
     if (ch == '\r') {
@@ -2406,7 +2349,7 @@ PUBLIC void HText_appendCharacter ARGS2(
      *  Tabs.
      */
     if (ch == '\t') {
-        HTTabStop * Tab;
+	HTTabStop * Tab;
 	int target;	/* Where to tab to */
 	int here;
 
@@ -2420,9 +2363,9 @@ PUBLIC void HText_appendCharacter ARGS2(
 	}
 	here = (((int)line->size + (int)line->offset) + indent)
 		- ctrl_chars_on_this_line; /* Consider special chars GAB */
-        if (style->tabs) {	/* Use tab table */
+	if (style->tabs) {	/* Use tab table */
 	    for (Tab = style->tabs;
-	    	Tab->position <= here;
+		Tab->position <= here;
 		Tab++)
 		if (!Tab->position) {
 		    new_line(text);
@@ -2439,7 +2382,7 @@ PUBLIC void HText_appendCharacter ARGS2(
 	} else {		/* Default tabs align with left indent mod 8 */
 #ifdef DEFAULT_TABS_8
 	    target = (((int)line->offset + (int)line->size + 8) & (-8))
-	    		+ (int)style->leftIndent;
+			+ (int)style->leftIndent;
 #else
 	    new_line(text);
 	    return;
@@ -2451,25 +2394,31 @@ PUBLIC void HText_appendCharacter ARGS2(
 	    new_line(text);
 	    return;
 	} else {
-            text->permissible_split = (int)line->size;	/* Can split here */
+	    /*
+	     *  Can split here. - FM
+	     */
+	    text->permissible_split = (int)line->size;
 	    if (line->size == 0) {
 	        line->offset = line->offset + target - here;
 	    } else {
 	        for (; here<target; here++) {
 		    /* Put character into line */
-                    line->data[line->size++] = ' ';
+		    line->data[line->size++] = ' ';
 		    line->data[line->size] = '\0';
 	        }
 	    }
 	    return;
 	}
 	/*NOTREACHED*/
-    } /* if tab */ 
+    } /* if tab */
+
 
-    
     if (ch == ' ') {
-        text->permissible_split = (int)line->size;	/* Can split here */
-	/* 
+	/*
+	 *  Can split here. - FM
+	 */
+	text->permissible_split = (int)line->size;
+	/*
 	 *  There are some pages written in
 	 *  different kanji codes. - TA
 	 */
@@ -2479,31 +2428,31 @@ PUBLIC void HText_appendCharacter ARGS2(
 
     /*
      *  Check if we should ignore characters at the wrap point.
-     */    
+     */
 check_IgnoreExcess:
     if (text->IgnoreExcess &&
-        ((indent + (int)line->offset + (int)line->size) + 
+	((indent + (int)line->offset + (int)line->size) +
 	(int)style->rightIndent - ctrl_chars_on_this_line) >= (LYcols-1))
-        return;
+	return;
 
     /*
      *  Check for end of line.
      */
-    if (((indent + (int)line->offset + (int)line->size) + 
+    if (((indent + (int)line->offset + (int)line->size) +
 	 (int)style->rightIndent - ctrl_chars_on_this_line +
 	 ((line->size > 0) &&
 	  (int)(line->data[line->size-1] ==
-		 		LY_SOFT_HYPHEN ?
+				LY_SOFT_HYPHEN ?
 					     1 : 0))) >= (LYcols - 1)) {
 
-        if (style->wordWrap && HTOutputFormat != WWW_SOURCE) {
+	if (style->wordWrap && HTOutputFormat != WWW_SOURCE) {
 	    split_line(text, text->permissible_split);
 	    if (ch == ' ') return;	/* Ignore space causing split */
 
 	}  else if (HTOutputFormat == WWW_SOURCE) {
 		 /*
-		  *  For source output we dont want to wrap this stuff
-		  *  unless absolutely neccessary. - LJM 
+		  *  For source output we don't want to wrap this stuff
+		  *  unless absolutely necessary. - LJM
 		  *  !
 		  *  If we don't wrap here we might get a segmentation fault.
 		  *  but let's see what happens
@@ -2515,7 +2464,7 @@ check_IgnoreExcess:
 		 *  For normal stuff like pre let's go ahead and
 		 *  wrap so the user can see all of the text.
 		 */
-		new_line(text);  
+		new_line(text);
 	}
     } else if ((int)line->size >= (int)(MAX_LINE-1)) {
 	/*
@@ -2528,17 +2477,17 @@ check_IgnoreExcess:
      *  Insert normal characters.
      */
     if (ch == HT_NON_BREAK_SPACE) {
-        ch = ' ';
+	ch = ' ';
     }
 
     if (ch & 0x80)
 	text->have_8bit_chars = YES;
 
     {
-        HTFont font = style->font;
+	HTFont font = style->font;
 	unsigned char hi, lo, tmp[2];
 
-        line = text->last_line;	/* May have changed */
+	line = text->last_line; /* May have changed */
 	if (HTCJK != NOCJK && text->kanji_buf) {
 	    hi = (unsigned char)text->kanji_buf, lo = (unsigned char)ch;
 	    if (HTCJK == JAPANESE && text->kcode == NOKANJI) {
@@ -2572,21 +2521,24 @@ check_IgnoreExcess:
 	    text->kanji_buf = 0;
 	} else if (HTCJK != NOCJK) {
 	    line->data[line->size++] = (kanji_code != NOKANJI) ?
-	    						    ch :
+							    ch :
 					  (font & HT_CAPITALS) ?
-					    	   TOUPPER(ch) : ch;
+						   TOUPPER(ch) : ch;
 	} else {
-            line->data[line->size++] =	/* Put character into line */
-	    	font & HT_CAPITALS ? TOUPPER(ch) : ch;
+	    line->data[line->size++] =	/* Put character into line */
+		font & HT_CAPITALS ? TOUPPER(ch) : ch;
 	}
 	line->data[line->size] = '\0';
-        if (font & HT_DOUBLE)		/* Do again if doubled */
-            HText_appendCharacter(text, HT_NON_BREAK_SPACE);
-	    /* NOT a permissible split */ 
+	if (font & HT_DOUBLE)		/* Do again if doubled */
+	    HText_appendCharacter(text, HT_NON_BREAK_SPACE);
+	    /* NOT a permissible split */
 
 	if (ch == LY_SOFT_HYPHEN) {
 	    ctrl_chars_on_this_line++;
-	    text->permissible_split = (int)line->size;	/* Can split here */
+	    /*
+	     *  Can split here. - FM
+	     */
+	    text->permissible_split = (int)line->size;
 	}
     }
 }
@@ -2628,7 +2580,7 @@ PUBLIC void HText_setLastChar ARGS2(
 	char,		ch)
 {
     if (!text)
-        return;
+	return;
 
     text->LastChar = ch;
 }
@@ -2640,7 +2592,7 @@ PUBLIC char HText_getLastChar ARGS1(
 	HText *,	text)
 {
     if (!text)
-        return('\0');
+	return('\0');
 
     return((char)text->LastChar);
 }
@@ -2653,7 +2605,7 @@ PUBLIC void HText_setIgnoreExcess ARGS2(
 	BOOL,		ignore)
 {
     if (!text)
-        return;
+	return;
 
     text->IgnoreExcess = ignore;
 }
@@ -2672,9 +2624,9 @@ PUBLIC int HText_beginAnchor ARGS3(
     char marker[16];
 
     TextAnchor * a = (TextAnchor *) calloc(1, sizeof(*a));
-    
+
     if (a == NULL)
-        outofmem(__FILE__, "HText_beginAnchor");
+	outofmem(__FILE__, "HText_beginAnchor");
     a->hightext  = NULL;
     a->hightext2 = NULL;
     a->start = text->chars + text->last_line->size;
@@ -2683,9 +2635,9 @@ PUBLIC int HText_beginAnchor ARGS3(
     a->line_num = text->Lines;
     a->line_pos = text->last_line->size;
     if (text->last_anchor) {
-        text->last_anchor->next = a;
+	text->last_anchor->next = a;
     } else {
-        text->first_anchor = a;
+	text->first_anchor = a;
     }
     a->next = 0;
     a->anchor = anc;
@@ -2694,15 +2646,15 @@ PUBLIC int HText_beginAnchor ARGS3(
 
 #ifndef DONT_TRACK_INTERNAL_LINKS
     if (HTAnchor_followTypedLink((HTAnchor*)anc, LINK_INTERNAL)) {
-        a->number = ++(text->last_anchor_number);
+	a->number = ++(text->last_anchor_number);
 	a->link_type = INTERNAL_LINK_ANCHOR;
     } else
 #endif
 	if (HTAnchor_followMainLink((HTAnchor*)anc)) {
-        a->number = ++(text->last_anchor_number);
+	a->number = ++(text->last_anchor_number);
 	a->link_type = HYPERTEXT_ANCHOR;
     } else {
-        a->number = 0;
+	a->number = 0;
 	a->link_type = HYPERTEXT_ANCHOR;
     }
 
@@ -2710,10 +2662,10 @@ PUBLIC int HText_beginAnchor ARGS3(
      *  If we are doing link_numbering add the link number.
      */
     if ((a->number > 0) &&
-        (keypad_mode == LINKS_ARE_NUMBERED ||
+	(keypad_mode == LINKS_ARE_NUMBERED ||
 	 keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED)) {
 	sprintf(marker,"[%d]", a->number);
-        HText_appendText(text, marker);
+	HText_appendText(text, marker);
 	a->start = text->chars + text->last_line->size;
 	a->line_num = text->Lines;
 	a->line_pos = text->last_line->size;
@@ -2742,7 +2694,7 @@ PUBLIC void HText_endAnchor ARGS2(
     if (number <= 0 || number == text->last_anchor->number) {
 	a = text->last_anchor;
     } else {
-        for (a = text->first_anchor; a; a = a->next) {
+	for (a = text->first_anchor; a; a = a->next) {
 	    if (a->number == number) {
 	        break;
 	    }
@@ -2769,7 +2721,7 @@ PUBLIC void HText_endAnchor ARGS2(
 	return;
     }
     if (a->number) {
-        /*
+	/*
 	 *  If it goes somewhere...
 	 */
 	int i, j, k, l;
@@ -2790,7 +2742,7 @@ PUBLIC void HText_endAnchor ARGS2(
 	 *  white and special characters, starting
 	 *  with the content on the last line. - FM
 	 */
-        a->extent += (text->chars + last->size) - a->start -
+	a->extent += (text->chars + last->size) - a->start -
 		     (text->Lines - a->line_num);
 	if (a->extent > last->size) {
 	    /*
@@ -2838,7 +2790,7 @@ PUBLIC void HText_endAnchor ARGS2(
 	 *  the one we just checked, and the one we just
 	 *  checked has only white and special characters,
 	 *  check whether the anchor's content on the
-	 *  immediatedly preceding line also has only
+	 *  immediately preceding line also has only
 	 *  white and special characters. - FM
 	 */
 	while (i == 0 && a->extent > CurBlankExtent) {
@@ -3109,7 +3061,7 @@ PUBLIC void HText_endAnchor ARGS2(
 	    }
 	} else {
 	    /*
-	     *  The anchor's content does not resticted to only
+	     *  The anchor's content does not restricted to only
 	     *  white and special characters, so we'll show it
 	     *  as a link. - FM
 	     */
@@ -3140,12 +3092,12 @@ PUBLIC void HText_endAnchor ARGS2(
 					BlankExtent : 0);
 	}
     } else {
-        /*
+	/*
 	 *  It's a named anchor without an HREF, so it
 	 *  should be registered but not shown as a
 	 *  link. - FM
 	 */
-        a->show_anchor = NO;
+	a->show_anchor = NO;
 	a->extent = 0;
     }
 }
@@ -3164,7 +3116,7 @@ PUBLIC void HText_appendText ARGS2(
 	return;
 
     for (p = str; *p; p++) {
-        HText_appendCharacter(text, *p);
+	HText_appendCharacter(text, *p);
     }
 }
 
@@ -3175,12 +3127,12 @@ PRIVATE void remove_special_attr_chars ARGS1(
     register char *cp;
 
     for (cp = buf; *cp != '\0' ; cp++) {
-        /*
+	/*
 	 *  Don't print underline chars.
 	 */
-        if (!IsSpecialAttrChar(*cp)) {
-           *buf = *cp, 
-           buf++;
+	if (!IsSpecialAttrChar(*cp)) {
+	   *buf = *cp,
+	   buf++;
 	}
     }
     *buf = '\0';
@@ -3210,10 +3162,10 @@ PUBLIC void HText_endAppend ARGS1(
      *  Create a  blank line at the bottom.
      */
     new_line(text);
-    
+
     if (text->halted) {
 	/*
-	 *  If output was stopped becasue memory was low, and we made
+	 *  If output was stopped because memory was low, and we made
 	 *  it to the end of the document, reset those flags and hope
 	 *  things are better now. - kw
 	 */
@@ -3233,23 +3185,23 @@ PUBLIC void HText_endAppend ARGS1(
      *  Remove the blank lines at the end of document.
      */
     while (text->last_line->data[0] == '\0' && text->Lines > 2) {
-        HTLine *next_to_the_last_line = text->last_line->prev;
+	HTLine *next_to_the_last_line = text->last_line->prev;
 
-        if (TRACE)
-            fprintf(stderr, "GridText: Removing bottom blank line: %s\n",
-                            text->last_line->data);
-        /*
+	if (TRACE)
+	    fprintf(stderr, "GridText: Removing bottom blank line: %s\n",
+			    text->last_line->data);
+	/*
 	 *  line_ptr points to the first line.
 	 */
-        next_to_the_last_line->next = line_ptr;
-        line_ptr->prev = next_to_the_last_line;
+	next_to_the_last_line->next = line_ptr;
+	line_ptr->prev = next_to_the_last_line;
 	FREE(text->last_line);
-        text->last_line = next_to_the_last_line;
-        text->Lines--;
+	text->last_line = next_to_the_last_line;
+	text->Lines--;
 #ifdef NOTUSED_BAD_FOR_SCREEN
-        if (TRACE) {
-            fprintf(stderr, "GridText: New bottom line: %s\n",
-                            text->last_line->data);
+	if (TRACE) {
+	    fprintf(stderr, "GridText: New bottom line: %s\n",
+			    text->last_line->data);
 	}
 #endif
     }
@@ -3259,7 +3211,7 @@ PUBLIC void HText_endAppend ARGS1(
      *  create the hightext strings. - FM
      */
     for (anchor_ptr = text->first_anchor;
-         anchor_ptr; anchor_ptr=anchor_ptr->next) {
+	 anchor_ptr; anchor_ptr=anchor_ptr->next) {
 re_parse:
 	/*
 	 *  Find the right line.
@@ -3282,13 +3234,13 @@ re_parse:
 	    fprintf(stderr, "Gridtext: Anchor found on line:%d col:%d\n",
 			    cur_line, anchor_ptr->line_pos);
 
-	/* 
+	/*
 	 *  Strip off any spaces or SpecialAttrChars at the beginning,
 	 *  if they exist, but only on HYPERTEXT_ANCHORS.
 	 */
 	if (anchor_ptr->link_type & HYPERTEXT_ANCHOR) {
 	    ch = (unsigned char)line_ptr->data[anchor_ptr->line_pos];
-            while (isspace(ch) ||
+	    while (isspace(ch) ||
 	           IsSpecialAttrChar(ch)) {
 		anchor_ptr->line_pos++;
 		anchor_ptr->extent--;
@@ -3302,9 +3254,9 @@ re_parse:
 #ifdef NOTUSED_BAD_FOR_SCREEN
 	if (TRACE)
 	    fprintf(stderr, "anchor text: '%s'   pos: %d\n",
-	    		    line_ptr->data, anchor_ptr->line_pos);
+			    line_ptr->data, anchor_ptr->line_pos);
 #endif
-	/* 
+	/*
 	 *  If the link begins with an end of line and we have more
 	 *  lines, then start the highlighting on the next line. - FM
 	 */
@@ -3320,7 +3272,7 @@ re_parse:
 #ifdef NOTUSED_BAD_FOR_SCREEN
 	if (TRACE)
 	    fprintf(stderr, "anchor text: '%s'   pos: %d\n",
-	    		    line_ptr->data, anchor_ptr->line_pos);
+			    line_ptr->data, anchor_ptr->line_pos);
 #endif
 	/*
 	 *  Copy the link name into the data structure.
@@ -3328,10 +3280,10 @@ re_parse:
 	if (line_ptr->data &&
 	    anchor_ptr->extent > 0 && anchor_ptr->line_pos >= 0) {
 	    StrnAllocCopy(anchor_ptr->hightext,
-	    		  &line_ptr->data[anchor_ptr->line_pos],
+			  &line_ptr->data[anchor_ptr->line_pos],
 			  anchor_ptr->extent);
 	} else {
-	    StrAllocCopy(anchor_ptr->hightext, ""); 
+	    StrAllocCopy(anchor_ptr->hightext, "");
 	}
 
 	/*
@@ -3339,7 +3291,7 @@ re_parse:
 	 *  copy that into the data structure.
 	 */
 	if (anchor_ptr->extent > strlen(anchor_ptr->hightext)) {
-            HTLine *line_ptr2 = line_ptr->next;
+	    HTLine *line_ptr2 = line_ptr->next;
 	    /*
 	     *  Double check that we have a line pointer,
 	     *  and if so, copy into hightext2.
@@ -3350,7 +3302,7 @@ re_parse:
 			      (anchor_ptr->extent -
 			       strlen(anchor_ptr->hightext)));
 	        anchor_ptr->hightext2offset = line_ptr2->offset;
-	 	remove_special_attr_chars(anchor_ptr->hightext2);
+		remove_special_attr_chars(anchor_ptr->hightext2);
 		if (anchor_ptr->link_type & HYPERTEXT_ANCHOR) {
 		    if ((len = strlen(anchor_ptr->hightext2)) > 0) {
 			len--;
@@ -3380,50 +3332,46 @@ re_parse:
 	    }
 	}
 
-        /*
+	/*
 	 *  Subtract any formatting characters from the x position
-         *  of the link.
-         */
-        if (anchor_ptr->line_pos > 0) {
-            register int offset = 0, i = 0;
-            for (; i < anchor_ptr->line_pos; i++)
-#ifdef EXP_CHARTRANS
-		if (IS_UTF_EXTRA(line_ptr->data[i]))
+	 *  of the link.
+	 */
+	if (anchor_ptr->line_pos > 0) {
+	    register int offset = 0, i = 0;
+	    for (; i < anchor_ptr->line_pos; i++)
+		if (IS_UTF_EXTRA(line_ptr->data[i]) ||
+		    IsSpecialAttrChar(line_ptr->data[i]))
 		    offset++;
-		else
-#endif /* EXP_CHARTRANS */
-                if (IsSpecialAttrChar(line_ptr->data[i]))
-                    offset++;
-            anchor_ptr->line_pos -= offset;
-        }
+	    anchor_ptr->line_pos -= offset;
+	}
 
 	/*
 	 *  Add the offset, and set the line number.
 	 */
-        anchor_ptr->line_pos += line_ptr->offset;
-        anchor_ptr->line_num  = cur_line;
+	anchor_ptr->line_pos += line_ptr->offset;
+	anchor_ptr->line_num  = cur_line;
 	if (TRACE)
 	    fprintf(stderr,
-	    	    "GridText: adding link on line %d in HText_endAppend\n",
+		    "GridText: adding link on line %d in HText_endAppend\n",
 		    cur_line);
 
 	/*
 	 *  If this is the last anchor, we're done!
 	 */
- 	if (anchor_ptr == text->last_anchor)
+	if (anchor_ptr == text->last_anchor)
 	    break;
     }
 }
 
 
-/* 	Dump diagnostics to stderr
+/*	Dump diagnostics to stderr
 */
 PUBLIC void HText_dump ARGS1(
 	HText *,	text)
 {
     fprintf(stderr, "HText: Dump called\n");
 }
-	
+
 
 /*	Return the anchor associated with this node
 */
@@ -3446,10 +3394,10 @@ PUBLIC HTChildAnchor * HText_childNumber ARGS1(
     TextAnchor * a;
 
     if (!(HTMainText && HTMainText->first_anchor) || number <= 0)
-        return (HTChildAnchor *)0;	/* Fail */
+	return (HTChildAnchor *)0;	/* Fail */
 
     for (a = HTMainText->first_anchor; a; a = a->next) {
-        if (a->number == number)
+	if (a->number == number)
 	    return(a->anchor);
     }
     return (HTChildAnchor *)0;	/* Fail */
@@ -3467,15 +3415,15 @@ PUBLIC void HText_FormDescNumber ARGS2(
     TextAnchor * a;
 
     if (!desc)
-        return;
+	return;
 
     if (!(HTMainText && HTMainText->first_anchor) || number <= 0) {
-         *desc = "unknown field or link";
+	 *desc = "unknown field or link";
 	 return;
     }
 
     for (a = HTMainText->first_anchor; a; a = a->next) {
-        if (a->number == number) {
+	if (a->number == number) {
 	    if (!(a->input_field && a->input_field->type)) {
 	        *desc = "unknown field or link";
 		return;
@@ -3532,7 +3480,7 @@ PUBLIC void HText_FormDescNumber ARGS2(
 	    return;
     }
 }
- 
+
 /*
  *  HTGetLinkInfo returns some link info based on the number.
  *
@@ -3559,7 +3507,7 @@ PUBLIC int HTGetLinkInfo ARGS6(
     int prev_anchor_line = -1, prev_prev_anchor_line = -1;
 
     if (!HTMainText)
-        return(NO);
+	return(NO);
 
     for (a = HTMainText->first_anchor; a; a = a->next) {
 	/*
@@ -3590,7 +3538,7 @@ PUBLIC int HTGetLinkInfo ARGS6(
 		/*
 		 *  Count all anchors starting with the top line of the
 		 *  currently displayed screen.  Just keep on counting
-		 *  beyound this screen's bottom line - we'll know whether 
+		 *  beyond this screen's bottom line - we'll know whether
 		 *  a found anchor is below the current screen by a check
 		 *  against nlinks later. - KW
 		 */
@@ -3613,7 +3561,7 @@ PUBLIC int HTGetLinkInfo ARGS6(
 		     *  have failed.  Return a failure indication so that
 		     *  the user will notice that something is wrong,
 		     *  instead of positioning on some other anchor which
-		     *  might result in inadvertant activation. - KW
+		     *  might result in inadvertent activation. - KW
 		     */
 		    return(NO);
 		}
@@ -3634,7 +3582,7 @@ PUBLIC int HTGetLinkInfo ARGS6(
 		    /*
 		     *  if the requested anchor is not within the currently
 		     *  displayed screen, set *go_line such that the top line
-		     *  will be either 
+		     *  will be either
 		     *  (1) the line immediately below the previous
 		     *      anchor, or
 		     *  (2) about one third of a screenful above the line
@@ -3685,7 +3633,7 @@ PUBLIC int HTGetLinkInfo ARGS6(
 #if 0
 			    char *cp = strchr(cp2, '#');
 			    if (cp && cp != cp2 &&
-                                0!=strncmp(cp2, "LYNXIMGMAP:", 11)) {
+				0!=strncmp(cp2, "LYNXIMGMAP:", 11)) {
 				StrAllocCopy(*lname, cp);
 				FREE(cp2);
 				return(WWW_INTERN_LINK_TYPE);
@@ -3706,7 +3654,7 @@ PUBLIC int HTGetLinkInfo ARGS6(
 		}
 		return(WWW_LINK_TYPE);
 	    }
-        }
+	}
     }
     return(NO);
 }
@@ -3742,20 +3690,20 @@ PUBLIC BOOL HText_getFirstTargetInLine ARGS7(
      */
     if (!(text && line_num >= 0 && line_num <= text->Lines &&
 	  target && *target))
-        return(FALSE);
+	return(FALSE);
 
     /*
      *  Find the line and set up its data and offset - FM
      */
     for (i = 0, line = text->last_line->next;
-    	 i < line_num && (line != text->last_line);
-         i++, line = line->next) {
+	 i < line_num && (line != text->last_line);
+	 i++, line = line->next) {
 	if (line->next == NULL) {
 	    return(FALSE);
 	}
     }
     if (!line && line->data[0])
-        return(FALSE);
+	return(FALSE);
     LineData = (char *)line->data;
     LineOffset = (int)line->offset;
 
@@ -3812,7 +3760,7 @@ PUBLIC int HText_getNumOfLines NOARGS
 PUBLIC char * HText_getTitle NOARGS
 {
     return(HTMainText ?
-   	  (char *) HTAnchor_title(HTMainText->node_anchor) : NULL);
+	  (char *) HTAnchor_title(HTMainText->node_anchor) : NULL);
 }
 
 #ifdef USE_HASH
@@ -3831,7 +3779,7 @@ PUBLIC char *HText_getStyle NOARGS
 PUBLIC char * HText_getSugFname NOARGS
 {
     return(HTMainText ?
-   	  (char *) HTAnchor_SugFname(HTMainText->node_anchor) : NULL);
+	  (char *) HTAnchor_SugFname(HTMainText->node_anchor) : NULL);
 }
 
 /*
@@ -3861,7 +3809,7 @@ PUBLIC void HTCheckFnameForCompression ARGS3(
      *  Make sure we have a string and anchor. - FM
      */
     if (!(fn && *fn && anchor))
-        return;
+	return;
 
     /*
      *  Make sure we have a file, not directory, name. -FM
@@ -3871,7 +3819,7 @@ PUBLIC void HTCheckFnameForCompression ARGS3(
 	if (*fn == '\0') {
 	    return;
 	}
-    } 
+    }
 
     /*
      *  Check the anchor's content_type and content_encoding
@@ -3880,11 +3828,11 @@ PUBLIC void HTCheckFnameForCompression ARGS3(
     ct = HTAnchor_content_type(anchor);
     ce = HTAnchor_content_encoding(anchor);
     if (ce == NULL) {
-        /*
+	/*
 	 *  No Content-Encoding, so check
 	 *  the Content-Type. - FM
 	 */
-        if (!strncasecomp((ct ? ct : ""), "application/gzip", 16) ||
+	if (!strncasecomp((ct ? ct : ""), "application/gzip", 16) ||
 	    !strncasecomp((ct ? ct : ""), "application/x-gzip", 18)) {
 	    method = 1;
 	} else if (!strncasecomp((ct ? ct : ""),
@@ -3997,7 +3945,7 @@ PUBLIC void HTCheckFnameForCompression ARGS3(
 	}
     }
     if (!method) {
-        /*
+	/*
 	 *  Don't know what compression method
 	 *  was used, if any, so we won't do
 	 *  anything. - FM
@@ -4032,7 +3980,7 @@ PUBLIC void HTCheckFnameForCompression ARGS3(
 PUBLIC char * HText_getLastModified NOARGS
 {
     return(HTMainText ?
-   	  (char *) HTAnchor_last_modified(HTMainText->node_anchor) : NULL);
+	  (char *) HTAnchor_last_modified(HTMainText->node_anchor) : NULL);
 }
 
 /*
@@ -4042,7 +3990,7 @@ PUBLIC char * HText_getLastModified NOARGS
 PUBLIC char * HText_getDate NOARGS
 {
     return(HTMainText ?
-   	  (char *) HTAnchor_date(HTMainText->node_anchor) : NULL);
+	  (char *) HTAnchor_date(HTMainText->node_anchor) : NULL);
 }
 
 /*
@@ -4052,7 +4000,7 @@ PUBLIC char * HText_getDate NOARGS
 PUBLIC char * HText_getServer NOARGS
 {
     return(HTMainText ?
-   	  (char *)HTAnchor_server(HTMainText->node_anchor) : NULL);
+	  (char *)HTAnchor_server(HTMainText->node_anchor) : NULL);
 }
 
 /*
@@ -4067,7 +4015,7 @@ PUBLIC void HText_pageDisplay ARGS2(
     display_page(HTMainText, line_num-1, target);
 
     is_www_index = HTAnchor_isIndex(HTMainAnchor);
-} 
+}
 
 /*
  *  Return YES if we have a whereis search target on the displayed
@@ -4079,7 +4027,7 @@ PUBLIC BOOL HText_pageHasPrevTarget NOARGS
 	return NO;
     else
 	return HTMainText->page_has_target;
-} 
+}
 
 /*
  *  HText_LinksInLines returns the number of links in the
@@ -4096,7 +4044,7 @@ PUBLIC int HText_LinksInLines ARGS3(
     TextAnchor *Anchor_ptr = NULL;
 
     if (!text)
-        return total;
+	return total;
 
     for (Anchor_ptr = text->first_anchor;
 		Anchor_ptr != NULL && Anchor_ptr->line_num <= end;
@@ -4124,7 +4072,7 @@ PUBLIC void HText_refresh ARGS1(
 	HText *,	text)
 {
     if (text->stale)
-        display_page(text, text->top_of_screen, "");
+	display_page(text, text->top_of_screen, "");
 }
 
 PUBLIC int HText_sourceAnchors ARGS1(
@@ -4188,7 +4136,7 @@ PRIVATE int line_for_char ARGS2(
     HTLine * line = text->last_line->next;
     for (;;) {
 	if (line == text->last_line) return 0;	/* Invalid */
-        characters = characters + line->size + 1;
+	characters = characters + line->size + 1;
 	if (characters > char_num) return line_number;
 	line_number ++;
 	line = line->next;
@@ -4199,7 +4147,7 @@ PUBLIC BOOL HText_select ARGS1(
 	HText *,	text)
 {
     if (text != HTMainText) {
-        HTMainText = text;
+	HTMainText = text;
 	HTMainAnchor = text->node_anchor;
 
 	/*
@@ -4242,7 +4190,7 @@ PUBLIC BOOL HText_POSTReplyLoaded ARGS1(
      *  Make sure doc is for a POST reply. - FM
      */
     if ((post_data = doc->post_data) == NULL ||
-        (address = doc->address) == NULL)
+	(address = doc->address) == NULL)
 	return(FALSE);
     is_head = doc->isHEAD;
 
@@ -4271,19 +4219,19 @@ PUBLIC BOOL HTFindPoundSelector ARGS1(
 
     for (a=HTMainText->first_anchor; a; a=a->next) {
 
-        if (a->anchor && a->anchor->tag)
-            if (!strcmp(a->anchor->tag, selector)) {
+	if (a->anchor && a->anchor->tag)
+	    if (!strcmp(a->anchor->tag, selector)) {
 
-                 www_search_result = a->line_num+1;
-                 if (TRACE) 
-		    fprintf(stderr, 
+		 www_search_result = a->line_num+1;
+		 if (TRACE)
+		    fprintf(stderr,
 		"HText: Selecting anchor [%d] at character %d, line %d\n",
-                                     a->number, a->start, www_search_result);
+				     a->number, a->start, www_search_result);
 		if (!strcmp(selector, LYToolbarName))
 		    --www_search_result;
 
-                 return(YES);
-            }
+		 return(YES);
+	    }
     }
 
     return(NO);
@@ -4299,20 +4247,20 @@ PUBLIC BOOL HText_selectAnchor ARGS2(
 /* This is done later, hence HText_select is unused in GridText.c
    Should it be the contrary ? @@@
     if (text != HTMainText) {
-        HText_select(text);
+	HText_select(text);
     }
 */
 
     for (a=text->first_anchor; a; a=a->next) {
-        if (a->anchor == anchor) break;
+	if (a->anchor == anchor) break;
     }
     if (!a) {
-        if (TRACE) fprintf(stderr, "HText: No such anchor in this text!\n");
-        return NO;
+	if (TRACE) fprintf(stderr, "HText: No such anchor in this text!\n");
+	return NO;
     }
 
     if (text != HTMainText) {		/* Comment out by ??? */
-        HTMainText = text;		/* Put back in by tbl 921208 */
+	HTMainText = text;		/* Put back in by tbl 921208 */
 	HTMainAnchor = text->node_anchor;
     }
 
@@ -4329,16 +4277,16 @@ PUBLIC BOOL HText_selectAnchor ARGS2(
 
 	www_search_result = l - (display_lines/3); /* put in global variable */
     }
-    
+
     return YES;
 }
- 
+
 
 /*		Editing functions		- NOT IMPLEMENTED
 **		=================
 **
 **	These are called from the application. There are many more functions
-**	not included here from the orginal text object.
+**	not included here from the original text object.
 */
 
 /*	Style handling:
@@ -4349,7 +4297,7 @@ PUBLIC void HText_applyStyle ARGS2(
 	HText *,	me,
 	HTStyle *,	style)
 {
-    
+
 }
 
 
@@ -4359,7 +4307,7 @@ PUBLIC void HText_updateStyle ARGS2(
 	HText *,	me,
 	HTStyle *,	style)
 {
-    
+
 }
 
 
@@ -4390,10 +4338,10 @@ PUBLIC void HTextApplyToSimilar ARGS2(
 	HText *,	me,
 	HTStyle *,	style)
 {
-    
+
 }
 
- 
+
 /*	Select the first unstyled run.
 **	(style recovery only)
 */
@@ -4401,7 +4349,7 @@ PUBLIC void HTextSelectUnstyled ARGS2(
 	HText *,		me,
 	HTStyleSheet *,		sheet)
 {
-    
+
 }
 
 
@@ -4410,13 +4358,13 @@ PUBLIC void HTextSelectUnstyled ARGS2(
 PUBLIC void HText_unlinkSelection ARGS1(
 	HText *,	me)
 {
-    
+
 }
 
 PUBLIC HTAnchor * HText_referenceSelected ARGS1(
 	HText *,	me)
 {
-     return 0;   
+     return 0;
 }
 
 
@@ -4439,7 +4387,7 @@ PUBLIC HTAnchor * HText_linkSelTo ARGS2(
     return 0;
 }
 
-/* 
+/*
  *  Utility for freeing the list of previous isindex and whereis queries. - FM
  */
 PUBLIC void HTSearchQueries_free NOARGS
@@ -4448,7 +4396,7 @@ PUBLIC void HTSearchQueries_free NOARGS
     HTList *cur = search_queries;
 
     if (!cur)
-        return;
+	return;
 
     while (NULL != (query = (char *)HTList_nextObject(cur))) {
 	FREE(query);
@@ -4458,7 +4406,7 @@ PUBLIC void HTSearchQueries_free NOARGS
     return;
 }
 
-/* 
+/*
  *  Utility for listing isindex and whereis queries, making
  *  any repeated queries the most current in the list. - FM
  */
@@ -4470,14 +4418,14 @@ PUBLIC void HTAddSearchQuery ARGS1(
     HTList *cur;
 
     if (!(query && *query))
-        return;
+	return;
 
     if ((new = (char *)calloc(1, (strlen(query) + 1))) == NULL)
-    	outofmem(__FILE__, "HTAddSearchQuery");
+	outofmem(__FILE__, "HTAddSearchQuery");
     strcpy(new, query);
 
     if (!search_queries) {
-        search_queries = HTList_new();
+	search_queries = HTList_new();
 	atexit(HTSearchQueries_free);
 	HTList_addObject(search_queries, new);
 	return;
@@ -4509,7 +4457,7 @@ PUBLIC int do_www_search ARGS1(
      *  Load the default query buffer
      */
     if ((cp=strchr(doc->address, '?')) != NULL) {
-        /*
+	/*
 	 *  This is an index from a previous search.
 	 *  Use its query as the default.
 	 */
@@ -4525,10 +4473,10 @@ PUBLIC int do_www_search ARGS1(
 	 */
 	HTAddSearchQuery(searchstring);
     } else {
-        /*
+	/*
 	 *  New search; no default.
 	 */
-        searchstring[0] = '\0';
+	searchstring[0] = '\0';
 	temp[0] = '\0';
     }
 
@@ -4536,20 +4484,20 @@ PUBLIC int do_www_search ARGS1(
      *  Prompt for a query string.
      */
     if (searchstring[0] == '\0') {
-        if (HTMainAnchor->isIndexPrompt)
-            _statusline(HTMainAnchor->isIndexPrompt);
+	if (HTMainAnchor->isIndexPrompt)
+	    _statusline(HTMainAnchor->isIndexPrompt);
 	else
-            _statusline(ENTER_DATABASE_QUERY);
+	    _statusline(ENTER_DATABASE_QUERY);
     } else
-        _statusline(EDIT_CURRENT_QUERY);
+	_statusline(EDIT_CURRENT_QUERY);
     QueryTotal = (search_queries ? HTList_count(search_queries) : 0);
     recall = (((PreviousSearch && QueryTotal >= 2) ||
-    	       (!PreviousSearch && QueryTotal >= 1)) ? RECALL : NORECALL);
+	       (!PreviousSearch && QueryTotal >= 1)) ? RECALL : NORECALL);
     QueryNum = QueryTotal;
 get_query:
     if ((ch=LYgetstr(searchstring, VISIBLE,
-    		     sizeof(searchstring), recall)) < 0 ||
-        *searchstring == '\0' || ch == UPARROW || ch == DNARROW) {
+		     sizeof(searchstring), recall)) < 0 ||
+	*searchstring == '\0' || ch == UPARROW || ch == DNARROW) {
 	if (recall && ch == UPARROW) {
 	    if (PreviousSearch) {
 	        /*
@@ -4569,7 +4517,7 @@ get_query:
 		 */
 	        QueryNum = 0;
 	    if ((cp=(char *)HTList_objectAt(search_queries,
-	    				    QueryNum)) != NULL) {
+					    QueryNum)) != NULL) {
 		strcpy(searchstring, cp);
 		if (*temp && !strcmp(temp, searchstring)) {
 		    _statusline(EDIT_CURRENT_QUERY);
@@ -4600,7 +4548,7 @@ get_query:
 		 */
 		QueryNum = QueryTotal - 1;
 	    if ((cp=(char *)HTList_objectAt(search_queries,
-	    				    QueryNum)) != NULL) {
+					    QueryNum)) != NULL) {
 		strcpy(searchstring, cp);
 		if (*temp && !strcmp(temp, searchstring)) {
 		    _statusline(EDIT_CURRENT_QUERY);
@@ -4614,11 +4562,11 @@ get_query:
 	    }
 	}
 
-        /*
+	/*
 	 *  Search cancelled.
 	 */
-        _statusline(CANCELLED);
-        sleep(InfoSecs);
+	_statusline(CANCELLED);
+	sleep(InfoSecs);
 	return(NULLFILE);
     }
 
@@ -4627,20 +4575,20 @@ get_query:
      */
     cp = searchstring;
     while (*cp && isspace((unsigned char)*cp))
-        cp++;
+	cp++;
     if (!(*cp)) {
-        _statusline(CANCELLED);
-        sleep(InfoSecs);
-        return(NULLFILE);
+	_statusline(CANCELLED);
+	sleep(InfoSecs);
+	return(NULLFILE);
     }
     if (cp > searchstring) {
-        for (i = 0; *cp; i++)
+	for (i = 0; *cp; i++)
 	    searchstring[i] = *cp++;
 	searchstring[i] = '\0';
     }
     cp = searchstring + strlen(searchstring) - 1;
     while ((cp > searchstring) && isspace((unsigned char)*cp))
-        *cp-- = '\0';
+	*cp-- = '\0';
 
     /*
      *  Don't resubmit the same query unintentionally.
@@ -4661,7 +4609,7 @@ get_query:
      *  Show the URL with the new query.
      */
     if ((cp=strchr(doc->address, '?')) != NULL)
-        *cp = '\0';
+	*cp = '\0';
     StrAllocCopy(tmpaddress, doc->address);
     StrAllocCat(tmpaddress, "?");
     StrAllocCat(tmpaddress, searchstring);
@@ -4673,7 +4621,7 @@ get_query:
 #endif /* !VMS */
     FREE(tmpaddress);
     if (cp)
-        *cp = '?';
+	*cp = '?';
 
     /*
      *  OK, now we do the search.
@@ -4688,13 +4636,13 @@ get_query:
 	    cp_freeme = stub_HTAnchor_address((HTAnchor *)HTMainAnchor);
 	else
 	    cp_freeme = HTAnchor_address((HTAnchor *)HTMainAnchor);
-        StrAllocCopy(doc->address, cp_freeme);
+	StrAllocCopy(doc->address, cp_freeme);
 	FREE(cp_freeme);
 
 	if (TRACE)
 	    fprintf(stderr,"\ndo_www_search: newfile: %s\n",doc->address);
 
-        /*
+	/*
 	 *  Yah, the search succeeded.
 	 */
 	return(NORMAL);
@@ -4712,7 +4660,7 @@ get_query:
 
 /*
  *  Print the contents of the file in HTMainText to
- *  the file descripter fp.
+ *  the file descriptor fp.
  *  If is_reply is TRUE add ">" to the beginning of each
  *  line to specify the file is a reply to message.
  */
@@ -4720,46 +4668,51 @@ PUBLIC void print_wwwfile_to_fd ARGS2(
 	FILE *,		fp,
 	int,		is_reply)
 {
-      register int i;
-      HTLine * line;
+    register int i;
+    HTLine * line;
 #ifdef VMS
-      extern BOOLEAN HadVMSInterrupt;
+    extern BOOLEAN HadVMSInterrupt;
 #endif /* VMS */
 
-      if (!HTMainText)
-          return;
-
-      line = HTMainText->last_line->next;
-      for (;; line = line->next) {
+    if (!HTMainText)
+	return;
 
-	  if (is_reply)
-             fputc('>',fp);
+    line = HTMainText->last_line->next;
+    for (;; line = line->next) {
+	/*
+	 *  Add news-style quotation if requested. - FM
+	 */
+	if (is_reply) {
+	    fputc('>',fp);
+	}
 
-            /* add offset */
-          for (i = 0; i < (int)line->offset; i++)
-             fputc(' ',fp);
+        /*
+	 *  Add offset.
+	 */
+	for (i = 0; i < (int)line->offset; i++) {
+	     fputc(' ', fp);
+	}
 
-            /* add data */
-          for (i = 0; line->data[i] != '\0'; i++) {
-	      if (!IsSpecialAttrChar(line->data[i])) {
-                 fputc(line->data[i],fp);
-	     } else if (line->data[i] == LY_SOFT_HYPHEN &&
-		 line->data[i + 1] == '\0') { /* last char on line */
-#ifdef EXP_CHARTRANS
-		 if (dump_output_immediately &&
-		     LYRawMode &&
-		     LYlowest_eightbit[current_char_set] <= 173 &&
-		     (current_char_set == 0 ||
-		      LYCharSet_UC[current_char_set].enc == UCT_ENC_8859 ||
-		      LYCharSet_UC[current_char_set].like8859 & UCT_R_8859SPECL)) {
-		     fputc(0xad, fp); /* the iso8859 byte for SHY */
-		 } else {
-		     fputc('-', fp);
-		 }
-#else /* EXP_CHARTRANS */
-		 fputc('-', fp);
-#endif /* EXP_CHARTRANS */
-	     } else if (dump_output_immediately && use_underscore) {
+	/*
+	 *  Add data.
+	 */
+	for (i = 0; line->data[i] != '\0'; i++) {
+	    if (!IsSpecialAttrChar(line->data[i])) {
+		fputc(line->data[i],fp);
+	    } else if (line->data[i] == LY_SOFT_HYPHEN &&
+		line->data[i + 1] == '\0') { /* last char on line */
+		if (dump_output_immediately &&
+		    LYRawMode &&
+		    LYlowest_eightbit[current_char_set] <= 173 &&
+		    (current_char_set == 0 ||
+		     LYCharSet_UC[current_char_set].enc == UCT_ENC_8859 ||
+		     LYCharSet_UC[current_char_set].like8859 &
+				  UCT_R_8859SPECL)) {
+		    fputc(0xad, fp); /* the iso8859 byte for SHY */
+		} else {
+		    fputc('-', fp);
+		}
+	    } else if (dump_output_immediately && use_underscore) {
 		switch (line->data[i]) {
 		    case LY_UNDERLINE_START_CHAR:
 		    case LY_UNDERLINE_END_CHAR:
@@ -4769,14 +4722,15 @@ PUBLIC void print_wwwfile_to_fd ARGS2(
 		    case LY_BOLD_END_CHAR:
 			break;
 		}
-	     }
-	  }
-
+	    }
+	}
 
-         /* add the return */
-         fputc('\n',fp);
+	/*
+	 *  Add the return.
+	 */
+	fputc('\n',fp);
 
-	 if (line == HTMainText->last_line)
+	if (line == HTMainText->last_line)
 	    break;
 
 #ifdef VMS
@@ -4789,7 +4743,7 @@ PUBLIC void print_wwwfile_to_fd ARGS2(
 
 /*
  *  Print the contents of the file in HTMainText to
- *  the file descripter fp.
+ *  the file descriptor fp.
  *  First output line is "thelink", ie, the URL for this file.
  */
 PUBLIC void print_crawl_to_fd ARGS3(
@@ -4804,7 +4758,7 @@ PUBLIC void print_crawl_to_fd ARGS3(
 #endif /* VMS */
 
     if (!HTMainText)
-        return;
+	return;
 
     line = HTMainText->last_line->next;
     fprintf(fp, "THE_URL:%s\n", thelink);
@@ -4813,52 +4767,53 @@ PUBLIC void print_crawl_to_fd ARGS3(
     }
 
     for (;; line = line->next) {
-        /*
+	/*
 	 *  Add offset.
 	 */
-        for (i = 0; i < (int)line->offset; i++)
-            fputc(' ',fp);
+	for (i = 0; i < (int)line->offset; i++) {
+	    fputc(' ', fp);
+	}
 
-        /*
+	/*
 	 *  Add data.
 	 */
-        for (i = 0; line->data[i] != '\0'; i++) {
-            if (!IsSpecialAttrChar(line->data[i])) {
-                fputc(line->data[i],fp);
+	for (i = 0; line->data[i] != '\0'; i++) {
+	    if (!IsSpecialAttrChar(line->data[i])) {
+		fputc(line->data[i], fp);
 	     } else if (line->data[i] == LY_SOFT_HYPHEN &&
 		 line->data[i + 1] == '\0') { /* last char on line */
-#ifdef EXP_CHARTRANS
 		 if (dump_output_immediately &&
 		     LYRawMode &&
 		     LYlowest_eightbit[current_char_set] <= 173 &&
 		     (current_char_set == 0 ||
 		      LYCharSet_UC[current_char_set].enc == UCT_ENC_8859 ||
-		      LYCharSet_UC[current_char_set].like8859 & UCT_R_8859SPECL)) {
+		      LYCharSet_UC[current_char_set].like8859 &
+				   UCT_R_8859SPECL)) {
 		     fputc(0xad, fp); /* the iso8859 byte for SHY */
 		 } else {
 		     fputc('-', fp);
 		 }
-#else /* EXP_CHARTRANS */
-		 fputc('-', fp);
-#endif /* EXP_CHARTRANS */
 	     }
 	}
-        /*
+
+	/*
 	 *  Add the return.
 	 */
-        fputc('\n',fp);
+	fputc('\n',fp);
 
-	if (line == HTMainText->last_line)
+	if (line == HTMainText->last_line) {
 	    break;
+	}
     }
 
     /*
      *  Add the References list if appropriate
      */
     if ((nolist == FALSE) &&
-        (keypad_mode == LINKS_ARE_NUMBERED ||
-	 keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED))
-        printlist(fp,FALSE);
+	(keypad_mode == LINKS_ARE_NUMBERED ||
+	 keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED)) {
+	printlist(fp,FALSE);
+    }
 
 #ifdef VMS
     HadVMSInterrupt = FALSE;
@@ -4947,10 +4902,9 @@ PUBLIC void www_user_search ARGS3(
     TextAnchor *a;
     OptionType *option;
     char *stars = NULL, *cp;
-    extern BOOLEAN case_sensitive;
 
     if (!HTMainText) {
-        return;
+	return;
     }
 
     /*
@@ -4958,7 +4912,7 @@ PUBLIC void www_user_search ARGS3(
      */
     line = HTMainText->last_line->next;
     for (count = 1; count <= start_line; line = line->next, count++) {
-        if (line == HTMainText->last_line) {
+	if (line == HTMainText->last_line) {
 	    line = HTMainText->last_line->next; /* set to first line */
 	    count = 1;
 	    break;
@@ -4966,7 +4920,7 @@ PUBLIC void www_user_search ARGS3(
     }
     a = HTMainText->first_anchor;
     while (a && a->line_num < count - 1) {
-        a = a->next;
+	a = a->next;
     }
 
     for (;;) {
@@ -5125,7 +5079,7 @@ PUBLIC void www_user_search ARGS3(
     count = 1;
     a = HTMainText->first_anchor;
     while (a && a->line_num < count - 1) {
-        a = a->next;
+	a = a->next;
     }
 
     for (;;) {
@@ -5262,12 +5216,12 @@ PUBLIC void www_user_search ARGS3(
 	        tentative_result=count;
 		break;
 	    } else if (!case_sensitive &&
-	    	       LYno_attr_char_case_strstr(line->data, target)) {
+		       LYno_attr_char_case_strstr(line->data, target)) {
 	        tentative_result=count;
 		break;
 	    } else if (count > start_line) {  /* next line */
-    		_user_message(STRING_NOT_FOUND, target);
-    		sleep(MessageSecs);
+		_user_message(STRING_NOT_FOUND, target);
+		sleep(MessageSecs);
 	        return;			/* end */
 	    } else {
 	        line = line->next;
@@ -5281,13 +5235,13 @@ PUBLIC void www_user_search ARGS3(
 
 PUBLIC void user_message ARGS2(
 	CONST char *,	message,
-	CONST char *,	argument) 
+	CONST char *,	argument)
 {
     char *temp = NULL;
     char temp_arg[256];
 
     if (message == NULL) {
-        mustshow = FALSE;
+	mustshow = FALSE;
 	return;
     }
 
@@ -5298,11 +5252,11 @@ PUBLIC void user_message ARGS2(
     temp_arg[255] = '\0';
     temp = (char *)malloc(strlen(message) + strlen(temp_arg) + 1);
     if (temp == NULL)
-        outofmem(__FILE__, "user_message");
+	outofmem(__FILE__, "user_message");
     sprintf(temp, message, temp_arg);
 
     statusline(temp);
-   
+
     FREE(temp);
     return;
 }
@@ -5314,7 +5268,7 @@ PUBLIC void user_message ARGS2(
 PUBLIC char * HText_getOwner NOARGS
 {
     return(HTMainText ?
-    	   (char *)HTAnchor_owner(HTMainText->node_anchor) : NULL);
+	   (char *)HTAnchor_owner(HTMainText->node_anchor) : NULL);
 }
 
 /*
@@ -5325,7 +5279,7 @@ PUBLIC void HText_setMainTextOwner ARGS1(
 	CONST char *,	owner)
 {
     if (!HTMainText)
-        return;
+	return;
 
     HTAnchor_setOwner(HTMainText->node_anchor, owner);
 }
@@ -5338,7 +5292,7 @@ PUBLIC void HText_setMainTextOwner ARGS1(
 PUBLIC char * HText_getRevTitle NOARGS
 {
     return(HTMainText ?
-    	   (char *)HTAnchor_RevTitle(HTMainText->node_anchor) : NULL);
+	   (char *)HTAnchor_RevTitle(HTMainText->node_anchor) : NULL);
 }
 
 /*
@@ -5348,7 +5302,7 @@ PUBLIC char * HText_getRevTitle NOARGS
 PUBLIC char * HText_getContentBase NOARGS
 {
     return(HTMainText ?
-    	   (char *)HTAnchor_content_base(HTMainText->node_anchor) : NULL);
+	   (char *)HTAnchor_content_base(HTMainText->node_anchor) : NULL);
 }
 
 /*
@@ -5368,13 +5322,12 @@ PUBLIC void HTuncache_current_document NOARGS
      */
     if (HTMainText) {
 	HTParentAnchor * htmain_anchor = HTMainText->node_anchor;
-#ifdef EXP_CHARTRANS
+
 	if (htmain_anchor) {
 	    if (!(HTOutputFormat && HTOutputFormat == WWW_SOURCE)) {
 		FREE(htmain_anchor->UCStages);
 	    }
 	}
-#endif /* EXP_CHARTRANS */
 	if (TRACE) {
 	    fprintf(stderr, "\rHTuncache.. freeing document for '%s'%s\n",
 			    ((htmain_anchor &&
@@ -5384,7 +5337,7 @@ PUBLIC void HTuncache_current_document NOARGS
 			      htmain_anchor->post_data) ?
 				      " with POST data" : ""));
 	}
-        HTList_removeObject(loaded_texts, HTMainText);
+	HTList_removeObject(loaded_texts, HTMainText);
 	HText_free(HTMainText);
 	HTMainText = NULL;
     } else {
@@ -5404,8 +5357,8 @@ PUBLIC char * HTLoadedDocumentURL NOARGS
     if (!HTMainText)
 	return ("");
 
-    if (HTMainText->node_anchor && HTMainText->node_anchor->address) 
-       	return(HTMainText->node_anchor->address);
+    if (HTMainText->node_anchor && HTMainText->node_anchor->address)
+	return(HTMainText->node_anchor->address);
     else
 	return ("");
 }
@@ -5415,8 +5368,8 @@ PUBLIC char * HTLoadedDocumentPost_data NOARGS
     if (!HTMainText)
 	return ("");
 
-    if (HTMainText->node_anchor && HTMainText->node_anchor->post_data) 
-       	return(HTMainText->node_anchor->post_data);
+    if (HTMainText->node_anchor && HTMainText->node_anchor->post_data)
+	return(HTMainText->node_anchor->post_data);
     else
 	return ("");
 }
@@ -5426,8 +5379,8 @@ PUBLIC char * HTLoadedDocumentTitle NOARGS
     if (!HTMainText)
 	return ("");
 
-    if (HTMainText->node_anchor && HTMainText->node_anchor->title) 
-       	return(HTMainText->node_anchor->title);
+    if (HTMainText->node_anchor && HTMainText->node_anchor->title)
+	return(HTMainText->node_anchor->title);
     else
 	return ("");
 }
@@ -5437,8 +5390,8 @@ PUBLIC BOOLEAN HTLoadedDocumentIsHEAD NOARGS
     if (!HTMainText)
 	return (FALSE);
 
-    if (HTMainText->node_anchor && HTMainText->node_anchor->isHEAD) 
-       	return(HTMainText->node_anchor->isHEAD);
+    if (HTMainText->node_anchor && HTMainText->node_anchor->isHEAD)
+	return(HTMainText->node_anchor->isHEAD);
     else
 	return (FALSE);
 }
@@ -5448,8 +5401,8 @@ PUBLIC BOOLEAN HTLoadedDocumentIsSafe NOARGS
     if (!HTMainText)
 	return (FALSE);
 
-    if (HTMainText->node_anchor && HTMainText->node_anchor->safe) 
-       	return(HTMainText->node_anchor->safe);
+    if (HTMainText->node_anchor && HTMainText->node_anchor->safe)
+	return(HTMainText->node_anchor->safe);
     else
 	return (FALSE);
 }
@@ -5459,8 +5412,8 @@ PUBLIC char * HTLoadedDocumentCharset NOARGS
     if (!HTMainText)
 	return (NULL);
 
-    if (HTMainText->node_anchor && HTMainText->node_anchor->charset) 
-       	return(HTMainText->node_anchor->charset);
+    if (HTMainText->node_anchor && HTMainText->node_anchor->charset)
+	return(HTMainText->node_anchor->charset);
     else
 	return (NULL);
 }
@@ -5488,8 +5441,8 @@ PUBLIC char * HTLoadedDocumentBookmark NOARGS
     if (!HTMainText)
 	return (NULL);
 
-    if (HTMainText->node_anchor && HTMainText->node_anchor->bookmark) 
-       	return(HTMainText->node_anchor->bookmark);
+    if (HTMainText->node_anchor && HTMainText->node_anchor->bookmark)
+	return(HTMainText->node_anchor->bookmark);
     else
 	return (NULL);
 }
@@ -5499,7 +5452,7 @@ PUBLIC int HText_LastLineSize ARGS2(
 	BOOL,		IgnoreSpaces)
 {
     if (!text || !text->last_line || !text->last_line->size)
-        return 0;
+	return 0;
     return HText_TrueLineSize(text->last_line, text, IgnoreSpaces);
 }
 
@@ -5510,9 +5463,9 @@ PUBLIC int HText_PreviousLineSize ARGS2(
     HTLine * line;
 
     if (!text || !text->last_line)
-        return 0;
+	return 0;
     if (!(line = text->last_line->prev))
-        return 0;
+	return 0;
     return HText_TrueLineSize(line, text, IgnoreSpaces);
 }
 
@@ -5525,7 +5478,7 @@ PRIVATE int HText_TrueLineSize ARGS3(
     int true_size = 0;
 
     if (!(line && line->size))
-        return 0;
+	return 0;
 
     if (IgnoreSpaces) {
 	for (i = 0; i < line->size; i++) {
@@ -5556,7 +5509,7 @@ PUBLIC void HText_NegateLineOne ARGS1(
 	HText *,	text)
 {
     if (text) {
-        text->in_line_1 = NO;
+	text->in_line_1 = NO;
     }
     return;
 }
@@ -5578,7 +5531,7 @@ PUBLIC void HText_RemovePreviousLine ARGS1(
     char *data;
 
     if (!(text && text->Lines > 1))
-        return;
+	return;
 
     line = text->last_line->prev;
     data = line->data;
@@ -5586,7 +5539,7 @@ PUBLIC void HText_RemovePreviousLine ARGS1(
     previous->next = text->last_line;
     text->last_line->prev = previous;
     text->chars -= ((data && *data == '\0') ?
-    					  1 : strlen(line->data) + 1);
+					  1 : strlen(line->data) + 1);
     text->Lines--;
     FREE(line);
 }
@@ -5605,7 +5558,7 @@ PUBLIC int HText_getCurrentColumn ARGS1(
     BOOL IgnoreSpaces = FALSE;
 
     if (text) {
-        column = (text->in_line_1 ?
+	column = (text->in_line_1 ?
 		  (int)text->style->indent1st : (int)text->style->leftIndent)
 		  + HText_LastLineSize(text, IgnoreSpaces)
 		  + (int)text->last_line->offset;
@@ -5618,7 +5571,7 @@ PUBLIC int HText_getMaximumColumn ARGS1(
 {
     int column = (LYcols-2);
     if (text) {
-        column = ((int)text->style->rightIndent ? (LYcols-2) :
+	column = ((int)text->style->rightIndent ? (LYcols-2) :
 		  ((LYcols-1) - (int)text->style->rightIndent));
     }
     return column;
@@ -5638,12 +5591,12 @@ PUBLIC void HText_setTabID ARGS2(
     HTList * last = NULL;
 
     if (!text || !name || !*name)
-    	return;
+	return;
 
     if (!cur) {
-        cur = text->tabs = HTList_new();
+	cur = text->tabs = HTList_new();
     } else {
-        while (NULL != (Tab = (HTTabID *)HTList_nextObject(cur))) {
+	while (NULL != (Tab = (HTTabID *)HTList_nextObject(cur))) {
 	    if (Tab->name && !strcmp(Tab->name, name))
 	        return; /* Already set.  Keep the first value. */
 	    last = cur;
@@ -5671,7 +5624,7 @@ PUBLIC int HText_getTabIDColumn ARGS2(
     HTList * cur = text->tabs;
 
     if (text && name && *name && cur) {
-        while (NULL != (Tab = (HTTabID *)HTList_nextObject(cur))) {
+	while (NULL != (Tab = (HTTabID *)HTList_nextObject(cur))) {
 	    if (Tab->name && !strcmp(Tab->name, name))
 	        break;
 	}
@@ -5702,14 +5655,14 @@ PRIVATE void HText_AddHiddenLink ARGS2(
      *  Make sure we have an HText structure and anchor. - FM
      */
     if (!(text && textanchor && textanchor->anchor))
-        return;
+	return;
 
     /*
      *  Create the hidden links list
      *  if it hasn't been already. - FM
      */
     if (text->hidden_links == NULL)
-    	text->hidden_links = HTList_new();
+	text->hidden_links = HTList_new();
 
     /*
      *  Store the address, in reverse list order
@@ -5734,7 +5687,7 @@ PUBLIC int HText_HiddenLinkCount ARGS1(
     int count = 0;
 
     if (text && text->hidden_links)
-        count = HTList_count((HTList *)text->hidden_links);
+	count = HTList_count((HTList *)text->hidden_links);
 
     return(count);
 }
@@ -5751,8 +5704,8 @@ PUBLIC char * HText_HiddenLinkAt ARGS2(
     char *href = NULL;
 
     if (text && text->hidden_links && number >= 0)
-        href = (char *)HTList_objectAt((HTList *)text->hidden_links, number);
-    
+	href = (char *)HTList_objectAt((HTList *)text->hidden_links, number);
+
     return(href);
 }
 
@@ -5760,7 +5713,7 @@ PUBLIC char * HText_HiddenLinkAt ARGS2(
 /*
  *  Form methods
  *    These routines are used to build forms consisting
- *    of input fields 
+ *    of input fields
  */
 PRIVATE int HTFormMethod;
 PRIVATE char * HTFormAction = NULL;
@@ -5790,11 +5743,11 @@ PUBLIC void HText_beginForm ARGS5(
 	if (!strncmp(action, "mailto:", 7)) {
 	    HTFormMethod = URL_MAIL_METHOD;
 	}
-        StrAllocCopy(HTFormAction, action);
+	StrAllocCopy(HTFormAction, action);
     }
     else
 	StrAllocCopy(HTFormAction, HTLoadedDocumentURL());
-    
+
     /*
      *  Check the METHOD. - FM
      */
@@ -5806,21 +5759,21 @@ PUBLIC void HText_beginForm ARGS5(
      *  Check the ENCTYPE. - FM
      */
     if ((enctype != NULL) && *enctype) {
-        StrAllocCopy(HTFormEnctype, enctype);
+	StrAllocCopy(HTFormEnctype, enctype);
 	if (HTFormMethod != URL_MAIL_METHOD &&
-	    !strncasecomp(enctype, "multipart/form-data", 19)) 
+	    !strncasecomp(enctype, "multipart/form-data", 19))
 	    HTFormMethod = URL_POST_METHOD;
     } else {
-        FREE(HTFormEnctype);
+	FREE(HTFormEnctype);
     }
 
     /*
      *  Check the TITLE. - FM
      */
     if ((title != NULL) && *title)
-        StrAllocCopy(HTFormTitle, title);
+	StrAllocCopy(HTFormTitle, title);
     else
-        FREE(HTFormTitle);
+	FREE(HTFormTitle);
 
     /*
      *  Check for an ACCEPT_CHARSET.  If present, store it and
@@ -5847,10 +5800,10 @@ PUBLIC void HText_beginForm ARGS5(
     if (newform == NULL)
 	outofmem(__FILE__,"HText_beginForm");
     newform->number = HTFormNumber;
-    
+
     PerFormInfo_free(HTCurrentForm); /* shouldn't happen here - kw */
     HTCurrentForm = newform;
-				    
+
     if (TRACE)
 	fprintf(stderr,
 		"BeginForm: action:%s Method:%d%s%s%s%s%s%s\n",
@@ -5867,11 +5820,11 @@ PUBLIC void HText_endForm ARGS1(
 	HText *,	text)
 {
     if (HTFormFields == 1 && text && text->first_anchor) {
-        /*
+	/*
 	 *  Support submission of a single text input field in
-	 *  the form via <return> instead of a submit botton. - FM
+	 *  the form via <return> instead of a submit button. - FM
 	 */
-        TextAnchor * a = text->first_anchor;
+	TextAnchor * a = text->first_anchor;
 	/*
 	 *  Go through list of anchors and get our input field. - FM
 	 */
@@ -5886,7 +5839,7 @@ PUBLIC void HText_endForm ARGS1(
 		StrAllocCopy(a->input_field->submit_action, HTFormAction);
 		if (HTFormEnctype != NULL)
 		    StrAllocCopy(a->input_field->submit_enctype,
-		    		 HTFormEnctype);
+				 HTFormEnctype);
 		if (HTFormTitle != NULL)
 		    StrAllocCopy(a->input_field->submit_title, HTFormTitle);
 		a->input_field->submit_method = HTFormMethod;
@@ -5963,19 +5916,17 @@ PUBLIC void HText_beginSelect ARGS4(
 
     if (TRACE) {
        fprintf(stderr,"HText_beginSelect: name=%s type=%d size=%s\n",
-	       ((HTCurSelectGroup == NULL) ? 
-	       			  "<NULL>" : HTCurSelectGroup),
+	       ((HTCurSelectGroup == NULL) ?
+				  "<NULL>" : HTCurSelectGroup),
 		HTCurSelectGroupType,
-	       ((HTCurSelectGroupSize == NULL) ? 
-	       			      "<NULL>" : HTCurSelectGroupSize));
-#ifdef EXP_CHARTRANS
+	       ((HTCurSelectGroupSize == NULL) ?
+				      "<NULL>" : HTCurSelectGroupSize));
 	fprintf(stderr,"HText_beginSelect: name_cs=%d \"%s\"\n",
 		HTCurSelectGroupCharset,
 		(HTCurSelectGroupCharset >= 0 ?
 		 LYCharSet_UC[HTCurSelectGroupCharset].MIMEname : "<UNKNOWN>"));
-#endif
     }
-} 
+}
 
 /*
 **  This function returns the number of the option whose
@@ -5990,17 +5941,17 @@ PUBLIC int HText_getOptionNum ARGS1(
     int n = 1; /* start count at 1 */
 
     if (!(text && text->last_anchor))
-        return(0);
+	return(0);
 
     a = text->last_anchor;
     if (!(a->link_type == INPUT_ANCHOR && a->input_field &&
-          a->input_field->type == F_OPTION_LIST_TYPE))
-        return(0);
+	  a->input_field->type == F_OPTION_LIST_TYPE))
+	return(0);
 
     for (op = a->input_field->select_list; op; op = op->next)
 	n++;
     if (TRACE)
-        fprintf(stderr, "HText_getOptionNum: Got number '%d'.\n", n);
+	fprintf(stderr, "HText_getOptionNum: Got number '%d'.\n", n);
     return(n);
 }
 
@@ -6022,7 +5973,7 @@ PRIVATE char * HText_skipOptionNumPrefix ARGS1(
 	 *  Skip the option number embedded in the option name so the
 	 *  extra chars won't mess up cgi scripts processing the value.
 	 *  The format is (nnn)__ where nnn is a number and there is a
-	 *  minumum of 5 chars (no underscores if (nnn) exceeds 5 chars).
+	 *  minimum of 5 chars (no underscores if (nnn) exceeds 5 chars).
 	 *  See HTML.c.  If the chars don't exactly match this format,
 	 *  just use all of opname.  - LE
 	 */
@@ -6076,7 +6027,7 @@ PUBLIC char * HText_setLastOptionValue ARGS7(
     int number = 0, i, j;
 
     if (!(text && text->last_anchor &&
-    	  text->last_anchor->link_type == INPUT_ANCHOR)) {
+	  text->last_anchor->link_type == INPUT_ANCHOR)) {
 	if (TRACE)
 	    fprintf(stderr,
 		    "HText_setLastOptionValue: invalid call!  value:%s!\n",
@@ -6093,11 +6044,11 @@ PUBLIC char * HText_setLastOptionValue ARGS7(
      *  Strip end spaces, newline is also whitespace.
      */
     if (*value) {
-        cp = &value[strlen(value)-1];
-        while ((cp >= value) && (isspace((unsigned char)*cp) ||
-       				 IsSpecialAttrChar((unsigned char)*cp)))
-            cp--;
-        *(cp+1) = '\0';
+	cp = &value[strlen(value)-1];
+	while ((cp >= value) && (isspace((unsigned char)*cp) ||
+				 IsSpecialAttrChar((unsigned char)*cp)))
+	    cp--;
+	*(cp+1) = '\0';
     }
 
     /*
@@ -6105,13 +6056,13 @@ PUBLIC char * HText_setLastOptionValue ARGS7(
      */
     cp = value;
     while (isspace((unsigned char)*cp) ||
-   	   IsSpecialAttrChar((unsigned char)*cp))
-        cp++;
+	   IsSpecialAttrChar((unsigned char)*cp))
+	cp++;
     if (HTCurSelectGroupType == F_RADIO_TYPE &&
 	LYSelectPopups &&
 	keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED) {
 	/*
-	 *  Collapse any space beteen the popup option
+	 *  Collapse any space between the popup option
 	 *  prefix and actual value. - FM
 	 */
 	if ((cp1 = HText_skipOptionNumPrefix(cp)) > cp) {
@@ -6129,22 +6080,22 @@ PUBLIC char * HText_setLastOptionValue ARGS7(
     }
 
     if (HTCurSelectGroupType == F_CHECKBOX_TYPE) {
-        StrAllocCopy(text->last_anchor->input_field->value, cp);
+	StrAllocCopy(text->last_anchor->input_field->value, cp);
 	text->last_anchor->input_field->value_cs = val_cs;
-        /*
+	/*
 	 *  Put the text on the screen as well.
 	 */
-        HText_appendText(text, cp);
+	HText_appendText(text, cp);
 
     } else if (LYSelectPopups == FALSE) {
-        StrAllocCopy(text->last_anchor->input_field->value,
+	StrAllocCopy(text->last_anchor->input_field->value,
 		     (submit_value ? submit_value : cp));
 	text->last_anchor->input_field->value_cs = (submit_value ?
 						    submit_val_cs : val_cs);
-        /*
+	/*
 	 *  Put the text on the screen as well.
 	 */
-        HText_appendText(text, cp);
+	HText_appendText(text, cp);
 
     } else {
 	/*
@@ -6175,7 +6126,7 @@ PUBLIC char * HText_setLastOptionValue ARGS7(
 		return NULL;
 	    }
 
-	    new_ptr = text->last_anchor->input_field->select_list = 
+	    new_ptr = text->last_anchor->input_field->select_list =
 				(OptionType *)calloc(1, sizeof(OptionType));
 	    if (new_ptr == NULL)
 	        outofmem(__FILE__, "HText_setLastOptionValue");
@@ -6189,7 +6140,7 @@ PUBLIC char * HText_setLastOptionValue ARGS7(
 	    number++;  /* add one more */
 
 	    op_ptr->next = new_ptr =
-	    			(OptionType *)calloc(1, sizeof(OptionType));
+				(OptionType *)calloc(1, sizeof(OptionType));
 	    if (new_ptr == NULL)
 	        outofmem(__FILE__, "HText_setLastOptionValue");
 	}
@@ -6202,7 +6153,7 @@ PUBLIC char * HText_setLastOptionValue ARGS7(
 	        cp[i] == HT_EM_SPACE) {
 		cp[j++] = ' ';
 	    } else if (cp[i] != LY_SOFT_HYPHEN &&
-	    	       !IsSpecialAttrChar((unsigned char)cp[i])) {
+		       !IsSpecialAttrChar((unsigned char)cp[i])) {
 		cp[j++] = cp[i];
 	    }
 	}
@@ -6243,18 +6194,18 @@ PUBLIC char * HText_setLastOptionValue ARGS7(
 	     *  cp_submit_value fields, so free them now to avoid
 	     *  a memory leak. - kw
 	     */
-            FREE(text->last_anchor->input_field->value);
-            FREE(text->last_anchor->input_field->cp_submit_value);
+	    FREE(text->last_anchor->input_field->value);
+	    FREE(text->last_anchor->input_field->cp_submit_value);
 
-	    text->last_anchor->input_field->value = 
+	    text->last_anchor->input_field->value =
 		text->last_anchor->input_field->select_list->name;
-	    text->last_anchor->input_field->orig_value = 
+	    text->last_anchor->input_field->orig_value =
 		text->last_anchor->input_field->select_list->name;
-	    text->last_anchor->input_field->cp_submit_value = 
+	    text->last_anchor->input_field->cp_submit_value =
 		text->last_anchor->input_field->select_list->cp_submit_value;
-	    text->last_anchor->input_field->orig_submit_value = 
+	    text->last_anchor->input_field->orig_submit_value =
 		text->last_anchor->input_field->select_list->cp_submit_value;
-	    text->last_anchor->input_field->value_cs = 
+	    text->last_anchor->input_field->value_cs =
 		new_ptr->value_cs;
 	} else {
 	    int newlen = strlen(new_ptr->name);
@@ -6278,17 +6229,17 @@ PUBLIC char * HText_setLastOptionValue ARGS7(
 	    text->last_anchor->input_field->value = new_ptr->name;
 	    text->last_anchor->input_field->orig_value = new_ptr->name;
 	    text->last_anchor->input_field->cp_submit_value =
-	    			   new_ptr->cp_submit_value;
+				   new_ptr->cp_submit_value;
 	    text->last_anchor->input_field->orig_submit_value =
-	    			   new_ptr->cp_submit_value;
-	    text->last_anchor->input_field->value_cs = 
+				   new_ptr->cp_submit_value;
+	    text->last_anchor->input_field->value_cs =
 		new_ptr->value_cs;
 	    StrAllocCopy(HTCurSelectedOptionValue, new_ptr->name);
 	    if (newlen > curlen)
 		StrAllocCat(HTCurSelectedOptionValue,
 			    UNDERSCORES(newlen-curlen));
 	}
-	     
+
 	/*
 	 *  Return the selected Option value to be sent to the screen.
 	 */
@@ -6297,7 +6248,7 @@ PUBLIC char * HText_setLastOptionValue ARGS7(
 	     *  Change the value.
 	     */
 	    text->last_anchor->input_field->size =
-	    			strlen(HTCurSelectedOptionValue); 
+				strlen(HTCurSelectedOptionValue);
 	    ret_Value = HTCurSelectedOptionValue;
 	}
     }
@@ -6306,7 +6257,6 @@ PUBLIC char * HText_setLastOptionValue ARGS7(
 	fprintf(stderr,"HText_setLastOptionValue:%s value=%s",
 		(order == LAST_ORDER) ? " LAST_ORDER" : "",
 		value);
-#ifdef EXP_CHARTRANS
 	fprintf(stderr,"            val_cs=%d \"%s\"",
 			val_cs,
 			(val_cs >= 0 ?
@@ -6323,14 +6273,13 @@ PUBLIC char * HText_setLastOptionValue ARGS7(
 	else {
 	    fprintf(stderr,"\n");
 	}
-#endif
     }
     return(ret_Value);
 }
 
 /*
  *  Assign a form input anchor.
- *  Returns the number of charactors to leave
+ *  Returns the number of characters to leave
  *  blank so that the input field can fit.
  */
 PUBLIC int HText_beginInput ARGS3(
@@ -6338,9 +6287,9 @@ PUBLIC int HText_beginInput ARGS3(
 	BOOL,			underline,
 	InputFieldData *,	I)
 {
-	
+
     TextAnchor * a = (TextAnchor *) calloc(1, sizeof(*a));
-    FormInfo * f = (FormInfo *) calloc(1, sizeof(*f)); 
+    FormInfo * f = (FormInfo *) calloc(1, sizeof(*f));
     CONST char *cp_option = NULL;
     char *IValue = NULL;
     unsigned char *tmp = NULL;
@@ -6350,7 +6299,7 @@ PUBLIC int HText_beginInput ARGS3(
 	fprintf(stderr,"Entering HText_beginInput\n");
 
     if (a == NULL || f == NULL)
-        outofmem(__FILE__, "HText_beginInput");
+	outofmem(__FILE__, "HText_beginInput");
 
     a->start = text->chars + text->last_line->size;
     a->inUnderline = underline;
@@ -6365,13 +6314,13 @@ PUBLIC int HText_beginInput ARGS3(
      *  name that was checked. - FM
      */
     if (I->type != NULL && !strcmp(I->type,"OPTION") &&
- 	HTCurSelectGroupType == F_RADIO_TYPE && LYSelectPopups == FALSE) {
+	HTCurSelectGroupType == F_RADIO_TYPE && LYSelectPopups == FALSE) {
 	I->type = "RADIO";
 	I->name = HTCurSelectGroup;
 	I->name_cs = HTCurSelectGroupCharset;
     }
     if (I->name && I->type && !strcasecomp(I->type, "radio")) {
-        if (!text->last_anchor) {
+	if (!text->last_anchor) {
 	    I->checked = TRUE;
 	} else {
 	    TextAnchor * b = text->first_anchor;
@@ -6379,7 +6328,7 @@ PUBLIC int HText_beginInput ARGS3(
 	    while (b) {
 	        if (b->link_type == INPUT_ANCHOR &&
 		    b->input_field->type == F_RADIO_TYPE &&
-                    b->input_field->number == HTFormNumber) {
+		    b->input_field->number == HTFormNumber) {
 		    if (!strcmp(b->input_field->name, I->name)) {
 			if (I->checked && b->input_field->num_value) {
 			    b->input_field->num_value = 0;
@@ -6421,13 +6370,13 @@ PUBLIC int HText_beginInput ARGS3(
      *  Set the no_cache flag if the METHOD is POST. - FM
      */
     if (HTFormMethod == URL_POST_METHOD)
-        f->no_cache = TRUE;
+	f->no_cache = TRUE;
 
     /*
      *  Set up VALUE.
      */
     if (I->value)
-        StrAllocCopy(IValue, I->value);
+	StrAllocCopy(IValue, I->value);
     if (IValue && HTCJK != NOCJK) {
 	if ((tmp = (unsigned char *)calloc(1, (strlen(IValue) + 1)))) {
 	    if (kanji_code == EUC) {
@@ -6455,7 +6404,7 @@ PUBLIC int HText_beginInput ARGS3(
     /* set the values and let the parsing below do the work */
     if (I->type != NULL && !strcmp(I->type,"OPTION")) {
 	cp_option = I->type;
- 	if (HTCurSelectGroupType == F_RADIO_TYPE)
+	if (HTCurSelectGroupType == F_RADIO_TYPE)
 	    I->type = "OPTION_LIST";
 	else
 	    I->type = "CHECKBOX";
@@ -6500,12 +6449,12 @@ PUBLIC int HText_beginInput ARGS3(
 
     /*
      *  Set CHECKED
-     *  (num_value is only relevent to check and radio types).
+     *  (num_value is only relevant to check and radio types).
      */
     if (I->checked == TRUE)
- 	f->num_value = 1; 
+	f->num_value = 1;
     else
- 	f->num_value = 0;
+	f->num_value = 0;
 
     /*
      *  Set TYPE.
@@ -6551,7 +6500,7 @@ PUBLIC int HText_beginInput ARGS3(
      *  Set NAME.
      */
     if (I->name != NULL) {
-        StrAllocCopy(f->name,I->name);
+	StrAllocCopy(f->name,I->name);
 	f->name_cs = I->name_cs;
     } else {
 	if (f->type == F_RESET_TYPE ||
@@ -6579,12 +6528,12 @@ PUBLIC int HText_beginInput ARGS3(
      *  Add this anchor to the anchor list
      */
     if (text->last_anchor) {
-        text->last_anchor->next = a;
+	text->last_anchor->next = a;
     } else {
-        text->first_anchor = a;
+	text->first_anchor = a;
     }
 
-    /* 
+    /*
      *  Set VALUE, if it exists.  Otherwise, if it's not
      *  an option list make it a zero-length string. - FM
      */
@@ -6615,7 +6564,7 @@ PUBLIC int HText_beginInput ARGS3(
     }
 
     /*
-     *  Run checks and fill in neccessary values.
+     *  Run checks and fill in necessary values.
      */
     if (f->type == F_RESET_TYPE) {
 	if (f->value && *f->value != '\0') {
@@ -6625,8 +6574,8 @@ PUBLIC int HText_beginInput ARGS3(
 	    f->size = 5;
 	}
     } else if (f->type == F_IMAGE_SUBMIT_TYPE ||
-    	       f->type == F_SUBMIT_TYPE) {
-        if (f->value && *f->value != '\0') {
+	       f->type == F_SUBMIT_TYPE) {
+	if (f->value && *f->value != '\0') {
 	    f->size = strlen(f->value);
 	} else if (f->type == F_IMAGE_SUBMIT_TYPE) {
 	    StrAllocCopy(f->value, "[IMAGE]-Submit");
@@ -6649,20 +6598,20 @@ PUBLIC int HText_beginInput ARGS3(
 	   StrAllocCopy(f->value, (f->type == F_CHECKBOX_TYPE ? "on" : ""));
 
     }
-    FREE(IValue); 
+    FREE(IValue);
 
     /*
      *  Set original values.
      */
     if (f->type == F_RADIO_TYPE || f->type == F_CHECKBOX_TYPE ) {
 	if (f->num_value)
-            StrAllocCopy(f->orig_value, "1");
+	    StrAllocCopy(f->orig_value, "1");
 	else
-            StrAllocCopy(f->orig_value, "0");
+	    StrAllocCopy(f->orig_value, "0");
     } else if (f->type == F_OPTION_LIST_TYPE) {
 	f->orig_value = NULL;
     } else {
-        StrAllocCopy(f->orig_value, f->value);
+	StrAllocCopy(f->orig_value, f->value);
     }
 
     /*
@@ -6694,7 +6643,7 @@ PUBLIC int HText_beginInput ARGS3(
 	default:
 	    if (keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED)
 		a->number = ++(text->last_anchor_number);
-	    else 
+	    else
 		a->number = 0;
 	    break;
     }
@@ -6772,7 +6721,7 @@ PUBLIC int HText_beginInput ARGS3(
     }
 
     /*
-     *  Finalise adding this anchor to the anchor list
+     *  Add this anchor to the anchor list
      */
     text->last_anchor = a;
 
@@ -6799,10 +6748,9 @@ PUBLIC int HText_beginInput ARGS3(
 
     if (TRACE) {
 	fprintf(stderr,"Input link: name=%s\nvalue=%s\nsize=%d\n",
-		 	f->name,
+			f->name,
 			((f->value != NULL) ? f->value : ""),
 			f->size);
-#ifdef EXP_CHARTRANS
 	fprintf(stderr,"Input link: name_cs=%d \"%s\" (from %d \"%s\")\n",
 			f->name_cs,
 			(f->name_cs >= 0 ?
@@ -6817,9 +6765,8 @@ PUBLIC int HText_beginInput ARGS3(
 			I->value_cs,
 			(I->value_cs >= 0 ?
 			 LYCharSet_UC[I->value_cs].MIMEname : "<UNKNOWN>"));
-#endif
     }
-	
+
     /*
      *  Return the SIZE of the input field.
      */
@@ -6948,7 +6895,6 @@ PUBLIC void HText_SubmitForm ARGS4(
     CONST char *out_csname;
     CONST char *target_csname = NULL;
     char *name_used = "";
-#ifdef EXP_CHARTRANS
     BOOL form_has_8bit = NO, form_has_special = NO;
     BOOL field_has_8bit = NO, field_has_special = NO;
     BOOL name_has_8bit = NO, name_has_special = NO;
@@ -6958,10 +6904,9 @@ PUBLIC void HText_SubmitForm ARGS4(
     char *val_used = "";
     char *copied_val_used = NULL;
     char *copied_name_used = NULL;
-#endif
 
     if (!HTMainText)
-        return;
+	return;
 
     thisform = HTList_objectAt(HTMainText->forms, form_number - 1);
     /*  Sanity check */
@@ -6979,19 +6924,19 @@ PUBLIC void HText_SubmitForm ARGS4(
     }
 
     if (submit_item->submit_action) {
-        /*
+	/*
 	 *  If we're mailing, make sure it's a mailto ACTION. - FM
 	 */
-        if ((submit_item->submit_method == URL_MAIL_METHOD) &&
+	if ((submit_item->submit_method == URL_MAIL_METHOD) &&
 	    strncmp(submit_item->submit_action, "mailto:", 7)) {
 	    HTAlert(BAD_FORM_MAILTO);
 	    return;
 	}
 
-        /*
+	/*
 	 *  Set length plus breathing room.
 	 */
-        len = strlen(submit_item->submit_action) + 2048;
+	len = strlen(submit_item->submit_action) + 2048;
     } else {
 	return;
     }
@@ -7034,7 +6979,6 @@ PUBLIC void HText_SubmitForm ARGS4(
      *  TODO:   - deal with list in ACCEPT-CHARSET, find a "best"
      *		  charset to submit
      */
-#ifdef EXP_CHARTRANS
 
     /* Look at ACCEPT-CHARSET on the submitting field if we have one. */
     if (thisform && submit_item->accept_cs &&
@@ -7058,7 +7002,7 @@ PUBLIC void HText_SubmitForm ARGS4(
     }
 
     if (target_cs < 0 &&
-        HTMainText->node_anchor->charset &&
+	HTMainText->node_anchor->charset &&
 	*HTMainText->node_anchor->charset) {
 	target_cs = UCGetLYhndl_byMIME(HTMainText->node_anchor->charset);
 	if (target_cs >= 0) {
@@ -7072,10 +7016,6 @@ PUBLIC void HText_SubmitForm ARGS4(
     if (target_cs < 0) {
 	target_cs = UCLYhndl_for_unspec;
     }
-#else  /* EXP_CHARTRANS */
-    target_cs = LYRawMode ? current_char_set : 0;
-    target_csname = HTMainText->node_anchor->charset;
-#endif  /* EXP_CHARTRANS */
 
     /*
      *  Go through list of anchors and get size first.
@@ -7085,8 +7025,8 @@ PUBLIC void HText_SubmitForm ARGS4(
      */
     anchor_ptr = HTMainText->first_anchor;
     while (anchor_ptr) {
-        if (anchor_ptr->link_type == INPUT_ANCHOR) {
-   	    if (anchor_ptr->input_field->number == form_number) {
+	if (anchor_ptr->link_type == INPUT_ANCHOR) {
+	    if (anchor_ptr->input_field->number == form_number) {
 
 		char *p;
 		char * val;
@@ -7095,7 +7035,7 @@ PUBLIC void HText_SubmitForm ARGS4(
 			            form_ptr->cp_submit_value : form_ptr->value;
 		field_has_8bit = NO;
 		field_has_special = NO;
-	
+
 	        len += (strlen(form_ptr->name) + (Boundary ? 100 : 10));
 		/*
 		 *  Calculate by the option submit value if present.
@@ -7107,7 +7047,6 @@ PUBLIC void HText_SubmitForm ARGS4(
 		}
 	        len += 32; /* plus and ampersand + safety net */
 
-#ifdef EXP_CHARTRANS
 		for (p = val;
 		     p && *p && !(field_has_8bit && field_has_special);
 		     p++)
@@ -7147,7 +7086,7 @@ PUBLIC void HText_SubmitForm ARGS4(
 		} else if (UCCanTranslateFromTo(form_ptr->value_cs, target_cs) != TQ_NO) {
 		    /* also ok */
 		} else if (UCCanTranslateFromTo(target_cs, form_ptr->value_cs) != TQ_NO) {
-		    target_cs = form_ptr->value_cs; 	/* try this */
+		    target_cs = form_ptr->value_cs;	/* try this */
 		    target_csname = NULL; /* will be set after loop */
 		} else {
 		    target_cs = -1; /* don't know what to do */
@@ -7167,12 +7106,11 @@ PUBLIC void HText_SubmitForm ARGS4(
 		} else if (UCCanTranslateFromTo(form_ptr->name_cs, target_cs) != TQ_NO) {
 		    /* also ok */
 		} else if (UCCanTranslateFromTo(target_cs, form_ptr->name_cs) != TQ_NO) {
-		    target_cs = form_ptr->value_cs; 	/* try this */
+		    target_cs = form_ptr->value_cs;	/* try this */
 		    target_csname = NULL; /* will be set after loop */
 		} else {
 		    target_cs = -1; /* don't know what to do */
 		}
-#endif /* EXP_CHARTRANS */
 
 	    } else if (anchor_ptr->input_field->number > form_number) {
 	        break;
@@ -7185,7 +7123,6 @@ PUBLIC void HText_SubmitForm ARGS4(
 	anchor_ptr = anchor_ptr->next;
     }
 
-#ifdef EXP_CHARTRANS
     if (target_csname == NULL && target_cs >= 0) {
 	if (form_has_8bit) {
 	    target_csname = LYCharSet_UC[target_cs].MIMEname;
@@ -7195,30 +7132,29 @@ PUBLIC void HText_SubmitForm ARGS4(
 	    target_csname = "us-ascii";
 	}
     }
-#endif
     /*
      *  Get query ready.
      */
     query = (char *)calloc(1, len);
     if (query == NULL)
-        outofmem(__FILE__, "HText_SubmitForm");
+	outofmem(__FILE__, "HText_SubmitForm");
 
     if (submit_item->submit_method == URL_GET_METHOD && Boundary == NULL) {
-       	strcpy (query, submit_item->submit_action);
-       	/*
+	strcpy (query, submit_item->submit_action);
+	/*
 	 *  Method is GET.  Clip out any anchor in the current URL.
 	 */
-       	strtok (query, "#");
-       	/*
+	strtok (query, "#");
+	/*
 	 *  Clip out any old query in the current URL.
 	 */
-       	strtok (query, "?");
+	strtok (query, "?");
 	/*
 	 *  Add the lead question mark for the new URL.
-	 */  
+	 */
 	strcat(query,"?");
     } else {
-        query[0] = '\0';
+	query[0] = '\0';
 	/*
 	 *  We are submitting POST content to a server,
 	 *  so load the post_content_type element. - FM
@@ -7290,16 +7226,16 @@ PUBLIC void HText_SubmitForm ARGS4(
      *  Go through list of anchors and assemble URL query.
      */
     while (anchor_ptr) {
-        if (anchor_ptr->link_type == INPUT_ANCHOR) {
+	if (anchor_ptr->link_type == INPUT_ANCHOR) {
 	    if (anchor_ptr->input_field->number == form_number) {
 		char *p;
 		int out_cs;
-                form_ptr = anchor_ptr->input_field;
+		form_ptr = anchor_ptr->input_field;
 
 		if (form_ptr->type != F_TEXTAREA_TYPE)
 		    textarea_lineno = 0;
 
-                switch(form_ptr->type) {
+		switch(form_ptr->type) {
 	        case F_RESET_TYPE:
 		    break;
 	        case F_SUBMIT_TYPE:
@@ -7335,13 +7271,12 @@ PUBLIC void HText_SubmitForm ARGS4(
 		    }
 		    /*  fall through  */
 	        case F_RADIO_TYPE:
-                case F_CHECKBOX_TYPE:
+		case F_CHECKBOX_TYPE:
 		case F_TEXTAREA_TYPE:
-                case F_PASSWORD_TYPE:
+		case F_PASSWORD_TYPE:
 	        case F_TEXT_TYPE:
 		case F_OPTION_LIST_TYPE:
 		case F_HIDDEN_TYPE:
-#ifdef EXP_CHARTRANS
 		    /*
 		     *	Be sure to actually look at the option submit value.
 		     */
@@ -7383,7 +7318,7 @@ PUBLIC void HText_SubmitForm ARGS4(
 				    form_ptr->value_cs,
 				    form_ptr->value_cs >= 0 ?
 				    LYCharSet_UC[form_ptr->value_cs].MIMEname :
-				    				          "???",
+									  "???",
 				    target_cs,
 				    target_csname ? target_csname : "???",
 				    success ? "OK" : "FAILED");
@@ -7479,7 +7414,7 @@ PUBLIC void HText_SubmitForm ARGS4(
 				    form_ptr->name_cs,
 				    form_ptr->name_cs >= 0 ?
 				    LYCharSet_UC[form_ptr->name_cs].MIMEname :
-				    				          "???",
+									  "???",
 				    target_cs,
 				    target_csname ? target_csname : "???",
 				    success ? "OK" : "FAILED");
@@ -7524,7 +7459,7 @@ PUBLIC void HText_SubmitForm ARGS4(
 			 *  "should be encoded according to the prescriptions
 			 *  of RFC 1522 [...].  I don't think RFC 1522 actually
 			 *  is meant to apply to parameters like this, and it
-			 *  is unknown wheter any server would make sense of
+			 *  is unknown whether any server would make sense of
 			 *  it, so for now just use some quoting/escaping and
 			 *  otherwise leave 8-bit values as they are.
 			 *  Non-ASCII characters in form field names submitted
@@ -7535,7 +7470,6 @@ PUBLIC void HText_SubmitForm ARGS4(
 			name_used = copied_name_used;
 		    }
 
-#endif /* EXP_CHARTRANS */
 		    break;
 		default:
 		    if (TRACE)
@@ -7650,11 +7584,9 @@ PUBLIC void HText_SubmitForm ARGS4(
 			FREE(escaped1);
 			FREE(escaped2);
 		    }
-#ifdef EXP_CHARTRANS
-    		    FREE(copied_name_used);
-    		    FREE(copied_val_used);
-#endif
-    		    break;
+		    FREE(copied_name_used);
+		    FREE(copied_val_used);
+		    break;
 
 		case F_RADIO_TYPE:
 		case F_CHECKBOX_TYPE:
@@ -7715,10 +7647,8 @@ PUBLIC void HText_SubmitForm ARGS4(
 			FREE(escaped1);
 			FREE(escaped2);
 		    }
-#ifdef EXP_CHARTRANS
-    		    FREE(copied_name_used);
-    		    FREE(copied_val_used);
-#endif
+		    FREE(copied_name_used);
+		    FREE(copied_val_used);
 		    break;
 
 		case F_TEXTAREA_TYPE:
@@ -7730,7 +7660,7 @@ PUBLIC void HText_SubmitForm ARGS4(
 			escaped2 = HTEscapeSP(val_used, URL_XALPHAS);
 		    }
 
-		    if (!last_textarea_name || 
+		    if (!last_textarea_name ||
 			strcmp(last_textarea_name, form_ptr->name)) {
 			textarea_lineno = 1;
 			/*
@@ -7816,9 +7746,7 @@ PUBLIC void HText_SubmitForm ARGS4(
 			}
 		    }
 		    FREE(escaped2);
-#ifdef EXP_CHARTRANS
-    		    FREE(copied_val_used);
-#endif
+		    FREE(copied_val_used);
 		    break;
 
 		case F_PASSWORD_TYPE:
@@ -7877,27 +7805,23 @@ PUBLIC void HText_SubmitForm ARGS4(
 						 "\n" : ""));
 		    FREE(escaped1);
 		    FREE(escaped2);
-#ifdef EXP_CHARTRANS
-    		    FREE(copied_name_used);
-    		    FREE(copied_val_used);
-#endif
+		    FREE(copied_name_used);
+		    FREE(copied_val_used);
 		    break;
 	        }
 	    } else if (anchor_ptr->input_field->number > form_number) {
 	        break;
 	    }
-        }
+	}
 
-        if (anchor_ptr == HTMainText->last_anchor)
-            break;
+	if (anchor_ptr == HTMainText->last_anchor)
+	    break;
 
 	anchor_ptr = anchor_ptr->next;
     }
-#ifdef EXP_CHARTRANS
-	FREE(copied_name_used);
-#endif
+    FREE(copied_name_used);
     if (Boundary) {
-        sprintf(&query[strlen(query)], "\r\n--%s--\r\n", Boundary);
+	sprintf(&query[strlen(query)], "\r\n--%s--\r\n", Boundary);
     }
     FREE(previous_blanks);
 
@@ -7905,12 +7829,12 @@ PUBLIC void HText_SubmitForm ARGS4(
 	_user_message("Submitting %s", submit_item->submit_action);
 	if (TRACE) {
 	    fprintf(stderr, "\nGridText - mailto_address: %s\n",
-	    		    (submit_item->submit_action+7));
+			    (submit_item->submit_action+7));
 	    fprintf(stderr, "GridText - mailto_subject: %s\n",
-	    		    ((submit_item->submit_title &&
+			    ((submit_item->submit_title &&
 			      *submit_item->submit_title) ?
 			      (submit_item->submit_title) :
-			      	        (HText_getTitle() ?
+					(HText_getTitle() ?
 				         HText_getTitle() : "")));
 	    fprintf(stderr,"GridText - mailto_content: %s\n",query);
 	}
@@ -7919,30 +7843,30 @@ PUBLIC void HText_SubmitForm ARGS4(
 		 ((submit_item->submit_title &&
 		   *submit_item->submit_title) ?
 		   (submit_item->submit_title) :
-		   	     (HText_getTitle() ?
+			     (HText_getTitle() ?
 			      HText_getTitle() : "")),
 		 query,
 		 doc->post_content_type);
 	FREE(query);
-        FREE(doc->post_content_type);
+	FREE(doc->post_content_type);
 	return;
     } else {
-        _statusline(SUBMITTING_FORM);
+	_statusline(SUBMITTING_FORM);
     }
-   
+
     if (submit_item->submit_method == URL_POST_METHOD || Boundary) {
-        StrAllocCopy(doc->post_data, query);
-        if (TRACE)
+	StrAllocCopy(doc->post_data, query);
+	if (TRACE)
 	    fprintf(stderr,"GridText - post_data: %s\n",doc->post_data);
-        StrAllocCopy(doc->address, submit_item->submit_action);
-        FREE(query);
-        return;
-    } else { /* GET_METHOD */ 
-        StrAllocCopy(doc->address, query);
-        FREE(doc->post_data);
-        FREE(doc->post_content_type);
-        FREE(query);
-        return;
+	StrAllocCopy(doc->address, submit_item->submit_action);
+	FREE(query);
+	return;
+    } else { /* GET_METHOD */
+	StrAllocCopy(doc->address, query);
+	FREE(doc->post_data);
+	FREE(doc->post_content_type);
+	FREE(query);
+	return;
     }
 }
 
@@ -7952,24 +7876,24 @@ PUBLIC void HText_DisableCurrentForm NOARGS
 
     HTFormDisabled = TRUE;
     if (!HTMainText)
-        return;
+	return;
 
     /*
      *  Go through list of anchors and set the disabled flag.
      */
     anchor_ptr = HTMainText->first_anchor;
     while (anchor_ptr) {
-        if (anchor_ptr->link_type == INPUT_ANCHOR &&
-            anchor_ptr->input_field->number == HTFormNumber) {
+	if (anchor_ptr->link_type == INPUT_ANCHOR &&
+	    anchor_ptr->input_field->number == HTFormNumber) {
 
-            anchor_ptr->input_field->disabled = TRUE;
-        }
+	    anchor_ptr->input_field->disabled = TRUE;
+	}
 
-        if (anchor_ptr == HTMainText->last_anchor)
-            break;
+	if (anchor_ptr == HTMainText->last_anchor)
+	    break;
 
 
-        anchor_ptr = anchor_ptr->next;
+	anchor_ptr = anchor_ptr->next;
     }
 
     return;
@@ -7982,47 +7906,47 @@ PUBLIC void HText_ResetForm ARGS1(
 
     _statusline(RESETTING_FORM);
     if (!HTMainText)
-        return;
+	return;
 
     /*
      *  Go through list of anchors and reset values.
      */
     anchor_ptr = HTMainText->first_anchor;
     while (anchor_ptr) {
-        if (anchor_ptr->link_type == INPUT_ANCHOR) {
-            if (anchor_ptr->input_field->number == form->number) {
+	if (anchor_ptr->link_type == INPUT_ANCHOR) {
+	    if (anchor_ptr->input_field->number == form->number) {
 
-                 if (anchor_ptr->input_field->type == F_RADIO_TYPE ||
-                     anchor_ptr->input_field->type == F_CHECKBOX_TYPE) {
+		 if (anchor_ptr->input_field->type == F_RADIO_TYPE ||
+		     anchor_ptr->input_field->type == F_CHECKBOX_TYPE) {
 
 		    if (anchor_ptr->input_field->orig_value[0] == '0')
 		        anchor_ptr->input_field->num_value = 0;
 		    else
 		        anchor_ptr->input_field->num_value = 1;
-		
+
 		 } else if (anchor_ptr->input_field->type ==
-		 	    F_OPTION_LIST_TYPE) {
+			    F_OPTION_LIST_TYPE) {
 		    anchor_ptr->input_field->value =
 				anchor_ptr->input_field->orig_value;
-		    
+
 		    anchor_ptr->input_field->cp_submit_value =
-		    		anchor_ptr->input_field->orig_submit_value;
+				anchor_ptr->input_field->orig_submit_value;
 
 	         } else {
 		    StrAllocCopy(anchor_ptr->input_field->value,
 					anchor_ptr->input_field->orig_value);
 		 }
 	     } else if (anchor_ptr->input_field->number > form->number) {
-                 break;
+		 break;
 	     }
 
-        }
+	}
 
-        if (anchor_ptr == HTMainText->last_anchor)
-            break;
+	if (anchor_ptr == HTMainText->last_anchor)
+	    break;
 
 
-        anchor_ptr = anchor_ptr->next;
+	anchor_ptr = anchor_ptr->next;
     }
 }
 
@@ -8033,12 +7957,12 @@ PUBLIC void HText_activateRadioButton ARGS1(
     int form_number = form->number;
 
     if (!HTMainText)
-        return;
+	return;
     anchor_ptr = HTMainText->first_anchor;
     while (anchor_ptr) {
-        if (anchor_ptr->link_type == INPUT_ANCHOR &&
-                anchor_ptr->input_field->type == F_RADIO_TYPE) {
-                    
+	if (anchor_ptr->link_type == INPUT_ANCHOR &&
+		anchor_ptr->input_field->type == F_RADIO_TYPE) {
+
 	    if (anchor_ptr->input_field->number == form_number) {
 
 		    /* if it has the same name and its on */
@@ -8051,12 +7975,12 @@ PUBLIC void HText_activateRadioButton ARGS1(
 	            break;
 	    }
 
-        }
+	}
 
-        if (anchor_ptr == HTMainText->last_anchor)
-            break;
+	if (anchor_ptr == HTMainText->last_anchor)
+	    break;
 
-        anchor_ptr = anchor_ptr->next;
+	anchor_ptr = anchor_ptr->next;
    }
 
    form->num_value = 1;
@@ -8083,7 +8007,7 @@ PRIVATE void free_all_texts NOARGS
      *  Simply loop through the loaded texts list killing them off.
      */
     while (loaded_texts && !HTList_isEmpty(loaded_texts)) {
-        if ((cur = (HText *)HTList_removeLastObject(loaded_texts)) != NULL) {
+	if ((cur = (HText *)HTList_removeLastObject(loaded_texts)) != NULL) {
 	    HText_free(cur);
 	}
     }
@@ -8130,7 +8054,7 @@ PUBLIC void HText_setToolbar ARGS1(
 	HText *,	text)
 {
     if (text)
-        text->toolbar = TRUE;
+	text->toolbar = TRUE;
     return;
 }
 
@@ -8144,7 +8068,7 @@ PUBLIC void HText_setNoCache ARGS1(
 	HText *,	text)
 {
     if (text)
-        text->no_cache = TRUE;
+	text->no_cache = TRUE;
     return;
 }
 
@@ -8165,7 +8089,7 @@ PUBLIC BOOL HText_hasUTF8OutputSet ARGS1(
 **  Info on the input charset may be passed in in two forms,
 **  as a string (if given explicitly) and as a pointer to
 **  a LYUCcharset (from chartrans mechanism); either can be NULL.
-**  For Japanes the kcode will be reset at a space or explicit
+**  For Japanese the kcode will be reset at a space or explicit
 **  line or paragraph break, so what we set here may not last for
 **  long.  It's potentially more important not to set HTCJK to
 **  NOCJK unless we are sure. - kw
@@ -8176,7 +8100,7 @@ PUBLIC void HText_setKcode ARGS3(
 	LYUCcharset *,	p_in)
 {
     if (!text)
-        return;
+	return;
 
     /*
     **  Check whether we have some kind of info. - kw
@@ -8221,7 +8145,7 @@ PUBLIC void HText_setKcode ARGS3(
 	       !strcmp(charset, "iso-2022-cn")) {
 	text->kcode = EUC;
     } else {
-        /*
+	/*
 	**  If we get to here, it's not CJK, so disable that if
 	**  it is enabled.  But only if we are quite sure. - FM & kw
 	*/
@@ -8242,7 +8166,7 @@ PUBLIC void HText_setBreakPoint ARGS1(
 	HText *,	text)
 {
     if (!text)
-        return;
+	return;
 
     /*
      *  Can split here. - FM
@@ -8306,9 +8230,9 @@ PUBLIC BOOL HText_AreDifferent ARGS2(
      *  Do the docs differ in the type of request?
      */
     if (MTanc->isHEAD != anchor->isHEAD)
-        return (TRUE);
+	return (TRUE);
 
-    /* 
+    /*
      *  Are the actual URLs different, after factoring
      *  out a "LYNXIMGMAP:" leader in the MainText URL
      *  and its fragment, if present?
@@ -8317,9 +8241,9 @@ PUBLIC BOOL HText_AreDifferent ARGS2(
 			      "LYNXIMGMAP:", 11) ?
 				  MTanc->address : (MTanc->address + 11));
     if ((MTpound = strchr(MTaddress, '#')) != NULL)
-        *MTpound = '\0';
+	*MTpound = '\0';
     if (strcmp(MTaddress, anchor->address)) {
-    	if (MTpound != NULL) {
+	if (MTpound != NULL) {
 	    *MTpound = '#';
 	}
 	return(TRUE);
diff --git a/src/HTInit.c b/src/HTInit.c
index fdcd7d07..3b15191c 100644
--- a/src/HTInit.c
+++ b/src/HTInit.c
@@ -115,13 +115,13 @@ PUBLIC void HTFormatInit NOARGS
  					HTMLPresent,	2.0, 0.0, 0.0, 0);
  HTSetConversion("application/html", "www/source",
  					HTPlainPresent,	1.0, 0.0, 0.0, 0);
- HTSetConversion("application/x-wais-source", "www/source",  	     
+ HTSetConversion("application/x-wais-source", "www/source",
 					HTPlainPresent,	1.0, 0.0, 0.0, 0);
- HTSetConversion("application/x-wais-source", "www/present",  	     
+ HTSetConversion("application/x-wais-source", "www/present",
 				        HTWSRCConvert,	2.0, 0.0, 0.0, 0);
- HTSetConversion("application/x-wais-source", "www/download",  	     
+ HTSetConversion("application/x-wais-source", "www/download",
 					HTWSRCConvert,	1.0, 0.0, 0.0, 0);
- HTSetConversion("application/x-wais-source", "www/dump",  	     
+ HTSetConversion("application/x-wais-source", "www/dump",
 					HTWSRCConvert,	1.0, 0.0, 0.0, 0);
 
  /*
@@ -200,19 +200,19 @@ PUBLIC void HTPreparsedFormatInit NOARGS
 /*
 Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
 
-Permission to use, copy, modify, and distribute this material 
-for any purpose and without fee is hereby granted, provided 
-that the above copyright notice and this permission notice 
-appear in all copies, and that the name of Bellcore not be 
-used in advertising or publicity pertaining to this 
-material without the specific, prior written permission 
-of an authorized representative of Bellcore.  BELLCORE 
-MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY 
-OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", 
+Permission to use, copy, modify, and distribute this material
+for any purpose and without fee is hereby granted, provided
+that the above copyright notice and this permission notice
+appear in all copies, and that the name of Bellcore not be
+used in advertising or publicity pertaining to this
+material without the specific, prior written permission
+of an authorized representative of Bellcore.  BELLCORE
+MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY
+OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS",
 WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
 */
-/****************************************************** 
-    Metamail -- A tool to help diverse mail readers 
+/******************************************************
+    Metamail -- A tool to help diverse mail readers
                 cope with diverse multimedia mail formats.
 
     Author:  Nathaniel S. Borenstein, Bellcore
@@ -248,19 +248,19 @@ PRIVATE char *GetCommand ARGS2(
 
     /* marca -- added + 1 for error case -- oct 24, 1993. */
     s2 = malloc(strlen(s)*2 + 1); /* absolute max, if all % signs */
-    if (!s2) 
-        ExitWithError("Out of memory");
+    if (!s2)
+	ExitWithError("Out of memory");
 
     *t = s2;
     while (s && *s) {
 	if (quoted) {
-            if (*s == '%') *s2++ = '%'; /* Quote through next level, ugh! */
+	    if (*s == '%') *s2++ = '%'; /* Quote through next level, ugh! */
 
-            *s2++ = *s++;
+	    *s2++ = *s++;
 	    quoted = 0;
 	} else {
 	    if (*s == ';') {
-                *s2 = '\0';
+		*s2 = '\0';
 		return(++s);
 	    }
 	    if (*s == '\\') {
@@ -273,25 +273,25 @@ PRIVATE char *GetCommand ARGS2(
     }
     *s2 = '\0';
     return(NULL);
-}	
+}
 
 /* no leading or trailing space, all lower case */
 PRIVATE char *Cleanse ARGS1(
-	char *,		s) 
+	char *,		s)
 {
     char *tmp, *news;
-    
+
     /* strip leading white space */
     while (*s && isspace((unsigned char) *s))
-        ++s;
+	++s;
     news = s;
     /* put in lower case */
     for (tmp=s; *tmp; ++tmp) {
-        *tmp = TOLOWER ((unsigned char)*tmp);
+	*tmp = TOLOWER ((unsigned char)*tmp);
     }
     /* strip trailing white space */
     while ((tmp > news) && *--tmp && isspace((unsigned char) *tmp))
-        *tmp = '\0';
+	*tmp = '\0';
     return(news);
 }
 
@@ -304,19 +304,19 @@ PRIVATE int ProcessMailcapEntry ARGS2(
     char *rawentry, *s, *t, *LineBuf;
 
     LineBuf = (char *)malloc(LINE_BUF_SIZE);
-    if (!LineBuf) 
-        ExitWithError("Out of memory");
+    if (!LineBuf)
+	ExitWithError("Out of memory");
     rawentry = (char *)malloc(1 + rawentryalloc);
-    if (!rawentry) 
-        ExitWithError("Out of memory");
+    if (!rawentry)
+	ExitWithError("Out of memory");
     *rawentry = '\0';
     while (fgets(LineBuf, LINE_BUF_SIZE, fp)) {
-	if (LineBuf[0] == '#') 
+	if (LineBuf[0] == '#')
 	    continue;
-        len = strlen(LineBuf);
-        if (len == 0) 
+	len = strlen(LineBuf);
+	if (len == 0)
 	    continue;
-        if (LineBuf[len-1] == '\n') 
+	if (LineBuf[len-1] == '\n')
 	    LineBuf[--len] = '\0';
 	if ((len + strlen(rawentry)) > rawentryalloc) {
 	    rawentryalloc += 2000;
@@ -325,7 +325,7 @@ PRIVATE int ProcessMailcapEntry ARGS2(
 	        ExitWithError("Out of memory");
 	}
 	if (len > 0 && LineBuf[len-1] == '\\') {
-            LineBuf[len-1] = '\0';
+	    LineBuf[len-1] = '\0';
 	    strcat(rawentry, LineBuf);
 	} else {
 	    strcat(rawentry, LineBuf);
@@ -336,7 +336,7 @@ PRIVATE int ProcessMailcapEntry ARGS2(
     FREE(LineBuf);
 
     for (s = rawentry; *s && isspace((unsigned char) *s); ++s)
-        ;
+	;
     if (!*s) {
 	/* totally blank entry -- quietly ignore */
 	FREE(rawentry);
@@ -354,7 +354,7 @@ PRIVATE int ProcessMailcapEntry ARGS2(
     }
     *s++ = '\0';
     if (!strncasecomp(rawentry, "text/html", 9) ||
-        !strncasecomp(rawentry, "text/plain", 10)) {
+	!strncasecomp(rawentry, "text/plain", 10)) {
 	--s;
 	*s = ';';
 	if (TRACE) {
@@ -366,7 +366,7 @@ PRIVATE int ProcessMailcapEntry ARGS2(
 	return(0);
     }
     for (i = 0, j = 0; rawentry[i]; i++) {
-        if (rawentry[i] != ' ') {
+	if (rawentry[i] != ' ') {
 	    rawentry[j++] = TOLOWER(rawentry[i]);
 	}
     }
@@ -379,23 +379,23 @@ PRIVATE int ProcessMailcapEntry ARGS2(
     mc->printcommand = NULL;
     mc->contenttype = (char *)malloc(1 + strlen(rawentry));
     if (!mc->contenttype)
-        ExitWithError("Out of memory");
+	ExitWithError("Out of memory");
     strcpy(mc->contenttype, rawentry);
     mc->quality = 1.0;
     mc->maxbytes = 0;
     t = GetCommand(s, &mc->command);
     if (!t) {
-        goto assign_presentation;
+	goto assign_presentation;
     }
     s = t;
     while (s && *s && isspace((unsigned char) *s)) ++s;
     while (s) {
 	char *arg, *eq, *mallocd_string;
 
-        t = GetCommand(s, &mallocd_string);
+	t = GetCommand(s, &mallocd_string);
 	arg = mallocd_string;
-        eq = strchr(arg, '=');
-        if (eq) {
+	eq = strchr(arg, '=');
+	if (eq) {
 	    *eq++ = '\0';
 	}
 	if (arg && *arg) {
@@ -413,7 +413,7 @@ PRIVATE int ProcessMailcapEntry ARGS2(
 			    mc->testcommand);
 	    } else if (eq && !strcmp(arg, "description")) {
 		mc->label = eq;
-	    } else if (eq && !strcmp(arg, "label")) { 
+	    } else if (eq && !strcmp(arg, "label")) {
 		mc->label = eq; /* bogus old name for description */
 	    } else if (eq && !strcmp(arg, "print")) {
 		mc->printcommand = eq;
@@ -460,20 +460,20 @@ assign_presentation:
 PRIVATE void BuildCommand ARGS5(
 	char **, 	pBuf,
 	size_t,		Bufsize,
-	char *,		controlstring, 
+	char *,		controlstring,
 	char *,		TmpFileName,
 	size_t,		TmpFileLen)
 {
     char *from, *to;
-    int prefixed = 0; 
+    int prefixed = 0;
 
     for (from = controlstring, to = *pBuf; *from != '\0'; from++) {
-        if (prefixed) {
-            prefixed = 0;
-            switch(*from) {
-                case '%':
-                    *to++ = '%';
-                    break;
+	if (prefixed) {
+	    prefixed = 0;
+	    switch(*from) {
+		case '%':
+		    *to++ = '%';
+		    break;
 		case 'n':
 		case 'F':
 		    if (TRACE) {
@@ -482,37 +482,37 @@ PRIVATE void BuildCommand ARGS5(
 				controlstring);
 		    }
 		case 's':
-                    if (TmpFileLen && TmpFileName) {
+		    if (TmpFileLen && TmpFileName) {
 			if ((to - *pBuf) + TmpFileLen + 1 > Bufsize) {
 			    *to = '\0';
 			    if (TRACE) {
 				fprintf(stderr,
 			"BuildCommand: Too long mailcap \"test\" clause,\n");
 				fprintf(stderr,
-			"	       ignoring: %s%s...\n",
+					"              ignoring: %s%s...\n",
 					*pBuf, TmpFileName);
 			    }
 			    **pBuf = '\0';
 			    return;
 			}
-                        strcpy(to, TmpFileName);
-                        to += strlen(TmpFileName);
-                    }
-                    break;
-                default:
+			strcpy(to, TmpFileName);
+			to += strlen(TmpFileName);
+		    }
+		    break;
+		default:
 		    if (TRACE) {
-                    	fprintf(stderr,
+			fprintf(stderr,
   "BuildCommand: Ignoring unrecognized format code in mailcap file '%%%c'.\n",
 			*from);
 		    }
-                    break;
-            }
-        } else if (*from == '%') {
-            prefixed = 1;
-        } else {
-            *to++ = *from;
-        }
-        if (to >= *pBuf + Bufsize) {
+		    break;
+	    }
+	} else if (*from == '%') {
+	    prefixed = 1;
+	} else {
+	    *to++ = *from;
+	}
+	if (to >= *pBuf + Bufsize) {
 	    (*pBuf)[Bufsize - 1] = '\0';
 	    if (TRACE) {
 		fprintf(stderr,
@@ -521,7 +521,7 @@ PRIVATE void BuildCommand ARGS5(
 			"              ignoring: %s...\n",
 			*pBuf);
 	    }
-            **pBuf = '\0';
+	    **pBuf = '\0';
 	    return;
 	}
     }
@@ -539,38 +539,38 @@ PRIVATE int PassesTest ARGS1(
      *  Make sure we have a command
      */
     if (!mc->testcommand)
-        return(1);
+	return(1);
 
     /*
      *  Save overhead of system() calls by faking these. - FM
      */
     if (0 == strcasecomp(mc->testcommand, "test -n \"$DISPLAY\"")) {
-        FREE(mc->testcommand);
-        if (TRACE)
+	FREE(mc->testcommand);
+	if (TRACE)
 	    fprintf(stderr,
-		    "PassesTest: Testing for XWINDOWS environment - ");
+		    "PassesTest: Testing for XWINDOWS environment.\n");
     	if ((cp = getenv(DISPLAY)) != NULL && *cp != '\0') {
 	    if (TRACE)
-	        fprintf(stderr,"passed!\n");
+	        fprintf(stderr,"PassesTest: Test passed!\n");
 	    return(0 == 0);
 	} else {
 	    if (TRACE)
-	        fprintf(stderr,"failed!\n");
+	        fprintf(stderr,"PassesTest: Test failed!\n");
 	    return(-1 == 0);
 	}
     }
     if (0 == strcasecomp(mc->testcommand, "test -z \"$DISPLAY\"")) {
-        FREE(mc->testcommand);
-        if (TRACE)
+	FREE(mc->testcommand);
+	if (TRACE)
 	    fprintf(stderr,
-		    "PassesTest: Testing for NON_XWINDOWS environment - ");
+		    "PassesTest: Testing for NON_XWINDOWS environment.\n");
     	if (!((cp = getenv(DISPLAY)) != NULL && *cp != '\0')) {
 	    if (TRACE)
-	        fprintf(stderr,"passed!\n");
+	        fprintf(stderr,"PassesTest: Test passed!\n");
 	    return(0 == 0);
 	} else {
 	    if (TRACE)
-	        fprintf(stderr,"failed!\n");
+	        fprintf(stderr,"PassesTest: Test failed!\n");
 	    return(-1 == 0);
 	}
     }
@@ -579,11 +579,11 @@ PRIVATE int PassesTest ARGS1(
      *  Why do anything but return success for this one! - FM
      */
     if (0 == strcasecomp(mc->testcommand, "test -n \"$LYNX_VERSION\"")){
-        FREE(mc->testcommand);
-        if (TRACE) {
+	FREE(mc->testcommand);
+	if (TRACE) {
 	    fprintf(stderr,
-		    "PassesTest: Testing for LYNX environment - ");
-	    fprintf(stderr,"passed, of course!\n");
+		    "PassesTest: Testing for LYNX environment.\n");
+	    fprintf(stderr,"PassesTest: Test passed!\n");
 	}
 	return(0 == 0);
     } else
@@ -591,11 +591,11 @@ PRIVATE int PassesTest ARGS1(
      *  ... or failure for this one! - FM
      */
     if (0 == strcasecomp(mc->testcommand, "test -z \"$LYNX_VERSION\"")) {
-        FREE(mc->testcommand);
-        if (TRACE) {
+	FREE(mc->testcommand);
+	if (TRACE) {
 	    fprintf(stderr,
-		    "PassesTest: Testing for non-LYNX environment - ");
-	    fprintf(stderr,"failed, of course!\n");
+		    "PassesTest: Testing for non-LYNX environment.\n");
+	    fprintf(stderr,"PassesTest: Test failed!\n");
 	}
 	return(-1 == 0);
     }
@@ -606,13 +606,13 @@ PRIVATE int PassesTest ARGS1(
     tempname(TmpFileName, NEW_FILE);
     cmd = (char *)malloc(1024);
     if (!cmd)
-        ExitWithError("Out of memory");
+	ExitWithError("Out of memory");
     BuildCommand(&cmd, 1024,
 		 mc->testcommand,
 		 TmpFileName,
 		 strlen(TmpFileName));
     if (TRACE)
-        fprintf(stderr,"PassesTest: Executing test command: %s\n", cmd);
+	fprintf(stderr,"PassesTest: Executing test command: %s\n", cmd);
     result = system(cmd);
     FREE(cmd);
 
@@ -626,7 +626,7 @@ PRIVATE int PassesTest ARGS1(
 	fprintf(stderr,"PassesTest: Test failed!\n");
     else if (TRACE)
 	fprintf(stderr,"PassesTest: Test passed!\n");
-	
+
     return(result == 0);
 }
 
@@ -637,11 +637,11 @@ PRIVATE int ProcessMailcapFile ARGS1(
     FILE *fp;
 
     if (TRACE)
-        fprintf(stderr,
+	fprintf(stderr,
 		"ProcessMailcapFile: Loading file '%s'.\n",
 		file);
     if ((fp = fopen(file, "r")) == NULL) {
-        if (TRACE)
+	if (TRACE)
 	    fprintf(stderr,
 		"ProcessMailcapFile: Could not open '%s'.\n",
 		    file);
@@ -649,7 +649,7 @@ PRIVATE int ProcessMailcapFile ARGS1(
     }
 
     while (fp && !feof(fp)) {
-        ProcessMailcapEntry(fp, &mc);
+	ProcessMailcapEntry(fp, &mc);
     }
     fclose(fp);
     return(0 == 0);
@@ -659,7 +659,7 @@ PRIVATE int ExitWithError ARGS1(
 	char *,		txt)
 {
     if (txt)
-        fprintf(stderr, "metamail: %s\n", txt);
+	fprintf(stderr, "metamail: %s\n", txt);
 #ifndef NOSIGHUP
     (void) signal(SIGHUP, SIG_DFL);
 #endif /* NOSIGHUP */
@@ -705,7 +705,7 @@ PUBLIC void HTFileInit NOARGS
     FILE *fp;
 
     if (TRACE)
-        fprintf(stderr,
+	fprintf(stderr,
 		"HTFileInit: Loading default (HTInit) extension maps.\n");
 
     /* default suffix interpretation */
@@ -743,7 +743,7 @@ PUBLIC void HTFileInit NOARGS
 
     HTSetSuffix(".exe.Z",	"application/x-Comp. Executable",
     							     "binary", 1.0);
-  
+
     HTSetSuffix(".Z",	        "application/UNIX Compressed", "binary", 1.0);
 
     HTSetSuffix(".tar_Z",	"application/UNIX Compr. Tar", "binary", 1.0);
@@ -761,7 +761,7 @@ PUBLIC void HTFileInit NOARGS
 
     HTSetSuffix(".zip",		"application/x-Zip File", "binary", 1.0);
 
-    HTSetSuffix(".uu",		"application/x-UUencoded", "8bit", 1.0); 
+    HTSetSuffix(".uu",		"application/x-UUencoded", "8bit", 1.0);
 
     HTSetSuffix(".hqx",		"application/x-Binhex", "8bit", 1.0);
 
@@ -775,13 +775,13 @@ PUBLIC void HTFileInit NOARGS
     HTSetSuffix(".eps",		"application/Postscript", "8bit", 1.0);
     HTSetSuffix(".ai",		"application/Postscript", "8bit", 1.0);
     HTSetSuffix(".ps",		"application/Postscript", "8bit", 1.0);
-  
+
     HTSetSuffix(".rtf",		"application/RTF", "8bit", 1.0);
 
     HTSetSuffix(".dvi",		"application/x-DVI", "8bit", 1.0);
 
     HTSetSuffix(".hdf",		"application/x-HDF", "8bit", 1.0);
-  
+
     HTSetSuffix(".cdf",		"application/x-netcdf", "8bit", 1.0);
     HTSetSuffix(".nc",		"application/x-netcdf", "8bit", 1.0);
 
@@ -858,7 +858,7 @@ PUBLIC void HTFileInit NOARGS
     HTSetSuffix(".wav",		"audio/x-wav", "binary", 1.0);
     HTSetSuffix(".midi",	"audio/midi", "binary", 1.0);
     HTSetSuffix(".mod",		"audio/mod", "binary", 1.0);
-  
+
     HTSetSuffix(".gif",		"image/gif", "binary", 1.0);
     HTSetSuffix(".ief",		"image/ief", "binary", 1.0);
     HTSetSuffix(".jfif",	"image/jpeg", "binary", 1.0); /* xtra */
@@ -915,19 +915,19 @@ PUBLIC void HTFileInit NOARGS
     HTLoadExtensionsConfigFile(global_extension_map);
 
     if ((fp = fopen(personal_extension_map,"r")) != NULL) {
-        fclose(fp);
-        /* These should override everything else. */
-        HTLoadExtensionsConfigFile(personal_extension_map);
+	fclose(fp);
+	/* These should override everything else. */
+	HTLoadExtensionsConfigFile(personal_extension_map);
     } else {
-        char buffer[256];
+	char buffer[256];
 #ifdef VMS
-        sprintf(buffer, "sys$login:%s", personal_extension_map);
+	sprintf(buffer, "sys$login:%s", personal_extension_map);
 #else
-        sprintf(buffer, "%s/%s", (Home_Dir() ? Home_Dir() : ""),
+	sprintf(buffer, "%s/%s", (Home_Dir() ? Home_Dir() : ""),
 				  personal_extension_map);
 #endif /* VMS */
-        /* These should override everything else. */
-        HTLoadExtensionsConfigFile(buffer);
+	/* These should override everything else. */
+	HTLoadExtensionsConfigFile(buffer);
     }
 }
 
@@ -946,12 +946,12 @@ PUBLIC void HTFileInit NOARGS
 PRIVATE int HTGetLine ARGS3(
 	char *,		s,
 	int,		n,
-	FILE *,		f) 
+	FILE *,		f)
 {
     register int i = 0, r;
 
     if (!f)
-        return(1);
+	return(1);
 
     while (1) {
 	r = fgetc(f);
@@ -977,21 +977,21 @@ PRIVATE void HTGetWord ARGS4(
 	char *,		word,
 	char *,		line,
 	char ,		stop,
-	char ,		stop2) 
+	char ,		stop2)
 {
     int x = 0, y;
 
     for (x = 0; line[x] && line[x] != stop && line[x] != stop2; x++) {
-        word[x] = line[x];
+	word[x] = line[x];
     }
 
     word[x] = '\0';
-    if (line[x]) 
-        ++x;
+    if (line[x])
+	++x;
     y=0;
 
     while ((line[y++] = line[x++]))
-        ;
+	;
 
     return;
 }
@@ -1004,41 +1004,41 @@ PRIVATE int HTLoadExtensionsConfigFile ARGS1(
     int x, count = 0;
 
     if (TRACE)
-        fprintf(stderr,
+	fprintf(stderr,
 		"HTLoadExtensionsConfigFile: Loading file '%s'.\n", fn);
 
     if ((f = fopen(fn,"r")) == NULL) {
-        if (TRACE)
-            fprintf(stderr,
+	if (TRACE)
+	    fprintf(stderr,
 		    "HTLoadExtensionsConfigFile: Could not open '%s'.\n", fn);
 	    return count;
     }
 
     while (!(HTGetLine(l,MAX_STRING_LEN,f))) {
-        HTGetWord(w, l, ' ', '\t');
-        if (l[0] == '\0' || w[0] == '#')
-            continue;
-        ct = (char *)malloc(sizeof(char) * (strlen(w) + 1));
-        if (!ct)
-            outofmem(__FILE__, "HTLoadExtensionsConfigFile");
-        strcpy(ct,w);
-        for (x = 0; ct[x]; x++)
-            ct[x] = TOLOWER(ct[x]);
-
-        while(l[0]) {
-            HTGetWord(w, l, ' ', '\t');
-            if (w[0] && (w[0] != ' ')) {
-                char *ext = (char *)malloc(sizeof(char) * (strlen(w)+1+1));
+	HTGetWord(w, l, ' ', '\t');
+	if (l[0] == '\0' || w[0] == '#')
+	    continue;
+	ct = (char *)malloc(sizeof(char) * (strlen(w) + 1));
+	if (!ct)
+	    outofmem(__FILE__, "HTLoadExtensionsConfigFile");
+	strcpy(ct,w);
+	for (x = 0; ct[x]; x++)
+	    ct[x] = TOLOWER(ct[x]);
+
+	while(l[0]) {
+	    HTGetWord(w, l, ' ', '\t');
+	    if (w[0] && (w[0] != ' ')) {
+		char *ext = (char *)malloc(sizeof(char) * (strlen(w)+1+1));
 	        if (!ct)
 	            outofmem(__FILE__, "HTLoadExtensionsConfigFile");
 
-                for (x = 0; w[x]; x++)
-                    ext[x+1] = TOLOWER(w[x]);
-                ext[0] = '.';
-                ext[strlen(w)+1] = '\0';
+		for (x = 0; w[x]; x++)
+		    ext[x+1] = TOLOWER(w[x]);
+		ext[0] = '.';
+		ext[strlen(w)+1] = '\0';
 
-                if (TRACE) {
-                    fprintf (stderr,
+		if (TRACE) {
+		    fprintf (stderr,
 			     "SETTING SUFFIX '%s' to '%s'.\n", ext, ct);
 		}
 
@@ -1050,12 +1050,12 @@ PRIVATE int HTLoadExtensionsConfigFile ARGS1(
 		    HTSetSuffix (ext, ct, "8bit", 1.0);
 	        else
 		    HTSetSuffix (ext, ct, "binary", 1.0);
-                count++;
+		count++;
 
-                FREE(ext);
-            }
-        }
-        FREE(ct);
+		FREE(ext);
+	    }
+	}
+	FREE(ct);
     }
     fclose(f);
 
diff --git a/src/HTML.c b/src/HTML.c
index b769c3ad..069d82d8 100644
--- a/src/HTML.c
+++ b/src/HTML.c
@@ -701,6 +701,8 @@ PRIVATE void HTML_start_element ARGS6(
 	      ElementNumber == HTML_BASE)) {
 	    return;
 	}
+    } else if (!me->text) {
+	UPDATE_STYLE;
     }
 
 #ifdef EXP_CHARTRANS
@@ -774,16 +776,15 @@ PRIVATE void HTML_start_element ARGS6(
 	me->inStyle[element_number]=1; /* this is a goodthing(tm) */
 #endif
 
+    /*
+     *  Handle the start tag. - FM
+     */
     switch (ElementNumber) {
 
     case HTML_HTML:
-	if (!me->text)
-	    UPDATE_STYLE;
 	break;
 
     case HTML_HEAD:
-	if (!me->text)
-	    UPDATE_STYLE;
 	break;
 
     case HTML_BASE:
@@ -889,22 +890,16 @@ PRIVATE void HTML_start_element ARGS6(
 	break;
 
     case HTML_META:
-        if (!me->text)
-	    UPDATE_STYLE;
 	if (present)
 	    LYHandleMETA(me, present, value, (char **)&include);
 	break;
 
     case HTML_TITLE:
-	if (!me->text)
-	    UPDATE_STYLE;
         HTChunkClear(&me->title);
 	break;
 
     case HTML_LINK:
 	intern_flag = FALSE;
-	if (!me->text)
-	    UPDATE_STYLE;
 	if (present && present[HTML_LINK_HREF]) {
 	    CHECK_FOR_INTERN(value[HTML_LINK_HREF]);
 	    /*
@@ -1246,8 +1241,6 @@ PRIVATE void HTML_start_element ARGS6(
 	break;
 
     case HTML_ISINDEX:
-	if (!me->text)
-	    UPDATE_STYLE;
 	if (((present)) &&
 	    ((present[HTML_ISINDEX_HREF] && value[HTML_ISINDEX_HREF]) ||
 	     (present[HTML_ISINDEX_ACTION] && value[HTML_ISINDEX_ACTION]))) {
@@ -1329,8 +1322,6 @@ PRIVATE void HTML_start_element ARGS6(
 	break;
 
     case HTML_NEXTID:
-	if (!me->text)
-	    UPDATE_STYLE;
     	/* if (present && present[NEXTID_N] && value[NEXTID_N])
 		HText_setNextId(me->text, atoi(value[NEXTID_N])); */
     	break;
@@ -1340,8 +1331,6 @@ PRIVATE void HTML_start_element ARGS6(
 	 *  We're getting it as Litteral text, which, for now,
 	 *  we'll just ignore. - FM
 	 */
-	if (!me->text)
-	    UPDATE_STYLE;
 	HTChunkClear(&me->style_block);
 	break;
 
@@ -1350,27 +1339,19 @@ PRIVATE void HTML_start_element ARGS6(
 	 *  We're getting it as Litteral text, which, for now,
 	 *  we'll just ignore. - FM
 	 */
-	if (!me->text)
-	    UPDATE_STYLE;
 	HTChunkClear(&me->script);
 	break;
 
     case HTML_BODY:
-	if (!me->text)
-	    UPDATE_STYLE;
 	CHECK_ID(HTML_BODY_ID);
 	if (HText_hasToolbar(me->text))
 	    HText_appendParagraph(me->text);
 	break;
 
     case HTML_FRAMESET:
-	if (!me->text)
-	    UPDATE_STYLE;
 	break;
 
     case HTML_FRAME:
-	if (!me->text)
-	    UPDATE_STYLE;
 	if (present && present[HTML_FRAME_NAME] &&
 	    value[HTML_FRAME_NAME] && *value[HTML_FRAME_NAME]) {
 	    StrAllocCopy(id_string, value[HTML_FRAME_NAME]);
@@ -1447,15 +1428,11 @@ PRIVATE void HTML_start_element ARGS6(
 	break;
 
     case HTML_NOFRAMES:
-	if (!me->text)
-	    UPDATE_STYLE;
 	LYEnsureDoubleSpace(me);
 	LYResetParagraphAlignment(me);
 	break;
 
     case HTML_IFRAME:
-	if (!me->text)
-	    UPDATE_STYLE;
 	if (present && present[HTML_IFRAME_NAME] &&
 	    value[HTML_IFRAME_NAME] && *value[HTML_IFRAME_NAME]) {
 	    StrAllocCopy(id_string, value[HTML_IFRAME_NAME]);
@@ -1620,8 +1597,6 @@ PRIVATE void HTML_start_element ARGS6(
 	     me->sp[0].tag_number == HTML_DIR)) {
 	    if (HTML_dtd.tags[HTML_LH].contents == SGML_EMPTY) {
 		ElementNumber = HTML_LH;
-		if (!me->text)
-		    UPDATE_STYLE;
 	    } else {
 		me->new_style = me->sp[0].style;
 		ElementNumber = me->sp[0].tag_number;
@@ -1990,13 +1965,9 @@ PRIVATE void HTML_start_element ARGS6(
 	break;
 
     case HTML_BASEFONT:
-	if (!me->text)
-	    UPDATE_STYLE;
 	break;
 
     case HTML_FONT:
-	if (!me->text)
-	    UPDATE_STYLE;
 
         /*
 	 *  FONT *may* have been declared SGML_EMPTY in HTMLDTD.c, and
@@ -2068,16 +2039,12 @@ PRIVATE void HTML_start_element ARGS6(
     case HTML_SUP:
     case HTML_TT:
     case HTML_VAR:
-        if (!me->text)
-	    UPDATE_STYLE;
 	CHECK_ID(HTML_GEN_ID);
 	break; /* ignore */
 
     case HTML_DEL:
     case HTML_S:
     case HTML_STRIKE:
-        if (!me->text)
-	    UPDATE_STYLE;
 	CHECK_ID(HTML_GEN_ID);
 	if (me->inUnderline == FALSE)
 	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
@@ -2089,8 +2056,6 @@ PRIVATE void HTML_start_element ARGS6(
 	break;
 
     case HTML_INS:
-        if (!me->text)
-	    UPDATE_STYLE;
 	CHECK_ID(HTML_GEN_ID);
 	if (me->inUnderline == FALSE)
 	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
@@ -2102,8 +2067,6 @@ PRIVATE void HTML_start_element ARGS6(
 	break;
 
     case HTML_Q:
-	if (!me->text)
-	    UPDATE_STYLE;
 	CHECK_ID(HTML_GEN_ID);
         /*
 	 *  Should check LANG and/or DIR attributes, and the
@@ -2120,11 +2083,15 @@ PRIVATE void HTML_start_element ARGS6(
 	break;
 
     case HTML_PRE:				/* Formatted text */
-        if (!HText_PreviousLineSize(me->text, FALSE))
-	    me->inPRE = FALSE;
-	else
-            me->inPRE = TRUE;
-    case HTML_LISTING:				/* Litteral text */
+        /*
+	**  Set our inPRE flag to FALSE so that a newline
+	**  immediately following the PRE start tag will
+	**  be ignored.  HTML_put_character() will set it
+	**  to TRUE when the first character within the
+	**  PRE block is received. - FM
+	*/
+	me->inPRE = FALSE;
+    case HTML_LISTING:				/* Literal text */
     case HTML_XMP:
     case HTML_PLAINTEXT:
 	change_paragraph_style(me, styles[ElementNumber]);
@@ -2231,8 +2198,6 @@ PRIVATE void HTML_start_element ARGS6(
         break;
 
     case HTML_DT:
-	if (!me->text)
-	    UPDATE_STYLE;
 	CHECK_ID(HTML_GEN_ID);
         if (!me->style_change) {
 	    HText_appendParagraph(me->text);
@@ -2243,8 +2208,6 @@ PRIVATE void HTML_start_element ARGS6(
 	break;
 
     case HTML_DD:
-	if (!me->text)
-	    UPDATE_STYLE;
 	CHECK_ID(HTML_GEN_ID);
 	HText_setLastChar(me->text, ' ');  /* absorb white space */
         if (!me->style_change)  {
@@ -2581,8 +2544,6 @@ PRIVATE void HTML_start_element ARGS6(
 	break;
 
     case HTML_SPAN:
-	if (!me->text)
-	    UPDATE_STYLE;
 	CHECK_ID(HTML_GEN_ID);
         /*
 	 *  Should check LANG and/or DIR attributes, and the
@@ -2592,8 +2553,6 @@ PRIVATE void HTML_start_element ARGS6(
 	break;
 
     case HTML_BDO:
-	if (!me->text)
-	    UPDATE_STYLE;
 	CHECK_ID(HTML_GEN_ID);
         /*
 	 *  Should check DIR (and LANG) attributes, and the
@@ -2603,8 +2562,6 @@ PRIVATE void HTML_start_element ARGS6(
 	break;
 
     case HTML_SPOT:
-	if (!me->text)
-	    UPDATE_STYLE;
 	CHECK_ID(HTML_GEN_ID);
 	break;
 
@@ -2642,8 +2599,6 @@ PRIVATE void HTML_start_element ARGS6(
 	 *  Set to know we are in an anchor.
 	 */
 	me->inA = TRUE;
-	if (!me->text)
-	    UPDATE_STYLE;
 
 	/*
 	 *  Load id_string if we have an ID or NAME. - FM
@@ -2834,8 +2789,6 @@ PRIVATE void HTML_start_element ARGS6(
     	break;
 
     case HTML_IMG:			/* Images */
-	if (!me->text)
-	    UPDATE_STYLE;
 	/*
 	 *  If we're in an anchor, get the destination, and if it's a
 	 *  clickable image for the current anchor, set our flags for
@@ -3527,8 +3480,6 @@ PRIVATE void HTML_start_element ARGS6(
 
     case HTML_FIG:
         me->inFIG = TRUE;
-	if (!me->text)
-	    UPDATE_STYLE;
 	if (me->inA) {
 	    SET_SKIP_STACK(HTML_A);
 	    HTML_end_element(me, HTML_A, (char **)&include);
@@ -3595,8 +3546,6 @@ PRIVATE void HTML_start_element ARGS6(
 	break;
 
     case HTML_OBJECT:
-	if (!me->text)
-	    UPDATE_STYLE;
 	if (!me->object_started) {
 	    /*
 	     *  This is an outer OBJECT start tag,
@@ -3773,12 +3722,8 @@ PRIVATE void HTML_start_element ARGS6(
 					NULL,			/* Tag */
 					href,			/* Addresss */
 					INTERN_LT);		/* Type */
-		if (!me->text) {
-		    UPDATE_STYLE;
-		} else {
-		    HTML_put_character(me, ' ');
-		    HText_appendCharacter(me->text, '+');
-		}
+		HTML_put_character(me, ' ');
+		HText_appendCharacter(me->text, '+');
 		me->CurrentANum = HText_beginAnchor(me->text,
 						    me->inUnderline,
 						    me->CurrentA);
@@ -3798,8 +3743,6 @@ PRIVATE void HTML_start_element ARGS6(
     case HTML_APPLET:
         me->inAPPLET = TRUE;
 	me->inAPPLETwithP = FALSE;
-	if (!me->text)
-	    UPDATE_STYLE;
 	HTML_put_character(me, ' ');  /* space char may be ignored */
 	/*
 	 *  Load id_string if we have an ID or NAME. - FM
@@ -3990,8 +3933,6 @@ PRIVATE void HTML_start_element ARGS6(
 			         me->inBASE) ?
 			       me->base_href : me->node_anchor->address));
 
-	    if (!me->text)
-	        UPDATE_STYLE;
 	    if (me->inA) {
 		if (me->inBoldA == TRUE && me->inBoldH == FALSE)
 		    HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
@@ -4025,8 +3966,6 @@ PRIVATE void HTML_start_element ARGS6(
 	break;
 
     case HTML_EMBED:
-	if (!me->text)
-	    UPDATE_STYLE;
 	if (pseudo_inline_alts || clickable_images)
 	    HTML_put_character(me, ' ');  /* space char may be ignored */
 	/*
@@ -4156,8 +4095,6 @@ PRIVATE void HTML_start_element ARGS6(
 	break;
 
     case HTML_CREDIT:
-	if (!me->text)
-	    UPDATE_STYLE;
 	LYEnsureDoubleSpace(me);
 	LYResetParagraphAlignment(me);
 	me->inCREDIT = TRUE;
@@ -4189,8 +4126,6 @@ PRIVATE void HTML_start_element ARGS6(
 	break;
 
     case HTML_CAPTION:
-	if (!me->text)
-	    UPDATE_STYLE;
 	LYEnsureDoubleSpace(me);
 	LYResetParagraphAlignment(me);
 	me->inCAPTION = TRUE;
@@ -4231,8 +4166,6 @@ PRIVATE void HTML_start_element ARGS6(
 	    HTChildAnchor * source;
 	    HTAnchor *link_dest;
 
-	    if (!me->text)
-	        UPDATE_STYLE;
 	    /*
 	     *  FORM may have been declared SGML_EMPTY in HTMLDTD.c, and
 	     *  SGML_character() in SGML.c may check for a FORM end
@@ -4377,16 +4310,12 @@ PRIVATE void HTML_start_element ARGS6(
 	break;
 
     case HTML_FIELDSET:
-	if (!me->text)
-	    UPDATE_STYLE;
 	LYEnsureDoubleSpace(me);
 	LYResetParagraphAlignment(me);
         CHECK_ID(HTML_FIELDSET_ID);
         break;
 
     case HTML_LEGEND:
-	if (!me->text)
-	    UPDATE_STYLE;
 	LYEnsureDoubleSpace(me);
 	LYResetParagraphAlignment(me);
         CHECK_ID(HTML_LEGEND_ID);
@@ -5144,8 +5073,6 @@ PRIVATE void HTML_start_element ARGS6(
 				id_string,		/* Tag */
 				NULL,			/* Addresss */
 				(HTLinkType*)0))) {	/* Type */
-		if (!me->text)
-		    UPDATE_STYLE;
 		HText_beginAnchor(me->text, me->inUnderline, ID_A);
 		HText_endAnchor(me->text, 0);
 		StrAllocCopy(me->textarea_id, id_string);
@@ -5228,8 +5155,6 @@ PRIVATE void HTML_start_element ARGS6(
 	     */
 	    me->inSELECT = TRUE;
 
-	    if (!me->text)
-	        UPDATE_STYLE;
 	    if (!(present && present[HTML_SELECT_NAME] &&
 		  value[HTML_SELECT_NAME]  && *value[HTML_SELECT_NAME])) {
 	        StrAllocCopy(name, "");
@@ -5322,8 +5247,6 @@ PRIVATE void HTML_start_element ARGS6(
 		break;
 	    }
 
-	    if (!me->text)
-	        UPDATE_STYLE;
 	    if (!me->first_option) {
 	        /*
 		 *  Finish the data off.
@@ -5729,11 +5652,9 @@ PRIVATE void HTML_start_element ARGS6(
 
     case HTML_MATH:
         /*
-	 *  We're getting it as Litteral text, which, until we can process
+	 *  We're getting it as Literal text, which, until we can process
 	 *  it, we'll display as is, within brackets to alert the user. - FM
 	 */
-	if (!me->text)
-	    UPDATE_STYLE;
 	HTChunkClear(&me->math);
 	CHECK_ID(HTML_GEN_ID);
 	break;
@@ -5957,7 +5878,7 @@ PRIVATE void HTML_end_element ARGS3(
     /*
      *  Check for unclosed TEXTAREA. - FM
      */
-    if (me->inTEXTAREA && element_number != HTML_TEXTAREA)
+    if (me->inTEXTAREA && element_number != HTML_TEXTAREA) {
         if (TRACE) {
 	    fprintf(stderr, "Bad HTML: Missing TEXTAREA end tag *****\n");
 	} else if (!me->inBadHTML) {
@@ -5965,6 +5886,11 @@ PRIVATE void HTML_end_element ARGS3(
 	    me->inBadHTML = TRUE;
 	    sleep(MessageSecs);
 	}
+    }
+
+    if (!me->text && !LYMapsOnly) {
+	UPDATE_STYLE;
+    }
 
     /*
      *  Handle the end tag. - FM
@@ -5972,8 +5898,6 @@ PRIVATE void HTML_end_element ARGS3(
     switch(element_number) {
 
     case HTML_HTML:
-        if (!me->text)
-	    UPDATE_STYLE;
 	if (me->inA || me->inSELECT || me->inTEXTAREA)
 	    if (TRACE) {
 	        fprintf(stderr,
@@ -5991,8 +5915,6 @@ PRIVATE void HTML_end_element ARGS3(
 	break;
 
     case HTML_HEAD:
-        if (!me->text)
-	    UPDATE_STYLE;
 	if (me->inBASE &&
 	    !strcmp(me->node_anchor->address, LYlist_temp_url())) {
 	    /*  If we are parsing the List Page, and have a BASE after
@@ -6012,8 +5934,6 @@ PRIVATE void HTML_end_element ARGS3(
         HTChunkTerminate(&me->title);
     	HTAnchor_setTitle(me->node_anchor, me->title.data);
         HTChunkClear(&me->title);
-        if (!me->text)
-	    UPDATE_STYLE;
 	/*
 	 *  Check if it's a bookmark file, and if so, and multiple
 	 *  bookmark support is on, or it's off but this isn't the
@@ -6058,8 +5978,6 @@ PRIVATE void HTML_end_element ARGS3(
 	break;
 
     case HTML_STYLE:
-	if (!me->text)
-	    UPDATE_STYLE;
     	/*
 	 *  We're getting it as Litteral text, which, for now,
 	 *  we'll just ignore. - FM
@@ -6073,8 +5991,6 @@ PRIVATE void HTML_end_element ARGS3(
 	break;
 
     case HTML_SCRIPT:
-	if (!me->text)
-	    UPDATE_STYLE;
     	/*
 	 *  We're getting it as Litteral text, which, for now,
 	 *  we'll just ignore. - FM
@@ -6088,8 +6004,6 @@ PRIVATE void HTML_end_element ARGS3(
 	break;
 
     case HTML_BODY:
-	if (!me->text)
-	    UPDATE_STYLE;
 	if (me->inA || me->inSELECT || me->inTEXTAREA)
 	    if (TRACE) {
 	        fprintf(stderr,
@@ -6107,15 +6021,11 @@ PRIVATE void HTML_end_element ARGS3(
 	break;
 
     case HTML_FRAMESET:
-	if (!me->text)
-	    UPDATE_STYLE;
 	change_paragraph_style(me, me->sp->style);  /* Often won't really change */
 	break;
 
     case HTML_NOFRAMES:
     case HTML_IFRAME:
-	if (!me->text)
-	    UPDATE_STYLE;
 	LYEnsureDoubleSpace(me);
 	LYResetParagraphAlignment(me);
 	change_paragraph_style(me, me->sp->style);  /* Often won't really change */
@@ -6259,8 +6169,6 @@ PRIVATE void HTML_end_element ARGS3(
         break;
 
     case HTML_FONT:
-	if (!me->text)
-	    UPDATE_STYLE;
 	me->inFONT = FALSE;
 	break;
 
@@ -6272,8 +6180,6 @@ PRIVATE void HTML_end_element ARGS3(
     case HTML_CITE:			/* Logical character highlighting */
     case HTML_EM:
     case HTML_STRONG:
-	if (!me->text)
-	    UPDATE_STYLE;
         /*
 	 *  Ignore any emphasis end tags if the
 	 *  Underline_Level is not set. - FM
@@ -6311,15 +6217,11 @@ PRIVATE void HTML_end_element ARGS3(
     case HTML_SUP:
     case HTML_TT:
     case HTML_VAR:
-	if (!me->text)
-	    UPDATE_STYLE;
 	break;
 
     case HTML_DEL:
     case HTML_S:
     case HTML_STRIKE:
-        if (!me->text)
-	    UPDATE_STYLE;
 	HTML_put_character(me, ' ');
 	if (me->inUnderline == FALSE)
 	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
@@ -6331,8 +6233,6 @@ PRIVATE void HTML_end_element ARGS3(
 	break;
 
     case HTML_INS:
-        if (!me->text)
-	    UPDATE_STYLE;
 	HTML_put_character(me, ' ');
 	if (me->inUnderline == FALSE)
 	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
@@ -6344,8 +6244,6 @@ PRIVATE void HTML_end_element ARGS3(
 	break;
 
     case HTML_Q:
-	if (!me->text)
-	    UPDATE_STYLE;
         if (me->Quote_Level > 0)
 	    me->Quote_Level--;
         /*
@@ -6362,12 +6260,13 @@ PRIVATE void HTML_end_element ARGS3(
         break;
 
     case HTML_PRE:				/* Formatted text */
+	/*
+	 *  Set to know that we are no longer in a PRE block.
+	 */
 	me->inPRE = FALSE;
     case HTML_LISTING:				/* Litteral text */
     case HTML_XMP:
     case HTML_PLAINTEXT:
-	if (!me->text)
-	    UPDATE_STYLE;
     	if (me->comment_start)
     	    HText_appendText(me->text, me->comment_start);
 	change_paragraph_style(me, me->sp->style);  /* Often won't really change */
@@ -6421,8 +6320,6 @@ PRIVATE void HTML_end_element ARGS3(
 	 *  attributes, and the me->node_anchor->charset and/or
 	 *  yet to be added structure elements. - FM
 	 */
-	if (!me->text)
-	    UPDATE_STYLE;
         break;
 
     case HTML_A:
@@ -6485,8 +6382,6 @@ PRIVATE void HTML_end_element ARGS3(
 	break;
 
     case HTML_OBJECT:
-	if (!me->text)
-	    UPDATE_STYLE;
 	/*
 	 *  Finish the data off.
 	 */
@@ -6870,8 +6765,6 @@ End_Object:
 	 */
 	me->inFORM = FALSE;
 
-	if (!me->text)
-	    UPDATE_STYLE;
 	HText_endForm(me->text);
 	/*
 	 *  If we are in a list and are on the first line
@@ -6885,16 +6778,12 @@ End_Object:
 	break;
 
     case HTML_FIELDSET:
-	if (!me->text)
-	    UPDATE_STYLE;
 	LYEnsureDoubleSpace(me);
 	LYResetParagraphAlignment(me);
 	change_paragraph_style(me, me->sp->style);  /* Often won't really change */
         break;
 
     case HTML_LEGEND:
-	if (!me->text)
-	    UPDATE_STYLE;
 	LYEnsureDoubleSpace(me);
 	LYResetParagraphAlignment(me);
 	change_paragraph_style(me, me->sp->style);  /* Often won't really change */
@@ -7059,8 +6948,6 @@ End_Object:
     case HTML_SELECT:
 	{
 	    char *ptr;
-	    if (!me->text)
-	        UPDATE_STYLE;
 
 	    /*
 	     *  Make sure we had a select start tag.
@@ -7224,8 +7111,6 @@ End_Object:
 	break;
 
     case HTML_MATH:
-	if (!me->text)
-	    UPDATE_STYLE;
         /*
 	 *  We're getting it as Litteral text, which, until we can process
 	 *  it, we'll display as is, within brackets to alert the user. - FM
diff --git a/src/LYCgi.c b/src/LYCgi.c
index 6bb32a34..23b65861 100644
--- a/src/LYCgi.c
+++ b/src/LYCgi.c
@@ -473,6 +473,14 @@ PRIVATE int LYLoadCGI ARGS4(
 		    add_environment_value(cp);
 		}
 
+		if (anAnchor->post_data &&
+		    anAnchor->post_content_type) {
+		    cp = NULL;
+		    StrAllocCopy(cp, "CONTENT_TYPE=");
+		    StrAllocCat(cp, anAnchor->post_content_type);
+		    add_environment_value(cp);
+		}
+
 		if (anAnchor->post_data) { /* post script, read stdin */
 		    close(fd1[1]);
 		    dup2(fd1[0], fileno(stdin));
diff --git a/src/LYCharSets.c b/src/LYCharSets.c
index 78b25519..bb8e3684 100644
--- a/src/LYCharSets.c
+++ b/src/LYCharSets.c
@@ -48,49 +48,49 @@ PUBLIC int LYNumCharsets = 0; /* Will be initialized later by UC_Register. */
 **	This MUST match exactly the table referred to in the DTD!
 */
 PRIVATE char * ISO_Latin1[] = {
-  	"\306",	/* capital AE diphthong (ligature) (&#198;) - AElig */ 
-  	"\301",	/* capital A, acute accent (&#193;) - Aacute */ 
-  	"\302",	/* capital A, circumflex accent (&#194;) - Acirc */ 
-  	"\300",	/* capital A, grave accent (&#192;) - Agrave */ 
-  	"\305",	/* capital A, ring - Aring (&#197;) */ 
-  	"\303",	/* capital A, tilde - Atilde (&#195;) */ 
-  	"\304",	/* capital A, dieresis or umlaut mark (&#196;) - Auml */ 
-  	"\307",	/* capital C, cedilla - Ccedil (&#199;) */ 
-  	"\320",	/* capital Eth (&#208;) or D with stroke - Dstrok */ 
-  	"\320",	/* capital Eth, Icelandic (&#208;) - ETH */ 
-  	"\311",	/* capital E, acute accent (&#201;) - Eacute */ 
-  	"\312",	/* capital E, circumflex accent (&#202;) - Ecirc */ 
-  	"\310",	/* capital E, grave accent (&#200;) - Egrave */ 
-  	"\313",	/* capital E, dieresis or umlaut mark (&#203;) - Euml */ 
-  	"\315",	/* capital I, acute accent (&#205;) - Iacute */ 
-  	"\316",	/* capital I, circumflex accent (&#206;) - Icirc */ 
-  	"\314",	/* capital I, grave accent (&#200;) - Igrave */ 
-  	"\317",	/* capital I, dieresis or umlaut mark (&#207;) - Iuml */ 
-  	"\321",	/* capital N, tilde (&#209;) - Ntilde */ 
-  	"\323",	/* capital O, acute accent (&#211;) - Oacute */ 
-  	"\324",	/* capital O, circumflex accent (&#212;) - Ocirc */ 
-  	"\322",	/* capital O, grave accent (&#210;) - Ograve */ 
-  	"\330",	/* capital O, slash (&#216;) - Oslash */ 
-  	"\325",	/* capital O, tilde (&#213;) - Otilde */ 
-  	"\326",	/* capital O, dieresis or umlaut mark (&#214;) - Ouml */ 
-  	"\336",	/* capital THORN, Icelandic (&#222;) - THORN */ 
-  	"\332",	/* capital U, acute accent (&#218;) - Uacute */ 
-  	"\333",	/* capital U, circumflex accent (&#219;) - Ucirc */ 
-  	"\331",	/* capital U, grave accent (&#217;) - Ugrave */ 
-  	"\334",	/* capital U, dieresis or umlaut mark (&#220;) - Uuml */ 
-  	"\335",	/* capital Y, acute accent (&#221;) - Yacute */ 
-  	"\341",	/* small a, acute accent (&#225;) - aacute */ 
-  	"\342",	/* small a, circumflex accent (&#226;) - acirc */ 
+	"\306",	/* capital AE diphthong (ligature) (&#198;) - AElig */
+	"\301",	/* capital A, acute accent (&#193;) - Aacute */
+	"\302",	/* capital A, circumflex accent (&#194;) - Acirc */
+	"\300",	/* capital A, grave accent (&#192;) - Agrave */
+	"\305",	/* capital A, ring - Aring (&#197;) */
+	"\303",	/* capital A, tilde - Atilde (&#195;) */
+	"\304",	/* capital A, dieresis or umlaut mark (&#196;) - Auml */
+	"\307",	/* capital C, cedilla - Ccedil (&#199;) */
+  	"\320",	/* capital Eth or D with stroke (&#208;) - Dstrok */ 
+	"\320",	/* capital Eth, Icelandic (&#208;) - ETH */
+	"\311",	/* capital E, acute accent (&#201;) - Eacute */
+	"\312",	/* capital E, circumflex accent (&#202;) - Ecirc */
+	"\310",	/* capital E, grave accent (&#200;) - Egrave */
+	"\313",	/* capital E, dieresis or umlaut mark (&#203;) - Euml */
+	"\315",	/* capital I, acute accent (&#205;) - Iacute */
+	"\316",	/* capital I, circumflex accent (&#206;) - Icirc */
+	"\314",	/* capital I, grave accent (&#200;) - Igrave */
+	"\317",	/* capital I, dieresis or umlaut mark (&#207;) - Iuml */
+	"\321",	/* capital N, tilde (&#209;) - Ntilde */
+	"\323",	/* capital O, acute accent (&#211;) - Oacute */
+	"\324",	/* capital O, circumflex accent (&#212;) - Ocirc */
+	"\322",	/* capital O, grave accent (&#210;) - Ograve */
+	"\330",	/* capital O, slash (&#216;) - Oslash */
+	"\325",	/* capital O, tilde (&#213;) - Otilde */
+	"\326",	/* capital O, dieresis or umlaut mark (&#214;) - Ouml */
+	"\336",	/* capital THORN, Icelandic (&#222;) - THORN */
+	"\332",	/* capital U, acute accent (&#218;) - Uacute */
+	"\333",	/* capital U, circumflex accent (&#219;) - Ucirc */
+	"\331",	/* capital U, grave accent (&#217;) - Ugrave */
+	"\334",	/* capital U, dieresis or umlaut mark (&#220;) - Uuml */
+	"\335",	/* capital Y, acute accent (&#221;) - Yacute */
+	"\341",	/* small a, acute accent (&#225;) - aacute */
+	"\342",	/* small a, circumflex accent (&#226;) - acirc */
 	"\264",	/* spacing acute (&#180;) - acute */
-  	"\346",	/* small ae diphthong (ligature) (&#230;) - aelig */ 
-  	"\340",	/* small a, grave accent (&#224;) - agrave */ 
-  	"\046",	/* ampersand (&#38;) - amp */ 
-  	"\345",	/* small a, ring (&#229;) - aring */ 
-  	"\343",	/* small a, tilde (&#227;) - atilde */ 
-  	"\344",	/* small a, dieresis or umlaut mark (&#228;) - auml */ 
+	"\346",	/* small ae diphthong (ligature) (&#230;) - aelig */
+	"\340",	/* small a, grave accent (&#224;) - agrave */
+	"\046",	/* ampersand (&#38;) - amp */
+	"\345",	/* small a, ring (&#229;) - aring */
+	"\343",	/* small a, tilde (&#227;) - atilde */
+	"\344",	/* small a, dieresis or umlaut mark (&#228;) - auml */
 	"\246",	/* broken vertical bar (&#166;) - brkbar */
 	"\246",	/* broken vertical bar (&#166;) - brvbar */
-  	"\347",	/* small c, cedilla (&#231;) - ccedil */ 
+	"\347",	/* small c, cedilla (&#231;) - ccedil */
 	"\270",	/* spacing cedilla (&#184;) - cedil */
 	"\242",	/* cent sign (&#162;) - cent */
 	"\251",	/* copyright sign (&#169;) - copy */
@@ -98,28 +98,28 @@ PRIVATE char * ISO_Latin1[] = {
 	"\260",	/* degree sign (&#176;) - deg */
 	"\250",	/* spacing diaresis (&#168;) - die */
 	"\367",	/* division sign (&#247;) - divide */
-  	"\351",	/* small e, acute accent (&#233;) - eacute */ 
-  	"\352",	/* small e, circumflex accent (&#234;) - ecirc */ 
-  	"\350",	/* small e, grave accent (&#232;) - egrave */
+	"\351",	/* small e, acute accent (&#233;) - eacute */
+	"\352",	/* small e, circumflex accent (&#234;) - ecirc */
+	"\350",	/* small e, grave accent (&#232;) - egrave */
 	"-",	/* dash the width of emsp - emdash */
 	"\002",	/* emsp, em space - not collapsed NEVER CHANGE THIS - emsp */
 	"-",	/* dash the width of ensp - endash */
 	"\002",	/* ensp, en space - not collapsed NEVER CHANGE THIS - ensp */
-  	"\360",	/* small eth, Icelandic (&#240;) - eth */ 
-  	"\353",	/* small e, dieresis or umlaut mark (&#235;) - euml */ 
+	"\360",	/* small eth, Icelandic (&#240;) - eth */
+	"\353",	/* small e, dieresis or umlaut mark (&#235;) - euml */
 	"\275",	/* fraction 1/2 (&#189;) - frac12 */
 	"\274",	/* fraction 1/4 (&#188;) - frac14 */
 	"\276",	/* fraction 3/4 (&#190;) - frac34 */
-  	"\076",	/* greater than (&#62;) - gt */ 
+	"\076",	/* greater than (&#62;) - gt */
 	"\257",	/* spacing macron (&#175;) - hibar */
-  	"\355",	/* small i, acute accent (&#237;) - iacute */ 
-  	"\356",	/* small i, circumflex accent (&#238;) - icirc */ 
+	"\355",	/* small i, acute accent (&#237;) - iacute */
+	"\356",	/* small i, circumflex accent (&#238;) - icirc */
 	"\241",	/* inverted exclamation mark (&#161;) - iexcl */
-  	"\354",	/* small i, grave accent (&#236;) - igrave */ 
+	"\354",	/* small i, grave accent (&#236;) - igrave */
 	"\277",	/* inverted question mark (&#191;) - iquest */
-  	"\357",	/* small i, dieresis or umlaut mark (&#239;) - iuml */ 
+	"\357",	/* small i, dieresis or umlaut mark (&#239;) - iuml */
 	"\253",	/* angle quotation mark, left (&#171;) - laquo */
-  	"\074",	/* less than (&#60;) - lt */ 
+	"\074",	/* less than (&#60;) - lt */
 	"\257",	/* spacing macron (&#175;) - macr */
 	"-",	/* dash the width of emsp - mdash */
 	"\265",	/* micro sign (&#181;) - micro */
@@ -127,15 +127,15 @@ PRIVATE char * ISO_Latin1[] = {
 	"\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
 	"-",	/* dash the width of ensp - ndash */
 	"\254",	/* negation sign (&#172;) - not */
-  	"\361",	/* small n, tilde (&#241;) - ntilde */ 
-  	"\363",	/* small o, acute accent (&#243;) - oacute */ 
-  	"\364",	/* small o, circumflex accent (&#244;) - ocirc */ 
-  	"\362",	/* small o, grave accent (&#242;) - ograve */ 
+	"\361",	/* small n, tilde (&#241;) - ntilde */
+	"\363",	/* small o, acute accent (&#243;) - oacute */
+	"\364",	/* small o, circumflex accent (&#244;) - ocirc */
+	"\362",	/* small o, grave accent (&#242;) - ograve */
 	"\252",	/* feminine ordinal indicator (&#170;) - ordf */
 	"\272",	/* masculine ordinal indicator (&#186;) - ordm */
-  	"\370",	/* small o, slash (&#248;) - oslash */ 
-  	"\365",	/* small o, tilde (&#245;) - otilde */ 
-  	"\366",	/* small o, dieresis or umlaut mark (&#246;) - ouml */ 
+	"\370",	/* small o, slash (&#248;) - oslash */
+	"\365",	/* small o, tilde (&#245;) - otilde */
+	"\366",	/* small o, dieresis or umlaut mark (&#246;) - ouml */
 	"\266",	/* paragraph sign (&#182;) - para */
 	"\261",	/* plus-or-minus sign (&#177;) - plusmn */
 	"\243",	/* pound sign (&#163;) - pound */
@@ -147,19 +147,19 @@ PRIVATE char * ISO_Latin1[] = {
 	"\271",	/* superscript 1 (&#185;) - sup1 */
 	"\262",	/* superscript 2 (&#178;) - sup2 */
 	"\263",	/* superscript 3 (&#179;) - sup3 */
-  	"\337",	/* small sharp s, German (sz ligature) (&#223;) - szlig */ 
+	"\337",	/* small sharp s, German (sz ligature) (&#223;) - szlig */
 	"\002",	/* thin space - not collapsed NEVER CHANGE THIS - thinsp */
-  	"\376",	/* small thorn, Icelandic (&#254;) - thorn */ 
-  	"\327",	/* multiplication sign (&#215;) - times */ 
+	"\376",	/* small thorn, Icelandic (&#254;) - thorn */
+	"\327",	/* multiplication sign (&#215;) - times */
 	"(TM)",	/* circled TM trade mark sign (&#8482;) - trade */
-  	"\372",	/* small u, acute accent (&#250;) - uacute */ 
-  	"\373",	/* small u, circumflex accent (&#251;) - ucirc */ 
-  	"\371",	/* small u, grave accent (&#249;) - ugrave */ 
+	"\372",	/* small u, acute accent (&#250;) - uacute */
+	"\373",	/* small u, circumflex accent (&#251;) - ucirc */
+	"\371",	/* small u, grave accent (&#249;) - ugrave */
 	"\250",	/* spacing diaresis (&#168;) - uml */
-  	"\374",	/* small u, dieresis or umlaut mark (&#252;) - uuml */ 
-  	"\375",	/* small y, acute accent (&#253;) - yacute */ 
+	"\374",	/* small u, dieresis or umlaut mark (&#252;) - uuml */
+	"\375",	/* small y, acute accent (&#253;) - yacute */
 	"\245",	/* yen sign (&#165;) - yen */
-  	"\377",	/* small y, dieresis or umlaut mark (&#255;) - yuml */ 
+	"\377",	/* small y, dieresis or umlaut mark (&#255;) - yuml */
 };
 
 /* 	Entity values -- for ISO Latin 2 local representation
@@ -167,49 +167,49 @@ PRIVATE char * ISO_Latin1[] = {
 **	This MUST match exactly the table referred to in the DTD!
 */
 PRIVATE char * ISO_Latin2[] = {
-  	"AE",	/* capital AE diphthong (ligature) - AElig */ 
-  	"\301",	/* capital A, acute accent - Aacute */ 
-  	"\302",	/* capital A, circumflex accent - Acirc */ 
-  	"A",	/* capital A, grave accent - Agrave */ 
-  	"A",	/* capital A, ring - Aring */ 
-  	"A",	/* capital A, tilde - Atilde */ 
-  	"\304",	/* capital A, dieresis or umlaut mark - Auml */ 
-  	"\307",	/* capital C, cedilla - Ccedil */ 
-  	"\320",	/* capital Eth or D with stroke - Dstrok */ 
-  	"\320",	/* capital Eth, Icelandic - ETH */ 
-  	"\311",	/* capital E, acute accent - Eacute */ 
-  	"E",	/* capital E, circumflex accent - Ecirc */ 
-  	"E",	/* capital E, grave accent - Egrave */ 
-  	"\313",	/* capital E, dieresis or umlaut mark - Euml */ 
-  	"\315",	/* capital I, acute accent - Iacute */ 
-  	"\316",	/* capital I, circumflex accent - Icirc */ 
-  	"I",	/* capital I, grave accent - Igrave */ 
-  	"I",	/* capital I, dieresis or umlaut mark - Iuml */ 
-  	"N",	/* capital N, tilde - Ntilde */ 
-  	"\323",	/* capital O, acute accent - Oacute */ 
-  	"\324",	/* capital O, circumflex accent - Ocirc */ 
-  	"O",	/* capital O, grave accent - Ograve */ 
-  	"O",	/* capital O, slash - Oslash */ 
-  	"O",	/* capital O, tilde - Otilde */ 
-  	"O",	/* capital O, dieresis or umlaut mark - Ouml */ 
-  	"P",	/* capital THORN, Icelandic - THORN */ 
-  	"\332",	/* capital U, acute accent - Uacute */ 
-  	"U",	/* capital U, circumflex accent - Ucirc */ 
-  	"U",	/* capital U, grave accent - Ugrave */ 
-  	"\334",	/* capital U, dieresis or umlaut mark - Uuml */ 
-  	"\335",	/* capital Y, acute accent - Yacute */ 
-  	"\341",	/* small a, acute accent - aacute */ 
-  	"\342",	/* small a, circumflex accent - acirc */ 
+	"AE",	/* capital AE diphthong (ligature) - AElig */
+	"\301",	/* capital A, acute accent - Aacute */
+	"\302",	/* capital A, circumflex accent - Acirc */
+	"A",	/* capital A, grave accent - Agrave */
+	"A",	/* capital A, ring - Aring */
+	"A",	/* capital A, tilde - Atilde */
+	"\304",	/* capital A, dieresis or umlaut mark - Auml */
+	"\307",	/* capital C, cedilla - Ccedil */
+	"\320",	/* capital Eth or D with stroke - Dstrok */
+	"\320",	/* capital Eth, Icelandic - ETH */
+	"\311",	/* capital E, acute accent - Eacute */
+	"E",	/* capital E, circumflex accent - Ecirc */
+	"E",	/* capital E, grave accent - Egrave */
+	"\313",	/* capital E, dieresis or umlaut mark - Euml */
+	"\315",	/* capital I, acute accent - Iacute */
+	"\316",	/* capital I, circumflex accent - Icirc */
+	"I",	/* capital I, grave accent - Igrave */
+	"I",	/* capital I, dieresis or umlaut mark - Iuml */
+	"N",	/* capital N, tilde - Ntilde */
+	"\323",	/* capital O, acute accent - Oacute */
+	"\324",	/* capital O, circumflex accent - Ocirc */
+	"O",	/* capital O, grave accent - Ograve */
+	"O",	/* capital O, slash - Oslash */
+	"O",	/* capital O, tilde - Otilde */
+	"O",	/* capital O, dieresis or umlaut mark - Ouml */
+	"P",	/* capital THORN, Icelandic - THORN */
+	"\332",	/* capital U, acute accent - Uacute */
+	"U",	/* capital U, circumflex accent - Ucirc */
+	"U",	/* capital U, grave accent - Ugrave */
+	"\334",	/* capital U, dieresis or umlaut mark - Uuml */
+	"\335",	/* capital Y, acute accent - Yacute */
+	"\341",	/* small a, acute accent - aacute */
+	"\342",	/* small a, circumflex accent - acirc */
 	"'",	/* spacing acute (&#180;) - acute */
-  	"ae",	/* small ae diphthong (ligature) - aelig */ 
-  	"a",	/* small a, grave accent - agrave */ 
-  	"\046",	/* ampersand - amp */ 
-  	"a",	/* small a, ring - aring */ 
-  	"a",	/* small a, tilde - atilde */ 
-  	"\344",	/* small a, dieresis or umlaut mark - auml */ 
+	"ae",	/* small ae diphthong (ligature) - aelig */
+	"a",	/* small a, grave accent - agrave */
+	"\046",	/* ampersand - amp */
+	"a",	/* small a, ring - aring */
+	"a",	/* small a, tilde - atilde */
+	"\344",	/* small a, dieresis or umlaut mark - auml */
 	"|",	/* broken vertical bar (&#166;) - brkbar */
 	"|",	/* broken vertical bar (&#166;) - brvbar */
-  	"\347",	/* small c, cedilla - ccedil */ 
+	"\347",	/* small c, cedilla - ccedil */
 	"\270",	/* spacing cedilla (&#184;) - cedil */
 	"-c-",	/* cent sign (&#162;) - cent */
 	"(c)",	/* copyright sign (&#169;) - copy */
@@ -217,28 +217,28 @@ PRIVATE char * ISO_Latin2[] = {
 	"\260",	/* degree sign (&#176;) - deg */
 	"\250",	/* spacing diaresis (&#168;) - die */
 	"\367",	/* division sign (&#247;) - divide */
-  	"\351",	/* small e, acute accent - eacute */ 
-  	"e",	/* small e, circumflex accent - ecirc */ 
-  	"e",	/* small e, grave accent - egrave */
+	"\351",	/* small e, acute accent - eacute */
+	"e",	/* small e, circumflex accent - ecirc */
+	"e",	/* small e, grave accent - egrave */
 	"-",	/* dash the width of emsp - emdash */
 	"\002",	/* emsp, em space - not collapsed NEVER CHANGE THIS - emsp */
 	"-",	/* dash the width of ensp - endash */
 	"\002",	/* ensp, en space - not collapsed NEVER CHANGE THIS - ensp */
-  	"dh",	/* small eth, Icelandic - eth */ 
-  	"\353",	/* small e, dieresis or umlaut mark - euml */ 
+	"dh",	/* small eth, Icelandic - eth */
+	"\353",	/* small e, dieresis or umlaut mark - euml */
 	" 1/2",	/* fraction 1/2 (&#189;) - frac12 */
 	" 1/4",	/* fraction 1/4 (&#188;) - frac14 */
 	" 3/4",	/* fraction 3/4 (&#190;) - frac34 */
-  	"\076",	/* greater than - gt */ 
+	"\076",	/* greater than - gt */
 	"-",	/* spacing macron (&#175;) - hibar */
-  	"\355",	/* small i, acute accent - iacute */ 
-  	"\356",	/* small i, circumflex accent - icirc */ 
+	"\355",	/* small i, acute accent - iacute */
+	"\356",	/* small i, circumflex accent - icirc */
 	"!",	/* inverted exclamation mark (&#161;) - iexcl */
-  	"i",	/* small i, grave accent - igrave */ 
+	"i",	/* small i, grave accent - igrave */
 	"?",	/* inverted question mark (&#191;) - iquest */
-  	"i",	/* small i, dieresis or umlaut mark - iuml */ 
+	"i",	/* small i, dieresis or umlaut mark - iuml */
 	"<<",	/* angle quotation mark, left (&#171;) - laquo */
-  	"\074",	/* less than - lt */ 
+	"\074",	/* less than - lt */
 	"-",	/* spacing macron (&#175;) - macr */
 	"-",	/* dash the width of emsp - mdash */
 	"u",	/* micro sign (&#181;) - micro */
@@ -246,15 +246,15 @@ PRIVATE char * ISO_Latin2[] = {
 	"\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
 	"-",	/* dash the width of ensp - ndash */
 	"NOT",	/* negation sign (&#172;) - not */
-  	"n",	/* small n, tilde - ntilde */ 
-  	"\363",	/* small o, acute accent - oacute */ 
-  	"\364",	/* small o, circumflex accent - ocirc */ 
-  	"o",	/* small o, grave accent - ograve */ 
+	"n",	/* small n, tilde - ntilde */
+	"\363",	/* small o, acute accent - oacute */
+	"\364",	/* small o, circumflex accent - ocirc */
+	"o",	/* small o, grave accent - ograve */
 	"-a",	/* feminine ordinal indicator (&#170;) - ordf */
 	"-o",	/* masculine ordinal indicator (&#186;) - ordm */
-  	"o",	/* small o, slash - oslash */ 
-  	"o",	/* small o, tilde - otilde */ 
-  	"\366",	/* small o, dieresis or umlaut mark - ouml */ 
+	"o",	/* small o, slash - oslash */
+	"o",	/* small o, tilde - otilde */
+	"\366",	/* small o, dieresis or umlaut mark - ouml */
 	"P:",	/* paragraph sign (&#182;) - para */
 	"+-",	/* plus-or-minus sign (&#177;) - plusmn */
 	"\243",	/* pound sign (&#163;) - pound */
@@ -266,19 +266,19 @@ PRIVATE char * ISO_Latin2[] = {
 	"^1",	/* superscript 1 (&#185;) - sup1 */
 	"^2",	/* superscript 2 (&#178;) - sup2 */
 	"^3",	/* superscript 3 (&#179;) - sup3 */
-  	"\337",	/* small sharp s, German (sz ligature) - szlig */ 
+	"\337",	/* small sharp s, German (sz ligature) - szlig */
 	"\002",	/* thin space - not collapsed NEVER CHANGE THIS - thinsp */
-  	"p",	/* small thorn, Icelandic - thorn */ 
-  	"\327",	/* multiplication sign (&#215;) - times */ 
+	"p",	/* small thorn, Icelandic - thorn */
+	"\327",	/* multiplication sign (&#215;) - times */
 	"(TM)",	/* circled TM trade mark sign (&#8482;) - trade */
-  	"\372",	/* small u, acute accent - uacute */ 
-  	"u",	/* small u, circumflex accent - ucirc */ 
-  	"u",	/* small u, grave accent - ugrave */ 
+	"\372",	/* small u, acute accent - uacute */
+	"u",	/* small u, circumflex accent - ucirc */
+	"u",	/* small u, grave accent - ugrave */
 	"\250",	/* spacing diaresis (&#168;) - uml */
-  	"\374",	/* small u, dieresis or umlaut mark - uuml */ 
- 	"\375",	/* small y, acute accent - yacute */
+	"\374",	/* small u, dieresis or umlaut mark - uuml */
+	"\375",	/* small y, acute accent - yacute */
 	"YEN",	/* yen sign (&#165;) - yen */
-  	"y",	/* small y, dieresis or umlaut mark - yuml */ 
+	"y",	/* small y, dieresis or umlaut mark - yuml */
 };
 
 /*      Entity values -- ISO Latin N > 2
@@ -286,65 +286,65 @@ PRIVATE char * ISO_Latin2[] = {
 **      This MUST match exactly the table referred to in the DTD!
 */
 PRIVATE char * ISO_LatinN[] = {
-        "AE",	/* capital AE diphthong (ligature) - AElig */
-        "A",	/* capital A, acute accent - Aacute */
-        "A",	/* capital A, circumflex accent - Acirc */
-        "A",	/* capital A, grave accent - Agrave */
-        "A",	/* capital A, ring - Aring */
-        "A",	/* capital A, tilde - Atilde */
+	"AE",	/* capital AE diphthong (ligature) - AElig */
+	"A",	/* capital A, acute accent - Aacute */
+	"A",	/* capital A, circumflex accent - Acirc */
+	"A",	/* capital A, grave accent - Agrave */
+	"A",	/* capital A, ring - Aring */
+	"A",	/* capital A, tilde - Atilde */
 #ifdef LY_UMLAUT
-        "Ae",	/* capital A, dieresis or umlaut mark - Auml*/
+	"Ae",	/* capital A, dieresis or umlaut mark - Auml*/
 #else
-        "A",	/* capital A, dieresis or umlaut mark - Auml*/
+	"A",	/* capital A, dieresis or umlaut mark - Auml*/
 #endif /* LY_UMLAUT */
-        "C",	/* capital C, cedilla - Ccedil */
-        "Dj",	/* capital D with stroke - Dstrok */
-        "DH",	/* capital Eth, Icelandic - ETH */
-        "E",	/* capital E, acute accent - Eacute */
-        "E",	/* capital E, circumflex accent - Ecirc */
-        "E",	/* capital E, grave accent - Egrave */
-        "E",	/* capital E, dieresis or umlaut mark - Euml */
-        "I",	/* capital I, acute accent - Iacute */
-        "I",	/* capital I, circumflex accent - Icirc */
-        "I",	/* capital I, grave accent - Igrave */
-        "I",	/* capital I, dieresis or umlaut mark - Iuml */
-        "N",	/* capital N, tilde - Ntilde */
-        "O",	/* capital O, acute accent - Oacute */
-        "O",	/* capital O, circumflex accent - Ocirc */
-        "O",	/* capital O, grave accent - Ograve */
-        "O",	/* capital O, slash - Oslash */
-        "O",	/* capital O, tilde - Otilde */
+	"C",	/* capital C, cedilla - Ccedil */
+	"Dj",	/* capital D with stroke - Dstrok */
+	"DH",	/* capital Eth, Icelandic - ETH */
+	"E",	/* capital E, acute accent - Eacute */
+	"E",	/* capital E, circumflex accent - Ecirc */
+	"E",	/* capital E, grave accent - Egrave */
+	"E",	/* capital E, dieresis or umlaut mark - Euml */
+	"I",	/* capital I, acute accent - Iacute */
+	"I",	/* capital I, circumflex accent - Icirc */
+	"I",	/* capital I, grave accent - Igrave */
+	"I",	/* capital I, dieresis or umlaut mark - Iuml */
+	"N",	/* capital N, tilde - Ntilde */
+	"O",	/* capital O, acute accent - Oacute */
+	"O",	/* capital O, circumflex accent - Ocirc */
+	"O",	/* capital O, grave accent - Ograve */
+	"O",	/* capital O, slash - Oslash */
+	"O",	/* capital O, tilde - Otilde */
 #ifdef LY_UMLAUT
-        "Oe",	/* capital O, dieresis or umlaut mark - Ouml */
+	"Oe",	/* capital O, dieresis or umlaut mark - Ouml */
 #else
-        "O",	/* capital O, dieresis or umlaut mark - Ouml */
+	"O",	/* capital O, dieresis or umlaut mark - Ouml */
 #endif /* LY_UMLAUT */
-        "P",	/* capital THORN, Icelandic - THORN */
-        "U",	/* capital U, acute accent - Uacute */
-        "U",	/* capital U, circumflex accent - Ucirc */
-        "U",	/* capital U, grave accent - Ugrave */
+	"P",	/* capital THORN, Icelandic - THORN */
+	"U",	/* capital U, acute accent - Uacute */
+	"U",	/* capital U, circumflex accent - Ucirc */
+	"U",	/* capital U, grave accent - Ugrave */
 #ifdef LY_UMLAUT
-        "Ue",	/* capital U, dieresis or umlaut mark - Uuml */
+	"Ue",	/* capital U, dieresis or umlaut mark - Uuml */
 #else
-        "U",	/* capital U, dieresis or umlaut mark - Uuml */
+	"U",	/* capital U, dieresis or umlaut mark - Uuml */
 #endif /* LY_UMLAUT */
-        "Y",	/* capital Y, acute accent - Yacute */
-        "a",	/* small a, acute accent - aacute */
-        "a",	/* small a, circumflex accent - acirc */
+	"Y",	/* capital Y, acute accent - Yacute */
+	"a",	/* small a, acute accent - aacute */
+	"a",	/* small a, circumflex accent - acirc */
 	"'",	/* spacing acute (&#180;) - acute */
-        "ae",	/* small ae diphthong (ligature) - aelig */
-        "`a",	/* small a, grave accent - agrave */
-        "&",	/* ampersand - amp */
-        "a",	/* small a, ring - aring */
-        "a",	/* small a, tilde - atilde */
+	"ae",	/* small ae diphthong (ligature) - aelig */
+	"`a",	/* small a, grave accent - agrave */
+	"&",	/* ampersand - amp */
+	"a",	/* small a, ring - aring */
+	"a",	/* small a, tilde - atilde */
 #ifdef LY_UMLAUT
-        "ae",	/* small a, dieresis or umlaut mark - auml */
+	"ae",	/* small a, dieresis or umlaut mark - auml */
 #else
-        "a",	/* small a, dieresis or umlaut mark - auml */
+	"a",	/* small a, dieresis or umlaut mark - auml */
 #endif /* LY_UMLAUT */
 	"|",	/* broken vertical bar (&#166;) - brkbar */
 	"|",	/* broken vertical bar (&#166;) - brvbar */
-        "c",	/* small c, cedilla - ccedil */
+	"c",	/* small c, cedilla - ccedil */
 	",",	/* spacing cedilla (&#184;) - cedil */
 	"-c-",	/* cent sign (&#162;) - cent */
 	"(c)",	/* copyright sign (&#169;) - copy */
@@ -352,52 +352,52 @@ PRIVATE char * ISO_LatinN[] = {
 	"DEG",	/* degree sign (&#176;) - deg */
 	"\042",	/* spacing diaresis (&#168;) - die */
 	"/",	/* division sign (&#247;) - divide */
-        "e",	/* small e, acute accent - eacute */
-        "e",	/* small e, circumflex accent - ecirc */
-        "e",	/* small e, grave accent - egrave */
+	"e",	/* small e, acute accent - eacute */
+	"e",	/* small e, circumflex accent - ecirc */
+	"e",	/* small e, grave accent - egrave */
 	"-",	/* dash the width of emsp - emdash */
-        "\002",	/* emsp NEVER CHANGE THIS - emsp */
+	"\002",	/* emsp NEVER CHANGE THIS - emsp */
 	"-",	/* dash the width of ensp - endash */
-        "\002",	/* ensp NEVER CHANGE THIS - ensp */
-        "dh",	/* small eth, Icelandic eth */
-        "e",	/* small e, dieresis or umlaut mark - euml */
+	"\002",	/* ensp NEVER CHANGE THIS - ensp */
+	"dh",	/* small eth, Icelandic eth */
+	"e",	/* small e, dieresis or umlaut mark - euml */
 	" 1/2",	/* fraction 1/2 (&#189;) - frac12 */
 	" 1/4",	/* fraction 1/4 (&#188;) - frac14 */
 	" 3/4",	/* fraction 3/4 (&#190;) - frac34 */
-        ">",	/* greater than - gt */
+	">",	/* greater than - gt */
 	"-",	/* spacing macron (&#175;) - hibar */
-        "i",	/* small i, acute accent - iacute */
-        "i",	/* small i, circumflex accent - icirc*/
+	"i",	/* small i, acute accent - iacute */
+	"i",	/* small i, circumflex accent - icirc*/
 	"!",	/* inverted exclamation mark (&#161;) - iexcl */
-        "`i",	/* small i, grave accent - igrave */
+	"`i",	/* small i, grave accent - igrave */
 	"?",	/* inverted question mark (&#191;) - iquest */
-        "i",	/* small i, dieresis or umlaut mark - iuml */
+	"i",	/* small i, dieresis or umlaut mark - iuml */
 	"<<",	/* angle quotation mark, left (&#171;) - laquo */
-        "<",	/* less than - lt */
+	"<",	/* less than - lt */
 	"-",	/* spacing macron (&#175;) - macr */
 	"-",	/* dash the width of emsp - mdash */
 	"u",	/* micro sign (&#181;) - micro */
 	".",	/* middle dot (&#183;) - middot */
-        "\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
+	"\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
 	"-",	/* dash the width of ensp - ndash */
 	"NOT",	/* negation sign (&#172;) - not */
-        "n",	/* small n, tilde - ntilde */
-        "o",	/* small o, acute accent - oacute */
-        "o",	/* small o, circumflex accent - ocirc */
-        "o",	/* small o, grave accent - ograve */
+	"n",	/* small n, tilde - ntilde */
+	"o",	/* small o, acute accent - oacute */
+	"o",	/* small o, circumflex accent - ocirc */
+	"o",	/* small o, grave accent - ograve */
 	"-a",	/* feminine ordinal indicator (&#170;) - ordf */
 	"-o",	/* masculine ordinal indicator (&#186;) - ordm */
-        "o",	/* small o, slash - oslash */
-        "o",	/* small o, tilde - otilde */
+	"o",	/* small o, slash - oslash */
+	"o",	/* small o, tilde - otilde */
 #ifdef LY_UMLAUT
-        "oe",	/* small o, dieresis or umlaut mark - ouml */
+	"oe",	/* small o, dieresis or umlaut mark - ouml */
 #else
-        "o",	/* small o, dieresis or umlaut mark - ouml */
+	"o",	/* small o, dieresis or umlaut mark - ouml */
 #endif /* LY_UMLAUT */
 	"P:",	/* paragraph sign (&#182;) - para */
 	"+-",	/* plus-or-minus sign (&#177;) - plusmn */
 	"-L-",	/* pound sign (&#163;) - pound */
-        "\"",	/* quote '"' - quot */
+	"\"",	/* quote '"' - quot */
 	">>",	/* angle quotation mark, right (&#187;) - raquo */
 	"(R)",	/* circled R registered sign (&#174;) - reg */
 	"S:",	/* section sign (&#167;) - sect */
@@ -405,23 +405,23 @@ PRIVATE char * ISO_LatinN[] = {
 	"^1",	/* superscript 1 (&#185;) - sup1 */
 	"^2",	/* superscript 2 (&#178;) - sup2 */
 	"^3",	/* superscript 3 (&#179;) - sup3 */
-        "ss",	/* small sharp s, German (sz ligature) - szlig */
+	"ss",	/* small sharp s, German (sz ligature) - szlig */
 	"\002",	/* thin space - not collapsed NEVER CHANGE THIS - thinsp */
-        "p",	/* small thorn, Icelandic - thorn */
-  	"*",	/* multiplication sign (&#215;) - times */ 
+	"p",	/* small thorn, Icelandic - thorn */
+	"*",	/* multiplication sign (&#215;) - times */
 	"(TM)",	/* circled TM trade mark sign (&#8482;) - trade */
-        "u",	/* small u, acute accent - uacute */
-        "u",	/* small u, circumflex accent - ucirc */
-        "u",	/* small u, grave accent - ugrave */
+	"u",	/* small u, acute accent - uacute */
+	"u",	/* small u, circumflex accent - ucirc */
+	"u",	/* small u, grave accent - ugrave */
 	"\042",	/* spacing diaresis (&#168;) - uml */
 #ifdef LY_UMLAUT
-        "ue",	/* small u, dieresis or umlaut mark - uuml */
+	"ue",	/* small u, dieresis or umlaut mark - uuml */
 #else
-        "u",	/* small u, dieresis or umlaut mark - uuml */
+	"u",	/* small u, dieresis or umlaut mark - uuml */
 #endif /* LY_UMLAUT */
-        "y",	/* small y, acute accent - yacute */
+	"y",	/* small y, acute accent - yacute */
 	"YEN",	/* yen sign (&#165;) - yen */
-        "y",	/* small y, dieresis or umlaut mark - yuml */
+	"y",	/* small y, dieresis or umlaut mark - yuml */
 };
 
 /*      Entity values -- DEC Multinational
@@ -429,49 +429,49 @@ PRIVATE char * ISO_LatinN[] = {
 **      This MUST match exactly the table referred to in the DTD!
 */
 PRIVATE char * DEC_Multinational[] = {
-  	"\306",	/* capital AE diphthong (ligature) - AElig */ 
-  	"\301",	/* capital A, acute accent - Aacute */ 
-  	"\302",	/* capital A, circumflex accent - Acirc */ 
-  	"\300",	/* capital A, grave accent - Agrave */ 
-  	"\305",	/* capital A, ring - Aring */ 
-  	"\303",	/* capital A, tilde - Atilde */ 
-  	"\304",	/* capital A, dieresis or umlaut mark - Auml */ 
-  	"\307",	/* capital C, cedilla - Ccedil */ 
-  	"Dj",	/* capital D with stroke - Dstrok */ 
-  	"DH",	/* capital Eth, Icelandic - ETH */ 
-  	"\311",	/* capital E, acute accent - Eacute */ 
-  	"\312",	/* capital E, circumflex accent - Ecirc */ 
-  	"\310",	/* capital E, grave accent - Egrave */ 
-  	"\313",	/* capital E, dieresis or umlaut mark - Euml */ 
-  	"\315",	/* capital I, acute accent - Iacute */ 
-  	"\316",	/* capital I, circumflex accent - Icirc */ 
-  	"\314",	/* capital I, grave accent - Igrave */ 
-  	"\317",	/* capital I, dieresis or umlaut mark - Iuml */ 
-  	"\321",	/* capital N, tilde - Ntilde */ 
-  	"\323",	/* capital O, acute accent - Oacute */ 
-  	"\324",	/* capital O, circumflex accent - Ocirc */ 
-  	"\322",	/* capital O, grave accent - Ograve */ 
-  	"\330",	/* capital O, slash - Oslash */ 
-  	"\325",	/* capital O, tilde - Otilde */ 
-  	"\326",	/* capital O, dieresis or umlaut mark - Ouml */ 
-  	"P",	/* capital THORN, Icelandic - THORN */ 
-  	"\332",	/* capital U, acute accent - Uacute */ 
-  	"\333",	/* capital U, circumflex accent - Ucirc */ 
-  	"\331",	/* capital U, grave accent - Ugrave */ 
-  	"\334",	/* capital U, dieresis or umlaut mark - Uuml */ 
-  	"\335",	/* capital Y, acute accent - Yacute */ 
-  	"\341",	/* small a, acute accent - aacute */ 
-  	"\342",	/* small a, circumflex accent - acirc */ 
+	"\306",	/* capital AE diphthong (ligature) - AElig */
+	"\301",	/* capital A, acute accent - Aacute */
+	"\302",	/* capital A, circumflex accent - Acirc */
+	"\300",	/* capital A, grave accent - Agrave */
+	"\305",	/* capital A, ring - Aring */
+	"\303",	/* capital A, tilde - Atilde */
+	"\304",	/* capital A, dieresis or umlaut mark - Auml */
+	"\307",	/* capital C, cedilla - Ccedil */
+	"Dj",	/* capital D with stroke - Dstrok */
+	"DH",	/* capital Eth, Icelandic - ETH */
+	"\311",	/* capital E, acute accent - Eacute */
+	"\312",	/* capital E, circumflex accent - Ecirc */
+	"\310",	/* capital E, grave accent - Egrave */
+	"\313",	/* capital E, dieresis or umlaut mark - Euml */
+	"\315",	/* capital I, acute accent - Iacute */
+	"\316",	/* capital I, circumflex accent - Icirc */
+	"\314",	/* capital I, grave accent - Igrave */
+	"\317",	/* capital I, dieresis or umlaut mark - Iuml */
+	"\321",	/* capital N, tilde - Ntilde */
+	"\323",	/* capital O, acute accent - Oacute */
+	"\324",	/* capital O, circumflex accent - Ocirc */
+	"\322",	/* capital O, grave accent - Ograve */
+	"\330",	/* capital O, slash - Oslash */
+	"\325",	/* capital O, tilde - Otilde */
+	"\326",	/* capital O, dieresis or umlaut mark - Ouml */
+	"P",	/* capital THORN, Icelandic - THORN */
+	"\332",	/* capital U, acute accent - Uacute */
+	"\333",	/* capital U, circumflex accent - Ucirc */
+	"\331",	/* capital U, grave accent - Ugrave */
+	"\334",	/* capital U, dieresis or umlaut mark - Uuml */
+	"\335",	/* capital Y, acute accent - Yacute */
+	"\341",	/* small a, acute accent - aacute */
+	"\342",	/* small a, circumflex accent - acirc */
 	"'",	/* spacing acute (&#180;) - acute */
-  	"\346",	/* small ae diphthong (ligature) - aelig */ 
-  	"\340",	/* small a, grave accent - agrave */ 
-  	"\046",	/* ampersand - amp */ 
-  	"\345",	/* small a, ring - aring */ 
-  	"\343",	/* small a, tilde - atilde */ 
-  	"\344",	/* small a, dieresis or umlaut mark - auml */ 
+	"\346",	/* small ae diphthong (ligature) - aelig */
+	"\340",	/* small a, grave accent - agrave */
+	"\046",	/* ampersand - amp */
+	"\345",	/* small a, ring - aring */
+	"\343",	/* small a, tilde - atilde */
+	"\344",	/* small a, dieresis or umlaut mark - auml */
 	"|",	/* broken vertical bar (&#166;) - brkbar */
 	"|",	/* broken vertical bar (&#166;) - brvbar */
-  	"\347",	/* small c, cedilla - ccedil */ 
+	"\347",	/* small c, cedilla - ccedil */
 	",",	/* spacing cedilla (&#184;) - cedil */
 	"\242",	/* cent sign (&#162;) - cent */
 	"\251",	/* copyright sign (&#169;) - copy */
@@ -479,28 +479,28 @@ PRIVATE char * DEC_Multinational[] = {
 	"\260",	/* degree sign (&#176;) - deg */
 	"\250",	/* spacing diaresis (&#168;) - die */
 	"/",	/* division sign (&#247;) - divide */
-  	"\351",	/* small e, acute accent - eacute */ 
-  	"\352",	/* small e, circumflex accent - ecirc */ 
-  	"\350",	/* small e, grave accent - egrave */
+	"\351",	/* small e, acute accent - eacute */
+	"\352",	/* small e, circumflex accent - ecirc */
+	"\350",	/* small e, grave accent - egrave */
 	"-",	/* dash the width of emsp - emdash */
 	"\002",	/* emsp, em space - not collapsed NEVER CHANGE THIS - emsp */
 	"-",	/* dash the width of ensp - endash */
 	"\002",	/* ensp, en space - not collapsed NEVER CHANGE THIS - ensp */
-  	"dh",	/* small eth, Icelandic - eth */ 
-  	"\353",	/* small e, dieresis or umlaut mark - euml */ 
+	"dh",	/* small eth, Icelandic - eth */
+	"\353",	/* small e, dieresis or umlaut mark - euml */
 	"\275",	/* fraction 1/2 (&#189;) - frac12 */
 	"\274",	/* fraction 1/4 (&#188;) - frac14 */
 	" 3/4",	/* fraction 3/4 (&#190;) - frac34 */
-  	"\076",	/* greater than - gt */ 
+	"\076",	/* greater than - gt */
 	"-",	/* spacing macron (&#175;) - hibar */
-  	"\355",	/* small i, acute accent - iacute */ 
-  	"\356",	/* small i, circumflex accent - icirc */ 
+	"\355",	/* small i, acute accent - iacute */
+	"\356",	/* small i, circumflex accent - icirc */
 	"\241",	/* inverted exclamation mark (&#161;) - iexcl */
-  	"\354",	/* small i, grave accent - igrave */ 
+	"\354",	/* small i, grave accent - igrave */
 	"\277",	/* inverted question mark (&#191;) - iquest */
-  	"\357",	/* small i, dieresis or umlaut mark - iuml */ 
+	"\357",	/* small i, dieresis or umlaut mark - iuml */
 	"\253",	/* angle quotation mark, left (&#171;) - laquo */
-  	"\074",	/* less than - lt */ 
+	"\074",	/* less than - lt */
 	"-",	/* spacing macron (&#175;) - macr */
 	"-",	/* dash the width of emsp - mdash */
 	"\265",	/* micro sign (&#181;) - micro */
@@ -508,15 +508,15 @@ PRIVATE char * DEC_Multinational[] = {
 	"\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
 	"-",	/* dash the width of ensp - ndash */
 	"NOT",	/* negation sign (&#172); - not */
-  	"\361",	/* small n, tilde - ntilde */ 
-  	"\363",	/* small o, acute accent - oacute */ 
-  	"\364",	/* small o, circumflex accent - ocirc */ 
-  	"\362",	/* small o, grave accent - ograve */ 
+	"\361",	/* small n, tilde - ntilde */
+	"\363",	/* small o, acute accent - oacute */
+	"\364",	/* small o, circumflex accent - ocirc */
+	"\362",	/* small o, grave accent - ograve */
 	"\252",	/* feminine ordinal indicator (&#170;) - ordf */
 	"\272",	/* masculine ordinal indicator (&#186;) - ordm */
-  	"\370",	/* small o, slash - oslash */ 
-  	"\365",	/* small o, tilde - otilde */ 
-  	"\366",	/* small o, dieresis or umlaut mark - ouml */ 
+	"\370",	/* small o, slash - oslash */
+	"\365",	/* small o, tilde - otilde */
+	"\366",	/* small o, dieresis or umlaut mark - ouml */
 	"\266",	/* paragraph sign (&#182;) - para */
 	"\261",	/* plus-or-minus sign (&#177;) - plusmn */
 	"\243",	/* pound sign (&#163;) - pound */
@@ -528,19 +528,19 @@ PRIVATE char * DEC_Multinational[] = {
 	"\271",	/* superscript 1 (&#185;) - sup1 */
 	"\262",	/* superscript 2 (&#178;) - sup2 */
 	"\263",	/* superscript 3 (&#179;) - sup3 */
-  	"\337",	/* small sharp s, German (sz ligature) - szlig */ 
+	"\337",	/* small sharp s, German (sz ligature) - szlig */
 	"\002",	/* thin space - not collapsed NEVER CHANGE THIS - thinsp */
-  	"p",	/* small thorn, Icelandic - thorn */ 
-  	"*",	/* multiplication sign (&#215;) - times */ 
+	"p",	/* small thorn, Icelandic - thorn */
+	"*",	/* multiplication sign (&#215;) - times */
 	"(TM)",	/* circled TM trade mark sign (&#8482;) - trade */
-  	"\372",	/* small u, acute accent - uacute */ 
-  	"\373",	/* small u, circumflex accent - ucirc */ 
-  	"\371",	/* small u, grave accent - ugrave */ 
+	"\372",	/* small u, acute accent - uacute */
+	"\373",	/* small u, circumflex accent - ucirc */
+	"\371",	/* small u, grave accent - ugrave */
 	"\250",	/* spacing diaresis (&#168;) - uml */
-  	"\374",	/* small u, dieresis or umlaut mark - uuml */ 
-  	"y'",	/* small y, acute accent - yacute */ 
+	"\374",	/* small u, dieresis or umlaut mark - uuml */
+	"y'",	/* small y, acute accent - yacute */
 	"\245",	/* yen sign (&#165;) - yen */
-  	"\375",	/* small y, dieresis or umlaut mark - yuml */ 
+	"\375",	/* small y, dieresis or umlaut mark - yuml */
 };
 
 /*
@@ -551,49 +551,49 @@ PRIVATE char * DEC_Multinational[] = {
 **      updated January 10, 1996  mike@hyperreal.com
 */
 PRIVATE char * PC_charset[] = {
-        "\222",	/* capital AE diphthong (ligature) - AElig */
-        "A",	/* capital A, acute accent - Aacute */
-        "A",	/* capital A, circumflex accent - Acirc */
-        "A",	/* capital A, grave accent - Agrave */
-        "\217",	/* capital A, ring - Aring */
-        "A",	/* capital A, tilde - Atilde */
-        "\216",	/* capital A, dieresis or umlaut mark - Auml */
-        "\200",	/* capital C, cedilla - Ccedil */
-        "Dj",	/* capital D with stroke - Dstrok */
-        "DH",	/* capital Eth, Icelandic - ETH */
-        "\220",	/* capital E, acute accent - Eacute */
-        "E",	/* capital E, circumflex accent - Ecirc */
-        "E",	/* capital E, grave accent - Egrave */
-        "E",	/* capital E, dieresis or umlaut mark - Euml */
-        "I",	/* capital I, acute accent - Iacute */
-        "I",	/* capital I, circumflex accent - Icirc */
-        "I",	/* capital I, grave accent - Igrave */
-        "I",	/* capital I, dieresis or umlaut mark - Iuml */
-        "\245",	/* capital N, tilde - Ntilde */
-        "O",	/* capital O, acute accent - Oacute */
-        "O",	/* capital O, circumflex accent - Ocirc */
-        "O",	/* capital O, grave accent - Ograve */
-        "O",	/* capital O, slash - Oslash */
-        "O",	/* capital O, tilde - Otilde */
-        "\231",	/* capital O, dieresis or umlaut mark - Ouml */
-        "\350",	/* capital THORN, Icelandic - THORN */
-        "U",	/* capital U, acute accent - Uacute */
-        "U",	/* capital U, circumflex accent - Ucirc */
-        "U",	/* capital U, grave accent - Ugrave */
-        "\232",	/* capital U, dieresis or umlaut mark - Uuml */
-        "Y",	/* capital Y, acute accent - Yacute */
-        "\240",	/* small a, acute accent - aacute */
-        "\203",	/* small a, circumflex accent - acirc */
+	"\222",	/* capital AE diphthong (ligature) - AElig */
+	"A",	/* capital A, acute accent - Aacute */
+	"A",	/* capital A, circumflex accent - Acirc */
+	"A",	/* capital A, grave accent - Agrave */
+	"\217",	/* capital A, ring - Aring */
+	"A",	/* capital A, tilde - Atilde */
+	"\216",	/* capital A, dieresis or umlaut mark - Auml */
+	"\200",	/* capital C, cedilla - Ccedil */
+	"Dj",	/* capital D with stroke - Dstrok */
+	"DH",	/* capital Eth, Icelandic - ETH */
+	"\220",	/* capital E, acute accent - Eacute */
+	"E",	/* capital E, circumflex accent - Ecirc */
+	"E",	/* capital E, grave accent - Egrave */
+	"E",	/* capital E, dieresis or umlaut mark - Euml */
+	"I",	/* capital I, acute accent - Iacute */
+	"I",	/* capital I, circumflex accent - Icirc */
+	"I",	/* capital I, grave accent - Igrave */
+	"I",	/* capital I, dieresis or umlaut mark - Iuml */
+	"\245",	/* capital N, tilde - Ntilde */
+	"O",	/* capital O, acute accent - Oacute */
+	"O",	/* capital O, circumflex accent - Ocirc */
+	"O",	/* capital O, grave accent - Ograve */
+	"O",	/* capital O, slash - Oslash */
+	"O",	/* capital O, tilde - Otilde */
+	"\231",	/* capital O, dieresis or umlaut mark - Ouml */
+	"\350",	/* capital THORN, Icelandic - THORN */
+	"U",	/* capital U, acute accent - Uacute */
+	"U",	/* capital U, circumflex accent - Ucirc */
+	"U",	/* capital U, grave accent - Ugrave */
+	"\232",	/* capital U, dieresis or umlaut mark - Uuml */
+	"Y",	/* capital Y, acute accent - Yacute */
+	"\240",	/* small a, acute accent - aacute */
+	"\203",	/* small a, circumflex accent - acirc */
 	"'",	/* spacing acute (&#180;) - acute */
-        "\221",	/* small ae diphthong (ligature) - aelig */
-        "\205",	/* small a, grave accent - agrave */
-        "\046",	/* ampersand - amp */
-        "\206",	/* small a, ring - aring */
-        "a",	/* small a, tilde - atilde */
-        "\204",	/* small a, dieresis or umlaut mark - auml */
+	"\221",	/* small ae diphthong (ligature) - aelig */
+	"\205",	/* small a, grave accent - agrave */
+	"\046",	/* ampersand - amp */
+	"\206",	/* small a, ring - aring */
+	"a",	/* small a, tilde - atilde */
+	"\204",	/* small a, dieresis or umlaut mark - auml */
 	"|",	/* broken vertical bar (&#166;) - brkbar */
 	"|",	/* broken vertical bar (&#166;) - brvbar */
-        "\207",	/* small c, cedilla - ccedil */
+	"\207",	/* small c, cedilla - ccedil */
 	",",	/* spacing cedilla (&#184;) - cedil */
 	"\233",	/* cent sign (&#162;) - cent */
 	"(c)",	/* copyright sign (&#169;) - copy */
@@ -601,68 +601,68 @@ PRIVATE char * PC_charset[] = {
 	"\370",	/* degree sign (&#176;) - deg */
 	"\042",	/* spacing diaresis (&#168;) - die */
 	"\366",	/* division sign (&#247;) - divide */
-        "\202",	/* small e, acute accent - eacute */
-        "\210",	/* small e, circumflex accent - ecirc */
-        "\212",	/* small e, grave accent - egrave */
+	"\202",	/* small e, acute accent - eacute */
+	"\210",	/* small e, circumflex accent - ecirc */
+	"\212",	/* small e, grave accent - egrave */
 	"-",	/* dash the width of emsp - emdash */
-        "\002",	/* emsp NEVER CHANGE THIS - emsp */
+	"\002",	/* emsp NEVER CHANGE THIS - emsp */
 	"-",	/* dash the width of ensp - endash */
-        "\002",	/* ensp NEVER CHANGE THIS - ensp */
-        "dh",	/* small eth, Icelandic - eth */
-        "\211",	/* small e, dieresis or umlaut mark - euml */
+	"\002",	/* ensp NEVER CHANGE THIS - ensp */
+	"dh",	/* small eth, Icelandic - eth */
+	"\211",	/* small e, dieresis or umlaut mark - euml */
 	"\253",	/* fraction 1/2 (&#189;) - frac12 */
 	"\254",	/* fraction 1/4 (&#188;) - frac14 */
 	" 3/4",	/* fraction 3/4 (&#190;) - frac34 */
-        "\076",	/* greater than - gt */
+	"\076",	/* greater than - gt */
 	"-",	/* spacing macron (&#175;) - hibar */
-        "\241",	/* small i, acute accent - iacute */
-        "\214",	/* small i, circumflex accent - icirc */
- 	"\255",	/* inverted exclamation mark (&#161;) - iexcl */
- 	"\215",	/* small i, grave accent - igrave */
+	"\241",	/* small i, acute accent - iacute */
+	"\214",	/* small i, circumflex accent - icirc */
+	"\255",	/* inverted exclamation mark (&#161;) - iexcl */
+	"\215",	/* small i, grave accent - igrave */
 	"\250",	/* inverted question mark (&#191;) - iquest */
-        "\213",	/* small i, dieresis or umlaut mark - iuml */
+	"\213",	/* small i, dieresis or umlaut mark - iuml */
 	"\256",	/* angle quotation mark, left (&#171;) - laquo */
-        "\074",	/* less than - lt */
+	"\074",	/* less than - lt */
 	"-",	/* spacing macron (&#175;) - macr */
 	"-",	/* dash the width of emsp - mdash */
 	"\346",	/* micro sign (&#181;) - micro */
 	"\372",	/* middle dot (&#183;) - middot */
-        "\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
+	"\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
 	"-",	/* dash the width of ensp - ndash */
 	"\252",	/* negation sign (&#172;) - not */
-        "\244",	/* small n, tilde - ntilde */
-        "\242",	/* small o, acute accent - oacute */
-        "\223",	/* small o, circumflex accent - ocirc */
-        "\225",	/* small o, grave accent - ograve */
+	"\244",	/* small n, tilde - ntilde */
+	"\242",	/* small o, acute accent - oacute */
+	"\223",	/* small o, circumflex accent - ocirc */
+	"\225",	/* small o, grave accent - ograve */
 	"\246",	/* feminine ordinal indicator (&#170;) - ordf */
 	"\247",	/* masculine ordinal indicator (&#186;) - ordm */
-        "\355",	/* small o, slash - oslash */  /* Greek letter substitute */
-        "o",	/* small o, tilde - otilde */
-        "\224",	/* small o, dieresis or umlaut mark - ouml */
+	"\355",	/* small o, slash - oslash */  /* Greek letter substitute */
+	"o",	/* small o, tilde - otilde */
+	"\224",	/* small o, dieresis or umlaut mark - ouml */
 	"P:",	/* paragraph sign (&#182;) - para */
 	"\361",	/* plus-or-minus sign (&#177;) - plusmn */
 	"\234",	/* pound sign (&#163;) - pound */
 	"\042",	/* quote '"' - quot */
 	"\257",	/* angle quotation mark, right (&#187;) - raquo */
 	"(R)",	/* circled R registered sign (&#174;) - reg */
-        "S:",	/* section sign (&#167;) - sect */
+	"S:",	/* section sign (&#167;) - sect */
 	"\007",	/* soft hyphen (&#173;) NEVER CHANGE THIS - shy */
 	"^1",	/* superscript 1 (&#185;) - sup1 */
 	"\375",	/* superscript 2 (&#178;) - sup2 */
 	"^3",	/* superscript 3 (&#179;) - sup3 */
-        "\341",	/* small sharp s, German (sz ligature) - szlig */
+	"\341",	/* small sharp s, German (sz ligature) - szlig */
 	"\002",	/* thin space - not collapsed NEVER CHANGE THIS - thinsp */
-        "\347",	/* small thorn, Icelandic - thorn */
-  	"*",	/* multiplication sign (&#215;) - times */
+	"\347",	/* small thorn, Icelandic - thorn */
+	"*",	/* multiplication sign (&#215;) - times */
 	"(TM)",	/* circled TM trade mark sign (&#8482;) - trade */
-        "\243",	/* small u, acute accent - uacute */
-        "\226",	/* small u, circumflex accent - ucirc */
-        "\227",	/* small u, grave accent - ugrave */
+	"\243",	/* small u, acute accent - uacute */
+	"\226",	/* small u, circumflex accent - ucirc */
+	"\227",	/* small u, grave accent - ugrave */
 	"\042",	/* spacing diaresis (&#168;) - uml */
-        "\201",	/* small u, dieresis or umlaut mark - uuml */
-        "y'",	/* small y, acute accent - yacute */
+	"\201",	/* small u, dieresis or umlaut mark - uuml */
+	"y'",	/* small y, acute accent - yacute */
 	"\235",	/* yen sign (&#165;) - yen */
-        "\230",	/* small y, dieresis or umlaut mark - yuml */
+	"\230",	/* small y, dieresis or umlaut mark - yuml */
 };
 
 /*
@@ -673,49 +673,49 @@ PRIVATE char * PC_charset[] = {
 **      January 10, 1996  mike@hyperreal.com
 */
 PRIVATE char * PC_850_charset[] = {
-        "\222",	/* capital AE diphthong (ligature) - AElig */
-        "\265",	/* capital A, acute accent - Aacute */
-        "\266",	/* capital A, circumflex accent - Acirc */
+	"\222",	/* capital AE diphthong (ligature) - AElig */
+	"\265",	/* capital A, acute accent - Aacute */
+	"\266",	/* capital A, circumflex accent - Acirc */
 	"\267",	/* capital A, grave accent - Agrave */
 	"\217",	/* capital A, ring - Aring */
-        "\307",	/* capital A, tilde - Atilde */
+	"\307",	/* capital A, tilde - Atilde */
 	"\216",	/* capital A, dieresis or umlaut mark - Auml */
-        "\200",	/* capital C, cedilla - Ccedil */
-        "\321",	/* capital Eth or D with stroke - Dstrok */
-        "\321",	/* capital Eth, Icelandic - ETH */
+	"\200",	/* capital C, cedilla - Ccedil */
+	"\321",	/* capital Eth or D with stroke - Dstrok */
+	"\321",	/* capital Eth, Icelandic - ETH */
 	"\220",	/* capital E, acute accent - Eacute */
-        "\322",	/* capital E, circumflex accent - Ecirc */
+	"\322",	/* capital E, circumflex accent - Ecirc */
 	"\324",	/* capital E, grave accent - Egrave */
-        "\323",	/* capital E, dieresis or umlaut mark - Euml */
+	"\323",	/* capital E, dieresis or umlaut mark - Euml */
 	"\326",	/* capital I, acute accent - Iacute */
-        "\327",	/* capital I, circumflex accent - Icirc */
+	"\327",	/* capital I, circumflex accent - Icirc */
 	"\336",	/* capital I, grave accent - Igrave */
-        "\330",	/* capital I, dieresis or umlaut mark - Iuml */
-        "\245",	/* capital N, tilde - Ntilde */
+	"\330",	/* capital I, dieresis or umlaut mark - Iuml */
+	"\245",	/* capital N, tilde - Ntilde */
 	"\340",	/* capital O, acute accent - Oacute */
-        "\342",	/* capital O, circumflex accent - Ocirc */
+	"\342",	/* capital O, circumflex accent - Ocirc */
 	"\343",	/* capital O, grave accent - Ograve */
-        "\235",	/* capital O, slash - Oslash */
-        "\345",	/* capital O, tilde - Otilde */
-        "\231",	/* capital O, dieresis or umlaut mark - Ouml */
-        "\350",	/* capital THORN, Icelandic - THORN */
+	"\235",	/* capital O, slash - Oslash */
+	"\345",	/* capital O, tilde - Otilde */
+	"\231",	/* capital O, dieresis or umlaut mark - Ouml */
+	"\350",	/* capital THORN, Icelandic - THORN */
 	"\351",	/* capital U, acute accent - Uacute */
-        "\352",	/* capital U, circumflex accent - Ucirc */
-        "\353",	/* capital U, grave accent - Ugrave */
-        "\232",	/* capital U, dieresis or umlaut mark - Uuml */
-        "\355",	/* capital Y, acute accent - Yacute */
+	"\352",	/* capital U, circumflex accent - Ucirc */
+	"\353",	/* capital U, grave accent - Ugrave */
+	"\232",	/* capital U, dieresis or umlaut mark - Uuml */
+	"\355",	/* capital Y, acute accent - Yacute */
 	"\240",	/* small a, acute accent - aacute */
-        "\203",	/* small a, circumflex accent - acirc */
+	"\203",	/* small a, circumflex accent - acirc */
 	"\357",	/* spacing acute (&#180;) - acute */
-        "\221",	/* small ae diphthong (ligature) - aelig */
+	"\221",	/* small ae diphthong (ligature) - aelig */
 	"\205",	/* small a, grave accent - agrave */
-        "\046",	/* ampersand - amp */
-        "\206",	/* small a, ring - aring */
-        "\306",	/* small a, tilde - atilde */
-        "\204",	/* small a, dieresis or umlaut mark - auml */
+	"\046",	/* ampersand - amp */
+	"\206",	/* small a, ring - aring */
+	"\306",	/* small a, tilde - atilde */
+	"\204",	/* small a, dieresis or umlaut mark - auml */
 	"\335",	/* broken vertical bar (&#166;) - brkbar */
 	"\335",	/* broken vertical bar (&#166;) - brvbar */
-        "\207",	/* small c, cedilla - ccedil */
+	"\207",	/* small c, cedilla - ccedil */
 	"\367",	/* spacing cedilla (&#184;) - cedil */
 	"\275",	/* cent sign (&#162;) - cent */
 	"\270",	/* copyright sign (&#169;) - copy */
@@ -724,67 +724,67 @@ PRIVATE char * PC_850_charset[] = {
 	"\371",	/* spacing diaresis (&#168;) - die */
 	"\366",	/* division sign (&#247;) - divide */
 	"\202",	/* small e, acute accent - eacute */
-        "\210",	/* small e, circumflex accent - ecirc */
+	"\210",	/* small e, circumflex accent - ecirc */
 	"\212",	/* small e, grave accent - egrave */
 	"-",	/* dash the width of emsp - emdash */
-        "\002",	/* emsp NEVER CHANGE THIS - emsp */
+	"\002",	/* emsp NEVER CHANGE THIS - emsp */
 	"-",	/* dash the width of ensp - endash */
-        "\002",	/* ensp NEVER CHANGE THIS - ensp */
-        "\320",	/* small eth, Icelandic - eth */
-        "\211",	/* small e, dieresis or umlaut mark - euml */
+	"\002",	/* ensp NEVER CHANGE THIS - ensp */
+	"\320",	/* small eth, Icelandic - eth */
+	"\211",	/* small e, dieresis or umlaut mark - euml */
 	"\253",	/* fraction 1/2 (&#189;) - frac12 */
 	"\254",	/* fraction 1/4 (&#188;) - frac14 */
 	"\363",	/* fraction 3/4 (&#190;) - frac34 */
-        "\076",	/* greater than - gt */
+	"\076",	/* greater than - gt */
 	"\356",	/* spacing macron (&#175;) - hibar */
 	"\241",	/* small i, acute accent - iacute */
-        "\214",	/* small i, circumflex accent - icirc */
- 	"\255",	/* inverted exclamation mark (&#161;) - iexcl */
+	"\214",	/* small i, circumflex accent - icirc */
+	"\255",	/* inverted exclamation mark (&#161;) - iexcl */
 	"\215",	/* small i, grave accent - igrave */
 	"\250",	/* inverted question mark (&#191;) - iquest */
-        "\213",	/* small i, dieresis or umlaut mark - iuml */
+	"\213",	/* small i, dieresis or umlaut mark - iuml */
 	"\256",	/* angle quotation mark, left (&#171;) - laquo */
-        "\074",	/* less than - lt */
+	"\074",	/* less than - lt */
 	"\356",	/* spacing macron (&#175;) - macr */
 	"-",	/* dash the width of emsp - mdash */
 	"\346",	/* micro sign (&#181;) - micro */
 	"\372",	/* middle dot (&#183;) - middot */
-        "\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
+	"\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
 	"-",	/* dash the width of ensp - ndash */
 	"\252",	/* negation sign (&#172;) - not */
-        "\244",	/* small n, tilde - ntilde */
+	"\244",	/* small n, tilde - ntilde */
 	"\242",	/* small o, acute accent - oacute */
-        "\223",	/* small o, circumflex accent - ocirc */
+	"\223",	/* small o, circumflex accent - ocirc */
 	"\225",	/* small o, grave accent - ograve */
 	"\246",	/* feminine ordinal indicator (&#170;) - ordf */
 	"\247",	/* masculine ordinal indicator (&#186;) - ordm */
-        "\233",	/* small o, slash - oslash */
-        "\344",	/* small o, tilde - otilde */
-        "\224",	/* small o, dieresis or umlaut mark - ouml */
+	"\233",	/* small o, slash - oslash */
+	"\344",	/* small o, tilde - otilde */
+	"\224",	/* small o, dieresis or umlaut mark - ouml */
 	"\364",	/* paragraph sign (&#182;) - para */
 	"\361",	/* plus-or-minus sign (&#177;) - plusmn */
 	"\234",	/* pound sign (&#163;) - pound */
 	"\042",	/* quote '"' - quot */
 	"\257",	/* angle quotation mark, right (&#187;) - raquo */
 	"\251",	/* circled R registered sign (&#174;) - reg */
-        "\365",	/* section sign (&#167;) - sect */
+	"\365",	/* section sign (&#167;) - sect */
 	"\007",	/* soft hyphen (&#173;) NEVER CHANGE THIS - shy */
 	"\373",	/* superscript 1 (&#185;) - sup1 */
 	"\375",	/* superscript 2 (&#178;) - sup2 */
 	"\374",	/* superscript 3 (&#179;) - sup3 */
-        "\341",	/* small sharp s, German (sz ligature) - szlig */
+	"\341",	/* small sharp s, German (sz ligature) - szlig */
 	"\002",	/* thin space - not collapsed NEVER CHANGE THIS - thinsp */
-        "\347",	/* small thorn, Icelandic - thorn */
-  	"\236",	/* multiplication sign (&#215;) - times */
+	"\347",	/* small thorn, Icelandic - thorn */
+	"\236",	/* multiplication sign (&#215;) - times */
 	"(TM)",	/* circled TM trade mark sign (&#8482;) - trade */
 	"\243",	/* small u, acute accent - uacute */
-        "\226",	/* small u, circumflex accent - ucirc */
+	"\226",	/* small u, circumflex accent - ucirc */
 	"\227",	/* small u, grave accent - ugrave */
 	"\371",	/* spacing diaresis (&#168;) - uml */
-        "\201",	/* small u, dieresis or umlaut mark - uuml */
-        "\354",	/* small y, acute accent - yacute */
+	"\201",	/* small u, dieresis or umlaut mark - uuml */
+	"\354",	/* small y, acute accent - yacute */
 	"\276",	/* yen sign (&#165;) - yen */
-        "\230",	/* small y, dieresis or umlaut mark - yuml */
+	"\230",	/* small y, dieresis or umlaut mark - yuml */
 };
 
 /*
@@ -794,118 +794,118 @@ PRIVATE char * PC_850_charset[] = {
 **      November 6 1995. nkg@freenet.vancouver.bc.ca
 */
 PRIVATE char * Macintosh[] = {
-        "\256",	/* capital AE diphthong (ligature) - AElig */
-        "\347",	/* capital A, acute accent - Aacute */
-        "\345",	/* capital A, circumflex accent - Acirc */
-        "\313",	/* capital A, grave accent - Agrave */
-        "\201",	/* capital A, ring - Aring */
-        "\314",	/* capital A, tilde - Atilde */
-        "\200",	/* capital A, dieresis or umlaut mark - Auml */
-        "\202",	/* capital C, cedilla - Ccedil */
-        "Dj",	/* capital D with stroke - Dstrok */
-        "DH",	/* capital Eth, Icelandic - ETH */
-        "\203",	/* capital E, acute accent - Eacute */
-        "\346",	/* capital E, circumflex accent - Ecirc */
-        "\351",	/* capital E, grave accent - Egrave */
-        "\350",	/* capital E, dieresis or umlaut mark - Euml */
-        "\352",	/* capital I, acute accent - Iacute */
-        "\353",	/* capital I, circumflex accent - Icirc */
-        "\355",	/* capital I, grave accent - Igrave */
-        "\354",	/* capital I, dieresis or umlaut mark - Iuml */
-        "\204",	/* capital N, tilde - Ntilde */
-        "\356",	/* capital O, acute accent - Oacute */
-        "\357",	/* capital O, circumflex accent - Ocirc */
-        "\361",	/* capital O, grave accent - Ograve */
-        "\257",	/* capital O, slash - Oslash */
-        "\315",	/* capital O, tilde - Otilde */
-        "\205",	/* capital O, dieresis or umlaut mark - Ouml */
-        "P",	/* capital THORN, Icelandic - THORN */
-        "\362",	/* capital U, acute accent - Uacute */
-        "\363",	/* capital U, circumflex accent - Ucirc */
-        "\364",	/* capital U, grave accent - Ugrave */
-        "\206",	/* capital U, dieresis or umlaut mark - Uuml */
-        "Y'",	/* capital Y, acute accent - Yacute */
-        "\207",	/* small a, acute accent - aacute */
-        "\211",	/* small a, circumflex accent - acirc */
-        "\253",	/* spacing acute (&#180;) - acute */
-        "\276",	/* small ae diphthong (ligature) - aelig */
-        "\210",	/* small a, grave accent - agrave */
-        "\046",	/* ampersand - amp */
-        "\214",	/* small a, ring - aring */
-        "\213",	/* small a, tilde - atilde */
-        "\212",	/* small a, dieresis or umlaut mark - auml */
-        "|",	/* broken vertical bar (&#166;) - brkbar */
-        "|",	/* broken vertical bar (&#166;) - brvbar */
-        "\215",	/* small c, cedilla - ccedil */
-        "\374",	/* spacing cedilla (&#184;) - cedil */
-        "\242",	/* cent sign (&#162;) - cent */
-        "\251",	/* copyright sign (&#169;) - copy */
-        "\333",	/* currency sign (&#164;) - curren */
-        "\241",	/* degree sign (&#176;) - deg */
-        "\254",	/* spacing diaresis (&#168;) - die */
-        "\326",	/* division sign (&#247;) - divide */
-        "\216",	/* small e, acute accent - eacute */
-        "\220",	/* small e, circumflex accent - ecirc */
-        "\217",	/* small e, grave accent - egrave */
+	"\256",	/* capital AE diphthong (ligature) - AElig */
+	"\347",	/* capital A, acute accent - Aacute */
+	"\345",	/* capital A, circumflex accent - Acirc */
+	"\313",	/* capital A, grave accent - Agrave */
+	"\201",	/* capital A, ring - Aring */
+	"\314",	/* capital A, tilde - Atilde */
+	"\200",	/* capital A, dieresis or umlaut mark - Auml */
+	"\202",	/* capital C, cedilla - Ccedil */
+	"Dj",	/* capital D with stroke - Dstrok */
+	"DH",	/* capital Eth, Icelandic - ETH */
+	"\203",	/* capital E, acute accent - Eacute */
+	"\346",	/* capital E, circumflex accent - Ecirc */
+	"\351",	/* capital E, grave accent - Egrave */
+	"\350",	/* capital E, dieresis or umlaut mark - Euml */
+	"\352",	/* capital I, acute accent - Iacute */
+	"\353",	/* capital I, circumflex accent - Icirc */
+	"\355",	/* capital I, grave accent - Igrave */
+	"\354",	/* capital I, dieresis or umlaut mark - Iuml */
+	"\204",	/* capital N, tilde - Ntilde */
+	"\356",	/* capital O, acute accent - Oacute */
+	"\357",	/* capital O, circumflex accent - Ocirc */
+	"\361",	/* capital O, grave accent - Ograve */
+	"\257",	/* capital O, slash - Oslash */
+	"\315",	/* capital O, tilde - Otilde */
+	"\205",	/* capital O, dieresis or umlaut mark - Ouml */
+	"P",	/* capital THORN, Icelandic - THORN */
+	"\362",	/* capital U, acute accent - Uacute */
+	"\363",	/* capital U, circumflex accent - Ucirc */
+	"\364",	/* capital U, grave accent - Ugrave */
+	"\206",	/* capital U, dieresis or umlaut mark - Uuml */
+	"Y'",	/* capital Y, acute accent - Yacute */
+	"\207",	/* small a, acute accent - aacute */
+	"\211",	/* small a, circumflex accent - acirc */
+	"\253",	/* spacing acute (&#180;) - acute */
+	"\276",	/* small ae diphthong (ligature) - aelig */
+	"\210",	/* small a, grave accent - agrave */
+	"\046",	/* ampersand - amp */
+	"\214",	/* small a, ring - aring */
+	"\213",	/* small a, tilde - atilde */
+	"\212",	/* small a, dieresis or umlaut mark - auml */
+	"|",	/* broken vertical bar (&#166;) - brkbar */
+	"|",	/* broken vertical bar (&#166;) - brvbar */
+	"\215",	/* small c, cedilla - ccedil */
+	"\374",	/* spacing cedilla (&#184;) - cedil */
+	"\242",	/* cent sign (&#162;) - cent */
+	"\251",	/* copyright sign (&#169;) - copy */
+	"\333",	/* currency sign (&#164;) - curren */
+	"\241",	/* degree sign (&#176;) - deg */
+	"\254",	/* spacing diaresis (&#168;) - die */
+	"\326",	/* division sign (&#247;) - divide */
+	"\216",	/* small e, acute accent - eacute */
+	"\220",	/* small e, circumflex accent - ecirc */
+	"\217",	/* small e, grave accent - egrave */
 	"-",	/* dash the width of emsp - emdash */
-        "\002",	/* emsp, em space - not collapsed NEVER CHANGE THIS - emsp */
+	"\002",	/* emsp, em space - not collapsed NEVER CHANGE THIS - emsp */
 	"-",	/* dash the width of ensp - endash */
-        "\002",	/* ensp, en space - not collapsed NEVER CHANGE THIS - ensp */
-        "dh",	/* small eth, Icelandic - eth */
-        "\221",	/* small e, dieresis or umlaut mark - euml */
-        " 1/2",	/* fraction 1/2 (&#189;) - frac12 */
-        " 1/4",	/* fraction 1/4 (&#188;) - frac14 */
-        " 3/4",	/* fraction 3/4 (&#190;) - frac34 */
-        "\076",	/* greater than - gt */
-        "\370",	/* spacing macron (&#175;) - hibar */
-        "\222",	/* small i, acute accent - iacute */
-        "\224",	/* small i, circumflex accent - icirc */
-        "\301",	/* inverted exclamation mark (&#161;) - iexcl */
-        "\223",	/* small i, grave accent - igrave */
-        "\300",	/* inverted question mark (&#191;) - iquest */
-        "\225",	/* small i, dieresis or umlaut mark - iuml */
-        "\307",	/* angle quotation mark, left (&#171;) - laquo */
-        "\074",	/* less than - lt */
-        "\370",	/* spacing macron (&#175;) - macr */
+	"\002",	/* ensp, en space - not collapsed NEVER CHANGE THIS - ensp */
+	"dh",	/* small eth, Icelandic - eth */
+	"\221",	/* small e, dieresis or umlaut mark - euml */
+	" 1/2",	/* fraction 1/2 (&#189;) - frac12 */
+	" 1/4",	/* fraction 1/4 (&#188;) - frac14 */
+	" 3/4",	/* fraction 3/4 (&#190;) - frac34 */
+	"\076",	/* greater than - gt */
+	"\370",	/* spacing macron (&#175;) - hibar */
+	"\222",	/* small i, acute accent - iacute */
+	"\224",	/* small i, circumflex accent - icirc */
+	"\301",	/* inverted exclamation mark (&#161;) - iexcl */
+	"\223",	/* small i, grave accent - igrave */
+	"\300",	/* inverted question mark (&#191;) - iquest */
+	"\225",	/* small i, dieresis or umlaut mark - iuml */
+	"\307",	/* angle quotation mark, left (&#171;) - laquo */
+	"\074",	/* less than - lt */
+	"\370",	/* spacing macron (&#175;) - macr */
 	"-",	/* dash the width of emsp - mdash */
-        "\265",	/* micro sign (&#181;) - micro */
-        "\245",	/* middle dot (&#183;) - middot */
-        "\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
+	"\265",	/* micro sign (&#181;) - micro */
+	"\245",	/* middle dot (&#183;) - middot */
+	"\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
 	"-",	/* dash the width of ensp - ndash */
-        "\302",	/* negation sign (&#172;) - not */
-        "\226",	/* small n, tilde - ntilde */
-        "\227",	/* small o, acute accent - oacute */
-        "\231",	/* small o, circumflex accent - ocirc */
-        "\230",	/* small o, grave accent - ograve */
-        "\273",	/* feminine ordinal indicator (&#170;) - ordf */
-        "\274",	/* masculine ordinal indicator (&#186;) - ordm */
-        "\277",	/* small o, slash - oslash */
-        "\233",	/* small o, tilde - otilde */
-        "\232",	/* small o, dieresis or umlaut mark - ouml */
-        "\246",	/* paragraph sign (&#182;) - para */
-        "\261",	/* plus-or-minus sign (&#177;) - plusmn */
-        "\243",	/* pound sign (&#163;) - pound */
-        "\042",	/* quote '"' - quot */
-        "\310",	/* angle quotation mark, right (&#187;) - raquo */
-        "\250",	/* circled R registered sign (&#174;) - reg */
-        "\244",	/* section sign (&#167;) - sect */
-        "\007",	/* soft hyphen (&#173;) NEVER CHANGE THIS - shy */
-        "^1",	/* superscript 1 (&#185;) - sup1 */
-        "^2",	/* superscript 2 (&#178;) - sup2 */
-        "^3",	/* superscript 3 (&#179;) - sup3 */
-        "\247",	/* small sharp s, German (sz ligature) - szlig */
+	"\302",	/* negation sign (&#172;) - not */
+	"\226",	/* small n, tilde - ntilde */
+	"\227",	/* small o, acute accent - oacute */
+	"\231",	/* small o, circumflex accent - ocirc */
+	"\230",	/* small o, grave accent - ograve */
+	"\273",	/* feminine ordinal indicator (&#170;) - ordf */
+	"\274",	/* masculine ordinal indicator (&#186;) - ordm */
+	"\277",	/* small o, slash - oslash */
+	"\233",	/* small o, tilde - otilde */
+	"\232",	/* small o, dieresis or umlaut mark - ouml */
+	"\246",	/* paragraph sign (&#182;) - para */
+	"\261",	/* plus-or-minus sign (&#177;) - plusmn */
+	"\243",	/* pound sign (&#163;) - pound */
+	"\042",	/* quote '"' - quot */
+	"\310",	/* angle quotation mark, right (&#187;) - raquo */
+	"\250",	/* circled R registered sign (&#174;) - reg */
+	"\244",	/* section sign (&#167;) - sect */
+	"\007",	/* soft hyphen (&#173;) NEVER CHANGE THIS - shy */
+	"^1",	/* superscript 1 (&#185;) - sup1 */
+	"^2",	/* superscript 2 (&#178;) - sup2 */
+	"^3",	/* superscript 3 (&#179;) - sup3 */
+	"\247",	/* small sharp s, German (sz ligature) - szlig */
 	"\002",	/* thin space - not collapsed NEVER CHANGE THIS - thinsp */
-        "p",	/* small thorn, Icelandic - thorn */
-        "*",	/* multiplication sign (&#215;) - times */
-        "\252",	/* circled TM trade mark sign (&#8482;) - trade */
-        "\234",	/* small u, acute accent - uacute */
-        "\236",	/* small u, circumflex accent - ucirc */
-        "\235",	/* small u, grave accent - ugrave*/
-        "\254",	/* spacing diaresis (&#168;) - uml */
-        "\237",	/* small u, dieresis or umlaut mark - uuml */
-        "y'",	/* small y, acute accent - yacute*/
-        "\264",	/* yen sign (&#165;) - yen */
-        "\330",	/* small y, dieresis or umlaut mark - yuml */
+	"p",	/* small thorn, Icelandic - thorn */
+	"*",	/* multiplication sign (&#215;) - times */
+	"\252",	/* circled TM trade mark sign (&#8482;) - trade */
+	"\234",	/* small u, acute accent - uacute */
+	"\236",	/* small u, circumflex accent - ucirc */
+	"\235",	/* small u, grave accent - ugrave*/
+	"\254",	/* spacing diaresis (&#168;) - uml */
+	"\237",	/* small u, dieresis or umlaut mark - uuml */
+	"y'",	/* small y, acute accent - yacute*/
+	"\264",	/* yen sign (&#165;) - yen */
+	"\330",	/* small y, dieresis or umlaut mark - yuml */
 };
 
 /*      Entity values -- NeXT
@@ -1015,7 +1015,7 @@ PRIVATE char * NeXT_Step[] = {
 	"\373",	/* small sharp s, German (sz ligature) - szlig */
 	"\002",	/* thin space - not collapsed NEVER CHANGE THIS - thinsp */
 	"\374",	/* small thorn, Icelandic - thorn */
-  	"*",	/* multiplication sign (&#215;) - times */ 
+	"*",	/* multiplication sign (&#215;) - times */
 	"(TM)",	/* circled TM trade mark sign (&#8482;) - trade */
 	"\363",	/* small u, acute accent - uacute */
 	"\364",	/* small u, circumflex accent - ucirc */
@@ -1033,65 +1033,65 @@ PRIVATE char * NeXT_Step[] = {
 **      Dec 11, 1995, ache@astral.msk.su
 */
 PRIVATE char * KOI8_R[] = {
-        "AE",	/* capital AE diphthong (ligature) - AElig */
-        "A",	/* capital A, acute accent - Aacute */
-        "A",	/* capital A, circumflex accent - Acirc */
-        "A",	/* capital A, grave accent - Agrave */
-        "A",	/* capital A, ring - Aring */
-        "A",	/* capital A, tilde - Atilde */
+	"AE",	/* capital AE diphthong (ligature) - AElig */
+	"A",	/* capital A, acute accent - Aacute */
+	"A",	/* capital A, circumflex accent - Acirc */
+	"A",	/* capital A, grave accent - Agrave */
+	"A",	/* capital A, ring - Aring */
+	"A",	/* capital A, tilde - Atilde */
 #ifdef LY_UMLAUT
-        "Ae",	/* capital A, dieresis or umlaut mark - Auml*/
+	"Ae",	/* capital A, dieresis or umlaut mark - Auml*/
 #else
-        "A",	/* capital A, dieresis or umlaut mark - Auml*/
+	"A",	/* capital A, dieresis or umlaut mark - Auml*/
 #endif /* LY_UMLAUT */
-        "C",	/* capital C, cedilla - Ccedil */
-        "Dj",	/* capital D with stroke - Dstrok */
-        "DH",	/* capital Eth, Icelandic - ETH */
-        "E",	/* capital E, acute accent - Eacute */
-        "E",	/* capital E, circumflex accent - Ecirc */
-        "E",	/* capital E, grave accent - Egrave */
+	"C",	/* capital C, cedilla - Ccedil */
+	"Dj",	/* capital D with stroke - Dstrok */
+	"DH",	/* capital Eth, Icelandic - ETH */
+	"E",	/* capital E, acute accent - Eacute */
+	"E",	/* capital E, circumflex accent - Ecirc */
+	"E",	/* capital E, grave accent - Egrave */
 	"\263",	/* capital E, dieresis or umlaut mark - Euml */
-        "I",	/* capital I, acute accent - Iacute */
-        "I",	/* capital I, circumflex accent - Icirc */
-        "I",	/* capital I, grave accent - Igrave */
-        "I",	/* capital I, dieresis or umlaut mark - Iuml */
-        "N",	/* capital N, tilde - Ntilde */
-        "O",	/* capital O, acute accent - Oacute */
-        "O",	/* capital O, circumflex accent - Ocirc */
-        "O",	/* capital O, grave accent - Ograve */
-        "O",	/* capital O, slash - Oslash */
-        "O",	/* capital O, tilde - Otilde */
+	"I",	/* capital I, acute accent - Iacute */
+	"I",	/* capital I, circumflex accent - Icirc */
+	"I",	/* capital I, grave accent - Igrave */
+	"I",	/* capital I, dieresis or umlaut mark - Iuml */
+	"N",	/* capital N, tilde - Ntilde */
+	"O",	/* capital O, acute accent - Oacute */
+	"O",	/* capital O, circumflex accent - Ocirc */
+	"O",	/* capital O, grave accent - Ograve */
+	"O",	/* capital O, slash - Oslash */
+	"O",	/* capital O, tilde - Otilde */
 #ifdef LY_UMLAUT
-        "Oe",	/* capital O, dieresis or umlaut mark - Ouml */
+	"Oe",	/* capital O, dieresis or umlaut mark - Ouml */
 #else
-        "O",	/* capital O, dieresis or umlaut mark - Ouml */
+	"O",	/* capital O, dieresis or umlaut mark - Ouml */
 #endif /* LY_UMLAUT */
-        "P",	/* capital THORN, Icelandic - THORN */
-        "U",	/* capital U, acute accent - Uacute */
-        "U",	/* capital U, circumflex accent - Ucirc */
-        "U",	/* capital U, grave accent - Ugrave */
+	"P",	/* capital THORN, Icelandic - THORN */
+	"U",	/* capital U, acute accent - Uacute */
+	"U",	/* capital U, circumflex accent - Ucirc */
+	"U",	/* capital U, grave accent - Ugrave */
 #ifdef LY_UMLAUT
-        "Ue",	/* capital U, dieresis or umlaut mark - Uuml */
+	"Ue",	/* capital U, dieresis or umlaut mark - Uuml */
 #else
-        "U",	/* capital U, dieresis or umlaut mark - Uuml */
+	"U",	/* capital U, dieresis or umlaut mark - Uuml */
 #endif /* LY_UMLAUT */
-        "Y",	/* capital Y, acute accent - Yacute */
-        "a",	/* small a, acute accent - aacute */
-        "a",	/* small a, circumflex accent - acirc */
+	"Y",	/* capital Y, acute accent - Yacute */
+	"a",	/* small a, acute accent - aacute */
+	"a",	/* small a, circumflex accent - acirc */
 	"'",	/* spacing acute (&#180;) - acute */
-        "ae",	/* small ae diphthong (ligature) - aelig */
-        "`a",	/* small a, grave accent - agrave */
-        "&",	/* ampersand - amp */
-        "a",	/* small a, ring - aring */
-        "a",	/* small a, tilde - atilde */
+	"ae",	/* small ae diphthong (ligature) - aelig */
+	"`a",	/* small a, grave accent - agrave */
+	"&",	/* ampersand - amp */
+	"a",	/* small a, ring - aring */
+	"a",	/* small a, tilde - atilde */
 #ifdef LY_UMLAUT
-        "ae",	/* small a, dieresis or umlaut mark - auml */
+	"ae",	/* small a, dieresis or umlaut mark - auml */
 #else
-        "a",	/* small a, dieresis or umlaut mark - auml */
+	"a",	/* small a, dieresis or umlaut mark - auml */
 #endif /* LY_UMLAUT */
 	"|",	/* broken vertical bar (&#166;) - brkbar */
 	"|",	/* broken vertical bar (&#166;) - brvbar */
-        "c",	/* small c, cedilla - ccedil */
+	"c",	/* small c, cedilla - ccedil */
 	",",	/* spacing cedilla (&#184;) - cedil */
 	"-c-",	/* cent sign (&#162;) - cent */
 	"\277",	/* copyright sign (&#169;) - copy */
@@ -1099,52 +1099,52 @@ PRIVATE char * KOI8_R[] = {
 	"\234",	/* degree sign (&#176;) - deg */
 	"\042",	/* spacing diaresis (&#168;) - die */
 	"\237",	/* division sign (&#247;) - divide */
-        "e",	/* small e, acute accent - eacute */
-        "e",	/* small e, circumflex accent - ecirc */
-        "e",	/* small e, grave accent - egrave */
+	"e",	/* small e, acute accent - eacute */
+	"e",	/* small e, circumflex accent - ecirc */
+	"e",	/* small e, grave accent - egrave */
 	"-",	/* dash the width of emsp - emdash */
-        "\002",	/* emsp NEVER CHANGE THIS - emsp */
+	"\002",	/* emsp NEVER CHANGE THIS - emsp */
 	"-",	/* dash the width of ensp - endash */
-        "\002",	/* ensp NEVER CHANGE THIS - ensp */
-        "dh",	/* small eth, Icelandic eth */
+	"\002",	/* ensp NEVER CHANGE THIS - ensp */
+	"dh",	/* small eth, Icelandic eth */
 	"\243",	/* small e, dieresis or umlaut mark - euml */
 	" 1/2",	/* fraction 1/2 (&#189;) - frac12 */
 	" 1/4",	/* fraction 1/4 (&#188;) - frac14 */
 	" 3/4",	/* fraction 3/4 (&#190;) - frac34 */
-        ">",	/* greater than - gt */
+	">",	/* greater than - gt */
 	"-",	/* spacing macron (&#175;) - hibar */
-        "i",	/* small i, acute accent - iacute */
-        "i",	/* small i, circumflex accent - icirc*/
+	"i",	/* small i, acute accent - iacute */
+	"i",	/* small i, circumflex accent - icirc*/
 	"!",	/* inverted exclamation mark (&#161;) - iexcl */
-        "`i",	/* small i, grave accent - igrave */
+	"`i",	/* small i, grave accent - igrave */
 	"?",	/* inverted question mark (&#191;) - iquest */
-        "i",	/* small i, dieresis or umlaut mark - iuml */
+	"i",	/* small i, dieresis or umlaut mark - iuml */
 	"<<",	/* angle quotation mark, left (&#171;) - laquo */
-        "<",	/* less than - lt */
+	"<",	/* less than - lt */
 	"-",	/* spacing macron (&#175;) - macr */
 	"-",	/* dash the width of emsp - mdash */
 	"u",	/* micro sign (&#181;) - micro */
 	"\236",	/* middle dot (&#183;) - middot */
-        "\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
+	"\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
 	"-",	/* dash the width of ensp - ndash */
 	"NOT",	/* negation sign (&#172;) - not */
-        "n",	/* small n, tilde - ntilde */
-        "o",	/* small o, acute accent - oacute */
-        "o",	/* small o, circumflex accent - ocirc */
-        "o",	/* small o, grave accent - ograve */
+	"n",	/* small n, tilde - ntilde */
+	"o",	/* small o, acute accent - oacute */
+	"o",	/* small o, circumflex accent - ocirc */
+	"o",	/* small o, grave accent - ograve */
 	"-a",	/* feminine ordinal indicator (&#170;) - ordf */
 	"-o",	/* masculine ordinal indicator (&#186;) - ordm */
-        "o",	/* small o, slash - oslash */
-        "o",	/* small o, tilde - otilde */
+	"o",	/* small o, slash - oslash */
+	"o",	/* small o, tilde - otilde */
 #ifdef LY_UMLAUT
-        "oe",	/* small o, dieresis or umlaut mark - ouml */
+	"oe",	/* small o, dieresis or umlaut mark - ouml */
 #else
-        "o",	/* small o, dieresis or umlaut mark - ouml */
+	"o",	/* small o, dieresis or umlaut mark - ouml */
 #endif /* LY_UMLAUT */
 	"P:",	/* paragraph sign (&#182;) - para */
 	"+-",	/* plus-or-minus sign (&#177;) - plusmn */
 	"-L-",	/* pound sign (&#163;) - pound */
-        "\"",	/* quote '"' - quot */
+	"\"",	/* quote '"' - quot */
 	">>",	/* angle quotation mark, right (&#187;) - raquo */
 	"(R)",	/* circled R registered sign (&#174;) - reg */
 	"S:",	/* section sign (&#167;) - sect */
@@ -1152,23 +1152,23 @@ PRIVATE char * KOI8_R[] = {
 	"^1",	/* superscript 1 (&#185;) - sup1 */
 	"\235",	/* superscript 2 (&#178;) - sup2 */
 	"^3",	/* superscript 3 (&#179;) - sup3 */
-        "ss",	/* small sharp s, German (sz ligature) - szlig */
+	"ss",	/* small sharp s, German (sz ligature) - szlig */
 	"\002",	/* thin space - not collapsed NEVER CHANGE THIS - thinsp */
-        "p",	/* small thorn, Icelandic - thorn */
-  	"*",	/* multiplication sign (&#215;) - times */ 
+	"p",	/* small thorn, Icelandic - thorn */
+	"*",	/* multiplication sign (&#215;) - times */
 	"(TM)",	/* circled TM trade mark sign (&#8482;) - trade */
-        "u",	/* small u, acute accent - uacute */
-        "u",	/* small u, circumflex accent - ucirc */
-        "u",	/* small u, grave accent - ugrave */
+	"u",	/* small u, acute accent - uacute */
+	"u",	/* small u, circumflex accent - ucirc */
+	"u",	/* small u, grave accent - ugrave */
 	"\042",	/* spacing diaresis (&#168;) - uml */
 #ifdef LY_UMLAUT
-        "ue",	/* small u, dieresis or umlaut mark - uuml */
+	"ue",	/* small u, dieresis or umlaut mark - uuml */
 #else
-        "u",	/* small u, dieresis or umlaut mark - uuml */
+	"u",	/* small u, dieresis or umlaut mark - uuml */
 #endif /* LY_UMLAUT */
-        "y",	/* small y, acute accent - yacute */
+	"y",	/* small y, acute accent - yacute */
 	"YEN",	/* yen sign (&#165;) - yen */
-        "y",	/* small y, dieresis or umlaut mark - yuml */
+	"y",	/* small y, dieresis or umlaut mark - yuml */
 };
 
 /*      Entity values -- Chinese (EUC)
@@ -1176,65 +1176,65 @@ PRIVATE char * KOI8_R[] = {
 **      This MUST match exactly the table referred to in the DTD!
 */
 PRIVATE char * Chinese[] = {
-        "AE",	/* capital AE diphthong (ligature) - AElig */
-        "A",	/* capital A, acute accent - Aacute */
-        "A",	/* capital A, circumflex accent - Acirc */
-        "A",	/* capital A, grave accent - Agrave */
-        "A",	/* capital A, ring - Aring */
-        "A",	/* capital A, tilde - Atilde */
+	"AE",	/* capital AE diphthong (ligature) - AElig */
+	"A",	/* capital A, acute accent - Aacute */
+	"A",	/* capital A, circumflex accent - Acirc */
+	"A",	/* capital A, grave accent - Agrave */
+	"A",	/* capital A, ring - Aring */
+	"A",	/* capital A, tilde - Atilde */
 #ifdef LY_UMLAUT
-        "Ae",	/* capital A, dieresis or umlaut mark - Auml*/
+	"Ae",	/* capital A, dieresis or umlaut mark - Auml*/
 #else
-        "A",	/* capital A, dieresis or umlaut mark - Auml*/
+	"A",	/* capital A, dieresis or umlaut mark - Auml*/
 #endif /* LY_UMLAUT */
-        "C",	/* capital C, cedilla - Ccedil */
-        "Dj",	/* capital D with stroke - Dstrok */
-        "DH",	/* capital Eth, Icelandic - ETH */
-        "E",	/* capital E, acute accent - Eacute */
-        "E",	/* capital E, circumflex accent - Ecirc */
-        "E",	/* capital E, grave accent - Egrave */
-        "E",	/* capital E, dieresis or umlaut mark - Euml */
-        "I",	/* capital I, acute accent - Iacute */
-        "I",	/* capital I, circumflex accent - Icirc */
-        "I",	/* capital I, grave accent - Igrave */
-        "I",	/* capital I, dieresis or umlaut mark - Iuml */
-        "N",	/* capital N, tilde - Ntilde */
-        "O",	/* capital O, acute accent - Oacute */
-        "O",	/* capital O, circumflex accent - Ocirc */
-        "O",	/* capital O, grave accent - Ograve */
-        "O",	/* capital O, slash - Oslash */
-        "O",	/* capital O, tilde - Otilde */
+	"C",	/* capital C, cedilla - Ccedil */
+	"Dj",	/* capital D with stroke - Dstrok */
+	"DH",	/* capital Eth, Icelandic - ETH */
+	"E",	/* capital E, acute accent - Eacute */
+	"E",	/* capital E, circumflex accent - Ecirc */
+	"E",	/* capital E, grave accent - Egrave */
+	"E",	/* capital E, dieresis or umlaut mark - Euml */
+	"I",	/* capital I, acute accent - Iacute */
+	"I",	/* capital I, circumflex accent - Icirc */
+	"I",	/* capital I, grave accent - Igrave */
+	"I",	/* capital I, dieresis or umlaut mark - Iuml */
+	"N",	/* capital N, tilde - Ntilde */
+	"O",	/* capital O, acute accent - Oacute */
+	"O",	/* capital O, circumflex accent - Ocirc */
+	"O",	/* capital O, grave accent - Ograve */
+	"O",	/* capital O, slash - Oslash */
+	"O",	/* capital O, tilde - Otilde */
 #ifdef LY_UMLAUT
-        "Oe",	/* capital O, dieresis or umlaut mark - Ouml */
+	"Oe",	/* capital O, dieresis or umlaut mark - Ouml */
 #else
-        "O",	/* capital O, dieresis or umlaut mark - Ouml */
+	"O",	/* capital O, dieresis or umlaut mark - Ouml */
 #endif /* LY_UMLAUT */
-        "P",	/* capital THORN, Icelandic - THORN */
-        "U",	/* capital U, acute accent - Uacute */
-        "U",	/* capital U, circumflex accent - Ucirc */
-        "U",	/* capital U, grave accent - Ugrave */
+	"P",	/* capital THORN, Icelandic - THORN */
+	"U",	/* capital U, acute accent - Uacute */
+	"U",	/* capital U, circumflex accent - Ucirc */
+	"U",	/* capital U, grave accent - Ugrave */
 #ifdef LY_UMLAUT
-        "Ue",	/* capital U, dieresis or umlaut mark - Uuml */
+	"Ue",	/* capital U, dieresis or umlaut mark - Uuml */
 #else
-        "U",	/* capital U, dieresis or umlaut mark - Uuml */
+	"U",	/* capital U, dieresis or umlaut mark - Uuml */
 #endif /* LY_UMLAUT */
-        "Y",	/* capital Y, acute accent - Yacute */
-        "a",	/* small a, acute accent - aacute */
-        "a",	/* small a, circumflex accent - acirc */
+	"Y",	/* capital Y, acute accent - Yacute */
+	"a",	/* small a, acute accent - aacute */
+	"a",	/* small a, circumflex accent - acirc */
 	"'",	/* spacing acute (&#180;) - acute */
-        "ae",	/* small ae diphthong (ligature) - aelig */
-        "`a",	/* small a, grave accent - agrave */
-        "&",	/* ampersand - amp */
-        "a",	/* small a, ring - aring */
-        "a",	/* small a, tilde - atilde */
+	"ae",	/* small ae diphthong (ligature) - aelig */
+	"`a",	/* small a, grave accent - agrave */
+	"&",	/* ampersand - amp */
+	"a",	/* small a, ring - aring */
+	"a",	/* small a, tilde - atilde */
 #ifdef LY_UMLAUT
-        "ae",	/* small a, dieresis or umlaut mark - auml */
+	"ae",	/* small a, dieresis or umlaut mark - auml */
 #else
-        "a",	/* small a, dieresis or umlaut mark - auml */
+	"a",	/* small a, dieresis or umlaut mark - auml */
 #endif /* LY_UMLAUT */
 	"|",	/* broken vertical bar (&#166;) - brkbar */
 	"|",	/* broken vertical bar (&#166;) - brvbar */
-        "c",	/* small c, cedilla - ccedil */
+	"c",	/* small c, cedilla - ccedil */
 	",",	/* spacing cedilla (&#184;) - cedil */
 	"-c-",	/* cent sign (&#162;) - cent */
 	"(c)",	/* copyright sign (&#169;) - copy */
@@ -1242,52 +1242,52 @@ PRIVATE char * Chinese[] = {
 	"DEG",	/* degree sign (&#176;) - deg */
 	"\042",	/* spacing diaresis (&#168;) - die */
 	"/",	/* division sign (&#247;) - divide */
-        "e",	/* small e, acute accent - eacute */
-        "e",	/* small e, circumflex accent - ecirc */
-        "e",	/* small e, grave accent - egrave */
+	"e",	/* small e, acute accent - eacute */
+	"e",	/* small e, circumflex accent - ecirc */
+	"e",	/* small e, grave accent - egrave */
 	"-",	/* dash the width of emsp - emdash */
-        "\002",	/* emsp NEVER CHANGE THIS - emsp */
+	"\002",	/* emsp NEVER CHANGE THIS - emsp */
 	"-",	/* dash the width of ensp - endash */
-        "\002",	/* ensp NEVER CHANGE THIS - ensp */
-        "dh",	/* small eth, Icelandic eth */
-        "e",	/* small e, dieresis or umlaut mark - euml */
+	"\002",	/* ensp NEVER CHANGE THIS - ensp */
+	"dh",	/* small eth, Icelandic eth */
+	"e",	/* small e, dieresis or umlaut mark - euml */
 	" 1/2",	/* fraction 1/2 (&#189;) - frac12 */
 	" 1/4",	/* fraction 1/4 (&#188;) - frac14 */
 	" 3/4",	/* fraction 3/4 (&#190;) - frac34 */
-        ">",	/* greater than - gt */
+	">",	/* greater than - gt */
 	"-",	/* spacing macron (&#175;) - hibar */
-        "i",	/* small i, acute accent - iacute */
-        "i",	/* small i, circumflex accent - icirc*/
+	"i",	/* small i, acute accent - iacute */
+	"i",	/* small i, circumflex accent - icirc*/
 	"!",	/* inverted exclamation mark (&#161;) - iexcl */
-        "`i",	/* small i, grave accent - igrave */
+	"`i",	/* small i, grave accent - igrave */
 	"?",	/* inverted question mark (&#191;) - iquest */
-        "i",	/* small i, dieresis or umlaut mark - iuml */
+	"i",	/* small i, dieresis or umlaut mark - iuml */
 	"<<",	/* angle quotation mark, left (&#171;) - laquo */
-        "<",	/* less than - lt */
+	"<",	/* less than - lt */
 	"-",	/* spacing macron (&#175;) - macr */
 	"-",	/* dash the width of emsp - mdash */
 	"u",	/* micro sign (&#181;) - micro */
 	".",	/* middle dot (&#183;) - middot */
-        "\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
+	"\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
 	"-",	/* dash the width of ensp - ndash */
 	"NOT",	/* negation sign (&#172;) - not */
-        "n",	/* small n, tilde - ntilde */
-        "o",	/* small o, acute accent - oacute */
-        "o",	/* small o, circumflex accent - ocirc */
-        "o",	/* small o, grave accent - ograve */
+	"n",	/* small n, tilde - ntilde */
+	"o",	/* small o, acute accent - oacute */
+	"o",	/* small o, circumflex accent - ocirc */
+	"o",	/* small o, grave accent - ograve */
 	"-a",	/* feminine ordinal indicator (&#170;) - ordf */
 	"-o",	/* masculine ordinal indicator (&#186;) - ordm */
-        "o",	/* small o, slash - oslash */
-        "o",	/* small o, tilde - otilde */
+	"o",	/* small o, slash - oslash */
+	"o",	/* small o, tilde - otilde */
 #ifdef LY_UMLAUT
-        "oe",	/* small o, dieresis or umlaut mark - ouml */
+	"oe",	/* small o, dieresis or umlaut mark - ouml */
 #else
-        "o",	/* small o, dieresis or umlaut mark - ouml */
+	"o",	/* small o, dieresis or umlaut mark - ouml */
 #endif /* LY_UMLAUT */
 	"P:",	/* paragraph sign (&#182;) - para */
 	"+-",	/* plus-or-minus sign (&#177;) - plusmn */
 	"-L-",	/* pound sign (&#163;) - pound */
-        "\"",	/* quote '"' - quot */
+	"\"",	/* quote '"' - quot */
 	">>",	/* angle quotation mark, right (&#187;) - raquo */
 	"(R)",	/* circled R registered sign (&#174;) - reg */
 	"S:",	/* section sign (&#167;) - sect */
@@ -1295,23 +1295,23 @@ PRIVATE char * Chinese[] = {
 	"^1",	/* superscript 1 (&#185;) - sup1 */
 	"^2",	/* superscript 2 (&#178;) - sup2 */
 	"^3",	/* superscript 3 (&#179;) - sup3 */
-        "ss",	/* small sharp s, German (sz ligature) - szlig */
+	"ss",	/* small sharp s, German (sz ligature) - szlig */
 	"\002",	/* thin space - not collapsed NEVER CHANGE THIS - thinsp */
-        "p",	/* small thorn, Icelandic - thorn */
-  	"*",	/* multiplication sign (&#215;) - times */ 
+	"p",	/* small thorn, Icelandic - thorn */
+	"*",	/* multiplication sign (&#215;) - times */
 	"(TM)",	/* circled TM trade mark sign (&#8482;) - trade */
-        "u",	/* small u, acute accent - uacute */
-        "u",	/* small u, circumflex accent - ucirc */
-        "u",	/* small u, grave accent - ugrave */
+	"u",	/* small u, acute accent - uacute */
+	"u",	/* small u, circumflex accent - ucirc */
+	"u",	/* small u, grave accent - ugrave */
 	"\042",	/* spacing diaresis (&#168;) - uml */
 #ifdef LY_UMLAUT
-        "ue",	/* small u, dieresis or umlaut mark - uuml */
+	"ue",	/* small u, dieresis or umlaut mark - uuml */
 #else
-        "u",	/* small u, dieresis or umlaut mark - uuml */
+	"u",	/* small u, dieresis or umlaut mark - uuml */
 #endif /* LY_UMLAUT */
-        "y",	/* small y, acute accent - yacute */
+	"y",	/* small y, acute accent - yacute */
 	"YEN",	/* yen sign (&#165;) - yen */
-        "y",	/* small y, dieresis or umlaut mark - yuml */
+	"y",	/* small y, dieresis or umlaut mark - yuml */
 };
 
 /*      Entity values -- Japanese (EUC)
@@ -1319,65 +1319,65 @@ PRIVATE char * Chinese[] = {
 **      This MUST match exactly the table referred to in the DTD!
 */
 PRIVATE char * EUC_JP[] = {
-        "AE",	/* capital AE diphthong (ligature) - AElig */
-        "A",	/* capital A, acute accent - Aacute */
-        "A",	/* capital A, circumflex accent - Acirc */
-        "A",	/* capital A, grave accent - Agrave */
-        "A",	/* capital A, ring - Aring */
-        "A",	/* capital A, tilde - Atilde */
+	"AE",	/* capital AE diphthong (ligature) - AElig */
+	"A",	/* capital A, acute accent - Aacute */
+	"A",	/* capital A, circumflex accent - Acirc */
+	"A",	/* capital A, grave accent - Agrave */
+	"A",	/* capital A, ring - Aring */
+	"A",	/* capital A, tilde - Atilde */
 #ifdef LY_UMLAUT
-        "Ae",	/* capital A, dieresis or umlaut mark - Auml*/
+	"Ae",	/* capital A, dieresis or umlaut mark - Auml*/
 #else
-        "A",	/* capital A, dieresis or umlaut mark - Auml*/
+	"A",	/* capital A, dieresis or umlaut mark - Auml*/
 #endif /* LY_UMLAUT */
-        "C",	/* capital C, cedilla - Ccedil */
-        "Dj",	/* capital D with stroke - Dstrok */
-        "DH",	/* capital Eth, Icelandic - ETH */
-        "E",	/* capital E, acute accent - Eacute */
-        "E",	/* capital E, circumflex accent - Ecirc */
-        "E",	/* capital E, grave accent - Egrave */
-        "E",	/* capital E, dieresis or umlaut mark - Euml */
-        "I",	/* capital I, acute accent - Iacute */
-        "I",	/* capital I, circumflex accent - Icirc */
-        "I",	/* capital I, grave accent - Igrave */
-        "I",	/* capital I, dieresis or umlaut mark - Iuml */
-        "N",	/* capital N, tilde - Ntilde */
-        "O",	/* capital O, acute accent - Oacute */
-        "O",	/* capital O, circumflex accent - Ocirc */
-        "O",	/* capital O, grave accent - Ograve */
-        "O",	/* capital O, slash - Oslash */
-        "O",	/* capital O, tilde - Otilde */
+	"C",	/* capital C, cedilla - Ccedil */
+	"Dj",	/* capital D with stroke - Dstrok */
+	"DH",	/* capital Eth, Icelandic - ETH */
+	"E",	/* capital E, acute accent - Eacute */
+	"E",	/* capital E, circumflex accent - Ecirc */
+	"E",	/* capital E, grave accent - Egrave */
+	"E",	/* capital E, dieresis or umlaut mark - Euml */
+	"I",	/* capital I, acute accent - Iacute */
+	"I",	/* capital I, circumflex accent - Icirc */
+	"I",	/* capital I, grave accent - Igrave */
+	"I",	/* capital I, dieresis or umlaut mark - Iuml */
+	"N",	/* capital N, tilde - Ntilde */
+	"O",	/* capital O, acute accent - Oacute */
+	"O",	/* capital O, circumflex accent - Ocirc */
+	"O",	/* capital O, grave accent - Ograve */
+	"O",	/* capital O, slash - Oslash */
+	"O",	/* capital O, tilde - Otilde */
 #ifdef LY_UMLAUT
-        "Oe",	/* capital O, dieresis or umlaut mark - Ouml */
+	"Oe",	/* capital O, dieresis or umlaut mark - Ouml */
 #else
-        "O",	/* capital O, dieresis or umlaut mark - Ouml */
+	"O",	/* capital O, dieresis or umlaut mark - Ouml */
 #endif /* LY_UMLAUT */
-        "P",	/* capital THORN, Icelandic - THORN */
-        "U",	/* capital U, acute accent - Uacute */
-        "U",	/* capital U, circumflex accent - Ucirc */
-        "U",	/* capital U, grave accent - Ugrave */
+	"P",	/* capital THORN, Icelandic - THORN */
+	"U",	/* capital U, acute accent - Uacute */
+	"U",	/* capital U, circumflex accent - Ucirc */
+	"U",	/* capital U, grave accent - Ugrave */
 #ifdef LY_UMLAUT
-        "Ue",	/* capital U, dieresis or umlaut mark - Uuml */
+	"Ue",	/* capital U, dieresis or umlaut mark - Uuml */
 #else
-        "U",	/* capital U, dieresis or umlaut mark - Uuml */
+	"U",	/* capital U, dieresis or umlaut mark - Uuml */
 #endif /* LY_UMLAUT */
-        "Y",	/* capital Y, acute accent - Yacute */
-        "a",	/* small a, acute accent - aacute */
-        "a",	/* small a, circumflex accent - acirc */
+	"Y",	/* capital Y, acute accent - Yacute */
+	"a",	/* small a, acute accent - aacute */
+	"a",	/* small a, circumflex accent - acirc */
 	"'",	/* spacing acute (&#180;) - acute */
-        "ae",	/* small ae diphthong (ligature) - aelig */
-        "`a",	/* small a, grave accent - agrave */
-        "&",	/* ampersand - amp */
-        "a",	/* small a, ring - aring */
-        "a",	/* small a, tilde - atilde */
+	"ae",	/* small ae diphthong (ligature) - aelig */
+	"`a",	/* small a, grave accent - agrave */
+	"&",	/* ampersand - amp */
+	"a",	/* small a, ring - aring */
+	"a",	/* small a, tilde - atilde */
 #ifdef LY_UMLAUT
-        "ae",	/* small a, dieresis or umlaut mark - auml */
+	"ae",	/* small a, dieresis or umlaut mark - auml */
 #else
-        "a",	/* small a, dieresis or umlaut mark - auml */
+	"a",	/* small a, dieresis or umlaut mark - auml */
 #endif /* LY_UMLAUT */
 	"|",	/* broken vertical bar (&#166;) - brkbar */
 	"|",	/* broken vertical bar (&#166;) - brvbar */
-        "c",	/* small c, cedilla - ccedil */
+	"c",	/* small c, cedilla - ccedil */
 	",",	/* spacing cedilla (&#184;) - cedil */
 	"-c-",	/* cent sign (&#162;) - cent */
 	"(c)",	/* copyright sign (&#169;) - copy */
@@ -1385,52 +1385,52 @@ PRIVATE char * EUC_JP[] = {
 	"DEG",	/* degree sign (&#176;) - deg */
 	"\042",	/* spacing diaresis (&#168;) - die */
 	"/",	/* division sign (&#247;) - divide */
-        "e",	/* small e, acute accent - eacute */
-        "e",	/* small e, circumflex accent - ecirc */
-        "e",	/* small e, grave accent - egrave */
+	"e",	/* small e, acute accent - eacute */
+	"e",	/* small e, circumflex accent - ecirc */
+	"e",	/* small e, grave accent - egrave */
 	"-",	/* dash the width of emsp - emdash */
-        "\002",	/* emsp NEVER CHANGE THIS - emsp */
+	"\002",	/* emsp NEVER CHANGE THIS - emsp */
 	"-",	/* dash the width of ensp - endash */
-        "\002",	/* ensp NEVER CHANGE THIS - ensp */
-        "dh",	/* small eth, Icelandic eth */
-        "e",	/* small e, dieresis or umlaut mark - euml */
+	"\002",	/* ensp NEVER CHANGE THIS - ensp */
+	"dh",	/* small eth, Icelandic eth */
+	"e",	/* small e, dieresis or umlaut mark - euml */
 	" 1/2",	/* fraction 1/2 (&#189;) - frac12 */
 	" 1/4",	/* fraction 1/4 (&#188;) - frac14 */
 	" 3/4",	/* fraction 3/4 (&#190;) - frac34 */
-        ">",	/* greater than - gt */
+	">",	/* greater than - gt */
 	"-",	/* spacing macron (&#175;) - hibar */
-        "i",	/* small i, acute accent - iacute */
-        "i",	/* small i, circumflex accent - icirc*/
+	"i",	/* small i, acute accent - iacute */
+	"i",	/* small i, circumflex accent - icirc*/
 	"!",	/* inverted exclamation mark (&#161;) - iexcl */
-        "`i",	/* small i, grave accent - igrave */
+	"`i",	/* small i, grave accent - igrave */
 	"?",	/* inverted question mark (&#191;) - iquest */
-        "i",	/* small i, dieresis or umlaut mark - iuml */
+	"i",	/* small i, dieresis or umlaut mark - iuml */
 	"<<",	/* angle quotation mark, left (&#171;) - laquo */
-        "<",	/* less than - lt */
+	"<",	/* less than - lt */
 	"-",	/* spacing macron (&#175;) - macr */
 	"-",	/* dash the width of emsp - mdash */
 	"u",	/* micro sign (&#181;) - micro */
 	".",	/* middle dot (&#183;) - middot */
-        "\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
+	"\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
 	"-",	/* dash the width of ensp - ndash */
 	"NOT",	/* negation sign (&#172;) - not */
-        "n",	/* small n, tilde - ntilde */
-        "o",	/* small o, acute accent - oacute */
-        "o",	/* small o, circumflex accent - ocirc */
-        "o",	/* small o, grave accent - ograve */
+	"n",	/* small n, tilde - ntilde */
+	"o",	/* small o, acute accent - oacute */
+	"o",	/* small o, circumflex accent - ocirc */
+	"o",	/* small o, grave accent - ograve */
 	"-a",	/* feminine ordinal indicator (&#170;) - ordf */
 	"-o",	/* masculine ordinal indicator (&#186;) - ordm */
-        "o",	/* small o, slash - oslash */
-        "o",	/* small o, tilde - otilde */
+	"o",	/* small o, slash - oslash */
+	"o",	/* small o, tilde - otilde */
 #ifdef LY_UMLAUT
-        "oe",	/* small o, dieresis or umlaut mark - ouml */
+	"oe",	/* small o, dieresis or umlaut mark - ouml */
 #else
-        "o",	/* small o, dieresis or umlaut mark - ouml */
+	"o",	/* small o, dieresis or umlaut mark - ouml */
 #endif /* LY_UMLAUT */
 	"P:",	/* paragraph sign (&#182;) - para */
 	"+-",	/* plus-or-minus sign (&#177;) - plusmn */
 	"-L-",	/* pound sign (&#163;) - pound */
-        "\"",	/* quote '"' - quot */
+	"\"",	/* quote '"' - quot */
 	">>",	/* angle quotation mark, right (&#187;) - raquo */
 	"(R)",	/* circled R registered sign (&#174;) - reg */
 	"S:",	/* section sign (&#167;) - sect */
@@ -1438,23 +1438,23 @@ PRIVATE char * EUC_JP[] = {
 	"^1",	/* superscript 1 (&#185;) - sup1 */
 	"^2",	/* superscript 2 (&#178;) - sup2 */
 	"^3",	/* superscript 3 (&#179;) - sup3 */
-        "ss",	/* small sharp s, German (sz ligature) - szlig */
+	"ss",	/* small sharp s, German (sz ligature) - szlig */
 	"\002",	/* thin space - not collapsed NEVER CHANGE THIS - thinsp */
-        "p",	/* small thorn, Icelandic - thorn */
-  	"*",	/* multiplication sign (&#215;) - times */ 
+	"p",	/* small thorn, Icelandic - thorn */
+	"*",	/* multiplication sign (&#215;) - times */
 	"(TM)",	/* circled TM trade mark sign (&#8482;) - trade */
-        "u",	/* small u, acute accent - uacute */
-        "u",	/* small u, circumflex accent - ucirc */
-        "u",	/* small u, grave accent - ugrave */
+	"u",	/* small u, acute accent - uacute */
+	"u",	/* small u, circumflex accent - ucirc */
+	"u",	/* small u, grave accent - ugrave */
 	"\042",	/* spacing diaresis (&#168;) - uml */
 #ifdef LY_UMLAUT
-        "ue",	/* small u, dieresis or umlaut mark - uuml */
+	"ue",	/* small u, dieresis or umlaut mark - uuml */
 #else
-        "u",	/* small u, dieresis or umlaut mark - uuml */
+	"u",	/* small u, dieresis or umlaut mark - uuml */
 #endif /* LY_UMLAUT */
-        "y",	/* small y, acute accent - yacute */
+	"y",	/* small y, acute accent - yacute */
 	"YEN",	/* yen sign (&#165;) - yen */
-        "y",	/* small y, dieresis or umlaut mark - yuml */
+	"y",	/* small y, dieresis or umlaut mark - yuml */
 };
 
 /*      Entity values -- Japanese (SJIS)
@@ -1462,65 +1462,65 @@ PRIVATE char * EUC_JP[] = {
 **      This MUST match exactly the table referred to in the DTD!
 */
 PRIVATE char * Shift_JIS[] = {
-        "AE",	/* capital AE diphthong (ligature) - AElig */
-        "A",	/* capital A, acute accent - Aacute */
-        "A",	/* capital A, circumflex accent - Acirc */
-        "A",	/* capital A, grave accent - Agrave */
-        "A",	/* capital A, ring - Aring */
-        "A",	/* capital A, tilde - Atilde */
+	"AE",	/* capital AE diphthong (ligature) - AElig */
+	"A",	/* capital A, acute accent - Aacute */
+	"A",	/* capital A, circumflex accent - Acirc */
+	"A",	/* capital A, grave accent - Agrave */
+	"A",	/* capital A, ring - Aring */
+	"A",	/* capital A, tilde - Atilde */
 #ifdef LY_UMLAUT
-        "Ae",	/* capital A, dieresis or umlaut mark - Auml*/
+	"Ae",	/* capital A, dieresis or umlaut mark - Auml*/
 #else
-        "A",	/* capital A, dieresis or umlaut mark - Auml*/
+	"A",	/* capital A, dieresis or umlaut mark - Auml*/
 #endif /* LY_UMLAUT */
-        "C",	/* capital C, cedilla - Ccedil */
-        "Dj",	/* capital D with stroke - Dstrok */
-        "DH",	/* capital Eth, Icelandic - ETH */
-        "E",	/* capital E, acute accent - Eacute */
-        "E",	/* capital E, circumflex accent - Ecirc */
-        "E",	/* capital E, grave accent - Egrave */
-        "E",	/* capital E, dieresis or umlaut mark - Euml */
-        "I",	/* capital I, acute accent - Iacute */
-        "I",	/* capital I, circumflex accent - Icirc */
-        "I",	/* capital I, grave accent - Igrave */
-        "I",	/* capital I, dieresis or umlaut mark - Iuml */
-        "N",	/* capital N, tilde - Ntilde */
-        "O",	/* capital O, acute accent - Oacute */
-        "O",	/* capital O, circumflex accent - Ocirc */
-        "O",	/* capital O, grave accent - Ograve */
-        "O",	/* capital O, slash - Oslash */
-        "O",	/* capital O, tilde - Otilde */
+	"C",	/* capital C, cedilla - Ccedil */
+	"Dj",	/* capital D with stroke - Dstrok */
+	"DH",	/* capital Eth, Icelandic - ETH */
+	"E",	/* capital E, acute accent - Eacute */
+	"E",	/* capital E, circumflex accent - Ecirc */
+	"E",	/* capital E, grave accent - Egrave */
+	"E",	/* capital E, dieresis or umlaut mark - Euml */
+	"I",	/* capital I, acute accent - Iacute */
+	"I",	/* capital I, circumflex accent - Icirc */
+	"I",	/* capital I, grave accent - Igrave */
+	"I",	/* capital I, dieresis or umlaut mark - Iuml */
+	"N",	/* capital N, tilde - Ntilde */
+	"O",	/* capital O, acute accent - Oacute */
+	"O",	/* capital O, circumflex accent - Ocirc */
+	"O",	/* capital O, grave accent - Ograve */
+	"O",	/* capital O, slash - Oslash */
+	"O",	/* capital O, tilde - Otilde */
 #ifdef LY_UMLAUT
-        "Oe",	/* capital O, dieresis or umlaut mark - Ouml */
+	"Oe",	/* capital O, dieresis or umlaut mark - Ouml */
 #else
-        "O",	/* capital O, dieresis or umlaut mark - Ouml */
+	"O",	/* capital O, dieresis or umlaut mark - Ouml */
 #endif /* LY_UMLAUT */
-        "P",	/* capital THORN, Icelandic - THORN */
-        "U",	/* capital U, acute accent - Uacute */
-        "U",	/* capital U, circumflex accent - Ucirc */
-        "U",	/* capital U, grave accent - Ugrave */
+	"P",	/* capital THORN, Icelandic - THORN */
+	"U",	/* capital U, acute accent - Uacute */
+	"U",	/* capital U, circumflex accent - Ucirc */
+	"U",	/* capital U, grave accent - Ugrave */
 #ifdef LY_UMLAUT
-        "Ue",	/* capital U, dieresis or umlaut mark - Uuml */
+	"Ue",	/* capital U, dieresis or umlaut mark - Uuml */
 #else
-        "U",	/* capital U, dieresis or umlaut mark - Uuml */
+	"U",	/* capital U, dieresis or umlaut mark - Uuml */
 #endif /* LY_UMLAUT */
-        "Y",	/* capital Y, acute accent - Yacute */
-        "a",	/* small a, acute accent - aacute */
-        "a",	/* small a, circumflex accent - acirc */
+	"Y",	/* capital Y, acute accent - Yacute */
+	"a",	/* small a, acute accent - aacute */
+	"a",	/* small a, circumflex accent - acirc */
 	"'",	/* spacing acute (&#180;) - acute */
-        "ae",	/* small ae diphthong (ligature) - aelig */
-        "`a",	/* small a, grave accent - agrave */
-        "&",	/* ampersand - amp */
-        "a",	/* small a, ring - aring */
-        "a",	/* small a, tilde - atilde */
+	"ae",	/* small ae diphthong (ligature) - aelig */
+	"`a",	/* small a, grave accent - agrave */
+	"&",	/* ampersand - amp */
+	"a",	/* small a, ring - aring */
+	"a",	/* small a, tilde - atilde */
 #ifdef LY_UMLAUT
-        "ae",	/* small a, dieresis or umlaut mark - auml */
+	"ae",	/* small a, dieresis or umlaut mark - auml */
 #else
-        "a",	/* small a, dieresis or umlaut mark - auml */
+	"a",	/* small a, dieresis or umlaut mark - auml */
 #endif /* LY_UMLAUT */
 	"|",	/* broken vertical bar (&#166;) - brkbar */
 	"|",	/* broken vertical bar (&#166;) - brvbar */
-        "c",	/* small c, cedilla - ccedil */
+	"c",	/* small c, cedilla - ccedil */
 	",",	/* spacing cedilla (&#184;) - cedil */
 	"-c-",	/* cent sign (&#162;) - cent */
 	"(c)",	/* copyright sign (&#169;) - copy */
@@ -1528,52 +1528,52 @@ PRIVATE char * Shift_JIS[] = {
 	"DEG",	/* degree sign (&#176;) - deg */
 	"\042",	/* spacing diaresis (&#168;) - die */
 	"/",	/* division sign (&#247;) - divide */
-        "e",	/* small e, acute accent - eacute */
-        "e",	/* small e, circumflex accent - ecirc */
-        "e",	/* small e, grave accent - egrave */
+	"e",	/* small e, acute accent - eacute */
+	"e",	/* small e, circumflex accent - ecirc */
+	"e",	/* small e, grave accent - egrave */
 	"-",	/* dash the width of emsp - emdash */
-        "\002",	/* emsp NEVER CHANGE THIS - emsp */
+	"\002",	/* emsp NEVER CHANGE THIS - emsp */
 	"-",	/* dash the width of ensp - endash */
-        "\002",	/* ensp NEVER CHANGE THIS - ensp */
-        "dh",	/* small eth, Icelandic eth */
-        "e",	/* small e, dieresis or umlaut mark - euml */
+	"\002",	/* ensp NEVER CHANGE THIS - ensp */
+	"dh",	/* small eth, Icelandic eth */
+	"e",	/* small e, dieresis or umlaut mark - euml */
 	" 1/2",	/* fraction 1/2 (&#189;) - frac12 */
 	" 1/4",	/* fraction 1/4 (&#188;) - frac14 */
 	" 3/4",	/* fraction 3/4 (&#190;) - frac34 */
-        ">",	/* greater than - gt */
+	">",	/* greater than - gt */
 	"-",	/* spacing macron (&#175;) - hibar */
-        "i",	/* small i, acute accent - iacute */
-        "i",	/* small i, circumflex accent - icirc*/
+	"i",	/* small i, acute accent - iacute */
+	"i",	/* small i, circumflex accent - icirc*/
 	"!",	/* inverted exclamation mark (&#161;) - iexcl */
-        "`i",	/* small i, grave accent - igrave */
+	"`i",	/* small i, grave accent - igrave */
 	"?",	/* inverted question mark (&#191;) - iquest */
-        "i",	/* small i, dieresis or umlaut mark - iuml */
+	"i",	/* small i, dieresis or umlaut mark - iuml */
 	"<<",	/* angle quotation mark, left (&#171;) - laquo */
-        "<",	/* less than - lt */
+	"<",	/* less than - lt */
 	"-",	/* spacing macron (&#175;) - macr */
 	"-",	/* dash the width of emsp - mdash */
 	"u",	/* micro sign (&#181;) - micro */
 	".",	/* middle dot (&#183;) - middot */
-        "\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
+	"\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
 	"-",	/* dash the width of ensp - ndash */
 	"NOT",	/* negation sign (&#172;) - not */
-        "n",	/* small n, tilde - ntilde */
-        "o",	/* small o, acute accent - oacute */
-        "o",	/* small o, circumflex accent - ocirc */
-        "o",	/* small o, grave accent - ograve */
+	"n",	/* small n, tilde - ntilde */
+	"o",	/* small o, acute accent - oacute */
+	"o",	/* small o, circumflex accent - ocirc */
+	"o",	/* small o, grave accent - ograve */
 	"-a",	/* feminine ordinal indicator (&#170;) - ordf */
 	"-o",	/* masculine ordinal indicator (&#186;) - ordm */
-        "o",	/* small o, slash - oslash */
-        "o",	/* small o, tilde - otilde */
+	"o",	/* small o, slash - oslash */
+	"o",	/* small o, tilde - otilde */
 #ifdef LY_UMLAUT
-        "oe",	/* small o, dieresis or umlaut mark - ouml */
+	"oe",	/* small o, dieresis or umlaut mark - ouml */
 #else
-        "o",	/* small o, dieresis or umlaut mark - ouml */
+	"o",	/* small o, dieresis or umlaut mark - ouml */
 #endif /* LY_UMLAUT */
 	"P:",	/* paragraph sign (&#182;) - para */
 	"+-",	/* plus-or-minus sign (&#177;) - plusmn */
 	"-L-",	/* pound sign (&#163;) - pound */
-        "\"",	/* quote '"' - quot */
+	"\"",	/* quote '"' - quot */
 	">>",	/* angle quotation mark, right (&#187;) - raquo */
 	"(R)",	/* circled R registered sign (&#174;) - reg */
 	"S:",	/* section sign (&#167;) - sect */
@@ -1581,23 +1581,23 @@ PRIVATE char * Shift_JIS[] = {
 	"^1",	/* superscript 1 (&#185;) - sup1 */
 	"^2",	/* superscript 2 (&#178;) - sup2 */
 	"^3",	/* superscript 3 (&#179;) - sup3 */
-        "ss",	/* small sharp s, German (sz ligature) - szlig */
+	"ss",	/* small sharp s, German (sz ligature) - szlig */
 	"\002",	/* thin space - not collapsed NEVER CHANGE THIS - thinsp */
-        "p",	/* small thorn, Icelandic - thorn */
-  	"*",	/* multiplication sign (&#215;) - times */ 
+	"p",	/* small thorn, Icelandic - thorn */
+	"*",	/* multiplication sign (&#215;) - times */
 	"(TM)",	/* circled TM trade mark sign (&#8482;) - trade */
-        "u",	/* small u, acute accent - uacute */
-        "u",	/* small u, circumflex accent - ucirc */
-        "u",	/* small u, grave accent - ugrave */
+	"u",	/* small u, acute accent - uacute */
+	"u",	/* small u, circumflex accent - ucirc */
+	"u",	/* small u, grave accent - ugrave */
 	"\042",	/* spacing diaresis (&#168;) - uml */
 #ifdef LY_UMLAUT
-        "ue",	/* small u, dieresis or umlaut mark - uuml */
+	"ue",	/* small u, dieresis or umlaut mark - uuml */
 #else
-        "u",	/* small u, dieresis or umlaut mark - uuml */
+	"u",	/* small u, dieresis or umlaut mark - uuml */
 #endif /* LY_UMLAUT */
-        "y",	/* small y, acute accent - yacute */
+	"y",	/* small y, acute accent - yacute */
 	"YEN",	/* yen sign (&#165;) - yen */
-        "y",	/* small y, dieresis or umlaut mark - yuml */
+	"y",	/* small y, dieresis or umlaut mark - yuml */
 };
 
 /*      Entity values -- Korean (EUC)
@@ -1605,65 +1605,65 @@ PRIVATE char * Shift_JIS[] = {
 **      This MUST match exactly the table referred to in the DTD!
 */
 PRIVATE char * Korean[] = {
-        "AE",	/* capital AE diphthong (ligature) - AElig */
-        "A",	/* capital A, acute accent - Aacute */
-        "A",	/* capital A, circumflex accent - Acirc */
-        "A",	/* capital A, grave accent - Agrave */
-        "A",	/* capital A, ring - Aring */
-        "A",	/* capital A, tilde - Atilde */
+	"AE",	/* capital AE diphthong (ligature) - AElig */
+	"A",	/* capital A, acute accent - Aacute */
+	"A",	/* capital A, circumflex accent - Acirc */
+	"A",	/* capital A, grave accent - Agrave */
+	"A",	/* capital A, ring - Aring */
+	"A",	/* capital A, tilde - Atilde */
 #ifdef LY_UMLAUT
-        "Ae",	/* capital A, dieresis or umlaut mark - Auml*/
+	"Ae",	/* capital A, dieresis or umlaut mark - Auml*/
 #else
-        "A",	/* capital A, dieresis or umlaut mark - Auml*/
+	"A",	/* capital A, dieresis or umlaut mark - Auml*/
 #endif /* LY_UMLAUT */
-        "C",	/* capital C, cedilla - Ccedil */
-        "Dj",	/* capital D with stroke - Dstrok */
-        "DH",	/* capital Eth, Icelandic - ETH */
-        "E",	/* capital E, acute accent - Eacute */
-        "E",	/* capital E, circumflex accent - Ecirc */
-        "E",	/* capital E, grave accent - Egrave */
-        "E",	/* capital E, dieresis or umlaut mark - Euml */
-        "I",	/* capital I, acute accent - Iacute */
-        "I",	/* capital I, circumflex accent - Icirc */
-        "I",	/* capital I, grave accent - Igrave */
-        "I",	/* capital I, dieresis or umlaut mark - Iuml */
-        "N",	/* capital N, tilde - Ntilde */
-        "O",	/* capital O, acute accent - Oacute */
-        "O",	/* capital O, circumflex accent - Ocirc */
-        "O",	/* capital O, grave accent - Ograve */
-        "O",	/* capital O, slash - Oslash */
-        "O",	/* capital O, tilde - Otilde */
+	"C",	/* capital C, cedilla - Ccedil */
+	"Dj",	/* capital D with stroke - Dstrok */
+	"DH",	/* capital Eth, Icelandic - ETH */
+	"E",	/* capital E, acute accent - Eacute */
+	"E",	/* capital E, circumflex accent - Ecirc */
+	"E",	/* capital E, grave accent - Egrave */
+	"E",	/* capital E, dieresis or umlaut mark - Euml */
+	"I",	/* capital I, acute accent - Iacute */
+	"I",	/* capital I, circumflex accent - Icirc */
+	"I",	/* capital I, grave accent - Igrave */
+	"I",	/* capital I, dieresis or umlaut mark - Iuml */
+	"N",	/* capital N, tilde - Ntilde */
+	"O",	/* capital O, acute accent - Oacute */
+	"O",	/* capital O, circumflex accent - Ocirc */
+	"O",	/* capital O, grave accent - Ograve */
+	"O",	/* capital O, slash - Oslash */
+	"O",	/* capital O, tilde - Otilde */
 #ifdef LY_UMLAUT
-        "Oe",	/* capital O, dieresis or umlaut mark - Ouml */
+	"Oe",	/* capital O, dieresis or umlaut mark - Ouml */
 #else
-        "O",	/* capital O, dieresis or umlaut mark - Ouml */
+	"O",	/* capital O, dieresis or umlaut mark - Ouml */
 #endif /* LY_UMLAUT */
-        "P",	/* capital THORN, Icelandic - THORN */
-        "U",	/* capital U, acute accent - Uacute */
-        "U",	/* capital U, circumflex accent - Ucirc */
-        "U",	/* capital U, grave accent - Ugrave */
+	"P",	/* capital THORN, Icelandic - THORN */
+	"U",	/* capital U, acute accent - Uacute */
+	"U",	/* capital U, circumflex accent - Ucirc */
+	"U",	/* capital U, grave accent - Ugrave */
 #ifdef LY_UMLAUT
-        "Ue",	/* capital U, dieresis or umlaut mark - Uuml */
+	"Ue",	/* capital U, dieresis or umlaut mark - Uuml */
 #else
-        "U",	/* capital U, dieresis or umlaut mark - Uuml */
+	"U",	/* capital U, dieresis or umlaut mark - Uuml */
 #endif /* LY_UMLAUT */
-        "Y",	/* capital Y, acute accent - Yacute */
-        "a",	/* small a, acute accent - aacute */
-        "a",	/* small a, circumflex accent - acirc */
+	"Y",	/* capital Y, acute accent - Yacute */
+	"a",	/* small a, acute accent - aacute */
+	"a",	/* small a, circumflex accent - acirc */
 	"'",	/* spacing acute (&#180;) - acute */
-        "ae",	/* small ae diphthong (ligature) - aelig */
-        "`a",	/* small a, grave accent - agrave */
-        "&",	/* ampersand - amp */
-        "a",	/* small a, ring - aring */
-        "a",	/* small a, tilde - atilde */
+	"ae",	/* small ae diphthong (ligature) - aelig */
+	"`a",	/* small a, grave accent - agrave */
+	"&",	/* ampersand - amp */
+	"a",	/* small a, ring - aring */
+	"a",	/* small a, tilde - atilde */
 #ifdef LY_UMLAUT
-        "ae",	/* small a, dieresis or umlaut mark - auml */
+	"ae",	/* small a, dieresis or umlaut mark - auml */
 #else
-        "a",	/* small a, dieresis or umlaut mark - auml */
+	"a",	/* small a, dieresis or umlaut mark - auml */
 #endif /* LY_UMLAUT */
 	"|",	/* broken vertical bar (&#166;) - brkbar */
 	"|",	/* broken vertical bar (&#166;) - brvbar */
-        "c",	/* small c, cedilla - ccedil */
+	"c",	/* small c, cedilla - ccedil */
 	",",	/* spacing cedilla (&#184;) - cedil */
 	"-c-",	/* cent sign (&#162;) - cent */
 	"(c)",	/* copyright sign (&#169;) - copy */
@@ -1671,52 +1671,52 @@ PRIVATE char * Korean[] = {
 	"DEG",	/* degree sign (&#176;) - deg */
 	"\042",	/* spacing diaresis (&#168;) - die */
 	"/",	/* division sign (&#247;) - divide */
-        "e",	/* small e, acute accent - eacute */
-        "e",	/* small e, circumflex accent - ecirc */
-        "e",	/* small e, grave accent - egrave */
+	"e",	/* small e, acute accent - eacute */
+	"e",	/* small e, circumflex accent - ecirc */
+	"e",	/* small e, grave accent - egrave */
 	"-",	/* dash the width of emsp - emdash */
-        "\002",	/* emsp NEVER CHANGE THIS - emsp */
+	"\002",	/* emsp NEVER CHANGE THIS - emsp */
 	"-",	/* dash the width of ensp - endash */
-        "\002",	/* ensp NEVER CHANGE THIS - ensp */
-        "dh",	/* small eth, Icelandic eth */
-        "e",	/* small e, dieresis or umlaut mark - euml */
+	"\002",	/* ensp NEVER CHANGE THIS - ensp */
+	"dh",	/* small eth, Icelandic eth */
+	"e",	/* small e, dieresis or umlaut mark - euml */
 	" 1/2",	/* fraction 1/2 (&#189;) - frac12 */
 	" 1/4",	/* fraction 1/4 (&#188;) - frac14 */
 	" 3/4",	/* fraction 3/4 (&#190;) - frac34 */
-        ">",	/* greater than - gt */
+	">",	/* greater than - gt */
 	"-",	/* spacing macron (&#175;) - hibar */
-        "i",	/* small i, acute accent - iacute */
-        "i",	/* small i, circumflex accent - icirc*/
+	"i",	/* small i, acute accent - iacute */
+	"i",	/* small i, circumflex accent - icirc*/
 	"!",	/* inverted exclamation mark (&#161;) - iexcl */
-        "`i",	/* small i, grave accent - igrave */
+	"`i",	/* small i, grave accent - igrave */
 	"?",	/* inverted question mark (&#191;) - iquest */
-        "i",	/* small i, dieresis or umlaut mark - iuml */
+	"i",	/* small i, dieresis or umlaut mark - iuml */
 	"<<",	/* angle quotation mark, left (&#171;) - laquo */
-        "<",	/* less than - lt */
+	"<",	/* less than - lt */
 	"-",	/* spacing macron (&#175;) - macr */
 	"-",	/* dash the width of emsp - mdash */
 	"u",	/* micro sign (&#181;) - micro */
 	".",	/* middle dot (&#183;) - middot */
-        "\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
+	"\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
 	"-",	/* dash the width of ensp - ndash */
 	"NOT",	/* negation sign (&#172;) - not */
-        "n",	/* small n, tilde - ntilde */
-        "o",	/* small o, acute accent - oacute */
-        "o",	/* small o, circumflex accent - ocirc */
-        "o",	/* small o, grave accent - ograve */
+	"n",	/* small n, tilde - ntilde */
+	"o",	/* small o, acute accent - oacute */
+	"o",	/* small o, circumflex accent - ocirc */
+	"o",	/* small o, grave accent - ograve */
 	"-a",	/* feminine ordinal indicator (&#170;) - ordf */
 	"-o",	/* masculine ordinal indicator (&#186;) - ordm */
-        "o",	/* small o, slash - oslash */
-        "o",	/* small o, tilde - otilde */
+	"o",	/* small o, slash - oslash */
+	"o",	/* small o, tilde - otilde */
 #ifdef LY_UMLAUT
-        "oe",	/* small o, dieresis or umlaut mark - ouml */
+	"oe",	/* small o, dieresis or umlaut mark - ouml */
 #else
-        "o",	/* small o, dieresis or umlaut mark - ouml */
+	"o",	/* small o, dieresis or umlaut mark - ouml */
 #endif /* LY_UMLAUT */
 	"P:",	/* paragraph sign (&#182;) - para */
 	"+-",	/* plus-or-minus sign (&#177;) - plusmn */
 	"-L-",	/* pound sign (&#163;) - pound */
-        "\"",	/* quote '"' - quot */
+	"\"",	/* quote '"' - quot */
 	">>",	/* angle quotation mark, right (&#187;) - raquo */
 	"(R)",	/* circled R registered sign (&#174;) - reg */
 	"S:",	/* section sign (&#167;) - sect */
@@ -1724,23 +1724,23 @@ PRIVATE char * Korean[] = {
 	"^1",	/* superscript 1 (&#185;) - sup1 */
 	"^2",	/* superscript 2 (&#178;) - sup2 */
 	"^3",	/* superscript 3 (&#179;) - sup3 */
-        "ss",	/* small sharp s, German (sz ligature) - szlig */
+	"ss",	/* small sharp s, German (sz ligature) - szlig */
 	"\002",	/* thin space - not collapsed NEVER CHANGE THIS - thinsp */
-        "p",	/* small thorn, Icelandic - thorn */
-  	"*",	/* multiplication sign (&#215;) - times */ 
+	"p",	/* small thorn, Icelandic - thorn */
+	"*",	/* multiplication sign (&#215;) - times */
 	"(TM)",	/* circled TM trade mark sign (&#8482;) - trade */
-        "u",	/* small u, acute accent - uacute */
-        "u",	/* small u, circumflex accent - ucirc */
-        "u",	/* small u, grave accent - ugrave */
+	"u",	/* small u, acute accent - uacute */
+	"u",	/* small u, circumflex accent - ucirc */
+	"u",	/* small u, grave accent - ugrave */
 	"\042",	/* spacing diaresis (&#168;) - uml */
 #ifdef LY_UMLAUT
-        "ue",	/* small u, dieresis or umlaut mark - uuml */
+	"ue",	/* small u, dieresis or umlaut mark - uuml */
 #else
-        "u",	/* small u, dieresis or umlaut mark - uuml */
+	"u",	/* small u, dieresis or umlaut mark - uuml */
 #endif /* LY_UMLAUT */
-        "y",	/* small y, acute accent - yacute */
+	"y",	/* small y, acute accent - yacute */
 	"YEN",	/* yen sign (&#165;) - yen */
-        "y",	/* small y, dieresis or umlaut mark - yuml */
+	"y",	/* small y, dieresis or umlaut mark - yuml */
 };
 
 /*      Entity values -- Taipei (Big5)
@@ -1748,65 +1748,65 @@ PRIVATE char * Korean[] = {
 **	This MUST match exactly the table referred to in the DTD!
 */
 PRIVATE char * Taipei[] = {
-        "AE",	/* capital AE diphthong (ligature) - AElig */
-        "A",	/* capital A, acute accent - Aacute */
-        "A",	/* capital A, circumflex accent - Acirc */
-        "A",	/* capital A, grave accent - Agrave */
-        "A",	/* capital A, ring - Aring */
-        "A",	/* capital A, tilde - Atilde */
+	"AE",	/* capital AE diphthong (ligature) - AElig */
+	"A",	/* capital A, acute accent - Aacute */
+	"A",	/* capital A, circumflex accent - Acirc */
+	"A",	/* capital A, grave accent - Agrave */
+	"A",	/* capital A, ring - Aring */
+	"A",	/* capital A, tilde - Atilde */
 #ifdef LY_UMLAUT
-        "Ae",	/* capital A, dieresis or umlaut mark - Auml*/
+	"Ae",	/* capital A, dieresis or umlaut mark - Auml*/
 #else
-        "A",	/* capital A, dieresis or umlaut mark - Auml*/
+	"A",	/* capital A, dieresis or umlaut mark - Auml*/
 #endif /* LY_UMLAUT */
-        "C",	/* capital C, cedilla - Ccedil */
-        "Dj",	/* capital D with stroke - Dstrok */
-        "DH",	/* capital Eth, Icelandic - ETH */
-        "E",	/* capital E, acute accent - Eacute */
-        "E",	/* capital E, circumflex accent - Ecirc */
-        "E",	/* capital E, grave accent - Egrave */
-        "E",	/* capital E, dieresis or umlaut mark - Euml */
-        "I",	/* capital I, acute accent - Iacute */
-        "I",	/* capital I, circumflex accent - Icirc */
-        "I",	/* capital I, grave accent - Igrave */
-        "I",	/* capital I, dieresis or umlaut mark - Iuml */
-        "N",	/* capital N, tilde - Ntilde */
-        "O",	/* capital O, acute accent - Oacute */
-        "O",	/* capital O, circumflex accent - Ocirc */
-        "O",	/* capital O, grave accent - Ograve */
-        "O",	/* capital O, slash - Oslash */
-        "O",	/* capital O, tilde - Otilde */
+	"C",	/* capital C, cedilla - Ccedil */
+	"Dj",	/* capital D with stroke - Dstrok */
+	"DH",	/* capital Eth, Icelandic - ETH */
+	"E",	/* capital E, acute accent - Eacute */
+	"E",	/* capital E, circumflex accent - Ecirc */
+	"E",	/* capital E, grave accent - Egrave */
+	"E",	/* capital E, dieresis or umlaut mark - Euml */
+	"I",	/* capital I, acute accent - Iacute */
+	"I",	/* capital I, circumflex accent - Icirc */
+	"I",	/* capital I, grave accent - Igrave */
+	"I",	/* capital I, dieresis or umlaut mark - Iuml */
+	"N",	/* capital N, tilde - Ntilde */
+	"O",	/* capital O, acute accent - Oacute */
+	"O",	/* capital O, circumflex accent - Ocirc */
+	"O",	/* capital O, grave accent - Ograve */
+	"O",	/* capital O, slash - Oslash */
+	"O",	/* capital O, tilde - Otilde */
 #ifdef LY_UMLAUT
-        "Oe",	/* capital O, dieresis or umlaut mark - Ouml */
+	"Oe",	/* capital O, dieresis or umlaut mark - Ouml */
 #else
-        "O",	/* capital O, dieresis or umlaut mark - Ouml */
+	"O",	/* capital O, dieresis or umlaut mark - Ouml */
 #endif /* LY_UMLAUT */
-        "P",	/* capital THORN, Icelandic - THORN */
-        "U",	/* capital U, acute accent - Uacute */
-        "U",	/* capital U, circumflex accent - Ucirc */
-        "U",	/* capital U, grave accent - Ugrave */
+	"P",	/* capital THORN, Icelandic - THORN */
+	"U",	/* capital U, acute accent - Uacute */
+	"U",	/* capital U, circumflex accent - Ucirc */
+	"U",	/* capital U, grave accent - Ugrave */
 #ifdef LY_UMLAUT
-        "Ue",	/* capital U, dieresis or umlaut mark - Uuml */
+	"Ue",	/* capital U, dieresis or umlaut mark - Uuml */
 #else
-        "U",	/* capital U, dieresis or umlaut mark - Uuml */
+	"U",	/* capital U, dieresis or umlaut mark - Uuml */
 #endif /* LY_UMLAUT */
-        "Y",	/* capital Y, acute accent - Yacute */
-        "a",	/* small a, acute accent - aacute */
-        "a",	/* small a, circumflex accent - acirc */
+	"Y",	/* capital Y, acute accent - Yacute */
+	"a",	/* small a, acute accent - aacute */
+	"a",	/* small a, circumflex accent - acirc */
 	"'",	/* spacing acute (&#180;) - acute */
-        "ae",	/* small ae diphthong (ligature) - aelig */
-        "`a",	/* small a, grave accent - agrave */
-        "&",	/* ampersand - amp */
-        "a",	/* small a, ring - aring */
-        "a",	/* small a, tilde - atilde */
+	"ae",	/* small ae diphthong (ligature) - aelig */
+	"`a",	/* small a, grave accent - agrave */
+	"&",	/* ampersand - amp */
+	"a",	/* small a, ring - aring */
+	"a",	/* small a, tilde - atilde */
 #ifdef LY_UMLAUT
-        "ae",	/* small a, dieresis or umlaut mark - auml */
+	"ae",	/* small a, dieresis or umlaut mark - auml */
 #else
-        "a",	/* small a, dieresis or umlaut mark - auml */
+	"a",	/* small a, dieresis or umlaut mark - auml */
 #endif /* LY_UMLAUT */
 	"|",	/* broken vertical bar (&#166;) - brkbar */
 	"|",	/* broken vertical bar (&#166;) - brvbar */
-        "c",	/* small c, cedilla - ccedil */
+	"c",	/* small c, cedilla - ccedil */
 	",",	/* spacing cedilla (&#184;) - cedil */
 	"-c-",	/* cent sign (&#162;) - cent */
 	"(c)",	/* copyright sign (&#169;) - copy */
@@ -1814,52 +1814,52 @@ PRIVATE char * Taipei[] = {
 	"DEG",	/* degree sign (&#176;) - deg */
 	"\042",	/* spacing diaresis (&#168;) - die */
 	"/",	/* division sign (&#247;) - divide */
-        "e",	/* small e, acute accent - eacute */
-        "e",	/* small e, circumflex accent - ecirc */
-        "e",	/* small e, grave accent - egrave */
+	"e",	/* small e, acute accent - eacute */
+	"e",	/* small e, circumflex accent - ecirc */
+	"e",	/* small e, grave accent - egrave */
 	"-",	/* dash the width of emsp - emdash */
 	"\002",	/* emsp, em space - not collapsed NEVER CHANGE THIS - emsp */
 	"-",	/* dash the width of ensp - endash */
-        "\002",	/* ensp NEVER CHANGE THIS - ensp */
-        "dh",	/* small eth, Icelandic eth */
-        "e",	/* small e, dieresis or umlaut mark - euml */
+	"\002",	/* ensp NEVER CHANGE THIS - ensp */
+	"dh",	/* small eth, Icelandic eth */
+	"e",	/* small e, dieresis or umlaut mark - euml */
 	" 1/2",	/* fraction 1/2 (&#189;) - frac12 */
 	" 1/4",	/* fraction 1/4 (&#188;) - frac14 */
 	" 3/4",	/* fraction 3/4 (&#190;) - frac34 */
-        ">",	/* greater than - gt */
+	">",	/* greater than - gt */
 	"-",	/* spacing macron (&#175;) - hibar */
-        "i",	/* small i, acute accent - iacute */
-        "i",	/* small i, circumflex accent - icirc*/
+	"i",	/* small i, acute accent - iacute */
+	"i",	/* small i, circumflex accent - icirc*/
 	"!",	/* inverted exclamation mark (&#161;) - iexcl */
-        "`i",	/* small i, grave accent - igrave */
+	"`i",	/* small i, grave accent - igrave */
 	"?",	/* inverted question mark (&#191;) - iquest */
-        "i",	/* small i, dieresis or umlaut mark - iuml */
+	"i",	/* small i, dieresis or umlaut mark - iuml */
 	"<<",	/* angle quotation mark, left (&#171;) - laquo */
-        "<",	/* less than - lt */
+	"<",	/* less than - lt */
 	"-",	/* spacing macron (&#175;) - macr */
 	"-",	/* dash the width of emsp - mdash */
 	"u",	/* micro sign (&#181;) - micro */
 	".",	/* middle dot (&#183;) - middot */
-        "\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
+	"\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
 	"-",	/* dash the width of ensp - ndash */
 	"NOT",	/* negation sign (&#172;) - not */
-        "n",	/* small n, tilde - ntilde */
-        "o",	/* small o, acute accent - oacute */
-        "o",	/* small o, circumflex accent - ocirc */
-        "o",	/* small o, grave accent - ograve */
+	"n",	/* small n, tilde - ntilde */
+	"o",	/* small o, acute accent - oacute */
+	"o",	/* small o, circumflex accent - ocirc */
+	"o",	/* small o, grave accent - ograve */
 	"-a",	/* feminine ordinal indicator (&#170;) - ordf */
 	"-o",	/* masculine ordinal indicator (&#186;) - ordm */
-        "o",	/* small o, slash - oslash */
-        "o",	/* small o, tilde - otilde */
+	"o",	/* small o, slash - oslash */
+	"o",	/* small o, tilde - otilde */
 #ifdef LY_UMLAUT
-        "oe",	/* small o, dieresis or umlaut mark - ouml */
+	"oe",	/* small o, dieresis or umlaut mark - ouml */
 #else
-        "o",	/* small o, dieresis or umlaut mark - ouml */
+	"o",	/* small o, dieresis or umlaut mark - ouml */
 #endif /* LY_UMLAUT */
 	"P:",	/* paragraph sign (&#182;) - para */
 	"+-",	/* plus-or-minus sign (&#177;) - plusmn */
 	"-L-",	/* pound sign (&#163;) - pound */
-        "\"",	/* quote '"' - quot */
+	"\"",	/* quote '"' - quot */
 	">>",	/* angle quotation mark, right (&#187;) - raquo */
 	"(R)",	/* circled R registered sign (&#174;) - reg */
 	"S:",	/* section sign (&#167;) - sect */
@@ -1867,23 +1867,23 @@ PRIVATE char * Taipei[] = {
 	"^1",	/* superscript 1 (&#185;) - sup1 */
 	"^2",	/* superscript 2 (&#178;) - sup2 */
 	"^3",	/* superscript 3 (&#179;) - sup3 */
-        "ss",	/* small sharp s, German (sz ligature) - szlig */
+	"ss",	/* small sharp s, German (sz ligature) - szlig */
 	"\002",	/* thin space - not collapsed NEVER CHANGE THIS - thinsp */
-        "p",	/* small thorn, Icelandic - thorn */
-  	"*",	/* multiplication sign (&#215;) - times */ 
+	"p",	/* small thorn, Icelandic - thorn */
+	"*",	/* multiplication sign (&#215;) - times */
 	"(TM)",	/* circled TM trade mark sign (&#8482;) - trade */
-        "u",	/* small u, acute accent - uacute */
-        "u",	/* small u, circumflex accent - ucirc */
-        "u",	/* small u, grave accent - ugrave */
+	"u",	/* small u, acute accent - uacute */
+	"u",	/* small u, circumflex accent - ucirc */
+	"u",	/* small u, grave accent - ugrave */
 	"\042",	/* spacing diaresis (&#168;) - uml */
 #ifdef LY_UMLAUT
-        "ue",	/* small u, dieresis or umlaut mark - uuml */
+	"ue",	/* small u, dieresis or umlaut mark - uuml */
 #else
-        "u",	/* small u, dieresis or umlaut mark - uuml */
+	"u",	/* small u, dieresis or umlaut mark - uuml */
 #endif /* LY_UMLAUT */
-        "y",	/* small y, acute accent - yacute */
+	"y",	/* small y, acute accent - yacute */
 	"YEN",	/* yen sign (&#165;) - yen */
-        "y",	/* small y, dieresis or umlaut mark - yuml */
+	"y",	/* small y, dieresis or umlaut mark - yuml */
 };
 
 /*      Entity values -- 7 bit character approximations
@@ -1891,65 +1891,65 @@ PRIVATE char * Taipei[] = {
 **      This MUST match exactly the table referred to in the DTD!
 */
 PUBLIC char * SevenBitApproximations[] = {
-        "AE",	/* capital AE diphthong (ligature) (&#198;) - AElig */
-        "A",	/* capital A, acute accent (&#193;) - Aacute */
-        "A",	/* capital A, circumflex accent (&#194;) - Acirc */
-        "A",	/* capital A, grave accent (&#192;) - Agrave */
-        "A",	/* capital A, ring - Aring (&#197;) */
-        "A",	/* capital A, tilde - Atilde (&#195;) */
+	"AE",	/* capital AE diphthong (ligature) (&#198;) - AElig */
+	"A",	/* capital A, acute accent (&#193;) - Aacute */
+	"A",	/* capital A, circumflex accent (&#194;) - Acirc */
+	"A",	/* capital A, grave accent (&#192;) - Agrave */
+	"A",	/* capital A, ring - Aring (&#197;) */
+	"A",	/* capital A, tilde - Atilde (&#195;) */
 #ifdef LY_UMLAUT
-        "Ae",	/* capital A, dieresis or umlaut mark (&#196;) - Auml*/
+	"Ae",	/* capital A, dieresis or umlaut mark (&#196;) - Auml*/
 #else
-        "A",	/* capital A, dieresis or umlaut mark (&#196;) - Auml*/
+	"A",	/* capital A, dieresis or umlaut mark (&#196;) - Auml*/
 #endif /* LY_UMLAUT */
-        "C",	/* capital C, cedilla (&#199;) - Ccedil */
-        "Dj",	/* capital D with stroke (&#208;) - Dstrok */
-        "DH",	/* capital Eth, Icelandic (&#208;) - ETH */
-        "E",	/* capital E, acute accent (&#201;) - Eacute */
-        "E",	/* capital E, circumflex accent (&#202;) - Ecirc */
-        "E",	/* capital E, grave accent (&#200;) - Egrave */
-        "E",	/* capital E, dieresis or umlaut mark (&#203;) - Euml */
-        "I",	/* capital I, acute accent (&#205;) - Iacute */
-        "I",	/* capital I, circumflex accent (&#206;) - Icirc */
-        "I",	/* capital I, grave accent (&#204;) - Igrave */
-        "I",	/* capital I, dieresis or umlaut mark (&#207;) - Iuml */
-        "N",	/* capital N, tilde - Ntilde (&#209;) */
-        "O",	/* capital O, acute accent (&#211;) - Oacute */
-        "O",	/* capital O, circumflex accent (&#212;) - Ocirc */
-        "O",	/* capital O, grave accent (&#210;) - Ograve */
-        "O",	/* capital O, slash (&#216;) - Oslash */
-        "O",	/* capital O, tilde (&#213;) - Otilde */
+	"C",	/* capital C, cedilla (&#199;) - Ccedil */
+	"Dj",	/* capital D with stroke (&#208;) - Dstrok */
+	"DH",	/* capital Eth, Icelandic (&#208;) - ETH */
+	"E",	/* capital E, acute accent (&#201;) - Eacute */
+	"E",	/* capital E, circumflex accent (&#202;) - Ecirc */
+	"E",	/* capital E, grave accent (&#200;) - Egrave */
+	"E",	/* capital E, dieresis or umlaut mark (&#203;) - Euml */
+	"I",	/* capital I, acute accent (&#205;) - Iacute */
+	"I",	/* capital I, circumflex accent (&#206;) - Icirc */
+	"I",	/* capital I, grave accent (&#204;) - Igrave */
+	"I",	/* capital I, dieresis or umlaut mark (&#207;) - Iuml */
+	"N",	/* capital N, tilde - Ntilde (&#209;) */
+	"O",	/* capital O, acute accent (&#211;) - Oacute */
+	"O",	/* capital O, circumflex accent (&#212;) - Ocirc */
+	"O",	/* capital O, grave accent (&#210;) - Ograve */
+	"O",	/* capital O, slash (&#216;) - Oslash */
+	"O",	/* capital O, tilde (&#213;) - Otilde */
 #ifdef LY_UMLAUT
-        "Oe",	/* capital O, dieresis or umlaut mark (&#214;) - Ouml */
+	"Oe",	/* capital O, dieresis or umlaut mark (&#214;) - Ouml */
 #else
-        "O",	/* capital O, dieresis or umlaut mark (&#214;) - Ouml */
+	"O",	/* capital O, dieresis or umlaut mark (&#214;) - Ouml */
 #endif /* LY_UMLAUT */
-        "P",	/* capital THORN, Icelandic (&#222;) - THORN */
-        "U",	/* capital U, acute accent (&#218;) - Uacute */
-        "U",	/* capital U, circumflex accent (&#219;) - Ucirc */
-        "U",	/* capital U, grave accent (&#217;) - Ugrave */
+	"P",	/* capital THORN, Icelandic (&#222;) - THORN */
+	"U",	/* capital U, acute accent (&#218;) - Uacute */
+	"U",	/* capital U, circumflex accent (&#219;) - Ucirc */
+	"U",	/* capital U, grave accent (&#217;) - Ugrave */
 #ifdef LY_UMLAUT
-        "Ue",	/* capital U, dieresis or umlaut mark (&#220;) - Uuml */
+	"Ue",	/* capital U, dieresis or umlaut mark (&#220;) - Uuml */
 #else
-        "U",	/* capital U, dieresis or umlaut mark (&#220;) - Uuml */
+	"U",	/* capital U, dieresis or umlaut mark (&#220;) - Uuml */
 #endif /* LY_UMLAUT */
-        "Y",	/* capital Y, acute accent (&#221;) - Yacute */
-        "a",	/* small a, acute accent (&#225;) - aacute */
-        "a",	/* small a, circumflex accent (&#226;) - acirc */
+	"Y",	/* capital Y, acute accent (&#221;) - Yacute */
+	"a",	/* small a, acute accent (&#225;) - aacute */
+	"a",	/* small a, circumflex accent (&#226;) - acirc */
 	"'",	/* spacing acute (&#180;) - acute */
-        "ae",	/* small ae diphthong (ligature) (&#230;) - aelig */
-        "`a",	/* small a, grave accent (&#232;) - agrave */
-        "&",	/* ampersand (&#38;) - amp */
-        "a",	/* small a, ring (&#229;) - aring */
-        "a",	/* small a, tilde (&#227;) - atilde */
+	"ae",	/* small ae diphthong (ligature) (&#230;) - aelig */
+	"`a",	/* small a, grave accent (&#232;) - agrave */
+	"&",	/* ampersand (&#38;) - amp */
+	"a",	/* small a, ring (&#229;) - aring */
+	"a",	/* small a, tilde (&#227;) - atilde */
 #ifdef LY_UMLAUT
-        "ae",	/* small a, dieresis or umlaut mark (&#228;) - auml */
+	"ae",	/* small a, dieresis or umlaut mark (&#228;) - auml */
 #else
-        "a",	/* small a, dieresis or umlaut mark (&#228;) - auml */
+	"a",	/* small a, dieresis or umlaut mark (&#228;) - auml */
 #endif /* LY_UMLAUT */
 	"|",	/* broken vertical bar (&#166;) - brkbar */
 	"|",	/* broken vertical bar (&#166;) - brvbar */
-        "c",	/* small c, cedilla (&#231;) - ccedil */
+	"c",	/* small c, cedilla (&#231;) - ccedil */
 	",",	/* spacing cedilla (&#184;) - cedil */
 	"-c-",	/* cent sign (&#162;) - cent */
 	"(c)",	/* copyright sign (&#169;) - copy */
@@ -1957,52 +1957,52 @@ PUBLIC char * SevenBitApproximations[] = {
 	"DEG",	/* degree sign (&#176;) - deg */
 	"\042",	/* spacing diaresis (&#168;) - die */
 	"/",	/* division sign (&#247;) - divide */
-        "e",	/* small e, acute accent (&#233;) - eacute */
-        "e",	/* small e, circumflex accent (&#234;) - ecirc */
-        "e",	/* small e, grave accent (&#232;) - egrave */
+	"e",	/* small e, acute accent (&#233;) - eacute */
+	"e",	/* small e, circumflex accent (&#234;) - ecirc */
+	"e",	/* small e, grave accent (&#232;) - egrave */
 	"-",	/* dash the width of emsp - emdash */
-        "\002",	/* emsp NEVER CHANGE THIS - emsp */
+	"\002",	/* emsp NEVER CHANGE THIS - emsp */
 	"-",	/* dash the width of ensp - endash */
-        "\002",	/* ensp NEVER CHANGE THIS - ensp */
-        "dh",	/* small eth, Icelandic eth (&#240;) */
-        "e",	/* small e, dieresis or umlaut mark (&#235;) - euml */
+	"\002",	/* ensp NEVER CHANGE THIS - ensp */
+	"dh",	/* small eth, Icelandic eth (&#240;) */
+	"e",	/* small e, dieresis or umlaut mark (&#235;) - euml */
 	" 1/2",	/* fraction 1/2 (&#189;) - frac12 */
 	" 1/4",	/* fraction 1/4 (&#188;) - frac14 */
 	" 3/4",	/* fraction 3/4 (&#190;) - frac34 */
-        ">",	/* greater than (&#62;) - gt */
+	">",	/* greater than (&#62;) - gt */
 	"-",	/* spacing macron (&#175;) - hibar */
-        "i",	/* small i, acute accent (&#237;) - iacute */
-        "i",	/* small i, circumflex accent (&#238;) - icirc*/
+	"i",	/* small i, acute accent (&#237;) - iacute */
+	"i",	/* small i, circumflex accent (&#238;) - icirc*/
 	"!",	/* inverted exclamation mark (&#161;) - iexcl */
-        "`i",	/* small i, grave accent (&#236;) - igrave */
+	"`i",	/* small i, grave accent (&#236;) - igrave */
 	"?",	/* inverted question mark (&#191;) - iquest */
-        "i",	/* small i, dieresis or umlaut mark (&#239;) - iuml */
+	"i",	/* small i, dieresis or umlaut mark (&#239;) - iuml */
 	"<<",	/* angle quotation mark, left (&#171;) - laquo */
-        "<",	/* less than - lt (&#60;) */
+	"<",	/* less than - lt (&#60;) */
 	"-",	/* spacing macron (&#175;) - macr */
 	"-",	/* dash the width of emsp - mdash */
 	"u",	/* micro sign (&#181;) - micro */
 	".",	/* middle dot (&#183;) - middot */
-        "\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
+	"\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
 	"-",	/* dash the width of ensp - ndash */
 	"NOT",	/* negation sign (&#172;) - not */
-        "n",	/* small n, tilde (&#241;) - ntilde */
-        "o",	/* small o, acute accent (&#243;) - oacute */
-        "o",	/* small o, circumflex accent (&#244;) - ocirc */
-        "o",	/* small o, grave accent (&#242;) - ograve */
+	"n",	/* small n, tilde (&#241;) - ntilde */
+	"o",	/* small o, acute accent (&#243;) - oacute */
+	"o",	/* small o, circumflex accent (&#244;) - ocirc */
+	"o",	/* small o, grave accent (&#242;) - ograve */
 	"-a",	/* feminine ordinal indicator (&#170;) - ordf */
 	"-o",	/* masculine ordinal indicator (&#186;) - ordm */
-        "o",	/* small o, slash (&#248;) - oslash */
-        "o",	/* small o, tilde (&#245;) - otilde */
+	"o",	/* small o, slash (&#248;) - oslash */
+	"o",	/* small o, tilde (&#245;) - otilde */
 #ifdef LY_UMLAUT
-        "oe",	/* small o, dieresis or umlaut mark (&#246;) - ouml */
+	"oe",	/* small o, dieresis or umlaut mark (&#246;) - ouml */
 #else
-        "o",	/* small o, dieresis or umlaut mark (&#246;) - ouml */
+	"o",	/* small o, dieresis or umlaut mark (&#246;) - ouml */
 #endif /* LY_UMLAUT */
 	"P:",	/* paragraph sign (&#182;) - para */
 	"+-",	/* plus-or-minus sign (&#177;) - plusmn */
 	"-L-",	/* pound sign (&#163;) - pound */
-        "\"",	/* quote '"' (&#34;) - quot */
+	"\"",	/* quote '"' (&#34;) - quot */
 	">>",	/* angle quotation mark, right (&#187;) - raquo */
 	"(R)",	/* circled R registered sign (&#174;) - reg */
 	"S:",	/* section sign (&#167;) - sect */
@@ -2010,31 +2010,31 @@ PUBLIC char * SevenBitApproximations[] = {
 	"^1",	/* superscript 1 (&#185;) - sup1 */
 	"^2",	/* superscript 2 (&#178;) - sup2 */
 	"^3",	/* superscript 3 (&#179;) - sup3 */
-        "ss",	/* small sharp s, German (sz ligature) (&#223;) - szlig */
+	"ss",	/* small sharp s, German (sz ligature) (&#223;) - szlig */
 	"\002",	/* thin space - not collapsed NEVER CHANGE THIS - thinsp */
-        "p",	/* small thorn, Icelandic (&#254;) - thorn */
-  	"*",	/* multiplication sign (&#215;) - times */ 
+	"p",	/* small thorn, Icelandic (&#254;) - thorn */
+	"*",	/* multiplication sign (&#215;) - times */
 	"(TM)",	/* circled TM trade mark sign (&#8482;) - trade */
-        "u",	/* small u, acute accent (&#250;) - uacute */
-        "u",	/* small u, circumflex accent (&#251;) - ucirc */
-        "u",	/* small u, grave accent (&#249;) - ugrave */
+	"u",	/* small u, acute accent (&#250;) - uacute */
+	"u",	/* small u, circumflex accent (&#251;) - ucirc */
+	"u",	/* small u, grave accent (&#249;) - ugrave */
 	"\042",	/* spacing diaresis (&#168;) - uml */
 #ifdef LY_UMLAUT
-        "ue",	/* small u, dieresis or umlaut mark (&#252;) - uuml */
+	"ue",	/* small u, dieresis or umlaut mark (&#252;) - uuml */
 #else
-        "u",	/* small u, dieresis or umlaut mark (&#252;) - uuml */
+	"u",	/* small u, dieresis or umlaut mark (&#252;) - uuml */
 #endif /* LY_UMLAUT */
-        "y",	/* small y, acute accent (&#253;) - yacute */
+	"y",	/* small y, acute accent (&#253;) - yacute */
 	"YEN",	/* yen sign (&#165;) - yen */
-        "y",	/* small y, dieresis or umlaut mark (&#255;) - yuml */
+	"y",	/* small y, dieresis or umlaut mark (&#255;) - yuml */
 };
 
 /*
  *  Add your new character sets HERE (but only if you
- *  can't contruct Unicode tables for them). - FM
+ *  can't construct Unicode tables for them). - FM
  */
 
-/* 
+/*
  *  Add the array name to LYCharSets
  */
 PUBLIC char ** LYCharSets[MAXCHARSETS]={
@@ -2060,7 +2060,7 @@ PUBLIC char ** LYCharSets[MAXCHARSETS]={
 
 /*
  *  Add the name that the user will see below.
- *  The order of LYCharSets and char_set_names MUST be the same
+ *  The order of LYCharSets and LYchar_set_names MUST be the same
  */
 PUBLIC CONST char * LYchar_set_names[MAXCHARSETSP]={
 	"ISO Latin 1         ",
@@ -2070,8 +2070,8 @@ PUBLIC CONST char * LYchar_set_names[MAXCHARSETSP]={
 	"DEC Multinational   ",
 	"Macintosh (8 bit)   ",
 	"NeXT character set  ",
- 	"KOI8-R Cyrillic     ",
- 	"Chinese             ",
+	"KOI8-R Cyrillic     ",
+	"Chinese             ",
 	"Japanese (EUC)      ",
 	"Japanese (SJIS)     ",
 	"Korean              ",
@@ -2079,8 +2079,8 @@ PUBLIC CONST char * LYchar_set_names[MAXCHARSETSP]={
 	"Vietnamese (VISCII) ",
 	"7 bit approximations",
 	"Transparent         ",
-	"IBM PC character set",
-	"IBM PC codepage 850 ",
+	"DosLatinUS (cp437)  ",
+	"DosLatin1 (cp850)   ",
 	(char *) 0
 };
 
@@ -2121,11 +2121,11 @@ PUBLIC LYUCcharset LYCharSet_UC[MAXCHARSETS]=
 			0,			UCT_R_8BIT,UCT_R_ASCII},
   {-1,"dec-mcs",	UCT_ENC_8BIT,0,0,	UCT_R_8BIT,UCT_R_ASCII},
   {-1,"macintosh",	UCT_ENC_8BIT,0,0,	UCT_R_8BIT,UCT_R_ASCII},
-  {-1,"x-next",		UCT_ENC_8BIT,0,0,	UCT_R_8BIT,UCT_R_ASCII},
+  {-1,"next",		UCT_ENC_8BIT,0,0,	UCT_R_8BIT,UCT_R_ASCII},
   {-1,"koi8-r",		UCT_ENC_8BIT,0,0,	UCT_R_8BIT,UCT_R_ASCII},
 
   /*
-   *  There is no strict correlation for the next five, since the tranfer
+   *  There is no strict correlation for the next five, since the transfer
    *  charset gets decoded into Display Char Set by the CJK code (separate
    *  from Unicode mechanism).  For now we use the MIME name that describes
    *  what is output to the terminal. - KW
@@ -2161,7 +2161,6 @@ PUBLIC LYUCcharset LYCharSet_UC[MAXCHARSETS]=
 /*
  *  Add the code of the the lowest character with the high bit set
  *  that can be directly displayed.
- *  Used by SLANG and for character translation.
  *  The order of LYCharSets and LYlowest_eightbit MUST be the same.
  */
 PUBLIC int LYlowest_eightbit[MAXCHARSETS]={
@@ -2185,7 +2184,7 @@ PUBLIC int LYlowest_eightbit[MAXCHARSETS]={
 	128	/* DosLatin1 (cp850)	*/
 };
 
-/* 
+/*
  *  The default character set.
  *  --------------------------
  *  Use lynx.cfg and/or user
@@ -2193,7 +2192,7 @@ PUBLIC int LYlowest_eightbit[MAXCHARSETS]={
  *  set a different default.
  */
 PUBLIC char** p_entity_values = ISO_Latin1;	/* Pointer to translation */
-PUBLIC int current_char_set = 0;		/* Index for tranaslation */
+PUBLIC int current_char_set = 0;		/* Index for translation */
 
 /*
  *  Function to set the handling of selected character sets
@@ -2209,6 +2208,11 @@ PUBLIC void HTMLSetCharacterHandling ARGS1(int,i)
 	    chndl = UCGetLYhndl_byMIME(UCAssume_MIMEcharset);
 	HTCJK = NOCJK;
 	kanji_code = NOKANJI;
+
+	HTPassEightBitNum =
+	    ((LYCharSet_UC[i].codepoints & UCT_CP_SUPERSETOF_LAT1) ||
+		(LYCharSet_UC[i].like8859 & UCT_R_HIGH8BIT));
+
 	if (i == (chndl < 0 ? 0 : chndl)) {
 	    LYRawMode = LYUseDefaultRawMode ? TRUE : FALSE;
 	} else {
@@ -2219,11 +2223,6 @@ PUBLIC void HTMLSetCharacterHandling ARGS1(int,i)
 	} else {
 	    HTPassEightBitRaw = FALSE;
 	}
-
-	HTPassEightBitNum =
-	    ((LYCharSet_UC[i].codepoints & UCT_CP_SUPERSETOF_LAT1) ||
-		(LYCharSet_UC[i].like8859 & UCT_R_HIGH8BIT));
-	
 	if (LYRawMode || i == chndl) {
 	    HTPassHighCtrlRaw = (LYlowest_eightbit[i] <= 130);
 	} else {
@@ -2232,26 +2231,6 @@ PUBLIC void HTMLSetCharacterHandling ARGS1(int,i)
 
 	HTPassHighCtrlNum = FALSE;
 
-#ifdef NOTDEFINED
-    } else if (!strncmp(LYchar_set_names[i], "ISO Latin 1", 11)) {
-	HTCJK = NOCJK;
-	kanji_code = NOKANJI;
-	HTPassEightBitRaw = LYUseDefaultRawMode ? TRUE : FALSE;
-	LYRawMode = HTPassEightBitRaw;
-	HTPassEightBitNum = TRUE;
-        HTPassHighCtrlRaw = FALSE;
-	HTPassHighCtrlNum = FALSE;
-
-    } else if (!strncmp(LYchar_set_names[i], "KOI8-R Cyrillic", 15)) {
-	HTCJK = NOCJK;
-	kanji_code = NOKANJI;
-	HTPassEightBitRaw = LYUseDefaultRawMode ? FALSE : TRUE;
-	LYRawMode = HTPassEightBitRaw;
-	HTPassEightBitNum = FALSE;
-        HTPassHighCtrlRaw = TRUE;
-	HTPassHighCtrlNum = FALSE;
-#endif /* NOTDEFINED */
-
     } else if (!strncmp(LYchar_set_names[i], "Chinese", 7)) {
 	HTCJK = LYUseDefaultRawMode ? CHINESE : NOCJK;
 	LYRawMode = (HTCJK != NOCJK) ? TRUE : FALSE;
@@ -2348,7 +2327,7 @@ PUBLIC void HTMLSetCharacterHandling ARGS1(int,i)
 PUBLIC void HTMLSetRawModeDefault ARGS1(int,i)
 {
     if (!strncmp(LYchar_set_names[i], "ISO Latin 1", 11) ||
-    	!strncmp(LYchar_set_names[i], "Chinese", 7) ||
+	!strncmp(LYchar_set_names[i], "Chinese", 7) ||
 	!strncmp(LYchar_set_names[i], "Japanese (EUC)", 14) ||
 	!strncmp(LYchar_set_names[i], "Japanese (SJIS)", 15) ||
 	!strncmp(LYchar_set_names[i], "Korean", 6) ||
@@ -2459,68 +2438,68 @@ PUBLIC CONST char * LYEntityNames[] = {
 	"iquest",	/* 191,	inverted question mark */
 	"Agrave",	/* 192,	capital A, grave accent */
 	"Aacute",	/* 193,	capital A, acute accent */
-	"Acirc",	/* 194,	capital A, circumflex accent */ 
-	"Atilde",	/* 195,	capital A, tilde */ 
-	"Auml",		/* 196,	capital A, dieresis or umlaut mark */ 
-	"Aring",	/* 197,	capital A, ring */ 
-	"AElig",	/* 198,	capital AE diphthong (ligature) */ 
-	"Ccedil",	/* 199,	capital C, cedilla */ 
+	"Acirc",	/* 194,	capital A, circumflex accent */
+	"Atilde",	/* 195,	capital A, tilde */
+	"Auml",		/* 196,	capital A, dieresis or umlaut mark */
+	"Aring",	/* 197,	capital A, ring */
+	"AElig",	/* 198,	capital AE diphthong (ligature) */
+	"Ccedil",	/* 199,	capital C, cedilla */
 	"Egrave",	/* 200,	capital E, grave accent */
 	"Eacute",	/* 201,	capital E, acute accent */
-	"Ecirc",	/* 202,	capital E, circumflex accent */ 
-	"Euml",		/* 203,	capital E, dieresis or umlaut mark */ 
+	"Ecirc",	/* 202,	capital E, circumflex accent */
+	"Euml",		/* 203,	capital E, dieresis or umlaut mark */
 	"Igrave",	/* 204,	capital I, grave accent */
 	"Iacute",	/* 205,	capital I, acute accent */
-	"Icirc",	/* 206,	capital I, circumflex accent */ 
-	"Iuml",		/* 207,	capital I, dieresis or umlaut mark */ 
-	"ETH",		/* 208,	capital Eth, Icelandic (or Latin2 Dstrok) */ 
-	"Ntilde",	/* 209,	capital N, tilde */ 
+	"Icirc",	/* 206,	capital I, circumflex accent */
+	"Iuml",		/* 207,	capital I, dieresis or umlaut mark */
+	"ETH",		/* 208,	capital Eth, Icelandic (or Latin2 Dstrok) */
+	"Ntilde",	/* 209,	capital N, tilde */
 	"Ograve",	/* 210,	capital O, grave accent */
 	"Oacute",	/* 211,	capital O, acute accent */
-	"Ocirc",	/* 212,	capital O, circumflex accent */ 
-	"Otilde",	/* 213,	capital O, tilde */ 
-	"Ouml",		/* 214,	capital O, dieresis or umlaut mark */ 
-	"times",	/* 215,	multiplication sign */ 
-	"Oslash",	/* 216,	capital O, slash */ 
+	"Ocirc",	/* 212,	capital O, circumflex accent */
+	"Otilde",	/* 213,	capital O, tilde */
+	"Ouml",		/* 214,	capital O, dieresis or umlaut mark */
+	"times",	/* 215,	multiplication sign */
+	"Oslash",	/* 216,	capital O, slash */
 	"Ugrave",	/* 217,	capital U, grave accent */
 	"Uacute",	/* 218,	capital U, acute accent */
-	"Ucirc",	/* 219,	capital U, circumflex accent */ 
-	"Uuml",		/* 220,	capital U, dieresis or umlaut mark */ 
-	"Yacute",	/* 221,	capital Y, acute accent */ 
-	"THORN",	/* 222,	capital THORN, Icelandic */ 
-	"szlig",	/* 223,	small sharp s, German (sz ligature) */ 
+	"Ucirc",	/* 219,	capital U, circumflex accent */
+	"Uuml",		/* 220,	capital U, dieresis or umlaut mark */
+	"Yacute",	/* 221,	capital Y, acute accent */
+	"THORN",	/* 222,	capital THORN, Icelandic */
+	"szlig",	/* 223,	small sharp s, German (sz ligature) */
 	"agrave",	/* 224,	small a, grave accent */
 	"aacute",	/* 225,	small a, acute accent */
-	"acirc",	/* 226,	small a, circumflex accent */ 
+	"acirc",	/* 226,	small a, circumflex accent */
 	"atilde",	/* 227,	small a, tilde */
-	"auml",		/* 228,	small a, dieresis or umlaut mark */ 
-  	"aring",	/* 229,	small a, ring */
-	"aelig",	/* 230,	small ae diphthong (ligature) */ 
-	"ccedil",	/* 231,	small c, cedilla */ 
+	"auml",		/* 228,	small a, dieresis or umlaut mark */
+	"aring",	/* 229,	small a, ring */
+	"aelig",	/* 230,	small ae diphthong (ligature) */
+	"ccedil",	/* 231,	small c, cedilla */
 	"egrave",	/* 232,	small e, grave accent */
 	"eacute",	/* 233,	small e, acute accent */
-	"ecirc",	/* 234,	small e, circumflex accent */ 
-	"euml",		/* 235,	small e, dieresis or umlaut mark */ 
+	"ecirc",	/* 234,	small e, circumflex accent */
+	"euml",		/* 235,	small e, dieresis or umlaut mark */
 	"igrave",	/* 236,	small i, grave accent */
 	"iacute",	/* 237,	small i, acute accent */
-	"icirc",	/* 238,	small i, circumflex accent */ 
-	"iuml",		/* 239,	small i, dieresis or umlaut mark */ 
-	"eth",		/* 240,	small eth, Icelandic */ 
-	"ntilde",	/* 241,	small n, tilde */ 
+	"icirc",	/* 238,	small i, circumflex accent */
+	"iuml",		/* 239,	small i, dieresis or umlaut mark */
+	"eth",		/* 240,	small eth, Icelandic */
+	"ntilde",	/* 241,	small n, tilde */
 	"ograve",	/* 242,	small o, grave accent */
 	"oacute",	/* 243,	small o, acute accent */
-	"ocirc",	/* 244,	small o, circumflex accent */ 
-	"otilde",	/* 245,	small o, tilde */ 
-	"ouml",		/* 246,	small o, dieresis or umlaut mark */ 
+	"ocirc",	/* 244,	small o, circumflex accent */
+	"otilde",	/* 245,	small o, tilde */
+	"ouml",		/* 246,	small o, dieresis or umlaut mark */
 	"divide",	/* 247,	division sign */
-	"oslash",	/* 248,	small o, slash */ 
+	"oslash",	/* 248,	small o, slash */
 	"ugrave",	/* 249,	small u, grave accent */
 	"uacute",	/* 250,	small u, acute accent */
-	"ucirc",	/* 251,	small u, circumflex accent */ 
-	"uuml",		/* 252,	small u, dieresis or umlaut mark */ 
-	"yacute",	/* 253,	small y, acute accent */ 
-	"thorn",	/* 254,	small thorn, Icelandic */ 
-	"yuml",		/* 255,	small y, dieresis or umlaut mark */ 
+	"ucirc",	/* 251,	small u, circumflex accent */
+	"uuml",		/* 252,	small u, dieresis or umlaut mark */
+	"yacute",	/* 253,	small y, acute accent */
+	"thorn",	/* 254,	small thorn, Icelandic */
+	"yuml",		/* 255,	small y, dieresis or umlaut mark */
 };
 
 /*
@@ -2528,9 +2507,9 @@ PUBLIC CONST char * LYEntityNames[] = {
  *  ISO-8859-1 8-bit characters. - FM
  */
 PUBLIC CONST char * HTMLGetEntityName ARGS1(
-	int,		i)
+	UCode_t,	code)
 {
-#define IntValue i
+#define IntValue code
     int MaxValue = ((sizeof(LYEntityNames)/sizeof(char **)) - 1);
 
     if (IntValue < 0 || IntValue > MaxValue) {
@@ -2646,7 +2625,7 @@ PUBLIC char HTMLGetLatinOneValue ARGS1(int,i)
 {
     char ch = ISO_Latin1[i][0];
 
-    switch ((unsigned char)ch) { 
+    switch ((unsigned char)ch) {
         case HT_NON_BREAK_SPACE:
 	    ch = 160;
 	    break;
@@ -2690,12 +2669,8 @@ PUBLIC void HTMLUseCharacterSet ARGS1(int,i)
  */
 PUBLIC int LYCharSetsDeclared NOPARAMS
 {
-    int status = 1;
-
-#ifdef EXP_CHARTRANS
     UCInit();
-    status = UCInitialized;
-    
+
     if (UCAssume_MIMEcharset && *UCAssume_MIMEcharset) {
 	UCLYhndl_for_unspec = UCGetLYhndl_byMIME(UCAssume_MIMEcharset);
     } else {
@@ -2707,8 +2682,6 @@ PUBLIC int LYCharSetsDeclared NOPARAMS
     if (UCAssume_unrecMIMEcharset && *UCAssume_unrecMIMEcharset)
 	UCLYhndl_for_unrec =
 	    UCGetLYhndl_byMIME(UCAssume_unrecMIMEcharset);
-#endif
 
-    return status;
+    return UCInitialized;
 }
-
diff --git a/src/LYCharSets.h b/src/LYCharSets.h
index bd873fb7..41f09c5c 100644
--- a/src/LYCharSets.h
+++ b/src/LYCharSets.h
@@ -12,28 +12,24 @@
 extern int current_char_set;
 extern CONST char * LYchar_set_names[];
 
+/*
+ *  Initializer for LYCharSets.c.
+ */
+extern int LYCharSetsDeclared NOPARAMS;
+
 
 extern char ** LYCharSets[];
-extern char * SevenBitApproximations[];    /* made public. -kw */
+extern char * SevenBitApproximations[];
 extern char ** p_entity_values;
-#if defined(USE_SLANG) || defined(EXP_CHARTRANS)
 extern int LYlowest_eightbit[];
-#endif /* USE_SLANG || EXP_CHARTRANS */
-
-#ifdef EXP_CHARTRANS
 extern int LYNumCharsets;
 extern LYUCcharset LYCharSet_UC[];
-#endif   /* EXP_CHARTRANS */
-
-/* Initializer for LYCharSets.c */
-extern int LYCharSetsDeclared NOPARAMS;
-
 extern void HTMLSetCharacterHandling PARAMS((int i));
 extern void HTMLSetRawModeDefault PARAMS((int i));
 extern void HTMLSetUseDefaultRawMode PARAMS((int i, BOOLEAN modeflag));
 extern void HTMLSetHaveCJKCharacterSet PARAMS((int i));
 extern CONST char * LYEntityNames[];
-extern CONST char * HTMLGetEntityName PARAMS((int i));
+extern CONST char * HTMLGetEntityName PARAMS((UCode_t code));
 extern UCode_t HTMLGetEntityUCValue PARAMS((CONST char *name));
 extern char HTMLGetLatinOneValue PARAMS((int i));
 extern void HTMLUseCharacterSet PARAMS((int i));
diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c
index d7bdf33f..c5b4bd81 100644
--- a/src/LYCharUtils.c
+++ b/src/LYCharUtils.c
@@ -1345,12 +1345,14 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 		    /* What else can we do? */
 		    code = (unsigned char)(*p);
 		}
+#ifdef NOTUSED_FOTEMODS
 	    } else if (T.strip_raw_char_in &&
 		       (unsigned char)(*p) >= 0xc0 &&
 		       (unsigned char)(*p) < 255) {
 		code = ((*p & 0x7f));
 		state = S_got_outchar;
 		break;
+#endif /* NOTUSED_FOTEMODS */
 	    } else if (!T.trans_from_uni) {
 		state = S_got_outchar;
 		break;
@@ -1680,22 +1682,22 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 		*cp = cpe;
 		*q++ = '&';
 		state = S_done;
+#ifdef NOTUSED_FOTEMODS
+	    } else if (T.strip_raw_char_in &&
+		(unsigned char)(*p) >= 0xc0 &&
+		(unsigned char)(*p) < 255) {
+		code = (((*p) & 0x7f));
+		state = S_got_outchar;
+#endif /* NOTUSED_FOTEMODS */
+	    } else if (!T.output_utf8 && stype == st_HTML && !hidden &&
+		!(HTPassEightBitRaw &&
+		 (unsigned char)(*p) >= lowest_8)) {
+		sprintf(replace_buf, "U%.2lX", code);
+		state = S_got_outstring;
 	    } else {
-		if (T.strip_raw_char_in &&
-		    (unsigned char)(*p) >= 0xc0 &&
-		    (unsigned char)(*p) < 255) {
-		    code = (((*p) & 0x7f));
-		    state = S_got_outchar;
-		} else if (!T.output_utf8 && stype == st_HTML && !hidden &&
-		    !(HTPassEightBitRaw &&
-		      (unsigned char)(*p) >= lowest_8)) {
-		    sprintf(replace_buf, "U%.2lX", code);
-		    state = S_got_outstring;
-		} else {
-		    puni = p;
-		    code = (unsigned char)(*p);
-		    state = S_got_outchar;
-		}
+		puni = p;
+		code = (unsigned char)(*p);
+		state = S_got_outchar;
 	    }
 	    break;
 
@@ -3314,11 +3316,13 @@ PRIVATE BOOL LYUCTranslateString ARGS7(
 		    /* What else can we do? */
 		    unsign_c = (unsigned char)p[i];
 		}
+#ifdef NOTUSED_FOTEMODS
 	    } else if (T.strip_raw_char_in &&
 		       (unsigned char)p[i] >= 0xc0 &&
 		       (unsigned char)p[i] < 255) {
 		REPLACE_CHAR((p[i] & 0x7f));
 		done = YES;
+#endif /* NOTUSED_FOTEMODS */
 	    } else if (!T.trans_from_uni) {
 		done = YES;
 	    }
@@ -3371,11 +3375,14 @@ PRIVATE BOOL LYUCTranslateString ARGS7(
 		    REPLACE_STRING(replace_buf);
 		}
 	    } else if (unsign_c > 255) {
+#ifdef NOTUSED_FOTEMODS
 		if (T.strip_raw_char_in &&
 		    (unsigned char)p[i] >= 0xc0 &&
 		    (unsigned char)p[i] < 255) {
 		    REPLACE_CHAR((p[i] & 0x7f));
-		} else {
+		} else
+#endif /* NOTUSED_FOTEMODS */
+		{
 		    sprintf(replace_buf, "U%.2lX", unsign_c);
 		    REPLACE_STRING(replace_buf);
 		}
@@ -4227,13 +4234,12 @@ PUBLIC void LYHandleSELECT ARGS5(
 	 */
 	me->inSELECT = TRUE;
 
-	if (!me->text)
-	    UPDATE_STYLE;
 	if (present && present[HTML_SELECT_NAME] &&
-	    value[HTML_SELECT_NAME] && *value[HTML_SELECT_NAME])  
+	    value[HTML_SELECT_NAME] && *value[HTML_SELECT_NAME]) {
 	    StrAllocCopy(name, value[HTML_SELECT_NAME]);
-	else
+	} else {
 	    StrAllocCopy(name, "");
+	}
 	if (present && present[HTML_SELECT_MULTIPLE])  
 	    multiple=YES;
 	if (present && present[HTML_SELECT_DISABLED])  
@@ -4246,10 +4252,11 @@ PUBLIC void LYHandleSELECT ARGS5(
 	    /*
 	     *  Let the size be determined by the number of OPTIONs. - FM
 	     */
-	    if (TRACE)
+	    if (TRACE) {
 		fprintf(stderr,
 			"LYHandleSELECT: Ignoring SIZE=\"%s\" for SELECT.\n",
 			(char *)value[HTML_SELECT_SIZE]);
+	    }
 #endif /* NOTDEFINED */
 	}
 
@@ -4267,18 +4274,18 @@ PUBLIC void LYHandleSELECT ARGS5(
 
 	if ((multiple == NO && LYSelectPopups == TRUE) &&
 	    me->sp[0].tag_number == HTML_PRE &&
-	        HText_LastLineSize(me->text, FALSE) > (LYcols - 8)) {
-		/*
-		 *  Force a newline when we're using a popup in
-		 *  a PRE block and are within 7 columns from the
-		 *  right margin.  This will allow for the '['
-		 *  popup designater and help avoid a wrap in the
-		 *  underscore placeholder for the retracted popup
-		 *  entry in the HText structure. - FM
-		 */
-		HTML_put_character(me, '\n');
-		me->in_word = NO;
-	    }
+	    HText_LastLineSize(me->text, FALSE) > (LYcols - 8)) {
+	    /*
+	     *  Force a newline when we're using a popup in
+	     *  a PRE block and are within 7 columns from the
+	     *  right margin.  This will allow for the '['
+	     *  popup designater and help avoid a wrap in the
+	     *  underscore placeholder for the retracted popup
+	     *  entry in the HText structure. - FM
+	     */
+	    HTML_put_character(me, '\n');
+	    me->in_word = NO;
+	}
 
 	LYCheckForID(me, present, value, (int)HTML_SELECT_ID);
 
@@ -4292,8 +4299,6 @@ PUBLIC void LYHandleSELECT ARGS5(
 	 *  Handle end tag.
 	 */
 	char *ptr;
-	if (!me->text)
-	    UPDATE_STYLE;
 
 	/*
 	 *  Make sure we had a select start tag.
diff --git a/src/LYClean.c b/src/LYClean.c
index cca9dd34..cd8e8b7b 100644
--- a/src/LYClean.c
+++ b/src/LYClean.c
@@ -7,6 +7,7 @@
 #include "LYGlobalDefs.h"
 #include "LYStrings.h"
 #include "LYTraversal.h"
+#include "UCAuto.h"
 
 #include "LYexit.h"
 #include "LYLeaks.h"
diff --git a/src/LYCurses.c b/src/LYCurses.c
index 41f75a53..b726bc94 100644
--- a/src/LYCurses.c
+++ b/src/LYCurses.c
@@ -499,6 +499,8 @@ PRIVATE void LYsetWAttr ARGS1(WINDOW *, win)
 	if (no_color_video < 0) {
 		no_color_video = tigetnum("ncv");
 	}
+	if (no_color_video < 0)
+		no_color_video = 0;
 #endif /* __DJGPP__ */
 
 	if (Current_Attr & A_BOLD)
@@ -515,12 +517,10 @@ PRIVATE void LYsetWAttr ARGS1(WINDOW *, win)
 	 */
 	if ((Current_Attr & A_BOLD) && !(no_color_video & 33)) {
 		attr |= A_BOLD;
-		offs = 17;
 	}
 
-	if ((Current_Attr & A_UNDERLINE) && !(no_color_video & 2)) {
+	if ((Current_Attr == A_UNDERLINE) && !(no_color_video & 2)) {
 		attr |= A_UNDERLINE;
-		offs = 17;
 	}
 
 	attr |= COLOR_PAIR(code+offs);
@@ -590,16 +590,17 @@ PUBLIC void lynx_standout ARGS1(int, flag)
 PRIVATE void lynx_init_colors NOARGS
 {
     if (lynx_has_color) {
-	int n, m;
+	size_t n, m;
 
 	lynx_color_cfg[0].fg = default_fg;
 	lynx_color_cfg[0].bg = default_bg;
 
 	for (n = 0; n < sizeof(lynx_color_cfg)/sizeof(lynx_color_cfg[0]); n++) {
 	    for (m = 0; m <= 16; m += 8) {
-		init_pair(n+m+1,
-			lynx_color_pairs[n+m+1].fg,
-			lynx_color_pairs[n+m+1].bg);
+		int pair = n + m + 1;
+		init_pair(pair,
+			lynx_color_pairs[pair].fg,
+			lynx_color_pairs[pair].bg);
 	    }
 	    if (n == 0 && LYShowColor >= SHOW_COLOR_ON)
 		bkgd(COLOR_PAIR(9) | ' ');
@@ -833,7 +834,7 @@ PUBLIC void start_curses NOARGS
 
     noecho();
 
-#if defined(HAVE_KEYPAD)
+#if HAVE_KEYPAD
     keypad(stdscr,TRUE);
 #endif /* HAVE_KEYPAD */
 
diff --git a/src/LYCurses.h b/src/LYCurses.h
index 7247b7e5..3f685cbc 100644
--- a/src/LYCurses.h
+++ b/src/LYCurses.h
@@ -1,6 +1,8 @@
 #ifndef LYCURSES_H
 #define LYCURSES_H
 
+#include "userdefs.h"
+
 /*
  * The simple color scheme maps the 8 combinations of bold/underline/reverse
  * to the standard 8 ANSI colors (with some variations based on context).
@@ -109,6 +111,10 @@ extern void LYbox PARAMS((WINDOW *win, BOOLEAN formfield));
 #define BOXHORI '*'	/* character for popup window horizontal borders */
 #endif
 
+#ifndef KEY_DOWN
+#undef HAVE_KEYPAD	/* avoid confusion with bogus 'keypad()' */
+#endif
+
 extern int LYlines;  /* replaces LINES */
 extern int LYcols;   /* replaces COLS */
 
diff --git a/src/LYForms.c b/src/LYForms.c
index 67a11869..0387ad1d 100644
--- a/src/LYForms.c
+++ b/src/LYForms.c
@@ -571,7 +571,7 @@ PRIVATE int popup_options ARGS7(
     int num_options = 0, top, bottom, length = -1;
     OptionType * opt_ptr = list;
     int window_offset = 0;
-    int display_lines;
+    int lines_to_show;
     int npages;
 #ifdef VMS
     extern BOOLEAN HadVMSInterrupt; /* Flag from cleanup_sig() AST */
@@ -602,12 +602,12 @@ PRIVATE int popup_options ARGS7(
     QueryNum = QueryTotal;
 
     /*
-     *  Set display_lines based on the user_mode global.
+     *  Set lines_to_show based on the user_mode global.
      */
     if (user_mode == NOVICE_MODE)
-	display_lines = LYlines-4;
+	lines_to_show = LYlines-4;
     else
-	display_lines = LYlines-2;
+	lines_to_show = LYlines-2;
 
     /*
      *  Counting the number of options to be displayed.
@@ -654,16 +654,16 @@ PRIVATE int popup_options ARGS7(
     /*
      *  Hmm...  If the bottom goes beyond the number of lines available,
      */
-    if (bottom > display_lines) {
+    if (bottom > lines_to_show) {
 	/*
 	 *  Position the window at the top if we have more
 	 *  options than will fit in the window.
 	 */
-	if (i_length+3 > display_lines) {
+	if (i_length+3 > lines_to_show) {
 	    top = 0;
 	    bottom = top + i_length+3;
-	    if (bottom > display_lines)
-		bottom = display_lines + 1;
+	    if (bottom > lines_to_show)
+		bottom = lines_to_show + 1;
 	} else {
 	    /*
 	     *  Try to position the window so that the selected option will
@@ -671,8 +671,8 @@ PRIVATE int popup_options ARGS7(
 	     *  It could end up too high, at this point, but we'll move it
 	     *    down latter, if that has happened.
 	     */
-	    top = (display_lines + 1) - (i_length + 3);
-	    bottom = (display_lines + 1);
+	    top = (lines_to_show + 1) - (i_length + 3);
+	    bottom = (lines_to_show + 1);
 	}
     }
 
@@ -686,8 +686,8 @@ PRIVATE int popup_options ARGS7(
      */
     if (bottom < ly + 2) {
 	bottom = ly + 2;
-	if (bottom > display_lines + 1)
-	    bottom = display_lines + 1;
+	if (bottom > lines_to_show + 1)
+	    bottom = lines_to_show + 1;
 	top = bottom - length - 2;
     }
 
diff --git a/src/LYGetFile.c b/src/LYGetFile.c
index 863c905a..dc1b0d73 100644
--- a/src/LYGetFile.c
+++ b/src/LYGetFile.c
@@ -48,8 +48,6 @@
 
 PRIVATE int fix_http_urls PARAMS((document *doc));
 extern char * WWW_Download_File;
-extern char LYCancelDownload;
-extern BOOL redirect_post_content;
 #ifdef VMS
 extern BOOLEAN LYDidRename;
 #endif /* VMS */
diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h
index 0a2f1526..1b6508f6 100644
--- a/src/LYGlobalDefs.h
+++ b/src/LYGlobalDefs.h
@@ -219,6 +219,7 @@ extern BOOLEAN no_newspost;
 extern BOOLEAN no_mail;
 extern BOOLEAN no_dotfiles;
 extern BOOLEAN no_useragent;
+extern BOOLEAN no_statusline;
 extern BOOLEAN no_filereferer;
 extern BOOLEAN local_host_only;
 extern BOOLEAN override_no_download;
@@ -242,6 +243,7 @@ extern BOOLEAN nolist;
 extern BOOLEAN historical_comments;
 extern BOOLEAN minimal_comments;
 extern BOOLEAN soft_dquotes;
+extern BOOLEAN LYCancelDownload;
 extern BOOLEAN LYValidate;
 extern BOOLEAN LYPermitURL;
 extern BOOLEAN enable_scrollback; /* Clear screen before displaying new page */
diff --git a/src/LYLocal.c b/src/LYLocal.c
index 177af674..4799c4d8 100644
--- a/src/LYLocal.c
+++ b/src/LYLocal.c
@@ -76,7 +76,7 @@
 #define FREE(x) if (x) {free(x); x = NULL;}
 
 
-PUBLIC int LYExecv PARAMS((
+PRIVATE int LYExecv PARAMS((
 	char *		path,
 	char **		argv,
 	char *		msg));
@@ -2209,7 +2209,7 @@ PRIVATE char * render_item ARGS6(
 /*
  *  Execute DIRED command.
  */
-PUBLIC int LYExecv ARGS3(
+PRIVATE int LYExecv ARGS3(
 	char *,		path,
 	char **,	argv,
 	char *,		msg)
diff --git a/src/LYLocal.h b/src/LYLocal.h
index 8c1b5730..47fff5c0 100644
--- a/src/LYLocal.h
+++ b/src/LYLocal.h
@@ -37,6 +37,10 @@
 /* Special return code for LYMainLoop.c */
 #define PERMIT_FORM_RESULT (-99)
 
+extern char LYPermitFileURL[];
+extern char LYDiredFileURL[];
+extern char LYUploadFileURL[];
+
 extern BOOLEAN local_create PARAMS((document *doc));
 extern BOOLEAN local_modify PARAMS((document *doc, char **newpath));
 extern BOOLEAN local_remove PARAMS((document *doc));
diff --git a/src/LYMain.c b/src/LYMain.c
index 79046eee..91ef32c6 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -22,9 +22,7 @@
 #include "LYClean.h"
 #include "LYCharSets.h"
 #include "LYCharUtils.h"
-#ifdef EXP_CHARTRANS
 #include "UCMap.h"
-#endif /* EXP_CHARTRANS */
 #include "LYReadCFG.h"
 #include "LYrcFile.h"
 #include "LYKeymap.h"
@@ -154,7 +152,7 @@ PUBLIC lynx_html_item_type *downloaders = NULL;
 			    /* linked list of upload options */
 #ifdef USE_EXTERNALS
 PUBLIC lynx_html_item_type *externals = NULL;
-                            /* linked list of external options */
+			    /* linked list of external options */
 #endif
 PUBLIC lynx_html_item_type *uploaders = NULL;
 PUBLIC int port_syntax = 1;
@@ -316,11 +314,9 @@ PUBLIC BOOLEAN scan_for_buried_news_references = TRUE;
 PUBLIC BOOLEAN LYRawMode;
 PUBLIC BOOLEAN LYDefaultRawMode;
 PUBLIC BOOLEAN LYUseDefaultRawMode = TRUE;
-#ifdef EXP_CHARTRANS
 PUBLIC char *UCAssume_MIMEcharset = NULL;
 PUBLIC char *UCAssume_localMIMEcharset = NULL;
 PUBLIC char *UCAssume_unrecMIMEcharset = NULL;
-#endif /* EXP_CHARTRANS */
 PUBLIC int LYlines = 24;
 PUBLIC int LYcols = 80;
 PUBLIC int dump_output_width = 0;
@@ -462,8 +458,8 @@ PRIVATE void free_lynx_globals NOARGS
     FREE(bookmark_page);
     FREE(BookmarkPage);
     for (i = 0; i <= MBM_V_MAXFILES; i++) {
-        FREE(MBM_A_subbookmark[i]);
-        FREE(MBM_A_subdescript[i]);
+	FREE(MBM_A_subbookmark[i]);
+	FREE(MBM_A_subdescript[i]);
     }
     FREE(editor);
     FREE(authentication_info[0]);
@@ -484,14 +480,13 @@ PRIVATE void free_lynx_globals NOARGS
     FREE(UCAssume_unrecMIMEcharset);
     FREE(UCAssume_localMIMEcharset);
     for (i = 0; i < nlinks; i++) {
-        FREE(links[i].lname);
+	FREE(links[i].lname);
     }
     nlinks = 0;
 
     return;
 }
 
-
 /*
  *  This function frees the LYStdinArgs list. - FM
  */
@@ -501,7 +496,7 @@ PRIVATE void LYStdinArgs_free NOARGS
     HTList *cur = LYStdinArgs;
 
     if (cur == NULL)
-        return;
+	return;
 
     while (NULL != (argument = (char *)HTList_nextObject(cur))) {
 	FREE(argument);
@@ -551,12 +546,12 @@ PUBLIC int main ARGS2(
 #endif
 
 #if defined(_WINDOWS) || defined(DJGPP)
-        /*
-        * To prevent corrupting binary data with _WINDOWS and DJGPP
-        * we open files and stdout in BINARY mode by default.
-        * Where necessary we should open and (close!) TEXT mode.
-        */
-        _fmode = O_BINARY;
+	/*
+	 * To prevent corrupting binary data with _WINDOWS and DJGPP
+	 * we open files and stdout in BINARY mode by default.
+	 * Where necessary we should open and (close!) TEXT mode.
+	 */
+	_fmode = O_BINARY;
 	setmode( fileno( stdout ), O_BINARY );
 #endif
 
@@ -606,11 +601,11 @@ PUBLIC int main ARGS2(
      */
 #ifdef ULTRIX
     /*
-     *  Need this for ultrix.
+     *  Need this for Ultrix.
      */
     terminal = getenv("TERM");
     if ((terminal == NULL) || !strncasecomp(terminal, "xterm", 5))
-        terminal = "vt100";
+	terminal = "vt100";
 #endif /* ULTRIX */
     /*
      *  Zero the links and history struct arrays.
@@ -635,9 +630,9 @@ PUBLIC int main ARGS2(
     StrAllocCopy(startfile, STARTFILE);
     LYTrimHead(startfile);
     if (!strncasecomp(startfile, "lynxexec:", 9) ||
-        !strncasecomp(startfile, "lynxprog:", 9)) {
+	!strncasecomp(startfile, "lynxprog:", 9)) {
 	/*
-	 *  The original implementions of these schemes expected
+	 *  The original implementations of these schemes expected
 	 *  white space without hex escaping, and did not check
 	 *  for hex escaping, so we'll continue to support that,
 	 *  until that code is redone in conformance with SGML
@@ -659,7 +654,7 @@ PUBLIC int main ARGS2(
     StrAllocCat(LYUserAgent, "/");
     StrAllocCat(LYUserAgent, LYNX_VERSION);
     if (HTLibraryVersion) {
-        StrAllocCat(LYUserAgent, " libwww-FM/");
+	StrAllocCat(LYUserAgent, " libwww-FM/");
 	StrAllocCat(LYUserAgent, HTLibraryVersion);
     }
     StrAllocCopy(LYUserAgentDefault, LYUserAgent);
@@ -671,16 +666,16 @@ PUBLIC int main ARGS2(
     putenv(lynx_version_putenv_command);
 #endif /* VMS */
     if ((cp = getenv("LYNX_TEMP_SPACE")) != NULL)
-        StrAllocCopy(lynx_temp_space, cp);
+	StrAllocCopy(lynx_temp_space, cp);
     else
 #ifdef DOSPATH
        if ((cp = getenv("TEMP")) != NULL)
-                StrAllocCopy(lynx_temp_space, cp);
+		StrAllocCopy(lynx_temp_space, cp);
        else if ((cp = getenv("TMP")) != NULL)
-                StrAllocCopy(lynx_temp_space, cp);
+		StrAllocCopy(lynx_temp_space, cp);
        else
 #endif
-        StrAllocCopy(lynx_temp_space, TEMP_SPACE);
+	StrAllocCopy(lynx_temp_space, TEMP_SPACE);
     if ((cp = strchr(lynx_temp_space, '~'))) {
 	*(cp++) = '\0';
 	StrAllocCopy(temp, lynx_temp_space);
@@ -715,14 +710,14 @@ PUBLIC int main ARGS2(
     }
 #ifdef VMS
     for (i = 0; lynx_temp_space[i]; i++)
-        lynx_temp_space[i] = TOLOWER(lynx_temp_space[i]);
+	lynx_temp_space[i] = TOLOWER(lynx_temp_space[i]);
     if (strchr(lynx_temp_space, '/') != NULL) {
 	if ((len = strlen(lynx_temp_space)) == 1) {
 	    StrAllocCopy(lynx_temp_space, "sys$scratch:");
 	} else {
 	    if (lynx_temp_space[len-1] != '/')
 		StrAllocCat(lynx_temp_space, "/");
-            StrAllocCopy(temp, HTVMS_name("", lynx_temp_space));
+	    StrAllocCopy(temp, HTVMS_name("", lynx_temp_space));
 	    StrAllocCopy(lynx_temp_space, temp);
 	    FREE(temp);
 	}
@@ -770,7 +765,7 @@ PUBLIC int main ARGS2(
 	}
     }
     if (!LYchar_set_names[i])
-        current_char_set = i = 0;
+	current_char_set = i = 0;
     HTMLSetRawModeDefault(i);
 
     /*
@@ -812,11 +807,11 @@ PUBLIC int main ARGS2(
 #endif /* SOCKS */
 	} else if (strncmp(argv[i], "-cfg", 4) == 0) {
 	    if ((cp=strchr(argv[i],'=')) != NULL)
-                StrAllocCopy(lynx_cfg_file, cp+1);
-            else {
-                StrAllocCopy(lynx_cfg_file, argv[i+1]);
-                i++;
-            }
+		StrAllocCopy(lynx_cfg_file, cp+1);
+	    else {
+		StrAllocCopy(lynx_cfg_file, argv[i+1]);
+		i++;
+	    }
 
 #if defined(USE_HASH)
 	} else if (strncmp(argv[i], "-lss", 4) == 0) {
@@ -849,7 +844,7 @@ PUBLIC int main ARGS2(
      *  on the line (also terminated by RETURN). - FM
      */
     for (i = 1; i < argc; i++) {
-        if (strcmp(argv[i], "-") == 0) {
+	if (strcmp(argv[i], "-") == 0) {
 	    LYGetStdinArgs = TRUE;
 	}
     }
@@ -1006,7 +1001,7 @@ PUBLIC int main ARGS2(
 
 #ifdef SOCKS
     if (socks_flag)
-        SOCKSinit(argv[0]);
+	SOCKSinit(argv[0]);
 #endif /* SOCKS */
 
     /*
@@ -1025,15 +1020,15 @@ PUBLIC int main ARGS2(
      *  a TRACE log NOW. - FM
      */
     if (!LYValidate && !anon_restrictions_set &&
-        strlen((char *)ANONYMOUS_USER) > 0 &&
+	strlen((char *)ANONYMOUS_USER) > 0 &&
 #if defined (VMS) || defined (NOUSERS)
 	!strcasecomp(((char *)getenv("USER")==NULL ? " " : getenv("USER")),
 		     ANONYMOUS_USER)) {
 #else
 #if HAVE_CUSERID
-        STREQ((char *)cuserid((char *) NULL), ANONYMOUS_USER)) {
+	STREQ((char *)cuserid((char *) NULL), ANONYMOUS_USER)) {
 #else
-        STREQ(((char *)getlogin()==NULL ? " " : getlogin()), ANONYMOUS_USER)) {
+	STREQ(((char *)getlogin()==NULL ? " " : getlogin()), ANONYMOUS_USER)) {
 #endif /* HAVE_CUSERID */
 #endif /* VMS */
 	parse_restrictions("default");
@@ -1052,7 +1047,7 @@ PUBLIC int main ARGS2(
 #endif /* VMS */
     LYOrigStderr = *stderr;
     if (TRACE && LYUseTraceLog) {
-        /*
+	/*
 	 *  If we can't open it for writing, give up.
 	 *  Otherwise, on VMS close it, delete it and any
 	 *  versions from previous sessions so they don't
@@ -1094,7 +1089,7 @@ PUBLIC int main ARGS2(
 #ifdef JUMPFILE
     StrAllocCopy(jumpfile, JUMPFILE);
     {
-        temp = (char *)malloc(strlen(jumpfile) + 10);
+	temp = (char *)malloc(strlen(jumpfile) + 10);
 	if (!temp) {
 	    outofmem(__FILE__, "main");
 	} else {
@@ -1113,7 +1108,7 @@ PUBLIC int main ARGS2(
      *  the command line, see if it's in the environment.
      */
     if (!lynx_cfg_file) {
-        if (((cp=getenv("LYNX_CFG")) != NULL) ||
+	if (((cp=getenv("LYNX_CFG")) != NULL) ||
 	    (cp=getenv("lynx_cfg")) != NULL)
 	    StrAllocCopy(lynx_cfg_file, cp);
     }
@@ -1148,22 +1143,20 @@ PUBLIC int main ARGS2(
      *  inform the user and exit.
      */
     if ((fp = fopen(lynx_cfg_file, "r")) == NULL) {
-        fprintf(stderr, "\nConfiguration file %s is not available.\n\n",
+	fprintf(stderr, "\nConfiguration file %s is not available.\n\n",
 			lynx_cfg_file);
 	exit(-1);
     }
     fclose(fp);
 
-#ifdef EXP_CHARTRANS
     /*
      * Make sure we have the character sets declared.
      *  This will initialize the CHARTRANS handling. - KW
      */
     if (!LYCharSetsDeclared()) {
-        fprintf(stderr, "\nLynx character sets not declared.\n\n");
+	fprintf(stderr, "\nLynx character sets not declared.\n\n");
 	exit(-1);
     }
-#endif /* EXP_CHARTRANS */
 
 #if defined(USE_HASH)
     /*
@@ -1171,9 +1164,9 @@ PUBLIC int main ARGS2(
      *  the command line, see if it's in the environment.
      */
     if (!lynx_lss_file) {
-        if (((cp=getenv("LYNX_LSS")) != NULL) ||
-            (cp=getenv("lynx_lss")) != NULL)
-            StrAllocCopy(lynx_lss_file, cp);
+	if (((cp=getenv("LYNX_LSS")) != NULL) ||
+	    (cp=getenv("lynx_lss")) != NULL)
+	    StrAllocCopy(lynx_lss_file, cp);
     }
 
     /*
@@ -1181,37 +1174,37 @@ PUBLIC int main ARGS2(
      *  use the userdefs.h definition.
      */
     if (!lynx_lss_file)
-        StrAllocCopy(lynx_lss_file, LYNX_LSS_FILE);
+	StrAllocCopy(lynx_lss_file, LYNX_LSS_FILE);
 
     /*
      *  Convert a '~' in the lynx-style file path to $HOME.
      */
     if ((cp = strchr(lynx_lss_file, '~'))) {
-        *(cp++) = '\0';
-        StrAllocCopy(temp, lynx_lss_file);
-        if ((len=strlen(temp)) > 0 && temp[len-1] == '/')
-            temp[len-1] = '\0';
+	*(cp++) = '\0';
+	StrAllocCopy(temp, lynx_lss_file);
+	if ((len=strlen(temp)) > 0 && temp[len-1] == '/')
+	    temp[len-1] = '\0';
 #ifdef VMS
-        StrAllocCat(temp, HTVMS_wwwName((char *)Home_Dir()));
+	StrAllocCat(temp, HTVMS_wwwName((char *)Home_Dir()));
 #else
-        StrAllocCat(temp, Home_Dir());
+	StrAllocCat(temp, Home_Dir());
 #endif /* VMS */
-        StrAllocCat(temp, cp);
-        StrAllocCopy(lynx_lss_file, temp);
-        FREE(temp);
+	StrAllocCat(temp, cp);
+	StrAllocCopy(lynx_lss_file, temp);
+	FREE(temp);
     }
     /*
      *  If the lynx-style file is not available,
      *  inform the user and exit.
      */
     if ((fp = fopen(lynx_lss_file, "r")) == NULL) {
-        fprintf(stderr, "\nLynxile file %s is not available.\n\n",
-                        lynx_lss_file);
+	fprintf(stderr, "\nLynxile file %s is not available.\n\n",
+			lynx_lss_file);
     }
     else
     {
-        fclose(fp);
-        style_readFromFile(lynx_lss_file);
+	fclose(fp);
+	style_readFromFile(lynx_lss_file);
     }
 #endif
 
@@ -1219,7 +1212,7 @@ PUBLIC int main ARGS2(
      *  Make sure we have the edit map declared. - FM
      */
     if (!LYEditmapDeclared()) {
-        fprintf(stderr, "\nLynx edit map not declared.\n\n");
+	fprintf(stderr, "\nLynx edit map not declared.\n\n");
 	exit(-1);
     }
 
@@ -1264,16 +1257,16 @@ PUBLIC int main ARGS2(
      *  one will be overridden. - FM
      */
     if ((cp=getenv("LYNX_SAVE_SPACE")) != NULL)
-        StrAllocCopy(lynx_save_space, cp);
+	StrAllocCopy(lynx_save_space, cp);
 
     /*
      *  We have a save space path, make sure it's valid. - FM
      */
     if (lynx_save_space && *lynx_save_space == '\0') {
-        FREE(lynx_save_space);
+	FREE(lynx_save_space);
     }
     if (lynx_save_space) {
-        if ((cp = strchr(lynx_save_space, '~')) != NULL) {
+	if ((cp = strchr(lynx_save_space, '~')) != NULL) {
 	    *(cp++) = '\0';
 	    StrAllocCopy(temp, lynx_save_space);
 	    if (((len = strlen(temp)) > 0) && temp[len-1] == '/')
@@ -1290,21 +1283,21 @@ PUBLIC int main ARGS2(
 	    StrAllocCat(temp, cp);
 	    StrAllocCopy(lynx_save_space, temp);
 	    FREE(temp);
-        }
+	}
 #ifdef VMS
-        for (i = 0; lynx_save_space[i]; i++)
-            lynx_save_space[i] = TOLOWER(lynx_save_space[i]);
-        if (strchr(lynx_save_space, '/') != NULL) {
+	for (i = 0; lynx_save_space[i]; i++)
+	    lynx_save_space[i] = TOLOWER(lynx_save_space[i]);
+	if (strchr(lynx_save_space, '/') != NULL) {
 	    if ((len = strlen(lynx_save_space)) == 1) {
 		StrAllocCopy(lynx_save_space, "sys$login:");
 	    } else {
 		if (lynx_save_space[len-1] != '/')
 		    StrAllocCat(lynx_save_space, "/");
-                StrAllocCopy(temp, HTVMS_name("", lynx_save_space));
+		StrAllocCopy(temp, HTVMS_name("", lynx_save_space));
 		StrAllocCopy(lynx_save_space, temp);
 		FREE(temp);
 	    }
-        }
+	}
 	if (strchr(lynx_save_space, ':') == NULL &&
 	    strchr(lynx_save_space, ']') == NULL) {
 	    StrAllocCat(lynx_save_space, ":");
@@ -1338,7 +1331,7 @@ PUBLIC int main ARGS2(
 	if (!strncasecomp(startfile, "lynxexec:", 9) ||
 	    !strncasecomp(startfile, "lynxprog:", 9)) {
 	    /*
-	     *  The original implementions of these schemes expected
+	     *  The original implementations of these schemes expected
 	     *  white space without hex escaping, and did not check
 	     *  for hex escaping, so we'll continue to support that,
 	     *  until that code is redone in conformance with SGML
@@ -1370,12 +1363,12 @@ PUBLIC int main ARGS2(
      *  loaded into LYStdinArgs. - FM
      */
     if (LYStdinArgs != NULL) {
-	char *argv[2];
+	char *my_args[2];
 	HTList *cur = LYStdinArgs;
 
-	argv[1] = NULL;
-	while (NULL != (argv[0] = (char *)HTList_nextObject(cur))) {
-	    parse_arg(argv, NULL, -1);
+	my_args[1] = NULL;
+	while (NULL != (my_args[0] = (char *)HTList_nextObject(cur))) {
+	    parse_arg(my_args, NULL, -1);
 	}
 	LYStdinArgs_free();
     }
@@ -1415,28 +1408,28 @@ PUBLIC int main ARGS2(
 #if defined(EXEC_LINKS) || defined(EXEC_SCRIPTS)
 #ifdef NEVER_ALLOW_REMOTE_EXEC
     if (local_exec) {
-        local_exec = FALSE;
+	local_exec = FALSE;
 	local_exec_on_local_files = TRUE;
     }
 #endif /* NEVER_ALLOW_REMOTE_EXEC */
 #endif /* EXEC_LINKS || EXEC_SCRIPTS */
 
     if (emacs_keys)
-        set_emacs_keys();
+	set_emacs_keys();
 
     if (vi_keys)
-        set_vi_keys();
+	set_vi_keys();
 
     if (number_links && keypad_mode == NUMBERS_AS_ARROWS)
 	keypad_mode = LINKS_ARE_NUMBERED;
     if (keypad_mode == NUMBERS_AS_ARROWS)
-        set_numbers_as_arrows();
+	set_numbers_as_arrows();
 
     /*
      *  Check the -popup command line toggle. - FM
      */
     if (LYUseDefSelPop == FALSE) {
-        if (LYSelectPopups == TRUE)
+	if (LYSelectPopups == TRUE)
 	    LYSelectPopups = FALSE;
 	else
 	    LYSelectPopups = TRUE;
@@ -1466,9 +1459,9 @@ PUBLIC int main ARGS2(
      *  or via command line restrictions. - FM
      */
     if (no_multibook)
-        LYMBMBlocked = TRUE;
+	LYMBMBlocked = TRUE;
     if (dump_output_immediately || LYMBMBlocked || no_multibook) {
-        LYMultiBookmarks = FALSE;
+	LYMultiBookmarks = FALSE;
 	LYMBMBlocked = TRUE;
 	no_multibook = TRUE;
     }
@@ -1480,7 +1473,7 @@ PUBLIC int main ARGS2(
     /* trap interrupts */
     if (!dump_output_immediately)
 #ifndef NOSIGHUP
-        (void) signal(SIGHUP, cleanup_sig);
+	(void) signal(SIGHUP, cleanup_sig);
 #endif /* NOSIGHUP */
     (void) signal(SIGTERM, cleanup_sig);
 #ifdef SIGWINCH
@@ -1488,15 +1481,15 @@ PUBLIC int main ARGS2(
 #endif /* SIGWINCH */
 #ifndef VMS
     if (!TRACE && !dump_output_immediately && !stack_dump) {
-        (void) signal(SIGINT, cleanup_sig);
+	(void) signal(SIGINT, cleanup_sig);
 #ifndef __linux__
 #ifndef DOSPATH
-        (void) signal(SIGBUS, FatalProblem);
+	(void) signal(SIGBUS, FatalProblem);
 #endif /* DOSPATH */
 #endif /* !__linux__ */
-        (void) signal(SIGSEGV, FatalProblem);
-        (void) signal(SIGILL, FatalProblem);
-        /*
+	(void) signal(SIGSEGV, FatalProblem);
+	(void) signal(SIGILL, FatalProblem);
+	/*
 	 *  Since we're doing lots of TCP, just ignore SIGPIPE altogether.
 	 *
 	 *  HTTCP.c should deal with a broken pipe for servers.
@@ -1506,7 +1499,7 @@ PUBLIC int main ARGS2(
 	 *   more.
 	 */
 #ifndef DOSPATH
-        (void) signal(SIGPIPE, SIG_IGN);
+	(void) signal(SIGPIPE, SIG_IGN);
 #endif /* DOSPATH */
     }
 #endif /* !VMS */
@@ -1531,7 +1524,7 @@ PUBLIC int main ARGS2(
      *  not an absolute URL, make it one. - FM
      */
     if (homepage) {
-        LYFillLocalFileURL((char **)&homepage, "file://localhost");
+	LYFillLocalFileURL((char **)&homepage, "file://localhost");
 	LYEnsureAbsoluteURL((char **)&homepage, "HOMEPAGE");
     }
 
@@ -1543,7 +1536,7 @@ PUBLIC int main ARGS2(
     if (!(homepage && *homepage)) {
 	StrAllocCopy(homepage, startfile);
     } else {
-        StrAllocCopy(LynxHome, homepage);
+	StrAllocCopy(LynxHome, homepage);
     }
 
     /*
@@ -1551,14 +1544,14 @@ PUBLIC int main ARGS2(
      */
     if (inlocaldomain()) {
 #if !defined(HAVE_UTMP) || defined(VMS) /* not selective */
-        telnet_ok = !no_inside_telnet && !no_outside_telnet && telnet_ok;
+	telnet_ok = !no_inside_telnet && !no_outside_telnet && telnet_ok;
 	news_ok = !no_inside_news && !no_outside_news && news_ok;
 	ftp_ok = !no_inside_ftp && !no_outside_ftp && ftp_ok;
 	rlogin_ok = !no_inside_rlogin && !no_outside_rlogin && rlogin_ok;
 #else
 	if (TRACE)
 	   fprintf(stderr,"LYMain.c: User in Local domain\n");
-        telnet_ok = !no_inside_telnet && telnet_ok;
+	telnet_ok = !no_inside_telnet && telnet_ok;
 	news_ok = !no_inside_news && news_ok;
 	ftp_ok = !no_inside_ftp && ftp_ok;
 	rlogin_ok = !no_inside_rlogin && rlogin_ok;
@@ -1566,7 +1559,7 @@ PUBLIC int main ARGS2(
     } else {
 	if (TRACE)
 	   fprintf(stderr,"LYMain.c: User in REMOTE domain\n");
-        telnet_ok = !no_outside_telnet && telnet_ok;
+	telnet_ok = !no_outside_telnet && telnet_ok;
 	news_ok = !no_outside_news && news_ok;
 	ftp_ok = !no_outside_ftp && ftp_ok;
 	rlogin_ok = !no_outside_rlogin && rlogin_ok;
@@ -1584,15 +1577,15 @@ PUBLIC int main ARGS2(
      *  Check for a valid HEAD request. - FM
      */
     if (HEAD_request && LYCanDoHEAD(startfile) != TRUE) {
-        fprintf(stderr,
+	fprintf(stderr,
  "The '-head' switch is for http HEAD requests and cannot be used for\n'%s'.\n",
 		startfile);
 #ifndef NOSIGHUP
-        (void) signal(SIGHUP, SIG_DFL);
+	(void) signal(SIGHUP, SIG_DFL);
 #endif /* NOSIGHUP */
-        (void) signal(SIGTERM, SIG_DFL);
+	(void) signal(SIGTERM, SIG_DFL);
 #ifndef VMS
-        (void) signal(SIGINT, SIG_DFL);
+	(void) signal(SIGINT, SIG_DFL);
 #endif /* !VMS */
 #ifdef SIGTSTP
 	if (no_suspend)
@@ -1605,15 +1598,15 @@ PUBLIC int main ARGS2(
      *  Check for a valid MIME headers request. - FM
      */
     if (keep_mime_headers && LYCanDoHEAD(startfile) != TRUE) {
-        fprintf(stderr,
+	fprintf(stderr,
  "The '-mime_header' switch is for http URLs and cannot be used for\n'%s'.\n",
 		startfile);
 #ifndef NOSIGHUP
-        (void) signal(SIGHUP, SIG_DFL);
+	(void) signal(SIGHUP, SIG_DFL);
 #endif /* NOSIGHUP */
-        (void) signal(SIGTERM, SIG_DFL);
+	(void) signal(SIGTERM, SIG_DFL);
 #ifndef VMS
-        (void) signal(SIGINT, SIG_DFL);
+	(void) signal(SIGINT, SIG_DFL);
 #endif /* !VMS */
 #ifdef SIGTSTP
 	if (no_suspend)
@@ -1626,15 +1619,15 @@ PUBLIC int main ARGS2(
      *  Check for a valid traversal request. - FM
      */
     if (traversal && strncmp(startfile, "http", 4)) {
-        fprintf(stderr,
+	fprintf(stderr,
  "The '-traversal' switch is for http URLs and cannot be used for\n'%s'.\n",
 		startfile);
 #ifndef NOSIGHUP
-        (void) signal(SIGHUP, SIG_DFL);
+	(void) signal(SIGHUP, SIG_DFL);
 #endif /* NOSIGHUP */
-        (void) signal(SIGTERM, SIG_DFL);
+	(void) signal(SIGTERM, SIG_DFL);
 #ifndef VMS
-        (void) signal(SIGINT, SIG_DFL);
+	(void) signal(SIGINT, SIG_DFL);
 #endif /* !VMS */
 #ifdef SIGTSTP
 	if (no_suspend)
@@ -1648,7 +1641,7 @@ PUBLIC int main ARGS2(
      */
     StrAllocCopy(helpfilepath, helpfile);
     if ((cp=strrchr(helpfilepath, '/')) != NULL)
-        *cp = '\0';
+	*cp = '\0';
     /*
      *  Remove code to merge the historical about_lynx
      *  directory into lynx_help. - HN
@@ -1661,27 +1654,27 @@ PUBLIC int main ARGS2(
      *  are all allocated and synchronized. - FM
      */
     if (!bookmark_page || *bookmark_page == '\0') {
-        StrAllocCopy(bookmark_page, "lynx_bookmarks");
-        StrAllocCat(bookmark_page, HTML_SUFFIX);
-        StrAllocCopy(BookmarkPage, bookmark_page);
-        StrAllocCopy(MBM_A_subbookmark[0], bookmark_page);
-        StrAllocCopy(MBM_A_subdescript[0], "Default");
+	StrAllocCopy(bookmark_page, "lynx_bookmarks");
+	StrAllocCat(bookmark_page, HTML_SUFFIX);
+	StrAllocCopy(BookmarkPage, bookmark_page);
+	StrAllocCopy(MBM_A_subbookmark[0], bookmark_page);
+	StrAllocCopy(MBM_A_subdescript[0], "Default");
     }
     if (!BookmarkPage || *BookmarkPage == '\0') {
-        StrAllocCopy(BookmarkPage, bookmark_page);
-        StrAllocCopy(MBM_A_subbookmark[0], bookmark_page);
-        StrAllocCopy(MBM_A_subdescript[0], MULTIBOOKMARKS_DEFAULT);
+	StrAllocCopy(BookmarkPage, bookmark_page);
+	StrAllocCopy(MBM_A_subbookmark[0], bookmark_page);
+	StrAllocCopy(MBM_A_subdescript[0], MULTIBOOKMARKS_DEFAULT);
     }
 
     /*
      *  Here's where we do all the work.
      */
     if (dump_output_immediately) {
-        /*
+	/*
 	 *  Finish setting up and start a
 	 *  NON-INTERACTIVE session. - FM
 	 */
-        if (crawl && !number_links) {
+	if (crawl && !number_links) {
 	    keypad_mode = NUMBERS_AS_ARROWS;
 	} else if (!nolist) {
 	    if (keypad_mode == NUMBERS_AS_ARROWS) {
@@ -1700,18 +1693,18 @@ PUBLIC int main ARGS2(
 	     keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED))
 	    printlist(stdout,FALSE);
 #ifndef NOSIGHUP
-        (void) signal(SIGHUP, SIG_DFL);
+	(void) signal(SIGHUP, SIG_DFL);
 #endif /* NOSIGHUP */
-        (void) signal(SIGTERM, SIG_DFL);
+	(void) signal(SIGTERM, SIG_DFL);
 #ifndef VMS
-        (void) signal(SIGINT, SIG_DFL);
+	(void) signal(SIGINT, SIG_DFL);
 #endif /* !VMS */
 #ifdef SIGTSTP
 	if (no_suspend)
 	  (void) signal(SIGTSTP,SIG_DFL);
 #endif /* SIGTSTP */
     } else {
-        /*
+	/*
 	 *  Finish setting up and start an
 	 *  INTERACTIVE session. - FM
 	 */
@@ -1765,9 +1758,9 @@ PRIVATE char * scan3D ARGS2(
     char *result;
 
     if ((result=strchr(argv[0],'=')) != NULL)
-        return result+1;
+	return result+1;
     if (argv[1] && i)
-        (*i)++; /* Let master know we've stolen an argument */
+	(*i)++; /* Let master know we've stolen an argument */
     return argv[1];
 }
 
@@ -1791,7 +1784,7 @@ PRIVATE void parse_arg ARGS3(
 	if (!strncasecomp(startfile, "lynxexec:", 9) ||
 	    !strncasecomp(startfile, "lynxprog:", 9)) {
 	    /*
-	     *  The original implementions of these schemes expected
+	     *  The original implementations of these schemes expected
 	     *  white space without hex escaping, and did not check
 	     *  for hex escaping, so we'll continue to support that,
 	     *  until that code is redone in conformance with SGML
@@ -1809,14 +1802,14 @@ PRIVATE void parse_arg ARGS3(
      *  special handling. - FM
      */
     if (strcmp(argv[0], "-") == 0) {
-        return;
+	return;
     }
 
     switch (TOLOWER(argv[0][1])) {
 
     case 'a':
     if (strncmp(argv[0], "-anonymous", 10) == 0) {
-        /*
+	/*
 	 *  Should already have been set, so we don't
 	 *  override or replace any additional
 	 *  restrictions from the command line. - FM
@@ -1825,7 +1818,6 @@ PRIVATE void parse_arg ARGS3(
 	    parse_restrictions("default");
 	    anon_restrictions_set = TRUE;
 
-#ifdef EXP_CHARTRANS
     } else if ((strncmp(argv[0], "-assume_charset", 15) == 0) ||
 	       (strncmp(argv[0], "-assume_local_charset", 21) == 0) ||
 	       (strncmp(argv[0], "-assume_unrec_charset", 21) == 0)) {
@@ -1862,11 +1854,8 @@ PRIVATE void parse_arg ARGS3(
 		UCLYhndl_for_unspec = 0;
 	}
 
-
-#endif
-
     } else if (strncmp(argv[0], "-auth", 5) == 0) {
-        /*
+	/*
 	 *  Authentication information for protected documents.
 	 */
 	char *auth_info = NULL;
@@ -1875,7 +1864,7 @@ PRIVATE void parse_arg ARGS3(
 	    StrAllocCopy(auth_info, cp);
 	    memset(cp, ' ', strlen(cp));	/* Let's not show too much */
 	}
-        if (auth_info != NULL)  {
+	if (auth_info != NULL)	{
 	    if ((cp = strchr(auth_info, ':')) != NULL) {	/* Pw */
 		*cp++ = '\0';	/* Terminate ID */
 		if (*cp) {
@@ -1891,13 +1880,13 @@ PRIVATE void parse_arg ARGS3(
 	}
 
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
     case 'b':
     if (strcmp(argv[0], "-base") == 0) {
-        /*
+	/*
 	 *  Treat -source equivalently to an interactive
 	 *  download with LYPrefixBaseToSource configured
 	 *  to TRUE, so that a BASE tag is prepended for
@@ -1912,27 +1901,27 @@ PRIVATE void parse_arg ARGS3(
 	}
 
     } else if (strcmp(argv[0], "-book") == 0) {
-        /*
+	/*
 	 *  Use bookmarks as startfile.
 	 */
 	bookmark_start = TRUE;
 
     } else if (strcmp(argv[0], "-buried_news") == 0) {
-        /*
+	/*
 	 *  Toggle scans for buried news references.
 	 */
-        if (scan_for_buried_news_references)
+	if (scan_for_buried_news_references)
 	    scan_for_buried_news_references = FALSE;
 	else
 	    scan_for_buried_news_references = TRUE;
 
 #ifdef USE_SLANG
     } else if (strncmp(argv[0], "-blink", 6) == 0) {
-        Lynx_Color_Flags |= SL_LYNX_USE_BLINK;
+	Lynx_Color_Flags |= SL_LYNX_USE_BLINK;
 #endif /* USE_SLANG */
 
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
@@ -1962,7 +1951,7 @@ PRIVATE void parse_arg ARGS3(
 
 #ifdef USE_SLANG
     } else if (strncmp(argv[0], "-color", 6) == 0) {
-        Lynx_Color_Flags |= SL_LYNX_USE_COLOR;
+	Lynx_Color_Flags |= SL_LYNX_USE_COLOR;
 	if (LYShowColor != SHOW_COLOR_ALWAYS) {
 	    LYShowColor = SHOW_COLOR_ON;
 	}
@@ -1973,21 +1962,21 @@ PRIVATE void parse_arg ARGS3(
 	LYcols = 80;
 
     } else if (strncmp(argv[0], "-cookies", 8) == 0) {
-        if (LYSetCookies)
+	if (LYSetCookies)
 	    LYSetCookies = FALSE;
 	else
 	    LYSetCookies = TRUE;
 
 #ifndef VMS
     } else if (strncmp(argv[0], "-core", 5) == 0) {
-        if (LYNoCore)
+	if (LYNoCore)
 	    LYNoCore = FALSE;
 	else
 	    LYNoCore = TRUE;
 #endif /* !VMS */
 
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
@@ -2013,7 +2002,7 @@ PRIVATE void parse_arg ARGS3(
 	LYcols=80;
 
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
@@ -2027,13 +2016,13 @@ PRIVATE void parse_arg ARGS3(
 	emacs_keys = TRUE;
 
     } else if (strncmp(argv[0], "-enable_scrollback", 18) == 0) {
-        if (enable_scrollback)
+	if (enable_scrollback)
 	    enable_scrollback = FALSE;
 	else
 	    enable_scrollback = TRUE;
 
     } else if (strncmp(argv[0], "-error_file", 11) == 0) {
-        /*
+	/*
 	 *  Output return (success/failure) code
 	 *  of an HTTP transaction.
 	 */
@@ -2050,7 +2039,7 @@ PRIVATE void parse_arg ARGS3(
 #endif /* EXEC_LINKS || EXEC_SCRIPTS */
 
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
@@ -2066,13 +2055,13 @@ PRIVATE void parse_arg ARGS3(
 #endif /* VMS */
 
     } else if (strncmp(argv[0], "-force_secure", 13) == 0) {
-        if (LYForceSSLCookiesSecure)
+	if (LYForceSSLCookiesSecure)
 	    LYForceSSLCookiesSecure = FALSE;
 	else
 	    LYForceSSLCookiesSecure = TRUE;
 
     } else if (strncmp(argv[0], "-from", 5) == 0) {
-        if (LYNoFromHeader)
+	if (LYNoFromHeader)
 	    LYNoFromHeader = FALSE;
 	else
 	    LYNoFromHeader = TRUE;
@@ -2081,28 +2070,28 @@ PRIVATE void parse_arg ARGS3(
 	ftp_ok = FALSE;
 
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
     case 'g':
     if (strcmp(argv[0], "-get_data") == 0) {
-        /*
+	/*
 	 *  User data for GET form.
 	 */
 	char **get_data;
 	char buf[1024];
 
-        /*
+	/*
 	 *  On Unix, conflicts with curses when interactive
-         *  so let's force a dump.  - CL
+	 *  so let's force a dump.  - CL
 	 *
 	 *  On VMS, mods have been made in LYCurses.c to deal with
 	 *  potential conflicts, so don't force the dump here. - FM
-         */
+	 */
 #ifndef VMS
 	dump_output_immediately = TRUE;
-        LYcols = 80;
+	LYcols = 80;
 #endif /* VMS */
 
 	StrAllocCopy(form_get_data, "?");   /* Prime the pump */
@@ -2124,22 +2113,22 @@ PRIVATE void parse_arg ARGS3(
 	}
 
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
     case 'h':
     if (strcmp(argv[0], "-help") == 0) {
-        goto Output_Help_List;
+	goto Output_Help_List;
 
     } else if (strcmp(argv[0], "-head") == 0) {
-        /*
+	/*
 	 *  Return mime headers.
 	 */
 	HEAD_request = TRUE;
 
     } else if (strncmp(argv[0], "-hiddenlinks", 7) == 0) {
-        if (nextarg) {
+	if (nextarg) {
 	    if (strncasecomp(cp, "merge", 1) == 0)
 		LYHiddenLinks = HIDDENLINKS_MERGE;
 	    else if (strncasecomp(cp, "listonly", 1) == 0)
@@ -2152,7 +2141,7 @@ PRIVATE void parse_arg ARGS3(
 	    LYHiddenLinks = HIDDENLINKS_MERGE;
 
     } else if (strncmp(argv[0], "-historical", 11) == 0) {
-        if (historical_comments)
+	if (historical_comments)
 	    historical_comments = FALSE;
 	else
 	    historical_comments = TRUE;
@@ -2164,7 +2153,7 @@ PRIVATE void parse_arg ARGS3(
 	    if (!strncasecomp(homepage, "lynxexec:", 9) ||
 		!strncasecomp(homepage, "lynxprog:", 9)) {
 		/*
-		 *  The original implementions of these schemes expected
+		 *  The original implementations of these schemes expected
 		 *  white space without hex escaping, and did not check
 		 *  for hex escaping, so we'll continue to support that,
 		 *  until that code is redone in conformance with SGML
@@ -2175,7 +2164,7 @@ PRIVATE void parse_arg ARGS3(
 	    }
 	}
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
@@ -2197,13 +2186,13 @@ PRIVATE void parse_arg ARGS3(
 	    LYNoISMAPifUSEMAP = TRUE;
 
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
     case 'l':
     if (strncmp(argv[0], "-link", 5) == 0) {
-        if (nextarg)
+	if (nextarg)
 	    ccount = atoi(cp);
 
     } else if (strncmp(argv[0], "-localhost", 10) == 0) {
@@ -2216,22 +2205,22 @@ PRIVATE void parse_arg ARGS3(
 
 #if defined(USE_HASH)
     } else if (strncmp(argv[0], "-lss", 4) == 0) {
-        /*
+	/*
 	 *  Already read the alternate lynx-style file
-         *  so just check whether we need to increment i
-         */
-        if (nextarg)
-            ; /* do nothing */
+	 *  so just check whether we need to increment i
+	 */
+	if (nextarg)
+	    ; /* do nothing */
 #endif
 
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
     case 'm':
     if (strcmp(argv[0], "-mime_header") == 0) {
-        /*
+	/*
 	 *  Include mime headers and force source dump.
 	 */
 	keep_mime_headers = TRUE;
@@ -2241,19 +2230,19 @@ PRIVATE void parse_arg ARGS3(
 	LYcols=999;
 
     } else if (strncmp(argv[0], "-minimal", 11) == 0) {
-        if (minimal_comments)
+	if (minimal_comments)
 	    minimal_comments = FALSE;
 	else
 	    minimal_comments = TRUE;
 
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
     case 'n':
     if (strncmp(argv[0], "-newschunksize", 14) == 0) {
-        if (nextarg) {
+	if (nextarg) {
 	    HTNewsChunkSize = atoi(cp);
 	    /*
 	     * If the new HTNewsChunkSize exceeds the maximum,
@@ -2265,7 +2254,7 @@ PRIVATE void parse_arg ARGS3(
 	}
 
     } else if (strncmp(argv[0], "-newsmaxchunk", 13) == 0) {
-        if (nextarg) {
+	if (nextarg) {
 	    HTNewsMaxChunk = atoi(cp);
 	    /*
 	     * If HTNewsChunkSize exceeds the new maximum,
@@ -2304,7 +2293,7 @@ PRIVATE void parse_arg ARGS3(
 	error_logging = FALSE;
 
     } else if (strcmp(argv[0], "-nopause") == 0) { /* No statusline pauses */
-        InfoSecs = 0;
+	InfoSecs = 0;
 	MessageSecs = 0;
 	AlertSecs = 0;
 
@@ -2312,7 +2301,7 @@ PRIVATE void parse_arg ARGS3(
 	no_print = TRUE;
 
     } else if (strcmp(argv[0], "-noredir") == 0) {
-        /*
+	/*
 	 *  Don't follow URL redirections.
 	 */
 	no_url_redirection = TRUE;
@@ -2329,16 +2318,16 @@ PRIVATE void parse_arg ARGS3(
 	no_statusline = TRUE;
 
     } else if (strncmp(argv[0], "-number_links", 9) == 0) {
-        number_links = TRUE;
+	number_links = TRUE;
 
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
     case 'p':
     if (strncmp(argv[0], "-pauth", 6) == 0) {
-        /*
+	/*
 	 *  Authentication information for protected proxy server. - AJL
 	 */
 	char *pauth_info = NULL;
@@ -2347,7 +2336,7 @@ PRIVATE void parse_arg ARGS3(
 	    StrAllocCopy(pauth_info, cp);
 	    memset(cp, ' ', strlen(cp));	/* Let's not show too much */
 	}
-        if (pauth_info != NULL)  {
+	if (pauth_info != NULL)  {
 	    if ((cp = strchr(pauth_info, ':')) != NULL) {	/* Pw */
 		*cp++ = '\0';	/* Terminate ID */
 		if (*cp) {
@@ -2366,22 +2355,22 @@ PRIVATE void parse_arg ARGS3(
 	LYUseDefSelPop = FALSE;
 
     } else if (strcmp(argv[0], "-post_data") == 0) {
-        /*
+	/*
 	 *  User data for POST form.
 	 */
 	char **post_data;
 	char buf[1024];
 
-        /*
+	/*
 	 *  On Unix, conflicts with curses when interactive
-         *  so let's force a dump.  - CL
+	 *  so let's force a dump.  - CL
 	 *
 	 *  On VMS, mods have been made in LYCurses.c to deal with
 	 *  potential conflicts, so don't force a dump here. - FM
-         */
+	 */
 #ifndef VMS
 	dump_output_immediately = TRUE;
-        LYcols = 80;
+	LYcols = 80;
 #endif /* VMS */
 
 	post_data = &form_post_data;
@@ -2402,7 +2391,7 @@ PRIVATE void parse_arg ARGS3(
 	}
 
     } else if (strncmp(argv[0], "-preparsed", 9) == 0) {
-        LYPreparsedSource = TRUE;
+	LYPreparsedSource = TRUE;
 
     } else if (strncmp(argv[0], "-print", 6) == 0) {
 	no_print=FALSE;
@@ -2414,19 +2403,19 @@ PRIVATE void parse_arg ARGS3(
 	    pseudo_inline_alts = TRUE;
 
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
     case 'r':
     if (strncmp(argv[0], "-raw", 4) == 0) {
-        LYUseDefaultRawMode = FALSE;
+	LYUseDefaultRawMode = FALSE;
 
     } else if (strncmp(argv[0], "-realm", 6) == 0) {
 	check_realm = TRUE;
 
     } else if (strncmp(argv[0], "-reload", 7) == 0) {
-        reloading = TRUE;
+	reloading = TRUE;
 
     } else if (strncmp(argv[0], "-restrictions", 13) == 0) {
 	if ((cp=strchr(argv[0],'=')) != NULL)
@@ -2445,14 +2434,14 @@ PRIVATE void parse_arg ARGS3(
 		printf("\
    change_exec_perms  disallow changing the eXecute permission on files\n\
                    (but still allow it for directories) when local file\n\
-		   management is enabled.\n");
+                   management is enabled.\n");
 #endif /* DIRED_SUPPORT && OK_PERMIT */
 		printf("\
    default         same as commandline option -anonymous.  Disables\n\
                    default services for anonymous users.  Currently set to,\n\
                    all restricted except for: inside_telnet, outside_telnet,\n\
                    inside_news, inside_ftp, outside_ftp, inside_rlogin,\n\
-		   outside_rlogin, goto, jump and mail.  Defaults\n\
+                   outside_rlogin, goto, jump and mail.  Defaults\n\
                    are settable within userdefs.h\n");
 #ifdef DIRED_SUPPORT
 		printf("\
@@ -2464,10 +2453,10 @@ PRIVATE void parse_arg ARGS3(
    download        disallow downloaders in the download menu\n\
    editor          disallow editing\n\
    exec            disable execution scripts\n\
-    exec_frozen     disallow the user from changing the execution link\n");
+   exec_frozen     disallow the user from changing the execution link\n");
 #ifdef USE_EXTERNALS
 		printf("\
-    externals       disable passing URLs to external programs\n");
+   externals       disable passing URLs to external programs\n");
 #endif
 		printf("\
    file_url        disallow using G)oto, served links or bookmarks for\n\
@@ -2535,7 +2524,7 @@ PRIVATE void parse_arg ARGS3(
 	rlogin_ok = FALSE;
 
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
@@ -2547,7 +2536,7 @@ PRIVATE void parse_arg ARGS3(
 	LYUseDefShoCur = FALSE;
 
     } else if (strncmp(argv[0], "-soft_dquotes", 13) == 0) {
-        if (soft_dquotes)
+	if (soft_dquotes)
 	    soft_dquotes = FALSE;
 	else
 	    soft_dquotes = TRUE;
@@ -2562,7 +2551,7 @@ PRIVATE void parse_arg ARGS3(
 	stack_dump = TRUE;
 
     } else if (strncmp(argv[0], "-startfile_ok", 13) == 0) {
-        startfile_ok = TRUE;
+	startfile_ok = TRUE;
 
 #ifndef VMS
 #ifdef SYSLOG_REQUESTED_URLS
@@ -2573,7 +2562,7 @@ PRIVATE void parse_arg ARGS3(
 #endif /* !VMS */
 
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
@@ -2586,13 +2575,13 @@ PRIVATE void parse_arg ARGS3(
 	    terminal = cp;
 
     } else if (strncmp(argv[0], "-tlog", 5) == 0) {
-        /*
+	/*
 	 *  Already handled. - FM
 	 */
 	break;
 
     } else if (strncmp(argv[0], "-trace", 6) == 0) {
-        /*
+	/*
 	 *  Already handled. - FM
 	 */
 	break;
@@ -2606,7 +2595,7 @@ PRIVATE void parse_arg ARGS3(
 #endif /* USE_SLANG */
 
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
@@ -2619,23 +2608,23 @@ PRIVATE void parse_arg ARGS3(
 
 #if defined(NCURSES_MOUSE_VERSION) || defined(USE_SLANG_MOUSE)
     } else if (strncmp(argv[0], "-use_mouse", 9) == 0) {
-        LYUseMouse = TRUE;
+	LYUseMouse = TRUE;
 #endif
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
     case 'v':
     if (strcmp(argv[0], "-validate") == 0) {
-        /*
+	/*
 	 *  Follow only http URLs.
 	 *  Already handled. - FM
 	 */
 	break;
 
     } else if (strncmp(argv[0], "-version", 8) == 0) {
-	printf("\n%s Version %s (1997)\n", LYNX_NAME, LYNX_VERSION);
+	printf("\n%s Version %s (1998)\n", LYNX_NAME, LYNX_VERSION);
 	printf(
  "Copyrights held by the University of Kansas, CERN, and other contributors.\n"
 	      );
@@ -2649,7 +2638,7 @@ PRIVATE void parse_arg ARGS3(
 	vi_keys = TRUE;
 
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
@@ -2664,7 +2653,7 @@ PRIVATE void parse_arg ARGS3(
 	}
 	dump_output_width = 80;
     } else {
-        goto Output_Error_and_Help_List;
+	goto Output_Error_and_Help_List;
     }
     break;
 
@@ -2690,11 +2679,9 @@ Output_Help_List:
     printf("    -                receive the arguments from stdin (enclose\n");
     printf("                     in double-quotes (\"-\") on VMS)\n");
     printf("    -anonymous       used to specify the anonymous account\n");
-#ifdef EXP_CHARTRANS
     printf("    -assume_charset=MIMEname  charset for documents that don't specify it\n");
     printf("    -assume_local_charset=MIMEname  charset assumed for local files\n");
     printf("    -assume_unrec_charset=MIMEname  use this instead of unrecognized charsets\n");
-#endif /* EXP_CHARTRANS */
     printf("    -auth=id:pw      authentication information for protected documents\n");
     printf("    -base            prepend a request URL comment and BASE tag to text/html\n");
     printf("                     outputs for -source dumps\n");
@@ -2826,7 +2813,7 @@ PRIVATE void FatalProblem ARGS1(
      *  Ignore further interrupts. - mhc: 11/2/91
      */
 #ifndef NOSIGHUP
-				(void) signal(SIGHUP, SIG_IGN);
+    (void) signal(SIGHUP, SIG_IGN);
 #endif /* NOSIGHUP */
     (void) signal (SIGTERM, SIG_IGN);
     (void) signal (SIGINT, SIG_IGN);
@@ -2863,20 +2850,20 @@ PRIVATE void FatalProblem ARGS1(
      *  Issue appropriate messages and abort or exit. - FM
      */
     if (LYOutOfMemory == FALSE) {
-        fprintf (stderr, "\r\n\
+	fprintf (stderr, "\r\n\
 A Fatal error has occurred in %s Ver. %s\r\n", LYNX_NAME, LYNX_VERSION);
 
-        fprintf(stderr, "\r\n\
+	fprintf(stderr, "\r\n\
 Please notify your system administrator to confirm a bug, and\r\n\
 if confirmed, to notify the lynx-dev list.  Bug reports should\r\n\
 have concise descriptions of the command and/or URL which causes\r\n\
 the problem, the operating system name with version number, the\r\n\
 TCPIP implementation, and any other relevant information.\r\n");
 
-        fprintf(stderr, "\r\n\
+	fprintf(stderr, "\r\n\
 Do NOT mail the core file if one was generated.\r\n");
 
-        fprintf(stderr, "\r\n\
+	fprintf(stderr, "\r\n\
 Lynx now exiting with signal:  %d\r\n\r\n", sig);
 
 	/*
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index 212de74d..06ed21aa 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -184,9 +184,6 @@ int mainloop NOARGS
 #ifdef DIRED_SUPPORT
     char *tp = NULL;
     struct stat dir_info;
-    extern char LYPermitFileURL[];
-    extern char LYDiredFileURL[];
-    extern char LYUploadFileURL[];
 #endif /* DIRED_SUPPORT */
 
 /*
diff --git a/src/LYMap.h b/src/LYMap.h
index a0ef6337..ae0f9d69 100644
--- a/src/LYMap.h
+++ b/src/LYMap.h
@@ -10,5 +10,6 @@ extern BOOL LYAddImageMap PARAMS((char *address, char *title,
 extern BOOL LYAddMapElement PARAMS((char *map, char *address, char *title,
 				    HTParentAnchor *node_anchor,
 				    BOOL intern_flag));
+extern BOOL LYHaveImageMap PARAMS((char *address));
 
 #endif /* LYMAP_H */
diff --git a/src/LYPrint.c b/src/LYPrint.c
index 94b335ed..11474556 100644
--- a/src/LYPrint.c
+++ b/src/LYPrint.c
@@ -82,7 +82,6 @@ PUBLIC int printfile ARGS1(
     static BOOLEAN first_mail_preparsed = TRUE;
     char *envbuffer = NULL;
 #ifdef VMS
-    extern BOOLEAN HadVMSInterrupt;
     BOOLEAN isPMDF = FALSE;
     char hdrfile[256];
     FILE *hfd;
diff --git a/src/LYStrings.c b/src/LYStrings.c
index 3a4a7b46..9033ad3d 100644
--- a/src/LYStrings.c
+++ b/src/LYStrings.c
@@ -245,7 +245,7 @@ PUBLIC int LYmbcsstrlen ARGS2(
 #endif
 
 #if !defined(GetChar)
-#ifdef HAVE_KEYPAD
+#if HAVE_KEYPAD
 #define GetChar getch
 #else
 #ifndef USE_GETCHAR
@@ -690,7 +690,7 @@ re_read:
 #endif /* NCURSES_MOUSE_VERSION */
 	}
     }
-#endif /* defined(HAVE_KEYPAD) */
+#endif /* HAVE_KEYPAD */
 
     if (c > DO_NOTHING) {
 	/*
diff --git a/src/LYUtils.c b/src/LYUtils.c
index 0ece6343..73825488 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -1818,7 +1818,6 @@ PUBLIC void statusline ARGS1(
 {
     char buffer[256];
     unsigned char *temp = NULL;
-    extern BOOLEAN no_statusline;
     int max_length, len, i, j;
     unsigned char k;
 
@@ -2183,7 +2182,7 @@ PUBLIC BOOLEAN LYisLocalFile ARGS1(
 	char *,		filename)
 {
     char *host = NULL;
-    char *access = NULL;
+    char *acc_method = NULL;
     char *cp;
 
     if (!filename)
@@ -2198,8 +2197,8 @@ PUBLIC BOOLEAN LYisLocalFile ARGS1(
     if ((cp=strchr(host, ':')) != NULL)
         *cp = '\0';
 
-    if ((access = HTParse(filename, "", PARSE_ACCESS))) {
-        if (0==strcmp("file", access) &&
+    if ((acc_method = HTParse(filename, "", PARSE_ACCESS))) {
+        if (0==strcmp("file", acc_method) &&
 	    (0==strcmp(host, "localhost") ||
 #ifdef VMS
              0==strcasecomp(host, HTHostName())))
@@ -2208,13 +2207,13 @@ PUBLIC BOOLEAN LYisLocalFile ARGS1(
 #endif /* VMS */
         {
 	    FREE(host);
-	    FREE(access);
+	    FREE(acc_method);
 	    return YES;
 	}
     }
 
     FREE(host);
-    FREE(access);
+    FREE(acc_method);
     return NO;
 }
 
@@ -2853,6 +2852,10 @@ PUBLIC char * quote_pathname ARGS1(
     return result;
 }
 
+#if HAVE_UTMP
+extern char *ttyname PARAMS((int fd));
+#endif
+
 /*
  *  Checks to see if the current process is attached
  *  via a terminal in the local domain.
@@ -2867,7 +2870,6 @@ PUBLIC BOOLEAN inlocaldomain NOARGS
     FILE *fp;
     struct utmp me;
     char *cp, *mytty = NULL;
-    extern char *ttyname PARAMS((int fd));
 
     if ((cp=ttyname(0)))
 	mytty = strrchr(cp, '/');
@@ -5131,7 +5133,7 @@ PUBLIC BOOLEAN LYPathOffHomeOK ARGS2(
  *  This function appends fname to the home path and returns
  *  the full path and filename.  The fname string can be just
  *  a filename (e.g., "lynx_bookmarks.html"), or include a
- *  subirectory off the home directory, in which case fname
+ *  subdirectory off the home directory, in which case fname
  *  should begin with "./" (e.g., ./BM/lynx_bookmarks.html)
  *  Use LYPathOffHomeOK() to check and/or fix up fname before
  *  calling this function.  On VMS, the resultant full path
diff --git a/src/UCAuto.c b/src/UCAuto.c
index 8e0d29f8..906ab638 100644
--- a/src/UCAuto.c
+++ b/src/UCAuto.c
@@ -94,6 +94,7 @@ PRIVATE void write_esc ARGS1(
 	CONST char *,	p)
 {
     int fd = open("/dev/tty", O_WRONLY);
+
     if (fd >= 0) {
 	write(fd, p, strlen(p));
 	close(fd);
@@ -104,9 +105,10 @@ PRIVATE int nonempty_file ARGS1(
 	CONST char *,	p)
 {
     struct stat sb;
-    return (stat(p, &sb) == 0
-       &&   (sb.st_mode & S_IFMT) == S_IFREG
-       &&   (sb.st_size != 0));
+
+    return (stat(p, &sb) == 0 &&
+	    (sb.st_mode & S_IFMT) == S_IFREG && 
+	    (sb.st_size != 0));
 }
 
 /*
@@ -133,20 +135,23 @@ PUBLIC void UCChangeTerminalCodepage ARGS2(
     char tmpbuf1[100], tmpbuf2[20];
     char *cp;
 
-    /* Restore the original character set */
+    /*
+     *  Restore the original character set.
+     */
     if (newcs < 0 || p == 0) {
-	if (old_font && *old_font
-	 && old_umap && *old_umap) {
+	if (old_font && *old_font &&
+	    old_umap && *old_umap) {
 	    int have_font = nonempty_file(old_font);
 	    int have_umap = nonempty_file(old_umap);
 
 	    if (have_font) {
-		if (have_umap)
+		if (have_umap) {
 		    sprintf(tmpbuf1, "%s %s -u %s %s",
 			    SETFONT, old_font, old_umap, NOOUTPUT);
-		else
+		} else {
 		    sprintf(tmpbuf1, "%s %s %s",
 			    SETFONT, old_font, NOOUTPUT);
+		}
 		system(tmpbuf1);
 	    }
 
@@ -179,8 +184,6 @@ PUBLIC void UCChangeTerminalCodepage ARGS2(
 
     /*
      *  Use this for output of escape sequences.
-     *
-     *  For some reason stdout won't do; maybe needs flush() somewhere.
      */
     if (display || (cp = getenv(DISPLAY)) != NULL) {
 	/*
diff --git a/src/UCAux.c b/src/UCAux.c
index a88ea273..09fa6833 100644
--- a/src/UCAux.c
+++ b/src/UCAux.c
@@ -53,7 +53,6 @@ PUBLIC UCTQ_t UCCanTranslateFromTo ARGS2(
     {
 	CONST char * fromname = LYCharSet_UC[from].MIMEname;
 	CONST char * toname = LYCharSet_UC[to].MIMEname;
-	UCTQ_t tqmin = TQ_NO, tqmax = TQ_GOOD;
 	if (!strcmp(fromname, "x-transparent") ||
 	    !strcmp(toname, "x-transparent")) {
 	    return TQ_GOOD;
@@ -78,36 +77,18 @@ PUBLIC UCTQ_t UCCanTranslateFromTo ARGS2(
 		 !strcmp(fromname, "shift_jis")))
 		return TQ_GOOD;
 	    /*
-	    **  The other charsets for CJK were handled
+	    **  The euc-cn and euc-kr charsets were handled
 	    **  by the (from == to) above, so we need not
 	    **  check those. - FM
 	    **/
 	    return TQ_NO;
 	}
-	if (!strcmp(fromname, "koi8-r")) {
-	    /*
-	     *  Will try to use stripping of high bit...
-	     */
-	    tqmin = TQ_POOR;
-	}
-
-	if (!strcmp(fromname, "koi8-r") || /* from cyrillic */
-	    !strcmp(fromname, "iso-8859-5") ||
-	    !strcmp(fromname, "cp866") ||
-	    !strcmp(fromname, "cp1251") ||
-	    !strcmp(fromname, "koi-8")) {
-	    if (strcmp(toname, "iso-8859-5") &&
-		strcmp(toname, "koi8-r") &&
-		strcmp(toname, "cp866") &&
-		strcmp(toname, "cp1251"))
-		tqmax = TQ_POOR;
-	}
-	return ((LYCharSet_UC[from].UChndl >= 0) ? tqmax : tqmin);
+	return ((LYCharSet_UC[from].UChndl >= 0) ? TQ_GOOD : TQ_NO);
     }
 }
 
 /*
-**  Returns YES if no tranlation necessary (because
+**  Returns YES if no translation necessary (because
 **  charsets are equal, are equivalent, etc.).
 */
 PUBLIC BOOL UCNeedNotTranslate ARGS2(
@@ -167,7 +148,7 @@ PUBLIC BOOL UCNeedNotTranslate ARGS2(
 /*
 **  The idea here is that any stage of the stream pipe which is interested
 **  in some charset dependent processing will call this function.
-**  Given input and ouptput charsets, this function will set various flags
+**  Given input and output charsets, this function will set various flags
 **  in a UCTransParams structure that _suggest_ to the caller what to do.
 **
 **  Should be called once when a stage starts processing text (and the
@@ -274,6 +255,7 @@ PUBLIC void UCSetTransParams ARGS5(
 	    **  We set this, presently, for VISCII. - FM
 	    */
 	    pT->repl_translated_C0 = (p_out->enc == UCT_ENC_8BIT_C0);
+#ifdef NOTDEFINED
 	    /*
 	    **  This is a flag for whether we are dealing with koi8-r
 	    **  as the input, and could do 8th-bit stripping for other
@@ -291,6 +273,9 @@ PUBLIC void UCSetTransParams ARGS5(
 				       UCT_REP_SUBSETOF_LAT1)) &&
 				     cs_in != cs_out &&
 				     !strcmp(p_in->MIMEname, "koi8-r"));
+#else
+	    pT->strip_raw_char_in = FALSE;
+#endif /* NOTDEFINED */
 	    /*
 	    **  use_ucs should be set TRUE if we have or will create
 	    **  Unicode values for input octets or UTF multibytes. - FM
@@ -298,15 +283,15 @@ PUBLIC void UCSetTransParams ARGS5(
 	    use_ucs = (intm_ucs || pT->trans_to_uni);
 	    /*
 	    **  This is set TRUE if use_ucs was set FALSE.  It is
-	    **  parallel to the HTPassEightBitRaw flag, which
+	    **  complementary to the HTPassEightBitRaw flag, which
 	    **  is set TRUE or FALSE elsewhere based on the raw mode
 	    **  setting in relation to the current Display Character
 	    **  Set. - FM
 	    */
 	    pT->do_8bitraw = (!use_ucs);
 	    /*
-	    **  This is set TRUE when 160 and 173 should not be treated
-	    **  specially as nbsp and shy, respectively. - FM
+	    **  This is set TRUE when 160 and 173 should not be
+	    **  treated as nbsp and shy, respectively. - FM
 	    */
 	    pT->pass_160_173_raw = (!use_ucs &&
 				    !(p_in->like8859 & UCT_R_8859SPECL));
@@ -335,7 +320,7 @@ PUBLIC void UCSetTransParams ARGS5(
 }
 
 /*
-**  This function initalizes the transformation
+**  This function initializes the transformation
 **  structure by setting all its elements to
 **  FALSE. - KW
 */
@@ -355,14 +340,15 @@ PUBLIC void UCTransParams_clear ARGS1(
     pT->repl_translated_C0 = FALSE;
     pT->trans_from_uni = FALSE;
 }
+
 /*
- *  If terminal is in UTF-8 mode, it probably cannot understand
- *  box drawing chars as (n)curses handles them.  (This may also
- *  be true for other display character sets, but isn't currently
- *  checked.)  In that case set the chars for hori and vert drawing
- *  chars to displayable ASCII chars if '0' was requested.  They'll
- *  stay as they are otherwise. - kw
- */
+**  If terminal is in UTF-8 mode, it probably cannot understand
+**  box drawing chars as (n)curses handles them.  (This may also
+**  be true for other display character sets, but isn't currently
+**  checked.)  In that case set the chars for hori and vert drawing
+**  chars to displayable ASCII chars if '0' was requested.  They'll
+**  stay as they are otherwise. - kw
+*/
 PUBLIC void UCSetBoxChars ARGS5(
     int,	cset,
     int *,	pvert_out,
@@ -371,25 +357,26 @@ PUBLIC void UCSetBoxChars ARGS5(
     int,	hori_in)
 {
     if (cset >= -1 && LYCharSet_UC[cset].enc == UCT_ENC_UTF8) {
-	*pvert_out = (vert_in ? vert_in : '|'); 
+	*pvert_out = (vert_in ? vert_in : '|');
 	*phori_out = (hori_in ? hori_in : '-');
     } else {
 	*pvert_out = vert_in;
 	*phori_out = hori_in;
     }
 }
+
 /*
- *  Given an output target HTStream* (can also be a HTStructured* via
- *  typecast), the target stream's put_character method, and a unicode
- *  character,  CPutUtf8_charstring() will either output the UTF8
- *  encoding of the unicode and return YES, or do nothing and return
- *  NO (if conversion would be unnecessary or the unicode character is
- *  considered invalid).
- *
- *  [Could be used more generally, but is currently only used for &#nnnnn 
- *  stuff - generation of UTF8 from 8-bit encoded charsets not yet done
- *  by SGML.c etc.]
- */
+**  Given an output target HTStream* (can also be a HTStructured* via
+**  typecast), the target stream's put_character method, and a Unicode
+**  character,  CPutUtf8_charstring() will either output the UTF8
+**  encoding of the Unicode and return YES, or do nothing and return
+**  NO (if conversion would be unnecessary or the Unicode character is
+**  considered invalid).
+**
+**  [Could be used more generally, but is currently only used for &#nnnnn
+**  stuff - generation of UTF8 from 8-bit encoded charsets not yet done
+**  by SGML.c etc.]
+*/
 #define PUTC(ch) ((*myPutc)(target, (char)(ch)))
 #define PUTC2(ch) ((*myPutc)(target,(char)(0x80|(0x3f &(ch)))))
 
diff --git a/src/UCdomap.c b/src/UCdomap.c
index a03812cc..088d42ee 100644
--- a/src/UCdomap.c
+++ b/src/UCdomap.c
@@ -1,6 +1,6 @@
 /*
- * UCmap.c
- *  =======
+ *  UCdomap.c
+ *  =========
  *
  * Derived from code in the Linux kernel console driver.
  * The GNU Public Licence therefore applies, see
@@ -228,7 +228,7 @@ PRIVATE u16 translations[][256] = {
     0xf0f8, 0xf0f9, 0xf0fa, 0xf0fb, 0xf0fc, 0xf0fd, 0xf0fe, 0xf0ff
   }
 };
-static u16 *UC_translate = NULL;
+PRIVATE u16 *UC_translate = NULL;
 
 PRIVATE struct UC_charset UCInfo[MAXCHARSETS];
 
@@ -321,31 +321,36 @@ PRIVATE int default_UChndl = -1;
 PRIVATE void set_inverse_transl ARGS1(
 	int,		i)
 {
-	int j, glyph;
-	u16 *p = translations[i];
-	unsigned char *q = inverse_translations[i];
-
-	if (!q) {
-		/* slightly messy to avoid calling kmalloc too early */
-		q = inverse_translations[i] = ((i == LAT1_MAP)
-			? inv_norm_transl
-			: (unsigned char *) malloc(MAX_GLYPH));
-		if (!q)
-			return;
-	}
-	for (j=0; j<MAX_GLYPH; j++)
-		q[j] = 0;
-
-	for (j=0; j<E_TABSZ; j++) {
-		glyph = conv_uni_to_pc(p[j], 0);
-		if (glyph >= 0 && glyph < MAX_GLYPH && q[glyph] < 32) {
-			/* prefer '-' above SHY etc. */
-			q[glyph] = j;
-		}
+    int j, glyph;
+    u16 *p = translations[i];
+    unsigned char *q = inverse_translations[i];
+
+    if (!q) {
+	/*
+	 *  Slightly messy to avoid calling kmalloc too early.
+	 */
+	q = inverse_translations[i] = ((i == LAT1_MAP) ?
+				       inv_norm_transl :
+				       (unsigned char *)malloc(MAX_GLYPH));
+	if (!q)
+	    return;
+    }
+    for (j = 0; j < MAX_GLYPH; j++)
+	q[j] = 0;
+
+    for (j = 0; j < E_TABSZ; j++) {
+	glyph = conv_uni_to_pc(p[j], 0);
+	if (glyph >= 0 && glyph < MAX_GLYPH && q[glyph] < 32) {
+	    /*
+	     *  Prefer '-' above SHY etc.
+	     */
+	    q[glyph] = j;
 	}
+    }
 }
 
-PRIVATE u16 *set_translate ARGS1(int, m)
+PRIVATE u16 *set_translate ARGS1(
+	int,		m)
 {
 	if (!inverse_translations[m])
 		set_inverse_transl(m);
@@ -374,80 +379,81 @@ PRIVATE unsigned char inverse_translate ARGS1(
 }
 
 /*
- * Load customizable translation table
- * arg points to a 256 byte translation table.
+ *  Load customizable translation table.
+ *  'arg' points to a 256 byte translation table.
  *
- * The "old" variants are for translation directly to font (using the
- * 0xf000-0xf0ff "transparent" Unicodes) whereas the "new" variants set
- * Unicodes explictly.
+ *  The "old" variants are for translation directly to font (using the
+ *  0xf000-0xf0ff "transparent" Unicodes) whereas the "new" variants set
+ *  Unicodes explicitly.
  */
-int con_set_trans_old(unsigned char * arg)
+PRIVATE int con_set_trans_old ARGS1(
+	unsigned char *,	arg)
 {
-	int i;
-	u16 *p = translations[USER_MAP];
+    int i;
+    u16 *p = translations[USER_MAP];
 #if(0)
-	i = verify_area(VERIFY_READ, (void *)arg, E_TABSZ);
-	if (i)
-		return i;
+    i = verify_area(VERIFY_READ, (void *)arg, E_TABSZ);
+    if (i)
+	return i;
 #endif
-	for (i=0; i<E_TABSZ ; i++)
-		p[i] = UNI_DIRECT_BASE | (u16) arg[i];
+    for (i = 0; i < E_TABSZ; i++)
+	p[i] = UNI_DIRECT_BASE | (u16)arg[i];
 
-	set_inverse_transl(USER_MAP);
-	return 0;
+    set_inverse_transl(USER_MAP);
+    return 0;
 }
 
-int con_get_trans_old(unsigned char * arg)
+PRIVATE int con_get_trans_old ARGS1(
+	unsigned char *,	arg)
 {
-	int i, ch;
-	u16 *p = translations[USER_MAP];
+    int i, ch;
+    u16 *p = translations[USER_MAP];
 #if(0)
-	i = verify_area(VERIFY_WRITE, (void *)arg, E_TABSZ);
-	if (i)
-		return i;
+    i = verify_area(VERIFY_WRITE, (void *)arg, E_TABSZ);
+    if (i)
+	return i;
 #endif
-	for (i=0; i<E_TABSZ ; i++)
-	  {
-	    ch = conv_uni_to_pc(p[i]);
-/*	    put_user((ch & ~0xff) ? 0 : ch, arg+i); */
-	    arg[i] = (unsigned char)((ch & ~0xff) ? 0 : ch);
-	  }
-	return 0;
+    for (i = 0; i < E_TABSZ; i++) {
+	ch = conv_uni_to_pc(p[i]);
+#ifdef NOTDEFINED
+	put_user((ch & ~0xff) ? 0 : ch, arg+i);
+#endif /* NOTDEFINED */
+	arg[i] = (unsigned char)((ch & ~0xff) ? 0 : ch);
+    }
+    return 0;
 }
 
 PRIVATE int con_set_trans_new ARGS1(
 	u16 *,		arg)
 {
-	int i;
-	u16 *p = translations[USER_MAP];
+    int i;
+    u16 *p = translations[USER_MAP];
 #if(0)
-	i = verify_area(VERIFY_READ, (void *)arg,
-			E_TABSZ*sizeof(u16));
-	if (i)
-		return i;
+    i = verify_area(VERIFY_READ, (void *)arg, E_TABSZ*sizeof(u16));
+    if (i)
+	return i;
 #endif
-	for (i=0; i<E_TABSZ ; i++)
-	  p[i] = arg[i];
+    for (i = 0; i < E_TABSZ; i++)
+	p[i] = arg[i];
 
-	set_inverse_transl(USER_MAP);
-	return 0;
+    set_inverse_transl(USER_MAP);
+    return 0;
 }
 
 PRIVATE int con_get_trans_new ARGS1(
 	u16 *		arg)
 {
-	int i;
-	u16 *p = translations[USER_MAP];
+    int i;
+    u16 *p = translations[USER_MAP];
 #if(0)
-	i = verify_area(VERIFY_WRITE, (void *)arg,
-			E_TABSZ*sizeof(u16));
-	if (i)
-		return i;
+    i = verify_area(VERIFY_WRITE, (void *)arg, E_TABSZ*sizeof(u16));
+    if (i)
+	return i;
 #endif
-	for (i=0; i<E_TABSZ ; i++)
-	  arg[i] = p[i];
+    for (i = 0; i < E_TABSZ; i++)
+	arg[i] = p[i];
 
-	return 0;
+    return 0;
 }
 #endif /* NOTDEFINED */
 
@@ -468,7 +474,7 @@ PRIVATE void UC_con_set_trans ARGS3(
 
     if (!UC_valid_UC_charset(UC_charset_in_hndl)) {
 	if (TRACE)
-	    fprintf(stderr,"UC_con_set_trans: Invalid charset handle %d.\n",
+	    fprintf(stderr, "UC_con_set_trans: Invalid charset handle %d.\n",
 		    UC_charset_in_hndl);
 	return;
     }
@@ -507,18 +513,18 @@ PRIVATE void UC_con_set_trans ARGS3(
  * "paged table" instead.  Simulation has shown the memory cost of
  * this 3-level paged table scheme to be comparable to a hash table.
  */
+PRIVATE int hashtable_contents_valid = 0; /* Use ASCII-only mode for bootup*/
+PRIVATE int hashtable_str_contents_valid = 0;
 
-PRIVATE int unitable_contents_valid = 0; /* Use ASCII-only mode for bootup*/
-PRIVATE int unitable_str_contents_valid = 0;
-
-static u16 **uni_pagedir[32] =
+PRIVATE u16 **uni_pagedir[32] =
 {
   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
 };
-static char* **uni_pagedir_str[32] =
+
+PRIVATE char* **uni_pagedir_str[32] =
 {
   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -559,40 +565,40 @@ PRIVATE int con_insert_unipair ARGS3(
 	u16,		fontpos,
 	int,		fordefault)
 {
-  int i, n;
-  u16 **p1, *p2;
-
-  if(fordefault)
-      p1 = unidefault_pagedir[n = unicode >> 11];
-  else
-      p1 = uni_pagedir[n = unicode >> 11];
-  if (!p1)
-    {
-      p1 = (u16* *) malloc(32*sizeof(u16 *));
-      if (fordefault)
-	  unidefault_pagedir[n] = p1;
-      else
-	  uni_pagedir[n] = p1;
-      if ( !p1 )
-	return -ENOMEM;
+    int i, n;
+    u16 **p1, *p2;
+
+    if(fordefault)
+	p1 = unidefault_pagedir[n = unicode >> 11];
+    else
+	p1 = uni_pagedir[n = unicode >> 11];
+    if (!p1) {
+	p1 = (u16* *)malloc(32*sizeof(u16 *));
+	if (fordefault)
+	    unidefault_pagedir[n] = p1;
+	else
+	    uni_pagedir[n] = p1;
+	if ( !p1 )
+	    return -ENOMEM;
 
-      for ( i = 0 ; i < 32 ; i++ )
-	p1[i] = NULL;
+	for (i = 0; i < 32; i++) {
+	    p1[i] = NULL;
+	}
     }
 
-  if ( !(p2 = p1[n = (unicode >> 6) & 0x1f]) )
-    {
-      p2 = p1[n] = (u16 *) malloc(64*sizeof(u16));
-      if ( !p2 )
-	return -ENOMEM;
+    if (!(p2 = p1[n = (unicode >> 6) & 0x1f])) {
+	p2 = p1[n] = (u16 *)malloc(64*sizeof(u16));
+	if (!p2)
+	    return -ENOMEM;
 
-      for ( i = 0 ; i < 64 ; i++ )
-	p2[i] = 0xffff;		/* No glyph for this character (yet) */
+	for (i = 0; i < 64; i++) {
+	    p2[i] = 0xffff;		/* No glyph for this character (yet) */
+	}
     }
 
-  p2[unicode & 0x3f] = fontpos;
+    p2[unicode & 0x3f] = fontpos;
 
-  return 0;
+    return 0;
 }
 
 PRIVATE int con_insert_unipair_str ARGS3(
@@ -600,78 +606,79 @@ PRIVATE int con_insert_unipair_str ARGS3(
 	char *,		replace_str,
 	int,		fordefault)
 {
-  int i, n;
-  char ***p1, **p2;
-
-  if(fordefault)
-      p1 = unidefault_pagedir_str[n = unicode >> 11];
-  else
-      p1 = uni_pagedir_str[n = unicode >> 11];
-  if (!p1)
-    {
-      p1 = (char** *) malloc(32*sizeof(char **));
-      if (fordefault)
-	  unidefault_pagedir_str[n] = p1;
-      else
-	  uni_pagedir_str[n] = p1;
-      if ( !p1 )
-	return -ENOMEM;
+    int i, n;
+    char ***p1, **p2;
+
+    if(fordefault)
+	p1 = unidefault_pagedir_str[n = unicode >> 11];
+    else
+	p1 = uni_pagedir_str[n = unicode >> 11];
+    if (!p1) {
+	p1 = (char** *)malloc(32*sizeof(char **));
+	if (fordefault)
+	    unidefault_pagedir_str[n] = p1;
+	else
+	    uni_pagedir_str[n] = p1;
+	if ( !p1 )
+	    return -ENOMEM;
 
-      for ( i = 0 ; i < 32 ; i++ )
-	p1[i] = NULL;
+	for (i = 0; i < 32; i++) {
+	    p1[i] = NULL;
+	}
     }
 
-  if ( !(p2 = p1[n = (unicode >> 6) & 0x1f]) )
-    {
-      p2 = p1[n] = (char* *) malloc(64*sizeof(char *));
-      if ( !p2 )
-	return -ENOMEM;
+    if (!(p2 = p1[n = (unicode >> 6) & 0x1f])) {
+	p2 = p1[n] = (char* *)malloc(64*sizeof(char *));
+	if (!p2)
+	    return -ENOMEM;
 
-      for ( i = 0 ; i < 64 ; i++ )
-	p2[i] = NULL;		/* No replace string this character (yet) */
+	for (i = 0; i < 64; i++) {
+	    p2[i] = NULL;	/* No replace string this character (yet) */
+	}
     }
 
-  p2[unicode & 0x3f] = replace_str;
+    p2[unicode & 0x3f] = replace_str;
 
-  return 0;
+    return 0;
 }
 
-/* ui arg was a leftover, deleted -kw */
-PRIVATE void
-con_clear_unimap ARGS1(int, fordefault)
+/* 
+ *  ui arg was a leftover, deleted. - KW
+ */
+PRIVATE void con_clear_unimap ARGS1(
+	int,		fordefault)
 {
-  int i, j;
-  u16 **p1;
-
-  if (fordefault) {
-    for (i = 0; i < 32; i++) {
-	if ((p1 = unidefault_pagedir[i]) != NULL) {
-	    for (j = 0; j < 32; j++) {
-		FREE(p1[j]);
+    int i, j;
+    u16 **p1;
+
+    if (fordefault) {
+	for (i = 0; i < 32; i++) {
+	    if ((p1 = unidefault_pagedir[i]) != NULL) {
+		for (j = 0; j < 32; j++) {
+		    FREE(p1[j]);
+		}
+		FREE(p1);
 	    }
-	    FREE(p1);
+	    unidefault_pagedir[i] = NULL;
 	}
-      unidefault_pagedir[i] = NULL;
-    }
 
-    unidefault_contents_valid = 1;
-  } else {
-    for (i = 0; i < 32; i++) {
-	if ((p1 = uni_pagedir[i]) != NULL) {
-	    for (j = 0; j < 32; j++) {
-		FREE(p1[j]);
+	unidefault_contents_valid = 1;
+    } else {
+	for (i = 0; i < 32; i++) {
+	    if ((p1 = uni_pagedir[i]) != NULL) {
+		for (j = 0; j < 32; j++) {
+		    FREE(p1[j]);
+		}
+		FREE(p1);
 	    }
-	    FREE(p1);
+	    uni_pagedir[i] = NULL;
 	}
-      uni_pagedir[i] = NULL;
-    }
 
-    unitable_contents_valid = 1;
-  }
+	hashtable_contents_valid = 1;
+    }
 }
 
-PRIVATE void
-con_clear_unimap_str ARGS1(int, fordefault)
+PRIVATE void con_clear_unimap_str ARGS1(int, fordefault)
 {
   int i, j;
   char ***p1;
@@ -699,61 +706,65 @@ con_clear_unimap_str ARGS1(int, fordefault)
       uni_pagedir_str[i] = NULL;
     }
 
-    unitable_str_contents_valid = 1;  /* ??? probably no use... */
+    hashtable_str_contents_valid = 1;  /* ??? probably no use... */
   }
 }
 
 #ifdef NOTDEFINED
-int
-con_set_unimap ARGS2(u16, ct, struct unipair *, list)
+PRIVATE int con_set_unimap ARGS2(
+	u16,			ct,
+	struct unipair *,	list)
 {
-  int err = 0, err1, i;
+    int err = 0, err1, i;
 
-  while( ct-- )
-    {
-      if ( (err1 = con_insert_unipair(list->unicode,
-				      list->fontpos)) != 0 )
-	err = err1;
-      list++;
+    while (ct--) {
+	if ((err1 = con_insert_unipair(list->unicode, list->fontpos)) != 0) {
+	    err = err1;
+	}
+	list++;
     }
 
-  for ( i = 0 ; i <= 3 ; i++ )
-    set_inverse_transl(i); /* Update all inverse translations */
-
-  return err;
+    for (i = 0; i <= 3; i++) {
+	set_inverse_transl(i); /* Update all inverse translations */
+    }
+    return err;
 }
 #endif /* NOTDEFINED */
 
-/* Loads the unimap for the hardware font, as defined in uni_hash.tbl.
-   The representation used was the most compact I could come up
-   with.  This routine is executed at sys_setup time, and when the
-   PIO_FONTRESET ioctl is called. */
-
-PRIVATE void
-con_set_default_unimap NOARGS
+/*
+ *  Loads the unimap for the hardware font, as defined in uni_hash.tbl.
+ *  The representation used was the most compact I could come up
+ *  with.  This routine is executed at sys_setup time, and when the
+ *  PIO_FONTRESET ioctl is called.
+ */
+PRIVATE void con_set_default_unimap NOARGS
 {
-  int i, j;
-  u16 *p;
-
-  /* The default font is always 256 characters */
+    int i, j;
+    u16 *p;
 
-  con_clear_unimap(1);
+    /*
+     *  The default font is always 256 characters.
+     */
+    con_clear_unimap(1);
 
-  p = dfont_unitable;
-  for ( i = 0 ; i < 256 ; i++ )
-    for ( j = dfont_unicount[i] ; j ; j-- )
-      con_insert_unipair(*(p++), i, 1);
+    p = dfont_unitable;
+    for (i = 0; i < 256; i++) {
+	for (j = dfont_unicount[i]; j; j--) {
+	    con_insert_unipair(*(p++), i, 1);
+	}
+    }
 
 #if 0
-  for ( i = 0 ; i <= 3 ; i++ )
-    set_inverse_transl(i);	/* Update all inverse translations */
+    for (i = 0; i <= 3; i++) {
+	set_inverse_transl(i);	/* Update all inverse translations */
+    }
 #endif
 
-  UC_default_unitable = dfont_unitable;
+    UC_default_unitable = dfont_unitable;
 
-  con_clear_unimap_str(1);
-  UC_con_set_unimap_str(dfont_replacedesc.entry_ct, repl_map, 1);
-  UC_default_unitable_str = &dfont_replacedesc;
+    con_clear_unimap_str(1);
+    UC_con_set_unimap_str(dfont_replacedesc.entry_ct, repl_map, 1);
+    UC_default_unitable_str = &dfont_replacedesc;
 }
 
 PUBLIC int UCNumCharsets = 0;
@@ -767,25 +778,26 @@ PRIVATE int UC_con_set_unimap ARGS2(
 	int,		UC_charset_out_hndl,
 	int,		update_flag)
 {
-  int i, j;
-  u16 *p;
+    int i, j;
+    u16 *p;
 
     if (!UC_valid_UC_charset(UC_charset_out_hndl)) {
-      if (TRACE)
-	fprintf(stderr,"UC_con_set_unimap: Invalid charset handle %d.\n",
-		UC_charset_out_hndl);
-      return -1;
+	if (TRACE)
+	    fprintf(stderr, "UC_con_set_unimap: Invalid charset handle %d.\n",
+		    UC_charset_out_hndl);
+	return -1;
     }
 
-  p = UCInfo[UC_charset_out_hndl].unitable;
-  if (p == UC_current_unitable) {    /* test whether pointers are equal */
-    return update_flag;			/* nothing to be done */
-  }
-  UC_current_unitable = p;
-
-  /* The font is always 256 characters - so far. */
+    p = UCInfo[UC_charset_out_hndl].unitable;
+    if (p == UC_current_unitable) {    /* test whether pointers are equal */
+	return update_flag;			/* nothing to be done */
+    }
+    UC_current_unitable = p;
 
-  con_clear_unimap(0);
+    /*
+     *  The font is always 256 characters - so far.
+     */
+    con_clear_unimap(0);
 
     for (i = 0; i < 256; i++) {
 	for (j = UCInfo[UC_charset_out_hndl].unicount[i]; j; j--) {
@@ -793,26 +805,29 @@ PRIVATE int UC_con_set_unimap ARGS2(
 	}
     }
 
-  if (update_flag)
-    for ( i = 0 ; i <= 3 ; i++ )
-      set_inverse_transl(i);	/* Update all inverse translations */
-  return 0;
+    if (update_flag) {
+	for (i = 0; i <= 3; i++) {
+	    set_inverse_transl(i);	/* Update all inverse translations */
+	}
+    }
+
+    return 0;
 }
 
 PRIVATE int UC_con_set_unimap_str ARGS3(
-    u16,		ct,
-    struct unipair_str *, list,
-    int,		fordefault)
+	u16,		ct,
+	struct unipair_str *, list,
+	int,		fordefault)
 {
-  int err = 0, err1;
+    int err = 0, err1;
 
-  while( ct-- )
-    {
-      if ( (err1 = con_insert_unipair_str(list->unicode,
-					  list->replace_str,
-					  fordefault)) != 0 )
-	err = err1;
-      list++;
+    while (ct--) {
+	if ((err1 = con_insert_unipair_str(list->unicode,
+					   list->replace_str,
+					   fordefault)) != 0) {
+	    err = err1;
+	}
+	list++;
     }
 
     /*
@@ -822,80 +837,100 @@ PRIVATE int UC_con_set_unimap_str ARGS3(
 	if (fordefault)
 	    unidefault_str_contents_valid = 1;
 	else
-	    unitable_str_contents_valid = 1;
+	    hashtable_str_contents_valid = 1;
     }
 
-  return err;
+    return err;
 }
 
-#if 0	/* UNUSED */
-int
-con_get_unimap ARGS3(u16, ct, u16 *, uct, struct unipair *, list)
+#ifdef NOTDEFINED
+PRIVATE int con_get_unimap ARGS3(
+	u16,			ct,
+	u16 *,			uct,
+	struct unipair *, 	list)
 {
-	int i, j, k, ect;
-	u16 **p1, *p2;
-
-	ect = 0;
-	if (hashtable_contents_valid)
-	  {
-	    for ( i = 0 ; i < 32 ; i++ )
-	      if ( (p1 = uni_pagedir[i]) != NULL )
-		for ( j = 0 ; j < 32 ; j++ )
-		  if ( (p2 = *(p1++)) != NULL )
-		    for ( k = 0 ; k < 64 ; k++ )
-		      {
-			if ( *p2 < MAX_GLYPH && ect++ < ct )
-			  {
-			    list->unicode = (u16) ((i<<11)+(j<<6)+k);
-			    list->fontpos = (u16) *p2;
-			    list++;
-			  }
-			p2++;
-		      }
-	  }
-	*uct = ect;
-	return ((ect <= ct) ? 0 : -ENOMEM);
+    int i, j, k, ect;
+    u16 **p1, *p2;
+
+    ect = 0;
+    if (hashtable_contents_valid) {
+	for (i = 0; i < 32; i++) {
+	    if ((p1 = uni_pagedir[i]) != NULL) {
+		for (j = 0; j < 32; j++) {
+		    if ((p2 = *(p1++)) != NULL) {
+			for (k = 0; k < 64; k++) {
+			    if (*p2 < MAX_GLYPH && ect++ < ct) {
+				list->unicode = (u16) ((i<<11)+(j<<6)+k);
+				list->fontpos = (u16) *p2;
+				list++;
+			    }
+			    p2++;
+			}
+		    }
+		}
+	    }
+	}
+    }
+    *uct = ect;
+    return ((ect <= ct) ? 0 : -ENOMEM);
 }
-#endif
+#endif /* NOTDEFINED */
 
 PRIVATE int conv_uni_to_pc ARGS2(
 	long,		ucs,
 	int,		usedefault)
 {
-  int h;
-  u16 **p1, *p2;
-
-  /* Only 16-bit codes supported at this time */
-  if (ucs > 0xffff)
-    ucs = 0xfffd;		/* U+FFFD: REPLACEMENT CHARACTER */
-  else if (ucs < 0x20 || ucs >= 0xfffe)
-    return -1;		/* Not a printable character */
-  else if (ucs == 0xfeff || (ucs >= 0x200a && ucs <= 0x200f))
-    return -2;			/* Zero-width space */
-  /*
-   * UNI_DIRECT_BASE indicates the start of the region in the User Zone
-   * which always has a 1:1 mapping to the currently loaded font.  The
-   * UNI_DIRECT_MASK indicates the bit span of the region.
-   */
-  else if ( (ucs & ~UNI_DIRECT_MASK) == UNI_DIRECT_BASE )
-    return ucs & UNI_DIRECT_MASK;
+    int h;
+    u16 **p1, *p2;
+  
+    /*
+     *  Only 16-bit codes supported at this time.
+     */
+    if (ucs > 0xffff) {
+	/*
+	 *  U+FFFD: REPLACEMENT CHARACTER.
+	 */
+	ucs = 0xfffd;
+    } else if (ucs < 0x20 || ucs >= 0xfffe) {
+	/*
+	 *  Not a printable character.
+	 */
+	return -1;
+    } else if (ucs == 0xfeff || (ucs >= 0x200a && ucs <= 0x200f)) {
+	/*
+	 *  Zero-width space.
+	 */
+	return -2;
+    } else if ((ucs & ~UNI_DIRECT_MASK) == UNI_DIRECT_BASE) {
+	/*
+	 *  UNI_DIRECT_BASE indicates the start of the region in the
+	 *  User Zone which always has a 1:1 mapping to the currently
+	 *  loaded font.  The UNI_DIRECT_MASK indicates the bit span
+	 *  of the region.
+	 */
+	return (ucs & UNI_DIRECT_MASK);
+    }
 
-  if (usedefault) {
-      if (!unidefault_contents_valid)
-	  return -3;
-      p1 = unidefault_pagedir[ucs >> 11];
-  } else {
-      if (!unitable_contents_valid)
-	  return -3;
-      p1 = uni_pagedir[ucs >> 11];
-  }
+    if (usedefault) {
+	if (!unidefault_contents_valid)
+	    return -3;
+	p1 = unidefault_pagedir[ucs >> 11];
+    } else {
+	if (!hashtable_contents_valid)
+	    return -3;
+	p1 = uni_pagedir[ucs >> 11];
+    }
 
-  if (p1 &&
-      (p2 = p1[(ucs >> 6) & 0x1f]) &&
-      (h = p2[ucs & 0x3f]) < MAX_GLYPH )
-    return h;
+    if (p1 &&
+	(p2 = p1[(ucs >> 6) & 0x1f]) &&
+	(h = p2[ucs & 0x3f]) < MAX_GLYPH) {
+	return h;
+    }
 
-  return -4;		/* not found */
+    /*
+     *  Not found.
+     */
+    return -4;
 }
 
 /*
@@ -907,44 +942,58 @@ PRIVATE int conv_uni_to_str ARGS4(
 	long,		ucs,
 	int,		usedefault)
 {
-  char *h;
-  char ***p1, **p2;
-
-  /* Only 16-bit codes supported at this time */
-  if (ucs > 0xffff)
-    ucs = 0xfffd;		/* U+FFFD: REPLACEMENT CHARACTER */
-/* Maybe the following two cases should be allowed here?? -kw */
-  else if (ucs < 0x20 || ucs >= 0xfffe)
-    return -1;		/* Not a printable character */
-  else if (ucs == 0xfeff || (ucs >= 0x200a && ucs <= 0x200f))
-    return -2;			/* Zero-width space */
-  /*
-   * UNI_DIRECT_BASE indicates the start of the region in the User Zone
-   * which always has a 1:1 mapping to the currently loaded font.  The
-   * UNI_DIRECT_MASK indicates the bit span of the region.
-   */
-/* We dont handle the following here: */
-#if(0)
-  else if ( (ucs & ~UNI_DIRECT_MASK) == UNI_DIRECT_BASE )
-    return ucs & UNI_DIRECT_MASK;
-#endif
+    char *h;
+    char ***p1, **p2;
 
-  if (usedefault) {
-      if (!unidefault_str_contents_valid)
-	  return -3;
-      p1 = unidefault_pagedir_str[ucs >> 11];
-  } else {
-      if (!unitable_str_contents_valid)
-	  return -3;
-      p1 = uni_pagedir_str[ucs >> 11];
-  }
+    /*
+     *  Only 16-bit codes supported at this time.
+     */
+    if (ucs > 0xffff) {
+	/*
+	 *  U+FFFD: REPLACEMENT CHARACTER.
+	 */
+	ucs = 0xfffd;
+    /*
+     *  Maybe the following two cases should be allowed here?? - KW
+     */
+    } else if (ucs < 0x20 || ucs >= 0xfffe) {
+	/*
+	 *  Not a printable character.
+	 */
+	return -1;
+    } else if (ucs == 0xfeff || (ucs >= 0x200a && ucs <= 0x200f)) {
+	/*
+	 *  Zero-width space.
+	 */
+	return -2;
+#ifdef NOTDEFINED	/* We don't handle the following here: */
+    } else if ((ucs & ~UNI_DIRECT_MASK) == UNI_DIRECT_BASE) {
+	/*
+	 *  UNI_DIRECT_BASE indicates the start of the region in the
+	 *  User Zone which always has a 1:1 mapping to the currently
+	 *  loaded font.  The UNI_DIRECT_MASK indicates the bit span
+	 *  of the region.
+	 */
+	return ucs & UNI_DIRECT_MASK;
+#endif /* NOTDEFINED */
+    }
 
-  if (p1 &&
-      (p2 = p1[(ucs >> 6) & 0x1f]) &&
-      (h = p2[ucs & 0x3f]) ) {
-    strncpy (outbuf,h,(size_t) (buflen-1));
-    return 1;     /* ok ! */
-  }
+    if (usedefault) {
+	if (!unidefault_str_contents_valid)
+	    return -3;
+	p1 = unidefault_pagedir_str[ucs >> 11];
+    } else {
+	if (!hashtable_str_contents_valid)
+	    return -3;
+	p1 = uni_pagedir_str[ucs >> 11];
+    }
+
+    if (p1 &&
+	(p2 = p1[(ucs >> 6) & 0x1f]) &&
+	(h = p2[ucs & 0x3f])) {
+	strncpy (outbuf,h,(size_t) (buflen-1));
+	return 1;     /* ok ! */
+    }
 
     /*
      *  Not found.
@@ -959,8 +1008,7 @@ PUBLIC int UCInitialized = 0;
  * initialized.  It must be possible to call kmalloc(..., GFP_KERNEL)
  * from this function, hence the call from sys_setup.
  */
-PRIVATE void
-UCconsole_map_init NOARGS
+PRIVATE void UCconsole_map_init NOARGS
 {
     con_set_default_unimap();
     UCInitialized = 1;
@@ -1028,83 +1076,84 @@ PUBLIC int UCTransUniCharStr ARGS5(
 	int,		charset_out,
 	int,		chk_single_flag)
 {
-  int rc = -14, src = 0, ignore_err;
-  int UChndl_out;
-  int isdefault, trydefault = 0;
-  struct unimapdesc_str * repl;
-  u16 * ut;
-
-  if (buflen<2)
-      return -13;
-
-  if ((UChndl_out = LYCharSet_UC[charset_out].UChndl) < 0) {
-      if ((UChndl_out = default_UChndl) < 0)
-	  return -12;
-      isdefault = 1;
-  } else {
-      isdefault = UCInfo[UChndl_out].replacedesc.isdefault;
-      trydefault = UCInfo[UChndl_out].replacedesc.trydefault;
-  }
+    int rc = -14, src = 0, ignore_err;
+    int UChndl_out;
+    int isdefault, trydefault = 0;
+    struct unimapdesc_str * repl;
+    u16 * ut;
 
-  if (chk_single_flag) {
-      if (!isdefault) {
-	  ut = UCInfo[UChndl_out].unitable;
-	  if (ut != UC_current_unitable) {
-	      src = UC_con_set_unimap(UChndl_out, 1);
-	      if (src < 0) {
-		  return src;
-	      }
-	  }
-      }
-      src = conv_uni_to_pc(unicode, isdefault);
-      if (src >= 32) {
-	  outbuf[0] = src; outbuf[1] = '\0';
-	  return 1;
-      }
-  }
-  repl = &(UCInfo[UChndl_out].replacedesc);
-  if (!isdefault) {
-      if (repl != UC_current_unitable_str)  {
-	  con_clear_unimap_str(0);
-	  ignore_err = UC_con_set_unimap_str(repl->entry_ct, repl->entries, 0);
-	  UC_current_unitable_str = repl;
-      }
-      rc = conv_uni_to_str(outbuf, buflen, unicode, 0);
-      if (rc >= 0)
-	  return (strlen(outbuf));
-  }
-  if (trydefault && chk_single_flag) {
-      src = conv_uni_to_pc(unicode, 1);
-      if (src >= 32) {
-	  outbuf[0] = src; outbuf[1] = '\0';
-	  return 1;
-      }
-  }
-  if (isdefault || trydefault) {
-      rc = conv_uni_to_str(outbuf, buflen, unicode, 1);
-      if (rc >= 0)
-	  return (strlen(outbuf));
-  }
-  if (rc == -4) {
-    if (!isdefault)
-	rc = conv_uni_to_str(outbuf, buflen, 0xfffd, 0);
-    if ((rc == -4) && (isdefault || trydefault))
-	rc = conv_uni_to_str(outbuf, buflen, 0xfffd, 1);
-    if (rc >= 0)
-	return (strlen(outbuf));
-  }
-  if (chk_single_flag && src == -4) {
-      if (!isdefault)
-	  rc = conv_uni_to_pc(0xfffd, 0);
-      if ((rc == -4) && (isdefault || trydefault))
-	  rc = conv_uni_to_pc(0xfffd, 1);
-      if (rc >= 32) {
-	  outbuf[0] = rc; outbuf[1] = '\0';
-	  return 1;
-      }
-      return rc;
-  }
-  return -4;
+    if (buflen < 2)
+	return -13;
+
+    if ((UChndl_out = LYCharSet_UC[charset_out].UChndl) < 0) {
+	if ((UChndl_out = default_UChndl) < 0)
+	    return -12;
+	isdefault = 1;
+    } else {
+	isdefault = UCInfo[UChndl_out].replacedesc.isdefault;
+	trydefault = UCInfo[UChndl_out].replacedesc.trydefault;
+    }
+
+    if (chk_single_flag) {
+	if (!isdefault) {
+	    ut = UCInfo[UChndl_out].unitable;
+	    if (ut != UC_current_unitable) {
+		src = UC_con_set_unimap(UChndl_out, 1);
+		if (src < 0) {
+		    return src;
+		}
+	    }
+	}
+	src = conv_uni_to_pc(unicode, isdefault);
+	if (src >= 32) {
+	    outbuf[0] = src; outbuf[1] = '\0';
+	    return 1;
+	}
+    }
+
+    repl = &(UCInfo[UChndl_out].replacedesc);
+    if (!isdefault) {
+	if (repl != UC_current_unitable_str)  {
+	    con_clear_unimap_str(0);
+	    ignore_err = UC_con_set_unimap_str(repl->entry_ct, repl->entries, 0);
+	    UC_current_unitable_str = repl;
+	}
+	rc = conv_uni_to_str(outbuf, buflen, unicode, 0);
+	if (rc >= 0)
+	    return (strlen(outbuf));
+    }
+    if (trydefault && chk_single_flag) {
+	src = conv_uni_to_pc(unicode, 1);
+	if (src >= 32) {
+	    outbuf[0] = src; outbuf[1] = '\0';
+	    return 1;
+	}
+    }
+    if (isdefault || trydefault) {
+	rc = conv_uni_to_str(outbuf, buflen, unicode, 1);
+	if (rc >= 0)
+	    return (strlen(outbuf));
+    }
+    if (rc == -4) {
+	if (!isdefault)
+	    rc = conv_uni_to_str(outbuf, buflen, 0xfffd, 0);
+	if ((rc == -4) && (isdefault || trydefault))
+	    rc = conv_uni_to_str(outbuf, buflen, 0xfffd, 1);
+	if (rc >= 0)
+	    return (strlen(outbuf));
+    }
+    if (chk_single_flag && src == -4) {
+	if (!isdefault)
+	    rc = conv_uni_to_pc(0xfffd, 0);
+	if ((rc == -4) && (isdefault || trydefault))
+	    rc = conv_uni_to_pc(0xfffd, 1);
+	if (rc >= 32) {
+	    outbuf[0] = rc; outbuf[1] = '\0';
+	    return 1;
+	}
+	return rc;
+    }
+    return -4;
 }
 
 PRIVATE int UC_lastautoGN = 0;
@@ -1113,10 +1162,10 @@ PRIVATE int UC_MapGN ARGS2(
 	int,		UChndl,
 	int,		update_flag)
 {
-    int i,Gn,found,lasthndl;
+    int i, Gn, found, lasthndl;
     found = 0;
     Gn = -1;
-    for (i=0; i<4 && Gn<0; i++) {
+    for (i = 0; i < 4 && Gn < 0; i++) {
 	if (UC_GNhandles[i] < 0) {
 	    Gn = i;
 	} else if (UC_GNhandles[i] == UChndl) {
@@ -1183,7 +1232,6 @@ PUBLIC int UCTransChar ARGS3(
     if ((Gn = UCInfo[UChndl_in].GN) < 0) {
 	Gn = UC_MapGN(UChndl_in,0);
 	upd = 1;
-
     }
 
     ut = UCInfo[UChndl_out].unitable;
@@ -1336,7 +1384,7 @@ PUBLIC int UCTransCharStr ARGS6(
     u16 * ut;
     int upd = 0;
 
-    if (buflen<2)
+    if (buflen < 2)
 	return -13;
 #ifndef UC_NO_SHORTCUTS
     if (chk_single_flag && charset_in == charset_out) {
@@ -1359,8 +1407,10 @@ PUBLIC int UCTransCharStr ARGS6(
 	isdefault = UCInfo[UChndl_out].replacedesc.isdefault;
 	trydefault = UCInfo[UChndl_out].replacedesc.trydefault;
     }
-    if ((Gn = UCInfo[UChndl_in].GN) < 0)
-    {Gn = UC_MapGN(UChndl_in,!chk_single_flag); upd=chk_single_flag;}
+    if ((Gn = UCInfo[UChndl_in].GN) < 0) {
+	Gn = UC_MapGN(UChndl_in, !chk_single_flag);
+	upd = chk_single_flag;
+    }
 
     UC_translate = set_translate(Gn);
     unicode = UC_translate[(unsigned char)ch_in];
@@ -1472,7 +1522,7 @@ PUBLIC int UCGetLYhndl_byMIME ARGS1(
 	 (i < MAXCHARSETS && i < LYNumCharsets &&
 	  LYchar_set_names[i] && LYhndl < 0); i++) {
 	if (LYCharSet_UC[i].MIMEname &&
-	    !strcmp(UC_MIMEcharset,LYCharSet_UC[i].MIMEname)) {
+	    !strcmp(UC_MIMEcharset, LYCharSet_UC[i].MIMEname)) {
 	    LYhndl = i;
 	}
     }
@@ -1482,6 +1532,9 @@ PUBLIC int UCGetLYhndl_byMIME ARGS1(
 	 */
 	if (!strcmp(UC_MIMEcharset, "unicode-1-1-utf-8") ||
 	    !strcmp(UC_MIMEcharset, "utf8")) {
+	    /*
+	     *  Treat these as synonyms for the IANA registered name. - FM
+	     */
 	    return UCGetLYhndl_byMIME("utf-8");
 	}
 	if (!strncmp(UC_MIMEcharset, "iso-2022-jp", 11) ||
@@ -1491,29 +1544,45 @@ PUBLIC int UCGetLYhndl_byMIME ARGS1(
 	if (!strcmp(UC_MIMEcharset, "x-shift-jis")) {
 	    return UCGetLYhndl_byMIME("shift_jis");
 	}
-	else if (!strcmp(UC_MIMEcharset, "iso-2022-kr")) {
+	if (!strcmp(UC_MIMEcharset, "iso-2022-kr")) {
 	    return UCGetLYhndl_byMIME("euc-kr");
 	}
-	else if (!strcmp(UC_MIMEcharset, "gb2312") ||
-		   !strncmp(UC_MIMEcharset, "cn-gb", 5) ||
-		   !strcmp(UC_MIMEcharset, "iso-2022-cn")) {
+	if (!strcmp(UC_MIMEcharset, "gb2312") ||
+	    !strncmp(UC_MIMEcharset, "cn-gb", 5) ||
+	    !strcmp(UC_MIMEcharset, "iso-2022-cn")) {
 	    return UCGetLYhndl_byMIME("euc-cn");
 	}
-	else if (!strcmp(UC_MIMEcharset, "cn-big5")) {
+	if (!strcmp(UC_MIMEcharset, "cn-big5")) {
 	    return UCGetLYhndl_byMIME("big5");
 	}
-	else if (!strcmp(UC_MIMEcharset, "x-mac-roman") ||
-		   !strcmp(UC_MIMEcharset, "mac-roman")) {
+	if (!strcmp(UC_MIMEcharset, "x-mac-roman") ||
+	    !strcmp(UC_MIMEcharset, "mac-roman")) {
 	    return UCGetLYhndl_byMIME("macintosh");
 	}
-	else if (!strcmp(UC_MIMEcharset, "x-next") ||
-		   !strcmp(UC_MIMEcharset, "nextstep") ||
-		   !strcmp(UC_MIMEcharset, "x-nextstep")) {
-	    return UCGetLYhndl_byMIME("x-next");
+	if (!strcmp(UC_MIMEcharset, "x-next") ||
+	    !strcmp(UC_MIMEcharset, "nextstep") ||
+	    !strcmp(UC_MIMEcharset, "x-nextstep")) {
+	    return UCGetLYhndl_byMIME("next");
 	}
-	if (!strcmp(UC_MIMEcharset,
-		   "iso-8859-1-windows-3.1-latin-1")) {
-	    return UCGetLYhndl_byMIME("cp1252");
+	if (!strcmp(UC_MIMEcharset, "iso-8859-1-windows-3.1-latin-1") ||
+	    !strcmp(UC_MIMEcharset, "cp1252") ||
+	    !strcmp(UC_MIMEcharset, "cp-1252") ||
+	    !strcmp(UC_MIMEcharset, "ibm1252") ||
+	    !strcmp(UC_MIMEcharset, "iso-8859-1-windows-3.0-latin-1")) {
+	    /*
+	     *  Treat these as synonyms for windows-1252, which is more
+	     *  commonly used than the IANA registered name. - FM
+	     */
+	    return UCGetLYhndl_byMIME("windows-1252");
+	}
+	if (!strcmp(UC_MIMEcharset, "iso-8859-2-windows-latin-2") ||
+	    !strcmp(UC_MIMEcharset, "cp1250") ||
+	    !strcmp(UC_MIMEcharset, "cp-1250") ||
+	    !strcmp(UC_MIMEcharset, "ibm1250")) {
+	    /*
+	     *  Treat these as synonyms for windows-1250. - FM
+	     */
+	    return UCGetLYhndl_byMIME("windows-1250");
 	}
 	if ((!strncmp(UC_MIMEcharset, "ibm", 3) ||
 	     !strncmp(UC_MIMEcharset, "cp-", 3)) &&
@@ -1529,6 +1598,15 @@ PUBLIC int UCGetLYhndl_byMIME ARGS1(
 	    StrAllocCopy(cptmp, (UC_MIMEcharset + 1));
 	    cptmp[0] = 'c';
 	    cptmp[1] = 'p';
+	    if ((LYhndl = UCGetLYhndl_byMIME(cptmp)) >= 0) {
+		FREE(cptmp);
+		return LYhndl;
+	    }
+	    /*
+	     *  Try windows-NNN<...> if not yet found. - FM
+	     */
+	    StrAllocCopy(cptmp, "windows-");
+	    StrAllocCat(cptmp, (UC_MIMEcharset + 3));
 	    LYhndl = UCGetLYhndl_byMIME(cptmp);
 	    FREE(cptmp);
 	    return LYhndl;
@@ -1580,19 +1658,21 @@ PRIVATE char ** remember_allocated_LYCharSets[MAXCHARSETS];
 
 PRIVATE void UCreset_allocated_LYCharSets NOARGS
 {
-	int i=0;
-	for(;i<MAXCHARSETS;i++)
-	remember_allocated_LYCharSets[i]=NULL;
+    int i = 0;
+
+    for (; i < MAXCHARSETS; i++) {
+	remember_allocated_LYCharSets[i] = NULL;
+    }
 }
 
 PRIVATE void UCfree_allocated_LYCharSets NOARGS
 {
-    int i=0;
+    int i = 0;
 
     for (; i < MAXCHARSETS; i++) {
 	if (remember_allocated_LYCharSets[i] != NULL) {
-	FREE(remember_allocated_LYCharSets[i]);
-}
+	    FREE(remember_allocated_LYCharSets[i]);
+	}
     }
 }
 
@@ -1600,33 +1680,34 @@ PRIVATE char ** UC_setup_LYCharSets_repl ARGS2(
 	int,		UC_charset_in_hndl,
 	int,		lowest8)
 {
-  char ** ISO_Latin1 = LYCharSets[0];
-  char **p;
-  char **prepl;
-  u16 *pp;
-  char ** tp;
-  char *s7;
-  char *s8;
-  int i,j,changed;
-  u16 k;
-  u8 *ti;
+    char **ISO_Latin1 = LYCharSets[0];
+    char **p;
+    char **prepl;
+    u16 *pp;
+    char **tp;
+    char *s7;
+    char *s8;
+    int i, j, changed;
+    u16 k;
+    u8 *ti;
 
     /*
      *  Create a temporary table for reverse lookup of latin1 codes:
      */
-  tp = (char **) malloc(96 * sizeof(char *));
-  if (!tp) return NULL;
-  for (i=0; i<96; i++)
-    tp[i] = NULL;
-  ti = (u8 *) malloc(96 * sizeof(u8));
-  if (!ti) {
-    FREE(tp);
-    return NULL;
-  }
-  for (i=0; i<96; i++)
-    ti[i] = 0;
+    tp = (char **)malloc(96 * sizeof(char *));
+    if (!tp)
+	return NULL;
+    for (i = 0; i < 96; i++)
+	tp[i] = NULL;
+    ti = (u8 *)malloc(96 * sizeof(u8));
+    if (!ti) {
+	FREE(tp);
+	return NULL;
+    }
+    for (i = 0; i < 96; i++)
+	ti[i] = 0;
 
-  pp = UCInfo[UC_charset_in_hndl].unitable;
+    pp = UCInfo[UC_charset_in_hndl].unitable;
 
     /*
      *  Determine if we have any mapping of a Unicode in the range 160-255
@@ -1635,60 +1716,60 @@ PRIVATE char ** UC_setup_LYCharSets_repl ARGS2(
      */
     if (UCInfo[UC_charset_in_hndl].num_uni > 0) {
 	for (i = 0; i < 256; i++) {
-	if ((j = UCInfo[UC_charset_in_hndl].unicount[i])) {
-	  if ((k = *pp) >= 160 && k < 256 && i >= lowest8) {
-	    ti[k-160] = i;
-	  }
+	    if ((j = UCInfo[UC_charset_in_hndl].unicount[i])) {
+		if ((k = *pp) >= 160 && k < 256 && i >= lowest8) {
+		   ti[k-160] = i;
+		}
 		for (; j; j--) {
-	    pp++;
-	}
-      }
+		    pp++;
+		}
+	    }
 	}
     }
-  {
-    u16 ct;
-    struct unipair_str *list;
+    {
+	u16 ct;
+	struct unipair_str *list;
 
 	/*
 	 *  Determine if we have any mapping of a Unicode in the range
 	 *  160-255 to a replacement string for our new charset...
 	 *  Store any mappings found in tp[].
 	 */
-    ct = UCInfo[UC_charset_in_hndl].replacedesc.entry_ct;
-    list = UCInfo[UC_charset_in_hndl].replacedesc.entries;
+	ct = UCInfo[UC_charset_in_hndl].replacedesc.entry_ct;
+	list = UCInfo[UC_charset_in_hndl].replacedesc.entries;
 	while (ct--) {
-	if ((k = list->unicode) >= 160 && k < 256) {
-	  tp[k-160] = list->replace_str;
+	    if ((k = list->unicode) >= 160 && k < 256) {
+		tp[k-160] = list->replace_str;
+	    }
+	    list++;
 	}
-	list++;
-      }
-  }
+    }
     /*
      *  Now allocate a new table compatible with LYCharSets[]
      *  and with the HTMLDTD for entities.
      *  We don't know yet whether we'll keep it around. */
-  p = prepl = (char **) malloc(HTML_dtd.number_of_entities * sizeof(char *));
-  if (!p) {
+    p = prepl = (char **)malloc(HTML_dtd.number_of_entities * sizeof(char *));
+    if (!p) {
 	FREE(tp);
 	FREE(ti);
-    return NULL;
-  }
-  changed = 0;
-  for (i=0; i<HTML_dtd.number_of_entities; i++,p++) {
+	return NULL;
+    }
+    changed = 0;
+    for (i = 0; i < HTML_dtd.number_of_entities; i++, p++) {
 	/*
 	 *  For each of those entities, we check what the "old method"
 	 *  ISO_Latin1[] mapping does with them.  If it is nothing we
 	 *  want to use, just point to the SevenBitApproximations[] string.
 	 */
-    s7 = SevenBitApproximations[i];
-    s8 = ISO_Latin1[i];
-    *p = s7;
-    if (s8 && (unsigned char)(*s8) >= 160 && strlen(s8) == 1) {
+	s7 = SevenBitApproximations[i];
+	s8 = ISO_Latin1[i];
+	*p = s7;
+	if (s8 && (unsigned char)(*s8) >= 160 && strlen(s8) == 1) {
 	    /*
 	     *  We have an entity that is mapped to
 	     *  one valid eightbit latin1 char.
 	     */
-      if (ti[(unsigned char)(*s8) - 160] >= lowest8 &&
+	    if (ti[(unsigned char)(*s8) - 160] >= lowest8 &&
 		!(s7[0] == ti[(unsigned char)(*s8) - 160] &&
 		s7[1] == '\0')) {
 		/*
@@ -1697,21 +1778,21 @@ PRIVATE char ** UC_setup_LYCharSets_repl ARGS2(
 		 *   charset: either to itself...
 		 */
 		if (ti[(unsigned char)(*s8) - 160] == (unsigned char)(*s8)) {
-	  *p = s8;
+		    *p = s8;
 		} else {
 		    /*
 		     *			      ...or another byte...
 		     */
 #ifdef NOTDEFINED
-	  *p = (char *)malloc(2*sizeof(char));
-	  if (!*p) {
+		    *p = (char *)malloc(2*sizeof(char));
+		    if (!*p) {
 			FREE(tp);
 			FREE(ti);
 			FREE(prepl);
-	    return NULL;
-	  }
-	  (*p)[0] = ti[(unsigned char)(*s8) - 160];
-	  (*p)[1] = '\0';
+			return NULL;
+		    }
+		    (*p)[0] = ti[(unsigned char)(*s8) - 160];
+		    (*p)[1] = '\0';
 #else
 		    /*
 		     *  Use this instead... make those 1-char strings
@@ -1719,30 +1800,31 @@ PRIVATE char ** UC_setup_LYCharSets_repl ARGS2(
 		     *  at exit... all for the sake of preventing
 		     *  memory leaks, sigh.
 		     */
-	  static char dummy[2];	/* one char dummy string */
+		    static char dummy[2];	/* one char dummy string */
 
-	  dummy[0] = ti[(unsigned char)(*s8) - 160];
-	  *p = HTAtom_name(HTAtom_for(dummy));
-#endif /* ! NOTDEFINED */
-	}
-	changed = 1;
+		    dummy[0] = ti[(unsigned char)(*s8) - 160];
+		    *p = HTAtom_name(HTAtom_for(dummy));
+#endif /* NOTDEFINED */
+		}
+		changed = 1;
 	    } else if (tp[(unsigned char)(*s8) - 160] &&
 		       strcmp(s7, tp[(unsigned char)(*s8) - 160])) {
 		/*
 		 *  ...or which is mapped, by our "new method",
 		 *  to a replacement string for this new charset.
 		 */
-	*p = tp[(unsigned char)(*s8) - 160];
-	changed = 1;
-      }
+		*p = tp[(unsigned char)(*s8) - 160];
+		changed = 1;
+	    }
+	}
     }
-  }
-  FREE(tp); FREE(ti);
-  if (!changed) {
-    FREE(prepl);
-    return NULL;
-  }
-  return prepl;
+    FREE(tp);
+    FREE(ti);
+    if (!changed) {
+	FREE(prepl);
+	return NULL;
+    }
+    return prepl;
 }
 
 /*
@@ -1754,8 +1836,8 @@ PRIVATE int UC_Register_with_LYCharSets ARGS4(
 	CONST char *,	UC_LYNXcharset,
 	int,		lowest_eightbit)
 {
-  int i, LYhndl,found;
-  char ** repl;
+  int i, LYhndl, found;
+  char **repl;
 
   LYhndl = -1;
     if (LYNumCharsets == 0) {
@@ -1813,7 +1895,9 @@ PRIVATE int UC_Register_with_LYCharSets ARGS4(
 	found = 1;
     }
   LYCharSet_UC[LYhndl].UChndl = s;
-			   /* Can we just copy the pointer? Hope so... */
+    /*
+     *  Can we just copy the pointer?  Hope so...
+     */
   LYCharSet_UC[LYhndl].MIMEname = UC_MIMEcharset;
   LYCharSet_UC[LYhndl].enc = UCInfo[s].enc;
 
@@ -1855,8 +1939,8 @@ PUBLIC void UC_Charset_Setup ARGS8(
 	int,			lowest_eight,
 	int,			UC_rawuni)
 {
-  int s, Gn;
-  int i, status = 0, found;
+    int s, Gn;
+    int i, status = 0, found;
 
     /*
      *  Get (new?) slot.
@@ -1875,39 +1959,41 @@ PUBLIC void UC_Charset_Setup ARGS8(
 		fprintf(stderr, "UC_Charset_Setup: Too many. Ignoring %s/%s.",
 				UC_MIMEcharset, UC_LYNXcharset);
 	    }
-	return;
-      }
-    s = UCNumCharsets;
-    UCInfo[s].MIMEname = UC_MIMEcharset;
-  }
-  UCInfo[s].LYNXname = UC_LYNXcharset;
-  UCInfo[s].unicount = unicount;
-  UCInfo[s].unitable = unitable;
-  UCInfo[s].num_uni = nnuni;
-  UCInfo[s].replacedesc = replacedesc;
-  if (replacedesc.isdefault) {
-      default_UChndl = s;
-  }
-  Gn = UC_FindGN_byMIME(UC_MIMEcharset);
-  if (Gn >= 0)
-    UC_GNhandles[Gn] = s;
-  UCInfo[s].GN = Gn;
-  if (UC_rawuni == UCT_ENC_UTF8) lowest_eight = 128;  /* cheat here */
-  UCInfo[s].lowest_eight = lowest_eight;
-  UCInfo[s].enc = UC_rawuni;
+	    return;
+	}
+	s = UCNumCharsets;
+	UCInfo[s].MIMEname = UC_MIMEcharset;
+    }
+    UCInfo[s].LYNXname = UC_LYNXcharset;
+    UCInfo[s].unicount = unicount;
+    UCInfo[s].unitable = unitable;
+    UCInfo[s].num_uni = nnuni;
+    UCInfo[s].replacedesc = replacedesc;
+    if (replacedesc.isdefault) {
+	default_UChndl = s;
+    }
+    Gn = UC_FindGN_byMIME(UC_MIMEcharset);
+    if (Gn >= 0)
+	UC_GNhandles[Gn] = s;
+    UCInfo[s].GN = Gn;
+    if (UC_rawuni == UCT_ENC_UTF8)
+	lowest_eight = 128;  /* cheat here */
+    UCInfo[s].lowest_eight = lowest_eight;
+    UCInfo[s].enc = UC_rawuni;
     UCInfo[s].LYhndl = UC_Register_with_LYCharSets(s,
 						   UC_MIMEcharset,
 						   UC_LYNXcharset,
 						   lowest_eight);
-  UCInfo[s].uc_status = status;
+    UCInfo[s].uc_status = status;
     if (found < 0)
 	UCNumCharsets++;
-  return;
+    return;
 }
 
 PRIVATE void UCcleanup_mem NOARGS
 {
     int i;
+
     UCfree_allocated_LYCharSets();
     con_clear_unimap_str(0);
     con_clear_unimap_str(1);
@@ -1915,7 +2001,7 @@ PRIVATE void UCcleanup_mem NOARGS
     con_clear_unimap(1);
     for (i = 1; i < 4; i++) {	/* first one is static! */
 	FREE(inverse_translations[i]);
-}
+    }
 }
 
 PUBLIC void UCInit NOARGS
@@ -1928,19 +2014,18 @@ PUBLIC void UCInit NOARGS
 
     UC_CHARSET_SETUP_iso_8859_1;	  /* ISO Latin 1	  */
     UC_CHARSET_SETUP_iso_8859_2;	  /* ISO Latin 2	  */
+    UC_CHARSET_SETUP_windows_1252;	  /* WinLatin1 (cp1252)	  */
+    UC_CHARSET_SETUP_cp852;		  /* DosLatin2 (cp852)	  */
 
-    UC_CHARSET_SETUP_cp1252;		  /* WinLatin1 (cp1252)	  */
     UC_CHARSET_SETUP_dec_mcs;		  /* DEC Multinational    */
     UC_CHARSET_SETUP_macintosh;		  /* Macintosh (8 bit)    */
-    UC_CHARSET_SETUP_x_next;		  /* NeXT character set   */
-    UC_CHARSET_SETUP_koi8_r;		  /* KOI8-5 Cyrillic	  */
+    UC_CHARSET_SETUP_next;		  /* NeXT character set   */
+    UC_CHARSET_SETUP_koi8_r;		  /* KOI8-R Cyrillic	  */
 
     UC_CHARSET_SETUP_viscii;		  /* Vietnamese (VISCII)  */
 
     UC_CHARSET_SETUP_cp437;		  /* DosLatinUS (cp437)	  */
     UC_CHARSET_SETUP_cp850;		  /* DosLatin1 (cp850)	  */
-
-    UC_CHARSET_SETUP_cp852;		  /* DosLatin2 (cp852)	  */
     UC_CHARSET_SETUP_cp866;		  /* DosCyrillic (cp866)  */
     UC_CHARSET_SETUP_cp864;		  /* DosArabic (cp864)	  */
     UC_CHARSET_SETUP_cp737;		  /* DosGreek (cp737)	  */
@@ -1948,12 +2033,12 @@ PUBLIC void UCInit NOARGS
     UC_CHARSET_SETUP_cp869;		  /* DosGreek2 (cp869)	  */
     UC_CHARSET_SETUP_cp862;		  /* DosHebrew (cp862)	  */
 
-    UC_CHARSET_SETUP_cp1250;		  /* WinLatin2 (cp1250)	  */
-    UC_CHARSET_SETUP_cp1251;		  /* WinCyrillic (cp1251) */
+    UC_CHARSET_SETUP_windows_1250;	  /* WinLatin2 (cp1250)	  */
+    UC_CHARSET_SETUP_windows_1251;	  /* WinCyrillic (cp1251) */
     UC_CHARSET_SETUP_windows_1253;	  /* WinGreek (cp1253)	  */
     UC_CHARSET_SETUP_windows_1255;	  /* WinHebrew (cp1255)	  */
     UC_CHARSET_SETUP_windows_1256;	  /* WinArabic (cp1256)	  */
-    UC_CHARSET_SETUP_cp1257;		  /* WinBaltRim (cp1257)  */
+    UC_CHARSET_SETUP_windows_1257;	  /* WinBaltRim (cp1257)  */
 
     UC_CHARSET_SETUP_iso_8859_3;	  /* ISO Latin 3	  */
     UC_CHARSET_SETUP_iso_8859_4;	  /* ISO Latin 4	  */
diff --git a/src/chrtrans/cp1250_uni.tbl b/src/chrtrans/cp1250_uni.tbl
index 0bb7202a..41e8581d 100644
--- a/src/chrtrans/cp1250_uni.tbl
+++ b/src/chrtrans/cp1250_uni.tbl
@@ -1,8 +1,8 @@
 #The MIME name of this charset.
-Mcp1250
+Mwindows-1250
 
 #Name as a Display Charset (used on Options screen)
-OptionName WinLatin2 (cp1250)
+OWinLatin2 (cp1250)
 
 #
 #    Name:     cp1250_WinLatin2 to Unicode table
diff --git a/src/chrtrans/cp1251_uni.tbl b/src/chrtrans/cp1251_uni.tbl
index 75d7fe25..21a44414 100644
--- a/src/chrtrans/cp1251_uni.tbl
+++ b/src/chrtrans/cp1251_uni.tbl
@@ -1,5 +1,5 @@
 #The MIME name of this charset.
-Mcp1251
+Mwindows-1251
 
 #Name as a Display Charset (used on Options screen)
 OWinCyrillic (cp1251)
diff --git a/src/chrtrans/cp1252_uni.tbl b/src/chrtrans/cp1252_uni.tbl
index ced249b0..d1ce324d 100644
--- a/src/chrtrans/cp1252_uni.tbl
+++ b/src/chrtrans/cp1252_uni.tbl
@@ -3,10 +3,10 @@
 D0
 #
 #The MIME name of this charset. 
-Mcp1252
+Mwindows-1252
 
 #Name as a Display Charset (used on Options screen)
-O WinLatin1 (cp1252)
+OWinLatin1 (cp1252)
 
 #
 #    Name:     cp1252_WinLatin1 to Unicode table
diff --git a/src/chrtrans/cp1253_uni.tbl b/src/chrtrans/cp1253_uni.tbl
index 176ba7e6..83b85c56 100644
--- a/src/chrtrans/cp1253_uni.tbl
+++ b/src/chrtrans/cp1253_uni.tbl
@@ -1,5 +1,5 @@
 #The MIME name of this charset. 
-MIMEname windows-1253
+Mwindows-1253
 
 #Name as a Display Charset (used on Options screen)
 OWinGreek (cp1253)
diff --git a/src/chrtrans/cp1255_uni.tbl b/src/chrtrans/cp1255_uni.tbl
index eb446da8..47c58b6e 100644
--- a/src/chrtrans/cp1255_uni.tbl
+++ b/src/chrtrans/cp1255_uni.tbl
@@ -1,5 +1,5 @@
 #The MIME name of this charset.
-MIMEname windows-1255
+Mwindows-1255
 
 #Name as a Display Charset (used on Options screen).
 OWinHebrew (cp1255)
diff --git a/src/chrtrans/cp1256_uni.tbl b/src/chrtrans/cp1256_uni.tbl
index 900c72c3..0f43728a 100644
--- a/src/chrtrans/cp1256_uni.tbl
+++ b/src/chrtrans/cp1256_uni.tbl
@@ -1,5 +1,5 @@
 #The MIME name of this charset.
-MIMEname windows-1256
+Mwindows-1256
 
 #Name as a Display Charset (used on Options screen).
 OWinArabic (cp1256)
diff --git a/src/chrtrans/cp1257_uni.tbl b/src/chrtrans/cp1257_uni.tbl
index 03c81637..794df717 100644
--- a/src/chrtrans/cp1257_uni.tbl
+++ b/src/chrtrans/cp1257_uni.tbl
@@ -1,5 +1,5 @@
 #The MIME name of this charset. 
-Mcp1257
+Mwindows-1257
 
 #Name as a Display Charset (used on Options screen)
 OWinBaltRim (cp1257)
diff --git a/src/chrtrans/cp437_uni.tbl b/src/chrtrans/cp437_uni.tbl
index 56c937a5..41753ac7 100644
--- a/src/chrtrans/cp437_uni.tbl
+++ b/src/chrtrans/cp437_uni.tbl
@@ -6,7 +6,7 @@ D0
 Mcp437
 
 #Name as a Display Charset (used on Options screen)
-OIBM PC character set
+ODosLatinUS (cp437)
 #
 #    Name:     cp437_DOSLatinUS to Unicode table
 #    Unicode version: 1.1
@@ -18,11 +18,11 @@ OIBM PC character set
 #    General notes: none
 #
 #    Format: Three tab-separated columns
-#        Column #1 is the cp437 code (in hex)
+#        Column #1 is the cp437_DosLatinUS code (in hex)
 #        Column #2 is the Unicode (in hex as U+XXXX)
 #        Column #3 is the Unicode name (follows a comment sign, '#')
 #
-#    The entries are in cp437_DOSLatinUS order
+#    The entries are in cp437_DosLatinUS order
 #
 # some mapppings of greek letters to latin letters added,
 #  just for fun.. -kw
diff --git a/src/chrtrans/cp850_uni.tbl b/src/chrtrans/cp850_uni.tbl
index a8e66e15..30df79c0 100644
--- a/src/chrtrans/cp850_uni.tbl
+++ b/src/chrtrans/cp850_uni.tbl
@@ -6,7 +6,7 @@ D0
 Mcp850
 
 #Name as a Display Charset (used on Options screen)
-OIBM PC codepage 850 
+ODosLatin1 (cp850)
 #
 #    Name:     cp850_DOSLatin1 to Unicode table
 #    Unicode version: 1.1
diff --git a/src/chrtrans/cp852_uni.tbl b/src/chrtrans/cp852_uni.tbl
index e84454a8..ec812352 100644
--- a/src/chrtrans/cp852_uni.tbl
+++ b/src/chrtrans/cp852_uni.tbl
@@ -2,7 +2,7 @@
 Mcp852
 
 #Name as a Display Charset (used on Options screen)
-O PC Latin2 CP 852
+ODosLatin2 (cp852)
 
 #
 #    Name:     cp852_DOSLatin2 to Unicode table
diff --git a/src/chrtrans/def7_uni.tbl b/src/chrtrans/def7_uni.tbl
index 42cca597..6a3d09f0 100644
--- a/src/chrtrans/def7_uni.tbl
+++ b/src/chrtrans/def7_uni.tbl
@@ -232,6 +232,7 @@ U+0217:u)
 # IPA symbols, from
 #   Linkname: FAQ: Representing IPA Phonetics in ASCII
 #        URL: http://www.hpl.hp.com/personal/Evan_Kirshenbaum/IPA/faq.html
+#        (corrected in Russian Cyrillic area).
 # 
 0x41	U+0251 #	LATIN SMALL LETTER SCRIPT A	-> A
 U+0252:A.
@@ -418,7 +419,6 @@ U+03e1:p3
 U+03f4:'%
 U+03f5:j3
 # Cyrillic capital letters
-0x65	U+0401
 U+0402:D%
 U+0403:G%
 U+0404:IE
@@ -432,50 +432,75 @@ U+040b:Ts
 U+040c:KJ
 U+040e:V%
 U+040f:DZ
-0x61-0x62	U+0410-U+0411
-0x77	U+0412
-0x67	U+0413
-0x64-0x65	U+0414-U+0415
-0x76	U+0416
-0x7a	U+0417
-0x69-0x70	U+0418-U+041f
-0x72-0x75	U+0420-U+0423
-0x66	U+0424
-0x68	U+0425
-0x63	U+0426
-0x7e	U+0427
-0x7b	U+0428
-0x7d	U+0429
-0x27	U+042a
-0x79	U+042b
-0x78	U+042c
-0x7c	U+042d
-0x60	U+042e
-0x71	U+042f
-
-# Cyrillic small letters
-0x41-0x42	U+0430-U+0431
-0x57	U+0432
-0x47	U+0433
-0x44-0x45	U+0434-U+0435
-0x56	U+0436
-0x5a	U+0437
-0x49-0x50	U+0438-U+043f
-0x52-0x55	U+0440-U+0443
-0x46	U+0444
-0x48	U+0445
-0x43	U+0446
-0x5e	U+0447
-0x5b	U+0448
-0x5d	U+0449
-0x27	U+044a
-0x59	U+044b
-0x58	U+044c
-0x5c	U+044d
-0x40	U+044e
-0x51	U+044f
-
-0x65	U+0451	#:io
+# Russian Cyrillic letters, transliterated
+U+0401:IO
+U+0410:A
+U+0411:B
+U+0412:V
+U+0413:G
+U+0414:D
+U+0415:E
+U+0416:ZH
+U+0417:Z
+U+0418:I
+U+0419:J
+U+041a:K
+U+041b:L
+U+041c:M
+U+041d:N
+U+041e:O
+U+041f:P
+U+0420:R
+U+0421:S
+U+0422:T
+U+0423:U
+U+0424:F
+U+0425:H
+U+0426:C
+U+0427:CH
+U+0428:SH
+U+0429:SCH
+U+042a:"
+U+042b:Y
+U+042c:'
+U+042d:`E
+U+042e:JU
+U+042f:JA
+U+0430:a
+U+0431:b
+U+0432:v
+U+0433:g
+U+0434:d
+U+0435:e
+U+0436:zh
+U+0437:z
+U+0438:i
+U+0439:j
+U+043a:k
+U+043b:l
+U+043c:m
+U+043d:n
+U+043e:o
+U+043f:p
+U+0440:r
+U+0441:s
+U+0442:t
+U+0443:u
+U+0444:f
+U+0445:h
+U+0446:c
+U+0447:ch
+U+0448:sh
+U+0449:sch
+U+044a:"
+U+044b:y
+U+044c:'
+U+044d:`e
+U+044e:ju
+U+044f:ja
+U+0451:io
+# end of Russian Cyrillic letters.
+# Cyrillic small letters (and some archaic)
 U+0452:d%
 U+0453:g%
 U+0454:ie
@@ -1432,7 +1457,8 @@ U+223c:?1
 U+223e:CG
 U+2243:?-
 U+2245:?=
-U+2248:?2
+# ALMOST EQUAL TO:
+U+2248:~=
 U+224c:=?
 U+2253:HI
 U+2260:!=
@@ -1467,6 +1493,7 @@ U+2315:TR
 U+2318:88
 U+2320:Iu
 U+2321:Il
+U+2323::)
 U+2329:</
 U+232a:/>
 U+2423:Vs
diff --git a/src/chrtrans/next_uni.tbl b/src/chrtrans/next_uni.tbl
index 914a842a..55b03084 100644
--- a/src/chrtrans/next_uni.tbl
+++ b/src/chrtrans/next_uni.tbl
@@ -1,5 +1,5 @@
 #The MIME name of this charset.
-MIMEname x-next
+Mnext
 
 #Name as a Display Charset (used on Options screen)
 ONeXT character set
diff --git a/src/chrtrans/rfc_suni.tbl b/src/chrtrans/rfc_suni.tbl
index 4dd8b3f6..3d097e08 100644
--- a/src/chrtrans/rfc_suni.tbl
+++ b/src/chrtrans/rfc_suni.tbl
@@ -5,10 +5,10 @@
 # mnemonic,ds
 
 #The MIME name of this charset. 
-M mnemonic+ascii+0
+Mmnemonic+ascii+0
 
 #Name as a Display Charset (used on Options screen)
-O RFC 1345 w/o Intro
+ORFC 1345 w/o Intro
 
 # Don't fall back to default table for unicode -> 8bit
 Fallback NO
diff --git a/src/chrtrans/utf8_uni.tbl b/src/chrtrans/utf8_uni.tbl
index 84aaa000..eb120065 100644
--- a/src/chrtrans/utf8_uni.tbl
+++ b/src/chrtrans/utf8_uni.tbl
@@ -1,12 +1,13 @@
 #
 # This one is not really much of a "translation table", it mostly just
-# tells Lynx that "unicode-1-1-utf-8" is Unicode/UCS2 encoded in UTF8...
+# tells Lynx that "utf-8" is Unicode/UCS2 encoded in UTF8.  Note that
+# "unicode-1-1-utf-8" and "utf8" are treated as synonyms.
 #
 #The MIME name of this charset. 
 Mutf-8
 
 #Name as a Display Charset (used on Options screen)
-OptionName UNICODE UTF 8
+OUNICODE UTF 8
 
 # Some kind of raw Unicode?
 # Use 6 for for really "raw" 16bit UCS-2, 7 for UTF-8, ...