about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--CHANGES12
-rw-r--r--WWW/Library/Implementation/HTFormat.c17
-rw-r--r--WWW/Library/Implementation/HTMIME.c117
-rw-r--r--WWW/Library/Implementation/HTUtils.h10
-rw-r--r--WWW/Library/Implementation/SGML.c8
-rw-r--r--WWW/Library/Implementation/dtd_util.c15
-rw-r--r--WWW/Library/Implementation/makefile.in5
-rw-r--r--WWW/Library/Implementation/src0_HTMLDTD.h366
-rw-r--r--WWW/Library/Implementation/src1_HTMLDTD.h366
-rw-r--r--makefile.in6
-rw-r--r--src/HTInit.c71
-rw-r--r--src/LYCurses.c4
-rw-r--r--src/LYHistory.c5
-rw-r--r--src/LYMain.c51
-rw-r--r--src/LYrcFile.h3
15 files changed, 716 insertions, 340 deletions
diff --git a/CHANGES b/CHANGES
index e9d0f885..693df21d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,9 +1,16 @@
--- $LynxId: CHANGES,v 1.299 2008/09/10 14:03:11 tom Exp $
+-- $LynxId: CHANGES,v 1.303 2008/09/17 00:46:51 tom Exp $
 ===============================================================================
 Changes since Lynx 2.8 release
 ===============================================================================
 
 2008-0?-?? (2.8.7dev.10)
+* implement "chunked" transfer-encoding to work with servers that ignore the
+  version number in HTTP get's -TD
+* change initialization of trace file, handing this during the first part of
+  argument parsing along with -help and -version, to show steps done for
+  initialization of presentors, etc -TD
+* minor fix to LYstartPopup() to handle a case where the popup menu was too
+  large for the screen -TD
 * fixes for srcdir!=objdir (report by FLWM) -TD
 * modify man2hlp.sh to work from subdirectory, e.g., its parameter would be
   "../lynx.man" -TD
@@ -37,7 +44,8 @@ Changes since Lynx 2.8 release
 * parse doctype for xhtml, to tell when empty tags such as "<textarea />" can
   be discarded (report by Nils Dagsson Moskopp) -TD
 * parse xml processing-instruction to turn on UTF-8 decoding, as well as
-  disable upper/lower case transforming in source view -TD
+  disable upper/lower case transforming in source view (discussion on
+  lynx-dev) -TD
 * fix typo in Lynx_users_guide.html (report by Kristof Zelechovski)
 * minor fix to documentation in lynx.cfg -PW
 * use off_t rather than long for representing file sizes, e.g., when used to
diff --git a/WWW/Library/Implementation/HTFormat.c b/WWW/Library/Implementation/HTFormat.c
index f7b4f24b..5818e8a6 100644
--- a/WWW/Library/Implementation/HTFormat.c
+++ b/WWW/Library/Implementation/HTFormat.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTFormat.c,v 1.62 2007/08/02 20:12:22 tom Exp $
+ * $LynxId: HTFormat.c,v 1.63 2008/09/10 23:22:59 tom Exp $
  *
  *		Manage different file formats			HTFormat.c
  *		=============================
@@ -101,6 +101,14 @@ void HTSetPresentation(const char *representation,
     if (pres == NULL)
 	outofmem(__FILE__, "HTSetPresentation");
 
+    CTRACE2(TRACE_CFG,
+	    (tfp,
+	     "HTSetPresentation rep=%s, command=%s, test=%s, qual=%f\n",
+	     NonNull(representation),
+	     NonNull(command),
+	     NonNull(testcommand),
+	     quality));
+
     pres->rep = HTAtom_for(representation);
     pres->rep_out = WWW_PRESENT;	/* Fixed for now ... :-) */
     pres->converter = HTSaveAndExecute;		/* Fixed for now ...     */
@@ -153,6 +161,13 @@ void HTSetConversion(const char *representation_in,
     if (pres == NULL)
 	outofmem(__FILE__, "HTSetConversion");
 
+    CTRACE2(TRACE_CFG,
+	    (tfp,
+	     "HTSetConversion rep_in=%s, rep_out=%s, qual=%f\n",
+	     NonNull(representation_in),
+	     NonNull(representation_out),
+	     quality));
+
     pres->rep = HTAtom_for(representation_in);
     pres->rep_out = HTAtom_for(representation_out);
     pres->converter = converter;
diff --git a/WWW/Library/Implementation/HTMIME.c b/WWW/Library/Implementation/HTMIME.c
index 9e6c03fd..df5115b6 100644
--- a/WWW/Library/Implementation/HTMIME.c
+++ b/WWW/Library/Implementation/HTMIME.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTMIME.c,v 1.62 2007/07/03 00:16:30 tom Exp $
+ * $LynxId: HTMIME.c,v 1.64 2008/09/17 00:04:44 tom Exp $
  *
  *			MIME Message Parse			HTMIME.c
  *			==================
@@ -37,6 +37,16 @@
 
 typedef enum {
     MIME_TRANSPARENT,		/* put straight through to target ASAP! */
+    /* states for "Transfer-Encoding: chunked" */
+    MIME_CHUNKED,
+    mcCHUNKED_COUNT_DIGIT,
+    mcCHUNKED_COUNT_CR,
+    mcCHUNKED_COUNT_LF,
+    mcCHUNKED_EXTENSION,
+    mcCHUNKED_DATA,
+    mcCHUNKED_DATA_CR,
+    mcCHUNKED_DATA_LF,
+    /* character state-machine */
     miBEGINNING_OF_LINE,	/* first character and not a continuation */
     miA,
     miACCEPT_RANGES,
@@ -138,8 +148,12 @@ struct _HTStream {
 
     char *refresh_url;		/* "Refresh:" URL */
 
-    HTFormat encoding;		/* Content-Transfer-Encoding */
+    HTFormat c_t_encoding;	/* Content-Transfer-Encoding */
     char *compression_encoding;
+
+    BOOL chunked_encoding;	/* Transfer-Encoding: chunked */
+    long chunked_size;		/* ...counter for "chunked" */
+
     HTFormat format;		/* Content-Type */
     HTStream *target;		/* While writing out */
     HTStreamClass targetClass;
@@ -471,10 +485,11 @@ static int pumpData(HTStream *me)
     if (me->target) {
 	me->targetClass = *me->target->isa;
 	/*
-	 * Check for encoding and select state from there, someday, but until
-	 * we have the relevant code, from now push straight through.  - FM
+	 * Pump rest of data right through, according to the transfer encoding.
 	 */
-	me->state = MIME_TRANSPARENT;	/* Pump rest of data right through */
+	me->state = (me->chunked_encoding
+		     ? MIME_CHUNKED
+		     : MIME_TRANSPARENT);
     } else {
 	me->state = MIME_IGNORE;	/* What else to do? */
     }
@@ -754,7 +769,7 @@ static int dispatchField(HTStream *me)
 	 * Force the Content-Transfer-Encoding value to all lower case.  - FM
 	 */
 	LYLowerCase(me->value);
-	me->encoding = HTAtom_for(me->value);
+	me->c_t_encoding = HTAtom_for(me->value);
 	break;
     case miCONTENT_TYPE:
 	HTMIME_TrimDoubleQuotes(me->value);
@@ -937,6 +952,8 @@ static int dispatchField(HTStream *me)
 	HTMIME_TrimDoubleQuotes(me->value);
 	CTRACE((tfp, "HTMIME: PICKED UP Transfer-Encoding: '%s'\n",
 		me->value));
+	if (!strcmp(me->value, "chunked"))
+	    me->chunked_encoding = YES;
 	break;
     case miUPGRADE:
 	HTMIME_TrimDoubleQuotes(me->value);
@@ -990,9 +1007,82 @@ static int dispatchField(HTStream *me)
 static void HTMIME_put_character(HTStream *me,
 				 char c)
 {
-    if (me->state == MIME_TRANSPARENT) {
-	(*me->targetClass.put_character) (me->target, c);	/* MUST BE FAST */
+    /* MUST BE FAST */
+    switch (me->state) {
+      begin_transparent:
+    case MIME_TRANSPARENT:
+	(*me->targetClass.put_character) (me->target, c);
 	return;
+
+	/* RFC-2616 describes chunked transfer coding */
+    case mcCHUNKED_DATA:
+	(*me->targetClass.put_character) (me->target, c);
+	me->chunked_size--;
+	if (me->chunked_size <= 0)
+	    me->state = mcCHUNKED_DATA_CR;
+	return;
+
+    case mcCHUNKED_DATA_CR:
+	me->state = mcCHUNKED_DATA_LF;
+	if (c == CR) {
+	    return;
+	}
+
+    case mcCHUNKED_DATA_LF:
+	me->state = MIME_CHUNKED;
+	if (c == LF) {
+	    return;
+	}
+
+	CTRACE((tfp, "HTIME_put_character expected LF in chunked data\n"));
+	me->state = MIME_TRANSPARENT;
+	goto begin_transparent;
+
+	/* FALLTHRU */
+      begin_chunked:
+    case MIME_CHUNKED:
+	me->chunked_size = 0;
+	me->state = mcCHUNKED_COUNT_DIGIT;
+
+	/* FALLTHRU */
+    case mcCHUNKED_COUNT_DIGIT:
+	if (isxdigit(UCH(c))) {
+	    me->chunked_size <<= 4;
+	    if (isdigit(UCH(c)))
+		me->chunked_size += UCH(c) - '0';
+	    else
+		me->chunked_size += TOUPPER(UCH(c)) - 'A' + 10;
+	    return;
+	}
+	if (c == ';')
+	    me->state = mcCHUNKED_EXTENSION;
+
+	/* FALLTHRU */
+    case mcCHUNKED_EXTENSION:
+	if (c != CR && c != LF) {
+	    return;
+	}
+	me->state = mcCHUNKED_COUNT_CR;
+
+	/* FALLTHRU */
+    case mcCHUNKED_COUNT_CR:
+	me->state = mcCHUNKED_COUNT_LF;
+	if (c == CR) {
+	    return;
+	}
+
+	/* FALLTHRU */
+    case mcCHUNKED_COUNT_LF:
+	me->state = ((me->chunked_size != 0)
+		     ? mcCHUNKED_DATA
+		     : MIME_CHUNKED);
+	if (c == LF) {
+	    return;
+	}
+	goto begin_chunked;
+
+    default:
+	break;
     }
 
     /*
@@ -1025,7 +1115,14 @@ static void HTMIME_put_character(HTStream *me,
 	return;
 
     case MIME_TRANSPARENT:	/* Not reached see above */
-	(*me->targetClass.put_character) (me->target, c);
+    case MIME_CHUNKED:
+    case mcCHUNKED_COUNT_DIGIT:
+    case mcCHUNKED_COUNT_CR:
+    case mcCHUNKED_COUNT_LF:
+    case mcCHUNKED_EXTENSION:
+    case mcCHUNKED_DATA:
+    case mcCHUNKED_DATA_CR:
+    case mcCHUNKED_DATA_LF:
 	return;
 
     case MIME_NET_ASCII:
@@ -2049,7 +2146,7 @@ HTStream *HTMIMEConvert(HTPresentation *pres,
     me->set_cookie = NULL;	/* Not set yet */
     me->set_cookie2 = NULL;	/* Not set yet */
     me->refresh_url = NULL;	/* Not set yet */
-    me->encoding = 0;		/* Not set yet */
+    me->c_t_encoding = 0;	/* Not set yet */
     me->compression_encoding = NULL;	/* Not set yet */
     me->net_ascii = NO;		/* Local character set */
     HTAnchor_setUCInfoStage(me->anchor, current_char_set,
diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h
index eb794f59..6ea1f42c 100644
--- a/WWW/Library/Implementation/HTUtils.h
+++ b/WWW/Library/Implementation/HTUtils.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTUtils.h,v 1.85 2008/07/06 12:55:40 tom Exp $
+ * $LynxId: HTUtils.h,v 1.86 2008/09/17 00:52:06 tom Exp $
  *
  * Utility macros for the W3 code library
  * MACROS FOR GENERAL USE
@@ -546,11 +546,11 @@ extern int WWW_TraceMask;
  * Printing/scanning-formats for "off_t", as well as cast needed to fit.
  */
 #if defined(HAVE_INTTYPES_H) && defined(SIZEOF_OFF_T)
-#if SIZEOF_OFF_T == 8
+#if (SIZEOF_OFF_T == 8) && defined(PRId64)
 #define PRI_off_t	PRId64
 #define SCN_off_t	SCNd64
 #define CAST_off_t(n)	(int64_t)(n)
-#else
+#elif defined(PRId32)
 #define PRI_off_t	PRId32
 #define SCN_off_t	SCNd32
 #define CAST_off_t(n)	(int32_t)(n)
@@ -567,11 +567,11 @@ extern int WWW_TraceMask;
  * Printing-format for "time_t", as well as cast needed to fit.
  */
 #if defined(HAVE_INTTYPES_H) && defined(SIZEOF_TIME_T)
-#if SIZEOF_TIME_T == 8
+#if (SIZEOF_TIME_T == 8) && defined(PRId64)
 #define PRI_time_t	PRId64
 #define SCN_time_t	SCNd64
 #define CAST_time_t(n)	(int64_t)(n)
-#else
+#elif defined(PRId32)
 #define PRI_time_t	PRId32
 #define SCN_time_t	SCNd32
 #define CAST_time_t(n)	(int32_t)(n)
diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c
index 51e7895b..accc23a2 100644
--- a/WWW/Library/Implementation/SGML.c
+++ b/WWW/Library/Implementation/SGML.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: SGML.c,v 1.114 2008/09/10 12:56:58 tom Exp $
+ * $LynxId: SGML.c,v 1.115 2008/09/17 00:45:07 tom Exp $
  *
  *			General SGML Parser code		SGML.c
  *			========================
@@ -876,12 +876,12 @@ static void handle_processing_instruction(HTStream *context)
 
     CTRACE((tfp, "SGML Processing instruction:\n<%s>\n", s));
 
-    if (!strncmp(s, "?xml", 4)) {
+    if (!strncmp(s, "?xml ", 5)) {
 	int flag = context->T.decode_utf8;
 
 	context->strict_xml = TRUE;
 	/*
-	 * Switch to UTF-8 unless the encoding is explicitly not "utf-8".
+	 * Switch to UTF-8 if the encoding is explicitly "utf-8".
 	 */
 	if (!flag) {
 	    char *t = strstr(s, "encoding=");
@@ -891,8 +891,6 @@ static void handle_processing_instruction(HTStream *context)
 		if (*t == '"')
 		    ++t;
 		flag = !strncmp(t, "utf-8", 5);
-	    } else {
-		flag = TRUE;
 	    }
 	    if (flag) {
 		CTRACE((tfp, "...Use UTF-8 for XML\n"));
diff --git a/WWW/Library/Implementation/dtd_util.c b/WWW/Library/Implementation/dtd_util.c
index 268d19ed..c50ac740 100644
--- a/WWW/Library/Implementation/dtd_util.c
+++ b/WWW/Library/Implementation/dtd_util.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: dtd_util.c,v 1.28 2008/08/18 23:42:12 tom Exp $
+ * $LynxId: dtd_util.c,v 1.31 2008/09/16 23:43:49 tom Exp $
  *
  * Given a SGML_dtd structure, write a corresponding flat file, or "C" source.
  * Given the flat-file, write the "C" source.
@@ -297,7 +297,7 @@ static void dump_src_HTTag(FILE *output, const SGML_dtd * dtd, int which)
     if (!tag->can_justify)
 	P_macro = "P0";
 #endif
-    PrintF(output, 19, " { %s(\"%s\"),", P_macro, tag->name);
+    PrintF(output, 19, " { %s(%s),", P_macro, tag->name);
     PrintF(output, 16, "%s_attr,", XXX_attr(dtd, which));
     PrintF(output, 28, "HTML_%s_ATTRIBUTES,", NameOfAttrs(dtd, which));
     PrintF(output, 14, "%s,", SGMLContent2s(tag->contents));
@@ -349,6 +349,7 @@ static void dump_source(FILE *output, const SGML_dtd * dtd, int dtd_version)
     }
     NOTE("/* *INDENT-ON* */");
     NOTE("");
+    NOTE("/* justification-flags */");
     NOTE("#undef N");
     NOTE("#undef i");
     NOTE("#undef h");
@@ -356,16 +357,20 @@ static void dump_source(FILE *output, const SGML_dtd * dtd, int dtd_version)
     NOTE("#undef x");
     NOTE("");
     NOTE("#undef T");
-
+    NOTE("");
+    NOTE("/* tag-names */");
+    for (j = 0; j <= dtd->number_of_tags; ++j) {
+	fprintf(output, "#undef %s\n", DEF_name(dtd, j));
+    }
     NOTE("");
     NOTE("/* these definitions are used in the tags-tables */");
     NOTE("#undef P");
     NOTE("#undef P_");
     NOTE("#ifdef USE_COLOR_STYLE");
-    NOTE("#define P_(x) x , (sizeof x) -1");
+    NOTE("#define P_(x) #x, (sizeof #x) -1");
     NOTE("#define NULL_HTTag_ NULL, 0");
     NOTE("#else");
-    NOTE("#define P_(x) x");
+    NOTE("#define P_(x) #x");
     NOTE("#define NULL_HTTag_ NULL");
     NOTE("#endif");
     NOTE("");
diff --git a/WWW/Library/Implementation/makefile.in b/WWW/Library/Implementation/makefile.in
index 01e74137..dc8d55d7 100644
--- a/WWW/Library/Implementation/makefile.in
+++ b/WWW/Library/Implementation/makefile.in
@@ -1,4 +1,4 @@
-# $LynxId: makefile.in,v 1.18 2008/07/08 00:06:40 tom Exp $
+# $LynxId: makefile.in,v 1.19 2008/09/17 01:14:02 tom Exp $
 # Make WWW under unix for a.n.other unix system (bsd)
 # Use this as a template
 
@@ -179,6 +179,9 @@ clean :
 	rm -f dtd_util$x
 	rm -f $(LOB)/*$o
 
+distclean : clean
+	@echo made $@
+
 tags:
 	ctags *.[ch]
 
diff --git a/WWW/Library/Implementation/src0_HTMLDTD.h b/WWW/Library/Implementation/src0_HTMLDTD.h
index 7ab6d505..19431ef7 100644
--- a/WWW/Library/Implementation/src0_HTMLDTD.h
+++ b/WWW/Library/Implementation/src0_HTMLDTD.h
@@ -1,4 +1,4 @@
-/* $LynxId: src0_HTMLDTD.h,v 1.6 2008/07/15 22:43:49 tom Exp $ */
+/* $LynxId: src0_HTMLDTD.h,v 1.9 2008/09/16 23:47:45 tom Exp $ */
 #ifndef src_HTMLDTD_H0
 #define src_HTMLDTD_H0 1
 
@@ -1034,6 +1034,7 @@ static const attr ul_attr[] = {         /* DIR attributes */
 
 /* *INDENT-ON* */
 
+/* justification-flags */
 #undef N
 #undef i
 #undef h
@@ -1042,14 +1043,135 @@ static const attr ul_attr[] = {         /* DIR attributes */
 
 #undef T
 
+/* tag-names */
+#undef A
+#undef ABBR
+#undef ACRONYM
+#undef ADDRESS
+#undef APPLET
+#undef AREA
+#undef AU
+#undef AUTHOR
+#undef B
+#undef BANNER
+#undef BASE
+#undef BASEFONT
+#undef BDO
+#undef BGSOUND
+#undef BIG
+#undef BLINK
+#undef BLOCKQUOTE
+#undef BODY
+#undef BODYTEXT
+#undef BQ
+#undef BR
+#undef BUTTON
+#undef CAPTION
+#undef CENTER
+#undef CITE
+#undef CODE
+#undef COL
+#undef COLGROUP
+#undef COMMENT
+#undef CREDIT
+#undef DD
+#undef DEL
+#undef DFN
+#undef DIR
+#undef DIV
+#undef DL
+#undef DLC
+#undef DT
+#undef EM
+#undef EMBED
+#undef FIELDSET
+#undef FIG
+#undef FN
+#undef FONT
+#undef FORM
+#undef FRAME
+#undef FRAMESET
+#undef H1
+#undef H2
+#undef H3
+#undef H4
+#undef H5
+#undef H6
+#undef HEAD
+#undef HR
+#undef HTML
+#undef HY
+#undef I
+#undef IFRAME
+#undef IMG
+#undef INPUT
+#undef INS
+#undef ISINDEX
+#undef KBD
+#undef KEYGEN
+#undef LABEL
+#undef LEGEND
+#undef LH
+#undef LI
+#undef LINK
+#undef LISTING
+#undef MAP
+#undef MARQUEE
+#undef MATH
+#undef MENU
+#undef META
+#undef NEXTID
+#undef NOFRAMES
+#undef NOTE
+#undef OBJECT
+#undef OL
+#undef OPTION
+#undef OVERLAY
+#undef P
+#undef PARAM
+#undef PLAINTEXT
+#undef PRE
+#undef Q
+#undef S
+#undef SAMP
+#undef SCRIPT
+#undef SELECT
+#undef SHY
+#undef SMALL
+#undef SPAN
+#undef SPOT
+#undef STRIKE
+#undef STRONG
+#undef STYLE
+#undef SUB
+#undef SUP
+#undef TAB
+#undef TABLE
+#undef TBODY
+#undef TD
+#undef TEXTAREA
+#undef TEXTFLOW
+#undef TFOOT
+#undef TH
+#undef THEAD
+#undef TITLE
+#undef TR
+#undef TT
+#undef U
+#undef UL
+#undef VAR
+#undef WBR
+#undef XMP
+#undef OBJECT_PCDATA
+
 /* these definitions are used in the tags-tables */
 #undef P
 #undef P_
 #ifdef USE_COLOR_STYLE
-#define P_(x) x , (sizeof x) -1
+#define P_(x) #x, (sizeof #x) -1
 #define NULL_HTTag_ NULL, 0
 #else
-#define P_(x) x
+#define P_(x) #x
 #define NULL_HTTag_ NULL
 #endif
 
@@ -1066,128 +1188,128 @@ static const attr ul_attr[] = {         /* DIR attributes */
 #endif /* once_HTMLDTD */
 /* *INDENT-OFF* */
 static const HTTag tags_table0[HTML_ALL_ELEMENTS] = {
- { P("A"),         a_attr,         HTML_A_ATTRIBUTES,          SGML_EMPTY,   T_A},
- { P("ABBR"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_ABBR},
- { P("ACRONYM"),   gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_ACRONYM},
- { P("ADDRESS"),   address_attr,   HTML_ADDRESS_ATTRIBUTES,    SGML_MIXED,   T_ADDRESS},
- { P("APPLET"),    applet_attr,    HTML_APPLET_ATTRIBUTES,     SGML_MIXED,   T_APPLET},
- { P("AREA"),      area_attr,      HTML_AREA_ATTRIBUTES,       SGML_EMPTY,   T_AREA},
- { P("AU"),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_AU},
- { P("AUTHOR"),    gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_AUTHOR},
- { P("B"),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_B},
- { P0("BANNER"),   gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_BANNER},
- { P("BASE"),      base_attr,      HTML_BASE_ATTRIBUTES,       SGML_EMPTY,   T_BASE},
- { P("BASEFONT"),  font_attr,      HTML_FONT_ATTRIBUTES,       SGML_EMPTY,   T_BASEFONT},
- { P("BDO"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_BDO},
- { P("BGSOUND"),   bgsound_attr,   HTML_BGSOUND_ATTRIBUTES,    SGML_EMPTY,   T_BGSOUND},
- { P("BIG"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_BIG},
- { P("BLINK"),     gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_BLINK},
- { P("BLOCKQUOTE"),bq_attr,        HTML_BQ_ATTRIBUTES,         SGML_MIXED,   T_BLOCKQUOTE},
- { P("BODY"),      body_attr,      HTML_BODY_ATTRIBUTES,       SGML_MIXED,   T_BODY},
- { P("BODYTEXT"),  bodytext_attr,  HTML_BODYTEXT_ATTRIBUTES,   SGML_MIXED,   T_BODYTEXT},
- { P("BQ"),        bq_attr,        HTML_BQ_ATTRIBUTES,         SGML_MIXED,   T_BQ},
- { P("BR"),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_BR},
- { P("BUTTON"),    button_attr,    HTML_BUTTON_ATTRIBUTES,     SGML_MIXED,   T_BUTTON},
- { P("CAPTION"),   caption_attr,   HTML_CAPTION_ATTRIBUTES,    SGML_MIXED,   T_CAPTION},
- { P("CENTER"),    div_attr,       HTML_DIV_ATTRIBUTES,        SGML_MIXED,   T_CENTER},
- { P("CITE"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_CITE},
- { P("CODE"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_CODE},
- { P("COL"),       col_attr,       HTML_COL_ATTRIBUTES,        SGML_EMPTY,   T_COL},
- { P("COLGROUP"),  col_attr,       HTML_COL_ATTRIBUTES,        SGML_EMPTY,   T_COLGROUP},
- { P("COMMENT"),   gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_COMMENT},
- { P("CREDIT"),    credit_attr,    HTML_CREDIT_ATTRIBUTES,     SGML_MIXED,   T_CREDIT},
- { P("DD"),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_DD},
- { P("DEL"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_DEL},
- { P("DFN"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_DFN},
- { P("DIR"),       ul_attr,        HTML_UL_ATTRIBUTES,         SGML_MIXED,   T_DIR},
- { P("DIV"),       div_attr,       HTML_DIV_ATTRIBUTES,        SGML_MIXED,   T_DIV},
- { P("DL"),        dl_attr,        HTML_DL_ATTRIBUTES,         SGML_MIXED,   T_DL},
- { P("DLC"),       dl_attr,        HTML_DL_ATTRIBUTES,         SGML_MIXED,   T_DLC},
- { P("DT"),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_DT},
- { P("EM"),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_EM},
- { P("EMBED"),     embed_attr,     HTML_EMBED_ATTRIBUTES,      SGML_EMPTY,   T_EMBED},
- { P("FIELDSET"),  fieldset_attr,  HTML_FIELDSET_ATTRIBUTES,   SGML_MIXED,   T_FIELDSET},
- { P("FIG"),       fig_attr,       HTML_FIG_ATTRIBUTES,        SGML_MIXED,   T_FIG},
- { P("FN"),        fn_attr,        HTML_FN_ATTRIBUTES,         SGML_MIXED,   T_FN},
- { P("FONT"),      font_attr,      HTML_FONT_ATTRIBUTES,       SGML_EMPTY,   T_FONT},
- { P("FORM"),      form_attr,      HTML_FORM_ATTRIBUTES,       SGML_EMPTY,   T_FORM},
- { P("FRAME"),     frame_attr,     HTML_FRAME_ATTRIBUTES,      SGML_EMPTY,   T_FRAME},
- { P("FRAMESET"),  frameset_attr,  HTML_FRAMESET_ATTRIBUTES,   SGML_MIXED,   T_FRAMESET},
- { P0("H1"),       h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H1},
- { P0("H2"),       h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H2},
- { P0("H3"),       h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H3},
- { P0("H4"),       h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H4},
- { P0("H5"),       h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H5},
- { P0("H6"),       h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H6},
- { P("HEAD"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_HEAD},
- { P("HR"),        hr_attr,        HTML_HR_ATTRIBUTES,         SGML_EMPTY,   T_HR},
- { P("HTML"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_HTML},
- { P("HY"),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_HY},
- { P("I"),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_I},
- { P("IFRAME"),    iframe_attr,    HTML_IFRAME_ATTRIBUTES,     SGML_MIXED,   T_IFRAME},
- { P("IMG"),       img_attr,       HTML_IMG_ATTRIBUTES,        SGML_EMPTY,   T_IMG},
- { P("INPUT"),     input_attr,     HTML_INPUT_ATTRIBUTES,      SGML_EMPTY,   T_INPUT},
- { P("INS"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_INS},
- { P("ISINDEX"),   isindex_attr,   HTML_ISINDEX_ATTRIBUTES,    SGML_EMPTY,   T_ISINDEX},
- { P("KBD"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_KBD},
- { P("KEYGEN"),    keygen_attr,    HTML_KEYGEN_ATTRIBUTES,     SGML_EMPTY,   T_KEYGEN},
- { P("LABEL"),     label_attr,     HTML_LABEL_ATTRIBUTES,      SGML_MIXED,   T_LABEL},
- { P("LEGEND"),    legend_attr,    HTML_LEGEND_ATTRIBUTES,     SGML_MIXED,   T_LEGEND},
- { P("LH"),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_LH},
- { P("LI"),        li_attr,        HTML_LI_ATTRIBUTES,         SGML_EMPTY,   T_LI},
- { P("LINK"),      link_attr,      HTML_LINK_ATTRIBUTES,       SGML_EMPTY,   T_LINK},
- { P("LISTING"),   gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_LITTERAL,T_LISTING},
- { P("MAP"),       map_attr,       HTML_MAP_ATTRIBUTES,        SGML_MIXED,   T_MAP},
- { P("MARQUEE"),   gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_MARQUEE},
- { P("MATH"),      math_attr,      HTML_MATH_ATTRIBUTES,       SGML_LITTERAL,T_MATH},
- { P("MENU"),      ul_attr,        HTML_UL_ATTRIBUTES,         SGML_MIXED,   T_MENU},
- { P("META"),      meta_attr,      HTML_META_ATTRIBUTES,       SGML_EMPTY,   T_META},
- { P("NEXTID"),    nextid_attr,    HTML_NEXTID_ATTRIBUTES,     SGML_EMPTY,   T_NEXTID},
- { P("NOFRAMES"),  gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_NOFRAMES},
- { P("NOTE"),      note_attr,      HTML_NOTE_ATTRIBUTES,       SGML_MIXED,   T_NOTE},
- { P("OBJECT"),    object_attr,    HTML_OBJECT_ATTRIBUTES,     SGML_LITTERAL,T_OBJECT},
- { P("OL"),        ol_attr,        HTML_OL_ATTRIBUTES,         SGML_MIXED,   T_OL},
- { P("OPTION"),    option_attr,    HTML_OPTION_ATTRIBUTES,     SGML_EMPTY,   T_OPTION},
- { P("OVERLAY"),   overlay_attr,   HTML_OVERLAY_ATTRIBUTES,    SGML_EMPTY,   T_OVERLAY},
- { P("P"),         p_attr,         HTML_P_ATTRIBUTES,          SGML_EMPTY,   T_P},
- { P("PARAM"),     param_attr,     HTML_PARAM_ATTRIBUTES,      SGML_EMPTY,   T_PARAM},
- { P("PLAINTEXT"), gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_LITTERAL,T_PLAINTEXT},
- { P0("PRE"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_PRE},
- { P("Q"),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_Q},
- { P("S"),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_S},
- { P("SAMP"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SAMP},
- { P("SCRIPT"),    script_attr,    HTML_SCRIPT_ATTRIBUTES,     SGML_LITTERAL,T_SCRIPT},
- { P("SELECT"),    select_attr,    HTML_SELECT_ATTRIBUTES,     SGML_MIXED,   T_SELECT},
- { P("SHY"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_SHY},
- { P("SMALL"),     gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SMALL},
- { P("SPAN"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SPAN},
- { P("SPOT"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_SPOT},
- { P("STRIKE"),    gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_STRIKE},
- { P("STRONG"),    gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_STRONG},
- { P("STYLE"),     style_attr,     HTML_STYLE_ATTRIBUTES,      SGML_LITTERAL,T_STYLE},
- { P("SUB"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SUB},
- { P("SUP"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SUP},
- { P("TAB"),       tab_attr,       HTML_TAB_ATTRIBUTES,        SGML_EMPTY,   T_TAB},
- { P("TABLE"),     table_attr,     HTML_TABLE_ATTRIBUTES,      SGML_MIXED,   T_TABLE},
- { P("TBODY"),     tr_attr,        HTML_TR_ATTRIBUTES,         SGML_EMPTY,   T_TBODY},
- { P("TD"),        td_attr,        HTML_TD_ATTRIBUTES,         SGML_EMPTY,   T_TD},
- { P("TEXTAREA"),  textarea_attr,  HTML_TEXTAREA_ATTRIBUTES,   SGML_LITTERAL,T_TEXTAREA},
- { P("TEXTFLOW"),  bodytext_attr,  HTML_BODYTEXT_ATTRIBUTES,   SGML_MIXED,   T_TEXTFLOW},
- { P("TFOOT"),     tr_attr,        HTML_TR_ATTRIBUTES,         SGML_EMPTY,   T_TFOOT},
- { P("TH"),        td_attr,        HTML_TD_ATTRIBUTES,         SGML_EMPTY,   T_TH},
- { P("THEAD"),     tr_attr,        HTML_TR_ATTRIBUTES,         SGML_EMPTY,   T_THEAD},
- { P("TITLE"),     gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_RCDATA,  T_TITLE},
- { P("TR"),        tr_attr,        HTML_TR_ATTRIBUTES,         SGML_EMPTY,   T_TR},
- { P("TT"),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_TT},
- { P("U"),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_U},
- { P("UL"),        ul_attr,        HTML_UL_ATTRIBUTES,         SGML_MIXED,   T_UL},
- { P("VAR"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_VAR},
- { P("WBR"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_WBR},
- { P0("XMP"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_LITTERAL,T_XMP},
+ { P(A),           a_attr,         HTML_A_ATTRIBUTES,          SGML_EMPTY,   T_A},
+ { P(ABBR),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_ABBR},
+ { P(ACRONYM),     gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_ACRONYM},
+ { P(ADDRESS),     address_attr,   HTML_ADDRESS_ATTRIBUTES,    SGML_MIXED,   T_ADDRESS},
+ { P(APPLET),      applet_attr,    HTML_APPLET_ATTRIBUTES,     SGML_MIXED,   T_APPLET},
+ { P(AREA),        area_attr,      HTML_AREA_ATTRIBUTES,       SGML_EMPTY,   T_AREA},
+ { P(AU),          gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_AU},
+ { P(AUTHOR),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_AUTHOR},
+ { P(B),           gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_B},
+ { P0(BANNER),     gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_BANNER},
+ { P(BASE),        base_attr,      HTML_BASE_ATTRIBUTES,       SGML_EMPTY,   T_BASE},
+ { P(BASEFONT),    font_attr,      HTML_FONT_ATTRIBUTES,       SGML_EMPTY,   T_BASEFONT},
+ { P(BDO),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_BDO},
+ { P(BGSOUND),     bgsound_attr,   HTML_BGSOUND_ATTRIBUTES,    SGML_EMPTY,   T_BGSOUND},
+ { P(BIG),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_BIG},
+ { P(BLINK),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_BLINK},
+ { P(BLOCKQUOTE),  bq_attr,        HTML_BQ_ATTRIBUTES,         SGML_MIXED,   T_BLOCKQUOTE},
+ { P(BODY),        body_attr,      HTML_BODY_ATTRIBUTES,       SGML_MIXED,   T_BODY},
+ { P(BODYTEXT),    bodytext_attr,  HTML_BODYTEXT_ATTRIBUTES,   SGML_MIXED,   T_BODYTEXT},
+ { P(BQ),          bq_attr,        HTML_BQ_ATTRIBUTES,         SGML_MIXED,   T_BQ},
+ { P(BR),          gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_BR},
+ { P(BUTTON),      button_attr,    HTML_BUTTON_ATTRIBUTES,     SGML_MIXED,   T_BUTTON},
+ { P(CAPTION),     caption_attr,   HTML_CAPTION_ATTRIBUTES,    SGML_MIXED,   T_CAPTION},
+ { P(CENTER),      div_attr,       HTML_DIV_ATTRIBUTES,        SGML_MIXED,   T_CENTER},
+ { P(CITE),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_CITE},
+ { P(CODE),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_CODE},
+ { P(COL),         col_attr,       HTML_COL_ATTRIBUTES,        SGML_EMPTY,   T_COL},
+ { P(COLGROUP),    col_attr,       HTML_COL_ATTRIBUTES,        SGML_EMPTY,   T_COLGROUP},
+ { P(COMMENT),     gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_COMMENT},
+ { P(CREDIT),      credit_attr,    HTML_CREDIT_ATTRIBUTES,     SGML_MIXED,   T_CREDIT},
+ { P(DD),          gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_DD},
+ { P(DEL),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_DEL},
+ { P(DFN),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_DFN},
+ { P(DIR),         ul_attr,        HTML_UL_ATTRIBUTES,         SGML_MIXED,   T_DIR},
+ { P(DIV),         div_attr,       HTML_DIV_ATTRIBUTES,        SGML_MIXED,   T_DIV},
+ { P(DL),          dl_attr,        HTML_DL_ATTRIBUTES,         SGML_MIXED,   T_DL},
+ { P(DLC),         dl_attr,        HTML_DL_ATTRIBUTES,         SGML_MIXED,   T_DLC},
+ { P(DT),          gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_DT},
+ { P(EM),          gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_EM},
+ { P(EMBED),       embed_attr,     HTML_EMBED_ATTRIBUTES,      SGML_EMPTY,   T_EMBED},
+ { P(FIELDSET),    fieldset_attr,  HTML_FIELDSET_ATTRIBUTES,   SGML_MIXED,   T_FIELDSET},
+ { P(FIG),         fig_attr,       HTML_FIG_ATTRIBUTES,        SGML_MIXED,   T_FIG},
+ { P(FN),          fn_attr,        HTML_FN_ATTRIBUTES,         SGML_MIXED,   T_FN},
+ { P(FONT),        font_attr,      HTML_FONT_ATTRIBUTES,       SGML_EMPTY,   T_FONT},
+ { P(FORM),        form_attr,      HTML_FORM_ATTRIBUTES,       SGML_EMPTY,   T_FORM},
+ { P(FRAME),       frame_attr,     HTML_FRAME_ATTRIBUTES,      SGML_EMPTY,   T_FRAME},
+ { P(FRAMESET),    frameset_attr,  HTML_FRAMESET_ATTRIBUTES,   SGML_MIXED,   T_FRAMESET},
+ { P0(H1),         h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H1},
+ { P0(H2),         h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H2},
+ { P0(H3),         h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H3},
+ { P0(H4),         h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H4},
+ { P0(H5),         h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H5},
+ { P0(H6),         h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H6},
+ { P(HEAD),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_HEAD},
+ { P(HR),          hr_attr,        HTML_HR_ATTRIBUTES,         SGML_EMPTY,   T_HR},
+ { P(HTML),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_HTML},
+ { P(HY),          gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_HY},
+ { P(I),           gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_I},
+ { P(IFRAME),      iframe_attr,    HTML_IFRAME_ATTRIBUTES,     SGML_MIXED,   T_IFRAME},
+ { P(IMG),         img_attr,       HTML_IMG_ATTRIBUTES,        SGML_EMPTY,   T_IMG},
+ { P(INPUT),       input_attr,     HTML_INPUT_ATTRIBUTES,      SGML_EMPTY,   T_INPUT},
+ { P(INS),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_INS},
+ { P(ISINDEX),     isindex_attr,   HTML_ISINDEX_ATTRIBUTES,    SGML_EMPTY,   T_ISINDEX},
+ { P(KBD),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_KBD},
+ { P(KEYGEN),      keygen_attr,    HTML_KEYGEN_ATTRIBUTES,     SGML_EMPTY,   T_KEYGEN},
+ { P(LABEL),       label_attr,     HTML_LABEL_ATTRIBUTES,      SGML_MIXED,   T_LABEL},
+ { P(LEGEND),      legend_attr,    HTML_LEGEND_ATTRIBUTES,     SGML_MIXED,   T_LEGEND},
+ { P(LH),          gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_LH},
+ { P(LI),          li_attr,        HTML_LI_ATTRIBUTES,         SGML_EMPTY,   T_LI},
+ { P(LINK),        link_attr,      HTML_LINK_ATTRIBUTES,       SGML_EMPTY,   T_LINK},
+ { P(LISTING),     gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_LITTERAL,T_LISTING},
+ { P(MAP),         map_attr,       HTML_MAP_ATTRIBUTES,        SGML_MIXED,   T_MAP},
+ { P(MARQUEE),     gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_MARQUEE},
+ { P(MATH),        math_attr,      HTML_MATH_ATTRIBUTES,       SGML_LITTERAL,T_MATH},
+ { P(MENU),        ul_attr,        HTML_UL_ATTRIBUTES,         SGML_MIXED,   T_MENU},
+ { P(META),        meta_attr,      HTML_META_ATTRIBUTES,       SGML_EMPTY,   T_META},
+ { P(NEXTID),      nextid_attr,    HTML_NEXTID_ATTRIBUTES,     SGML_EMPTY,   T_NEXTID},
+ { P(NOFRAMES),    gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_NOFRAMES},
+ { P(NOTE),        note_attr,      HTML_NOTE_ATTRIBUTES,       SGML_MIXED,   T_NOTE},
+ { P(OBJECT),      object_attr,    HTML_OBJECT_ATTRIBUTES,     SGML_LITTERAL,T_OBJECT},
+ { P(OL),          ol_attr,        HTML_OL_ATTRIBUTES,         SGML_MIXED,   T_OL},
+ { P(OPTION),      option_attr,    HTML_OPTION_ATTRIBUTES,     SGML_EMPTY,   T_OPTION},
+ { P(OVERLAY),     overlay_attr,   HTML_OVERLAY_ATTRIBUTES,    SGML_EMPTY,   T_OVERLAY},
+ { P(P),           p_attr,         HTML_P_ATTRIBUTES,          SGML_EMPTY,   T_P},
+ { P(PARAM),       param_attr,     HTML_PARAM_ATTRIBUTES,      SGML_EMPTY,   T_PARAM},
+ { P(PLAINTEXT),   gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_LITTERAL,T_PLAINTEXT},
+ { P0(PRE),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_PRE},
+ { P(Q),           gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_Q},
+ { P(S),           gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_S},
+ { P(SAMP),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SAMP},
+ { P(SCRIPT),      script_attr,    HTML_SCRIPT_ATTRIBUTES,     SGML_LITTERAL,T_SCRIPT},
+ { P(SELECT),      select_attr,    HTML_SELECT_ATTRIBUTES,     SGML_MIXED,   T_SELECT},
+ { P(SHY),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_SHY},
+ { P(SMALL),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SMALL},
+ { P(SPAN),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SPAN},
+ { P(SPOT),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_SPOT},
+ { P(STRIKE),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_STRIKE},
+ { P(STRONG),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_STRONG},
+ { P(STYLE),       style_attr,     HTML_STYLE_ATTRIBUTES,      SGML_LITTERAL,T_STYLE},
+ { P(SUB),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SUB},
+ { P(SUP),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SUP},
+ { P(TAB),         tab_attr,       HTML_TAB_ATTRIBUTES,        SGML_EMPTY,   T_TAB},
+ { P(TABLE),       table_attr,     HTML_TABLE_ATTRIBUTES,      SGML_MIXED,   T_TABLE},
+ { P(TBODY),       tr_attr,        HTML_TR_ATTRIBUTES,         SGML_EMPTY,   T_TBODY},
+ { P(TD),          td_attr,        HTML_TD_ATTRIBUTES,         SGML_EMPTY,   T_TD},
+ { P(TEXTAREA),    textarea_attr,  HTML_TEXTAREA_ATTRIBUTES,   SGML_LITTERAL,T_TEXTAREA},
+ { P(TEXTFLOW),    bodytext_attr,  HTML_BODYTEXT_ATTRIBUTES,   SGML_MIXED,   T_TEXTFLOW},
+ { P(TFOOT),       tr_attr,        HTML_TR_ATTRIBUTES,         SGML_EMPTY,   T_TFOOT},
+ { P(TH),          td_attr,        HTML_TD_ATTRIBUTES,         SGML_EMPTY,   T_TH},
+ { P(THEAD),       tr_attr,        HTML_TR_ATTRIBUTES,         SGML_EMPTY,   T_THEAD},
+ { P(TITLE),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_RCDATA,  T_TITLE},
+ { P(TR),          tr_attr,        HTML_TR_ATTRIBUTES,         SGML_EMPTY,   T_TR},
+ { P(TT),          gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_TT},
+ { P(U),           gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_U},
+ { P(UL),          ul_attr,        HTML_UL_ATTRIBUTES,         SGML_MIXED,   T_UL},
+ { P(VAR),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_VAR},
+ { P(WBR),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_WBR},
+ { P0(XMP),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_LITTERAL,T_XMP},
 /* additional (alternative variants), not counted in HTML_ELEMENTS: */
 /* This one will be used as a temporary substitute within the parser when
    it has been signalled to parse OBJECT content as MIXED. - kw */
- { P("OBJECT"),    object_attr,    HTML_OBJECT_ATTRIBUTES,     SGML_MIXED,   T_OBJECT_PCDATA},
+ { P(OBJECT),      object_attr,    HTML_OBJECT_ATTRIBUTES,     SGML_MIXED,   T_OBJECT_PCDATA},
 };
 /* *INDENT-ON* */
 
diff --git a/WWW/Library/Implementation/src1_HTMLDTD.h b/WWW/Library/Implementation/src1_HTMLDTD.h
index 647f766f..6d65a670 100644
--- a/WWW/Library/Implementation/src1_HTMLDTD.h
+++ b/WWW/Library/Implementation/src1_HTMLDTD.h
@@ -1,4 +1,4 @@
-/* $LynxId: src1_HTMLDTD.h,v 1.6 2008/07/15 22:43:49 tom Exp $ */
+/* $LynxId: src1_HTMLDTD.h,v 1.9 2008/09/16 23:47:45 tom Exp $ */
 #ifndef src_HTMLDTD_H1
 #define src_HTMLDTD_H1 1
 
@@ -1034,6 +1034,7 @@ static const attr ul_attr[] = {         /* DIR attributes */
 
 /* *INDENT-ON* */
 
+/* justification-flags */
 #undef N
 #undef i
 #undef h
@@ -1042,14 +1043,135 @@ static const attr ul_attr[] = {         /* DIR attributes */
 
 #undef T
 
+/* tag-names */
+#undef A
+#undef ABBR
+#undef ACRONYM
+#undef ADDRESS
+#undef APPLET
+#undef AREA
+#undef AU
+#undef AUTHOR
+#undef B
+#undef BANNER
+#undef BASE
+#undef BASEFONT
+#undef BDO
+#undef BGSOUND
+#undef BIG
+#undef BLINK
+#undef BLOCKQUOTE
+#undef BODY
+#undef BODYTEXT
+#undef BQ
+#undef BR
+#undef BUTTON
+#undef CAPTION
+#undef CENTER
+#undef CITE
+#undef CODE
+#undef COL
+#undef COLGROUP
+#undef COMMENT
+#undef CREDIT
+#undef DD
+#undef DEL
+#undef DFN
+#undef DIR
+#undef DIV
+#undef DL
+#undef DLC
+#undef DT
+#undef EM
+#undef EMBED
+#undef FIELDSET
+#undef FIG
+#undef FN
+#undef FONT
+#undef FORM
+#undef FRAME
+#undef FRAMESET
+#undef H1
+#undef H2
+#undef H3
+#undef H4
+#undef H5
+#undef H6
+#undef HEAD
+#undef HR
+#undef HTML
+#undef HY
+#undef I
+#undef IFRAME
+#undef IMG
+#undef INPUT
+#undef INS
+#undef ISINDEX
+#undef KBD
+#undef KEYGEN
+#undef LABEL
+#undef LEGEND
+#undef LH
+#undef LI
+#undef LINK
+#undef LISTING
+#undef MAP
+#undef MARQUEE
+#undef MATH
+#undef MENU
+#undef META
+#undef NEXTID
+#undef NOFRAMES
+#undef NOTE
+#undef OBJECT
+#undef OL
+#undef OPTION
+#undef OVERLAY
+#undef P
+#undef PARAM
+#undef PLAINTEXT
+#undef PRE
+#undef Q
+#undef S
+#undef SAMP
+#undef SCRIPT
+#undef SELECT
+#undef SHY
+#undef SMALL
+#undef SPAN
+#undef SPOT
+#undef STRIKE
+#undef STRONG
+#undef STYLE
+#undef SUB
+#undef SUP
+#undef TAB
+#undef TABLE
+#undef TBODY
+#undef TD
+#undef TEXTAREA
+#undef TEXTFLOW
+#undef TFOOT
+#undef TH
+#undef THEAD
+#undef TITLE
+#undef TR
+#undef TT
+#undef U
+#undef UL
+#undef VAR
+#undef WBR
+#undef XMP
+#undef OBJECT_PCDATA
+
 /* these definitions are used in the tags-tables */
 #undef P
 #undef P_
 #ifdef USE_COLOR_STYLE
-#define P_(x) x , (sizeof x) -1
+#define P_(x) #x, (sizeof #x) -1
 #define NULL_HTTag_ NULL, 0
 #else
-#define P_(x) x
+#define P_(x) #x
 #define NULL_HTTag_ NULL
 #endif
 
@@ -1066,128 +1188,128 @@ static const attr ul_attr[] = {         /* DIR attributes */
 #endif /* once_HTMLDTD */
 /* *INDENT-OFF* */
 static const HTTag tags_table1[HTML_ALL_ELEMENTS] = {
- { P("A"),         a_attr,         HTML_A_ATTRIBUTES,          SGML_MIXED,   T_A},
- { P("ABBR"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_ABBR},
- { P("ACRONYM"),   gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_ACRONYM},
- { P("ADDRESS"),   address_attr,   HTML_ADDRESS_ATTRIBUTES,    SGML_MIXED,   T_ADDRESS},
- { P("APPLET"),    applet_attr,    HTML_APPLET_ATTRIBUTES,     SGML_MIXED,   T_APPLET},
- { P("AREA"),      area_attr,      HTML_AREA_ATTRIBUTES,       SGML_EMPTY,   T_AREA},
- { P("AU"),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_AU},
- { P("AUTHOR"),    gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_AUTHOR},
- { P("B"),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_B},
- { P0("BANNER"),   gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_BANNER},
- { P("BASE"),      base_attr,      HTML_BASE_ATTRIBUTES,       SGML_EMPTY,   T_BASE},
- { P("BASEFONT"),  font_attr,      HTML_FONT_ATTRIBUTES,       SGML_EMPTY,   T_BASEFONT},
- { P("BDO"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_BDO},
- { P("BGSOUND"),   bgsound_attr,   HTML_BGSOUND_ATTRIBUTES,    SGML_EMPTY,   T_BGSOUND},
- { P("BIG"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_BIG},
- { P("BLINK"),     gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_BLINK},
- { P("BLOCKQUOTE"),bq_attr,        HTML_BQ_ATTRIBUTES,         SGML_MIXED,   T_BLOCKQUOTE},
- { P("BODY"),      body_attr,      HTML_BODY_ATTRIBUTES,       SGML_MIXED,   T_BODY},
- { P("BODYTEXT"),  bodytext_attr,  HTML_BODYTEXT_ATTRIBUTES,   SGML_MIXED,   T_BODYTEXT},
- { P("BQ"),        bq_attr,        HTML_BQ_ATTRIBUTES,         SGML_MIXED,   T_BQ},
- { P("BR"),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_BR},
- { P("BUTTON"),    button_attr,    HTML_BUTTON_ATTRIBUTES,     SGML_MIXED,   T_BUTTON},
- { P("CAPTION"),   caption_attr,   HTML_CAPTION_ATTRIBUTES,    SGML_MIXED,   T_CAPTION},
- { P("CENTER"),    div_attr,       HTML_DIV_ATTRIBUTES,        SGML_MIXED,   T_CENTER},
- { P("CITE"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_CITE},
- { P("CODE"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_CODE},
- { P("COL"),       col_attr,       HTML_COL_ATTRIBUTES,        SGML_EMPTY,   T_COL},
- { P("COLGROUP"),  col_attr,       HTML_COL_ATTRIBUTES,        SGML_ELEMENT, T_COLGROUP},
- { P("COMMENT"),   gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_PCDATA,  T_COMMENT},
- { P("CREDIT"),    credit_attr,    HTML_CREDIT_ATTRIBUTES,     SGML_MIXED,   T_CREDIT},
- { P("DD"),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_DD},
- { P("DEL"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_DEL},
- { P("DFN"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_DFN},
- { P("DIR"),       ul_attr,        HTML_UL_ATTRIBUTES,         SGML_MIXED,   T_DIR},
- { P("DIV"),       div_attr,       HTML_DIV_ATTRIBUTES,        SGML_MIXED,   T_DIV},
- { P("DL"),        dl_attr,        HTML_DL_ATTRIBUTES,         SGML_MIXED,   T_DL},
- { P("DLC"),       dl_attr,        HTML_DL_ATTRIBUTES,         SGML_MIXED,   T_DLC},
- { P("DT"),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_DT},
- { P("EM"),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_EM},
- { P("EMBED"),     embed_attr,     HTML_EMBED_ATTRIBUTES,      SGML_EMPTY,   T_EMBED},
- { P("FIELDSET"),  fieldset_attr,  HTML_FIELDSET_ATTRIBUTES,   SGML_MIXED,   T_FIELDSET},
- { P("FIG"),       fig_attr,       HTML_FIG_ATTRIBUTES,        SGML_MIXED,   T_FIG},
- { P("FN"),        fn_attr,        HTML_FN_ATTRIBUTES,         SGML_MIXED,   T_FN},
- { P("FONT"),      font_attr,      HTML_FONT_ATTRIBUTES,       SGML_MIXED,   T_FONT},
- { P("FORM"),      form_attr,      HTML_FORM_ATTRIBUTES,       SGML_MIXED,   T_FORM},
- { P("FRAME"),     frame_attr,     HTML_FRAME_ATTRIBUTES,      SGML_EMPTY,   T_FRAME},
- { P("FRAMESET"),  frameset_attr,  HTML_FRAMESET_ATTRIBUTES,   SGML_ELEMENT, T_FRAMESET},
- { P0("H1"),       h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H1},
- { P0("H2"),       h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H2},
- { P0("H3"),       h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H3},
- { P0("H4"),       h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H4},
- { P0("H5"),       h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H5},
- { P0("H6"),       h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H6},
- { P("HEAD"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_ELEMENT, T_HEAD},
- { P("HR"),        hr_attr,        HTML_HR_ATTRIBUTES,         SGML_EMPTY,   T_HR},
- { P("HTML"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_HTML},
- { P("HY"),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_HY},
- { P("I"),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_I},
- { P("IFRAME"),    iframe_attr,    HTML_IFRAME_ATTRIBUTES,     SGML_MIXED,   T_IFRAME},
- { P("IMG"),       img_attr,       HTML_IMG_ATTRIBUTES,        SGML_EMPTY,   T_IMG},
- { P("INPUT"),     input_attr,     HTML_INPUT_ATTRIBUTES,      SGML_EMPTY,   T_INPUT},
- { P("INS"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_INS},
- { P("ISINDEX"),   isindex_attr,   HTML_ISINDEX_ATTRIBUTES,    SGML_EMPTY,   T_ISINDEX},
- { P("KBD"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_KBD},
- { P("KEYGEN"),    keygen_attr,    HTML_KEYGEN_ATTRIBUTES,     SGML_EMPTY,   T_KEYGEN},
- { P("LABEL"),     label_attr,     HTML_LABEL_ATTRIBUTES,      SGML_MIXED,   T_LABEL},
- { P("LEGEND"),    legend_attr,    HTML_LEGEND_ATTRIBUTES,     SGML_MIXED,   T_LEGEND},
- { P("LH"),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_LH},
- { P("LI"),        li_attr,        HTML_LI_ATTRIBUTES,         SGML_MIXED,   T_LI},
- { P("LINK"),      link_attr,      HTML_LINK_ATTRIBUTES,       SGML_EMPTY,   T_LINK},
- { P("LISTING"),   gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_LITTERAL,T_LISTING},
- { P("MAP"),       map_attr,       HTML_MAP_ATTRIBUTES,        SGML_ELEMENT, T_MAP},
- { P("MARQUEE"),   gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_MARQUEE},
- { P("MATH"),      math_attr,      HTML_MATH_ATTRIBUTES,       SGML_PCDATA,  T_MATH},
- { P("MENU"),      ul_attr,        HTML_UL_ATTRIBUTES,         SGML_MIXED,   T_MENU},
- { P("META"),      meta_attr,      HTML_META_ATTRIBUTES,       SGML_EMPTY,   T_META},
- { P("NEXTID"),    nextid_attr,    HTML_NEXTID_ATTRIBUTES,     SGML_EMPTY,   T_NEXTID},
- { P("NOFRAMES"),  gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_NOFRAMES},
- { P("NOTE"),      note_attr,      HTML_NOTE_ATTRIBUTES,       SGML_MIXED,   T_NOTE},
- { P("OBJECT"),    object_attr,    HTML_OBJECT_ATTRIBUTES,     SGML_LITTERAL,T_OBJECT},
- { P("OL"),        ol_attr,        HTML_OL_ATTRIBUTES,         SGML_MIXED,   T_OL},
- { P("OPTION"),    option_attr,    HTML_OPTION_ATTRIBUTES,     SGML_PCDATA,  T_OPTION},
- { P("OVERLAY"),   overlay_attr,   HTML_OVERLAY_ATTRIBUTES,    SGML_PCDATA,  T_OVERLAY},
- { P("P"),         p_attr,         HTML_P_ATTRIBUTES,          SGML_MIXED,   T_P},
- { P("PARAM"),     param_attr,     HTML_PARAM_ATTRIBUTES,      SGML_EMPTY,   T_PARAM},
- { P("PLAINTEXT"), gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_LITTERAL,T_PLAINTEXT},
- { P0("PRE"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_PRE},
- { P("Q"),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_Q},
- { P("S"),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_S},
- { P("SAMP"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SAMP},
- { P("SCRIPT"),    script_attr,    HTML_SCRIPT_ATTRIBUTES,     SGML_SCRIPT,  T_SCRIPT},
- { P("SELECT"),    select_attr,    HTML_SELECT_ATTRIBUTES,     SGML_ELEMENT, T_SELECT},
- { P("SHY"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_SHY},
- { P("SMALL"),     gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SMALL},
- { P("SPAN"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SPAN},
- { P("SPOT"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_SPOT},
- { P("STRIKE"),    gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_STRIKE},
- { P("STRONG"),    gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_STRONG},
- { P("STYLE"),     style_attr,     HTML_STYLE_ATTRIBUTES,      SGML_CDATA,   T_STYLE},
- { P("SUB"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SUB},
- { P("SUP"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SUP},
- { P("TAB"),       tab_attr,       HTML_TAB_ATTRIBUTES,        SGML_EMPTY,   T_TAB},
- { P("TABLE"),     table_attr,     HTML_TABLE_ATTRIBUTES,      SGML_ELEMENT, T_TABLE},
- { P("TBODY"),     tr_attr,        HTML_TR_ATTRIBUTES,         SGML_ELEMENT, T_TBODY},
- { P("TD"),        td_attr,        HTML_TD_ATTRIBUTES,         SGML_MIXED,   T_TD},
- { P("TEXTAREA"),  textarea_attr,  HTML_TEXTAREA_ATTRIBUTES,   SGML_PCDATA,  T_TEXTAREA},
- { P("TEXTFLOW"),  bodytext_attr,  HTML_BODYTEXT_ATTRIBUTES,   SGML_MIXED,   T_TEXTFLOW},
- { P("TFOOT"),     tr_attr,        HTML_TR_ATTRIBUTES,         SGML_ELEMENT, T_TFOOT},
- { P("TH"),        td_attr,        HTML_TD_ATTRIBUTES,         SGML_MIXED,   T_TH},
- { P("THEAD"),     tr_attr,        HTML_TR_ATTRIBUTES,         SGML_ELEMENT, T_THEAD},
- { P("TITLE"),     gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_PCDATA,  T_TITLE},
- { P("TR"),        tr_attr,        HTML_TR_ATTRIBUTES,         SGML_MIXED,   T_TR},
- { P("TT"),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_TT},
- { P("U"),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_U},
- { P("UL"),        ul_attr,        HTML_UL_ATTRIBUTES,         SGML_MIXED,   T_UL},
- { P("VAR"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_VAR},
- { P("WBR"),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_WBR},
- { P0("XMP"),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_LITTERAL,T_XMP},
+ { P(A),           a_attr,         HTML_A_ATTRIBUTES,          SGML_MIXED,   T_A},
+ { P(ABBR),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_ABBR},
+ { P(ACRONYM),     gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_ACRONYM},
+ { P(ADDRESS),     address_attr,   HTML_ADDRESS_ATTRIBUTES,    SGML_MIXED,   T_ADDRESS},
+ { P(APPLET),      applet_attr,    HTML_APPLET_ATTRIBUTES,     SGML_MIXED,   T_APPLET},
+ { P(AREA),        area_attr,      HTML_AREA_ATTRIBUTES,       SGML_EMPTY,   T_AREA},
+ { P(AU),          gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_AU},
+ { P(AUTHOR),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_AUTHOR},
+ { P(B),           gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_B},
+ { P0(BANNER),     gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_BANNER},
+ { P(BASE),        base_attr,      HTML_BASE_ATTRIBUTES,       SGML_EMPTY,   T_BASE},
+ { P(BASEFONT),    font_attr,      HTML_FONT_ATTRIBUTES,       SGML_EMPTY,   T_BASEFONT},
+ { P(BDO),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_BDO},
+ { P(BGSOUND),     bgsound_attr,   HTML_BGSOUND_ATTRIBUTES,    SGML_EMPTY,   T_BGSOUND},
+ { P(BIG),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_BIG},
+ { P(BLINK),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_BLINK},
+ { P(BLOCKQUOTE),  bq_attr,        HTML_BQ_ATTRIBUTES,         SGML_MIXED,   T_BLOCKQUOTE},
+ { P(BODY),        body_attr,      HTML_BODY_ATTRIBUTES,       SGML_MIXED,   T_BODY},
+ { P(BODYTEXT),    bodytext_attr,  HTML_BODYTEXT_ATTRIBUTES,   SGML_MIXED,   T_BODYTEXT},
+ { P(BQ),          bq_attr,        HTML_BQ_ATTRIBUTES,         SGML_MIXED,   T_BQ},
+ { P(BR),          gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_BR},
+ { P(BUTTON),      button_attr,    HTML_BUTTON_ATTRIBUTES,     SGML_MIXED,   T_BUTTON},
+ { P(CAPTION),     caption_attr,   HTML_CAPTION_ATTRIBUTES,    SGML_MIXED,   T_CAPTION},
+ { P(CENTER),      div_attr,       HTML_DIV_ATTRIBUTES,        SGML_MIXED,   T_CENTER},
+ { P(CITE),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_CITE},
+ { P(CODE),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_CODE},
+ { P(COL),         col_attr,       HTML_COL_ATTRIBUTES,        SGML_EMPTY,   T_COL},
+ { P(COLGROUP),    col_attr,       HTML_COL_ATTRIBUTES,        SGML_ELEMENT, T_COLGROUP},
+ { P(COMMENT),     gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_PCDATA,  T_COMMENT},
+ { P(CREDIT),      credit_attr,    HTML_CREDIT_ATTRIBUTES,     SGML_MIXED,   T_CREDIT},
+ { P(DD),          gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_DD},
+ { P(DEL),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_DEL},
+ { P(DFN),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_DFN},
+ { P(DIR),         ul_attr,        HTML_UL_ATTRIBUTES,         SGML_MIXED,   T_DIR},
+ { P(DIV),         div_attr,       HTML_DIV_ATTRIBUTES,        SGML_MIXED,   T_DIV},
+ { P(DL),          dl_attr,        HTML_DL_ATTRIBUTES,         SGML_MIXED,   T_DL},
+ { P(DLC),         dl_attr,        HTML_DL_ATTRIBUTES,         SGML_MIXED,   T_DLC},
+ { P(DT),          gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_DT},
+ { P(EM),          gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_EM},
+ { P(EMBED),       embed_attr,     HTML_EMBED_ATTRIBUTES,      SGML_EMPTY,   T_EMBED},
+ { P(FIELDSET),    fieldset_attr,  HTML_FIELDSET_ATTRIBUTES,   SGML_MIXED,   T_FIELDSET},
+ { P(FIG),         fig_attr,       HTML_FIG_ATTRIBUTES,        SGML_MIXED,   T_FIG},
+ { P(FN),          fn_attr,        HTML_FN_ATTRIBUTES,         SGML_MIXED,   T_FN},
+ { P(FONT),        font_attr,      HTML_FONT_ATTRIBUTES,       SGML_MIXED,   T_FONT},
+ { P(FORM),        form_attr,      HTML_FORM_ATTRIBUTES,       SGML_MIXED,   T_FORM},
+ { P(FRAME),       frame_attr,     HTML_FRAME_ATTRIBUTES,      SGML_EMPTY,   T_FRAME},
+ { P(FRAMESET),    frameset_attr,  HTML_FRAMESET_ATTRIBUTES,   SGML_ELEMENT, T_FRAMESET},
+ { P0(H1),         h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H1},
+ { P0(H2),         h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H2},
+ { P0(H3),         h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H3},
+ { P0(H4),         h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H4},
+ { P0(H5),         h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H5},
+ { P0(H6),         h_attr,         HTML_H_ATTRIBUTES,          SGML_MIXED,   T_H6},
+ { P(HEAD),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_ELEMENT, T_HEAD},
+ { P(HR),          hr_attr,        HTML_HR_ATTRIBUTES,         SGML_EMPTY,   T_HR},
+ { P(HTML),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_HTML},
+ { P(HY),          gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_HY},
+ { P(I),           gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_I},
+ { P(IFRAME),      iframe_attr,    HTML_IFRAME_ATTRIBUTES,     SGML_MIXED,   T_IFRAME},
+ { P(IMG),         img_attr,       HTML_IMG_ATTRIBUTES,        SGML_EMPTY,   T_IMG},
+ { P(INPUT),       input_attr,     HTML_INPUT_ATTRIBUTES,      SGML_EMPTY,   T_INPUT},
+ { P(INS),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_INS},
+ { P(ISINDEX),     isindex_attr,   HTML_ISINDEX_ATTRIBUTES,    SGML_EMPTY,   T_ISINDEX},
+ { P(KBD),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_KBD},
+ { P(KEYGEN),      keygen_attr,    HTML_KEYGEN_ATTRIBUTES,     SGML_EMPTY,   T_KEYGEN},
+ { P(LABEL),       label_attr,     HTML_LABEL_ATTRIBUTES,      SGML_MIXED,   T_LABEL},
+ { P(LEGEND),      legend_attr,    HTML_LEGEND_ATTRIBUTES,     SGML_MIXED,   T_LEGEND},
+ { P(LH),          gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_LH},
+ { P(LI),          li_attr,        HTML_LI_ATTRIBUTES,         SGML_MIXED,   T_LI},
+ { P(LINK),        link_attr,      HTML_LINK_ATTRIBUTES,       SGML_EMPTY,   T_LINK},
+ { P(LISTING),     gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_LITTERAL,T_LISTING},
+ { P(MAP),         map_attr,       HTML_MAP_ATTRIBUTES,        SGML_ELEMENT, T_MAP},
+ { P(MARQUEE),     gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_MARQUEE},
+ { P(MATH),        math_attr,      HTML_MATH_ATTRIBUTES,       SGML_PCDATA,  T_MATH},
+ { P(MENU),        ul_attr,        HTML_UL_ATTRIBUTES,         SGML_MIXED,   T_MENU},
+ { P(META),        meta_attr,      HTML_META_ATTRIBUTES,       SGML_EMPTY,   T_META},
+ { P(NEXTID),      nextid_attr,    HTML_NEXTID_ATTRIBUTES,     SGML_EMPTY,   T_NEXTID},
+ { P(NOFRAMES),    gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_NOFRAMES},
+ { P(NOTE),        note_attr,      HTML_NOTE_ATTRIBUTES,       SGML_MIXED,   T_NOTE},
+ { P(OBJECT),      object_attr,    HTML_OBJECT_ATTRIBUTES,     SGML_LITTERAL,T_OBJECT},
+ { P(OL),          ol_attr,        HTML_OL_ATTRIBUTES,         SGML_MIXED,   T_OL},
+ { P(OPTION),      option_attr,    HTML_OPTION_ATTRIBUTES,     SGML_PCDATA,  T_OPTION},
+ { P(OVERLAY),     overlay_attr,   HTML_OVERLAY_ATTRIBUTES,    SGML_PCDATA,  T_OVERLAY},
+ { P(P),           p_attr,         HTML_P_ATTRIBUTES,          SGML_MIXED,   T_P},
+ { P(PARAM),       param_attr,     HTML_PARAM_ATTRIBUTES,      SGML_EMPTY,   T_PARAM},
+ { P(PLAINTEXT),   gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_LITTERAL,T_PLAINTEXT},
+ { P0(PRE),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_PRE},
+ { P(Q),           gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_Q},
+ { P(S),           gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_S},
+ { P(SAMP),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SAMP},
+ { P(SCRIPT),      script_attr,    HTML_SCRIPT_ATTRIBUTES,     SGML_SCRIPT,  T_SCRIPT},
+ { P(SELECT),      select_attr,    HTML_SELECT_ATTRIBUTES,     SGML_ELEMENT, T_SELECT},
+ { P(SHY),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_SHY},
+ { P(SMALL),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SMALL},
+ { P(SPAN),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SPAN},
+ { P(SPOT),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_SPOT},
+ { P(STRIKE),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_STRIKE},
+ { P(STRONG),      gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_STRONG},
+ { P(STYLE),       style_attr,     HTML_STYLE_ATTRIBUTES,      SGML_CDATA,   T_STYLE},
+ { P(SUB),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SUB},
+ { P(SUP),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_SUP},
+ { P(TAB),         tab_attr,       HTML_TAB_ATTRIBUTES,        SGML_EMPTY,   T_TAB},
+ { P(TABLE),       table_attr,     HTML_TABLE_ATTRIBUTES,      SGML_ELEMENT, T_TABLE},
+ { P(TBODY),       tr_attr,        HTML_TR_ATTRIBUTES,         SGML_ELEMENT, T_TBODY},
+ { P(TD),          td_attr,        HTML_TD_ATTRIBUTES,         SGML_MIXED,   T_TD},
+ { P(TEXTAREA),    textarea_attr,  HTML_TEXTAREA_ATTRIBUTES,   SGML_PCDATA,  T_TEXTAREA},
+ { P(TEXTFLOW),    bodytext_attr,  HTML_BODYTEXT_ATTRIBUTES,   SGML_MIXED,   T_TEXTFLOW},
+ { P(TFOOT),       tr_attr,        HTML_TR_ATTRIBUTES,         SGML_ELEMENT, T_TFOOT},
+ { P(TH),          td_attr,        HTML_TD_ATTRIBUTES,         SGML_MIXED,   T_TH},
+ { P(THEAD),       tr_attr,        HTML_TR_ATTRIBUTES,         SGML_ELEMENT, T_THEAD},
+ { P(TITLE),       gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_PCDATA,  T_TITLE},
+ { P(TR),          tr_attr,        HTML_TR_ATTRIBUTES,         SGML_MIXED,   T_TR},
+ { P(TT),          gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_TT},
+ { P(U),           gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_U},
+ { P(UL),          ul_attr,        HTML_UL_ATTRIBUTES,         SGML_MIXED,   T_UL},
+ { P(VAR),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_MIXED,   T_VAR},
+ { P(WBR),         gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_EMPTY,   T_WBR},
+ { P0(XMP),        gen_attr,       HTML_GEN_ATTRIBUTES,        SGML_LITTERAL,T_XMP},
 /* additional (alternative variants), not counted in HTML_ELEMENTS: */
 /* This one will be used as a temporary substitute within the parser when
    it has been signalled to parse OBJECT content as MIXED. - kw */
- { P("OBJECT"),    object_attr,    HTML_OBJECT_ATTRIBUTES,     SGML_MIXED,   T_OBJECT_PCDATA},
+ { P(OBJECT),      object_attr,    HTML_OBJECT_ATTRIBUTES,     SGML_MIXED,   T_OBJECT_PCDATA},
 };
 /* *INDENT-ON* */
 
diff --git a/makefile.in b/makefile.in
index 9bb21d26..d84837ef 100644
--- a/makefile.in
+++ b/makefile.in
@@ -1,4 +1,4 @@
-# $LynxId: makefile.in,v 1.100 2008/09/10 13:53:35 tom Exp $
+# $LynxId: makefile.in,v 1.101 2008/09/10 17:22:01 tom Exp $
 ##makefile for lynx
 
 SHELL		= @CONFIG_SHELL@
@@ -212,7 +212,8 @@ help:
 clean:
 	rm -f WWW/Library/*/*.[aoib]
 	rm -f WWW/Library/*/.created
-	cd $(SRC_DIR) && $(MAKE_RECUR) clean
+	cd $(WWW_DIR) && $(MAKE_RECUR) $@
+	cd $(SRC_DIR) && $(MAKE_RECUR) $@
 @MSG_DIR_MAKE@	rm -f LYMessages.c
 @MSG_DIR_MAKE@	cd $(PO_DIR) && $(MAKE_RECUR) $@
 	rm -f *.b $(SRC_DIR)/lynx$x *.leaks cfg_defs.h LYHelp.h lint.*
@@ -228,6 +229,7 @@ distclean: clean
 	-rm -f WWW/Library/*/*~
 	-rm -f WWW/Library/*/*.bak
 	-rm -rf $(SRC_DIR)/obsolete
+	-cd $(WWW_DIR) && $(MAKE_RECUR) $@
 	-cd $(SRC_DIR) && $(MAKE_RECUR) $@
 	-cd $(CHR_DIR) && $(MAKE_RECUR) $@
 @MSG_DIR_MAKE@	cd $(PO_DIR) && $(MAKE_RECUR) $@
diff --git a/src/HTInit.c b/src/HTInit.c
index b4674422..12caeb65 100644
--- a/src/HTInit.c
+++ b/src/HTInit.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: HTInit.c,v 1.67 2007/05/23 00:50:46 tom Exp $
+ * $LynxId: HTInit.c,v 1.69 2008/09/10 23:17:45 tom Exp $
  *
  *		Configuration-specific Initialization		HTInit.c
  *		----------------------------------------
@@ -31,6 +31,8 @@
 #include <LYexit.h>
 #include <LYLeaks.h>
 
+#define CTrace(p) CTRACE2(TRACE_CFG, p)
+
 static int HTLoadTypesConfigFile(char *fn, AcceptMedia media);
 static int HTLoadExtensionsConfigFile(char *fn);
 
@@ -53,6 +55,7 @@ void HTFormatInit(void)
 {
     AcceptMedia media = mediaEXT;
 
+    CTrace((tfp, "HTFormatInit\n"));
 #ifdef NeXT
     SET_PRESENT("application/postscript", "open %s", 1.0, 2.0);
     SET_PRESENT("image/x-tiff", "open %s", 2.0, 2.0);
@@ -185,6 +188,7 @@ void HTFormatInit(void)
 
 void HTPreparsedFormatInit(void)
 {
+    CTrace((tfp, "HTPreparsedFormatInit\n"));
     if (LYPreparsedSource) {
 	SET_INTERNL("text/html", "www/source", HTMLParsedPresent, 1.0);
 	SET_INTERNL("text/html", "www/dump", HTMLParsedPresent, 1.0);
@@ -372,7 +376,7 @@ static int ProcessMailcapEntry(FILE *fp, struct MailcapEntry *mc, AcceptMedia me
     }
     s = strchr(rawentry, ';');
     if (s == NULL) {
-	CTRACE((tfp,
+	CTrace((tfp,
 		"ProcessMailcapEntry: Ignoring invalid mailcap entry: %s\n",
 		rawentry));
 	FREE(rawentry);
@@ -383,7 +387,7 @@ static int ProcessMailcapEntry(FILE *fp, struct MailcapEntry *mc, AcceptMedia me
 	!strncasecomp(t, "text/plain", 10)) {
 	--s;
 	*s = ';';
-	CTRACE((tfp, "ProcessMailcapEntry: Ignoring mailcap entry: %s\n",
+	CTrace((tfp, "ProcessMailcapEntry: Ignoring mailcap entry: %s\n",
 		rawentry));
 	FREE(rawentry);
 	return (0);
@@ -426,7 +430,7 @@ static int ProcessMailcapEntry(FILE *fp, struct MailcapEntry *mc, AcceptMedia me
 		mc->testcommand = NULL;
 		StrAllocCopy(mc->testcommand, eq);
 		TrimCommand(mc->testcommand);
-		CTRACE((tfp, "ProcessMailcapEntry: Found testcommand:%s\n",
+		CTrace((tfp, "ProcessMailcapEntry: Found testcommand:%s\n",
 			mc->testcommand));
 	    } else if (eq && !strcmp(arg, "description")) {
 		mc->label = eq;	/* ignored */
@@ -447,7 +451,7 @@ static int ProcessMailcapEntry(FILE *fp, struct MailcapEntry *mc, AcceptMedia me
 		    mc->maxbytes = 0;
 	    } else if (strcmp(arg, "notes")) {	/* IGNORE notes field */
 		if (*arg)
-		    CTRACE((tfp,
+		    CTrace((tfp,
 			    "ProcessMailcapEntry: Ignoring mailcap flag '%s'.\n",
 			    arg));
 	    }
@@ -461,7 +465,7 @@ static int ProcessMailcapEntry(FILE *fp, struct MailcapEntry *mc, AcceptMedia me
     FREE(rawentry);
 
     if (PassesTest(mc)) {
-	CTRACE((tfp, "ProcessMailcapEntry Setting up conversion %s : %s\n",
+	CTrace((tfp, "ProcessMailcapEntry Setting up conversion %s : %s\n",
 		mc->contenttype, mc->command));
 	HTSetPresentation(mc->contenttype,
 			  mc->command,
@@ -678,7 +682,7 @@ static int BuildCommand(HTChunk *cmd,
 	    case 'n':
 		/* FALLTHRU */
 	    case 'F':
-		CTRACE((tfp, "BuildCommand: Bad mailcap \"test\" clause: %s\n",
+		CTrace((tfp, "BuildCommand: Bad mailcap \"test\" clause: %s\n",
 			controlstring));
 		break;
 	    case 't':
@@ -706,7 +710,7 @@ static int BuildCommand(HTChunk *cmd,
 			    if (!strcmp(name, "charset")) {
 				HTChunkPuts(cmd, "ISO-8859-1");
 			    } else {
-				CTRACE((tfp, "BuildCommand no value for %s\n", name));
+				CTrace((tfp, "BuildCommand no value for %s\n", name));
 			    }
 			}
 			FREE(name);
@@ -718,7 +722,7 @@ static int BuildCommand(HTChunk *cmd,
 		}
 		/* FALLTHRU */
 	    default:
-		CTRACE((tfp,
+		CTrace((tfp,
 			"BuildCommand: Ignoring unrecognized format code in mailcap file '%%%c'.\n",
 			*from));
 		break;
@@ -757,14 +761,14 @@ int LYTestMailcapCommand(const char *testcommand,
     expanded = HTChunkCreate(1024);
     if ((result = BuildCommand(expanded, testcommand, TmpFileName, params)) != 0) {
 	result = 1;
-	CTRACE((tfp, "PassesTest: Deferring test command: %s\n", expanded->data));
+	CTrace((tfp, "PassesTest: Deferring test command: %s\n", expanded->data));
     } else {
-	CTRACE((tfp, "PassesTest: Executing test command: %s\n", expanded->data));
+	CTrace((tfp, "PassesTest: Executing test command: %s\n", expanded->data));
 	if ((result = LYSystem(expanded->data)) != 0) {
 	    result = -1;
-	    CTRACE((tfp, "PassesTest: Test failed!\n"));
+	    CTrace((tfp, "PassesTest: Test failed!\n"));
 	} else {
-	    CTRACE((tfp, "PassesTest: Test passed!\n"));
+	    CTrace((tfp, "PassesTest: Test passed!\n"));
 	}
     }
 
@@ -850,23 +854,23 @@ static int PassesTest(struct MailcapEntry *mc)
 	SameCommand(mc->testcommand, "test \"$DISPLAY\" != \"\"") ||
 	SameCommand(mc->testcommand, "test -n \"$DISPLAY\"")) {
 	FREE(mc->testcommand);
-	CTRACE((tfp, "PassesTest: Testing for XWINDOWS environment.\n"));
+	CTrace((tfp, "PassesTest: Testing for XWINDOWS environment.\n"));
 	if (LYgetXDisplay() != NULL) {
-	    CTRACE((tfp, "PassesTest: Test passed!\n"));
+	    CTrace((tfp, "PassesTest: Test passed!\n"));
 	    return (0 == 0);
 	} else {
-	    CTRACE((tfp, "PassesTest: Test failed!\n"));
+	    CTrace((tfp, "PassesTest: Test failed!\n"));
 	    return (-1 == 0);
 	}
     }
     if (SameCommand(mc->testcommand, "test -z \"$DISPLAY\"")) {
 	FREE(mc->testcommand);
-	CTRACE((tfp, "PassesTest: Testing for NON_XWINDOWS environment.\n"));
+	CTrace((tfp, "PassesTest: Testing for NON_XWINDOWS environment.\n"));
 	if (LYgetXDisplay() == NULL) {
-	    CTRACE((tfp, "PassesTest: Test passed!\n"));
+	    CTrace((tfp, "PassesTest: Test passed!\n"));
 	    return (0 == 0);
 	} else {
-	    CTRACE((tfp, "PassesTest: Test failed!\n"));
+	    CTrace((tfp, "PassesTest: Test failed!\n"));
 	    return (-1 == 0);
 	}
     }
@@ -876,8 +880,8 @@ static int PassesTest(struct MailcapEntry *mc)
      */
     if (SameCommand(mc->testcommand, "test -n \"$LYNX_VERSION\"")) {
 	FREE(mc->testcommand);
-	CTRACE((tfp, "PassesTest: Testing for LYNX environment.\n"));
-	CTRACE((tfp, "PassesTest: Test passed!\n"));
+	CTrace((tfp, "PassesTest: Testing for LYNX environment.\n"));
+	CTrace((tfp, "PassesTest: Test passed!\n"));
 	return (0 == 0);
     } else
 	/*
@@ -885,8 +889,8 @@ static int PassesTest(struct MailcapEntry *mc)
 	 */
     if (SameCommand(mc->testcommand, "test -z \"$LYNX_VERSION\"")) {
 	FREE(mc->testcommand);
-	CTRACE((tfp, "PassesTest: Testing for non-LYNX environment.\n"));
-	CTRACE((tfp, "PassesTest: Test failed!\n"));
+	CTrace((tfp, "PassesTest: Testing for non-LYNX environment.\n"));
+	CTrace((tfp, "PassesTest: Test failed!\n"));
 	return (-1 == 0);
     }
 
@@ -904,9 +908,9 @@ static int PassesTest(struct MailcapEntry *mc)
 	FREE(mc->testcommand);
 
     if (result < 0) {
-	CTRACE((tfp, "PassesTest: Test failed!\n"));
+	CTrace((tfp, "PassesTest: Test failed!\n"));
     } else if (result == 0) {
-	CTRACE((tfp, "PassesTest: Test passed!\n"));
+	CTrace((tfp, "PassesTest: Test passed!\n"));
     }
 
     return (result >= 0);
@@ -917,10 +921,10 @@ static int ProcessMailcapFile(char *file, AcceptMedia media)
     struct MailcapEntry mc;
     FILE *fp;
 
-    CTRACE((tfp, "ProcessMailcapFile: Loading file '%s'.\n",
+    CTrace((tfp, "ProcessMailcapFile: Loading file '%s'.\n",
 	    file));
     if ((fp = fopen(file, TXT_R)) == NULL) {
-	CTRACE((tfp, "ProcessMailcapFile: Could not open '%s'.\n",
+	CTrace((tfp, "ProcessMailcapFile: Could not open '%s'.\n",
 		file));
 	return (-1 == 0);
     }
@@ -1014,7 +1018,7 @@ void HTFileInit(void)
 {
 #ifdef BUILTIN_SUFFIX_MAPS
     if (LYUseBuiltinSuffixes) {
-	CTRACE((tfp, "HTFileInit: Loading default (HTInit) extension maps.\n"));
+	CTrace((tfp, "HTFileInit: Loading default (HTInit) extension maps.\n"));
 
 	/* default suffix interpretation */
 	SET_SUFFIX1("*", "text/plain", "8bit");
@@ -1313,13 +1317,13 @@ void HTFileInit(void)
 	 * configuration file directive.  Whoever changes the config file in
 	 * this way can easily also add the SUFFIX rules there.  - kw
 	 */
-	CTRACE((tfp,
+	CTrace((tfp,
 		"HTFileInit: Skipping all default (HTInit) extension maps!\n"));
     }				/* LYSuffixRules */
 
 #else /* BUILTIN_SUFFIX_MAPS */
 
-    CTRACE((tfp,
+    CTrace((tfp,
 	    "HTFileInit: Default (HTInit) extension maps not compiled in.\n"));
     /*
      * The following two are still used if BUILTIN_SUFFIX_MAPS was undefined. 
@@ -1410,10 +1414,10 @@ static int HTLoadExtensionsConfigFile(char *fn)
     FILE *f;
     int count = 0;
 
-    CTRACE((tfp, "HTLoadExtensionsConfigFile: Loading file '%s'.\n", fn));
+    CTrace((tfp, "HTLoadExtensionsConfigFile: Loading file '%s'.\n", fn));
 
     if ((f = fopen(fn, TXT_R)) == NULL) {
-	CTRACE((tfp, "HTLoadExtensionsConfigFile: Could not open '%s'.\n", fn));
+	CTrace((tfp, "HTLoadExtensionsConfigFile: Could not open '%s'.\n", fn));
 	return count;
     }
 
@@ -1433,8 +1437,7 @@ static int HTLoadExtensionsConfigFile(char *fn)
 		HTSprintf0(&ext, ".%s", word);
 		LYLowerCase(ext);
 
-		CTRACE2(TRACE_CFG,
-			(tfp, "setting suffix '%s' to '%s'.\n", ext, ct));
+		CTrace((tfp, "setting suffix '%s' to '%s'.\n", ext, ct));
 
 		if (strstr(ct, "tex") != NULL ||
 		    strstr(ct, "postscript") != NULL ||
diff --git a/src/LYCurses.c b/src/LYCurses.c
index d5516872..77300aa1 100644
--- a/src/LYCurses.c
+++ b/src/LYCurses.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYCurses.c,v 1.135 2008/09/07 22:03:52 tom Exp $ */
+/* $LynxId: LYCurses.c,v 1.136 2008/09/10 19:48:30 tom Exp $ */
 #include <HTUtils.h>
 #include <HTAlert.h>
 
@@ -1787,6 +1787,8 @@ WINDOW *LYstartPopup(int *top_y,
 	    *left_x = 1;
 	} else {
 	    *left_x = LYcolLimit - 4 - *width;
+	    if (*left_x <= 0)
+		*left_x = 1;
 	}
 	form_window = newwin(*height, *width + 4, *top_y, *left_x - 1);
     }
diff --git a/src/LYHistory.c b/src/LYHistory.c
index d56c71e5..46ec5637 100644
--- a/src/LYHistory.c
+++ b/src/LYHistory.c
@@ -1,4 +1,6 @@
-/* $LynxId: LYHistory.c,v 1.71 2008/02/10 21:48:35 tom Exp $ */
+/*
+ * $LynxId: LYHistory.c,v 1.72 2008/09/10 23:09:21 tom Exp $
+ */
 #include <HTUtils.h>
 #include <HTTP.h>
 #include <GridText.h>
@@ -351,7 +353,6 @@ void LYAllocHistory(int entries)
 	if (history == 0)
 	    outofmem(__FILE__, "LYAllocHistory");
 	while (save < size_history) {
-	    CTRACE((tfp, "...LYAllocHistory clearing %d\n", save));
 	    memset(&history[save++], 0, sizeof(history[0]));
 	}
     }
diff --git a/src/LYMain.c b/src/LYMain.c
index b0cf33d9..b823eef3 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYMain.c,v 1.185 2008/09/10 11:58:28 tom Exp $
+ * $LynxId: LYMain.c,v 1.186 2008/09/10 23:05:36 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTTP.h>
@@ -1090,11 +1090,33 @@ int main(int argc,
     }
 
     /*
+     * Set up trace, the anonymous account defaults, validate restrictions,
+     * and/or the nosocks flag, if requested, and an alternate configuration
+     * file, if specified, NOW.  Also, if we only want the help menu, output
+     * that and exit.  - FM
+     */
+#ifndef NO_LYNX_TRACE
+    if (LYGetEnv("LYNX_TRACE") != 0) {
+	WWW_TraceFlag = TRUE;
+    }
+#endif
+
+    /*
+     * Set up the TRACE log path, and logging if appropriate.  - FM
+     */
+    if ((cp = LYGetEnv("LYNX_TRACE_FILE")) == 0)
+	cp = FNAME_LYNX_TRACE;
+    LYTraceLogPath = typeMallocn(char, LY_MAXPATH);
+
+    LYAddPathToHome(LYTraceLogPath, LY_MAXPATH, cp);
+
+    /*
      * Act on -help NOW, so we only output the help and exit.  - FM
      */
     for (i = 1; i < argc; i++) {
 	parse_arg(&argv[i], 1, &i);
     }
+    LYOpenTraceLog();
 
 #ifdef LY_FIND_LEAKS
     /*
@@ -1289,17 +1311,6 @@ int main(int argc,
     no_newspost = (BOOL) (LYNewsPosting == FALSE);
 #endif
 
-    /*
-     * Set up trace, the anonymous account defaults, validate restrictions,
-     * and/or the nosocks flag, if requested, and an alternate configuration
-     * file, if specified, NOW.  Also, if we only want the help menu, output
-     * that and exit.  - FM
-     */
-#ifndef NO_LYNX_TRACE
-    if (LYGetEnv("LYNX_TRACE") != 0) {
-	WWW_TraceFlag = TRUE;
-    }
-#endif
     for (i = 1; i < argc; i++) {
 	parse_arg(&argv[i], 2, &i);
     }
@@ -1390,18 +1401,6 @@ int main(int argc,
 	LYRestricted = TRUE;
 	LYUseTraceLog = FALSE;
     }
-
-    /*
-     * Set up the TRACE log path, and logging if appropriate.  - FM
-     */
-    if ((cp = LYGetEnv("LYNX_TRACE_FILE")) == 0)
-	cp = FNAME_LYNX_TRACE;
-    LYTraceLogPath = typeMallocn(char, LY_MAXPATH);
-
-    LYAddPathToHome(LYTraceLogPath, LY_MAXPATH, cp);
-
-    LYOpenTraceLog();
-
 #ifdef EXP_CMD_LOGGING
     /*
      * Open command-script, if specified
@@ -3921,11 +3920,11 @@ bug which treated '>' as a co-terminator for\ndouble-quotes and tags"
 #endif
 #ifndef NO_LYNX_TRACE
    PARSE_SET(
-      "trace",		2|SET_ARG,		WWW_TraceFlag,
+      "trace",		1|SET_ARG,		WWW_TraceFlag,
       "turns on Lynx trace mode"
    ),
    PARSE_INT(
-      "trace_mask",	2|INT_ARG,		WWW_TraceMask,
+      "trace_mask",	1|INT_ARG,		WWW_TraceMask,
       "customize Lynx trace mode"
    ),
 #endif
diff --git a/src/LYrcFile.h b/src/LYrcFile.h
index 26504d88..1d7e3344 100644
--- a/src/LYrcFile.h
+++ b/src/LYrcFile.h
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYrcFile.h,v 1.26 2008/09/10 12:05:26 tom Exp $
+ * $LynxId: LYrcFile.h,v 1.27 2008/09/10 20:28:59 tom Exp $
  */
 #ifndef LYRCFILE_H
 #define LYRCFILE_H
@@ -62,7 +62,6 @@
 #define RC_DEFAULT_KEYPAD_MODE_NUMARO   "default_keypad_mode_is_numbers_as_arrows"
 #define RC_DEFAULT_USER_MODE            "default_user_mode"
 #define RC_DEFAULT_VIRTUAL_MEMORY_SIZE  "default_virtual_memory_size"
-#define RC_DEFINE RC_XLOADIMAGE_COMMAND "XLOADIMAGE_COMMAND"
 #define RC_DELAYSECS                    "delaysecs"
 #define RC_DIRED_MENU                   "dired_menu"
 #define RC_DIR_LIST_ORDER               "dir_list_order"