about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/AttrList.h8
-rw-r--r--src/GridText.c113
-rw-r--r--src/GridText.h34
-rw-r--r--src/HTFont.h6
-rw-r--r--src/HTML.c77
-rw-r--r--src/HTML.h5
-rw-r--r--src/LYCharSets.c13
-rw-r--r--src/LYCharUtils.c24
-rw-r--r--src/LYCookie.c2
-rw-r--r--src/LYCurses.c45
-rw-r--r--src/LYCurses.h4
-rw-r--r--src/LYForms.c4
-rw-r--r--src/LYGetFile.c12
-rw-r--r--src/LYHash.h5
-rw-r--r--src/LYKeymap.h178
-rw-r--r--src/LYLocal.c7
-rw-r--r--src/LYMain.c161
-rw-r--r--src/LYMainLoop.c92
-rw-r--r--src/LYNews.c3
-rw-r--r--src/LYOptions.c183
-rw-r--r--src/LYPrint.c42
-rw-r--r--src/LYReadCFG.c15
-rw-r--r--src/LYShowInfo.c47
-rw-r--r--src/LYStrings.c56
-rw-r--r--src/LYStrings.h2
-rw-r--r--src/LYStyle.c80
-rw-r--r--src/LYStyle.h6
-rw-r--r--src/LYUtils.c243
-rw-r--r--src/UCdomap.c15
-rw-r--r--src/UCdomap.h19
-rw-r--r--src/chrtrans/MAKEW32.BAT1
-rw-r--r--src/chrtrans/build-chrtrans.com2
-rw-r--r--src/chrtrans/caselower.h5
-rw-r--r--src/chrtrans/def7_uni.tbl7
-rw-r--r--src/chrtrans/entities.h1411
-rw-r--r--src/chrtrans/iso9945uni.tbl178
-rw-r--r--src/chrtrans/makefile.dos2
-rw-r--r--src/chrtrans/makefile.in4
-rw-r--r--src/makefile.in2
39 files changed, 2359 insertions, 754 deletions
diff --git a/src/AttrList.h b/src/AttrList.h
index f7bb894c..66d434cf 100644
--- a/src/AttrList.h
+++ b/src/AttrList.h
@@ -22,6 +22,7 @@ enum {
  DSTYLE_VALUE, 		/* value on the option screen */
  DSTYLE_HIGH,
  DSTYLE_CANDY,		/* possibly going to vanish */
+ DSTYLE_WHEREIS,	/* whereis search target */
  DSTYLE_ELEMENTS
 };
 
