about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--CHANGES1001
-rw-r--r--CHANGES.chartrans204
-rw-r--r--CHANGES.configure6
-rw-r--r--CHANGES.new90
-rw-r--r--DESC14
-rw-r--r--INSTALLATION180
-rw-r--r--Makefile.old1106
-rw-r--r--README.chartrans197
-rw-r--r--README.configure12
-rw-r--r--RELEASE_STATEMENT30
-rw-r--r--WWW/Library/Implementation/HTChunk.c13
-rw-r--r--WWW/Library/Implementation/HTFTP.c28
-rw-r--r--WWW/Library/Implementation/HTFile.c16
-rw-r--r--WWW/Library/Implementation/HTMIME.c12
-rw-r--r--WWW/Library/Implementation/HTML.h44
-rw-r--r--WWW/Library/Implementation/HTMLDTD.c5
-rw-r--r--WWW/Library/Implementation/HTNews.c55
-rw-r--r--WWW/Library/Implementation/HTParse.c9
-rw-r--r--WWW/Library/Implementation/HTParse.h6
-rw-r--r--WWW/Library/Implementation/HTPlain.c226
-rw-r--r--WWW/Library/Implementation/HTString.c7
-rw-r--r--WWW/Library/Implementation/HTString.h4
-rw-r--r--WWW/Library/Implementation/HTTP.c36
-rw-r--r--WWW/Library/Implementation/SGML.c523
-rw-r--r--WWW/Library/Implementation/UCAux.h14
-rw-r--r--WWW/Library/Implementation/UCMap.h5
-rw-r--r--WWW/Library/unix/makefile.in3
-rw-r--r--about_lynx/COPYHEADER20
-rw-r--r--about_lynx/COPYING339
-rw-r--r--about_lynx/about_lynx.html97
-rw-r--r--about_lynx/lynx-dev.html70
-rw-r--r--aclocal.m434
-rwxr-xr-xconfigure784
-rw-r--r--configure.in28
-rw-r--r--docs/README.defines5
-rw-r--r--docs/README.html25
-rw-r--r--docs/README.txt17
-rw-r--r--lynx.cfg92
-rw-r--r--lynx_help/Lynx_users_guide.html22
-rw-r--r--lynx_help/keystrokes/gopher_types_help.html2
-rw-r--r--lynx_help/lynx_help_main.html2
-rw-r--r--lynx_help/lynx_url_support.html2
-rw-r--r--makefile.in2
-rw-r--r--newfiles.chartrans40
-rw-r--r--newfiles.configure11
-rw-r--r--samples/lynx.cfg93
-rw-r--r--src/GridText.c15
-rw-r--r--src/HTInit.c167
-rw-r--r--src/HTML.c171
-rw-r--r--src/HTML.h44
-rw-r--r--src/LYCharSets.c628
-rw-r--r--src/LYCharSets.h9
-rw-r--r--src/LYCharUtils.c204
-rw-r--r--src/LYCurses.c155
-rw-r--r--src/LYCurses.h11
-rw-r--r--src/LYEditmap.c2
-rw-r--r--src/LYForms.c30
-rw-r--r--src/LYKeymap.c27
-rw-r--r--src/LYKeymap.h3
-rw-r--r--src/LYMainLoop.c47
-rw-r--r--src/LYMap.c12
-rw-r--r--src/LYOptions.c6
-rw-r--r--src/LYStrings.c45
-rw-r--r--src/LYStrings.h8
-rw-r--r--src/LYUtils.c96
-rw-r--r--src/Makefile.old32
-rw-r--r--src/UCAux.c258
-rw-r--r--src/UCdomap.c242
-rw-r--r--src/chrtrans/Makefile.old62
-rw-r--r--src/chrtrans/README.format13
-rw-r--r--src/chrtrans/build-chrtrans.com96
-rw-r--r--src/chrtrans/cp1250_uni.tbl2
-rw-r--r--src/chrtrans/cp1252_uni.tbl6
-rw-r--r--src/chrtrans/cp1253_uni.tbl157
-rw-r--r--src/chrtrans/cp1255_uni.tbl157
-rw-r--r--src/chrtrans/cp1256_uni.tbl157
-rw-r--r--src/chrtrans/cp437_uni.tbl2
-rw-r--r--src/chrtrans/cp737_uni.tbl158
-rw-r--r--src/chrtrans/cp850_uni.tbl4
-rw-r--r--src/chrtrans/cp862_uni.tbl157
-rw-r--r--src/chrtrans/cp864_uni.tbl157
-rw-r--r--src/chrtrans/cp866_uni.tbl2
-rw-r--r--src/chrtrans/cp869_uni.tbl157
-rw-r--r--src/chrtrans/def7_uni.tbl16
-rw-r--r--src/chrtrans/dmcs_uni.tbl226
-rw-r--r--src/chrtrans/iso01_uni.tbl2
-rw-r--r--src/chrtrans/iso01_uni.tbl.orig78
-rw-r--r--src/chrtrans/iso06_uni.tbl3
-rw-r--r--src/chrtrans/iso08_uni.tbl3
-rw-r--r--src/chrtrans/koi8r_uni.tbl2
-rw-r--r--src/chrtrans/mac_uni.tbl342
-rw-r--r--src/chrtrans/makefile.in105
-rw-r--r--src/chrtrans/makeuctb.c38
-rw-r--r--src/chrtrans/next_uni.tbl182
-rw-r--r--src/chrtrans/utf8_uni.tbl17
-rw-r--r--src/makefile.in40
-rw-r--r--userdefs.h27
97 files changed, 5067 insertions, 5044 deletions
diff --git a/CHANGES b/CHANGES
deleted file mode 100644
index bd648e06..00000000
--- a/CHANGES
+++ /dev/null
@@ -1,1001 +0,0 @@
----  Release of Lynx2-7 + BUGFIXES as Lynx v2.7.1 (April 4, 1997)   ---
-=======================================================================
-1997-04-04
-* Fixed typos in LYHistory.c, LYMail.c and LYMain.c which caused
-  failures of flag setting in the distributed code. - TD
-1997-03-31
-* Added a missing check for whether the fragment token is NULL in
-  LYConvertToURL() of LYUtils.c.  Without the check, the for-Unix code
-  could crash if a local file spec was entered as a startfile or goto
-  with escaped characters. - KW
-* Mod in HTML.c to retain "[INLINE]" as the default ALT string if an
-  IMG element has an ISMAP attribute but is not in Anchor content such
-  that it could not in fact function as a server-side image map. - FM
-1997-03-28
-* In mainloop(), after the call to HText_pageDisplay() following a change
-  of the document view, ensure that curdoc.link does not remain set to -1 
-  if there are any links on the screen.  This would otherwise happen if
-  a document is pushed to the history stack while there are no links, and
-  later popped (and refreshed) after one or more links have been created.
-  This change prevents segmentation faults which occurred after creation
-  of a new file in a previously empty directory via the DIRED menu.  The
-  access to invalid memory only occurred if the screen showing the empty
-  directory did not have a parent dir reference link (which is always the
-  case if NO_PARENT_DIR_REFERENCE was specified at compilation time). - KW
-1997-03-27
-* Fixed a typo and added comments for the code in LYMainLoop.c which
-  decides whether to load the URLs for homepage and/or startfile into
-  the goto buffer at startup.  The typo in the distributed code caused
-  the startfile URL always to be added to the goto buffer, even if
-  it had POST content such that it could be resent inappropriately
-  as a GET request via the goto buffer. - FM
-* Added a bsdi-slang target to the Makefile. - LE
-1997-03-26
-* Modified the HTStream structure and associated code in src/HTFWriter.c
-  so that we save and use the relevant content of the associated
-  HTPresentation structure as two HTFormat elements rather than via a
-  pointer to the HTPresentation structure itself, because the latter
-  structure might not be valid under some circumstances when
-  HTFWriter_free() is called.  The distributed code might indirectly
-  result in segmentation faults during downloading on linux and some
-  other flavors of Unix (though they don't occur for most flavors, or
-  on VMS). - KW
-1997-03-21
-* Mods in LYPrint.c to use ".txt" as the output file extension for
-  all rendered text/html files regardless of their original extension.
-  The distributed code was doing this only for ones with an extension
-  of ".html".  The original extension still is retained if the file
-  is being output as source. - FM
-* Added protection against passing a NULL pointer for path_url to
-  render_item() from dired_options() in LYLocal.c. - GN
-1997-03-20
-* Tweaked the protection against URLs directed to port 19 or port 25 so
-  that it can't be circumvented via lead zeros in the port numbers. - FM
-* Changed the compilation default so as not to send From MIME headers to
-  http or https servers.  The default can still be changed via lynx.cfg.
-  Replaced the -nofrom disabling switch to a -from switch for toggling
-  the compilation or configuration default.  Sending the From header
-  has become widely regarded as an invasion of privacy risk, particularly
-  in conjunction with cookie support. - FM
-* Corrected a typo in the lynx.cfg comments concerning TRUSTED_LYNXCGI
-  rules. - KW
-1997-03-17
-* Mods of LYNews.c and LYMail.c to prepend a "-- " separator before
-  appending the LYNX_SIG_FILE signature file to news and email
-  messages. - FM
-* Made the installation mode 755 in the top-level Makefile.  The
-  distributed code used 555, and some install commands were unable
-  to do the strip. - LWV
-1997-03-14
-* Corrected typos and expanded the comments concerning lynxcgi symbols
-  in userdefs.h and lynx.cfg. - FM
-* Modified SGML.c, LYCharSets.c and LYCharUtils.c to handle the numeric
-  character reference ™ as the named entity ™ and use "(TM)"
-  as the ASCII substitution if the current character set does not have the
-  trademark character.  The distributed code was substituting ®. - FM
-* Include time.h via tcp.h for SVR4 systems.  The tcp.h header does include
-  sys/time.h for Unix systems, but this apparently doesn't get  struct tm 
-  and  extern char * ctime()  declared for SVR4. - FM
-1997-03-13
-* Added protection in LYGetFile.c against connections to the port 25
-  ESMTP service. - FM
-1997-03-11
-* Added protection in LYGetFile.c against denial of service attacks via
-  the port 19 CHARGEN service.  The distributed code left Lynx or proxies
-  vulnerable to such attacks via direct or redirection URLs. - FM
-1997-03-10
-* Fixed error in the handling of numeric character references with values
-  greater than 255 in SGML.c.  The distributed code was breaking after
-  substitutions instead of falling through to reset the string chunk and
-  recycle the terminator if not a semi-colon. - FM
-1997-03-08
-* Fixed error in the switch positioning of checks for XLOADIMAGE_COMMAND
-  and wais_proxy in LYReadCFG.c.  The distributed code had them reversed
-  under case 'W' versus case 'X'. - PDS
-* Expanded the copyright and licensing statements in the -version
-  output. - FM
-1997-03-04
-* Corrected the offset computation in textsearch() of LYSearch.c so that
-  WHEREIS searches repeated on a page with no links seek the target
-  starting at the line immediately following the last displayed.  The
-  distributed code was setting a greater offset. - JS
-1997-03-02
-* Don't entify post content for the showinfo display, now that we are
-  making it an XMP block in that display to handle all of the supported
-  enctypes. - FM
-1997-02-28
-* Changed all references to "image/*" to just "image" in the userdefs.h
-  and lynx.cfg comments about XLOADIMAGE_COMMAND.  The "/*" within the
-  userdefs.h comments was generating warnings from some compilers. - FM
-* Added a snake-slang target to the Makefile, and added -DUNIX to the
-  LYFLAGS for the snake3 and snake3-slang targets (HP-UX apparently does
-  not define "unix" itself with the -Ae switch, and thus needs to have
-  that definition forced via -DUNIX). - HL
-1997-02-26
-* Close both descriptors of the pipe() for the NSL_FORK enabled code
-  in HTTCP.c.  The distributed code was closing only one of them on
-  completed gethostbyname() calls, and neither on 'z'aps. - FM
-* Changed the HREF for the "Lynx FAQ" link in the online 'h'elp to
-  its new URL (http://www.slcc.edu/lynx/faq.html). - FM
-1997-02-25
-* More reverse engineering to cope with Netscape's bogus cookie header
-  parsing.  The parser must not require an '=' between the expires
-  attribute name and value, because Set-Cookie headers are being
-  transmitted without it (e.g., by http://law.agps.gov.au).  So Lynx
-  now treats that as another special case. - FM
-* Cope with invalid use of expires attributes in Version 1 cookies.
-  An -06 State Management draft recommends that for "backward
-  compatibility", and has been severely criticized in the HTTP-WG,
-  but it would be foolish not to assume Netscape will do that.  See the
-  expanded comments in LYSetCookie() of LYCookie.c for more information.
-  Note that "expires" thus cannot be used as a Version 1 cookie name, but
-  a provider would be foolish to use that, anyway.  Note also that the
-  possibility of using different header names for Version 1 versus
-  Version 0 (a.k.a., "Netscape") cookies is being discussed in the
-  HTTP-WG, which might have been better to do in the first place, but
-  the -05 draft has been approved as RFC 2109:
-    http://info.internet.isi.edu/in-notes/rfc/files/rfc2109.txt
-  so it would be a while before that were done, if ever. - FM
-1997-02-22
-* Fixed a memory management glitch which could cause a crash if the
-  MIME type of a reply to a FORM submission with METHOD=POST caused a
-  download offer to be invoked. - FM
-* Don't simplify ftp URLs by trimming trailing slashes if the URL is
-  being proxied.  The Netscape proxy server for some unknown reason
-  can return redirection for ftp URLs with the slash appended, and
-  trimming it can result in a redirection loop.  Based on a posted
-  patch from KW. - FM
-* Fixed two typos in the checks for HTPassHighCtrlRaw in LYExpandString()
-  of LYCharUtils.c. - KW
-* Fixed typo in the equality check on line 1553 in HTGopher.c. - AM
-1997-02-19
-* Reset the host string after an '@', if present, when trimming default
-  ":port" fields in the new code aimed at compliance with the Masinter
-  and Fielding URL drafts, expected to replace RFCs 1738 and 1808.  The
-  distributed code neglected to do that, and was ending up on a ":password"
-  field, if present, instead of on the ":port" field, causing the username
-  to be treated as the host name.  - FM
-* Expand the default port trimming so as to include all of the registered
-  URL schemes which support a port field in the v2.7 release. - FM
-* Correctly uncache the current directory listing when invoking an 'u'pload,
-  so that it will be updated to include the uploaded file if placed in the
-  current directory.  The released code attempted to do this in a manner
-  which prevented a pop, so that the directory listing couldn't be restored
-  on return from the uploader menu. - FM
-* Recognize a bookmark file used as the startfile, whether it resides in the
-  home directory or in a subdirectory off home.  The released code failed if
-  the file was in home, and not in a subdirectory, unless the -book switch
-  was used instead of a startfile entry or WWW_HOME variable. - FM
-=======================================================================
----			Start of v2.7 bug fixes			    ---
-=======================================================================
----      Release of Lynx2-6FM as Lynx v2.7 (February 15, 1997)      ---
-=======================================================================
-1997-02-15
-* Release of Lynx2-6FM as Lynx v2.7. - FM
-* Included -Ae when compiling the Implementation modules for the snake3
-  target. - FM
-1997-02-14
-* Mods to issue an alert about a BASE tag not having an absolute URL only
-  once per document. - FM
-* Added code for appending LYNX_SIG_FILE to email messages as well as to
-  news posts or followups, and updated the Users Guide accordingly. - FM
-* Updated build-slang.com. - FM
-1997-02-12
-* Fixed some problems in the code for using a hookless Lynx image with
-  snew_proxy, snewspost_proxy, and snewsreply_proxy set to
-  "nntp://host:port/" so that it uses Tom Zerucha's (tz@execpc.com)
-  daemon which handles the SSL communications on behalf of the Lynx
-  image.  Also polished up all of the news gateway code, and added
-  comments for the benefit of new developers. - FM
-* Added an ECGOTO command mapped by default to 'G', complementary to the
-  GOTO command (default 'g'), to edit the current document's URL and then
-  go to it.  Using case-sensitive letters with different command definitions
-  ensures that both will appear with their brief explanations in the 'k'eymap
-  listing.  For ECGOTO, Control-G, failure to modify the URL, or complete
-  deletion of it, all act as a cancel.  If the current document has POST
-  content associated with it, a warning will be issued before offering the
-  URL to edit.  The POST content is retained if the modification merely
-  involves a change in fragment for the URL.  Otherwise, the modified URL
-  (if it has an http scheme) will be submitted with method GET and no POST
-  content.  If the ECGOTO command is not cancelled, or not simply a fragment
-  change, the modified URL will be added to the 'g'oto buffer, and can be
-  re-accessed, to edit further, via the GOTO command.  See the updated online
-  'h'elp for more information. - FM
-1997-02-10
-* Amplified the comments concerning deletion of prototypes for MultiNet
-  socket library functions as they get added to MultiNet's own headers
-  in newer versions of it's socket library. - FM
-* Added a missing fclose() in post_article() of HTNews.c, and added code
-  to delete the temporary file there, so it's gone as soon as we're done
-  with it. - FM
-02-09-97
-* Enhanced the Set-Cookie header parser to handle values that contain
-  spaces but were not enclosed in double-quotes, and to use such
-  quoting or not when sending Cookie headers, depending on whether
-  this was done in the Set-Cookie header.  Also added anti-crash
-  checks should the parser's efforts to handle both historical (a.k.a.
-  original Netscape) cookies and Version 1 cookies go awry (does deal
-  successfully now with all the cookies which had been reported as
-  problematic). - FM
-* Mods of the screen handling in LYNews.c for cleaning up any screen
-  trash created by the external editor. - FM
-* Tracked down an uninitialized pointer in LYNews.c that probably was
-  behind reports of crashes when posting to newsgroups. - FM
-* Plugged a memory leak in LYMainLoop.c. - TJC
-* Added posting ability to the news gateway, in lieu of the previous,
-  variably reliable, use of a spawned news client for posting.  The
-  news, nntp, and snews URLs now all return links for posting new
-  messages or followups (replies) to the server from which a newsgroup
-  listing or news article was retrieved, unless the server indicates
-  that it does not accept posts from the site at which Lynx is running.
-  See the updated INSTALLATION, userdefs.h, and lynx.cfg files, the
-  "USENET News posting" section of the Users Guide, and "Supported URLs"
-  page of the online 'h'elp for more information.
-* Fixed typo for e-dieresis in the KOI8-R charset. - AJF
-* Replaced an inappropriate _user_message() call in HTConfirmCookie()
-  of HTAlert.c with a _statusline() call.  The original code could
-  cause crashes with some cookie values. - FM
-02-06-97
-* Added support for both hex escaped and unescaped white characters
-  in lynxexec and lynxprog URLs.  Normally, Lynx strips out any white
-  characters that are not hex escaped in attribute values that are
-  to be resolved as URLs, on the assumption that they were derived
-  from wrapping in the markup.  Any serial white characters in
-  lynxexec and lynxprog URLs are condensed to one space (' '), and
-  any lead or trailing white characters are trimmed.  Note that we
-  still require hex escaping of spaces in mailto URLs, e.g,
-  HREF="mailto:lynx-dev@sig.net%20(I%20found%20a%20bug.)". - FM
-* Removed the 'e' switch from tar commands in LYLocal.c for greater
-  portability across all supported Unix flavors. - FM
-* Expanded the information in the PROBLEMS file on how to deal with
-  DECC and MultiNet header incompatibilites for different combinations
-  of the VMS compiler and socket library versions. - FM
-* Added TRACE message of the edit command created for the system()
-  call in LYEdit.c. - LWV
-* Fixed a typo in the userdefs.h comments. - NHE 
-02-04-97
-* Mod in LYMainLoop.c to bypass mailing "not found" messages when
-  MAIL_SYSTEM_ERROR_LOGGING was set TRUE (which it should NOT be,
-  indescriminately) if the document's owner is the lynx-dev list. - FM
-* Added crash protection checks for the actual presence of anchors
-  in all HText structure anchor scans in GridText.c, based on a crash
-  report and suggested fix for one of them from Jonathan Sergent
-  (sergent@hillres55-129.cc.purdue.edu). - FM
-* Eliminated the typecast for ttytype (apparently varies across flavors,
-  and each flavor should know it's own typing; we'll see) in LYCurses.c,
-  and moved VMS system definitions with non-ANSI conformant tokens to a
-  separate header for VMS (LYVMSdef.h). - BL
-* Made the description of HISTORY in the 'k'eymap page more clear that
-  it invokes a list of the "suspended" documents currently held in the
-  history stack. - DC
-* Typo fixes in the help files and lynx.cfg. - LWV
-02-03-97
-* Today's distribution is a pre-release of v2.7.  The projected official
-  release date is 02-15-97.  All header, help and documentation files,
-  and the top directory name, have been updated for v2.7. - FM
-* Made xli, which is freeware, the default XLOADIMAGE_COMMAND for Unix
-  in userdefs.h (still xv on VMS, since its port is freeware), and
-  expanded the "self-documentation" to indicate where to get this
-  freeware.  Added XLOADIMAGE_COMMAND as a configuration symbol in
-  lynx.cfg, so that the compilation default can be overridden on
-  systems which have and prefer xv (all users can override the default
-  mappings for image helper apps via their mailcap files) - FM
-* Added a -base command line switch which can be used with -source or
-  -mime_header to prepend the request URL as a comment, and a BASE tag
-  (which may or may not be the same as the request URL, depending on
-  HTTP/1.1 headers) for text/html documents, equivalent to the prepend
-  kludge for 'd'ownloads (see 09-20-96 mods). - FM
-* Added a check for an "ORGANIZATION" environment variable for inclusion
-  as a news post header on Unix (all system logicals intended for news
-  post headers automatically are included on VMS), and a sleep() before
-  restoring curses mode after the post, to allow reading of any error
-  messages from the news software. - FM
-* Fixed bug which yielded a "[LINK]" instead of "[INLINE]" pseduo-ALT
-  for ALT-less IMG tags used as the content for NAME-ed Anchors without
-  an HREF. - FM
-* Portability tweaks for the mini inews utility. - FM
-* Fixed an old and irrelevant typo in HTWriter.c. - JS
-01-29-97
-* Added more REL tokens that are acceptible for banner links. - FM
-* Ifdef'ed the standard foo_PATH definitions for FreeBSD at the bottom of
-  userdefs.h, based on a patch from AAC, and assuming they also apply for
-  NetBSD, BSDI, and Linux (we'll see 8-). - FM
-* Added make freebsd-slang target. - AAC
-01-28-97
-* Mods of LYSetCookie() to ensure setting of 443 as the default port for
-  https URLs, and force the secure flag on for https URLs whether or not
-  the Set-Cookie header had a secure parameter (too many Version 0
-  cookies don't, when they should). - FM
-* Removed -ltermcap from make for all ncurses targets. - FM
-* Tweaks of make for FreeBSD. - AAC
-* Use SLtt_get_screen_size() instead of the apparently less portable
-  code for slang in size_change() of LYUtils.c. - JED
-01-27-97
-* Made ALT a synonym for VALUE in INPUTs with TYPE="image" to cooperate
-  with well-intentioned (though misinformed) providers who use ALT instead
-  of VALUE for the benefit of text clients or GUIs with image handling
-  turned off. - FM
-* Modified the code for submission of form content with TYPE="image" NAME-ed
-  INPUTs that have a VALUE (or ALT) to "fake" a 0,0 coordinate pair, as when
-  a VALUE (or ALT) is absent, instead of sending a single name=value pair.
-  Requests that using a name=value pair in such cases to indicate that the
-  submission was from a text client or GUI with image handling turned off
-  be included in the HTML specifications keep falling on deaf ears, so we
-  may as well "fake" something closer to what the CGI scripts are expecting,
-  and hope that the script interprets 0,0 as an indicator that the user did
-  not see the image and make a conscious choice within it.
-* Added code to offer a link for the SRC of the image in INPUTs with
-  TYPE="image", distinct from the submit button, when clickable images
-  is on. - FM
-* Updated the "HTML Forms" section of the Users Guide. - FM
-* Fixed a typo in the parsing of Cache-Control MIME headers and META
-  directives. - FM
-01-25-97
-* Updated lynx_help_main.html, about_lynx.html and about_lynx-dev.html. - FM
-* Mods to indicate a toolbar by a '#' preceding its first link when the
-  toolbar is being displayed, and to indicate the availability of a toolbar
-  by a '#' in the top, left-hand corner of the screen when the toolbar is
-  not being displayed.  Added explanation of this in the online 'h'elp. - FM
-* Indicate the 'allow' setting (always, never, or via prompt) for each
-  domain in the Cookie Jar Page. - AK
-* Don't delete cookie-less domains silently during garbage collections if
-  they have their 'allow' set to always or never. - AK & FM
-* Added ability to change the 'allow' settings for domains via the Cookie
-  Jar Page. - FM
-* Added basic protection against "denial of service attacks" by limiting
-  a domain to 50 cookies, the total number of stored cookies to 500, and
-  the maximum processed size of a cookie to 4096 bytes. - FM
-* SGML escape any ampersands or angle brackets in the cookie names, values,
-  parameters, and comments when creating the HTML stream for the Cookie
-  Jar Page, and only include entries for comments if they were present in
-  the servers' Set-Cookie headers. - FM 
-* Updated the online 'h'elp for cookies. - FM
-* Removed -DNO_KEYPAD from all ncurses targets in the Makefile. - FM
-01-23-97
-* Added a "Lynx State Management (Me want cookie!)" section to the Lynx
-  Users Guide, and a cross-linked cookie_help.html file for the Cookie
-  Jar Page. - FM
-* Added prompting for whether to show the body of a 401 status reply or
-  simply return to the current document when an activated link requires
-  authentication via a username and password, and the user has none for
-  that realm, or forgot them. - FM
-01-22-97
-* Added handling of expires attribute values in Version 0 (a.k.a. Netscape)
-  Set-Cookie MIME headers or META tags, and added "Maximum Gobble Date"
-  entries in the Cookie Jar Page which indicate the maximum intended age
-  for each cookie based on the Version 0 expires or Version 1 max-age
-  attribute values. - FM 
-* Added an LYmktime() function in LYUtils.c which accepts strings in the
-  format "Day, dd-Mon-yy hh:mm:ss GMT" or "Day, dd Mon yyyy hh:mm:ss GMT",
-  parses and converts them to time_t format (seconds since 00:00:00 Jan 1
-  1970), and returns the time_t value, or zero if the date is in the
-  past.  It is used for handling Expires headers or attribute values. - FM
-* Added parsing of Cache-Control and Expires MIME headers and META tags
-  sufficient to determine whether the no_cache element should be set in
-  the document's structures. - FM
-* Eliminated the "; $Path=foo; $Domain=blah" attr=value pairs when sending
-  Version 0 (a.k.a. Netscape) cookies in request headers, because too may
-  CGI scripts in the real world have brain-dead parsers and fail when they
-  are included. - FM
-* Added handling of Set-Cookie directives in META tags. - AK
-01-20-97
-* Added confirmation prompts for deletions from the Cookie Jar, expanded
-  the garbage collecting for expired cookies, debugged and implemented the
-  code for security checks based on lead and embedded dots in domain values
-  and host prefixes as described in Section 4.3.2 of the -05 State Management
-  draft, added requirement for https URLs (direct, or via proxy) to include
-  cookies which have the secure flag set in request headers, and extensively
-  annotated the cookie support code for ease of further development. - FM
-* Added ability to set SHOW_CURSOR in lynx.cfg, to override the compilation
-  setting in userdefs.h, and made the -show_cursor command line switch a
-  toggle for the compilation or configuration default. - FM
-01-18-97
-* Bug fixes and memory leak plugs for the cookie support.  Added ability
-  to delete individual cookies or entire domains via the Cookie Jar Page
-  (Ctrl-K).  The domains and cookies are displayed as DL/DT/DD blocks,
-  with links for each domain and cookies name.  The deletions are done
-  by activating those links, which can be numbered, so it should be OK
-  for blind users. - FM
-* Tweaks of the news/nntp/snews gateway. - FM
-* Tweaks of paragraphing if ADDRESS, BANNER, BLOCKQUOTE, BQ, FN, MARQUEE
-  or NOTE blocks are nested (note that nesting does not yield progressive
-  indentations of these blocks). - FM
-01-16-97
-* Added "first pass" cookie support based on patches from Andrew Kuchling
-  (amk@magnet.com).  Still needs work (see comments at top of LYCookie.c).
-  A SET_COOKIE symbol in userdefs.h and lynx.cfg determines whether cookie
-  support will be on or off by default, and the default can be toggled
-  via a -cookies command line switch.  When on, Set-Cookie headers invoke
-  confirmations with possible replies of 'Y'es or 'N'o for that cookie,
-  'A'lways, to accept all cookies from that domain, or ne'V'er to never
-  accept cookies from that domain.  The Cookie Jar can be examined via
-  the COOKIE_JAR keystroke command, mapped by default to Ctrl-K.  The
-  Cookie Jar, and any 'A'lways or ne'V'er settings, do not presently
-  outlast the Lynx session. - FM
-01-14-97
-* Added use of DEFAULT_INDEX_FILE or the URL from an -index=URL command
-  line switch as the the HREF for a banner LINK with REL="Index" and no
-  HREF of its own (see the 01-01-97 mods and the HTML Banners section of
-  the Lynx Users Guide). - FM
-01-13-97
-* Tweaks of the news gateway. - FM
-* Added "Negotiate: trans" header for GET and HEAD requests.  Shouldn't
-  be necessary to get 300 instead of 406 replies when nothing matches
-  the Accept and Accept-foo request headers, but some HTTP/1.1 servers
-  apparently want it when the UA declares itself as HTTP/1.0, as Lynx
-  still does. - FM
-01-12-97
-* More updates of the online 'h'elp files. - FM
-* Simplified the code for checking whether a startfile is a bookmark file
-  entered as a URL instead of invoked via the -book switch.  The previous
-  code was tripping up some versions of the osf and linux compilers. - FM
-01-10-97
-* Replaced the realloc() in split_line() of GridText.c with a calloc(),
-  memcpy(), FREE() sequence for all systems, not just AIX and ultrix,
-  based on analysis of memory wastage by Hans Reiser
-  (dl9rdz@cip.e-technik.uni-erlangen.de). - FM
-* Tweaks of the body= handling in mailto URLs. - FM
-* Tweaks of the ftp gateway. - FM
-* Restored inheritence when resolving versus a base with the same scheme,
-  because the RFC1808 and Fielding Draft behavior of not doing so yields
-  too many failures in the real world (sigh...). - FM
-01-09-97
-* Ugh!  The distribution zip still had the Nov 4, 1996 HTTCP.c instead of
-  the one I modified on Christmas.  No wonder people were still reporting
-  the wrong messaging with -DNSL_FORK.  The right HTTCP.c is in there
-  now. - FM
-* Mods to resolve the HREFs for LINKs with REV="made" or REV="owner"
-  versus the base (a many, many year old bug finally caught 8-). - FM 
-* Added HTAlert messages about BASE HREF vaules, Location header values,
-  and Refresh URL values that were not received as absolute URLs.  We
-  still resolve them versus the RequestURI, since that's invariably
-  what is intended, and thus the optimum "error recovery" strategy. - FM
-* Added handling of cc= and body= fields in ?searchpart strings of mailto
-  URLs.  They are described in draft-hoffman-mailto-url-00.txt recently
-  posted to the URI-WG list.  This draft ignores the objections which have
-  been filed about changing the semantics of mailto and breaking clients
-  which are fully conformant with the mailto specs in RFC1738, instead of
-  using a new scheme name (e.g., smtp:) for URLs with mail headers, and it
-  extends the ill-advised use of '&' as puctuation in URLs instead of
-  honoring the previous IETF effort to seek it's replacement by ';' as the
-  URL name=value separator and, in effect, treating them as parameters
-  without need to worry about confusions with entities when the URLs are
-  attribute values in text/html.  However, the chairman of the URI-WG is
-  a co-author of this draft, so, sigh...  As far as this Lynx code is
-  concerned, the mods are more "error recovery" to cope with the sad things
-  which have afflicted the Web during the past 2-3 years, and use of a
-  ?searchpart in mailto URLs is still DISadvised.  Lynx uses only subject=,
-  cc=, and body= fields from a ?searchpart, using it's own "safe" rules for
-  other mail headers, and ignoring ones other than those three in the
-  ?searchpart as "unsafe".  The cc= values in a ?searchpart are added to
-  the primary address as a comma-separated list for the mail agent, and
-  Lynx's own Cc: is that entered, optionally, by the user.  Any body= field
-  is passed to the external editor, if one has been defined, for review and
-  possible modification.  Otherwise, it is scrolled for review.  The mailing
-  can be cancelled at any time (via Ctrl-G), and via a statusline prompt
-  after everything has been reviewed, if the user judges the body and/or
-  addresses to be unsafe or inappropriate. - FM
-* Moved information and prompt strings in LYMail.c to installer-modifiable
-  symbols in LYMessages_en.h. - FM
-01-07-97
-* Eliminated forced exits for keyboard input buffer overruns on VMS.
-  There's no perfect way to deal with it, but Lynx should recover
-  gracefully most of the time now, and do nothing bad if ungraceful. - FM
-* Added handling of Content-Base and Content-Location MIME headers when
-  'd'ownloading, 'p'rinting, or mailing HTML source.  For this, as
-  for rendered HTML streams (see 01-06-97 mods) the base is determined
-  according to HTTP/1.1 rules:  If a Content-Base header was received,
-  that's the base.  Otherwise, if a Content-Location header was received
-  and it's an absolute URL, that's the base.  Otherwise, the URL used
-  to retrieve the document is the base.  When actually rendering, any
-  BASE tag in the document overrides the base derived from headers.
-  When 'd'ownloading, or outputting HTML source for a 'p'rint option,
-  an X-URL comment with the URL used to retrieve the document and a
-  BASE tag with the header or URL-derived base are inserted at the top
-  of the document.  These should be moved down into the actual HEAD
-  section to make the HTML fully legal, but will work as is if the
-  output is used in conjunction with automatic invocation of Lynx or
-  Netscape as a text/html helper application.  When mailing with an
-  SMTP-conformant mailer, the actual URL used to retrieve the document
-  is indicated via an X-URL header, and for HTML source, a Content-Base
-  and a Content-Location header are included, set to what was actually
-  received by Lynx via MIME headers, or to the retrieval URL. - FM
-01-06-97
-* More updates of the online 'h'elp.  The Visited Links Page ('V'),
-  multi-bookmark file support, REL/REV and META enhancements, and new
-  switches are now all fully documented in the 'h'elp. - FM
-* Added handling of Content-Base and Content-Location MIME headers for
-  rendered HTML streams (still using the document's URL in the 'd'ownload
-  and 'p'rint (and mailing) BASE prepending kludge). - FM
-* Added code to avoid getting tripped up by double-quoted header values
-  in HTMIME.c.  We still need more sophisticated parsing of possibly
-  compound HTTP/1.1 headers, but we don't yet use any of those. - FM
-* Tweak of the efficiency mods for command line parsing in LYMain.c. - FM
-* Simplified some code in LYMainLoop.c that was tripping up the AIX32
-  compiler. - FM
-01-04-97
-* More updates of the online 'h'elp. - FM
-* Added DIRED_MENU support for .tgz files as for .tar.gz files. - FM
-01-03-97
-* Made the command line parsing in LYMain.c more efficient. - FM
-* Added -nopause switch for setting InfoSecs, MessageSecs, and AlertSecs
-  to zero.  Can be used to eliminate forced statusline pauses during
-  traversals. - FM
-* Mods to allow absolute zero quality values for Accept headers, so that
-  in mailcap files users can do things like map image/* to a helper app
-  but exclude particular image subtypes which the app can't handle by
-  assigning q=0 for that subtype.  HTTP/1.1 still specifies 4 significant
-  figures for quality values, so if the value is non-zero, Lynx still
-  forces a minimum of q=0.001. - FM
-* Typo fixes in lynx.cfg. - LWV
-01-02-97
-* Updates of the online 'h'elp files. - FM
-* Made the parsing of lynx.cfg in LYReadCFG.c more efficient. - FM
-01-01-97 -- Happy New Year!
-* More partial/relative HREF resolving enhancements.  Everything is now
-  handled as recommended in Larry Masinter's -03 revision of Roy Fielding's
-  -02 URL ID, except file and ftp URLs (which Lynx handles as described
-  in the online 'h'elp ).  Note, though, that Lynx handles known schemes
-  on a scheme-by-scheme basis, and for schemes that involve substitutions
-  of "/" for a NULL/zero-length path, Lynx inserts the "/" at the resolving
-  stage, so those slashes are present where the Fielding test suite doesn't
-  indicate them, but the actual requests sent to servers (or bad URL message
-  if it's a scheme that requires a host field and doesn't have a default)
-  will be the same.  Note, also, that Lynx sends only the  path<?searchpart>
-  ("absolute path") in it's direct http requests and indicates the host of
-  the URL in the Host:  header, i.e., sends the absolute URL only to proxies.
-  Note, as well, that Lynx treats a zero-length attribute value for an HREF,
-  SRC, etc. as a reference to the currently displayed document, but still
-  uses the base (which might not be the current document's address) as the
-  default for FORMs without an ACTION specified, or ISINDEX tags without
-  an HREF or ACTION specified. - FM
-* Expanded REL/REV handling.  All of the REL values in the (expired) Maloney
-  and Quin draft-ietf-relrev-00.txt ID which make sense for banner links in
-  Lynx have been added.  For REL="Help" without an HREF in the LINK, Lynx
-  uses its helpfile URL.  For REL="Home" without an HREF in the LINK, it
-  uses the configuration startfile or WWW_HOME URL (i.e., not a startfile
-  specified on the command line), or the command line homepage, if it was
-  specified. - FM
-* Added handling of fragments in conjunction with URL expansion guessing for
-  startfile, homepage and 'g'oto strings.  Note that any '#' that is not a
-  fragment delimiter should be hex escaped (%23), and ideally all reserved
-  or unsafe characters will be hex escaped in the user-entered string, though
-  you can get away with not using the hex codes for most others, depending on
-  their positions in the string.  Also note that on VMS if you include the
-  version for local files it must precede the fragment (e.g., foo.html;3#frag)
-  as for parameters. - FM
-12-26-96
-* Mods of HREF resolving to be more consistent with the latest IETF draft
-  (http://www.ics.uci.edu/pub/ietf/uri/draft-fielding-url-syntax-02.txt).
-  Most importantly, lone fragments (HREF="#fragment") are resolved versus
-  the current document's URL, and no longer versus the BASE, if present.
-  There are a few things in the draft which are at odds with what virtually
-  all currently deployed browsers do, and so I stuck with the "deployed"
-  behavior.  Try the tests in  http://www.ics.uci.edu/~fielding/url/  to
-  see where Lynx still differs from the draft. - FM
-* Tweaks of 'z'ap handling. - FM
-12-24-96
-* Tweaks of DIRED_SUPPORT and make for osf. - FM
-12-23-96
-* Added code to check if the startfile has BOOKMARK_TITLE as its title,
-  and if so, and it's in the bookmark file list, add the bookmark element
-  and reload to have it treated as if it were invoked with -book. - FM
-12-21-96
-* Added code for the DIRED_MENU command ('f' and 'F' by default) to invoke
-  CSwing on VMS if CSWING_PATH is defined, as explained in userdefs.h and
-  lynx.cfg . - FM
-12-20-96
-* More improvements in the fatal error and memory exhaustion handling, and
-  plugging of memory leaks. - FM
-* Changed "newline" to "Newline" in LYMainLoop.c to deal with another
-  reported, ill-advised, macro in the AIX 4.2 curses.h. - FM
-* More tweaks of lynx.cfg. - FM
-12-19-96
-* Improvements in the messaging and cleanups for aborts on fatal errors
-  and exits on memory exhaustion. - FM
-* Worked v2.1 of lpansi.c into the distribution. - FM
-* Modified lynx.cfg to reflect the compilation defaults consistently, and
-  changed the compilation default for SUBSTITUTE_UNDERSCORES to FALSE. - FM
-* Changed the "lines" element to "Lines" in the HText structure and the
-  "tab" structure name to "Tab" to cope with some unwise employee reportedly
-  using all lower case "lines" and "tab" strings as macros in the AIX 4.2
-  curses.h. - FM
-12-17-96
-* Restored use of the -l format in the parent links of local Unix directory
-  listings if LONG_LIST is defined, without the v2.6 bug of creating strange,
-  trailing relative or escaped strings.  As far as I can tell from exercizing
-  them, the DIRED_SUPPORT and LONG_LIST handling are now fully debugged
-  (famous last words...  8-). - FM
-12-16-96
-* Don't reiterate parent links in local directory listings.  They are
-  offered only in the top, up to parent link if NO_PARENT_DIR_REFERENCE
-  is not defined. - FM
-* Moved more HTML.c functions to LYCharUtils.c. - FM
-* Tweak of META handling, which was causing crashes (due to freeing an
-  anchor structure prematurely in the 12-13-96 mods for moving HTML.c
-  code to LYCharUtils.c). - FM
-* Block Unix relative path strings in lynxexec and lynxprog URLs. - DT
-12-14-96
-* Added a COLLAPSE_BR_TAGS compilation and configuration symbol for
-  determinining whether Lynx collapses serial BR tags.  Note that the
-  valid way to create extra blank lines in HTML is with PRE blocks that
-  contain only newlines. - FM
-* Fixed a longstanding glitch in the alignment handling which could
-  cause a Paragraph's ALIGN value to cross embebbed blocks, rather than
-  restoring the appropriate alignment for the outer division or block
-  on close of the embedded block. - FM 
-* Modified HR handling so that it inserts the same before and after
-  spacing regardless of whether P end and/or start tags are present
-  before and/or after the HR. - FM
-* Don't insert the bookmark file description and filepath if multiple
-  bookmark file support has been turned off, and this is the default
-  bookmark file (but they will still be inserted if it's not the default,
-  e.g., if it's another bookmark file viewed before the support was
-  turned off, and retrieved as a previous document). - FM
-12-13-96
-* Added parsing of Content-Disposition in META tags and setting the
-  suggested file name if  file; filename=name.suffix  is in the value
-  of the Content attribute and we don't already have that via a server
-  header. - FM
-* Incorporated almost all globals related to stream parsing and page
-  display in HTML.c and GridText.c into the HTML object structure and
-  HText structure to make the parsing and display functions more nearly
-  re-entrant, and moved several functions from HTML.c to LYCharUtils.c
-  to reduce the size of HTML.c. - FM
-* Added -cckr to the libwww Makefile compiler options for SGI. - Carl
-  Buxbaum (crb@world.std.com)
-* Fixed typo in LYMainLoop.c that affected the 'd'ownload command when
-  DIRED_SUPPORT is enabled. - FM
-12-10-96
-* Implemented Safe header handling and prompting about resubmissions of
-  forms with method POST along the lines described in the 24-Nov-96 IETF
-  ID: http://gewis.win.tue.nl/~koen/draft-holtman-http-safe-01.txt
-  Lynx prompts for confirmation whenever it detects that a resubmission
-  would occur, unless the previous reply included "Safe: yes".  Prompts
-  always will occur if the -resubmit_post toggle is on (since resubmission
-  always would occur; not advised).  If not toggled on, resubmissions
-  would occur when no_cache is set or the previous reply has been dumped
-  from the cache.  When using the PREV_DOC command or History Page, if
-  confirmation is not obtained, Lynx will skip to the yet earlier document,
-  or cancel, as appropriate. - FM
-* Added parsing of the Safe header in HTMIME.c, and added a safe element
-  to the anchor and document structures.  Will be FALSE unless a Safe
-  header is received that specifies "YES" or "TRUE" (case-insensitive,
-  only "YES" is in the specs), and applies only to replies from form
-  submissions with the POST method. - FM
-* Cleanup of code in HTAccess.c.  May correct problem of crashes for
-  ISINDEX searches on some systems, though I couldn't reproduce that
-  problem here. - FM
-12-09-96
-* Added an HTSetPresentation() for image/x-xbitmap in HTInit.c when DISPLAY
-  is set. - FM
-* Added an LYOutOfMemory boolean that is set by the outofmem() macro, and
-  code in the Unix FatalProblem() and VMS exit handler for reporting the
-  memory exhaustion instead of the misleading "bug" message when they are
-  invoked due to memory exhaustion.  May not be reported reliably for
-  linux, because for some reason I don't understand, the SIGBUS trapping
-  is ifdef'ed out for linux in LYMain.c. - FM
-* Fixed typo in the new LYAddVisitedLink() in LYHistory.c of yesterday's
-  mods. - KW
-12-08-96
-* Added a VLINKS command, mapped by default to upper case 'V', and code
-  for creating a list of all links 'V'isited during the current Lynx session
-  in order of recency (most recent highest in the list).  Lower case 'v' is
-  still mapped to VIEW_BOOKMARKS.  The VLINKS listing is complementary to
-  the History Page listing, and formatted similarly.  It excludes POST
-  replies, and bookmark, menu and list files (use the History Page or
-  direct keystroke commands for those).  It includes any links that were
-  downloaded, or passed to a helper app (except mailto and newsreply or
-  newsfollowup links, since those require activation in the original
-  document for proper inclusion of it in the email message or news
-  post).  You can print the Visited Links Page, or 'd'ownload it via
-  the History Page. - FM
-* Added reporting of the Charset parameter, if present in a server reply
-  header, META tag, or by virtue of a suffix map, to the showinfo ('=')
-  display. - FM
-12-07-96
-* Added 'p'rint menu support for the History Page. - FM
-* Added a content_length element to the anchor structure and use that,
-  if a Content-Length header has been received, to indicate the total
-  bytes in the statusline when receiving the stream. - FM
-* Include HTTP_ACCEPT_LANGUAGE in the lynxcgi environment. - David Trueman
-  (david@cs.dal.ca).
-12-06-96
-* Many more cleanups and commenting of the code for the benefit of new
-  developers. - FM
-* Tweaks of URL parsing and path simplifications.  Added simplification
-  of the file://localhost paths from startup and 'g'oto guesses. - FM
-* More anti-crash protections for bad HTML in SELECT blocks. - FM
-* Usability enhancement for DIRED's 'F' menu: list number and names of
-  (some of) the tagged items, and provide a way to untag all items. - KW
-* Force screen refresh after a DIRED system command has failed. - KW
-* Modified HTFile.c to handle relative and "Up to parent" links more
-  effectively. - KW
-* Added KEYGEN to the DTD (but no code to do anything with it yet). - FM
-12-05-96
-* Fixed typo in the for-Unix section of LYAddPathToHome() that was added
-  yesterday in LYUtils.c. - James Troup (J.J.Troup@comp.brad.ac.uk)
-12-04-96
-* Numerous cleanups and commenting of the LYfoo.c and LYfoo.h modules,
-  for the benefit of new Lynx developers. - FM
-* More security-related enhancements and polishing up of the multiple
-  bookmark file support. - FM
-* Increased the sizes of MAXHIST and MAXLINKS, added statusline messages
-  should they ever be exceeded (not likely now 8-), and code for freeing
-  all excess pointers on each page draw instead of letting them grow and
-  freeing them on exit (should help for memory-limited systems 8-). - FM
-* Tweaks of DIRED_SUPPORT. - KW
-12-02-96
-* Show nntp server status messages in group listings when not 221 (normal
-  reply to HEAD request), so the user will know that the articles are
-  not available from the server, rather than a bug in Lynx. - FM
-* Tweaks of BASE resolving. - FM
-* Added "trick" to send hostname guesses to stdout when the startfile or
-  homepage are not URLs, as we send to the statusline for 'g'oto guesses
-  (but don't use stdout if we are not interactive and the desired output
-  is going to stdout).  If the DNS lookup stalls, one thus can Control-C
-  out, instead of wondering why Lynx is taking so long to start up. - FM
-* Cleaned up the read_rc() and save_rc() functions in LYrcFile.c. - FM
-* Eliminated all printw() calls to avoid problems with non-ASCII and/or
-  multibyte/CJK characters. - FM
-* Numerous additional bug fixes and enhancements of the multiple bookmark
-  file support. - FM
-* Got rid of the ADVANCED_MULTI_BOOKMARKS symbol now that the choice can
-  be made in the 'o'ptions menu and saved in the .lynxrc file. - FM
-11-30-96
-* Added the ability to set the advanced mode for multiple bookmarks from
-  the options menu and save the defaults in the .lynxrc file - HL
-* Various typo corrections including one which kept LYMainLoop.c from
-  compiling under Unix when DIRED_SUPPORT was defined. - HL
-11-29-96
-* Numerous additional refinements and enhancements of the multiple bookmark
-  support.  Added support for REFRESH and PREV_DOC in the options and bookmark
-  menus, and NEXT_PAGE, PREV_PAGE, and ACTIVATE in the bookmark menus or
-  prompts.  Expanded the anchor and document structures to keep track of
-  different bookmark files in conjunction with VIEW_BOOKMARK, ADD_BOOKMARK,
-  and DEL_BOOKMARK commands, to restore the proper bookmark files on reloads
-  (overt, or because the cache was dumped for subsequent documents accessed
-  via bookmark links), and in conjunction with security-related restrictions.
-  Multiple bookmark support can be regulated via MULTI_BOOKMARK_SUPPORT,
-  BLOCK_MULTI_BOOKMARKS and ADVANCED_MULTI_BOOKMARKS symbols in userdefs.h
-  (or as SITE_DEFS in the Makefile) and lynx.cfg.  The multiple bookmark
-  support can be blocked via a -restrictions=multibook command line switch,
-  which is also set for -anonymous and -validate.  Prompting or display of
-  the bookmark file selection menu occurs only if bookmark files in addition
-  to the startup default have been defined (via the B)ookmark command in the
-  'o'ptions menu, if mu(L)ti bookmarks has been turned on; the setting and
-  definitions can be saved in the .lynxrc file).  Plugged memory leaks in
-  the previous implementation of multiple bookmark support.  Added code for
-  inserting the current description and filepath for each bookmark file
-  dynamically during rendering. - FM
-* Another tweak of attribute order in HTMLDTD.c. - KW
-11-28-96
-* Tweaked multiple bookmark support to fix an error which was causing a
-  crash on some systems and incorrect behavior on others - HL
-* Tweaked editing of multiple bookmark filenames to correct shifting of 
-  screen between multiple pages - HL
-11-26-96
-* Added support for setting the rendering of SELECT OPTIONs as popup menus
-  versus radio button lists via the 'o'ptions menu, and saving the default
-  in the RC file.  Changed NO_SELECT_POPUPS to USE_SELECT_POPUPS in lynx.cfg
-  and userdefs.h.  The -popup switch still overrides everything. - FM
-* Added multiple bookmark support along the lines of the patch from Filip M.
-  Gieszczykiewicz (filipg@paranoia.com), plus numerous enhancements of the
-  'o'ptions menu and bookmark handling. - FM
-* Tweaks of attribute orders in HTMLDTD.h and HTMLDTD.c. - KW
-11-25-96
-* Updated the "Lynx Enhanced Pages" links to the new "Lynx links"
-  (http://www.crl.com/~subir/lynx.html) throughout the help, docs,
-  and code. - FM 
-11-24-96
-* Modified the ENCTYPE="multipart/form-data" handling to indicate the
-  Content-Type with charset parameter, when known, within each part
-  rather than in the main Content-Type header. - FM
-* Corrected typo in HTNews.c. - FM
-* Added support for setting the suggested filename in 'd'ownload and
-  'p'rint options based on the Content-Disposition header if it included
-  the string  file; filename=name.suffix  in its value.  Can be used by
-  CGI scripts to set the suggested filename for saves to disk, downloads
-  or mailings of the script's reply body, so it won't be the last symbolic
-  element in the path field of the form's ACTION (which is normally the
-  the script, itself, or a PATH_INFO element, and thus misleading). - FM 
-* Tweaks of change_sug_filename() in LYUtils.c for better handling of
-  gzipped files on VMS. - FM
-11-23-96
-* Added reporting of the Server, Date and Last-Modified headers, if present
-  in server replies, to the showinfo ('=') display. - FM
-* Added the ability to store the NO_SELECT_POPUPS in the .lynxrc, but the
-  .lynxrc must be edited manually until the options handling is converted
-  to a form-like interface that accommodates more options.  For now, select
-  'O'ptions and write out the options with '>' to create a block in .lynxrc
-  with an explanation of the switch.  The switch is "select_popups" and
-  can have the values of "on", "off", or nothing.  If nothing, the default
-  set in userdefs.h or lynx.cfg will persist.  Otherwise, "on" will set use
-  of popups and "off" will set use of radio buttons as the default.  The
-  startup default always can be toggled via the -popup switch. - HL & FM
-* Corrected a couple of typos in the help files. - HL
-11-22-96
-* Added support for WHEREIS ('/') and 'n'ext searches within SELECT popups.
-  The buffering for 'n'ext is separate from that in the main loop (i.e.,
-  for non-form field document searches), but all previously entered search
-  strings are still combined into a circular buffer and can be accessed via
-  the up-arrow or down-arrow keys at the prompt for a search string.  The
-  searches within popup menus do not yield highlighting of the search string,
-  but simply positioning of the cursor on successive options which contain
-  the search string. - FM
-* Added support for all of the navigation commands within SELECT popup
-  windows, including HOME, END, UP_TWO, DOWN_TWO, UP_HALF and DOWN_HALF,
-  in addition to the single line and paging navigation commands. - FM
-* Added support for the REFRESH command within SELECT popup windows. - FM
-* Tweak of hookless snews handling. - FM
-11-21-96
-* Added handling of forms with ENCTYPE="multipart/form-data".  Note that
-  we still don't support INPUTs with TYPE="file" or TYPE="range", and
-  thus still set the DISABLED attribute for all fields in the form if
-  either of those two TYPEs are present in it. - FM
-* Tweak of -mime_header handling. - FM
-* Typo fixes of comments in HTML.c. - Albert S Woodhull
-  (aswNS@hamp.hampshire.edu)
-11-20-96
-* Added a NO_SELECT_POPUPS compilation (userdefs.h) and configuration
-  (lynx.cfg) definition, normally set FALSE.  If set TRUE, single-choice
-  SELECT blocks (i.e., ones without the MULTIPLE attribute) will be handled
-  as a list of radio buttons instead of via a popup window.  Also added a
-  -popup command line switch for toggling the compilation or configuration
-  setting. - FM
-11-18-96
-* Tweak of LYFindEndOfComment() in LYCharUtils.c. - Brian Borowski
-  (brianb@braille.uwo.ca)
-11-17-96
-* Added links to the lynx-dev hypertext archive at FLORA in the online
-  'h'elp. - FM
-* Tweaks of my_spawn() in LYLocal.c. - KW
-11-16-96
-* Added support for use of the 'd'ownload command on TYPE="submit" and
-  TYPE="image" submit buttons.  You still must use the History Page for
-  TYPE="text" INPUT fields that also act as submit buttons by virtue of
-  being the only non-hidden field, because the 'd'ownload command key
-  could be a text entry into the field, and thus must be treated as
-  such. - FM 
-11-15-96
-* Mods of HTFormat.c and HTTP.c for better handling of unexpected server
-  disconnects. - FM
-11-13-96
-* Wind down the element stack on EOF if any unclosed tags were received. - FM
-* Fixed typos in the HTMLDTD.c BODYTEXT definitions. - FM
-11-10-96
-* More tweaks of hook-less snews handling. - FM
-* Changed the default STARTFILE to http://lynx.browser.org/ and the default
-  HELPFILE to the v2.6 set at NYU in userdefs.h and lynx.cfg. - FM
-* New function HTUnEscapeSome() in HTParse.c for unescaping selected
-  characters in a string.. - KW
-* Numerous changes to make DIRED_SUPPORT work as intended, to use the
-  library's HTList functions and macros for managing the list of tagged
-  file URLs, and to keep track of proper levels of URL escaping so that
-  unusual filenames which contain #% etc. are handled properly.  Can now
-  edit, move, etc. Abc%25252525def.html, #xy#~, etc. - KW
-11-09-96
-* Treat 301 or 302 redirection of a POST as 303 when the Lynx process is
-  non-interactive, rather than rejecting the redirection, since 303 is
-  still most likely what the CGI script actually intends (will still
-  prompt if the process is interactive). - FM
-* Added parsing and trace mode reporting of Content-Disposition headers
-  in HTMIME.c (should be used, someday, to set the suggested file name
-  for disk saves and downloads based on any filename=foo.blah field). - FM
-* Further mods of HTNews.c to facilitate use of Lynx without SSL-hooks
-  in conjunction with an SSL-capable daemon/proxy for snews URLs that
-  returns NNTP streams for Lynx itself to convert into HTML, instead
-  of already converted streams as from a standard proxy. - TZ & FM
-11-08-96
-* Changed information returned by "-version" in LYMain.c to point to
-  lynx.browser.org and added a date to the copyright info. - HL
-11-07-96
-* Mods of HTNews.c to facilitate use of Lynx without SSL-hooks in
-  conjunction with an SSL-capable daemon/proxy for snews URLs. - TZ
-11-05-96
-* Typo fixes in HTMIME.c. - KW
-* Tweak of NSL_FORK mods. - FM
-11-04-96
-* Tweaks of host parsing when a password and/or username is present
-  in override_proxy() of HTAccess.c. - FM
-* Tweaks of the UNDERSCORES and STARS macro setup and useage to avoid
-  possible crashes for FORMs with long values. - FM
-* Worked in Tom Zerucha's (tz@execpc.com) code for fork-based name
-  server lookups that can be 'z'apped.  May not yet be portable to
-  all flavors of Unix.  Add -DNSL_FORK to your SITE_LYDEFS to try
-  it. - FM
-11-02-96
-* Fixed typo in HTAlert.h. - FM
-* Cleaned up HTTCP.c code, simplified some of its spaghetti
-  ifdef'ing, and worked in mods to bypass connection confirmations
-  when Lynx is SOCKSified and the socks_flag is set. - FM
-* Added recognition and acceptance of text/x-sgml and text/sgml
-  MIME types (all that I've encountered thus far work fine with
-  Lynx, though it doesn't yet interpret marked sections). - FM
-* Added socket function prototypes for MultiNet in tcp.h. - FM
-* Mods to facilitate application of the SSL patches (after some
-  corrections in the patches to keep HTLoadHTTP re-entrant, make
-  CONNECT work as intended again, and eliminate memory leaks in
-  the SSLeay adaption) - FM
-* Adding info about -DNO_TTYTYPE in top level Makefile. - FM
-* Use clrtoeol() in LYOptions.c to ensure that no terminals which use
-  reverse video for standout() will have trailing reverse fields on
-  edits of option vaules. - DK
-* Offer user@host instead of WebMaster@host for the 'c'omment command
-  if the path for the URL begins with a tilde and there is no
-  LINK REV="made" present. - FM
-* Tweaks of inews Makefile and clientlib.c. - Christopher R. Maden
-  (crm@ebt.com)
-* Check nhist before attempting a DIRED_SUPPORT directory listing in
-  LYShowInfo.c. - KW
-10-21-96
-* Offer WebMaster@host for the 'c'omment command if no LINK REV="made"
-  was present in a text/html document, and save a known owner URL when
-  toggling to source ('\') so that the 'c'omment command can still be
-  used with that owner's (mailto or homepage) URL, but the source can
-  be included in the comment, as would be desireable (instead of a bad
-  rendering) when sending a comment about bad HTML in the document. - FM
-10-20-96
-* Added code for traversing the pseudo-documents created for client-side
-  image MAPs.  See the updated CRAWL.announce for more information. - FM
-10-19-96
-* Added definitions in LYCurses.h relating curses function calls to slang
-  functions or emulations for compatibility with new versions of slang,
-  based on patch from John E. Davis (davis@space.mit.edu). - FM
-* Added unescaping of the full address fields in mailto URLs or ACTIONs,
-  and improved the reliability of the parsing of the subject header from
-  the ?searchpart Netscapism when present. - FM
-* Give user option to use 303-like coversion of POST to GET in confirmation
-  requests for redirection of POSTs, base on patches from Drazen Kacar
-  (dave@fly.cc.fer.hr). - FM
-* Tweaks of POST content submissions in HTTP.c, based on patch from
-  KW. - FM
-* Fixed EOF checks in HTAAFile.c, HTGroup.c and HTPasswd.c, and improved
-  host address parsing in HTTCP.c, based on patches from Larry Schwimmer
-  (schwim@cyclone.stanford.edu) and Klaus Weide (kweide@tezcat.com). - FM
-* Added targets for umaxv and umaxv-slang for Encore's UMAXV - Thanh Ma
-  (tma@encore.com)
-10-16-96
-* Send the rendering of decompressed files to stdout with -dump, don't
-  spawn a viewer under any circumstances if -dump was used instead of
-  -source for Content-Types that are not text/html, and remove the
-  temporary decompressed files before exiting with -dump or -source. - FM
-* Properly handle TYPE="radio" versus TYPE="checkbox" INPUTs with NULL
-  or zero-length VALUEs. - FM
-* Added a continuation line token for the netbsd-ncurses target - HL
-* Fixed a typo in HTMIME.c in the trace output - HL
-* Block predictable buffer overrun in GridText.c if a page has more
-  than MAXLINKS links in it. - FM
-10-01-96
-* Add a Mime-Version header to the other headers in LYPrint.c so that the
-  09-20-96 mods for mailing source do what they were intended to do. :) -
-  Hamish MacEwan (macewanh@diatp.dia.govt.nz)
-09-20-96
-* Add a BASE tag to the tops of HTML source files, a la Netscape, when
-  mailing or downloading, and don't worry, for now, if that creates
-  technically invalid HTML (since Lynx copes with it as of the 09-15-96
-  mods 8-). - FM
-* Include Content-Type, Content-Location and Content-Base headers when
-  mailing HTML source on Unix. - FM
-* Use .txt versus .html suffixes when submitting rendered versus HTML source
-  temporary files to VMS MAIL, so that transports such as PMDF will indicate
-  the appropriate Content-Type. - FM
-09-17-96
-* Handle illegally positioned BASE tags. - FM
-* Tweak of Q nesting level checks. - Pawel Wiecek
-  (coven@i17linuxb.ists.pwr.wroc.pl)
-* Fixed typo in HTMIME.c for parsing of Pragma header. - Wilson Cheung
-  (wcheung@netcom.com)
-* Added parsing of Set-Cookie header in HTMIME.c (see IETF ID
-  http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-state-mgmt-03.txt
-  for info on how to implement it's use). - FM
-* Fixed typo in LYMainLoop.c for display of error message when up arrow is
-  pressed at the top of a document. - Hiram Lester, Jr. (hwlester@pobox.com)
-09-16-96
-* Use standard ls -l parsing of LIST output for Windows_NT ftp servers in
-  Lynx v2.6 as in v2.5. - FM
-
---- Rename of Lynx2-5FM and release as Lynx2-6  (02-Sep-1996) ---
-    (see CHANGES2-6, CHANGES2-5, CHANGES2-4 and CHANGES2-3)
-==============================================================================
diff --git a/CHANGES.chartrans b/CHANGES.chartrans
deleted file mode 100644
index 85b4e1cf..00000000
--- a/CHANGES.chartrans
+++ /dev/null
@@ -1,204 +0,0 @@
-$Id: CHANGES.chartrans,v 1.6 1997/09/07 17:04:10 tom Exp $
-$ProjectHeader: Lynx 2.7.1ac-0.64 Thu, 11 Sep 1997 20:18:32 -0600 kweide $
-
-1997-09-06
- Lynx 2.7.1ac-0.61
-  Several new translation tables have been added or modified recently,
-  associated code changes.
-1997-07-25
- Lynx 2.7.1ac-0.42
-* Map charsets of the form "ibmNNN<...>" to "cpNNN<...>" in UCdomap.c
-  if not already recognized.  Also recognize "windows-1252".
-1997-07-17
- Lynx 2.7.1ac-0.35
-* Since 1997-06-29 the chartrans code (with minor changes; most relating
-  to functions in LYStrings.c) is part of Foteos Macrides's "fotemods"
-  to Lynx 2.7.1.  This code ("developmet code") has been compared against
-  fotemods.  Some functions renamed to FM's names.
-* Now also include FM's recognition of &xnnnn; character references.
-  In general more detailed change info can be found in CHANGES.new.
-1997-05-15
- Lynx 2.7.1wb+ct-0.26
-* Mods in LYMainLoop.c to not force a cache refresh on a proxy any more
-  when INLINE_TOGGLE, IMAGE_TOGGLE, RAW_TOGGLE are used.  On the other
-  hand, do force a proxy cache refresh after one of the variables relevant
-  for content negotiation `language' or `pref_charset' has been changed
-  from the Options screen, if the current document is from a http, https, or
-  lynxcgi resource.
-* Set HTTP_ACCEPT_CHARSET environment variable for the child process in
-  LYCgi.c if pref_charset is not NULL.
-* Write a META tag with the current display character sets to
-  the files generated for Bookmarks, List, Info, History, and Visited Links
-  pages, so title strings contained in those files will (hopefully) not
-  get erroneously translated again.  Use new function add_META_charset_to_fd()
-  in LUCharUtils for this purpose.
-* makeuctb now sets RawUni to UCT_ENC_8BIT if not otherwise set
-  and if there are char values above 127.
-* Change in HTuncache_current_document() to prevent caching of
-  UCStages info which should be discarded.  Still allow caching for this
-  in the node_anchor for source display, so that a META tag in the parsed
-  HTML can influence the display after using the SOURCE '\' key. - KW
-* Changed display_title() in GridText.c to not rely on sprintf() to get
-  the number of blanks right.  There were problems with C1 characters.
-* Added new lynx.cfg symbols ASSUME_CHARSET, 
-  ASSUME_LOCAL_CHARSET, and ASSUME_UNREC_CHARSET.  They are only
-  recognized if compiled with -DEXP_CHARTRANS.  They correspond to the
-  command line options -assume_charset, -assume_local_charset, and
-  -assume_unrec_charset.
-  The default for ASSUME_CHARSET is iso-8859-1 (corresponding to display
-  character set "ISO Latin 1").  If no ASSUME_LOCAL_CHARSET is set,
-  the explicit or default value for ASSUME_CHARSET will also be used for
-  local files.  ASSUME_UNREC_CHARSET has no default.  See added text
-  in lynx.cfg.
-* Changes in LYCharSets.c to HTMLSetCharacterHandling() and
-  HTMLSetUseDefaultRawMode() to support (hopefully) more consistent
-  and user-friendly handling of raw mode and its default.
-  
-1997-05-03
- Lynx 2.7.1wb+ct-0.20
-  Now always check for LYlowest_eightbit[current_char_set]
-  near the top of HText_appendCharacter(), to prevent writing C1 control 
-  chars to the terminal if they are not valid as displayabable characters 
-  according to the selected "display character set" Option.
-  All this should be handled earlier in processing, and this check may
-  disappear again for testing, but somebody asked for it...
-  Slightly updated some doc files.
-
-1997-04-12
- Lynx 2.7.1wb+ct-0.11
-  Added TRACE output to UCAuto.c
-  Changes in LYMail.c and LYPrint.c to send Content-Transfer-Encoding
-  header and/or charset parameter in mail
-
-1997-04-08
- Lynx 2.7.1wb+ct-0.3
-  New translation tables def7_uni and koi8r_uni.  Use them.
-  Table def7 is based on RFC1345 and mnemonic,ds from ftp://dkuug.dk/i18n/
-  and previous Lynx replacements in LYCharSets.c and some IPA FAQ
-  convention and stuff for Ethiopic and KOI8-R.  It maps many of
-  the accented Latin characters to their unaccented counterparts.
-  Make def7_uni default table and associate it with us-ascii and
-  "7 bit approximations".
-  Lots of new entities from Hynek Med finally integrated.
-  Those include ascii characters and characters common between
-  Latin1 and Latin2.  Let's see what happens.
-  Added mappings for some "smart quote" characters to several
-  translation tables.
-  Make makeuctb slightly more flexible (accept Unicode range for
-  mapping to single code point).
-  Also changes for &Dstrok;, ETH;, and &eth; in LYCharSets.c.
-  These are basically just data changes; code still hasn't progressed
-  much, so for example translation of ALT strings (from anything but
-  iso-8859-1) still doesn't work.
-
-1997-03-20
- Lynx 2.7ac-0.20
-  merged with FM's 27bugfixes up to 1997-03-20
-
-1997-03-20
- Lynx 2.7ac-0.9
-  merged with FM's 27bugfixes up to 1997-03-17; adapted part of
-  FM's change re trademark character to the present chartrans code,
-  as follows:
-* Modified SGML.c to handle the numeric character reference &#8482; as
-  the named entity &trade; also in the non-chartrans case.  The
-  trademark character (given by &#8482; or &trade;) will be shown as
-  "(TM)" as the ASCII substitution unless the current display character
-  has a code point for the trademark character or unless overridden by a
-  chartrans translation table. The code of 1997-02-25 prevented showing
-  the trademark sign as "(R)" but did not work in all non-chartrans
-  cases. - KW
-
-1997-03-12
- Lynx 2.7ac-0.6
-  some doc changes, make compilation in src/chrtrans less verbose,
-  no more *.h_old backup copies.
-
-1997-03-12
- Lynx 2.7ac-0.5
-  patch from Tom Dickey for refinement of SVr4 (ncurses) color support
-
-1997-03-11
- Lynx 2.7ac-0.4
-  New patches from Wayne for Win32/DOS applied.
-
-1997-03-11
- Lynx 2.7ac-0.3
-  today's 27bugfixes also merged in.
-
-1997-03-11
- Lynx 2.7ac-0.2
-* Merged code from Thomas E. Dickey and Jim Spath for auto configuration
-  and simple (SLang-like) curses color, which was based on 2.7wb+ct-0.4,
-  with 27bugfixes up to 1997-03-10.
-
-1997-03-03
- Lynx 2.7wb+ct-0.4
-* (chartrans) Minor cleanups (makeuctb.c, chrtrans/Makefile, HTPlain.c)
-  to enable successful compilation on Win32.
-  Also changes and new files from Wayne to fix FTP and enable Mail for Win32,
-  and to compile chartrans code.
-
-1997-03-03
- Lynx 2.7ct-0.8
-  Lynx 2.7 chartrans + 27bugfixes up to 1997-03-02
-
-1997-02-28
- Lynx 2.7ct-0.7
-  Lynx 2.7 chartrans + 27bugfixes up to 1997-02-28
-  small correction in SGML.c (set_chartrans_handling)
-
-1997-02-27
- Lynx 2.7ct-0.6
-  Lynx 2.7 chartrans + 27bugfixes up to 1997-02-26
-
-1997-02-26
- Lynx 2.7ct-0.5
-  minor tweaks for packaging
-
-1997-02-26
- Lynx 2.7ct-0.4
-  Ok, now really remove local configuration changes (for distribution)...
-
-1997-02-25
- Lynx 2.7ct-0.3
-  merged with Fote's 27bugfixes up to 1997-02-25
-
-1997-02-25
- Lynx 2.7ct-0.2
-  Removed some local changes from userdefs.h and Makefile.
-  Mapping of U+fffd (replacement) to 0x00 removed from the used
-  iso0x table files.
-
-1997-02-25
- Lynx 2.7ct-0.1
-  Update to work with official Lynx 2.7 distribution.
-  Add showing of effective charset in LYShowInfo.c even if not explicitly
-  given.
-  No showing of (TM) as (R) any more - mostly changes in LYCharUtils.c
-  (but these are independent of the chartrans stuff, translation routines 
-  in LYCharUtils.c still not chartrans-ified).
-  Prefer HTTP-EQUIV over NAME in META tags.
-  Start managing changes with PRCS - the Project Revision Control System.
- 
-1996-12-01
- lynx-patch-2.6ct-0.2.pch
-  Update to work with 11-30-96 Composite Patch.
-  Two new translation tables: cp852, windows-1250.
-  Compiling without -DEXP_CHARTRANS now also works... but one still has to
-  manually remove (comment out) first line of src/Makefile for that.
-  Minor changes to README files, this file.
-
-1996-11-29
- add-to-cp-2.6ct-0.1a.zip - install over Lynx2.6 + 11-28-96 CP.
-  Full files no diffs.
- add-to-offi-2.6ct-0.1a.zip - install over Lynx2.6 to get 11-28-96 CP +
-  chartrans.  Full files, no diffs.
-
- lynx-patch-2.6ct-0.1a.pch
-  Update to work with 11-28-96 Composite Patch.
-
-1996-11-28
- lynx-newfiles-2.6ct-0.1.{zip,tar.gz}, lynx-patch-2.6ct-0.1.pch
-  First packaged and announced.  Works with 11-24-96 Composite Patch
-  from Hiram Lester.
diff --git a/CHANGES.configure b/CHANGES.configure
index db2e7ab2..5f5eda88 100644
--- a/CHANGES.configure
+++ b/CHANGES.configure
@@ -1,3 +1,9 @@
+97-11-12
+--------
+* remove options --with-lss-file and --with-cfg-file, since the corresponding
+  files will always be installed under $(libdir), reported by Hynek Med. - TD
+* modify configure script and makefile templates to permit builds with the
+  --srcdir option, noted by Philippe De Muyter. - TD
 97-11-07
 --------
 * add logic to make install-directories as needed. - TD
diff --git a/CHANGES.new b/CHANGES.new
index 9d235049..93043828 100644
--- a/CHANGES.new
+++ b/CHANGES.new
@@ -7,7 +7,76 @@ platforms see also README.win-386, for some changes for auto-configure and
 simple curses color see also README.configure).  Note that the 2.7 -> 2.7.1
 changes are included here. - KW]
 
-97-11-07
+1997-11-17
+* Changed the default ASCII BOXVERT and BOXHORI definitions from '*' to
+  to '|' and '-', and new function LYbox() for non-VMS (n)curses. - FM
+* Use explicitly specified characters for drawing the corners of popup
+  boxes with non-VMS (n)curses if we have also specified characters for
+  vertical and horizontal lines. - KW
+* Mods in HTTP.c to trim any "LYNXIMGMAP:" leader from Referer header
+  values and strip the #fragment when making http(s) requests via links
+  in the pseudo-documents constructed for MAP elements. - FM & KW
+* Mods of SGML parsing to better handle SELECT blocks with invalid markup,
+  in effect for both TagSoup and SortaSGML parsing (for the latter just
+  in case it doesn't already prevent invalid markup from being passed on). 
+  Only OPTION elements are accepted in SELECT blocks.
+  Otherwise, if the element is a form-related start tag, the
+  SELECT block is closed and the new form-related element is started.
+  All other elements are ignored.  A FORM end or start tag ends any open
+  SELECT block and the current FORM (before starting another FORM if
+  it is a start tag).  Note that we now support SELECT blocks outside
+  of FORM blocks, which some providers are using for "informational"
+  popups, but no Lynx user would do anything that awful, right? - FM
+* Tweak in LYMainLoop.c to override an LYresubmit_posts flag if we are
+  reloading a popped document due to a NOT_FOUND or NULLFILE return
+  value from getfile(). - FM
+  (But if the document that would be loaded after such a failure has POST
+  data and is not in memory, still jump to the PREV_DOC code, see enttry
+  for 1997-11-03. - KW)
+* Worked in a variant of AJL's suggestion of setting LINES and COLUMNS
+  artificially high before the initscr() call with Unix curses, then
+  using a dummy call to size_change() for setting LYlines and LYcols
+  to the actual screen dimensions, so that increases in the screen size
+  during the Lynx session, and not just decreases, can be handled.
+  Note that one still needs to do a RELOAD (^R) overtly to create a
+  new HText structure based on the current screen size. - FM
+  (The new code can be disabled by defining NO_SIZECHANGEHACK, in case
+  some curses version or terminal cannot deal with it. - KW)
+* Tweaks of the chartrans code. - FM & KW
+* Change in HTNews.c to ignore very long bogus newsgroup names when listing
+  available groups. - KW
+* Tweaks in code for highlighting search text in anchors, to better deal with
+  terminals in UTF-8 mode. - KW
+1997-11-15
+* Mods of the TagSoup parser to restore support for the TABLE-in-PRE-block
+  HTML kludge described in http://ppewww.ph.gla.ac.uk/~flavell/tablejob.html,
+  which stopped working in conjunction with the 1997-05-21 mods (see below)
+  for treating TABLEs as DIVisions to support ALIGNment attributes in TABLE
+  markup.  The PRE-in-TABLE-block HTML kludge was not affected by those mods
+  but works only with the TagSoup parsing mode. - FM & KW
+* Added an LINKN command key in the line editor, mapped to Ctrl-V, for
+  invoking the F_LINK_NUM prompt when in form text fields.  Ctrl-V is
+  still a dead key under other circumstances in the line editor. - FM
+1997-11-12
+* Made handling of the 'x' in hexadecimal character references (&#xH;)
+  case insensitive, as for the "alphabetic digits" (a-f, A-F). - FM
+* Added an LINKN command key in the line editor, mapped to Ctrl-V, for
+  invoking the F_LINK_NUM prompt when in form text fields.  Ctrl-V is
+  still a dead key under other circumstances in the line editor. - FM
+* remove options --with-lss-file and --with-cfg-file, since the corresponding
+  files will always be installed under $(libdir), reported by Hynek Med. - TD
+* modify configure script and makefile templates to permit builds with the
+  --srcdir option, noted by Philippe De Muyter. - TD
+1997-11-08
+* Added Unicode support for "DosArabic (cp864)", "WinArabic (cp1256)",
+  "DosGreek (cp737)", "DosGreek2 (cp869)", "WinGreek (cp1253)",
+  "DosHebrew (cp862)", and "WinHebrew (cp1255)".  Note that we still
+  have no code for taking DIR attributes, or directionality in general,
+  into account. - FM
+* Mods to handle "cp-#" charset names as synonyms for "cp#", and some
+  cp# names as synonyms for "windows-#". FM & KW
+1997-11-07
+* Change of of LY_SLrefresh() in LYCurses.c as suggested by JED - FM
 * add logic to make install-directories as needed. - TD
 * remove --disable-char-trans option (ifdef's still remain). - TD
 * correct type used in first compile-test for union wait. - TD
@@ -40,6 +109,7 @@ changes are included here. - KW]
   and DOWNLOAD. - KW
 * Changes (untested) in the code dealing with reading of compressed files in
   HTFile.c, in parallel to the code for other systems. - KW
+* Mods to avoid va_start redefinition warnings when building with slang. - FM
 1997-11-05
 * Change in LYForms.c to avoid full screen repaint after popup is retracted
   for slang. - KW & FM
@@ -193,16 +263,31 @@ changes are included here. - KW]
   neeeded.  Note that the code is not appropriate for handling large
   amounts of POST data, since it still first does all the writing and
   then all the reading. - KW
+1997-11-01
+* Added support for presentation of text/plain files in SOURCE ('\') mode,
+  homologously to text/html files, rather than treating the command as a
+  synonym for 'd'ownload when viewing a text/plain file.  Note that if the
+  text/plain file has no long lines, the display of it will not change,
+  but otherwise, the long lines will not be wrapped in SOURCE mode, and
+  thus can be 'p'rinted without line wrapping.  One still should use
+  'd'ownload for a faithful copy of the file, i.e., without charset
+  conversions and expansions of TABs. - FM
 1997-10-30
 * Get numbering of links on List Page right, by faking hidden links for
   form fields which get counted but are not selectable. - KW
 * Allow LYNXHIST: links in List Page since the History Page may get 
   'L'isted... - KW
+* Mods of HTML.c parsing to close any open Anchor or emphasis elements
+  at the starts of TABLE elements, as the Big Two's TABLE handlers appear
+  to do now. - FM
+* Tweaks of charset handling via META elements and CHARSET attributes. - FM
 1997-10-29
 * Tweak of SortaSGML DTD for insane HTML with FORM start before HEAD. - KW
 * Prevent memory leaks from HTChunks for option and textarea with very
   bad markup, added TRACE and BAD_HTML_USE_TRACE warnings for those. - KW
 * Don't call tigetnum("ncv") for _WINDOWS - BD
+* Added Unicode tables for the "DEC Multinational", "Macintosh (8 bit)",
+  and "NeXT character set" display character sets. - FM 
 1997-10-28
 * Disable setting of the `reloading' flag in HTLoadDocument which would
   generate no-cache headers for request where this is not appropriate. - KW
@@ -212,6 +297,9 @@ changes are included here. - KW]
 * Changes to INSTALLATION file. - NHE
 * Fix in HTMIME.c to recognize Content-location. - KW
 1997-10-27
+* Don't disable FORMs that have INPUTs with TYPE="file" or TYPE="range"
+  since those fields may be optional and the rest of the FORM may be
+  valid to submit. - FM
 * Updated links to www.w3.org in help files. - KW
 * Some changes for DOS compilation. - DK
 * Changes to INSTALLATION file. - NHE
diff --git a/DESC b/DESC
deleted file mode 100644
index 04ad3e97..00000000
--- a/DESC
+++ /dev/null
@@ -1,14 +0,0 @@
-Lynx is a distributed hypertext browser with full World Wide Web
-capabilities.  See "Lynx Information":
-	<URL:http://lynx.browser.org/>
-for information and collections of hyperlinks concerning Lynx.
-
-A listserv list exists for the distribution of Lynx related
-information, updates, and development discussion.
-  o  lynx-dev@sig.net
-
-Send a subscribe request (subscribe lynx-dev) to majordomo@sig.net
-to be added to the list.  All new releases will be announced on this
-list.  To unsubscribe, send an unsubscribe request (unsubscribe lynx-dev)
-addressed to majordomo@sig.net.  Please DO NOT send subscribe or
-unsubscribe requests to the lynx-dev list directly!!!!.
diff --git a/INSTALLATION b/INSTALLATION
index 5ad7e495..8848eb1b 100644
--- a/INSTALLATION
+++ b/INSTALLATION
@@ -45,6 +45,13 @@ Step 3. (You can skip this step only if you only use English and are not
     character set) and ASSUME_LOCAL_CHARSET to work correctly for them
     before starting to create bookmark files et cetera.  Please read
     "lynx.cfg" for detailed instructions.
+    Additional character sets and some of their properties may be defined with 
+    tables in the src/chrtrans directory.  It is not necessary to change 
+    src/LYCharSets.c to make these new character sets known to Lynx, (although 
+    definitions for the "older" character sets are still there), but the new
+    ones have to be listed in src/UCdomap.c and, currently, the makefiles in
+    src/ and src/chrtrans to be automatically used.  See the README.* files
+    in src/chrtrans/ for details.
 
 Step 4. (optional -- news for UNIX and VMS)
     Set NNTPSERVER in "lynx.cfg" to your site's NNTP server, or set the
@@ -130,35 +137,29 @@ II. Compile instructions -- UNIX
 	   ./configure --help
 
     Here's an alphabetical listing of the Lynx-specific options.  The actual
-    order shown by the -help option is different due to the requirements of
-    the script:
+    order shown by the -help option is different.
 
   --disable-dired			(defines DIRED_SUPPORT)
-	Use this option to enable or disable the optional
-	directory-editor.
+	Use this option to disable the optional directory-editor.
 
 	Lynx supports directory editing (DirEd) for local directories. 
 	This allows users to do things like view, copy and remove files
 	using a tabular display of the directory and single-keystroke
-	commands instead of using the command line.  From inside Lynx,
-	the keystroke sequence "g.<enter>" switches Lynx to DirEd mode
-	on the current directory.  If you're building a Lynx that is to
-	be used as a kind of restricted shell for users who do not have
-	access to the command line and should not have access to
-	equivalent capabilities, you must disable DirEd with this
-	option.  You can also disable some DirEd functions while
-	allowing others.
-
-	All DirEd functions that were enabled on compilation can be
-	disabled or modified at run time via DIRED_MENU symbols in
-	lynx.cfg.
-
-	If you have disabled DirEd completely, you can ignore all the
-	other DirEd options.
+	commands instead of using the command line.  From inside Lynx, the
+	keystroke sequence "g.<enter>" switches Lynx to DirEd mode on the
+	current directory.  If you're building a Lynx that is to be used as
+	a kind of restricted shell for users who do not have access to the
+	command line and should not have access to equivalent capabilities,
+	you must disable DirEd with this option.  You can also disable some
+	DirEd functions while allowing others.  If you have disabled DirEd
+	completely, you can ignore all the other DirEd options.
+
+	All DirEd functions that were enabled on compilation can be disabled
+	or modified at run time via DIRED_MENU symbols in lynx.cfg.
 
   --disable-dired-archive		(define ARCHIVE_ONLY)
 	Use this option to prevent DirEd from extracting files from an
-	archive file,
+	archive file.
 
   --disable-dired-gzip			(prevent defining OK_GZIP)
 	Use this option to prevent DirEd from using gzip and gunzip.
@@ -213,23 +214,15 @@ II. Compile instructions -- UNIX
 	(The symbol DEBUG is always defined).
 
   --enable-find-leaks			(defines LY_FIND_LEAKS)
-  	Use this option to compile-in logic for testing memory leaks.
+	Use this option to compile-in logic for testing memory leaks.
 
   --enable-warnings
-  	Use this option to turn on GCC compiler warnings.
+	Use this option to turn on GCC compiler warnings.
 
-  --with-cfg-file=XXX			(defines LYNX_CFG_FILE)
-	Use this option to override the location of the site
-	configuration file's pathname.  It defaults to $libdir/lynx.cfg,
-	where $libdir is set in the configure script, e.g., to
-	/usr/local/lib.
-
-  --with-lss-file=XXX			(defines LYNX_LSS_FILE)
-	Only for optional and *experimental* color style code.
-	Use this option to override the location of the site
-	style-sheet file's pathname.  It defaults to $libdir/lynx.lss,
-	where $libdir is set in the configure script, e.g., to
-	/usr/local/lib.
+  --libdir
+	Defines the location where you want the lynx.cfg file installed.
+	Usually this would be the same location as the LYNX_CFG_FILE
+	define in userdefs.h.
 
   --with-screen=XXX
 	Use this option to select the screen type.  The option value,
@@ -244,8 +237,7 @@ II. Compile instructions -- UNIX
    --with-zlib				(defines USE_ZLIB)
 	Use zlib for decompression of some gzip files.
 
-1d. Environment (documented in great detail in the autoconf package)
-
+1d. Environment variables
     The configure script looks for programs and libraries in known/standard
     locations.  You can override the behavior of the script by presetting
     environment variables.  If they are set, the script will try to use these
@@ -273,14 +265,39 @@ II. Compile instructions -- UNIX
 
 -- 1997/7/27 - T. Dickey <dickey@clark.net>
 
+1e. Example
+    I use the following csh shell script to set environment variables and
+    configure options rather than type them at the command line each time.
+
+	#!/bin/csh -f
+	setenv RESOLVLIB -lbind
+	setenv CPPFLAGS "-DNSL_FORK -I$HOME/.slang/src -I$HOME/.usr/include"
+	setenv LIBS "-L$HOME/.slang/lib -L$HOME/.usr/lib"
+	./configure --exec-prefix=$HOME --bindir=$HOME/.lynx \
+		--mandir=$HOME/.usr/man --libdir=$HOME/.usr/lib \
+		--with-screen=slang --with-zlib
+
+    The syntax for setting environment variables depends upon your shell.
+    I have installed the libbind.a resolver library on this particular SunOS
+    machine, and prefer to use it to the old libresolv.a.  Setting the
+    environment variable RESOLVLIB to -lbind predefines it for the configure
+    script.  CPPFLAGS in this example defines NSL_FORK, which is not defined
+    by default, and for which there is no option switch.  (Check under the
+    "SITE_DEFS" heading in "makefile.in" for other minor defines for which
+    there are no options.)  CPPFLAGS also defines the full path to the slang
+    and zlib header files, which are not kept in standard directories.
+    Likewise, LIBS defines the nonstandard locations of libslang.a and libz.a.
+    Setting the option --bindir tells the configure script where I want to
+    install the lynx binary; setting --mandir tells it where to put the lynx.1
+    man page, and setting --libdir tells it where to put the configuration
+    file "lynx.cfg", when I type "make install".  The --with-screen=slang and
+    --with-zlib options are explained above.
+
 2. Manual compile
     If auto-configure does not work for you, or you prefer to compile
     Lynx manually, "docs/Makefile.old" will serve as a template for the
     top-level Makefile, and instructions on how to compile are given in
-    "docs/INSTALLATION.old".  Compilation symbols for which there are no
-    configure options are listed and explained in "docs/Makefile.old".
-    However, rather than maintain two types of build-mechanisms, we prefer
-    to fix bugs in the autoconf script.
+    "docs/INSTALLATION.old".
 
 
 III. Compile instructions -- VMS
@@ -327,21 +344,21 @@ Step 3a.
            CMU_TCP
 	   SOCKETSHR_TCP
 	   TCPWARE
-    It will autosense whether you have VAXC, DECC or GNUC on VAX or AXP
-    and build appropriately.  If a WWWLib already exists for that TCP-IP
-    software, it will prompt you for whether you want to rebuild it.  If
-    you want to build a WWWLib separately, you can type "@libmake.com"
-    with your default directory set to [.WWW.Library.vms] instead doing
-    it via "build.com" in the top directory.  You may need to modify
-    "build-slang.com", as described in its header, so that it can find
-    slang.olb on your system.  If you have both DECC and VAXC, it will
-    use DECC to benefit from the newer and more efficient memory management
-    functions.
+    It will autosense whether you have VAXC, DECC or GNUC on VAX or AXP and
+    build appropriately.  If a WWWLib already exists for that TCP-IP software,
+    it will prompt you for whether you want to rebuild it.  If you want to
+    build a WWWLib separately, you can type "@libmake.com" with your default
+    directory set to [.WWW.Library.vms] instead doing it via "build.com" in
+    the top directory.  You may need to modify "build-slang.com", as described
+    in its header, so that it can find slang.olb on your system.  If you have
+    both DECC and VAXC, it will use DECC to benefit from the newer and more
+    efficient memory management functions.
 
 Step 3b.  (optional compilation method)
-    If you have and want to use MMS, read the header of descrip.mms
-    in the top directory and be sure you include the appropriate macro
-    definitions when you invoke it:
+    If you have and want to use MMS, read the header of descrip.mms in the
+    top directory and be sure you include the appropriate macro definitions
+    when you invoke it:
+
 	$ MMS /Macro = (MULTINET=1)		for VAXC - MultiNet
 	$ MMS /Macro = (WIN_TCP=1)		for VAXC - Wollongong TCP/IP
 	$ MMS /Macro = (UCX=1)			for VAXC - UCX
@@ -363,11 +380,11 @@ Step 3b.  (optional compilation method)
 	$ MMS /Macro = (SOCKETSHR_TCP=1,GNU_C=1) for GNUC - SOCKETSHR/NETLIB
 	$ MMS /Macro = (TCPWARE=1, GNU_C=1)	for GNUC - TCPWare TCP/IP
 
-        If you just type "MMS" it will default to the MULTINET and VAXC
-	configuration.  MMS will build the WWW library and Lynx sources,
-	and link the executable.  However, not all of the header dependencies
-	are specified.  If you are not a developer, and need a clean build,
-	you should use build.com instead of the MMS utility.
+    If you just type "MMS" it will default to the MULTINET and VAXC
+    configuration.  MMS will build the WWW library and Lynx sources, and
+    link the executable.  However, not all of the header dependencies are
+    specified.  If you are not a developer, and need a clean build, you
+    should use build.com instead of the MMS utility.
 
     If you want SOCKS support on VMS, you must add SOCKS as a compilation
     definition, and the SOCKS library to the link command.  However, instead
@@ -379,13 +396,6 @@ Step 3b.  (optional compilation method)
 
 IV. Compile instructions -- Win32 (Windows95/NT)
 
-    Ports have been added for Win32 (95/NT) and 386 DOS systems (see
-    below).  I created the following four defines to accomplish this:
-        _WINDOWS Defined for Win32 specific code (Mostly TCP related)
-        DJGPP    Defined for 386 specific code (Mostly TCP related)
-        DOSPATH  Defined for any DOS'ish computer
-        NOSIGHUP Defined for computers not supporting sighup signal calls.
-
     The original Win32 port was built with Borland C++ 4.52.  Later versions
     of Borland C++ reportedly can be used, but no other compilers have been
     tested.  Before compiling the Lynx sources, you need a curses library, and
@@ -405,7 +415,7 @@ IV. Compile instructions -- Win32 (Windows95/NT)
     check for new .tbl files; hand edit in any new ones, and then do "makew32".
     Jump into Borland C++, load the project (IDE file) and compile Lynx.
     Alternately, after compiling the chartrans tables, you can come back to
-    the top directory and do "make -f makefile.w32".
+    the top directory and compile manually, i.e., do "make -f makefile.w32".
 
     I also have a binary available at "http://www.fdisk.com/doslynx/".  This
     binary was compiled with pdcurses 2.3, hacked so win32 mouse support works,
@@ -446,7 +456,7 @@ V. Compile instructions -- 386 DOS
     curses package and a TCP package.  You can use PDCurses (available at 
     "http://www.lightlink.com/hessling/") and the DJGPP port of WATTCP 
     (available in two different versions at "ftp://neonatal.sm.ic.ac.uk/" 
-    and at "http://lab1.psy.univie.ac.at/~michael/tcplib-dj200.html").  
+    and in "http://www.fdisk.com/doslynx/wlynx/source/djgpp.zip").
     You can also use slang ("ftp://space.mit.edu/pub/davis/slang") as your
     curses library.  It has not been fully ported to DOS yet, however.
     See "http://www.flora.org/lynx-dev/html/month1097/msg00390.html".  You
@@ -457,12 +467,15 @@ V. Compile instructions -- 386 DOS
     ("http://www.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/pat25b.zip").  To
     read the Unix man style documentation, use, for example, "less"
     ("http://www.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/lss332b.zip").
+    Compile or place your compiled PDCurses library in lynx2-*/curses, and
+    compile or place your compiled WATTCP library in lynx2-*/djgpp/tcplib.
 
-    Move to the "lynx2-*/WWW/Library/djgpp" directory and do "make". This
+    Move to the "lynx2-*/WWW/Library/djgpp" directory and do "make".  This
     should compile libwww.a.  Next move to the "lynx2-*/src/chrtrans"
     directory and do "make -f makefile.dos" to compile the character tables.
     Then move to the "lynx2-*/src" directory and do "make -f makefile.dos".
-    If all goes well, you will have a lynx.exe file.
+    If all goes well, you will have a lynx.exe file.  If you have trouble,
+    check to be sure djgpp.env is the way it came in the original package.  
 
     You probably want to test lynx now, but lynx_386 won't work without a
     packet driver installed.  For testing purposes, you can use
@@ -474,7 +487,25 @@ V. Compile instructions -- 386 DOS
     "ftp://ftp.klos.com/demo/pppshare.exe").
 
     See "http://www.fdisk.com/doslynx/lynxport.htm" for more hints and some
-    precompiled libraries.
+    precompiled libraries.  If you compile lynx regularly, you may automate
+    the procedure by creating a batch file such as the following.
+
+	cd djgpp\tcplib\obj
+	make
+	cd ..\..\www\library\djgpp
+	make
+	cd ..\..\..\src\chrtrans
+	make -f makefile.dos
+	cd ..\..\..\src
+	make -f makefile.dos
+	strip lynx.exe
+	cd ..
+
+    This batch file expects the DJGPP port of WATTCP to be installed in the
+    lynx2-* directory.  Place a copy of this batch file, named "djgpp.bat",
+    in the lynx2-* directory, move to that directory and type "djgpp".  A more
+    complete batch file with error checking and annotation can be found at:
+    "http://www.flora.org/lynx-dev/html/month1197/msg00250.html".
 
 -- 1997/9/29 - D. Kaufman <dkaufman@rahul.net>
 -- 1997/10/3 - B. Schiavo <Wschiavo@concentric.net>
@@ -518,8 +549,8 @@ VI. General installation instructions
     If something doesn't work, or you can't get it to compile at all, or
     you can't figure out what one of the defines means, read the PROBLEMS
     file and *.announce files in the docs subdirectory.  The docs/CHANGES*
-    files record the complete history of Lynx development and are an invaluable
-    resource for understanding how Lynx should perform.
+    files record the complete history of Lynx development and are an
+    invaluable resource for understanding how Lynx should perform.
 
     If you still have difficulties, send an email message to the Lynx-Dev
     mailing list (see the README file).  Try to include pertinent information
@@ -655,9 +686,8 @@ VII. Setting environment variables before running Lynx (optional)
     USER         Tells Lynx you are real instead of an anonymous user(?)
 
     386 version only:
-    WATCONF      Where to find the wattcp.cfg file.
     WATTCP.CFG   Where to find the wattcp.cfg file.
-    (only one applies, depending on how you compiled your tcp library)
+    (Depending on how you compiled libtcp.a, you may have to use WATCONF.)
 
     Define these in your batch file for running Lynx.  For example, if your
     application line is "D:\win32\lynx.bat", lynx.bat may look like:
@@ -673,4 +703,4 @@ VIII. Acknowledgment
    Thanks to the many volunteers who offered suggestions for making this
    installation manual as accurate and complete as possible.
 
--- 1997/10/28 - H. Nelson <lynx-admin@irm.nara.kindai.ac.jp>
+-- 1997/11/14 - H. Nelson <lynx-admin@irm.nara.kindai.ac.jp>
diff --git a/Makefile.old b/Makefile.old
deleted file mode 100644
index 7d44f84c..00000000
--- a/Makefile.old
+++ /dev/null
@@ -1,1106 +0,0 @@
-##makefile for lynx
-
-SHELL = /bin/sh
-
-##uncomment the next line if your make fails to set $(MAKE)
-#MAKE= make
-
-##this is the name of the directory the lynx source code is in.
-##(e.g. lynx2-7-1, not the full path)
-lynxdir= lynx2-7-1
-
-##this is the filename for .zip, .tar and .tar.Z archives.
-lynxname= lynx2-7-1
-
-##change the next line if you want lynx installed somewhere
-##besides /usr/local/bin
-exec= /usr/local/bin
-
-##change the next line if you want the lynx man file installed somewhere
-##besides /usr/local/man/man1
-doc= /usr/local/man/man1
-
-##change the next line if you want the lynx.cfg file installed somewhere
-##besides /usr/local/lib
-cfg= /usr/local/lib
-
-installbin= install -c -s -m 755
-installdoc= install -c -m 444
-
-##set the relative location of the WWW library Implementation directory,
-##from this directory
-##do not set this to be an absolute path!!!
-WWWINC= WWW/Library/Implementation
-
-# !!!!!!!!!!! SUN resolv LIBRARY !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-# To include resolv in the LIBS="" list for SUN 3, 4 or Solaris OS,
-# point RESOLVLIB to that library.  You need this if you get the message
-# "Alert!:  Unable to connect to remote host" whenever you try to
-# access a host other than localhost and have made Lynx without it.
-# See the PROBLEMS file for more information.
-#RESOLVLIB= -lresolv
-
-# !!!!!!!!!!! Alternate socket functions for SOCKS !!!!!!!!!!!!!!!!!!
-# To make a SOCKSified lynx, include -DSOCKS in your SITE_LYDEFS and
-# SITE_DEFS, below, and point SOCKSLIB to your SOCKS library.  Note
-# that you may have problems accessing FTP servers.  Also, instead of
-# SOCKSifying lynx for use behind a firewall, you are better off if
-# you make it normally, and set it up to use a proxy server.  You can
-# SOCKSify the proxy server, and it will handle all clients, not just
-# Lynx (see the INSTALLATION file in this distribution).  If your SOCKS
-# server was compiled to use the short version of Rbind, also include
-# -DSHORTENED_RBIND in your SITE_LYDEFS and SITE_DEFS.  If you do
-# SOCKSify lynx, you can turn off SOCKS proxy usage via a -nosocks
-# command line switch.
-#SOCKSLIB= /usr/local/lib/libsocks.a
-
-# !!!!!!!!!!!!!  DIRECT WAIS ACCESS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-# If you are adding direct wais access you must fill in the
-# location of wais.a, client.a and the standard math library, libm.a.
-# You can pick up the most current freeWAIS sources from
-#	ftp://ftp.cnidr.org/pub/NIDR.tools/freewais
-# If you are using freeWAIS-0.202 or older, include -DDECLARE_WAIS_LOGFILES
-# in your SITE_DEFS.
-# Plese put an ABSOLUTE address here if you want it to work!
-#WAISLIB= ../../freeWAIS-0.202/bin/client.a ../../freeWAIS-0.202/bin/wais.a /usr/lib/libm.a
-
-# !!!!!!!!!!!!! SLANG Support (For color version of Lynx). !!!!!!!!!!!!!!!!
-# The slang library is an alternative to curses, developed by John E. Davis
-# (davis@space.mit.edu).  Version 0.99-27 or higher is available from
-#	ftp://space.mit.edu/pub/davis
-# It provides color support for Lynx.  If you wish to try it and are not
-# on a supported system (see list, below), include -DUSE_SLANG in your
-# SITE_DEFS and define the locations of the slang library (libslang.a)
-# and headers (slang.h and slcurses.h) here.  They may be left commented
-# out if the library and headers are in their canonical locations (usr/lib,
-# and usr/include).
-#SLANGINC = -I../../slang/src#              location of slang.h and slcurses.h
-#SLANGLIB = -L../../slang/src/$(ARCH)objs#  location of libslang.a
-#SLANGRRLIB = -R../../slang/src/$(ARCH)objs# for solaris
-
-# !!!!!!!!!!! Support for Character Styles !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-# Comment out the following lines if you do *not* want to activate
-# Rob Partington's Character Style color support code (which may currently
-# only work with ncurses, not other curses or the slang library).
-# Or modify and experiment...  -kw
-# RP_LYDEFS = -I../../../src -DUSE_COLOR_STYLE -DUSE_HASH
-# RP_DEFS = -DUSE_COLOR_STYLE -DUSE_HASH
-
-# !!!!!!!!!!! Lynx Local Directory Listing Formats !!!!!!!!!!!!!!!!!!!!!!!!!!!
-# Lynx supports "ls -l" format for local directory listings on Unix if the
-# LONG_LIST compilation symbol is defined, and includes links to the parent
-# directory if the compilation symbol NO_PARENT_DIR_REFERENCE is not defined.
-# If "ls -l" format is enabled here, the listing format can be modifed via a
-# LIST_FORMAT symbol in userdefs.h and/or lynx.cfg.  Otherwise, only file and
-# directory names will be included in the listings.
-#
-# If you are not including DirEd Support (see below) and wish to disable
-# "ls -l" emulation in local directory listings, prepend "#" to this line:
-DIR_LONG_LIST =   -DLONG_LIST
-#
-# To disable "Up to" parent links in local directory listings,
-# remove "#" from this line:
-#DIR_PARENT =  -DNO_PARENT_DIR_REFERENCE
-
-# !!!!!!!!!!! Lynx DirEd Support !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-# Lynx now supports directory editing (DirEd) for local directories.
-# This allows users to do things like view, copy, & remove files using
-# a tabular display of the directory & single-keystroke commands instead
-# of using the command line.  From inside Lynx, the keystroke sequence
-# "g.<enter>" switches Lynx to DirEd mode on the current directory.
-# If you're building a Lynx that is to be used as a kind of restricted
-# shell for users who do not have access to the command line & should
-# not have access to equivalent capabilities, you need to disable DirEd
-# here.  You can also disable some DirEd functions while allowing others.
-#
-# DirEd functions are disabled by inserting or removing "#" signs at
-# the beginnings of lines that contain variable assignments here.
-# All DirEd functions that were enabled on compilation can be disabled
-# or modified at run time via DIRED_MENU symbols in lynx.cfg.
-#
-# To disable DirEd completely, prepend "#" to this line:
-DIRED_SUPPORT     =   -DDIRED_SUPPORT
-#(If you have disabled DirEd completely, you can ignore all the
-#other DirEd stuff here.)
-#
-# To prevent DirEd from extracting files from an archive file,
-# remove "#" from this line:
-#DIRED_ARCHIVE   =  -DARCHIVE_ONLY
-#
-# To prevent DirEd from using the tar program, prepend "#" to this line:
-DIRED_TAR   =   -DOK_TAR
-#
-# To prevent DirEd from using zip & unzip, prepend "#" to this line:
-DIRED_ZIP   =   -DOK_ZIP
-#
-# To prevent DirEd from using gzip & gunzip, prepend "#" to this line:
-DIRED_GZIP   =   -DOK_GZIP
-#
-# To prevent DirEd from using uudecode, prepend "#" to this line:
-DIRED_UUDECODE   =   -DOK_UUDECODE
-#
-# Lynx users can customize their keymaps by creating private versions
-# of lynx.cfg & modifying them, overriding the default keymap.
-# To prevent DirEd keymap overriding, prepend "#" to this line:
-DIRED_OVERRIDE   =   -DOK_OVERRIDE
-#
-# To prevent DirEd from changing the permissions on directories or files
-# (i.e. from doing what the Unix chmod command or the DOS attrib command
-# does), prepend "#" to this line:
-DIRED_PERMIT   =   -DOK_PERMIT
-#
-# If you do not comment out the DIRED_PERMIT line, but want to restrict
-# changes of the eXecute permission to directories (i.e., not allow it to
-# be changed for files), remove "#" from this line (if you don't remove it,
-# you can still block changes of the eXecute permission for files but not
-# directories via the "change_exec_perms" command line restriction):
-#DIRED_NOXPERMS   =   -DNO_CHANGE_EXECUTE_PERMS
-
-# !!!!!!!!!!! NOTE:  NetBSD and FreeBSD !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-# On NetBSD 1.1 and earlier, as well as FreeBSD 2.0.5 and earlier,
-# the system make program uses different syntax for including files
-# than the GNU make program.  If you get the following error --
-#   * "Makefile", line 27: Need an operator *
-# you have several choices to run GNU make:
-#
-# * Install GNU make as `/usr/bin/make', after moving /usr/bin/make
-#   to /usr/bin/old-make
-#
-# * Install GNU make in a different directory which is earlier in
-#   your search path.
-#
-# * Install GNU make as gmake, and change occurrences of `make' to
-#   `gmake' in any Makefile used by your install.  You won't need to
-#   change all of the Makefiles, just the top-level one, and the one
-#   in WWW/Library/???bsd
-
-# !!!!!!!!!!! Lynx Wishful Thinking !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-# If you are on one of the supported systems (see all: list below)
-# you should not have to modify anything from here down (but check
-# it out for your system, anyway)!
-# If you are not, then you should edit the generic: entry below.
-#
-# If you need ncurses, the latest version can always be found in
-#	ftp://ftp.clark.net/pub/dickey/ncurses/
-# or	ftp://ftp.netcom.com/pub/zm/zmbenhal/ncurses/
-# (you may need -DHAVE_NCURSES_H in addition to -DNCURSES for old
-# versions of ncurses; see below).
-#
-# Also be sure to check out the compilation symbols in userdefs.h
-# before building Lynx!
-
-all:
-	@echo
-	@echo "Please run make with one of the following arguments"
-	@echo "aix4       -- for RS/6000 running AIX 4.n and some 3.2"
-	@echo "aix32      -- for RS/6000 running AIX 3.2"
-	@echo "aix31      -- for RS/6000 running AIX 3.1 with curses bug"
-	@echo "apollo     -- apollo systems (untested)"
-	@echo "bsdi       -- BSD Interactive"
-	@echo "bsdi-ncurses -- BSD/OS(v2.0 or later) using ncurses(v1.9.4 or later) package."
-	@echo "bsdi-slang -- BSD/OS(v2.0 or later) using the slang package."
-	@echo "clix       -- for Intergraph CLIX"
-	@echo "convex     -- for Convex C-series"
-	@echo "convex-ncurses -- for Convex C-series with ncurses package"
-	@echo "dgux       -- for DGUX "
-	@echo "freebsd    -- for FreeBSD"
-	@echo "freebsd-ncurses -- for FreeBSD using ncurses package"
-	@echo "freebsd-slang -- for FreeBSD with color slang package"
-	@echo "generic    -- for generic UNIX"
-	@echo "isc        -- for Interactive Machines (untested)"
-	@echo "linux      -- for PC linux"
-	@echo "linux-ncurses -- for PC linux using ncurses package"
-	@echo "linux-slang -- for linux with color slang package"
-	@echo "mips       -- for MIPS, svr3/bsd flavour (untested)"
-	@echo "netbsd     -- for NetBSD"
-	@echo "netbsd-ncurses -- for NetBSD using ncurses package"
-	@echo "news       -- for SONY NEWS-OS 4.2.1R"
-	@echo "news-ncurses -- for SONY NEWS-OS 4.2.1R using ncurses package"
-	@echo "news-slang -- for SONY NEWS-OS 4.2.1R with color slang package"
-	@echo "next       -- for NeXT OS"
-	@echo "next-ncurses  -- for NeXT OS using ncurses package"
-	@echo "osf        -- for Alpha OSF/1"
-	@echo "osf-slang  -- for Alpha OSF/1 with color slang package"
-	@echo "ptx        -- for Sequent's DYNIX/ptx, version 4, (current version)"
-	@echo "ptx-slang  -- for Sequent's DYNIX/ptx, version 4, with color slang package"
-	@echo "ptx        -- for Sequent's DYNIX/ptx, current version"
-	@echo "ptx2       -- for Sequent's DYNIX/ptx, version 2"
-	@echo "riscos     -- Control Data Unix machine running EP/IX"
-	@echo "sco        -- for SCO machines"
-	@echo "sco5       -- for SCO OpenServer Release 5 machines"
-	@echo "sgi        -- for SGI machines"
-	@echo "sun3       -- for SUN 3 OS with System V curses"
-	@echo "sun4       -- for SUN 4 OS with System V curses"
-	@echo "sun4-ncurses -- for SUN 4 OS using ncurses package"
-	@echo "sun4-pure  -- for SUN 4 OS with PURIFY and System V curses"
-	@echo "sun4-slang -- for SUN 4 OS with color slang package"
-	@echo "svr4       -- for SVR4"
-	@echo "snake      -- for HP-UX lt 9.01 (gcc)"
-	@echo "snake-slang -- for HP-UX lt 9.01 (gcc) with color slang"
-	@echo "snake2     -- for HP-UX gte 9.01 (gcc)"
-	@echo "snake2-slang -- for HP-UX gte 9.01 (gcc) with color slang"
-	@echo "snake3     -- for HP-UX (purchased compiler)"
-	@echo "snake3-slang -- for HP-UX (purchased compiler) with color slang"
-	@echo "solaris2   -- for solaris 2.x"
-	@echo "solaris2cc -- for Solaris 2.x using Sun's unbundled C compiler"
-	@echo "solaris2-slang -- for Solaris 2 and color slang package"
-	@echo "solaris2-slangcc -- for Solaris 2 slang using Sun's unbundled C compiler"
-	@echo "ultrix     -- for DEC Ultrix"
-	@echo "decstation -- for DEC Ultrix (same as ultrix)"
-	@echo "ultrix-slang     -- for DEC Ultrix and color slang package"
-	@echo "decstation-slang -- for DEC Ultrix and color slang (same as ultrix-slang)"
-	@echo "umaxv   -- for Encore's UMAXV (SVR3.x) "
-	@echo "umaxv-slang   -- for Encore's UMAXV and color slang package"
-	@echo "unixware   -- for Novell's Unixware"
-	@echo "univell    -- for Novell's Unixware"
-	@echo "unixware-slang -- for Unixware and color slang package"
-	@echo "univell-slang  -- for Unixware and color slang package"
-	@echo "clean      -- removes all '.o' and 'core' files"
-	@echo "tar        -- runs clean, removes executable, and tars the whole directory"
-	@echo "compress   -- runs tar, then compresses the result"
-	@echo "zip        -- runs clean, removes executable, and zips the whole directory"
-	@echo
-
-# Map some extra commands to existing ones
-unix: generic
-decstation: ultrix
-decstation-slang: ultrix-slang
-univell: unixware
-univell-slang: unixware-slang
-
-DIR_LYDEFS = $(DIRED_SUPPORT) $(DIR_LONG_LIST) $(DIR_PARENT)
-
-DIR_DEFS = $(DIRED_SUPPORT) $(DIRED_ARCHIVE) $(DIRED_TAR) $(DIRED_ZIP) $(DIRED_GZIP) $(DIRED_UUDECODE) $(DIRED_OVERRIDE) $(DIRED_PERMIT) $(DIRED_NOXPERMS)
-
-# If you apply patches which require linking to site-specific libraries,
-# uncomment the following and point SITE_LIBS to those libraries.
-#SITE_LIBS= # Your libraries here (remove the "#")
-
-# Set SITE_LYDEFS to one or more of the defines for the WWW Library:
-SITE_LYDEFS = $(DIR_LYDEFS) $(RP_LYDEFS) -DEXP_CHARTRANS # Your defines here
-
-# Set SITE_DEFS to one or more of the defines for lynx below:
-SITE_DEFS = $(DIR_DEFS) $(RP_DEFS) -DEXP_CHARTRANS -DNSL_FORK -DLYNXCGI_LINKS -DUSE_EXTERNALS # Your defines here
-
-# if you are compiling on a previously unsupported system, modify
-# this generic entry!!
-#
-# defines include:
-# -DNO_CUSERID     if you don't have cuserid()
-# -DNO_UTMP	   if you don't have utmp capibilities
-# -Dvfork=fork     if you don't have vfork()
-# -DMMDF	   if you use MMDF instead of sendmail
-# -DFANCY_CURSES   enables fancy curses (bold, underline, reverse)
-# -DCOLOR_CURSES   enables color in SVr4 curses & clones such as ncurses
-# -DNCURSES        for ncurses support (also indicate the LIBS path)
-# -DHAVE_NCURSES_H  seek ncurses.h instead of ncurses/curses.h in LYCurses.h
-# -DNO_KEYPAD      if you don't have keypad() and related defines
-# -DNO_SIZECHANGE  Disables window sizechange code
-# -DNO_CPU_LIMIT   Disables Max CPU timeout (includes CLOCKS_PER_SECOND)
-# -DNO_PUTENV      Define if you don't have a putenv call.
-# -DNO_CBREAK      if you don't have cbreak() (use crmode() instead)
-# -DUNDERLINE_LINKS  Define if you want links underlined instead of bold.
-# -DIGNORE_CTRL_C  Define if Control-C shouldn't exit lynx.
-# -DHP_TERMINAL    For DIM workaround to REVERSE problems on HP terminals.
-# -DLOCALE         For LOCALE support for international characters.
-# -DSOCKS	   For making a SOCKSified lynx.
-# -DSHORTENED_RBIND  For a SOCKSified lynx with the short version of Rbind.
-# -DNO_UNISTD_H    if you don't have <unistd.h>
-# -DNOPORT         if you must use PASV instead of PORT for FTP
-# -DNO_TTYTYPE	   if your system lacks a ttytype variable
-# -DNSL_FORK	   For fork-based name server lookups that can be 'z'apped.
-# -DEXP_CHARTRANS  enable chartrans support w/ new charsets, UTF8 mode etc.
-#                  (needed in SITE_DEFS *and* SITE_LYDEFS !)
-# -DEXP_CHARTRANS_AUTOSWITCH also let lynx switch term mode(Linux console only)
-# -DSLANG_MBCS_HACK prevent cutoff lines when using UTF8 console (slang only)
-# -DUSE_ZLIB       To use some functions from zlib library if you have it.
-#
-# if you are linking to freeWAIS-0.202 or older, you should define this
-# in MCFLAGS (SITE_DEFS)
-#
-# -DDECLARE_WAIS_LOGFILES
-#
-# if you have the reverse clear screen problem of some SUN4 systems you
-# should define this in MCFLAGS (SITE_DEFS)
-#
-# -DREVERSE_CLEAR_SCREEN_PROBLEM
-#
-# if you have an SVR4 system with the "type any key" problem, try defining
-# this in LYFLAGS (SITE_LYDEFS) and MCFLAGS (SITE_DEFS)
-#
-# -DSVR4_BSDSELECT
-#
-# Old Data General systems may need this in their SITE_LYDEFS
-# for their inet_addr(host) calls.
-#
-# -DDGUX_OLD
-#
-# if you would like logging of client requests via syslog(), you should
-# define this in MCFLAGS (SITE_DEFS)
-#
-# -DSYSLOG_REQUESTED_URLS
-#
-# if you would like to enable code to detect memory leaks define this in both
-# LYFLAGS (SITE_LYDEFS) and MCFLAGS (SITE_DEFS)
-#
-# -DLY_FIND_LEAKS
-#
-# for installation of local execution links, please see the file userdefs.h
-
-#generic machines with original Berkeley curses
-generic:
-	@echo "You must first compile the WWW library in WWW/Library"
-	cd WWW/Library/unix; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DFANCY_CURSES -DUNIX \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/unix/libwww.a"
-
-# Contributed by Alex Matulich (matuli_a@marlin.navsea.navy.mil).
-# Note that some of the online help files in this distribution need
-# to be edited and renamed to conform with the Intergraph CLIX 14
-# character file name limit.
-clix:
-	cd WWW/Library/clix; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DFANCY_CURSES -DUNIX -DUSG \
-		-DCLIX -DNO_UTMP \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lmalloc -lcurses -ltermcap -lbsd -lc_s \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/clix/libwww.a"
-
-# Tested on C3 series under ConvexOS 10.1, CC V5.0;
-# Should work on other C-series
-convex:
-	cd WWW/Library/convex; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O \
-		-D__STDC__ \
-		-DNO_PUTENV -DNO_CBREAK -DNO_KEYPAD -DUSE_DIRENT -DUNIX \
-		-DSTDC_HEADERS -I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/convex/libwww.a"
-
-convex-ncurses:
-	cd WWW/Library/convex; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O \
-		-I/usr/local/include \
-		-DNCURSES -DCOLOR_CURSES -DFANCY_CURSES \
-		-D__STDC__ \
-		-DNO_PUTENV -DNO_CBREAK -DUSE_DIRENT -DUNIX \
-		-DSTDC_HEADERS -I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-L/usr/local/lib -lncurses \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/convex/libwww.a"
-
-# You may need to remove -DUTMPX_FOR_UTMP for some versions of DGUX.
-dgux:
-	cd WWW/Library/unix; $(MAKE) LYFLAGS="-DDGUX $(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DFANCY_CURSES -DUNIX \
-		-I../$(WWWINC) -DDGUX -DUTMPX_FOR_UTMP $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap -lsocket -lnsl \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/unix/libwww.a"
-
-mips:
-	cd WWW/Library/mips; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-systype svr3 -O \
-		-DFANCY_CURSES -DUNIX -I/svr3/usr/include/bsd \
-		-I../$(WWWINC) -DNO_UTMP $(SITE_DEFS)" \
-		LIBS="-lcurses -lnsl -lbsd \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/mips/libwww.a"
-
-# FreeBSD doesn't have or need ranlib. (ignore the error message about that :)
-freebsd:
-	cd WWW/Library/freebsd; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DUNIX -DNO_KEYPAD -DNO_CUSERID \
-		-I../$(WWWINC) $(SITE_DEFS)"\
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/freebsd/libwww.a"
-
-# FreeBSD doesn't have or need ranlib. (ignore the error message about that :)
-freebsd-ncurses:
-	cd WWW/Library/freebsd; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all MCFLAGS="$(CFLAGS) -DFANCY_CURSES -DCOLOR_CURSES -DNCURSES \
-		-DHAVE_NCURSES_H -DUNIX -DNO_TTYTYPE -DNO_CUSERID -DLOCALE \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lncurses -lmytinfo \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/freebsd/libwww.a"
-
-# FreeBSD doesn't have or need ranlib. (ignore the error message about that :)
-freebsd-slang:
-	cd WWW/Library/freebsd; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all MCFLAGS="$(CFLAGS) -DUSE_SLANG -DUNIX \
-		-DNO_TTYTYPE -DNO_CUSERID -DLOCALE \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/freebsd/libwww.a" \
-		SLANGLIB="$(SLANGLIB) -lslang -ltermcap -lm" \
-		SLANGINC="$(SLANGINC)"
-
-# NetBSD doesn't have or need ranlib. (ignore the error message about that :)
-netbsd:
-	cd WWW/Library/netbsd; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DUNIX -DNO_KEYPAD -DNO_CUSERID \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/netbsd/libwww.a"
-
-# NetBSD doesn't have or need ranlib. (ignore the error message about that :)
-netbsd-ncurses:
-	cd WWW/Library/netbsd; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DFANCY_CURSES -DCOLOR_CURSES -DNCURSES \
-		-DUNIX -DNO_CUSERID -I../$(WWWINC) $(SITE_DEFS) \
-		-I/usr/include/ncurses" \
-		LIBS="-lncurses -lcompat \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/netbsd/libwww.a"
-
-# Tested on DN 3500 & 4500's running Domain O/S 10.4 BSD
-# -Acpu,mathchip may have to be changed on other machines - see man cpuhep
-apollo:
-	cd WWW/Library/apollo_m68k; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DUNIX -DNO_KEYPAD -DNO_CUSERID \
-		-D_BUILTINS -W0,-opt,4 -I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/apollo_m68k/libwww.a $(MYWWWLIB)"
-
-riscos:
-	cd WWW/Library/unix; $(MAKE) CC="gcc" LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-O -DFANCY_CURSES -DUNIX \
-		-DNO_GETCWD -DNO_PUTENV -Dremove=unlink \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/unix/libwww.a"
-
-# Lynx will not compile with the "free" cc compiler supplied
-# with HP-UX.  You must use a purchased cc compiler to compile Lynx.
-snake:
-	cd WWW/Library/snake; $(MAKE) CC="gcc" LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-O -DFANCY_CURSES -DUNIX \
-		-DSNAKE -I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/snake/libwww.a"
-
-snake-slang:
-	cd WWW/Library/snake; $(MAKE) CC="gcc" LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-O -DUNIX \
-		-DUSE_SLANG -DSNAKE -I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/snake/libwww.a" \
-		SLANGLIB="$(SLANGLIB) -lslang" SLANGINC="$(SLANGINC)"
-
-snake2:
-	cd WWW/Library/snake; $(MAKE) CC="gcc" LYFLAGS="-D_INCLUDE_HPUX_SOURCE \
-		-D_INCLUDE_POSIX_SOURCE -D_INCLUDE_AES_SOURCE \
-		-D_INCLUDE_XOPEN_SOURCE $(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-O -DFANCY_CURSES -DUNIX \
-		-DSNAKE -I../$(WWWINC) -D_INCLUDE_HPUX_SOURCE \
-		-D_INCLUDE_POSIX_SOURCE -D_INCLUDE_AES_SOURCE \
-		-D_INCLUDE_XOPEN_SOURCE $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/snake/libwww.a"
-
-snake2-slang:
-	cd WWW/Library/snake; $(MAKE) CC="gcc" LYFLAGS="-D_INCLUDE_HPUX_SOURCE \
-		-D_INCLUDE_POSIX_SOURCE -D_INCLUDE_AES_SOURCE \
-		-D_INCLUDE_XOPEN_SOURCE $(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-O -DUNIX \
-		-DUSE_SLANG -DSNAKE -I../$(WWWINC) -D_INCLUDE_HPUX_SOURCE \
-		-D_INCLUDE_POSIX_SOURCE -D_INCLUDE_AES_SOURCE \
-		-D_INCLUDE_XOPEN_SOURCE $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/snake/libwww.a" \
-		SLANGLIB="$(SLANGLIB) -lslang" SLANGINC="$(SLANGINC)"
-
-# Lynx will compile with the purchased cc compiler added to HP-UX.
-# contributed by Andy Finkenstadt (genie@panix.com)
-# Note that initial releases of HP/UX 10.10 have a broken select() in
-# libcurses.a and will malfunction with Lynx.  See the PROBLEMS file.
-snake3:
-	cd WWW/Library/snake; $(MAKE) CC="cc" LYFLAGS="-Ae -DUNIX \
-		$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -Ae -DFANCY_CURSES -DUNIX \
-		-DSNAKE -I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/snake/libwww.a"
-
-snake3-slang:
-	cd WWW/Library/snake; $(MAKE) CC="cc" LYFLAGS="-Ae -DUNIX \
-		$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -Ae -DUSE_SLANG -DUNIX \
-		-DSNAKE -I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/snake/libwww.a" \
-		SLANGLIB="$(SLANGLIB) -lslang" SLANGINC="$(SLANGINC)"
-
-svr4:
-	cd WWW/Library/svr4; $(MAKE) LYFLAGS="-DSVR4_BSDSELECT $(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DFANCY_CURSES -DUNIX \
-		-I../$(WWWINC) -DUTMPX_FOR_UTMP -DSVR4 -DSVR4_BSDSELECT \
-		-DTRUE=1 -DFALSE=0 $(SITE_DEFS)" \
-		LIBS="-lcurses -lsocket -lnsl \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/svr4/libwww.a"
-
-# SEQUENT doesn't have or need ranlib. (ignore the error message about that :)
-ptx:
-	cd WWW/Library/ptx; $(MAKE) $(MFLAGS) LYFLAGS="-DNO_BCOPY \
-		-DSVR4_BSDSELECT -DNO_FILIO_H $(SITE_LYDEFS)"
-	cd src; $(MAKE) $(MFLAGS) all CC="cc" MCFLAGS="-O -DUNIX -DSVR4 \
-		-DFANCY_CURSES -DNO_FILIO_H -DUTMPX_FOR_UTMP -DHAVE_TERMIOS_H \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -lsocket -linet -lnsl \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/ptx/libwww.a"
-
-# SEQUENT doesn't have or need ranlib. (ignore the error message about that :)
-ptx-slang:
-	cd WWW/Library/ptx; $(MAKE) $(MFLAGS) LYFLAGS="-DNO_BCOPY \
-		-DSVR4_BSDSELECT -DNO_FILIO_H $(SITE_LYDEFS)"
-	cd src; $(MAKE) $(MFLAGS) all CC="cc" MCFLAGS="-O -DUNIX -DSVR4 \
-		-DUSE_SLANG -DNO_FILIO_H -DUTMPX_FOR_UTMP -DHAVE_TERMIOS_H \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -lsocket -linet -lnsl \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/ptx/libwww.a" \
-		SLANGLIB="$(SLANGLIB) -lslang" SLANGINC="$(SLANGINC)"
-
-# SEQUENT doesn't have or need ranlib. (ignore the error message about that :)
-ptx2:
-	cd WWW/Library/ptx; $(MAKE) LYFLAGS="-DPTX2 -DNO_BCOPY -DNOPORT \
-		-DSVR4_BSDSELECT -DNO_FILIO_H $(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DPTX2 -DFANCY_CURSES -DUNIX \
-		-DNO_FILIO_H -DUTMPX_FOR_UTMP -DSVR4 \
-		 -I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -lsocket -linet -lnsl \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/ptx/libwww.a"
-
-# Contributed by Thanh Ma (tma@encore.com).
-umaxv:
-	cd WWW/Library/umaxv-m88k; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DFANCY_CURSES -DUNIX \
-		-D_SYSV3 -DHAVE_TERMIOS -DUSE_DIRENT -DNO_UTMP \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/umaxv-m88k/libwww.a"
-
-# Contributed by Thanh Ma (tma@encore.com).
-umaxv-slang:
-	cd WWW/Library/umaxv-m88k; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DUSE_SLANG -DUNIX \
-		-D_SYSV3 -DHAVE_TERMIOS -DUSE_DIRENT -DNO_UTMP \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/umaxv-m88k/libwww.a" \
-		SLANGLIB="$(SLANGLIB) -lslang -lm" SLANGINC="$(SLANGINC)"
-
-unixware:
-	cd WWW/Library/svr4; $(MAKE) LYFLAGS="-DNO_BCOPY -DUNIXWARE \
-		$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DFANCY_CURSES -DUNIX \
-		-I../$(WWWINC) -DUTMPX_FOR_UTMP -DSVR4 -DTRUE=1 -DFALSE=0 \
-		-DNO_BCOPY -DUNIXWARE $(SITE_DEFS)" \
-		LIBS="-lcurses -lsocket -lnsl \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/svr4/libwww.a"
-
-unixware-slang:
-	cd WWW/Library/svr4; $(MAKE) LYFLAGS="-DNO_BCOPY -DUNIXWARE \
-		$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DUNIX -DUSE_SLANG \
-		-DCURS_PERFORMANCE \
-		-I../$(WWWINC) -DUTMPX_FOR_UTMP -DSVR4 -DTRUE=1 -DFALSE=0 \
-		-DNO_BCOPY -DUNIXWARE $(SITE_DEFS)" \
-		LIBS="-lsocket -lnsl \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/svr4/libwww.a" \
-		SLANGLIB="$(SLANGLIB) -lslang -lm" SLANGINC="$(SLANGINC)"
-
-# SCO doesn't have or need ranlib. (ignore the error message about that :)
-#     can build lynx with its native rcc compiler.  (if you replace "gcc"
-#     with "rcc" for CC= :)
-#     has a const/volatile bug in its native cc compiler. (don't use it ;)
-sco:
-	cd WWW/Library/sco; $(MAKE) CC="gcc" LYFLAGS="-DNO_FILIO_H -DUNIX \
-		-DSCO $(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-O -s -DNO_FILIO_H -DUNIX -DSCO \
-		-DFANCY_CURSES -DMMDF -DNO_UTMP -DNO_SIZECHANGE \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -lsocket -ltermcap -lmalloc \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/sco/libwww.a"
-
-sco5:
-	cd WWW/Library/sco; $(MAKE) CC="cc -belf" LYFLAGS="-DNO_FILIO_H \
-		-DUNIX -DSCO $(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc -belf" MCFLAGS="-O -s -DNO_FILIO_H -DUNIX \
-		-DSCO -DFANCY_CURSES -DMMDF -DUTMPX_FOR_UTMP \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -lsocket \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/sco/libwww.a"
-
-bsdi:
-	cd WWW/Library/Implementation; $(MAKE) -f BSDI_Makefile \
-		LYFLAGS="-DBSDI $(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DNO_CUSERID -DUNIX \
-		-DNO_FILIO_H \
-		-I../$(WWWINC) -DNO_UTMP -DSVR4 -DNO_KEYPAD $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/svr4/libwww.a"
-
-#IMPORTANT: To compile you need ncurses package (version 1.9.4 or later)
-#     installed on your system. You can download ncurses package from
-#     ftp://ftp.netcom.com/pub/zm/zmbenhal/ncurses
-bsdi-ncurses:
-	cd WWW/Library/Implementation; $(MAKE) -f BSDI_Makefile CC="gcc" \
-		LYFLAGS="-DBSDI $(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-O -DNO_CUSERID -DUNIX -DCOLOR_CURSES -DNCURSES \
-		-DFANCY_CURSES -DBSDI -DSVR4 \
-		-I/usr/include/ncurses -I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lncurses \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/svr4/libwww.a"
-
-bsdi-slang:
-	cd WWW/Library/Implementation; $(MAKE) -f BSDI_Makefile \
-		LYFLAGS="-DBSDI $(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DNO_CUSERID -DUNIX \
-		-DNO_FILIO_H -DUSE_SLANG \
-		-I../$(WWWINC) -DNO_UTMP -DSVR4 -DNO_KEYPAD $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/svr4/libwww.a" \
-		SLANGLIB="$(SLANGLIB) -lslang -lm" SLANGINC="$(SLANGINC)"
-
-# define RESOLVLIB (above) for the "LIBS" entry if needed
-# Solaris2 doesn't have or need ranlib. (ignore the error message about that :)
-# (Solaris 2.5 and later actually have a ranlib program - but it does 
-#  nothing and is only there to make Makefiles like this one happy)
-solaris2:
-	cd WWW/Library/solaris2; $(MAKE) CC="gcc" LYFLAGS="-DNSL_FORK \
-		$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-O -DCOLOR_CURSES -DFANCY_CURSES -DUNIX -DSVR4 \
-		-DSOLARIS2 -DCURS_PERFORMANCE -DUTMPX_FOR_UTMP -DUSE_DIRENT \
-		-DLOCALE -DHAVE_TERMIOS_H \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-L/usr/ccs/lib -R/usr/ccs/lib -lcurses -lnsl -lsocket \
-		$(RESOLVLIB) $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/solaris2/libwww.a"
-
-solaris2-ncurses:
-	cd WWW/Library/solaris2; $(MAKE) CC="cc" LYFLAGS="$(SITE_LYDEFS) -g"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-g -DFANCY_CURSES \
-		-DNCURSES -DUNIX -DSVR4 -DSOLARIS2 \
-		-DUTMPX_FOR_UTMP -DUSE_DIRENT -DLOCALE -DHAVE_TERMIOS_H \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-L/usr/ccs/lib -R/usr/ccs/lib -lncurses -lnsl -lsocket \
-		$(RESOLVLIB) $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/solaris2/libwww.a" \
-		STYLE=LYStyle
-
-solaris2-ncurses-develop:
-	cd WWW/Library/solaris2; $(MAKE) CC="gcc" LYFLAGS="$(SITE_LYDEFS) -g -I../../../src -DUSE_COLOR_STYLE -DUSE_HASH"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-g -DFANCY_CURSES \
-		-DUSE_COLOR_STYLE \
-		-DUSE_HASH" \
-		-DNCURSES -DUNIX -DSVR4 -DSOLARIS2 \
-		-DUTMPX_FOR_UTMP -DUSE_DIRENT -DLOCALE -DHAVE_TERMIOS_H \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-L/usr/ccs/lib -R/usr/ccs/lib -lncurses -lnsl -lsocket \
-		$(RESOLVLIB) $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/solaris2/libwww.a" \
-		STYLE=LYStyle
-
-solaris2-ncurses-NHE:
-	cd WWW/Library/solaris2; $(MAKE) CC="gcc" LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-O4 -s -DUSE_COLOR_STYLE -DFANCY_CURSES \
-		-DNCURSES -DUNIX -DSVR4 -DSOLARIS2 -DCURS_PERFORMANCE \
-		-DUTMPX_FOR_UTMP -DUSE_DIRENT -DLOCALE -DHAVE_TERMIOS_H \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-L/usr/ccs/lib -R/usr/ccs/lib -lncurses -lnsl -lsocket \
-		-lresolv" \
-		WWWLIB="../WWW/Library/solaris2/libwww.a" \
-		STYLE=NCStyle
-
-# Solaris 2 using Sun's unbundled C compiler
-# define RESOLVLIB (above) for the "LIBS" entry if needed
-# Solaris2 doesn't have or need ranlib. (ignore the error message about that :)
-solaris2cc:
-	cd WWW/Library/solaris2; $(MAKE) CC="cc" LYFLAGS="-DNSL_FORK \
-		$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DCOLOR_CURSES -DFANCY_CURSES -DUNIX -DSVR4 \
-		-DSOLARIS2 -DCURS_PERFORMANCE -DUTMPX_FOR_UTMP -DUSE_DIRENT \
-		-DLOCALE -DHAVE_TERMIOS_H \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-L/usr/ccs/lib -R/usr/ccs/lib -lcurses -lnsl -lsocket \
-		$(RESOLVLIB) $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/solaris2/libwww.a"
-
-# define RESOLVLIB (above) for the "LIBS" entry if needed
-# Solaris2 doesn't have or need ranlib. (ignore the error message about that :)
-solaris2-slang:
-	cd WWW/Library/solaris2; $(MAKE) CC="gcc" LYFLAGS="-DNSL_FORK \
-		$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-O -DUNIX -DSVR4 -DSOLARIS2 \
-		-DUSE_SLANG -DCURS_PERFORMANCE -DUTMPX_FOR_UTMP -DUSE_DIRENT \
-		-DLOCALE -DHAVE_TERMIOS_H \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-L/usr/ccs/lib -R/usr/ccs/lib -lcurses -lnsl -lsocket \
-		$(RESOLVLIB) $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/solaris2/libwww.a" \
-		SLANGLIB="$(SLANGLIB) $(SLANGRRLIB) -lslang -lm" \
-		SLANGINC="$(SLANGINC)"
-
-# Solaris 2 slang using Sun's unbundled C compiler
-# define RESOLVLIB (above) for the "LIBS" entry if needed
-# Solaris2 doesn't have or need ranlib. (ignore the error message about that :)
-solaris2-slangcc:
-	cd WWW/Library/solaris2; $(MAKE) CC="cc" LYFLAGS="-DNSL_FORK \
-		$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DUNIX -DSVR4 -DSOLARIS2 \
-		-DUSE_SLANG -DCURS_PERFORMANCE -DUTMPX_FOR_UTMP -DUSE_DIRENT \
-		-DLOCALE -DHAVE_TERMIOS_H \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-L/usr/ccs/lib -R/usr/ccs/lib -lcurses -lnsl -lsocket \
-		$(RESOLVLIB) $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/solaris2/libwww.a" \
-		SLANGLIB="$(SLANGLIB) $(SLANGRRLIB) -lslang -lm" \
-		SLANGINC="$(SLANGINC)"
-  
-osf:
-	cd WWW/Library/osf; $(MAKE) LYFLAGS="-Olimit 2000 -DNSL_FORK \
-		$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -Olimit 4000 -DUNIX \
-		-DFANCY_CURSES -DNO_TTYTYPE $(ADDFLAGS) \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/osf/libwww.a"
-
-osf-slang:
-	cd WWW/Library/osf; $(MAKE) LYFLAGS="-Olimit 2000 -DNSL_FORK \
-		$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -Olimit 4000 -DUNIX \
-		-DUSE_SLANG -DNO_TTYTYPE $(ADDFLAGS) \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/osf/libwww.a" \
-		SLANGLIB="$(SLANGLIB) -lslang -lm" SLANGINC="$(SLANGINC)"
-
-# for some reason loc_t isn't defined when compiling for debug on my system.
-# needed for NLchar.h
-dbg:
-	cd WWW/Library/osf; $(MAKE) CC="gcc" LYFLAGS="-DDIRED_SUPPORT \
-		-DLY_FIND_LEAKS"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-O -Wall $(ADDFLAGS) \
-		-DFANCY_CURSES -DLY_FIND_LEAKS \
-		-Dloc_t=_LC_locale_t -D_locp=__lc_locale\
-		-DDIRED_SUPPORT -DOK_TAR -DOK_GZIP -DOK_OVERRIDE \
-		-DUNIX -I../$(WWWINC) -DEXEC_LINKS \
-		-DALLOW_USERS_TO_CHANGE_EXEC_WITHIN_OPTIONS $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/osf/libwww.a"
-
-sgi:
-# SGI doesn't have or need ranlib. (ignore the error message about that :)
-	cd WWW/Library/sgi; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -cckr -DFANCY_CURSES \
-		-DNO_CUSERID -DUNIX -DSGI -Dvfork=fork \
-		-I../$(WWWINC) -DNO_UTMP $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap -DSYSV -DPERFORMANCE \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/sgi/libwww.a"
-
-##linux
-# Add -DDECL_SYS_ERRLIST to the LYFLAGS if sys_errlist and sys_nerr
-# are not declared in your system headers.
-linux:
-	cd WWW/Library/unix; $(MAKE) CC="gcc" LYFLAGS="-DLINUX -DNSL_FORK \
-		$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-O -DUNIX -DLINUX \
-		-DNO_KEYPAD -DNO_TTYTYPE \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/unix/libwww.a"
-
-linux-ncurses:
-	cd WWW/Library/unix; $(MAKE) CC="gcc" LYFLAGS="-DLINUX -DNSL_FORK \
-		$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-O -DUNIX -DLINUX -DNCURSES \
-		-DFANCY_CURSES -DCOLOR_CURSES -DNO_TTYTYPE \
-		-I/usr/include/ncurses -I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lncurses -lgpm \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/unix/libwww.a"
-
-linux-slang:
-	cd WWW/Library/unix; $(MAKE) CC="gcc" LYFLAGS="-DLINUX -DNSL_FORK \
-		$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-O -DUNIX -DLINUX -DUSE_SLANG \
-		-DNO_KEYPAD -DNO_TTYTYPE \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/unix/libwww.a" \
-		SLANGLIB="$(SLANGLIB) -lslang -lm" SLANGINC="$(SLANGINC)"
-
-develop:
-	cd WWW/Library/unix; $(MAKE) LYFLAGS="-DLINUX $(SITE_LYDEFS) -I../../../src -DUSE_COLOR_STYLE -DUSE_HASH"
-	cd src; $(MAKE) all CC="gcc" \
-		MCFLAGS="-O -DUNIX -DLINUX -DNCURSES \
-		-DFANCY_CURSES -DNO_KEYPAD -DNO_TTYTYPE -DUSE_COLOR_STYLE \
-		-I/usr/include/ncurses -I../$(WWWINC) $(SITE_DEFS) -DUSE_HASH" \
-		LIBS="-lncurses $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/unix/libwww.a" \
-		STYLE=LYStyle
-
-linux-style:
-	cd WWW/Library/unix; $(MAKE) LYFLAGS="-DLINUX $(SITE_LYDEFS) -I../../../src -DUSE_HASH -DUSE_COLOR_STYLE"
-	cd src; $(MAKE) all CC="gcc" \
-		MCFLAGS="-O -DUNIX -DLINUX -DNCURSES \
-		-DFANCY_CURSES -DNO_KEYPAD -DNO_TTYTYPE -DUSE_COLOR_STYLE \
-		-I/usr/include/ncurses -I../$(WWWINC) $(SITE_DEFS) -DUSE_HASH" \
-		LIBS="-lncurses $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/unix/libwww.a" \
-		STYLE=LYStyle
-
-##Various AIX environments
-aix:
-	@echo "Run make again and use \"make aix4\" or \"make aix32\""
-
-# For AIX 4.n, and AIX 3.2.5 with POWER2 architectures, L2 caches,
-# and APAR#IX58890
-aix4:
-	cd WWW/Library/rs6000; $(MAKE) LYFLAGS="-D_BSD=44 \
-		$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DFANCY_CURSES -DUNIX -DAIX4 \
-		-D_BSD=44 -I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -lbsd \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/rs6000/libwww.a"
-
-aix32:
-	cd WWW/Library/rs6000; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DFANCY_CURSES -DUNIX \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -lbsd \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/rs6000/libwww.a"
-
-aix31:
-	cd WWW/Library/rs6000; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DUNIX \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -lbsd \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/rs6000/libwww.a"
-
-##ultrix - DEC Ultrix
-ultrix:
-	cd WWW/Library/decstation; $(MAKE) LYFLAGS="-G 7 $(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -Olimit 600 -G 7 \
-		-DFANCY_CURSES -DUNIX -DULTRIX -I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcursesX -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/decstation/libwww.a"
-
-ultrix-slang:
-	cd WWW/Library/decstation; $(MAKE) LYFLAGS="-G 7 $(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -Olimit 600 -G 7 \
-		-DUSE_SLANG -DUNIX -DULTRIX -I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcursesX -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/decstation/libwww.a" \
-		SLANGLIB="$(SLANGLIB) -lslang -lm" SLANGINC="$(SLANGINC)"
-
-##Various SunOS environments
-sun:
-	@echo "Run make again and use \"make sun3\" or \"make sun4\""
-
-# define RESOLVLIB (above) for the "LIBS" entry if needed
-sun3:
-	cd WWW/Library/sun3; $(MAKE) LYFLAGS="$(SITE_LYDEFS)" CC="gcc"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-O -DUNIX -DFANCY_CURSES \
-		-I../$(WWWINC) -DSUN -DLOCALE -I/usr/5include $(SITE_DEFS)"\
-		LIBS="-lcurses -ltermcap -L/usr/5lib \
-		$(RESOLVLIB) $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/sun3/libwww.a"
-
-# define RESOLVLIB (above) for the "LIBS" entry if needed
-sun4:
-	cd WWW/Library/sun4; $(MAKE) CC="gcc" LYFLAGS="$(CCFLAGS) \
-		$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="$(CCFLAGS) -O -DUNIX -DSUN \
-		-DSUN4 -DFANCY_CURSES -DLOCALE \
-		-I../$(WWWINC) -I/usr/5include \
-		$(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap -L/usr/5lib \
-		$(RESOLVLIB) $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/sun4/libwww.a"
-
-# define RESOLVLIB (above) for the "LIBS" entry if needed
-sun4-ncurses:
-	cd WWW/Library/sun4; $(MAKE) CC="gcc" LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc" \
-		MCFLAGS="-O -DUNIX -DFANCY_CURSES -DCOLOR_CURSES -DNCURSES \
-		-I/usr/local/include -I../$(WWWINC) -DSUN -DSUN4 \
-		-DLOCALE $(SITE_DEFS)" \
-		LIBS="-L/usr/local/lib -lncurses \
-		$(RESOLVLIB) $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/sun4/libwww.a"
-
-# use the holiest of holiest --- PURIFY
-# define RESOLVLIB (above) for the "LIBS" entry if needed
-sun4-pure:
-	cd WWW/Library/sun4; $(MAKE) CC="gcc" LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="purify -cache-dir=/home/purify-cache \
-		-always-use-cache-dir=yes -optimize-save-o7=no gcc" \
-		MCFLAGS="-O -DUNIX -DFANCY_CURSES \
-		-I../$(WWWINC) -DSUN -DSUN4 -DLOCALE -I/usr/5include \
-		$(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap -L/usr/5lib \
-		$(RESOLVLIB) $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/sun4/libwww.a"
-
-# define RESOLVLIB (above) for the "LIBS" entry if needed
-sun4-slang:
-	cd WWW/Library/sun4; $(MAKE) CC="gcc" LYFLAGS="$(CCFLAGS) \
-		$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc" MCFLAGS="-O -DUNIX -DSUN -DSUN4 \
-		-DUSE_SLANG -DLOCALE \
-		-I../$(WWWINC) -I/usr/5include \
-		$(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap -L/usr/5lib \
-		$(RESOLVLIB) $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/sun4/libwww.a" \
-		SLANGLIB="$(SLANGLIB) -lslang -lm" SLANGINC="$(SLANGINC)"
-
-# news - SONY NEWS-OS 4.2.1R
-news:
-	@echo "You must first compile the WWW library in WWW/Library"
-	cd WWW/Library/unix; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc -O" MCFLAGS="-O -DUNIX -DNO_KEYPAD \
-		-DNO_CUSERID -DLOCALE \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-ljcurses -ltermcap $(WAISLIB) $(SOCKSLIB)" \
-		WWWLIB="../WWW/Library/unix/libwww.a"
-
-news-ncurses:
-	@echo "You must first compile the WWW library in WWW/Library"
-	cd WWW/Library/unix; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc -O" MCFLAGS="-O -DUNIX \
-		-DNO_CUSERID -DNCURSES -DCOLOR_CURSES -DFANCY_CURSES \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lncurses $(WAISLIB) $(SOCKSLIB)" \
-		WWWLIB="../WWW/Library/unix/libwww.a"
-
-news-slang:
-	@echo "You must first compile the WWW library in WWW/Library"
-	cd WWW/Library/unix; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="gcc -O" MCFLAGS="-O -DUNIX -DNO_KEYPAD \
-		-DNO_CUSERID -DUSE_SLANG -DLOCALE \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="$(WAISLIB) $(SOCKSLIB)" \
-		WWWLIB="../WWW/Library/unix/libwww.a" \
-		SLANGLIB="$(SLANGLIB) -lslang" SLANGINC="$(SLANGINC)"
-
-# next - Nextstep
-next:
-	cd WWW/Library/next; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DUNIX -DNEXT -DNO_UNISTD_H \
-		-DNO_CUSERID -DNO_GETCWD -DNO_PUTENV -DNO_KEYPAD \
-		-I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/next/libwww.a"
-
-next-ncurses:
-	cd WWW/Library/next; $(MAKE) LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DUNIX -DNEXT -DNO_UNISTD_H \
-		-DNCURSES -DCOLOR_CURSES -DFANCY_CURSES \
-		-DNO_CUSERID -DNO_GETCWD -DNO_PUTENV \
-		-I/usr/local/include -I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-L/usr/local/lib -lncurses \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/next/libwww.a"
-
-# isc - Interactive Unix for i386 and i486 machines
-# According to Robert Salter (salter1@mster.nsbf.nasa.gov),
-#  cc should be used instead of gcc.
-# According to Walter Skorski (walt@clyde.jmp.tju.edu),
-#  -DPOSIX_JC is necessary, else LYBookmark.c never finds out
-#  what a mode_t is.
-isc:
-	cd WWW/Library/isc; $(MAKE) CC="cc" LYFLAGS="$(SITE_LYDEFS)"
-	cd src; $(MAKE) all CC="cc" MCFLAGS="-O -DISC -DFANCY_CURSES -DUNIX \
-		-DNO_UTMP -Dvfork=fork -DPOSIX_JC -I../$(WWWINC) $(SITE_DEFS)" \
-		LIBS="-lcurses -ltermcap -linet -lnsl_s -lcposix \
-		$(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \
-		WWWLIB="../WWW/Library/isc/libwww.a"
-
-##Miscellaneous actions
-clean:
-	rm -f WWW/Library/*/*.[aob]
-	rm -f WWW/Library/*/.created
-	cd src; $(MAKE) clean
-	rm -f *.b src/lynx core Lynx.leaks
-
-distclean: clean
-	-rm -f WWW/Library/*/*~
-	-rm -f WWW/Library/*/*.bak
-	-rm -rf WWW/Library/*/obsolete
-	-rm -rf src/obsolete
-	-cd src; $(MAKE) clean
-	-cd src/chrtrans; $(MAKE) distclean
-	-rm -f Lynx.prj *~ *.bak *.sav .*_aux
-	rm lynx
-
-tar:  clean
-	rm -f lynx
-	$(MAKE) save
-
-turnover:	clean
-	$(MAKE) save
-
-zipcompress: compress zip
-	echo "done!"
-
-zip:  clean
-	rm -f src/lynx
-	rm -f lynx
-	rm -f src/a.out
-	rm -f ../$(lynxname).zip
-	cd ..; rm -f $(lynxname).zip; zip -r $(lynxname).zip $(lynxdir)
-
-save:
-	cd ..; rm -f $(lynxname).tar; tar -cf - $(lynxdir) > $(lynxname).tar
-
-compress: tar
-	cd ..; rm -f $(lynxname).tar.Z; compress -f -v $(lynxname).tar
-
-install:
-	-mv -f $(exec)/lynx $(exec)/lynx.old
-	-mv -f $(cfg)/lynx.cfg $(cfg)/lynx.oldcfg
-	$(installbin) lynx $(exec)/lynx
-	$(installdoc) lynx.man $(doc)/lynx.1
-	$(installdoc) lynx.cfg $(cfg)/lynx.cfg
diff --git a/README.chartrans b/README.chartrans
deleted file mode 100644
index 0c0ebd9c..00000000
--- a/README.chartrans
+++ /dev/null
@@ -1,197 +0,0 @@
-Lynx CHARTRANS
-
- Features (in addition to those which Lynx already has):
- 
-- Can (attempt to) translate from any document charset to any display
-   character set, *IF* the document charset is known by a translation 
-   table (compiled in at installation).
-
- - Old method for specifying translations of Latin1 characters and
-   SGML entities still supported. (IBMPC-charsets.announce is still
-   relevant.)
-
- - New method to define character sets: used for input charset as well
-   as display character set, translation tables compiled in from 
-   separate files (one per charset).
-
- - Unicode (UTF8) support: can (attempt to) decode and translate UTF8 to
-   display character set, or pass through UTF to display (if terminal
-   or console understands UTF8).  [raw display of UTF only tested with Slang 
-   so far, does not always position everything correctly on screen]
-
- - Support for CHARSET attribute on A tag [but not yet on LINK], as in
-   HTML i18n RFC 2070.  A link can suggest the target's charset in this way.
-
- - EXPERIMENTAL, currently enabled only for Linux console: 
-   can (attempt to) automatically switch terminal mode and load new
-   code pages on change of display character set.
-
- - some minor changes: sometimes invalid characters are displayed in a hex
-   notation Uxxxx (helps debugging, but I also regard it as at least not
-   worse than showing the wrong char without warning).
-
-Additions/changes to user interface:
-
- - many new Display Character Sets are available on O)ptions screen.
-   (also can now use arrow keys, HOME, END etc. for cycling through the list). 
-
- - new command line flags:
-   -assume_charset=...  assume this as charset for documents that don't
-                        specify a charset parameter in HTTP headers
-   -assume_unknown_charset=...  in case a charset parameter is not recognized 
-   -assume_local_charset=... assume this as charset of local file: docs 
-   also available as ASSUME_CHARSET etc. in lynx.cfg
-
- - The "Raw" toggle (from -raw flag, '@' key, or Options screen)
-   o  should work as before for CJK charsets,
-   o  otherwise toggles the assumption "Default remote charset is same 
-      as Display Character Set" on or off.
-      Toggling of the assumed charset is between Display Character Set and
-      the specified ASSUME_CHARSET or, if they are the same, between the
-      specified ASSUME_CHARSET and ISO-8859-1.
-   o  The default for raw mode now depends on the Display Character Set as
-      well as on the specified ASSUME_CHARSET value.
-   (Try the "Transparent" Display Character Set for more "rawness".)
-
-Requirements:  same as for Lynx in general :)
-
-The chartrans code is now merged with Wayne Buttle's changes for
-32-bit MS Windows and DOS/DJGPP, with Thomas Dickey's and Jim Spath's
-emerging auto-configure mechanism, and with BUGFIXES from Foteos
-Macrides.  See the accompanying file CHANGES.few for the current
-status.
-
-
-A WARNING BEFORE YOU PROCEDE:
-
-This is experimental.  It works already nicely for me, but I have only
-tested it on Linux, compiled with Slang.  In some cases undisplayable bytes
-may get sent to the terminal which are then interpreted as control chars.
-Other usual warnings about alpha software apply...
-
-
-HOW TO GET SOURCES:
-
-The location of files mentioned below is currently at
-         <URL: http://sol.slcc.edu/lynx/klaus/merged/all/>
-but it is probably easier to get a full package of the development code
-from
-         <URL: http://sol.slcc.edu/lynx/current/>
-(different formats there, check it out.)
-Check both locations to find the newest version.
-
-There are three alternatives:
-( Replace the * in the followin filenames with the appropriate subversion )
-
-(1.)
-   Provided as a full Lynx distribution (for now..) - in zip format.
-   This contains the complete Lynx source package.
-
-   Just get lynx-2.7.1ac-*.zip.
-
-(2.)
-   Provided as add-on over the Lynx 2.7.1 distribution, i.e. all files that
-   are new or have changed - in zip format.
-   (a) Get the official Lynx 2.7.1 distribution - see list of download sites at
-           <URL: http://www.crl.com/~subir/lynx/sources.html>.
-   (b) Get add-to-offi-2.7.1ac-*.zip.
-   (c) Unpack the official 2.7.1 package, then unzip add-to-offi-2.7.1ac-*.zip
-       over that directory tree.
-
-(3.)
-   Provided in two files (for minimal download time) to install over the
-   Lynx 2.7.1 distribution - needs gunzip, tar, and patch.
-   (a) Get the official Lynx 2.7.1 distribution - see list of download sites at
-           <URL: http://www.crl.com/~subir/lynx/sources.html>.
-   (b) Get lynx-newfiles-2.7.1ac-*.tar.gz.
-   (c) Get lynx-patch-2.7.1ac-*.pch.gz.
-   (d) Unpack the official 2.7.1 package, then unpack 
-       lynx-newfiles-2.7.1ac-*.tar.gz over that directory tree.
-   (d) Apply patches from lynx-patch-2.7.1ac-*.pch.
-
-
-HOW TO INSTALL:
-
-(4) before compiling:
-
-    Check top level makefile or Makefile and userdefs.h as usual.
-
-    NOTE that there is a new "#define" in userdefs.h for MAX_CHARSETS
-    near the end (in "Section 3.").
-
-    NOTE that in the top-level Makefile, the -DEXP_CHARTRANS must be
-    in *both* SITE_DEFS *and* SITE_LYDEFS.
-
-(5) Building Lynx:
-
-    If you are compiling for VMS you have to figure out for yourself
-    how to modify the procedure, sorry.
-
-    What's supposed to happen (in addition to the usual things when
-    building Lynx): in the new subdirectory src/chrtrans, make should
-    first compile the auxiliary program `makeuctb', then invoke that
-    program to create xxxxx_yyy.h files from the provided xxxxx.yyy
-    translation table files.  (See README.* files in src/chrtrans for
-    more info.)
-
-    If all goes well, just invoking make from the top-level Lynx dir
-    as usual should do everything automatically.  If not, the makefiles
-    may need some tweaking... or:
-
-(6) Some things to look at if compilation fails:
-
-    In src/chrtrans/UCkd.h there is a typedef for an unsigned 16bit
-    numeric type which may need to be changed for your system.  
-    See comment near top there.
-
-    For recompiling Lynx, `make clean' should not be necessary if only
-    files in src/chrtrans have been changed.  On the other hand 
-    may not propagate to the src/chrtrans directory (depending how things
-    are going with auto-config), you may have to cd to that directory 
-    and `make clean' there to really clean up there.
-
-(7) To customize (add/change translation tables etc.):
-
-     See README.* files in src/chrtrans.
-     Make the necessary changes there, then recompile.
-     (A general `make clean' should not be necessary, but make sure
-     the ...uni.h file in src/chrtrans gets regenerated.)
-
-     Note that definition of new character entities (if e.g. you want
-     Lynx to recognize &Zcaron;) are not covered by these table files,
-     they have to be listed in HTMLDTD.c.  
-
-     _If you are on a Linux system_ and using Lynx on the console (i.e.
-     not xterm, not a dialup *into* the Linux box), you can compile
-     with -DEXP_CHARTRANS_AUTOSWITCH.  This is very useful for testing
-     the various Display Character Sets, Lynx will try to automatically
-     chage the console state.  You need to have the Linux kbd package
-     installed, with a working `setfont' command executable by the user,
-     and the right font files - check the source in src/UCAuto.c for
-     the files used and/or to change them!  
-     NOTE that with this enabled,
-     - Lynx currently will not clean up the console state at exit,
-       it will probably left like the last Display Character Set you used.
-     - Loading a font is global across _all_ virtual text consoles, so
-       using Lynx (compiled with this flag) may change the appearance of
-       text on other consoles (if that text contains characters 
-       beyond ASCII).
-
-(8) Some suggested Web pages for testing:
-
-    <URL:  http://www.tezcat.com/~kweide/lynx-chartrans/test/>
-
-    <URL:  http://www.isoc.org:8080/>,
-      especially 
-    <URL:  http://www.isoc.org:8080/liste_ml.htm>.
-
-    <URL:  http://www.accentsoft.com/un/un-all.htm>
-
-(9) Please report bugs, unexpected behavior, etc. 
-    to <lynx-dev@sig.net> or <kweide@tezcat.com>.
-
-    Suggestions for improvement would be welcome, as well as 
-    contributed translation tables (for stuff that is not available
-    at ftp://dkuug.dk or ftp://unicode.org).
-
-KW  1996-05-03
diff --git a/README.configure b/README.configure
index 9547e106..af7f851c 100644
--- a/README.configure
+++ b/README.configure
@@ -149,18 +149,6 @@ the script:
   --enable-warnings
   	Use this option to turn on GCC compiler warnings.
 
-  --with-cfg-file=XXX			(defines LYNX_CFG_FILE)
-	Use this option to override the location of the site
-	configuration file's pathname.  It defaults to $libdir/lynx.cfg,
-	where $libdir is set in the configure script, e.g., to
-	/usr/local/lib.
-
-  --with-lss-file=XXX			(defines LYNX_LSS_FILE)
-	Use this option to override the location of the site
-	style-sheet file's pathname.  It defaults to $libdir/lynx.lss,
-	where $libdir is set in the configure script, e.g., to
-	/usr/local/lib.
-
   --with-screen=XXX
 	Use this option to select the screen type.  The option value,
 	XXX must be one of curses (the default), ncurses or slang.
diff --git a/RELEASE_STATEMENT b/RELEASE_STATEMENT
deleted file mode 100644
index 04b58854..00000000
--- a/RELEASE_STATEMENT
+++ /dev/null
@@ -1,30 +0,0 @@
-
-Lynx Ver. 2.7.1 is now available.
-
-	Lynx is a hypertext browser with full World Wide Web capabilities.
-It is distributed under the GNU General Public License without restrictions
-on usage or redistribution, and is supported by the Lynx user community.
-The Lynx copyright statement and GNU GPL are included in the about_lynx
-subdirectory of the distribution.
-
-	Links to the current sources and support materials for Lynx
-are maintained in the:
-			 "Lynx links"
-	<URL:http://www.crl.com/~subir/lynx.html>
-
-	Version 2.7.1 is an official release of the Lynx2-7 code set
-plus bug fixes through April 4, 1997.
-
-	See the CHANGES file in the Lynx distribution for a complete list of
-changes and bug fixes in this release.
-
-	A majordomo list exists for the distribution of Lynx related
-information, updates, and development discussion.
-o	lynx-dev@sig.net
-
-	Send a subscribe request (subscribe lynx-dev) to majordomo@sig.net
-to be added to the list.  All new releases will be announced on this list.
-To unsubscribe, you should send an unsubscribe request (unsubscribe lynx-dev)
-addressed to the majordomo (majordomo@sig.net).  Please DO NOT send your
-subscribe or unsubscribe requests to the lynx-dev list directly!!!!.
-
diff --git a/WWW/Library/Implementation/HTChunk.c b/WWW/Library/Implementation/HTChunk.c
index 497e5173..fd66a482 100644
--- a/WWW/Library/Implementation/HTChunk.c
+++ b/WWW/Library/Implementation/HTChunk.c
@@ -116,14 +116,15 @@ PUBLIC void HTChunkPutb ARGS3 (HTChunk *,ch, CONST char *,b, int,l)
     ch->size += l;
 }
 
-#ifdef EXP_CHARTRANS
-
 #define PUTC(code) ch->data[ch->size++] = (char)(code)
 #define PUTC2(code) ch->data[ch->size++] = (char)(0x80|(0x3f &(code)))
 
-PUBLIC void HTChunkPutUtf8Char ARGS2 (HTChunk *,ch, UCode_t,code)
+PUBLIC void HTChunkPutUtf8Char ARGS2(
+	HTChunk *,	ch,
+	UCode_t,	code)
 {
     int utflen;
+
     if (code < 128)
 	utflen = 1;
     else if   (code <     0x800L) {
@@ -148,7 +149,7 @@ PUBLIC void HTChunkPutUtf8Char ARGS2 (HTChunk *,ch, UCode_t,code)
           outofmem(__FILE__, "HTChunkPutUtf8Char");
     }
 
-    switch(utflen) {
+    switch (utflen) {
     case 0:
 	return;
     case 1:
@@ -169,7 +170,7 @@ PUBLIC void HTChunkPutUtf8Char ARGS2 (HTChunk *,ch, UCode_t,code)
     case 6:
 	PUTC(0xfc | (code>>30));
     }
-    switch(utflen) {
+    switch (utflen) {
     case 6:
 	PUTC2(code>>24);
     case 5:
@@ -183,8 +184,6 @@ PUBLIC void HTChunkPutUtf8Char ARGS2 (HTChunk *,ch, UCode_t,code)
     }
 }
 
-#endif /* EXP_CHARTRANS */
-
 /*	Terminate a chunk
 **	-----------------
 */
diff --git a/WWW/Library/Implementation/HTFTP.c b/WWW/Library/Implementation/HTFTP.c
index 0e5b801b..701490e9 100644
--- a/WWW/Library/Implementation/HTFTP.c
+++ b/WWW/Library/Implementation/HTFTP.c
@@ -759,21 +759,21 @@ PRIVATE int get_connection ARGS2(
       }
     server_type = GENERIC_SERVER;	/* reset */
     if (status == 2) {		/* Send username */
-	{
-	    char *cp;		/* look at greeting text */
-	    if (strlen(response_text) > 4) {
-		if ((cp = strstr(response_text, " awaits your command")) ||
-		    (cp = strstr(response_text, " ready."))) {
-		    *cp = '\0';
-		}
-		cp = response_text + 4;
-		if (!strncasecomp(cp, "NetPresenz", 10))
-		    server_type = NETPRESENZ_SERVER;
-	    } else {
-		cp = response_text;
+	char *cp;		/* look at greeting text */
+
+	if (strlen(response_text) > 4) {
+	    if ((cp = strstr(response_text, " awaits your command")) ||
+		(cp = strstr(response_text, " ready."))) {
+		*cp = '\0';
 	    }
-	    StrAllocCopy(anchor->server, cp);
+	    cp = response_text + 4;
+	    if (!strncasecomp(cp, "NetPresenz", 10))
+		server_type = NETPRESENZ_SERVER;
+	} else {
+	    cp = response_text;
 	}
+	StrAllocCopy(anchor->server, cp);
+
 	if (username && *username) {
 	    command = (char*)malloc(10+strlen(username)+2+1);
 	    if (command == NULL)
@@ -2232,7 +2232,7 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2(
     return(entry_info);
 } /* parse_dir_entry */
 
-PUBLIC int compare_EntryInfo_structs ARGS2(
+PRIVATE int compare_EntryInfo_structs ARGS2(
 	EntryInfo *,	entry1, 
 	EntryInfo *,	entry2)
 {
diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c
index 45bd6464..6ef0fde1 100644
--- a/WWW/Library/Implementation/HTFile.c
+++ b/WWW/Library/Implementation/HTFile.c
@@ -873,16 +873,6 @@ PUBLIC HTFormat HTCharsetFormat ARGS3(
 	*cp4 = '\0';
 	cp4 = cp3;
 	chndl = UCGetLYhndl_byMIME(cp3);
-	if (chndl < 0) {
-	    if (!strcmp(cp4, "cn-big5")) {
-		cp4 += 3;
-		chndl = UCGetLYhndl_byMIME(cp4);
-	    } else if (!strncmp(cp4, "cn-gb", 5)) {
-		StrAllocCopy(cp3, "gb2312");
-		cp4 = cp3;
-		chndl = UCGetLYhndl_byMIME(cp4);
-	    }
-	}
 	if (UCCanTranslateFromTo(chndl, current_char_set)) {
 	    chartrans_ok = YES;
 	    *cp1 = '\0';
@@ -1010,7 +1000,7 @@ PUBLIC HTFormat HTCharsetFormat ARGS3(
 	    HTAlert(anchor->charset);
 	} else if (!strncmp(cp2, "koi8-r", 6) &&
 		   !strncmp(LYchar_set_names[current_char_set],
-			    "KOI8-R character set", 20)) {
+			    "KOI8-R Cyrillic", 15)) {
 	    *cp1 = '\0';
 	    format = HTAtom_for(cp);
 	    StrAllocCopy(anchor->charset, "koi8-r");
@@ -2446,7 +2436,7 @@ PUBLIC int HTLoadFile ARGS4(
 		return status;
 	    }  /* If succesfull open */
 	    FREE(localname);
-	}    /* scope of fp */
+	}  /* scope of fp */
     }  /* local unix file system */    
 #endif /* !NO_UNIX_IO */
 #endif /* VMS */
@@ -2487,8 +2477,6 @@ PUBLIC int HTLoadFile ARGS4(
 
 	return HTLoadError(sink, 403, "Can't access requested file.");
     }
-    
- 
 }
 
 /*
diff --git a/WWW/Library/Implementation/HTMIME.c b/WWW/Library/Implementation/HTMIME.c
index ecd61ac2..b694bb05 100644
--- a/WWW/Library/Implementation/HTMIME.c
+++ b/WWW/Library/Implementation/HTMIME.c
@@ -377,16 +377,6 @@ PRIVATE void HTMIME_put_character ARGS2(
 			    *cp4 = '\0';
 			    cp4 = cp3;
 			    chndl = UCGetLYhndl_byMIME(cp3);
-			    if (chndl < 0) {
-				if (!strcmp(cp4, "cn-big5")) {
-				    cp4 += 3;
-				    chndl = UCGetLYhndl_byMIME(cp4);
-				} else if (!strncmp(cp4, "cn-gb", 5)) {
-				    StrAllocCopy(cp3, "gb2312");
-				    cp4 = cp3;
-				    chndl = UCGetLYhndl_byMIME(cp4);
-				}
-			    }
 			    if (UCCanTranslateFromTo(chndl,
 						     current_char_set)) {
 				chartrans_ok = YES;
@@ -535,7 +525,7 @@ PRIVATE void HTMIME_put_character ARGS2(
 			    } else if
 			       (!strncmp(cp2, "koi8-r", 6) &&
 				!strncmp(LYchar_set_names[current_char_set],
-					 "KOI8-R character set", 20)) {
+					 "KOI8-R Cyrillic", 15)) {
 				*cp1 = '\0';
 				me->format = HTAtom_for(cp);
 				StrAllocCopy(me->anchor->charset,
diff --git a/WWW/Library/Implementation/HTML.h b/WWW/Library/Implementation/HTML.h
index f1653cf1..42bf4638 100644
--- a/WWW/Library/Implementation/HTML.h
+++ b/WWW/Library/Implementation/HTML.h
@@ -146,12 +146,46 @@ struct _HTStructured {
 
     BOOL		needBoldH;
 
-#ifdef EXP_CHARTRANS
-    LYUCcharset	* UCI;	/* pointer to node_anchor's UCInfo */
-    int	UCLYhndl;		/* tells us what charset we are fed */
-    UCTransParams T;
+    /*
+    **  UCI and UCLYhndl give the UCInfo and charset registered for
+    **  the HTML parser in the node_anchor's UCStages structure.  It
+    **  indicates what is fed to the HTML parser as the stream of character
+    **  data (not necessarily tags and attributes).  It should currently
+    **  always be set to be the same as UCI and UCLhndl for the HTEXT stage
+    **  in the node_anchor's UCStages structure, since the HTML parser sends
+    **  its input character data to the output without further charset
+    **  translation.
+    */
+    LYUCcharset	*	UCI;
+    int			UCLYhndl;
+    /*
+    **  inUCI and inUCLYhndl indicate the UCInfo and charset which the
+    **  HTML parser treats at the input charset.  It is normally set
+    **  to the UCI and UCLhndl for the SGML parser in the node_anchor's
+    **  UCStages structure (which may be a dummy, based on the MIME
+    **  parser's UCI and UCLhndl in that structure, when we are handling
+    **  a local file or non-http(s) gateway).  It could be changed
+    **  temporarily by the HTML parser, for conversions of attribute
+    **  strings, but should be reset once done. - FM
+    */
+    LYUCcharset	*	inUCI;
+    int			inUCLYhndl;
+    /*
+    **  outUCI and outUCLYhndl indicate the UCInfo and charset which
+    **  the HTML parser treats as the output charset.  It is normally
+    **  set to its own UCI and UCLhndl.  It could be changed for
+    **  conversions of attribute strings, but should be reset once
+    **  done. - FM
+    */
+    LYUCcharset	*	outUCI;
+    int			outUCLYhndl;
+    /*
+    **  T holds the transformation rules for conversions of strings
+    **  between the input and output charsets by the HTML parser. - FM
+    */
+    UCTransParams	T;
+
     int 		tag_charset; /* charset for attribute values etc. */
-#endif
 };
 
 struct _HTStream {
diff --git a/WWW/Library/Implementation/HTMLDTD.c b/WWW/Library/Implementation/HTMLDTD.c
index cbeb35f9..e2ac932d 100644
--- a/WWW/Library/Implementation/HTMLDTD.c
+++ b/WWW/Library/Implementation/HTMLDTD.c
@@ -440,9 +440,8 @@ static CONST UC_entity_info extra_entities[] = {
   {"zcaron",	0x017e},  /* z with caron */
   {"zdot",	0x017c},  /* z with dot above */
   {"zeta",	0x03b6},  /* greek small letter zeta,  u+03B6 ISOgrk3 -- */
-  {"zwj",	 8205},	/* zero width joiner */ 
-  {"zwnj",	 8204},	/* zero width non-joiner */ 
-
+  {"zwj",	  8205},  /* zero width joiner */ 
+  {"zwnj",	  8204},  /* zero width non-joiner */ 
 };
 #endif /* EXP_CHARTRANS */
 
diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c
index adc9568b..bb3481d9 100644
--- a/WWW/Library/Implementation/HTNews.c
+++ b/WWW/Library/Implementation/HTNews.c
@@ -1010,11 +1010,11 @@ PRIVATE int read_article NOARGS
 		}
 
 		if (full_line[0] == '.') {	
-		    if (full_line[1] < ' ') {		/* End of article? */
+		    if ((unsigned char)full_line[1] < ' ') {		/* End of article? */
 			done = YES;
 			break;
 		    }
-		} else if (full_line[0] < ' ') {
+		} else if ((unsigned char)full_line[0] < ' ') {
 		    break;		/* End of Header? */
 
 		} else if (match(full_line, "SUBJECT:")) {
@@ -1273,7 +1273,7 @@ PRIVATE int read_article NOARGS
 	    if (TRACE)
 	        fprintf(stderr, "B %s", line);
 	    if (line[0] == '.') {
-		if (line[1] < ' ') {		/* End of article? */
+		if ((unsigned char)line[1] < ' ') {		/* End of article? */
 		    done = YES;
 		    break;
 		} else {			/* Line starts with dot */
@@ -1411,6 +1411,7 @@ PRIVATE int read_list ARGS1(char *, arg)
     BOOL done = NO;
     BOOL head = NO;
     BOOL tail = NO;
+    BOOL skip_this_line = NO, skip_rest_of_line = NO;
     int listing = 0;
     char *pattern = NULL;
     int len = 0;
@@ -1455,7 +1456,7 @@ PRIVATE int read_list ARGS1(char *, arg)
     START(HTML_DLC);
     PUTC('\n');
     while (!done) {
-	char ch = *p++ = NEXT_CHAR;
+	char ch = NEXT_CHAR;
 	if (ch == (char)EOF) {
 	    if (interrupted_in_htgetcharacter) {
 		interrupted_in_htgetcharacter = 0;
@@ -1470,13 +1471,47 @@ PRIVATE int read_list ARGS1(char *, arg)
 	    abort_socket();	/* End of file, close socket */
 	    FREE(pattern);
 	    return(HT_LOADED);	/* End of file on response */
+	} else if (skip_this_line) {
+	    if (ch == LF) {
+		skip_this_line = skip_rest_of_line = NO;
+		p = line;
+	    }
+	    continue;
+	} else if (skip_rest_of_line) {
+	    if (ch != LF) {
+		continue;
+	    }
+	} else if (p == &line[LINE_LENGTH]) {
+	    if (TRACE) {
+	        fprintf(stderr, "b %.*s%c[...]\n", (LINE_LENGTH), line, ch);
+	    }
+	    *p = '\0';
+	    if (ch == LF) {
+		;		/* Will be dealt with below */
+	    } else if (WHITE(ch)) {
+		ch = LF;	/* May treat as line without description */
+		skip_this_line = YES; /* ...and ignore until LF */
+	    } else if (strchr(line, ' ') == NULL &&
+		       strchr(line, '\t') == NULL) {
+		/* No separator found */
+		if (TRACE)
+		    fprintf(stderr,
+			    "HTNews..... group name too long, discarding.\n");
+		skip_this_line = YES; /* ignore whole line */
+		continue;
+	    } else {
+		skip_rest_of_line = YES; /* skip until ch == LF found */
+	    }
+	} else {
+	    *p++ = ch;
 	}
-	if ((ch == LF) || (p == &line[LINE_LENGTH])) {
-	    *p++ = '\0';			/* Terminate the string */
+	if (ch == LF) {
+	    skip_rest_of_line = NO; /* done, reset flag */
+	    *p = '\0';			/* Terminate the string */
 	    if (TRACE)
 	        fprintf(stderr, "B %s", line);
 	    if (line[0] == '.') {
-		if ((unsigned char)line[1] < ' ') {		/* End of article? */
+		if ((unsigned char)line[1] < ' ') {		/* End of list? */
 		    done = YES;
 		    break;
 		} else {			/* Line starts with dot */
@@ -1670,11 +1705,11 @@ PRIVATE int read_group ARGS3(
 		    return(HT_LOADED);	/* End of file on response */
 		}
 		if ((ch == '\n') || (p == &line[LINE_LENGTH])) {
-		    *p++ = '\0';		/* Terminate the string */
+		    *p = '\0';		/* Terminate the string */
 		    if (TRACE)
 		        fprintf(stderr, "X %s", line);
 		    if (line[0] == '.') {
-			if (line[1] < ' ') {	/* End of article? */
+			if (line[1] < ' ') {	/* End of response? */
 			    done = YES;
 			    break;
 			} else {		/* Line starts with dot */
@@ -1782,7 +1817,7 @@ PRIVATE int read_group ARGS3(
 			switch(line[0]) {
 
 			case '.':
-			    done = (line[1] < ' ');	/* End of article? */
+			    done = ((unsigned char)line[1] < ' ');  /* End of response? */
 			    break;
 
 			case 'S':
diff --git a/WWW/Library/Implementation/HTParse.c b/WWW/Library/Implementation/HTParse.c
index 6f558ef5..ab5149b0 100644
--- a/WWW/Library/Implementation/HTParse.c
+++ b/WWW/Library/Implementation/HTParse.c
@@ -65,7 +65,7 @@ PRIVATE void scan ARGS2(
     char * p;
 #ifdef NOTDEFINED
     int length = strlen(name);
-#endif
+#endif /* NOTDEFINED */
     
     parts->access = NULL;
     parts->host = NULL;
@@ -89,7 +89,7 @@ PRIVATE void scan ARGS2(
     }
     
 #ifdef NOTDEFINED
-    for (p = (name + length-1); p >= name; p--) {
+    for (p = (name + length-1); p >= name; p--) {}
 #endif /* NOTDEFINED */
     /*
     **  Scan left-to-right for a fragment (anchor).
@@ -699,7 +699,10 @@ PUBLIC char * HTUnEscape ARGS1(
 
     while (*p != '\0') {
         if (*p == HEX_ESCAPE &&
-	    p[1] && p[2] &&	/* tests shouldn't be needed, but.. */
+	    /*
+	     *  Tests shouldn't be needed, but better safe than sorry.
+	     */
+	    p[1] && p[2] &&
 	    isxdigit((unsigned char)p[1]) &&
 	    isxdigit((unsigned char)p[2])) {
 	    p++;
diff --git a/WWW/Library/Implementation/HTParse.h b/WWW/Library/Implementation/HTParse.h
index 63c84739..2f77f079 100644
--- a/WWW/Library/Implementation/HTParse.h
+++ b/WWW/Library/Implementation/HTParse.h
@@ -154,9 +154,11 @@ extern char * HTUnEscapeSome PARAMS((
 	char *		str,
 	CONST char *	do_trans));
 
-/* Turn a string which is not a RFC 822 token into a quoted-string - kw */
+/*
+**  Turn a string which is not a RFC 822 token into a quoted-string. - KW
+*/
 extern void HTMake822Word PARAMS((
-	char **	str));
+	char **		str));
 
 #endif  /* HTPARSE_H */
 
diff --git a/WWW/Library/Implementation/HTPlain.c b/WWW/Library/Implementation/HTPlain.c
index c95f55a8..277a6ebf 100644
--- a/WWW/Library/Implementation/HTPlain.c
+++ b/WWW/Library/Implementation/HTPlain.c
@@ -8,6 +8,7 @@
 **		strings written must be less than buffer size.
 */
 #include "HTUtils.h"
+#include "tcp.h"
 
 #include "HTPlain.h"
 
@@ -32,10 +33,8 @@ extern HTStyleSheet * styleSheet;
 extern int current_char_set;
 extern CONST char * LYchar_set_names[];
 extern CONST char **LYCharSets[];
-#ifdef EXP_CHARTRANS
 extern int LYlowest_eightbit[];
 extern BOOLEAN LYRawMode;
-#endif /* EXP_CHARTRANS */
 extern CONST char * HTMLGetEntityName PARAMS((int i));
 extern BOOL HTPassEightBitRaw;
 extern BOOL HTPassHighCtrlRaw;
@@ -47,24 +46,19 @@ PUBLIC int HTPlain_lastraw = -1;
 **		-----------
 */
 struct _HTStream {
-	CONST HTStreamClass *	isa;
-
-	HText * 		text;
-#ifdef EXP_CHARTRANS
+    CONST HTStreamClass *	isa;
+    HText *			text;
     LYUCcharset	* UCI;	/* pointer to node_anchor's UCInfo */
     int	in_char_set;		/* tells us what charset we are fed */
-    int	htext_char_set;		/* what charset feed to HText */
-    char                utf_count;
-    long                utf_char;
-    char	utf_buf[7];
-    char *	utf_buf_p;
-    UCTransParams T;
-#endif /* EXP_CHARTRANS */
+    int	htext_char_set;		/* what charset we feed to HText */
+    char			utf_count;
+    UCode_t			utf_char;
+    char 			utf_buf[8];
+    char *			utf_buf_p;
+    UCTransParams		T;
 };
 
-#ifdef EXP_CHARTRANS
-
-PRIVATE char replace_buf [61];        /* buffer for replacement strings */
+PRIVATE char replace_buf [64];        /* buffer for replacement strings */
 
 PRIVATE void HTPlain_getChartransInfo ARGS2(
 	HTStream *,		me,
@@ -88,7 +82,6 @@ PRIVATE void HTPlain_getChartransInfo ARGS2(
     }
     me->UCI = HTAnchor_getUCInfoStage(anchor, UCT_STAGE_PARSER);
 }
-#endif /* EXP_CHARTRANS */
 
 /*	Write the buffer out to the socket
 **	----------------------------------
@@ -140,13 +133,14 @@ PRIVATE void HTPlain_put_character ARGS2(
     HTPlain_lastraw = c;
     if (c == '\r') {
 	HText_appendCharacter(me->text, '\n');
-#ifdef EXP_CHARTRANS
-      /* for now don't repeat everything here that has been done below - kw*/
-    } else if ((unsigned char)c >= 127) {
-	HTPlain_write(me, &c, 1);
-#endif
     } else if (HTCJK != NOCJK) {
 	HText_appendCharacter(me->text, c);
+    } else if ((unsigned char)c >= 127) {
+	/*
+	**  For now, don't repeat everything here
+	**  that has been done below - KW
+	*/
+	HTPlain_write(me, &c, 1);
     } else if ((unsigned char)c >= 127 && (unsigned char)c < 161 &&
     	       HTPassHighCtrlRaw) {
 	HText_appendCharacter(me->text, c);
@@ -159,7 +153,7 @@ PRIVATE void HTPlain_put_character ARGS2(
 	HText_appendCharacter(me->text, c);
     } else if ((unsigned char)c > 160) {
 	if (!HTPassEightBitRaw &&
-	    strncmp(LYchar_set_names[current_char_set], "ISO Latin 1", 11)) {
+	    current_char_set != 0) {
 	    int len, high, low, i, diff = 1;
 	    CONST char * name;
 	    int value = (int)((unsigned char)c - 160);
@@ -217,11 +211,10 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 {
     CONST char * p;
     CONST char * e = s+l;
-#ifdef EXP_CHARTRANS
     BOOL chk;
-    long unsign_c, uck;
+    UCode_t code;
+    long uck;
     char c_p;
-#endif /* EXP_CHARTRANS */
 
     for (p = s; p < e; p++) {
 #ifdef REMOVE_CR_ONLY
@@ -247,8 +240,7 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 	    HText_appendCharacter(me->text, '\n');
 	    continue;
 	}
-#ifdef EXP_CHARTRANS
-	unsign_c = (unsigned char)(*p);
+	code = (unsigned char)*p;
 	c_p = *p;
 
 	if (me->T.decode_utf8) {
@@ -257,20 +249,31 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 	    **  Incomplete characters silently ignored.
 	    **  from Linux kernel's console.c
 	    */
-	    if ((unsigned char)(*p) > 0x7f) {
+	    if ((unsigned char)(*p) > 127) {
 		if (me->utf_count > 0 && (*p & 0xc0) == 0x80) {
 		    me->utf_char = (me->utf_char << 6) | (*p & 0x3f);
 		    me->utf_count--;
-		    *(me->utf_buf_p++) = *p;
+		    *(me->utf_buf_p) = *p;
+		    (me->utf_buf_p)++;
 		    if (me->utf_count == 0) {
+		        /*
+			**  Got a complete multibyte character.
+			*/
 			*(me->utf_buf_p) = '\0';
-			unsign_c = me->utf_char;
-			if (unsign_c<256) c_p = (char)unsign_c;
+			code = me->utf_char;
+			if (code < 256) {
+			    c_p = FROMASCII((char)code);
+			}
+		    } else {
+			continue;  /* iterate for more */
 		    }
-		    else continue;  /* iterate for more */
 		} else {
+		    /*
+		    **  Accumulate a multibyte character.
+		    */
 		    me->utf_buf_p = me->utf_buf;
-		    *(me->utf_buf_p++) = *p;
+		    *(me->utf_buf_p) = *p;
+		    (me->utf_buf_p)++;
 		    if ((*p & 0xe0) == 0xc0) {
 			me->utf_count = 1;
 			me->utf_char = (*p & 0x1f);
@@ -286,14 +289,20 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 		    } else if ((*p & 0xfe) == 0xfc) {
 			me->utf_count = 5;
 			me->utf_char = (*p & 0x01);
-		    } else { /* garbage */
+		    } else {
+			/*
+			 *  Garbage.
+			 */
 			me->utf_count = 0;
 			me->utf_buf_p = me->utf_buf;
 			*(me->utf_buf_p) = '\0';
 		    }
 		    continue; /* iterate for more */
 		}
-	    } else {	/* got an ASCII char */
+	    } else {
+	        /*
+		**  Got an ASCII character.
+		*/
 		me->utf_count = 0;
 		me->utf_buf_p = me->utf_buf;
 		*(me->utf_buf_p) = '\0';
@@ -301,25 +310,21 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 	}
 	
 	if (me->T.trans_to_uni &&
-	    (unsign_c >= 127 ||
-	     (unsign_c < 32 && unsign_c != 0 && me->T.trans_C0_to_uni))) {
-	    unsign_c = UCTransToUni(c_p, me->in_char_set);
-	    if (unsign_c > 0) {
-		if (unsign_c < 256) {
-		    c_p = (char)unsign_c;
+	    (code >= 127 ||
+	     (code < 32 && code != 0 && me->T.trans_C0_to_uni))) {
+	    code = UCTransToUni(c_p, me->in_char_set);
+	    if (code > 0) {
+		if (code < 256) {
+		    c_p = FROMASCII((char)code);
 		}
 	    }
 	}
 	/*
-	**  At this point we have either unsign_c in Unicode
-	**  (and c in latin1 if unsign_c is in the latin1 range),
-	**  or unsign_c and c will have to be passed raw.
+	**  At this point we have either code in Unicode
+	**  (and c in latin1 if code is in the latin1 range),
+	**  or code and c will have to be passed raw.
 	*/
 
-#else
-#define unsign_c (unsigned char)*p	
-#define c_p *p
-#endif /* EXP_CHARTRANS */
 	/*
 	**  If CJK mode is on, we'll assume the document matches
 	**  the user's selected character set, and if not, the
@@ -334,7 +339,7 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 #define PASSHI8BIT HTPassEightBitRaw
 #else
 #define PASSHICTRL (me->T.transp || \
-		    unsign_c >= LYlowest_eightbit[me->in_char_set])
+		    code >= LYlowest_eightbit[me->in_char_set])
 #define PASS8859SPECL me->T.pass_160_173_raw
 #define PASSHI8BIT (HTPassEightBitRaw || \
 		    (me->T.do_8bitraw && !me->T.trans_from_uni))
@@ -345,47 +350,75 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 	**  document matches and pass 127-160 8-bit characters.  If it
 	**  doesn't match, the user should toggle raw/CJK mode off. - FM
 	*/
-	} else if (unsign_c >= 127 && unsign_c < 161 &&
+	} else if (code >= 127 && code < 161 &&
 		   PASSHICTRL && PASS8859SPECL) {
 	    HText_appendCharacter(me->text, *p);
-	} else if (unsign_c == 173 && PASS8859SPECL) {
+	} else if (code == 173 && PASS8859SPECL) {
 	    HText_appendCharacter(me->text, *p);
 	/*
 	**  If neither HTPassHighCtrlRaw nor CJK is set, play it safe
 	**  and treat 160 (nbsp) as an ASCII space (32). - FM
 	*/
-	} else if (unsign_c == 160) {
+	} else if (code == 160) {
 	    HText_appendCharacter(me->text, ' ');
 	/*
 	**  If neither HTPassHighCtrlRaw nor CJK is set, play it safe
 	**  and ignore 173 (shy). - FM
 	*/
-	} else if (unsign_c == 173) {
+	} else if (code == 173) {
 	    continue;
 	/*
 	**  If we get to here, pass the displayable ASCII characters. - FM
 	*/
-	} else if ((unsign_c >= 32 && unsign_c < 127) ||
-#ifdef EXP_CHARTRANS
-		   (PASSHI8BIT && c_p>=LYlowest_eightbit[me->htext_char_set])||
-#endif
+	} else if ((code >= 32 && code < 127) ||
+		   (PASSHI8BIT &&
+		    c_p >= LYlowest_eightbit[me->htext_char_set]) ||
 		   *p == '\n' || *p == '\t') {
 	    HText_appendCharacter(me->text, c_p);
 
-#ifdef EXP_CHARTRANS
 	} else if (me->T.use_raw_char_in) {
 	    HText_appendCharacter(me->text, *p);
+#ifdef NOTUSED_FOTEMODS
+	/*
+	**  Use an ASCII space (32) for ensp, emsp or thinsp. - FM 
+	*/
+	} else if (code == 8194 || code == 8195 || code == 8201) {
+	    HText_appendCharacter(me->text, ' ');
+	/*
+	**  Use ASCII hyphen for 8211 (ndash/endash)
+	**  or 8212 (mdash/emdash). - FM
+	*/
+	} else if (code == 8211 || code == 8212) {
+	    HText_appendCharacter(me->text, '-');
+	/*
+	**  Ignore 8204 (zwnj) or 8205 (zwj), for now. - FM
+	*/
+	} else if (code == 8204 || code == 8205) {
+	    if (TRACE) {
+		fprintf(stderr,
+			"HTPlain_write: Ignoring '%ld'.\n", code);
+	    }
+	/*
+	**  Ignore 8206 (lrm) or 8207 (rlm), for now. - FM
+	*/
+	} else if (code == 8206 || code == 8207) {
+	    if (TRACE) {
+		fprintf(stderr,
+			"HTPlain_write: Ignoring '%ld'.\n", code);
+	    }
+#endif /* NOTUSED_FOTEMODS */
+
 /******************************************************************
  *   I. LATIN-1 OR UCS2  TO  DISPLAY CHARSET
  ******************************************************************/  
-	} else if ((chk = (me->T.trans_from_uni && unsign_c >= 160)) &&
-		   (uck = UCTransUniChar(unsign_c,
+	} else if ((chk = (me->T.trans_from_uni && code >= 160)) &&
+		   (uck = UCTransUniChar(code,
 					 me->htext_char_set)) >= 32 &&
 		   uck < 256) {
 	    if (TRACE) {
 		fprintf(stderr,
-			"UCTransUniChar returned 0x%lx:'%c'.\n",
-			uck, (char)uck);
+			"UCTransUniChar returned 0x%.2lX:'%c'.\n",
+			uck, FROMASCII((char)uck));
 	    }
 	    HText_appendCharacter(me->text, (char)(uck & 0xff));
 	} else if (chk &&
@@ -394,7 +427,7 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 		   /*
 		   **  Not found; look for replacement string.
 		   */
-		   (uck = UCTransUniCharStr(replace_buf,60, unsign_c,
+		   (uck = UCTransUniCharStr(replace_buf, 60, code,
 					    me->htext_char_set, 0) >= 0)) { 
 	    /*
 	    **  No further tests for valididy - assume that whoever
@@ -405,11 +438,20 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 	**  If we get to here, and should have translated,
 	**  translation has failed so far.  
 	*/
-	} else if (chk && unsign_c > 127 && me->T.output_utf8 &&
-		   *me->utf_buf) {
-	    HText_appendText(me->text, me->utf_buf);
-	    me->utf_buf_p = me->utf_buf;
-	    *(me->utf_buf_p) = '\0';
+	} else if (chk && code > 127 && me->T.output_utf8) {
+	    /*
+	    **  We want UTF-8 output, so do it now. - FM
+	    */
+	    if (*me->utf_buf) {
+		HText_appendText(me->text, me->utf_buf);
+		me->utf_buf_p = me->utf_buf;
+		*(me->utf_buf_p) = '\0';
+	    } else if (UCConvertUniToUtf8(code, replace_buf)) {
+		HText_appendText(me->text, replace_buf);
+	    } else {
+		sprintf(replace_buf, "U%.2lX", code);
+		HText_appendText(me->text, replace_buf);
+	    }
 	} else if (me->T.strip_raw_char_in &&
 		   (unsigned char)*p >= 0xc0 &&
 		   (unsigned char)*p < 255) {
@@ -418,32 +460,30 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 	    **  (somewhat) readable ASCII.
 	    */
 	    HText_appendCharacter(me->text, (char)(*p & 0x7f));
-	} else if (me->T.trans_from_uni && unsign_c > 255) {
+	} else if (me->T.trans_from_uni && code > 255) {
 	    if (PASSHI8BIT && PASSHICTRL && LYRawMode &&
 		(unsigned char)*p >= LYlowest_eightbit[me->htext_char_set]) {
 		HText_appendCharacter(me->text, *p);
 	    } else {
-		sprintf(replace_buf, "U%.2lx", unsign_c);
+		sprintf(replace_buf, "U%.2lX", code);
 		HText_appendText(me->text, replace_buf);
 	    }
-#endif /* EXP_CHARTRANS */
-
 	/*
 	**  If we get to here and HTPassEightBitRaw or the
 	**  selected character set is not "ISO Latin 1",
 	**  use the translation tables for 161-255 8-bit
 	**  characters (173 was handled above). - FM
 	*/
-	} else if (unsign_c > 160) {
-	    if (!HTPassEightBitRaw && unsign_c <= 255 &&
-		strncmp(LYchar_set_names[current_char_set],
-		   	"ISO Latin 1", 11)) {
+	} else if (code > 160) {
+	    if (!HTPassEightBitRaw && code <= 255 &&
+		me->htext_char_set != 0) {
 		/*
 		**  Attempt to translate. - FM
 		*/
 		int len, high, low, i, diff=1;
 		CONST char * name;
-		int value = (int)(unsign_c - 160);
+		int value = (int)(code - 160);
+
 		name = HTMLGetEntityName(value);
 		len =  strlen(name);
 		for(low = 0, high = HTML_dtd.number_of_entities;
@@ -454,7 +494,7 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 		    diff = strncmp(HTML_dtd.entity_names[i], name, len);
 		    if (diff == 0) {
 			HText_appendText(me->text,
-					 LYCharSets[current_char_set][i]);
+					 LYCharSets[me->htext_char_set][i]);
 			break;
 		    }
 		}
@@ -466,7 +506,7 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 		    */
 #ifdef EXP_CHARTRANS
 		    if (!PASSHI8BIT)
-			c_p = (char)unsign_c;
+			c_p = FROMASCII((char)code);
 		    if (me->T.output_utf8 &&
 			*me->utf_buf) {
 			HText_appendText(me->text, me->utf_buf);
@@ -474,7 +514,7 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 			*(me->utf_buf_p) = '\0';
 
 		    } else if (me->T.trans_from_uni) {
-			sprintf(replace_buf,"U%.2lx",unsign_c);
+			sprintf(replace_buf, "U%.2lX", code);
 			HText_appendText(me->text, replace_buf);
 		    } else
 #endif /* EXP_CHARTRANS */
@@ -484,15 +524,12 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 	        /*
 		**  Didn't attempt a translation. - FM
 		*/
-#ifdef EXP_CHARTRANS
-		    /*  either output as UTF8 or a hex representation or
-		    **  pass the raw character and hope it's OK.
-		    */
-		if (unsign_c <= 255 && !PASSHI8BIT)
-		    c_p = (char)unsign_c;
-		if (unsign_c > 127 &&
-		    me->T.output_utf8 &&
-		    *me->utf_buf) {
+		/*  Either output as UTF8 or a hex representation or
+		**  pass the raw character and hope it's OK.
+		*/
+		if (code <= 255 && !PASSHI8BIT)
+		    c_p = FROMASCII((char)code);
+		if (code > 127 && me->T.output_utf8 && *me->utf_buf) {
 		    HText_appendText(me->text, me->utf_buf);
 		    me->utf_buf_p = me->utf_buf;
 		    *(me->utf_buf_p) = '\0';
@@ -503,11 +540,10 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l)
 			   (unsigned char)c_p >=
 			             LYlowest_eightbit[me->htext_char_set]) {
 		    HText_appendCharacter(me->text, c_p);
-		} else if (me->T.trans_from_uni && unsign_c >= 127) {
-		    sprintf(replace_buf,"U%.2lx",unsign_c);
+		} else if (me->T.trans_from_uni && code >= 127) {
+		    sprintf(replace_buf, "U%.2lX", code);
 		    HText_appendText(me->text, replace_buf);
 		} else
-#endif /* EXP_CHARTRANS */
 	        HText_appendCharacter(me->text, c_p);
 	    }
 	}
@@ -541,7 +577,7 @@ PRIVATE void HTPlain_abort ARGS2(
 */
 PUBLIC CONST HTStreamClass HTPlain =
 {		
-	"SocketWriter",
+	"PlainPresenter",
 	HTPlain_free,
 	HTPlain_abort,
 	HTPlain_put_character, 	HTPlain_put_string, HTPlain_write,
@@ -566,7 +602,7 @@ PUBLIC HTStream* HTPlainPresent ARGS3(
 #ifdef EXP_CHARTRANS
     me->utf_count = 0;
     me->utf_char = 0;
-    me->utf_buf[0] = me->utf_buf[6] = '\0';
+    me->utf_buf[0] = me->utf_buf[6] =me->utf_buf[7] = '\0';
     me->utf_buf_p = me->utf_buf;
     me->htext_char_set =
 		      HTAnchor_getUCLYhndl(anchor,UCT_STAGE_HTEXT);
diff --git a/WWW/Library/Implementation/HTString.c b/WWW/Library/Implementation/HTString.c
index 3f3c9f4b..2ffa3e51 100644
--- a/WWW/Library/Implementation/HTString.c
+++ b/WWW/Library/Implementation/HTString.c
@@ -180,8 +180,11 @@ PUBLIC char * HTNextField ARGS1(
 **      found   points to the delimiter found unless it was NULL.
 **	Returns	a pointer to the first word or NULL on error
 */
-PUBLIC char * HTNextTok (char ** pstr,
-		      const char * delims, const char * bracks, char * found)
+PUBLIC char * HTNextTok ARGS4(
+	char **,	pstr,
+	const char *,	delims,
+	const char *,	bracks,
+	char *,		found)
 {
     char * p = *pstr;
     char * start = NULL;
diff --git a/WWW/Library/Implementation/HTString.h b/WWW/Library/Implementation/HTString.h
index ffc79e64..fb2d3397 100644
--- a/WWW/Library/Implementation/HTString.h
+++ b/WWW/Library/Implementation/HTString.h
@@ -43,8 +43,8 @@ Next word or quoted string
 extern char * HTNextField PARAMS ((char** pstr));
 
 /* A more general parser - kw */
-extern char * HTNextTok (char ** pstr,
-		      const char * delims, const char * bracks, char * found);
+extern char * HTNextTok PARAMS((char ** pstr,
+		      const char * delims, const char * bracks, char * found));
 
 #endif
 /*
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index 2fc9145b..595f39bd 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -364,10 +364,20 @@ try_again:
       }
 
       if (!(LYUserSpecifiedURL ||
-      	    LYNoRefererHeader || LYNoRefererForThis) &&
-         strcmp((char *)HTLoadedDocumentURL(), "")) {
+	    LYNoRefererHeader || LYNoRefererForThis) &&
+	  strcmp(HTLoadedDocumentURL(), "")) {
+	  char *cp = HTLoadedDocumentURL();
           StrAllocCat(command, "Referer: ");
-          StrAllocCat(command, (char *)HTLoadedDocumentURL());
+	  if (!strncasecomp(cp, "LYNXIMGMAP:", 11)) {
+	      char *cp1 = strchr(cp, '#');
+	      if (cp1)
+		  *cp1 = '\0';
+	      StrAllocCat(command, cp + 11);
+	      if (cp1)
+		  *cp1 = '#';
+	  } else {
+	      StrAllocCat(command, cp);
+	  }
           sprintf(line, "%c%c", CR, LF);
           StrAllocCat(command, line);
       }
@@ -653,7 +663,7 @@ try_again:
     BOOL end_of_file = NO;
     int buffer_length = INIT_LINE_SIZE;
 
-    line_buffer = (char *) calloc(1, buffer_length * sizeof(char));
+    line_buffer = (char *)calloc(1, (buffer_length * sizeof(char)));
 
     do {/* Loop to read in the first line */
         /*
@@ -662,7 +672,7 @@ try_again:
         if (buffer_length - length < LINE_EXTEND_THRESH) {
             buffer_length = buffer_length + buffer_length;
             line_buffer = 
-              (char *) realloc(line_buffer, buffer_length * sizeof(char));
+              (char *)realloc(line_buffer, (buffer_length * sizeof(char)));
         }
         if (TRACE)
             fprintf (stderr, "HTTP: Trying to read %d\n",
@@ -672,8 +682,10 @@ try_again:
         if (TRACE)
             fprintf (stderr, "HTTP: Read %d\n", status);
         if (status <= 0) {
-            /* Retry if we get nothing back too; 
-               bomb out if we get nothing twice. */
+            /*
+	     *  Retry if we get nothing back too.
+             *  Bomb out if we get nothing twice.
+	     */
             if (status == HT_INTERRUPTED) {
                 if (TRACE)
                     fprintf (stderr, "HTTP: Interrupted initial read.\n");
@@ -728,7 +740,7 @@ try_again:
 
         if (line_buffer) {
             FREE(line_kept_clean);
-            line_kept_clean = (char *)malloc (buffer_length * sizeof (char));
+            line_kept_clean = (char *)malloc(buffer_length * sizeof(char));
             memcpy(line_kept_clean, line_buffer, buffer_length);
         }
 
@@ -924,8 +936,9 @@ try_again:
 		 *  No Content.
 		 */
 	        HTAlert(line_buffer);
+                HTTP_NETCLOSE(s, handle);
 	        status = HT_NO_DATA;
-	        goto done;
+	        goto clean_up;
 		break;
 
 	      case 205:
@@ -937,8 +950,9 @@ try_again:
 		 *  document. - FM
 		 */
 	        HTAlert("Request fulfilled.  Reset Content.");
+                HTTP_NETCLOSE(s, handle);
 	        status = HT_NO_DATA;
-	        goto done;
+	        goto clean_up;
 		break;
 
 	      case 206:
@@ -951,7 +965,7 @@ try_again:
 	        HTAlert(line_buffer);
                 HTTP_NETCLOSE(s, handle);
 	        status = HT_NO_DATA;
-	        goto done;
+	        goto clean_up;
 		break;
 
 	      default:
diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c
index 6e64714f..4af1fab9 100644
--- a/WWW/Library/Implementation/SGML.c
+++ b/WWW/Library/Implementation/SGML.c
@@ -44,6 +44,8 @@ PUBLIC BOOL HTPassEightBitNum = FALSE;	/* Pass ^ numeric entities raw.	*/
 PUBLIC BOOL HTPassHighCtrlRaw = FALSE;	/* Pass 127-160,173,&#127; raw.	*/
 PUBLIC BOOL HTPassHighCtrlNum = FALSE;	/* Pass &#128;-&#159; raw.	*/
 
+extern UCode_t HTMLGetEntityUCValue PARAMS((CONST char *name));
+extern int LYlowest_eightbit[];
 
 /*	The State (context) of the parser
 **
@@ -79,6 +81,7 @@ struct _HTStream {
 
     HTTag 			*current_tag;
     CONST HTTag 		*unknown_tag;
+    BOOL			inSELECT;
     int 			current_attribute_number;
     HTChunk			*string;
     HTElement			*element_stack;
@@ -109,7 +112,6 @@ struct _HTStream {
     BOOL			second_bracket;
     BOOL			isHex;
 
-#ifdef EXP_CHARTRANS
     HTParentAnchor *		node_anchor;
     LYUCcharset	*		UCI;		/* pointer to anchor UCInfo */
     int				in_char_set;	/* charset we are fed	    */
@@ -121,7 +123,6 @@ struct _HTStream {
     char *			utf_buf_p;
     UCTransParams		T;
     int			current_tag_charset; /* charset to pass attributes */
-#endif /* EXP_CHARTRANS */
 
     char *			recover;
     int				recover_index;
@@ -168,7 +169,8 @@ PRIVATE void set_chartrans_handling ARGS3(
     } else if (context->T.do_8bitraw ||
 	       context->T.use_raw_char_in) {
 	context->current_tag_charset = context->in_char_set;
-    } else if (context->T.trans_from_uni || context->T.output_utf8) {
+    } else if (context->T.output_utf8 ||
+    	       context->T.trans_from_uni) {
 	context->current_tag_charset = UCGetLYhndl_byMIME("unicode-1-1-utf-8");
     } else {
 	context->current_tag_charset = 0;
@@ -321,6 +323,23 @@ PRIVATE BOOL put_special_unicodes ARGS2(
 	**  Use ASCII hyphen for ndash/endash or mdash/emdash.
 	*/
 	PUTC('-');
+#ifdef NOTUSED_FOTEMODS
+    } else if (code == 8204 || code == 8205) {
+	/*
+	**  Ignore zwnj or zwj, for now.  Note that zwnj may have
+	**  been handled as <WBR> by the calling function. - FM
+	*/
+	if (TRACE) {
+	    fprintf(stderr, "put_special_unicodes: Ignoring '%ld'.\n", code);
+	}
+    } else if (code == 8206 || code == 8207) {
+	/*
+	**  Ignore lrm or rlm, for now.
+	*/
+	if (TRACE) {
+	    fprintf(stderr, "put_special_unicodes: Ignoring '%ld'.\n", code);
+	}
+#endif /* NOTUSED_FOTEMODS */
     } else {
 	/*
 	**  Return NO if nothing done.
@@ -348,28 +367,31 @@ PRIVATE BOOL put_special_unicodes ARGS2(
 **
 ** Modified more (for use with Lynx character translation code):
 */
-
-#ifdef EXP_CHARTRANS
 PRIVATE char replace_buf [64];        /* buffer for replacement strings */
-#endif
-
 PRIVATE BOOL FoundEntity = FALSE;
 
+#define IncludesLatin1Enc(cs) \
+		(cs == 0 || \
+		 (context->htmlUCI && \
+		  (context->htmlUCI->enc & (UCT_CP_SUPERSETOF_LAT1))))
+
 PRIVATE void handle_entity ARGS2(
 	HTStream *,	context,
 	char,		term)
 {
     CONST char ** entities = context->dtd->entity_names;
+#ifdef NOTDEFINED
     CONST UC_entity_info * extra_entities = context->dtd->extra_entity_info;
-    extern int current_char_set;
     int rc;
+#endif /* NOTDEFINED */
+    UCode_t code;
+    long uck;
     CONST char *s = context->string->data;
     int high, low, i, diff;
 
     /*
-    **  Use Lynx special characters directly for nbsp, ensp, emsp,
-    **  thinsp, and shy so we go through the HTML_put_character()
-    **  filters instead of using HTML_put_string(). - FM
+    **  Use Lynx special characters for nbsp (160), ensp (8194),
+    **  emsp (8195), thinsp (8201), and shy (173). - FM
     */
     if (!strcmp(s, "nbsp")) {
         PUTC(HT_NON_BREAK_SPACE);
@@ -387,13 +409,122 @@ PRIVATE void handle_entity ARGS2(
 	return;
     }
 
+#ifdef NOTUSED_FOTEMODS
+    /*
+    **  For ndash or endash (8211), and mdash or emdash (8212),
+    **  use an ASCII hyphen (32). - FM
+    */
+    if (!strcmp(s, "ndash") ||
+	!strcmp(s, "endash") ||
+	!strcmp(s, "mdash") ||
+	!strcmp(s, "endash")) {
+	PUTC('-');
+	FoundEntity = TRUE;
+	return;
+    }
+
+    /*
+    **  Ignore zwnj (8204) and zwj (8205), for now.
+    **  Note that zwnj may have been handled as <WBR>
+    **  by the calling function. - FM
+    */
+    if (!strcmp(s, "zwnj") ||
+	!strcmp(s, "zwnj")) {
+	if (TRACE) {
+	    fprintf(stderr, "handle_entity: Ignoring '%s'.\n", s);
+	}
+	FoundEntity = TRUE;
+	return;
+    }
+
+    /*
+    **  Ignore lrm (8206), and rln (8207), for now. - FM
+    */
+    if (!strcmp(s, "lrm") ||
+	!strcmp(s, "rlm")) {
+	if (TRACE) {
+	    fprintf(stderr, "handle_entity: Ignoring '%s'.\n", s);
+	}
+	FoundEntity = TRUE;
+	return;
+    }
+#endif /* NOTUSED_FOTEMODS */
+
     /*
     **  Handle all other entities normally. - FM
     */
     FoundEntity = FALSE;
+    if ((code = HTMLGetEntityUCValue(s)) != 0) {
+        /*
+	**  We got a Unicode value for the entity name.
+	**  Check for special Unicodes. - FM
+	*/
+	if (put_special_unicodes(context, code)) {  
+	    FoundEntity = TRUE;
+	    return;
+	}
+	/*
+	**  Seek a translation from the chartrans tables.
+	*/
+	if ((uck = UCTransUniChar(code, context->html_char_set)) >= 32 &&
+	    uck < 256 &&
+	    (uck < 127 ||
+	     uck >= LYlowest_eightbit[context->html_char_set])) {
+	    if (uck == 160 && IncludesLatin1Enc(context->html_char_set)) {
+		/*
+		**  Would only happen if some other Unicode
+		**  is mapped to Latin-1 160.
+		*/
+		PUTC(HT_NON_BREAK_SPACE);
+	    } else if (uck == 173 && IncludesLatin1Enc(context->html_char_set)) {
+		/*
+		**  Would only happen if some other Unicode
+		**  is mapped to Latin-1 173.
+		*/
+		PUTC(LY_SOFT_HYPHEN);
+	    } else {
+		PUTC(FROMASCII((char)uck));
+	    }
+	    FoundEntity = TRUE;
+	    return;
+	} else if ((uck == -4 ||
+		    (context->T.repl_translated_C0 &&
+		     uck > 0 && uck < 32)) &&
+		   /*
+		   **  Not found; look for replacement string.
+		   */
+		   (uck = UCTransUniCharStr(replace_buf, 60, code,
+					    context->html_char_set, 0) >= 0)) {
+	    CONST char *p;
+	    for (p = replace_buf; *p; p++)
+		PUTC(*p);
+	    FoundEntity = TRUE;
+	    return;
+	}
+	/*
+	**  If we're displaying UTF-8, try that now. - FM
+	*/
+	if (context->T.output_utf8 && PUTUTF8(code)) {
+	    FoundEntity = TRUE;
+	    return;
+	}
+	/*
+	**  If it's safe ASCII, use it. - FM
+	*/
+        if (code >= 32 && code < 127) {
+	    PUTC(FROMASCII((char)code));
+	    FoundEntity = TRUE;
+	    return;
+	}
+    }
+
+    /*
+    **  We haven't succeeded yet, so try the old LYCharSets
+    **  arrays for translation strings. - FM
+    */
     for (low = 0, high = context->dtd->number_of_entities;
     	 high > low;
-	 diff < 0 ? (low = i+1) : (high = i)) {  /* Binary serach */
+	 diff < 0 ? (low = i+1) : (high = i)) {  /* Binary search */
 	i = (low + (high-low)/2);
 	diff = strcmp(entities[i], s);	/* Case sensitive! */
 	if (diff == 0) {		/* success: found it */
@@ -402,38 +533,43 @@ PRIVATE void handle_entity ARGS2(
 	    return;
 	}
     }
-#ifdef EXP_CHARTRANS
+
+#ifdef NOTDEFINED
     /* repeat for extra entities if not found... hack... -kw */
     if (TRACE)
 	fprintf(stderr,
 		"SGML: Unknown entity %s so far, checking extra...\n", s); 
     for (low = 0, high = context->dtd->number_of_extra_entities;
     	 high > low;
-	 diff < 0 ? (low = i+1) : (high = i)) {  /* Binary serach */
-	i = (low + (high-low)/2);
-	diff = strcmp(extra_entities[i].name, s);	/* Case sensitive! */
-	if (diff==0) {			/* success: found it */
-	  if (put_special_unicodes(context, extra_entities[i].code)) {  
-	    FoundEntity = TRUE;
-	    return;
-	  } else if (context->T.output_utf8 &&
-		     PUTUTF8(extra_entities[i].code)) {
-	    FoundEntity = TRUE;
-	    return;
-	  }
+	 diff < 0 ? (low = i+1) : (high = i)) {   /* Binary search */
+	i = (low + (high - low)/2);
+	diff = strcmp(extra_entities[i].name, s); /* Case sensitive! */
+	if (diff == 0) {		/* success: found it */
+	    if (put_special_unicodes(context, extra_entities[i].code)) {  
+		FoundEntity = TRUE;
+		return;
+	    } else if (context->T.output_utf8 &&
+		       PUTUTF8(extra_entities[i].code)) {
+		FoundEntity = TRUE;
+		return;
+	    }
 	    if ((rc = UCTransUniChar(extra_entities[i].code,
-				     current_char_set)) > 0) {
+				     context->html_char_set)) > 0 &&
+		rc < 256) {
 		/*
-		 *  Could do further checks here... - KW
-		 */
-	    PUTC(rc);
-	    FoundEntity = TRUE;
-	    return;
+		**  Could do further checks here... - KW
+		*/
+		PUTC(FROMASCII((char)rc));
+		FoundEntity = TRUE;
+		return;
 	    } else if ((rc == -4) &&
-		       /* Not found; look for replacement string */
+		       /*
+		       **  Not found; look for replacement string.
+		       */
 		       (rc = UCTransUniCharStr(replace_buf, 60,
 					       extra_entities[i].code,
-					       current_char_set, 0) >= 0)) {
+					       context->html_char_set,
+					       0) >= 0)) {
 		CONST char *p;
 		for (p = replace_buf; *p; p++)
 		    PUTC(*p);
@@ -442,13 +578,14 @@ PRIVATE void handle_entity ARGS2(
 	    } 
 	    rc = (*context->actions->put_entity)(context->target,
 					  i+context->dtd->number_of_entities);
-	  if (rc != HT_CANNOT_TRANSLATE) {
-	      FoundEntity = TRUE;
-	      return;
-	  }
+	    if (rc != HT_CANNOT_TRANSLATE) {
+		FoundEntity = TRUE;
+		return;
+	    }
 	}
     }
-#endif
+#endif /* NOTDEFINED */
+
     /*
     **  If entity string not found, display as text.
     */
@@ -625,6 +762,9 @@ PRIVATE void do_close_stacked ARGS1(
     HTElement * stacked = context->element_stack;
     if (!stacked)
 	return;			/* stack was empty */
+    if (context->inSELECT && !strcasecomp(stacked->tag->name, "SELECT")) {
+	context->inSELECT = FALSE;
+    }
     (*context->actions->end_element)(
         context->target,
         stacked->tag - context->dtd->tags,
@@ -635,8 +775,8 @@ PRIVATE void do_close_stacked ARGS1(
 PRIVATE int is_on_stack ARGS2(
 	HTStream *,	context,
 	HTTag *,	old_tag)
-{
-    HTElement * stacked = context->element_stack;
+{ 
+   HTElement * stacked = context->element_stack;
     int i = 1;
     for (; stacked; stacked = stacked->next, i++) {
 	if (stacked->tag == old_tag)
@@ -700,10 +840,36 @@ PRIVATE void end_element ARGS2(
 	    return;
 	}
     }
-    /* Now let the old code deal with the rest... - kw */
+    /* Now let the non-extended code deal with the rest. - kw */
 
 #endif /* EXTENDED_HTMLDTD */
 
+    /*
+    **  If we are in a SELECT block, ignore anything
+    **  but a SELECT end tag. - FM
+    */
+    if (context->inSELECT) {
+	if (!strcasecomp(old_tag->name, "SELECT")) {
+	    /*
+	    **  Turn off the inSELECT flag and fall through. - FM
+	    */
+	    context->inSELECT = FALSE;
+	} else {
+	    /*
+	    **  Ignore the end tag. - FM
+	    */
+	    if (TRACE) {
+		fprintf(stderr,
+			"SGML: Ignoring end tag </%s> in SELECT block.\n",
+	    		old_tag->name);
+	    }
+	    return;
+	}
+    }
+
+    /*
+    **  Handle the end tag. - FM
+    */
     if (TRACE)
         fprintf(stderr, "SGML: End </%s>\n", old_tag->name);
     if (old_tag->contents == SGML_EMPTY) {
@@ -832,10 +998,67 @@ PRIVATE void start_element ARGS1(
 			new_tag->name);
 	}
     }
-    /* fall through to the old code - kw */
+    /* Fall through to the non-extended code - kw */
 
 #endif /* EXTENDED_HTMLDTD */
 
+    /*
+    **  If we are not in a SELECT block, check if this is
+    **  a SELECT start tag.  Otherwise (i.e., we are in a
+    **  SELECT block) accept only OPTION as valid, terminate
+    **  the SELECT block if it is any other form-related
+    **  element, and otherwise ignore it. - FM
+    */
+    if (!context->inSELECT) {
+        /*
+	**  We are not in a SELECT block, so check if this starts one. - FM
+	*/
+	if (!strcasecomp(new_tag->name, "SELECT")) {
+	    /*
+	    **  Set the inSELECT flag and fall through. - FM
+	    */
+	    context->inSELECT = TRUE;
+	}
+    } else {
+        /*
+	**  We are in a SELECT block. - FM
+	*/
+        if (strcasecomp(new_tag->name, "OPTION")) {
+	    /*
+	    **  Ugh, it is not an OPTION. - FM
+	    */
+	    if (!strcasecomp(new_tag->name, "INPUT") ||
+	        !strcasecomp(new_tag->name, "TEXTAREA") ||
+		!strcasecomp(new_tag->name, "SELECT") ||
+		!strcasecomp(new_tag->name, "BUTTON") ||
+		!strcasecomp(new_tag->name, "FIELDSET") ||
+		!strcasecomp(new_tag->name, "LABEL") ||
+		!strcasecomp(new_tag->name, "LEGEND") ||
+		!strcasecomp(new_tag->name, "FORM")) {
+		/*
+		**  It is another form-related start tag, so terminate
+		**  the current SELECT block and fall through. - FM
+		*/
+		if (TRACE)
+		    fprintf(stderr,
+		       "SGML: Faking SELECT end tag before <%s> start tag.\n",
+			    new_tag->name);
+		end_element(context, SGMLFindTag(context->dtd, "SELECT"));
+	    } else {
+	        /*
+		**  Ignore the start tag. - FM
+		*/
+		if (TRACE)
+		    fprintf(stderr,
+			  "SGML: Ignoring start tag <%s> in SELECT block.\n",
+			    new_tag->name);
+		return;
+	    }
+	}
+    }
+    /*
+    **  Handle the start tag. - FM
+    */
     if (TRACE)
         fprintf(stderr, "SGML: Start <%s>\n", new_tag->name);
     (*context->actions->start_element)(
@@ -1016,11 +1239,7 @@ PUBLIC void SGML_character ARGS2(
     CONST SGML_dtd *dtd	=	context->dtd;
     HTChunk	*string = 	context->string;
     CONST char * EntityName;
-    extern int current_char_set;
     extern CONST char * HTMLGetEntityName PARAMS((int i));
-
-#ifdef EXP_CHARTRANS
-    extern int LYlowest_eightbit[];
     char * p;
     BOOLEAN chk;	/* Helps (?) walk through all the else ifs... */
     UCode_t clong, uck;	/* Enough bits for UCS4 ... */
@@ -1033,12 +1252,6 @@ PUBLIC void SGML_character ARGS2(
     */
 #define unsign_c clong
 
-#else
-#define c c_in
-#define unsign_c (unsigned char)c
-#endif    
-
-#ifdef EXP_CHARTRANS
     c = c_in;
     clong = (unsigned char)c;	/* a.k.a. unsign_c */
 
@@ -1119,7 +1332,7 @@ PUBLIC void SGML_character ARGS2(
 	if (clong > 0) {
 	    saved_char_in = c;
 	    if (clong < 256) {
-		c = (char)clong;
+		c = FROMASCII((char)clong);
 	    }
 	}
 	goto top1;
@@ -1134,7 +1347,7 @@ PUBLIC void SGML_character ARGS2(
 	      (clong = UCTransToUni(c, context->in_char_set)) > 0))) {
 	    saved_char_in = c;
 	    if (clong < 256) {
-		c = (char)clong;
+		c = FROMASCII((char)clong);
 	    }
 	    goto top1;
 	} else {
@@ -1169,13 +1382,11 @@ PUBLIC void SGML_character ARGS2(
 	goto top0a;
     }
 
-    /* At this point we have either unsign_c a.k.a. clong in Unicode
-       (and c in latin1 if clong is in the latin1 range),
-       or unsign_c and c will have to be passed raw. */
-
-#endif /* EXP_CHARTRANS */
-
-
+    /*
+    **  At this point we have either unsign_c a.k.a. clong in
+    **  Unicode (and c in latin1 if clong is in the latin1 range),
+    **  or unsign_c and c will have to be passed raw. - KW
+    */
 top:
 #ifdef EXP_CHARTRANS
     saved_char_in = '\0';
@@ -1283,7 +1494,6 @@ top1:
 		   !(PASS8859SPECL || HTCJK != NOCJK)) {
             PUTC(LY_SOFT_HYPHEN);
 
-#ifdef EXP_CHARTRANS
 	} else if (context->T.use_raw_char_in && saved_char_in) {
 	    /*
 	    **  Only if the original character is still in saved_char_in,
@@ -1300,8 +1510,8 @@ top1:
 		   uck < 256) {
 	    if (TRACE) {
 		fprintf(stderr,
-			"UCTransUniChar returned 0x%lx:'%c'.\n",
-			uck, (char)uck);
+			"UCTransUniChar returned 0x%.2lX:'%c'.\n",
+			uck, FROMASCII((char)uck));
 	    }
 	    c = (char)(uck & 0xff);
 	    PUTC(c);
@@ -1325,8 +1535,6 @@ top1:
 	*/
 	} else if (context->T.output_utf8 && PUTUTF8(clong)) {
 	    ; /* do nothing more */
-#endif /* EXP_CHARTRANS */
-
 	/*
 	**  If it's any other (> 160) 8-bit chararcter, and
 	**  we have not set HTPassEightBitRaw nor HTCJK, nor
@@ -1337,14 +1545,10 @@ top1:
 #define PASSHI8BIT HTPassEightBitRaw
 #else
 #define PASSHI8BIT (HTPassEightBitRaw || (context->T.do_8bitraw && !context->T.trans_from_uni))
-#define IncludesLatin1Enc(cs) \
-		(cs == 0 || \
-		 (context->htmlUCI && \
-		  (context->htmlUCI->enc & (UCT_CP_SUPERSETOF_LAT1))))
 #endif /* EXP_CHARTRANS */
 	} else if (unsign_c > 160 && unsign_c < 256 &&
 		   !(PASSHI8BIT || HTCJK != NOCJK) &&
-		   !IncludesLatin1Enc(current_char_set)) {
+		   !IncludesLatin1Enc(context->html_char_set)) {
 	    int i;
 	    int value;
 
@@ -1514,7 +1718,7 @@ top1:
     **  Check for a numeric entity.
     */
     case S_cro:
-	if (unsign_c < 127 && (unsigned char)c == 'x') {
+	if (unsign_c < 127 && TOLOWER((unsigned char)c) == 'x') {
 	    context->isHex = TRUE;
 	    context->state = S_incro;
 	} else if (unsign_c < 127 && isdigit((unsigned char)c)) {
@@ -1628,17 +1832,20 @@ top1:
 		/*
 		 *  Seek a translation from the chartrans tables.
 		 */
-	      if ((uck = UCTransUniChar(value,current_char_set)) >= 32 &&
+		if ((uck = UCTransUniChar(value,
+					  context->html_char_set)) >= 32 &&
 		    uck < 256 &&
 		    (uck < 127 ||
 		     uck >= LYlowest_eightbit[context->html_char_set])) {
-		    if (uck == 160 && current_char_set == 0) {
+		    if (uck == 160 &&
+			IncludesLatin1Enc(context->html_char_set)) {
 			/*
 			**  Would only happen if some other Unicode
 			**  is mapped to Latin-1 160.
 			*/
 			PUTC(HT_NON_BREAK_SPACE);
-		    } else if (uck == 173 && current_char_set == 0) {
+		    } else if (uck == 173 &&
+			IncludesLatin1Enc(context->html_char_set)) {
 			/*
 			**  Would only happen if some other Unicode
 			**  is mapped to Latin-1 173.
@@ -1653,8 +1860,9 @@ top1:
 			   /*
 			   **  Not found; look for replacement string.
 			   */
-		(uck = UCTransUniCharStr(replace_buf,60,value,
-				      current_char_set, 0)   >= 0 ) ) { 
+			   (uck = UCTransUniCharStr(replace_buf, 60, value,
+						    context->html_char_set,
+						    0) >= 0)) { 
 		    for (p = replace_buf; *p; p++) {
 			PUTC(*p);
 		    }
@@ -1676,6 +1884,34 @@ top1:
 		    context->isHex = FALSE;
 		    context->state = S_entity;
 		    goto top1;
+#ifdef NOTUSED_FOTEMODS
+		/*
+		**  If the value is greater than 255 and we do not
+		**  have the "7-bit approximations" as our output
+		**  character set (in which case we did it already)
+		**  seek a translation for that. - FM
+		*/
+		} else if ((chk = ((code > 255) &&
+				   context->html_char_set !=
+				   UCGetLYhndl_byMIME("us-ascii"))) &&
+			   (uck = UCTransUniChar(code,
+				   UCGetLYhndl_byMIME("us-ascii")))
+				  >= 32 && uck < 127) {
+		    /*
+		    **  Got an ASCII character (yippey). - FM
+		    */
+		    PUTC(((char)(uck & 0xff)));
+		} else if ((chk && uck == -4) &&
+			   (uck = UCTransUniCharStr(replace_buf,
+						    60, code,
+						UCGetLYhndl_byMIME("us-ascii"),
+						    0) >= 0)) {
+		    /*
+		    **  Got a replacement string (yippey). - FM
+		    */
+		    for (p = replace_buf; *p; p++)
+			PUTC(*p);
+#endif /* NOTUSED_FOTEMODS */
 	        /*
 		**  Show the numeric entity if we get to here
 		**  and the value:
@@ -1690,13 +1926,13 @@ top1:
 		**  - FM
 		*/
 		} else if ((value > 255) ||
-		    (value < 32 &&
-		     value != 9 && value != 10 && value != 13 &&
-		     HTCJK == NOCJK) ||
-		    (value == 127 &&
-		     !(HTPassHighCtrlRaw || HTCJK != NOCJK)) ||
-		    (value > 127 && value < 160 &&
-		     !HTPassHighCtrlNum)) {
+			   (value < 32 &&
+			    value != 9 && value != 10 && value != 13 &&
+			    HTCJK == NOCJK) ||
+			   (value == 127 &&
+			    !(HTPassHighCtrlRaw || HTCJK != NOCJK)) ||
+			   (value > 127 && value < 160 &&
+			    !HTPassHighCtrlNum)) {
 		    if (value == 8194 || value == 8195 || value == 8201) {
 		        /*
 			**  ensp, emsp or thinsp. - FM
@@ -1728,7 +1964,7 @@ top1:
 			goto top1;
 		    }
 		} else if (value < 161 || HTPassEightBitNum ||
-			   IncludesLatin1Enc(current_char_set)) {
+			   IncludesLatin1Enc(context->html_char_set)) {
 		    /*
 		    **  No conversion needed. - FM
 		    */
@@ -2283,11 +2519,13 @@ top1:
 	} else if (HTCJK == NOCJK && (context->T.output_utf8 ||
 				      context->T.trans_from_uni)) {
 	    if (clong == 0xfffd && saved_char_in && HTPassEightBitRaw &&
-		(unsigned char)saved_char_in >= LYlowest_eightbit[current_char_set])
+		(unsigned char)saved_char_in >=
+		LYlowest_eightbit[context->html_char_set]) {
 		HTChunkPutUtf8Char(string,
 				   (0xf000 | (unsigned char)saved_char_in));
-	    else
+	    } else {
 		HTChunkPutUtf8Char(string, clong);
+	    }
 	} else if (saved_char_in && context->T.use_raw_char_in) {
 	    HTChunkPutc(string, saved_char_in);
 #endif /* EXP_CHARTRANS */
@@ -2318,11 +2556,13 @@ top1:
 	} else if (HTCJK == NOCJK && (context->T.output_utf8 ||
 				      context->T.trans_from_uni)) {
 	    if (clong == 0xfffd && saved_char_in && HTPassEightBitRaw &&
-		(unsigned char)saved_char_in >= LYlowest_eightbit[current_char_set])
+		(unsigned char)saved_char_in >=
+		LYlowest_eightbit[context->html_char_set]) {
 		HTChunkPutUtf8Char(string,
 				   (0xf000 | (unsigned char)saved_char_in));
-	    else
+	    } else {
 		HTChunkPutUtf8Char(string, clong);
+	    }
 	} else if (saved_char_in && context->T.use_raw_char_in) {
 	    HTChunkPutc(string, saved_char_in);
 #endif /* EXP_CHARTRANS */
@@ -2357,11 +2597,13 @@ top1:
 	} else if (HTCJK == NOCJK && (context->T.output_utf8 ||
 				      context->T.trans_from_uni)) {
 	    if (clong == 0xfffd && saved_char_in && HTPassEightBitRaw &&
-		(unsigned char)saved_char_in >= LYlowest_eightbit[current_char_set])
+		(unsigned char)saved_char_in >=
+		LYlowest_eightbit[context->html_char_set]) {
 		HTChunkPutUtf8Char(string,
 				   (0xf000 | (unsigned char)saved_char_in));
-	    else
+	    } else {
 		HTChunkPutUtf8Char(string, clong);
+	    }
 	} else if (saved_char_in && context->T.use_raw_char_in) {
 	    HTChunkPutc(string, saved_char_in);
 #endif /* EXP_CHARTRANS */
@@ -2425,34 +2667,6 @@ top1:
 		    }
 		    break;
 		} else if (tag_OK &&
-			   !strcasecomp(string->data, "P")) {
-		    /*
-		    **  Treat a P end tag like a P start tag (Ugh,
-		    **  what a hack! 8-). - FM
-		    */
-		    if (TRACE)
-		        fprintf(stderr,
-				"SGML: `</%s%c' found!  Treating as '<%s%c'.\n",
-				string->data, c, string->data, c);
-		    {
-		        int i;
-			for (i = 0;
-			     i < context->current_tag->number_of_attributes;
-			     i++) {
-			    context->present[i] = NO;
-			}
-		    }
-		    string->size = 0;
-		    context->current_attribute_number = INVALID;
-		    if (context->current_tag->name)
-			start_element(context);
-		    if (c != '>') {
-			context->state = S_junk_tag;
-		    } else {
-			context->state = S_text;
-		    }
-		    break;
-		} else if (tag_OK &&
 			   (!strcasecomp(string->data, "A") ||
 			    !strcasecomp(string->data, "B") ||
 			    !strcasecomp(string->data, "BLINK") ||
@@ -2461,6 +2675,7 @@ top1:
 			    !strcasecomp(string->data, "FONT") ||
 			    !strcasecomp(string->data, "FORM") ||
 			    !strcasecomp(string->data, "I") ||
+			    !strcasecomp(string->data, "P") ||
 			    !strcasecomp(string->data, "STRONG") ||
 			    !strcasecomp(string->data, "TT") ||
 			    !strcasecomp(string->data, "U"))) {
@@ -2471,12 +2686,69 @@ top1:
 		    **  with checks there to avoid throwing the HTML.c stack
 		    **  out of whack (Ugh, what a hack! 8-). - FM
 		    */
-		    if (TRACE)
-		        fprintf(stderr, "SGML: End </%s>\n", string->data);
-		    (*context->actions->end_element)
-			(context->target,
-			 (context->current_tag - context->dtd->tags),
-			 (char **)&context->include);
+		    if (context->inSELECT) {
+		        /*
+			**  We are in a SELECT block. - FM
+			*/
+			if (strcasecomp(string->data, "FORM")) {
+			    /*
+			    **  It is not at FORM end tag, so ignore it. - FM
+			    */
+			    if (TRACE) {
+				fprintf(stderr,
+			    "SGML: Ignoring end tag </%s> in SELECT block.\n",
+	    				string->data);
+			    }
+			} else {
+			    /*
+			    **  End the SELECT block and then
+			    **  handle the FORM end tag. - FM
+			    */
+			    if (TRACE) {
+				fprintf(stderr,
+			"SGML: Faking SELECT end tag before </%s> end tag.\n",
+					string->data);
+			    }
+			    end_element(context,
+			    		SGMLFindTag(context->dtd, "SELECT"));
+			    if (TRACE) {
+				fprintf(stderr,
+					"SGML: End </%s>\n", string->data);
+			    }
+			    (*context->actions->end_element)
+				(context->target,
+			 	 (context->current_tag - context->dtd->tags),
+				 (char **)&context->include);
+			}
+		    } else if (!strcasecomp(string->data, "P")) {
+			/*
+			**  Treat a P end tag like a P start tag (Ugh,
+			**  what a hack! 8-). - FM
+			*/
+			if (TRACE)
+			    fprintf(stderr,
+				    "SGML: `</%s%c' found!  Treating as '<%s%c'.\n",
+				    string->data, c, string->data, c);
+			{
+			    int i;
+			    for (i = 0;
+				 i < context->current_tag->number_of_attributes;
+				 i++) {
+				context->present[i] = NO;
+			    }
+			}
+			if (context->current_tag->name)
+			    start_element(context);
+		    } else {
+			if (TRACE) {
+			    fprintf(stderr,
+				    "SGML: End </%s>\n", string->data);
+			}
+			(*context->actions->end_element)
+			    (context->target,
+			     (context->current_tag - context->dtd->tags),
+			     (char **)&context->include);
+		    }
 		    string->size = 0;
 		    context->current_attribute_number = INVALID;
 		    if (c != '>') {
@@ -2764,6 +3036,7 @@ PUBLIC HTStream* SGML_new  ARGS3(
     context->unknown_tag = &HTTag_unrecognized;
     context->state = S_text;
     context->element_stack = 0;			/* empty */
+    context->inSELECT = FALSE;
 #ifdef CALLERDATA		  
     context->callerData = (void*) callerData;
 #endif /* CALLERDATA */
diff --git a/WWW/Library/Implementation/UCAux.h b/WWW/Library/Implementation/UCAux.h
index 36c17050..5b2d52ce 100644
--- a/WWW/Library/Implementation/UCAux.h
+++ b/WWW/Library/Implementation/UCAux.h
@@ -20,7 +20,9 @@ typedef enum {
 extern UCTQ_t UCCanUniTranslateFrom PARAMS((int from));
 extern UCTQ_t UCCanTranslateUniTo PARAMS((int to));
 extern UCTQ_t UCCanTranslateFromTo PARAMS((int from, int to));
-extern BOOL UCNeedNotTranslate PARAMS((int from, int to));
+extern BOOL UCNeedNotTranslate PARAMS((
+	int		from,
+	int		to));
 
 struct _UCTransParams
 {
@@ -68,9 +70,17 @@ typedef void putc_func_t PARAMS((
 	HTStream *	me,
 	char		ch));
 
+#ifndef UCMAP_H
+#include "UCMap.h"
+#endif /* UCMAP_H */
+
 extern BOOL UCPutUtf8_charstring PARAMS((
 	HTStream *	target,
 	putc_func_t *	actions,
-	long	code));
+	UCode_t		code));
     
+extern BOOL UCConvertUniToUtf8 PARAMS((
+	UCode_t		code,
+	char *		buffer));
+
 #endif /* UCAUX_H */
diff --git a/WWW/Library/Implementation/UCMap.h b/WWW/Library/Implementation/UCMap.h
index 017ebc92..e634f760 100644
--- a/WWW/Library/Implementation/UCMap.h
+++ b/WWW/Library/Implementation/UCMap.h
@@ -17,7 +17,10 @@ extern int UCTransChar PARAMS((
 	char		ch_in,
 	int		charset_in,
 	int		charset_out));
-PUBLIC int UCReverseTransChar PARAMS((char ch_out, int charset_in, int charset_out));
+extern int UCReverseTransChar PARAMS((
+	char		ch_out,
+	int		charset_in,
+	int		charset_out));
 extern int UCTransCharStr PARAMS((
 	char *		outbuf,
 	int		buflen,
diff --git a/WWW/Library/unix/makefile.in b/WWW/Library/unix/makefile.in
index 14053794..f9fbb160 100644
--- a/WWW/Library/unix/makefile.in
+++ b/WWW/Library/unix/makefile.in
@@ -11,6 +11,7 @@ LFLAGS =
 
 prefix		= @prefix@
 exec_prefix	= @exec_prefix@
+top_srcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= $(srcdir)
 
@@ -28,7 +29,7 @@ LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
 
 #_________________ OK if normal W3 distribution
 # Where is the WWW source root?
-WWW = ../..
+WWW = $(top_srcdir)/WWW
 
 #  Where should temporary (object) files go?
 WTMP = ../..
diff --git a/about_lynx/COPYHEADER b/about_lynx/COPYHEADER
deleted file mode 100644
index b441aee7..00000000
--- a/about_lynx/COPYHEADER
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright (C) 1995 University of Kansas.
-
-   This file is part of Lynx, a text-based, WWW browser.
-
-   Lynx is free software; you can redistribute it and/or modify it
-   under the terms of the GNU General Public License, version 2, as
-   published by the Free Software Foundation.
-
-   Lynx is distributed in the hope that it will be useful, but WITHOUT
-   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
-   License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with Lynx; see the file COPYING.  If not, write to the Free
-   Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
-
-   Any licensing or usage questions should be directed to Michael
-   Grobe <grobe@ukans.edu>.
-*/
diff --git a/about_lynx/COPYING b/about_lynx/COPYING
deleted file mode 100644
index a43ea212..00000000
--- a/about_lynx/COPYING
+++ /dev/null
@@ -1,339 +0,0 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                          675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	Appendix: How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) 19yy  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) 19yy name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/about_lynx/about_lynx.html b/about_lynx/about_lynx.html
deleted file mode 100644
index 33faa7cd..00000000
--- a/about_lynx/about_lynx.html
+++ /dev/null
@@ -1,97 +0,0 @@
-<!DOCTYPE html public "-//IETF//DTD HTML 3.0//EN">
-<HTML>
-<HEAD>
-<TITLE>About Lynx</TITLE>
-<LINK rev="made" href="mailto:lynx-dev@sig.net">
-</HEAD>
-
-<BODY>
-<BANNER>
-[ <A HREF="lynx-dev.html">About Lynx-Dev</A> |
-<A HREF="http://www.flora.org/lynx-dev/html/">Lynx-Dev Archives</A> ]
-</BANNER>
-
-<h1><em>About Lynx</em></h1>
-
-Lynx is a fully featured World-Wide Web browser for users on both Unix and
-VMS platforms who are connected to those systems via cursor-addressable,
-character-cell terminals or emulators.  That includes VT100 terminals,
-and desktop-based software packages emulating VT100 terminals (e.g.,
-Kermit, Procomm, etc.).
-
-<P>For information on how to use Lynx see the
-<A HREF="../lynx_help/Lynx_users_guide.html">Lynx User's Guide</A>, or the
-<A HREF="../lynx_help/lynx_help_main.html">Lynx help files</A>.
-
-<H2><EM>Credits and Copyright</EM></H2>
-
-Lynx was a product of the Distributed Computing Group within
-Academic Computing Services of <A
-HREF="http://www.cc.ukans.edu/index.html">The University of Kansas</A>.
-
-<P>Lynx was originally developed by
-<A HREF="http://www.cc.ukans.edu/cwis/people/Lou.Montulli.html"
->Lou Montulli,</A>
-<A HREF="http://www.cc.ukans.edu/cwis/people/Michael.Grobe/Michael.Grobe.html"
->Michael Grobe,</A>
-and <A HREF="http://www.cc.ukans.edu/cwis/people/Charles.Rezac.html"
->Charles Rezac.</A>
-<A HREF="http://www.cc.ukans.edu/cwis/people/Garrett/Garrett_Arch_Blythe.html"
->Garrett Blythe</A> created
-<A HREF="http://www.cc.ukans.edu/about_doslynx/doslynx.html">DosLynx</A>
-and later joined the Lynx effort as well.  Following the departures of
-Lou and Garrett for positions at Netscape in the summer of 1994,
-<EM>Craig Lavender</EM> provided support services for Lynx, and
-<EM>Ravikumar Kolli</EM> for DosLynx.
-
-<P>Currently Lynx is being maintained and supported by members of the
-Internet community coordinated via the
-<A HREF="#lynx-dev_list"><EM>lynx-dev mailing list</EM></A>.
-
-<P>Lynx is copyrighted by the University of Kansas and is distributed
-<A HREF="COPYHEADER">without restrictions on usage or redistribution</A>
-under the <A HREF="COPYING">GNU General Public License</A>.
-
-<P>Lynx was built over an early version of the Common Code Library
-developed by the CERN WWW Project. That code is copyrighted by CERN.
-Lynx contains other sections of code that are copyrighted 
-by other institutions or individuals.
-The Lynx copyright does not override or invalidate those copyrights.
-
-<P>Thanks to <A NAME="13"
-HREF="http://www.w3.org/hypertext/WWW/People.html#BernersLee"
->Tim Berners-Lee</A> and the other <A NAME="14"
-HREF="http://www.w3.org/hypertext/WWW/People.html">CERN World Wide
-Web wizards</A> for the WWW client library code and all of their other
-work on the WWW project, NCSA and the
-<A HREF="http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/NCSAMosaicHome.html"
->Mosaic</A> developers, and to everyone out in netland who has
-contributed to Lynx's development either directly (through comments
-or bug reports) or indirectly (through inspiration and development of
-other systems).
-
-<P>Also, special thanks go to <EM>Foteos Macrides</EM> who ported much of
-Lynx to VMS and did much of it's development following Lou Montulli's
-and Garrett Blythe's departures from the University of Kansas, and to
-<EM>Earl Fogel</EM> of the University of Saskatchewan. Earl implemented
-the hypertext engine HYPERREZ in the Unix environment.  HYPERREZ was
-developed by Niel Larson of Think.com and served as the model for
-the early versions of Lynx which did not use the WWW libraries and
-had their own hypertext format.
-
-<H2><A NAME="availability"><EM>Availability</EM></A></H2>
-
-<p>Information on obtaining the most current version of Lynx is
-available via <a href="http://www.crl.com/~subir/lynx.html"
->Lynx links</a>.
-
-<H2><A NAME="lynx-dev_list"><EM>Mailing List</EM></A></H2>
-
-We have a listserv mailing list running for lynx development discussion.
-If you are interested in joining the list, follow this <A
-HREF="lynx-dev.html">link</A>.  There also are links to <A
-HREF="http://www.flora.org/lynx-dev/html/">archives</A> in html
-format for this mailing list.
-
-</BODY>
-</HTML>
diff --git a/about_lynx/lynx-dev.html b/about_lynx/lynx-dev.html
deleted file mode 100644
index f062f674..00000000
--- a/about_lynx/lynx-dev.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE html public "-//IETF//DTD HTML 3.0//EN">
-<html>
-<head>
-<title>Lynx-Dev Discussion List</title>
-<link rev="made" href="mailto:lynx-dev@sig.net">
-</head>
-
-<body>
-<banner>
-[ <a href="http://www.flora.org/lynx-dev/html/">Lynx-Dev Archives</a> |
-<a href="about_lynx.html">About Lynx</a> ]
-</banner>
-
-<h1><em>Lynx-Dev Discussion List</em></h1>
-
-Lynx-dev is a majordomo mailing list used by developers and interested
-users as a forum to discuss the further development of the Lynx World
-Wide Web browser.  Topic issues include fixing known bugs, porting Lynx
-to various systems, and increasing the usability of Lynx.
-
-<h2><em>Subscribing to Lynx-Dev</em></h2>
-
-If you are interested in <em>joining</em> this mailing list,
-send email to <a href="mailto:majordomo@sig.net"
->majordomo@sig.net</a> with only the following request
-in the body of your message: <em>SUBSCRIBE LYNX-DEV address</em><br>
-where inclusion of your email address is optional if it can be obtained,
-correctly, from the mail headers of your subscription request.
-
-<p><em>NOTE:</em> Subject headers are ignored by the majordomo.
-
-<h2><em>Unsubscribing from Lynx-Dev</em></h2>
-
-To <em>unsubscribe</em>, send an email message to
-<a href="mailto:majordomo@sig.net"
->majordomo@sig.net</a> with only the following request
-in the body: <em>UNSUBSCRIBE LYNX-DEV address</em><br>
-where inclusion of your email address is optional if it can be obtained,
-correctly, from the mail headers of your request.
-
-<h2><em>Majordomo Commands</em></h2>
-
-To receive a brief description of majordomo <em>commands</em>, place
-the following request in a message to <a href="mailto:majordomo@sig.net"
->majordomo@sig.net</a>: <em>HELP</em>
-
-<h2><em>Contacting Lynx-Dev</em></h2>
-
-If you have questions, problems, or comments about using Lynx or
-installing it on your system, send email to 
-<a href="mailto:lynx-dev@sig.net"
->lynx-dev@sig.net</a> (<em>after you've subscribed</em>).
-
-<p>If you have problems with majordomo not responding to your requests,
-send email to the <em>list owner</em>: <a
-href="mailto:majordomo-owner@sig.net"
->majordomo-owner@sig.net</a>. Please,
-<em>DO NOT</em> send them to <em>lynx-dev@sig.net</em> as they
-will be distributed to everyone on the list and will clutter
-up their mailboxes.
-
-<h2><em>Lynx-Dev Archives</em></h2>
-
-Archives of messages posted to lynx-dev are now in html format so that
-you can view them using Lynx.
-
-<p>Go to the <a href="http://www.flora.org/lynx-dev/html/"
->Lynx-Dev Archives</a>.
-</body>
-</html>
diff --git a/aclocal.m4 b/aclocal.m4
index 54fb2280..8c7fbf5f 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1251,37 +1251,3 @@ cf_wait_headers="$cf_wait_headers
 fi
 fi
 ])dnl
-dnl ---------------------------------------------------------------------------
-dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just
-dnl defaulting to yes/no.
-dnl
-dnl $1 = option name
-dnl $2 = help-text
-dnl $3 = environment variable to set
-dnl $4 = default value, shown in the help-message, must be a constant
-dnl $5 = default value, if it's an expression & cannot be in the help-message
-dnl
-AC_DEFUN([CF_WITH_PATH],
-[AC_ARG_WITH($1,[$2 ](default: ifelse($4,,empty,$4)),,
-ifelse($4,,[withval="${$3}"],[withval="${$3-ifelse($5,,$4,$5)}"]))dnl
-case ".$withval" in #(vi
-./*) #(vi
-  ;;
-.\[$]{*prefix}*) #(vi
-  eval withval="$withval"
-  case ".$withval" in #(vi
-  .NONE/*)
-    withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
-    ;;
-  esac
-  ;; #(vi
-.NONE/*)
-  withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
-  ;;
-*)
-  AC_ERROR(expected a pathname for $1)
-  ;;
-esac
-eval $3="$withval"
-AC_SUBST($3)dnl
-])dnl
diff --git a/configure b/configure
index 34314745..49a96473 100755
--- a/configure
+++ b/configure
@@ -30,14 +30,10 @@ ac_help="$ac_help
   --with-screen=XXX       select screen type
                           (XXX is curses (default), ncurses or slang)"
 ac_help="$ac_help
-  --with-cfg-file=XXXX    specify config-file path (default: LIBDIR/lynx.cfg)"
-ac_help="$ac_help
 Miscellaneous Options:"
 ac_help="$ac_help
   --enable-color-style    use optional/experimental color style (default: off)"
 ac_help="$ac_help
-  --with-lss-file=XXXX    specify style-sheet path (default: LIBDIR/lynx.lss)"
-ac_help="$ac_help
   --with-zlib             use zlib for decompression of some gzip files"
 ac_help="$ac_help
 Directory Editor Options:"
@@ -600,7 +596,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:604: checking host system type" >&5
+echo "configure:600: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -625,7 +621,7 @@ echo "$ac_t""$host" 1>&6
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:629: checking for $ac_word" >&5
+echo "configure:625: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -654,7 +650,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:658: checking for $ac_word" >&5
+echo "configure:654: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -702,7 +698,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:706: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:702: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -712,11 +708,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
 cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext <<EOF
-#line 716 "configure"
+#line 712 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -736,12 +732,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:740: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:736: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:745: checking whether we are using GNU C" >&5
+echo "configure:741: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -750,7 +746,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -765,7 +761,7 @@ if test $ac_cv_prog_gcc = yes; then
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:769: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:765: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -793,7 +789,7 @@ else
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:797: checking how to run the C preprocessor" >&5
+echo "configure:793: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -808,13 +804,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 812 "configure"
+#line 808 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -825,13 +821,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 829 "configure"
+#line 825 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -856,7 +852,7 @@ echo "$ac_t""$CPP" 1>&6
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:860: checking for $ac_word" >&5
+echo "configure:856: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -883,7 +879,7 @@ else
 fi
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:887: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:883: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -911,7 +907,7 @@ fi
 
 
 echo $ac_n "checking for style of include in makefiles""... $ac_c" 1>&6
-echo "configure:915: checking for style of include in makefiles" >&5
+echo "configure:911: checking for style of include in makefiles" >&5
 
 make_include_left=""
 make_include_right=""
@@ -972,7 +968,7 @@ echo "$ac_t""${make_include_left}file${make_include_right}" 1>&6
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:976: checking for a BSD compatible install" >&5
+echo "configure:972: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1026,7 +1022,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1030: checking for $ac_word" >&5
+echo "configure:1026: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LINT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1060,7 +1056,7 @@ done
 
 
 echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
-echo "configure:1064: checking if you want to see long compiling messages" >&5
+echo "configure:1060: checking if you want to see long compiling messages" >&5
 # Check whether --enable-echo or --disable-echo was given.
 if test "${enable_echo+set}" = set; then
   enableval="$enable_echo"
@@ -1099,7 +1095,7 @@ echo "$ac_t""$enableval" 1>&6
 
 
 echo $ac_n "checking if you want to check memory-leaks""... $ac_c" 1>&6
-echo "configure:1103: checking if you want to check memory-leaks" >&5
+echo "configure:1099: checking if you want to check memory-leaks" >&5
 # Check whether --enable-find-leaks or --disable-find-leaks was given.
 if test "${enable_find_leaks+set}" = set; then
   enableval="$enable_find_leaks"
@@ -1122,7 +1118,7 @@ EOF
 
 
 echo $ac_n "checking if you want to enable debug-code""... $ac_c" 1>&6
-echo "configure:1126: checking if you want to enable debug-code" >&5
+echo "configure:1122: checking if you want to enable debug-code" >&5
 # Check whether --enable-debug or --disable-debug was given.
 if test "${enable_debug+set}" = set; then
   enableval="$enable_debug"
@@ -1166,7 +1162,7 @@ fi
 if test -n "$GCC"
 then
 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
-echo "configure:1170: checking if you want to turn on gcc warnings" >&5
+echo "configure:1166: checking if you want to turn on gcc warnings" >&5
 # Check whether --enable-warnings or --disable-warnings was given.
 if test "${enable_warnings+set}" = set; then
   enableval="$enable_warnings"
@@ -1189,11 +1185,11 @@ then
 if test -n "$GCC"
 then
 		cat > conftest.$ac_ext <<EOF
-#line 1193 "configure"
+#line 1189 "configure"
 int main(int argc, char *argv[]) { return argv[argc-1] == 0; }
 EOF
 		echo "checking for gcc warning options" 1>&6
-echo "configure:1197: checking for gcc warning options" >&5
+echo "configure:1193: checking for gcc warning options" >&5
 	cf_save_CFLAGS="$CFLAGS"
 	EXTRA_CFLAGS="-W -Wall"
 	cf_warn_CONST=""
@@ -1211,7 +1207,7 @@ echo "configure:1197: checking for gcc warning options" >&5
 		Wstrict-prototypes $cf_warn_CONST
 	do
 		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
-		if { (eval echo configure:1215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+		if { (eval echo configure:1211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 			test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
 			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
 			test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES"
@@ -1229,7 +1225,7 @@ fi
 
 
 echo $ac_n "checking if you want full utility pathnames""... $ac_c" 1>&6
-echo "configure:1233: checking if you want full utility pathnames" >&5
+echo "configure:1229: checking if you want full utility pathnames" >&5
 # Check whether --enable-full-paths or --disable-full-paths was given.
 if test "${enable_full_paths+set}" = set; then
   enableval="$enable_full_paths"
@@ -1249,7 +1245,7 @@ echo "$ac_t""$with_full_paths" 1>&6
 
 
 echo $ac_n "checking for system mailer""... $ac_c" 1>&6
-echo "configure:1253: checking for system mailer" >&5
+echo "configure:1249: checking for system mailer" >&5
 if eval "test \"`echo '$''{'cf_cv_SYSTEM_MAIL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1276,7 +1272,7 @@ EOF
 
 
 echo $ac_n "checking system mail flags""... $ac_c" 1>&6
-echo "configure:1280: checking system mail flags" >&5
+echo "configure:1276: checking system mail flags" >&5
 if eval "test \"`echo '$''{'cf_cv_system_mail_flags'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1304,7 +1300,7 @@ if test "$with_full_paths" = yes ; then
 	# Extract the first word of "chmod", so it can be a program name with args.
 set dummy chmod; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1308: checking for $ac_word" >&5
+echo "configure:1304: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_CHMOD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1335,7 +1331,7 @@ fi
 
 else
 	echo $ac_n "checking for chmod""... $ac_c" 1>&6
-echo "configure:1339: checking for chmod" >&5
+echo "configure:1335: checking for chmod" >&5
 	echo "$ac_t""$CHMOD" 1>&6
 fi
 
@@ -1369,7 +1365,7 @@ if test "$with_full_paths" = yes ; then
 	# Extract the first word of "compress", so it can be a program name with args.
 set dummy compress; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1373: checking for $ac_word" >&5
+echo "configure:1369: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_COMPRESS'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1400,7 +1396,7 @@ fi
 
 else
 	echo $ac_n "checking for compress""... $ac_c" 1>&6
-echo "configure:1404: checking for compress" >&5
+echo "configure:1400: checking for compress" >&5
 	echo "$ac_t""$COMPRESS" 1>&6
 fi
 
@@ -1434,7 +1430,7 @@ if test "$with_full_paths" = yes ; then
 	# Extract the first word of "cp", so it can be a program name with args.
 set dummy cp; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1438: checking for $ac_word" >&5
+echo "configure:1434: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_COPY'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1465,7 +1461,7 @@ fi
 
 else
 	echo $ac_n "checking for cp""... $ac_c" 1>&6
-echo "configure:1469: checking for cp" >&5
+echo "configure:1465: checking for cp" >&5
 	echo "$ac_t""$COPY" 1>&6
 fi
 
@@ -1499,7 +1495,7 @@ if test "$with_full_paths" = yes ; then
 	# Extract the first word of "gzip", so it can be a program name with args.
 set dummy gzip; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1503: checking for $ac_word" >&5
+echo "configure:1499: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GZIP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1530,7 +1526,7 @@ fi
 
 else
 	echo $ac_n "checking for gzip""... $ac_c" 1>&6
-echo "configure:1534: checking for gzip" >&5
+echo "configure:1530: checking for gzip" >&5
 	echo "$ac_t""$GZIP" 1>&6
 fi
 
@@ -1564,7 +1560,7 @@ if test "$with_full_paths" = yes ; then
 	# Extract the first word of "install", so it can be a program name with args.
 set dummy install; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1568: checking for $ac_word" >&5
+echo "configure:1564: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_INSTALL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1595,7 +1591,7 @@ fi
 
 else
 	echo $ac_n "checking for install""... $ac_c" 1>&6
-echo "configure:1599: checking for install" >&5
+echo "configure:1595: checking for install" >&5
 	echo "$ac_t""$INSTALL" 1>&6
 fi
 
@@ -1629,7 +1625,7 @@ if test "$with_full_paths" = yes ; then
 	# Extract the first word of "mkdir", so it can be a program name with args.
 set dummy mkdir; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1633: checking for $ac_word" >&5
+echo "configure:1629: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MKDIR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1660,7 +1656,7 @@ fi
 
 else
 	echo $ac_n "checking for mkdir""... $ac_c" 1>&6
-echo "configure:1664: checking for mkdir" >&5
+echo "configure:1660: checking for mkdir" >&5
 	echo "$ac_t""$MKDIR" 1>&6
 fi
 
@@ -1694,7 +1690,7 @@ if test "$with_full_paths" = yes ; then
 	# Extract the first word of "mv", so it can be a program name with args.
 set dummy mv; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1698: checking for $ac_word" >&5
+echo "configure:1694: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1725,7 +1721,7 @@ fi
 
 else
 	echo $ac_n "checking for mv""... $ac_c" 1>&6
-echo "configure:1729: checking for mv" >&5
+echo "configure:1725: checking for mv" >&5
 	echo "$ac_t""$MV" 1>&6
 fi
 
@@ -1759,7 +1755,7 @@ if test "$with_full_paths" = yes ; then
 	# Extract the first word of "rm", so it can be a program name with args.
 set dummy rm; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1763: checking for $ac_word" >&5
+echo "configure:1759: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1790,7 +1786,7 @@ fi
 
 else
 	echo $ac_n "checking for rm""... $ac_c" 1>&6
-echo "configure:1794: checking for rm" >&5
+echo "configure:1790: checking for rm" >&5
 	echo "$ac_t""$RM" 1>&6
 fi
 
@@ -1824,7 +1820,7 @@ if test "$with_full_paths" = yes ; then
 	# Extract the first word of "tar", so it can be a program name with args.
 set dummy tar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1828: checking for $ac_word" >&5
+echo "configure:1824: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_TAR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1855,7 +1851,7 @@ fi
 
 else
 	echo $ac_n "checking for tar""... $ac_c" 1>&6
-echo "configure:1859: checking for tar" >&5
+echo "configure:1855: checking for tar" >&5
 	echo "$ac_t""$TAR" 1>&6
 fi
 
@@ -1889,7 +1885,7 @@ if test "$with_full_paths" = yes ; then
 	# Extract the first word of "touch", so it can be a program name with args.
 set dummy touch; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1893: checking for $ac_word" >&5
+echo "configure:1889: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_TOUCH'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1920,7 +1916,7 @@ fi
 
 else
 	echo $ac_n "checking for touch""... $ac_c" 1>&6
-echo "configure:1924: checking for touch" >&5
+echo "configure:1920: checking for touch" >&5
 	echo "$ac_t""$TOUCH" 1>&6
 fi
 
@@ -1954,7 +1950,7 @@ if test "$with_full_paths" = yes ; then
 	# Extract the first word of "gunzip", so it can be a program name with args.
 set dummy gunzip; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1958: checking for $ac_word" >&5
+echo "configure:1954: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_UNCOMPRESS'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1985,7 +1981,7 @@ fi
 
 else
 	echo $ac_n "checking for gunzip""... $ac_c" 1>&6
-echo "configure:1989: checking for gunzip" >&5
+echo "configure:1985: checking for gunzip" >&5
 	echo "$ac_t""$UNCOMPRESS" 1>&6
 fi
 
@@ -2019,7 +2015,7 @@ if test "$with_full_paths" = yes ; then
 	# Extract the first word of "unzip", so it can be a program name with args.
 set dummy unzip; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2023: checking for $ac_word" >&5
+echo "configure:2019: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_UNZIP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2050,7 +2046,7 @@ fi
 
 else
 	echo $ac_n "checking for unzip""... $ac_c" 1>&6
-echo "configure:2054: checking for unzip" >&5
+echo "configure:2050: checking for unzip" >&5
 	echo "$ac_t""$UNZIP" 1>&6
 fi
 
@@ -2084,7 +2080,7 @@ if test "$with_full_paths" = yes ; then
 	# Extract the first word of "uudecode", so it can be a program name with args.
 set dummy uudecode; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2088: checking for $ac_word" >&5
+echo "configure:2084: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_UUDECODE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2115,7 +2111,7 @@ fi
 
 else
 	echo $ac_n "checking for uudecode""... $ac_c" 1>&6
-echo "configure:2119: checking for uudecode" >&5
+echo "configure:2115: checking for uudecode" >&5
 	echo "$ac_t""$UUDECODE" 1>&6
 fi
 
@@ -2149,7 +2145,7 @@ if test "$with_full_paths" = yes ; then
 	# Extract the first word of "zcat", so it can be a program name with args.
 set dummy zcat; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2153: checking for $ac_word" >&5
+echo "configure:2149: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_ZCAT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2180,7 +2176,7 @@ fi
 
 else
 	echo $ac_n "checking for zcat""... $ac_c" 1>&6
-echo "configure:2184: checking for zcat" >&5
+echo "configure:2180: checking for zcat" >&5
 	echo "$ac_t""$ZCAT" 1>&6
 fi
 
@@ -2214,7 +2210,7 @@ if test "$with_full_paths" = yes ; then
 	# Extract the first word of "zip", so it can be a program name with args.
 set dummy zip; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2218: checking for $ac_word" >&5
+echo "configure:2214: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_ZIP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2245,7 +2241,7 @@ fi
 
 else
 	echo $ac_n "checking for zip""... $ac_c" 1>&6
-echo "configure:2249: checking for zip" >&5
+echo "configure:2245: checking for zip" >&5
 	echo "$ac_t""$ZIP" 1>&6
 fi
 
@@ -2283,7 +2279,7 @@ EOF
 if test -z "$GCC" ; then
 	
 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:2287: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:2283: checking for ${CC-cc} option to accept ANSI C" >&5
 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2301,7 +2297,7 @@ for cf_arg in "-DCC_HAS_PROTOS" "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" -Xc
 do
 	CFLAGS="$cf_save_CFLAGS $cf_arg"
 	cat > conftest.$ac_ext <<EOF
-#line 2305 "configure"
+#line 2301 "configure"
 #include "confdefs.h"
 
 #ifndef CC_HAS_PROTOS
@@ -2317,7 +2313,7 @@ int main() {
 	struct s2 {int (*f) (double a);};
 ; return 0; }
 EOF
-if { (eval echo configure:2321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ansi_cc="$cf_arg"; break
 else
@@ -2345,12 +2341,12 @@ fi
 
 fi
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2349: checking for working const" >&5
+echo "configure:2345: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2354 "configure"
+#line 2350 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2399,7 +2395,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:2403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -2439,7 +2435,7 @@ clix*)
 	# contributed by Alex Matulich (matuli_a@marlin.navsea.navy.mil) also
 	# references -lmalloc and -lbsd.
 	echo $ac_n "checking for strcmp in -lc_s""... $ac_c" 1>&6
-echo "configure:2443: checking for strcmp in -lc_s" >&5
+echo "configure:2439: checking for strcmp in -lc_s" >&5
 ac_lib_var=`echo c_s'_'strcmp | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2447,7 +2443,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc_s  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2451 "configure"
+#line 2447 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2458,7 +2454,7 @@ int main() {
 strcmp()
 ; return 0; }
 EOF
-if { (eval echo configure:2462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2536,7 +2532,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2540: checking for $ac_word" >&5
+echo "configure:2536: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2580,17 +2576,17 @@ sony-newsos*)
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2584: checking for $ac_hdr" >&5
+echo "configure:2580: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2589 "configure"
+#line 2585 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2634,17 +2630,17 @@ ultrix*)
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2638: checking for $ac_hdr" >&5
+echo "configure:2634: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2643 "configure"
+#line 2639 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2677,7 +2673,7 @@ esac
 
 cf_test_netlibs=no
 echo $ac_n "checking for network libraries""... $ac_c" 1>&6
-echo "configure:2681: checking for network libraries" >&5
+echo "configure:2677: checking for network libraries" >&5
 if eval "test \"`echo '$''{'cf_cv_netlibs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2688,12 +2684,12 @@ cf_test_netlibs=yes
 for ac_func in gethostname
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2692: checking for $ac_func" >&5
+echo "configure:2688: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2697 "configure"
+#line 2693 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2716,7 +2712,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2739,7 +2735,7 @@ else
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
-echo "configure:2743: checking for gethostname in -lnsl" >&5
+echo "configure:2739: checking for gethostname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2747,7 +2743,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl $cf_cv_netlibs $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2751 "configure"
+#line 2747 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2758,7 +2754,7 @@ int main() {
 gethostname()
 ; return 0; }
 EOF
-if { (eval echo configure:2762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2791,7 +2787,7 @@ else
 	
 		
 echo $ac_n "checking for gethostname in -lsocket""... $ac_c" 1>&6
-echo "configure:2795: checking for gethostname in -lsocket" >&5
+echo "configure:2791: checking for gethostname in -lsocket" >&5
 ac_lib_var=`echo socket'_'gethostname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2799,7 +2795,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $cf_cv_netlibs $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2803 "configure"
+#line 2799 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2810,7 +2806,7 @@ int main() {
 gethostname()
 ; return 0; }
 EOF
-if { (eval echo configure:2814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2854,21 +2850,21 @@ done
 # FIXME:  sequent needs this library (i.e., -lsocket -linet -lnsl), but
 # I don't know the entrypoints - 97/7/22 TD
 echo $ac_n "checking for -linet""... $ac_c" 1>&6
-echo "configure:2858: checking for -linet" >&5
+echo "configure:2854: checking for -linet" >&5
 if eval "test \"`echo '$''{'ac_cv_lib_inet'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
 LIBS="-linet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2865 "configure"
+#line 2861 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_lib_inet=yes
 else
@@ -2891,12 +2887,12 @@ if test "$ac_cv_func_lsocket" != no ; then
 for ac_func in socket
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2895: checking for $ac_func" >&5
+echo "configure:2891: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2900 "configure"
+#line 2896 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2919,7 +2915,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2942,7 +2938,7 @@ else
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:2946: checking for socket in -lsocket" >&5
+echo "configure:2942: checking for socket in -lsocket" >&5
 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2950,7 +2946,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $cf_cv_netlibs $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2954 "configure"
+#line 2950 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2961,7 +2957,7 @@ int main() {
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2994,7 +2990,7 @@ else
 	
 		
 echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6
-echo "configure:2998: checking for socket in -lbsd" >&5
+echo "configure:2994: checking for socket in -lbsd" >&5
 ac_lib_var=`echo bsd'_'socket | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3002,7 +2998,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lbsd $cf_cv_netlibs $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3006 "configure"
+#line 3002 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3013,7 +3009,7 @@ int main() {
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3058,12 +3054,12 @@ fi
 for ac_func in gethostbyname
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3062: checking for $ac_func" >&5
+echo "configure:3058: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3067 "configure"
+#line 3063 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3086,7 +3082,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3109,7 +3105,7 @@ else
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3113: checking for gethostbyname in -lnsl" >&5
+echo "configure:3109: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3117,7 +3113,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl $cf_cv_netlibs $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3121 "configure"
+#line 3117 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3128,7 +3124,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3169,12 +3165,12 @@ done
 for ac_func in strcasecmp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3173: checking for $ac_func" >&5
+echo "configure:3169: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3178 "configure"
+#line 3174 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3197,7 +3193,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3220,7 +3216,7 @@ else
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
-echo "configure:3224: checking for strcasecmp in -lresolv" >&5
+echo "configure:3220: checking for strcasecmp in -lresolv" >&5
 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3228,7 +3224,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv $cf_cv_netlibs $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3232 "configure"
+#line 3228 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3239,7 +3235,7 @@ int main() {
 strcasecmp()
 ; return 0; }
 EOF
-if { (eval echo configure:3243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3284,7 +3280,7 @@ test $cf_test_netlibs = no && echo "$cf_cv_netlibs" >&6
 
 
 echo $ac_n "checking for screen type""... $ac_c" 1>&6
-echo "configure:3288: checking for screen type" >&5
+echo "configure:3284: checking for screen type" >&5
 if eval "test \"`echo '$''{'cf_cv_screen'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3308,19 +3304,22 @@ fi
 
 echo "$ac_t""$cf_cv_screen" 1>&6
 
-case $cf_cv_screen in
-curses)
+if test $cf_cv_screen != ncurses ; then
 	if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" != set"; then
 		cf_cv_ncurses_header=curses.h
 	fi
+fi
+
+case $cf_cv_screen in
+curses)
 	
 echo $ac_n "checking for initscr""... $ac_c" 1>&6
-echo "configure:3319: checking for initscr" >&5
+echo "configure:3318: checking for initscr" >&5
 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3324 "configure"
+#line 3323 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char initscr(); below.  */
@@ -3343,7 +3342,7 @@ initscr();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_initscr=yes"
 else
@@ -3364,7 +3363,7 @@ else
 case $host_os in #(vi
 freebsd*) #(vi
 	echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
-echo "configure:3368: checking for tgoto in -lmytinfo" >&5
+echo "configure:3367: checking for tgoto in -lmytinfo" >&5
 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3372,7 +3371,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmytinfo  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3376 "configure"
+#line 3375 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3383,7 +3382,7 @@ int main() {
 tgoto()
 ; return 0; }
 EOF
-if { (eval echo configure:3387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3406,7 +3405,7 @@ fi
 	;;
 *hp-hpux10.*)
 	echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
-echo "configure:3410: checking for initscr in -lHcurses" >&5
+echo "configure:3409: checking for initscr in -lHcurses" >&5
 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3414,7 +3413,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lHcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3418 "configure"
+#line 3417 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3425,7 +3424,7 @@ int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:3429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3449,7 +3448,7 @@ else
   echo "$ac_t""no" 1>&6
 
 	echo $ac_n "checking for initscr in -lcur_color""... $ac_c" 1>&6
-echo "configure:3453: checking for initscr in -lcur_color" >&5
+echo "configure:3452: checking for initscr in -lcur_color" >&5
 ac_lib_var=`echo cur_color'_'initscr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3457,7 +3456,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcur_color  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3461 "configure"
+#line 3460 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3468,7 +3467,7 @@ int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:3472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3507,12 +3506,12 @@ fi
 
 cf_save_LIBS="$LIBS"
 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
-echo "configure:3511: checking for tgoto" >&5
+echo "configure:3510: checking for tgoto" >&5
 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3516 "configure"
+#line 3515 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char tgoto(); below.  */
@@ -3535,7 +3534,7 @@ tgoto();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_tgoto=yes"
 else
@@ -3551,7 +3550,7 @@ if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   
 	echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6
-echo "configure:3555: checking for initscr in -lcurses" >&5
+echo "configure:3554: checking for initscr in -lcurses" >&5
 ac_lib_var=`echo curses'_'initscr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3559,7 +3558,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3563 "configure"
+#line 3562 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3570,7 +3569,7 @@ int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3604,7 +3603,7 @@ else
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
-echo "configure:3608: checking for tgoto in -ltermcap" >&5
+echo "configure:3607: checking for tgoto in -ltermcap" >&5
 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3612,7 +3611,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ltermcap  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3616 "configure"
+#line 3615 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3623,7 +3622,7 @@ int main() {
 tgoto()
 ; return 0; }
 EOF
-if { (eval echo configure:3627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3641,7 +3640,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   
 	LIBS="-ltermcap $cf_save_LIBS"
 	echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6
-echo "configure:3645: checking for initscr in -lcurses" >&5
+echo "configure:3644: checking for initscr in -lcurses" >&5
 ac_lib_var=`echo curses'_'initscr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3649,7 +3648,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3653 "configure"
+#line 3652 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3660,7 +3659,7 @@ int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3687,7 +3686,7 @@ else
   echo "$ac_t""no" 1>&6
 
 		echo $ac_n "checking for initscr in -lcursesX""... $ac_c" 1>&6
-echo "configure:3691: checking for initscr in -lcursesX" >&5
+echo "configure:3690: checking for initscr in -lcursesX" >&5
 ac_lib_var=`echo cursesX'_'initscr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3695,7 +3694,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcursesX  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3699 "configure"
+#line 3698 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3706,7 +3705,7 @@ int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:3710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3733,7 +3732,7 @@ else
   echo "$ac_t""no" 1>&6
 
 			echo $ac_n "checking for initscr in -ljcurses""... $ac_c" 1>&6
-echo "configure:3737: checking for initscr in -ljcurses" >&5
+echo "configure:3736: checking for initscr in -ljcurses" >&5
 ac_lib_var=`echo jcurses'_'initscr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3741,7 +3740,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ljcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3745 "configure"
+#line 3744 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3752,7 +3751,7 @@ int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:3756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3790,7 +3789,7 @@ else
   echo "$ac_t""no" 1>&6
 
 	echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6
-echo "configure:3794: checking for initscr in -lcurses" >&5
+echo "configure:3793: checking for initscr in -lcurses" >&5
 ac_lib_var=`echo curses'_'initscr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3798,7 +3797,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3802 "configure"
+#line 3801 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3809,7 +3808,7 @@ int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:3813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3848,14 +3847,14 @@ fi
 
 	
 echo $ac_n "checking for curses performance tradeoff""... $ac_c" 1>&6
-echo "configure:3852: checking for curses performance tradeoff" >&5
+echo "configure:3851: checking for curses performance tradeoff" >&5
 if eval "test \"`echo '$''{'cf_cv_curs_performance'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cf_cv_curs_performance=no
     cat > conftest.$ac_ext <<EOF
-#line 3859 "configure"
+#line 3858 "configure"
 #include "confdefs.h"
 
 #include <$cf_cv_ncurses_header>
@@ -3869,11 +3868,11 @@ int main() {
 	
 ; return 0; }
 EOF
-if { (eval echo configure:3873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
 	cat > conftest.$ac_ext <<EOF
-#line 3877 "configure"
+#line 3876 "configure"
 #include "confdefs.h"
 
 #define CURS_PERFORMANCE
@@ -3888,7 +3887,7 @@ int main() {
 	
 ; return 0; }
 EOF
-if { (eval echo configure:3892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_curs_performance=yes
 else
@@ -3913,13 +3912,13 @@ EOF
 ncurses)
 	
 echo $ac_n "checking for ncurses header file""... $ac_c" 1>&6
-echo "configure:3917: checking for ncurses header file" >&5
+echo "configure:3916: checking for ncurses header file" >&5
 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 	cat > conftest.$ac_ext <<EOF
-#line 3923 "configure"
+#line 3922 "configure"
 #include "confdefs.h"
 #include <curses.h>
 int main() {
@@ -3936,7 +3935,7 @@ make an error
 	
 ; return 0; }
 EOF
-if { (eval echo configure:3940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ncurses_header=predefined
 else
@@ -4022,7 +4021,7 @@ done
 	;;
 esac
 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
-echo "configure:4026: checking for ncurses version" >&5
+echo "configure:4025: checking for ncurses version" >&5
 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4047,7 +4046,7 @@ Autoconf "old"
 #endif
 EOF
 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
-	{ (eval echo configure:4051: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
+	{ (eval echo configure:4050: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
 	if test -f conftest.out ; then
 		cf_out=`cat conftest.out | sed -e 's@^Autoconf @@' -e 's@^[^"]*"@@' -e 's@".*@@'`
 		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
@@ -4056,7 +4055,7 @@ EOF
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 4060 "configure"
+#line 4059 "configure"
 #include "confdefs.h"
 
 #include <$cf_cv_ncurses_header>
@@ -4079,7 +4078,7 @@ int main()
 	exit(0);
 }
 EOF
-if { (eval echo configure:4083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   
 	cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -4100,7 +4099,7 @@ echo "$ac_t""$cf_cv_ncurses_version" 1>&6
 
 cf_ncurses_LIBS=""
 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:4104: checking for Gpm_Open in -lgpm" >&5
+echo "configure:4103: checking for Gpm_Open in -lgpm" >&5
 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4108,7 +4107,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgpm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4112 "configure"
+#line 4111 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4119,7 +4118,7 @@ int main() {
 Gpm_Open()
 ; return 0; }
 EOF
-if { (eval echo configure:4123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4135,7 +4134,7 @@ fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
-echo "configure:4139: checking for initscr in -lgpm" >&5
+echo "configure:4138: checking for initscr in -lgpm" >&5
 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4143,7 +4142,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgpm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4147 "configure"
+#line 4146 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4154,7 +4153,7 @@ int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:4158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4192,7 +4191,7 @@ freebsd*)
 	# This is only necessary if you are linking against an obsolete
 	# version of ncurses (but it should do no harm, since it's static).
 	echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
-echo "configure:4196: checking for tgoto in -lmytinfo" >&5
+echo "configure:4195: checking for tgoto in -lmytinfo" >&5
 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4200,7 +4199,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmytinfo  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4204 "configure"
+#line 4203 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4211,7 +4210,7 @@ int main() {
 tgoto()
 ; return 0; }
 EOF
-if { (eval echo configure:4215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4239,12 +4238,12 @@ LIBS="$cf_ncurses_LIBS $LIBS"
 	cf_cv_have_lib_ncurses=no
 	cf_libdir=""
 	echo $ac_n "checking for initscr""... $ac_c" 1>&6
-echo "configure:4243: checking for initscr" >&5
+echo "configure:4242: checking for initscr" >&5
 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4248 "configure"
+#line 4247 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char initscr(); below.  */
@@ -4267,7 +4266,7 @@ initscr();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_initscr=yes"
 else
@@ -4287,17 +4286,17 @@ else
 
 		cf_save_LIBS="$LIBS"
 		echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
-echo "configure:4291: checking for initscr in -lncurses" >&5
+echo "configure:4290: checking for initscr in -lncurses" >&5
 		LIBS="-lncurses $LIBS"
 		cat > conftest.$ac_ext <<EOF
-#line 4294 "configure"
+#line 4293 "configure"
 #include "confdefs.h"
 #include <$cf_cv_ncurses_header>
 int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:4301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 			 cf_cv_have_lib_ncurses=yes
@@ -4324,17 +4323,17 @@ test "$prefix" != /usr           && cf_search="$cf_search /usr/lib /usr/lib/ncur
 			for cf_libdir in $cf_search
 			do
 				echo $ac_n "checking for -lncurses in $cf_libdir""... $ac_c" 1>&6
-echo "configure:4328: checking for -lncurses in $cf_libdir" >&5
+echo "configure:4327: checking for -lncurses in $cf_libdir" >&5
 				LIBS="-L$cf_libdir -lncurses $cf_save_LIBS"
 				cat > conftest.$ac_ext <<EOF
-#line 4331 "configure"
+#line 4330 "configure"
 #include "confdefs.h"
 #include <$cf_cv_ncurses_header>
 int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:4338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 			 		 cf_cv_have_lib_ncurses=yes
@@ -4361,7 +4360,7 @@ fi
 
 if test -n "$cf_ncurses_LIBS" ; then
 	echo $ac_n "checking if we can link ncurses without $cf_ncurses_LIBS""... $ac_c" 1>&6
-echo "configure:4365: checking if we can link ncurses without $cf_ncurses_LIBS" >&5
+echo "configure:4364: checking if we can link ncurses without $cf_ncurses_LIBS" >&5
 	cf_ncurses_SAVE="$LIBS"
 	for p in $cf_ncurses_LIBS ; do
 		q=`echo $LIBS | sed -e 's/'$p' //' -e 's/'$p'$//'`
@@ -4370,14 +4369,14 @@ echo "configure:4365: checking if we can link ncurses without $cf_ncurses_LIBS"
 		fi
 	done
 	cat > conftest.$ac_ext <<EOF
-#line 4374 "configure"
+#line 4373 "configure"
 #include "confdefs.h"
 #include <$cf_cv_ncurses_header>
 int main() {
 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:4381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 else
@@ -4401,7 +4400,7 @@ cf_cv_lib_termcap=none
 # HP-UX 9.x terminfo has setupterm, but no tigetstr.
 if test "$termlib" = none; then
 	echo $ac_n "checking for tigetstr in -ltermlib""... $ac_c" 1>&6
-echo "configure:4405: checking for tigetstr in -ltermlib" >&5
+echo "configure:4404: checking for tigetstr in -ltermlib" >&5
 ac_lib_var=`echo termlib'_'tigetstr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4409,7 +4408,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ltermlib  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4413 "configure"
+#line 4412 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4420,7 +4419,7 @@ int main() {
 tigetstr()
 ; return 0; }
 EOF
-if { (eval echo configure:4424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4443,7 +4442,7 @@ fi
 fi
 if test "$cf_cv_lib_termcap" = none; then
 	echo $ac_n "checking for tgoto in -ltermlib""... $ac_c" 1>&6
-echo "configure:4447: checking for tgoto in -ltermlib" >&5
+echo "configure:4446: checking for tgoto in -ltermlib" >&5
 ac_lib_var=`echo termlib'_'tgoto | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4451,7 +4450,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ltermlib  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4455 "configure"
+#line 4454 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4462,7 +4461,7 @@ int main() {
 tgoto()
 ; return 0; }
 EOF
-if { (eval echo configure:4466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4486,7 +4485,7 @@ fi
 if test "$cf_cv_lib_termcap" = none; then
 	# allow curses library for broken AIX system.
 	echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6
-echo "configure:4490: checking for initscr in -lcurses" >&5
+echo "configure:4489: checking for initscr in -lcurses" >&5
 ac_lib_var=`echo curses'_'initscr | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4494,7 +4493,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4498 "configure"
+#line 4497 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4505,7 +4504,7 @@ int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:4509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4526,7 +4525,7 @@ else
 fi
 
 	echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
-echo "configure:4530: checking for tgoto in -ltermcap" >&5
+echo "configure:4529: checking for tgoto in -ltermcap" >&5
 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4534,7 +4533,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ltermcap  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4538 "configure"
+#line 4537 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4545,7 +4544,7 @@ int main() {
 tgoto()
 ; return 0; }
 EOF
-if { (eval echo configure:4549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4568,7 +4567,7 @@ fi
 fi
 if test "$cf_cv_lib_termcap" = none; then
 	echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
-echo "configure:4572: checking for tgoto in -ltermcap" >&5
+echo "configure:4571: checking for tgoto in -ltermcap" >&5
 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4576,7 +4575,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ltermcap  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4580 "configure"
+#line 4579 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4587,7 +4586,7 @@ int main() {
 tgoto()
 ; return 0; }
 EOF
-if { (eval echo configure:4591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4610,7 +4609,7 @@ fi
 fi
 if test "$cf_cv_lib_termcap" = none; then
 	echo $ac_n "checking for tgoto in -lncurses""... $ac_c" 1>&6
-echo "configure:4614: checking for tgoto in -lncurses" >&5
+echo "configure:4613: checking for tgoto in -lncurses" >&5
 ac_lib_var=`echo ncurses'_'tgoto | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4618,7 +4617,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lncurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4622 "configure"
+#line 4621 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4629,7 +4628,7 @@ int main() {
 tgoto()
 ; return 0; }
 EOF
-if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4659,20 +4658,20 @@ fi
 
 	
 echo $ac_n "checking for slang header file""... $ac_c" 1>&6
-echo "configure:4663: checking for slang header file" >&5
+echo "configure:4662: checking for slang header file" >&5
 if eval "test \"`echo '$''{'cf_cv_slang_header'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 	cat > conftest.$ac_ext <<EOF
-#line 4669 "configure"
+#line 4668 "configure"
 #include "confdefs.h"
 #include <slang.h>
 int main() {
 printf("%s\n", SLANG_VERSION)
 ; return 0; }
 EOF
-if { (eval echo configure:4676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_slang_header=predefined
 else
@@ -4746,12 +4745,12 @@ esac
 
 	
 echo $ac_n "checking for acos""... $ac_c" 1>&6
-echo "configure:4750: checking for acos" >&5
+echo "configure:4749: checking for acos" >&5
 if eval "test \"`echo '$''{'ac_cv_func_acos'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4755 "configure"
+#line 4754 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char acos(); below.  */
@@ -4774,7 +4773,7 @@ acos();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_acos=yes"
 else
@@ -4793,7 +4792,7 @@ else
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for acos in -lm""... $ac_c" 1>&6
-echo "configure:4797: checking for acos in -lm" >&5
+echo "configure:4796: checking for acos in -lm" >&5
 ac_lib_var=`echo m'_'acos | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4801,7 +4800,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm $LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4805 "configure"
+#line 4804 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4812,7 +4811,7 @@ int main() {
 acos()
 ; return 0; }
 EOF
-if { (eval echo configure:4816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4852,12 +4851,12 @@ fi
 	cf_cv_have_lib_slang=no
 	cf_libdir=""
 	echo $ac_n "checking for SLtt_get_screen_size""... $ac_c" 1>&6
-echo "configure:4856: checking for SLtt_get_screen_size" >&5
+echo "configure:4855: checking for SLtt_get_screen_size" >&5
 if eval "test \"`echo '$''{'ac_cv_func_SLtt_get_screen_size'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4861 "configure"
+#line 4860 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char SLtt_get_screen_size(); below.  */
@@ -4880,7 +4879,7 @@ SLtt_get_screen_size();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_SLtt_get_screen_size=yes"
 else
@@ -4900,17 +4899,17 @@ else
 
 		cf_save_LIBS="$LIBS"
 		echo $ac_n "checking for SLtt_get_screen_size in -lslang""... $ac_c" 1>&6
-echo "configure:4904: checking for SLtt_get_screen_size in -lslang" >&5
+echo "configure:4903: checking for SLtt_get_screen_size in -lslang" >&5
 		LIBS="-lslang $LIBS"
 		cat > conftest.$ac_ext <<EOF
-#line 4907 "configure"
+#line 4906 "configure"
 #include "confdefs.h"
 #include <slang.h>
 int main() {
 SLtt_get_screen_size()
 ; return 0; }
 EOF
-if { (eval echo configure:4914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 			 cf_cv_have_lib_slang=yes
@@ -4937,17 +4936,17 @@ test "$prefix" != /usr           && cf_search="$cf_search /usr/lib /usr/lib/slan
 			for cf_libdir in $cf_search
 			do
 				echo $ac_n "checking for -lslang in $cf_libdir""... $ac_c" 1>&6
-echo "configure:4941: checking for -lslang in $cf_libdir" >&5
+echo "configure:4940: checking for -lslang in $cf_libdir" >&5
 				LIBS="-L$cf_libdir -lslang $cf_save_LIBS"
 				cat > conftest.$ac_ext <<EOF
-#line 4944 "configure"
+#line 4943 "configure"
 #include "confdefs.h"
 #include <slang.h>
 int main() {
 SLtt_get_screen_size()
 ; return 0; }
 EOF
-if { (eval echo configure:4951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 			 		 cf_cv_have_lib_slang=yes
@@ -4975,35 +4974,12 @@ fi
 	;;
 esac
 
-echo $ac_n "checking for location of config-file""... $ac_c" 1>&6
-echo "configure:4980: checking for location of config-file" >&5
-# Check whether --with-cfg-file or --without-cfg-file was given.
-if test "${with_cfg_file+set}" = set; then
-  withval="$with_cfg_file"
-  :
-else
-  withval="${LYNX_CFG_FILE-$libdir/lynx.cfg}"
-fi
-case ".$withval" in #(vi
-./*) #(vi
-  ;;
-.\${*prefix}*) #(vi
-  eval withval="$withval"
-  case ".$withval" in #(vi
-  .NONE/*)
-    withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
-    ;;
-  esac
-  ;; #(vi
-.NONE/*)
-  withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
-  ;;
-*)
-  { echo "configure: error: expected a pathname for cfg-file" 1>&2; exit 1; }
-  ;;
-esac
-eval LYNX_CFG_FILE="$withval"
+eval cf_libdir=$libdir
+cf_libdir=`echo $cf_libdir | sed -e s@'^NONE/'@$ac_default_prefix/@`
 
+echo $ac_n "checking for location of config-file""... $ac_c" 1>&6
+echo "configure:4982: checking for location of config-file" >&5
+LYNX_CFG_FILE=$cf_libdir/lynx.cfg
 cat >> confdefs.h <<EOF
 #define LYNX_CFG_FILE "$LYNX_CFG_FILE"
 EOF
@@ -5012,12 +4988,12 @@ echo "$ac_t""$LYNX_CFG_FILE" 1>&6
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:5016: checking for ANSI C header files" >&5
+echo "configure:4992: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5021 "configure"
+#line 4997 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -5025,7 +5001,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5042,7 +5018,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 5046 "configure"
+#line 5022 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -5060,7 +5036,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 5064 "configure"
+#line 5040 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -5081,7 +5057,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 5085 "configure"
+#line 5061 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -5092,7 +5068,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:5096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -5116,12 +5092,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:5120: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:5096: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5125 "configure"
+#line 5101 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -5130,7 +5106,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:5134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -5155,12 +5131,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:5159: checking for $ac_hdr that defines DIR" >&5
+echo "configure:5135: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5164 "configure"
+#line 5140 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -5168,7 +5144,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:5172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -5193,7 +5169,7 @@ done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:5197: checking for opendir in -ldir" >&5
+echo "configure:5173: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5201,7 +5177,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5205 "configure"
+#line 5181 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5212,7 +5188,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:5216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5234,7 +5210,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:5238: checking for opendir in -lx" >&5
+echo "configure:5214: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5242,7 +5218,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5246 "configure"
+#line 5222 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5253,7 +5229,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:5257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5291,17 +5267,17 @@ for ac_hdr in \
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5295: checking for $ac_hdr" >&5
+echo "configure:5271: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5300 "configure"
+#line 5276 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5329,13 +5305,13 @@ done
 
 
 echo $ac_n "checking termio.h and termios.h""... $ac_c" 1>&6
-echo "configure:5333: checking termio.h and termios.h" >&5
+echo "configure:5309: checking termio.h and termios.h" >&5
 if eval "test \"`echo '$''{'cf_cv_termio_and_termios'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 5339 "configure"
+#line 5315 "configure"
 #include "confdefs.h"
 
 #if HAVE_TERMIO_H
@@ -5348,7 +5324,7 @@ int main() {
 putchar (0x0a)
 ; return 0; }
 EOF
-if { (eval echo configure:5352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_termio_and_termios=yes
 else
@@ -5371,17 +5347,17 @@ for ac_hdr in sys/wait.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5375: checking for $ac_hdr" >&5
+echo "configure:5351: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5380 "configure"
+#line 5356 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5418,17 +5394,17 @@ for ac_hdr in wait.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5422: checking for $ac_hdr" >&5
+echo "configure:5398: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5427 "configure"
+#line 5403 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5458,17 +5434,17 @@ for ac_hdr in waitstatus.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5462: checking for $ac_hdr" >&5
+echo "configure:5438: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5467 "configure"
+#line 5443 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5509,13 +5485,13 @@ fi
 
 
 echo $ac_n "checking for union wait""... $ac_c" 1>&6
-echo "configure:5513: checking for union wait" >&5
+echo "configure:5489: checking for union wait" >&5
 if eval "test \"`echo '$''{'cf_cv_type_unionwait'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 	cat > conftest.$ac_ext <<EOF
-#line 5519 "configure"
+#line 5495 "configure"
 #include "confdefs.h"
 $cf_wait_headers
 int main() {
@@ -5525,7 +5501,7 @@ int x;
 	
 ; return 0; }
 EOF
-if { (eval echo configure:5529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_type_unionwait=no
 	 echo compiles ok w/o union wait 1>&5
@@ -5536,7 +5512,7 @@ else
   rm -rf conftest*
   
 	cat > conftest.$ac_ext <<EOF
-#line 5540 "configure"
+#line 5516 "configure"
 #include "confdefs.h"
 $cf_wait_headers
 int main() {
@@ -5550,7 +5526,7 @@ union wait x;
 	
 ; return 0; }
 EOF
-if { (eval echo configure:5554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_type_unionwait=yes
 	 echo compiles ok with union wait and possibly macros too 1>&5
@@ -5577,20 +5553,20 @@ EOF
 if test $cf_cv_type_unionwait = yes; then
 
 	echo $ac_n "checking if union wait can be used as wait-arg""... $ac_c" 1>&6
-echo "configure:5581: checking if union wait can be used as wait-arg" >&5
+echo "configure:5557: checking if union wait can be used as wait-arg" >&5
 	if eval "test \"`echo '$''{'cf_cv_arg_union_wait'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 		cat > conftest.$ac_ext <<EOF
-#line 5587 "configure"
+#line 5563 "configure"
 #include "confdefs.h"
 $cf_wait_headers
 int main() {
 union wait x; wait(&x)
 ; return 0; }
 EOF
-if { (eval echo configure:5594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_arg_union_wait=yes
 else
@@ -5610,20 +5586,20 @@ EOF
 
 
 	echo $ac_n "checking if union wait can be used as waitpid-arg""... $ac_c" 1>&6
-echo "configure:5614: checking if union wait can be used as waitpid-arg" >&5
+echo "configure:5590: checking if union wait can be used as waitpid-arg" >&5
 	if eval "test \"`echo '$''{'cf_cv_arg_union_waitpid'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 		cat > conftest.$ac_ext <<EOF
-#line 5620 "configure"
+#line 5596 "configure"
 #include "confdefs.h"
 $cf_wait_headers
 int main() {
 union wait x; waitpid(0, &x, 0)
 ; return 0; }
 EOF
-if { (eval echo configure:5627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_arg_union_waitpid=yes
 else
@@ -5647,12 +5623,12 @@ fi
 
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:5651: checking for pid_t" >&5
+echo "configure:5627: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5656 "configure"
+#line 5632 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -5681,17 +5657,17 @@ fi
 
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:5685: checking for vfork.h" >&5
+echo "configure:5661: checking for vfork.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5690 "configure"
+#line 5666 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5716,18 +5692,18 @@ else
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:5720: checking for working vfork" >&5
+echo "configure:5696: checking for working vfork" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
   echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:5726: checking for vfork" >&5
+echo "configure:5702: checking for vfork" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5731 "configure"
+#line 5707 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vfork(); below.  */
@@ -5750,7 +5726,7 @@ vfork();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_vfork=yes"
 else
@@ -5771,7 +5747,7 @@ fi
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 5775 "configure"
+#line 5751 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -5866,7 +5842,7 @@ main() {
   }
 }
 EOF
-if { (eval echo configure:5870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_vfork_works=yes
 else
@@ -5890,20 +5866,20 @@ fi
 
 
 echo $ac_n "checking for broken/missing definition of remove""... $ac_c" 1>&6
-echo "configure:5894: checking for broken/missing definition of remove" >&5
+echo "configure:5870: checking for broken/missing definition of remove" >&5
 if eval "test \"`echo '$''{'cf_cv_baddef_remove'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 5900 "configure"
+#line 5876 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main() {
 remove("dummy")
 ; return 0; }
 EOF
-if { (eval echo configure:5907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   cf_cv_baddef_remove=no
 else
@@ -5911,7 +5887,7 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 5915 "configure"
+#line 5891 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 		int __unlink(name) { return unlink(name); } 
@@ -5919,7 +5895,7 @@ int main() {
 remove("dummy")
 ; return 0; }
 EOF
-if { (eval echo configure:5923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   cf_cv_baddef_remove=yes
 else
@@ -5950,12 +5926,12 @@ for ac_func in \
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5954: checking for $ac_func" >&5
+echo "configure:5930: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5959 "configure"
+#line 5935 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5978,7 +5954,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6006,13 +5982,13 @@ done
 
 
 echo $ac_n "checking if TRUE/FALSE are defined""... $ac_c" 1>&6
-echo "configure:6010: checking if TRUE/FALSE are defined" >&5
+echo "configure:5986: checking if TRUE/FALSE are defined" >&5
 if eval "test \"`echo '$''{'cf_cv_bool_defs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 6016 "configure"
+#line 5992 "configure"
 #include "confdefs.h"
 
 #include <$cf_cv_ncurses_header>
@@ -6021,7 +5997,7 @@ int main() {
 int x = TRUE, y = FALSE
 ; return 0; }
 EOF
-if { (eval echo configure:6025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_bool_defs=yes
 else
@@ -6047,13 +6023,13 @@ fi
 
 
 echo $ac_n "checking for errno external decl""... $ac_c" 1>&6
-echo "configure:6051: checking for errno external decl" >&5
+echo "configure:6027: checking for errno external decl" >&5
 if eval "test \"`echo '$''{'cf_cv_extern_errno'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 6057 "configure"
+#line 6033 "configure"
 #include "confdefs.h"
 
 #include <errno.h>
@@ -6061,7 +6037,7 @@ int main() {
 int x = errno
 ; return 0; }
 EOF
-if { (eval echo configure:6065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_extern_errno=yes
 else
@@ -6081,20 +6057,20 @@ EOF
 
 
 echo $ac_n "checking for setlocale()""... $ac_c" 1>&6
-echo "configure:6085: checking for setlocale()" >&5
+echo "configure:6061: checking for setlocale()" >&5
 if eval "test \"`echo '$''{'cf_cv_locale'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 6091 "configure"
+#line 6067 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 setlocale(LC_ALL, "")
 ; return 0; }
 EOF
-if { (eval echo configure:6098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   cf_cv_locale=yes
 else
@@ -6115,13 +6091,13 @@ EOF
 
 
 echo $ac_n "checking if NGROUPS is defined""... $ac_c" 1>&6
-echo "configure:6119: checking if NGROUPS is defined" >&5
+echo "configure:6095: checking if NGROUPS is defined" >&5
 if eval "test \"`echo '$''{'cf_cv_ngroups'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 6125 "configure"
+#line 6101 "configure"
 #include "confdefs.h"
 
 #if HAVE_SYS_PARAM_H
@@ -6135,7 +6111,7 @@ int main() {
 int x = NGROUPS
 ; return 0; }
 EOF
-if { (eval echo configure:6139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ngroups=yes
 else
@@ -6143,7 +6119,7 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 6147 "configure"
+#line 6123 "configure"
 #include "confdefs.h"
 
 #if HAVE_SYS_PARAM_H
@@ -6157,7 +6133,7 @@ int main() {
 int x = NGROUPS_MAX
 ; return 0; }
 EOF
-if { (eval echo configure:6161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ngroups=NGROUPS_MAX
 else
@@ -6188,13 +6164,13 @@ fi
 
 
 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
-echo "configure:6192: checking declaration of sys_errlist" >&5
+echo "configure:6168: checking declaration of sys_errlist" >&5
 if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <<EOF
-#line 6198 "configure"
+#line 6174 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -6204,7 +6180,7 @@ int main() {
 char *c = (char *) *sys_errlist
 ; return 0; }
 EOF
-if { (eval echo configure:6208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_dcl_sys_errlist=yes
 else
@@ -6225,20 +6201,20 @@ if test $cf_cv_dcl_sys_errlist = no ; then
 EOF
 
     echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
-echo "configure:6229: checking existence of sys_errlist" >&5
+echo "configure:6205: checking existence of sys_errlist" >&5
     if eval "test \"`echo '$''{'cf_cv_have_sys_errlist'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
         cat > conftest.$ac_ext <<EOF
-#line 6235 "configure"
+#line 6211 "configure"
 #include "confdefs.h"
 #include <errno.h>
 int main() {
 char *c = (char *) *sys_errlist
 ; return 0; }
 EOF
-if { (eval echo configure:6242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   cf_cv_have_sys_errlist=yes
 else
@@ -6255,13 +6231,13 @@ fi
 
 
 echo $ac_n "checking if struct utmp is declared""... $ac_c" 1>&6
-echo "configure:6259: checking if struct utmp is declared" >&5
+echo "configure:6235: checking if struct utmp is declared" >&5
 if eval "test \"`echo '$''{'cf_cv_have_utmp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 	cat > conftest.$ac_ext <<EOF
-#line 6265 "configure"
+#line 6241 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -6270,7 +6246,7 @@ int main() {
 struct utmp x; char *y = &x.ut_host[0]
 ; return 0; }
 EOF
-if { (eval echo configure:6274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_have_utmp=yes
 else
@@ -6278,14 +6254,14 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 6282 "configure"
+#line 6258 "configure"
 #include "confdefs.h"
 #include <utmpx.h>
 int main() {
 struct utmpx x; char *y = &x.ut_host[0]
 ; return 0; }
 EOF
-if { (eval echo configure:6289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_have_utmp=utmpx
 else
@@ -6316,13 +6292,13 @@ EOF
 if test $cf_cv_screen != slang ; then
 	
 echo $ac_n "checking if curses supports alternate-character set""... $ac_c" 1>&6
-echo "configure:6320: checking if curses supports alternate-character set" >&5
+echo "configure:6296: checking if curses supports alternate-character set" >&5
 if eval "test \"`echo '$''{'cf_cv_alt_char_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 	cat > conftest.$ac_ext <<EOF
-#line 6326 "configure"
+#line 6302 "configure"
 #include "confdefs.h"
 
 #include <$cf_cv_ncurses_header>
@@ -6331,7 +6307,7 @@ int main() {
 chtype x = acs_map['l']; acs_map['m'] = 0
 ; return 0; }
 EOF
-if { (eval echo configure:6335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   cf_cv_alt_char_set=yes
 else
@@ -6351,13 +6327,13 @@ EOF
 
 	
 echo $ac_n "checking if curses supports fancy attributes""... $ac_c" 1>&6
-echo "configure:6355: checking if curses supports fancy attributes" >&5
+echo "configure:6331: checking if curses supports fancy attributes" >&5
 if eval "test \"`echo '$''{'cf_cv_fancy_curses'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 	cat > conftest.$ac_ext <<EOF
-#line 6361 "configure"
+#line 6337 "configure"
 #include "confdefs.h"
 
 #include <$cf_cv_ncurses_header>
@@ -6370,7 +6346,7 @@ attrset(A_UNDERLINE|A_BOLD|A_REVERSE);
 	
 ; return 0; }
 EOF
-if { (eval echo configure:6374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   cf_cv_fancy_curses=yes
 else
@@ -6390,7 +6366,7 @@ EOF
 
 
 	echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
-echo "configure:6394: checking for ncurses version" >&5
+echo "configure:6370: checking for ncurses version" >&5
 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6415,7 +6391,7 @@ Autoconf "old"
 #endif
 EOF
 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
-	{ (eval echo configure:6419: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
+	{ (eval echo configure:6395: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
 	if test -f conftest.out ; then
 		cf_out=`cat conftest.out | sed -e 's@^Autoconf @@' -e 's@^[^"]*"@@' -e 's@".*@@'`
 		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
@@ -6424,7 +6400,7 @@ EOF
 
 else
   cat > conftest.$ac_ext <<EOF
-#line 6428 "configure"
+#line 6404 "configure"
 #include "confdefs.h"
 
 #include <$cf_cv_ncurses_header>
@@ -6447,7 +6423,7 @@ int main()
 	exit(0);
 }
 EOF
-if { (eval echo configure:6451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   
 	cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -6467,13 +6443,13 @@ echo "$ac_t""$cf_cv_ncurses_version" 1>&6
 
 if test "$cf_cv_ncurses_version" != no ; then
 echo $ac_n "checking for obsolete/broken version of ncurses""... $ac_c" 1>&6
-echo "configure:6471: checking for obsolete/broken version of ncurses" >&5
+echo "configure:6447: checking for obsolete/broken version of ncurses" >&5
 if eval "test \"`echo '$''{'cf_cv_ncurses_broken'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <<EOF
-#line 6477 "configure"
+#line 6453 "configure"
 #include "confdefs.h"
 
 #include <$cf_cv_ncurses_header>
@@ -6487,7 +6463,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:6491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ncurses_broken=no
 else
@@ -6512,13 +6488,13 @@ fi
 
 	
 echo $ac_n "checking if curses supports color attributes""... $ac_c" 1>&6
-echo "configure:6516: checking if curses supports color attributes" >&5
+echo "configure:6492: checking if curses supports color attributes" >&5
 if eval "test \"`echo '$''{'cf_cv_color_curses'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 	cat > conftest.$ac_ext <<EOF
-#line 6522 "configure"
+#line 6498 "configure"
 #include "confdefs.h"
 
 #include <$cf_cv_ncurses_header>
@@ -6533,7 +6509,7 @@ chtype x = COLOR_BLUE;
 	
 ; return 0; }
 EOF
-if { (eval echo configure:6537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   cf_cv_color_curses=yes
 else
@@ -6560,7 +6536,7 @@ fi
 
 	
 echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6
-echo "configure:6564: checking declaration of size-change" >&5
+echo "configure:6540: checking declaration of size-change" >&5
 if eval "test \"`echo '$''{'cf_cv_sizechange'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6574,7 +6550,7 @@ do
     CFLAGS="$cf_save_CFLAGS"
     test -n "$cf_opts" && CFLAGS="$CFLAGS -D$cf_opts"
     cat > conftest.$ac_ext <<EOF
-#line 6578 "configure"
+#line 6554 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if HAVE_TERMIOS_H
@@ -6609,7 +6585,7 @@ int main() {
 	
 ; return 0; }
 EOF
-if { (eval echo configure:6613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_sizechange=yes
 else
@@ -6641,20 +6617,20 @@ EOF
 
 	
 echo $ac_n "checking if ttytype is declared in curses library""... $ac_c" 1>&6
-echo "configure:6645: checking if ttytype is declared in curses library" >&5
+echo "configure:6621: checking if ttytype is declared in curses library" >&5
 if eval "test \"`echo '$''{'cf_cv_have_ttytype'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 	cat > conftest.$ac_ext <<EOF
-#line 6651 "configure"
+#line 6627 "configure"
 #include "confdefs.h"
 #include <$cf_cv_ncurses_header>
 int main() {
 char *x = &ttytype[1]; *x = 1
 ; return 0; }
 EOF
-if { (eval echo configure:6658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   cf_cv_have_ttytype=yes
 else
@@ -6679,12 +6655,12 @@ EOF
 	
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6683: checking for $ac_func" >&5
+echo "configure:6659: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6688 "configure"
+#line 6664 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6707,7 +6683,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6749,7 +6725,7 @@ EOF
 	EXTRA_DEPS="$EXTRA_DEPS do_chartrans_stuff"
 
 echo $ac_n "checking if color-style code should be used""... $ac_c" 1>&6
-echo "configure:6753: checking if color-style code should be used" >&5
+echo "configure:6729: checking if color-style code should be used" >&5
 # Check whether --enable-color-style or --disable-color-style was given.
 if test "${enable_color_style+set}" = set; then
   enableval="$enable_color_style"
@@ -6795,34 +6771,8 @@ EOF
 	echo "$ac_t""curses-style" 1>&6
 
 	echo $ac_n "checking for location of style-sheet file""... $ac_c" 1>&6
-echo "configure:6799: checking for location of style-sheet file" >&5
-	# Check whether --with-lss-file or --without-lss-file was given.
-if test "${with_lss_file+set}" = set; then
-  withval="$with_lss_file"
-  :
-else
-  withval="${LYNX_LSS_FILE-$libdir/lynx.lss}"
-fi
-case ".$withval" in #(vi
-./*) #(vi
-  ;;
-.\${*prefix}*) #(vi
-  eval withval="$withval"
-  case ".$withval" in #(vi
-  .NONE/*)
-    withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
-    ;;
-  esac
-  ;; #(vi
-.NONE/*)
-  withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
-  ;;
-*)
-  { echo "configure: error: expected a pathname for lss-file" 1>&2; exit 1; }
-  ;;
-esac
-eval LYNX_LSS_FILE="$withval"
-
+echo "configure:6775: checking for location of style-sheet file" >&5
+	LYNX_LSS_FILE=$cf_libdir/lynx.lss
 	cat >> confdefs.h <<EOF
 #define LYNX_LSS_FILE "$LYNX_LSS_FILE"
 EOF
@@ -6832,7 +6782,7 @@ EOF
 esac
 
 echo $ac_n "checking if you want to use zlib for decompression of some gzip files""... $ac_c" 1>&6
-echo "configure:6836: checking if you want to use zlib for decompression of some gzip files" >&5
+echo "configure:6786: checking if you want to use zlib for decompression of some gzip files" >&5
 # Check whether --with-zlib or --without-zlib was given.
 if test "${with_zlib+set}" = set; then
   withval="$with_zlib"
@@ -6848,12 +6798,12 @@ if test ".$use_zlib" != ".no" ; then
 	cf_cv_have_lib_z=no
 	cf_libdir=""
 	echo $ac_n "checking for gzopen""... $ac_c" 1>&6
-echo "configure:6852: checking for gzopen" >&5
+echo "configure:6802: checking for gzopen" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gzopen'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6857 "configure"
+#line 6807 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gzopen(); below.  */
@@ -6876,7 +6826,7 @@ gzopen();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_gzopen=yes"
 else
@@ -6896,17 +6846,17 @@ else
 
 		cf_save_LIBS="$LIBS"
 		echo $ac_n "checking for gzopen in -lz""... $ac_c" 1>&6
-echo "configure:6900: checking for gzopen in -lz" >&5
+echo "configure:6850: checking for gzopen in -lz" >&5
 		LIBS="-lz $LIBS"
 		cat > conftest.$ac_ext <<EOF
-#line 6903 "configure"
+#line 6853 "configure"
 #include "confdefs.h"
 #include <zlib.h>
 int main() {
 gzopen("name","mode")
 ; return 0; }
 EOF
-if { (eval echo configure:6910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 			 cf_cv_have_lib_z=yes
@@ -6933,17 +6883,17 @@ test "$prefix" != /usr           && cf_search="$cf_search /usr/lib /usr/lib/z"
 			for cf_libdir in $cf_search
 			do
 				echo $ac_n "checking for -lz in $cf_libdir""... $ac_c" 1>&6
-echo "configure:6937: checking for -lz in $cf_libdir" >&5
+echo "configure:6887: checking for -lz in $cf_libdir" >&5
 				LIBS="-L$cf_libdir -lz $cf_save_LIBS"
 				cat > conftest.$ac_ext <<EOF
-#line 6940 "configure"
+#line 6890 "configure"
 #include "confdefs.h"
 #include <zlib.h>
 int main() {
 gzopen("name","mode")
 ; return 0; }
 EOF
-if { (eval echo configure:6947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 			 		 cf_cv_have_lib_z=yes
@@ -6979,7 +6929,7 @@ fi
 # All DirEd functions that were enabled on compilation can be disabled
 # or modified at run time via DIRED_MENU symbols in lynx.cfg.
 echo $ac_n "checking if directory-editor code should be used""... $ac_c" 1>&6
-echo "configure:6983: checking if directory-editor code should be used" >&5
+echo "configure:6933: checking if directory-editor code should be used" >&5
 # Check whether --enable-dired or --disable-dired was given.
 if test "${enable_dired+set}" = set; then
   enableval="$enable_dired"
@@ -7004,7 +6954,7 @@ EOF
 
 
 	echo $ac_n "checking if you wish to allow extracting from archives via DirEd""... $ac_c" 1>&6
-echo "configure:7008: checking if you wish to allow extracting from archives via DirEd" >&5
+echo "configure:6958: checking if you wish to allow extracting from archives via DirEd" >&5
 	# Check whether --enable-dired-archive or --disable-dired-archive was given.
 if test "${enable_dired_archive+set}" = set; then
   enableval="$enable_dired_archive"
@@ -7022,7 +6972,7 @@ fi
 	echo "$ac_t""$enableval" 1>&6
 
 	echo $ac_n "checking if you wish to allow users to redefine DirEd keys""... $ac_c" 1>&6
-echo "configure:7026: checking if you wish to allow users to redefine DirEd keys" >&5
+echo "configure:6976: checking if you wish to allow users to redefine DirEd keys" >&5
 	# Check whether --enable-dired-override or --disable-dired-override was given.
 if test "${enable_dired_override+set}" = set; then
   enableval="$enable_dired_override"
@@ -7047,7 +6997,7 @@ fi
 	echo "$ac_t""$enableval" 1>&6
 
 	echo $ac_n "checking if you wish to allow permissions commands via DirEd""... $ac_c" 1>&6
-echo "configure:7051: checking if you wish to allow permissions commands via DirEd" >&5
+echo "configure:7001: checking if you wish to allow permissions commands via DirEd" >&5
 	# Check whether --enable-dired-permit or --disable-dired-permit was given.
 if test "${enable_dired_permit+set}" = set; then
   enableval="$enable_dired_permit"
@@ -7072,7 +7022,7 @@ fi
 	echo "$ac_t""$enableval" 1>&6
 
 	echo $ac_n "checking if you wish to allow executable-permission commands via DirEd""... $ac_c" 1>&6
-echo "configure:7076: checking if you wish to allow executable-permission commands via DirEd" >&5
+echo "configure:7026: checking if you wish to allow executable-permission commands via DirEd" >&5
 	# Check whether --enable-dired-xpermit or --disable-dired-xpermit was given.
 if test "${enable_dired_xpermit+set}" = set; then
   enableval="$enable_dired_xpermit"
@@ -7090,7 +7040,7 @@ fi
 	echo "$ac_t""$enableval" 1>&6
 
 	echo $ac_n "checking if you wish to allow \"tar\" commands from DirEd""... $ac_c" 1>&6
-echo "configure:7094: checking if you wish to allow \"tar\" commands from DirEd" >&5
+echo "configure:7044: checking if you wish to allow \"tar\" commands from DirEd" >&5
 	# Check whether --enable-dired-tar or --disable-dired-tar was given.
 if test "${enable_dired_tar+set}" = set; then
   enableval="$enable_dired_tar"
@@ -7115,7 +7065,7 @@ fi
 	echo "$ac_t""$enableval" 1>&6
 
 	echo $ac_n "checking if you wish to allow \"uudecode\" commands from DirEd""... $ac_c" 1>&6
-echo "configure:7119: checking if you wish to allow \"uudecode\" commands from DirEd" >&5
+echo "configure:7069: checking if you wish to allow \"uudecode\" commands from DirEd" >&5
 	# Check whether --enable-dired-uudecode or --disable-dired-uudecode was given.
 if test "${enable_dired_uudecode+set}" = set; then
   enableval="$enable_dired_uudecode"
@@ -7140,7 +7090,7 @@ fi
 	echo "$ac_t""$enableval" 1>&6
 
 	echo $ac_n "checking if you wish to allow \"zip\" and \"unzip\" commands from DirEd""... $ac_c" 1>&6
-echo "configure:7144: checking if you wish to allow \"zip\" and \"unzip\" commands from DirEd" >&5
+echo "configure:7094: checking if you wish to allow \"zip\" and \"unzip\" commands from DirEd" >&5
 	# Check whether --enable-dired-zip or --disable-dired-zip was given.
 if test "${enable_dired_zip+set}" = set; then
   enableval="$enable_dired_zip"
@@ -7165,7 +7115,7 @@ fi
 	echo "$ac_t""$enableval" 1>&6
 
 	echo $ac_n "checking if you wish to allow \"gzip\" and \"gunzip\" commands from DirEd""... $ac_c" 1>&6
-echo "configure:7169: checking if you wish to allow \"gzip\" and \"gunzip\" commands from DirEd" >&5
+echo "configure:7119: checking if you wish to allow \"gzip\" and \"gunzip\" commands from DirEd" >&5
 	# Check whether --enable-dired-gzip or --disable-dired-gzip was given.
 if test "${enable_dired_gzip+set}" = set; then
   enableval="$enable_dired_gzip"
@@ -7191,7 +7141,7 @@ fi
 fi
 
 echo $ac_n "checking if you want long-directory listings""... $ac_c" 1>&6
-echo "configure:7195: checking if you want long-directory listings" >&5
+echo "configure:7145: checking if you want long-directory listings" >&5
 # Check whether --enable-long-list or --disable-long-list was given.
 if test "${enable_long_list+set}" = set; then
   enableval="$enable_long_list"
@@ -7216,7 +7166,7 @@ fi
 echo "$ac_t""$enableval" 1>&6
 
 echo $ac_n "checking if parent-directory references are permitted""... $ac_c" 1>&6
-echo "configure:7220: checking if parent-directory references are permitted" >&5
+echo "configure:7170: checking if parent-directory references are permitted" >&5
 # Check whether --enable-parent-dir-refs or --disable-parent-dir-refs was given.
 if test "${enable_parent_dir_refs+set}" = set; then
   enableval="$enable_parent_dir_refs"
@@ -7235,6 +7185,12 @@ echo "$ac_t""$enableval" 1>&6
 
 ### Finally, build config.h and the makefiles
 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
+srcdir="$srcdir"
+if test -n "$srcdir" ; then
+	echo srcdir is $srcdir
+	$srcdir/mkdirs.sh WWW/Library/unix
+	$srcdir/mkdirs.sh src/chrtrans
+fi
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
@@ -7340,7 +7296,7 @@ trap 'rm -fr `echo "makefile \
 	WWW/Library/unix/makefile \
 	src/makefile \
 	src/chrtrans/makefile \
-	 lynx_cfg.h:config.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+ lynx_cfg.h:config.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -7404,10 +7360,8 @@ s%@UNZIP@%$UNZIP%g
 s%@UUDECODE@%$UUDECODE%g
 s%@ZCAT@%$ZCAT%g
 s%@ZIP@%$ZIP%g
-s%@LYNX_CFG_FILE@%$LYNX_CFG_FILE%g
 s%@EXTRA_OBJS@%$EXTRA_OBJS%g
 s%@EXTRA_DEPS@%$EXTRA_DEPS%g
-s%@LYNX_LSS_FILE@%$LYNX_LSS_FILE%g
 
 CEOF
 EOF
@@ -7453,7 +7407,7 @@ CONFIG_FILES=\${CONFIG_FILES-"makefile \
 	WWW/Library/unix/makefile \
 	src/makefile \
 	src/chrtrans/makefile \
-	"}
+"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
diff --git a/configure.in b/configure.in
index e8bba261..12dfed53 100644
--- a/configure.in
+++ b/configure.in
@@ -249,11 +249,14 @@ esac],
 	[cf_cv_screen=curses])])
 AC_MSG_RESULT($cf_cv_screen)
 
-case $cf_cv_screen in
-curses)
+if test $cf_cv_screen != ncurses ; then
 	if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" != set"; then
 		cf_cv_ncurses_header=curses.h
 	fi
+fi
+
+case $cf_cv_screen in
+curses)
 	CF_CURSES_LIBS
 	CF_CURS_PERFORMANCE
 	;;
@@ -268,10 +271,13 @@ slang)
 	;;
 esac
 
+dnl Get the actual value for $libdir, which we will compile into Lynx as part of
+dnl the config pathnames.
+eval cf_libdir=$libdir
+cf_libdir=`echo $cf_libdir | sed -e s@'^NONE/'@$ac_default_prefix/@`
+
 AC_MSG_CHECKING(for location of config-file)
-CF_WITH_PATH(cfg-file,
-[  --with-cfg-file=XXXX    specify config-file path],
-LYNX_CFG_FILE,LIBDIR/lynx.cfg,[$]libdir/lynx.cfg)
+LYNX_CFG_FILE=$cf_libdir/lynx.cfg
 AC_DEFINE_UNQUOTED(LYNX_CFG_FILE,"$LYNX_CFG_FILE")
 AC_MSG_RESULT($LYNX_CFG_FILE)
 
@@ -388,9 +394,7 @@ no)
 	AC_MSG_RESULT(curses-style)
 
 	AC_MSG_CHECKING(for location of style-sheet file)
-	CF_WITH_PATH(lss-file,
-	[  --with-lss-file=XXXX    specify style-sheet path],
-	LYNX_LSS_FILE,LIBDIR/lynx.lss,[$]libdir/lynx.lss)
+	LYNX_LSS_FILE=$cf_libdir/lynx.lss
 	AC_DEFINE_UNQUOTED(LYNX_LSS_FILE,"$LYNX_LSS_FILE")
 	AC_MSG_RESULT($LYNX_LSS_FILE)
 	;;
@@ -486,9 +490,15 @@ AC_MSG_RESULT($enableval)
 
 ### Finally, build config.h and the makefiles
 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
+srcdir="$srcdir"
+if test -n "$srcdir" ; then
+	echo srcdir is $srcdir
+	$srcdir/mkdirs.sh WWW/Library/unix
+	$srcdir/mkdirs.sh src/chrtrans
+fi
 AC_OUTPUT(
 	makefile \
 	WWW/Library/unix/makefile \
 	src/makefile \
 	src/chrtrans/makefile \
-	)
+)
diff --git a/docs/README.defines b/docs/README.defines
index 49476af3..2218c2b5 100644
--- a/docs/README.defines
+++ b/docs/README.defines
@@ -81,6 +81,11 @@ Using curses or ncurses library:
                    for UNIX handled by ./configure
 # -DUNDERLINE_LINKS  Define if you want links underlined instead of bold.
 # -DHP_TERMINAL    For DIM workaround to REVERSE problems on HP terminals.
+# -DNO_SIZECHANGE (old) or HAVE_SIZECHANGE (new) whether using code to detect
+                   new size after size changes of the terminal (window).
+                   for UNIX handled by ./configure, may be set in HTUtils.h
+# -DNO_SIZECHANGEHACK  disable hack for size increase handling.
+
 Using slang library:
 # -DUSE_SLANG      (see README.configure)
 # -DSLANG_MBCS_HACK prevent cutoff lines when using UTF8 console (slang only)
diff --git a/docs/README.html b/docs/README.html
deleted file mode 100644
index 4058c422..00000000
--- a/docs/README.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html public "-//IETF//DTD HTML 3.0//EN">
-<html>
-<head>
-<title>Obtaining Lynx help files</title>
-<link rev="made" href="mailto:lynx-dev@sig.net">
-</head>
-
-<body>
-<h1>How to obtain the Lynx help files</h1>
-
-The Lynx help files are included with the distribution of
-Lynx sources and documentation.  Links to sites which supply
-the distribution are maintained in
-<a href="http://www.crl.com/~subir/lynx.html"
->Lynx links</a>.
-
-<p>Once you have downloaded and extracted the distribution,
-set HELPFILE in the lynx.cfg as: 
-file://localhost/FULL_PATH_TO_HELP_FILES/lynx_help_main.html
-
-<p>Additional instructions for HELPFILE configuration are in the
-lynx.cfg file.
-
-</body>
-</html>
diff --git a/docs/README.txt b/docs/README.txt
deleted file mode 100644
index c04cac6f..00000000
--- a/docs/README.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-
-                       How to obtain the Lynx help files
-                                       
-   The Lynx help files are included with the distribution of Lynx sources
-   and documentation. Links to sites which supply the distribution are
-   maintained in [1]Lynx links.
-   
-   Once you have downloaded and extracted the distribution, set HELPFILE
-   in the lynx.cfg as:
-   file://localhost/FULL_PATH_TO_HELP_FILES/lynx_help_main.html
-   
-   Additional instructions for HELFILE configuration are in the lynx.cfg
-   file.
-
-References
-
-   1. http://www.crl.com/~subir/lynx.html
diff --git a/lynx.cfg b/lynx.cfg
index 10e99559..e7bde81f 100644
--- a/lynx.cfg
+++ b/lynx.cfg
@@ -141,59 +141,48 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html
 #
 #LOCAL_DOMAIN:ukans.edu
 
-# NOTE: The following paragraph applies for standard Lynx, or if Lynx is
-# compiled without -DEXP_CHARTRANS.
-#
 # CHARACTER_SET defines the default character set, i.e., that assumed
 # to be installed on the user's terminal.  It determines which characters
 # or strings will be used to represent 8-bit character entities within
-# HTML.  New character sets may be defined by modifying the file
-# src/LYCharSets.c in the Lynx source code distribution and recompiling.
+# HTML.  New character sets may be defined as explained in the README
+# files of the src/chrtrans directory in the Lynx source code distribution.
 # For Asian (CJK) character sets, it also determines how Kanji code will
 # be handled.  The default is defined in userdefs.h and can be changed
 # here, and via the 'o'ptions menu.  The 'o'ptions menu setting will be
 # stored in the user's RC file whenever those settings are saved, and
-# thereafter will be used as the default.  The actions of the -raw switch
-# and LYK_RAW_TOGGLE ('@') are dependent on the character set.  For the
-# Asian (CJK) sets and "ISO Latin 1", the corresponding charset is assumed
-# in documents, i.e., raw or CJK mode is ON by default, so that -raw or the
-# initial LYK_RAW_TOGGLE will turn the mode OFF.  The inverse is true for
-# all other character sets.  The toggling also can be done via the 'o'ptions
-# menu.  In raw or CJK mode, 8-bit characters are not reverse translated in
-# relation to the src/CharSets.c entity conversion arrays, i.e., they are
-# assumed to be appropriate for the current character set.  It should be
-# toggled ON when, for example, "ISO Latin 2" or "KOI8-R character set" is
-# selected and the document has the corresponding charset, and OFF when an
-# Asian (CJK) character set is selected but the document has the ISO-8859-1
-# charset.
-#
-# With chartrans, the above is modified as follows:
-#
-# Additional character sets and some of their properties may be defined with 
-# tables in the src/chrtrans directory.  It is not necessary to change 
-# src/LYCharSets.c to make these new character sets known to Lynx, (although 
-# definitions for the "older" character sets are still there), but the new ones 
-# have to be listed in src/UCdomap.c and, currently, the makefiles in src/ and
-# src/chrtrans to be automatically used.  See README.* files in src/chrtrans/.
-#
-# For Lynx a "character set" has two names: a Display Character Set string
-# for the Options screen and for setting CHARACTER_SET here, and a
-# corresponding MIME name (for recognizing properly labelled charset 
-# parameters in HTTP headers etc.).  Not all Display Character Set names
-# correspond to exactly one valid MIME charset (for example "Other ISO Latin",
-# "Chinese", "Transparent"), in that case an appropriate valid (and more
-# specific) MIME name should be used where required.
-#
+# thereafter will be used as the default.  For Lynx a "character set" has
+# two names: a Display Character Set string for the Options screen and
+# for setting CHARACTER_SET here, and a corresponding MIME name (for
+# recognizing properly labelled charset parameters in HTTP headers etc.).
+# Not all Display Character Set names correspond to exactly one valid MIME
+# charset (for example "Other ISO Latin", "Chinese", "Transparent"), in
+# that case an appropriate valid (and more specific) MIME name should be
+# used where required.  The actions of the -raw switch and LYK_RAW_TOGGLE
+# ('@') are dependent on the character set.  For the Asian (CJK) sets the
+# corresponding charset is assumed in documents, i.e., raw or CJK mode is
+# ON by default, so that -raw or the initial LYK_RAW_TOGGLE will turn the
+# mode OFF.  The toggling also can be done via the 'o'ptions menu.  In raw
+# CJK mode, 8-bit characters are not reverse translated in relation to the
+# entity conversion arrays, i.e., they are assumed to be appropriate for
+# the current character set.  It should be toggled OFF when an Asian (CJK)
+# character set is selected but the document is not CJK.  
 # The default for "raw mode" (before it is changed by -raw or LYK_RAW_TOGGLE),
-# if the display character set is not a CJK character set, now depends on the 
+# if the display character set is not a CJK character set, depends on the 
 # display character set as well as the ASSUME_CHARSET value (see below) from 
 # either this file or an -assume_charset command line option.  The mode 
 # defaults to ON if the ASSUME_CHARSET value corresponds to the display
-# character set, otherwise to OFF.  Note that "raw" does not mean that every
-# byte will be passed to the screen.  HTML character entities may get expanded
-# and translated, inappropriate control characters filtered out, etc.  Raw
-# mode effectively changes the charset assumption about unlabelled documents.
-# (There is a "Transparent" pseudo character set for more "rawness".)
+# character set, otherwise to OFF.
+# It can be toggled ON if you believe the document has a charset which does
+# correspond to your Display Character Set, but was not detected to have
+# that charset and was handled as having the default charset (normally
+# iso-8859-1).  You also can specify the default charset (to one other
+# than iso-8859-1) via the ASSUME_CHARSET value (see below) from either
+# this file or an -assume_charset command line option.  Note that "raw"
+# does not mean that every byte will be passed to the screen.  HTML
+# character entities may get expanded and translated, inappropriate control
+# characters filtered out, etc.  Raw mode effectively changes the charset
+# assumption about unlabelled documents. There is a "Transparent" pseudo
+# character set for more "rawness".
 #
 # The default character sets include:
 #    Display Character Set name		MIME name
@@ -201,25 +190,32 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html
 #    ISO Latin 1			iso-8859-1
 #    ISO Latin 2			iso-8859-2
 #    Other ISO Latin			x-iso-8859-other
+#    WinLatin1 (cp1252)			iso-8859-1-windows-3.1-latin-1
 #    DEC Multinational			dec-mcs
-#    IBM PC character set		cp437
-#    IBM PC codepage 850		cp850
 #    Macintosh (8 bit)			macintosh
 #    NeXT character set			x-next
-#    KOI8-R character set		koi8-r
+#    KOI8-R Cyrillic     		koi8-r
 #    Chinese				euc-cn
 #    Japanese (EUC)			euc-jp
 #    Japanese (SJIS)			shift_jis
 #    Korean				euc-kr
 #    Taipei (Big5)			big5
+#    Vietnamese (VISCII)		viscii
 #    7 bit approximations		us-ascii
 #    Transparent			x-transparent
+#    IBM PC character set		cp437
+#    IBM PC codepage 850		cp850
 #    PC Latin2 CP 852			cp852
 #    DosCyrillic (cp866)		cp866
-#    MS Windows CP 1252			iso-8859-1-windows-3.1-latin-1
-#    MS Windows CP 1250			windows-1250
+#    DosGreek (cp737)			cp737
+#    DosGreek2 (cp869)			cp869
+#    DosArabic (cp864)			cp864
+#    DosHebrew (cp862)			cp862
+#    WinLatin2 (cp1250)			windows-1250
 #    WinCyrillic (cp1251)		windows-1251
-#    Vietnamese (VISCII)		viscii
+#    WinGreek (cp1253)			windows-1253
+#    WinHebrew (cp1255)			windows-1255
+#    WinArabic (cp1256)			windows-1256
 #    ISO Latin 3			iso-8859-3
 #    ISO Latin 4			iso-8859-4
 #    ISO 8859-5 Cyrillic		iso-8859-5
diff --git a/lynx_help/Lynx_users_guide.html b/lynx_help/Lynx_users_guide.html
index 7d431aa0..1843e1d8 100644
--- a/lynx_help/Lynx_users_guide.html
+++ b/lynx_help/Lynx_users_guide.html
@@ -582,26 +582,26 @@ return to Lynx or the '<em>&gt;</em>' command to save the options to a
 	    q factors as defined by the HTTP protocol, for servers which
 	    understand it, for example:
 	    da,&nbsp;en-gb;q=0.8,&nbsp;en;q=0.7
-	
+
    <dt>Preferred Document Charset
 	<dd>The character set you prefer if sets in addition to ISO-8859-1
 	    and US-ASCII are available from servers.  Use MIME notation
 	    (e.g., ISO-8859-2) and do not include ISO-8859-1 or US-ASCII,
 	    since those values are always assumed by default.  Can be a
 	    comma-separated list, which may be interpreted by servers as 
-	    descending order of preferences.
-	    You can also make your order of preference explicit by using
-	    q factors as defined by the HTTP protocol, for servers which
-	    understand it, for example:
+	    descending order of preferences. You can also make your order
+	    of preference explicit by using q factors as defined by the
+	    HTTP protocol, for servers which understand it, for example:
 	    iso-8859-5,&nbsp;utf-8;q=0.8
 	
    <dt>Display Character set
 	<dd>This option allows you to set up the default character set for
-	    your specific terminal.  The character set provides a mapping
-	    of 8-bit ISO Latin character entities and/or Asian (CJK) or
-	    Unicode characters into viewable characters and should be set
-	    according to your terminal's character set if you will be
-	    viewing such characters with Lynx.  You must have the selected
+	    your specific terminal.  The display character set provides a
+            mapping from the character encodings of viewed documents and 
+            from HTML entities into viewable characters.  It should be set
+	    according to your terminal's character set so that characters
+            other than 7-bit ASCII can be displayed correctly, using
+	    approximations if necessary.  You must have the selected
 	    character set installed on your terminal.
 
    <dt>Raw 8-bit or CJK Mode
@@ -612,7 +612,7 @@ return to Lynx or the '<em>&gt;</em>' command to save the options to a
 	    (CJK) sets and the 8-bit characters are Kanji multibytes.
 	    Should be OFF for the other character sets, but can be turned ON
 	    when the document's charset is unknown (e.g., is not ISO-8859-1
-	    and no charset parameter was included in a reply header from
+	    and no charset parameter was specified in a reply header from
 	    an HTTP server to indicate what it is) but you know by some
 	    means that you have the matching display character set selected.
 	    Should be OFF when an Asian (CJK) set is selected but the document
diff --git a/lynx_help/keystrokes/gopher_types_help.html b/lynx_help/keystrokes/gopher_types_help.html
index aa134daa..629256e1 100644
--- a/lynx_help/keystrokes/gopher_types_help.html
+++ b/lynx_help/keystrokes/gopher_types_help.html
@@ -7,7 +7,7 @@
 <BODY>
 <h1>+++ Gopher Types +++</h1>
 
-<dl>
+<dl compact>
 <dt>(FILE)
 <dd>An ASCII file
 
diff --git a/lynx_help/lynx_help_main.html b/lynx_help/lynx_help_main.html
index 5ff1221d..0871f1d9 100644
--- a/lynx_help/lynx_help_main.html
+++ b/lynx_help/lynx_help_main.html
@@ -39,7 +39,7 @@ href="http://www.w3.org/MarkUp/html-spec/html-spec_toc.html"
 >HTML i18n</a>
 | <a href="http://www.w3.org/MarkUp/"
 >HTML 3.2</a>
-| <a href="http://www.w3.org/TR/WD-html40/"
+| <a href="http://www.w3.org/TR/PR-html40/"
 >HTML 4.0</a>
 
 <ul plain>
diff --git a/lynx_help/lynx_url_support.html b/lynx_help/lynx_url_support.html
index 37f78679..0237733d 100644
--- a/lynx_help/lynx_url_support.html
+++ b/lynx_help/lynx_url_support.html
@@ -539,7 +539,7 @@ by Lynx. (Note that restrictions on acceptable paths can be imposed
 by the system administrator.)
 
 <p>This is a Lynxism and should be used only in local documents intended
-solely for Lynx, or for limited local testing of CGI scripts without a
+solely for Lynx, or for limited local testing of CGI scripts without an
 http server.
 
 <p>On VMS, you are advised to use the threaded OSU http server, available
diff --git a/makefile.in b/makefile.in
index 602b2dd2..1f67935b 100644
--- a/makefile.in
+++ b/makefile.in
@@ -199,6 +199,8 @@ distclean: clean
 	-cd src/chrtrans && $(MAKE) $@
 	-rm -f *~ *.bak *.sav
 	-rm -f WWW/Library/unix/makefile src/makefile src/chrtrans/makefile
+	-rmdir WWW/Library/unix && rmdir WWW/Library && rmdir WWW
+	-rmdir src/chrtrans && rmdir src
 	-rm -f makefile lynx_cfg.h config.status config.log config.cache
 	-rm -f lynx
 
diff --git a/newfiles.chartrans b/newfiles.chartrans
deleted file mode 100644
index 2c464d30..00000000
--- a/newfiles.chartrans
+++ /dev/null
@@ -1,40 +0,0 @@
-lynx2-7-1/README.chartrans
-lynx2-7-1/CHANGES.chartrans
-lynx2-7-1/newfiles.chartrans
-lynx2-7-1/WWW/Library/Implementation/UCAux.h
-lynx2-7-1/WWW/Library/Implementation/UCDefs.h
-lynx2-7-1/WWW/Library/Implementation/UCMap.h
-lynx2-7-1/src/chrtrans/README.format
-lynx2-7-1/src/chrtrans/README.tables
-lynx2-7-1/src/chrtrans/Makefile
-lynx2-7-1/src/chrtrans/UCkd.h
-lynx2-7-1/src/chrtrans/makeuctb.c
-lynx2-7-1/src/chrtrans/def7_uni.tbl
-lynx2-7-1/src/chrtrans/cp850_uni.tbl
-lynx2-7-1/src/chrtrans/iso01_uni.tbl
-lynx2-7-1/src/chrtrans/iso02_uni.tbl
-lynx2-7-1/src/chrtrans/iso03_uni.tbl
-lynx2-7-1/src/chrtrans/iso04_uni.tbl
-lynx2-7-1/src/chrtrans/iso06_uni.tbl
-lynx2-7-1/src/chrtrans/iso07_uni.tbl
-lynx2-7-1/src/chrtrans/iso08_uni.tbl
-lynx2-7-1/src/chrtrans/iso09_uni.tbl
-lynx2-7-1/src/chrtrans/iso10_uni.tbl
-lynx2-7-1/src/chrtrans/koi8r_uni.tbl
-lynx2-7-1/src/chrtrans/rfc_suni.tbl
-lynx2-7-1/src/chrtrans/cp1252_uni.tbl
-lynx2-7-1/src/chrtrans/cp437_uni.tbl
-lynx2-7-1/src/chrtrans/iso05_uni.tbl
-lynx2-7-1/src/chrtrans/utf8_uni.tbl
-lynx2-7-1/src/chrtrans/mnem_suni.tbl
-lynx2-7-1/src/chrtrans/mnemonic_suni.tbl
-lynx2-7-1/src/chrtrans/cp852_uni.tbl
-lynx2-7-1/src/chrtrans/cp1250_uni.tbl
-lynx2-7-1/src/UCAuto.c
-lynx2-7-1/src/UCAuto.h
-lynx2-7-1/src/UCAux.c
-lynx2-7-1/src/UCdomap.c
-lynx2-7-1/src/UCdomap.h
-lynx2-7-1/src/chrtrans/cp1251_uni.tbl
-lynx2-7-1/src/chrtrans/cp866_uni.tbl
-lynx2-7-1/src/chrtrans/viscii_uni.tbl
diff --git a/newfiles.configure b/newfiles.configure
deleted file mode 100644
index 8c9c4de3..00000000
--- a/newfiles.configure
+++ /dev/null
@@ -1,11 +0,0 @@
-lynx2-7-1/WWW/Library/unix/makefile.in
-lynx2-7-1/aclocal.m4
-lynx2-7-1/config.guess
-lynx2-7-1/config.hin
-lynx2-7-1/config.sub
-lynx2-7-1/configure
-lynx2-7-1/configure.in
-lynx2-7-1/install.sh
-lynx2-7-1/makefile.in
-lynx2-7-1/src/chrtrans/makefile.in
-lynx2-7-1/src/makefile.in
diff --git a/samples/lynx.cfg b/samples/lynx.cfg
index 88dd94a2..1ec062a7 100644
--- a/samples/lynx.cfg
+++ b/samples/lynx.cfg
@@ -141,9 +141,6 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html
 #
 #LOCAL_DOMAIN:ukans.edu
 
-# NOTE: The following paragraph applies for standard Lynx, or if Lynx is
-# compiled without -DEXP_CHARTRANS.
-#
 # CHARACTER_SET defines the default character set, i.e., that assumed
 # to be installed on the user's terminal.  It determines which characters
 # or strings will be used to represent 8-bit character entities within
@@ -153,48 +150,39 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html
 # be handled.  The default is defined in userdefs.h and can be changed
 # here, and via the 'o'ptions menu.  The 'o'ptions menu setting will be
 # stored in the user's RC file whenever those settings are saved, and
-# thereafter will be used as the default.  The actions of the -raw switch
-# and LYK_RAW_TOGGLE ('@') are dependent on the character set.  For the
-# Asian (CJK) sets and "ISO Latin 1", the corresponding charset is assumed
-# in documents, i.e., raw or CJK mode is ON by default, so that -raw or the
-# initial LYK_RAW_TOGGLE will turn the mode OFF.  The inverse is true for
-# all other character sets.  The toggling also can be done via the 'o'ptions
-# menu.  In raw or CJK mode, 8-bit characters are not reverse translated in
-# relation to the src/CharSets.c entity conversion arrays, i.e., they are
-# assumed to be appropriate for the current character set.  It should be
-# toggled ON when, for example, "ISO Latin 2" or "KOI8-R character set" is
-# selected and the document has the corresponding charset, and OFF when an
-# Asian (CJK) character set is selected but the document has the ISO-8859-1
-# charset.
-#
-# With chartrans, the above is modified as follows:
-#
-# Additional character sets and some of their properties may be defined with 
-# tables in the src/chrtrans directory.  It is not necessary to change 
-# src/LYCharSets.c to make these new character sets known to Lynx, (although 
-# definitions for the "older" character sets are still there), but the new ones 
-# have to be listed in src/UCdomap.c and, currently, the makefiles in src/ 
-# and src/chrtrans to be automatically used.  See README.* files in src/chrtrans/.
-#
-# For Lynx a "character set" has two names: a Display Character Set string
-# for the Options scree and for setting CHARACTER_SET here, and a
-# corresponding MIME name (for recognizing properly labelled charset 
-# parameters in HTTP headers etc.).  Not all Display Character Set names
-# crrespond to exactly one valid MIME charset (for example "Other ISO Latin",
-# "Chinese", "Transparent"), in that case an appropriate valid (and more
-# specific) MIME name should be used where required.
-#
+# thereafter will be used as the default.  For Lynx a "character set" has
+# two names: a Display Character Set string for the Options screen and
+# for setting CHARACTER_SET here, and a corresponding MIME name (for
+# recognizing properly labelled charset parameters in HTTP headers etc.).
+# Not all Display Character Set names correspond to exactly one valid MIME
+# charset (for example "Other ISO Latin", "Chinese", "Transparent"), in
+# that case an appropriate valid (and more specific) MIME name should be
+# used where required.  The actions of the -raw switch and LYK_RAW_TOGGLE
+# ('@') are dependent on the character set.  For the Asian (CJK) sets the
+# corresponding charset is assumed in documents, i.e., raw or CJK mode is
+# ON by default, so that -raw or the initial LYK_RAW_TOGGLE will turn the
+# mode OFF.  The toggling also can be done via the 'o'ptions menu.  In raw
+# CJK mode, 8-bit characters are not reverse translated in relation to the
+# entity conversion arrays, i.e., they are assumed to be appropriate for
+# the current character set.  It should be toggled OFF when an Asian (CJK)
+# character set is selected but the document is not CJK.  
 # The default for "raw mode" (before it is changed by -raw or LYK_RAW_TOGGLE),
-# if the display character set is not a CJK character set, now depends on the 
+# if the display character set is not a CJK character set, depends on the 
 # display character set as well as the ASSUME_CHARSET value (see below) from 
 # either this file or an -assume_charset command line option.  The mode 
 # defaults to ON if the ASSUME_CHARSET value corresponds to the display
-# character set, otherwise to OFF.  Note that "raw" does not mean that every
-# byte will be passed to the screen.  HTML character entities may get 
-# expanded and translated, inappropriate control characters filtered out, etc.
-# Raw mode effectively changes the charset assumption about unlabelled
-# documents.
-# (There is a "Transparent" pseudo character set for more "rawness".)
+# character set, otherwise to OFF.
+# It can be toggled ON if you believe the document has a charset which does
+# correspond to your Display Character Set, but was not detected to have
+# that charset and was handled as having the default charset (normally
+# iso-8859-1).  You also can specify the default charset (to one other
+# than iso-8859-1) via the ASSUME_CHARSET value (see below) from either
+# this file or an -assume_charset command line option.  Note that "raw"
+# does not mean that every byte will be passed to the screen.  HTML
+# character entities may get expanded and translated, inappropriate control
+# characters filtered out, etc.  Raw mode effectively changes the charset
+# assumption about unlabelled documents. There is a "Transparent" pseudo
+# character set for more "rawness".
 #
 # The default character sets include:
 #    Display Character Set name		MIME name
@@ -202,25 +190,32 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html
 #    ISO Latin 1			iso-8859-1
 #    ISO Latin 2			iso-8859-2
 #    Other ISO Latin			x-iso-8859-other
+#    WinLatin1 (cp1252)			iso-8859-1-windows-3.1-latin-1
 #    DEC Multinational			dec-mcs
-#    IBM PC character set		cp437
-#    IBM PC codepage 850		cp850
 #    Macintosh (8 bit)			macintosh
 #    NeXT character set			x-next
-#    KOI8-R character set		koi8-r
+#    KOI8-R Cyrillic     		koi8-r
 #    Chinese				euc-cn
 #    Japanese (EUC)			euc-jp
 #    Japanese (SJIS)			shift_jis
 #    Korean				euc-kr
 #    Taipei (Big5)			big5
+#    Vietnamese (VISCII)		viscii
 #    7 bit approximations		us-ascii
 #    Transparent			x-transparent
+#    IBM PC character set		cp437
+#    IBM PC codepage 850		cp850
 #    PC Latin2 CP 852			cp852
 #    DosCyrillic (cp866)		cp866
-#    MS Windows CP 1252			iso-8859-1-windows-3.1-latin-1
-#    MS Windows CP 1250			windows-1250
+#    DosGreek (cp737)			cp737
+#    DosGreek2 (cp869)			cp869
+#    DosArabic (cp864)			cp864
+#    DosHebrew (cp862)			cp862
+#    WinLatin2 (cp1250)			windows-1250
 #    WinCyrillic (cp1251)		windows-1251
-#    Vietnamese (VISCII)		viscii
+#    WinGreek (cp1253)			windows-1253
+#    WinHebrew (cp1255)			windows-1255
+#    WinArabic (cp1256)			windows-1256
 #    ISO Latin 3			iso-8859-3
 #    ISO Latin 4			iso-8859-4
 #    ISO 8859-5 Cyrillic		iso-8859-5
@@ -238,7 +233,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html
 # IF compiled with -DEXP_CHARTRANS:
 # ASSUME_CHARSET changes the handling of documents which do not
 # explicitly specify a charset.  Normally Lynx assumes that 8-bit
-# characters in those document are encoded according to iso-8859-1
+# characters in those documents are encoded according to iso-8859-1
 # (the official default for the HTTP protocol).  When ASSUME_CHARSET
 # given here or by an -assume_charset command line flag is in effect, 
 # Lynx will treat documents as if they were encoded accordingly.
@@ -1318,7 +1313,7 @@ MINIMAL_COMMENTS:TRUE
 # The global and personal MAILCAP files allow you to specify external
 # viewers to be spawned when Lynx encounters different MIME types, which
 # will override any of the suffix maps in this (lynx.cfg) configuration
-# file, or in src/HTInit.c.  See RFC-MAILCAP.txt in the docs subdirectory
+# file, or in src/HTInit.c.  See http://www.internic.net/rfc/rfc1524.txt
 # and the example mailcap file in the samples subdirectory.
 #
 #	Unix:
diff --git a/src/GridText.c b/src/GridText.c
index 25ebf20b..2cfae408 100644
--- a/src/GridText.c
+++ b/src/GridText.c
@@ -6175,16 +6175,19 @@ PUBLIC char * HText_setLastOptionValue ARGS7(
 	     *  No option items yet.
 	     */
 	    if (text->last_anchor->input_field->type != F_OPTION_LIST_TYPE) {
-		if (TRACE)
+		if (TRACE) {
 		    fprintf(stderr,
-   "HText_setLastOptionValue: last input_field not OPTION_LIST_TYPE but %d, ignoring!\n",
+   "HText_setLastOptionValue: last input_field not F_OPTION_LIST_TYPE (%d)\n",
+			    F_OPTION_LIST_TYPE);
+		    fprintf(stderr,
+   "                          but %d, ignoring!\n",
 			    text->last_anchor->input_field->type);
+		}
 		return NULL;
 	    }
 
-
 	    new_ptr = text->last_anchor->input_field->select_list = 
-				(OptionType *) calloc(1, sizeof(OptionType));
+				(OptionType *)calloc(1, sizeof(OptionType));
 	    if (new_ptr == NULL)
 	        outofmem(__FILE__, "HText_setLastOptionValue");
 
@@ -6197,7 +6200,7 @@ PUBLIC char * HText_setLastOptionValue ARGS7(
 	    number++;  /* add one more */
 
 	    op_ptr->next = new_ptr =
-	    			(OptionType *) calloc(1, sizeof(OptionType));
+	    			(OptionType *)calloc(1, sizeof(OptionType));
 	    if (new_ptr == NULL)
 	        outofmem(__FILE__, "HText_setLastOptionValue");
 	}
@@ -8222,8 +8225,10 @@ PUBLIC void HText_setKcode ARGS3(
 	       !strcmp(charset, "euc-kr") ||
 	       !strcmp(charset, "iso-2022-kr") ||
 	       !strcmp(charset, "big5") ||
+	       !strcmp(charset, "cn-big5") ||
 	       !strcmp(charset, "euc-cn") ||
 	       !strcmp(charset, "gb2312") ||
+	       !strncmp(charset, "cn-gb", 5) ||
 	       !strcmp(charset, "iso-2022-cn")) {
 	text->kcode = EUC;
     } else {
diff --git a/src/HTInit.c b/src/HTInit.c
index 38856772..fdcd7d07 100644
--- a/src/HTInit.c
+++ b/src/HTInit.c
@@ -151,6 +151,7 @@ PUBLIC void HTFormatInit NOARGS
  HTSetConversion("text/sgml", "www/source",  HTPlainPresent, 1.0, 0.0, 0.0, 0);
  HTSetConversion("text/sgml", "www/present", HTMLPresent,    1.0, 0.0, 0.0, 0);
  HTSetConversion("text/plain","www/present", HTPlainPresent, 1.0, 0.0, 0.0, 0);
+ HTSetConversion("text/plain","www/source",  HTPlainPresent, 1.0, 0.0, 0.0, 0);
  HTSetConversion("text/html", "www/source",  HTPlainPresent, 1.0, 0.0, 0.0, 0);
  HTSetConversion("text/html", "text/x-c",    HTMLToC, 	     0.5, 0.0, 0.0, 0);
  HTSetConversion("text/html", "text/plain",  HTMLToPlain,    0.5, 0.0, 0.0, 0);
@@ -235,10 +236,12 @@ struct MailcapEntry {
 PRIVATE int ExitWithError PARAMS((char *txt));
 PRIVATE int PassesTest PARAMS((struct MailcapEntry *mc));
 
-#define LINE_BUF_SIZE       2000
-#define TMPFILE_NAME_SIZE 256
+#define LINE_BUF_SIZE		2048
+#define TMPFILE_NAME_SIZE	256
 
-PRIVATE char *GetCommand ARGS2(char *,s, char **,t)
+PRIVATE char *GetCommand ARGS2(
+	char *,		s,
+	char **,	t)
 {
     char *s2;
     int quoted = 0;
@@ -257,7 +260,7 @@ PRIVATE char *GetCommand ARGS2(char *,s, char **,t)
 	    quoted = 0;
 	} else {
 	    if (*s == ';') {
-                *s2 = 0;
+                *s2 = '\0';
 		return(++s);
 	    }
 	    if (*s == '\\') {
@@ -268,12 +271,13 @@ PRIVATE char *GetCommand ARGS2(char *,s, char **,t)
 	    }
 	}
     }
-    *s2 = 0;
+    *s2 = '\0';
     return(NULL);
 }	
 
 /* no leading or trailing space, all lower case */
-PRIVATE char *Cleanse ARGS1(char *,s) 
+PRIVATE char *Cleanse ARGS1(
+	char *,		s) 
 {
     char *tmp, *news;
     
@@ -291,19 +295,21 @@ PRIVATE char *Cleanse ARGS1(char *,s)
     return(news);
 }
 
-PRIVATE int ProcessMailcapEntry ARGS2(FILE *,fp, struct MailcapEntry *,mc)
+PRIVATE int ProcessMailcapEntry ARGS2(
+	FILE *,			fp,
+	struct MailcapEntry *,	mc)
 {
     int i, j;
     size_t rawentryalloc = 2000, len;
     char *rawentry, *s, *t, *LineBuf;
 
-    LineBuf = malloc(LINE_BUF_SIZE);
+    LineBuf = (char *)malloc(LINE_BUF_SIZE);
     if (!LineBuf) 
         ExitWithError("Out of memory");
-    rawentry = malloc(1 + rawentryalloc);
+    rawentry = (char *)malloc(1 + rawentryalloc);
     if (!rawentry) 
         ExitWithError("Out of memory");
-    *rawentry = 0;
+    *rawentry = '\0';
     while (fgets(LineBuf, LINE_BUF_SIZE, fp)) {
 	if (LineBuf[0] == '#') 
 	    continue;
@@ -311,7 +317,7 @@ PRIVATE int ProcessMailcapEntry ARGS2(FILE *,fp, struct MailcapEntry *,mc)
         if (len == 0) 
 	    continue;
         if (LineBuf[len-1] == '\n') 
-	    LineBuf[--len] = 0;
+	    LineBuf[--len] = '\0';
 	if ((len + strlen(rawentry)) > rawentryalloc) {
 	    rawentryalloc += 2000;
 	    rawentry = realloc(rawentry, rawentryalloc+1);
@@ -319,7 +325,7 @@ PRIVATE int ProcessMailcapEntry ARGS2(FILE *,fp, struct MailcapEntry *,mc)
 	        ExitWithError("Out of memory");
 	}
 	if (len > 0 && LineBuf[len-1] == '\\') {
-            LineBuf[len-1] = 0;
+            LineBuf[len-1] = '\0';
 	    strcat(rawentry, LineBuf);
 	} else {
 	    strcat(rawentry, LineBuf);
@@ -340,20 +346,20 @@ PRIVATE int ProcessMailcapEntry ARGS2(FILE *,fp, struct MailcapEntry *,mc)
     if (s == NULL) {
 	if (TRACE) {
 		fprintf(stderr,
-			"metamail: Ignoring invalid mailcap entry: %s\n",
+		 "ProcessMailcapEntry: Ignoring invalid mailcap entry: %s\n",
 			rawentry);
 	}
 	FREE(rawentry);
 	return(0);
     }
-    *s++ = 0;
+    *s++ = '\0';
     if (!strncasecomp(rawentry, "text/html", 9) ||
         !strncasecomp(rawentry, "text/plain", 10)) {
 	--s;
 	*s = ';';
 	if (TRACE) {
 		fprintf(stderr,
-			"metamail: Ignoring mailcap entry: %s\n",
+			"ProcessMailcapEntry: Ignoring mailcap entry: %s\n",
 			rawentry);
 	}
 	FREE(rawentry);
@@ -371,7 +377,7 @@ PRIVATE int ProcessMailcapEntry ARGS2(FILE *,fp, struct MailcapEntry *,mc)
     mc->testcommand = NULL;
     mc->label = NULL;
     mc->printcommand = NULL;
-    mc->contenttype = malloc(1+strlen(rawentry));
+    mc->contenttype = (char *)malloc(1 + strlen(rawentry));
     if (!mc->contenttype)
         ExitWithError("Out of memory");
     strcpy(mc->contenttype, rawentry);
@@ -389,7 +395,9 @@ PRIVATE int ProcessMailcapEntry ARGS2(FILE *,fp, struct MailcapEntry *,mc)
         t = GetCommand(s, &mallocd_string);
 	arg = mallocd_string;
         eq = strchr(arg, '=');
-        if (eq) *eq++ = 0;
+        if (eq) {
+	    *eq++ = '\0';
+	}
 	if (arg && *arg) {
 	    arg = Cleanse(arg);
 	    if (!strcmp(arg, "needsterminal")) {
@@ -401,7 +409,7 @@ PRIVATE int ProcessMailcapEntry ARGS2(FILE *,fp, struct MailcapEntry *,mc)
 		StrAllocCopy(mc->testcommand, eq);
 		if (TRACE)
 		    fprintf(stderr,
-		    	    "[HTInit]: found testcommand:%s\n",
+		    	    "ProcessMailcapEntry: Found testcommand:%s\n",
 			    mc->testcommand);
 	    } else if (eq && !strcmp(arg, "description")) {
 		mc->label = eq;
@@ -423,7 +431,8 @@ PRIVATE int ProcessMailcapEntry ARGS2(FILE *,fp, struct MailcapEntry *,mc)
 	    } else if (strcmp(arg, "notes")) { /* IGNORE notes field */
 		if (*arg && TRACE)
 		    fprintf(stderr,
-		    	    "metamail: Ignoring mailcap flag: %s\n", arg);
+			"ProcessMailcapEntry: Ignoring mailcap flag '%s'.\n",
+			    arg);
 	    }
 
 	}
@@ -437,7 +446,7 @@ assign_presentation:
     if (PassesTest(mc)) {
 	if (TRACE)
 	    fprintf(stderr,
-	    	    "[HTInit] Setting up conversion %s : %s\n",
+	    	    "ProcessMailcapEntry Setting up conversion %s : %s\n",
 		    mc->contenttype, mc->command);
 	HTSetPresentation(mc->contenttype, mc->command,
 			  mc->quality, 3.0, 0.0, mc->maxbytes);
@@ -449,11 +458,11 @@ assign_presentation:
 }
 
 PRIVATE void BuildCommand ARGS5(
-    char **, 	pBuf,
-    size_t,	Bufsize,
-    char *,	controlstring, 
-    char *,	TmpFileName,
-    size_t,	TmpFileLen)
+	char **, 	pBuf,
+	size_t,		Bufsize,
+	char *,		controlstring, 
+	char *,		TmpFileName,
+	size_t,		TmpFileLen)
 {
     char *from, *to;
     int prefixed = 0; 
@@ -469,7 +478,7 @@ PRIVATE void BuildCommand ARGS5(
 		case 'F':
 		    if (TRACE) {
 		        fprintf(stderr,
-				"metamail: Bad mailcap \"test\" clause: %s\n",
+			     "BuildCommand: Bad mailcap \"test\" clause: %s\n",
 				controlstring);
 		    }
 		case 's':
@@ -478,7 +487,9 @@ PRIVATE void BuildCommand ARGS5(
 			    *to = '\0';
 			    if (TRACE) {
 				fprintf(stderr,
-			"Too long mailcap \"test\" clause, ignoring: %s%s...\n",
+			"BuildCommand: Too long mailcap \"test\" clause,\n");
+				fprintf(stderr,
+			"	       ignoring: %s%s...\n",
 					*pBuf, TmpFileName);
 			    }
 			    **pBuf = '\0';
@@ -491,7 +502,7 @@ PRIVATE void BuildCommand ARGS5(
                 default:
 		    if (TRACE) {
                     	fprintf(stderr,
-		"Ignoring unrecognized format code in mailcap file: %%%c\n",
+  "BuildCommand: Ignoring unrecognized format code in mailcap file '%%%c'.\n",
 			*from);
 		    }
                     break;
@@ -505,17 +516,20 @@ PRIVATE void BuildCommand ARGS5(
 	    (*pBuf)[Bufsize - 1] = '\0';
 	    if (TRACE) {
 		fprintf(stderr,
-			"Too long mailcap \"test\" clause, ignoring: %s...\n",
+			"BuildCommand: Too long mailcap \"test\" clause,\n");
+		fprintf(stderr,
+			"              ignoring: %s...\n",
 			*pBuf);
 	    }
             **pBuf = '\0';
 	    return;
 	}
     }
-    *to = 0;
+    *to = '\0';
 }
 
-PRIVATE int PassesTest ARGS1(struct MailcapEntry *,mc)
+PRIVATE int PassesTest ARGS1(
+	struct MailcapEntry *,	mc)
 {
     int result;
     char *cmd, TmpFileName[TMPFILE_NAME_SIZE];
@@ -533,28 +547,30 @@ PRIVATE int PassesTest ARGS1(struct MailcapEntry *,mc)
     if (0 == strcasecomp(mc->testcommand, "test -n \"$DISPLAY\"")) {
         FREE(mc->testcommand);
         if (TRACE)
-	    fprintf(stderr,"Testing for XWINDOWS environment.\n");
+	    fprintf(stderr,
+		    "PassesTest: Testing for XWINDOWS environment - ");
     	if ((cp = getenv(DISPLAY)) != NULL && *cp != '\0') {
 	    if (TRACE)
-	        fprintf(stderr,"[HTInit] Test passed!\n");
+	        fprintf(stderr,"passed!\n");
 	    return(0 == 0);
 	} else {
 	    if (TRACE)
-	        fprintf(stderr,"[HTInit] Test failed!\n");
+	        fprintf(stderr,"failed!\n");
 	    return(-1 == 0);
 	}
     }
     if (0 == strcasecomp(mc->testcommand, "test -z \"$DISPLAY\"")) {
         FREE(mc->testcommand);
         if (TRACE)
-	    fprintf(stderr,"Testing for NON_XWINDOWS environment.\n");
+	    fprintf(stderr,
+		    "PassesTest: Testing for NON_XWINDOWS environment - ");
     	if (!((cp = getenv(DISPLAY)) != NULL && *cp != '\0')) {
 	    if (TRACE)
-	        fprintf(stderr,"[HTInit] Test passed!\n");
+	        fprintf(stderr,"passed!\n");
 	    return(0 == 0);
 	} else {
 	    if (TRACE)
-	        fprintf(stderr,"[HTInit] Test failed!\n");
+	        fprintf(stderr,"failed!\n");
 	    return(-1 == 0);
 	}
     }
@@ -565,8 +581,9 @@ PRIVATE int PassesTest ARGS1(struct MailcapEntry *,mc)
     if (0 == strcasecomp(mc->testcommand, "test -n \"$LYNX_VERSION\"")){
         FREE(mc->testcommand);
         if (TRACE) {
-	    fprintf(stderr,"Testing for LYNX environment.\n");
-	    fprintf(stderr,"[HTInit] Test passed!\n");
+	    fprintf(stderr,
+		    "PassesTest: Testing for LYNX environment - ");
+	    fprintf(stderr,"passed, of course!\n");
 	}
 	return(0 == 0);
     } else
@@ -576,8 +593,9 @@ PRIVATE int PassesTest ARGS1(struct MailcapEntry *,mc)
     if (0 == strcasecomp(mc->testcommand, "test -z \"$LYNX_VERSION\"")) {
         FREE(mc->testcommand);
         if (TRACE) {
-	    fprintf(stderr,"Testing for non-LYNX environment.\n");
-	    fprintf(stderr,"[HTInit] Test failed!\n");
+	    fprintf(stderr,
+		    "PassesTest: Testing for non-LYNX environment - ");
+	    fprintf(stderr,"failed, of course!\n");
 	}
 	return(-1 == 0);
     }
@@ -591,9 +609,10 @@ PRIVATE int PassesTest ARGS1(struct MailcapEntry *,mc)
         ExitWithError("Out of memory");
     BuildCommand(&cmd, 1024,
 		 mc->testcommand,
-		 TmpFileName, strlen(TmpFileName));
+		 TmpFileName,
+		 strlen(TmpFileName));
     if (TRACE)
-        fprintf(stderr,"Executing test command: %s\n", cmd);
+        fprintf(stderr,"PassesTest: Executing test command: %s\n", cmd);
     result = system(cmd);
     FREE(cmd);
 
@@ -604,24 +623,28 @@ PRIVATE int PassesTest ARGS1(struct MailcapEntry *,mc)
     FREE(mc->testcommand);
 
     if (TRACE && result)
-	fprintf(stderr,"[HTInit] Test failed!\n");
+	fprintf(stderr,"PassesTest: Test failed!\n");
     else if (TRACE)
-	fprintf(stderr,"[HTInit] Test passed!\n");
+	fprintf(stderr,"PassesTest: Test passed!\n");
 	
     return(result == 0);
 }
 
-PRIVATE int ProcessMailcapFile ARGS1(char *,file)
+PRIVATE int ProcessMailcapFile ARGS1(
+	char *,		file)
 {
     struct MailcapEntry mc;
     FILE *fp;
 
     if (TRACE)
-        fprintf (stderr, "Loading types config file '%s'\n", file);
-
+        fprintf(stderr,
+		"ProcessMailcapFile: Loading file '%s'.\n",
+		file);
     if ((fp = fopen(file, "r")) == NULL) {
         if (TRACE)
-	    fprintf (stderr, "Could not open types config file '%s'\n",file);
+	    fprintf(stderr,
+		"ProcessMailcapFile: Could not open '%s'.\n",
+		    file);
 	return(-1 == 0);
     }
 
@@ -632,7 +655,8 @@ PRIVATE int ProcessMailcapFile ARGS1(char *,file)
     return(0 == 0);
 }
 
-PRIVATE int ExitWithError ARGS1(char *,txt)
+PRIVATE int ExitWithError ARGS1(
+	char *,		txt)
 {
     if (txt)
         fprintf(stderr, "metamail: %s\n", txt);
@@ -652,7 +676,8 @@ PRIVATE int ExitWithError ARGS1(char *,txt)
 }
 
 
-PRIVATE int HTLoadTypesConfigFile ARGS1(char *,fn)
+PRIVATE int HTLoadTypesConfigFile ARGS1(
+	char *,		fn)
 {
   return ProcessMailcapFile(fn);
 }
@@ -680,7 +705,8 @@ PUBLIC void HTFileInit NOARGS
     FILE *fp;
 
     if (TRACE)
-        fprintf (stderr, "@@@ Using default extension map\n");
+        fprintf(stderr,
+		"HTFileInit: Loading default (HTInit) extension maps.\n");
 
     /* default suffix interpretation */
     HTSetSuffix("*",		"text/plain", "7bit", 1.0);
@@ -908,13 +934,19 @@ PUBLIC void HTFileInit NOARGS
 
 /* -------------------- Extension config file reading --------------------- */
 
-/* The following is lifted from NCSA httpd 1.0a1, by Rob McCool;
-   NCSA httpd is in the public domain, as is this code. */
-/* modified Oct 97 - kw */
+/*
+ *  The following is lifted from NCSA httpd 1.0a1, by Rob McCool;
+ *  NCSA httpd is in the public domain, as is this code.
+ *
+ *  Modified Oct 97 - KW
+ */
 
 #define MAX_STRING_LEN 256
 
-PRIVATE int HTGetLine ARGS3(char *,s, int,n, FILE *,f) 
+PRIVATE int HTGetLine ARGS3(
+	char *,		s,
+	int,		n,
+	FILE *,		f) 
 {
     register int i = 0, r;
 
@@ -941,7 +973,11 @@ PRIVATE int HTGetLine ARGS3(char *,s, int,n, FILE *,f)
     }
 }
 
-PRIVATE void HTGetWord ARGS4(char *,word, char *,line, char ,stop, char ,stop2) 
+PRIVATE void HTGetWord ARGS4(
+	char *,		word,
+	char *,		line,
+	char ,		stop,
+	char ,		stop2) 
 {
     int x = 0, y;
 
@@ -960,18 +996,21 @@ PRIVATE void HTGetWord ARGS4(char *,word, char *,line, char ,stop, char ,stop2)
     return;
 }
 
-PRIVATE int HTLoadExtensionsConfigFile ARGS1(char *,fn)
+PRIVATE int HTLoadExtensionsConfigFile ARGS1(
+	char *,		fn)
 {
     char l[MAX_STRING_LEN],w[MAX_STRING_LEN],*ct;
     FILE *f;
     int x, count = 0;
 
     if (TRACE)
-        fprintf (stderr, "Loading extensions config file '%s'\n", fn);
+        fprintf(stderr,
+		"HTLoadExtensionsConfigFile: Loading file '%s'.\n", fn);
 
     if ((f = fopen(fn,"r")) == NULL) {
         if (TRACE)
-            fprintf(stderr, "Could not open extensions config file '%s'\n",fn);
+            fprintf(stderr,
+		    "HTLoadExtensionsConfigFile: Could not open '%s'.\n", fn);
 	    return count;
     }
 
@@ -996,10 +1035,12 @@ PRIVATE int HTLoadExtensionsConfigFile ARGS1(char *,fn)
                 for (x = 0; w[x]; x++)
                     ext[x+1] = TOLOWER(w[x]);
                 ext[0] = '.';
-                ext[strlen(w)+1] = 0;
+                ext[strlen(w)+1] = '\0';
 
-                if (TRACE)
-                    fprintf (stderr, "SETTING SUFFIX '%s' to '%s'\n", ext, ct);
+                if (TRACE) {
+                    fprintf (stderr,
+			     "SETTING SUFFIX '%s' to '%s'.\n", ext, ct);
+		}
 
 	        if (strstr(ct, "tex") != NULL ||
 	            strstr(ct, "postscript") != NULL ||
diff --git a/src/HTML.c b/src/HTML.c
index a020ba56..283c375f 100644
--- a/src/HTML.c
+++ b/src/HTML.c
@@ -139,8 +139,10 @@ PRIVATE void actually_set_style ARGS1(HTStructured *, me)
 	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));
+			 HTAnchor_getUCLYhndl(me->node_anchor,
+			 		      UCT_STAGE_HTEXT),
+			 HTAnchor_getUCInfoStage(me->node_anchor,
+			 			 UCT_STAGE_HTEXT));
 #endif /* EXP_CHARTRANS */
 	me->text = HText_new2(me->node_anchor, me->target);
 	HText_beginAppend(me->text);
@@ -2793,7 +2795,15 @@ PRIVATE void HTML_start_element ARGS6(
 		HTAnchor_setTitle(dest, title);
 	    if (dest && dest_ismap)
 		dest->isISMAPScript = TRUE;
-    	    if (dest && dest_char_set >= 0) {
+	    if (dest && dest_char_set >= 0) {
+	        /*
+		**  Load the anchor's chartrans structures.
+		**  This should be done more intelligently
+		**  when setting up the structured object. - 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);
@@ -4636,8 +4646,10 @@ PRIVATE void HTML_start_element ARGS6(
 		     *  Not yet implemented.
 		     */
 		    HTML_put_string(me,"[RANGE Input] (Not yet implemented.)");
+#ifdef NOTDEFINED
 		    if (me->inFORM)
 			HText_DisableCurrentForm();
+#endif /* NOTDEFINED */
 		    if (TRACE)
 		        fprintf(stderr, "HTML: Ignoring TYPE=\"range\"\n");
 		    break;
@@ -4657,8 +4669,10 @@ PRIVATE void HTML_start_element ARGS6(
 		        HText_appendCharacter(me->text,
 					      LY_UNDERLINE_END_CHAR);
 		    }
+#ifdef NOTDEFINED
 		    if (me->inFORM)
 			HText_DisableCurrentForm();
+#endif /* NOTDEFINED */
 		    if (TRACE)
 		        fprintf(stderr, "HTML: Ignoring TYPE=\"file\"\n");
 		    break;
@@ -5537,9 +5551,23 @@ PRIVATE void HTML_start_element ARGS6(
 	/*
 	 *  Not implemented.  Just treat as a division
 	 *  with respect to any ALIGN attribute, with
-	 *  a default of HT_LEFT. - FM
+	 *  a default of HT_LEFT, or leave as a PRE
+	 *  block if we are presently in one. - FM
 	 */
+	if (me->inA) {
+	    SET_SKIP_STACK(HTML_A);
+	    HTML_end_element(me, HTML_A, (char **)&include);
+	}
+	if (me->Underline_Level > 0) {
+	    SET_SKIP_STACK(HTML_U);
+	    HTML_end_element(me, HTML_U, (char **)&include);
+	}
 	me->inTABLE = TRUE;
+	if (me->sp[0].tag_number == HTML_PRE) {
+	    UPDATE_STYLE;
+	    LYCheckForID(me, present, value, (int)HTML_TABLE_ID);
+	    break;
+	}
 	if (me->Division_Level < (MAX_NESTING - 1)) {
 	    me->Division_Level++;
 	} else if (TRACE) {
@@ -5580,6 +5608,14 @@ PRIVATE void HTML_start_element ARGS6(
 	 *  if needed, act on an ALIGN attribute if present,
 	 *  and check for an ID link. - FM
 	 */
+	if (me->inA) {
+	    SET_SKIP_STACK(HTML_A);
+	    HTML_end_element(me, HTML_A, (char **)&include);
+	}
+	if (me->Underline_Level > 0) {
+	    SET_SKIP_STACK(HTML_U);
+	    HTML_end_element(me, HTML_U, (char **)&include);
+	}
         UPDATE_STYLE;
 	if (HText_LastLineSize(me->text, FALSE)) {
 	    HText_setLastChar(me->text, ' ');  /* absorb white space */
@@ -5619,6 +5655,14 @@ PRIVATE void HTML_start_element ARGS6(
         /*
 	 *  Not yet implemented.  Just check for an ID link. - FM
 	 */
+	if (me->inA) {
+	    SET_SKIP_STACK(HTML_A);
+	    HTML_end_element(me, HTML_A, (char **)&include);
+	}
+	if (me->Underline_Level > 0) {
+	    SET_SKIP_STACK(HTML_U);
+	    HTML_end_element(me, HTML_U, (char **)&include);
+	}
         UPDATE_STYLE;
 	CHECK_ID(HTML_TR_ID);
         break;
@@ -5628,11 +5672,27 @@ PRIVATE void HTML_start_element ARGS6(
         /*
 	 *  Not yet implemented.  Just check for an ID link. - FM
 	 */
+	if (me->inA) {
+	    SET_SKIP_STACK(HTML_A);
+	    HTML_end_element(me, HTML_A, (char **)&include);
+	}
+	if (me->Underline_Level > 0) {
+	    SET_SKIP_STACK(HTML_U);
+	    HTML_end_element(me, HTML_U, (char **)&include);
+	}
         UPDATE_STYLE;
 	CHECK_ID(HTML_COL_ID);
         break;
     
     case HTML_TH:
+	if (me->inA) {
+	    SET_SKIP_STACK(HTML_A);
+	    HTML_end_element(me, HTML_A, (char **)&include);
+	}
+	if (me->Underline_Level > 0) {
+	    SET_SKIP_STACK(HTML_U);
+	    HTML_end_element(me, HTML_U, (char **)&include);
+	}
         UPDATE_STYLE;
 	CHECK_ID(HTML_TD_ID);
         /*
@@ -5643,6 +5703,14 @@ PRIVATE void HTML_start_element ARGS6(
         break;
 
     case HTML_TD:
+	if (me->inA) {
+	    SET_SKIP_STACK(HTML_A);
+	    HTML_end_element(me, HTML_A, (char **)&include);
+	}
+	if (me->Underline_Level > 0) {
+	    SET_SKIP_STACK(HTML_U);
+	    HTML_end_element(me, HTML_U, (char **)&include);
+	}
         UPDATE_STYLE;
 	CHECK_ID(HTML_TD_ID);
         /*
@@ -6120,8 +6188,8 @@ PRIVATE void HTML_end_element ARGS3(
 	     *  paragraph style's spaceAfter.  Don't insert
 	     *  spacing required for starting the next paragraph
 	     *  as required by its style->spaceBefore, since we
-	     *  don't know yet whether the next structure element
-	     *  (if any) will be.  If it is a another P, it will
+	     *  don't know yet what the next structure element
+	     *  (if any) will be.  If it is another P, it will
 	     *  take care of its leading space on its own.  - kw
 	     */
 	if (me->List_Nesting_Level >= 0) {
@@ -7107,6 +7175,9 @@ End_Object:
 
     case HTML_TABLE:
         me->inTABLE = FALSE;
+	if (me->sp[0].tag_number == HTML_PRE) {
+	    break;
+	}
 	if (me->Division_Level >= 0)
 	    me->Division_Level--;
 	if (me->Division_Level >= 0)
@@ -7816,10 +7887,98 @@ PUBLIC HTStructured* HTML_new ARGS3(
 #endif
 
 #ifdef EXP_CHARTRANS
+
+#ifdef NOTUSED_FOTEMODS
+    /*
+    **  If the anchor already has stage info, make sure that it is
+    **  appropriate for the current display charset.  HTMIMEConvert()
+    **  does this for the http and https schemes, and HTCharsetFormat()
+    **  does it for the file and and ftp schemes, be we need to do it,
+    **  if necessary, for the gateway schemes. - FM
+    */
+    if (me->node_anchor->UCStages) {
+	if (HTAnchor_getUCLYhndl(me->node_anchor,
+				 UCT_STAGE_STRUCTURED) != current_char_set) {
+	    /*
+	    **  We are reloading due to a change in the display character
+	    **  set.  Free the stage info and let the stage info creation
+	    **  mechanisms create a new UCStages structure appropriate for
+	    **  the current display character set. - FM
+	    */
+
+	    FREE(anchor->UCStages);
+	} else if (HTAnchor_getUCLYhndl(me->node_anchor,
+					UCT_STAGE_MIME) == current_char_set) {
+	    /*
+	    **  The MIME stage is set to the current display character
+	    **  set.  If it is CJK, and HTCJK does not point to a CJK
+	    **  character set, assume we are reloading due to a raw
+	    **  mode toggle and reset the MIME and PARSER stages to
+	    **  an ISO Latin 1 default. - FM
+	    */
+	    LYUCcharset *p_in = HTAnchor_getUCInfoStage(me->node_anchor,
+							UCT_STAGE_MIME);
+	    if (p_in->enc == UCT_ENC_CJK && HTCJK == NOCJK) {
+		HTAnchor_resetUCInfoStage(me->node_anchor, 0,
+					  UCT_STAGE_MIME,
+					  UCT_SETBY_DEFAULT);
+		HTAnchor_setUCInfoStage(me->node_anchor, 0,
+					UCT_STAGE_MIME,
+					UCT_SETBY_DEFAULT);
+		HTAnchor_resetUCInfoStage(me->node_anchor, 0,
+					  UCT_STAGE_PARSER,
+					  UCT_SETBY_DEFAULT);
+		HTAnchor_setUCInfoStage(me->node_anchor, 0,
+					UCT_STAGE_PARSER,
+					UCT_SETBY_DEFAULT);
+	    }
+	}
+    }
+#endif /* NOTUSED_FOTEMODS */
+
+    /*
+    **  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);
 #endif /* EXP_CHARTRANS */
 
+    /*
+    **  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);
+#ifdef NOTUSED_FOTEMODS
+    UCSetTransParams(&me->T,
+    		     me->inUCLYhndl, me->inUCI,
+		     me->outUCLYhndl, me->outUCI);
+#endif
+
     me->target = stream;
     if (stream)
         me->targetClass = *stream->isa;			/* Copy pointers */
diff --git a/src/HTML.h b/src/HTML.h
index c5a13c31..2a50d3b1 100644
--- a/src/HTML.h
+++ b/src/HTML.h
@@ -146,12 +146,46 @@ struct _HTStructured {
 
     BOOL		needBoldH;
 
-#ifdef EXP_CHARTRANS
-    LYUCcharset	* UCI;	/* pointer to node_anchor's UCInfo */
-    int	UCLYhndl;		/* tells us what charset we are fed */
-    UCTransParams T;
+    /*
+    **  UCI and UCLYhndl give the UCInfo and charset registered for
+    **  the HTML parser in the node_anchor's UCStages structure.  It
+    **  indicates what is fed to the HTML parser as the stream of character
+    **  data (not necessarily tags and attributes).  It should currently
+    **  always be set to be the same as UCI and UCLhndl for the HTEXT stage
+    **  in the node_anchor's UCStages structure, since the HTML parser sends
+    **  its input character data to the output without further charset
+    **  translation.
+    */
+    LYUCcharset	*	UCI;
+    int			UCLYhndl;
+    /*
+    **  inUCI and inUCLYhndl indicate the UCInfo and charset which the
+    **  HTML parser treats at the input charset.  It is normally set
+    **  to the UCI and UCLhndl for the SGML parser in the node_anchor's
+    **  UCStages structure (which may be a dummy, based on the MIME
+    **  parser's UCI and UCLhndl in that structure, when we are handling
+    **  a local file or non-http(s) gateway).  It could be changed
+    **  temporarily by the HTML parser, for conversions of attribute
+    **  strings, but should be reset once done. - FM
+    */
+    LYUCcharset	*	inUCI;
+    int			inUCLYhndl;
+    /*
+    **  outUCI and outUCLYhndl indicate the UCInfo and charset which
+    **  the HTML parser treats as the output charset.  It is normally
+    **  set to its own UCI and UCLhndl.  It could be changed for
+    **  conversions of attribute strings, but should be reset once
+    **  done. - FM
+    */
+    LYUCcharset	*	outUCI;
+    int			outUCLYhndl;
+    /*
+    **  T holds the transformation rules for conversions of strings
+    **  between the input and output charsets by the HTML parser. - FM
+    */
+    UCTransParams	T;
+
     int 		tag_charset; /* charset for attribute values etc. */
-#endif
 };
 
 struct _HTStream {
diff --git a/src/LYCharSets.c b/src/LYCharSets.c
index 17fdd3af..78b25519 100644
--- a/src/LYCharSets.c
+++ b/src/LYCharSets.c
@@ -1,15 +1,13 @@
 #include "HTUtils.h"
 #include "tcp.h"
 #include "HTCJK.h"
+#include "HTMLDTD.h"
 
 #include "LYGlobalDefs.h"
 #include "UCMap.h"
 #include "UCDefs.h"
 #include "LYCharSets.h"
 #include "LYCharUtils.h"
-#ifdef EXP_CHARTRANS
-#include "UCMap.h"
-#endif /* EXP_CHARTRANS */
 #include "HTFont.h"
 #include "GridText.h"
 #include "LYCurses.h"
@@ -25,31 +23,24 @@ extern BOOL HTPassHighCtrlNum;
 extern HTCJKlang HTCJK;
 PUBLIC HTkcode kanji_code = NOKANJI;
 PUBLIC BOOLEAN LYHaveCJKCharacterSet = FALSE;
-
-#ifdef EXP_CHARTRANS
 extern void UCInit NOARGS;
 extern int UCInitialized;
-#else 
-#ifndef MAXCHARSETS
-#define MAXCHARSETS
-#endif
-#ifndef MAXCHARSETSP
-#define MAXCHARSETSP
-#endif
-#endif /* EXP_CHARTRANS */
+PUBLIC int LYNumCharsets = 0; /* Will be initialized later by UC_Register. */
 
-/* INSTRUCTIONS for adding new character sets !!!!
- *
- * Make up a character set and add it in the same
- * style as the ISO_LATIN1 set below, giving it a unique name.
+/*
+ *  INSTRUCTIONS for adding new character sets which do not have
+ *		 Unicode tables.
  *
- * Near the end of this file is a place marked "Add your character sets HERE".
+ *  Make up a character set and add it in the same
+ *  style as the ISO_LATIN1 set below, giving it a unique name.
  *
- * Add the name of the set to LYCharSets at the bottom of this file, and
- * also add it to the LYchar_set_names table below LYCharSets.
- * LYCharSets and LYchar_set_names MUST have the same order.
+ *  Near the end of this file is a place marked "Add your character sets HERE".
  *
- * No string substitutions can exceed 5 characeters.
+ *  Add the name of the set to LYCharSets at the bottom of this file, and
+ *  also add it to the LYchar_set_names table below LYCharSets.
+ *  Similarly add the appropriate information to LYCharSet_UC and to
+ *  LYlowest_eightbit below that.
+ *  These tables all MUST have the same order.
  */
 
 /* 	Entity values -- for ISO Latin 1 local representation
@@ -57,49 +48,49 @@ extern int UCInitialized;
 **	This MUST match exactly the table referred to in the DTD!
 */
 PRIVATE char * ISO_Latin1[] = {
-  	"\306",	/* capital AE diphthong (ligature) - AElig */ 
-  	"\301",	/* capital A, acute accent - Aacute */ 
-  	"\302",	/* capital A, circumflex accent - Acirc */ 
-  	"\300",	/* capital A, grave accent - Agrave */ 
-  	"\305",	/* capital A, ring - Aring */ 
-  	"\303",	/* capital A, tilde - Atilde */ 
-  	"\304",	/* capital A, dieresis or umlaut mark - Auml */ 
-  	"\307",	/* capital C, cedilla - Ccedil */ 
-  	"\320",	/* capital Eth or D with stroke - Dstrok */ 
-  	"\320",	/* capital Eth, Icelandic - ETH */ 
-  	"\311",	/* capital E, acute accent - Eacute */ 
-  	"\312",	/* capital E, circumflex accent - Ecirc */ 
-  	"\310",	/* capital E, grave accent - Egrave */ 
-  	"\313",	/* capital E, dieresis or umlaut mark - Euml */ 
-  	"\315",	/* capital I, acute accent - Iacute */ 
-  	"\316",	/* capital I, circumflex accent - Icirc */ 
-  	"\314",	/* capital I, grave accent - Igrave */ 
-  	"\317",	/* capital I, dieresis or umlaut mark - Iuml */ 
-  	"\321",	/* capital N, tilde - Ntilde */ 
-  	"\323",	/* capital O, acute accent - Oacute */ 
-  	"\324",	/* capital O, circumflex accent - Ocirc */ 
-  	"\322",	/* capital O, grave accent - Ograve */ 
-  	"\330",	/* capital O, slash - Oslash */ 
-  	"\325",	/* capital O, tilde - Otilde */ 
-  	"\326",	/* capital O, dieresis or umlaut mark - Ouml */ 
-  	"\336",	/* capital THORN, Icelandic - THORN */ 
-  	"\332",	/* capital U, acute accent - Uacute */ 
-  	"\333",	/* capital U, circumflex accent - Ucirc */ 
-  	"\331",	/* capital U, grave accent - Ugrave */ 
-  	"\334",	/* capital U, dieresis or umlaut mark - Uuml */ 
-  	"\335",	/* capital Y, acute accent - Yacute */ 
-  	"\341",	/* small a, acute accent - aacute */ 
-  	"\342",	/* small a, circumflex accent - acirc */ 
+  	"\306",	/* capital AE diphthong (ligature) (&#198;) - AElig */ 
+  	"\301",	/* capital A, acute accent (&#193;) - Aacute */ 
+  	"\302",	/* capital A, circumflex accent (&#194;) - Acirc */ 
+  	"\300",	/* capital A, grave accent (&#192;) - Agrave */ 
+  	"\305",	/* capital A, ring - Aring (&#197;) */ 
+  	"\303",	/* capital A, tilde - Atilde (&#195;) */ 
+  	"\304",	/* capital A, dieresis or umlaut mark (&#196;) - Auml */ 
+  	"\307",	/* capital C, cedilla - Ccedil (&#199;) */ 
+  	"\320",	/* capital Eth (&#208;) or D with stroke - Dstrok */ 
+  	"\320",	/* capital Eth, Icelandic (&#208;) - ETH */ 
+  	"\311",	/* capital E, acute accent (&#201;) - Eacute */ 
+  	"\312",	/* capital E, circumflex accent (&#202;) - Ecirc */ 
+  	"\310",	/* capital E, grave accent (&#200;) - Egrave */ 
+  	"\313",	/* capital E, dieresis or umlaut mark (&#203;) - Euml */ 
+  	"\315",	/* capital I, acute accent (&#205;) - Iacute */ 
+  	"\316",	/* capital I, circumflex accent (&#206;) - Icirc */ 
+  	"\314",	/* capital I, grave accent (&#200;) - Igrave */ 
+  	"\317",	/* capital I, dieresis or umlaut mark (&#207;) - Iuml */ 
+  	"\321",	/* capital N, tilde (&#209;) - Ntilde */ 
+  	"\323",	/* capital O, acute accent (&#211;) - Oacute */ 
+  	"\324",	/* capital O, circumflex accent (&#212;) - Ocirc */ 
+  	"\322",	/* capital O, grave accent (&#210;) - Ograve */ 
+  	"\330",	/* capital O, slash (&#216;) - Oslash */ 
+  	"\325",	/* capital O, tilde (&#213;) - Otilde */ 
+  	"\326",	/* capital O, dieresis or umlaut mark (&#214;) - Ouml */ 
+  	"\336",	/* capital THORN, Icelandic (&#222;) - THORN */ 
+  	"\332",	/* capital U, acute accent (&#218;) - Uacute */ 
+  	"\333",	/* capital U, circumflex accent (&#219;) - Ucirc */ 
+  	"\331",	/* capital U, grave accent (&#217;) - Ugrave */ 
+  	"\334",	/* capital U, dieresis or umlaut mark (&#220;) - Uuml */ 
+  	"\335",	/* capital Y, acute accent (&#221;) - Yacute */ 
+  	"\341",	/* small a, acute accent (&#225;) - aacute */ 
+  	"\342",	/* small a, circumflex accent (&#226;) - acirc */ 
 	"\264",	/* spacing acute (&#180;) - acute */
-  	"\346",	/* small ae diphthong (ligature) - aelig */ 
-  	"\340",	/* small a, grave accent - agrave */ 
-  	"\046",	/* ampersand - amp */ 
-  	"\345",	/* small a, ring - aring */ 
-  	"\343",	/* small a, tilde - atilde */ 
-  	"\344",	/* small a, dieresis or umlaut mark - auml */ 
+  	"\346",	/* small ae diphthong (ligature) (&#230;) - aelig */ 
+  	"\340",	/* small a, grave accent (&#224;) - agrave */ 
+  	"\046",	/* ampersand (&#38;) - amp */ 
+  	"\345",	/* small a, ring (&#229;) - aring */ 
+  	"\343",	/* small a, tilde (&#227;) - atilde */ 
+  	"\344",	/* small a, dieresis or umlaut mark (&#228;) - auml */ 
 	"\246",	/* broken vertical bar (&#166;) - brkbar */
 	"\246",	/* broken vertical bar (&#166;) - brvbar */
-  	"\347",	/* small c, cedilla - ccedil */ 
+  	"\347",	/* small c, cedilla (&#231;) - ccedil */ 
 	"\270",	/* spacing cedilla (&#184;) - cedil */
 	"\242",	/* cent sign (&#162;) - cent */
 	"\251",	/* copyright sign (&#169;) - copy */
@@ -107,28 +98,28 @@ PRIVATE char * ISO_Latin1[] = {
 	"\260",	/* degree sign (&#176;) - deg */
 	"\250",	/* spacing diaresis (&#168;) - die */
 	"\367",	/* division sign (&#247;) - divide */
-  	"\351",	/* small e, acute accent - eacute */ 
-  	"\352",	/* small e, circumflex accent - ecirc */ 
-  	"\350",	/* small e, grave accent - egrave */
+  	"\351",	/* small e, acute accent (&#233;) - eacute */ 
+  	"\352",	/* small e, circumflex accent (&#234;) - ecirc */ 
+  	"\350",	/* small e, grave accent (&#232;) - egrave */
 	"-",	/* dash the width of emsp - emdash */
 	"\002",	/* emsp, em space - not collapsed NEVER CHANGE THIS - emsp */
 	"-",	/* dash the width of ensp - endash */
 	"\002",	/* ensp, en space - not collapsed NEVER CHANGE THIS - ensp */
-  	"\360",	/* small eth, Icelandic - eth */ 
-  	"\353",	/* small e, dieresis or umlaut mark - euml */ 
+  	"\360",	/* small eth, Icelandic (&#240;) - eth */ 
+  	"\353",	/* small e, dieresis or umlaut mark (&#235;) - euml */ 
 	"\275",	/* fraction 1/2 (&#189;) - frac12 */
 	"\274",	/* fraction 1/4 (&#188;) - frac14 */
 	"\276",	/* fraction 3/4 (&#190;) - frac34 */
-  	"\076",	/* greater than - gt */ 
+  	"\076",	/* greater than (&#62;) - gt */ 
 	"\257",	/* spacing macron (&#175;) - hibar */
-  	"\355",	/* small i, acute accent - iacute */ 
-  	"\356",	/* small i, circumflex accent - icirc */ 
+  	"\355",	/* small i, acute accent (&#237;) - iacute */ 
+  	"\356",	/* small i, circumflex accent (&#238;) - icirc */ 
 	"\241",	/* inverted exclamation mark (&#161;) - iexcl */
-  	"\354",	/* small i, grave accent - igrave */ 
+  	"\354",	/* small i, grave accent (&#236;) - igrave */ 
 	"\277",	/* inverted question mark (&#191;) - iquest */
-  	"\357",	/* small i, dieresis or umlaut mark - iuml */ 
+  	"\357",	/* small i, dieresis or umlaut mark (&#239;) - iuml */ 
 	"\253",	/* angle quotation mark, left (&#171;) - laquo */
-  	"\074",	/* less than - lt */ 
+  	"\074",	/* less than (&#60;) - lt */ 
 	"\257",	/* spacing macron (&#175;) - macr */
 	"-",	/* dash the width of emsp - mdash */
 	"\265",	/* micro sign (&#181;) - micro */
@@ -136,19 +127,19 @@ PRIVATE char * ISO_Latin1[] = {
 	"\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
 	"-",	/* dash the width of ensp - ndash */
 	"\254",	/* negation sign (&#172;) - not */
-  	"\361",	/* small n, tilde - ntilde */ 
-  	"\363",	/* small o, acute accent - oacute */ 
-  	"\364",	/* small o, circumflex accent - ocirc */ 
-  	"\362",	/* small o, grave accent - ograve */ 
+  	"\361",	/* small n, tilde (&#241;) - ntilde */ 
+  	"\363",	/* small o, acute accent (&#243;) - oacute */ 
+  	"\364",	/* small o, circumflex accent (&#244;) - ocirc */ 
+  	"\362",	/* small o, grave accent (&#242;) - ograve */ 
 	"\252",	/* feminine ordinal indicator (&#170;) - ordf */
 	"\272",	/* masculine ordinal indicator (&#186;) - ordm */
-  	"\370",	/* small o, slash - oslash */ 
-  	"\365",	/* small o, tilde - otilde */ 
-  	"\366",	/* small o, dieresis or umlaut mark - ouml */ 
+  	"\370",	/* small o, slash (&#248;) - oslash */ 
+  	"\365",	/* small o, tilde (&#245;) - otilde */ 
+  	"\366",	/* small o, dieresis or umlaut mark (&#246;) - ouml */ 
 	"\266",	/* paragraph sign (&#182;) - para */
 	"\261",	/* plus-or-minus sign (&#177;) - plusmn */
 	"\243",	/* pound sign (&#163;) - pound */
-	"\042",	/* quote '"' - quot */
+	"\042",	/* quote '"' (&#34;) - quot */
 	"\273",	/* angle quotation mark, right (&#187;) - raquo */
 	"\256",	/* circled R registered sign (&#174;) - reg */
 	"\247",	/* section sign (&#167;) - sect */
@@ -156,19 +147,19 @@ PRIVATE char * ISO_Latin1[] = {
 	"\271",	/* superscript 1 (&#185;) - sup1 */
 	"\262",	/* superscript 2 (&#178;) - sup2 */
 	"\263",	/* superscript 3 (&#179;) - sup3 */
-  	"\337",	/* small sharp s, German (sz ligature) - szlig */ 
+  	"\337",	/* small sharp s, German (sz ligature) (&#223;) - szlig */ 
 	"\002",	/* thin space - not collapsed NEVER CHANGE THIS - thinsp */
-  	"\376",	/* small thorn, Icelandic - thorn */ 
+  	"\376",	/* small thorn, Icelandic (&#254;) - thorn */ 
   	"\327",	/* multiplication sign (&#215;) - times */ 
 	"(TM)",	/* circled TM trade mark sign (&#8482;) - trade */
-  	"\372",	/* small u, acute accent - uacute */ 
-  	"\373",	/* small u, circumflex accent - ucirc */ 
-  	"\371",	/* small u, grave accent - ugrave */ 
+  	"\372",	/* small u, acute accent (&#250;) - uacute */ 
+  	"\373",	/* small u, circumflex accent (&#251;) - ucirc */ 
+  	"\371",	/* small u, grave accent (&#249;) - ugrave */ 
 	"\250",	/* spacing diaresis (&#168;) - uml */
-  	"\374",	/* small u, dieresis or umlaut mark - uuml */ 
-  	"\375",	/* small y, acute accent - yacute */ 
+  	"\374",	/* small u, dieresis or umlaut mark (&#252;) - uuml */ 
+  	"\375",	/* small y, acute accent (&#253;) - yacute */ 
 	"\245",	/* yen sign (&#165;) - yen */
-  	"\377",	/* small y, dieresis or umlaut mark - yuml */ 
+  	"\377",	/* small y, dieresis or umlaut mark (&#255;) - yuml */ 
 };
 
 /* 	Entity values -- for ISO Latin 2 local representation
@@ -1754,7 +1745,7 @@ PRIVATE char * Korean[] = {
 
 /*      Entity values -- Taipei (Big5)
 **
-**      This MUST match exactly the table referred to in the DTD!
+**	This MUST match exactly the table referred to in the DTD!
 */
 PRIVATE char * Taipei[] = {
         "AE",	/* capital AE diphthong (ligature) - AElig */
@@ -1827,7 +1818,7 @@ PRIVATE char * Taipei[] = {
         "e",	/* small e, circumflex accent - ecirc */
         "e",	/* small e, grave accent - egrave */
 	"-",	/* dash the width of emsp - emdash */
-        "\002",	/* emsp NEVER CHANGE THIS - emsp */
+	"\002",	/* emsp, em space - not collapsed NEVER CHANGE THIS - emsp */
 	"-",	/* dash the width of ensp - endash */
         "\002",	/* ensp NEVER CHANGE THIS - ensp */
         "dh",	/* small eth, Icelandic eth */
@@ -1900,65 +1891,65 @@ PRIVATE char * Taipei[] = {
 **      This MUST match exactly the table referred to in the DTD!
 */
 PUBLIC char * SevenBitApproximations[] = {
-        "AE",	/* capital AE diphthong (ligature) - AElig */
-        "A",	/* capital A, acute accent - Aacute */
-        "A",	/* capital A, circumflex accent - Acirc */
-        "A",	/* capital A, grave accent - Agrave */
-        "A",	/* capital A, ring - Aring */
-        "A",	/* capital A, tilde - Atilde */
+        "AE",	/* capital AE diphthong (ligature) (&#198;) - AElig */
+        "A",	/* capital A, acute accent (&#193;) - Aacute */
+        "A",	/* capital A, circumflex accent (&#194;) - Acirc */
+        "A",	/* capital A, grave accent (&#192;) - Agrave */
+        "A",	/* capital A, ring - Aring (&#197;) */
+        "A",	/* capital A, tilde - Atilde (&#195;) */
 #ifdef LY_UMLAUT
-        "Ae",	/* capital A, dieresis or umlaut mark - Auml*/
+        "Ae",	/* capital A, dieresis or umlaut mark (&#196;) - Auml*/
 #else
-        "A",	/* capital A, dieresis or umlaut mark - Auml*/
+        "A",	/* capital A, dieresis or umlaut mark (&#196;) - Auml*/
 #endif /* LY_UMLAUT */
-        "C",	/* capital C, cedilla - Ccedil */
-        "Dj",	/* capital D with stroke - Dstrok */
-        "DH",	/* capital Eth, Icelandic - ETH */
-        "E",	/* capital E, acute accent - Eacute */
-        "E",	/* capital E, circumflex accent - Ecirc */
-        "E",	/* capital E, grave accent - Egrave */
-        "E",	/* capital E, dieresis or umlaut mark - Euml */
-        "I",	/* capital I, acute accent - Iacute */
-        "I",	/* capital I, circumflex accent - Icirc */
-        "I",	/* capital I, grave accent - Igrave */
-        "I",	/* capital I, dieresis or umlaut mark - Iuml */
-        "N",	/* capital N, tilde - Ntilde */
-        "O",	/* capital O, acute accent - Oacute */
-        "O",	/* capital O, circumflex accent - Ocirc */
-        "O",	/* capital O, grave accent - Ograve */
-        "O",	/* capital O, slash - Oslash */
-        "O",	/* capital O, tilde - Otilde */
+        "C",	/* capital C, cedilla (&#199;) - Ccedil */
+        "Dj",	/* capital D with stroke (&#208;) - Dstrok */
+        "DH",	/* capital Eth, Icelandic (&#208;) - ETH */
+        "E",	/* capital E, acute accent (&#201;) - Eacute */
+        "E",	/* capital E, circumflex accent (&#202;) - Ecirc */
+        "E",	/* capital E, grave accent (&#200;) - Egrave */
+        "E",	/* capital E, dieresis or umlaut mark (&#203;) - Euml */
+        "I",	/* capital I, acute accent (&#205;) - Iacute */
+        "I",	/* capital I, circumflex accent (&#206;) - Icirc */
+        "I",	/* capital I, grave accent (&#204;) - Igrave */
+        "I",	/* capital I, dieresis or umlaut mark (&#207;) - Iuml */
+        "N",	/* capital N, tilde - Ntilde (&#209;) */
+        "O",	/* capital O, acute accent (&#211;) - Oacute */
+        "O",	/* capital O, circumflex accent (&#212;) - Ocirc */
+        "O",	/* capital O, grave accent (&#210;) - Ograve */
+        "O",	/* capital O, slash (&#216;) - Oslash */
+        "O",	/* capital O, tilde (&#213;) - Otilde */
 #ifdef LY_UMLAUT
-        "Oe",	/* capital O, dieresis or umlaut mark - Ouml */
+        "Oe",	/* capital O, dieresis or umlaut mark (&#214;) - Ouml */
 #else
-        "O",	/* capital O, dieresis or umlaut mark - Ouml */
+        "O",	/* capital O, dieresis or umlaut mark (&#214;) - Ouml */
 #endif /* LY_UMLAUT */
-        "P",	/* capital THORN, Icelandic - THORN */
-        "U",	/* capital U, acute accent - Uacute */
-        "U",	/* capital U, circumflex accent - Ucirc */
-        "U",	/* capital U, grave accent - Ugrave */
+        "P",	/* capital THORN, Icelandic (&#222;) - THORN */
+        "U",	/* capital U, acute accent (&#218;) - Uacute */
+        "U",	/* capital U, circumflex accent (&#219;) - Ucirc */
+        "U",	/* capital U, grave accent (&#217;) - Ugrave */
 #ifdef LY_UMLAUT
-        "Ue",	/* capital U, dieresis or umlaut mark - Uuml */
+        "Ue",	/* capital U, dieresis or umlaut mark (&#220;) - Uuml */
 #else
-        "U",	/* capital U, dieresis or umlaut mark - Uuml */
+        "U",	/* capital U, dieresis or umlaut mark (&#220;) - Uuml */
 #endif /* LY_UMLAUT */
-        "Y",	/* capital Y, acute accent - Yacute */
-        "a",	/* small a, acute accent - aacute */
-        "a",	/* small a, circumflex accent - acirc */
+        "Y",	/* capital Y, acute accent (&#221;) - Yacute */
+        "a",	/* small a, acute accent (&#225;) - aacute */
+        "a",	/* small a, circumflex accent (&#226;) - acirc */
 	"'",	/* spacing acute (&#180;) - acute */
-        "ae",	/* small ae diphthong (ligature) - aelig */
-        "`a",	/* small a, grave accent - agrave */
-        "&",	/* ampersand - amp */
-        "a",	/* small a, ring - aring */
-        "a",	/* small a, tilde - atilde */
+        "ae",	/* small ae diphthong (ligature) (&#230;) - aelig */
+        "`a",	/* small a, grave accent (&#232;) - agrave */
+        "&",	/* ampersand (&#38;) - amp */
+        "a",	/* small a, ring (&#229;) - aring */
+        "a",	/* small a, tilde (&#227;) - atilde */
 #ifdef LY_UMLAUT
-        "ae",	/* small a, dieresis or umlaut mark - auml */
+        "ae",	/* small a, dieresis or umlaut mark (&#228;) - auml */
 #else
-        "a",	/* small a, dieresis or umlaut mark - auml */
+        "a",	/* small a, dieresis or umlaut mark (&#228;) - auml */
 #endif /* LY_UMLAUT */
 	"|",	/* broken vertical bar (&#166;) - brkbar */
 	"|",	/* broken vertical bar (&#166;) - brvbar */
-        "c",	/* small c, cedilla - ccedil */
+        "c",	/* small c, cedilla (&#231;) - ccedil */
 	",",	/* spacing cedilla (&#184;) - cedil */
 	"-c-",	/* cent sign (&#162;) - cent */
 	"(c)",	/* copyright sign (&#169;) - copy */
@@ -1966,28 +1957,28 @@ PUBLIC char * SevenBitApproximations[] = {
 	"DEG",	/* degree sign (&#176;) - deg */
 	"\042",	/* spacing diaresis (&#168;) - die */
 	"/",	/* division sign (&#247;) - divide */
-        "e",	/* small e, acute accent - eacute */
-        "e",	/* small e, circumflex accent - ecirc */
-        "e",	/* small e, grave accent - egrave */
+        "e",	/* small e, acute accent (&#233;) - eacute */
+        "e",	/* small e, circumflex accent (&#234;) - ecirc */
+        "e",	/* small e, grave accent (&#232;) - egrave */
 	"-",	/* dash the width of emsp - emdash */
         "\002",	/* emsp NEVER CHANGE THIS - emsp */
 	"-",	/* dash the width of ensp - endash */
         "\002",	/* ensp NEVER CHANGE THIS - ensp */
-        "dh",	/* small eth, Icelandic eth */
-        "e",	/* small e, dieresis or umlaut mark - euml */
+        "dh",	/* small eth, Icelandic eth (&#240;) */
+        "e",	/* small e, dieresis or umlaut mark (&#235;) - euml */
 	" 1/2",	/* fraction 1/2 (&#189;) - frac12 */
 	" 1/4",	/* fraction 1/4 (&#188;) - frac14 */
 	" 3/4",	/* fraction 3/4 (&#190;) - frac34 */
-        ">",	/* greater than - gt */
+        ">",	/* greater than (&#62;) - gt */
 	"-",	/* spacing macron (&#175;) - hibar */
-        "i",	/* small i, acute accent - iacute */
-        "i",	/* small i, circumflex accent - icirc*/
+        "i",	/* small i, acute accent (&#237;) - iacute */
+        "i",	/* small i, circumflex accent (&#238;) - icirc*/
 	"!",	/* inverted exclamation mark (&#161;) - iexcl */
-        "`i",	/* small i, grave accent - igrave */
+        "`i",	/* small i, grave accent (&#236;) - igrave */
 	"?",	/* inverted question mark (&#191;) - iquest */
-        "i",	/* small i, dieresis or umlaut mark - iuml */
+        "i",	/* small i, dieresis or umlaut mark (&#239;) - iuml */
 	"<<",	/* angle quotation mark, left (&#171;) - laquo */
-        "<",	/* less than - lt */
+        "<",	/* less than - lt (&#60;) */
 	"-",	/* spacing macron (&#175;) - macr */
 	"-",	/* dash the width of emsp - mdash */
 	"u",	/* micro sign (&#181;) - micro */
@@ -1995,23 +1986,23 @@ PUBLIC char * SevenBitApproximations[] = {
         "\001",	/* nbsp non-breaking space NEVER CHANGE THIS - nbsp */
 	"-",	/* dash the width of ensp - ndash */
 	"NOT",	/* negation sign (&#172;) - not */
-        "n",	/* small n, tilde - ntilde */
-        "o",	/* small o, acute accent - oacute */
-        "o",	/* small o, circumflex accent - ocirc */
-        "o",	/* small o, grave accent - ograve */
+        "n",	/* small n, tilde (&#241;) - ntilde */
+        "o",	/* small o, acute accent (&#243;) - oacute */
+        "o",	/* small o, circumflex accent (&#244;) - ocirc */
+        "o",	/* small o, grave accent (&#242;) - ograve */
 	"-a",	/* feminine ordinal indicator (&#170;) - ordf */
 	"-o",	/* masculine ordinal indicator (&#186;) - ordm */
-        "o",	/* small o, slash - oslash */
-        "o",	/* small o, tilde - otilde */
+        "o",	/* small o, slash (&#248;) - oslash */
+        "o",	/* small o, tilde (&#245;) - otilde */
 #ifdef LY_UMLAUT
-        "oe",	/* small o, dieresis or umlaut mark - ouml */
+        "oe",	/* small o, dieresis or umlaut mark (&#246;) - ouml */
 #else
-        "o",	/* small o, dieresis or umlaut mark - ouml */
+        "o",	/* small o, dieresis or umlaut mark (&#246;) - ouml */
 #endif /* LY_UMLAUT */
 	"P:",	/* paragraph sign (&#182;) - para */
 	"+-",	/* plus-or-minus sign (&#177;) - plusmn */
 	"-L-",	/* pound sign (&#163;) - pound */
-        "\"",	/* quote '"' - quot */
+        "\"",	/* quote '"' (&#34;) - quot */
 	">>",	/* angle quotation mark, right (&#187;) - raquo */
 	"(R)",	/* circled R registered sign (&#174;) - reg */
 	"S:",	/* section sign (&#167;) - sect */
@@ -2019,51 +2010,52 @@ PUBLIC char * SevenBitApproximations[] = {
 	"^1",	/* superscript 1 (&#185;) - sup1 */
 	"^2",	/* superscript 2 (&#178;) - sup2 */
 	"^3",	/* superscript 3 (&#179;) - sup3 */
-        "ss",	/* small sharp s, German (sz ligature) - szlig */
+        "ss",	/* small sharp s, German (sz ligature) (&#223;) - szlig */
 	"\002",	/* thin space - not collapsed NEVER CHANGE THIS - thinsp */
-        "p",	/* small thorn, Icelandic - thorn */
+        "p",	/* small thorn, Icelandic (&#254;) - thorn */
   	"*",	/* multiplication sign (&#215;) - times */ 
 	"(TM)",	/* circled TM trade mark sign (&#8482;) - trade */
-        "u",	/* small u, acute accent - uacute */
-        "u",	/* small u, circumflex accent - ucirc */
-        "u",	/* small u, grave accent - ugrave */
+        "u",	/* small u, acute accent (&#250;) - uacute */
+        "u",	/* small u, circumflex accent (&#251;) - ucirc */
+        "u",	/* small u, grave accent (&#249;) - ugrave */
 	"\042",	/* spacing diaresis (&#168;) - uml */
 #ifdef LY_UMLAUT
-        "ue",	/* small u, dieresis or umlaut mark - uuml */
+        "ue",	/* small u, dieresis or umlaut mark (&#252;) - uuml */
 #else
-        "u",	/* small u, dieresis or umlaut mark - uuml */
+        "u",	/* small u, dieresis or umlaut mark (&#252;) - uuml */
 #endif /* LY_UMLAUT */
-        "y",	/* small y, acute accent - yacute */
+        "y",	/* small y, acute accent (&#253;) - yacute */
 	"YEN",	/* yen sign (&#165;) - yen */
-        "y",	/* small y, dieresis or umlaut mark - yuml */
+        "y",	/* small y, dieresis or umlaut mark (&#255;) - yuml */
 };
 
-
 /*
- *  Add your new character sets HERE.
- *  No string substitutions can exceed 5 characters.
+ *  Add your new character sets HERE (but only if you
+ *  can't contruct Unicode tables for them). - FM
  */
 
 /* 
  *  Add the array name to LYCharSets
  */
 PUBLIC char ** LYCharSets[MAXCHARSETS]={
-	ISO_Latin1,
+	ISO_Latin1,		/* ISO Latin 1		*/
 	ISO_Latin2,
-	ISO_LatinN,
-	DEC_Multinational,
-	PC_charset,
-	PC_850_charset,
-	Macintosh,
-	NeXT_Step,
+	ISO_LatinN,           	/* Other ISO Latin	*/
+	SevenBitApproximations,	/* WinLatin1 (cp1252)	*/
+	DEC_Multinational,     	/* DEC Multinational	*/
+	Macintosh,              /* Macintosh (8 bit)	*/
+	NeXT_Step,              /* NeXT character set	*/
 	KOI8_R,
-	Chinese,
-	EUC_JP,
-	Shift_JIS,
-	Korean,
-	Taipei,
-	SevenBitApproximations,
-	ISO_Latin1		/* Maybe... - KW */
+	Chinese,               	/* Chinese		*/
+	EUC_JP,                 /* Japanese (EUC)	*/
+	Shift_JIS,              /* Japanese (SJIS)	*/
+	Korean,                 /* Korean		*/
+	Taipei,                 /* Taipei (Big5)	*/
+	SevenBitApproximations, /* Vietnamese (VISCII)	*/
+	SevenBitApproximations,	/* 7 Bit Approximations	*/
+	SevenBitApproximations,	/* Transparent		*/
+	PC_charset,             /* DosLatinUS (cp437)	*/
+	PC_850_charset         	/* DosLatin1 (cp850)	*/
 };
 
 /*
@@ -2074,24 +2066,23 @@ PUBLIC CONST char * LYchar_set_names[MAXCHARSETSP]={
 	"ISO Latin 1         ",
 	"ISO Latin 2         ",
 	"Other ISO Latin     ",
+	"WinLatin1 (cp1252)  ",
 	"DEC Multinational   ",
-	"IBM PC character set",
-	"IBM PC codepage 850 ",
 	"Macintosh (8 bit)   ",
 	"NeXT character set  ",
-	"KOI8-R character set",
-	"Chinese             ",
+ 	"KOI8-R Cyrillic     ",
+ 	"Chinese             ",
 	"Japanese (EUC)      ",
 	"Japanese (SJIS)     ",
 	"Korean              ",
 	"Taipei (Big5)       ",
+	"Vietnamese (VISCII) ",
 	"7 bit approximations",
 	"Transparent         ",
+	"IBM PC character set",
+	"IBM PC codepage 850 ",
 	(char *) 0
 };
-#ifdef EXP_CHARTRANS
-
-PUBLIC int LYNumCharsets = 0; /* will be initialized later by UC_Register... */
 
 /*
  *  Associate additional pieces of info with each of the charsets listed
@@ -2107,63 +2098,92 @@ PUBLIC int LYNumCharsets = 0; /* will be initialized later by UC_Register... */
  */
 PUBLIC LYUCcharset LYCharSet_UC[MAXCHARSETS]=
 {
-  {-1,"iso-8859-1",    UCT_ENC_8BIT,UCT_REP_IS_LAT1,UCT_CP_IS_LAT1,UCT_R_LAT1,
-                                                                   UCT_R_LAT1},
+  /*
+   *  Zero position placeholder and HTMLGetEntityUCValue() reference. - FM
+   */
+  {-1,"iso-8859-1",	UCT_ENC_8BIT,
+			UCT_REP_IS_LAT1,
+			UCT_CP_IS_LAT1,		UCT_R_LAT1,UCT_R_LAT1},
+  /*
+   *  Placeholder for Unicode table.
+   */
   {-1,"iso-8859-2",	UCT_ENC_8BIT,0,0,	UCT_R_LAT1,UCT_R_8859S},
+  /*
+   *  For unknown iso-8859-# charsets. - FM
+   */
   {-1,"x-iso-8859-other",UCT_ENC_8BIT,0,0,	UCT_R_LAT1,UCT_R_8859S},
-  {-1,"dec-mcs",	UCT_ENC_8BIT,0,0,	UCT_R_LAT1,UCT_R_8859S},
-  {-1,"cp437",		UCT_ENC_8BIT,0,0,	UCT_R_8BIT,UCT_R_ASCII},
-  {-1,"cp850",		UCT_ENC_8BIT,UCT_REP_SUPERSETOF_LAT1,0,
-                                                UCT_R_8BIT,UCT_R_ASCII},
+
+  /*
+   *  Placeholders for Unicode tables. - FM
+   */
+  {-1,"cp1252",		UCT_ENC_8BIT,
+			UCT_REP_SUPERSETOF_LAT1,
+			0,			UCT_R_8BIT,UCT_R_ASCII},
+  {-1,"dec-mcs",	UCT_ENC_8BIT,0,0,	UCT_R_8BIT,UCT_R_ASCII},
   {-1,"macintosh",	UCT_ENC_8BIT,0,0,	UCT_R_8BIT,UCT_R_ASCII},
   {-1,"x-next",		UCT_ENC_8BIT,0,0,	UCT_R_8BIT,UCT_R_ASCII},
   {-1,"koi8-r",		UCT_ENC_8BIT,0,0,	UCT_R_8BIT,UCT_R_ASCII},
+
   /*
    *  There is no strict correlation for the next five, since the tranfer
    *  charset gets decoded into Display Char Set by the CJK code (separate
-   *  from EXP_CHARTRANS mechanism).  For now, just put something there for
-   *  MIME charset name.
+   *  from Unicode mechanism).  For now we use the MIME name that describes
+   *  what is output to the terminal. - KW
    */
   {-1,"euc-cn",		UCT_ENC_CJK,0,0,	UCT_R_8BIT,UCT_R_ASCII},
   {-1,"euc-jp",		UCT_ENC_CJK,0,0,	UCT_R_8BIT,UCT_R_ASCII},
   {-1,"shift_jis",	UCT_ENC_CJK,0,0,	UCT_R_8BIT,UCT_R_ASCII},
   {-1,"euc-kr",		UCT_ENC_CJK,0,0,	UCT_R_8BIT,UCT_R_ASCII},
   {-1,"big5",		UCT_ENC_CJK,0,0,	UCT_R_8BIT,UCT_R_ASCII},
-  {-1,"us-ascii",	UCT_ENC_7BIT,UCT_REP_SUBSETOF_LAT1,
-                                     UCT_CP_SUBSETOF_LAT1,
-                                                UCT_R_ASCII,UCT_R_ASCII},
-  {-1,"x-transparent",	UCT_ENC_8BIT,0,0,	UCT_R_8BIT,UCT_R_ASCII}
-};
-#endif
 
-#if defined(USE_SLANG) || defined(EXP_CHARTRANS)
+  /*
+   *  Placeholders for Unicode tables. - FM
+   */
+  {-1,"viscii",		UCT_ENC_8BIT_C0,0,0,	UCT_R_8BIT,UCT_R_ASCII},
+  {-1,"us-ascii",	UCT_ENC_7BIT,
+			UCT_REP_SUBSETOF_LAT1,
+			UCT_CP_SUBSETOF_LAT1,	UCT_R_ASCII,UCT_R_ASCII},
+
+  /*
+   *  Placeholder for non-translation mode. - FM
+   */
+  {-1,"x-transparent",	UCT_ENC_8BIT,0,0,	UCT_R_8BIT,UCT_R_ASCII},
+
+  /*
+   *  Placeholders for Unicode tables.
+   */
+  {-1,"cp437",		UCT_ENC_8BIT,0,0,	UCT_R_8BIT,UCT_R_ASCII},
+  {-1,"cp850",		UCT_ENC_8BIT,
+			UCT_REP_SUPERSETOF_LAT1,
+			0,			UCT_R_8BIT,UCT_R_ASCII}
+};
 
 /*
  *  Add the code of the the lowest character with the high bit set
  *  that can be directly displayed.
- *  Used by SLANG and for EXP_CHARTRANS.
+ *  Used by SLANG and for character translation.
  *  The order of LYCharSets and LYlowest_eightbit MUST be the same.
  */
 PUBLIC int LYlowest_eightbit[MAXCHARSETS]={
-	160,	/* ISO Latin 1 */
+	160,	/* ISO Latin 1		*/
 	160,	/* ISO Latin 2 */
-	160,	/* Other ISO Latin */
-	160,	/* DEC Multinational */
-	128,	/* IBM PC character set */
-	128,	/* IBM PC codepage 850 */
-	128,	/* Macintosh (8 bit) */
-	128,	/* NeXT character set */
-	128,	/* KOI8-R character set */
-	128,	/* Chinese */
-	128,	/* Japanese (EUC) */
-	128,	/* Japanese (SJIS) */
-	128,	/* Korean */
-	128,	/* Taipei (Big5) */
+	160,	/* Other ISO Latin	*/
+	130,	/* WinLatin1 (cp1252)	*/
+	160,	/* DEC Multinational	*/
+	128,	/* Macintosh (8 bit)	*/
+	128,	/* NeXT character set	*/
+	128,	/* KOI8-R Cyrillic      */
+	128,	/* Chinese		*/
+	128,	/* Japanese (EUC)	*/
+	128,	/* Japanese (SJIS)	*/
+	128,	/* Korean		*/
+	128,	/* Taipei (Big5)	*/
+	128,	/* Vietnamese (VISCII)	*/
 	999,	/* 7 bit approximations */
-	128	/* Transparent  (???) */
+	128,	/* Transparent  (???)	*/
+	128,	/* DosLatinUS (cp437)	*/
+	128	/* DosLatin1 (cp850)	*/
 };
-#endif /* USE_SLANG || EXP_CHARTRANS */
-
 
 /* 
  *  The default character set.
@@ -2181,9 +2201,9 @@ PUBLIC int current_char_set = 0;		/* Index for tranaslation */
  */
 PUBLIC void HTMLSetCharacterHandling ARGS1(int,i)
 {
-#ifdef EXP_CHARTRANS
+    int chndl = -2;
     if (LYCharSet_UC[i].enc != UCT_ENC_CJK) {
-	int chndl = 0;
+	chndl = 0;
 
 	if (UCAssume_MIMEcharset)
 	    chndl = UCGetLYhndl_byMIME(UCAssume_MIMEcharset);
@@ -2211,9 +2231,9 @@ PUBLIC void HTMLSetCharacterHandling ARGS1(int,i)
 	}
 
 	HTPassHighCtrlNum = FALSE;
-    } else
-#endif /* EXP_CHARTRANS */
-    if (!strncmp(LYchar_set_names[i], "ISO Latin 1", 11)) {
+
+#ifdef NOTDEFINED
+    } else if (!strncmp(LYchar_set_names[i], "ISO Latin 1", 11)) {
 	HTCJK = NOCJK;
 	kanji_code = NOKANJI;
 	HTPassEightBitRaw = LYUseDefaultRawMode ? TRUE : FALSE;
@@ -2222,7 +2242,7 @@ PUBLIC void HTMLSetCharacterHandling ARGS1(int,i)
         HTPassHighCtrlRaw = FALSE;
 	HTPassHighCtrlNum = FALSE;
 
-    } else if (!strncmp(LYchar_set_names[i], "KOI8-R character set", 20)) {
+    } else if (!strncmp(LYchar_set_names[i], "KOI8-R Cyrillic", 15)) {
 	HTCJK = NOCJK;
 	kanji_code = NOKANJI;
 	HTPassEightBitRaw = LYUseDefaultRawMode ? FALSE : TRUE;
@@ -2230,6 +2250,7 @@ PUBLIC void HTMLSetCharacterHandling ARGS1(int,i)
 	HTPassEightBitNum = FALSE;
         HTPassHighCtrlRaw = TRUE;
 	HTPassHighCtrlNum = FALSE;
+#endif /* NOTDEFINED */
 
     } else if (!strncmp(LYchar_set_names[i], "Chinese", 7)) {
 	HTCJK = LYUseDefaultRawMode ? CHINESE : NOCJK;
@@ -2286,23 +2307,23 @@ PUBLIC void HTMLSetCharacterHandling ARGS1(int,i)
 	HTPassHighCtrlNum = FALSE;
     }
 
-#ifdef EXP_CHARTRANS
+    if (LYRawMode) {
+	UCLYhndl_for_unspec = i;
+    } else {
+	if (chndl == -2) {
+	    chndl = 0;
 
-	    if (LYRawMode) {
-		UCLYhndl_for_unspec = i;
-	    } else {
-		int chndl = 0;
-		if (UCAssume_MIMEcharset)
-		    chndl = UCGetLYhndl_byMIME(UCAssume_MIMEcharset);
-		if (chndl != i && chndl >= 0 &&
-		    (LYCharSet_UC[i].enc != UCT_ENC_CJK ||
-		     LYCharSet_UC[chndl].enc != UCT_ENC_CJK)) {
-		    UCLYhndl_for_unspec = chndl;
-		} else {
-		    UCLYhndl_for_unspec = 0;
-		}
-	    }
-#endif /* EXP_CHARTRANS */
+	    if (UCAssume_MIMEcharset)
+		chndl = UCGetLYhndl_byMIME(UCAssume_MIMEcharset);
+	}
+	if (chndl != i && chndl >= 0 &&
+	    (LYCharSet_UC[i].enc != UCT_ENC_CJK ||
+	     LYCharSet_UC[chndl].enc != UCT_ENC_CJK)) {
+	    UCLYhndl_for_unspec = chndl;
+	} else {
+	    UCLYhndl_for_unspec = 0;
+	}
+    }
 
 #ifdef USE_SLANG
     if (LYlowest_eightbit[i] > 191) {
@@ -2344,20 +2365,20 @@ PUBLIC void HTMLSetRawModeDefault ARGS1(int,i)
  *  based on the selected character set and the
  *  current LYRawMode value. - FM
  */
-PUBLIC void HTMLSetUseDefaultRawMode ARGS2(int,i, BOOLEAN,modeflag)
+PUBLIC void HTMLSetUseDefaultRawMode ARGS2(
+	int,		i,
+	BOOLEAN,	modeflag)
 {
-#ifdef EXP_CHARTRANS
     if (LYCharSet_UC[i].enc != UCT_ENC_CJK) {
 	int chndl = 0;
+
 	if (UCAssume_MIMEcharset)
 	    chndl = UCGetLYhndl_byMIME(UCAssume_MIMEcharset);
 	if (i == chndl)
 	    LYUseDefaultRawMode = modeflag;
 	else
 	    LYUseDefaultRawMode = (!modeflag);
-    } else
-#endif /* EXP_CHARTRANS */
-    if (!strncmp(LYchar_set_names[i], "ISO Latin 1", 11) ||
+    } else if (!strncmp(LYchar_set_names[i], "ISO Latin 1", 11) ||
 	       !strncmp(LYchar_set_names[i], "Chinese", 7) ||
 	       !strncmp(LYchar_set_names[i], "Japanese (EUC)", 14) ||
 	       !strncmp(LYchar_set_names[i], "Japanese (SJIS)", 15) ||
@@ -2403,7 +2424,7 @@ PUBLIC void HTMLSetHaveCJKCharacterSet ARGS1(int,i)
  *   Must be in order of ascending value.
  */
 PUBLIC CONST char * LYEntityNames[] = {
-/*	 NAME	 DECIMAL VALUE */
+/*	 NAME		   DECIMAL VALUE */
 	"nbsp",		/* 160,	non breaking space */
 	"iexcl",	/* 161,	inverted exclamation mark */
 	"cent",		/* 162,	cent sign */
@@ -2506,9 +2527,109 @@ PUBLIC CONST char * LYEntityNames[] = {
  *  Function to return the entity names of
  *  ISO-8859-1 8-bit characters. - FM
  */
-PUBLIC CONST char * HTMLGetEntityName ARGS1(int,i)
+PUBLIC CONST char * HTMLGetEntityName ARGS1(
+	int,		i)
+{
+#define IntValue i
+    int MaxValue = ((sizeof(LYEntityNames)/sizeof(char **)) - 1);
+
+    if (IntValue < 0 || IntValue > MaxValue) {
+	return "";
+    }
+
+    return LYEntityNames[IntValue];
+}
+
+/*
+ *  Function to return the UCode_t (long int) value for entity names
+ *  in the ISO_Latin1 and UC_entity_info extra_entities arrays.  It
+ *  returns 0 if not found. - FM
+ */
+PUBLIC UCode_t HTMLGetEntityUCValue ARGS1(
+	CONST char *,	name)
 {
-     return LYEntityNames[i];
+    UCode_t value = 0;
+    int i, high, low, diff = 0;
+    CONST char ** entities = HTML_dtd.entity_names;
+    CONST UC_entity_info * extra_entities = HTML_dtd.extra_entity_info;
+
+    /*
+     *  Make sure we have a non-zero length name. - FM
+     */
+    if (!(name && *name))
+	return(value);
+
+    /*
+     *  Handle names that have control characters
+     *  or strings in ISO_Latin1[]. - FM
+     */
+    if (!strcmp(name, "nbsp")) {
+	return(160);
+    }
+    if (!strcmp(name, "shy")) {
+	return(173);
+    }
+    if (!strcmp(name, "ensp")) {
+	return(8194);
+    }
+    if (!strcmp(name, "emsp")) {
+	return(8195);
+    }
+    if (!strcmp(name, "thinsp")) {
+	return(8201);
+    }
+    if (!strcmp(name, "ndash") ||
+	!strcmp(name, "endash")) {
+	return(8211);
+    }
+    if (!strcmp(name, "mdash") ||
+	!strcmp(name, "emdash")) {
+	return(8212);
+    }
+    if (!strcmp(name, "trade")) {
+	return(8482);
+    }
+
+    /*
+     *  Now try ISO_Latin1[]. - FM
+     */
+    for (low = 0, high = HTML_dtd.number_of_entities;
+	 high > low;
+	 diff < 0 ? (low = i+1) : (high = i)) {
+	/*
+	**  Binary search.
+	*/
+	i = (low + (high-low)/2);
+	diff = strcmp(entities[i], name);
+	if (diff == 0) {
+	    if (strlen(ISO_Latin1[i]) == 1) {
+		value = (unsigned char)(ISO_Latin1[i][0]);
+	    }
+	    break;
+	}
+    }
+    if (value > 0) {
+	return(value);
+    }
+
+    /*
+     *  Not yet found, so try UC_entity_info extra_entities[]. - FM
+     */
+    for (low = 0, high = HTML_dtd.number_of_extra_entities;
+	 high > low;
+	 diff < 0 ? (low = i+1) : (high = i)) {
+	/*
+	**  Binary search.
+	*/
+	i = (low + (high-low)/2);
+	diff = strcmp(extra_entities[i].name, name);
+	if (diff == 0) {
+	    value = extra_entities[i].code;
+	    break;
+	}
+    }
+
+    return(value);
 }
 
 /*
@@ -2519,7 +2640,7 @@ PUBLIC CONST char * HTMLGetEntityName ARGS1(int,i)
  *
  *  Return '\0' to signal that there isn't a one-character
  *  equivalent.  Caller must check! and do whatever additional
- *  processing it wants to do instead.  - kw
+ *  processing it wants to do instead.  - KW
  */
 PUBLIC char HTMLGetLatinOneValue ARGS1(int,i)
 {
@@ -2575,10 +2696,11 @@ PUBLIC int LYCharSetsDeclared NOPARAMS
     UCInit();
     status = UCInitialized;
     
-    if (UCAssume_MIMEcharset && *UCAssume_MIMEcharset)
+    if (UCAssume_MIMEcharset && *UCAssume_MIMEcharset) {
 	UCLYhndl_for_unspec = UCGetLYhndl_byMIME(UCAssume_MIMEcharset);
-    else
+    } else {
 	UCLYhndl_for_unspec = 0;
+    }
     if (UCAssume_localMIMEcharset && *UCAssume_localMIMEcharset)
 	UCLYhndl_HTFile_for_unspec =
 	    UCGetLYhndl_byMIME(UCAssume_localMIMEcharset);
diff --git a/src/LYCharSets.h b/src/LYCharSets.h
index ca53bb79..bd873fb7 100644
--- a/src/LYCharSets.h
+++ b/src/LYCharSets.h
@@ -2,7 +2,13 @@
 #ifndef LYCHARSETS_H
 #define LYCHARSETS_H
 
-/* LYchar_set_name[current_char_set] points to the currently active set */
+#ifndef UCMAP_H
+#include "UCMap.h"
+#endif /* !UCMAP_H */
+
+/*
+ *  LYchar_set_name[current_char_set] points to the currently active set.
+ */
 extern int current_char_set;
 extern CONST char * LYchar_set_names[];
 
@@ -28,6 +34,7 @@ extern void HTMLSetUseDefaultRawMode PARAMS((int i, BOOLEAN modeflag));
 extern void HTMLSetHaveCJKCharacterSet PARAMS((int i));
 extern CONST char * LYEntityNames[];
 extern CONST char * HTMLGetEntityName PARAMS((int i));
+extern UCode_t HTMLGetEntityUCValue PARAMS((CONST char *name));
 extern char HTMLGetLatinOneValue PARAMS((int i));
 extern void HTMLUseCharacterSet PARAMS((int i));
 
diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c
index e41a9047..8b72ffac 100644
--- a/src/LYCharUtils.c
+++ b/src/LYCharUtils.c
@@ -1032,7 +1032,7 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
     char * cp = 0;
     char cpe = 0;
     char *esc = NULL;
-    char replace_buf[64];
+    char replace_buf [64];
     int uck;
     int lowest_8;
     UCode_t code = 0;
@@ -1042,15 +1042,15 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
     int high, low, diff = 0, i;
     CONST char ** entities = HTML_dtd.entity_names;
     CONST UC_entity_info * extra_entities = HTML_dtd.extra_entity_info;
-    CONST char * name = 0;
+    CONST char * name = NULL;
     BOOLEAN no_bytetrans;
     UCTransParams T;
     BOOL from_is_utf8 = FALSE;
     char * puni;
     enum _state
         { S_text, S_esc, S_dollar, S_paren, S_nonascii_text, S_dollar_paren,
-	S_trans_byte, S_check_ent, S_ncr, S_check_uni, S_check_name, S_named,
-	S_recover,
+	S_trans_byte, S_check_ent, S_ncr, S_check_uni, S_named, S_check_name,
+	S_check_name_trad, S_recover,
 	S_got_oututf8, S_got_outstring, S_put_urlstring,
 	S_got_outchar, S_put_urlchar, S_next_char, S_done} state = S_text;
     enum _parsing_what
@@ -1261,11 +1261,11 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 	case S_trans_byte:
 	    /*  character translation goes here  */
 	    /*
-    **  Don't do anything if we have no string,
-    **  or if original AND target character sets
-    **  are both iso-8859-1,
-    **  or if we are in CJK mode.
-    */
+	    **  Don't do anything if we have no string,
+	    **  or if original AND target character sets
+	    **  are both iso-8859-1,
+	    **  or if we are in CJK mode.
+	    */
 	    if (*p == '\0' || no_bytetrans) {
 		state = S_got_outchar;
 		break;
@@ -1370,7 +1370,7 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 		**  Check for a numeric entity. - FM
 		*/
 		if (*pp == '#' && len > 2 &&
-		    (unsigned char)*(pp+1) == 'x' &&
+		    (*(pp+1) == 'x' || *(pp+1) == 'X') &&
 		    (unsigned char)*(pp+2) < 127 && 
 		    isxdigit((unsigned char)*(pp+2))) {
 		    what = P_hex;
@@ -1596,6 +1596,21 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 		    }
 		    break;
 		    /*
+		    **  Ignore 8204 (zwnj), 8205 (zwj)
+		    **  8206 (lrm), and 8207 (rlm),
+		    **  for now, if we got this far without
+		    **  finding a representation for them.
+		    */
+		} else if (code == 8204 || code == 8205 ||
+			   code == 8206 || code == 8207) {
+		    if (TRACE) {
+			fprintf(stderr,
+				"LYUCFullyTranslateString: Ignoring '%ld'.\n", code);
+		    }
+		    replace_buf[0] = '\0';
+		    state = S_got_outstring;
+		    break;
+		    /*
 		    **  Show the numeric entity if the value:
 		    **  (1) Is greater than 255 and unhandled Unicode.
 		    */
@@ -1635,7 +1650,7 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 		    } else {
 			name = HTMLGetEntityName(code - 160);
 		    }
-		    state = S_check_name;
+		    state = S_check_name_trad;
 		    break;
 		}
 		
@@ -1689,7 +1704,11 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 	    state = S_check_name;
 	    break;
 
-	case S_check_name:
+	case S_check_name_trad:
+	    /*
+	     *  Check for an entity name in the traditional (LYCharSets.c)
+	     *  table.
+	     */
 	    for (low = 0, high = HTML_dtd.number_of_entities;
 		 high > low;
 		 diff < 0 ? (low = i+1) : (high = i)) {
@@ -1704,53 +1723,6 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 			    LYCharSets[cs_to][i] : LYCharSets[0][i],
 			    sizeof(replace_buf));
 		    replace_buf[sizeof(replace_buf) - 1] = '\0';
-		    if (hidden) {
-			/*
-			**  If it's hidden, use 160 for nbsp. - FM
-			*/
-			if (!strcmp("nbsp", entities[i]) ||
-			    (replace_buf[1] == '\0' &&
-			     replace_buf[0] == HT_NON_BREAK_SPACE)) {
-			    replace_buf[0] = 160;
-			    replace_buf[1] = '\0';
-			    state = S_got_outstring;
-			    break;
-			    /*
-			    **  If it's hidden, use 173 for shy. - FM
-			    */
-			} else if (!strcmp("shy", entities[i]) ||
-				   (replace_buf[1] == '\0' &&
-				    replace_buf[0] == LY_SOFT_HYPHEN)) {
-			    replace_buf[0] = 173;
-			    replace_buf[1] = '\0';
-			    state = S_got_outstring;
-			    break;
-			}
-			/*
-			**  Check whether we want a plain space for nbsp,
-			**  ensp, emsp or thinsp. - FM
-			*/
-		    } else if (plain_space) {
-			if (!strcmp("nbsp", entities[i]) ||
-			    !strcmp("emsp", entities[i]) ||
-			    !strcmp("ensp", entities[i]) ||
-			    !strcmp("thinsp", entities[i]) ||
-			    (replace_buf[1] == '\0' &&
-			     replace_buf[0] == HT_EM_SPACE)) {
-			    code = ' ';
-			    state = S_got_outchar;
-			    break;
-			    /*
-			    **  If plain_space is set, ignore shy. - FM
-			    */
-			} else if (!strcmp("shy", entities[i]) ||
-				   (replace_buf[1] == '\0' &&
-				    replace_buf[0] == LY_SOFT_HYPHEN)) {
-			    replace_buf[0] = '\0';
-			    state = S_got_outstring;
-			    break;
-			}
-		    }
 		    /*
 		    **  Found the entity.  If the length
 		    **  of the value exceeds the length of
@@ -1765,19 +1737,65 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 	    }
 	    /*
 	    **  Entity name lookup failed (diff != 0).
-	    **  No point in repeating for extra entities. - kw
+	    **  Recover and continue.
 	    */
-	    if (what != P_named) {
+	    state = S_recover;
+	    break;
+
+	case S_check_name:
+	    /*
+	     *  Check for a name that was really given as a named
+	     *  entity. - kw
+	     */
+	    if (hidden) {
 		/*
-		**  Didn't find the entity.
-		**  Recover the "&#" and continue
-		**  from there. - FM
+		**  If it's hidden, use 160 for nbsp. - FM
 		*/
-		state = S_recover;
-		break;
+		if (!strcmp("nbsp", name) ||
+		    (replace_buf[1] == '\0' &&
+		     replace_buf[0] == HT_NON_BREAK_SPACE)) {
+		    replace_buf[0] = 160;
+		    replace_buf[1] = '\0';
+		    state = S_got_outstring;
+		    break;
+		    /*
+		    **  If it's hidden, use 173 for shy. - FM
+		    */
+		} else if (!strcmp("shy", name) ||
+			   (replace_buf[1] == '\0' &&
+			    replace_buf[0] == LY_SOFT_HYPHEN)) {
+		    replace_buf[0] = 173;
+		    replace_buf[1] = '\0';
+		    state = S_got_outstring;
+		    break;
+		}
+		/*
+		**  Check whether we want a plain space for nbsp,
+		**  ensp, emsp or thinsp. - FM
+		*/
+	    } else if (plain_space) {
+		if (!strcmp("nbsp", name) ||
+		    !strcmp("emsp", name) ||
+		    !strcmp("ensp", name) ||
+		    !strcmp("thinsp", name) ||
+		    (replace_buf[1] == '\0' &&
+		     replace_buf[0] == HT_EM_SPACE)) {
+		    code = ' ';
+		    state = S_got_outchar;
+		    break;
+		    /*
+		    **  If plain_space is set, ignore shy. - FM
+		    */
+		} else if (!strcmp("shy", name) ||
+			   (replace_buf[1] == '\0' &&
+			    replace_buf[0] == LY_SOFT_HYPHEN)) {
+		    replace_buf[0] = '\0';
+		    state = S_got_outstring;
+		    break;
+		}
 	    }
 	    /*
-	    **  Not found, repeat for extra entities. - FM
+	    **  Not recognized specially, look up in extra entities table.
 	    */
 	    for (low = 0, high = HTML_dtd.number_of_extra_entities;
 		 high > low;
@@ -1802,11 +1820,21 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 	    }
 	    if (diff == 0)
 		break;
+
+	    /*
+	    **  Seek the Unicode value for the entity.
+	    **  This could possibly replace all the rest of
+	    **  `case S_check_name'. - kw
+	    */
+	    if ((code = HTMLGetEntityUCValue(name)) > 0) {
+		state = S_check_uni;
+		break;
+	    }
 	    /*
 	    **  Didn't find the entity.
-	    **  Recover.
+	    **  Check the traditional tables.
 	    */
-	    state = S_recover;
+	    state = S_check_name_trad;
 	    break;
 
 				/* * * O U T P U T   S T A T E S * * */
@@ -2003,7 +2031,7 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 	    **  Check for a numeric entity. - FM
 	    */
 	    if (*p == '#' && len > 2 &&
-	        (unsigned char)*(p+1) == 'x' &&
+	        TOLOWER((unsigned char)*(p+1)) == 'x' &&
 		(unsigned char)*(p+2) < 127 && 
 		isxdigit((unsigned char)*(p+2))) {
 		isHex = TRUE;
@@ -2302,7 +2330,6 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 		    **  the character as a named entity. - FM
 		    */
 		} else {
-		    CONST char * name;
 		    if (code == 8482) {
 			/*
 			**  Trade mark sign falls through to here. - KW
@@ -2322,11 +2349,7 @@ PRIVATE char ** LYUCFullyTranslateString_1 ARGS9(
 			diff = strcmp(entities[i], name);
 			if (diff == 0) {
 			    /*
-			    **  Found the entity.  Assume that the length
-			    **  of the value does not exceed the length of
-			    **  the raw entity, so that the overall string
-			    **  does not need to grow.  Make sure this stays
-			    **  true in the LYCharSets arrays. - FM
+			    **  Found the entity.
 			    */
 			    int j;
 			    for (j = 0; p_entity_values[i][j]; j++)
@@ -3361,16 +3384,6 @@ PUBLIC void LYHandleMETA ARGS4(
 	    *cp4 = '\0';
 	    cp4 = cp3;
 	    chndl = UCGetLYhndl_byMIME(cp3);
-	    if (chndl < 0) {
-		if (!strcmp(cp4, "cn-big5")) {
-		    cp4 += 3;
-		    chndl = UCGetLYhndl_byMIME(cp4);
-		} else if (!strncmp(cp4, "cn-gb", 5)) {
-		    StrAllocCopy(cp3, "gb2312");
-		    cp4 = cp3;
-		    chndl = UCGetLYhndl_byMIME(cp4);
-		}
-	    }
 	    if (UCCanTranslateFromTo(chndl, current_char_set)) {
 		chartrans_ok = YES;
 		StrAllocCopy(me->node_anchor->charset, cp4);
@@ -3482,7 +3495,7 @@ PUBLIC void LYHandleMETA ARGS4(
 
 	    } else if (!strncmp(cp1, "koi8-r", 6) &&
 		       !strncmp(LYchar_set_names[current_char_set],
-				"KOI8-R character set", 20)) {
+				"KOI8-R Cyrillic", 15)) {
 		StrAllocCopy(me->node_anchor->charset, "koi8-r");
 		HTPassEightBitRaw = TRUE;
 
@@ -3884,9 +3897,14 @@ PUBLIC void LYHandleSELECT ARGS5(
 	    }
 
 	    /*
-	     *  Too likely to cause a crash, so we'll ignore it. - FM
-	     */
+	     *  We should have covered all crash possibilities with the
+	     *  current TagSoup parser, so we'll allow it because some
+	     *  people with other browsers use SELECT for "information"
+	     *  popups, outside of FORM blocks, though no Lynx user
+	     *  would do anything that awful, right? - FM
+	     *//***
 	    return;
+		***/
 	}
 
 	/*
@@ -4051,9 +4069,11 @@ PUBLIC void LYHandleSELECT ARGS5(
 	    /*
 	     *  Add end option character.
 	     */
-	    HText_appendCharacter(me->text, ']');
-	    HText_setLastChar(me->text, ']');
-	    me->in_word = YES;
+	    if (!me->first_option) {
+		HText_appendCharacter(me->text, ']');
+		HText_setLastChar(me->text, ']');
+		me->in_word = YES;
+	    }
 	    HText_setIgnoreExcess(me->text, FALSE); 
 	}
     	HTChunkClear(&me->option);
diff --git a/src/LYCurses.c b/src/LYCurses.c
index b4738a0f..23daf95a 100644
--- a/src/LYCurses.c
+++ b/src/LYCurses.c
@@ -7,9 +7,8 @@
 #include "LYSignal.h"
 #include "LYClean.h"
 #include "LYStrings.h"
-#ifdef USE_SLANG
 #include "LYCharSets.h"
-#endif /* USE_SLANG */
+#include "UCAux.h"
 
 #include "LYexit.h"
 #include "LYLeaks.h"
@@ -67,10 +66,12 @@ PUBLIC int PHYSICAL_SLtt_Screen_Cols = 10;
 PUBLIC void LY_SLrefresh NOARGS
 {
     if (FullRefresh) {
-	SLsmg_touch_lines(0, LYlines);
+	SLsmg_suspend_smg();
+	SLsmg_resume_smg();
 	FullRefresh = FALSE;
+    } else {
+	SLsmg_refresh();
     }
-    SLsmg_refresh();
 
     return;
 }
@@ -171,6 +172,82 @@ PRIVATE void sl_suspend ARGS1(
 #endif /* SIGSTOP */
    return;
 }
+
+#else  /* Not slang: */
+
+#ifdef VMS
+/*
+**  This function boxes windows with graphic characters for
+**  VMS curses.  Pass it the window, it's height, and it's
+**  width. - FM
+*/
+PUBLIC void VMSbox ARGS3(
+	WINDOW *,	win,
+	int,		height,
+	int,		width)
+{
+    int i;
+
+    wmove(win, 0, 0);
+    waddstr(win, "\033)0\016l");
+    for (i = 1; i < width; i++)
+       waddch(win, 'q');
+    waddch(win, 'k');
+    for (i = 1; i < height-1; i++) {
+        wmove(win, i, 0);
+	waddch(win, 'x');
+        wmove(win, i, width-1);
+	waddch(win, 'x');
+    }
+    wmove(win, i, 0);
+    waddch(win, 'm');
+    for (i = 1; i < width; i++)
+       waddch(win, 'q');
+    waddstr(win, "j\017");
+}
+#else
+/*
+**  This function boxes windows for non-VMS (n)curses.
+**  Pass it the window. - FM
+*/
+PUBLIC void LYbox ARGS2(
+	WINDOW *,	win,
+	BOOLEAN,	formfield)
+{
+    /*
+     *  If the terminal is in UTF-8 mode, it probably cannot understand
+     *  box drawing characters as (n)curses handles them.  (This may also
+     *  be true for other display character sets, but isn't currently
+     *  checked.)  In that case, substitute ASCII characters for BOXVERT
+     *  and BOXHORI if they were defined to 0 for automatic use of box
+     *  drawing characters.  They'll stay as they are otherwise. - KW & FM
+     */
+    int boxvert, boxhori;
+
+    UCSetBoxChars(current_char_set, &boxvert, &boxhori, BOXVERT, BOXHORI);
+#ifdef CSS
+    if (formfield)
+	wcurses_css(win, "frame", ABS_ON);
+#endif
+    /*
+     *  If we don't have explicitly specified characters for either
+     *  vertical or horizontal lines, the characters that box() would
+     *  use for the corners probably also won't work well.  So we
+     *  specifiy our own ASCII characters for the corners and call
+     *  wborder() instead of box(). - kw
+     */
+    if (!boxvert || !boxhori)
+	box(win, boxvert, boxhori);
+    else if (boxvert == '*' || boxhori == '*')
+	wborder(win, boxvert, boxvert, boxhori, boxhori, '*', '*', '*', '*');
+    else
+	wborder(win, boxvert, boxvert, boxhori, boxhori, '/', '\\', '\\', '/');
+#ifdef CSS
+    if (formfield)
+	wcurses_css(win, "frame", ABS_OFF);
+#endif
+}
+#endif /* VMS */
 #endif /* USE_SLANG */
 
 #if defined(USE_COLOR_STYLE)
@@ -912,6 +989,27 @@ PUBLIC BOOLEAN setup ARGS1(
 {
     static char term_putenv[120];
     char buffer[120];
+#if !defined(NO_SIZECHANGEHACK)
+#if defined(HAVE_SIZECHANGE) && !defined(USE_SLANG)
+/*
+ *  Hack to deal with a problem in sysV curses, that screen can't be
+ *  resized to greater than the size used by initscr, which can only
+ *  be called once.  So set environment variables LINES and COLUMNS
+ *  to some suitably large size to force initscr to allocate enough
+ *  space.  Later we get the real window size for setting LYlines
+ *  and LYcols. - AJL & FM
+ */
+    char *lines_putenv = NULL;
+    char *cols_putenv = NULL;
+
+    if (getenv("LINES") == NULL && getenv("COLUMNS") == NULL) {
+	StrAllocCopy(lines_putenv, "LINES=120");
+	(void) putenv(lines_putenv);
+	StrAllocCopy(cols_putenv, "COLUMNS=240");
+	(void) putenv(cols_putenv);
+    }
+#endif /* !NO_SIZECHANGE && !USE_SLANG */
+#endif /* !NO_SIZECHANGEHACK */
 
    /*
     *  If the display was not set by a command line option then
@@ -958,8 +1056,26 @@ PUBLIC BOOLEAN setup ARGS1(
     }
 #endif /* HAVE_TTYTYPE */
 
+#if defined(HAVE_SIZECHANGE) && !defined(USE_SLANG) && !defined(NO_SIZECHANGEHACK)
+    if (lines_putenv != NULL) {
+	/*
+	 *  Use SIGWINCH handler to set the true window size. - AJL && FM
+	 */
+	size_change(0);
+	lines_putenv[6] = '\0';
+	(void) putenv(lines_putenv);
+	cols_putenv[8] = '\0';
+	(void) putenv(cols_putenv);
+	FREE(lines_putenv);
+	FREE(cols_putenv);
+    } else {
+        LYlines = LINES;
+        LYcols = COLS;
+    }
+#else
     LYlines = LINES;
     LYcols = COLS;
+#endif /* !NO_SIZECHANGE && !USE_SLANG && !NO_SIZECHANGEHACK */
     if (LYlines <= 0)
 	LYlines = 24;
     if (LYcols <= 0)
@@ -1522,37 +1638,6 @@ PUBLIC int DCLsystem ARGS1(
       */
      return(status);
 }
-
-#ifndef USE_SLANG
-/*
-**  This function boxes windows with graphic characters for curses.
-**  Pass it the window, it's height, and it's width. - FM
-*/
-PUBLIC void VMSbox ARGS3(
-	WINDOW *,	win,
-	int,		height,
-	int,		width)
-{
-    int i;
-
-    wmove(win, 0, 0);
-    waddstr(win, "\033)0\016l");
-    for (i = 1; i < width; i++)
-       waddch(win, 'q');
-    waddch(win, 'k');
-    for (i = 1; i < height-1; i++) {
-	wmove(win, i, 0);
-	waddch(win, 'x');
-	wmove(win, i, width-1);
-	waddch(win, 'x');
-    }
-    wmove(win, i, 0);
-    waddch(win, 'm');
-    for (i = 1; i < width; i++)
-       waddch(win, 'q');
-    waddstr(win, "j\017");
-}
-#endif /* !USE_SLANG */
 #endif /* VMS */
 
 PUBLIC void lynx_force_repaint NOARGS
diff --git a/src/LYCurses.h b/src/LYCurses.h
index 89d64c5e..7247b7e5 100644
--- a/src/LYCurses.h
+++ b/src/LYCurses.h
@@ -24,6 +24,9 @@
 #if defined(UNIX) && !defined(unix)
 #define unix
 #endif /* UNIX && !unix */
+#ifdef va_start
+#undef va_start	 /* not used, undef to avoid warnings on some systems */
+#endif /* va_start */
 #include <slang.h>
 
 #else /* Using curses: */
@@ -74,6 +77,11 @@ extern void LYsubwindow PARAMS((WINDOW * param));
 # endif /* VMS && __GNUC__ */
 #endif /* HAVE_CONFIG_H */
 
+#ifdef VMS
+extern void VMSbox PARAMS((WINDOW *win, int height, int width));
+#else
+extern void LYbox PARAMS((WINDOW *win, BOOLEAN formfield));
+#endif /* VMS */
 #endif /* USE_SLANG */
 
 
@@ -120,9 +128,6 @@ extern int ttopen();
 extern int ttclose();
 extern int ttgetc();
 extern void *VMSsignal PARAMS((int sig, void (*func)()));
-#ifndef USE_SLANG
-extern void VMSbox PARAMS((WINDOW *win, int height, int width));
-#endif /* !USE_SLANG */
 #endif /* VMS */
 
 #if defined(USE_COLOR_STYLE)
diff --git a/src/LYEditmap.c b/src/LYEditmap.c
index 4cba958a..cf42ddd2 100644
--- a/src/LYEditmap.c
+++ b/src/LYEditmap.c
@@ -28,7 +28,7 @@ LYE_NOP,        LYE_ENTER,      LYE_FORWW,      LYE_ABORT,
 LYE_BACKW,      LYE_NOP,        LYE_DELN,       LYE_NOP,
 /* ^P           XON             ^R              XOFF    */
 
-LYE_UPPER,      LYE_ERASE,      LYE_NOP,        LYE_NOP,
+LYE_UPPER,      LYE_ERASE,      LYE_LINKN,      LYE_NOP,
 /* ^T           ^U              ^V              ^W      */
 
 LYE_ERASE,      LYE_NOP,        LYE_NOP,        LYE_NOP,
diff --git a/src/LYForms.c b/src/LYForms.c
index d9dee701..df0b3b1c 100644
--- a/src/LYForms.c
+++ b/src/LYForms.c
@@ -119,14 +119,14 @@ PUBLIC int change_form_link ARGS6(
 		form->value_cs = opt_ptr->value_cs;
 	    }
 #if defined(FANCY_CURSES) || defined(USE_SLANG)
-            if (!enable_scrollback)
+	    if (!enable_scrollback)
 #if defined(VMS) && !defined(USE_SLANG)
-                if (form->num_value == OrigNumValue)
-                    c = DO_NOTHING;
-                else
+		if (form->num_value == OrigNumValue)
+		    c = DO_NOTHING;
+		else
 #endif /* VMS && !USE_SLANG*/
 		c = 23;	 /* CTRL-W refresh without clearok */
-            else
+	    else
 #endif /* FANCY_CURSES || USE_SLANG */
                 c = 12;  /* CTRL-L for repaint */
             break;
@@ -358,6 +358,12 @@ again:
 	action = EditBinding(ch);
 	if (action == LYE_ENTER)
 	    break;
+	if (action == LYE_LINKN) {
+	    if ((ch = LYReverseKeymap(LYK_F_LINK_NUM)) <= 0) {
+		ch = DO_NOTHING;
+	    }
+	    break;
+	}
 	if (action == LYE_AIX &&
 	    (HTCJK == NOCJK && LYlowest_eightbit[current_char_set] > 0x97))
 	    break;
@@ -369,7 +375,7 @@ again:
 	    return(DO_NOTHING);
 	}
 	if (keymap[ch + 1] == LYK_REFRESH)
-	    goto breakfor;
+	    break;
 	switch (ch) {
 	    case DNARROW:
 	    case UPARROW:
@@ -749,17 +755,7 @@ redraw:
 #ifdef VMS
     VMSbox(form_window, (bottom - top), (width + 4));
 #else
-    {
-	int boxvert, boxhori;
-	UCSetBoxChars(current_char_set, &boxvert, &boxhori, BOXVERT, BOXHORI);
-#ifdef CSS
-	wcurses_css(form_window, "frame", ABS_ON);
-	box(form_window, boxvert, boxhori);
-	wcurses_css(form_window, "frame", ABS_OFF);
-#else
-	box(form_window, boxvert, boxhori);
-#endif
-    }
+    LYbox(form_window, TRUE);
 #endif /* VMS */
     wrefresh(form_window);
 #endif /* USE_SLANG */
diff --git a/src/LYKeymap.c b/src/LYKeymap.c
index 1ceef654..14b80ef1 100644
--- a/src/LYKeymap.c
+++ b/src/LYKeymap.c
@@ -761,7 +761,8 @@ PUBLIC void reset_numbers_as_arrows NOARGS
     did_number_keys = FALSE;
 }
 
-PUBLIC char *key_for_func ARGS1 (int,func)
+PUBLIC char *key_for_func ARGS1 (
+	int,		func)
 {
 	static char buf[512];
 	size_t i;
@@ -779,16 +780,34 @@ PUBLIC char *key_for_func ARGS1 (int,func)
 
 /*
  *  This function returns TRUE if the ch is non-alphanumeric
- *  and maps to keyname (LYK_foo in the keymap[] array). - FM
+ *  and maps to key_name (LYK_foo in the keymap[] array). - FM
  */ 
 PUBLIC BOOL LYisNonAlnumKeyname ARGS2(
 	int,	ch,
-	int,	keyname)
+	int,	key_name)
 {
     if ((ch >= '0' && ch <= '9') ||
         (ch >= 'A' && ch <= 'z') ||
 	ch < 0 || ch > 269)
 	return (FALSE);
 
-    return(keymap[ch+1] == keyname);
+    return(keymap[ch+1] == key_name);
+}
+
+/*
+ *  This function returns the (int)ch mapped to the
+ *  LYK_foo value passed to it as an argument. - FM
+ */
+PUBLIC int LYReverseKeymap ARGS1(
+	int,		key_name)
+{
+    int i;
+
+    for (i = 1; i < sizeof(keymap); i++) {
+	if (keymap[i] == key_name) {
+	    return(i - 1);
+	}
+    }
+
+    return(0);
 }
diff --git a/src/LYKeymap.h b/src/LYKeymap.h
index a426d2ba..133e1f2f 100644
--- a/src/LYKeymap.h
+++ b/src/LYKeymap.h
@@ -11,7 +11,8 @@ extern void set_numbers_as_arrows NOPARAMS;
 extern void reset_numbers_as_arrows NOPARAMS;
 extern void print_keymap PARAMS((char **newfile));
 extern char *key_for_func PARAMS((int func));
-extern BOOLEAN LYisNonAlnumKeyname PARAMS((int ch, int Keyname));
+extern BOOLEAN LYisNonAlnumKeyname PARAMS((int ch, int key_name));
+extern int LYReverseKeymap PARAMS((int key_name));
 
 extern char keymap[]; /* main keymap matrix */
 
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index 11020387..d73b9a22 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -175,6 +175,7 @@ int mainloop NOARGS
     BOOLEAN FirstURLRecall = TRUE;
     char *temp = NULL;
     BOOLEAN ForcePush = FALSE;
+    BOOLEAN override_LYresubmit_posts = FALSE;
     unsigned int len;
     int i;
 
@@ -332,10 +333,7 @@ try_again:
 		} else if (!newdoc.address) {
 		    /*
 		     *  If newdoc.address is empty then pop a file
-		     *  and load it.  Force a no_cache override unless
-		     *  it's a bookmark file, or it has POST content
-		     *  and LYresubmit_posts is set without safe also
-		     *  set.
+		     *  and load it.  - FM
 		     */
                     LYpop(&newdoc);
 		    popped_doc = TRUE;
@@ -366,15 +364,27 @@ try_again:
 			try_internal = TRUE;
 		    } else
 #endif /* TRACK_INTERNAL_LINKS */
+			/*
+			 * Force a no_cache override unless
+			 *  it's a bookmark file, or it has POST content
+			 *  and LYresubmit_posts is set without safe also
+			 *  set, and we are not going to another position
+		     	 *  in the current document or restoring the previous
+			 *  document due to a NOT_FOUND or NULLFILE return
+			 *  value from getfile(). - FM
+			 */
 			if ((newdoc.bookmark != NULL) ||
-			(newdoc.post_data != NULL && !newdoc.safe &&
+			(newdoc.post_data != NULL &&
+			 !newdoc.safe &&
 			 LYresubmit_posts &&
+			 !override_LYresubmit_posts &&
 			    NO_INTERNAL_OR_DIFFERENT(&curdoc, &newdoc))) {
 		        LYoverride_no_cache = FALSE;
 		    } else {
 		        LYoverride_no_cache = TRUE;
 		    }
 		}
+		override_LYresubmit_posts = FALSE;
 
 		if (HEAD_request) {
 		    /*
@@ -709,6 +719,10 @@ try_again:
 		    */
 		   if (history[nhist - 1].post_data &&
 		       !history[nhist - 1].safe) {
+		       if (HText_POSTReplyLoaded((document *)&history[(nhist - 1)])) {
+			   override_LYresubmit_posts = TRUE;
+			   goto try_again;
+		       }
                        /*  Set newdoc fields, just in case the PREV_DOC
                         *  gets cancelled. - kw */
 		       if (!curdoc.address) {
@@ -740,6 +754,7 @@ try_again:
 		       cmd = LYK_PREV_DOC;
 		       goto new_cmd;
 		       }
+		    override_LYresubmit_posts = TRUE;
 		    goto try_again;
                     break;
 
@@ -939,8 +954,9 @@ try_again:
 		}  /* end switch */
 
 	    if (TRACE) {
-		if (!LYTraceLogFP || trace_mode_flag)
+		if (!LYTraceLogFP || trace_mode_flag) {
 		    sleep(AlertSecs); /* allow me to look at the results */
+		}
 	    }
 
 	    /*
@@ -1149,8 +1165,9 @@ try_again:
 	    }
 	    if (TRACE) {
 		refresh_screen = TRUE;
-		if (!LYTraceLogFP || trace_mode_flag)
+		if (!LYTraceLogFP || trace_mode_flag) {
 		    sleep(AlertSecs);
+		}
 	    }
 	}
 
@@ -1905,7 +1922,7 @@ new_cmd:  /*
 		LYUCPushAssumed(HTMainAnchor);
 	        HTOutputFormat = WWW_SOURCE;
 	    }
-	    HTuncache_current_document();
+	    LYforce_no_cache = TRUE;
 	    FREE(curdoc.address); /* so it doesn't get pushed */
 	    break;
 
@@ -1929,7 +1946,11 @@ new_cmd:  /*
 		HTOutputFormat = WWW_SOURCE;
 	    }
 	    HEAD_request = HTLoadedDocumentIsHEAD();
-	    HTuncache_current_document();
+	    if (real_cmd == LYK_RELOAD) {
+		HTuncache_current_document();
+	    } else {
+		LYforce_no_cache = TRUE;
+	    }
 #ifdef NO_ASSUME_SAME_DOC
 	    /*
 	     *  Don't assume the reloaded document will be the same. - FM
@@ -3606,7 +3627,6 @@ check_goto_URL:
 		    sleep(InfoSecs);
 	    
 		} else {
-		    LYforce_no_cache = TRUE;
 		    StrAllocCopy(newdoc.address, curdoc.address);
 		    if (((strcmp(CurrentUserAgent, (LYUserAgent ?
 					    LYUserAgent : "")) ||
@@ -3637,7 +3657,6 @@ check_goto_URL:
 			HTOutputFormat = WWW_SOURCE;
 		    }
 		    HEAD_request = HTLoadedDocumentIsHEAD();
-		    HTuncache_current_document();
 #ifdef NO_ASSUME_SAME_DOC
 		    newdoc.line = 1;
 		    newdoc.link = 0;
@@ -3647,7 +3666,8 @@ check_goto_URL:
 		    newdoc.link = ((curdoc.link > -1) ?
 					  curdoc.link : 0);
 #endif /* NO_ASSUME_SAME_DOC */
-		    FREE(curdoc.address);
+		    LYforce_no_cache = TRUE;
+		    FREE(curdoc.address); /* So it doesn't get pushed. */
 		}
 	    }
 	    keypad_mode_flag = keypad_mode;
@@ -3974,8 +3994,7 @@ check_goto_URL:
 	        if (local_create(&curdoc)) {
 		    HTuncache_current_document();
 		    StrAllocCopy(newdoc.address, curdoc.address);
-		    FREE(curdoc.address);	
-		    FREE(curdoc.address);	
+		    FREE(curdoc.address);
 		    FREE(newdoc.post_data);
 		    FREE(newdoc.post_content_type);
 		    FREE(newdoc.bookmark);
diff --git a/src/LYMap.c b/src/LYMap.c
index 1c2a194e..db491280 100644
--- a/src/LYMap.c
+++ b/src/LYMap.c
@@ -429,7 +429,11 @@ PRIVATE int LYLoadIMGmap ARGS4 (
     if (!theList) {
 	if (anAnchor->post_data && !WWWDoc.safe &&
 	    ((underlying && underlying->document && !LYforce_no_cache) ||
-	     HTConfirm("LYNXIMGMAP: " CONFIRM_POST_RESUBMISSION) != TRUE)) {
+	     HTConfirm(
+#if __STDC__
+		"LYNXIMGMAP: "
+#endif
+		CONFIRM_POST_RESUBMISSION) != TRUE)) {
 	    HTAlert("Image map from POST response not available!");
 	    return(HT_NOT_LOADED);
 	}
@@ -466,7 +470,11 @@ PRIVATE int LYLoadIMGmap ARGS4 (
     if (!(theMap && theMap->elements)) {
 	if (anAnchor->post_data && !WWWDoc.safe &&
 	    ((underlying && underlying->document && !LYforce_no_cache) ||
-	    HTConfirm("LYNXIMGMAP: " CONFIRM_POST_RESUBMISSION) != TRUE)) {
+	    HTConfirm(
+#if __STDC__
+		"LYNXIMGMAP: "
+#endif
+		CONFIRM_POST_RESUBMISSION) != TRUE)) {
 	    HTAlert("Image map from POST response not available!");
 	    return(HT_NOT_LOADED);
 	}
diff --git a/src/LYOptions.c b/src/LYOptions.c
index 8eaa64a0..8cc9886c 100644
--- a/src/LYOptions.c
+++ b/src/LYOptions.c
@@ -2328,11 +2328,7 @@ redraw:
 #ifdef VMS
     VMSbox(form_window, (bottom - top), (Lnum + width + 4));
 #else
-    {
-	int boxvert, boxhori;
-	UCSetBoxChars(current_char_set, &boxvert, &boxhori, BOXVERT, BOXHORI);
-	box(form_window, boxvert, boxhori);
-    }
+    LYbox(form_window, FALSE);
 #endif /* VMS */
     wrefresh(form_window);
 #endif /* USE_SLANG */
diff --git a/src/LYStrings.c b/src/LYStrings.c
index f11b2e7f..04cad25f 100644
--- a/src/LYStrings.c
+++ b/src/LYStrings.c
@@ -153,6 +153,37 @@ PUBLIC char * LYmbcsstrncpy ARGS5(char *,dst, CONST char *,src, int,n_bytes,
 #endif /* EXP_CHARTRANS */
 
 /*
+ *  LYmbcs_skip_glyphs() skips a given number of display positions
+ *  in a string and returns the resulting pointer.  It takes account
+ *  of UTF-8 encoded characters. - kw
+ */
+PUBLIC char * LYmbcs_skip_glyphs ARGS3(
+	char *,		data,
+	int,		n_glyphs,
+	BOOL,		utf_flag)
+{
+    int i_glyphs = 0;
+
+    if (n_glyphs < 0)
+        n_glyphs = 0;
+
+    if (!data)
+	return NULL;
+    if (!utf_flag)
+	return (data + n_glyphs);
+
+    while(*data) {
+	if (IS_NEW_GLYPH(*data)) {
+	    if (i_glyphs++ >= n_glyphs) {
+		return data;
+	    }
+	}
+	data++;
+    }
+    return data;
+}
+
+/*
  *  LYmbcsstrlen() returns the printable length of a string
  *  that might contain IsSpecial or multibyte (CJK or UTF8)
  *  characters. - FM
@@ -190,6 +221,7 @@ PUBLIC int LYmbcsstrlen ARGS2(
 
     return(len);
 }
+
 #undef GetChar
 
 #ifdef USE_SLANG
@@ -506,8 +538,9 @@ re_read:
 	default:
 	   if (TRACE) {
 		fprintf(stderr,"Unknown key sequence: %d:%d:%d\n",c,b,a);
-		if (!LYTraceLogFP)
+		if (!LYTraceLogFP) {
 		    sleep(MessageSecs);
+		}
 	   }
         }
 	if (isdigit(a) && (b == '[' || c == 155) && d != -1 && d != '~')
@@ -1053,8 +1086,16 @@ again:
 	    return(-1);
             break;
 
+	case LYE_LINKN:
+	    /*
+	     *  Used only in form_getstr() for invoking
+	     *  the LYK_F_LINK_NUM prompt when in form
+	     *  text fields. - FM
+	     */
+	    break;
+
         default:
-            LYLineEdit(&MyEdit,ch, FALSE);
+            LYLineEdit(&MyEdit, ch, FALSE);
         }
     }
 }
diff --git a/src/LYStrings.h b/src/LYStrings.h
index 5dc64c06..e6d7f178 100644
--- a/src/LYStrings.h
+++ b/src/LYStrings.h
@@ -38,6 +38,10 @@ extern char * LYno_attr_mbcs_case_strstr PARAMS((
 extern int LYmbcsstrlen PARAMS((
 	char *		str,
 	BOOL		utf_flag));
+extern char * LYmbcs_skip_glyphs PARAMS((
+	char *		data,
+	int		n_glyphs,
+	BOOL		utf_flag));
 extern char * LYmbcsstrncpy PARAMS((
 	char *		dst,
 	CONST char *	src,
@@ -140,7 +144,9 @@ typedef struct _EditFieldData {
 #define LYE_LOWER (LYE_BACKW +1)  /* Lower case the line   */
 #define LYE_UPPER (LYE_LOWER +1)  /* Upper case the line   */
 
-#define LYE_AIX   (LYE_UPPER +1)  /* Hex 97		   */
+#define LYE_LINKN (LYE_UPPER +1)  /* Invoke F_LINK_NUM	   */
+
+#define LYE_AIX   (LYE_LINKN +1)  /* Hex 97		   */
 
 extern void LYSetupEdit PARAMS((
 	EditFieldData *	edit,
diff --git a/src/LYUtils.c b/src/LYUtils.c
index 47a2fca1..f4ba7728 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -526,6 +526,13 @@ PUBLIC void highlight ARGS3(
 		 *  within the hightext. - FM
 		 */
 		data = (Data + (offset - Offset));
+		if (!utf_flag) {
+		    data = Data + (offset - Offset);
+		} else {
+		    data = LYmbcs_skip_glyphs(Data,
+					      (offset - Offset),
+					      utf_flag);
+		}
 		if ((case_sensitive ?
 		     (cp = LYno_attr_mbcs_strstr(data,
 						 target,
@@ -574,7 +581,14 @@ highlight_hit_within_hightext:
 		(flag == ON ? (hLen - 1) : hLen))  {
 		goto highlight_search_hightext2;
 	    }
-	    data += (Offset - offset);
+	    if (!utf_flag) {
+		data += (Offset - offset);
+	    } else {
+		refresh();
+		data = LYmbcs_skip_glyphs(data,
+					  (Offset - offset),
+					  utf_flag);
+	    }
 	    offset = Offset;
 	    itmp = 0;
 	    written = 0;
@@ -793,7 +807,13 @@ highlight_hit_within_hightext:
 	     *  See if we have another hit that starts
 	     *  within the hightext. - FM
 	     */
-	    data = (Data + (offset - Offset));
+	    if (!utf_flag) {
+		data = Data + (offset - Offset);
+	    } else {
+		data = LYmbcs_skip_glyphs(Data,
+					  (offset - Offset),
+					  utf_flag);
+	    }
 	    if ((case_sensitive ?
 		 (cp = LYno_attr_mbcs_strstr(data,
 					     target,
@@ -826,7 +846,14 @@ highlight_hit_within_hightext:
 		if ((HitOffset + (offset + tLen)) >=
 		    (hoffset + hLen)) {
 		    offset = (HitOffset + offset);
-		    data = (buffer + (offset - hoffset));
+		    if (!utf_flag) {
+			data = buffer + (offset - hoffset);
+		    } else {
+			refresh();
+			data = LYmbcs_skip_glyphs(buffer,
+						  (offset - hoffset),
+						  utf_flag);
+		    }
 		    move(hLine, offset);
 		    itmp = 0;
 		    written = 0;
@@ -1233,6 +1260,13 @@ highlight_search_hightext2:
 		 *  See if we have another hit that starts
 		 *  within the hightext2. - FM
 		 */
+		if (!utf_flag) {
+		    data = Data + (offset - Offset);
+		} else {
+		    data = LYmbcs_skip_glyphs(Data,
+					      (offset - Offset),
+					      utf_flag);
+		}
 		data = (Data + (offset - Offset));
 		if ((case_sensitive ?
 		     (cp = LYno_attr_mbcs_strstr(data,
@@ -1282,7 +1316,14 @@ highlight_hit_within_hightext2:
 		(flag == ON ? (hLen - 1) : hLen))  {
 		goto highlight_search_done;
 	    }
-	    data += (Offset - offset);
+	    if (!utf_flag) {
+		data += (Offset - offset);
+	    } else {
+		refresh();
+		data = LYmbcs_skip_glyphs(data,
+					  (Offset - offset),
+					  utf_flag);
+	    }
 	    offset = Offset;
 	    itmp = 0;
 	    written = 0;
@@ -1501,7 +1542,13 @@ highlight_hit_within_hightext2:
 	     *  See if we have another hit that starts
 	     *  within the hightext2. - FM
 	     */
-	    data = (Data + (offset - Offset));
+	    if (!utf_flag) {
+		data = (Data + (offset - Offset));
+	    } else {
+		data = LYmbcs_skip_glyphs(Data,
+					  (offset - Offset),
+					  utf_flag);
+	    }
 	    if ((case_sensitive ?
 		 (cp = LYno_attr_mbcs_strstr(data,
 					     target,
@@ -1534,7 +1581,14 @@ highlight_hit_within_hightext2:
 		if ((HitOffset + (offset + tLen)) >=
 		    (hoffset + hLen)) {
 		    offset = (HitOffset + offset);
-		    data = (buffer + (offset - hoffset));
+		    if (!utf_flag) {
+			data = buffer + (offset - hoffset);
+		    } else {
+			refresh();
+			data = LYmbcs_skip_glyphs(buffer,
+						  (offset - hoffset),
+						  utf_flag);
+		    }
 		    move(hLine, offset);
 		    itmp = 0;
 		    written = 0;
@@ -1851,7 +1905,13 @@ PUBLIC void statusline ARGS1(
 	FREE(temp);
     } else {
         /*
-	 *  Strip any escapes, and shorten text if necessary. - FM
+	 *  Strip any escapes, and shorten text if necessary.  Note
+	 *  that we don't deal with the possibility of UTF-8 characters
+	 *  in the string.  This is unlikely, but if strings with such
+	 *  characters are used in LYMessages_en.h, a compilation
+	 *  symbol of HAVE_UTF8_STATUSLINES could be added there, and
+	 *  code added here for determining the displayed string length,
+	 *  as we do above for CJK. - FM
 	 */
 	for (i = 0, len = 0; text[i] != '\0' && len < max_length; i++) {
 	    if (text[i] != '\033') {
@@ -1881,12 +1941,12 @@ PUBLIC void statusline ARGS1(
         move(LYlines-1, 0);
     }
     clrtoeol();
-    if (text != NULL) {
-#ifdef EXP_CHARTRANS
+    if (text != NULL && text[0] != '\0') {
+#ifdef HAVE_UTF8_STATUSLINES
 	if (LYCharSet_UC[current_char_set].enc == UCT_ENC_UTF8) {
 	    refresh();
 	}
-#endif
+#endif /* HAVE_UTF8_STATUSLINES */
 #ifndef USE_COLOR_STYLE
 	lynx_start_status_color ();
 	addstr (buffer);
@@ -2576,6 +2636,7 @@ PUBLIC int is_url ARGS1(
 	    for (i = 0; i < 10; i++)
 	        cp[i] = TOUPPER(cp[i]);
 	}
+	(void)is_url(&cp[11]);
 	return(LYNXIMGMAP_URL_TYPE);
 
     } else if (!strncasecomp(cp, "LYNXCOOKIE:", 11)) {
@@ -2873,6 +2934,9 @@ PUBLIC BOOLEAN inlocaldomain NOARGS
 PUBLIC void size_change ARGS1(
 	int,		sig)
 {
+    int old_lines = LYlines;
+    int old_cols = LYcols;
+
 #ifdef USE_SLANG
     SLtt_get_screen_size();
     LYlines = SLtt_Screen_Rows;
@@ -2925,7 +2989,17 @@ PUBLIC void size_change ARGS1(
         LYcols = 80;
 #endif /* USE_SLANG */
 
-    recent_sizechange = TRUE; 
+    /*
+     *  Check if the screen size has actually changed. - AJL
+     */
+    if (LYlines != old_lines || LYcols != old_cols) {
+	recent_sizechange = TRUE;
+    }
+    if (TRACE) {
+	fprintf(stderr,
+		"Window size changed from (%d,%d) to (%d,%d)\n",
+		old_lines, old_cols, LYlines, LYcols);
+    }
 #ifdef SIGWINCH
     (void)signal (SIGWINCH, size_change);
 #endif /* SIGWINCH */
diff --git a/src/Makefile.old b/src/Makefile.old
index 3b325018..8435f4bb 100644
--- a/src/Makefile.old
+++ b/src/Makefile.old
@@ -56,9 +56,28 @@ LYCharSets.o: ../userdefs.h
 
 CHRTR= chrtrans/
 
-TABLES= $(CHRTR)iso02_uni.h \
- $(CHRTR)iso01_uni.h \
+TABLES= $(CHRTR)iso01_uni.h \
  $(CHRTR)def7_uni.h \
+ $(CHRTR)iso02_uni.h \
+ $(CHRTR)cp1252_uni.h \
+ $(CHRTR)dmcs_uni.h \
+ $(CHRTR)mac_uni.h \
+ $(CHRTR)next_uni.h \
+ $(CHRTR)koi8r_uni.h \
+ $(CHRTR)viscii_uni.h \
+ $(CHRTR)cp437_uni.h \
+ $(CHRTR)cp850_uni.h \
+ $(CHRTR)cp852_uni.h \
+ $(CHRTR)cp866_uni.h \
+ $(CHRTR)cp737_uni.h \
+ $(CHRTR)cp869_uni.h \
+ $(CHRTR)cp864_uni.h \
+ $(CHRTR)cp862_uni.h \
+ $(CHRTR)cp1250_uni.h \
+ $(CHRTR)cp1251_uni.h \
+ $(CHRTR)cp1253_uni.h \
+ $(CHRTR)cp1255_uni.h \
+ $(CHRTR)cp1256_uni.h \
  $(CHRTR)iso03_uni.h \
  $(CHRTR)iso04_uni.h \
  $(CHRTR)iso05_uni.h \
@@ -67,15 +86,6 @@ TABLES= $(CHRTR)iso02_uni.h \
  $(CHRTR)iso08_uni.h \
  $(CHRTR)iso09_uni.h \
  $(CHRTR)iso10_uni.h \
- $(CHRTR)koi8r_uni.h \
- $(CHRTR)cp437_uni.h \
- $(CHRTR)cp850_uni.h \
- $(CHRTR)cp852_uni.h \
- $(CHRTR)cp866_uni.h \
- $(CHRTR)cp1250_uni.h \
- $(CHRTR)cp1251_uni.h \
- $(CHRTR)cp1252_uni.h \
- $(CHRTR)viscii_uni.h \
  $(CHRTR)utf8_uni.h \
  $(CHRTR)rfc_suni.h \
  $(CHRTR)mnemonic_suni.h \
diff --git a/src/UCAux.c b/src/UCAux.c
index f03bbfa9..98fb9e37 100644
--- a/src/UCAux.c
+++ b/src/UCAux.c
@@ -21,6 +21,7 @@ PUBLIC UCTQ_t UCCanUniTranslateFrom ARGS1(
 	return TQ_EXCELLENT;
     return ((LYCharSet_UC[from].UChndl >= 0) ? TQ_GOOD : TQ_NO);
 }
+
 PUBLIC UCTQ_t UCCanTranslateUniTo ARGS1(
 	int,		to)
 {
@@ -36,6 +37,7 @@ PUBLIC UCTQ_t UCCanTranslateUniTo ARGS1(
 	return TQ_GOOD;
     return TQ_GOOD;	/* at least some characters, we don't know more */
 }
+
 PUBLIC UCTQ_t UCCanTranslateFromTo ARGS2(
 	int,		from,
 	int,		to)
@@ -59,14 +61,28 @@ PUBLIC UCTQ_t UCCanTranslateFromTo ARGS2(
 	    return TQ_GOOD;
 	}
 	if (LYCharSet_UC[from].enc == UCT_ENC_CJK) {
-	    if (HTCJK == NOCJK)	/* use that global flag, for now */
+	    /*
+	    **  CJK mode may be off (i.e., HTCJK == NOCJK) because
+	    **  the current document is not CJK, but the check may
+	    **  be for capability in relation to another document,
+	    **  for which CJK mode might be turned on when retrieved.
+	    **  Thus, when the from charset is CJK, check if the to
+	    **  charset is CJK, and return TQ_NO or TQ_GOOD depending on
+	    **  that. - FM
+	    */
+	    if (LYCharSet_UC[to].enc != UCT_ENC_CJK)
 		return TQ_NO;
-	    if (HTCJK == JAPANESE &&
+	    if ((!strcmp(toname, "euc-jp") ||
+		 !strcmp(toname, "shift_jis")) &&
 		(!strcmp(fromname, "euc-jp") ||
-		 !strncmp(fromname, "iso-2022-jp",11) ||
 		 !strcmp(fromname, "shift_jis")))
 		return TQ_GOOD;
-	    return TQ_NO;	/* if not handled by (from == to) above */
+	    /*
+	    **  The other charsets for CJK were handled
+	    **  by the (from == to) above, so we need not
+	    **  check those. - FM
+	    **/
+	    return TQ_NO;
 	}
 	if (!strcmp(fromname, "koi8-r")) {
 	    /*
@@ -90,70 +106,78 @@ PUBLIC UCTQ_t UCCanTranslateFromTo ARGS2(
     }
 }
 
-/* Returns YES if no tranlation necessary (because charsets
-** are equal, are equivalent, etc.)
+/*
+**  Returns YES if no tranlation necessary (because
+**  charsets are equal, are equivalent, etc.).
 */
-PUBLIC BOOL UCNeedNotTranslate ARGS2(int, from, int, to)
+PUBLIC BOOL UCNeedNotTranslate ARGS2(
+	int,		from,
+	int,		to)
 {
     CONST char *fromname;
     CONST char *toname;
-    if (from==to)
+    if (from == to)
 	return YES;
     if (from < 0)
 	return NO;		/* ??? */
     if (LYCharSet_UC[from].enc == UCT_ENC_7BIT) {
-	return YES;		/* only 7bit chars */
+	return YES;		/* Only 7bit chars. */
     }
     fromname = LYCharSet_UC[from].MIMEname;
-    if (0==strcmp(fromname,"x-transparent") ||
-	0==strcmp(fromname,"us-ascii")) {
+    if (!strcmp(fromname, "x-transparent") ||
+	!strcmp(fromname, "us-ascii")) {
 	    return YES;
     }
     if (to < 0)
 	return NO;		/* ??? */
-    if (to==0) {
+    if (to == 0) {
 	if (LYCharSet_UC[from].codepoints & (UCT_CP_SUBSETOF_LAT1))
 	    return YES;
     }
     toname = LYCharSet_UC[to].MIMEname;
-    if (0==strcmp(toname,"x-transparent")) {
+    if (!strcmp(toname, "x-transparent")) {
 	return YES;
     }
     if (LYCharSet_UC[to].enc == UCT_ENC_UTF8) {
 	return NO;
     }
-    if (from==0) {
+    if (from == 0) {
 	if (LYCharSet_UC[from].codepoints & (UCT_CP_SUPERSETOF_LAT1))
 	    return YES;
     }
     if (LYCharSet_UC[from].enc == UCT_ENC_CJK) {
-	if (HTCJK == NOCJK)	/* use that global flag, for now */
+	if (HTCJK == NOCJK)	/* Use that global flag, for now. */
 	    return NO;
-	if (HTCJK == JAPANESE && (
-	    0==strcmp(fromname,"euc-jp") ||
-	    0==strncmp(fromname,"iso-2022-jp",11) ||
-	    0==strcmp(fromname,"shift_jis")
-	    ))
+	if (HTCJK == JAPANESE &&
+	    /*
+	    **  Always strip the "x-" from "x-euc-jp",
+	    **  or convert "x-shift-jis" to "shift_jis",
+	    **  before calling this function, and so
+	    **  don't check for them here. - FM
+	    */
+	    (!strcmp(fromname, "euc-jp") ||
+	     !strncmp(fromname, "iso-2022-jp",11) ||
+	     !strcmp(fromname, "shift_jis")))
 	    return YES;	/* ??? */
-	return NO;	/* if not handled by (from==to) above */
+	return NO;	/* If not handled by (from == to) above. */
     }
     return NO;
 }
 
 /*
- *  The idea here is that any stage of the stream pipe which is interested
- *  in some charset dependent processing will call this function.
- *  Given input and ouptput charsets, this function will set various flags
- *  in a UCTransParams structure that _suggest_ to the caller what to do.
- *
- *  Should be called once when a stage starts processing text (and the
- *  input and output charsets are known), or whenever one of input or
- *  output charsets has changed (e.g. by SGML.c stage after HTML.c stage
- *  has processed a META tag).
- *  The global flags (LYRawMode, HTPassEightBitRaw etc.) are currently
- *  not taken into account here (except for HTCJK, somewhat), it's still
- *  up to the caller to do something about them.
- */
+**  The idea here is that any stage of the stream pipe which is interested
+**  in some charset dependent processing will call this function.
+**  Given input and ouptput charsets, this function will set various flags
+**  in a UCTransParams structure that _suggest_ to the caller what to do.
+**
+**  Should be called once when a stage starts processing text (and the
+**  input and output charsets are known), or whenever one of input or
+**  output charsets has changed (e.g. by SGML.c stage after HTML.c stage
+**  has processed a META tag).
+**  The global flags (LYRawMode, HTPassEightBitRaw etc.) are currently
+**  not taken into account here (except for HTCJK, somewhat), it's still
+**  up to the caller to do something about them. - KW
+*/
 PUBLIC void UCSetTransParams ARGS5(
     UCTransParams *, 	pT,
     int,		cs_in,
@@ -161,13 +185,26 @@ PUBLIC void UCSetTransParams ARGS5(
     int,		cs_out,
     CONST LYUCcharset*,	p_out)
 {
+    /*
+    **  Initialize this element to FALSE, and set it TRUE
+    **  below if we're dealing with VISCII. - FM
+    */
     pT->trans_C0_to_uni = FALSE;
+
+    /*
+    **  The "transparent" display character set is a
+    **  "super raw mode". - FM
+    */
     pT->transp = (!strcmp(p_in->MIMEname, "x-transparent") ||
 		  !strcmp(p_out->MIMEname, "x-transparent"));
+
     if (pT->transp) {
+	/*
+	**  Set up the structure for "transparent". - FM
+	*/
 	pT->do_cjk = FALSE;
 	pT->decode_utf8 = FALSE;
-	pT->output_utf8 = FALSE;	/* we may, but won't know about it */
+	pT->output_utf8 = FALSE;  /* We may, but won't know about it. - KW */
 	pT->do_8bitraw = TRUE;
 	pT->use_raw_char_in = TRUE;
 	pT->strip_raw_char_in = FALSE;
@@ -176,41 +213,120 @@ PUBLIC void UCSetTransParams ARGS5(
 	pT->trans_C0_to_uni = (p_in->enc == UCT_ENC_8BIT_C0 ||
 			       p_out->enc == UCT_ENC_8BIT_C0);
     } else {
+        /*
+	**  Initialize local flags. - FM
+	*/
 	BOOL intm_ucs = FALSE;
 	BOOL use_ucs = FALSE;
+	/*
+	**  Set this element if we want to treat
+	**  the input as CJK. - FM
+	*/
 	pT->do_cjk = ((p_in->enc == UCT_ENC_CJK) && (HTCJK != NOCJK));
+	/*
+	**  Set these elements based on whether
+	**  we are dealing with UTF-8. - FM
+	*/
 	pT->decode_utf8 = (p_in->enc == UCT_ENC_UTF8);
 	pT->output_utf8 = (p_out->enc == UCT_ENC_UTF8);
 	if (pT->do_cjk) {
+	    /*
+	    **  Set up the structure for a CJK input with
+	    **  a CJK output (HTCJK != NOCJK). - FM
+	    */
 	    intm_ucs = FALSE;
 	    pT->trans_to_uni = FALSE;
 	    use_ucs = FALSE;
 	    pT->do_8bitraw = FALSE;
 	    pT->pass_160_173_raw = TRUE;
-	    pT->use_raw_char_in = FALSE; /* not used for CJK */
+	    pT->use_raw_char_in = FALSE; /* Not used for CJK. - KW */
 	    pT->repl_translated_C0 = FALSE;
-	    pT->trans_from_uni = FALSE; /* not used for CJK */
+	    pT->trans_from_uni = FALSE;	 /* Not used for CJK. - KW */
 	} else {
+	    /*
+	    **  Set up for all other charset combinations.
+	    **  The intm_ucs flag is set TRUE if the input
+	    **  charset is iso-8859-1 or UTF-8, or largely
+	    **  equivalent to them, i.e. if we have UCS without
+	    **  having to do a table translation.
+	    */
 	    intm_ucs = (cs_in == 0 || pT->decode_utf8 ||
 			(p_in->codepoints &
 			 (UCT_CP_SUBSETOF_LAT1|UCT_CP_SUBSETOF_UCS2)));
+	    /*
+	    **  pT->trans_to_uni is set TRUE if we do not have that as
+	    **  input already, and we can translate to Unicode.  Note
+	    **  that UTF-8 always is converted to Unicode in functions
+	    **  that use the transformation structure, so it is
+	    **  treated as already Unicode here.
+	    */
 	    pT->trans_to_uni = (!intm_ucs &&
 				UCCanUniTranslateFrom(cs_in));
+	    /*
+	    **  We set this if we are translating to Unicode and
+	    **  what normally are low value control characters in
+	    **  fact are encoding octets for the input charset
+	    **  (presently, this applies to VISCII). - FM
+	    */
 	    pT->trans_C0_to_uni = (pT->trans_to_uni &&
 				   p_in->enc == UCT_ENC_8BIT_C0);
+	    /*
+	    **  We set this, presently, for VISCII. - FM
+	    */
 	    pT->repl_translated_C0 = (p_out->enc == UCT_ENC_8BIT_C0);
+	    /*
+	    **  This is a flag for whether we are dealing with koi8-r
+	    **  as the input, and could do 8th-bit stripping for other
+	    **  output charsets.  Note that this always sets 8th-bit
+	    **  stripping if the input charset is KOI8-R and the output
+	    **  charset needs it, i.e., regardless of the RawMode and
+	    **  consequent HTPassEightBitRaw setting, so you can't look
+	    **  at raw koi8-r without selecting that as the display
+	    **  character set (or transparent).  That's just as well,
+	    **  but worth noting for developers - FM
+	    */
 	    pT->strip_raw_char_in = ((!intm_ucs ||
 				      (p_out->enc == UCT_ENC_7BIT) ||
-				       (p_out->repertoire &
-				        UCT_REP_SUBSETOF_LAT1)) &&
+				      (p_out->repertoire &
+				       UCT_REP_SUBSETOF_LAT1)) &&
 				     cs_in != cs_out &&
 				     !strcmp(p_in->MIMEname, "koi8-r"));
+	    /*
+	    **  use_ucs should be set TRUE if we have or will create
+	    **  Unicode values for input octets or UTF multibytes. - FM
+	    */
 	    use_ucs = (intm_ucs || pT->trans_to_uni);
+	    /*
+	    **  This is set TRUE if use_ucs was set FALSE.  It is
+	    **  parallel to the HTPassEightBitRaw flag, which
+	    **  is set TRUE or FALSE elsewhere based on the raw mode
+	    **  setting in relation to the current Display Character
+	    **  Set. - FM
+	    */
 	    pT->do_8bitraw = (!use_ucs);
+	    /*
+	    **  This is set TRUE when 160 and 173 should not be treated
+	    **  specially as nbsp and shy, respectively. - FM
+	    */
 	    pT->pass_160_173_raw = (!use_ucs &&
 				    !(p_in->like8859 & UCT_R_8859SPECL));
-	    pT->use_raw_char_in = (!pT->output_utf8 && cs_in == cs_out &&
+	    /*
+	    **  This is set when the input and output charsets match,
+	    **  and they are not ones which should go through a Unicode
+	    **  translation process anyway. - FM
+	    */
+	    pT->use_raw_char_in = (!pT->output_utf8 &&
+				   cs_in == cs_out &&
 		                   !pT->trans_C0_to_uni);
+	    /*
+	    **  This should be set TRUE when we expect to have
+	    **  done translation to Unicode or had the equivalent
+	    **  as input, can translate it to our output charset,
+	    **  and normally want to do so.  The latter depends on
+	    **  the pT->do_8bitraw and pT->use_raw_char_in values set
+	    **  above, but also on HTPassEightBitRaw in any functions
+	    **  which use the transformation structure.. - FM
+	    */
 	    pT->trans_from_uni = (use_ucs && !pT->do_8bitraw &&
 				  !pT->use_raw_char_in &&
 				  UCCanTranslateUniTo(cs_out));
@@ -218,6 +334,11 @@ PUBLIC void UCSetTransParams ARGS5(
     }
 }
 
+/*
+**  This function initalizes the transformation
+**  structure by setting all its elements to
+**  FALSE. - KW
+*/
 PUBLIC void UCTransParams_clear ARGS1(
     UCTransParams *,    pT)
 {
@@ -308,3 +429,60 @@ PUBLIC BOOL UCPutUtf8_charstring ARGS3(
 	return NO;
     return YES;
 }
+
+/*
+**  This function converts a Unicode (UCode_t) value
+**  to a multibyte UTF-8 character, which is loaded
+**  into the buffer received as an argument.  The
+**  buffer should be large enough to hold at least
+**  seven characters (but should be declared as 8
+**  to minimize byte alignment problems with some
+**  compilers). - FM
+*/
+PUBLIC BOOL UCConvertUniToUtf8 ARGS2(
+	UCode_t,	code,
+	char *,		buffer)
+{
+    char *ch = buffer;
+
+    if (!ch)
+	return NO;
+
+    if (code <= 0 || code > 0x7fffffffL) {
+	*ch = '\0';
+        return NO;
+    }
+
+    if (code < 0x800L) {
+	*ch++ = (char)(0xc0 | (code>>6));
+	*ch++ = (char)(0x80 | (0x3f & (code)));
+	*ch = '\0';
+    } else if (code < 0x10000L) {
+	*ch++ = (char)(0xe0 | (code>>12));
+	*ch++ = (char)(0x80 | (0x3f & (code>>6)));
+	*ch++ = (char)(0x80 | (0x3f & (code)));
+	*ch = '\0';
+    } else if (code < 0x200000L) {
+	*ch++ = (char)(0xf0 | (code>>18));
+	*ch++ = (char)(0x80 | (0x3f & (code>>12)));
+	*ch++ = (char)(0x80 | (0x3f & (code>>6)));
+	*ch++ = (char)(0x80 | (0x3f & (code)));
+	*ch = '\0';
+    } else if (code < 0x4000000L) {
+	*ch++ = (char)(0xf8 | (code>>24));
+	*ch++ = (char)(0x80 | (0x3f & (code>>18)));
+	*ch++ = (char)(0x80 | (0x3f & (code>>12)));
+	*ch++ = (char)(0x80 | (0x3f & (code>>6)));
+	*ch++ = (char)(0x80 | (0x3f & (code)));
+	*ch = '\0';
+    } else {
+	*ch++ = (char)(0xfc | (code>>30));
+	*ch++ = (char)(0x80 | (0x3f & (code>>24)));
+	*ch++ = (char)(0x80 | (0x3f & (code>>18)));
+	*ch++ = (char)(0x80 | (0x3f & (code>>12)));
+	*ch++ = (char)(0x80 | (0x3f & (code>>6)));
+	*ch++ = (char)(0x80 | (0x3f & (code)));
+	*ch = '\0';
+    }
+    return YES;
+}
diff --git a/src/UCdomap.c b/src/UCdomap.c
index 344f3057..e81ad05c 100644
--- a/src/UCdomap.c
+++ b/src/UCdomap.c
@@ -33,56 +33,76 @@
  *  Include tables & parameters.
  */
 #ifdef VMS
-#include "[.chrtrans]def7_uni.h"
-#include "[.chrtrans]iso01_uni.h"
-#include "[.chrtrans]iso02_uni.h"
-#include "[.chrtrans]cp437_uni.h"
-#include "[.chrtrans]cp850_uni.h"
-#include "[.chrtrans]koi8r_uni.h"
-#include "[.chrtrans]cp852_uni.h"
-#include "[.chrtrans]cp866_uni.h"
-#include "[.chrtrans]cp1252_uni.h"
-#include "[.chrtrans]cp1250_uni.h"
-#include "[.chrtrans]cp1251_uni.h"
-#include "[.chrtrans]viscii_uni.h"
-#include "[.chrtrans]iso03_uni.h"
-#include "[.chrtrans]iso04_uni.h"
-#include "[.chrtrans]iso05_uni.h"
-#include "[.chrtrans]iso06_uni.h"
-#include "[.chrtrans]iso07_uni.h"
-#include "[.chrtrans]iso08_uni.h"
-#include "[.chrtrans]iso09_uni.h"
-#include "[.chrtrans]iso10_uni.h"
-#include "[.chrtrans]utf8_uni.h"
-#include "[.chrtrans]rfc_suni.h"
-#include "[.chrtrans]mnemonic_suni.h"
+#include "[.chrtrans]def7_uni.h"	/* 7 bit approximations */
+#include "[.chrtrans]iso01_uni.h"	/* ISO Latin 1		*/
+#include "[.chrtrans]iso02_uni.h"	/* ISO Latin 2		*/
+#include "[.chrtrans]cp1252_uni.h"	/* WinLatin1 (cp1252)	*/
+#include "[.chrtrans]dmcs_uni.h"	/* DEC Multinational	*/
+#include "[.chrtrans]mac_uni.h"		/* Macintosh (8 bit)	*/
+#include "[.chrtrans]next_uni.h"	/* NeXT character set	*/
+#include "[.chrtrans]koi8r_uni.h"	/* KOI8-R Cyrillic	*/
+#include "[.chrtrans]viscii_uni.h"	/* Vietnamese (VISCII)	*/
+#include "[.chrtrans]cp437_uni.h"	/* DosLatinUS (cp437)	*/
+#include "[.chrtrans]cp850_uni.h"	/* DosLatin1 (cp850)	*/
+#include "[.chrtrans]cp852_uni.h"	/* DosLatin2 (cp852)	*/
+#include "[.chrtrans]cp866_uni.h"	/* DosCyrillic (cp866)	*/
+#include "[.chrtrans]cp737_uni.h"	/* DosGreek (cp737)	*/
+#include "[.chrtrans]cp869_uni.h"	/* DosGreek2 (cp869)	*/
+#include "[.chrtrans]cp864_uni.h"	/* DosArabic (cp864)	*/
+#include "[.chrtrans]cp862_uni.h"	/* DosHebrew (cp862)	*/
+#include "[.chrtrans]cp1250_uni.h"	/* WinLatin2 (cp1250)	*/
+#include "[.chrtrans]cp1251_uni.h"	/* WinCyrillic (cp1251)	*/
+#include "[.chrtrans]cp1253_uni.h"	/* WinGreek (cp1253)	*/
+#include "[.chrtrans]cp1255_uni.h"	/* WinHebrew (cp1255)	*/
+#include "[.chrtrans]cp1256_uni.h"	/* WinArabic (cp1256)	*/
+#include "[.chrtrans]iso03_uni.h"	/* ISO Latin 3		*/
+#include "[.chrtrans]iso04_uni.h"	/* ISO Latin 4		*/
+#include "[.chrtrans]iso05_uni.h"	/* ISO Latin 5 Cyrillic	*/
+#include "[.chrtrans]iso06_uni.h"	/* ISO 8859-6 Arabic	*/
+#include "[.chrtrans]iso07_uni.h"	/* ISO 8859-7 Greek	*/
+#include "[.chrtrans]iso08_uni.h"	/* ISO 8859-8 Hebrew	*/
+#include "[.chrtrans]iso09_uni.h"	/* ISO 8859-9 (Latin 5)	*/
+#include "[.chrtrans]iso10_uni.h"	/* ISO 8859-10		*/
+#include "[.chrtrans]utf8_uni.h"	/* UNICODE UTF 8	*/
+#include "[.chrtrans]rfc_suni.h"	/* RFC 1345 w/o Intro	*/
+#include "[.chrtrans]mnemonic_suni.h"	/* RFC 1345 Mnemonic	*/
 #ifdef NOTDEFINED 
 #include "[.chrtrans]mnem_suni.h"
 #endif /* NOTDEFINED */
 #else
-#include "chrtrans/def7_uni.h"
-#include "chrtrans/iso01_uni.h"
-#include "chrtrans/iso02_uni.h"
-#include "chrtrans/cp437_uni.h"
-#include "chrtrans/cp850_uni.h"
-#include "chrtrans/koi8r_uni.h"
-#include "chrtrans/cp852_uni.h"
-#include "chrtrans/cp866_uni.h"
-#include "chrtrans/cp1250_uni.h"
-#include "chrtrans/cp1251_uni.h"
-#include "chrtrans/cp1252_uni.h"
-#include "chrtrans/viscii_uni.h"
-#include "chrtrans/iso03_uni.h"
-#include "chrtrans/iso04_uni.h"
-#include "chrtrans/iso05_uni.h"
-#include "chrtrans/iso06_uni.h"
-#include "chrtrans/iso07_uni.h"
-#include "chrtrans/iso08_uni.h"
-#include "chrtrans/iso09_uni.h"
-#include "chrtrans/iso10_uni.h"
-#include "chrtrans/utf8_uni.h"
-#include "chrtrans/rfc_suni.h"
-#include "chrtrans/mnemonic_suni.h"
+#include "chrtrans/def7_uni.h"		/* 7 bit approximations */
+#include "chrtrans/iso01_uni.h"		/* ISO Latin 1		*/
+#include "chrtrans/iso02_uni.h"		/* ISO Latin 2		*/
+#include "chrtrans/cp1252_uni.h"	/* WinLatin1 (cp1252)	*/
+#include "chrtrans/dmcs_uni.h"		/* DEC Multinational	*/
+#include "chrtrans/mac_uni.h"		/* Macintosh (8 bit)	*/
+#include "chrtrans/next_uni.h"		/* NeXT character set	*/
+#include "chrtrans/koi8r_uni.h"		/* KOI8-R Cyrillic	*/
+#include "chrtrans/viscii_uni.h"	/* Vietnamese (VISCII)	*/
+#include "chrtrans/cp437_uni.h"		/* DosLatinUS (cp437)	*/
+#include "chrtrans/cp850_uni.h"		/* DosLatin1 (cp850)	*/
+#include "chrtrans/cp852_uni.h"		/* DosLatin2 (cp852)	*/
+#include "chrtrans/cp866_uni.h" 	/* DosCyrillic (cp866)	*/
+#include "chrtrans/cp737_uni.h"		/* DosGreek (cp737)	*/
+#include "chrtrans/cp869_uni.h"		/* DosGreek2 (cp869)	*/
+#include "chrtrans/cp864_uni.h"		/* DosArabic (cp864)	*/
+#include "chrtrans/cp862_uni.h"		/* DosHebrew (cp862)	*/
+#include "chrtrans/cp1250_uni.h"	/* WinLatin2 (cp1250)	*/
+#include "chrtrans/cp1251_uni.h"	/* WinCyrillic (cp1251)	*/
+#include "chrtrans/cp1253_uni.h"	/* WinGreek (cp1253)	*/
+#include "chrtrans/cp1255_uni.h"	/* WinHebrew (cp1255)	*/
+#include "chrtrans/cp1256_uni.h"	/* WinArabic (cp1256)	*/
+#include "chrtrans/iso03_uni.h"		/* ISO Latin 3		*/
+#include "chrtrans/iso04_uni.h"		/* ISO Latin 4		*/
+#include "chrtrans/iso05_uni.h"		/* ISO Latin 5 Cyrillic	*/
+#include "chrtrans/iso06_uni.h"		/* ISO 8859-6 Arabic	*/
+#include "chrtrans/iso07_uni.h"		/* ISO 8859-7 Greek	*/
+#include "chrtrans/iso08_uni.h"		/* ISO 8859-8 Hebrew	*/
+#include "chrtrans/iso09_uni.h"		/* ISO 8859-9 (Latin 5)	*/
+#include "chrtrans/iso10_uni.h"		/* ISO 8859-10		*/
+#include "chrtrans/utf8_uni.h"		/* UNICODE UTF 8	*/
+#include "chrtrans/rfc_suni.h"		/* RFC 1345 w/o Intro	*/
+#include "chrtrans/mnemonic_suni.h"	/* RFC 1345 Mnemonic	*/
 #ifdef NOTDEFINED
 #include "chrtrans/mnem_suni.h"
 #endif /* NOTDEFINED */
@@ -1001,7 +1021,7 @@ PUBLIC int UCTransUniChar ARGS2(
 {
     int rc;
     int UChndl_out;
-    int isdefault, trydefault;
+    int isdefault, trydefault = 0;
     u16 * ut;
 
     if ((UChndl_out = LYCharSet_UC[charset_out].UChndl) < 0) {
@@ -1049,9 +1069,9 @@ PUBLIC int UCTransUniCharStr ARGS5(
 	int,		charset_out,
 	int,		chk_single_flag)
 {
-  int rc, src = 0, ignore_err;
+  int rc = -14, src = 0, ignore_err;
   int UChndl_out;
-  int isdefault, trydefault;
+  int isdefault, trydefault = 0;
   struct unimapdesc_str * repl;
   u16 * ut;
 
@@ -1162,9 +1182,11 @@ PRIVATE int UC_MapGN ARGS2(
 	UCInfo[UChndl].GN = Gn;
 	UC_GNhandles[Gn] = UChndl;
     }
-    if (TRACE)
-	fprintf(stderr,"UC_Map...... Using %i <- %i (%s)\n",
+    if (TRACE) {
+	fprintf(stderr,
+		"UC_MapGN: Using %i <- %i (%s)\n",
 		Gn, UChndl, UCInfo[UChndl].MIMEname);
+    }
     UC_con_set_trans(UChndl,Gn,update_flag);
     return Gn;
 }
@@ -1177,7 +1199,7 @@ PUBLIC int UCTransChar ARGS3(
     int unicode, Gn;
     int rc = -4;
     int UChndl_in, UChndl_out;
-    int isdefault, trydefault;
+    int isdefault, trydefault = 0;
     u16 * ut;
     int upd = 0;
 
@@ -1276,7 +1298,10 @@ PUBLIC long int UCTransToUni ARGS2(
   return unicode;
 }
 
-PUBLIC int UCReverseTransChar ARGS3(char, ch_out, int, charset_in, int, charset_out)
+PUBLIC int UCReverseTransChar ARGS3(
+	char,		ch_out,
+	int,		charset_in,
+	int,		charset_out)
 {
     int Gn;
     int rc;
@@ -1332,7 +1357,7 @@ PUBLIC int UCReverseTransChar ARGS3(char, ch_out, int, charset_in, int, charset_
     }
     return UCTransChar(ch_out, charset_out, charset_in);
 }
-  
+
 /*
  *  Returns string length, or negative value for error.
  */
@@ -1345,9 +1370,9 @@ PUBLIC int UCTransCharStr ARGS6(
 	int,		chk_single_flag)
 {
     int unicode, Gn;
-    int rc, src = 0, ignore_err;
+    int rc = -14, src = 0, ignore_err;
     int UChndl_in, UChndl_out;
-    int isdefault, trydefault;
+    int isdefault, trydefault = 0;
     struct unimapdesc_str * repl;
     u16 * ut;
     int upd = 0;
@@ -1494,7 +1519,7 @@ PUBLIC int UCGetLYhndl_byMIME ARGS1(
     }
     if (LYhndl < 0) {
 	/*
-	 *  Not yet found, special treatment for several CJK charsets etc...
+	 *  Not yet found, special treatment for several CJK charsets, etc.
 	 *  Cheating here.  Also recognize UTF-8 as synonym for
 	 *  UNICODE-1-1-UTF-8 (The example file for now still uses the
 	 *  long name, so that's what will be used internally.).
@@ -1504,30 +1529,38 @@ PUBLIC int UCGetLYhndl_byMIME ARGS1(
 	}
 	if (!strncmp(UC_MIMEcharset, "iso-2022-jp", 11) ||
 	    !strcmp(UC_MIMEcharset, "x-euc-jp")) {
-	  return UCGetLYhndl_byMIME("euc-jp");
+	    return UCGetLYhndl_byMIME("euc-jp");
 	} else if (!strcmp(UC_MIMEcharset, "iso-2022-kr")) {
-	  return UCGetLYhndl_byMIME("euc-kr");
+	    return UCGetLYhndl_byMIME("euc-kr");
 	} else if (!strcmp(UC_MIMEcharset, "gb2312") ||
-		   !strncmp(UC_MIMEcharset, "cn-gb", 5)) {
-	  return UCGetLYhndl_byMIME("euc-cn");
-	} else if (!strcmp(UC_MIMEcharset, "iso-2022-cn")) {
+		   !strncmp(UC_MIMEcharset, "cn-gb", 5) ||
+		   !strcmp(UC_MIMEcharset, "iso-2022-cn")) {
 	    return UCGetLYhndl_byMIME("euc-cn");
 	} else if (!strcmp(UC_MIMEcharset, "cn-big5")) {
 	    return UCGetLYhndl_byMIME("big5");
+	} else if (!strcmp(UC_MIMEcharset, "x-mac-roman") ||
+		   !strcmp(UC_MIMEcharset, "mac-roman")) {
+	    return UCGetLYhndl_byMIME("macintosh");
+	} else if (!strcmp(UC_MIMEcharset, "next") ||
+		   !strcmp(UC_MIMEcharset, "nextstep") ||
+		   !strcmp(UC_MIMEcharset, "x-nextstep")) {
+	    return UCGetLYhndl_byMIME("x-next");
 	} else if (!strcmp(UC_MIMEcharset, "windows-1252")) {
 	    /*
 	     *  It's not my fault that Microsoft hasn't registered
 	     *  the name people are using. - KW
 	     */
 	    return UCGetLYhndl_byMIME("iso-8859-1-windows-3.1-latin-1");
-	} else if (!strncmp(UC_MIMEcharset, "ibm", 3)) {
+	} else if (!strncmp(UC_MIMEcharset, "ibm", 3) ||
+		   !strncmp(UC_MIMEcharset, "cp-", 3)) {
 	    CONST char * cp = UC_MIMEcharset + 3;
 	    char * cptmp = NULL;
 	    if (*cp && isdigit(*cp) &&
 		*(cp++) && isdigit(*cp) &&
 		*(cp++) && isdigit(*cp)) {
 		/*
-		 *  For "ibmNNN<...>", try "cpNNN<...>" if not yet found. - KW
+		 *  For "ibmNNN<...>" or "cp-NNN", try "cpNNN<...>"
+		 *  if not yet found. - KW & FM
 		 */
 		StrAllocCopy(cptmp, UC_MIMEcharset + 1);
 		cptmp[0] = 'c';
@@ -1535,6 +1568,20 @@ PUBLIC int UCGetLYhndl_byMIME ARGS1(
 		LYhndl = UCGetLYhndl_byMIME(cptmp);
 		FREE(cptmp);
 	    }
+	} else if (UC_MIMEcharset[0] == 'c' &&
+		   UC_MIMEcharset[1] == 'p' &&
+		   UC_MIMEcharset[2] == '1' &&
+		   strlen(UC_MIMEcharset) == 6 &&
+		   isdigit((unsigned char)UC_MIMEcharset[3]) &&
+		   isdigit((unsigned char)UC_MIMEcharset[4]) &&
+		   isdigit((unsigned char)UC_MIMEcharset[5])) {
+	    char tmp[16];
+	    /*
+	     *  For "cpNNNN", try "windows-NNNN"
+	     *  if not yet found. - kw
+	     */
+	    sprintf(tmp, "windows-%s", UC_MIMEcharset + 2);
+	    return UCGetLYhndl_byMIME(tmp);
 	} else if (!strcmp(UC_MIMEcharset, "koi-8")) { /* accentsoft bogosity */
 	  return UCGetLYhndl_byMIME("koi8-r");
   }
@@ -1545,7 +1592,7 @@ PUBLIC int UCGetLYhndl_byMIME ARGS1(
 /*
  *  Function UC_setup_LYCharSets_repl() tries to set up a subtable in
  *  LYCharSets[] appropriate for this new charset, for compatibility
- *  with the "old method".  Maybe not nice (maybe not evene necessary
+ *  with the "old method".  Maybe not nice (maybe not even necessary
  *  any more), but it works (as far as it goes..).
  *
  *  We try to be conservative and only allocate new memory for this
@@ -1910,31 +1957,46 @@ PUBLIC void UCInit NOARGS
     atexit(UCcleanup_mem);
     UCconsole_map_init();
 
-    UC_CHARSET_SETUP;
-    UC_CHARSET_SETUP_iso_8859_1;
-    UC_CHARSET_SETUP_iso_8859_2;
-    UC_CHARSET_SETUP_cp437;
-    UC_CHARSET_SETUP_cp850;
-    UC_CHARSET_SETUP_koi8_r;
-
-    UC_CHARSET_SETUP_cp852;
-    UC_CHARSET_SETUP_cp866;
-    UC_CHARSET_SETUP_iso_8859_1_windows_;
-    UC_CHARSET_SETUP_windows_1250;
-    UC_CHARSET_SETUP_windows_1251;
-    UC_CHARSET_SETUP_viscii;
-    UC_CHARSET_SETUP_iso_8859_3;
-    UC_CHARSET_SETUP_iso_8859_4;
-    UC_CHARSET_SETUP_iso_8859_5;
-    UC_CHARSET_SETUP_iso_8859_6;
-    UC_CHARSET_SETUP_iso_8859_7;
-    UC_CHARSET_SETUP_iso_8859_8;
-    UC_CHARSET_SETUP_iso_8859_9;
-    UC_CHARSET_SETUP_iso_8859_10;
-
-    UC_CHARSET_SETUP_unicode_1_1_utf_8;
-    UC_CHARSET_SETUP_mnemonic_ascii_0;
-    UC_CHARSET_SETUP_mnemonic;
+    UC_CHARSET_SETUP;	/* us-ascii */	  /* 7 bit approximations */
+
+    UC_CHARSET_SETUP_iso_8859_1;	  /* ISO Latin 1	  */
+    UC_CHARSET_SETUP_iso_8859_2;	  /* ISO Latin 2	  */
+
+    UC_CHARSET_SETUP_iso_8859_1_windows_; /* WinLatin1 (cp1252)	  */
+    UC_CHARSET_SETUP_dec_mcs;		  /* DEC Multinational    */
+    UC_CHARSET_SETUP_macintosh;		  /* Macintosh (8 bit)    */
+    UC_CHARSET_SETUP_x_next;		  /* NeXT character set   */
+    UC_CHARSET_SETUP_koi8_r;		  /* KOI8-5 Cyrillic	  */
+
+    UC_CHARSET_SETUP_viscii;		  /* Vietnamese (VISCII)  */
+
+    UC_CHARSET_SETUP_cp437;		  /* DosLatinUS (cp437)	  */
+    UC_CHARSET_SETUP_cp850;		  /* DosLatin1 (cp850)	  */
+
+    UC_CHARSET_SETUP_cp852;		  /* DosLatin2 (cp852)	  */
+    UC_CHARSET_SETUP_cp866;		  /* DosCyrillic (cp866)  */
+    UC_CHARSET_SETUP_cp864;		  /* DosArabic (cp864)	  */
+    UC_CHARSET_SETUP_cp737;		  /* DosGreek (cp737)	  */
+    UC_CHARSET_SETUP_cp869;		  /* DosGreek2 (cp869)	  */
+    UC_CHARSET_SETUP_cp862;		  /* DosHebrew (cp862)	  */
+
+    UC_CHARSET_SETUP_windows_1250;	  /* WinLatin1 (cp1251)	  */
+    UC_CHARSET_SETUP_windows_1251;	  /* WinCyrillic (cp1251) */
+    UC_CHARSET_SETUP_windows_1253;		  /* WinGreek (cp1253)	  */
+    UC_CHARSET_SETUP_windows_1255;		  /* WinHebrew (cp1255)	  */
+    UC_CHARSET_SETUP_windows_1256;		  /* WinArabic (cp1256)	  */
+    UC_CHARSET_SETUP_iso_8859_3;	  /* ISO Latin 3	  */
+    UC_CHARSET_SETUP_iso_8859_4;	  /* ISO Latin 4	  */
+    UC_CHARSET_SETUP_iso_8859_5;	  /* ISO 8859-5 Cyrillic  */
+    UC_CHARSET_SETUP_iso_8859_6;	  /* ISO 8869-6 Arabic	  */
+    UC_CHARSET_SETUP_iso_8859_7;	  /* ISO 8859-7 Greek	  */
+    UC_CHARSET_SETUP_iso_8859_8;	  /* ISO 8859-8 Hebrew	  */
+    UC_CHARSET_SETUP_iso_8859_9;	  /* ISO 8859-9 (Latin 5) */
+    UC_CHARSET_SETUP_iso_8859_10;	  /* ISO 8859-10	  */
+
+    UC_CHARSET_SETUP_unicode_1_1_utf_8;	  /* UNICODE UTF 8	  */
+    UC_CHARSET_SETUP_mnemonic_ascii_0;	  /* RFC 1345 w/o Intro	  */
+    UC_CHARSET_SETUP_mnemonic;		  /* RFC 1345 Mnemonic	  */
 #ifdef NOTDEFINED
     UC_CHARSET_SETUP_mnem;
 #endif /* NOTDEFINED */
diff --git a/src/chrtrans/Makefile.old b/src/chrtrans/Makefile.old
index 3b75ab08..7e6c9a99 100644
--- a/src/chrtrans/Makefile.old
+++ b/src/chrtrans/Makefile.old
@@ -22,26 +22,36 @@ FONTMAP_INC = iso01_uni.h# default, if not set by recursive call
 
 CHRTR=
 
-TABLES= $(CHRTR)iso02_uni.h \
- $(CHRTR)iso01_uni.h \
+TABLES= $(CHRTR)iso01_uni.h \
+ $(CHRTR)cp850_uni.h \
+ $(CHRTR)cp1252_uni.h \
+ $(CHRTR)cp437_uni.h \
+ $(CHRTR)dmcs_uni.h \
+ $(CHRTR)mac_uni.h \
+ $(CHRTR)next_uni.h \
+ $(CHRTR)viscii_uni.h \
  $(CHRTR)def7_uni.h \
+ $(CHRTR)iso02_uni.h \
+ $(CHRTR)cp852_uni.h \
+ $(CHRTR)cp1250_uni.h \
  $(CHRTR)iso03_uni.h \
  $(CHRTR)iso04_uni.h \
  $(CHRTR)iso05_uni.h \
+ $(CHRTR)cp866_uni.h \
+ $(CHRTR)cp1251_uni.h \
+ $(CHRTR)koi8r_uni.h \
  $(CHRTR)iso06_uni.h \
+ $(CHRTR)cp864_uni.h \
+ $(CHRTR)cp1256_uni.h \
  $(CHRTR)iso07_uni.h \
+ $(CHRTR)cp737_uni.h \
+ $(CHRTR)cp869_uni.h \
+ $(CHRTR)cp1253_uni.h \
  $(CHRTR)iso08_uni.h \
+ $(CHRTR)cp862_uni.h \
+ $(CHRTR)cp1255_uni.h \
  $(CHRTR)iso09_uni.h \
  $(CHRTR)iso10_uni.h \
- $(CHRTR)koi8r_uni.h \
- $(CHRTR)cp437_uni.h \
- $(CHRTR)cp850_uni.h \
- $(CHRTR)cp852_uni.h \
- $(CHRTR)cp866_uni.h \
- $(CHRTR)cp1250_uni.h \
- $(CHRTR)cp1251_uni.h \
- $(CHRTR)cp1252_uni.h \
- $(CHRTR)viscii_uni.h \
  $(CHRTR)utf8_uni.h \
  $(CHRTR)rfc_suni.h \
  $(CHRTR)mnemonic_suni.h \
@@ -57,9 +67,28 @@ makeuctb: makeuctb.c UCkd.h
 .tbl.h:
 	./makeuctb $*.tbl > $@
 
+def7_uni.h: def7_uni.tbl makeuctb
 iso01_uni.h: iso01_uni.tbl makeuctb
 iso02_uni.h: iso02_uni.tbl makeuctb
-def7_uni.h: def7_uni.tbl makeuctb
+cp1252_uni.h: cp1252_uni.tbl makeuctb
+dmcs_uni.h: dmcs_uni.tbl makeuctb
+mac_uni.h: mac_uni.tbl makeuctb
+next_uni.h: next_uni.tbl makeuctb
+koi8r_uni.h: koi8r_uni.tbl makeuctb
+viscii_uni.h: viscii_uni.tbl makeuctb
+cp437_uni.h: cp437_uni.tbl makeuctb
+cp850_uni.h: cp850_uni.tbl makeuctb
+cp852_uni.h: cp852_uni.tbl makeuctb
+cp866_uni.h: cp866_uni.tbl makeuctb
+cp737_uni.h: cp737_uni.tbl makeuctb
+cp869_uni.h: cp869_uni.tbl makeuctb
+cp864_uni.h: cp864_uni.tbl makeuctb
+cp862_uni.h: cp862_uni.tbl makeuctb
+cp1250_uni.h: cp1250_uni.tbl makeuctb
+cp1251_uni.h: cp1251_uni.tbl makeuctb
+cp1253_uni.h: cp1253_uni.tbl makeuctb
+cp1255_uni.h: cp1255_uni.tbl makeuctb
+cp1256_uni.h: cp1256_uni.tbl makeuctb
 iso03_uni.h: iso03_uni.tbl makeuctb
 iso04_uni.h: iso04_uni.tbl makeuctb
 iso05_uni.h: iso05_uni.tbl makeuctb
@@ -68,17 +97,10 @@ iso07_uni.h: iso07_uni.tbl makeuctb
 iso08_uni.h: iso08_uni.tbl makeuctb
 iso09_uni.h: iso09_uni.tbl makeuctb
 iso10_uni.h: iso10_uni.tbl makeuctb
-koi8r_uni.h: koi8r_uni.tbl makeuctb
-cp437_uni.h: cp437_uni.tbl makeuctb
-cp850_uni.h: cp850_uni.tbl makeuctb
-cp852_uni.h: cp852_uni.tbl makeuctb
-cp1250_uni.h: cp1250_uni.tbl makeuctb
-cp1251_uni.h: cp1251_uni.tbl makeuctb
-cp1252_uni.h: cp1252_uni.tbl makeuctb
 utf8_uni.h: utf8_uni.tbl makeuctb
+rfc_suni.h: rfc_suni.tbl makeuctb
 mnemonic_suni.h: mnemonic_suni.tbl makeuctb
 mnem_suni.h: mnem_suni.tbl makeuctb
-rfc_suni.h: rfc_suni.tbl makeuctb
 
 clean:
 	rm -f makeuctb *.o *uni.h
diff --git a/src/chrtrans/README.format b/src/chrtrans/README.format
index 0ec556a2..8c21714c 100644
--- a/src/chrtrans/README.format
+++ b/src/chrtrans/README.format
@@ -34,12 +34,15 @@ b) directives:
 	The name for this charset in MIME syntax (one word with digits
         and some other non-letters allowed, should be IANA registered)
     Default
-	This is the default (fallback) translation table, it will be used
-	for Unicode -> 8bit (or 7bit) translation if no translation is found
-	in the specific table.
+	If "Y[es]" or "1", this is the default (fallback) translation table,
+	it will be used for Unicode -> 8bit (or 7bit) translation if no
+	translation is found in the specific table.
     FallBack
 	Whether to use the default table if no translation is found in
-	this table.  Normally fallback is used, "FallBack NO" disables it.
+	this table.  Normally fallback is used, "FallBack NO" or "FallBack 0"
+	disables it (actually, other values than "FallBack Y[es]" or
+	"FallBack 1" disable it).
+
     RawOrEnc
 	a number which flags some special property (encoding) for this
         charset [see utf8.uni for example, see UCDefs.h for details].
@@ -103,7 +106,7 @@ d) string replacement definitions:
  * and <unicode> ::= U+<h><h><h><h>
  * and <h> ::= <hexadecimal digit>
  * and <replace> any string not containing '\n' or '\0', taken verbatim
- * and <C replace> any string, with backslash having the usual C meaning
+ * and <C replace> any string, with backslash having the usual C meaning.
 
 Motivation:
 
diff --git a/src/chrtrans/build-chrtrans.com b/src/chrtrans/build-chrtrans.com
index 23c9a2ae..5ddb2590 100644
--- a/src/chrtrans/build-chrtrans.com
+++ b/src/chrtrans/build-chrtrans.com
@@ -44,13 +44,13 @@ $  THEN
 $   CHRcompiler := "GNUC"
 $   v1 = f$verify(1)
 $! GNUC:
-$   cc := gcc 'cc_opts'/INCLUDE=([-],[--],[--.WWW.Library.Implementation]) 
+$   cc := gcc 'CHRcc_opts'/INCLUDE=([-],[--],[--.WWW.Library.Implementation]) 
 $   v1 = 'f$verify(0)'
 $  ELSE
 $   CHRcompiler := "VAXC"
 $   v1 = f$verify(1)
 $! VAXC:
-$   cc := cc 'cc_opts'/INCLUDE=([-],[--],[--.WWW.Library.Implementation]) 
+$   cc := cc 'CHRcc_opts'/INCLUDE=([-],[--],[--.WWW.Library.Implementation]) 
 $   v1 = 'f$verify(0)'
 $  ENDIF
 $ ENDIF
@@ -65,7 +65,7 @@ $ v1 = f$verify(1)
 $!
 $!	Link the Lynx [.SRC.CHRTRANS]makeuctb module.
 $!
-$ link/exe=makeuctb.exe'link_opts' makeuctb, -
+$ link/exe=makeuctb.exe'CHRlink_opts' makeuctb, -
 sys$disk:[-]'CHRcompiler'.opt/opt
 $ v1 = 'f$verify(0)'
 $!
@@ -76,54 +76,74 @@ $!
 $!	Create the Lynx [.SRC.CHRTRANS] header files.
 $!
 $ makeuctb := $'CHRwhere'makeuctb
-$ define/user sys$output 'CHRwhere'iso01_uni.h
+$ define/user sys$output 'CHRwhere'iso01_uni.h	!ISO Latin 1
 $ makeuctb iso01_uni.tbl
-$ define/user sys$output 'CHRwhere'iso02_uni.h
-$ makeuctb iso02_uni.tbl
-$ define/user sys$output 'CHRwhere'def7_uni.h
+$ define/user sys$output 'CHRwhere'cp850_uni.h	! cp850
+$ makeuctb cp850_uni.tbl
+$ define/user sys$output 'CHRwhere'cp1252_uni.h
+$ makeuctb cp1252_uni.tbl
+$ define/user sys$output 'CHRwhere'cp437_uni.h	! cp437
+$ makeuctb cp437_uni.tbl
+$ define/user sys$output 'CHRwhere'dmcs_uni.h	!DEC Multinational
+$ makeuctb dmcs_uni.tbl
+$ define/user sys$output 'CHRwhere'mac_uni.h	!Macintosh (8 bit)
+$ makeuctb mac_uni.tbl
+$ define/user sys$output 'CHRwhere'next_uni.h	!NeXT character set
+$ makeuctb next_uni.tbl
+$ define/user sys$output 'CHRwhere'viscii_uni.h	!Vietnamese (VISCII)
+$ makeuctb viscii_uni.tbl
+$ define/user sys$output 'CHRwhere'def7_uni.h	!7 bit approximations
 $ makeuctb def7_uni.tbl
-$ define/user sys$output 'CHRwhere'iso03_uni.h
+$ define/user sys$output 'CHRwhere'iso02_uni.h	!ISO Latin 2
+$ makeuctb iso02_uni.tbl
+$ define/user sys$output 'CHRwhere'cp852_uni.h	!DosLatin2 (cp852)
+$ makeuctb cp852_uni.tbl
+$ define/user sys$output 'CHRwhere'cp1250_uni.h	!WinLatin2 (cp1250)
+$ makeuctb cp1250_uni.tbl
+$ define/user sys$output 'CHRwhere'iso03_uni.h	!ISO Latin 3
 $ makeuctb iso03_uni.tbl
-$ define/user sys$output 'CHRwhere'iso04_uni.h
+$ define/user sys$output 'CHRwhere'iso04_uni.h	!ISO Latin 4
 $ makeuctb iso04_uni.tbl
-$ define/user sys$output 'CHRwhere'iso05_uni.h
+$ define/user sys$output 'CHRwhere'iso05_uni.h	!ISO Latin 5 Cyrillic
 $ makeuctb iso05_uni.tbl
-$ define/user sys$output 'CHRwhere'iso06_uni.h
+$ define/user sys$output 'CHRwhere'cp866_uni.h	!DosCyrillic (cp866)
+$ makeuctb cp866_uni.tbl
+$ define/user sys$output 'CHRwhere'cp1251_uni.h	!WinCyrillic (cp1251)
+$ makeuctb cp1251_uni.tbl
+$ define/user sys$output 'CHRwhere'koi8r_uni.h	!KOI8-R Cyrillic
+$ makeuctb koi8r_uni.tbl
+$ define/user sys$output 'CHRwhere'iso06_uni.h	!ISO 8859-6 Arabic
 $ makeuctb iso06_uni.tbl
-$ define/user sys$output 'CHRwhere'iso07_uni.h
+$ define/user sys$output 'CHRwhere'cp864_uni.h	!DosArabic (cp864)
+$ makeuctb cp864_uni.tbl
+$ define/user sys$output 'CHRwhere'cp1256_uni.h	!WinArabic (cp1256)
+$ makeuctb cp1256_uni.tbl
+$ define/user sys$output 'CHRwhere'iso07_uni.h	!ISO 8859-7 Greek
 $ makeuctb iso07_uni.tbl
-$ define/user sys$output 'CHRwhere'iso08_uni.h
+$ define/user sys$output 'CHRwhere'cp737_uni.h	!DosGreek (cp737)
+$ makeuctb cp737_uni.tbl
+$ define/user sys$output 'CHRwhere'cp869_uni.h	!DosGreek2 (cp869)
+$ makeuctb cp869_uni.tbl
+$ define/user sys$output 'CHRwhere'cp1253_uni.h	!WinGreek (cp1253)
+$ makeuctb cp1253_uni.tbl
+$ define/user sys$output 'CHRwhere'iso08_uni.h	!ISO 8859-8 Hebrew
 $ makeuctb iso08_uni.tbl
-$ define/user sys$output 'CHRwhere'iso09_uni.h
+$ define/user sys$output 'CHRwhere'cp862_uni.h	!DosHebrew (cp862)
+$ makeuctb cp862_uni.tbl
+$ define/user sys$output 'CHRwhere'cp1255_uni.h	!WinHebrew (cp1255)
+$ makeuctb cp1255_uni.tbl
+$ define/user sys$output 'CHRwhere'iso09_uni.h	!ISO 8859-9 (Latin 5)
 $ makeuctb iso09_uni.tbl
-$ define/user sys$output 'CHRwhere'iso10_uni.h
+$ define/user sys$output 'CHRwhere'iso10_uni.h	!ISO 8859-10
 $ makeuctb iso10_uni.tbl
-$ define/user sys$output 'CHRwhere'koi8r_uni.h
-$ makeuctb koi8r_uni.tbl
-$ define/user sys$output 'CHRwhere'cp437_uni.h
-$ makeuctb cp437_uni.tbl
-$ define/user sys$output 'CHRwhere'cp850_uni.h
-$ makeuctb cp850_uni.tbl
-$ define/user sys$output 'CHRwhere'cp852_uni.h
-$ makeuctb cp852_uni.tbl
-$ define/user sys$output 'CHRwhere'cp866_uni.h
-$ makeuctb cp866_uni.tbl
-$ define/user sys$output 'CHRwhere'cp1250_uni.h
-$ makeuctb cp1250_uni.tbl
-$ define/user sys$output 'CHRwhere'cp1251_uni.h
-$ makeuctb cp1251_uni.tbl
-$ define/user sys$output 'CHRwhere'cp1252_uni.h
-$ makeuctb cp1252_uni.tbl
-$ define/user sys$output 'CHRwhere'viscii_uni.h
-$ makeuctb viscii_uni.tbl
-$ define/user sys$output 'CHRwhere'utf8_uni.h
+$ define/user sys$output 'CHRwhere'utf8_uni.h	!UNICODE UTF 8
 $ makeuctb utf8_uni.tbl
-$ define/user sys$output 'CHRwhere'mnemonic_suni.h
+$ define/user sys$output 'CHRwhere'rfc_suni.h	!RFC 1345 w/o Intro
+$ makeuctb rfc_suni.tbl
+$ define/user sys$output 'CHRwhere'mnemonic_suni.h !RFC 1345 Mnemonic
 $ makeuctb mnemonic_suni.tbl
-$ define/user sys$output 'CHRwhere'mnem_suni.h
+$ define/user sys$output 'CHRwhere'mnem_suni.h	!(not used)
 $ makeuctb mnem_suni.tbl
-$ define/user sys$output 'CHRwhere'rfc_suni.h
-$ makeuctb rfc_suni.tbl
 $ v1 = 'f$verify(0)'
 $ exit
 $!
diff --git a/src/chrtrans/cp1250_uni.tbl b/src/chrtrans/cp1250_uni.tbl
index 75416b67..6f148398 100644
--- a/src/chrtrans/cp1250_uni.tbl
+++ b/src/chrtrans/cp1250_uni.tbl
@@ -2,7 +2,7 @@
 Mwindows-1250
 
 #Name as a Display Charset (used on Options screen)
-O MS Windows CP 1250
+OptionName WinLatin2 (cp1250)
 
 #
 #    Name:     cp1250_WinLatin2 to Unicode table
diff --git a/src/chrtrans/cp1252_uni.tbl b/src/chrtrans/cp1252_uni.tbl
index e9660295..22fa585f 100644
--- a/src/chrtrans/cp1252_uni.tbl
+++ b/src/chrtrans/cp1252_uni.tbl
@@ -1,14 +1,12 @@
 #Shall this become the "default" translation?
-#Meaning of that is currently unclear...  It's different
-#from the default input or defualt output charset...
-#but there has to be exactly one table marked as "default".
+#There has to be exactly one table marked as "default".
 D0
 #
 #The MIME name of this charset. 
 Miso-8859-1-windows-3.1-latin-1
 
 #Name as a Display Charset (used on Options screen)
-O MS Windows CP 1252
+O WinLatin1 (cp1252)
 
 #
 #    Name:     cp1252_WinLatin1 to Unicode table
diff --git a/src/chrtrans/cp1253_uni.tbl b/src/chrtrans/cp1253_uni.tbl
new file mode 100644
index 00000000..176ba7e6
--- /dev/null
+++ b/src/chrtrans/cp1253_uni.tbl
@@ -0,0 +1,157 @@
+#The MIME name of this charset. 
+MIMEname windows-1253
+
+#Name as a Display Charset (used on Options screen)
+OWinGreek (cp1253)
+
+#    Name:     cp1253_WinGreek to Unicode table
+#    Unicode version: 2.0
+#    Table version: 2.00
+#    Table format:  Format A
+#    Date:          04/24/96
+#    Authors:       Lori Brownell <loribr@microsoft.com>
+#                   K.D. Chang    <a-kchang@microsoft.com>
+#    General notes: none
+#
+#    Format: Three tab-separated columns
+#        Column #1 is the cp1253_WinGreek code (in hex)
+#        Column #2 is the Unicode (in hex as 0xXXXX)
+#        Column #3 is the Unicode name (follows a comment sign, '#')
+#
+#    The entries are in cp1253_WinGreek order
+#
+##################
+
+0x20-0x7f       idem
+#
+#0x80		#UNDEFINED
+#0x81		#UNDEFINED
+0x82	U+201A	#SINGLE LOW-9 QUOTATION MARK
+0x83	U+0192	#LATIN SMALL LETTER F WITH HOOK
+0x84	U+201E	#DOUBLE LOW-9 QUOTATION MARK
+0x85	U+2026	#HORIZONTAL ELLIPSIS
+0x86	U+2020	#DAGGER
+0x87	U+2021	#DOUBLE DAGGER
+#0x88		#UNDEFINED
+0x89	U+2030	#PER MILLE SIGN
+#0x8A		#UNDEFINED
+0x8B	U+2039	#SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+#0x8C		#UNDEFINED
+#0x8D		#UNDEFINED
+#0x8E		#UNDEFINED
+#0x8F		#UNDEFINED
+#0x90		#UNDEFINED
+0x91	U+2018	#LEFT SINGLE QUOTATION MARK
+0x92	U+2019	#RIGHT SINGLE QUOTATION MARK
+0x93	U+201C	#LEFT DOUBLE QUOTATION MARK
+0x94	U+201D	#RIGHT DOUBLE QUOTATION MARK
+0x95	U+2022	#BULLET
+0x96	U+2013	#EN DASH
+0x97	U+2014	#EM DASH
+#0x98		#UNDEFINED
+0x99	U+2122	#TRADE MARK SIGN
+#0x9A		#UNDEFINED
+0x9B	U+203A	#SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+#0x9C		#UNDEFINED
+#0x9D		#UNDEFINED
+#0x9E		#UNDEFINED
+#0x9F		#UNDEFINED
+0xA0	U+00A0	#NO-BREAK SPACE
+0xA1	U+0385	#GREEK DIALYTIKA TONOS
+0xA2	U+0386	#GREEK CAPITAL LETTER ALPHA WITH TONOS
+0xA3	U+00A3	#POUND SIGN
+0xA4	U+00A4	#CURRENCY SIGN
+0xA5	U+00A5	#YEN SIGN
+0xA6	U+00A6	#BROKEN BAR
+0xA7	U+00A7	#SECTION SIGN
+0xA8	U+00A8	#DIAERESIS
+0xA9	U+00A9	#COPYRIGHT SIGN
+#0xAA		#UNDEFINED
+0xAB	U+00AB	#LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xAC	U+00AC	#NOT SIGN
+0xAD	U+00AD	#SOFT HYPHEN
+0xAE	U+00AE	#REGISTERED SIGN
+0xAF	U+2015	#HORIZONTAL BAR
+0xB0	U+00B0	#DEGREE SIGN
+0xB1	U+00B1	#PLUS-MINUS SIGN
+0xB2	U+00B2	#SUPERSCRIPT TWO
+0xB3	U+00B3	#SUPERSCRIPT THREE
+0xB4	U+0384	#GREEK TONOS
+0xB5	U+00B5	#MICRO SIGN
+0xB6	U+00B6	#PILCROW SIGN
+0xB7	U+00B7	#MIDDLE DOT
+0xB8	U+0388	#GREEK CAPITAL LETTER EPSILON WITH TONOS
+0xB9	U+0389	#GREEK CAPITAL LETTER ETA WITH TONOS
+0xBA	U+038A	#GREEK CAPITAL LETTER IOTA WITH TONOS
+0xBB	U+00BB	#RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xBC	U+038C	#GREEK CAPITAL LETTER OMICRON WITH TONOS
+0xBD	U+00BD	#VULGAR FRACTION ONE HALF
+0xBE	U+038E	#GREEK CAPITAL LETTER UPSILON WITH TONOS
+0xBF	U+038F	#GREEK CAPITAL LETTER OMEGA WITH TONOS
+0xC0	U+0390	#GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
+0xC1	U+0391	#GREEK CAPITAL LETTER ALPHA
+0xC2	U+0392	#GREEK CAPITAL LETTER BETA
+0xC3	U+0393	#GREEK CAPITAL LETTER GAMMA
+0xC4	U+0394	#GREEK CAPITAL LETTER DELTA
+0xC5	U+0395	#GREEK CAPITAL LETTER EPSILON
+0xC6	U+0396	#GREEK CAPITAL LETTER ZETA
+0xC7	U+0397	#GREEK CAPITAL LETTER ETA
+0xC8	U+0398	#GREEK CAPITAL LETTER THETA
+0xC9	U+0399	#GREEK CAPITAL LETTER IOTA
+0xCA	U+039A	#GREEK CAPITAL LETTER KAPPA
+0xCB	U+039B	#GREEK CAPITAL LETTER LAMDA
+0xCC	U+039C	#GREEK CAPITAL LETTER MU
+0xCD	U+039D	#GREEK CAPITAL LETTER NU
+0xCE	U+039E	#GREEK CAPITAL LETTER XI
+0xCF	U+039F	#GREEK CAPITAL LETTER OMICRON
+0xD0	U+03A0	#GREEK CAPITAL LETTER PI
+0xD1	U+03A1	#GREEK CAPITAL LETTER RHO
+#0xD2		#UNDEFINED
+0xD3	U+03A3	#GREEK CAPITAL LETTER SIGMA
+0xD4	U+03A4	#GREEK CAPITAL LETTER TAU
+0xD5	U+03A5	#GREEK CAPITAL LETTER UPSILON
+0xD6	U+03A6	#GREEK CAPITAL LETTER PHI
+0xD7	U+03A7	#GREEK CAPITAL LETTER CHI
+0xD8	U+03A8	#GREEK CAPITAL LETTER PSI
+0xD9	U+03A9	#GREEK CAPITAL LETTER OMEGA
+0xDA	U+03AA	#GREEK CAPITAL LETTER IOTA WITH DIALYTIKA
+0xDB	U+03AB	#GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA
+0xDC	U+03AC	#GREEK SMALL LETTER ALPHA WITH TONOS
+0xDD	U+03AD	#GREEK SMALL LETTER EPSILON WITH TONOS
+0xDE	U+03AE	#GREEK SMALL LETTER ETA WITH TONOS
+0xDF	U+03AF	#GREEK SMALL LETTER IOTA WITH TONOS
+0xE0	U+03B0	#GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
+0xE1	U+03B1	#GREEK SMALL LETTER ALPHA
+0xE2	U+03B2	#GREEK SMALL LETTER BETA
+0xE3	U+03B3	#GREEK SMALL LETTER GAMMA
+0xE4	U+03B4	#GREEK SMALL LETTER DELTA
+0xE5	U+03B5	#GREEK SMALL LETTER EPSILON
+0xE6	U+03B6	#GREEK SMALL LETTER ZETA
+0xE7	U+03B7	#GREEK SMALL LETTER ETA
+0xE8	U+03B8	#GREEK SMALL LETTER THETA
+0xE9	U+03B9	#GREEK SMALL LETTER IOTA
+0xEA	U+03BA	#GREEK SMALL LETTER KAPPA
+0xEB	U+03BB	#GREEK SMALL LETTER LAMDA
+0xEC	U+03BC	#GREEK SMALL LETTER MU
+0xED	U+03BD	#GREEK SMALL LETTER NU
+0xEE	U+03BE	#GREEK SMALL LETTER XI
+0xEF	U+03BF	#GREEK SMALL LETTER OMICRON
+0xF0	U+03C0	#GREEK SMALL LETTER PI
+0xF1	U+03C1	#GREEK SMALL LETTER RHO
+0xF2	U+03C2	#GREEK SMALL LETTER FINAL SIGMA
+0xF3	U+03C3	#GREEK SMALL LETTER SIGMA
+0xF4	U+03C4	#GREEK SMALL LETTER TAU
+0xF5	U+03C5	#GREEK SMALL LETTER UPSILON
+0xF6	U+03C6	#GREEK SMALL LETTER PHI
+0xF7	U+03C7	#GREEK SMALL LETTER CHI
+0xF8	U+03C8	#GREEK SMALL LETTER PSI
+0xF9	U+03C9	#GREEK SMALL LETTER OMEGA
+0xFA	U+03CA	#GREEK SMALL LETTER IOTA WITH DIALYTIKA
+0xFB	U+03CB	#GREEK SMALL LETTER UPSILON WITH DIALYTIKA
+0xFC	U+03CC	#GREEK SMALL LETTER OMICRON WITH TONOS
+0xFD	U+03CD	#GREEK SMALL LETTER UPSILON WITH TONOS
+0xFE	U+03CE	#GREEK SMALL LETTER OMEGA WITH TONOS
+#0xFF		#UNDEFINED
+
+# TRADE MARK SIGN:
+U+2122:(TM)
diff --git a/src/chrtrans/cp1255_uni.tbl b/src/chrtrans/cp1255_uni.tbl
new file mode 100644
index 00000000..eb446da8
--- /dev/null
+++ b/src/chrtrans/cp1255_uni.tbl
@@ -0,0 +1,157 @@
+#The MIME name of this charset.
+MIMEname windows-1255
+
+#Name as a Display Charset (used on Options screen).
+OWinHebrew (cp1255)
+
+#    Name:     cp1255_WinHebrew to Unicode table
+#    Unicode version: 2.0
+#    Table version: 2.00
+#    Table format:  Format A
+#    Date:          04/24/96
+#    Authors:       Lori Brownell <loribr@microsoft.com>
+#                   K.D. Chang    <a-kchang@microsoft.com>
+#    General notes: none
+#
+#    Format: Three tab-separated columns
+#        Column #1 is the cp1255_WinHebrew code (in hex)
+#        Column #2 is the Unicode (in hex as 0xXXXX)
+#        Column #3 is the Unicode name (follows a comment sign, '#')
+#
+#    The entries are in cp1255_WinHebrew order
+#
+##################
+
+0x20-0x7f       idem
+#
+#0x80		#UNDEFINED
+#0x81		#UNDEFINED
+0x82	U+201A	#LOW SINGLE COMMA QUOTATION MARK
+0x83	U+0192	#LATIN SMALL LETTER SCRIPT F
+0x84	U+201E	#LOW DOUBLE COMMA QUOTATION MARK
+0x85	U+2026	#HORIZONTAL ELLIPSIS
+0x86	U+2020	#DAGGER
+0x87	U+2021	#DOUBLE DAGGER
+0x88	U+02C6	#MODIFIER LETTER CIRCUMFLEX
+0x89	U+2030	#PER MILLE SIGN
+#0x8A		#UNDEFINED
+0x8B	U+2039	#LEFT POINTING SINGLE GUILLEMET
+#0x8C		#UNDEFINED
+#0x8D		#UNDEFINED
+#0x8E		#UNDEFINED
+#0x8F		#UNDEFINED
+#0x90		#UNDEFINED
+0x91	U+2018	#SINGLE TURNED COMMA QUOTATION MARK
+0x92	U+2019	#SINGLE COMMA QUOTATION MARK
+0x93	U+201C	#DOUBLE TURNED COMMA QUOTATION MARK
+0x94	U+201D	#DOUBLE COMMA QUOTATION MARK
+0x95	U+2022	#BULLET
+0x96	U+2013	#EN DASH
+0x97	U+2014	#EM DASH
+0x98	U+02DC	#SPACING TILDE
+0x99	U+2122	#TRADEMARK
+#0x9A		#UNDEFINED
+0x9B	U+203A	#RIGHT POINTING SINGLE GUILLEMET
+#0x9C		#UNDEFINED
+#0x9D		#UNDEFINED
+#0x9E		#UNDEFINED
+#0x9F		#UNDEFINED
+0xA0	U+00A0	#NON-BREAKING SPACE
+#0xA1		#UNDEFINED
+0xA2	U+00A2	#CENT SIGN
+0xA3	U+00A3	#POUND SIGN
+0xA4	U+20AA	#NEW SHEQEL SIGN
+0xA5	U+00A5	#YEN SIGN
+0xA6	U+00A6	#BROKEN VERTICAL BAR
+0xA7	U+00A7	#SECTION SIGN
+0xA8	U+00A8	#SPACING DIAERESIS
+0xA9	U+00A9	#COPYRIGHT SIGN
+#0xAA		#UNDEFINED
+0xAB	U+00AB	#LEFT POINTING GUILLEMET
+0xAC	U+00AC	#NOT SIGN
+0xAD	U+00AD	#SOFT HYPHEN
+0xAE	U+00AE	#REGISTERED TRADE MARK SIGN
+0xAF	U+00AF	#SPACING MACRON
+0xB0	U+00B0	#DEGREE SIGN
+0xB1	U+00B1	#PLUS-OR-MINUS SIGN
+0xB2	U+00B2	#SUPERSCRIPT DIGIT TWO
+0xB3	U+00B3	#SUPERSCRIPT DIGIT THREE
+0xB4	U+00B4	#SPACING ACUTE
+0xB5	U+00B5	#MICRO SIGN
+0xB6	U+00B6	#PARAGRAPH SIGN
+0xB7	U+00B7	#MIDDLE DOT
+#0xB8		#UNDEFINED
+0xB9	U+00B9	#SUPERSCRIPT DIGIT ONE
+#0xBA		#UNDEFINED
+0xBB	U+00BB	#RIGHT POINTING GUILLEMET
+0xBC	U+00BC	#FRACTION ONE QUARTER
+0xBD	U+00BD	#FRACTION ONE HALF
+0xBE	U+00BE	#FRACTION THREE QUARTERS
+#0xBF		#UNDEFINED
+0xC0	U+05B0	#HEBREW POINT SHEVA
+0xC1	U+05B1	#HEBREW POINT HATAF SEGOL
+0xC2	U+05B2	#HEBREW POINT HATAF PATAH
+0xC3	U+05B3	#HEBREW POINT HATAF QAMATS
+0xC4	U+05B4	#HEBREW POINT HIRIQ
+0xC5	U+05B5	#HEBREW POINT TSERE
+0xC6	U+05B6	#HEBREW POINT SEGOL
+0xC7	U+05B7	#HEBREW POINT PATAH
+0xC8	U+05B8	#HEBREW POINT QAMATS
+0xC9	U+05B9	#HEBREW POINT HOLAM
+0xCA	U+05BA	#HEBREW POINT
+0xCB	U+05BB	#HEBREW POINT QUBUTS
+0xCC	U+05BC	#HEBREW POINT DAGESH
+0xCD	U+05BD	#HEBREW POINT METEG
+0xCE	U+05BE	#HEBREW PUNCTUATION MAQAF
+0xCF	U+05BF	#HEBREW POINT RAFE
+0xD0	U+05C0	#HEBREW POINT PASEQ
+0xD1	U+05C1	#HEBREW POINT SHIN DOT
+0xD2	U+05C2	#HEBREW POINT SIN DOT
+0xD3	U+05C3	#HEBREW PUNCTUATION SOF PASUQ
+0xD4	U+05F0	#HEBREW LETTER DOUBLE VAV
+0xD5	U+05F1	#HEBREW LETTER VAV YOD
+0xD6	U+05F2	#HEBREW LETTER DOUBLE YOD
+#0xD7		#UNDEFINED
+#0xD8		#UNDEFINED
+#0xD9		#UNDEFINED
+#0xDA		#UNDEFINED
+#0xDB		#UNDEFINED
+#0xDC		#UNDEFINED
+#0xDD		#UNDEFINED
+#0xDE		#UNDEFINED
+#0xDF		#UNDEFINED
+0xE0	U+05D0	#HEBREW LETTER ALEF
+0xE1	U+05D1	#HEBREW LETTER BET
+0xE2	U+05D2	#HEBREW LETTER GIMEL
+0xE3	U+05D3	#HEBREW LETTER DALET
+0xE4	U+05D4	#HEBREW LETTER HE
+0xE5	U+05D5	#HEBREW LETTER VAV
+0xE6	U+05D6	#HEBREW LETTER ZAYIN
+0xE7	U+05D7	#HEBREW LETTER HET
+0xE8	U+05D8	#HEBREW LETTER TET
+0xE9	U+05D9	#HEBREW LETTER YOD
+0xEA	U+05DA	#HEBREW LETTER FINAL KAF
+0xEB	U+05DB	#HEBREW LETTER KAF
+0xEC	U+05DC	#HEBREW LETTER LAMED
+0xED	U+05DD	#HEBREW LETTER FINAL MEM
+0xEE	U+05DE	#HEBREW LETTER MEM
+0xEF	U+05DF	#HEBREW LETTER FINAL NUN
+0xF0	U+05E0	#HEBREW LETTER NUN
+0xF1	U+05E1	#HEBREW LETTER SAMEKH
+0xF2	U+05E2	#HEBREW LETTER AYIN
+0xF3	U+05E3	#HEBREW LETTER FINAL PE
+0xF4	U+05E4	#HEBREW LETTER PE
+0xF5	U+05E5	#HEBREW LETTER FINAL TSADI
+0xF6	U+05E6	#HEBREW LETTER TSADI
+0xF7	U+05E7	#HEBREW LETTER QOF
+0xF8	U+05E8	#HEBREW LETTER RESH
+0xF9	U+05E9	#HEBREW LETTER SHIN
+0xFA	U+05EA	#HEBREW LETTER TAV
+#0xFB		#UNDEFINED
+#0xFC		#UNDEFINED
+0xFD	U+200E	#LEFT-TO-RIGHT MARK
+0xFE	U+200F	#RIGHT-TO-LEFT MARK
+#0xFF		#UNDEFINED
+
+# TRADE MARK SIGN:
+U+2122:(TM)
diff --git a/src/chrtrans/cp1256_uni.tbl b/src/chrtrans/cp1256_uni.tbl
new file mode 100644
index 00000000..900c72c3
--- /dev/null
+++ b/src/chrtrans/cp1256_uni.tbl
@@ -0,0 +1,157 @@
+#The MIME name of this charset.
+MIMEname windows-1256
+
+#Name as a Display Charset (used on Options screen).
+OWinArabic (cp1256)
+
+#    Name:     cp1256_WinArabic to Unicode table
+#    Unicode version: 2.0
+#    Table version: 2.00
+#    Table format:  Format A
+#    Date:          04/24/96
+#    Authors:       Lori Brownell <loribr@microsoft.com>
+#                   K.D. Chang    <a-kchang@microsoft.com>
+#    General notes: none
+#
+#    Format: Three tab-separated columns
+#        Column #1 is the cp1256_WinArabic code (in hex)
+#        Column #2 is the Unicode (in hex as 0xXXXX)
+#        Column #3 is the Unicode name (follows a comment sign, '#')
+#
+#    The entries are in cp1256_WinArabic order
+#
+##################
+
+0x20-0x7f       idem
+#
+#0x80		#UNDEFINED
+0x81	U+067E	#ARABIC TAA WITH THREE DOTS BELOW
+0x82	U+201A	#LOW SINGLE COMMA QUOTATION MARK
+0x83	U+0192	#LATIN SMALL LETTER SCRIPT F
+0x84	U+201E	#LOW DOUBLE COMMA QUOTATION MARK
+0x85	U+2026	#HORIZONTAL ELLIPSIS
+0x86	U+2020	#DAGGER
+0x87	U+2021	#DOUBLE DAGGER
+0x88	U+02C6	#MODIFIER LETTER CIRCUMFLEX
+0x89	U+2030	#PER MILLE SIGN
+#0x8A		#UNDEFINED
+0x8B	U+2039	#LEFT POINTING SINGLE GUILLEMET
+0x8C	U+0152	#LATIN CAPITAL LETTER O E
+0x8D	U+0686	#ARABIC HAA WITH MIDDLE THREE DOTS DOWNWARD
+0x8E	U+0698	#ARABIC RA WITH THREE DOTS ABOVE
+#0x8F		#UNDEFINED
+0x90	U+06AF	#ARABIC GAF
+0x91	U+2018	#SINGLE TURNED COMMA QUOTATION MARK
+0x92	U+2019	#SINGLE COMMA QUOTATION MARK
+0x93	U+201C	#DOUBLE TURNED COMMA QUOTATION MARK
+0x94	U+201D	#DOUBLE COMMA QUOTATION MARK
+0x95	U+2022	#BULLET
+0x96	U+2013	#EN DASH
+0x97	U+2014	#EM DASH
+#0x98		#UNDEFINED
+0x99	U+2122	#TRADEMARK
+#0x9A		#UNDEFINED
+0x9B	U+203A	#RIGHT POINTING SINGLE GUILLEMET
+0x9C	U+0153	#LATIN SMALL LETTER O E
+0x9D	U+200C	#ZERO WIDTH NON-JOINER
+0x9E	U+200D	#ZERO WIDTH JOINER
+#0x9F		#UNDEFINED
+0xA0	U+00A0	#NON-BREAKING SPACE
+0xA1	U+060C	#ARABIC COMMA
+0xA2	U+00A2	#CENT SIGN
+0xA3	U+00A3	#POUND SIGN
+0xA4	U+00A4	#CURRENCY SIGN
+0xA5	U+00A5	#YEN SIGN
+0xA6	U+00A6	#BROKEN VERTICAL BAR
+0xA7	U+00A7	#SECTION SIGN
+0xA8	U+00A8	#SPACING DIAERESIS
+0xA9	U+00A9	#COPYRIGHT SIGN
+#0xAA		#UNDEFINED
+0xAB	U+00AB	#LEFT POINTING GUILLEMET
+0xAC	U+00AC	#NOT SIGN
+0xAD	U+00AD	#SOFT HYPHEN
+0xAE	U+00AE	#REGISTERED TRADE MARK SIGN
+0xAF	U+00AF	#SPACING MACRON
+0xB0	U+00B0	#DEGREE SIGN
+0xB1	U+00B1	#PLUS-OR-MINUS SIGN
+0xB2	U+00B2	#SUPERSCRIPT DIGIT TWO
+0xB3	U+00B3	#SUPERSCRIPT DIGIT THREE
+0xB4	U+00B4	#SPACING ACUTE
+0xB5	U+00B5	#MICRO SIGN
+0xB6	U+00B6	#PARAGRAPH SIGN
+0xB7	U+00B7	#MIDDLE DOT
+0xB8	U+00B8	#SPACING CEDILLA
+0xB9	U+00B9	#SUPERSCRIPT DIGIT ONE
+0xBA	U+061B	#ARABIC SEMICOLON
+0xBB	U+00BB	#RIGHT POINTING GUILLEMET
+0xBC	U+00BC	#FRACTION ONE QUARTER
+0xBD	U+00BD	#FRACTION ONE HALF
+0xBE	U+00BE	#FRACTION THREE QUARTERS
+0xBF	U+061F	#ARABIC QUESTION MARK
+#0xC0		#UNDEFINED
+0xC1	U+0621	#ARABIC LETTER HAMZAH
+0xC2	U+0622	#ARABIC LETTER MADDAH ON ALEF
+0xC3	U+0623	#ARABIC LETTER HAMZAH ON ALEF
+0xC4	U+0624	#ARABIC LETTER HAMZAH ON WAW
+0xC5	U+0625	#ARABIC LETTER HAMZAH UNDER ALEF
+0xC6	U+0626	#ARABIC LETTER HAMZAH ON YA
+0xC7	U+0627	#ARABIC LETTER ALEF
+0xC8	U+0628	#ARABIC LETTER BAA
+0xC9	U+0629	#ARABIC LETTER TAA MARBUTAH
+0xCA	U+062A	#ARABIC LETTER TAA
+0xCB	U+062B	#ARABIC LETTER THAA
+0xCC	U+062C	#ARABIC LETTER JEEM
+0xCD	U+062D	#ARABIC LETTER HAA
+0xCE	U+062E	#ARABIC LETTER KHAA
+0xCF	U+062F	#ARABIC LETTER DAL
+0xD0	U+0630	#ARABIC LETTER THAL
+0xD1	U+0631	#ARABIC LETTER RA
+0xD2	U+0632	#ARABIC LETTER ZAIN
+0xD3	U+0633	#ARABIC LETTER SEEN
+0xD4	U+0634	#ARABIC LETTER SHEEN
+0xD5	U+0635	#ARABIC LETTER SAD
+0xD6	U+0636	#ARABIC LETTER DAD
+0xD7	U+00D7	#MULTIPLICATION SIGN
+0xD8	U+0637	#ARABIC LETTER TAH
+0xD9	U+0638	#ARABIC LETTER DHAH
+0xDA	U+0639	#ARABIC LETTER AIN
+0xDB	U+063A	#ARABIC LETTER GHAIN
+0xDC	U+0640	#ARABIC TATWEEL
+0xDD	U+0641	#ARABIC LETTER FA
+0xDE	U+0642	#ARABIC LETTER QAF
+0xDF	U+0643	#ARABIC LETTER CAF
+0xE0	U+00E0	#LATIN SMALL LETTER A GRAVE
+0xE1	U+0644	#ARABIC LETTER LAM
+0xE2	U+00E2	#LATIN SMALL LETTER A CIRCUMFLEX
+0xE3	U+0645	#ARABIC LETTER MEEM
+0xE4	U+0646	#ARABIC LETTER NOON
+0xE5	U+0647	#ARABIC LETTER HA
+0xE6	U+0648	#ARABIC LETTER WAW
+0xE7	U+00E7	#LATIN SMALL LETTER C CEDILLA
+0xE8	U+00E8	#LATIN SMALL LETTER E GRAVE
+0xE9	U+00E9	#LATIN SMALL LETTER E ACUTE
+0xEA	U+00EA	#LATIN SMALL LETTER E CIRCUMFLEX
+0xEB	U+00EB	#LATIN SMALL LETTER E DIAERESIS
+0xEC	U+0649	#ARABIC LETTER ALEF MAQSURAH
+0xED	U+064A	#ARABIC LETTER YA
+0xEE	U+00EE	#LATIN SMALL LETTER I CIRCUMFLEX
+0xEF	U+00EF	#LATIN SMALL LETTER I DIAERESIS
+0xF0	U+064B	#ARABIC FATHATAN
+0xF1	U+064C	#ARABIC DAMMATAN
+0xF2	U+064D	#ARABIC KASRATAN
+0xF3	U+064E	#ARABIC FATHAH
+0xF4	U+00F4	#LATIN SMALL LETTER O CIRCUMFLEX
+0xF5	U+064F	#ARABIC DAMMAH
+0xF6	U+0650	#ARABIC KASRAH
+0xF7	U+00F7	#DIVISION SIGN
+0xF8	U+0651	#ARABIC SHADDAH
+0xF9	U+00F9	#LATIN SMALL LETTER U GRAVE
+0xFA	U+0652	#ARABIC SUKUN
+0xFB	U+00FB	#LATIN SMALL LETTER U CIRCUMFLEX
+0xFC	U+00FC	#LATIN SMALL LETTER U DIAERESIS
+0xFD	U+200E	#LEFT-TO-RIGHT MARK
+0xFE	U+200F	#RIGHT-TO-LEFT MARK
+#0xFF		#UNDEFINED
+
+# TRADE MARK SIGN:
+U+2122:(TM)
diff --git a/src/chrtrans/cp437_uni.tbl b/src/chrtrans/cp437_uni.tbl
index 6bfbab22..56c937a5 100644
--- a/src/chrtrans/cp437_uni.tbl
+++ b/src/chrtrans/cp437_uni.tbl
@@ -18,7 +18,7 @@ OIBM PC character set
 #    General notes: none
 #
 #    Format: Three tab-separated columns
-#        Column #1 is the cp1255_WinHebrew code (in hex)
+#        Column #1 is the cp437 code (in hex)
 #        Column #2 is the Unicode (in hex as U+XXXX)
 #        Column #3 is the Unicode name (follows a comment sign, '#')
 #
diff --git a/src/chrtrans/cp737_uni.tbl b/src/chrtrans/cp737_uni.tbl
new file mode 100644
index 00000000..b1d44adf
--- /dev/null
+++ b/src/chrtrans/cp737_uni.tbl
@@ -0,0 +1,158 @@
+#The MIME name of this charset. 
+Mcp737
+
+#Name as a Display Charset (used on Options screen)
+ODosGreek (cp737)
+
+#
+#    Name:     cp737_DOSGreek to Unicode table
+#    Unicode version: 2.0
+#    Table version: 2.00
+#    Table format:  Format A
+#    Date:          04/24/96
+#    Authors:       Lori Brownell <loribr@microsoft.com>
+#                   K.D. Chang    <a-kchang@microsoft.com>
+#    General notes: none
+#
+#    Format: Three tab-separated columns
+#        Column #1 is the cp737_DOSGreek code (in hex)
+#        Column #2 is the Unicode (in hex as 0xXXXX)
+#        Column #3 is the Unicode name (follows a comment sign, '#')
+#
+#    The entries are in cp737_DOSGreek order
+#
+##################
+
+0x20-0x7f       idem
+#
+0x80	U+0391	#GREEK CAPITAL LETTER ALPHA
+0x81	U+0392	#GREEK CAPITAL LETTER BETA
+0x82	U+0393	#GREEK CAPITAL LETTER GAMMA
+0x83	U+0394	#GREEK CAPITAL LETTER DELTA
+0x84	U+0395	#GREEK CAPITAL LETTER EPSILON
+0x85	U+0396	#GREEK CAPITAL LETTER ZETA
+0x86	U+0397	#GREEK CAPITAL LETTER ETA
+0x87	U+0398	#GREEK CAPITAL LETTER THETA
+0x88	U+0399	#GREEK CAPITAL LETTER IOTA
+0x89	U+039a	#GREEK CAPITAL LETTER KAPPA
+0x8a	U+039b	#GREEK CAPITAL LETTER LAMDA
+0x8b	U+039c	#GREEK CAPITAL LETTER MU
+0x8c	U+039d	#GREEK CAPITAL LETTER NU
+0x8d	U+039e	#GREEK CAPITAL LETTER XI
+0x8e	U+039f	#GREEK CAPITAL LETTER OMICRON
+0x8f	U+03a0	#GREEK CAPITAL LETTER PI
+0x90	U+03a1	#GREEK CAPITAL LETTER RHO
+0x91	U+03a3	#GREEK CAPITAL LETTER SIGMA
+0x92	U+03a4	#GREEK CAPITAL LETTER TAU
+0x93	U+03a5	#GREEK CAPITAL LETTER UPSILON
+0x94	U+03a6	#GREEK CAPITAL LETTER PHI
+0x95	U+03a7	#GREEK CAPITAL LETTER CHI
+0x96	U+03a8	#GREEK CAPITAL LETTER PSI
+0x97	U+03a9	#GREEK CAPITAL LETTER OMEGA
+0x98	U+03b1	#GREEK SMALL LETTER ALPHA
+0x99	U+03b2	#GREEK SMALL LETTER BETA
+0x9a	U+03b3	#GREEK SMALL LETTER GAMMA
+0x9b	U+03b4	#GREEK SMALL LETTER DELTA
+0x9c	U+03b5	#GREEK SMALL LETTER EPSILON
+0x9d	U+03b6	#GREEK SMALL LETTER ZETA
+0x9e	U+03b7	#GREEK SMALL LETTER ETA
+0x9f	U+03b8	#GREEK SMALL LETTER THETA
+0xa0	U+03b9	#GREEK SMALL LETTER IOTA
+0xa1	U+03ba	#GREEK SMALL LETTER KAPPA
+0xa2	U+03bb	#GREEK SMALL LETTER LAMDA
+0xa3	U+03bc	#GREEK SMALL LETTER MU
+0xa4	U+03bd	#GREEK SMALL LETTER NU
+0xa5	U+03be	#GREEK SMALL LETTER XI
+0xa6	U+03bf	#GREEK SMALL LETTER OMICRON
+0xa7	U+03c0	#GREEK SMALL LETTER PI
+0xa8	U+03c1	#GREEK SMALL LETTER RHO
+0xa9	U+03c3	#GREEK SMALL LETTER SIGMA
+0xaa	U+03c2	#GREEK SMALL LETTER FINAL SIGMA
+0xab	U+03c4	#GREEK SMALL LETTER TAU
+0xac	U+03c5	#GREEK SMALL LETTER UPSILON
+0xad	U+03c6	#GREEK SMALL LETTER PHI
+0xae	U+03c7	#GREEK SMALL LETTER CHI
+0xaf	U+03c8	#GREEK SMALL LETTER PSI
+0xb0	U+2591	#LIGHT SHADE
+0xb1	U+2592	#MEDIUM SHADE
+0xb2	U+2593	#DARK SHADE
+0xb3	U+2502	#BOX DRAWINGS LIGHT VERTICAL
+0xb4	U+2524	#BOX DRAWINGS LIGHT VERTICAL AND LEFT
+0xb5	U+2561	#BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE
+0xb6	U+2562	#BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE
+0xb7	U+2556	#BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE
+0xb8	U+2555	#BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE
+0xb9	U+2563	#BOX DRAWINGS DOUBLE VERTICAL AND LEFT
+0xba	U+2551	#BOX DRAWINGS DOUBLE VERTICAL
+0xbb	U+2557	#BOX DRAWINGS DOUBLE DOWN AND LEFT
+0xbc	U+255d	#BOX DRAWINGS DOUBLE UP AND LEFT
+0xbd	U+255c	#BOX DRAWINGS UP DOUBLE AND LEFT SINGLE
+0xbe	U+255b	#BOX DRAWINGS UP SINGLE AND LEFT DOUBLE
+0xbf	U+2510	#BOX DRAWINGS LIGHT DOWN AND LEFT
+0xc0	U+2514	#BOX DRAWINGS LIGHT UP AND RIGHT
+0xc1	U+2534	#BOX DRAWINGS LIGHT UP AND HORIZONTAL
+0xc2	U+252c	#BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
+0xc3	U+251c	#BOX DRAWINGS LIGHT VERTICAL AND RIGHT
+0xc4	U+2500	#BOX DRAWINGS LIGHT HORIZONTAL
+0xc5	U+253c	#BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
+0xc6	U+255e	#BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
+0xc7	U+255f	#BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE
+0xc8	U+255a	#BOX DRAWINGS DOUBLE UP AND RIGHT
+0xc9	U+2554	#BOX DRAWINGS DOUBLE DOWN AND RIGHT
+0xca	U+2569	#BOX DRAWINGS DOUBLE UP AND HORIZONTAL
+0xcb	U+2566	#BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
+0xcc	U+2560	#BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
+0xcd	U+2550	#BOX DRAWINGS DOUBLE HORIZONTAL
+0xce	U+256c	#BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
+0xcf	U+2567	#BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE
+0xd0	U+2568	#BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE
+0xd1	U+2564	#BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE
+0xd2	U+2565	#BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE
+0xd3	U+2559	#BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE
+0xd4	U+2558	#BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE
+0xd5	U+2552	#BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE
+0xd6	U+2553	#BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE
+0xd7	U+256b	#BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE
+0xd8	U+256a	#BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE
+0xd9	U+2518	#BOX DRAWINGS LIGHT UP AND LEFT
+0xda	U+250c	#BOX DRAWINGS LIGHT DOWN AND RIGHT
+0xdb	U+2588	#FULL BLOCK
+0xdc	U+2584	#LOWER HALF BLOCK
+0xdd	U+258c	#LEFT HALF BLOCK
+0xde	U+2590	#RIGHT HALF BLOCK
+0xdf	U+2580	#UPPER HALF BLOCK
+0xe0	U+03c9	#GREEK SMALL LETTER OMEGA
+0xe1	U+03ac	#GREEK SMALL LETTER ALPHA WITH TONOS
+0xe2	U+03ad	#GREEK SMALL LETTER EPSILON WITH TONOS
+0xe3	U+03ae	#GREEK SMALL LETTER ETA WITH TONOS
+0xe4	U+03ca	#GREEK SMALL LETTER IOTA WITH DIALYTIKA
+0xe5	U+03af	#GREEK SMALL LETTER IOTA WITH TONOS
+0xe6	U+03cc	#GREEK SMALL LETTER OMICRON WITH TONOS
+0xe7	U+03cd	#GREEK SMALL LETTER UPSILON WITH TONOS
+0xe8	U+03cb	#GREEK SMALL LETTER UPSILON WITH DIALYTIKA
+0xe9	U+03ce	#GREEK SMALL LETTER OMEGA WITH TONOS
+0xea	U+0386	#GREEK CAPITAL LETTER ALPHA WITH TONOS
+0xeb	U+0388	#GREEK CAPITAL LETTER EPSILON WITH TONOS
+0xec	U+0389	#GREEK CAPITAL LETTER ETA WITH TONOS
+0xed	U+038a	#GREEK CAPITAL LETTER IOTA WITH TONOS
+0xee	U+038c	#GREEK CAPITAL LETTER OMICRON WITH TONOS
+0xef	U+038e	#GREEK CAPITAL LETTER UPSILON WITH TONOS
+0xf0	U+038f	#GREEK CAPITAL LETTER OMEGA WITH TONOS
+0xf1	U+00b1	#PLUS-MINUS SIGN
+0xf2	U+2265	#GREATER-THAN OR EQUAL TO
+0xf3	U+2264	#LESS-THAN OR EQUAL TO
+0xf4	U+03aa	#GREEK CAPITAL LETTER IOTA WITH DIALYTIKA
+0xf5	U+03ab	#GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA
+0xf6	U+00f7	#DIVISION SIGN
+0xf7	U+2248	#ALMOST EQUAL TO
+0xf8	U+00b0	#DEGREE SIGN
+0xf9	U+2219	#BULLET OPERATOR
+0xfa	U+00b7	#MIDDLE DOT
+0xfb	U+221a	#SQUARE ROOT
+0xfc	U+207f	#SUPERSCRIPT LATIN SMALL LETTER N
+0xfd	U+00b2	#SUPERSCRIPT TWO
+0xfe	U+25a0	#BLACK SQUARE
+0xff	U+00a0	#NO-BREAK SPACE
+
+# TRADE MARK SIGN:
+U+2122:(TM)
diff --git a/src/chrtrans/cp850_uni.tbl b/src/chrtrans/cp850_uni.tbl
index 96de277b..759bf950 100644
--- a/src/chrtrans/cp850_uni.tbl
+++ b/src/chrtrans/cp850_uni.tbl
@@ -1,7 +1,5 @@
 #Shall this become the "default" translation?
-#Meaning of that is currently unclear...  It's different
-#from the default input or defualt output charset...
-#but there has to be exactly one table marked as "default".
+#There has to be exactly one table marked as "default".
 D0
 #
 #The MIME name of this charset. 
diff --git a/src/chrtrans/cp862_uni.tbl b/src/chrtrans/cp862_uni.tbl
new file mode 100644
index 00000000..f1a7dd02
--- /dev/null
+++ b/src/chrtrans/cp862_uni.tbl
@@ -0,0 +1,157 @@
+#The MIME name of this charset.
+Mcp862
+
+#Name as a Display Charset (used on Options screen).
+ODosHebrew (cp862)
+
+#    Name:     cp862_DOSHebrew to Unicode table
+#    Unicode version: 2.0
+#    Table version: 2.00
+#    Table format:  Format A
+#    Date:          04/24/96
+#    Authors:       Lori Brownell <loribr@microsoft.com>
+#                   K.D. Chang    <a-kchang@microsoft.com>
+#    General notes: none
+#
+#    Format: Three tab-separated columns
+#        Column #1 is the cp862_DOSHebrew code (in hex)
+#        Column #2 is the Unicode (in hex as 0xXXXX)
+#        Column #3 is the Unicode name (follows a comment sign, '#')
+#
+#    The entries are in cp862_DOSHebrew order
+#
+##################
+
+0x20-0x7f       idem
+#
+0x80	U+05d0	#HEBREW LETTER ALEF
+0x81	U+05d1	#HEBREW LETTER BET
+0x82	U+05d2	#HEBREW LETTER GIMEL
+0x83	U+05d3	#HEBREW LETTER DALET
+0x84	U+05d4	#HEBREW LETTER HE
+0x85	U+05d5	#HEBREW LETTER VAV
+0x86	U+05d6	#HEBREW LETTER ZAYIN
+0x87	U+05d7	#HEBREW LETTER HET
+0x88	U+05d8	#HEBREW LETTER TET
+0x89	U+05d9	#HEBREW LETTER YOD
+0x8a	U+05da	#HEBREW LETTER FINAL KAF
+0x8b	U+05db	#HEBREW LETTER KAF
+0x8c	U+05dc	#HEBREW LETTER LAMED
+0x8d	U+05dd	#HEBREW LETTER FINAL MEM
+0x8e	U+05de	#HEBREW LETTER MEM
+0x8f	U+05df	#HEBREW LETTER FINAL NUN
+0x90	U+05e0	#HEBREW LETTER NUN
+0x91	U+05e1	#HEBREW LETTER SAMEKH
+0x92	U+05e2	#HEBREW LETTER AYIN
+0x93	U+05e3	#HEBREW LETTER FINAL PE
+0x94	U+05e4	#HEBREW LETTER PE
+0x95	U+05e5	#HEBREW LETTER FINAL TSADI
+0x96	U+05e6	#HEBREW LETTER TSADI
+0x97	U+05e7	#HEBREW LETTER QOF
+0x98	U+05e8	#HEBREW LETTER RESH
+0x99	U+05e9	#HEBREW LETTER SHIN
+0x9a	U+05ea	#HEBREW LETTER TAV
+0x9b	U+00a2	#CENT SIGN
+0x9c	U+00a3	#POUND SIGN
+0x9d	U+00a5	#YEN SIGN
+0x9e	U+20a7	#PESETA SIGN
+0x9f	U+0192	#LATIN SMALL LETTER F WITH HOOK
+0xa0	U+00e1	#LATIN SMALL LETTER A WITH ACUTE
+0xa1	U+00ed	#LATIN SMALL LETTER I WITH ACUTE
+0xa2	U+00f3	#LATIN SMALL LETTER O WITH ACUTE
+0xa3	U+00fa	#LATIN SMALL LETTER U WITH ACUTE
+0xa4	U+00f1	#LATIN SMALL LETTER N WITH TILDE
+0xa5	U+00d1	#LATIN CAPITAL LETTER N WITH TILDE
+0xa6	U+00aa	#FEMININE ORDINAL INDICATOR
+0xa7	U+00ba	#MASCULINE ORDINAL INDICATOR
+0xa8	U+00bf	#INVERTED QUESTION MARK
+0xa9	U+2310	#REVERSED NOT SIGN
+0xaa	U+00ac	#NOT SIGN
+0xab	U+00bd	#VULGAR FRACTION ONE HALF
+0xac	U+00bc	#VULGAR FRACTION ONE QUARTER
+0xad	U+00a1	#INVERTED EXCLAMATION MARK
+0xae	U+00ab	#LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xaf	U+00bb	#RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xb0	U+2591	#LIGHT SHADE
+0xb1	U+2592	#MEDIUM SHADE
+0xb2	U+2593	#DARK SHADE
+0xb3	U+2502	#BOX DRAWINGS LIGHT VERTICAL
+0xb4	U+2524	#BOX DRAWINGS LIGHT VERTICAL AND LEFT
+0xb5	U+2561	#BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE
+0xb6	U+2562	#BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE
+0xb7	U+2556	#BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE
+0xb8	U+2555	#BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE
+0xb9	U+2563	#BOX DRAWINGS DOUBLE VERTICAL AND LEFT
+0xba	U+2551	#BOX DRAWINGS DOUBLE VERTICAL
+0xbb	U+2557	#BOX DRAWINGS DOUBLE DOWN AND LEFT
+0xbc	U+255d	#BOX DRAWINGS DOUBLE UP AND LEFT
+0xbd	U+255c	#BOX DRAWINGS UP DOUBLE AND LEFT SINGLE
+0xbe	U+255b	#BOX DRAWINGS UP SINGLE AND LEFT DOUBLE
+0xbf	U+2510	#BOX DRAWINGS LIGHT DOWN AND LEFT
+0xc0	U+2514	#BOX DRAWINGS LIGHT UP AND RIGHT
+0xc1	U+2534	#BOX DRAWINGS LIGHT UP AND HORIZONTAL
+0xc2	U+252c	#BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
+0xc3	U+251c	#BOX DRAWINGS LIGHT VERTICAL AND RIGHT
+0xc4	U+2500	#BOX DRAWINGS LIGHT HORIZONTAL
+0xc5	U+253c	#BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
+0xc6	U+255e	#BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
+0xc7	U+255f	#BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE
+0xc8	U+255a	#BOX DRAWINGS DOUBLE UP AND RIGHT
+0xc9	U+2554	#BOX DRAWINGS DOUBLE DOWN AND RIGHT
+0xca	U+2569	#BOX DRAWINGS DOUBLE UP AND HORIZONTAL
+0xcb	U+2566	#BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
+0xcc	U+2560	#BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
+0xcd	U+2550	#BOX DRAWINGS DOUBLE HORIZONTAL
+0xce	U+256c	#BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
+0xcf	U+2567	#BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE
+0xd0	U+2568	#BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE
+0xd1	U+2564	#BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE
+0xd2	U+2565	#BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE
+0xd3	U+2559	#BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE
+0xd4	U+2558	#BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE
+0xd5	U+2552	#BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE
+0xd6	U+2553	#BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE
+0xd7	U+256b	#BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE
+0xd8	U+256a	#BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE
+0xd9	U+2518	#BOX DRAWINGS LIGHT UP AND LEFT
+0xda	U+250c	#BOX DRAWINGS LIGHT DOWN AND RIGHT
+0xdb	U+2588	#FULL BLOCK
+0xdc	U+2584	#LOWER HALF BLOCK
+0xdd	U+258c	#LEFT HALF BLOCK
+0xde	U+2590	#RIGHT HALF BLOCK
+0xdf	U+2580	#UPPER HALF BLOCK
+0xe0	U+03b1	#GREEK SMALL LETTER ALPHA
+0xe1	U+00df	#LATIN SMALL LETTER SHARP S (GERMAN)
+0xe2	U+0393	#GREEK CAPITAL LETTER GAMMA
+0xe3	U+03c0	#GREEK SMALL LETTER PI
+0xe4	U+03a3	#GREEK CAPITAL LETTER SIGMA
+0xe5	U+03c3	#GREEK SMALL LETTER SIGMA
+0xe6	U+00b5	#MICRO SIGN
+0xe7	U+03c4	#GREEK SMALL LETTER TAU
+0xe8	U+03a6	#GREEK CAPITAL LETTER PHI
+0xe9	U+0398	#GREEK CAPITAL LETTER THETA
+0xea	U+03a9	#GREEK CAPITAL LETTER OMEGA
+0xeb	U+03b4	#GREEK SMALL LETTER DELTA
+0xec	U+221e	#INFINITY
+0xed	U+03c6	#GREEK SMALL LETTER PHI
+0xee	U+03b5	#GREEK SMALL LETTER EPSILON
+0xef	U+2229	#INTERSECTION
+0xf0	U+2261	#IDENTICAL TO
+0xf1	U+00b1	#PLUS-MINUS SIGN
+0xf2	U+2265	#GREATER-THAN OR EQUAL TO
+0xf3	U+2264	#LESS-THAN OR EQUAL TO
+0xf4	U+2320	#TOP HALF INTEGRAL
+0xf5	U+2321	#BOTTOM HALF INTEGRAL
+0xf6	U+00f7	#DIVISION SIGN
+0xf7	U+2248	#ALMOST EQUAL TO
+0xf8	U+00b0	#DEGREE SIGN
+0xf9	U+2219	#BULLET OPERATOR
+0xfa	U+00b7	#MIDDLE DOT
+0xfb	U+221a	#SQUARE ROOT
+0xfc	U+207f	#SUPERSCRIPT LATIN SMALL LETTER N
+0xfd	U+00b2	#SUPERSCRIPT TWO
+0xfe	U+25a0	#BLACK SQUARE
+0xff	U+00a0	#NO-BREAK SPACE
+
+# TRADE MARK SIGN:
+U+2122:(TM)
diff --git a/src/chrtrans/cp864_uni.tbl b/src/chrtrans/cp864_uni.tbl
new file mode 100644
index 00000000..14097a6e
--- /dev/null
+++ b/src/chrtrans/cp864_uni.tbl
@@ -0,0 +1,157 @@
+#The MIME name of this charset.
+Mcp864
+
+#Name as a Display Charset (used on Options screen).
+ODosArabic (cp864)
+
+#    Name:     cp864_DOSArabic to Unicode table
+#    Unicode version: 2.0
+#    Table version: 2.00
+#    Table format:  Format A
+#    Date:          04/24/96
+#    Authors:       Lori Brownell <loribr@microsoft.com>
+#                   K.D. Chang    <a-kchang@microsoft.com>
+#    General notes: none
+#
+#    Format: Three tab-separated columns
+#        Column #1 is the cp864_DOSArabic code (in hex)
+#        Column #2 is the Unicode (in hex as 0xXXXX)
+#        Column #3 is the Unicode name (follows a comment sign, '#')
+#
+#    The entries are in cp864_DOSArabic order
+#
+##################
+
+0x20-0x7f       idem
+#
+0x80	U+00b0	#DEGREE SIGN
+0x81	U+00b7	#MIDDLE DOT
+0x82	U+2219	#BULLET OPERATOR
+0x83	U+221a	#SQUARE ROOT
+0x84	U+2592	#MEDIUM SHADE
+0x85	U+2500	#FORMS LIGHT HORIZONTAL
+0x86	U+2502	#FORMS LIGHT VERTICAL
+0x87	U+253c	#FORMS LIGHT VERTICAL AND HORIZONTAL
+0x88	U+2524	#FORMS LIGHT VERTICAL AND LEFT
+0x89	U+252c	#FORMS LIGHT DOWN AND HORIZONTAL
+0x8a	U+251c	#FORMS LIGHT VERTICAL AND RIGHT
+0x8b	U+2534	#FORMS LIGHT UP AND HORIZONTAL
+0x8c	U+2510	#FORMS LIGHT DOWN AND LEFT
+0x8d	U+250c	#FORMS LIGHT DOWN AND RIGHT
+0x8e	U+2514	#FORMS LIGHT UP AND RIGHT
+0x8f	U+2518	#FORMS LIGHT UP AND LEFT
+0x90	U+03b2	#GREEK SMALL BETA
+0x91	U+221e	#INFINITY
+0x92	U+03c6	#GREEK SMALL PHI
+0x93	U+00b1	#PLUS-OR-MINUS SIGN
+0x94	U+00bd	#FRACTION 1/2
+0x95	U+00bc	#FRACTION 1/4
+0x96	U+2248	#ALMOST EQUAL TO
+0x97	U+00ab	#LEFT POINTING GUILLEMET
+0x98	U+00bb	#RIGHT POINTING GUILLEMET
+0x99	U+fef7	#ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM
+0x9a	U+fef8	#ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM
+#0x9b		#UNDEFINED
+#0x9c		#UNDEFINED
+0x9d	U+fefb	#ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM
+0x9e	U+fefc	#ARABIC LIGATURE LAM WITH ALEF FINAL FORM
+#0x9f		#UNDEFINED
+0xa0	U+00a0	#NON-BREAKING SPACE
+0xa1	U+00ad	#SOFT HYPHEN
+0xa2	U+fe82	#ARABIC LETTER ALEF WITH MADDA ABOVE FINAL FORM
+0xa3	U+00a3	#POUND SIGN
+0xa4	U+00a4	#CURRENCY SIGN
+0xa5	U+fe84	#ARABIC LETTER ALEF WITH HAMZA ABOVE FINAL FORM
+#0xa6		#UNDEFINED
+#0xa7		#UNDEFINED
+0xa8	U+fe8e	#ARABIC LETTER ALEF FINAL FORM
+0xa9	U+fe8f	#ARABIC LETTER BEH ISOLATED FORM
+0xaa	U+fe95	#ARABIC LETTER TEH ISOLATED FORM
+0xab	U+fe99	#ARABIC LETTER THEH ISOLATED FORM
+0xac	U+060c	#ARABIC COMMA
+0xad	U+fe9d	#ARABIC LETTER JEEM ISOLATED FORM
+0xae	U+fea1	#ARABIC LETTER HAH ISOLATED FORM
+0xaf	U+fea5	#ARABIC LETTER KHAH ISOLATED FORM
+0xb0	U+0660	#ARABIC-INDIC DIGIT ZERO
+0xb1	U+0661	#ARABIC-INDIC DIGIT ONE
+0xb2	U+0662	#ARABIC-INDIC DIGIT TWO
+0xb3	U+0663	#ARABIC-INDIC DIGIT THREE
+0xb4	U+0664	#ARABIC-INDIC DIGIT FOUR
+0xb5	U+0665	#ARABIC-INDIC DIGIT FIVE
+0xb6	U+0666	#ARABIC-INDIC DIGIT SIX
+0xb7	U+0667	#ARABIC-INDIC DIGIT SEVEN
+0xb8	U+0668	#ARABIC-INDIC DIGIT EIGHT
+0xb9	U+0669	#ARABIC-INDIC DIGIT NINE
+0xba	U+fed1	#ARABIC LETTER FEH ISOLATED FORM
+0xbb	U+061b	#ARABIC SEMICOLON
+0xbc	U+feb1	#ARABIC LETTER SEEN ISOLATED FORM
+0xbd	U+feb5	#ARABIC LETTER SHEEN ISOLATED FORM
+0xbe	U+feb9	#ARABIC LETTER SAD ISOLATED FORM
+0xbf	U+061f	#ARABIC QUESTION MARK
+0xc0	U+00a2	#CENT SIGN
+0xc1	U+fe80	#ARABIC LETTER HAMZA ISOLATED FORM
+0xc2	U+fe81	#ARABIC LETTER ALEF WITH MADDA ABOVE ISOLATED FORM
+0xc3	U+fe83	#ARABIC LETTER ALEF WITH HAMZA ABOVE ISOLATED FORM
+0xc4	U+fe85	#ARABIC LETTER WAW WITH HAMZA ABOVE ISOLATED FORM
+0xc5	U+feca	#ARABIC LETTER AIN FINAL FORM
+0xc6	U+fe8b	#ARABIC LETTER YEH WITH HAMZA ABOVE INITIAL FORM
+0xc7	U+fe8d	#ARABIC LETTER ALEF ISOLATED FORM
+0xc8	U+fe91	#ARABIC LETTER BEH INITIAL FORM
+0xc9	U+fe93	#ARABIC LETTER TEH MARBUTA ISOLATED FORM
+0xca	U+fe97	#ARABIC LETTER TEH INITIAL FORM
+0xcb	U+fe9b	#ARABIC LETTER THEH INITIAL FORM
+0xcc	U+fe9f	#ARABIC LETTER JEEM INITIAL FORM
+0xcd	U+fea3	#ARABIC LETTER HAH INITIAL FORM
+0xce	U+fea7	#ARABIC LETTER KHAH INITIAL FORM
+0xcf	U+fea9	#ARABIC LETTER DAL ISOLATED FORM
+0xd0	U+feab	#ARABIC LETTER THAL ISOLATED FORM
+0xd1	U+fead	#ARABIC LETTER REH ISOLATED FORM
+0xd2	U+feaf	#ARABIC LETTER ZAIN ISOLATED FORM
+0xd3	U+feb3	#ARABIC LETTER SEEN INITIAL FORM
+0xd4	U+feb7	#ARABIC LETTER SHEEN INITIAL FORM
+0xd5	U+febb	#ARABIC LETTER SAD INITIAL FORM
+0xd6	U+febf	#ARABIC LETTER DAD INITIAL FORM
+0xd7	U+fec1	#ARABIC LETTER TAH ISOLATED FORM
+0xd8	U+fec5	#ARABIC LETTER ZAH ISOLATED FORM
+0xd9	U+fecb	#ARABIC LETTER AIN INITIAL FORM
+0xda	U+fecf	#ARABIC LETTER GHAIN INITIAL FORM
+0xdb	U+00a6	#BROKEN VERTICAL BAR
+0xdc	U+00ac	#NOT SIGN
+0xdd	U+00f7	#DIVISION SIGN
+0xde	U+00d7	#MULTIPLICATION SIGN
+0xdf	U+fec9	#ARABIC LETTER AIN ISOLATED FORM
+0xe0	U+0640	#ARABIC TATWEEL
+0xe1	U+fed3	#ARABIC LETTER FEH INITIAL FORM
+0xe2	U+fed7	#ARABIC LETTER QAF INITIAL FORM
+0xe3	U+fedb	#ARABIC LETTER KAF INITIAL FORM
+0xe4	U+fedf	#ARABIC LETTER LAM INITIAL FORM
+0xe5	U+fee3	#ARABIC LETTER MEEM INITIAL FORM
+0xe6	U+fee7	#ARABIC LETTER NOON INITIAL FORM
+0xe7	U+feeb	#ARABIC LETTER HEH INITIAL FORM
+0xe8	U+feed	#ARABIC LETTER WAW ISOLATED FORM
+0xe9	U+feef	#ARABIC LETTER ALEF MAKSURA ISOLATED FORM
+0xea	U+fef3	#ARABIC LETTER YEH INITIAL FORM
+0xeb	U+febd	#ARABIC LETTER DAD ISOLATED FORM
+0xec	U+fecc	#ARABIC LETTER AIN MEDIAL FORM
+0xed	U+fece	#ARABIC LETTER GHAIN FINAL FORM
+0xee	U+fecd	#ARABIC LETTER GHAIN ISOLATED FORM
+0xef	U+fee1	#ARABIC LETTER MEEM ISOLATED FORM
+0xf0	U+fe7d	#ARABIC SHADDA MEDIAL FORM
+0xf1	U+0651	#ARABIC SHADDAH
+0xf2	U+fee5	#ARABIC LETTER NOON ISOLATED FORM
+0xf3	U+fee9	#ARABIC LETTER HEH ISOLATED FORM
+0xf4	U+feec	#ARABIC LETTER HEH MEDIAL FORM
+0xf5	U+fef0	#ARABIC LETTER ALEF MAKSURA FINAL FORM
+0xf6	U+fef2	#ARABIC LETTER YEH FINAL FORM
+0xf7	U+fed0	#ARABIC LETTER GHAIN MEDIAL FORM
+0xf8	U+fed5	#ARABIC LETTER QAF ISOLATED FORM
+0xf9	U+fef5	#ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM
+0xfa	U+fef6	#ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM
+0xfb	U+fedd	#ARABIC LETTER LAM ISOLATED FORM
+0xfc	U+fed9	#ARABIC LETTER KAF ISOLATED FORM
+0xfd	U+fef1	#ARABIC LETTER YEH ISOLATED FORM
+0xfe	U+25a0	#BLACK SQUARE
+#0xff		#UNDEFINED
+
+# TRADE MARK SIGN:
+U+2122:(TM)
diff --git a/src/chrtrans/cp866_uni.tbl b/src/chrtrans/cp866_uni.tbl
index 2b109897..9de12f9d 100644
--- a/src/chrtrans/cp866_uni.tbl
+++ b/src/chrtrans/cp866_uni.tbl
@@ -23,7 +23,7 @@ ODosCyrillic (cp866)
 #
 0x20-0x40       idem
 
-# some mapppings of greek capital letters to latin letters added - kw
+# Some mapppings of Greek capital letters to Latin letters added. - KW
 0x41	U+0041	U+0391	#LATIN CAPITAL LETTER A
 0x42	U+0042	U+0392	#LATIN CAPITAL LETTER B
 0x43	U+0043	#LATIN CAPITAL LETTER C
diff --git a/src/chrtrans/cp869_uni.tbl b/src/chrtrans/cp869_uni.tbl
new file mode 100644
index 00000000..412fb8a7
--- /dev/null
+++ b/src/chrtrans/cp869_uni.tbl
@@ -0,0 +1,157 @@
+#The MIME name of this charset. 
+Mcp869
+
+#Name as a Display Charset (used on Options screen)
+ODosGreek2 (cp869)
+
+#    Name:     cp869_DOSGreek2 to Unicode table
+#    Unicode version: 2.0
+#    Table version: 2.00
+#    Table format:  Format A
+#    Date:          04/24/96
+#    Authors:       Lori Brownell <loribr@microsoft.com>
+#                   K.D. Chang    <a-kchang@microsoft.com>
+#    General notes: none
+#
+#    Format: Three tab-separated columns
+#        Column #1 is the cp869_DOSGreek2 code (in hex)
+#        Column #2 is the Unicode (in hex as 0xXXXX)
+#        Column #3 is the Unicode name (follows a comment sign, '#')
+#
+#    The entries are in cp869_DOSGreek2 order
+#
+##################
+
+0x20-0x7f       idem
+#
+#0x80		#UNDEFINED
+#0x81		#UNDEFINED
+#0x82		#UNDEFINED
+#0x83		#UNDEFINED
+#0x84		#UNDEFINED
+#0x85		#UNDEFINED
+0x86	U+0386	#GREEK CAPITAL LETTER ALPHA WITH TONOS
+#0x87		#UNDEFINED
+0x88	U+00b7	#MIDDLE DOT
+0x89	U+00ac	#NOT SIGN
+0x8a	U+00a6	#BROKEN BAR
+0x8b	U+2018	#LEFT SINGLE QUOTATION MARK
+0x8c	U+2019	#RIGHT SINGLE QUOTATION MARK
+0x8d	U+0388	#GREEK CAPITAL LETTER EPSILON WITH TONOS
+0x8e	U+2015	#HORIZONTAL BAR
+0x8f	U+0389	#GREEK CAPITAL LETTER ETA WITH TONOS
+0x90	U+038a	#GREEK CAPITAL LETTER IOTA WITH TONOS
+0x91	U+03aa	#GREEK CAPITAL LETTER IOTA WITH DIALYTIKA
+0x92	U+038c	#GREEK CAPITAL LETTER OMICRON WITH TONOS
+#0x93		#UNDEFINED
+#0x94		#UNDEFINED
+0x95	U+038e	#GREEK CAPITAL LETTER UPSILON WITH TONOS
+0x96	U+03ab	#GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA
+0x97	U+00a9	#COPYRIGHT SIGN
+0x98	U+038f	#GREEK CAPITAL LETTER OMEGA WITH TONOS
+0x99	U+00b2	#SUPERSCRIPT TWO
+0x9a	U+00b3	#SUPERSCRIPT THREE
+0x9b	U+03ac	#GREEK SMALL LETTER ALPHA WITH TONOS
+0x9c	U+00a3	#POUND SIGN
+0x9d	U+03ad	#GREEK SMALL LETTER EPSILON WITH TONOS
+0x9e	U+03ae	#GREEK SMALL LETTER ETA WITH TONOS
+0x9f	U+03af	#GREEK SMALL LETTER IOTA WITH TONOS
+0xa0	U+03ca	#GREEK SMALL LETTER IOTA WITH DIALYTIKA
+0xa1	U+0390	#GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
+0xa2	U+03cc	#GREEK SMALL LETTER OMICRON WITH TONOS
+0xa3	U+03cd	#GREEK SMALL LETTER UPSILON WITH TONOS
+0xa4	U+0391	#GREEK CAPITAL LETTER ALPHA
+0xa5	U+0392	#GREEK CAPITAL LETTER BETA
+0xa6	U+0393	#GREEK CAPITAL LETTER GAMMA
+0xa7	U+0394	#GREEK CAPITAL LETTER DELTA
+0xa8	U+0395	#GREEK CAPITAL LETTER EPSILON
+0xa9	U+0396	#GREEK CAPITAL LETTER ZETA
+0xaa	U+0397	#GREEK CAPITAL LETTER ETA
+0xab	U+00bd	#VULGAR FRACTION ONE HALF
+0xac	U+0398	#GREEK CAPITAL LETTER THETA
+0xad	U+0399	#GREEK CAPITAL LETTER IOTA
+0xae	U+00ab	#LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xaf	U+00bb	#RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xb0	U+2591	#LIGHT SHADE
+0xb1	U+2592	#MEDIUM SHADE
+0xb2	U+2593	#DARK SHADE
+0xb3	U+2502	#BOX DRAWINGS LIGHT VERTICAL
+0xb4	U+2524	#BOX DRAWINGS LIGHT VERTICAL AND LEFT
+0xb5	U+039a	#GREEK CAPITAL LETTER KAPPA
+0xb6	U+039b	#GREEK CAPITAL LETTER LAMDA
+0xb7	U+039c	#GREEK CAPITAL LETTER MU
+0xb8	U+039d	#GREEK CAPITAL LETTER NU
+0xb9	U+2563	#BOX DRAWINGS DOUBLE VERTICAL AND LEFT
+0xba	U+2551	#BOX DRAWINGS DOUBLE VERTICAL
+0xbb	U+2557	#BOX DRAWINGS DOUBLE DOWN AND LEFT
+0xbc	U+255d	#BOX DRAWINGS DOUBLE UP AND LEFT
+0xbd	U+039e	#GREEK CAPITAL LETTER XI
+0xbe	U+039f	#GREEK CAPITAL LETTER OMICRON
+0xbf	U+2510	#BOX DRAWINGS LIGHT DOWN AND LEFT
+0xc0	U+2514	#BOX DRAWINGS LIGHT UP AND RIGHT
+0xc1	U+2534	#BOX DRAWINGS LIGHT UP AND HORIZONTAL
+0xc2	U+252c	#BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
+0xc3	U+251c	#BOX DRAWINGS LIGHT VERTICAL AND RIGHT
+0xc4	U+2500	#BOX DRAWINGS LIGHT HORIZONTAL
+0xc5	U+253c	#BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
+0xc6	U+03a0	#GREEK CAPITAL LETTER PI
+0xc7	U+03a1	#GREEK CAPITAL LETTER RHO
+0xc8	U+255a	#BOX DRAWINGS DOUBLE UP AND RIGHT
+0xc9	U+2554	#BOX DRAWINGS DOUBLE DOWN AND RIGHT
+0xca	U+2569	#BOX DRAWINGS DOUBLE UP AND HORIZONTAL
+0xcb	U+2566	#BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
+0xcc	U+2560	#BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
+0xcd	U+2550	#BOX DRAWINGS DOUBLE HORIZONTAL
+0xce	U+256c	#BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
+0xcf	U+03a3	#GREEK CAPITAL LETTER SIGMA
+0xd0	U+03a4	#GREEK CAPITAL LETTER TAU
+0xd1	U+03a5	#GREEK CAPITAL LETTER UPSILON
+0xd2	U+03a6	#GREEK CAPITAL LETTER PHI
+0xd3	U+03a7	#GREEK CAPITAL LETTER CHI
+0xd4	U+03a8	#GREEK CAPITAL LETTER PSI
+0xd5	U+03a9	#GREEK CAPITAL LETTER OMEGA
+0xd6	U+03b1	#GREEK SMALL LETTER ALPHA
+0xd7	U+03b2	#GREEK SMALL LETTER BETA
+0xd8	U+03b3	#GREEK SMALL LETTER GAMMA
+0xd9	U+2518	#BOX DRAWINGS LIGHT UP AND LEFT
+0xda	U+250c	#BOX DRAWINGS LIGHT DOWN AND RIGHT
+0xdb	U+2588	#FULL BLOCK
+0xdc	U+2584	#LOWER HALF BLOCK
+0xdd	U+03b4	#GREEK SMALL LETTER DELTA
+0xde	U+03b5	#GREEK SMALL LETTER EPSILON
+0xdf	U+2580	#UPPER HALF BLOCK
+0xe0	U+03b6	#GREEK SMALL LETTER ZETA
+0xe1	U+03b7	#GREEK SMALL LETTER ETA
+0xe2	U+03b8	#GREEK SMALL LETTER THETA
+0xe3	U+03b9	#GREEK SMALL LETTER IOTA
+0xe4	U+03ba	#GREEK SMALL LETTER KAPPA
+0xe5	U+03bb	#GREEK SMALL LETTER LAMDA
+0xe6	U+03bc	#GREEK SMALL LETTER MU
+0xe7	U+03bd	#GREEK SMALL LETTER NU
+0xe8	U+03be	#GREEK SMALL LETTER XI
+0xe9	U+03bf	#GREEK SMALL LETTER OMICRON
+0xea	U+03c0	#GREEK SMALL LETTER PI
+0xeb	U+03c1	#GREEK SMALL LETTER RHO
+0xec	U+03c3	#GREEK SMALL LETTER SIGMA
+0xed	U+03c2	#GREEK SMALL LETTER FINAL SIGMA
+0xee	U+03c4	#GREEK SMALL LETTER TAU
+0xef	U+0384	#GREEK TONOS
+0xf0	U+00ad	#SOFT HYPHEN
+0xf1	U+00b1	#PLUS-MINUS SIGN
+0xf2	U+03c5	#GREEK SMALL LETTER UPSILON
+0xf3	U+03c6	#GREEK SMALL LETTER PHI
+0xf4	U+03c7	#GREEK SMALL LETTER CHI
+0xf5	U+00a7	#SECTION SIGN
+0xf6	U+03c8	#GREEK SMALL LETTER PSI
+0xf7	U+0385	#GREEK DIALYTIKA TONOS
+0xf8	U+00b0	#DEGREE SIGN
+0xf9	U+00a8	#DIAERESIS
+0xfa	U+03c9	#GREEK SMALL LETTER OMEGA
+0xfb	U+03cb	#GREEK SMALL LETTER UPSILON WITH DIALYTIKA
+0xfc	U+03b0	#GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
+0xfd	U+03ce	#GREEK SMALL LETTER OMEGA WITH TONOS
+0xfe	U+25a0	#BLACK SQUARE
+0xff	U+00a0	#NO-BREAK SPACE
+
+# TRADE MARK SIGN:
+U+2122:(TM)
diff --git a/src/chrtrans/def7_uni.tbl b/src/chrtrans/def7_uni.tbl
index c4bbef7c..42cca597 100644
--- a/src/chrtrans/def7_uni.tbl
+++ b/src/chrtrans/def7_uni.tbl
@@ -20,24 +20,24 @@ U+00a3:Pd
 U+00a4:CUR
 U+00a5:Ye
 U+00a6:|
-U+00a7:SE
+U+00a7:S:
 U+00a8:"
-U+00a9:(C)
+U+00a9:(c)
 U+00aa:-a
 U+00ab:<<
-U+00ac:NO
+U+00ac:NOT
 U+00ad:-
 U+00ae:(R)
 U+00af:-
-U+00b0:DG
+U+00b0:DEG
 U+00b1:+-
 U+00b2:^2
 U+00b3:^3
 U+00b4:'
 # My -> u
-U+00b6:u
-U+00b6:PI
-U+00b7:.M
+U+00b5:u
+U+00b6:P:
+U+00b7:.
 U+00b8:,
 U+00b9:^1
 U+00ba:-o
@@ -1325,9 +1325,9 @@ U+211e:Rx
 U+2120:(SM)
 U+2122:(TM)
 U+2126:Ohm
-U+212E:est.
 0x4b	U+212A	# Kelvin sign - K
 U+212b:Ang.
+U+212E:est.
 U+2135:Aleph 
 U+2153: 1/3
 U+2154: 2/3
diff --git a/src/chrtrans/dmcs_uni.tbl b/src/chrtrans/dmcs_uni.tbl
new file mode 100644
index 00000000..676b728d
--- /dev/null
+++ b/src/chrtrans/dmcs_uni.tbl
@@ -0,0 +1,226 @@
+#The MIME name of this charset.
+Mdec-mcs
+
+#Name as a Display Charset (used on Options screen)
+ODEC Multinational
+
+#
+#   Name:             DEC Multinational (dec-mcs) [to unicode]
+#   Date:             29 October 1997
+#   Author:           Fote
+#
+##################
+
+#0x20    U+0020  # SPACE
+#0x21    U+0021  # EXCLAMATION MARK
+#0x22    U+0022  # QUOTATION MARK
+#0x23    U+0023  # NUMBER SIGN
+#0x24    U+0024  # DOLLAR SIGN
+#0x25    U+0025  # PERCENT SIGN
+#0x26    U+0026  # AMPERSAND
+#0x27    U+0027  # APOSTROPHE
+#0x28    U+0028  # LEFT PARENTHESIS
+#0x29    U+0029  # RIGHT PARENTHESIS
+#0x2A    U+002A  # ASTERISK
+#0x2B    U+002B  # PLUS SIGN
+#0x2C    U+002C  # COMMA
+#0x2D    U+002D  # HYPHEN-MINUS
+#0x2E    U+002E  # FULL STOP
+#0x2F    U+002F  # SOLIDUS
+#0x30    U+0030  # DIGIT ZERO
+#0x31    U+0031  # DIGIT ONE
+#0x32    U+0032  # DIGIT TWO
+#0x33    U+0033  # DIGIT THREE
+#0x34    U+0034  # DIGIT FOUR
+#0x35    U+0035  # DIGIT FIVE
+#0x36    U+0036  # DIGIT SIX
+#0x37    U+0037  # DIGIT SEVEN
+#0x38    U+0038  # DIGIT EIGHT
+#0x39    U+0039  # DIGIT NINE
+#0x3A    U+003A  # COLON
+#0x3B    U+003B  # SEMICOLON
+#0x3C    U+003C  # LESS-THAN SIGN
+#0x3D    U+003D  # EQUALS SIGN
+#0x3E    U+003E  # GREATER-THAN SIGN
+#0x3F    U+003F  # QUESTION MARK
+#0x40    U+0040  # COMMERCIAL AT
+#0x41    U+0041  # LATIN CAPITAL LETTER A
+#0x42    U+0042  # LATIN CAPITAL LETTER B
+#0x43    U+0043  # LATIN CAPITAL LETTER C
+#0x44    U+0044  # LATIN CAPITAL LETTER D
+#0x45    U+0045  # LATIN CAPITAL LETTER E
+#0x46    U+0046  # LATIN CAPITAL LETTER F
+#0x47    U+0047  # LATIN CAPITAL LETTER G
+#0x48    U+0048  # LATIN CAPITAL LETTER H
+#0x49    U+0049  # LATIN CAPITAL LETTER I
+#0x4A    U+004A  # LATIN CAPITAL LETTER J
+#0x4B    U+004B  # LATIN CAPITAL LETTER K
+#0x4C    U+004C  # LATIN CAPITAL LETTER L
+#0x4D    U+004D  # LATIN CAPITAL LETTER M
+#0x4E    U+004E  # LATIN CAPITAL LETTER N
+#0x4F    U+004F  # LATIN CAPITAL LETTER O
+#0x50    U+0050  # LATIN CAPITAL LETTER P
+#0x51    U+0051  # LATIN CAPITAL LETTER Q
+#0x52    U+0052  # LATIN CAPITAL LETTER R
+#0x53    U+0053  # LATIN CAPITAL LETTER S
+#0x54    U+0054  # LATIN CAPITAL LETTER T
+#0x55    U+0055  # LATIN CAPITAL LETTER U
+#0x56    U+0056  # LATIN CAPITAL LETTER V
+#0x57    U+0057  # LATIN CAPITAL LETTER W
+#0x58    U+0058  # LATIN CAPITAL LETTER X
+#0x59    U+0059  # LATIN CAPITAL LETTER Y
+#0x5A    U+005A  # LATIN CAPITAL LETTER Z
+#0x5B    U+005B  # LEFT SQUARE BRACKET
+#0x5C    U+005C  # REVERSE SOLIDUS
+#0x5D    U+005D  # RIGHT SQUARE BRACKET
+#0x5E    U+005E  # CIRCUMFLEX ACCENT
+#0x5F    U+005F  # LOW LINE
+#0x60    U+0060  # GRAVE ACCENT
+#0x61    U+0061  # LATIN SMALL LETTER A
+#0x62    U+0062  # LATIN SMALL LETTER B
+#0x63    U+0063  # LATIN SMALL LETTER C
+#0x64    U+0064  # LATIN SMALL LETTER D
+#0x65    U+0065  # LATIN SMALL LETTER E
+#0x66    U+0066  # LATIN SMALL LETTER F
+#0x67    U+0067  # LATIN SMALL LETTER G
+#0x68    U+0068  # LATIN SMALL LETTER H
+#0x69    U+0069  # LATIN SMALL LETTER I
+#0x6A    U+006A  # LATIN SMALL LETTER J
+#0x6B    U+006B  # LATIN SMALL LETTER K
+#0x6C    U+006C  # LATIN SMALL LETTER L
+#0x6D    U+006D  # LATIN SMALL LETTER M
+#0x6E    U+006E  # LATIN SMALL LETTER N
+#0x6F    U+006F  # LATIN SMALL LETTER O
+#0x70    U+0070  # LATIN SMALL LETTER P
+#0x71    U+0071  # LATIN SMALL LETTER Q
+#0x72    U+0072  # LATIN SMALL LETTER R
+#0x73    U+0073  # LATIN SMALL LETTER S
+#0x74    U+0074  # LATIN SMALL LETTER T
+#0x75    U+0075  # LATIN SMALL LETTER U
+#0x76    U+0076  # LATIN SMALL LETTER V
+#0x77    U+0077  # LATIN SMALL LETTER W
+#0x78    U+0078  # LATIN SMALL LETTER X
+#0x79    U+0079  # LATIN SMALL LETTER Y
+#0x7A    U+007A  # LATIN SMALL LETTER Z
+#0x7B    U+007B  # LEFT CURLY BRACKET
+#0x7C    U+007C  # VERTICAL LINE
+#0x7D    U+007D  # RIGHT CURLY BRACKET
+#0x7E    U+007E  # TILDE
+#
+0x20-0x7f       idem
+#
+0xA1    U+00A1  # inverted exclamation mark (&#161;) - iexcl
+0xA2    U+00A2  # cent sign (&#162;) - cent
+0xA3    U+00A3  # pound sign (&#163;) - pound 
+# currency sign (&#164;) - curren
+U+00A4:CUR
+0xA5    U+00A5  # yen sign (&#165;) - yen 
+# broken vertical bar (&#166;) - brvbar, brkbar
+U+00A6:|
+0xA7    U+00A7  # section sign (&#167;) - sect
+0xA8    U+00A8  # spacing diaresis (&#168;) - uml, die
+0xA9    U+00A9  # copyright sign (&#169;) - copy
+0xAA    U+00AA  # feminine ordinal indicator (&#170;) - ordf
+0xAB    U+00AB  # angle quotation mark, left (&#171;) - laquo
+# negation sign (&#172); - not
+U+00AC:NOT
+# soft hyphen (&#173;) - shy
+#U+00AD
+# circled R registered sign (&#174;) - reg
+U+00AE:(R)
+# spacing macron (&#175;) - hibar, macr
+U+00AF:-
+0xB0    U+00B0  # degree sign (&#176;) - deg
+0xB1    U+00B1  # plus-or-minus sign (&#177;) - plusmn
+0xB2    U+00B2  # superscript 2 (&#178;) - sup2
+0xB3    U+00B3  # superscript 3 (&#179;) - sup3
+#spacing acute (&#180;) - acute
+U+00B4:'
+0xB5    U+00B5  # micro sign (&#181;) - micro
+0xB6    U+00B6  # paragraph sign (&#182;) - para
+0xB7    U+00B7 # middle dot (&#183;) - middot
+# spacing cedilla (&#184;) - cedil
+U+00B8:,
+0xB9    U+00B9  # superscript 1 (&#185;) - sup1
+0xBA    U+00BA  # masculine ordinal indicator (&#186;) - ordm
+0xBB    U+00BB  # angle quotation mark, right (&#187;) - raquo
+0xBC    U+00BC  # fraction 1/4 (&#188;) - frac14
+0xBD    U+00BD  # fraction 1/2 (&#189;) - frac12
+# fraction 3/4 (&#190;) - frac34
+U+00BE: 3/4
+0xBF    U+00BF  # inverted question mark (&#191;) - iquest
+0xC0    U+00C0  # capital A, grave accent (&#192;) - Agrave
+0xC1    U+00C1  # capital A, acute accent (&#193;) - Aacute
+0xC2    U+00C2  # capital A, circumflex accent (&#194;) - Acirc
+0xC3    U+00C3  # capital A, tilde (&#195;) - Atilde
+0xC4    U+00C4  # capital A, dieresis or umlaut mark (&#196;) - Auml
+0xC5    U+00C5  # capital A, ring (&#197;) - Aring
+0xC6    U+00C6  # capital AE diphthong (ligature) (&#198;) - AElig
+0xC7    U+00C7  # capital C, cedilla (&#199;) - Ccedil
+0xC8    U+00C8  # capital E, grave accent (&#200;) - Egrave
+0xC9    U+00C9  # capital E, acute accent (&#201;) - Eacute
+0xCA    U+00CA  # capital E, circumflex accent (&#202;) - Ecirc
+0xCB    U+00CB  # capital E, dieresis or umlaut mark (&#203;) - Euml
+0xCC    U+00CC  # capital I, grave accent (&#204;) - Igrave
+0xCD    U+00CD  # capital I, acute accent (&#205;) - Iacute
+0xCE    U+00CE  # capital I, circumflex accent (&#206;) - Icirc
+0xCF    U+00CF  # capital I, dieresis or umlaut mark (&#207;) - Iuml
+# capital Eth, Icelandic (&#208;) - ETH */ 
+U+00D0:DH
+#      Dj  # capital D with stroke - Dstrok
+0xD1    U+00D1  # capital N, tilde (&#209;) - Ntilde
+0xD2    U+00D2  # capital O, grave accent (&#210;) - Ograve
+0xD3    U+00D3  # capital O, acute accent (&#211;) - Oacute
+0xD4    U+00D4  # capital O, circumflex accent (&#212;) - Ocirc
+0xD5    U+00D5  # capital O, tilde (&#213;) - Otilde
+0xD6    U+00D6  # capital O, dieresis or umlaut mark (&#214;) - Ouml
+# multiplication sign (&#215;) - times
+U+00D7:*
+0xD8    U+00D8  # capital O, slash (&#216;) - Oslash
+0xD9    U+00D9  # capital U, grave accent (&#217;) - Ugrave
+0xDA    U+00DA  # capital U, acute accent (&#218;) - Uacute
+0xDB    U+00DB  # capital U, circumflex accent (&#219;) - Ucirc
+0xDC    U+00DC  # capital U, dieresis or umlaut mark (&#220;) - Uuml
+0xDD    U+00DD  # capital Y, acute accent (&#221;) - Yacute
+# capital THORN, Icelandic (&#222;) - THORN */ 
+U+00DE:P
+0xDF    U+00DF  # small sharp s, German (sz ligature) (&#223;) - szlig
+0xE0    U+00E0  # small a, grave accent (&#224;) - agrave
+0xE1    U+00E1  # small a, acute accent (&#225;) - aacute
+0xE2    U+00E2  # small a, circumflex accent (&#226;) - acirc
+0xE3    U+00E3  # small a, tilde (&#227;) - atilde
+0xE4    U+00E4  # small a, dieresis or umlaut mark (&#228;) - auml
+0xE5    U+00E5  # small a, ring (&#229;) - aring
+0xE6    U+00E6  # small ae diphthong (ligature) (&#230;) - aelig
+0xE7    U+00E7  # small c, cedilla (&#231;) - ccedil
+0xE8    U+00E8  # small e, grave accent (&#232;) - egrave
+0xE9    U+00E9  # small e, acute accent (&#233;) - eacute
+0xEA    U+00EA  # small e, circumflex accent (&#234;) - ecirc
+0xEB    U+00EB  # small e, dieresis or umlaut mark (&#235;) - euml
+0xEC    U+00EC  # small i, grave accent (&#236;) - igrave
+0xED    U+00ED  # small i, acute accent (&#237;) - iacute
+0xEE    U+00EE  # small i, circumflex accent (&#238;) - icirc
+0xEF    U+00EF  # small i, dieresis or umlaut mark (&#239;) - iuml
+# small eth, Icelandic (&#240;) - eth
+U+00F0:dh
+0xF1    U+00F1  # small n, tilde (&#241;) - ntilde
+0xF2    U+00F2  # small o, grave accent (&#242;) - ograve
+0xF3    U+00F3  # small o, acute accent (&#243;) - oacute
+0xF4    U+00F4  # small o, circumflex accent (&#244;) - ocirc
+0xF5    U+00F5  # small o, tilde (&#245;) - otilde
+0xF6    U+00F6  # small o, dieresis or umlaut mark (&#246;) - ouml
+# division sign (&#247;) - divide
+U+00F7:/
+0xF8    U+00F8  # small o, slash (&#248;) - oslash
+0xF9    U+00F9  # small u, grave accent (&#249;) - ugrave
+0xFA    U+00FA  # small u, acute accent (&#250;) - uacute
+0xFB    U+00FB  # small u, circumflex accent (&#251;) - ucirc
+0xFC    U+00FC  # small u, dieresis or umlaut mark (&#252;) - uuml
+0xFD    U+00FF  # small y, dieresis or umlaut mark (&#255;) - yuml
+# small y, acute accent (&#253;) - yacute
+U+00FD:y'
+# small thorn, Icelandic (&#254;) - thorn
+U+00FE:p
+#
+# TRADE MARK SIGN
+U+2122:(TM)
diff --git a/src/chrtrans/iso01_uni.tbl b/src/chrtrans/iso01_uni.tbl
index d2147771..d2701f0e 100644
--- a/src/chrtrans/iso01_uni.tbl
+++ b/src/chrtrans/iso01_uni.tbl
@@ -75,4 +75,4 @@ U+2122:(TM)
 0x27    U+2019-U+201b   # various single quotation marks
 0x22    U+201c-U+201f   # various double quotation marks
 
-U+2297 "(\327)"
\ No newline at end of file
+U+2297 "(\327)"
diff --git a/src/chrtrans/iso01_uni.tbl.orig b/src/chrtrans/iso01_uni.tbl.orig
deleted file mode 100644
index 14f71ff3..00000000
--- a/src/chrtrans/iso01_uni.tbl.orig
+++ /dev/null
@@ -1,78 +0,0 @@
-#
-# Unicode mapping table for ISO 8859-1 fonts iso01.*
-# [use: unicode_start iso01.f16 iso01]
-#
-#Shall this become the "default" translation?
-#Meaning of that is currently not well defined.  It is different
-#from the default input or default output charset...
-#but there has to be exactly one table marked as "default".
-D0
-#
-#The MIME name of this charset. 
-Miso-8859-1
-
-#Name as a Display Charset (used on Options screen)
-OISO Latin 1
-
-0x20	U+0020  U+1360 
-0x21-0x62	idem
-# The following line is an example for mapping several accented versions
-# of small letter 'c' to 'c':
-0x63	U+0063 U+0107 U+0109 U+010B U+010D
-0x64-0x7e	idem
-0xa0-0xff	idem
-#0x00	U+fffd   # don't let failed char lookups return '\0'
-# Mappings of C0 control chars from original, disabled
-#0x01	U+263A
-#0x02	U+263B
-#0x03	U+2665
-#0x04	U+2666
-#0x05	U+2663
-#0x06	U+2660
-#0x07	U+2022
-#0x08	U+25D8
-#0x09	U+25CB
-#0x0A	U+25D9
-#0x0B	U+2642
-#0x0C	U+2640
-#0x0D	U+266A
-#0x0E	U+266B
-#0x0E	U+266C
-#0x0F	U+263C
-#0x10	U+25B6
-#0x10	U+25BA
-#0x11	U+25C0
-#0x11	U+25C4
-#0x12	U+2195
-#0x13	U+203C
-#0x14	U+00B6
-#0x15	U+00A7
-#0x16	U+25AC
-#0x17	U+21A8
-#0x18	U+2191
-#0x19	U+2193
-#0x1A	U+2192
-#0x1B	U+2190
-#0x1C	U+221F
-#0x1C	U+2319
-#0x1D	U+2194
-#0x1E	U+25B2
-#0x1F	U+25BC
-#0x7f		U+2302
-
-0xd0	U+0110	# Dstrok and ETH are nearly the same...
-
-# Dont wanna see these:
-# POP DIRECTIONAL FORMATTING      202C
-U+202c:
-# LEFT-TO-RIGHT OVERRIDE  202D
-U+202d:
-
-# TRADE MARK SIGN:
-U+2122:(TM)
-
-0x60    U+2018          # left single quotation mark
-0x27    U+2019-U+201b   # various single quotation marks
-0x22    U+201c-U+201f   # various double quotation marks
-
-U+2297:(×)
\ No newline at end of file
diff --git a/src/chrtrans/iso06_uni.tbl b/src/chrtrans/iso06_uni.tbl
index 46eb3709..fd3452da 100644
--- a/src/chrtrans/iso06_uni.tbl
+++ b/src/chrtrans/iso06_uni.tbl
@@ -109,4 +109,5 @@ U+2122:(TM)
 
 # Let's try to show a question mark for character that cannot
 # be shown.  U+fffd is used for invalid characters.
-U+fffd:?
+# It works, but let's stick with UHHH representatiion. - FM
+#U+fffd:?
diff --git a/src/chrtrans/iso08_uni.tbl b/src/chrtrans/iso08_uni.tbl
index d1c33b1d..bc2bb647 100644
--- a/src/chrtrans/iso08_uni.tbl
+++ b/src/chrtrans/iso08_uni.tbl
@@ -106,4 +106,5 @@ U+2122:(TM)
 
 # Let's try to show a question mark for character that cannot
 # be shown.  U+fffd is used for invalid characters.
-U+fffd:?
+# It works, but let's stick with UHHH representatiion. - FM
+#U+fffd:?
diff --git a/src/chrtrans/koi8r_uni.tbl b/src/chrtrans/koi8r_uni.tbl
index c4946a50..ebe4fe55 100644
--- a/src/chrtrans/koi8r_uni.tbl
+++ b/src/chrtrans/koi8r_uni.tbl
@@ -1,5 +1,5 @@
 # Options screen name for this character set
-OKOI8-R character set
+OKOI8-R Cyrillic
 
 # MIME name for this charset
 Mkoi8-r
diff --git a/src/chrtrans/mac_uni.tbl b/src/chrtrans/mac_uni.tbl
new file mode 100644
index 00000000..61c630f3
--- /dev/null
+++ b/src/chrtrans/mac_uni.tbl
@@ -0,0 +1,342 @@
+#The MIME name of this charset.
+Mmacintosh
+
+#Name as a Display Charset (used on Options screen)
+OMacintosh (8 bit)
+
+#
+#   Name:             MacOS_Roman [to Unicode]
+#   Unicode versions: 1.1, 2.0
+#   Table version:    0.2 (from internal ufrm version <9>)
+#   Date:             15 April 1995
+#   Author:           Peter Edberg <edberg1@applelink.apple.com>
+#
+#   Copyright (c) 1995 Apple Computer, Inc.  All Rights reserved.
+#
+#   Apple, the Apple logo, and Macintosh are trademarks of Apple
+#   Computer, Inc., registered in the United States and other countries.
+#   Unicode is a trademark of Unicode Inc. For the sake of brevity,
+#   throughout this document, "Macintosh" can be used to refer to
+#   Macintosh computers and "Unicode" can be used to refer to the
+#   Unicode standard.
+#
+#   Apple makes no warranty or representation, either express or
+#   implied, with respect to these tables, their quality, accuracy, or
+#   fitness for a particular purpose. In no event will Apple be liable
+#   for direct, indirect, special, incidental, or consequential damages
+#   resulting from any defect or inaccuracy in this document or the
+#   accompanying tables.
+#
+#   These mapping tables and character lists are preliminary and
+#   subject to change. Updated tables will be available from the
+#   Unicode Inc. ftp site (unicode.org), the Apple Computer ftp site
+#   (ftp.info.apple.com), the Apple Computer World-Wide Web pages
+#   (http://www.info.apple.com), and possibly on diskette from APDA
+#   (Apple's mail-order distribution service for developers).
+#
+#   Format:
+#   -------
+#
+#   Three tab-separated columns;
+#   '#' begins a comment which continues to the end of the line.
+#     Column #1 is the MacOS Roman code (in hex as 0xNN)
+#     Column #2 is the Unicode (in hex as 0xNNNN)
+#     Column #3 is the Unicode name (follows a comment sign, '#')
+#
+#   The entries are in MacOS Roman code order.
+#
+#   One of these mappings requires the use of a corporate character
+#   (for the Apple logo character). See the file "MacOS-CorpCharList".
+#   NOTE: The graphic image associated with the Apple logo character
+#   is not authorized for use without permission of Apple, and
+#   unauthorized use might constitute trademark infringement.
+#
+#   Notes on MacOS Roman:
+#   ---------------------
+#
+#   This character set is used for at least the following MacOS
+#   localizations: U.S., British, Canadian French, French, Swiss
+#   French, German, Swiss German, Italian, Swiss Italian, Dutch,
+#   Swedish, Norwegian, Danish, Finnish, Spanish, Catalan,
+#   Portuguese, Brazilian, and the default International system.
+#
+#   Variants of MacRoman are used for Croatian, Icelandic,
+#   Turkish, and Romanian. Separate mapping tables are available
+#   for these encodings.
+#
+#   At least through System 7.5, the bitmap versions of the fonts
+#   Chicago, New York, Geneva, and Monaco do not implement the
+#   full Roman character set; they only support MacOS Roman character
+#   codes up to 0xD8. The TrueType versions of these fonts do
+#   implement the full character set, as do both the bitmap and
+#   TrueType versions of the other standard Roman fonts.
+#
+#   In all MacOS encodings, fonts such as Chicago which are used
+#   as "system" fonts (for menus, dialogs, etc.) have four glyphs
+#   at code points 0x11-0x14 for transient use by the Menu Manager.
+#   These glyphs are not intended as characters for use in normal
+#   text, and the associated code points are not generally
+#   interpreted as associated with these glyphs; they are usually
+#   interpreted (if at all) as the control codes DC1-DC4.
+#
+##################
+
+#0x20    U+0020  # SPACE
+#0x21    U+0021  # EXCLAMATION MARK
+#0x22    U+0022  # QUOTATION MARK
+#0x23    U+0023  # NUMBER SIGN
+#0x24    U+0024  # DOLLAR SIGN
+#0x25    U+0025  # PERCENT SIGN
+#0x26    U+0026  # AMPERSAND
+#0x27    U+0027  # APOSTROPHE
+#0x28    U+0028  # LEFT PARENTHESIS
+#0x29    U+0029  # RIGHT PARENTHESIS
+#0x2A    U+002A  # ASTERISK
+#0x2B    U+002B  # PLUS SIGN
+#0x2C    U+002C  # COMMA
+#0x2D    U+002D  # HYPHEN-MINUS
+#0x2E    U+002E  # FULL STOP
+#0x2F    U+002F  # SOLIDUS
+#0x30    U+0030  # DIGIT ZERO
+#0x31    U+0031  # DIGIT ONE
+#0x32    U+0032  # DIGIT TWO
+#0x33    U+0033  # DIGIT THREE
+#0x34    U+0034  # DIGIT FOUR
+#0x35    U+0035  # DIGIT FIVE
+#0x36    U+0036  # DIGIT SIX
+#0x37    U+0037  # DIGIT SEVEN
+#0x38    U+0038  # DIGIT EIGHT
+#0x39    U+0039  # DIGIT NINE
+#0x3A    U+003A  # COLON
+#0x3B    U+003B  # SEMICOLON
+#0x3C    U+003C  # LESS-THAN SIGN
+#0x3D    U+003D  # EQUALS SIGN
+#0x3E    U+003E  # GREATER-THAN SIGN
+#0x3F    U+003F  # QUESTION MARK
+#0x40    U+0040  # COMMERCIAL AT
+#0x41    U+0041  # LATIN CAPITAL LETTER A
+#0x42    U+0042  # LATIN CAPITAL LETTER B
+#0x43    U+0043  # LATIN CAPITAL LETTER C
+#0x44    U+0044  # LATIN CAPITAL LETTER D
+#0x45    U+0045  # LATIN CAPITAL LETTER E
+#0x46    U+0046  # LATIN CAPITAL LETTER F
+#0x47    U+0047  # LATIN CAPITAL LETTER G
+#0x48    U+0048  # LATIN CAPITAL LETTER H
+#0x49    U+0049  # LATIN CAPITAL LETTER I
+#0x4A    U+004A  # LATIN CAPITAL LETTER J
+#0x4B    U+004B  # LATIN CAPITAL LETTER K
+#0x4C    U+004C  # LATIN CAPITAL LETTER L
+#0x4D    U+004D  # LATIN CAPITAL LETTER M
+#0x4E    U+004E  # LATIN CAPITAL LETTER N
+#0x4F    U+004F  # LATIN CAPITAL LETTER O
+#0x50    U+0050  # LATIN CAPITAL LETTER P
+#0x51    U+0051  # LATIN CAPITAL LETTER Q
+#0x52    U+0052  # LATIN CAPITAL LETTER R
+#0x53    U+0053  # LATIN CAPITAL LETTER S
+#0x54    U+0054  # LATIN CAPITAL LETTER T
+#0x55    U+0055  # LATIN CAPITAL LETTER U
+#0x56    U+0056  # LATIN CAPITAL LETTER V
+#0x57    U+0057  # LATIN CAPITAL LETTER W
+#0x58    U+0058  # LATIN CAPITAL LETTER X
+#0x59    U+0059  # LATIN CAPITAL LETTER Y
+#0x5A    U+005A  # LATIN CAPITAL LETTER Z
+#0x5B    U+005B  # LEFT SQUARE BRACKET
+#0x5C    U+005C  # REVERSE SOLIDUS
+#0x5D    U+005D  # RIGHT SQUARE BRACKET
+#0x5E    U+005E  # CIRCUMFLEX ACCENT
+#0x5F    U+005F  # LOW LINE
+#0x60    U+0060  # GRAVE ACCENT
+#0x61    U+0061  # LATIN SMALL LETTER A
+#0x62    U+0062  # LATIN SMALL LETTER B
+#0x63    U+0063  # LATIN SMALL LETTER C
+#0x64    U+0064  # LATIN SMALL LETTER D
+#0x65    U+0065  # LATIN SMALL LETTER E
+#0x66    U+0066  # LATIN SMALL LETTER F
+#0x67    U+0067  # LATIN SMALL LETTER G
+#0x68    U+0068  # LATIN SMALL LETTER H
+#0x69    U+0069  # LATIN SMALL LETTER I
+#0x6A    U+006A  # LATIN SMALL LETTER J
+#0x6B    U+006B  # LATIN SMALL LETTER K
+#0x6C    U+006C  # LATIN SMALL LETTER L
+#0x6D    U+006D  # LATIN SMALL LETTER M
+#0x6E    U+006E  # LATIN SMALL LETTER N
+#0x6F    U+006F  # LATIN SMALL LETTER O
+#0x70    U+0070  # LATIN SMALL LETTER P
+#0x71    U+0071  # LATIN SMALL LETTER Q
+#0x72    U+0072  # LATIN SMALL LETTER R
+#0x73    U+0073  # LATIN SMALL LETTER S
+#0x74    U+0074  # LATIN SMALL LETTER T
+#0x75    U+0075  # LATIN SMALL LETTER U
+#0x76    U+0076  # LATIN SMALL LETTER V
+#0x77    U+0077  # LATIN SMALL LETTER W
+#0x78    U+0078  # LATIN SMALL LETTER X
+#0x79    U+0079  # LATIN SMALL LETTER Y
+#0x7A    U+007A  # LATIN SMALL LETTER Z
+#0x7B    U+007B  # LEFT CURLY BRACKET
+#0x7C    U+007C  # VERTICAL LINE
+#0x7D    U+007D  # RIGHT CURLY BRACKET
+#0x7E    U+007E  # TILDE
+#
+0x20-0x7f       idem
+#
+0x80    U+00C4  # LATIN CAPITAL LETTER A WITH DIAERESIS
+0x81    U+00C5  # LATIN CAPITAL LETTER A WITH RING ABOVE
+0x82    U+00C7  # LATIN CAPITAL LETTER C WITH CEDILLA
+0x83    U+00C9  # LATIN CAPITAL LETTER E WITH ACUTE
+0x84    U+00D1  # LATIN CAPITAL LETTER N WITH TILDE
+0x85    U+00D6  # LATIN CAPITAL LETTER O WITH DIAERESIS
+0x86    U+00DC  # LATIN CAPITAL LETTER U WITH DIAERESIS
+0x87    U+00E1  # LATIN SMALL LETTER A WITH ACUTE
+0x88    U+00E0  # LATIN SMALL LETTER A WITH GRAVE
+0x89    U+00E2  # LATIN SMALL LETTER A WITH CIRCUMFLEX
+0x8A    U+00E4  # LATIN SMALL LETTER A WITH DIAERESIS
+0x8B    U+00E3  # LATIN SMALL LETTER A WITH TILDE
+0x8C    U+00E5  # LATIN SMALL LETTER A WITH RING ABOVE
+0x8D    U+00E7  # LATIN SMALL LETTER C WITH CEDILLA
+0x8E    U+00E9  # LATIN SMALL LETTER E WITH ACUTE
+0x8F    U+00E8  # LATIN SMALL LETTER E WITH GRAVE
+0x90    U+00EA  # LATIN SMALL LETTER E WITH CIRCUMFLEX
+0x91    U+00EB  # LATIN SMALL LETTER E WITH DIAERESIS
+0x92    U+00ED  # LATIN SMALL LETTER I WITH ACUTE
+0x93    U+00EC  # LATIN SMALL LETTER I WITH GRAVE
+0x94    U+00EE  # LATIN SMALL LETTER I WITH CIRCUMFLEX
+0x95    U+00EF  # LATIN SMALL LETTER I WITH DIAERESIS
+0x96    U+00F1  # LATIN SMALL LETTER N WITH TILDE
+0x97    U+00F3  # LATIN SMALL LETTER O WITH ACUTE
+0x98    U+00F2  # LATIN SMALL LETTER O WITH GRAVE
+0x99    U+00F4  # LATIN SMALL LETTER O WITH CIRCUMFLEX
+0x9A    U+00F6  # LATIN SMALL LETTER O WITH DIAERESIS
+0x9B    U+00F5  # LATIN SMALL LETTER O WITH TILDE
+0x9C    U+00FA  # LATIN SMALL LETTER U WITH ACUTE
+0x9D    U+00F9  # LATIN SMALL LETTER U WITH GRAVE
+0x9E    U+00FB  # LATIN SMALL LETTER U WITH CIRCUMFLEX
+0x9F    U+00FC  # LATIN SMALL LETTER U WITH DIAERESIS
+0xA0    U+2020  # DAGGER
+0xA1    U+00B0  # DEGREE SIGN
+0xA2    U+00A2  # CENT SIGN
+0xA3    U+00A3  # POUND SIGN
+0xA4    U+00A7  # SECTION SIGN
+0xA5    U+2022  # BULLET
+0xA6    U+00B6  # PILCROW SIGN
+0xA7    U+00DF  # LATIN SMALL LETTER SHARP S
+0xA8    U+00AE  # REGISTERED SIGN
+0xA9    U+00A9  # COPYRIGHT SIGN
+0xAA    U+2122  # TRADE MARK SIGN
+0xAB    U+00B4  # ACUTE ACCENT
+0xAC    U+00A8  # DIAERESIS
+0xAD    U+2260  # NOT EQUAL TO
+0xAE    U+00C6  # LATIN CAPITAL LIGATURE AE
+0xAF    U+00D8  # LATIN CAPITAL LETTER O WITH STROKE
+0xB0    U+221E  # INFINITY
+0xB1    U+00B1  # PLUS-MINUS SIGN
+0xB2    U+2264  # LESS-THAN OR EQUAL TO
+0xB3    U+2265  # GREATER-THAN OR EQUAL TO
+0xB4    U+00A5  # YEN SIGN
+0xB5    U+00B5  # MICRO SIGN
+0xB6    U+2202  # PARTIAL DIFFERENTIAL
+0xB7    U+2211  # N-ARY SUMMATION
+0xB8    U+220F  # N-ARY PRODUCT
+0xB9    U+03C0  # GREEK SMALL LETTER PI
+0xBA    U+222B  # INTEGRAL
+0xBB    U+00AA  # FEMININE ORDINAL INDICATOR
+0xBC    U+00BA  # MASCULINE ORDINAL INDICATOR
+0xBD    U+2126  # OHM SIGN
+0xBE    U+00E6  # LATIN SMALL LIGATURE AE
+0xBF    U+00F8  # LATIN SMALL LETTER O WITH STROKE
+0xC0    U+00BF  # INVERTED QUESTION MARK
+0xC1    U+00A1  # INVERTED EXCLAMATION MARK
+0xC2    U+00AC  # NOT SIGN
+0xC3    U+221A  # SQUARE ROOT
+0xC4    U+0192  # LATIN SMALL LETTER F WITH HOOK
+0xC5    U+2248  # ALMOST EQUAL TO
+0xC6    U+2206  # INCREMENT
+0xC7    U+00AB  # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xC8    U+00BB  # RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xC9    U+2026  # HORIZONTAL ELLIPSIS
+0xCA    U+00A0  # NO-BREAK SPACE
+0xCB    U+00C0  # LATIN CAPITAL LETTER A WITH GRAVE
+0xCC    U+00C3  # LATIN CAPITAL LETTER A WITH TILDE
+0xCD    U+00D5  # LATIN CAPITAL LETTER O WITH TILDE
+0xCE    U+0152  # LATIN CAPITAL LIGATURE OE
+0xCF    U+0153  # LATIN SMALL LIGATURE OE
+0xD0    U+2013  # EN DASH
+0xD1    U+2014  # EM DASH
+0xD2    U+201C  # LEFT DOUBLE QUOTATION MARK
+0xD3    U+201D  # RIGHT DOUBLE QUOTATION MARK
+0xD4    U+2018  # LEFT SINGLE QUOTATION MARK
+0xD5    U+2019  # RIGHT SINGLE QUOTATION MARK
+0xD6    U+00F7  # DIVISION SIGN
+0xD7    U+25CA  # LOZENGE
+0xD8    U+00FF  # LATIN SMALL LETTER Y WITH DIAERESIS
+0xD9    U+0178  # LATIN CAPITAL LETTER Y WITH DIAERESIS
+0xDA    U+2044  # FRACTION SLASH
+0xDB    U+00A4  # CURRENCY SIGN
+0xDC    U+2039  # SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+0xDD    U+203A  # SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+0xDE    U+FB01  # LATIN SMALL LIGATURE FI
+0xDF    U+FB02  # LATIN SMALL LIGATURE FL
+0xE0    U+2021  # DOUBLE DAGGER
+0xE1    U+00B7  # MIDDLE DOT
+0xE2    U+201A  # SINGLE LOW-9 QUOTATION MARK
+0xE3    U+201E  # DOUBLE LOW-9 QUOTATION MARK
+0xE4    U+2030  # PER MILLE SIGN
+0xE5    U+00C2  # LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+0xE6    U+00CA  # LATIN CAPITAL LETTER E WITH CIRCUMFLEX
+0xE7    U+00C1  # LATIN CAPITAL LETTER A WITH ACUTE
+0xE8    U+00CB  # LATIN CAPITAL LETTER E WITH DIAERESIS
+0xE9    U+00C8  # LATIN CAPITAL LETTER E WITH GRAVE
+0xEA    U+00CD  # LATIN CAPITAL LETTER I WITH ACUTE
+0xEB    U+00CE  # LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+0xEC    U+00CF  # LATIN CAPITAL LETTER I WITH DIAERESIS
+0xED    U+00CC  # LATIN CAPITAL LETTER I WITH GRAVE
+0xEE    U+00D3  # LATIN CAPITAL LETTER O WITH ACUTE
+0xEF    U+00D4  # LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+0xF0    U+F8FF  # Apple logo
+0xF1    U+00D2  # LATIN CAPITAL LETTER O WITH GRAVE
+0xF2    U+00DA  # LATIN CAPITAL LETTER U WITH ACUTE
+0xF3    U+00DB  # LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+0xF4    U+00D9  # LATIN CAPITAL LETTER U WITH GRAVE
+0xF5    U+0131  # LATIN SMALL LETTER DOTLESS I
+0xF6    U+02C6  # MODIFIER LETTER CIRCUMFLEX ACCENT
+0xF7    U+02DC  # SMALL TILDE
+0xF8    U+00AF  # MACRON
+0xF9    U+02D8  # BREVE
+0xFA    U+02D9  # DOT ABOVE
+0xFB    U+02DA  # RING ABOVE
+0xFC    U+00B8  # CEDILLA
+0xFD    U+02DD  # DOUBLE ACUTE ACCENT
+0xFE    U+02DB  # OGONEK
+0xFF    U+02C7  # CARON
+#
+# broken vertical bar (&#166;) - brvbar, brkbar
+U+00A6:|
+# superscript 3 (&#179;) - sup3
+U+00B3:^3
+# superscript 2 (&#178;) - sup2
+U+00B2:^2
+# superscript 1 (&#185;) - sup1
+U+00B9:^1
+# fraction 1/4 (&#188;) - frac14
+U+00BC: 1/4
+# fraction 1/2 (&#189;) - frac12
+U+00BD: 1/2
+# fraction 3/4 (&#190;) - frac34
+U+00BE: 3/4
+# capital Eth, Icelandic (&#208;) - ETH
+U+00D0:DH
+#      Dj  # capital D with stroke - Dstrok
+# capital Y, acute accent (&#221;) - Yacute
+U+00DD:Y'
+# capital THORN, Icelandic (&#222;) - THORN
+U+00DE:P
+# multiplication sign (&#215;) - times
+U+00D7:*
+# small eth, Icelandic (&#240;) - eth
+U+00F0:dh
+# small y, acute accent (&#253;) - yacute
+U+00FD:y'
+# small thorn, Icelandic (&#254;) - thorn
+U+00FE:p
+#
+# TRADE MARK SIGN
+U+2122:(TM)
diff --git a/src/chrtrans/makefile.in b/src/chrtrans/makefile.in
index 0122ecf1..cbb21618 100644
--- a/src/chrtrans/makefile.in
+++ b/src/chrtrans/makefile.in
@@ -9,6 +9,7 @@ SHELL = /bin/sh
 
 prefix		= @prefix@
 exec_prefix	= @exec_prefix@
+top_srcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= $(srcdir)
 
@@ -18,7 +19,11 @@ SITE_DEFS	= # FIXME: set in parent makefile
 CC		= @CC@
 CPP		= @CPP@
 CFLAGS		= @CFLAGS@
-CPP_OPTS	= @DEFS@ @CPPFLAGS@ -I.. -I../.. -I../../$(WWWINC) $(SITE_DEFS)
+CPP_OPTS	= @DEFS@ @CPPFLAGS@ \
+		-I../.. \
+		-I$(top_srcdir)/src \
+		-I$(top_srcdir)/$(WWWINC) \
+		$(SITE_DEFS)
 CC_OPTS		= $(CPP_OPTS) $(CFLAGS)
 
 #
@@ -33,9 +38,28 @@ FONTMAP_INC = iso01_uni.h# default, if not set by recursive call
 
 CHRTR=
 
-TABLES= $(CHRTR)iso02_uni.h \
- $(CHRTR)iso01_uni.h \
+TABLES= $(CHRTR)iso01_uni.h \
  $(CHRTR)def7_uni.h \
+ $(CHRTR)iso02_uni.h \
+ $(CHRTR)cp1252_uni.h \
+ $(CHRTR)dmcs_uni.h \
+ $(CHRTR)mac_uni.h \
+ $(CHRTR)next_uni.h \
+ $(CHRTR)koi8r_uni.h \
+ $(CHRTR)viscii_uni.h \
+ $(CHRTR)cp437_uni.h \
+ $(CHRTR)cp850_uni.h \
+ $(CHRTR)cp852_uni.h \
+ $(CHRTR)cp866_uni.h \
+ $(CHRTR)cp737_uni.h \
+ $(CHRTR)cp869_uni.h \
+ $(CHRTR)cp864_uni.h \
+ $(CHRTR)cp862_uni.h \
+ $(CHRTR)cp1250_uni.h \
+ $(CHRTR)cp1251_uni.h \
+ $(CHRTR)cp1253_uni.h \
+ $(CHRTR)cp1255_uni.h \
+ $(CHRTR)cp1256_uni.h \
  $(CHRTR)iso03_uni.h \
  $(CHRTR)iso04_uni.h \
  $(CHRTR)iso05_uni.h \
@@ -44,15 +68,6 @@ TABLES= $(CHRTR)iso02_uni.h \
  $(CHRTR)iso08_uni.h \
  $(CHRTR)iso09_uni.h \
  $(CHRTR)iso10_uni.h \
- $(CHRTR)koi8r_uni.h \
- $(CHRTR)cp437_uni.h \
- $(CHRTR)cp850_uni.h \
- $(CHRTR)cp852_uni.h \
- $(CHRTR)cp866_uni.h \
- $(CHRTR)cp1250_uni.h \
- $(CHRTR)cp1251_uni.h \
- $(CHRTR)cp1252_uni.h \
- $(CHRTR)viscii_uni.h \
  $(CHRTR)utf8_uni.h \
  $(CHRTR)rfc_suni.h \
  $(CHRTR)mnemonic_suni.h \
@@ -62,8 +77,10 @@ default: $(FONTMAP_INC)
 
 tables: $(TABLES)
 
-makeuctb: makeuctb.c UCkd.h
-	$(CC) $(CC_OPTS) -o makeuctb makeuctb.c
+makeuctb: makeuctb.o
+	$(CC) $(CC_OPTS) -o makeuctb makeuctb.o
+
+makeuctb.o: $(srcdir)/UCkd.h $(srcdir)/makeuctb.c
 
 .SUFFIXES : .tbl .i
 
@@ -76,34 +93,44 @@ makeuctb: makeuctb.c UCkd.h
 	@ECHO_CC@$(CPP) -C $(CPP_OPTS) $*.c >$@
 
 .tbl.h:
-	./makeuctb $*.tbl > $@
+	./makeuctb $(srcdir)/$*.tbl > $@
 
 # table files listed here once again to get the make dependencies
 # right, in case makeuctb was recompiled.
-iso01_uni.h: iso01_uni.tbl makeuctb
-iso02_uni.h: iso02_uni.tbl makeuctb
-def7_uni.h: def7_uni.tbl makeuctb
-iso03_uni.h: iso03_uni.tbl makeuctb
-iso04_uni.h: iso04_uni.tbl makeuctb
-iso05_uni.h: iso05_uni.tbl makeuctb
-iso06_uni.h: iso06_uni.tbl makeuctb
-iso07_uni.h: iso07_uni.tbl makeuctb
-iso08_uni.h: iso08_uni.tbl makeuctb
-iso09_uni.h: iso09_uni.tbl makeuctb
-iso10_uni.h: iso10_uni.tbl makeuctb
-koi8r_uni.h: koi8r_uni.tbl makeuctb
-cp437_uni.h: cp437_uni.tbl makeuctb
-cp850_uni.h: cp850_uni.tbl makeuctb
-cp852_uni.h: cp852_uni.tbl makeuctb
-cp852_uni.h: cp866_uni.tbl makeuctb
-cp1250_uni.h: cp1250_uni.tbl makeuctb
-cp1251_uni.h: cp1251_uni.tbl makeuctb
-cp1252_uni.h: cp1252_uni.tbl makeuctb
-viscii_uni.h: viscii_uni.tbl makeuctb
-utf8_uni.h: utf8_uni.tbl makeuctb
-mnemonic_suni.h: mnemonic_suni.tbl makeuctb
-mnem_suni.h: mnem_suni.tbl makeuctb
-rfc_suni.h: rfc_suni.tbl makeuctb
+def7_uni.h:		$(srcdir)/def7_uni.tbl		makeuctb
+iso01_uni.h:		$(srcdir)/iso01_uni.tbl		makeuctb
+iso02_uni.h:		$(srcdir)/iso02_uni.tbl		makeuctb
+cp1252_uni.h:		$(srcdir)/cp1252_uni.tbl	makeuctb
+dmcs_uni.h:		$(srcdir)/dmcs_uni.tbl		makeuctb
+mac_uni.h:		$(srcdir)/mac_uni.tbl		makeuctb
+next_uni.h:		$(srcdir)/next_uni.tbl		makeuctb
+koi8r_uni.h:		$(srcdir)/koi8r_uni.tbl		makeuctb
+viscii_uni.h:		$(srcdir)/viscii_uni.tbl	makeuctb
+cp437_uni.h:		$(srcdir)/cp437_uni.tbl		makeuctb
+cp850_uni.h:		$(srcdir)/cp850_uni.tbl		makeuctb
+cp852_uni.h:		$(srcdir)/cp852_uni.tbl		makeuctb
+cp866_uni.h:		$(srcdir)/cp866_uni.tbl		makeuctb
+cp737_uni.h:		$(srcdir)/cp737_uni.tbl		makeuctb
+cp869_uni.h:		$(srcdir)/cp869_uni.tbl		makeuctb
+cp864_uni.h:		$(srcdir)/cp864_uni.tbl		makeuctb
+cp862_uni.h:		$(srcdir)/cp862_uni.tbl		makeuctb
+cp1250_uni.h:		$(srcdir)/cp1250_uni.tbl	makeuctb
+cp1251_uni.h:		$(srcdir)/cp1251_uni.tbl	makeuctb
+cp1253_uni.h:		$(srcdir)/cp1253_uni.tbl	makeuctb
+cp1255_uni.h:		$(srcdir)/cp1255_uni.tbl	makeuctb
+cp1256_uni.h:		$(srcdir)/cp1256_uni.tbl	makeuctb
+iso03_uni.h:		$(srcdir)/iso03_uni.tbl		makeuctb
+iso04_uni.h:		$(srcdir)/iso04_uni.tbl		makeuctb
+iso05_uni.h:		$(srcdir)/iso05_uni.tbl		makeuctb
+iso06_uni.h:		$(srcdir)/iso06_uni.tbl		makeuctb
+iso07_uni.h:		$(srcdir)/iso07_uni.tbl		makeuctb
+iso08_uni.h:		$(srcdir)/iso08_uni.tbl		makeuctb
+iso09_uni.h:		$(srcdir)/iso09_uni.tbl		makeuctb
+iso10_uni.h:		$(srcdir)/iso10_uni.tbl		makeuctb
+utf8_uni.h:		$(srcdir)/utf8_uni.tbl		makeuctb
+mnemonic_suni.h:	$(srcdir)/mnemonic_suni.tbl	makeuctb
+mnem_suni.h:		$(srcdir)/mnem_suni.tbl		makeuctb
+rfc_suni.h:		$(srcdir)/rfc_suni.tbl		makeuctb
 
 clean:
 	rm -f makeuctb *.o *uni.h
diff --git a/src/chrtrans/makeuctb.c b/src/chrtrans/makeuctb.c
index ad95c534..f1417cb7 100644
--- a/src/chrtrans/makeuctb.c
+++ b/src/chrtrans/makeuctb.c
@@ -256,7 +256,8 @@ PUBLIC int main ARGS2(
 	if ((p = strchr(buffer, '\n')) != NULL) {
 	    *p = '\0';
 	} else {
-	    fprintf(stderr, "%s: Warning: line too long or incomplete\n",
+	    fprintf(stderr,
+		    "%s: Warning: line too long or incomplete.\n",
 		    tblname);
 	}
 
@@ -276,7 +277,7 @@ PUBLIC int main ARGS2(
 	 *  and <unicode> ::= U+<h><h><h><h>
 	 *  and <h> ::= <hexadecimal digit>
 	 *  and <replace> any string not containing '\n' or '\0'
-	 *  and <C replace> any string with C backslash escapes 
+	 *  and <C replace> any string with C backslash escapes.
 	 */
 	p = buffer;
 	while (*p == ' ' || *p == '\t') {
@@ -416,19 +417,20 @@ PUBLIC int main ARGS2(
 		continue;
 	    }
 
-	    tbuf = (char *) malloc (4*strlen(p));
+	    tbuf = (char *)malloc(4*strlen(p));
+
 	    if (!(p1 = tbuf)) {
 		fprintf(stderr, "%s: Out of memory\n", tblname);
 		exit(EX_DATAERR);
 	    }
 	    if (*p == '"') {
 		/*
-		 *  handle "<C replace>"
+		 *  Handle "<C replace>".
 		 *  Copy chars verbatim until first '"' not \-escaped or
-		 *  end of buffer
+		 *  end of buffer.
 		 */
 		int escaped = 0;
-		for (ch = *++p; (ch = *p) != '\0'; p++) {
+		for (ch = *(++p); (ch = *p) != '\0'; p++) {
 		    if (escaped) {
 			escaped = 0;
 		    } else if (ch == '"') {
@@ -444,12 +446,17 @@ PUBLIC int main ARGS2(
 		    if (escaped)
 			*p1++ = '\n';
 		}
-	    } else {		/* we had ':' */
-		for (ch = *++p; (ch = *p) != '\0'; p++, p1++) {
+	    } else {
+		/*
+		 *  We had ':'.
+		 */
+		for (ch = *(++p); (ch = *p) != '\0'; p++, p1++) {
 		    if ((unsigned char)ch < 32 || ch == '\\' || ch == '\"' ||
 			(unsigned char)ch >= 127) {
 			sprintf(p1, "\\%.3o", (unsigned char)ch); 
-/*		    fprintf(stderr, "%s\n", tbuf); */
+#ifdef NOTDEFINED
+			fprintf(stderr, "%s\n", tbuf);
+#endif /* NOTDEFINED */
 			p1 += 3;
 		    } else {
 			*p1 = ch;
@@ -458,16 +465,19 @@ PUBLIC int main ARGS2(
 	    }
 	    *p1 = '\0';
 	    for (i = un0; i <= un1; i++) {
-/*		printf("U+0x%x:%s\n", i, tbuf); */
+#ifdef NOTDEFINED
+		printf("U+0x%x:%s\n", i, tbuf); */
+#endif /* NOTDEFINED */
 		addpair_str(tbuf,i);
 	    }
 	    continue;
 	}
 
-/* Input line (after skipping spaces) doesn't start with one
-   of the specially recognized characters, so try to interpret
-   it as starting with a fontpos.
-*/
+	/*
+	 *  Input line (after skipping spaces) doesn't start with one
+	 *  of the specially recognized characters, so try to interpret
+	 *  it as starting with a fontpos.
+	 */
 	fp0 = strtol(p, &p1, 0);
 	if (p1 == p) {
 	    fprintf(stderr, "Bad input line: %s\n", buffer);
diff --git a/src/chrtrans/next_uni.tbl b/src/chrtrans/next_uni.tbl
new file mode 100644
index 00000000..95dbff8b
--- /dev/null
+++ b/src/chrtrans/next_uni.tbl
@@ -0,0 +1,182 @@
+#The MIME name of this charset.
+MIMEname x-next
+
+#Name as a Display Charset (used on Options screen)
+ONeXT character set
+
+#       Name:             NextStep Encoding to Unicode
+#       Unicode version:  1.1
+#       Table version:    0.1
+#       Table format:     Format A
+#       Date:             14 February 1995
+#       Authors:          Rick McGowan (rick@unicode.org)
+#
+#       Copyright (c) 1991-1995 Unicode, Inc.  All Rights reserved.
+#
+#       This file is provided as-is by Unicode, Inc. (The Unicode Consortium).
+#       No claims are made as to fitness for any particular purpose.  No
+#       warranties of any kind are expressed or implied.  The recipient
+#       agrees to determine applicability of information provided.  If this
+#       file has been provided on magnetic media by Unicode, Inc., the sole
+#       remedy for any claim will be exchange of defective media within 90
+#       days of receipt.
+#
+#       Recipient is granted the right to make copies in any form for
+#       internal distribution and to freely use the information supplied
+#       in the creation of products supporting Unicode.  Unicode, Inc.
+#       specifically excludes the right to re-distribute this file directly
+#       to third parties or other organizations whether for profit or not.
+#
+#       General notes:
+#
+#       This table contains the data the Unicode Consortium has on how
+#       NextStep Encoding characters map into Unicode.  Since the first
+#	128 characters (0x0 - 0x7f) are identical to ASCII and Unicode,
+#	this table only maps the NextStep range from 0x80 - 0xFF.
+#
+#       Format:  Three tab-separated columns
+#                Column #1 is the NextStep code (in hex as 0xXX)
+#                Column #2 is the Unicode (in hex as 0xXXXX)
+#                Column #3 NextStep name, Unicode name (follows a comment sign, '#')
+#
+#       The entries are in NextStep order
+#
+#       Any comments or problems, contact rick@unicode.org
+#
+#
+0x20-0x7f       idem
+#
+0x80	U+00a0	# NO-BREAK SPACE
+0x81	U+00c0	# LATIN CAPITAL LETTER A WITH GRAVE
+0x82	U+00c1	# LATIN CAPITAL LETTER A WITH ACUTE
+0x83	U+00c2	# LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+0x84	U+00c3	# LATIN CAPITAL LETTER A WITH TILDE
+0x85	U+00c4	# LATIN CAPITAL LETTER A WITH DIAERESIS
+0x86	U+00c5	# LATIN CAPITAL LETTER A WITH RING
+0x87	U+00c7	# LATIN CAPITAL LETTER C WITH CEDILLA
+0x88	U+00c8	# LATIN CAPITAL LETTER E WITH GRAVE
+0x89	U+00c9	# LATIN CAPITAL LETTER E WITH ACUTE
+0x8a	U+00ca	# LATIN CAPITAL LETTER E WITH CIRCUMFLEX
+0x8b	U+00cb	# LATIN CAPITAL LETTER E WITH DIAERESIS
+0x8c	U+00cc	# LATIN CAPITAL LETTER I WITH GRAVE
+0x8d	U+00cd	# LATIN CAPITAL LETTER I WITH ACUTE
+0x8e	U+00ce	# LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+0x8f	U+00cf	# LATIN CAPITAL LETTER I WITH DIAERESIS
+0x90	U+00d0	# LATIN CAPITAL LETTER ETH
+0x91	U+00d1	# LATIN CAPITAL LETTER N WITH TILDE
+0x92	U+00d2	# LATIN CAPITAL LETTER O WITH GRAVE
+0x93	U+00d3	# LATIN CAPITAL LETTER O WITH ACUTE
+0x94	U+00d4	# LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+0x95	U+00d5	# LATIN CAPITAL LETTER O WITH TILDE
+0x96	U+00d6	# LATIN CAPITAL LETTER O WITH DIAERESIS
+0x97	U+00d9	# LATIN CAPITAL LETTER U WITH GRAVE
+0x98	U+00da	# LATIN CAPITAL LETTER U WITH ACUTE
+0x99	U+00db	# LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+0x9a	U+00dc	# LATIN CAPITAL LETTER U WITH DIAERESIS
+0x9b	U+00dd	# LATIN CAPITAL LETTER Y WITH ACUTE
+0x9c	U+00de	# LATIN CAPITAL LETTER THORN
+0x9d	U+00b5	# MICRO SIGN 
+0x9e	U+00d7	# MULTIPLICATION SIGN
+0x9f	U+00f7	# DIVISION SIGN
+0xa0	U+00a9	# COPYRIGHT SIGN
+0xa1	U+00a1	# INVERTED EXCLAMATION MARK
+0xa2	U+00a2	# CENT SIGN
+0xa3	U+00a3	# POUND SIGN
+0xa4	U+2044	# FRACTION SLASH
+0xa5	U+00a5	# YEN SIGN
+0xa6	U+0192	# LATIN SMALL LETTER F WITH HOOK
+0xa7	U+00a7	# SECTION SIGN
+0xa8	U+00a4	# CURRENCY SIGN
+0xa9	U+2019	# RIGHT SINGLE QUOTATION MARK
+0xaa	U+201c	# LEFT DOUBLE QUOTATION MARK
+0xab	U+00ab	# LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xac	U+2039	# LATIN SMALL LETTER
+0xad	U+203a	# LATIN SMALL LETTER
+0xae	U+fb01	# LATIN SMALL LIGATURE FI
+0xaf	U+fb02	# LATIN SMALL LIGATURE FL
+0xb0	U+00ae	# REGISTERED SIGN
+0xb1	U+2013	# EN DASH
+0xb2	U+2020	# DAGGER
+0xb3	U+2021	# DOUBLE DAGGER
+0xb4	U+00b7	# MIDDLE DOT
+0xb5	U+00a6	# BROKEN BAR
+0xb6	U+00b6	# PILCROW SIGN
+0xb7	U+2022	# BULLET
+0xb8	U+201a	# SINGLE LOW-9 QUOTATION MARK
+0xb9	U+201e	# DOUBLE LOW-9 QUOTATION MARK
+0xba	U+201d	# RIGHT DOUBLE QUOTATION MARK
+0xbb	U+00bb	# RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xbc	U+2026	# HORIZONTAL ELLIPSIS
+0xbd	U+2030	# PER MILLE SIGN
+0xbe	U+00ac	# NOT SIGN
+0xbf	U+00bf	# INVERTED QUESTION MARK
+0xc0	U+00b9	# SUPERSCRIPT ONE
+0xc1	U+02cb	# MODIFIER LETTER GRAVE ACCENT
+0xc2	U+00b4	# ACUTE ACCENT
+0xc3	U+02c6	# MODIFIER LETTER CIRCUMFLEX ACCENT
+0xc4	U+02dc	# SMALL TILDE
+0xc5	U+00af	# MACRON
+0xc6	U+02d8	# BREVE
+0xc7	U+02d9	# DOT ABOVE
+0xc8	U+00a8	# DIAERESIS
+0xc9	U+00b2	# SUPERSCRIPT TWO
+0xca	U+02da	# RING ABOVE
+0xcb	U+00b8	# CEDILLA
+0xcc	U+00b3	# SUPERSCRIPT THREE
+0xcd	U+02dd	# DOUBLE ACUTE ACCENT
+0xce	U+02db	# OGONEK
+0xcf	U+02c7	# CARON
+0xd0	U+2014	# EM DASH
+0xd1	U+00b1	# PLUS-MINUS SIGN
+0xd2	U+00bc	# VULGAR FRACTION ONE QUARTER
+0xd3	U+00bd	# VULGAR FRACTION ONE HALF
+0xd4	U+00be	# VULGAR FRACTION THREE QUARTERS
+0xd5	U+00e0	# LATIN SMALL LETTER A WITH GRAVE
+0xd6	U+00e1	# LATIN SMALL LETTER A WITH ACUTE
+0xd7	U+00e2	# LATIN SMALL LETTER A WITH CIRCUMFLEX
+0xd8	U+00e3	# LATIN SMALL LETTER A WITH TILDE
+0xd9	U+00e4	# LATIN SMALL LETTER A WITH DIAERESIS
+0xda	U+00e5	# LATIN SMALL LETTER A WITH RING ABOVE
+0xdb	U+00e7	# LATIN SMALL LETTER C WITH CEDILLA
+0xdc	U+00e8	# LATIN SMALL LETTER E WITH GRAVE
+0xdd	U+00e9	# LATIN SMALL LETTER E WITH ACUTE
+0xde	U+00ea	# LATIN SMALL LETTER E WITH CIRCUMFLEX
+0xdf	U+00eb	# LATIN SMALL LETTER E WITH DIAERESIS
+0xe0	U+00ec	# LATIN SMALL LETTER I WITH GRAVE
+0xe1	U+00c6	# LATIN CAPITAL LETTER AE
+0xe2	U+00ed	# LATIN SMALL LETTER I WITH ACUTE
+0xe3	U+00aa	# FEMININE ORDINAL INDICATOR
+0xe4	U+00ee	# LATIN SMALL LETTER I WITH CIRCUMFLEX
+0xe5	U+00ef	# LATIN SMALL LETTER I WITH DIAERESIS
+0xe6	U+00f0	# LATIN SMALL LETTER ETH
+0xe7	U+00f1	# LATIN SMALL LETTER N WITH TILDE
+0xe8	U+0141	# LATIN CAPITAL LETTER L WITH STROKE
+0xe9	U+00d8	# LATIN CAPITAL LETTER O WITH STROKE
+0xea	U+0152	# LATIN CAPITAL LIGATURE OE
+0xeb	U+00ba	# MASCULINE ORDINAL INDICATOR
+0xec	U+00f2	# LATIN SMALL LETTER O WITH GRAVE
+0xed	U+00f3	# LATIN SMALL LETTER O WITH ACUTE
+0xee	U+00f4	# LATIN SMALL LETTER O WITH CIRCUMFLEX
+0xef	U+00f5	# LATIN SMALL LETTER O WITH TILDE
+0xf0	U+00f6	# LATIN SMALL LETTER O WITH DIAERESIS
+0xf1	U+00e6	# LATIN SMALL LETTER AE
+0xf2	U+00f9	# LATIN SMALL LETTER U WITH GRAVE
+0xf3	U+00fa	# LATIN SMALL LETTER U WITH ACUTE
+0xf4	U+00fb	# LATIN SMALL LETTER U WITH CIRCUMFLEX
+0xf5	U+0131	# LATIN SMALL LETTER DOTLESS I
+0xf6	U+00fc	# LATIN SMALL LETTER U WITH DIAERESIS
+0xf7	U+00fd	# LATIN SMALL LETTER Y WITH ACUTE
+0xf8	U+0142	# LATIN SMALL LETTER L WITH STROKE
+0xf9	U+00f8	# LATIN SMALL LETTER O WITH STROKE
+0xfa	U+0153	# LATIN SMALL LIGATURE OE
+0xfb	U+00df	# LATIN SMALL LETTER SHARP S
+0xfc	U+00fe	# LATIN SMALL LETTER THORN
+0xfd	U+00ff	# LATIN SMALL LETTER Y WITH DIAERESIS
+#0xfe	U+fffd	# .notdef, REPLACEMENT CHARACTER
+#0xff	U+fffd	# .notdef, REPLACEMENT CHARACTER
+#
+# degree sign (&#176;) - deg
+U+00B0:DEG
+#
+# TRADE MARK SIGN
+U+2122:(TM)
diff --git a/src/chrtrans/utf8_uni.tbl b/src/chrtrans/utf8_uni.tbl
index 4cc4df97..61cdb259 100644
--- a/src/chrtrans/utf8_uni.tbl
+++ b/src/chrtrans/utf8_uni.tbl
@@ -2,17 +2,11 @@
 # This one is not really much of a "translation table", it mostly just
 # tells Lynx that "unicode-1-1-utf-8" is Unicode/UCS2 encoded in UTF8...
 #
-#Shall this become the "default" translation?
-#Meaning of that is currently unclear...  It's different
-#from the default input or defualt output charset...
-#but there has to be exactly one table marked as "default".
-D0
-#
 #The MIME name of this charset. 
-Municode-1-1-utf-8
+MIMEname unicode-1-1-utf-8
 
 #Name as a Display Charset (used on Options screen)
-O UNICODE UTF 8
+OptionName UNICODE UTF 8
 
 # Some kind of raw Unicode?
 # Use 6 for for really "raw" 16bit UCS-2, 7 for UTF-8, ...
@@ -30,4 +24,11 @@ O UNICODE UTF 8
 
 R 7
  
+#Shall this become the "default" translation?
+#There has to be exactly one table marked as "default".
+Default NO
+
+# Don't fall back to default table for unicode -> 8bit
+Fallback NO
+ 
 0x20-0x7f	idem
diff --git a/src/makefile.in b/src/makefile.in
index e1f35c23..203e97b2 100644
--- a/src/makefile.in
+++ b/src/makefile.in
@@ -5,6 +5,7 @@ SHELL = /bin/sh
 @SET_MAKE@
 prefix		= @prefix@
 exec_prefix	= @exec_prefix@
+top_srcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= $(srcdir)
 
@@ -28,7 +29,12 @@ WAISLIB		= # FIXME: set in parent makefile
 WWWINC		= WWW/Library/Implementation
 WWWLIB		= ../WWW/Library/unix/libwww.a
 
-CPP_OPTS	= $(DEFS) $(CPPFLAGS) -I.. -I../$(WWWINC) $(SITE_DEFS)
+CPP_OPTS	= $(DEFS) $(CPPFLAGS) \
+		-I. \
+		-I.. \
+		-I$(top_srcdir) \
+		-I$(top_srcdir)/$(WWWINC) \
+		$(SITE_DEFS)
 CC_OPTS		= $(CPP_OPTS) $(CFLAGS)
 
 LINT		= @LINT@
@@ -100,9 +106,28 @@ LYCharSets.o: ../userdefs.h
 
 CHRTR= chrtrans/
 
-TABLES= $(CHRTR)iso02_uni.h \
- $(CHRTR)iso01_uni.h \
+TABLES= $(CHRTR)iso01_uni.h \
  $(CHRTR)def7_uni.h \
+ $(CHRTR)iso02_uni.h \
+ $(CHRTR)cp1252_uni.h \
+ $(CHRTR)dmcs_uni.h \
+ $(CHRTR)mac_uni.h \
+ $(CHRTR)next_uni.h \
+ $(CHRTR)koi8r_uni.h \
+ $(CHRTR)viscii_uni.h \
+ $(CHRTR)cp437_uni.h \
+ $(CHRTR)cp850_uni.h \
+ $(CHRTR)cp852_uni.h \
+ $(CHRTR)cp866_uni.h \
+ $(CHRTR)cp737_uni.h \
+ $(CHRTR)cp869_uni.h \
+ $(CHRTR)cp864_uni.h \
+ $(CHRTR)cp862_uni.h \
+ $(CHRTR)cp1250_uni.h \
+ $(CHRTR)cp1251_uni.h \
+ $(CHRTR)cp1253_uni.h \
+ $(CHRTR)cp1255_uni.h \
+ $(CHRTR)cp1256_uni.h \
  $(CHRTR)iso03_uni.h \
  $(CHRTR)iso04_uni.h \
  $(CHRTR)iso05_uni.h \
@@ -111,15 +136,6 @@ TABLES= $(CHRTR)iso02_uni.h \
  $(CHRTR)iso08_uni.h \
  $(CHRTR)iso09_uni.h \
  $(CHRTR)iso10_uni.h \
- $(CHRTR)koi8r_uni.h \
- $(CHRTR)cp437_uni.h \
- $(CHRTR)cp850_uni.h \
- $(CHRTR)cp852_uni.h \
- $(CHRTR)cp866_uni.h \
- $(CHRTR)cp1250_uni.h \
- $(CHRTR)cp1251_uni.h \
- $(CHRTR)cp1252_uni.h \
- $(CHRTR)viscii_uni.h \
  $(CHRTR)utf8_uni.h \
  $(CHRTR)rfc_suni.h \
  $(CHRTR)mnemonic_suni.h \
diff --git a/userdefs.h b/userdefs.h
index 01af99b7..de27f138 100644
--- a/userdefs.h
+++ b/userdefs.h
@@ -621,9 +621,8 @@
  *   ISO Latin 1			iso-8859-1
  *   ISO Latin 2			iso-8859-2
  *   Other ISO Latin			x-iso-8859-other
+ *   WinLatin1 (cp1252)			iso-8859-1-windows-3.1-latin-1
  *   DEC Multinational			dec-mcs
- *   IBM PC character set		cp437
- *   IBM PC codepage 850		cp850
  *   Macintosh (8 bit)			macintosh
  *   NeXT character set			x-next
  *   KOI8-R character set		koi8-r
@@ -632,14 +631,22 @@
  *   Japanese (SJIS)			shift_jis
  *   Korean				euc-kr
  *   Taipei (Big5)			big5
+ *   Vietnamese (VISCII)		viscii
  *   7 bit approximations		us-ascii
  *   Transparent			x-transparent
+ *   IBM PC character set		cp437
+ *   IBM PC codepage 850		cp850
  *   PC Latin2 CP 852			cp852
  *   DosCyrillic (cp866)		cp866
- *   MS Windows CP 1252			iso-8859-1-windows-3.1-latin-1
- *   MS Windows CP 1250			windows-1250
+ *   DosGreek (cp737)			cp737
+ *   DosGreek2 (cp869)			cp869
+ *   DosArabic (cp864)			cp864
+ *   DosHebrew (cp862)			cp862
+ *   WinLatin2 (cp1250)			windows-1250
  *   WinCyrillic (cp1251)		windows-1251
- *   Vietnamese (VISCII)		viscii
+ *   WinGreek (cp1253)			windows-1253
+ *   WinHebrew (cp1255)			windows-1255
+ *   WinArabic (cp1256)			windows-1256
  *   ISO Latin 3			iso-8859-3
  *   ISO Latin 4			iso-8859-4
  *   ISO 8859-5 Cyrillic		iso-8859-5
@@ -867,9 +874,9 @@
 #define BOXVERT 0
 #define BOXHORI 0
 #else
-#define BOXVERT '*'
+#define BOXVERT '|'
 /* #define BOXVERT 0 */
-#define BOXHORI '*'
+#define BOXHORI '-'
 /* #define BOXHORI 0 */
 #endif /* DOSPATH */
 #endif	/* !HAVE_CONFIG_H */
@@ -1181,7 +1188,7 @@
  * the version definition with the Project Version on checkout. Just
  * ignore it. - kw */
 /* $Format: "#define LYNX_VERSION \"$ProjectVersion$\""$ */
-#define LYNX_VERSION "2.7.1ac-0.89"
+#define LYNX_VERSION "2.7.1ac-0.95"
 
 #ifndef MAXINT
 #define MAXINT 2147483647	/* max integer */
@@ -1199,8 +1206,8 @@
 #define SEARCH_GOAL_LINE 4	/* try to position search target there */
 #endif
 
-#define MAXCHARSETS 40		/* max character sets supported */
-#define MAXCHARSETSP 41		/* always one more than MAXCHARSETS */
+#define MAXCHARSETS 50		/* max character sets supported */
+#define MAXCHARSETSP 51		/* always one more than MAXCHARSETS */
 
 #ifdef __DJGPP__
 #define FNAMES_8_3