From 107f0ddf027d2e7b40d31055e46ceeb2873821ce Mon Sep 17 00:00:00 2001 From: Kevin Bracey <kbracey@gitlab.riscosopen.org> Date: Tue, 30 Sep 1997 14:21:42 +0000 Subject: [PATCH] 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. --- Resources/UK/Browse/Res,fae | Bin 53004 -> 53004 bytes c/Trace | 85 ++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) diff --git a/Resources/UK/Browse/Res,fae b/Resources/UK/Browse/Res,fae index 95a76efb25d9ae8ab9e0e745d7372ddf551718b3..bff2629b4862ea53b336f400f5f88b4906b4c017 100644 GIT binary patch delta 64 zcmeB~$J{fIdBc*n%__@YXl!26=E%s%GWl7%I*{b+0Fh=L)0vC&3pQWqNMd46OVir? Rk<XZM@&Of<%{@IcBmqM283_OY delta 60 zcmeB~$J{fIdBc*n%{}WK85vn8pWC1gB)@@4xsB7AOB6CU@7S2c#LU2;wfQ5TG2`Zd Nt$QRlFKK(B0RY?=7!?2j diff --git a/c/Trace b/c/Trace index c0a2a3d..b0520f1 100644 --- a/c/Trace +++ b/c/Trace @@ -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 */ -- GitLab