Commit 107f0ddf authored by Kevin Bracey's avatar Kevin Bracey
Browse files

Added Choices.c to Browse and BrowseD builds (David forgot).

Renamed Symbols to syms and ensured it is CDir'ed.
Made Trace.c show tag_no field textually.
Ungreyed CJK entries in Encoding menu.
parent 59532166
No preview for this file type
......@@ -72,6 +72,7 @@
static int trace_dump_tstream (FILE * file, table_stream * table, int depth);
static int trace_dump_row (FILE * file, table_row * row, int depth);
static int trace_dump_head (FILE * file, table_headdata * head, int depth);
static const char *trace_tag_name (tag_no tagno);
/*************************************************/
/* trace_dump_tokens_by_line() */
......@@ -730,6 +731,7 @@ tdtbs_fo_err: /* If there's an error whilst writing to the file */
TrOut(file, depth, (file, "text\t\t%08x: '%s'\n", (int) token->text, token->text ? token->text : "(NULL)"));
TrOut(file, depth, (file, "tag\t\t%08x\n", (int) token->tag));
TrOut(file, depth, (file, "tagno\t\t%d\t: <%s>\n", token->tagno, trace_tag_name(token->tagno)));
TrOut(file, depth, (file, "src\t\t%08x: '%s'\n", (int) token->src, token->src ? token->src : "(NULL)"));
......@@ -1121,6 +1123,89 @@ tdtbs_fo_err: /* If there's an error whilst writing to the file */
Printf("\n\n");
}
/*************************************************/
/* trace_tag_name() */
/* */
/* Converts a tag number (enum tag_no) to */
/* textual form (why isn't there a built in */
/* function to do this?). */
/* */
/* Parameters: Tag number. */
/* */
/* Returns: Pointer to a statically allocated */
/* name. */
/*************************************************/
static const char *trace_tag_name(tag_no tagno)
{
switch (tagno)
{
case TAG_NONE: return "none";
case TAG_A: return "A";
case TAG_ADDRESS: return "ADDRESS";
case TAG_BOLD: return "BOLD";
case TAG_BASE: return "BASE";
case TAG_BASEFONT: return "BASEFONT";
case TAG_BLOCKQUOTE: return "BLOCKQUOTE";
case TAG_BR: return "BR";
case TAG_CENTER: return "CENTER";
case TAG_CITE: return "CITE";
case TAG_CODE: return "CODE";
case TAG_DD: return "DD";
case TAG_DIR: return "DIR";
case TAG_DL: return "DL";
case TAG_DT: return "DT";
case TAG_EM: return "EM";
case TAG_FONT: return "FONT";
case TAG_FORM: return "FORM";
case TAG_H1: return "H1";
case TAG_H2: return "H2";
case TAG_H3: return "H3";
case TAG_H4: return "H4";
case TAG_H5: return "H5";
case TAG_H6: return "H6";
case TAG_HR: return "HR";
case TAG_ITALIC: return "ITALIC";
case TAG_IMG: return "IMG";
case TAG_INPUT: return "INPUT";
case TAG_ISINDEX: return "ISINDEX";
case TAG_KBD: return "KBD";
case TAG_LI: return "LI";
case TAG_LINK: return "LINK";
case TAG_MENU: return "MENU";
case TAG_META: return "META";
case TAG_OL: return "OL";
case TAG_OPTION: return "OPTION";
case TAG_P: return "P";
case TAG_PRE: return "PRE";
case TAG_SAMP: return "SAMP";
case TAG_SCRIPT: return "SCRIPT";
case TAG_SELECT: return "SELECT";
case TAG_STRONG: return "STRONG";
case TAG_STYLE: return "STYLE";
case TAG_TABLE: return "TABLE";
case TAG_TD: return "TD";
case TAG_TEXTAREA: return "TEXTAREA";
case TAG_TITLE: return "TITLE";
case TAG_TH: return "TH";
case TAG_TR: return "TR";
case TAG_TT: return "TT";
case TAG_UL: return "UL";
case TAG_VAR: return "VAR";
case TAG_XMP: return "XMP";
case TAG_FRAME: return "FRAME";
case TAG_BODY: return "BODY";
case TAG_FRAMESET: return "FRAMESET";
case TAG_HEAD: return "HEAD";
case TAG_NOFRAMES: return "NOFRAMES";
case TAG_SUB: return "SUB";
case TAG_SUP: return "SUP";
case TAG_AREA: return "AREA";
case TAG_MAP: return "MAP";
case TAG_OBJECT: return "OBJECT";
default: return "unknown";
}
}
#else
/* This'll work, but it is more efficient not to link to */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment