about summary refs log tree commit diff stats
path: root/po/zh_TW.po
diff options
context:
space:
mode:
Diffstat (limited to 'po/zh_TW.po')
-rw-r--r--po/zh_TW.po1350
1 files changed, 675 insertions, 675 deletions
diff --git a/po/zh_TW.po b/po/zh_TW.po
index fd16db3a..d9a3472b 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -10,7 +10,7 @@ msgstr ""
 "Last-Translator: Abel Cheung <maddog@linux.org.hk>\n"
 "Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=Big5\n"
+"Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
 #. ******************************************************************
@@ -35,39 +35,39 @@ msgstr ""
 #: LYMessages.c:32
 #, c-format
 msgid "Alert!: %s"
-msgstr "ĵiIG%s"
+msgstr "警告!:%s"
 
 #: LYMessages.c:33
 msgid "Welcome"
-msgstr "w"
+msgstr "歡迎"
 
 #: LYMessages.c:34
 msgid "Are you sure you want to quit?"
-msgstr "O_Twn}H"
+msgstr "是否確定要離開?"
 
 #: LYMessages.c:36
 msgid "Really exit from Lynx?"
-msgstr "O_Twn} Lynx?"
+msgstr "是否確定要離開 Lynx?"
 
 #: LYMessages.c:38
 msgid "Connection interrupted."
-msgstr "su_C"
+msgstr "連線中斷。"
 
 #: LYMessages.c:39
 msgid "Data transfer interrupted."
-msgstr "ƶǿ餤_C"
+msgstr "資料傳輸中斷。"
 
 #: LYMessages.c:40
 msgid "Cancelled!!!"
-msgstr "!!!"
+msgstr "取消!!!"
 
 #: LYMessages.c:41
 msgid "Cancelling!"
-msgstr "I"
+msgstr "取消!"
 
 #: LYMessages.c:42
 msgid "Excellent!!!"
-msgstr "n!!!"
+msgstr "好極!!!"
 
 #: LYMessages.c:43
 msgid "OK"
@@ -75,7 +75,7 @@ msgstr "OK"
 
 #: LYMessages.c:44
 msgid "Done!"
-msgstr "I"
+msgstr "完成!"
 
 #: LYMessages.c:45
 msgid "Bad request!"
@@ -83,15 +83,15 @@ msgstr ""
 
 #: LYMessages.c:46
 msgid "previous"
-msgstr "W@"
+msgstr "上一頁"
 
 #: LYMessages.c:47
 msgid "next screen"
-msgstr "U@"
+msgstr "下一頁"
 
 #: LYMessages.c:48
 msgid "HELP!"
-msgstr "DUI"
+msgstr "求助!"
 
 #: LYMessages.c:49
 msgid ", help on "
@@ -100,37 +100,37 @@ msgstr ""
 #. #define HELP
 #: LYMessages.c:51
 msgid "Commands: Use arrow keys to move, '?' for help, 'q' to quit, '<-' to go back."
-msgstr "OGϥΤV䲾ʡA'?' DUA'q' A'' ^e@C"
+msgstr "指令:使用方向鍵移動,'?' 求助,'q' 結束,'←' 回前一頁。"
 
 #. #define MOREHELP
 #: LYMessages.c:53
 msgid "-- press space for more, use arrow keys to move, '?' for help, 'q' to quit."
-msgstr "w ťݤU@AϥΤV䲾ʡA'?' DUA'q' C"
+msgstr "─ 按空白鍵看下一頁,使用方向鍵移動,'?' 求助,'q' 結束。"
 
 #: LYMessages.c:54
 msgid "-- press space for next page --"
-msgstr "w ЫťݤU@ w"
+msgstr "─ 請按空白鍵看下一頁 ─"
 
 #: LYMessages.c:55
 msgid "URL too long"
-msgstr "URL L"
+msgstr "URL 過長"
 
 #. Inactive input fields, messages used with -tna option - kw
 #. #define FORM_LINK_TEXT_MESSAGE_INA
 #: LYMessages.c:61
 msgid "(Text entry field) Inactive.  Press <return> to activate."
-msgstr "(rJ) ȰϥΡCЫ <return> }lJC"
+msgstr "(文字輸入欄位) 暫停使用。請按 <return> 開始輸入。"
 
 #. #define FORM_LINK_TEXTAREA_MESSAGE_INA
 #: LYMessages.c:63
 msgid "(Textarea) Inactive.  Press <return> to activate."
-msgstr "(rϰ) ȰϥΡCЫ <return> }lJC"
+msgstr "(文字區域) 暫停使用。請按 <return> 開始輸入。"
 
 #. #define FORM_LINK_TEXTAREA_MESSAGE_INA_E
 #: LYMessages.c:65
 #, c-format
 msgid "(Textarea) Inactive.  Press <return> to activate (%s for editor)."
-msgstr "(rϰ) ȰϥΡCЫ <return> }lJ ( %s Ұʽs边)C"
+msgstr "(文字區域) 暫停使用。請按 <return> 開始輸入 (按 %s 啟動編輯器)。"
 
 #. #define FORM_LINK_TEXT_SUBMIT_MESSAGE_INA
 #: LYMessages.c:67
@@ -151,43 +151,43 @@ msgstr ""
 #. #define FORM_TEXT_SUBMIT_MAILTO_MSG_INA
 #: LYMessages.c:73
 msgid "(mailto form field) Inactive.  Press <return> to change."
-msgstr "(mailto ) ȰϥΡCЫ <return> }lJC"
+msgstr "(mailto 表格欄位) 暫停使用。請按 <return> 開始輸入。"
 
 #. #define FORM_LINK_PASSWORD_MESSAGE_INA
 #: LYMessages.c:75
 msgid "(Password entry field) Inactive.  Press <return> to activate."
-msgstr "(KXJ) ȰϥΡCЫ <return> }lJC"
+msgstr "(密碼輸入欄位) 暫停使用。請按 <return> 開始輸入。"
 
 #. #define FORM_LINK_FILE_UNM_MSG
 #: LYMessages.c:78
 msgid "UNMODIFIABLE file entry field.  Use UP or DOWN arrows or tab to move off."
-msgstr "*iק諸* ɮ׿JCϥ B  tab }C"
+msgstr "*不可修改的* 檔案輸入欄位。使用 ↑、↓ 或 tab 鍵離開欄位。"
 
 #. #define FORM_LINK_FILE_MESSAGE
 #: LYMessages.c:80
 msgid "(File entry field) Enter filename.  Use UP or DOWN arrows or tab to move off."
-msgstr "(ɮ׿J) пJɮצW١Cϥ B  tab }C"
+msgstr "(檔案輸入欄位) 請輸入檔案名稱。使用 ↑、↓ 或 tab 鍵離開欄位。"
 
 #. #define FORM_LINK_TEXT_MESSAGE
 #: LYMessages.c:82
 msgid "(Text entry field) Enter text.  Use UP or DOWN arrows or tab to move off."
-msgstr "(rJ) пJrCϥ B  tab }C"
+msgstr "(文字輸入欄位) 請輸入文字。使用 ↑、↓ 或 tab 鍵離開欄位。"
 
 #. #define FORM_LINK_TEXTAREA_MESSAGE
 #: LYMessages.c:84
 msgid "(Textarea) Enter text. Use UP/DOWN arrows or TAB to move off."
-msgstr "(rJϰ) пJrCϥ B  tab }ϰC"
+msgstr "(文字輸入區域) 請輸入文字。使用 ↑、↓ 或 tab 鍵離開區域。"
 
 #. #define FORM_LINK_TEXTAREA_MESSAGE_E
 #: LYMessages.c:86
 #, c-format
 msgid "(Textarea) Enter text. Use UP/DOWN arrows or TAB to move off (%s for editor)."
-msgstr "(rJϰ) пJrCϥ B  tab }ϰ (%s Ұʽs边)C"
+msgstr "(文字輸入區域) 請輸入文字。使用 ↑、↓ 或 tab 鍵離開區域 (%s 啟動編輯器)。"
 
 #. #define FORM_LINK_TEXT_UNM_MSG
 #: LYMessages.c:88
 msgid "UNMODIFIABLE form text field.  Use UP or DOWN arrows or tab to move off."
-msgstr "*iק諸* rJCϥ B  tab }C"
+msgstr "*不可修改的* 文字輸入欄位。使用 ↑、↓ 或 tab 鍵離開欄位。"
 
 #. #define FORM_LINK_TEXT_SUBMIT_MESSAGE
 #: LYMessages.c:90
@@ -208,7 +208,7 @@ msgstr ""
 #. #define FORM_LINK_TEXT_SUBMIT_UNM_MSG
 #: LYMessages.c:96
 msgid "UNMODIFIABLE form field.  Use UP or DOWN arrows or tab to move off."
-msgstr "*iק諸* JCϥ B  tab }C"
+msgstr "*不可修改的* 表格輸入欄位。使用 ↑、↓ 或 tab 鍵離開欄位。"
 
 #. #define FORM_LINK_TEXT_SUBMIT_MAILTO_MSG
 #: LYMessages.c:98
@@ -223,12 +223,12 @@ msgstr ""
 #. #define FORM_LINK_PASSWORD_MESSAGE
 #: LYMessages.c:102
 msgid "(Password entry field) Enter text.  Use UP or DOWN arrows or tab to move off."
-msgstr "(KXJ) пJrCϥ B  tab }C"
+msgstr "(密碼輸入欄位) 請輸入文字。使用 ↑、↓ 或 tab 鍵離開欄位。"
 
 #. #define FORM_LINK_PASSWORD_UNM_MSG
 #: LYMessages.c:104
 msgid "UNMODIFIABLE form password.  Use UP or DOWN arrows or tab to move off."
-msgstr "*iק諸* KXJCϥ B  tab }C"
+msgstr "*不可修改的* 密碼輸入欄位。使用 ↑、↓ 或 tab 鍵離開欄位。"
 
 #. #define FORM_LINK_CHECKBOX_MESSAGE
 #: LYMessages.c:106
@@ -293,22 +293,22 @@ msgstr ""
 #. #define FORM_LINK_RESET_MESSAGE
 #: LYMessages.c:130
 msgid "(Form reset button)   Use right-arrow or <return> to reset form to defaults."
-msgstr "(]s) Ы   <return> N쭫]w]ȡC"
+msgstr "(重設表格按鈕) 請按 → 或 <return> 將表格欄位重設為預設值。"
 
 #. #define FORM_LINK_RESET_DIS_MSG
 #: LYMessages.c:132
 msgid "DISABLED form reset button.  Use UP or DOWN arrows or tab to move off."
-msgstr "*ȰϥΪ* ]sCϥ B  tab }C"
+msgstr "*暫停使用的* 重設表格按鈕。使用 ↑、↓ 或 tab 鍵離開欄位。"
 
 #. #define FORM_LINK_OPTION_LIST_MESSAGE
 #: LYMessages.c:134
 msgid "(Option list) Hit return and use arrow keys and return to select option."
-msgstr "(ﶵM)  returnAMϥΤVM return ܩһݪﶵC"
+msgstr "(選項清單) 按 return,然後使用方向鍵和 return 選擇所需的選項。"
 
 #. #define CHOICE_LIST_MESSAGE
 #: LYMessages.c:136
 msgid "(Choice list) Hit return and use arrow keys and return to select option."
-msgstr "(ܲM)  returnAMϥΤVM return ܩһݪﶵC"
+msgstr "(選擇清單) 按 return,然後使用方向鍵和 return 選擇所需的選項。"
 
 #. #define FORM_LINK_OPTION_LIST_UNM_MSG
 #: LYMessages.c:138
@@ -326,12 +326,12 @@ msgstr ""
 
 #: LYMessages.c:142
 msgid "Resetting form..."
-msgstr "]..."
+msgstr "重設表格..."
 
 #. #define RELOADING_FORM
 #: LYMessages.c:144
 msgid "Reloading document.  Any form entries will be lost!"
-msgstr "sJCN|hҦקL줺eI"
+msgstr "重新載入網頁。將會失去所有修改過的表格欄位內容!"
 
 #: LYMessages.c:145
 #, c-format
@@ -341,7 +341,7 @@ msgstr ""
 #. #define NORMAL_LINK_MESSAGE
 #: LYMessages.c:148
 msgid "(NORMAL LINK)   Use right-arrow or <return> to activate."
-msgstr "(q쵲) Ы   <return> sC"
+msgstr "(普通鏈結) 請按 → 或 <return> 瀏覽。"
 
 #: LYMessages.c:149
 msgid "The resource requested is not available at this time."
@@ -353,7 +353,7 @@ msgstr ""
 
 #: LYMessages.c:151
 msgid "Looking up "
-msgstr "dz˯ "
+msgstr "準備檢索 "
 
 #: LYMessages.c:152
 #, c-format
@@ -363,31 +363,31 @@ msgstr ""
 #: LYMessages.c:153
 #, c-format
 msgid "Skipping %s"
-msgstr "L %s"
+msgstr "略過 %s"
 
 #: LYMessages.c:154
 #, c-format
 msgid "Using %s"
-msgstr "ϥ %s"
+msgstr "使用 %s"
 
 #: LYMessages.c:155
 #, c-format
 msgid "Illegal URL: %s"
-msgstr "Xk URLG%s"
+msgstr "不合法的 URL:%s"
 
 #: LYMessages.c:156
 #, c-format
 msgid "Badly formed address %s"
-msgstr "a} %s 榡~"
+msgstr "地址 %s 格式錯誤"
 
 #: LYMessages.c:157
 #, c-format
 msgid "URL: %s"
-msgstr "URLG%s"
+msgstr "URL:%s"
 
 #: LYMessages.c:158
 msgid "Unable to access WWW file!!!"
-msgstr "Lks WWW ɮ!!!"
+msgstr "無法存取 WWW 檔案!!!"
 
 #: LYMessages.c:159
 #, c-format
@@ -412,17 +412,17 @@ msgstr ""
 #. #define NOVICE_LINE_ONE
 #: LYMessages.c:166
 msgid "  Arrow keys: Up and Down to move.  Right to follow a link; Left to go back.  \n"
-msgstr "  VG /     iJ쵲    ^e@\n"
+msgstr "  方向鍵: ↑/↓ 移動   → 進入鏈結   ← 回前一頁\n"
 
 #. #define NOVICE_LINE_TWO
 #: LYMessages.c:168
 msgid " H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list \n"
-msgstr " H)DU  O)ﶵ  P)CL  G)  M)De  Q)}  /)jM  [delete])s\n"
+msgstr " H)求助  O)選項  P)列印  G)移至  M)主畫面  Q)離開  /)搜尋  [delete])瀏覽紀錄\n"
 
 #. #define NOVICE_LINE_TWO_A
 #: LYMessages.c:170
 msgid "  O)ther cmds  H)elp  K)eymap  G)oto  P)rint  M)ain screen  o)ptions  Q)uit  \n"
-msgstr "  O)䥦O  H)DU  K)]w  G)  P)CL  M)De  o)ﶵ  Q)}\n"
+msgstr "  O)其它指令  H)求助  K)按鍵設定  G)移至  P)列印  M)主畫面  o)選項  Q)離開\n"
 
 #. #define NOVICE_LINE_TWO_B
 #: LYMessages.c:172
@@ -437,29 +437,29 @@ msgstr ""
 #. #define FORM_NOVICELINE_ONE
 #: LYMessages.c:176
 msgid "            Enter text into the field by typing on the keyboard              "
-msgstr "                        ШϥLb줤Jr"
+msgstr "                        請使用鍵盤在欄位中輸入文字"
 
 #. #define FORM_NOVICELINE_TWO
 #: LYMessages.c:178
 msgid "    Ctrl-U to delete all text in field, [Backspace] to delete a character    "
-msgstr "    Ctrl-U |R줤ҦrA[Backspace] |VR@Ӧr"
+msgstr "    Ctrl-U 會刪除欄位中的所有文字,[Backspace] 會向後刪除一個字元"
 
 #. #define FORM_NOVICELINE_TWO_DELBL
 #: LYMessages.c:180
 msgid "      Ctrl-U to delete text in field, [Backspace] to delete a character    "
-msgstr "      Ctrl-U |R줤rA[Backspace] |VR@Ӧr"
+msgstr "      Ctrl-U 會刪除欄位中的文字,[Backspace] 會向後刪除一個字元"
 
 #. #define FORM_NOVICELINE_TWO_VAR
 #: LYMessages.c:182
 #, c-format
 msgid "    %s to delete all text in field, [Backspace] to delete a character    "
-msgstr "        %s |R줤ҦrA[Backspace] |VR@Ӧr"
+msgstr "        %s 會刪除欄位中的所有文字,[Backspace] 會向後刪除一個字元"
 
 #. #define FORM_NOVICELINE_TWO_DELBL_VAR
 #: LYMessages.c:184
 #, c-format
 msgid "      %s to delete text in field, [Backspace] to delete a character    "
-msgstr "        %s |R줤rA[Backspace] |VR@Ӧr"
+msgstr "        %s 會刪除欄位中的文字,[Backspace] 會向後刪除一個字元"
 
 #. mailto
 #: LYMessages.c:187
@@ -468,7 +468,7 @@ msgstr ""
 
 #: LYMessages.c:188
 msgid "Warning!  Control codes in mail address replaced by ?"
-msgstr "ĵiI qla}rw '?' rN"
+msgstr "警告! 電郵地址中的控制字元已用 '?' 字元取代"
 
 #: LYMessages.c:189
 msgid "Mail disallowed!  Cannot submit."
@@ -484,16 +484,16 @@ msgstr ""
 
 #: LYMessages.c:192
 msgid "Sending form content..."
-msgstr "beX椺e..."
+msgstr "正在送出表格內容..."
 
 #: LYMessages.c:193
 msgid "No email address is present in mailto URL!"
-msgstr "mailto URL Sqla}I"
+msgstr "mailto URL 中沒有電郵地址!"
 
 #. #define MAILTO_URL_TEMPOPEN_FAILED
 #: LYMessages.c:195
 msgid "Unable to open temporary file for mailto URL!"
-msgstr "Lk} mailto URL һݪȦsɡI"
+msgstr "無法開啟 mailto URL 所需的暫存檔!"
 
 #. #define INC_ORIG_MSG_PROMPT
 #: LYMessages.c:197
@@ -508,12 +508,12 @@ msgstr ""
 #. #define SPAWNING_EDITOR_FOR_MAIL
 #: LYMessages.c:201
 msgid "Spawning your selected editor to edit mail message"
-msgstr "dzƱҰʫws边ӭקl󤺮e"
+msgstr "準備啟動指定的編輯器來修改郵件內容"
 
 #. #define ERROR_SPAWNING_EDITOR
 #: LYMessages.c:203
 msgid "Error spawning editor, check your editor definition in the options menu"
-msgstr "Ұʽs边ɥX{~Aˬdﶵ]ws边"
+msgstr "啟動編輯器時出現錯誤,請檢查選項設定中有關編輯器的部份"
 
 #: LYMessages.c:204
 msgid "Send this comment?"
@@ -521,11 +521,11 @@ msgstr ""
 
 #: LYMessages.c:205
 msgid "Send this message?"
-msgstr "O_ǰeTH"
+msgstr "是否傳送此訊息?"
 
 #: LYMessages.c:206
 msgid "Sending your message..."
-msgstr "dzƶǰeդUT..."
+msgstr "準備傳送閣下的訊息..."
 
 #: LYMessages.c:207
 msgid "Sending your comment:"
@@ -534,11 +534,11 @@ msgstr ""
 #. textarea
 #: LYMessages.c:210
 msgid "Not in a TEXTAREA; cannot use external editor."
-msgstr "ثeObrsϰ줤FLkϥΥ~s边C"
+msgstr "目前不是在文字編輯區域中;無法使用外部的編輯器。"
 
 #: LYMessages.c:211
 msgid "Not in a TEXTAREA; cannot use command."
-msgstr "ثeObrsϰ줤FLkϥΫOC"
+msgstr "目前不是在文字編輯區域中;無法使用指令。"
 
 #: LYMessages.c:213
 msgid "file: ACTIONs are disallowed!"
@@ -551,7 +551,7 @@ msgstr ""
 
 #: LYMessages.c:216
 msgid "Access to local files denied."
-msgstr "ڵsɮסC"
+msgstr "拒絕存取本機檔案。"
 
 #: LYMessages.c:217
 msgid "file: URLs via bookmarks are disallowed!"
@@ -564,7 +564,7 @@ msgstr ""
 
 #: LYMessages.c:220
 msgid "Press <return> to return to Lynx."
-msgstr "Ы <return> ^ LynxC"
+msgstr "請按 <return> 返回 Lynx。"
 
 #. #define SPAWNING_MSG
 #: LYMessages.c:223
@@ -574,7 +574,7 @@ msgstr ""
 #. #define SPAWNING_MSG
 #: LYMessages.c:227
 msgid "Type EXIT to return to Lynx.\n"
-msgstr "пJ EXIT ^ LynxC\n"
+msgstr "請輸入 EXIT 返回 Lynx。\n"
 
 #. #define SPAWNING_MSG
 #: LYMessages.c:230
@@ -587,11 +587,11 @@ msgstr ""
 
 #: LYMessages.c:234
 msgid "The 'd'ownload command is currently disabled."
-msgstr "ثeLkѡuUv('d') OC"
+msgstr "目前無法提供「下載」('d') 指令。"
 
 #: LYMessages.c:235
 msgid "You cannot download an input field."
-msgstr "iUJC"
+msgstr "不可下載輸入欄位。"
 
 #: LYMessages.c:236
 msgid "Form has a mailto action!  Cannot download."
@@ -599,19 +599,19 @@ msgstr ""
 
 #: LYMessages.c:237
 msgid "You cannot download a mailto: link."
-msgstr "iU mailto: 쵲C"
+msgstr "不可下載 mailto: 鏈結。"
 
 #: LYMessages.c:238
 msgid "You cannot download cookies."
-msgstr "iU cookieC"
+msgstr "不可下載 cookie。"
 
 #: LYMessages.c:239
 msgid "You cannot download a printing option."
-msgstr "iUCLﶵ"
+msgstr "不可下載有關列印的選項"
 
 #: LYMessages.c:240
 msgid "You cannot download an upload option."
-msgstr "iUWǪﶵ"
+msgstr "不可下載有關上傳的選項"
 
 #: LYMessages.c:241
 msgid "You cannot download an permit option."
@@ -619,11 +619,11 @@ msgstr ""
 
 #: LYMessages.c:242
 msgid "This special URL cannot be downloaded!"
-msgstr "iUS URLI"
+msgstr "不可下載此特殊 URL!"
 
 #: LYMessages.c:243
 msgid "Nothing to download."
-msgstr "SiUơC"
+msgstr "沒有可下載的資料。"
 
 #: LYMessages.c:244
 msgid "Trace ON!"
@@ -655,11 +655,11 @@ msgstr ""
 
 #: LYMessages.c:254
 msgid "Raw 8-bit or CJK mode toggled OFF!  Reloading..."
-msgstr "w 8-bit lҦάO CJK ҦIdzƭsJ..."
+msgstr "已關閉 8-bit 原始模式或是 CJK 模式!準備重新載入..."
 
 #: LYMessages.c:255
 msgid "Raw 8-bit or CJK mode toggled ON!  Reloading..."
-msgstr "wҥ 8-bit lҦάO CJK ҦIdzƭsJ..."
+msgstr "已啟用 8-bit 原始模式或是 CJK 模式!準備重新載入..."
 
 #. #define HEAD_D_L_OR_CANCEL
 #: LYMessages.c:257
@@ -673,11 +673,11 @@ msgstr ""
 
 #: LYMessages.c:260
 msgid "Sorry, the document is not an http URL."
-msgstr "pAӤ󤣬O http URLC"
+msgstr "抱歉,該文件不是 http URL。"
 
 #: LYMessages.c:261
 msgid "Sorry, the link is not an http URL."
-msgstr "pA쵲O http URLC"
+msgstr "抱歉,該鏈結不是 http URL。"
 
 #: LYMessages.c:262
 msgid "Sorry, the ACTION for this form is disabled."
@@ -702,11 +702,11 @@ msgstr ""
 
 #: LYMessages.c:268
 msgid "News posting is disabled!"
-msgstr "ȰϥαNTKWsDժ\I"
+msgstr "暫停使用將訊息貼上新聞組的功能!"
 
 #: LYMessages.c:269
 msgid "File management support is disabled!"
-msgstr "Ȱϥɮ׺޲z\I"
+msgstr "暫停使用檔案管理的功能!"
 
 #: LYMessages.c:270
 msgid "No jump file is currently available."
@@ -730,7 +730,7 @@ msgstr ""
 
 #: LYMessages.c:275
 msgid "Bookmark features are currently disabled."
-msgstr "ثeLkѮҥ\C"
+msgstr "目前無法提供書籤功能。"
 
 #: LYMessages.c:276
 msgid "Execution via bookmarks is disabled."
@@ -745,16 +745,16 @@ msgstr ""
 #. #define NO_TEMP_FOR_HOTLIST
 #: LYMessages.c:280
 msgid "Unable to open tempfile for X Mosaic hotlist conversion."
-msgstr "ഫ X Mosaic hotlist ɵLk}ҼȦsɡC"
+msgstr "當轉換 X Mosaic hotlist 時無法開啟暫存檔。"
 
 #: LYMessages.c:281
 msgid "ERROR - unable to open bookmark file."
-msgstr "~ w Lk}ҮɡC"
+msgstr "錯誤 ─ 無法開啟書籤檔。"
 
 #. #define BOOKMARK_OPEN_FAILED_FOR_DEL
 #: LYMessages.c:283
 msgid "Unable to open bookmark file for deletion of link."
-msgstr "Lk}ҮɨӧR쵲C"
+msgstr "無法開啟書籤檔來刪除鏈結。"
 
 #. #define BOOKSCRA_OPEN_FAILED_FOR_DEL
 #: LYMessages.c:285
@@ -767,17 +767,17 @@ msgstr ""
 
 #: LYMessages.c:289
 msgid "Error renaming temporary file."
-msgstr "ȦsɦWٮɥX{~C"
+msgstr "更改暫存檔名稱時出現錯誤。"
 
 #. #define BOOKTEMP_COPY_FAIL
 #: LYMessages.c:291
 msgid "Unable to copy temporary file for deletion of link."
-msgstr "R쵲ɵLkƻsȦsɡC"
+msgstr "當刪除鏈結時無法複製暫存檔。"
 
 #. #define BOOKTEMP_REOPEN_FAIL_FOR_DEL
 #: LYMessages.c:293
 msgid "Unable to reopen temporary file for deletion of link."
-msgstr "R쵲ɵLks}ҼȦsɡC"
+msgstr "當刪除鏈結時無法重新開啟暫存檔。"
 
 #. #define BOOKMARK_LINK_NOT_ONE_LINE
 #: LYMessages.c:296
@@ -786,7 +786,7 @@ msgstr ""
 
 #: LYMessages.c:297
 msgid "Bookmark deletion failed."
-msgstr "RҥѡC"
+msgstr "刪除書籤失敗。"
 
 #. #define BOOKMARKS_NOT_TRAVERSED
 #: LYMessages.c:299
@@ -796,30 +796,30 @@ msgstr ""
 #. #define BOOKMARKS_NOT_OPEN
 #: LYMessages.c:301
 msgid "Unable to open bookmark file, use 'a' to save a link first"
-msgstr "Lk}ҮɡAХaxs쵲"
+msgstr "無法開啟書籤檔,請先按‘a’儲存鏈結"
 
 #: LYMessages.c:302
 msgid "There are no links in this bookmark file!"
-msgstr "ɤèS쵲I"
+msgstr "本書籤檔中並沒有鏈結!"
 
 #. #define CACHE_D_OR_CANCEL
 #: LYMessages.c:304
 #, fuzzy
 msgid "D)elete cached document or C)ancel? (d,c): "
-msgstr "bɤxs D)A٬O C)H (d,c)G"
+msgstr "在書籤檔中儲存 D)文件,還是 C)取消? (d,c):"
 
 #. #define BOOK_D_L_OR_CANCEL
 #: LYMessages.c:306
 msgid "Save D)ocument or L)ink to bookmark file or C)ancel? (d,l,c): "
-msgstr "bɤxs D) άO L)쵲A٬O C)H (d,l,c)G"
+msgstr "在書籤檔中儲存 D)文件 或是 L)鏈結,還是 C)取消? (d,l,c):"
 
 #: LYMessages.c:307
 msgid "Save D)ocument to bookmark file or C)ancel? (d,c): "
-msgstr "bɤxs D)A٬O C)H (d,c)G"
+msgstr "在書籤檔中儲存 D)文件,還是 C)取消? (d,c):"
 
 #: LYMessages.c:308
 msgid "Save L)ink to bookmark file or C)ancel? (l,c): "
-msgstr "bɤxs L)쵲A٬O C)H (l,c)G"
+msgstr "在書籤檔中儲存 L)鏈結,還是 C)取消? (l,c):"
 
 #. #define NOBOOK_POST_FORM
 #: LYMessages.c:310
@@ -828,7 +828,7 @@ msgstr ""
 
 #: LYMessages.c:311
 msgid "Cannot save form fields/links"
-msgstr "ixs/쵲"
+msgstr "不可能儲存表格欄位/鏈結"
 
 #. #define NOBOOK_HSML
 #: LYMessages.c:313
@@ -838,11 +838,11 @@ msgstr ""
 #. #define CONFIRM_BOOKMARK_DELETE
 #: LYMessages.c:315
 msgid "Do you really want to delete this link from your bookmark file?"
-msgstr "O_TwnqɤR쵲H"
+msgstr "是否確定要從書籤檔中刪除本鏈結?"
 
 #: LYMessages.c:316
 msgid "Malformed address."
-msgstr "a}榡TC"
+msgstr "地址格式不正確。"
 
 #. #define HISTORICAL_ON_MINIMAL_OFF
 #: LYMessages.c:318
@@ -894,46 +894,46 @@ msgstr ""
 
 #: LYMessages.c:335
 msgid "Now using TagSoup parsing of HTML."
-msgstr "{bϥ TagSoup 覡R HTML C"
+msgstr "現在使用 TagSoup 方式分析 HTML 文件。"
 
 #: LYMessages.c:336
 msgid "Now using SortaSGML parsing of HTML!"
-msgstr "{bϥ SortaSGML 覡R HTML C"
+msgstr "現在使用 SortaSGML 方式分析 HTML 文件。"
 
 #: LYMessages.c:337
 msgid "You are already at the end of this document."
-msgstr "wgb󪺥ݤFC"
+msgstr "已經在文件的末端了。"
 
 #: LYMessages.c:338
 msgid "You are already at the beginning of this document."
-msgstr "wgb󪺶}lmFC"
+msgstr "已經在文件的開始位置了。"
 
 #: LYMessages.c:339
 #, c-format
 msgid "You are already at page %d of this document."
-msgstr "wgb󪺲 %d FC"
+msgstr "已經在文件的第 %d 頁了。"
 
 #: LYMessages.c:340
 #, c-format
 msgid "Link number %d already is current."
-msgstr "쵲s %d wgOثe쵲C"
+msgstr "鏈結編號 %d 已經是目前選取的鏈結。"
 
 #: LYMessages.c:341
 msgid "You are already at the first document"
-msgstr "wgOĤ@"
+msgstr "本文件已經是第一份文件"
 
 #: LYMessages.c:342
 msgid "There are no links above this line of the document."
-msgstr "HWwgS쵲C"
+msgstr "本行以上已經沒有鏈結。"
 
 #: LYMessages.c:343
 msgid "There are no links below this line of the document."
-msgstr "HUwgS쵲C"
+msgstr "本行以下已經沒有鏈結。"
 
 #. #define MAXLEN_REACHED_DEL_OR_MOV
 #: LYMessages.c:345
 msgid "Maximum length reached!  Delete text or move off field."
-msgstr "wFrתWIЧRrάO}C"
+msgstr "已到達文字長度的上限!請刪除文字或是離開本欄位。"
 
 #. #define NOT_ON_SUBMIT_OR_LINK
 #: LYMessages.c:347
@@ -951,7 +951,7 @@ msgstr ""
 
 #: LYMessages.c:351
 msgid "Do you want to go back to the previous document?"
-msgstr "O_^wgsLH"
+msgstr "是否返回已經瀏覽過的文件?"
 
 #: LYMessages.c:352
 msgid "Use arrows or tab to move off of field."
@@ -960,7 +960,7 @@ msgstr ""
 #. #define ENTER_TEXT_ARROWS_OR_TAB
 #: LYMessages.c:354
 msgid "Enter text.  Use arrows or tab to move off of field."
-msgstr "пJrCϥΤV tab }C"
+msgstr "請輸入文字。使用方向鍵或 tab 鍵離開欄位。"
 
 #: LYMessages.c:355
 msgid "** Bad HTML!!  No form action defined. **"
@@ -976,48 +976,48 @@ msgstr ""
 
 #: LYMessages.c:358
 msgid "Goto a random URL is disallowed!"
-msgstr "\iJH URLI"
+msgstr "不允許進入隨機的 URL!"
 
 #: LYMessages.c:359
 msgid "Goto a non-http URL is disallowed!"
-msgstr "\sD http  URLI"
+msgstr "不允許瀏覽非 http 的 URL!"
 
 #: LYMessages.c:360
 #, c-format
 msgid "You are not allowed to goto \"%s\" URLs"
-msgstr "դU\iJ%s URL"
+msgstr "閣下不允許進入“%s”類型的 URL"
 
 #: LYMessages.c:361
 msgid "URL to open: "
-msgstr "dzƶ}Ҫ URLG"
+msgstr "準備開啟的 URL:"
 
 #: LYMessages.c:362
 msgid "Edit the current Goto URL: "
-msgstr "קثe URLG"
+msgstr "修改目前的 URL:"
 
 #: LYMessages.c:363
 msgid "Edit the previous Goto URL: "
-msgstr "ק﴿gs URLG"
+msgstr "修改曾經瀏覽的 URL:"
 
 #: LYMessages.c:364
 msgid "Edit a previous Goto URL: "
-msgstr "ק﴿gs URLG"
+msgstr "修改曾經瀏覽的 URL:"
 
 #: LYMessages.c:365
 msgid "Current document has POST data."
-msgstr "ثe POST ơC"
+msgstr "目前的文件載有 POST 資料。"
 
 #: LYMessages.c:366
 msgid "Edit this document's URL: "
-msgstr "ק糧 URLG"
+msgstr "修改本文件的 URL:"
 
 #: LYMessages.c:367
 msgid "Edit the current link's URL: "
-msgstr "קثe쵲 URLG"
+msgstr "修改目前選取的鏈結的 URL:"
 
 #: LYMessages.c:368
 msgid "You cannot edit File Management URLs"
-msgstr "iק靈ɮ׺޲z URL"
+msgstr "不可修改有關檔案管理的 URL"
 
 #: LYMessages.c:369
 msgid "Enter a database query: "
@@ -1025,19 +1025,19 @@ msgstr ""
 
 #: LYMessages.c:370
 msgid "Enter a whereis query: "
-msgstr "JdzƷjMrG"
+msgstr "輸入準備搜尋的字串:"
 
 #: LYMessages.c:371
 msgid "Edit the current query: "
-msgstr "קثedzƷjMrG"
+msgstr "修改目前準備搜尋的字串:"
 
 #: LYMessages.c:372
 msgid "Edit the previous query: "
-msgstr "ק蠟edzƷjMrG"
+msgstr "修改之前準備搜尋的字串:"
 
 #: LYMessages.c:373
 msgid "Edit a previous query: "
-msgstr "ק蠟edzƷjMrG"
+msgstr "修改之前準備搜尋的字串:"
 
 #. #define USE_C_R_TO_RESUB_CUR_QUERY
 #: LYMessages.c:375
@@ -1088,16 +1088,16 @@ msgstr ""
 #. #define CONFIRM_MAIN_SCREEN
 #: LYMessages.c:387
 msgid "Do you really want to go to the Main screen?"
-msgstr "O_TwnsDeH"
+msgstr "是否確定要瀏覽主畫面?"
 
 #: LYMessages.c:388
 msgid "You are already at main screen!"
-msgstr "wgbDeFI"
+msgstr "已經在主畫面了!"
 
 #. #define NOT_ISINDEX
 #: LYMessages.c:390
 msgid "Not a searchable indexed document -- press '/' to search for a text string"
-msgstr "OiijMޤ w Ы/jMr"
+msgstr "不是可進行搜尋的索引文件 ─ 請按‘/’搜尋字串"
 
 #. #define NO_OWNER
 #: LYMessages.c:392
@@ -1119,23 +1119,23 @@ msgstr ""
 
 #: LYMessages.c:396
 msgid "The 'e'dit command is currently disabled."
-msgstr "ȰϥΡusv('e') OC"
+msgstr "暫停使用「編輯」('e') 指令。"
 
 #: LYMessages.c:397
 msgid "External editing is currently disabled."
-msgstr "ȰϥΥ~s边C"
+msgstr "暫停使用外部的編輯器。"
 
 #: LYMessages.c:398
 msgid "System error - failure to get status."
-msgstr "tο~ w LkoAC"
+msgstr "系統錯誤 ─ 無法得知狀態。"
 
 #: LYMessages.c:399
 msgid "No editor is defined!"
-msgstr "ws边I"
+msgstr "未指定編輯器!"
 
 #: LYMessages.c:400
 msgid "The 'p'rint command is currently disabled."
-msgstr "ȰϥΡuCLv('p') OC"
+msgstr "暫停使用「列印」('p') 指令。"
 
 #: LYMessages.c:401
 msgid "Document has no Toolbar links or Banner."
@@ -1167,32 +1167,32 @@ msgstr ""
 
 #: LYMessages.c:408
 msgid "Select option (or page) number: "
-msgstr "пﶵs(έ)G"
+msgstr "請選取選項編號(或頁數):"
 
 #: LYMessages.c:409
 #, c-format
 msgid "Option number %d already is current."
-msgstr "ﶵs %d wgOثeﶵC"
+msgstr "選項編號 %d 已經是目前的選項。"
 
 #. #define ALREADY_AT_OPTION_END
 #: LYMessages.c:411
 msgid "You are already at the end of this option list."
-msgstr "wgbﶵM檺FC"
+msgstr "已經在選項清單的結束部份了。"
 
 #. #define ALREADY_AT_OPTION_BEGIN
 #: LYMessages.c:413
 msgid "You are already at the beginning of this option list."
-msgstr "wgbﶵM檺}lFC"
+msgstr "已經在選項清單的開始部份了。"
 
 #. #define ALREADY_AT_OPTION_PAGE
 #: LYMessages.c:415
 #, c-format
 msgid "You are already at page %d of this option list."
-msgstr "wgbﶵM檺 %d FC"
+msgstr "已經在選項清單的第 %d 頁了。"
 
 #: LYMessages.c:416
 msgid "You have entered an invalid option number."
-msgstr "դUJFLĪﶵsC"
+msgstr "閣下輸入了無效的選項編號。"
 
 #: LYMessages.c:417
 msgid "** Bad HTML!!  Use -trace to diagnose. **"
@@ -1208,11 +1208,11 @@ msgstr ""
 
 #: LYMessages.c:420
 msgid "Can't open temporary file!"
-msgstr "Lk}ҼȦsɡI"
+msgstr "無法開啟暫存檔!"
 
 #: LYMessages.c:421
 msgid "Can't open output file!  Cancelling!"
-msgstr "Lk}ҿXɡIXI"
+msgstr "無法開啟輸出檔!取消輸出!"
 
 #: LYMessages.c:422
 msgid "Execution is disabled."
@@ -1231,41 +1231,41 @@ msgstr ""
 
 #: LYMessages.c:427
 msgid "This file cannot be displayed on this terminal."
-msgstr "Lkb׺ݾܸɮסC"
+msgstr "無法在本終端機顯示該檔案。"
 
 #. #define CANNOT_DISPLAY_FILE_D_OR_C
 #: LYMessages.c:429
 msgid "This file cannot be displayed on this terminal:  D)ownload, or C)ancel"
-msgstr "Lkb׺ݾܸɮסG D)U  C)"
+msgstr "無法在本終端機顯示該檔案: D)下載  C)取消"
 
 #: LYMessages.c:430
 #, c-format
 msgid "%s  D)ownload, or C)ancel"
-msgstr "%s  D)U  C)"
+msgstr "%s  D)下載  C)取消"
 
 #: LYMessages.c:431
 msgid "Cancelling file."
-msgstr "ɮסC"
+msgstr "取消接收檔案。"
 
 #: LYMessages.c:432
 msgid "Retrieving file.  - PLEASE WAIT -"
-msgstr "bɮסCw еy w"
+msgstr "正在接收檔案。─ 請稍等 ─"
 
 #: LYMessages.c:433
 msgid "Enter a filename: "
-msgstr "пJɮצW١G"
+msgstr "請輸入檔案名稱:"
 
 #: LYMessages.c:434
 msgid "Edit the previous filename: "
-msgstr "קHϥΪɮצW١G"
+msgstr "修改以往使用的檔案名稱:"
 
 #: LYMessages.c:435
 msgid "Edit a previous filename: "
-msgstr "קHϥΪɮצW١G"
+msgstr "修改以往使用的檔案名稱:"
 
 #: LYMessages.c:436
 msgid "Enter a new filename: "
-msgstr "пJsɮצW١G"
+msgstr "請輸入新的檔案名稱:"
 
 #: LYMessages.c:437
 msgid "File name may not begin with a dot."
@@ -1277,62 +1277,62 @@ msgstr ""
 
 #: LYMessages.c:441
 msgid "File exists.  Overwrite?"
-msgstr "ɮפwsbCO_мgH"
+msgstr "檔案已存在。是否覆寫?"
 
 #: LYMessages.c:443
 msgid "Cannot write to file."
-msgstr "LkgJɮסC"
+msgstr "無法寫入檔案。"
 
 #: LYMessages.c:444
 msgid "ERROR! - download command is misconfigured."
-msgstr "~Iw UO]wnC"
+msgstr "錯誤!─ 有關下載的指令仍未設定好。"
 
 #: LYMessages.c:445
 msgid "Unable to download file."
-msgstr "LkUɮסC"
+msgstr "無法下載檔案。"
 
 #: LYMessages.c:446
 msgid "Reading directory..."
-msgstr "bŪؿ..."
+msgstr "正在讀取目錄..."
 
 #: LYMessages.c:447
 msgid "Building directory listing..."
-msgstr "bs@ؿM..."
+msgstr "正在製作目錄清單..."
 
 #: LYMessages.c:448
 msgid "Saving..."
-msgstr "xs..."
+msgstr "儲存中..."
 
 #: LYMessages.c:449
 #, c-format
 msgid "Could not edit file '%s'."
-msgstr "Lksɮס%sC"
+msgstr "無法編輯檔案‘%s’。"
 
 #: LYMessages.c:450
 msgid "Unable to access document!"
-msgstr "LksI"
+msgstr "無法存取文件!"
 
 #: LYMessages.c:451
 msgid "Could not access file."
-msgstr "LksɮסC"
+msgstr "無法存取檔案。"
 
 #: LYMessages.c:452
 msgid "Could not access directory."
-msgstr "LksؿC"
+msgstr "無法存取目錄。"
 
 #: LYMessages.c:453
 msgid "Could not load data."
-msgstr "LkJơC"
+msgstr "無法載入資料。"
 
 #. #define CANNOT_EDIT_REMOTE_FILES
 #: LYMessages.c:455
 msgid "Lynx cannot currently (e)dit remote WWW files."
-msgstr "ثe Lynx Lks軷ݪ WWW ɮסC"
+msgstr "目前 Lynx 無法編輯遠端的 WWW 檔案。"
 
 #. #define CANNOT_EDIT_FIELD
 #: LYMessages.c:457
 msgid "This field cannot be (e)dited with an external editor."
-msgstr "LkϥΥ~s边ӽsC"
+msgstr "本欄位無法使用外部的編輯器來編輯。"
 
 #: LYMessages.c:458
 msgid "Bad rule"
@@ -1344,31 +1344,31 @@ msgstr ""
 
 #: LYMessages.c:460
 msgid "You are not authorized to edit this file."
-msgstr "դUvק糧ɮסC"
+msgstr "閣下未獲授權修改本檔案。"
 
 #: LYMessages.c:461
 msgid "Title: "
-msgstr "DG"
+msgstr "標題:"
 
 #: LYMessages.c:462
 msgid "Subject: "
-msgstr "DDG"
+msgstr "主題:"
 
 #: LYMessages.c:463
 msgid "Username: "
-msgstr "bW١G"
+msgstr "帳戶名稱:"
 
 #: LYMessages.c:464
 msgid "Password: "
-msgstr "KXG"
+msgstr "密碼:"
 
 #: LYMessages.c:465
 msgid "lynx: Username and Password required!!!"
-msgstr "lynxGݭnbW٤αKX!!!"
+msgstr "lynx:需要帳戶名稱及密碼!!!"
 
 #: LYMessages.c:466
 msgid "lynx: Password required!!!"
-msgstr "lynxGݭnKX!!!"
+msgstr "lynx:需要密碼!!!"
 
 #: LYMessages.c:467
 msgid "Clear all authorization info for this session?"
@@ -1376,33 +1376,33 @@ msgstr ""
 
 #: LYMessages.c:468
 msgid "Authorization info cleared."
-msgstr "wM{ҸTC"
+msgstr "已清除認證資訊。"
 
 #: LYMessages.c:469
 msgid "Authorization failed.  Retry?"
-msgstr "{ҥѡCO_աH"
+msgstr "認證失敗。是否重試?"
 
 #: LYMessages.c:470
 msgid "cgi support has been disabled."
-msgstr "Ȱ䴩 cgi \C"
+msgstr "暫停支援 cgi 功能。"
 
 #. #define CGI_NOT_COMPILED
 #: LYMessages.c:472
 msgid "Lynxcgi capabilities are not compiled into this version."
-msgstr "sĶɨèS[J lynxcgi \C"
+msgstr "編譯時並沒有加入 lynxcgi 功能。"
 
 #: LYMessages.c:473
 #, c-format
 msgid "Sorry, no known way of converting %s to %s."
-msgstr "pASwkiHN %s ഫ %sC"
+msgstr "抱歉,沒有已知的方法可以將 %s 轉換至 %s。"
 
 #: LYMessages.c:474
 msgid "Unable to set up connection."
-msgstr "Lkإ߳suC"
+msgstr "無法建立連線。"
 
 #: LYMessages.c:475
 msgid "Unable to make connection"
-msgstr "Lkإ߳suC"
+msgstr "無法建立連線。"
 
 #. #define MALFORMED_EXEC_REQUEST
 #: LYMessages.c:477
@@ -1491,15 +1491,15 @@ msgstr ""
 
 #: LYMessages.c:505
 msgid "*** You have unread mail. ***"
-msgstr "*** ŪlC ***"
+msgstr "*** 有未讀的郵件。 ***"
 
 #: LYMessages.c:507
 msgid "*** You have mail. ***"
-msgstr "*** lC ***"
+msgstr "*** 有郵件。 ***"
 
 #: LYMessages.c:509
 msgid "*** You have new mail. ***"
-msgstr "*** slC ***"
+msgstr "*** 有新郵件。 ***"
 
 #: LYMessages.c:510
 msgid "File insert cancelled!!!"
@@ -1507,19 +1507,19 @@ msgstr ""
 
 #: LYMessages.c:511
 msgid "Not enough memory for file!"
-msgstr "O餣HJɮסI"
+msgstr "記憶體不足以載入檔案!"
 
 #: LYMessages.c:512
 msgid "Can't open file for reading."
-msgstr "Lk}ҷdzŪJɮסC"
+msgstr "無法開啟準備讀入的檔案。"
 
 #: LYMessages.c:513
 msgid "File does not exist."
-msgstr "ɮפsbC"
+msgstr "檔案不存在。"
 
 #: LYMessages.c:514
 msgid "File does not exist - reenter or cancel:"
-msgstr "ɮפsb w ЭsJΨG"
+msgstr "檔案不存在 ─ 請重新輸入或取消:"
 
 #: LYMessages.c:515
 msgid "File is not readable."
@@ -1535,7 +1535,7 @@ msgstr ""
 
 #: LYMessages.c:518
 msgid "Save request cancelled!!!"
-msgstr "wxsnD!!!"
+msgstr "已取消儲存的要求!!!"
 
 #: LYMessages.c:519
 msgid "Mail request cancelled!!!"
@@ -1548,39 +1548,39 @@ msgstr ""
 
 #: LYMessages.c:522
 msgid "Please wait..."
-msgstr "еy..."
+msgstr "請稍等..."
 
 #: LYMessages.c:523
 msgid "Mailing file.  Please wait..."
-msgstr "bHXɮסCеy..."
+msgstr "正在寄出檔案。請稍等..."
 
 #: LYMessages.c:524
 msgid "ERROR - Unable to mail file"
-msgstr "~ w LkHXɮ"
+msgstr "錯誤 ─ 無法寄出檔案"
 
 #. #define CONFIRM_LONG_SCREEN_PRINT
 #: LYMessages.c:526
 #, c-format
 msgid "File is %d screens long.  Are you sure you want to print?"
-msgstr "ɮת׬ %d ӵeCO_TwnCLH"
+msgstr "檔案長度為 %d 個畫面。是否確定要列印?"
 
 #: LYMessages.c:527
 msgid "Print request cancelled!!!"
-msgstr "wCLnD!!!"
+msgstr "已取消列印的要求!!!"
 
 #: LYMessages.c:528
 msgid "Press <return> to begin: "
-msgstr "Ы <return> }lG"
+msgstr "請按 <return> 開始:"
 
 #: LYMessages.c:529
 msgid "Press <return> to finish: "
-msgstr "Ы <return> G"
+msgstr "請按 <return> 結束:"
 
 #. #define CONFIRM_LONG_PAGE_PRINT
 #: LYMessages.c:531
 #, c-format
 msgid "File is %d pages long.  Are you sure you want to print?"
-msgstr "ɮת׬ %d CO_TwnCLH"
+msgstr "檔案長度為 %d 頁。是否確定要列印?"
 
 #. #define CHECK_PRINTER
 #: LYMessages.c:533
@@ -1589,11 +1589,11 @@ msgstr ""
 
 #: LYMessages.c:534
 msgid "ERROR - Unable to allocate file space!!!"
-msgstr "~ w LktɮתŶ!!!"
+msgstr "錯誤 ─ 無法分配檔案空間!!!"
 
 #: LYMessages.c:535
 msgid "Unable to open tempfile"
-msgstr "Lk}ҼȦs"
+msgstr "無法開啟暫存檔"
 
 #: LYMessages.c:536
 msgid "Unable to open print options file"
@@ -1601,15 +1601,15 @@ msgstr ""
 
 #: LYMessages.c:537
 msgid "Printing file.  Please wait..."
-msgstr "bCLɮסCеy..."
+msgstr "正在列印檔案。請稍等..."
 
 #: LYMessages.c:538
 msgid "Please enter a valid internet mail address: "
-msgstr "пJĪqla}G"
+msgstr "請輸入有效的電郵地址:"
 
 #: LYMessages.c:539
 msgid "ERROR! - printer is misconfigured!"
-msgstr "~I - L]w~I"
+msgstr "錯誤! - 印表機設定錯誤!"
 
 #: LYMessages.c:540
 msgid "Image map from POST response not available!"
@@ -1634,17 +1634,17 @@ msgstr ""
 #. #define OPTION_SCREEN_NEEDS_24
 #: LYMessages.c:547
 msgid "Screen height must be at least 24 lines for the Options menu!"
-msgstr "bﶵ]wAeץ̤֦ 24 I"
+msgstr "在選項設定中,畫面高度必須最少有 24 行!"
 
 #. #define OPTION_SCREEN_NEEDS_23
 #: LYMessages.c:549
 msgid "Screen height must be at least 23 lines for the Options menu!"
-msgstr "bﶵ]wAeץ̤֦ 23 I"
+msgstr "在選項設定中,畫面高度必須最少有 23 行!"
 
 #. #define OPTION_SCREEN_NEEDS_22
 #: LYMessages.c:551
 msgid "Screen height must be at least 22 lines for the Options menu!"
-msgstr "bﶵ]wAeץ̤֦ 22 I"
+msgstr "在選項設定中,畫面高度必須最少有 22 行!"
 
 #: LYMessages.c:553
 msgid "That key requires Advanced User mode."
@@ -1653,27 +1653,27 @@ msgstr ""
 #: LYMessages.c:554
 #, c-format
 msgid "Content-type: %s"
-msgstr "Content-typeG%s"
+msgstr "Content-type:%s"
 
 #: LYMessages.c:555
 msgid "Command: "
-msgstr "OG"
+msgstr "指令:"
 
 #: LYMessages.c:556
 msgid "Unknown or ambiguous command"
-msgstr "ηNqtkO"
+msgstr "不明或意義含糊的指令"
 
 #: LYMessages.c:557
 msgid " Version "
-msgstr "  "
+msgstr " 版本 "
 
 #: LYMessages.c:558
 msgid " first"
-msgstr " ()"
+msgstr " (首先測試)"
 
 #: LYMessages.c:559
 msgid ", guessing..."
-msgstr "Abp..."
+msgstr ",正在估計..."
 
 #: LYMessages.c:560
 msgid "Permissions for "
@@ -1693,7 +1693,7 @@ msgstr ""
 
 #: LYMessages.c:564
 msgid " to save,"
-msgstr " xs  "
+msgstr " 儲存  "
 
 #: LYMessages.c:565
 msgid " to "
@@ -1701,7 +1701,7 @@ msgstr ""
 
 #: LYMessages.c:566
 msgid " or "
-msgstr " άO "
+msgstr " 或是 "
 
 #: LYMessages.c:567
 msgid " index"
@@ -1709,27 +1709,27 @@ msgstr ""
 
 #: LYMessages.c:568
 msgid " to return to Lynx."
-msgstr " ^ LynxC"
+msgstr " 返回 Lynx。"
 
 #: LYMessages.c:569
 msgid "Accept Changes"
-msgstr ""
+msgstr "接受更改"
 
 #: LYMessages.c:570
 msgid "Reset Changes"
-msgstr "]ﶵ"
+msgstr "重設選項"
 
 #: LYMessages.c:571
 msgid "Left Arrow cancels changes"
-msgstr "bCﶵ"
+msgstr "左箭咀鍵取消更改選項"
 
 #: LYMessages.c:572
 msgid "Save options to disk"
-msgstr "NﶵxsϺФ"
+msgstr "將選項儲存於磁碟中"
 
 #: LYMessages.c:573
 msgid "Hit RETURN to accept entered data."
-msgstr " RETURN JơC"
+msgstr "按 RETURN 接受輸入的資料。"
 
 #. #define ACCEPT_DATA_OR_DEFAULT
 #: LYMessages.c:575
@@ -1738,43 +1738,43 @@ msgstr ""
 
 #: LYMessages.c:576
 msgid "Value accepted!"
-msgstr "w]wȡI"
+msgstr "已接受設定值!"
 
 #. #define VALUE_ACCEPTED_WARNING_X
 #: LYMessages.c:578
 msgid "Value accepted! -- WARNING: Lynx is configured for XWINDOWS!"
-msgstr "w]wȡIw ĵiGLynx ]wFub XWINDOW AΡI"
+msgstr "已接受設定值!─ 警告:Lynx 設定了只在 XWINDOW 適用!"
 
 #. #define VALUE_ACCEPTED_WARNING_NONX
 #: LYMessages.c:580
 msgid "Value accepted! -- WARNING: Lynx is NOT configured for XWINDOWS!"
-msgstr "w]wȡIw ĵiGLynx ]wFAΩ XWINDOWI"
+msgstr "已接受設定值!─ 警告:Lynx 設定了不適用於 XWINDOW!"
 
 #: LYMessages.c:581
 msgid "You are not allowed to change which editor to use!"
-msgstr "\ۦwϥΪs边I"
+msgstr "不允許自行指定使用的編輯器!"
 
 #: LYMessages.c:582
 msgid "Failed to set DISPLAY variable!"
-msgstr "Lk]w DISPLAY ܼơI"
+msgstr "無法設定 DISPLAY 環境變數!"
 
 #: LYMessages.c:583
 msgid "Failed to clear DISPLAY variable!"
-msgstr "LkM DISPLAY ܼơI"
+msgstr "無法清除 DISPLAY 環境變數!"
 
 #. #define BOOKMARK_CHANGE_DISALLOWED
 #: LYMessages.c:585
 msgid "You are not allowed to change the bookmark file!"
-msgstr "\ɡI"
+msgstr "不允許更改書籤檔!"
 
 #: LYMessages.c:586
 msgid "Terminal does not support color"
-msgstr "׺ݾ䴩m"
+msgstr "終端機不支援色彩"
 
 #: LYMessages.c:587
 #, c-format
 msgid "Your '%s' terminal does not support color."
-msgstr "%s׺ݾ䴩m"
+msgstr "‘%s’終端機不支援色彩"
 
 #: LYMessages.c:588
 msgid "Access to dot files is disabled!"
@@ -1783,7 +1783,7 @@ msgstr ""
 #. #define UA_NO_LYNX_WARNING
 #: LYMessages.c:590
 msgid "User-Agent string does not contain \"Lynx\" or \"L_y_n_x\""
-msgstr "User-Agent rꤣ]ALynxΡL_y_n_x"
+msgstr "User-Agent 字串不包括“Lynx”或“L_y_n_x”"
 
 #. #define UA_PLEASE_USE_LYNX
 #: LYMessages.c:592
@@ -1793,32 +1793,32 @@ msgstr ""
 #. #define UA_CHANGE_DISABLED
 #: LYMessages.c:594
 msgid "Changing of the User-Agent string is disabled!"
-msgstr "\ User-Agent rI"
+msgstr "不允許更改 User-Agent 字串!"
 
 #. #define CHANGE_OF_SETTING_DISALLOWED
 #: LYMessages.c:596
 msgid "You are not allowed to change this setting."
-msgstr "\惡]wC"
+msgstr "不允許更改此項設定。"
 
 #: LYMessages.c:597
 msgid "Saving Options..."
-msgstr "bxsﶵ..."
+msgstr "正在儲存選項..."
 
 #: LYMessages.c:598
 msgid "Options saved!"
-msgstr "wxsﶵI"
+msgstr "已儲存選項!"
 
 #: LYMessages.c:599
 msgid "Unable to save Options!"
-msgstr "LkxsﶵI"
+msgstr "無法儲存選項!"
 
 #: LYMessages.c:600
 msgid " 'r' to return to Lynx "
-msgstr "Ыr^ Lynx "
+msgstr "請按‘r’返回 Lynx "
 
 #: LYMessages.c:601
 msgid " '>' to save, or 'r' to return to Lynx "
-msgstr ">xsAάOr^ Lynx "
+msgstr "按‘>’儲存,或是按‘r’返回 Lynx "
 
 #. #define ANY_KEY_CHANGE_RET_ACCEPT
 #: LYMessages.c:603
@@ -1827,7 +1827,7 @@ msgstr ""
 
 #: LYMessages.c:604
 msgid "Error uncompressing temporary file!"
-msgstr "NȦsɸɵoͿ~I"
+msgstr "將暫存檔解壓時發生錯誤!"
 
 #: LYMessages.c:605
 msgid "Unsupported URL scheme!"
@@ -1839,7 +1839,7 @@ msgstr ""
 
 #: LYMessages.c:607
 msgid "Redirection limit of 10 URL's reached."
-msgstr "wF URL sɦVƪ (10 )C"
+msgstr "已達到 URL 重新導向次數的限制 (10 次)。"
 
 #: LYMessages.c:608
 msgid "Illegal redirection URL received from server!"
@@ -1857,7 +1857,7 @@ msgstr ""
 
 #: LYMessages.c:614
 msgid "P)roceed, or C)ancel "
-msgstr "P)~  C)"
+msgstr "P)繼續  C)取消"
 
 #. #define ADVANCED_POST_GET_REDIRECT
 #: LYMessages.c:616
@@ -1903,11 +1903,11 @@ msgstr ""
 #: LYMessages.c:630
 #, c-format
 msgid "Proceed (%s)?"
-msgstr "O_~ (%s)?"
+msgstr "是否繼續 (%s)?"
 
 #: LYMessages.c:631
 msgid "Cannot POST to this host."
-msgstr "Lkǰe POST ƦܸӥDC"
+msgstr "無法傳送 POST 資料至該主機。"
 
 #: LYMessages.c:632
 msgid "POST not supported for this URL - ignoring POST data!"
@@ -1915,32 +1915,32 @@ msgstr ""
 
 #: LYMessages.c:633
 msgid "Discarding POST data..."
-msgstr "˱ POST ..."
+msgstr "捨棄 POST 資料..."
 
 #: LYMessages.c:634
 msgid "Document will not be reloaded!"
-msgstr "|sJI"
+msgstr "不會重新載入文件!"
 
 #: LYMessages.c:635
 msgid "Location: "
-msgstr "mG"
+msgstr "位置:"
 
 #: LYMessages.c:636
 #, c-format
 msgid "'%s' not found!"
-msgstr "䤣졥%sI"
+msgstr "找不到‘%s’!"
 
 #: LYMessages.c:637
 msgid "Default Bookmark File"
-msgstr "w]"
+msgstr "預設書籤檔"
 
 #: LYMessages.c:638
 msgid "Screen too small! (8x35 min)"
-msgstr "eӤpI(̤p 8x35)"
+msgstr "畫面太小!(最小 8x35)"
 
 #: LYMessages.c:639
 msgid "Select destination or ^G to Cancel: "
-msgstr "пܥتaΫ ^G G"
+msgstr "請選擇目的地或按 ^G 取消:"
 
 #. #define MULTIBOOKMARKS_SELECT
 #: LYMessages.c:641
@@ -1954,7 +1954,7 @@ msgstr ""
 
 #: LYMessages.c:644
 msgid "Multiple bookmark support is not available."
-msgstr "LkѦhɪ䴩C"
+msgstr "無法提供多書籤檔的支援。"
 
 #: LYMessages.c:645
 #, c-format
@@ -1963,7 +1963,7 @@ msgstr ""
 
 #: LYMessages.c:646
 msgid "       Select Bookmark"
-msgstr "       ܮ"
+msgstr "       選擇書籤"
 
 #. #define MULTIBOOKMARKS_EHEAD_MASK
 #: LYMessages.c:648
@@ -1974,11 +1974,11 @@ msgstr ""
 #. #define MULTIBOOKMARKS_EHEAD
 #: LYMessages.c:650
 msgid "         Editing Bookmark DESCRIPTION and FILEPATH"
-msgstr "         ק靈Ҫɮ׸|"
+msgstr "         修改有關書籤的說明及檔案路徑"
 
 #: LYMessages.c:651
 msgid "Letter: "
-msgstr "rG"
+msgstr "字母:"
 
 #. #define USE_PATH_OFF_HOME
 #: LYMessages.c:654
@@ -1996,27 +1996,27 @@ msgstr ""
 
 #: LYMessages.c:660
 msgid "No previously visited links available!"
-msgstr "LkѤesL쵲I"
+msgstr "無法提供之前瀏覽過的鏈結!"
 
 #: LYMessages.c:661
 msgid "Memory exhausted!  Program aborted!"
-msgstr "OӺɡI{I"
+msgstr "記憶體耗盡!程式必須中止!"
 
 #: LYMessages.c:662
 msgid "Memory exhausted!  Aborting..."
-msgstr "OӺɡI{..."
+msgstr "記憶體耗盡!程式中止..."
 
 #: LYMessages.c:663
 msgid "Not enough memory!"
-msgstr "O餣I"
+msgstr "記憶體不足!"
 
 #: LYMessages.c:664
 msgid "Directory/File Manager not available"
-msgstr "Lkѥؿ/ɮ׺޲z\"
+msgstr "無法提供目錄/檔案管理功能"
 
 #: LYMessages.c:665
 msgid "HREF in BASE tag is not an absolute URL."
-msgstr "BASE Ҫ HREF O| URLC"
+msgstr "BASE 標籤的 HREF 不是有絕對路徑的 URL。"
 
 #: LYMessages.c:666
 msgid "Location URL is not absolute."
@@ -2024,7 +2024,7 @@ msgstr ""
 
 #: LYMessages.c:667
 msgid "Refresh URL is not absolute."
-msgstr "dzƧs URL S|C"
+msgstr "準備更新的 URL 中沒有絕對路徑。"
 
 #. #define SENDING_MESSAGE_WITH_BODY_TO
 #: LYMessages.c:669
@@ -2062,7 +2062,7 @@ msgid ""
 msgstr ""
 "\n"
 "\n"
-"pGQeXTAЫ Ctrl-G \n"
+"如果不想送出訊息,請按 Ctrl-G 取消\n"
 
 #. #define ENTER_NAME_OR_BLANK
 #: LYMessages.c:676
@@ -2071,7 +2071,7 @@ msgid ""
 " Please enter your name, or leave it blank to remain anonymous\n"
 msgstr ""
 "\n"
-" пJդUmWAάONWٯdťNLW\n"
+" 請輸入閣下的姓名,或是將名稱留空代表無名氏\n"
 
 #. #define ENTER_MAIL_ADDRESS_OR_OTHER
 #: LYMessages.c:678
@@ -2080,12 +2080,12 @@ msgid ""
 " Please enter a mail address or some other\n"
 msgstr ""
 "\n"
-" pGݭn^СAжWql\n"
+" 如果需要對方回覆,請填上電郵\n"
 
 #. #define MEANS_TO_CONTACT_FOR_RESPONSE
 #: LYMessages.c:680
 msgid " means to contact you, if you desire a response.\n"
-msgstr " a}Ψ䥦pkC\n"
+msgstr " 地址或其它聯絡方法。\n"
 
 #: LYMessages.c:681
 msgid ""
@@ -2093,7 +2093,7 @@ msgid ""
 " Please enter a subject line.\n"
 msgstr ""
 "\n"
-" пJDC\n"
+" 請輸入標題。\n"
 
 #. #define ENTER_ADDRESS_FOR_CC
 #: LYMessages.c:683
@@ -2104,7 +2104,7 @@ msgstr ""
 
 #: LYMessages.c:684
 msgid " (Leave blank if you don't want a copy.)\n"
-msgstr " (pGQƥбNdšC)\n"
+msgstr " (如果不想收到副本請將此欄留空。)\n"
 
 #: LYMessages.c:685
 msgid ""
@@ -2113,7 +2113,7 @@ msgid ""
 "\n"
 msgstr ""
 "\n"
-" ˬdTeG\n"
+" 請檢查訊息內容:\n"
 "\n"
 
 #: LYMessages.c:686
@@ -2122,7 +2122,7 @@ msgid ""
 "Press RETURN to continue: "
 msgstr ""
 "\n"
-"Ы RETURN ~G"
+"請按 RETURN 繼續:"
 
 #: LYMessages.c:687
 msgid ""
@@ -2132,7 +2132,7 @@ msgstr ""
 
 #: LYMessages.c:688
 msgid " Use Control-U to erase the default.\n"
-msgstr " Ы Control-U Mw]ȡC\n"
+msgstr " 請按 Control-U 清除預設值。\n"
 
 #: LYMessages.c:689
 msgid ""
@@ -2140,7 +2140,7 @@ msgid ""
 " Please enter your message below."
 msgstr ""
 "\n"
-" ЦbHUaJTC"
+" 請在以下的地方輸入訊息。"
 
 #. #define ENTER_PERIOD_WHEN_DONE_A
 #: LYMessages.c:691 src/LYNews.c:360
@@ -2149,7 +2149,7 @@ msgid ""
 " When you are done, press enter and put a single period (.)"
 msgstr ""
 "\n"
-" Ы enterAMbU@"
+" 完成後請按 enter,然後在下一行"
 
 #. #define ENTER_PERIOD_WHEN_DONE_B
 #: LYMessages.c:693 src/LYNews.c:361
@@ -2158,20 +2158,20 @@ msgid ""
 " on a line and press enter again."
 msgstr ""
 "\n"
-" uJ@I (.) åBA enterC"
+" 只輸入一點 (.) 並且再按 enter。"
 
 #. Cookies messages
 #. #define ADVANCED_COOKIE_CONFIRMATION
 #: LYMessages.c:697
 #, c-format
 msgid "%s cookie: %.*s=%.*s  Allow? (Y/N/Always/neVer)"
-msgstr "%s cookieG%.*s=%.*s  O_H (Y/N/Always/neVer)"
+msgstr "%s cookie:%.*s=%.*s  是否接受? (Y/N/Always/neVer)"
 
 #. #define INVALID_COOKIE_DOMAIN_CONFIRMATION
 #: LYMessages.c:699
 #, c-format
 msgid "Accept invalid cookie domain=%s for '%s'?"
-msgstr "O_ domain=%sA@ӥѡ%soXL cookieH"
+msgstr "是否接受 domain=%s,一個由‘%s’發出的無效 cookie?"
 
 #. #define INVALID_COOKIE_PATH_CONFIRMATION
 #: LYMessages.c:701
@@ -2181,20 +2181,20 @@ msgstr ""
 
 #: LYMessages.c:702
 msgid "Allowing this cookie."
-msgstr " cookieC"
+msgstr "接受此 cookie。"
 
 #: LYMessages.c:703
 msgid "Rejecting this cookie."
-msgstr "ڵ cookieC"
+msgstr "拒絕此 cookie。"
 
 #: LYMessages.c:704
 msgid "The Cookie Jar is empty."
-msgstr "Sxs cookieC"
+msgstr "沒有儲存任何 cookie。"
 
 #: LYMessages.c:705
 #, fuzzy
 msgid "The Cache Jar is empty."
-msgstr "Sxs cookieC"
+msgstr "沒有儲存任何 cookie。"
 
 #. #define ACTIVATE_TO_GOBBLE
 #: LYMessages.c:707
@@ -2207,15 +2207,15 @@ msgstr ""
 
 #: LYMessages.c:709
 msgid "(Cookies never allowed.)"
-msgstr "(ä cookieC)"
+msgstr "(永不接受 cookie。)"
 
 #: LYMessages.c:710
 msgid "(Cookies always allowed.)"
-msgstr "(@w cookieC)"
+msgstr "(一定接受 cookie。)"
 
 #: LYMessages.c:711
 msgid "(Cookies allowed via prompt.)"
-msgstr "(C߰ݨϥΪ̬O_ cookieC)"
+msgstr "(每次都詢問使用者是否接受 cookie。)"
 
 #: LYMessages.c:712
 msgid "(Persistent Cookies.)"
@@ -2243,69 +2243,69 @@ msgstr ""
 
 #: LYMessages.c:718
 msgid "Delete this cookie?"
-msgstr "O_R cookieH"
+msgstr "是否刪除該 cookie?"
 
 #: LYMessages.c:719
 msgid "The cookie has been eaten!"
-msgstr " cookie wgQRFI"
+msgstr "該 cookie 已經被刪除了!"
 
 #: LYMessages.c:720
 msgid "Delete this empty domain?"
-msgstr "O_RӪťժH"
+msgstr "是否刪除該空白的網域?"
 
 #: LYMessages.c:721
 msgid "The domain has been eaten!"
-msgstr "wgRӺI"
+msgstr "已經刪除該網域!"
 
 #. #define DELETE_COOKIES_SET_ALLOW_OR_CANCEL
 #: LYMessages.c:723
 msgid "D)elete domain's cookies, set allow A)lways/P)rompt/neV)er, or C)ancel? "
-msgstr "D)R쪺 cookie  A)@w cookie  P)߰ݬO_  V)ä  C)"
+msgstr "D)刪除網域的 cookie  A)一定接受 cookie  P)詢問是否接受  V)永不接受  C)取消"
 
 #. #define DELETE_DOMAIN_SET_ALLOW_OR_CANCEL
 #: LYMessages.c:725
 msgid "D)elete domain, set allow A)lways/P)rompt/neV)er, or C)ancel? "
-msgstr "D)R  A)@w cookie  P)߰ݬO_  V)ä  C)"
+msgstr "D)刪除網域  A)一定接受 cookie  P)詢問是否接受  V)永不接受  C)取消"
 
 #: LYMessages.c:726
 msgid "All cookies in the domain have been eaten!"
-msgstr "wgRҦӦ۸Ӻ쪺 cookieI"
+msgstr "已經刪除所有來自該網域的 cookie!"
 
 #: LYMessages.c:727
 #, c-format
 msgid "'A'lways allowing from domain '%s'."
-msgstr "@wӦۺ졥%s cookieC"
+msgstr "一定接受來自網域‘%s’的 cookie。"
 
 #: LYMessages.c:728
 #, c-format
 msgid "ne'V'er allowing from domain '%s'."
-msgstr "ûӦۺ졥%s cookieC"
+msgstr "永遠不接受來自網域‘%s’的 cookie。"
 
 #: LYMessages.c:729
 #, c-format
 msgid "'P'rompting to allow from domain '%s'."
-msgstr "(C߰ݬO_Ӧۺ졥%s cookieC)"
+msgstr "(每次都詢問是否接受來自網域‘%s’的 cookie。)"
 
 #: LYMessages.c:730
 msgid "Delete all cookies in this domain?"
-msgstr "O_RҦӦ۸Ӻ쪺 cookieH"
+msgstr "是否刪除所有來自該網域的 cookie?"
 
 #: LYMessages.c:731
 msgid "All of the cookies in the jar have been eaten!"
-msgstr "wgRҦ cookieI"
+msgstr "已經刪除所有 cookie!"
 
 #: LYMessages.c:733
 msgid "Port 19 not permitted in URLs."
-msgstr "URL ̤\ϥγs𸹽X 19C"
+msgstr "URL 裡不允許使用連接埠號碼 19。"
 
 #: LYMessages.c:734
 msgid "Port 25 not permitted in URLs."
-msgstr "URL ̤\ϥγs𸹽X 25C"
+msgstr "URL 裡不允許使用連接埠號碼 25。"
 
 #: LYMessages.c:735
 #, c-format
 msgid "Port %lu not permitted in URLs."
-msgstr "URL ̤\ϥγs𸹽X %luC"
+msgstr "URL 裡不允許使用連接埠號碼 %lu。"
 
 #: LYMessages.c:736
 msgid "URL has a bad port field."
@@ -2334,7 +2334,7 @@ msgstr ""
 #. #define MAX_TEMPCOUNT_REACHED
 #: LYMessages.c:743
 msgid "The maximum temporary file count has been reached!"
-msgstr "vFiȦsɼƥؤWI"
+msgstr "己達到可接受的暫存檔數目上限!"
 
 #. #define FORM_VALUE_TOO_LONG
 #: LYMessages.c:745
@@ -2349,11 +2349,11 @@ msgstr ""
 #. HTFile.c
 #: LYMessages.c:750
 msgid "Directory"
-msgstr "ؿ"
+msgstr "目錄"
 
 #: LYMessages.c:751
 msgid "Directory browsing is not allowed."
-msgstr "\sؿC"
+msgstr "不允許瀏覽目錄。"
 
 #: LYMessages.c:752
 msgid "Selective access is not enabled for this directory"
@@ -2365,11 +2365,11 @@ msgstr ""
 
 #: LYMessages.c:754
 msgid "This directory is not readable."
-msgstr "SŪӥؿvC"
+msgstr "沒有讀取該目錄的權限。"
 
 #: LYMessages.c:755
 msgid "Can't access requested file."
-msgstr "LksҭnDɮסC"
+msgstr "無法存取所要求的檔案。"
 
 #: LYMessages.c:756
 msgid "Could not find suitable representation for transmission."
@@ -2377,19 +2377,19 @@ msgstr ""
 
 #: LYMessages.c:757
 msgid "Could not open file for decompression!"
-msgstr "Lk}ҷdzƸɮסI"
+msgstr "無法開啟準備解壓的檔案!"
 
 #: LYMessages.c:758
 msgid "Files:"
-msgstr "ɮסG"
+msgstr "檔案:"
 
 #: LYMessages.c:759
 msgid "Subdirectories:"
-msgstr "ƥؿG"
+msgstr "副目錄:"
 
 #: LYMessages.c:760
 msgid " directory"
-msgstr " ؿ"
+msgstr " 目錄"
 
 #: LYMessages.c:761
 msgid "Up to "
@@ -2397,16 +2397,16 @@ msgstr ""
 
 #: LYMessages.c:762
 msgid "Current directory is "
-msgstr "ثeؿO "
+msgstr "目前的目錄是 "
 
 #. HTGopher.c
 #: LYMessages.c:765
 msgid "No response from server!"
-msgstr "AS^I"
+msgstr "伺服器沒有回應!"
 
 #: LYMessages.c:766
 msgid "CSO index"
-msgstr "CSO "
+msgstr "CSO 索引"
 
 #: LYMessages.c:767
 msgid ""
@@ -2416,7 +2416,7 @@ msgstr ""
 
 #: LYMessages.c:768
 msgid "CSO Search Results"
-msgstr "CSO jMG"
+msgstr "CSO 搜尋結果"
 
 #: LYMessages.c:769
 #, c-format
@@ -2429,7 +2429,7 @@ msgid ""
 "Press the 's' key and enter search keywords.\n"
 msgstr ""
 "\n"
-"ЫsÿJdzƷjMrC\n"
+"請按‘s’並輸入準備搜尋的關鍵字。\n"
 
 #: LYMessages.c:771
 msgid ""
@@ -2437,35 +2437,35 @@ msgid ""
 "This is a searchable Gopher index.\n"
 msgstr ""
 "\n"
-"oO@ӥiHijM Gopher ޡC\n"
+"這是一個可以進行搜尋的 Gopher 索引。\n"
 
 #: LYMessages.c:772
 msgid "Gopher index"
-msgstr "Gopher "
+msgstr "Gopher 索引"
 
 #: LYMessages.c:773
 msgid "Gopher Menu"
-msgstr "Gopher "
+msgstr "Gopher 選單"
 
 #: LYMessages.c:774
 msgid " Search Results"
-msgstr " jMG"
+msgstr " 搜尋結果"
 
 #: LYMessages.c:775
 msgid "Sending CSO/PH request."
-msgstr "beX CSO/PH nDC"
+msgstr "正在送出 CSO/PH 要求。"
 
 #: LYMessages.c:776
 msgid "Sending Gopher request."
-msgstr "beX Gopher nDC"
+msgstr "正在送出 Gopher 要求。"
 
 #: LYMessages.c:777
 msgid "CSO/PH request sent; waiting for response."
-msgstr "wiX CSO/PH nDFbݦ^C"
+msgstr "已進出 CSO/PH 要求;正在等待回應。"
 
 #: LYMessages.c:778
 msgid "Gopher request sent; waiting for response."
-msgstr "wiX Gopher nDFbݦ^C"
+msgstr "已進出 Gopher 要求;正在等待回應。"
 
 #: LYMessages.c:779
 msgid ""
@@ -2473,7 +2473,7 @@ msgid ""
 "Please enter search keywords.\n"
 msgstr ""
 "\n"
-"пJdzƷjMrC\n"
+"請輸入準備搜尋的關鍵字。\n"
 
 #: LYMessages.c:780
 msgid ""
@@ -2488,7 +2488,7 @@ msgstr ""
 #. HTNews.c
 #: LYMessages.c:784
 msgid "Connection closed ???"
-msgstr "suF???"
+msgstr "連線關閉了???"
 
 #: LYMessages.c:785
 msgid "Cannot open temporary file for news POST."
@@ -2517,7 +2517,7 @@ msgstr ""
 #. HTTP.c
 #: LYMessages.c:795
 msgid "Can't proceed without a username and password."
-msgstr "Lk~A]SbW٤αKXC"
+msgstr "無法繼續,因為沒有帳戶名稱及密碼。"
 
 #: LYMessages.c:796
 msgid "Can't retry with authorization!  Contact the server's WebMaster."
@@ -2529,17 +2529,17 @@ msgstr ""
 
 #: LYMessages.c:798
 msgid "Retrying with proxy authorization information."
-msgstr "HNzA{{ҸTsաC"
+msgstr "以代理伺服程式的認證資訊重新嘗試。"
 
 #: LYMessages.c:799
 #, fuzzy, c-format
 msgid "SSL error:%s-Continue?"
-msgstr "SSL ~GD(%s)ŦXҮ(%s)CO_~H"
+msgstr "SSL 錯誤:主機(%s)不符合證書(%s)。是否繼續?"
 
 #. HTWAIS.c
 #: LYMessages.c:802
 msgid "HTWAIS: Return message too large."
-msgstr "HTWAISG^ǪTLC"
+msgstr "HTWAIS:回傳的訊息過長。"
 
 #: LYMessages.c:803
 msgid "Enter WAIS query: "
@@ -2548,16 +2548,16 @@ msgstr ""
 #. Miscellaneous status
 #: LYMessages.c:806
 msgid "Retrying as HTTP0 request."
-msgstr "H HTTP0 榡աC"
+msgstr "以 HTTP0 格式重試。"
 
 #: LYMessages.c:807
 #, c-format
 msgid "Transferred %d bytes"
-msgstr "wǿ %d 줸"
+msgstr "已傳輸 %d 位元組"
 
 #: LYMessages.c:808
 msgid "Data transfer complete"
-msgstr "ƶǿw"
+msgstr "資料傳輸已完成"
 
 #: LYMessages.c:809
 #, c-format
@@ -2571,7 +2571,7 @@ msgstr ""
 
 #: LYMessages.c:813
 msgid "Bookmark file"
-msgstr ""
+msgstr "書籤檔"
 
 #: LYMessages.c:814
 msgid "Configuration Definitions"
@@ -2583,19 +2583,19 @@ msgstr ""
 
 #: LYMessages.c:816
 msgid "Current Key Map"
-msgstr "ثe]w"
+msgstr "目前的按鍵設定"
 
 #: LYMessages.c:817
 msgid "File Management Options"
-msgstr "ɮ׺޲zﶵ"
+msgstr "檔案管理選項"
 
 #: LYMessages.c:818
 msgid "Download Options"
-msgstr "Uﶵ"
+msgstr "下載選項"
 
 #: LYMessages.c:819
 msgid "History Page"
-msgstr "s"
+msgstr "瀏覽紀錄"
 
 #: LYMessages.c:820
 msgid "Cache Jar"
@@ -2603,11 +2603,11 @@ msgstr ""
 
 #: LYMessages.c:821
 msgid "List Page"
-msgstr "쵲M"
+msgstr "鏈結清單"
 
 #: LYMessages.c:822
 msgid "Lynx.cfg Information"
-msgstr "Lynx.cfg T"
+msgstr "Lynx.cfg 資訊"
 
 #: LYMessages.c:823
 msgid "Converted Mosaic Hotlist"
@@ -2615,27 +2615,27 @@ msgstr ""
 
 #: LYMessages.c:824
 msgid "Options Menu"
-msgstr "ﶵ]w"
+msgstr "選項設定"
 
 #: LYMessages.c:825
 msgid "File Permission Options"
-msgstr "ɮvﶵ"
+msgstr "檔案權限選項"
 
 #: LYMessages.c:826
 msgid "Printing Options"
-msgstr "CLﶵ"
+msgstr "列印選項"
 
 #: LYMessages.c:827
 msgid "Information about the current document"
-msgstr "ثe󪺸"
+msgstr "有關目前的文件的資料"
 
 #: LYMessages.c:828
 msgid "Your recent statusline messages"
-msgstr "AC̪X{T"
+msgstr "狀態列最近出現的訊息"
 
 #: LYMessages.c:829
 msgid "Upload Options"
-msgstr "Wǿﶵ"
+msgstr "上傳選項"
 
 #: LYMessages.c:830
 msgid "Visited Links Page"
@@ -2656,24 +2656,24 @@ msgstr ""
 
 #: LYMessages.c:836
 msgid "compile time options"
-msgstr "sĶﶵ"
+msgstr "編譯選項"
 
 #: LYMessages.c:837
 #, fuzzy
 msgid "color-style configuration"
-msgstr "DnպA"
+msgstr "主要組態"
 
 #: LYMessages.c:838
 msgid "latest release"
-msgstr "̷s"
+msgstr "最新版本"
 
 #: LYMessages.c:839
 msgid "pre-release version"
-msgstr "w"
+msgstr "預覽版本"
 
 #: LYMessages.c:840
 msgid "development version"
-msgstr "}o"
+msgstr "開發中版本"
 
 #. #define AUTOCONF_CONFIG_CACHE
 #: LYMessages.c:842
@@ -2693,11 +2693,11 @@ msgstr ""
 #. #define DIRED_NOVICELINE
 #: LYMessages.c:851
 msgid "  C)reate  D)ownload  E)dit  F)ull menu  M)odify  R)emove  T)ag  U)pload     \n"
-msgstr "  C)إ  D)U  E)s  F)  M)ק  R)  T)аO  U)W\n"
+msgstr "  C)建立  D)下載  E)編輯  F)完整選單  M)修改  R)移除  T)標記  U)上傳\n"
 
 #: LYMessages.c:852
 msgid "Failed to obtain status of current link!"
-msgstr "Lkثe쵲AI"
+msgstr "無法獲取目前的鏈結的狀態!"
 
 #. #define INVALID_PERMIT_URL
 #: LYMessages.c:855
@@ -2715,11 +2715,11 @@ msgstr ""
 
 #: LYMessages.c:864
 msgid "Linewrap OFF!"
-msgstr "w۰ʴ\I"
+msgstr "已關閉自動換行功能!"
 
 #: LYMessages.c:865
 msgid "Linewrap ON!"
-msgstr "w}Ҧ۰ʴ\I"
+msgstr "已開啟自動換行功能!"
 
 #: LYMessages.c:866
 msgid "Parsing nested-tables toggled OFF!  Reloading..."
@@ -2758,15 +2758,15 @@ msgstr ""
 #: WWW/Library/Implementation/HTAABrow.c:1079
 #, c-format
 msgid "Invalid header '%s%s%s%s%s'"
-msgstr "LĪYe%s%s%s%s%s"
+msgstr "無效的標頭內容‘%s%s%s%s%s’"
 
 #: WWW/Library/Implementation/HTAABrow.c:1181
 msgid "Proxy authorization required -- retrying"
-msgstr "ϥΥNzAeݭn{ w s"
+msgstr "使用代理伺服器前需要認證 ─ 重新嘗試"
 
 #: WWW/Library/Implementation/HTAABrow.c:1239
 msgid "Access without authorization denied -- retrying"
-msgstr "{ҡALkse w s"
+msgstr "仍未認證,無法存取內容 ─ 重新嘗試"
 
 #: WWW/Library/Implementation/HTAccess.c:688
 msgid "Access forbidden by rule"
@@ -2782,7 +2782,7 @@ msgstr ""
 
 #: WWW/Library/Implementation/HTAccess.c:1047 src/GridText.c:8546
 msgid "Loading incomplete."
-msgstr "JeC"
+msgstr "未完成載入內容。"
 
 #: WWW/Library/Implementation/HTAccess.c:1078
 #, c-format
@@ -2792,12 +2792,12 @@ msgstr ""
 #: WWW/Library/Implementation/HTAccess.c:1080
 #, c-format
 msgid "**** HTAccess: Internal software error.  Please mail lynx-dev@nongnu.org!\n"
-msgstr "**** HTAccessG{~CбHql lynx-dev@nongnu.orgI\n"
+msgstr "**** HTAccess:內部程式錯誤。請寄電郵至 lynx-dev@nongnu.org!\n"
 
 #: WWW/Library/Implementation/HTAccess.c:1081
 #, c-format
 msgid "**** HTAccess: Status returned was: %d\n"
-msgstr "**** HTAccessG^ǪAG%d\n"
+msgstr "**** HTAccess:回傳的狀態為:%d\n"
 
 #.
 #. * hack: if we fail in HTAccess.c
@@ -2805,20 +2805,20 @@ msgstr "**** HTAccessG^ǪAG%d\n"
 #.
 #: WWW/Library/Implementation/HTAccess.c:1087 src/LYMainLoop.c:7779
 msgid "Can't Access"
-msgstr "Lks"
+msgstr "無法存取"
 
 #: WWW/Library/Implementation/HTAccess.c:1095
 msgid "Unable to access document."
-msgstr "LksC"
+msgstr "無法存取文件。"
 
 #: WWW/Library/Implementation/HTFTP.c:843
 #, c-format
 msgid "Enter password for user %s@%s:"
-msgstr "пJϥΪ %s@%s KXG"
+msgstr "請輸入使用者 %s@%s 的密碼:"
 
 #: WWW/Library/Implementation/HTFTP.c:871
 msgid "Unable to connect to FTP host."
-msgstr "Lkp FTP DC"
+msgstr "無法聯絡 FTP 主機。"
 
 #: WWW/Library/Implementation/HTFTP.c:1152
 msgid "close master socket"
@@ -2834,16 +2834,16 @@ msgstr ""
 #.
 #: WWW/Library/Implementation/HTFTP.c:1733 WWW/Library/Implementation/HTFTP.c:2350
 msgid "Symbolic Link"
-msgstr "Ÿs"
+msgstr "符號連結"
 
 #: WWW/Library/Implementation/HTFTP.c:2707
 msgid "Receiving FTP directory."
-msgstr "b FTP ؿeC"
+msgstr "正在接收 FTP 目錄內容。"
 
 #: WWW/Library/Implementation/HTFTP.c:2843
 #, c-format
 msgid "Transferred %d bytes (%5d)"
-msgstr "wǰe %d 줸 (%5d)"
+msgstr "已傳送 %d 位元組 (%5d)"
 
 #: WWW/Library/Implementation/HTFTP.c:3194
 msgid "connect for data"
@@ -2851,11 +2851,11 @@ msgstr ""
 
 #: WWW/Library/Implementation/HTFTP.c:3855
 msgid "Receiving FTP file."
-msgstr "b FTP ؿC"
+msgstr "正在接收 FTP 目錄。"
 
 #: WWW/Library/Implementation/HTFinger.c:273
 msgid "Could not set up finger connection."
-msgstr "Lkإ finger suC"
+msgstr "無法建立 finger 連線。"
 
 #: WWW/Library/Implementation/HTFinger.c:320
 msgid "Could not load data (no sitename in finger URL)"
@@ -2863,37 +2863,37 @@ msgstr ""
 
 #: WWW/Library/Implementation/HTFinger.c:326
 msgid "Invalid port number - will only use port 79!"
-msgstr "LĪs𸹽X w u|ϥγs 79I"
+msgstr "無效的連接埠號碼 ─ 只會使用連接埠號 79!"
 
 #: WWW/Library/Implementation/HTFinger.c:392
 msgid "Could not access finger host."
-msgstr "Lks finger DWơC"
+msgstr "無法存取 finger 主機上的資料。"
 
 #: WWW/Library/Implementation/HTFinger.c:400
 msgid "No response from finger server."
-msgstr "finger AS^C"
+msgstr "finger 伺服器沒有回應。"
 
 #: WWW/Library/Implementation/HTNews.c:426
 #, c-format
 msgid "Username for news host '%s':"
-msgstr "sDեD%sbW١G"
+msgstr "新聞組主機‘%s’的帳戶名稱:"
 
 #: WWW/Library/Implementation/HTNews.c:479
 msgid "Change username?"
-msgstr "O_bW١H"
+msgstr "是否更改帳戶名稱?"
 
 #: WWW/Library/Implementation/HTNews.c:483
 msgid "Username:"
-msgstr "bW١G"
+msgstr "帳戶名稱:"
 
 #: WWW/Library/Implementation/HTNews.c:508
 #, c-format
 msgid "Password for news host '%s':"
-msgstr "sDեD%sKXG"
+msgstr "新聞組主機‘%s’的密碼:"
 
 #: WWW/Library/Implementation/HTNews.c:591
 msgid "Change password?"
-msgstr "O_KXH"
+msgstr "是否更改密碼?"
 
 #: WWW/Library/Implementation/HTNews.c:1711
 #, c-format
@@ -2906,7 +2906,7 @@ msgid ""
 "No articles in this group.\n"
 msgstr ""
 "\n"
-"sDըS峹C\n"
+"此新聞組沒有任何文章。\n"
 
 #: WWW/Library/Implementation/HTNews.c:1773
 msgid ""
@@ -2948,7 +2948,7 @@ msgstr ""
 
 #: WWW/Library/Implementation/HTNews.c:2342
 msgid "This client does not contain support for SNEWS URLs."
-msgstr "{䴩 SNEWS URLC"
+msgstr "此版本的程式不支援 SNEWS URL。"
 
 #: WWW/Library/Implementation/HTNews.c:2550
 msgid "No target for raw text!"
@@ -2956,17 +2956,17 @@ msgstr ""
 
 #: WWW/Library/Implementation/HTNews.c:2581
 msgid "Connecting to NewsHost ..."
-msgstr "bpsDեD ..."
+msgstr "正在聯絡新聞組主機 ..."
 
 #: WWW/Library/Implementation/HTNews.c:2633
 #, c-format
 msgid "Could not access %s."
-msgstr "Lks %sC"
+msgstr "無法存取 %s。"
 
 #: WWW/Library/Implementation/HTNews.c:2739
 #, c-format
 msgid "Can't read news info.  News host %.20s responded: %.200s"
-msgstr "LkŪsDոTCsDզA %.20s ^G%.200s"
+msgstr "無法讀取新聞組資訊。新聞組伺服器 %.20s 回應:%.200s"
 
 #: WWW/Library/Implementation/HTNews.c:2743
 #, c-format
@@ -2982,7 +2982,7 @@ msgstr ""
 
 #: WWW/Library/Implementation/HTNews.c:2968
 msgid "Reading list of articles in newsgroup."
-msgstr "bŪsDդ峹MC"
+msgstr "正在讀取新聞組中的文章清單。"
 
 #.
 #. * Get an article from a news group.  - FM
@@ -2997,16 +2997,16 @@ msgstr ""
 
 #: WWW/Library/Implementation/HTTCP.c:1282
 msgid "Address has invalid port"
-msgstr "a}sL"
+msgstr "地址中的連接埠無效"
 
 #: WWW/Library/Implementation/HTTCP.c:1358
 msgid "Address length looks invalid"
-msgstr "a}צGL"
+msgstr "地址長度似乎無效"
 
 #: WWW/Library/Implementation/HTTCP.c:1618 WWW/Library/Implementation/HTTCP.c:1636
 #, c-format
 msgid "Unable to locate remote host %s."
-msgstr "䤣컷ݥD %sC"
+msgstr "找不到遠端主機 %s。"
 
 #. Not HTProgress, so warning won't be overwritten immediately;
 #. * but not HTAlert, because typically there will be other
@@ -3015,12 +3015,12 @@ msgstr "䤣컷ݥD %sC"
 #: WWW/Library/Implementation/HTTCP.c:1633 WWW/Library/Implementation/HTTelnet.c:115
 #, c-format
 msgid "Invalid hostname %s"
-msgstr "LĪDW %s"
+msgstr "無效的主機名稱 %s"
 
 #: WWW/Library/Implementation/HTTCP.c:1647
 #, c-format
 msgid "Making %s connection to %s"
-msgstr "bإ %s suAs %s"
+msgstr "正在建立 %s 連線,連至 %s"
 
 #: WWW/Library/Implementation/HTTCP.c:1658
 msgid "socket failed."
@@ -3037,7 +3037,7 @@ msgstr ""
 
 #: WWW/Library/Implementation/HTTCP.c:1763
 msgid "Connection failed (too many retries)."
-msgstr "su (զƤӦh)C"
+msgstr "連線失敗 (重試次數太多)。"
 
 #: WWW/Library/Implementation/HTTCP.c:1950
 msgid "Could not restore socket to blocking."
@@ -3046,7 +3046,7 @@ msgstr ""
 #: WWW/Library/Implementation/HTTCP.c:2016
 #, fuzzy
 msgid "Socket read failed (too many tries)."
-msgstr "su (զƤӦh)C"
+msgstr "連線失敗 (重試次數太多)。"
 
 #: WWW/Library/Implementation/HTTP.c:84
 #, c-format
@@ -3056,7 +3056,7 @@ msgstr ""
 #: WWW/Library/Implementation/HTTP.c:406
 #, c-format
 msgid "Address contains a username: %s"
-msgstr "atbW١G%s"
+msgstr "地止中含有帳戶名稱:%s"
 
 #: WWW/Library/Implementation/HTTP.c:460
 #, c-format
@@ -3065,15 +3065,15 @@ msgstr ""
 
 #: WWW/Library/Implementation/HTTP.c:620
 msgid "This client does not contain support for HTTPS URLs."
-msgstr "s䴩 HTTPS URLC"
+msgstr "此瀏覽器不支援 HTTPS URL。"
 
 #: WWW/Library/Implementation/HTTP.c:645
 msgid "Unable to connect to remote host."
-msgstr "LkpݥDC"
+msgstr "無法聯絡遠端主機。"
 
 #: WWW/Library/Implementation/HTTP.c:669
 msgid "Retrying connection without TLS."
-msgstr "եH TLS 覡suC"
+msgstr "嘗試以不用 TLS 的方式連線。"
 
 #: WWW/Library/Implementation/HTTP.c:714
 msgid "no issuer was found"
@@ -3090,7 +3090,7 @@ msgstr ""
 #: WWW/Library/Implementation/HTTP.c:720
 #, fuzzy
 msgid "the certificate has been revoked"
-msgstr " cookie wgQRFI"
+msgstr "該 cookie 已經被刪除了!"
 
 #: WWW/Library/Implementation/HTTP.c:722
 msgid "the certificate is not trusted"
@@ -3113,7 +3113,7 @@ msgstr ""
 #: WWW/Library/Implementation/HTTP.c:934
 #, c-format
 msgid "SSL error:host(%s)!=cert(%s)-Continue?"
-msgstr "SSL ~GD(%s)ŦXҮ(%s)CO_~H"
+msgstr "SSL 錯誤:主機(%s)不符合證書(%s)。是否繼續?"
 
 #: WWW/Library/Implementation/HTTP.c:947
 #, c-format
@@ -3123,11 +3123,11 @@ msgstr ""
 #: WWW/Library/Implementation/HTTP.c:956
 #, c-format
 msgid "Secure %d-bit %s (%s) HTTP connection"
-msgstr "%d 줸 %s (%s) w HTTP su"
+msgstr "%d 位元 %s (%s) 安全 HTTP 連線"
 
 #: WWW/Library/Implementation/HTTP.c:1426
 msgid "Sending HTTP request."
-msgstr "beX HTTP nDC"
+msgstr "正在送出 HTTP 要求。"
 
 #: WWW/Library/Implementation/HTTP.c:1465
 msgid "Unexpected network write error; connection aborted."
@@ -3135,7 +3135,7 @@ msgstr ""
 
 #: WWW/Library/Implementation/HTTP.c:1471
 msgid "HTTP request sent; waiting for response."
-msgstr "wiX HTTP nDFbݦ^C"
+msgstr "已進出 HTTP 要求;正在等待回應。"
 
 #: WWW/Library/Implementation/HTTP.c:1539
 msgid "Unexpected network read error; connection aborted."
@@ -3172,7 +3172,7 @@ msgstr ""
 #.
 #: WWW/Library/Implementation/HTTP.c:1884
 msgid "Got unexpected 304 Not Modified status."
-msgstr "X{wƤ~ 304 Not Modified AC"
+msgstr "出現預料之外的 304 Not Modified 狀態。"
 
 #: WWW/Library/Implementation/HTTP.c:1947
 msgid "Redirection of POST content requires user approval."
@@ -3188,11 +3188,11 @@ msgstr ""
 
 #: WWW/Library/Implementation/HTTP.c:2016
 msgid "Show the 401 message body?"
-msgstr "O_ 401 ~TeH"
+msgstr "是否顯示 401 錯誤訊息的網頁內容?"
 
 #: WWW/Library/Implementation/HTTP.c:2059
 msgid "Show the 407 message body?"
-msgstr "O_ 407 ~TeH"
+msgstr "是否顯示 407 錯誤訊息的網頁內容?"
 
 #.
 #. * Bad or unknown server_status number.  Take a chance and hope
@@ -3200,7 +3200,7 @@ msgstr "O_ 407 ~TeH"
 #.
 #: WWW/Library/Implementation/HTTP.c:2159
 msgid "Unknown status reply from server!"
-msgstr "AoXA^TI"
+msgstr "伺服器發出不明的狀態回應訊息!"
 
 #: WWW/Library/Implementation/HTTelnet.c:113
 #, c-format
@@ -3209,11 +3209,11 @@ msgstr ""
 
 #: WWW/Library/Implementation/HTWAIS.c:162
 msgid "Could not connect to WAIS server."
-msgstr "Lkp WAIS AC"
+msgstr "無法聯絡 WAIS 伺服器。"
 
 #: WWW/Library/Implementation/HTWAIS.c:170
 msgid "Could not open WAIS connection for reading."
-msgstr "Lk} WAIS suŪơC"
+msgstr "無法開啟 WAIS 連線來讀取資料。"
 
 #: WWW/Library/Implementation/HTWAIS.c:192
 msgid "Diagnostic code is "
@@ -3274,15 +3274,15 @@ msgstr ""
 
 #: WWW/Library/Implementation/HTWAIS.c:696
 msgid "Syntax error in WAIS URL"
-msgstr "WAIS URL X{yk~"
+msgstr "WAIS URL 中出現語法錯誤"
 
 #: WWW/Library/Implementation/HTWAIS.c:768
 msgid " (WAIS Index)"
-msgstr " (WAIS )"
+msgstr " (WAIS 索引)"
 
 #: WWW/Library/Implementation/HTWAIS.c:775
 msgid "WAIS Index: "
-msgstr "WAIS ޡG"
+msgstr "WAIS 索引:"
 
 #: WWW/Library/Implementation/HTWAIS.c:781
 msgid "This is a link for searching the "
@@ -3290,7 +3290,7 @@ msgstr ""
 
 #: WWW/Library/Implementation/HTWAIS.c:785
 msgid " WAIS Index.\n"
-msgstr " WAIS ޡC\n"
+msgstr " WAIS 索引。\n"
 
 #: WWW/Library/Implementation/HTWAIS.c:814
 msgid ""
@@ -3316,7 +3316,7 @@ msgstr ""
 
 #: WWW/Library/Implementation/HTWAIS.c:873
 msgid "Searching WAIS database..."
-msgstr "bjM WAIS Ʈw..."
+msgstr "正在搜尋 WAIS 資料庫..."
 
 #: WWW/Library/Implementation/HTWAIS.c:883
 msgid "Search interrupted."
@@ -3370,35 +3370,35 @@ msgstr ""
 
 #: WWW/Library/Implementation/HTWSRC.c:375
 msgid "Maintainer"
-msgstr "@"
+msgstr "維護者"
 
 #: WWW/Library/Implementation/HTWSRC.c:383
 msgid "Host"
-msgstr "D"
+msgstr "主機"
 
 #: src/GridText.c:705
 msgid "Memory exhausted, display interrupted!"
-msgstr "OӺɡA_ܡI"
+msgstr "記憶體耗盡,必須中斷顯示!"
 
 #: src/GridText.c:710
 msgid "Memory exhausted, will interrupt transfer!"
-msgstr "OӺɡA_ǿI"
+msgstr "記憶體耗盡,必須中斷傳輸!"
 
 #: src/GridText.c:3654
 msgid " *** MEMORY EXHAUSTED ***"
-msgstr "*** OӺ ***"
+msgstr "*** 記憶體耗盡 ***"
 
 #: src/GridText.c:6089 src/GridText.c:6096 src/LYList.c:239
 msgid "unknown field or link"
-msgstr "쵲"
+msgstr "不明的欄位或鏈結"
 
 #: src/GridText.c:6105
 msgid "text entry field"
-msgstr "rJ"
+msgstr "文字輸入欄位"
 
 #: src/GridText.c:6108
 msgid "password entry field"
-msgstr "KXJ"
+msgstr "密碼輸入欄位"
 
 #: src/GridText.c:6111
 msgid "checkbox"
@@ -3426,7 +3426,7 @@ msgstr ""
 
 #: src/GridText.c:6129
 msgid "text entry area"
-msgstr "rJϰ"
+msgstr "文字輸入區域"
 
 #: src/GridText.c:6132
 msgid "range entry field"
@@ -3434,7 +3434,7 @@ msgstr ""
 
 #: src/GridText.c:6135
 msgid "file entry field"
-msgstr "ɮצWٿJ"
+msgstr "檔案名稱輸入欄位"
 
 #: src/GridText.c:6138
 msgid "text-submit field"
@@ -3454,7 +3454,7 @@ msgstr ""
 
 #: src/GridText.c:10279
 msgid "Can't open file for uploading"
-msgstr "Lk}ҷdzƤWǪɮ"
+msgstr "無法開啟準備上傳的檔案"
 
 #: src/GridText.c:11438
 #, c-format
@@ -3469,7 +3469,7 @@ msgstr ""
 #. don't show previous state
 #: src/GridText.c:12628
 msgid "Wrap lines to fit displayed area?"
-msgstr "O_i۰ʴӲŦXeؤoH"
+msgstr "是否進行自動換行來符合畫面尺寸?"
 
 #: src/GridText.c:12680
 msgid "Very long lines have been wrapped!"
@@ -3481,7 +3481,7 @@ msgstr ""
 
 #: src/HTAlert.c:164 src/LYShowInfo.c:360 src/LYShowInfo.c:364
 msgid "bytes"
-msgstr "줸"
+msgstr "位元組"
 
 #.
 #. * If we know the total size of the file, we can compute
@@ -3490,31 +3490,31 @@ msgstr "줸"
 #: src/HTAlert.c:300 src/HTAlert.c:324
 #, c-format
 msgid "Read %s of data"
-msgstr "wŪ %s "
+msgstr "已讀取 %s 資料"
 
 #: src/HTAlert.c:321
 #, c-format
 msgid "Read %s of %s of data"
-msgstr "wŪ %s (` %s) "
+msgstr "已讀取 %s (總數 %s) 資料"
 
 #: src/HTAlert.c:330
 #, c-format
 msgid ", %s/sec"
-msgstr "AC %s"
+msgstr ",每秒 %s"
 
 #: src/HTAlert.c:342
 #, c-format
 msgid " (stalled for %s)"
-msgstr " (F %s)"
+msgstr " (停止了 %s)"
 
 #: src/HTAlert.c:346
 #, c-format
 msgid ", ETA %s"
-msgstr "Ap %s ᧹"
+msgstr ",估計 %s 後完成"
 
 #: src/HTAlert.c:368
 msgid " (Press 'z' to abort)"
-msgstr " (Ыz)"
+msgstr " (請按‘z’中止)"
 
 #. Meta-note: don't move the following note from its place right
 #. in front of the first gettext().  As it is now, it should
@@ -3571,19 +3571,19 @@ msgstr ""
 
 #: src/HTML.c:5911
 msgid "Description:"
-msgstr "yzG"
+msgstr "描述:"
 
 #: src/HTML.c:5916
 msgid "(none)"
-msgstr "(L)"
+msgstr "(無)"
 
 #: src/HTML.c:5920
 msgid "Filepath:"
-msgstr "ɮ׸|G"
+msgstr "檔案路徑:"
 
 #: src/HTML.c:5926
 msgid "(unknown)"
-msgstr "()"
+msgstr "(不明)"
 
 #: src/HTML.c:7353
 msgid "Document has only hidden links.  Use the 'l'ist command."
@@ -3611,7 +3611,7 @@ msgid ""
 "     You can delete links by the 'R' key<br>\n"
 "<ol>\n"
 msgstr ""
-"     iHΡRR쵲<br>\n"
+"     可以用‘R’鍵刪除鏈結<br>\n"
 "<ol>\n"
 
 #: src/LYBookmark.c:374
@@ -3620,16 +3620,16 @@ msgid ""
 "     the 'R' key but may have been remapped by you or your system\n"
 "     administrator."
 msgstr ""
-"     դUiHϥβҪOӧR쵲Cq`OΡRAդUκ޲z]\n"
-"     i|Nswq䥦C"
+"     閣下可以使用移除書籤的指令來刪除鏈結。通常是用‘R’鍵,但閣下或管理員也\n"
+"     有可能會將之重新定義為其它按鍵。"
 
 #: src/LYBookmark.c:378
 msgid ""
 "     This file also may be edited with a standard text editor to delete\n"
 "     outdated or invalid links, or to change their order."
 msgstr ""
-"     ɮפ]iHϥΤ@몺rs边sARLɩεLĪ쵲AΧ\n"
-"     ̪ǡC"
+"     此檔案也可以使用一般的文字編輯器編輯,刪除過時或無效的鏈結,或更改\n"
+"     它們的次序。"
 
 #: src/LYBookmark.c:381
 msgid ""
@@ -3655,11 +3655,11 @@ msgstr ""
 #.
 #: src/LYCgi.c:276
 msgid "Unable to access cgi script"
-msgstr "Lks cgi scriptC"
+msgstr "無法存取 cgi script。"
 
 #: src/LYCgi.c:701 src/LYCgi.c:704
 msgid "Good Advice"
-msgstr "ij"
+msgstr "建議"
 
 #: src/LYCgi.c:708
 msgid "An excellent http server for VMS is available via"
@@ -3675,7 +3675,7 @@ msgstr ""
 
 #: src/LYClean.c:122
 msgid "Exiting via interrupt:"
-msgstr "]HU_T}{G"
+msgstr "因以下的中斷訊號而離開程式:"
 
 #: src/LYCookie.c:2461
 msgid "(from a previous session)"
@@ -3687,35 +3687,35 @@ msgstr ""
 
 #: src/LYCookie.c:2562
 msgid "Internal"
-msgstr ""
+msgstr "內部"
 
 #: src/LYCookie.c:2563
 msgid "cookie_domain_flag_set error, aborting program"
-msgstr "cookie_domain_flag_set ~A{"
+msgstr "cookie_domain_flag_set 錯誤,中止程式"
 
 #: src/LYCurses.c:1088
 msgid "Terminal initialisation failed - unknown terminal type?"
-msgstr "LklƲ׺ݾ w ׺ݾԡH"
+msgstr "無法初始化終端機 ─ 終端機類型不詳?"
 
 #: src/LYCurses.c:1546
 msgid "Terminal ="
-msgstr "׺ݾ ="
+msgstr "終端機類型 ="
 
 #: src/LYCurses.c:1550
 msgid "You must use a vt100, 200, etc. terminal with this program."
-msgstr "ϥΥ{ɲ׺ݾO vt100B200 C"
+msgstr "使用本程式時終端機的類型必須是 vt100、200 等等。"
 
 #: src/LYCurses.c:1599
 msgid "Your Terminal type is unknown!"
-msgstr "׺ݾI"
+msgstr "終端機類型不明!"
 
 #: src/LYCurses.c:1600
 msgid "Enter a terminal type:"
-msgstr "пJ׺ݾG"
+msgstr "請輸入終端機類型:"
 
 #: src/LYCurses.c:1614
 msgid "TERMINAL TYPE IS SET TO"
-msgstr "׺ݾw]w"
+msgstr "終端機類型已設定為"
 
 #: src/LYCurses.c:2127
 #, c-format
@@ -3724,7 +3724,7 @@ msgid ""
 "A Fatal error has occurred in %s Ver. %s\n"
 msgstr ""
 "\n"
-"b %s  %s X{Y~\n"
+"在 %s 版本 %s 出現嚴重錯誤\n"
 
 #: src/LYCurses.c:2130
 #, c-format
@@ -3737,10 +3737,10 @@ msgid ""
 "TRACEBACK if it can be captured, and any other relevant information.\n"
 msgstr ""
 "\n"
-"гqtκ޲zT{{O_X{~ApG׬O֩wAбNi\n"
-"H lynx-dev ql׾¡C~iӪWޭPDX{O/\n"
-"URL ǽTyzB@~tΤΨ䪩BTCPIP B~lܬ (pG\n"
-"iH)AΨ䥦TC\n"
+"請通知系統管理員確認程式是否出現錯誤,如果答案是肯定的,請將報告\n"
+"寄給 lynx-dev 電郵論壇。錯誤報告中應該附上引致問題出現的指令及/或\n"
+"URL 的準確描述、作業系統及其版本、TCPIP 版本、錯誤的追蹤紀錄 (如果\n"
+"可以獲取的話),及其它相關資訊。\n"
 
 #: src/LYEdit.c:266
 #, c-format
@@ -3749,53 +3749,53 @@ msgstr ""
 
 #: src/LYEdit.c:269
 msgid "Editor killed by signal"
-msgstr "s边]TӤ"
+msgstr "編輯器因訊號而中止"
 
 #: src/LYEdit.c:274
 #, fuzzy, c-format
 msgid "Editor returned with error status %s"
-msgstr "s边^ǿ~AA%s"
+msgstr "編輯器的回傳錯誤狀態,%s"
 
 #: src/LYDownload.c:504
 msgid "Downloaded link:"
-msgstr "wU쵲G"
+msgstr "已下載的鏈結:"
 
 #: src/LYDownload.c:509
 msgid "Suggested file name:"
-msgstr "ijɮצW١G"
+msgstr "建議的檔案名稱:"
 
 #: src/LYDownload.c:514
 msgid "Standard download options:"
-msgstr "зǪUBz覡G"
+msgstr "標準的下載處理方式:"
 
 #: src/LYDownload.c:515
 msgid "Download options:"
-msgstr "UﶵG"
+msgstr "下載選項:"
 
 #: src/LYDownload.c:531
 msgid "Save to disk"
-msgstr "xsܺϺ"
+msgstr "儲存至磁碟"
 
 #: src/LYDownload.c:545
 #, fuzzy
 msgid "View temporary file"
-msgstr "Lk}ҼȦsɡI"
+msgstr "無法開啟暫存檔!"
 
 #: src/LYDownload.c:552
 msgid "Save to disk disabled."
-msgstr "TNexsܺϺСC"
+msgstr "禁止將內容儲存至磁碟。"
 
 #: src/LYDownload.c:556 src/LYPrint.c:1310
 msgid "Local additions:"
-msgstr "B~Bz覡G"
+msgstr "額外的處理方式:"
 
 #: src/LYDownload.c:567 src/LYUpload.c:211
 msgid "No Name Given"
-msgstr "wW"
+msgstr "未指定名稱"
 
 #: src/LYHistory.c:672
 msgid "You selected:"
-msgstr "пܡG"
+msgstr "請選擇:"
 
 #: src/LYHistory.c:696 src/LYHistory.c:925
 msgid "(no address)"
@@ -3831,15 +3831,15 @@ msgstr ""
 
 #: src/LYLeaks.c:225 src/LYLeaks.c:263
 msgid "Pointer:"
-msgstr "PointerG"
+msgstr "Pointer:"
 
 #: src/LYLeaks.c:234 src/LYLeaks.c:241 src/LYLeaks.c:282
 msgid "FileName:"
-msgstr "ɮצW١G"
+msgstr "檔案名稱:"
 
 #: src/LYLeaks.c:237 src/LYLeaks.c:244 src/LYLeaks.c:285 src/LYLeaks.c:296
 msgid "LineCount:"
-msgstr "ơG"
+msgstr "行數:"
 
 #: src/LYLeaks.c:258
 msgid "Memory leak detected."
@@ -3879,19 +3879,19 @@ msgstr ""
 
 #: src/LYList.c:84
 msgid "References in "
-msgstr "HU쵲ݩG"
+msgstr "以下的鏈結屬於網頁:"
 
 #: src/LYList.c:87
 msgid "this document:"
-msgstr "(a})"
+msgstr "(地址不明)"
 
 #: src/LYList.c:93
 msgid "Visible links:"
-msgstr "ê쵲G"
+msgstr "不隱藏的鏈結:"
 
 #: src/LYList.c:194 src/LYList.c:295
 msgid "Hidden links:"
-msgstr "ê쵲G"
+msgstr "隱藏的鏈結:"
 
 #: src/LYList.c:332
 msgid "References"
@@ -3899,31 +3899,31 @@ msgstr ""
 
 #: src/LYList.c:336
 msgid "Visible links"
-msgstr "ê쵲"
+msgstr "不隱藏的鏈結"
 
 #: src/LYLocal.c:271
 #, c-format
 msgid "Unable to get status of '%s'."
-msgstr "Lk%sAC"
+msgstr "無法獲取‘%s’的狀態。"
 
 #: src/LYLocal.c:305
 msgid "The selected item is not a file or a directory!  Request ignored."
-msgstr "ؤOɮשΥؿIӭnDC"
+msgstr "選取的項目不是檔案或目錄!忽略該要求。"
 
 #: src/LYLocal.c:373
 #, c-format
 msgid "Unable to %s due to system error!"
-msgstr "]tο~ӵLk%sI"
+msgstr "因為系統錯誤而無法%s!"
 
 #: src/LYLocal.c:407
 #, c-format
 msgid "Probable failure to %s due to system error!"
-msgstr "i]tο~ӵLk%sI"
+msgstr "可能因為系統錯誤而無法%s!"
 
 #: src/LYLocal.c:469 src/LYLocal.c:490
 #, c-format
 msgid "remove %s"
-msgstr " %s"
+msgstr "移除 %s"
 
 #: src/LYLocal.c:508
 #, c-format
@@ -3933,63 +3933,63 @@ msgstr ""
 #: src/LYLocal.c:536
 #, c-format
 msgid "move %s to %s"
-msgstr "N %s ʦ %s"
+msgstr "將 %s 移動至 %s"
 
 #: src/LYLocal.c:577
 msgid "There is already a directory with that name!  Request ignored."
-msgstr "P@W٪ؿwgsbIӭnDC"
+msgstr "同一名稱的目錄已經存在!忽略該要求。"
 
 #: src/LYLocal.c:579
 msgid "There is already a file with that name!  Request ignored."
-msgstr "P@W٪ɮפwgsbIӭnDC"
+msgstr "同一名稱的檔案已經存在!忽略該要求。"
 
 #: src/LYLocal.c:581
 msgid "The specified name is already in use!  Request ignored."
-msgstr "wɮפwbϥΤIӭnDC"
+msgstr "指定的檔案已在使用中!忽略該要求。"
 
 #: src/LYLocal.c:592
 msgid "Destination has different owner!  Request denied."
-msgstr "تa֦̤PIڵӭnDC"
+msgstr "目的地的擁有者不同!拒絕該要求。"
 
 #: src/LYLocal.c:595
 msgid "Destination is not a valid directory!  Request denied."
-msgstr "تaOĪؿIڵӭnDC"
+msgstr "目的地不是有效的目錄!拒絕該要求。"
 
 #: src/LYLocal.c:617
 msgid "Remove all tagged files and directories?"
-msgstr "TwҦ[WаOɮפΥؿH"
+msgstr "確定移除所有加上標記的檔案及目錄?"
 
 #: src/LYLocal.c:675
 msgid "Enter new location for tagged items: "
-msgstr "J[WаOتsmG"
+msgstr "輸入加上標記的項目的新位置:"
 
 #: src/LYLocal.c:745
 msgid "Path too long"
-msgstr "|L"
+msgstr "路徑過長"
 
 #: src/LYLocal.c:776
 msgid "Source and destination are the same location - request ignored!"
-msgstr "ӷΥتamۦP w ӭnDI"
+msgstr "來源及目的地位置相同 ─ 忽略該要求!"
 
 #: src/LYLocal.c:833
 msgid "Enter new name for directory: "
-msgstr "JؿsW١G"
+msgstr "輸入目錄的新名稱:"
 
 #: src/LYLocal.c:835
 msgid "Enter new name for file: "
-msgstr "JɮתsW١G"
+msgstr "輸入檔案的新名稱:"
 
 #: src/LYLocal.c:847
 msgid "Illegal character (path-separator) found! Request ignored."
-msgstr "X{Xkr (|jr)IӭnDC"
+msgstr "出現不合法的字元 (路徑分隔字元)!忽略該要求。"
 
 #: src/LYLocal.c:897
 msgid "Enter new location for directory: "
-msgstr "JؿsmG"
+msgstr "輸入目錄的新位置:"
 
 #: src/LYLocal.c:903
 msgid "Enter new location for file: "
-msgstr "JɮתsmG"
+msgstr "輸入檔案的新位置:"
 
 #: src/LYLocal.c:930
 msgid "Unexpected failure - unable to find trailing path separator"
@@ -3997,66 +3997,66 @@ msgstr ""
 
 #: src/LYLocal.c:950
 msgid "Source and destination are the same location!  Request ignored!"
-msgstr "ӷΥتamۦPIӭnDI"
+msgstr "來源及目的地位置相同!忽略該要求!"
 
 #: src/LYLocal.c:997
 msgid "Modify name, location, or permission (n, l, or p): "
-msgstr "קW١Bmv (nBl  p)G"
+msgstr "修改名稱、位置或權限 (n、l 或 p):"
 
 #: src/LYLocal.c:999
 msgid "Modify name or location (n or l): "
-msgstr "קW٩Φm (n  l)G"
+msgstr "修改名稱或位置 (n 或 l):"
 
 #.
 #. * Code for changing ownership needed here.
 #.
 #: src/LYLocal.c:1028
 msgid "This feature not yet implemented!"
-msgstr "\ऴI"
+msgstr "此功能仍未完成!"
 
 #: src/LYLocal.c:1048
 msgid "Enter name of file to create: "
-msgstr "JdzƫإߪɮצW١G"
+msgstr "輸入準備建立的檔案名稱:"
 
 #: src/LYLocal.c:1052 src/LYLocal.c:1088
 msgid "Illegal redirection \"//\" found! Request ignored."
-msgstr "X{XksɦV \"//\"IӭnDC"
+msgstr "出現不合法的重新導向 \"//\"!忽略該要求。"
 
 #: src/LYLocal.c:1084
 msgid "Enter name for new directory: "
-msgstr "JsؿW١G"
+msgstr "輸入新目錄的名稱:"
 
 #: src/LYLocal.c:1124
 msgid "Create file or directory (f or d): "
-msgstr "إɮשΥؿ (f  d)G"
+msgstr "建立檔案或目錄 (f 或 d):"
 
 #: src/LYLocal.c:1166
 #, fuzzy, c-format
 msgid "Remove directory '%s'?"
-msgstr "O_ɮס%sH"
+msgstr "是否移除檔案‘%s’?"
 
 #: src/LYLocal.c:1169
 #, fuzzy
 msgid "Remove directory?"
-msgstr " ؿ"
+msgstr " 目錄"
 
 #: src/LYLocal.c:1174
 #, c-format
 msgid "Remove file '%s'?"
-msgstr "O_ɮס%sH"
+msgstr "是否移除檔案‘%s’?"
 
 #: src/LYLocal.c:1176
 msgid "Remove file?"
-msgstr "O_ɮסH"
+msgstr "是否移除檔案?"
 
 #: src/LYLocal.c:1181
 #, c-format
 msgid "Remove symbolic link '%s'?"
-msgstr "O_Ÿs%sH"
+msgstr "是否移除符號連結‘%s’?"
 
 #: src/LYLocal.c:1183
 msgid "Remove symbolic link?"
-msgstr "O_ŸsH"
+msgstr "是否移除符號連結?"
 
 #: src/LYLocal.c:1278
 msgid "Sorry, don't know how to permit non-UNIX files yet."
@@ -4068,19 +4068,19 @@ msgstr ""
 
 #: src/LYLocal.c:1338
 msgid "Specify permissions below:"
-msgstr "ЫwHUvG"
+msgstr "請指定以下的權限:"
 
 #: src/LYLocal.c:1339 src/LYShowInfo.c:261
 msgid "Owner:"
-msgstr "̡֦G"
+msgstr "擁有者:"
 
 #: src/LYLocal.c:1355
 msgid "Group"
-msgstr "ݸs"
+msgstr "所屬群組"
 
 #: src/LYLocal.c:1371
 msgid "Others:"
-msgstr "䥦G"
+msgstr "其它:"
 
 #: src/LYLocal.c:1389
 msgid "form to permit"
@@ -4092,11 +4092,11 @@ msgstr ""
 
 #: src/LYLocal.c:1488
 msgid "Invalid syntax format."
-msgstr "LĪyk榡C"
+msgstr "無效的語法格式。"
 
 #: src/LYLocal.c:1670
 msgid "Warning!  UUDecoded file will exist in the directory you started Lynx."
-msgstr "ĵiIwg UUDecode ɮ׷|b Lynx ɪؿC"
+msgstr "警告!已經 UUDecode 的檔案會放在執行 Lynx 時的目錄。"
 
 #: src/LYLocal.c:1860
 msgid "NULL URL pointer"
@@ -4105,35 +4105,35 @@ msgstr ""
 #: src/LYLocal.c:1942
 #, c-format
 msgid "Executing %s "
-msgstr "b %s "
+msgstr "正在執行 %s "
 
 #: src/LYLocal.c:1945
 msgid "Executing system command. This might take a while."
-msgstr "btΫOCiݭny@qɶC"
+msgstr "正在執行系統指令。可能需要稍等一段時間。"
 
 #: src/LYLocal.c:2017
 msgid "Current directory:"
-msgstr "ثeؿG"
+msgstr "目前的目錄:"
 
 #: src/LYLocal.c:2020 src/LYLocal.c:2038
 msgid "Current selection:"
-msgstr "ثeܪءG"
+msgstr "目前選擇的項目:"
 
 #: src/LYLocal.c:2024
 msgid "Nothing currently selected."
-msgstr "󶵥ءC"
+msgstr "未選取任何項目。"
 
 #: src/LYLocal.c:2040
 msgid "tagged item:"
-msgstr "ӥ[WаOءG"
+msgstr "個加上標記的項目:"
 
 #: src/LYLocal.c:2041
 msgid "tagged items:"
-msgstr "ӥ[WаOءG"
+msgstr "個加上標記的項目:"
 
 #: src/LYLocal.c:2138 src/LYLocal.c:2149
 msgid "Illegal filename; request ignored."
-msgstr "XkɮצW١FӭnDC"
+msgstr "不合法的檔案名稱;忽略該要求。"
 
 #. directory not writable
 #: src/LYLocal.c:2247 src/LYLocal.c:2306
@@ -4142,11 +4142,11 @@ msgstr ""
 
 #: src/LYLocal.c:2302
 msgid "The selected item is not a directory!  Request ignored."
-msgstr "ؤOؿIӭnDC"
+msgstr "選取的項目不是目錄!忽略該要求。"
 
 #: src/LYLocal.c:2311
 msgid "Just a moment, ..."
-msgstr "еyA..."
+msgstr "請稍等,..."
 
 #: src/LYLocal.c:2328
 msgid "Error building install args"
@@ -4155,7 +4155,7 @@ msgstr ""
 #: src/LYLocal.c:2343 src/LYLocal.c:2374
 #, c-format
 msgid "Source and target are the same: %s"
-msgstr "ӷΥتaۦPG%s"
+msgstr "來源及目的地相同:%s"
 
 #: src/LYLocal.c:2350 src/LYLocal.c:2381
 #, c-format
@@ -4164,7 +4164,7 @@ msgstr ""
 
 #: src/LYLocal.c:2399
 msgid "Installation complete"
-msgstr "w˧"
+msgstr "安裝完成"
 
 #: src/LYLocal.c:2586
 msgid "Temporary URL or list would be too long."
@@ -4207,15 +4207,15 @@ msgstr ""
 
 #: src/LYMain.c:1023
 msgid "No Winsock found, sorry."
-msgstr "䤣 WinsockApC"
+msgstr "找不到 Winsock,抱歉。"
 
 #: src/LYMain.c:1226
 msgid "You MUST define a valid TMP or TEMP area!"
-msgstr "դU ** wĪ TMP  TEMP mI"
+msgstr "閣下 *必須* 指定有效的 TMP 或 TEMP 位置!"
 
 #: src/LYMain.c:1279 src/LYMainLoop.c:5074
 msgid "No such directory"
-msgstr "ӥؿsb"
+msgstr "該目錄不存在"
 
 #: src/LYMain.c:1464
 #, c-format
@@ -4225,7 +4225,7 @@ msgid ""
 "\n"
 msgstr ""
 "\n"
-"]w %s sbC\n"
+"設定檔 %s 不存在。\n"
 "\n"
 
 #: src/LYMain.c:1474
@@ -4236,7 +4236,7 @@ msgid ""
 "\n"
 msgstr ""
 "\n"
-"ŧi Lynx ҥΪrC\n"
+"未宣告 Lynx 所用的字元集。\n"
 "\n"
 
 #: src/LYMain.c:1503
@@ -4255,7 +4255,7 @@ msgid ""
 "\n"
 msgstr ""
 "\n"
-"Lynx ɮ %s sbC\n"
+"Lynx 檔案 %s 不存在。\n"
 "\n"
 
 #: src/LYMain.c:1654
@@ -4270,7 +4270,7 @@ msgstr ""
 
 #: src/LYMain.c:1804
 msgid "Warning:"
-msgstr "ĵiG"
+msgstr "警告:"
 
 #: src/LYMain.c:2372
 msgid "persistent cookies state will be changed in next session only."
@@ -4279,17 +4279,17 @@ msgstr ""
 #: src/LYMain.c:2617 src/LYMain.c:2662
 #, c-format
 msgid "Lynx: ignoring unrecognized charset=%s\n"
-msgstr "LynxGLkѧOr %s\n"
+msgstr "Lynx:忽略無法識別的字元集 %s\n"
 
 #: src/LYMain.c:3181
 #, fuzzy, c-format
 msgid "%s Version %s (%s)"
-msgstr "%s  %s (%s)\n"
+msgstr "%s 版本 %s (%s)\n"
 
 #: src/LYMain.c:3219
 #, c-format
 msgid "Built on %s %s %s\n"
-msgstr "sĶ %s %s %s\n"
+msgstr "編譯於 %s %s %s\n"
 
 #: src/LYMain.c:3241
 msgid "Copyrights held by the Lynx Developers Group,"
@@ -4298,31 +4298,31 @@ msgstr ""
 #: src/LYMain.c:3242
 #, fuzzy
 msgid "the University of Kansas, CERN, and other contributors."
-msgstr "vҦGUniversity of KansasBCERN Ψ䥦^m̡C"
+msgstr "版權所有:University of Kansas、CERN 及其它有貢獻者。"
 
 #: src/LYMain.c:3243
 #, fuzzy
 msgid "Distributed under the GNU General Public License (Version 2)."
-msgstr "ϥ GNU General Public License oGC"
+msgstr "使用 GNU General Public License 發佈。"
 
 #: src/LYMain.c:3244
 msgid "See http://lynx.isc.org/ and the online help for more information."
-msgstr "YݭnhơAs http://lynx.isc.org/ κWC"
+msgstr "若需要更多資料,請瀏覽 http://lynx.isc.org/ 及網上的說明文件。"
 
 #: src/LYMain.c:4065
 #, c-format
 msgid "USAGE: %s [options] [file]\n"
-msgstr "ΪkG%s [ﶵ] [ɮ]\n"
+msgstr "用法:%s [選項] [檔案]\n"
 
 #: src/LYMain.c:4066
 #, c-format
 msgid "Options are:\n"
-msgstr "ﶵ]AG\n"
+msgstr "選項包括:\n"
 
 #: src/LYMain.c:4365
 #, c-format
 msgid "%s: Invalid Option: %s\n"
-msgstr "%sGLĪﶵG%s\n"
+msgstr "%s:無效的選項:%s\n"
 
 #: src/LYMainLoop.c:594
 #, c-format
@@ -4331,7 +4331,7 @@ msgstr ""
 
 #: src/LYMainLoop.c:714 src/LYMainLoop.c:5096
 msgid "A URL specified by the user"
-msgstr "ѨϥΪ̫w URL"
+msgstr "由使用者指定的 URL"
 
 #: src/LYMainLoop.c:1173
 msgid "Enctype multipart/form-data not yet supported!  Cannot submit."
@@ -4342,7 +4342,7 @@ msgstr ""
 #.
 #: src/LYMainLoop.c:3105
 msgid "Help Screen"
-msgstr "DUe"
+msgstr "求助說明畫面"
 
 #: src/LYMainLoop.c:3226
 msgid "System Index"
@@ -4358,28 +4358,28 @@ msgstr ""
 
 #: src/LYMainLoop.c:4139
 msgid "charset for this document specified explicitly, sorry..."
-msgstr "pAӤwgSawFr..."
+msgstr "抱歉,該文件已經特地指定了字元集..."
 
 #: src/LYMainLoop.c:5052
 msgid "cd to:"
-msgstr "dzƶiJؿG"
+msgstr "準備進入的目錄:"
 
 #: src/LYMainLoop.c:5077
 msgid "A component of path is not a directory"
-msgstr "|@Oؿ"
+msgstr "路徑中的一部份不是目錄"
 
 #: src/LYMainLoop.c:5080
 msgid "failed to change directory"
-msgstr "LkiJؿ"
+msgstr "無法進入目錄"
 
 #: src/LYMainLoop.c:6252
 msgid "Reparsing document under current settings..."
-msgstr "ھڥثe]wsR..."
+msgstr "根據目前的設定重新分析文件..."
 
 #: src/LYMainLoop.c:6543
 #, c-format
 msgid "Fatal error - could not open output file %s\n"
-msgstr "Y~ w Lk}ҿX %s\n"
+msgstr "嚴重錯誤 ─ 無法開啟輸出檔 %s\n"
 
 #: src/LYMainLoop.c:6880
 msgid "TABLE center enable."
@@ -4392,7 +4392,7 @@ msgstr ""
 #: src/LYMainLoop.c:6960
 #, fuzzy
 msgid "Current URL is empty."
-msgstr "ثeؿG"
+msgstr "目前的目錄:"
 
 #: src/LYMainLoop.c:6962 src/LYUtils.c:1828
 msgid "Copy to clipboard failed."
@@ -4412,11 +4412,11 @@ msgstr ""
 
 #: src/LYMainLoop.c:7664 src/LYMainLoop.c:7834
 msgid "-index-"
-msgstr "wޢw"
+msgstr "─索引─"
 
 #: src/LYMainLoop.c:7774
 msgid "lynx: Can't access startfile"
-msgstr "lynxGLks}l"
+msgstr "lynx:無法存取開始的網頁"
 
 #: src/LYMainLoop.c:7786
 msgid "lynx: Start file could not be found or is not text/html or text/plain"
@@ -4424,11 +4424,11 @@ msgstr ""
 
 #: src/LYMainLoop.c:7787
 msgid "      Exiting..."
-msgstr "      dz}..."
+msgstr "      準備離開..."
 
 #: src/LYMainLoop.c:7828
 msgid "-more-"
-msgstr "w٦ew"
+msgstr "─還有內容─"
 
 #. Enable scrolling.
 #: src/LYNews.c:186
@@ -4447,7 +4447,7 @@ msgid ""
 msgstr ""
 "\n"
 "\n"
-" Цb From: YѻդUqla}\n"
+" 請在 From: 標頭中提供閣下的電郵地址\n"
 
 #.
 #. * Get the Subject header, offering the current document's title as the
@@ -4461,7 +4461,7 @@ msgid ""
 msgstr ""
 "\n"
 "\n"
-" дѩέק Subject: Y\n"
+" 請提供或修改 Subject: 標頭\n"
 
 #: src/LYNews.c:302
 msgid ""
@@ -4471,7 +4471,7 @@ msgid ""
 msgstr ""
 "\n"
 "\n"
-" дѩέק Organization: Y\n"
+" 請提供或修改 Organization: 標頭\n"
 
 #.
 #. * Use the built in line editior.
@@ -4484,7 +4484,7 @@ msgid ""
 msgstr ""
 "\n"
 "\n"
-" ЦbHUmJTC"
+" 請在以下的位置輸入訊息。"
 
 #: src/LYNews.c:405
 msgid "Message has no original text!"
@@ -4496,7 +4496,7 @@ msgstr ""
 
 #: src/LYOptions.c:767
 msgid "B)ookmark file: "
-msgstr "B)ɡG"
+msgstr "B)書籤檔:"
 
 #: src/LYOptions.c:2127 src/LYOptions.c:2134
 msgid "ON"
@@ -4582,7 +4582,7 @@ msgstr ""
 #: src/LYOptions.c:2243
 #, fuzzy
 msgid "Intermediate"
-msgstr ""
+msgstr "內部"
 
 #: src/LYOptions.c:2244
 msgid "Advanced"
@@ -4624,12 +4624,12 @@ msgstr ""
 #: src/LYOptions.c:2279
 #, fuzzy
 msgid "as links"
-msgstr "ê쵲"
+msgstr "不隱藏的鏈結"
 
 #: src/LYOptions.c:2286
 #, fuzzy
 msgid "show filename"
-msgstr "ijɮצW١G"
+msgstr "建議的檔案名稱:"
 
 #: src/LYOptions.c:2297
 msgid "STANDARD"
@@ -4642,22 +4642,22 @@ msgstr ""
 #: src/LYOptions.c:2329
 #, fuzzy
 msgid "Directories first"
-msgstr "ƥؿG"
+msgstr "副目錄:"
 
 #: src/LYOptions.c:2330
 #, fuzzy
 msgid "Files first"
-msgstr " ()"
+msgstr " (首先測試)"
 
 #: src/LYOptions.c:2331
 #, fuzzy
 msgid "Mixed style"
-msgstr "rsҦ"
+msgstr "文字編輯模式"
 
 #: src/LYOptions.c:2339 src/LYOptions.c:2359
 #, fuzzy
 msgid "By Name"
-msgstr "W١G"
+msgstr "名稱:"
 
 #: src/LYOptions.c:2340 src/LYOptions.c:2360
 msgid "By Type"
@@ -4670,7 +4670,7 @@ msgstr ""
 #: src/LYOptions.c:2342 src/LYOptions.c:2362
 #, fuzzy
 msgid "By Date"
-msgstr "G"
+msgstr "日期:"
 
 #: src/LYOptions.c:2343
 msgid "By Mode"
@@ -4683,7 +4683,7 @@ msgstr ""
 #: src/LYOptions.c:2346
 #, fuzzy
 msgid "By Group"
-msgstr "ݸs"
+msgstr "所屬群組"
 
 #: src/LYOptions.c:2371
 msgid "Do not show rate"
@@ -4692,7 +4692,7 @@ msgstr ""
 #: src/LYOptions.c:2372 src/LYOptions.c:2373
 #, fuzzy, c-format
 msgid "Show %s/sec rate"
-msgstr "ܶǿtv"
+msgstr "顯示傳輸速率"
 
 #: src/LYOptions.c:2375 src/LYOptions.c:2376
 #, c-format
@@ -4702,7 +4702,7 @@ msgstr ""
 #: src/LYOptions.c:2379
 #, fuzzy
 msgid "Show progressbar"
-msgstr "ܱʦC"
+msgstr "顯示捲動列"
 
 #: src/LYOptions.c:2391
 msgid "Accept lynx's internal types"
@@ -4723,7 +4723,7 @@ msgstr ""
 #: src/LYOptions.c:2395
 #, fuzzy
 msgid "Accept all types"
-msgstr ""
+msgstr "接受更改"
 
 #: src/LYOptions.c:2404
 msgid "gzip"
@@ -4756,23 +4756,23 @@ msgstr ""
 
 #: src/LYOptions.c:3485
 msgid "General Preferences"
-msgstr "@밾n]w"
+msgstr "一般偏好設定"
 
 #. ***************************************************************
 #. User Mode: SELECT
 #: src/LYOptions.c:3489
 msgid "User mode"
-msgstr "ϥΪ̼Ҧ"
+msgstr "使用者模式"
 
 #. Editor: INPUT
 #: src/LYOptions.c:3495
 msgid "Editor"
-msgstr "s边"
+msgstr "編輯器"
 
 #. Search Type: SELECT
 #: src/LYOptions.c:3500
 msgid "Type of Search"
-msgstr "jM覡"
+msgstr "搜尋方式"
 
 #: src/LYOptions.c:3505
 msgid "Security and Privacy"
@@ -4796,56 +4796,56 @@ msgstr ""
 
 #: src/LYOptions.c:3536
 msgid "Keyboard Input"
-msgstr "LJ"
+msgstr "鍵盤輸入"
 
 #. ***************************************************************
 #. Keypad Mode: SELECT
 #: src/LYOptions.c:3540
 msgid "Keypad mode"
-msgstr "ƦrLҦ"
+msgstr "數字鍵盤模式"
 
 #. Emacs keys: ON/OFF
 #: src/LYOptions.c:3546
 msgid "Emacs keys"
-msgstr "Emacs զX"
+msgstr "Emacs 組合鍵"
 
 #. VI Keys: ON/OFF
 #: src/LYOptions.c:3552
 msgid "VI keys"
-msgstr "VI զX"
+msgstr "VI 組合鍵"
 
 #. Line edit style: SELECT
 #. well, at least 2 line edit styles available
 #: src/LYOptions.c:3559
 msgid "Line edit style"
-msgstr "rsҦ"
+msgstr "文字編輯模式"
 
 #. Keyboard layout: SELECT
 #: src/LYOptions.c:3571
 msgid "Keyboard layout"
-msgstr "Ltm"
+msgstr "鍵盤配置"
 
 #.
 #. * Display and Character Set
 #.
 #: src/LYOptions.c:3585
 msgid "Display and Character Set"
-msgstr "ܤΦr"
+msgstr "顯示及字元集"
 
 #. Use locale-based character set: ON/OFF
 #: src/LYOptions.c:3590
 #, fuzzy
 msgid "Use locale-based character set"
-msgstr "ƪr"
+msgstr "後備的字元集"
 
 #. Display Character Set: SELECT
 #: src/LYOptions.c:3599
 msgid "Display character set"
-msgstr "w]ܪr"
+msgstr "預設顯示的字元集"
 
 #: src/LYOptions.c:3630
 msgid "Assumed document character set"
-msgstr "ƪr"
+msgstr "後備的字元集"
 
 #.
 #. * Since CJK people hardly mixed with other world
@@ -4854,43 +4854,43 @@ msgstr "ƪr"
 #.
 #: src/LYOptions.c:3650
 msgid "CJK mode"
-msgstr "CJK Ҧ"
+msgstr "CJK 模式"
 
 #: src/LYOptions.c:3652
 msgid "Raw 8-bit"
-msgstr "8-bit lҦ"
+msgstr "8-bit 原始模式"
 
 #. X Display: INPUT
 #: src/LYOptions.c:3660
 msgid "X Display"
-msgstr "X e"
+msgstr "X 畫面"
 
 #.
 #. * Document Appearance
 #.
 #: src/LYOptions.c:3666
 msgid "Document Appearance"
-msgstr "~["
+msgstr "文件外觀"
 
 #: src/LYOptions.c:3672
 msgid "Show color"
-msgstr "ܦm"
+msgstr "顯示色彩"
 
 #. Show cursor: ON/OFF
 #: src/LYOptions.c:3696
 msgid "Show cursor"
-msgstr "ܴ"
+msgstr "顯示游標"
 
 #. Underline links: ON/OFF
 #: src/LYOptions.c:3702
 #, fuzzy
 msgid "Underline links"
-msgstr "ê쵲G"
+msgstr "隱藏的鏈結:"
 
 #. Show scrollbar: ON/OFF
 #: src/LYOptions.c:3709
 msgid "Show scrollbar"
-msgstr "ܱʦC"
+msgstr "顯示捲動列"
 
 #. Select Popups: ON/OFF
 #: src/LYOptions.c:3716
@@ -4905,63 +4905,63 @@ msgstr ""
 #. Show Images: SELECT
 #: src/LYOptions.c:3728
 msgid "Show images"
-msgstr "ܹϹ"
+msgstr "顯示圖像"
 
 #. Verbose Images: ON/OFF
 #: src/LYOptions.c:3742
 msgid "Verbose images"
-msgstr "ϹԲӸ"
+msgstr "圖像詳細資料"
 
 #.
 #. * Headers Transferred to Remote Servers
 #.
 #: src/LYOptions.c:3750
 msgid "Headers Transferred to Remote Servers"
-msgstr "ǰeܻݦAY"
+msgstr "傳送至遠端伺服器的標頭資料"
 
 #. ***************************************************************
 #. Mail Address: INPUT
 #: src/LYOptions.c:3754
 msgid "Personal mail address"
-msgstr "ӤHqla}"
+msgstr "個人電郵地址"
 
 #: src/LYOptions.c:3760
 #, fuzzy
 msgid "Password for anonymous ftp"
-msgstr "sDեD%sKXG"
+msgstr "新聞組主機‘%s’的密碼:"
 
 #. Preferred media type: SELECT
 #: src/LYOptions.c:3766
 #, fuzzy
 msgid "Preferred media type"
-msgstr "wǿ %d 줸"
+msgstr "已傳輸 %d 位元組"
 
 #. Preferred encoding: SELECT
 #: src/LYOptions.c:3772
 #, fuzzy
 msgid "Preferred encoding"
-msgstr "uϥΪy"
+msgstr "優先使用的語言"
 
 #. Preferred Document Character Set: INPUT
 #: src/LYOptions.c:3778
 msgid "Preferred document character set"
-msgstr "uϥΪr"
+msgstr "優先使用的字元集"
 
 #. Preferred Document Language: INPUT
 #: src/LYOptions.c:3783
 msgid "Preferred document language"
-msgstr "uϥΪy"
+msgstr "優先使用的語言"
 
 #: src/LYOptions.c:3789
 msgid "User-Agent header"
-msgstr "User-Agent Y"
+msgstr "User-Agent 標頭"
 
 #.
 #. * Listing and Accessing Files
 #.
 #: src/LYOptions.c:3797
 msgid "Listing and Accessing Files"
-msgstr "CXΦsɮ"
+msgstr "列出及存取檔案"
 
 #. FTP sort: SELECT
 #: src/LYOptions.c:3802
@@ -4971,21 +4971,21 @@ msgstr ""
 #. FTP sort: SELECT
 #: src/LYOptions.c:3808
 msgid "FTP sort criteria"
-msgstr "FTP رƧDZ"
+msgstr "FTP 項目排序條件"
 
 #. Local Directory Sort: SELECT
 #: src/LYOptions.c:3816
 msgid "Local directory sort criteria"
-msgstr "aݥؿƧDZ"
+msgstr "本地端目錄排序條件"
 
 #. Local Directory Order: SELECT
 #: src/LYOptions.c:3822
 msgid "Local directory sort order"
-msgstr "aݥؿƦC"
+msgstr "本地端目錄排列次序"
 
 #: src/LYOptions.c:3831
 msgid "Show dot files"
-msgstr ""
+msgstr "顯示隱藏檔"
 
 #: src/LYOptions.c:3839
 msgid "Execution links"
@@ -4994,30 +4994,30 @@ msgstr ""
 #. Show transfer rate: SELECT
 #: src/LYOptions.c:3859
 msgid "Show transfer rate"
-msgstr "ܶǿtv"
+msgstr "顯示傳輸速率"
 
 #.
 #. * Special Files and Screens
 #.
 #: src/LYOptions.c:3879
 msgid "Special Files and Screens"
-msgstr "Sɮפεe"
+msgstr "特殊檔案及畫面"
 
 #: src/LYOptions.c:3884
 msgid "Multi-bookmarks"
-msgstr "hɼҦ"
+msgstr "多書籤檔模式"
 
 #: src/LYOptions.c:3892
 msgid "Review/edit Bookmarks files"
-msgstr "isνs"
+msgstr "可瀏覽或編輯書籤檔"
 
 #: src/LYOptions.c:3894
 msgid "Goto multi-bookmark menu"
-msgstr "iJhɼҦ"
+msgstr "進入多書籤檔模式選單"
 
 #: src/LYOptions.c:3896
 msgid "Bookmarks file"
-msgstr ""
+msgstr "書籤檔"
 
 #. Auto Session: ON/OFF
 #: src/LYOptions.c:3903
@@ -5032,7 +5032,7 @@ msgstr ""
 #. Visited Pages: SELECT
 #: src/LYOptions.c:3915
 msgid "Visited Pages"
-msgstr "gs"
+msgstr "曾經瀏覽的網頁"
 
 #: src/LYOptions.c:3920
 msgid "View the file "
@@ -5041,63 +5041,63 @@ msgstr ""
 #: src/LYPrint.c:937
 #, c-format
 msgid " Print job complete.\n"
-msgstr " CL{ǡC\n"
+msgstr " 完成列印程序。\n"
 
 #: src/LYPrint.c:1262
 msgid "Document:"
-msgstr "G"
+msgstr "文件:"
 
 #: src/LYPrint.c:1263
 msgid "Number of lines:"
-msgstr "ơG"
+msgstr "行數:"
 
 #: src/LYPrint.c:1264
 msgid "Number of pages:"
-msgstr "ơG"
+msgstr "頁數:"
 
 #: src/LYPrint.c:1265
 msgid "pages"
-msgstr ""
+msgstr "頁"
 
 #: src/LYPrint.c:1265
 msgid "page"
-msgstr ""
+msgstr "頁"
 
 #: src/LYPrint.c:1266
 msgid "(approximately)"
-msgstr "(ʲp)"
+msgstr "(粗略估計)"
 
 #: src/LYPrint.c:1273
 msgid "Some print functions have been disabled!"
-msgstr "wTϥάYCL\I"
+msgstr "已禁止使用某部份的列印功能!"
 
 #: src/LYPrint.c:1277
 msgid "Standard print options:"
-msgstr "зǪCLBz覡G"
+msgstr "標準的列印處理方式:"
 
 #: src/LYPrint.c:1278
 msgid "Print options:"
-msgstr "CLﶵG"
+msgstr "列印選項:"
 
 #: src/LYPrint.c:1285
 msgid "Save to a local file"
-msgstr "xsܥɮ"
+msgstr "儲存至本機的檔案"
 
 #: src/LYPrint.c:1287
 msgid "Save to disk disabled"
-msgstr "TNexsܺϺ"
+msgstr "禁止將內容儲存至磁碟"
 
 #: src/LYPrint.c:1294
 msgid "Mail the file"
-msgstr "lHɮ"
+msgstr "郵寄檔案"
 
 #: src/LYPrint.c:1301
 msgid "Print to the screen"
-msgstr "beLX"
+msgstr "在畫面印出資料"
 
 #: src/LYPrint.c:1306
 msgid "Print out on a printer attached to your vt100 terminal"
-msgstr "bs vt100 ׺ݾLCL"
+msgstr "在連接 vt100 終端機的印表機列印資料"
 
 #: src/LYReadCFG.c:371
 #, c-format
@@ -5165,7 +5165,7 @@ msgstr ""
 
 #: src/LYReadCFG.c:2292 src/LYReadCFG.c:2305 src/LYReadCFG.c:2363
 msgid "The following is read from your lynx.cfg file."
-msgstr "HUOqդU lynx.cfg ɮŪ]wC"
+msgstr "以下是從閣下的 lynx.cfg 檔案讀取的設定。"
 
 #: src/LYReadCFG.c:2293 src/LYReadCFG.c:2306
 msgid "Please read the distribution"
@@ -5177,43 +5177,43 @@ msgstr ""
 
 #: src/LYReadCFG.c:2345
 msgid "RELOAD THE CHANGES"
-msgstr "sJ᪺]w"
+msgstr "重新載入更改後的設定"
 
 #: src/LYReadCFG.c:2353
 msgid "Your primary configuration"
-msgstr "DnպA"
+msgstr "主要組態"
 
 #: src/LYShowInfo.c:173
 msgid "Directory that you are currently viewing"
-msgstr "ثesؿ"
+msgstr "目前瀏覽的目錄"
 
 #: src/LYShowInfo.c:176
 msgid "Name:"
-msgstr "W١G"
+msgstr "名稱:"
 
 #: src/LYShowInfo.c:179
 msgid "URL:"
-msgstr "URLG"
+msgstr "URL:"
 
 #: src/LYShowInfo.c:193
 msgid "Directory that you have currently selected"
-msgstr "ثeؿ"
+msgstr "目前選取的目錄"
 
 #: src/LYShowInfo.c:195
 msgid "File that you have currently selected"
-msgstr "ثeɮ"
+msgstr "目前選取的檔案"
 
 #: src/LYShowInfo.c:198
 msgid "Symbolic link that you have currently selected"
-msgstr "ثeŸs"
+msgstr "目前選取的符號連結"
 
 #: src/LYShowInfo.c:201
 msgid "Item that you have currently selected"
-msgstr "ثe"
+msgstr "目前選取的項目"
 
 #: src/LYShowInfo.c:203
 msgid "Full name:"
-msgstr "W١G"
+msgstr "完整名稱:"
 
 #: src/LYShowInfo.c:213
 msgid "Unable to follow link"
@@ -5225,44 +5225,44 @@ msgstr ""
 
 #: src/LYShowInfo.c:220
 msgid "Name of owner:"
-msgstr "֦̦W١G"
+msgstr "擁有者名稱:"
 
 #: src/LYShowInfo.c:223
 msgid "Group name:"
-msgstr "sզW١G"
+msgstr "群組名稱:"
 
 #: src/LYShowInfo.c:225
 msgid "File size:"
-msgstr "ɮפjpG"
+msgstr "檔案大小:"
 
 #: src/LYShowInfo.c:227
 #, fuzzy
 msgid "(bytes)"
-msgstr "줸"
+msgstr "位元組"
 
 #.
 #. * Include date and time information.
 #.
 #: src/LYShowInfo.c:232
 msgid "Creation date:"
-msgstr "s@G"
+msgstr "製作日期:"
 
 #: src/LYShowInfo.c:235
 msgid "Last modified:"
-msgstr "̫קɶG"
+msgstr "最後修改時間:"
 
 #: src/LYShowInfo.c:238
 msgid "Last accessed:"
-msgstr "̫sɶG"
+msgstr "最後存取時間:"
 
 #: src/LYShowInfo.c:244
 msgid "Access Permissions"
-msgstr "sv"
+msgstr "存取的權限"
 
 #: src/LYShowInfo.c:279
 #, fuzzy
 msgid "Group:"
-msgstr "ݸs"
+msgstr "所屬群組"
 
 #: src/LYShowInfo.c:299
 msgid "World:"
@@ -5270,15 +5270,15 @@ msgstr ""
 
 #: src/LYShowInfo.c:306
 msgid "File that you are currently viewing"
-msgstr "ثebsɮ"
+msgstr "目前正在瀏覽的檔案"
 
 #: src/LYShowInfo.c:314 src/LYShowInfo.c:418
 msgid "Linkname:"
-msgstr "쵲W١G"
+msgstr "鏈結名稱:"
 
 #: src/LYShowInfo.c:320 src/LYShowInfo.c:335
 msgid "Charset:"
-msgstr "rG"
+msgstr "字元集:"
 
 #: src/LYShowInfo.c:334
 msgid "(assumed)"
@@ -5286,15 +5286,15 @@ msgstr ""
 
 #: src/LYShowInfo.c:341
 msgid "Server:"
-msgstr "AG"
+msgstr "伺服器:"
 
 #: src/LYShowInfo.c:344
 msgid "Date:"
-msgstr "G"
+msgstr "日期:"
 
 #: src/LYShowInfo.c:347
 msgid "Last Mod:"
-msgstr "̫קG"
+msgstr "最後修改:"
 
 #: src/LYShowInfo.c:352
 msgid "Expires:"
@@ -5314,7 +5314,7 @@ msgstr ""
 
 #: src/LYShowInfo.c:367
 msgid "Language:"
-msgstr "yG"
+msgstr "語言:"
 
 #: src/LYShowInfo.c:374
 msgid "Post Data:"
@@ -5326,15 +5326,15 @@ msgstr ""
 
 #: src/LYShowInfo.c:380
 msgid "Owner(s):"
-msgstr "̡֦G"
+msgstr "擁有者:"
 
 #: src/LYShowInfo.c:385
 msgid "size:"
-msgstr "jpG"
+msgstr "大小:"
 
 #: src/LYShowInfo.c:387
 msgid "lines"
-msgstr ""
+msgstr "行"
 
 #: src/LYShowInfo.c:391
 msgid "forms mode"
@@ -5370,11 +5370,11 @@ msgstr ""
 
 #: src/LYShowInfo.c:411
 msgid "mode:"
-msgstr "ҦG"
+msgstr "模式:"
 
 #: src/LYShowInfo.c:417
 msgid "Link that you currently have selected"
-msgstr "ثew쵲"
+msgstr "目前已選取的鏈結"
 
 #: src/LYShowInfo.c:426
 msgid "Method:"
@@ -5382,12 +5382,12 @@ msgstr ""
 
 #: src/LYShowInfo.c:430
 msgid "Enctype:"
-msgstr "sX覡G"
+msgstr "編碼方式:"
 
 #: src/LYShowInfo.c:436
 #, fuzzy
 msgid "Action:"
-msgstr "mG"
+msgstr "位置:"
 
 #: src/LYShowInfo.c:441
 msgid "(Form field)"
@@ -5395,12 +5395,12 @@ msgstr ""
 
 #: src/LYShowInfo.c:450
 msgid "No Links on the current page"
-msgstr "ӭS쵲"
+msgstr "該頁面沒有任何鏈結"
 
 #: src/LYShowInfo.c:455
 #, fuzzy
 msgid "Server Headers:"
-msgstr "AG"
+msgstr "伺服器:"
 
 #: src/LYStyle.c:312
 #, c-format
@@ -5419,31 +5419,31 @@ msgstr ""
 
 #: src/LYUpload.c:75
 msgid "ERROR! - upload command is misconfigured"
-msgstr "~Iw Ta]wΨӤWɮתO"
+msgstr "錯誤!─ 未有正確地設定用來上傳檔案的指令"
 
 #: src/LYUpload.c:96
 msgid "Illegal redirection \"../\" found! Request ignored."
-msgstr "X{XksɦV../IӭnDC"
+msgstr "出現不合法的重新導向“../”!忽略該要求。"
 
 #: src/LYUpload.c:99
 msgid "Illegal character \"/\" found! Request ignored."
-msgstr "X{Xkr/IӭnDC"
+msgstr "出現不合法的字元“/”!忽略該要求。"
 
 #: src/LYUpload.c:102
 msgid "Illegal redirection using \"~\" found! Request ignored."
-msgstr "X{XkӥBϥΡ~sɦVnDIӭnDC"
+msgstr "出現不合法而且使用“~”的重新導向要求!忽略該要求。"
 
 #: src/LYUpload.c:159
 msgid "Unable to upload file."
-msgstr "LkWɮסC"
+msgstr "無法上傳檔案。"
 
 #: src/LYUpload.c:201
 msgid "Upload To:"
-msgstr "WǦܡG"
+msgstr "上傳至:"
 
 #: src/LYUpload.c:202
 msgid "Upload options:"
-msgstr "WǿﶵG"
+msgstr "上傳選項:"
 
 #: src/LYUtils.c:1830
 msgid "Download document URL put to clipboard."
@@ -5455,7 +5455,7 @@ msgstr ""
 
 #: src/LYUtils.c:3419
 msgid "Too many tempfiles"
-msgstr "ӦhȦs"
+msgstr "太多暫存檔"
 
 #: src/LYUtils.c:3719
 msgid "unknown restriction"
@@ -5473,11 +5473,11 @@ msgstr ""
 
 #: src/LYUtils.c:5131
 msgid "Cannot find HOME directory"
-msgstr "䤣ӤHؿ"
+msgstr "找不到個人目錄"
 
 #: src/LYrcFile.c:16
 msgid "Normally disabled.  See ENABLE_LYNXRC in lynx.cfg\n"
-msgstr "@뤣|ҥΡCаѦ lynx.cfg  ENABLE_LYNXRC\n"
+msgstr "一般不會啟用。請參考 lynx.cfg 中的 ENABLE_LYNXRC\n"
 
 #: src/LYrcFile.c:317
 msgid ""
@@ -5565,9 +5565,9 @@ msgid ""
 "  ^B = left    ^F = right\n"
 "will be enabled.\n"
 msgstr ""
-"pGN emacs_keys ]wonAh|ҥΤ@몺 EMACS VG\n"
-"  ^N = U    ^P = W\n"
-"  ^B =     ^F = k\n"
+"如果將 emacs_keys 設定為“on”,則會啟用一般的 EMACS 方向按鍵:\n"
+"  ^N = 下移    ^P = 上移\n"
+"  ^B = 左移    ^F = 右移\n"
 
 #: src/LYrcFile.c:395
 msgid ""
@@ -5854,16 +5854,16 @@ msgid ""
 msgstr ""
 
 #~ msgid "reason unknown."
-#~ msgstr "]ԡC"
+#~ msgstr "原因不詳。"
 
 #~ msgid "KB"
 #~ msgstr "KB"
 
 #~ msgid "Remove '%s' and all of its contents?"
-#~ msgstr "%sΨ䤤ҦeH"
+#~ msgstr "移除‘%s’及其中所有的內容?"
 
 #~ msgid "Remove directory and all of its contents?"
-#~ msgstr "ӥؿΨ䤤ҦeH"
+#~ msgstr "移除該目錄及其中所有的內容?"
 
 #~ msgid "Unable to open file management menu file."
-#~ msgstr "Lk}ɮ׺޲zɮסC"
+#~ msgstr "無法開啟檔案管理選單檔案。"
/a> 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318
/*
 * $LynxId: HTML.c,v 1.159 2013/05/02 11:03:41 tom Exp $
 *
 *		Structured stream to Rich hypertext converter
 *		============================================
 *
 *	This generates a hypertext object.  It converts from the
 *	structured stream interface of HTML events into the style-
 *	oriented interface of the HText.h interface.  This module is
 *	only used in clients and should not be linked into servers.
 *
 *	Override this module if making a new GUI browser.
 *
 *   Being Overidden
 *
 */

#define HTSTREAM_INTERNAL 1

#include <HTUtils.h>

#define Lynx_HTML_Handler
#include <HTChunk.h>
#include <HText.h>
#include <HTStyle.h>
#include <HTML.h>

#include <HTCJK.h>
#include <HTAtom.h>
#include <HTAnchor.h>
#include <HTMLGen.h>
#include <HTParse.h>
#include <HTList.h>
#include <UCMap.h>
#include <UCDefs.h>
#include <UCAux.h>

#include <LYGlobalDefs.h>
#include <LYCharUtils.h>
#include <LYCharSets.h>

#include <HTAlert.h>
#include <HTForms.h>
#include <HTNestedList.h>
#include <GridText.h>
#include <LYStrings.h>
#include <LYUtils.h>
#include <LYMap.h>
#include <LYList.h>
#include <LYBookmark.h>
#include <LYHistory.h>

#ifdef VMS
#include <LYCurses.h>
#endif /* VMS */

#ifdef USE_PRETTYSRC
#include <LYPrettySrc.h>
#endif

#ifdef USE_COLOR_STYLE
#include <SGML.h>
#include <AttrList.h>
#include <LYHash.h>
#include <LYStyle.h>
#undef SELECTED_STYLES
#define pHText_changeStyle(X,Y,Z) {}

#if OMIT_SCN_KEEPING
# define HCODE_TO_STACK_OFF(x) /*(CSHASHSIZE+1)*/ 88888		/*special value. */
#else
# define HCODE_TO_STACK_OFF(x) x	/*pass computed value */
#endif

#endif /* USE_COLOR_STYLE */

#ifdef USE_SOURCE_CACHE
#include <HTAccess.h>
#endif

#include <LYCurses.h>
#include <LYJustify.h>

#include <LYexit.h>
#include <LYLeaks.h>

#define STACKLEVEL(me) ((me->stack + MAX_NESTING - 1) - me->sp)

#define DFT_TEXTAREA_COLS 60
#define DFT_TEXTAREA_ROWS 4

#define MAX_TEXTAREA_COLS LYcolLimit
#define MAX_TEXTAREA_ROWS (3 * LYlines)

#define LimitValue(name, value) \
 	if (name > value) { \
		CTRACE((tfp, "Limited " #name " to %d, was %d\n", \
			value, name)); \
		name = value; \
	}

struct _HTStream {
    const HTStreamClass *isa;
#ifdef USE_SOURCE_CACHE
    HTParentAnchor *anchor;
    FILE *fp;
    char *filename;
    HTChunk *chunk;
    HTChunk *last_chunk;	/* the last chunk in a chain! */
    const HTStreamClass *actions;
    HTStream *target;
    int status;
#else
    /* .... */
#endif
};

static HTStyleSheet *styleSheet = NULL;		/* Application-wide */

/*	Module-wide style cache
*/
static HTStyle *styles[HTML_ELEMENTS + LYNX_HTML_EXTRA_ELEMENTS];

					   /* adding 24 nested list styles  */
					   /* and 3 header alignment styles */
					   /* and 3 div alignment styles    */
static HTStyle *default_style = NULL;

const char *LYToolbarName = "LynxPseudoToolbar";

/* used to turn off a style if the HTML author forgot to
static int i_prior_style = -1;
 */

/*
 *	Private function....
 */
static int HTML_end_element(HTStructured * me, int element_number,
			    char **include);

static int HTML_start_element(HTStructured * me, int element_number,
			      const BOOL *present,
			      STRING2PTR value,
			      int tag_charset,
			      char **include);

/*
 * If we have verbose_img set, display labels for images.
 */
#define VERBOSE_IMG(value,src_type,string) \
      ((verbose_img) ? (newtitle = MakeNewTitle(value,src_type)): string)

static char *MakeNewTitle(STRING2PTR value, int src_type);
static char *MakeNewImageValue(STRING2PTR value);
static char *MakeNewMapValue(STRING2PTR value, const char *mapstr);

/*	Set an internal flag that the next call to a stack-affecting method
 *	is only internal and the stack manipulation should be skipped. - kw
 */
#define SET_SKIP_STACK(el_num) if (HTML_dtd.tags[el_num].contents != SGML_EMPTY) \
						{ me->skip_stack++; }

void strtolower(char *i)
{
    if (!i)
	return;
    while (*i) {
	*i = (char) TOLOWER(*i);
	i++;
    }
}

/*		Flattening the style structure
 *		------------------------------
 *
 * On the NeXT, and on any read-only browser, it is simpler for the text to
 * have a sequence of styles, rather than a nested tree of styles.  In this
 * case we have to flatten the structure as it arrives from SGML tags into a
 * sequence of styles.
 */

/*
 *  If style really needs to be set, call this.
 */
void actually_set_style(HTStructured * me)
{
    if (!me->text) {		/* First time through */
	LYGetChartransInfo(me);
	UCSetTransParams(&me->T,
			 me->UCLYhndl, me->UCI,
			 HTAnchor_getUCLYhndl(me->node_anchor,
					      UCT_STAGE_HTEXT),
			 HTAnchor_getUCInfoStage(me->node_anchor,
						 UCT_STAGE_HTEXT));
	me->text = HText_new2(me->node_anchor, me->target);
	HText_beginAppend(me->text);
	HText_setStyle(me->text, me->new_style);
	me->in_word = NO;
	LYCheckForContentBase(me);
    } else {
	HText_setStyle(me->text, me->new_style);
    }

    me->old_style = me->new_style;
    me->style_change = NO;
}

/*
 *  If you THINK you need to change style, call this.
 */
static void change_paragraph_style(HTStructured * me, HTStyle *style)
{
    if (me->new_style != style) {
	me->style_change = YES;
	me->new_style = style;
    }
    me->in_word = NO;
}

/*
 * Return true if we should write a message (to LYNXMESSAGES, or the trace
 * file) telling about some bad HTML that we've found.
 */
BOOL LYBadHTML(HTStructured * me)
{
    BOOL code = FALSE;

    switch ((enumBadHtml) cfg_bad_html) {
    case BAD_HTML_IGNORE:
	break;
    case BAD_HTML_TRACE:
	code = TRUE;
	break;
    case BAD_HTML_MESSAGE:
	code = TRUE;
	break;
    case BAD_HTML_WARN:
	/*
	 * If we're already tracing, do not add a warning.
	 */
	if (!TRACE && !me->inBadHTML) {
	    HTUserMsg(BAD_HTML_USE_TRACE);
	    me->inBadHTML = TRUE;
	}
	code = TRACE;
	break;
    }
    return code;
}

/*
 * Handle the formatted message.
 */
void LYShowBadHTML(const char *message)
{
    switch ((enumBadHtml) cfg_bad_html) {
    case BAD_HTML_IGNORE:
	break;
    case BAD_HTML_TRACE:
	CTRACE((tfp, "%s", message));
	break;
    case BAD_HTML_MESSAGE:
	CTRACE((tfp, "%s", message));
	LYstore_message(message);
	break;
    case BAD_HTML_WARN:
	CTRACE((tfp, "%s", message));
	break;
    }
}

/*_________________________________________________________________________
 *
 *			A C T I O N	R O U T I N E S
 */

/* FIXME:  this should be amended to do the substitution only when not in a
 * multibyte stream.
 */
#ifdef EXP_JAPANESE_SPACES
#define FIX_JAPANESE_SPACES \
	(HTCJK == CHINESE || HTCJK == JAPANESE || HTCJK == TAIPEI)
	/* don't replace '\n' with ' ' if Chinese or Japanese - HN
	 */
#else
#define FIX_JAPANESE_SPACES 0
#endif

/*	Character handling
 *	------------------
 */
void HTML_put_character(HTStructured * me, int c)
{
    unsigned uc = UCH(c);

    /*
     * Ignore all non-MAP content when just scanning a document for MAPs.  - FM
     */
    if (LYMapsOnly && me->sp[0].tag_number != HTML_OBJECT)
	return;

    c = (int) uc;

    /*
     * Do EOL conversion if needed.  - FM
     *
     * Convert EOL styles:
     *   macintosh:  cr    --> lf
     *   ascii:      cr-lf --> lf
     *   unix:       lf    --> lf
     */
    if ((me->lastraw == '\r') && c == '\n') {
	me->lastraw = -1;
	return;
    }
    me->lastraw = c;
    if (c == '\r') {
	c = '\n';
	uc = UCH(c);
    }

    /*
     * Handle SGML_LITTERAL tags that have HTChunk elements.  - FM
     */
    switch (me->sp[0].tag_number) {

    case HTML_COMMENT:
	return;			/* Do Nothing */

    case HTML_TITLE:
	if (c == LY_SOFT_HYPHEN)
	    return;
	if (c != '\n' && c != '\t' && c != '\r') {
	    HTChunkPutc(&me->title, uc);
	} else if (FIX_JAPANESE_SPACES) {
	    if (c == '\t') {
		HTChunkPutc(&me->title, ' ');
	    } else {
		return;
	    }
	} else {
	    HTChunkPutc(&me->title, ' ');
	}
	return;

    case HTML_STYLE:
	HTChunkPutc(&me->style_block, uc);
	return;

    case HTML_SCRIPT:
	HTChunkPutc(&me->script, uc);
	return;

    case HTML_OBJECT:
	HTChunkPutc(&me->object, uc);
	return;

    case HTML_TEXTAREA:
	HTChunkPutc(&me->textarea, uc);
	return;

    case HTML_SELECT:
    case HTML_OPTION:
	HTChunkPutc(&me->option, uc);
	return;

    case HTML_MATH:
	HTChunkPutc(&me->math, uc);
	return;

    default:
	if (me->inSELECT) {
	    /*
	     * If we are within a SELECT not caught by the cases above -
	     * HTML_SELECT or HTML_OPTION may not be the last element pushed on
	     * the style stack if there were invalid markup tags within a
	     * SELECT element.  For error recovery, treat text as part of the
	     * OPTION text, it is probably meant to show up as user-visible
	     * text.  Having A as an open element while in SELECT is really
	     * sick, don't make anchor text part of the option text in that
	     * case since the option text will probably just be discarded.  -
	     * kw
	     */
	    if (me->sp[0].tag_number == HTML_A)
		break;
	    HTChunkPutc(&me->option, uc);
	    return;
	}
	break;
    }				/* end first switch */

    /*
     * Handle all other tag content.  - FM
     */
    switch (me->sp[0].tag_number) {

    case HTML_PRE:		/* Formatted text */
	/*
	 * We guarantee that the style is up-to-date in begin_litteral. But we
	 * still want to strip \r's.
	 */
	if (c != '\r' &&
	    !(c == '\n' && me->inLABEL && !me->inP) &&
	    !(c == '\n' && !me->inPRE)) {
	    me->inP = TRUE;
	    me->inLABEL = FALSE;
	    HText_appendCharacter(me->text, c);
	}
	me->inPRE = TRUE;
	break;

    case HTML_LISTING:		/* Literal text */
    case HTML_XMP:
    case HTML_PLAINTEXT:
	/*
	 * We guarantee that the style is up-to-date in begin_litteral.  But we
	 * still want to strip \r's.
	 */
	if (c != '\r') {
	    me->inP = TRUE;
	    me->inLABEL = FALSE;
	    HText_appendCharacter(me->text, c);
	}
	break;

    default:
	/*
	 * Free format text.
	 */
	if (me->sp->style->id == ST_Preformatted) {
	    if (c != '\r' &&
		!(c == '\n' && me->inLABEL && !me->inP) &&
		!(c == '\n' && !me->inPRE)) {
		me->inP = TRUE;
		me->inLABEL = FALSE;
		HText_appendCharacter(me->text, c);
	    }
	    me->inPRE = TRUE;

	} else if (me->sp->style->id == ST_Listing ||
		   me->sp->style->id == ST_Example) {
	    if (c != '\r') {
		me->inP = TRUE;
		me->inLABEL = FALSE;
		HText_appendCharacter(me->text, c);
	    }

	} else {
	    if (me->style_change) {
		if ((c == '\n') || (c == ' '))
		    return;	/* Ignore it */
		UPDATE_STYLE;
	    }
	    if (c == '\n') {
		if (!FIX_JAPANESE_SPACES) {
		    if (me->in_word) {
			if (HText_getLastChar(me->text) != ' ') {
			    me->inP = TRUE;
			    me->inLABEL = FALSE;
			    HText_appendCharacter(me->text, ' ');
			}
			me->in_word = NO;
		    }
		}

	    } else if (c == ' ' || c == '\t') {
		if (HText_getLastChar(me->text) != ' ') {
		    me->inP = TRUE;
		    me->inLABEL = FALSE;
		    HText_appendCharacter(me->text, ' ');
		}

	    } else if (c == '\r') {
		/* ignore */

	    } else {
		me->inP = TRUE;
		me->inLABEL = FALSE;
		HText_appendCharacter(me->text, c);
		me->in_word = YES;
	    }
	}
    }				/* end second switch */

    if (c == '\n' || c == '\t') {
	HText_setLastChar(me->text, ' ');	/* set it to a generic separator */
    } else {
	HText_setLastChar(me->text, c);
    }
}

/*	String handling
 *	---------------
 *
 *	This is written separately from put_character because the loop can
 *	in some cases be promoted to a higher function call level for speed.
 */
void HTML_put_string(HTStructured * me, const char *s)
{
#ifdef USE_PRETTYSRC
    char *translated_string = NULL;
#endif

    if (s == NULL || (LYMapsOnly && me->sp[0].tag_number != HTML_OBJECT))
	return;
#ifdef USE_PRETTYSRC
    if (psrc_convert_string) {
	StrAllocCopy(translated_string, s);
	TRANSLATE_AND_UNESCAPE_ENTITIES(&translated_string, TRUE, FALSE);
	s = (const char *) translated_string;
    }
#endif

    switch (me->sp[0].tag_number) {

    case HTML_COMMENT:
	break;			/* Do Nothing */

    case HTML_TITLE:
	HTChunkPuts(&me->title, s);
	break;

    case HTML_STYLE:
	HTChunkPuts(&me->style_block, s);
	break;

    case HTML_SCRIPT:
	HTChunkPuts(&me->script, s);
	break;

    case HTML_PRE:		/* Formatted text */
    case HTML_LISTING:		/* Literal text */
    case HTML_XMP:
    case HTML_PLAINTEXT:
	/*
	 * We guarantee that the style is up-to-date in begin_litteral
	 */
	HText_appendText(me->text, s);
	break;

    case HTML_OBJECT:
	HTChunkPuts(&me->object, s);
	break;

    case HTML_TEXTAREA:
	HTChunkPuts(&me->textarea, s);
	break;

    case HTML_SELECT:
    case HTML_OPTION:
	HTChunkPuts(&me->option, s);
	break;

    case HTML_MATH:
	HTChunkPuts(&me->math, s);
	break;

    default:			/* Free format text? */
	if (!me->sp->style->freeFormat) {
	    /*
	     * If we are within a preformatted text style not caught by the
	     * cases above (HTML_PRE or similar may not be the last element
	     * pushed on the style stack).  - kw
	     */
#ifdef USE_PRETTYSRC
	    if (psrc_view) {
		/*
		 * We do this so that a raw '\r' in the string will not be
		 * interpreted as an internal request to break a line - passing
		 * '\r' to HText_appendText is treated by it as a request to
		 * insert a blank line - VH
		 */
		for (; *s; ++s)
		    HTML_put_character(me, *s);
	    } else
#endif
		HText_appendText(me->text, s);
	    break;
	} else {
	    const char *p = s;
	    char c;

	    if (me->style_change) {
		for (; *p && ((*p == '\n') || (*p == '\r') ||
			      (*p == ' ') || (*p == '\t')); p++) ;	/* Ignore leaders */
		if (!*p)
		    break;
		UPDATE_STYLE;
	    }
	    for (; *p; p++) {
		if (*p == 13 && p[1] != 10) {
		    /*
		     * Treat any '\r' which is not followed by '\n' as '\n', to
		     * account for macintosh lineend in ALT attributes etc.  -
		     * kw
		     */
		    c = '\n';
		} else {
		    c = *p;
		}
		if (me->style_change) {
		    if ((c == '\n') || (c == ' ') || (c == '\t'))
			continue;	/* Ignore it */
		    UPDATE_STYLE;
		}
		if (c == '\n') {
		    if (!FIX_JAPANESE_SPACES) {
			if (me->in_word) {
			    if (HText_getLastChar(me->text) != ' ')
				HText_appendCharacter(me->text, ' ');
			    me->in_word = NO;
			}
		    }

		} else if (c == ' ' || c == '\t') {
		    if (HText_getLastChar(me->text) != ' ')
			HText_appendCharacter(me->text, ' ');

		} else if (c == '\r') {
		    /* ignore */
		} else {
		    HText_appendCharacter(me->text, c);
		    me->in_word = YES;
		}

		/* set the Last Character */
		if (c == '\n' || c == '\t') {
		    /* set it to a generic separator */
		    HText_setLastChar(me->text, ' ');
		} else if (c == '\r' &&
			   HText_getLastChar(me->text) == ' ') {
		    /*
		     * \r's are ignored.  In order to keep collapsing spaces
		     * correctly, we must default back to the previous
		     * separator, if there was one.  So we set LastChar to a
		     * generic separator.
		     */
		    HText_setLastChar(me->text, ' ');
		} else {
		    HText_setLastChar(me->text, c);
		}

	    }			/* for */
	}
    }				/* end switch */
#ifdef USE_PRETTYSRC
    if (psrc_convert_string) {
	psrc_convert_string = FALSE;
	FREE(translated_string);
    }
#endif
}

/*	Buffer write
 *	------------
 */
void HTML_write(HTStructured * me, const char *s, int l)
{
    const char *p;
    const char *e = s + l;

    if (LYMapsOnly && me->sp[0].tag_number != HTML_OBJECT)
	return;

    for (p = s; p < e; p++)
	HTML_put_character(me, *p);
}

/*
 *  "Internal links" are hyperlinks whose source and destination are
 *  within the same document, and for which the destination is given
 *  as a URL Reference with an empty URL, but possibly with a non-empty
 *  #fragment.	(This terminology re URL-Reference vs. URL follows the
 *  Fielding URL syntax and semantics drafts).
 *  Differences:
 *  (1) The document's base (in whatever way it is given) is not used for
 *	resolving internal link references.
 *  (2) Activating an internal link should not result in a new retrieval
 *	of a copy of the document.
 *  (3) Internal links are the only way to refer with a hyperlink to a document
 *	(or a location in it) which is only known as the result of a POST
 *	request (doesn't have a URL from which the document can be retrieved
 *	with GET), and can only be used from within that document.
 *
 * *If track_internal_links is true, we keep track of whether a
 *  link destination was given as an internal link.  This information is
 *  recorded in the type of the link between anchor objects, and is available
 *  to the HText object and the mainloop from there.  URL References to
 *  internal destinations are still resolved into an absolute form before
 *  being passed on, but using the current stream's retrieval address instead
 *  of the base URL.
 *  Examples:  (replace [...] to have a valid absolute URL)
 *  In document retrieved from [...]/mypath/mydoc.htm w/ base [...]/otherpath/
 *  a. HREF="[...]/mypath/mydoc.htm"	  -> [...]/mypath/mydoc.htm
 *  b. HREF="[...]/mypath/mydoc.htm#frag" -> [...]/mypath/mydoc.htm#frag
 *  c. HREF="mydoc.htm"			  -> [...]/otherpath/mydoc.htm
 *  d. HREF="mydoc.htm#frag"		  -> [...]/otherpath/mydoc.htm#frag
 *  e. HREF=""		      -> [...]/mypath/mydoc.htm      (marked internal)
 *  f. HREF="#frag"	      -> [...]/mypath/mydoc.htm#frag (marked internal)
 *
 * *If track_internal_links is false, URL-less URL-References are
 *  resolved differently from URL-References with a non-empty URL (using the
 *  current stream's retrieval address instead of the base), but we make no
 *  further distinction.  Resolution is then as in the examples above, execept
 *  that there is no "(marked internal)".
 *
 * *Note that this doesn't apply to form ACTIONs (always resolved using base,
 *  never marked internal).  Also other references encountered or generated
 *  are not marked internal, whether they have a URL or not, if in a given
 *  context an internal link makes no sense (e.g., IMG SRC=).
 */

/* A flag is used to keep track of whether an "URL reference" encountered
   had a real "URL" or not.  In the latter case, it will be marked as
   "internal".	The flag is set before we start messing around with the
   string (resolution of relative URLs etc.).  This variable only used
   locally here, don't confuse with LYinternal_flag which is for
   overriding non-caching similar to LYoverride_no_cache. - kw */
#define CHECK_FOR_INTERN(flag,s) \
   	flag = (BOOLEAN) (((s) && (*(s)=='#' || *(s)=='\0')) ? TRUE : FALSE)

/* Last argument to pass to HTAnchor_findChildAndLink() calls,
   just an abbreviation. - kw */
#define INTERN_CHK(flag) (HTLinkType *)((flag) ? HTInternalLink : NULL)
#define INTERN_LT         INTERN_CHK(intern_flag)

#ifdef USE_COLOR_STYLE
static char *Style_className = 0;
static char *Style_className_end = 0;
static size_t Style_className_len = 0;
static int hcode;

#ifdef LY_FIND_LEAKS
static void free_Style_className(void)
{
    FREE(Style_className);
}
#endif

static void addClassName(const char *prefix,
			 const char *actual,
			 size_t length)
{
    size_t offset = strlen(prefix);
    size_t have = (unsigned) (Style_className_end - Style_className);
    size_t need = (offset + length + 1);

    if ((have + need) >= Style_className_len) {
	Style_className_len += 1024 + 2 * (have + need);
	if (Style_className == 0) {
	    Style_className = typeMallocn(char, Style_className_len);
	} else {
	    Style_className = typeRealloc(char, Style_className, Style_className_len);
	}
	if (Style_className == NULL)
	    outofmem(__FILE__, "addClassName");
	assert(Style_className != NULL);
	Style_className_end = Style_className + have;
    }
    if (offset)
	strcpy(Style_className_end, prefix);
    if (length)
	memcpy(Style_className_end + offset, actual, length);
    Style_className_end[offset + length] = '\0';
    strtolower(Style_className_end);

    Style_className_end += (offset + length);
}
#else
#define addClassName(prefix, actual, length)	/* nothing */
#endif

#ifdef USE_PRETTYSRC

static void HTMLSRC_apply_markup(HTStructured * context, HTlexeme lexeme, int start,
				 int tag_charset)
{
    HT_tagspec *ts = *((start ? lexeme_start : lexeme_end) + lexeme);

    while (ts) {
#ifdef USE_COLOR_STYLE
	if (ts->start) {
	    current_tag_style = ts->style;
	    force_current_tag_style = TRUE;
	    forced_classname = ts->class_name;
	    force_classname = TRUE;
	}
#endif
	CTRACE((tfp, ts->start ? "SRCSTART %d\n" : "SRCSTOP %d\n", (int) lexeme));
	if (ts->start)
	    HTML_start_element(context,
			       (int) ts->element,
			       ts->present,
			       (STRING2PTR) ts->value,
			       tag_charset,
			       NULL);
	else
	    HTML_end_element(context,
			     (int) ts->element,
			     NULL);
	ts = ts->next;
    }
}

#  define START TRUE
#  define STOP FALSE

#  define PSRCSTART(x)	HTMLSRC_apply_markup(me,HTL_##x,START,tag_charset)
#  define PSRCSTOP(x)  HTMLSRC_apply_markup(me,HTL_##x,STOP,tag_charset)

#  define PUTC(x) HTML_put_character(me,x)
#  define PUTS(x) HTML_put_string(me,x)

#endif /* USE_PRETTYSRC */

static void LYStartArea(HTStructured * obj, const char *href,
			const char *alt,
			const char *title,
			int tag_charset)
{
    BOOL new_present[HTML_AREA_ATTRIBUTES];
    const char *new_value[HTML_AREA_ATTRIBUTES];
    int i;

    for (i = 0; i < HTML_AREA_ATTRIBUTES; i++)
	new_present[i] = NO;

    if (alt) {
	new_present[HTML_AREA_ALT] = YES;
	new_value[HTML_AREA_ALT] = (const char *) alt;
    }
    if (non_empty(title)) {
	new_present[HTML_AREA_TITLE] = YES;
	new_value[HTML_AREA_TITLE] = (const char *) title;
    }
    if (href) {
	new_present[HTML_AREA_HREF] = YES;
	new_value[HTML_AREA_HREF] = (const char *) href;
    }

    (*obj->isa->start_element) (obj, HTML_AREA, new_present, new_value,
				tag_charset, 0);
}

static void LYHandleFIG(HTStructured * me, const BOOL *present,
			STRING2PTR value,
			int isobject,
			int imagemap,
			const char *id,
			const char *src,
			int convert,
			int start,
			BOOL *intern_flag GCC_UNUSED)
{
    if (start == TRUE) {
	me->inFIG = TRUE;
	if (me->inA) {
	    SET_SKIP_STACK(HTML_A);
	    HTML_end_element(me, HTML_A, NULL);
	}
	if (!isobject) {
	    LYEnsureDoubleSpace(me);
	    LYResetParagraphAlignment(me);
	    me->inFIGwithP = TRUE;
	} else {
	    me->inFIGwithP = FALSE;
	    HTML_put_character(me, ' ');	/* space char may be ignored */
	}
	if (non_empty(id)) {
	    if (present && convert) {
		CHECK_ID(HTML_FIG_ID);
	    } else
		LYHandleID(me, id);
	}
	me->in_word = NO;
	me->inP = FALSE;

	if (clickable_images && non_empty(src)) {
	    char *href = NULL;

	    StrAllocCopy(href, src);
	    CHECK_FOR_INTERN(*intern_flag, href);
	    LYLegitimizeHREF(me, &href, TRUE, TRUE);
	    if (*href) {
		me->CurrentA = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
							 NULL,	/* Tag */
							 href,	/* Addresss */
							 INTERN_CHK(*intern_flag));	/* Type */
		HText_beginAnchor(me->text, me->inUnderline, me->CurrentA);
		if (me->inBoldH == FALSE)
		    HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
		HTML_put_string(me, (isobject
				     ? (imagemap
					? "(IMAGE)"
					: "(OBJECT)")
				     : "[FIGURE]"));
		if (me->inBoldH == FALSE)
		    HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
		HText_endAnchor(me->text, 0);
		HTML_put_character(me, '-');
		HTML_put_character(me, ' ');	/* space char may be ignored */
		me->in_word = NO;
	    }
	    FREE(href);
	}
    } else {			/* handle end tag */
	if (me->inFIGwithP) {
	    LYEnsureDoubleSpace(me);
	} else {
	    HTML_put_character(me, ' ');	/* space char may be ignored */
	}
	LYResetParagraphAlignment(me);
	me->inFIGwithP = FALSE;
	me->inFIG = FALSE;
	change_paragraph_style(me, me->sp->style);	/* Often won't really change */
	if (me->List_Nesting_Level >= 0) {
	    UPDATE_STYLE;
	    HText_NegateLineOne(me->text);
	}
    }
}

static void clear_objectdata(HTStructured * me)
{
    if (me) {
	HTChunkClear(&me->object);
	me->object_started = FALSE;
	me->object_declare = FALSE;
	me->object_shapes = FALSE;
	me->object_ismap = FALSE;
	FREE(me->object_usemap);
	FREE(me->object_id);
	FREE(me->object_title);
	FREE(me->object_data);
	FREE(me->object_type);
	FREE(me->object_classid);
	FREE(me->object_codebase);
	FREE(me->object_codetype);
	FREE(me->object_name);
    }
}

#define HTParseALL(pp,pconst)  \
	{ char* free_me = *pp; \
	  *pp = HTParse(*pp, pconst, PARSE_ALL); \
	  FREE(free_me);       \
	}

/*	Start Element
 *	-------------
 */
static int HTML_start_element(HTStructured * me, int element_number,
			      const BOOL *present,
			      STRING2PTR value,
			      int tag_charset,
			      char **include)
{
    char *alt_string = NULL;
    char *id_string = NULL;
    char *newtitle = NULL;
    char **pdoctitle = NULL;
    char *href = NULL;
    char *map_href = NULL;
    char *title = NULL;
    char *I_value = NULL;
    char *I_name = NULL;
    char *temp = NULL;
    const char *Base = NULL;
    int dest_char_set = -1;
    HTParentAnchor *dest = NULL;	/* An anchor's destination */
    BOOL dest_ismap = FALSE;	/* Is dest an image map script? */
    HTChildAnchor *ID_A = NULL;	/* HTML_foo_ID anchor */
    int url_type = 0, i = 0;
    char *cp = NULL;
    HTMLElement ElementNumber = (HTMLElement) element_number;
    BOOL intern_flag = FALSE;
    short stbl_align = HT_ALIGN_NONE;
    int status = HT_OK;

#ifdef USE_COLOR_STYLE
    char *class_name;
    int class_used = 0;
#endif

#ifdef USE_PRETTYSRC
    if (psrc_view && !sgml_in_psrc_was_initialized) {
	if (!psrc_nested_call) {
	    HTTag *tag = &HTML_dtd.tags[element_number];
	    char buf[200];
	    const char *p;

	    if (psrc_first_tag) {
		psrc_first_tag = FALSE;
		/* perform the special actions on the begining of the document.
		   It's assumed that all lynx modules start generating html
		   from tag (ie not a text) so we are able to trap this moment
		   and initialize.
		 */
		psrc_nested_call = TRUE;
		HTML_start_element(me, HTML_BODY, NULL, NULL, tag_charset, NULL);
		HTML_start_element(me, HTML_PRE, NULL, NULL, tag_charset, NULL);
		PSRCSTART(entire);
		psrc_nested_call = FALSE;
	    }

	    psrc_nested_call = TRUE;
	    /*write markup for tags and exit */
	    PSRCSTART(abracket);
	    PUTC('<');
	    PSRCSTOP(abracket);
	    PSRCSTART(tag);
	    if (tagname_transform != 0)
		PUTS(tag->name);
	    else {
		LYStrNCpy(buf, tag->name, sizeof(buf) - 1);
		LYLowerCase(buf);
		PUTS(buf);
	    }
	    if (present) {
		for (i = 0; i < tag->number_of_attributes; i++)
		    if (present[i]) {
			PUTC(' ');
			PSRCSTART(attrib);
			if (attrname_transform != 0)
			    PUTS(tag->attributes[i].name);
			else {
			    LYStrNCpy(buf,
				      tag->attributes[i].name,
				      sizeof(buf) - 1);
			    LYLowerCase(buf);
			    PUTS(buf);
			}
			if (value[i]) {
			    char q = '"';

			    /*0 in dquotes, 1 - in quotes, 2 mixed */
			    char kind = (char) (!strchr(value[i], '"') ?
						0 :
						!strchr(value[i], '\'') ?
						q = '\'', 1 :
						2);

			    PUTC('=');
			    PSRCSTOP(attrib);
			    PSRCSTART(attrval);
			    PUTC(q);
			    /*is it special ? */
			    if (tag->attributes[i].type == HTMLA_ANAME) {
				HTStartAnchor(me, value[i], NULL);
				HTML_end_element(me, HTML_A, NULL);
			    } else if (tag->attributes[i].type == HTMLA_HREF) {
				PSRCSTART(href);
				HTStartAnchor(me, NULL, value[i]);
			    }
			    if (kind != 2)
				PUTS(value[i]);
			    else
				for (p = value[i]; *p; p++)
				    if (*p != '"')
					PUTC(*p);
				    else
					PUTS("&#34;");
			    /*is it special ? */
			    if (tag->attributes[i].type == HTMLA_HREF) {
				HTML_end_element(me, HTML_A, NULL);
				PSRCSTOP(href);
			    }
			    PUTC(q);
			    PSRCSTOP(attrval);
			}	/* if value */
		    }		/* if present[i] */
	    }			/* if present */
	    PSRCSTOP(tag);
	    PSRCSTART(abracket);
	    PUTC('>');
	    PSRCSTOP(abracket);
	    psrc_nested_call = FALSE;
	    return HT_OK;
	}			/*if (!psrc_nested_call) */
	/*fall through */
    }
#endif /* USE_PRETTYSRC */

    if (LYMapsOnly) {
	if (!(ElementNumber == HTML_MAP || ElementNumber == HTML_AREA ||
	      ElementNumber == HTML_BASE || ElementNumber == HTML_OBJECT ||
	      ElementNumber == HTML_A)) {
	    return HT_OK;
	}
    } else if (!me->text) {
	UPDATE_STYLE;
    } {
	/*  me->tag_charset  is charset for attribute values.  */
	int j = ((tag_charset < 0) ? me->UCLYhndl : tag_charset);

	if ((me->tag_charset != j) || (j < 0 /* for trace entry */ )) {
	    CTRACE((tfp, "me->tag_charset: %d -> %d", me->tag_charset, j));
	    CTRACE((tfp, " (me->UCLYhndl: %d, tag_charset: %d)\n",
		    me->UCLYhndl, tag_charset));
	    me->tag_charset = j;
	}
    }

/* this should be done differently */
#if defined(USE_COLOR_STYLE)

    addClassName(";",
		 HTML_dtd.tags[element_number].name,
		 (size_t) HTML_dtd.tags[element_number].name_len);

    class_name = (force_classname ? forced_classname : class_string);
    force_classname = FALSE;

    if (force_current_tag_style == FALSE) {
	current_tag_style = (class_name[0]
			     ? -1
			     : cached_tag_styles[element_number]);
    } else {
	force_current_tag_style = FALSE;
    }

    CTRACE2(TRACE_STYLE, (tfp, "CSS.elt:<%s>\n", HTML_dtd.tags[element_number].name));

    if (current_tag_style == -1) {	/* Append class_name */
	hcode = hash_code_lowercase_on_fly(HTML_dtd.tags[element_number].name);
	if (class_name[0]) {
	    int ohcode = hcode;

	    hcode = hash_code_aggregate_char('.', hcode);
	    hcode = hash_code_aggregate_lower_str(class_name, hcode);
	    if (!hashStyles[hcode].name) {	/* None such -> classless version */
		hcode = ohcode;
		CTRACE2(TRACE_STYLE,
			(tfp,
			 "STYLE.start_element: <%s> (class <%s> not configured), hcode=%d.\n",
			 HTML_dtd.tags[element_number].name, class_name, hcode));
	    } else {
		addClassName(".", class_name, strlen(class_name));

		CTRACE2(TRACE_STYLE,
			(tfp, "STYLE.start_element: <%s>.<%s>, hcode=%d.\n",
			 HTML_dtd.tags[element_number].name, class_name, hcode));
		class_used = 1;
	    }
	}

	class_string[0] = '\0';

    } else {			/* (current_tag_style!=-1)  */
	if (class_name[0]) {
	    addClassName(".", class_name, strlen(class_name));
	    class_string[0] = '\0';
	}
	hcode = current_tag_style;
	CTRACE2(TRACE_STYLE,
		(tfp, "STYLE.start_element: <%s>, hcode=%d.\n",
		 HTML_dtd.tags[element_number].name, hcode));
	current_tag_style = -1;
    }

#if !OMIT_SCN_KEEPING		/* Can be done in other cases too... */
    if (!class_used && ElementNumber == HTML_INPUT) {	/* For some other too? */
	const char *type = "";
	int ohcode = hcode;

	if (present && present[HTML_INPUT_TYPE] && value[HTML_INPUT_TYPE])
	    type = value[HTML_INPUT_TYPE];

	hcode = hash_code_aggregate_lower_str(".type.", hcode);
	hcode = hash_code_aggregate_lower_str(type, hcode);
	if (!hashStyles[hcode].name) {	/* None such -> classless version */
	    hcode = ohcode;
	    CTRACE2(TRACE_STYLE,
		    (tfp, "STYLE.start_element: type <%s> not configured.\n",
		     type));
	} else {
	    addClassName(".type.", type, strlen(type));

	    CTRACE2(TRACE_STYLE,
		    (tfp, "STYLE.start_element: <%s>.type.<%s>, hcode=%d.\n",
		     HTML_dtd.tags[element_number].name, type, hcode));
	}
    }
#endif /* !OMIT_SCN_KEEPING */

    HText_characterStyle(me->text, hcode, STACK_ON);
#endif /* USE_COLOR_STYLE */

    /*
     * Handle the start tag.  - FM
     */
    switch (ElementNumber) {

    case HTML_HTML:
	break;

    case HTML_HEAD:
	break;

    case HTML_BASE:
	if (present && present[HTML_BASE_HREF] && !local_host_only &&
	    non_empty(value[HTML_BASE_HREF])) {
	    char *base = NULL;
	    const char *related = NULL;

	    StrAllocCopy(base, value[HTML_BASE_HREF]);
	    CTRACE((tfp, "*HTML_BASE: initial href=`%s'\n", NonNull(base)));

	    if (!(url_type = LYLegitimizeHREF(me, &base, TRUE, TRUE))) {
		CTRACE((tfp, "HTML: BASE '%s' is not an absolute URL.\n",
			NonNull(base)));
		if (me->inBadBASE == FALSE)
		    HTAlert(BASE_NOT_ABSOLUTE);
		me->inBadBASE = TRUE;
	    }

	    if (url_type == LYNXIMGMAP_URL_TYPE) {
		/*
		 * These have a non-standard form, basically strip the prefix
		 * or the code below would insert a nonsense host into the
		 * pseudo URL.  These should never occur where they would be
		 * used for resolution of relative URLs anyway.  We can also
		 * strip the #map part.  - kw
		 */
		temp = base;
		base = HTParse(base + 11, "", PARSE_ALL_WITHOUT_ANCHOR);
		FREE(temp);
	    }

	    /*
	     * Get parent's address for defaulted fields.
	     */
	    related = me->node_anchor->address;

	    /*
	     * Create the access field.
	     */
	    temp = HTParse(base, related, PARSE_ACCESS + PARSE_PUNCTUATION);
	    StrAllocCopy(me->base_href, temp);
	    FREE(temp);

	    /*
	     * Create the host[:port] field.
	     */
	    temp = HTParse(base, "", PARSE_HOST + PARSE_PUNCTUATION);
	    if (!StrNCmp(temp, "//", 2)) {
		StrAllocCat(me->base_href, temp);
		if (!strcmp(me->base_href, "file://")) {
		    StrAllocCat(me->base_href, "localhost");
		}
	    } else {
		if (isFILE_URL(me->base_href)) {
		    StrAllocCat(me->base_href, "//localhost");
		} else if (strcmp(me->base_href, STR_NEWS_URL)) {
		    FREE(temp);
		    StrAllocCat(me->base_href, (temp = HTParse(related, "",
							       PARSE_HOST + PARSE_PUNCTUATION)));
		}
	    }
	    FREE(temp);

	    /*
	     * Create the path field.
	     */
	    temp = HTParse(base, "", PARSE_PATH + PARSE_PUNCTUATION);
	    if (*temp != '\0') {
		char *p = strchr(temp, '?');

		if (p)
		    *p = '\0';
		p = strrchr(temp, '/');
		if (p)
		    *(p + 1) = '\0';	/* strip after the last slash */

		StrAllocCat(me->base_href, temp);
	    } else if (!strcmp(me->base_href, STR_NEWS_URL)) {
		StrAllocCat(me->base_href, "*");
	    } else if (isNEWS_URL(me->base_href) ||
		       isNNTP_URL(me->base_href) ||
		       isSNEWS_URL(me->base_href)) {
		StrAllocCat(me->base_href, "/*");
	    } else {
		StrAllocCat(me->base_href, "/");
	    }
	    FREE(temp);
	    FREE(base);

	    me->inBASE = TRUE;
	    me->node_anchor->inBASE = TRUE;
	    StrAllocCopy(me->node_anchor->content_base, me->base_href);
	    /* me->base_href is a valid URL */

	    CTRACE((tfp, "*HTML_BASE: final href=`%s'\n", me->base_href));
	}
	break;

    case HTML_META:
	if (present)
	    LYHandleMETA(me, present, value, include);
	break;

    case HTML_TITLE:
	HTChunkClear(&me->title);
	break;

    case HTML_LINK:
	intern_flag = FALSE;
	if (present && present[HTML_LINK_HREF]) {
	    CHECK_FOR_INTERN(intern_flag, value[HTML_LINK_HREF]);
	    /*
	     * Prepare to do housekeeping on the reference.  - FM
	     */
	    if (isEmpty(value[HTML_LINK_HREF])) {
		Base = (me->inBASE)
		    ? me->base_href
		    : me->node_anchor->address;
		StrAllocCopy(href, Base);
	    } else {
		StrAllocCopy(href, value[HTML_LINK_HREF]);
		(void) LYLegitimizeHREF(me, &href, TRUE, TRUE);

		Base = (me->inBASE && *href != '\0' && *href != '#')
		    ? me->base_href
		    : me->node_anchor->address;
		HTParseALL(&href, Base);
	    }

	    /*
	     * Handle links with a REV attribute.  - FM
	     * Handle REV="made" or REV="owner".  - LM & FM
	     * Handle REL="author" -TD
	     */
	    if (present &&
		((present[HTML_LINK_REV] &&
		  value[HTML_LINK_REV] &&
		  (!strcasecomp("made", value[HTML_LINK_REV]) ||
		   !strcasecomp("owner", value[HTML_LINK_REV]))) ||
		 (present[HTML_LINK_REL] &&
		  value[HTML_LINK_REL] &&
		  (!strcasecomp("author", value[HTML_LINK_REL]))))) {
		/*
		 * Load the owner element.  - FM
		 */
		HTAnchor_setOwner(me->node_anchor, href);
		CTRACE((tfp, "HTML: DOC OWNER '%s' found\n", href));
		FREE(href);

		/*
		 * Load the RevTitle element if a TITLE attribute and value
		 * are present.  - FM
		 */
		if (present && present[HTML_LINK_TITLE] &&
		    value[HTML_LINK_TITLE] &&
		    *value[HTML_LINK_TITLE] != '\0') {
		    StrAllocCopy(title, value[HTML_LINK_TITLE]);
		    TRANSLATE_AND_UNESCAPE_ENTITIES(&title, TRUE, FALSE);
		    LYTrimHead(title);
		    LYTrimTail(title);
		    if (*title != '\0')
			HTAnchor_setRevTitle(me->node_anchor, title);
		    FREE(title);
		}
		break;
	    }

	    /*
	     * Handle REL links.  - FM
	     */

	    if (present &&
		present[HTML_LINK_REL] && value[HTML_LINK_REL]) {
		/*
		 * Ignore style sheets, for now.  - FM
		 *
		 * lss and css have different syntax - lynx shouldn't try to
		 * parse them now (it tries to parse them as lss, so it exits
		 * with error message on the 1st non-empty line) - VH
		 */
#ifndef USE_COLOR_STYLE
		if (!strcasecomp(value[HTML_LINK_REL], "StyleSheet") ||
		    !strcasecomp(value[HTML_LINK_REL], "Style")) {
		    CTRACE2(TRACE_STYLE,
			    (tfp, "HTML: StyleSheet link found.\n"));
		    CTRACE2(TRACE_STYLE,
			    (tfp, "        StyleSheets not yet implemented.\n"));
		    FREE(href);
		    break;
		}
#endif /* ! USE_COLOR_STYLE */

		/*
		 * Ignore anything not registered in the 28-Mar-95 IETF HTML
		 * 3.0 draft and W3C HTML 3.2 draft, or not appropriate for
		 * Lynx banner links in the expired Maloney and Quin relrev
		 * draft.  We'll make this more efficient when the situation
		 * stabilizes, and for now, we'll treat "Banner" as another
		 * toolbar element.  - FM
		 */
		if (!strcasecomp(value[HTML_LINK_REL], "Home") ||
		    !strcasecomp(value[HTML_LINK_REL], "ToC") ||
		    !strcasecomp(value[HTML_LINK_REL], "Contents") ||
		    !strcasecomp(value[HTML_LINK_REL], "Index") ||
		    !strcasecomp(value[HTML_LINK_REL], "Glossary") ||
		    !strcasecomp(value[HTML_LINK_REL], "Copyright") ||
		    !strcasecomp(value[HTML_LINK_REL], "Help") ||
		    !strcasecomp(value[HTML_LINK_REL], "Search") ||
		    !strcasecomp(value[HTML_LINK_REL], "Bookmark") ||
		    !strcasecomp(value[HTML_LINK_REL], "Banner") ||
		    !strcasecomp(value[HTML_LINK_REL], "Top") ||
		    !strcasecomp(value[HTML_LINK_REL], "Origin") ||
		    !strcasecomp(value[HTML_LINK_REL], "Navigator") ||
		    !strcasecomp(value[HTML_LINK_REL], "Disclaimer") ||
		    !strcasecomp(value[HTML_LINK_REL], "Author") ||
		    !strcasecomp(value[HTML_LINK_REL], "Editor") ||
		    !strcasecomp(value[HTML_LINK_REL], "Publisher") ||
		    !strcasecomp(value[HTML_LINK_REL], "Trademark") ||
		    !strcasecomp(value[HTML_LINK_REL], "Hotlist") ||
		    !strcasecomp(value[HTML_LINK_REL], "Begin") ||
		    !strcasecomp(value[HTML_LINK_REL], "First") ||
		    !strcasecomp(value[HTML_LINK_REL], "End") ||
		    !strcasecomp(value[HTML_LINK_REL], "Last") ||
		    !strcasecomp(value[HTML_LINK_REL], "Documentation") ||
		    !strcasecomp(value[HTML_LINK_REL], "Biblioentry") ||
		    !strcasecomp(value[HTML_LINK_REL], "Bibliography") ||
		    !strcasecomp(value[HTML_LINK_REL], "Start") ||
		    !strcasecomp(value[HTML_LINK_REL], "Appendix")) {
		    StrAllocCopy(title, value[HTML_LINK_REL]);
		    pdoctitle = &title;		/* for setting HTAnchor's title */
		} else if (!strcasecomp(value[HTML_LINK_REL], "Up") ||
			   !strcasecomp(value[HTML_LINK_REL], "Next") ||
			   !strcasecomp(value[HTML_LINK_REL], "Previous") ||
			   !strcasecomp(value[HTML_LINK_REL], "Prev") ||
			   !strcasecomp(value[HTML_LINK_REL], "Child") ||
			   !strcasecomp(value[HTML_LINK_REL], "Sibling") ||
			   !strcasecomp(value[HTML_LINK_REL], "Parent") ||
			   !strcasecomp(value[HTML_LINK_REL], "Meta") ||
			   !strcasecomp(value[HTML_LINK_REL], "URC") ||
			   !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
		       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;
		       the LIST page generation code may later use it. - kw */
		    if (!intern_flag) {
			StrAllocCopy(temp, "RelTitle: ");
			StrAllocCat(temp, value[HTML_LINK_REL]);
		    }
#ifndef DISABLE_BIBP
		} else if (!strcasecomp(value[HTML_LINK_REL], "citehost")) {
		    /*  Citehost determination for bibp links. - RDC */
		    HTAnchor_setCitehost(me->node_anchor, href);
		    CTRACE((tfp, "HTML: citehost '%s' found\n", href));
		    FREE(href);
		    break;
#endif
		} else {
		    CTRACE((tfp, "HTML: LINK with REL=\"%s\" ignored.\n",
			    value[HTML_LINK_REL]));
		    FREE(href);
		    break;
		}
	    }
	} else if (present &&
		   present[HTML_LINK_REL] && value[HTML_LINK_REL]) {
	    /*
	     * If no HREF was specified, handle special REL links with
	     * self-designated HREFs.  - FM
	     */
	    if (!strcasecomp(value[HTML_LINK_REL], "Home")) {
		StrAllocCopy(href, LynxHome);
	    } else if (!strcasecomp(value[HTML_LINK_REL], "Help")) {
		StrAllocCopy(href, helpfile);
	    } else if (!strcasecomp(value[HTML_LINK_REL], "Index")) {
		StrAllocCopy(href, indexfile);
	    } else {
		CTRACE((tfp,
			"HTML: LINK with REL=\"%s\" and no HREF ignored.\n",
			value[HTML_LINK_REL]));
		break;
	    }
	    StrAllocCopy(title, value[HTML_LINK_REL]);
	    pdoctitle = &title;
	}
	if (href) {
	    /*
	     * Create a title (link name) from the TITLE value, if present, or
	     * default to the REL value that was loaded into title.  - FM
	     */
	    if (present && present[HTML_LINK_TITLE] &&
		non_empty(value[HTML_LINK_TITLE])) {
		StrAllocCopy(title, value[HTML_LINK_TITLE]);
		TRANSLATE_AND_UNESCAPE_ENTITIES(&title, TRUE, FALSE);
		LYTrimHead(title);
		LYTrimTail(title);
		pdoctitle = &title;
		FREE(temp);	/* forget about recording RelTitle - kw */
	    }
	    if (isEmpty(title)) {
		FREE(href);
		FREE(title);
		break;
	    }

	    if (me->inA) {
		/*
		 * Ugh!  The LINK tag, which is a HEAD element, is in an
		 * Anchor, which is BODY element.  All we can do is close the
		 * Anchor and cross our fingers.  - FM
		 */
		SET_SKIP_STACK(HTML_A);
		HTML_end_element(me, HTML_A, include);
	    }

	    /*
	     * Create anchors for the links that simulate a toolbar.  - FM
	     */
	    me->CurrentA = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
						     NULL,	/* Tag */
						     href,	/* Addresss */
						     (temp
						      ? (HTLinkType *)
						      HTAtom_for(temp)
						      : INTERN_LT));	/* Type */
	    FREE(temp);
	    if ((dest = HTAnchor_parent(HTAnchor_followLink(me->CurrentA)
		 )) != NULL) {
		if (pdoctitle && !HTAnchor_title(dest))
		    HTAnchor_setTitle(dest, *pdoctitle);

		/* Don't allow CHARSET attribute to change *this* document's
		   charset assumption. - kw */
		if (dest == me->node_anchor)
		    dest = NULL;
		if (present[HTML_LINK_CHARSET] &&
		    non_empty(value[HTML_LINK_CHARSET])) {
		    dest_char_set = UCGetLYhndl_byMIME(value[HTML_LINK_CHARSET]);
		    if (dest_char_set < 0)
			dest_char_set = UCLYhndl_for_unrec;
		}
		if (dest && dest_char_set >= 0)
		    HTAnchor_setUCInfoStage(dest, dest_char_set,
					    UCT_STAGE_PARSER,
					    UCT_SETBY_LINK);
	    }
	    UPDATE_STYLE;
	    if (!HText_hasToolbar(me->text) &&
		(ID_A = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
						  LYToolbarName,	/* Tag */
						  NULL,		/* Addresss */
						  (HTLinkType *) 0))) {		/* Type */
		HText_appendCharacter(me->text, '#');
		HText_setLastChar(me->text, ' ');	/* absorb white space */
		HText_beginAnchor(me->text, me->inUnderline, ID_A);
		HText_endAnchor(me->text, 0);
		HText_setToolbar(me->text);
	    } else {
		/*
		 * Add collapsible space to separate link from previous
		 * generated links.  - kw
		 */
		HTML_put_character(me, ' ');
	    }
	    HText_beginAnchor(me->text, me->inUnderline, me->CurrentA);
	    if (me->inBoldH == FALSE)
		HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
#ifdef USE_COLOR_STYLE
	    if (present && present[HTML_LINK_CLASS] &&
		non_empty(value[HTML_LINK_CLASS])) {
		char *tmp = 0;

		HTSprintf0(&tmp, "link.%s.%s", value[HTML_LINK_CLASS], title);
		CTRACE2(TRACE_STYLE,
			(tfp, "STYLE.link: using style <%s>\n", tmp));

		HText_characterStyle(me->text, hash_code(tmp), STACK_ON);
		HTML_put_string(me, title);
		HTML_put_string(me, " (");
		HTML_put_string(me, value[HTML_LINK_CLASS]);
		HTML_put_string(me, ")");
		HText_characterStyle(me->text, hash_code(tmp), STACK_OFF);
		FREE(tmp);
	    } else
#endif
		HTML_put_string(me, title);
	    if (me->inBoldH == FALSE)
		HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
	    HText_endAnchor(me->text, 0);
	}
	FREE(href);
	FREE(title);
	break;

    case HTML_ISINDEX:
	if (((present)) &&
	    ((present[HTML_ISINDEX_HREF] && value[HTML_ISINDEX_HREF]) ||
	     (present[HTML_ISINDEX_ACTION] && value[HTML_ISINDEX_ACTION]))) {
	    /*
	     * Lynx was supporting ACTION, which never made it into the HTML
	     * 2.0 specs.  HTML 3.0 uses HREF, so we'll use that too, but allow
	     * use of ACTION as an alternate until people have fully switched
	     * over.  - FM
	     */
	    if (present[HTML_ISINDEX_HREF] && value[HTML_ISINDEX_HREF])
		StrAllocCopy(href, value[HTML_ISINDEX_HREF]);
	    else
		StrAllocCopy(href, value[HTML_ISINDEX_ACTION]);
	    LYLegitimizeHREF(me, &href, TRUE, TRUE);

	    Base = (me->inBASE && *href != '\0' && *href != '#')
		? me->base_href
		: me->node_anchor->address;
	    HTParseALL(&href, Base);
	    HTAnchor_setIndex(me->node_anchor, href);
	    FREE(href);

	} else {
	    Base = (me->inBASE) ?
		me->base_href : me->node_anchor->address;
	    HTAnchor_setIndex(me->node_anchor, Base);
	}
	/*
	 * Support HTML 3.0 PROMPT attribute.  - FM
	 */
	if (present &&
	    present[HTML_ISINDEX_PROMPT] &&
	    non_empty(value[HTML_ISINDEX_PROMPT])) {
	    StrAllocCopy(temp, value[HTML_ISINDEX_PROMPT]);
	    TRANSLATE_AND_UNESCAPE_ENTITIES(&temp, TRUE, FALSE);
	    LYTrimHead(temp);
	    LYTrimTail(temp);
	    if (*temp != '\0') {
		StrAllocCat(temp, " ");
		HTAnchor_setPrompt(me->node_anchor, temp);
	    } else {
		HTAnchor_setPrompt(me->node_anchor, ENTER_DATABASE_QUERY);
	    }
	    FREE(temp);
	} else {
	    HTAnchor_setPrompt(me->node_anchor, ENTER_DATABASE_QUERY);
	}
	break;

    case HTML_NEXTID:
	break;

    case HTML_STYLE:
	/*
	 * We're getting it as Literal text, which, for now, we'll just ignore. 
	 * - FM
	 */
	HTChunkClear(&me->style_block);
	break;

    case HTML_SCRIPT:
	/*
	 * We're getting it as Literal text, which, for now, we'll just ignore. 
	 * - FM
	 */
	HTChunkClear(&me->script);
	break;

    case HTML_BODY:
	CHECK_ID(HTML_BODY_ID);
	if (HText_hasToolbar(me->text))
	    HText_appendParagraph(me->text);
	break;

    case HTML_FRAMESET:
	break;

    case HTML_FRAME:
	if (present && present[HTML_FRAME_NAME] &&
	    non_empty(value[HTML_FRAME_NAME])) {
	    StrAllocCopy(id_string, value[HTML_FRAME_NAME]);
	    TRANSLATE_AND_UNESCAPE_ENTITIES(&id_string, TRUE, FALSE);
	    LYTrimHead(id_string);
	    LYTrimTail(id_string);
	}
	if (present && present[HTML_FRAME_SRC] &&
	    non_empty(value[HTML_FRAME_SRC])) {
	    StrAllocCopy(href, value[HTML_FRAME_SRC]);
	    LYLegitimizeHREF(me, &href, TRUE, TRUE);

	    if (me->inA) {
		SET_SKIP_STACK(HTML_A);
		HTML_end_element(me, HTML_A, include);
	    }
	    me->CurrentA = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
						     NULL,	/* Tag */
						     href,	/* Addresss */
						     (HTLinkType *) 0);		/* Type */
	    CAN_JUSTIFY_PUSH(FALSE);
	    LYEnsureSingleSpace(me);
	    if (me->inUnderline == FALSE)
		HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
	    HTML_put_string(me, "FRAME:");
	    if (me->inUnderline == FALSE)
		HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
	    HTML_put_character(me, ' ');

	    me->in_word = NO;
	    CHECK_ID(HTML_FRAME_ID);
	    HText_beginAnchor(me->text, me->inUnderline, me->CurrentA);
	    if (me->inBoldH == FALSE)
		HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
	    HTML_put_string(me, (id_string ? id_string : href));
	    FREE(href);
	    if (me->inBoldH == FALSE)
		HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
	    HText_endAnchor(me->text, 0);
	    LYEnsureSingleSpace(me);
	    CAN_JUSTIFY_POP;
	} else {
	    CHECK_ID(HTML_FRAME_ID);
	}
	FREE(id_string);
	break;

    case HTML_NOFRAMES:
	LYEnsureDoubleSpace(me);
	LYResetParagraphAlignment(me);
	break;

    case HTML_IFRAME:
	if (present && present[HTML_IFRAME_NAME] &&
	    non_empty(value[HTML_IFRAME_NAME])) {
	    StrAllocCopy(id_string, value[HTML_IFRAME_NAME]);
	    TRANSLATE_AND_UNESCAPE_ENTITIES(&id_string, TRUE, FALSE);
	    LYTrimHead(id_string);
	    LYTrimTail(id_string);
	}
	if (present && present[HTML_IFRAME_SRC] &&
	    non_empty(value[HTML_IFRAME_SRC])) {
	    StrAllocCopy(href, value[HTML_IFRAME_SRC]);
	    LYLegitimizeHREF(me, &href, TRUE, TRUE);

	    if (me->inA)
		HTML_end_element(me, HTML_A, include);

	    me->CurrentA = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
						     NULL,	/* Tag */
						     href,	/* Addresss */
						     (HTLinkType *) 0);		/* Type */
	    LYEnsureDoubleSpace(me);
	    CAN_JUSTIFY_PUSH_F
		LYResetParagraphAlignment(me);
	    if (me->inUnderline == FALSE)
		HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
	    HTML_put_string(me, "IFRAME:");
	    if (me->inUnderline == FALSE)
		HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
	    HTML_put_character(me, ' ');

	    me->in_word = NO;
	    CHECK_ID(HTML_IFRAME_ID);
	    HText_beginAnchor(me->text, me->inUnderline, me->CurrentA);
	    if (me->inBoldH == FALSE)
		HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
	    HTML_put_string(me, (id_string ? id_string : href));
	    FREE(href);
	    if (me->inBoldH == FALSE)
		HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
	    HText_endAnchor(me->text, 0);
	    LYEnsureSingleSpace(me);
	    CAN_JUSTIFY_POP;
	} else {
	    CHECK_ID(HTML_IFRAME_ID);
	}
	FREE(id_string);
	break;

    case HTML_BANNER:
    case HTML_MARQUEE:
	change_paragraph_style(me, styles[HTML_BANNER]);
	UPDATE_STYLE;
	if (me->sp->tag_number == (int) ElementNumber)
	    LYEnsureDoubleSpace(me);
	/*
	 * Treat this as a toolbar if we don't have one yet, and we are in the
	 * first half of the first page.  - FM
	 */
	if ((!HText_hasToolbar(me->text) &&
	     HText_getLines(me->text) < (display_lines / 2)) &&
	    (ID_A = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
					      LYToolbarName,	/* Tag */
					      NULL,	/* Addresss */
					      (HTLinkType *) 0))) {	/* Type */
	    HText_beginAnchor(me->text, me->inUnderline, ID_A);
	    HText_endAnchor(me->text, 0);
	    HText_setToolbar(me->text);
	}
	CHECK_ID(HTML_GEN_ID);
	break;

    case HTML_CENTER:
    case HTML_DIV:
	if (me->Division_Level < (MAX_NESTING - 1)) {
	    me->Division_Level++;
	} else {
	    CTRACE((tfp,
		    "HTML: ****** Maximum nesting of %d divisions exceeded!\n",
		    MAX_NESTING));
	}
	if (me->inP)
	    LYEnsureSingleSpace(me);	/* always at least break line - kw */
	if (ElementNumber == HTML_CENTER) {
	    me->DivisionAlignments[me->Division_Level] = HT_CENTER;
	    change_paragraph_style(me, styles[HTML_DCENTER]);
	    UPDATE_STYLE;
	    me->current_default_alignment = styles[HTML_DCENTER]->alignment;
	} else if (me->List_Nesting_Level >= 0 &&
		   !(present && present[HTML_DIV_ALIGN] &&
		     value[HTML_DIV_ALIGN] &&
		     (!strcasecomp(value[HTML_DIV_ALIGN], "center") ||
		      !strcasecomp(value[HTML_DIV_ALIGN], "right")))) {
	    if (present && present[HTML_DIV_ALIGN])
		me->current_default_alignment = HT_LEFT;
	    else if (me->Division_Level == 0)
		me->current_default_alignment = HT_LEFT;
	    else if (me->sp[0].tag_number == HTML_UL ||
		     me->sp[0].tag_number == HTML_OL ||
		     me->sp[0].tag_number == HTML_MENU ||
		     me->sp[0].tag_number == HTML_DIR ||
		     me->sp[0].tag_number == HTML_LI ||
		     me->sp[0].tag_number == HTML_LH ||
		     me->sp[0].tag_number == HTML_DD)
		me->current_default_alignment = HT_LEFT;
	    LYHandlePlike(me, present, value, include, HTML_DIV_ALIGN, TRUE);
	    me->DivisionAlignments[me->Division_Level] = (short)
		me->current_default_alignment;
	} else if (present && present[HTML_DIV_ALIGN] &&
		   non_empty(value[HTML_DIV_ALIGN])) {
	    if (!strcasecomp(value[HTML_DIV_ALIGN], "center")) {
		me->DivisionAlignments[me->Division_Level] = HT_CENTER;
		change_paragraph_style(me, styles[HTML_DCENTER]);
		UPDATE_STYLE;
		me->current_default_alignment = styles[HTML_DCENTER]->alignment;
	    } else if (!strcasecomp(value[HTML_DIV_ALIGN], "right")) {
		me->DivisionAlignments[me->Division_Level] = HT_RIGHT;
		change_paragraph_style(me, styles[HTML_DRIGHT]);
		UPDATE_STYLE;
		me->current_default_alignment = styles[HTML_DRIGHT]->alignment;
	    } else {
		me->DivisionAlignments[me->Division_Level] = HT_LEFT;
		change_paragraph_style(me, styles[HTML_DLEFT]);
		UPDATE_STYLE;
		me->current_default_alignment = styles[HTML_DLEFT]->alignment;
	    }
	} else {
	    me->DivisionAlignments[me->Division_Level] = HT_LEFT;
	    change_paragraph_style(me, styles[HTML_DLEFT]);
	    UPDATE_STYLE;
	    me->current_default_alignment = styles[HTML_DLEFT]->alignment;
	}
	CHECK_ID(HTML_DIV_ID);
	break;

    case HTML_H1:
    case HTML_H2:
    case HTML_H3:
    case HTML_H4:
    case HTML_H5:
    case HTML_H6:
	/*
	 * Close the previous style if not done by HTML doc.  Added to get rid
	 * of core dumps in BAD HTML on the net.
	 *              GAB 07-07-94
	 * But then again, these are actually allowed to nest.  I guess I have
	 * to depend on the HTML writers correct style.
	 *              GAB 07-12-94
	 if (i_prior_style != -1) {
	 HTML_end_element(me, i_prior_style);
	 }
	 i_prior_style = ElementNumber;
	 */

	/*
	 * Check whether we have an H# in a list, and if so, treat it as an LH. 
	 * - FM
	 */
	if ((me->List_Nesting_Level >= 0) &&
	    (me->sp[0].tag_number == HTML_UL ||
	     me->sp[0].tag_number == HTML_OL ||
	     me->sp[0].tag_number == HTML_MENU ||
	     me->sp[0].tag_number == HTML_DIR ||
	     me->sp[0].tag_number == HTML_LI)) {
	    if (HTML_dtd.tags[HTML_LH].contents == SGML_EMPTY) {
		ElementNumber = HTML_LH;
	    } else {
		me->new_style = me->sp[0].style;
		ElementNumber = (HTMLElement) me->sp[0].tag_number;
		UPDATE_STYLE;
	    }
	    /*
	     * Some authors use H# headers as a substitute for FONT, so check
	     * if this one immediately followed an LI.  If so, both me->inP and
	     * me->in_word will be FALSE (though the line might not be empty
	     * due to a bullet and/or nbsp) and we can assume it is just for a
	     * FONT change.  We thus will not create another line break nor add
	     * to the current left indentation.  - FM
	     */
	    if (!(me->inP == FALSE && me->in_word == NO)) {
		HText_appendParagraph(me->text);
		HTML_put_character(me, HT_NON_BREAK_SPACE);
		HText_setLastChar(me->text, ' ');
		me->in_word = NO;
		me->inP = FALSE;
	    }
	    CHECK_ID(HTML_H_ID);
	    break;
	}

	if (present && present[HTML_H_ALIGN] &&
	    non_empty(value[HTML_H_ALIGN])) {
	    if (!strcasecomp(value[HTML_H_ALIGN], "center"))
		change_paragraph_style(me, styles[HTML_HCENTER]);
	    else if (!strcasecomp(value[HTML_H_ALIGN], "right"))
		change_paragraph_style(me, styles[HTML_HRIGHT]);
	    else if (!strcasecomp(value[HTML_H_ALIGN], "left") ||
		     !strcasecomp(value[HTML_H_ALIGN], "justify"))
		change_paragraph_style(me, styles[HTML_HLEFT]);
	    else
		change_paragraph_style(me, styles[ElementNumber]);
	} else if (me->Division_Level >= 0) {
	    if (me->DivisionAlignments[me->Division_Level] == HT_CENTER) {
		change_paragraph_style(me, styles[HTML_HCENTER]);
	    } else if (me->DivisionAlignments[me->Division_Level] == HT_LEFT) {
		change_paragraph_style(me, styles[HTML_HLEFT]);
	    } else if (me->DivisionAlignments[me->Division_Level] == HT_RIGHT) {
		change_paragraph_style(me, styles[HTML_HRIGHT]);
	    }
	} else {
	    change_paragraph_style(me, styles[ElementNumber]);
	}
	UPDATE_STYLE;
	CHECK_ID(HTML_H_ID);

	if ((bold_headers == TRUE ||
	     (ElementNumber == HTML_H1 && bold_H1 == TRUE)) &&
	    (styles[ElementNumber]->font & HT_BOLD)) {
	    if (me->inBoldA == FALSE && me->inBoldH == FALSE) {
		HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
	    }
	    me->inBoldH = TRUE;
	}
	break;

    case HTML_P:
	LYHandlePlike(me, present, value, include, HTML_P_ALIGN, TRUE);
	CHECK_ID(HTML_P_ID);
	break;

    case HTML_BR:
	UPDATE_STYLE;
	CHECK_ID(HTML_GEN_ID);
	/* Add a \r (new line) if these three conditions are true:
	 *   1. We are not collapsing BR's, and
	 *   2. The previous line has text on it, or
	 *   3. This line has text on it.
	 * Otherwise, don't do anything. -DH 980814, TD 980827
	 */
	if ((LYCollapseBRs == FALSE &&
	     !HText_PreviousLineEmpty(me->text, FALSE)) ||
	    !HText_LastLineEmpty(me->text, FALSE)) {
	    HText_setLastChar(me->text, ' ');	/* absorb white space */
	    HText_appendCharacter(me->text, '\r');
	}
	me->in_word = NO;
	me->inP = FALSE;
	break;

    case HTML_WBR:
	UPDATE_STYLE;
	CHECK_ID(HTML_GEN_ID);
	HText_setBreakPoint(me->text);
	break;

    case HTML_HY:
    case HTML_SHY:
	UPDATE_STYLE;
	CHECK_ID(HTML_GEN_ID);
	HText_appendCharacter(me->text, LY_SOFT_HYPHEN);
	break;

    case HTML_HR:
	{
	    int width;

	    /*
	     * Start a new line only if we had printable characters following
	     * the previous newline, or remove the previous line if both it and
	     * the last line are blank.  - FM
	     */
	    UPDATE_STYLE;
	    if (!HText_LastLineEmpty(me->text, FALSE)) {
		HText_setLastChar(me->text, ' ');	/* absorb white space */
		HText_appendCharacter(me->text, '\r');
	    } else if (HText_PreviousLineEmpty(me->text, FALSE)) {
		HText_RemovePreviousLine(me->text);
	    }
	    me->in_word = NO;
	    me->inP = FALSE;

	    /*
	     * Add an ID link if needed.  - FM
	     */
	    CHECK_ID(HTML_HR_ID);

	    /*
	     * Center lines within the current margins, if a right or left
	     * ALIGNment is not specified.  If WIDTH="#%" is given and not
	     * garbage, use that to calculate the width, otherwise use the
	     * default width.  - FM
	     */
	    if (present && present[HTML_HR_ALIGN] && value[HTML_HR_ALIGN]) {
		if (!strcasecomp(value[HTML_HR_ALIGN], "right")) {
		    me->sp->style->alignment = HT_RIGHT;
		} else if (!strcasecomp(value[HTML_HR_ALIGN], "left")) {
		    me->sp->style->alignment = HT_LEFT;
		} else {
		    me->sp->style->alignment = HT_CENTER;
		}
	    } else {
		me->sp->style->alignment = HT_CENTER;
	    }
	    width = LYcolLimit -
		me->new_style->leftIndent - me->new_style->rightIndent;
	    if (present && present[HTML_HR_WIDTH] && value[HTML_HR_WIDTH] &&
		isdigit(UCH(*value[HTML_HR_WIDTH])) &&
		value[HTML_HR_WIDTH][strlen(value[HTML_HR_WIDTH]) - 1] == '%') {
		char *percent = NULL;
		int Percent, Width;

		StrAllocCopy(percent, value[HTML_HR_WIDTH]);
		percent[strlen(percent) - 1] = '\0';
		Percent = atoi(percent);
		if (Percent > 100 || Percent < 1)
		    width -= 5;
		else {
		    Width = (width * Percent) / 100;
		    if (Width < 1)
			width = 1;
		    else
			width = Width;
		}
		FREE(percent);
	    } else {
		width -= 5;
	    }
	    for (i = 0; i < width; i++)
		HTML_put_character(me, '_');
	    HText_appendCharacter(me->text, '\r');
	    me->in_word = NO;
	    me->inP = FALSE;

	    /*
	     * Reset the alignment appropriately for the division and/or block. 
	     * - FM
	     */
	    if (me->List_Nesting_Level < 0 &&
		me->Division_Level >= 0) {
		me->sp->style->alignment =
		    me->DivisionAlignments[me->Division_Level];
	    } else if (me->sp->style->id == ST_HeadingCenter ||
		       me->sp->style->id == ST_Heading1) {
		me->sp->style->alignment = HT_CENTER;
	    } else if (me->sp->style->id == ST_HeadingRight) {
		me->sp->style->alignment = HT_RIGHT;
	    } else {
		me->sp->style->alignment = HT_LEFT;
	    }

	    /*
	     * Add a blank line and set the second line indentation for lists
	     * and addresses, or a paragraph separator for other blocks.  - FM
	     */
	    if (me->List_Nesting_Level >= 0 ||
		me->sp[0].tag_number == HTML_ADDRESS) {
		HText_setLastChar(me->text, ' ');	/* absorb white space */
		HText_appendCharacter(me->text, '\r');
	    } else {
		HText_appendParagraph(me->text);
	    }
	}
	break;

    case HTML_TAB:
	if (!present) {		/* Bad tag.  Must have at least one attribute. - FM */
	    CTRACE((tfp, "HTML: TAB tag has no attributes.  Ignored.\n"));
	    break;
	}
	/*
	 * If page author is using TAB within a TABLE, it's probably formatted
	 * specifically to work well for Lynx without simple table tracking
	 * code.  Cancel tracking, it would only make things worse.  - kw
	 */
	HText_cancelStbl(me->text);
	UPDATE_STYLE;

	CANT_JUSTIFY_THIS_LINE;
	if (present[HTML_TAB_ALIGN] && value[HTML_TAB_ALIGN] &&
	    (strcasecomp(value[HTML_TAB_ALIGN], "left") ||
	     !(present[HTML_TAB_TO] || present[HTML_TAB_INDENT]))) {
	    /*
	     * Just ensure a collapsible space, until we have the ALIGN and DP
	     * attributes implemented.  - FM
	     */
	    HTML_put_character(me, ' ');
	    CTRACE((tfp,
		    "HTML: ALIGN not 'left'.  Using space instead of TAB.\n"));

	} else if (!LYoverride_default_alignment(me) &&
		   me->current_default_alignment != HT_LEFT) {
	    /*
	     * Just ensure a collapsible space, until we can replace
	     * HText_getCurrentColumn() in GridText.c with code which doesn't
	     * require that the alignment be HT_LEFT.  - FM
	     */
	    HTML_put_character(me, ' ');
	    CTRACE((tfp, "HTML: Not HT_LEFT.  Using space instead of TAB.\n"));

	} else if ((present[HTML_TAB_TO] &&
		    non_empty(value[HTML_TAB_TO])) ||
		   (present[HTML_TAB_INDENT] &&
		    value[HTML_TAB_INDENT] &&
		    isdigit(UCH(*value[HTML_TAB_INDENT])))) {
	    int column, target = -1;
	    int enval = 2;

	    column = HText_getCurrentColumn(me->text);
	    if (present[HTML_TAB_TO] &&
		non_empty(value[HTML_TAB_TO])) {
		/*
		 * TO has priority over INDENT if both are present.  - FM
		 */
		StrAllocCopy(temp, value[HTML_TAB_TO]);
		TRANSLATE_AND_UNESCAPE_TO_STD(&temp);
		if (*temp) {
		    target = HText_getTabIDColumn(me->text, temp);
		}
	    } else if (isEmpty(temp) && present[HTML_TAB_INDENT] &&
		       value[HTML_TAB_INDENT] &&
		       isdigit(UCH(*value[HTML_TAB_INDENT]))) {
		/*
		 * The INDENT value is in "en" (enval per column) units.
		 * Divide it by enval, rounding odd values up.  - FM
		 */
		target =
		    (int) (((1.0 * atoi(value[HTML_TAB_INDENT])) / enval) + (0.5));
	    }
	    FREE(temp);
	    /*
	     * If we are being directed to a column too far to the left or
	     * right, just add a collapsible space, otherwise, add the
	     * appropriate number of spaces.  - FM
	     */

	    if (target < column ||
		target > HText_getMaximumColumn(me->text)) {
		HTML_put_character(me, ' ');
		CTRACE((tfp,
			"HTML: Column out of bounds.  Using space instead of TAB.\n"));
	    } else {
		for (i = column; i < target; i++)
		    HText_appendCharacter(me->text, ' ');
		HText_setLastChar(me->text, ' ');	/* absorb white space */
	    }
	}
	me->in_word = NO;

	/*
	 * If we have an ID attribute, save it together with the value of the
	 * column we've reached.  - FM
	 */
	if (present[HTML_TAB_ID] &&
	    non_empty(value[HTML_TAB_ID])) {
	    StrAllocCopy(temp, value[HTML_TAB_ID]);
	    TRANSLATE_AND_UNESCAPE_TO_STD(&temp);
	    if (*temp)
		HText_setTabID(me->text, temp);
	    FREE(temp);
	}
	break;

    case HTML_BASEFONT:
	break;

    case HTML_FONT:

	/*
	 * FONT *may* have been declared SGML_EMPTY in HTMLDTD.c, and
	 * SGML_character() in SGML.c *may* check for a FONT end tag to call
	 * HTML_end_element() directly (with a check in that to bypass
	 * decrementing of the HTML parser's stack).  Or this may have been
	 * really a </FONT> end tag, for which some incarnations of SGML.c
	 * would fake a <FONT> start tag instead.  - fm & kw
	 *
	 * But if we have an open FONT, DON'T close that one now, since FONT
	 * tags can be legally nested AFAIK, and Lynx currently doesn't do
	 * anything with them anyway...  - kw
	 */
#ifdef NOTUSED_FOTEMODS
	if (me->inFONT == TRUE)
	    HTML_end_element(me, HTML_FONT, &include);
#endif /* NOTUSED_FOTEMODS */

	/*
	 * Set flag to know we are in a FONT container, and add code to do
	 * something about it, someday.  - FM
	 */
	me->inFONT = TRUE;
	break;

    case HTML_B:		/* Physical character highlighting */
    case HTML_BLINK:
    case HTML_I:
    case HTML_U:

    case HTML_CITE:		/* Logical character highlighting */
    case HTML_EM:
    case HTML_STRONG:
	UPDATE_STYLE;
	me->Underline_Level++;
	CHECK_ID(HTML_GEN_ID);
	/*
	 * Ignore this if inside of a bold anchor or header.  Can't display
	 * both underline and bold at same time.
	 */
	if (me->inBoldA == TRUE || me->inBoldH == TRUE) {
	    CTRACE((tfp, "Underline Level is %d\n", me->Underline_Level));
	    break;
	}
	if (me->inUnderline == FALSE) {
	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
	    me->inUnderline = TRUE;
	    CTRACE((tfp, "Beginning underline\n"));
	} else {
	    CTRACE((tfp, "Underline Level is %d\n", me->Underline_Level));
	}
	break;

    case HTML_ABBR:		/* Miscellaneous character containers */
    case HTML_ACRONYM:
    case HTML_AU:
    case HTML_AUTHOR:
    case HTML_BIG:
    case HTML_CODE:
    case HTML_DFN:
    case HTML_KBD:
    case HTML_SAMP:
    case HTML_SMALL:
    case HTML_TT:
    case HTML_VAR:
	CHECK_ID(HTML_GEN_ID);
	break;			/* ignore */

    case HTML_SUP:
	HText_appendCharacter(me->text, '^');
	CHECK_ID(HTML_GEN_ID);
	break;

    case HTML_SUB:
	HText_appendCharacter(me->text, '[');
	CHECK_ID(HTML_GEN_ID);
	break;

    case HTML_DEL:
    case HTML_S:
    case HTML_STRIKE:
	CHECK_ID(HTML_GEN_ID);
	if (me->inUnderline == FALSE)
	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
	HTML_put_string(me, "[DEL:");
	if (me->inUnderline == FALSE)
	    HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
	HTML_put_character(me, ' ');
	me->in_word = NO;
	break;

    case HTML_INS:
	CHECK_ID(HTML_GEN_ID);
	if (me->inUnderline == FALSE)
	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
	HTML_put_string(me, "[INS:");
	if (me->inUnderline == FALSE)
	    HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
	HTML_put_character(me, ' ');
	me->in_word = NO;
	break;

    case HTML_Q:
	CHECK_ID(HTML_GEN_ID);
	/*
	 * Should check LANG and/or DIR attributes, and the
	 * me->node_anchor->charset and/or yet to be added structure elements,
	 * to determine whether we should use chevrons, but for now we'll
	 * always use double- or single-quotes.  - FM
	 */
	if (!(me->Quote_Level & 1))
	    HTML_put_character(me, '"');
	else
	    HTML_put_character(me, '`');
	me->Quote_Level++;
	break;

    case HTML_PRE:		/* Formatted text */
	/*
	 * Set our inPRE flag to FALSE so that a newline immediately following
	 * the PRE start tag will be ignored.  HTML_put_character() will set it
	 * to TRUE when the first character within the PRE block is received. 
	 * - FM
	 */
	me->inPRE = FALSE;
	/* FALLTHRU */
    case HTML_LISTING:		/* Literal text */
	/* FALLTHRU */
    case HTML_XMP:
	/* FALLTHRU */
    case HTML_PLAINTEXT:
	change_paragraph_style(me, styles[ElementNumber]);
	UPDATE_STYLE;
	CHECK_ID(HTML_GEN_ID);
	if (me->comment_end)
	    HText_appendText(me->text, me->comment_end);
	break;

    case HTML_BLOCKQUOTE:
    case HTML_BQ:
	change_paragraph_style(me, styles[ElementNumber]);
	UPDATE_STYLE;
	if (me->sp->tag_number == (int) ElementNumber)
	    LYEnsureDoubleSpace(me);
	CHECK_ID(HTML_BQ_ID);
	break;

    case HTML_NOTE:
	change_paragraph_style(me, styles[ElementNumber]);
	UPDATE_STYLE;
	if (me->sp->tag_number == (int) ElementNumber)
	    LYEnsureDoubleSpace(me);
	CHECK_ID(HTML_NOTE_ID);
	{
	    char *note = NULL;

	    /*
	     * Indicate the type of NOTE.
	     */
	    if (present && present[HTML_NOTE_CLASS] &&
		value[HTML_NOTE_CLASS] &&
		(!strcasecomp(value[HTML_NOTE_CLASS], "CAUTION") ||
		 !strcasecomp(value[HTML_NOTE_CLASS], "WARNING"))) {
		StrAllocCopy(note, value[HTML_NOTE_CLASS]);
		LYUpperCase(note);
		StrAllocCat(note, ":");
	    } else if (present && present[HTML_NOTE_ROLE] &&
		       value[HTML_NOTE_ROLE] &&
		       (!strcasecomp(value[HTML_NOTE_ROLE], "CAUTION") ||
			!strcasecomp(value[HTML_NOTE_ROLE], "WARNING"))) {
		StrAllocCopy(note, value[HTML_NOTE_ROLE]);
		LYUpperCase(note);
		StrAllocCat(note, ":");
	    } else {
		StrAllocCopy(note, "NOTE:");
	    }
	    if (me->inUnderline == FALSE)
		HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
	    HTML_put_string(me, note);
	    if (me->inUnderline == FALSE)
		HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
	    HTML_put_character(me, ' ');
	    CAN_JUSTIFY_START;
	    FREE(note);
	}
	CAN_JUSTIFY_START;
	me->inLABEL = TRUE;
	me->in_word = NO;
	me->inP = FALSE;
	break;

    case HTML_ADDRESS:
	change_paragraph_style(me, styles[ElementNumber]);
	UPDATE_STYLE;
	if (me->sp->tag_number == (int) ElementNumber)
	    LYEnsureDoubleSpace(me);
	CHECK_ID(HTML_ADDRESS_ID);
	break;

    case HTML_DL:
	me->List_Nesting_Level++;	/* increment the List nesting level */
	if (me->List_Nesting_Level <= 0) {
	    change_paragraph_style(me, present && present[HTML_DL_COMPACT]
				   ? styles[HTML_DLC] : styles[HTML_DL]);

	} else if (me->List_Nesting_Level >= 6) {
	    change_paragraph_style(me, present && present[HTML_DL_COMPACT]
				   ? styles[HTML_DLC6] : styles[HTML_DL6]);

	} else {
	    change_paragraph_style(me, present && present[HTML_DL_COMPACT]
				   ? styles[(HTML_DLC1 - 1) + me->List_Nesting_Level]
				   : styles[(HTML_DL1 - 1) + me->List_Nesting_Level]);
	}
	UPDATE_STYLE;		/* update to the new style */
	CHECK_ID(HTML_DL_ID);

	break;

    case HTML_DLC:
	me->List_Nesting_Level++;	/* increment the List nesting level */
	if (me->List_Nesting_Level <= 0) {
	    change_paragraph_style(me, styles[HTML_DLC]);

	} else if (me->List_Nesting_Level >= 6) {
	    change_paragraph_style(me, styles[HTML_DLC6]);

	} else {
	    change_paragraph_style(me,
				   styles[(HTML_DLC1 - 1) + me->List_Nesting_Level]);
	}
	UPDATE_STYLE;		/* update to the new style */
	CHECK_ID(HTML_DL_ID);
	break;

    case HTML_DT:
	CHECK_ID(HTML_GEN_ID);
	if (!me->style_change) {
	    BOOL in_line_1 = HText_inLineOne(me->text);
	    HTCoord saved_spaceBefore = me->sp->style->spaceBefore;
	    HTCoord saved_spaceAfter = me->sp->style->spaceAfter;

	    /*
	     * If there are several DT elements and this is not the first, and
	     * the preceding DT element's first (and normally only) line has
	     * not yet been ended, suppress intervening blank line by
	     * temporarily modifying the paragraph style in place.  Ugly but
	     * there's ample precedence.  - kw
	     */
	    if (in_line_1) {
		me->sp->style->spaceBefore = 0;		/* temporary change */
		me->sp->style->spaceAfter = 0;	/* temporary change */
	    }
	    HText_appendParagraph(me->text);
	    me->sp->style->spaceBefore = saved_spaceBefore;	/* undo */
	    me->sp->style->spaceAfter = saved_spaceAfter;	/* undo */
	    me->in_word = NO;
	    me->sp->style->alignment = HT_LEFT;
	}
	me->inP = FALSE;
	break;

    case HTML_DD:
	CHECK_ID(HTML_GEN_ID);
	HText_setLastChar(me->text, ' ');	/* absorb white space */
	if (!me->style_change) {
	    if (!HText_LastLineEmpty(me->text, FALSE)) {
		HText_appendCharacter(me->text, '\r');
	    } else {
		HText_NegateLineOne(me->text);
	    }
	} else {
	    UPDATE_STYLE;
	    HText_appendCharacter(me->text, '\t');
	}
	me->sp->style->alignment = HT_LEFT;
	me->in_word = NO;
	me->inP = FALSE;
	break;

    case HTML_OL:
	/*
	 * Set the default TYPE.
	 */
	me->OL_Type[(me->List_Nesting_Level < 11 ?
		     me->List_Nesting_Level + 1 : 11)] = '1';

	/*
	 * Check whether we have a starting sequence number, or want to
	 * continue the numbering from a previous OL in this nest.  - FM
	 */
	if (present && (present[HTML_OL_SEQNUM] || present[HTML_OL_START])) {
	    int seqnum;

	    /*
	     * Give preference to the valid HTML 3.0 SEQNUM attribute name over
	     * the Netscape START attribute name (too bad the Netscape
	     * developers didn't read the HTML 3.0 specs before re-inventing
	     * the "wheel" as "we'll").  - FM
	     */
	    if (present[HTML_OL_SEQNUM] &&
		non_empty(value[HTML_OL_SEQNUM])) {
		seqnum = atoi(value[HTML_OL_SEQNUM]);
	    } else if (present[HTML_OL_START] &&
		       non_empty(value[HTML_OL_START])) {
		seqnum = atoi(value[HTML_OL_START]);
	    } else {
		seqnum = 1;
	    }

	    /*
	     * Don't allow negative numbers less than or equal to our flags, or
	     * numbers less than 1 if an Alphabetic or Roman TYPE.  - FM
	     */
	    if (present[HTML_OL_TYPE] && value[HTML_OL_TYPE]) {
		if (*value[HTML_OL_TYPE] == 'A') {
		    me->OL_Type[(me->List_Nesting_Level < 11 ?
				 me->List_Nesting_Level + 1 : 11)] = 'A';
		    if (seqnum < 1)
			seqnum = 1;
		} else if (*value[HTML_OL_TYPE] == 'a') {
		    me->OL_Type[(me->List_Nesting_Level < 11 ?
				 me->List_Nesting_Level + 1 : 11)] = 'a';
		    if (seqnum < 1)
			seqnum = 1;
		} else if (*value[HTML_OL_TYPE] == 'I') {
		    me->OL_Type[(me->List_Nesting_Level < 11 ?
				 me->List_Nesting_Level + 1 : 11)] = 'I';
		    if (seqnum < 1)
			seqnum = 1;
		} else if (*value[HTML_OL_TYPE] == 'i') {
		    me->OL_Type[(me->List_Nesting_Level < 11 ?
				 me->List_Nesting_Level + 1 : 11)] = 'i';
		    if (seqnum < 1)
			seqnum = 1;
		} else {
		    if (seqnum <= OL_VOID)
			seqnum = OL_VOID + 1;
		}
	    } else if (seqnum <= OL_VOID) {
		seqnum = OL_VOID + 1;
	    }

	    me->OL_Counter[(me->List_Nesting_Level < 11 ?
			    me->List_Nesting_Level + 1 : 11)] = seqnum;

	} else if (present && present[HTML_OL_CONTINUE]) {
	    me->OL_Counter[me->List_Nesting_Level < 11 ?
			   me->List_Nesting_Level + 1 : 11] = OL_CONTINUE;

	} else {
	    me->OL_Counter[(me->List_Nesting_Level < 11 ?
			    me->List_Nesting_Level + 1 : 11)] = 1;
	    if (present && present[HTML_OL_TYPE] && value[HTML_OL_TYPE]) {
		if (*value[HTML_OL_TYPE] == 'A') {
		    me->OL_Type[(me->List_Nesting_Level < 11 ?
				 me->List_Nesting_Level + 1 : 11)] = 'A';
		} else if (*value[HTML_OL_TYPE] == 'a') {
		    me->OL_Type[(me->List_Nesting_Level < 11 ?
				 me->List_Nesting_Level + 1 : 11)] = 'a';
		} else if (*value[HTML_OL_TYPE] == 'I') {
		    me->OL_Type[(me->List_Nesting_Level < 11 ?
				 me->List_Nesting_Level + 1 : 11)] = 'I';
		} else if (*value[HTML_OL_TYPE] == 'i') {
		    me->OL_Type[(me->List_Nesting_Level < 11 ?
				 me->List_Nesting_Level + 1 : 11)] = 'i';
		}
	    }
	}
	me->List_Nesting_Level++;

	if (me->List_Nesting_Level <= 0) {
	    change_paragraph_style(me, styles[ElementNumber]);

	} else if (me->List_Nesting_Level >= 6) {
	    change_paragraph_style(me, styles[HTML_OL6]);

	} else {
	    change_paragraph_style(me,
				   styles[HTML_OL1 + me->List_Nesting_Level - 1]);
	}
	UPDATE_STYLE;		/* update to the new style */
	CHECK_ID(HTML_OL_ID);
	break;

    case HTML_UL:
	me->List_Nesting_Level++;

	if (me->List_Nesting_Level <= 0) {
	    if (!(present && present[HTML_UL_PLAIN]) &&
		!(present && present[HTML_UL_TYPE] &&
		  value[HTML_UL_TYPE] &&
		  0 == strcasecomp(value[HTML_UL_TYPE], "PLAIN"))) {
		change_paragraph_style(me, styles[ElementNumber]);
	    } else {
		change_paragraph_style(me, styles[HTML_DIR]);
		ElementNumber = HTML_DIR;
	    }

	} else if (me->List_Nesting_Level >= 6) {
	    if (!(present && present[HTML_UL_PLAIN]) &&
		!(present && present[HTML_UL_TYPE] &&
		  value[HTML_UL_TYPE] &&
		  0 == strcasecomp(value[HTML_UL_TYPE], "PLAIN"))) {
		change_paragraph_style(me, styles[HTML_OL6]);
	    } else {
		change_paragraph_style(me, styles[HTML_MENU6]);
		ElementNumber = HTML_DIR;
	    }

	} else {
	    if (!(present && present[HTML_UL_PLAIN]) &&
		!(present && present[HTML_UL_TYPE] &&
		  value[HTML_UL_TYPE] &&
		  0 == strcasecomp(value[HTML_UL_TYPE], "PLAIN"))) {
		change_paragraph_style(me,
				       styles[HTML_OL1 + me->List_Nesting_Level
					      - 1]);
	    } else {
		change_paragraph_style(me,
				       styles[HTML_MENU1 + me->List_Nesting_Level
					      - 1]);
		ElementNumber = HTML_DIR;
	    }
	}
	UPDATE_STYLE;		/* update to the new style */
	CHECK_ID(HTML_UL_ID);
	break;

    case HTML_MENU:
    case HTML_DIR:
	me->List_Nesting_Level++;

	if (me->List_Nesting_Level <= 0) {
	    change_paragraph_style(me, styles[ElementNumber]);

	} else if (me->List_Nesting_Level >= 6) {
	    change_paragraph_style(me, styles[HTML_MENU6]);

	} else {
	    change_paragraph_style(me,
				   styles[HTML_MENU1 + me->List_Nesting_Level
					  - 1]);
	}
	UPDATE_STYLE;		/* update to the new style */
	CHECK_ID(HTML_UL_ID);
	break;

    case HTML_LH:
	UPDATE_STYLE;		/* update to the new style */
	HText_appendParagraph(me->text);
	CHECK_ID(HTML_GEN_ID);
	HTML_put_character(me, HT_NON_BREAK_SPACE);
	HText_setLastChar(me->text, ' ');
	me->in_word = NO;
	me->inP = FALSE;
	break;

    case HTML_LI:
	UPDATE_STYLE;		/* update to the new style */
	HText_appendParagraph(me->text);
	me->sp->style->alignment = HT_LEFT;
	CHECK_ID(HTML_LI_ID);
	{
	    int surrounding_tag_number = me->sp[0].tag_number;

	    /*
	     * No, a LI should never occur directly within another LI, but this
	     * may result from incomplete error recovery.  So check one more
	     * surrounding level in this case.  - kw
	     */
	    if (surrounding_tag_number == HTML_LI &&
		me->sp < (me->stack + MAX_NESTING - 1))
		surrounding_tag_number = me->sp[1].tag_number;
	    if (surrounding_tag_number == HTML_OL) {
		char number_string[20];
		int counter, seqnum;
		char seqtype;

		counter = me->List_Nesting_Level < 11 ?
		    me->List_Nesting_Level : 11;
		if (present && present[HTML_LI_TYPE] && value[HTML_LI_TYPE]) {
		    if (*value[HTML_LI_TYPE] == '1') {
			me->OL_Type[counter] = '1';
		    } else if (*value[HTML_LI_TYPE] == 'A') {
			me->OL_Type[counter] = 'A';
		    } else if (*value[HTML_LI_TYPE] == 'a') {
			me->OL_Type[counter] = 'a';
		    } else if (*value[HTML_LI_TYPE] == 'I') {
			me->OL_Type[counter] = 'I';
		    } else if (*value[HTML_LI_TYPE] == 'i') {
			me->OL_Type[counter] = 'i';
		    }
		}
		if (present && present[HTML_LI_VALUE] &&
		    ((value[HTML_LI_VALUE] != NULL) &&
		     (*value[HTML_LI_VALUE] != '\0')) &&
		    ((isdigit(UCH(*value[HTML_LI_VALUE]))) ||
		     (*value[HTML_LI_VALUE] == '-' &&
		      isdigit(UCH(*(value[HTML_LI_VALUE] + 1)))))) {
		    seqnum = atoi(value[HTML_LI_VALUE]);
		    if (seqnum <= OL_VOID)
			seqnum = OL_VOID + 1;
		    seqtype = me->OL_Type[counter];
		    if (seqtype != '1' && seqnum < 1)
			seqnum = 1;
		    me->OL_Counter[counter] = seqnum + 1;
		} else if (me->OL_Counter[counter] >= OL_VOID) {
		    seqnum = me->OL_Counter[counter]++;
		    seqtype = me->OL_Type[counter];
		    if (seqtype != '1' && seqnum < 1) {
			seqnum = 1;
			me->OL_Counter[counter] = seqnum + 1;
		    }
		} else {
		    seqnum = me->Last_OL_Count + 1;
		    seqtype = me->Last_OL_Type;
		    for (i = (counter - 1); i >= 0; i--) {
			if (me->OL_Counter[i] > OL_VOID) {
			    seqnum = me->OL_Counter[i]++;
			    seqtype = me->OL_Type[i];
			    i = 0;
			}
		    }
		}
		if (seqtype == 'A') {
		    strcpy(number_string, LYUppercaseA_OL_String(seqnum));
		} else if (seqtype == 'a') {
		    strcpy(number_string, LYLowercaseA_OL_String(seqnum));
		} else if (seqtype == 'I') {
		    strcpy(number_string, LYUppercaseI_OL_String(seqnum));
		} else if (seqtype == 'i') {
		    strcpy(number_string, LYLowercaseI_OL_String(seqnum));
		} else {
		    sprintf(number_string, "%2d.", seqnum);
		}
		me->Last_OL_Count = seqnum;
		me->Last_OL_Type = seqtype;
		/*
		 * Hack, because there is no append string!
		 */
		for (i = 0; number_string[i] != '\0'; i++)
		    if (number_string[i] == ' ')
			HTML_put_character(me, HT_NON_BREAK_SPACE);
		    else
			HTML_put_character(me, number_string[i]);

		/*
		 * Use HTML_put_character so that any other spaces coming
		 * through will be collapsed.  We'll use nbsp, so it won't
		 * break at the spacing character if there are no spaces in the
		 * subsequent text up to the right margin, but will declare it
		 * as a normal space to ensure collapsing if a normal space
		 * does immediately follow it.  - FM
		 */
		HTML_put_character(me, HT_NON_BREAK_SPACE);
		HText_setLastChar(me->text, ' ');
	    } else if (surrounding_tag_number == HTML_UL) {
		/*
		 * Hack, because there is no append string!
		 */
		HTML_put_character(me, HT_NON_BREAK_SPACE);
		HTML_put_character(me, HT_NON_BREAK_SPACE);
		switch (me->List_Nesting_Level % 7) {
		case 0:
		    HTML_put_character(me, '*');
		    break;
		case 1:
		    HTML_put_character(me, '+');
		    break;
		case 2:
		    HTML_put_character(me, 'o');
		    break;
		case 3:
		    HTML_put_character(me, '#');
		    break;
		case 4:
		    HTML_put_character(me, '@');
		    break;
		case 5:
		    HTML_put_character(me, '-');
		    break;
		case 6:
		    HTML_put_character(me, '=');
		    break;

		}
		/*
		 * Keep using HTML_put_character so that any other spaces
		 * coming through will be collapsed.  We use nbsp, so we won't
		 * wrap at the spacing character if there are no spaces in the
		 * subsequent text up to the right margin, but will declare it
		 * as a normal space to ensure collapsing if a normal space
		 * does immediately follow it.  - FM
		 */
		HTML_put_character(me, HT_NON_BREAK_SPACE);
		HText_setLastChar(me->text, ' ');
	    } else {
		/*
		 * Hack, because there is no append string!
		 */
		HTML_put_character(me, HT_NON_BREAK_SPACE);
		HTML_put_character(me, HT_NON_BREAK_SPACE);
		HText_setLastChar(me->text, ' ');
	    }
	}
	CAN_JUSTIFY_START;
	me->in_word = NO;
	me->inP = FALSE;
	break;

    case HTML_SPAN:
	CHECK_ID(HTML_GEN_ID);
	/*
	 * Should check LANG and/or DIR attributes, and the
	 * me->node_anchor->charset and/or yet to be added structure elements,
	 * and do something here.  - FM
	 */
	break;

    case HTML_BDO:
	CHECK_ID(HTML_GEN_ID);
	/*
	 * Should check DIR (and LANG) attributes, and the
	 * me->node_anchor->charset and/or yet to be added structure elements,
	 * and do something here.  - FM
	 */
	break;

    case HTML_SPOT:
	CHECK_ID(HTML_GEN_ID);
	break;

    case HTML_FN:
	change_paragraph_style(me, styles[ElementNumber]);
	UPDATE_STYLE;
	if (me->sp->tag_number == (int) ElementNumber)
	    LYEnsureDoubleSpace(me);
	CHECK_ID(HTML_GEN_ID);
	if (me->inUnderline == FALSE)
	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
	HTML_put_string(me, "FOOTNOTE:");
	if (me->inUnderline == FALSE)
	    HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
	HTML_put_character(me, ' ');
	CAN_JUSTIFY_START
	    me->inLABEL = TRUE;
	me->in_word = NO;
	me->inP = FALSE;
	break;

    case HTML_A:
	/*
	 * If we are looking for client-side image maps, then handle an A
	 * within a MAP that has a COORDS attribute as an AREA tag. 
	 * Unfortunately we lose the anchor text this way for the LYNXIMGMAP,
	 * we would have to do much more parsing to collect it.  After
	 * potentially handling the A as AREA, always return immediately if
	 * only looking for image maps, without pushing anything on the style
	 * stack.  - kw
	 */
	if (me->map_address && present && present[HTML_A_COORDS])
	    LYStartArea(me,
			present[HTML_A_HREF] ? value[HTML_A_HREF] : NULL,
			NULL,
			present[HTML_A_TITLE] ? value[HTML_A_TITLE] : NULL,
			tag_charset);
	if (LYMapsOnly) {
	    return HT_OK;
	}
	/*
	 * A may have been declared SGML_EMPTY in HTMLDTD.c, and
	 * SGML_character() in SGML.c may check for an A end tag to call
	 * HTML_end_element() directly (with a check in that to bypass
	 * decrementing of the HTML parser's stack), so if we have an open A,
	 * close that one now.  - FM & kw
	 */
	if (me->inA) {
	    SET_SKIP_STACK(HTML_A);
	    HTML_end_element(me, HTML_A, include);
	}
	/*
	 * Set to know we are in an anchor.
	 */
	me->inA = TRUE;

	/*
	 * Load id_string if we have an ID or NAME.  - FM
	 */
	if (present && present[HTML_A_ID] &&
	    non_empty(value[HTML_A_ID])) {
	    StrAllocCopy(id_string, value[HTML_A_ID]);
	} else if (present && present[HTML_A_NAME] &&
		   non_empty(value[HTML_A_NAME])) {
	    StrAllocCopy(id_string, value[HTML_A_NAME]);
	}
	if (id_string)
	    TRANSLATE_AND_UNESCAPE_TO_STD(&id_string);

	/*
	 * Handle the reference.  - FM
	 */
	if (present && present[HTML_A_HREF]) {
	    /*
	     * Set to know we are making the content bold.
	     */
	    me->inBoldA = TRUE;

	    if (isEmpty(value[HTML_A_HREF]))
		StrAllocCopy(href, "#");
	    else
		StrAllocCopy(href, value[HTML_A_HREF]);
	    CHECK_FOR_INTERN(intern_flag, href);	/* '#' */

	    if (intern_flag) { /*** FAST WAY: ***/
		TRANSLATE_AND_UNESCAPE_TO_STD(&href);

	    } else {
		url_type = LYLegitimizeHREF(me, &href, TRUE, TRUE);

		/*
		 * Deal with our ftp gateway kludge.  - FM
		 */
		if (!url_type && !StrNCmp(href, "/foo/..", 7) &&
		    (isFTP_URL(me->node_anchor->address) ||
		     isFILE_URL(me->node_anchor->address))) {
		    for (i = 0; (href[i] = href[i + 7]) != 0; i++) ;
		}
	    }

	    if (present[HTML_A_ISMAP])	/*??? */
		intern_flag = FALSE;
	} else {
	    if (bold_name_anchors == TRUE) {
		me->inBoldA = TRUE;
	    }
	}

	if (present && present[HTML_A_TYPE] && value[HTML_A_TYPE]) {
	    StrAllocCopy(temp, value[HTML_A_TYPE]);
	    if (!intern_flag &&
		!strcasecomp(value[HTML_A_TYPE], HTAtom_name(HTInternalLink)) &&
		!LYIsUIPage3(me->node_anchor->address, UIP_LIST_PAGE, 0) &&
		!LYIsUIPage3(me->node_anchor->address, UIP_ADDRLIST_PAGE, 0) &&
		!isLYNXIMGMAP(me->node_anchor->address)) {
		/* Some kind of spoof?
		 * Found TYPE="internal link" but not in a valid context
		 * where we have written it. - kw
		 */
		CTRACE((tfp, "HTML: Found invalid HREF=\"%s\" TYPE=\"%s\"!\n",
			href, temp));
		FREE(temp);
	    }
	}

	me->CurrentA = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
						 id_string,	/* Tag */
						 href,	/* Address */
						 (temp
						  ? (HTLinkType *)
						  HTAtom_for(temp)
						  : INTERN_LT));	/* Type */
	FREE(temp);
	FREE(id_string);

	if (me->CurrentA && present) {
	    if (present[HTML_A_TITLE] &&
		non_empty(value[HTML_A_TITLE])) {
		StrAllocCopy(title, value[HTML_A_TITLE]);
		TRANSLATE_AND_UNESCAPE_ENTITIES(&title, TRUE, FALSE);
		LYTrimHead(title);
		LYTrimTail(title);
		if (*title == '\0') {
		    FREE(title);
		}
	    }
	    if (present[HTML_A_ISMAP])
		dest_ismap = TRUE;
	    if (present[HTML_A_CHARSET] &&
		non_empty(value[HTML_A_CHARSET])) {
		/*
		 * Set up to load the anchor's chartrans structures
		 * appropriately for the current display character set if it
		 * can handle what's claimed.  - FM
		 */
		StrAllocCopy(temp, value[HTML_A_CHARSET]);
		TRANSLATE_AND_UNESCAPE_TO_STD(&temp);
		dest_char_set = UCGetLYhndl_byMIME(temp);
		if (dest_char_set < 0) {
		    dest_char_set = UCLYhndl_for_unrec;
		}
	    }
	    if (title != NULL || dest_ismap == TRUE || dest_char_set >= 0) {
		dest = HTAnchor_parent(HTAnchor_followLink(me->CurrentA)
		    );
	    }
	    if (dest && title != NULL && HTAnchor_title(dest) == NULL)
		HTAnchor_setTitle(dest, title);
	    if (dest && dest_ismap)
		dest->isISMAPScript = TRUE;
	    /* Don't allow CHARSET attribute to change *this* document's
	       charset assumption. - kw */
	    if (dest && dest != me->node_anchor && dest_char_set >= 0) {
		/*
		 * Load the anchor's chartrans structures.  This should be done
		 * more intelligently when setting up the structured object,
		 * but it gets the job done for now.  - FM
		 */
		HTAnchor_setUCInfoStage(dest, dest_char_set,
					UCT_STAGE_MIME,
					UCT_SETBY_DEFAULT);
		HTAnchor_setUCInfoStage(dest, dest_char_set,
					UCT_STAGE_PARSER,
					UCT_SETBY_LINK);
	    }
	    FREE(temp);
	    dest = NULL;
	    FREE(title);
	}
	me->CurrentANum = HText_beginAnchor(me->text,
					    me->inUnderline, me->CurrentA);
	if (me->inBoldA == TRUE && me->inBoldH == FALSE)
	    HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
#if defined(NOTUSED_FOTEMODS)
	/*
	 * Close an HREF-less NAMED-ed now if we aren't making their content
	 * bold, and let the check in HTML_end_element() deal with any dangling
	 * end tag this creates.  - FM
	 */
	if (href == NULL && me->inBoldA == FALSE) {
	    SET_SKIP_STACK(HTML_A);
	    HTML_end_element(me, HTML_A, include);
	}
#else
	/*Close an HREF-less NAMED-ed now if force_empty_hrefless_a was
	   requested - VH */
	if (href == NULL && force_empty_hrefless_a) {
	    SET_SKIP_STACK(HTML_A);
	    HTML_end_element(me, HTML_A, include);
	}
#endif
	FREE(href);
	break;

    case HTML_IMG:		/* Images */
	/*
	 * If we're in an anchor, get the destination, and if it's a clickable
	 * image for the current anchor, set our flags for faking a 0,0
	 * coordinate pair, which typically returns the image's default.  - FM
	 */
	if (me->inA && me->CurrentA) {
	    if ((dest = HTAnchor_parent(HTAnchor_followLink(me->CurrentA)
		 )) != NULL) {
		if (dest->isISMAPScript == TRUE) {
		    dest_ismap = TRUE;
		    CTRACE((tfp, "HTML: '%s' is an ISMAP script\n",
			    dest->address));
		} else if (present && present[HTML_IMG_ISMAP]) {
		    dest_ismap = TRUE;
		    dest->isISMAPScript = TRUE;
		    CTRACE((tfp, "HTML: Designating '%s' as an ISMAP script\n",
			    dest->address));
		}
	    }
	}

	intern_flag = FALSE;	/* unless set below - kw */
	/*
	 * If there's a USEMAP, resolve it.  - FM
	 */
	if (present && present[HTML_IMG_USEMAP] &&
	    non_empty(value[HTML_IMG_USEMAP])) {
	    StrAllocCopy(map_href, value[HTML_IMG_USEMAP]);
	    CHECK_FOR_INTERN(intern_flag, map_href);
	    (void) LYLegitimizeHREF(me, &map_href, TRUE, TRUE);
	    /*
	     * If map_href ended up zero-length or otherwise doesn't have a
	     * hash, it can't be valid, so ignore it.  - FM
	     */
	    if (findPoundSelector(map_href) == NULL) {
		FREE(map_href);
	    }
	}

	/*
	 * Handle a MAP reference if we have one at this point.  - FM
	 */
	if (map_href) {
	    /*
	     * If the MAP reference doesn't yet begin with a scheme, check
	     * whether a base tag is in effect.  - FM
	     */
	    /*
	     * If the USEMAP value is a lone fragment and LYSeekFragMAPinCur is
	     * set, we'll use the current document's URL for resolving. 
	     * Otherwise use the BASE.  - kw
	     */
	    Base = ((me->inBASE &&
		     !(*map_href == '#' && LYSeekFragMAPinCur == TRUE))
		    ? me->base_href
		    : me->node_anchor->address);
	    HTParseALL(&map_href, Base);

	    /*
	     * Prepend our client-side MAP access field.  - FM
	     */
	    StrAllocCopy(temp, STR_LYNXIMGMAP);
	    StrAllocCat(temp, map_href);
	    StrAllocCopy(map_href, temp);
	    FREE(temp);
	}

	/*
	 * Check whether we want to suppress the server-side ISMAP link if a
	 * client-side MAP is present.  - FM
	 */
	if (LYNoISMAPifUSEMAP && map_href && dest_ismap) {
	    dest_ismap = FALSE;
	    dest = NULL;
	}

	/*
	 * Check for a TITLE attribute.  - FM
	 */
	if (present && present[HTML_IMG_TITLE] &&
	    non_empty(value[HTML_IMG_TITLE])) {
	    StrAllocCopy(title, value[HTML_IMG_TITLE]);
	    TRANSLATE_AND_UNESCAPE_ENTITIES(&title, TRUE, FALSE);
	    LYTrimHead(title);
	    LYTrimTail(title);
	    if (*title == '\0') {
		FREE(title);
	    }
	}

	/*
	 * If there's an ALT string, use it, unless the ALT string is
	 * zero-length or just spaces and we are making all SRCs links or have
	 * a USEMAP link.  - FM
	 */
	if (((present) &&
	     (present[HTML_IMG_ALT] && value[HTML_IMG_ALT])) &&
	    (!clickable_images ||
	     ((clickable_images || map_href) &&
	      *value[HTML_IMG_ALT] != '\0'))) {
	    StrAllocCopy(alt_string, value[HTML_IMG_ALT]);
	    TRANSLATE_AND_UNESCAPE_ENTITIES(&alt_string,
					    me->UsePlainSpace, me->HiddenValue);
	    /*
	     * If it's all spaces and we are making SRC or USEMAP links, treat
	     * it as zero-length.  - FM
	     */
	    if (clickable_images || map_href) {
		LYTrimHead(alt_string);
		LYTrimTail(alt_string);
		if (*alt_string == '\0') {
		    if (map_href) {
			StrAllocCopy(alt_string, (title ? title :
						  (temp = MakeNewMapValue(value,
									  "USEMAP"))));
			FREE(temp);
		    } else if (dest_ismap) {
			StrAllocCopy(alt_string, (title ? title :
						  (temp = MakeNewMapValue(value,
									  "ISMAP"))));
			FREE(temp);

		    } else if (me->inA == TRUE && dest) {
			StrAllocCopy(alt_string, (title ?
						  title :
						  VERBOSE_IMG(value, HTML_IMG_SRC,
							      "[LINK]")));

		    } else {
			StrAllocCopy(alt_string,
				     (title ? title :
				      ((present &&
					present[HTML_IMG_ISOBJECT]) ?
				       "(OBJECT)" :
				       VERBOSE_IMG(value, HTML_IMG_SRC,
						   "[INLINE]"))));
		    }
		}
	    }

	} else if (map_href) {
	    StrAllocCopy(alt_string, (title ? title :
				      (temp = MakeNewMapValue(value, "USEMAP"))));
	    FREE(temp);

	} else if ((dest_ismap == TRUE) ||
		   (me->inA && present && present[HTML_IMG_ISMAP])) {
	    StrAllocCopy(alt_string, (title ? title :
				      (temp = MakeNewMapValue(value, "ISMAP"))));
	    FREE(temp);

	} else if (me->inA == TRUE && dest) {
	    StrAllocCopy(alt_string, (title ?
				      title :
				      VERBOSE_IMG(value, HTML_IMG_SRC,
						  "[LINK]")));

	} else {
	    if (pseudo_inline_alts || clickable_images)
		StrAllocCopy(alt_string, (title ? title :
					  ((present &&
					    present[HTML_IMG_ISOBJECT]) ?
					   "(OBJECT)" :
					   VERBOSE_IMG(value, HTML_IMG_SRC,
						       "[INLINE]"))));
	    else
		StrAllocCopy(alt_string, NonNull(title));
	}
	if (*alt_string == '\0' && map_href) {
	    StrAllocCopy(alt_string, (temp = MakeNewMapValue(value, "USEMAP")));
	    FREE(temp);
	}

	CTRACE((tfp, "HTML IMG: USEMAP=%d ISMAP=%d ANCHOR=%d PARA=%d\n",
		map_href ? 1 : 0,
		(dest_ismap == TRUE) ? 1 : 0,
		me->inA, me->inP));

	/*
	 * Check for an ID attribute.  - FM
	 */
	if (present && present[HTML_IMG_ID] &&
	    non_empty(value[HTML_IMG_ID])) {
	    StrAllocCopy(id_string, value[HTML_IMG_ID]);
	    TRANSLATE_AND_UNESCAPE_TO_STD(&id_string);
	    if (*id_string == '\0') {
		FREE(id_string);
	    }
	}

	/*
	 * Create links to the SRC for all images, if desired.  - FM
	 */
	if (clickable_images &&
	    present && present[HTML_IMG_SRC] &&
	    non_empty(value[HTML_IMG_SRC])) {
	    StrAllocCopy(href, value[HTML_IMG_SRC]);
	    LYLegitimizeHREF(me, &href, TRUE, TRUE);

	    /*
	     * If it's an ISMAP and/or USEMAP, or graphic for an anchor, end
	     * that anchor and start one for the SRC.  - FM
	     */
	    if (me->inA) {
		/*
		 * If we have a USEMAP, end this anchor and start a new one for
		 * the client-side MAP.  - FM
		 */
		if (map_href) {
		    if (dest_ismap) {
			HTML_put_character(me, ' ');
			me->in_word = NO;
			HTML_put_string(me,
					(temp = MakeNewMapValue(value, "ISMAP")));
			FREE(temp);
		    } else if (dest) {
			HTML_put_character(me, ' ');
			me->in_word = NO;
			HTML_put_string(me, "[LINK]");
		    }
		    if (me->inBoldA == TRUE && me->inBoldH == FALSE) {
			HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
		    }
		    me->inBoldA = FALSE;
		    HText_endAnchor(me->text, me->CurrentANum);
		    me->CurrentANum = 0;
		    if (dest_ismap || dest)
			HTML_put_character(me, '-');
		    if (id_string) {
			if ((ID_A = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
							      id_string,	/* Tag */
							      NULL,	/* Addresss */
							      0)) != NULL) {	/* Type */
			    HText_beginAnchor(me->text, me->inUnderline, ID_A);
			    HText_endAnchor(me->text, 0);
			}
		    }
		    me->CurrentA = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
							     NULL,	/* Tag */
							     map_href,	/* Addresss */
							     INTERN_LT);	/* Type */
		    if (me->CurrentA && title) {
			if ((dest = HTAnchor_parent(HTAnchor_followLink(me->CurrentA)
			     )) != NULL) {
			    if (!HTAnchor_title(dest))
				HTAnchor_setTitle(dest, title);
			}
		    }
		    me->CurrentANum = HText_beginAnchor(me->text,
							me->inUnderline,
							me->CurrentA);
		    if (me->inBoldA == FALSE && me->inBoldH == FALSE) {
			HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
		    }
		    me->inBoldA = TRUE;
		} else {
		    HTML_put_character(me, ' ');	/* space char may be ignored */
		    me->in_word = NO;
		}
		HTML_put_string(me, alt_string);
		if (me->inBoldA == TRUE && me->inBoldH == FALSE) {
		    HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
		}
		me->inBoldA = FALSE;
		HText_endAnchor(me->text, me->CurrentANum);
		me->CurrentANum = 0;
		HTML_put_character(me, '-');
		FREE(newtitle);
		StrAllocCopy(alt_string,
			     ((present &&
			       present[HTML_IMG_ISOBJECT]) ?
			      ((map_href || dest_ismap) ?
			       "(IMAGE)" : "(OBJECT)") :
			      VERBOSE_IMG(value, HTML_IMG_SRC, "[IMAGE]")));
		if (id_string && !map_href) {
		    if ((ID_A = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
							  id_string,	/* Tag */
							  NULL,		/* Addresss */
							  0)) != NULL) {	/* Type */
			HText_beginAnchor(me->text, me->inUnderline, ID_A);
			HText_endAnchor(me->text, 0);
		    }
		}
	    } else if (map_href) {
		HTML_put_character(me, ' ');	/* space char may be ignored */
		me->in_word = NO;
		if (id_string) {
		    if ((ID_A = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
							  id_string,	/* Tag */
							  NULL,		/* Addresss */
							  0)) != NULL) {	/* Type */
			HText_beginAnchor(me->text, me->inUnderline, ID_A);
			HText_endAnchor(me->text, 0);
		    }
		}
		me->CurrentA = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
							 NULL,	/* Tag */
							 map_href,	/* Addresss */
							 INTERN_LT);	/* Type */
		if (me->CurrentA && title) {
		    if ((dest = HTAnchor_parent(HTAnchor_followLink(me->CurrentA)
			 )) != NULL) {
			if (!HTAnchor_title(dest))
			    HTAnchor_setTitle(dest, title);
		    }
		}
		me->CurrentANum = HText_beginAnchor(me->text,
						    me->inUnderline,
						    me->CurrentA);
		if (me->inBoldA == FALSE && me->inBoldH == FALSE)
		    HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
		me->inBoldA = TRUE;
		HTML_put_string(me, alt_string);
		if (me->inBoldA == TRUE && me->inBoldH == FALSE) {
		    HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
		}
		me->inBoldA = FALSE;
		HText_endAnchor(me->text, me->CurrentANum);
		me->CurrentANum = 0;
		HTML_put_character(me, '-');
		FREE(newtitle);
		StrAllocCopy(alt_string,
			     ((present &&
			       present[HTML_IMG_ISOBJECT]) ?
			      "(IMAGE)" :
			      VERBOSE_IMG(value, HTML_IMG_SRC, "[IMAGE]")));
	    } else {
		HTML_put_character(me, ' ');	/* space char may be ignored */
		me->in_word = NO;
		if (id_string) {
		    if ((ID_A = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
							  id_string,	/* Tag */
							  NULL,		/* Addresss */
							  0)) != NULL) {	/* Type */
			HText_beginAnchor(me->text, me->inUnderline, ID_A);
			HText_endAnchor(me->text, 0);
		    }
		}
	    }

	    /*
	     * Create the link to the SRC.  - FM
	     */
	    me->CurrentA = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
						     NULL,	/* Tag */
						     href,	/* Addresss */
						     (HTLinkType *) 0);		/* Type */
	    FREE(href);
	    me->CurrentANum = HText_beginAnchor(me->text,
						me->inUnderline,
						me->CurrentA);
	    if (me->inBoldH == FALSE)
		HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
	    HTML_put_string(me, alt_string);
	    if (!me->inA) {
		if (me->inBoldH == FALSE)
		    HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
		HText_endAnchor(me->text, me->CurrentANum);
		me->CurrentANum = 0;
		HTML_put_character(me, ' ');	/* space char may be ignored */
		me->in_word = NO;
	    } else {
		HTML_put_character(me, ' ');	/* space char may be ignored */
		me->in_word = NO;
		me->inBoldA = TRUE;
	    }
	} else if (map_href) {
	    if (me->inA) {
		/*
		 * We're in an anchor and have a USEMAP, so end the anchor and
		 * start a new one for the client-side MAP.  - FM
		 */
		if (dest_ismap) {
		    HTML_put_character(me, ' ');	/* space char may be ignored */
		    me->in_word = NO;
		    HTML_put_string(me, (temp = MakeNewMapValue(value, "ISMAP")));
		    FREE(temp);
		} else if (dest) {
		    HTML_put_character(me, ' ');	/* space char may be ignored */
		    me->in_word = NO;
		    HTML_put_string(me, "[LINK]");
		}
		if (me->inBoldA == TRUE && me->inBoldH == FALSE) {
		    HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
		}
		me->inBoldA = FALSE;
		HText_endAnchor(me->text, me->CurrentANum);
		me->CurrentANum = 0;
		if (dest_ismap || dest) {
		    HTML_put_character(me, '-');
		}
	    } else {
		HTML_put_character(me, ' ');
		me->in_word = NO;
	    }
	    me->CurrentA = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
						     NULL,	/* Tag */
						     map_href,	/* Addresss */
						     INTERN_LT);	/* Type */
	    if (me->CurrentA && title) {
		if ((dest = HTAnchor_parent(HTAnchor_followLink(me->CurrentA)
		     )) != NULL) {
		    if (!HTAnchor_title(dest))
			HTAnchor_setTitle(dest, title);
		}
	    }
	    me->CurrentANum = HText_beginAnchor(me->text,
						me->inUnderline,
						me->CurrentA);
	    if (me->inBoldA == FALSE && me->inBoldH == FALSE) {
		HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
	    }
	    me->inBoldA = TRUE;
	    HTML_put_string(me, alt_string);
	    if (!me->inA) {
		if (me->inBoldA == TRUE && me->inBoldH == FALSE) {
		    HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
		}
		me->inBoldA = FALSE;
		HText_endAnchor(me->text, me->CurrentANum);
		me->CurrentANum = 0;
	    }
	} else {
	    /*
	     * Just put in the ALT or pseudo-ALT string for the current anchor
	     * or inline, with an ID link if indicated.  - FM
	     */
	    HTML_put_character(me, ' ');	/* space char may be ignored */
	    me->in_word = NO;
	    if (id_string) {
		if ((ID_A = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
						      id_string,	/* Tag */
						      NULL,	/* Addresss */
						      (HTLinkType *) 0)) != NULL) {	/* Type */
		    HText_beginAnchor(me->text, me->inUnderline, ID_A);
		    HText_endAnchor(me->text, 0);
		}
	    }
	    HTML_put_string(me, alt_string);
	    HTML_put_character(me, ' ');	/* space char may be ignored */
	    me->in_word = NO;
	}
	FREE(map_href);
	FREE(alt_string);
	FREE(id_string);
	FREE(title);
	FREE(newtitle);
	dest = NULL;
	break;

    case HTML_MAP:
	/*
	 * Load id_string if we have a NAME or ID.  - FM
	 */
	if (present && present[HTML_MAP_NAME] &&
	    non_empty(value[HTML_MAP_NAME])) {
	    StrAllocCopy(id_string, value[HTML_MAP_NAME]);
	} else if (present && present[HTML_MAP_ID] &&
		   non_empty(value[HTML_MAP_ID])) {
	    StrAllocCopy(id_string, value[HTML_MAP_ID]);
	}
	if (id_string) {
	    TRANSLATE_AND_UNESCAPE_TO_STD(&id_string);
	    if (*id_string == '\0') {
		FREE(id_string);
	    }
	}

	/*
	 * Generate a target anchor in this place in the containing document. 
	 * MAP can now contain block markup, if it doesn't contain any AREAs
	 * (or A anchors with COORDS converted to AREAs) the current location
	 * can be used as a fallback for following a USEMAP link.  - kw
	 */
	if (!LYMapsOnly)
	    LYHandleID(me, id_string);

	/*
	 * Load map_address.  - FM
	 */
	if (id_string) {
	    /*
	     * The MAP must be in the current stream, even if it had a BASE
	     * tag, so we'll use its address here, but still use the BASE, if
	     * present, when resolving the AREA elements in it's content,
	     * unless the AREA's HREF is a lone fragment and
	     * LYSeekFragAREAinCur is set.  - FM && KW
	     */
	    StrAllocCopy(me->map_address, me->node_anchor->address);
	    if ((cp = strchr(me->map_address, '#')) != NULL)
		*cp = '\0';
	    StrAllocCat(me->map_address, "#");
	    StrAllocCat(me->map_address, id_string);
	    FREE(id_string);
	    if (present && present[HTML_MAP_TITLE] &&
		non_empty(value[HTML_MAP_TITLE])) {
		StrAllocCopy(title, value[HTML_MAP_TITLE]);
		TRANSLATE_AND_UNESCAPE_ENTITIES(&title, TRUE, FALSE);
		LYTrimHead(title);
		LYTrimTail(title);
		if (*title == '\0') {
		    FREE(title);
		}
	    }
	    LYAddImageMap(me->map_address, title, me->node_anchor);
	    FREE(title);
	}
	break;

    case HTML_AREA:
	if (me->map_address &&
	    present && present[HTML_AREA_HREF] &&
	    non_empty(value[HTML_AREA_HREF])) {
	    /*
	     * Resolve the HREF.  - FM
	     */
	    StrAllocCopy(href, value[HTML_AREA_HREF]);
	    CHECK_FOR_INTERN(intern_flag, href);
	    (void) LYLegitimizeHREF(me, &href, TRUE, TRUE);

	    /*
	     * Check whether a BASE tag is in effect, and use it for resolving,
	     * even though we used this stream's address for locating the MAP
	     * itself, unless the HREF is a lone fragment and
	     * LYSeekFragAREAinCur is set.  - FM
	     */
	    Base = (((me->inBASE && *href != '\0') &&
		     !(*href == '#' && LYSeekFragAREAinCur == TRUE))
		    ? me->base_href
		    : me->node_anchor->address);
	    HTParseALL(&href, Base);

	    /*
	     * Check for an ALT.  - FM
	     */
	    if (present[HTML_AREA_ALT] &&
		non_empty(value[HTML_AREA_ALT])) {
		StrAllocCopy(alt_string, value[HTML_AREA_ALT]);
	    } else if (present[HTML_AREA_TITLE] &&
		       non_empty(value[HTML_AREA_TITLE])) {
		/*
		 * Use the TITLE as an ALT.  - FM
		 */
		StrAllocCopy(alt_string, value[HTML_AREA_TITLE]);
	    }
	    if (alt_string != NULL) {
		TRANSLATE_AND_UNESCAPE_ENTITIES(&alt_string,
						me->UsePlainSpace,
						me->HiddenValue);
		/*
		 * Make sure it's not just space(s).  - FM
		 */
		LYTrimHead(alt_string);
		LYTrimTail(alt_string);
		if (*alt_string == '\0') {
		    StrAllocCopy(alt_string, href);
		}
	    } else {
		/*
		 * Use the HREF as an ALT.  - FM
		 */
		StrAllocCopy(alt_string, href);
	    }

	    LYAddMapElement(me->map_address, href, alt_string,
			    me->node_anchor, intern_flag);
	    FREE(href);
	    FREE(alt_string);
	}
	break;

    case HTML_PARAM:
	/*
	 * We may need to look at this someday to deal with MAPs, OBJECTs or
	 * APPLETs optimally, but just ignore it for now.  - FM
	 */
	break;

    case HTML_BODYTEXT:
	CHECK_ID(HTML_BODYTEXT_ID);
	/*
	 * We may need to look at this someday to deal with OBJECTs optimally,
	 * but just ignore it for now.  - FM
	 */
	break;

    case HTML_TEXTFLOW:
	CHECK_ID(HTML_BODYTEXT_ID);
	/*
	 * We may need to look at this someday to deal with APPLETs optimally,
	 * but just ignore it for now.  - FM
	 */
	break;

    case HTML_FIG:
	if (present)
	    LYHandleFIG(me, present, value,
			present[HTML_FIG_ISOBJECT],
			present[HTML_FIG_IMAGEMAP],
			present[HTML_FIG_ID] ? value[HTML_FIG_ID] : NULL,
			present[HTML_FIG_SRC] ? value[HTML_FIG_SRC] : NULL,
			YES, TRUE, &intern_flag);
	else
	    LYHandleFIG(me, NULL, NULL,
			0,
			0,
			NULL,
			NULL, YES, TRUE, &intern_flag);
	break;

    case HTML_OBJECT:
	if (!me->object_started) {
	    /*
	     * This is an outer OBJECT start tag, i.e., not a nested OBJECT, so
	     * save its relevant attributes.  - FM
	     */
	    if (present) {
		if (present[HTML_OBJECT_DECLARE])
		    me->object_declare = TRUE;
		if (present[HTML_OBJECT_SHAPES])
		    me->object_shapes = TRUE;
		if (present[HTML_OBJECT_ISMAP])
		    me->object_ismap = TRUE;
		if (present[HTML_OBJECT_USEMAP] &&
		    non_empty(value[HTML_OBJECT_USEMAP])) {
		    StrAllocCopy(me->object_usemap, value[HTML_OBJECT_USEMAP]);
		    TRANSLATE_AND_UNESCAPE_TO_STD(&me->object_usemap);
		    if (*me->object_usemap == '\0') {
			FREE(me->object_usemap);
		    }
		}
		if (present[HTML_OBJECT_ID] &&
		    non_empty(value[HTML_OBJECT_ID])) {
		    StrAllocCopy(me->object_id, value[HTML_OBJECT_ID]);
		    TRANSLATE_AND_UNESCAPE_TO_STD(&me->object_id);
		    if (*me->object_id == '\0') {
			FREE(me->object_id);
		    }
		}
		if (present[HTML_OBJECT_TITLE] &&
		    non_empty(value[HTML_OBJECT_TITLE])) {
		    StrAllocCopy(me->object_title, value[HTML_OBJECT_TITLE]);
		    TRANSLATE_AND_UNESCAPE_ENTITIES(&me->object_title, TRUE, FALSE);
		    LYTrimHead(me->object_title);
		    LYTrimTail(me->object_title);
		    if (me->object_title == '\0') {
			FREE(me->object_title);
		    }
		}
		if (present[HTML_OBJECT_DATA] &&
		    non_empty(value[HTML_OBJECT_DATA])) {
		    StrAllocCopy(me->object_data, value[HTML_OBJECT_DATA]);
		    TRANSLATE_AND_UNESCAPE_TO_STD(&me->object_data);
		    if (*me->object_data == '\0') {
			FREE(me->object_data);
		    }
		}
		if (present[HTML_OBJECT_TYPE] &&
		    non_empty(value[HTML_OBJECT_TYPE])) {
		    StrAllocCopy(me->object_type, value[HTML_OBJECT_TYPE]);
		    TRANSLATE_AND_UNESCAPE_ENTITIES(&me->object_type, TRUE, FALSE);
		    LYTrimHead(me->object_type);
		    LYTrimTail(me->object_type);
		    if (me->object_type == '\0') {
			FREE(me->object_type);
		    }
		}
		if (present[HTML_OBJECT_CLASSID] &&
		    non_empty(value[HTML_OBJECT_CLASSID])) {
		    StrAllocCopy(me->object_classid,
				 value[HTML_OBJECT_CLASSID]);
		    TRANSLATE_AND_UNESCAPE_ENTITIES(&me->object_classid, TRUE, FALSE);
		    LYTrimHead(me->object_classid);
		    LYTrimTail(me->object_classid);
		    if (me->object_classid == '\0') {
			FREE(me->object_classid);
		    }
		}
		if (present[HTML_OBJECT_CODEBASE] &&
		    non_empty(value[HTML_OBJECT_CODEBASE])) {
		    StrAllocCopy(me->object_codebase,
				 value[HTML_OBJECT_CODEBASE]);
		    TRANSLATE_AND_UNESCAPE_TO_STD(&me->object_codebase);
		    if (*me->object_codebase == '\0') {
			FREE(me->object_codebase);
		    }
		}
		if (present[HTML_OBJECT_CODETYPE] &&
		    non_empty(value[HTML_OBJECT_CODETYPE])) {
		    StrAllocCopy(me->object_codetype,
				 value[HTML_OBJECT_CODETYPE]);
		    TRANSLATE_AND_UNESCAPE_ENTITIES(&me->object_codetype,
						    TRUE,
						    FALSE);
		    LYTrimHead(me->object_codetype);
		    LYTrimTail(me->object_codetype);
		    if (me->object_codetype == '\0') {
			FREE(me->object_codetype);
		    }
		}
		if (present[HTML_OBJECT_NAME] &&
		    non_empty(value[HTML_OBJECT_NAME])) {
		    StrAllocCopy(me->object_name, value[HTML_OBJECT_NAME]);
		    TRANSLATE_AND_UNESCAPE_ENTITIES(&me->object_name, TRUE, FALSE);
		    LYTrimHead(me->object_name);
		    LYTrimTail(me->object_name);
		    if (me->object_name == '\0') {
			FREE(me->object_name);
		    }
		}
	    }
	    /*
	     * If we can determine now that we are not going to do anything
	     * special to the OBJECT element's SGML contents, like skipping it
	     * completely or collecting it up in order to add something after
	     * it, then generate any output that should be emitted in the place
	     * of the OBJECT start tag NOW, then don't initialize special
	     * handling but return, letting our SGML parser know that further
	     * content is to be parsed normally not literally.  We could defer
	     * this until we have collected the contents and then recycle the
	     * contents (as was previously always done), but that has a higher
	     * chance of completely losing content in case of nesting errors in
	     * the input, incomplete transmissions, etc.  - kw
	     */
	    if ((!present ||
		 (me->object_declare == FALSE && me->object_name == NULL &&
		  me->object_shapes == FALSE && me->object_usemap == NULL))) {
		if (!LYMapsOnly) {
		    if (!clickable_images || me->object_data == NULL ||
			!(me->object_data != NULL &&
			  me->object_classid == NULL &&
			  me->object_codebase == NULL &&
			  me->object_codetype == NULL))
			FREE(me->object_data);
		    if (me->object_data) {
			HTStartAnchor5(me,
				       (me->object_id
					? value[HTML_OBJECT_ID]
					: NULL),
				       value[HTML_OBJECT_DATA],
				       value[HTML_OBJECT_TYPE],
				       tag_charset);
			if ((me->object_type != NULL) &&
			    !strncasecomp(me->object_type, "image/", 6))
			    HTML_put_string(me, "(IMAGE)");
			else
			    HTML_put_string(me, "(OBJECT)");
			HTML_end_element(me, HTML_A, NULL);
		    } else if (me->object_id)
			LYHandleID(me, me->object_id);
		}
		clear_objectdata(me);
		/*
		 * We do NOT want the HTML_put_* functions that are going to be
		 * called for the OBJECT's character content to add to the
		 * chunk, so we don't push on the stack.  Instead we keep a
		 * counter for open OBJECT tags that are treated this way, so
		 * HTML_end_element can skip handling the corresponding end tag
		 * that is going to arrive unexpectedly as far as our stack is
		 * concerned.
		 */
		status = HT_PARSER_OTHER_CONTENT;
		if (me->sp[0].tag_number == HTML_FIG &&
		    me->objects_figged_open > 0) {
		    ElementNumber = (HTMLElement) HTML_OBJECT_M;
		} else {
		    me->objects_mixed_open++;
		    SET_SKIP_STACK(HTML_OBJECT);
		}
	    } else if (me->object_declare == FALSE && me->object_name == NULL &&
		       me->object_shapes == TRUE) {
		LYHandleFIG(me, present, value,
			    1,
			    1 || me->object_ismap,
			    me->object_id,
			    ((me->object_data && !me->object_classid)
			     ? value[HTML_OBJECT_DATA]
			     : NULL),
			    NO, TRUE, &intern_flag);
		clear_objectdata(me);
		status = HT_PARSER_OTHER_CONTENT;
		me->objects_figged_open++;
		ElementNumber = HTML_FIG;

	    } else {
		/*
		 * Set flag that we are accumulating OBJECT content.  - FM
		 */
		me->object_started = TRUE;
	    }
	}
	break;

    case HTML_OVERLAY:
	if (clickable_images && me->inFIG &&
	    present && present[HTML_OVERLAY_SRC] &&
	    non_empty(value[HTML_OVERLAY_SRC])) {
	    StrAllocCopy(href, value[HTML_OVERLAY_SRC]);
	    LYLegitimizeHREF(me, &href, TRUE, TRUE);
	    if (*href) {

		if (me->inA) {
		    SET_SKIP_STACK(HTML_A);
		    HTML_end_element(me, HTML_A, include);
		}
		me->CurrentA = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
							 NULL,	/* Tag */
							 href,	/* Addresss */
							 (HTLinkType *) 0);	/* Type */
		HTML_put_character(me, ' ');
		HText_appendCharacter(me->text, '+');
		me->CurrentANum = HText_beginAnchor(me->text,
						    me->inUnderline,
						    me->CurrentA);
		if (me->inBoldH == FALSE)
		    HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
		HTML_put_string(me, "[OVERLAY]");
		if (me->inBoldH == FALSE)
		    HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
		HText_endAnchor(me->text, me->CurrentANum);
		HTML_put_character(me, ' ');
		me->in_word = NO;
	    }
	    FREE(href);
	}
	break;

    case HTML_APPLET:
	me->inAPPLET = TRUE;
	me->inAPPLETwithP = FALSE;
	HTML_put_character(me, ' ');	/* space char may be ignored */
	/*
	 * Load id_string if we have an ID or NAME.  - FM
	 */
	if (present && present[HTML_APPLET_ID] &&
	    non_empty(value[HTML_APPLET_ID])) {
	    StrAllocCopy(id_string, value[HTML_APPLET_ID]);
	} else if (present && present[HTML_APPLET_NAME] &&
		   non_empty(value[HTML_APPLET_NAME])) {
	    StrAllocCopy(id_string, value[HTML_APPLET_NAME]);
	}
	if (id_string) {
	    TRANSLATE_AND_UNESCAPE_TO_STD(&id_string);
	    LYHandleID(me, id_string);
	    FREE(id_string);
	}
	me->in_word = NO;

	/*
	 * If there's an ALT string, use it, unless the ALT string is
	 * zero-length and we are making all sources links.  - FM
	 */
	if (present && present[HTML_APPLET_ALT] && value[HTML_APPLET_ALT] &&
	    (!clickable_images ||
	     (clickable_images && *value[HTML_APPLET_ALT] != '\0'))) {
	    StrAllocCopy(alt_string, value[HTML_APPLET_ALT]);
	    TRANSLATE_AND_UNESCAPE_ENTITIES(&alt_string,
					    me->UsePlainSpace, me->HiddenValue);
	    /*
	     * If it's all spaces and we are making sources links, treat it as
	     * zero-length.  - FM
	     */
	    if (clickable_images) {
		LYTrimHead(alt_string);
		LYTrimTail(alt_string);
		if (*alt_string == '\0') {
		    StrAllocCopy(alt_string, "[APPLET]");
		}
	    }

	} else {
	    if (clickable_images)
		StrAllocCopy(alt_string, "[APPLET]");
	    else
		StrAllocCopy(alt_string, "");
	}

	/*
	 * If we're making all sources links, get the source.  - FM
	 */
	if (clickable_images && present && present[HTML_APPLET_CODE] &&
	    non_empty(value[HTML_APPLET_CODE])) {
	    char *base = NULL;

	    Base = (me->inBASE)
		? me->base_href
		: me->node_anchor->address;
	    /*
	     * Check for a CODEBASE attribute.  - FM
	     */
	    if (present[HTML_APPLET_CODEBASE] &&
		non_empty(value[HTML_APPLET_CODEBASE])) {
		StrAllocCopy(base, value[HTML_APPLET_CODEBASE]);
		LYRemoveBlanks(base);
		TRANSLATE_AND_UNESCAPE_TO_STD(&base);
		/*
		 * Force it to be a directory.  - FM
		 */
		if (*base == '\0')
		    StrAllocCopy(base, "/");
		LYAddHtmlSep(&base);
		LYLegitimizeHREF(me, &base, TRUE, FALSE);

		HTParseALL(&base, Base);
	    }

	    StrAllocCopy(href, value[HTML_APPLET_CODE]);
	    LYLegitimizeHREF(me, &href, TRUE, FALSE);
	    HTParseALL(&href, (base ? base : Base));
	    FREE(base);

	    if (*href) {
		if (me->inA) {
		    if (me->inBoldA == TRUE && me->inBoldH == FALSE)
			HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
		    HText_endAnchor(me->text, me->CurrentANum);
		    HTML_put_character(me, '-');
		}
		me->CurrentA = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
							 NULL,	/* Tag */
							 href,	/* Addresss */
							 (HTLinkType *) 0);	/* Type */
		me->CurrentANum = HText_beginAnchor(me->text,
						    me->inUnderline,
						    me->CurrentA);
		if (me->inBoldH == FALSE)
		    HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
		HTML_put_string(me, alt_string);
		if (me->inA == FALSE) {
		    if (me->inBoldH == FALSE)
			HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
		    HText_endAnchor(me->text, me->CurrentANum);
		    me->CurrentANum = 0;
		}
		HTML_put_character(me, ' ');	/* space char may be ignored */
		me->in_word = NO;
	    }
	    FREE(href);
	} else if (*alt_string) {
	    /*
	     * Just put up the ALT string, if non-zero.  - FM
	     */
	    HTML_put_string(me, alt_string);
	    HTML_put_character(me, ' ');	/* space char may be ignored */
	    me->in_word = NO;
	}
	FREE(alt_string);
	FREE(id_string);
	break;

    case HTML_BGSOUND:
	/*
	 * If we're making all sources links, get the source.  - FM
	 */
	if (clickable_images && present && present[HTML_BGSOUND_SRC] &&
	    non_empty(value[HTML_BGSOUND_SRC])) {
	    StrAllocCopy(href, value[HTML_BGSOUND_SRC]);
	    LYLegitimizeHREF(me, &href, TRUE, TRUE);
	    if (*href == '\0') {
		FREE(href);
		break;
	    }

	    if (me->inA) {
		if (me->inBoldA == TRUE && me->inBoldH == FALSE)
		    HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
		HText_endAnchor(me->text, me->CurrentANum);
		HTML_put_character(me, '-');
	    } else {
		HTML_put_character(me, ' ');	/* space char may be ignored */
		me->in_word = NO;
	    }
	    me->CurrentA = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
						     NULL,	/* Tag */
						     href,	/* Addresss */
						     (HTLinkType *) 0);		/* Type */
	    me->CurrentANum = HText_beginAnchor(me->text,
						me->inUnderline,
						me->CurrentA);
	    if (me->inBoldH == FALSE)
		HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
	    HTML_put_string(me, "[BGSOUND]");
	    if (me->inA == FALSE) {
		if (me->inBoldH == FALSE)
		    HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
		HText_endAnchor(me->text, me->CurrentANum);
		me->CurrentANum = 0;
	    }
	    HTML_put_character(me, ' ');	/* space char may be ignored */
	    me->in_word = NO;
	    FREE(href);
	}
	break;

    case HTML_EMBED:
	if (pseudo_inline_alts || clickable_images)
	    HTML_put_character(me, ' ');	/* space char may be ignored */
	/*
	 * Load id_string if we have an ID or NAME.  - FM
	 */
	if (present && present[HTML_EMBED_ID] &&
	    non_empty(value[HTML_EMBED_ID])) {
	    StrAllocCopy(id_string, value[HTML_EMBED_ID]);
	} else if (present && present[HTML_EMBED_NAME] &&
		   non_empty(value[HTML_EMBED_NAME])) {
	    StrAllocCopy(id_string, value[HTML_EMBED_NAME]);
	}
	if (id_string) {
	    TRANSLATE_AND_UNESCAPE_TO_STD(&id_string);
	    LYHandleID(me, id_string);
	    FREE(id_string);
	}
	if (pseudo_inline_alts || clickable_images)
	    me->in_word = NO;

	/*
	 * If there's an ALT string, use it, unless the ALT string is
	 * zero-length and we are making all sources links.  - FM
	 */
	if (present && present[HTML_EMBED_ALT] && value[HTML_EMBED_ALT] &&
	    (!clickable_images ||
	     (clickable_images && *value[HTML_EMBED_ALT] != '\0'))) {
	    StrAllocCopy(alt_string, value[HTML_EMBED_ALT]);
	    TRANSLATE_AND_UNESCAPE_ENTITIES(&alt_string,
					    me->UsePlainSpace, me->HiddenValue);
	    /*
	     * If it's all spaces and we are making sources links, treat it as
	     * zero-length.  - FM
	     */
	    if (clickable_images) {
		LYTrimHead(alt_string);
		LYTrimTail(alt_string);
		if (*alt_string == '\0') {
		    StrAllocCopy(alt_string, "[EMBED]");
		}
	    }
	} else {
	    if (pseudo_inline_alts || clickable_images)
		StrAllocCopy(alt_string, "[EMBED]");
	    else
		StrAllocCopy(alt_string, "");
	}

	/*
	 * If we're making all sources links, get the source.  - FM
	 */
	if (clickable_images && present && present[HTML_EMBED_SRC] &&
	    non_empty(value[HTML_EMBED_SRC])) {
	    StrAllocCopy(href, value[HTML_EMBED_SRC]);
	    LYLegitimizeHREF(me, &href, TRUE, TRUE);
	    if (*href) {
		if (me->inA) {
		    if (me->inBoldA == TRUE && me->inBoldH == FALSE)
			HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
		    HText_endAnchor(me->text, me->CurrentANum);
		    HTML_put_character(me, '-');
		}
		me->CurrentA = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
							 NULL,	/* Tag */
							 href,	/* Addresss */
							 (HTLinkType *) 0);	/* Type */
		me->CurrentANum = HText_beginAnchor(me->text,
						    me->inUnderline,
						    me->CurrentA);
		if (me->inBoldH == FALSE)
		    HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
		HTML_put_string(me, alt_string);
		if (me->inBoldH == FALSE)
		    HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
		if (me->inA == FALSE) {
		    if (me->inBoldH == FALSE)
			HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
		    HText_endAnchor(me->text, me->CurrentANum);
		    me->CurrentANum = 0;
		}
		HTML_put_character(me, ' ');
		me->in_word = NO;
	    }
	    FREE(href);
	} else if (*alt_string) {
	    /*
	     * Just put up the ALT string, if non-zero.  - FM
	     */
	    HTML_put_string(me, alt_string);
	    HTML_put_character(me, ' ');	/* space char may be ignored */
	    me->in_word = NO;
	}
	FREE(alt_string);
	FREE(id_string);
	break;

    case HTML_CREDIT:
	LYEnsureDoubleSpace(me);
	LYResetParagraphAlignment(me);
	me->inCREDIT = TRUE;
	CHECK_ID(HTML_GEN_ID);
	if (me->inUnderline == FALSE)
	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
	HTML_put_string(me, "CREDIT:");
	if (me->inUnderline == FALSE)
	    HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
	HTML_put_character(me, ' ');
	CAN_JUSTIFY_START;

	if (me->inFIG)
	    /*
	     * Assume all text in the FIG container is intended to be
	     * paragraphed.  - FM
	     */
	    me->inFIGwithP = TRUE;

	if (me->inAPPLET)
	    /*
	     * Assume all text in the APPLET container is intended to be
	     * paragraphed.  - FM
	     */
	    me->inAPPLETwithP = TRUE;

	me->inLABEL = TRUE;
	me->in_word = NO;
	me->inP = FALSE;
	break;

    case HTML_CAPTION:
	LYEnsureDoubleSpace(me);
	LYResetParagraphAlignment(me);
	me->inCAPTION = TRUE;
	CHECK_ID(HTML_CAPTION_ID);
	if (me->inUnderline == FALSE)
	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
	HTML_put_string(me, "CAPTION:");
	if (me->inUnderline == FALSE)
	    HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
	HTML_put_character(me, ' ');
	CAN_JUSTIFY_START;

	if (me->inFIG)
	    /*
	     * Assume all text in the FIG container is intended to be
	     * paragraphed.  - FM
	     */
	    me->inFIGwithP = TRUE;

	if (me->inAPPLET)
	    /*
	     * Assume all text in the APPLET container is intended to be
	     * paragraphed.  - FM
	     */
	    me->inAPPLETwithP = TRUE;

	me->inLABEL = TRUE;
	me->in_word = NO;
	me->inP = FALSE;
	break;

    case HTML_FORM:
	{
	    char *action = NULL;
	    char *method = NULL;
	    char *enctype = NULL;
	    const char *accept_cs = NULL;

	    HTChildAnchor *source;
	    HTAnchor *link_dest;

	    /*
	     * FORM may have been declared SGML_EMPTY in HTMLDTD.c, and
	     * SGML_character() in SGML.c may check for a FORM end tag to call
	     * HTML_end_element() directly (with a check in that to bypass
	     * decrementing of the HTML parser's stack), so if we have an open
	     * FORM, close that one now.  - FM
	     */
	    if (me->inFORM) {
		CTRACE((tfp, "HTML: Missing FORM end tag.  Faking it!\n"));
		SET_SKIP_STACK(HTML_FORM);
		HTML_end_element(me, HTML_FORM, include);
	    }

	    /*
	     * Set to know we are in a new form.
	     */
	    me->inFORM = TRUE;
	    EMIT_IFDEF_USE_JUSTIFY_ELTS(form_in_htext = TRUE);

	    if (present && present[HTML_FORM_ACCEPT_CHARSET]) {
		accept_cs = (value[HTML_FORM_ACCEPT_CHARSET]
			     ? value[HTML_FORM_ACCEPT_CHARSET]
			     : "UNKNOWN");
	    }

	    Base = (me->inBASE)
		? me->base_href
		: me->node_anchor->address;

	    if (present && present[HTML_FORM_ACTION] &&
		value[HTML_FORM_ACTION]) {

		StrAllocCopy(action, value[HTML_FORM_ACTION]);
		LYLegitimizeHREF(me, &action, TRUE, TRUE);

		/*
		 * Check whether a base tag is in effect.  Note that actions
		 * always are resolved w.r.t.  to the base, even if the action
		 * is empty.  - FM
		 */
		HTParseALL(&action, Base);

	    } else {
		StrAllocCopy(action, Base);
	    }

	    source = HTAnchor_findChildAndLink(me->node_anchor,
					       NULL,
					       action,
					       (HTLinkType *) 0);
	    if ((link_dest = HTAnchor_followLink(source)) != NULL) {
		/*
		 * Memory leak fixed.  05-28-94 Lynx 2-3-1 Garrett Arch Blythe
		 */
		char *cp_freeme = HTAnchor_address(link_dest);

		if (cp_freeme != NULL) {
		    StrAllocCopy(action, cp_freeme);
		    FREE(cp_freeme);
		} else {
		    StrAllocCopy(action, "");
		}
	    }

	    if (present && present[HTML_FORM_METHOD])
		StrAllocCopy(method, (value[HTML_FORM_METHOD]
				      ? value[HTML_FORM_METHOD]
				      : "GET"));

	    if (present && present[HTML_FORM_ENCTYPE] &&
		non_empty(value[HTML_FORM_ENCTYPE])) {
		StrAllocCopy(enctype, value[HTML_FORM_ENCTYPE]);
		LYLowerCase(enctype);
	    }

	    if (present) {
		/*
		 * Check for a TITLE attribute, and if none is present, check
		 * for a SUBJECT attribute as a synonym.  - FM
		 */
		if (present[HTML_FORM_TITLE] &&
		    non_empty(value[HTML_FORM_TITLE])) {
		    StrAllocCopy(title, value[HTML_FORM_TITLE]);
		} else if (present[HTML_FORM_SUBJECT] &&
			   non_empty(value[HTML_FORM_SUBJECT])) {
		    StrAllocCopy(title, value[HTML_FORM_SUBJECT]);
		}
		if (non_empty(title)) {
		    TRANSLATE_AND_UNESCAPE_ENTITIES(&title, TRUE, FALSE);
		    LYTrimHead(title);
		    LYTrimTail(title);
		    if (*title == '\0') {
			FREE(title);
		    }
		}
	    }

	    HText_beginForm(action, method, enctype, title, accept_cs);

	    FREE(action);
	    FREE(method);
	    FREE(enctype);
	    FREE(title);
	}
	CHECK_ID(HTML_FORM_ID);
	break;

    case HTML_FIELDSET:
	LYEnsureDoubleSpace(me);
	LYResetParagraphAlignment(me);
	CHECK_ID(HTML_GEN_ID);
	break;

    case HTML_LEGEND:
	LYEnsureDoubleSpace(me);
	LYResetParagraphAlignment(me);
	CHECK_ID(HTML_CAPTION_ID);
	break;

    case HTML_LABEL:
	CHECK_ID(HTML_LABEL_ID);
	break;

    case HTML_KEYGEN:
	CHECK_ID(HTML_KEYGEN_ID);
	break;

    case HTML_BUTTON:
	{
	    InputFieldData I;
	    int chars;

	    /* init */
	    memset(&I, 0, sizeof(I));
	    I.name_cs = ATTR_CS_IN;
	    I.value_cs = ATTR_CS_IN;

	    UPDATE_STYLE;
	    if (present &&
		present[HTML_BUTTON_TYPE] &&
		value[HTML_BUTTON_TYPE]) {
		if (!strcasecomp(value[HTML_BUTTON_TYPE], "submit") ||
		    !strcasecomp(value[HTML_BUTTON_TYPE], "reset")) {
		    /*
		     * It's a button for submitting or resetting a form.  - FM
		     */
		    I.type = value[HTML_BUTTON_TYPE];
		} else {
		    /*
		     * Ugh, it's a button for a script.  - FM
		     */
		    I.type = value[HTML_BUTTON_TYPE];
		}
	    } else {
		/* default, if no type given, is a submit button */
		I.type = "submit";
	    }

	    /*
	     * Before any input field, add a collapsible space if we're not in
	     * a PRE block, to promote a wrap there for any long values that
	     * would extend past the right margin from our current position in
	     * the line.  If we are in a PRE block, start a new line if the
	     * last line already is within 6 characters of the wrap point for
	     * PRE blocks.  - FM
	     */
	    if (me->sp[0].tag_number != HTML_PRE && !me->inPRE &&
		me->sp->style->freeFormat) {
		HTML_put_character(me, ' ');
		me->in_word = NO;
	    } else if (HText_LastLineSize(me->text, FALSE) > (LYcolLimit - 6)) {
		HTML_put_character(me, '\n');
		me->in_word = NO;
	    }
	    HTML_put_character(me, '(');

	    if (!(present && present[HTML_BUTTON_NAME] &&
		  value[HTML_BUTTON_NAME])) {
		I.name = "";
	    } else if (strchr(value[HTML_BUTTON_NAME], '&') == NULL) {
		I.name = value[HTML_BUTTON_NAME];
	    } else {
		StrAllocCopy(I_name, value[HTML_BUTTON_NAME]);
		UNESCAPE_FIELDNAME_TO_STD(&I_name);
		I.name = I_name;
	    }

	    if (present && present[HTML_BUTTON_VALUE] &&
		non_empty(value[HTML_BUTTON_VALUE])) {
		/*
		 * Convert any HTML entities or decimal escaping.  - FM
		 */
		StrAllocCopy(I_value, value[HTML_BUTTON_VALUE]);
		me->UsePlainSpace = TRUE;
		TRANSLATE_AND_UNESCAPE_ENTITIES(&I_value, TRUE, me->HiddenValue);
		me->UsePlainSpace = FALSE;
		I.value = I_value;
		/*
		 * Convert any newlines or tabs to spaces, and trim any lead or
		 * trailing spaces.  - FM
		 */
		LYReduceBlanks(I.value);
	    } else if (!strcasecomp(I.type, "button")) {
		if (non_empty(I.name)) {
		    StrAllocCopy(I.value, I.name);
		} else {
		    StrAllocCopy(I.value, "BUTTON");
		}
	    } else if (I.value == 0) {
		StrAllocCopy(I.value, "BUTTON");
	    }

	    if (present && present[HTML_BUTTON_READONLY])
		I.readonly = YES;

	    if (present && present[HTML_BUTTON_DISABLED])
		I.disabled = YES;

	    if (present && present[HTML_BUTTON_CLASS] &&	/* Not yet used. */
		non_empty(value[HTML_BUTTON_CLASS]))
		I.iclass = value[HTML_BUTTON_CLASS];

	    if (present && present[HTML_BUTTON_ID] &&
		non_empty(value[HTML_BUTTON_ID])) {
		I.id = value[HTML_BUTTON_ID];
		CHECK_ID(HTML_BUTTON_ID);
	    }

	    if (present && present[HTML_BUTTON_LANG] &&		/* Not yet used. */
		non_empty(value[HTML_BUTTON_LANG]))
		I.lang = value[HTML_BUTTON_LANG];

	    chars = HText_beginInput(me->text, me->inUnderline, &I);
	    /*
	     * Submit and reset buttons have values which don't change, so
	     * HText_beginInput() sets I.value to the string which should be
	     * displayed, and we'll enter that instead of underscore
	     * placeholders into the HText structure to see it instead of
	     * underscores when dumping or printing.  We also won't worry about
	     * a wrap in PRE blocks, because the line editor never is invoked
	     * for submit or reset buttons.  - LE & FM
	     */
	    if (me->sp[0].tag_number == HTML_PRE ||
		!me->sp->style->freeFormat) {
		/*
		 * We have a submit or reset button in a PRE block, so output
		 * the entire value from the markup.  If it extends to the
		 * right margin, it will wrap there, and only the portion
		 * before that wrap will be hightlighted on screen display
		 * (Yuk!) but we may as well show the rest of the full value on
		 * the next or more lines.  - FM
		 */
		while (I.value[i])
		    HTML_put_character(me, I.value[i++]);
	    } else {
		/*
		 * The submit or reset button is not in a PRE block.  Note that
		 * if a wrap occurs before outputting the entire value, the
		 * wrapped portion will not be highlighted or clearly indicated
		 * as part of the link for submission or reset (Yuk!).  We'll
		 * replace any spaces in the submit or reset button value with
		 * nbsp, to promote a wrap at the space we ensured would be
		 * present before the start of the string, as when we use all
		 * underscores instead of the INPUT's actual value, but we
		 * could still get a wrap at the right margin, instead, if the
		 * value is greater than a line width for the current style. 
		 * Also, if chars somehow ended up longer than the length of
		 * the actual value (shouldn't have), we'll continue padding
		 * with nbsp up to the length of chars.  - FM
		 */
		for (i = 0; I.value[i]; i++) {
		    HTML_put_character(me,
				       (char) ((I.value[i] == ' ')
					       ? HT_NON_BREAK_SPACE
					       : I.value[i]));
		}
		while (i++ < chars) {
		    HTML_put_character(me, HT_NON_BREAK_SPACE);
		}
	    }
	    HTML_put_character(me, ')');
	    if (me->sp[0].tag_number != HTML_PRE &&
		me->sp->style->freeFormat) {
		HTML_put_character(me, ' ');
		me->in_word = NO;
	    }
	    FREE(I_value);
	    FREE(I_name);
	}
	break;

    case HTML_INPUT:
	{
	    InputFieldData I;
	    int chars;
	    BOOL UseALTasVALUE = FALSE;
	    BOOL HaveSRClink = FALSE;
	    char *ImageSrc = NULL;
	    BOOL IsSubmitOrReset = FALSE;
	    HTkcode kcode = NOKANJI;
	    HTkcode specified_kcode = NOKANJI;

	    /* init */
	    memset(&I, 0, sizeof(I));
	    I.name_cs = ATTR_CS_IN;
	    I.value_cs = ATTR_CS_IN;

	    UPDATE_STYLE;

	    /*
	     * Before any input field, add a collapsible space if we're not in
	     * a PRE block, to promote a wrap there for any long values that
	     * would extend past the right margin from our current position in
	     * the line.  If we are in a PRE block, start a new line if the
	     * last line already is within 6 characters of the wrap point for
	     * PRE blocks.  - FM
	     */
	    if (me->sp[0].tag_number != HTML_PRE && !me->inPRE &&
		me->sp->style->freeFormat) {
		HTML_put_character(me, ' ');
		me->in_word = NO;
	    } else if (HText_LastLineSize(me->text, FALSE) > (LYcolLimit - 6)) {
		HTML_put_character(me, '\n');
		me->in_word = NO;
	    }

	    /*
	     * Get the TYPE and make sure we can handle it.  - FM
	     */
	    if (present && present[HTML_INPUT_TYPE] &&
		non_empty(value[HTML_INPUT_TYPE])) {
		const char *not_impl = NULL;
		char *usingval = NULL;

		I.type = value[HTML_INPUT_TYPE];

		if (!strcasecomp(I.type, "range")) {
		    if (present[HTML_INPUT_MIN] &&
			non_empty(value[HTML_INPUT_MIN]))
			I.min = value[HTML_INPUT_MIN];
		    if (present[HTML_INPUT_MAX] &&
			non_empty(value[HTML_INPUT_MAX]))
			I.max = value[HTML_INPUT_MAX];
		    /*
		     * Not yet implemented.
		     */
#ifdef NOTDEFINED
		    not_impl = "[RANGE Input]";
		    if (me->inFORM)
			HText_DisableCurrentForm();
#endif /* NOTDEFINED */
		    CTRACE((tfp, "HTML: Ignoring TYPE=\"range\"\n"));
		    break;

		} else if (!strcasecomp(I.type, "file")) {
		    if (present[HTML_INPUT_ACCEPT] &&
			non_empty(value[HTML_INPUT_ACCEPT]))
			I.accept = value[HTML_INPUT_ACCEPT];
#ifndef USE_FILE_UPLOAD
		    not_impl = "[FILE Input]";
		    CTRACE((tfp, "Attempting to fake as: %s\n", I.type));
#ifdef NOTDEFINED
		    if (me->inFORM)
			HText_DisableCurrentForm();
#endif /* NOTDEFINED */
		    CTRACE((tfp, "HTML: Ignoring TYPE=\"file\"\n"));
#endif /* USE_FILE_UPLOAD */

		} else if (!strcasecomp(I.type, "button")) {
		    /*
		     * Ugh, a button for a script.
		     */
		    not_impl = "[BUTTON Input]";
		}
		if (not_impl != NULL) {
		    if (me->inUnderline == FALSE) {
			HText_appendCharacter(me->text,
					      LY_UNDERLINE_START_CHAR);
		    }
		    HTML_put_string(me, not_impl);
		    if (usingval != NULL) {
			HTML_put_string(me, usingval);
			FREE(usingval);
		    } else {
			HTML_put_string(me, " (not implemented)");
		    }
		    if (me->inUnderline == FALSE) {
			HText_appendCharacter(me->text,
					      LY_UNDERLINE_END_CHAR);
		    }
		}
	    }

	    CTRACE((tfp, "Ok, we're trying type=[%s]\n", NONNULL(I.type)));

	    /*
	     * Check for an unclosed TEXTAREA.
	     */
	    if (me->inTEXTAREA) {
		if (LYBadHTML(me)) {
		    LYShowBadHTML("Bad HTML: Missing TEXTAREA end tag.\n");
		}
	    }

	    /*
	     * Check for an unclosed SELECT, try to close it if found.
	     */
	    if (me->inSELECT) {
		CTRACE((tfp, "HTML: Missing SELECT end tag, faking it...\n"));
		if (me->sp->tag_number != HTML_SELECT) {
		    SET_SKIP_STACK(HTML_SELECT);
		}
		HTML_end_element(me, HTML_SELECT, include);
	    }

	    /*
	     * Handle the INPUT as for a FORM.  - FM
	     */
	    if (!(present && present[HTML_INPUT_NAME] &&
		  non_empty(value[HTML_INPUT_NAME]))) {
		I.name = "";
	    } else if (strchr(value[HTML_INPUT_NAME], '&') == NULL) {
		I.name = value[HTML_INPUT_NAME];
	    } else {
		StrAllocCopy(I_name, value[HTML_INPUT_NAME]);
		UNESCAPE_FIELDNAME_TO_STD(&I_name);
		I.name = I_name;
	    }

	    if ((present && present[HTML_INPUT_ALT] &&
		 non_empty(value[HTML_INPUT_ALT]) &&
		 I.type && !strcasecomp(I.type, "image")) &&
		!(present && present[HTML_INPUT_VALUE] &&
		  non_empty(value[HTML_INPUT_VALUE]))) {
		/*
		 * This is a TYPE="image" using an ALT rather than VALUE
		 * attribute to indicate the link string for text clients or
		 * GUIs with image loading off, so set the flag to use that as
		 * if it were a VALUE attribute.  - FM
		 */
		UseALTasVALUE = TRUE;
	    }
	    if (verbose_img && !clickable_images &&
		present && present[HTML_INPUT_SRC] &&
		non_empty(value[HTML_INPUT_SRC]) &&
		I.type && !strcasecomp(I.type, "image")) {
		ImageSrc = MakeNewImageValue(value);
	    } else if (clickable_images == TRUE &&
		       present && present[HTML_INPUT_SRC] &&
		       non_empty(value[HTML_INPUT_SRC]) &&
		       I.type && !strcasecomp(I.type, "image")) {
		StrAllocCopy(href, value[HTML_INPUT_SRC]);
		/*
		 * We have a TYPE="image" with a non-zero-length SRC attribute
		 * and want clickable images.  Make the SRC's value a link if
		 * it's still not zero-length legitimizing it.  - FM
		 */
		LYLegitimizeHREF(me, &href, TRUE, TRUE);
		if (*href) {

		    if (me->inA) {
			SET_SKIP_STACK(HTML_A);
			HTML_end_element(me, HTML_A, include);
		    }
		    me->CurrentA = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
							     NULL,	/* Tag */
							     href,	/* Addresss */
							     (HTLinkType *) 0);		/* Type */
		    HText_beginAnchor(me->text, me->inUnderline, me->CurrentA);
		    if (me->inBoldH == FALSE)
			HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
		    HTML_put_string(me, VERBOSE_IMG(value,
						    HTML_INPUT_SRC,
						    "[IMAGE]"));
		    FREE(newtitle);
		    if (me->inBoldH == FALSE)
			HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
		    HText_endAnchor(me->text, 0);
		    HTML_put_character(me, '-');
		    HaveSRClink = TRUE;
		}
		FREE(href);
	    }
	    CTRACE((tfp, "2.Ok, we're trying type=[%s] (present=%p)\n",
		    NONNULL(I.type),
		    present));
	    /* text+file don't go in here */
	    if ((UseALTasVALUE == TRUE) ||
		(present && present[HTML_INPUT_VALUE] &&
		 value[HTML_INPUT_VALUE] &&
		 (*value[HTML_INPUT_VALUE] ||
		  (I.type && (!strcasecomp(I.type, "checkbox") ||
			      !strcasecomp(I.type, "radio")))))) {

		/*
		 * Convert any HTML entities or decimal escaping.  - FM
		 */
		int CurrentCharSet = current_char_set;
		BOOL CurrentEightBitRaw = HTPassEightBitRaw;
		BOOLEAN CurrentUseDefaultRawMode = LYUseDefaultRawMode;
		HTCJKlang CurrentHTCJK = HTCJK;

		if (I.type && !strcasecomp(I.type, "hidden")) {
		    me->HiddenValue = TRUE;
		    current_char_set = LATIN1;	/* Default ISO-Latin1 */
		    LYUseDefaultRawMode = TRUE;
		    HTMLSetCharacterHandling(current_char_set);
		}

		CTRACE((tfp, "3.Ok, we're trying type=[%s]\n", NONNULL(I.type)));
		if (!I.type)
		    me->UsePlainSpace = TRUE;
		else if (!strcasecomp(I.type, "text") ||
#ifdef USE_FILE_UPLOAD
			 !strcasecomp(I.type, "file") ||
#endif
			 !strcasecomp(I.type, "submit") ||
			 !strcasecomp(I.type, "image") ||
			 !strcasecomp(I.type, "reset")) {
		    CTRACE((tfp, "normal field type: %s\n", NONNULL(I.type)));
		    me->UsePlainSpace = TRUE;
		}

		StrAllocCopy(I_value,
			     ((UseALTasVALUE == TRUE)
			      ? value[HTML_INPUT_ALT]
			      : value[HTML_INPUT_VALUE]));
		if (me->UsePlainSpace && !me->HiddenValue) {
		    I.value_cs = current_char_set;
		}
		CTRACE((tfp, "4.Ok, we're trying type=[%s]\n", NONNULL(I.type)));
		TRANSLATE_AND_UNESCAPE_ENTITIES6(&I_value,
						 ATTR_CS_IN,
						 I.value_cs,
						 (BOOL) (me->UsePlainSpace &&
							 !me->HiddenValue),
						 me->UsePlainSpace,
						 me->HiddenValue);
		I.value = I_value;
		if (me->UsePlainSpace == TRUE) {
		    /*
		     * Convert any newlines or tabs to spaces, and trim any
		     * lead or trailing spaces.  - FM
		     */
		    LYReduceBlanks(I.value);
		}
		me->UsePlainSpace = FALSE;

		if (I.type && !strcasecomp(I.type, "hidden")) {
		    me->HiddenValue = FALSE;
		    current_char_set = CurrentCharSet;
		    LYUseDefaultRawMode = CurrentUseDefaultRawMode;
		    HTMLSetCharacterHandling(current_char_set);
		    HTPassEightBitRaw = CurrentEightBitRaw;
		    HTCJK = CurrentHTCJK;
		}
	    } else if (HaveSRClink == TRUE) {
		/*
		 * We put up an [IMAGE] link and '-' for a TYPE="image" and
		 * didn't get a VALUE or ALT string, so fake a "Submit" value. 
		 * If we didn't put up a link, then HText_beginInput() will use
		 * "[IMAGE]-Submit".  - FM
		 */
		StrAllocCopy(I_value, "Submit");
		I.value = I_value;
	    } else if (ImageSrc) {
		/* [IMAGE]-Submit with verbose images and not clickable images.
		 * Use ImageSrc if no other alt or value is supplied. --LE
		 */
		I.value = ImageSrc;
	    }
	    if (present && present[HTML_INPUT_READONLY])
		I.readonly = YES;
	    if (present && present[HTML_INPUT_CHECKED])
		I.checked = YES;
	    if (present && present[HTML_INPUT_SIZE] &&
		non_empty(value[HTML_INPUT_SIZE]))
		I.size = atoi(value[HTML_INPUT_SIZE]);
	    LimitValue(I.size, MAX_LINE);
	    if (present && present[HTML_INPUT_MAXLENGTH] &&
		non_empty(value[HTML_INPUT_MAXLENGTH]))
		I.maxlength = value[HTML_INPUT_MAXLENGTH];
	    if (present && present[HTML_INPUT_DISABLED])
		I.disabled = YES;

	    if (present && present[HTML_INPUT_ACCEPT_CHARSET]) {	/* Not yet used. */
		I.accept_cs = (value[HTML_INPUT_ACCEPT_CHARSET]
			       ? value[HTML_INPUT_ACCEPT_CHARSET]
			       : "UNKNOWN");
	    }
	    if (present && present[HTML_INPUT_ALIGN] &&		/* Not yet used. */
		non_empty(value[HTML_INPUT_ALIGN]))
		I.align = value[HTML_INPUT_ALIGN];
	    if (present && present[HTML_INPUT_CLASS] &&		/* Not yet used. */
		non_empty(value[HTML_INPUT_CLASS]))
		I.iclass = value[HTML_INPUT_CLASS];
	    if (present && present[HTML_INPUT_ERROR] &&		/* Not yet used. */
		non_empty(value[HTML_INPUT_ERROR]))
		I.error = value[HTML_INPUT_ERROR];
	    if (present && present[HTML_INPUT_HEIGHT] &&	/* Not yet used. */
		non_empty(value[HTML_INPUT_HEIGHT]))
		I.height = value[HTML_INPUT_HEIGHT];
	    if (present && present[HTML_INPUT_WIDTH] &&		/* Not yet used. */
		non_empty(value[HTML_INPUT_WIDTH]))
		I.width = value[HTML_INPUT_WIDTH];
	    if (present && present[HTML_INPUT_ID] &&
		non_empty(value[HTML_INPUT_ID])) {
		I.id = value[HTML_INPUT_ID];
		CHECK_ID(HTML_INPUT_ID);
	    }
	    if (present && present[HTML_INPUT_LANG] &&	/* Not yet used. */
		non_empty(value[HTML_INPUT_LANG]))
		I.lang = value[HTML_INPUT_LANG];
	    if (present && present[HTML_INPUT_MD] &&	/* Not yet used. */
		non_empty(value[HTML_INPUT_MD]))
		I.md = value[HTML_INPUT_MD];

	    chars = HText_beginInput(me->text, me->inUnderline, &I);
	    CTRACE((tfp,
		    "I.%s have %d chars, or something\n",
		    NONNULL(I.type),
		    chars));
	    /*
	     * Submit and reset buttons have values which don't change, so
	     * HText_beginInput() sets I.value to the string which should be
	     * displayed, and we'll enter that instead of underscore
	     * placeholders into the HText structure to see it instead of
	     * underscores when dumping or printing.  We also won't worry about
	     * a wrap in PRE blocks, because the line editor never is invoked
	     * for submit or reset buttons.  - LE & FM
	     */
	    if (I.type &&
		(!strcasecomp(I.type, "submit") ||
		 !strcasecomp(I.type, "reset") ||
		 !strcasecomp(I.type, "image")))
		IsSubmitOrReset = TRUE;

	    if (I.type && chars == 3 &&
		!strcasecomp(I.type, "radio")) {
		/*
		 * Put a (_) placeholder, and one space (collapsible) before
		 * the label that is expected to follow.  - FM
		 */
		HTML_put_string(me, "(_)");
		HText_endInput(me->text);
		chars = 0;
		me->in_word = YES;
		if (me->sp[0].tag_number != HTML_PRE &&
		    me->sp->style->freeFormat) {
		    HTML_put_character(me, ' ');
		    me->in_word = NO;
		}
	    } else if (I.type && chars == 3 &&
		       !strcasecomp(I.type, "checkbox")) {
		/*
		 * Put a [_] placeholder, and one space (collapsible) before
		 * the label that is expected to follow.  - FM
		 */
		HTML_put_string(me, "[_]");
		HText_endInput(me->text);
		chars = 0;
		me->in_word = YES;
		if (me->sp[0].tag_number != HTML_PRE &&
		    me->sp->style->freeFormat) {
		    HTML_put_character(me, ' ');
		    me->in_word = NO;
		}
	    } else if ((me->sp[0].tag_number == HTML_PRE ||
			!me->sp->style->freeFormat)
		       && chars > 6 &&
		       IsSubmitOrReset == FALSE) {
		/*
		 * This is not a submit or reset button, and we are in a PRE
		 * block with a field intended to exceed 6 character widths. 
		 * The code inadequately handles INPUT fields in PRE tags if
		 * wraps occur (at the right margin) for the underscore
		 * placeholders.  We'll put up a minimum of 6 underscores,
		 * since we should have wrapped artificially, above, if the
		 * INPUT begins within 6 columns of the right margin, and if
		 * any more would exceed the wrap column, we'll ignore them. 
		 * Note that if we somehow get tripped up and a wrap still does
		 * occur before all 6 of the underscores are output, the
		 * wrapped ones won't be treated as part of the editing window,
		 * nor be highlighted when not editing (Yuk!).  - FM
		 */
		for (i = 0; i < 6; i++) {
		    HTML_put_character(me, '_');
		    chars--;
		}
	    }
	    CTRACE((tfp, "I.%s, %d\n", NONNULL(I.type), IsSubmitOrReset));
	    if (IsSubmitOrReset == FALSE) {
		/*
		 * This is not a submit or reset button, so output the rest of
		 * the underscore placeholders, if any more are needed.  - FM
		 */
		if (chars > 0) {
		    for (; chars > 0; chars--)
			HTML_put_character(me, '_');
		    HText_endInput(me->text);
		}
	    } else {
		if (HTCJK == JAPANESE) {
		    kcode = HText_getKcode(me->text);
		    HText_updateKcode(me->text, kanji_code);
		    specified_kcode = HText_getSpecifiedKcode(me->text);
		    HText_updateSpecifiedKcode(me->text, kanji_code);
		}
		if (me->sp[0].tag_number == HTML_PRE ||
		    !me->sp->style->freeFormat) {
		    /*
		     * We have a submit or reset button in a PRE block, so
		     * output the entire value from the markup.  If it extends
		     * to the right margin, it will wrap there, and only the
		     * portion before that wrap will be hightlighted on screen
		     * display (Yuk!) but we may as well show the rest of the
		     * full value on the next or more lines.  - FM
		     */
		    while (I.value[i])
			HTML_put_character(me, I.value[i++]);
		} else {
		    /*
		     * The submit or reset button is not in a PRE block.  Note
		     * that if a wrap occurs before outputting the entire
		     * value, the wrapped portion will not be highlighted or
		     * clearly indicated as part of the link for submission or
		     * reset (Yuk!).  We'll replace any spaces in the submit or
		     * reset button value with nbsp, to promote a wrap at the
		     * space we ensured would be present before the start of
		     * the string, as when we use all underscores instead of
		     * the INPUT's actual value, but we could still get a wrap
		     * at the right margin, instead, if the value is greater
		     * than a line width for the current style.  Also, if chars
		     * somehow ended up longer than the length of the actual
		     * value (shouldn't have), we'll continue padding with nbsp
		     * up to the length of chars.  - FM
		     */
		    for (i = 0; I.value[i]; i++)
			HTML_put_character(me,
					   (char) (I.value[i] == ' '
						   ? HT_NON_BREAK_SPACE
						   : I.value[i]));
		    while (i++ < chars)
			HTML_put_character(me, HT_NON_BREAK_SPACE);
		}
		if (HTCJK == JAPANESE) {
		    HText_updateKcode(me->text, kcode);
		    HText_updateSpecifiedKcode(me->text, specified_kcode);
		}
	    }
	    if (chars != 0) {
		HText_endInput(me->text);
	    }
	    FREE(ImageSrc);
	    FREE(I_value);
	    FREE(I_name);
	}
	break;

    case HTML_TEXTAREA:
	/*
	 * Set to know we are in a textarea.
	 */
	me->inTEXTAREA = TRUE;

	/*
	 * Get ready for the value.
	 */
	HTChunkClear(&me->textarea);
	if (present && present[HTML_TEXTAREA_NAME] &&
	    value[HTML_TEXTAREA_NAME]) {
	    StrAllocCopy(me->textarea_name, value[HTML_TEXTAREA_NAME]);
	    me->textarea_name_cs = ATTR_CS_IN;
	    if (strchr(value[HTML_TEXTAREA_NAME], '&') != NULL) {
		UNESCAPE_FIELDNAME_TO_STD(&me->textarea_name);
	    }
	} else {
	    StrAllocCopy(me->textarea_name, "");
	}

	if (present && present[HTML_TEXTAREA_ACCEPT_CHARSET]) {
	    if (value[HTML_TEXTAREA_ACCEPT_CHARSET]) {
		StrAllocCopy(me->textarea_accept_cs, value[HTML_TEXTAREA_ACCEPT_CHARSET]);
		TRANSLATE_AND_UNESCAPE_TO_STD(&me->textarea_accept_cs);
	    } else {
		StrAllocCopy(me->textarea_accept_cs, "UNKNOWN");
	    }
	} else {
	    FREE(me->textarea_accept_cs);
	}

	if (present && present[HTML_TEXTAREA_COLS] &&
	    value[HTML_TEXTAREA_COLS] &&
	    isdigit(UCH(*value[HTML_TEXTAREA_COLS]))) {
	    me->textarea_cols = atoi(value[HTML_TEXTAREA_COLS]);
	} else {
	    int width;

	    width = LYcolLimit -
		me->new_style->leftIndent - me->new_style->rightIndent;
	    if (dump_output_immediately)	/* don't waste too much for this */
		width = HTMIN(width, DFT_TEXTAREA_COLS);
	    if (width > 1 && (width - 1) * 6 < MAX_LINE - 3 -
		me->new_style->leftIndent - me->new_style->rightIndent)
		me->textarea_cols = width;
	    else
		me->textarea_cols = DFT_TEXTAREA_COLS;
	}
	LimitValue(me->textarea_cols, MAX_TEXTAREA_COLS);

	if (present && present[HTML_TEXTAREA_ROWS] &&
	    value[HTML_TEXTAREA_ROWS] &&
	    isdigit(UCH(*value[HTML_TEXTAREA_ROWS]))) {
	    me->textarea_rows = atoi(value[HTML_TEXTAREA_ROWS]);
	} else {
	    me->textarea_rows = DFT_TEXTAREA_ROWS;
	}
	LimitValue(me->textarea_rows, MAX_TEXTAREA_ROWS);

	/*
	 * Lynx treats disabled and readonly textarea's the same -
	 * unmodifiable in either case.
	 */
	me->textarea_readonly = NO;
	if (present && present[HTML_TEXTAREA_READONLY])
	    me->textarea_readonly = YES;

	me->textarea_disabled = NO;
	if (present && present[HTML_TEXTAREA_DISABLED])
	    me->textarea_disabled = YES;

	if (present && present[HTML_TEXTAREA_ID]
	    && non_empty(value[HTML_TEXTAREA_ID])) {
	    StrAllocCopy(id_string, value[HTML_TEXTAREA_ID]);
	    TRANSLATE_AND_UNESCAPE_TO_STD(&id_string);
	    if ((id_string != '\0') &&
		(ID_A = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
						  id_string,	/* Tag */
						  NULL,		/* Addresss */
						  (HTLinkType *) 0))) {		/* Type */
		HText_beginAnchor(me->text, me->inUnderline, ID_A);
		HText_endAnchor(me->text, 0);
		StrAllocCopy(me->textarea_id, id_string);
	    } else {
		FREE(me->textarea_id);
	    }
	    FREE(id_string);
	} else {
	    FREE(me->textarea_id);
	}
	break;

    case HTML_SELECT:
	/*
	 * Check for an already open SELECT block.  - FM
	 */
	if (me->inSELECT) {
	    if (LYBadHTML(me)) {
		LYShowBadHTML("Bad HTML: SELECT start tag in SELECT element.  Faking SELECT end tag. *****\n");
	    }
	    if (me->sp->tag_number != HTML_SELECT) {
		SET_SKIP_STACK(HTML_SELECT);
	    }
	    HTML_end_element(me, HTML_SELECT, include);
	}

	/*
	 * Start a new SELECT block. - FM
	 */
	LYHandleSELECT(me,
		       present, (STRING2PTR) value,
		       include,
		       TRUE);
	break;

    case HTML_OPTION:
	{
	    /*
	     * An option is a special case of an input field.
	     */
	    InputFieldData I;

	    /*
	     * Make sure we're in a select tag.
	     */
	    if (!me->inSELECT) {
		if (LYBadHTML(me)) {
		    LYShowBadHTML("Bad HTML: OPTION tag not within SELECT tag\n");
		}

		/*
		 * Too likely to cause a crash, so we'll ignore it.  - FM
		 */
		break;
	    }

	    if (!me->first_option) {
		/*
		 * Finish the data off.
		 */
		HTChunkTerminate(&me->option);

		/*
		 * Finish the previous option @@@@@
		 */
		HText_setLastOptionValue(me->text,
					 me->option.data,
					 me->LastOptionValue,
					 MIDDLE_ORDER,
					 me->LastOptionChecked,
					 me->UCLYhndl,
					 ATTR_CS_IN);
	    }

	    /*
	     * If it's not a multiple option list and select popups are
	     * enabled, then don't use the checkbox/button method, and don't
	     * put anything on the screen yet.
	     */
	    if (me->first_option ||
		HTCurSelectGroupType == F_CHECKBOX_TYPE ||
		LYSelectPopups == FALSE) {
		if (HTCurSelectGroupType == F_CHECKBOX_TYPE ||
		    LYSelectPopups == FALSE) {
		    /*
		     * Start a newline before each option.
		     */
		    LYEnsureSingleSpace(me);
		} else {
		    /*
		     * Add option list designation character.
		     */
		    HText_appendCharacter(me->text, '[');
		    me->in_word = YES;
		}

		/*
		 * Inititialize.
		 */
		memset(&I, 0, sizeof(I));
		I.name_cs = -1;
		I.value_cs = current_char_set;

		I.type = "OPTION";

		if ((present && present[HTML_OPTION_SELECTED]) ||
		    (me->first_option && LYSelectPopups == FALSE &&
		     HTCurSelectGroupType == F_RADIO_TYPE))
		    I.checked = YES;

		if (present && present[HTML_OPTION_VALUE] &&
		    value[HTML_OPTION_VALUE]) {
		    /*
		     * Convert any HTML entities or decimal escaping.  - FM
		     */
		    StrAllocCopy(I_value, value[HTML_OPTION_VALUE]);
		    me->HiddenValue = TRUE;
		    TRANSLATE_AND_UNESCAPE_ENTITIES6(&I_value,
						     ATTR_CS_IN,
						     ATTR_CS_IN,
						     NO,
						     me->UsePlainSpace, me->HiddenValue);
		    I.value_cs = ATTR_CS_IN;
		    me->HiddenValue = FALSE;

		    I.value = I_value;
		}

		if (me->select_disabled ||
		    (0 && present && present[HTML_OPTION_DISABLED])) {
		    /* 2009/5/25 - suppress check for "disabled" attribute
		     * for Debian #525934 -TD
		     */
		    I.disabled = YES;
		}

		if (present && present[HTML_OPTION_ID]
		    && non_empty(value[HTML_OPTION_ID])) {
		    if ((ID_A = HTAnchor_findChildAndLink(me->node_anchor,	/* Parent */
							  value[HTML_OPTION_ID],	/* Tag */
							  NULL,		/* Addresss */
							  0)) != NULL) {	/* Type */
			HText_beginAnchor(me->text, me->inUnderline, ID_A);
			HText_endAnchor(me->text, 0);
			I.id = value[HTML_OPTION_ID];
		    }
		}

		HText_beginInput(me->text, me->inUnderline, &I);

		if (HTCurSelectGroupType == F_CHECKBOX_TYPE) {
		    /*
		     * Put a "[_]" placeholder, and one space (collapsible)
		     * before the label that is expected to follow.  - FM
		     */
		    HText_appendCharacter(me->text, '[');
		    HText_appendCharacter(me->text, '_');
		    HText_appendCharacter(me->text, ']');
		    HText_appendCharacter(me->text, ' ');
		    HText_setLastChar(me->text, ' ');	/* absorb white space */
		    me->in_word = NO;
		} else if (LYSelectPopups == FALSE) {
		    /*
		     * Put a "(_)" placeholder, and one space (collapsible)
		     * before the label that is expected to follow.  - FM
		     */
		    HText_appendCharacter(me->text, '(');
		    HText_appendCharacter(me->text, '_');
		    HText_appendCharacter(me->text, ')');
		    HText_appendCharacter(me->text, ' ');
		    HText_setLastChar(me->text, ' ');	/* absorb white space */
		    me->in_word = NO;
		}
	    }

	    /*
	     * Get ready for the next value.
	     */
	    HTChunkClear(&me->option);
	    if ((present && present[HTML_OPTION_SELECTED]) ||
		(me->first_option && LYSelectPopups == FALSE &&
		 HTCurSelectGroupType == F_RADIO_TYPE))
		me->LastOptionChecked = TRUE;
	    else
		me->LastOptionChecked = FALSE;
	    me->first_option = FALSE;

	    if (present && present[HTML_OPTION_VALUE] &&
		value[HTML_OPTION_VALUE]) {
		if (!I_value) {
		    /*
		     * Convert any HTML entities or decimal escaping.  - FM
		     */
		    StrAllocCopy(I_value, value[HTML_OPTION_VALUE]);
		    me->HiddenValue = TRUE;
		    TRANSLATE_AND_UNESCAPE_ENTITIES6(&I_value,
						     ATTR_CS_IN,
						     ATTR_CS_IN,
						     NO,
						     me->UsePlainSpace, me->HiddenValue);
		    me->HiddenValue = FALSE;
		}
		StrAllocCopy(me->LastOptionValue, I_value);
	    } else {
		StrAllocCopy(me->LastOptionValue, me->option.data);
	    }

	    /*
	     * If this is a popup option, print its option for use in selecting
	     * option by number.  - LE
	     */
	    if (HTCurSelectGroupType == F_RADIO_TYPE &&
		LYSelectPopups &&
		fields_are_numbered()) {
		char marker[8];
		int opnum = HText_getOptionNum(me->text);

		if (opnum > 0 && opnum < 100000) {
		    sprintf(marker, "(%d)", opnum);
		    HTML_put_string(me, marker);
		    for (i = (int) strlen(marker); i < 5; ++i) {
			HTML_put_character(me, '_');
		    }
		}
	    }
	    FREE(I_value);
	}
	break;

    case HTML_TABLE:
	/*
	 * Not fully implemented.  Just treat as a division with respect to any
	 * ALIGN attribute, with a default of HT_LEFT, or leave as a PRE block
	 * if we are presently in one.  - FM
	 *
	 * Also notify simple table tracking code unless in a preformatted
	 * section, or (currently) non-left alignment.
	 *
	 * If page author is using a TABLE within PRE, it's probably formatted
	 * specifically to work well for Lynx without simple table tracking
	 * code.  Cancel tracking, it would only make things worse.  - kw
	 */
#ifdef EXP_NESTED_TABLES
	if (!nested_tables)
#endif
	    HText_cancelStbl(me->text);

	if (me->inA) {
	    SET_SKIP_STACK(HTML_A);
	    HTML_end_element(me, HTML_A, include);
	}
	if (me->Underline_Level > 0) {
	    SET_SKIP_STACK(HTML_U);
	    HTML_end_element(me, HTML_U, include);
	}
	me->inTABLE = TRUE;
	if (me->sp->style->id == ST_Preformatted) {
	    UPDATE_STYLE;
	    CHECK_ID(HTML_TABLE_ID);
	    break;
	}
	if (me->Division_Level < (MAX_NESTING - 1)) {
	    me->Division_Level++;
	} else {
	    CTRACE((tfp,
		    "HTML: ****** Maximum nesting of %d divisions/tables exceeded!\n",
		    MAX_NESTING));
	}
	if (present && present[HTML_TABLE_ALIGN] &&
	    non_empty(value[HTML_TABLE_ALIGN])) {
	    if (!strcasecomp(value[HTML_TABLE_ALIGN], "center")) {
		if (no_table_center) {
		    me->DivisionAlignments[me->Division_Level] = HT_LEFT;
		    change_paragraph_style(me, styles[HTML_DLEFT]);
		    UPDATE_STYLE;
		    me->current_default_alignment =
			styles[HTML_DLEFT]->alignment;
		} else {
		    me->DivisionAlignments[me->Division_Level] = HT_CENTER;
		    change_paragraph_style(me, styles[HTML_DCENTER]);
		    UPDATE_STYLE;
		    me->current_default_alignment =
			styles[HTML_DCENTER]->alignment;
		}

		stbl_align = HT_CENTER;

	    } else if (!strcasecomp(value[HTML_TABLE_ALIGN], "right")) {
		me->DivisionAlignments[me->Division_Level] = HT_RIGHT;
		change_paragraph_style(me, styles[HTML_DRIGHT]);
		UPDATE_STYLE;
		me->current_default_alignment = styles[HTML_DRIGHT]->alignment;
		stbl_align = HT_RIGHT;
	    } else {
		me->DivisionAlignments[me->Division_Level] = HT_LEFT;
		change_paragraph_style(me, styles[HTML_DLEFT]);
		UPDATE_STYLE;
		me->current_default_alignment = styles[HTML_DLEFT]->alignment;
		if (!strcasecomp(value[HTML_TABLE_ALIGN], "left") ||
		    !strcasecomp(value[HTML_TABLE_ALIGN], "justify"))
		    stbl_align = HT_LEFT;
	    }
	} else {
	    me->DivisionAlignments[me->Division_Level] = HT_LEFT;
	    change_paragraph_style(me, styles[HTML_DLEFT]);
	    UPDATE_STYLE;
	    me->current_default_alignment = styles[HTML_DLEFT]->alignment;
	    /* stbl_align remains HT_ALIGN_NONE */
	}
	CHECK_ID(HTML_TABLE_ID);
	HText_startStblTABLE(me->text, stbl_align);
	break;

    case HTML_TR:
	/*
	 * Not fully implemented.  Just start a new row, if needed, act on an
	 * ALIGN attribute if present, and check for an ID link.  - FM
	 * Also notify simple table tracking code.  - kw
	 */
	if (me->inA) {
	    SET_SKIP_STACK(HTML_A);
	    HTML_end_element(me, HTML_A, include);
	}
	if (me->Underline_Level > 0) {
	    SET_SKIP_STACK(HTML_U);
	    HTML_end_element(me, HTML_U, include);
	}
	UPDATE_STYLE;
	if (!HText_LastLineEmpty(me->text, FALSE)) {
	    HText_setLastChar(me->text, ' ');	/* absorb white space */
	    HText_appendCharacter(me->text, '\r');
	}
	me->in_word = NO;

	if (me->sp->style->id == ST_Preformatted) {
	    CHECK_ID(HTML_TR_ID);
	    me->inP = FALSE;
/*	    HText_cancelStbl(me->text);  seems unnecessary here - kw */
	    break;
	}
	if (LYoverride_default_alignment(me)) {
	    me->sp->style->alignment = styles[me->sp[0].tag_number]->alignment;
	} else if (me->List_Nesting_Level >= 0 ||
		   ((me->Division_Level < 0) &&
		    (me->sp->style->id == ST_Normal ||
		     me->sp->style->id == ST_Preformatted))) {
	    me->sp->style->alignment = HT_LEFT;
	} else {
	    me->sp->style->alignment = (short) me->current_default_alignment;
	}
	if (present && present[HTML_TR_ALIGN] && value[HTML_TR_ALIGN]) {
	    if (!strcasecomp(value[HTML_TR_ALIGN], "center") &&
		!(me->List_Nesting_Level >= 0 && !me->inP)) {
		if (no_table_center)
		    me->sp->style->alignment = HT_LEFT;
		else
		    me->sp->style->alignment = HT_CENTER;
		stbl_align = HT_CENTER;
	    } else if (!strcasecomp(value[HTML_TR_ALIGN], "right") &&
		       !(me->List_Nesting_Level >= 0 && !me->inP)) {
		me->sp->style->alignment = HT_RIGHT;
		stbl_align = HT_RIGHT;
	    } else if (!strcasecomp(value[HTML_TR_ALIGN], "left") ||
		       !strcasecomp(value[HTML_TR_ALIGN], "justify")) {
		me->sp->style->alignment = HT_LEFT;
		stbl_align = HT_LEFT;
	    }
	}

	CHECK_ID(HTML_TR_ID);
	me->inP = FALSE;
	HText_startStblTR(me->text, stbl_align);
	break;

    case HTML_THEAD:
    case HTML_TFOOT:
    case HTML_TBODY:
	HText_endStblTR(me->text);
	/*
	 * Not fully implemented.  Just check for an ID link.  - FM
	 */
	if (me->inA) {
	    SET_SKIP_STACK(HTML_A);
	    HTML_end_element(me, HTML_A, include);
	}
	if (me->Underline_Level > 0) {
	    SET_SKIP_STACK(HTML_U);
	    HTML_end_element(me, HTML_U, include);
	}
	UPDATE_STYLE;
	if (me->inTABLE) {
	    if (present && present[HTML_TR_ALIGN] && value[HTML_TR_ALIGN]) {
		if (!strcasecomp(value[HTML_TR_ALIGN], "center")) {
		    stbl_align = HT_CENTER;
		} else if (!strcasecomp(value[HTML_TR_ALIGN], "right")) {
		    stbl_align = HT_RIGHT;
		} else if (!strcasecomp(value[HTML_TR_ALIGN], "left") ||
			   !strcasecomp(value[HTML_TR_ALIGN], "justify")) {
		    stbl_align = HT_LEFT;
		}
	    }
	    HText_startStblRowGroup(me->text, stbl_align);
	}
	CHECK_ID(HTML_TR_ID);
	break;

    case HTML_COL:
    case HTML_COLGROUP:
	/*
	 * Not fully implemented.  Just check for an ID link.  - FM
	 */
	if (me->inA) {
	    SET_SKIP_STACK(HTML_A);
	    HTML_end_element(me, HTML_A, include);
	}
	if (me->Underline_Level > 0) {
	    SET_SKIP_STACK(HTML_U);
	    HTML_end_element(me, HTML_U, include);
	}
	UPDATE_STYLE;
	if (me->inTABLE) {
	    int span = 1;

	    if (present && present[HTML_COL_SPAN] &&
		value[HTML_COL_SPAN] &&
		isdigit(UCH(*value[HTML_COL_SPAN])))
		span = atoi(value[HTML_COL_SPAN]);
	    if (present && present[HTML_COL_ALIGN] && value[HTML_COL_ALIGN]) {
		if (!strcasecomp(value[HTML_COL_ALIGN], "center")) {
		    stbl_align = HT_CENTER;
		} else if (!strcasecomp(value[HTML_COL_ALIGN], "right")) {
		    stbl_align = HT_RIGHT;
		} else if (!strcasecomp(value[HTML_COL_ALIGN], "left") ||
			   !strcasecomp(value[HTML_COL_ALIGN], "justify")) {
		    stbl_align = HT_LEFT;
		}
	    }
	    HText_startStblCOL(me->text, span, stbl_align,
			       (BOOL) (ElementNumber == HTML_COLGROUP));
	}
	CHECK_ID(HTML_COL_ID);
	break;

    case HTML_TH:
    case HTML_TD:
	if (me->inA) {
	    SET_SKIP_STACK(HTML_A);
	    HTML_end_element(me, HTML_A, include);
	}
	if (me->Underline_Level > 0) {
	    SET_SKIP_STACK(HTML_U);
	    HTML_end_element(me, HTML_U, include);
	}
	UPDATE_STYLE;
	CHECK_ID(HTML_TD_ID);
	/*
	 * Not fully implemented.  Just add a collapsible space and break - FM
	 * Also notify simple table tracking code.  - kw
	 */
	HTML_put_character(me, ' ');
	{
	    int colspan = 1, rowspan = 1;

	    if (present && present[HTML_TD_COLSPAN] &&
		value[HTML_TD_COLSPAN] &&
		isdigit(UCH(*value[HTML_TD_COLSPAN])))
		colspan = atoi(value[HTML_TD_COLSPAN]);
	    if (present && present[HTML_TD_ROWSPAN] &&
		value[HTML_TD_ROWSPAN] &&
		isdigit(UCH(*value[HTML_TD_ROWSPAN])))
		rowspan = atoi(value[HTML_TD_ROWSPAN]);
	    if (present && present[HTML_TD_ALIGN] && value[HTML_TD_ALIGN]) {
		if (!strcasecomp(value[HTML_TD_ALIGN], "center")) {
		    stbl_align = HT_CENTER;
		} else if (!strcasecomp(value[HTML_TD_ALIGN], "right")) {
		    stbl_align = HT_RIGHT;
		} else if (!strcasecomp(value[HTML_TD_ALIGN], "left") ||
			   !strcasecomp(value[HTML_TD_ALIGN], "justify")) {
		    stbl_align = HT_LEFT;
		}
	    }
	    HText_startStblTD(me->text, colspan, rowspan, stbl_align,
			      (BOOL) (ElementNumber == HTML_TH));
	}
	me->in_word = NO;
	break;

    case HTML_MATH:
	/*
	 * We're getting it as Literal text, which, until we can process it,
	 * we'll display as is, within brackets to alert the user.  - FM
	 */
	HTChunkClear(&me->math);
	CHECK_ID(HTML_GEN_ID);
	break;

    default:
	break;

    }				/* end switch */

    if (ElementNumber >= HTML_ELEMENTS ||
	HTML_dtd.tags[ElementNumber].contents != SGML_EMPTY) {
	if (me->skip_stack > 0) {
	    CTRACE((tfp,
		    "HTML:begin_element: internal call (level %d), leaving on stack - `%s'\n",
		    me->skip_stack, NONNULL(GetHTStyleName(me->sp->style))));
	    me->skip_stack--;
	    return status;
	}
	if (me->sp == me->stack) {
	    if (me->stack_overrun == FALSE) {
		HTAlert(HTML_STACK_OVERRUN);
		CTRACE((tfp,
			"HTML: ****** Maximum nesting of %d tags exceeded!\n",
			MAX_NESTING));
		me->stack_overrun = TRUE;
	    }
	    return HT_ERROR;
	}

	CTRACE((tfp,
		"HTML:begin_element[%d]: adding style to stack - %s (%s)\n",
		(int) STACKLEVEL(me),
		NONNULL(GetHTStyleName(me->new_style)),
		HTML_dtd.tags[ElementNumber].name));
	(me->sp)--;
	me->sp[0].style = me->new_style;	/* Stack new style */
	me->sp[0].tag_number = ElementNumber;
#ifdef USE_JUSTIFY_ELTS
	if (wait_for_this_stacked_elt < 0 &&
	    HTML_dtd.tags[ElementNumber].can_justify == FALSE)
	    wait_for_this_stacked_elt = (int) (me->stack - me->sp) + MAX_NESTING;
#endif
    }
#ifdef USE_JUSTIFY_ELTS
    if (in_DT && ElementNumber == HTML_DD)
	in_DT = FALSE;
    else if (ElementNumber == HTML_DT)
	in_DT = TRUE;
#endif

#if defined(USE_COLOR_STYLE)
/* end really empty tags straight away */

    if (ReallyEmptyTagNum(element_number)) {
	CTRACE2(TRACE_STYLE,
		(tfp, "STYLE.begin_element:ending \"EMPTY\" element style\n"));
	HText_characterStyle(me->text, HCODE_TO_STACK_OFF(hcode), STACK_OFF);

#  if !OMIT_SCN_KEEPING
	FastTrimColorClass(HTML_dtd.tags[element_number].name,
			   HTML_dtd.tags[element_number].name_len,
			   Style_className,
			   &Style_className_end, &hcode);
#  endif
    }
#endif /* USE_COLOR_STYLE */
    return status;
}

/*		End Element
 *		-----------
 *
 *	When we end an element, the style must be returned to that
 *	in effect before that element.	Note that anchors (etc?)
 *	don't have an associated style, so that we must scan down the
 *	stack for an element with a defined style. (In fact, the styles
 *	should be linked to the whole stack not just the top one.)
 *	TBL 921119
 *
 *	We don't turn on "CAREFUL" check because the parser produces
 *	(internal code errors apart) good nesting.  The parser checks
 *	incoming code errors, not this module.
 */
static int HTML_end_element(HTStructured * me, int element_number,
			    char **include)
{
    static char empty[1];

    int i = 0;
    int status = HT_OK;
    char *temp = NULL, *cp = NULL;
    BOOL BreakFlag = FALSE;
    BOOL intern_flag = FALSE;

#ifdef USE_COLOR_STYLE
    BOOL skip_stack_requested = FALSE;
#endif
    EMIT_IFDEF_USE_JUSTIFY_ELTS(BOOL reached_awaited_stacked_elt = FALSE);

#ifdef USE_PRETTYSRC
    if (psrc_view && !sgml_in_psrc_was_initialized) {
	if (!psrc_nested_call) {
	    HTTag *tag = &HTML_dtd.tags[element_number];
	    char buf[200];
	    int tag_charset = 0;

	    psrc_nested_call = TRUE;
	    PSRCSTART(abracket);
	    PUTS("</");
	    PSRCSTOP(abracket);
	    PSRCSTART(tag);
	    if (tagname_transform != 0)
		PUTS(tag->name);
	    else {
		LYStrNCpy(buf, tag->name, sizeof(buf) - 1);
		LYLowerCase(buf);
		PUTS(buf);
	    }
	    PSRCSTOP(tag);
	    PSRCSTART(abracket);
	    PUTC('>');
	    PSRCSTOP(abracket);
	    psrc_nested_call = FALSE;
	    return HT_OK;
	}
	/*fall through */
    }
#endif

    if ((me->sp >= (me->stack + MAX_NESTING - 1) ||
	 element_number != me->sp[0].tag_number) &&
	HTML_dtd.tags[element_number].contents != SGML_EMPTY) {
	CTRACE((tfp,
		"HTML: end of element %s when expecting end of %s\n",
		HTML_dtd.tags[element_number].name,
		(me->sp == me->stack + MAX_NESTING - 1) ? "none" :
		(me->sp->tag_number < 0) ? "*invalid tag*" :
		(me->sp->tag_number >= HTML_ELEMENTS) ? "special tag" :
		HTML_dtd.tags[me->sp->tag_number].name));
#ifdef CAREFUL			/* parser assumed to produce good nesting */
	/* panic */
#endif /* CAREFUL */
    }

    /*
     * If we're seeking MAPs, skip everything that's not a MAP or AREA tag.  -
     * FM
     */
    if (LYMapsOnly) {
	if (!(element_number == HTML_MAP || element_number == HTML_AREA ||
	      element_number == HTML_OBJECT)) {
	    return HT_OK;
	}
    }

    /*
     * Pop state off stack if we didn't declare the element SGML_EMPTY in
     * HTMLDTD.c.  - FM & KW
     */
    if (HTML_dtd.tags[element_number].contents != SGML_EMPTY) {
#ifdef USE_COLOR_STYLE
	skip_stack_requested = (BOOL) (me->skip_stack > 0);
#endif
	if ((element_number != me->sp[0].tag_number) &&
	    me->skip_stack <= 0 &&
	    HTML_dtd.tags[HTML_LH].contents != SGML_EMPTY &&
	    (me->sp[0].tag_number == HTML_UL ||
	     me->sp[0].tag_number == HTML_OL ||
	     me->sp[0].tag_number == HTML_MENU ||
	     me->sp[0].tag_number == HTML_DIR ||
	     me->sp[0].tag_number == HTML_LI) &&
	    (element_number == HTML_H1 ||
	     element_number == HTML_H2 ||
	     element_number == HTML_H3 ||
	     element_number == HTML_H4 ||
	     element_number == HTML_H5 ||
	     element_number == HTML_H6)) {
	    /*
	     * Set the break flag if we're popping a dummy HTML_LH substituted
	     * for an HTML_H# encountered in a list.
	     */
	    BreakFlag = TRUE;
	}
	if (me->skip_stack == 0 && element_number == HTML_OBJECT &&
	    me->sp[0].tag_number == HTML_OBJECT_M &&
	    (me->sp < (me->stack + MAX_NESTING - 1)))
	    me->sp[0].tag_number = HTML_OBJECT;
	if (me->skip_stack > 0) {
	    CTRACE2(TRACE_STYLE,
		    (tfp,
		     "HTML:end_element: Internal call (level %d), leaving on stack - %s\n",
		     me->skip_stack, NONNULL(GetHTStyleName(me->sp->style))));
	    me->skip_stack--;
	} else if (element_number == HTML_OBJECT &&
		   me->sp[0].tag_number != HTML_OBJECT &&
		   me->sp[0].tag_number != HTML_OBJECT_M &&
		   me->objects_mixed_open > 0 &&
		   !(me->objects_figged_open > 0 &&
		     me->sp[0].tag_number == HTML_FIG)) {
	    /*
	     * Ignore non-corresponding OBJECT tags that we didn't push because
	     * the SGML parser was supposed to go on parsing the contents
	     * non-literally.  - kw
	     */
	    CTRACE2(TRACE_STYLE,
		    (tfp, "HTML:end_element[%d]: %s (level %d), %s - %s\n",
		     (int) STACKLEVEL(me),
		     "Special OBJECT handling", me->objects_mixed_open,
		     "leaving on stack",
		     NONNULL(GetHTStyleName(me->sp->style))));
	    me->objects_mixed_open--;
	} else if (me->stack_overrun == TRUE &&
		   element_number != me->sp[0].tag_number) {
	    /*
	     * Ignore non-corresponding tags if we had a stack overrun.  This
	     * is not a completely fail-safe strategy for protection against
	     * any seriously adverse consequences of a stack overrun, and the
	     * rendering of the document will not be as intended, but we expect
	     * overruns to be rare, and this should offer reasonable protection
	     * against crashes if an overrun does occur.  - FM
	     */
	    return HT_OK;	/* let's pretend... */
	} else if (element_number == HTML_SELECT &&
		   me->sp[0].tag_number != HTML_SELECT) {
	    /*
	     * Ignore non-corresponding SELECT tags, since we probably popped
	     * it and closed the SELECT block to deal with markup which amounts
	     * to a nested SELECT, or an out of order FORM end tag.  - FM
	     */
	    return HT_OK;
	} else if ((element_number != me->sp[0].tag_number) &&
		   HTML_dtd.tags[HTML_LH].contents == SGML_EMPTY &&
		   (me->sp[0].tag_number == HTML_UL ||
		    me->sp[0].tag_number == HTML_OL ||
		    me->sp[0].tag_number == HTML_MENU ||
		    me->sp[0].tag_number == HTML_DIR ||
		    me->sp[0].tag_number == HTML_LI) &&
		   (element_number == HTML_H1 ||
		    element_number == HTML_H2 ||
		    element_number == HTML_H3 ||
		    element_number == HTML_H4 ||
		    element_number == HTML_H5 ||
		    element_number == HTML_H6)) {
	    /*
	     * It's an H# for which we substituted an HTML_LH, which we've
	     * declared as SGML_EMPTY, so just return.  - FM
	     */
	    return HT_OK;
	} else if (me->sp < (me->stack + MAX_NESTING - 1)) {
#ifdef USE_JUSTIFY_ELTS
	    if (wait_for_this_stacked_elt == me->stack - me->sp + MAX_NESTING)
		reached_awaited_stacked_elt = TRUE;
#endif
	    if (element_number == HTML_OBJECT) {
		if (me->sp[0].tag_number == HTML_FIG &&
		    me->objects_figged_open > 0) {
		    /*
		     * It's an OBJECT for which we substituted a FIG, so pop
		     * the FIG and pretend that's what we are being called for. 
		     * - kw
		     */
		    CTRACE2(TRACE_STYLE,
			    (tfp,
			     "HTML:end_element[%d]: %s (level %d), %s - %s\n",
			     (int) STACKLEVEL(me),
			     "Special OBJECT->FIG handling",
			     me->objects_figged_open,
			     "treating as end FIG",
			     NONNULL(GetHTStyleName(me->sp->style))));
		    me->objects_figged_open--;
		    element_number = HTML_FIG;
		}
	    }
	    (me->sp)++;
	    CTRACE2(TRACE_STYLE,
		    (tfp,
		     "HTML:end_element[%d]: Popped style off stack - %s\n",
		     (int) STACKLEVEL(me),
		     NONNULL(GetHTStyleName(me->sp->style))));
	} else {
	    CTRACE2(TRACE_STYLE, (tfp,
				  "Stack underflow error!  Tried to pop off more styles than exist in stack\n"));
	}
    }
    if (BreakFlag == TRUE) {
#ifdef USE_JUSTIFY_ELTS
	if (reached_awaited_stacked_elt)
	    wait_for_this_stacked_elt = -1;
#endif
	return HT_OK;		/* let's pretend... */
    }

    /*
     * Check for unclosed TEXTAREA.  - FM
     */
    if (me->inTEXTAREA && element_number != HTML_TEXTAREA) {
	if (LYBadHTML(me)) {
	    LYShowBadHTML("Bad HTML: Missing TEXTAREA end tag\n");
	}
    }

    if (!me->text && !LYMapsOnly) {
	UPDATE_STYLE;
    }

    /*
     * Handle the end tag.  - FM
     */
    switch (element_number) {

    case HTML_HTML:
	if (me->inA || me->inSELECT || me->inTEXTAREA) {
	    if (LYBadHTML(me)) {
		char *msg = NULL;

		HTSprintf0(&msg,
			   "Bad HTML: %s%s%s%s%s not closed before HTML end tag *****\n",
			   me->inSELECT ? "SELECT" : "",
			   (me->inSELECT && me->inTEXTAREA) ? ", " : "",
			   me->inTEXTAREA ? "TEXTAREA" : "",
			   (((me->inSELECT || me->inTEXTAREA) && me->inA)
			    ? ", "
			    : ""),
			   me->inA ? "A" : "");
		LYShowBadHTML(msg);
		FREE(msg);
	    }
	}
	break;

    case HTML_HEAD:
	if (me->inBASE &&
	    (LYIsUIPage3(me->node_anchor->address, UIP_LIST_PAGE, 0) ||
	     LYIsUIPage3(me->node_anchor->address, UIP_ADDRLIST_PAGE, 0))) {
	    /* If we are parsing the List Page, and have a BASE after we are
	     * done with the HEAD element, propagate it back to the node_anchor
	     * object.  The base should have been inserted by showlist() to
	     * record what document the List Page is about, and other functions
	     * may later look for it in the anchor.  - kw
	     */
	    StrAllocCopy(me->node_anchor->content_base, me->base_href);
	}
	if (HText_hasToolbar(me->text))
	    HText_appendParagraph(me->text);
	break;

    case HTML_TITLE:
	HTChunkTerminate(&me->title);
	HTAnchor_setTitle(me->node_anchor, me->title.data);
	HTChunkClear(&me->title);
	/*
	 * Check if it's a bookmark file, and if so, and multiple bookmark
	 * support is on, or it's off but this isn't the default bookmark file
	 * (e.g., because it was on before, and this is another bookmark file
	 * that has been retrieved as a previous document), insert the current
	 * description string and filepath for it.  We pass the strings back to
	 * the SGML parser so that any 8 bit or multibyte/CJK characters will
	 * be handled by the parser's state and charset routines.  - FM
	 */
	if (non_empty(me->node_anchor->bookmark)) {
	    if ((LYMultiBookmarks != MBM_OFF) ||
		(non_empty(bookmark_page) &&
		 strcmp(me->node_anchor->bookmark, bookmark_page))) {
		if (!include)
		    include = &me->xinclude;
		for (i = 0; i <= MBM_V_MAXFILES; i++) {
		    if (MBM_A_subbookmark[i] &&
			!strcmp(MBM_A_subbookmark[i],
				me->node_anchor->bookmark)) {
			StrAllocCat(*include, "<H2><EM>");
			StrAllocCat(*include, gettext("Description:"));
			StrAllocCat(*include, "</EM> ");
			StrAllocCopy(temp,
				     ((MBM_A_subdescript[i] &&
				       *MBM_A_subdescript[i]) ?
				      MBM_A_subdescript[i] : gettext("(none)")));
			LYEntify(&temp, TRUE);
			StrAllocCat(*include, temp);
			StrAllocCat(*include, "<BR><EM>&nbsp;&nbsp;&nbsp;");
			StrAllocCat(*include, gettext("Filepath:"));
			StrAllocCat(*include, "</EM> ");
			StrAllocCopy(temp,
				     ((MBM_A_subbookmark[i] &&
				       *MBM_A_subbookmark[i])
				      ? MBM_A_subbookmark[i]
				      : gettext("(unknown)")));
			LYEntify(&temp, TRUE);
			StrAllocCat(*include, temp);
			FREE(temp);
			StrAllocCat(*include, "</H2>");
			break;
		    }
		}
	    }
	}
	break;

    case HTML_STYLE:
	/*
	 * We're getting it as Literal text, which, for now, we'll just ignore. 
	 * - FM
	 */
	HTChunkTerminate(&me->style_block);
	CTRACE2(TRACE_STYLE,
		(tfp, "HTML: STYLE content =\n%s\n",
		 me->style_block.data));
	HTChunkClear(&me->style_block);
	break;

    case HTML_SCRIPT:
	/*
	 * We're getting it as Literal text, which, for now, we'll just ignore. 
	 * - FM
	 */
	HTChunkTerminate(&me->script);
	CTRACE((tfp, "HTML: SCRIPT content =\n%s\n",
		me->script.data));
	HTChunkClear(&me->script);
	break;

    case HTML_BODY:
	if (me->inA || me->inSELECT || me->inTEXTAREA) {
	    if (LYBadHTML(me)) {
		char *msg = NULL;

		HTSprintf0(&msg,
			   "Bad HTML: %s%s%s%s%s not closed before BODY end tag *****\n",
			   me->inSELECT ? "SELECT" : "",
			   (me->inSELECT && me->inTEXTAREA) ? ", " : "",
			   me->inTEXTAREA ? "TEXTAREA" : "",
			   (((me->inSELECT || me->inTEXTAREA) && me->inA)
			    ? ", "
			    : ""),
			   me->inA ? "A" : "");
		LYShowBadHTML(msg);
		FREE(msg);
	    }
	}
	break;

    case HTML_FRAMESET:
	change_paragraph_style(me, me->sp->style);	/* Often won't really change */
	break;

    case HTML_NOFRAMES:
    case HTML_IFRAME:
	LYEnsureDoubleSpace(me);
	LYResetParagraphAlignment(me);
	change_paragraph_style(me, me->sp->style);	/* Often won't really change */
	break;

    case HTML_BANNER:
    case HTML_MARQUEE:
    case HTML_BLOCKQUOTE:
    case HTML_BQ:
    case HTML_ADDRESS:
	/*
	 * Set flag to know that style has ended.  Fall through.
	 i_prior_style = -1;
	 */
	change_paragraph_style(me, me->sp->style);
	UPDATE_STYLE;
	if (me->sp->tag_number == element_number)
	    LYEnsureDoubleSpace(me);
	if (me->List_Nesting_Level >= 0)
	    HText_NegateLineOne(me->text);
	break;

    case HTML_CENTER:
    case HTML_DIV:
	if (me->Division_Level >= 0)
	    me->Division_Level--;
	if (me->Division_Level >= 0) {
	    if (me->sp->style->alignment !=
		me->DivisionAlignments[me->Division_Level]) {
		if (me->inP)
		    LYEnsureSingleSpace(me);
		me->sp->style->alignment =
		    me->DivisionAlignments[me->Division_Level];
	    }
	}
	change_paragraph_style(me, me->sp->style);
	if (me->style_change) {
	    actually_set_style(me);
	    if (me->List_Nesting_Level >= 0)
		HText_NegateLineOne(me->text);
	} else if (me->inP)
	    LYEnsureSingleSpace(me);
	me->current_default_alignment = me->sp->style->alignment;
	break;

    case HTML_H1:		/* header styles */
    case HTML_H2:
    case HTML_H3:
    case HTML_H4:
    case HTML_H5:
    case HTML_H6:
	if (me->Division_Level >= 0) {
	    me->sp->style->alignment =
		me->DivisionAlignments[me->Division_Level];
	} else if (me->sp->style->id == ST_HeadingCenter ||
		   me->sp->style->id == ST_Heading1) {
	    me->sp->style->alignment = HT_CENTER;
	} else if (me->sp->style->id == ST_HeadingRight) {
	    me->sp->style->alignment = HT_RIGHT;
	} else {
	    me->sp->style->alignment = HT_LEFT;
	}
	change_paragraph_style(me, me->sp->style);
	UPDATE_STYLE;
	if (styles[element_number]->font & HT_BOLD) {
	    if (me->inBoldA == FALSE && me->inBoldH == TRUE) {
		HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
	    }
	    me->inBoldH = FALSE;
	}
	if (me->List_Nesting_Level >= 0)
	    HText_NegateLineOne(me->text);
	if (me->Underline_Level > 0 && me->inUnderline == FALSE) {
	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
	    me->inUnderline = TRUE;
	}
	break;

    case HTML_P:
	LYHandlePlike(me,
		      (const BOOL *) 0, (STRING2PTR) 0,
		      include, 0,
		      FALSE);
	break;

    case HTML_FONT:
	me->inFONT = FALSE;
	break;

    case HTML_B:		/* Physical character highlighting */
    case HTML_BLINK:
    case HTML_I:
    case HTML_U:

    case HTML_CITE:		/* Logical character highlighting */
    case HTML_EM:
    case HTML_STRONG:
	/*
	 * Ignore any emphasis end tags if the Underline_Level is not set.  -
	 * FM
	 */
	if (me->Underline_Level <= 0)
	    break;

	/*
	 * Adjust the Underline level counter, and turn off underlining if
	 * appropriate.  - FM
	 */
	me->Underline_Level--;
	if (me->inUnderline && me->Underline_Level < 1) {
	    HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
	    me->inUnderline = FALSE;
	    CTRACE((tfp, "Ending underline\n"));
	} else {
	    CTRACE((tfp, "Underline Level is %d\n", me->Underline_Level));
	}
	break;

    case HTML_ABBR:		/* Miscellaneous character containers */
    case HTML_ACRONYM:
    case HTML_AU:
    case HTML_AUTHOR:
    case HTML_BIG:
    case HTML_CODE:
    case HTML_DFN:
    case HTML_KBD:
    case HTML_SAMP:
    case HTML_SMALL:
    case HTML_SUP:
    case HTML_TT:
    case HTML_VAR:
	break;

    case HTML_SUB:
	HText_appendCharacter(me->text, ']');
	break;

    case HTML_DEL:
    case HTML_S:
    case HTML_STRIKE:
	HTML_put_character(me, ' ');
	if (me->inUnderline == FALSE)
	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
	HTML_put_string(me, ":DEL]");
	if (me->inUnderline == FALSE)
	    HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
	HTML_put_character(me, ' ');
	me->in_word = NO;
	break;

    case HTML_INS:
	HTML_put_character(me, ' ');
	if (me->inUnderline == FALSE)
	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
	HTML_put_string(me, ":INS]");
	if (me->inUnderline == FALSE)
	    HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
	HTML_put_character(me, ' ');
	me->in_word = NO;
	break;

    case HTML_Q:
	if (me->Quote_Level > 0)
	    me->Quote_Level--;
	/*
	 * Should check LANG and/or DIR attributes, and the
	 * me->node_anchor->charset and/or yet to be added structure elements,
	 * to determine whether we should use chevrons, but for now we'll
	 * always use double- or single-quotes.  - FM
	 */
	if (!(me->Quote_Level & 1))
	    HTML_put_character(me, '"');
	else
	    HTML_put_character(me, '\'');
	break;

    case HTML_PRE:		/* Formatted text */
	/*
	 * Set to know that we are no longer in a PRE block.
	 */
	HText_appendCharacter(me->text, '\n');
	me->inPRE = FALSE;
	/* FALLTHRU */
    case HTML_LISTING:		/* Literal text */
	/* FALLTHRU */
    case HTML_XMP:
	/* FALLTHRU */
    case HTML_PLAINTEXT:
	if (me->comment_start)
	    HText_appendText(me->text, me->comment_start);
	change_paragraph_style(me, me->sp->style);	/* Often won't really change */
	if (me->List_Nesting_Level >= 0) {
	    UPDATE_STYLE;
	    HText_NegateLineOne(me->text);
	}
	break;

    case HTML_NOTE:
    case HTML_FN:
	change_paragraph_style(me, me->sp->style);	/* Often won't really change */
	UPDATE_STYLE;
	if (me->sp->tag_number == element_number)
	    LYEnsureDoubleSpace(me);
	if (me->List_Nesting_Level >= 0)
	    HText_NegateLineOne(me->text);
	me->inLABEL = FALSE;
	break;

    case HTML_OL:
	me->OL_Counter[me->List_Nesting_Level < 11 ?
		       me->List_Nesting_Level : 11] = OL_VOID;
	/* FALLTHRU */
    case HTML_DL:
	/* FALLTHRU */
    case HTML_UL:
	/* FALLTHRU */
    case HTML_MENU:
	/* FALLTHRU */
    case HTML_DIR:
	me->List_Nesting_Level--;
	CTRACE((tfp, "HTML_end_element: Reducing List Nesting Level to %d\n",
		me->List_Nesting_Level));
#ifdef USE_JUSTIFY_ELTS
	if (element_number == HTML_DL)
	    in_DT = FALSE;	/*close the term that was without definition. */
#endif
	change_paragraph_style(me, me->sp->style);	/* Often won't really change */
	UPDATE_STYLE;
	if (me->List_Nesting_Level >= 0)
	    LYEnsureSingleSpace(me);
	break;

    case HTML_SPAN:
	/*
	 * Should undo anything we did based on LANG and/or DIR attributes, and
	 * the me->node_anchor->charset and/or yet to be added structure
	 * elements.  - FM
	 */
	break;

    case HTML_BDO:
	/*
	 * Should undo anything we did based on DIR (and/or LANG) attributes,
	 * and the me->node_anchor->charset and/or yet to be added structure
	 * elements.  - FM
	 */
	break;

    case HTML_A:
	/*
	 * Ignore any spurious A end tags.  - FM
	 */
	if (me->inA == FALSE)
	    break;
	/*
	 * Set to know that we are no longer in an anchor.
	 */
	me->inA = FALSE;
#ifdef MARK_HIDDEN_LINKS
	if (non_empty(hidden_link_marker) &&
	    HText_isAnchorBlank(me->text, me->CurrentANum)) {
	    HText_appendText(me->text, hidden_link_marker);
	}
#endif
	UPDATE_STYLE;
	if (me->inBoldA == TRUE && me->inBoldH == FALSE)
	    HText_appendCharacter(me->text, LY_BOLD_END_CHAR);
	HText_endAnchor(me->text, me->CurrentANum);
	me->CurrentANum = 0;
	me->inBoldA = FALSE;
	if (me->Underline_Level > 0 && me->inUnderline == FALSE) {
	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
	    me->inUnderline = TRUE;
	}
	break;

    case HTML_MAP:
	FREE(me->map_address);
	break;

    case HTML_BODYTEXT:
	/*
	 * We may need to look at this someday to deal with OBJECTs optimally,
	 * but just ignore it for now.  - FM
	 */
	change_paragraph_style(me, me->sp->style);	/* Often won't really change */
	break;

    case HTML_TEXTFLOW:
	/*
	 * We may need to look at this someday to deal with APPLETs optimally,
	 * but just ignore it for now.  - FM
	 */
	change_paragraph_style(me, me->sp->style);	/* Often won't really change */
	break;

    case HTML_FIG:
	LYHandleFIG(me, NULL, NULL,
		    0,
		    0,
		    NULL,
		    NULL, NO, FALSE, &intern_flag);
	break;

    case HTML_OBJECT:
	/*
	 * Finish the data off.
	 */
	{
	    int s = 0, e = 0;
	    char *start = NULL, *first_end = NULL, *last_end = NULL;
	    char *first_map = NULL, *last_map = NULL;
	    BOOL have_param = FALSE;
	    char *data = NULL;

	    HTChunkTerminate(&me->object);
	    data = me->object.data;
	    while ((cp = strchr(data, '<')) != NULL) {
		/*
		 * Look for nested OBJECTs.  This procedure could get tripped
		 * up if invalid comments are present in the content, or if an
		 * OBJECT end tag is present in a quoted attribute.  - FM
		 */
		if (!StrNCmp(cp, "<!--", 4)) {
		    data = LYFindEndOfComment(cp);
		    cp = data;
		} else if (s == 0 && !strncasecomp(cp, "<PARAM", 6) &&
			   !IsNmChar(cp[6])) {
		    have_param = TRUE;
		} else if (!strncasecomp(cp, "<OBJECT", 7) &&
			   !IsNmChar(cp[7])) {
		    if (s == 0)
			start = cp;
		    s++;
		} else if (!strncasecomp(cp, "</OBJECT", 8) &&
			   !IsNmChar(cp[8])) {
		    if (e == 0)
			first_end = cp;
		    last_end = cp;
		    e++;
		} else if (!strncasecomp(cp, "<MAP", 4) &&
			   !IsNmChar(cp[4])) {
		    if (!first_map)
			first_map = cp;
		    last_map = cp;
		} else if (!strncasecomp(cp, "</MAP", 5) &&
			   !IsNmChar(cp[5])) {
		    last_map = cp;
		}
		data = ++cp;
	    }
	    if (s < e) {
		/*
		 * We had more end tags than start tags, so we have bad HTML or
		 * otherwise misparsed.  - FM
		 */
		if (LYBadHTML(me)) {
		    char *msg = NULL;

		    HTSprintf0(&msg,
			       "Bad HTML: Unmatched OBJECT start and end tags.  Discarding content:\n%s\n",
			       me->object.data);
		    LYShowBadHTML(msg);
		    FREE(msg);
		}
		goto End_Object;
	    }
	    if (s > e) {
		if (!me->object_declare && !me->object_name &&
		    !(me->object_shapes && !LYMapsOnly) &&
		    !(me->object_usemap != NULL && !LYMapsOnly) &&
		    !(clickable_images && !LYMapsOnly &&
		      me->object_data != NULL &&
		      !have_param &&
		      me->object_classid == NULL &&
		      me->object_codebase == NULL &&
		      me->object_codetype == NULL)) {
		    /*
		     * We have nested OBJECT tags, and not yet all of the end
		     * tags, but have a case where the content needs to be
		     * parsed again (not dropped) and where we don't want to
		     * output anything special at the point when we
		     * *do* have accumulated all the end tags.  So recycle
		     * the incomplete contents now, and signal the SGML parser
		     * that it should not regard the current OBJECT ended but
		     * should treat its contents as mixed.  Normally these
		     * cases would have already handled in the real
		     * start_element call, so this block may not be necessary. 
		     * - kw
		     */
		    CTRACE((tfp, "%s:\n%s\n",
			    "HTML: Nested OBJECT tags.  Recycling incomplete contents",
			    me->object.data));
		    status = HT_PARSER_OTHER_CONTENT;
		    me->object.size--;
		    HTChunkPuts(&me->object, "</OBJECT>");
		    if (!include)	/* error, should not happen */
			include = &me->xinclude;
		    StrnAllocCat(*include, me->object.data, me->object.size);
		    clear_objectdata(me);
		    /* an internal fake call to keep our stack happy: */
		    HTML_start_element(me, HTML_OBJECT, NULL, NULL,
				       me->tag_charset, include);
		    break;
		}
		/*
		 * We have nested OBJECT tags, and not yet all of the end tags,
		 * and we want the end tags.  So restore an end tag to the
		 * content, and signal to the SGML parser that it should resume
		 * the accumulation of OBJECT content (after calling back to
		 * start_element) in a way that is equivalent to passing it a
		 * dummy start tag.  - FM, kw
		 */
		CTRACE((tfp, "HTML: Nested OBJECT tags.  Recycling.\n"));
		status = HT_PARSER_REOPEN_ELT;
		me->object.size--;
		HTChunkPuts(&me->object, "</OBJECT>");
		if (!LYMapsOnly)
		    change_paragraph_style(me, me->sp->style);
		break;
	    }

	    /*
	     * OBJECT start and end tags are fully matched, assuming we weren't
	     * tripped up by comments or quoted attributes.  - FM
	     */
	    CTRACE((tfp, "HTML:OBJECT content:\n%s\n", me->object.data));

	    /*
	     * OBJECTs with DECLARE should be saved but not instantiated, and
	     * if nested, can have only other DECLAREd OBJECTs.  Until we have
	     * code to handle these, we'll just create an anchor for the ID, if
	     * present, and discard the content (sigh 8-).  - FM
	     */
	    if (me->object_declare == TRUE) {
		if (non_empty(me->object_id) && !LYMapsOnly)
		    LYHandleID(me, me->object_id);
		CTRACE((tfp, "HTML: DECLAREd OBJECT.  Ignoring!\n"));
		goto End_Object;
	    }

	    /*
	     * OBJECTs with NAME are for FORM submissions.  We'll just create
	     * an anchor for the ID, if present, and discard the content until
	     * we have code to handle these.  (sigh 8-).  - FM
	     */
	    if (me->object_name != NULL && !LYMapsOnly) {
		if (non_empty(me->object_id))
		    LYHandleID(me, me->object_id);
		CTRACE((tfp, "HTML: NAMEd OBJECT.  Ignoring!\n"));
		goto End_Object;
	    }

	    /*
	     * Deal with any nested OBJECTs by descending to the inner-most
	     * OBJECT.  - FM
	     */
	    if (s > 0) {
		if (start != NULL &&
		    first_end != NULL && first_end > start) {
		    /*
		     * Minumum requirements for the ad hoc parsing to have
		     * succeeded are met.  We'll hope that it did succeed.  -
		     * FM
		     */
		    if (LYMapsOnly) {
			/*
			 * Well we don't need to do this any more, nested
			 * objects should either not get here any more at all
			 * or can be handled fine by other code below.  Leave
			 * in place for now as a special case for LYMapsOnly. 
			 * - kw
			 */
			if (LYMapsOnly && (!last_map || last_map < first_end))
			    *first_end = '\0';
			else
			    e = 0;
			data = NULL;
			if (LYMapsOnly && (!first_map || first_map > start))
			    StrAllocCopy(data, start);
			else
			    StrAllocCopy(data, me->object.data);
			if (e > 0) {
			    for (i = e; i > 0; i--) {
				StrAllocCat(data, "</OBJECT>");
			    }
			}
			if (!include)	/* error, should not happen */
			    include = &me->xinclude;
			StrAllocCat(*include, data);
			CTRACE((tfp, "HTML: Recycling nested OBJECT%s.\n",
				(s > 1) ? "s" : ""));
			FREE(data);
			goto End_Object;
		    }
		} else {
		    if (LYBadHTML(me)) {
			LYShowBadHTML("Bad HTML: Unmatched OBJECT start and end tags.  Discarding content.\n");
		    }
		    goto End_Object;
		}
	    }

	    /*
	     * If its content has SHAPES, convert it to FIG.  - FM
	     *
	     * This is now handled in our start_element without using include
	     * if the SGML parser cooperates, so this block may be unnecessary. 
	     * - kw
	     */
	    if (me->object_shapes == TRUE && !LYMapsOnly) {
		CTRACE((tfp, "HTML: OBJECT has SHAPES.  Converting to FIG.\n"));
		if (!include)	/* error, should not happen */
		    include = &me->xinclude;
		StrAllocCat(*include, "<FIG ISOBJECT IMAGEMAP");
		if (me->object_ismap == TRUE)
		    StrAllocCat(*include, " IMAGEMAP");
		if (me->object_id != NULL) {
		    StrAllocCat(*include, " ID=\"");
		    StrAllocCat(*include, me->object_id);
		    StrAllocCat(*include, "\"");
		}
		if (me->object_data != NULL &&
		    me->object_classid == NULL) {
		    StrAllocCat(*include, " SRC=\"");
		    StrAllocCat(*include, me->object_data);
		    StrAllocCat(*include, "\"");
		}
		StrAllocCat(*include, ">");
		me->object.size--;
		HTChunkPuts(&me->object, "</FIG>");
		HTChunkTerminate(&me->object);
		StrAllocCat(*include, me->object.data);
		goto End_Object;
	    }

	    /*
	     * If it has a USEMAP attribute and didn't have SHAPES, convert it
	     * to IMG.  - FM
	     */
	    if (me->object_usemap != NULL && !LYMapsOnly) {
		CTRACE((tfp, "HTML: OBJECT has USEMAP.  Converting to IMG.\n"));

		if (!include)	/* error, should not happen */
		    include = &me->xinclude;
		StrAllocCat(*include, "<IMG ISOBJECT");
		if (me->object_id != NULL) {
		    /*
		     * Pass the ID.  - FM
		     */
		    StrAllocCat(*include, " ID=\"");
		    StrAllocCat(*include, me->object_id);
		    StrAllocCat(*include, "\"");
		}
		if (me->object_data != NULL &&
		    me->object_classid == NULL) {
		    /*
		     * We have DATA with no CLASSID, so let's hope it'
		     * equivalent to an SRC.  - FM
		     */
		    StrAllocCat(*include, " SRC=\"");
		    StrAllocCat(*include, me->object_data);
		    StrAllocCat(*include, "\"");
		}
		if (me->object_title != NULL) {
		    /*
		     * Use the TITLE for both the MAP and the IMGs ALT.  - FM
		     */
		    StrAllocCat(*include, " TITLE=\"");
		    StrAllocCat(*include, me->object_title);
		    StrAllocCat(*include, "\" ALT=\"");
		    StrAllocCat(*include, me->object_title);
		    StrAllocCat(*include, "\"");
		}
		/*
		 * Add the USEMAP, and an ISMAP if present.  - FM
		 */
		if (me->object_usemap != NULL) {
		    StrAllocCat(*include, " USEMAP=\"");
		    StrAllocCat(*include, me->object_usemap);
		    if (me->object_ismap == TRUE)
			StrAllocCat(*include, "\" ISMAP>");
		    else
			StrAllocCat(*include, "\">");
		} else {
		    StrAllocCat(*include, ">");
		}
		/*
		 * Add the content if it has <MAP, since that may be the MAP
		 * this usemap points to.  But if we have nested objects, try
		 * to eliminate portions that cannot contribute to the quest
		 * for MAP.  This is not perfect, we may get too much content;
		 * this seems preferable over losing too much.  - kw
		 */
		if (first_map) {
		    if (s == 0) {
			StrAllocCat(*include, me->object.data);
			CTRACE((tfp,
				"HTML: MAP found, recycling object contents.\n"));
			goto End_Object;
		    }
		    /* s > 0 and s == e */
		    data = NULL;
		    if (last_map < start) {
			*start = '\0';
			i = 0;
		    } else if (last_map < first_end) {
			*first_end = '\0';
			i = e;
		    } else if (last_map < last_end) {
			*last_end = '\0';
			i = 1;
		    } else {
			i = 0;
		    }
		    if (first_map > last_end) {
			/* fake empty object to keep stacks stack happy */
			StrAllocCopy(data, "<OBJECT><");
			StrAllocCat(data, last_end + 1);
			i = 0;
		    } else if (first_map > start) {
			StrAllocCopy(data, start);
		    } else {
			StrAllocCopy(data, me->object.data);
		    }
		    for (; i > 0; i--) {
			StrAllocCat(data, "</OBJECT>");
		    }
		    CTRACE((tfp, "%s:\n%s\n",
			    "HTML: MAP and nested OBJECT tags.  Recycling parts",
			    data));
		    StrAllocCat(*include, data);
		    FREE(data);
		}
		goto End_Object;
	    }

	    /*
	     * Add an ID link if needed.  - FM
	     */
	    if (non_empty(me->object_id) && !LYMapsOnly)
		LYHandleID(me, me->object_id);

	    /*
	     * Add the OBJECTs content if not empty.  - FM
	     */
	    if (me->object.size > 1) {
		if (!include)	/* error, should not happen */
		    include = &me->xinclude;
		StrAllocCat(*include, me->object.data);
	    }

	    /*
	     * Create a link to the DATA, if desired, and we can rule out that
	     * it involves scripting code.  This a risky thing to do, but we
	     * can toggle clickable_images mode off if it really screws things
	     * up, and so we may as well give it a try.  - FM
	     */
	    if (clickable_images) {
		if (!LYMapsOnly &&
		    me->object_data != NULL &&
		    !have_param &&
		    me->object_classid == NULL &&
		    me->object_codebase == NULL &&
		    me->object_codetype == NULL) {
		    /*
		     * We have a DATA value and no need for scripting code, so
		     * close the current Anchor, if one is open, and add an
		     * Anchor for this source.  If we also have a TYPE value,
		     * check whether it's an image or not, and set the link
		     * name accordingly.  - FM
		     */
		    if (!include)	/* error, should not happen */
			include = &me->xinclude;
		    if (me->inA)
			StrAllocCat(*include, "</A>");
		    StrAllocCat(*include, " -<A HREF=\"");
		    StrAllocCat(*include, me->object_data);
		    StrAllocCat(*include, "\">");
		    if ((me->object_type != NULL) &&
			!strncasecomp(me->object_type, "image/", 6)) {
			StrAllocCat(*include, "(IMAGE)");
		    } else {
			StrAllocCat(*include, "(OBJECT)");
		    }
		    StrAllocCat(*include, "</A> ");
		}
	    }
	}

	/*
	 * Re-intialize all of the OBJECT elements.  - FM
	 */
      End_Object:
	clear_objectdata(me);

	if (!LYMapsOnly)
	    change_paragraph_style(me, me->sp->style);	/* Often won't really change */
	break;

    case HTML_APPLET:
	if (me->inAPPLETwithP) {
	    LYEnsureDoubleSpace(me);
	} else {
	    HTML_put_character(me, ' ');	/* space char may be ignored */
	}
	LYResetParagraphAlignment(me);
	me->inAPPLETwithP = FALSE;
	me->inAPPLET = FALSE;
	change_paragraph_style(me, me->sp->style);	/* Often won't really change */
	break;

    case HTML_CAPTION:
	LYEnsureDoubleSpace(me);
	LYResetParagraphAlignment(me);
	me->inCAPTION = FALSE;
	change_paragraph_style(me, me->sp->style);	/* Often won't really change */
	me->inLABEL = FALSE;
	break;

    case HTML_CREDIT:
	LYEnsureDoubleSpace(me);
	LYResetParagraphAlignment(me);
	me->inCREDIT = FALSE;
	change_paragraph_style(me, me->sp->style);	/* Often won't really change */
	me->inLABEL = FALSE;
	break;

    case HTML_FORM:
	/*
	 * Check if we had a FORM start tag, and issue a message if not, but
	 * fall through to check for an open SELECT and ensure that the
	 * FORM-related globals in GridText.c are initialized.  - FM
	 */
	if (!me->inFORM) {
	    if (LYBadHTML(me)) {
		LYShowBadHTML("Bad HTML: Unmatched FORM end tag\n");
	    }
	}
	EMIT_IFDEF_USE_JUSTIFY_ELTS(form_in_htext = FALSE);

	/*
	 * Check if we still have a SELECT element open.  FORM may have been
	 * declared SGML_EMPTY in HTMLDTD.c, and in that case SGML_character()
	 * in SGML.c is not able to ensure correct nesting; or it may have
	 * failed to enforce valid nesting.  If a SELECT is open, issue a
	 * message, then call HTML_end_element() directly (with a check in that
	 * to bypass decrementing of the HTML parser's stack) to close the
	 * SELECT.  - kw
	 */
	if (me->inSELECT) {
	    if (LYBadHTML(me)) {
		LYShowBadHTML("Bad HTML: Open SELECT at FORM end. Faking SELECT end tag. *****\n");
	    }
	    if (me->sp->tag_number != HTML_SELECT) {
		SET_SKIP_STACK(HTML_SELECT);
	    }
	    HTML_end_element(me, HTML_SELECT, include);
	}

	/*
	 * Set to know that we are no longer in an form.
	 */
	me->inFORM = FALSE;

	HText_endForm(me->text);
	/*
	 * If we are in a list and are on the first line with no text following
	 * a bullet or number, don't force a newline.  This could happen if we
	 * were called from HTML_start_element() due to a missing FORM end tag. 
	 * - FM
	 */
	if (!(me->List_Nesting_Level >= 0 && !me->inP))
	    LYEnsureSingleSpace(me);
	break;

    case HTML_FIELDSET:
	LYEnsureDoubleSpace(me);
	LYResetParagraphAlignment(me);
	change_paragraph_style(me, me->sp->style);	/* Often won't really change */
	break;

    case HTML_LEGEND:
	LYEnsureDoubleSpace(me);
	LYResetParagraphAlignment(me);
	change_paragraph_style(me, me->sp->style);	/* Often won't really change */
	break;

    case HTML_LABEL:
	break;

    case HTML_BUTTON:
	break;

    case HTML_TEXTAREA:
	{
	    InputFieldData I;
	    int chars;
	    char *data;

	    /*
	     * Make sure we had a textarea start tag.
	     */
	    if (!me->inTEXTAREA) {
		if (LYBadHTML(me)) {
		    LYShowBadHTML("Bad HTML: Unmatched TEXTAREA end tag\n");
		}
		break;
	    }

	    /*
	     * Set to know that we are no longer in a textarea tag.
	     */
	    me->inTEXTAREA = FALSE;

	    /*
	     * Initialize.
	     */
	    memset(&I, 0, sizeof(I));
	    I.value_cs = current_char_set;

	    UPDATE_STYLE;
	    /*
	     * Before any input field add a space if necessary.
	     */
	    HTML_put_character(me, ' ');
	    me->in_word = NO;
	    /*
	     * Add a return.
	     */
	    HText_appendCharacter(me->text, '\r');

	    /*
	     * Finish the data off.
	     */
	    HTChunkTerminate(&me->textarea);
	    FREE(temp);

	    I.type = "textarea";
	    I.size = me->textarea_cols;
	    I.name = me->textarea_name;
	    I.name_cs = me->textarea_name_cs;
	    I.accept_cs = me->textarea_accept_cs;
	    me->textarea_accept_cs = NULL;
	    I.disabled = me->textarea_disabled;
	    I.readonly = me->textarea_readonly;
	    I.id = me->textarea_id;

	    /*
	     * Transform the TEXTAREA content as needed, then parse it into
	     * individual lines to be handled as a series series of INPUT
	     * fields (ugh!).  Any raw 8-bit or multibyte characters already
	     * have been handled in relation to the display character set in
	     * SGML_character().
	     *
	     * If TEXTAREA is handled as SGML_LITTERAL (the old way), we need
	     * to SGML-unescape any character references and NCRs here. 
	     * Otherwise this will already have happened in the SGML.c parsing. 
	     * - kw
	     */
	    me->UsePlainSpace = TRUE;

	    if (HTML_dtd.tags[element_number].contents == SGML_LITTERAL) {
		TRANSLATE_AND_UNESCAPE_ENTITIES6(&me->textarea.data,
						 me->UCLYhndl,
						 current_char_set,
						 NO,
						 me->UsePlainSpace, me->HiddenValue);
	    } else {
		/*
		 * This shouldn't have anything to do, normally, but just in
		 * case...  There shouldn't be lynx special character codes in
		 * the chunk ("DTD" flag Tgf_nolyspcl tells SGML.c not to
		 * generate them).  If there were, we could set the last
		 * parameter ('Back') below to YES, which would take them out
		 * of the data.  The data may however contain non break space,
		 * soft hyphen, or en space etc., in the me->UCLYhndl character
		 * encoding.  If that's a problem, perhaps for the (line or
		 * other) editor, setting 'Back' to YES should also help to
		 * always convert them to plain spaces (or drop them).  - kw
		 */
		TRANSLATE_HTML7(&me->textarea.data,
				me->UCLYhndl,
				current_char_set,
				NO,
				me->UsePlainSpace, me->HiddenValue,
				NO);
	    }
	    data = me->textarea.data;

	    /*
	     * Trim any trailing newlines and skip any lead newlines.  - FM
	     */
	    if (*data != '\0') {
		cp = (data + strlen(data)) - 1;
		while (cp >= data && *cp == '\n') {
		    *cp-- = '\0';
		}
		while (*data == '\n') {
		    data++;
		}
	    }
	    /*
	     * Load the first text line, or set up for all blank rows.  - FM
	     */
	    if ((cp = strchr(data, '\n')) != NULL) {
		*cp = '\0';
		StrAllocCopy(temp, data);
		*cp = '\n';
		data = (cp + 1);
	    } else {
		if (*data != '\0') {
		    StrAllocCopy(temp, data);
		} else {
		    FREE(temp);
		}
		data = empty;
	    }
	    /*
	     * Display at least the requested number of text lines and/or blank
	     * rows.  - FM
	     */
	    for (i = 0; i < me->textarea_rows; i++) {
		int j;

		for (j = 0; temp && temp[j]; j++) {
		    if (temp[j] == '\r')
			temp[j] = (char) (temp[j + 1] ? ' ' : '\0');
		}
		I.value = temp;
		chars = HText_beginInput(me->text, me->inUnderline, &I);
		for (; chars > 0; chars--)
		    HTML_put_character(me, '_');
		HText_appendCharacter(me->text, '\r');
		if (*data != '\0') {
		    if (*data == '\n') {
			FREE(temp);
			data++;
		    } else if ((cp = strchr(data, '\n')) != NULL) {
			*cp = '\0';
			StrAllocCopy(temp, data);
			*cp = '\n';
			data = (cp + 1);
		    } else {
			StrAllocCopy(temp, data);
			data = empty;
		    }
		} else {
		    FREE(temp);
		}
	    }
	    /*
	     * Check for more data lines than the rows attribute.  We add them
	     * to the display, because we support only horizontal and not also
	     * vertical scrolling.  - FM
	     */
	    while (*data != '\0' || temp != NULL) {
		int j;

		for (j = 0; temp && temp[j]; j++) {
		    if (temp[j] == '\r')
			temp[j] = (char) (temp[j + 1] ? ' ' : '\0');
		}
		I.value = temp;
		(void) HText_beginInput(me->text, me->inUnderline, &I);
		for (chars = me->textarea_cols; chars > 0; chars--)
		    HTML_put_character(me, '_');
		HText_appendCharacter(me->text, '\r');
		if (*data == '\n') {
		    FREE(temp);
		    data++;
		} else if ((cp = strchr(data, '\n')) != NULL) {
		    *cp = '\0';
		    StrAllocCopy(temp, data);
		    *cp = '\n';
		    data = (cp + 1);
		} else if (*data != '\0') {
		    StrAllocCopy(temp, data);
		    data = empty;
		} else {
		    FREE(temp);
		}
	    }
	    FREE(temp);
	    cp = NULL;
	    me->UsePlainSpace = FALSE;

	    HTChunkClear(&me->textarea);
	    FREE(me->textarea_name);
	    me->textarea_name_cs = -1;
	    FREE(me->textarea_id);
	    break;
	}

    case HTML_SELECT:
	{
	    char *ptr = NULL;

	    /*
	     * Make sure we had a select start tag.
	     */
	    if (!me->inSELECT) {
		if (LYBadHTML(me)) {
		    LYShowBadHTML("Bad HTML: Unmatched SELECT end tag *****\n");
		}
		break;
	    }

	    /*
	     * Set to know that we are no longer in a select tag.
	     */
	    me->inSELECT = FALSE;

	    /*
	     * Clear the disable attribute.
	     */
	    me->select_disabled = FALSE;

	    /*
	     * Make sure we're in a form.
	     */
	    if (!me->inFORM) {
		if (LYBadHTML(me)) {
		    LYShowBadHTML("Bad HTML: SELECT end tag not within FORM element *****\n");
		}
		/*
		 * Hopefully won't crash, so we'll ignore it.  - kw
		 */
	    }

	    /*
	     * Finish the data off.
	     */
	    HTChunkTerminate(&me->option);
	    /*
	     * Finish the previous option.
	     */
	    if (!me->first_option)
		ptr = HText_setLastOptionValue(me->text,
					       me->option.data,
					       me->LastOptionValue,
					       LAST_ORDER,
					       me->LastOptionChecked,
					       me->UCLYhndl,
					       ATTR_CS_IN);
	    FREE(me->LastOptionValue);

	    me->LastOptionChecked = FALSE;

	    if (HTCurSelectGroupType == F_CHECKBOX_TYPE ||
		LYSelectPopups == FALSE) {
		/*
		 * Start a newline after the last checkbox/button option.
		 */
		LYEnsureSingleSpace(me);
	    } else {
		/*
		 * Output popup box with the default option to screen, but use
		 * non-breaking spaces for output.
		 */
		if (ptr &&
		    (me->sp[0].tag_number == HTML_PRE || me->inPRE == TRUE ||
		     !me->sp->style->freeFormat) &&
		    strlen(ptr) > 6) {
		    /*
		     * The code inadequately handles OPTION fields in PRE tags. 
		     * We'll put up a minimum of 6 characters, and if any more
		     * would exceed the wrap column, we'll ignore them.
		     */
		    for (i = 0; i < 6; i++) {
			if (*ptr == ' ')
			    HText_appendCharacter(me->text, HT_NON_BREAK_SPACE);
			else
			    HText_appendCharacter(me->text, *ptr);
			ptr++;
		    }
		}
		for (; non_empty(ptr); ptr++) {
		    if (*ptr == ' ')
			HText_appendCharacter(me->text, HT_NON_BREAK_SPACE);
		    else {
			HTkcode kcode = NOKANJI;
			HTkcode specified_kcode = NOKANJI;

			if (HTCJK == JAPANESE) {
			    kcode = HText_getKcode(me->text);
			    HText_updateKcode(me->text, kanji_code);
			    specified_kcode = HText_getSpecifiedKcode(me->text);
			    HText_updateSpecifiedKcode(me->text, kanji_code);
			}
			HText_appendCharacter(me->text, *ptr);
			if (HTCJK == JAPANESE) {
			    HText_updateKcode(me->text, kcode);
			    HText_updateSpecifiedKcode(me->text, specified_kcode);
			}
		    }
		}
		/*
		 * Add end option character.
		 */
		if (!me->first_option) {
		    HText_appendCharacter(me->text, ']');
		    HText_endInput(me->text);
		    HText_setLastChar(me->text, ']');
		    me->in_word = YES;
		}
	    }
	    HTChunkClear(&me->option);

	    if (me->Underline_Level > 0 && me->inUnderline == FALSE) {
		HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
		me->inUnderline = TRUE;
	    }
	    if (me->needBoldH == TRUE && me->inBoldH == FALSE) {
		HText_appendCharacter(me->text, LY_BOLD_START_CHAR);
		me->inBoldH = TRUE;
		me->needBoldH = FALSE;
	    }
	}
	break;

    case HTML_TABLE:
#ifdef EXP_NESTED_TABLES
	if (!nested_tables)
#endif
	    me->inTABLE = FALSE;

	if (me->sp->style->id == ST_Preformatted) {
	    break;
	}
	if (me->Division_Level >= 0)
	    me->Division_Level--;
	if (me->Division_Level >= 0)
	    me->sp->style->alignment =
		me->DivisionAlignments[me->Division_Level];
	change_paragraph_style(me, me->sp->style);
	UPDATE_STYLE;

#ifdef EXP_NESTED_TABLES
	if (nested_tables) {
	    me->inTABLE = HText_endStblTABLE(me->text);
	} else {
	    HText_endStblTABLE(me->text);
	}
#else
	HText_endStblTABLE(me->text);
#endif

	me->current_default_alignment = me->sp->style->alignment;
	if (me->List_Nesting_Level >= 0)
	    HText_NegateLineOne(me->text);
	break;

/* These TABLE related elements may now not be SGML_EMPTY. - kw */
    case HTML_TR:
	HText_endStblTR(me->text);
	if (!HText_LastLineEmpty(me->text, FALSE)) {
	    HText_setLastChar(me->text, ' ');	/* absorb next white space */
	    HText_appendCharacter(me->text, '\r');
	}
	me->in_word = NO;
	break;

    case HTML_THEAD:
    case HTML_TFOOT:
    case HTML_TBODY:
	break;

    case HTML_COLGROUP:
	if (me->inTABLE)
	    HText_endStblCOLGROUP(me->text);
	break;

    case HTML_TH:
    case HTML_TD:
	HText_endStblTD(me->text);
	break;

/* More stuff that may now not be SGML_EMPTY any more: */
    case HTML_DT:
    case HTML_DD:
    case HTML_LH:
    case HTML_LI:
    case HTML_OVERLAY:
	break;

    case HTML_MATH:
	/*
	 * We're getting it as Literal text, which, until we can process it,
	 * we'll display as is, within brackets to alert the user.  - FM
	 */
	HTChunkPutc(&me->math, ' ');
	HTChunkTerminate(&me->math);
	if (me->math.size > 2) {
	    LYEnsureSingleSpace(me);
	    if (me->inUnderline == FALSE)
		HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
	    HTML_put_string(me, "[MATH:");
	    HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
	    HTML_put_character(me, ' ');
	    HTML_put_string(me, me->math.data);
	    HText_appendCharacter(me->text, LY_UNDERLINE_START_CHAR);
	    HTML_put_string(me, ":MATH]");
	    if (me->inUnderline == FALSE)
		HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
	    LYEnsureSingleSpace(me);
	}
	HTChunkClear(&me->math);
	break;

    default:
	change_paragraph_style(me, me->sp->style);	/* Often won't really change */
	break;

    }				/* switch */

#ifdef USE_JUSTIFY_ELTS
    if (reached_awaited_stacked_elt)
	wait_for_this_stacked_elt = -1;
#endif

    if (me->xinclude) {
	HText_appendText(me->text, " *** LYNX ERROR ***\rUnparsed data:\r");
	HText_appendText(me->text, me->xinclude);
	FREE(me->xinclude);
    }
#ifdef USE_COLOR_STYLE
    if (!skip_stack_requested) {	/*don't emit stylechanges if skipped stack element - VH */
# if !OMIT_SCN_KEEPING
	FastTrimColorClass(HTML_dtd.tags[element_number].name,
			   HTML_dtd.tags[element_number].name_len,
			   Style_className,
			   &Style_className_end, &hcode);
#  endif

	if (!ReallyEmptyTagNum(element_number)) {
	    CTRACE2(TRACE_STYLE,
		    (tfp,
		     "STYLE.end_element: ending non-\"EMPTY\" style <%s...>\n",
		     HTML_dtd.tags[element_number].name));
	    HText_characterStyle(me->text, HCODE_TO_STACK_OFF(hcode), STACK_OFF);
	}
    }
#endif /* USE_COLOR_STYLE */
    return status;
}

/*		Expanding entities
 *		------------------
 */
/*	(In fact, they all shrink!)
*/
int HTML_put_entity(HTStructured * me, int entity_number)
{
    int nent = (int) HTML_dtd.number_of_entities;

    if (entity_number < nent) {
	HTML_put_string(me, p_entity_values[entity_number]);
	return HT_OK;
    }
    return HT_CANNOT_TRANSLATE;
}

/*	Free an HTML object
 *	-------------------
 *
 *	If the document is empty, the text object will not yet exist.
 *	So we could in fact abandon creating the document and return
 *	an error code.	In fact an empty document is an important type
 *	of document, so we don't.
 *
 *	If non-interactive, everything is freed off.   No: crashes -listrefs
 *	Otherwise, the interactive object is left.
 */
static void HTML_free(HTStructured * me)
{
    char *include = NULL;

    if (LYMapsOnly && !me->text) {
	/*
	 * We only handled MAP, AREA and BASE tags, and didn't create an HText
	 * structure for the document nor want one now, so just make sure we
	 * free anything that might have been allocated.  - FM
	 */
	FREE(me->base_href);
	FREE(me->map_address);
	clear_objectdata(me);
	FREE(me->xinclude);
	FREE(me);
	return;
    }

    UPDATE_STYLE;		/* Creates empty document here! */
    if (me->comment_end)
	HTML_put_string(me, me->comment_end);
    if (me->text) {
	/*
	 * Emphasis containers, A, FONT, and FORM may be declared SGML_EMPTY in
	 * HTMLDTD.c, and SGML_character() in SGML.c may check for their end
	 * tags to call HTML_end_element() directly (with a check in that to
	 * bypass decrementing of the HTML parser's stack).  So if we still
	 * have the emphasis (Underline) on, or any open A, FONT, or FORM
	 * containers, turn it off or close them now.  - FM & kw
	 *
	 * IF those tags are not declared SGML_EMPTY, but we let the SGML.c
	 * parser take care of correctly stacked ordering, and of correct
	 * wind-down on end-of-stream (in SGML_free SGML_abort), THEN these and
	 * other checks here in HTML.c should not be necessary.  Still it can't
	 * hurt to include them.  - kw
	 */
	if (me->inUnderline) {
	    HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
	    me->inUnderline = FALSE;
	    me->Underline_Level = 0;
	    CTRACE((tfp, "HTML_free: Ending underline\n"));
	}
	if (me->inA) {
	    HTML_end_element(me, HTML_A, &include);
	    me->inA = FALSE;
	    CTRACE((tfp, "HTML_free: Ending HTML_A\n"));
	}
	if (me->inFONT) {
	    HTML_end_element(me, HTML_FONT, &include);
	    me->inFONT = FALSE;
	}
	if (me->inFORM) {
	    HTML_end_element(me, HTML_FORM, &include);
	    me->inFORM = FALSE;
	}
	if (me->option.size > 0) {
	    /*
	     * If we still have data in the me->option chunk after forcing a
	     * close of a still-open form, something must have gone very wrong. 
	     * - kw
	     */
	    if (LYBadHTML(me)) {
		LYShowBadHTML("Bad HTML: SELECT or OPTION not ended properly *****\n");
	    }
	    HTChunkTerminate(&me->option);
	    /*
	     * Output the left-over data as text, maybe it was invalid markup
	     * meant to be shown somewhere.  - kw
	     */
	    CTRACE((tfp, "HTML_free: ***** leftover option data: %s\n",
		    me->option.data));
	    HTML_put_string(me, me->option.data);
	    HTChunkClear(&me->option);
	}
	if (me->textarea.size > 0) {
	    /*
	     * If we still have data in the me->textarea chunk after forcing a
	     * close of a still-open form, something must have gone very wrong. 
	     * - kw
	     */
	    if (LYBadHTML(me)) {
		LYShowBadHTML("Bad HTML: TEXTAREA not used properly *****\n");
	    }
	    HTChunkTerminate(&me->textarea);
	    /*
	     * Output the left-over data as text, maybe it was invalid markup
	     * meant to be shown somewhere.  - kw
	     */
	    CTRACE((tfp, "HTML_free: ***** leftover textarea data: %s\n",
		    me->textarea.data));
	    HTML_put_string(me, me->textarea.data);
	    HTChunkClear(&me->textarea);
	}
	/*
	 * If we're interactive and have hidden links but no visible links, add
	 * a message informing the user about this and suggesting use of the
	 * 'l'ist command.  - FM
	 */
	if (!dump_output_immediately &&
	    HText_sourceAnchors(me->text) < 1 &&
	    HText_HiddenLinkCount(me->text) > 0) {
	    HTML_start_element(me, HTML_P, 0, 0, -1, &include);
	    HTML_put_character(me, '[');
	    HTML_start_element(me, HTML_EM, 0, 0, -1, &include);
	    HTML_put_string(me,
			    gettext("Document has only hidden links.  Use the 'l'ist command."));
	    HTML_end_element(me, HTML_EM, &include);
	    HTML_put_character(me, ']');
	    HTML_end_element(me, HTML_P, &include);
	}
	if (me->xinclude) {
	    HText_appendText(me->text, " *** LYNX ERROR ***\rUnparsed data:\r");
	    HText_appendText(me->text, me->xinclude);
	    FREE(me->xinclude);
	}

	/*
	 * Now call the cleanup function.  - FM
	 */
	HText_endAppend(me->text);
    }
    if (me->option.size > 0) {
	/*
	 * If we still have data in the me->option chunk after forcing a close
	 * of a still-open form, something must have gone very wrong.  - kw
	 */
	if (LYBadHTML(me)) {
	    LYShowBadHTML("Bad HTML: SELECT or OPTION not ended properly *****\n");
	}
	if (TRACE) {
	    HTChunkTerminate(&me->option);
	    CTRACE((tfp, "HTML_free: ***** leftover option data: %s\n",
		    me->option.data));
	}
	HTChunkClear(&me->option);
    }
    if (me->textarea.size > 0) {
	/*
	 * If we still have data in the me->textarea chunk after forcing a
	 * close of a still-open form, something must have gone very wrong.  -
	 * kw
	 */
	if (LYBadHTML(me)) {
	    LYShowBadHTML("Bad HTML: TEXTAREA not used properly *****\n");
	}
	if (TRACE) {
	    HTChunkTerminate(&me->textarea);
	    CTRACE((tfp, "HTML_free: ***** leftover textarea data: %s\n",
		    me->textarea.data));
	}
	HTChunkClear(&me->textarea);
    }

    if (me->target) {
	(*me->targetClass._free) (me->target);
    }
    if (me->sp && me->sp->style && GetHTStyleName(me->sp->style)) {
	if (me->sp->style->id == ST_DivCenter ||
	    me->sp->style->id == ST_HeadingCenter ||
	    me->sp->style->id == ST_Heading1) {
	    me->sp->style->alignment = HT_CENTER;
	} else if (me->sp->style->id == ST_DivRight ||
		   me->sp->style->id == ST_HeadingRight) {
	    me->sp->style->alignment = HT_RIGHT;
	} else {
	    me->sp->style->alignment = HT_LEFT;
	}
	styles[HTML_PRE]->alignment = HT_LEFT;
    }
    FREE(me->base_href);
    FREE(me->map_address);
    FREE(me->LastOptionValue);
    clear_objectdata(me);
    FREE(me);
}

static void HTML_abort(HTStructured * me, HTError e)
{
    char *include = NULL;

    if (me->text) {
	/*
	 * If we have emphasis on, or open A, FONT, or FORM containers, turn it
	 * off or close them now.  - FM
	 */
	if (me->inUnderline) {
	    HText_appendCharacter(me->text, LY_UNDERLINE_END_CHAR);
	    me->inUnderline = FALSE;
	    me->Underline_Level = 0;
	}
	if (me->inA) {
	    HTML_end_element(me, HTML_A, &include);
	    me->inA = FALSE;
	}
	if (me->inFONT) {
	    HTML_end_element(me, HTML_FONT, &include);
	    me->inFONT = FALSE;
	}
	if (me->inFORM) {
	    HTML_end_element(me, HTML_FORM, &include);
	    me->inFORM = FALSE;
	}

	/*
	 * Now call the cleanup function.  - FM
	 */
	HText_endAppend(me->text);
    }

    if (me->option.size > 0) {
	/*
	 * If we still have data in the me->option chunk after forcing a close
	 * of a still-open form, something must have gone very wrong.  - kw
	 */
	if (TRACE) {
	    CTRACE((tfp,
		    "HTML_abort: SELECT or OPTION not ended properly *****\n"));
	    HTChunkTerminate(&me->option);
	    CTRACE((tfp, "HTML_abort: ***** leftover option data: %s\n",
		    me->option.data));
	}
	HTChunkClear(&me->option);
    }
    if (me->textarea.size > 0) {
	/*
	 * If we still have data in the me->textarea chunk after forcing a
	 * close of a still-open form, something must have gone very wrong.  -
	 * kw
	 */
	if (TRACE) {
	    CTRACE((tfp, "HTML_abort: TEXTAREA not used properly *****\n"));
	    HTChunkTerminate(&me->textarea);
	    CTRACE((tfp, "HTML_abort: ***** leftover textarea data: %s\n",
		    me->textarea.data));
	}
	HTChunkClear(&me->textarea);
    }

    if (me->target) {
	(*me->targetClass._abort) (me->target, e);
    }
    if (me->sp && me->sp->style && GetHTStyleName(me->sp->style)) {
	if (me->sp->style->id == ST_DivCenter ||
	    me->sp->style->id == ST_HeadingCenter ||
	    me->sp->style->id == ST_Heading1) {
	    me->sp->style->alignment = HT_CENTER;
	} else if (me->sp->style->id == ST_DivRight ||
		   me->sp->style->id == ST_HeadingRight) {
	    me->sp->style->alignment = HT_RIGHT;
	} else {
	    me->sp->style->alignment = HT_LEFT;
	}
	styles[HTML_PRE]->alignment = HT_LEFT;
    }
    FREE(me->base_href);
    FREE(me->map_address);
    FREE(me->textarea_name);
    FREE(me->textarea_accept_cs);
    FREE(me->textarea_id);
    FREE(me->LastOptionValue);
    FREE(me->xinclude);
    clear_objectdata(me);
    FREE(me);
}

/*	Get Styles from style sheet
 *	---------------------------
 */
static void get_styles(void)
{
    HTStyle **st = NULL;

    styleSheet = DefaultStyle(&st);	/* sets st[] array */

    default_style = st[ST_Normal];

    styles[HTML_H1] = st[ST_Heading1];
    styles[HTML_H2] = st[ST_Heading2];
    styles[HTML_H3] = st[ST_Heading3];
    styles[HTML_H4] = st[ST_Heading4];
    styles[HTML_H5] = st[ST_Heading5];
    styles[HTML_H6] = st[ST_Heading6];
    styles[HTML_HCENTER] = st[ST_HeadingCenter];
    styles[HTML_HLEFT] = st[ST_HeadingLeft];
    styles[HTML_HRIGHT] = st[ST_HeadingRight];

    styles[HTML_DCENTER] = st[ST_DivCenter];
    styles[HTML_DLEFT] = st[ST_DivLeft];
    styles[HTML_DRIGHT] = st[ST_DivRight];

    styles[HTML_DL] = st[ST_Glossary];
    /* nested list styles */
    styles[HTML_DL1] = st[ST_Glossary1];
    styles[HTML_DL2] = st[ST_Glossary2];
    styles[HTML_DL3] = st[ST_Glossary3];
    styles[HTML_DL4] = st[ST_Glossary4];
    styles[HTML_DL5] = st[ST_Glossary5];
    styles[HTML_DL6] = st[ST_Glossary6];

    styles[HTML_UL] =
	styles[HTML_OL] = st[ST_List];
    /* nested list styles */
    styles[HTML_OL1] = st[ST_List1];
    styles[HTML_OL2] = st[ST_List2];
    styles[HTML_OL3] = st[ST_List3];
    styles[HTML_OL4] = st[ST_List4];
    styles[HTML_OL5] = st[ST_List5];
    styles[HTML_OL6] = st[ST_List6];

    styles[HTML_MENU] =
	styles[HTML_DIR] = st[ST_Menu];
    /* nested list styles */
    styles[HTML_MENU1] = st[ST_Menu1];
    styles[HTML_MENU2] = st[ST_Menu2];
    styles[HTML_MENU3] = st[ST_Menu3];
    styles[HTML_MENU4] = st[ST_Menu4];
    styles[HTML_MENU5] = st[ST_Menu5];
    styles[HTML_MENU6] = st[ST_Menu6];

    styles[HTML_DLC] = st[ST_GlossaryCompact];
    /* nested list styles */
    styles[HTML_DLC1] = st[ST_GlossaryCompact1];
    styles[HTML_DLC2] = st[ST_GlossaryCompact2];
    styles[HTML_DLC3] = st[ST_GlossaryCompact3];
    styles[HTML_DLC4] = st[ST_GlossaryCompact4];
    styles[HTML_DLC5] = st[ST_GlossaryCompact5];
    styles[HTML_DLC6] = st[ST_GlossaryCompact6];

    styles[HTML_ADDRESS] = st[ST_Address];
    styles[HTML_BANNER] = st[ST_Banner];
    styles[HTML_BLOCKQUOTE] = st[ST_Blockquote];
    styles[HTML_BQ] = st[ST_Bq];
    styles[HTML_FN] = st[ST_Footnote];
    styles[HTML_NOTE] = st[ST_Note];
    styles[HTML_PLAINTEXT] =
	styles[HTML_XMP] = st[ST_Example];
    styles[HTML_PRE] = st[ST_Preformatted];
    styles[HTML_LISTING] = st[ST_Listing];
}

/*
 * If we're called from another module, make sure we've initialized styles
 * array first.
 */
HTStyle *LYstyles(int style_number)
{
    if (styles[style_number] == 0)
	get_styles();
    return styles[style_number];
}

/*				P U B L I C
*/

/*	Structured Object Class
 *	-----------------------
 */
const HTStructuredClass HTMLPresentation =	/* As opposed to print etc */
{
    "Lynx_HTML_Handler",
    HTML_free,
    HTML_abort,
    HTML_put_character, HTML_put_string, HTML_write,
    HTML_start_element, HTML_end_element,
    HTML_put_entity
};

/*		New Structured Text object
 *		--------------------------
 *
 *	The structured stream can generate either presentation,
 *	or plain text, or HTML.
 */
HTStructured *HTML_new(HTParentAnchor *anchor,
		       HTFormat format_out,
		       HTStream *stream)
{

    HTStructured *me;

    CTRACE((tfp, "start HTML_new\n"));

    if (format_out != WWW_PLAINTEXT && format_out != WWW_PRESENT) {
	HTStream *intermediate = HTStreamStack(WWW_HTML, format_out,
					       stream, anchor);

	if (intermediate)
	    return HTMLGenerator(intermediate);
	fprintf(stderr, "\n** Internal error: can't parse HTML to %s\n",
		HTAtom_name(format_out));
	exit_immediately(EXIT_FAILURE);
    }

    me = typecalloc(HTStructured);
    if (me == NULL)
	outofmem(__FILE__, "HTML_new");
    assert(me != NULL);

    /*
     * This used to call 'get_styles()' only on the first time through this
     * function.  However, if the user reloads a page with ^R, the styles[]
     * array is not necessarily the same as it was from 'get_styles()'.  So
     * we reinitialize the whole thing.
     */
    get_styles();

    me->isa = &HTMLPresentation;
    me->node_anchor = anchor;

    me->CurrentA = NULL;
    me->CurrentANum = 0;
    me->base_href = NULL;
    me->map_address = NULL;

    HTChunkInit(&me->title, 128);

    HTChunkInit(&me->object, 128);
    me->object_started = FALSE;
    me->object_declare = FALSE;
    me->object_shapes = FALSE;
    me->object_ismap = FALSE;
    me->object_id = NULL;
    me->object_title = NULL;
    me->object_data = NULL;
    me->object_type = NULL;
    me->object_classid = NULL;
    me->object_codebase = NULL;
    me->object_codetype = NULL;
    me->object_usemap = NULL;
    me->object_name = NULL;

    HTChunkInit(&me->option, 128);
    me->first_option = TRUE;
    me->LastOptionValue = NULL;
    me->LastOptionChecked = FALSE;
    me->select_disabled = FALSE;

    HTChunkInit(&me->textarea, 128);
    me->textarea_name = NULL;
    me->textarea_name_cs = -1;
    me->textarea_accept_cs = NULL;
    me->textarea_cols = 0;
    me->textarea_rows = 4;
    me->textarea_id = NULL;

    HTChunkInit(&me->math, 128);

    HTChunkInit(&me->style_block, 128);

    HTChunkInit(&me->script, 128);

    me->text = 0;
    me->style_change = YES;	/* Force check leading to text creation */
    me->new_style = default_style;
    me->old_style = 0;
    me->current_default_alignment = HT_LEFT;
    me->sp = (me->stack + MAX_NESTING - 1);
    me->skip_stack = 0;
    me->sp->tag_number = -1;	/* INVALID */
    me->sp->style = default_style;	/* INVALID */
    me->sp->style->alignment = HT_LEFT;
    me->stack_overrun = FALSE;

    me->Division_Level = -1;
    me->Underline_Level = 0;
    me->Quote_Level = 0;

    me->UsePlainSpace = FALSE;
    me->HiddenValue = FALSE;
    me->lastraw = -1;

    /*
     * Used for nested lists.  - FM
     */
    me->List_Nesting_Level = -1;	/* counter for list nesting level */
    LYZero_OL_Counter(me);	/* Initializes OL_Counter[] and OL_Type[] */
    me->Last_OL_Count = 0;	/* last count in ordered lists */
    me->Last_OL_Type = '1';	/* last type in ordered lists */

    me->inA = FALSE;
    me->inAPPLET = FALSE;
    me->inAPPLETwithP = FALSE;
    me->inBadBASE = FALSE;
    me->inBadHREF = FALSE;
    me->inBadHTML = FALSE;
    me->inBASE = FALSE;
    me->node_anchor->inBASE = FALSE;
    me->inBoldA = FALSE;
    me->inBoldH = FALSE;
    me->inCAPTION = FALSE;
    me->inCREDIT = FALSE;
    me->inFIG = FALSE;
    me->inFIGwithP = FALSE;
    me->inFONT = FALSE;
    me->inFORM = FALSE;
    me->inLABEL = FALSE;
    me->inP = FALSE;
    me->inPRE = FALSE;
    me->inSELECT = FALSE;
    me->inTABLE = FALSE;
    me->inUnderline = FALSE;

    me->needBoldH = FALSE;

    me->comment_start = NULL;
    me->comment_end = NULL;

#ifdef USE_COLOR_STYLE
#ifdef LY_FIND_LEAKS
    if (Style_className == 0) {
	atexit(free_Style_className);
    }
#endif
    addClassName("", "", (size_t) 0);
    class_string[0] = '\0';
#endif

    /*
     * Create a chartrans stage info structure for the anchor, if it does not
     * exist already (in which case the default MIME stage info will be loaded
     * as well), and load the HTML stage info into me->UCI and me->UCLYhndl.  -
     * FM
     */
    LYGetChartransInfo(me);
    UCTransParams_clear(&me->T);

    /*
     * Load the existing or default input charset info into the holding
     * elements.  We'll believe what is indicated for UCT_STAGE_PARSER.  - FM
     */
    me->inUCLYhndl = HTAnchor_getUCLYhndl(me->node_anchor,
					  UCT_STAGE_PARSER);
    if (me->inUCLYhndl < 0) {
	me->inUCLYhndl = HTAnchor_getUCLYhndl(me->node_anchor,
					      UCT_STAGE_MIME);
	me->inUCI = HTAnchor_getUCInfoStage(me->node_anchor,
					    UCT_STAGE_MIME);
    } else {
	me->inUCI = HTAnchor_getUCInfoStage(me->node_anchor,
					    UCT_STAGE_PARSER);
    }

    /*
     * Load the existing or default output charset info into the holding
     * elements, UCT_STAGE_STRUCTURED should be the same as UCT_STAGE_TEXT at
     * this point, but we could check, perhaps.  - FM
     */
    me->outUCI = HTAnchor_getUCInfoStage(me->node_anchor,
					 UCT_STAGE_STRUCTURED);
    me->outUCLYhndl = HTAnchor_getUCLYhndl(me->node_anchor,
					   UCT_STAGE_STRUCTURED);

    me->target = stream;
    if (stream)
	me->targetClass = *stream->isa;		/* Copy pointers */

    return (HTStructured *) me;
}

#ifdef USE_SOURCE_CACHE

/*
 * A flag set by a file write error.  Used for only generating an alert the
 * first time such an error happens, since Lynx should still be usable if the
 * temp space becomes full, and an alert each time a cache file cannot be
 * written would be annoying.  Reset when lynx.cfg is being reloaded (user may
 * change SOURCE_CACHE setting).  - kw
 */
BOOLEAN source_cache_file_error = FALSE;

/*
 * Pass-thru cache HTStream
 */

static void CacheThru_do_free(HTStream *me)
{
    if (me->anchor->source_cache_file) {
	CTRACE((tfp, "SourceCacheWriter: Removing previous file %s\n",
		me->anchor->source_cache_file));
	(void) LYRemoveTemp(me->anchor->source_cache_file);
	FREE(me->anchor->source_cache_file);
    }
    if (me->anchor->source_cache_chunk) {
	CTRACE((tfp, "SourceCacheWriter: Removing previous memory chunk %p\n",
		(void *) me->anchor->source_cache_chunk));
	HTChunkFree(me->anchor->source_cache_chunk);
	me->anchor->source_cache_chunk = NULL;
    }
    if (me->fp) {
	fflush(me->fp);
	if (ferror(me->fp))
	    me->status = HT_ERROR;
	LYCloseTempFP(me->fp);
	if (me->status == HT_OK) {
	    char *cp_freeme = 0;

	    me->anchor->source_cache_file = me->filename;
	    CTRACE((tfp,
		    "SourceCacheWriter: Committing file %s for URL %s to anchor\n",
		    me->filename,
		    cp_freeme = HTAnchor_address((HTAnchor *) me->anchor)));
	    FREE(cp_freeme);
	} else {
	    if (source_cache_file_error == FALSE) {
		HTAlert(gettext("Source cache error - disk full?"));
		source_cache_file_error = TRUE;
	    }
	    (void) LYRemoveTemp(me->filename);
	    me->anchor->source_cache_file = NULL;
	}
    } else if (me->status != HT_OK) {
	if (me->chunk) {
	    CTRACE((tfp, "SourceCacheWriter: memory chunk %p had errors.\n",
		    (void *) me->chunk));
	    HTChunkFree(me->chunk);
	    me->chunk = me->last_chunk = NULL;
	}
	HTAlert(gettext("Source cache error - not enough memory!"));
    }
    if (me->chunk) {
	char *cp_freeme = NULL;

	me->anchor->source_cache_chunk = me->chunk;
	CTRACE((tfp,
		"SourceCacheWriter: Committing memory chunk %p for URL %s to anchor\n",
		(void *) me->chunk,
		cp_freeme = HTAnchor_address((HTAnchor *) me->anchor)));
	FREE(cp_freeme);
    }
}

static void CacheThru_free(HTStream *me)
{
    CacheThru_do_free(me);
    (*me->actions->_free) (me->target);
    FREE(me);
}

static void CacheThru_abort(HTStream *me, HTError e)
{
    if (me->fp)
	LYCloseTempFP(me->fp);
    if (LYCacheSourceForAborted == SOURCE_CACHE_FOR_ABORTED_DROP) {
	if (me->filename) {
	    CTRACE((tfp, "SourceCacheWriter: Removing active file %s\n",
		    me->filename));
	    (void) LYRemoveTemp(me->filename);
	    FREE(me->filename);
	}
	if (me->chunk) {
	    CTRACE((tfp,
		    "SourceCacheWriter: Removing active memory chunk %p\n",
		    (void *) me->chunk));
	    HTChunkFree(me->chunk);
	}
    } else {
	me->status = HT_OK;	/*fake it */
	CacheThru_do_free(me);
    }
    (*me->actions->_abort) (me->target, e);
    FREE(me);
}

/*
 * FIXME: never used!
 */
static void CacheThru_put_character(HTStream *me, int c_in)
{
    if (me->status == HT_OK) {
	if (me->fp) {
	    fputc(c_in, me->fp);
	} else if (me->chunk) {
	    me->last_chunk = HTChunkPutc2(me->last_chunk, c_in);
	    if (me->last_chunk == NULL || me->last_chunk->allocated == 0)
		me->status = HT_ERROR;
	}
    }
    (*me->actions->put_character) (me->target, c_in);
}

/*
 * FIXME: never used!
 */
static void CacheThru_put_string(HTStream *me, const char *str)
{
    if (me->status == HT_OK) {
	if (me->fp) {
	    fputs(str, me->fp);
	} else if (me->chunk) {
	    me->last_chunk = HTChunkPuts2(me->last_chunk, str);
	    if (me->last_chunk == NULL || me->last_chunk->allocated == 0)
		me->status = HT_ERROR;
	}
    }
    (*me->actions->put_string) (me->target, str);
}

static void CacheThru_write(HTStream *me, const char *str, int l)
{
    if (me->status == HT_OK && l != 0) {
	if (me->fp) {
	    if (fwrite(str, (size_t) 1, (size_t) l, me->fp) < (size_t) l
		|| ferror(me->fp)) {
		me->status = HT_ERROR;
	    }
	} else if (me->chunk) {
	    me->last_chunk = HTChunkPutb2(me->last_chunk, str, l);
	    if (me->last_chunk == NULL || me->last_chunk->allocated == 0)
		me->status = HT_ERROR;
	}
    }
    (*me->actions->put_block) (me->target, str, l);
}

static const HTStreamClass PassThruCache =
{
    "PassThruCache",
    CacheThru_free,
    CacheThru_abort,
    CacheThru_put_character,
    CacheThru_put_string,
    CacheThru_write
};

static HTStream *CacheThru_new(HTParentAnchor *anchor,
			       HTStream *target)
{
    char *cp_freeme = NULL;
    char filename[LY_MAXPATH];
    HTStream *stream = NULL;
    HTProtocol *p = (HTProtocol *) anchor->protocol;

    /*
     * Neatly and transparently vanish if source caching is disabled.
     */
    if (LYCacheSource == SOURCE_CACHE_NONE)
	return target;

#ifndef DEBUG_SOURCE_CACHE
    /*  Only remote HTML documents may benefit from HTreparse_document(),  */
    /*  oh, assume http protocol:                                          */
    if (strcmp(p->name, "http") != 0
	&& strcmp(p->name, "https") != 0) {
	CTRACE((tfp, "SourceCacheWriter: Protocol is \"%s\"; not cached\n", p->name));
	return target;
    }
#else
    /* all HTStreams will be cached */
#endif

    CTRACE((tfp, "start CacheThru_new\n"));

    stream = (HTStream *) malloc(sizeof(*stream));
    if (!stream)
	outofmem(__FILE__, "CacheThru_new");

    assert(stream != NULL);

    stream->isa = &PassThruCache;
    stream->anchor = anchor;
    stream->fp = NULL;
    stream->filename = NULL;
    stream->chunk = NULL;
    stream->target = target;
    stream->actions = target->isa;
    stream->status = HT_OK;

    if (LYCacheSource == SOURCE_CACHE_FILE) {

	if (anchor->source_cache_file) {
	    CTRACE((tfp,
		    "SourceCacheWriter: If successful, will replace source cache file %s\n",
		    anchor->source_cache_file));
	}

	/*
	 * We open the temp file in binary mode to make sure that
	 * end-of-line stuff and high-bit Latin-1 (or other) characters
	 * don't get munged; this way, the file should (knock on wood)
	 * contain exactly what came in from the network.
	 */
	if (!(stream->fp = LYOpenTemp(filename, HTML_SUFFIX, BIN_W))) {
	    CTRACE((tfp,
		    "SourceCacheWriter: Cannot open source cache file for URL %s\n",
		    cp_freeme = HTAnchor_address((HTAnchor *) anchor)));
	    FREE(stream);
	    FREE(cp_freeme);
	    return target;
	}

	StrAllocCopy(stream->filename, filename);

	CTRACE((tfp,
		"SourceCacheWriter: Caching source for URL %s in file %s\n",
		cp_freeme = HTAnchor_address((HTAnchor *) anchor),
		filename));
	FREE(cp_freeme);
    }

    if (LYCacheSource == SOURCE_CACHE_MEMORY) {
	if (anchor->source_cache_chunk) {
	    CTRACE((tfp,
		    "SourceCacheWriter: If successful, will replace memory chunk %p\n",
		    (void *) anchor->source_cache_chunk));
	}
	stream->chunk = stream->last_chunk = HTChunkCreateMayFail(4096, 1);
	if (!stream->chunk)	/* failed already? pretty bad... - kw */
	    stream->status = HT_ERROR;

	CTRACE((tfp,
		"SourceCacheWriter: Caching source for URL %s in memory chunk %p\n",
		cp_freeme = HTAnchor_address((HTAnchor *) anchor),
		(void *) stream->chunk));
	FREE(cp_freeme);
    }

    return stream;
}
#else
#define CacheThru_new(anchor, target) target
#endif

/*	HTConverter for HTML to plain text
 *	----------------------------------
 *
 *	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
 */
HTStream *HTMLToPlain(HTPresentation *pres,
		      HTParentAnchor *anchor,
		      HTStream *sink)
{
    CTRACE((tfp, "HTMLToPlain calling CacheThru_new\n"));
    return CacheThru_new(anchor,
			 SGML_new(&HTML_dtd, anchor,
				  HTML_new(anchor, pres->rep_out, sink)));
}

/*	HTConverter for HTML source to plain text
 *	-----------------------------------------
 *
 *	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
 */
HTStream *HTMLParsedPresent(HTPresentation *pres,
			    HTParentAnchor *anchor,
			    HTStream *sink)
{
    HTStream *intermediate = sink;

    if (!intermediate) {
	/*
	 * Trick to prevent HTPlainPresent from translating again.  Temporarily
	 * change UCT_STAGE_PARSER setting in anchor while the HTPlain stream
	 * is initialized, so that HTPlain sees its input and output charsets
	 * as the same.  - kw
	 */
	int old_parser_cset = HTAnchor_getUCLYhndl(anchor, UCT_STAGE_PARSER);
	int structured_cset = HTAnchor_getUCLYhndl(anchor, UCT_STAGE_STRUCTURED);

	if (structured_cset < 0)
	    structured_cset = HTAnchor_getUCLYhndl(anchor, UCT_STAGE_HTEXT);
	if (structured_cset < 0)
	    structured_cset = current_char_set;
	HTAnchor_setUCInfoStage(anchor, structured_cset,
				UCT_STAGE_PARSER, UCT_SETBY_MIME);
	if (pres->rep_out == WWW_SOURCE) {
	    /*  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);
	}
	if (old_parser_cset != structured_cset) {
	    HTAnchor_resetUCInfoStage(anchor, old_parser_cset,
				      UCT_STAGE_PARSER, UCT_SETBY_NONE);
	    if (old_parser_cset >= 0) {
		HTAnchor_setUCInfoStage(anchor, old_parser_cset,
					UCT_STAGE_PARSER,
					UCT_SETBY_DEFAULT + 1);
	    }
	}
    }
    if (!intermediate)
	return NULL;
    CTRACE((tfp, "HTMLParsedPresent calling CacheThru_new\n"));
    return CacheThru_new(anchor,
			 SGML_new(&HTML_dtd, anchor,
				  HTMLGenerator(intermediate)));
}

/*	HTConverter for HTML to C code
 *	------------------------------
 *
 *	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 normally not used by lynx.
 *	- kw 1999-03-15
 */
HTStream *HTMLToC(HTPresentation *pres GCC_UNUSED,
		  HTParentAnchor *anchor,
		  HTStream *sink)
{
    HTStructured *html;

    if (sink)
	(*sink->isa->put_string) (sink, "/* ");		/* Before even title */
    html = HTML_new(anchor, WWW_PLAINTEXT, sink);
    html->comment_start = "/* ";
    html->comment_end = " */\n";	/* Must start in col 1 for cpp */
    if (!sink)
	HTML_put_string(html, html->comment_start);
    CTRACE((tfp, "HTMLToC calling CacheThru_new\n"));
    return CacheThru_new(anchor,
			 SGML_new(&HTML_dtd, anchor, html));
}

/*	Presenter for HTML
 *	------------------
 *
 *	This will convert from HTML to presentation or plain text.
 *
 * (Comment from original libwww:)
 *	Override this if you have a windows version
 */
#ifndef GUI
HTStream *HTMLPresent(HTPresentation *pres GCC_UNUSED,
		      HTParentAnchor *anchor,
		      HTStream *sink GCC_UNUSED)
{
    CTRACE((tfp, "HTMLPresent calling CacheThru_new\n"));
    return CacheThru_new(anchor,
			 SGML_new(&HTML_dtd, anchor,
				  HTML_new(anchor, WWW_PRESENT, NULL)));
}
#endif /* !GUI */

/* (Comments from original libwww:) */
/*	Record error message as a hypertext object
 *	------------------------------------------
 *
 *	The error message should be marked as an error so that
 *	it can be reloaded later.
 *	This implementation just throws up an error message
 *	and leaves the document unloaded.
 *	A smarter implementation would load an error document,
 *	marking at such so that it is retried on reload.
 *
 * On entry,
 *	sink	is a stream to the output device if any
 *	number	is the HTTP error number
 *	message is the human readable message.
 *
 * 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)
*/
int HTLoadError(HTStream *sink GCC_UNUSED, int number,
		const char *message)
{
    HTAlert(message);		/* @@@@@@@@@@@@@@@@@@@ */
    return -number;
}

static char *MakeNewTitle(STRING2PTR value, int src_type)
{
    char *ptr;
    char *newtitle = NULL;

    StrAllocCopy(newtitle, "[");
    if (value != 0 && value[src_type] != 0) {
	ptr = strrchr(value[src_type], '/');
	if (!ptr) {
	    StrAllocCat(newtitle, value[src_type]);
	} else {
	    StrAllocCat(newtitle, ptr + 1);
	}
    } else {
	ptr = 0;
    }
#ifdef SH_EX			/* 1998/04/02 (Thu) 16:02:00 */

    /* for proxy server 1998/12/19 (Sat) 11:53:30 */
    if (AS_casecomp(newtitle + 1, "internal-gopher-menu") == 0) {
	StrAllocCopy(newtitle, "+");
    } else if (AS_casecomp(newtitle + 1, "internal-gopher-unknown") == 0) {
	StrAllocCopy(newtitle, " ");
    } else {
	/* normal title */
	ptr = strrchr(newtitle, '.');
	if (ptr) {
	    if (AS_casecomp(ptr, ".gif") == 0)
		*ptr = '\0';
	    else if (AS_casecomp(ptr, ".jpg") == 0)
		*ptr = '\0';
	    else if (AS_casecomp(ptr, ".jpeg") == 0)
		*ptr = '\0';
	}
	StrAllocCat(newtitle, "]");
    }
#else
    StrAllocCat(newtitle, "]");
#endif
    return newtitle;
}

static char *MakeNewImageValue(STRING2PTR value)
{
    char *ptr;
    char *newtitle = NULL;

    StrAllocCopy(newtitle, "[");
    ptr = (value[HTML_INPUT_SRC]
	   ? strrchr(value[HTML_INPUT_SRC], '/')
	   : 0);
    if (!ptr) {
	StrAllocCat(newtitle, value[HTML_INPUT_SRC]);
    } else {
	StrAllocCat(newtitle, ptr + 1);
    }
    StrAllocCat(newtitle, "]-Submit");
    return newtitle;
}

static char *MakeNewMapValue(STRING2PTR value, const char *mapstr)
{
    char *ptr;
    char *newtitle = NULL;

    StrAllocCopy(newtitle, "[");
    StrAllocCat(newtitle, mapstr);	/* ISMAP or USEMAP */
    if (verbose_img && non_empty(value[HTML_IMG_SRC])) {
	StrAllocCat(newtitle, ":");
	ptr = strrchr(value[HTML_IMG_SRC], '/');
	if (!ptr) {
	    StrAllocCat(newtitle, value[HTML_IMG_SRC]);
	} else {
	    StrAllocCat(newtitle, ptr + 1);
	}
    }
    StrAllocCat(newtitle, "]");
    return newtitle;
}