@@ -31,7 +32,7 @@ enum {
  MSTYLE_STRONG = 2,
  MSTYLE_PHYSICAL = 3,
  MSTYLE_A = 4,
- MSTYLE_A_OFF = 4, 
+ MSTYLE_A_OFF = 4,
  MSTYLE_A_ON,
  MSTYLE_BOLD,
  MSTYLE_UL,
@@ -55,6 +56,11 @@ typedef struct {
 extern void _internal_HTC PARAMS((HText * text, int style, int dir));
 #define TEMPSTRINGSIZE 256
 extern char class_string[TEMPSTRINGSIZE];
+
+/* stack of attributes during page rendering */
+extern int last_styles[128];
+extern int last_colorattr_ptr;
+
 #endif
 
 #endif
diff --git a/src/GridText.c b/src/GridText.c
index 9db4602c..a5959781 100644
--- a/src/GridText.c
+++ b/src/GridText.c
@@ -829,8 +829,10 @@ PRIVATE int display_line ARGS2(
 
 #endif
 	    case LY_SOFT_NEWLINE:
-		if (!dump_output_immediately)
+		if (!dump_output_immediately) {
 		    addch('+');
+		    i++;
+		}
 		break;
 
 	    case LY_SOFT_HYPHEN:
@@ -957,7 +959,11 @@ PRIVATE void display_title ARGS1(
     lynx_start_title_color ();
 #ifdef USE_COLOR_STYLE
 /* turn the TITLE style on */
-    LynxChangeStyle(s_title, ABS_ON, 0);
+    if (last_colorattr_ptr > 0) {
+	LynxChangeStyle(s_title, STACK_ON, 0);
+    } else {
+	LynxChangeStyle(s_title, ABS_ON, 0);
+    }
 #endif /* USE_COLOR_STYLE */
 
     /*
@@ -1053,7 +1059,7 @@ PRIVATE void display_title ARGS1(
 
 #ifdef USE_COLOR_STYLE
 /* turn the TITLE style off */
-    LynxChangeStyle(s_title, ABS_OFF, 0);
+    LynxChangeStyle(s_title, STACK_OFF, 0);
 #endif /* USE_COLOR_STYLE */
     lynx_stop_title_color ();
 
@@ -1182,6 +1188,23 @@ PRIVATE void display_page ARGS3(
     }
 
 #ifdef USE_COLOR_STYLE
+    /*
+     *  Reset stack of color attribute changes to avoid color leaking,
+     *  except if what we last displayed from this text was the previous
+     *  screenful, in which case carrying over the state might be beneficial
+     *  (although it shouldn't generally be needed any more). - kw
+     */
+    if (text->stale ||
+	line_number != text->top_of_screen + (display_lines)) {
+	last_colorattr_ptr = 0;
+    }
+#endif
+
+    text->top_of_screen = line_number;
+    display_title(text);  /* will move cursor to top of screen */
+    display_flag=TRUE;
+
+#ifdef USE_COLOR_STYLE
 #ifdef DISP_PARTIAL
     if (display_partial ||
 	line_number != text->first_lineno_last_disp_partial ||
@@ -1190,10 +1213,6 @@ PRIVATE void display_page ARGS3(
     LynxResetScreenCache();
 #endif /* USE_COLOR_STYLE */
 
-    text->top_of_screen = line_number;
-    display_title(text);  /* will move cursor to top of screen */
-    display_flag=TRUE;
-
     /*
      *  Output the page.
      */
@@ -2013,13 +2032,33 @@ PRIVATE void split_line ARGS2(
 	    spare -= 2;
 	} else if (spare && !previous->styles[spare - 1].direction) {
 	    /*
-	     *  Found an OFF change not part of a matched pair.
-	     *  Assume it is safer to leave whatever comes before
-	     *  it on the previous line alone.  Setting spare to 0
-	     *  ensures that it won't be used in a following
+	     *  Found an OFF change not part of an adjacent matched pair.
+	     *  Walk backward looking for the corresponding ON change.
+	     *  If we find it, skip the ON/OFF and everything in between.
+	     *  This can only work correctly if all changes are correctly
+	     *  nested!  If this fails, assume it is safer to leave whatever
+	     *  comes before the OFF on the previous line alone.  Setting
+	     *  spare to 0 ensures that it won't be used in a following
 	     *  iteration. - kw
 	     */
-	    spare = 0;
+	    int level=-1;
+	    int itmp;
+	    for (itmp = spare-1; itmp > 0; itmp--) {
+		if (previous->styles[itmp - 1].style
+		    == previous->styles[spare - 1].style) {
+		    if (previous->styles[itmp - 1].direction == STACK_OFF) {
+			level--;
+		    } else if (previous->styles[itmp - 1].direction == STACK_ON) {
+			if (++level == 0)
+			    break;
+		    } else
+			break;
+		}
+	    }
+	    if (level == 0)
+		spare = itmp - 1;
+	    else
+		spare = 0;
 	} else {
 	    /*
 	     *  Nothing applied, so we are done with the loop. - kw
@@ -2343,8 +2382,8 @@ PUBLIC void HText_appendCharacter ARGS2(
 	case HT_NON_BREAK_SPACE:
 		special = "HT_NON_BREAK_SPACE";
 		break;
-	case HT_EM_SPACE:
-		special = "HT_EM_SPACE";
+	case HT_EN_SPACE:
+		special = "HT_EN_SPACE";
 		break;
 	case LY_UNDERLINE_START_CHAR:
 		special = "LY_UNDERLINE_START_CHAR";
@@ -2620,7 +2659,7 @@ PUBLIC void HText_appendCharacter ARGS2(
 		    !isspace((unsigned char)line->data[i]) &&
 		    (unsigned char)line->data[i] != '-' &&
 		    (unsigned char)line->data[i] != HT_NON_BREAK_SPACE &&
-		    (unsigned char)line->data[i] != HT_EM_SPACE) {
+		    (unsigned char)line->data[i] != HT_EN_SPACE) {
 		    break;
 		}
 	    }
@@ -2660,9 +2699,9 @@ PUBLIC void HText_appendCharacter ARGS2(
     }
 
     /*
-     *  Convert EM_SPACE to a space here so that it doesn't get collapsed.
+     *  Convert EN_SPACE to a space here so that it doesn't get collapsed.
      */
-    if (ch == HT_EM_SPACE)
+    if (ch == HT_EN_SPACE)
 	ch = ' ';
 
     /*
@@ -3102,7 +3141,7 @@ PUBLIC void HText_endAnchor ARGS2(
 	 */
 	a->extent += (text->chars + last->size) - a->start -
 		     (text->Lines - a->line_num);
-	if ((unsigned) a->extent > last->size) {
+	if (a->extent > (int)last->size) {
 	    /*
 	     *  The anchor extends over more than one line,
 	     *  so set up to check the entire last line. - FM
@@ -3116,17 +3155,17 @@ PUBLIC void HText_endAnchor ARGS2(
 	    i = a->extent;
 	}
 	k = j = (last->size - i);
-	while ((unsigned) j < last->size) {
+	while (j < (int)last->size) {
 	    if (!IsSpecialAttrChar(last->data[j]) &&
 		!isspace((unsigned char)last->data[j]) &&
 		last->data[j] != HT_NON_BREAK_SPACE &&
-		last->data[j] != HT_EM_SPACE)
+		last->data[j] != HT_EN_SPACE)
 		break;
 	    i--;
 	    j++;
 	}
 	if (i == 0) {
-	    if ((unsigned) a->extent > last->size) {
+	    if (a->extent > (int)last->size) {
 		/*
 		 *  The anchor starts on a preceding line, and
 		 *  the last line has only white and special
@@ -3173,17 +3212,17 @@ PUBLIC void HText_endAnchor ARGS2(
 		 */
 		i = a->extent - CurBlankExtent;
 	    }
-	    while ((unsigned) j < prev->size) {
+	    while (j < (int)prev->size) {
 		if (!IsSpecialAttrChar(prev->data[j]) &&
 		    !isspace((unsigned char)prev->data[j]) &&
 		    prev->data[j] != HT_NON_BREAK_SPACE &&
-		    prev->data[j] != HT_EM_SPACE)
+		    prev->data[j] != HT_EN_SPACE)
 		    break;
 		i--;
 		j++;
 	    }
 	    if (i == 0) {
-		if ((unsigned) a->extent > (CurBlankExtent + prev->size) ||
+		if (a->extent > (CurBlankExtent + (int)prev->size) ||
 		    (a->extent == CurBlankExtent + (int)prev->size &&
 		     k == 0 &&
 		     prev->prev != text->last_line &&
@@ -3292,7 +3331,7 @@ PUBLIC void HText_endAnchor ARGS2(
 				text->permissible_split -= NumSize;
 			}
 			k = j + NumSize;
-			while ((unsigned) k < start->size)
+			while (k < (int)start->size)
 			    start->data[j++] = start->data[k++];
 			if (start != last)
 			    text->chars -= NumSize;
@@ -3330,7 +3369,7 @@ PUBLIC void HText_endAnchor ARGS2(
 			     */
 			    NumSize++;
 			    l = (i - j);
-			    while ((unsigned) i < prev->size)
+			    while (i < (int)prev->size)
 				prev->data[j++] = prev->data[i++];
 			    text->chars -= l;
 			    for (anc = a; anc; anc = anc->next) {
@@ -3348,7 +3387,7 @@ PUBLIC void HText_endAnchor ARGS2(
 			    }
 			    j = 0;
 			    i = k;
-			    while ((unsigned) k < start->size)
+			    while (k < (int)start->size)
 				start->data[j++] = start->data[k++];
 			    if (start != last)
 				text->chars -= i;
@@ -3407,7 +3446,7 @@ PUBLIC void HText_endAnchor ARGS2(
 			     */
 			    NumSize++;
 			    k = j + NumSize;
-			    while ((unsigned) k < prev->size)
+			    while (k < (int)prev->size)
 				prev->data[j++] = prev->data[k++];
 			    text->chars -= NumSize;
 			    for (anc = a; anc; anc = anc->next) {
@@ -4402,7 +4441,8 @@ PUBLIC int HTGetLinkOrFieldStart ARGS5(
 		max_offset = a->line_num - (HTMainText->top_of_screen -
 					    screensback * (display_lines));
 	    } else if (HTMainText->Lines - a->line_num <= (display_lines)) {
-		max_offset = a->line_num - (HTMainText->Lines - (display_lines));
+		max_offset = a->line_num - (HTMainText->Lines + 1
+					    - (display_lines));
 	    } else if (a->line_num >=
 		       HTMainText->top_of_screen+(display_lines)) {
 		int screensahead =
@@ -6289,7 +6329,7 @@ PRIVATE int HText_TrueLineSize ARGS3(
 		 ((unsigned char)(line->data[i] & 0xc0) == 0xc0)) &&
 		!isspace((unsigned char)line->data[i]) &&
 		(unsigned char)line->data[i] != HT_NON_BREAK_SPACE &&
-		(unsigned char)line->data[i] != HT_EM_SPACE) {
+		(unsigned char)line->data[i] != HT_EN_SPACE) {
 		true_size++;
 	    }
 	}
@@ -6943,7 +6983,7 @@ PUBLIC char * HText_setLastOptionValue ARGS7(
 	    cp++;
 	for (i = 0, j = 0; cp[i]; i++) {
 	    if (cp[i] == HT_NON_BREAK_SPACE ||
-		cp[i] == HT_EM_SPACE) {
+		cp[i] == HT_EN_SPACE) {
 		cp[j++] = ' ';
 	    } else if (cp[i] != LY_SOFT_HYPHEN &&
 		       !IsSpecialAttrChar((unsigned char)cp[i])) {
@@ -7821,7 +7861,7 @@ PUBLIC void HText_SubmitForm ARGS4(
 		     p && *p && !(field_has_8bit && field_has_special);
 		     p++)
 		    if ((*p == HT_NON_BREAK_SPACE) ||
-			(*p == HT_EM_SPACE) ||
+		       (*p == HT_EN_SPACE) ||
 			(*p == LY_SOFT_HYPHEN)) {
 			field_has_special = YES;
 		    } else if ((*p & 0x80) != 0) {
@@ -7831,7 +7871,7 @@ PUBLIC void HText_SubmitForm ARGS4(
 		     p && *p && !(name_has_8bit && name_has_special);
 		     p++)
 		    if ((*p == HT_NON_BREAK_SPACE) ||
-			(*p == HT_EM_SPACE) ||
+			(*p == HT_EN_SPACE) ||
 			(*p == LY_SOFT_HYPHEN)) {
 			name_has_special = YES;
 		    } else if ((*p & 0x80) != 0) {
@@ -8057,7 +8097,7 @@ PUBLIC void HText_SubmitForm ARGS4(
 			 p && *p && !(field_has_8bit && field_has_special);
 			 p++) {
 			if ((*p == HT_NON_BREAK_SPACE) ||
-			    (*p == HT_EM_SPACE) ||
+			    (*p == HT_EN_SPACE) ||
 			    (*p == LY_SOFT_HYPHEN)) {
 			    field_has_special = YES;
 			} else if ((*p & 0x80) != 0) {
@@ -8147,7 +8187,7 @@ PUBLIC void HText_SubmitForm ARGS4(
 			 p && *p && !(name_has_8bit && name_has_special);
 			 p++) {
 			if ((*p == HT_NON_BREAK_SPACE) ||
-			    (*p == HT_EM_SPACE) ||
+			    (*p == HT_EN_SPACE) ||
 			    (*p == LY_SOFT_HYPHEN)) {
 			    name_has_special = YES;
 			} else if ((*p & 0x80) != 0) {
@@ -8558,6 +8598,7 @@ PUBLIC void HText_SubmitForm ARGS4(
     }
     FREE(copied_name_used);
     if (Boundary) {
+	FREE(MultipartContentType);
 	HTSprintf(&query, "\r\n--%s--\r\n", Boundary);
     } else if (!query) {
 	StrAllocCopy(query, "");
@@ -9677,7 +9718,7 @@ PUBLIC int HText_ExtEditForm ARGS1(
     TextAnchor *end_anchor    = NULL;
     BOOLEAN	firstanchor   = TRUE;
 
-    char	ed_offset[10] = "\0";
+    char	ed_offset[10];
     int 	start_line    = 0;
     int 	entry_line    = form_link->anchor_line_num;
     int 	exit_line     = 0;
diff --git a/src/GridText.h b/src/GridText.h
index 15edf892..b431d422 100644
--- a/src/GridText.h
+++ b/src/GridText.h
@@ -13,19 +13,32 @@
 #ifndef HT_NON_BREAK_SPACE
 #define HT_NON_BREAK_SPACE	((char)1)	/* remember it */
 #endif /* !HT_NON_BREAK_SPACE */
-#ifndef HT_EM_SPACE
-#define HT_EM_SPACE		((char)2)	/* remember it */
-#endif /* !HT_EM_SPACE */
+#ifndef HT_EN_SPACE
+#define HT_EN_SPACE		((char)2)	/* remember it */
+#endif /* !HT_EN_SPACE */
 #define LY_UNDERLINE_START_CHAR	'\003'
 #define LY_UNDERLINE_END_CHAR	'\004'
+
+/* Turn about is fair play ASCII platforms use EBCDIC tab;
+   EBCDIC platforms use ASCII tab for LY_BOLD_START_CHAR.
+*/
+#ifdef EBCDIC
+#define LY_BOLD_START_CHAR	'\011'
+#else
 #define LY_BOLD_START_CHAR	'\005'
+#endif
+
 #define LY_BOLD_END_CHAR	'\006'
 #ifndef LY_SOFT_HYPHEN
 #define LY_SOFT_HYPHEN		((char)7)
 #endif /* !LY_SOFT_HYPHEN */
 #define LY_SOFT_NEWLINE 	((char)8)
 
-#define IsSpecialAttrChar(a)  ((a > '\002') && (a <= '\010'))
+#ifdef EBCDIC
+#define IsSpecialAttrChar(a)  (((a) > '\002') && ((a) <= '\011') && ((a)!='\t'))
+#else
+#define IsSpecialAttrChar(a)  (((a) > '\002') && ((a) <= '\010'))
+#endif
 
 #define TABSTOP 8
 #define SPACES  "        "  /* must be at least TABSTOP spaces long */
@@ -76,19 +89,6 @@ extern char * HTCurSelectGroupSize;
 extern HText * HTMainText;		/* Equivalent of main window */
 extern HTParentAnchor * HTMainAnchor;	/* Anchor for HTMainText */
 
-#ifdef SHORT_NAMES
-#define HText_childNumber		HTGTChNu
-#define HText_canScrollUp		HTGTCaUp
-#define HText_canScrollDown		HTGTCaDo
-#define HText_scrollUp			HTGTScUp
-#define HText_scrollDown		HTGTScDo
-#define HText_scrollTop			HTGTScTo
-#define HText_scrollBottom		HTGTScBo
-#define HText_sourceAnchors		HTGTSoAn
-#define HText_setStale			HTGTStal
-#define HText_refresh			HTGTRefr
-#endif /* SHORT_NAMES */
-
 extern int WWW_TraceFlag;
 
 #if defined(VMS) && defined(VAXC) && !defined(__DECC)
diff --git a/src/HTFont.h b/src/HTFont.h
index 61ece860..9e7a9202 100644
--- a/src/HTFont.h
+++ b/src/HTFont.h
@@ -11,9 +11,9 @@ typedef long int HTMLFont;	/* For now */
 #ifndef HT_NON_BREAK_SPACE
 #define HT_NON_BREAK_SPACE ((char)1)	/* For now */
 #endif /* !HT_NON_BREAK_SPACE */
-#ifndef HT_EM_SPACE
-#define HT_EM_SPACE ((char)2) 		/* For now */
-#endif /* !HT_EM_SPACE */
+#ifndef HT_EN_SPACE
+#define HT_EN_SPACE ((char)2)		/* For now */
+#endif /* !HT_EN_SPACE */
 
 
 #define HT_FONT		0
diff --git a/src/HTML.c b/src/HTML.c
index d3ad2038..7572ad86 100644
--- a/src/HTML.c
+++ b/src/HTML.c
@@ -605,43 +605,11 @@ PUBLIC void HTML_write ARGS3(HTStructured *, me, CONST char*, s, int, l)
 #endif /* DONT_TRACK_INTERNAL_LINKS */
 
 #ifdef USE_COLOR_STYLE
-char class_string[TEMPSTRINGSIZE];
-#endif
-
-#ifdef USE_COLOR_STYLE
 static char *Style_className = NULL;
 static char myHash[128];
 static int hcode;
 #endif
 
-#ifdef USE_COLOR_STYLE
-PRIVATE void TrimColorClass ARGS1(char *, tagname)
-{
-    char *end, *start=NULL, *lookfrom;
-    char tmp[64];
-
-    sprintf(tmp, ";%.*s", (int) sizeof(tmp) - 3, tagname);
-    strtolower(tmp);
-
-    if ((lookfrom = Style_className) != 0) {
-	do {
-	    end = start;
-	    start = strstr(lookfrom, tmp);
-	    if (start)
-		lookfrom = start + 1;
-	}
-	while (start);
-	/* trim the last matching element off the end
-	** - should match classes here as well (rp)
-	*/
-	if (end)
-	    *end='\0';
-    }
-    hcode = hash_code(lookfrom && *lookfrom ? lookfrom : &tmp[1]);
-    CTRACE(tfp, "CSS:%s (trimmed %s)\n", Style_className, tmp);
-}
-#endif /* USE_COLOR_STYLE */
-
 /*	Start Element
 **	-------------
 */
@@ -1026,10 +994,7 @@ PRIVATE void HTML_start_element ARGS6(
 		    !strcasecomp(value[HTML_LINK_REL], "Documentation") ||
 		    !strcasecomp(value[HTML_LINK_REL], "Biblioentry") ||
 		    !strcasecomp(value[HTML_LINK_REL], "Bibliography") ||
-		    !strcasecomp(value[HTML_LINK_REL], "Alternate") ||
 		    !strcasecomp(value[HTML_LINK_REL], "Start") ||
-		    !strcasecomp(value[HTML_LINK_REL], "Section") ||
-		    !strcasecomp(value[HTML_LINK_REL], "Subsection") ||
 		    !strcasecomp(value[HTML_LINK_REL], "Appendix")) {
 		    StrAllocCopy(title, value[HTML_LINK_REL]);
 		    pdoctitle = &title;	/* for setting HTAnchor's title */
@@ -1046,10 +1011,13 @@ PRIVATE void HTML_start_element ARGS6(
 		    !strcasecomp(value[HTML_LINK_REL], "Pointer") ||
 		    !strcasecomp(value[HTML_LINK_REL], "Translation") ||
 		    !strcasecomp(value[HTML_LINK_REL], "Definition") ||
+		    !strcasecomp(value[HTML_LINK_REL], "Alternate") ||
+		    !strcasecomp(value[HTML_LINK_REL], "Section") ||
+		    !strcasecomp(value[HTML_LINK_REL], "Subsection") ||
 		    !strcasecomp(value[HTML_LINK_REL], "Chapter")) {
 		    StrAllocCopy(title, value[HTML_LINK_REL]);
 		    /* not setting target HTAnchor's title, for these
-		       link of highly relative character.  Instead,
+		       links of highly relative character.  Instead,
 		       try to remember the REL attribute as a property
 		       of the link (but not the destination), in the
 		       (otherwise underused) link type in a special format;
@@ -1168,7 +1136,7 @@ PRIVATE void HTML_start_element ARGS6(
 	    value && *value[HTML_LINK_CLASS]!='\0')
 	    {
 		char *tmp = 0;
-		HTSprintf0(&tmp, "link.%s.%s.%s", value[HTML_LINK_CLASS], title, value[HTML_LINK_CLASS]);
+		HTSprintf0(&tmp, "link.%s.%s", value[HTML_LINK_CLASS], title);
 		CTRACE(tfp, "CSSTRIM:link=%s\n", tmp);
 
 		HText_characterStyle(me->text, hash_code(tmp), 1);
@@ -5303,7 +5271,8 @@ PRIVATE void HTML_start_element ARGS6(
 #else
 	HText_characterStyle(me->text, hcode, STACK_OFF);
 #endif /* USE_HASH */
-	TrimColorClass(HTML_dtd.tags[element_number].name);
+	TrimColorClass(HTML_dtd.tags[element_number].name,
+		       Style_className, &hcode);
     }
 #endif /* USE_COLOR_STYLE */
 }
@@ -6589,6 +6558,11 @@ End_Object:
 
 /* These TABLE related elements may now not be SGML_EMPTY. - kw */
     case HTML_TR:
+	if (HText_LastLineSize(me->text, FALSE)) {
+	    HText_setLastChar(me->text, ' ');  /* absorb next white space */
+	    HText_appendCharacter(me->text, '\r');
+	}
+	me->in_word = NO;
 	break;
 
     case HTML_THEAD:
@@ -6643,7 +6617,8 @@ End_Object:
 
     } /* switch */
 #ifdef USE_COLOR_STYLE
-    TrimColorClass(HTML_dtd.tags[element_number].name);
+    TrimColorClass(HTML_dtd.tags[element_number].name,
+		   Style_className, &hcode);
 
     if (!REALLY_EMPTY(element_number))
     {
@@ -7329,6 +7304,9 @@ PUBLIC HTStructured* HTML_new ARGS3(
 **	----------------------------------
 **
 **	This will convert from HTML to presentation or plain text.
+**
+**	It is registered in HTInit.c, but never actually used by lynx.
+**	- kw 1999-03-15
 */
 PUBLIC HTStream* HTMLToPlain ARGS3(
 	HTPresentation *,	pres,
@@ -7342,6 +7320,12 @@ PUBLIC HTStream* HTMLToPlain ARGS3(
 **	-----------------------------------------
 **
 **	This will preparse HTML and convert back to presentation or plain text.
+**
+**	It is registered in HTInit.c and used by lynx if invoked with
+**	-preparsed.  The stream generated here will be fed with HTML text,
+**	It feeds that to the SGML.c parser, which in turn feeds an HTMLGen.c
+**	structured stream for regenerating flat text; the latter should
+**	end up being handled as text/plain. - kw
 */
 PUBLIC HTStream* HTMLParsedPresent ARGS3(
 	HTPresentation *,	pres,
@@ -7365,10 +7349,14 @@ PUBLIC HTStream* HTMLParsedPresent ARGS3(
 	HTAnchor_setUCInfoStage(anchor, structured_cset,
 				UCT_STAGE_PARSER, UCT_SETBY_MIME);
 	if (pres->rep_out == WWW_SOURCE) {
-/*	    intermediate = HTPlainPresent(pres, anchor, NULL); */
+		/*  same effect as
+	    intermediate = HTPlainPresent(pres, anchor, NULL);
+		    just written in a more general way:
+		 */
 	    intermediate = HTStreamStack(WWW_PLAINTEXT, WWW_PRESENT,
 					 NULL, anchor);
 	} else {
+	    	/*  this too should amount to calling HTPlainPresent: */
 	    intermediate = HTStreamStack(WWW_PLAINTEXT, pres->rep_out,
 					 NULL, anchor);
 	}
@@ -7393,6 +7381,9 @@ PUBLIC HTStream* HTMLParsedPresent ARGS3(
 **	C code is like plain text but all non-preformatted code
 **	is commented out.
 **	This will convert from HTML to presentation or plain text.
+**
+**	It is registered in HTInit.c, but never actually used by lynx.
+**	- kw 1999-03-15
 */
 PUBLIC HTStream* HTMLToC ARGS3(
 	HTPresentation *,	pres GCC_UNUSED,
@@ -7414,6 +7405,7 @@ PUBLIC HTStream* HTMLToC ARGS3(
 **
 **	This will convert from HTML to presentation or plain text.
 **
+** (Comment from original libwww:)
 **	Override this if you have a windows version
 */
 #ifndef GUI
@@ -7426,6 +7418,7 @@ PUBLIC HTStream* HTMLPresent ARGS3(
 }
 #endif /* !GUI */
 
+/* (Comments from original libwww:) */
 /*	Record error message as a hypertext object
 **	------------------------------------------
 **
@@ -7444,6 +7437,10 @@ PUBLIC HTStream* HTMLPresent ARGS3(
 ** On exit,
 **	returns a negative number to indicate lack of success in the load.
 */
+/* (We don't actually do any of that hypertext stuff for errors,
+   the trivial implementation for lynx just generates a message
+   and returns. - kw 1999-03-15)
+*/
 PUBLIC int HTLoadError ARGS3(
 	HTStream *,	sink GCC_UNUSED,
 	int,		number,
diff --git a/src/HTML.h b/src/HTML.h
index c2da4189..22caa7b7 100644
--- a/src/HTML.h
+++ b/src/HTML.h
@@ -15,11 +15,6 @@
 #include <HTAnchor.h>
 #include <HTMLDTD.h>
 
-#ifdef SHORT_NAMES
-#define HTMLPresentation        HTMLPren
-#define HTMLPresent             HTMLPres
-#endif /* SHORT_NAMES */
-
 /* #define ATTR_CS_IN (me->T.output_utf8 ? me->UCLYhndl : 0) */
 #define ATTR_CS_IN me->tag_charset
 
diff --git a/src/LYCharSets.c b/src/LYCharSets.c
index 422cf121..87392050 100644
--- a/src/LYCharSets.c
+++ b/src/LYCharSets.c
@@ -825,9 +825,8 @@ PUBLIC CONST char * HTMLGetEntityName ARGS1(
 }
 
 /*
- *  Function to return the UCode_t (long int) value for entity names
- *  in the ISO_Latin1 and UC_entity_info unicode_entities arrays.
- *  It returns 0 if not found. - FM
+ *  Function to return the UCode_t (long int) value for entity names.
+ *  It returns 0 if not found.
  *
  *  unicode_entities[] handles all the names from old style entities[] too.
  *  Lynx now calls unicode_entities[] only through this function:
@@ -841,10 +840,12 @@ PUBLIC CONST char * HTMLGetEntityName ARGS1(
 PUBLIC UCode_t HTMLGetEntityUCValue ARGS1(
 	CONST char *,	name)
 {
+#include <entities.h>
+
     UCode_t value = 0;
     size_t i, high, low;
     int diff = 0;
-    CONST UC_entity_info * unicode_entities = HTML_dtd.unicode_entity_info;
+    size_t number_of_unicode_entities = sizeof(unicode_entities)/sizeof(unicode_entities[0]);
 
     /*
      *	Make sure we have a non-zero length name. - FM
@@ -856,12 +857,12 @@ PUBLIC UCode_t HTMLGetEntityUCValue ARGS1(
      *	Try UC_entity_info unicode_entities[].
      */
 #ifdef    NOT_ASCII  /* S/390 -- gil -- 1656 */
-    for (i = 0; i < HTML_dtd.number_of_unicode_entities; i++ ) {
+    for (i = 0; i < number_of_unicode_entities; i++ ) {
 	/*
 	**  Linear search for NOT_ASCII.
 	*/
 #else  /* NOT_ASCII */
-    for (low = 0, high = HTML_dtd.number_of_unicode_entities;
+    for (low = 0, high = number_of_unicode_entities;
 	 high > low;
 	 diff < 0 ? (low = i+1) : (high = i)) {
 	/*
diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c
index d4df1e23..f6ef85d3 100644
--- a/src/LYCharUtils.c
+++ b/src/LYCharUtils.c
@@ -140,7 +140,7 @@ PUBLIC void LYEntify ARGS2(
 
 /*
 **  This function trims characters <= that of a space (32),
-**  including HT_NON_BREAK_SPACE (1) and HT_EM_SPACE (2),
+**  including HT_NON_BREAK_SPACE (1) and HT_EN_SPACE (2),
 **  but not ESC, from the heads of strings. - FM
 */
 PUBLIC void LYTrimHead ARGS1(
@@ -163,7 +163,7 @@ PUBLIC void LYTrimHead ARGS1(
 
 /*
 **  This function trims characters <= that of a space (32),
-**  including HT_NON_BREAK_SPACE (1), HT_EM_SPACE (2), and
+**  including HT_NON_BREAK_SPACE (1), HT_EN_SPACE (2), and
 **  ESC from the tails of strings. - FM
 */
 PUBLIC void LYTrimTail ARGS1(
@@ -1204,7 +1204,7 @@ PUBLIC void LYExpandString ARGS2(
 	    if (plain_space || hidden) {
 		HTChunkPutc(s, ' ');
 	    } else {
-		HTChunkPutc(s, HT_EM_SPACE);
+		HTChunkPutc(s, HT_EN_SPACE);
 	    }
 	    if (me->T.decode_utf8 && *utf_buf) {
 		utf_buf[0] == '\0';
@@ -1849,7 +1849,7 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 	    if (Back) {
 		int rev_c;
 		if ((*p) == HT_NON_BREAK_SPACE ||
-		    (*p) == HT_EM_SPACE) {
+		    (*p) == HT_EN_SPACE) {
 		    if (plain_space) {
 			code = *p = ' ';
 			state = S_got_outchar;
@@ -2254,7 +2254,7 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 			code = ' ';
 			state = S_got_outchar;
 		    } else {
-			code = HT_EM_SPACE;
+			code = HT_EN_SPACE;
 			state = S_got_outchar;
 		    }
 		    break;
@@ -3442,19 +3442,7 @@ PUBLIC int LYLegitimizeHREF ARGS4(
     if (!me || !href || *href == NULL || *(*href) == '\0')
 	return(url_type);
 
-    LYTrimHead(*href);
-    if (!strncasecomp(*href, "lynxexec:", 9) ||
-	!strncasecomp(*href, "lynxprog:", 9)) {
-	/*
-	 *  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
-	 *  principles.  - FM
-	 */
-	HTUnEscapeSome(*href, " \r\n\t");
-	convert_to_spaces(*href, TRUE);
-    } else {
+    if (!LYTrimStartfile(*href)) {
 	/*
 	 *  Collapse spaces in the actual URL, but just
 	 *  protect against tabs or newlines in the
diff --git a/src/LYCookie.c b/src/LYCookie.c
index d99c0d8f..2fd26e6d 100644
--- a/src/LYCookie.c
+++ b/src/LYCookie.c
@@ -1917,7 +1917,7 @@ PUBLIC char * LYCookie ARGS4(
 		 */
 		header = scan_cookie_sublist(hostname, path, port,
 					     de->cookie_list, header, secure);
-	    } else if (de->bv == QUERY_USER) {
+	    } else if (de->bv == QUERY_USER && de->invcheck_bv == INVCHECK_QUERY) {
 		/*
 		 *  No cookies in this domain, and no default
 		 *  accept/reject choice was set by the user,
diff --git a/src/LYCurses.c b/src/LYCurses.c
index c1216e01..52371cea 100644
--- a/src/LYCurses.c
+++ b/src/LYCurses.c
@@ -34,7 +34,11 @@ extern int _NOSHARE(COLS);
 int lynx_has_color = FALSE;
 #endif
 
+#if defined(USE_COLOR_STYLE) && !USE_COLOR_TABLE
+#define COLOR_BKGD ((s_normal != NOSTYLE) ? hashStyles[s_normal].color : A_NORMAL)
+#else
 #define COLOR_BKGD ((COLOR_PAIRS >= 9) ? COLOR_PAIR(9) : A_NORMAL)
+#endif
 
 /*
  *  These are routines to start and stop curses and to cleanup
@@ -251,11 +255,6 @@ PUBLIC void LYbox ARGS2(
 #endif /* USE_SLANG */
 
 #if defined(USE_COLOR_STYLE)
-PRIVATE int last_styles[128];
-PRIVATE int last_ptr=0;
-#endif
-
-#if defined(USE_COLOR_STYLE)
 /* Ok, explanation of the USE_COLOR_STYLE styles.  The basic styles (ie non
  * HTML) are set the same as the SLANG version for ease of programming.  The
  * other styles are simply the HTML enum from HTMLDTD.h + 16.
@@ -335,8 +334,8 @@ PUBLIC void curses_w_style ARGS3(
 	{
 		/* ABS_OFF is the same as STACK_OFF for the moment */
 	case STACK_OFF:
-		if (last_ptr) {
-		    int last_attr = last_styles[--last_ptr];
+		if (last_colorattr_ptr) {
+		    int last_attr = last_styles[--last_colorattr_ptr];
 		    LYAttrset(win,last_attr,last_attr);
 		}
 		else
@@ -344,14 +343,14 @@ PUBLIC void curses_w_style ARGS3(
 		return;
 
 	case STACK_ON: /* remember the current attributes */
-		if (last_ptr > 127) {
+		if (last_colorattr_ptr > 127) {
 		    CTRACE(tfp,"........... %s (0x%x) %s\r\n",
 				"attribute cache FULL, dropping last",
-				last_styles[last_ptr],
+				last_styles[last_colorattr_ptr],
 				"in LynxChangeStyle(curses_w_style)");
-		    last_ptr--;
+		    last_colorattr_ptr--;
 		}
-		last_styles[last_ptr++] = getattrs(stdscr);
+		last_styles[last_colorattr_ptr++] = getattrs(stdscr);
 		/* don't cache style changes for active links */
 		if (style != s_alink)
 		{
@@ -1027,8 +1026,8 @@ PUBLIC BOOLEAN setup ARGS1(
 PUBLIC BOOLEAN setup ARGS1(
 	char *, 	terminal)
 {
-    static char *term_putenv;
-    char buffer[120];
+    static char term_putenv[112];
+    char buffer[108];
     char *cp;
 #if defined(HAVE_SIZECHANGE) && !defined(USE_SLANG) && defined(NOTDEFINED)
 /*
@@ -1064,7 +1063,7 @@ PUBLIC BOOLEAN setup ARGS1(
     }
 
     if (terminal != NULL) {
-	HTSprintf0(&term_putenv, "TERM=%s", terminal);
+	sprintf(term_putenv, "TERM=%.106s", terminal);
 	(void) putenv(term_putenv);
     }
 
@@ -1084,9 +1083,9 @@ PUBLIC BOOLEAN setup ARGS1(
 	if (strlen(buffer) == 0)
 	    strcpy(buffer,"vt100");
 
-	HTSprintf0(&term_putenv,"TERM=%s", buffer);
+	sprintf(term_putenv,"TERM=%.106s", buffer);
 	(void) putenv(term_putenv);
-	printf("\n%s%s\n", gettext("TERMINAL TYPE IS SET TO"), getenv("TERM"));
+	printf("\n%s %s\n", gettext("TERMINAL TYPE IS SET TO"), getenv("TERM"));
 	sleep(MESSAGESECS);
     }
 
@@ -1189,6 +1188,12 @@ PUBLIC void LYsubAttr ARGS1(
 
 PUBLIC void LYstartTargetEmphasis NOARGS
 {
+#ifdef USE_COLOR_STYLE
+    if (s_whereis != NOSTYLE) {
+	curses_style(s_whereis, STACK_ON);
+	return;
+    }
+#endif
 #if defined(FANCY_CURSES) || defined(USE_SLANG)
     start_bold();
     start_reverse();
@@ -1198,6 +1203,12 @@ PUBLIC void LYstartTargetEmphasis NOARGS
 
 PUBLIC void LYstopTargetEmphasis NOARGS
 {
+#ifdef USE_COLOR_STYLE
+    if (s_whereis != NOSTYLE) {
+	curses_style(s_whereis, STACK_OFF);
+	return;
+    }
+#endif
     stop_underline();
 #if defined(FANCY_CURSES) || defined(USE_SLANG)
     stop_reverse();
@@ -1685,11 +1696,9 @@ PUBLIC void lynx_force_repaint NOARGS
 {
 #if defined(COLOR_CURSES)
     chtype a;
-#ifndef USE_COLOR_STYLE
     if (LYShowColor >= SHOW_COLOR_ON)
 	a = COLOR_BKGD;
     else
-#endif
 	a = A_NORMAL;
     bkgdset(a | ' ');
 #ifndef USE_COLOR_STYLE
diff --git a/src/LYCurses.h b/src/LYCurses.h
index eb63fea2..cc9f5e42 100644
--- a/src/LYCurses.h
+++ b/src/LYCurses.h
@@ -325,7 +325,11 @@ extern int  lynx_chg_color PARAMS((int, int, int));
 #else /* not UNDERLINE_LINKS: */
 #define start_bold()		LYaddAttr(A_BOLD)
 #define stop_bold()		LYsubAttr(A_BOLD)
+#ifdef USE_COLOR_STYLE
+#define start_underline()	attron(A_UNDERLINE) /* allow combining - kw */
+#else
 #define start_underline()	LYaddAttr(A_UNDERLINE)
+#endif /* USE_COLOR_STYLE */
 #define stop_underline()	LYsubAttr(A_UNDERLINE)
 #endif /* UNDERLINE_LINKS */
 #if defined(SNAKE) && defined(HP_TERMINAL)
diff --git a/src/LYForms.c b/src/LYForms.c
index 6023d96b..677671ae 100644
--- a/src/LYForms.c
+++ b/src/LYForms.c
@@ -552,6 +552,8 @@ PRIVATE int get_popup_option_number ARGS2(
     default:
 	*c = *p++;
 	*rel = *p;
+    case 0:
+	break;
     }
 
     /*
@@ -1094,6 +1096,7 @@ redraw:
 		break;
 
 	    case LYK_PREV_LINK:
+	    case LYK_FASTBACKW_LINK:
 	    case LYK_UP_LINK:
 
 		if (cur_selection > 0)
@@ -1109,6 +1112,7 @@ redraw:
 		break;
 
 	    case LYK_NEXT_LINK:
+	    case LYK_FASTFORW_LINK:
 	    case LYK_DOWN_LINK:
 		if (cur_selection < num_options)
 		    cur_selection++;
diff --git a/src/LYGetFile.c b/src/LYGetFile.c
index 83ae7c62..6e7f90d3 100644
--- a/src/LYGetFile.c
+++ b/src/LYGetFile.c
@@ -246,6 +246,7 @@ Try_Redirected_URL:
 		    return(postoptions(doc));
 #endif
 
+#ifndef DISABLE_NEWS
 		} else if (url_type == NEWSPOST_URL_TYPE ||
 			   url_type == NEWSREPLY_URL_TYPE ||
 			   url_type == SNEWSPOST_URL_TYPE ||
@@ -258,6 +259,7 @@ Try_Redirected_URL:
 			HTLoadAbsolute(&WWWDoc);
 			return(NULLFILE);
 		    }
+#endif
 
 		} else if (url_type == LYNXDOWNLOAD_URL_TYPE) {
 		    LYDownload(doc->address);
@@ -489,9 +491,11 @@ Try_Redirected_URL:
 		/*
 		 *  Disable www news access if not news_ok.
 		 */
+#ifndef DISABLE_NEWS
 		} else if (url_type == NEWS_URL_TYPE && !news_ok) {
 		    HTUserMsg(NEWS_DISABLED);
 		    return(NULLFILE);
+#endif
 
 		} else if (url_type == RLOGIN_URL_TYPE) {
 		    if (!rlogin_ok) {
@@ -730,14 +734,18 @@ Try_Redirected_URL:
 				 url_type == HTTPS_URL_TYPE) ||
 				(no_goto_mailto &&
 				 url_type == MAILTO_URL_TYPE) ||
+#ifndef DISABLE_NEWS
 				(no_goto_news &&
 				 url_type == NEWS_URL_TYPE) ||
 				(no_goto_nntp &&
 				 url_type == NNTP_URL_TYPE) ||
+#endif
 				(no_goto_rlogin &&
 				 url_type == RLOGIN_URL_TYPE) ||
+#ifndef DISABLE_NEWS
 				(no_goto_snews &&
 				 url_type == SNEWS_URL_TYPE) ||
+#endif
 				(no_goto_telnet &&
 				 url_type == TELNET_URL_TYPE) ||
 				(no_goto_tn3270 &&
@@ -948,6 +956,7 @@ PUBLIC int follow_link_number ARGS4(
     int rel = 0;
     int new_top, new_link;
     BOOL want_go;
+    int curline = *num; /* passed in from mainloop() */
 
     CTRACE(tfp,"follow_link_number(%d,%d,...)\n",c,cur);
     temp[0] = c;
@@ -972,6 +981,8 @@ PUBLIC int follow_link_number ARGS4(
 	break;
     default:
 	rel = *++p;
+    case 0:
+	break;
     }
     /* don't currently check for errors typing suffix */
 
@@ -985,7 +996,6 @@ PUBLIC int follow_link_number ARGS4(
 	int npages = ((nlines + 1) > display_lines) ?
 		(((nlines + 1) + (display_lines - 1))/(display_lines))
 						    : 1;
-	int curline = doc->line; /* passed from mainloop() */
 	int curpage = ((curline + 1) > display_lines) ?
 		     (((curline + 1) + (display_lines - 1))/(display_lines))
 						      : 1;
diff --git a/src/LYHash.h b/src/LYHash.h
index c76ae994..c532a93a 100644
--- a/src/LYHash.h
+++ b/src/LYHash.h
@@ -15,7 +15,7 @@ struct _hashbucket {
 typedef struct _hashbucket bucket;
 
 #if !defined(CSHASHSIZE)
-#ifdef NOT_USED	
+#ifdef NOT_USED
 #define CSHASHSIZE 32768
 #else
 #define CSHASHSIZE 8193
@@ -32,7 +32,8 @@ extern int hash_table[CSHASHSIZE]; /* 32K should be big enough */
 
 extern int	s_alink, s_a, s_status,
 		s_label, s_value, s_high,
-		s_normal, s_alert, s_title;
+		s_normal, s_alert, s_title,
+		s_whereis;
 #define CACHEW 128
 #define CACHEH 64
 
diff --git a/src/LYKeymap.h b/src/LYKeymap.h
index bad2e226..774a9823 100644
--- a/src/LYKeymap.h
+++ b/src/LYKeymap.h
@@ -39,110 +39,110 @@ extern LYKeymap_t key_override[];
 
 /* The order of this enum must match the 'revmap[]' array in LYKeymap.c */
 typedef enum {
-    LYK_UNKNOWN=0,
-    LYK_1,
-    LYK_2,
-    LYK_3,
-    LYK_4,
-    LYK_5,
-    LYK_6,
-    LYK_7,
-    LYK_8,
-    LYK_9,
-    LYK_SOURCE,
-    LYK_RELOAD,
-    LYK_PIPE,
-    LYK_QUIT,
-    LYK_ABORT,
-    LYK_NEXT_PAGE,
-    LYK_PREV_PAGE,
-    LYK_UP_TWO,
-    LYK_DOWN_TWO,
-    LYK_UP_HALF,
-    LYK_DOWN_HALF,
-    LYK_REFRESH,
-    LYK_HOME,
-    LYK_END,
-    LYK_PREV_LINK,
-    LYK_NEXT_LINK,
-    LYK_FASTBACKW_LINK,
-    LYK_FASTFORW_LINK,
-    LYK_UP_LINK,
-    LYK_DOWN_LINK,
-    LYK_RIGHT_LINK,
-    LYK_LEFT_LINK,
-    LYK_HISTORY,
-    LYK_PREV_DOC,
-    LYK_ACTIVATE,
-    LYK_GOTO,
-    LYK_ECGOTO,
-    LYK_HELP,
-    LYK_INDEX,
-    LYK_NOCACHE,
-    LYK_INTERRUPT,
-    LYK_MAIN_MENU,
-    LYK_OPTIONS,
-    LYK_INDEX_SEARCH,
-    LYK_WHEREIS,
-    LYK_NEXT,
-    LYK_COMMENT,
-    LYK_EDIT,
-    LYK_INFO,
-    LYK_PRINT,
-    LYK_ADD_BOOKMARK,
-    LYK_DEL_BOOKMARK,
-    LYK_VIEW_BOOKMARK,
-    LYK_VLINKS,
-    LYK_SHELL,
-    LYK_DOWNLOAD,
-    LYK_TRACE_TOGGLE,
-    LYK_TRACE_LOG,
-    LYK_IMAGE_TOGGLE,
-    LYK_INLINE_TOGGLE,
-    LYK_HEAD,
-    LYK_DO_NOTHING,
-    LYK_TOGGLE_HELP,
-    LYK_JUMP,
-    LYK_KEYMAP,
-    LYK_LIST,
-    LYK_TOOLBAR,
-    LYK_HISTORICAL,
-    LYK_MINIMAL,
-    LYK_SOFT_DQUOTES,
-    LYK_RAW_TOGGLE,
-    LYK_COOKIE_JAR,
-    LYK_F_LINK_NUM,
-    LYK_CLEAR_AUTH,
-    LYK_SWITCH_DTD,
-    LYK_ELGOTO,
-    LYK_CHANGE_LINK,
-    LYK_EDIT_TEXTAREA,
-    LYK_GROW_TEXTAREA,
-    LYK_INSERT_FILE,
+    LYK_UNKNOWN=0
+  , LYK_1
+  , LYK_2
+  , LYK_3
+  , LYK_4
+  , LYK_5
+  , LYK_6
+  , LYK_7
+  , LYK_8
+  , LYK_9
+  , LYK_SOURCE
+  , LYK_RELOAD
+  , LYK_PIPE
+  , LYK_QUIT
+  , LYK_ABORT
+  , LYK_NEXT_PAGE
+  , LYK_PREV_PAGE
+  , LYK_UP_TWO
+  , LYK_DOWN_TWO
+  , LYK_UP_HALF
+  , LYK_DOWN_HALF
+  , LYK_REFRESH
+  , LYK_HOME
+  , LYK_END
+  , LYK_PREV_LINK
+  , LYK_NEXT_LINK
+  , LYK_FASTBACKW_LINK
+  , LYK_FASTFORW_LINK
+  , LYK_UP_LINK
+  , LYK_DOWN_LINK
+  , LYK_RIGHT_LINK
+  , LYK_LEFT_LINK
+  , LYK_HISTORY
+  , LYK_PREV_DOC
+  , LYK_ACTIVATE
+  , LYK_GOTO
+  , LYK_ECGOTO
+  , LYK_HELP
+  , LYK_INDEX
+  , LYK_NOCACHE
+  , LYK_INTERRUPT
+  , LYK_MAIN_MENU
+  , LYK_OPTIONS
+  , LYK_INDEX_SEARCH
+  , LYK_WHEREIS
+  , LYK_NEXT
+  , LYK_COMMENT
+  , LYK_EDIT
+  , LYK_INFO
+  , LYK_PRINT
+  , LYK_ADD_BOOKMARK
+  , LYK_DEL_BOOKMARK
+  , LYK_VIEW_BOOKMARK
+  , LYK_VLINKS
+  , LYK_SHELL
+  , LYK_DOWNLOAD
+  , LYK_TRACE_TOGGLE
+  , LYK_TRACE_LOG
+  , LYK_IMAGE_TOGGLE
+  , LYK_INLINE_TOGGLE
+  , LYK_HEAD
+  , LYK_DO_NOTHING
+  , LYK_TOGGLE_HELP
+  , LYK_JUMP
+  , LYK_KEYMAP
+  , LYK_LIST
+  , LYK_TOOLBAR
+  , LYK_HISTORICAL
+  , LYK_MINIMAL
+  , LYK_SOFT_DQUOTES
+  , LYK_RAW_TOGGLE
+  , LYK_COOKIE_JAR
+  , LYK_F_LINK_NUM
+  , LYK_CLEAR_AUTH
+  , LYK_SWITCH_DTD
+  , LYK_ELGOTO
+  , LYK_CHANGE_LINK
+  , LYK_EDIT_TEXTAREA
+  , LYK_GROW_TEXTAREA
+  , LYK_INSERT_FILE
 
 #ifdef EXP_ADDRLIST_PAGE
-    LYK_ADDRLIST,
+  , LYK_ADDRLIST
 #else
 #define LYK_ADDRLIST      LYK_ADD_BOOKMARK
 #endif
 
 #ifdef USE_EXTERNALS
-    LYK_EXTERN,
+  , LYK_EXTERN
 #endif /* !defined(USE_EXTERNALS) */
 
 #if defined(VMS) || defined(DIRED_SUPPORT)
-    LYK_DIRED_MENU,
+  , LYK_DIRED_MENU
 #else
 #define LYK_DIRED_MENU    LYK_UNKNOWN
 #endif /* VMS || DIRED_SUPPORT */
 
 #ifdef DIRED_SUPPORT
-    LYK_CREATE,
-    LYK_REMOVE,
-    LYK_MODIFY,
-    LYK_TAG_LINK,
-    LYK_UPLOAD,
-    LYK_INSTALL,
+  , LYK_CREATE
+  , LYK_REMOVE
+  , LYK_MODIFY
+  , LYK_TAG_LINK
+  , LYK_UPLOAD
+  , LYK_INSTALL
 #else
 #define LYK_TAG_LINK      LYK_UNKNOWN
 #endif /* DIRED_SUPPORT */
diff --git a/src/LYLocal.c b/src/LYLocal.c
index 5bc34d36..9626919c 100644
--- a/src/LYLocal.c
+++ b/src/LYLocal.c
@@ -329,7 +329,7 @@ PRIVATE BOOLEAN not_already_exists ARGS1(char *, name)
     return FALSE;
 }
 
-PRIVATE BOOLEAN dir_has_same_owner ARGS2(struct stat, *info, int, owner)
+PRIVATE BOOLEAN dir_has_same_owner ARGS2(struct stat *, info, int, owner)
 {
     if (S_ISDIR(info->st_mode)) {
 	if (info->st_uid == owner) {
@@ -1780,8 +1780,7 @@ PUBLIC BOOLEAN local_install ARGS3(
 	char **,	newpath)
 {
     char *tmpbuf = NULL;
-    static char savepath[512]; /* This will be the link that
-				  is to be installed. */
+    char savepath[512]; /* This will be the link that is to be installed. */
     struct stat dir_info;
     char *args[6];
     HTList *tag;
@@ -1878,6 +1877,8 @@ PUBLIC void add_menu_item ARGS1(
 	menu_head = NULL;
 
     new = (struct dired_menu *)calloc(1, sizeof(*new));
+    if (new == NULL)
+	outofmem(__FILE__, "add_menu_item");
 
     /*
      *	Conditional on tagged != NULL ?
diff --git a/src/LYMain.c b/src/LYMain.c
index 78974fa1..d0009b7c 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -185,7 +185,9 @@ PUBLIC BOOLEAN emacs_keys = EMACS_KEYS_ALWAYS_ON;
 PUBLIC int keypad_mode = DEFAULT_KEYPAD_MODE;
 PUBLIC BOOLEAN case_sensitive = CASE_SENSITIVE_ALWAYS_ON;
 PUBLIC BOOLEAN telnet_ok = TRUE;
+#ifndef DISABLE_NEWS
 PUBLIC BOOLEAN news_ok = TRUE;
+#endif
 PUBLIC BOOLEAN rlogin_ok = TRUE;
 PUBLIC BOOLEAN ftp_ok = TRUE;
 PUBLIC BOOLEAN system_editor = FALSE;
@@ -195,8 +197,10 @@ PUBLIC BOOLEAN no_externals = FALSE;
 PUBLIC BOOLEAN no_inside_telnet = FALSE;
 PUBLIC BOOLEAN no_outside_telnet = FALSE;
 PUBLIC BOOLEAN no_telnet_port = FALSE;
+#ifndef DISABLE_NEWS
 PUBLIC BOOLEAN no_inside_news = FALSE;
 PUBLIC BOOLEAN no_outside_news = FALSE;
+#endif
 PUBLIC BOOLEAN no_inside_ftp = FALSE;
 PUBLIC BOOLEAN no_outside_ftp = FALSE;
 PUBLIC BOOLEAN no_inside_rlogin = FALSE;
@@ -226,16 +230,22 @@ PUBLIC BOOLEAN no_goto_lynxcgi = FALSE;
 PUBLIC BOOLEAN no_goto_lynxexec = FALSE;
 PUBLIC BOOLEAN no_goto_lynxprog = FALSE;
 PUBLIC BOOLEAN no_goto_mailto = FALSE;
+#ifndef DISABLE_NEWS
 PUBLIC BOOLEAN no_goto_news = FALSE;
 PUBLIC BOOLEAN no_goto_nntp = FALSE;
+#endif
 PUBLIC BOOLEAN no_goto_rlogin = FALSE;
+#ifndef DISABLE_NEWS
 PUBLIC BOOLEAN no_goto_snews = FALSE;
+#endif
 PUBLIC BOOLEAN no_goto_telnet = FALSE;
 PUBLIC BOOLEAN no_goto_tn3270 = FALSE;
 PUBLIC BOOLEAN no_goto_wais = FALSE;
 PUBLIC BOOLEAN no_jump = FALSE;
 PUBLIC BOOLEAN no_file_url = FALSE;
+#ifndef DISABLE_NEWS
 PUBLIC BOOLEAN no_newspost = FALSE;
+#endif
 PUBLIC BOOLEAN no_mail = FALSE;
 PUBLIC BOOLEAN no_dotfiles = NO_DOT_FILES;
 PUBLIC BOOLEAN no_useragent = FALSE;
@@ -383,8 +393,10 @@ PUBLIC char *log_file_name = NULL; /* for WAIS log file name	in libWWW */
 PUBLIC FILE *logfile = NULL;	   /* for WAIS log file output	in libWWW */
 #endif /* DECLARE_WAIS_LOGFILES */
 
+#ifndef DISABLE_NEWS
 extern int HTNewsChunkSize; /* Number of news articles per chunk (HTNews.c) */
 extern int HTNewsMaxChunk;  /* Max news articles before chunking (HTNews.c) */
+#endif
 
 PRIVATE BOOLEAN stack_dump = FALSE;
 PRIVATE char *terminal = NULL;
@@ -393,6 +405,15 @@ PRIVATE BOOLEAN number_links = FALSE;
 PRIVATE BOOLEAN LYPrependBase = FALSE;
 PRIVATE HTList *LYStdinArgs = NULL;
 
+#ifndef EXTENDED_OPTION_LOGIC
+/* if set then '--' will be recognized as the end of options */
+#define EXTENDED_OPTION_LOGIC 1
+#endif
+
+#if EXTENDED_OPTION_LOGIC
+PRIVATE BOOLEAN no_options_further=FALSE; /* set to TRUE after '--' argument */
+#endif
+
 PRIVATE void parse_arg PARAMS((char **arg, int *i));
 PRIVATE void print_help_and_exit PARAMS((int exit_status));
 
@@ -598,6 +619,23 @@ static void FixCharacters(void)
 }
 #endif /* EBCDIC */
 
+/* these are used for matching commandline options. */
+PRIVATE int argcmp ARGS2(
+	char*,		str,
+	char*,	        what)
+{
+    if (str[0] == '-' && str[1] == '-' ) ++str;
+    return strcmp(str,what);
+}
+
+PRIVATE int argncmp ARGS2(
+	char*,		str,
+	char*,	        what)
+{
+    if (str[0] == '-' && str[1] == '-' ) ++str;
+    return strncmp(str, what, strlen(what));
+}
+
 /*
  * Wow!  Someone wants to start up Lynx.
  */
@@ -673,7 +711,7 @@ PUBLIC int main ARGS2(
      *	Act on -help NOW, so we only output the help and exit. - FM
      */
     for (i = 1; i < argc; i++) {
-	if (strncmp(argv[i], "-help", 5) == 0) {
+	if (argncmp(argv[i], "-help") == 0) {
 	    parse_arg(&argv[i], &i);
 	}
     }
@@ -736,19 +774,7 @@ PUBLIC int main ARGS2(
     AlertSecs	= (int)ALERTSECS;
     StrAllocCopy(helpfile, HELPFILE);
     StrAllocCopy(startfile, STARTFILE);
-    LYTrimHead(startfile);
-    if (!strncasecomp(startfile, "lynxexec:", 9) ||
-	!strncasecomp(startfile, "lynxprog:", 9)) {
-	/*
-	 *  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
-	 *  principles.  - FM
-	 */
-	HTUnEscapeSome(startfile, " \r\n\t");
-	convert_to_spaces(startfile, TRUE);
-    }
+    LYTrimStartfile(startfile);
     StrAllocCopy(indexfile, DEFAULT_INDEX_FILE);
     StrAllocCopy(global_type_map, GLOBAL_MAILCAP);
     StrAllocCopy(personal_type_map, PERSONAL_MAILCAP);
@@ -863,7 +889,9 @@ PUBLIC int main ARGS2(
      *	further down via lynx.cfg or the -restriction
      *	command line switch. - FM
      */
+#ifndef DISABLE_NEWS
     no_newspost = (LYNewsPosting == FALSE);
+#endif
 
     /*
      *	Set up trace, the anonymous account defaults,
@@ -873,28 +901,28 @@ PUBLIC int main ARGS2(
      *	the help menu, output that and exit. - FM
      */
     for (i = 1; i < argc; i++) {
-	if (strncmp(argv[i], "-trace", 6) == 0) {
+	if (argncmp(argv[i], "-trace") == 0) {
 	    WWW_TraceFlag = TRUE;
-	} else if (strncmp(argv[i], "-tlog", 5) == 0) {
+	} else if (argncmp(argv[i], "-tlog") == 0) {
 	    if (LYUseTraceLog) {
 		LYUseTraceLog = FALSE;
 	    } else {
 		LYUseTraceLog = TRUE;
 	    }
-	} else if (strncmp(argv[i], "-anonymous", 10) == 0) {
+	} else if (argncmp(argv[i], "-anonymous") == 0) {
 	    if (!LYValidate)
 		parse_restrictions("default");
 	    LYRestricted = TRUE;
-	} else if (strcmp(argv[i], "-validate") == 0) {
+	} else if (argcmp(argv[i], "-validate") == 0) {
 	    /*
 	     *	Follow only http URLs.
 	     */
 	    LYValidate = TRUE;
 #ifdef SOCKS
-	} else if (strncmp(argv[i], "-nosocks", 8) == 0) {
+	} else if (argncmp(argv[i], "-nosocks") == 0) {
 	    socks_flag = FALSE;
 #endif /* SOCKS */
-	} else if (strncmp(argv[i], "-cfg", 4) == 0) {
+	} else if (argncmp(argv[i], "-cfg") == 0) {
 	    if ((cp=strchr(argv[i],'=')) != NULL)
 		StrAllocCopy(lynx_cfg_file, cp+1);
 	    else {
@@ -903,7 +931,7 @@ PUBLIC int main ARGS2(
 	    }
 
 #if defined(USE_HASH)
-	} else if (strncmp(argv[i], "-lss", 4) == 0) {
+	} else if (argncmp(argv[i], "-lss") == 0) {
 	    if ((cp=strchr(argv[i],'=')) != NULL)
 		StrAllocCopy(lynx_lss_file, cp+1);
 	    else {
@@ -947,28 +975,28 @@ PUBLIC int main ARGS2(
 		buf[j] = '\0';
 	    }
 
-	    if (strncmp(buf, "-trace", 6) == 0) {
+	    if (argncmp(buf, "-trace") == 0) {
 		WWW_TraceFlag = TRUE;
-	    } else if (strncmp(buf, "-tlog", 5) == 0) {
+	    } else if (argncmp(buf, "-tlog") == 0) {
 		if (LYUseTraceLog) {
 		    LYUseTraceLog = FALSE;
 		} else {
 		    LYUseTraceLog = TRUE;
 		}
-	    } else if (strncmp(buf, "-anonymous", 10) == 0) {
+	    } else if (argncmp(buf, "-anonymous") == 0) {
 		if (!LYValidate && !LYRestricted)
 		    parse_restrictions("default");
 		LYRestricted = TRUE;
-	    } else if (strcmp(buf, "-validate") == 0) {
+	    } else if (argcmp(buf, "-validate") == 0) {
 		/*
 		 *  Follow only http URLs.
 		 */
 		LYValidate = TRUE;
 #ifdef SOCKS
-	    } else if (strncmp(buf, "-nosocks", 8) == 0) {
+	    } else if (argncmp(buf, "-nosocks") == 0) {
 		socks_flag = FALSE;
 #endif /* SOCKS */
-	    } else if (strncmp(buf, "-cfg", 4) == 0) {
+	    } else if (argncmp(buf, "-cfg") == 0) {
 		if ((cp = strchr(buf,'=')) != NULL) {
 		    StrAllocCopy(lynx_cfg_file, cp+1);
 		} else {
@@ -978,7 +1006,7 @@ PUBLIC int main ARGS2(
 			StrAllocCopy(lynx_cfg_file, cp);
 		}
 #if defined(USE_HASH)
-	    } else if (strncmp(buf, "-lss", 4) == 0) {
+	    } else if (argncmp(buf, "-lss") == 0) {
 		if ((cp = strchr(buf,'=')) != NULL) {
 		    StrAllocCopy(lynx_lss_file, cp+1);
 		} else {
@@ -990,7 +1018,7 @@ PUBLIC int main ARGS2(
 		CTRACE(tfp, "LYMain found -lss flag, lss file is %s\n",
 			lynx_lss_file ? lynx_lss_file : "<NONE>");
 #endif
-	    } else if (strcmp(buf, "-get_data") == 0) {
+	    } else if (argcmp(buf, "-get_data") == 0) {
 		/*
 		 *  User data for GET form.
 		 */
@@ -1029,7 +1057,7 @@ PUBLIC int main ARGS2(
 		    }
 		    StrAllocCat(*get_data, buf);
 		}
-	    } else if (strcmp(buf, "-post_data") == 0) {
+	    } else if (argcmp(buf, "-post_data") == 0) {
 		/*
 		 *  User data for POST form.
 		 */
@@ -1369,19 +1397,7 @@ PUBLIC int main ARGS2(
      */
     if ((cp = getenv("WWW_HOME")) != NULL) {
 	StrAllocCopy(startfile, cp);
-	LYTrimHead(startfile);
-	if (!strncasecomp(startfile, "lynxexec:", 9) ||
-	    !strncasecomp(startfile, "lynxprog:", 9)) {
-	    /*
-	     *	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
-	     *	principles.  - FM
-	     */
-	    HTUnEscapeSome(startfile, " \r\n\t");
-	    convert_to_spaces(startfile, TRUE);
-	}
+	LYTrimStartfile(startfile);
     }
 
     /*
@@ -1651,20 +1667,26 @@ PUBLIC int main ARGS2(
     if (inlocaldomain()) {
 #if !defined(HAVE_UTMP) || defined(VMS) /* not selective */
 	telnet_ok = !no_inside_telnet && !no_outside_telnet && telnet_ok;
+#ifndef DISABLE_NEWS
 	news_ok = !no_inside_news && !no_outside_news && news_ok;
+#endif
 	ftp_ok = !no_inside_ftp && !no_outside_ftp && ftp_ok;
 	rlogin_ok = !no_inside_rlogin && !no_outside_rlogin && rlogin_ok;
 #else
 	CTRACE(tfp,"LYMain.c: User in Local domain\n");
 	telnet_ok = !no_inside_telnet && telnet_ok;
+#ifndef DISABLE_NEWS
 	news_ok = !no_inside_news && news_ok;
+#endif
 	ftp_ok = !no_inside_ftp && ftp_ok;
 	rlogin_ok = !no_inside_rlogin && rlogin_ok;
 #endif /* !HAVE_UTMP || VMS */
     } else {
 	CTRACE(tfp,"LYMain.c: User in REMOTE domain\n");
 	telnet_ok = !no_outside_telnet && telnet_ok;
+#ifndef DISABLE_NEWS
 	news_ok = !no_outside_news && news_ok;
+#endif
 	ftp_ok = !no_outside_ftp && ftp_ok;
 	rlogin_ok = !no_outside_rlogin && rlogin_ok;
     }
@@ -2179,19 +2201,7 @@ static int homepage_fun ARGS3(
 {
     if (next_arg != 0) {
 	StrAllocCopy(homepage, next_arg);
-	LYTrimHead(homepage);
-	if (!strncasecomp(homepage, "lynxexec:", 9) ||
-	    !strncasecomp(homepage, "lynxprog:", 9)) {
-	    /*
-	     *  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
-	     *  principles.  - FM
-	     */
-	    HTUnEscapeSome(homepage, " \r\n\t");
-	    convert_to_spaces(homepage, TRUE);
-	}
+	LYTrimStartfile(homepage);
     }
     return 0;
 }
@@ -2213,6 +2223,7 @@ static int mime_header_fun ARGS3(
     return 0;
 }
 
+#ifndef DISABLE_NEWS
 /* -newschunksize */
 static int newschunksize_fun ARGS3(
 	Parse_Args_Type *,	p GCC_UNUSED,
@@ -2248,6 +2259,7 @@ static int newsmaxchunk_fun ARGS3(
     }
     return 0;
 }
+#endif /* not DISABLE_NEWS */
 
 /* -nobrowse */
 static int nobrowse_fun ARGS3(
@@ -2750,6 +2762,7 @@ keys (may be incompatible with some curses packages)"
       "minimal",	TOGGLE_ARG,		&minimal_comments,
       "toggles minimal versus valid comment parsing"
    ),
+#ifndef DISABLE_NEWS
    PARSE_FUN(
       "newschunksize",	NEED_FUNCTION_ARG,	newschunksize_fun,
       "=NUMBER\nnumber of articles in chunked news listings"
@@ -2758,6 +2771,7 @@ keys (may be incompatible with some curses packages)"
       "newsmaxchunk",	NEED_FUNCTION_ARG,	newsmaxchunk_fun,
       "=NUMBER\nmaximum news articles in listings before chunking"
    ),
+#endif
    PARSE_FUN(
       "nobrowse",	FUNCTION_ARG,		nobrowse_fun,
       "disable directory browsing"
@@ -3039,9 +3053,11 @@ in double-quotes (\"-\") on VMS)", NULL);
 	switch (p->type & ARG_TYPE_MASK) {
 	    case TOGGLE_ARG:
 	    case SET_ARG:
-	    case UNSET_ARG:
 		sprintf(temp, "%s", *(q->set_value) ? "on" : "off");
 		break;
+	    case UNSET_ARG:
+		sprintf(temp, "%s", *(q->set_value) ? "off" : "on");
+		break;
 	    case INT_ARG:
 		sprintf(temp, "%d", *(q->int_value));
 		break;
@@ -3118,23 +3134,22 @@ PRIVATE void parse_arg ARGS2(
     /*
      *	Check for a command line startfile. - FM
      */
-    if (*arg_name != '-') {
+#if !EXTENDED_OPTION_LOGIC
+    if (*arg_name != '-')
+#else
+    if (*arg_name != '-' || no_options_further == TRUE )
+#endif
+    {
 	StrAllocCopy(startfile, arg_name);
-	LYTrimHead(startfile);
-	if (!strncasecomp(startfile, "lynxexec:", 9) ||
-	    !strncasecomp(startfile, "lynxprog:", 9)) {
-	    /*
-	     *	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
-	     *	principles.  - FM
-	     */
-	    HTUnEscapeSome(startfile, " \r\n\t");
-	    convert_to_spaces(startfile, TRUE);
-	}
+	LYTrimStartfile(startfile);
 	return;
     }
+#if EXTENDED_OPTION_LOGIC
+    if (strcmp(arg_name,"--") == 0) {
+	no_options_further = TRUE;
+	return;
+    }
+#endif
 
     /* lose the first '-' character */
     arg_name++;
@@ -3147,6 +3162,10 @@ PRIVATE void parse_arg ARGS2(
     if (*arg_name == 0)
 	return;
 
+    /* allow GNU-style options with -- prefix*/
+    if (*arg_name == '-') ++arg_name;
+
+
     p = Arg_Table;
     while (p->name != 0) {
 #ifdef PARSE_DEBUG
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index 18cc9044..645b4f6b 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -1,6 +1,5 @@
 #include <HTUtils.h>
 #include <HTAccess.h>
-#include <HTParse.h>
 #include <HTList.h>
 #include <HTML.h>
 #include <HTFTP.h>
@@ -1830,7 +1829,7 @@ new_cmd:  /*
 	    /* pass cur line num for use in follow_link_number()
 	     * Note: Current line may not equal links[cur].line
 	     */
-	    newdoc.line = curdoc.line;
+	    number = curdoc.line;
 	    switch (follow_link_number(c, lindx, &newdoc, &number)) {
 	    case DO_LINK_STUFF:
 		/*
@@ -2525,7 +2524,7 @@ new_cmd:  /*
 	    } else if (more &&	/* need a later page */
 		       HTGetLinkOrFieldStart(curdoc.link,
 					     &Newline, &newdoc.link,
-					     +1, TRUE) != NO) {
+					     1, TRUE) != NO) {
 		Newline++;	/* our line counting starts with 1 not 0 */
 		/* nothing more to do here */
 
@@ -3422,7 +3421,7 @@ new_cmd:  /*
 	    LYstrncpy(user_input_buffer,
 		      ((links[curdoc.link].type == WWW_FORM_LINK_TYPE)
 						?
-	 links[curdoc.link].form->submit_action : links[curdoc.link].lname),
+	    links[curdoc.link].form->submit_action : links[curdoc.link].lname),
 		      (sizeof(user_input_buffer) - 1));
 
 	    /*
@@ -3436,19 +3435,7 @@ new_cmd:  /*
 		       ((links[curdoc.link].type == WWW_FORM_LINK_TYPE)
 				? links[curdoc.link].form->submit_action
 				: links[curdoc.link].lname))) {
-		LYTrimHead(user_input_buffer);
-		if (!strncasecomp(user_input_buffer, "lynxexec:", 9) ||
-		    !strncasecomp(user_input_buffer, "lynxprog:", 9)) {
-		    /*
-		     *	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
-		     *	principles.  - FM
-		     */
-		    HTUnEscapeSome(user_input_buffer, " \r\n\t");
-		    convert_to_spaces(user_input_buffer, TRUE);
-		} else {
+		if (!LYTrimStartfile(user_input_buffer)) {
 		    LYRemoveBlanks(user_input_buffer);
 		}
 		if (user_input_buffer[0] != '\0') {
@@ -3520,19 +3507,7 @@ new_cmd:  /*
 				sizeof(user_input_buffer), RECALL)) >= 0) &&
 		user_input_buffer[0] != '\0' &&
 		strcmp(user_input_buffer, curdoc.address)) {
-		LYTrimHead(user_input_buffer);
-		if (!strncasecomp(user_input_buffer, "lynxexec:", 9) ||
-		    !strncasecomp(user_input_buffer, "lynxprog:", 9)) {
-		    /*
-		     *	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
-		     *	principles.  - FM
-		     */
-		    HTUnEscapeSome(user_input_buffer, " \r\n\t");
-		    convert_to_spaces(user_input_buffer, TRUE);
-		} else {
+		if (!LYTrimStartfile(user_input_buffer)) {
 		    LYRemoveBlanks(user_input_buffer);
 		}
 		if (user_input_buffer[0] != '\0') {
@@ -3592,19 +3567,7 @@ check_recall:
 	    /*
 	     *	Get rid of leading spaces (and any other spaces).
 	     */
-	    LYTrimHead(user_input_buffer);
-	    if (!strncasecomp(user_input_buffer, "lynxexec:", 9) ||
-		!strncasecomp(user_input_buffer, "lynxprog:", 9)) {
-		/*
-		 *  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
-		 *  principles.  - FM
-		 */
-		HTUnEscapeSome(user_input_buffer, " \r\n\t");
-		convert_to_spaces(user_input_buffer, TRUE);
-	    } else {
+	    if (!LYTrimStartfile(user_input_buffer)) {
 		LYRemoveBlanks(user_input_buffer);
 	    }
 	    if (*user_input_buffer == '\0' &&
@@ -3771,6 +3734,7 @@ check_goto_URL:
 		       !strncmp(user_input_buffer, "mailto:", 7)) {
 		HTUserMsg(GOTO_MAILTO_DISALLOWED);
 
+#ifndef DISABLE_NEWS
 	    } else if (no_goto_news &&
 		       !strncmp(user_input_buffer, "news:", 5)) {
 		HTUserMsg(GOTO_NEWS_DISALLOWED);
@@ -3778,14 +3742,17 @@ check_goto_URL:
 	    } else if (no_goto_nntp &&
 		       !strncmp(user_input_buffer, "nntp:", 5)) {
 		HTUserMsg(GOTO_NNTP_DISALLOWED);
+#endif
 
 	    } else if (no_goto_rlogin &&
 		       !strncmp(user_input_buffer, "rlogin:", 7)) {
 		HTUserMsg(GOTO_RLOGIN_DISALLOWED);
 
+#ifndef DISABLE_NEWS
 	    } else if (no_goto_snews &&
 		       !strncmp(user_input_buffer, "snews:", 6)) {
 		HTUserMsg(GOTO_SNEWS_DISALLOWED);
+#endif
 
 	    } else if (no_goto_telnet &&
 		       !strncmp(user_input_buffer, "telnet:", 7)) {
@@ -4019,15 +3986,13 @@ if (!LYUseFormsOptions) {
 #endif /* !NO_OPTION_MENU */
 #ifndef NO_OPTION_FORMS
 	    /*
-	     * FIXME: Blatantly stolen from LYK_PRINT below.
-	     * how much is really valid here?  I don't know the
-	     * innards well enough. MRC
+	     * FIXME: Blatantly stolen from LYK_PRINT below,
+	     * except ForcePush special.
 	     */
 	    /*
 	     *	Don't do if already viewing options page.
 	     */
-	    if (strcmp((curdoc.title ? curdoc.title : ""),
-		       OPTIONS_TITLE)) {
+	    if (strcmp((curdoc.title ? curdoc.title : ""), OPTIONS_TITLE)) {
 
 		if (gen_options(&newdoc.address) < 0)
 		    break;
@@ -4042,12 +4007,12 @@ if (!LYUseFormsOptions) {
 		refresh_screen = TRUE;	/* redisplay */
 
 		/*
-		 * FIXME:  this is a temporary solution until we find the
-		 * correct place for this command to reload the document
+		 * FIXME:  this was a temporary solution until we find the
+		 * correct place in postoptions() to reload the document
 		 * before the 'options menu' only when (few) important options
 		 * were changed.
 		 */
-		HTuncache_current_document();
+/*             HTuncache_current_document(); */
 	    }
 #endif /* !NO_OPTION_FORMS */
 	    break;
@@ -5218,6 +5183,14 @@ check_add_bookmark_to_self:
 			    }
 			    break;
 			}
+			if (!strncmp(links[curdoc.link].form->submit_action,
+				"LYNXOPTIONS:", 12)) {
+			    if (old_c != real_c) {
+				old_c = real_c;
+				HTUserMsg(NO_DOWNLOAD_SPECIAL);
+			    }
+			    break;
+			}
 			HTOutputFormat = HTAtom_for("www/download");
 			LYforce_no_cache = TRUE;
 			cmd = LYK_ACTIVATE;
@@ -5711,20 +5684,7 @@ check_add_bookmark_to_self:
 			}
 #endif /* PERMIT_GOTO_FROM_JUMP */
 			ret = HTParse(ret, startfile, PARSE_ALL);
-			LYTrimHead(ret);
-			if (!strncasecomp(ret, "lynxexec:", 9) ||
-			    !strncasecomp(ret, "lynxprog:", 9)) {
-			    /*
-			     *	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 principles.
-			     *	- FM
-			     */
-			    HTUnEscapeSome(ret, " \r\n\t");
-			    convert_to_spaces(ret, TRUE);
-			} else {
+			if (!LYTrimStartfile(ret)) {
 			    LYRemoveBlanks(user_input_buffer);
 			}
 			StrAllocCopy(newdoc.address, ret);
@@ -5753,7 +5713,9 @@ check_add_bookmark_to_self:
 		    FREE(proxyauth_info[0]);
 		    FREE(proxyauth_info[1]);
 		    HTClearHTTPAuthInfo();
+#ifndef DISABLE_NEWS
 		    HTClearNNTPAuthInfo();
+#endif
 		    HTClearFTPPassword();
 		    HTUserMsg(AUTH_INFO_CLEARED);
 		} else {
diff --git a/src/LYNews.c b/src/LYNews.c
index 6b988b55..1c4cd6ad 100644
--- a/src/LYNews.c
+++ b/src/LYNews.c
@@ -1,4 +1,5 @@
 #include <HTUtils.h>
+#ifndef DISABLE_NEWS
 #include <HTParse.h>
 #include <HTAccess.h>
 #include <HTCJK.h>
@@ -468,3 +469,5 @@ PRIVATE void terminate_message ARGS1(
     refresh();
 #endif /* VMS */
 }
+
+#endif /* not DISABLE_NEWS */
diff --git a/src/LYOptions.c b/src/LYOptions.c
index d4b627e3..6079cd9d 100644
--- a/src/LYOptions.c
+++ b/src/LYOptions.c
@@ -1,5 +1,6 @@
 #include <HTUtils.h>
 #include <HTFTP.h>
+#include <HTTP.h>  /* 'reloading' flag */
 #include <HTML.h>
 #include <LYCurses.h>
 #include <LYUtils.h>
@@ -1805,6 +1806,7 @@ PRIVATE int boolean_choice ARGS4(
 		case LYK_UP_HALF:
 		case LYK_UP_TWO:
 		case LYK_PREV_LINK:
+		case LYK_FASTBACKW_LINK:
 		case LYK_UP_LINK:
 		case LYK_LEFT_LINK:
 		    if (cur_choice == 0)
@@ -3495,14 +3497,6 @@ PRIVATE PostPair * break_data ARGS1(
  * post_data here, but bring along everything just in case.  It's only a
  * pointer.  MRC
  *
- * By changing the certain options value (like preferred language or
- * fake browser name) we need to inform the remote server and reload
- * (uncache on a proxy) the document which was active just before
- * the Options menu was invoked.  Another values (like display_char_set
- * or assume_char_set) used by lynx initial rendering stages
- * and can only be changed after reloading :-(
- * So we introduce boolean flag 'need_reload' (currently dummy).
- *
  * Options are processed in order according to gen_options(), we should not
  * depend on it and add boolean flags where the order is essential (save,
  * character sets...)
@@ -3511,13 +3505,30 @@ PRIVATE PostPair * break_data ARGS1(
  * conditions.  We *should* duplicate the same conditions here in postoptions()
  * to prevent user with a limited access from editing HTML options code
  * manually (e.g., doing 'e'dit in 'o'ptions) and submit it to access the
- * restricted items. Prevent spoofing attempts from index overrun. - LP
+ * restricted items.  Prevent spoofing attempts from index overrun. - LP
+ *
+ * Exit status: NULLFILE (reloading) or NORMAL (from HText cache).
+ *
+ * On exit, got the document which was current before the Options menu:
+ *
+ *   (from cache) nothing changed or no visual effect supposed:
+ *             editor name, e-mail, etc.
+ *
+ *   (reload locally) to see the effect of certain changes:
+ *             display_char_set, assume_charset, etc.
+ *             (use 'need_reload' flag where necessary).
+ *
+ *   (reload from remote server and uncache on a proxy)
+ *             few options changes should be transferred to remote server:
+ *             preferred language, fake browser name, etc.
+ *             (use 'need_end_reload' flag).
  */
 
 PUBLIC int postoptions ARGS1(
     document *, 	newdoc)
 {
     PostPair *data = 0;
+    DocAddress WWWDoc;  /* need on exit */
     int i;
     int code;
     BOOLEAN save_all = FALSE;
@@ -3525,6 +3536,7 @@ PUBLIC int postoptions ARGS1(
     BOOLEAN raw_mode_old = LYRawMode;
     BOOLEAN assume_char_set_changed = FALSE;
     BOOLEAN need_reload = FALSE;
+    BOOLEAN need_end_reload = FALSE;
 #if defined(USE_SLANG) || defined(COLOR_CURSES)
     int CurrentShowColor = LYShowColor;
 #endif
@@ -3613,7 +3625,12 @@ PUBLIC int postoptions ARGS1(
 
 	/* Keypad Mode: SELECT */
 	if (!strcmp(data[i].tag, keypad_mode_string)) {
-	    GetOptValues(keypad_mode_values, data[i].value, &keypad_mode);
+	    int newval;
+	    if (GetOptValues(keypad_mode_values, data[i].value, &newval)
+		 && keypad_mode != newval) {
+		keypad_mode = newval;
+		need_reload = TRUE;
+	    }
 	}
 
 	/* Line edit style: SELECT */
@@ -3653,8 +3670,11 @@ PUBLIC int postoptions ARGS1(
 	/* HTML error tolerance: SELECT */
 	if (!strcmp(data[i].tag, DTD_recovery_string)
 	 && GetOptValues(DTD_type_values, data[i].value, &code)) {
-	    Old_DTD = code;
-	    HTSwitchDTD(!Old_DTD);
+	    if (Old_DTD != code) {
+		Old_DTD = code;
+		HTSwitchDTD(!Old_DTD);
+		need_reload = TRUE;
+	    }
 	}
 
 	/* Select Popups: ON/OFF */
@@ -3696,21 +3716,30 @@ PUBLIC int postoptions ARGS1(
 
 	/* Show Images: SELECT */
 	if (!strcmp(data[i].tag, images_string)) {
-	    if (!strcmp(data[i].value, images_ignore_all_string)) {
-		pseudo_inline_alts = FALSE;
-		clickable_images = FALSE;
-	    } else if (!strcmp(data[i].value, images_use_label_string)) {
-		pseudo_inline_alts = TRUE;
-		clickable_images = FALSE;
-	    } else if (!strcmp(data[i].value, images_use_links_string)) {
+	    if (!strcmp(data[i].value, images_ignore_all_string)
+			&& !(pseudo_inline_alts == FALSE && clickable_images == FALSE)) {
+		 pseudo_inline_alts = FALSE;
+		 clickable_images = FALSE;
+		need_reload = TRUE;
+	    } else if (!strcmp(data[i].value, images_use_label_string)
+			&& !(pseudo_inline_alts == TRUE && clickable_images == FALSE)) {
+		 pseudo_inline_alts = TRUE;
+		 clickable_images = FALSE;
+		need_reload = TRUE;
+	    } else if (!strcmp(data[i].value, images_use_links_string)
+			&& !(clickable_images == TRUE)) {
 		clickable_images = TRUE;
+		need_reload = TRUE;
 	    }
 	}
 
 	/* Verbose Images: ON/OFF */
 	if (!strcmp(data[i].tag, verbose_images_string)
-        && GetOptValues(verbose_images_type_values, data[i].value, &code)) {
-	   verbose_img = code;
+	 && GetOptValues(verbose_images_type_values, data[i].value, &code)) {
+	    if (verbose_img != code) {
+		verbose_img = code;
+		need_reload = TRUE;
+	    }
 	}
 
 	/* VI Keys: ON/OFF */
@@ -3773,8 +3802,8 @@ PUBLIC int postoptions ARGS1(
 
 	/* Raw Mode: ON/OFF */
 	if (!strcmp(data[i].tag, raw_mode_string)
-        && GetOptValues(bool_values, data[i].value, &code)) {
-	   LYRawMode = code;
+	 && GetOptValues(bool_values, data[i].value, &code)) {
+	    LYRawMode = code;
 	}
 
 	/*
@@ -3799,28 +3828,37 @@ PUBLIC int postoptions ARGS1(
 
 	/* Preferred Document Character Set: INPUT */
 	if (!strcmp(data[i].tag, preferred_doc_char_string)) {
-	    FREE(pref_charset);
-	    StrAllocCopy(pref_charset, data[i].value);
+	    if (strcmp(pref_charset, data[i].value)) {
+		FREE(pref_charset);
+		StrAllocCopy(pref_charset, data[i].value);
+		need_end_reload = TRUE;
+	   }
 	}
 
 	/* Preferred Document Language: INPUT */
 	if (!strcmp(data[i].tag, preferred_doc_lang_string)) {
-	    FREE(language);
-	    StrAllocCopy(language, data[i].value);
+	    if (strcmp(language, data[i].value)) {
+		FREE(language);
+		StrAllocCopy(language, data[i].value);
+		need_end_reload = TRUE;
+	    }
 	}
 
 	/* User Agent: INPUT */
 	if (!strcmp(data[i].tag, user_agent_string) && (!no_useragent)) {
-	    FREE(LYUserAgent);
-	    /* ignore Copyright warning ? */
-	    StrAllocCopy(LYUserAgent,
-	    	*(data[i].value)
-	    	? data[i].value
-		: LYUserAgentDefault);
-	    if (LYUserAgent && *LYUserAgent &&
-		!strstr(LYUserAgent, "Lynx") &&
-		!strstr(LYUserAgent, "lynx")) {
-		HTAlert(UA_COPYRIGHT_WARNING);
+	    if (strcmp(LYUserAgent, data[i].value)) {
+		need_end_reload = TRUE;
+		FREE(LYUserAgent);
+		/* ignore Copyright warning ? */
+		StrAllocCopy(LYUserAgent,
+		   *(data[i].value)
+		   ? data[i].value
+		   : LYUserAgentDefault);
+		if (LYUserAgent && *LYUserAgent &&
+		   !strstr(LYUserAgent, "Lynx") &&
+		   !strstr(LYUserAgent, "lynx")) {
+		    HTAlert(UA_COPYRIGHT_WARNING);
+		}
 	    }
 	}
     } /* end of loop */
@@ -3870,12 +3908,75 @@ PUBLIC int postoptions ARGS1(
 	    HTAlert(OPTIONS_NOT_SAVED);
 	}
     }
-    LYpop(newdoc);  /* return to previous doc, not to options menu! */
 
-    if (need_reload == TRUE)  {
-	/* FIXME: currently dummy */
+    /*
+     *  Exit: working around the previous document.
+     */
+    CTRACE(tfp, "\nLYOptions.c/postoptions(): exiting...\n");
+
+    /*  Options menu was pushed before postoptions(), so pop-up. */
+    LYpop(newdoc);
+    WWWDoc.address = newdoc->address;
+    WWWDoc.post_data = newdoc->post_data;
+    WWWDoc.post_content_type = newdoc->post_content_type;
+    WWWDoc.bookmark = newdoc->bookmark;
+    WWWDoc.isHEAD = newdoc->isHEAD;
+    WWWDoc.safe = newdoc->safe;
+    if (!HTLoadAbsolute(&WWWDoc))
+	return(NOT_FOUND);
+
+    /*** two HTLoadAbsolute() here allow things work correctly,
+     *** sorry for overhead (probably only seen in trace log).
+     ***/
+
+    /*
+     *  Return to previous doc, not to options menu!
+     *  Reload the document we had before the options menu
+     *  but uncache only when necessary (Hurrah, user!):
+     */
+    LYpop(newdoc);
+    WWWDoc.address = newdoc->address;
+    WWWDoc.post_data = newdoc->post_data;
+    WWWDoc.post_content_type = newdoc->post_content_type;
+    WWWDoc.bookmark = newdoc->bookmark;
+    WWWDoc.isHEAD = newdoc->isHEAD;
+    WWWDoc.safe = newdoc->safe;
+    if (!HTLoadAbsolute(&WWWDoc))
+       return(NOT_FOUND);
+
+    /*  force end-to-end reload from remote server if change LYUserAgent
+     *  or language or pref_charset (marked by need_end_reload flag above),
+     *  from old-style LYK_OPTIONS (mainloop):
+     */
+    if ((need_end_reload == TRUE &&
+	 (strncmp(newdoc->address, "http", 4) == 0 ||
+	  strncmp(newdoc->address, "lynxcgi:", 8) == 0))) {
+	/*
+	 *  An option has changed which may influence
+	 *  content negotiation, and the resource is from
+	 *  a http or https or lynxcgi URL (the only protocols
+	 *  which currently do anything with this information).
+	 *  Set reloading = TRUE so that proxy caches will be
+	 *  flushed, which is necessary until the time when
+	 *  all proxies understand HTTP 1.1 Vary: and all
+	 *  Servers properly use it...  Treat like
+	 *  case LYK_RELOAD (see comments there). - KW
+	 */
+	reloading = TRUE;  /* global flag */
+	need_reload = TRUE;
+    }
+
+    if (need_reload == TRUE) {
+	/*  update HText cache */
+	HTuncache_current_document();
+	LYpush(newdoc, FALSE);
+	CTRACE(tfp, "LYOptions.c/postoptions(): now really exit.\n\n");
+	return(NULLFILE);
+    } else {
+	/*  no uncache, already loaded */
+	CTRACE(tfp, "LYOptions.c/postoptions(): now really exit.\n\n");
+	return(NORMAL);
     }
-    return(NULLFILE);
 }
 
 PRIVATE char *NewSecureValue NOARGS
diff --git a/src/LYPrint.c b/src/LYPrint.c
index 0bcdbe0c..045a8b6b 100644
--- a/src/LYPrint.c
+++ b/src/LYPrint.c
@@ -174,7 +174,7 @@ PRIVATE int RecallFilename ARGS5(
 	BOOLEAN *,	first,
 	int *,		now,
 	int *,		total,
-	int,            flag)
+	int,		flag)
 {
     int ch;
     char *cp;
@@ -1393,13 +1393,13 @@ check_recall:
      */
 #ifdef VMS
     if (0 == strncasecomp (fbuf, "sys$disk:", 9)) {
-        if (0 == strncmp ((fbuf+9), "[]", 2)) {
+	if (0 == strncmp ((fbuf+9), "[]", 2)) {
 	    HTAddSugFilename (fbuf+11);
-        } else {
+	} else {
 	    HTAddSugFilename (fbuf+9);
-        }
+	}
     } else {
-        HTAddSugFilename (fbuf);
+	HTAddSugFilename (fbuf);
     }
 #else
     HTAddSugFilename (fbuf);
@@ -1409,28 +1409,32 @@ check_recall:
      *  Expand tilde's, make filename absolute, etc.
      */
     if (!LYValidateFilename (tbuf, fbuf))
-        goto quit;
+	goto quit;
 
     /*
      *  Check for file existence; readability.
      */
     if ((stat (tbuf, &stat_info) < 0) ||
-	(!(S_ISREG(stat_info.st_mode) || S_ISLNK(stat_info.st_mode)))) {
-        HTInfoMsg (FILE_DOES_NOT_EXIST);
-        _statusline(FILE_DOES_NOT_EXIST_RE);
-        FirstRecall = TRUE;
-        FnameNum    = FnameTotal;
-        goto retry;
+       (!(S_ISREG(stat_info.st_mode)
+#ifdef S_IFLNK
+	 || S_ISLNK(stat_info.st_mode)
+#endif /* S_IFLNK */
+	))) {
+	HTInfoMsg (FILE_DOES_NOT_EXIST);
+	_statusline(FILE_DOES_NOT_EXIST_RE);
+	FirstRecall = TRUE;
+	FnameNum    = FnameTotal;
+	goto retry;
     }
 
     if ((fp = fopen (tbuf, "r")) == NULL) {
-        HTInfoMsg (FILE_NOT_READABLE);
-        _statusline(FILE_NOT_READABLE_RE);
-        FirstRecall = TRUE;
-        FnameNum    = FnameTotal;
-        goto retry;
+	HTInfoMsg (FILE_NOT_READABLE);
+	_statusline(FILE_NOT_READABLE_RE);
+	FirstRecall = TRUE;
+	FnameNum    = FnameTotal;
+	goto retry;
     } else {
-        fclose (fp);
+	fclose (fp);
     }
 
     /*
@@ -1444,7 +1448,7 @@ check_recall:
      *   with  --enable-find-leaks  turned on.  Dumb.]
      */
     if ((fn = (char *) calloc (1, (strlen (tbuf) + 1))) == NULL)
-        outofmem(__FILE__, "GetFileName");
+	outofmem(__FILE__, "GetFileName");
     return (strcpy (fn, tbuf));
 
 
diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c
index 45976705..9c22508f 100644
--- a/src/LYReadCFG.c
+++ b/src/LYReadCFG.c
@@ -30,8 +30,10 @@
 #include <LYexit.h>
 #include <LYLeaks.h>
 
+#ifndef DISABLE_NEWS
 extern int HTNewsMaxChunk;  /* Max news articles before chunking (HTNews.c) */
 extern int HTNewsChunkSize; /* Number of news articles per chunk (HTNews.c) */
+#endif
 
 PUBLIC BOOLEAN have_read_cfg=FALSE;
 PUBLIC BOOLEAN LYUseNoviceLineTwo=TRUE;
@@ -283,7 +285,8 @@ PRIVATE void add_printer_to_list ARGS2(
 	/*
 	 *  Process pagelen field.
 	 */
-	if ((next_colon = find_colon(next_colon+1)) != NULL) {
+	if (next_colon != NULL
+	 && (next_colon = find_colon(next_colon+1)) != NULL) {
 	    cur_item->pagelen = atoi(next_colon+1);
 	} else {
 	    /* default to 66 lines */
@@ -678,6 +681,7 @@ static int lynx_sig_file_fun ARGS1(
     return 0;
 }
 
+#ifndef DISABLE_NEWS
 static int news_chunk_size_fun ARGS1(
 	char *, 	value)
 {
@@ -711,6 +715,7 @@ static int news_posting_fun ARGS1(
     no_newspost = (LYNewsPosting == FALSE);
     return 0;
 }
+#endif /* DISABLE_NEWS */
 
 #ifndef NO_RULES
 static int cern_rulesfile_fun ARGS1(
@@ -909,8 +914,10 @@ static Config_Type Config_Table [] =
      PARSE_FUN("keyboard_layout", CONF_FUN, keyboard_layout_fun),
 #endif
      PARSE_FUN("keymap", CONF_FUN, keymap_fun),
+#ifndef DISABLE_NEWS
      PARSE_SET("list_news_numbers", CONF_BOOL, LYListNewsNumbers),
      PARSE_SET("list_news_dates", CONF_BOOL, LYListNewsDates),
+#endif
 #ifndef VMS
      PARSE_STR("list_format", CONF_STR, list_format),
 #endif
@@ -938,6 +945,7 @@ static Config_Type Config_Table [] =
      PARSE_SET("minimal_comments", CONF_BOOL, minimal_comments),
      PARSE_INT("multi_bookmark_support", CONF_BOOL, LYMultiBookmarks),
      PARSE_SET("ncr_in_bookmarks", CONF_BOOL, UCSaveBookmarksInUnicode),
+#ifndef DISABLE_NEWS
      PARSE_FUN("news_chunk_size", CONF_FUN, news_chunk_size_fun),
      PARSE_FUN("news_max_chunk", CONF_FUN, news_max_chunk_fun),
      PARSE_FUN("news_posting", CONF_FUN, news_posting_fun),
@@ -946,6 +954,7 @@ static Config_Type Config_Table [] =
      PARSE_ENV("newsreply_proxy", CONF_ENV, 0),
      PARSE_ENV("nntp_proxy", CONF_ENV, 0),
      PARSE_ENV("nntpserver", CONF_ENV2, 0), /* actually NNTPSERVER */
+#endif
      PARSE_SET("no_dot_files", CONF_BOOL, no_dotfiles),
      PARSE_SET("no_file_referer", CONF_BOOL, no_filereferer),
 #ifndef VMS
@@ -972,8 +981,8 @@ static Config_Type Config_Table [] =
      PARSE_FUN("printer", CONF_FUN, printer_fun),
      PARSE_SET("quit_default_yes", CONF_BOOL, LYQuitDefaultYes),
 #ifndef NO_RULES
-     PARSE_STR("rule", CONF_FUN, HTSetConfiguration),
-     PARSE_STR("rulesfile", CONF_FUN, cern_rulesfile_fun),
+     PARSE_FUN("rule", CONF_FUN, HTSetConfiguration),
+     PARSE_FUN("rulesfile", CONF_FUN, cern_rulesfile_fun),
 #endif /* NO_RULES */
      PARSE_STR("save_space", CONF_STR, lynx_save_space),
      PARSE_SET("scan_for_buried_news_refs", CONF_BOOL, scan_for_buried_news_references),
diff --git a/src/LYShowInfo.c b/src/LYShowInfo.c
index bfc0c85a..25725d05 100644
--- a/src/LYShowInfo.c
+++ b/src/LYShowInfo.c
@@ -22,6 +22,8 @@
 #include <LYLocal.h>
 #endif /* DIRED_SUPPORT */
 
+#define ADVANCED_INFO 1		/* to get more info in advanced mode */
+
 #if defined(HAVE_CONFIG_H) && !defined(NO_CONFIG_INFO)
 #define HAVE_CFG_DEFS_H
 
@@ -89,6 +91,9 @@ PUBLIC int showinfo ARGS4(
     char *Address = NULL, *Title = NULL;
     char *name;
     CONST char *cp;
+#ifdef ADVANCED_INFO
+    BOOLEAN LYInfoAdvanced = (user_mode == ADVANCED_MODE);
+#endif
 
 #ifdef DIRED_SUPPORT
     char temp[LY_MAXPATH];
@@ -324,6 +329,28 @@ PUBLIC int showinfo ARGS4(
     if ((cp = HText_getLastModified()) != NULL && *cp != '\0')
 	fprintf(fp0, "<dt><em>%s</em> %s\n", gettext("Last Mod:"), cp);
 
+#ifdef ADVANCED_INFO
+    if (LYInfoAdvanced) {
+	if (HTMainAnchor && HTMainAnchor->expires) {
+	    fprintf(fp0, "<dt><em>%s</em> %s\n",
+		    gettext("&nbsp;Expires:"), HTMainAnchor->expires);
+	}
+	if (HTMainAnchor && HTMainAnchor->cache_control) {
+	    fprintf(fp0, "<dt><em>%s</em> %s\n",
+		    gettext("Cache-Control:"), HTMainAnchor->cache_control);
+	}
+	if (HTMainAnchor && HTMainAnchor->content_length > 0) {
+	    fprintf(fp0, "<dt><em>%s</em> %d %s\n",
+		    gettext("Content-Length:"),
+		    HTMainAnchor->content_length, gettext("bytes"));
+	}
+	if (HTMainAnchor && HTMainAnchor->content_language) {
+	    fprintf(fp0, "<dt><em>%s</em> %s\n",
+		    gettext("Language:"), HTMainAnchor->content_language);
+	}
+    }
+#endif /* ADVANCED_INFO */
+
     if (doc->post_data) {
 	fprintf(fp0, "<dt><em>%s</em> <xmp>%s</xmp>\n",
 		gettext("Post Data:"), doc->post_data);
@@ -342,15 +369,29 @@ PUBLIC int showinfo ARGS4(
     fprintf(fp0, "<dt>&nbsp;&nbsp;&nbsp;&nbsp;<em>%s</em> %d %s\n",
 	    gettext("size:"), size_of_file, gettext("lines"));
 
-    fprintf(fp0, "<dt>&nbsp;&nbsp;&nbsp;&nbsp;<em>%s</em> %s%s%s\n",
+    fprintf(fp0, "<dt>&nbsp;&nbsp;&nbsp;&nbsp;<em>%s</em> %s%s%s",
 		 gettext("mode:"),
 		 (lynx_mode == FORMS_LYNX_MODE ?
-				  gettext("forms mode") : gettext("normal")),
+				  gettext("forms mode") :
+		  HTisDocumentSource() ?
+				  gettext("source") : gettext("normal")),
 		 (doc->safe ? gettext(", safe") : ""),
 		 (doc->internal_link ? gettext(", internal link") : "")
 	    );
+#ifdef ADVANCED_INFO
+    if (LYInfoAdvanced) {
+	fprintf(fp0, "%s%s%s\n",
+		(HText_hasNoCacheSet(HTMainText) ?
+				  gettext(", no-cache") : ""),
+		(HTAnchor_isISMAPScript((HTAnchor *)HTMainAnchor) ?
+				  gettext(", ISMAP script") : ""),
+		(doc->bookmark ?
+				  gettext(", bookmark file") : "")
+	    );
+    }
+#endif /* ADVANCED_INFO */
 
-    fprintf(fp0, "</dl>\n");  /* end of list */
+    fprintf(fp0, "\n</dl>\n");  /* end of list */
 
     if (nlinks > 0) {
 	fprintf(fp0, "<h2>%s</h2>\n<dl compact>",
diff --git a/src/LYStrings.c b/src/LYStrings.c
index 4c7ab032..4179e5f1 100644
--- a/src/LYStrings.c
+++ b/src/LYStrings.c
@@ -13,12 +13,19 @@
 #include <LYCharSets.h>
 #include <HTAlert.h>
 #include <HTString.h>
+#include <LYCharUtils.h>
+#include <HTParse.h>
 
 #ifdef DJGPP_KEYHANDLER
 #include <pc.h>
 #include <keys.h>
 #endif /* DJGPP_KEYHANDLER */
 
+#ifdef USE_COLOR_STYLE
+#include <LYHash.h>
+#include <AttrList.h>
+#endif
+
 #include <LYLeaks.h>
 
 extern unsigned short *LYKbLayout;
@@ -1721,6 +1728,29 @@ PUBLIC void LYTrimTrailing ARGS1(
 }
 
 /*
+ * Trim a startfile, returning true if it looks like one of the Lynx tags.
+ */
+PUBLIC BOOLEAN LYTrimStartfile ARGS1(
+	char *,		buffer)
+{
+    LYTrimHead(buffer);
+    if (!strncasecomp(buffer, "lynxexec:", 9) ||
+	!strncasecomp(buffer, "lynxprog:", 9)) {
+	/*
+	 *  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
+	 *  principles.  - FM
+	 */
+	HTUnEscapeSome(buffer, " \r\n\t");
+	convert_to_spaces(buffer, TRUE);
+	return TRUE;
+    }
+    return FALSE;
+}
+
+/*
 **  Display the current value of the string and allow the user
 **  to edit it.
 */
@@ -2046,6 +2076,20 @@ PUBLIC void LYRefreshEdit ARGS1(
 	nrdisplayed = DspWdth;
 
     move(edit->sy, edit->sx);
+#ifdef USE_COLOR_STYLE
+    /*
+     *  If this is the last screen line, set attributes to normal,
+     *  should only be needed for color styles.  The curses function
+     *  may be used directly to avoid complications. - kw
+     */
+    if (edit->sy == (LYlines - 1)) {
+	if (s_normal != NOSTYLE) {
+	    curses_style(s_normal, ABS_ON);
+	} else {
+	    attrset(A_NORMAL);	/* need to do something about colors? */
+	}
+    }
+#endif
     if (edit->hidden) {
 	for (i = 0; i < nrdisplayed; i++)
 	    addch('*');
@@ -2119,12 +2163,20 @@ again:
 	LYRefreshEdit(&MyEdit);
 	ch = LYgetch();
 #ifdef VMS
-	if (term_letter || term_options || term_message || HadVMSInterrupt) {
+	if (term_letter || term_options ||
+#ifndef DISABLE_NEWS
+	      term_message
+#endif
+	      || HadVMSInterrupt) {
 	    HadVMSInterrupt = FALSE;
 	    ch = 7;
 	}
 #else
-	if (term_letter || term_options || term_message)
+      if (term_letter || term_options
+#ifndef DISABLE_NEWS
+	      || term_message
+#endif
+	      )
 	    ch = 7;
 #endif /* VMS */
 	if (recall && (ch == UPARROW || ch == DNARROW)) {
diff --git a/src/LYStrings.h b/src/LYStrings.h
index 4114fa7b..9161bb89 100644
--- a/src/LYStrings.h
+++ b/src/LYStrings.h
@@ -203,6 +203,8 @@ extern void LYTrimLeading PARAMS((
 	char *		buffer));
 extern void LYTrimTrailing PARAMS((
 	char *		buffer));
+extern BOOLEAN LYTrimStartfile PARAMS((
+	char *		buffer));
 extern void LYSetupEdit PARAMS((
 	EditFieldData *	edit,
 	char *		old,
diff --git a/src/LYStyle.c b/src/LYStyle.c
index 053ff53e..ecc1d027 100644
--- a/src/LYStyle.c
+++ b/src/LYStyle.c
@@ -1,6 +1,6 @@
 /* character level styles for Lynx
  * (c) 1996 Rob Partington -- donated to the Lyncei (if they want it :-)
- * @Id: LYStyle.c 1.21 Wed, 18 Nov 1998 12:23:55 -0700 dickey @
+ * @Id: LYStyle.c 1.22 Wed, 17 Mar 1999 20:17:11 -0700 dickey @
  */
 #include <HTUtils.h>
 #include <HTML.h>
@@ -11,6 +11,7 @@
 #include <LYReadCFG.h>
 #include <LYCurses.h>
 #include <LYCharUtils.h>
+#include <LYUtils.h>		/* defines TABLESIZE */
 #include <AttrList.h>
 #include <SGML.h>
 #include <HTMLDTD.h>
@@ -24,6 +25,10 @@
 
 #ifdef USE_COLOR_STYLE
 
+/* stack of attributes during page rendering */
+PUBLIC int last_styles[128];
+PUBLIC int last_colorattr_ptr=0;
+
 PUBLIC bucket hashStyles[CSHASHSIZE];
 
 /* definitions for the mono attributes we can use */
@@ -43,7 +48,8 @@ static char *Mono_Strings[7] =
 /* Remember the hash codes for common elements */
 PUBLIC int	s_alink  = NOSTYLE, s_a     = NOSTYLE, s_status = NOSTYLE,
 		s_label  = NOSTYLE, s_value = NOSTYLE, s_high   = NOSTYLE,
-		s_normal = NOSTYLE, s_alert = NOSTYLE, s_title  = NOSTYLE;
+		s_normal = NOSTYLE, s_alert = NOSTYLE, s_title  = NOSTYLE,
+		s_whereis= NOSTYLE;
 
 /* start somewhere safe */
 PRIVATE int colorPairs = 0;
@@ -58,13 +64,41 @@ PRIVATE void parse_attributes ARGS5(char*,mono,char*,fg,char*,bg,int,style,char*
 
     CTRACE(tfp, "CSS(PA):style d=%d / h=%d, e=%s\n", style, newstyle,element);
 
-    for (i = 0; i <7; i++)
+    for (i = 0; i < (int)TABLESIZE(Mono_Strings); i++)
     {
 	if (!strcasecomp(Mono_Strings[i], mono))
 	{
 	    mA = ncursesMono[i];
 	}
     }
+    if (!mA) {
+	/*
+	 *  Not found directly yet, see whether we have a combination
+	 *  of several mono attributes separated by '+' - kw
+	 */
+	char *cp0 = mono;
+	char csep = '+';
+	char *cp = strchr(mono, csep);
+	while (cp) {
+	    *cp = '\0';
+	    for (i = 0; i < (int)TABLESIZE(Mono_Strings); i++)
+	    {
+		if (!strcasecomp(Mono_Strings[i], cp0))
+		{
+		    mA |= ncursesMono[i];
+		}
+	    }
+	    if (!csep)
+		break;
+	    *cp = csep;
+	    cp0 = cp + 1;
+	    cp = strchr(cp0, csep);
+	    if (!cp) {
+		cp = cp0 + strlen(cp0);
+		csep = '\0';
+	    }
+	}
+    }
     CTRACE(tfp, "CSS(CP):%d\n", colorPairs);
 
     fA = check_color(fg, default_fg);
@@ -197,12 +231,19 @@ where OBJECT is one of EM,STRONG,B,I,U,BLINK etc.\n\n"), buffer);
     else if (!strcasecomp(element, "normal")) /* added - kw */
     {
 	parse_attributes(mono,fg,bg,DSTYLE_NORMAL,"html");
+	s_normal  = hash_code("html"); /* rather bizarre... - kw */
     }
     /* this may vanish */
     else if (!strncasecomp(element, "candy", 5)) /* [INLINE]'s */
     {
 	parse_attributes(mono,fg,bg,DSTYLE_CANDY,"candy");
     }
+    /* added for whereis search target - kw */
+    else if (!strncasecomp(element, "whereis", 7))
+    {
+	parse_attributes(mono,fg,bg,DSTYLE_WHEREIS,"whereis");
+	s_whereis  = hash_code("whereis");
+    }
     /* Ok, it must be a HTML element, so look through the list until we
     * find it
     */
@@ -381,4 +422,37 @@ PUBLIC int style_readFromFile ARGS1(char*, file)
 	parse_userstyles();
     return 0;
 }
+
+/* Used in HTStructured methods: - kw */
+
+PUBLIC void TrimColorClass ARGS3(
+    CONST char *,	tagname,
+    char *,		styleclassname,
+    int *,		phcode)
+{
+    char *end, *start=NULL, *lookfrom;
+    char tmp[64];
+
+    sprintf(tmp, ";%.*s", (int) sizeof(tmp) - 3, tagname);
+    strtolower(tmp);
+
+    if ((lookfrom = styleclassname) != 0) {
+	do {
+	    end = start;
+	    start = strstr(lookfrom, tmp);
+	    if (start)
+		lookfrom = start + 1;
+	}
+	while (start);
+	/* trim the last matching element off the end
+	** - should match classes here as well (rp)
+	*/
+	if (end)
+	    *end='\0';
+    }
+    *phcode = hash_code(lookfrom && *lookfrom ? lookfrom : &tmp[1]);
+    CTRACE(tfp, "CSS:%s (trimmed %s)\n",
+	   (styleclassname ? styleclassname : "<null>"), tmp);
+}
+
 #endif /* USE_COLOR_STYLE */
diff --git a/src/LYStyle.h b/src/LYStyle.h
index 6d2689a7..414c3d7b 100644
--- a/src/LYStyle.h
+++ b/src/LYStyle.h
@@ -27,6 +27,12 @@ extern void style_defaultStyleSheet NOPARAMS;
 
 extern int style_readFromFile PARAMS((char* file));
 
+
+extern void TrimColorClass PARAMS((
+    CONST char *	tagname,
+    char *		styleclassname,
+    int *		phcode));
+
 #endif /* USE_COLOR_STYLE */
 
 #endif /* LYSTYLE_H */
diff --git a/src/LYUtils.c b/src/LYUtils.c
index 706fbe1c..226f7793 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -147,18 +147,36 @@ PUBLIC void highlight ARGS3(
 	lynx_start_link_color (flag == ON, links[cur].inUnderline);
 #else
 	if (flag == ON) {
-	    LynxChangeStyle(s_alink, ABS_ON, 0);
+	    LynxChangeStyle(s_alink, STACK_ON, 0);
 	} else {
-		/* the logic is flawed here - no provision is made for links that
-		** aren't coloured as [s_a] by default - rjp
-		*/
-	    if (LYP >= 0 && LYP < CACHEH && LXP >= 0 && LXP < CACHEW &&
-		cached_styles[LYP][LXP]) {
-		LynxChangeStyle(cached_styles[LYP][LXP], ABS_ON, 0);
-	    }
-	    else {
-		LynxChangeStyle(s_a, ABS_ON, 0);
+	    int s, x;
+		/*
+		 *  This is where we try to restore the original style when
+		 *  a link is unhighlighted.  The purpose of cached_styles[][]
+		 *  is to save the original style just for this case.
+		 *  If it doesn't have a color change saved at just the right
+		 *  position, we look at preceding positions in the same line
+		 *  until we find one.
+		 */
+	    if (LYP >= 0 && LYP < CACHEH && LXP >= 0 && LXP < CACHEW) {
+		s = cached_styles[LYP][LXP];
+		if (s == 0) {
+		    for (x = LXP-1; x >= 0; x--) {
+			if (cached_styles[LYP][x]) {
+			    if (cached_styles[LYP][x] > 0) {
+				s = cached_styles[LYP][x];
+				cached_styles[LYP][LXP] = s;
+			    }
+			    break;
+			}
+		    }
+		    if (s == 0)
+			s = s_a;
+		}
+	    } else {
+		s = s_a;
 	    }
+	    LynxChangeStyle(s, STACK_ON, 0);
 	}
 #endif
 
@@ -1924,22 +1942,21 @@ PUBLIC void statusline ARGS1(
 	/* draw the status bar in the STATUS style */
 	{
 		int a=(strncmp(buffer, ALERT_FORMAT, ALERT_PREFIX_LEN) ||
-		       !hashStyles[s_alert].name ? s_status : s_alert);
-		LynxChangeStyle (a, ABS_ON, 1);
+		       !hashStyles[s_alert].name) ? s_status : s_alert;
+		LynxChangeStyle (a, STACK_ON, 1);
 		addstr(buffer);
 		wbkgdset(stdscr,
 			 ((lynx_has_color && LYShowColor >= SHOW_COLOR_ON)
 			  ? hashStyles[a].color
 			  :A_NORMAL) | ' ');
 		clrtoeol();
-		if (s_normal != NOSTYLE)
+		if (!(lynx_has_color && LYShowColor >= SHOW_COLOR_ON))
+		    wbkgdset(stdscr, A_NORMAL | ' ');
+		else if (s_normal != NOSTYLE)
 		    wbkgdset(stdscr, hashStyles[s_normal].color | ' ');
 		else
-		    wbkgdset(stdscr,
-			     ((lynx_has_color && LYShowColor >= SHOW_COLOR_ON)
-			      ? displayStyles[DSTYLE_NORMAL].color
-			      : A_NORMAL) | ' ');
-		LynxChangeStyle (a, ABS_OFF, 0);
+		    wbkgdset(stdscr, displayStyles[DSTYLE_NORMAL].color | ' ');
+		LynxChangeStyle (a, STACK_OFF, 0);
 	}
 #endif
     }
@@ -2145,10 +2162,12 @@ PUBLIC int HTCheckForInterrupt NOARGS
 	 return((int)FALSE);
 #endif /* USE_SLANG */
 
-    /** Keyboard 'Z' or 'z', or Control-G or Control-C **/
 #if defined (DOSPATH) && defined (NCURSES)
     nodelay(stdscr,TRUE);
 #endif /* DOSPATH */
+    /*
+     * 'c' contains whatever character we're able to read from keyboard
+     */
     c = LYgetch();
 #if defined (DOSPATH) && defined (NCURSES)
     nodelay(stdscr,FALSE);
@@ -2175,103 +2194,113 @@ PUBLIC int HTCheckForInterrupt NOARGS
 	return((int)TRUE);
     }
 
-    /** Keyboard 'Z' or 'z', or Control-G or Control-C **/
+    /*
+     * 'c' contains whatever character we're able to read from keyboard
+     */
     c = typeahead();
 
 #endif /* !VMS */
 
     /*
-     * 'c' contains whatever character we're able to read from type-ahead
+     * 'c' contains whatever character we're able to read from keyboard
      */
+
+	/** Keyboard 'Z' or 'z', or Control-G or Control-C **/
     if (TOUPPER(c) == 'Z' || c == 7 || c == 3)
 	return((int)TRUE);
-#ifdef DISP_PARTIAL
-    else if (display_partial && (NumOfLines_partial > 2))
-    /* OK, we got several lines from new document and want to scroll... */
-    {
+
 	/* There is a subset of mainloop() actions available at this stage:
 	** no new getfile() cyrcle possible until the previous finished.
-	** Currently we have scrolling and toggling of trace log here.
+	** Currently we have scrolling in partial mode and toggling of trace log.
 	*/
+    switch (keymap[c+1])
+    {
+    case LYK_TRACE_TOGGLE :	       /*  Toggle TRACE mode. */
+	WWW_TraceFlag = ! WWW_TraceFlag;
+	if (LYOpenTraceLog())
+	    HTUserMsg(WWW_TraceFlag ? TRACE_ON : TRACE_OFF);
+	break ;
+    default :
 
-	int res;
-	switch (keymap[c+1])
-	{
-	case LYK_FASTBACKW_LINK :
-	    if (Newline_partial <= (display_lines)+1) {
-		Newline_partial -= display_lines ;
-	    } else if ((res =
-			HTGetLinkOrFieldStart(-1,
-					      &Newline_partial, NULL,
-					      -1, TRUE)) == LINK_LINE_FOUND) {
-		Newline_partial++;
-	    } else if (res == LINK_DO_ARROWUP) {
-		Newline_partial -= display_lines ;
-	    }
-	    break;
-	case LYK_FASTFORW_LINK :
-	    if (HText_canScrollDown()) {
-		/* This is not an exact science... - kw */
-		if ((res =
-		     HTGetLinkOrFieldStart(HText_LinksInLines(HTMainText,
-							      Newline_partial,
-							      display_lines)
-					   - 1,
-					   &Newline_partial, NULL,
-					   +1, TRUE)) == LINK_LINE_FOUND) {
+#ifdef DISP_PARTIAL
+        if (display_partial && (NumOfLines_partial > 2))
+        /* OK, we got several lines from new document and want to scroll... */
+        {
+	    int res;
+	    switch (keymap[c+1])
+	    {
+	    case LYK_FASTBACKW_LINK :
+	        if (Newline_partial <= (display_lines)+1) {
+		    Newline_partial -= display_lines ;
+	        } else if ((res =
+			    HTGetLinkOrFieldStart(-1,
+					          &Newline_partial, NULL,
+					          -1, TRUE)) == LINK_LINE_FOUND) {
 		    Newline_partial++;
-		}
-	    }
-	    break;
-	case LYK_PREV_PAGE :
-	    if (Newline_partial > 1)
-		Newline_partial -= display_lines ;
-	    break ;
-	case LYK_NEXT_PAGE :
-	    if (HText_canScrollDown())
-		Newline_partial += display_lines ;
-	    break ;
-	case LYK_UP_HALF :
-	    if (Newline_partial > 1)
-		Newline_partial -= (display_lines/2) ;
-	    break ;
-	case LYK_DOWN_HALF :
-	    if (HText_canScrollDown())
-		Newline_partial += (display_lines/2) ;
-	    break ;
-	case LYK_UP_TWO :
-	    if (Newline_partial > 1)
-		Newline_partial -= 2 ;
-	    break ;
-	case LYK_DOWN_TWO :
-	    if (HText_canScrollDown())
-		Newline_partial += 2 ;
-	    break ;
-	case LYK_HOME:
-	    if (Newline_partial > 1)
+	        } else if (res == LINK_DO_ARROWUP) {
+		    Newline_partial -= display_lines ;
+	        }
+	        break;
+	    case LYK_FASTFORW_LINK :
+	        if (HText_canScrollDown()) {
+		    /* This is not an exact science... - kw */
+		    if ((res =
+		        HTGetLinkOrFieldStart(HText_LinksInLines(HTMainText,
+							         Newline_partial,
+							         display_lines)
+					      - 1,
+					      &Newline_partial, NULL,
+					      1, TRUE)) == LINK_LINE_FOUND) {
+		        Newline_partial++;
+		    }
+	        }
+	        break;
+	    case LYK_PREV_PAGE :
+		if (Newline_partial > 1)
+		    Newline_partial -= display_lines ;
+		break ;
+	    case LYK_NEXT_PAGE :
+		if (HText_canScrollDown())
+		    Newline_partial += display_lines ;
+		break ;
+	    case LYK_UP_HALF :
+		if (Newline_partial > 1)
+		    Newline_partial -= (display_lines/2) ;
+		break ;
+	    case LYK_DOWN_HALF :
+		if (HText_canScrollDown())
+		    Newline_partial += (display_lines/2) ;
+		break ;
+	    case LYK_UP_TWO :
+		if (Newline_partial > 1)
+		    Newline_partial -= 2 ;
+		break ;
+	    case LYK_DOWN_TWO :
+		if (HText_canScrollDown())
+		    Newline_partial += 2 ;
+		break ;
+	    case LYK_HOME:
+		if (Newline_partial > 1)
+		    Newline_partial = 1;
+		break;
+	    case LYK_END:
+		if (HText_canScrollDown())
+		    Newline_partial = HText_getNumOfLines() - display_lines + 1;
+		    /* calculate for "current" bottom value */
+		break;
+	    case LYK_REFRESH :
+		break ;
+	    default :
+	        /** Other or no keystrokes **/
+		return ((int)FALSE) ;
+	    } /* end switch */
+	    if (Newline_partial < 1)
 		Newline_partial = 1;
-	    break;
-	case LYK_END:
-	    if (HText_canScrollDown())
-		Newline_partial = HText_getNumOfLines() - display_lines + 1;
-		/* calculate for "current" bottom value */
-	    break;
-	case LYK_REFRESH :
-	    break ;
-	case LYK_TRACE_TOGGLE:	/*  Toggle TRACE mode. */
-	    WWW_TraceFlag = ! WWW_TraceFlag;
-	    if (LYOpenTraceLog())
-		HTUserMsg(WWW_TraceFlag ? TRACE_ON : TRACE_OFF);
-	    break;
-	default :
-	    return ((int)FALSE) ;
+	    NumOfLines_partial = HText_getNumOfLines();
+	    HText_pageDisplay(Newline_partial, "");
 	}
-	if (Newline_partial < 1)
-	    Newline_partial = 1;
-	NumOfLines_partial = HText_getNumOfLines();
-	HText_pageDisplay(Newline_partial, "");
-    }
 #endif /* DISP_PARTIAL */
+    } /* end switch */
     /** Other or no keystrokes **/
     return((int)FALSE);
 }
@@ -3425,9 +3454,11 @@ PRIVATE CONST char *restrict_name[] = {
        "goto"	       ,
        "jump"	       ,
        "file_url"      ,
+#ifndef DISABLE_NEWS
        "news_post"     ,
        "inside_news"   ,
        "outside_news"  ,
+#endif
        "mail"	       ,
        "dotfiles"      ,
        "useragent"     ,
@@ -3470,9 +3501,11 @@ PRIVATE BOOLEAN *restrict_flag[] = {
        &no_goto     ,
        &no_jump     ,
        &no_file_url ,
+#ifndef DISABLE_NEWS
        &no_newspost ,
        &no_inside_news,
        &no_outside_news,
+#endif
        &no_mail     ,
        &no_dotfiles ,
        &no_useragent ,
@@ -3509,8 +3542,10 @@ PUBLIC void parse_restrictions ARGS1(
 	     /* reset these to defaults */
 	     no_inside_telnet = !(CAN_ANONYMOUS_INSIDE_DOMAIN_TELNET);
 	    no_outside_telnet = !(CAN_ANONYMOUS_OUTSIDE_DOMAIN_TELNET);
+#ifndef DISABLE_NEWS
 	       no_inside_news = !(CAN_ANONYMOUS_INSIDE_DOMAIN_READ_NEWS);
 	      no_outside_news = !(CAN_ANONYMOUS_OUTSIDE_DOMAIN_READ_NEWS);
+#endif
 		no_inside_ftp = !(CAN_ANONYMOUS_INSIDE_DOMAIN_FTP);
 	       no_outside_ftp = !(CAN_ANONYMOUS_OUTSIDE_DOMAIN_FTP);
 	     no_inside_rlogin = !(CAN_ANONYMOUS_INSIDE_DOMAIN_RLOGIN);
@@ -3518,19 +3553,27 @@ PUBLIC void parse_restrictions ARGS1(
 		      no_goto = !(CAN_ANONYMOUS_GOTO);
 		  no_goto_cso = !(CAN_ANONYMOUS_GOTO_CSO);
 		 no_goto_file = !(CAN_ANONYMOUS_GOTO_FILE);
+#ifndef DISABLE_FINGER
 	       no_goto_finger = !(CAN_ANONYMOUS_GOTO_FINGER);
+#endif
 		  no_goto_ftp = !(CAN_ANONYMOUS_GOTO_FTP);
+#ifndef DISABLE_GOPHER
 	       no_goto_gopher = !(CAN_ANONYMOUS_GOTO_GOPHER);
+#endif
 		 no_goto_http = !(CAN_ANONYMOUS_GOTO_HTTP);
 		no_goto_https = !(CAN_ANONYMOUS_GOTO_HTTPS);
 	      no_goto_lynxcgi = !(CAN_ANONYMOUS_GOTO_LYNXCGI);
 	     no_goto_lynxexec = !(CAN_ANONYMOUS_GOTO_LYNXEXEC);
 	     no_goto_lynxprog = !(CAN_ANONYMOUS_GOTO_LYNXPROG);
 	       no_goto_mailto = !(CAN_ANONYMOUS_GOTO_MAILTO);
+#ifndef DISABLE_NEWS
 		 no_goto_news = !(CAN_ANONYMOUS_GOTO_NEWS);
 		 no_goto_nntp = !(CAN_ANONYMOUS_GOTO_NNTP);
+#endif
 	       no_goto_rlogin = !(CAN_ANONYMOUS_GOTO_RLOGIN);
+#ifndef DISABLE_NEWS
 		no_goto_snews = !(CAN_ANONYMOUS_GOTO_SNEWS);
+#endif
 	       no_goto_telnet = !(CAN_ANONYMOUS_GOTO_TELNET);
 	       no_goto_tn3270 = !(CAN_ANONYMOUS_GOTO_TN3270);
 		 no_goto_wais = !(CAN_ANONYMOUS_GOTO_WAIS);
diff --git a/src/UCdomap.c b/src/UCdomap.c
index 809140f8..91f473f9 100644
--- a/src/UCdomap.c
+++ b/src/UCdomap.c
@@ -2,6 +2,8 @@
  *  UCdomap.c
  *  =========
  *
+ * This is a Lynx chartrans engine, its external calls are in UCMap.h
+ *
  * Derived from code in the Linux kernel console driver.
  * The GNU Public Licence therefore applies, see
  * the file COPYING in the top-level directory
@@ -67,7 +69,6 @@
 #include <rfc_suni.h>		/* RFC 1345 w/o Intro	*/
 /* #include <utf8_uni.h> */     /* UNICODE UTF 8        */
 #include <viscii_uni.h> 	/* Vietnamese (VISCII)	*/
-#include <iso9945uni.h>		/* Ukrainian Cyrillic (ISO 9945-2) */
 #include <cp866u_uni.h>		/* Ukrainian Cyrillic (866) */
 #include <koi8u_uni.h>		/* Ukrainian Cyrillic (koi8-u */
 #ifdef NOTDEFINED
@@ -490,11 +491,12 @@ PRIVATE void UC_con_set_trans ARGS3(
   }
     /*
      *	The font is always 256 characters - so far.
-     *  (fake 0 for built-in charsets like CJK or x-transparent, use .num_n256)
+     *  (this function preserved by num_uni==0 so unicount=NULL for built-in
+     *  charsets like CJK or x-transparent should not be a problem?)
      */
   con_clear_unimap();
 #endif
-    for (i = 0; i < UCInfo[UC_charset_in_hndl].num_n256; i++) {
+    for (i = 0; i < 256; i++) {
 	if ((j = UCInfo[UC_charset_in_hndl].unicount[i])) {
 	    ptrans[i] = *p;
 	    for (; j; j--) {
@@ -753,6 +755,7 @@ PRIVATE void con_set_default_unimap NOARGS
 
     /*
      *	The default font is always 256 characters.
+     *  (default font can not be a fake one, so unicout!=NULL for sure.)
      */
     con_clear_unimap(1);
 
@@ -810,11 +813,11 @@ PRIVATE int UC_con_set_unimap ARGS2(
 
     /*
      *	The font is always 256 characters - so far.
-     *  (fake 0 for built-in charsets like CJK or x-transparent, use .num_n256)
+     *  (fake 0 for built-in charsets like CJK or x-transparent, add a check)
      */
     con_clear_unimap(0);
 
-    for (i = 0; i < UCInfo[UC_charset_out_hndl].num_n256; i++) {
+    for (i = 0; i < 256 && UCInfo[UC_charset_out_hndl].unicount != NULL; i++) {
 	for (j = UCInfo[UC_charset_out_hndl].unicount[i]; j; j--) {
 	    con_insert_unipair(*(p++), i, 0);
 	}
@@ -1972,7 +1975,6 @@ PUBLIC void UC_Charset_Setup ARGS9(
     }
     UCInfo[s].LYNXname = UC_LYNXcharset;
     UCInfo[s].unicount = unicount;
-    UCInfo[s].num_n256 = (unicount == NULL) ? 0 : 256 ; /* hack */
     UCInfo[s].unitable = unitable;
     UCInfo[s].num_uni = nnuni;
     UCInfo[s].replacedesc = replacedesc;
@@ -2077,7 +2079,6 @@ PUBLIC void UCInit NOARGS
     UC_CHARSET_SETUP_utf_8;		  /*** UNICODE UTF-8	  */
     UC_CHARSET_SETUP_mnemonic_ascii_0;	  /* RFC 1345 w/o Intro   */
     UC_CHARSET_SETUP_mnemonic;		  /* RFC 1345 Mnemonic	  */
-    UC_CHARSET_SETUP_iso_9945_2;	  /* Ukrainian Cyrillic (ISO 9945-2) */
     UC_CHARSET_SETUP_cp866u;		  /* Ukrainian Cyrillic (866) */
     UC_CHARSET_SETUP_koi8_u;		  /* Ukrainian Cyrillic (koi8-u) */
 #ifdef NOTDEFINED
diff --git a/src/UCdomap.h b/src/UCdomap.h
index f4170c59..7f45ee6d 100644
--- a/src/UCdomap.h
+++ b/src/UCdomap.h
@@ -41,7 +41,6 @@ struct UC_charset {
 	CONST char *MIMEname;
 	CONST char *LYNXname;
 	CONST u8* unicount;
-	int num_n256;	/* 256 for *.tbl, 0 for CJK and x-transparent (hack) */
 	CONST u16* unitable;
 	int num_uni;
 	struct unimapdesc_str replacedesc;
@@ -77,30 +76,34 @@ extern void UCInit NOARGS;
    *  from Unicode mechanism).  For now we use the MIME name that describes
    *  what is output to the terminal. - KW
    */
+static CONST struct unimapdesc_str dfont_replacedesc_Asian = {0,NULL,0,1};
+
 #define UC_CHARSET_SETUP_euc_cn UC_Charset_Setup("euc-cn","Chinese",\
-       NULL,NULL,0,(struct unimapdesc_str){0,NULL,0,1},\
+       NULL,NULL,0,dfont_replacedesc_Asian,\
        128,UCT_ENC_CJK,0)
 #define UC_CHARSET_SETUP_euc_jp UC_Charset_Setup("euc-jp","Japanese (EUC-JP)",\
-       NULL,NULL,0,(struct unimapdesc_str){0,NULL,0,1},\
+       NULL,NULL,0,dfont_replacedesc_Asian,\
        128,UCT_ENC_CJK,0)
 #define UC_CHARSET_SETUP_shift_jis UC_Charset_Setup("shift_jis","Japanese (Shift_JIS)",\
-       NULL,NULL,0,(struct unimapdesc_str){0,NULL,0,1},\
+       NULL,NULL,0,dfont_replacedesc_Asian,\
        128,UCT_ENC_CJK,0)
 #define UC_CHARSET_SETUP_euc_kr UC_Charset_Setup("euc-kr","Korean",\
-       NULL,NULL,0,(struct unimapdesc_str){0,NULL,0,1},\
+       NULL,NULL,0,dfont_replacedesc_Asian,\
        128,UCT_ENC_CJK,0)
 #define UC_CHARSET_SETUP_big5 UC_Charset_Setup("big5","Taipei (Big5)",\
-       NULL,NULL,0,(struct unimapdesc_str){0,NULL,0,1},\
+       NULL,NULL,0,dfont_replacedesc_Asian,\
        128,UCT_ENC_CJK,0)
   /*
    *  Placeholder for non-translation mode. - FM
    */
+static CONST struct unimapdesc_str dfont_replacedesc_trans = {0,NULL,0,0};
+
 #define UC_CHARSET_SETUP_x_transparent UC_Charset_Setup("x-transparent","Transparent",\
-       NULL,NULL,0,(struct unimapdesc_str){0,NULL,0,0},\
+       NULL,NULL,0,dfont_replacedesc_trans,\
        128,1,0)
 
 #define UC_CHARSET_SETUP_utf_8 UC_Charset_Setup("utf-8","UNICODE (UTF-8)",\
-       NULL,NULL,0,(struct unimapdesc_str){0,NULL,0,0},\
+       NULL,NULL,0,dfont_replacedesc_trans,\
        128,UCT_ENC_UTF8,0)
 
 
diff --git a/src/chrtrans/MAKEW32.BAT b/src/chrtrans/MAKEW32.BAT
index 9c3b0a83..3ad8c16f 100644
--- a/src/chrtrans/MAKEW32.BAT
+++ b/src/chrtrans/MAKEW32.BAT
@@ -33,7 +33,6 @@ makeuctb iso08_uni.tbl > iso08_uni.h
 makeuctb iso09_uni.tbl > iso09_uni.h
 makeuctb iso10_uni.tbl > iso10_uni.h
 makeuctb iso15_uni.tbl > iso15_uni.h 
-makeuctb iso9945uni.tbl > iso9945_uni.h
 makeuctb koi8r_uni.tbl > koi8r_uni.h
 makeuctb koi8u_uni.tbl > koi8u_uni.h
 makeuctb mac_uni.tbl > mac_uni.h
diff --git a/src/chrtrans/build-chrtrans.com b/src/chrtrans/build-chrtrans.com
index 71d6255a..42aebf86 100644
--- a/src/chrtrans/build-chrtrans.com
+++ b/src/chrtrans/build-chrtrans.com
@@ -140,8 +140,6 @@ $ define/user sys$output 'CHRwhere'iso08_uni.h	!ISO 8859-8 Hebrew
 $ makeuctb iso08_uni.tbl
 $ define/user sys$output 'CHRwhere'cp862_uni.h	!DosHebrew (cp862)
 $ makeuctb cp862_uni.tbl
-$ define/user sys$output 'CHRwhere'iso9945uni.h !Ukranian
-$ makeuctb iso9945uni.tbl
 $ define/user sys$output 'CHRwhere'cp1255_uni.h	!WinHebrew (cp1255)
 $ makeuctb cp1255_uni.tbl
 $ define/user sys$output 'CHRwhere'iso09_uni.h	!ISO 8859-9 (Latin 5)
diff --git a/src/chrtrans/caselower.h b/src/chrtrans/caselower.h
index f55994dc..ea2011ef 100644
--- a/src/chrtrans/caselower.h
+++ b/src/chrtrans/caselower.h
@@ -21,10 +21,11 @@ default mappings listed in the Unicode Character Database.
 
  */
 
+#include <UCkd.h> /* typedef u16 */
 
 typedef struct {
-	long upper;
-	long lower;
+	u16 upper;
+	u16 lower;
 } unipair;
 
 static CONST unipair unicode_to_lower_case[] =
diff --git a/src/chrtrans/def7_uni.tbl b/src/chrtrans/def7_uni.tbl
index d3549285..47f133ce 100644
--- a/src/chrtrans/def7_uni.tbl
+++ b/src/chrtrans/def7_uni.tbl
@@ -1285,12 +1285,13 @@ U+1fef:!*
 U+1ffe:;;
 # General punctuation:
 0x20	U+2000 U+2002	U+2004-U+2009	# spaces
-U+2001:  
-U+2003:  
+U+2001 "  "
+U+2003 "  "
 U+200e:(->)
 U+200f:(<-)
 U+200a:
-0x2d	U+2010	U+2013-U+2015	# hyphen-like
+0x2d	U+2010	U+2013 U+2015	# hyphen-like
+U+2014:-- 
 U+2016:||
 U+2017:=2
 0x60	U+2018		# left single quotation mark  <`>
diff --git a/src/chrtrans/entities.h b/src/chrtrans/entities.h
new file mode 100644
index 00000000..8dda4693
--- /dev/null
+++ b/src/chrtrans/entities.h
@@ -0,0 +1,1411 @@
+/*	Entity Names to Unicode table
+ *     -----------------------------
+ *
+ *     This is a one-way mapping to Unicode so chartrans implementation
+ *     now process character entities like &nbsp the similar way it handles
+ *     the numeric entities like &#123.
+ *     The only call to this structure is via HTMLGetEntityUCValue().
+ *
+
+Unlike the numeric entities &#234 which may be for any Unicode character,
+the character references should be defined within HTML standards
+to get a compatibility between browsers.
+
+Now we have a choice: use clean HTML4.0 entities list
+(and reject everithing others), or use a relaxed list
+with lots of synonyms and new symbols found at
+ftp://ftp.unicode.org/MAPPINGS/VENDORS/MISC/SGML.TXT
+
+We hold both: #define ENTITIES_HTML40_ONLY for strict version,
+otherwise relaxed.
+
+ */
+
+#include <UCkd.h> /* typedef u16 */
+typedef struct {
+    char* name; /* sorted alphabetically (case-sensitive) */
+    u16 code;
+} UC_entity_info;
+
+static CONST UC_entity_info unicode_entities[] =
+
+
+#ifdef ENTITIES_HTML40_ONLY
+/*********************************************************************
+
+   The full list of character references defined as part of HTML 4.0.
+   http://www.w3.org/TR/PR-html40/sgml/entities.html
+
+   Informal history:
+   * ISO Latin 1 entities for 160-255 range were introduced in HTML 2.0
+   * few important entities were added, including &lt, &gt, &amp.
+   * Greek letters and some math symbols were finally added in HTML 4.0
+
+   Totally 252 entries (Nov 1997 HTML 4.0 draft), it is 1:1 mapping.
+   Please do not add more unless a new HTML version will be released,
+   try the #else table for experiments and fun...
+
+****/
+{
+  {"AElig",      198}, /* latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1 */
+  {"Aacute",     193}, /* latin capital letter A with acute, U+00C1 ISOlat1 */
+  {"Acirc",      194}, /* latin capital letter A with circumflex, U+00C2 ISOlat1 */
+  {"Agrave",     192}, /* latin capital letter A with grave = latin capital letter A grave, U+00C0 ISOlat1 */
+  {"Alpha",      913}, /* greek capital letter alpha, U+0391 */
+  {"Aring",      197}, /* latin capital letter A with ring above = latin capital letter A ring, U+00C5 ISOlat1 */
+  {"Atilde",     195}, /* latin capital letter A with tilde, U+00C3 ISOlat1 */
+  {"Auml",       196}, /* latin capital letter A with diaeresis, U+00C4 ISOlat1 */
+  {"Beta",       914}, /* greek capital letter beta, U+0392 */
+  {"Ccedil",     199}, /* latin capital letter C with cedilla, U+00C7 ISOlat1 */
+  {"Chi",        935}, /* greek capital letter chi, U+03A7 */
+  {"Dagger",    8225}, /* double dagger, U+2021 ISOpub */
+  {"Delta",      916}, /* greek capital letter delta, U+0394 ISOgrk3 */
+  {"ETH",        208}, /* latin capital letter ETH, U+00D0 ISOlat1 */
+  {"Eacute",     201}, /* latin capital letter E with acute, U+00C9 ISOlat1 */
+  {"Ecirc",      202}, /* latin capital letter E with circumflex, U+00CA ISOlat1 */
+  {"Egrave",     200}, /* latin capital letter E with grave, U+00C8 ISOlat1 */
+  {"Epsilon",    917}, /* greek capital letter epsilon, U+0395 */
+  {"Eta",        919}, /* greek capital letter eta, U+0397 */
+  {"Euml",       203}, /* latin capital letter E with diaeresis, U+00CB ISOlat1 */
+  {"Gamma",      915}, /* greek capital letter gamma, U+0393 ISOgrk3 */
+  {"Iacute",     205}, /* latin capital letter I with acute, U+00CD ISOlat1 */
+  {"Icirc",      206}, /* latin capital letter I with circumflex, U+00CE ISOlat1 */
+  {"Igrave",     204}, /* latin capital letter I with grave, U+00CC ISOlat1 */
+  {"Iota",       921}, /* greek capital letter iota, U+0399 */
+  {"Iuml",       207}, /* latin capital letter I with diaeresis, U+00CF ISOlat1 */
+  {"Kappa",      922}, /* greek capital letter kappa, U+039A */
+  {"Lambda",     923}, /* greek capital letter lambda, U+039B ISOgrk3 */
+  {"Mu",         924}, /* greek capital letter mu, U+039C */
+  {"Ntilde",     209}, /* latin capital letter N with tilde, U+00D1 ISOlat1 */
+  {"Nu",         925}, /* greek capital letter nu, U+039D */
+  {"OElig",      338}, /* latin capital ligature OE, U+0152 ISOlat2 */
+  {"Oacute",     211}, /* latin capital letter O with acute, U+00D3 ISOlat1 */
+  {"Ocirc",      212}, /* latin capital letter O with circumflex, U+00D4 ISOlat1 */
+  {"Ograve",     210}, /* latin capital letter O with grave, U+00D2 ISOlat1 */
+  {"Omega",      937}, /* greek capital letter omega, U+03A9 ISOgrk3 */
+  {"Omicron",    927}, /* greek capital letter omicron, U+039F */
+  {"Oslash",     216}, /* latin capital letter O with stroke = latin capital letter O slash, U+00D8 ISOlat1 */
+  {"Otilde",     213}, /* latin capital letter O with tilde, U+00D5 ISOlat1 */
+  {"Ouml",       214}, /* latin capital letter O with diaeresis, U+00D6 ISOlat1 */
+  {"Phi",        934}, /* greek capital letter phi, U+03A6 ISOgrk3 */
+  {"Pi",         928}, /* greek capital letter pi, U+03A0 ISOgrk3 */
+  {"Prime",     8243}, /* double prime = seconds = inches, U+2033 ISOtech */
+  {"Psi",        936}, /* greek capital letter psi, U+03A8 ISOgrk3 */
+  {"Rho",        929}, /* greek capital letter rho, U+03A1 */
+  {"Scaron",     352}, /* latin capital letter S with caron, U+0160 ISOlat2 */
+/* there is no Sigmaf, and no U+03A2 character either */
+  {"Sigma",      931}, /* greek capital letter sigma, U+03A3 ISOgrk3 */
+  {"THORN",      222}, /* latin capital letter THORN, U+00DE ISOlat1 */
+  {"Tau",        932}, /* greek capital letter tau, U+03A4 */
+  {"Theta",      920}, /* greek capital letter theta, U+0398 ISOgrk3 */
+  {"Uacute",     218}, /* latin capital letter U with acute, U+00DA ISOlat1 */
+  {"Ucirc",      219}, /* latin capital letter U with circumflex, U+00DB ISOlat1 */
+  {"Ugrave",     217}, /* latin capital letter U with grave, U+00D9 ISOlat1 */
+  {"Upsilon",    933}, /* greek capital letter upsilon, U+03A5 ISOgrk3 */
+  {"Uuml",       220}, /* latin capital letter U with diaeresis, U+00DC ISOlat1 */
+  {"Xi",         926}, /* greek capital letter xi, U+039E ISOgrk3 */
+  {"Yacute",     221}, /* latin capital letter Y with acute, U+00DD ISOlat1 */
+  {"Yuml",       376}, /* latin capital letter Y with diaeresis, U+0178 ISOlat2 */
+  {"Zeta",       918}, /* greek capital letter zeta, U+0396 */
+  {"aacute",     225}, /* latin small letter a with acute, U+00E1 ISOlat1 */
+  {"acirc",      226}, /* latin small letter a with circumflex, U+00E2 ISOlat1 */
+  {"acute",      180}, /* acute accent = spacing acute, U+00B4 ISOdia */
+  {"aelig",      230}, /* latin small letter ae = latin small ligature ae, U+00E6 ISOlat1 */
+  {"agrave",     224}, /* latin small letter a with grave = latin small letter a grave, U+00E0 ISOlat1 */
+  {"alefsym",   8501}, /* alef symbol = first transfinite cardinal, U+2135 NEW */
+/* alef symbol is NOT the same as hebrew letter alef, U+05D0 although the same glyph could be used to depict both characters */
+  {"alpha",      945}, /* greek small letter alpha, U+03B1 ISOgrk3 */
+  {"amp",         38}, /* ampersand, U+0026 ISOnum */
+  {"and",       8743}, /* logical and = wedge, U+2227 ISOtech */
+  {"ang",       8736}, /* angle, U+2220 ISOamso */
+  {"aring",      229}, /* latin small letter a with ring above = latin small letter a ring, U+00E5 ISOlat1 */
+  {"asymp",     8776}, /* almost equal to = asymptotic to, U+2248 ISOamsr */
+  {"atilde",     227}, /* latin small letter a with tilde, U+00E3 ISOlat1 */
+  {"auml",       228}, /* latin small letter a with diaeresis, U+00E4 ISOlat1 */
+  {"bdquo",     8222}, /* double low-9 quotation mark, U+201E NEW */
+  {"beta",       946}, /* greek small letter beta, U+03B2 ISOgrk3 */
+  {"brvbar",     166}, /* broken bar = broken vertical bar, U+00A6 ISOnum */
+  {"bull",      8226}, /* bullet = black small circle, U+2022 ISOpub  */
+/* bullet is NOT the same as bullet operator, U+2219 */
+  {"cap",       8745}, /* intersection = cap, U+2229 ISOtech */
+  {"ccedil",     231}, /* latin small letter c with cedilla, U+00E7 ISOlat1 */
+  {"cedil",      184}, /* cedilla = spacing cedilla, U+00B8 ISOdia */
+  {"cent",       162}, /* cent sign, U+00A2 ISOnum */
+  {"chi",        967}, /* greek small letter chi, U+03C7 ISOgrk3 */
+  {"circ",       710}, /* modifier letter circumflex accent, U+02C6 ISOpub */
+  {"clubs",     9827}, /* black club suit = shamrock, U+2663 ISOpub */
+  {"cong",      8773}, /* approximately equal to, U+2245 ISOtech */
+  {"copy",       169}, /* copyright sign, U+00A9 ISOnum */
+  {"crarr",     8629}, /* downwards arrow with corner leftwards = carriage return, U+21B5 NEW */
+  {"cup",       8746}, /* union = cup, U+222A ISOtech */
+  {"curren",     164}, /* currency sign, U+00A4 ISOnum */
+  {"dArr",      8659}, /* downwards double arrow, U+21D3 ISOamsa */
+  {"dagger",    8224}, /* dagger, U+2020 ISOpub */
+  {"darr",      8595}, /* downwards arrow, U+2193 ISOnum */
+  {"deg",        176}, /* degree sign, U+00B0 ISOnum */
+  {"delta",      948}, /* greek small letter delta, U+03B4 ISOgrk3 */
+  {"diams",     9830}, /* black diamond suit, U+2666 ISOpub */
+  {"divide",     247}, /* division sign, U+00F7 ISOnum */
+  {"eacute",     233}, /* latin small letter e with acute, U+00E9 ISOlat1 */
+  {"ecirc",      234}, /* latin small letter e with circumflex, U+00EA ISOlat1 */
+  {"egrave",     232}, /* latin small letter e with grave, U+00E8 ISOlat1 */
+  {"empty",     8709}, /* empty set = null set = diameter, U+2205 ISOamso */
+  {"emsp",      8195}, /* em space, U+2003 ISOpub */
+  {"ensp",      8194}, /* en space, U+2002 ISOpub */
+  {"epsilon",    949}, /* greek small letter epsilon, U+03B5 ISOgrk3 */
+  {"equiv",     8801}, /* identical to, U+2261 ISOtech */
+  {"eta",        951}, /* greek small letter eta, U+03B7 ISOgrk3 */
+  {"eth",        240}, /* latin small letter eth, U+00F0 ISOlat1 */
+  {"euml",       235}, /* latin small letter e with diaeresis, U+00EB ISOlat1 */
+  {"euro",      8364}, /* euro sign, U+20AC NEW */
+  {"exist",     8707}, /* there exists, U+2203 ISOtech */
+  {"fnof",       402}, /* latin small f with hook = function = florin, U+0192 ISOtech */
+  {"forall",    8704}, /* for all, U+2200 ISOtech */
+  {"frac12",     189}, /* vulgar fraction one half = fraction one half, U+00BD ISOnum */
+  {"frac14",     188}, /* vulgar fraction one quarter = fraction one quarter, U+00BC ISOnum */
+  {"frac34",     190}, /* vulgar fraction three quarters = fraction three quarters, U+00BE ISOnum */
+  {"frasl",     8260}, /* fraction slash, U+2044 NEW */
+  {"gamma",      947}, /* greek small letter gamma, U+03B3 ISOgrk3 */
+  {"ge",        8805}, /* greater-than or equal to, U+2265 ISOtech */
+  {"gt",          62}, /* greater-than sign, U+003E ISOnum */
+  {"hArr",      8660}, /* left right double arrow, U+21D4 ISOamsa */
+  {"harr",      8596}, /* left right arrow, U+2194 ISOamsa */
+  {"hearts",    9829}, /* black heart suit = valentine, U+2665 ISOpub */
+  {"hellip",    8230}, /* horizontal ellipsis = three dot leader, U+2026 ISOpub  */
+  {"iacute",     237}, /* latin small letter i with acute, U+00ED ISOlat1 */
+  {"icirc",      238}, /* latin small letter i with circumflex, U+00EE ISOlat1 */
+  {"iexcl",      161}, /* inverted exclamation mark, U+00A1 ISOnum */
+  {"igrave",     236}, /* latin small letter i with grave, U+00EC ISOlat1 */
+  {"image",     8465}, /* blackletter capital I = imaginary part, U+2111 ISOamso */
+  {"infin",     8734}, /* infinity, U+221E ISOtech */
+  {"int",       8747}, /* integral, U+222B ISOtech */
+  {"iota",       953}, /* greek small letter iota, U+03B9 ISOgrk3 */
+  {"iquest",     191}, /* inverted question mark = turned question mark, U+00BF ISOnum */
+  {"isin",      8712}, /* element of, U+2208 ISOtech */
+  {"iuml",       239}, /* latin small letter i with diaeresis, U+00EF ISOlat1 */
+  {"kappa",      954}, /* greek small letter kappa, U+03BA ISOgrk3 */
+  {"lArr",      8656}, /* leftwards double arrow, U+21D0 ISOtech */
+/* Unicode does not say that lArr is the same as the 'is implied by' arrow
+    but also does not have any other character for that function. So ? lArr can
+    be used for 'is implied by' as ISOtech suggests */
+  {"lambda",     955}, /* greek small letter lambda, U+03BB ISOgrk3 */
+  {"lang",      9001}, /* left-pointing angle bracket = bra, U+2329 ISOtech */
+/* lang is NOT the same character as U+003C 'less than' or U+2039 'single left-pointing angle quotation mark' */
+  {"laquo",      171}, /* left-pointing double angle quotation mark = left pointing guillemet, U+00AB ISOnum */
+  {"larr",      8592}, /* leftwards arrow, U+2190 ISOnum */
+  {"lceil",     8968}, /* left ceiling = apl upstile, U+2308 ISOamsc  */
+  {"ldquo",     8220}, /* left double quotation mark, U+201C ISOnum */
+  {"le",        8804}, /* less-than or equal to, U+2264 ISOtech */
+  {"lfloor",    8970}, /* left floor = apl downstile, U+230A ISOamsc  */
+  {"lowast",    8727}, /* asterisk operator, U+2217 ISOtech */
+  {"loz",       9674}, /* lozenge, U+25CA ISOpub */
+  {"lrm",       8206}, /* left-to-right mark, U+200E NEW RFC 2070 */
+  {"lsaquo",    8249}, /* single left-pointing angle quotation mark, U+2039 ISO proposed */
+/* lsaquo is proposed but not yet ISO standardised */
+  {"lsquo",     8216}, /* left single quotation mark, U+2018 ISOnum */
+  {"lt",          60}, /* less-than sign, U+003C ISOnum */
+  {"macr",       175}, /* macron = spacing macron = overline = APL overbar, U+00AF ISOdia */
+  {"mdash",     8212}, /* em dash, U+2014 ISOpub */
+  {"micro",      181}, /* micro sign, U+00B5 ISOnum */
+  {"middot",     183}, /* middle dot = Georgian comma = Greek middle dot, U+00B7 ISOnum */
+  {"minus",     8722}, /* minus sign, U+2212 ISOtech */
+  {"mu",         956}, /* greek small letter mu, U+03BC ISOgrk3 */
+  {"nabla",     8711}, /* nabla = backward difference, U+2207 ISOtech */
+  {"nbsp",       160}, /* no-break space = non-breaking space, U+00A0 ISOnum */
+  {"ndash",     8211}, /* en dash, U+2013 ISOpub */
+  {"ne",        8800}, /* not equal to, U+2260 ISOtech */
+  {"ni",        8715}, /* contains as member, U+220B ISOtech */
+/* should there be a more memorable name than 'ni'? */
+  {"not",        172}, /* not sign = discretionary hyphen, U+00AC ISOnum */
+  {"notin",     8713}, /* not an element of, U+2209 ISOtech */
+  {"nsub",      8836}, /* not a subset of, U+2284 ISOamsn */
+  {"ntilde",     241}, /* latin small letter n with tilde, U+00F1 ISOlat1 */
+  {"nu",         957}, /* greek small letter nu, U+03BD ISOgrk3 */
+  {"oacute",     243}, /* latin small letter o with acute, U+00F3 ISOlat1 */
+  {"ocirc",      244}, /* latin small letter o with circumflex, U+00F4 ISOlat1 */
+  {"oelig",      339}, /* latin small ligature oe, U+0153 ISOlat2 */
+  {"ograve",     242}, /* latin small letter o with grave, U+00F2 ISOlat1 */
+  {"oline",     8254}, /* overline = spacing overscore, U+203E NEW */
+  {"omega",      969}, /* greek small letter omega, U+03C9 ISOgrk3 */
+  {"omicron",    959}, /* greek small letter omicron, U+03BF NEW */
+  {"oplus",     8853}, /* circled plus = direct sum, U+2295 ISOamsb */
+  {"or",        8744}, /* logical or = vee, U+2228 ISOtech */
+  {"ordf",       170}, /* feminine ordinal indicator, U+00AA ISOnum */
+  {"ordm",       186}, /* masculine ordinal indicator, U+00BA ISOnum */
+  {"oslash",     248}, /* latin small letter o with stroke, = latin small letter o slash, U+00F8 ISOlat1 */
+  {"otilde",     245}, /* latin small letter o with tilde, U+00F5 ISOlat1 */
+  {"otimes",    8855}, /* circled times = vector product, U+2297 ISOamsb */
+  {"ouml",       246}, /* latin small letter o with diaeresis, U+00F6 ISOlat1 */
+  {"para",       182}, /* pilcrow sign = paragraph sign, U+00B6 ISOnum */
+  {"part",      8706}, /* partial differential, U+2202 ISOtech  */
+  {"permil",    8240}, /* per mille sign, U+2030 ISOtech */
+  {"perp",      8869}, /* up tack = orthogonal to = perpendicular, U+22A5 ISOtech */
+  {"phi",        966}, /* greek small letter phi, U+03C6 ISOgrk3 */
+  {"pi",         960}, /* greek small letter pi, U+03C0 ISOgrk3 */
+  {"piv",        982}, /* greek pi symbol, U+03D6 ISOgrk3 */
+  {"plusmn",     177}, /* plus-minus sign = plus-or-minus sign, U+00B1 ISOnum */
+  {"pound",      163}, /* pound sign, U+00A3 ISOnum */
+  {"prime",     8242}, /* prime = minutes = feet, U+2032 ISOtech */
+  {"prod",      8719}, /* n-ary product = product sign, U+220F ISOamsb */
+/* prod is NOT the same character as U+03A0 'greek capital letter pi' though the same glyph might be used for both */
+  {"prop",      8733}, /* proportional to, U+221D ISOtech */
+  {"psi",        968}, /* greek small letter psi, U+03C8 ISOgrk3 */
+  {"quot",        34}, /* quotation mark = APL quote, U+0022 ISOnum */
+  {"rArr",      8658}, /* rightwards double arrow, U+21D2 ISOtech */
+/* Unicode does not say this is the 'implies' character but does not have
+     another character with this function so ?
+     rArr can be used for 'implies' as ISOtech suggests */
+  {"radic",     8730}, /* square root = radical sign, U+221A ISOtech */
+  {"rang",      9002}, /* right-pointing angle bracket = ket, U+232A ISOtech */
+/* rang is NOT the same character as U+003E 'greater than' or U+203A 'single right-pointing angle quotation mark' */
+  {"raquo",      187}, /* right-pointing double angle quotation mark = right pointing guillemet, U+00BB ISOnum */
+  {"rarr",      8594}, /* rightwards arrow, U+2192 ISOnum */
+  {"rceil",     8969}, /* right ceiling, U+2309 ISOamsc  */
+  {"rdquo",     8221}, /* right double quotation mark, U+201D ISOnum */
+  {"real",      8476}, /* blackletter capital R = real part symbol, U+211C ISOamso */
+  {"reg",        174}, /* registered sign = registered trade mark sign, U+00AE ISOnum */
+  {"rfloor",    8971}, /* right floor, U+230B ISOamsc  */
+  {"rho",        961}, /* greek small letter rho, U+03C1 ISOgrk3 */
+  {"rlm",       8207}, /* right-to-left mark, U+200F NEW RFC 2070 */
+  {"rsaquo",    8250}, /* single right-pointing angle quotation mark, U+203A ISO proposed */
+/* rsaquo is proposed but not yet ISO standardised */
+  {"rsquo",     8217}, /* right single quotation mark, U+2019 ISOnum */
+  {"sbquo",     8218}, /* single low-9 quotation mark, U+201A NEW */
+  {"scaron",     353}, /* latin small letter s with caron, U+0161 ISOlat2 */
+  {"sdot",      8901}, /* dot operator, U+22C5 ISOamsb */
+/* dot operator is NOT the same character as U+00B7 middle dot */
+  {"sect",       167}, /* section sign, U+00A7 ISOnum */
+  {"shy",        173}, /* soft hyphen = discretionary hyphen, U+00AD ISOnum */
+  {"sigma",      963}, /* greek small letter sigma, U+03C3 ISOgrk3 */
+  {"sigmaf",     962}, /* greek small letter final sigma, U+03C2 ISOgrk3 */
+  {"sim",       8764}, /* tilde operator = varies with = similar to, U+223C ISOtech */
+/* tilde operator is NOT the same character as the tilde, U+007E, although the same glyph might be used to represent both */
+  {"spades",    9824}, /* black spade suit, U+2660 ISOpub */
+/* black here seems to mean filled as opposed to hollow */
+  {"sub",       8834}, /* subset of, U+2282 ISOtech */
+  {"sube",      8838}, /* subset of or equal to, U+2286 ISOtech */
+  {"sum",       8721}, /* n-ary sumation, U+2211 ISOamsb */
+/* sum is NOT the same character as U+03A3 'greek capital letter sigma' though the same glyph might be used for both */
+  {"sup",       8835}, /* superset of, U+2283 ISOtech */
+/* note that nsup, 'not a superset of, U+2283' is not covered by the Symbol
+     font encoding and is not included. Should it be, for symmetry?
+     It is in ISOamsn */
+  {"sup1",       185}, /* superscript one = superscript digit one, U+00B9 ISOnum */
+  {"sup2",       178}, /* superscript two = superscript digit two = squared, U+00B2 ISOnum */
+  {"sup3",       179}, /* superscript three = superscript digit three = cubed, U+00B3 ISOnum */
+  {"supe",      8839}, /* superset of or equal to, U+2287 ISOtech */
+  {"szlig",      223}, /* latin small letter sharp s = ess-zed,  U+00DF ISOlat1 */
+  {"tau",        964}, /* greek small letter tau, U+03C4 ISOgrk3 */
+  {"there4",    8756}, /* therefore, U+2234 ISOtech */
+  {"theta",      952}, /* greek small letter theta, U+03B8 ISOgrk3 */
+  {"thetasym",   977}, /* greek small letter theta symbol, U+03D1 NEW */
+  {"thinsp",    8201}, /* thin space, U+2009 ISOpub */
+  {"thorn",      254}, /* latin small letter thorn with, U+00FE ISOlat1 */
+  {"tilde",      732}, /* small tilde, U+02DC ISOdia */
+  {"times",      215}, /* multiplication sign, U+00D7 ISOnum */
+  {"trade",     8482}, /* trade mark sign, U+2122 ISOnum */
+  {"uArr",      8657}, /* upwards double arrow, U+21D1 ISOamsa */
+  {"uacute",     250}, /* latin small letter u with acute, U+00FA ISOlat1 */
+  {"uarr",      8593}, /* upwards arrow, U+2191 ISOnum */
+  {"ucirc",      251}, /* latin small letter u with circumflex, U+00FB ISOlat1 */
+  {"ugrave",     249}, /* latin small letter u with grave, U+00F9 ISOlat1 */
+  {"uml",        168}, /* diaeresis = spacing diaeresis, U+00A8 ISOdia */
+  {"upsih",      978}, /* greek upsilon with hook symbol, U+03D2 NEW */
+  {"upsilon",    965}, /* greek small letter upsilon, U+03C5 ISOgrk3 */
+  {"uuml",       252}, /* latin small letter u with diaeresis, U+00FC ISOlat1 */
+  {"weierp",    8472}, /* script capital P = power set = Weierstrass p, U+2118 ISOamso */
+  {"xi",         958}, /* greek small letter xi, U+03BE ISOgrk3 */
+  {"yacute",     253}, /* latin small letter y with acute, U+00FD ISOlat1 */
+  {"yen",        165}, /* yen sign = yuan sign, U+00A5 ISOnum */
+  {"yuml",       255}, /* latin small letter y with diaeresis, U+00FF ISOlat1 */
+  {"zeta",       950}, /* greek small letter zeta, U+03B6 ISOgrk3 */
+  {"zwj",       8205}, /* zero width joiner, U+200D NEW RFC 2070 */
+  {"zwnj",      8204}, /* zero width non-joiner, U+200C NEW RFC 2070 */
+};
+
+#else /* not ENTITIES_HTML40_ONLY: */
+/***************************************************************************
+
+This table prepared from ftp://ftp.unicode.org/MAPPINGS/VENDORS/MISC/SGML.TXT
+original comment follows:
+
+
+# Author: John Cowan <cowan@ccil.org>
+# Date: 25 July 1997
+#
+# The following table maps SGML character entities from various
+# public sets (namely, ISOamsa, ISOamsb, ISOamsc, ISOamsn, ISOamso,
+# ISOamsr, ISObox, ISOcyr1, ISOcyr2, ISOdia, ISOgrk1, ISOgrk2,
+# ISOgrk3, ISOgrk4, ISOlat1, ISOlat2, ISOnum, ISOpub, ISOtech,
+# HTMLspecial, HTMLsymbol) to corresponding Unicode characters.
+#
+# The table has four tab-separated columns:
+#	Column 1: SGML character entity name
+#	Column 2: SGML public entity set
+#	Column 3: Unicode 2.0 character code
+#	Column 4: Unicode 2.0 character name (UPPER CASE)
+# Entries which don't have Unicode equivalents have "0x????"
+# in Column 3 and a lower case description (from the public entity
+# set DTD) in Column 4.  The mapping is not reversible, because many
+# distinctions are unified away in Unicode, particularly between
+# mathematical symbols.
+
+
+   We just sort it and move column 2 away (line too long, sorry;
+   look at sgml.html in test/ directory for details).
+
+Changes:
+   * Add few (obsolete) synonyms for compatibility with Lynx/2.5 and up:
+          "brkbar"  for "brvbar" 0x00A6
+          "emdash"  for "mdash" 0x2014
+          "endash"  for "ndash" 0x2013
+          "hibar"  for "macr" 0x00AF
+     BTW, lots of synonyms found in this table, we shouldn't worry about...
+     Totally around 1000 entries.
+
+
+Modified by Jacob Poon <jacob.poon@utoronto.ca>
+
+This table is modified improve support of HTML 4.0 character entity references,
+including Euro symbol support ("euro" 0x20AC).
+
+Known issues:
+
+The original table includes two different definitions of &loz; reference.
+Since HTML 4.0 only uses U+25CA, the U+2727 definition is commented out,
+until there is a good reason to put it back in.
+
+"b.delta" mapping fixed (was 0x03B3 = small gamma).
+
+At the end of the table, there are several unnumbered, commented references.
+These are not defined in HTML 4.0, and will remain so until they are defined
+in future SGML/HTML standards.
+
+The support for obsolete references are for backwards compatibility only.  New
+SGML/HTML documents should not depend on these references just because Lynx can
+display them.
+
+****/
+{
+  {"AElig",	0x00C6},  /* LATIN CAPITAL LETTER AE			   */
+  {"Aacgr",	0x0386},  /* GREEK CAPITAL LETTER ALPHA WITH TONOS	   */
+  {"Aacute",	0x00C1},  /* LATIN CAPITAL LETTER A WITH ACUTE		   */
+  {"Abreve",	0x0102},  /* LATIN CAPITAL LETTER A WITH BREVE		   */
+  {"Acirc",	0x00C2},  /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX	   */
+  {"Acy",	0x0410},  /* CYRILLIC CAPITAL LETTER A			   */
+  {"Agr",	0x0391},  /* GREEK CAPITAL LETTER ALPHA 		   */
+  {"Agrave",	0x00C0},  /* LATIN CAPITAL LETTER A WITH GRAVE		   */
+  {"Alpha",	0x0391},  /* GREEK CAPITAL LETTER ALPHA 		   */
+  {"Amacr",	0x0100},  /* LATIN CAPITAL LETTER A WITH MACRON 	   */
+  {"Aogon",	0x0104},  /* LATIN CAPITAL LETTER A WITH OGONEK 	   */
+  {"Aring",	0x00C5},  /* LATIN CAPITAL LETTER A WITH RING ABOVE	   */
+  {"Atilde",	0x00C3},  /* LATIN CAPITAL LETTER A WITH TILDE		   */
+  {"Auml",	0x00C4},  /* LATIN CAPITAL LETTER A WITH DIAERESIS	   */
+  {"Barwed",	0x2306},  /* PERSPECTIVE				   */
+  {"Bcy",	0x0411},  /* CYRILLIC CAPITAL LETTER BE 		   */
+  {"Beta",	0x0392},  /* GREEK CAPITAL LETTER BETA			   */
+  {"Bgr",	0x0392},  /* GREEK CAPITAL LETTER BETA			   */
+  {"CHcy",	0x0427},  /* CYRILLIC CAPITAL LETTER CHE		   */
+  {"Cacute",	0x0106},  /* LATIN CAPITAL LETTER C WITH ACUTE		   */
+  {"Cap",	0x22D2},  /* DOUBLE INTERSECTION			   */
+  {"Ccaron",	0x010C},  /* LATIN CAPITAL LETTER C WITH CARON		   */
+  {"Ccedil",	0x00C7},  /* LATIN CAPITAL LETTER C WITH CEDILLA	   */
+  {"Ccirc",	0x0108},  /* LATIN CAPITAL LETTER C WITH CIRCUMFLEX	   */
+  {"Cdot",	0x010A},  /* LATIN CAPITAL LETTER C WITH DOT ABOVE	   */
+  {"Chi",	0x03A7},  /* GREEK CAPITAL LETTER CHI			   */
+  {"Cup",	0x22D3},  /* DOUBLE UNION				   */
+  {"DJcy",	0x0402},  /* CYRILLIC CAPITAL LETTER DJE		   */
+  {"DScy",	0x0405},  /* CYRILLIC CAPITAL LETTER DZE		   */
+  {"DZcy",	0x040F},  /* CYRILLIC CAPITAL LETTER DZHE		   */
+  {"Dagger",	0x2021},  /* DOUBLE DAGGER				   */
+  {"Dcaron",	0x010E},  /* LATIN CAPITAL LETTER D WITH CARON		   */
+  {"Dcy",	0x0414},  /* CYRILLIC CAPITAL LETTER DE 		   */
+  {"Delta",	0x0394},  /* GREEK CAPITAL LETTER DELTA 		   */
+  {"Dgr",	0x0394},  /* GREEK CAPITAL LETTER DELTA 		   */
+  {"Dot",	0x00A8},  /* DIAERESIS					   */
+  {"DotDot",	0x20DC},  /* COMBINING FOUR DOTS ABOVE			   */
+  {"Dstrok",	0x0110},  /* LATIN CAPITAL LETTER D WITH STROKE 	   */
+  {"EEacgr",	0x0389},  /* GREEK CAPITAL LETTER ETA WITH TONOS	   */
+  {"EEgr",	0x0397},  /* GREEK CAPITAL LETTER ETA			   */
+  {"ENG",	0x014A},  /* LATIN CAPITAL LETTER ENG			   */
+  {"ETH",	0x00D0},  /* LATIN CAPITAL LETTER ETH			   */
+  {"Eacgr",	0x0388},  /* GREEK CAPITAL LETTER EPSILON WITH TONOS	   */
+  {"Eacute",	0x00C9},  /* LATIN CAPITAL LETTER E WITH ACUTE		   */
+  {"Ecaron",	0x011A},  /* LATIN CAPITAL LETTER E WITH CARON		   */
+  {"Ecirc",	0x00CA},  /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX	   */
+  {"Ecy",	0x042D},  /* CYRILLIC CAPITAL LETTER E			   */
+  {"Edot",	0x0116},  /* LATIN CAPITAL LETTER E WITH DOT ABOVE	   */
+  {"Egr",	0x0395},  /* GREEK CAPITAL LETTER EPSILON		   */
+  {"Egrave",	0x00C8},  /* LATIN CAPITAL LETTER E WITH GRAVE		   */
+  {"Emacr",	0x0112},  /* LATIN CAPITAL LETTER E WITH MACRON 	   */
+  {"Eogon",	0x0118},  /* LATIN CAPITAL LETTER E WITH OGONEK 	   */
+  {"Epsilon",	0x0395},  /* GREEK CAPITAL LETTER EPSILON		   */
+  {"Eta",	0x0397},  /* GREEK CAPITAL LETTER ETA			   */
+  {"Euml",	0x00CB},  /* LATIN CAPITAL LETTER E WITH DIAERESIS	   */
+  {"Fcy",	0x0424},  /* CYRILLIC CAPITAL LETTER EF 		   */
+  {"GJcy",	0x0403},  /* CYRILLIC CAPITAL LETTER GJE		   */
+  {"Gamma",	0x0393},  /* GREEK CAPITAL LETTER GAMMA 		   */
+  {"Gbreve",	0x011E},  /* LATIN CAPITAL LETTER G WITH BREVE		   */
+  {"Gcedil",	0x0122},  /* LATIN CAPITAL LETTER G WITH CEDILLA	   */
+  {"Gcirc",	0x011C},  /* LATIN CAPITAL LETTER G WITH CIRCUMFLEX	   */
+  {"Gcy",	0x0413},  /* CYRILLIC CAPITAL LETTER GHE		   */
+  {"Gdot",	0x0120},  /* LATIN CAPITAL LETTER G WITH DOT ABOVE	   */
+  {"Gg",	0x22D9},  /* VERY MUCH GREATER-THAN			   */
+  {"Ggr",	0x0393},  /* GREEK CAPITAL LETTER GAMMA 		   */
+  {"Gt",	0x226B},  /* MUCH GREATER-THAN				   */
+  {"HARDcy",	0x042A},  /* CYRILLIC CAPITAL LETTER HARD SIGN		   */
+  {"Hcirc",	0x0124},  /* LATIN CAPITAL LETTER H WITH CIRCUMFLEX	   */
+  {"Hstrok",	0x0126},  /* LATIN CAPITAL LETTER H WITH STROKE 	   */
+  {"IEcy",	0x0415},  /* CYRILLIC CAPITAL LETTER IE 		   */
+  {"IJlig",	0x0132},  /* LATIN CAPITAL LIGATURE IJ			   */
+  {"IOcy",	0x0401},  /* CYRILLIC CAPITAL LETTER IO 		   */
+  {"Iacgr",	0x038A},  /* GREEK CAPITAL LETTER IOTA WITH TONOS	   */
+  {"Iacute",	0x00CD},  /* LATIN CAPITAL LETTER I WITH ACUTE		   */
+  {"Icirc",	0x00CE},  /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX	   */
+  {"Icy",	0x0418},  /* CYRILLIC CAPITAL LETTER I			   */
+  {"Idigr",	0x03AA},  /* GREEK CAPITAL LETTER IOTA WITH DIALYTIKA	   */
+  {"Idot",	0x0130},  /* LATIN CAPITAL LETTER I WITH DOT ABOVE	   */
+  {"Igr",	0x0399},  /* GREEK CAPITAL LETTER IOTA			   */
+  {"Igrave",	0x00CC},  /* LATIN CAPITAL LETTER I WITH GRAVE		   */
+  {"Imacr",	0x012A},  /* LATIN CAPITAL LETTER I WITH MACRON 	   */
+  {"Iogon",	0x012E},  /* LATIN CAPITAL LETTER I WITH OGONEK 	   */
+  {"Iota",	0x0399},  /* GREEK CAPITAL LETTER IOTA			   */
+  {"Itilde",	0x0128},  /* LATIN CAPITAL LETTER I WITH TILDE		   */
+  {"Iukcy",	0x0406},  /* CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN*/
+  {"Iuml",	0x00CF},  /* LATIN CAPITAL LETTER I WITH DIAERESIS	   */
+  {"Jcirc",	0x0134},  /* LATIN CAPITAL LETTER J WITH CIRCUMFLEX	   */
+  {"Jcy",	0x0419},  /* CYRILLIC CAPITAL LETTER SHORT I		   */
+  {"Jsercy",	0x0408},  /* CYRILLIC CAPITAL LETTER JE 		   */
+  {"Jukcy",	0x0404},  /* CYRILLIC CAPITAL LETTER UKRAINIAN IE	   */
+  {"KHcy",	0x0425},  /* CYRILLIC CAPITAL LETTER HA 		   */
+  {"KHgr",	0x03A7},  /* GREEK CAPITAL LETTER CHI			   */
+  {"KJcy",	0x040C},  /* CYRILLIC CAPITAL LETTER KJE		   */
+  {"Kappa",	0x039A},  /* GREEK CAPITAL LETTER KAPPA 		   */
+  {"Kcedil",	0x0136},  /* LATIN CAPITAL LETTER K WITH CEDILLA	   */
+  {"Kcy",	0x041A},  /* CYRILLIC CAPITAL LETTER KA 		   */
+  {"Kgr",	0x039A},  /* GREEK CAPITAL LETTER KAPPA 		   */
+  {"LJcy",	0x0409},  /* CYRILLIC CAPITAL LETTER LJE		   */
+  {"Lacute",	0x0139},  /* LATIN CAPITAL LETTER L WITH ACUTE		   */
+  {"Lambda",	0x039B},  /* GREEK CAPITAL LETTER LAMDA 		   */
+  {"Larr",	0x219E},  /* LEFTWARDS TWO HEADED ARROW 		   */
+  {"Lcaron",	0x013D},  /* LATIN CAPITAL LETTER L WITH CARON		   */
+  {"Lcedil",	0x013B},  /* LATIN CAPITAL LETTER L WITH CEDILLA	   */
+  {"Lcy",	0x041B},  /* CYRILLIC CAPITAL LETTER EL 		   */
+  {"Lgr",	0x039B},  /* GREEK CAPITAL LETTER LAMDA 		   */
+  {"Ll",	0x22D8},  /* VERY MUCH LESS-THAN			   */
+  {"Lmidot",	0x013F},  /* LATIN CAPITAL LETTER L WITH MIDDLE DOT	   */
+  {"Lstrok",	0x0141},  /* LATIN CAPITAL LETTER L WITH STROKE 	   */
+  {"Lt",	0x226A},  /* MUCH LESS-THAN				   */
+  {"Mcy",	0x041C},  /* CYRILLIC CAPITAL LETTER EM 		   */
+  {"Mgr",	0x039C},  /* GREEK CAPITAL LETTER MU			   */
+  {"Mu",	0x039C},  /* GREEK CAPITAL LETTER MU			   */
+  {"NJcy",	0x040A},  /* CYRILLIC CAPITAL LETTER NJE		   */
+  {"Nacute",	0x0143},  /* LATIN CAPITAL LETTER N WITH ACUTE		   */
+  {"Ncaron",	0x0147},  /* LATIN CAPITAL LETTER N WITH CARON		   */
+  {"Ncedil",	0x0145},  /* LATIN CAPITAL LETTER N WITH CEDILLA	   */
+  {"Ncy",	0x041D},  /* CYRILLIC CAPITAL LETTER EN 		   */
+  {"Ngr",	0x039D},  /* GREEK CAPITAL LETTER NU			   */
+  {"Ntilde",	0x00D1},  /* LATIN CAPITAL LETTER N WITH TILDE		   */
+  {"Nu",	0x039D},  /* GREEK CAPITAL LETTER NU			   */
+  {"OElig",	0x0152},  /* LATIN CAPITAL LIGATURE OE			   */
+  {"OHacgr",	0x038F},  /* GREEK CAPITAL LETTER OMEGA WITH TONOS	   */
+  {"OHgr",	0x03A9},  /* GREEK CAPITAL LETTER OMEGA 		   */
+  {"Oacgr",	0x038C},  /* GREEK CAPITAL LETTER OMICRON WITH TONOS	   */
+  {"Oacute",	0x00D3},  /* LATIN CAPITAL LETTER O WITH ACUTE		   */
+  {"Ocirc",	0x00D4},  /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX	   */
+  {"Ocy",	0x041E},  /* CYRILLIC CAPITAL LETTER O			   */
+  {"Odblac",	0x0150},  /* LATIN CAPITAL LETTER O WITH DOUBLE ACUTE	   */
+  {"Ogr",	0x039F},  /* GREEK CAPITAL LETTER OMICRON		   */
+  {"Ograve",	0x00D2},  /* LATIN CAPITAL LETTER O WITH GRAVE		   */
+  {"Omacr",	0x014C},  /* LATIN CAPITAL LETTER O WITH MACRON 	   */
+  {"Omega",	0x03A9},  /* GREEK CAPITAL LETTER OMEGA 		   */
+  {"Omicron",	0x039F},  /* GREEK CAPITAL LETTER OMICRON		   */
+  {"Oslash",	0x00D8},  /* LATIN CAPITAL LETTER O WITH STROKE 	   */
+  {"Otilde",	0x00D5},  /* LATIN CAPITAL LETTER O WITH TILDE		   */
+  {"Ouml",	0x00D6},  /* LATIN CAPITAL LETTER O WITH DIAERESIS	   */
+  {"PHgr",	0x03A6},  /* GREEK CAPITAL LETTER PHI			   */
+  {"PSgr",	0x03A8},  /* GREEK CAPITAL LETTER PSI			   */
+  {"Pcy",	0x041F},  /* CYRILLIC CAPITAL LETTER PE 		   */
+  {"Pgr",	0x03A0},  /* GREEK CAPITAL LETTER PI			   */
+  {"Phi",	0x03A6},  /* GREEK CAPITAL LETTER PHI			   */
+  {"Pi",	0x03A0},  /* GREEK CAPITAL LETTER PI			   */
+  {"Prime",	0x2033},  /* DOUBLE PRIME				   */
+  {"Psi",	0x03A8},  /* GREEK CAPITAL LETTER PSI			   */
+  {"Racute",	0x0154},  /* LATIN CAPITAL LETTER R WITH ACUTE		   */
+  {"Rarr",	0x21A0},  /* RIGHTWARDS TWO HEADED ARROW		   */
+  {"Rcaron",	0x0158},  /* LATIN CAPITAL LETTER R WITH CARON		   */
+  {"Rcedil",	0x0156},  /* LATIN CAPITAL LETTER R WITH CEDILLA	   */
+  {"Rcy",	0x0420},  /* CYRILLIC CAPITAL LETTER ER 		   */
+  {"Rgr",	0x03A1},  /* GREEK CAPITAL LETTER RHO			   */
+  {"Rho",	0x03A1},  /* GREEK CAPITAL LETTER RHO			   */
+  {"SHCHcy",	0x0429},  /* CYRILLIC CAPITAL LETTER SHCHA		   */
+  {"SHcy",	0x0428},  /* CYRILLIC CAPITAL LETTER SHA		   */
+  {"SOFTcy",	0x042C},  /* CYRILLIC CAPITAL LETTER SOFT SIGN		   */
+  {"Sacute",	0x015A},  /* LATIN CAPITAL LETTER S WITH ACUTE		   */
+  {"Scaron",	0x0160},  /* LATIN CAPITAL LETTER S WITH CARON		   */
+  {"Scedil",	0x015E},  /* LATIN CAPITAL LETTER S WITH CEDILLA	   */
+  {"Scirc",	0x015C},  /* LATIN CAPITAL LETTER S WITH CIRCUMFLEX	   */
+  {"Scy",	0x0421},  /* CYRILLIC CAPITAL LETTER ES 		   */
+  {"Sgr",	0x03A3},  /* GREEK CAPITAL LETTER SIGMA 		   */
+  {"Sigma",	0x03A3},  /* GREEK CAPITAL LETTER SIGMA 		   */
+  {"Sub",	0x22D0},  /* DOUBLE SUBSET				   */
+  {"Sup",	0x22D1},  /* DOUBLE SUPERSET				   */
+  {"THORN",	0x00DE},  /* LATIN CAPITAL LETTER THORN 		   */
+  {"THgr",	0x0398},  /* GREEK CAPITAL LETTER THETA 		   */
+  {"TSHcy",	0x040B},  /* CYRILLIC CAPITAL LETTER TSHE		   */
+  {"TScy",	0x0426},  /* CYRILLIC CAPITAL LETTER TSE		   */
+  {"Tau",	0x03A4},  /* GREEK CAPITAL LETTER TAU			   */
+  {"Tcaron",	0x0164},  /* LATIN CAPITAL LETTER T WITH CARON		   */
+  {"Tcedil",	0x0162},  /* LATIN CAPITAL LETTER T WITH CEDILLA	   */
+  {"Tcy",	0x0422},  /* CYRILLIC CAPITAL LETTER TE 		   */
+  {"Tgr",	0x03A4},  /* GREEK CAPITAL LETTER TAU			   */
+  {"Theta",	0x0398},  /* GREEK CAPITAL LETTER THETA 		   */
+  {"Tstrok",	0x0166},  /* LATIN CAPITAL LETTER T WITH STROKE 	   */
+  {"Uacgr",	0x038E},  /* GREEK CAPITAL LETTER UPSILON WITH TONOS	   */
+  {"Uacute",	0x00DA},  /* LATIN CAPITAL LETTER U WITH ACUTE		   */
+  {"Ubrcy",	0x040E},  /* CYRILLIC CAPITAL LETTER SHORT U		   */
+  {"Ubreve",	0x016C},  /* LATIN CAPITAL LETTER U WITH BREVE		   */
+  {"Ucirc",	0x00DB},  /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX	   */
+  {"Ucy",	0x0423},  /* CYRILLIC CAPITAL LETTER U			   */
+  {"Udblac",	0x0170},  /* LATIN CAPITAL LETTER U WITH DOUBLE ACUTE	   */
+  {"Udigr",	0x03AB},  /* GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA   */
+  {"Ugr",	0x03A5},  /* GREEK CAPITAL LETTER UPSILON		   */
+  {"Ugrave",	0x00D9},  /* LATIN CAPITAL LETTER U WITH GRAVE		   */
+  {"Umacr",	0x016A},  /* LATIN CAPITAL LETTER U WITH MACRON 	   */
+  {"Uogon",	0x0172},  /* LATIN CAPITAL LETTER U WITH OGONEK 	   */
+  {"Upsi",	0x03A5},  /* GREEK CAPITAL LETTER UPSILON		   */
+  {"Upsilon",	0x03A5},  /* GREEK CAPITAL LETTER UPSILON		   */
+  {"Uring",	0x016E},  /* LATIN CAPITAL LETTER U WITH RING ABOVE	   */
+  {"Utilde",	0x0168},  /* LATIN CAPITAL LETTER U WITH TILDE		   */
+  {"Uuml",	0x00DC},  /* LATIN CAPITAL LETTER U WITH DIAERESIS	   */
+  {"Vcy",	0x0412},  /* CYRILLIC CAPITAL LETTER VE 		   */
+  {"Vdash",	0x22A9},  /* FORCES					   */
+  {"Verbar",	0x2016},  /* DOUBLE VERTICAL LINE			   */
+  {"Vvdash",	0x22AA},  /* TRIPLE VERTICAL BAR RIGHT TURNSTILE	   */
+  {"Wcirc",	0x0174},  /* LATIN CAPITAL LETTER W WITH CIRCUMFLEX	   */
+  {"Xgr",	0x039E},  /* GREEK CAPITAL LETTER XI			   */
+  {"Xi",	0x039E},  /* GREEK CAPITAL LETTER XI			   */
+  {"YAcy",	0x042F},  /* CYRILLIC CAPITAL LETTER YA 		   */
+  {"YIcy",	0x0407},  /* CYRILLIC CAPITAL LETTER YI 		   */
+  {"YUcy",	0x042E},  /* CYRILLIC CAPITAL LETTER YU 		   */
+  {"Yacute",	0x00DD},  /* LATIN CAPITAL LETTER Y WITH ACUTE		   */
+  {"Ycirc",	0x0176},  /* LATIN CAPITAL LETTER Y WITH CIRCUMFLEX	   */
+  {"Ycy",	0x042B},  /* CYRILLIC CAPITAL LETTER YERU		   */
+  {"Yuml",	0x0178},  /* LATIN CAPITAL LETTER Y WITH DIAERESIS	   */
+  {"ZHcy",	0x0416},  /* CYRILLIC CAPITAL LETTER ZHE		   */
+  {"Zacute",	0x0179},  /* LATIN CAPITAL LETTER Z WITH ACUTE		   */
+  {"Zcaron",	0x017D},  /* LATIN CAPITAL LETTER Z WITH CARON		   */
+  {"Zcy",	0x0417},  /* CYRILLIC CAPITAL LETTER ZE 		   */
+  {"Zdot",	0x017B},  /* LATIN CAPITAL LETTER Z WITH DOT ABOVE	   */
+  {"Zeta",	0x0396},  /* GREEK CAPITAL LETTER ZETA			   */
+  {"Zgr",	0x0396},  /* GREEK CAPITAL LETTER ZETA			   */
+  {"aacgr",	0x03AC},  /* GREEK SMALL LETTER ALPHA WITH TONOS	   */
+  {"aacute",	0x00E1},  /* LATIN SMALL LETTER A WITH ACUTE		   */
+  {"abreve",	0x0103},  /* LATIN SMALL LETTER A WITH BREVE		   */
+  {"acirc",	0x00E2},  /* LATIN SMALL LETTER A WITH CIRCUMFLEX	   */
+  {"acute",	0x00B4},  /* ACUTE ACCENT				   */
+  {"acy",	0x0430},  /* CYRILLIC SMALL LETTER A			   */
+  {"aelig",	0x00E6},  /* LATIN SMALL LETTER AE			   */
+  {"agr",	0x03B1},  /* GREEK SMALL LETTER ALPHA			   */
+  {"agrave",	0x00E0},  /* LATIN SMALL LETTER A WITH GRAVE		   */
+  {"alefsym",	0x2135},  /* ALEF SYMBOL				   */
+  {"aleph",	0x2135},  /* ALEF SYMBOL				   */
+  {"alpha",	0x03B1},  /* GREEK SMALL LETTER ALPHA			   */
+  {"amacr",	0x0101},  /* LATIN SMALL LETTER A WITH MACRON		   */
+  {"amalg",	0x2210},  /* N-ARY COPRODUCT				   */
+  {"amp",	0x0026},  /* AMPERSAND					   */
+  {"and",	0x2227},  /* LOGICAL AND				   */
+  {"ang",	0x2220},  /* ANGLE					   */
+  {"ang90",	0x221F},  /* RIGHT ANGLE				   */
+  {"angmsd",	0x2221},  /* MEASURED ANGLE				   */
+  {"angsph",	0x2222},  /* SPHERICAL ANGLE				   */
+  {"angst",	0x212B},  /* ANGSTROM SIGN				   */
+  {"aogon",	0x0105},  /* LATIN SMALL LETTER A WITH OGONEK		   */
+  {"ap",	0x2248},  /* ALMOST EQUAL TO				   */
+  {"ape",	0x224A},  /* ALMOST EQUAL OR EQUAL TO			   */
+  {"apos",	0x02BC},  /* MODIFIER LETTER APOSTROPHE 		   */
+  {"aring",	0x00E5},  /* LATIN SMALL LETTER A WITH RING ABOVE	   */
+  {"ast",	0x002A},  /* ASTERISK					   */
+  {"asymp",	0x2248},  /* ALMOST EQUAL TO				   */
+  {"atilde",	0x00E3},  /* LATIN SMALL LETTER A WITH TILDE		   */
+  {"auml",	0x00E4},  /* LATIN SMALL LETTER A WITH DIAERESIS	   */
+  {"b.Delta",	0x0394},  /* GREEK CAPITAL LETTER DELTA 		   */
+  {"b.Gamma",	0x0393},  /* GREEK CAPITAL LETTER GAMMA 		   */
+  {"b.Lambda",	0x039B},  /* GREEK CAPITAL LETTER LAMDA 		   */
+  {"b.Omega",	0x03A9},  /* GREEK CAPITAL LETTER OMEGA 		   */
+  {"b.Phi",	0x03A6},  /* GREEK CAPITAL LETTER PHI			   */
+  {"b.Pi",	0x03A0},  /* GREEK CAPITAL LETTER PI			   */
+  {"b.Psi",	0x03A8},  /* GREEK CAPITAL LETTER PSI			   */
+  {"b.Sigma",	0x03A3},  /* GREEK CAPITAL LETTER SIGMA 		   */
+  {"b.Theta",	0x0398},  /* GREEK CAPITAL LETTER THETA 		   */
+  {"b.Upsi",	0x03A5},  /* GREEK CAPITAL LETTER UPSILON		   */
+  {"b.Xi",	0x039E},  /* GREEK CAPITAL LETTER XI			   */
+  {"b.alpha",	0x03B1},  /* GREEK SMALL LETTER ALPHA			   */
+  {"b.beta",	0x03B2},  /* GREEK SMALL LETTER BETA			   */
+  {"b.chi",	0x03C7},  /* GREEK SMALL LETTER CHI			   */
+  {"b.delta",	0x03B4},  /* GREEK SMALL LETTER DELTA			   */
+  {"b.epsi",	0x03B5},  /* GREEK SMALL LETTER EPSILON 		   */
+  {"b.epsis",	0x03B5},  /* GREEK SMALL LETTER EPSILON 		   */
+  {"b.epsiv",	0x03B5},  /* GREEK SMALL LETTER EPSILON 		   */
+  {"b.eta",	0x03B7},  /* GREEK SMALL LETTER ETA			   */
+  {"b.gamma",	0x03B3},  /* GREEK SMALL LETTER GAMMA			   */
+  {"b.gammad",	0x03DC},  /* GREEK LETTER DIGAMMA			   */
+  {"b.iota",	0x03B9},  /* GREEK SMALL LETTER IOTA			   */
+  {"b.kappa",	0x03BA},  /* GREEK SMALL LETTER KAPPA			   */
+  {"b.kappav",	0x03F0},  /* GREEK KAPPA SYMBOL 			   */
+  {"b.lambda",	0x03BB},  /* GREEK SMALL LETTER LAMDA			   */
+  {"b.mu",	0x03BC},  /* GREEK SMALL LETTER MU			   */
+  {"b.nu",	0x03BD},  /* GREEK SMALL LETTER NU			   */
+  {"b.omega",	0x03CE},  /* GREEK SMALL LETTER OMEGA WITH TONOS	   */
+  {"b.phis",	0x03C6},  /* GREEK SMALL LETTER PHI			   */
+  {"b.phiv",	0x03D5},  /* GREEK PHI SYMBOL				   */
+  {"b.pi",	0x03C0},  /* GREEK SMALL LETTER PI			   */
+  {"b.piv",	0x03D6},  /* GREEK PI SYMBOL				   */
+  {"b.psi",	0x03C8},  /* GREEK SMALL LETTER PSI			   */
+  {"b.rho",	0x03C1},  /* GREEK SMALL LETTER RHO			   */
+  {"b.rhov",	0x03F1},  /* GREEK RHO SYMBOL				   */
+  {"b.sigma",	0x03C3},  /* GREEK SMALL LETTER SIGMA			   */
+  {"b.sigmav",	0x03C2},  /* GREEK SMALL LETTER FINAL SIGMA		   */
+  {"b.tau",	0x03C4},  /* GREEK SMALL LETTER TAU			   */
+  {"b.thetas",	0x03B8},  /* GREEK SMALL LETTER THETA			   */
+  {"b.thetav",	0x03D1},  /* GREEK THETA SYMBOL 			   */
+  {"b.upsi",	0x03C5},  /* GREEK SMALL LETTER UPSILON 		   */
+  {"b.xi",	0x03BE},  /* GREEK SMALL LETTER XI			   */
+  {"b.zeta",	0x03B6},  /* GREEK SMALL LETTER ZETA			   */
+  {"barwed",	0x22BC},  /* NAND					   */
+  {"bcong",	0x224C},  /* ALL EQUAL TO				   */
+  {"bcy",	0x0431},  /* CYRILLIC SMALL LETTER BE			   */
+  {"bdquo",	0x201E},  /* DOUBLE LOW-9 QUOTATION MARK		   */
+  {"becaus",	0x2235},  /* BECAUSE					   */
+  {"bepsi",	0x220D},  /* SMALL CONTAINS AS MEMBER			   */
+  {"bernou",	0x212C},  /* SCRIPT CAPITAL B				   */
+  {"beta",	0x03B2},  /* GREEK SMALL LETTER BETA			   */
+  {"beth",	0x2136},  /* BET SYMBOL 				   */
+  {"bgr",	0x03B2},  /* GREEK SMALL LETTER BETA			   */
+  {"blank",	0x2423},  /* OPEN BOX					   */
+  {"blk12",	0x2592},  /* MEDIUM SHADE				   */
+  {"blk14",	0x2591},  /* LIGHT SHADE				   */
+  {"blk34",	0x2593},  /* DARK SHADE 				   */
+  {"block",	0x2588},  /* FULL BLOCK 				   */
+  {"bottom",	0x22A5},  /* UP TACK					   */
+  {"bowtie",	0x22C8},  /* BOWTIE					   */
+  {"boxDL",	0x2557},  /* BOX DRAWINGS DOUBLE DOWN AND LEFT		   */
+  {"boxDR",	0x2554},  /* BOX DRAWINGS DOUBLE DOWN AND RIGHT 	   */
+  {"boxDl",	0x2556},  /* BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE	   */
+  {"boxDr",	0x2553},  /* BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE	   */
+  {"boxH",	0x2550},  /* BOX DRAWINGS DOUBLE HORIZONTAL		   */
+  {"boxHD",	0x2566},  /* BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL	   */
+  {"boxHU",	0x2569},  /* BOX DRAWINGS DOUBLE UP AND HORIZONTAL	   */
+  {"boxHd",	0x2564},  /* BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE*/
+  {"boxHu",	0x2567},  /* BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE  */
+  {"boxUL",	0x255D},  /* BOX DRAWINGS DOUBLE UP AND LEFT		   */
+  {"boxUR",	0x255A},  /* BOX DRAWINGS DOUBLE UP AND RIGHT		   */
+  {"boxUl",	0x255C},  /* BOX DRAWINGS UP DOUBLE AND LEFT SINGLE	   */
+  {"boxUr",	0x2559},  /* BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE	   */
+  {"boxV",	0x2551},  /* BOX DRAWINGS DOUBLE VERTICAL		   */
+  {"boxVH",	0x256C},  /* BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL   */
+  {"boxVL",	0x2563},  /* BOX DRAWINGS DOUBLE VERTICAL AND LEFT	   */
+  {"boxVR",	0x2560},  /* BOX DRAWINGS DOUBLE VERTICAL AND RIGHT	   */
+  {"boxVh",	0x256B},  /* BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SI*/
+  {"boxVl",	0x2562},  /* BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE  */
+  {"boxVr",	0x255F},  /* BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE */
+  {"boxdL",	0x2555},  /* BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE	   */
+  {"boxdR",	0x2552},  /* BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE	   */
+  {"boxdl",	0x2510},  /* BOX DRAWINGS LIGHT DOWN AND LEFT		   */
+  {"boxdr",	0x250C},  /* BOX DRAWINGS LIGHT DOWN AND RIGHT		   */
+  {"boxh",	0x2500},  /* BOX DRAWINGS LIGHT HORIZONTAL		   */
+  {"boxhD",	0x2565},  /* BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE*/
+  {"boxhU",	0x2568},  /* BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE  */
+  {"boxhd",	0x252C},  /* BOX DRAWINGS LIGHT DOWN AND HORIZONTAL	   */
+  {"boxhu",	0x2534},  /* BOX DRAWINGS LIGHT UP AND HORIZONTAL	   */
+  {"boxuL",	0x255B},  /* BOX DRAWINGS UP SINGLE AND LEFT DOUBLE	   */
+  {"boxuR",	0x2558},  /* BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE	   */
+  {"boxul",	0x2518},  /* BOX DRAWINGS LIGHT UP AND LEFT		   */
+  {"boxur",	0x2514},  /* BOX DRAWINGS LIGHT UP AND RIGHT		   */
+  {"boxv",	0x2502},  /* BOX DRAWINGS LIGHT VERTICAL		   */
+  {"boxvH",	0x256A},  /* BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DO*/
+  {"boxvL",	0x2561},  /* BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE  */
+  {"boxvR",	0x255E},  /* BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE */
+  {"boxvh",	0x253C},  /* BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL    */
+  {"boxvl",	0x2524},  /* BOX DRAWINGS LIGHT VERTICAL AND LEFT	   */
+  {"boxvr",	0x251C},  /* BOX DRAWINGS LIGHT VERTICAL AND RIGHT	   */
+  {"bprime",	0x2035},  /* REVERSED PRIME				   */
+  {"breve",	0x02D8},  /* BREVE					   */
+  {"brkbar",	0x00A6},  /* obsolete synonym for "brvbar" 0x00A6	   */
+  {"brvbar",	0x00A6},  /* BROKEN BAR 				   */
+  {"bsim",	0x223D},  /* REVERSED TILDE				   */
+  {"bsime",	0x22CD},  /* REVERSED TILDE EQUALS			   */
+  {"bsol",	0x005C},  /* REVERSE SOLIDUS				   */
+  {"bull",	0x2022},  /* BULLET					   */
+  {"bump",	0x224E},  /* GEOMETRICALLY EQUIVALENT TO		   */
+  {"bumpe",	0x224F},  /* DIFFERENCE BETWEEN 			   */
+  {"cacute",	0x0107},  /* LATIN SMALL LETTER C WITH ACUTE		   */
+  {"cap",	0x2229},  /* INTERSECTION				   */
+  {"caret",	0x2041},  /* CARET INSERTION POINT			   */
+  {"caron",	0x02C7},  /* CARON					   */
+  {"ccaron",	0x010D},  /* LATIN SMALL LETTER C WITH CARON		   */
+  {"ccedil",	0x00E7},  /* LATIN SMALL LETTER C WITH CEDILLA		   */
+  {"ccirc",	0x0109},  /* LATIN SMALL LETTER C WITH CIRCUMFLEX	   */
+  {"cdot",	0x010B},  /* LATIN SMALL LETTER C WITH DOT ABOVE	   */
+  {"cedil",	0x00B8},  /* CEDILLA					   */
+  {"cent",	0x00A2},  /* CENT SIGN					   */
+  {"chcy",	0x0447},  /* CYRILLIC SMALL LETTER CHE			   */
+  {"check",	0x2713},  /* CHECK MARK 				   */
+  {"chi",	0x03C7},  /* GREEK SMALL LETTER CHI			   */
+  {"cir",	0x25CB},  /* WHITE CIRCLE				   */
+  {"circ",	0x02C6},  /* MODIFIER LETTER CIRCUMFLEX ACCENT		   */
+  {"cire",	0x2257},  /* RING EQUAL TO				   */
+  {"clubs",	0x2663},  /* BLACK CLUB SUIT				   */
+  {"colon",	0x003A},  /* COLON					   */
+  {"colone",	0x2254},  /* COLON EQUALS				   */
+  {"comma",	0x002C},  /* COMMA					   */
+  {"commat",	0x0040},  /* COMMERCIAL AT				   */
+  {"comp",	0x2201},  /* COMPLEMENT 				   */
+  {"compfn",	0x2218},  /* RING OPERATOR				   */
+  {"cong",	0x2245},  /* APPROXIMATELY EQUAL TO			   */
+  {"conint",	0x222E},  /* CONTOUR INTEGRAL				   */
+  {"coprod",	0x2210},  /* N-ARY COPRODUCT				   */
+  {"copy",	0x00A9},  /* COPYRIGHT SIGN				   */
+  {"copysr",	0x2117},  /* SOUND RECORDING COPYRIGHT			   */
+  {"crarr",	0x21B5},  /* DOWNWARDS ARROW WITH CORNER LEFTWARDS	   */
+  {"cross",	0x2717},  /* BALLOT X					   */
+  {"cuepr",	0x22DE},  /* EQUAL TO OR PRECEDES			   */
+  {"cuesc",	0x22DF},  /* EQUAL TO OR SUCCEEDS			   */
+  {"cularr",	0x21B6},  /* ANTICLOCKWISE TOP SEMICIRCLE ARROW 	   */
+  {"cup",	0x222A},  /* UNION					   */
+  {"cupre",	0x227C},  /* PRECEDES OR EQUAL TO			   */
+  {"curarr",	0x21B7},  /* CLOCKWISE TOP SEMICIRCLE ARROW		   */
+  {"curren",	0x00A4},  /* CURRENCY SIGN				   */
+  {"cuvee",	0x22CE},  /* CURLY LOGICAL OR				   */
+  {"cuwed",	0x22CF},  /* CURLY LOGICAL AND				   */
+  {"dArr",	0x21D3},  /* DOWNWARDS DOUBLE ARROW			   */
+  {"dagger",	0x2020},  /* DAGGER					   */
+  {"daleth",	0x2138},  /* DALET SYMBOL				   */
+  {"darr",	0x2193},  /* DOWNWARDS ARROW				   */
+  {"darr2",	0x21CA},  /* DOWNWARDS PAIRED ARROWS			   */
+  {"dash",	0x2010},  /* HYPHEN					   */
+  {"dashv",	0x22A3},  /* LEFT TACK					   */
+  {"dblac",	0x02DD},  /* DOUBLE ACUTE ACCENT			   */
+  {"dcaron",	0x010F},  /* LATIN SMALL LETTER D WITH CARON		   */
+  {"dcy",	0x0434},  /* CYRILLIC SMALL LETTER DE			   */
+  {"deg",	0x00B0},  /* DEGREE SIGN				   */
+  {"delta",	0x03B4},  /* GREEK SMALL LETTER DELTA			   */
+  {"dgr",	0x03B4},  /* GREEK SMALL LETTER DELTA			   */
+  {"dharl",	0x21C3},  /* DOWNWARDS HARPOON WITH BARB LEFTWARDS	   */
+  {"dharr",	0x21C2},  /* DOWNWARDS HARPOON WITH BARB RIGHTWARDS	   */
+  {"diam",	0x22C4},  /* DIAMOND OPERATOR				   */
+  {"diams",	0x2666},  /* BLACK DIAMOND SUIT 			   */
+  {"die",	0x00A8},  /* DIAERESIS					   */
+  {"divide",	0x00F7},  /* DIVISION SIGN				   */
+  {"divonx",	0x22C7},  /* DIVISION TIMES				   */
+  {"djcy",	0x0452},  /* CYRILLIC SMALL LETTER DJE			   */
+  {"dlarr",	0x2199},  /* SOUTH WEST ARROW				   */
+  {"dlcorn",	0x231E},  /* BOTTOM LEFT CORNER 			   */
+  {"dlcrop",	0x230D},  /* BOTTOM LEFT CROP				   */
+  {"dollar",	0x0024},  /* DOLLAR SIGN				   */
+  {"dot",	0x02D9},  /* DOT ABOVE					   */
+  {"drarr",	0x2198},  /* SOUTH EAST ARROW				   */
+  {"drcorn",	0x231F},  /* BOTTOM RIGHT CORNER			   */
+  {"drcrop",	0x230C},  /* BOTTOM RIGHT CROP				   */
+  {"dscy",	0x0455},  /* CYRILLIC SMALL LETTER DZE			   */
+  {"dstrok",	0x0111},  /* LATIN SMALL LETTER D WITH STROKE		   */
+  {"dtri",	0x25BF},  /* WHITE DOWN-POINTING SMALL TRIANGLE 	   */
+  {"dtrif",	0x25BE},  /* BLACK DOWN-POINTING SMALL TRIANGLE 	   */
+  {"dzcy",	0x045F},  /* CYRILLIC SMALL LETTER DZHE 		   */
+  {"eDot",	0x2251},  /* GEOMETRICALLY EQUAL TO			   */
+  {"eacgr",	0x03AD},  /* GREEK SMALL LETTER EPSILON WITH TONOS	   */
+  {"eacute",	0x00E9},  /* LATIN SMALL LETTER E WITH ACUTE		   */
+  {"ecaron",	0x011B},  /* LATIN SMALL LETTER E WITH CARON		   */
+  {"ecir",	0x2256},  /* RING IN EQUAL TO				   */
+  {"ecirc",	0x00EA},  /* LATIN SMALL LETTER E WITH CIRCUMFLEX	   */
+  {"ecolon",	0x2255},  /* EQUALS COLON				   */
+  {"ecy",	0x044D},  /* CYRILLIC SMALL LETTER E			   */
+  {"edot",	0x0117},  /* LATIN SMALL LETTER E WITH DOT ABOVE	   */
+  {"eeacgr",	0x03AE},  /* GREEK SMALL LETTER ETA WITH TONOS		   */
+  {"eegr",	0x03B7},  /* GREEK SMALL LETTER ETA			   */
+  {"efDot",	0x2252},  /* APPROXIMATELY EQUAL TO OR THE IMAGE OF	   */
+  {"egr",	0x03B5},  /* GREEK SMALL LETTER EPSILON 		   */
+  {"egrave",	0x00E8},  /* LATIN SMALL LETTER E WITH GRAVE		   */
+  {"egs",	0x22DD},  /* EQUAL TO OR GREATER-THAN			   */
+  {"ell",	0x2113},  /* SCRIPT SMALL L				   */
+  {"els",	0x22DC},  /* EQUAL TO OR LESS-THAN			   */
+  {"emacr",	0x0113},  /* LATIN SMALL LETTER E WITH MACRON		   */
+  {"emdash",	0x2014},  /* obsolete synonym for "mdash" 0x2014	   */
+  {"empty",	0x2205},  /* EMPTY SET					   */
+  {"emsp",	0x2003},  /* EM SPACE					   */
+  {"emsp13",	0x2004},  /* THREE-PER-EM SPACE 			   */
+  {"emsp14",	0x2005},  /* FOUR-PER-EM SPACE				   */
+  {"endash",	0x2013},  /* obsolete synonym for "ndash" 0x2013	   */
+  {"eng",	0x014B},  /* LATIN SMALL LETTER ENG			   */
+  {"ensp",	0x2002},  /* EN SPACE					   */
+  {"eogon",	0x0119},  /* LATIN SMALL LETTER E WITH OGONEK		   */
+  {"epsi",	0x03B5},  /* GREEK SMALL LETTER EPSILON 		   */
+  {"epsilon",	0x03B5},  /* GREEK SMALL LETTER EPSILON 		   */
+  {"epsis",	0x220A},  /* SMALL ELEMENT OF				   */
+  {"equals",	0x003D},  /* EQUALS SIGN				   */
+  {"equiv",	0x2261},  /* IDENTICAL TO				   */
+  {"erDot",	0x2253},  /* IMAGE OF OR APPROXIMATELY EQUAL TO 	   */
+  {"esdot",	0x2250},  /* APPROACHES THE LIMIT			   */
+  {"eta",	0x03B7},  /* GREEK SMALL LETTER ETA			   */
+  {"eth",	0x00F0},  /* LATIN SMALL LETTER ETH			   */
+  {"euml",	0x00EB},  /* LATIN SMALL LETTER E WITH DIAERESIS	   */
+  {"euro",	0x20AC},  /* EURO SIGN					   */
+  {"excl",	0x0021},  /* EXCLAMATION MARK				   */
+  {"exist",	0x2203},  /* THERE EXISTS				   */
+  {"fcy",	0x0444},  /* CYRILLIC SMALL LETTER EF			   */
+  {"female",	0x2640},  /* FEMALE SIGN				   */
+  {"ffilig",	0xFB03},  /* LATIN SMALL LIGATURE FFI			   */
+  {"fflig",	0xFB00},  /* LATIN SMALL LIGATURE FF			   */
+  {"ffllig",	0xFB04},  /* LATIN SMALL LIGATURE FFL			   */
+  {"filig",	0xFB01},  /* LATIN SMALL LIGATURE FI			   */
+  {"flat",	0x266D},  /* MUSIC FLAT SIGN				   */
+  {"fllig",	0xFB02},  /* LATIN SMALL LIGATURE FL			   */
+  {"fnof",	0x0192},  /* LATIN SMALL LETTER F WITH HOOK		   */
+  {"forall",	0x2200},  /* FOR ALL					   */
+  {"fork",	0x22D4},  /* PITCHFORK					   */
+  {"frac12",	0x00BD},  /* VULGAR FRACTION ONE HALF			   */
+  {"frac13",	0x2153},  /* VULGAR FRACTION ONE THIRD			   */
+  {"frac14",	0x00BC},  /* VULGAR FRACTION ONE QUARTER		   */
+  {"frac15",	0x2155},  /* VULGAR FRACTION ONE FIFTH			   */
+  {"frac16",	0x2159},  /* VULGAR FRACTION ONE SIXTH			   */
+  {"frac18",	0x215B},  /* VULGAR FRACTION ONE EIGHTH 		   */
+  {"frac23",	0x2154},  /* VULGAR FRACTION TWO THIRDS 		   */
+  {"frac25",	0x2156},  /* VULGAR FRACTION TWO FIFTHS 		   */
+  {"frac34",	0x00BE},  /* VULGAR FRACTION THREE QUARTERS		   */
+  {"frac35",	0x2157},  /* VULGAR FRACTION THREE FIFTHS		   */
+  {"frac38",	0x215C},  /* VULGAR FRACTION THREE EIGHTHS		   */
+  {"frac45",	0x2158},  /* VULGAR FRACTION FOUR FIFTHS		   */
+  {"frac56",	0x215A},  /* VULGAR FRACTION FIVE SIXTHS		   */
+  {"frac58",	0x215D},  /* VULGAR FRACTION FIVE EIGHTHS		   */
+  {"frac78",	0x215E},  /* VULGAR FRACTION SEVEN EIGHTHS		   */
+  {"frasl",	0x2044},  /* FRACTION SLASH				   */
+  {"frown",	0x2322},  /* FROWN					   */
+  {"gE",	0x2267},  /* GREATER-THAN OVER EQUAL TO 		   */
+  {"gacute",	0x01F5},  /* LATIN SMALL LETTER G WITH ACUTE		   */
+  {"gamma",	0x03B3},  /* GREEK SMALL LETTER GAMMA			   */
+  {"gammad",	0x03DC},  /* GREEK LETTER DIGAMMA			   */
+  {"gbreve",	0x011F},  /* LATIN SMALL LETTER G WITH BREVE		   */
+  {"gcedil",	0x0123},  /* LATIN SMALL LETTER G WITH CEDILLA		   */
+  {"gcirc",	0x011D},  /* LATIN SMALL LETTER G WITH CIRCUMFLEX	   */
+  {"gcy",	0x0433},  /* CYRILLIC SMALL LETTER GHE			   */
+  {"gdot",	0x0121},  /* LATIN SMALL LETTER G WITH DOT ABOVE	   */
+  {"ge",	0x2265},  /* GREATER-THAN OR EQUAL TO			   */
+  {"gel",	0x22DB},  /* GREATER-THAN EQUAL TO OR LESS-THAN 	   */
+  {"ges",	0x2265},  /* GREATER-THAN OR EQUAL TO			   */
+  {"ggr",	0x03B3},  /* GREEK SMALL LETTER GAMMA			   */
+  {"gimel",	0x2137},  /* GIMEL SYMBOL				   */
+  {"gjcy",	0x0453},  /* CYRILLIC SMALL LETTER GJE			   */
+  {"gl",	0x2277},  /* GREATER-THAN OR LESS-THAN			   */
+  {"gnE",	0x2269},  /* GREATER-THAN BUT NOT EQUAL TO		   */
+  {"gne",	0x2269},  /* GREATER-THAN BUT NOT EQUAL TO		   */
+  {"gnsim",	0x22E7},  /* GREATER-THAN BUT NOT EQUIVALENT TO 	   */
+  {"grave",	0x0060},  /* GRAVE ACCENT				   */
+  {"gsdot",	0x22D7},  /* GREATER-THAN WITH DOT			   */
+  {"gsim",	0x2273},  /* GREATER-THAN OR EQUIVALENT TO		   */
+  {"gt",	0x003E},  /* GREATER-THAN SIGN				   */
+  {"gvnE",	0x2269},  /* GREATER-THAN BUT NOT EQUAL TO		   */
+  {"hArr",	0x21D4},  /* LEFT RIGHT DOUBLE ARROW			   */
+  {"hairsp",	0x200A},  /* HAIR SPACE 				   */
+  {"half",	0x00BD},  /* VULGAR FRACTION ONE HALF			   */
+  {"hamilt",	0x210B},  /* SCRIPT CAPITAL H				   */
+  {"hardcy",	0x044A},  /* CYRILLIC SMALL LETTER HARD SIGN		   */
+  {"harr",	0x2194},  /* LEFT RIGHT ARROW				   */
+  {"harrw",	0x21AD},  /* LEFT RIGHT WAVE ARROW			   */
+  {"hcirc",	0x0125},  /* LATIN SMALL LETTER H WITH CIRCUMFLEX	   */
+  {"hearts",	0x2665},  /* BLACK HEART SUIT				   */
+  {"hellip",	0x2026},  /* HORIZONTAL ELLIPSIS			   */
+  {"hibar",	0x00AF},  /* obsolete synonym for "macr" 0x00AF 	   */
+  {"horbar",	0x2015},  /* HORIZONTAL BAR				   */
+  {"hstrok",	0x0127},  /* LATIN SMALL LETTER H WITH STROKE		   */
+  {"hybull",	0x2043},  /* HYPHEN BULLET				   */
+  {"hyphen",	0x002D},  /* HYPHEN-MINUS				   */
+  {"iacgr",	0x03AF},  /* GREEK SMALL LETTER IOTA WITH TONOS 	   */
+  {"iacute",	0x00ED},  /* LATIN SMALL LETTER I WITH ACUTE		   */
+  {"icirc",	0x00EE},  /* LATIN SMALL LETTER I WITH CIRCUMFLEX	   */
+  {"icy",	0x0438},  /* CYRILLIC SMALL LETTER I			   */
+  {"idiagr",	0x0390},  /* GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TON*/
+  {"idigr",	0x03CA},  /* GREEK SMALL LETTER IOTA WITH DIALYTIKA	   */
+  {"iecy",	0x0435},  /* CYRILLIC SMALL LETTER IE			   */
+  {"iexcl",	0x00A1},  /* INVERTED EXCLAMATION MARK			   */
+  {"iff",	0x21D4},  /* LEFT RIGHT DOUBLE ARROW			   */
+  {"igr",	0x03B9},  /* GREEK SMALL LETTER IOTA			   */
+  {"igrave",	0x00EC},  /* LATIN SMALL LETTER I WITH GRAVE		   */
+  {"ijlig",	0x0133},  /* LATIN SMALL LIGATURE IJ			   */
+  {"imacr",	0x012B},  /* LATIN SMALL LETTER I WITH MACRON		   */
+  {"image",	0x2111},  /* BLACK-LETTER CAPITAL I			   */
+  {"incare",	0x2105},  /* CARE OF					   */
+  {"infin",	0x221E},  /* INFINITY					   */
+  {"inodot",	0x0131},  /* LATIN SMALL LETTER DOTLESS I		   */
+  {"int",	0x222B},  /* INTEGRAL					   */
+  {"intcal",	0x22BA},  /* INTERCALATE				   */
+  {"iocy",	0x0451},  /* CYRILLIC SMALL LETTER IO			   */
+  {"iogon",	0x012F},  /* LATIN SMALL LETTER I WITH OGONEK		   */
+  {"iota",	0x03B9},  /* GREEK SMALL LETTER IOTA			   */
+  {"iquest",	0x00BF},  /* INVERTED QUESTION MARK			   */
+  {"isin",	0x2208},  /* ELEMENT OF 				   */
+  {"itilde",	0x0129},  /* LATIN SMALL LETTER I WITH TILDE		   */
+  {"iukcy",	0x0456},  /* CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I*/
+  {"iuml",	0x00EF},  /* LATIN SMALL LETTER I WITH DIAERESIS	   */
+  {"jcirc",	0x0135},  /* LATIN SMALL LETTER J WITH CIRCUMFLEX	   */
+  {"jcy",	0x0439},  /* CYRILLIC SMALL LETTER SHORT I		   */
+  {"jsercy",	0x0458},  /* CYRILLIC SMALL LETTER JE			   */
+  {"jukcy",	0x0454},  /* CYRILLIC SMALL LETTER UKRAINIAN IE 	   */
+  {"kappa",	0x03BA},  /* GREEK SMALL LETTER KAPPA			   */
+  {"kappav",	0x03F0},  /* GREEK KAPPA SYMBOL 			   */
+  {"kcedil",	0x0137},  /* LATIN SMALL LETTER K WITH CEDILLA		   */
+  {"kcy",	0x043A},  /* CYRILLIC SMALL LETTER KA			   */
+  {"kgr",	0x03BA},  /* GREEK SMALL LETTER KAPPA			   */
+  {"kgreen",	0x0138},  /* LATIN SMALL LETTER KRA			   */
+  {"khcy",	0x0445},  /* CYRILLIC SMALL LETTER HA			   */
+  {"khgr",	0x03C7},  /* GREEK SMALL LETTER CHI			   */
+  {"kjcy",	0x045C},  /* CYRILLIC SMALL LETTER KJE			   */
+  {"lAarr",	0x21DA},  /* LEFTWARDS TRIPLE ARROW			   */
+  {"lArr",	0x21D0},  /* LEFTWARDS DOUBLE ARROW			   */
+  {"lE",	0x2266},  /* LESS-THAN OVER EQUAL TO			   */
+  {"lacute",	0x013A},  /* LATIN SMALL LETTER L WITH ACUTE		   */
+  {"lagran",	0x2112},  /* SCRIPT CAPITAL L				   */
+  {"lambda",	0x03BB},  /* GREEK SMALL LETTER LAMDA			   */
+  {"lang",	0x2329},  /* LEFT-POINTING ANGLE BRACKET		   */
+  {"laquo",	0x00AB},  /* LEFT-POINTING DOUBLE ANGLE QUOTATION MARK	   */
+  {"larr",	0x2190},  /* LEFTWARDS ARROW				   */
+  {"larr2",	0x21C7},  /* LEFTWARDS PAIRED ARROWS			   */
+  {"larrhk",	0x21A9},  /* LEFTWARDS ARROW WITH HOOK			   */
+  {"larrlp",	0x21AB},  /* LEFTWARDS ARROW WITH LOOP			   */
+  {"larrtl",	0x21A2},  /* LEFTWARDS ARROW WITH TAIL			   */
+  {"lcaron",	0x013E},  /* LATIN SMALL LETTER L WITH CARON		   */
+  {"lcedil",	0x013C},  /* LATIN SMALL LETTER L WITH CEDILLA		   */
+  {"lceil",	0x2308},  /* LEFT CEILING				   */
+  {"lcub",	0x007B},  /* LEFT CURLY BRACKET 			   */
+  {"lcy",	0x043B},  /* CYRILLIC SMALL LETTER EL			   */
+  {"ldot",	0x22D6},  /* LESS-THAN WITH DOT 			   */
+  {"ldquo",	0x201C},  /* LEFT DOUBLE QUOTATION MARK 		   */
+  {"ldquor",	0x201E},  /* DOUBLE LOW-9 QUOTATION MARK		   */
+  {"le",	0x2264},  /* LESS-THAN OR EQUAL TO			   */
+  {"leg",	0x22DA},  /* LESS-THAN EQUAL TO OR GREATER-THAN 	   */
+  {"les",	0x2264},  /* LESS-THAN OR EQUAL TO			   */
+  {"lfloor",	0x230A},  /* LEFT FLOOR 				   */
+  {"lg",	0x2276},  /* LESS-THAN OR GREATER-THAN			   */
+  {"lgr",	0x03BB},  /* GREEK SMALL LETTER LAMDA			   */
+  {"lhard",	0x21BD},  /* LEFTWARDS HARPOON WITH BARB DOWNWARDS	   */
+  {"lharu",	0x21BC},  /* LEFTWARDS HARPOON WITH BARB UPWARDS	   */
+  {"lhblk",	0x2584},  /* LOWER HALF BLOCK				   */
+  {"ljcy",	0x0459},  /* CYRILLIC SMALL LETTER LJE			   */
+  {"lmidot",	0x0140},  /* LATIN SMALL LETTER L WITH MIDDLE DOT	   */
+  {"lnE",	0x2268},  /* LESS-THAN BUT NOT EQUAL TO 		   */
+  {"lne",	0x2268},  /* LESS-THAN BUT NOT EQUAL TO 		   */
+  {"lnsim",	0x22E6},  /* LESS-THAN BUT NOT EQUIVALENT TO		   */
+  {"lowast",	0x2217},  /* ASTERISK OPERATOR				   */
+  {"lowbar",	0x005F},  /* LOW LINE					   */
+  {"loz",	0x25CA},  /* LOZENGE					   */
+/*{"loz",	0x2727},     WHITE FOUR POINTED STAR			   */
+  /* Warning: Duplicated &loz; entry.  HTML 4,0 defines it as U+25CA.	   */
+  {"lozf",	0x2726},  /* BLACK FOUR POINTED STAR			   */
+  {"lpar",	0x0028},  /* LEFT PARENTHESIS				   */
+  {"lrarr2",	0x21C6},  /* LEFTWARDS ARROW OVER RIGHTWARDS ARROW	   */
+  {"lrhar2",	0x21CB},  /* LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON	   */
+  {"lrm",	0x200E},  /* LEFT-TO-RIGHT MARK 			   */
+  {"lsaquo",	0x2039},  /* SINGLE LEFT-POINTING ANGLE QUOTATION MARK	   */
+  {"lsh",	0x21B0},  /* UPWARDS ARROW WITH TIP LEFTWARDS		   */
+  {"lsim",	0x2272},  /* LESS-THAN OR EQUIVALENT TO 		   */
+  {"lsqb",	0x005B},  /* LEFT SQUARE BRACKET			   */
+  {"lsquo",	0x2018},  /* LEFT SINGLE QUOTATION MARK 		   */
+  {"lsquor",	0x201A},  /* SINGLE LOW-9 QUOTATION MARK		   */
+  {"lstrok",	0x0142},  /* LATIN SMALL LETTER L WITH STROKE		   */
+  {"lt",	0x003C},  /* LESS-THAN SIGN				   */
+  {"lthree",	0x22CB},  /* LEFT SEMIDIRECT PRODUCT			   */
+  {"ltimes",	0x22C9},  /* LEFT NORMAL FACTOR SEMIDIRECT PRODUCT	   */
+  {"ltri",	0x25C3},  /* WHITE LEFT-POINTING SMALL TRIANGLE 	   */
+  {"ltrie",	0x22B4},  /* NORMAL SUBGROUP OF OR EQUAL TO		   */
+  {"ltrif",	0x25C2},  /* BLACK LEFT-POINTING SMALL TRIANGLE 	   */
+  {"lvnE",	0x2268},  /* LESS-THAN BUT NOT EQUAL TO 		   */
+  {"macr",	0x00AF},  /* MACRON					   */
+  {"male",	0x2642},  /* MALE SIGN					   */
+  {"malt",	0x2720},  /* MALTESE CROSS				   */
+  {"map",	0x21A6},  /* RIGHTWARDS ARROW FROM BAR			   */
+  {"marker",	0x25AE},  /* BLACK VERTICAL RECTANGLE			   */
+  {"mcy",	0x043C},  /* CYRILLIC SMALL LETTER EM			   */
+  {"mdash",	0x2014},  /* EM DASH					   */
+  {"mgr",	0x03BC},  /* GREEK SMALL LETTER MU			   */
+  {"micro",	0x00B5},  /* MICRO SIGN 				   */
+  {"mid",	0x2223},  /* DIVIDES					   */
+  {"middot",	0x00B7},  /* MIDDLE DOT 				   */
+  {"minus",	0x2212},  /* MINUS SIGN 				   */
+  {"minusb",	0x229F},  /* SQUARED MINUS				   */
+  {"mldr",	0x2026},  /* HORIZONTAL ELLIPSIS			   */
+  {"mnplus",	0x2213},  /* MINUS-OR-PLUS SIGN 			   */
+  {"models",	0x22A7},  /* MODELS					   */
+  {"mu",	0x03BC},  /* GREEK SMALL LETTER MU			   */
+  {"mumap",	0x22B8},  /* MULTIMAP					   */
+  {"nVDash",	0x22AF},  /* NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNS*/
+  {"nVdash",	0x22AE},  /* DOES NOT FORCE				   */
+  {"nabla",	0x2207},  /* NABLA					   */
+  {"nacute",	0x0144},  /* LATIN SMALL LETTER N WITH ACUTE		   */
+  {"nap",	0x2249},  /* NOT ALMOST EQUAL TO			   */
+  {"napos",	0x0149},  /* LATIN SMALL LETTER N PRECEDED BY APOSTROPHE   */
+  {"natur",	0x266E},  /* MUSIC NATURAL SIGN 			   */
+  {"nbsp",	0x00A0},  /* NO-BREAK SPACE				   */
+  {"ncaron",	0x0148},  /* LATIN SMALL LETTER N WITH CARON		   */
+  {"ncedil",	0x0146},  /* LATIN SMALL LETTER N WITH CEDILLA		   */
+  {"ncong",	0x2247},  /* NEITHER APPROXIMATELY NOR ACTUALLY EQUAL TO   */
+  {"ncy",	0x043D},  /* CYRILLIC SMALL LETTER EN			   */
+  {"ndash",	0x2013},  /* EN DASH					   */
+  {"ne",	0x2260},  /* NOT EQUAL TO				   */
+  {"nearr",	0x2197},  /* NORTH EAST ARROW				   */
+  {"nequiv",	0x2262},  /* NOT IDENTICAL TO				   */
+  {"nexist",	0x2204},  /* THERE DOES NOT EXIST			   */
+  {"nge",	0x2271},  /* NEITHER GREATER-THAN NOR EQUAL TO		   */
+  {"nges",	0x2271},  /* NEITHER GREATER-THAN NOR EQUAL TO		   */
+  {"ngr",	0x03BD},  /* GREEK SMALL LETTER NU			   */
+  {"ngt",	0x226F},  /* NOT GREATER-THAN				   */
+  {"nhArr",	0x21CE},  /* LEFT RIGHT DOUBLE ARROW WITH STROKE	   */
+  {"nharr",	0x21AE},  /* LEFT RIGHT ARROW WITH STROKE		   */
+  {"ni",	0x220B},  /* CONTAINS AS MEMBER 			   */
+  {"njcy",	0x045A},  /* CYRILLIC SMALL LETTER NJE			   */
+  {"nlArr",	0x21CD},  /* LEFTWARDS DOUBLE ARROW WITH STROKE 	   */
+  {"nlarr",	0x219A},  /* LEFTWARDS ARROW WITH STROKE		   */
+  {"nldr",	0x2025},  /* TWO DOT LEADER				   */
+  {"nle",	0x2270},  /* NEITHER LESS-THAN NOR EQUAL TO		   */
+  {"nles",	0x2270},  /* NEITHER LESS-THAN NOR EQUAL TO		   */
+  {"nlt",	0x226E},  /* NOT LESS-THAN				   */
+  {"nltri",	0x22EA},  /* NOT NORMAL SUBGROUP OF			   */
+  {"nltrie",	0x22EC},  /* NOT NORMAL SUBGROUP OF OR EQUAL TO 	   */
+  {"nmid",	0x2224},  /* DOES NOT DIVIDE				   */
+  {"not",	0x00AC},  /* NOT SIGN					   */
+  {"notin",	0x2209},  /* NOT AN ELEMENT OF				   */
+  {"npar",	0x2226},  /* NOT PARALLEL TO				   */
+  {"npr",	0x2280},  /* DOES NOT PRECEDE				   */
+  {"npre",	0x22E0},  /* DOES NOT PRECEDE OR EQUAL			   */
+  {"nrArr",	0x21CF},  /* RIGHTWARDS DOUBLE ARROW WITH STROKE	   */
+  {"nrarr",	0x219B},  /* RIGHTWARDS ARROW WITH STROKE		   */
+  {"nrtri",	0x22EB},  /* DOES NOT CONTAIN AS NORMAL SUBGROUP	   */
+  {"nrtrie",	0x22ED},  /* DOES NOT CONTAIN AS NORMAL SUBGROUP OR EQUAL  */
+  {"nsc",	0x2281},  /* DOES NOT SUCCEED				   */
+  {"nsce",	0x22E1},  /* DOES NOT SUCCEED OR EQUAL			   */
+  {"nsim",	0x2241},  /* NOT TILDE					   */
+  {"nsime",	0x2244},  /* NOT ASYMPTOTICALLY EQUAL TO		   */
+  {"nspar",	0x2226},  /* NOT PARALLEL TO				   */
+  {"nsub",	0x2284},  /* NOT A SUBSET OF				   */
+  {"nsubE",	0x2288},  /* NEITHER A SUBSET OF NOR EQUAL TO		   */
+  {"nsube",	0x2288},  /* NEITHER A SUBSET OF NOR EQUAL TO		   */
+  {"nsup",	0x2285},  /* NOT A SUPERSET OF				   */
+  {"nsupE",	0x2289},  /* NEITHER A SUPERSET OF NOR EQUAL TO 	   */
+  {"nsupe",	0x2289},  /* NEITHER A SUPERSET OF NOR EQUAL TO 	   */
+  {"ntilde",	0x00F1},  /* LATIN SMALL LETTER N WITH TILDE		   */
+  {"nu",	0x03BD},  /* GREEK SMALL LETTER NU			   */
+  {"num",	0x0023},  /* NUMBER SIGN				   */
+  {"numero",	0x2116},  /* NUMERO SIGN				   */
+  {"numsp",	0x2007},  /* FIGURE SPACE				   */
+  {"nvDash",	0x22AD},  /* NOT TRUE					   */
+  {"nvdash",	0x22AC},  /* DOES NOT PROVE				   */
+  {"nwarr",	0x2196},  /* NORTH WEST ARROW				   */
+  {"oS",	0x24C8},  /* CIRCLED LATIN CAPITAL LETTER S		   */
+  {"oacgr",	0x03CC},  /* GREEK SMALL LETTER OMICRON WITH TONOS	   */
+  {"oacute",	0x00F3},  /* LATIN SMALL LETTER O WITH ACUTE		   */
+  {"oast",	0x229B},  /* CIRCLED ASTERISK OPERATOR			   */
+  {"ocir",	0x229A},  /* CIRCLED RING OPERATOR			   */
+  {"ocirc",	0x00F4},  /* LATIN SMALL LETTER O WITH CIRCUMFLEX	   */
+  {"ocy",	0x043E},  /* CYRILLIC SMALL LETTER O			   */
+  {"odash",	0x229D},  /* CIRCLED DASH				   */
+  {"odblac",	0x0151},  /* LATIN SMALL LETTER O WITH DOUBLE ACUTE	   */
+  {"odot",	0x2299},  /* CIRCLED DOT OPERATOR			   */
+  {"oelig",	0x0153},  /* LATIN SMALL LIGATURE OE			   */
+  {"ogon",	0x02DB},  /* OGONEK					   */
+  {"ogr",	0x03BF},  /* GREEK SMALL LETTER OMICRON 		   */
+  {"ograve",	0x00F2},  /* LATIN SMALL LETTER O WITH GRAVE		   */
+  {"ohacgr",	0x03CE},  /* GREEK SMALL LETTER OMEGA WITH TONOS	   */
+  {"ohgr",	0x03C9},  /* GREEK SMALL LETTER OMEGA			   */
+  {"ohm",	0x2126},  /* OHM SIGN					   */
+  {"olarr",	0x21BA},  /* ANTICLOCKWISE OPEN CIRCLE ARROW		   */
+  {"oline",	0x203E},  /* OVERLINE					   */
+  {"omacr",	0x014D},  /* LATIN SMALL LETTER O WITH MACRON		   */
+  {"omega",	0x03C9},  /* GREEK SMALL LETTER OMEGA			   */
+  {"omicron",	0x03BF},  /* GREEK SMALL LETTER OMICRON 		   */
+  {"ominus",	0x2296},  /* CIRCLED MINUS				   */
+  {"oplus",	0x2295},  /* CIRCLED PLUS				   */
+  {"or",	0x2228},  /* LOGICAL OR 				   */
+  {"orarr",	0x21BB},  /* CLOCKWISE OPEN CIRCLE ARROW		   */
+  {"order",	0x2134},  /* SCRIPT SMALL O				   */
+  {"ordf",	0x00AA},  /* FEMININE ORDINAL INDICATOR 		   */
+  {"ordm",	0x00BA},  /* MASCULINE ORDINAL INDICATOR		   */
+  {"oslash",	0x00F8},  /* LATIN SMALL LETTER O WITH STROKE		   */
+  {"osol",	0x2298},  /* CIRCLED DIVISION SLASH			   */
+  {"otilde",	0x00F5},  /* LATIN SMALL LETTER O WITH TILDE		   */
+  {"otimes",	0x2297},  /* CIRCLED TIMES				   */
+  {"ouml",	0x00F6},  /* LATIN SMALL LETTER O WITH DIAERESIS	   */
+  {"par",	0x2225},  /* PARALLEL TO				   */
+  {"para",	0x00B6},  /* PILCROW SIGN				   */
+  {"part",	0x2202},  /* PARTIAL DIFFERENTIAL			   */
+  {"pcy",	0x043F},  /* CYRILLIC SMALL LETTER PE			   */
+  {"percnt",	0x0025},  /* PERCENT SIGN				   */
+  {"period",	0x002E},  /* FULL STOP					   */
+  {"permil",	0x2030},  /* PER MILLE SIGN				   */
+  {"perp",	0x22A5},  /* UP TACK					   */
+  {"pgr",	0x03C0},  /* GREEK SMALL LETTER PI			   */
+  {"phgr",	0x03C6},  /* GREEK SMALL LETTER PHI			   */
+  {"phi",	0x03C6},  /* GREEK SMALL LETTER PHI			   */
+  {"phis",	0x03C6},  /* GREEK SMALL LETTER PHI			   */
+  {"phiv",	0x03D5},  /* GREEK PHI SYMBOL				   */
+  {"phmmat",	0x2133},  /* SCRIPT CAPITAL M				   */
+  {"phone",	0x260E},  /* BLACK TELEPHONE				   */
+  {"pi",	0x03C0},  /* GREEK SMALL LETTER PI			   */
+  {"piv",	0x03D6},  /* GREEK PI SYMBOL				   */
+  {"planck",	0x210F},  /* PLANCK CONSTANT OVER TWO PI		   */
+  {"plus",	0x002B},  /* PLUS SIGN					   */
+  {"plusb",	0x229E},  /* SQUARED PLUS				   */
+  {"plusdo",	0x2214},  /* DOT PLUS					   */
+  {"plusmn",	0x00B1},  /* PLUS-MINUS SIGN				   */
+  {"pound",	0x00A3},  /* POUND SIGN 				   */
+  {"pr",	0x227A},  /* PRECEDES					   */
+  {"pre",	0x227C},  /* PRECEDES OR EQUAL TO			   */
+  {"prime",	0x2032},  /* PRIME					   */
+  {"prnsim",	0x22E8},  /* PRECEDES BUT NOT EQUIVALENT TO		   */
+  {"prod",	0x220F},  /* N-ARY PRODUCT				   */
+  {"prop",	0x221D},  /* PROPORTIONAL TO				   */
+  {"prsim",	0x227E},  /* PRECEDES OR EQUIVALENT TO			   */
+  {"psgr",	0x03C8},  /* GREEK SMALL LETTER PSI			   */
+  {"psi",	0x03C8},  /* GREEK SMALL LETTER PSI			   */
+  {"puncsp",	0x2008},  /* PUNCTUATION SPACE				   */
+  {"quest",	0x003F},  /* QUESTION MARK				   */
+  {"quot",	0x0022},  /* QUOTATION MARK				   */
+  {"rAarr",	0x21DB},  /* RIGHTWARDS TRIPLE ARROW			   */
+  {"rArr",	0x21D2},  /* RIGHTWARDS DOUBLE ARROW			   */
+  {"racute",	0x0155},  /* LATIN SMALL LETTER R WITH ACUTE		   */
+  {"radic",	0x221A},  /* SQUARE ROOT				   */
+  {"rang",	0x232A},  /* RIGHT-POINTING ANGLE BRACKET		   */
+  {"raquo",	0x00BB},  /* RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK    */
+  {"rarr",	0x2192},  /* RIGHTWARDS ARROW				   */
+  {"rarr2",	0x21C9},  /* RIGHTWARDS PAIRED ARROWS			   */
+  {"rarrhk",	0x21AA},  /* RIGHTWARDS ARROW WITH HOOK 		   */
+  {"rarrlp",	0x21AC},  /* RIGHTWARDS ARROW WITH LOOP 		   */
+  {"rarrtl",	0x21A3},  /* RIGHTWARDS ARROW WITH TAIL 		   */
+  {"rarrw",	0x219D},  /* RIGHTWARDS WAVE ARROW			   */
+  {"rcaron",	0x0159},  /* LATIN SMALL LETTER R WITH CARON		   */
+  {"rcedil",	0x0157},  /* LATIN SMALL LETTER R WITH CEDILLA		   */
+  {"rceil",	0x2309},  /* RIGHT CEILING				   */
+  {"rcub",	0x007D},  /* RIGHT CURLY BRACKET			   */
+  {"rcy",	0x0440},  /* CYRILLIC SMALL LETTER ER			   */
+  {"rdquo",	0x201D},  /* RIGHT DOUBLE QUOTATION MARK		   */
+  {"rdquor",	0x201C},  /* LEFT DOUBLE QUOTATION MARK 		   */
+  {"real",	0x211C},  /* BLACK-LETTER CAPITAL R			   */
+  {"rect",	0x25AD},  /* WHITE RECTANGLE				   */
+  {"reg",	0x00AE},  /* REGISTERED SIGN				   */
+  {"rfloor",	0x230B},  /* RIGHT FLOOR				   */
+  {"rgr",	0x03C1},  /* GREEK SMALL LETTER RHO			   */
+  {"rhard",	0x21C1},  /* RIGHTWARDS HARPOON WITH BARB DOWNWARDS	   */
+  {"rharu",	0x21C0},  /* RIGHTWARDS HARPOON WITH BARB UPWARDS	   */
+  {"rho",	0x03C1},  /* GREEK SMALL LETTER RHO			   */
+  {"rhov",	0x03F1},  /* GREEK RHO SYMBOL				   */
+  {"ring",	0x02DA},  /* RING ABOVE 				   */
+  {"rlarr2",	0x21C4},  /* RIGHTWARDS ARROW OVER LEFTWARDS ARROW	   */
+  {"rlhar2",	0x21CC},  /* RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON	   */
+  {"rlm",	0x200F},  /* RIGHT-TO-LEFT MARK 			   */
+  {"rpar",	0x0029},  /* RIGHT PARENTHESIS				   */
+  {"rsaquo",	0x203A},  /* SINGLE RIGHT-POINTING ANGLE QUOTATION MARK    */
+  {"rsh",	0x21B1},  /* UPWARDS ARROW WITH TIP RIGHTWARDS		   */
+  {"rsqb",	0x005D},  /* RIGHT SQUARE BRACKET			   */
+  {"rsquo",	0x2019},  /* RIGHT SINGLE QUOTATION MARK		   */
+  {"rsquor",	0x2018},  /* LEFT SINGLE QUOTATION MARK 		   */
+  {"rthree",	0x22CC},  /* RIGHT SEMIDIRECT PRODUCT			   */
+  {"rtimes",	0x22CA},  /* RIGHT NORMAL FACTOR SEMIDIRECT PRODUCT	   */
+  {"rtri",	0x25B9},  /* WHITE RIGHT-POINTING SMALL TRIANGLE	   */
+  {"rtrie",	0x22B5},  /* CONTAINS AS NORMAL SUBGROUP OR EQUAL TO	   */
+  {"rtrif",	0x25B8},  /* BLACK RIGHT-POINTING SMALL TRIANGLE	   */
+  {"rx",	0x211E},  /* PRESCRIPTION TAKE				   */
+  {"sacute",	0x015B},  /* LATIN SMALL LETTER S WITH ACUTE		   */
+  {"samalg",	0x2210},  /* N-ARY COPRODUCT				   */
+  {"sbquo",	0x201A},  /* SINGLE LOW-9 QUOTATION MARK		   */
+  {"sbsol",	0x005C},  /* REVERSE SOLIDUS				   */
+  {"sc",	0x227B},  /* SUCCEEDS					   */
+  {"scaron",	0x0161},  /* LATIN SMALL LETTER S WITH CARON		   */
+  {"sccue",	0x227D},  /* SUCCEEDS OR EQUAL TO			   */
+  {"sce",	0x227D},  /* SUCCEEDS OR EQUAL TO			   */
+  {"scedil",	0x015F},  /* LATIN SMALL LETTER S WITH CEDILLA		   */
+  {"scirc",	0x015D},  /* LATIN SMALL LETTER S WITH CIRCUMFLEX	   */
+  {"scnsim",	0x22E9},  /* SUCCEEDS BUT NOT EQUIVALENT TO		   */
+  {"scsim",	0x227F},  /* SUCCEEDS OR EQUIVALENT TO			   */
+  {"scy",	0x0441},  /* CYRILLIC SMALL LETTER ES			   */
+  {"sdot",	0x22C5},  /* DOT OPERATOR				   */
+  {"sdotb",	0x22A1},  /* SQUARED DOT OPERATOR			   */
+  {"sect",	0x00A7},  /* SECTION SIGN				   */
+  {"semi",	0x003B},  /* SEMICOLON					   */
+  {"setmn",	0x2216},  /* SET MINUS					   */
+  {"sext",	0x2736},  /* SIX POINTED BLACK STAR			   */
+  {"sfgr",	0x03C2},  /* GREEK SMALL LETTER FINAL SIGMA		   */
+  {"sfrown",	0x2322},  /* FROWN					   */
+  {"sgr",	0x03C3},  /* GREEK SMALL LETTER SIGMA			   */
+  {"sharp",	0x266F},  /* MUSIC SHARP SIGN				   */
+  {"shchcy",	0x0449},  /* CYRILLIC SMALL LETTER SHCHA		   */
+  {"shcy",	0x0448},  /* CYRILLIC SMALL LETTER SHA			   */
+  {"shy",	0x00AD},  /* SOFT HYPHEN				   */
+  {"sigma",	0x03C3},  /* GREEK SMALL LETTER SIGMA			   */
+  {"sigmaf",	0x03C2},  /* GREEK SMALL LETTER FINAL SIGMA		   */
+  {"sigmav",	0x03C2},  /* GREEK SMALL LETTER FINAL SIGMA		   */
+  {"sim",	0x223C},  /* TILDE OPERATOR				   */
+  {"sime",	0x2243},  /* ASYMPTOTICALLY EQUAL TO			   */
+  {"smile",	0x2323},  /* SMILE					   */
+  {"softcy",	0x044C},  /* CYRILLIC SMALL LETTER SOFT SIGN		   */
+  {"sol",	0x002F},  /* SOLIDUS					   */
+  {"spades",	0x2660},  /* BLACK SPADE SUIT				   */
+  {"spar",	0x2225},  /* PARALLEL TO				   */
+  {"sqcap",	0x2293},  /* SQUARE CAP 				   */
+  {"sqcup",	0x2294},  /* SQUARE CUP 				   */
+  {"sqsub",	0x228F},  /* SQUARE IMAGE OF				   */
+  {"sqsube",	0x2291},  /* SQUARE IMAGE OF OR EQUAL TO		   */
+  {"sqsup",	0x2290},  /* SQUARE ORIGINAL OF 			   */
+  {"sqsupe",	0x2292},  /* SQUARE ORIGINAL OF OR EQUAL TO		   */
+  {"squ",	0x25A1},  /* WHITE SQUARE				   */
+  {"square",	0x25A1},  /* WHITE SQUARE				   */
+  {"squf",	0x25AA},  /* BLACK SMALL SQUARE 			   */
+  {"ssetmn",	0x2216},  /* SET MINUS					   */
+  {"ssmile",	0x2323},  /* SMILE					   */
+  {"sstarf",	0x22C6},  /* STAR OPERATOR				   */
+  {"star",	0x2606},  /* WHITE STAR 				   */
+  {"starf",	0x2605},  /* BLACK STAR 				   */
+  {"sub",	0x2282},  /* SUBSET OF					   */
+  {"subE",	0x2286},  /* SUBSET OF OR EQUAL TO			   */
+  {"sube",	0x2286},  /* SUBSET OF OR EQUAL TO			   */
+  {"subnE",	0x228A},  /* SUBSET OF WITH NOT EQUAL TO		   */
+  {"subne",	0x228A},  /* SUBSET OF WITH NOT EQUAL TO		   */
+  {"sum",	0x2211},  /* N-ARY SUMMATION				   */
+  {"sung",	0x266A},  /* EIGHTH NOTE				   */
+  {"sup",	0x2283},  /* SUPERSET OF				   */
+  {"sup1",	0x00B9},  /* SUPERSCRIPT ONE				   */
+  {"sup2",	0x00B2},  /* SUPERSCRIPT TWO				   */
+  {"sup3",	0x00B3},  /* SUPERSCRIPT THREE				   */
+  {"supE",	0x2287},  /* SUPERSET OF OR EQUAL TO			   */
+  {"supe",	0x2287},  /* SUPERSET OF OR EQUAL TO			   */
+  {"supnE",	0x228B},  /* SUPERSET OF WITH NOT EQUAL TO		   */
+  {"supne",	0x228B},  /* SUPERSET OF WITH NOT EQUAL TO		   */
+  {"szlig",	0x00DF},  /* LATIN SMALL LETTER SHARP S 		   */
+  {"target",	0x2316},  /* POSITION INDICATOR 			   */
+  {"tau",	0x03C4},  /* GREEK SMALL LETTER TAU			   */
+  {"tcaron",	0x0165},  /* LATIN SMALL LETTER T WITH CARON		   */
+  {"tcedil",	0x0163},  /* LATIN SMALL LETTER T WITH CEDILLA		   */
+  {"tcy",	0x0442},  /* CYRILLIC SMALL LETTER TE			   */
+  {"tdot",	0x20DB},  /* COMBINING THREE DOTS ABOVE 		   */
+  {"telrec",	0x2315},  /* TELEPHONE RECORDER 			   */
+  {"tgr",	0x03C4},  /* GREEK SMALL LETTER TAU			   */
+  {"there4",	0x2234},  /* THEREFORE					   */
+  {"theta",	0x03B8},  /* GREEK SMALL LETTER THETA			   */
+  {"thetas",	0x03B8},  /* GREEK SMALL LETTER THETA			   */
+  {"thetasym",	0x03D1},  /* GREEK THETA SYMBOL 			   */
+  {"thetav",	0x03D1},  /* GREEK THETA SYMBOL 			   */
+  {"thgr",	0x03B8},  /* GREEK SMALL LETTER THETA			   */
+  {"thinsp",	0x2009},  /* THIN SPACE 				   */
+  {"thkap",	0x2248},  /* ALMOST EQUAL TO				   */
+  {"thksim",	0x223C},  /* TILDE OPERATOR				   */
+  {"thorn",	0x00FE},  /* LATIN SMALL LETTER THORN			   */
+  {"tilde",	0x02DC},  /* SMALL TILDE				   */
+  {"times",	0x00D7},  /* MULTIPLICATION SIGN			   */
+  {"timesb",	0x22A0},  /* SQUARED TIMES				   */
+  {"top",	0x22A4},  /* DOWN TACK					   */
+  {"tprime",	0x2034},  /* TRIPLE PRIME				   */
+  {"trade",	0x2122},  /* TRADE MARK SIGN				   */
+  {"trie",	0x225C},  /* DELTA EQUAL TO				   */
+  {"tscy",	0x0446},  /* CYRILLIC SMALL LETTER TSE			   */
+  {"tshcy",	0x045B},  /* CYRILLIC SMALL LETTER TSHE 		   */
+  {"tstrok",	0x0167},  /* LATIN SMALL LETTER T WITH STROKE		   */
+  {"twixt",	0x226C},  /* BETWEEN					   */
+  {"uArr",	0x21D1},  /* UPWARDS DOUBLE ARROW			   */
+  {"uacgr",	0x03CD},  /* GREEK SMALL LETTER UPSILON WITH TONOS	   */
+  {"uacute",	0x00FA},  /* LATIN SMALL LETTER U WITH ACUTE		   */
+  {"uarr",	0x2191},  /* UPWARDS ARROW				   */
+  {"uarr2",	0x21C8},  /* UPWARDS PAIRED ARROWS			   */
+  {"ubrcy",	0x045E},  /* CYRILLIC SMALL LETTER SHORT U		   */
+  {"ubreve",	0x016D},  /* LATIN SMALL LETTER U WITH BREVE		   */
+  {"ucirc",	0x00FB},  /* LATIN SMALL LETTER U WITH CIRCUMFLEX	   */
+  {"ucy",	0x0443},  /* CYRILLIC SMALL LETTER U			   */
+  {"udblac",	0x0171},  /* LATIN SMALL LETTER U WITH DOUBLE ACUTE	   */
+  {"udiagr",	0x03B0},  /* GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND */
+  {"udigr",	0x03CB},  /* GREEK SMALL LETTER UPSILON WITH DIALYTIKA	   */
+  {"ugr",	0x03C5},  /* GREEK SMALL LETTER UPSILON 		   */
+  {"ugrave",	0x00F9},  /* LATIN SMALL LETTER U WITH GRAVE		   */
+  {"uharl",	0x21BF},  /* UPWARDS HARPOON WITH BARB LEFTWARDS	   */
+  {"uharr",	0x21BE},  /* UPWARDS HARPOON WITH BARB RIGHTWARDS	   */
+  {"uhblk",	0x2580},  /* UPPER HALF BLOCK				   */
+  {"ulcorn",	0x231C},  /* TOP LEFT CORNER				   */
+  {"ulcrop",	0x230F},  /* TOP LEFT CROP				   */
+  {"umacr",	0x016B},  /* LATIN SMALL LETTER U WITH MACRON		   */
+  {"uml",	0x00A8},  /* DIAERESIS					   */
+  {"uogon",	0x0173},  /* LATIN SMALL LETTER U WITH OGONEK		   */
+  {"uplus",	0x228E},  /* MULTISET UNION				   */
+  {"upsi",	0x03C5},  /* GREEK SMALL LETTER UPSILON 		   */
+  {"upsih",	0x03D2},  /* GREEK UPSILON WITH HOOK SYMBOL		   */
+  {"upsilon",	0x03C5},  /* GREEK SMALL LETTER UPSILON 		   */
+  {"urcorn",	0x231D},  /* TOP RIGHT CORNER				   */
+  {"urcrop",	0x230E},  /* TOP RIGHT CROP				   */
+  {"uring",	0x016F},  /* LATIN SMALL LETTER U WITH RING ABOVE	   */
+  {"utilde",	0x0169},  /* LATIN SMALL LETTER U WITH TILDE		   */
+  {"utri",	0x25B5},  /* WHITE UP-POINTING SMALL TRIANGLE		   */
+  {"utrif",	0x25B4},  /* BLACK UP-POINTING SMALL TRIANGLE		   */
+  {"uuml",	0x00FC},  /* LATIN SMALL LETTER U WITH DIAERESIS	   */
+  {"vArr",	0x21D5},  /* UP DOWN DOUBLE ARROW			   */
+  {"vDash",	0x22A8},  /* TRUE					   */
+  {"varr",	0x2195},  /* UP DOWN ARROW				   */
+  {"vcy",	0x0432},  /* CYRILLIC SMALL LETTER VE			   */
+  {"vdash",	0x22A2},  /* RIGHT TACK 				   */
+  {"veebar",	0x22BB},  /* XOR					   */
+  {"vellip",	0x22EE},  /* VERTICAL ELLIPSIS				   */
+  {"verbar",	0x007C},  /* VERTICAL LINE				   */
+  {"vltri",	0x22B2},  /* NORMAL SUBGROUP OF 			   */
+  {"vprime",	0x2032},  /* PRIME					   */
+  {"vprop",	0x221D},  /* PROPORTIONAL TO				   */
+  {"vrtri",	0x22B3},  /* CONTAINS AS NORMAL SUBGROUP		   */
+  {"vsubnE",	0x228A},  /* SUBSET OF WITH NOT EQUAL TO		   */
+  {"vsubne",	0x228A},  /* SUBSET OF WITH NOT EQUAL TO		   */
+  {"vsupnE",	0x228B},  /* SUPERSET OF WITH NOT EQUAL TO		   */
+  {"vsupne",	0x228B},  /* SUPERSET OF WITH NOT EQUAL TO		   */
+  {"wcirc",	0x0175},  /* LATIN SMALL LETTER W WITH CIRCUMFLEX	   */
+  {"wedgeq",	0x2259},  /* ESTIMATES					   */
+  {"weierp",	0x2118},  /* SCRIPT CAPITAL P				   */
+  {"wreath",	0x2240},  /* WREATH PRODUCT				   */
+  {"xcirc",	0x25CB},  /* WHITE CIRCLE				   */
+  {"xdtri",	0x25BD},  /* WHITE DOWN-POINTING TRIANGLE		   */
+  {"xgr",	0x03BE},  /* GREEK SMALL LETTER XI			   */
+  {"xhArr",	0x2194},  /* LEFT RIGHT ARROW				   */
+  {"xharr",	0x2194},  /* LEFT RIGHT ARROW				   */
+  {"xi",	0x03BE},  /* GREEK SMALL LETTER XI			   */
+  {"xlArr",	0x21D0},  /* LEFTWARDS DOUBLE ARROW			   */
+  {"xrArr",	0x21D2},  /* RIGHTWARDS DOUBLE ARROW			   */
+  {"xutri",	0x25B3},  /* WHITE UP-POINTING TRIANGLE 		   */
+  {"yacute",	0x00FD},  /* LATIN SMALL LETTER Y WITH ACUTE		   */
+  {"yacy",	0x044F},  /* CYRILLIC SMALL LETTER YA			   */
+  {"ycirc",	0x0177},  /* LATIN SMALL LETTER Y WITH CIRCUMFLEX	   */
+  {"ycy",	0x044B},  /* CYRILLIC SMALL LETTER YERU 		   */
+  {"yen",	0x00A5},  /* YEN SIGN					   */
+  {"yicy",	0x0457},  /* CYRILLIC SMALL LETTER YI			   */
+  {"yucy",	0x044E},  /* CYRILLIC SMALL LETTER YU			   */
+  {"yuml",	0x00FF},  /* LATIN SMALL LETTER Y WITH DIAERESIS	   */
+  {"zacute",	0x017A},  /* LATIN SMALL LETTER Z WITH ACUTE		   */
+  {"zcaron",	0x017E},  /* LATIN SMALL LETTER Z WITH CARON		   */
+  {"zcy",	0x0437},  /* CYRILLIC SMALL LETTER ZE			   */
+  {"zdot",	0x017C},  /* LATIN SMALL LETTER Z WITH DOT ABOVE	   */
+  {"zeta",	0x03B6},  /* GREEK SMALL LETTER ZETA			   */
+  {"zgr",	0x03B6},  /* GREEK SMALL LETTER ZETA			   */
+  {"zhcy",	0x0436},  /* CYRILLIC SMALL LETTER ZHE			   */
+  {"zwj",	0x200D},  /* ZERO WIDTH JOINER				   */
+  {"zwnj",	0x200C},  /* ZERO WIDTH NON-JOINER			   */
+/* {"epsiv",	0x????},  variant epsilon			 # ISOgrk3 */
+/* {"fjlig",	0x????},  fj ligature				 # ISOpub  */
+/* {"gEl",	0x????},  greater-than, double equals, less-than # ISOamsr */
+/* {"gap",	0x????},  greater-than, approximately equal to	 # ISOamsr */
+/* {"gnap",	0x????},  greater-than, not approximately equal t# ISOamsn */
+/* {"jnodot",	0x????},  latin small letter dotless j		 # ISOamso */
+/* {"lEg",	0x????},  less-than, double equals, greater-than # ISOamsr */
+/* {"lap",	0x????},  less-than, approximately equal to	 # ISOamsr */
+/* {"lnap",	0x????},  less-than, not approximately equal to  # ISOamsn */
+/* {"lpargt",	0x????},  left parenthesis, greater-than	 # ISOamsc */
+/* {"ngE",	0x????},  not greater-than, double equals	 # ISOamsn */
+/* {"nlE",	0x????},  not less-than, double equals		 # ISOamsn */
+/* {"nsmid",	0x????},  nshortmid				 # ISOamsn */
+/* {"prap",	0x????},  precedes, approximately equal to	 # ISOamsr */
+/* {"prnE",	0x????},  precedes, not double equal		 # ISOamsn */
+/* {"prnap",	0x????},  precedes, not approximately equal to	 # ISOamsn */
+/* {"rpargt",	0x????},  right parenthesis, greater-than	 # ISOamsc */
+/* {"scap",	0x????},  succeeds, approximately equal to	 # ISOamsr */
+/* {"scnE",	0x????},  succeeds, not double equals		 # ISOamsn */
+/* {"scnap",	0x????},  succeeds, not approximately equal to	 # ISOamsn */
+/* {"smid",	0x????},  shortmid				 # ISOamsr */
+};
+
+#endif /* not ENTITIES_HTML40_ONLY */
diff --git a/src/chrtrans/iso9945uni.tbl b/src/chrtrans/iso9945uni.tbl
deleted file mode 100644
index 18cf2ffe..00000000
--- a/src/chrtrans/iso9945uni.tbl
+++ /dev/null
@@ -1,178 +0,0 @@
-#The MIME name of this charset.
-Miso-9945-2
-
-#Name as a Display Charset (used on Options screen)
-OUkrainian Cyrillic (ISO-9945-2)
-
-#Codepage number
-#?
-
-#
-#	Name:             ISO 9945-2 (1998) to Unicode
-#	Unicode version:  1.0
-#	Table version:    0.1
-#	Table format:     Format A
-#	Date:             16 January 1995
-#	Authors:          Tim Greenwood <greenwood@r2me2.enet.dec.com>
-#                     John H. Jenkins <John_Jenkins@taligent.com>
-#
-#	Copyright (c) 1991-1995 Unicode, Inc.  All Rights reserved.
-#
-#	This file is provided as-is by Unicode, Inc. (The Unicode Consortium).
-#	No claims are made as to fitness for any particular purpose.  No
-#	warranties of any kind are expressed or implied.  The recipient
-#	agrees to determine applicability of information provided.  If this
-#	file has been provided on magnetic media by Unicode, Inc., the sole
-#	remedy for any claim will be exchange of defective media within 90
-#	days of receipt.
-#
-#	Recipient is granted the right to make copies in any form for
-#	internal distribution and to freely use the information supplied
-#	in the creation of products supporting Unicode.  Unicode, Inc.
-#	specifically excludes the right to re-distribute this file directly
-#	to third parties or other organizations whether for profit or not.
-#
-#	General notes:
-#
-#	This table contains the data the Unicode Consortium has on how
-#       ISO 8859-2 (1987) characters map into Unicode.
-#
-#	Format:  Three tab-separated columns
-#		 Column #1 is the ISO 8859-2 code (in hex as 0xXX)
-#		 Column #2 is the Unicode (in hex as 0xXXXX)
-#		 Column #3 the Unicode name (follows a comment sign, '#')
-#
-#	The entries are in ISO 8859-2 order
-#
-#	Any comments or problems, contact <John_Jenkins@taligent.com>
-#
-0x20-0x7e idem
-#
-0x80 U+2500 # BOX DRAWINGS LIGHT HORIZONTAL
-0x81 U+2502 # BOX DRAWINGS LIGHT VERTICAL
-0x82 U+250C # BOX DRAWINGS LIGHT DOWN AND RIGHT
-0x83 U+2510 # BOX DRAWINGS LIGHT DOWN AND LEFT
-0x84 U+2514 # BOX DRAWINGS LIGHT UP AND RIGHT
-0x85 U+2518 # BOX DRAWINGS LIGHT UP AND LEFT
-0x86 U+251C # BOX DRAWINGS LIGHT VERTICAL AND RIGHT
-0x87 U+2524 # BOX DRAWINGS LIGHT VERTICAL AND LEFT
-0x88 U+252C # BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
-0x89 U+2534 # BOX DRAWINGS LIGHT UP AND HORIZONTAL
-0x8A U+253C # BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
-0x8B U+2580 # UPPER HALF BLOCK
-0x8C U+2584 # LOWER HALF BLOCK
-0x8D U+2588 # FULL BLOCK
-0x8E U+258C # LEFT HALF BLOCK
-0x8F U+2590 # RIGHT HALF BLOCK
-0x90 U+2591 # LIGHT SHADE
-0x91 U+2592 # MEDIUM SHADE
-0x92 U+2593 # DARK SHADE
-0x93 U+201C # LEFT DOUBLE QUOTATION MARK
-0x94 U+25A0 # BLACK SQUARE
-0x95 U+2022 # BULLET
-0x96 U+201D # RIGHT DOUBLE QUOTATION MARK
-0x97 U+2014 # EM DASH
-0x98 U+00AC # NOT SIGN
-0x99 U+2122 # TRADE MARK SIGN
-0x9A U+00A0 # NO-BREAK SPACE
-0x9B U+00BB # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
-0x9C U+00AE # REGISTERED SIGN
-0x9D U+00AB # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
-0x9E U+00B7 # MIDDLE DOT
-0x9F U+00A4 # CURRENCY SIGN
-0xA0 U+2550 # BOX DRAWINGS DOUBLE HORIZONTAL
-0xA1 U+2551 # BOX DRAWINGS DOUBLE VERTICAL
-0xA2 U+2552 # BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE
-0xA3 U+0451 # CYRILLIC SMALL LETTER IO
-0xA4 U+0454 # CYRILLIC SMALL LETTER UKRAINIAN IE
-0xA5 U+2554 # BOX DRAWINGS DOUBLE DOWN AND RIGHT
-0xA6 U+0456 # CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
-0xA7 U+0457 # CYRILLIC SMALL LETTER YI (Ukrainian)
-0xA8 U+2557 # BOX DRAWINGS DOUBLE DOWN AND LEFT
-0xA9 U+2558 # BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE
-0xAA U+2559 # BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE
-0xAB U+255A # BOX DRAWINGS DOUBLE UP AND RIGHT
-0xAC U+255B # BOX DRAWINGS UP SINGLE AND LEFT DOUBLE
-0xAD U+0491 # CYRILLIC SMALL LETTER GHE WITH UPTURN
-0xAE U+256C # BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
-0xAF U+255E # BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
-0xB0 U+255F # BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE
-0xB1 U+2560 # BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
-0xB2 U+2561 # BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE
-0xB3 U+0401 # CYRILLIC CAPITAL LETTER IO
-0xB4 U+0403 # CYRILLIC CAPITAL LETTER UKRAINIAN IE
-0xB5 U+2563 # BOX DRAWINGS DOUBLE VERTICAL AND LEFT
-0xB6 U+0406 # CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
-0xB7 U+0407 # CYRILLIC CAPITAL LETTER YI (Ukrainian)
-0xB8 U+2566 # BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
-0xB9 U+2567 # BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE
-0xBA U+2568 # BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE
-0xBB U+2569 # BOX DRAWINGS DOUBLE UP AND HORIZONTAL
-0xBC U+256A # BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE
-0xBD U+0490 # CYRILLIC CAPITAL LETTER GHE WITH UPTURN
-0xBE U+255A # BOX DRAWINGS DOUBLE UP AND RIGHT
-0xBF U+00A9 # COPYRIGHT SIGN
-0xC0 U+044E # CYRILLIC SMALL LETTER YU
-0xC1 U+0430 # CYRILLIC SMALL LETTER A
-0xC2 U+0431 # CYRILLIC SMALL LETTER BE
-0xC3 U+0446 # CYRILLIC SMALL LETTER TSE
-0xC4 U+0434 # CYRILLIC SMALL LETTER DE
-0xC5 U+0435 # CYRILLIC SMALL LETTER IE
-0xC6 U+0444 # CYRILLIC SMALL LETTER EF
-0xC7 U+0433 # CYRILLIC SMALL LETTER GHE
-0xC8 U+0445 # CYRILLIC SMALL LETTER HA
-0xC9 U+0438 # CYRILLIC SMALL LETTER I
-0xCA U+0439 # CYRILLIC SMALL LETTER SHORT I
-0xCB U+043A # CYRILLIC SMALL LETTER KA
-0xCC U+043B # CYRILLIC SMALL LETTER EL
-0xCD U+043C # CYRILLIC SMALL LETTER EM
-0xCE U+043D # CYRILLIC SMALL LETTER EN
-0xCF U+043E # CYRILLIC SMALL LETTER O
-0xD0 U+043F # CYRILLIC SMALL LETTER PE
-0xD1 U+044F # CYRILLIC SMALL LETTER YA
-0xD2 U+0440 # CYRILLIC SMALL LETTER ER
-0xD3 U+0441 # CYRILLIC SMALL LETTER ES
-0xD4 U+0442 # CYRILLIC SMALL LETTER TE
-0xD5 U+0443 # CYRILLIC SMALL LETTER U
-0xD6 U+0436 # CYRILLIC SMALL LETTER ZHE
-0xD7 U+0432 # CYRILLIC SMALL LETTER VE
-0xD8 U+044C # CYRILLIC SMALL LETTER SOFT SIGN
-0xD9 U+044B # CYRILLIC SMALL LETTER YERU
-0xDA U+0437 # CYRILLIC SMALL LETTER ZE
-0xDB U+0448 # CYRILLIC SMALL LETTER SHA
-0xDC U+044D # CYRILLIC SMALL LETTER E
-0xDD U+0449 # CYRILLIC SMALL LETTER SHCHA
-0xDE U+0447 # CYRILLIC SMALL LETTER CHE
-0xDF U+044A # CYRILLIC SMALL LETTER HARD SIGN
-0xE0 U+042E # CYRILLIC CAPITAL LETTER YU
-0xE1 U+0410 # CYRILLIC CAPITAL LETTER A
-0xE2 U+0411 # CYRILLIC CAPITAL LETTER BE
-0xE3 U+0426 # CYRILLIC CAPITAL LETTER TSE
-0xE4 U+0414 # CYRILLIC CAPITAL LETTER DE
-0xE5 U+0415 # CYRILLIC CAPITAL LETTER IE
-0xE6 U+0424 # CYRILLIC CAPITAL LETTER EF
-0xE7 U+0413 # CYRILLIC CAPITAL LETTER GHE
-0xE8 U+0425 # CYRILLIC CAPITAL LETTER HA
-0xE9 U+0418 # CYRILLIC CAPITAL LETTER I
-0xEA U+0419 # CYRILLIC CAPITAL LETTER SHORT I
-0xEB U+041A # CYRILLIC CAPITAL LETTER KA
-0xEC U+041B # CYRILLIC CAPITAL LETTER EL
-0xED U+041C # CYRILLIC CAPITAL LETTER EM
-0xEE U+041D # CYRILLIC CAPITAL LETTER EN
-0xEF U+041E # CYRILLIC CAPITAL LETTER O
-0xF0 U+041F # CYRILLIC CAPITAL LETTER PE
-0xF1 U+042F # CYRILLIC CAPITAL LETTER YA
-0xF2 U+0420 # CYRILLIC CAPITAL LETTER ER
-0xF3 U+0421 # CYRILLIC CAPITAL LETTER ES
-0xF4 U+0422 # CYRILLIC CAPITAL LETTER TE
-0xF5 U+0423 # CYRILLIC CAPITAL LETTER U
-0xF6 U+0416 # CYRILLIC CAPITAL LETTER ZHE
-0xF7 U+0412 # CYRILLIC CAPITAL LETTER VE
-0xF8 U+042C # CYRILLIC CAPITAL LETTER SOFT SIGN
-0xF9 U+042B # CYRILLIC CAPITAL LETTER YERU
-0xFA U+0417 # CYRILLIC CAPITAL LETTER ZE
-0xFB U+0428 # CYRILLIC CAPITAL LETTER SHA
-0xFC U+042D # CYRILLIC CAPITAL LETTER E
-0xFD U+0429 # CYRILLIC CAPITAL LETTER SHCHA
-0xFE U+0427 # CYRILLIC CAPITAL LETTER CHE
-0xFF U+042A # CYRILLIC CAPITAL LETTER HARD SIGN
diff --git a/src/chrtrans/makefile.dos b/src/chrtrans/makefile.dos
index 5219081d..3a830a4f 100644
--- a/src/chrtrans/makefile.dos
+++ b/src/chrtrans/makefile.dos
@@ -58,7 +58,6 @@ TABLES= \
  iso09_uni.h \
  iso10_uni.h \
  iso15_uni.h \
- iso9945uni.h \
  koi8r_uni.h \
  koi8u_uni.h \
  mac_uni.h \
@@ -111,7 +110,6 @@ iso08_uni.h:		iso08_uni.tbl		makeuctb.exe
 iso09_uni.h:		iso09_uni.tbl		makeuctb.exe
 iso10_uni.h:		iso10_uni.tbl		makeuctb.exe
 iso15_uni.h:		iso15_uni.tbl		makeuctb.exe
-iso9945uni.h:		iso9945uni.tbl		makeuctb.exe
 koi8r_uni.h:		koi8r_uni.tbl		makeuctb.exe
 koi8u_uni.h:		koi8u_uni.tbl		makeuctb.exe
 mac_uni.h:		mac_uni.tbl		makeuctb.exe
diff --git a/src/chrtrans/makefile.in b/src/chrtrans/makefile.in
index 45c06a80..dbba4fd7 100644
--- a/src/chrtrans/makefile.in
+++ b/src/chrtrans/makefile.in
@@ -77,7 +77,6 @@ TABLES= \
  iso09_uni.h \
  iso10_uni.h \
  iso15_uni.h \
- iso9945uni.h \
  koi8r_uni.h \
  koi8u_uni.h \
  mac_uni.h \
@@ -105,7 +104,7 @@ makeuctb.o: $(srcdir)/UCkd.h $(srcdir)/makeuctb.c
 
 .c.i:
 @RULE_CC@
-	@ECHO_CC@$(CPP) -C $(CPP_OPTS) $*.c >$@
+	@ECHO_CC@$(CPP) -C $(CPP_OPTS) $(srcdir)/$*.c >$@
 
 .tbl.h:
 	./makeuctb$x $(srcdir)/$*.tbl > $@
@@ -143,7 +142,6 @@ iso08_uni.h:		$(srcdir)/iso08_uni.tbl		makeuctb$x
 iso09_uni.h:		$(srcdir)/iso09_uni.tbl		makeuctb$x
 iso10_uni.h:		$(srcdir)/iso10_uni.tbl		makeuctb$x
 iso15_uni.h:		$(srcdir)/iso15_uni.tbl		makeuctb$x
-iso9945uni.h:		$(srcdir)/iso9945uni.tbl	makeuctb$x
 koi8r_uni.h:		$(srcdir)/koi8r_uni.tbl		makeuctb$x
 koi8u_uni.h:		$(srcdir)/koi8u_uni.tbl		makeuctb$x
 mac_uni.h:		$(srcdir)/mac_uni.tbl		makeuctb$x
diff --git a/src/makefile.in b/src/makefile.in
index 6934d250..978d6d0d 100644
--- a/src/makefile.in
+++ b/src/makefile.in
@@ -79,7 +79,7 @@ all: lynx$x
 
 .c.i:
 @RULE_CC@
-	@ECHO_CC@$(CPP) -C $(CPP_OPTS) $*.c >$@
+	@ECHO_CC@$(CPP) -C $(CPP_OPTS) $(srcdir)/$*.c >$@
 
 lynx$x:   message do_chartrans_stuff $(top_builddir)/LYHelp.h $(OBJS) $(WWWLIB)
 	@echo "Linking and creating Lynx executable"