From 05e9de5ac11bf4eb5b700d64593e66bf62b6167f Mon Sep 17 00:00:00 2001 From: maja Date: Sat, 25 Mar 2000 18:16:41 +0000 Subject: [PATCH] Upgrade to Lynx 2.8.2. -moj --- gnu/usr.bin/lynx/ABOUT-NLS | 279 + gnu/usr.bin/lynx/CHANGES | 2738 ++++++ gnu/usr.bin/lynx/COPYHEADER | 2 +- gnu/usr.bin/lynx/INSTALLATION | 643 +- gnu/usr.bin/lynx/LYHelp.hin | 18 + gnu/usr.bin/lynx/LYMessages_en.h | 1114 ++- gnu/usr.bin/lynx/MAKEFILE.W32 | 9 +- gnu/usr.bin/lynx/Makefile.bsd-wrapper | 15 +- gnu/usr.bin/lynx/PROBLEMS | 40 +- gnu/usr.bin/lynx/README | 93 +- .../WWW/Library/Implementation/BSDI_Makefile | 405 - .../WWW/Library/Implementation/CommonMakefile | 373 - .../WWW/Library/Implementation/HTAABrow.c | 186 +- .../WWW/Library/Implementation/HTAABrow.h | 44 +- .../WWW/Library/Implementation/HTAAFile.c | 210 - .../WWW/Library/Implementation/HTAAFile.h | 126 - .../WWW/Library/Implementation/HTAAProt.c | 374 +- .../WWW/Library/Implementation/HTAAProt.h | 94 +- .../WWW/Library/Implementation/HTAAServ.c | 686 -- .../WWW/Library/Implementation/HTAAServ.h | 148 - .../WWW/Library/Implementation/HTAAUtil.c | 135 +- .../WWW/Library/Implementation/HTAAUtil.h | 81 +- .../lynx/WWW/Library/Implementation/HTACL.c | 221 - .../lynx/WWW/Library/Implementation/HTACL.h | 109 - .../WWW/Library/Implementation/HTAccess.c | 302 +- .../WWW/Library/Implementation/HTAccess.h | 114 +- .../lynx/WWW/Library/Implementation/HTAlert.c | 126 - .../lynx/WWW/Library/Implementation/HTAlert.h | 128 - .../WWW/Library/Implementation/HTAnchor.c | 331 +- .../WWW/Library/Implementation/HTAnchor.h | 95 +- .../lynx/WWW/Library/Implementation/HTAssoc.c | 15 +- .../lynx/WWW/Library/Implementation/HTAssoc.h | 19 +- .../lynx/WWW/Library/Implementation/HTAtom.c | 38 +- .../lynx/WWW/Library/Implementation/HTAtom.h | 10 +- .../lynx/WWW/Library/Implementation/HTAuth.c | 210 - .../lynx/WWW/Library/Implementation/HTAuth.h | 66 - .../lynx/WWW/Library/Implementation/HTBTree.c | 94 +- .../lynx/WWW/Library/Implementation/HTBTree.h | 33 +- .../lynx/WWW/Library/Implementation/HTCJK.h | 12 +- .../lynx/WWW/Library/Implementation/HTChunk.c | 11 +- .../lynx/WWW/Library/Implementation/HTChunk.h | 219 +- .../lynx/WWW/Library/Implementation/HTDOS.c | 106 +- .../lynx/WWW/Library/Implementation/HTDOS.h | 7 +- .../lynx/WWW/Library/Implementation/HTFTP.c | 1880 ++-- .../lynx/WWW/Library/Implementation/HTFTP.h | 27 +- .../WWW/Library/Implementation/HTFWriter.c | 102 +- .../WWW/Library/Implementation/HTFWriter.h | 16 +- .../lynx/WWW/Library/Implementation/HTFile.c | 1426 +-- .../lynx/WWW/Library/Implementation/HTFile.h | 13 +- .../WWW/Library/Implementation/HTFinger.c | 216 +- .../WWW/Library/Implementation/HTFinger.h | 4 +- .../WWW/Library/Implementation/HTFormat.c | 630 +- .../WWW/Library/Implementation/HTFormat.h | 191 +- .../WWW/Library/Implementation/HTGopher.c | 495 +- .../WWW/Library/Implementation/HTGopher.h | 4 +- .../lynx/WWW/Library/Implementation/HTGroup.c | 121 +- .../lynx/WWW/Library/Implementation/HTGroup.h | 68 +- .../WWW/Library/Implementation/HTHistory.c | 157 - .../WWW/Library/Implementation/HTHistory.h | 112 - .../lynx/WWW/Library/Implementation/HTInit.c | 176 - .../lynx/WWW/Library/Implementation/HTInit.h | 14 +- .../lynx/WWW/Library/Implementation/HTLex.c | 37 +- .../lynx/WWW/Library/Implementation/HTLex.h | 19 +- .../lynx/WWW/Library/Implementation/HTList.c | 74 +- .../lynx/WWW/Library/Implementation/HTList.h | 28 +- .../lynx/WWW/Library/Implementation/HTMIME.c | 801 +- .../lynx/WWW/Library/Implementation/HTMIME.h | 31 +- .../lynx/WWW/Library/Implementation/HTMLDTD.c | 2026 ++--- .../lynx/WWW/Library/Implementation/HTMLDTD.h | 199 +- .../lynx/WWW/Library/Implementation/HTMLGen.c | 236 +- .../lynx/WWW/Library/Implementation/HTMLGen.h | 4 +- .../lynx/WWW/Library/Implementation/HTNews.c | 504 +- .../lynx/WWW/Library/Implementation/HTNews.h | 4 +- .../lynx/WWW/Library/Implementation/HTParse.c | 92 +- .../lynx/WWW/Library/Implementation/HTParse.h | 17 +- .../WWW/Library/Implementation/HTPasswd.c | 301 - .../WWW/Library/Implementation/HTPasswd.h | 129 - .../lynx/WWW/Library/Implementation/HTPlain.c | 328 +- .../lynx/WWW/Library/Implementation/HTPlain.h | 4 +- .../lynx/WWW/Library/Implementation/HTRules.c | 212 +- .../lynx/WWW/Library/Implementation/HTRules.h | 124 +- .../WWW/Library/Implementation/HTStream.h | 8 +- .../WWW/Library/Implementation/HTString.c | 578 +- .../WWW/Library/Implementation/HTString.h | 56 +- .../lynx/WWW/Library/Implementation/HTStyle.c | 42 +- .../lynx/WWW/Library/Implementation/HTStyle.h | 26 +- .../lynx/WWW/Library/Implementation/HTTCP.c | 1144 ++- .../lynx/WWW/Library/Implementation/HTTCP.h | 54 +- .../lynx/WWW/Library/Implementation/HTTP.c | 370 +- .../lynx/WWW/Library/Implementation/HTTP.h | 2 +- .../WWW/Library/Implementation/HTTelnet.c | 261 +- .../WWW/Library/Implementation/HTTelnet.h | 2 +- .../lynx/WWW/Library/Implementation/HTUU.c | 44 +- .../lynx/WWW/Library/Implementation/HTUU.h | 15 +- .../lynx/WWW/Library/Implementation/HTUtils.h | 267 +- .../WWW/Library/Implementation/HTVMSUtils.c | 246 +- .../WWW/Library/Implementation/HTVMSUtils.h | 14 +- .../Library/Implementation/HTVMS_WaisProt.c | 89 +- .../Library/Implementation/HTVMS_WaisProt.h | 130 +- .../WWW/Library/Implementation/HTVMS_WaisUI.c | 1015 +-- .../WWW/Library/Implementation/HTVMS_WaisUI.h | 232 +- .../lynx/WWW/Library/Implementation/HTWAIS.c | 203 +- .../lynx/WWW/Library/Implementation/HTWAIS.h | 27 +- .../lynx/WWW/Library/Implementation/HTWSRC.c | 40 +- .../lynx/WWW/Library/Implementation/HTWSRC.h | 20 +- .../WWW/Library/Implementation/HTWriter.c | 189 - .../WWW/Library/Implementation/HTWriter.h | 28 - .../lynx/WWW/Library/Implementation/HText.h | 90 +- .../lynx/WWW/Library/Implementation/LYLeaks.h | 6 +- .../lynx/WWW/Library/Implementation/LYexit.h | 10 +- .../lynx/WWW/Library/Implementation/SGML.c | 1553 +++- .../lynx/WWW/Library/Implementation/SGML.h | 263 +- .../lynx/WWW/Library/Implementation/UCAux.h | 10 +- .../lynx/WWW/Library/Implementation/UCDefs.h | 36 +- .../lynx/WWW/Library/Implementation/UCMap.h | 48 +- .../lynx/WWW/Library/Implementation/crypt.c | 8 +- .../WWW/Library/Implementation/crypt_util.c | 182 +- .../lynx/WWW/Library/Implementation/getline.c | 7 +- .../lynx/WWW/Library/Implementation/getpass.c | 5 +- .../WWW/Library/Implementation/makefile.in | 305 + .../lynx/WWW/Library/Implementation/tcp.h | 244 +- .../WWW/Library/Implementation/ufc-crypt.h | 14 +- .../lynx/WWW/Library/apollo_m68k/Makefile | 38 - gnu/usr.bin/lynx/WWW/Library/clix/Makefile | 30 - gnu/usr.bin/lynx/WWW/Library/convex/Makefile | 32 - .../lynx/WWW/Library/decstation/Makefile | 23 - .../lynx/WWW/Library/djgpp/CommonMakefile | 177 +- gnu/usr.bin/lynx/WWW/Library/djgpp/makefile | 10 +- .../{sco/Makefile => djgpp/makefile.sla} | 29 +- gnu/usr.bin/lynx/WWW/Library/duns/Makefile | 489 - gnu/usr.bin/lynx/WWW/Library/freebsd/Makefile | 27 - gnu/usr.bin/lynx/WWW/Library/isc/Makefile | 30 - gnu/usr.bin/lynx/WWW/Library/mips/Makefile | 29 - gnu/usr.bin/lynx/WWW/Library/netbsd/Makefile | 29 - gnu/usr.bin/lynx/WWW/Library/next/Makefile | 40 - gnu/usr.bin/lynx/WWW/Library/osf/Makefile | 23 - gnu/usr.bin/lynx/WWW/Library/ptx/Makefile | 29 - gnu/usr.bin/lynx/WWW/Library/rs6000/Makefile | 29 - gnu/usr.bin/lynx/WWW/Library/sgi/Makefile | 30 - gnu/usr.bin/lynx/WWW/Library/snake/Makefile | 33 - .../lynx/WWW/Library/solaris2/Makefile | 29 - gnu/usr.bin/lynx/WWW/Library/sun3/Makefile | 29 - gnu/usr.bin/lynx/WWW/Library/sun4/Makefile | 29 - gnu/usr.bin/lynx/WWW/Library/svr4/Makefile | 29 - .../lynx/WWW/Library/umaxv-m88k/Makefile | 30 - gnu/usr.bin/lynx/WWW/Library/unix/makefile.in | 62 - gnu/usr.bin/lynx/WWW/Library/unix_x/Makefile | 491 -- .../lynx/WWW/Library/vax_ultrix/Makefile | 33 - gnu/usr.bin/lynx/WWW/Library/vms/descrip.mms | 57 +- gnu/usr.bin/lynx/WWW/Library/vms/libmake.com | 30 +- gnu/usr.bin/lynx/aclocal.m4 | 919 +- gnu/usr.bin/lynx/build-slang.com | 21 +- gnu/usr.bin/lynx/build.com | 23 +- gnu/usr.bin/lynx/cfg_defs.sh | 44 + gnu/usr.bin/lynx/cfg_edit.sh | 17 + gnu/usr.bin/lynx/config.guess | 356 +- gnu/usr.bin/lynx/config.hin | 108 +- gnu/usr.bin/lynx/config.sub | 128 +- gnu/usr.bin/lynx/configure | 5639 ++++++++++-- gnu/usr.bin/lynx/configure.in | 414 +- gnu/usr.bin/lynx/descrip.mms | 16 +- gnu/usr.bin/lynx/docs/CHANGES2.3 | 42 +- gnu/usr.bin/lynx/docs/CHANGES2.4 | 14 +- gnu/usr.bin/lynx/docs/CHANGES2.5 | 42 +- gnu/usr.bin/lynx/docs/CHANGES2.8 | 227 +- gnu/usr.bin/lynx/docs/FM.announce | 22 +- gnu/usr.bin/lynx/docs/IBMPC-charsets.announce | 15 +- gnu/usr.bin/lynx/docs/OS-390.announce | 93 + gnu/usr.bin/lynx/docs/README.chartrans | 47 +- gnu/usr.bin/lynx/docs/SOCKETSHR.announce | 6 +- gnu/usr.bin/lynx/docs/djgpp.key | 214 + gnu/usr.bin/lynx/docs/pdcurses.key | 123 + gnu/usr.bin/lynx/docs/slang.key | 4 + gnu/usr.bin/lynx/fixtext.sh | 10 + gnu/usr.bin/lynx/intl/ChangeLog | 1022 +++ gnu/usr.bin/lynx/intl/VERSION | 1 + gnu/usr.bin/lynx/intl/bindtextdom.c | 199 + gnu/usr.bin/lynx/intl/cat-compat.c | 262 + gnu/usr.bin/lynx/intl/dcgettext.c | 593 ++ gnu/usr.bin/lynx/intl/dgettext.c | 59 + gnu/usr.bin/lynx/intl/explodename.c | 181 + gnu/usr.bin/lynx/intl/finddomain.c | 189 + gnu/usr.bin/lynx/intl/gettext.c | 70 + gnu/usr.bin/lynx/intl/gettext.h | 105 + gnu/usr.bin/lynx/intl/gettextP.h | 73 + gnu/usr.bin/lynx/intl/hash-string.h | 63 + gnu/usr.bin/lynx/intl/intl-compat.c | 76 + gnu/usr.bin/lynx/intl/l10nflist.c | 409 + gnu/usr.bin/lynx/intl/libgettext.h | 182 + gnu/usr.bin/lynx/intl/libintl.h | 108 + gnu/usr.bin/lynx/intl/linux-msg.sed | 100 + gnu/usr.bin/lynx/intl/loadinfo.h | 58 + gnu/usr.bin/lynx/intl/loadmsgcat.c | 199 + gnu/usr.bin/lynx/intl/localealias.c | 378 + gnu/usr.bin/lynx/intl/makefile.in | 216 + gnu/usr.bin/lynx/intl/po2tbl.sed.in | 102 + gnu/usr.bin/lynx/intl/textdomain.c | 106 + gnu/usr.bin/lynx/intl/xopen-msg.sed | 104 + gnu/usr.bin/lynx/lynx.cfg | 1046 ++- gnu/usr.bin/lynx/lynx.hlp | 370 +- gnu/usr.bin/lynx/lynx.man | 382 +- .../lynx/lynx_help/Lynx_users_guide.html | 771 +- gnu/usr.bin/lynx/lynx_help/about_lynx.html | 16 +- gnu/usr.bin/lynx/lynx_help/help_files.txt | 56 + .../lynx_help/keystrokes/alt_edit_help.html | 54 + .../lynx_help/keystrokes/cookie_help.html | 15 +- .../lynx/lynx_help/keystrokes/edit_help.html | 67 +- .../lynx_help/keystrokes/environments.html | 437 + .../lynx_help/keystrokes/follow_help.html | 61 +- .../lynx_help/keystrokes/keystroke_help.html | 15 +- .../lynx_help/keystrokes/option_help.html | 633 +- .../lynx/lynx_help/keystrokes/other_help.html | 56 +- .../lynx_help/keystrokes/test_display.html | 55 + .../lynx_help/keystrokes/visited_help.html | 4 +- gnu/usr.bin/lynx/lynx_help/lynx-dev.html | 178 +- .../lynx/lynx_help/lynx_help_main.html | 148 +- .../lynx/lynx_help/lynx_url_support.html | 65 +- gnu/usr.bin/lynx/makefile.in | 280 +- gnu/usr.bin/lynx/po/ChangeLog | 99 + gnu/usr.bin/lynx/po/POTFILES.in | 45 + gnu/usr.bin/lynx/po/de.po | 31 + gnu/usr.bin/lynx/po/es.po | 27 + gnu/usr.bin/lynx/po/fr.po | 7827 +++++++++++++++++ gnu/usr.bin/lynx/po/it.po | 247 + gnu/usr.bin/lynx/po/ko.po | 11 + gnu/usr.bin/lynx/po/lynx.pot | 4820 ++++++++++ gnu/usr.bin/lynx/po/makefile.inn | 249 + gnu/usr.bin/lynx/po/nl.po | 11 + gnu/usr.bin/lynx/po/no.po | 11 + gnu/usr.bin/lynx/po/pl.po | 11 + gnu/usr.bin/lynx/po/pt.po | 27 + gnu/usr.bin/lynx/po/readme | 21 + gnu/usr.bin/lynx/po/sl.po | 11 + gnu/usr.bin/lynx/po/sv.po | 11 + gnu/usr.bin/lynx/samples/blue-background.lss | 84 + gnu/usr.bin/lynx/samples/cernrules.txt | 226 + gnu/usr.bin/lynx/samples/lynx-keymaps | 116 + gnu/usr.bin/lynx/samples/lynx.cfg | 1033 ++- gnu/usr.bin/lynx/samples/lynx.lss | 80 +- gnu/usr.bin/lynx/samples/mild-colors.lss | 53 + gnu/usr.bin/lynx/samples/mime.types | 34 +- gnu/usr.bin/lynx/src/AttrList.h | 38 +- gnu/usr.bin/lynx/src/DefaultStyle.c | 173 +- gnu/usr.bin/lynx/src/GridText.c | 4716 +++++++--- gnu/usr.bin/lynx/src/GridText.h | 141 +- gnu/usr.bin/lynx/src/HTAlert.c | 501 +- gnu/usr.bin/lynx/src/HTAlert.h | 37 +- gnu/usr.bin/lynx/src/HTFWriter.c | 483 +- gnu/usr.bin/lynx/src/HTFont.h | 6 +- gnu/usr.bin/lynx/src/HTForms.h | 15 +- gnu/usr.bin/lynx/src/HTInit.c | 425 +- gnu/usr.bin/lynx/src/HTML.c | 1720 ++-- gnu/usr.bin/lynx/src/HTML.h | 18 +- gnu/usr.bin/lynx/src/HTSaveToFile.h | 7 + gnu/usr.bin/lynx/src/LYBookmark.c | 682 +- gnu/usr.bin/lynx/src/LYBookmark.h | 2 +- gnu/usr.bin/lynx/src/LYCgi.c | 369 +- gnu/usr.bin/lynx/src/LYCgi.h | 5 +- gnu/usr.bin/lynx/src/LYCharSets.c | 601 +- gnu/usr.bin/lynx/src/LYCharSets.h | 27 +- gnu/usr.bin/lynx/src/LYCharUtils.c | 736 +- gnu/usr.bin/lynx/src/LYCharUtils.h | 8 +- gnu/usr.bin/lynx/src/LYCharVals.h | 30 + gnu/usr.bin/lynx/src/LYClean.c | 78 +- gnu/usr.bin/lynx/src/LYClean.h | 8 +- gnu/usr.bin/lynx/src/LYCookie.c | 1201 ++- gnu/usr.bin/lynx/src/LYCookie.h | 50 +- gnu/usr.bin/lynx/src/LYCurses.c | 493 +- gnu/usr.bin/lynx/src/LYCurses.h | 74 +- gnu/usr.bin/lynx/src/LYDownload.c | 347 +- gnu/usr.bin/lynx/src/LYDownload.h | 4 +- gnu/usr.bin/lynx/src/LYEdit.c | 178 +- gnu/usr.bin/lynx/src/LYEdit.h | 7 +- gnu/usr.bin/lynx/src/LYEditmap.c | 395 +- gnu/usr.bin/lynx/src/LYExtern.c | 92 +- gnu/usr.bin/lynx/src/LYExtern.h | 2 +- gnu/usr.bin/lynx/src/LYForms.c | 247 +- gnu/usr.bin/lynx/src/LYGetFile.c | 427 +- gnu/usr.bin/lynx/src/LYGetFile.h | 3 +- gnu/usr.bin/lynx/src/LYGlobalDefs.h | 133 +- gnu/usr.bin/lynx/src/LYHash.c | 68 +- gnu/usr.bin/lynx/src/LYHash.h | 19 +- gnu/usr.bin/lynx/src/LYHistory.c | 536 +- gnu/usr.bin/lynx/src/LYHistory.h | 18 +- gnu/usr.bin/lynx/src/LYJump.c | 62 +- gnu/usr.bin/lynx/src/LYJump.h | 3 +- gnu/usr.bin/lynx/src/LYKeymap.c | 575 +- gnu/usr.bin/lynx/src/LYKeymap.h | 234 +- gnu/usr.bin/lynx/src/LYLeaks.c | 125 +- gnu/usr.bin/lynx/src/LYList.c | 139 +- gnu/usr.bin/lynx/src/LYList.h | 5 +- gnu/usr.bin/lynx/src/LYLocal.c | 1242 ++- gnu/usr.bin/lynx/src/LYLocal.h | 8 - gnu/usr.bin/lynx/src/LYMail.c | 574 +- gnu/usr.bin/lynx/src/LYMail.h | 13 +- gnu/usr.bin/lynx/src/LYMain.c | 3221 ++++--- gnu/usr.bin/lynx/src/LYMainLoop.c | 2547 +++--- gnu/usr.bin/lynx/src/LYMainLoop.h | 11 +- gnu/usr.bin/lynx/src/LYMap.c | 129 +- gnu/usr.bin/lynx/src/LYMap.h | 8 +- gnu/usr.bin/lynx/src/LYNews.c | 349 +- gnu/usr.bin/lynx/src/LYNews.h | 2 +- gnu/usr.bin/lynx/src/LYOptions.c | 1980 ++++- gnu/usr.bin/lynx/src/LYOptions.h | 76 +- gnu/usr.bin/lynx/src/LYPrettySrc.c | 301 + gnu/usr.bin/lynx/src/LYPrettySrc.h | 73 + gnu/usr.bin/lynx/src/LYPrint.c | 2413 ++--- gnu/usr.bin/lynx/src/LYPrint.h | 9 +- gnu/usr.bin/lynx/src/LYReadCFG.c | 2173 +++-- gnu/usr.bin/lynx/src/LYReadCFG.h | 9 +- gnu/usr.bin/lynx/src/LYSearch.c | 31 +- gnu/usr.bin/lynx/src/LYSearch.h | 2 +- gnu/usr.bin/lynx/src/LYShowInfo.c | 364 +- gnu/usr.bin/lynx/src/LYShowInfo.h | 6 +- gnu/usr.bin/lynx/src/LYSignal.h | 2 +- gnu/usr.bin/lynx/src/LYStrings.c | 1798 +++- gnu/usr.bin/lynx/src/LYStrings.h | 98 +- gnu/usr.bin/lynx/src/LYStructs.h | 15 +- gnu/usr.bin/lynx/src/LYStyle.c | 251 +- gnu/usr.bin/lynx/src/LYStyle.h | 42 +- gnu/usr.bin/lynx/src/LYSystem.h | 10 - gnu/usr.bin/lynx/src/LYTraversal.c | 173 +- gnu/usr.bin/lynx/src/LYTraversal.h | 4 +- gnu/usr.bin/lynx/src/LYUpload.c | 258 +- gnu/usr.bin/lynx/src/LYUpload.h | 4 +- gnu/usr.bin/lynx/src/LYUtils.c | 2395 +++-- gnu/usr.bin/lynx/src/LYUtils.h | 261 +- gnu/usr.bin/lynx/src/LYexit.c | 133 +- gnu/usr.bin/lynx/src/LYrcFile.c | 956 +- gnu/usr.bin/lynx/src/LYrcFile.h | 2 +- gnu/usr.bin/lynx/src/UCAuto.c | 103 +- gnu/usr.bin/lynx/src/UCAuto.h | 3 +- gnu/usr.bin/lynx/src/UCAux.c | 68 +- gnu/usr.bin/lynx/src/UCdomap.c | 570 +- gnu/usr.bin/lynx/src/UCdomap.h | 72 +- gnu/usr.bin/lynx/src/chrtrans/MAKEW32.BAT | 8 +- gnu/usr.bin/lynx/src/chrtrans/README.format | 30 +- gnu/usr.bin/lynx/src/chrtrans/README.tables | 19 +- gnu/usr.bin/lynx/src/chrtrans/UCkd.h | 2 +- .../lynx/src/chrtrans/build-chrtrans.com | 14 +- gnu/usr.bin/lynx/src/chrtrans/caselower.h | 738 ++ gnu/usr.bin/lynx/src/chrtrans/cp1250_uni.tbl | 408 +- gnu/usr.bin/lynx/src/chrtrans/cp1251_uni.tbl | 281 +- gnu/usr.bin/lynx/src/chrtrans/cp1252_uni.tbl | 414 +- gnu/usr.bin/lynx/src/chrtrans/cp1253_uni.tbl | 61 +- gnu/usr.bin/lynx/src/chrtrans/cp1255_uni.tbl | 151 +- gnu/usr.bin/lynx/src/chrtrans/cp1256_uni.tbl | 183 +- gnu/usr.bin/lynx/src/chrtrans/cp1257_uni.tbl | 342 +- gnu/usr.bin/lynx/src/chrtrans/cp437_uni.tbl | 24 +- gnu/usr.bin/lynx/src/chrtrans/cp737_uni.tbl | 7 +- gnu/usr.bin/lynx/src/chrtrans/cp775_uni.tbl | 139 +- gnu/usr.bin/lynx/src/chrtrans/cp850_uni.tbl | 149 +- gnu/usr.bin/lynx/src/chrtrans/cp852_uni.tbl | 393 +- gnu/usr.bin/lynx/src/chrtrans/cp862_uni.tbl | 5 +- gnu/usr.bin/lynx/src/chrtrans/cp864_uni.tbl | 5 +- gnu/usr.bin/lynx/src/chrtrans/cp866_uni.tbl | 8 +- gnu/usr.bin/lynx/src/chrtrans/cp866u_uni.tbl | 156 + gnu/usr.bin/lynx/src/chrtrans/cp869_uni.tbl | 7 +- gnu/usr.bin/lynx/src/chrtrans/def7_uni.tbl | 91 +- gnu/usr.bin/lynx/src/chrtrans/dmcs_uni.tbl | 31 +- .../chrtrans}/entities.h | 403 +- gnu/usr.bin/lynx/src/chrtrans/hp_uni.tbl | 212 + gnu/usr.bin/lynx/src/chrtrans/iso01_uni.tbl | 7 +- gnu/usr.bin/lynx/src/chrtrans/iso02_uni.tbl | 5 +- gnu/usr.bin/lynx/src/chrtrans/iso03_uni.tbl | 9 +- gnu/usr.bin/lynx/src/chrtrans/iso04_uni.tbl | 9 +- gnu/usr.bin/lynx/src/chrtrans/iso05_uni.tbl | 7 +- gnu/usr.bin/lynx/src/chrtrans/iso06_uni.tbl | 5 +- gnu/usr.bin/lynx/src/chrtrans/iso07_uni.tbl | 9 +- gnu/usr.bin/lynx/src/chrtrans/iso08_uni.tbl | 5 +- gnu/usr.bin/lynx/src/chrtrans/iso09_uni.tbl | 9 +- gnu/usr.bin/lynx/src/chrtrans/iso10_uni.tbl | 6 +- gnu/usr.bin/lynx/src/chrtrans/iso15_uni.tbl | 216 + gnu/usr.bin/lynx/src/chrtrans/jcuken_kb.h | 21 + gnu/usr.bin/lynx/src/chrtrans/koi8r_uni.tbl | 229 +- gnu/usr.bin/lynx/src/chrtrans/koi8u_uni.tbl | 154 + gnu/usr.bin/lynx/src/chrtrans/makefile.dos | 20 +- gnu/usr.bin/lynx/src/chrtrans/makefile.in | 37 +- gnu/usr.bin/lynx/src/chrtrans/makeuctb.c | 109 +- gnu/usr.bin/lynx/src/chrtrans/mnem2_suni.tbl | 4 +- gnu/usr.bin/lynx/src/chrtrans/mnem_suni.tbl | 4 +- gnu/usr.bin/lynx/src/chrtrans/next_uni.tbl | 2 +- gnu/usr.bin/lynx/src/chrtrans/rfc_suni.tbl | 4 +- gnu/usr.bin/lynx/src/chrtrans/rot13_kb.h | 21 + gnu/usr.bin/lynx/src/chrtrans/utf8_uni.tbl | 8 +- gnu/usr.bin/lynx/src/chrtrans/viscii_uni.tbl | 2 +- gnu/usr.bin/lynx/src/chrtrans/yawerty_kb.h | 21 + gnu/usr.bin/lynx/src/descrip.mms | 21 +- gnu/usr.bin/lynx/src/makefile.dos | 59 +- gnu/usr.bin/lynx/src/makefile.dsl | 65 + gnu/usr.bin/lynx/src/makefile.in | 77 +- gnu/usr.bin/lynx/src/makefile.wsl | 64 + gnu/usr.bin/lynx/src/structdump.h | 159 + gnu/usr.bin/lynx/test/c1.html | 82 + gnu/usr.bin/lynx/test/raw8bit.html | 37 + gnu/usr.bin/lynx/test/sgml.html | 25 +- gnu/usr.bin/lynx/test/spaces.html | 36 + gnu/usr.bin/lynx/test/unicode.html | 153 +- gnu/usr.bin/lynx/userdefs.h | 477 +- gnu/usr.bin/lynx/utils/lpansi/Makefile | 24 - gnu/usr.bin/lynx/utils/lpansi/README | 82 - gnu/usr.bin/lynx/utils/lpansi/lpansi.1 | 77 - gnu/usr.bin/lynx/utils/lpansi/lpansi.c | 160 - gnu/usr.bin/lynx/utils/lpansi/vmsbuild.com | 73 - 404 files changed, 74647 insertions(+), 35173 deletions(-) create mode 100644 gnu/usr.bin/lynx/ABOUT-NLS create mode 100644 gnu/usr.bin/lynx/CHANGES create mode 100644 gnu/usr.bin/lynx/LYHelp.hin delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/BSDI_Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/CommonMakefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAFile.c delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAFile.h delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAServ.c delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAServ.h delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/HTACL.c delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/HTACL.h delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/HTAlert.c delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/HTAlert.h delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/HTAuth.c delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/HTAuth.h delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/HTHistory.c delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/HTHistory.h delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/HTInit.c delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/HTPasswd.c delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/HTPasswd.h delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/HTWriter.c delete mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/HTWriter.h create mode 100644 gnu/usr.bin/lynx/WWW/Library/Implementation/makefile.in delete mode 100644 gnu/usr.bin/lynx/WWW/Library/apollo_m68k/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/clix/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/convex/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/decstation/Makefile rename gnu/usr.bin/lynx/WWW/Library/{sco/Makefile => djgpp/makefile.sla} (50%) delete mode 100644 gnu/usr.bin/lynx/WWW/Library/duns/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/freebsd/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/isc/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/mips/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/netbsd/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/next/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/osf/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/ptx/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/rs6000/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/sgi/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/snake/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/solaris2/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/sun3/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/sun4/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/svr4/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/umaxv-m88k/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/unix/makefile.in delete mode 100644 gnu/usr.bin/lynx/WWW/Library/unix_x/Makefile delete mode 100644 gnu/usr.bin/lynx/WWW/Library/vax_ultrix/Makefile create mode 100644 gnu/usr.bin/lynx/cfg_defs.sh create mode 100644 gnu/usr.bin/lynx/cfg_edit.sh create mode 100644 gnu/usr.bin/lynx/docs/OS-390.announce create mode 100644 gnu/usr.bin/lynx/docs/djgpp.key create mode 100644 gnu/usr.bin/lynx/docs/pdcurses.key create mode 100644 gnu/usr.bin/lynx/docs/slang.key create mode 100644 gnu/usr.bin/lynx/fixtext.sh create mode 100644 gnu/usr.bin/lynx/intl/ChangeLog create mode 100644 gnu/usr.bin/lynx/intl/VERSION create mode 100644 gnu/usr.bin/lynx/intl/bindtextdom.c create mode 100644 gnu/usr.bin/lynx/intl/cat-compat.c create mode 100644 gnu/usr.bin/lynx/intl/dcgettext.c create mode 100644 gnu/usr.bin/lynx/intl/dgettext.c create mode 100644 gnu/usr.bin/lynx/intl/explodename.c create mode 100644 gnu/usr.bin/lynx/intl/finddomain.c create mode 100644 gnu/usr.bin/lynx/intl/gettext.c create mode 100644 gnu/usr.bin/lynx/intl/gettext.h create mode 100644 gnu/usr.bin/lynx/intl/gettextP.h create mode 100644 gnu/usr.bin/lynx/intl/hash-string.h create mode 100644 gnu/usr.bin/lynx/intl/intl-compat.c create mode 100644 gnu/usr.bin/lynx/intl/l10nflist.c create mode 100644 gnu/usr.bin/lynx/intl/libgettext.h create mode 100644 gnu/usr.bin/lynx/intl/libintl.h create mode 100644 gnu/usr.bin/lynx/intl/linux-msg.sed create mode 100644 gnu/usr.bin/lynx/intl/loadinfo.h create mode 100644 gnu/usr.bin/lynx/intl/loadmsgcat.c create mode 100644 gnu/usr.bin/lynx/intl/localealias.c create mode 100644 gnu/usr.bin/lynx/intl/makefile.in create mode 100644 gnu/usr.bin/lynx/intl/po2tbl.sed.in create mode 100644 gnu/usr.bin/lynx/intl/textdomain.c create mode 100644 gnu/usr.bin/lynx/intl/xopen-msg.sed create mode 100644 gnu/usr.bin/lynx/lynx_help/help_files.txt create mode 100644 gnu/usr.bin/lynx/lynx_help/keystrokes/alt_edit_help.html create mode 100644 gnu/usr.bin/lynx/lynx_help/keystrokes/environments.html create mode 100644 gnu/usr.bin/lynx/lynx_help/keystrokes/test_display.html create mode 100644 gnu/usr.bin/lynx/po/ChangeLog create mode 100644 gnu/usr.bin/lynx/po/POTFILES.in create mode 100644 gnu/usr.bin/lynx/po/de.po create mode 100644 gnu/usr.bin/lynx/po/es.po create mode 100644 gnu/usr.bin/lynx/po/fr.po create mode 100644 gnu/usr.bin/lynx/po/it.po create mode 100644 gnu/usr.bin/lynx/po/ko.po create mode 100644 gnu/usr.bin/lynx/po/lynx.pot create mode 100644 gnu/usr.bin/lynx/po/makefile.inn create mode 100644 gnu/usr.bin/lynx/po/nl.po create mode 100644 gnu/usr.bin/lynx/po/no.po create mode 100644 gnu/usr.bin/lynx/po/pl.po create mode 100644 gnu/usr.bin/lynx/po/pt.po create mode 100644 gnu/usr.bin/lynx/po/readme create mode 100644 gnu/usr.bin/lynx/po/sl.po create mode 100644 gnu/usr.bin/lynx/po/sv.po create mode 100644 gnu/usr.bin/lynx/samples/blue-background.lss create mode 100644 gnu/usr.bin/lynx/samples/cernrules.txt create mode 100644 gnu/usr.bin/lynx/samples/lynx-keymaps create mode 100644 gnu/usr.bin/lynx/samples/mild-colors.lss create mode 100644 gnu/usr.bin/lynx/src/LYCharVals.h create mode 100644 gnu/usr.bin/lynx/src/LYPrettySrc.c create mode 100644 gnu/usr.bin/lynx/src/LYPrettySrc.h delete mode 100644 gnu/usr.bin/lynx/src/LYSystem.h create mode 100644 gnu/usr.bin/lynx/src/chrtrans/caselower.h create mode 100644 gnu/usr.bin/lynx/src/chrtrans/cp866u_uni.tbl rename gnu/usr.bin/lynx/{WWW/Library/Implementation => src/chrtrans}/entities.h (72%) create mode 100644 gnu/usr.bin/lynx/src/chrtrans/hp_uni.tbl create mode 100644 gnu/usr.bin/lynx/src/chrtrans/iso15_uni.tbl create mode 100644 gnu/usr.bin/lynx/src/chrtrans/jcuken_kb.h create mode 100644 gnu/usr.bin/lynx/src/chrtrans/koi8u_uni.tbl create mode 100644 gnu/usr.bin/lynx/src/chrtrans/rot13_kb.h create mode 100644 gnu/usr.bin/lynx/src/chrtrans/yawerty_kb.h create mode 100644 gnu/usr.bin/lynx/src/makefile.dsl create mode 100644 gnu/usr.bin/lynx/src/makefile.wsl create mode 100644 gnu/usr.bin/lynx/src/structdump.h create mode 100644 gnu/usr.bin/lynx/test/c1.html create mode 100644 gnu/usr.bin/lynx/test/raw8bit.html create mode 100644 gnu/usr.bin/lynx/test/spaces.html delete mode 100644 gnu/usr.bin/lynx/utils/lpansi/Makefile delete mode 100644 gnu/usr.bin/lynx/utils/lpansi/README delete mode 100644 gnu/usr.bin/lynx/utils/lpansi/lpansi.1 delete mode 100644 gnu/usr.bin/lynx/utils/lpansi/lpansi.c delete mode 100644 gnu/usr.bin/lynx/utils/lpansi/vmsbuild.com diff --git a/gnu/usr.bin/lynx/ABOUT-NLS b/gnu/usr.bin/lynx/ABOUT-NLS new file mode 100644 index 00000000000..249a4b5b01e --- /dev/null +++ b/gnu/usr.bin/lynx/ABOUT-NLS @@ -0,0 +1,279 @@ +Notes on the Free Translation Project +************************************* + + Free software is going international! The Free Translation Project +is a way to get maintainers of free software, translators, and users all +together, so that will gradually become able to speak many languages. +A few packages already provide translations for their messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do *not* +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work at translations should contact the appropriate team. + + When reporting bugs in the `intl/' directory or bugs which may be +related to internationalization, you should tell about the version of +`gettext' which is used. The information can be found in the +`intl/VERSION' file, in internationalized packages. + +One advise in advance +===================== + + If you want to exploit the full power of internationalization, you +should configure it using + + ./configure --with-included-gettext + +to force usage of internationalizing routines provided within this +package, despite the existence of internationalizing capabilities in the +operating system where this package is being installed. So far, only +the `gettext' implementation in the GNU C library version 2 provides as +many features (such as locale alias or message inheritance) as the +implementation here. It is also not possible to offer this additional +functionality on top of a `catgets' implementation. Future versions of +GNU `gettext' will very likely convey even more functionality. So it +might be a good idea to change to GNU `gettext' as soon as possible. + + So you need not provide this option if you are using GNU libc 2 or +you have installed a recent copy of the GNU gettext package with the +included `libintl'. + +INSTALL Matters +=============== + + Some packages are "localizable" when properly installed; the +programs they contain can be made to speak your own native language. +Most such packages use GNU `gettext'. Other packages have their own +ways to internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system provides +usable `catgets' (if using this is selected by the installer) or +`gettext' functions. If neither is available, the GNU `gettext' own +library will be used. This library is wholly contained within this +package, usually in the `intl/' subdirectory, so prior installation of +the GNU `gettext' package is *not* required. Installers may use +special options at configuration time for changing the default +behaviour. The commands: + + ./configure --with-included-gettext + ./configure --with-catgets + ./configure --disable-nls + +will respectively bypass any pre-existing `catgets' or `gettext' to use +the internationalizing routines provided within this package, enable +the use of the `catgets' functions (if found on the locale system), or +else, *totally* disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl.a' file and +will decide to use this. This might be not what is desirable. You +should use the more recent version of the GNU `gettext' library. I.e. +if the file `intl/VERSION' shows that the library which comes with this +package is more recent, you should use + + ./configure --with-included-gettext + +to prevent auto-detection. + + By default the configuration process will not test for the `catgets' +function and therefore they will not be used. The reasons are already +given above: the emulation on top of `catgets' cannot provide all the +extensions provided by the GNU `gettext' library. If you nevertheless +want to use the `catgets' functions use + + ./configure --with-catgets + +to enable the test for `catgets' (this causes no harm if `catgets' is +not available on your system). If you really select this option we +would like to hear about the reasons because we cannot think of any +good one ourself. + + Internationalized packages have usually many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +Using This Package +================== + + As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +ISO 639 `LL' two-letter code prior to using the programs in the +package. For example, let's suppose that you speak German. At the +shell prompt, merely execute `setenv LANG de' (in `csh'), +`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This +can be done from your `.login' or `.profile' file, once and for all. + + An operating system might already offer message localization for +many of its programs, while other programs have been installed locally +with the full capabilities of GNU `gettext'. Just using `gettext' +extended syntax for `LANG' would break proper localization of already +available operating system programs. In this case, users should set +both `LANGUAGE' and `LANG' variables in their environment, as programs +using GNU `gettext' give preference to `LANGUAGE'. For example, some +Swedish users would rather read translations in German than English for +when Swedish is not available. This is easily accomplished by setting +`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'. + +Translating Teams +================= + + For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list, courtesy of Linux +International. You may reach your translation team at the address +`LL@li.org', replacing LL by the two-letter ISO 639 code for your +language. Language codes are *not* the same as the country codes given +in ISO 3166. The following translation teams exist, as of August 1998: + + Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en', + Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian + `hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja', + Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish + `pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es', + Swedish `sv', and Turkish `tr'. + +For example, you may reach the Chinese translation team by writing to +`zh@li.org'. + + If you'd like to volunteer to *work* at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is *not* the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +*actively* in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `translation@iro.umontreal.ca' to reach the +coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skill are praised more than +programming skill, here. + +Available Packages +================== + + Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of August +1998. The matrix shows, in regard of each package, for which languages +PO files have been submitted to translation coordination. + + Ready PO files cs da de el en es fi fr it + .----------------------------. + bash | [] [] | + bison | [] [] | + clisp | [] [] [] [] | + cpio | [] [] [] | + diffutils | [] [] [] | + enscript | [] [] [] [] | + fileutils | [] [] [] [] | + findutils | [] [] [] [] | + flex | [] [] | + gcal | [] [] | + gettext | [] [] [] [] [] | + grep | [] [] [] [] | + hello | [] [] [] [] [] | + id-utils | [] [] | + indent | [] [] | + libc | [] [] [] | + m4 | [] [] | + make | [] [] [] | + music | [] | + ptx | [] [] [] | + recode | [] [] [] [] | + sed | | + sh-utils | [] [] [] | + sharutils | [] [] [] [] [] | + tar | [] [] [] [] | + texinfo | [] [] [] | + textutils | [] [] [] [] | + wdiff | [] [] [] [] | + wget | [] [] [] [] | + `----------------------------' + cs da de el en es fi fr it + 7 4 26 4 1 18 1 26 4 + + ja ko nl no pl pt ru sl sv + .----------------------------. + bash | [] | 3 + bison | [] | 3 + clisp | | 4 + cpio | [] [] [] | 6 + diffutils | [] [] | 5 + enscript | [] [] | 6 + fileutils | [] [] [] [] [] [] [] | 11 + findutils | [] [] [] [] [] | 9 + flex | [] [] | 4 + gcal | [] [] [] | 5 + gettext | [] [] [] [] [] [] [] | 13 + grep | [] [] [] [] [] [] [] | 11 + hello | [] [] [] [] [] [] [] | 12 + id-utils | [] | 3 + indent | [] [] [] | 5 + libc | [] [] [] [] [] | 8 + m4 | [] [] [] [] | 6 + make | [] [] [] | 6 + music | [] | 2 + ptx | [] [] [] [] [] | 8 + recode | [] [] [] [] [] | 9 + sed | | 0 + sh-utils | [] [] [] [] [] | 8 + sharutils | [] [] | 7 + tar | [] [] [] [] [] [] [] | 11 + texinfo | [] | 4 + textutils | [] [] [] [] [] | 9 + wdiff | [] [] [] [] | 8 + wget | [] | 5 + `----------------------------' + 18 teams ja ko nl no pl pt ru sl sv + 29 domains 1 12 21 11 19 7 5 7 17 191 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If August 1998 seems to be old, you may fetch a more recent copy of +this `ABOUT-NLS' file on most GNU archive sites. + +Using `gettext' in new packages +=============================== + + If you are writing a freely available program and want to +internationalize it you are welcome to use GNU `gettext' in your +package. Of course the GNU Public License applies to your sources from +then if you include `gettext' directly in your distribution on but +since you are writing free software anyway this is no restriction. + + Once the sources are change appropriately and the setup can handle to +use of `gettext' the only thing missing are the translations. The Free +Translation Project is also available for packages which are not +developed inside the GNU project. Therefore the information given above +applies also for every other Free Software Project. Contact +`translation@iro.umontreal.ca' to make the `.pot' files available to +the translation teams. + diff --git a/gnu/usr.bin/lynx/CHANGES b/gnu/usr.bin/lynx/CHANGES new file mode 100644 index 00000000000..c64f985ca44 --- /dev/null +++ b/gnu/usr.bin/lynx/CHANGES @@ -0,0 +1,2738 @@ +Changes since Lynx 2.8 release +=============================================================================== + +1999-06-01 (2.8.2rel.1) +----------------------- +1999-06-01 (2.8.2pre.11) +* minor fixes from W3C HTML validation -TD +* update links to HTML'ized lynxcfg in users' guide -VH +1999-05-31 (2.8.2pre.10) +* add links to HTML'ized lynxcfg to users' guide -LP +* cleanup temporary files left by + lynx -dump LYNXCFG:// > /dev/null + (analysis by LP) -VH +* add comments to lynx.cfg describing effect of restricting configuration + settings in nested includes -VH +* delineate URL's in README with "", with space in lynx.man -LV +* add some comments to lynx.lss -TD +* minor improvements to configure script: use newer config.guess and + config.sub from xterm, which adds case for HP 9000/800 (fix problem reported + by Peter Jones ) -TD +1999-05-29 (2.8.2pre.9) +* use StrAllocCopy rather than HTSprintf in LYstore_message() because no + formatting is done there; the message may contain formatting controls such as + %s (related to bug report by Frederic L W Meunier ) -TD +* add/use function LYRenamedTemp() to update our record of temporary filename + when using external decompression program, so we will remove the decompressed + file correctly on exit. This is the usual case if we do not link with zlib + (reported by HN) -TD +* modify LYValidateFilename() to derive original directory preferably from + Current_Dir() rather than environment variable $PWD, since the $PWD directory + may not be writable if Lynx is invoked from another application rather than + directly from the command line -TD +* add/use function Current_Dir(), to check for failure in getcwd/getwd -TD +* change ALL_LINGUAS assignment in configure script to use the .po file which + actually reside in the po directory, making it simpler to drop/add message + files from a distribution of Lynx. Also, make the assignment contigent on + ALL_LINGUAS not being set externally, making it simple to override -TD +1999-05-28 (2.8.2pre.8) +* when reloading/reparsing the document with forms, issue a warning only when + user input is detected (forms content is changed from its default so + information will be lost). New function HText_HaveUserChangedForms() is + called from HTReparse_document() and HTuncache_current_document() -LP +* fix exit from postoptions() when need_reload is set but no source_cache, + was broken in dev23 -LP +* remove unneeded float from integer calculations -LP +* move comment for 'const' off the definition line, to simplify debugging + configure problem on HPUX for David Eaton -TD +* move LYGetYX() out of conditional expression, just in case it cannot be + evaluated as a function, i.e., return a value (from bug report by David + Eaton) -TD +* make install for COPYHEADER and COPYING work when the build directory is not + the top source directory -PG +* add check to FastTrimColorClass() to avoid updating stylename and pointer + into it when the tag to be trimmed is not found (fixes a core dump reported + by VH) -TD +1999-05-25 (2.8.2pre.7) +* update illustration of forms options menu in Lynx User Guide according to + current lynx output -LP +* old-style options menu: hot key for "local e(X)ecution links" is now + displayed in bold (call addlbl() instead of addstr() like the other options + do), adapted from Hiroyuki diffs -LP +* fix handling of incorrect html in psrc mode. If a piece of html matched the + pattern "", then styles of + internal markup were unbalanced - resulted in cluttered colors -VH +* comment-out (for release) configure option --enable-libjs -TD +* change configure script defaults for --enable-persistent-cookies and + --enable-alt-bindings to 'yes' -TD +* add DESTDIR variable to top-level makefile to facilitate packaging releases + with compiled-in pathnames -TD +* further correction to VMS pathname in HFTPLoad.c, to translate /vms/fileserv/ + to [vms.fileserv], for example. The wku fileserver gives back a Unix-style + listing rather than VMS-style when given a Unix-style CWD, which confuses + Lynx into discarding the listing (reported by Andy Harper) -TD +* modify LYCookies.c to append new items to the end of the list rather than + at the start, so cookies will be written and read from .lynx_cookies in + consistent order (reported by KED) -TD +1999-05-24 (2.8.2pre.6) +* fix for problem reported by LP -VH + Load an html file with META charset and switch "\" to source mode. Now press + ^R to reload: + (1) In -prettysrc case you got a broken document (charset will be assumed by + lynx from assume_charset or assume_local_charset, not from a META charset + which was previously pushed with LYPushAssumed() so you get a problem with + 8bit documents when assume_charset != META charset). + (2) Without -prettysrc you got a document handled properly via META charset + assumption. Now if you press ^R again you will get a broken document. +* LYK_SOURCE & HTreparse_document(): when using SOURCE_CACHE_MEMORY fix tiny + charset problem when switching to the source mode and the original document + have its charset specified. Now aligned with SOURCE_CACHE_NONE and + SOURCE_CACHE_FILE. More LYK_SOURCE fixes that might affect next coming + document in come cases (mainly Info page and Options menu, which now show + correct charset information) -LP +* add CTRACE_FLUSH call before fork() in NSL_FORK logic so child's messages + will not mess parent ones -LP +* add a few trace messages -LP +* HTReadProgress message now display statusline properly in TRACE mode + (was always broken since early HTReadProgress days) -LP +* install COPYING and COPYRIGHT for install-help rule as well as install-doc, + so we can refer to local copies of those files -TD +* tweak HTParse trace message -LP +* minor formatting change for Lynx_users_guide.html -Hiroyuki +* correct a few mismatches between variable declarations (char vs BOOLEAN) + (from win32 version by Hiroyuki Senshu ). +1999-05-20 (2.8.2pre.5) +* correct links to COPYHEADER and COPYING in about_lynx.html, by pointing to + author's URLs, rather than to files which are not installed anyway -PG +* shorten a couple of identifiers to keep with 31-character limit: + hash_code_aggregate_lower_on_fly -> hash_code_aggregate_lower_str + LYprint_statusline_messages_on_exit -> LYstatusline_messages_on_exit + (reported by Andy Harper) -TD +* correct VMS pathname in HTFTPLoad(), allowing connect to + ftp://ftp.wku.edu/vms/fileserv (reported by Andy Harper) -TD +* chartrans: cpXXXX Microsoft codepages verified against ftp.unicode.org - + apparently cp1256 (Arabic) was updated recently. Although Arabic letters are + hardly useful for lynx (no right-to-left support) this codepage is supported + under chrtrans. So update, just for fun -LP +* fix core dump when starting "lynx LYNXOPTIONS:" command. All phases of forms + options logic now handled by postoptions(): LYNXOPTIONS:/ without post_data + create a page (gen_options() now PRIVATE), LYNXOPTIONS:/ with post_data do + proccess changes as before. Also LYK_ADD_BOOKMARK fixed: forms options page + will not be added to bookmarks file -LP +* modify HTGetRelLinkNum(), removing increment of HText_getTopOfScreen() value + so checks for line number begin at the very top of the screen, fixing a + problem reported when processing the 123[g][+-] command -LE +* minor change to LYReadCFG.c to combine similar gettext'd strings -HN +1999-05-16 (2.8.2pre.4) +* add 'fixit' parameter to LYEnsureAbsoluteURL() to suppress logic in + LYConvertToURL() that was changed in 2.8.1dev.4, to re-offer the original + string after an invalid URL is entered at a 'g' prompt. The calls to support + 'g' are unmodified; other calls revert to the older behavior (recommended by + KW) -TD +* add/use string functions that make EBCDIC comparisons sort in the ASCII + collating sequence, eliminating some special ifdef's in HTMLDTD.c -PG +* when STARTFILE cannot not be loaded, lynx now exits with more understandable + status messages: all important statusline messages are now printed to + stderr/stdout -LP +* add definition for _DECC_V4_SOURCE for VMS SOCKETSHR_TCP configuration to + top-level and ./src build*.com files (reported by Andy Harper) -TD +* change UNKNOWN_URL_TYPE to 1, to keep it distinct from NOT_A_URL_TYPE, fixes + an error introduced when changing UrlTypes to an enum (reported by KW) -TD +1999-05-12 (2.8.2pre.3) +* add DEBUG_SOURCE_CACHE makefile flag so all documents will be cached in + SOURCE_CACHE mode, including local files. Normally undef'ed so only http + served documents cached with sources -LP +* in LYK_HISTORY, set newdoc.link = 1 so position at link #2 bypassing "recent + statusline messages" link -LP +* comment out "partial_thres=" option in .lynxrc (it was coded so the changes + from lynx.cfg file could not be activated) -LP +* add a sanity check to LYCurses.h to point out problems with the FANCY_CURSES + configure checks -TD +* fix uninitialized pointer used in decoding of -term switch (patch by Sergey + Svishchev) +* define _DECC_V4_SOURCE for VMS SOCKETSHR_TCP configuration, to fix conflict + with unistd.h versus non-POSIX prototypes in the other headers (report by + Andy Harper) -TD +* ifdef'd includes for HTUtils.h to limit size of preprocessor listings with + DEC C; verify that all header files include definitions needed for their + contents -TD +* add docs/OS-390.announce (Paul Gilmartin ) +* add fallback extern declaration for h_errno to HTTCP.c for systems that have + that variable but do not declare it (reported by Jean-Pierre Radley + for SCO OpenServer 5.0.5) -BL +* correct SortaSGML element info: SPAN can contain SPAN -KW +* fix several small memory leaks (John Bley): + + minor (~ 7 bytes) leak in LYCookie.c + + leak in the warning message about invalid cookies + + obvious leak in do_readme + + small leak in dired_options (LYLocal.c) + + leak with -selective option in HTFile.c + + a few leaks and a minor cleanup in local_dired +1999-05-08 (2.8.2pre.2) +* substitute a few more free()s with FREE()s in files HTString.c and + LYReadCFG.c (John Bley) +* fix buffer problems with long filenames and custom DOWNLOADERs (John Bley) +* fix typical alloc-fail-return-error-without-free leakage in + save_bookmark_link (LYBookmark.c) (John Bley) +* modify generated WWW/*/makefile and src/chrtrans/makefile to omit include + from intl directory if it is not used (report by LP) -TD +* add configure test for h_errno, by splitting CF_ERRNO macro and reusing + test for external data. Noticed that DECL_ERRNO was not defined/used, + added that as well. The h_errno symbol is provided in some network + libraries, e.g., on SCO and Linux, but may/may not be declared (report + by BL) -TD +* fix some serious lossage in lookup_reject (LYTraversal.c): memory and + logic errors. This (replaced) line is one for the record books: + frag = strlen(buffer) - 1; /* real length, minus trailing null */ + Previously, this code caused a read before an array boundary as well as + failing to compare the right number of characters in a pattern (John Bley) +* fix some minor leakage in the cookie jar (John Bley) +* fix up some casts and mode_t types in HTAAProt.c, HTFile.c, LYLocal.c, + LYUtils.c (John Bley) +1999-05-05 (2.8.2dev.26 - 2.8.2pre.1) +* remove some weird cruft from HTAAUtil.h (yeah, "/home2/luotonen" is a good + default path) (John Bley) +* correct a buffer overflow in LYDownload.c (reported by John Bley) -TD +* 8bit attribute values are now translated in psrc view (reported by LP) -VH +* trailing ';' now is shown after HTML entities (reported by LP) -VH +* split-up/correct typo in text at top of generated bookmark file -JS, -TD +* allow anchors as input for commands 'g','G','E' -VH +* correct off-by-one error in pointer to filename in DOSPATH configuration for + LYPathLeaf() -DK +* fix infinite recursion bug in lynx.cfg includes, from dev.25 integration + (reported by LP) -VH +* implement the following separators in lynx.cfg "include" commands: + ":" on Unix + " for " on all OS's -VH +* fixes for LYList.c, adding title info to the (mostly unused) HTLinkType -KW +* change remaining 's to
in other html files, fix + a few escapes that tidy (15-apr-99) reports. Leaving 's alone for the + moment because there appears to be no standard equivalent -TD +* change in lynx-dev.html to
since the latter is + standard, correct IEFT version and supply

's as needed (Karl Eichwalder) +* correct a couple of two documentation inconsistencies in the sources for + USE_PSRC and -prettysrc (Karl Eichwalder ) +* register free_messages_stack with atexit to fix some statusline leakage, + explicitly fill out a struct initializer (John Bley) +* fix a few html nits in the docs (John Bley) +* cleanup some gcc -Wundef warnings -TD +* add logic to free_lynx_cfg() to unset environment variables (requested by + LP) -TD +* modify SafeHTUnEscape() to work with EBCDIC (pg@sweng.stortek.com) +* remove dangling comma in UrlTypes enum (reported by pg@sweng.stortek.com) -TD +* make description of STARTFILE in userdefs.h agree with lynx.cfg -TD +* fix: newline position when we come from the history stack and cached HText + is used (say, return from 'p'rint menu), was broken in dev23 -LP +* remove numerous HTMLSetCharacterHandling() calls from getfile(), use single + call in mainloop instead -LP +* #define PUTS() in LYCookie.c and LYMap.c to make code more readable -LP +* fix: LYmouse_menu() in LYStrings.c calls popup_choice(), which is #ifdef'd + out when --disable-menu-options is used (patch by Sergey Svishchev) +* modify generated src/makefile to omit include from intl directory if it is + not used. This in turn required fixing a redefinition of gettext on Solaris + when using cc, since the locale.h file includes Sun's libintl.h file which + prototypes gettext. Successfully built/ran using Sun's msgfmt utility, (had + to manually add -lintl to src/makefile) though the generated message objects + are incompatible, resulting in a core dump if not reinstalled (unnecessary + include reported by LP) -TD +* change VMS WWW descrip.mms file to use prefix=all rather than prefix=ansi, so + that POSIX functions such as 'read()' are linked properly (reported by Andy + Harper) this is a detail I overlooked in dev.18 -TD +* fixes to compile with SunOS K&R cc -TD +1999-04-27 (2.8.2dev.25) +* updates to INSTALLATION -HN +* undo some redundant dev23 changes, in particular PSRC_TEST in HText_new + was responsible for a wrong line breaking in -prettysrc mode + (try "lynx . -prettysrc" and press "\" to see wrapping with altered + define). Also fix Visited Links for internal pages -LP +* restore links in lynx-dev.html to original form, to make redirection work + properly -TD +* add to MAKEFILE.W32 (untested - suggested by LP) -TD + * definitions for DISP_PARTIAL;SOURCE_CACHE;USE_PSRC + * lypretty.obj to the list of objects. +* remove CF_MAKE_INCLUDE from configure script, since it is not needed -TD +* merge WWW/Library/Implementation/CommonMakefile into WWW/.../makefile.in -TD +* corrections/simplification of LYSafeGets(), and remove sizeof(buf) from + related code in LYCookie.c (analysis by KW) -TD +1999-04-23 (2.8.2dev.24) +* added overlooked WWW/Library/Implementation/makefile.in -TD +1999-04-23 (2.8.2dev.23) +* add/use new function LYSafeGets to replace reads into fixed-size buffers -TD +* change xxxx_URL_TYPE definitions in LYUtils.h to a enum -TD +* use HTSprintf0 in LYCurses.c, LYReadCFG.c -TD +* implement restrictions on options that can be set via the lynx.cfg "include" + directive -VH + For example, admins may specify + include:~/.lynx/colors:COLOR + include:~/.lynx/keymap:KEYMAP + include:~/.lynx/viewers:VIEWER + safely - and be sure that no critical options were altered by those files. + The syntax is + include:[:[* ] ] + More samples: + include:~/.lynx/rc:COLOR KEYMAP VIEWER SUFFIX + include:/usr/local/lib/lynx-cfg.part: #all settings can be changed + The patch does this: + * It prints warnings to stderr about unknown options specified in the list of + allowed options in include command. When 'o'->'lynx.cfg'->'RELOAD THE + CHANGES' is activated, these warnings are also printed on stderr - so the + screen will be corrupted if lynx.cfg and included are incorrect. + * Only options, allowed for a given file are printed in + 'o'->'lynx.cfg'->'RELOAD THE CHANGES'. + * Fully backward compatible - lines of the form + include:filename + will work as they did(i.e., if the list of allowed options is not + specified, then the included file can use the same set of options, as the + file that contained that 'include' command). + * If you wish to allow an included file to + include others, you must specify 'include' in the list of allowed options. + Sample: + include:~/.lynx/suffixes:INCLUDE SUFFIX + so that users will be able to use 'include' command in '~/.lynx/suffixes' + (otherwise included file will be unable to include anything). + * Option sets are ANDed. If file lynx.cfg contains: + include:/usr/lib/lynx.cfg.0:COLOR SUFFIX VIEWER INCLUDE + and /usr/lib/lynx.cfg.0 contains + include:/usr/lib/lynx.cfg.1:SUFFIX VIEWER INCLUDE STARTFILE HELPFILE + then /usr/lib/lynx.cfg.1 can use the following options: + SUFFIX VIEWER INCLUDE +* change the STARTFILE description in lynx.cfg to offer the user's home + directory as an alternative to lynx.browser.org (amended this to reflect + consensus that l.b.o should be the default) -TD +* move a big chunk of code into print_status_message() -LP +* also add numerous HTProgress messages to LYNXMESSAGES:/ page (but not + HTReadProgress) -LP +* HTAlert, HTUserMsg and HTInfoMsg statusline messages are now stored in a + cycled buffer and accessible from the History Page as LYNXMESSAGES:/ link. + This allows us to decrease the messages delay in lynx.cfg when we feel + messages too annoying, but have a nice history list for diagnostic purposes. + Uses a 40-line buffer (suggested by Bela Lubkin) -LP +* fix reloading with HTreparse_document() for LYK_MINIMAL, LYK_HISTORICAL, + LYK_SOFT_DQUOTES, LYK_SWITCH_DTD mainloop events (hope we work around replies + from POST properly) -LP +* elaborate description in Lynx_users_guide.html for "comments" (Michael + Sobolev ) +* fix --disable-trace (by making the ifdef's directly depend on NO_LYNX_TRACE + rather than DEBUG), chop more unneeded #includes (John Bley) +* combine WWW/Library/unix and WWW/Library/Implementation to simplify make + dependencies, drop Makefile.old -TD +* fixes for DOS port - DK + (a) When exiting with interrupt, the message was printed in binary mode, + leaving the cursor in the middle of the screen + (b) In the PDCurses build, the keypad enter key only worked when LYK_ACTIVATE + was utilized, but not in GOTOLINK or GOTOPAGE. This maps the keypad + enter to '\n', so it works in all situations, but keypad enter will no + longer be able to be mapped separately. CTRL-PADENTER and ALT-PADENTER + can still be separately mapped. +* various changes to userdefs.h and lynx.cfg explanatory text -KW +* corrected placement of "partial_thres" code in LYrcFile.c, removed an unused + prototype in LYUtils.h -KW +* add a note about LYNX_SAVE_SPACE to INSTALLATION -JS +* remove docs/*.old (request by HN) -TD +* update INSTALLATION notes for DJGPP with PDCurses; a suggested patch is + no longer applicable -DK +* fixes for control/C and control/BREAK handling on DJGPP -DK +* tweak in HTML_start_element case HTML_DT: prevent generation of empty line + between multiple simple DT elements without intervening DD elements (Debian + bug #3846) -KW +* add list of downloaders to lynx_help_main.html -PW +* add attributes for {bq,blockquote}.cite,{frame,iframe,img}.longdesc, + {table,td}.background, td.{height,width} -VH +* define DISP_PARTIAL for VMS (request by Andy Harper) -TD +* include for DEC C, to prototype sleep() and alarm(). Ifdef'd + include of HTString.h by HTUtils.h, but keep include as general rule for + making headers standalone (report by Andy Harper) -TD +* modified LYrcFile.c to avoid putting '#' characters at the beginning of + lines, since that confuses VAX C (report by Tony Bolton) -TD +* fix redefinition of h_errno (report by Tony Bolton) -TD +* ifdef'd print_local_dir in HTFile.c since this function does not compile on + VMS (report by Andy Harper, Tony Bolton) -TD +* fix reload_read_cfg() to avoid persistent cookies mode changing at run time; + reload printers list, downloaders list, environments - as expected. - LP +* fixes for SOURCE_CACHE!=NONE mode, trying to accommodate HTreparse_document() + for mainloop() events: + - add/use flag "from_source_cache" for better mainloop maintenance + - add partial display mode for HTreparse_document() operations + - add warning when the reparsed document may lose its forms content + - fix options menu stuff to use HTreparse_document() when possible - LP +* fix exit from postoptions() when the reloaded document was in source mode -LP +* update flags to correct behavior with SOURCE_CACHE!=NONE: the length of the + re-rendered text may vary so the scrolling down is broken (especially nice + when switching to source). ("more" updated, "lines_in_file" inlined) -LP +* use configure script macro CF_CHECK_CACHE to compile-in Unix SYSTEM_NAME, + for info screen (request by LP) -TD +* minor fixes for uncaching document, other items missed in dev.22 -LP +* merge the two versions of start_curses() function -LP +* add -DSOURCE_CACHE and -DUSE_PSRC to djgpp makefiles -LP +* add a few words for CHANGES and INSTALLATION -LP +* add a configure option for prettysrc -TD +* separate ifdef's for prettysrc from color-style -LP +* fix for -prettysrc: when pressing '\' on non-local files, the prettysrc view + is shown, but there is no way out of this mode -VH +* change all PUTS() with a string of length 1 to PUTC(), fix a uid_t/int + assumption in LYLocal.c, remove some unneeded #includes, remove some spurious + semicolons. (John Bley) +* fix typo in configure --help for --disable-direct (reported by LV) -TD +* update user's guide and lynx.cfg descriptions of jumps files - PW +* fixes for related bugs tweaked by going to an internal page while viewing + source, and a few blurbs in the documentation -DSB +* fixes to separate RAW_MODE from internal variable LYRawMode by adding new + variable LYUseDefaultRawMode -LP +* add a missing null-pointer check in expand_tiname() (from report by KW) -TD +1999-04-13 (2.8.2dev.22) +* correct a missing include for LYLeaks.h in UCAuto.c -TD +* implement HTML source caching. In this implementation, each document kept in + cache has associated with it a temporary file containing the HTML source for + the document (well, not all of them -- only those using the HTTP protocol, on + the premise that file:// documents are probably local and ftp:// documents + are probably not HTML). The temporary file is deleted when the document is + uncached. For certain operations, instead of reloading the document via + HTLoad(), the source file is reparsed with HTParseFile(). The cached + document also remembers certain parser settings (screen size, historical vs. + minimal vs. valid comment parsing, and the like), and is regenerated from + source if it is fetched out of cache under different settings. This behavior + is selectable by a configure option --enable-source-cache and by a lynx.cfg + option SOURCE_CACHE; I didn't add a command-line argument or an options menu + entry, as this didn't seem to be the sort of thing one would want to change + You had to challenge me, didn't you? ;) Okay, after some pfutzing around + with HTChunks, I think I've got a working version of memory caching of + source. The SOURCE_CACHE option now has settings FILE, MEMORY and NONE, with + the obvious meanings, defaulting to NONE. (DSB - Scott Bigham + ) +* amend HTConfirmDefault() logic so that a second character will cause the + default response to be returned, e.g,. so that pressing "qq" will make + Lynx exit (reported by John Bley) - TD +* change the PUTS("\n") calls in HTFile.c to PUTC('\n') since that would be + a little more efficient (noted by KW) - TD +* minor cleanup: remove obsolete parameters from command-line parsing functions + in LYMain.c, add newlines in HTFile.c for readability of html - LP +* change default STARTFILE to the current directory, "." - PW +* revised lynx-dev.html - PW +* lynx.cfg and further included cfg files can be edited from LYNXCFG:/ page + with the default editor and changes can be activated for the same lynx + session. NOT allowed for restricted users (LYRestricted) and occasionally + for user mode other than ADVANCED. This is an *experimental* code + (reload_read_cfg() in LYMain.c - more work required): currently command-line + switches may be lost when overridden by lynx.cfg changes, file paths like + lynx_save_space and LYCookieFile should not be changed (unwanted results) -LP +* retest PARSE_DEBUG ifdef's (LYMain.c, LYReadCFG.c), minor corrections + but found no specific reason for LP's problem with tables, except possibly + different effect from "&(value)" versus "(&value)" - TD +* fix the problem of reading included lynx.cfg files by changing LYReadCFG.c + table signature (now it is more close to one in LYMain.c). The problem was + the ignoring of *some* values got from the included cfg file (at least for + DJGPP2.02/gcc2.8.1 build). Probably we calculate the addresses of variables + on a later stage now. - LP +* DOSPATH changes: local directory style now configurable from lynx.cfg + (LONG_LIST defined). Unlike UNIX it is not "ls -l" by default + but a more compact form (date and size present, from lynx.cfg example) - LP +* cookies: domains now match case insensitively (reported by Paul Wagner + ) - LP +* correct an ifdef in LYGetFile.c for config-page - LP +* reading of long local directories now benefits from partial mode and fully + interruptible. Split out print_local_dir() function from HTLoadFile() - LP +* behave sanely if NSL_FORK fork() fails -BL +* NSL_FORK try for dns_patience *seconds*, not dns_patience select() calls, + which might have been shortened by keyboard input -BL +* fix some screwy comment indentation -BL +* add section on editing TEXTAREA to user's guide - PW +* add a null-pointer check in LYCookie.c (Bill Nottingham ) +* revise changes ifdef'ing LY_FIND_LEAKS by making atexit a no-op function + since the DOS port depends on atexit to keep the DOS BREAK function properly + set on exit. Put back atexit, and ifdef's each place where atexit isn't + needed except when finding leaks - DK +* modify LYMain.c on DOS, fixing the determination of BREAK status to be + independent of SLANG or PDCurses - DK +* spawn a new function, www_user_search_internals, to begin canceling the + effects of cut-n-paste coding in www_user_search. The body of + www_user_search_internals used to be duplicated at two points in + www_user_search. See comment in GridText.c for more details. (John Bley) +* big pile of unneeded #includes removed (John Bley) +* remove obsolete files from the distribution (John Bley) + WWW/Library/Implementation/HTWriter.* +* one malloc check, fix --disable-ftp (John Bley) +* fixes for compiler warnings when building for OpenVMS 6.2 using DEC C and the + SOCKETSHR library (reported by Andy Harper) - TD +* add cpp -H option for HPUX bundled C compiler, which otherwise does not + have enough symbol table space (reported by JS). Also, modify ifdef's + for vs to avoid including the former when ANSI_VARARGS + is not defined since HPUX had a broken - TD +* changed OMIT_SCN_KEEPING ifdef to 0 (inactive) in LYCurses.c and in HTML.c, + still enabling the Style_className:HTML.c keeping and making lynx with lss + slightly slower than it could be (though faster then dev21). If somebody + wishes to fix a bug, here is a description: If contents of some tag that has + corresponding color style occupies more than 2 screens, after navigating to + the page, on which the content of that block starts, and then pressing PGDN + PGDN PGUP, the effect (color style) of that tag will be lost. The same + (loosing style) happens when jumping to the anchor that is in such block and + is located not on the 1st page. IMO this is something with style stack. If + this will be fixed, then keeping of Style_className:HTML.c can be omitted + again -VH +* fixed the bug in lynx with lss support -when displaying html pieces such as + A B C , only 'AB' was drawn in style corresponding to + -VH +* added HTML source syntax highlighting (when option -prettysrc that is added + is given to lynx). It's available for lynx compiled with and without lss + support (it can be much more beautiful when compiled with lss support - read + lynx.cfg for description). The code is ifdef'ed with USE_PSRC. + This functionality coexists with old source view and with -preparsed logic + (ie different commandline options make source view logic different) -VH +* HTChunkPutc was inlined in SGML.c for better performance -VH +* keeping of Style_className was omitted in HTML.c to increase performance of + lynx compiled with lss support. -VH +* performance of lynx compiled with lss support is increased ~ by 15-20% for + normal documents, and by up to 50% for documents with a lot of tags VH +* fixed bug in lynx compiled with lss support that caused it to load local CSS + stylesheets - lynx didn't understand their syntax so it was exiting VH +* added type information for attributes in HTMLDTD.c (it's used in source + syntax highlighting mode) VH +* sample .lss files are updated to support source syntax highlighting VH +1999-03-30 (2.8.2dev.21) +* disable LYatexit if memory-leak testing is not configured. +* fixes for unhighlighting problems with color-style support (Vlad Harchev) +* remove '(default: on)' and '(default: off)' strings from configure script + help message (much lynx-dev discussion) - TD +* remove outdated link to the WebTechs HTML Validation Service from help menu + and change link to more suitable location for rfc1945 - PW +* correct logic of --disable-full-paths configure option (reported by Georg + Schwarz) - TD +* fix problems building on OpenVMS with DECC 6.2 (reported by Andy Harper + ) + + remove 'DEBUG' definition from build scripts since it is defined in + the source code. + + turn off code that tries to use getpwuid(), by defining NOUSERS, since + those functions are not present on VMS. + + provide a dummy location for h_errno for systems without that symbol. + + correct string syntax in VMSexit function + + ifdef'd use of lynx_version_putenv_command in LYMain.c + + correct spurious parenthesis in mailform function + + correct missing COPY_PATH definition for LYUtils.c +* check for 'z' user interrupt in HTLoadHTTP before setting up the output + stream. This avoids doing unnecessary work, including possible creation of a + new HText structure that most likely is never displayed but still pushes + another document out of the. cache. Most commonly this occurs when a HTTP + error response is received and the user presses 'z' while the resulting alert + message is shown - KW +* fix of HTUnEscapeSome in HTParse.c for non-ASCII - KW, PG +* tidy up around ed_offset initialization in GridText.c - KED + (the patch as given did not compile on a non-ANSI compiler because it used + aggregate initialization - TD) +* add samples/mild-colors.lss (Vlad Harchev) +* add samples/blue-background.lss (from Sergey Svishchev ) +* documentation updates for INSTALLATION and PROBLEMS - PW +* use HTConfirm and HTConfirmDefault to gettext'ify CONFIRM_BOOKMARK_DELETE, + CONFIRM_COMMENT, CONFIRM_LONG_PAGE_PRINT, CONFIRM_LONG_SCREEN_PRINT, + CONFIRM_MAIL_SOURCE_PREPARSED, CONFIRM_MAIN_SCREEN, FILE_EXISTS_HPROMPT, + FILE_EXISTS_OPROMPT, NO_OWNER_USE, PREV_DOC_QUERY, REALLY_EXIT_N, + REALLY_EXIT_Y, REALLY_QUIT_N, REALLY_QUIT_Y (based on report by LP) - TD +* at LYNXCFG:/ page, add links for every included configuration file so we can + read and edit them (no, currently the changes will be active the next session + only. Minor reorganization of LYMain.c done, more required) - LP +* correct test/spaces.html - it should not be in a

 mode by default - LP
+* undo recent   changes so it is a single space as before (suggested by
+  KW) - LP
+* add ETag anchor element (currently not used, only for information) - LP
+* assign LYNXCFG:/ and LYNXCOMPILEOPTS:/ for internal pages of parsed lynx.cfg
+  and compile-time info.  Now we will not see a temp file link name in a
+  statusline in advanced mode, also kill overhead since pages created only when
+  really accessed - LP
+* form-based options menu:  the bug described in 1999-03-17 changes now finally
+  fixed - LP
+* fix expanding entities for x-transparent display charset
+  (was broken from 1999-03-04 changes) - LP
+* trimmed trailing blanks from *.tbl, fixed chrtrans/def7_uni.tbl and
+  chrtrans/viscii_uni.tbl, ensure that it produces correct result - TD
+* chrtrans/def7_uni.tbl - entries with trailing spaces now explicitly enclosed
+  in quotes to avoid problems with integrating the patches sent by e-mail,
+  more comments added - LP
+* attempt to implement --disable-ftp (John Bley)
+* fix tiny memory leak in HTAAUtil.c (John Bley)
+* chop useless #includes from LYHash.c, LYExtern.c, LYCurses.h (John Bley)
+* --disable-news was also disabling ftp, --disable-finger without
+  --disable-gopher wasn't right (John Bley)
+* remove a duplicate #include from HTFTP.c (John Bley)
+* remove several obsolete files from the source distribution (John Bley)
+  WWW/Library/Implementation/HTAAServ.*
+  WWW/Library/Implementation/HTAAFile.*
+  WWW/Library/Implementation/HTAuth.*
+  WWW/Library/Implementation/HTACL.*
+  WWW/Library/Implementation/HTPasswd.*
+  WWW/Library/Implementation/HTHistory.*
+* --disable-partial wasn't compiling because of a suppressed #include, replace
+  one more free() with FREE() (John Bley)
+* correct typo LIsListpageTitle vs LYIsListpageTitle
+  (reported by Artur Frysiak  and KED)
+* don't append sed expression to help_files.sed if the $(COMPRESS_EXT)
+  variable is empty - TD
+1999-03-17 (2.8.2dev.20)
+* protect a couple of spaces with quotes in def7_uni.tbl (suggested by KW) - TD
+* add ifdef's for NO_RULES to HTAAServ.c - HN
+* add configure --disable-news option - JS
+* add configure --disable-finger option - JS
+* add malloc checks, remove some #includes that don't need to exist, and
+  cleanup where somebody decided to waste instructions setting fields to 0 when
+  he already memset()ed the whole struct to 0 (John Bley).
+* remove obsolete/unmaintained SHORT_NAMES ifdef's (John Bley).
+* add/use LYTrimStartfile function (suggested by LP) - TD
+* correct missing null-pointer check in add_printer_to_list function (forwarded
+  by BJP from Debian bug-reports) - TD
+* add notes about $CC variable to INSTALLATION and PROBLEMS - JS, PW
+* tweak for TABLE formatting: break line at  end tag (don't wait
+  for next  start tag), effective in SortaSGML mode only - KW
+* lots of color style changes, only effective if compiled with USE_COLOR_STYLE;
+  together they seem to make color styles act much more reliably and
+  consistently - KW
+  - Moved some extern definitions and declarations.
+  - Made extra handling for LINK REL (or TITLE) attributes consistent
+    with example lynx.lss file.
+  - More complete (and hopefully more consistent) setting of "normal"
+    attributes, especially background color, on screen refresh and after
+    statusline messages.  Set normal attributes for statusline prompts.
+  - Various other small tweaks, mostly to not lose color changes in a
+    document and to avoid color leaking.
+  - Attributes for highlighting WHEREIS search targets can be controlled
+    by setting style for "whereis" in lynx.lss.
+  - Allow mono attribute field in lynx.lss to be a combination of several
+    attributes separated by '+' characters.
+  - Changes of example lynx.lss file: more logical ordering, added some
+    comments, document new stuff.  Changed a few styles for demonstration
+    purposes or because text was really hard to read.
+* apply color styles to HTML source display, using the same methods as
+  for displaying the rendered version.  This is done if and only if
+  the -preparsed flag is used (and lynx is compiled with -DUSE_COLOR_STYLE,
+  of course).  Please remember that the source displayed with -preparsed
+  is *not* the same as the original text/html document, it has been
+  mangled by lynx (as the name implies) and may itself not be a valid
+  HTML document even if the original was - KW
+* changed some slightly suspicious casts in HText_endAnchor's casting hell:
+  prefer to cast a line's size element to (int), rather than various int
+  variables to (unsigned) - KW
+* remove some unnecessary use of dynamic buffers where there is no apparent
+  benefit for using them, for the sake of performance or to avoid a minor
+  memory leak - KW
+* stuffed small memory leak (MultipartContentType) - KW
+* absorb 'len' parameter into logic of argncmp, so it still achieves its
+  purpose of comparing prefixes of options without undue maintenance effort -TD
+* retain logic that uses final URL on command-line (request by KW) - TD
+* add/use new functions argcmp and argncmp to allow the use of '--' prefix as
+  well as '-' for commandline options.  This means that '-localhost' and
+  '--localhost' mean the same thing for lynx.  If EXTENDED_OPTION_LOGIC is
+  defined then the extended commandline option logic will be used.  It means
+  that '--' will be accepted and will be treated as an end of options.
+  Anything after it will be treated as URL even if begins with '-' or '--'
+  (Vlad Harchev)
+* correct some typos in docs and in scripts (Vlad Harchev )
+* modify generated sed script to handle special case of alt_edit_help.html,
+  which was being rendered in --enable-gzip-help as alt_edit_help.html.gz.gz
+  (reported by KED) - TD
+* modify lynx_help/help_files.txt to update links to gzip'd versions of
+  alt_edit_help.html, environments.html, test_display.html - KED
+* tweak for SGML_LITTERAL (sic) parsing, so that the first nonmatching
+  character after the beginning of a putative end tag goes through character
+  translation - KW
+* add some more pieces of info (if available) to '=' page in advanced user
+  mode.  Also show mode as "source" instead of "normal" if viewing SOURCE, in
+  all user modes - KW
+* minor FASTBACKW_LINK / FASTFORW_LINK tweaks - KW
+* removed documentation for nonimplemented chargen URLs - KW
+* remove num_n256 hack introduced in dev18 UCDomap.* - LP
+* forms-based options menu: fix reloading of previous document *only* when
+  necessary (was always, since early forms-based options menu days).  Still
+  have a bug - while submitting the options menu lynx reload menu again, but
+  this is much faster to load small local file twice than fetch previous
+  (possible large) document over the net.  - LP
+* — (—) now display as "--" (popular requests) - LP
+*   are now displayed as two   (popular requests),
+  previous definition of HT_EM_SPACE now renamed to HT_EN_SPACE. - LP
+* minor tweaks in postoptions(), new flag added - LP
+* minor changes to make this build with SunOS K&R cc - TD
+* entities.h:  clean HTML4.0 entities table added, it is #ifdef'ed with
+  ENTITIES_HTML40_ONLY (may be useful for page validation), file entities.h
+  moved to src/chrtrans directory - LP
+* save few KB of static memory by storing unicodes as 'u16' (was 'long') - LP
+* trace log toggle now really interruptible - LP
+* move entities.h to src/chrtrans - LP
+* fix display of -help output: (on/off) info was wrong for UNSET_ARG case - LP
+* ifdef'd recent changes to LYPrint.c to build with djgpp - LP
+* remove redundant -DDEBUG from djgpp makefiles - LP
+* remove nonstandard ISO-9945-2 - LP
+* eliminate a duplicate --enable-included-msgs in configure --help, (reported
+  by LV) - TD
+* redefine LY_BOLD_START_CHAR for EBCDIC platforms to avoid conflict, adjust
+  IsSpecialAttrChar() to take this into account - PG
+* rewrite LYKeymapCodes with leading commas to avoid accidental/illegal
+  use of trailing comma in an enum list - PG
+* modify UCdomap.h to avoid gcc-specific construct using cast to struct of
+  data aggregate - PG
+* modify makefiles to allow .c.i rule to work with --srcdir - PG
+* add a rule to makefile.in to generate patches - PG
+* correction to LYCookie.c, to get it to eat all cookies (reported by LV) - BJP
+* corrections/updates to entities.h (Jacob Poon):
+  HTML 4.0 compliance:
+  - Added support for Euro currency symbol.
+  - Fixed duplicated ◊ definitions.
+  Fixes:
+  - Fixed some typos in the old references. (fixed: b.delta)
+* update follow_help.html for LE's 123g changes - PW
+* further correction to 123g logic - LE
+1999-03-04 (2.8.2dev.19)
+* forgot to update PRCS when renaming src/chrtrans/iso9945uni.tbl - TD
+1999-03-04 (2.8.2dev.18)
+* modify configure script to recover if the intl and po directories are
+  missing, allow experimentation with --enable-nls --disable-included-msgs
+  --without-included-gettext options (request by HN) - TD
+* add sanity-check for EBCDIC FixCharacters() in LYMain.c - PG
+* ifdef'd the ADDRLIST code with EXP_ADDRLIST_PAGE, making this available as
+  a configure script option --enable-addrlist-page - TD
+* create a new command called ADDRLIST, which behaves exactly the same as LIST,
+  but which *should* always show only the URL's.  Rather than make it a config
+  option (which would have taken me quite a bit longer to do), I've bound it to
+  the "A" key (that's a capital "A").  Why not "L" you ask?  Because of the "vi
+  keys" option, whereby "l" is used for cursor movement, and "L" stays reserved
+  for L(ist) - KED
+* change the LYK_xxx keymap definitions to an enum, to simplify ifdef's - TD
+* add configure options --disable-gopher, to remove GOPHER code, and
+  --disable-trace to remove TRACE code - JS
+* modify trace log header to always inform us if anonymous restrictions are
+  set - LP
+* chartrans: old-style declarations of charsets which do not have Unicode
+  tables (CJK, x-transparent, also UTF-8) now moved from LYCharSets.c to
+  UCdomap.h and now included with UCInit() in UCdomap.c in a standard way - LP
+  (Please re-test CJK and UTF-8)
+* add configure --enable-libjs option (Lalo Martins )
+* add checks for some more LINK tags as listed in "6.12 Link types" of the HTML
+  4.0 Specification (Masayasu Ishikawa )
+* changed the effect of some LINK tags with REL attribute of a very relative
+  character (Up, Next, Prev, ...) on titles as they appear e.g.  on the LIST
+  page:  the title of the target HTParentAnchor isn't being set when such a
+  LINK tag is parsed, but the relation is now stored as a property of the
+  link itself rather than its destination.  The LIST page shows the relation
+  as additional info, not superseding a URL or title string obtained
+  otherwise - KW
+* move commands in top-level makefile.in which clean *.rej and *.orig from
+  'distclean' rule to 'maintainer-clean', make distinct from the @SRCDIR_CLEAN@
+  substitution which is intended for use with the configure --srcdir option
+  (from reports by Glenn E.  Thobe  and BL) - TD
+* correct LYRemoveTemp() to close file before attempting to remove it; else
+  the remove fails on some platforms, e.g., DOS/Windows (report by KW) - TD
+* improved documentation for the new cookie options, e.g,.
+  COOKIE_ACCEPT_DOMAINS, in lynx.cfg - BJP
+* fix some memory leaks in LYCookie.c - BJP
+* modify 123g (and similar movement) commands to allow for relative links,
+  e.g., by using a '+' or '-' after the 'g' - LE
+* modify help_files.sed to include '$', making regular expressions work for
+  HP-UX (Jens Schmalzing )
+* add a comment to aclocal.m4 to show where patches for autoconf, needed for
+  this configure script, can be found - JS
+* add toggling trace log on/off in partial mode, when the downloading is still
+  in progress - LP
+* more consistent docs for debugging of invalidly nested HTML:  important trace
+  messages from actions on invalid tags now have '***' prefix such as "SGML:
+  ...  ***ignored" (well:  illegal, forced, assumed, etc.), -preparsed mode now
+  better documented - LP
+* minor code cleanup: remove redundant includes, fill in 0's for some static
+  data initialization (John Bley).
+* add 'joe' editor, and variants, to list of those editors that are assumed to
+  position the file to a given line number using the "+line" command-line
+  option - IC
+* remove redundant "(y/n)" substrings from LYMessages_en.h - LV
+* add new command named GROWTEXTAREA which adds 5 new blank lines to the bottom
+  of a TEXTAREA when executed.  It does not have a default binding, so you need
+  to add a KEYMAP for it in your lynx.cfg.  The number of lines added is fixed
+  by a #define, but 5 seems to be a "reasonable" increment to use - KED
+* add new command named INSERTFILE, which (obviously) inserts a file's contents
+  into a TEXTAREA, just above the line the cursor is on when invoked (which
+  means you cannot insert a file *below* the final existing TEXTAREA line ...
+  but see 1) and 3) for easy ways to over- come this limitation).  It too, has
+  no default binding, so a KEYMAP entry is also needed for it - KED
+* by default, when the cursor is on the last line of a TEXTAREA, if you hit the
+  ENTER key, a new line will be added to the TEXTAREA, with the cursor
+  positioned on it.  If that should happen at the bottom of the screen, a
+  DOWN_HALF scroll operation is (effectively) performed - KED
+* ifdef'd this feature (since at least one person objected to this automatic
+  behavior when it was discussed awhile back - BL?), for easy disabling (and to
+  make adding a ./configure option easier).  The symbol is AUTOGROW is
+  #define'd in LYMainLoop.h - KED
+* added an ifdef for the code that causes the external editor to be
+  invoked "automatically" on the TEXTAREA contents when ^Ve (or whatever
+  the EDIT binding is), rather than attempting to invoke it on the .html
+  source file.  This should allow adding a ./configure option to control
+  this behavior, until we come up with a different binding/mechanism to
+  do the job, that we can all agree on.  The symbol AUTOEXTEDIT is also
+  #define'd in LYMainLoop.h.   The command EDITTEXTAREA is still available
+  for separate KEYMAP binding, per KW's suggestion - KED
+* check the range of chars between 0x80 and LYlowest_eightbit[current_char_set]
+  for validity against the charset in use.  If such chars are detected in
+  edited or inserted data, a "." char is substituted for them, as with normal
+  control chars.  (Suggested by LP) - KED
+* added KW's LYCloseTempFP bugfix - KED
+* add/use function GetFileName(), e.g., by INSERTFILE.  It is fairly general
+  purpose, and can be used whenever the name of an existing file needs to be
+  input.  It uses the same mechanism for filename expansion and "history" as
+  does the PRINT function - KED
+* reorganized a lot of the code into subroutines to provide for 1) and 2);
+  still need to do a bit more cleanup of some other (nearly) common code - KED
+* rename iso9945_uni.tbl to iso9945uni.tbl to accommodate 'make' programs on
+  old systems (such as CLIX 3.1) whose suffix rules fail for filenames longer
+  than 14 characters - TD
+* change VMS WWW build-script to use prefix=all rather than prefix=ansi,
+  so that POSIX functions such as 'stat()' are linked properly (reported by
+  Morris D Cox ) - TD
+* modify configure macro CF_EBCDIC to avoid using #error, since that is not
+  recognized by all compilers - TD
+* include  in CF_INET_ADDR macro, to accommodate systems which
+  require that to compile test program with the socket.h, other network
+  headers - TD
+* removed a cast in free_lynx_cfg, on FREE's argument, which caused some
+  compilers to report that an rvalue was being modified (reported by PW) - TD
+1999-02-16 (2.8.2dev.17)
+* modify LYReadCFG.c to avoid duplicating data for cookies - BJP
+* modify HTConfirm to use gettext values for yes/no.  Use HTConfirm in a few
+  more places, though completing this will require more work - TD
+* add note about resolv library to PROBLEMS - PW
+* minor clarification about DOS/Windows binaries in README - PW
+* modify ./makefile.in so that portions which are commented-out will be done
+  without a leading tab, since that confuses the make program on Digital Unix
+  3.2 - TD
+* Unix: Don't accept HOME variable as valid if it does not begin with
+  a slash - KW
+* changed HTGetCharacter to be 8-bit clean, it could not distinguish between a
+  character value 255 and EOF.  Changes affect several protocols:  nntp,
+  gopher, finger, ftp.  Most notably, news articles containing byte value 255
+  could not be completely read - KW
+* removed a memory leak in HTFTP.c for some directory data, added a few gettext
+  calls - KW
+* added ability to show file type description in local Unix directory listings:
+  new format codes for use in LIST_FORMAT %t, %T, they are not used by default
+  - KW
+* modify "clean" makefile rule to allow for FreeBSD, which generates core
+  files such as lynx.core - KED, TD
+* correct sign-extension when converting characters after edit of TEXTAREA
+  (upper-128 characters were being translated to dots, reported by IC) - KED
+* worked with some pathological/boundary-case pages, and fixed some some edges
+  that could fail (eg, last line of document is also last line of a TEXTAREA,
+  and lines are being added; page containing *only* a one-line TEXTAREA field;
+  etc).  While it was unlikely one would run into such beasts in real life,
+  they all work correctly now.  Thanks to Greg Marr and Serge Munhov for
+  providing some very basic pages that I was able to easily modify for various
+  test cases - KED
+* added a few flags to the TextAnchor and HTLine struct's, to indicate an
+  expansion line.  These were added to allow for line deletion when a TEXTAREA
+  is "reset" or shrinks (when we get around to tackling those tasks) - KED
+* the editor's cursor is now positioned on the same line in the edit file, as
+  it was on when the editor was invoked (relative to the beginning of the
+  TEXTAREA).  At least for those editors that lynx knows support initial
+  positioning (emacs, vi, pico, jove, and jed for non-VMS platforms; sedt for
+  VMS) - KED
+* cleaned up and corrected a few comments; simplified a few small bits of
+  code - KED
+* added cookie_domain_flags enum to LYCookie.h, usage should be apparent with
+  patch applied - BJP
+* updated free_lynx_globals() for cookie variables - BJP
+* replaced cookie_add_acceptlist, cookie_add_rejectlist and
+  cookie_set_invcheck functions with cookie_domain_flag_set - BJP
+* saved a bit of memory by dropping useless pointer memory initialization
+  (exactly WHAT was I thinking?)  - BJP
+* changed LYrcFile.c, LYReadCFG.c to call cookie_domain_flag_set  - BJP
+* new lynxkeycode BACKTAB_KEY with value 0x10F.  DO_NOTHING is and shall remain
+  0x10E, as documented in lynx.cfg.  Moved MOUSE_KEY out of the way - does it
+  need to be in the tables at all?  BACKTAB_KEY will be recognized if the
+  (n)curses keypad() input handling returns KEY_BTAB, which happens if the
+  terminal description has the right kB or kcbt capability string and the
+  terminal actually generates that string (often "^[[Z", generated for
+  shift+tab).  May also work with lynx-keymaps mechanism.  Not tested with
+  slang, maybe this has to be added to some more of the various tables in
+  LYStrings.c - KW
+* new user-visible key commands FASTFORW_LINK and FASTBACKW_LINK, with
+  lynxactionscodes LYK_FASTFORW_LINK and LYK_FASTBACKW_LINK.  By default mapped
+  from  key (^I) and new BACKTAB_KEY, respectively.  Previously  was
+  mapped from NEXT_LINK, which has some special handling if the invoking key
+  was  (and if FASTTAB was defined in LYMainLoop.c, which was the case by
+  default).  The old behavior of  is still available if it is mapped with
+  KEYMAP to NEXT_LINK in lynx.cfg - KW
+* these commands always go to a previous (or next) link if there is one,
+  and skip multiple lines that are part of the same textarea - KW
+* recognize the new key actions also during partial file display, for some
+  roughly corresponding movement - KW
+* new lynxeditactioncode LYE_FORM_PASS, to allow any lynxkeycode to end the
+  editing of a form field and be passed up to the caller - it will then
+  normally be mapped to a lynxactioncode.  LYE_FORM_PASS keys are generally
+  ignored in non-forms line editing.  This is used for BACKTAB_KEY, as well as
+  several other keys that were previously handled specially in form_getstr - KW
+* extended the maps in LYEditmap.c to cover the same range of lynxkeycodes as
+  the LYKeymap.c tables.  Yes, this uses more space, but the tables need to be
+  consistent - KW
+* map lynxkeycode 0x00 to LYK_DO_NOTHING, as lynx.cfg said all the time - KW
+* some tweaks of displayed strings in 'K'ey Map page.  Don't show CHANGE_LINK
+  binding if mouse not enabled (it may not be useful even when -use_mouse is
+  on) - KW
+* function expand_substring used with NCURSES for user-defined mapping keysyms
+  to byte sequences was parsing the "^(...)" construct wrong - KW
+* other small tweaks in key handling code - KW
+* changes to lynx.cfg to better reflect reality. - KW
+* terminology note:  lynxkeycode = what's between the colons in lynx.cfg
+  KEYMAP:...:..., lynxactioncode = LYK_* code for what's right of the second
+  colon, lynxeditactioncode = what's assigned in LYEditmap.c (and which may
+  differ between lineedit_mode Default Binding and alternative bindings) - KW
+* formatting tweak in HTML.c for 
not preceded by
: Don't use wrong + indentation in that case - KW +* changes from DK for DOS up to 1999-02-14 - KW +* minor documentation tweaks - LP +* replace most uses of free with FREE (John Bley). +* correct HTEndParam so that if fewer command-parameters are given than + expected, we still terminate the command properly (reported by + Michael Warner) - TD +1999-02-08 (2.8.2dev.16) +* minor documentation tweaks for EDITTEXTAREA - LP +* correct uninitialized buffer variable in send_file_to_mail() which caused + core dump (reported by LV) - KW +* recognize Subject and Message-Id in embedded comments in HTML documents, in + the form generated by MHonArc for mailing list archives (including lynx-dev). + Use these to generate a default Subject and an In-Reply-To header (currently + not for VMS) when replying by mail (sending a 'C'omment, or following a + mailto link) from such a page. The old methods to get a title other than the + fallback (the URL) still are there and have precedence, by in reality seem to + apply very rarely. If no suitable comment strings are found or they are + regarded as invalid (bad characters, not exactly right format) they are not + used, and the fallback (URL as Subject, no In-Reply-To) applies - KW +* use the Message-Id of a news article to generate a References header when + posting a reply. Lynx's new article listing doesn't understand threading, + but this is nicer for other newsreader that do. The References header of the + referenced article is not used, so there will be only one message-id in the + generated References header, but this is better than nothing. The article's + message-id is appended as a parameter to the URL of the generated newsreply + link, in the form ";ref=...", so this extends the syntax of Lynx's newsreply: + URL scheme. Nothing should have changed for snews: and other s-versions of + the various URL schemes for news access - KW +* Message-Id and Subject of a news article are also made available for replying + by mail - KW +* LYNews.c: Don't post a message that is empty or has only '>'-quoted text - KW +* HTNews.c: got rid of some suspicious fixed length buffers. Fixed minor + memory leaks. Added abort of the target stream which was missing in some + cases. Create mailto: hrefs in URL-escaped form if necessary, they will be + unescaped in LYMail.c. (News URLs still don't use escaping the right way, + especially for message-ids.) Recognize special meaning of "Followup-to: + poster" (don't treat "poster" as a newsgroup name). Other small tweaks - KW +* add samples/cernrules.txt - KW +* except for DJGPP, move lookup code for domain names (not dotted-quad IP + addresses) from HTParseInet into a new function: LYGetHostByName acts like + the normal gethostbyname, but includes the NSL_FORK logic. Interruption is + indicated in global variable lynx_nsl_status - KW +* use LYGetHostByName instead of HTParseInet for URL guessing - KW +* select on tty file descriptor in NSL_FORK loop also if compiled with slang. + This should make 'z' during lookup more responsive - KW +* don't compile in the rules implementation code if NO_RULES is defined + (suggested by BL) - KW +* fix special case of EDITTEXTAREA where the returned file is empty - BJP +* write to .lynxrc values for COOKIE_ACCEPT_DOMAINS and COOKIE_REJECT_DOMAIN + when options screen is used - BJP +* add lynx.cfg and .lynxrc support for a few new options: + COOKIE_STRICT_INVALID_DOMAINS, + COOKIE_LOOSE_INVALID_DOMAINS, + COOKIE_QUERY_INVALID_DOMAINS + They're the same sort as COOKIE_ACCEPT_DOMAINS, comma-delimited lists - BJP +* modify LYOpenTemp() to report unusual errors, i.e., other than if the + temporary file could not be created because it already exists - PG +* more fixes to CF_INET_ADDR - TD +* modify README to indicate where win32 binaries are found - JS +* add chrtrans tables for Ukrainian Cyrillic: koi8-u, cp866u, iso-9945-2 + (patch by Serhii Hlodin ) +* patch for TEXTAREA edit feature - KED + 1. Handles the renumbering of link number tags [nnn], when the tag itself is + split across two lines (see below). + 2. Scrolling down, going to the bottom of the document, etc, now work + properly, when the TEXTAREA is expanded beyond the bottom of the + (original) screen display. + 3. Hitting the reset button is now handled properly WRT the "old" text in + expansion lines (now *always* empty). + 4. Attempting to edit (^Ve) a TEXT field (not a TEXTAREA), is now blocked, + with the user getting an error msg. + 5. The function call now returns the number of lines that the cursor should + be moved from its current position, to end up on the first blank line of + any trailing empty lines in the TEXTAREA (there will always be one). +* bug fixes for TEXTAREA edit feature - KED + 1. Thanks to a suggestion by Bela, your regular EDIT keybinding ("e" by + default), will now bring up the editor within a TEXTAREA, so there's no + need to "waste" a separate keybinding (though you can still additionally + bind the function separately, if desired). + 2. Converts any tab chars in the edited file, to spaces in the TEXTAREA + anchor line. The tabstop is currently #define'd to the quasi-standard + value of 8. (If anyone thinks that needs to be user configurable, feel + free to add that to the o(ptions) form/menu, + cmd-line-arg/lynx.cfg/.lynxrc/userdefs.h, whatever ... + I recommend against doing so though, as tabstops that are not set at 8, + are a PITA to deal with, generally speaking. I dunno if tab chars in a + TEXTAREA form are prohibited "by spec", or if it is just a "lynxism" that + they cause rendering problems (as well as downstream problems with + submit/etc, I think), but I felt I needed to do something to make lynx + behave rationally if they are present in the edited data (quite possibly + from an arbitrary file that one pulled into the editor). Filtering them + to spaces, seemed the most reasonable thing to do. + 3. Replaces any embedded control chars with something printable (I chose a + "." char, since it is less "intrusive" than some other choices, like "*", + "+", "#", etc). As with tabs, when some of these chars *are* rendered + into the TEXTAREA, strange things may happen. This shouldn't be much of a + limitation, since many of these chars perform line-editing or + system/job-control functions, when entered directly while one is in the + TEXTAREA. They currently cannot be "escaped" and entered as actual text + chars, so far as I can tell. Anyway ... I don't know of any "legitimate" + reason for them to be used as TEXTAREA data, so for now, you get "dots" in + their place. + 4. Cleans up a few comments, and such. +* update some linked in lynx_help_main.html (Heikki Kantola ) +* add checks for null return from malloc to HTInit.c, LYMain.c, LYReadCFG.c, + LYUtils.c (patch by John Bley) +* add telnet, tn3270 and rlogin program paths to configure script + (patch by George.Lindholm@ubc.ca). +1999-01-28 (2.8.2dev.15) +* correct calls to HTAddParam() in LYDownLoad.c to handle optional second + parameter (reported by KW) - TD +* change HTAddXpand() to assume its parameter (an environment variable) is + already expanded and simply is not quoted (reported by Ryan Hung + ) - TD +* add configure --disable-included-msgs option to allow suppressing of bundled + ./po directory for the NLS message library contents. If no ./po directory + is found, the configure script assumes it is preinstalled anyway (request + by HN) - TD +* add pattern to script which customizes pathnames in lynx.cfg to support + GLOBAL_MAILCAP:/PATH_TO/lynx_doc/samples/mailcap + (request by PG) - TD +* export $PATH when calling cfg_defs.sh - PG +* add a simple test to check if the temporary directory is actually writable + if we cannot create a temporary file in LYOpenTemp (reported by PG) - TD +* miscellaneous DOS/DJGPP compile/build fixes - LP +* enabled CERN-style rules, there are two new lynx.cfg options, RULESFILE and + RULE. No example file or documentation yet beyond comments in lynx.cfg. The + rules mechanism itself is unchanged from what was present for a long time + (but never used), except for some memory cleanup. Use -DNO_RULES at compile + time to disable - KW +* add changes to invoke external editor on textarea, can be invoked by adding a + KEYMAP entry for EDITTEXTAREA area to lynx.cfg (originally from + aldomel@ix.netcom.com, but much rework) - KED +* use HTSprintf0 in HTTCP.c - TD +* added PARSE_STRICTPATH and PARSE_QUERY to interface of HTParse(), for + requesting only the relevant part of what is returned for PARSE_PATH. This + isn't yet used anywhere - KW +* changes to StrAllocVsprintf() to take width and precision in most format + specifications into account, and to correct the memory allocation logic. + This was tested by setting GROW_SIZE to a small value of 8, so far no + crashes, but it is certainly not right for all possible formats, especially + involving floating point conversions - KW +* changed HTSprintf0() to pass a string already existing in its output buffer + on, this should save a few realloc's in StrAllocVsprintf() - KW +* changes to code handling LIST_FORMAT to avoid some unnecessary reallocations, + to recognize some more format flags, and to treat invalid formats somewhat + better - KW +* corrected recent HTFile.c change for systems without S_ISVTX - KW +* added memory cleanup for uid/gid cache functions in HTAAProt.c - KW +* increased ATEXITSIZE to 40 - KW +* added TRACE output to HTAnchor.c's free_adult_table. If this shows anything + at program exit (if TRACE is on then), it means that HTAnchor structures have + been missed by the normal automatic cleanup (walking the history list and + following links) - KW +* changed more status codes in HTUtils.h to libwww5-like values - KW +* added new function to check for a valid Internet hostname - KW + Use it before actually trying to resolve an address, it should + a. avoid the overhead of NSL_FORK if it would fail anyway, + b. prevent DNS queries for invalid names, which may unnecessarily + consume time, bandwidth, and DNS server cache memory, and + may confuse some resolver libraries and servers, + c. speed up address guessing sometimes if something was mistyped, + d. thwart some attempts to crash Lynx with invalid URLs. +* this time really make "Alert" statusline prefix localizable - KW +* new function HTAlwaysAlert(), which can be called even when LYCursesON isn't + true and should always produce a visible message - KW +* use new valid_hostname to also check telnet, tn3270, and rlogin hostnames + before calling the external program (after most invalid character have + already been stripped). Added a fflush(stdout) to make sure messages are + visible before external program is called - KW +* made changes equivalent to the 1998-12-31 HTSACopy and HTSACat modification + to the LY_FIND_LEAKS versions of those functions. Having source and target + string for StrAllocCopy or StrAllocCat overlap (or being equal) should be + considered a programming error, but at least one place in LYEdit.c currently + seems to do it and rely on the new behavior. (Editing current file sometimes + didn't work with LY_FIND_LEAKS) - KW +* closed memory leaks in LYKeymap.c, provided for memory cleanup at exit of + LYCgi.c environment strings - KW +* explicitly put HTTP_ACCEPT_LANGUAGE and HTTP_ACCEPT_CHARSET strings into + lynxcgi environment only if they are non-empty, i.e., set to something in + lynx.cfg or the personal configuration or Options screen. This makes the + environment a lynxcgi scripts sees resemble more closely that of a remote CGI + script handling a request from Lynx with the same configuration - HTTP.c also + only sends Accept-{Language,Charset} headers if preferred language and + preferred charset (respectively) have been set to non-empty strings. + (Strictly speaking, an empty Accept-* header has a different meaning from a + non-existing one, but it doesn't make much sense to generate empty Accept-* + headers, since they mean "nothing is accepted".) There are other differences + in the lynxcgi environment (e.g. HTTP_ACCEPT isn't set, ",iso-8859-1;q=0.01" + etc. isn't appended to HTTP_ACCEPT_CHARSET, apart from missing + redirections), but apparently nobody has needed a more exact CGI emulation + for real scripts - KW +* removed sending of "Negotiate: trans" in HTTP.c since it violates transparent + content negotiation specs, added comments - KW +* correct error handling in CF_INET_ADDR, which did not restore $LIBS when no + applicable library was found for inet_addr (reported by IC) - TD +* correction to CF_TERMCAP_LIBS, which used inconsistent spelling for the cache + variable, so predefined termcap/terminfo library was not necessarily + detected - TD +* resolved autoconf 2.13 problem, resync configure script with patched + autoconf 2.13 - TD +1999-01-18 (2.8.2dev.14) +* use HTSprint0 in LYCurses.c, LYForms.c, LYGetFile.c, LYJump.c - TD +* modify LYCheckMail so it does not continue to report new mail when the mail + file's modification time differs from its access time (reported by LV) - TD +* add check for inet_addr function, and (preferred) inet_aton. The first + function is reported to be sometimes in -lresolv, or -lbind when it is not + present in the conventional network libraries (from report by + mattack@area.com and comments by HN) - TD +* resync config.sub, config.guess with autoconf 2.13.19990117 (not yet + configure, since autoconf 2.13 contains some new bugs) - TD +* modified handling of untranslatable charsets, after noticing that a page + with charset=ISO-2022-JP produced an alert message with a truncated + "iso-2022-j". Looking more closely, the code could also result in memory + corruption in some cases. Compared with older versions, then changed the + code to something somewhat like what was intended there. But we don't have + an "Other ISO Latin" display character set any more; maybe those `else' + blocks should just have disappeared completely - KW +* minor changes to SortaSGML DTD for PARAM, THEAD - KW +* make "Alert" statusline prefix localizable - KW +* extend fixtext.sh to also change continued lines - KW +* changed LYCheckForProxyURL to act more like it appears to have been indented, + and clarify comment. Minor change in is_url - KW +* prevent removal of hidden link number from bookmark document in a very + obscure case of a bookmarked ISMAP link - KW +* HText_SubmitForm: make sure query is always allocated, even if the set of + form fields to be sent turned out to be empty - KW +* some comments corrected in HTML.c, LYCharSets.c - KW +* tweak in curses_w_style for display without color - KW +* remove minor memory leak in LYDownload.c - KW +* changed error handling in LYTraversal.c to make sure terminal gets restored + to sane mode before showing error message and exiting - KW +* increased VALUE_SIZE for buffer in HTMIME.c from 1024 to 5120. Someone + needed increase for long Set-Cookie headers - KW +* two new functions in HTList.c to reverse and to combine lists - KW +* Lynx was using the wrong precedence for entries within a mailcap (relative to + other entries from the same file): RFC 1524 says "The configuration + information will be obtained from the FIRST matching entry in a mailcap + file[...]", but Lynx effectively gave precedence to the last match. Recent + Debian packages of lynx have had a patch applied to change this, but that + patch also seems to affect the precedence order relative to viewers defined + in other places, i.e., lynx.cfg and HTInit.c. The patch here instead changes + the precedence of mailcap entries form the same files to RFC-like behavior, + by reordering the list generated from a mailcap file after we have finished + reading it in. It leaves the order relative to viewers from other sources + unchanged. Maybe it should be made configurable whether Lynx's traditional + precedence or the new one is used; currently there is just a #define in + HTInit.c which could be changed to revert to traditional behavior - KW +* add checks for null return from malloc to LYCurses.c, LYStrings.c, + (patch by John Bley) +* add support for HP Roman8 as a display character set. HP Roman8 is used by + Hewlett-Packard terminals and hpterm, HP's version of xterm. The character + repertoire is largely similar to ISO Latin 1 but the code points are all + mixed up (patch by Christian Weisgerber) +* modify WWW/Library/Implementation/HTAAUtil.c::HTAA_setupReader(): to use + malloc'd buffer rather than static buffer, to avoid overflow (patch by Thomas + Braun ) +* modifications to allow building the DOS lynx port with support of gettext for + producing messages in various languages. The DOS port of the gettext package + still needs minor tweaking to get it to function properly, but this shouldn't + be a problem for most people trying to compile lynx for DOS themselves. + Rather than put yet more DOS-specific makefiles in the distribution, I put + the changes to the makefiles within comments, which can easily be removed to + enable the changes - DK +* add a comment about LYUCcharset struct "UChndl" field. Tweak trace + messages - LP +* fix parsing of ALT=value attribute when the value is not quoted. When the + first character is not us-ascii it was corrupted by chartrans in all versions + of lynx. Fix case S_equals in SGML_character() - LP +* chartrans: ignore RAW_TOGGLE key and do not change LYUseDefaultRawMode if + current document's charset specified explicitly, add status message. (Let + user switch toggle only when necessary, to avoid future problems :-) - LP +* chartrans: change the default value of PREPEND_CHARSET_TO_SOURCE in lynx.cfg + from FALSE to TRUE (better safe than sorry) - LP +* reorder forms-based options menu (cosmetic): rename "HTML error tolerance" + to "HTML error recovery", reorganize "Character Set Options" section - + "Display character set" went to "Personal preferences" section, "Assume + character set" and "Raw 8-bit or CJK mode" went to "Document Layout" section; + "Execution Links" went to "File management" section. (Hope this helps to + reduce confusion) - LP +* remove "environment variables" section from INSTALLATION, change references + to Lynx User Guide in all docs. Minor tweaks on help files - LP +* add a comment to mime.types and lynx.cfg on SUFFIX definition: "This has an + effect for ftp and local files only, http server does specify MIME type in + the Content-Type header" - LP +1999-01-13 (2.8.2dev.13) +* correct a missing trailing newline in caselower.h (this may be a problem + patching since 'diff' does not like that) - TD +* fix off-by-one alignment download options (reported by LV) - IC +* use HTSprintf/HTSprintf0 in UCAuto.c - TD +* remove stop/start curses calls around UCChangeTerminalCodepage() in + GridText.c, since they are not necessary, and are a little distracting + when running Lynx in xterm - TD +* correct handling in getfile() of ~/ expansion - KW +* modify NSL_FORK logic to prevent child process from running any signal + handlers the parent may have installed - KW +* the logic added to display_page for avoiding unnecessary screen redraw with + partial display (see 1998-12-03) is now disabled if enable_scrollback is set. + Otherwise displayed pages could appear as empty (or with only the current + link drawn) - KW +* modify conditions under which screen style cache is reset (only relevant for + color style in combination with partial display) - KW +* update the INSTALLATION file, reflecting the changes between the two DJGPP + versions of GCC in use. Also, change optimization to -O2 in the other two + DOS makefiles - DK +* add support for ISO 8859-15, i.e., "Latin 9", make corrections to DEC + Multinational character translations (patch by (Christian Weisgerber + ) +* modify po/makefile.inn to use mkdirs.sh rather than mkinstalldirs script + (reported by LV) - TD +* modify print_help_and_exit() to print values for the simple options, i.e., + toggle, integer and string, as part of "lynx -help" (request by + mattack@area.com) - TD +* correct sense shown for Old_DTD variable in LYOptions.c (reported by DK). +* correct order of params for non-Unix use of HTAddParam in LYBookmark.c + (reported by DK) +1998-12-31 +* delete unused 'PREVAIL' color-style code from HTML.c, merge a couple of + sections of logic with TrimColorClass, and change Style_className to + a dynamically-allocated string - TD +* modify fmt_tempname() to check for buffer overflow - TD +* check/modify for potential buffer overflows: HTAlert.c, LYBookMark.c, + LYKeymap.c, LYPrint.c (including splitting it up into functions) - TD +* change GetOptValues to return status separately from the decoded value, in + case the options form is damaged (suggested by LP) - TD +* add new function HTAddXpand to use in special case where Lynx is building + shell command using data from user's configuration, which should not be + quoted. Use this in LYEdit.c to allow $EDITOR to be given as the editor + name (request by PG) - TD +* add new function LYOpenTraceLog, to combine logic in LYMain.c and + LYMainLoop.c, including Lynx's version message - TD +* fix some discrepancies between the code and the documentation (help files), + for the alternate line edit keybindings, that were first included in the + distribution somewhere around -dev.3, or so - KED +* added a delete-to-beginning-of-line (for the alt bindings only), and a help + page that describes the alternate bindings - KED +* improved description of "HTML error tolerance" - KW +* changes for handling lynxcgi: handle failure of execve(), by showing the + system error and then _exit()ing the child process. Make sure REQUEST_METHOD + is always set. Added checks for EINTR and other errors from read() - KW +* DOSPATH or EMX: remove strange code dealing with root of local drive from + is_url() and HTDOS_name()/HTDOS_wwwname(), add right code at the earlier + stage in LYFillLocalFileURL() - LP (thanks KW) +* relax warning from HTAlert to HTUserMsg on REFRESH_URL_NOT_ABSOLUTE - LP +* more tweaks on transfer rate calculation - LP +* modify HTSACopy and HTSACat in case the source and destination are the same + pointer - TD +* tested/removed redundant OS/2 EMX adjustment to filename from LYEdit.c - TD +* optimized LYEdit.c by moving calls on HTSYS_name(filename) to a single place + near the top - LP +* forms-based options menu: prevent spoofing attempts from possible overruns + (e.g., user can doing 'e'dit in 'o'ptions and get core dump if + display_char_set gets an illegal number such as 50, or hang the keyboard with + illegal Line edit style) - LP +* forms-based options menu: add new logical section - Document Layout, + currently with "HTML error tolerance" (TagSoup/SortaSGML), "Pop-up for select + fields", "Show images" (no_alt/labels/links) and "Verbose images". New + switches added for information purposes mostly, they duplicate hot keys but + not so hidden from user's view. Documentation updated also. (Oh yes, "Line + edit style" option is now available when we have a real choice >1) - LP +* split cfg_defs.sh into two script based on revised script from PG - TD +* minor fixes for top-level makefile.in - PG +* fixes for makefiles with gcc 2.8.1 using DJGPP 2.02 (do not use "-c -o" + combination, strip trailing blanks from makefile.sla, change optimization + level to -O2) - DK +* rename New_DTD variable to Old_DTD, change logic for -tagsoup option to be + consistent with sense in lynx.cfg (reported by LP) +1998-12-26 (2.8.2dev.12) +* use HTSprintf0 in LYCgi.c - TD +* add tab-completion on URL's, by using previously-entered strings for + matching (patch by Kari Davidsson ) - TD +* add version number to trace log (patch by IC) +* modify HTDOS_name to be consistent with HTVMS_name, which does not modify + its parameter (reported by LP). Also, modify HTDOS_name and HTDOS_wwwName + so they allocate space for the result rather than using a static buffer - TD +* modify LYEdit.c to use HTAddParam - TD +* make HREF/NAME for "Environment" consistent in Lynx_users_guide.html + (reported by LP) +* correct DOS/EMX logic in LYEdit.c which incremented 'filename' pointer when + its length was greater than 1 rather than recopying the string, causing a + core dump when 'filename' was freed (reported by LP, this applies to + 2.8.1rel.2) - TD +* correct sense of 'already_exists()' function from dev.11, which caused + various file-menu operations to stop working (reported by IC) - TD +1998-12-24 (2.8.2dev.11) +* use HTSprintf/HTSprintf0 in about half of the WWW library files where + applicable: HTAABrow.c HTAAServ.c HTAAUtil.c HTAccess.c HTAnchor.c HTDOS.c + HTFTP.c HTFWriter.c HTFile.c HTFinger.c HTFormat.c HTGopher.c - TD +* eliminate most duplicate gettext parameters, reduced the number of files + listed in po/POTFILES.in to a size that may allow build with the Solaris + xgettext utility - TD +* correct rule for remaking po/makefile - TD +* workaround for HPUX sed program, providing '$' anchors for ".*" expressions, + which is redundant, but should be harmless (suggested by Jean-Yves Levesque + ) +* add new help file, keystrokes/environments.html - LP +* fix HTReadProgress(): more accurate transfer rate calculation - LP +* update slang makefile.dos, and corresponding INSTALLATION notes - DK +* correct my integration of IZ's LY_CHANGE_LINK code, which resulted in an + out-of-bounds index into revmap (reported by LP, LV) - TD +* add note about sendmail for Win32 to lynx.cfg - JS +* add note for successful build on NeXT to INSTALLATION (Christian Jensen + ) +* add checks for null return from malloc to HTInit.c, LYMainLoop.c, LYUtils.c, + (patch by John Bley ) +* remove reference to 'persistent_cookies' in LYCookie.c which prevented + compile when persistent cookies configure option was disabled (report + by PG) - KW +* move assignment to SHELL back from WWW/Library/makefile.in to CommonMakefile, + and revert use of $CONFIG_SHELL in configure script, since this appears to + stop auto-configure from finding working include feature of 'make' on CLIX + (reported by Alex Matulich) - TD +1998-12-16 (2.8.2dev.10) +* FROM_FILE is not used any more for a domain (although it is currently still + defined. Renamed COOKIE_FLAG_PERSISTENT to COOKIE_FLAG_FROM_FILE. Don't + change a domain's "behavior" (ACCEPT_ALWAYS, REJECT_ALWAYS, or QUERY_USER) + just because there was a persistent cookie for it. Users who want to always + accept cookies from a domain without prompting should use + COOKIE_ACCEPT_DOMAINS - KW +* FREE domain_entry objects when they are not used any more. Other minor leak + removed - KW +* some (few) changes for draft-ietf-http-state-man-mec-10.txt. Don't accept + invalid port lists (this may need more tweaking). Added some comments - KW +* try to preserve cookies (within a domain) in the same order in which they + were received, although this is probably not necessary after all. There is + no difference any more w.r.t. insertion into the list between cookies from + the file and cookies from response headers - KW +* use <= instead of < comparison when checking whether a cookie has expired -KW +* don't write expired cookies, cookies with discard attribute, or cookies + without expiration date to persistent file - KW +* don't call HTConfirmCookie for cookies read from file. This doesn't change + the logic since previously HTConfirmCookie allowed all file cookies anyway - + KW +* don't delete the domain_list if it becomes empty. Doing this could result in + unnecessary multiple atexit()'s - KW +* write the cookie file even if we now have no cookies, if we have previously + read cookies from the file. The file should be updated if all cookies that + were in it are expired or superseded or deleted - KW +* when reading file cookies, set attributes in a way that (hopefully) makes + more sense than just ignoring them. See comments in LYLoadCookies. + We are restricted a lot by the choice of a Netscape-compatible cookie file + format, some version 1 properties just cannot be stored in it AFAIK. Some + more tweaking in LYLoadCookies - KW +* setting a domains behavior to accept "A)lways" didn't actually work, it had + the same effect as "P)rompt". Corrected this simple (probably cut-and-paste) + error - KW +* some changes in what is displayed on Cookie Jar page: FROM_FILE is a + property of individual cookies, not of domains as previously. Cookies from + file (which haven't been updated) are shown as "(from a previous session)". + Show expiration time ("Max. Gobble Date") whenever we have one. The state + of the "discard" attribute is already displayed separately - KW +* made color styles code work much better with TagSoup parsing mode. A new + flag bit is set for some tags in HTMLDTD which indicates that, even though + they may be otherwise handled as SGML_EMPTY, this emptiness is fake. This + can only work reasonably for elements that require an end tag (not for LI, + for example) - KW +* added SUMMARY attribute for TABLE element to HTMLDTD (but we don't do + anything with it) - KW +* split_line: Try to account for changes in anchor position and extent in all + possible cases. This improves some cases where the selectable text could + become too short and, in extreme cases, a link could become erroneously + "hidden" - KW +* split_line: color style changes after the split position are moved to the + correct position in the new line - KW +* set TextAnchor's line_num in HText_beginInput, so that split_line can adjust + the input field's position properly if a split moves it to the next line. + Should solve problem reported for www.lycos.com - KW +* don't refuse to read from file-descriptor 0 in HTDoRead for Unix if it is not + a tty. The socket fd from HTDoConnect can be 0 if fd 0 was not open when + lynx was started non-interactively - KW +* increase INIT_LINE_SIZE in HTTP.c slightly from 1024 to 1536, so that for a + typical ethernet MTU the first packet of a response can more often be read in + with a single read() - KW +* add a missing FREE() in HTTP.c - KW +* use case mapping from ftp.unicode.org /Public/UNIDATA for case-insensitive + user search (thanks "Kari E. Hurtta" ), new file + src/chrtrans/caselower.h added. This is used instead of UPPER8 assumption + introduced in 2.8 release (see 1998-02-27). There is no difference in speed + though - LP +* fix links in History/Visited Links page for documents with blank + , also remove leading spaces from titles to make output a + little better - LP +* use djgpp's file, which contains default values for autoconf + style definitions - LP +* updated lynx.man, lynx.hlp for "SEE ALSO" sections - KED, JS +* optimize the test commands specified in the mailcap file by remembering which + tests have been run already. (patch by Marc Huber ) +* add lint rule to makefile.in, as well as corresponding rule in WWW/... - LV +* update version in makefile.in to 2-8-2 - PG +* fix makefiles to build with DJGPP (problem introduced in dev8) - LP +* use new symbol KEYMAP_SIZE to get rid of various constants relating to the + size of keymap[] array, e.g, 0x293, 659 - TD +* add new mouse and keymap functionality to lynx: + a) If one clicks mouse *near* a link, the "point/focus" is moved to this link + (without actual activation); + b) One can bind keys with ordinals larger than DO_NOTHING; + c) Primitive context sensitive menu added to the middle button of a mouse + (currently ncurses only); + Current micro-problem with "c" is that I do not know how to refresh a screen + before triggering the action, so if the action chosen from the menu would + not redraw the screen, the menu outline is left on the screen - IZ +* modify LYKeymap.c so that it can show internal keymaps above 0400 as + hexadecimal codes even if they do not appear in the function-key table - IZ +* add HTOptParam to avoid spurious quoting of blanks in rlogin URLs by + HTAddParam - TD +* correct missing assignment in remote_session(), from dev.9 changes for + HTAddParam, which broke telnet/rlogin URLs (reported by IC) - TD +1998-12-12 (2.8.2dev.9) +* change location-not-absolute message from an alert to user-message - TD +* check for EINTR from read() call in HTDoRead, and retry if necessary. This + change only for Unix. Interrupted read() system calls should be rare (or + impossible, depending on the system implementation?) since the read() is only + done after a successful select(), but checking can't hurt - KW +* check for read read() errors in HTDoRead and HTCopy, and generate alert + messages for unexpected errors. HTCopy still returns HT_LOADED to indicate + success if any data have been received before an unexpected error or + disconnection. Previously this happened without any indication to the user + that something was wrong and a document or file might be incomplete. These + changes currently only for Unix - KW +* added/enhanced comments in HTFormat.c to document current behavior of HTCopy, + HTFileCopy, HTGzFileCopy, HTParseSocket, HTParseFile, and HTParseGzFile - KW +* moved definition of HT_NO_DATA to HTUtils.h, changed value of some status + codes to libwww5-like values while we're at it - KW +* correct uninitialized de variable in LYCookie.c when dump_output_immediately + is set. Also, made a slight change to this mode in LYMain.c, so that cookies + received will also be written to the cookie file; cleanup() is not called in + -dump mode (reported by Elwin Oost) - BJP +* correct include-path for chrtrans makefile to allow builds outside the + source tree (Masashi Fujita) +* minor cleanup of LYCookie.c, add some traces - BJP +* add support for content encoding for x-bzip2, bzip2 for suffix "bz2" - HN +* add po directory to install-bin and uninstall rules - TD +* modify the environment variable logic to avoid freeing string given to putenv + until after giving it a new string - TD +* add several environment variables to LYPrint.c - KED +* add ENVIRONMENT section to lynx.man and lynx.hlp - KED +* add installation note about --enable-gzip-help - KED +* update installation notes for WAIS - DK +* add/use new functions for building up command-string for shell commands, + which quote parameters as needed: HTAddParam(), HTEndParam(). Moved the + logic in quote_pathname to HTQuoteParameter, extending that function to quote + the parameter only if it contains characters which are problems with various + shells (e.g., wildcards), and to escape backslashes. In particular, use + these functions to ensure that the user and port strings in HTTelnet.c are + quoted (fixes a hole reported by Art Mulder - TD +* modify print-to-file logic to permit writing to pipe, provided that the + user does not have no-shell restriction - TD +* split-out logic for LYValidateFilename() from printfile() and LYDownload - TD +* whitespace fixes - BJP +* add configure option --with-nls-datadir, to allow installer to specify + alternate locale data directory. A separate option from --datadir is + required because the GNU gettext code is usually installed under + $(prefix)/share rather $(prefix)/lib - TD +* add configure check for gettimeofday, to implement 0.1 second interval + for skipping HTCheckForInterrupt() - TD +* modify configure script to generate references to $CONFIG_SHELL rather than + /bin/sh, to allow some testing with alternate shells. Autoconf uses this + variable for a similar purpose - TD +* correct missing case for 'o', octal in StrAllocVsprintf (reported by IC) - TD +* fix -restrictions=bookmark check in forms-based options menu (reported by KW + & Rodiger Geys) - LP +* fix memory leaks in LYPrint.c and UCdomap.c - KW +* when printing HEAD to email use URL in the subject, was title. (it was + especially annoying when we have 8bit title being sent as 7bit: no charset + information is supplied for letters with 7bit message body) - LP +* remove "temp fix for HText_trimHightext side effect from partial mode by + introducing a flag in HText_beginInput()" from 1998-09-12 since it is now not + needed after KW's changes in HText_trimHightext. - LP +1998-12-03 (2.8.2dev.8) +* use HTSprintf/HTSprintf0 in LYCookie.c, LYLocal.c - TD +* correct logic in OpenHiddenFile, which did not check if a failure to open a + file for append was due to the file's not existing and hence causing + IsOurFile to return failure. This caused the -traversal option to fail + (reported by Francis Irving , applies to + 2.8.1rel.2) - TD +* fixed line number removal code in HText_endAnchor in several places, it was + modifying the wrong line which could lead to memory corruption - KW +* tweaks in HText_startAnchor and HText_endAnchor for handling link numbers: + don't swallow space after number if line was split, find link number on + previous line even it it is at the very end, adjust line split position after + number removal. Generate TRACE output in interesting cases - KW +* prevent havoc (access to already freed memory etc.) caused by multiple + recursive invocations of HTAnchor_delete on the same HTParentAnchor. This + does not seem to actually happen normally during a session, but can occur + when the HTAnchor structures are cleaned up while handling a terminating + signal or outofmem condition - KW +* reset the HTAnchor "underway" flag during final cleanup, so structures are + not prevented from being freed. This also should only make a difference when + handling a terminating signal or outofmem condition - KW +* show sticky-bit in directory listings - LW +* correct options-message on Print page - IC +* update installation note about freewais library (reported by Chris Maden + ) - TD +* improvements to mouse code, ncurses-based, from IZ (Ilya Zakharevich) + a) Mouse navigation inside text entry fields; + b) Mouse navigation to a text entry field (including an empty one) + c) Mouse navigation to a specific position of a text field (since I do not + know which fields are text fields, I implemented "b" and "c" for + F_TEXTAREA_TYPE and F_TEXT_TYPE only, search for these symbols in the + patch); + d) Mouse navigation in menus: To scroll, one can click on top/bottom border + (single=byline, double=bypage, triple=beg/end), or above/below menu + (single=bypage, double=beg/end)) mouse-3 ==> quit; + e) Double-click-1 on the first and last row are interpreted as goto- + start/end/main-window (depending on the location of the click). + Other Changes: + a) Ask ncurses for all mouse events, but increase mouseinterval() to simulate + current behavior (which is effectively an infinite mouseinterval() + + masking of repeated clicks); + b) Earlier clicking to the left of a link would activate the link. I see no + use for this, so consider this a bug. +* HText_trimHightext (GridText.c): don't apply final adjustment repeatedly to + an anchor that has already been handled by this function; the function may be + called repeatedly if partial display is enabled. Some other changes in this + function, to interact better with the other GridText.c functions, especially + for partial display mode. We don't have to handle all anchors if the new + parameter "final" is not set. + Also empty anchors should now generally not any more move down over empty + lines, if they happen at a line end. Made some trace messages give more + information - KW +* color styles: reset screen style cache to avoid random coloring when a link + is unhighlighted - KW +* tweak in HText_setLastOptionValue: if an OPTION tag was directly followed by + several newlines, characters could be dropped - KW +* tweak havevisible() function in LYBookmark.c to compare against Unicode + value rather than ASCII when checking for blanks. - LP +* ifdef user/group function caching calls so that this builds with djgpp, which + doesn't need/support this (patch by Gisle Vanem) +* documentation updates for NLS - HN +* separate some html from gettext in LYCgi.c, LYHistory.c, LYLocal.c - JS +* avoid setting recent_sizechange during the very first start_curses call for + ncurses. This would result in an unnecessary refresh after loading the first + document - KW +* added logic to display_page to avoid repainting the full screen contents in a + specific situation: if it has been called before (for the same lines in the + same document) during partial display, and is now being called normally (not + during partial display). If this applies, the normal line content is not + redrawn, but the title line and form fields are still repainted, and updating + of the links structures is always done. There are additional checks for + recent_sizechange and a text->stale flag (which was already implemented but + unused) to do the full redraw if that may be needed. This should avoid + unnecessary screen 'blinking' with curses when partial display is used (which + didn't seem to happen with slang) - KW +* modify SGML.c to check for SGML_ELEMENT tag contents, fixing a case where an + entity that appears within a TABLE but outside of any table row TR will be + displayed by Lynx _without_ its entities being interpreted (analysis by Alan + J Flavell , applies to 2.8.1rel.2) - KW +* check that stdin is really a tty before trying to select from it in the + NSL-FORK logic in HTParseInet(), file HTTCP.c (reported by Kim DeVaughn, for + someone who was unable to run lynx -dump in a cron job, applies to + 2.8.1rel.2) - TD, BL +* updates for lynx_help_main.html (JS, IC). +* change fopen for write in LYCookie.c to LYNewTxtFile so that the resulting + file will be readable by only the owner (Bill Nottingham + suggested using umask, but that may not be portable enough) - TD +* use CONST in some places in UCdomap.c and makeuctb, to make more tables + sharable (suggested by LP) - TD +* fixes for SunOS K&R compiler with/without unproto wrapper, i.e., definition + of 'const' - TD +1998-11-23 (2.8.2dev.7) +* convert KEY_ENTER to newline in LYgetch() to make Lynx work with IRIX's + iris-ansi terminfo description, which equates the kent capability with + carriage return. Doing this will allow lynx to use the keypad "enter" key as + an alias for carriage return on most terminals - KW +* correct a few missing ifdef's for disabling the partial-display logic - TD +* add/use new functions HTAA_UidToName(), HTAA_NameToUid(), HTAA_GidToName() + and HTAA_NameToGid() to hide details of code which uses pwd.h and grp.h, + as well as to cache the returned user/group names, improving performance + in the dired screen - TD +* modify HTCheckForInterrupt() to check for interrupt no more than one per + second, since this check is comparatively slow - TD +* modify ANSI_VARARGS case for HTSprintf() and HTSprintf0() to always use + ANSI prototypes, since __STDC__ may not necessarily be defined on some + systems, resulting in an inconsistent definition - PG +* add install-full rule to makefile.in - LV +* modify PutDefs macro in LYShowInfo.c to check for nonnull table[N].value, + which may be null due to limitations of cfg_defs.sh script on some + platforms where an empty string was intended (reported by LV, PG, applies + to 2.8.1rel.2) - TD +* correct typo in 'make distclean' rule; an extra '-' prevented removal of + .orig and .rej files (patch by LV). +1998-11-21 (2.8.2dev.6) +* add call on dbug_init to LYMain.c, allowing use of the debugging code built + into the WATTCP code which is included in the DJGPP port of lynx. This is + activated by placing lines in the WATTCP.CFG file for: + DEBUG.MODE= (choices are HEADERS, DUMP, or ALL) + DEBUG.PROTO= (choices are TCP, UDP, or ALL) + DEBUG.FILE= (name of log file. Defaults to WATTCP.DBG) + This adds about 2K to the size of the stripped, compressed executable. You + get a log of the headers and/or a binary dump of the packets sent and + received. Maybe this will help in determining where ftp is failing in this + port - DK +* correct definitions for ANSI_VARARGS, HAVE_STDARG_H in HTUtils.h (reported + by LP, for djgpp) - TD +* correct logic in StrAllocVsprintf(), remove spurious test on dst_len + (analysis by LV) - TD +1998-11-21 (2.8.2dev.5) +* modify HTLoadFile() to make compressed files work with OS/2 EMX and + LYSystem() to convert forward slashes in pathnames to backslashes, also for + EMX (patches by Ilya Zakharevich). +* documentation nits (apostrophes) in lynx.cfg and userdefs.h - LV +* fix inconsistent newlines in po/it.po (report by Irving_Wolfe@Wolfe.net) - TD +* modify config.guess, added Intergraph 2430 CLIX machines (reported by Alex + Matulich ) - TD +* minor fix in LYCharSets.c according to recent changes in UCDefs.h introduced + by IBM OS/2 codepage number - LP +* modify configure script to work with --enable-nls built into a subdirectory + of the source tree (reported by PG) - TD +* disable regeneration of intl/po2tbl.sed and po/POTFILES if --disable-nls + configure option is specified - TD +* add configure test for stdarg.h vs varargs.h - TD +* fixes to work with SunOS K&R compiler - TD +* don't trim trailing and leading spaces from unformatted text lines in some + cases (split_line in GridText.c). Prevents corruption of some uuencoded + files when they are displayed and then 'P'rinted (although 'D'ownload should + be used instead) - KW +* some changes in HText_appendCharacter (GridText.c). Splitting of long SOURCE + lines now works with color styles - KW +* workaround for multiple anchors in the same (invalid) HTML document with the + same NAME and different destinations (HTAnchor.c) - KW +* check for 'z'ap while constructing local directory listings (non-VMS only, in + HTFile.c) - KW +* added a couple outofmem checks (HTAnchor.c). Minor TRACE message change in + GridText.c for -tlog / USE_TRACE_LOG disabled - KW +* when adding bookmark entries, don't accept a title string which appears to + consist only of blank characters (LYBookmark.c). When rendering a bookmark + file, use hiddenlinks=merge counting, so that numbers after entries with + empty titles don't get out of whack (GridText.c). This should prevent 'R' + from removing the wrong bookmark entry - KW +* prevent generation of some unnecessary temp files when constructing mailcap + file test commands (HTInit.c) - KW +* include LYLeaks.h in UCdomap.c for memory leak detection - KW +* fixed various memory leaks (UCdomap.c, LYShowInfo.c, LYReadCFG.c, LYMain.c, + LYDownload.c, LYBookmark.c, HTML.c, DefaultStyle.c) - KW +* escape '&' and '<' in HTML generated to display current lynx.cfg option + values (LYReadCFG.c) - KW +* revert logic in split_line. Emphasis highlighting that should extend over + several lines was being lost at line breaks (GridText.c). (IsSpecialAttrChar + probably shouldn't return true for LY_SOFT_NEWLINE since in most places it + tests whether to skip a character position, but as long as this special char + is only used in SOURCE mode it cannot mess up any anchor positions so it + should be ok. - KW +* correct character counting in SOURCE display continuation lines. A + highlighted search target would be shown shifted left by one character + position because the LY_SOFT_NEWLINE special was displayed as '+' but not + counted (GridText.c) - KW +* prevent generation of invalid/unparseable comments if + UCSaveBookmarksInUnicode is in effect, other minor changes in + LYBookmark.c - KW +* correction for color styles in HText_appendCharacter (GridText.c). At some + point a memmove was replaced by a for loop, but source and destination were + reversed and the counter was wrong - KW +* modify HTSprintf/HTSprintf0 to use a more generic approach to varargs by + using only va_alist in the parameter list - TD +* correct html expression in LYShowInfo.c of dev.3 which did not allow the temp + file with the lynx.cfg settings to be accessed from the Configuration + Definitions page (patch by IC - Ismael Cordeiro). +* correct "Exiting" message format in cleanup_sig(), which had unexpanded %d + (reported by BJP) - TD +* add to config.hin the definitions set by AM_GNU_GETTEXT macro (PG pointed + out that this also sets 'inline', needed for GNU gettext) - TD +* modify MakeNewTitle() to check for null pointer, fixing core dump with + verbose images when value[src_type] is null (reported by John Bley + for 2.8.1rel.2) - TD +1998-11-18 (2.8.2dev.4) +* change default for configure option of NLS (gettext) to disabled until we + finish porting it to implementations other than GNU gettext. Also, + change default for include-gettext configure option to "with" - TD +* suppress cookie-storing if the value is null - BJP +* ifdef'd alternative set of line-edit bindings with EXP_ALT_BINDINGS, add + configure option --enable-alt-bindings, rename DELEOL to DELEL, remove + binding of DELEL to '\'. - TD +* add alternative set of line-edit bindings to change the behavior of the ^B + and ^F line editor bindings to provide emacs/tcsh like behavior (cursor + left/right), instead of "word" deletes. Corrected a bug in the ^R (LYE_DELN) + function, which is described as "delete next character", but was in fact + performing identically to ^D (LYE_DELC) "delete current character". Added a + function called LYE_DELEL, which does the expected thing, and deletes + from the current cursor position, to the EOL. + New bindings: + ^B = LYE_BACK cursor backwards + ^F = LYE_FORW cursor forwards + ^K = LYE_DELEOL delete to end-of-line + ^T = LYE_DELNW delete next word + ^X = LYE_DELPW delete previous word + ^^ = LYE_UPPER upper case line (not active when kbd-layout binding is) + ^_ = LYE_LOWER lower case line + KED ((Kim DeVaughn )). +* modify to show address to submit to on the statusline when in advanced user + mode. Also fixes one small typo in LYMainLoop.c. (suggested by + ) - BJP +* modify HTParseInet() so that it works if stdin has been redirected to + /dev/null, e.g., when running a cron job (reported by John H. DuBois III + ) - BL +* minor documentation updates to lynx.cfg (Larry Virden). +* change some character constants from '\hex' and '\octal' form to decimal, + to persuade compilers that upper-128 compares are legal - TD +* ifdef'd KEYBOARD_LAYOUT with EXP_KEYBOARD_LAYOUT, add configure option + --enable-kbd-layout - TD +* implement EXP_CHARTRANS_AUTOSWITCH for OS/2 EMX (Sergey Svishchev). +* add 'a' response when printing a file to allow append rather than overwrite + (Sergey Svishchev). +* add KEYBOARD_LAYOUT to lynx.cfg, to support character-translation on input, + add missing line editing style selection to Options form. This is enabled + and disabled by the line edit control/uparrow (Sergey Svishchev + ). +* use exit_immediately() to reduce some signal-function clutter - LP +* correct dependency in src/makefile.in for cfg_defs.h (Masashi Fujita + ) +* change quoted includes in intl directory to bracketed includes - TD +1998-11-16 (2.8.2dev.3) +* misc documentation updates for the gettext/internationalization - LP +* rename po/makefile.in.in to po/makefile.inn, and modify distclean rule to + remove the remaining generated files - TD +* add preliminary changes from PG (pg@sweng.stortek.com) to support port to + OS/390, some ifdef'd with __MVS__, some with EBCDIC and NOT_ASCII. +* modify LYCookie.c to accept cookies with no value, in case the site resets a + cookie by nulling out the value (reported by Larry Virden) - BJP +* modify cookie parsing to ignore comment lines beginning with a '#' (reported + by Jonathan Bobin indicates that Netscape adds comments back, confusing Lynx) + - BJP +* highlight option letters in old options screen (adapted from patch by Ismael + Cordeiro) - TD +* use HTSprintf functions in HText_SubmitForm(), user_message(), + LYLoadIMGmap(), HTTelnet.c. (The HTTelnet.c modifications fix a security + hole reported by Martin Mokrejs) - TD +* add HTSprintf, HTSprintf0 functions, to use in resolving potential buffer + overflows - TD +* modify HTVMS_purge() to rename the remaining file to version 1 unless a + permissions problem was encountered - TD +1998-11-10 (2.8.2dev.2) +* some testing against Solaris gettext implementation, enough to see that it is + not really compatible either source or binary with GNU gettext. For the time + being, I recommend building NLS support only with GNU gettext (and + --with-included-gettext to avoid conflict with Solaris' gettext in the + standard library). Otherwise use the --disable-nls configure option - TD +* various changes to configure script and makefiles to make this build with and + without NLS - TD +* undo spurious substitutions such as gettext("") - TD +* modify some gettext() expressions to avoid embedding HTML in them - TD +* restore definitions in LYMessages_en.h - TD +* first cut of integrating Jim Spath's changes to incorporate message library + support. +1998-09-20 +* Files edited for language hooks: + src/HTAlert.c src/HTInit.c src/HTML.c src/LYBookmark.c src/LYCgi.c + src/LYClean.c src/LYCookie.c src/LYCurses.c src/LYDownload.c src/LYEdit.c + src/LYForms.c src/LYGetFile.c src/LYMail.c src/LYMain.c src/LYMainLoop.c + src/LYMap.c src/LYNews.c src/LYPrint.c src/LYUpload.c src/LYUtils.c + src/LYexit.c + WWW/Library/Implementation/HTAABrow.c WWW/Library/Implementation/HTAAProt.c + WWW/Library/Implementation/HTAccess.c WWW/Library/Implementation/HTFTP.c + WWW/Library/Implementation/HTFWriter.c WWW/Library/Implementation/HTFinger.c + WWW/Library/Implementation/HTFormat.c WWW/Library/Implementation/HTGopher.c + WWW/Library/Implementation/HTMIME.c WWW/Library/Implementation/HTNews.c + WWW/Library/Implementation/HTRules.c WWW/Library/Implementation/HTStyle.c + WWW/Library/Implementation/HTTCP.c WWW/Library/Implementation/HTTP.c + WWW/Library/Implementation/HTVMSUtils.c WWW/Library/Implementation/HTWAIS.c + WWW/Library/Implementation/HTWSRC.c +1998-09-08 (2.8.1dev25-intl) +* Resynch with dev tree - JES +1998-09-07 (2.8.1dev.21-intl) +* About half through language hooks in WWW/Lib... - JES + Integrated part of Chebucto's French translations. - JES +* Included latest ABOUT-NLS from GNU project, +1998-08-27 (2.8.1dev.21-intl) +* Tested language hooks using src/LYNews.c and Italian messages file + provided by Sabato De Rosa . Made changes to + LYMain.c, LYMainLoop.c, LYNews.c and HTNews.c. - JES +1998-08-27 (2.8.1dev.21-intl) +* add hooks to GNU gettext for international language support - JES + (This is an experimental modification that will be patched into + the main Lynx release after other platform testing. I've only done + NetBSD.) + +1998-11-05 (2.8.2dev.1) +* relax the cookie sanity checking for version 0 (old) cookies _only when_ the + user has accept_all_cookies set (patch by Risto Widenius + ) +* modify get_listen_socket() to check if master_socket is set before attempting + to use it in FD_CLR (patch by Karl-Andre Skevik ) +* minor documentation fixes - DK +* use $(LIBS) symbol in src/chrtrans/makefile.in (reported by Alois Maier + ) +* Fix core dump which may happen after printing-to-email. - LP +* Move read_rc() before parsing any command-line arguments (except -help) + so the latter will override any .lynxrc settings. In particular, the problem + was detected with -cookie_file= which was ignored after saving values + from Options menu. - LP +* Chartrans bug: LYNXIMGMAP now shows the text in right charset. + (The page was converted twice, fixed by adding META charset to this internal + page. The bug was in all versions of Lynx starting from 2.7.1ac) - LP +* Oops, my typo from pre3 back to 27-09-98: windows-1252 appears twice + in the list of character sets in options menu, was also typo in docs. - LP +* modify HTDOS.c to permit compile with K&R compiler - TD +1998-10-27 (2.8.1rel.2) +* tidy up version numbers - TD +* modify HTDOS.h to permit compile with K&R compiler - TD + +1998-10-24 (2.8.1rel.1) +----------------------- +* reorganize lynx_help_main.html - PW +* minor change to WWW/.../tcp.h to eliminate redefinition warning by DEC C - TD +* move checking for command-line "-head" and related options before curses + initialization so that program exits with correct terminal settings + (report by LV, fix by BL). +* correct uninitialized index into id_append in makeuctb, which causes problems + with def7_uni.tbl (analysis by LP) +* add TAGSOUP flag to lynx.cfg to set initial state of Tag Soup vs SortaSGML + (request by LP) - TD +* add PERSISTENT_COOKIES flag to lynx.cfg to allow disabling the persistent + cookies feature in a Lynx executable (request by BJP) - TD +* modify read_cfg so that it does not display included-file information when + NO_CONFIG_INFO is defined (reported by LP) - TD +* minor/cosmetic fixes for comments and documentation - LP +* revised patch for nsl-fork, which does not rely on WNOWAIT definition - BL +* include termio.h in LYCurses.c only #ifdef TERMIO_AND_CURSES (Philippe + De Muyter ) +* modify cfg_defs.sh to work when the 'set' command emits double-quotes + (pg@sweng.stortek.com) +* update obsolete copy of HTFWriter.c to add content-encoding for HTFileSuffix + (reported by David Helder and Jan Hlavacek ) - TD +* put GOTOBUFFER, JUMPBUFFER and QUIT_DEFAULT_YES back the way they used to be + (majority decision) - TD +1998-10-14 (2.8.1pre.10) +* add/use HTSYS_purge and HTSYS_remove functions (based on report by Tony + Bolton and patch by BJP dealing with removing older versions of cookie files) + - TD +* add --disable-config-info option - TD +* change configure script --enable-forms-options to --disable-forms-options, + add --disable-menu-options - TD +* comment-out FM's code to fold cookie headers and force cookies to be + presented in the same order that they were received - BJP +* use full "Implementation" directory name in include path in WWW djgpp + makefile - DK +* use HTDOS_name() to force DOS temporary-directory into consistent form - DK +* include HTVMSUtils.h and HTDOS.h from LYUtils.h, consolidate some ifdef's + using macro HTSYS_name - TD +* another fix for HTTCP.c, for lookups with Lynx/32 - WB +* add fallback to $TMPDIR for Lynx temporary directory on Unix - TD +* remove verbose_links variable due to popular demand - TD +1998-10-10 (2.8.1pre.9) +* add verbose_links variable to lynx.cfg and userdefs.h to control whether Lynx + should show "(LINK)" before links (request/patch by Moshe Zadka + ) - TD +* change defaults in lynx.cfg and userdefs.h, add comments - PW + (a) defaults are stated for `verbose' & `KB'; + (b) GOTOBUFFER & JUMPBUFFER defaults to TRUE; + (c) QUIT_DEFAULT_YES defaults to FALSE +* restore suggested file name in download menu: it is really useful for other + download methods which should be available in menu when `save to disk' is + disabled. Remove local_path/ prefix (LYNX_SAVE_SPACE if any) from visible + suggested file name string near the top instead - LP +* restore newline position when toggling comments parsing (at least we could + return to previous screen to try comments toggling twice) - LP +* add a link from keystrokes help for edit_help.html (input line keys) - LP +* corrected to make -nostatus command-line option override HTReadProgress - TD +* updates to lynx-dev.html (Al Gilman). +* modify NSL-fork support in HTTCP.c to use waitpid call to reap child + processes which may otherwise become orphaned. The new variable + "dns_patience" represents how many seconds we're willing to wait for DNS to + respond (should later make it configurable) - BL +* modify PutTextInput and PutDefs macros in LYOptions.c and LYShowInfo.c to + avoid pre-ANSI compilers attempting to substitute macro parameters in + coincidental matches within quoted strings - BL + gcc -Wtraditional reports the first, but not the second, which is "n" + substituted into "\n" - TD +* add an error-check for fg/bg values to lynx_chg_color function in case + lynx.cfg specifies color names not in Lynx's table - BL +* modify IsOurFile function to accommodate links-to-links, so that users whose + home directory is reached by that type of path can save .lynxrc file + (reported by PW) - TD +1998-10-04 (2.8.1pre.8) +* modify HTTCP.c to copy soc_in from phost in HTParseInet, making Lynx/32 do + lookups again - WB +* modify LYCurses.c to compile mouse-code with Borland C and PDCURSES 2.3 - WB +* correct backward logic in CF_TERMIOS_AND_CURSES (reported by LE) - TD +1998-10-04 (2.8.1pre.7) +* add special-case CF_TERMIOS_AND_CURSES configure macro (fixes problem + reported by Philippe De Muyter) - TD +* update/reorganize option_help.html - PW +* restore newline position when return from the Print menu or follow a link + from History page (was broken for partial display mode only): LYPop() and + LYPop_num now reinitialize Newline_partial if it happens on getfile stage. + Also remove changes from 1998-06-11 (case LYK_DOWNLOAD) since this is now + protected by HText_new() which never starts. - LP +* tweak suggested filename for download menu: now it we have URL + terminated with "/" (e.g., a directory or possibly root) do one more try - + remove terminating "/" - LP +* download menu: do not show "Suggested file name" when "save to disk disabled" + (requested by HN) - LP +* more tweaks on LYshow_kb_rate - LP +* move fallback definitions for POSIX S_ISLNK, etc., to allow build with + VAX C (reported by Tony Bolton) - TD +* add parentheses to eval-expression in CF_MAKE_INCLUDE configure test to + accommodate bash2 (Tadayoshi Okuma ) +1998-10-01 (2.8.1pre.6) +* add EMX to special cases for SetOutputMode, to force stdout to O_BINARY mode + so that downloading binary files will not corrupt them (reported by Ilya + Zakharevich ) - TD +* correct missing "\n\" in change to LYrcFile.c for pre.4 (reported by David + Eaton) - TD +* reorder HTCheckForInterrupt() so that partial display mode will work for + VMS (reported by LP) - TD +* fix LYK_DOWNLOAD to restrict downloading remote links for local_host_only, + like it was done for mailto: links recently, see comments where in. - LP +* replace few statusline messages with ones from LYMessages.en.h +1998-09-30 (2.8.1pre.5) +* force compile on VMS to use stdarg.h; it was ifdef'd for __STDC__ which + VAX C does not define, though it does support stdarg.h (reported by Tony + Bolton). Test-compile HTVMS_WaisUI.c on Linux to check... - TD +* update url for tcplib in INSTALLATION - DK +* fix HTDOS_name trace massage - LP +* expand "~" in include-statements in lynx.cfg (reported by LP) - TD +* remove some obsolete stuff from INSTALLATION - HN +* DOSPATH fix: user input URL like c:/path/file.ext (begins with drive letter) + now resolved as local path and will not be passed to DNS search in any case + (was running URL guessing process for host "c:" if file.ext not found...) + fix LYFillLocalFileURL() - LP +* fix HTUserMsg2 trace massage - LP +* add user's guide documentation for COOKIE_ACCEPT_DOMAINS and + COOKIE_REJECT_DOMAINS - BJP +* change default Unix cookie-file name to "~/.lynx_cookies" - BJP +* customize incremental rendering: + - add -partial_thres[=NUMBER] option to set the number of lines + - add PARTIAL_THRES config variable in lynx.cfg to set the number of lines + - add partial_thres variable in .lynxrc to set the number of lines. + Selecting save to disk and hitting Accept Changes in options menu will save + this variable to the current value. Haven't looked into making a form + entry for this yet. With -partial_thres command line option, probably not + necessary (patch by Eric ). +* fix some text in lynx.man and Lynx_user_guide.html. The man change includes + changes to "h" and "k" so they work whether or not vi keys are on - DK +* workaround for inconsistency between slang ports to DOS and other platforms + by suppressing test of SLtt_Use_Ansi_Colors. This fixes a problem where + colors change in the slang DOS port when the forms_based option menu is + accepted - DK +1998-09-28 (2.8.1pre.4) +* tentative fix for HPUX sed problems (reported by jones.peter@uqam.ca) - TD +* update lynx.man and lynx.hlp to reflect new command-line options - TD +* minor documentation fix - LP +* miscellaneous fixes for build on VMS (reported by Tony Bolton) - TD +* tweak 'const' assignment for VMS (in LYReadCFG.c and LYPrint.c) - LP +* clarify discussion of download in Lynx user's guide (Al Gilman). +* trim trailing newline from lines read from cookie file so that Lynx does + not send embedded newlines in the cookie list - BJP +1998-09-27 (2.8.1pre.3) +* fix a place in cookie_add{accept,reject}list() where cookies would be deleted + from memory if a persistent cookie had the same domain as an entry in + COOKIE_{ACCEPT,REJECT}_DOMAINS - BJP +* move Lynx's writing of persistent cookies to COOKIE_FILE from happening when + you enter the Cookie Jar page to quit time, before cleaning up temporary + files - BJP +* Lynx_user_guide.html: add text about lynx.cfg - LP +* forms-options: options names moved 2 columns to the right (is it good?) - LP +* fix reading .lynxrc "character_set" (trim trailing spaces in fullname) - LP +* fix ReadProgress message for LYshow_kb_rate (while <1024 bytes received + we showed byte-transfer rate even in KB mode), extra dot removed - LP +* DOS text files: opening text mode switch now incorporated in LYNewTxtFile/ + LYAppendToTxtFile and hope for the best - LP +1998-09-25 (2.8.1pre.2) +* fixed forms submission charset: was broken by me in dev26 (HText_SubmitForm() + in GridText.c) - LP +* documentation updates for verbose images - LP +* minor fix for trace message in TrimHightext() -LP +* add compatibility with 2.8/2.7.2 lynx.cfg and (especially) .lynxrc - old + "character_set" parameter now acceptable - LP +* add OUTGOING_MAIL_CHARSET symbol to lynx.cfg to make mail more recognizable + by remote recipient, it may be "US-ASCII" for 7 bit approximation as the + safest case or any other value. If blank, use display character set + (default, compatibility). Currently implemented only for "subject" in + "print-to-email" - LP +* fix SGML.c so invalid characters are not dispalayed in hex UHHHH but just + omitted as already done for plain/text mode - LP +* fix download' suggested file name (8bit) - LP +* correct logic error in "Change Location" command, and allow "~" there in + addition to the existing "~/" prefix (reported by Ismael Cordeiro) - TD +* ifdef'd out "don't replace '\n' with ' ' if Chinese or Japanese" from dev.23, + with symbol EXP_JAPANESE_SPACES, FIX_JAPANESE_SPACES based on discussion with + HN, LP - TD +* correct missing '\' in generated sed-script for "make install-help" rule, + which changed a couple of "/html" substrings to ".html" (reported by BL) - TD +* modify cfg_defs.sh script to handle empty token in config.cache, e.g., a line + such as "foo=${foo=}" (reported by Philip Chong ) - TD +* modify so that lynx_cfg_infopage() and lynx_compile_opts() pages are not + invoked when Lynx is running -anonymous - TD +1998-09-22 (2.8.1pre.1) +* correct logic error in parse_restrictions() which caused infinite loop, + probably from changes in dev.8 (reported by HN) - TD +* add SHOW_KB_RATE symbol to lynx.cfg to allow user to control whether + HTReadProgress should show KB/sec or bytes/sec - TD +* modify HTReadProgress to allow user to display KB/sec or bytes/sec - BL +* add/use new function LYstyles(), to force initialization of styles[] array + when it is used outside HTML.c; fixes a problem with Lynx not using styles + for files listed on the command line - TD +* correct keymap strings for F1 and DO_KEY - TD +* add keymap table entries for F1, to accommodate slang which appears to ignore + terminal description when keymaps are defined - TD +1998-09-20 (2.8.1dev.29) +* add checks/warnings for user agent string in forms-options menu - TD +* change render_item to force a '/' before substituted path or directory + strings if (as in OS/2 EMX) absolute filenames do not normally begin with a + '/' -TD +* modify HTnameOfFile_WWW() to interpret an empty acc_method as a local file, + allowing its use in permit_location(), making OS/2 EMX dired-mode change + permissions work - TD +* make download and print menus a little more compact in intermediate/advanced + user modes - TD +* correct filename shown in download menu - LP +* change behavior of configure --enable-forms-options switch. By default, both + old and new options menu are available via a command-line toggle + "-forms_options" or lynx.cfg statement "FORMS_OPTIONS:TRUE/FALSE". Configure + --enable-forms-options now _disables_ old-style code, which is + ifdef'ed with "#ifndef EXP_FORMS_OPTIONS" - LP +* add more pointer-checks in GridText.c so that "lynx LYNXDOWNLOAD://" does + not crash (reported by Wilson Cheung) - TD +* add special case to handle NNTPSERVER environment variable, which had been + lowercased as part of LYReadCFG.c cleanup (reported by Wilson Cheung + ) - TD +* modify info-page to add link to new internal page showing the noncomment + lines from lynx.cfg - LP, TD +* use function wwwName to reduce clutter - LP +* create "lynx.cfg Information" page, comments skipped, "include" OK. + The link is available from '='InfoPage and 'O'ptions menu. + Since DJGPP/Win32 binary have no built-in absolute path for distributions + lynx.cfg those ports will look for a copy of lynx.cfg in lynx_help/ + for most advanced info/comments (if you made http:// depository for lynx help + please care of it) - LP +* tweak helpfilepath URL (for DOSPATH only) - LP +* some cleanup of cp852, cp850, cp775 - LP +1998-09-17 (2.8.1dev.28) +* minor fix to make PRCS ProjectDate print in "dd mmm yyyy" form - TD +1998-09-17 (2.8.1dev.27) +* minor fixes for recent (dev24 and dev25) chartrans changes - LP +* add LYNX_DATE definitions in userdefs.h; Info Page now shows the date of your + lynx along with version number and a link to the latest sources. - LP +* use ECHO_CC symbol in install-help rule to control whether the sed commands + are echoed - TD +* corrected install-help rule to avoid getting compress-suffix repeated in + the generated/updated files - TD +* documentation nit for COLLAPSE_BR_TAGS (Michael Warner) +* use getsockname_s rather than getsockname for djgpp (from patch by Gisle + Vanem) - DK +* add .bz2 suffix to lynx.cfg and HTInit.c, for bzip2 utility - DK +* modify store_cookie to suppress warning message for invalid domain if Lynx is + setup to accept all cookies - LV +* modify/expand LYLocalFileToURL() function, getting rid of most places where + inline concatenation is used for "file://localhost/", as well + as eliminating a number of static buffers - TD +* move fallback definitions for POSIX S_ISLNK, etc., out of NeXT ifdef's, to + make this compile on Apollo (reported by David Eaton) - TD +* restructured pathname-tests in LYLocal.c, using common utility functions + ok_stat, ok_lstat, ok_file_or_dir to simplify freeing pointer allocated + by HTfullURL_toFile - TD +* modify HTLocalName, making it a macro around a more flexible function + HTnameOfFile_WWW, to reuse logic for stripping off "file://localhost" and + "file:" prefixes, fixing some places where a spurious '/' would be left in + EMX local filenames (other macros: HTfullURL_toFile, HTpartURL_toFile) - TD +* modify configure script macro CF_PATH_PROGS for OS/2 EMX, so that compiled-in + utility pathnames work - TD +* use HTDOS.c module for OS/2 EMX, since it has similar device syntax - TD +* correct logic for wrapping long lines, to not use the rightmost column of the + screen, fixes a problem with duplicated character (reported by LP) - TD +* correct logic for dumping screen to file, so that blank lines are retained, + not counted in the logic for pruning soft-newlines which supports wrapped + lines - TD +* add info and user messages to traces - TD +1998-09-12 (2.8.1dev.26) +* change behavior of NSL_FORK and related I/O (patch by BL) + - Make URL guessing (www.huh.com? www.huh.org? www.huh.net?) interruptible. + - Make URL guessing from the command line interruptible. + - Use select() instead of FIONREAD. This makes it work on OSes where + previously it only *looked* like it was working. + - select() on stdin as well as the child pipe, when using [n]curses (not + SLANG). This allows interrupt to be processed instantly, without + up-to-1-second delay. + - While looping, 1 second at a time, bail out after "too many" (currently 50) + loops: just in case something weird happens, like select() returning some + unexpected error that we ignore. + - Make sure child processes are always killed and reaped. + - Close pipe ends as soon as possible. + - Now write the length down the pipe (using a known-to-the-program length of + sizeof(int)) first -- this both helps workaround old CMU TCP bugs and the + fact that select() doesn't let us get number of bytes ready, like FIONREAD + does. +* change default for NO_ANONYMOUS_EMAIL to TRUE (patch by HN) +* use url for "W3C HTML Validation Service" rather than "A Kinder, Gentler HTML + Validator" +* update url for HTML Quick Reference Guide (report by LE) - TE +* modify verbose images to show ISMAPs and USEMAPs (patch by LE). +* fix typos in AttrList.h, LYStrings.h (reported by LV & HN) - TD +* Chartrans recovery and cleanup: by introducing an invariant + "current_char_set and UCLYhndl_for_unspec always valid charsets" we solve + possible problems with invalid/undeclared charsets. Use + 'safeUCGetLYhndl_byMIME()' for reading charset information from + lynx.cfg/userdefs.h/command line switches to recover possible typos by + fallback to ISO-8859-1; If UCLYhndl_for_unrec or UCLYhndl_HTFile_for_unspec + not set explicitely - now fallback to UCLYhndl_for_unspec (was before, but + not clear in certain places). Add comments to UCMap.h, add comments on + chartrans initialization in LYMain.c. UCAssume_localMIMEcharset and + UCAssume_unrecMIMEcharset now removed (UCLYhandl_* do all the stuff). - LP +* LYCharSets.c: LYRawMode code simplified and comments added. It was realized + that UCAssume_MIMEcharset may differ from its handler as LYRawMode history. + Also: HTMLSetRawModeDefault() moved into HTMLUseCharacterSet() to reduce + clutter, declare HTMLSetCJKCharacterSet() as PRIVATE. - LP +* more "big5" bugs fixed (in HTMIME.c and HTFile.c); function Set_HTCJK() added + to LYCharSets.c - LP +* LYCharUtils.c: META charset code corrected against 2.7.2, obsolete code + removed - LP +* partial mode now repaint the screen in one stage with a complete display + ('display_lines' received, fix in HTPartialDisplay()). Incremental rendering + of the first page may be annoying on slow connection (reported by Nelson + Henry Eric ) - LP +* temp fix for HText_trimHightext side effect from partial mode by introducing + a flag in HText_beginInput(), so this side effect still only happens for long + documents with forms input mixed with normal href= link. - LP +* print menu: fixed document URL near the top (was temp file name) - LP +* forms-options menu: fixed screen size in Novice mode - LP +* limit length of strings copied via tok_values[] in LYCookie.c - TD +* clean up a few memory leaks in cookie_add_acceptlist() and + cookie_add_rejectlist() in LYCookie.c. These were leaking 4 bytes for each + entry in COOKIE_ACCEPT_DOMAINS - BJP +* fix to LYLoadCookies() which was causing duplicate invalid cookies to be + loaded - BJP +* split out install-doc rule in top-level makefile to install extra + documentation files in $(libdir)/lynx_doc (request by HN) - TD +* improved algorithm to set 'secure_value', used in forms-options to circumvent + spoofing (based on comments from Mike Castle) - TD +* integrate WB's mouse changes (see 1997-04-24) for page-up/down into the Unix + flavors of mouse support (e.g., ncurses and slang) - TD +* use ncurses define_key to implement lynx-keymaps (see dev.10) - TD +* modify slang keymap code to work with slang 0.99-38 - TD +* replace several ifdef'd pathname constructions to use LYAddPathToHome() - TD +* make keymaps file consistently named on Unix and VMS - TD +* remove redundant "Lynx" from internal-page titles (suggested by LP) - TD +* remove install-log makefile target, generate cfg_defs.h file directly from + lynx_cfg.h and config.cache, to compile-in the configuration-definitions + rather than rely on external file lynx_site.txt - TD +1998-09-06 (2.8.1dev.25) +* corrected compiled-in path for lynx_site.txt - TD +* implement logic for exec-links in forms-options page - TD +* add configure options --enable-exec-links and --enable-exec-scripts - TD +* correct logic for show-color in forms-options page (reported by DK) - TD. +* implement logic to set $DISPLAY in forms-options page - TD +* add/use functions LYsetXDisplay() and LYgetXDisplay() to reduce clutter - TD +* retain help-link on internal pages only for those where the pages would be + pushed onto the history stack, and only in novice mode - TD +* absorb LYSystem.h into LYUtils.h, adding LYSystem() and LYSysShell functions + to LYUtils.c to hide djgpp clutter - TD +* limit strings passed to mailer in LYMail.c to 7-bit ASCII, converting other + characters to '?'. This guards against trash on the end of the mailing + address in a mailto link (from Duncan Simpson ). +* add fallback definitions for S_xxx macros to tcp.h (from report + by Francisco A Tomei Torres that OpenStep 4.0 + lacks definition for S_IWOTH) - TD +* modify quote_pathname() so that for DJGPP it does not put single-quotes + around the result - DK +* correct a missing assignment to turn bold off in split_line (GridText.c) - LE +* Fixed: forms input in display_partial mode! Previously hightext was printed + at wrong positions while loading was in process (try -debug_partial to see + the bug). Fix made in HText_pageDisplay: we call HText_trimHightext() which + was the main part of HText_endAppend() before. Seems no more problems + reported from incremental rendering mode! - LP +* set PARTIAL mode ON by default, unless it disabled in lynx.cfg or by + configure --disable-partial option - LP +* restore temporary -debug_partial switch, broken in dev.23. - LP +* made trace in HText_appendCharacter() a little more readable + for lynx special characters - LP +* chartrans: human-readable character set names in Options Menu now changed + according to Netscape 4.x style - "language (MIMEname)", it looks more useful + and reduce chaos in people's heads. Documentation corrected + (option_help.html/Lynx_User_guide.html). Minor tip: "Central and Eastern + European" was truncated to "Eastern European" because of space limitation in + popup menu. (Changes in chrtrans/*.tbl, LYCharSets.c, also docs including + userdefs.h/lynx.cfg). Since names were changed, users on display other than + iso-8859-1 should go to options menu and resave .lynxrc (and probably correct + lynx.cfg - character_set now uses MIME notation in sync with other charset + settings, although complete name string is still acceptable for this field). + - LP +* an attempt made to tweak the code replacing lynx internal 'main' charset '0' + (iso-8859-1 in fact) with its MIME name. - LP +* rename ifdef EXP_8BIT_TOUPPER in favor of lynx.cfg switch FORCE_8BIT_TOUPPER + - LP +* remove a lot of "(char **)" casts from HTML.c which obscured some type + mismatches - TD +* add/use functions LYIsHtmlSep, LYAddHtmlSep, LYTrimHtmlSep, LYIsPathSep, + LYAddPathSep, LYTrimPathSep to reduce clutter - TD +* fix a bug, present at least since dev.17, where lynx can't download files if + it is started from one of the root directories of a disk drive, since it is + trying to write to "c:\\file.ext", rather than "c:\file.ext" - DK +* correct a comment in userdefs.h; commercial Japanese sites are named with + co.jp, not com.jp (LV). +* correct some debug messages in LYCookie.c - BJP +* fix a missing in ShowInfo.c - SKY +* modified '+'->' ' conversion to allow Unix commands to have '+' beginning + options - TD +* sorted all option items (i.e., static variables, postoptions(), + gen_options()) according to the sections they are in - SKY +* added '+'->' ' conversion for forms-options values - SKY +* centered 'save to disk' and put a dash between 'accept' and 'reset' for + clarity - SKY +* add "-cookie_file=" commandline option to specify cookie file - BJP +* add "cookie_file=" option to .lynxrc - BJP +* add "cookie_file:" option to lynx.cfg - BJP +* change default cookie file to "Home_Dir()/cookies" (or sys$login:cookies + for VMS, which may or may not work, DOS also needs to be checked) - BJP +* add cookies switch to options menu - LP +* Security considerations and form-based options: items restricted in + gen_options() should be ALSO restricted under the same conditions in + postoptions() to prevent a limited access user to edit option's HTML code + manually and submit a restricted items. This may be not a good idea to have + two functions in sync but those functions are synchronized anyway. Please + read comments inside the functions if change something! - LP +* add new functions BeginInternalPage and EndInternalPage to reduce clutter in + code that sets up internal pages (email from LP). +* change version in makefile.in to 2-8-1 (reported by DK). +* the code in GridText that adds control characters to the current line + does not test for buffer overflow. Normally Lynx gets away with this because + it will wrap the current line as soon as the line exceeds the display width, + but if you have a file with nothing but control characters with no + displayable text in-between (a few thousand hidden links will do), then Lynx + bombs. Modified to silently ignore excess control characters as well as add + a few extra bytes when allocating the line buffer to allow for a bunch of + control characters followed by a kanji or utf-8 sequence. (patch by Dick + Wesseling ) +* remove WWW/Library/Implementation/HTInit.c, which is not used, since + src/HTInit.c has this functionality - TD +* change ID="" in Lynx_users_guide.html to ID="" to appease + weblint; tested with IE&NS - TD. +* Al's convention of '#' into '#' in Lynx_users_guide.html is + included - SKY +1998-08-31 (2.8.1dev.24) +* re-correct DH's patch for COLLAPSE_BR_TAGS (reported by LV) - TD +1998-08-29 (2.8.1dev.23) +* make interim fix for gzip'd html files until we can resolve portability + issues raised by SKY's renaming - TD +* implement LY_SOFT_NEWLINE, to mark places where wrapping is done in + HText_appendCharacter, to allow printing to join lines back together + (reported by LP) - TD +* correct missing assignment in change to HText_appendCharacter, fix a core + dump - TD +* removed SKY's change that attempted to skip help-links, since it causes a + core dump, e.g., when viewing source - TD +* use LYCloseTempFP in forms-options code and LYPrint.c where file was opened + with LYOpenTemp, to fix a core dump - TD +* All XYZ_TITLE defines of UIPs (User Interface Page) are collected in + LYMessages_en.h for multi language support - SKY +* Head and H1 of each UIP is standardized; reduced to 1 line. In this line a + context sensitive Help anchor introduced which is skipped by default; i.e., + 'd' will directly goto 'Save to Disk' not to the help anchor - SKY +* Download and Print UIPs are divided into 'Standard' and 'Local additions'. + Current and Suggested Filenames are printed on the page which was hidden on + the status line or accessed only by '=' - SKY +* Information page now has links to either development or lynx home pages + depending on LYNX_RELEASE define. Besides compile options can also be + accessed on this page: $helpdir/lynx_site.txt. A file derived from + 'config.cache'. Its corresponding makefile macro is 'install-log' - SKY +* New Form-based options page is re-organized; logical sections are introduced + and sorted alphabetically (except for 'User Mode' - SKY +* All links in the help files are marked, i.e., each + 'href="../_filename.html_#section"' is converted to + 'href="../@FILENAME@#section"'. This is useful if a help filename or + link has to be changed through out whole package. +* 'lynx_help/help_files.txt' is introduced which contains + FILENAME=_filename.html_ definitions. Format and details are given in the + file - SKY +* All help files are renamed from '.html' -> '.html_' - SKY +* For context sensitive help links in UIPs 'src/LYHelp.h' is created with all + the filenames marked like the help files. It will be included from + LYGlobal.h. In 'src/makefile.in' necessary changes are done to load the + filenames from 'lynx_help/help_files.txt' - SKY +* To be able to compress help files '--enable-gzip-help' option is added in + configure script. In 'makefile' 'install-help:' is updated. + If COMPRESS_PROG and COMPRESS_EXT are *both* left empty (default) no + compression will be carried. For the moment compression is restricted only + to 'gzip'. Necessary updates are done in configure.in - SKY +* documentation fixes for nsl-fork, print screen - PW +* don't replace '\n' with ' ' if Chinese or Japanese - HN +* use title information rather than suggested filename as a subject line when + printing a page to email - LP +* add verbose_images to old-style options menu, and the .lynxrc - LE +* add verbose_images and useragent to forms-based options menu - LP +* disable download of "mailto:" links (reported by SKY (Sinan Kaan Yerli) + ) - LP +* Change HTUserMsg to HTInfoMsg for "ALREADY_AT_BEGIN" and "ALREADY_AT_END" + messages to make it less annoying - LP +* reduce clutter in mainloop by inserting LYpop() in postoptions() - LP +* makefile.dos: split long lines - LP +* Fix bug with TAIPEI big5 charset in src/LYCharUtils.c + (this typo also found in lynx2.7.2: "big-5" instead of "big5"), + patch by Shou-Chuan Lai - LP +* Add -debug_partial command line switch so we got MessageSecs dely + between incremental rendering stages if partial display mode is ON. + (MessageSecs available from lynx.cfg and set to 2 sec by default). + The problem in incremental rendering of forms input was reported by SKY + (Sinan Kaan Yerli) ), still not fixed + but now we may enter form-based options menu in -debug_partial mode + and rerender the page with Cntrl-R to see what is happening in fact. - LP +* Serious bug fixed for DISP_PARTIAL: two asynchronous processes synchronized. + HTDisplayPartial() synchronized by flag against HText_new() which create + the new HTMainText object. Otherwise HTDisplayPartial() sometimes was + matching old HTMainText (with its own line counter) and repaint previous doc, + not a new one. TRACE log now got a message from HText_pageDisplay - LP +* fixed last chartrans changes, lines such as + #0x99 #NOTDEFINED + should not be commented with leading comment symbol because they are ignored + by makeuctbl in fact - LP +* modify DH's patch for COLLAPSE_BR_TAGS to only modify the nonstandard case, + thereby making that more restrictive, and restoring standard behavior + (reported by HN) - TD +1998-08-21 (2.8.1dev.22) +* correct test for -std1 compiler option on Digital Unix (reported by Michael + Warner) - TD +* modify treatment of COLLAPSE_BR_TAGS, so that if it is set TRUE, two or more + concurrent BRs will be collapsed into a single blank line. Note that the + valid way to insert extra blank lines in HTML is via a PRE block with only + newlines in the block (David Henderson ) +* clarification in userdefs.h - HN +* MS Windows codepages updated for EURO SIGN (0x20AC), from ftp.unicode.org -LP +* minor fix for DISP_PARTIAL, disable scrolling when HTTP request already sent + but the new document not displayed on the screen yet - LP +* ifdef DOS/WINDOWS to open lynx.trace in text mode - LP +* rearrange text in lynx.cfg concerning character_set - LP +* correct miscellaneous typos - LP +* Fixed: Verbose images now work with [IMAGE]-Submit. Also, fixed the core + dump when clickable_images is on. The problem was an oversight in + MakeNewTitle() - LE +* reviewed the INSTALLATION file as it relates to DOS and updated it for the + newly released version of PDCurses 2.3. Added the HAVE_GETBKGD define to + makefile.dos, fixes some of the unusual background color handling that was + present in the PDCurses DOS port - DK +* correct ifdef: LYOptions.c fails to build with -DEXP_FORMS_OPTIONS but + _without_ -DDIRED_SUPPORT (e.g., djgpp) - LP +* redesigned cookie_add_{accept,reject}list in LYCookie.c -- they work now -BJP +* added COOKIE_{ACCEPT,REJECT}_DOMAINS in .lynxrc handling to LYrcFile.c - BJP +* slight spacing fix in lynx.cfg - BJP +* added blurb in lynx.cfg about COOKIE_{ACCEPT,REJECT}_DOMAINS - BJP +* -accept_all_cookies on the commandline works as a toggle now (against + lynx.cfg value -- NOT against .lynxrc value) - BJP +* change HTAlert for bad partial reference to an HTUserMsg to make it less + annoying (request by Philip Webb, Jason McBrayer) +1998-08-15 (2.8.1dev.21) +* correct pathname for help file in forms-options screen - TD +* reduce clutter in LYOptions.c with SELECTED, DISABLED, NOTEMPTY macros, + PutOptValues, GetOptValues functions - TD +* modified LYOptions to include MBM support from form-based options, + by making a link href="LYNXOPTIONS://MBM_MENU" like it was in LYPrint.c and + calling edit_bookmarks() from postoptions() - LP +* add/use HTUserMsg to encapsulate most of the important messages - TD +* add/use HTInfoMsg to encapsulate most of the informational messages - TD +* make most of the alert messages use HTAlert, for consistency - TD +* exclude forms-options pages from Visited Links page - LP +* The current keymapping for the DOS Slang ports maps the keys directly to lynx + actions via keymap.c. There are several places in the code that test for + arrow keys, page up or down, home and end for special handling that depend on + the lynx definition of the keys. Hence, the keys in the DOS Slang ports were + failing the tests and not working as expected. The following patch now maps + these special keys. They can no longer be mapped individually via the KEYMAP + mechanism in lynx.cfg. Arrows should now work in GOTO fields. Tested the + patch against the binaries maade by makefile.dos, makefile.dsl, and + makefile.wsl - DK +* The wsl port seems to be working well with DISP_PARTIAL, make this the + default - DK +* correct spelling in lynx.cfg - DK +* modify HText_appendCharacter to wrap long lines when displaying HTML document + source - TD +* add configure option --enable-cgi-links - TD +* clarify discussion of no_proxy in lynx.cfg (Al Gilman). +* Multilingual bookmarks: now we store characters >127 in bookmark titles with + a more consistent and independent way, by keeping in unicode as &#UUUU + (NCR=numeric character reference). The idea belongs to Klaus Weide & Andrey + Chernov (long ago). It may be useful if we need switching display charset + frequently. This is the case when you use lynx on different platforms, e.g. + on UNIX and from remote PC, but want to keep common bookmarks file valid. + Compatibility: NCR as part of I18N and HTML4.0 specifications supported + starting with Lynx 2.7.2, Netscape 4.0 and MSIE 4.0. New option to lynx.cfg + added: NCR_IN_BOOKMARKS which is FALSE by default. - LP +* Tweak "print options menu" to exclude choises which are not available under + the certain conditions (print to the screen and lpansi on DOS/WINDOWS, print + to e-mail for local_host_only). - LP +* Forms options menu: add a link on option_help.html; synchronize + option_help.html against Lynx_User_guide.html and lynx.cfg. Rename label + "raw 8-bit or CJK Mode" with "CJK Mode" for CJK people and "raw 8-bit" for + others. Cleanup postoptions() by introducing flags. - LP +* Force HTuncache_current_document if gen_options() invoked. This is a + dirty fix until we uncache previous document only when necessary. - LP +* Add time/date in addition to X-URL and BASE (PrependBaseToSource), (request + by Hans-Joachim Gurt ) - LP +* Turn partial_display off if we are not interactive (reported by Ari Moisio + ) - LP +* more fixes/refinements for auto-configuring socks5 on AIX (report by Brian + Hauber) - TD +1998-08-06 (2.8.1dev.20) +* rename eat_all_cookies to accept_all_cookies everywhere - BJP +* added ACCEPT_ALL_COOKIES lines to the dist lynx.cfg with the appropriate + description - BJP +* added COOKIE_ACCEPT_DOMAINS and COOKIE_REJECT_DOMAINS to lynx.cfg. These are + comma delimited lists of the domains to handle - BJP +* added cookie_add_acceptlist and cookie_add_rejectlist to LYCookie.c, which + are passed the list of domains from lynx.cfg and add them to the global + cookie list. These may be subject to change, as I might not be handling the + LYstrsep() right -- it works with dev19's LYstrsep(), but hasn't been tested + with Bela's... - BJP +* added a big ugly ifdef'd out section to LYrcFile.c with what I have so far on + the .lynxrc handling of COOKIE_{ACCEPT,REJECT}_DOMAINS. Don't use it. Makes + nasty segfaults - BJP (Brian J Pardy) +* fix a bug where the DJGPP_KEYHANDLER version doesn't allow movement by arrow + keys within a text area. Undo previous patch to LYGetFile.c, with LYgetch + now changed where it is defined in LYStrings.c, rather than at each place + where it is used. The patch in LYStrings.c regarding Windows should fix the + problem with keymapping that occurred when we got rid of RAWDOSKEYHACK - DK +* turn on DISP_PARTIAL in makefile.dos - DK +* correct typo in LYOptions.c - BL +* corrected logic of LYstrsep - BL +* Few minor typos and forgotten notes in man/hlp/cfg files; also quote Bela's + note on lynx.cfg INCLUDE facility - LP +* correct typos in makefile.wsl, makefile.dsl - LP +* correct typos, fix character set problems in recent changes of LYOptions.c + - LP +* move include for socks.h past tcp.h, to allow for redefinition of some + symbols on AIX (report by Brian Hauber) - TD +* adjust headers so that each can be compiled separately, eliminating order + dependencies - TD +* include tcp.h always from within HTUtils.h, to enforce ordering of headers + needed for socks5 definitions - TD +* use S_ISREG, S_ISDIR macros to reduce clutter - TD +* make test for OpenHiddenFile to overwrite user's file more stringent by + ensuring that the given pathname is not a link from a world-writable + directory (reported by BL, with suggested patch) - TD +* add/use LYPathLeaf() function to reduce clutter of pathname-leaf parsing - TD +* eliminate redundant definition of 'FREE() - TD +* ifdef'd LYOptions.c to reduce unneeded code wrt --enable-forms-options - TD +* check in OpenHiddenFile to ensure that we overwrite only regular files, + since we also force the file's permissions to 0600 - TD +1998-07-31 (2.8.1dev.19) +* modify OpenHiddenFile so that it can overwrite files owned by the real + user if the O_EXCL open fails because the file already exists - TD +* add experimental forms-based options screen (patch by Mike Castle), ifdef'd + with EXP_FORMS_OPTIONS and configured with --enable-forms-options. +* add option -eat_all_cookies and corresponding config variable + EAT_ALL_COOKIES (Brian J Pardy ). +* correct spurious 'Content' string versus newline after X-URL in LYMail.c + (Bela Lubkin and LV). +* updated versions of config.guess and config.sub based on automake 1.3 - TD +* updated experimental persistent-cookie support based on RP's patch: Replaced + the call to strsep with a home-rolled one for those people who don't have it. + (Reported by Bela Lubkin, Mon, 27 Jul 1998 16:51:14 -0700 on the mailing + list.) Bela's modification to make some character arrays static is also + included. +* nits/spelling in LYPrint.c, LYUtils.c (reported by Mike Castle). +* changed LYGetFile.c to build lynx2.8.1dev.18 with SLANG and the + DJGPP_KEYHANDLER for DOS - DK +* fix a couple of places where the return-value of calloc was not checked + (reported by Mike Castle ) - TD +* correct typo in command-line parsing of -lss option (reported by Chris + Kottaridis ) +* define _AIX if needed for socks5 (request by Brian Hauber) - TD +* improved configure test for getgroups array type - TD +1998-07-24 (2.8.1dev.18) +* improved test for socks5, to account for special cases on AIX (reported by + Brian Hauber) - TD +* several changes to reduce the number of gcc cast-qual warnings, by adding + CONST, removing casts - TD +* add configure option --enable-syslog to enable system logging of requested + URL's - TD +* add RP's experimental persistent-cookie support, and configure option + --enable-persistent-cookies, ifdef'd with EXP_PERSISTENT_COOKIES - TD +* removed references to DOSRAWKEYHACK, which is no longer used. Modified the + dos makefile for libwww and makefile.dsl to default to using display_partial. + Modified INSTALLATION to reflect the successful use of slang with the dos + port and the now confusing alternatives when compiling the dos port, along + with some other updates - DK +* modify lynx_enable_mouse() for pdcurses configuration so that mouse support + is disabled unless -use_mouse is specified. This is ifdef'd with + __BORLANDC__ for the time being (WB). +* resync build-slang.com, against build.com - TD +* add $(MMSQUALIFIERS) to top-level descrip.mms, e.g., to use options such as + /FROM, /IGNORE, /NOACTION, etc., and $(INCLUDES) definitions to lower-level + descrip.mms files. Improve error-recovery in build.com (patches by Liam + Davis ) +* use memset to clear soc_in fields before doing a connect, needed for BSD/OS + (patch by Jeffrey C Honig ). +* remove spurious sprintf params when using FIXED_RECORD_COMMAND_MASK which has + only one parameter, change VMSsignal from void* to void (report by Mike Xun + Ma ) - TD +* use open(O_CREAT|O_EXCL) to open new hidden files - TD +* eliminate_*putenv_cmd variables used by LYReadCFG.c as placeholders for + putenv calls - TD +* disable include of for VMS, from report by Chris Doran) - TD +* fixes for VMS: mismatched curly brace, etc., from CTRACE and buffer-overflow + changes (reported by chris.doran@gblis.mail.abb.com) - TD +* correct a loop in HTML_start_element that strips 7 leading characters from + an href, fixes a core-dump in traversing ".." to "/" - TD +* use new macro SetOutputMode to reduce some clutter - TD +* modify interface of LYCachedTemp so fileCache member is reset to null, fixes + bug in my recent cleanup of temp-files, which caused a core-dump - TD +* add kb/sec rate to HTReadProgress message - TD +* modify computation in HTReadProgress to interpolate rate - LP +* One more fix for DISP_PARTIAL: to avoid blinking while reloading document + with Newline_partial > 1 (say, we press '*' and noproxy) we repaint the page + only when Newline_partial <= HText_getNumOfLines(). - LP +* add "-verbose" command-line switch. - LP +* DOS fix: open stdout in TEXT mode for -help and startup error message. - LP +* correct use of $mapname variable in CF_ALT_CHAR_SET (Tomas Vanhala) +1998-06-25 (2.8.1dev.17) +* add configure option --with-socks5 (request by Brian Hauber + ) - TD +* define symbols HAVE_CURSESX_H, HAVE_JCURSES_H (report by Georg Schwarz + ) - TD +* modify logic that reports progress of download to update screen no more than + once per second, fix an overrun problem (reported by Jacob Poon + ) - TD +1998-06-11 (2.8.1dev.16) +* modify configure script to check for special compiler options which are + assumed for particular platforms (suggested by BL) - TD +* modify display_page in GridText.c so that TRACE does not cause a repaint, + since that causes colors to be incorrectly rendered when tracing - TD +* fix a few of the signed/unsigned mismatch warnings in GridText.c - TD +* correct pathname in LYOpenScratch call for bookmarks (reported by DK) - TD +* DISP_PARTIAL: fix initialization of newdoc.line (case LYK_DOWNLOAD, + mainloop) to correct display while 'd'ownloading files (it was initialized + _after_ the download completed and was good enough without display_partial + mode). - LP +* correct some ifdef's for DISP_PARTIAL - LP +1998-06-04 (2.8.1dev.14) +* minor formatting fixes and documentation for upload screen - LP +* remove config.cache at beginning of configure script - TD +* eliminate cast for GetChar in LYStrings.c (from bug report by Michael Warner, + analysis by BL) - TD +* shorten logs from WWW/* by disabling echo of compiler options as in src/* -TD +* add configure test for types pid_t and uid_t - TD +* add configure test for array type used in getgroups call, to distinguish + between BSD and POSIX variations which use different sizes - TD +* modify configure script to compile DISP_PARTIAL code by default - TD +* fix compiler warnings dealing with unreached statements - TD +* change 'keymap[] array to unsigned char, move logic that relies on its size + into LYKeymap.c - TD +* make LYOpenScratch() work properly for 8.3 names (reported by DK) - TD +* DISP_PARTIAL: introduce separate variables Newline_partial and + NumOfLines_partial, initialize them in mainloop and synchronize with Newline + later when the reload completes (case NORMAL). To reduce the CPU usage while + downloading, call HText_pageDisplay only if NumOfLines_partial is in the + current display page or any Scroll key pressed by the user. We disable + partial_display if requested URL have #fragment, otherwise user will see the + top page first (yes, s/he will be moved to #fragment when the download + completed, but only if no scroll keys were pressed before!). Processing of + "END" key changed from MAXINT to real number of lines in the document + (important for display_partial mode) - LP. +* correct problem that caused DGJPP version built with slang 1.2.2 to lose its + socket whenever the rendering of a http URL is interrupted with "z". This is + in HTCheckForInterrupt in LYUtils.c (reported by John Lewis) - DK +* add files pdcurses.key, slang.key, djgpp.key to document the keybindings + used for DJGPP version - DK +* allow mapping of ALT and Function keys with the DOS port for both the + PDCurses version and the SLANG version with the DJGPP keyhandler. The + extended keys to be mapped have to be specified numerically according to the + definitions in curses.h (for PDCurses) or in keys.h (for SLANG with DJGPP + keyhandler). DJGPP maps keys up to 0x293, while PDCurses maps keys up to + 0x1c0 - DK +* don't try to use -std1 option for gcc on Digital Unix (reported by Michael + Warner ) - TD +1998-05-23 (2.8.1dev.13) +* use new function LYLocalFileToUrl to cleanup some pathname references - TD +* eliminate 'tempname()' function, using LYNewTxtFile, etc., with new functions + LYOpenTemp, LYCloseTemp, etc., so that temporary files are opened with + appropriate permissions - TD +* correct use of cache variable in CF_ALT_CHAR_SET (reported by BL) - TD +* spell out the logic in HTPlain.c against 2.7.2: there was a certain problem + with chartrans in text/plain mode (LYRawMode was wrongly interferring, + problem reported by Jacob Poon & FM). - LP +* modify logic for zero-width spaces in conv_uni_to_pc to exclude 0x200a - LP +* supply missing "break", which was forcing raw utf-8 output in URLs (NOT hex + escaped) - LP +1998-05-14 (2.8.1dev.12) +* remove unneeded definition used in testing dev.11 from config.hin) - TD +1998-05-14 (2.8.1dev.11) +* fixes for function-keys with slang configuration on DOS (patch by DK). +* correct missing '&' in command-line options entry for syslog (reported by + HN) - TD +* correct initial value for NoColorvideo with PDCurses, from my error in + 1998-05-10 integration (reported by DK) - TD +1998-05-10 (2.8.1dev.10) +* eliminate assignment to stderr for trace-file by making tfp a function. - TD +* added John Davis' keymaps/keysym patch (it really should be integrated with + the normal lynx.cfg file). +* tweak chartrans, "Convert the octet to Unicode": incoming symbols >127 but < + LYlowest_eightbit[IN-charset] now ignored, previously displayed as UFFFD. + (SGML.c, HTPlain.c, LYCharUtils.c) - LP +* removed conflicting/unused declaration of 'bzero()' from tcp.h (from report + by Ashraf Zorkani ) - TD +* modify the set/unset/toggle options to allow "on" and "off" values also - TD +* apply the "partial display" patch, modified from: + http://www.flora.org/lynx-dev/html/month0398/msg00993.html + The behavior is controlled by a compile-time option (DISP_PARTIAL), by a + command-line argument (-partial), and by a lynx.cfg option (PARTIAL). - BL +* extend command-line option processing of set/unset/toggle options + -toggle- (set that toggle to FALSE) + -toggle+ (set that toggle to TRUE) + e.g., + lynx -show_cursor+ -case- + or with explicit 1/0 values, e.g., + -toggle=0 (set that toggle to FALSE) + -toggle=1 (set that toggle to TRUE) + NOTE: this allows you to change a few flags that would previously have been + controlled by lynx.cfg, and are security-related, such as -locexec or + -telnet. I believe there is no issue, because if the user can control the + command line to Lynx, he could have run `lynx -cfg my_cfg_file` and + circumvented those settings anyway. - BL +* fix for buffer-overrun in LYMail.c when processing a mailto:very-long-address + URL - BL +* correct, for OS/2 EMX, a place in LYConvertToURL() which must not use + HTDOS_wwwName() (patch by Jason F McBrayer ) +* similar changes to LYCurses.c, LYMain.c, LYStrings.c, add src/makefile.wsl, + for building DOS version with slang - Bill Schiavo +* modify LYCurses.c, LYMain.c, LYStrings.c, add src/makefile.dsl, for building + DOS version with slang - DK +* fix to improve reloading if user changed assume_charset in options menu + using ^A, which sometimes did not work - LP +* add several chartrans-related files to test/ directory: spaces.html, + c1.html, raw8bit.html - LP +* fixes to compile on SunOS with K&R compiler. - TD +1998-05-03 (2.8.1dev.9) +* correct missing counter increment in tempname(), from cleanup. - TD +1998-05-02 (2.8.1dev.8) +* Fix for CGI-related URLs processing (syntax: ?x=1&yz=2). To avoid interfere + with SGML we restrict '=' as terminator for a named entity, this only applied + for HREF= attribute translation (LYCharUtils.c). (reported by Alex Matulich + alex@unicorn.us.com & FM). - LP +* restore information in the INSTALLATION file for the DOS port on patching + tcplib. Also, clarifies the location of nullpkt. It also clarifies + that the PDCurses beta has incorporated some of the patches we made for + the lynx DOS port. - DK +* modify logic that updates bookmark file after removing a link to use copy + rather than rename, to solve file-ownership problems (patch by Paul + Gilmartin, though I kept the permissions check). - TD +* reduce a little of the clutter in tempname() with fmt_tempname, and + bad_tempname functions. Though this doesn't address the security problems it + does fix the problem with signed getpid values. - TD +* simplify LYUtils.c with compare_type() function - TD +* add/use string functions LYLowerCase, LYUpperCase, LYRemoveBlanks (replaces + collapse_spaces), LYTrimLeading, LYTrimTrailing (incidentally fixes core-dump + in LYCookie.c) - TD +* rewrite read_cfg function to make it more table-driven (reworked from a + patch by John Davis) - TD +* rewrite parse_arg function to make it more table-driven (reworked from a + patch by John Davis) - TD +* omit -Olimit compiler option on Digital UNIX 4.0 (patch by Tomas Vanhala). +* modify configure test for acs_map[] array to work on Digital UNIX 4.0 + (reported by Jim Spath and Tomas Vanhala ). - TD +1998-04-23 (2.8.1dev.7) +* fix core-dump when pressing '.' on a page with no links (patch by + Jan Hlav\'{a}\v{c}ek ). +* initial changes to use macros CTRACE and tfp to replace explicit use of + stderr for the trace log. Remaining work is required for some complex + expressions, switching file pointers and for perror-substitute. - TD +* ifdef's for OS/2 EMX, mostly pathname tweaks (patch by Jason F. McBrayer + ). +1998-04-18 (2.8.1dev.6) +* correct misplaced ifdef in LYMail.c, which caused Cc to not work (patch + by LE). +* convert \x escapes to octal form (reported by Claude Soma). - TD +* modify configure script to check for cursesX before curses library, for + ultrix 4.3 (reported by Claude Soma ). - TD +* incorporate lpansi into LYPrint.c (patch by HN). +* modify top-level makefile to use INSTALL_PROGRAM and INSTALL_DATA + consistently, rather than installbin and installdoc (reported by + ). - TD +* modify treatment of -auth and -pauth options to allow setting a blank + password, e.g., -pauth=user: specifies a blank password, and -pauth=user + leaves the password unspecified (patch by Frederick P Herrmann + ). +* Change documentation to indicate "Lynx.trace" file rather than "lynx.trace". +* Change default for USE_TRACE_LOG in userdefs.h to TRUE, to make behavior + consistent with 2.7.2 - TD +* Rename no_color_video symbol in LYCurses.c to NoColorVideo, to avoid conflict + with term.h, which is included by curses.h on some systems (reported by Paul + Gilmartin). - TD +* modify include-path in djgpp makefile to avoid conflicting tcp.h - DK +* Add -tagsoup option, for initializing parser directly to TagSoup. - TD +* Modify HTML.c, ifdef'ing some of the logic involved in unstacking tags. It + appears to be not completely necessary: makes Lynx a little faster, at the + cost of making the tagsoup parser do the wrong thing. Some entries in the + tagsoup DTD table versus the sortasgml table have SGML_EMPTY versus + SGML_MIXED. This information is used to control unstacking (in the + color-style configuration as well). There is still a problem evidenced + when toggling between the two parsers in the Lynx main help page, but that + appears to be missing logic in 2.8's version of the tagsoup parser. - TD +* Modify HTTCP.c to check the length returned from gethostbyname(), which + returns 0 on error on a SunOS 4 system (reported by Paul Gilmartin). - TD +1998-03-29 (2.8.1dev.5) +* Fixed my typo for FNAMES_8_3 define. WB +* Added SYSTEM_MAIL and SYSTEM_MAIL_FLAGS defines for DOSPATH target. WB +* Better kluge to set terminal type for DOSPATH. WB +* Restored DOSPATH kludge to get to root of directory. WB +* Added a bit of missing _WINDOWS_NSL ifdef'ing. WB +* Minor DOS dirent mod to work with Tom's rearrangements. WB +* Changed #if XYZ to #ifdef XYZ in tcp.h for dumb (?) compilers. WB +1998-03-25 (2.8.1dev.4) +* restore original string in LYUtils.c when user enters a badly formed or + nonexistent URL when prompted for Goto/history list (patch by Randall + ). Otherwise Lynx would always attempt to load a + local file if the original string omits scheme:// prefix but guessing fails. +* tweak formatting of .message in HTFTP.c so it has leading/trailing blank + lines (patch by Ismael Cordeiro ) +* retested 'make depend' rule (for LV (Larry Virden)) - TD +* eliminate (except for absolute pathnames, as in VMS) quoted includes - TD +* remove WWW/Library/Implementation/HTAlert.[ch], since they conflict with + src/HTAlert.[ch], and are not used - TD +* replace the [LINK], [INLINE] and [IMAGE] comments (for images without ALT) + with filenames of these images. This feature can be enabled or disabled by + setting VERBOSE_IMAGES in lynx.cfg and/or userdefs.h (patches by + helen@voland.cc.huji.ac.il and wschiavo@concentric.net>) +* consistently use ${cf_cv_ncurses_header-curses.h} rather than + $cf_cv_ncurses_header in configure script, as noted by JS - TD +* tweak include of HTML.h in HTFile.h to fix compile problem on VMS (we really + should not use quote-style includes) - TD +* fixes to LYStyle.c to make color-style code work on Digital Unix 4.0 - TD +1998-03-20 (2.8.1dev.3) +* Added death for Win/DOS clients that don't have a TMP space defined. - WB +* Added _WINDOWS_NSL to provide interruptable lookups in Win32 per a + patch from afn06760@afn.org. (modified hopefully for borland AND cygwin and + hard defined in tcp.h). I had to recompile everything in multithread + mode for borland, including my zlib library. - WB +* Added _WINDOWS as a target for FNAMES_8_3 in userdefs.h to allow for 16 + bit helper apps that can't handle LFN's. (report by afn06760@afn.org) - WB +1998-03-18 (2.8.1dev.1) +* correct an ifdef that caused inconsistent pathname separators on Windows + (reported by afn, patch by DK). +* correct a missing AC_MSG_RESULT in configure.in (also MM) - TD +* guard against illegal (e.g., zero) value for DEFAULT_CACHE_SIZE, when it is + read from lynx.cfg (reported by Martin Mokrejs + ) - TD +* implement simple 'include' facility for lynx.cfg - BL +* change TagClass and TagFlags to #define's to accommodate older compilers + which do not accept initialization of enums from data that do not correspond + to the declared values, e.g., CLIX (which complains) and Apollo (which fails + to compile, reported by Dave Eaton). - TD +* remove some obsolete definitions from userdefs.h, tcp.h and HTUtils.h - TD +* remove obsolete files from WWW/Library - TD +1998-03-12 +* UPPER8: a separate function HTMLSetDisplayCharsetMatchLocale() introduced + (LYCharSets.c). Locale mismatch assumed for DOS/WINDOWS display charsets. -LP diff --git a/gnu/usr.bin/lynx/COPYHEADER b/gnu/usr.bin/lynx/COPYHEADER index b441aee7bc3..01e35329b7d 100644 --- a/gnu/usr.bin/lynx/COPYHEADER +++ b/gnu/usr.bin/lynx/COPYHEADER @@ -1,6 +1,6 @@ /* Copyright (C) 1995 University of Kansas. - This file is part of Lynx, a text-based, WWW browser. + 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 diff --git a/gnu/usr.bin/lynx/INSTALLATION b/gnu/usr.bin/lynx/INSTALLATION index 61efdf8d8dd..076ae539760 100644 --- a/gnu/usr.bin/lynx/INSTALLATION +++ b/gnu/usr.bin/lynx/INSTALLATION @@ -1,87 +1,85 @@ Lynx Installation Guide -This file describes how to compile and install Lynx. A description of -Lynx can be found in the README file. Lynx has been ported to UN*X, VMS, -Win32 and 386DOS. The procedures for compiling these ports are quite -divergent, and are detailed respectively in Sections II, III, IV and V. - -First, however, you must configure Lynx for your system regardless of the -port you will be using. Follow the instructions given immediately below to -configure for your system, and then go to the respective section concerning -the port you wish to compile. General installation, problem solving, and -environment variables are covered in Sections VI and VII. +This file describes how to compile and install Lynx. A description of Lynx +can be found in the README file. Lynx has been ported to UN*X, VMS, Win32 +and 386DOS. The procedures for compiling these ports are quite divergent +and are detailed respectively in Sections II, III, IV and V. General +installation, problem solving and environment variables are covered in +Sections VI and VII. There is also a PROBLEMS file in the same directory +as INSTALLATION which contains advice for special problems people have +encountered, especially for particular machines and operating systems. + +If you still have difficulties, send an e-mail message to the Lynx-Dev mailing +list (see the README file). Try to include information about your system, +the name and version of your compiler, which curses library you are using +and the compile-time errors. Be sure to say what version and image-number +of Lynx you are trying to build (alternately the top date of the CHANGES file). + +If you don't understand what one of the defines means, try the README.defines +and *.announce files in the docs subdirectory. The docs/CHANGES* files record +the entire development history of Lynx and are an invaluable resource for +understanding how Lynx should perform. + +First, you must configure Lynx for your system regardless of the port you use. +Follow the instructions given immediately below to configure for your system, +and then go to the respective section concerning the port you wish to compile. I. General configuration instructions (all ports). -Step 1. (define compile-time variables -- See the userdefs.h file.) +Step 1. (define compile-time variables -- See the userdefs.h file.) There are a few variables that MUST be defined, or Lynx will not build. There are a few more that you will probably want to change. The variables that must be changed are marked as such in the userdefs.h file. Just edit - this file, and the changes should be straight forward. Many of the - variables in "userdefs.h" are now configurable in the lynx.cfg file, so - you may set them at run-time if you wish. If you compile using auto- - configure, you would not absolutely need to edit "userdefs.h". Check - LYMessages_en.h for tailoring the Lynx statusline prompts, messages and - warnings to the requirements of your site. The strings in LYMessages_en.h - may be translated into a language of your choice. If you rename the file, - be sure to change the definition in "userdefs.h". + this file, and the changes should be straight forward. If you compile + using autoconfigure, you can set most defines with option switches and do + not absolutely have to edit userdefs.h. Many of the variables are now + configurable in the lynx.cfg file, so you may set them at run-time if you + wish. Lynx implements Native Language Support. Read "ABOUT-NLS" if you + want to build an international version of Lynx or tailor the statusline + prompts, messages and warnings to the requirements of your site. Step 2. (define run-time variables -- See the lynx.cfg file for details.) Set up local printers, downloaders, assumed character set, key mapping, and colors in the lynx.cfg file. Please read "lynx.cfg" thoroughly as many of the features of Lynx, and how to use them, are explained. Also see the example mime.types, mailcap and jumps files in the samples - subdirectory. Lynx must be able to find the lynx.cfg file at start-up. + subdirectory. Lynx MUST be able to find the lynx.cfg file at start-up. The location of the lynx.cfg file may be compiled in with the LYNX_CFG_FILE defined in userdefs.h (or with the configure option explained in the Unix section below), specified with an environment variable, LYNX_CFG, or specified with the "-cfg" command line option. -Step 3. (You may skip this step if you only use English and are not - interested in any special characters, or if your display and local files - will all use the ISO-8859-1 "ISO Latin 1" Western European character set.) - People who will be running Lynx in an environment with different and - incompatible character sets should configure CHARACTER_SET (the Display - character set) and ASSUME_LOCAL_CHARSET to work correctly for them before - creating bookmark files et cetera. Please read "lynx.cfg" for detailed - instructions. Additional character sets and their properties may be - defined with tables in the src/chrtrans directory, see the README.* files - therein. +Step 3. (You may skip this step if you are not interested in any special + characters and any local files or WWW pages you will view all use the + ISO-8859-1 "ISO Latin 1" Western European character set.) People who + will be running Lynx in an environment with different and incompatible + character sets should configure CHARACTER_SET (the Display character set) + and ASSUME_LOCAL_CHARSET to work correctly for them before creating + bookmark files et cetera. Read "lynx.cfg" for detailed instructions. + Additional character sets and their properties may be defined with tables + in the src/chrtrans directory, see the README.* files therein. Step 4. (optional -- news for UNIX and VMS) Set NNTPSERVER in "lynx.cfg" to your site's NNTP server, or set the - environment variable externally. (See "VII. Setting environment - variables before running Lynx" for help on setting this and other - environment variables which affect Lynx.) For news posting ability - to be enabled in Lynx, in userdefs.h (and optionally in lynx.cfg) the - NEWS_POSTING symbol must be defined to TRUE. Also define LYNX_SIG_FILE - in userdefs.h or lynx.cfg so that it points to users' signature files - for appending to posted messages. - -Step 5. (optional -- UNIX only) - To add direct WAIS support, get the freeWAIS distribution from - "ftp://ftp.cnidr.org/pub/NIDR.tools/freewais", and compile it. The compile - process will create the libraries you will need, wais.a and client.a. Edit - the Makefile in the top level directory and add the library locations under - the DIRECT WAIS ACCESS heading. Edit the Makefile for the WWW Library in - "WWW/Library/Implementation/CommonMakefile" to point to the include - directory for the freewais distribution. Precompiled libraries are - available for many platforms if you don't wish to compile one yourself. + environment variable externally. For news posting ability to be enabled + in Lynx, the NEWS_POSTING symbol must be defined to TRUE in userdefs.h or + lynx.cfg. Also define LYNX_SIG_FILE in userdefs.h or lynx.cfg so that it + points to users' signature files for appending to posted messages. -Step 6. (Anonymous account -- VERY IMPORTANT!!!!! -- ) +Step 5. (Anonymous account -- VERY IMPORTANT!!!!! -- ) If you are building Lynx for your personal use only you may skip this - step. If you are setting up an anonymous account with Lynx, you are + step. If you are setting up an anonymous account with Lynx, you are STRONGLY advised to use the -anonymous command line option. If you do not use this option, users may be able to gain access to all readable files on your machine! ALSO NOTE that many implementations of telnetd allow passing of environment variables, which might be used by unscrupulous people to modify the environment in anonymous accounts. - When making Lynx and Web access publicly available via anonymous - accounts intended to run Lynx captively, be sure the wrapper uses the - -cfg switch to specify the startfile, rather than relying on the - LYNX_CFG, LYNX_CFG_FILE, or WWW_HOME variables. + When making Web access publicly available via anonymous accounts intended + to run Lynx captively, be sure the wrapper uses the -cfg and -homepage + switches to specify the configuration and start files, rather than relying + on the LYNX_CFG, LYNX_CFG_FILE, or WWW_HOME variables. II. Compile instructions -- UNIX @@ -100,12 +98,12 @@ II. Compile instructions -- UNIX NOTE: The 'configure' script generates auxiliary files "config.status" "config.cache" and "config.log". Normally you will not notice these; they are created automatically and removed by a "make distclean". - + + If you wish to rebuild Lynx with a new host, or change ANY of the parameters which are stored in config.cache, you MUST first remove the config.cache file before running configure; its options do NOT override the settings in that file. - + + The config.status file is a script which creates (or regenerates) the files created by the configure script. @@ -123,6 +121,15 @@ II. Compile instructions -- UNIX environment variables BEFORE running configure. See "1d. Environment". Use the "--with-screen=ncurses" or "--with-screen=slang" option. + Note that while lynx will build with a variety of versions of curses and + ncurses, some will be less satisfactory. Versions of ncurses before 1.9.9g + will not render color properly. Some other versions of curses do not + display color at all. Likewise, lynx may not build with old versions of + slang, e.g., before 0.99-38, because slang's interfaces change periodically. + + Note compiler/system specific problems below. See also: + http://www.clark.net/pub/dickey/ncurses/ncurses.faq.html + 1b. Platforms. Configure should work properly on any Unix-style system. It has been tested on the following platforms. @@ -134,21 +141,36 @@ II. Compile instructions -- UNIX IRIX 5.2 and 6.2 (cc & gcc w/ curses, ncurses & slang) Linux 2.0.0 (gcc 2.7.2 w/ curses, ncurses & slang) MkLinux 2.1.5 (gcc 2.7.2.1) NetBSD - OS/2 EMX 0.9b SCO (cc w/ curses) + NEXTSTEP 3.3 (gcc 2.7.2.3 w/ curses) + OS/2 EMX 0.9b (ncurses) SCO (cc w/ curses) Solaris 2.5 & 2.6 (cc & gcc w/ curses, ncurses & slang) SunOS 4.1 (cc w/ curses, gcc w/ ncurses & slang) + OS390 and BS2000. NOTE: SunOS and HP-UX come with a bundled K&R compiler, which is only useful for compiling with the bundled curses. Both ncurses and slang require a compiler that recognizes prototypes. + NOTE: Ncurses 4.2 builds/works on OS/2; however you should get at least + the post-4.2 patches from October 1998, since that supports mouse and + screen sizes other than 25x80. (ftp://ftp.clark.net/pub/dickey/ncurses/) + 1c. Options To get a list of the configure script's options, type "./configure --help". Below is an alphabetical listing of the Lynx-specific options. The actual order shown by the -help option is different. See "docs/README.defines" for information on defines for which there are no option switches. - --disable-dired (defines DIRED_SUPPORT) + --disable-alt-bindings (define EXP_ALT_BINDINGS) + Compiles-in an alternative set of line-edit bindings, in addition + to the default bindings. + + --disable-config-info (define NO_CONFIG_INFO) + Use this option to disable the browsable configuration information + (screens that show the result of the configuration script, as well + as a pointer to the lynx.cfg file). + + --disable-dired (define DIRED_SUPPORT) Use this option to disable the optional directory-editor. Lynx supports directory editing (DirEd) for local directories. @@ -208,19 +230,72 @@ II. Compile instructions -- UNIX disable extended HTML DTD logic. This should revert to old-style (2.7.1/2.7.2) behavior, but is not well-tested. + --disable-finger (define DISABLE_FINGER) + Do not compile-in code used to connect to "finger" URLs. + + --disable-ftp (define DISABLE_FTP) + Do not compile-in code used to connect to "ftp" URLs. + + --disable-forms-options (define NO_OPTION_FORMS) + Disable the forms-based options screen. (See --disable-menu-options). + Please note that a few users with broken curses may have problems with + popup forms fields. The default behaviour is to compile both forms and + menu options code with FORMS_OPTIONS switch in lynx.cfg, or + -forms_options command-line switch. + + --disable-gopher (define DISABLE_GOPHER) + Do not compile-in code used to connect to GOPHER servers. + --disable-full-paths Use this option to control whether full utility pathnames are used. By default, configure substitutes full pathnames. + --disable-included-msgs + Do not use included messages, for i18n support. If NLS support is + requested, the configure script will otherwise use the messages in the + ./po subdirectory. + --disable-long-list (prevent defining LONG_LIST) - Use this option to disable long "ls -l" directory listings. + Use this option to disable long "ls -l" directory listings (when + enabled, the actual directory style is configurable from lynx.cfg). + + --disable-menu-options (define NO_OPTION_MENU) + Disable the menu-style options screen. (See --disable-forms-options). + Please note that a few users with broken curses may have problems with + popup forms fields. The default behaviour is to compile both styles + options menu code with FORMS_OPTIONS switch in lynx.cfg, or + -forms_options command-line switch. + + --disable-news (define DISABLE_NEWS) + Do not compile-in code used to connect to NEWS servers. --disable-parent-dir-refs (define NO_PARENT_DIR_REFERENCE) Use this option to disable "Up-to" parent-links in directory listings. - --enable-8bit-toupper (define EXP_8BIT_TOUPPER) - use experimental 8-bit case-conversion, e.g., for case-insensitive - searches in non-ASCII character set. + --disable-partial (define DISP_PARTIAL) + Turn off code that lets Lynx display parts of a long page while loading + it. + + --disable-persistent-cookies (define EXP_PERSISTENT_COOKIES) + Use this option to tell configure whether to compile-in support for + saving cookies to a file, for subsequent reuse. This creates the file + specified by the 'COOKIE_FILE' option, or defaults to ".lynx_cookies" + in the home directory. (Currently there is no protection against + conflict if several lynx copies are active from the same account). + + --disable-trace (define NO_LYNX_TRACE) + Turn off code that lets you trace internal details of Lynx's operation. + We recommend that you leave this enabled, since we need this + information to diagnose problems with either Lynx or the sites to which + you connect. + + --enable-addrlist-page (define EXP_ADDRLIST_PAGE) + Compiles-in an alternative list-page, bound to 'A' rather than 'l', + which always lists URLs rather than titles. + + --enable-cgi-links (define LYNXCGI_LINKS) + Allows lynx to access a cgi script directly without the need for + a http daemon. --enable-color-style (define USE_COLOR_STYLE) Use this option to enable optional and *experimental* color style. @@ -230,9 +305,18 @@ II. Compile instructions -- UNIX Use this option to compile-in support for debugging. --enable-default-colors (define USE_DEFAULT_COLORS) - enable use of default-color background (ncurses/slang). Either + Enable use of default-color background (ncurses/slang). Either configuration supports the use of 'default' for colors even without - this option. + this option. That is, 'default' is interpreted as white (foreground) + or black (background) according to the context. When the default + colors configuration is built, the actual values for foreground and + background colors are determined by the terminal. + + --enable-exec-links (define EXEC_LINKS) + Allows lynx to execute programs by accessing a link. + + --enable-exec-scripts (define EXEC_SCRIPTS) + Allows lynx to execute programs inferred from a link. --enable-externs (define USE_EXTERNALS) Use this option to enable external application support. (See lynx.cfg.) @@ -243,18 +327,46 @@ II. Compile instructions -- UNIX --enable-font-switch (define EXP_CHARTRANS_AUTOSWITCH) Allow Lynx to automatically change the Linux console state (switch fonts) according to the current Display Character Set. (Linux console - only. *Use with discretion.* See docs/README.chartrans.) + only. *Use with discretion.* See docs/README.chartrans.) + + --enable-gzip-help + Install the lynx help files in gzip'd format [*.gz] to save space. --enable-internal-links (define DONT_TRACK_INTERNAL_LINKS) Disabled by default, this option allows tracking of internal links, a feature which could, however, compromise a secure transaction by forcing inappropriate resubmission of form content. + --enable-kbd-layout (define EXP_KEYBOARD_LAYOUT) + Disabled by default, this option allows you to use translation + tables on the input keystrokes. Current tables include + ROT13'd keyboard layout + JCUKEN Cyrillic, for AT 101-key kbd + YAWERTY Cyrillic, for DEC LK201 kbd + + --enable-libjs (define EXP_LIBJS) + Disabled by default; used for ifdef'ing JavaScript interface. + + --enable-nls + use Native Language Support (i.e., gettext). + --enable-nsl-fork (define NSL_FORK) - Use this option to allow NSL requests to be aborted at will. + Disabled by default, this allows interruption of NSL requests, + so that `z' will stop the `look-up' phase of a connection. + + --enable-prettysrc (define USE_PSRC) + Use this option to compile-in support for colorizing the source + view of HTML pages. + + --enable-source-cache (define SOURCE_CACHE) + Use this option to compile-in support for caching HTML pages locally, + in files or in memory. Configurable from lynx.cfg + + --enable-syslog (define SYSLOG_REQUESTED_URLS) + Use this option to log NSL requests via syslog(). --enable-underlines (define UNDERLINE_LINKS) - Use this option underline links rather than using boldface. + Use this option to underline links rather than using boldface. --enable-warnings Use this option to turn on GCC compiler warnings. @@ -266,6 +378,19 @@ II. Compile instructions -- UNIX support a configure script, such as MS-DOS, Win32 and VMS, you must edit userdefs.h if you wish to specify the location of lynx.cfg). + --with-catgets + use catgets functions if available. See "--enable-nls". + + --with-included-gettext + use the GNU gettext library included here (default). See + "--enable-nls". + + --with-nls-datadir=DIR + Use this option to override the configure script's NLS data directory, + under which the locale (i.e., language) files are installed. The + default value is derived at configure time, and depends on whether GNU + or native gettext is used. + --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. @@ -276,7 +401,22 @@ II. Compile instructions -- UNIX --with-screen=ncurses (define NCURSES) --with-screen=slang (define USE_SLANG) - --with-zlib (define USE_ZLIB) + --with-socks (define SOCKS) + Use this option to configure with the socks library. + + --with-socks5 (define USE_SOCKS5, SOCKS) + Use this option to configure with the socks5 library. + + If you make a SOCKSified lynx, you may have trouble 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. 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. + + --with-zlib (define USE_ZLIB) Use zlib for decompression of some gzip files. 1d. Environment variables @@ -286,7 +426,8 @@ II. Compile instructions -- UNIX values rather than computing new ones. Useful variables include: CC - the C compiler. If you do not override this, configure - will try to use gcc. + will try to use gcc. For instance, setting CC=cc and + exporting this value will cause configure to use cc instead. CFLAGS - the C compiler options. These also include C preprocessor options (such as -I), since the $CFLAGS and @@ -321,36 +462,31 @@ II. Compile instructions -- UNIX I personally use the following csh shell script to set environment variables and configure options rather than type them each time. - setenv RESOLVLIB -lbind - #!/bin/csh -f - setenv CPPFLAGS "-SYSLOG_REQUESTED_URLS -I$HOME/slang \ - -I$HOME/.usr/include" + setenv CPPFLAGS "-I$HOME/slang -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 - use the libbind.a resolver library, not libresolv.a. Setting RESOLVLIB to - -lbind defines this environment variable for `make', and thus must be set - in the same shell that `make' will be run. CPPFLAGS in this example - predefines SYSLOG_REQUESTED_URLS for the configure script, since it is not - defined by default, and has no option switch (see "docs/README.defines"). - 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 + CPPFLAGS in this example 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 (while at the same time defining LYNX_CFG_FILE) 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". +2. Wais support (optional) + To add direct WAIS support, get the freeWAIS distribution from + "ftp://ftp.cnidr.org/pub/NIDR.tools/freewais", and compile it. The compile + process will create the libraries you will need, wais.a and client.a. Edit + the Makefile in the top level directory and add the library locations under + the DIRECT WAIS ACCESS heading. Edit the Makefile for the WWW Library in + "WWW/Library/Implementation/CommonMakefile" to point to the include + directory for the freewais distribution. Precompiled libraries are + available for many platforms if you don't wish to compile one yourself. III. Compile instructions -- VMS @@ -374,7 +510,7 @@ Step 2. Passive FTP If your system requires the PASV FTP code instead of the standard PORT FTP code (e.g., to deal with a firewall) then edit "WWW/Library/ Implementation/HTFTP.c" and comment out line 43 like so: - /* #define LISTEN /* @@@@ Test LJM */. + /* #define LISTEN /* @@@@ Test LJM */. Step 3a. Lynx uses the VMS port of gzip for uncompressing streams which have @@ -391,10 +527,10 @@ Step 3a. or slang is in the top level directory. All you have to do is type "@build" or "@build-slang" and answer its prompt for your system's TCP-IP software. Current choices are: - MULTINET (default) + MULTINET (default) UCX WIN_TCP - CMU_TCP + CMU_TCP SOCKETSHR_TCP TCPWARE It will autosense whether you have VAXC, DECC or GNUC on VAX or AXP and @@ -447,7 +583,7 @@ Step 3b. (optional compilation method) not just Lynx. -IV. Compile instructions -- Win32 (Windows95/NT) +IV. Compile instructions -- Win32 (Windows95/98/NT) The original Win32 port was built with Borland C++ 4.52, but later versions reportedly can be used. Before compiling the Lynx sources, you @@ -489,15 +625,26 @@ IV. Compile instructions -- Win32 (Windows95/NT) V. Compile instructions -- 386 DOS - Compiling for DOS with DJGPP is a multistep procedure. First install - the c compiler and its libraries. DJGPP, as distributed from the - usual DJGPP archives, will not successfully compile lynx. You need to - "stubedit" your "cc1.exe" file. The following parameters have worked - successfully: minstack=800k, bufsize=64k. To accomplish this, move to - the djgpp\bin directory and type the command: - "stubedit cc1.exe bufsize=64k minstack=800k". - Or do it interactively with the command: "stubedit cc1.exe". - (see "http://www.flora.org/lynx-dev/html/month0897/msg00145.html"). + Compiling for DOS with DJGPP is a multistep procedure. First install + the c compiler and its libraries. If using DJGPP 2.01, update the + distribution with the patched lib.c, to take care of bug fixes. It is + available at: "http://www.cartsys.com/eldredge/djgpp-patches.html". + GCC 2.7.2.1, as distributed from the usual DJGPP archives, will not + successfully compile lynx. You need to "stubedit" your "cc1.exe" file. + The following parameters have worked successfully: minstack=800k, + bufsize=64k. To accomplish this, move to the djgpp\bin directory + and type the command: + "stubedit cc1.exe bufsize=64k minstack=800k". + Or do it interactively with the command: "stubedit cc1.exe". (see + "http://www.flora.org/lynx-dev/html/month0897/msg00145.html"). + + If using DJGPP 2.02 and GCC 2.8.1, you may not need to "stubedit" + cc1.exe if you use -O2 optimization, since cc1.exe comes with + a 1536K stack. To compile with -O3 optimization, the stub + needs to be edited to give a larger stack. To do this go into + djgpp\lib\gcc-lib\djgpp\2.81 and either type the command: + "stubedit cc1.exe bufsize=63k minstack=2M", + or edit interactively with: "stubedit cc1.exe". Unpack the source code using a DOS program like UNZIP386. If you are using PKUNZIP to unpack the .zip archive, you must use the -d command @@ -515,35 +662,97 @@ V. Compile instructions -- 386 DOS zlib.h and zconf.h in the include subdirectory. In addition to the files in the Lynx distribution, you will need a - curses package and a TCP package. You can use PDCurses (available at + 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/" + (available in two different versions at "ftp://neonatal.sm.med.ic.ac.uk/" 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 - need to compile these before you go any further. If you wish to use the - beta version of PDCurses 2.3, you need to first apply a patch (available at - "http://www.flora.org/lynx-dev/html/month0997/msg00441.html"). If you have - trouble applying the patch, we recommend that you use the "patch" program, - ("http://www.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/pat25b.zip"). To - read the Unix man style documentation, use, for example, "less" + A patched copy of the version from the neonatal site is also + available from "http://www.rahul.net/dkaufman/tcplibdj.zip" or + "ftp://ftp.rahul.net/pub/dkaufman/tcplibdj.zip". You can also use slang + ("ftp://space.mit.edu/pub/davis/slang") as your curses library. You need + to compile these before you go any further. If you wish to use PDCurses + 2.3, you need to first apply the following patch: + +*** curses.h Thu Jul 9 19:38:28 1998 +--- curses.h.new Sat Aug 15 11:02:08 1998 +*************** +*** 1802,1807 **** +--- 1802,1808 ---- + #define getbegx(w) (w)->_begx + #define getbegy(w) (w)->_begy + #define getbegyx(w,y,x) ( y = (w)->_begy, x = (w)->_begx ) ++ #define getbkgd(w) ((w)->_bkgd) + #define getch() wgetch(stdscr) + #define getmaxx(w) (w)->_maxx + #define getmaxy(w) (w)->_maxy +*** dos/pdckbd.c Sat Jul 12 17:10:12 1997 +--- dos/pdckbd.c.new Thu Apr 15 20:52:16 1999 +*************** +*** 443,449 **** + _watch_breaks(); + #else + # ifdef GO32 +! (void*)signal(SIGINT,(setting ? SIG_DFL : SIG_IGN)); + /* __djgpp_set_ctrl_c(setting);*/ + setcbrk(setting); + # else +--- 443,449 ---- + _watch_breaks(); + #else + # ifdef GO32 +! /* (void*)signal(SIGINT,(setting ? SIG_DFL : SIG_IGN)); */ + /* __djgpp_set_ctrl_c(setting);*/ + setcbrk(setting); + # else + + If you have trouble applying the patch, try using the "patch" program, + ("http://www.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/pat25b.zip"). The + WATTCP TCPLIB sources must also be patched prior to compilation. See + "http://www.flora.org/lynx-dev/html/month1197/msg00403.html". + + 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. + compile or place your compiled WATTCP library in lynx2-*/djgpp/tcplib. If + using the SLANG library, put libslang.a in your DJGPP/lib directory and put + slang.h and slcurses.h in your DJGPP/include directory, or in the + appropriate directories specified by LIBRARY_PATH and INCLUDE_PATH in your + DJGPP.ENV file. + + Move to the "lynx2-*/WWW/Library/djgpp" directory. If compiling with + PDCurses, do "make". If using SLANG, do "make -f makefile.sla". 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. There are three choices for compiling at + this point. You can do "make -f makefile.dos" to compile with PDCurses, + "make -f makefile.wsl" to compile with SLANG, or "make -f makefile.dsl" to + compile with SLANG and the DJGPP keyhandler. At the time of this writing, + it is not clear what the advantages and disadvantages of each version are. + The PDCurses version has the most experience and allows remapping of ALT + and Function keys. The SLANG version seems to have better screen handling. + It allows mapping of function keys, but not ALT keys. The SLANG with DJGPP + keyhandler allows mapping of ALT and Function keys, but has the risk of + incompatibilities from mixing different programs. + + If you wish to compile with support for internationalization of messages, + you first need to install the DOS port of the GNU gettext package, + available from any DJGPP mirror site. You may wish to recompile with DJGPP + 2.02. Then uncomment the lines for INTLFLAGS in src/makefile.dsl and in + WWW/Library/djgpp/makefile.sla, and remove the "#" from the LIBS line in + src/makefile.dsl. Make similar changes if using one of the other DOS + makefiles. See the gettext documentation for information on creating and + using message files for different languages. - 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 you have trouble, check to be sure djgpp.env is the way it came in the original package. + To compile lynx with DJGPP you may need about 20Mb of free disk space + for virtual memory. To test Lynx_386 you must have a packet driver installed. The simplest method is to use a null packet driver that just allows Lynx to start up, but doesn't do anything else. One such executable driver has been posted, - uuencoded, to the lynx-dev mailing list: "msg00031.html", "msg00057.html", - and "msg00066.html" under "http://www.flora.org/lynx-dev/html/month0198/". + uuencoded, to the lynx-dev mailing list: + "http://www.flora.org/lynx-dev/html/month0198/msg00057.html". Start the dummy packet driver with "nullpkt 0x60", and take it out of memory with "nullpkt -u". You can also use slip8250.com. See the CRYNWR package "http://www.simtel.net/pub/simtelnet/msdos/pktdrvr/pktd11.zip". @@ -554,8 +763,20 @@ V. Compile instructions -- 386 DOS "ftp://jazz.trumpet.com.au/slipper". To remove it from memory use termin.com (usage "termin 0x60"), available in the CRYNWR package. To connect over a dialup PPP connection you need dosppp or klos' pppshare. - (Find at "http://www.simtel.net/pub/simtelnet/msdos/pktdrvr/dosppp05.zip" - and "ftp://ftp.klos.com/demo/pppshare.exe".) + (Find at: + "http://mvmpc9.ciw.uni-karlsruhe.de/c:/user/toni/dosppp/dosppp06.zip", + "http://personal.redestb.es/tonilop/dosppp/dosppp06.zip", or + "ftp://ftp.agate.net/users/01935/internet/dosppp06.zip"; + "ftp://ftp.klos.com/demo/pppshare.exe".) + + File access looks like this: + + file:///c:/ + file:///c:/dos + file:///c:/dos/command.com + file://localhost/c:/ + file://localhost/c:/dos + file://localhost/c:/dos/command.com See "http://www.fdisk.com/doslynx/lynxport.htm" for more hints and some precompiled libraries. One problem you can run into is when editing @@ -568,11 +789,11 @@ V. Compile instructions -- 386 DOS cd djgpp\tcplib\obj make - cd ..\..\www\library\djgpp + cd ..\..\..\www\library\djgpp make cd ..\..\..\src\chrtrans make -f makefile.dos - cd ..\..\..\src + cd ..\..\src make -f makefile.dos strip lynx.exe cd .. @@ -589,9 +810,10 @@ V. Compile instructions -- 386 DOS VI. General installation instructions - Once you have compiled Lynx, test it out on "lynx_help/about_lynx.html". - You shouldn't need to install Lynx to test it. Once you are satisfied - that it works, go ahead and install Lynx. For Unix, type "make install". + Once you have compiled Lynx, test it out first on a local file. Be sure + Lynx can find lynx.cfg. A _sample_ test command line would be: + `lynx -cfg=/usr/local/lib/lynx.cfg .`. Once you are satisfied that + Lynx works, go ahead and install it. For Unix, type "make install". For VMS, you need to have the executable in a public place, make it accessible, define it as a foreign command, and copy lynx.cfg to @@ -605,8 +827,7 @@ VI. General installation instructions need to do is type "make install-help." If you are installing manually, copy the files "COPYHEADER" and "COPYING" into the lynx_help directory BEFORE moving the lynx_help tree to its final location. These files are - referenced hypertextually from help documents. Find tips for installing - the help files at "http://www.irm.nara.kindai.ac.jp/lynxdev/README.help". + referenced hypertextually from help documents. If you have old, pre-existing bookmark files from earlier versions of Lynx, those files may have to be updated. Conversion may just consist @@ -620,161 +841,63 @@ VI. General installation instructions build, be certain to do a "make clean" (or "make distclean" for those using auto-configure) before attempting to compile again. - If something doesn't work, or you can't get Lynx to even compile, or you - don't understand what one of the defines means, read the PROBLEMS file, - and the README.defines and *.announce files in the docs subdirectory. - The docs/CHANGES* files record the entire development history of Lynx - 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 - about your system, the OS you are using, the name and version of your - compiler, which curses library you are using and the compile-time errors. - Be sure to say what version and image-number (alternately the top date - of the CHANGES file) of Lynx you are trying to build. +VII. Setting environment variables before running Lynx (optional) + +1. All ports + The Lynx Users Guide describes all of the environment variables used by + Lynx. This should be checked later along with reading lynx.cfg after you + have installed Lynx. -VII. Setting environment variables before running Lynx (optional) +2. Win32 (95/98/NT) and 386 DOS -1. Unix and VMS - To set your site's NTTP server as the default host for news reading - and posting via Lynx, set the environment variable NNTPSERVER so that - it points to its Internet address. The variable "NNTPSERVER" is used - to specify the host which will be used as the default for news URLs. - - UNIX - setenv NNTPSERVER "news.server.dom" - - VMS - define/system NNTPSERVER "news.server.dom" - - The environment variables "ORGANIZATION" or "NEWS_ORGANIZATION", if set, - will be used for the Organization: header in news postings. (On Unix, - Lynx also checks for an /etc/organization file.) - - The environment variable "LYNX_CFG", if set, will override the default - location and name of the global configuration file (lynx.cfg) that was - defined via the constant "LYNX_CFG_FILE" in userdefs.h. See userdefs.h - for more information. - - The environment variable "LYNX_TEMP_SPACE", if set, will override the - default path prefix for temporary files that was defined via the constant - "TEMP_SPACE" in userdefs.h. See userdefs.h for more information. - - The environment variable "LYNX_SAVE_SPACE", if set, will override the - default path prefix for files saved to disk that was defined via the - constant "SAVE_SPACE" in lynx.cfg. See lynx.cfg for more information. - - The variable "WWW_HOME", if set, will override the default startup - URL specified in any of the configuration files. - - Lynx still supports use of gateway servers, with the servers specified - via the variables "WWW_access_GATEWAY", where "access" is lower case - and can be "http", "ftp", "gopher" or "wais". Most of the gateway - servers have been discontinued, but "http://www.w3.org:8001" is - available for wais searches (note that you do not include a terminal - '/' for gateways, but do for proxies; see below). - - Lynx version 2.2 and beyond supports the use of proxy servers that can - act as firewall gateways and caching servers. They are preferable to - the older gateway servers. Each protocol used by Lynx can be mapped - separately using PROTOCOL_proxy environment variables of the form: - - UNIX - setenv http_proxy "http://some.server.dom:port/" - setenv https_proxy "http://some.server.dom:port/" - setenv ftp_proxy "http://some.server.dom:port/" - setenv gopher_proxy "http://some.server.dom:port/" - setenv news_proxy "http://some.server.dom:port/" - setenv newspost_proxy "http://some.server.dom:port/" - setenv newsreply_proxy "http://some.server.dom:port/" - setenv snews_proxy "http://some.server.dom:port/" - setenv snewspost_proxy "http://some.server.dom:port/" - setenv snewsreply_proxy "http://some.server.dom:port/" - setenv nntp_proxy "http://some.server.dom:port/" - setenv wais_proxy "http://some.server.dom:port/" - setenv finger_proxy "http://some.server.dom:port/" - setenv cso_proxy "http://some.server.dom:port/" - - VMS - define "http_proxy" "http://some.server.dom:port/" - define "https_proxy" "http://some.server.dom:port/" - define "ftp_proxy" "http://some.server.dom:port/" - define "gopher_proxy" "http://some.server.dom:port/" - define "news_proxy" "http://some.server.dom:port/" - define "newspost_proxy" "http://some.server.dom:port/" - define "newsreply_proxy" "http://some.server.dom:port/" - define "snews_proxy" "http://some.server.dom:port/" - define "snewspost_proxy" "http://some.server.dom:port/" - define "snewsreply_proxy" "http://some.server.dom:port/" - define "nntp_proxy" "http://some.server.dom:port/" - define "wais_proxy" "http://some.server.dom:port/" - define "finger_proxy" "http://some.server.dom:port/" - define "cso_proxy" "http://some.server.dom:port/" - (Encase *BOTH* strings in double-quotes to maintain - lower case for the PROTOCOL_proxy variable and for - the http access type; include /system if you want - proxying for all clients on your system.) - - If you wish to override the use of a proxy server for specific hosts or - entire domains you may use the "no_proxy" environment variable. Here is - an example use of "no_proxy": - - UNIX - setenv no_proxy "host.domain.dom, domain1.dom, domain2" - - VMS - define "no_proxy" "host.domain.dom, domain1.dom, domain2" - - You can include a port number in the no_proxy list to override use - of a proxy server for the host accessed via that port, but not via - other ports. For example, if you use "host.domain.dom:119" and/or - "host.domain.dom:210", then news (port 119) URLs and/or any wais - (port 210) searches on that host would be excluded, but http, ftp, - and gopher services (if normally proxied) would still be included, - as would any news or wais services on other hosts. - - If you wish to override the use of a proxy server completely (i.e., - globally override any existing proxy variables), set the value of - "no_proxy" to "*". - - Note that Lynx treats file URLs on the local host as requests for - direct access to the file, and does not attempt ftp if that fails. - It treats both ftp URLs and file URLs on remote hosts as ftp URLs, - and does not attempt direct file access for either. If ftp URLs are - being proxied, file URLs on a remote host will be converted to ftp - URLs before submission by Lynx to the proxy server, so no special - procedure for inducing the proxy server to handle them is required. - Other WWW clients may require that the http server's configuration - file have "Map file:* ftp:*" in it to perform that conversion. - - The proxy and no_proxy variables also can be set at run time via - lynx.cfg. - -2. Win32 (95/NT) and 386 DOS (adapted from "readme.txt" by Wayne Buttles) + These ports cannot start before setting certain environment variables. + Here are some environment variables that should be set, usually in a + batch file that runs the lynx executable. Make sure that you have enough + room left in your environment. You may need to change your "SHELL=" + setting in config.sys. In addition, lynx looks for a "SHELL" environment + variable when shelling to DOS. If you wish to preserve the environment + space when shelling, put a line like this in your AUTOEXEC.BAT file also + "SET SHELL=C:\COMMAND.COM /E:2048". It should match CONFIG.SYS. HOME Where to keep the bookmark file and personal config files. - LYNX_CFG The full path and filename for lynx.cfg TEMP or TMP Bookmarks are kept here with no HOME. Temp files here. - TERM Set TERM=vt100 to stop that annoying terminal type message. - USER Tells Lynx you are real instead of an anonymous user(?) + USER Set to your login name (optional) + LYNX_CFG Set to the full path and filename for lynx.cfg + LYNX_SAVE_SPACE The (modifiable) location for downloaded file storage. 386 version only: - WATTCP.CFG Where to find the wattcp.cfg file. + WATTCP.CFG Set to the full path for the WATTCP.CFG directory (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: + application line is "D:\win32\lynx.bat", lynx.bat for Win32 may look like: @ECHO OFF set home=d:\win32 set temp=d:\tmp set lynx_cfg=d:\win32\lynx.cfg + set lynx_save_space=d:\download d:\win32\lynx.exe %1 %2 %3 %4 %5 + For lynx_386, a typical batch file might look like: + + @echo off + set HOME=f:/lynx2-8 + set USER=your_login_name + set LYNX_CFG=%HOME%/lynx.cfg + set WATTCP.CFG=%HOME% + f:\lynx2-8\lynx %1 %2 %3 %4 %5 %6 %7 %8 %9 + + You need to make sure that the WATTCP.CFG file has the correct information + for IP number, Gateway, Netmask, and Domain Name Server. This can also be + automated in the batch file. + + Adapted from "readme.txt" by Wayne Buttles and "readme.dos" by Doug Kaufman. VIII. Acknowledgment Thanks to the many volunteers who offered suggestions for making this installation manual as accurate and complete as possible. --- 1998/01/22 - H. Nelson +-- 1999/04/24 - H. Nelson diff --git a/gnu/usr.bin/lynx/LYHelp.hin b/gnu/usr.bin/lynx/LYHelp.hin new file mode 100644 index 00000000000..fabab118302 --- /dev/null +++ b/gnu/usr.bin/lynx/LYHelp.hin @@ -0,0 +1,18 @@ +/* definitions for help files */ + +#ifndef LYHELP_H +#define LYHELP_H + +#define COOKIE_JAR_HELP "@LYNX_USERS_GUIDE@#Cookies" +#define CURRENT_KEYMAP_HELP "keystrokes/@KEYSTROKE_HELP@" +#define DIRED_MENU_HELP "keystrokes/@DIRED_HELP@" +#define DOWNLOAD_OPTIONS_HELP "@LYNX_USERS_GUIDE@#RemoteSource" +#define HISTORY_PAGE_HELP "keystrokes/@HISTORY_HELP@" +#define LIST_PAGE_HELP "keystrokes/@FOLLOW_HELP@" +#define LYNXCFG_HELP "lynx.cfg" +#define OPTIONS_HELP "keystrokes/@OPTION_HELP@" +#define PRINT_OPTIONS_HELP "keystrokes/@PRINT_HELP@" +#define UPLOAD_OPTIONS_HELP "@LYNX_USERS_GUIDE@#DirEd" +#define VISITED_LINKS_HELP "keystrokes/@VISITED_HELP@" + +#endif /* LYHELP_H */ diff --git a/gnu/usr.bin/lynx/LYMessages_en.h b/gnu/usr.bin/lynx/LYMessages_en.h index 0ceb12734f6..b2910b247ae 100644 --- a/gnu/usr.bin/lynx/LYMessages_en.h +++ b/gnu/usr.bin/lynx/LYMessages_en.h @@ -8,650 +8,828 @@ #define LYMESSAGES_EN_H /******************************************************************* - * The following definitions are for statusline prompts, messages, - * or warnings issued by Lynx during program execution. You can - * modify them to make them more appropriate for you site, and/or - * to use other languages. Links to collections of alternate - * definitions, developed by the Lynx User Community, are maintained - * in Lynx links: + * The following definitions are for status line prompts, messages, or + * warnings issued by Lynx during program execution. You can modify + * them to make them more appropriate for your site. We recommend that + * you extend these definitions to other languages using the gettext + * library. There are also scattered uses of 'gettext()' throughout the + * Lynx source, covering all but those messages which (a) are used for + * debugging (CTRACE) or (b) are constants used in interaction with + * other programs. + * + * Links to collections of alternate definitions, developed by the Lynx + * User Community, are maintained in Lynx links: * * http://www.crl.com/~subir/lynx.html * - * You can substitute one of those as LYMessages_en.h, or modify - * the header inclusion statement in your userdefs.h to include - * one of those with a different name. + * Because the gettext facility is only recently (with release 2.8.2) + * introduced, these alternate definitions are given as variants on this + * file. Use them as a starting point to construct a new message + * library as needed. (see po/readme). */ -#define REALLY_QUIT_Y "Are you sure you want to quit? [Y] " -#ifdef VMS -#define REALLY_EXIT_Y "Really exit from Lynx? [Y] " -#endif /* VMS */ -#define REALLY_QUIT_N "Are you sure you want to quit? [N] " +#define ALERT_FORMAT gettext("Alert!: %s") +#define WELCOME_MSG gettext("Welcome") +#define REALLY_QUIT_Y gettext("Are you sure you want to quit?") +#define REALLY_QUIT_N gettext("Are you sure you want to quit?") #ifdef VMS -#define REALLY_EXIT_N "Really exit from Lynx? [N] " +#define REALLY_EXIT_Y gettext("Really exit from Lynx?") +#define REALLY_EXIT_N gettext("Really exit from Lynx?") #endif /* VMS */ -#define CANCELLED "Cancelled!!!" -#define CANCELLING "Cancelling!" -#define NO_CANCEL "Excellent!!!" -#define OPERATION_DONE "Done!" -#define BAD_REQUEST "Bad request!" -#define PREVIOUS "previous" -#define NEXT_SCREEN "next screen" +#define CONNECTION_INTERRUPTED gettext("Connection interrupted.") +#define TRANSFER_INTERRUPTED gettext("Data transfer interrupted.") +#define CANCELLED gettext("Cancelled!!!") +#define CANCELLING gettext("Cancelling!") +#define NO_CANCEL gettext("Excellent!!!") +#define OPERATION_DONE gettext("Done!") +#define BAD_REQUEST gettext("Bad request!") +#define PREVIOUS gettext("previous") +#define NEXT_SCREEN gettext("next screen") +#define TO_HELP gettext("HELP!") +#define HELP_ON_SEGMENT gettext(", help on ") #define HELP \ - "Commands: Use arrow keys to move, '?' for help, 'q' to quit, '<-' to go back." + gettext("Commands: Use arrow keys to move, '?' for help, 'q' to quit, '<-' to go back.") #define MOREHELP \ - "-- press space for more, use arrow keys to move, '?' for help, 'q' to quit." -#define MORE "-- press space for next page --" + gettext("-- press space for more, use arrow keys to move, '?' for help, 'q' to quit.") +#define MORE gettext("-- press space for next page --") + +/* Forms messages */ #define FORM_LINK_TEXT_MESSAGE \ - "(Text entry field) Enter text. Use UP or DOWN arrows or tab to move off." + gettext("(Text entry field) Enter text. Use UP or DOWN arrows or tab to move off.") +#define FORM_LINK_TEXTAREA_MESSAGE \ + gettext("(Textarea) Enter text. Use UP/DOWN arrows or TAB to move off (^Ve for editor).") #define FORM_LINK_TEXT_UNM_MSG \ - "UNMODIFIABLE form text field. Use UP or DOWN arrows or tab to move off." + gettext("UNMODIFIABLE form text field. Use UP or DOWN arrows or tab to move off.") #define FORM_LINK_TEXT_SUBMIT_MESSAGE \ - "(Form field) Enter text. Use to submit ('x' for no cache)." + gettext("(Form field) Enter text. Use to submit ('x' for no cache).") #define FORM_LINK_TEXT_RESUBMIT_MESSAGE \ - "(Form field) Enter text. Use to submit, arrows or tab to move off." + gettext("(Form field) Enter text. Use to submit, arrows or tab to move off.") #define FORM_LINK_TEXT_SUBMIT_UNM_MSG \ - "UNMODIFIABLE form field. Use UP or DOWN arrows or tab to move off." + gettext("UNMODIFIABLE form field. Use UP or DOWN arrows or tab to move off.") #define FORM_LINK_TEXT_SUBMIT_MAILTO_MSG \ - "(mailto form field) Enter text. Use to submit, arrows to move off." + gettext("(mailto form field) Enter text. Use to submit, arrows to move off.") #define FORM_LINK_TEXT_SUBMIT_MAILTO_DIS_MSG \ - "(mailto form field) Mail is disallowed so you cannot submit." + gettext("(mailto form field) Mail is disallowed so you cannot submit.") #define FORM_LINK_PASSWORD_MESSAGE \ - "(Password entry field) Enter text. Use UP or DOWN arrows or tab to move off." + gettext("(Password entry field) Enter text. Use UP or DOWN arrows or tab to move off.") #define FORM_LINK_PASSWORD_UNM_MSG \ - "UNMODIFIABLE form password. Use UP or DOWN arrows or tab to move off." + gettext("UNMODIFIABLE form password. Use UP or DOWN arrows or tab to move off.") #define FORM_LINK_CHECKBOX_MESSAGE \ - "(Checkbox Field) Use right-arrow or to toggle." + gettext("(Checkbox Field) Use right-arrow or to toggle.") #define FORM_LINK_CHECKBOX_UNM_MSG \ - "UNMODIFIABLE form checkbox. Use UP or DOWN arrows or tab to move off." + gettext("UNMODIFIABLE form checkbox. Use UP or DOWN arrows or tab to move off.") #define FORM_LINK_RADIO_MESSAGE \ - "(Radio Button) Use right-arrow or to toggle." + gettext("(Radio Button) Use right-arrow or to toggle.") #define FORM_LINK_RADIO_UNM_MSG \ - "UNMODIFIABLE form radio button. Use UP or DOWN arrows or tab to move off." + gettext("UNMODIFIABLE form radio button. Use UP or DOWN arrows or tab to move off.") +#define FORM_LINK_SUBMIT_PREFIX \ + gettext("Submit ('x' for no cache) to ") +#define FORM_LINK_RESUBMIT_PREFIX \ + gettext("Submit to ") #define FORM_LINK_SUBMIT_MESSAGE \ - "(Form submit button) Use right-arrow or to submit ('x' for no cache)." + gettext("(Form submit button) Use right-arrow or to submit ('x' for no cache).") #define FORM_LINK_RESUBMIT_MESSAGE \ - "(Form submit button) Use right-arrow or to submit." + gettext("(Form submit button) Use right-arrow or to submit.") #define FORM_LINK_SUBMIT_DIS_MSG \ - "DISABLED form submit button. Use UP or DOWN arrows or tab to move off." + gettext("DISABLED form submit button. Use UP or DOWN arrows or tab to move off.") +#define FORM_LINK_SUBMIT_MAILTO_PREFIX \ + gettext("Submit mailto form to ") #define FORM_LINK_SUBMIT_MAILTO_MSG \ - "(mailto form submit button) Use right-arrow or to submit." + gettext("(mailto form submit button) Use right-arrow or to submit.") #define FORM_LINK_SUBMIT_MAILTO_DIS_MSG \ - "(mailto form submit button) Mail is disallowed so you cannot submit." + gettext("(mailto form submit button) Mail is disallowed so you cannot submit.") #define FORM_LINK_RESET_MESSAGE \ - "(Form reset button) Use right-arrow or to reset form to defaults." + gettext("(Form reset button) Use right-arrow or to reset form to defaults.") #define FORM_LINK_RESET_DIS_MSG \ - "DISABLED form reset button. Use UP or DOWN arrows or tab to move off." + gettext("DISABLED form reset button. Use UP or DOWN arrows or tab to move off.") #define FORM_LINK_OPTION_LIST_MESSAGE \ - "(Option list) Hit return and use arrow keys and return to select option." + gettext("(Option list) Hit return and use arrow keys and return to select option.") #define CHOICE_LIST_MESSAGE \ - "(Choice list) Hit return and use arrow keys and return to select option." + gettext("(Choice list) Hit return and use arrow keys and return to select option.") #define FORM_LINK_OPTION_LIST_UNM_MSG \ - "UNMODIFIABLE option list. Use return or arrow keys to review or leave." + gettext("UNMODIFIABLE option list. Use return or arrow keys to review or leave.") #define CHOICE_LIST_UNM_MSG \ - "UNMODIFIABLE choice list. Use return or arrow keys to review or leave." + gettext("UNMODIFIABLE choice list. Use return or arrow keys to review or leave.") +#define SUBMITTING_FORM gettext("Submitting form...") +#define RESETTING_FORM gettext("Resetting form...") +#define RELOADING_FORM \ + gettext("Reloading document. Any form entries will be lost!") +#define CANNOT_TRANSCODE_FORM gettext("Warning: Cannot transcode form data to charset %s!") + #define NORMAL_LINK_MESSAGE \ - "(NORMAL LINK) Use right-arrow or to activate." -#define LINK_NOT_FOUND "The resource requested is not available at this time." -#define ENTER_LYNX_COMMAND "Enter Lynx keystroke command: " -#define WWW_WAIT_MESSAGE "Getting %s" -#define WWW_SKIP_MESSAGE "Skipping %s" -#define WWW_USING_MESSAGE "Using %s" -#define WWW_ILLEGAL_URL_MESSAGE "Illegal URL: %s" -#define WWW_BAD_ADDR_MESSAGE "Badly formed address %s" -#define ADVANCED_URL_MESSAGE "URL: %s" -#define WWW_FAIL_MESSAGE "Unable to access WWW file!!!" -#define WWW_INDEX_MESSAGE "This is a searchable index. Use %s to search." + gettext("(NORMAL LINK) Use right-arrow or to activate.") +#define LINK_NOT_FOUND gettext("The resource requested is not available at this time.") +#define ENTER_LYNX_COMMAND gettext("Enter Lynx keystroke command: ") +#define WWW_FIND_MESSAGE gettext("Looking up ") +#define WWW_WAIT_MESSAGE gettext("Getting %s") +#define WWW_SKIP_MESSAGE gettext("Skipping %s") +#define WWW_USING_MESSAGE gettext("Using %s") +#define WWW_ILLEGAL_URL_MESSAGE gettext("Illegal URL: %s") +#define WWW_BAD_ADDR_MESSAGE gettext("Badly formed address %s") +#define ADVANCED_URL_MESSAGE gettext("URL: %s") +#define WWW_FAIL_MESSAGE gettext("Unable to access WWW file!!!") +#define WWW_INDEX_MESSAGE gettext("This is a searchable index. Use %s to search.") #define WWW_INDEX_MORE_MESSAGE \ - "--More-- This is a searchable index. Use %s to search." -#define BAD_LINK_NUM_ENTERED "You have entered an invalid link number." + gettext("--More-- This is a searchable index. Use %s to search.") +#define BAD_LINK_NUM_ENTERED gettext("You have entered an invalid link number.") #define SOURCE_HELP \ - "Currently viewing document source. Press '\\' to return to rendered version." + gettext("Currently viewing document source. Press '\\' to return to rendered version.") #define NOVICE_LINE_ONE \ - " Arrow keys: Up and Down to move. Right to follow a link; Left to go back. \n" + gettext(" Arrow keys: Up and Down to move. Right to follow a link; Left to go back. \n") #define NOVICE_LINE_TWO \ - " H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list \n" + gettext(" H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list \n") #define NOVICE_LINE_TWO_A \ - " O)ther cmds H)elp K)eymap G)oto P)rint M)ain screen o)ptions Q)uit \n" + gettext(" O)ther cmds H)elp K)eymap G)oto P)rint M)ain screen o)ptions Q)uit \n") #define NOVICE_LINE_TWO_B \ - " O)ther cmds B)ack E)dit D)ownload ^R)eload ^W)ipe screen search doc: / \n" + gettext(" O)ther cmds B)ack E)dit D)ownload ^R)eload ^W)ipe screen search doc: / \n") #define NOVICE_LINE_TWO_C \ - " O)ther cmds C)omment History: Bookmarks: V)iew, A)dd, R)emove \n" + gettext(" O)ther cmds C)omment History: Bookmarks: V)iew, A)dd, R)emove \n") #define FORM_NOVICELINE_ONE \ - " Enter text into the field by typing on the keyboard " + gettext(" Enter text into the field by typing on the keyboard ") #define FORM_NOVICELINE_TWO \ -" Ctrl-U to delete all text in field, [Backspace] to delete a character " -#define SUBMITTING_FORM "Submitting form..." -#define RESETTING_FORM "Resetting form..." -#define RELOADING_FORM \ - "Reloading document. Any form entries will be lost!" -#define CANNOT_TRANSCODE_FORM "Warning: Cannot transcode form data to charset %s!" -#define BAD_FORM_MAILTO "Malformed mailto form submission! Cancelled!" -#define FORM_MAILTO_DISALLOWED "Mail disallowed! Cannot submit." -#define FORM_MAILTO_FAILED "Mailto form submission failed!" -#define FORM_MAILTO_CANCELLED "Mailto form submission Cancelled!!!" -#define SENDING_FORM_CONTENT "Sending form content..." -#define NO_ADDRESS_IN_MAILTO_URL "No email address is present in mailto URL!" + gettext(" Ctrl-U to delete all text in field, [Backspace] to delete a character ") + +/* mailto */ +#define BAD_FORM_MAILTO gettext("Malformed mailto form submission! Cancelled!") +#define MAILTO_SQUASH_CTL gettext("Warning! Control codes in mail address replaced by ?") +#define FORM_MAILTO_DISALLOWED gettext("Mail disallowed! Cannot submit.") +#define FORM_MAILTO_FAILED gettext("Mailto form submission failed!") +#define FORM_MAILTO_CANCELLED gettext("Mailto form submission Cancelled!!!") +#define SENDING_FORM_CONTENT gettext("Sending form content...") +#define NO_ADDRESS_IN_MAILTO_URL gettext("No email address is present in mailto URL!") #define MAILTO_URL_TEMPOPEN_FAILED \ - "Unable to open temporary file for mailto URL!" -#define COMMENT_REQUEST_CANCELLED "Comment request cancelled!!!" + gettext("Unable to open temporary file for mailto URL!") +#define COMMENT_REQUEST_CANCELLED gettext("Comment request cancelled!!!") #define INC_ORIG_MSG_PROMPT \ - "Do you wish to include the original message? (y/n) " + gettext("Do you wish to include the original message?") #define INC_PREPARSED_MSG_PROMPT \ - "Do you wish to include the preparsed source? (y/n) " + gettext("Do you wish to include the preparsed source?") #define SPAWNING_EDITOR_FOR_MAIL \ - "Spawning your selected editor to edit mail message" + gettext("Spawning your selected editor to edit mail message") #define ERROR_SPAWNING_EDITOR \ - "Error spawning editor, check your editor definition in the options menu" -#define SEND_COMMENT_PROMPT "Send this comment? (y/n) " -#define SEND_MESSAGE_PROMPT "Send this message? (y/n) " -#define SENDING_YOUR_MSG "Sending your message..." -#define FILE_ACTIONS_DISALLOWED "file: ACTIONs are disallowed!" + gettext("Error spawning editor, check your editor definition in the options menu") +#define SEND_COMMENT_PROMPT gettext("Send this comment?") +#define SEND_MESSAGE_PROMPT gettext("Send this message?") +#define SENDING_YOUR_MSG gettext("Sending your message...") +#define SENDING_COMMENT gettext("Sending your comment:") + +/* textarea */ +#define NOT_IN_TEXTAREA gettext("Not in a TEXTAREA; cannot use external editor.") + + +#define FILE_ACTIONS_DISALLOWED gettext("file: ACTIONs are disallowed!") #define FILE_SERVED_LINKS_DISALLOWED \ - "file: URLs via served links are disallowed!" -#define FILE_BOOKMARKS_DISALLOWED "file: URLs via bookmarks are disallowed!" + gettext("file: URLs via served links are disallowed!") +#define FILE_BOOKMARKS_DISALLOWED gettext("file: URLs via bookmarks are disallowed!") #define SPECIAL_VIA_EXTERNAL_DISALLOWED \ - "This special URL is not allowed in external documents!" -#define RETURN_TO_LYNX "Press to return to Lynx." + gettext("This special URL is not allowed in external documents!") +#define RETURN_TO_LYNX gettext("Press to return to Lynx.") #ifdef VMS #define SPAWNING_MSG \ - "Spawning DCL subprocess. Use 'logout' to return to Lynx.\n" + gettext("Spawning DCL subprocess. Use 'logout' to return to Lynx.\n") #else #ifdef DOSPATH #define SPAWNING_MSG \ - "Type EXIT to return to Lynx.\r\n" + gettext("Type EXIT to return to Lynx.\n") #else /* UNIX */ #define SPAWNING_MSG \ - "Spawning your default shell. Use 'exit' to return to Lynx.\n" + gettext("Spawning your default shell. Use 'exit' to return to Lynx.\n") #endif #endif /* VMS */ -#define SPAWNING_DISABLED "Spawning is currently disabled." -#define DOWNLOAD_DISABLED "The 'd'ownload command is currently disabled." -#define NO_DOWNLOAD_INPUT "You cannot download a input field." -#define NO_DOWNLOAD_MAILTO_ACTION "Form has a mailto action! Cannot download." -#define NO_DOWNLOAD_COOKIES "You cannot download cookies." -#define NO_DOWNLOAD_PRINT_OP "You cannot download a printing option." -#define NO_DOWNLOAD_UPLOAD_OP "You cannot download an upload option." -#define NO_DOWNLOAD_PERMIT_OP "You cannot download an permit option." -#define NO_DOWNLOAD_SPECIAL "This special URL cannot be downloaded!" -#define NO_DOWNLOAD_CHOICE "Nothing to download." -#define TRACE_ON "Trace ON!" -#define TRACE_OFF "Trace OFF!" +#define SPAWNING_DISABLED gettext("Spawning is currently disabled.") +#define DOWNLOAD_DISABLED gettext("The 'd'ownload command is currently disabled.") +#define NO_DOWNLOAD_INPUT gettext("You cannot download an input field.") +#define NO_DOWNLOAD_MAILTO_ACTION gettext("Form has a mailto action! Cannot download.") +#define NO_DOWNLOAD_MAILTO_LINK gettext("You cannot download a mailto: link.") +#define NO_DOWNLOAD_COOKIES gettext("You cannot download cookies.") +#define NO_DOWNLOAD_PRINT_OP gettext("You cannot download a printing option.") +#define NO_DOWNLOAD_UPLOAD_OP gettext("You cannot download an upload option.") +#define NO_DOWNLOAD_PERMIT_OP gettext("You cannot download an permit option.") +#define NO_DOWNLOAD_SPECIAL gettext("This special URL cannot be downloaded!") +#define NO_DOWNLOAD_CHOICE gettext("Nothing to download.") +#define TRACE_ON gettext("Trace ON!") +#define TRACE_OFF gettext("Trace OFF!") #define CLICKABLE_IMAGES_ON \ - "Links will be included for all images! Reloading..." + gettext("Links will be included for all images! Reloading...") #define CLICKABLE_IMAGES_OFF \ - "Standard image handling restored! Reloading..." + gettext("Standard image handling restored! Reloading...") #define PSEUDO_INLINE_ALTS_ON \ - "Pseudo_ALTs will be inserted for inlines without ALT strings! Reloading..." + gettext("Pseudo_ALTs will be inserted for inlines without ALT strings! Reloading...") #define PSEUDO_INLINE_ALTS_OFF \ - "Inlines without an ALT string specified will be ignored! Reloading..." -#define RAWMODE_OFF "Raw 8-bit or CJK mode toggled OFF! Reloading..." -#define RAWMODE_ON "Raw 8-bit or CJK mode toggled ON! Reloading..." + gettext("Inlines without an ALT string specified will be ignored! Reloading...") +#define RAWMODE_OFF gettext("Raw 8-bit or CJK mode toggled OFF! Reloading...") +#define RAWMODE_ON gettext("Raw 8-bit or CJK mode toggled ON! Reloading...") #define HEAD_D_L_OR_CANCEL \ - "Send HEAD request for D)ocument or L)ink, or C)ancel? (d,l,c): " + gettext("Send HEAD request for D)ocument or L)ink, or C)ancel? (d,l,c): ") #define HEAD_D_OR_CANCEL \ - "Send HEAD request for D)ocument, or C)ancel? (d,c): " -#define DOC_NOT_HTTP_URL "Sorry, the document is not an http URL." -#define LINK_NOT_HTTP_URL "Sorry, the link is not an http URL." -#define FORM_ACTION_DISABLED "Sorry, the ACTION for this form is disabled." + gettext("Send HEAD request for D)ocument, or C)ancel? (d,c): ") +#define DOC_NOT_HTTP_URL gettext("Sorry, the document is not an http URL.") +#define LINK_NOT_HTTP_URL gettext("Sorry, the link is not an http URL.") +#define FORM_ACTION_DISABLED gettext("Sorry, the ACTION for this form is disabled.") #define FORM_ACTION_NOT_HTTP_URL \ - "Sorry, the ACTION for this form is not an http URL." -#define NOT_HTTP_URL_OR_ACTION "Not an http URL or form ACTION!" -#define SPECIAL_ACTION_DISALLOWED "This special URL cannot be a form ACTION!" -#define NOT_IN_STARTING_REALM "URL is not in starting realm!" -#define NEWSPOSTING_DISABLED "News posting is disabled!" -#define DIRED_DISABLED "File management support is disabled!" -#define NO_JUMPFILE "No jump file is currently available." -#define JUMP_PROMPT "Jump to (use '?' for list): " -#define JUMP_DISALLOWED "Jumping to a shortcut URL is disallowed!" -#define RANDOM_URL_DISALLOWED "Random URL is disallowed! Use a shortcut." -#define NO_RANDOM_URLS_YET "No random URLs have been used thus far." -#define BOOKMARKS_DISABLED "Bookmark features are currently disabled." -#define BOOKMARK_EXEC_DISABLED "Execution via bookmarks is disabled." + gettext("Sorry, the ACTION for this form is not an http URL.") +#define NOT_HTTP_URL_OR_ACTION gettext("Not an http URL or form ACTION!") +#define SPECIAL_ACTION_DISALLOWED gettext("This special URL cannot be a form ACTION!") +#define NOT_IN_STARTING_REALM gettext("URL is not in starting realm!") +#define NEWSPOSTING_DISABLED gettext("News posting is disabled!") +#define DIRED_DISABLED gettext("File management support is disabled!") +#define NO_JUMPFILE gettext("No jump file is currently available.") +#define JUMP_PROMPT gettext("Jump to (use '?' for list): ") +#define JUMP_DISALLOWED gettext("Jumping to a shortcut URL is disallowed!") +#define RANDOM_URL_DISALLOWED gettext("Random URL is disallowed! Use a shortcut.") +#define NO_RANDOM_URLS_YET gettext("No random URLs have been used thus far.") +#define BOOKMARKS_DISABLED gettext("Bookmark features are currently disabled.") +#define BOOKMARK_EXEC_DISABLED gettext("Execution via bookmarks is disabled.") #define BOOKMARK_FILE_NOT_DEFINED \ - "Bookmark file is not defined. Use %s to see options." + gettext("Bookmark file is not defined. Use %s to see options.") #define NO_TEMP_FOR_HOTLIST \ - "Unable to open tempfile for X Mosaic hotlist conversion." -#define BOOKMARK_OPEN_FAILED "ERROR - unable to open bookmark file." + gettext("Unable to open tempfile for X Mosaic hotlist conversion.") +#define BOOKMARK_OPEN_FAILED gettext("ERROR - unable to open bookmark file.") #define BOOKMARK_OPEN_FAILED_FOR_DEL \ - "Unable to open bookmark file for deletion of link." -#ifdef VMS + gettext("Unable to open bookmark file for deletion of link.") #define BOOKSCRA_OPEN_FAILED_FOR_DEL \ - "Unable to open scratch file for deletion of link." -#define ERROR_RENAMING_SCRA "Error renaming scratch file." + gettext("Unable to open scratch file for deletion of link.") +#ifdef VMS +#define ERROR_RENAMING_SCRA gettext("Error renaming scratch file.") #else -#define BOOKTEMP_OPEN_FAILED_FOR_DEL \ - "Unable to open temporary file for deletion of link." -#define ERROR_RENAMING_TEMP "Error renaming temporary file." +#define ERROR_RENAMING_TEMP gettext("Error renaming temporary file.") +#define BOOKTEMP_COPY_FAIL \ + gettext("Unable to copy temporary file for deletion of link.") #define BOOKTEMP_REOPEN_FAIL_FOR_DEL \ - "Unable to reopen temporary file for deletion of link." + gettext("Unable to reopen temporary file for deletion of link.") #endif /* VMS */ #define BOOKMARK_LINK_NOT_ONE_LINE \ - "Link is not by itself all on one line in bookmark file." -#define BOOKMARK_DEL_FAILED "Bookmark deletion failed." + gettext("Link is not by itself all on one line in bookmark file.") +#define BOOKMARK_DEL_FAILED gettext("Bookmark deletion failed.") #define BOOKMARKS_NOT_TRAVERSED \ - "Bookmark files cannot be traversed (only http URLs)." + gettext("Bookmark files cannot be traversed (only http URLs).") #define BOOKMARKS_NOT_OPEN \ - "Unable to open bookmark file, use 'a' to save a link first" -#define BOOKMARKS_NOLINKS "There are no links in this bookmark file!" + gettext("Unable to open bookmark file, use 'a' to save a link first") +#define BOOKMARKS_NOLINKS gettext("There are no links in this bookmark file!") #define BOOK_D_L_OR_CANCEL \ - "Save D)ocument or L)ink to bookmark file or C)ancel? (d,l,c): " -#define BOOK_D_OR_CANCEL "Save D)ocument to bookmark file or C)ancel? (d,c): " -#define BOOK_L_OR_CANCEL "Save L)ink to bookmark file or C)ancel? (l,c): " + gettext("Save D)ocument or L)ink to bookmark file or C)ancel? (d,l,c): ") +#define BOOK_D_OR_CANCEL gettext("Save D)ocument to bookmark file or C)ancel? (d,c): ") +#define BOOK_L_OR_CANCEL gettext("Save L)ink to bookmark file or C)ancel? (l,c): ") #define NOBOOK_POST_FORM \ - "Documents from forms with POST content cannot be saved as bookmarks." -#define NOBOOK_FORM_FIELD "Cannot save form fields/links" + gettext("Documents from forms with POST content cannot be saved as bookmarks.") +#define NOBOOK_FORM_FIELD gettext("Cannot save form fields/links") #define NOBOOK_HSML \ - "History, showinfo, menu and list files cannot be saved as bookmarks." + gettext("History, showinfo, menu and list files cannot be saved as bookmarks.") #define CONFIRM_BOOKMARK_DELETE \ - "Do you really want to delete this link from your bookmark file? (y/n)" -#define MALFORMED_ADDRESS "Malformed address." + gettext("Do you really want to delete this link from your bookmark file?") +#define MALFORMED_ADDRESS gettext("Malformed address.") #define HISTORICAL_ON_MINIMAL_OFF \ - "Historical comment parsing ON (Minimal is overridden)!" + gettext("Historical comment parsing ON (Minimal is overridden)!") #define HISTORICAL_OFF_MINIMAL_ON \ - "Historical comment parsing OFF (Minimal is in effect)!" + gettext("Historical comment parsing OFF (Minimal is in effect)!") #define HISTORICAL_ON_VALID_OFF \ - "Historical comment parsing ON (Valid is overridden)!" + gettext("Historical comment parsing ON (Valid is overridden)!") #define HISTORICAL_OFF_VALID_ON \ - "Historical comment parsing OFF (Valid is in effect)!" + gettext("Historical comment parsing OFF (Valid is in effect)!") #define MINIMAL_ON_IN_EFFECT \ - "Minimal comment parsing ON (and in effect)!" + gettext("Minimal comment parsing ON (and in effect)!") #define MINIMAL_OFF_VALID_ON \ - "Minimal comment parsing OFF (Valid is in effect)!" + gettext("Minimal comment parsing OFF (Valid is in effect)!") #define MINIMAL_ON_BUT_HISTORICAL \ - "Minimal comment parsing ON (but Historical is in effect)!" + gettext("Minimal comment parsing ON (but Historical is in effect)!") #define MINIMAL_OFF_HISTORICAL_ON \ - "Minimal comment parsing OFF (Historical is in effect)!" -#define SOFT_DOUBLE_QUOTE_ON "Soft double-quote parsing ON!" -#define SOFT_DOUBLE_QUOTE_OFF "Soft double-quote parsing OFF!" -#define USING_DTD_0 "Now using TagSoup parsing of HTML." -#define USING_DTD_1 "Now using SortaSGML parsing of HTML!" -#define ALREADY_AT_END "You are already at the end of this document." -#define ALREADY_AT_BEGIN "You are already at the beginning of this document." -#define ALREADY_AT_PAGE "You are already at page %d of this document." -#define LINK_ALREADY_CURRENT "Link number %d already is current." -#define ALREADY_AT_FIRST "You are already at the first document" -#define NO_LINKS_ABOVE "There are no links above this line of the document." -#define NO_LINKS_BELOW "There are no links below this line of the document." + gettext("Minimal comment parsing OFF (Historical is in effect)!") +#define SOFT_DOUBLE_QUOTE_ON gettext("Soft double-quote parsing ON!") +#define SOFT_DOUBLE_QUOTE_OFF gettext("Soft double-quote parsing OFF!") +#define USING_DTD_0 gettext("Now using TagSoup parsing of HTML.") +#define USING_DTD_1 gettext("Now using SortaSGML parsing of HTML!") +#define ALREADY_AT_END gettext("You are already at the end of this document.") +#define ALREADY_AT_BEGIN gettext("You are already at the beginning of this document.") +#define ALREADY_AT_PAGE gettext("You are already at page %d of this document.") +#define LINK_ALREADY_CURRENT gettext("Link number %d already is current.") +#define ALREADY_AT_FIRST gettext("You are already at the first document") +#define NO_LINKS_ABOVE gettext("There are no links above this line of the document.") +#define NO_LINKS_BELOW gettext("There are no links below this line of the document.") #define MAXLEN_REACHED_DEL_OR_MOV \ - "Maximum length reached! Delete text or move off field." + gettext("Maximum length reached! Delete text or move off field.") #define NOT_ON_SUBMIT_OR_LINK \ - "You are not on a form submission button or normal link." + gettext("You are not on a form submission button or normal link.") #define NEED_CHECKED_RADIO_BUTTON \ - "One radio button must be checked at all times!" -#define PREV_DOC_QUERY "Do you want to go back to the previous document? [N]" -#define ARROWS_OR_TAB_TO_MOVE "Use arrows or tab to move off of field." + gettext("One radio button must be checked at all times!") +#define PREV_DOC_QUERY gettext("Do you want to go back to the previous document?") +#define ARROWS_OR_TAB_TO_MOVE gettext("Use arrows or tab to move off of field.") #define ENTER_TEXT_ARROWS_OR_TAB \ - "Enter text. Use arrows or tab to move off of field." -#define NO_FORM_ACTION "** Bad HTML!! No form action defined. **" -#define BAD_HTML_NO_POPUP "Bad HTML!! Unable to create popup window!" -#define POPUP_FAILED "Unable to create popup window!" -#define GOTO_DISALLOWED "Goto a random URL is disallowed!" -#define GOTO_NON_HTTP_DISALLOWED "Goto a non-http URL is disallowed!" -#define GOTO_CSO_DISALLOWED "You are not allowed to goto \"cso:\" URLs" -#define GOTO_FILE_DISALLOWED "You are not allowed to goto \"file:\" URLs" -#define GOTO_FINGER_DISALLOWED "You are not allowed to goto \"finger:\" URLs" -#define GOTO_FTP_DISALLOWED "You are not allowed to goto \"ftp:\" URLs" -#define GOTO_GOPHER_DISALLOWED "You are not allowed to goto \"gopher:\" URLs" -#define GOTO_HTTP_DISALLOWED "You are not allowed to goto \"http:\" URLs" -#define GOTO_HTTPS_DISALLOWED "You are not allowed to goto \"https:\" URLs" -#define GOTO_CGI_DISALLOWED "You are not allowed to goto \"lynxcgi:\" URLs" -#define GOTO_EXEC_DISALLOWED "You are not allowed to goto \"lynxexec:\" URLs" -#define GOTO_PROG_DISALLOWED "You are not allowed to goto \"lynxprog:\" URLs" -#define GOTO_MAILTO_DISALLOWED "You are not allowed to goto \"mailto:\" URLs" -#define GOTO_NEWS_DISALLOWED "You are not allowed to goto \"news:\" URLs" -#define GOTO_NNTP_DISALLOWED "You are not allowed to goto \"nntp:\" URLs" -#define GOTO_RLOGIN_DISALLOWED "You are not allowed to goto \"rlogin:\" URLs" -#define GOTO_SNEWS_DISALLOWED "You are not allowed to goto \"snews:\" URLs" -#define GOTO_TELNET_DISALLOWED "You are not allowed to goto \"telnet:\" URLs" -#define GOTO_TN3270_DISALLOWED "You are not allowed to goto \"tn3270:\" URLs" -#define GOTO_WAIS_DISALLOWED "You are not allowed to goto \"wais:\" URLs" -#define GOTO_SPECIAL_DISALLOWED "This special URL is not allowed as a goto!" -#define URL_TO_OPEN "URL to open: " -#define EDIT_CURRENT_GOTO "Edit the current Goto URL: " -#define EDIT_THE_PREV_GOTO "Edit the previous Goto URL: " -#define EDIT_A_PREV_GOTO "Edit a previous Goto URL: " -#define CURRENT_DOC_HAS_POST_DATA "Current document has POST data." -#define EDIT_CURDOC_URL "Edit this document's URL: " -#define EDIT_CURLINK_URL "Edit the current link's URL: " -#define EDIT_FM_MENU_URLS_DISALLOWED "You cannot edit File Management URLs" -#define ENTER_DATABASE_QUERY "Enter a database query: " -#define ENTER_WHEREIS_QUERY "Enter a whereis query: " -#define EDIT_CURRENT_QUERY "Edit the current query: " -#define EDIT_THE_PREV_QUERY "Edit the previous query: " -#define EDIT_A_PREV_QUERY "Edit a previous query: " + gettext("Enter text. Use arrows or tab to move off of field.") +#define NO_FORM_ACTION gettext("** Bad HTML!! No form action defined. **") +#define BAD_HTML_NO_POPUP gettext("Bad HTML!! Unable to create popup window!") +#define POPUP_FAILED gettext("Unable to create popup window!") +#define GOTO_DISALLOWED gettext("Goto a random URL is disallowed!") +#define GOTO_NON_HTTP_DISALLOWED gettext("Goto a non-http URL is disallowed!") +#define GOTO_CSO_DISALLOWED gettext("You are not allowed to goto \"cso:\" URLs") +#define GOTO_FILE_DISALLOWED gettext("You are not allowed to goto \"file:\" URLs") +#define GOTO_FINGER_DISALLOWED gettext("You are not allowed to goto \"finger:\" URLs") +#define GOTO_FTP_DISALLOWED gettext("You are not allowed to goto \"ftp:\" URLs") +#define GOTO_GOPHER_DISALLOWED gettext("You are not allowed to goto \"gopher:\" URLs") +#define GOTO_HTTP_DISALLOWED gettext("You are not allowed to goto \"http:\" URLs") +#define GOTO_HTTPS_DISALLOWED gettext("You are not allowed to goto \"https:\" URLs") +#define GOTO_CGI_DISALLOWED gettext("You are not allowed to goto \"lynxcgi:\" URLs") +#define GOTO_EXEC_DISALLOWED gettext("You are not allowed to goto \"lynxexec:\" URLs") +#define GOTO_PROG_DISALLOWED gettext("You are not allowed to goto \"lynxprog:\" URLs") +#define GOTO_MAILTO_DISALLOWED gettext("You are not allowed to goto \"mailto:\" URLs") +#define GOTO_NEWS_DISALLOWED gettext("You are not allowed to goto \"news:\" URLs") +#define GOTO_NNTP_DISALLOWED gettext("You are not allowed to goto \"nntp:\" URLs") +#define GOTO_RLOGIN_DISALLOWED gettext("You are not allowed to goto \"rlogin:\" URLs") +#define GOTO_SNEWS_DISALLOWED gettext("You are not allowed to goto \"snews:\" URLs") +#define GOTO_TELNET_DISALLOWED gettext("You are not allowed to goto \"telnet:\" URLs") +#define GOTO_TN3270_DISALLOWED gettext("You are not allowed to goto \"tn3270:\" URLs") +#define GOTO_WAIS_DISALLOWED gettext("You are not allowed to goto \"wais:\" URLs") +#define GOTO_SPECIAL_DISALLOWED gettext("This special URL is not allowed as a goto!") +#define URL_TO_OPEN gettext("URL to open: ") +#define EDIT_CURRENT_GOTO gettext("Edit the current Goto URL: ") +#define EDIT_THE_PREV_GOTO gettext("Edit the previous Goto URL: ") +#define EDIT_A_PREV_GOTO gettext("Edit a previous Goto URL: ") +#define CURRENT_DOC_HAS_POST_DATA gettext("Current document has POST data.") +#define EDIT_CURDOC_URL gettext("Edit this document's URL: ") +#define EDIT_CURLINK_URL gettext("Edit the current link's URL: ") +#define EDIT_FM_MENU_URLS_DISALLOWED gettext("You cannot edit File Management URLs") +#define ENTER_DATABASE_QUERY gettext("Enter a database query: ") +#define ENTER_WHEREIS_QUERY gettext("Enter a whereis query: ") +#define EDIT_CURRENT_QUERY gettext("Edit the current query: ") +#define EDIT_THE_PREV_QUERY gettext("Edit the previous query: ") +#define EDIT_A_PREV_QUERY gettext("Edit a previous query: ") #define USE_C_R_TO_RESUB_CUR_QUERY \ - "Use Control-R to resubmit the current query." -#define EDIT_CURRENT_SHORTCUT "Edit the current shortcut: " -#define EDIT_THE_PREV_SHORTCUT "Edit the previous shortcut: " -#define EDIT_A_PREV_SHORTCUT "Edit a previous shortcut: " -#define KEY_NOT_MAPPED_TO_JUMP_FILE "Key '%c' is not mapped to a jump file!" -#define CANNOT_LOCATE_JUMP_FILE "Cannot locate jump file!" -#define CANNOT_OPEN_JUMP_FILE "Cannot open jump file!" -#define ERROR_READING_JUMP_FILE "Error reading jump file!" -#define OUTOF_MEM_FOR_JUMP_FILE "Out of memory reading jump file!" -#define OUTOF_MEM_FOR_JUMP_TABLE "Out of memory reading jump table!" -#define NO_INDEX_FILE "No index is currently available." + gettext("Use Control-R to resubmit the current query.") +#define EDIT_CURRENT_SHORTCUT gettext("Edit the current shortcut: ") +#define EDIT_THE_PREV_SHORTCUT gettext("Edit the previous shortcut: ") +#define EDIT_A_PREV_SHORTCUT gettext("Edit a previous shortcut: ") +#define KEY_NOT_MAPPED_TO_JUMP_FILE gettext("Key '%c' is not mapped to a jump file!") +#define CANNOT_LOCATE_JUMP_FILE gettext("Cannot locate jump file!") +#define CANNOT_OPEN_JUMP_FILE gettext("Cannot open jump file!") +#define ERROR_READING_JUMP_FILE gettext("Error reading jump file!") +#define OUTOF_MEM_FOR_JUMP_FILE gettext("Out of memory reading jump file!") +#define OUTOF_MEM_FOR_JUMP_TABLE gettext("Out of memory reading jump table!") +#define NO_INDEX_FILE gettext("No index is currently available.") #define CONFIRM_MAIN_SCREEN \ - "Do you really want to go to the Main screen? (y/n) [n] " -#define IN_MAIN_SCREEN "You are already at main screen!" + gettext("Do you really want to go to the Main screen?") +#define IN_MAIN_SCREEN gettext("You are already at main screen!") #define NOT_ISINDEX \ - "Not a searchable indexed document -- press '/' to search for a text string" + gettext("Not a searchable indexed document -- press '/' to search for a text string") #define NO_OWNER \ - "No owner is defined for this file so you cannot send a comment" -#define NO_OWNER_USE "No owner is defined. Use %s? [N] " -#define CONFIRM_COMMENT "Do you wish to send a comment? [N]" -#define MAIL_DISALLOWED "Mail is disallowed so you cannot send a comment" -#define EDIT_DISABLED "The 'e'dit command is currently disabled." -#define NO_STATUS "System error - failure to get status." -#define NO_EDITOR "No editor is defined!" -#define PRINT_DISABLED "The 'p'rint command is currently disabled." -#define NO_TOOLBAR "Document has no Toolbar links or Banner." -#define NOOPEN_TRAV_ERR_FILE "Unable to open traversal errors output file" -#define FOLLOW_LINK_NUMBER "Follow link (or goto link or page) number: " -#define SELECT_OPTION_NUMBER "Select option (or page) number: " -#define OPTION_CHOICE_NUMBER "Option choice (or page) number: " -#define OPTION_ALREADY_CURRENT "Option number %d already is current." -#define CHOICE_ALREADY_CURRENT "Choice number %d already is current." + gettext("No owner is defined for this file so you cannot send a comment") +#define NO_OWNER_USE gettext("No owner is defined. Use %s?") +#define CONFIRM_COMMENT gettext("Do you wish to send a comment?") +#define MAIL_DISALLOWED gettext("Mail is disallowed so you cannot send a comment") +#define EDIT_DISABLED gettext("The 'e'dit command is currently disabled.") +#define NO_STATUS gettext("System error - failure to get status.") +#define NO_EDITOR gettext("No editor is defined!") +#define PRINT_DISABLED gettext("The 'p'rint command is currently disabled.") +#define NO_TOOLBAR gettext("Document has no Toolbar links or Banner.") +#define CANNOT_OPEN_TRAV_FILE gettext("Unable to open traversal file.") +#define CANNOT_OPEN_TRAF_FILE gettext("Unable to open traversal found file.") +#define CANNOT_OPEN_REJ_FILE gettext("Unable to open reject file.") +#define NOOPEN_TRAV_ERR_FILE gettext("Unable to open traversal errors output file") +#define TRAV_WAS_INTERRUPTED gettext("TRAVERSAL WAS INTERRUPTED") +#define FOLLOW_LINK_NUMBER gettext("Follow link (or goto link or page) number: ") +#define SELECT_OPTION_NUMBER gettext("Select option (or page) number: ") +#define OPTION_CHOICE_NUMBER gettext("Option choice (or page) number: ") +#define OPTION_ALREADY_CURRENT gettext("Option number %d already is current.") +#define CHOICE_ALREADY_CURRENT gettext("Choice number %d already is current.") #define ALREADY_AT_OPTION_END \ - "You are already at the end of this option list." + gettext("You are already at the end of this option list.") #define ALREADY_AT_CHOICE_END \ - "You are already at the end of this choice list." + gettext("You are already at the end of this choice list.") #define ALREADY_AT_OPTION_BEGIN \ - "You are already at the beginning of this option list." + gettext("You are already at the beginning of this option list.") #define ALREADY_AT_CHOICE_BEGIN \ - "You are already at the beginning of this choice list." + gettext("You are already at the beginning of this choice list.") #define ALREADY_AT_OPTION_PAGE \ - "You are already at page %d of this option list." + gettext("You are already at page %d of this option list.") #define ALREADY_AT_CHOICE_PAGE \ - "You are already at page %d of this choice list." -#define BAD_OPTION_NUM_ENTERED "You have entered an invalid option number." -#define BAD_CHOICE_NUM_ENTERED "You have entered an invalid choice number." -#define BAD_HTML_USE_TRACE "** Bad HTML!! Use -trace to diagnose. **" -#define CANNOT_OPEN_TEMP "Can't open temporary file!" -#define CANNOT_OPEN_OUTPUT "Can't open output file! Cancelling!" -#define EXECUTION_DISABLED "Execution is disabled." + gettext("You are already at page %d of this choice list.") +#define BAD_OPTION_NUM_ENTERED gettext("You have entered an invalid option number.") +#define BAD_CHOICE_NUM_ENTERED gettext("You have entered an invalid choice number.") +#define BAD_HTML_USE_TRACE gettext("** Bad HTML!! Use -trace to diagnose. **") +#define GIVE_FILENAME gettext("Give name of file to save in") +#define CANNOT_SAVE_REMOTE gettext("Can't save data to file -- please run WWW locally") +#define CANNOT_OPEN_TEMP gettext("Can't open temporary file!") +#define CANNOT_OPEN_OUTPUT gettext("Can't open output file! Cancelling!") +#define EXECUTION_DISABLED gettext("Execution is disabled.") #define EXECUTION_DISABLED_FOR_FILE \ - "Execution is not enabled for this file. See the Options menu (use %s)." + gettext("Execution is not enabled for this file. See the Options menu (use %s).") #define EXECUTION_NOT_COMPILED \ - "Execution capabilities are not compiled into this version." -#define CANNOT_DISPLAY_FILE "This file cannot be displayed on this terminal." + gettext("Execution capabilities are not compiled into this version.") +#define CANNOT_DISPLAY_FILE gettext("This file cannot be displayed on this terminal.") #define CANNOT_DISPLAY_FILE_D_OR_C \ - "This file cannot be displayed on this terminal: D)ownload, or C)ancel" -#define WRONG_CHARSET_D_OR_C "%s D)ownload, or C)ancel" -#define UNMAPPED_TYPE_D_OR_C "%s D)ownload, or C)ancel" -#define CANCELLING_FILE "Cancelling file." -#define RETRIEVING_FILE "Retrieving file. - PLEASE WAIT -" -#define FILENAME_PROMPT "Enter a filename: " -#define EDIT_THE_PREV_FILENAME "Edit the previous filename: " -#define EDIT_A_PREV_FILENAME "Edit a previous filename: " -#define NEW_FILENAME_PROMPT "Enter a new filename: " -#define FILENAME_CANNOT_BE_DOT "File name may not begin with a dot." + gettext("This file cannot be displayed on this terminal: D)ownload, or C)ancel") +#define MSG_DOWNLOAD_OR_CANCEL gettext("%s D)ownload, or C)ancel") +#define CANCELLING_FILE gettext("Cancelling file.") +#define RETRIEVING_FILE gettext("Retrieving file. - PLEASE WAIT -") +#define FILENAME_PROMPT gettext("Enter a filename: ") +#define EDIT_THE_PREV_FILENAME gettext("Edit the previous filename: ") +#define EDIT_A_PREV_FILENAME gettext("Edit a previous filename: ") +#define NEW_FILENAME_PROMPT gettext("Enter a new filename: ") +#define FILENAME_CANNOT_BE_DOT gettext("File name may not begin with a dot.") #ifdef VMS -#define FILE_EXISTS_HPROMPT "File exists. Create higher version? (y/n)" +#define FILE_EXISTS_HPROMPT gettext("File exists. Create higher version?") #else -#define FILE_EXISTS_OPROMPT "File exists. Overwrite? (y/n)" +#define FILE_EXISTS_OPROMPT gettext("File exists. Overwrite?") #endif /* VMS */ -#define CANNOT_WRITE_TO_FILE "Cannot write to file." -#define MISCONF_DOWNLOAD_COMMAND "ERROR! - download command is misconfigured." -#define CANNOT_DOWNLOAD_FILE "Unable to download file." -#define SAVING "Saving..." -#define COULD_NOT_ACCESS_FILE "Could not access file." +#define CANNOT_WRITE_TO_FILE gettext("Cannot write to file.") +#define MISCONF_DOWNLOAD_COMMAND gettext("ERROR! - download command is misconfigured.") +#define CANNOT_DOWNLOAD_FILE gettext("Unable to download file.") +#define BUILDING_DIR_LIST gettext("Building directory listing...") +#define SAVING gettext("Saving...") +#define COULD_NOT_EDIT_FILE gettext("Could not edit file '%s'.") +#define COULD_NOT_ACCESS_FILE gettext("Could not access file.") +#define COULD_NOT_ACCESS_DIR gettext("Could not access directory.") +#define COULD_NOT_LOAD_DATA gettext("Could not load data.") #define CANNOT_EDIT_REMOTE_FILES \ - "Lynx cannot currently (E)dit remote WWW files" -#define NOAUTH_TO_EDIT_FILE "You are not authorized to edit this file." -#define TITLE_PROMPT "Title: " -#define SUBJECT_PROMPT "Subject: " -#define USERNAME_PROMPT "Username: " -#define PASSWORD_PROMPT "Password: " -#define USERNAME_PASSWORD_REQUIRED "lynx: Username and Password required!!!" -#define PASSWORD_REQUIRED "lynx: Password required!!!" -#define CLEAR_ALL_AUTH_INFO "Clear all authorization info for this session?" -#define AUTH_INFO_CLEARED "Authorization info cleared." -#define CGI_DISABLED "cgi support has been disabled by system administrator." + gettext("Lynx cannot currently (e)dit remote WWW files.") +#define CANNOT_EDIT_FIELD \ + gettext("This field cannot be (e)dited with an external editor.") +#define RULE_INCORRECT gettext("Bad rule") +#define RULE_NEEDS_DATA gettext("Insufficient operands:") +#define NOAUTH_TO_EDIT_FILE gettext("You are not authorized to edit this file.") +#define TITLE_PROMPT gettext("Title: ") +#define SUBJECT_PROMPT gettext("Subject: ") +#define USERNAME_PROMPT gettext("Username: ") +#define PASSWORD_PROMPT gettext("Password: ") +#define USERNAME_PASSWORD_REQUIRED gettext("lynx: Username and Password required!!!") +#define PASSWORD_REQUIRED gettext("lynx: Password required!!!") +#define CLEAR_ALL_AUTH_INFO gettext("Clear all authorization info for this session?") +#define AUTH_INFO_CLEARED gettext("Authorization info cleared.") +#define AUTH_FAILED_PROMPT gettext("Authorization failed. Retry?") +#define CGI_DISABLED gettext("cgi support has been disabled by system administrator.") #define CGI_NOT_COMPILED \ - "Lynxcgi capabilities are not compiled into this version." -#define CANNOT_CONVERT_I_TO_O "Sorry, no known way of converting %s to %s." -#define CONNECT_SET_FAILED "Unable to set up connection." -#define CONNECT_FAILED "Unable to make connection" + gettext("Lynxcgi capabilities are not compiled into this version.") +#define CANNOT_CONVERT_I_TO_O gettext("Sorry, no known way of converting %s to %s.") +#define CONNECT_SET_FAILED gettext("Unable to set up connection.") +#define CONNECT_FAILED gettext("Unable to make connection") #define MALFORMED_EXEC_REQUEST \ - "Executable link rejected due to malformed request." + gettext("Executable link rejected due to malformed request.") #define BADCHAR_IN_EXEC_LINK \ - "Executable link rejected due to `%c' character." + gettext("Executable link rejected due to `%c' character.") #define RELPATH_IN_EXEC_LINK \ - "Executable link rejected due to relative path string ('../')." + gettext("Executable link rejected due to relative path string ('../').") #define BADLOCPATH_IN_EXEC_LINK \ - "Executable link rejected due to location or path." -#define MAIL_DISABLED "Mail access is disabled!" + gettext("Executable link rejected due to location or path.") +#define MAIL_DISABLED gettext("Mail access is disabled!") #define ACCESS_ONLY_LOCALHOST \ - "Only files and servers on the local host can be accessed." -#define TELNET_DISABLED "Telnet access is disabled!" + gettext("Only files and servers on the local host can be accessed.") +#define TELNET_DISABLED gettext("Telnet access is disabled!") #define TELNET_PORT_SPECS_DISABLED \ - "Telnet port specifications are disabled." -#define NEWS_DISABLED "USENET news access is disabled!" -#define RLOGIN_DISABLED "Rlogin access is disabled!" -#define FTP_DISABLED "Ftp access is disabled!" -#define NO_REFS_FROM_DOC "There are no references from this document." -#define NO_VISIBLE_REFS_FROM_DOC "There are only hidden links from this document." + gettext("Telnet port specifications are disabled.") +#define NEWS_DISABLED gettext("USENET news access is disabled!") +#define RLOGIN_DISABLED gettext("Rlogin access is disabled!") +#define FTP_DISABLED gettext("Ftp access is disabled!") +#define NO_REFS_FROM_DOC gettext("There are no references from this document.") +#define NO_VISIBLE_REFS_FROM_DOC gettext("There are only hidden links from this document.") #ifdef VMS -#define CANNOT_OPEN_COMFILE "Unable to open command file." +#define CANNOT_OPEN_COMFILE gettext("Unable to open command file.") #endif /* VMS */ -#define NEWS_POST_CANCELLED "News Post Cancelled!!!" +#define NEWS_POST_CANCELLED gettext("News Post Cancelled!!!") #define SPAWNING_EDITOR_FOR_NEWS \ - "Spawning your selected editor to edit news message" -#define POST_MSG_PROMPT "Post this message? (y/n) " -#define APPEND_SIG_FILE "Append '%s'? (y/n) " -#define POSTING_TO_NEWS "Posting to newsgroup(s)..." + gettext("Spawning your selected editor to edit news message") +#define POST_MSG_PROMPT gettext("Post this message?") +#define APPEND_SIG_FILE gettext("Append '%s'?") +#define POSTING_TO_NEWS gettext("Posting to newsgroup(s)...") #ifdef VMS -#define HAVE_UNREAD_MAIL_MSG "*** You have unread mail. ***" +#define HAVE_UNREAD_MAIL_MSG gettext("*** You have unread mail. ***") #else -#define HAVE_MAIL_MSG "*** You have mail. ***" +#define HAVE_MAIL_MSG gettext("*** You have mail. ***") #endif /* VMS */ -#define HAVE_NEW_MAIL_MSG "*** You have new mail. ***" -#define SAVE_REQUEST_CANCELLED "Save request cancelled!!!" -#define MAIL_REQUEST_CANCELLED "Mail request cancelled!!!" +#define HAVE_NEW_MAIL_MSG gettext("*** You have new mail. ***") +#define FILE_INSERT_CANCELLED gettext("File insert cancelled!!!") +#define FILE_DOES_NOT_EXIST gettext("File does not exist.") +#define FILE_DOES_NOT_EXIST_RE gettext("File does not exist - reenter or cancel:") +#define FILE_NOT_READABLE gettext("File is not readable.") +#define FILE_NOT_READABLE_RE gettext("File is not readable - reenter or cancel:") +#define FILE_INSERT_0_LENGTH gettext("Nothing to insert - file is 0-length.") +#define SAVE_REQUEST_CANCELLED gettext("Save request cancelled!!!") +#define MAIL_REQUEST_CANCELLED gettext("Mail request cancelled!!!") #define CONFIRM_MAIL_SOURCE_PREPARSED \ - "Viewing preparsed source. Are you sure you want to mail it? [y]" -#define MAILING_FILE "Mailing file. Please wait..." -#define MAIL_REQUEST_FAILED "ERROR - Unable to mail file" + gettext("Viewing preparsed source. Are you sure you want to mail it?") +#define PLEASE_WAIT gettext("Please wait...") +#define MAILING_FILE gettext("Mailing file. Please wait...") +#define MAIL_REQUEST_FAILED gettext("ERROR - Unable to mail file") #define CONFIRM_LONG_SCREEN_PRINT \ - "File is %d screens long. Are you sure you want to print? [y]" -#define PRINT_REQUEST_CANCELLED "Print request cancelled!!!" -#define PRESS_RETURN_TO_BEGIN "Press to begin: " -#define PRESS_RETURN_TO_FINISH "Press to finish: " + gettext("File is %d screens long. Are you sure you want to print?") +#define PRINT_REQUEST_CANCELLED gettext("Print request cancelled!!!") +#define PRESS_RETURN_TO_BEGIN gettext("Press to begin: ") +#define PRESS_RETURN_TO_FINISH gettext("Press to finish: ") #define CONFIRM_LONG_PAGE_PRINT \ - "File is %d pages long. Are you sure you want to print? [y]" -#define FILE_ALLOC_FAILED "ERROR - Unable to allocate file space!!!" -#define UNABLE_TO_OPEN_TEMPFILE "Unable to open tempfile" -#define UNABLE_TO_OPEN_PRINTOP_FILE "Unable to open print options file" -#define PRINTING_FILE "Printing file. Please wait..." -#define MAIL_ADDRESS_PROMPT "Please enter a valid internet mail address: " -#define PRINTER_MISCONF_ERROR "ERROR! - printer is misconfigured!" -#define MISDIRECTED_MAP_REQUEST "Misdirected client-side image MAP request!" -#define MAP_NOT_ACCESSIBLE "Client-side image MAP is not accessible!" -#define MAPS_NOT_AVAILABLE "No client-side image MAPs are available!" -#define MAP_NOT_AVAILABLE "Client-side image MAP is not available!" + gettext("File is %d pages long. Are you sure you want to print?") +#define CHECK_PRINTER \ + gettext("Be sure your printer is on-line. Press to start printing:") +#define FILE_ALLOC_FAILED gettext("ERROR - Unable to allocate file space!!!") +#define UNABLE_TO_OPEN_TEMPFILE gettext("Unable to open tempfile") +#define UNABLE_TO_OPEN_PRINTOP_FILE gettext("Unable to open print options file") +#define PRINTING_FILE gettext("Printing file. Please wait...") +#define MAIL_ADDRESS_PROMPT gettext("Please enter a valid internet mail address: ") +#define PRINTER_MISCONF_ERROR gettext("ERROR! - printer is misconfigured!") +#define FAILED_MAP_POST_REQUEST gettext("Image map from POST response not available!") +#define MISDIRECTED_MAP_REQUEST gettext("Misdirected client-side image MAP request!") +#define MAP_NOT_ACCESSIBLE gettext("Client-side image MAP is not accessible!") +#define MAPS_NOT_AVAILABLE gettext("No client-side image MAPs are available!") +#define MAP_NOT_AVAILABLE gettext("Client-side image MAP is not available!") +#ifndef NO_OPTION_MENU #define OPTION_SCREEN_NEEDS_24 \ - "Screen height must be at least 24 lines for the Options menu!" + gettext("Screen height must be at least 24 lines for the Options menu!") #define OPTION_SCREEN_NEEDS_23 \ - "Screen height must be at least 23 lines for the Options menu!" + gettext("Screen height must be at least 23 lines for the Options menu!") #define OPTION_SCREEN_NEEDS_22 \ - "Screen height must be at least 22 lines for the Options menu!" -#define NEED_ADVANCED_USER_MODE "That key requires Advanced User mode." -#define COMMAND_PROMPT "Command: " -#define SELECT_SEGMENT "Select " -#define CAP_LETT_SEGMENT "capital letter" -#define OF_OPT_LINE_SEGMENT " of option line," -#define TO_SAVE_SEGMENT " to save," -#define OR_SEGMENT " or " -#define TO_RETURN_SEGMENT " to return to Lynx." -#define ACCEPT_DATA "Hit RETURN to accept entered data." + gettext("Screen height must be at least 22 lines for the Options menu!") +#endif /* !NO_OPTION_MENU */ +#define NEED_ADVANCED_USER_MODE gettext("That key requires Advanced User mode.") +#define CONTENT_TYPE_MSG gettext("Content-type: %s") +#define COMMAND_PROMPT gettext("Command: ") +#define VERSION_SEGMENT gettext(" Version ") +#define FIRST_SEGMENT gettext(" first.") +#define GUESSING_SEGMENT gettext(", guessing...") +#define PERMISSIONS_SEGMENT gettext("Permissions for ") +#define SELECT_SEGMENT gettext("Select ") +#define CAP_LETT_SEGMENT gettext("capital letter") +#define OF_OPT_LINE_SEGMENT gettext(" of option line,") +#define TO_SAVE_SEGMENT gettext(" to save,") +#define TO_SEGMENT gettext(" to ") +#define OR_SEGMENT gettext(" or ") +#define INDEX_SEGMENT gettext(" index") +#define TO_RETURN_SEGMENT gettext(" to return to Lynx.") +#define ACCEPT_CHANGES gettext("Accept Changes") +#define RESET_CHANGES gettext("Reset Changes") +#define CANCEL_CHANGES gettext("Left Arrow cancels changes") +#define SAVE_OPTIONS gettext("Save options to disk") +#define ACCEPT_DATA gettext("Hit RETURN to accept entered data.") #define ACCEPT_DATA_OR_DEFAULT \ -"Hit RETURN to accept entered data. Delete data to invoke the default." -#define VALUE_ACCEPTED "Value accepted!" + gettext("Hit RETURN to accept entered data. Delete data to invoke the default.") +#define VALUE_ACCEPTED gettext("Value accepted!") #define VALUE_ACCEPTED_WARNING_X \ - "Value accepted! -- WARNING: Lynx is configured for XWINDOWS!" + gettext("Value accepted! -- WARNING: Lynx is configured for XWINDOWS!") #define VALUE_ACCEPTED_WARNING_NONX \ - "Value accepted! -- WARNING: Lynx is NOT configured for XWINDOWS!" -#define EDITOR_LOCKED "You are not allowed to change which editor to use!" -#define FAILED_TO_SET_DISPLAY "Failed to set DISPLAY variable!" -#define FAILED_CLEAR_SET_DISPLAY "Failed to clear DISPLAY variable!" + gettext("Value accepted! -- WARNING: Lynx is NOT configured for XWINDOWS!") +#define EDITOR_LOCKED gettext("You are not allowed to change which editor to use!") +#define FAILED_TO_SET_DISPLAY gettext("Failed to set DISPLAY variable!") +#define FAILED_CLEAR_SET_DISPLAY gettext("Failed to clear DISPLAY variable!") #define BOOKMARK_CHANGE_DISALLOWED \ - "You are not allowed to change the bookmark file!" -#define COLOR_TOGGLE_DISABLED "Terminal does not support color" -#define COLOR_TOGGLE_DISABLED_FOR_TERM "Your '%s' terminal does not support color." -#define DOTFILE_ACCESS_DISABLED "Access to dot files is disabled!" + gettext("You are not allowed to change the bookmark file!") +#define COLOR_TOGGLE_DISABLED gettext("Terminal does not support color") +#define COLOR_TOGGLE_DISABLED_FOR_TERM gettext("Your '%s' terminal does not support color.") +#define DOTFILE_ACCESS_DISABLED gettext("Access to dot files is disabled!") #define UA_COPYRIGHT_WARNING \ - "WARNING: Misrepresentation of the User-Agent may be a copyright violation!" + gettext("WARNING: Misrepresentation of the User-Agent may be a copyright violation!") #define CHANGE_OF_SETTING_DISALLOWED \ - "You are not allowed to change this setting." -#define SAVING_OPTIONS "Saving Options..." -#define OPTIONS_SAVED "Options saved!" -#define OPTIONS_NOT_SAVED "Unable to save Options!" -#define R_TO_RETURN_TO_LYNX " 'r' to return to Lynx " -#define SAVE_OR_R_TO_RETURN_TO_LYNX " '>' to save, or 'r' to return to Lynx " + gettext("You are not allowed to change this setting.") +#define SAVING_OPTIONS gettext("Saving Options...") +#define OPTIONS_SAVED gettext("Options saved!") +#define OPTIONS_NOT_SAVED gettext("Unable to save Options!") +#define R_TO_RETURN_TO_LYNX gettext(" 'r' to return to Lynx ") +#define SAVE_OR_R_TO_RETURN_TO_LYNX gettext(" '>' to save, or 'r' to return to Lynx ") #define ANY_KEY_CHANGE_RET_ACCEPT \ - "Hit any key to change value; RETURN to accept." -#define ERROR_UNCOMPRESSING_TEMP "Error uncompressing temporary file!" -#define UNSUPPORTED_URL_SCHEME "Unsupported URL scheme!" -#define UNSUPPORTED_DATA_URL "Unsupported data: URL! Use SHOWINFO, for now." -#define ILLEGAL_REDIRECTION_URL "Illegal redirection URL received from server!" + gettext("Hit any key to change value; RETURN to accept.") +#define ERROR_UNCOMPRESSING_TEMP gettext("Error uncompressing temporary file!") +#define UNSUPPORTED_URL_SCHEME gettext("Unsupported URL scheme!") +#define UNSUPPORTED_DATA_URL gettext("Unsupported data: URL! Use SHOWINFO, for now.") +#define TOO_MANY_REDIRECTIONS gettext("Redirection limit of 10 URL's reached.") +#define ILLEGAL_REDIRECTION_URL gettext("Illegal redirection URL received from server!") #define SERVER_ASKED_FOR_REDIRECTION \ - "Server asked for %d redirection of POST content to" -#define PROCEED_GET_CANCEL "P)roceed, use G)ET or C)ancel " -#define PROCEED_OR_CANCEL "P)roceed, or C)ancel " + gettext("Server asked for %d redirection of POST content to") +#define PROCEED_GET_CANCEL gettext("P)roceed, use G)ET or C)ancel ") +#define PROCEED_OR_CANCEL gettext("P)roceed, or C)ancel ") #define ADVANCED_POST_GET_REDIRECT \ - "Redirection of POST content. P)roceed, see U)RL, use G)ET or C)ancel" + gettext("Redirection of POST content. P)roceed, see U)RL, use G)ET or C)ancel") #define ADVANCED_POST_REDIRECT \ - "Redirection of POST content. P)roceed, see U)RL, or C)ancel" + gettext("Redirection of POST content. P)roceed, see U)RL, or C)ancel") #define CONFIRM_POST_RESUBMISSION \ - "Document from Form with POST content. Resubmit?" + gettext("Document from Form with POST content. Resubmit?") #define CONFIRM_POST_RESUBMISSION_TO \ - "Resubmit POST content to %s ?" + gettext("Resubmit POST content to %s ?") #define CONFIRM_POST_LIST_RELOAD \ - "List from document with POST data. Reload %s ?" + gettext("List from document with POST data. Reload %s ?") #define CONFIRM_POST_DOC_HEAD \ - "Document from POST action, HEAD may not be understood. Proceed?" + gettext("Document from POST action, HEAD may not be understood. Proceed?") #define CONFIRM_POST_LINK_HEAD \ - "Form submit action is POST, HEAD may not be understood. Proceed?" -#define DISCARDING_POST_DATA "Discarding POST data..." -#define WILL_NOT_RELOAD_DOC "Document will not be reloaded!" -#define LOCATION_HEADER "Location: " -#define STRING_NOT_FOUND "'%s' not found!" -#define MULTIBOOKMARKS_DEFAULT "Default Bookmark File" -#define MULTIBOOKMARKS_SMALL "Screen too small! (8x35 min)" -#define MULTIBOOKMARKS_SAVE "Select destination or ^G to Cancel: " + gettext("Form submit action is POST, HEAD may not be understood. Proceed?") +#define CONFIRM_WO_PASSWORD gettext("Proceed without a username and password?") +#define CONFIRM_PROCEED gettext("Proceed (%s)?") +#define CANNOT_POST gettext("Cannot POST to this host.") +#define IGNORED_POST gettext("POST not supported for this URL - ignoring POST data!") +#define DISCARDING_POST_DATA gettext("Discarding POST data...") +#define WILL_NOT_RELOAD_DOC gettext("Document will not be reloaded!") +#define LOCATION_HEADER gettext("Location: ") +#define STRING_NOT_FOUND gettext("'%s' not found!") +#define MULTIBOOKMARKS_DEFAULT gettext("Default Bookmark File") +#define MULTIBOOKMARKS_SMALL gettext("Screen too small! (8x35 min)") +#define MULTIBOOKMARKS_SAVE gettext("Select destination or ^G to Cancel: ") #define MULTIBOOKMARKS_SELECT \ - "Select subbookmark, '=' for menu, or ^G to cancel: " + gettext("Select subbookmark, '=' for menu, or ^G to cancel: ") #define MULTIBOOKMARKS_SELF \ - "Reproduce L)ink in this bookmark file or C)ancel? (l,c): " -#define MULTIBOOKMARKS_DISALLOWED "Multiple bookmark support is not available." -#define MULTIBOOKMARKS_SHEAD_MASK " Select Bookmark (screen %d of %d)" -#define MULTIBOOKMARKS_SHEAD " Select Bookmark" + gettext("Reproduce L)ink in this bookmark file or C)ancel? (l,c): ") +#define MULTIBOOKMARKS_DISALLOWED gettext("Multiple bookmark support is not available.") +#define MULTIBOOKMARKS_SHEAD_MASK gettext(" Select Bookmark (screen %d of %d)") +#define MULTIBOOKMARKS_SHEAD gettext(" Select Bookmark") #define MULTIBOOKMARKS_EHEAD_MASK \ - "Editing Bookmark DESCRIPTION and FILEPATH (%d of 2)" + gettext("Editing Bookmark DESCRIPTION and FILEPATH (%d of 2)") #define MULTIBOOKMARKS_EHEAD \ - " Editing Bookmark DESCRIPTION and FILEPATH" -#define MULTIBOOKMARKS_LETTER "Letter: " + gettext(" Editing Bookmark DESCRIPTION and FILEPATH") +#define MULTIBOOKMARKS_LETTER gettext("Letter: ") #ifdef VMS #define USE_PATH_OFF_HOME \ - "Use a filepath off your login directory in SHELL syntax!" + gettext("Use a filepath off your login directory in SHELL syntax!") #else -#define USE_PATH_OFF_HOME "Use a filepath off your home directory!" +#define USE_PATH_OFF_HOME gettext("Use a filepath off your home directory!") #endif /* VMS */ #define MAXLINKS_REACHED \ - "Maximum links per page exceeded! Use half-page or two-line scrolling." + gettext("Maximum links per page exceeded! Use half-page or two-line scrolling.") #define MAXHIST_REACHED \ - "History List maximum reached! Document not pushed." -#define VISITED_LINKS_EMPTY "No previously visited links available!" -#define MEMORY_EXHAUSTED_ABORT "Memory exhausted! Program aborted!" -#define DFM_NOT_AVAILABLE "Directory/File Manager not available" -#define BASE_NOT_ABSOLUTE "HREF in BASE tag is not an absolute URL." -#define LOCATION_NOT_ABSOLUTE "Location URL is not absolute." -#define REFRESH_URL_NOT_ABSOLUTE "Refresh URL is not absolute." + gettext("History List maximum reached! Document not pushed.") +#define VISITED_LINKS_EMPTY gettext("No previously visited links available!") +#define MEMORY_EXHAUSTED_ABORT gettext("Memory exhausted! Program aborted!") +#define MEMORY_EXHAUSTED_ABORTING gettext("Memory exhausted! Aborting...") +#define DFM_NOT_AVAILABLE gettext("Directory/File Manager not available") +#define BASE_NOT_ABSOLUTE gettext("HREF in BASE tag is not an absolute URL.") +#define LOCATION_NOT_ABSOLUTE gettext("Location URL is not absolute.") +#define REFRESH_URL_NOT_ABSOLUTE gettext("Refresh URL is not absolute.") #define SENDING_MESSAGE_WITH_BODY_TO \ - "You are sending a message with body to:\n " -#define SENDING_COMMENT_TO "You are sending a comment to:\n " -#define WITH_COPY_TO "\n With copy to:\n " -#define WITH_COPIES_TO "\n With copies to:\n " + gettext("You are sending a message with body to:\n ") +#define SENDING_COMMENT_TO gettext("You are sending a comment to:\n ") +#define WITH_COPY_TO gettext("\n With copy to:\n ") +#define WITH_COPIES_TO gettext("\n With copies to:\n ") #define CTRL_G_TO_CANCEL_SEND \ - "\n\nUse Ctrl-G to cancel if you do not want to send a message\n" + gettext("\n\nUse Ctrl-G to cancel if you do not want to send a message\n") #define ENTER_NAME_OR_BLANK \ - "\n Please enter your name, or leave it blank to remain anonymous\n" + gettext("\n Please enter your name, or leave it blank to remain anonymous\n") #define ENTER_MAIL_ADDRESS_OR_OTHER \ - "\n Please enter a mail address or some other\n" + gettext("\n Please enter a mail address or some other\n") #define MEANS_TO_CONTACT_FOR_RESPONSE \ - " means to contact you, if you desire a response.\n" -#define ENTER_SUBJECT_LINE "\n Please enter a subject line.\n" + gettext(" means to contact you, if you desire a response.\n") +#define ENTER_SUBJECT_LINE gettext("\n Please enter a subject line.\n") #define ENTER_ADDRESS_FOR_CC \ - "\n Enter a mail address for a CC of your message.\n" -#define BLANK_FOR_NO_COPY " (Leave blank if you don't want a copy.)\n" -#define REVIEW_MESSAGE_BODY "\n Please review the message body:\n\n" -#define RETURN_TO_CONTINUE "\nPress RETURN to continue: " -#define CTRL_U_TO_ERASE " Use Control-U to erase the default.\n" -#define ENTER_MESSAGE_BELOW "\n Please enter your message below." + gettext("\n Enter a mail address for a CC of your message.\n") +#define BLANK_FOR_NO_COPY gettext(" (Leave blank if you don't want a copy.)\n") +#define REVIEW_MESSAGE_BODY gettext("\n Please review the message body:\n\n") +#define RETURN_TO_CONTINUE gettext("\nPress RETURN to continue: ") +#define RETURN_TO_CLEANUP gettext("\nPress RETURN to clean up: ") +#define CTRL_U_TO_ERASE gettext(" Use Control-U to erase the default.\n") +#define ENTER_MESSAGE_BELOW gettext("\n Please enter your message below.") #define ENTER_PERIOD_WHEN_DONE_A \ - "\n When you are done, press enter and put a single period (.)" + gettext("\n When you are done, press enter and put a single period (.)") #define ENTER_PERIOD_WHEN_DONE_B \ - "\n on a line and press enter again." + gettext("\n on a line and press enter again.") + +/* Cookies messages */ #define ADVANCED_COOKIE_CONFIRMATION \ - "%s cookie: %.*s=%.*s Allow? (Y/N/Always/neVer)" + gettext("%s cookie: %.*s=%.*s Allow? (Y/N/Always/neVer)") #define INVALID_COOKIE_DOMAIN_CONFIRMATION \ - "Accept invalid cookie domain=%s for '%s'?" -#define ALLOWING_COOKIE "Allowing this cookie." -#define REJECTING_COOKIE "Rejecting this cookie." -#define COOKIE_JAR_IS_EMPTY "The Cookie Jar is empty." -#define COOKIE_JAR_TITLE "Lynx Cookie Jar" -#define REACHED_COOKIE_JAR_PAGE "You have reached the Lynx Cookie Jar Page" + gettext("Accept invalid cookie domain=%s for '%s'?") +#define INVALID_COOKIE_PATH_CONFIRMATION \ + gettext("Accept invalid cookie path=%s as a prefix of '%s'?") +#define ALLOWING_COOKIE gettext("Allowing this cookie.") +#define REJECTING_COOKIE gettext("Rejecting this cookie.") +#define COOKIE_JAR_IS_EMPTY gettext("The Cookie Jar is empty.") #define ACTIVATE_TO_GOBBLE \ - "Activate links to gobble up cookies or entire domains," -#define OR_CHANGE_ALLOW "or to change a domain's 'allow' setting." -#define COOKIES_NEVER_ALLOWED "(Cookies never allowed.)" -#define COOKIES_ALWAYS_ALLOWED "(Cookies always allowed.)" -#define COOKIES_ALLOWED_VIA_PROMPT "(Cookies allowed via prompt.)" -#define NO_NAME "(No name.)" -#define NO_VALUE "(No value.)" -#define END_OF_SESSION "(End of session.)" -#define DELETE_COOKIE_CONFIRMATION "Delete this cookie?" -#define COOKIE_EATEN "The cookie has been eaten!" -#define DELETE_EMPTY_DOMAIN_CONFIRMATION "Delete this empty domain?" -#define DOMAIN_EATEN "The domain has been eaten!" + gettext("Activate links to gobble up cookies or entire domains,") +#define OR_CHANGE_ALLOW gettext("or to change a domain's 'allow' setting.") +#define COOKIES_NEVER_ALLOWED gettext("(Cookies never allowed.)") +#define COOKIES_ALWAYS_ALLOWED gettext("(Cookies always allowed.)") +#define COOKIES_ALLOWED_VIA_PROMPT gettext("(Cookies allowed via prompt.)") +#define COOKIES_READ_FROM_FILE gettext("(Persistent Cookies.)") +#define NO_TITLE gettext("(No title.)") +#define NO_NAME gettext("(No name.)") +#define NO_VALUE gettext("(No value.)") +#define NO_NOTHING gettext("None") +#define END_OF_SESSION gettext("(End of session.)") +#define DELETE_COOKIE_CONFIRMATION gettext("Delete this cookie?") +#define COOKIE_EATEN gettext("The cookie has been eaten!") +#define DELETE_EMPTY_DOMAIN_CONFIRMATION gettext("Delete this empty domain?") +#define DOMAIN_EATEN gettext("The domain has been eaten!") #define DELETE_COOKIES_SET_ALLOW_OR_CANCEL \ - "D)elete domain's cookies, set allow A)lways/P)rompt/neV)er, or C)ancel? " + gettext("D)elete domain's cookies, set allow A)lways/P)rompt/neV)er, or C)ancel? ") #define DELETE_DOMAIN_SET_ALLOW_OR_CANCEL \ - "D)elete domain, set allow A)lways/P)rompt/neV)er, or C)ancel? " -#define DOMAIN_COOKIES_EATEN "All cookies in the domain have been eaten!" -#define ALWAYS_ALLOWING_COOKIES "'A'lways allowing from domain '%s'." -#define NEVER_ALLOWING_COOKIES "ne'V'er allowing from domain '%s'." -#define PROMTING_TO_ALLOW_COOKIES "'P'rompting to allow from domain '%s'." -#define DELETE_ALL_COOKIES_IN_DOMAIN "Delete all cookies in this domain?" -#define ALL_COOKIES_EATEN "All of the cookies in the jar have been eaten!" -#define PORT_NINETEEN_INVALID "Port 19 not permitted in URLs." -#define PORT_TWENTYFIVE_INVALID "Port 25 not permitted in URLs." -#define PORT_INVALID "Port %lu not permitted in URLs." -#define URL_PORT_BAD "URL has a bad port field." -#define HTML_STACK_OVERRUN "Maximum nesting of HTML elements exceeded." -#define BAD_PARTIAL_REFERENCE "Bad partial reference! Stripping lead dots." -#define TRACELOG_OPEN_FAILED "Trace Log open failed. Trace off!." -#define LYNX_TRACELOG_TITLE "Lynx Trace Log" -#define NO_TRACELOG_STARTED "No trace log has been started for this session." + gettext("D)elete domain, set allow A)lways/P)rompt/neV)er, or C)ancel? ") +#define DOMAIN_COOKIES_EATEN gettext("All cookies in the domain have been eaten!") +#define ALWAYS_ALLOWING_COOKIES gettext("'A'lways allowing from domain '%s'.") +#define NEVER_ALLOWING_COOKIES gettext("ne'V'er allowing from domain '%s'.") +#define PROMPTING_TO_ALLOW_COOKIES gettext("'P'rompting to allow from domain '%s'.") +#define DELETE_ALL_COOKIES_IN_DOMAIN gettext("Delete all cookies in this domain?") +#define ALL_COOKIES_EATEN gettext("All of the cookies in the jar have been eaten!") + +#define PORT_NINETEEN_INVALID gettext("Port 19 not permitted in URLs.") +#define PORT_TWENTYFIVE_INVALID gettext("Port 25 not permitted in URLs.") +#define PORT_INVALID gettext("Port %lu not permitted in URLs.") +#define URL_PORT_BAD gettext("URL has a bad port field.") +#define HTML_STACK_OVERRUN gettext("Maximum nesting of HTML elements exceeded.") +#define BAD_PARTIAL_REFERENCE gettext("Bad partial reference! Stripping lead dots.") +#define TRACELOG_OPEN_FAILED gettext("Trace Log open failed. Trace off!.") +#define LYNX_TRACELOG_TITLE gettext("Lynx Trace Log") +#define NO_TRACELOG_STARTED gettext("No trace log has been started for this session.") #define MAX_TEMPCOUNT_REACHED \ - "The maximum temporary file count has been reached!" + gettext("The maximum temporary file count has been reached!") #define FORM_VALUE_TOO_LONG \ - "Form field value exceeds buffer length! Trim the tail." + gettext("Form field value exceeds buffer length! Trim the tail.") #define FORM_TAIL_COMBINED_WITH_HEAD \ - "Modified tail combined with head of form field value." + gettext("Modified tail combined with head of form field value.") + +/* HTFile.c */ +#define ENTRY_IS_DIRECTORY gettext("Directory") +#define DISALLOWED_DIR_SCAN gettext("Directory browsing is not allowed.") +#define DISALLOWED_SELECTIVE_ACCESS gettext("Selective access is not enabled for this directory") +#define FAILED_DIR_SCAN gettext("Multiformat: directory scan failed.") +#define FAILED_DIR_UNREADABLE gettext("This directory is not readable.") +#define FAILED_FILE_UNREADABLE gettext("Can't access requested file.") +#define FAILED_NO_REPRESENTATION gettext("Could not find suitable representation for transmission.") +#define FAILED_OPEN_COMPRESSED_FILE gettext("Could not open file for decompression!") +#define LABEL_FILES gettext("Files:") +#define LABEL_SUBDIRECTORIES gettext("Subdirectories:") +#define SEGMENT_DIRECTORY gettext(" directory") +#define SEGMENT_UP_TO gettext("Up to ") +#define SEGMENT_CURRENT_DIR gettext("Current directory is ") + +/* HTGopher.c */ +#define FAILED_NO_RESPONSE gettext("No response from server!") +#define GOPHER_CSO_INDEX gettext("CSO index") +#define GOPHER_CSO_INDEX_SUBTITLE gettext("\nThis is a searchable index of a CSO database.\n") +#define GOPHER_CSO_SEARCH_RESULTS gettext("CSO Search Results") +#define GOPHER_CSO_SEEK_FAILED gettext("Seek fail on %s\n") +#define GOPHER_CSO_SOLICIT_KEYWORDS gettext("\nPress the 's' key and enter search keywords.\n") +#define GOPHER_INDEX_SUBTITLE gettext("\nThis is a searchable Gopher index.\n") +#define GOPHER_INDEX_TITLE gettext("Gopher index") +#define GOPHER_MENU_TITLE gettext("Gopher Menu") +#define GOPHER_SEARCH_RESULTS gettext(" Search Results") +#define GOPHER_SENDING_CSO_REQUEST gettext("Sending CSO/PH request.") +#define GOPHER_SENDING_REQUEST gettext("Sending Gopher request.") +#define GOPHER_SENT_CSO_REQUEST gettext("CSO/PH request sent; waiting for response.") +#define GOPHER_SENT_REQUEST gettext("Gopher request sent; waiting for response.") +#define GOPHER_SOLICIT_KEYWORDS gettext("\nPlease enter search keywords.\n") +#define SEGMENT_KEYWORDS_WILL gettext("\nThe keywords that you enter will allow you to search on a") +#define SEGMENT_PERSONS_DB_NAME gettext(" person's name in the database.\n") + +/* HTNews.c */ +#define FAILED_CONNECTION_CLOSED gettext("Connection closed ???") +#define FAILED_CANNOT_OPEN_POST gettext("Cannot open temporary file for news POST.") +#define FAILED_CANNOT_POST_SSL gettext("This client does not contain support for posting to news with SSL.") + +/* HTStyle.c */ +#define STYLE_DUMP_FONT gettext("Style %d `%s' SGML:%s. Font %s %.1f point.\n") +#define STYLE_DUMP_INDENT gettext("\tIndents: first=%.0f others=%.0f, Height=%.1f Desc=%.1f\n" +#define STYLE_DUMP_ALIGN gettext("\tAlign=%d, %d tabs. (%.0f before, %.0f after)\n") +#define STYLE_DUMP_TAB gettext("\t\tTab kind=%d at %.0f\n") + +/* HTTP.c */ +#define FAILED_NEED_PASSWD gettext("Can't proceed without a username and password.") +#define FAILED_RETRY_WITH_AUTH gettext("Can't retry with authorization! Contact the server's WebMaster.") +#define FAILED_RETRY_WITH_PROXY gettext("Can't retry with proxy authorization! Contact the server's WebMaster.") +#define HTTP_RETRY_WITH_PROXY gettext("Retrying with proxy authorization information.") + +/* HTWAIS.c */ +#define HTWAIS_MESSAGE_TOO_BIG gettext("HTWAIS: Return message too large.") +#define HTWAIS_SOLICIT_QUERY gettext("Enter WAIS query: ") + +/* Miscellaneous status */ +#define RETRYING_AS_HTTP0 gettext("Retrying as HTTP0 request.") +#define TRANSFERRED_X_BYTES gettext("Transferred %d bytes") +#define TRANSFER_COMPLETE gettext("Data transfer complete") +#define FAILED_READING_KEYMAP gettext("Error processing line %d of %s\n") + +/* Lynx internal page titles */ +#define ADDRLIST_PAGE_TITLE gettext("Address List Page") +#define BOOKMARK_TITLE gettext("Bookmark file") +#define CONFIG_DEF_TITLE gettext("Configuration Definitions") +#define COOKIE_JAR_TITLE gettext("Cookie Jar") +#define CURRENT_KEYMAP_TITLE gettext("Current Key Map") +#define DIRED_MENU_TITLE gettext("File Management Options") +#define DOWNLOAD_OPTIONS_TITLE gettext("Download Options") +#define HISTORY_PAGE_TITLE gettext("History Page") +#define LIST_PAGE_TITLE gettext("List Page") +#define LYNXCFG_TITLE gettext("Lynx.cfg Information") +#define MOSAIC_BOOKMARK_TITLE gettext("Converted Mosaic Hotlist") +#define OPTIONS_TITLE gettext("Options Menu") +#define PERMIT_OPTIONS_TITLE gettext("File Permission Options") +#define PRINT_OPTIONS_TITLE gettext("Printing Options") +#define SHOWINFO_TITLE gettext("Information about the current document") +#define STATUSLINES_TITLE gettext("Your recent statusline messages") +#define UPLOAD_OPTIONS_TITLE gettext("Upload Options") +#define VISITED_LINKS_TITLE gettext("Visited Links Page") + +/* CONFIG_DEF_TITLE subtitles */ +#define SEE_ALSO gettext("See also") +#define YOUR_SEGMENT gettext("your") +#define RUNTIME_OPT_SEGMENT gettext("for runtime options") +#define COMPILE_OPT_SEGMENT gettext("compile time options") +#define REL_VERSION gettext("latest release") +#define DEV_VERSION gettext("development version") +#define AUTOCONF_CONFIG_CACHE \ + gettext("The following data were derived during the automatic configuration/build\n\ +process of this copy of Lynx. When reporting a bug, please include a copy\n\ +of this page.") +#define AUTOCONF_LYNXCFG_H \ + gettext("The following data were used as automatically-configured compile-time\n\ +definitions when this copy of Lynx was built.") #ifdef DIRED_SUPPORT #define DIRED_NOVICELINE \ - " C)reate D)ownload E)dit F)ull menu M)odify R)emove T)ag U)pload \n" -#define CURRENT_LINK_STATUS_FAILED "Failed to obtain status of current link!" + gettext(" C)reate D)ownload E)dit F)ull menu M)odify R)emove T)ag U)pload \n") +#define CURRENT_LINK_STATUS_FAILED gettext("Failed to obtain status of current link!") #define INVALID_PERMIT_URL \ - "Special URL only valid from current File Permission menu!" + gettext("Special URL only valid from current File Permission menu!") #endif /* DIRED_SUPPORT */ #ifdef USE_EXTERNALS -#define EXTERNALS_DISABLED "External support is currently disabled." +#define EXTERNALS_DISABLED gettext("External support is currently disabled.") #endif /* USE_EXTERNALS */ #endif /* LYMESSAGES_EN_H */ diff --git a/gnu/usr.bin/lynx/MAKEFILE.W32 b/gnu/usr.bin/lynx/MAKEFILE.W32 index 2c8000e9138..a0960a0b62c 100644 --- a/gnu/usr.bin/lynx/MAKEFILE.W32 +++ b/gnu/usr.bin/lynx/MAKEFILE.W32 @@ -25,7 +25,7 @@ IDE_LFLAGS32 = -LD:\BC45\LIB LLATC32_lynxdexe = -LCURSES;D:\BC45\LIB -wdpl -wdup -Tpe -ap -c RLATC32_lynxdexe = -k -w32 BLATC32_lynxdexe = -CNIEAT_lynxdexe = -I.\;CURSES;SRC;WWW\LIBRARY\IMPLEMENTATION;D:\BC45\INCLUDE;SRC\CHRTRANS -DNO_UNISTD_H;_WINDOWS;XMOSAIC_HACK;ACCESS_AUTH;NO_UTMP;NO_CUSERID;NO_TTYTYPE;NOSIGHUP;DOSPATH;NOUSERS;NCURSES;FANCY_CURSES;COLOR_CURSES;HAVE_KEYPAD;VC="2.14FM";NCURSES_VERSION +CNIEAT_lynxdexe = -I.\;CURSES;SRC;WWW\LIBRARY\IMPLEMENTATION;D:\BC45\INCLUDE;SRC\CHRTRANS -DNO_UNISTD_H;_WINDOWS;XMOSAIC_HACK;ACCESS_AUTH;NO_UTMP;NO_CUSERID;NO_TTYTYPE;NOSIGHUP;DOSPATH;NOUSERS;NCURSES;FANCY_CURSES;COLOR_CURSES;HAVE_KEYPAD;VC="2.14FM";NCURSES_VERSION;DISP_PARTIAL;SOURCE_CACHE;USE_PSRC LNIEAT_lynxdexe = -x LEAT_lynxdexe = $(LLATC32_lynxdexe) REAT_lynxdexe = $(RLATC32_lynxdexe) @@ -129,6 +129,7 @@ Dep_lynxdexe = \ OBJ\lymap.obj\ OBJ\lynews.obj\ OBJ\lyoption.obj\ + OBJ\lypretty.obj\ OBJ\lyprint.obj\ OBJ\lyrcfile.obj\ OBJ\lyreadcf.obj\ @@ -220,6 +221,7 @@ OBJ\lymainlo.obj+ OBJ\lymap.obj+ OBJ\lynews.obj+ OBJ\lyoption.obj+ +OBJ\lypretty.obj+ OBJ\lyprint.obj+ OBJ\lyrcfile.obj+ OBJ\lyreadcf.obj+ @@ -622,6 +624,11 @@ OBJ\lyoption.obj : src\lyoption.c $(CEAT_lynxdexe) $(CNIEAT_lynxdexe) -o$@ src\lyoption.c | +OBJ\lypretty.obj : src\lypretty.c + $(BCC32) -P- -c @&&| + $(CEAT_lynxdexe) $(CNIEAT_lynxdexe) -o$@ src\lypretty.c +| + OBJ\lyprint.obj : src\lyprint.c $(BCC32) -P- -c @&&| $(CEAT_lynxdexe) $(CNIEAT_lynxdexe) -o$@ src\lyprint.c diff --git a/gnu/usr.bin/lynx/Makefile.bsd-wrapper b/gnu/usr.bin/lynx/Makefile.bsd-wrapper index 8e170dcc9d0..5c7a20c76d3 100644 --- a/gnu/usr.bin/lynx/Makefile.bsd-wrapper +++ b/gnu/usr.bin/lynx/Makefile.bsd-wrapper @@ -1,19 +1,20 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.6 1999/12/21 04:07:23 fgsch Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.7 2000/03/25 18:16:42 maja Exp $ MAN= lynx.1 CLEANFILES= lynx.1 GNUCFLAGS= CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" HTMLDIR= /usr/share/doc/html -HELPFILES= keystrokes/bookmark_help.html keystrokes/cookie_help.html \ - keystrokes/dired_help.html keystrokes/edit_help.html \ +HELPFILES= keystrokes/alt_edit_help.html keystrokes/bookmark_help.html \ + keystrokes/cookie_help.html keystrokes/dired_help.html \ + keystrokes/edit_help.html keystrokes/environments.html \ keystrokes/follow_help.html keystrokes/gopher_types_help.html \ keystrokes/history_help.html keystrokes/keystroke_help.html \ keystrokes/movement_help.html keystrokes/option_help.html \ keystrokes/other_help.html keystrokes/print_help.html \ - keystrokes/scrolling_help.html keystrokes/visited_help.html \ - keystrokes/xterm_help.html Lynx_users_guide.html \ - about_lynx.html lynx-dev.html lynx_help_main.html \ - lynx_url_support.html + keystrokes/scrolling_help.html keystrokes/test_display.html \ + keystrokes/visited_help.html keystrokes/xterm_help.html \ + Lynx_users_guide.html about_lynx.html lynx-dev.html \ + lynx_help_main.html lynx_url_support.html .include diff --git a/gnu/usr.bin/lynx/PROBLEMS b/gnu/usr.bin/lynx/PROBLEMS index 4815d2ba179..dba8f323848 100644 --- a/gnu/usr.bin/lynx/PROBLEMS +++ b/gnu/usr.bin/lynx/PROBLEMS @@ -10,11 +10,23 @@ they will be outlined in this file. with no attempt to suspend the Lynx process only temporarily). Control-Z on Unix often works better with slang. - Screen resizing can be a bit funny. If you resize the screen, - documents that have been cached will be out of whack. Any further + Screen resizing can be a bit funny. If you resize the screen, + documents that have been cached will be out of whack. Any further documents will look fine. You can reload documents to the current window size with CTRL-R + If the configure script dies when it discovers that gcc is broken, + despite the fact there is a perfectly good ANSI cc in the PATH, + try setting the CC environment variable to your working cc compiler + before running configure: e.g. + + setenv CC cc (or set CC=cc; export CC , depending on the shell) + ./configure + + If you run into a problem compiling LYMainLoop.c or GridText.c, try + omitting -O from the compiler flags; these are very big files and may not + compile successfully if you include optimisation. + On a Sun system, the message: "Alert!: Unable to connect to remote host" will be displayed every time an attempt is made to access a host @@ -28,21 +40,31 @@ they will be outlined in this file. you have upgraded to the bind-8.1 or later library, you should try changing -lresolv to -lbind. - The Sun `shelltool' and `cmdtool' terminals are stupid by default. - In order to get bold text to appear differently than inverse video, + On Sun systems when accessing sites that use multiple IPs for one URL, + you may experience a core dump. It's a bug in the resolver library, + which can be fixed by downloading & installing Sun's jumbo patch: + search Sun support information, e.g., Solaris newsgroups, + or see the following Lynx Archive items: + + http://www.flora.org/lynx-dev/lynx-dev/9606/0422.html + http://www.flora.org/lynx-dev/html/month0497/msg01018.html + http://www.flora.org/lynx-dev/html/month0497/msg01064.html + + The Sun `shelltool' and `cmdtool' terminals are stupid by default. + In order to get bold text to appear differently than inverse video, the user should put this line in ~/.Xdefaults: Term*boldStyle: Offset_X - From the `shelltool' man page, it seems that an analogous line + From the `shelltool' man page, it seems that an analogous line in ~/.defaults /Tty/Bold_style "Offset_X" ought to work just as well, but you may not get the desired behavior until you modify your .Xdefaults file (and run `xrdb - ~/.Xdefaults'). Note also that there are other supported values - for the boldStyle resource/Bold_style default, all of which begin + ~/.Xdefaults'). Note also that there are other supported values + for the boldStyle resource/Bold_style default, all of which begin with "Offset_". (helpful hint from kevin@traffic.den.mmc.com) Directory browsing has been implemented for VMS, but there are no @@ -91,7 +113,7 @@ they will be outlined in this file. Updated NOTE (1996-09-02): A patch reportedly is available from HP to fix the select() problem, so that "-lc" is no longer needed, but the curses glitch is not yet fixed, and you should still include - "-lHcurses". + "-lHcurses". Updated NOTE (1997-02-03): The problems reportedly are fixed with patches PHCO_8086 and PHCO_8947 from HP. Updated NOTE (1997-12-15): PHCO_8086 & PHCO_8947 are very old and are @@ -115,7 +137,7 @@ they will be outlined in this file. screen (separating different sorts of highlight); or sections of the screen may be unexpectedly highlighted. There is a workaround which works by restricting the terminal to a - single standout attribute (e.g. normal and reverse, but no others). + single standout attribute (e.g., normal and reverse, but no others). Implementing the workaround is specific to your curses implementation. Most versions of curses use one of two terminal databases, called "termcap" and "terminfo". Updating these databases is system-specific. diff --git a/gnu/usr.bin/lynx/README b/gnu/usr.bin/lynx/README index acb937de19d..ea80078fd11 100644 --- a/gnu/usr.bin/lynx/README +++ b/gnu/usr.bin/lynx/README @@ -1,38 +1,45 @@ Lynx README file -Lynx Version 2.8 is the latest "official" release. This release is based on -the lynx2.7.1ac-0.118 development code set, and includes bug fixes through -March 8, 1998. See the CHANGES2.8 file in the docs subdirectory for a complete -record of all changes and bug fixes in this release. New releases are -announced on the lynx-dev mailing list (see below). +Lynx Version 2.8.2 is the latest release (June 1999). +See the CHANGES file for a complete record of all changes and bug fixes. +New releases are announced on the lynx-dev mailing list (see below). +FOR REAL NOVICES + +To use this package, you need a compiler & a bit of experience +at very simple programming. If you just want something which will work +`out-of-the-box', you can get pre-compiled versions of Lynx +by following the links from ; +for DOS or Windows, goto . WHAT IS LYNX? Lynx is a fully-featured World Wide Web (WWW) client for users running - cursor-addressable, character-cell display devices such as vt100 - terminals, vt100 emulators running on PCs or Macs, or any other - character-cell display. It will display Hypertext Markup Language - (HTML) documents containing links to files on the local system, as - well as files on remote systems running http, gopher, ftp, wais, nntp, - finger, or cso/ph/qi servers, and services accessible via logins to - telnet, tn3270 or rlogin accounts. Current versions of Lynx run on - Unix, VMS, Windows95/NT, 386DOS and OS/2 EMX. + cursor-addressable, character-cell display devices such as vt100 terminals, + vt100 emulators running on Windows 95/NT or Macintoshes, or any other + character-cell display. It will display Hypertext Markup Language (HTML) + documents containing links to files on the local system, as well as files on + remote systems running http, gopher, ftp, wais, nntp, finger, or cso/ph/qi + servers, and services accessible via logins to telnet, tn3270 or rlogin + accounts. Current versions of Lynx run on Unix, VMS, Windows95/NT, 386DOS + and OS/2 EMX. Lynx can be used to access information on the WWW, or to establish - information systems intended primarily for local access. Lynx has been + information systems intended primarily for local access. Lynx has been used to build several Campus Wide Information Systems (CWIS). Lynx can also be used to build systems isolated within a single LAN. - Links to the current sources and support materials for Lynx are - maintained at: - "Lynx links" - - and at the Lynx homepage: - "Lynx Information" - . - View these pages for information about Lynx, including new updates. +HOW TO GET LYNX + + For the latest release of Lynx goto: + ; + the latest development version is at: + . + The Lynx homepage is . + The on-line help page (enter `h') has links to many useful things. + +LICENSE Lynx is distributed under the GNU General Public License (GPL) without restrictions on usage or redistribution. The Lynx copyright statement, @@ -53,23 +60,30 @@ YEAR 2000 COMPLIANCE particular, if Lynx receives a date with a 2-digit year, it assumes that values less than 70 are in the range 2000-2069. +INSTALLING LYNX + + To install Lynx, follow the steps in the INSTALLATION file, which is + located in the top directory of the source distribution. + DOCUMENTATION A users guide is included in this distribution along with a man page - for Unix systems and a help file for VMS systems. All documentation is + for Unix systems and a help file for VMS systems. All documentation is contained in the top directory and the docs, samples and lynx_help subdirectories. While running Lynx, type 'h', 'H', or '?' to invoke the help menu - system. From the help menu you may access several useful documents - pertaining to Lynx and the World Wide Web. The most important of - these is the Lynx Users Guide. By default, Lynx will use the Lynx + system. From the help menu you may access several useful documents + pertaining to Lynx and the World Wide Web. The most important of + these is the Lynx Users Guide. By default, Lynx will use the Lynx Enhanced Pages, which includes http links for help and FAQs concerning - Lynx. It is recommended that you install your own help menu system at - your site in order to lessen the load on http servers. This also will + Lynx. It is recommended that you install your own help menu system at + your site in order to lessen the load on http servers. This also will allow you to customize the help menu system for your site and greatly speed up access for those using Lynx over a slow connection. +INSTALLING THE DOCUMENTATION + For Unix and related systems which support the autoconf configure script, the help menu system is installed by the "make install-help" command. @@ -90,7 +104,9 @@ DOCUMENTATION INSTALLING LYNX To install Lynx, follow the steps in the INSTALLATION file, which is - located in the top directory of the source distribution. + located in the top directory of the source distribution. Win32 users + who need pre-compiled distributions should visit the site + . PROBLEMS @@ -102,16 +118,16 @@ PROBLEMS LYNX-DEV MAILING LIST - To subscribe to lynx-dev, send email to majordomo@sig.net with only the - following message in the body: + To subscribe to lynx-dev, send email to + with only the following message in the body: SUBSCRIBE LYNX-DEV address where inclusion of your email address is optional if it can be obtained, correctly, from the mail headers of your subscription request. - If you wish to unsubscribe from lynx-dev, send email to majordomo@sig.net - with only the following message in the body: + If you wish to unsubscribe from lynx-dev, send email to + with only the following message in the body: UNSUBSCRIBE LYNX-DEV address @@ -119,16 +135,19 @@ LYNX-DEV MAILING LIST correctly, from the mail headers of your request. Also, to get a list of useful majordomo commands, send email to - majordomo@sig.net with the following command: - ^^^^^^^^^ + with the following command: + ^^^^^^^^^ HELP PLEASE!!! do not send commands to the lynx-dev mailing list itself. - Any messages you wish to post should be sent to lynx-dev@sig.net. + Any messages you wish to post should be sent to + . PLEASE use the lynx-dev list, NOT private email to the developers, for questions or discussion about Lynx, or contributions of patches. - Patches should use the context diff format (diff -c). + Patches should use the context diff format (diff -c), which can be + generated by building the target, "make lynx.patch" after unpacking + a pristine copy of the source into a subdirectory called "orig". You need not be subscribed to the lynx-dev list in order to post. If you post without subscribing, though, you should read replies to your diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/BSDI_Makefile b/gnu/usr.bin/lynx/WWW/Library/Implementation/BSDI_Makefile deleted file mode 100644 index 21ff1c02d8e..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/BSDI_Makefile +++ /dev/null @@ -1,405 +0,0 @@ -# Make WWW under unix -# - -# For W3 distribution, machine type for subdirectories -WWW_MACH = unix - -# The ASIS repository's name for the machine we are on -ASIS_MACH = generic/unix - - -CFLAGS = -O -DDEBUG -DUSE_DIRENT -DSVR4 -DNO_FILIO_H -LFLAGS = -CC = cc - -# Directory for installed binary: -BINDIR = /usr/local/bin - -#_________________ OK if normal W3 distribution -# Where is the WWW source root? -WWW = ../.. - -# Where should temporary (object) files go? -WTMP = ../.. - - -# Where is the W3 object library? -LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH) - -# Common Makefile for W3 Library Code -# ----------------------------------- -# -# (c) CERN 1990, 1991 -- see Copyright.html for conditions -# -# This file should be invariant between systems. -# DEPENDENCIES NOT COMPLETE @@ -# -# make Compile and link the software (private version) -# make install Copy it into the system (implies make) -# make update Copy installed version into installed version -# make uninstall Unlink installed version from the system -# make clean Remove intermediate files -# make cleanall Remove intremediate files and products -# -# Macros required to be defined already for make: -# -# CC The C compiler -# CFLAGS Flags for $(CC) -- except the -I which are below -# LFLAGS Flags for ld -# LYFLAGS Flags for Lynx -# -# WWW The WWW source tree directory -# -# Macros needed for make install: -# -# LIBDIR Directory for installed library -#______________________________________________________________________ - -# If this env var is set to something else Some makes will use that instead -SHELL = /bin/sh - -# .h files are distributed but originally are made from the -# self-documenting hypertext files. - -.SUFFIXES: .h .html -.html.h: -# - chmod +w $*.h - www -w90 -na -to text/x-c $*.html > $*.h -# chmod -w $*.h - -# If this is actually run in a subdirectory, -# -# WWW = ../../.. -# WWW = ../.. For [cernlib] build in this directory - -WC = $(WWW)/Library -CMN = $(WWW)/Library/Implementation/ -VMS = $(CMN)vms -# Where shall we put the objects and built library? - -LOB = $(WTMP)/Library/$(WWW_MACH) - -# Only needed if HTWAIS.c is to be compiled. Put into your Makefile.include -# uncomment these and fill in WAISINC for adding direct wais access -# to Lynx. -#HTWAIS = $(LOB)/HTWAIS.o -#WAIS = YES -#WAISINC = -I../../../../freeWAIS-0.202/ir -#WAISCFLAGS = -DDIRECT_WAIS -# - -# This path, if relative, is taken relative to the directory -# in which this makefile is, not the pwd. This screws up the -# recursive invocation -# include $(CMN)Version.make -VC = 2.14 - -# XMOsAIC hack is only for server to cope with xmosaic kludge for mmedia -# -# add -DNEW_GATEWAY here for the new gateway config stuff -CFLAGS2 = $(CFLAGS) $(LYFLAGS) $(WAISCFLAGS) -I$(CMN) -DXMOSAIC_HACK -DACCESS_AUTH - -CERNLIBBIN = $(WWW)/bin - -COMMON = $(LOB)/HTParse.o $(LOB)/HTAccess.o $(LOB)/HTTP.o \ - $(LOB)/HTFile.o $(LOB)/HTBTree.o $(LOB)/HTFTP.o $(LOB)/HTTCP.o \ - $(LOB)/SGML.o $(LOB)/HTMLDTD.o $(LOB)/HTChunk.o \ - $(LOB)/HTPlain.o $(LOB)/HTWriter.o \ - $(LOB)/HTMLGen.o \ - $(LOB)/HTAtom.o $(LOB)/HTAnchor.o $(LOB)/HTStyle.o \ - $(LOB)/HTList.o $(LOB)/HTString.o \ - $(LOB)/HTRules.o $(LOB)/HTFormat.o $(LOB)/HTMIME.o \ - $(LOB)/HTHistory.o $(LOB)/HTNews.o $(LOB)/HTGopher.o \ - $(LOB)/HTTelnet.o $(LOB)/HTFinger.o $(LOB)/HTWSRC.o $(HTWAIS) \ - $(LOB)/HTAAUtil.o $(LOB)/HTAAServ.o $(LOB)/HTAABrow.o \ - $(LOB)/HTAAFile.o $(LOB)/HTPasswd.o $(LOB)/HTGroup.o \ - $(LOB)/HTACL.o $(LOB)/HTAuth.o $(LOB)/HTAAProt.o \ - $(LOB)/HTAssoc.o $(LOB)/HTLex.o $(LOB)/HTUU.o - -CFILES = $(CMN)HTParse.c $(CMN)HTAccess.c $(CMN)HTTP.c $(CMN)HTFile.c \ - $(CMN)HTBTree.c \ - $(CMN)HTFTP.c $(CMN)HTTCP.c $(CMN)SGML.c \ - $(CMN)HTMLDTD.c \ - $(CMN)HTPlain.c $(CMN)HTWriter.c \ - $(CMN)HTMLGen.c \ - $(CMN)HTChunk.c $(CMN)HTAtom.c $(CMN)HTAnchor.c $(CMN)HTStyle.c \ - $(CMN)HTList.c $(CMN)HTString.c $(CMN)HTRules.c \ - $(CMN)HTFormat.c $(CMN)HTMIME.c $(CMN)HTHistory.c \ - $(CMN)HTNews.c $(CMN)HTGopher.c $(CMN)HTTelnet.c \ - $(CMN)HTFinger.c $(CMN)HTWAIS.c $(CMN)HTWSRC.c \ - $(CMN)HTAAUtil.c $(CMN)HTAAServ.c $(CMN)HTAABrow.c \ - $(CMN)HTAAFile.c $(CMN)HTPasswd.c $(CMN)HTGroup.c \ - $(CMN)HTACL.c $(CMN)HTAuth.c $(CMN)HTAAProt.c \ - $(CMN)HTAssoc.c $(CMN)HTLex.c $(CMN)HTUU.c - -HFILES = $(CMN)HTParse.h $(CMN)HTAccess.h $(CMN)HTTP.h $(CMN)HTFile.h \ - $(CMN)HTBTree.h $(CMN)HTFTP.h $(CMN)HTTCP.h \ - $(CMN)SGML.h $(CMN)HTML.h $(CMN)HTMLDTD.h $(CMN)HTChunk.h \ - $(CMN)HTPlain.h $(CMN)HTWriter.h \ - $(CMN)HTFWriter.h $(CMN)HTMLGen.h \ - $(CMN)HTStream.h \ - $(CMN)HTAtom.h $(CMN)HTAnchor.h $(CMN)HTStyle.h \ - $(CMN)HTList.h \ - $(CMN)HTString.h $(CMN)HTAlert.h $(CMN)HTRules.h \ - $(CMN)HTFormat.h $(CMN)HTInit.h \ - $(CMN)HTMIME.h $(CMN)HTHistory.h $(CMN)HTNews.h \ - $(CMN)HTGopher.h \ - $(CMN)HTUtils.h $(CMN)tcp.h $(CMN)HText.h \ - $(CMN)HTTelnet.h $(CMN)HTFinger.h \ - $(CMN)HTWAIS.h $(CMN)HTWSRC.h \ - $(CMN)HTAAUtil.h $(CMN)HTAAServ.h $(CMN)HTAABrow.h \ - $(CMN)HTAAFile.h $(CMN)HTPasswd.h $(CMN)HTGroup.h \ - $(CMN)HTACL.h $(CMN)HTAuth.h $(CMN)HTAAProt.h \ - $(CMN)HTAssoc.h $(CMN)HTLex.h $(CMN)HTUU.h - -SOURCES = $(CFILES) $(HFILES) $(CMN)Version.make \ - $(CMN)CommonMakefile $(CMN)Makefile \ - $(WWW)/README.txt $(WWW)/Copyright.txt $(WWW)/BUILD $(WWW)/Makefile -SPECIFIC = $(WWW)/All/*/Makefile.include $(WWW)/All/Implementation/Makefile* \ - $(VMS)/descrip.mms $(VMS)/build_multinet.com \ - $(VMS)/COPYING.LIB $(VMS)/setup.com $(VMS)/multinet.opt \ - $(VMS)/patchlevel.h $(VMS)/ufc-crypt.h \ - $(VMS)/crypt.c $(VMS)/crypt_util.c \ - $(VMS)/getline.c $(VMS)/getpass.c \ - $(VMS)/HTVMSUtils.h $(VMS)/HTVMSUtils.c - - -# Library -# -# On SGI, ranlib is unnecessary and does not exist so we ignore errors -# for that step -$(LOB)/libwww.a : $(COMMON) - ar r $(LOB)/libwww.a $(COMMON) - -ranlib $(LOB)/libwww.a - -# Clean up everything generatable except final products -clean : - rm $(LOB)/*.o $(LOB)/.created - -rmdir $(LOB) - -# Clean up everything generatable including final products - -cleanall : clean - rm $(LOB)/libwww.a - -# Install W3 library into system space (not normally necessary) - -install : libwww.a - if [ ! -r $(LIBDIR) ] mkdir $(LIBDIR) - cp libwww.a $(LIBDIR)/libwww.a - -uninstall : - rm $(LIBDIR)/libwww.a - -# Distribution use only: -# ---------------------- - -# Needs www version 2.4 or later to do this -inc : $(HFILES) - echo Include files generated from hypertext. - -binary : /pub/www/bin/$(WWW_MACH)/libwww_$(VC).a - echo FTP archive binary Libray $(VC) for $(WWW_MACH) up to date. - - -/pub/www/bin/$(WWW_MACH)/libwww_$(VC).a : libwww.a - -mkdir /pub/www/bin/$(WWW_MACH) - cp libwww.a /pub/www/bin/$(WWW_MACH)/libwww_$(VC).a - -# Source Distribution: - -distribute : /pub/www/README.txt /pub/www/Copyright.txt - (cd $(WWW)/..; WWW=WWW ABS=`pwd`/ make $(MFLAGS) \ - -f WWW/Library/Implementation/CommonMakefile \ - /pub/www/src/WWWLibrary_$(VC).tar.Z) - (cd ../Implementation; cvs tag \ - `sed -e 's/VC = /v/' Version.make | sed -e 's?\.?/?'` ) - echo Distribution of Library version $(VC) up to date. - -/pub/www/src/WWWLibrary_$(VC).tar.Z : $(SOURCES) - tar cf /pub/www/src/WWWLibrary_$(VC).tar \ - $(SOURCES) $(SPECIFIC) $(WC)/*/Makefile - compress /pub/www/src/WWWLibrary_$(VC).tar - - -# Hypertext supplied in text format -# --------------------------------- - -$(WWW)/README.txt : $(WWW)/../README.html - www -n -p66 http://www.w3.org/hypertext/README.html \ - > $(WWW)/README.txt -/pub/www/README.txt : $(WWW)/README.txt - cp $(WWW)/README.txt /pub/www/README.txt - -$(WWW)/Copyright.txt : $(WWW)/../Copyright.html - www -n -p66 http://www.w3.org/hypertext/Copyright.html \ - > $(WWW)/Copyright.txt -/pub/www/Copyright.txt : $(WWW)/Copyright.txt - cp $(WWW)/Copyright.txt /pub/www/Copyright.txt - -# Common code -# ----------- - -# Directory for object files - .created checks it exists - -OE = $(LOB)/.created -$(OE) : - if [ ! -r $(WTMP) ] ; then mkdir $(WTMP); else echo OK ; fi - if [ ! -r $(WTMP)/Library ] ; then mkdir $(WTMP)/Library; else echo OK ; fi - if [ ! -r $(WTMP)/Library/$(WWW_MACH) ] ; \ - then mkdir $(WTMP)/Library/$(WWW_MACH); else echo OK ; fi - touch $@ - -$(LOB)/HTList.o : $(OE) $(CMN)HTList.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTList.c - -$(LOB)/HTAnchor.o : $(OE) $(CMN)HTAnchor.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAnchor.c - -$(LOB)/HTFormat.o : $(OE) $(CMN)HTFormat.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFormat.c - -$(LOB)/HTMIME.o : $(OE) $(CMN)HTMIME.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMIME.c - -$(LOB)/HTHistory.o : $(OE) $(CMN)HTHistory.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTHistory.c - -$(LOB)/HTNews.o : $(OE) $(CMN)HTNews.c $(CMN)HTUtils.h $(CMN)HTList.h\ - $(CMN)HTMLDTD.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTNews.c - -$(LOB)/HTGopher.o : $(OE) $(CMN)HTGopher.c $(CMN)HTUtils.h $(CMN)HTList.h \ - $(CMN)HTMLDTD.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTGopher.c - -$(LOB)/HTTelnet.o : $(OE) $(CMN)HTTelnet.c $(CMN)HTUtils.h $(CMN)HTTelnet.h $(CMN)../../../userdefs.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTelnet.c - -$(LOB)/HTFinger.o : $(OE) $(CMN)HTFinger.c $(CMN)HTUtils.h $(CMN)HTList.h \ - $(CMN)HTMLDTD.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFinger.c - -$(LOB)/HTStyle.o : $(OE) $(CMN)HTStyle.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTStyle.c - -$(LOB)/HTAtom.o : $(OE) $(CMN)HTAtom.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAtom.c - -$(LOB)/HTChunk.o : $(OE) $(CMN)HTChunk.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTChunk.c - -$(LOB)/HTString.o : $(OE) $(CMN)HTString.c $(CMN)HTUtils.h $(CMN)Version.make - $(CC) -c -o $@ $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTString.c - -$(LOB)/HTRules.o : $(OE) $(CMN)HTRules.c $(CMN)HTUtils.h $(CMN)Version.make \ - $(CMN)HTAAServ.h $(CMN)HTAAProt.h - $(CC) -c -o $@ $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTRules.c - -$(LOB)/SGML.o : $(OE) $(CMN)SGML.c $(CMN)HTUtils.h $(CMN)UCAux.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)SGML.c - -$(LOB)/HTMLGen.o : $(OE) $(CMN)HTMLGen.c $(CMN)HTUtils.h $(CMN)HTMLDTD.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMLGen.c - -$(LOB)/HTMLDTD.o : $(OE) $(CMN)HTMLDTD.c $(CMN)SGML.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMLDTD.c - -$(LOB)/HTPlain.o : $(OE) $(CMN)HTPlain.c $(CMN)HTPlain.h $(CMN)HTStream.h \ - $(CMN)UCAux.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTPlain.c - -$(LOB)/HTWAIS.o : $(OE) $(CMN)HTWAIS.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(WAISINC) $(CMN)HTWAIS.c - -$(LOB)/HTWSRC.o : $(OE) $(CMN)HTWSRC.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTWSRC.c - -$(LOB)/HTWriter.o : $(OE) $(CMN)HTWriter.c $(CMN)HTWriter.h $(CMN)HTStream.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTWriter.c - - -# Access Authorization - -$(LOB)/HTAAUtil.o : $(OE) $(CMN)HTAAUtil.c $(CMN)HTAAUtil.h \ - $(CMN)HTUtils.h $(CMN)HTString.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAAUtil.c - -$(LOB)/HTAAFile.o : $(OE) $(CMN)HTAAFile.c $(CMN)HTAAFile.h \ - $(CMN)HTAAUtil.h $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAAFile.c - -$(LOB)/HTPasswd.o : $(OE) $(CMN)HTPasswd.c $(CMN)HTPasswd.h \ - $(CMN)HTAAUtil.h $(CMN)HTAAFile.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTPasswd.c - -$(LOB)/HTGroup.o : $(OE) $(CMN)HTGroup.c $(CMN)HTGroup.h \ - $(CMN)HTAAUtil.h $(CMN)HTAAFile.h \ - $(CMN)HTAssoc.h $(CMN)HTLex.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTGroup.c - -$(LOB)/HTACL.o : $(OE) $(CMN)HTACL.c $(CMN)HTACL.h \ - $(CMN)HTAAUtil.h $(CMN)HTAAFile.h $(CMN)HTGroup.h \ - $(CMN)HTAssoc.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTACL.c - -$(LOB)/HTAuth.o : $(OE) $(CMN)HTAuth.c $(CMN)HTAuth.h \ - $(CMN)HTAAUtil.h $(CMN)HTPasswd.h $(CMN)HTAAFile.h \ - $(CMN)HTAssoc.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAuth.c - -$(LOB)/HTAAServ.o : $(OE) $(CMN)HTAAServ.c $(CMN)HTAAServ.h \ - $(CMN)HTAAUtil.h $(CMN)HTAAFile.h $(CMN)HTPasswd.h \ - $(CMN)HTGroup.h $(CMN)HTACL.h $(CMN)HTAuth.h \ - $(CMN)HTUU.h $(CMN)HTParse.h $(CMN)HTList.h \ - $(CMN)HTUtils.h $(CMN)HTString.h $(CMN)HTRules.h \ - $(CMN)HTAAProt.h $(CMN)HTAssoc.h $(CMN)HTLex.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAAServ.c - -$(LOB)/HTAABrow.o : $(OE) $(CMN)HTAABrow.c $(CMN)HTAABrow.h \ - $(CMN)HTAAUtil.h $(CMN)HTUU.h \ - $(CMN)HTUtils.h $(CMN)HTString.h \ - $(CMN)HTParse.h $(CMN)HTList.h $(CMN)HTAlert.h \ - $(CMN)HTAssoc.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAABrow.c - -$(LOB)/HTAAProt.o : $(OE) $(CMN)HTAAProt.c $(CMN)HTAAProt.h \ - $(CMN)HTUtils.h $(CMN)HTAAUtil.h $(CMN)HTAAFile.h \ - $(CMN)HTAssoc.h $(CMN)HTLex.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAAProt.c - -$(LOB)/HTAssoc.o : $(OE) $(CMN)HTAssoc.c $(CMN)HTAssoc.h \ - $(CMN)HTUtils.h $(CMN)HTString.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAssoc.c - -$(LOB)/HTLex.o : $(OE) $(CMN)HTLex.c $(CMN)HTLex.h $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTLex.c - -$(LOB)/HTUU.o : $(OE) $(CMN)HTUU.c $(CMN)HTUU.h $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTUU.c - - -# Communications & Files - -$(LOB)/HTTP.o : $(OE) $(CMN)HTTP.c $(CMN)HTUtils.h $(CMN)HTAABrow.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTP.c - -$(LOB)/HTTCP.o : $(OE) $(CMN)HTTCP.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTCP.c - -$(LOB)/HTFile.o : $(OE) $(CMN)HTFile.c $(CMN)HTUtils.h \ - $(CMN)HTMLDTD.h $(CMN)HTAAServ.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFile.c - -$(LOB)/HTBTree.o : $(OE) $(CMN)HTBTree.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTBTree.c - -$(LOB)/HTFTP.o : $(OE) $(CMN)HTFTP.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFTP.c - -$(LOB)/HTAccess.o : $(OE) $(CMN)HTAccess.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAccess.c - -$(LOB)/HTParse.o : $(OE) $(CMN)HTParse.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTParse.c - diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/CommonMakefile b/gnu/usr.bin/lynx/WWW/Library/Implementation/CommonMakefile deleted file mode 100644 index b7d32576ec9..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/CommonMakefile +++ /dev/null @@ -1,373 +0,0 @@ -# Common Makefile for W3 Library Code -# ----------------------------------- -# -# (c) CERN 1990, 1991 -- see Copyright.html for conditions -# -# This file should be invariant between systems. -# DEPENDENCIES NOT COMPLETE @@ -# -# make Compile and link the software (private version) -# make install Copy it into the system (implies make) -# make update Copy installed version into installed version -# make uninstall Unlink installed version from the system -# make clean Remove intermediate files -# make cleanall Remove intremediate files and products -# -# Macros required to be defined already for make: -# -# CC The C compiler -# CFLAGS Flags for $(CC) -- except the -I which are below -# LFLAGS Flags for ld -# LYFLAGS Flags for Lynx -# -# WWW The WWW source tree directory -# -# Macros needed for make install: -# -# LIBDIR Directory for installed library -#______________________________________________________________________ - -# If this env var is set to something else Some makes will use that instead -SHELL = /bin/sh - -RANLIB = ranlib - -# .h files are distributed but originally are made from the -# self-documenting hypertext files. - -.SUFFIXES: .h .html -.html.h: -# - chmod +w $*.h - www -w90 -na -to text/x-c $*.html > $*.h -# chmod -w $*.h - -# If this is actually run in a subdirectory, -# -# WWW = ../../.. -# WWW = ../.. For [cernlib] build in this directory - -WC = $(WWW)/Library -CMN = $(WWW)/Library/Implementation/ -VMS = $(CMN)vms -# Where shall we put the objects and built library? - -LOB = $(WTMP)/Library/$(WWW_MACH) - -# Only needed if HTWAIS.c is to be compiled. Put into your Makefile.include -# uncomment these and fill in WAISINC for adding direct wais access -# to Lynx. -#HTWAIS = $(LOB)/HTWAIS.o -#WAIS = YES -#WAISINC = -I../../../../freeWAIS-0.202/ir -#WAISCFLAGS = -DDIRECT_WAIS -# - -# XMOsAIC hack is only for server to cope with xmosaic kludge for mmedia -# -# add -DNEW_GATEWAY here for the new gateway config stuff -CFLAGS2 = $(CFLAGS) $(LYFLAGS) $(WAISCFLAGS) -I$(CMN) -DXMOSAIC_HACK -DACCESS_AUTH - -CERNLIBBIN = $(WWW)/bin - -COMMON = $(LOB)/HTParse.o $(LOB)/HTAccess.o $(LOB)/HTTP.o \ - $(LOB)/HTFile.o $(LOB)/HTBTree.o $(LOB)/HTFTP.o $(LOB)/HTTCP.o \ - $(LOB)/SGML.o $(LOB)/HTMLDTD.o $(LOB)/HTChunk.o \ - $(LOB)/HTPlain.o $(LOB)/HTWriter.o \ - $(LOB)/HTMLGen.o \ - $(LOB)/HTAtom.o $(LOB)/HTAnchor.o $(LOB)/HTStyle.o \ - $(LOB)/HTList.o $(LOB)/HTString.o \ - $(LOB)/HTRules.o $(LOB)/HTFormat.o $(LOB)/HTMIME.o \ - $(LOB)/HTHistory.o $(LOB)/HTNews.o $(LOB)/HTGopher.o \ - $(LOB)/HTTelnet.o $(LOB)/HTFinger.o $(LOB)/HTWSRC.o $(HTWAIS) \ - $(LOB)/HTAAUtil.o $(LOB)/HTAAServ.o $(LOB)/HTAABrow.o \ - $(LOB)/HTAAFile.o $(LOB)/HTPasswd.o $(LOB)/HTGroup.o \ - $(LOB)/HTACL.o $(LOB)/HTAuth.o $(LOB)/HTAAProt.o \ - $(LOB)/HTAssoc.o $(LOB)/HTLex.o $(LOB)/HTUU.o - -CFILES = $(CMN)HTParse.c $(CMN)HTAccess.c $(CMN)HTTP.c $(CMN)HTFile.c \ - $(CMN)HTBTree.c \ - $(CMN)HTFTP.c $(CMN)HTTCP.c $(CMN)SGML.c \ - $(CMN)HTMLDTD.c \ - $(CMN)HTPlain.c $(CMN)HTWriter.c \ - $(CMN)HTMLGen.c \ - $(CMN)HTChunk.c $(CMN)HTAtom.c $(CMN)HTAnchor.c $(CMN)HTStyle.c \ - $(CMN)HTList.c $(CMN)HTString.c $(CMN)HTRules.c \ - $(CMN)HTFormat.c $(CMN)HTMIME.c $(CMN)HTHistory.c \ - $(CMN)HTNews.c $(CMN)HTGopher.c $(CMN)HTTelnet.c \ - $(CMN)HTFinger.c $(CMN)HTWAIS.c $(CMN)HTWSRC.c \ - $(CMN)HTAAUtil.c $(CMN)HTAAServ.c $(CMN)HTAABrow.c \ - $(CMN)HTAAFile.c $(CMN)HTPasswd.c $(CMN)HTGroup.c \ - $(CMN)HTACL.c $(CMN)HTAuth.c $(CMN)HTAAProt.c \ - $(CMN)HTAssoc.c $(CMN)HTLex.c $(CMN)HTUU.c - -HFILES = $(CMN)HTParse.h $(CMN)HTAccess.h $(CMN)HTTP.h $(CMN)HTFile.h \ - $(CMN)HTBTree.h $(CMN)HTFTP.h $(CMN)HTTCP.h \ - $(CMN)SGML.h $(CMN)HTML.h $(CMN)HTMLDTD.h $(CMN)HTChunk.h \ - $(CMN)HTPlain.h $(CMN)HTWriter.h \ - $(CMN)HTFWriter.h $(CMN)HTMLGen.h \ - $(CMN)HTStream.h \ - $(CMN)HTAtom.h $(CMN)HTAnchor.h $(CMN)HTStyle.h \ - $(CMN)HTList.h \ - $(CMN)HTString.h $(CMN)HTAlert.h $(CMN)HTRules.h \ - $(CMN)HTFormat.h $(CMN)HTInit.h \ - $(CMN)HTMIME.h $(CMN)HTHistory.h $(CMN)HTNews.h \ - $(CMN)HTGopher.h \ - $(CMN)HTUtils.h $(CMN)tcp.h $(CMN)HText.h \ - $(CMN)HTTelnet.h $(CMN)HTFinger.h \ - $(CMN)HTWAIS.h $(CMN)HTWSRC.h \ - $(CMN)HTAAUtil.h $(CMN)HTAAServ.h $(CMN)HTAABrow.h \ - $(CMN)HTAAFile.h $(CMN)HTPasswd.h $(CMN)HTGroup.h \ - $(CMN)HTACL.h $(CMN)HTAuth.h $(CMN)HTAAProt.h \ - $(CMN)HTAssoc.h $(CMN)HTLex.h $(CMN)HTUU.h - -SOURCES = $(CFILES) $(HFILES) $(CMN)Version.make \ - $(CMN)CommonMakefile $(CMN)Makefile \ - $(WWW)/README.txt $(WWW)/Copyright.txt $(WWW)/BUILD $(WWW)/Makefile -SPECIFIC = $(WWW)/All/*/Makefile.include $(WWW)/All/Implementation/Makefile* \ - $(VMS)/descrip.mms $(VMS)/build_multinet.com \ - $(VMS)/COPYING.LIB $(VMS)/setup.com $(VMS)/multinet.opt \ - $(VMS)/patchlevel.h $(VMS)/ufc-crypt.h \ - $(VMS)/crypt.c $(VMS)/crypt_util.c \ - $(VMS)/getline.c $(VMS)/getpass.c \ - $(VMS)/HTVMSUtils.h $(VMS)/HTVMSUtils.c - - -# Library -# -# On SGI, ranlib is unnecessary and does not exist so we ignore errors -# for that step -$(LOB)/libwww.a : $(COMMON) - ar r $(LOB)/libwww.a $(COMMON) - -$(RANLIB) $(LOB)/libwww.a - -# Clean up everything generatable except final products -clean : - rm $(LOB)/*.o $(LOB)/.created - -rmdir $(LOB) - -# Clean up everything generatable including final products - -cleanall : clean - rm $(LOB)/libwww.a - -# Install W3 library into system space (not normally necessary) - -install : libwww.a - if [ ! -r $(LIBDIR) ] mkdir $(LIBDIR) - cp libwww.a $(LIBDIR)/libwww.a - -uninstall : - rm $(LIBDIR)/libwww.a - -# Distribution use only: -# ---------------------- - -# Needs www version 2.4 or later to do this -inc : $(HFILES) - echo Include files generated from hypertext. - -binary : /pub/www/bin/$(WWW_MACH)/libwww_$(VC).a - echo FTP archive binary Libray $(VC) for $(WWW_MACH) up to date. - - -/pub/www/bin/$(WWW_MACH)/libwww_$(VC).a : libwww.a - -mkdir /pub/www/bin/$(WWW_MACH) - cp libwww.a /pub/www/bin/$(WWW_MACH)/libwww_$(VC).a - -# Source Distribution: - -distribute : /pub/www/README.txt /pub/www/Copyright.txt - (cd $(WWW)/..; WWW=WWW ABS=`pwd`/ make $(MFLAGS) \ - -f WWW/Library/Implementation/CommonMakefile \ - /pub/www/src/WWWLibrary_$(VC).tar.Z) - (cd ../Implementation; cvs tag \ - `sed -e 's/VC = /v/' Version.make | sed -e 's?\.?/?'` ) - echo Distribution of Library version $(VC) up to date. - -/pub/www/src/WWWLibrary_$(VC).tar.Z : $(SOURCES) - tar cf /pub/www/src/WWWLibrary_$(VC).tar \ - $(SOURCES) $(SPECIFIC) $(WC)/*/Makefile - compress /pub/www/src/WWWLibrary_$(VC).tar - - -# Hypertext supplied in text format -# --------------------------------- - -$(WWW)/README.txt : $(WWW)/../README.html - www -n -p66 http://www.w3.org/hypertext/README.html \ - > $(WWW)/README.txt -/pub/www/README.txt : $(WWW)/README.txt - cp $(WWW)/README.txt /pub/www/README.txt - -$(WWW)/Copyright.txt : $(WWW)/../Copyright.html - www -n -p66 http://www.w3.org/hypertext/Copyright.html \ - > $(WWW)/Copyright.txt -/pub/www/Copyright.txt : $(WWW)/Copyright.txt - cp $(WWW)/Copyright.txt /pub/www/Copyright.txt - -# Common code -# ----------- - -# Directory for object files - .created checks it exists - -OE = $(LOB)/.created -$(OE) : - if [ ! -r $(WTMP) ] ; then mkdir $(WTMP); else echo OK ; fi - if [ ! -r $(WTMP)/Library ] ; then mkdir $(WTMP)/Library; else echo OK ; fi - if [ ! -r $(WTMP)/Library/$(WWW_MACH) ] ; \ - then mkdir $(WTMP)/Library/$(WWW_MACH); else echo OK ; fi - touch $@ - -$(LOB)/HTList.o : $(OE) $(CMN)HTList.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTList.c - -$(LOB)/HTAnchor.o : $(OE) $(CMN)HTAnchor.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAnchor.c - -$(LOB)/HTFormat.o : $(OE) $(CMN)HTFormat.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFormat.c - -$(LOB)/HTMIME.o : $(OE) $(CMN)HTMIME.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMIME.c - -$(LOB)/HTHistory.o : $(OE) $(CMN)HTHistory.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTHistory.c - -$(LOB)/HTNews.o : $(OE) $(CMN)HTNews.c $(CMN)HTUtils.h $(CMN)HTList.h\ - $(CMN)HTMLDTD.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTNews.c - -$(LOB)/HTGopher.o : $(OE) $(CMN)HTGopher.c $(CMN)HTUtils.h $(CMN)HTList.h \ - $(CMN)HTMLDTD.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTGopher.c - -$(LOB)/HTTelnet.o : $(OE) $(CMN)HTTelnet.c $(CMN)HTUtils.h $(CMN)HTTelnet.h $(CMN)../../../userdefs.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTelnet.c - -$(LOB)/HTFinger.o : $(OE) $(CMN)HTFinger.c $(CMN)HTUtils.h $(CMN)HTList.h \ - $(CMN)HTMLDTD.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFinger.c - -$(LOB)/HTStyle.o : $(OE) $(CMN)HTStyle.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTStyle.c - -$(LOB)/HTAtom.o : $(OE) $(CMN)HTAtom.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAtom.c - -$(LOB)/HTChunk.o : $(OE) $(CMN)HTChunk.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTChunk.c - -$(LOB)/HTString.o : $(OE) $(CMN)HTString.c $(CMN)HTUtils.h $(CMN)Version.make - $(CC) -c -o $@ $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTString.c - -$(LOB)/HTRules.o : $(OE) $(CMN)HTRules.c $(CMN)HTUtils.h $(CMN)Version.make \ - $(CMN)HTAAServ.h $(CMN)HTAAProt.h - $(CC) -c -o $@ $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTRules.c - -$(LOB)/SGML.o : $(OE) $(CMN)SGML.c $(CMN)HTUtils.h $(CMN)UCAux.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)SGML.c - -$(LOB)/HTMLGen.o : $(OE) $(CMN)HTMLGen.c $(CMN)HTUtils.h $(CMN)HTMLDTD.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMLGen.c - -$(LOB)/HTMLDTD.o : $(OE) $(CMN)HTMLDTD.c $(CMN)SGML.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMLDTD.c - -$(LOB)/HTPlain.o : $(OE) $(CMN)HTPlain.c $(CMN)HTPlain.h $(CMN)HTStream.h \ - $(CMN)UCAux.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTPlain.c - -$(LOB)/HTWAIS.o : $(OE) $(CMN)HTWAIS.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(WAISINC) $(CMN)HTWAIS.c - -$(LOB)/HTWSRC.o : $(OE) $(CMN)HTWSRC.c $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTWSRC.c - -$(LOB)/HTWriter.o : $(OE) $(CMN)HTWriter.c $(CMN)HTWriter.h $(CMN)HTStream.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTWriter.c - - -# Access Authorization - -$(LOB)/HTAAUtil.o : $(OE) $(CMN)HTAAUtil.c $(CMN)HTAAUtil.h \ - $(CMN)HTUtils.h $(CMN)HTString.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAAUtil.c - -$(LOB)/HTAAFile.o : $(OE) $(CMN)HTAAFile.c $(CMN)HTAAFile.h \ - $(CMN)HTAAUtil.h $(CMN)HTUtils.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAAFile.c - -$(LOB)/HTPasswd.o : $(OE) $(CMN)HTPasswd.c $(CMN)HTPasswd.h \ - $(CMN)HTAAUtil.h $(CMN)HTAAFile.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTPasswd.c - -$(LOB)/HTGroup.o : $(OE) $(CMN)HTGroup.c $(CMN)HTGroup.h \ - $(CMN)HTAAUtil.h $(CMN)HTAAFile.h \ - $(CMN)HTAssoc.h $(CMN)HTLex.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTGroup.c - -$(LOB)/HTACL.o : $(OE) $(CMN)HTACL.c $(CMN)HTACL.h \ - $(CMN)HTAAUtil.h $(CMN)HTAAFile.h $(CMN)HTGroup.h \ - $(CMN)HTAssoc.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTACL.c - -$(LOB)/HTAuth.o : $(OE) $(CMN)HTAuth.c $(CMN)HTAuth.h \ - $(CMN)HTAAUtil.h $(CMN)HTPasswd.h $(CMN)HTAAFile.h \ - $(CMN)HTAssoc.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAuth.c - -$(LOB)/HTAAServ.o : $(OE) $(CMN)HTAAServ.c $(CMN)HTAAServ.h \ - $(CMN)HTAAUtil.h $(CMN)HTAAFile.h $(CMN)HTPasswd.h \ - $(CMN)HTGroup.h $(CMN)HTACL.h $(CMN)HTAuth.h \ - $(CMN)HTUU.h $(CMN)HTParse.h $(CMN)HTList.h \ - $(CMN)HTUtils.h $(CMN)HTString.h $(CMN)HTRules.h \ - $(CMN)HTAAProt.h $(CMN)HTAssoc.h $(CMN)HTLex.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAAServ.c - -$(LOB)/HTAABrow.o : $(OE) $(CMN)HTAABrow.c $(CMN)HTAABrow.h \ - $(CMN)HTAAUtil.h $(CMN)HTUU.h \ - $(CMN)HTUtils.h $(CMN)HTString.h \ - $(CMN)HTParse.h $(CMN)HTList.h $(CMN)HTAlert.h \ - $(CMN)HTAssoc.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAABrow.c - -$(LOB)/HTAAProt.o : $(OE) $(CMN)HTAAProt.c $(CMN)HTAAProt.h \ - $(CMN)HTUtils.h $(CMN)HTAAUtil.h $(CMN)HTAAFile.h \ - $(CMN)HTAssoc.h $(CMN)HTLex.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAAProt.c - -$(LOB)/HTAssoc.o : $(OE) $(CMN)HTAssoc.c $(CMN)HTAssoc.h \ - $(CMN)HTUtils.h $(CMN)HTString.h $(CMN)HTList.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAssoc.c - -$(LOB)/HTLex.o : $(OE) $(CMN)HTLex.c $(CMN)HTLex.h $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTLex.c - -$(LOB)/HTUU.o : $(OE) $(CMN)HTUU.c $(CMN)HTUU.h $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTUU.c - - -# Communications & Files - -$(LOB)/HTTP.o : $(OE) $(CMN)HTTP.c $(CMN)HTUtils.h $(CMN)HTAABrow.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTP.c - -$(LOB)/HTTCP.o : $(OE) $(CMN)HTTCP.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTCP.c - -$(LOB)/HTFile.o : $(OE) $(CMN)HTFile.c $(CMN)HTUtils.h \ - $(CMN)HTMLDTD.h $(CMN)HTAAServ.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFile.c - -$(LOB)/HTBTree.o : $(OE) $(CMN)HTBTree.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTBTree.c - -$(LOB)/HTFTP.o : $(OE) $(CMN)HTFTP.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFTP.c - -$(LOB)/HTAccess.o : $(OE) $(CMN)HTAccess.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAccess.c - -$(LOB)/HTParse.o : $(OE) $(CMN)HTParse.c $(CMN)HTUtils.h - $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTParse.c - diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAABrow.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAABrow.c index 0ebe5309e7d..0f72cc71bed 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAABrow.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAABrow.c @@ -2,7 +2,7 @@ /* MODULE HTAABrow.c ** BROWSER SIDE ACCESS AUTHORIZATION MODULE ** -** Containts the code for keeping track on server hostnames, +** Contains the code for keeping track on server hostnames, ** port numbers, scheme names, usernames, passwords ** (and servers' public keys). ** @@ -15,7 +15,7 @@ ** ** Therefore also all the strings returned by this package ** are only valid until the next call to the same function -** is made. This approach is selected, because of the nature +** is made. This approach is selected, because of the nature ** of access authorization: no string returned by the package ** needs to be valid longer than until the next call. ** @@ -50,18 +50,17 @@ ** */ -#include "HTUtils.h" -#include /* strchr() */ -#include "HTString.h" -#include "HTParse.h" /* URL parsing function */ -#include "HTList.h" /* HTList object */ -#include "HTAlert.h" /* HTConfirm(), HTPrompt() */ -#include "HTAAUtil.h" /* AA common to both sides */ -#include "HTAssoc.h" /* Assoc list */ -#include "HTAABrow.h" /* Implemented here */ -#include "HTUU.h" /* Uuencoding and uudecoding */ +#include +#include +#include /* URL parsing function */ +#include /* HTList object */ +#include /* HTConfirm(), HTPrompt() */ +#include /* AA common to both sides */ +#include /* Assoc list */ +#include /* Implemented here */ +#include /* Uuencoding and uudecoding */ -#include "LYLeaks.h" +#include extern BOOL using_proxy; /* Are we using an HTTP gateway? */ @@ -76,7 +75,7 @@ typedef struct { int portnumber; /* Port number */ BOOL IsProxy; /* Is it a proxy? */ HTList * setups; /* List of protection setups */ - /* on this server; i.e. valid */ + /* on this server; i.e., valid */ /* authentication schemes and */ /* templates when to use them. */ /* This is actually a list of */ @@ -140,7 +139,7 @@ PUBLIC void HTAAForwardAuth_set ARGS2( CONST char *, scheme_name, CONST char *, scheme_specifics) { - int len = 20 + (scheme_name ? strlen(scheme_name) : 0) + int len = 20 + (scheme_name ? strlen(scheme_name) : 0) + (scheme_specifics ? strlen(scheme_specifics) : 0); FREE(HTAAForwardAuth); @@ -204,7 +203,7 @@ PRIVATE HTAAServer *HTAAServer_new ARGS3( if (!server_table) server_table = HTList_new(); - + HTList_addObject(server_table, (void*)server); return server; @@ -234,7 +233,7 @@ PRIVATE void HTAAServer_delete ARGS1( if (killme->setups != NULL) { n = HTList_count(killme->setups); for (i = (n - 1); i >= 0; i--) { - if ((setup = (HTAASetup*)HTList_objectAt(killme->setups, + if ((setup = (HTAASetup*)HTList_objectAt(killme->setups, i)) != NULL) { HTAASetup_delete(setup); setup = NULL; @@ -298,7 +297,7 @@ PRIVATE HTAAServer *HTAAServer_lookup ARGS3( } -/*************************** HTAASetup *******************************/ +/*************************** HTAASetup *******************************/ /* PRIVATE HTAASetup_lookup() ** FIGURE OUT WHICH AUTHENTICATION SETUP THE SERVER @@ -320,7 +319,7 @@ PRIVATE HTAAServer *HTAAServer_lookup ARGS3( ** Otherwise, a HTAASetup structure representing ** the protected server setup on the corresponding ** document tree. -** +** */ PRIVATE HTAASetup *HTAASetup_lookup ARGS4( CONST char *, hostname, @@ -341,32 +340,29 @@ PRIVATE HTAASetup *HTAASetup_lookup ARGS4( HTList *cur = server->setups; - if (TRACE) - fprintf(stderr, "%s %s (%s:%d:%s)\n", - "HTAASetup_lookup: resolving setup for", - (IsProxy ? "proxy" : "server"), - hostname, portnumber, docname); + CTRACE(tfp, "%s %s (%s:%d:%s)\n", + "HTAASetup_lookup: resolving setup for", + (IsProxy ? "proxy" : "server"), + hostname, portnumber, docname); while (NULL != (setup = (HTAASetup*)HTList_nextObject(cur))) { if (HTAA_templateMatch(setup->template, docname)) { - if (TRACE) - fprintf(stderr, "%s `%s' %s `%s'\n", - "HTAASetup_lookup:", docname, - "matched template", setup->template); + CTRACE(tfp, "%s `%s' %s `%s'\n", + "HTAASetup_lookup:", docname, + "matched template", setup->template); return setup; + } else { + CTRACE(tfp, "%s `%s' %s `%s'\n", + "HTAASetup_lookup:", docname, + "did NOT match template", setup->template); } - else if (TRACE) - fprintf(stderr, "%s `%s' %s `%s'\n", - "HTAASetup_lookup:", docname, - "did NOT match template", setup->template); } /* while setups remain */ } /* if valid parameters and server found */ - if (TRACE) - fprintf(stderr, "%s `%s' %s\n", - "HTAASetup_lookup: No template matched", - (docname ? docname : "(null)"), - "(so probably not protected)"); + CTRACE(tfp, "%s `%s' %s\n", + "HTAASetup_lookup: No template matched", + (docname ? docname : "(null)"), + "(so probably not protected)"); return NULL; /* NULL in parameters, or not found */ } @@ -493,7 +489,7 @@ PRIVATE HTAARealm *HTAARealm_lookup ARGS2( if (realm_table && realmname) { HTList *cur = realm_table; HTAARealm *realm; - + while (NULL != (realm = (HTAARealm*)HTList_nextObject(cur))) { if (0==strcmp(realm->realmname, realmname)) return realm; @@ -587,7 +583,7 @@ PRIVATE char *compose_auth_string ARGS3( HTAARealm *realm; char *i_net_addr = "0.0.0.0"; /* Change... @@@@ */ char *timestamp = "42"; /* ... these @@@@ */ - + FREE(compose_auth_stringResult); /* From previous call */ @@ -603,18 +599,17 @@ PRIVATE char *compose_auth_string ARGS3( realm = HTAARealm_lookup(setup->server->realms, realmname); if (!(realm && realm->username && *realm->username && - realm->password && *realm->password) || setup->retry) { + realm->password) || setup->retry) { if (!realm) { - if (TRACE) - fprintf(stderr, "%s `%s' %s\n", - "compose_auth_string: realm:", realmname, - "not found -- creating"); + CTRACE(tfp, "%s `%s' %s\n", + "compose_auth_string: realm:", realmname, + "not found -- creating"); realm = HTAARealm_new(setup->server->realms, realmname, NULL, NULL); } /* * The template should be either the '*' global - * for everthing on the server (always true for + * for everything on the server (always true for * proxy authorization setups), or a path for * the start of a protected limb, with no host * field, but we'll check for a host anyway in @@ -637,9 +632,7 @@ PRIVATE char *compose_auth_string ARGS3( theHost = setup->server->hostname; if (setup->server->portnumber > 0 && setup->server->portnumber != 80) { - if (!(thePort = (char *)calloc(1, sizeof(char) * 40))) - outofmem(__FILE__, "compose_auth_string"); - sprintf(thePort, ":%d", setup->server->portnumber); + HTSprintf0(&thePort, ":%d", setup->server->portnumber); } /* * Set up the message for the username prompt, @@ -651,9 +644,7 @@ PRIVATE char *compose_auth_string ARGS3( len = strlen(realm->realmname) + strlen(theHost ? theHost : "??") + 50; - if (!(msg = (char *)calloc(1, sizeof(char) * len))) - outofmem(__FILE__, "compose_auth_string"); - sprintf(msg, "Username for '%s' at %s '%s%s':", + HTSprintf0(&msg, gettext("Username for '%s' at %s '%s%s':"), realm->realmname, (IsProxy ? "proxy" : "server"), (theHost ? theHost : "??"), @@ -675,7 +666,7 @@ PRIVATE char *compose_auth_string ARGS3( * Signals to retry. - FM */ return NULL; - } else if (*realm->username == '\0' || *realm->password == '\0') { + } else if (*realm->username == '\0') { /* * Signals to abort. - FM */ @@ -683,7 +674,7 @@ PRIVATE char *compose_auth_string ARGS3( return compose_auth_stringResult; } } - + len = strlen(realm->username ? realm->username : "") + strlen(realm->password ? realm->password : "") + 3; @@ -791,7 +782,7 @@ PRIVATE void free_HTAAGlobals NOARGS if (server_table != NULL) { n = HTList_count(server_table); for (i = (n - 1); i >= 0; i--) { - if ((server = (HTAAServer*)HTList_objectAt(server_table, + if ((server = (HTAAServer*)HTList_objectAt(server_table, i)) != NULL) { HTAAServer_delete(server); server = NULL; @@ -846,7 +837,9 @@ PUBLIC char *HTAA_composeAuth ARGS4( ** Setup atexit() freeing if not done already. - FM */ if (!free_HTAAGlobalsSet) { +#ifdef LY_FIND_LEAKS atexit(free_HTAAGlobals); +#endif free_HTAAGlobalsSet = TRUE; } @@ -860,9 +853,8 @@ PUBLIC char *HTAA_composeAuth ARGS4( ** on server-side. Life is hard.) */ if (HTAAForwardAuth) { - if (TRACE) - fprintf(stderr, "HTAA_composeAuth: %s\n", - "Forwarding received authorization"); + CTRACE(tfp, "HTAA_composeAuth: %s\n", + "Forwarding received authorization"); StrAllocCopy(HTAA_composeAuthResult, HTAAForwardAuth); HTAAForwardAuth_reset(); /* Just a precaution */ return HTAA_composeAuthResult; @@ -875,9 +867,7 @@ PUBLIC char *HTAA_composeAuth ARGS4( ** Proxy Authorization required. - AJL */ - if (TRACE) - fprintf(stderr, - "Composing Proxy Authorization for %s:%d/%s\n", + CTRACE(tfp, "Composing Proxy Authorization for %s:%d/%s\n", hostname, portnumber, docname); if (proxy_portnumber != portnumber || @@ -919,12 +909,12 @@ PUBLIC char *HTAA_composeAuth ARGS4( /* OTHER AUTHENTICATION ROUTINES ARE CALLED HERE */ default: { - char msg[100]; - sprintf(msg, "%s %s `%s'", - "This client doesn't know how to compose proxy", - "authorization information for scheme", - HTAAScheme_name(scheme)); + char *msg = NULL; + HTSprintf0(&msg, "%s `%s'", + gettext("This client doesn't know how to compose proxy authorization information for scheme"), + HTAAScheme_name(scheme)); HTAlert(msg); + FREE(msg); auth_string = NULL; } } /* switch scheme */ @@ -952,9 +942,7 @@ PUBLIC char *HTAA_composeAuth ARGS4( /* ** Normal WWW authorization. */ - if (TRACE) - fprintf(stderr, - "Composing Authorization for %s:%d/%s\n", + CTRACE(tfp, "Composing Authorization for %s:%d/%s\n", hostname, portnumber, docname); if (current_portnumber != portnumber || @@ -996,12 +984,12 @@ PUBLIC char *HTAA_composeAuth ARGS4( /* OTHER AUTHENTICATION ROUTINES ARE CALLED HERE */ default: { - char msg[100]; - sprintf(msg, "%s %s `%s'", - "This client doesn't know how to compose", - "authoritzation information for scheme", + char *msg = 0; + HTSprintf0(&msg, "%s `%s'", + gettext("This client doesn't know how to compose authorization information for scheme"), HTAAScheme_name(scheme)); HTAlert(msg); + FREE(msg); auth_string = NULL; } } /* switch scheme */ @@ -1041,7 +1029,7 @@ PUBLIC char *HTAA_composeAuth ARGS4( ** USERNAME AND/OR PASSWORD (IF MISSPELLED)) ** ON ENTRY: ** start_of_headers is the first block already read from socket, -** but status line skipped; i.e. points to the +** but status line skipped; i.e., points to the ** start of the header section. ** length is the remaining length of the first block. ** soc is the socket to read the rest of server reply. @@ -1061,10 +1049,9 @@ PUBLIC char *HTAA_composeAuth ARGS4( ** field (in function HTAA_composeAuth()). ** NO, otherwise. */ -PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS5( +PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS4( char *, start_of_headers, int, length, - void *, handle, int, soc, BOOL, IsProxy) { @@ -1080,20 +1067,20 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS5( ** Setup atexit() freeing if not done already. - FM */ if (!free_HTAAGlobalsSet) { +#ifdef LY_FIND_LEAKS atexit(free_HTAAGlobals); +#endif free_HTAAGlobalsSet = TRUE; } /* ** Read server reply header lines */ - if (TRACE) - fprintf(stderr, "Server reply header lines:\n"); + CTRACE(tfp, "Server reply header lines:\n"); - HTAA_setupReader(start_of_headers, length, handle, soc); + HTAA_setupReader(start_of_headers, length, soc); while (NULL != (line = HTAA_getUnfoldedLine()) && *line != '\0') { - if (TRACE) - fprintf(stderr, "%s\n", line); + CTRACE(tfp, "%s\n", line); if (strchr(line, ':')) { /* Valid header line */ @@ -1107,12 +1094,7 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS5( (!IsProxy && 0==strcasecomp(fieldname, "WWW-Authenticate:"))) { if (!(arg1 && *arg1 && args && *args)) { - temp = (char *)calloc(1, strlen(line) + - (arg1 ? strlen(arg1) : 0) + - (args ? strlen(args) : 0) + 24); - if (!temp) - outofmem(__FILE__, "HTAA_shouldRetryWithAuth"); - sprintf(temp, "Invalid header '%s%s%s%s%s'", line, + HTSprintf0(&temp, gettext("Invalid header '%s%s%s%s%s'"), line, ((arg1 && *arg1) ? " " : ""), ((arg1 && *arg1) ? arg1 : ""), ((args && *args) ? " " : ""), @@ -1133,9 +1115,8 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS5( } scheme_specifics[scheme] = HTAA_parseArgList(args); num_schemes++; - } - else if (TRACE) { - fprintf(stderr, "Unknown scheme `%s' %s\n", + } else { + CTRACE(tfp, "Unknown scheme `%s' %s\n", (arg1 ? arg1 : "(null)"), (IsProxy ? "in Proxy-Authenticate: field" : @@ -1145,14 +1126,13 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS5( else if (!IsProxy && 0==strcasecomp(fieldname, "WWW-Protection-Template:")) { - if (TRACE) - fprintf(stderr, "Protection template set to `%s'\n", arg1); + CTRACE(tfp, "Protection template set to `%s'\n", arg1); StrAllocCopy(template, arg1); } } /* if a valid header line */ - else if (TRACE) { - fprintf(stderr, "Invalid header line `%s' ignored\n", line); + else { + CTRACE(tfp, "Invalid header line `%s' ignored\n", line); } /* else invalid header line */ FREE(line); @@ -1175,7 +1155,7 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS5( ** Doing it for proxy. -AJL */ if (proxy_setup && proxy_setup->server) { - /* + /* ** We have already tried with proxy authorization. ** Either we don't have access or username or ** password was misspelled. @@ -1185,7 +1165,7 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS5( */ HTAASetup_updateSpecifics(proxy_setup, scheme_specifics); - if (NO == HTConfirm("Authorization failed. Retry?")) { + if (NO == HTConfirm(AUTH_FAILED_PROMPT)) { proxy_setup = NULL; return NO; } else { @@ -1197,7 +1177,7 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS5( } } else { /* - ** proxy_setup == NULL, i.e. we have a + ** proxy_setup == NULL, i.e., we have a ** first connection to a protected server or ** the server serves a wider set of documents ** than we expected so far. @@ -1212,13 +1192,13 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS5( } if (!template) /* Proxy matches everything -AJL */ StrAllocCopy(template, "*"); - proxy_setup = HTAASetup_new(server, + proxy_setup = HTAASetup_new(server, template, valid_schemes, scheme_specifics); FREE(template); - HTAlert("Proxy authorization required -- retrying"); + HTAlert(gettext("Proxy authorization required -- retrying")); return YES; } /* Never reached */ @@ -1244,7 +1224,7 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS5( */ HTAASetup_updateSpecifics(current_setup, scheme_specifics); - if (NO == HTConfirm("Authorization failed. Retry?")) { + if (NO == HTConfirm(AUTH_FAILED_PROMPT)) { current_setup = NULL; return NO; } else { @@ -1256,7 +1236,7 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS5( } } else { /* - ** current_setup == NULL, i.e. we have a + ** current_setup == NULL, i.e., we have a ** first connection to a protected server or ** the server serves a wider set of documents ** than we expected so far. @@ -1271,13 +1251,13 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS5( } if (!template) template = HTAA_makeProtectionTemplate(current_docname); - current_setup = HTAASetup_new(server, + current_setup = HTAASetup_new(server, template, valid_schemes, scheme_specifics); FREE(template); - HTAlert("Access without authorization denied -- retrying"); + HTAlert(gettext("Access without authorization denied -- retrying")); return YES; } /* Never reached */ @@ -1295,7 +1275,7 @@ PUBLIC void HTClearHTTPAuthInfo NOARGS { /* ** Need code to check cached documents against the - ** protention templates, and do something to ensure + ** protection templates, and do something to ensure ** that any protected documents no longer can be ** accessed without a new retrieval. - FM */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAABrow.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAABrow.h index 80da3e6e330..b19b2e6ac4d 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAABrow.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAABrow.h @@ -1,46 +1,37 @@ /* BROWSER SIDE ACCESS AUTHORIZATION MODULE - + This module is the browser side interface to Access Authorization (AA) package. It contains code only for browser. - + Important to know about memory allocation: - + Routines in this module use dynamic allocation, but free automatically all the memory reserved by them. - + Therefore the caller never has to (and never should) free() any object returned by these functions. - + Therefore also all the strings returned by this package are only valid until the next - call to the same function is made. This approach is selected, because of the nature of + call to the same function is made. This approach is selected, because of the nature of access authorization: no string returned by the package needs to be valid longer than until the next call. - + This also makes it easy to plug the AA package in: you don't have to ponder whether to free()something here or is it done somewhere else (because it is always done somewhere else). - + The strings that the package needs to store are copied so the original strings given as parameters to AA functions may be freed or modified with no side effects. - + Also note:The AA package does not free() anything else than what it has itself allocated. - + */ #ifndef HTAABROW_H #define HTAABROW_H -#ifndef HTUTILS_H -#include "HTUtils.h" /* BOOL, PARAMS, ARGS */ -#endif /* HTUTILS_H */ -#include "HTAAUtil.h" /* Common parts of AA */ - - -#ifdef SHORT_NAMES -#define HTAAcoAu HTAA_composeAuth -#define HTAAsRWA HTAA_shouldRetryWithAuth -#endif /*SHORT_NAMES*/ +#include /* Common parts of AA */ /* @@ -49,15 +40,15 @@ Routines for Browser Side Recording of AA Info Most of the browser-side AA is done by the following two functions (which are called from file HTTP.c so the browsers using libwww only need to be linked with the new library and not be changed at all): - + HTAA_composeAuth() composes the Authorization: line contents, if the AA package thinks that the given document is protected. Otherwise this function returns NULL. This function also calls the functions HTPrompt(),HTPromptPassword() and HTConfirm() to get the username, password and some confirmation from the user. - + HTAA_shouldRetryWithAuth() determines whether to retry the request with AA or with a new AA (in case username or password was misspelled). - + */ /* PUBLIC HTAA_composeAuth() @@ -93,7 +84,7 @@ extern char *HTAA_composeAuth PARAMS(( ** USERNAME AND/OR PASSWORD (IF MISSPELLED)) ** ON ENTRY: ** start_of_headers is the first block already read from socket, -** but status line skipped; i.e. points to the +** but status line skipped; i.e., points to the ** start of the header section. ** length is the remaining length of the first block. ** soc is the socket to read the rest of server reply. @@ -115,7 +106,6 @@ extern char *HTAA_composeAuth PARAMS(( extern BOOL HTAA_shouldRetryWithAuth PARAMS(( char * start_of_headers, int length, - void * handle, int soc, BOOL IsProxy)); @@ -132,8 +122,8 @@ Enabling Gateway httpds to Forward Authorization These functions should only be called from daemon code, and HTAAForwardAuth_reset() must be called before the next request is handled to make sure that authorization string isn't cached in daemon so that other people can access private files using - somebody elses previous authorization information. - + somebody else's previous authorization information. + */ extern void HTAAForwardAuth_set PARAMS(( diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAFile.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAFile.c deleted file mode 100644 index a55b2f899c4..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAFile.c +++ /dev/null @@ -1,210 +0,0 @@ - -/* MODULE HTAAFile.c -** FILE ROUTINES FOR AUTHENTICATION -** (PASSWD AND GROUP FILES) AND -** ACCESS CONTROL LIST (.www_acl) -** AUTHORS: -** AL Ari Luotonen luotonen@dxcern.cern.ch -** -** HISTORY: -** -** -** BUGS: -** -** -*/ - - -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ - -#include "tcp.h" /* Macro FROMASCII() */ -/*#include included by HTUtils.h -- FM *//* FILE */ -#include -#include "HTAAUtil.h" /* Common utilities used in AA */ -#include "HTAAFile.h" /* Implemented here */ - -#include "LYLeaks.h" - -#define SPACE ' ' -#define TAB '\t' - - - -/* PUBLIC HTAAFile_nextRec() -** GO TO THE BEGINNING OF THE NEXT RECORD -** ON ENTRY: -** fp is the file from which records are read from. -** -** ON EXIT: -** returns nothing. File read pointer is located at the beginning -** of the next record. Handles continuation lines -** (lines ending in comma indicate a following -** continuation line). -** -*/ -PUBLIC void HTAAFile_nextRec ARGS1(FILE *, fp) -{ - int ch = getc(fp); - int last = (char)0; - - do { - while (ch != EOF && ch != CR && ch != LF) { - if (ch != ' ' && ch != '\t') - last = ch; /* Last non-whitespace */ - ch = getc(fp); /* Skip until end-of-line */ - } - while (ch != EOF && - (ch == CR || ch == LF))/*Skip carriage returns and linefeeds*/ - ch = getc(fp); - if (ch != EOF) - ungetc(ch, fp); - } while (last == ',' && ch != EOF); /* Skip also continuation lines */ -} - - -/* PRIVATE read_item() -** READ AN ITEM FROM A PASSWORD, GROUP -** OR ACCESS CONTROL LIST FILE -** i.e. either a field, or a list item. -** ON ENTRY: -** fp is the file to read the characters from -** contents is the character array to put the characters -** reading_list if TRUE, read a list item (ends either in -** acomma or acolon), -** if FALSE, read a field (ends in acolon). -** max_len is the maximum number of characters that may -** be read (i.e. the size of dest minus one for -** terminating null). -** ON EXIT: -** returns the terminating character -** (i.e. either separator or CR or LF or EOF). -** contents contains a null-terminated string representing -** the read field. -** NOTE 1: -** Ignores leading and trailing blanks and tabs. -** NOTE 2: -** If the item is more than max_len characters -** long, the rest of the characters in that item -** are ignored. However, contents is always -** null-terminated! -*/ -PRIVATE int read_item ARGS4(FILE *, fp, - char *, contents, - BOOL, reading_list, - int, max_len) -{ - char * dest = contents; - char * end = contents; - int cnt = 0; - int ch = getc(fp); - - while (SPACE == ch || TAB == ch) /* Skip spaces and tabs */ - ch = getc(fp); - - while (ch != FIELD_SEPARATOR && - (!reading_list || ch != LIST_SEPARATOR) && - ch != CR && ch != LF && ch != EOF && cnt < max_len) { - *(dest++) = ch; - cnt++; - if (ch != SPACE && ch != TAB) - end = dest; - ch = getc(fp); - } /* while not eol or eof or too many read */ - - if (cnt == max_len) { - /* If the field was too long (or exactly maximum) ignore the rest */ - while (ch != FIELD_SEPARATOR && - (!reading_list || ch != LIST_SEPARATOR) && - ch != CR && ch != LF && ch != EOF) - ch = getc(fp); - } - - if (ch == CR || ch == LF) - ungetc(ch, fp); /* Push back the record separator (NL or LF) */ - - /* Terminate the string, truncating trailing whitespace off. - ** Otherwise (if whitespace would be included), here would - ** be *dest='\0'; and cnt -= ... would be left out. - */ - *end = '\0'; - cnt -= dest-end; - - return ch; /* Return the terminating character */ -} - - - -/* PUBLIC HTAAFile_readField() -** READ A FIELD FROM A PASSWORD, GROUP -** OR ACCESS CONTROL LIST FILE -** i.e. an item terminated by colon, -** end-of-line, or end-of-file. -** ON ENTRY: -** fp is the file to read the characters from -** contents is the character array to put the characters -** max_len is the maximum number of characters that may -** be read (i.e. the size of dest minus one for -** terminating null). -** ON EXIT: -** returns the terminating character -** (i.e. either separator or CR or LF or EOF). -** contents contains a null-terminated string representing -** the read field. -** NOTE 1: -** Ignores leading and trailing blanks and tabs. -** NOTE 2: -** If the field is more than max_len characters -** long, the rest of the characters in that item -** are ignored. However, contents is always -** null-terminated! -*/ -PUBLIC int HTAAFile_readField ARGS3(FILE *, fp, - char *, contents, - int, max_len) -{ - return read_item(fp, contents, NO, max_len); -} - - - - -/* PUBLIC HTAAFile_readList() -** -** READ A LIST OF STRINGS SEPARATED BY COMMAS -** (FROM A GROUP OR ACCESS CONTROL LIST FILE) -** ON ENTRY: -** fp is a pointer to the input file. -** result is the list to which append the read items. -** max_len is the maximum number of characters in each -** list entry (extra characters are ignored). -** ON EXIT: -** returns the number of items read. -** -*/ -PUBLIC int HTAAFile_readList ARGS3(FILE *, fp, - HTList *, result, - int, max_len) -{ - char *item = NULL; - int terminator; - int cnt = 0; - - do { - if (!item && !(item = (char*)malloc(max_len+1))) - outofmem(__FILE__, "HTAAFile_readList"); - terminator = read_item(fp, item, YES, max_len); - if (strlen(item) > 0) { - cnt++; - HTList_addObject(result, (void*)item); - item = NULL; - } - } while (terminator != FIELD_SEPARATOR && - terminator != CR && terminator != LF && - terminator != EOF); - - FREE(item); /* This was not needed */ - return cnt; -} - diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAFile.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAFile.h deleted file mode 100644 index f6f8ac5053e..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAFile.h +++ /dev/null @@ -1,126 +0,0 @@ -/* FILE ROUTINES FOR ACCESS AUTHORIZATION PACKAGE - - This module implements the routines used for accessing (and parsing) the files used in - the access authorization: - - password file - - group file - - access control list (ACL) file - - */ - - -#ifndef HTAAFILE_H -#define HTAAFILE_H - -#ifndef HTUTILS_H -#include "HTUtils.h" /* BOOL, PARAMS, ARGS */ -#endif /* HTUTILS_H */ -/*#include included by HTUtils.h -- FM *//* FILE */ -#include "HTList.h" /* HTList */ - -#ifdef SHORT_NAMES -#define HTAAFnRe HTAAFile_nextRec -#define HTAAFrFi HTAAFile_readField -#define HTAAFrLi HTAAFile_readList -#endif /*SHORT_NAMES*/ - - -/* Used field separators */ - -#define FIELD_SEPARATOR ':' /* Used to separate fields */ -#define LIST_SEPARATOR ',' /* Used to separate items in a list */ - /* in group and ALC files. */ - -/* - -Naming conventions - - Record is an entire line in file. - - Field is an entity separated by colons and/or by end-of-line. - - List is a field in which there are items separated by commas. - -Record-oriented Read Routines - - Password, group and ACL are internally read in by the following functions: - - HTAAFile_nextRec() skips to the beginning of the next record (must be called even - after the last field of a record is read to proceed to the next - record). - - HTAAFile_readField() reads a field (separated by colons). - - HTAAFile_readList() reads a field containing a comma-separated list of items. - - */ - -/* PUBLIC HTAAFile_nextRec() -** GO TO THE BEGINNING OF THE NEXT RECORD -** ON ENTRY: -** fp is the file from which records are read from. -** -** ON EXIT: -** returns nothing. File read pointer is located at the beginning -** of the next record. -** -*/ -PUBLIC void HTAAFile_nextRec PARAMS((FILE * fp)); - - -/* PUBLIC HTAAFile_readField() -** READ A FIELD FROM A PASSWORD, GROUP -** OR ACCESS CONTROL LIST FILE -** i.e. an item terminated by colon, -** end-of-line, or end-of-file. -** ON ENTRY: -** fp is the file to read the characters from -** contents is the character array to put the characters -** max_len is the maximum number of characters that may -** be read (i.e. the size of dest minus one for -** terminating null). -** ON EXIT: -** returns the terminating character -** (i.e. either separator or CR or LF or EOF). -** contents contains a null-terminated string representing -** the read field. -** NOTE 1: -** Ignores leading and trailing blanks and tabs. -** NOTE 2: -** If the field is more than max_len characters -** long, the rest of the characters in that item -** are ignored. However, contents is always -** null-terminated! -*/ -PUBLIC int HTAAFile_readField PARAMS((FILE * fp, - char * contents, - int max_len)); - - -/* PUBLIC HTAAFile_readList() -** -** READ A LIST OF STRINGS SEPARATED BY COMMAS -** (FROM A GROUP OR ACCESS CONTROL LIST FILE) -** ON ENTRY: -** fp is a pointer to the input file. -** result is the list to which append the read items. -** max_len is the maximum number of characters in each -** list entry (extra characters are ignored). -** ON EXIT: -** returns the number of items read. -** -*/ -PUBLIC int HTAAFile_readList PARAMS((FILE * fp, - HTList * result, - int max_len)); -/* - - */ - -#endif /* not HTAAFILE_H */ -/* - - End of file HTAAFile.h. */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAProt.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAProt.c index 9b40c3beee3..cddfa1c48d6 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAProt.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAProt.c @@ -17,9 +17,8 @@ ** */ -#include "HTUtils.h" +#include -#include #ifndef VMS #ifndef NOUSERS #include /* Unix password file routine: getpwnam() */ @@ -27,13 +26,14 @@ #endif /* NOUSERS */ #endif /* not VMS */ -#include "HTAAUtil.h" -#include "HTAAFile.h" -#include "HTLex.h" /* Lexical analysor */ -#include "HTAssoc.h" /* Association list */ -#include "HTAAProt.h" /* Implemented here */ +#include +#include /* Lexical analysor */ +#include /* Implemented here */ -#include "LYLeaks.h" +#include + +#define NOBODY 65534 /* -2 in 16-bit environment */ +#define NONESUCH 65533 /* -3 in 16-bit environment */ /* ** Protection setup caching @@ -72,19 +72,19 @@ PRIVATE BOOL isNumber ARGS1(CONST char *, s) } -#if defined (VMS) || defined (NOUSERS) +#if defined (NOUSERS) /* PUBLIC HTAA_getUidName() ** GET THE USER ID NAME (VMS ONLY) ** ON ENTRY: ** No arguments. ** ** ON EXIT: -** returns the user name +** returns the user name ** Default is "" (nobody). */ PUBLIC char * HTAA_getUidName NOARGS { - if (current_prot && current_prot->uid_name + if (current_prot && current_prot->uid_name && (0 != strcmp(current_prot->uid_name,"nobody")) ) return(current_prot->uid_name); else @@ -120,43 +120,31 @@ PUBLIC char * HTAA_getFileName NOARGS */ PUBLIC int HTAA_getUid NOARGS { - struct passwd *pw = NULL; + int uid; if (current_prot && current_prot->uid_name) { if (isNumber(current_prot->uid_name)) { - if (NULL != (pw = getpwuid(atoi(current_prot->uid_name)))) { - if (TRACE) fprintf(stderr, - "%s(%s) returned (%s:%s:%d:%d:...)\n", - "HTAA_getUid: getpwuid", - current_prot->uid_name, - pw->pw_name, pw->pw_passwd, - pw->pw_uid, pw->pw_gid); - return pw->pw_uid; + uid = atoi(current_prot->uid_name); + if ((*HTAA_UidToName (uid)) != '\0') { + return uid; } } else { /* User name (not a number) */ - if (NULL != (pw = getpwnam(current_prot->uid_name))) { - if (TRACE) fprintf(stderr, "%s(\"%s\") %s (%s:%s:%d:%d:...)\n", - "HTAA_getUid: getpwnam", - current_prot->uid_name, "returned", - pw->pw_name, pw->pw_passwd, - pw->pw_uid, pw->pw_gid); - return pw->pw_uid; + if ((uid = HTAA_NameToUid (current_prot->uid_name)) != NONESUCH) { + return uid; } } } /* ** Ok, then let's get uid for nobody. */ - if (NULL != (pw = getpwnam("nobody"))) { - if (TRACE) fprintf(stderr, "HTAA_getUid: Uid for `nobody' is %d\n", - pw->pw_uid); - return pw->pw_uid; + if ((uid = HTAA_NameToUid ("nobody")) != NONESUCH) { + return uid; } /* ** Ok, then use default. */ - return 65534; /* nobody */ + return NOBODY; /* nobody */ } @@ -170,47 +158,32 @@ PUBLIC int HTAA_getUid NOARGS ** Default is 65534 (nogroup). */ PUBLIC int HTAA_getGid NOARGS -{ - struct group *gr = NULL; - +{ + int gid; + if (current_prot && current_prot->gid_name) { if (isNumber(current_prot->gid_name)) { - if (NULL != (gr = getgrgid(atoi(current_prot->gid_name)))) { -#ifndef __EMX__ /* no gr_passwd */ - if (TRACE) fprintf(stderr, - "%s(%s) returned (%s:%s:%d:...)\n", - "HTAA_getGid: getgrgid", - current_prot->gid_name, - gr->gr_name, gr->gr_passwd, gr->gr_gid); -#endif - return gr->gr_gid; + gid = atoi(current_prot->gid_name); + if (*HTAA_GidToName(gid) != '\0') { + return gid; } } else { /* Group name (not number) */ - if (NULL != (gr = getgrnam(current_prot->gid_name))) { -#ifndef __EMX__ /* no gr_passwd */ - if (TRACE) fprintf(stderr, - "%s(\"%s\") returned (%s:%s:%d:...)\n", - "HTAA_getGid: getgrnam", - current_prot->gid_name, - gr->gr_name, gr->gr_passwd, gr->gr_gid); -#endif - return gr->gr_gid; + if ((gid = HTAA_NameToGid (current_prot->gid_name)) != NONESUCH) { + return gid; } } } /* ** Ok, then let's get gid for nogroup. */ - if (NULL != (gr = getgrnam("nogroup"))) { - if (TRACE) fprintf(stderr, "HTAA_getGid: Gid for `nogroup' is %d\n", - gr->gr_gid); - return gr->gr_gid; + if ((gid = HTAA_NameToGid ("nogroup")) != NONESUCH) { + return gid; } /* ** Ok, then use default. */ - return 65534; /* nogroup */ + return NOBODY; /* nogroup */ } #endif /* not VMS */ @@ -278,9 +251,9 @@ PRIVATE void HTAA_parseProtFile ARGS2(HTAAProt *, prot, break; if (lex_item == LEX_ALPH_STR) { /* Valid setup record */ - + StrAllocCopy(fieldname, HTlex_buffer); - + if (LEX_FIELD_SEP != (lex_item = lex(fp))) unlex(lex_item); /* If someone wants to use colon */ /* after field name it's ok, but */ @@ -294,16 +267,17 @@ PRIVATE void HTAA_parseProtFile ARGS2(HTAAProt *, prot, if (!prot->valid_schemes) prot->valid_schemes = HTList_new(); HTList_addObject(prot->valid_schemes,(void*)scheme); - if (TRACE) fprintf(stderr, "%s %s `%s'\n", - "HTAA_parseProtFile: valid", - "authentication scheme:", - HTAAScheme_name(scheme)); + CTRACE(tfp, "%s %s `%s'\n", + "HTAA_parseProtFile: valid", + "authentication scheme:", + HTAAScheme_name(scheme)); + } else { + CTRACE(tfp, "%s %s `%s'\n", + "HTAA_parseProtFile: unknown", + "authentication scheme:", + HTlex_buffer); } - else if (TRACE) fprintf(stderr, "%s %s `%s'\n", - "HTAA_parseProtFile: unknown", - "authentication scheme:", - HTlex_buffer); - + if (LEX_ITEM_SEP != (lex_item = lex(fp))) break; /* @@ -322,11 +296,10 @@ PRIVATE void HTAA_parseProtFile ARGS2(HTAAProt *, prot, lex_item=LEX_REC_SEP; /*groupdef parser read this already*/ if (TRACE) { if (prot->mask_group) { - fprintf(stderr, + fprintf(tfp, "HTAA_parseProtFile: Mask group:\n"); HTAA_printGroupDef(prot->mask_group); - } else fprintf(stderr, "HTAA_parseProtFile: %s\n", - "Mask group syntax error"); + } else fprintf(tfp, "HTAA_parseProtFile: Mask group syntax error\n"); } } /* if "Mask" */ @@ -337,20 +310,19 @@ PRIVATE void HTAA_parseProtFile ARGS2(HTAAProt *, prot, prot->values = HTAssocList_new(); HTAssocList_add(prot->values, fieldname, HTlex_buffer); lex_item = lex(fp); /* Read record separator */ - if (TRACE) fprintf(stderr, - "%s `%s' bound to value `%s'\n", - "HTAA_parseProtFile: Name", - fieldname, HTlex_buffer); + CTRACE(tfp, "%s `%s' bound to value `%s'\n", + "HTAA_parseProtFile: Name", + fieldname, HTlex_buffer); } } /* else name-value pair */ } /* if valid field */ if (lex_item != LEX_EOF && lex_item != LEX_REC_SEP) { - if (TRACE) fprintf(stderr, "%s %s %d (that line ignored)\n", - "HTAA_parseProtFile: Syntax error", - "in protection setup file at line", - HTlex_line); + CTRACE(tfp, "%s %s %d (that line ignored)\n", + "HTAA_parseProtFile: Syntax error", + "in protection setup file at line", + HTlex_line); do { lex_item = lex(fp); } while (lex_item != LEX_EOF && lex_item != LEX_REC_SEP); @@ -398,19 +370,18 @@ PRIVATE HTAAProt *HTAAProt_new ARGS3(CONST char *, cur_docname, if (!prot_cache) prot_cache = HTList_new(); - + while (NULL != (cache_item = (HTAAProtCache*)HTList_nextObject(cur))) { if (!strcmp(cache_item->prot_filename, prot_filename)) break; } if (cache_item) { prot = cache_item->prot; - if (TRACE) fprintf(stderr, "%s `%s' already in cache\n", - "HTAAProt_new: Protection file", prot_filename); + CTRACE(tfp, "%s `%s' already in cache\n", + "HTAAProt_new: Protection file", prot_filename); } else { - if (TRACE) fprintf(stderr, - "HTAAProt_new: Loading protection file `%s'\n", - prot_filename); + CTRACE(tfp, "HTAAProt_new: Loading protection file `%s'\n", + prot_filename); if (!(prot = (HTAAProt*)calloc(1, sizeof(HTAAProt)))) outofmem(__FILE__, "HTAAProt_new"); @@ -433,10 +404,11 @@ PRIVATE HTAAProt *HTAAProt_new ARGS3(CONST char *, cur_docname, cache_item->prot_filename = NULL; StrAllocCopy(cache_item->prot_filename, prot_filename); HTList_addObject(prot_cache, (void*)cache_item); + } else { + CTRACE(tfp, "HTAAProt_new: %s `%s'\n", + "Unable to open protection setup file", + (prot_filename ? prot_filename : "(null)")); } - else if (TRACE) fprintf(stderr, "HTAAProt_new: %s `%s'\n", - "Unable to open protection setup file", - (prot_filename ? prot_filename : "(null)")); } if (cur_docname) @@ -475,9 +447,9 @@ PUBLIC void HTAA_setDefaultProtection ARGS3(CONST char *, cur_docname, if (prot_filename) { default_prot = HTAAProt_new(cur_docname, prot_filename, ids); } else { - if (TRACE) fprintf(stderr, "%s %s\n", - "HTAA_setDefaultProtection: ERROR: Protection file", - "not specified (obligatory for DefProt rule)!!\n"); + CTRACE(tfp, "%s %s\n", + "HTAA_setDefaultProtection: ERROR: Protection file", + "not specified (obligatory for DefProt rule)!!\n"); } } @@ -513,15 +485,15 @@ PUBLIC void HTAA_setCurrentProtection ARGS3(CONST char *, cur_docname, if (default_prot) { current_prot = default_prot; HTAA_setIds(current_prot, ids); - if (TRACE) fprintf(stderr, "%s %s %s\n", - "HTAA_setCurrentProtection: Protection file", - "not specified for Protect rule", - "-- using default protection"); + CTRACE(tfp, "%s %s %s\n", + "HTAA_setCurrentProtection: Protection file", + "not specified for Protect rule", + "-- using default protection"); } else { - if (TRACE) fprintf(stderr, "%s %s %s\n", - "HTAA_setCurrentProtection: ERROR: Protection", - "file not specified for Protect rule, and", - "default protection is not set!!"); + CTRACE(tfp, "%s %s %s\n", + "HTAA_setCurrentProtection: ERROR: Protection", + "file not specified for Protect rule, and", + "default protection is not set!!"); } } } @@ -561,7 +533,7 @@ PUBLIC HTAAProt *HTAA_getCurrentProtection NOARGS ** returns a HTAAProt structure representing the ** default protection setup of the HTTranslate()'d ** file (if HTAA_getCurrentProtection() returned -** NULL, i.e. if there is no "protect" rule +** NULL, i.e., if there is no "protect" rule ** but ACL exists, and we need to know default ** protection settings). ** This must not be free()'d. @@ -575,7 +547,7 @@ PUBLIC HTAAProt *HTAA_getDefaultProtection NOARGS if (!current_prot) { current_prot = default_prot; default_prot = NULL; - } + } return current_prot; } @@ -596,3 +568,201 @@ PUBLIC void HTAA_clearProtections NOARGS current_prot = NULL; /* These are not freed because */ default_prot = NULL; /* they are actually in cache. */ } + +typedef struct { + char *name; + int user; + } USER_DATA; + +PRIVATE HTList *known_grp = NULL; +PRIVATE HTList *known_pwd = NULL; +PRIVATE BOOL uidgid_cache_inited = NO; + +#ifdef LY_FIND_LEAKS +PRIVATE void clear_uidgid_cache NOARGS +{ + USER_DATA *data; + if (known_grp) { + while ((data = HTList_removeLastObject(known_grp)) != NULL) { + FREE(data->name); + FREE(data); + } + FREE(known_grp); + } + if (known_pwd) { + while ((data = HTList_removeLastObject(known_pwd)) != NULL) { + FREE(data->name); + FREE(data); + } + FREE(known_pwd); + } +} +#endif /* LY_FIND_LEAKS */ + +PRIVATE void save_gid_info ARGS2(char *, name, int, user) +{ + USER_DATA *data = (USER_DATA *)calloc(1, sizeof(USER_DATA)); + if (!data) + return; + if (!known_grp) { + known_grp = HTList_new(); + if (!uidgid_cache_inited) { +#ifdef LY_FIND_LEAKS + atexit(clear_uidgid_cache); +#endif + uidgid_cache_inited = YES; + } + } + StrAllocCopy(data->name, name); + data->user = user; + HTList_addObject (known_grp, data); +} + +PRIVATE void save_uid_info ARGS2(char *, name, int, user) +{ + USER_DATA *data = (USER_DATA *)calloc(1, sizeof(USER_DATA)); + if (!data) + return; + if (!known_pwd) { + known_pwd = HTList_new(); + if (!uidgid_cache_inited) { +#ifdef LY_FIND_LEAKS + atexit(clear_uidgid_cache); +#endif + uidgid_cache_inited = YES; + } + } + StrAllocCopy(data->name, name); + data->user = user; + HTList_addObject (known_pwd, data); +} + +/* PUBLIC HTAA_UidToName +** GET THE USER NAME +** ON ENTRY: +** The user-id +** +** ON EXIT: +** returns the user name, or an empty string if not found. +*/ +PUBLIC char * HTAA_UidToName ARGS1(int, uid) +{ +#ifndef NOUSERS + struct passwd *pw; + HTList *me = known_pwd; + + while (HTList_nextObject(me)) { + USER_DATA *data = (USER_DATA *)(me->object); + if (uid == data->user) + return data->name; + } + + if ((pw = getpwuid(uid)) != 0 + && pw->pw_name != 0) { + CTRACE(tfp, "%s(%d) returned (%s:%d:...)\n", + "HTAA_UidToName: getpwuid", + uid, + pw->pw_name, (int) pw->pw_uid); + save_uid_info(pw->pw_name, (int) pw->pw_uid); + return pw->pw_name; + } +#endif + return ""; +} + +/* PUBLIC HTAA_NameToUid +** GET THE USER ID +** ON ENTRY: +** The user-name +** +** ON EXIT: +** returns the user id, or NONESUCH if not found. +*/ +PUBLIC int HTAA_NameToUid ARGS1(char *, name) +{ +#ifndef NOUSERS + struct passwd *pw; + HTList *me = known_pwd; + + while (HTList_nextObject(me)) { + USER_DATA *data = (USER_DATA *)(me->object); + if (!strcmp(name, data->name)) + return data->user; + } + + if ((pw = getpwnam(name)) != 0) { + CTRACE(tfp, "%s(%s) returned (%s:%d:...)\n", + "HTAA_NameToUid: getpwnam", + name, + pw->pw_name, (int) pw->pw_uid); + save_uid_info(pw->pw_name, (int) pw->pw_uid); + return (int) pw->pw_uid; + } +#endif + return NONESUCH; +} + +/* PUBLIC HTAA_GidToName +** GET THE GROUP NAME +** ON ENTRY: +** The group-id +** +** ON EXIT: +** returns the group name, or an empty string if not found. +*/ +PUBLIC char * HTAA_GidToName ARGS1(int, gid) +{ +#ifndef NOUSERS + struct group *gr; + HTList *me = known_grp; + + while (HTList_nextObject(me)) { + USER_DATA *data = (USER_DATA *)(me->object); + if (gid == data->user) + return data->name; + } + + if ((gr = getgrgid(gid)) != 0 + && gr->gr_name != 0) { + CTRACE(tfp, "%s(%d) returned (%s:%d:...)\n", + "HTAA_GidToName: getgrgid", + gid, + gr->gr_name, (int) gr->gr_gid); + save_gid_info(gr->gr_name, (int) gr->gr_gid); + return gr->gr_name; + } +#endif + return ""; +} + +/* PUBLIC HTAA_NameToGid +** GET THE GROUP ID +** ON ENTRY: +** The group-name +** +** ON EXIT: +** returns the group id, or NONESUCH if not found. +*/ +PUBLIC int HTAA_NameToGid ARGS1(char *, name) +{ +#ifndef NOUSERS + struct group *gr; + HTList *me = known_grp; + + while (HTList_nextObject(me)) { + USER_DATA *data = (USER_DATA *)(me->object); + if (!strcmp(name, data->name)) + return data->user; + } + + if ((gr = getgrnam(name)) != 0) { + CTRACE(tfp, "%s(%s) returned (%s:%d:...)\n", + "HTAA_NameToGid: getgrnam", + name, + gr->gr_name, (int) gr->gr_gid); + save_gid_info(gr->gr_name, (int) gr->gr_gid); + return (int) gr->gr_gid; + } +#endif + return NONESUCH; +} diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAProt.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAProt.h index 73bb7c454d3..ad3af096264 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAProt.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAProt.h @@ -1,25 +1,13 @@ /* PROTECTION SETUP FILE - + */ #ifndef HTAAPROT_H #define HTAAPROT_H -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ -#include "HTGroup.h" -#include "HTAssoc.h" - -#ifdef SHORT_NAMES -#define HTAAgUid HTAA_getUid -#define HTAAgGid HTAA_getGid -#define HTAAgDPr HTAA_setDefaultProtection -#define HTAAsCPr HTAA_setCurrentProtection -#define HTAAgCPr HTAA_getCurrentProtection -#define HTAAgDPr HTAA_getDefaultProtection -#define HTAAclPr HTAA_clearProtections -#endif /*SHORT_NAMES*/ +#include +#include + /* Server's Representation of Document (Tree) Protections @@ -41,15 +29,15 @@ typedef struct { Callbacks for rule system The following three functioncs are called by the rule system: - + HTAA_clearProtections() when starting to translate a filename - + HTAA_setDefaultProtection() when "defprot" rule is matched - + HTAA_setCurrentProtection() when "protect" rule is matched - + Protection setup files are cached by these functions. - + */ /* PUBLIC HTAA_setDefaultProtection() @@ -71,7 +59,7 @@ Callbacks for rule system ** returns nothing. ** Sets the module-wide variable default_prot. */ -PUBLIC void HTAA_setDefaultProtection PARAMS((CONST char * cur_docname, +extern void HTAA_setDefaultProtection PARAMS((CONST char * cur_docname, CONST char * prot_filename, CONST char * eff_ids)); @@ -96,7 +84,7 @@ PUBLIC void HTAA_setDefaultProtection PARAMS((CONST char * cur_docname, ** returns nothing. ** Sets the module-wide variable current_prot. */ -PUBLIC void HTAA_setCurrentProtection PARAMS((CONST char * cur_docname, +extern void HTAA_setCurrentProtection PARAMS((CONST char * cur_docname, CONST char * prot_filename, CONST char * eff_ids)); @@ -112,18 +100,18 @@ PUBLIC void HTAA_setCurrentProtection PARAMS((CONST char * cur_docname, ** returns nothing. ** Frees the memory used by protection information. */ -PUBLIC void HTAA_clearProtections NOPARAMS; +extern void HTAA_clearProtections NOPARAMS; /* Getting Protection Settings HTAA_getCurrentProtection() returns the current protection mode (if there was a "protect" rule). NULL, if no "protect" rule has been matched. - + HTAA_getDefaultProtection() sets the current protection mode to what it was set to by "defprot" rule and also returns it (therefore after this call also HTAA_getCurrentProtection() returns the same structure. - + */ /* PUBLIC HTAA_getCurrentProtection() @@ -140,7 +128,7 @@ Getting Protection Settings ** protection setup of the HTTranslate()'d file. ** This must not be free()'d. */ -PUBLIC HTAAProt *HTAA_getCurrentProtection NOPARAMS; +extern HTAAProt *HTAA_getCurrentProtection NOPARAMS; @@ -157,12 +145,12 @@ PUBLIC HTAAProt *HTAA_getCurrentProtection NOPARAMS; ** returns a HTAAProt structure representing the ** default protection setup of the HTTranslate()'d ** file (if HTAA_getCurrentProtection() returned -** NULL, i.e. if there is no "protect" rule +** NULL, i.e., if there is no "protect" rule ** but ACL exists, and we need to know default ** protection settings). ** This must not be free()'d. */ -PUBLIC HTAAProt *HTAA_getDefaultProtection NOPARAMS; +extern HTAAProt *HTAA_getDefaultProtection NOPARAMS; /* Get User and Group IDs to Which Set to @@ -179,7 +167,7 @@ Get User and Group IDs to Which Set to ** returns the uid number to give to setuid() system call. ** Default is 65534 (nobody). */ -PUBLIC int HTAA_getUid NOPARAMS; +extern int HTAA_getUid NOPARAMS; /* PUBLIC HTAA_getGid() @@ -191,12 +179,12 @@ PUBLIC int HTAA_getUid NOPARAMS; ** returns the uid number to give to setgid() system call. ** Default is 65534 (nogroup). */ -PUBLIC int HTAA_getGid NOPARAMS; +extern int HTAA_getGid NOPARAMS; #endif /* not VMS */ /* For VMS: - + */ #ifdef VMS @@ -209,7 +197,7 @@ PUBLIC int HTAA_getGid NOPARAMS; ** returns the user name ** Default is "" (nobody). */ -PUBLIC char * HTAA_getUidName NOPARAMS; +extern char * HTAA_getUidName NOPARAMS; /* PUBLIC HTAA_getFileName ** GET THE FILENAME (VMS ONLY) @@ -219,8 +207,46 @@ PUBLIC char * HTAA_getUidName NOPARAMS; ** ON EXIT: ** returns the filename */ -PUBLIC char * HTAA_getFileName NOPARAMS; +extern char * HTAA_getFileName NOPARAMS; #endif /* VMS */ + +/* PUBLIC HTAA_UidToName +** GET THE USER NAME +** ON ENTRY: +** The user-id +** +** ON EXIT: +** returns the user name +*/ +extern char * HTAA_UidToName PARAMS((int uid)); +/* PUBLIC HTAA_NameToUid +** GET THE USER ID +** ON ENTRY: +** The user-name +** +** ON EXIT: +** returns the user id +*/ +extern int HTAA_NameToUid PARAMS((char *name)); +/* PUBLIC HTAA_GidToName +** GET THE GROUP NAME +** ON ENTRY: +** The group-id +** +** ON EXIT: +** returns the group name +*/ +extern char * HTAA_GidToName PARAMS((int gid)); +/* PUBLIC HTAA_NameToGid +** GET THE GROUP ID +** ON ENTRY: +** The group-name +** +** ON EXIT: +** returns the group id +*/ +extern int HTAA_NameToGid PARAMS((char *name)); + /* */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAServ.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAServ.c deleted file mode 100644 index cb8623d7fd7..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAServ.c +++ /dev/null @@ -1,686 +0,0 @@ - -/* MODULE HTAAServ.c -** SERVER SIDE ACCESS AUTHORIZATION MODULE -** -** Contains the means for checking the user access -** authorization for a file. -** -** IMPORTANT: -** Routines in this module use dynamic allocation, but free -** automatically all the memory reserved by them. -** -** Therefore the caller never has to (and never should) -** free() any object returned by these functions. -** -** Therefore also all the strings returned by this package -** are only valid until the next call to the same function -** is made. This approach is selected, because of the nature -** of access authorization: no string returned by the package -** needs to be valid longer than until the next call. -** -** This also makes it easy to plug the AA package in: -** you don't have to ponder whether to free() something -** here or is it done somewhere else (because it is always -** done somewhere else). -** -** The strings that the package needs to store are copied -** so the original strings given as parameters to AA -** functions may be freed or modified with no side effects. -** -** The AA package does not free() anything else than what -** it has itself allocated. -** -** AUTHORS: -** AL Ari Luotonen luotonen@dxcern.cern.ch -** -** HISTORY: -** -** -** BUGS: -** -** -*/ - -#include "HTUtils.h" - -/*#include included by HTUtils.h -- FM *//* FILE */ -#include /* strchr() */ - -#include "HTString.h" -#include "HTAccess.h" /* HTSecure */ -#include "HTFile.h" /* HTLocalName */ -#include "HTRules.h" /* */ -#include "HTParse.h" /* URL parsing function */ -#include "HTList.h" /* HTList object */ - -#include "HTAAUtil.h" /* AA common parts */ -#include "HTAuth.h" /* Authentication */ -#include "HTACL.h" /* Access Control List */ -#include "HTGroup.h" /* Group handling */ -#include "HTAAProt.h" /* Protection file parsing */ -#include "HTAAServ.h" /* Implemented here */ - -#include "LYLeaks.h" - -/* -** Global variables -*/ -PUBLIC time_t theTime; - - -/* -** Module-wide global variables -*/ -PRIVATE FILE * htaa_logfile = NULL; /* Log file */ -PRIVATE HTAAUser *htaa_user = NULL; /* Authenticated user */ -PRIVATE HTAAFailReasonType HTAAFailReason = HTAA_OK; /* AA fail reason */ - - -/* SERVER PUBLIC HTAA_statusMessage() -** RETURN A STRING EXPLAINING ACCESS -** AUTHORIZATION FAILURE -** (Can be used in server reply status line -** with 401/403 replies.) -** ON EXIT: -** returns a string containing the error message -** corresponding to internal HTAAFailReason. -*/ -PUBLIC char *HTAA_statusMessage NOARGS -{ - switch (HTAAFailReason) { - - /* 401 cases */ - case HTAA_NO_AUTH: - return "Unauthorized -- authentication failed"; - break; - case HTAA_NOT_MEMBER: - return "Unauthorized to access the document"; - break; - - /* 403 cases */ - case HTAA_BY_RULE: - return "Forbidden -- by rule"; - break; - case HTAA_IP_MASK: - return "Forbidden -- server refuses to serve to your IP address"; - break; - case HTAA_NO_ACL: - case HTAA_NO_ENTRY: - return "Forbidden -- access to file is never allowed"; - break; - case HTAA_SETUP_ERROR: - return "Forbidden -- server protection setup error"; - break; - case HTAA_DOTDOT: - return "Forbidden -- URL containing /../ disallowed"; - break; - case HTAA_HTBIN: - return "Forbidden -- /htbin feature not enabled on this server"; - break; - - /* 404 cases */ - case HTAA_NOT_FOUND: - return "Not found -- file doesn't exist or is read protected"; - break; - - /* Success */ - case HTAA_OK: - return "AA: Access should be ok but something went wrong"; - break; - - case HTAA_OK_GATEWAY: - return "AA check bypassed (gatewaying) but something went wrong"; - break; - - /* Others */ - default: - return "Access denied -- unable to specify reason (bug)"; - - } /* switch */ -} - - -PRIVATE char *status_name ARGS1(HTAAFailReasonType, reason) -{ - switch (reason) { - - /* 401 cases */ - case HTAA_NO_AUTH: - return "NO-AUTHENTICATION"; - break; - case HTAA_NOT_MEMBER: - return "NOT-AUTHORIZED"; - break; - - /* 403 cases */ - case HTAA_BY_RULE: - return "FORB-RULE"; - break; - case HTAA_IP_MASK: - return "FORB-IP"; - break; - case HTAA_NO_ACL: - return "NO-ACL-FILE"; - break; - case HTAA_NO_ENTRY: - return "NO-ACL-ENTRY"; - break; - case HTAA_SETUP_ERROR: - return "SETUP-ERROR"; - break; - case HTAA_DOTDOT: - return "SLASH-DOT-DOT"; - break; - case HTAA_HTBIN: - return "HTBIN-OFF"; - break; - - /* 404 cases */ - case HTAA_NOT_FOUND: - return "NOT-FOUND"; - break; - - /* Success */ - case HTAA_OK: - return "OK"; - break; - case HTAA_OK_GATEWAY: - return "OK-GATEWAY"; - break; - - /* Others */ - default: - return "SERVER-BUG"; - } /* switch */ -} - - -/* PRIVATE check_uthorization() -** CHECK IF USER IS AUTHORIZED TO ACCESS A FILE -** ON ENTRY: -** pathname is the physical file pathname -** to access. -** method method, e.g. METHOD_GET, METHOD_PUT, ... -** scheme authentication scheme. -** scheme_specifics authentication string (or other -** scheme specific parameters, like -** Kerberos-ticket). -** -** ON EXIT: -** returns HTAA_OK on success. -** Otherwise the reason for failing. -** NOTE: -** This function does not check whether the file -** exists or not -- so the status 404 Not found -** must be returned from somewhere else (this is -** to avoid unnecessary overhead of opening the -** file twice). -*/ -PRIVATE HTAAFailReasonType check_authorization ARGS4(CONST char *, pathname, - HTAAMethod, method, - HTAAScheme, scheme, - char *, scheme_specifics) -{ - HTAAFailReasonType reason; - GroupDef *allowed_groups; - FILE *acl_file = NULL; - HTAAProt *prot = NULL; /* Protection mode */ - - htaa_user = NULL; - - if (!pathname) { - if (TRACE) - fprintf(stderr, "HTAA_checkAuthorization: Forbidden by rule\n"); - return HTAA_BY_RULE; - } - if (TRACE) - fprintf(stderr, "%s `%s' %s %s\n", - "HTAA_checkAuthorization: translated path:", - pathname, "method:", HTAAMethod_name(method)); - - /* - ** Get protection setting (set up by callbacks from rule system) - ** NULL, if not protected by a "protect" rule. - */ - prot = HTAA_getCurrentProtection(); - - /* - ** Check ACL existence - */ - if (!(acl_file = HTAA_openAcl(pathname))) { - if (prot) { /* protect rule, but no ACL */ - if (prot->mask_group) { - /* - ** Only mask enabled, check that - */ - GroupDefList *group_def_list = - HTAA_readGroupFile(HTAssocList_lookup(prot->values, - "group")); - /* - ** Authenticate if authentication info given - */ - if (scheme != HTAA_UNKNOWN && scheme != HTAA_NONE) { - htaa_user = HTAA_authenticate(scheme, - scheme_specifics, - prot); - if (TRACE) - fprintf(stderr, "Authentication returned: %s\n", - (htaa_user ? htaa_user->username - : "NOT-AUTHENTICATED")); - } - HTAA_resolveGroupReferences(prot->mask_group, group_def_list); - reason = HTAA_userAndInetInGroup(prot->mask_group, - htaa_user - ? htaa_user->username : "", - HTClientHost, - NULL); - if (TRACE) { - if (reason != HTAA_OK) - fprintf(stderr, "%s %s %s %s\n", - "HTAA_checkAuthorization: access denied", - "by mask (no ACL, only Protect rule)", - "host", HTClientHost); - else - fprintf(stderr, "%s %s %s %s\n", - "HTAA_checkAuthorization: request from", - HTClientHost, - "accepted by only mask match (no ACL, only", - "Protect rule, and only mask enabled)"); - } - return reason; - } - else { /* 403 Forbidden */ - if (TRACE) - fprintf(stderr, "%s %s\n", - "HTAA_checkAuthorization: Protected, but", - "no mask group nor ACL -- forbidden"); - return HTAA_NO_ACL; - } - } - else { /* No protect rule and no ACL => OK 200 */ - if (TRACE) - fprintf(stderr, "HTAA_checkAuthorization: %s\n", - "no protect rule nor ACL -- ok\n"); - return HTAA_OK; - } - } - - /* - ** Now we know that ACL exists - */ - if (!prot) { /* Not protected by "protect" rule */ - if (TRACE) - fprintf(stderr, "HTAA_checkAuthorization: default protection\n"); - prot = HTAA_getDefaultProtection(); /* Also sets current protection */ - - if (!prot) { /* @@ Default protection not set ?? */ - if (TRACE) - fprintf(stderr, "%s %s\n", - "HTAA_checkAuthorization: default protection", - "not set (internal server error)!!"); - return HTAA_SETUP_ERROR; - } - } - - /* - ** Now we know that document is protected and ACL exists. - ** Check against ACL entry. - */ - { - GroupDefList *group_def_list = - HTAA_readGroupFile(HTAssocList_lookup(prot->values, "group")); - - /* - ** Authenticate now that we know protection mode - */ - if (scheme != HTAA_UNKNOWN && scheme != HTAA_NONE) { - htaa_user = HTAA_authenticate(scheme, - scheme_specifics, - prot); - if (TRACE) - fprintf(stderr, "Authentication returned: %s\n", - (htaa_user - ? htaa_user->username : "NOT-AUTHENTICATED")); - } - /* - ** Check mask group - */ - if (prot->mask_group) { - HTAA_resolveGroupReferences(prot->mask_group, group_def_list); - reason=HTAA_userAndInetInGroup(prot->mask_group, - htaa_user ? htaa_user->username : "", - HTClientHost, - NULL); - if (reason != HTAA_OK) { - if (TRACE) - fprintf(stderr, "%s %s %s\n", - "HTAA_checkAuthorization: access denied", - "by mask, host:", HTClientHost); - return reason; - } - else { - if (TRACE) - fprintf(stderr, "%s %s %s %s %s\n", - "HTAA_checkAuthorization: request from", - HTClientHost, - "accepted by just mask group match", - "(no ACL, only Protect rule, and only", - "mask enabled)"); - /* And continue authorization checking */ - } - } - /* - ** Get ACL entries; get first one first, the loop others - ** Remember, allowed_groups is automatically freed by - ** HTAA_getAclEntry(). - */ - allowed_groups = HTAA_getAclEntry(acl_file, pathname, method); - if (!allowed_groups) { - if (TRACE) - fprintf(stderr, "%s `%s' %s\n", - "No entry for file", pathname, "in ACL"); - HTAA_closeAcl(acl_file); - return HTAA_NO_ENTRY; /* Forbidden -- no entry in the ACL */ - } - else { - do { - HTAA_resolveGroupReferences(allowed_groups, group_def_list); - reason = HTAA_userAndInetInGroup(allowed_groups, - htaa_user - ? htaa_user->username : "", - HTClientHost, - NULL); - if (reason == HTAA_OK) { - HTAA_closeAcl(acl_file); - return HTAA_OK; /* OK */ - } - allowed_groups = HTAA_getAclEntry(acl_file, pathname, method); - } while (allowed_groups); - HTAA_closeAcl(acl_file); - return HTAA_NOT_MEMBER; /* Unauthorized */ - } - } -} - - -/* PUBLIC HTAA_checkAuthorization() -** CHECK IF USER IS AUTHORIZED TO ACCESS A FILE -** ON ENTRY: -** url is the document to be accessed. -** method_name name of the method, e.g. "GET" -** scheme_name authentication scheme name. -** scheme_specifics authentication string (or other -** scheme specific parameters, like -** Kerberos-ticket). -** -** ON EXIT: -** returns status codes uniform with those of HTTP: -** 200 OK if file access is ok. -** 401 Unauthorized if user is not authorized to -** access the file. -** 403 Forbidden if there is no entry for the -** requested file in the ACL. -** -** NOTE: -** This function does not check whether the file -** exists or not -- so the status 404 Not found -** must be returned from somewhere else (this is -** to avoid unnecessary overhead of opening the -** file twice). -** -*/ -PUBLIC int HTAA_checkAuthorization ARGS4(CONST char *, url, - CONST char *, method_name, - CONST char *, scheme_name, - char *, scheme_specifics) -{ - static char *pathname = NULL; - char *local_copy = NULL; - HTAAMethod method = HTAAMethod_enum(method_name); - HTAAScheme scheme = HTAAScheme_enum(scheme_name); - - HTAAFailReason = HTAA_OK; - - /* - ** Translate into absolute pathname, and - ** check for "protect" and "defprot" rules. - */ - FREE(pathname); /* From previous call */ - StrAllocCopy(local_copy, url); - { - char *keywords = strchr(local_copy, '?'); - if (keywords) - *keywords = '\0'; /* Chop off keywords */ - } - HTSimplify(local_copy); /* Remove ".." etc. */ - - /* HTSimplify will leave in a "/../" at the top, which can - ** be a security hole. - */ - if (strstr(local_copy, "/../")) { - if (TRACE) - fprintf(stderr, "HTAA_checkAuthorization: %s (`%s')\n", - "Illegal attempt to use /../", url); - HTAAFailReason = HTAA_DOTDOT; - } - else { - pathname = HTTranslate(local_copy); /* Translate rules even if */ - /* a /htbin call to set up */ - /* protections. */ - if (0 == strncmp(local_copy, "/htbin/", 7)) { - if (!HTBinDir) - HTAAFailReason = HTAA_HTBIN; - else { - char *end = strchr(local_copy+7, '/'); - if (end) - *end = '\0'; - FREE(pathname); - pathname=(char*)malloc(strlen(HTBinDir)+strlen(local_copy)+1); - strcpy(pathname, HTBinDir); - strcat(pathname, local_copy+6); - } - } - - if (!pathname) { /* Forbidden by rule */ - if (TRACE) - fprintf(stderr, "HTAA_checkAuthorization: Forbidden by rule\n"); - HTAAFailReason = HTAA_BY_RULE; - } - else if (HTAAFailReason != HTAA_HTBIN) { - /* pathname != NULL */ - char *acc_method = HTParse(pathname, "", PARSE_ACCESS); - if (!*acc_method || 0 == strcmp(acc_method,"file")) { /*Local file, do AA*/ - if (!HTSecure && 0 != strncmp(local_copy, "/htbin/", 7)) { - char *localname = HTLocalName(pathname); - FREE(pathname); - pathname = localname; - } - HTAAFailReason = check_authorization(pathname, method, - scheme, scheme_specifics); - } - else { /* Not local access */ - HTAAFailReason = HTAA_OK_GATEWAY; - if (TRACE) - fprintf(stderr, - "HTAA_checkAuthorization: %s (%s access)\n", - "Gatewaying -- skipping authorization check", - acc_method); - } - } /* pathname */ - } - FREE(local_copy); - - if (htaa_logfile) { - time(&theTime); - fprintf(htaa_logfile, "%24.24s %s %s %s %s %s\n", - ctime(&theTime), - HTClientHost ? HTClientHost : "local", - method_name, - url, - status_name(HTAAFailReason), - htaa_user && htaa_user->username - ? htaa_user->username : ""); - fflush(htaa_logfile); /* Actually update it on disk */ - if (TRACE) - fprintf(stderr, "Log: %24.24s %s %s %s %s %s\n", - ctime(&theTime), - HTClientHost ? HTClientHost : "local", - method_name, - url, - status_name(HTAAFailReason), - htaa_user && htaa_user->username - ? htaa_user->username : ""); - } - - switch (HTAAFailReason) { - - case HTAA_NO_AUTH: - case HTAA_NOT_MEMBER: - return 401; - break; - - case HTAA_BY_RULE: - case HTAA_IP_MASK: - case HTAA_NO_ACL: - case HTAA_NO_ENTRY: - case HTAA_SETUP_ERROR: - case HTAA_DOTDOT: - case HTAA_HTBIN: - return 403; - break; - - case HTAA_NOT_FOUND: - return 404; - break; - - case HTAA_OK: - case HTAA_OK_GATEWAY: - return 200; - break; - - default: - return 500; - } /* switch */ -} - - -/* PRIVATE compose_scheme_specifics() -** COMPOSE SCHEME-SPECIFIC PARAMETERS -** TO BE SENT ALONG WITH SERVER REPLY -** IN THE WWW-Authenticate: FIELD. -** ON ENTRY: -** scheme is the authentication scheme for which -** parameters are asked for. -** prot protection setup structure. -** -** ON EXIT: -** returns scheme specific parameters in an -** auto-freed string. -*/ -PRIVATE char *compose_scheme_specifics ARGS2(HTAAScheme, scheme, - HTAAProt *, prot) -{ - static char *result = NULL; - - FREE(result); /* From previous call */ - - switch (scheme) { - case HTAA_BASIC: - { - char *realm = HTAssocList_lookup(prot->values, "server"); - result = (char*)malloc(60); - sprintf(result, "realm=\"%s\"", - (realm ? realm : "UNKNOWN")); - return result; - } - break; - - case HTAA_PUBKEY: - { - char *realm = HTAssocList_lookup(prot->values, "server"); - result = (char*)malloc(200); - sprintf(result, "realm=\"%s\", key=\"%s\"", - (realm ? realm : "UNKNOWN"), - "PUBKEY-NOT-IMPLEMENTED"); - return result; - } - break; - default: - return NULL; - } -} - - -/* SERVER PUBLIC HTAA_composeAuthHeaders() -** COMPOSE WWW-Authenticate: HEADER LINES -** INDICATING VALID AUTHENTICATION SCHEMES -** FOR THE REQUESTED DOCUMENT -** ON ENTRY: -** No parameters, but HTAA_checkAuthorization() must -** just before have failed because a wrong (or none) -** authentication scheme was used. -** -** ON EXIT: -** returns a buffer containing all the WWW-Authenticate: -** fields including CRLFs (this buffer is auto-freed). -** NULL, if authentication won't help in accessing -** the requested document. -** -*/ -PUBLIC char *HTAA_composeAuthHeaders NOARGS -{ - static char *result = NULL; - HTAAScheme scheme; - char *scheme_name; - char *scheme_params; - HTAAProt *prot = HTAA_getCurrentProtection(); - - if (!prot) { - if (TRACE) - fprintf(stderr, "%s %s\n", - "HTAA_composeAuthHeaders: Document not protected", - "-- why was this function called??"); - return NULL; - } - else if (TRACE) - fprintf(stderr, "HTAA_composeAuthHeaders: for file `%s'\n", - prot->filename); - - FREE(result); /* From previous call */ - if (!(result = (char*)malloc(4096))) /* @@ */ - outofmem(__FILE__, "HTAA_composeAuthHeaders"); - *result = '\0'; - - for (scheme=0; scheme < HTAA_MAX_SCHEMES; scheme++) { - if (-1 < HTList_indexOf(prot->valid_schemes, (void*)scheme)) { - if ((scheme_name = HTAAScheme_name(scheme))) { - scheme_params = compose_scheme_specifics(scheme,prot); - strcat(result, "WWW-Authenticate: "); - strcat(result, scheme_name); - if (scheme_params) { - strcat(result, " "); - strcat(result, scheme_params); - } - strcat(result, "\r\n"); - } /* scheme name found */ - else if (TRACE) - fprintf(stderr, "HTAA_composeAuthHeaders: %s %d\n", - "No name found for scheme number", scheme); - } /* scheme valid for requested document */ - } /* for every scheme */ - - return result; -} - - -/* PUBLIC HTAA_startLogging() -** START UP ACCESS AUTHORIZATION LOGGING -** ON ENTRY: -** fp is the open log file. -** -*/ -PUBLIC void HTAA_startLogging ARGS1(FILE *, fp) -{ - htaa_logfile = fp; -} - diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAServ.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAServ.h deleted file mode 100644 index dc03c7dd1ae..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAServ.h +++ /dev/null @@ -1,148 +0,0 @@ -/* SERVER SIDE ACCESS AUTHORIZATION MODULE - - This module is the server side interface to Access Authorization (AA) package. It - contains code only for server. - - Important to know about memory allocation: - - Routines in this module use dynamic allocation, but free automatically all the memory - reserved by them. - - Therefore the caller never has to (and never should) free() any object returned by - these functions. - - Therefore also all the strings returned by this package are only valid until the next - call to the same function is made. This approach is selected, because of the nature of - access authorization: no string returned by the package needs to be valid longer than - until the next call. - - This also makes it easy to plug the AA package in: you don't have to ponder whether to - free()something here or is it done somewhere else (because it is always done somewhere - else). - - The strings that the package needs to store are copied so the original strings given as - parameters to AA functions may be freed or modified with no side effects. - - Also note:The AA package does not free() anything else than what it has itself - allocated. - - */ - -#ifndef HTAASERV_H -#define HTAASERV_H - -#ifndef HTUTILS_H -#include "HTUtils.h" /* BOOL, PARAMS, ARGS */ -#endif /* HTUTILS_H */ -/*#include included by HTUtils.h -- FM *//* FILE */ -#include "HTRules.h" /* This module interacts with rule system */ -#include "HTAAUtil.h" /* Common parts of AA */ -#include "HTAuth.h" /* Authentication */ - - -#ifdef SHORT_NAMES -#define HTAAstMs HTAA_statusMessage -#define HTAAchAu HTAA_checkAuthorization -#define HTAAcoAH HTAA_composeAuthHeaders -#define HTAAsLog HTAA_startLogging -#endif /*SHORT_NAMES*/ - -extern time_t theTime; - -/* - -Check Access Authorization - - HTAA_checkAuthorization() is the main access authorization function. - - */ - -/* PUBLIC HTAA_checkAuthorization() -** CHECK IF USER IS AUTHORIZED TO ACCESS A FILE -** ON ENTRY: -** url is the document to be accessed. -** method_name name of the method, e.g. "GET" -** scheme_name authentication scheme name. -** scheme_specifics authentication string (or other -** scheme specific parameters, like -** Kerberos-ticket). -** -** ON EXIT: -** returns status codes uniform with those of HTTP: -** 200 OK if file access is ok. -** 401 Unauthorized if user is not authorized to -** access the file. -** 403 Forbidden if there is no entry for the -** requested file in the ACL. -** -** NOTE: -** This function does not check whether the file -** exists or not -- so the status 404 Not found -** must be returned from somewhere else (this is -** to avoid unnecessary overhead of opening the -** file twice). -** -*/ -PUBLIC int HTAA_checkAuthorization PARAMS((CONST char * url, - CONST char * method_name, - CONST char * scheme_name, - char * scheme_specifics)); -/* - -Compose Status Line Message - - */ - -/* SERVER PUBLIC HTAA_statusMessage() -** RETURN A STRING EXPLAINING ACCESS -** AUTHORIZATION FAILURE -** (Can be used in server reply status line -** with 401/403 replies.) -** ON EXIT: -** returns a string containing the error message -** corresponding to internal HTAAFailReason. -*/ -PUBLIC char *HTAA_statusMessage NOPARAMS; -/* - -Compose "Authenticate:" Header Lines for Server Reply - - */ - -/* SERVER PUBLIC HTAA_composeAuthHeaders() -** COMPOSE WWW-Authenticate: HEADER LINES -** INDICATING VALID AUTHENTICATION SCHEMES -** FOR THE REQUESTED DOCUMENT -** ON ENTRY: -** No parameters, but HTAA_checkAuthorization() must -** just before have failed because a wrong (or none) -** authentication scheme was used. -** -** ON EXIT: -** returns a buffer containing all the WWW-Authenticate: -** fields including CRLFs (this buffer is auto-freed). -** NULL, if authentication won't help in accessing -** the requested document. -*/ -PUBLIC char *HTAA_composeAuthHeaders NOPARAMS; -/* - -Start Access Authorization Logging - - */ - -/* PUBLIC HTAA_startLogging() -** START UP ACCESS AUTHORIZATION LOGGING -** ON ENTRY: -** fp is the open log file. -** -*/ -PUBLIC void HTAA_startLogging PARAMS((FILE * fp)); -/* - - */ - -#endif /* NOT HTAASERV_H */ -/* - - End of file HTAAServ.h. */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAUtil.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAUtil.c index a7cad59b180..a0312b49835 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAUtil.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAUtil.c @@ -1,4 +1,3 @@ - /* MODULE HTAAUtil.c ** COMMON PARTS OF ACCESS AUTHORIZATION MODULE ** FOR BOTH SERVER AND BROWSER @@ -12,7 +11,7 @@ ** ** Therefore also all the strings returned by this package ** are only valid until the next call to the same function -** is made. This approach is selected, because of the nature +** is made. This approach is selected, because of the nature ** of access authorization: no string returned by the package ** needs to be valid longer than until the next call. ** @@ -44,15 +43,14 @@ ** */ -#include "HTUtils.h" -#include "tcp.h" /* NETREAD() etc. */ -#include -#include "HTAAUtil.h" /* Implemented here */ -#include "HTAssoc.h" /* Assoc list */ -#include "HTTCP.h" -#include "HTAlert.h" +#include + +#include /* Implemented here */ +#include /* Assoc list */ +#include -#include "LYLeaks.h" +#include +#include /* PUBLIC HTAAScheme_enum() ** TRANSLATE SCHEME NAME INTO @@ -62,22 +60,17 @@ ** name is a string representing the scheme name. ** ** ON EXIT: -** returns the enumerated constant for that scheme. +** returns the enumerated constant for that scheme. */ PUBLIC HTAAScheme HTAAScheme_enum ARGS1(CONST char*, name) { char *upcased = NULL; - char *cur; if (!name) return HTAA_UNKNOWN; StrAllocCopy(upcased, name); - cur = upcased; - while (*cur) { - *cur = TOUPPER(*cur); - cur++; - } + LYUpperCase(upcased); if (!strncmp(upcased, "NONE", 4)) { FREE(upcased); @@ -108,7 +101,7 @@ PUBLIC HTAAScheme HTAAScheme_enum ARGS1(CONST char*, name) ** HTAA_NONE, HTAA_BASIC, HTAA_PUBKEY, ... ** ** ON EXIT: -** returns the name of the scheme, i.e. +** returns the name of the scheme, i.e. ** "None", "Basic", "Pubkey", ... */ PUBLIC char *HTAAScheme_name ARGS1(HTAAScheme, scheme) @@ -116,22 +109,16 @@ PUBLIC char *HTAAScheme_name ARGS1(HTAAScheme, scheme) switch (scheme) { case HTAA_NONE: return "None"; - break; case HTAA_BASIC: return "Basic"; - break; case HTAA_PUBKEY: return "Pubkey"; - break; case HTAA_KERBEROS_V4: return "KerberosV4"; - break; case HTAA_KERBEROS_V5: return "KerberosV5"; - break; case HTAA_UNKNOWN: return "UNKNOWN"; - break; default: return "THIS-IS-A-BUG"; } @@ -144,28 +131,17 @@ PUBLIC char *HTAAScheme_name ARGS1(HTAAScheme, scheme) ** name is the method name to translate. ** ** ON EXIT: -** returns HTAAMethod enumerated value corresponding +** returns HTAAMethod enumerated value corresponding ** to the given name. */ PUBLIC HTAAMethod HTAAMethod_enum ARGS1(CONST char *, name) { - char tmp[MAX_METHODNAME_LEN+1]; - CONST char *src = name; - char *dest = tmp; - if (!name) return METHOD_UNKNOWN; - while (*src) { - *dest = TOUPPER(*src); - dest++; - src++; - } - *dest = 0; - - if (0==strcmp(tmp, "GET")) + if (0==strcasecomp(name, "GET")) return METHOD_GET; - else if (0==strcmp(tmp, "PUT")) + else if (0==strcasecomp(name, "PUT")) return METHOD_PUT; else return METHOD_UNKNOWN; @@ -179,7 +155,7 @@ PUBLIC HTAAMethod HTAAMethod_enum ARGS1(CONST char *, name) ** METHOD_GET, METHOD_PUT, ... ** ** ON EXIT: -** returns the name of the scheme, i.e. +** returns the name of the scheme, i.e. ** "GET", "PUT", ... */ PUBLIC char *HTAAMethod_name ARGS1(HTAAMethod, method) @@ -187,13 +163,10 @@ PUBLIC char *HTAAMethod_name ARGS1(HTAAMethod, method) switch (method) { case METHOD_GET: return "GET"; - break; case METHOD_PUT: return "PUT"; - break; case METHOD_UNKNOWN: return "UNKNOWN"; - break; default: return "THIS-IS-A-BUG"; } @@ -207,7 +180,7 @@ PUBLIC char *HTAAMethod_name ARGS1(HTAAMethod, method) ** list is a list of method names. ** ** ON EXIT: -** returns YES, if method was found. +** returns YES, if method was found. ** NO, if not found. */ PUBLIC BOOL HTAAMethod_inList ARGS2(HTAAMethod, method, @@ -217,8 +190,7 @@ PUBLIC BOOL HTAAMethod_inList ARGS2(HTAAMethod, method, char *item; while (NULL != (item = (char*)HTList_nextObject(cur))) { - if (TRACE) - fprintf(stderr, " %s", item); + CTRACE(tfp, " %s", item); if (method == HTAAMethod_enum(item)) return YES; } @@ -239,14 +211,14 @@ PUBLIC BOOL HTAAMethod_inList ARGS2(HTAAMethod, method, ** ** ON ENTRY: ** template is a template string to match the file name -** agaist, may contain a single wildcard +** against, may contain a single wildcard ** character * which matches zero or more ** arbitrary characters. ** filename is the filename (or pathname) to be matched -** agaist the template. +** against the template. ** ** ON EXIT: -** returns YES, if filename matches the template. +** returns YES, if filename matches the template. ** NO, otherwise. */ PUBLIC BOOL HTAA_templateMatch ARGS2(CONST char *, template, @@ -290,14 +262,14 @@ PUBLIC BOOL HTAA_templateMatch ARGS2(CONST char *, template, ** ** ON ENTRY: ** template is a template string to match the file name -** agaist, may contain a single wildcard +** against, may contain a single wildcard ** character * which matches zero or more ** arbitrary characters. ** filename is the filename (or pathname) to be matched -** agaist the template. +** against the template. ** ** ON EXIT: -** returns YES, if filename matches the template. +** returns YES, if filename matches the template. ** NO, otherwise. */ PUBLIC BOOL HTAA_templateCaseMatch ARGS2(CONST char *, template, @@ -367,9 +339,8 @@ PUBLIC char *HTAA_makeProtectionTemplate ARGS1(CONST char *, docname) else StrAllocCopy(template, "*"); - if (TRACE) - fprintf(stderr, "make_template: made template `%s' for file `%s'\n", - template, docname); + CTRACE(tfp, "make_template: made template `%s' for file `%s'\n", + template, docname); return template; } @@ -381,7 +352,7 @@ PUBLIC char *HTAA_makeProtectionTemplate ARGS1(CONST char *, docname) #define SKIPWS(s) while (*s==' ' || *s=='\t') s++; /* -** Kill trailing whitespace starting from *(s-1) backwords +** Kill trailing whitespace starting from *(s-1) backwards */ #define KILLWS(s) {char *c=s-1; while (*c==' ' || *c=='\t') *(c--)='\0';} @@ -461,8 +432,7 @@ PUBLIC HTAssocList *HTAA_parseArgList ARGS1(char *, str) if (*cur == ',') *(cur++) = '\0'; /* Terminate value */ /* else last value on line (already terminated by NULL) */ - StrAllocCopy(name, "nnn"); /* Room for item order number */ - sprintf(name, "%d", n); /* Item order number for name */ + HTSprintf0(&name, "%d", n); /* Item order number for name */ } HTAssocList_add(assoc_list, name, str); str = cur; @@ -477,13 +447,21 @@ PUBLIC HTAssocList *HTAA_parseArgList ARGS1(char *, str) #define BUFFER_SIZE 1024 -PRIVATE char buffer[BUFFER_SIZE + 1]; -PRIVATE char *start_pointer = buffer; -PRIVATE char *end_pointer = buffer; +PRIVATE size_t buffer_length; +PRIVATE char *buffer = 0; +PRIVATE char *start_pointer; +PRIVATE char *end_pointer; PRIVATE int in_soc = -1; +#ifdef LY_FIND_LEAKS +PRIVATE void FreeHTAAUtil NOARGS +{ + FREE(buffer); +} +#endif /* LY_FIND_LEAKS */ + /* PUBLIC HTAA_setupReader() -** SET UP HEADER LINE READER, i.e. give +** SET UP HEADER LINE READER, i.e., give ** the already-read-but-not-yet-processed ** buffer of text to be read before more ** is read from the socket. @@ -496,16 +474,32 @@ PRIVATE int in_soc = -1; ** soc is the socket to use when start_of_headers ** buffer is used up. ** ON EXIT: -** returns nothing. +** returns nothing. ** Subsequent calls to HTAA_getUnfoldedLine() ** will use this buffer first and then ** proceed to read from socket. */ -PUBLIC void HTAA_setupReader ARGS4(char *, start_of_headers, - int, length, - void *, handle, - int, soc) +PUBLIC void HTAA_setupReader ARGS3(char *, start_of_headers, + int, length, + int, soc) { + if (!start_of_headers) + length = 0; /* initialize length (is this reached at all?) */ + if (buffer == NULL) { /* first call? */ + buffer_length = length; + if (buffer_length < BUFFER_SIZE) /* would fall below BUFFER_SIZE? */ + buffer_length = BUFFER_SIZE; + buffer = (char*)malloc((size_t)(sizeof(char)*(buffer_length + 1))); + } + else if (length > (int)buffer_length) { /* need more space? */ + buffer_length = length; + buffer = (char*)realloc((char*)buffer, + (size_t)(sizeof(char)*(buffer_length + 1))); + } + if (buffer == NULL) outofmem(__FILE__, "HTAA_setupReader"); +#ifdef LY_FIND_LEAKS + atexit(FreeHTAAUtil); +#endif start_pointer = buffer; if (start_of_headers) { strncpy(buffer, start_of_headers, length); @@ -549,10 +543,9 @@ PUBLIC char *HTAA_getUnfoldedLine NOARGS BOOL peek_for_folding = NO; if (in_soc < 0) { - if (TRACE) - fprintf(stderr, "%s %s\n", - "HTAA_getUnfoldedLine: buffer not initialized", - "with function HTAA_setupReader()"); + CTRACE(tfp, "%s %s\n", + "HTAA_getUnfoldedLine: buffer not initialized", + "with function HTAA_setupReader()"); return NULL; } @@ -617,5 +610,3 @@ PUBLIC char *HTAA_getUnfoldedLine NOARGS } /* forever */ } - - diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAUtil.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAUtil.h index 226f1547035..46cbe3f2dc0 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAUtil.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAAUtil.h @@ -1,70 +1,36 @@ /* Utilities for the Authorization parts of libwww COMMON PARTS OF AUTHORIZATION MODULE TO BOTH SERVER AND BROWSER - + This module is the interface to the common parts of Access Authorization (AA) package - for both server and browser. Important to know about memory allocation: - + for both server and browser. Important to know about memory allocation: + Routines in this module use dynamic allocation, but free automatically all the memory reserved by them. - + Therefore the caller never has to (and never should) free() any object returned by these functions. - + Therefore also all the strings returned by this package are only valid until the next call to the same function is made. This approach is selected, because of the nature of access authorization: no string returned by the package needs to be valid longer than until the next call. - + This also makes it easy to plug the AA package in: you don't have to ponder whether to free() something here or is it done somewhere else (because it is always done somewhere else). - + The strings that the package needs to store are copied so the original strings given as parameters to AA functions may be freed or modified with no side effects. - + Also note: The AA package does not free() anything else than what it has itself allocated. - + */ #ifndef HTAAUTIL_H #define HTAAUTIL_H -#ifndef HTUTILS_H -#include "HTUtils.h" /* BOOL, PARAMS, ARGS */ -#endif /* HTUTILS_H */ -#include "tcp.h" -#include "HTList.h" - -#ifdef SHORT_NAMES -#define HTAASenu HTAAScheme_enum -#define HTAASnam HTAAScheme_name -#define HTAAMenu HTAAMethod_enum -#define HTAAMnam HTAAMethod_name -#define HTAAMinL HTAAMethod_inList -#define HTAAteMa HTAA_templateMatch -#define HTAAmaPT HTAA_makeProtectionTemplate -#define HTAApALi HTAA_parseArgList -#define HTAAsuRe HTAA_setupReader -#define HTAAgUfL HTAA_getUnfoldedLine -#endif /*SHORT_NAMES*/ - - -/* - -Default filenames - - */ -#ifndef PASSWD_FILE -#define PASSWD_FILE "/home2/luotonen/passwd" -#endif - -#ifndef GROUP_FILE -#define GROUP_FILE "/home2/luotonen/group" -#endif - -#define ACL_FILE_NAME ".www_acl" - +#include /* ** Numeric constants @@ -76,22 +42,17 @@ Default filenames #define MAX_FIELDNAME_LEN 16 /* @@ Longest field name in */ /* protection setup file */ #define MAX_PATHNAME_LEN 80 /* @@ Longest passwd/group file */ - /* patname to allow */ - -/* -** Helpful macros -*/ -#define FREE(x) if (x) {free(x); x = NULL;} + /* pathname to allow */ /* Datatype definitions HTAASCHEME - + The enumeration HTAAScheme represents the possible authentication schemes used by the WWW Access Authorization. - + */ typedef enum { @@ -107,7 +68,7 @@ typedef enum { /* ENUMERATION TO REPRESENT HTTP METHODS - + */ typedef enum { @@ -206,11 +167,11 @@ Match Template Against Filename ** ** ON ENTRY: ** template is a template string to match the file name -** agaist, may contain a single wildcard +** against, may contain a single wildcard ** character * which matches zero or more ** arbitrary characters. ** filename is the filename (or pathname) to be matched -** agaist the template. +** against the template. ** ** ON EXIT: ** returns YES, if filename matches the template. @@ -232,11 +193,11 @@ PUBLIC BOOL HTAA_templateMatch PARAMS((CONST char * template, ** ** ON ENTRY: ** template is a template string to match the file name -** agaist, may contain a single wildcard +** against, may contain a single wildcard ** character * which matches zero or more ** arbitrary characters. ** filename is the filename (or pathname) to be matched -** agaist the template. +** against the template. ** ** ON EXIT: ** returns YES, if filename matches the template. @@ -308,7 +269,7 @@ Header Line Reader */ /* PUBLIC HTAA_setupReader() -** SET UP HEADER LINE READER, i.e. give +** SET UP HEADER LINE READER, i.e., give ** the already-read-but-not-yet-processed ** buffer of text to be read before more ** is read from the socket. @@ -328,7 +289,6 @@ Header Line Reader */ PUBLIC void HTAA_setupReader PARAMS((char * start_of_headers, int length, - void * handle, int soc)); @@ -356,6 +316,3 @@ PUBLIC void HTAA_setupReader PARAMS((char * start_of_headers, PUBLIC char *HTAA_getUnfoldedLine NOPARAMS; #endif /* NOT HTAAUTIL_H */ -/* - - End of file HTAAUtil.h. */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTACL.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTACL.c deleted file mode 100644 index 2147e23f93e..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTACL.c +++ /dev/null @@ -1,221 +0,0 @@ - -/* MODULE HTACL.c -** ACCESS CONTROL LIST ROUTINES -** -** AUTHORS: -** AL Ari Luotonen luotonen@dxcern.cern.ch -** MD Mark Donszelmann duns@vxdeop.cern.ch -** -** HISTORY: -** 8 Nov 93 MD (VMS only) case insensitive compare reading acl entry, filename -** -** -** BUGS: -** -** -*/ - - -#include "HTUtils.h" - -/*#include included by HTUtils.h -- FM *//* FILE */ -#include - -#include "HTAAFile.h" /* File routines */ -#include "HTGroup.h" /* GroupDef */ -#include "HTACL.h" /* Implemented here */ - -#include "LYLeaks.h" - -/* PRIVATE HTAA_getAclFilename() -** RESOLVE THE FULL PATHNAME OF ACL FILE FOR A GIVEN FILE -** ON ENTRY: -** path is the pathname of the file for which to -** ACL file should be found. -** -** ACL filename is computed by replacing -** the filename by .www_acl in the pathname -** (this is done to a local copy, of course). -** -** ON EXIT: -** returns the absolute pathname of ACL file -** (which is automatically freed next time -** this fuction is called). -*/ -PRIVATE char *HTAA_getAclFilename ARGS1(CONST char *, pathname) -{ - static char * local_copy = NULL; - static char * acl_path = NULL; - char * directory = NULL; - char * filename = NULL; - - StrAllocCopy(local_copy, pathname); /* Also frees local_copy */ - /* from previous call. */ - - directory = local_copy; - filename = strrchr(directory, '/'); - if (!filename) { /* No path in front of filename */ - directory = "."; /* So use current directory */ - filename = local_copy; /* and the pathname itself is the filename */ - } - else { - *filename = '\0'; /* Truncate filename off from directory path */ - filename++; /* and the filename begins from the next character */ - } - - StrAllocCopy(acl_path, directory); /* Also frees acl_path */ - /* from previous call. */ - StrAllocCat(acl_path, "/"); - StrAllocCat(acl_path, ACL_FILE_NAME); - - return acl_path; -} - - -/* PUBLIC HTAA_openAcl() -** OPEN THE ACL FILE FOR THE GIVEN DOCUMENT -** ON ENTRY: -** pathname is the absolute pathname of -** the file to be accessed. -** -** ON EXIT: -** returns the FILE* to open ACL. -** NULL, if ACL not found. -*/ -PUBLIC FILE *HTAA_openAcl ARGS1(CONST char *, pathname) -{ - return fopen(HTAA_getAclFilename(pathname), "r"); -} - - -/* PUBLIC HTAA_closeAcl() -** CLOSE ACL FILE -** ON ENTRY: -** acl_file is Access Control List file to close. -** -** ON EXIT: -** returns nothing. -*/ -PUBLIC void HTAA_closeAcl ARGS1(FILE *, acl_file) -{ - if (acl_file) fclose(acl_file); -} - - -/* PUBLIC HTAA_getAclEntry() -** CONSULT THE ACCESS CONTROL LIST AND -** GIVE A LIST OF GROUPS (AND USERS) -** AUTHORIZED TO ACCESS A GIVEN FILE -** ON ENTRY: -** acl_file is an open ACL file. -** pathname is the absolute pathname of -** the file to be accessed. -** method is the method for which access is wanted. -** -** ALC FILE FORMAT: -** -** template : method, method, ... : group@addr, user, group, ... -** -** The last item is in fact in exactly the same format as -** group definition in group file, i.e. everything that -** follows the 'groupname:' part, -** e.g. -** user, group, user@address, group@address, -** (user,group,...)@(address, address, ...) -** -** ON EXIT: -** returns NULL, if there is no entry for the file in the ACL, -** or ACL doesn't exist. -** If there is, a GroupDef object containing the -** group and user names allowed to access the file -** is returned (this is automatically freed -** next time this function is called). -** IMPORTANT: -** Returns the first entry with matching template and -** method. This function should be called multiple times -** to process all the valid entries (until it returns NULL). -** This is because there can be multiple entries like: -** -** *.html : get,put : ari,timbl,robert -** *.html : get : jim,james,jonathan,jojo -** -** NOTE: -** The returned group definition may well contain references -** to groups defined in group file. Therefore these references -** must be resolved according to that rule file by function -** HTAA_resolveGroupReferences() (group file is read in by -** HTAA_readGroupFile()) and after that access authorization -** can be checked with function HTAA_userAndInetGroup(). -*/ -PUBLIC GroupDef *HTAA_getAclEntry ARGS3(FILE *, acl_file, - CONST char *, pathname, - HTAAMethod, method) -{ - static GroupDef * group_def = NULL; - CONST char * filename; - int len; - char *buf; - - if (!acl_file) return NULL; /* ACL doesn't exist */ - - if (group_def) { - GroupDef_delete(group_def); /* From previous call */ - group_def = NULL; - } - - if (!(filename = strrchr(pathname, '/'))) - filename = pathname; - else filename++; /* Skip slash */ - - len = strlen(filename); - - if (!(buf = (char*)malloc((strlen(filename)+2)*sizeof(char)))) - outofmem(__FILE__, "HTAA_getAuthorizedGroups"); - - while (EOF != HTAAFile_readField(acl_file, buf, len+1)) { -#ifdef VMS - if (HTAA_templateCaseMatch(buf, filename)) { -#else /* not VMS */ - if (HTAA_templateMatch(buf, filename)) { -#endif /* not VMS */ - HTList *methods = HTList_new(); - HTAAFile_readList(acl_file, methods, MAX_METHODNAME_LEN); - if (TRACE) { - fprintf(stderr, - "Filename '%s' matched template '%s', allowed methods:", - filename, buf); - } - if (HTAAMethod_inList(method, methods)) { /* right method? */ - if (TRACE) - fprintf(stderr, " METHOD OK\n"); - HTList_delete(methods); - methods = NULL; - FREE(buf); - group_def = HTAA_parseGroupDef(acl_file); - /* - ** HTAA_parseGroupDef() already reads the record - ** separator so we don't call HTAAFile_nextRec(). - */ - return group_def; - } else if (TRACE) { - fprintf(stderr, " METHOD NOT FOUND\n"); - } - HTList_delete(methods); - methods = NULL; - } /* if template match */ - else { - if (TRACE) { - fprintf(stderr, - "Filename '%s' didn't match template '%s'\n", - filename, buf); - } - } - - HTAAFile_nextRec(acl_file); - } /* while not eof */ - FREE(buf); - - return NULL; /* No entry for requested file */ - /* (or an empty entry). */ -} - diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTACL.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTACL.h deleted file mode 100644 index c0367c9d214..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTACL.h +++ /dev/null @@ -1,109 +0,0 @@ -/* ACCESS CONTROL LIST ROUTINES - - */ - -#ifndef HTACL_H -#define HTACL_H - -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ -#include "HTAAUtil.h" -#include "HTGroup.h" - -#ifdef SHORT_NAMES -#define HTAAoACL HTAA_openAcl -#define HTAAcACL HTAA_closeAcl -#define HTAAgAEn HTAA_getAclEntry -#endif /* SHORT_NAMES */ - -/* - -Opening Access Control List File - - */ - -/* PUBLIC HTAA_openAcl() -** OPEN THE ACL FILE FOR THE GIVEN DOCUMENT -** ON ENTRY: -** pathname is the absolute pathname of -** the file to be accessed. -** -** ON EXIT: -** returns the FILE* to open ACL. -** NULL, if ACL not found. -*/ -PUBLIC FILE *HTAA_openAcl PARAMS((CONST char * pathname)); - - -/* PUBLIC HTAA_closeAcl() -** CLOSE ACL FILE -** ON ENTRY: -** acl_file is Access Control List file to close. -** -** ON EXIT: -** returns nothing. -*/ -PUBLIC void HTAA_closeAcl PARAMS((FILE * acl_file)); -/* - -Getting ACL Entry - - */ - -/* PUBLIC HTAA_getAclEntry() -** CONSULT THE ACCESS CONTROL LIST AND -** GIVE A LIST OF GROUPS (AND USERS) -** AUTHORIZED TO ACCESS A GIVEN FILE -** ON ENTRY: -** acl_file is an open ACL file. -** pathname is the absolute pathname of -** the file to be accessed. -** method is the method for which access is wanted. -** -** ALC FILE FORMAT: -** -** template : method, method, ... : group@addr, user, group, ... -** -** The last item is in fact in exactly the same format as -** group definition in group file, i.e. everything that -** follows the 'groupname:' part, -** e.g. -** user, group, user@address, group@address, -** (user,group,...)@(address, address, ...) -** -** ON EXIT: -** returns NULL, if there is no entry for the file in the ACL, -** or ACL doesn't exist. -** If there is, a GroupDef object containing the -** group and user names allowed to access the file -** is returned (this is automatically freed -** next time this function is called). -** IMPORTANT: -** Returns the first entry with matching template and -** method. This function should be called multiple times -** to process all the valid entries (until it returns NULL). -** This is because there can be multiple entries like: -** -** *.html : get,put : ari,timbl,robert -** *.html : get : jim,james,jonathan,jojo -** -** NOTE: -** The returned group definition may well contain references -** to groups defined in group file. Therefore these references -** must be resolved according to that rule file by function -** HTAA_resolveGroupReferences() (group file is read in by -** HTAA_readGroupFile()) and after that access authorization -** can be checked with function HTAA_userAndInetGroup(). -*/ -PUBLIC GroupDef *HTAA_getAclEntry PARAMS((FILE * acl_file, - CONST char * pathname, - HTAAMethod method)); -/* - - */ - -#endif /* not HTACL_H */ -/* - - End of file HTACL.h. */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAccess.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAccess.c index 7d4def15269..008d42b7f65 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAccess.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAccess.c @@ -35,35 +35,34 @@ #define DIRECT_WAIS #endif /* VMS */ -#include "HTUtils.h" -#include "HTTP.h" -#include "HTAlert.h" +#include +#include +#include /* ** Implements: */ -#include "HTAccess.h" +#include /* ** Uses: */ -#include "HTParse.h" -#include "HTML.h" /* SCW */ +#include +#include /* SCW */ #ifndef NO_RULES -#include "HTRules.h" +#include #endif -#include "HTList.h" -#include "HText.h" /* See bugs above */ -#include "HTAlert.h" -#include "HTCJK.h" -#include "UCMap.h" -#include "GridText.h" +#include +#include /* See bugs above */ +#include +#include +#include -#include "LYexit.h" -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} +#include +#include +#include +#include extern HTCJKlang HTCJK; @@ -89,12 +88,14 @@ PUBLIC char *use_this_url_instead = NULL; PRIVATE int pushed_assume_LYhndl = -1; /* see LYUC* functions below - kw */ PRIVATE char * pushed_assume_MIMEname = NULL; +#ifdef LY_FIND_LEAKS PRIVATE void free_protocols NOARGS { HTList_delete(protocols); protocols = NULL; FREE(pushed_assume_MIMEname); /* shouldn't happen, just in case - kw */ } +#endif /* LY_FIND_LEAKS */ /* Register a Protocol. HTRegisterProtocol() ** -------------------- @@ -104,7 +105,9 @@ PUBLIC BOOL HTRegisterProtocol ARGS1( { if (!protocols) { protocols = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(free_protocols); +#endif } HTList_addObject(protocols, protocol); return YES; @@ -115,7 +118,7 @@ PUBLIC BOOL HTRegisterProtocol ARGS1( ** ----------------------------- ** ** Add to or subtract from this list if you add or remove protocol -** modules. This routine is called the first time the protocol list +** modules. This routine is called the first time the protocol list ** is needed, unless any protocols are already registered, in which ** case it is not called. Therefore the application can override ** this list. @@ -132,7 +135,10 @@ extern GLOBALREF (HTProtocol, HTTelnet); extern GLOBALREF (HTProtocol, HTTn3270); extern GLOBALREF (HTProtocol, HTRlogin); #ifndef DECNET +#ifndef DISABLE_FTP extern GLOBALREF (HTProtocol, HTFTP); +#endif /* DISABLE_FTP */ +#ifndef DISABLE_NEWS extern GLOBALREF (HTProtocol, HTNews); extern GLOBALREF (HTProtocol, HTNNTP); extern GLOBALREF (HTProtocol, HTNewsPost); @@ -140,9 +146,14 @@ extern GLOBALREF (HTProtocol, HTNewsReply); extern GLOBALREF (HTProtocol, HTSNews); extern GLOBALREF (HTProtocol, HTSNewsPost); extern GLOBALREF (HTProtocol, HTSNewsReply); +#endif /* not DISABLE_NEWS */ +#ifndef DISABLE_GOPHER extern GLOBALREF (HTProtocol, HTGopher); extern GLOBALREF (HTProtocol, HTCSO); +#endif /* not DISABLE_GOPHER */ +#ifndef DISABLE_FINGER extern GLOBALREF (HTProtocol, HTFinger); +#endif /* not DISABLE_FINGER */ #ifdef DIRECT_WAIS extern GLOBALREF (HTProtocol, HTWAIS); #endif /* DIRECT_WAIS */ @@ -150,9 +161,19 @@ extern GLOBALREF (HTProtocol, HTWAIS); #else GLOBALREF HTProtocol HTTP, HTTPS, HTFile, HTTelnet, HTTn3270, HTRlogin; #ifndef DECNET -GLOBALREF HTProtocol HTFTP, HTNews, HTNNTP, HTNewsPost, HTNewsReply; +#ifndef DISABLE_FTP +GLOBALREF HTProtocol HTFTP; +#endif /* DISABLE_FTP */ +#ifndef DISABLE_NEWS +GLOBALREF HTProtocol HTNews, HTNNTP, HTNewsPost, HTNewsReply; GLOBALREF HTProtocol HTSNews, HTSNewsPost, HTSNewsReply; -GLOBALREF HTProtocol HTGopher, HTCSO, HTFinger; +#endif /* not DISABLE_NEWS */ +#ifndef DISABLE_GOPHER +GLOBALREF HTProtocol HTGopher, HTCSO; +#endif /* not DISABLE_GOPHER */ +#ifndef DISABLE_FINGER +GLOBALREF HTProtocol HTFinger; +#endif /* not DISABLE_FINGER */ #ifdef DIRECT_WAIS GLOBALREF HTProtocol HTWAIS; #endif /* DIRECT_WAIS */ @@ -168,7 +189,10 @@ PRIVATE void HTAccessInit NOARGS /* Call me once */ HTRegisterProtocol(&HTTn3270); HTRegisterProtocol(&HTRlogin); #ifndef DECNET +#ifndef DISABLE_FTP HTRegisterProtocol(&HTFTP); +#endif /* DISABLE_FTP */ +#ifndef DISABLE_NEWS HTRegisterProtocol(&HTNews); HTRegisterProtocol(&HTNNTP); HTRegisterProtocol(&HTNewsPost); @@ -176,9 +200,14 @@ PRIVATE void HTAccessInit NOARGS /* Call me once */ HTRegisterProtocol(&HTSNews); HTRegisterProtocol(&HTSNewsPost); HTRegisterProtocol(&HTSNewsReply); +#endif /* not DISABLE_NEWS */ +#ifndef DISABLE_GOPHER HTRegisterProtocol(&HTGopher); HTRegisterProtocol(&HTCSO); +#endif /* not DISABLE_GOPHER */ +#ifndef DISABLE_FINGER HTRegisterProtocol(&HTFinger); +#endif /* not DISABLE_FINGER */ #ifdef DIRECT_WAIS HTRegisterProtocol(&HTWAIS); #endif /* DIRECT_WAIS */ @@ -269,8 +298,11 @@ PUBLIC BOOL override_proxy ARGS1( if (!strcmp(acc_method, "http")) port = 80; else if (!strcmp(acc_method, "https")) port = 443; else if (!strcmp(acc_method, "ftp")) port = 21; +#ifndef DISABLE_GOPHER else if (!strcmp(acc_method, "gopher")) port = 70; +#endif else if (!strcmp(acc_method, "cso")) port = 105; +#ifndef DISABLE_NEWS else if (!strcmp(acc_method, "news")) port = 119; else if (!strcmp(acc_method, "nntp")) port = 119; else if (!strcmp(acc_method, "newspost")) port = 119; @@ -278,8 +310,11 @@ PUBLIC BOOL override_proxy ARGS1( else if (!strcmp(acc_method, "snews")) port = 563; else if (!strcmp(acc_method, "snewspost")) port = 563; else if (!strcmp(acc_method, "snewsreply")) port = 563; +#endif else if (!strcmp(acc_method, "wais")) port = 210; +#ifndef DISABLE_FINGER else if (!strcmp(acc_method, "finger")) port = 79; +#endif FREE(acc_method); } } @@ -294,7 +329,7 @@ PUBLIC BOOL override_proxy ARGS1( int t_len; while (*no_proxy && (WHITE(*no_proxy) || *no_proxy == ',')) - no_proxy++; /* Skip whitespace and separators */ + no_proxy++; /* Skip whitespace and separators */ end = no_proxy; while (*end && !WHITE(*end) && *end != ',') { /* Find separator */ @@ -312,7 +347,7 @@ PUBLIC BOOL override_proxy ARGS1( if ((!templ_port || templ_port == port) && (t_len > 0 && t_len <= h_len && - !strncasecomp(Host + h_len - t_len, no_proxy, t_len))) { + !strncasecomp(Host + h_len - t_len, no_proxy, t_len))) { FREE(host); return YES; } @@ -331,10 +366,10 @@ PUBLIC BOOL override_proxy ARGS1( ** ** On entry, ** addr must point to the fully qualified hypertext reference. -** anchor a pareent anchor with whose address is addr +** anchor a parent anchor with whose address is addr ** ** On exit, -** returns HT_NO_ACCESS Error has occured. +** returns HT_NO_ACCESS Error has occurred. ** HT_OK Success */ PRIVATE int get_physical ARGS2( @@ -352,8 +387,7 @@ PRIVATE int get_physical ARGS2( } if (anchor->isISMAPScript == TRUE) { StrAllocCat(physical, "?0,0"); - if (TRACE) - fprintf(stderr, "HTAccess: Appending '?0,0' coordinate pair.\n"); + CTRACE(tfp, "HTAccess: Appending '?0,0' coordinate pair.\n"); } HTAnchor_setPhysical(anchor, physical); FREE(physical); /* free our copy */ @@ -361,10 +395,9 @@ PRIVATE int get_physical ARGS2( if (anchor->isISMAPScript == TRUE) { StrAllocCopy(physical, addr); StrAllocCat(physical, "?0,0"); - if (TRACE) - fprintf(stderr, "HTAccess: Appending '?0,0' coordinate pair.\n"); + CTRACE(tfp, "HTAccess: Appending '?0,0' coordinate pair.\n"); HTAnchor_setPhysical(anchor, physical); - FREE(physical); /* free our copy */ + FREE(physical); /* free our copy */ } else { HTAnchor_setPhysical(anchor, addr); } @@ -451,10 +484,10 @@ PRIVATE int get_physical ARGS2( proxy = (char *)getenv(gateway_parameter); FREE(gateway_parameter); - if (TRACE && gateway) - fprintf(stderr, "Gateway found: %s\n", gateway); - if (TRACE && proxy) - fprintf(stderr, "proxy server found: %s\n", proxy); + if (gateway) + CTRACE(tfp, "Gateway found: %s\n", gateway); + if (proxy) + CTRACE(tfp, "proxy server found: %s\n", proxy); /* ** Proxy servers have precedence over gateway servers. @@ -547,6 +580,11 @@ PUBLIC void LYUCPushAssumed ARGS1( UCAssume_MIMEcharset = NULL; StrAllocCopy(UCAssume_MIMEcharset, anchor_UCI->MIMEname); pushed_assume_LYhndl = anchor_LYhndl; + /* some diagnostics */ + if (UCLYhndl_for_unspec != anchor_LYhndl) + CTRACE(tfp, "LYUCPushAssumed: UCLYhndl_for_unspec changed %d -> %d\n", + UCLYhndl_for_unspec, + anchor_LYhndl); UCLYhndl_for_unspec = anchor_LYhndl; return; } @@ -559,9 +597,15 @@ PUBLIC void LYUCPushAssumed ARGS1( * UCLYhndl_for_unspec used for charset "assuming" from the values * saved by LYUCPushAssumed, if any. - kw */ -PRIVATE int LYUCPopAssumed NOARGS +PUBLIC int LYUCPopAssumed NOARGS { + if (pushed_assume_LYhndl >= 0) { + /* some diagnostics */ + if (UCLYhndl_for_unspec != pushed_assume_LYhndl) + CTRACE(tfp, "LYUCPopAssumed: UCLYhndl_for_unspec changed %d -> %d\n", + UCLYhndl_for_unspec, + pushed_assume_LYhndl); UCLYhndl_for_unspec = pushed_assume_LYhndl; pushed_assume_LYhndl = -1; FREE(UCAssume_MIMEcharset); @@ -572,7 +616,7 @@ PRIVATE int LYUCPopAssumed NOARGS return -1; } -/* Load a document HTLoad() +/* Load a document HTLoad() ** --------------- ** ** This is an internal routine, which has an address AND a matching @@ -580,13 +624,13 @@ PRIVATE int LYUCPopAssumed NOARGS ** ** On entry, ** addr must point to the fully qualified hypertext reference. -** anchor a pareent anchor with whose address is addr +** anchor a parent anchor with whose address is addr ** ** On exit, -** returns <0 Error has occured. +** returns <0 Error has occurred. ** HT_LOADED Success ** HT_NO_DATA Success, but no document loaded. -** (telnet sesssion started etc) +** (telnet session started etc) */ PRIVATE int HTLoad ARGS4( CONST char *, addr, @@ -597,7 +641,7 @@ PRIVATE int HTLoad ARGS4( HTProtocol *p; int status = get_physical(addr, anchor); if (status == HT_FORBIDDEN) { - return HTLoadError(sink, 500, "Access forbidden by rule"); + return HTLoadError(sink, 500, gettext("Access forbidden by rule")); } if (status < 0) return status; /* Can't resolve or forbidden */ @@ -624,8 +668,6 @@ PUBLIC HTStream *HTSaveStream ARGS1( return (*p->saveStream)(anchor); } -extern char LYinternal_flag; /* from LYMainLoop.c */ - /* Load a document - with logging etc HTLoadDocument() ** ---------------------------------- ** @@ -644,31 +686,20 @@ extern char LYinternal_flag; /* from LYMainLoop.c */ ** NO Failure */ -extern char LYforce_no_cache; /* from GridText.c */ -extern char LYoverride_no_cache; /* from LYMainLoop.c */ -extern char * HTLoadedDocumentURL NOPARAMS; /* in GridText.c */ -extern BOOL HText_hasNoCacheSet PARAMS((HText *text)); /* in GridText.c */ -extern BOOL reloading; -extern BOOL permanent_redirection; -#ifdef DIRED_SUPPORT -extern BOOLEAN lynx_edit_mode; -#endif - PRIVATE BOOL HTLoadDocument ARGS4( CONST char *, full_address, HTParentAnchor *, anchor, HTFormat, format_out, HTStream*, sink) { - int status; + int status; HText * text; CONST char * address_to_load = full_address; char *cp; BOOL ForcingNoCache = LYforce_no_cache; static int redirection_attempts = 0; - if (TRACE) - fprintf (stderr, "HTAccess: loading document %s\n", address_to_load); + CTRACE (tfp, "HTAccess: loading document %s\n", address_to_load); /* ** Free use_this_url_instead and reset permanent_redirection @@ -688,7 +719,7 @@ PRIVATE BOOL HTLoadDocument ARGS4( */ if (redirection_attempts > 10) { redirection_attempts = 0; - HTAlert("Redirection limit of 10 URL's reached."); + HTAlert(TOO_MANY_REDIRECTIONS); return NO; } @@ -707,7 +738,7 @@ PRIVATE BOOL HTLoadDocument ARGS4( anchor->post_data && !anchor->safe && (text = (HText *)HTAnchor_document(anchor)) == NULL && strncmp(full_address, "LYNXIMGMAP:", 11) && - HTConfirm("Document with POST content not found in cache. Resubmit?") + HTConfirm(gettext("Document with POST content not found in cache. Resubmit?")) != TRUE) { return NO; } @@ -724,17 +755,15 @@ PRIVATE BOOL HTLoadDocument ARGS4( !strncmp(cp, "Location=", 9)) { DocAddress NewDoc; - if (TRACE) { - fprintf (stderr, "HTAccess: '%s' is a redirection URL.\n", - anchor->address); - fprintf (stderr, "HTAccess: Redirecting to '%s'\n", cp+9); - } + CTRACE (tfp, "HTAccess: '%s' is a redirection URL.\n", + anchor->address); + CTRACE (tfp, "HTAccess: Redirecting to '%s'\n", cp+9); /* ** Don't exceed the redirection_attempts limit. - FM */ if (++redirection_attempts > 10) { - HTAlert("Redirection limit of 10 URL's reached."); + HTAlert(TOO_MANY_REDIRECTIONS); redirection_attempts = 0; FREE(use_this_url_instead); return NO; @@ -780,17 +809,17 @@ PRIVATE BOOL HTLoadDocument ARGS4( * If DONT_TRACK_INTERNAL_LINKS is defined, HText_AreDifferent() * is used to determine whether (3) applies. If the target address * differs from that of the current document only by a fragment - * and the taget address has an appended fragment, repositioning + * and the target address has an appended fragment, repositioning * without reloading is always assumed. * Note that HText_AreDifferent() currently always returns TRUE * if the target has a LYNXIMGMAP URL, so that an internally * generated pseudo-document will normally not be re-used unless - * condition (2) appplies. (Condition (1) cannot apply since in + * condition (2) applies. (Condition (1) cannot apply since in * LYMap.c, no_cache is always set in the anchor object). This * doesn't guarantee that the resource from which the MAP element * is taken will be read again (reloaded) when the list of links * for a client-side image map is regenerated, when in some cases - * it should (e.g. user requested RELOAD, or HTTP response with + * it should (e.g., user requested RELOAD, or HTTP response with * no-cache header and we are not overriding). * * If DONT_TRACK_INTERNAL_LINKS is undefined, a target address that @@ -826,8 +855,7 @@ PRIVATE BOOL HTLoadDocument ARGS4( strncmp(full_address, "LYNXIMGMAP:", 11))) #endif /* TRACK_INTERNAL_LINKS */ { - if (TRACE) - fprintf(stderr, "HTAccess: Document already in memory.\n"); + CTRACE(tfp, "HTAccess: Document already in memory.\n"); HText_select(text); #ifdef DIRED_SUPPORT @@ -837,16 +865,8 @@ PRIVATE BOOL HTLoadDocument ARGS4( redirection_attempts = 0; return YES; } else { -#if NOT_USED_CODE - /* disabled 1997-10-28 - kw - callers already do this when requested - */ - reloading = TRUE; -#endif ForcingNoCache = YES; - if (TRACE) { - fprintf(stderr, "HTAccess: Auto-reloading document.\n"); - } + CTRACE(tfp, "HTAccess: Auto-reloading document.\n"); } } @@ -861,9 +881,7 @@ PRIVATE BOOL HTLoadDocument ARGS4( FREE(anchor->title); } status = HTLoad(address_to_load, anchor, format_out, sink); - if (TRACE) { - fprintf(stderr, "HTAccess: status=%d\n", status); - } + CTRACE(tfp, "HTAccess: status=%d\n", status); /* ** Log the access if necessary. @@ -877,8 +895,7 @@ PRIVATE BOOL HTLoadDocument ARGS4( status < 0 ? "FAIL" : "GET", full_address); fflush(HTlogfile); /* Actually update it on disk */ - if (TRACE) - fprintf(stderr, "Log: %24.24s %s %s %s\n", + CTRACE(tfp, "Log: %24.24s %s %s %s\n", ctime(&theTime), HTClientHost ? HTClientHost : "local", status < 0 ? "FAIL" : "GET", @@ -907,12 +924,10 @@ PRIVATE BOOL HTLoadDocument ARGS4( ** in LYGetFile.c when the status is HT_REDIRECTING. This may ** seem bizarre, but it works like a charm! - FM */ - if (TRACE) { - fprintf(stderr, "HTAccess: '%s' is a redirection URL.\n", - address_to_load); - fprintf(stderr, "HTAccess: Redirecting to '%s'\n", - redirecting_url); - } + CTRACE(tfp, "HTAccess: '%s' is a redirection URL.\n", + address_to_load); + CTRACE(tfp, "HTAccess: Redirecting to '%s'\n", + redirecting_url); /* ** Prevent circular references. */ @@ -952,73 +967,60 @@ PRIVATE BOOL HTLoadDocument ARGS4( permanent_redirection = FALSE; if (status == HT_LOADED) { - if (TRACE) { - fprintf(stderr, "HTAccess: `%s' has been accessed.\n", - full_address); - } + CTRACE(tfp, "HTAccess: `%s' has been accessed.\n", + full_address); return YES; } if (status == HT_PARTIAL_CONTENT) { - HTAlert("Loading incomplete."); - if (TRACE) { - fprintf(stderr, "HTAccess: `%s' has been accessed, partial content.\n", - full_address); - } + HTAlert(gettext("Loading incomplete.")); + CTRACE(tfp, "HTAccess: `%s' has been accessed, partial content.\n", + full_address); return YES; } if (status == HT_NO_DATA) { - if (TRACE) { - fprintf(stderr, - "HTAccess: `%s' has been accessed, No data left.\n", - full_address); - } + CTRACE(tfp, "HTAccess: `%s' has been accessed, No data left.\n", + full_address); return NO; } if (status == HT_NOT_LOADED) { - if (TRACE) { - fprintf(stderr, - "HTAccess: `%s' has been accessed, No data loaded.\n", - full_address); - } + CTRACE(tfp, "HTAccess: `%s' has been accessed, No data loaded.\n", + full_address); return NO; } if (status == HT_INTERRUPTED) { - if (TRACE) { - fprintf(stderr, - "HTAccess: `%s' has been accessed, transfer interrupted.\n", - full_address); - } -/* _HTProgress("Data transfer interrupted."); */ + CTRACE(tfp, "HTAccess: `%s' has been accessed, transfer interrupted.\n", + full_address); return NO; } - if (status <= 0) { /* Failure in accessing a document */ - char *temp = NULL; - StrAllocCopy(temp, "Can't Access `"); - StrAllocCat(temp, full_address); - StrAllocCat(temp, "'"); - _HTProgress(temp); - FREE(temp); - if (TRACE) fprintf(stderr, - "HTAccess: Can't access `%s'\n", full_address); - HTLoadError(sink, 500, "Unable to access document."); - return NO; + if (status > 0) { + /* + ** If you get this, then please find which routine is returning + ** a positive unrecognized error code! + */ + fprintf(stderr, + gettext("**** HTAccess: socket or file number returned by obsolete load routine!\n")); + fprintf(stderr, + gettext("**** HTAccess: Internal software error. Please mail lynx_dev@sig.net!\n")); + fprintf(stderr, gettext("**** HTAccess: Status returned was: %d\n"),status); + exit(-1); } - /* - ** If you get this, then please find which routine is returning - ** a positive unrecognised error code! - */ - fprintf(stderr, - "**** HTAccess: socket or file number returned by obsolete load routine!\n"); - fprintf(stderr, - "**** HTAccess: Internal software error. Please mail lynx_dev@sig.net!\n"); - fprintf(stderr, "**** HTAccess: Status returned was: %d\n",status); - exit(-1); - + /* Failure in accessing a document */ + cp = NULL; + StrAllocCopy(cp, gettext("Can't Access")); + StrAllocCat(cp, " `"); + StrAllocCat(cp, full_address); + StrAllocCat(cp, "'"); + _HTProgress(cp); + FREE(cp); + + CTRACE(tfp, "HTAccess: Can't access `%s'\n", full_address); + HTLoadError(sink, 500, gettext("Unable to access document.")); + return NO; } /* HTLoadDocument */ /* Load a document from absolute name. HTLoadAbsolute() @@ -1116,7 +1118,7 @@ PUBLIC BOOL HTLoadRelative ARGS2( ** ---------------------------------------- ** ** On Entry, -** destination The child or parenet anchor to be loaded. +** destination The child or parent anchor to be loaded. ** ** On Exit, ** returns YES Success @@ -1132,7 +1134,7 @@ PUBLIC BOOL HTLoadAnchor ARGS1( parent = HTAnchor_parent(destination); - if (HTAnchor_document(parent) == NULL) { /* If not alread loaded */ + if (HTAnchor_document(parent) == NULL) { /* If not already loaded */ /* TBL 921202 */ BOOL result; char * address = HTAnchor_address((HTAnchor*) parent); @@ -1162,7 +1164,7 @@ PUBLIC BOOL HTLoadAnchor ARGS1( } /* HTLoadAnchor */ -/* Search. HTSearch() +/* Search. HTSearch() ** ------- ** ** Performs a keyword search on word given by the user. Adds the @@ -1250,7 +1252,7 @@ PUBLIC BOOL HTSearch ARGS2( return result; } -/* Search Given Indexname. HTSearchAbsolute() +/* Search Given Indexname. HTSearchAbsolute() ** ----------------------- ** ** Performs a keyword search on word given by the user. Adds the @@ -1258,16 +1260,16 @@ PUBLIC BOOL HTSearch ARGS2( ** the new address. ** ** On Entry, -** *keywords space-separated keyword list or similar search list -** *addres is name of object search is to be done on. +** *keywords space-separated keyword list or similar search list +** *indexname is name of object search is to be done on. */ PUBLIC BOOL HTSearchAbsolute ARGS2( CONST char *, keywords, - CONST char *, indexname) + char *, indexname) { DocAddress abs_doc; HTParentAnchor * anchor; - abs_doc.address = (char *)indexname; + abs_doc.address = indexname; abs_doc.post_data = NULL; abs_doc.post_content_type = NULL; abs_doc.bookmark = NULL; @@ -1285,7 +1287,7 @@ PUBLIC BOOL HTSearchAbsolute ARGS2( ** As it involves file access, this should only be done once ** when the program first runs. ** This is a default algorithm -- browser don't HAVE to use this. -** But consistency betwen browsers is STRONGLY recommended! +** But consistency between browsers is STRONGLY recommended! ** ** Priority order is: ** 1 WWW_HOME environment variable (logical name, etc) @@ -1328,11 +1330,7 @@ PUBLIC HTParentAnchor * HTHomeAnchor NOARGS FILE * fp = NULL; CONST char * home = (CONST char*)getenv("HOME"); if (home != null) { - my_home_document = (char *)calloc(1, - (strlen(home) + 1 + strlen(PERSONAL_DEFAULT) + 1)); - if (my_home_document == NULL) - outofmem(__FILE__, "HTAnchorHome"); - sprintf(my_home_document, "%s/%s", home, PERSONAL_DEFAULT); + HTSprintf0(&my_home_document, "%s/%s", home, PERSONAL_DEFAULT); fp = fopen(my_home_document, "r"); } @@ -1343,9 +1341,7 @@ PUBLIC HTParentAnchor * HTHomeAnchor NOARGS if (fp) { fclose(fp); } else { - if (TRACE) - fprintf(stderr, - "HTBrowse: No local home document ~/%s or %s\n", + CTRACE(tfp, "HTBrowse: No local home document ~/%s or %s\n", PERSONAL_DEFAULT, LOCAL_DEFAULT_FILE); FREE(my_home_document); } @@ -1357,9 +1353,7 @@ PUBLIC HTParentAnchor * HTHomeAnchor NOARGS "file:", PARSE_ACCESS|PARSE_HOST|PARSE_PATH|PARSE_PUNCTUATION); if (my_home_document) { - if (TRACE) - fprintf(stderr, - "HTAccess: Using custom home page %s i.e. address %s\n", + CTRACE(tfp, "HTAccess: Using custom home page %s i.e., address %s\n", my_home_document, ref); FREE(my_home_document); } diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAccess.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAccess.h index 2826d13aa0a..2cfd49d518d 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAccess.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAccess.h @@ -1,12 +1,12 @@ /* HTAccess: Access manager for libwww ACCESS MANAGER - + This module keeps a list of valid protocol (naming scheme) specifiers with associated access code. It allows documents to be loaded given various combinations of - parameters. New access protocols may be registered at any time. - + parameters. New access protocols may be registered at any time. + Part of the libwww library . - + */ #ifndef HTACCESS_H #define HTACCESS_H @@ -15,19 +15,8 @@ extern char * use_this_url_instead; /* Definition uses: */ -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ -#include "tcp.h" -#include "HTAnchor.h" -#include "HTFormat.h" - -#ifdef SHORT_NAMES -#define HTClientHost HTClHost -#define HTSearchAbsolute HTSeAbso -#define HTOutputStream HTOuStre -#define HTOutputFormat HTOuForm -#endif +#include +#include /* Return codes from load routines: ** @@ -36,16 +25,14 @@ extern char * use_this_url_instead; ** In general, positive codes are OK and negative ones are bad. */ -#define HT_NO_DATA -9999 /* return code: OK but no data was loaded */ - /* Typically, other app started or forked */ /* Default Addresses - These control the home page selection. To mess with these for normal browses is asking + These control the home page selection. To mess with these for normal browses is asking for user confusion. - + */ #define LOGICAL_DEFAULT "WWW_HOME" /* Defined to be the home page */ @@ -115,17 +102,17 @@ extern BOOL override_proxy PARAMS(( Load a document from relative name ON ENTRY, - + relative_name The relative address of the file to be accessed. - + here The anchor of the object being searched - + ON EXIT, - + returns YES Success in opening file - + NO Failure - + */ extern BOOL HTLoadRelative PARAMS(( CONST char * relative_name, @@ -137,25 +124,25 @@ extern BOOL HTLoadRelative PARAMS(( Load a document from absolute name ON ENTRY, - + addr The absolute address of the document to be accessed. - + filter_it if YES, treat document as HTML - + */ /* ON EXIT, - + */ /* returns YES Success in opening document - + NO Failure - + */ extern BOOL HTLoadAbsolute PARAMS((CONST DocAddress * addr)); @@ -165,19 +152,19 @@ extern BOOL HTLoadAbsolute PARAMS((CONST DocAddress * addr)); Load a document from absolute name to a stream ON ENTRY, - + addr The absolute address of the document to be accessed. - + filter_it if YES, treat document as HTML - + ON EXIT, - + returns YES Success in opening document - + NO Failure - + Note: This is equivalent to HTLoadDocument - + */ extern BOOL HTLoadToStream PARAMS((CONST char * addr, BOOL filter_it, HTStream * sink)); @@ -188,23 +175,23 @@ extern BOOL HTLoadToStream PARAMS((CONST char * addr, BOOL filter_it, Load if necessary, and select an anchor ON ENTRY, - + destination The child or parenet anchor to be loaded. - + */ /* ON EXIT, - + */ /* returns YES Success - + returns NO Failure - + */ @@ -217,13 +204,13 @@ extern BOOL HTLoadAnchor PARAMS((HTAnchor * destination)); Make a stream for Saving object back ON ENTRY, - + anchor is valid anchor which has previously beeing loaded - + ON EXIT, - + returns 0 if error else a stream to save the object to. - + */ @@ -234,15 +221,15 @@ extern HTStream * HTSaveStream PARAMS((HTParentAnchor * anchor)); Search - Performs a search on word given by the user. Adds the search words to the end of the + Performs a search on word given by the user. Adds the search words to the end of the current address and attempts to open the new address. - + ON ENTRY, - + *keywords space-separated keyword list or similar search list - + here The anchor of the object being searched - + */ extern BOOL HTSearch PARAMS((CONST char * keywords, HTParentAnchor* here)); @@ -251,19 +238,19 @@ extern BOOL HTSearch PARAMS((CONST char * keywords, HTParentAnchor* here)); Search Given Indexname - Performs a keyword search on word given by the user. Adds the keyword to the end of + Performs a keyword search on word given by the user. Adds the keyword to the end of the current address and attempts to open the new address. - + ON ENTRY, - + *keywords space-separated keyword list or similar search list - + *indexname is name of object search is to be done on. - + */ extern BOOL HTSearchAbsolute PARAMS(( CONST char * keywords, - CONST char * indexname)); + char * indexname)); /* @@ -274,13 +261,13 @@ Register an access method typedef struct _HTProtocol { char * name; - + int (*load)PARAMS(( CONST char * full_address, HTParentAnchor * anchor, HTFormat format_out, HTStream* sink)); - + HTStream* (*saveStream)PARAMS((HTParentAnchor * anchor)); } HTProtocol; @@ -298,7 +285,7 @@ Generate the anchor for the home page As it involves file access, this should only be done once when the program first runs. This is a default algorithm -- browser don't HAVE to use this. - + */ extern HTParentAnchor * HTHomeAnchor NOPARAMS; @@ -318,6 +305,7 @@ extern void LYRegisterLynxProtocols NOARGS; extern void LYUCPushAssumed PARAMS(( HTParentAnchor * anchor)); +extern int LYUCPopAssumed NOPARAMS; #endif /* HTACCESS_H */ /* diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAlert.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAlert.c deleted file mode 100644 index 799db6cba5f..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAlert.c +++ /dev/null @@ -1,126 +0,0 @@ -/* Displaying messages and getting input for LineMode Browser -** ========================================================== -** -** REPLACE THIS MODULE with a GUI version in a GUI environment! -** -** History: -** Jun 92 Created May 1992 By C.T. Barker -** Feb 93 Simplified, portablised TBL -** Sep 93 Corrected 3 bugs in HTConfirm() :-( AL -*/ - - -#include "HTUtils.h" -#include "tcp.h" /* for TOUPPER */ - -#include "HTAlert.h" - -#include /* for toupper - should be in tcp.h */ -#ifdef VMS -extern char * getpass PARAMS((CONST char *prompt)); -#endif /* VMS */ - -#include "LYLeaks.h" - -PUBLIC void HTAlert ARGS1(CONST char *, Msg) -{ -#ifdef NeXTStep - NXRunAlertPanel(NULL, "%s", NULL, NULL, NULL, Msg); -#else - fprintf(stderr, "WWW Alert: %s\n", Msg); -#endif -} - - -PUBLIC void HTProgress ARGS1(CONST char *, Msg) -{ - fprintf(stderr, " %s ...\n", Msg); -} - - -PUBLIC BOOL HTConfirm ARGS1(CONST char *, Msg) -{ - char Reply[4]; /* One more for terminating NULL -- AL */ - char *URep; - - fprintf(stderr, "WWW: %s (y/n) ", Msg); - /* (y/n) came twice -- AL */ - - fgets(Reply, 4, stdin); /* get reply, max 3 characters */ - URep=Reply; - while (*URep) { - if (*URep == '\n') { - *URep = (char)0; /* Overwrite newline */ - break; - } - *URep=TOUPPER(*URep); - URep++; /* This was previously embedded in the TOUPPER */ - /* call an it became evaluated twice because */ - /* TOUPPER is a macro -- AL */ - } - - if ((strcmp(Reply,"YES")==0) || (strcmp(Reply,"Y")==0)) - return(YES); - else - return(NO); -} - -/* Prompt for answer and get text back -*/ -PUBLIC char * HTPrompt ARGS2(CONST char *, Msg, CONST char *, deflt) -{ - char Tmp[200]; - char * rep = 0; - fprintf(stderr, "WWW: %s", Msg); - if (deflt) fprintf(stderr, " (RETURN for [%s]) ", deflt); - - fgets(Tmp, 200, stdin); - Tmp[strlen(Tmp)-1] = (char)0; /* Overwrite newline */ - - StrAllocCopy(rep, *Tmp ? Tmp : deflt); - return rep; -} - - -/* Prompt for password without echoing the reply -*/ -PUBLIC char * HTPromptPassword ARGS1(CONST char *, Msg) -{ - char *result = NULL; - char *pw = (char*)getpass(Msg ? Msg : "Password: "); - - StrAllocCopy(result, pw); - return result; -} - - -/* Prompt both username and password HTPromptUsernameAndPassword() -** --------------------------------- -** On entry, -** Msg is the prompting message. -** *username and -** *password are char pointers; they are changed -** to point to result strings. -** -** If *username is not NULL, it is taken -** to point to a default value. -** Initial value of *password is -** completely discarded. -** -** On exit, -** *username and *password point to newly allocated -** strings -- original strings pointed to by them -** are NOT freed. -** -*/ -PUBLIC void HTPromptUsernameAndPassword ARGS4(CONST char *, Msg, - char **, username, - char **, password, - BOOL, IsProxy) -{ - if (Msg) - fprintf(stderr, "WWW: %s\n", Msg); - *username = HTPrompt("Username: ", *username); - *password = HTPromptPassword("Password: "); -} - diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAlert.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAlert.h deleted file mode 100644 index 03b970b63e0..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAlert.h +++ /dev/null @@ -1,128 +0,0 @@ -/* */ - -/* Displaying messages and getting input for WWW Library -** ===================================================== -** -** May 92 Created By C.T. Barker -** Feb 93 Portablized etc TBL -*/ - -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ -#include "tcp.h" - -/* Display a message and get the input -** -** On entry, -** Msg is the message. -** -** On exit, -** Return value is malloc'd string which must be freed. -*/ -extern char * HTPrompt PARAMS((CONST char * Msg, CONST char * deflt)); - - -/* Display a message, don't wait for input -** -** On entry, -** The input is a list of parameters for printf. -*/ -extern void HTAlert PARAMS((CONST char * Msg)); - - -/* Display a progress message for information (and diagnostics) only -** -** On entry, -** The input is a list of parameters for printf. -*/ -extern void HTProgress PARAMS((CONST char * Msg)); -extern BOOLEAN mustshow; -#define _HTProgress(msg) mustshow = TRUE, HTProgress(msg) - - -/* Display a message, then wait for 'yes' or 'no'. -** -** On entry, -** Takes a list of parameters for printf. -** -** On exit, -** If the user enters 'YES', returns TRUE, returns FALSE -** otherwise. -*/ -extern BOOL HTConfirm PARAMS ((CONST char * Msg)); - - -/* Prompt for password without echoing the reply -*/ -extern char * HTPromptPassword PARAMS((CONST char * Msg)); - -/* Prompt both username and password HTPromptUsernameAndPassword() -** --------------------------------- -** On entry, -** Msg is the prompting message. -** *username and -** *password are char pointers; they are changed -** to point to result strings. -** IsProxy should be TRUE if this is for -** proxy authentication. -** -** If *username is not NULL, it is taken -** to point to a default value. -** Initial value of *password is -** completely discarded. -** -** On exit, -** *username and *password point to newly allocated -** strings -- original strings pointed to by them -** are NOT freed. -** -*/ -extern void HTPromptUsernameAndPassword PARAMS(( - CONST char * Msg, - char ** username, - char ** password, - BOOL IsProxy)); - - -/* Confirm a cookie operation. HTConfirmCookie() -** --------------------------- -** -** On entry, -** server is the server sending the Set-Cookie. -** domain is the domain of the cookie. -** path is the path of the cookie. -** name is the name of the cookie. -** value is the value of the cookie. -** -** On exit, -** Returns FALSE on cancel, -** TRUE if the cookie should be set. -*/ -extern BOOL HTConfirmCookie PARAMS(( - void * dp, - CONST char * server, - CONST char * domain, - CONST char * path, - CONST char * name, - CONST char * value)); - - -/* Confirm redirection of POST. HTConfirmPostRedirect() -** ---------------------------- -** On entry, -** redirecting_url is the Location. -** server_status is the server status code. -** -** On exit, -** Returns 0 on cancel, -** 1 for redirect of POST with content, -** 303 for redirect as GET without content -*/ -extern int HTConfirmPostRedirect PARAMS(( - CONST char * redirecting_url_arg, - int server_status)); - -/* - - */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAnchor.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAnchor.c index 6f8c0d3fbd1..22af2bfb379 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAnchor.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAnchor.c @@ -7,26 +7,22 @@ ** History ** ** Nov 1990 Written in Objective-C for the NeXT browser (TBL) -** 24-Oct-1991 (JFG), written in C, browser-independant +** 24-Oct-1991 (JFG), written in C, browser-independent ** 21-Nov-1991 (JFG), first complete version ** ** (c) Copyright CERN 1991 - See Copyright.html */ -#define HASH_SIZE 101 /* Arbitrary prime. Memory/speed tradeoff */ +#define HASH_SIZE 101 /* Arbitrary prime. Memory/speed tradeoff */ -#include "HTUtils.h" -#include "tcp.h" -#include -#include "HTAnchor.h" -#include "HTParse.h" -#include "UCAux.h" -#include "UCMap.h" +#include +#include +#include +#include +#include -#include "LYCharSets.h" -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} +#include +#include #ifdef NOT_DEFINED /* @@ -44,12 +40,12 @@ PRIVATE int HASH_FUNCTION ARGS1( CONST char *, cp_address) { int hash; - unsigned char *p; + CONST unsigned char *p; - for (p = (unsigned char *)cp_address, hash = 0; *p; p++) - hash = (int) (hash * 3 + (*(unsigned char *)p)) % HASH_SIZE; + for (p = (CONST unsigned char *)cp_address, hash = 0; *p; p++) + hash = (int) (hash * 3 + (*(CONST unsigned char *)p)) % HASH_SIZE; - return hash; + return(hash); } typedef struct _HyperDoc Hyperdoc; @@ -64,7 +60,7 @@ PRIVATE HTList **adult_table = 0; /* Point to table of lists of all parents */ /* Creation Methods ** ================ ** -** Do not use "new" by itself outside this module. In order to enforce +** Do not use "new" by itself outside this module. In order to enforce ** consistency, we insist that you furnish more information about the ** anchor you are creating : use newWithParent or newWithAddress. */ @@ -72,6 +68,8 @@ PRIVATE HTParentAnchor * HTParentAnchor_new NOARGS { HTParentAnchor *newAnchor = (HTParentAnchor *)calloc(1, sizeof(HTParentAnchor)); /* zero-filled */ + if (newAnchor == NULL) + outofmem(__FILE__, "HTParentAnchor_new"); newAnchor->parent = newAnchor; newAnchor->bookmark = NULL; /* Bookmark filename. - FM */ newAnchor->isISMAPScript = FALSE; /* Lynx appends ?0,0 if TRUE. - FM */ @@ -84,7 +82,7 @@ PRIVATE HTParentAnchor * HTParentAnchor_new NOARGS newAnchor->no_cache = FALSE; /* no-cache? - FM */ newAnchor->content_type = NULL; /* Content-Type. - FM */ newAnchor->content_language = NULL; /* Content-Language. - FM */ - newAnchor->content_encoding = NULL; /* Compression algorith. - FM */ + newAnchor->content_encoding = NULL; /* Compression algorithm. - FM */ newAnchor->content_base = NULL; /* Content-Base. - FM */ newAnchor->content_disposition = NULL; /* Content-Disposition. - FM */ newAnchor->content_location = NULL; /* Content-Location. - FM */ @@ -93,8 +91,9 @@ PRIVATE HTParentAnchor * HTParentAnchor_new NOARGS newAnchor->date = NULL; /* Date. - FM */ newAnchor->expires = NULL; /* Expires. - FM */ newAnchor->last_modified = NULL; /* Last-Modified. - FM */ + newAnchor->ETag = NULL; /* ETag (HTTP/1.1 cache validator) */ newAnchor->server = NULL; /* Server. - FM */ - return newAnchor; + return(newAnchor); } PRIVATE HTChildAnchor * HTChildAnchor_new NOARGS @@ -120,12 +119,12 @@ PRIVATE BOOL HTEquivalent ARGS2( if (s && t) { /* Make sure they point to something */ for (; *s && *t; s++, t++) { if (TOUPPER(*s) != TOUPPER(*t)) { - return NO; + return(NO); } } - return TOUPPER(*s) == TOUPPER(*t); + return( TOUPPER(*s) == TOUPPER(*t)); } else { - return s == t; /* Two NULLs are equivalent, aren't they ? */ + return(s == t); /* Two NULLs are equivalent, aren't they ? */ } } @@ -147,12 +146,12 @@ PRIVATE BOOL HTIdentical ARGS2( if (s && t) { /* Make sure they point to something */ for (; *s && *t; s++, t++) { if (*s != *t) { - return NO; + return(NO); } } - return *s == *t; + return(*s == *t); } else { - return s == t; /* Two NULLs are identical, aren't they ? */ + return(s == t); /* Two NULLs are identical, aren't they ? */ } } #endif /* CASE_INSENSITIVE_ANCHORS */ @@ -162,7 +161,7 @@ PRIVATE BOOL HTIdentical ARGS2( ** --------------------------------- ** ** Me one is for a new anchor being edited into an existing -** document. The parent anchor must already exist. +** document. The parent anchor must already exist. */ PUBLIC HTChildAnchor * HTAnchor_findChild ARGS2( HTParentAnchor *, parent, @@ -172,9 +171,8 @@ PUBLIC HTChildAnchor * HTAnchor_findChild ARGS2( HTList *kids; if (!parent) { - if (TRACE) - fprintf(stderr, "HTAnchor_findChild called with NULL parent.\n"); - return NULL; + CTRACE(tfp, "HTAnchor_findChild called with NULL parent.\n"); + return(NULL); } if ((kids = parent->children) != 0) { /* @@ -183,15 +181,14 @@ PUBLIC HTChildAnchor * HTAnchor_findChild ARGS2( if (tag && *tag) { /* TBL */ while (NULL != (child=(HTChildAnchor *)HTList_nextObject(kids))) { #ifdef CASE_INSENSITIVE_ANCHORS - if (HTEquivalent(child->tag, tag)) { /* Case insensitive */ + if (HTEquivalent(child->tag, tag)) /* Case insensitive */ #else - if (HTIdentical(child->tag, tag)) { /* Case sensitive - FM */ + if (HTIdentical(child->tag, tag)) /* Case sensitive - FM */ #endif /* CASE_INSENSITIVE_ANCHORS */ - if (TRACE) - fprintf(stderr, - "Child anchor %p of parent %p with name `%s' already exists.\n", + { + CTRACE(tfp, "Child anchor %p of parent %p with name `%s' already exists.\n", (void *)child, (void *)parent, tag); - return child; + return(child); } } } /* end if tag is void */ @@ -200,16 +197,16 @@ PUBLIC HTChildAnchor * HTAnchor_findChild ARGS2( } child = HTChildAnchor_new(); - if (TRACE) - fprintf(stderr, - "new Anchor %p named `%s' is child of %p\n", + if (child == NULL) + outofmem(__FILE__, "HTChildAnchor_new"); + CTRACE(tfp, "new Anchor %p named `%s' is child of %p\n", (void *)child, tag ? tag : (CONST char *)"", (void *)parent); /* int for apollo */ HTList_addObject (parent->children, child); child->parent = parent; StrAllocCopy(child->tag, tag); - return child; + return(child); } @@ -228,8 +225,7 @@ PUBLIC HTChildAnchor * HTAnchor_findChildAndLink ARGS4( { HTChildAnchor * child = HTAnchor_findChild(parent, tag); - if (TRACE) - fprintf(stderr,"Entered HTAnchor_findChildAndLink\n"); + CTRACE(tfp,"Entered HTAnchor_findChildAndLink\n"); if (href && *href) { char *relative_to = HTAnchor_address((HTAnchor *)parent); @@ -254,13 +250,37 @@ PUBLIC HTChildAnchor * HTAnchor_findChildAndLink ARGS4( parsed_doc.safe = FALSE; dest = HTAnchor_findAddress(&parsed_doc); +#define DUPLICATE_ANCHOR_NAME_WORKAROUND + +#ifdef DUPLICATE_ANCHOR_NAME_WORKAROUND + if (tag && *tag) { + HTAnchor *testdest1; + int nlinks; + testdest1 = child->mainLink.dest; + if (testdest1) { + nlinks = 1 + HTList_count(child->links); + CTRACE(tfp, + "*** Duplicate ChildAnchor %p named `%s' with %d links", + child, tag, nlinks); + if (dest == testdest1 && ltype == child->mainLink.type) { + CTRACE(tfp,", same dest %p and type, keeping it\n", + testdest1); + } else { + CTRACE(tfp,", different dest %p, creating unnamed child\n", + testdest1); + child = HTAnchor_findChild(parent, 0); + } + } + } +#endif HTAnchor_link((HTAnchor *)child, dest, ltype); FREE(parsed_doc.address); FREE(relative_to); } - return child; + return(child); } +#ifdef LY_FIND_LEAKS /* ** Function for freeing the adult hash table. - FM */ @@ -284,6 +304,12 @@ PRIVATE void free_adult_table NOARGS adult_table[i_counter] = HTAp_freeme->next; if (HTAp_freeme->object) { parent = (HTParentAnchor *)HTAp_freeme->object; + CTRACE(tfp, "delete anchor:%d/%d,%d,%d %s\n", + i_counter, HTList_count(HTAp_freeme) + 1, + (parent->physical ? 1 : 0), + (int)parent->underway, + (parent->address ? parent->address : "(no address)")); + parent->underway = FALSE; HTAnchor_delete(parent); } FREE(HTAp_freeme); @@ -291,6 +317,7 @@ PRIVATE void free_adult_table NOARGS } FREE(adult_table); } +#endif /* LY_FIND_LEAKS */ /* Create new or find old named anchor ** ----------------------------------- @@ -306,8 +333,7 @@ PUBLIC HTAnchor * HTAnchor_findAddress ARGS1( /* Anchor tag specified ? */ char *tag = HTParse(newdoc->address, "", PARSE_ANCHOR); - if (TRACE) - fprintf(stderr,"Entered HTAnchor_findAddress\n"); + CTRACE(tfp,"Entered HTAnchor_findAddress\n"); /* ** If the address represents a sub-anchor, we recursively load its @@ -349,7 +375,11 @@ PUBLIC HTAnchor * HTAnchor_findAddress ARGS1( hash = HASH_FUNCTION(newdoc->address); if (!adult_table) { adult_table = (HTList **)calloc(HASH_SIZE, sizeof(HTList *)); + if (!adult_table) + outofmem(__FILE__, "HTAnchor_findAddress"); +#ifdef LY_FIND_LEAKS atexit(free_adult_table); +#endif } if (!adult_table[hash]) adult_table[hash] = HTList_new(); @@ -371,9 +401,7 @@ PUBLIC HTAnchor * HTAnchor_findAddress ARGS1( foundAnchor->isHEAD == newdoc->isHEAD) #endif /* CASE_INSENSITIVE_ANCHORS */ { - if (TRACE) - fprintf(stderr, - "Anchor %p with address `%s' already exists.\n", + CTRACE(tfp, "Anchor %p with address `%s' already exists.\n", (void *)foundAnchor, newdoc->address); return (HTAnchor *)foundAnchor; } @@ -383,9 +411,7 @@ PUBLIC HTAnchor * HTAnchor_findAddress ARGS1( ** Node not found: create new anchor. */ foundAnchor = HTParentAnchor_new(); - if (TRACE) - fprintf(stderr, - "New anchor %p has hash %d and address `%s'\n", + CTRACE(tfp, "New anchor %p has hash %d and address `%s'\n", (void *)foundAnchor, hash, newdoc->address); StrAllocCopy(foundAnchor->address, newdoc->address); if (newdoc->post_data) @@ -433,6 +459,14 @@ PRIVATE void deleteLinks ARGS1( if (me->mainLink.dest) { HTParentAnchor *parent = me->mainLink.dest->parent; + /* + * Set the mainLink pointer to zero NOW. If we don't, + * and we get somehow called recursively again for this + * same old me during the HTAnchor_delete below, weird + * things can occasionally happen. - kw + */ + me->mainLink.dest = NULL; + /* * Remove me from the parent's sources so that the * parent knows one less anchor is it's dest. @@ -448,7 +482,7 @@ PRIVATE void deleteLinks ARGS1( * Test here to avoid calling overhead. * If the parent has no loaded document, then we should * tell it to attempt to delete itself. - * Don't do this jass if the anchor passed in is the same + * Don't do this jazz if the anchor passed in is the same * as the anchor to delete. * Also, don't do this if the destination parent is our * parent. @@ -465,7 +499,6 @@ PRIVATE void deleteLinks ARGS1( * Leave the HTAtom pointed to by type up to other code to * handle (reusable, near static). */ - me->mainLink.dest = NULL; me->mainLink.type = NULL; } @@ -557,6 +590,12 @@ PUBLIC BOOL HTAnchor_delete ARGS1( return(NO); } + /* + * Mark ourselves busy, so that recursive calls of this function + * on this HTParentAnchor will not free it from under our feet. - kw + */ + me->underway = TRUE; + /* * Recursively try to delete destination anchors of this parent. * In any event, this will tell all destination anchors that we @@ -583,6 +622,7 @@ PUBLIC BOOL HTAnchor_delete ARGS1( } } } + me->underway = FALSE; /* * Can't delete parent, still have sources. @@ -606,6 +646,7 @@ PUBLIC BOOL HTAnchor_delete ARGS1( } } } + me->underway = FALSE; /* * Delete our empty list of children. @@ -665,9 +706,12 @@ PUBLIC BOOL HTAnchor_delete ARGS1( FREE(me->content_disposition); FREE(me->content_location); FREE(me->content_md5); + FREE(me->message_id); + FREE(me->subject); FREE(me->date); FREE(me->expires); FREE(me->last_modified); + FREE(me->ETag); FREE(me->server); #ifdef USE_HASH FREE(me->style); @@ -731,7 +775,7 @@ PUBLIC void HTAnchor_makeLastChild ARGS1( PUBLIC HTParentAnchor * HTAnchor_parent ARGS1( HTAnchor *, me) { - return me ? me->parent : NULL; + return( me ? me->parent : NULL); } PUBLIC void HTAnchor_setDocument ARGS2( @@ -745,20 +789,10 @@ PUBLIC void HTAnchor_setDocument ARGS2( PUBLIC HyperDoc * HTAnchor_document ARGS1( HTParentAnchor *, me) { - return me ? me->document : NULL; + return( me ? me->document : NULL); } -/* We don't want code to change an address after anchor creation... yet ? -PUBLIC void HTAnchor_setAddress ARGS2( - HTAnchor *, me, - char *, addr) -{ - if (me) - StrAllocCopy (me->parent->address, addr); -} -*/ - PUBLIC char * HTAnchor_address ARGS1( HTAnchor *, me) { @@ -778,7 +812,7 @@ PUBLIC char * HTAnchor_address ARGS1( me->parent->address, ((HTChildAnchor *)me)->tag); } } - return addr; + return(addr); } PUBLIC void HTAnchor_setFormat ARGS2( @@ -792,7 +826,7 @@ PUBLIC void HTAnchor_setFormat ARGS2( PUBLIC HTFormat HTAnchor_format ARGS1( HTParentAnchor *, me) { - return me ? me->format : NULL; + return( me ? me->format : NULL); } PUBLIC void HTAnchor_setIndex ARGS2( @@ -817,7 +851,7 @@ PUBLIC void HTAnchor_setPrompt ARGS2( PUBLIC BOOL HTAnchor_isIndex ARGS1( HTParentAnchor *, me) { - return me ? me->isIndex : NO; + return( me ? me->isIndex : NO); } /* Whether Anchor has been designated as an ISMAP link @@ -826,13 +860,13 @@ PUBLIC BOOL HTAnchor_isIndex ARGS1( PUBLIC BOOL HTAnchor_isISMAPScript ARGS1( HTAnchor *, me) { - return me ? me->parent->isISMAPScript : NO; + return( me ? me->parent->isISMAPScript : NO); } PUBLIC BOOL HTAnchor_hasChildren ARGS1( HTParentAnchor *, me) { - return me ? ! HTList_isEmpty(me->children) : NO; + return( me ? ! HTList_isEmpty(me->children) : NO); } #if defined(USE_HASH) @@ -841,7 +875,7 @@ PUBLIC BOOL HTAnchor_hasChildren ARGS1( PUBLIC CONST char * HTAnchor_style ARGS1( HTParentAnchor *, me) { - return me ? me->style : NULL; + return( me ? me->style : NULL); } PUBLIC void HTAnchor_setStyle ARGS2( @@ -860,7 +894,7 @@ PUBLIC void HTAnchor_setStyle ARGS2( PUBLIC CONST char * HTAnchor_title ARGS1( HTParentAnchor *, me) { - return me ? me->title : NULL; + return( me ? me->title : NULL); } PUBLIC void HTAnchor_setTitle ARGS2( @@ -870,11 +904,21 @@ PUBLIC void HTAnchor_setTitle ARGS2( int i; if (me) { - StrAllocCopy(me->title, title); - for (i = 0; me->title[i]; i++) { - if ((unsigned char)me->title[i] == 1 || - (unsigned char)me->title[i] == 2) { - me->title[i] = ' '; + if (title) { + StrAllocCopy(me->title, title); + for (i = 0; me->title[i]; i++) { + if ((unsigned char)me->title[i] == 1 || + (unsigned char)me->title[i] == 2) { + me->title[i] = ' '; + } + } + } else { + CTRACE(tfp,"HTAnchor_setTitle: New title is NULL! "); + if (me->title) { + CTRACE(tfp,"Old title was \"%s\".\n", me->title); + FREE(me->title); + } else { + CTRACE(tfp,"Old title was NULL.\n"); } } } @@ -902,7 +946,7 @@ PUBLIC void HTAnchor_appendTitle ARGS2( PUBLIC CONST char * HTAnchor_bookmark ARGS1( HTParentAnchor *, me) { - return me ? me->bookmark : NULL; + return( me ? me->bookmark : NULL); } PUBLIC void HTAnchor_setBookmark ARGS2( @@ -918,7 +962,7 @@ PUBLIC void HTAnchor_setBookmark ARGS2( PUBLIC CONST char * HTAnchor_owner ARGS1( HTParentAnchor *, me) { - return (me ? me->owner : NULL); + return( me ? me->owner : NULL); } PUBLIC void HTAnchor_setOwner ARGS2( @@ -935,7 +979,7 @@ PUBLIC void HTAnchor_setOwner ARGS2( PUBLIC CONST char * HTAnchor_RevTitle ARGS1( HTParentAnchor *, me) { - return (me ? me->RevTitle : NULL); + return( me ? me->RevTitle : NULL); } PUBLIC void HTAnchor_setRevTitle ARGS2( @@ -962,7 +1006,7 @@ PUBLIC void HTAnchor_setRevTitle ARGS2( PUBLIC CONST char * HTAnchor_SugFname ARGS1( HTParentAnchor *, me) { - return me ? me->SugFname : NULL; + return( me ? me->SugFname : NULL); } /* Content-Encoding handling. - FM @@ -972,7 +1016,7 @@ PUBLIC CONST char * HTAnchor_SugFname ARGS1( PUBLIC CONST char * HTAnchor_content_encoding ARGS1( HTParentAnchor *, me) { - return me ? me->content_encoding : NULL; + return( me ? me->content_encoding : NULL); } /* Content-Type handling. - FM @@ -980,7 +1024,7 @@ PUBLIC CONST char * HTAnchor_content_encoding ARGS1( PUBLIC CONST char * HTAnchor_content_type ARGS1( HTParentAnchor *, me) { - return me ? me->content_type : NULL; + return( me ? me->content_type : NULL); } /* Last-Modified header handling. - FM @@ -988,7 +1032,7 @@ PUBLIC CONST char * HTAnchor_content_type ARGS1( PUBLIC CONST char * HTAnchor_last_modified ARGS1( HTParentAnchor *, me) { - return me ? me->last_modified : NULL; + return( me ? me->last_modified : NULL); } /* Date header handling. - FM @@ -996,7 +1040,7 @@ PUBLIC CONST char * HTAnchor_last_modified ARGS1( PUBLIC CONST char * HTAnchor_date ARGS1( HTParentAnchor *, me) { - return me ? me->date : NULL; + return( me ? me->date : NULL); } /* Server header handling. - FM @@ -1004,7 +1048,7 @@ PUBLIC CONST char * HTAnchor_date ARGS1( PUBLIC CONST char * HTAnchor_server ARGS1( HTParentAnchor *, me) { - return me ? me->server : NULL; + return( me ? me->server : NULL); } /* Safe header handling. - FM @@ -1012,7 +1056,7 @@ PUBLIC CONST char * HTAnchor_server ARGS1( PUBLIC BOOL HTAnchor_safe ARGS1( HTParentAnchor *, me) { - return me ? me->safe : FALSE; + return( me ? me->safe : FALSE); } /* Content-Base header handling. - FM @@ -1020,7 +1064,7 @@ PUBLIC BOOL HTAnchor_safe ARGS1( PUBLIC CONST char * HTAnchor_content_base ARGS1( HTParentAnchor *, me) { - return me ? me->content_base : NULL; + return( me ? me->content_base : NULL); } /* Content-Location header handling. - FM @@ -1028,7 +1072,45 @@ PUBLIC CONST char * HTAnchor_content_base ARGS1( PUBLIC CONST char * HTAnchor_content_location ARGS1( HTParentAnchor *, me) { - return me ? me->content_location : NULL; + return( me ? me->content_location : NULL); +} + +/* Message-ID, used for mail replies - kw +*/ +PUBLIC CONST char * HTAnchor_messageID ARGS1( + HTParentAnchor *, me) +{ + return( me ? me->message_id : NULL); +} + +PUBLIC BOOL HTAnchor_setMessageID ARGS2( + HTParentAnchor *, me, + CONST char *, messageid) +{ + if (!(me && messageid && *messageid)) { + return FALSE; + } + StrAllocCopy(me->message_id, messageid); + return TRUE; +} + +/* Subject, used for mail replies - kw +*/ +PUBLIC CONST char * HTAnchor_subject ARGS1( + HTParentAnchor *, me) +{ + return( me ? me->subject : NULL); +} + +PUBLIC BOOL HTAnchor_setSubject ARGS2( + HTParentAnchor *, me, + CONST char *, subject) +{ + if (!(me && subject && *subject)) { + return FALSE; + } + StrAllocCopy(me->subject, subject); + return TRUE; } /* Link me Anchor to another given one @@ -1040,10 +1122,8 @@ PUBLIC BOOL HTAnchor_link ARGS3( HTLinkType *, type) { if (!(source && destination)) - return NO; /* Can't link to/from non-existing anchor */ - if (TRACE) - fprintf(stderr, - "Linking anchor %p to anchor %p\n", source, destination); + return(NO); /* Can't link to/from non-existing anchor */ + CTRACE(tfp, "Linking anchor %p to anchor %p\n", source, destination); if (!source->mainLink.dest) { source->mainLink.dest = destination; source->mainLink.type = type; @@ -1060,7 +1140,7 @@ PUBLIC BOOL HTAnchor_link ARGS3( if (!destination->parent->sources) destination->parent->sources = HTList_new(); HTList_addObject (destination->parent->sources, source); - return YES; /* Success */ + return(YES); /* Success */ } @@ -1070,7 +1150,7 @@ PUBLIC BOOL HTAnchor_link ARGS3( PUBLIC HTAnchor * HTAnchor_followMainLink ARGS1( HTAnchor *, me) { - return me->mainLink.dest; + return( me->mainLink.dest); } PUBLIC HTAnchor * HTAnchor_followTypedLink ARGS2( @@ -1078,17 +1158,17 @@ PUBLIC HTAnchor * HTAnchor_followTypedLink ARGS2( HTLinkType *, type) { if (me->mainLink.type == type) - return me->mainLink.dest; + return( me->mainLink.dest); if (me->links) { HTList *links = me->links; HTLink *the_link; while (NULL != (the_link=(HTLink *)HTList_nextObject(links))) { if (the_link->type == type) { - return the_link->dest; + return( the_link->dest); } } } - return NULL; /* No link of me type */ + return(NULL); /* No link of me type */ } @@ -1100,7 +1180,7 @@ PUBLIC BOOL HTAnchor_makeMainLink ARGS2( { /* Check that everything's OK */ if (!(me && HTList_removeObject (me->links, movingLink))) { - return NO; /* link not found or NULL anchor */ + return(NO); /* link not found or NULL anchor */ } else { /* First push current main link onto top of links list */ HTLink *newLink = (HTLink *)calloc (1, sizeof (HTLink)); @@ -1114,7 +1194,7 @@ PUBLIC BOOL HTAnchor_makeMainLink ARGS2( memcpy((void *)&me->mainLink, (CONST void *)movingLink, sizeof (HTLink)); FREE(movingLink); - return YES; + return(YES); } } @@ -1128,7 +1208,7 @@ PUBLIC HTList * HTAnchor_methods ARGS1( if (!me->methods) { me->methods = HTList_new(); } - return me->methods; + return( me->methods); } /* Protocol @@ -1137,7 +1217,7 @@ PUBLIC HTList * HTAnchor_methods ARGS1( PUBLIC void * HTAnchor_protocol ARGS1( HTParentAnchor *, me) { - return me->protocol; + return( me->protocol); } PUBLIC void HTAnchor_setProtocol ARGS2( @@ -1153,7 +1233,7 @@ PUBLIC void HTAnchor_setProtocol ARGS2( PUBLIC char * HTAnchor_physical ARGS1( HTParentAnchor *, me) { - return me->physical; + return( me->physical); } PUBLIC void HTAnchor_setPhysical ARGS2( @@ -1195,7 +1275,7 @@ PUBLIC LYUCcharset * HTAnchor_getUCInfoStage ARGS2( { if (me && !me->UCStages) { int i; - int chndl = UCLYhndl_for_unspec; + int chndl = UCLYhndl_for_unspec; /* always >= 0 */ UCAnchorInfo * stages = (UCAnchorInfo*)calloc(1, sizeof(UCAnchorInfo)); if (stages == NULL) @@ -1206,28 +1286,25 @@ PUBLIC LYUCcharset * HTAnchor_getUCInfoStage ARGS2( } if (me->charset) { chndl = UCGetLYhndl_byMIME(me->charset); - if (chndl < 0) { + if (chndl < 0) chndl = UCLYhndl_for_unrec; - } - } - if (chndl >= 0) { - memcpy(&stages->s[UCT_STAGE_MIME].C, &LYCharSet_UC[chndl], - sizeof(LYUCcharset)); - stages->s[UCT_STAGE_MIME].lock = UCT_SETBY_DEFAULT; - } else { - /* - * Should not happen... - */ - stages->s[UCT_STAGE_MIME].C.UChndl = -1; - stages->s[UCT_STAGE_MIME].lock = UCT_SETBY_NONE; + if (chndl < 0) + /* + ** UCLYhndl_for_unrec not defined :-( + ** fallback to UCLYhndl_for_unspec which always valid. + */ + chndl = UCLYhndl_for_unspec; /* always >= 0 */ } + memcpy(&stages->s[UCT_STAGE_MIME].C, &LYCharSet_UC[chndl], + sizeof(LYUCcharset)); + stages->s[UCT_STAGE_MIME].lock = UCT_SETBY_DEFAULT; stages->s[UCT_STAGE_MIME].LYhndl = chndl; me->UCStages = stages; } if (me) { - return &me->UCStages->s[which_stage].C; + return( &me->UCStages->s[which_stage].C); } - return NULL; + return(NULL); } PUBLIC int HTAnchor_getUCLYhndl ARGS2( @@ -1242,10 +1319,10 @@ PUBLIC int HTAnchor_getUCLYhndl ARGS2( (void) HTAnchor_getUCInfoStage(me, which_stage); } if (me->UCStages->s[which_stage].lock > UCT_SETBY_NONE) { - return me->UCStages->s[which_stage].LYhndl; + return( me->UCStages->s[which_stage].LYhndl); } } - return -1; + return( -1); } PUBLIC LYUCcharset * HTAnchor_setUCInfoStage ARGS4( @@ -1271,10 +1348,10 @@ PUBLIC LYUCcharset * HTAnchor_setUCInfoStage ARGS4( else { p->UChndl = -1; } - return p; + return(p); } } - return NULL; + return(NULL); } PUBLIC LYUCcharset * HTAnchor_resetUCInfoStage ARGS4( @@ -1284,10 +1361,10 @@ PUBLIC LYUCcharset * HTAnchor_resetUCInfoStage ARGS4( int, set_by) { if (!me || !me->UCStages) - return NULL; + return(NULL); me->UCStages->s[which_stage].lock = set_by; me->UCStages->s[which_stage].LYhndl = LYhndl; - return &me->UCStages->s[which_stage].C; + return( &me->UCStages->s[which_stage].C); } /* @@ -1318,8 +1395,8 @@ PUBLIC LYUCcharset * HTAnchor_copyUCInfoStage ARGS4( me->UCStages->s[from_stage].LYhndl; if (p_to != p_from) memcpy(p_to, p_from, sizeof(LYUCcharset)); - return p_to; + return(p_to); } } - return NULL; + return(NULL); } diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAnchor.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAnchor.h index e3847184045..cb47e52e32e 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAnchor.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAnchor.h @@ -12,41 +12,11 @@ #define HTANCHOR_H /* Version 0 (TBL) written in Objective-C for the NeXT browser */ -/* Version 1 of 24-Oct-1991 (JFG), written in C, browser-independant */ - -#include "HTList.h" -#include "HTAtom.h" -#include "UCDefs.h" - -#ifdef SHORT_NAMES -#define HTAnchor_findChild HTAnFiCh -#define HTAnchor_findChildAndLink HTAnFiLi -#define HTAnchor_findAddress HTAnFiAd -#define HTAnchor_delete HTAnDele -#define HTAnchor_makeLastChild HTAnMaLa -#define HTAnchor_parent HTAnPare -#define HTAnchor_setDocument HTAnSeDo -#define HTAnchor_document HTAnDocu -#define HTAnchor_setFormat HTAnSeFo -#define HTAnchor_format HTAnForm -#define HTAnchor_setIndex HTAnSeIn -#define HTAnchor_setPrompt HTAnSePr -#define HTAnchor_isIndex HTAnIsIn -#define HTAnchor_address HTAnAddr -#define HTAnchor_hasChildren HTAnHaCh -#define HTAnchor_title HTAnTitl -#define HTAnchor_setTitle HTAnSeTi -#define HTAnchor_appendTitle HTAnApTi -#define HTAnchor_link HTAnLink -#define HTAnchor_followMainLink HTAnFoMa -#define HTAnchor_followTypedLink HTAnFoTy -#define HTAnchor_makeMainLink HTAnMaMa -#define HTAnchor_setProtocol HTAnSePr -#define HTAnchor_protocol HTAnProt -#define HTAnchor_physical HTAnPhys -#define HTAnchor_setPhysical HTAnSePh -#define HTAnchor_methods HtAnMeth -#endif /* SHORT_NAMES */ +/* Version 1 of 24-Oct-1991 (JFG), written in C, browser-independent */ + +#include +#include +#include /* Main definition of anchor ** ========================= @@ -57,7 +27,7 @@ typedef struct _HTAnchor HTAnchor; typedef struct _HTParentAnchor HTParentAnchor; /* After definition of HTFormat: */ -#include "HTFormat.h" +#include typedef HTAtom HTLinkType; @@ -70,7 +40,7 @@ struct _HTAnchor { /* Generic anchor : just links */ HTLink mainLink; /* Main (or default) destination of this */ HTList * links; /* List of extra links from this, if any */ /* We separate the first link from the others to avoid too many small mallocs - involved by a list creation. Most anchors only point to one place. */ + involved by a list creation. Most anchors only point to one place. */ HTParentAnchor * parent; /* Parent of this anchor (self for adults) */ }; @@ -87,8 +57,8 @@ struct _HTParentAnchor { char * address; /* Absolute address of this node */ char * post_data; /* Posting data */ char * post_content_type; /* Type of post data */ - char * bookmark; /* Bookmark filname */ - HTFormat format; /* Pointer to node format descriptor */ + char * bookmark; /* Bookmark filename */ + HTFormat format; /* Pointer to node format descriptor */ char * charset; /* Pointer to character set (kludge, for now */ BOOL isIndex; /* Acceptance of a keyword search */ char * isIndexAction; /* URL of isIndex server */ @@ -105,7 +75,7 @@ struct _HTParentAnchor { char * physical; /* Physical address */ BOOL underway; /* Document about to be attached to it */ BOOL isISMAPScript; /* Script for clickable image map */ - BOOL isHEAD; /* Document is headers from a HEAD request */ + BOOL isHEAD; /* Document is headers from a HEAD request */ BOOL safe; /* Safe */ char * FileCache; /* Path to a disk-cached copy */ char * SugFname; /* Suggested filename */ @@ -115,14 +85,17 @@ struct _HTParentAnchor { char * content_language; /* Content-Language */ char * content_encoding; /* Compression algorithm */ char * content_base; /* Content-Base */ - char * content_disposition; /* Content-Dispositon */ + char * content_disposition; /* Content-Disposition */ char * content_location; /* Content-Location */ char * content_md5; /* Content-MD5 */ - int content_length; /* Content-Length */ + char * message_id; /* Message-ID */ + char * subject; /* Subject */ + int content_length; /* Content-Length */ char * date; /* Date */ char * expires; /* Expires */ char * last_modified; /* Last-Modified */ - char * server; /* Server */ + char * ETag; /* ETag (HTTP1.1 cache validator) */ + char * server; /* Server */ UCAnchorInfo *UCStages; /* chartrans stages */ HTList * imaps; /* client side image maps */ }; @@ -160,7 +133,7 @@ typedef struct _DocAddress { ** --------------------------------- ** ** This one is for a new anchor being edited into an existing -** document. The parent anchor must already exist. +** document. The parent anchor must already exist. */ extern HTChildAnchor * HTAnchor_findChild PARAMS(( HTParentAnchor * parent, @@ -174,10 +147,10 @@ extern HTChildAnchor * HTAnchor_findChild PARAMS(( ** (Code originally in ParseHTML.h) */ extern HTChildAnchor * HTAnchor_findChildAndLink PARAMS(( - HTParentAnchor * parent, /* May not be 0 */ - CONST char * tag, /* May be "" or 0 */ - CONST char * href, /* May be "" or 0 */ - HTLinkType * ltype)); /* May be 0 */ + HTParentAnchor * parent, /* May not be 0 */ + CONST char * tag, /* May be "" or 0 */ + CONST char * href, /* May be "" or 0 */ + HTLinkType * ltype)); /* May be 0 */ /* Create new or find old named anchor ** ----------------------------------- @@ -209,7 +182,7 @@ extern BOOL HTAnchor_delete PARAMS(( ** is put in the correct order as we load the document. */ extern void HTAnchor_makeLastChild PARAMS(( - HTChildAnchor * me)); + HTChildAnchor * me)); /* Data access functions ** --------------------- @@ -224,12 +197,6 @@ extern void HTAnchor_setDocument PARAMS(( extern HyperDoc * HTAnchor_document PARAMS(( HTParentAnchor * me)); -/* We don't want code to change an address after anchor creation... yet ? -extern void HTAnchor_setAddress PARAMS(( - HTAnchor * me, - char * addr)); -*/ - /* Returns the full URI of the anchor, child or parent ** as a malloc'd string to be freed by the caller. */ @@ -358,6 +325,24 @@ extern CONST char * HTAnchor_content_base PARAMS(( extern CONST char * HTAnchor_content_location PARAMS(( HTParentAnchor * me)); +/* Message-ID, used for mail replies - kw +*/ +extern CONST char * HTAnchor_messageID PARAMS(( + HTParentAnchor * me)); + +extern BOOL HTAnchor_setMessageID PARAMS(( + HTParentAnchor * me, + CONST char * messageid)); + +/* Subject, used for mail replies - kw +*/ +extern CONST char * HTAnchor_subject PARAMS(( + HTParentAnchor * me)); + +extern BOOL HTAnchor_setSubject PARAMS(( + HTParentAnchor * me, + CONST char * subject)); + /* Link this Anchor to another given one ** ------------------------------------- */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAssoc.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAssoc.c index e63c0213cb1..05b631cd7d9 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAssoc.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAssoc.c @@ -16,16 +16,11 @@ ** */ +#include -#include "HTUtils.h" +#include -#include - -#include "HTAAUtil.h" -#include "HTAssoc.h" -#include "HTString.h" - -#include "LYLeaks.h" +#include PUBLIC HTAssocList *HTAssocList_new NOARGS { @@ -66,8 +61,8 @@ PUBLIC void HTAssocList_add ARGS3(HTAssocList *, alist, if (value) StrAllocCopy(assoc->value, value); HTList_addObject(alist, (void*)assoc); - } else if (TRACE) { - fprintf(stderr, "HTAssoc_add: ERROR: assoc list NULL!!\n"); + } else { + CTRACE(tfp, "HTAssoc_add: ERROR: assoc list NULL!!\n"); } } diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAssoc.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAssoc.h index 71b0c9189c5..b08486dd0b7 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAssoc.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAssoc.h @@ -1,24 +1,13 @@ /* ASSOCIATION LIST FOR STORING NAME-VALUE PAIRS - - Lookups from assosiation list are not case-sensitive. - + + Lookups from association list are not case-sensitive. + */ #ifndef HTASSOC_H #define HTASSOC_H -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ -#include "HTList.h" - - -#ifdef SHORT_NAMES -#define HTAL_new HTAssocList_new -#define HTAL_del HTAssocList_delete -#define HTAL_add HTAssocList_add -#define HTAL_lup HTAssocList_lookup -#endif /*SHORT_NAMES*/ +#include typedef HTList HTAssocList; diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAtom.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAtom.c index 8fc95d16565..44ac6c7a2b0 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAtom.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAtom.c @@ -12,20 +12,16 @@ ** (c) Copyright CERN 1991 - See Copyright.html ** */ -#include "HTUtils.h" -#define HASH_SIZE 101 /* Tunable */ -#include "HTAtom.h" - -/*#include included by HTUtils.h -- FM *//* joe@athena, TBL 921019 */ -#include +#include -#include "HTList.h" +#define HASH_SIZE 101 /* Tunable */ +#include -#include "LYexit.h" -#include "LYLeaks.h" +#include -#define FREE(x) if (x) {free(x); x = NULL;} +#include +#include PRIVATE HTAtom * hash_table[HASH_SIZE]; PRIVATE BOOL initialised = NO; @@ -33,7 +29,9 @@ PRIVATE BOOL initialised = NO; /* * To free off all atoms. */ +#ifdef LY_FIND_LEAKS PRIVATE void free_atoms NOPARAMS; +#endif /* * Alternate hashing function. @@ -44,7 +42,7 @@ PUBLIC HTAtom * HTAtom_for ARGS1(CONST char *, string) { int hash; HTAtom * a; - + /* First time around, clear hash table */ /* @@ -56,23 +54,24 @@ PUBLIC HTAtom * HTAtom_for ARGS1(CONST char *, string) for (i = 0; i < HASH_SIZE; i++) hash_table[i] = (HTAtom *) 0; initialised = YES; +#ifdef LY_FIND_LEAKS atexit(free_atoms); +#endif } - + /* Generate hash function */ hash = HASH_FUNCTION(string); - + /* Search for the string in the list */ for (a = hash_table[hash]; a; a = a->next) { if (0 == strcasecomp(a->name, string)) { - /* if (TRACE) fprintf(stderr, - "HTAtom: Old atom %p for `%s'\n", a, string); */ + /* CTRACE(tfp, "HTAtom: Old atom %p for `%s'\n", a, string); */ return a; /* Found: return it */ } } - + /* Generate a new entry */ a = (HTAtom *)malloc(sizeof(*a)); @@ -85,12 +84,12 @@ PUBLIC HTAtom * HTAtom_for ARGS1(CONST char *, string) a->next = hash_table[hash]; /* Put onto the head of list */ hash_table[hash] = a; #ifdef NOT_DEFINED - if (TRACE) - fprintf(stderr, "HTAtom: New atom %p for `%s'\n", a, string); + CTRACE(tfp, "HTAtom: New atom %p for `%s'\n", a, string); #endif /* NOT_DEFINED */ return a; } +#ifdef LY_FIND_LEAKS /* * Purpose: Free off all atoms. * Arguments: void @@ -122,6 +121,7 @@ PRIVATE void free_atoms NOARGS } } } +#endif /* LY_FIND_LEAKS */ PRIVATE BOOL mime_match ARGS2(CONST char *, name, CONST char *, templ) @@ -147,7 +147,7 @@ PRIVATE BOOL mime_match ARGS2(CONST char *, name, } return NO; } - + PUBLIC HTList *HTAtom_templateMatches ARGS1(CONST char *, templ) { diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAtom.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAtom.h index b8dd10ec0b0..e948767d99f 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAtom.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAtom.h @@ -21,15 +21,7 @@ #ifndef HTATOM_H #define HTATOM_H -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ -#include "HTList.h" - -#ifdef SHORT_NAMES -#define HTAt_for HTAtom_for -#define HTAt_tMa HTAtom_templateMatches -#endif /*SHORT_NAMES*/ +#include typedef struct _HTAtom HTAtom; struct _HTAtom { diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAuth.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAuth.c deleted file mode 100644 index c3364db9fdf..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAuth.c +++ /dev/null @@ -1,210 +0,0 @@ - -/* MODULE HTAuth.c -** USER AUTHENTICATION -** -** AUTHORS: -** AL Ari Luotonen luotonen@dxcern.cern.ch -** -** HISTORY: -** AL 14.10.93 Fixed the colon-not-allowed-in-password-bug. -** -** BUGS: -** -** -*/ - -#include "HTUtils.h" -#include -#include "HTPasswd.h" /* Password file routines */ -#include "HTAssoc.h" -#include "HTAuth.h" /* Implemented here */ -#include "HTUU.h" /* Uuencoding and uudecoding */ - -#include "LYLeaks.h" - -/* PRIVATE decompose_auth_string() -** DECOMPOSE AUTHENTICATION STRING -** FOR BASIC OR PUBKEY SCHEME -** ON ENTRY: -** authstring is the authorization string received -** from browser. -** -** ON EXIT: -** returns a node representing the user information -** (as always, this is automatically freed -** by AA package). -*/ -PRIVATE HTAAUser *decompose_auth_string ARGS2(char *, authstring, - HTAAScheme, scheme) -{ - static HTAAUser *user = NULL; - static char *cleartext = NULL; - char *username = NULL; - char *password = NULL; - char *i_net_adr = NULL; - char *timestamp = NULL; - char *browsers_key = NULL; - - if (!user && !(user = (HTAAUser*)malloc(sizeof(HTAAUser)))) /* Allocated */ - outofmem(__FILE__, "decompose_auth_string"); /* only once */ - - user->scheme = scheme; - user->username = NULL; /* Not freed, because freeing */ - user->password = NULL; /* cleartext also frees these */ - user->inet_addr = NULL; /* See below: || */ - user->timestamp = NULL; /* || */ - user->secret_key = NULL; /* || */ - /* \/ */ - FREE(cleartext); /* From previous call. */ - /* NOTE: parts of this memory are pointed to by */ - /* pointers in HTAAUser structure. Therefore, */ - /* this also frees all the strings pointed to */ - /* by the static 'user'. */ - - if (!authstring || !*authstring || - scheme != HTAA_BASIC || scheme == HTAA_PUBKEY) - return NULL; - - if (scheme == HTAA_PUBKEY) { /* Decrypt authentication string */ - int bytes_decoded; - char *ciphertext; - int len = strlen(authstring) + 1; - - if (!(ciphertext = (char*)malloc(len)) || - !(cleartext = (char*)malloc(len))) - outofmem(__FILE__, "decompose_auth_string"); - - bytes_decoded = HTUU_decode(authstring, - (unsigned char *)ciphertext, len); - ciphertext[bytes_decoded] = (char)0; -#ifdef PUBKEY - HTPK_decrypt(ciphertext, cleartext, private_key); -#endif - FREE(ciphertext); - } - else { /* Just uudecode */ - int bytes_decoded; - int len = strlen(authstring) + 1; - - if (!(cleartext = (char*)malloc(len))) - outofmem(__FILE__, "decompose_auth_string"); - bytes_decoded = HTUU_decode(authstring, - (unsigned char *)cleartext, len); - cleartext[bytes_decoded] = (char)0; - } - - -/* -** Extract username and password (for both schemes) -*/ - username = cleartext; - if (!(password = strchr(cleartext, ':'))) { - if (TRACE) - fprintf(stderr, "%s %s\n", - "decompose_auth_string: password field", - "missing in authentication string.\n"); - return NULL; - } - *(password++) = '\0'; - -/* -** Extract rest of the fields -*/ - if (scheme == HTAA_PUBKEY) { - if ( !(i_net_adr =strchr(password, ':')) || - (*(i_net_adr++) ='\0'), !(timestamp =strchr(i_net_adr,':')) || - (*(timestamp++) ='\0'), !(browsers_key=strchr(timestamp,':')) || - (*(browsers_key++)='\0')) { - - if (TRACE) fprintf(stderr, "%s %s\n", - "decompose_auth_string: Pubkey scheme", - "fields missing in authentication string"); - return NULL; - } - } - -/* -** Set the fields into the result -*/ - user->username = username; - user->password = password; - user->inet_addr = i_net_adr; - user->timestamp = timestamp; - user->secret_key = browsers_key; - - if (TRACE) { - if (scheme==HTAA_BASIC) - fprintf(stderr, "decompose_auth_string: %s (%s,%s)\n", - "Basic scheme authentication string:", - username, password); - else - fprintf(stderr, "decompose_auth_string: %s (%s,%s,%s,%s,%s)\n", - "Pubkey scheme authentication string:", - username, password, i_net_adr, timestamp, browsers_key); - } - - return user; -} - - - -PRIVATE BOOL HTAA_checkTimeStamp ARGS1(CONST char *, timestamp) -{ - return NO; /* This is just a stub */ -} - - -PRIVATE BOOL HTAA_checkInetAddress ARGS1(CONST char *, i_net_adr) -{ - return NO; /* This is just a stub */ -} - - -/* SERVER PUBLIC HTAA_authenticate() -** AUTHENTICATE USER -** ON ENTRY: -** scheme used authentication scheme. -** scheme_specifics the scheme specific parameters -** (authentication string for Basic and -** Pubkey schemes). -** prot is the protection information structure -** for the file. -** -** ON EXIT: -** returns NULL, if authentication failed. -** Otherwise a pointer to a structure -** representing authenticated user, -** which should not be freed. -*/ -PUBLIC HTAAUser *HTAA_authenticate ARGS3(HTAAScheme, scheme, - char *, scheme_specifics, - HTAAProt *, prot) -{ - if (HTAA_UNKNOWN == scheme || !prot || - -1 == HTList_indexOf(prot->valid_schemes, (void*)scheme)) - return NULL; - - switch (scheme) { - case HTAA_BASIC: - case HTAA_PUBKEY: - { - HTAAUser *user = decompose_auth_string(scheme_specifics, scheme); - /* Remember, user is auto-freed */ - if (user && - HTAA_checkPassword(user->username, - user->password, - HTAssocList_lookup(prot->values, "passw")) && - (HTAA_BASIC == scheme || - (HTAA_checkTimeStamp(user->timestamp) && - HTAA_checkInetAddress(user->inet_addr)))) - return user; - else - return NULL; - } - break; - default: - /* Other authentication routines go here */ - return NULL; - } -} - diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAuth.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAuth.h deleted file mode 100644 index 6dc4c51616d..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAuth.h +++ /dev/null @@ -1,66 +0,0 @@ -/* AUTHENTICATION MODULE - - This is the authentication module. By modifying the function HTAA_authenticate() it can - be made to support external authentication methods. - - */ - -#ifndef HTAUTH_H -#define HTAUTH_H - -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ -#include "HTAAUtil.h" -#include "HTAAProt.h" - - -#ifdef SHORT_NAMES -#define HTAAauth HTAA_authenticate -#endif /* SHORT_NAMES */ - - -/* -** Server's representation of a user (fields in authentication string) -*/ -typedef struct { - HTAAScheme scheme; /* Scheme used to authenticate this user */ - char * username; - char * password; - char * inet_addr; - char * timestamp; - char * secret_key; -} HTAAUser; -/* - -User Authentication - - */ - -/* SERVER PUBLIC HTAA_authenticate() -** AUTHENTICATE USER -** ON ENTRY: -** scheme used authentication scheme. -** scheme_specifics the scheme specific parameters -** (authentication string for Basic and -** Pubkey schemes). -** prot is the protection information structure -** for the file. -** -** ON EXIT: -** returns NULL, if authentication failed. -** Otherwise a pointer to a structure -** representing authenticated user, -** which should not be freed. -*/ -PUBLIC HTAAUser *HTAA_authenticate PARAMS((HTAAScheme scheme, - char * scheme_specifics, - HTAAProt * prot)); -/* - - */ - -#endif /* not HTAUTH_H */ -/* - - End of file HTAuth.h. */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTBTree.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTBTree.c index 6515be77260..c545eb0e70f 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTBTree.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTBTree.c @@ -7,23 +7,19 @@ */ -#include "HTUtils.h" -#include "HTBTree.h" +#include +#include #ifndef __STRICT_BSD__ #include #endif -#include #define MAXIMUM(a,b) ((a)>(b)?(a):(b)) -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} - +#include PUBLIC HTBTree * HTBTree_new ARGS1(HTComparer, comp) /********************************************************* - ** This function returns an HTBTree with memory allocated + ** This function returns an HTBTree with memory allocated ** for it when given a mean to compare things */ { @@ -73,7 +69,7 @@ PRIVATE void HTBTElementAndObject_free ARGS1(HTBTElement*, element) if (element) { /* Just in case nothing was in the tree anyway */ if (element->left != NULL) HTBTElementAndObject_free(element->left); - if (element->right != NULL) + if (element->right != NULL) HTBTElementAndObject_free(element->right); FREE(element->object); FREE(element); @@ -110,12 +106,12 @@ PUBLIC void HTBTree_add ARGS2( int depth,depth2,corrections; /* father_of_element is a pointer to the structure that is the father of the ** new object "object". - ** added_element is a pointer to the structure that contains or will contain + ** added_element is a pointer to the structure that contains or will contain ** the new object "object". ** father_of_forefather and forefather_of_element are pointers that are used ** to modify the depths of upper elements, when needed. ** - ** father_found indicates by a value NO when the future father of "object" + ** father_found indicates by a value NO when the future father of "object" ** is found. ** top_found indicates by a value NO when, in case of a difference of depths ** < 2, the top of the tree is encountered and forbids any further try to @@ -146,24 +142,24 @@ PUBLIC void HTBTree_add ARGS2( tree->top->right_depth = 0; } else - { + { father_found = YES; father_of_element = tree->top; added_element = NULL; father_of_forefather = NULL; - forefather_of_element = NULL; + forefather_of_element = NULL; while (father_found) { if (tree->compare(object,father_of_element->object)<0) { if (father_of_element->left != NULL) father_of_element = father_of_element->left; - else + else { father_found = NO; - father_of_element->left = + father_of_element->left = (HTBTElement *)malloc(sizeof(HTBTElement)); - if (father_of_element->left==NULL) + if (father_of_element->left==NULL) outofmem(__FILE__, "HTBTree_add"); added_element = father_of_element->left; added_element->up = father_of_element; @@ -176,14 +172,14 @@ PUBLIC void HTBTree_add ARGS2( } if (tree->compare(object,father_of_element->object)>=0) { - if (father_of_element->right != NULL) + if (father_of_element->right != NULL) father_of_element = father_of_element->right; - else - { + else + { father_found = NO; - father_of_element->right = + father_of_element->right = (HTBTElement *)malloc(sizeof(HTBTElement)); - if (father_of_element->right==NULL) + if (father_of_element->right==NULL) outofmem(__FILE__, "HTBTree_add"); added_element = father_of_element->right; added_element->up = father_of_element; @@ -191,7 +187,7 @@ PUBLIC void HTBTree_add ARGS2( added_element->left = NULL; added_element->left_depth = 0; added_element->right = NULL; - added_element->right_depth = 0; + added_element->right_depth = 0; } } } @@ -205,7 +201,7 @@ PUBLIC void HTBTree_add ARGS2( if (father_of_forefather->left == forefather_of_element) { depth = father_of_forefather->left_depth; - father_of_forefather->left_depth = 1 + father_of_forefather->left_depth = 1 + MAXIMUM(forefather_of_element->right_depth, forefather_of_element->left_depth); depth2 = father_of_forefather->left_depth; @@ -221,7 +217,7 @@ PUBLIC void HTBTree_add ARGS2( forefather_of_element = father_of_forefather; father_of_forefather = father_of_forefather->up; } while ((depth != depth2) && (father_of_forefather != NULL)); - + /* @@ -234,7 +230,7 @@ PUBLIC void HTBTree_add ARGS2( if ((abs(father_of_element->left_depth - father_of_element->right_depth)) < 2) { - if (father_of_element->up != NULL) + if (father_of_element->up != NULL) father_of_element = father_of_element->up; else top_found = NO; } @@ -242,8 +238,8 @@ PUBLIC void HTBTree_add ARGS2( { /* We start the process of balancing */ corrections = corrections + 1; - /* - ** corrections is an integer used to avoid infinite + /* + ** corrections is an integer used to avoid infinite ** loops in cases such as: ** ** 3 3 @@ -251,22 +247,22 @@ PUBLIC void HTBTree_add ARGS2( ** 5 5 ** ** 3 is used to show that it need not be the top of the tree - ** But let's avoid these two exceptions anyhow + ** But let's avoid these two exceptions anyhow ** with the two following conditions (4 March 94 - AS) */ - if ((father_of_element->left == NULL) - && (father_of_element->right->right == NULL) - && (father_of_element->right->left->left == NULL) - && (father_of_element->right->left->right == NULL)) + if ((father_of_element->left == NULL) + && (father_of_element->right->right == NULL) + && (father_of_element->right->left->left == NULL) + && (father_of_element->right->left->right == NULL)) corrections = 7; - if ((father_of_element->right == NULL) - && (father_of_element->left->left == NULL) - && (father_of_element->left->right->right == NULL) + if ((father_of_element->right == NULL) + && (father_of_element->left->left == NULL) + && (father_of_element->left->right->right == NULL) && (father_of_element->left->right->left == NULL)) corrections = 7; - + if (father_of_element->left_depth > father_of_element->right_depth) { @@ -283,7 +279,7 @@ PUBLIC void HTBTree_add ARGS2( father_of_forefather = father_of_element->up; forefather_of_element = added_element; first_time = YES; - do + do { if (father_of_forefather->left == forefather_of_element->up) @@ -312,7 +308,7 @@ PUBLIC void HTBTree_add ARGS2( + MAXIMUM(forefather_of_element->left_depth, forefather_of_element->right_depth); first_time = NO; - } + } else father_of_forefather->right_depth = 1 + MAXIMUM(forefather_of_element->up->left_depth, @@ -321,7 +317,7 @@ PUBLIC void HTBTree_add ARGS2( } forefather_of_element = forefather_of_element->up; father_of_forefather = father_of_forefather->up; - } while ((depth != depth2) && + } while ((depth != depth2) && (father_of_forefather != NULL)); father_of_forefather = father_of_element->up; if (father_of_forefather->left == father_of_element) @@ -334,7 +330,7 @@ PUBLIC void HTBTree_add ARGS2( ** ** 3 is used to show that it may not be the top of the ** tree. - */ + */ father_of_forefather->left = added_element; father_of_element->left = added_element->right; added_element->right = father_of_element; @@ -364,7 +360,7 @@ PUBLIC void HTBTree_add ARGS2( ** When tree 2 3 becomes 4 1 ** 4 5 5 3 ** - ** 1 is used to show that it is the top of the tree + ** 1 is used to show that it is the top of the tree */ added_element->up = NULL; father_of_element->left = added_element->right; @@ -378,7 +374,7 @@ PUBLIC void HTBTree_add ARGS2( { added_element = father_of_element->right; father_of_element->right_depth = added_element->left_depth; - added_element->left_depth = 1 + + added_element->left_depth = 1 + MAXIMUM(father_of_element->right_depth, father_of_element->left_depth); if (father_of_element->up != NULL) @@ -389,9 +385,9 @@ PUBLIC void HTBTree_add ARGS2( father_of_forefather = father_of_element->up; forefather_of_element = added_element; first_time = YES; - do + do { - if (father_of_forefather->left + if (father_of_forefather->left == forefather_of_element->up) { depth = father_of_forefather->left_depth; @@ -426,7 +422,7 @@ PUBLIC void HTBTree_add ARGS2( } father_of_forefather = father_of_forefather->up; forefather_of_element = forefather_of_element->up; - } while ((depth != depth2) && + } while ((depth != depth2) && (father_of_forefather != NULL)); father_of_forefather = father_of_element->up; if (father_of_forefather->left == father_of_element) @@ -496,7 +492,7 @@ PUBLIC HTBTElement * HTBTree_next ARGS2( HTBTElement*, ele) /************************************************************************** ** this function returns a pointer to the leftmost element if ele is NULL, - ** and to the next object to the right otherways. + ** and to the next object to the right otherwise. ** If no elements left, returns a pointer to NULL. */ { @@ -522,7 +518,7 @@ PUBLIC HTBTElement * HTBTree_next ARGS2( else { father_of_forefather = father_of_element->up; - while (father_of_forefather && + while (father_of_forefather && (father_of_forefather->right == father_of_element)) { father_of_element = father_of_forefather; @@ -544,7 +540,7 @@ PUBLIC HTBTElement * HTBTree_next ARGS2( else printf("Pas de Pere\n"); if (father_of_element->left != NULL) printf("Objet du fils gauche = %s\t", - (char *)father_of_element->left->object); + (char *)father_of_element->left->object); else printf("Pas de fils gauche\t"); if (father_of_element->right != NULL) printf("Objet du fils droit = %s\n", @@ -567,7 +563,7 @@ main () { HTBTree * tree; HTBTElement * next_element; - + tree = HTBTree_new((HTComparer)strcasecomp); HTBTree_add(tree,"hypertext"); HTBTree_add(tree,"Addressing"); diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTBTree.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTBTree.h index 55bfe6aba26..d4b2ac08816 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTBTree.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTBTree.h @@ -1,24 +1,21 @@ /* /Net/dxcern/userd/timbl/hypertext/WWW/Library/Implementation/HTBTree.html BALANCED BINARY TREE FOR SORTING THINGS - + Tree creation, traversal and freeing. User-supplied comparison routine. - + Author: Arthur Secret, CERN. Public domain. Please mail bugs and changes to www-request@info.cern.ch - + part of libWWW - - */ -#ifdef SHORT_NAMES -#define HTBTree_new HTBTNew -#define HTBTree_free HTBTFree -#define HTBTreeAndObject_free HTBTAOFr -#define HTBTree_add HTBTAdd -#define HTBTree_next HTBTNext -/* #define HTBTree_object HTBTObje already a macro */ -#endif + */ +#ifndef HTBTREE_H +#define HTBTREE_H 1 +#ifndef HTUTILS_H +#include +#endif + /* Data structures @@ -90,15 +87,13 @@ Find user object for element Find next element in depth-first order ON ENTRY, - + ele if NULL, start with leftmost element. if != 0 give next object to the right. - + returns Pointer to element ot NULL if none left. - + */ extern HTBTElement * HTBTree_next PARAMS((HTBTree* tree, HTBTElement * ele)); -/* - - end */ +#endif /* HTBTREE_H */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTCJK.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTCJK.h index c5fa51afac5..8765461d4d9 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTCJK.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTCJK.h @@ -11,13 +11,17 @@ #ifndef HTCJK_H #define HTCJK_H +#ifndef HTUTILS_H +#include +#endif + /* ** STATUS CHANGE CODES */ #ifdef ESC #undef ESC #endif /* ESC */ -#define ESC '\033' +#define ESC CH_ESC /* S/390 -- gil -- 0098 */ #define TO_2BCODE '$' #define TO_1BCODE '(' @@ -96,15 +100,15 @@ extern unsigned char * EUC_TO_JIS PARAMS(( CONST char * toA)); extern unsigned char * TO_EUC PARAMS(( - unsigned char * jis, + CONST unsigned char * jis, unsigned char * euc)); extern void TO_SJIS PARAMS(( - unsigned char * any, + CONST unsigned char * any, unsigned char * sjis)); extern void TO_JIS PARAMS(( - unsigned char * any, + CONST unsigned char * any, unsigned char * jis)); #endif /* HTCJK_H */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTChunk.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTChunk.c index fd66a482324..0149dfffd69 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTChunk.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTChunk.c @@ -3,13 +3,10 @@ ** */ -#include "HTUtils.h" -#include "HTChunk.h" -/*#include included by HTUtils.h -- FM */ +#include +#include -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} +#include /* Create a chunk with a certain allocation unit ** -------------- @@ -73,6 +70,8 @@ PUBLIC void HTChunkFree ARGS1 (HTChunk *,ch) /* Append a character ** ------------------ */ +/* Warning: the code of this function is defined as macro in SGML.c. Change + the macro or undefine it in SGML.c when changing this function. -VH */ PUBLIC void HTChunkPutc ARGS2 (HTChunk *,ch, char,c) { if (ch->size >= ch->allocated) { diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTChunk.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTChunk.h index 37ef890c95f..e6cf19c8578 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTChunk.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTChunk.h @@ -1,46 +1,43 @@ -/* HTChunk: Flexible array handling for libwww - CHUNK HANDLING: - FLEXIBLE ARRAYS - - This module implements a flexible array. It is a general utility module. A chunk is a - structure which may be extended. These routines create and append data to chunks, - automatically reallocating them as necessary. - +/* HTChunk: Flexible array handling for libwww + * CHUNK HANDLING: + * FLEXIBLE ARRAYS + * + * This module implements a flexible array. It is a general utility module. A + * chunk is a structure which may be extended. These routines create and + * append data to chunks, automatically reallocating them as necessary. + * */ -#include "UCMap.h" +#ifndef HTCHUNK_H +#define HTCHUNK_H 1 + +#ifndef HTUTILS_H +#include +#endif + +#include typedef struct { - int size; /* In bytes */ - int growby; /* Allocation unit in bytes */ - int allocated; /* Current size of *data */ - char * data; /* Pointer to malloced area or 0 */ + int size; /* In bytes */ + int growby; /* Allocation unit in bytes */ + int allocated; /* Current size of *data */ + char * data; /* Pointer to malloced area or 0 */ } HTChunk; -#ifdef SHORT_NAMES -#define HTChunkClear HTChClea -#define HTChunkPutc HTChPutc -#define HTChunkPuts HTChPuts -#define HTChunkCreate HTChCrea -#define HTChunkTerminate HTChTerm -#define HTChunkEnsure HtChEnsu -#endif - - /* - -Create new chunk - - ON ENTRY, - - growby The number of bytes to allocate at a time when the chunk is - later extended. Arbitrary but normally a trade-off time vs. - memory - - ON EXIT, - - returns A chunk pointer to the new chunk, - + * + * Create new chunk + * + * ON ENTRY, + * + * growby The number of bytes to allocate at a time when the chunk + * is later extended. Arbitrary but normally a trade-off + * of time vs memory. + * + * ON EXIT, + * + * returns A chunk pointer to the new chunk, + * */ extern HTChunk * HTChunkCreate PARAMS((int growby)); @@ -53,72 +50,72 @@ extern HTChunk * HTChunkCreate2 PARAMS((int growby, size_t needed)); /* - -Free a chunk - - ON ENTRY, - - ch A valid chunk pointer made by HTChunkCreate() - - ON EXIT, - - ch is invalid and may not be used. - + * + * Free a chunk + * + * ON ENTRY, + * + * ch A valid chunk pointer made by HTChunkCreate() + * + * ON EXIT, + * + * ch is invalid and may not be used. + * */ extern void HTChunkFree PARAMS((HTChunk * ch)); /* - -Clear a chunk - - ON ENTRY, - - ch A valid chunk pointer made by HTChunkCreate() - - ON EXIT, - - *ch The size of the chunk is zero. - + * + * Clear a chunk + * + * ON ENTRY, + * + * ch A valid chunk pointer made by HTChunkCreate() + * + * ON EXIT, + * + * *ch The size of the chunk is zero. + * */ extern void HTChunkClear PARAMS((HTChunk * ch)); /* - -Ensure a chunk has a certain space in - - ON ENTRY, - - ch A valid chunk pointer made by HTChunkCreate() - - s The size required - - ON EXIT, - - *ch Has size at least s - + * + * Ensure a chunk has a certain space in + * + * ON ENTRY, + * + * ch A valid chunk pointer made by HTChunkCreate() + * + * s The size required + * + * ON EXIT, + * + * *ch Has size at least s + * */ extern void HTChunkEnsure PARAMS((HTChunk * ch, int s)); /* - -Append a character to a chunk - - ON ENTRY, - - ch A valid chunk pointer made by HTChunkCreate() - - c The character to be appended - - ON EXIT, - - *ch Is one character bigger - + * + * Append a character to a chunk + * + * ON ENTRY, + * + * ch A valid chunk pointer made by HTChunkCreate() + * + * c The character to be appended + * + * ON EXIT, + * + * *ch Is one character bigger + * */ extern void HTChunkPutc PARAMS((HTChunk * ch, char c)); @@ -127,45 +124,43 @@ extern void HTChunkPutb PARAMS((HTChunk * ch, CONST char *b, int l)); extern void HTChunkPutUtf8Char PARAMS((HTChunk * ch, UCode_t code)); /* -Append a string to a chunk - - ON ENTRY, - - ch A valid chunk pointer made by HTChunkCreate() - - str Tpoints to a zero-terminated string to be appended - - ON EXIT, - - *ch Is bigger by strlen(str) - + * Append a string to a chunk + * + * ON ENTRY, + * + * ch A valid chunk pointer made by HTChunkCreate() + * + * str Tpoints to a zero-terminated string to be appended + * + * ON EXIT, + * + * *ch Is bigger by strlen(str) + * */ -extern void HTChunkPuts PARAMS((HTChunk * ch, const char *str)); +extern void HTChunkPuts PARAMS((HTChunk * ch, CONST char *str)); /* - -Append a zero character to a chunk - + * + * Append a zero character to a chunk + * */ /* - - ON ENTRY, - - ch A valid chunk pointer made by HTChunkCreate() - - ON EXIT, - - *ch Is one character bigger - + * + * ON ENTRY, + * + * ch A valid chunk pointer made by HTChunkCreate() + * + * ON EXIT, + * + * *ch Is one character bigger + * */ extern void HTChunkTerminate PARAMS((HTChunk * ch)); -/* - - end */ +#endif /* HTCHUNK_H */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTDOS.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTDOS.c index 5e22915b1ed..8b8231f0f65 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTDOS.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTDOS.c @@ -2,9 +2,20 @@ */ -#include -#include +#include +#include +/* + * Make a copy of the source argument in the result, allowing some extra + * space so we can append directly onto the result without reallocating. + */ +PRIVATE char * copy_plus ARGS2(char **, result, char *, source) +{ + int length = strlen(source); + HTSprintf0(result, "%-*s", length+10, source); + (*result)[length] = 0; + return (*result); +} /* PUBLIC HTDOS_wwwName() ** CONVERTS DOS Name into WWW Name @@ -15,31 +26,26 @@ ** returns WWW file specification ** */ -char * HTDOS_wwwName (char *dosname) +char * HTDOS_wwwName ARGS1(char *, dosname) { - static char wwwname[1024]; - char *cp_url = wwwname; - - strcpy(wwwname,dosname); + static char *wwwname; + char *cp_url = copy_plus(&wwwname, dosname); - for ( ; *cp_url != '\0' ; cp_url++) - if(*cp_url == '\\') *cp_url = '/'; /* convert dos backslash to unix-style */ + for ( ; *cp_url != '\0' ; cp_url++) + if(*cp_url == '\\') + *cp_url = '/'; /* convert dos backslash to unix-style */ - if(strlen(wwwname) > 3 && *cp_url == '/') - *cp_url = '\0'; + if(strlen(wwwname) > 3 && *cp_url == '/') + *cp_url = '\0'; - if(*cp_url == ':') - { - cp_url++; - *cp_url = '/'; - } +#ifdef NOTUSED + if(*cp_url == ':') { + cp_url++; + *cp_url = '/'; /* terminate drive letter to survive */ + } +#endif -/* - if((strlen(wwwname)>2)&&(wwwname[1]==':')) wwwname[1]='|'; - printf("\n\nwww: %s\n\ndos: %s\n\n",wwwname,dosname); - sleep(5); -*/ - return(wwwname); + return(wwwname); } @@ -50,45 +56,29 @@ char * HTDOS_wwwName (char *dosname) ** ** ON EXIT: ** returns DOS file specification -** -** Bug(?): Returns pointer to input string, which is modified */ -char * HTDOS_name(char *wwwname) +char * HTDOS_name ARGS1(char *, wwwname) { - static char cp_url[1024]; - int joe; - - memset(cp_url, 0, 1023); - sprintf(cp_url, "%s",wwwname); - - for(joe = 0; cp_url[joe] != '\0'; joe++) { - if(cp_url[joe] == '/') { - cp_url[joe] = '\\'; - } - } + static char *cp_url; + char *result; + int joe; -/* if(strlen(cp_url) < 4) cp_url[] = ':'; - if(strlen(cp_url) == 3) cp_url[3] = '\\'; + copy_plus(&cp_url, wwwname); - if(strlen(cp_url) == 4) cp_url[4] = '.'; */ - - if((strlen(cp_url) > 2) && (cp_url[1] == '|')) - cp_url[1] = ':'; - - if((cp_url[1] == '\\') || (cp_url[0] != '\\')) - { -#if 0 - printf("\n\n%s = i%\n\n",cp_url,strlen(cp_url)); - sleep(5); -#endif - strcpy(wwwname, cp_url); - return(wwwname); /* return(cp_url); */ - } else { -#if 0 - printf("\n\n%s = %i\n\n",cp_url+1,strlen(cp_url)); - sleep(5); -#endif - strcpy(wwwname, cp_url+1); - return(wwwname); /* return(cp_url+1); */ + for (joe = 0; cp_url[joe] != '\0'; joe++) { + if (cp_url[joe] == '/') { + cp_url[joe] = '\\'; /* convert slashes to dos-style */ } + } + + /* pesky leading slash, rudiment from file://localhost/ */ + /* the rest of path may be with or without drive letter */ + if((cp_url[1] == '\\') || (cp_url[0] != '\\')) { + result = cp_url; + } else { + result = cp_url+1; + } + + CTRACE(tfp, "HTDOS_name changed `%s' to `%s'\n", wwwname, result); + return (result); } diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTDOS.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTDOS.h index d2a2e0beec1..37a613868e4 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTDOS.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTDOS.h @@ -3,6 +3,9 @@ #ifndef HTDOS_H #define HTDOS_H +#ifndef HTUTILS_H +#include +#endif /* HTUTILS_H */ /* PUBLIC HTDOS_wwwName() ** CONVERTS DOS Name into WWW Name @@ -13,7 +16,7 @@ ** returns WWW file specification ** */ -char * HTDOS_wwwName (char * dosname); +char * HTDOS_wwwName PARAMS((char * dosname)); /* PUBLIC HTDOS_name() @@ -26,7 +29,7 @@ char * HTDOS_wwwName (char * dosname); ** ** Bug: Returns pointer to static -- non-reentrant */ -char * HTDOS_name (char * wwwname); +char * HTDOS_name PARAMS((char * wwwname)); #endif /* HTDOS_H */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFTP.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFTP.c index 8c014f76e9f..5507254cf95 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFTP.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFTP.c @@ -13,15 +13,15 @@ ** It seems that an attempt by the server to connect to a port which has ** been used recently by a listen on the same socket, or by another ** socket this or another process causes a hangup of (almost exactly) -** one minute. Therefore, we have to use a rotating port number. +** one minute. Therefore, we have to use a rotating port number. ** The problem remains that if the application is run twice in quick ** succession, it will hang for what remains of a minute. ** ** Authors ** TBL Tim Berners-lee ** DD Denis DeLaRoca 310 825-4580 -** LM Lou Montulli -** FM Foteos Macrides +** LM Lou Montulli +** FM Foteos Macrides ** History: ** 2 May 91 Written TBL, as a part of the WorldWideWeb project. ** 15 Jan 92 Bug fix: close() was used for NETCLOSE for control soc @@ -29,14 +29,14 @@ ** 8 Dec 92 Bug fix 921208 TBL after DD ** 17 Dec 92 Anon FTP password now just WWWuser@ suggested by DD ** fails on princeton.edu! -** 27 Dec 93 (FM) Fixed up so FTP now works with VMS hosts. Path +** 27 Dec 93 (FM) Fixed up so FTP now works with VMS hosts. Path ** must be Unix-style and cannot include the device ** or top directory. -** ?? ??? ?? (LM) Added code to prompt and send passwords for non +** ?? ??? ?? (LM) Added code to prompt and send passwords for non ** anonymous FTP -** 25 Mar 94 (LM) Added code to recognize different ftp server types -** and code to parse dates and sizes on most hosts. -** 27 Mar 93 (FM) Added code for getting dates and sizes on VMS hosts. +** 25 Mar 94 (LM) Added code to recognize different ftp server types +** and code to parse dates and sizes on most hosts. +** 27 Mar 93 (FM) Added code for getting dates and sizes on VMS hosts. ** ** Options: ** LISTEN We listen, the other guy connects for data. @@ -44,8 +44,8 @@ ** internet address! ** ** Notes: -** Portions Copyright 1994 Trustees of Dartmouth College -** Code for recognizing different FTP servers and +** Portions Copyright 1994 Trustees of Dartmouth College +** Code for recognizing different FTP servers and ** parsing "ls -l" output taken from Macintosh Fetch ** program with permission from Jim Matthews, ** Dartmouth Software Development Team. @@ -61,12 +61,12 @@ #endif /* !NOPORT */ /* -BUGS: @@@ Limit connection cache size! +BUGS: @@@ Limit connection cache size! Error reporting to user. - 400 & 500 errors are acked by user with windows. + 400 & 500 errors are ack'ed by user with windows. Use configuration file for user names -** Note for portablility this version does not use select() and +** Note for portability this version does not use select() and ** so does not watch the control and data channels at the ** same time. */ @@ -75,12 +75,11 @@ BUGS: @@@ Limit connection cache size! #define u_long unsigned long #endif -#include "HTUtils.h" -#include "tcp.h" +#include -#include "HTAlert.h" +#include -#include "HTFTP.h" /* Implemented here */ +#include /* Implemented here */ /* this define should be in HTFont.h :( */ #define HT_NON_BREAK_SPACE ((char)1) /* For now */ @@ -99,23 +98,24 @@ BUGS: @@@ Limit connection cache size! #define INFINITY 512 -#include "HTParse.h" -#include "HTTCP.h" -#include "HTAnchor.h" -#include "HTFile.h" /* For HTFileFormat() */ -#include "HTBTree.h" -#include "HTChunk.h" -#include "HTAlert.h" +#include +#include +#include +#include /* For HTFileFormat() */ +#include +#include #ifndef IPPORT_FTP #define IPPORT_FTP 21 #endif /* !IPORT_FTP */ -#include "LYLeaks.h" +#include +#include +#include typedef struct _connection { - struct _connection * next; /* Link on list */ + struct _connection * next; /* Link on list */ u_long addr; /* IP address */ - int socket; /* Socket number for communication */ + int socket; /* Socket number for communication */ BOOL binary; /* Binary mode? */ } connection; @@ -125,7 +125,7 @@ typedef struct _connection { /* Hypertext object building machinery */ -#include "HTML.h" +#include #define PUTC(c) (*targetClass.put_character)(target, c) #define PUTS(s) (*targetClass.put_string)(target, s) @@ -138,15 +138,11 @@ struct _HTStructured { /* ... */ }; -#define FREE(x) if (x) {free(x); x = NULL;} - -extern int HTCheckForInterrupt NOPARAMS; - - /* Global Variables ** --------------------- */ -PUBLIC BOOLEAN HTfileSortMethod = FILE_BY_NAME; +PUBLIC int HTfileSortMethod = FILE_BY_NAME; +#ifndef DISABLE_FTP /*This disables everything to end-of-file */ PRIVATE char ThisYear[8]; PRIVATE char LastYear[8]; PRIVATE int TheDate; @@ -168,37 +164,37 @@ PRIVATE char *user_entered_password = NULL; PRIVATE char *last_username_and_host = NULL; #define GENERIC_SERVER 0 -#define MACHTEN_SERVER 1 -#define UNIX_SERVER 2 -#define VMS_SERVER 3 -#define CMS_SERVER 4 -#define DCTS_SERVER 5 +#define MACHTEN_SERVER 1 +#define UNIX_SERVER 2 +#define VMS_SERVER 3 +#define CMS_SERVER 4 +#define DCTS_SERVER 5 #define TCPC_SERVER 6 #define PETER_LEWIS_SERVER 7 #define NCSA_SERVER 8 #define WINDOWS_NT_SERVER 9 #define MS_WINDOWS_SERVER 10 -#define MSDOS_SERVER 11 +#define MSDOS_SERVER 11 #define APPLESHARE_SERVER 12 #define NETPRESENZ_SERVER 13 -PRIVATE int server_type = GENERIC_SERVER; /* the type of ftp host */ -PRIVATE int unsure_type = FALSE; /* sure about the type? */ +PRIVATE int server_type = GENERIC_SERVER; /* the type of ftp host */ +PRIVATE int unsure_type = FALSE; /* sure about the type? */ PRIVATE BOOLEAN use_list = FALSE; /* use the LIST command? */ PRIVATE int interrupted_in_next_data_char = FALSE; #ifdef POLL_PORTS -PRIVATE unsigned short port_number = FIRST_TCP_PORT; +PRIVATE unsigned short port_number = FIRST_TCP_PORT; #endif /* POLL_PORTS */ #ifdef LISTEN -PRIVATE int master_socket = -1; /* Listening socket = invalid */ +PRIVATE int master_socket = -1; /* Listening socket = invalid */ PRIVATE char port_command[255]; /* Command for setting the port */ -PRIVATE fd_set open_sockets; /* Mask of active channels */ -PRIVATE int num_sockets; /* Number of sockets to scan */ +PRIVATE fd_set open_sockets; /* Mask of active channels */ +PRIVATE int num_sockets; /* Number of sockets to scan */ #else -PRIVATE unsigned short passive_port; /* Port server specified for data */ +PRIVATE unsigned short passive_port; /* Port server specified for data */ #endif /* LISTEN */ @@ -213,6 +209,7 @@ PRIVATE int close_connection PARAMS(( connection * con)); +#ifdef LY_FIND_LEAKS /* ** This function frees module globals. - FM */ @@ -226,6 +223,7 @@ PRIVATE void free_FTPGlobals NOARGS FREE(control); } } +#endif /* LY_FIND_LEAKS */ /* PUBLIC HTMake_VMS_name() ** CONVERTS WWW name into a VMS name @@ -234,18 +232,18 @@ PRIVATE void free_FTPGlobals NOARGS ** fn WWW file name ** ** ON EXIT: -** returns vms file specification +** returns vms file specification ** -** Bug: Returns pointer to static -- non-reentrant +** Bug: Returns pointer to static -- non-reentrant */ PUBLIC char * HTMake_VMS_name ARGS2( CONST char *, nn, CONST char *, fn) { -/* We try converting the filename into Files-11 syntax. That is, we assume -** first that the file is, like us, on a VMS node. We try remote -** (or local) DECnet access. Files-11, VMS, VAX and DECnet +/* We try converting the filename into Files-11 syntax. That is, we assume +** first that the file is, like us, on a VMS node. We try remote +** (or local) DECnet access. Files-11, VMS, VAX and DECnet ** are trademarks of Digital Equipment Corporation. ** The node is assumed to be local if the hostname WITHOUT DOMAIN ** matches the local one. @@@ @@ -259,19 +257,20 @@ PUBLIC char * HTMake_VMS_name ARGS2( CONST char * hostname = HTHostName(); if (!filename || !nodename) - outofmem(__FILE__, "HTVMSname"); + outofmem(__FILE__, "HTVMSname"); strcpy(filename, fn); - strcpy(nodename, ""); /* On same node? Yes if node names match */ + strcpy(nodename, ""); /* On same node? Yes if node names match */ if (strncmp(nn, "localhost", 9)) { - CONST char *p; - char *q; - for (p = hostname, q = (char *)nn; + CONST char *p; + CONST char *q; + for (p = hostname, q = nn; *p && *p != '.' && *q && *q != '.'; p++, q++){ if (TOUPPER(*p) != TOUPPER(*q)) { - strcpy(nodename, nn); - q = strchr(nodename, '.'); /* Mismatch */ - if (q) - *q = '\0'; /* Chop domain */ + char *r; + strcpy(nodename, nn); + r = strchr(nodename, '.'); /* Mismatch */ + if (r) + *r = '\0'; /* Chop domain */ strcat(nodename, "::"); /* Try decnet anyway */ break; } @@ -287,7 +286,7 @@ PUBLIC char * HTMake_VMS_name ARGS2( *second = '\0'; /* Split filename from disk */ sprintf(vmsname, "%s%s:%s", nodename, filename+1, second+1); *second = '/'; /* restore */ - } else { /* More than two slashes */ + } else { /* More than two slashes */ char * p; *second = '\0'; /* Split disk from directories */ *last = '\0'; /* Split dir from filename */ @@ -296,7 +295,7 @@ PUBLIC char * HTMake_VMS_name ARGS2( *second = *last = '/'; /* restore filename */ for (p = strchr(vmsname, '['); *p!=']'; p++) if (*p == '/') - *p = '.'; /* Convert dir sep. to dots */ + *p = '.'; /* Convert dir sep. to dots */ } FREE(nodename); FREE(filename); @@ -306,25 +305,25 @@ PUBLIC char * HTMake_VMS_name ARGS2( /* Procedure: Read a character from the data connection ** ---------------------------------------------------- */ -PRIVATE char next_data_char NOARGS +PRIVATE int next_data_char NOARGS { int status; if (data_read_pointer >= data_write_pointer) { status = NETREAD(data_soc, data_buffer, DATA_BUFFER_SIZE); if (status == HT_INTERRUPTED) - interrupted_in_next_data_char = 1; + interrupted_in_next_data_char = 1; if (status <= 0) - return (char)-1; + return -1; data_write_pointer = data_buffer + status; data_read_pointer = data_buffer; } #ifdef NOT_ASCII { - char c = *data_read_pointer++; + char c = *data_read_pointer++; return FROMASCII(c); } #else - return *data_read_pointer++; + return (unsigned char)(*data_read_pointer++); #endif /* NOT_ASCII */ } @@ -338,7 +337,7 @@ PRIVATE int close_connection ARGS1( connection * scan; int status = NETCLOSE(con->socket); if (TRACE) { - fprintf(stderr, "HTFTP: Closing control socket %d\n", con->socket); + CTRACE(tfp, "HTFTP: Closing control socket %d\n", con->socket); #ifdef UNIX if (status != 0) perror("HTFTP:close_connection"); @@ -346,14 +345,14 @@ PRIVATE int close_connection ARGS1( } con->socket = -1; if (connections == con) { - connections = con->next; + connections = con->next; return status; } for (scan = connections; scan; scan = scan->next) { - if (scan->next == con) { + if (scan->next == con) { scan->next = con->next; /* Unlink */ if (control == con) - control = (connection*)0; + control = (connection*)0; return status; } /*if */ } /* for */ @@ -371,12 +370,11 @@ PRIVATE void help_message_cache_add ARGS1( char *, string) { if (help_message_buffer) - StrAllocCat(help_message_buffer, string); + StrAllocCat(help_message_buffer, string); else - StrAllocCopy(help_message_buffer, string); + StrAllocCopy(help_message_buffer, string); - if (TRACE) - fprintf(stderr,"Adding message to help cache: %s\n",string); + CTRACE(tfp,"Adding message to help cache: %s\n",string); } PRIVATE char *help_message_cache_non_empty NOARGS @@ -413,31 +411,27 @@ PRIVATE int response ARGS1( char *, cmd) { int result; /* Three-digit decimal code */ - int continuation_response = -1; + int continuation_response = -1; int status; if (!control) { - if (TRACE) - fprintf(stderr, "HTFTP: No control connection set up!!\n"); - return -99; + CTRACE(tfp, "HTFTP: No control connection set up!!\n"); + return -99; } if (cmd) { - if (TRACE) - fprintf(stderr, " Tx: %s", cmd); + CTRACE(tfp, " Tx: %s", cmd); #ifdef NOT_ASCII { char * p; for (p = cmd; *p; p++) { - *p = TOASCII(*p); + *p = TOASCII(*p); } } #endif /* NOT_ASCII */ status = NETWRITE(control->socket, cmd, (int)strlen(cmd)); if (status < 0) { - if (TRACE) - fprintf(stderr, - "HTFTP: Error %d sending command: closing socket %d\n", + CTRACE(tfp, "HTFTP: Error %d sending command: closing socket %d\n", status, control->socket); close_connection(control); return status; @@ -447,26 +441,23 @@ PRIVATE int response ARGS1( do { char *p = response_text; for (;;) { - if (((*p++ = NEXT_CHAR) == LF) + int ich = NEXT_CHAR; + if (((*p++ = ich) == LF) || (p == &response_text[LINE_LENGTH])) { char continuation; - if (interrupted_in_htgetcharacter) - { - if (TRACE) - fprintf (stderr, - "HTFTP: Interrupted in HTGetCharacter, apparently.\n"); - NETCLOSE (control->socket); - control->socket = -1; - return HT_INTERRUPTED; - } + if (interrupted_in_htgetcharacter) { + CTRACE (tfp, "HTFTP: Interrupted in HTGetCharacter, apparently.\n"); + NETCLOSE (control->socket); + control->socket = -1; + return HT_INTERRUPTED; + } *p = '\0'; /* Terminate the string */ - if (TRACE) - fprintf(stderr, " Rx: %s", response_text); + CTRACE(tfp, " Rx: %s", response_text); - /* Check for login or help messages */ + /* Check for login or help messages */ if (!strncmp(response_text,"230-",4) || !strncmp(response_text,"250-",4) || !strncmp(response_text,"220-",4)) @@ -476,47 +467,42 @@ PRIVATE int response ARGS1( if (continuation_response == -1) { if (continuation == '-') /* start continuation */ continuation_response = result; - } else { /* continuing */ + } else { /* continuing */ if (continuation_response == result && continuation == ' ') - continuation_response = -1; /* ended */ + continuation_response = -1; /* ended */ } break; } /* if end of line */ - if (interrupted_in_htgetcharacter) - { - if (TRACE) - fprintf (stderr, - "HTFTP: Interrupted in HTGetCharacter, apparently.\n"); - NETCLOSE (control->socket); - control->socket = -1; - return HT_INTERRUPTED; - } - - if (*(p-1) == (char) EOF) { - if (TRACE) - fprintf(stderr, "Error on rx: closing socket %d\n", - control->socket); + if (interrupted_in_htgetcharacter) { + CTRACE (tfp, "HTFTP: Interrupted in HTGetCharacter, apparently.\n"); + NETCLOSE (control->socket); + control->socket = -1; + return HT_INTERRUPTED; + } + + if (ich == EOF) { + CTRACE(tfp, "Error on rx: closing socket %d\n", + control->socket); strcpy(response_text, "000 *** TCP read error on response\n"); - close_connection(control); - return -1; /* End of file on response */ + close_connection(control); + return -1; /* End of file on response */ } } /* Loop over characters */ } while (continuation_response != -1); if (result == 421) { - if (TRACE) - fprintf(stderr, "HTFTP: They close so we close socket %d\n", - control->socket); + CTRACE(tfp, "HTFTP: They close so we close socket %d\n", + control->socket); close_connection(control); return -1; } if ((result == 255 && server_type == CMS_SERVER) && - (0 == strncasecomp(cmd, "CWD", 3) || + (0 == strncasecomp(cmd, "CWD", 3) || 0 == strcasecomp(cmd, "CDUP"))) { - /* + /* ** Alas, CMS returns 255 on failure to CWD to parent of root. - PG */ result = 555; @@ -524,12 +510,34 @@ PRIVATE int response ARGS1( return result/100; } +PRIVATE int send_cmd_1 ARGS1(char *, verb) +{ + char command[80]; + + sprintf(command, "%.*s%c%c", (int) sizeof(command)-4, verb, CR, LF); + return response (command); +} + +PRIVATE int send_cmd_2 ARGS2(char *, verb, char *, param) +{ + char *command = 0; + int status; + + HTSprintf0(&command, "%s %s%c%c", verb, param, CR, LF); + status = response (command); + FREE(command); + + return status; +} + +#define send_cwd(path) send_cmd_2("CWD", path) + /* * This function should try to set the macintosh server into binary mode. * Some servers need an additional letter after the MACB command. */ PRIVATE int set_mac_binary ARGS1( - int, ServerType) + int, ServerType) { /* try to set mac binary mode */ if (ServerType == APPLESHARE_SERVER || @@ -556,50 +564,45 @@ PRIVATE void get_ftp_pwd ARGS2( /* get the working directory (to see what it looks like) */ int status = response("PWD\r\n"); if (status < 0) { - return; + return; } else { cp = strchr(response_text+5,'"'); if (cp) *cp = '\0'; - if (*ServerType == TCPC_SERVER) { - *ServerType = ((response_text[5] == '/') ? - NCSA_SERVER : TCPC_SERVER); - if (TRACE) - fprintf(stderr, "HTFTP: Treating as %s server.\n", - ((*ServerType == NCSA_SERVER) ? - "NCSA" : "TCPC")); - } else if (response_text[5] == '/') { - /* path names beginning with / imply Unix, + if (*ServerType == TCPC_SERVER) { + *ServerType = ((response_text[5] == '/') ? + NCSA_SERVER : TCPC_SERVER); + CTRACE(tfp, "HTFTP: Treating as %s server.\n", + ((*ServerType == NCSA_SERVER) ? + "NCSA" : "TCPC")); + } else if (response_text[5] == '/') { + /* path names beginning with / imply Unix, * right? */ if (set_mac_binary(*ServerType)) { *ServerType = NCSA_SERVER; - if (TRACE) - fprintf(stderr, "HTFTP: Treating as NCSA server.\n"); + CTRACE(tfp, "HTFTP: Treating as NCSA server.\n"); } else { - *ServerType = UNIX_SERVER; - *UseList = TRUE; - if (TRACE) - fprintf(stderr, "HTFTP: Treating as Unix server.\n"); + *ServerType = UNIX_SERVER; + *UseList = TRUE; + CTRACE(tfp, "HTFTP: Treating as Unix server.\n"); } return; - } else if (response_text[strlen(response_text)-1] == ']') { - /* path names ending with ] imply VMS, right? */ - *ServerType = VMS_SERVER; + } else if (response_text[strlen(response_text)-1] == ']') { + /* path names ending with ] imply VMS, right? */ + *ServerType = VMS_SERVER; *UseList = TRUE; - if (TRACE) - fprintf(stderr, "HTFTP: Treating as VMS server.\n"); - } else { - *ServerType = GENERIC_SERVER; - if (TRACE) - fprintf(stderr, "HTFTP: Treating as Generic server.\n"); + CTRACE(tfp, "HTFTP: Treating as VMS server.\n"); + } else { + *ServerType = GENERIC_SERVER; + CTRACE(tfp, "HTFTP: Treating as Generic server.\n"); } - if ((*ServerType == NCSA_SERVER) || - (*ServerType == TCPC_SERVER) || - (*ServerType == PETER_LEWIS_SERVER) || - (*ServerType == NETPRESENZ_SERVER)) - set_mac_binary(*ServerType); + if ((*ServerType == NCSA_SERVER) || + (*ServerType == TCPC_SERVER) || + (*ServerType == PETER_LEWIS_SERVER) || + (*ServerType == NETPRESENZ_SERVER)) + set_mac_binary(*ServerType); } } @@ -609,7 +612,7 @@ PRIVATE void get_ftp_pwd ARGS2( ** On entry, ** arg points to the name of the host in a hypertext address ** On exit, -** returns <0 if error +** returns <0 if error ** socket number if success ** ** This routine takes care of managing timed-out connections, and @@ -623,7 +626,7 @@ PRIVATE int get_connection ARGS2( HTParentAnchor *, anchor) { int status; - char * command; + char * command = 0; connection * con; char * username = NULL; char * password = NULL; @@ -633,7 +636,9 @@ PRIVATE int get_connection ARGS2( /* ** Set up freeing at exit. - FM */ +#ifdef LY_FIND_LEAKS atexit(free_FTPGlobals); +#endif firstuse = FALSE; } @@ -680,15 +685,15 @@ PRIVATE int get_connection ARGS2( HTUnEscape(username); /* - * If the password doesn't exist then we are going to have - * to ask the user for it. The only problem is that we - * don't want to ask for it every time, so we will store - * away in a primitive fashion. + * If the password doesn't exist then we are going to have + * to ask the user for it. The only problem is that we + * don't want to ask for it every time, so we will store + * away in a primitive fashion. */ if (!password) { - char tmp[256]; + char *tmp = NULL; - sprintf(tmp, "%s@%s", username, p1); + HTSprintf0(&tmp, "%s@%s", username, p1); /* * If the user@host is not equal to the last time through * or user_entered_password has no data then we need @@ -699,13 +704,14 @@ PRIVATE int get_connection ARGS2( !user_entered_password) { StrAllocCopy(last_username_and_host, tmp); - sprintf(tmp, "Enter password for user %s@%s:", - username, p1); + HTSprintf0(&tmp, gettext("Enter password for user %s@%s:"), + username, p1); FREE(user_entered_password); - user_entered_password = (char *)HTPromptPassword(tmp); + user_entered_password = HTPromptPassword(tmp); } /* else we already know the password */ password = user_entered_password; + FREE(tmp); } } @@ -713,67 +719,58 @@ PRIVATE int get_connection ARGS2( FREE(p1); } /* scope of p1 */ - status = HTDoConnect (arg, "FTP", IPPORT_FTP, (int *)&con->socket); + status = HTDoConnect (arg, "FTP", IPPORT_FTP, (int *)&con->socket); - if (status < 0) - { - if (TRACE) - { - if (status == HT_INTERRUPTED) - fprintf (stderr, - "HTFTP: Interrupted on connect\n"); - else - fprintf(stderr, - "HTFTP: Unable to connect to remote host for `%s'.\n", - arg); - } - if (status == HT_INTERRUPTED) { - _HTProgress ("Connection interrupted."); - status = HT_NOT_LOADED; - } else { - HTAlert("Unable to connect to FTP host."); - } - if (con->socket != -1) - { - NETCLOSE(con->socket); - } - - FREE(username); - if (control == con) - control = NULL; - FREE(con); - return status; /* Bad return */ - } + if (status < 0) { + if (status == HT_INTERRUPTED) { + CTRACE (tfp, "HTFTP: Interrupted on connect\n"); + } else { + CTRACE(tfp, "HTFTP: Unable to connect to remote host for `%s'.\n", + arg); + } + if (status == HT_INTERRUPTED) { + _HTProgress (CONNECTION_INTERRUPTED); + status = HT_NOT_LOADED; + } else { + HTAlert(gettext("Unable to connect to FTP host.")); + } + if (con->socket != -1) + { + NETCLOSE(con->socket); + } - if (TRACE) { - fprintf(stderr, "FTP connected, socket %d control %ld\n", - con->socket, (long)con); + FREE(username); + if (control == con) + control = NULL; + FREE(con); + return status; /* Bad return */ } + + CTRACE(tfp, "FTP connected, socket %d control %ld\n", + con->socket, (long)con); control = con; /* Current control connection */ /* Initialise buffering for control connection */ HTInitInput(control->socket); - init_help_message_cache(); /* Clear the login message buffer. */ + init_help_message_cache(); /* Clear the login message buffer. */ /* Now we log in Look up username, prompt for pw. */ status = response((char *)0); /* Get greeting */ - if (status == HT_INTERRUPTED) - { - if (TRACE) - fprintf (stderr, - "HTFTP: Interrupted at beginning of login.\n"); - _HTProgress ("Connection interrupted."); - NETCLOSE(control->socket); - control->socket = -1; - return HT_INTERRUPTED; - } + if (status == HT_INTERRUPTED) { + CTRACE (tfp, "HTFTP: Interrupted at beginning of login.\n"); + _HTProgress (CONNECTION_INTERRUPTED); + NETCLOSE(control->socket); + control->socket = -1; + return HT_INTERRUPTED; + } server_type = GENERIC_SERVER; /* reset */ if (status == 2) { /* Send username */ char *cp; /* look at greeting text */ + /* don't gettext() this -- incoming text: */ if (strlen(response_text) > 4) { if ((cp = strstr(response_text, " awaits your command")) || (cp = strstr(response_text, " ready."))) { @@ -787,39 +784,24 @@ PRIVATE int get_connection ARGS2( } StrAllocCopy(anchor->server, cp); - if (username && *username) { - command = (char*)malloc(10+strlen(username)+2+1); - if (command == NULL) - outofmem(__FILE__, "get_connection"); - sprintf(command, "USER %s%c%c", username, CR, LF); - } else { - command = (char*)malloc(24); - if (command == NULL) - outofmem(__FILE__, "get_connection"); - sprintf(command, "USER anonymous%c%c", CR, LF); - } - status = response(command); - FREE(command); - if (status == HT_INTERRUPTED) - { - if (TRACE) - fprintf (stderr, - "HTFTP: Interrupted while sending username.\n"); - _HTProgress ("Connection interrupted."); - NETCLOSE(control->socket); - control->socket = -1; - return HT_INTERRUPTED; - } + status = send_cmd_2("USER", (username && *username) + ? username + : "anonymous"); + + if (status == HT_INTERRUPTED) { + CTRACE (tfp, "HTFTP: Interrupted while sending username.\n"); + _HTProgress (CONNECTION_INTERRUPTED); + NETCLOSE(control->socket); + control->socket = -1; + return HT_INTERRUPTED; + } } if (status == 3) { /* Send password */ if (password) { /* * We have non-zero length password, so send it. - FM */ - command = (char*)malloc(10+strlen(password)+2+1); - if (command == NULL) - outofmem(__FILE__, "get_connection"); - sprintf(command, "PASS %s%c%c", password, CR, LF); + HTSprintf0(&command, "PASS %s%c%c", password, CR, LF); } else { /* * Create and send a mail address as the password. - FM @@ -829,11 +811,11 @@ PRIVATE int get_connection ARGS2( char * cp; if (personal_mail_address && *personal_mail_address) { - /* + /* * We have a non-zero length personal * mail address, so use that. - FM */ - StrAllocCopy(user, personal_mail_address); + StrAllocCopy(user, personal_mail_address); if ((cp=strchr(user, '@')) != NULL) { *cp++ = '\0'; host = cp; @@ -841,7 +823,7 @@ PRIVATE int get_connection ARGS2( host = HTHostName(); } } else { - /* + /* * Use an environment variable and the host global. - FM */ if ((cp=getenv("USER")) != NULL) @@ -856,151 +838,123 @@ PRIVATE int get_connection ARGS2( * as ftp.uu.net prefers a blank to a bad name */ if (!(host) || strchr(host, '.') == NULL) - host = ""; + host = ""; - command = (char*)malloc(10+strlen(user)+1+strlen(host)+2+1); - if (command == NULL) - outofmem(__FILE__, "get_connection"); - sprintf(command, "PASS %s@%s%c%c", user, host, CR, LF); + HTSprintf0(&command, "PASS %s@%s%c%c", user, host, CR, LF); FREE(user); - } + } status = response(command); FREE(command); - if (status == HT_INTERRUPTED) - { - if (TRACE) - fprintf (stderr, - "HTFTP: Interrupted while sending password.\n"); - _HTProgress ("Connection interrupted."); - NETCLOSE(control->socket); - control->socket = -1; - return HT_INTERRUPTED; - } + if (status == HT_INTERRUPTED) { + CTRACE (tfp, + "HTFTP: Interrupted while sending password.\n"); + _HTProgress (CONNECTION_INTERRUPTED); + NETCLOSE(control->socket); + control->socket = -1; + return HT_INTERRUPTED; + } } FREE(username); if (status == 3) { - char temp[80]; - sprintf(temp, "ACCT noaccount%c%c", CR, LF); - status = response(temp); - if (status == HT_INTERRUPTED) - { - if (TRACE) - fprintf (stderr, - "HTFTP: Interrupted while sending password.\n"); - _HTProgress ("Connection interrupted."); - NETCLOSE(control->socket); - control->socket = -1; - return HT_INTERRUPTED; - } + status = send_cmd_1("ACCT noaccount"); + if (status == HT_INTERRUPTED) { + CTRACE (tfp, "HTFTP: Interrupted while sending password.\n"); + _HTProgress (CONNECTION_INTERRUPTED); + NETCLOSE(control->socket); + control->socket = -1; + return HT_INTERRUPTED; + } } if (status != 2) { - if (TRACE) - fprintf(stderr, "HTFTP: Login fail: %s", response_text); - /* if (control->socket > 0) close_connection(control->socket); */ - return -1; /* Bad return */ + CTRACE(tfp, "HTFTP: Login fail: %s", response_text); + /* if (control->socket > 0) close_connection(control->socket); */ + return -1; /* Bad return */ } - if (TRACE) fprintf(stderr, "HTFTP: Logged in.\n"); + CTRACE(tfp, "HTFTP: Logged in.\n"); /** Check for host type **/ if (server_type != NETPRESENZ_SERVER) server_type = GENERIC_SERVER; /* reset */ - use_list = FALSE; /* reset */ + use_list = FALSE; /* reset */ if ((status=response("SYST\r\n")) == 2) { - /* we got a line -- what kind of server are we talking to? */ - if (strncmp(response_text+4, - "UNIX Type: L8 MAC-OS MachTen", 28) == 0) { - server_type = MACHTEN_SERVER; + /* we got a line -- what kind of server are we talking to? */ + if (strncmp(response_text+4, + "UNIX Type: L8 MAC-OS MachTen", 28) == 0) { + server_type = MACHTEN_SERVER; use_list = TRUE; - if (TRACE) - fprintf(stderr, "HTFTP: Treating as MachTen server.\n"); + CTRACE(tfp, "HTFTP: Treating as MachTen server.\n"); - } else if (strstr(response_text+4, "UNIX") != NULL || + } else if (strstr(response_text+4, "UNIX") != NULL || strstr(response_text+4, "Unix") != NULL) { - server_type = UNIX_SERVER; + server_type = UNIX_SERVER; use_list = TRUE; - if (TRACE) - fprintf(stderr, "HTFTP: Treating as Unix server.\n"); + CTRACE(tfp, "HTFTP: Treating as Unix server.\n"); - } else if (strstr(response_text+4, "MSDOS") != NULL) { - server_type = MSDOS_SERVER; + } else if (strstr(response_text+4, "MSDOS") != NULL) { + server_type = MSDOS_SERVER; use_list = TRUE; - if (TRACE) - fprintf(stderr, - "HTFTP: Treating as MSDOS (Unix emulation) server.\n"); + CTRACE(tfp, "HTFTP: Treating as MSDOS (Unix emulation) server.\n"); - } else if (strncmp(response_text+4, "VMS", 3) == 0) { - server_type = VMS_SERVER; + } else if (strncmp(response_text+4, "VMS", 3) == 0) { + server_type = VMS_SERVER; use_list = TRUE; - if (TRACE) - fprintf(stderr, "HTFTP: Treating as VMS server.\n"); + CTRACE(tfp, "HTFTP: Treating as VMS server.\n"); } else if ((strncmp(response_text+4, "VM/CMS", 6) == 0) || - (strncmp(response_text+4, "VM ", 3) == 0)) { - server_type = CMS_SERVER; + (strncmp(response_text+4, "VM ", 3) == 0)) { + server_type = CMS_SERVER; use_list = TRUE; - if (TRACE) - fprintf(stderr, "HTFTP: Treating as CMS server.\n"); + CTRACE(tfp, "HTFTP: Treating as CMS server.\n"); } else if (strncmp(response_text+4, "DCTS", 4) == 0) { - server_type = DCTS_SERVER; - if (TRACE) - fprintf(stderr, "HTFTP: Treating as DCTS server.\n"); + server_type = DCTS_SERVER; + CTRACE(tfp, "HTFTP: Treating as DCTS server.\n"); } else if (strstr(response_text+4, "MAC-OS TCP/Connect II") != NULL) { - server_type = TCPC_SERVER; - if (TRACE) - fprintf(stderr, "HTFTP: Looks like a TCPC server.\n"); - get_ftp_pwd(&server_type, &use_list); + server_type = TCPC_SERVER; + CTRACE(tfp, "HTFTP: Looks like a TCPC server.\n"); + get_ftp_pwd(&server_type, &use_list); unsure_type = TRUE; - } else if (server_type == NETPRESENZ_SERVER) { /* already set above */ - use_list = TRUE; - set_mac_binary(server_type); - if (TRACE) - fprintf(stderr, - "HTFTP: Treating as NetPresenz (MACOS) server.\n"); - - } else if (strncmp(response_text+4, "MACOS Peter's Server", 20) == 0) { - server_type = PETER_LEWIS_SERVER; - use_list = TRUE; - set_mac_binary(server_type); - if (TRACE) - fprintf(stderr, - "HTFTP: Treating as Peter Lewis (MACOS) server.\n"); - - } else if (strncmp(response_text+4, "Windows_NT", 10) == 0) { + } else if (server_type == NETPRESENZ_SERVER) { /* already set above */ + use_list = TRUE; + set_mac_binary(server_type); + CTRACE(tfp, "HTFTP: Treating as NetPresenz (MACOS) server.\n"); + + } else if (strncmp(response_text+4, "MACOS Peter's Server", 20) == 0) { + server_type = PETER_LEWIS_SERVER; + use_list = TRUE; + set_mac_binary(server_type); + CTRACE(tfp, "HTFTP: Treating as Peter Lewis (MACOS) server.\n"); + + } else if (strncmp(response_text+4, "Windows_NT", 10) == 0) { server_type = WINDOWS_NT_SERVER; use_list = TRUE; - if (TRACE) - fprintf(stderr, "HTFTP: Treating as Window_NT server.\n"); + CTRACE(tfp, "HTFTP: Treating as Window_NT server.\n"); } else if (strncmp(response_text+4, "MS Windows", 10) == 0) { server_type = MS_WINDOWS_SERVER; use_list = TRUE; - if (TRACE) - fprintf(stderr, "HTFTP: Treating as MS Windows server.\n"); + CTRACE(tfp, "HTFTP: Treating as MS Windows server.\n"); - } else if (strncmp(response_text+4, + } else if (strncmp(response_text+4, "MACOS AppleShare IP FTP Server", 30) == 0) { - server_type = APPLESHARE_SERVER; - use_list = TRUE; - set_mac_binary(server_type); - if (TRACE) - fprintf(stderr, - "HTFTP: Treating as AppleShare server.\n"); - - } else { + server_type = APPLESHARE_SERVER; + use_list = TRUE; + set_mac_binary(server_type); + CTRACE(tfp, "HTFTP: Treating as AppleShare server.\n"); + + } else { server_type = GENERIC_SERVER; - if (TRACE) - fprintf(stderr, "HTFTP: Ugh! A Generic server.\n"); - get_ftp_pwd(&server_type, &use_list); + CTRACE(tfp, "HTFTP: Ugh! A Generic server.\n"); + get_ftp_pwd(&server_type, &use_list); unsure_type = TRUE; } } else { /* SYST fails :( try to get the type from the PWD command */ - get_ftp_pwd(&server_type, &use_list); + get_ftp_pwd(&server_type, &use_list); } /* Now we inform the server of the port number we will listen on @@ -1010,11 +964,10 @@ PRIVATE int get_connection ARGS2( int status = response(port_command); if (status != 2) { if (control->socket) - close_connection(control->socket); + close_connection(control->socket); return -status; /* Bad return */ } - if (TRACE) - fprintf(stderr, "HTFTP: Port defined.\n"); + CTRACE(tfp, "HTFTP: Port defined.\n"); } #endif /* NOTREPEAT_PORT */ return con->socket; /* Good return */ @@ -1031,15 +984,16 @@ PRIVATE int get_connection ARGS2( PRIVATE int close_master_socket NOARGS { int status; - FD_CLR(master_socket, &open_sockets); + + if (master_socket != -1) + FD_CLR(master_socket, &open_sockets); status = NETCLOSE(master_socket); - if (TRACE) - fprintf(stderr, "HTFTP: Closed master socket %d\n", master_socket); + CTRACE(tfp, "HTFTP: Closed master socket %d\n", master_socket); master_socket = -1; if (status < 0) - return HTInetStatus("close master socket"); + return HTInetStatus(gettext("close master socket")); else - return status; + return status; } @@ -1069,7 +1023,7 @@ PRIVATE int get_listen_socket NOARGS #ifndef REPEAT_LISTEN if (master_socket >= 0) - return master_socket; /* Done already */ + return master_socket; /* Done already */ #endif /* !REPEAT_LISTEN */ /* Create internet socket @@ -1077,10 +1031,9 @@ PRIVATE int get_listen_socket NOARGS new_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (new_socket < 0) - return HTInetStatus("socket for master socket"); + return HTInetStatus(gettext("socket for master socket")); - if (TRACE) - fprintf(stderr, "HTFTP: Opened master socket number %d\n", new_socket); + CTRACE(tfp, "HTFTP: Opened master socket number %d\n", new_socket); /* Search for a free port. */ @@ -1088,7 +1041,7 @@ PRIVATE int get_listen_socket NOARGS soc_in->sin_addr.s_addr = INADDR_ANY; /* Any peer address */ #ifdef POLL_PORTS { - unsigned short old_port_number = port_number; + unsigned short old_port_number = port_number; for (port_number = (old_port_number+1); ; port_number++) { int status; if (port_number > LAST_TCP_PORT) @@ -1099,7 +1052,7 @@ PRIVATE int get_listen_socket NOARGS soc_address.sin_port = htons(port_number); #ifdef SOCKS if (socks_flag) - if ((status=Rbind(new_socket, + if ((status=Rbind(new_socket, (struct sockaddr*)&soc_address, /* Cast to generic sockaddr */ sizeof(soc_address) @@ -1115,21 +1068,19 @@ PRIVATE int get_listen_socket NOARGS /* Cast to generic sockaddr */ sizeof(soc_address))) == 0) break; - if (TRACE) - fprintf(stderr, - "TCP bind attempt to port %d yields %d, errno=%d\n", + CTRACE(tfp, "TCP bind attempt to port %d yields %d, errno=%d\n", port_number, status, SOCKET_ERRNO); } /* for */ } #else { - int status; + int status; int address_length = sizeof(soc_address); #ifdef SOCKS if (socks_flag) status = Rgetsockname(control->socket, (struct sockaddr *)&soc_address, - (void *)&address_length); + (void *)&address_length); else #endif /* SOCKS */ status = getsockname(control->socket, @@ -1174,19 +1125,19 @@ PRIVATE int get_listen_socket NOARGS #endif /* POLL_PORTS */ CTRACE(tfp, "HTFTP: bound to port %d on %s\n", - (int)ntohs(soc_in->sin_port), + (int)ntohs(soc_in->sin_port), HTInetString(soc_in)); #ifdef REPEAT_LISTEN if (master_socket >= 0) - (void) close_master_socket(); + (void) close_master_socket(); #endif /* REPEAD_LISTEN */ master_socket = new_socket; /* Now we must find out who we are to tell the other guy */ - (void)HTHostName(); /* Make address valid - doesn't work*/ + (void)HTHostName(); /* Make address valid - doesn't work*/ sprintf(port_command, "PORT %d,%d,%d,%d,%d,%d%c%c", (int)*((unsigned char *)(&soc_in->sin_addr)+0), (int)*((unsigned char *)(&soc_in->sin_addr)+1), @@ -1203,7 +1154,7 @@ PRIVATE int get_listen_socket NOARGS int status; #ifdef SOCKS if (socks_flag) - status = Rlisten(master_socket, 1); + status = Rlisten(master_socket, 1); else #endif /* SOCKS */ status = listen(master_socket, 1); @@ -1215,7 +1166,7 @@ PRIVATE int get_listen_socket NOARGS CTRACE(tfp, "TCP: Master socket(), bind() and listen() all OK\n"); FD_SET(master_socket, &open_sockets); if ((master_socket+1) > num_sockets) - num_sockets = master_socket+1; + num_sockets = master_socket+1; return master_socket; /* Good */ @@ -1246,19 +1197,19 @@ PRIVATE void set_years_and_date NOARGS strncpy(day, (char *)ctime(&NowTime)+8, 2); day[2] = '\0'; if (day[0] == ' ') { - day[0] = '0'; + day[0] = '0'; } strncpy(month, (char *)ctime(&NowTime)+4, 3); strncpy(month, (char *)ctime(&NowTime)+4, 3); month[3] = '\0'; for (i = 0; i < 12; i++) { - if (!strcasecomp(month, months[i])) { + if (!strcasecomp(month, months[i])) { break; } } i++; sprintf(month, "%s%d", (i < 10 ? "0" : ""), i); - sprintf(date, "9999%s%s", month, day); + sprintf(date, "9999%.2s%.2s", month, day); TheDate = atoi(date); strcpy(ThisYear, (char *)ctime(&NowTime)+20); ThisYear[4] = '\0'; @@ -1267,38 +1218,38 @@ PRIVATE void set_years_and_date NOARGS } typedef struct _EntryInfo { - char * filename; - char * type; - char * date; + char * filename; + char * type; + char * date; unsigned int size; - BOOLEAN display; /* show this entry? */ + BOOLEAN display; /* show this entry? */ } EntryInfo; PRIVATE void free_entryinfo_struct_contents ARGS1( EntryInfo *, entry_info) { if (entry_info) { - FREE(entry_info->filename); - FREE(entry_info->type); - FREE(entry_info->date); + FREE(entry_info->filename); + FREE(entry_info->type); + FREE(entry_info->date); } /* dont free the struct */ } /* * is_ls_date() -- - * Return TRUE if s points to a string of the form: - * "Sep 1 1990 " or - * "Sep 11 11:59 " or - * "Dec 12 1989 " or - * "FCv 23 1990 " ... + * Return TRUE if s points to a string of the form: + * "Sep 1 1990 " or + * "Sep 11 11:59 " or + * "Dec 12 1989 " or + * "FCv 23 1990 " ... */ PRIVATE BOOLEAN is_ls_date ARGS1( char *, s) { /* must start with three alpha characters */ if (!isalpha(*s++) || !isalpha(*s++) || !isalpha(*s++)) - return FALSE; + return FALSE; /* space or HT_NON_BREAK_SPACE */ if (!(*s == ' ' || *s == HT_NON_BREAK_SPACE)) { @@ -1316,11 +1267,11 @@ PRIVATE BOOLEAN is_ls_date ARGS1( /* digit */ if (!isdigit(*s++)) - return FALSE; + return FALSE; /* space */ if (*s++ != ' ') - return FALSE; + return FALSE; /* space or digit */ if (!(*s == ' ' || isdigit(*s))) { @@ -1331,7 +1282,7 @@ PRIVATE BOOLEAN is_ls_date ARGS1( /* digit */ if (!isdigit(*s++)) - return FALSE; + return FALSE; /* colon or digit */ if (!(*s == ':' || isdigit(*s))) { @@ -1342,7 +1293,7 @@ PRIVATE BOOLEAN is_ls_date ARGS1( /* digit */ if (!isdigit(*s++)) - return FALSE; + return FALSE; /* space or digit */ if (!(*s == ' ' || isdigit(*s))) { @@ -1353,14 +1304,14 @@ PRIVATE BOOLEAN is_ls_date ARGS1( /* space */ if (*s++ != ' ') - return FALSE; + return FALSE; return TRUE; } /* is_ls_date() */ /* * parse_eplf_line() -- - * Extract the name, size, and date from an EPLF line. - 08-06-96 DJB + * Extract the name, size, and date from an EPLF line. - 08-06-96 DJB */ PRIVATE void parse_eplf_line ARGS2( char *, line, @@ -1383,12 +1334,12 @@ PRIVATE void parse_eplf_line ARGS2( } while (*cp) { - switch(*cp) { + switch(*cp) { case '\t': - StrAllocCopy(info->filename, cp + 1); + StrAllocCopy(info->filename, cp + 1); return; case 's': - size = 0; + size = 0; while (*(++cp) && (*cp != ',')) size = (size * 10) + (*cp - '0'); info->size = size; @@ -1403,7 +1354,7 @@ PRIVATE void parse_eplf_line ARGS2( StrAllocCopy(info->date, ct); break; case '/': - StrAllocCopy(info->type, "Directory"); + StrAllocCopy(info->type, ENTRY_IS_DIRECTORY); default: while (*cp) { if (*cp++ == ',') @@ -1416,7 +1367,7 @@ PRIVATE void parse_eplf_line ARGS2( /* * parse_ls_line() -- - * Extract the name, size, and date from an ls -l line. + * Extract the name, size, and date from an ls -l line. */ PRIVATE void parse_ls_line ARGS2( char *, line, @@ -1427,26 +1378,26 @@ PRIVATE void parse_ls_line ARGS2( int size_num=0; for (i = strlen(line) - 1; - (i > 13) && (!isspace(line[i]) || !is_ls_date(&line[i-12])); i--) - ; /* null body */ + (i > 13) && (!isspace(line[i]) || !is_ls_date(&line[i-12])); i--) + ; /* null body */ line[i] = '\0'; if (i > 13) { - StrAllocCopy(entry_info->date, &line[i-12]); + StrAllocCopy(entry_info->date, &line[i-12]); /* replace the 4th location with nbsp if it is a space or zero */ if (entry_info->date[4] == ' ' || entry_info->date[4] == '0') entry_info->date[4] = HT_NON_BREAK_SPACE; /* make sure year or time is flush right */ if (entry_info->date[11] == ' ') { for (j = 11; j > 6; j--) { - entry_info->date[j] = entry_info->date[j-1]; + entry_info->date[j] = entry_info->date[j-1]; } } } j = i - 14; while (isdigit(line[j])) { - size_num += (line[j] - '0') * base; - base *= 10; - j--; + size_num += (line[j] - '0') * base; + base *= 10; + j--; } entry_info->size = size_num; StrAllocCopy(entry_info->filename, &line[i + 1]); @@ -1454,21 +1405,22 @@ PRIVATE void parse_ls_line ARGS2( /* * parse_vms_dir_entry() - * Format the name, date, and size from a VMS LIST line - * into the EntryInfo structure - FM + * Format the name, date, and size from a VMS LIST line + * into the EntryInfo structure - FM */ PRIVATE void parse_vms_dir_entry ARGS2( char *, line, EntryInfo *, entry_info) { - int i, j, ialloc; + int i, j; + unsigned int ialloc; char *cp, *cpd, *cps, date[16], *sp = " "; /** Get rid of blank lines, and information lines. **/ /** Valid lines have the ';' version number token. **/ - if (!strlen(line) || (cp=strchr(line, ';')) == NULL) { - entry_info->display = FALSE; - return; + if (!strlen(line) || (cp = strchr(line, ';')) == NULL) { + entry_info->display = FALSE; + return; } /** Cut out file or directory name at VMS version number. **/ @@ -1477,61 +1429,60 @@ PRIVATE void parse_vms_dir_entry ARGS2( /** Cast VMS non-README file and directory names to lowercase. **/ if (strstr(entry_info->filename, "READ") == NULL) { - for (i = 0; entry_info->filename[i]; i++) - entry_info->filename[i] = TOLOWER(entry_info->filename[i]); + LYLowerCase(entry_info->filename); + i = strlen(entry_info->filename); } else { - i = ((strstr(entry_info->filename, "READ") - entry_info->filename) + 4); - if (!strncmp((char *)&entry_info->filename[i], "ME", 2)) { + i = ((strstr(entry_info->filename, "READ") - entry_info->filename) + 4); + if (!strncmp(&entry_info->filename[i], "ME", 2)) { i += 2; while (entry_info->filename[i] && entry_info->filename[i] != '.') { - i++; + i++; } - } else if (!strncmp((char *)&entry_info->filename[i], ".ME", 3)) { + } else if (!strncmp(&entry_info->filename[i], ".ME", 3)) { i = strlen(entry_info->filename); } else { i = 0; } - for (; entry_info->filename[i]; i++) - entry_info->filename[i] = TOLOWER(entry_info->filename[i]); + LYLowerCase(entry_info->filename + i); } /** Uppercase terminal .z's or _z's. **/ if ((--i > 2) && - entry_info->filename[i] == 'z' && - (entry_info->filename[i-1] == '.' || - entry_info->filename[i-1] == '_')) - entry_info->filename[i] = 'Z'; + entry_info->filename[i] == 'z' && + (entry_info->filename[i-1] == '.' || + entry_info->filename[i-1] == '_')) + entry_info->filename[i] = 'Z'; /** Convert any tabs in rest of line to spaces. **/ cps = cp-1; while ((cps=strchr(cps+1, '\t')) != NULL) - *cps = ' '; + *cps = ' '; /** Collapse serial spaces. **/ i = 0; j = 1; cps = cp; while (cps[j] != '\0') { - if (cps[i] == ' ' && cps[j] == ' ') - j++; - else - cps[++i] = cps[j++]; + if (cps[i] == ' ' && cps[j] == ' ') + j++; + else + cps[++i] = cps[j++]; } cps[++i] = '\0'; /* Set the years and date, if we don't have them yet. **/ if (!HaveYears) { - set_years_and_date(); + set_years_and_date(); } /** Track down the date. **/ if ((cpd=strchr(cp, '-')) != NULL && - strlen(cpd) > 9 && isdigit(*(cpd-1)) && - isalpha(*(cpd+1)) && *(cpd+4) == '-') { + strlen(cpd) > 9 && isdigit(*(cpd-1)) && + isalpha(*(cpd+1)) && *(cpd+4) == '-') { - /** Month **/ - *(cpd+4) = '\0'; - *(cpd+2) = TOLOWER(*(cpd+2)); - *(cpd+3) = TOLOWER(*(cpd+3)); + /** Month **/ + *(cpd+4) = '\0'; + *(cpd+2) = TOLOWER(*(cpd+2)); + *(cpd+3) = TOLOWER(*(cpd+3)); sprintf(date, "%s ", cpd+1); *(cpd+4) = '-'; @@ -1555,55 +1506,54 @@ PRIVATE void parse_vms_dir_entry ARGS2( *(cpd+9) = ' '; } - StrAllocCopy(entry_info->date, date); + StrAllocCopy(entry_info->date, date); } /** Track down the size **/ if ((cpd=strchr(cp, '/')) != NULL) { - /* Appears be in used/allocated format */ - cps = cpd; - while (isdigit(*(cps-1))) - cps--; - if (cps < cpd) - *cpd = '\0'; - entry_info->size = atoi(cps); - cps = cpd+1; - while (isdigit(*cps)) - cps++; - *cps = '\0'; - ialloc = atoi(cpd+1); - /* Check if used is in blocks or bytes */ - if (entry_info->size <= ialloc) - entry_info->size *= 512; + /* Appears be in used/allocated format */ + cps = cpd; + while (isdigit(*(cps-1))) + cps--; + if (cps < cpd) + *cpd = '\0'; + entry_info->size = atoi(cps); + cps = cpd+1; + while (isdigit(*cps)) + cps++; + *cps = '\0'; + ialloc = atoi(cpd+1); + /* Check if used is in blocks or bytes */ + if (entry_info->size <= ialloc) + entry_info->size *= 512; } else if ((cps=strtok(cp, sp)) != NULL) { - /* We just initialized on the version number */ - /* Now let's hunt for a lone, size number */ - while ((cps=strtok(NULL, sp)) != NULL) { - cpd = cps; - while (isdigit(*cpd)) - cpd++; - if (*cpd == '\0') { - /* Assume it's blocks */ - entry_info->size = atoi(cps) * 512; - break; - } - } + /* We just initialized on the version number */ + /* Now let's hunt for a lone, size number */ + while ((cps=strtok(NULL, sp)) != NULL) { + cpd = cps; + while (isdigit(*cpd)) + cpd++; + if (*cpd == '\0') { + /* Assume it's blocks */ + entry_info->size = atoi(cps) * 512; + break; + } + } } /** Wrap it up **/ - if (TRACE) - fprintf(stderr, "HTFTP: VMS filename: %s date: %s size: %d\n", - entry_info->filename, - entry_info->date ? entry_info->date : "", - entry_info->size); + CTRACE(tfp, "HTFTP: VMS filename: %s date: %s size: %d\n", + entry_info->filename, + entry_info->date ? entry_info->date : "", + entry_info->size); return; } /* parse_vms_dir_entry() */ /* * parse_ms_windows_dir_entry() -- - * Format the name, date, and size from an MS_WINDOWS LIST line into - * the EntryInfo structure (assumes Chameleon NEWT format). - FM + * Format the name, date, and size from an MS_WINDOWS LIST line into + * the EntryInfo structure (assumes Chameleon NEWT format). - FM */ PRIVATE void parse_ms_windows_dir_entry ARGS2( char *, line, @@ -1614,33 +1564,27 @@ PRIVATE void parse_ms_windows_dir_entry ARGS2( char *end = line + strlen(line); /** Get rid of blank or junk lines. **/ - while (*cp && isspace(*cp)) - cp++; + cp = LYSkipBlanks(cp); if (!(*cp)) { - entry_info->display = FALSE; - return; + entry_info->display = FALSE; + return; } /** Cut out file or directory name. **/ - cps = cp; - while (*cps && !isspace(*cps)) - cps++; + cps = LYSkipNonBlanks(cp); *cps++ ='\0'; cpd = cps; StrAllocCopy(entry_info->filename, cp); /** Track down the size **/ if (cps < end) { - while (*cps && isspace(*cps)) - cps++; - cpd = cps; - while (*cpd && !isspace(*cpd)) - cpd++; + cps = LYSkipBlanks(cps); + cpd = LYSkipNonBlanks(cps); *cpd++ = '\0'; if (isdigit(*cps)) { entry_info->size = atoi(cps); } else { - StrAllocCopy(entry_info->type, "Directory"); + StrAllocCopy(entry_info->type, ENTRY_IS_DIRECTORY); } } else { StrAllocCopy(entry_info->type, ""); @@ -1653,19 +1597,18 @@ PRIVATE void parse_ms_windows_dir_entry ARGS2( /** Track down the date. **/ if (cpd < end) { - while (*cpd && isspace(*cpd)) - cpd++; + cpd = LYSkipBlanks(cpd); if (strlen(cpd) > 17) { *(cpd+6) = '\0'; /* Month and Day */ *(cpd+11) = '\0'; /* Year */ *(cpd+17) = '\0'; /* Time */ if (strcmp(ThisYear, cpd+7)) - /* Not this year, so show the year */ - sprintf(date, "%s %s", cpd, (cpd+7)); + /* Not this year, so show the year */ + sprintf(date, "%s %s", cpd, (cpd+7)); else - /* Is this year, so show the time */ - sprintf(date, "%s %s", cpd, (cpd+12)); - StrAllocCopy(entry_info->date, date); + /* Is this year, so show the time */ + sprintf(date, "%s %s", cpd, (cpd+12)); + StrAllocCopy(entry_info->date, date); if (entry_info->date[4] == ' '|| entry_info->date[4] == '0') { entry_info->date[4] = HT_NON_BREAK_SPACE; } @@ -1673,18 +1616,17 @@ PRIVATE void parse_ms_windows_dir_entry ARGS2( } /** Wrap it up **/ - if (TRACE) - fprintf(stderr, "HTFTP: MS Windows filename: %s date: %s size: %d\n", - entry_info->filename, - entry_info->date ? entry_info->date : "", - entry_info->size); + CTRACE(tfp, "HTFTP: MS Windows filename: %s date: %s size: %d\n", + entry_info->filename, + entry_info->date ? entry_info->date : "", + entry_info->size); return; } /* parse_ms_windows_dir_entry */ /* * parse_windows_nt_dir_entry() -- - * Format the name, date, and size from a WINDOWS_NT LIST line into - * the EntryInfo structure (assumes Chameleon NEWT format). - FM + * Format the name, date, and size from a WINDOWS_NT LIST line into + * the EntryInfo structure (assumes Chameleon NEWT format). - FM */ #ifdef NOTDEFINED PRIVATE void parse_windows_nt_dir_entry ARGS2( @@ -1697,22 +1639,19 @@ PRIVATE void parse_windows_nt_dir_entry ARGS2( int i; /** Get rid of blank or junk lines. **/ - while (*cp && isspace(*cp)) - cp++; + cp = LYSkipBlanks(cp); if (!(*cp)) { - entry_info->display = FALSE; - return; + entry_info->display = FALSE; + return; } /** Cut out file or directory name. **/ cpd = cp; - cps = (end-1); - while (cps >= cpd && !isspace(*cps)) - cps--; + cps = LYSkipNonBlanks(end-1); cp = (cps+1); if (!strcmp(cp, ".") || !strcmp(cp, "..")) { - entry_info->display = FALSE; - return; + entry_info->display = FALSE; + return; } StrAllocCopy(entry_info->filename, cp); if (cps < cpd) @@ -1727,22 +1666,18 @@ PRIVATE void parse_windows_nt_dir_entry ARGS2( /** Cut out the date. **/ cp = cps = cpd; - while (*cps && !isspace(*cps)) - cps++; + cps = LYSkipNonBlanks(cps); *cps++ ='\0'; if (cps > end) { - entry_info->display = FALSE; - return; + entry_info->display = FALSE; + return; } - while (*cps && isspace(*cps)) - cps++; - cpd = cps; - while (*cps && !isspace(*cps)) - cps++; + cps = LYSkipBlanks(cps); + cpd = LYSkipNonBlanks(cps); *cps++ ='\0'; if (cps > end || cpd == cps || strlen(cpd) < 7) { - entry_info->display = FALSE; - return; + entry_info->display = FALSE; + return; } if (strlen(cp) == 8 && isdigit(*cp) && isdigit(*(cp+1)) && *(cp+2) == '-' && @@ -1757,9 +1692,9 @@ PRIVATE void parse_windows_nt_dir_entry ARGS2( if (strcmp((ThisYear+2), cp)) { /* Not this year, so show the year */ if (atoi(cp) < 70) { - sprintf((char *)&date[6], " 20%s", cp); + sprintf(&date[6], " 20%s", cp); } else { - sprintf((char *)&date[6], " 19%s", cp); + sprintf(&date[6], " 19%s", cp); } } else { /* Is this year, so show the time */ @@ -1768,10 +1703,10 @@ PRIVATE void parse_windows_nt_dir_entry ARGS2( if (*(cpd+5) == 'P' || *(cpd+5) == 'p') i += 12; *(cpd+5) = '\0'; - sprintf((char*)&date[6], " %s%d:%s", + sprintf(&date[6], " %s%d:%s", (i < 10 ? "0" : ""), i, (cpd+3)); } - StrAllocCopy(entry_info->date, date); + StrAllocCopy(entry_info->date, date); if (entry_info->date[4] == ' '|| entry_info->date[4] == '0') { entry_info->date[4] = HT_NON_BREAK_SPACE; } @@ -1779,35 +1714,31 @@ PRIVATE void parse_windows_nt_dir_entry ARGS2( /** Track down the size **/ if (cps < end) { - while (*cps && isspace(*cps)) - cps++; - cpd = cps; - while (*cpd && !isspace(*cpd)) - cpd++; + cps = LYSkipBlanks(cps); + cpd = LYSkipNonBlanks(cps); *cpd = '\0'; if (isdigit(*cps)) { entry_info->size = atoi(cps); } else { - StrAllocCopy(entry_info->type, "Directory"); + StrAllocCopy(entry_info->type, ENTRY_IS_DIRECTORY); } } else { StrAllocCopy(entry_info->type, ""); } /** Wrap it up **/ - if (TRACE) - fprintf(stderr, "HTFTP: Windows NT filename: %s date: %s size: %d\n", - entry_info->filename, - entry_info->date ? entry_info->date : "", - entry_info->size); + CTRACE(tfp, "HTFTP: Windows NT filename: %s date: %s size: %d\n", + entry_info->filename, + entry_info->date ? entry_info->date : "", + entry_info->size); return; } /* parse_windows_nt_dir_entry */ #endif /* NOTDEFINED */ /* * parse_cms_dir_entry() -- - * Format the name, date, and size from a VM/CMS line into - * the EntryInfo structure. - FM + * Format the name, date, and size from a VM/CMS line into + * the EntryInfo structure. - FM */ PRIVATE void parse_cms_dir_entry ARGS2( char *, line, @@ -1821,54 +1752,44 @@ PRIVATE void parse_cms_dir_entry ARGS2( int i; /** Get rid of blank or junk lines. **/ - while (*cp && isspace(*cp)) - cp++; + cp = LYSkipBlanks(cp); if (!(*cp)) { - entry_info->display = FALSE; - return; + entry_info->display = FALSE; + return; } /** Cut out file or directory name. **/ - cps = cp; - while (*cps && !isspace(*cps)) - cps++; + cps = LYSkipNonBlanks(cp); *cps++ ='\0'; StrAllocCopy(entry_info->filename, cp); if (strchr(entry_info->filename, '.') != NULL) /** If we already have a dot, we did an NLST. **/ - return; - cp = cps; - while (*cp && isspace(*cp)) - cp++; + return; + cp = LYSkipBlanks(cps); if (!(*cp)) { - /** If we don't have more, we've misparsed. **/ - FREE(entry_info->filename); - FREE(entry_info->type); - entry_info->display = FALSE; - return; + /** If we don't have more, we've misparsed. **/ + FREE(entry_info->filename); + FREE(entry_info->type); + entry_info->display = FALSE; + return; } - cps = cp; - while (*cps && !isspace(*cps)) - cps++; + cps = LYSkipNonBlanks(cp); *cps++ ='\0'; if ((0 == strcasecomp(cp, "DIR")) && (cp - line) > 17) { - /** It's an SFS directory. **/ - StrAllocCopy(entry_info->type, "Directory"); - entry_info->size = 0; + /** It's an SFS directory. **/ + StrAllocCopy(entry_info->type, ENTRY_IS_DIRECTORY); + entry_info->size = 0; } else { - /** It's a file. **/ - cp--; + /** It's a file. **/ + cp--; *cp = '.'; StrAllocCat(entry_info->filename, cp); - /** Track down the VM/CMS RECFM or type. **/ + /** Track down the VM/CMS RECFM or type. **/ cp = cps; if (cp < end) { - while (*cp && isspace(*cp)) - cp++; - cps = cp; - while (*cps && !isspace(*cps)) - cps++; + cp = LYSkipBlanks(cp); + cps = LYSkipNonBlanks(cp); *cps++ = '\0'; /** Check cp here, if it's relevant someday. **/ } @@ -1877,11 +1798,8 @@ PRIVATE void parse_cms_dir_entry ARGS2( /** Track down the record length or dash. **/ cp = cps; if (cp < end) { - while (*cp && isspace(*cp)) - cp++; - cps = cp; - while (*cps && !isspace(*cps)) - cps++; + cp = LYSkipBlanks(cp); + cps = LYSkipNonBlanks(cp); *cps++ = '\0'; if (isdigit(*cp)) { RecordLength = atoi(cp); @@ -1891,11 +1809,8 @@ PRIVATE void parse_cms_dir_entry ARGS2( /** Track down the number of records or the dash. **/ cp = cps; if (cps < end) { - while (*cp && isspace(*cp)) - cp++; - cps = cp; - while (*cps && !isspace(*cps)) - cps++; + cp = LYSkipBlanks(cp); + cps = LYSkipNonBlanks(cp); *cps++ = '\0'; if (isdigit(*cp)) { Records = atoi(cp); @@ -1914,8 +1829,8 @@ PRIVATE void parse_cms_dir_entry ARGS2( /** Track down the date. **/ cpd = cps; if (((cps < end) && - (cps = strchr(cpd, ':')) != NULL) && - (cps < (end - 3) && + (cps = strchr(cpd, ':')) != NULL) && + (cps < (end - 3) && isdigit(*(cps+1)) && isdigit(*(cps+2)) && *(cps+3) == ':')) { cps += 3; *cps = '\0'; @@ -1926,24 +1841,24 @@ PRIVATE void parse_cms_dir_entry ARGS2( *(cpd+8) = '\0'; /* Year */ cps -= 5; /* Time */ if (*cpd == ' ') - *cpd = '0'; + *cpd = '0'; i = atoi(cpd) - 1; sprintf(date, "%s %s", months[i], (cpd+3)); if (date[4] == '0') date[4] = ' '; cpd += 6; /* Year */ if (strcmp((ThisYear+2), cpd)) { - /* Not this year, so show the year. */ + /* Not this year, so show the year. */ if (atoi(cpd) < 70) { - sprintf((char *)&date[6], " 20%s", cpd); + sprintf(&date[6], " 20%s", cpd); } else { - sprintf((char *)&date[6], " 19%s", cpd); + sprintf(&date[6], " 19%s", cpd); } } else { - /* Is this year, so show the time. */ + /* Is this year, so show the time. */ *(cps+2) = '\0'; /* Hour */ i = atoi(cps); - sprintf((char*)&date[6], " %s%d:%s", + sprintf(&date[6], " %s%d:%s", (i < 10 ? "0" : ""), i, (cps+3)); } StrAllocCopy(entry_info->date, date); @@ -1954,20 +1869,19 @@ PRIVATE void parse_cms_dir_entry ARGS2( } /** Wrap it up. **/ - if (TRACE) - fprintf(stderr, "HTFTP: VM/CMS filename: %s date: %s size: %d\n", - entry_info->filename, - entry_info->date ? entry_info->date : "", - entry_info->size); + CTRACE(tfp, "HTFTP: VM/CMS filename: %s date: %s size: %d\n", + entry_info->filename, + entry_info->date ? entry_info->date : "", + entry_info->size); return; } /* parse_cms_dir_entry */ /* * parse_dir_entry() - * Given a line of LIST/NLST output in entry, return results - * and a file/dir name in entry_info struct + * Given a line of LIST/NLST output in entry, return results + * and a file/dir name in entry_info struct * - * If first is true, this is the first name in a directory. + * If first is true, this is the first name in a directory. */ PRIVATE EntryInfo * parse_dir_entry ARGS2( @@ -1981,6 +1895,8 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2( char *cp; entry_info = (EntryInfo *)malloc(sizeof(EntryInfo)); + if (entry_info == NULL) + outofmem(__FILE__, "parse_dir_entry"); entry_info->filename = NULL; entry_info->type = NULL; entry_info->date = NULL; @@ -1988,125 +1904,126 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2( entry_info->display = TRUE; switch (server_type) { - case UNIX_SERVER: - case PETER_LEWIS_SERVER: - case MACHTEN_SERVER: + case UNIX_SERVER: + case PETER_LEWIS_SERVER: + case MACHTEN_SERVER: case MSDOS_SERVER: - case WINDOWS_NT_SERVER: - case APPLESHARE_SERVER: - case NETPRESENZ_SERVER: + case WINDOWS_NT_SERVER: + case APPLESHARE_SERVER: + case NETPRESENZ_SERVER: /* - ** Check for EPLF output (local times). + ** Check for EPLF output (local times). */ if (*entry == '+') { parse_eplf_line(entry, entry_info); break; } - /* - ** Interpret and edit LIST output from Unix server. + /* + ** Interpret and edit LIST output from Unix server. */ - len = strlen(entry); + len = strlen(entry); if (*first) { + /* don't gettext() this -- incoming text: */ if (!strcmp(entry, "can not access directory .")) { /* - * Don't reset *first, nothing real will follow. - KW + * Don't reset *first, nothing real will follow. - KW */ entry_info->display = FALSE; return(entry_info); } - *first = FALSE; - if (!strncmp(entry, "total ", 6) || - strstr(entry, "not available") != NULL) { - entry_info->display=FALSE; + *first = FALSE; + if (!strncmp(entry, "total ", 6) || + strstr(entry, "not available") != NULL) { + entry_info->display = FALSE; return(entry_info); } else if (unsure_type) { - /* this isn't really a unix server! */ - server_type = GENERIC_SERVER; - entry_info->display=FALSE; + /* this isn't really a unix server! */ + server_type = GENERIC_SERVER; + entry_info->display = FALSE; return(entry_info); } } - /* - ** Check first character of ls -l output. + /* + ** Check first character of ls -l output. */ - if (TOUPPER(entry[0]) == 'D') { - /* + if (TOUPPER(entry[0]) == 'D') { + /* ** It's a directory. */ - StrAllocCopy(entry_info->type, "Directory"); - remove_size=TRUE; /* size is not useful */ + StrAllocCopy(entry_info->type, ENTRY_IS_DIRECTORY); + remove_size=TRUE; /* size is not useful */ } else if (entry[0] == 'l') { - /* + /* ** It's a symbolic link, does the user care about - ** knowing if it is symbolic? I think so since + ** knowing if it is symbolic? I think so since ** it might be a directory. */ - StrAllocCopy(entry_info->type, "Symbolic Link"); + StrAllocCopy(entry_info->type, gettext("Symbolic Link")); remove_size=TRUE; /* size is not useful */ - /* + /* ** Strip off " -> pathname". */ - for (i = len - 1; (i > 3) && - (!isspace(entry[i]) || - (entry[i-1] != '>') || + for (i = len - 1; (i > 3) && + (!isspace(entry[i]) || + (entry[i-1] != '>') || (entry[i-2] != '-') || (entry[i-3] != ' ')); i--) - ; /* null body */ - if (i > 3) { - entry[i-3] = '\0'; - len = i - 3; - } - } /* link */ + ; /* null body */ + if (i > 3) { + entry[i-3] = '\0'; + len = i - 3; + } + } /* link */ parse_ls_line(entry, entry_info); if (!strcmp(entry_info->filename,"..") || - !strcmp(entry_info->filename,".")) - entry_info->display=FALSE; + !strcmp(entry_info->filename,".")) + entry_info->display = FALSE; /* - ** Goto the bottom and get real type. + ** Goto the bottom and get real type. */ - break; + break; - case VMS_SERVER: - /* - ** Interpret and edit LIST output from VMS server - ** and convert information lines to zero length. + case VMS_SERVER: + /* + ** Interpret and edit LIST output from VMS server + ** and convert information lines to zero length. */ parse_vms_dir_entry(entry, entry_info); - /* - ** Get rid of any junk lines. + /* + ** Get rid of any junk lines. */ if (!entry_info->display) return(entry_info); /* - ** Trim off VMS directory extensions. + ** Trim off VMS directory extensions. */ len = strlen(entry_info->filename); - if ((len > 4) && !strcmp(&entry_info->filename[len-4], ".dir")) { + if ((len > 4) && !strcmp(&entry_info->filename[len-4], ".dir")) { entry_info->filename[len-4] = '\0'; - StrAllocCopy(entry_info->type, "Directory"); + StrAllocCopy(entry_info->type, ENTRY_IS_DIRECTORY); remove_size=TRUE; /* size is not useful */ } /* - ** Goto the bottom and get real type. + ** Goto the bottom and get real type. */ - break; + break; - case MS_WINDOWS_SERVER: - /* - ** Interpret and edit LIST output from MS_WINDOWS server - ** and convert information lines to zero length. + case MS_WINDOWS_SERVER: + /* + ** Interpret and edit LIST output from MS_WINDOWS server + ** and convert information lines to zero length. */ parse_ms_windows_dir_entry(entry, entry_info); - /* - ** Get rid of any junk lines. + /* + ** Get rid of any junk lines. */ if (!entry_info->display) return(entry_info); @@ -2115,20 +2032,20 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2( return(entry_info); } /* - ** Goto the bottom and get real type. + ** Goto the bottom and get real type. */ break; #ifdef NOTDEFINED - case WINDOWS_NT_SERVER: - /* - ** Interpret and edit LIST output from MS_WINDOWS server - ** and convert information lines to zero length. + case WINDOWS_NT_SERVER: + /* + ** Interpret and edit LIST output from MS_WINDOWS server + ** and convert information lines to zero length. */ parse_windows_nt_dir_entry(entry, entry_info); - /* - ** Get rid of any junk lines. + /* + ** Get rid of any junk lines. */ if (!entry_info->display) return(entry_info); @@ -2137,21 +2054,21 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2( return(entry_info); } /* - ** Goto the bottom and get real type. + ** Goto the bottom and get real type. */ break; #endif /* NOTDEFINED */ - case CMS_SERVER: + case CMS_SERVER: { - /* - ** Interpret and edit LIST output from VM/CMS server - ** and convert any information lines to zero length. + /* + ** Interpret and edit LIST output from VM/CMS server + ** and convert any information lines to zero length. */ parse_cms_dir_entry(entry, entry_info); - /* - ** Get rid of any junk lines. + /* + ** Get rid of any junk lines. */ if (!entry_info->display) return(entry_info); @@ -2160,39 +2077,38 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2( return(entry_info); } /* - ** Goto the bottom and get real type. + ** Goto the bottom and get real type. */ break; } - case NCSA_SERVER: - case TCPC_SERVER: - /* - ** Directories identified by trailing "/" characters. + case NCSA_SERVER: + case TCPC_SERVER: + /* + ** Directories identified by trailing "/" characters. */ StrAllocCopy(entry_info->filename, entry); - len = strlen(entry); - if (entry[len-1] == '/') { - /* + len = strlen(entry); + if (entry[len-1] == '/') { + /* ** It's a dir, remove / and mark it as such. */ - entry[len-1] = '\0'; - StrAllocCopy(entry_info->type, "Directory"); + entry[len-1] = '\0'; + StrAllocCopy(entry_info->type, ENTRY_IS_DIRECTORY); remove_size=TRUE; /* size is not useful */ - } + } /* - ** Goto the bottom and get real type. + ** Goto the bottom and get real type. */ - break; + break; default: /* - ** We can't tell if it is a directory since we only - ** did an NLST :( List bad file types anyways? NOT! + ** We can't tell if it is a directory since we only + ** did an NLST :( List bad file types anyways? NOT! */ StrAllocCopy(entry_info->filename, entry); return(entry_info); /* mostly empty info */ - break; /* not needed */ } /* switch (server_type) */ @@ -2205,9 +2121,9 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2( 0 == strncasecomp(cp, ".me", 3)) && (cp[3] == '\0' || cp[3] == ';')) { /* - ** Don't treat this as application/x-Troff-me - ** if it's a Unix server but has the string - ** "read.me", or if it's not a Unix server. - FM + ** Don't treat this as application/x-Troff-me + ** if it's a Unix server but has the string + ** "read.me", or if it's not a Unix server. - FM */ if ((server_type != UNIX_SERVER) || (cp > (entry_info->filename + 3) && @@ -2218,13 +2134,13 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2( } /* - ** Get real types eventually. + ** Get real types eventually. */ if (!entry_info->type) { CONST char *cp2; - HTFormat format; - HTAtom * encoding; /* @@ not used at all */ - format = HTFileFormat(entry_info->filename, &encoding, &cp2); + HTFormat format; + HTAtom * encoding; /* @@ not used at all */ + format = HTFileFormat(entry_info->filename, &encoding, &cp2); if (cp2 == NULL) { if (!strncmp(HTAtom_name(format), "application",11)) { @@ -2236,7 +2152,7 @@ PRIVATE EntryInfo * parse_dir_entry ARGS2( } } - StrAllocCopy(entry_info->type, cp2); + StrAllocCopy(entry_info->type, cp2); } return(entry_info); @@ -2250,29 +2166,27 @@ PRIVATE int compare_EntryInfo_structs ARGS2( char date1[16], date2[16], time1[8], time2[8], month[4]; switch(HTfileSortMethod) { - case FILE_BY_SIZE: + case FILE_BY_SIZE: /* both equal or both 0 */ - if (entry1->size == entry2->size) + if (entry1->size == entry2->size) return(strcmp(entry1->filename, entry2->filename)); else if (entry1->size > entry2->size) return(1); else return(-1); - break; - case FILE_BY_TYPE: - if (entry1->type && entry2->type) { - status = strcasecomp(entry1->type, entry2->type); + case FILE_BY_TYPE: + if (entry1->type && entry2->type) { + status = strcasecomp(entry1->type, entry2->type); if (status) return(status); /* else fall to filename comparison */ } - return (strcmp(entry1->filename, entry2->filename)); - break; + return (strcmp(entry1->filename, entry2->filename)); - case FILE_BY_DATE: - if (entry1->date && entry2->date) { + case FILE_BY_DATE: + if (entry1->date && entry2->date) { /* ** Make sure we have the correct length. - FM */ @@ -2292,25 +2206,25 @@ PRIVATE int compare_EntryInfo_structs ARGS2( */ if (entry1->date[9] == ':') { strcpy(date1, "9999"); - strcpy(time1, (char *)&entry1->date[7]); + strcpy(time1, &entry1->date[7]); if (time1[0] == ' ') { time1[0] = '0'; } } else { - strcpy(date1, (char *)&entry1->date[8]); + strcpy(date1, &entry1->date[8]); strcpy(time1, "00:00"); } strncpy(month, entry1->date, 3); month[3] = '\0'; for (i = 0; i < 12; i++) { if (!strcasecomp(month, months[i])) { - break; + break; } - } + } i++; sprintf(month, "%s%d", (i < 10 ? "0" : ""), i); strcat(date1, month); - strncat(date1, (char *)&entry1->date[4], 2); + strncat(date1, &entry1->date[4], 2); date1[8] = '\0'; if (date1[6] == ' ' || date1[6] == HT_NON_BREAK_SPACE) { date1[6] = '0'; @@ -2322,26 +2236,26 @@ PRIVATE int compare_EntryInfo_structs ARGS2( } strcat(date1, time1); if (entry2->date[9] == ':') { - strcpy(date2, "9999"); - strcpy(time2, (char *)&entry2->date[7]); + strcpy(date2, "9999"); + strcpy(time2, &entry2->date[7]); if (time2[0] == ' ') { time2[0] = '0'; } } else { - strcpy(date2, (char *)&entry2->date[8]); - strcpy(time2, "00:00"); + strcpy(date2, &entry2->date[8]); + strcpy(time2, "00:00"); } strncpy(month, entry2->date, 3); month[3] = '\0'; for (i = 0; i < 12; i++) { if (!strcasecomp(month, months[i])) { - break; + break; } } i++; sprintf(month, "%s%d", (i < 10 ? "0" : ""), i); strcat(date2, month); - strncat(date2, (char *)&entry2->date[4], 2); + strncat(date2, &entry2->date[4], 2); date2[8] = '\0'; if (date2[6] == ' ' || date2[6] == HT_NON_BREAK_SPACE) { date2[6] = '0'; @@ -2355,17 +2269,16 @@ PRIVATE int compare_EntryInfo_structs ARGS2( /* ** Do the comparison. - FM */ - status = strcasecomp(date2, date1); + status = strcasecomp(date2, date1); if (status) return(status); /* else fall to filename comparison */ } - return (strcmp(entry1->filename, entry2->filename)); - break; + return (strcmp(entry1->filename, entry2->filename)); - case FILE_BY_NAME: - default: - return (strcmp(entry1->filename, entry2->filename)); + case FILE_BY_NAME: + default: + return (strcmp(entry1->filename, entry2->filename)); } } @@ -2400,32 +2313,32 @@ PRIVATE int read_directory ARGS4( targetClass = *(target->isa); - _HTProgress ("Receiving FTP directory."); + _HTProgress (gettext("Receiving FTP directory.")); /* - ** Check whether we always want the home - ** directory treated as Welcome. - FM + ** Check whether we always want the home + ** directory treated as Welcome. - FM */ if (server_type == VMS_SERVER) - tildeIsTop = TRUE; + tildeIsTop = TRUE; /* - ** This should always come back FALSE, since the - ** flag is set only for local directory listings - ** if LONG_LIST was defined on compilation, but - ** we could someday set up an equivalent listing - ** for Unix ftp servers. - FM + ** This should always come back FALSE, since the + ** flag is set only for local directory listings + ** if LONG_LIST was defined on compilation, but + ** we could someday set up an equivalent listing + ** for Unix ftp servers. - FM */ need_parent_link = HTDirTitles(target, (HTAnchor*)parent, tildeIsTop); data_read_pointer = data_write_pointer = data_buffer; if (*filename == '\0') { /* Empty filename: use root. */ - StrAllocCopy (lastpath, "/"); - } else if (!strcmp(filename,"/")) { /* Root path. */ - StrAllocCopy (lastpath, "/foo/.."); + StrAllocCopy (lastpath, "/"); + } else if (!strcmp(filename,"/")) { /* Root path. */ + StrAllocCopy (lastpath, "/foo/.."); } else { - char * p = strrchr(filename, '/'); /* Find the lastslash. */ + char * p = strrchr(filename, '/'); /* Find the lastslash. */ char *cp; if (server_type == CMS_SERVER) { @@ -2435,7 +2348,7 @@ PRIVATE int read_directory ARGS4( } if ((cp = strrchr(lastpath, ';')) != NULL) { /* Trim type= param. */ if (!strncasecomp((cp+1), "type=", 5)) { - if (TOUPPER(*(cp+6)) == 'D' || + if (TOUPPER(*(cp+6)) == 'D' || TOUPPER(*(cp+6)) == 'A' || TOUPPER(*(cp+6)) == 'I') *cp = '\0'; @@ -2446,20 +2359,20 @@ PRIVATE int read_directory ARGS4( { - HTBTree * bt = HTBTree_new((HTComparer)compare_EntryInfo_structs); - char c; + HTBTree * bt = HTBTree_new((HTComparer)compare_EntryInfo_structs); + int ic; HTChunk * chunk = HTChunkCreate(128); int BytesReceived = 0; int BytesReported = 0; char NumBytes[64]; - PUTS("\n"); /* prettier LJM */ - for (c = 0; c != (char)EOF;) { /* For each entry in the directory */ + PUTC('\n'); /* prettier LJM */ + for (ic = 0; ic != EOF;) { /* For each entry in the directory */ HTChunkClear(chunk); if (HTCheckForInterrupt()) { - WasInterrupted = TRUE; + WasInterrupted = TRUE; if (BytesReceived) { - goto unload_btree; /* unload btree */ + goto unload_btree; /* unload btree */ } else { ABORT_TARGET; HTBTreeAndObject_free(bt); @@ -2467,81 +2380,80 @@ PRIVATE int read_directory ARGS4( } } - /* read directory entry + /* read directory entry */ - for (;;) { /* Read in one line as filename */ - c = NEXT_DATA_CHAR; + for (;;) { /* Read in one line as filename */ + ic = NEXT_DATA_CHAR; AgainForMultiNet: if (interrupted_in_next_data_char) { - WasInterrupted = TRUE; + WasInterrupted = TRUE; if (BytesReceived) { - goto unload_btree; /* unload btree */ - } else { - ABORT_TARGET; - HTBTreeAndObject_free(bt); - return HT_INTERRUPTED; - } - } else if (c == CR || c == LF) { /* Terminator? */ + goto unload_btree; /* unload btree */ + } else { + ABORT_TARGET; + HTBTreeAndObject_free(bt); + return HT_INTERRUPTED; + } + } else if ((char)ic == CR || (char)ic == LF) { /* Terminator? */ if (chunk->size != 0) { /* got some text */ - /* Deal with MultiNet's wrapping of long lines */ - if (server_type == VMS_SERVER) { - /* Deal with MultiNet's wrapping of long lines - F.M. */ - if (data_read_pointer < data_write_pointer && - *(data_read_pointer+1) == ' ') - data_read_pointer++; - else if (data_read_pointer >= data_write_pointer) { - status = NETREAD(data_soc, data_buffer, - DATA_BUFFER_SIZE); - if (status == HT_INTERRUPTED) { - interrupted_in_next_data_char = 1; - goto AgainForMultiNet; - } - if (status <= 0) { - c = (char)EOF; - break; - } - data_write_pointer = data_buffer + status; - data_read_pointer = data_buffer; - if (*data_read_pointer == ' ') - data_read_pointer++; - else - break; - } - else - break; - } + /* Deal with MultiNet's wrapping of long lines */ + if (server_type == VMS_SERVER) { + /* Deal with MultiNet's wrapping of long lines - F.M. */ + if (data_read_pointer < data_write_pointer && + *(data_read_pointer+1) == ' ') + data_read_pointer++; + else if (data_read_pointer >= data_write_pointer) { + status = NETREAD(data_soc, data_buffer, + DATA_BUFFER_SIZE); + if (status == HT_INTERRUPTED) { + interrupted_in_next_data_char = 1; + goto AgainForMultiNet; + } + if (status <= 0) { + ic = EOF; + break; + } + data_write_pointer = data_buffer + status; + data_read_pointer = data_buffer; + if (*data_read_pointer == ' ') + data_read_pointer++; + else + break; + } + else + break; + } else - break; /* finish getting one entry */ + break; /* finish getting one entry */ } - } else if (c == (char)EOF) { - break; /* End of file */ + } else if (ic == EOF) { + break; /* End of file */ } else { - HTChunkPutc(chunk, c); + HTChunkPutc(chunk, (char)ic); } - } + } HTChunkTerminate(chunk); BytesReceived += chunk->size; if (BytesReceived > BytesReported + 1024) { - sprintf(NumBytes,"Transferred %d bytes",BytesReceived); + sprintf(NumBytes, TRANSFERRED_X_BYTES, BytesReceived); HTProgress(NumBytes); BytesReported = BytesReceived; } - if (c == (char) EOF && chunk->size == 1) + if (ic == EOF && chunk->size == 1) /* 1 means empty: includes terminating 0 */ - break; - if (TRACE) - fprintf(stderr, "HTFTP: Line in %s is %s\n", - lastpath, chunk->data); + break; + CTRACE(tfp, "HTFTP: Line in %s is %s\n", + lastpath, chunk->data); entry_info = parse_dir_entry(chunk->data, &first); if (entry_info->display) { - if (TRACE) - fprintf(stderr, "Adding file to BTree: %s\n", - entry_info->filename); - HTBTree_add(bt, (EntryInfo *)entry_info); + CTRACE(tfp, "Adding file to BTree: %s\n", + entry_info->filename); + HTBTree_add(bt, (EntryInfo *)entry_info); } else { + free_entryinfo_struct_contents(entry_info); FREE(entry_info); } @@ -2549,23 +2461,25 @@ AgainForMultiNet: unload_btree: - HTChunkFree(chunk); + HTChunkFree(chunk); /* print out the handy help message if it exits :) */ if (help_message_cache_non_empty()) { START(HTML_PRE); START(HTML_HR); + PUTC('\n'); PUTS(help_message_cache_contents()); - init_help_message_cache(); /* to free memory */ + init_help_message_cache(); /* to free memory */ START(HTML_HR); + PUTC('\n'); } else { START(HTML_PRE); - PUTS("\n"); + PUTC('\n'); } /* Put up header */ - /* PUTS(" Date Type Size Filename\n"); + /* PUTS(" Date Type Size Filename\n"); */ /* Run through tree printing out in order @@ -2587,9 +2501,9 @@ unload_btree: if (entry_info->type) { for (i = 0; entry_info->type[i] != '\0' && i < 15; i++) - PUTC(entry_info->type[i]); + PUTC(entry_info->type[i]); for (; i < 17; i++) - PUTC(' '); + PUTC(' '); } /* start the anchor */ @@ -2603,8 +2517,8 @@ unload_btree: entry_info->size); else sprintf(string_buffer, " %dKb", - entry_info->size/1024); - PUTS(string_buffer); + entry_info->size/1024); + PUTS(string_buffer); } PUTC('\n'); /* end of this entry */ @@ -2629,13 +2543,13 @@ unload_btree: } if (WasInterrupted || HTCheckForInterrupt()) { - if (server_type != CMS_SERVER) - response(NIL); - _HTProgress("Data transfer interrupted."); + if (server_type != CMS_SERVER) + response(NIL); + _HTProgress(TRANSFER_INTERRUPTED); return HT_LOADED; } if (server_type != CMS_SERVER) - response(NIL); + response(NIL); return HT_LOADED; #ifdef NOTDEFINED return response(NIL) == 2 ? HT_LOADED : -1; @@ -2662,7 +2576,6 @@ PUBLIC int HTFTPLoad ARGS4( int status; int retry; /* How many times tried? */ HTFormat format; - char command[LINE_LENGTH+1]; /* set use_list to NOT since we don't know what kind of server @@ -2680,10 +2593,10 @@ PUBLIC int HTFTPLoad ARGS4( status = get_listen_socket(); if (status < 0) { NETCLOSE (control->socket); - control->socket = -1; - close_master_socket (); - /* HT_INTERRUPTED would fall through, if we could interrupt - somehow in the middle of it, which we currently can't. */ + control->socket = -1; + close_master_socket (); + /* HT_INTERRUPTED would fall through, if we could interrupt + somehow in the middle of it, which we currently can't. */ return status; } @@ -2693,35 +2606,32 @@ PUBLIC int HTFTPLoad ARGS4( { status = response(port_command); if (status == HT_INTERRUPTED) { - if (TRACE) - fprintf (stderr, - "HTFTP: Interrupted in response (port_command)\n"); - _HTProgress ("Connection interrupted."); - NETCLOSE (control->socket); - control->socket = -1; - close_master_socket (); - return HT_INTERRUPTED; - } + CTRACE (tfp, "HTFTP: Interrupted in response (port_command)\n"); + _HTProgress (CONNECTION_INTERRUPTED); + NETCLOSE (control->socket); + control->socket = -1; + close_master_socket (); + return HT_INTERRUPTED; + } if (status != 2) { /* Could have timed out */ if (status < 0) continue; /* try again - net error*/ return -status; /* bad reply */ } - if (TRACE) - fprintf(stderr, "HTFTP: Port defined.\n"); + CTRACE(tfp, "HTFTP: Port defined.\n"); } #endif /* REPEAT_PORT */ #else /* Use PASV */ /* Tell the server to be passive */ { + char command[LINE_LENGTH+1]; char *p; int reply, h0, h1, h2, h3, p0, p1; /* Parts of reply */ int status; data_soc = status; - sprintf(command, "PASV%c%c", CR, LF); - status = response(command); + status = send_cmd_1("PASV"); if (status != 2) { if (status < 0) continue; /* retry or Bad return */ @@ -2733,46 +2643,44 @@ PUBLIC int HTFTPLoad ARGS4( while (--p > response_text && '0' <= *p && *p <= '9') ; /* null body */ - status = sscanf(p+1, "%d,%d,%d,%d,%d,%d", - &h0, &h1, &h2, &h3, &p0, &p1); - if (status < 4) { - fprintf(stderr, "HTFTP: PASV reply has no inet address!\n"); - return -99; - } - passive_port = (p0<<8) + p1; - if (TRACE) - fprintf(stderr, "HTFTP: Server is listening on port %d\n", - passive_port); + status = sscanf(p+1, "%d,%d,%d,%d,%d,%d", + &h0, &h1, &h2, &h3, &p0, &p1); + if (status < 4) { + fprintf(tfp, "HTFTP: PASV reply has no inet address!\n"); + return -99; + } + passive_port = (p0<<8) + p1; + CTRACE(tfp, "HTFTP: Server is listening on port %d\n", + passive_port); /* Open connection for data: */ sprintf(command, - "ftp://%d.%d.%d.%d:%d/",h0,h1,h2,h3,passive_port); - status = HTDoConnect(name, "FTP", passive_port, &data_soc); + "ftp://%d.%d.%d.%d:%d/",h0,h1,h2,h3,passive_port); + status = HTDoConnect(name, "FTP", passive_port, &data_soc); if (status < 0) { - (void) HTInetStatus("connect for data"); + (void) HTInetStatus(gettext("connect for data")); NETCLOSE(data_soc); return status; /* Bad return */ } - if (TRACE) - fprintf(stderr, "FTP data connected, socket %d\n", data_soc); + CTRACE(tfp, "FTP data connected, socket %d\n", data_soc); } #endif /* use PASV */ status = 0; - break; /* No more retries */ + break; /* No more retries */ } /* for retries */ if (status < 0) - return status; /* Failed with this code */ + return status; /* Failed with this code */ /* Ask for the file: */ { - char *filename = HTParse(name, "", PARSE_PATH + PARSE_PUNCTUATION); - char *fname = filename; /** Save for subsequent free() **/ + char *filename = HTParse(name, "", PARSE_PATH + PARSE_PUNCTUATION); + char *fname = filename; /** Save for subsequent free() **/ BOOL binary; char *type = NULL; char *cp; @@ -2780,15 +2688,12 @@ PUBLIC int HTFTPLoad ARGS4( if (server_type == CMS_SERVER) { /** If the unescaped path has a %2f, reject it as illegal. - FM **/ if (((cp = strstr(filename, "%2")) != NULL) && - TOUPPER(cp[2]) == 'F') { + TOUPPER(cp[2]) == 'F') { FREE(fname); init_help_message_cache(); /* to free memory */ NETCLOSE(control->socket); control->socket = -1; - if (TRACE) { - fprintf(stderr, - "HTFTP: Rejecting path due to illegal escaped slash.\n"); - } + CTRACE(tfp, "HTFTP: Rejecting path due to illegal escaped slash.\n"); return -1; } } @@ -2798,10 +2703,10 @@ PUBLIC int HTFTPLoad ARGS4( type = "D"; } else if ((type = strrchr(filename, ';')) != NULL) { /* - ** Check and trim the type= parameter. - FM + ** Check and trim the type= parameter. - FM */ if (!strncasecomp((type+1), "type=", 5)) { - switch(TOUPPER(*(type+6))) { + switch(TOUPPER(*(type+6))) { case 'D': *type = '\0'; type = "D"; @@ -2823,13 +2728,12 @@ PUBLIC int HTFTPLoad ARGS4( *(filename+1) = '\0'; } } - if (TRACE && *type != '\0') { - fprintf(stderr, "HTFTP: type=%s\n", type); + if (*type != '\0') { + CTRACE(tfp, "HTFTP: type=%s\n", type); } } HTUnEscape(filename); - if (TRACE) - fprintf(stderr, "HTFTP: UnEscaped %s\n", filename); + CTRACE(tfp, "HTFTP: UnEscaped %s\n", filename); if (filename[1] == '~') { /* ** Check if translation of HOME as tilde is supported, @@ -2841,11 +2745,9 @@ PUBLIC int HTFTPLoad ARGS4( if ((cp2 = strchr((filename+1), '/')) != NULL) { *cp2 = '\0'; } - sprintf(command, "PWD%c%c", CR, LF); - status = response(command); + status = send_cmd_1("PWD"); if (status == 2 && response_text[5] == '/') { - sprintf(command, "CWD %s%c%c", (filename+1), CR, LF); - status = response(command); + status = send_cwd(filename+1); if (status == 2) { StrAllocCopy(fn, (filename+1)); if (cp2) { @@ -2862,22 +2764,22 @@ PUBLIC int HTFTPLoad ARGS4( } } if (cp2) { - *cp2 = '/'; + *cp2 = '/'; } } if (strlen(filename) > 3) { char *cp2; if (((cp2=strrchr(filename, '.')) != NULL && - 0 == strncasecomp(cp2, ".me", 3)) && + 0 == strncasecomp(cp2, ".me", 3)) && (cp2[3] == '\0' || cp2[3] == ';')) { /* ** Don't treat this as application/x-Troff-me ** if it's a Unix server but has the string ** "read.me", or if it's not a Unix server. - FM */ - if ((server_type != UNIX_SERVER) || + if ((server_type != UNIX_SERVER) || (cp2 > (filename + 3) && - 0 == strncasecomp((cp2 - 4), "read.me", 7))) { + 0 == strncasecomp((cp2 - 4), "read.me", 7))) { *cp2 = '\0'; format = HTFileFormat(filename, &encoding, NULL); *cp2 = '.'; @@ -2885,7 +2787,7 @@ PUBLIC int HTFTPLoad ARGS4( format = HTFileFormat(filename, &encoding, NULL); } } else { - format = HTFileFormat(filename, &encoding, NULL); + format = HTFileFormat(filename, &encoding, NULL); } } else { format = HTFileFormat(filename, &encoding, NULL); @@ -2895,38 +2797,37 @@ PUBLIC int HTFTPLoad ARGS4( encoding != HTAtom_for("7bit")); if (!binary && /* - ** Force binary if we're in source, download or dump - ** mode and this is not a VM/CMS server, so we don't - ** get CRLF instead of LF (or CR) for newlines in text - ** files. Can't do this for VM/CMS or we'll get - ** raw EBCDIC. - FM + ** Force binary if we're in source, download or dump + ** mode and this is not a VM/CMS server, so we don't + ** get CRLF instead of LF (or CR) for newlines in text + ** files. Can't do this for VM/CMS or we'll get + ** raw EBCDIC. - FM */ (format_out == WWW_SOURCE || - format_out == HTAtom_for("www/download") || + format_out == HTAtom_for("www/download") || format_out == HTAtom_for("www/dump")) && (server_type != CMS_SERVER)) binary = TRUE; if (!binary && type && *type == 'I') { /* - ** Force binary if we had ;type=I - FM + ** Force binary if we had ;type=I - FM */ binary = TRUE; } else if (binary && type && *type == 'A') { /* - ** Force ASCII if we had ;type=A - FM + ** Force ASCII if we had ;type=A - FM */ binary = FALSE; } - if (binary != control->binary) { + if (binary != control->binary) { /* - ** Act on our setting if not alread set. - FM + ** Act on our setting if not already set. - FM */ char * mode = binary ? "I" : "A"; - sprintf(command, "TYPE %s%c%c", mode, CR, LF); - status = response(command); + status = send_cmd_2("TYPE", mode); if (status != 2) { init_help_message_cache(); /* to free memory */ - return ((status < 0) ? status : -status); + return ((status < 0) ? status : -status); } control->binary = binary; } @@ -2942,66 +2843,57 @@ PUBLIC int HTFTPLoad ARGS4( BOOL included_device = FALSE; /** Accept only Unix-style filename **/ if (strchr(filename, ':') != NULL || - strchr(filename, '[') != NULL) { + strchr(filename, '[') != NULL) { FREE(fname); init_help_message_cache(); /* to free memory */ NETCLOSE(control->socket); control->socket = -1; - if (TRACE) { - fprintf(stderr, - "HTFTP: Rejecting path due to non-Unix-style syntax.\n"); - } + CTRACE(tfp, "HTFTP: Rejecting path due to non-Unix-style syntax.\n"); return -1; } /** Handle any unescaped "/%2F" path **/ if (!strncmp(filename, "//", 2)) { - int i; + int i; included_device = TRUE; for (i = 0; filename[(i+1)]; i++) filename[i] = filename[(i+1)]; filename[i] = '\0'; - if (TRACE) { - fprintf(stderr, "HTFTP: Trimmed '%s'\n", filename); - } + CTRACE(tfp, "HTFTP: Trimmed '%s'\n", filename); cp = HTMake_VMS_name("", filename); - if (TRACE) { - fprintf(stderr, "HTFTP: VMSized '%s'\n", cp); - } + CTRACE(tfp, "HTFTP: VMSized '%s'\n", cp); if ((cp1=strrchr(cp, ']')) != NULL) { cp1++; for (i = 0; cp1[i]; i++) - filename[i] = cp1[i]; + filename[i] = cp1[i]; filename[i] = '\0'; - if (TRACE) { - fprintf(stderr, "HTFTP: Filename '%s'\n", filename); - } + CTRACE(tfp, "HTFTP: Filename '%s'\n", filename); *cp1 = '\0'; - sprintf(command, "CWD %s%c%c", cp, CR, LF); - status = response (command); + status = send_cwd(cp); if (status != 2) { - if ((cp1=strchr(cp, '[')) != NULL) { + char *dotslash = 0; + if ((cp1=strchr(cp, '[')) != NULL) { *cp1++ = '\0'; - sprintf(command, "CWD %s%c%c", cp, CR, LF); - status = response (command); + status = send_cwd(cp); if (status != 2) { - FREE(fname); + FREE(fname); init_help_message_cache(); /* to free memory */ NETCLOSE(control->socket); control->socket = -1; return ((status < 0) ? status : -status); } - sprintf(command, "CWD [.%s%c%c", cp1, CR, LF); - status = response (command); + HTSprintf0(&dotslash, "[.%s", cp1); + status = send_cwd(dotslash); + FREE(dotslash); if (status != 2) { - FREE(fname); + FREE(fname); init_help_message_cache(); /* to free memory */ NETCLOSE(control->socket); control->socket = -1; return ((status < 0) ? status : -status); } } else { - FREE(fname); - init_help_message_cache(); /* to free memory */ + FREE(fname); + init_help_message_cache(); /* to free memory */ NETCLOSE(control->socket); control->socket = -1; return ((status < 0) ? status : -status); @@ -3015,30 +2907,25 @@ PUBLIC int HTFTPLoad ARGS4( for (i = 0; cp1[i]; i++) filename[i] = cp1[i]; filename[i] = '\0'; - if (TRACE) { - fprintf(stderr, "HTFTP: Filename '%s'\n", filename); - } - *cp1 = '\0'; + CTRACE(tfp, "HTFTP: Filename '%s'\n", filename); + *cp1 = '\0'; strcat(cp, "["); strcat(cp, filename); strcat(cp, "]"); - sprintf(command, "CWD %s%c%c", cp, CR, LF); - status = response (command); + status = send_cwd(cp); if (status != 2) { *cp1 = '\0'; strcat(cp, "[000000]"); - sprintf(command, "CWD %s%c%c", cp, CR, LF); - status = response (command); + status = send_cwd(cp); if (status != 2) { - *cp1 = '\0'; - sprintf(command, "CWD %s%c%c", cp, CR, LF); - status = response (command); + *cp1 = '\0'; + status = send_cwd(cp); if (status != 2) { - FREE(fname); + FREE(fname); init_help_message_cache(); NETCLOSE(control->socket); control->socket = -1; - return ((status < 0) ? status : -status); + return ((status < 0) ? status : -status); } } } else { @@ -3047,15 +2934,13 @@ PUBLIC int HTFTPLoad ARGS4( } } } else if (0==strcmp(cp, (filename+1))) { - sprintf(command, "CWD %s%c%c", cp, CR, LF); - status = response (command); + status = send_cwd(cp); if (status != 2) { strcat(cp, ":"); - sprintf(command, "CWD %s%c%c", cp, CR, LF); - status = response (command); + status = send_cwd(cp); if (status != 2) { FREE(fname); - init_help_message_cache(); /* to free memory */ + init_help_message_cache(); /* to free memory */ NETCLOSE(control->socket); control->socket = -1; return ((status < 0) ? status : -status); @@ -3067,35 +2952,43 @@ PUBLIC int HTFTPLoad ARGS4( } /** Trim trailing slash if filename is not the top directory **/ if (strlen(filename) > 1 && filename[strlen(filename)-1] == '/') - filename[strlen(filename)-1] = '\0'; + filename[strlen(filename)-1] = '\0'; #ifdef MAINTAIN_CONNECTION /* Don't need this if always new connection - F.M. */ if (!included_device) { - /** Get the current default VMS device:[directory] **/ - sprintf(command, "PWD%c%c", CR, LF); - status = response (command); - if (status != 2) { - FREE(fname); - init_help_message_cache(); /* to free memory */ + /** Get the current default VMS device:[directory] **/ + status = send_cmd_1("PWD"); + if (status != 2) { + FREE(fname); + init_help_message_cache(); /* to free memory */ NETCLOSE(control->socket); control->socket = -1; return ((status < 0) ? status : -status); - } - /** Go to the VMS account's top directory **/ - if ((cp=strchr(response_text, '[')) != NULL && - (cp1=strrchr(response_text, ']')) != NULL) { - sprintf(command, "CWD %s", cp); - if ((cp2=strchr(cp, '.')) != NULL && cp2 < cp1) - sprintf(command+(cp2-cp)+4, "]%c%c", CR, LF); - else - sprintf(command+(cp1-cp)+4, "]%c%c", CR, LF); - status = response (command); + } + /** Go to the VMS account's top directory **/ + if ((cp=strchr(response_text, '[')) != NULL && + (cp1=strrchr(response_text, ']')) != NULL) { + char *tmp = 0; + unsigned len = 4; + + StrAllocCopy(tmp, cp); + if ((cp2=strchr(cp, '.')) != NULL && cp2 < cp1) { + len += (cp2 - cp); + } else { + len += (cp1 - cp); + } + tmp[len] = 0; + StrAllocCat(tmp, "]"); + + status = send_cwd(tmp); + FREE(tmp); + if (status != 2) { - FREE(fname); + FREE(fname); init_help_message_cache(); /* to free memory */ NETCLOSE(control->socket); control->socket = -1; - return ((status < 0) ? status : -status); + return ((status < 0) ? status : -status); } } } @@ -3103,15 +2996,14 @@ PUBLIC int HTFTPLoad ARGS4( /** If we want the VMS account's top directory, list it now **/ if (!(strcmp(filename, "/~")) || - (included_device && 0==strcmp(filename, "000000")) || - (strlen(filename) == 1 && *filename == '/')) { + (included_device && 0==strcmp(filename, "000000")) || + (strlen(filename) == 1 && *filename == '/')) { isDirectory = YES; - sprintf(command, "LIST%c%c", CR, LF); - status = response (command); + status = send_cmd_1("LIST"); FREE(fname); if (status != 1) { /* Action not started */ - init_help_message_cache(); /* to free memory */ + init_help_message_cache(); /* to free memory */ NETCLOSE(control->socket); control->socket = -1; return ((status < 0) ? status : -status); @@ -3121,26 +3013,35 @@ PUBLIC int HTFTPLoad ARGS4( } /** Otherwise, go to appropriate directory and doctor filename **/ if (!strncmp(filename, "/~", 2)) - filename += 2; + filename += 2; + CTRACE(tfp, "check '%s' to translate x/y/ to [.x.y]\n", filename); if (!included_device && - (cp = strchr(filename, '/')) != NULL && - (cp1 = strrchr(cp, '/')) != NULL && cp != cp1) { - sprintf(command, "CWD [.%s", cp+1); - sprintf(command+(cp1-cp)+5, "]%c%c", CR, LF); - while ((cp2 = strrchr(command, '/')) != NULL) + (cp = strchr(filename, '/')) != NULL && + (cp1 = strrchr(cp, '/')) != NULL && + (cp1 - cp) > 1) { + char *tmp = 0; + + HTSprintf0(&tmp, "[.%.*s]", cp1-cp-1, cp+1); + + CTRACE(tfp, "change path '%s'\n", tmp); + while ((cp2 = strrchr(tmp, '/')) != NULL) *cp2 = '.'; - status = response(command); + CTRACE(tfp, "...to path '%s'\n", tmp); + + status = send_cwd(tmp); + FREE(tmp); + if (status != 2) { FREE(fname); - init_help_message_cache(); /* to free memory */ + init_help_message_cache(); /* to free memory */ NETCLOSE(control->socket); control->socket = -1; return ((status < 0) ? status : -status); } filename = cp1+1; } else { - if (!included_device) { - filename += 1; + if (!included_device) { + filename += 1; } } break; @@ -3148,21 +3049,20 @@ PUBLIC int HTFTPLoad ARGS4( case CMS_SERVER: { /* - ** If we want the CMS account's top directory, or a base - ** SFS or anonymous directory path (i.e., without a slash), - ** list it now. FM + ** If we want the CMS account's top directory, or a base + ** SFS or anonymous directory path (i.e., without a slash), + ** list it now. FM */ if ((strlen(filename) == 1 && *filename == '/') || - ((0 == strncasecomp((filename+1), "vmsysu:", 7)) && + ((0 == strncasecomp((filename+1), "vmsysu:", 7)) && (cp = strchr((filename+1), '.')) != NULL && strchr(cp, '/') == NULL) || (0 == strncasecomp(filename+1, "anonymou.", 9) && strchr(filename+1, '/') == NULL)) { if (filename[1] != '\0') { - sprintf(command, "CWD %s%c%c", (filename+1), CR, LF); - status = response(command); + status = send_cwd(filename+1); if (status != 2) { - /* Action not started */ + /* Action not started */ init_help_message_cache(); /* to free memory */ NETCLOSE(control->socket); control->socket = -1; @@ -3171,14 +3071,13 @@ PUBLIC int HTFTPLoad ARGS4( } isDirectory = YES; if (use_list) - sprintf(command, "LIST%c%c", CR, LF); + status = send_cmd_1("LIST"); else - sprintf(command, "NLST%c%c", CR, LF); - status = response (command); + status = send_cmd_1("NLST"); FREE(fname); if (status != 1) { /* Action not started */ - init_help_message_cache(); /* to free memory */ + init_help_message_cache(); /* to free memory */ NETCLOSE(control->socket); control->socket = -1; return ((status < 0) ? status : -status); @@ -3190,21 +3089,19 @@ PUBLIC int HTFTPLoad ARGS4( /** Otherwise, go to appropriate directory and adjust filename **/ while ((cp = strchr(filename, '/')) != NULL) { - *cp++ = '\0'; - sprintf(command, "CWD %s%c%c", filename, CR, LF); - status = response(command); + *cp++ = '\0'; + status = send_cwd(filename); if (status == 2) { if (*cp == '\0') { isDirectory = YES; if (use_list) - sprintf(command, "LIST%c%c", CR, LF); + status = send_cmd_1("LIST"); else - sprintf(command, "NLST%c%c", CR, LF); - status = response (command); + status = send_cmd_1("NLST"); FREE(fname); if (status != 1) { /** Action not started **/ - init_help_message_cache(); /* to free memory */ + init_help_message_cache(); /* to free memory */ NETCLOSE(control->socket); control->socket = -1; return ((status < 0) ? status : -status); @@ -3222,7 +3119,7 @@ PUBLIC int HTFTPLoad ARGS4( default: /** Shift for any unescaped "/%2F" path **/ if (!strncmp(filename, "//", 2)) - filename++; + filename++; break; } /* @@ -3230,37 +3127,33 @@ PUBLIC int HTFTPLoad ARGS4( ** which we're dealing with if we don't know yet. - FM */ if (!(type) || (type && *type != 'D')) { - sprintf(command, "RETR %s%c%c", filename, CR, LF); - status = response(command); + status = send_cmd_2("RETR", filename); } else { status = 5; /* Failed status set as flag. - FM */ } if (status != 1) { /* Failed : try to CWD to it */ /** Clear any login messages if this isn't the login directory **/ if (strcmp(filename, "/")) - init_help_message_cache(); - - sprintf(command, "CWD %s%c%c", filename, CR, LF); - status = response(command); + init_help_message_cache(); - if (status == 2) { /* Successed : let's NAME LIST it */ - isDirectory = YES; - if (use_list) - sprintf(command, "LIST%c%c", CR, LF); - else - sprintf(command, "NLST%c%c", CR, LF); - status = response (command); + status = send_cwd(filename); + if (status == 2) { /* Succeeded : let's NAME LIST it */ + isDirectory = YES; + if (use_list) + status = send_cmd_1("LIST"); + else + status = send_cmd_1("NLST"); } } FREE(fname); if (status != 1) { - init_help_message_cache(); /* to free memory */ + init_help_message_cache(); /* to free memory */ NETCLOSE(control->socket); control->socket = -1; if (status < 0) - return status; + return status; else - return -status; + return -status; } } @@ -3270,7 +3163,7 @@ listen: */ { struct sockaddr_in soc_address; - int soc_addrlen=sizeof(soc_address); + int soc_addrlen=sizeof(soc_address); #ifdef SOCKS if (socks_flag) status = Raccept(master_socket, @@ -3282,7 +3175,7 @@ listen: (struct sockaddr *)&soc_address, (void *)&soc_addrlen); if (status < 0) { - init_help_message_cache(); /* to free memory */ + init_help_message_cache(); /* to free memory */ return HTInetStatus("accept"); } CTRACE(tfp, "TCP: Accepted new socket %d\n", status); @@ -3292,15 +3185,15 @@ listen: /* @@ */ #endif /* LISTEN */ if (isDirectory) { - status = read_directory (anchor, name, format_out, sink); - NETCLOSE(data_soc); + status = read_directory (anchor, name, format_out, sink); + NETCLOSE(data_soc); NETCLOSE(control->socket); control->socket = -1; init_help_message_cache(); /* to free memory */ - return status; + return status; /* returns HT_LOADED or error */ } else { - int rv; + int rv; int len; char *FileName = HTParse(name, "", PARSE_PATH + PARSE_PUNCTUATION); @@ -3311,9 +3204,9 @@ listen: HTUnEscape(FileName); if (!IsUnityEnc(encoding)) { /* - * We already know from the call to HTFileFormat above that - * this is a compressed file, no need to look at the filename - * again. - kw + * We already know from the call to HTFileFormat above that + * this is a compressed file, no need to look at the filename + * again. - kw */ StrAllocCopy(anchor->content_type, format->name); StrAllocCopy(anchor->content_encoding, HTAtom_name(encoding)); @@ -3321,7 +3214,7 @@ listen: } else if ((len = strlen(FileName)) > 2) { if ((FileName[len - 1] == 'Z') && - (FileName[len - 2] == '.' || + (FileName[len - 2] == '.' || FileName[len - 2] == '-' || FileName[len - 2] == '_')) { @@ -3332,7 +3225,7 @@ listen: StrAllocCopy(anchor->content_encoding, "x-compress"); format = HTAtom_for("www/compressed"); } else if ((len > 3) && - !strcasecomp((char *)&FileName[len - 2], "gz")) { + !strcasecomp((char *)&FileName[len - 2], "gz")) { if (FileName[len - 3] == '.' || FileName[len - 3] == '-' || FileName[len - 3] == '_') { @@ -3347,18 +3240,17 @@ listen: } FREE(FileName); - _HTProgress ("Receiving FTP file."); + _HTProgress (gettext("Receiving FTP file.")); rv = HTParseSocket(format, format_out, anchor, data_soc, sink); if (rv == HT_INTERRUPTED) - _HTProgress("Data transfer interrupted."); + _HTProgress(TRANSFER_INTERRUPTED); HTInitInput(control->socket); /* Reset buffering to control connection DD 921208 */ status = NETCLOSE(data_soc); - if (TRACE) - fprintf(stderr, "HTFTP: Closing data socket %d\n", data_soc); + CTRACE(tfp, "HTFTP: Closing data socket %d\n", data_soc); if (status < 0 && rv != HT_INTERRUPTED && rv != -1) { (void) HTInetStatus("close"); /* Comment only */ data_soc = -1; /* invalidate it */ @@ -3367,7 +3259,7 @@ listen: status = response(NIL); /* Pick up final reply */ if (status != 2 && rv != HT_INTERRUPTED && rv != -1) { init_help_message_cache(); /* to free memory */ - return HTLoadError(sink, 500, response_text); + return HTLoadError(sink, 500, response_text); } } @@ -3385,15 +3277,17 @@ listen: PUBLIC void HTClearFTPPassword NOARGS { /* - ** Need code to check cached documents from - ** non-anonymous ftp accounts and do something - ** to ensure that they no longer can be accessed - ** without a new retrieval. - FM + ** Need code to check cached documents from + ** non-anonymous ftp accounts and do something + ** to ensure that they no longer can be accessed + ** without a new retrieval. - FM */ /* - ** Now free the current user entered password, - ** if any. - FM + ** Now free the current user entered password, + ** if any. - FM */ FREE(user_entered_password); } + +#endif /* ifndef DISABLE_FTP */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFTP.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFTP.h index 814772d4acc..4ef22f2dc33 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFTP.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFTP.h @@ -1,27 +1,24 @@ /* FTP access module for libwww FTP ACCESS FUNCTIONS - + This isn't really a valid protocol module -- it is lumped together with HTFile . That could be changed easily. - - Author: Tim Berners-Lee. Public Domain. Please mail changes to timbl@info.cern.ch - + + Author: Tim Berners-Lee. Public Domain. Please mail changes to timbl@info.cern.ch + */ #ifndef HTFTP_H #define HTFTP_H -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ -#include "HTAnchor.h" -#include "HTStream.h" -#include "HTParse.h" +#include +#include +#include -#define FILE_BY_NAME 0 +#define FILE_BY_NAME 0 #define FILE_BY_TYPE 1 #define FILE_BY_SIZE 2 #define FILE_BY_DATE 3 -extern BOOLEAN HTfileSortMethod; /* specifies the method of sorting */ +extern int HTfileSortMethod; /* specifies the method of sorting */ /* PUBLIC HTMake_VMS_name() @@ -36,7 +33,7 @@ extern BOOLEAN HTfileSortMethod; /* specifies the method of sorting */ ** Bug: Returns pointer to static -- non-reentrant */ PUBLIC char * HTMake_VMS_name PARAMS(( - CONST char * nn, + CONST char * nn, CONST char * fn)); @@ -45,9 +42,9 @@ PUBLIC char * HTMake_VMS_name PARAMS(( Retrieve File from Server ON EXIT, - + returns Socket number for file if good.<0 if bad. - + */ extern int HTFTPLoad PARAMS (( diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFWriter.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFWriter.c index 8ef9ba1b6e1..943e1a22b3e 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFWriter.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFWriter.c @@ -8,17 +8,16 @@ ** strings written must be less than buffer size. */ -#include "HTUtils.h" +#include -#include "HTFWriter.h" +#include -#include "HTFormat.h" -#include "HTAlert.h" -#include "HTFile.h" +#include +#include +#include -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} +#include +#include /* Stream Object ** ------------ @@ -26,7 +25,7 @@ struct _HTStream { CONST HTStreamClass * isa; - + FILE * fp; char * end_command; char * remove_command; @@ -58,13 +57,13 @@ PRIVATE void HTBlackHole_abort ARGS2(HTStream *, me, HTError, e) ** ----------------- */ PRIVATE CONST HTStreamClass HTBlackHoleClass = -{ +{ "BlackHole", HTBlackHole_free, HTBlackHole_abort, HTBlackHole_put_character, HTBlackHole_put_string, HTBlackHole_write -}; +}; PRIVATE HTStream HTBlackHoleInstance = { @@ -117,7 +116,7 @@ PRIVATE void HTFWriter_put_string ARGS2(HTStream *, me, CONST char*, s) */ PRIVATE void HTFWriter_write ARGS3(HTStream *, me, CONST char*, s, int, l) { - fwrite(s, 1, l, me->fp); + fwrite(s, 1, l, me->fp); } @@ -153,8 +152,7 @@ PRIVATE void HTFWriter_abort ARGS2(HTStream *, me, HTError, e) { fclose(me->fp); if (me->end_command) { /* Temp file */ - if (TRACE) fprintf(stderr, - "HTFWriter: Aborting: file not executed.\n"); + CTRACE(tfp, "HTFWriter: Aborting: file not executed.\n"); FREE(me->end_command); if (me->remove_command) { system(me->remove_command); @@ -171,13 +169,13 @@ PRIVATE void HTFWriter_abort ARGS2(HTStream *, me, HTError, e) ** ----------------------- */ PRIVATE CONST HTStreamClass HTFWriter = /* As opposed to print etc */ -{ +{ "FileWriter", HTFWriter_free, HTFWriter_abort, HTFWriter_put_character, HTFWriter_put_string, HTFWriter_write -}; +}; /* Subclass-specific Methods @@ -187,12 +185,12 @@ PRIVATE CONST HTStreamClass HTFWriter = /* As opposed to print etc */ PUBLIC HTStream* HTFWriter_new ARGS1(FILE *, fp) { HTStream* me; - + if (!fp) return NULL; me = (HTStream*)malloc(sizeof(*me)); if (me == NULL) outofmem(__FILE__, "HTML_new"); - me->isa = &HTFWriter; + me->isa = &HTFWriter; me->fp = fp; me->end_command = NULL; @@ -236,29 +234,31 @@ PUBLIC HTStream* HTSaveAndExecute ARGS3( { char *fnam; CONST char * suffix; - + HTStream* me; - + if (HTClientHost) { - HTAlert("Can't save data to file -- please run WWW locally"); + HTAlert(CANNOT_SAVE_REMOTE); return HTBlackHole(); } - + me = (HTStream*)malloc(sizeof(*me)); if (me == NULL) outofmem(__FILE__, "Save and execute"); - me->isa = &HTFWriter; - + me->isa = &HTFWriter; + /* Save the file under a suitably suffixed name */ - - suffix = HTFileSuffix(pres->rep); + + suffix = HTFileSuffix(pres->rep, anchor->content_encoding); fnam = (char *)malloc (L_tmpnam + 16 + strlen(suffix)); + if (fnam == NULL) + outofmem(__FILE__, "HTSaveAndExecute"); tmpnam (fnam); if (suffix) strcat(fnam, suffix); - + me->fp = fopen (fnam, "w"); if (!me->fp) { - HTAlert("Can't open temporary file!"); + HTAlert(CANNOT_OPEN_TEMP); FREE(fnam); FREE(me); return NULL; @@ -266,23 +266,15 @@ PUBLIC HTStream* HTSaveAndExecute ARGS3( /* Make command to process file */ - me->end_command = (char *)malloc ( - (strlen (pres->command) + 10+ 3*strlen(fnam)) - * sizeof (char)); - if (me == NULL) outofmem(__FILE__, "SaveAndExecute"); - - sprintf (me->end_command, pres->command, fnam, fnam, fnam); + me->end_command = 0; + HTSprintf0(&(me->end_command), pres->command, fnam, fnam, fnam); me->remove_command = NULL; /* If needed, put into end_command */ #ifdef NOPE /* Make command to delete file -*/ - me->remove_command = (char *)malloc ( - (strlen (REMOVE_COMMAND) + 10+ strlen(fnam)) - * sizeof (char)); - if (me == NULL) outofmem(__FILE__, "SaveAndExecute"); - - sprintf (me->remove_command, REMOVE_COMMAND, fnam); +*/ + me->remove_command = 0; + HTSprintf0(&(me->remove_command), REMOVE_COMMAND, fnam); #endif me->announce = NO; @@ -311,37 +303,39 @@ PUBLIC HTStream* HTSaveLocally ARGS3( char *fnam; char *answer; CONST char * suffix; - + HTStream* me; - + if (HTClientHost) { - HTAlert("Can't save data to file -- please run WWW locally"); + HTAlert(CANNOT_SAVE_REMOTE); return HTBlackHole(); } - + me = (HTStream*)malloc(sizeof(*me)); if (me == NULL) outofmem(__FILE__, "SaveLocally"); - me->isa = &HTFWriter; + me->isa = &HTFWriter; me->end_command = NULL; me->remove_command = NULL; /* If needed, put into end_command */ me->announce = YES; - + /* Save the file under a suitably suffixed name */ - - suffix = HTFileSuffix(pres->rep); + + suffix = HTFileSuffix(pres->rep, anchor->content_encoding); fnam = (char *)malloc (L_tmpnam + 16 + strlen(suffix)); + if (fnam == NULL) + outofmem(__FILE__, "HTSaveLocally"); tmpnam (fnam); if (suffix) strcat(fnam, suffix); - + /* Save Panel */ - answer = HTPrompt("Give name of file to save in", fnam); - + answer = HTPrompt(GIVE_FILENAME, fnam); + FREE(fnam); - + me->fp = fopen (answer, "w"); if (!me->fp) { - HTAlert("Can't open local file to write into."); + HTAlert(CANNOT_OPEN_OUTPUT); FREE(answer); FREE(me); return NULL; diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFWriter.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFWriter.h index 052bdd7e3a3..b4e79cbce38 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFWriter.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFWriter.h @@ -1,23 +1,15 @@ /* File Writer for libwww C FILE WRITER - + It is useful to have both FWriter and Writer for environments in which fdopen() doesn't exist for example. - + */ #ifndef HTFWRITE_H #define HTFWRITE_H -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ -#include "HTStream.h" -/*#include included by HTUtils.h -- FM */ -#include "HTFormat.h" - -#ifdef SHORT_NAMES -#define HTFWriter_new HTFWnew -#endif +#include +#include extern HTStream * HTFWriter_new PARAMS((FILE * fp)); diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFile.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFile.c index 89a93d14f81..f0b294e7952 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFile.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFile.c @@ -17,35 +17,31 @@ ** 15 Nov 93 (MD) Moved HTVMSname to HTVMSUTILS.C ** 27 Dec 93 (FM) FTP now works with VMS hosts. ** FTP path must be Unix-style and cannot include -** the device or top directory. +** the device or top directory. */ +#include + #ifndef VMS -/* #define LONG_LIST */ /* Define this for long style unix listings (ls -l) */ +#ifdef DOSPATH +#define LONG_LIST /* Define this for long style unix listings (ls -l), + the actual style is configurable from lynx.cfg */ +#define lstat stat +#endif /* #define NO_PARENT_DIR_REFERENCE */ /* Define this for no parent links */ #endif /* !VMS */ #ifdef DOSPATH #define HAVE_READDIR 1 -#include #define USE_DIRENT -#include "HTDOS.h" +#include #endif /* DOSPATH */ -#include "HTUtils.h" -#include "tcp.h" -#include "HTFile.h" /* Implemented here */ +#include /* Implemented here */ #ifdef VMS #include #endif /* VMS */ -#ifndef VMS -#ifdef LONG_LIST -#include -#include -#endif /* LONG_LIST */ -#endif /* !VMS */ - #ifdef USE_ZLIB #include #endif @@ -53,36 +49,29 @@ #define INFINITY 512 /* file name length @@ FIXME */ #define MULTI_SUFFIX ".multi" /* Extension for scanning formats */ -#define HT_EM_SPACE ((char)2) - -#define FREE(x) if (x) {free(x); x = NULL;} - -#ifdef VMS -#include "HTVMSUtils.h" -#endif /* VMS */ - -#include "HTParse.h" -#include "HTTCP.h" +#include +#include #ifndef DECNET -#include "HTFTP.h" +#include #endif /* !DECNET */ -#include "HTAnchor.h" -#include "HTAtom.h" -#include "HTWriter.h" -#include "HTFWriter.h" -#include "HTInit.h" -#include "HTBTree.h" -#include "HTAlert.h" -#include "HTCJK.h" -#include "UCDefs.h" -#include "UCMap.h" -#include "UCAux.h" - -#include "LYexit.h" -#include "LYCharSets.h" -#include "LYGlobalDefs.h" -#include "LYUtils.h" -#include "LYLeaks.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include typedef struct _HTSuffix { char * suffix; @@ -100,7 +89,11 @@ typedef struct _HTSuffix { #endif /* NGROUPS_MAX */ #endif /* NGROUPS */ -#include "HTML.h" /* For directory object building */ +#ifndef GETGROUPS_T +#define GETGROUPS_T int +#endif + +#include /* For directory object building */ #define PUTC(c) (*target->isa->put_character)(target, c) #define PUTS(s) (*target->isa->put_string)(target, s) @@ -109,6 +102,8 @@ typedef struct _HTSuffix { #define MAYBE_END(e) if (HTML_dtd.tags[e].contents != SGML_EMPTY) \ (*target->isa->end_element)(target, e, 0) #define FREE_TARGET (*target->isa->_free)(target) +#define ABORT_TARGET (*targetClass._abort)(target, NULL); + struct _HTStructured { CONST HTStructuredClass * isa; /* ... */ @@ -121,15 +116,10 @@ PUBLIC int HTDirAccess = HT_DIR_OK; #ifdef DIRED_SUPPORT PUBLIC int HTDirReadme = HT_DIR_README_NONE; -#define FILES_FIRST 1 -#define MIXED_STYLE 2 -extern BOOLEAN lynx_edit_mode; -extern BOOLEAN dir_list_style; #else PUBLIC int HTDirReadme = HT_DIR_README_TOP; #endif /* DIRED_SUPPORT */ -extern BOOLEAN LYRawMode; extern BOOL HTPassEightBitRaw; extern HTCJKlang HTCJK; @@ -161,15 +151,48 @@ int exists(char *filename) /* To free up the suffixes at program exit. ** ---------------------------------------- */ +#ifdef LY_FIND_LEAKS PRIVATE void free_suffixes NOPARAMS; +#endif #ifdef LONG_LIST +PRIVATE char *FormatStr ARGS3( + char **, bufp, + char *, start, + CONST char *, entry) +{ + char fmt[512]; + if (*start) { + sprintf(fmt, "%%%.*ss", (int) sizeof(fmt) - 3, start); + HTSprintf0(bufp, fmt, entry); + } else { + HTSprintf0(bufp, "%s", entry); + } + return *bufp; +} + +PRIVATE char *FormatNum ARGS3( + char **, bufp, + char *, start, + int, entry) +{ + char fmt[512]; + if (*start) { + sprintf(fmt, "%%%.*sd", (int) sizeof(fmt) - 3, start); + HTSprintf0(bufp, fmt, entry); + } else { + sprintf(fmt, "%d", entry); + StrAllocCat(*bufp, fmt); + } + return *bufp; +} + PRIVATE void LYListFmtParse ARGS5( - char *, fmtstr, - char *, file, + char *, fmtstr, + char *, file, HTStructured *, target, - char *, entry, - char *, tail) + char *, entry, + char *, tail) { char c; char *s; @@ -177,11 +200,10 @@ PRIVATE void LYListFmtParse ARGS5( char *start; char *str = NULL; struct stat st; - char buf[512]; - char fmt[512]; + char *buf = NULL; + char tmp[LY_MAXPATH]; char type; - struct passwd *p; - struct group *g; + char *name; time_t now; char *datestr; int len; @@ -192,9 +214,16 @@ PRIVATE void LYListFmtParse ARGS5( "r-S", "r-s", "rwS", "rws", 0 }; #define PBIT(a, n, s) (s) ? psbits[((a) >> (n)) & 0x7] : \ pbits[((a) >> (n)) & 0x7] +#ifdef S_ISVTX + static char *ptbits[] = { "--T", "--t", "-wT", "-wt", + "r-T", "r-t", "rwT", "rwt", 0 }; +#define PTBIT(a, s) (s) ? ptbits[(a) & 0x7] : pbits[(a) & 0x7] +#else +#define PTBIT(a, s) PBIT(a, 0, 0) +#endif if (lstat(file, &st) < 0) - fmtstr = "%a"; /* can't stat so just do anchor */ + fmtstr = " %a"; /* can't stat so just do anchor */ StrAllocCopy(str, fmtstr); s = str; @@ -219,33 +248,65 @@ PRIVATE void LYListFmtParse ARGS5( if (s == end) break; start = ++s; - while (isdigit(*s) || *s == '.' || *s == '-') + while (isdigit(*s) || *s == '.' || *s == '-' || *s == ' ' || + *s == '#' || *s == '+' || *s == '\'') s++; - c = *s; /* the format char. or \0 */ + c = *s; /* the format char. or \0 */ *s = '\0'; switch (c) { case '\0': - break; + PUTS(start); + continue; case 'A': case 'a': /* anchor */ HTDirEntry(target, tail, entry); - sprintf(fmt, "%%%ss", start); - sprintf(buf, fmt, entry); + FormatStr(&buf, start, entry); PUTS(buf); END(HTML_A); + *buf = '\0'; #ifdef S_IFLNK - if (c != 'A' && (st.st_mode & S_IFMT) == S_IFLNK && - (len = readlink(file, buf, sizeof(buf))) >= 0) { + if (c != 'A' && S_ISLNK(st.st_mode) && + (len = readlink(file, tmp, sizeof(tmp))) >= 0) { PUTS(" -> "); - buf[len] = '\0'; - PUTS(buf); + tmp[len] = '\0'; + PUTS(tmp); } #endif - *buf = '\0'; break; + case 'T': /* MIME type */ + case 't': /* MIME type description */ + if (S_ISDIR(st.st_mode)) { + if (c != 'T') { + FormatStr(&buf, start, ENTRY_IS_DIRECTORY); + } else { + FormatStr(&buf, start, ""); + } + } else { + CONST char *cp2; + HTFormat format; + format = HTFileFormat(file, NULL, &cp2); + + if (c != 'T') { + if (cp2 == NULL) { + if (!strncmp(HTAtom_name(format), + "application",11)) { + cp2 = HTAtom_name(format) + 12; + if (!strncmp(cp2,"x-",2)) + cp2 += 2; + } else { + cp2 = HTAtom_name(format); + } + } + FormatStr(&buf, start, cp2); + } else { + FormatStr(&buf, start, HTAtom_name(format)); + } + } + break; + case 'd': /* date */ now = time(0); datestr = ctime(&st.st_mtime); @@ -253,32 +314,29 @@ PRIVATE void LYListFmtParse ARGS5( /* ** MMM DD HH:MM */ - sprintf(buf, "%.12s", datestr + 4); + sprintf(tmp, "%.12s", datestr + 4); else /* ** MMM DD YYYY */ - sprintf(buf, "%.7s %.4s ", datestr + 4, - datestr + 20); - sprintf(fmt, "%%%ss", start); - sprintf(buf, fmt, buf); + sprintf(tmp, "%.7s %.4s ", datestr + 4, + datestr + 20); + FormatStr(&buf, start, tmp); break; case 's': /* size in bytes */ - sprintf(fmt, "%%%sd", start); - sprintf(buf, fmt, st.st_size); + FormatNum(&buf, start, (int) st.st_size); break; case 'K': /* size in Kilobytes but not for directories */ - if ((st.st_mode & S_IFMT) == S_IFDIR) { - sprintf(fmt, "%%%ss ", start); - sprintf(buf, fmt, ""); + if (S_ISDIR(st.st_mode)) { + FormatStr(&buf, start, ""); break; } /* FALL THROUGH */ case 'k': /* size in Kilobytes */ - sprintf(fmt, "%%%sdK", start); - sprintf(buf, fmt, (st.st_size+1023)/1024); + FormatNum(&buf, start, (int)((st.st_size+1023)/1024)); + StrAllocCat(buf, "K"); break; case 'p': /* unix-style permission bits */ @@ -294,7 +352,7 @@ PRIVATE void LYListFmtParse ARGS5( case S_IFLNK: type = 'l'; break; #endif #ifdef S_IFSOCK -# ifdef S_IFIFO /* some older machines (e.g., apollo) have a conflict */ +# ifdef S_IFIFO /* some older machines (e.g., apollo) have a conflict */ # if S_IFIFO != S_IFSOCK case S_IFSOCK: type = 's'; break; # endif @@ -304,41 +362,37 @@ PRIVATE void LYListFmtParse ARGS5( #endif /* S_IFSOCK */ default: type = '?'; break; } - sprintf(buf, "%c%s%s%s", type, - PBIT(st.st_mode, 6, st.st_mode & S_ISUID), - PBIT(st.st_mode, 3, st.st_mode & S_ISGID), - PBIT(st.st_mode, 0, 0)); - sprintf(fmt, "%%%ss", start); - sprintf(buf, fmt, buf); + sprintf(tmp, "%c%s%s%s", type, + PBIT(st.st_mode, 6, st.st_mode & S_ISUID), + PBIT(st.st_mode, 3, st.st_mode & S_ISGID), + PTBIT(st.st_mode, st.st_mode & S_ISVTX)); + FormatStr(&buf, start, tmp); break; case 'o': /* owner */ - sprintf(fmt, "%%%ss", start); - p = getpwuid(st.st_uid); - if (p) { - sprintf(fmt, "%%%ss", start); - sprintf(buf, fmt, p->pw_name); + name = HTAA_UidToName (st.st_uid); + if (*name) { + FormatStr(&buf, start, name); } else { - - sprintf(fmt, "%%%sd", start); - sprintf(buf, fmt, st.st_uid); + FormatNum(&buf, start, (int) st.st_uid); } break; case 'g': /* group */ - g = getgrgid(st.st_gid); - if (g) { - sprintf(fmt, "%%%ss", start); - sprintf(buf, fmt, g->gr_name); + name = HTAA_GidToName(st.st_gid); + if (*name) { + FormatStr(&buf, start, name); } else { - sprintf(fmt, "%%%sd", start); - sprintf(buf, fmt, st.st_gid); + FormatNum(&buf, start, (int) st.st_gid); } break; case 'l': /* link count */ - sprintf(fmt, "%%%sd", start); - sprintf(buf, fmt, st.st_nlink); + FormatNum(&buf, start, (int) st.st_nlink); + break; + + case '%': /* literal % with flags/width */ + FormatStr(&buf, start, "%"); break; default: @@ -346,12 +400,14 @@ PRIVATE void LYListFmtParse ARGS5( "Unknown format character `%c' in list format\n", c); break; } - PUTS(buf); + if (buf) + PUTS(buf); s++; } + FREE(buf); END(HTML_PRE); - PUTS("\n"); + PUTC('\n'); FREE(str); } #endif /* LONG_LIST */ @@ -405,7 +461,9 @@ PUBLIC void HTSetSuffix5 ARGS5( */ if (!HTSuffixes) { HTSuffixes = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(free_suffixes); +#endif } HTList_addObject(HTSuffixes, suff); @@ -429,6 +487,7 @@ PUBLIC void HTSetSuffix5 ARGS5( suff->quality = value; } +#ifdef LY_FIND_LEAKS /* ** Purpose: Free all added suffixes. ** Arguments: void @@ -460,60 +519,8 @@ PRIVATE void free_suffixes NOARGS HTList_delete(HTSuffixes); HTSuffixes = NULL; } +#endif /* LY_FIND_LEAKS */ -/* Send README file. -** ----------------- -** -** If a README file exists, then it is inserted into the document here. -*/ -#ifdef HAVE_READDIR -PRIVATE void do_readme ARGS2(HTStructured *, target, CONST char *, localname) -{ - FILE * fp; - char * readme_file_name = - malloc(strlen(localname)+ 1 + strlen(HT_DIR_README_FILE) + 1); - if (readme_file_name == NULL) - outofmem(__FILE__, "do_readme"); - strcpy(readme_file_name, localname); - strcat(readme_file_name, "/"); - strcat(readme_file_name, HT_DIR_README_FILE); - - fp = fopen(readme_file_name, "r"); - - if (fp) { - HTStructuredClass targetClass; - - targetClass = *target->isa; /* (Can't init agregate in K&R) */ - START(HTML_PRE); - for (;;){ - char c = fgetc(fp); - if (c == (char)EOF) break; -#ifdef NOTDEFINED - switch (c) { - case '&': - case '<': - case '>': - PUTC('&'); - PUTC('#'); - PUTC((char)(c / 10)); - PUTC((char) (c % 10)); - PUTC(';'); - break; -/* case '\n': - PUTC('\r'); -Bug removed thanks to joe@athena.mit.edu */ - default: - PUTC(c); - } -#else - PUTC(c); -#endif /* NOTDEFINED */ - } - END(HTML_PRE); - fclose(fp); - } -} -#endif /* HAVE_READDIR */ /* Make the cache file name for a W3 document. ** ------------------------------------------- @@ -531,14 +538,10 @@ PUBLIC char * HTCacheFileName ARGS1( char * acc_method = HTParse(name, "", PARSE_ACCESS); char * host = HTParse(name, "", PARSE_HOST); char * path = HTParse(name, "", PARSE_PATH+PARSE_PUNCTUATION); + char * result = NULL; + + HTSprintf0(&result, "%s/WWW/%s/%s%s", HTCacheRoot, acc_method, host, path); - char * result; - result = (char *)malloc( - strlen(HTCacheRoot)+strlen(acc_method) - +strlen(host)+strlen(path)+6+1); - if (result == NULL) - outofmem(__FILE__, "HTCacheFileName"); - sprintf(result, "%s/WWW/%s/%s%s", HTCacheRoot, acc_method, host, path); FREE(path); FREE(acc_method); FREE(host); @@ -565,71 +568,68 @@ PRIVATE int HTCreatePath ARGS1(CONST char *,path) ** On exit: ** Returns a malloc'ed string which must be freed by the caller. */ -PUBLIC char * HTLocalName ARGS1( - CONST char *, name) +PUBLIC char * HTnameOfFile_WWW ARGS3( + CONST char *, name, + BOOL, WWW_prefix, + BOOL, expand_all) { char * acc_method = HTParse(name, "", PARSE_ACCESS); char * host = HTParse(name, "", PARSE_HOST); char * path = HTParse(name, "", PARSE_PATH+PARSE_PUNCTUATION); + char * home; + char * result = NULL; - HTUnEscape(path); /* Interpret % signs */ + if (expand_all) + HTUnEscape(path); /* Interpret all % signs */ + else + HTUnEscapeSome(path, "/"); /* Interpret % signs for path delims */ - if (0 == strcmp(acc_method, "file")) { /* local file */ - FREE(acc_method); + if (0 == strcmp(acc_method, "file") /* local file */ + || !*acc_method) { /* implicitly local? */ if ((0 == strcasecomp(host, HTHostName())) || (0 == strcasecomp(host, "localhost")) || !*host) { - FREE(host); - if (TRACE) - fprintf(stderr, "Node `%s' means path `%s'\n", name, path); + CTRACE(tfp, "Node `%s' means path `%s'\n", name, path); #ifdef DOSPATH - { - char *ret_path = NULL; - StrAllocCopy(ret_path, HTDOS_name(path)); - if (TRACE) { - fprintf(stderr, "HTDOS_name changed `%s' to `%s'\n", - path, ret_path); - } - FREE(path); - return(ret_path); - } + StrAllocCopy(result, HTDOS_name(path)); +#else +#ifdef __EMX__ + if (path[0] == '/' + && isalpha(path[1]) + && path[2] == ':') /* pesky leading slash */ + StrAllocCopy(result, path+1); + else + StrAllocCopy(result, path); + CTRACE(tfp, "EMX hack changed `%s' to `%s'\n", path, result); #else - return(path); + StrAllocCopy(result, path); +#endif /* __EMX__ */ #endif /* DOSPATH */ + } else if (WWW_prefix) { + HTSprintf0(&result, "%s%s%s", "/Net/", host, path); + CTRACE(tfp, "Node `%s' means file `%s'\n", name, result); } else { - char * result = (char *)malloc( - strlen("/Net/")+strlen(host)+strlen(path)+1); - if (result == NULL) - outofmem(__FILE__, "HTLocalName"); - sprintf(result, "%s%s%s", "/Net/", host, path); - FREE(host); - FREE(path); - if (TRACE) - fprintf(stderr, "Node `%s' means file `%s'\n", name, result); - return result; + StrAllocCopy(result, path); } - } else { /* other access */ - char * result; + } else if (WWW_prefix) { /* other access */ #ifdef VMS - char * home = getenv("HOME"); - if (!home) + if ((home = getenv("HOME")) == 0) home = HTCacheRoot; else home = HTVMS_wwwName(home); #else - CONST char * home = (CONST char*)getenv("HOME"); - if (!home) + if ((home = getenv("HOME")) == 0) home = "/tmp"; #endif /* VMS */ - result = (char *)malloc( - strlen(home)+strlen(acc_method)+strlen(host)+strlen(path)+6+1); - if (result == NULL) - outofmem(__FILE__, "HTLocalName"); - sprintf(result, "%s/WWW/%s/%s%s", home, acc_method, host, path); - FREE(path); - FREE(acc_method); - FREE(host); - return result; + HTSprintf0(&result, "%s/WWW/%s/%s%s", home, acc_method, host, path); + } else { + StrAllocCopy(result, path); } + + FREE(host); + FREE(path); + FREE(acc_method); + + return result; } /* Make a WWW name from a full local path name. @@ -637,34 +637,24 @@ PUBLIC char * HTLocalName ARGS1( ** ** Bugs: ** At present, only the names of two network root nodes are hand-coded -** in and valid for the NeXT only. This should be configurable in +** in and valid for the NeXT only. This should be configurable in ** the general case. */ PUBLIC char * WWW_nameOfFile ARGS1( CONST char *, name) { - char * result; + char * result = NULL; #ifdef NeXT if (0 == strncmp("/private/Net/", name, 13)) { - result = (char *)malloc(7+strlen(name+13)+1); - if (result == NULL) - outofmem(__FILE__, "WWW_nameOfFile"); - sprintf(result, "file://%s", name+13); + HTSprintf0(&result, "file://%s", name+13); } else #endif /* NeXT */ if (0 == strncmp(HTMountRoot, name, 5)) { - result = (char *)malloc(7+strlen(name+5)+1); - if (result == NULL) - outofmem(__FILE__, "WWW_nameOfFile"); - sprintf(result, "file://%s", name+5); + HTSprintf0(&result, "file://%s", name+5); } else { - result = (char *)malloc(7+strlen(HTHostName())+strlen(name)+1); - if (result == NULL) - outofmem(__FILE__, "WWW_nameOfFile"); - sprintf(result, "file://%s%s", HTHostName(), name); + HTSprintf0(&result, "file://%s%s", HTHostName(), name); } - if (TRACE) - fprintf(stderr, "File `%s'\n\tmeans node `%s'\n", name, result); + CTRACE(tfp, "File `%s'\n\tmeans node `%s'\n", name, result); return result; } @@ -859,17 +849,13 @@ PUBLIC HTFormat HTCharsetFormat ARGS3( char *cp = NULL, *cp1, *cp2, *cp3 = NULL, *cp4; BOOL chartrans_ok = FALSE; int chndl = -1; - int i; FREE(anchor->charset); StrAllocCopy(cp, format->name); - for (i = 0; cp[i]; i++) - cp[i] = TOLOWER(cp[i]); + LYLowerCase(cp); if (((cp1 = strchr(cp, ';')) != NULL) && (cp2 = strstr(cp1, "charset")) != NULL) { - if (TRACE) - fprintf(stderr, - "HTCharsetFormat: Extended MIME Content-Type is %s\n", + CTRACE(tfp, "HTCharsetFormat: Extended MIME Content-Type is %s\n", format->name); cp2 += 7; while (*cp2 == ' ' || *cp2 == '=') @@ -896,6 +882,12 @@ PUBLIC HTFormat HTCharsetFormat ARGS3( ** Got something but we don't recognize it. */ chndl = UCLYhndl_for_unrec; + if (chndl < 0) + /* + ** UCLYhndl_for_unrec not defined :-( + ** fallback to UCLYhndl_for_unspec which always valid. + */ + chndl = UCLYhndl_for_unspec; /* always >= 0 */ if (UCCanTranslateFromTo(chndl, current_char_set)) { chartrans_ok = YES; HTAnchor_setUCInfoStage(anchor, chndl, @@ -940,48 +932,48 @@ PUBLIC HTFormat HTCharsetFormat ARGS3( HTPassEightBitRaw = TRUE; } } else if (p_out->enc == UCT_ENC_CJK) { - if (LYRawMode) { - if ((!strcmp(p_in->MIMEname, "euc-jp") || - !strcmp(p_in->MIMEname, "shift_jis")) && - (!strcmp(p_out->MIMEname, "euc-jp") || - !strcmp(p_out->MIMEname, "shift_jis"))) { - HTCJK = JAPANESE; - } else if (!strcmp(p_in->MIMEname, "euc-cn") && - !strcmp(p_out->MIMEname, "euc-cn")) { - HTCJK = CHINESE; - } else if (!strcmp(p_in->MIMEname, "big-5") && - !strcmp(p_out->MIMEname, "big-5")) { - HTCJK = TAIPEI; - } else if (!strcmp(p_in->MIMEname, "euc-kr") && - !strcmp(p_out->MIMEname, "euc-kr")) { - HTCJK = KOREAN; - } else { - HTCJK = NOCJK; - } - } else { - HTCJK = NOCJK; - } + Set_HTCJK(p_in->MIMEname, p_out->MIMEname); } - /* - ** Check for an iso-8859-# we don't know. - FM - */ - } else if (!strncmp(cp4, "iso-8859-", 9) && - isdigit((unsigned char)cp4[9]) && - !strncmp(LYchar_set_names[current_char_set], - "Other ISO Latin", 15)) { + } else { /* - ** Hope it's a match, for now. - FM + ** Cannot translate. + ** If according to some heuristic the given + ** charset and the current display character + ** both are likely to be like ISO-8859 in + ** structure, pretend we have some kind + ** of match. */ - *cp1 = '\0'; - format = HTAtom_for(cp); - cp1 = &cp4[10]; - while (*cp1 && - isdigit((unsigned char)(*cp1))) - cp1++; - *cp1 = '\0'; - StrAllocCopy(anchor->charset, cp4); - HTPassEightBitRaw = TRUE; - HTAlert(anchor->charset); + BOOL given_is_8859 + = (!strncmp(cp4, "iso-8859-", 9) && + isdigit((unsigned char)cp4[9])); + BOOL given_is_8859like + = (given_is_8859 || + !strncmp(cp4, "windows-", 8) || + !strncmp(cp4, "cp12", 4) || + !strncmp(cp4, "cp-12", 5)); + BOOL given_and_display_8859like + = (given_is_8859like && + (strstr(LYchar_set_names[current_char_set], + "ISO-8859") || + strstr(LYchar_set_names[current_char_set], + "windows-"))); + + if (given_and_display_8859like) { + *cp1 = '\0'; + format = HTAtom_for(cp); + } + if (given_is_8859) { + cp1 = &cp4[10]; + while (*cp1 && + isdigit((unsigned char)(*cp1))) + cp1++; + *cp1 = '\0'; + } + if (given_and_display_8859like) { + StrAllocCopy(anchor->charset, cp4); + HTPassEightBitRaw = TRUE; + } + HTAlert(*cp4 ? cp4 : anchor->charset); } FREE(cp3); } else if (cp1 != NULL) { @@ -1033,13 +1025,12 @@ PUBLIC float HTFileValue ARGS1( suff = (HTSuffix *)HTList_objectAt(HTSuffixes, i); ls = strlen(suff->suffix); if ((ls <= lf) && 0==strcmp(suff->suffix, filename + lf - ls)) { - if (TRACE) - fprintf(stderr, "File: Value of %s is %.3f\n", - filename, suff->quality); + CTRACE(tfp, "File: Value of %s is %.3f\n", + filename, suff->quality); return suff->quality; /* OK -- found */ } } - return 0.3; /* Dunno! */ + return 0.3; /* Dunno! */ } /* Determine write access to a file. @@ -1082,15 +1073,11 @@ PUBLIC BOOL HTEditable ARGS1( #ifdef NO_GROUPS return NO; /* Safe answer till we find the correct algorithm */ #else -#ifdef NeXT - int groups[NGROUPS]; -#else - gid_t groups[NGROUPS]; -#endif /* NeXT */ + GETGROUPS_T groups[NGROUPS]; uid_t myUid; - int ngroups; /* The number of groups */ + int ngroups; /* The number of groups */ struct stat fileStatus; - int i; + int i; if (stat(filename, &fileStatus)) /* Get details of filename */ return NO; /* Can't even access file! */ @@ -1100,14 +1087,16 @@ PUBLIC BOOL HTEditable ARGS1( if (TRACE) { int i2; - fprintf(stderr, + fprintf(tfp, "File mode is 0%o, uid=%d, gid=%d. My uid=%d, %d groups (", - (unsigned int) fileStatus.st_mode, fileStatus.st_uid, - fileStatus.st_gid, - myUid, ngroups); + (unsigned int) fileStatus.st_mode, + (int) fileStatus.st_uid, + (int) fileStatus.st_gid, + (int) myUid, + (int) ngroups); for (i2 = 0; i2 < ngroups; i2++) - fprintf(stderr, " %d", groups[i2]); - fprintf(stderr, ")\n"); + fprintf(tfp, " %d", (int) groups[i2]); + fprintf(tfp, ")\n"); } if (fileStatus.st_mode & 0002) /* I can write anyway? */ @@ -1124,8 +1113,7 @@ PUBLIC BOOL HTEditable ARGS1( return YES; } } - if (TRACE) - fprintf(stderr, "\tFile is not editable.\n"); + CTRACE(tfp, "\tFile is not editable.\n"); return NO; /* If no excuse, can't do */ #endif /* NO_GROUPS */ } @@ -1185,10 +1173,8 @@ PUBLIC void HTDirEntry ARGS3( /* ** If empty tail, gives absolute ref below. */ - relative = (char*)malloc(strlen(tail) + strlen(escaped)+2); - if (relative == NULL) - outofmem(__FILE__, "HTDirEntry"); - sprintf(relative, "%s%s%s", + relative = 0; + HTSprintf0(&relative, "%s%s%s", tail, (*escaped != '\0' ? "/" : ""), escaped); @@ -1260,11 +1246,11 @@ PUBLIC BOOL HTDirTitles ARGS3( char * printable = NULL; #ifdef DIRED_SUPPORT - if (0 == strncasecomp(path, "/%2F", 4)) - StrAllocCopy(printable, (path+1)); - else - StrAllocCopy(printable, path); - if (0 == strncasecomp(printable, "/vmsysu%2b", 10) || + printable = HTfullURL_toFile( + (0 == strncasecomp(path, "/%2F", 4)) /* "//" ? */ + ? (path+1) + : path); + if (0 == strncasecomp(printable, "/vmsysu:", 8) || 0 == strncasecomp(printable, "/anonymou.", 10)) { StrAllocCopy(cp, (printable+1)); StrAllocCopy(printable, cp); @@ -1272,30 +1258,30 @@ PUBLIC BOOL HTDirTitles ARGS3( } #else StrAllocCopy(printable, (current ? current + 1 : "")); + HTUnEscape(printable); #endif /* DIRED_SUPPORT */ START(HTML_HEAD); - PUTS("\n"); - HTUnEscape(printable); + PUTC('\n'); START(HTML_TITLE); - PUTS(*printable ? printable : "Welcome"); - PUTS(" directory"); + PUTS(*printable ? printable : WELCOME_MSG); + PUTS(SEGMENT_DIRECTORY); END(HTML_TITLE); - PUTS("\n"); + PUTC('\n'); END(HTML_HEAD); - PUTS("\n"); + PUTC('\n'); #ifdef DIRED_SUPPORT START(HTML_H2); - PUTS(*printable ? "Current directory is " : ""); - PUTS(*printable ? printable : "Welcome"); + PUTS(*printable ? SEGMENT_CURRENT_DIR : ""); + PUTS(*printable ? printable : WELCOME_MSG); END(HTML_H2); - PUTS("\n"); + PUTC('\n'); #else START(HTML_H1); - PUTS(*printable ? printable : "Welcome"); + PUTS(*printable ? printable : WELCOME_MSG); END(HTML_H1); - PUTS("\n"); + PUTC('\n'); #endif /* DIRED_SUPPORT */ if (((0 == strncasecomp(printable, "vmsysu:", 7)) && (cp = strchr(printable, '.')) != NULL && @@ -1330,10 +1316,8 @@ PUBLIC BOOL HTDirTitles ARGS3( return(need_parent_link); } - relative = (char*) malloc(strlen(current) + 4); - if (relative == NULL) - outofmem(__FILE__, "HTDirTitles"); - sprintf(relative, "%s/..", current); + relative = 0; + HTSprintf0(&relative, "%s/..", current); #ifdef DOSPATH if (local_link) @@ -1403,7 +1387,7 @@ PUBLIC BOOL HTDirTitles ARGS3( HTStartAnchor(target, "", relative); FREE(relative); - PUTS("Up to "); + PUTS(SEGMENT_UP_TO); if (parent) { if ((0 == strcmp(current,".")) || (0 == strcmp(current,".."))) { @@ -1420,9 +1404,10 @@ PUBLIC BOOL HTDirTitles ARGS3( FREE(printable); } } else { - PUTS("/"); + PUTC('/'); } END(HTML_A); + PUTC('\n'); } #endif /* !NO_PARENT_DIR_REFERENCE */ @@ -1431,6 +1416,418 @@ PUBLIC BOOL HTDirTitles ARGS3( return(need_parent_link); } +#if defined HAVE_READDIR +/* Send README file. +** ----------------- +** +** If a README file exists, then it is inserted into the document here. +*/ +PRIVATE void do_readme ARGS2(HTStructured *, target, CONST char *, localname) +{ + FILE * fp; + char * readme_file_name = + malloc(strlen(localname)+ 1 + strlen(HT_DIR_README_FILE) + 1); + if (readme_file_name == NULL) + outofmem(__FILE__, "do_readme"); + strcpy(readme_file_name, localname); + strcat(readme_file_name, "/"); + strcat(readme_file_name, HT_DIR_README_FILE); + + fp = fopen(readme_file_name, "r"); + + if (fp) { + HTStructuredClass targetClass; + + targetClass = *target->isa; /* (Can't init agregate in K&R) */ + START(HTML_PRE); + for (;;){ + char c = fgetc(fp); + if (c == (char)EOF) break; +#ifdef NOTDEFINED + switch (c) { + case '&': + case '<': + case '>': + PUTC('&'); + PUTC('#'); + PUTC((char)(c / 10)); + PUTC((char) (c % 10)); + PUTC(';'); + break; +/* case '\n': + PUTC('\r'); +Bug removed thanks to joe@athena.mit.edu */ + default: + PUTC(c); + } +#else + PUTC(c); +#endif /* NOTDEFINED */ + } + END(HTML_PRE); + HTDisplayPartial(); + fclose(fp); + } + FREE(readme_file_name); +} + +PRIVATE int print_local_dir ARGS5( + DIR *, dp, + char *, localname, + HTParentAnchor *, anchor, + HTFormat, format_out, + HTStream *, sink) +{ + HTStructured *target; /* HTML object */ + HTStructuredClass targetClass; + STRUCT_DIRENT * dirbuf; + char *logical = NULL; + char *pathname = NULL; + char *tail = NULL; + BOOL present[HTML_A_ATTRIBUTES]; + char * tmpfilename = NULL; + BOOL need_parent_link = FALSE; + struct stat file_info; + int status; + + CTRACE(tfp, "print_local_dir() started\n"); + + logical = HTAnchor_address((HTAnchor*)anchor); + pathname = HTParse(logical, "", + PARSE_PATH + PARSE_PUNCTUATION); + + if (!strcmp(pathname,"/")) { + /* + ** Root path. + */ + StrAllocCopy (tail, "/foo/.."); + } else { + char *p = strrchr(pathname, '/'); /* find last slash */ + + if (!p) { + /* + ** This probably should not happen, + ** but be prepared if it does. - KW + */ + StrAllocCopy (tail, "/foo/.."); + } else { + /* + ** Take slash off the beginning. + */ + StrAllocCopy(tail, (p + 1)); + } + } + FREE(pathname); + + if (UCLYhndl_HTFile_for_unspec >= 0) { + HTAnchor_setUCInfoStage(anchor, + UCLYhndl_HTFile_for_unspec, + UCT_STAGE_PARSER, + UCT_SETBY_DEFAULT); + } + + target = HTML_new(anchor, format_out, sink); + targetClass = *target->isa; /* Copy routine entry points */ + + { int i; + for (i = 0; i < HTML_A_ATTRIBUTES; i++) + present[i] = (i == HTML_A_HREF); + } + + /* + ** The need_parent_link flag will be set if an + ** "Up to " link was not created for a + ** readable parent in HTDirTitles() because + ** LONG_LIST is defined and NO_PARENT_DIR_REFERENCE + ** is not defined so that need we to create the + ** link via an LYListFmtParse() call. - FM + */ + need_parent_link = HTDirTitles(target, + (HTAnchor *)anchor, FALSE); + +#ifdef DIRED_SUPPORT + if (strncmp(anchor->address, "lynxcgi:", 8)) { + HTAnchor_setFormat((HTParentAnchor *) anchor, WWW_DIRED); + lynx_edit_mode = TRUE; + } +#endif /* DIRED_SUPPORT */ + if (HTDirReadme == HT_DIR_README_TOP) + do_readme(target, localname); + + + { + HTBTree * bt = HTBTree_new((HTComparer)AS_cmp); + int num_of_entries = 0; /* lines counter */ + + _HTProgress (gettext("Reading directory...")); + status = HT_LOADED; /* assume we don't get interrupted */ + while ((dirbuf = readdir(dp)) != NULL) { + /* + ** While there are directory entries to be read... + */ + char * dirname = NULL; + +#ifndef DOSPATH + if (dirbuf->d_ino == 0) + /* + ** If the entry is not being used, skip it. + */ + continue; +#endif + /* + ** Skip self, parent if handled in HTDirTitles() + ** or if NO_PARENT_DIR_REFERENCE is not defined, + ** and any dot files if no_dotfiles is set or + ** show_dotfiles is not set. - FM + */ + if (!strcmp(dirbuf->d_name, ".") /* self */ || + (!strcmp(dirbuf->d_name, "..") /* parent */ && + need_parent_link == FALSE) || + ((strcmp(dirbuf->d_name, "..")) && + (dirbuf->d_name[0] == '.' && + (no_dotfiles || !show_dotfiles)))) + continue; + + StrAllocCopy(tmpfilename, localname); + if (strcmp(localname, "/")) + /* + ** If filename is not root directory. + */ + StrAllocCat(tmpfilename, "/"); + + StrAllocCat(tmpfilename, dirbuf->d_name); + stat(tmpfilename, &file_info); + if (S_ISDIR(file_info.st_mode)) +#ifndef DIRED_SUPPORT + HTSprintf0(&dirname, "D%s",dirbuf->d_name); + else + HTSprintf0(&dirname, "F%s",dirbuf->d_name); + /* D & F to have first directories, then files */ +#else + { + if (dir_list_style == MIXED_STYLE) + HTSprintf0(&dirname, " %s/", dirbuf->d_name); + else if (!strcmp(dirbuf->d_name, "..")) + HTSprintf0(&dirname, "A%s", dirbuf->d_name); + else + HTSprintf0(&dirname, "D%s", dirbuf->d_name); + } + else if (dir_list_style == MIXED_STYLE) + HTSprintf0(&dirname, " %s", dirbuf->d_name); + else if (dir_list_style == FILES_FIRST) + HTSprintf0(&dirname, "C%s", dirbuf->d_name); + /* C & D to have first files, then directories */ + else + HTSprintf0(&dirname, "F%s", dirbuf->d_name); +#endif /* !DIRED_SUPPORT */ + /* + ** Sort dirname in the tree bt. + */ + HTBTree_add(bt, dirname); + +#ifdef DISP_PARTIAL + /* optimize for expensive operation: */ + if (num_of_entries % (partial_threshold > 0 ? + partial_threshold : display_lines) + == 0) { + if (HTCheckForInterrupt()) { + status = HT_PARTIAL_CONTENT; + break; + } + } + num_of_entries++; +#endif /* DISP_PARTIAL */ + + } /* end while directory entries left to read */ + + if (status != HT_PARTIAL_CONTENT) + _HTProgress (gettext("OK")); + else + CTRACE(tfp, "Reading the directory interrupred by user\n"); + + + /* + ** Run through tree printing out in order. + */ + { + HTBTElement * next_element = HTBTree_next(bt,NULL); + /* pick up the first element of the list */ + int num_of_entries_partial = 0; /* lines counter */ + + char state; + /* I for initial (.. file), + D for directory file, + F for file */ + +#ifdef DIRED_SUPPORT + char test; +#endif /* DIRED_SUPPORT */ + state = 'I'; + + while (next_element != NULL) { + char *entry, *file_extra; + + StrAllocCopy(tmpfilename,localname); + if (strcmp(localname, "/")) + /* + ** If filename is not root directory. + */ + StrAllocCat(tmpfilename, "/"); + + StrAllocCat(tmpfilename, + (char *)HTBTree_object(next_element)+1); + /* + ** Append the current entry's filename + ** to the path. + */ + HTSimplify(tmpfilename); + /* + ** Output the directory entry. + */ + if (strcmp((char *) + (HTBTree_object(next_element)), "D..") && + strcmp((char *) + (HTBTree_object(next_element)), "A..")) + { +#ifdef DIRED_SUPPORT + test = (*(char *)(HTBTree_object(next_element)) + == 'D' ? 'D' : 'F'); + if (state != test) { +#ifndef LONG_LIST + if (dir_list_style == FILES_FIRST) { + if (state == 'F') { + END(HTML_DIR); + PUTC('\n'); + } + } else if (dir_list_style != MIXED_STYLE) + if (state == 'D') { + END(HTML_DIR); + PUTC('\n'); + } +#endif /* !LONG_LIST */ + state = + (*(char *)(HTBTree_object(next_element)) + == 'D' ? 'D' : 'F'); + START(HTML_H2); + if (dir_list_style != MIXED_STYLE) { + START(HTML_EM); + PUTS(state == 'D' + ? LABEL_SUBDIRECTORIES + : LABEL_FILES); + END(HTML_EM); + } + END(HTML_H2); + PUTC('\n'); +#ifndef LONG_LIST + START(HTML_DIR); + PUTC('\n'); +#endif /* !LONG_LIST */ + } +#else + if (state != *(char *)(HTBTree_object( + next_element))) { +#ifndef LONG_LIST + if (state == 'D') { + END(HTML_DIR); + PUTC('\n'); + } +#endif /* !LONG_LIST */ + state = + (*(char *)(HTBTree_object(next_element)) + == 'D' ? 'D' : 'F'); + START(HTML_H2); + START(HTML_EM); + PUTS(state == 'D' + ? LABEL_SUBDIRECTORIES + : LABEL_FILES); + END(HTML_EM); + END(HTML_H2); + PUTC('\n'); +#ifndef LONG_LIST + START(HTML_DIR); + PUTC('\n'); +#endif /* !LONG_LIST */ + } +#endif /* DIRED_SUPPORT */ +#ifndef LONG_LIST + START(HTML_LI); +#endif /* !LONG_LIST */ + } + entry = (char*)HTBTree_object(next_element)+1; + file_extra = NULL; + +#ifdef LONG_LIST + LYListFmtParse(list_format, tmpfilename, target, + entry, tail); +#else + HTDirEntry(target, tail, entry); + PUTS(entry); + END(HTML_A); + if (file_extra) { + PUTS(file_extra); + FREE(file_extra); + } + MAYBE_END(HTML_LI); + PUTC('\n'); +#endif /* LONG_LIST */ + + next_element = HTBTree_next(bt, next_element); + /* pick up the next element of the list; + if none, return NULL*/ + + /* optimize for expensive operation: */ +#ifdef DISP_PARTIAL + if (num_of_entries_partial % + (partial_threshold > 0 ? partial_threshold : display_lines) + == 0) { + /* num_of_entries, num_of_entries_partial... */ + /* HTReadProgress...(bytes, 0); */ + HTDisplayPartial(); + + if (HTCheckForInterrupt()) { + _HTProgress (TRANSFER_INTERRUPTED); + status = HT_PARTIAL_CONTENT; + break; + } + } + num_of_entries_partial++; +#endif /* DISP_PARTIAL */ + + } /* end while next_element */ + + if (status == HT_LOADED) { + if (state == 'I') { + START(HTML_P); + PUTS("Empty Directory"); + } +#ifndef LONG_LIST + else + END(HTML_DIR); +#endif /* !LONG_LIST */ + } + } /* end printing out the tree in order */ + + closedir(dp); + FREE(logical); + FREE(tmpfilename); + FREE(tail); + HTBTreeAndObject_free(bt); + + if (status == HT_LOADED) { + if (HTDirReadme == HT_DIR_README_BOTTOM) + do_readme(target, localname); + FREE_TARGET; + } else { + ABORT_TARGET; + } + } + HTFinishDisplayPartial(); + return status; /* document loaded, maybe partial */ +} +#endif /* HAVE_READDIR */ + + + /* Load a document. ** ---------------- ** @@ -1439,7 +1836,7 @@ PUBLIC BOOL HTDirTitles ARGS3( ** This is the physical address of the file ** ** On exit: -** returns <0 Error has occurred. +** returns <0 Error has occurred. ** HTLOADED OK ** */ @@ -1488,7 +1885,11 @@ PUBLIC int HTLoadFile ARGS4( FREE(filename); FREE(nodename); FREE(acc_method); +#ifndef DISABLE_FTP return HTFTPLoad(addr, anchor, format_out, sink); +#else + return -1; +#endif /* DISABLE_FTP */ } else { FREE(newname); FREE(acc_method); @@ -1509,6 +1910,13 @@ PUBLIC int HTLoadFile ARGS4( format = HTAtom_for(anchor->content_type); myEncoding = HTAtom_for(anchor->content_encoding); } else { + int default_UCLYhndl = UCLYhndl_HTFile_for_unspec; + + if (force_old_UCLYhndl_on_reload) { + force_old_UCLYhndl_on_reload = FALSE; + default_UCLYhndl = forced_UCLYhdnl; + } + format = HTFileFormat(filename, &myEncoding, NULL); /* @@ -1517,7 +1925,7 @@ PUBLIC int HTLoadFile ARGS4( ** by the last parameter (fallback will effectively be ** UCLYhndl_for_unspec, by default ISO-8859-1). - kw */ - format = HTCharsetFormat(format, anchor, UCLYhndl_HTFile_for_unspec); + format = HTCharsetFormat(format, anchor, default_UCLYhndl ); } #ifdef VMS @@ -1528,15 +1936,13 @@ PUBLIC int HTLoadFile ARGS4( ** to the directories or files listed. */ if (HTStat(filename, &stat_info) == -1) { - if (TRACE) - fprintf(stderr, "HTLoadFile: Can't stat %s\n", filename); + CTRACE(tfp, "HTLoadFile: Can't stat %s\n", filename); } else { - if (((stat_info.st_mode) & S_IFMT) == S_IFDIR) { + if (S_ISDIR(stat_info.st_mode)) { if (HTDirAccess == HT_DIR_FORBID) { FREE(filename); FREE(nodename); - return HTLoadError(sink, 403, - "Directory browsing is not allowed."); + return HTLoadError(sink, 403, DISALLOWED_DIR_SCAN); } if (HTDirAccess == HT_DIR_SELECTIVE) { @@ -1551,8 +1957,8 @@ PUBLIC int HTLoadFile ARGS4( if (HTStat(enable_file_name, &stat_info) == -1) { FREE(filename); FREE(nodename); - return HTLoadError(sink, 403, - "Selective access is not enabled for this directory"); + FREE(enable_file_name); + return HTLoadError(sink, 403, DISALLOWED_SELECTIVE_ACCESS); } } @@ -1576,16 +1982,15 @@ PUBLIC int HTLoadFile ARGS4( ** If the file wasn't VMS syntax, then perhaps it is Ultrix. */ if (!fp) { - char ultrixname[INFINITY]; - if (TRACE) - fprintf(stderr, "HTLoadFile: Can't open as %s\n", vmsname); - sprintf(ultrixname, "%s::\"%s\"", nodename, filename); + char * ultrixname = 0; + CTRACE(tfp, "HTLoadFile: Can't open as %s\n", vmsname); + HTSprintf0(&ultrixname, "%s::\"%s\"", nodename, filename); fp = fopen(ultrixname, "r", "shr=put", "shr=upd"); if (!fp) { - if (TRACE) - fprintf(stderr, "HTLoadFile: Can't open as %s\n", - ultrixname); + CTRACE(tfp, "HTLoadFile: Can't open as %s\n", + ultrixname); } + FREE(ultrixname); } if (fp) { int len; @@ -1624,9 +2029,7 @@ PUBLIC int HTLoadFile ARGS4( *semicolon = ';'; gzfp = gzopen(vmsname, "rb"); - if (TRACE) - fprintf(stderr, - "HTLoadFile: gzopen of `%s' gives %p\n", + CTRACE(tfp, "HTLoadFile: gzopen of `%s' gives %p\n", vmsname, (void*)gzfp); use_gzread = YES; } else @@ -1672,9 +2075,7 @@ PUBLIC int HTLoadFile ARGS4( *semicolon = ';'; gzfp = gzopen(vmsname, "rb"); - if (TRACE) - fprintf(stderr, - "HTLoadFile: gzopen of `%s' gives %p\n", + CTRACE(tfp, "HTLoadFile: gzopen of `%s' gives %p\n", vmsname, (void*)gzfp); use_gzread = YES; } @@ -1717,7 +2118,7 @@ PUBLIC int HTLoadFile ARGS4( } else { status = HTLoadError(NULL, -(HT_ERROR), - "Could not open file for decompression!"); + FAILED_OPEN_COMPRESSED_FILE); } } else #endif /* USE_ZLIB */ @@ -1757,7 +2158,7 @@ PUBLIC int HTLoadFile ARGS4( if ((strlen(localname) > strlen(MULTI_SUFFIX)) && (0 == strcmp(localname + strlen(localname) - strlen(MULTI_SUFFIX), MULTI_SUFFIX))) { - DIR *dp; + DIR *dp = 0; BOOL forget_multi = NO; STRUCT_DIRENT * dirbuf; @@ -1772,7 +2173,7 @@ PUBLIC int HTLoadFile ARGS4( if (!base || base == localname) { forget_multi = YES; } else { - *base++ = '\0'; /* Just got directory name */ + *base++ = '\0'; /* Just got directory name */ baselen = strlen(base)- strlen(MULTI_SUFFIX); base[baselen] = '\0'; /* Chop off suffix */ @@ -1781,8 +2182,7 @@ PUBLIC int HTLoadFile ARGS4( if (forget_multi || !dp) { FREE(localname); FREE(nodename); - return HTLoadError(sink, 500, - "Multiformat: directory scan failed."); + return HTLoadError(sink, 500, FAILED_DIR_SCAN); } while ((dirbuf = readdir(dp)) != NULL) { @@ -1847,16 +2247,14 @@ PUBLIC int HTLoadFile ARGS4( } } if (value != NO_VALUE_FOUND) { - if (TRACE) - fprintf(stderr, - "HTLoadFile: value of presenting %s is %f\n", + CTRACE(tfp, "HTLoadFile: value of presenting %s is %f\n", HTAtom_name(rep), value); if (value > best) { best_rep = rep; best_enc = enc; best = value; StrAllocCopy(best_name, dirbuf->d_name); - } + } } /* if best so far */ } /* if match */ @@ -1866,15 +2264,14 @@ PUBLIC int HTLoadFile ARGS4( if (best_rep) { format = best_rep; myEncoding = best_enc; - base[-1] = '/'; /* Restore directory name */ + base[-1] = '/'; /* Restore directory name */ base[0] = '\0'; StrAllocCat(localname, best_name); FREE(best_name); } else { /* If not found suitable file */ FREE(localname); FREE(nodename); - return HTLoadError(sink, 403, /* List formats? */ - "Could not find suitable representation for transmission."); + return HTLoadError(sink, 403, FAILED_NO_REPRESENTATION); } /*NOTREACHED*/ } /* if multi suffix */ @@ -1894,9 +2291,8 @@ PUBLIC int HTLoadFile ARGS4( if (stat(localname,&dir_info) == -1) /* get file information */ #endif { - /* if can't read file information */ - if (TRACE) - fprintf(stderr, "HTLoadFile: can't stat %s\n", localname); + /* if can't read file information */ + CTRACE(tfp, "HTLoadFile: can't stat %s\n", localname); } else { /* Stat was OK */ @@ -1904,24 +2300,14 @@ PUBLIC int HTLoadFile ARGS4( if (stat(localname,&dir_info) == -1) dir_info.st_mode = S_IFDIR; #endif - if (((dir_info.st_mode) & S_IFMT) == S_IFDIR) { + if (S_ISDIR(dir_info.st_mode)) { /* ** If localname is a directory. */ - HTStructured *target; /* HTML object */ - HTStructuredClass targetClass; DIR *dp; - STRUCT_DIRENT * dirbuf; - char *logical = NULL; - char *pathname = NULL; - char *tail = NULL; - BOOL present[HTML_A_ATTRIBUTES]; - char * tmpfilename = NULL; - BOOL need_parent_link = FALSE; struct stat file_info; - if (TRACE) - fprintf(stderr, "%s is a directory\n", localname); + CTRACE(tfp, "%s is a directory\n", localname); /* ** Check directory access. @@ -1931,8 +2317,7 @@ PUBLIC int HTLoadFile ARGS4( if (HTDirAccess == HT_DIR_FORBID) { FREE(localname); FREE(nodename); - return HTLoadError(sink, 403, - "Directory browsing is not allowed."); + return HTLoadError(sink, 403, DISALLOWED_DIR_SCAN); } @@ -1948,8 +2333,8 @@ PUBLIC int HTLoadFile ARGS4( if (stat(enable_file_name, &file_info) != 0) { FREE(localname); FREE(nodename); - return HTLoadError(sink, 403, - "Selective access is not enabled for this directory"); + FREE(enable_file_name); + return HTLoadError(sink, 403, DISALLOWED_SELECTIVE_ACCESS); } } @@ -1957,285 +2342,20 @@ PUBLIC int HTLoadFile ARGS4( if (!dp) { FREE(localname); FREE(nodename); - return HTLoadError(sink, 403, - "This directory is not readable."); + return HTLoadError(sink, 403, FAILED_DIR_UNREADABLE); } /* ** Directory access is allowed and possible. */ - logical = HTAnchor_address((HTAnchor*)anchor); - pathname = HTParse(logical, "", - PARSE_PATH + PARSE_PUNCTUATION); - - if (!strcmp(pathname,"/")) { - /* - ** Root path. - */ - StrAllocCopy (tail, "/foo/.."); - } else { - char *p = strrchr(pathname, '/'); /* find last slash */ - - if (!p) { - /* - ** This probably should not happen, - ** but be prepared if it does. - KW - */ - StrAllocCopy (tail, "/foo/.."); - } else { - /* - ** Take slash off the beginning. - */ - StrAllocCopy(tail, (p + 1)); - } - } - FREE(pathname); - - if (UCLYhndl_HTFile_for_unspec >= 0) { - HTAnchor_setUCInfoStage(anchor, - UCLYhndl_HTFile_for_unspec, - UCT_STAGE_PARSER, - UCT_SETBY_DEFAULT); - } - - target = HTML_new(anchor, format_out, sink); - targetClass = *target->isa; /* Copy routine entry points */ - - { int i; - for (i = 0; i < HTML_A_ATTRIBUTES; i++) - present[i] = (i == HTML_A_HREF); - } - - /* - ** The need_parent_link flag will be set if an - ** "Up to " link was not created for a - ** readable parent in HTDirTitles() because - ** LONG_LIST is defined and NO_PARENT_DIR_REFERENCE - ** is not defined so that need we to create the - ** link via an LYListFmtParse() call. - FM - */ - need_parent_link = HTDirTitles(target, - (HTAnchor *)anchor, FALSE); -#ifdef DIRED_SUPPORT - if (strncmp(anchor->address, "lynxcgi:", 8)) { - HTAnchor_setFormat((HTParentAnchor *) anchor, WWW_DIRED); - lynx_edit_mode = TRUE; - } -#endif /* DIRED_SUPPORT */ - if (HTDirReadme == HT_DIR_README_TOP) - do_readme(target, localname); - { - HTBTree * bt = HTBTree_new((HTComparer)strcmp); - - while ((dirbuf = readdir(dp)) != NULL) { - /* - ** While there are directory entries to be read... - */ - char * dirname = NULL; - -#ifndef DOSPATH - if (dirbuf->d_ino == 0) - /* - ** If the entry is not being used, skip it. - */ - continue; -#endif - /* - ** Skip self, parent if handled in HTDirTitles() - ** or if NO_PARENT_DIR_REFERENCE is not defined, - ** and any dot files if no_dotfiles is set or - ** show_dotfiles is not set. - FM - */ - if (!strcmp(dirbuf->d_name, ".") /* self */ || - (!strcmp(dirbuf->d_name, "..") /* parent */ && - need_parent_link == FALSE) || - ((strcmp(dirbuf->d_name, "..")) && - (dirbuf->d_name[0] == '.' && - (no_dotfiles || !show_dotfiles)))) - continue; - - dirname = (char *)malloc(strlen(dirbuf->d_name) + 4); - if (dirname == NULL) - outofmem(__FILE__, "HTLoadFile"); - StrAllocCopy(tmpfilename, localname); - if (strcmp(localname, "/")) - /* - ** If filename is not root directory. - */ - StrAllocCat(tmpfilename, "/"); - - StrAllocCat(tmpfilename, dirbuf->d_name); - stat(tmpfilename, &file_info); - if (((file_info.st_mode) & S_IFMT) == S_IFDIR) -#ifndef DIRED_SUPPORT - sprintf((char *)dirname, "D%s",dirbuf->d_name); - else - sprintf((char *)dirname, "F%s",dirbuf->d_name); - /* D & F to have first directories, then files */ -#else - if (dir_list_style == MIXED_STYLE) - sprintf((char *)dirname, - " %s/", dirbuf->d_name); - else if (!strcmp(dirbuf->d_name, "..")) - sprintf((char *)dirname, - "A%s", dirbuf->d_name); - else - sprintf((char *)dirname, - "D%s", dirbuf->d_name); - else if (dir_list_style == MIXED_STYLE) - sprintf((char *)dirname, " %s", dirbuf->d_name); - else if (dir_list_style == FILES_FIRST) - sprintf((char *)dirname, "C%s", dirbuf->d_name); - /* C & D to have first files, then directories */ - else - sprintf((char *)dirname, "F%s", dirbuf->d_name); -#endif /* !DIRED_SUPPORT */ - /* - ** Sort dirname in the tree bt. - */ - HTBTree_add(bt, dirname); - } - - /* - ** Run through tree printing out in order. - */ - { - HTBTElement * next_element = HTBTree_next(bt,NULL); - /* pick up the first element of the list */ - char state; - /* I for initial (.. file), - D for directory file, - F for file */ - -#ifdef DIRED_SUPPORT - char test; -#endif /* DIRED_SUPPORT */ - state = 'I'; - - while (next_element != NULL) { - char *entry, *file_extra; - - StrAllocCopy(tmpfilename,localname); - if (strcmp(localname, "/")) - /* - ** If filename is not root directory. - */ - StrAllocCat(tmpfilename, "/"); - - StrAllocCat(tmpfilename, - (char *)HTBTree_object(next_element)+1); - /* - ** Append the current entry's filename - ** to the path. - */ - HTSimplify(tmpfilename); - /* - ** Output the directory entry. - */ - if (strcmp((char *) - (HTBTree_object(next_element)), "D..") && - strcmp((char *) - (HTBTree_object(next_element)), "A..")) - { -#ifdef DIRED_SUPPORT - test = (*(char *)(HTBTree_object(next_element)) - == 'D' ? 'D' : 'F'); - if (state != test) { -#ifndef LONG_LIST - if (dir_list_style == FILES_FIRST) { - if (state == 'F') - END(HTML_DIR); - } else if (dir_list_style != MIXED_STYLE) - if (state == 'D') - END(HTML_DIR); -#endif /* !LONG_LIST */ - state = - (*(char *)(HTBTree_object(next_element)) - == 'D' ? 'D' : 'F'); - START(HTML_H2); - if (dir_list_style != MIXED_STYLE) { - START(HTML_EM); - PUTS(state == 'D' ? - "Subdirectories:" : "Files:"); - END(HTML_EM); - } - END(HTML_H2); -#ifndef LONG_LIST - START(HTML_DIR); -#endif /* !LONG_LIST */ - } -#else - if (state != *(char *)(HTBTree_object( - next_element))) { -#ifndef LONG_LIST - if (state == 'D') - END(HTML_DIR); -#endif /* !LONG_LIST */ - state = - (*(char *)(HTBTree_object(next_element)) - == 'D' ? 'D' : 'F'); - START(HTML_H2); - START(HTML_EM); - PUTS(state == 'D' ? - "Subdirectories:" : "Files:"); - END(HTML_EM); - END(HTML_H2); -#ifndef LONG_LIST - START(HTML_DIR); -#endif /* !LONG_LIST */ - } -#endif /* DIRED_SUPPORT */ -#ifndef LONG_LIST - START(HTML_LI); -#endif /* !LONG_LIST */ - } - entry = (char*)HTBTree_object(next_element)+1; - file_extra = NULL; - -#ifdef LONG_LIST - LYListFmtParse(list_format, tmpfilename, target, - entry, tail); -#else - HTDirEntry(target, tail, entry); - PUTS(entry); - END(HTML_A); - if (file_extra) { - PUTS(file_extra); - FREE(file_extra); - } - MAYBE_END(HTML_LI); -#endif /* LONG_LIST */ - - next_element = HTBTree_next(bt, next_element); - /* pick up the next element of the list; - if none, return NULL*/ - } - if (state == 'I') { - START(HTML_P); - PUTS("Empty Directory"); - } -#ifndef LONG_LIST - else - END(HTML_DIR); -#endif /* !LONG_LIST */ - } - /* end while directory entries left to read */ - closedir(dp); - FREE(logical); - FREE(tmpfilename); - FREE(tail); - HTBTreeAndObject_free(bt); - - if (HTDirReadme == HT_DIR_README_BOTTOM) - do_readme(target, localname); - FREE_TARGET; - FREE(localname); - FREE(nodename); - return HT_LOADED; /* document loaded */ - } + status = print_local_dir(dp, localname, + anchor, format_out, sink); + FREE(localname); + FREE(nodename); + return status; /* document loaded, maybe partial */ - } /* end if localname is directory */ + } /* end if localname is a directory */ } /* end if file stat worked */ @@ -2243,10 +2363,15 @@ PUBLIC int HTLoadFile ARGS4( */ #endif /* HAVE_READDIR */ { +# ifdef __EMX__ + int len = strlen(localname); + int bin = ((len > 3) && !strcasecomp(localname + len - 3, ".gz")); + FILE * fp = fopen(localname, (bin ? "rb" : "r")); +# else /* !( defined __EMX__ ) */ FILE * fp = fopen(localname, "r"); +# endif - if (TRACE) - fprintf (stderr, "HTLoadFile: Opening `%s' gives %p\n", + CTRACE (tfp, "HTLoadFile: Opening `%s' gives %p\n", localname, (void*)fp); if (fp) { /* Good! */ int len; @@ -2275,9 +2400,7 @@ PUBLIC int HTLoadFile ARGS4( fclose(fp); gzfp = gzopen(localname, "rb"); - if (TRACE) - fprintf(stderr, - "HTLoadFile: gzopen of `%s' gives %p\n", + CTRACE(tfp, "HTLoadFile: gzopen of `%s' gives %p\n", localname, (void*)gzfp); use_gzread = YES; } else @@ -2316,9 +2439,7 @@ PUBLIC int HTLoadFile ARGS4( fclose(fp); gzfp = gzopen(localname, "rb"); - if (TRACE) - fprintf(stderr, - "HTLoadFile: gzopen of `%s' gives %p\n", + CTRACE(tfp, "HTLoadFile: gzopen of `%s' gives %p\n", localname, (void*)gzfp); use_gzread = YES; } @@ -2358,7 +2479,7 @@ PUBLIC int HTLoadFile ARGS4( } else { status = HTLoadError(NULL, -(HT_ERROR), - "Could not open file for decompression!"); + FAILED_OPEN_COMPRESSED_FILE); } } else #endif /* USE_ZLIB */ @@ -2394,7 +2515,11 @@ PUBLIC int HTLoadFile ARGS4( * is file://localhost */ } else { +#ifndef DISABLE_FTP return HTFTPLoad(addr, anchor, format_out, sink); +#else + return -1; +#endif /* DISABLE_FTP */ } } FREE(nodename); @@ -2405,10 +2530,9 @@ PUBLIC int HTLoadFile ARGS4( ** All attempts have failed. */ { - if (TRACE) - fprintf(stderr, "Can't open `%s', errno=%d\n", addr, SOCKET_ERRNO); + CTRACE(tfp, "Can't open `%s', errno=%d\n", addr, SOCKET_ERRNO); - return HTLoadError(sink, 403, "Can't access requested file."); + return HTLoadError(sink, 403, FAILED_FILE_UNREADABLE); } } diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFile.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFile.h index b65c17e73f4..a88b12854a5 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFile.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFile.h @@ -10,10 +10,10 @@ #ifndef HTFILE_H #define HTFILE_H -#include "HTFormat.h" -#include "HTAccess.h" +#include +#include #ifndef HTML_H -#include "HTML.h" /* SCW */ +#include /* SCW */ #endif /* HTML_H */ /* @@ -42,12 +42,15 @@ extern int HTDirReadme; /* Include readme files in listing? */ /* ** Convert filenames between local and WWW formats */ -extern char * HTLocalName PARAMS((CONST char * name)); +extern char * HTnameOfFile_WWW PARAMS((CONST char * name, BOOL WWW_prefix, BOOL expand_all)); +#define HTLocalName(name) HTnameOfFile_WWW(name,TRUE,TRUE) +#define HTfullURL_toFile(name) HTnameOfFile_WWW(name,FALSE,TRUE) +#define HTpartURL_toFile(name) HTnameOfFile_WWW(name,FALSE,FALSE) /* ** Make a WWW name from a full local path name */ -extern char * WWW_nameOfFile PARAMS((const char * name)); +extern char * WWW_nameOfFile PARAMS((CONST char * name)); /* ** Generate the name of a cache file diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFinger.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFinger.c index e714e0d20f0..08f9763e506 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFinger.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFinger.c @@ -25,31 +25,30 @@ ** relayed from HTLoadGopher. - FM */ -#include "HTUtils.h" -#include "tcp.h" -#include "HTAlert.h" -#include "HTML.h" -#include "HTParse.h" -#include "HTFormat.h" -#include "HTTCP.h" -#include "HTString.h" -#include "HTFinger.h" +#include -#include "LYLeaks.h" +#ifndef DISABLE_FINGER -/* #define TRACE 1 */ +#include +#include +#include +#include +#include +#include +#include + +#include +#include #define FINGER_PORT 79 /* See rfc742 */ #define BIG 1024 /* Bug */ -#define FREE(x) if (x) {free(x); x = NULL;} - #define PUTC(c) (*targetClass.put_character)(target, c) #define PUTS(s) (*targetClass.put_string)(target, s) #define START(e) (*targetClass.start_element)(target, e, 0, 0, -1, 0) #define END(e) (*targetClass.end_element)(target, e, 0) #define FREE_TARGET (*targetClass._free)(target) -#define NEXT_CHAR HTGetCharacter() +#define NEXT_CHAR HTGetCharacter() /* Module-wide variables @@ -83,15 +82,15 @@ PRIVATE void start_anchor ARGS1(CONST char *, href) { BOOL present[HTML_A_ATTRIBUTES]; CONST char* value[HTML_A_ATTRIBUTES]; - + { - int i; - for(i=0; i= 0; i--) { - if (cmd[i] == LF || cmd[i] == CR) { + if (cmd[i] == LF || cmd[i] == CR) { cmd[i] = '\0'; } else { break; @@ -184,24 +179,21 @@ PRIVATE int response ARGS5( PUTS(cmd); FREE(cmd); END(HTML_H1); - PUTS("\n"); + PUTC('\n'); START(HTML_PRE); - while ((ch=NEXT_CHAR) != (char)EOF) { + while ((ch=NEXT_CHAR) != EOF) { if (interrupted_in_htgetcharacter) { - if (TRACE) { - fprintf(stderr, - "HTFinger: Interrupted in HTGetCharacter, apparently.\n"); - } - _HTProgress ("Connection interrupted."); + CTRACE(tfp, "HTFinger: Interrupted in HTGetCharacter, apparently.\n"); + _HTProgress (CONNECTION_INTERRUPTED); goto end_html; - } + } if (ch != LF) { *p = ch; /* Put character in line */ if (p < &line[BIG-1]) { - p++; + p++; } } else { *p = '\0'; /* Terminate line */ @@ -226,13 +218,13 @@ PRIVATE int response ARGS5( strncmp(l, "wais://", 7) && strncmp(l, "mailto:", 7) && strncmp(l, "cso://", 6) && - strncmp(l, "gopher://", 9)) + strncmp(l, "gopher://", 9)) PUTC(*l++); else { StrAllocCopy(href, l); start_anchor(strtok(href, " \r\n\t,>)\"")); while (*l && !strchr(" \r\n\t,>)\"", *l)) - PUTC(*l++); + PUTC(*l++); END(HTML_A); FREE(href); } @@ -245,11 +237,11 @@ PRIVATE int response ARGS5( end_html: END(HTML_PRE); - PUTS("\n"); + PUTC('\n'); END(HTML_BODY); - PUTS("\n"); + PUTC('\n'); END(HTML_HTML); - PUTS("\n"); + PUTC('\n'); FREE_TARGET; return(0); } @@ -269,162 +261,150 @@ PUBLIC int HTLoadFinger ARGS4( char *command, *str; /* Buffers */ int port; /* Port number from URL */ int status; /* tcp return */ - - if (TRACE) { - fprintf(stderr, "HTFinger: Looking for %s\n", (arg ? arg : "NULL")); - } - + + CTRACE(tfp, "HTFinger: Looking for %s\n", (arg ? arg : "NULL")); + if (!(arg && *arg)) { - HTAlert("Could not load data."); + HTAlert(COULD_NOT_LOAD_DATA); return HT_NOT_LOADED; /* Ignore if no name */ } - - if (!initialized) - initialized = initialize(); + + if (!initialized) + initialized = initialize(); if (!initialized) { - HTAlert ("Could not set up finger connection."); + HTAlert (gettext("Could not set up finger connection.")); return HT_NOT_LOADED; /* FAIL */ } - + { CONST char * p1=arg; BOOL IsGopherURL = FALSE; - + /* Set up the host and command fields. - */ + */ if (!strncasecomp(arg, "finger://", 9)) { - p1 = arg + 9; /* Skip "finger://" prefix */ + p1 = arg + 9; /* Skip "finger://" prefix */ } else if (!strncasecomp(arg, "gopher://", 9)) { - p1 = arg + 9; /* Skip "gopher://" prefix */ + p1 = arg + 9; /* Skip "gopher://" prefix */ IsGopherURL = TRUE; } sitename = (char *)p1; if ((slash = strchr(sitename, '/')) != NULL) { - *slash++ = '\0'; + *slash++ = '\0'; HTUnEscape(slash); if (IsGopherURL) { if (*slash != '0') { - HTAlert("Could not load data."); + HTAlert(COULD_NOT_LOAD_DATA); return HT_NOT_LOADED; /* FAIL */ } *slash++ = '\0'; } } if ((at_sign = strchr(sitename, '@')) != NULL) { - if (IsGopherURL) { - HTAlert("Could not load data."); + if (IsGopherURL) { + HTAlert(COULD_NOT_LOAD_DATA); return HT_NOT_LOADED; /* FAIL */ } - *at_sign++ = '\0'; - username = sitename; + *at_sign++ = '\0'; + username = sitename; sitename = at_sign; HTUnEscape(username); } else if (slash) { - username = slash; + username = slash; } else { - username = ""; + username = ""; } - + if (*sitename == '\0') { - HTAlert("Could not load data (no sitename in finger URL)"); + HTAlert(gettext("Could not load data (no sitename in finger URL)")); return HT_NOT_LOADED; /* Ignore if no name */ } if ((colon = strchr(sitename, ':')) != NULL) { - *colon++ = '\0'; + *colon++ = '\0'; port = atoi(colon); if (port != 79) { - HTAlert("Invalid port number - will only use port 79!"); + HTAlert(gettext("Invalid port number - will only use port 79!")); return HT_NOT_LOADED; /* Ignore if wrong port */ } } /* Load the string for making a connection/ */ - str = (char *)calloc(1, (strlen(sitename) + 10)); - if (str == NULL) - outofmem(__FILE__, "HTLoadFinger"); - sprintf(str, "lose://%s/", sitename); - + str = 0; + HTSprintf0(&str, "lose://%s/", sitename); + /* Load the command for the finger server. */ - command = (char *)calloc(1, (strlen(username) + 10)); - if (command == NULL) - outofmem(__FILE__, "HTLoadFinger"); + command = 0; if (at_sign && slash) { - if (*slash == 'w' || *slash == 'W') { - sprintf(command, "/w %s%c%c", username, CR, LF); + if (*slash == 'w' || *slash == 'W') { + HTSprintf0(&command, "/w %s%c%c", username, CR, LF); } else { - sprintf(command, "%s%c%c", username, CR, LF); + HTSprintf0(&command, "%s%c%c", username, CR, LF); } } else if (at_sign) { - sprintf(command, "%s%c%c", username, CR, LF); + HTSprintf0(&command, "%s%c%c", username, CR, LF); } else if (*username == '/') { - if ((slash = strchr((username+1), '/')) != NULL) { + if ((slash = strchr((username+1), '/')) != NULL) { *slash = ' '; } - sprintf(command, "%s%c%c", username, CR, LF); + HTSprintf0(&command, "%s%c%c", username, CR, LF); } else if ((*username == 'w' || *username == 'W') && - *(username+1) == '/') { + *(username+1) == '/') { if (*username+2 != '\0') { *(username+1) = ' '; } else { *(username+1) = '\0'; } - sprintf(command, "/%s%c%c", username, CR, LF); + HTSprintf0(&command, "/%s%c%c", username, CR, LF); } else if ((*username == 'w' || *username == 'W') && - *(username+1) == '\0') { - sprintf(command, "/%s%c%c", username, CR, LF); + *(username+1) == '\0') { + HTSprintf0(&command, "/%s%c%c", username, CR, LF); } else if ((slash = strchr(username, '/')) != NULL) { *slash++ = '\0'; if (*slash == 'w' || *slash == 'W') { - sprintf(command, "/w %s%c%c", username, CR, LF); + HTSprintf0(&command, "/w %s%c%c", username, CR, LF); } else { - sprintf(command, "%s%c%c", username, CR, LF); + HTSprintf0(&command, "%s%c%c", username, CR, LF); } } else { - sprintf(command, "%s%c%c", username, CR, LF); + HTSprintf0(&command, "%s%c%c", username, CR, LF); } } /* scope of p1 */ - + /* Now, let's get a stream setup up from the FingerHost: ** CONNECTING to finger host */ - if (TRACE) - fprintf(stderr, "HTFinger: doing HTDoConnect on '%s'\n", str); + CTRACE(tfp, "HTFinger: doing HTDoConnect on '%s'\n", str); status = HTDoConnect(str, "finger", FINGER_PORT, &s); - if (TRACE) - fprintf(stderr, "HTFinger: Done DoConnect; status %d\n", status); + CTRACE(tfp, "HTFinger: Done DoConnect; status %d\n", status); if (status == HT_INTERRUPTED) { - /* Interrupt cleanly */ - if (TRACE) - fprintf(stderr, - "HTFinger: Interrupted on connect; recovering cleanly.\n"); - HTProgress ("Connection interrupted."); + /* Interrupt cleanly */ + CTRACE(tfp, "HTFinger: Interrupted on connect; recovering cleanly.\n"); + HTProgress (CONNECTION_INTERRUPTED); FREE(str); FREE(command); return HT_NOT_LOADED; } if (status < 0) { - NETCLOSE(s); + NETCLOSE(s); s = -1; - if (TRACE) - fprintf(stderr, "HTFinger: Unable to connect to finger host.\n"); - HTAlert("Could not access finger host."); + CTRACE(tfp, "HTFinger: Unable to connect to finger host.\n"); + HTAlert(gettext("Could not access finger host.")); FREE(str); FREE(command); return HT_NOT_LOADED; /* FAIL */ } - if (TRACE) - fprintf(stderr, "HTFinger: Connected to finger host '%s'.\n", str); + CTRACE(tfp, "HTFinger: Connected to finger host '%s'.\n", str); FREE(str); /* Send the command, and process response if successful. */ if (response(command, sitename, anAnchor, format_out, stream) != 0) { - HTAlert("No response from finger server."); + HTAlert(gettext("No response from finger server.")); FREE(command); return HT_NOT_LOADED; } @@ -439,3 +419,5 @@ GLOBALDEF (HTProtocol, HTFinger, _HTFINGER_C_1_INIT); #else GLOBALDEF PUBLIC HTProtocol HTFinger = { "finger", HTLoadFinger, NULL }; #endif /* GLOBALDEF_IS_MACRO */ + +#endif /* not DISABLE_FINGER */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFinger.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFinger.h index 98d98070900..8fece0ecade 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFinger.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFinger.h @@ -6,8 +6,8 @@ #ifndef HTFINGER_H #define HTFINGER_H -#include "HTAccess.h" -#include "HTAnchor.h" +#include +#include #ifdef GLOBALREF_IS_MACRO extern GLOBALREF (HTProtocol, HTFinger); diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFormat.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFormat.c index c05af1fa255..f214b536966 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFormat.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFormat.c @@ -10,13 +10,11 @@ ** */ -#include "HTUtils.h" -#include "tcp.h" -#include "HTAccess.h" +#include /* Implements: */ -#include "HTFormat.h" +#include PUBLIC float HTMaxSecs = 1e10; /* No effective limit */ PUBLIC float HTMaxLength = 1e10; /* No effective limit */ @@ -31,29 +29,25 @@ PUBLIC long int HTMaxBytes = 0; /* No effective limit */ #endif /* NeXT */ #endif /* unix */ -#include "HTML.h" -#include "HTMLDTD.h" -#include "HText.h" -#include "HTAlert.h" -#include "HTList.h" -#include "HTInit.h" -#include "HTTCP.h" +#include +#include +#include +#include +#include +#include +#include /* Streams and structured streams which we use: */ -#include "HTFWriter.h" -#include "HTPlain.h" -#include "SGML.h" -#include "HTML.h" -#include "HTMLGen.h" +#include +#include +#include +#include -#include "LYexit.h" -#include "LYUtils.h" -#include "LYGlobalDefs.h" -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} - -extern int HTCheckForInterrupt NOPARAMS; +#include +#include +#include +#include +#include PUBLIC BOOL HTOutputSource = NO; /* Flag: shortcut parser to stdout */ /* extern BOOL interactive; LJM */ @@ -81,7 +75,9 @@ PUBLIC HTPresentation * default_presentation = NULL; /* * To free off the presentation list. */ +#ifdef LY_FIND_LEAKS PRIVATE void HTFreePresentations NOPARAMS; +#endif /* Define a presentation system command for a content-type ** ------------------------------------------------------- @@ -100,7 +96,7 @@ PUBLIC void HTSetPresentation ARGS6( pres->rep = HTAtom_for(representation); pres->rep_out = WWW_PRESENT; /* Fixed for now ... :-) */ - pres->converter = HTSaveAndExecute; /* Fixed for now ... */ + pres->converter = HTSaveAndExecute; /* Fixed for now ... */ pres->quality = quality; pres->secs = secs; pres->secs_per_byte = secs_per_byte; @@ -114,7 +110,9 @@ PUBLIC void HTSetPresentation ARGS6( */ if (!HTPresentations) { HTPresentations = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(HTFreePresentations); +#endif } if (strcmp(representation, "*")==0) { @@ -157,12 +155,15 @@ PUBLIC void HTSetConversion ARGS7( */ if (!HTPresentations) { HTPresentations = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(HTFreePresentations); +#endif } HTList_addObject(HTPresentations, pres); } +#ifdef LY_FIND_LEAKS /* ** Purpose: Free the presentation list. ** Arguments: void @@ -195,6 +196,7 @@ PRIVATE void HTFreePresentations NOARGS HTList_delete(HTPresentations); HTPresentations = NULL; } +#endif /* LY_FIND_LEAKS */ /* File buffering ** -------------- @@ -223,7 +225,7 @@ PUBLIC void HTInitInput ARGS1 (int,file_number) } PUBLIC int interrupted_in_htgetcharacter = 0; -PUBLIC char HTGetCharacter NOARGS +PUBLIC int HTGetCharacter NOARGS { char ch; interrupted_in_htgetcharacter = 0; @@ -233,18 +235,15 @@ PUBLIC char HTGetCharacter NOARGS input_buffer, INPUT_BUFFER_SIZE); if (status <= 0) { if (status == 0) - return (char)EOF; + return EOF; if (status == HT_INTERRUPTED) { - if (TRACE) - fprintf(stderr, - "HTFormat: Interrupted in HTGetCharacter\n"); + CTRACE(tfp, "HTFormat: Interrupted in HTGetCharacter\n"); interrupted_in_htgetcharacter = 1; - return (char)EOF; + return EOF; } - if (TRACE) - fprintf(stderr, "HTFormat: File read error %d\n", status); - return (char)EOF; /* -1 is returned by UCX - at end of HTTP link */ + CTRACE(tfp, "HTFormat: File read error %d\n", status); + return EOF; /* -1 is returned by UCX + at end of HTTP link */ } input_pointer = input_buffer; input_limit = input_buffer + status; @@ -252,7 +251,7 @@ PUBLIC char HTGetCharacter NOARGS ch = *input_pointer++; } while (ch == (char) 13); /* Ignore ASCII carriage return */ - return FROMASCII(ch); + return FROMASCII((unsigned char)ch); } /* Match maintype to any MIME type starting with maintype, @@ -266,9 +265,8 @@ PRIVATE int half_match ARGS2(char *,trial_type, char *,target) if (!cp || *(cp+1) != '*') return 0; - if (TRACE) - fprintf(stderr,"HTFormat: comparing %s and %s for half match\n", - trial_type, target); + CTRACE(tfp, "HTFormat: comparing %s and %s for half match\n", + trial_type, target); /* main type matches */ if (!strncmp(trial_type, target, (cp-trial_type)-1)) @@ -295,9 +293,7 @@ PRIVATE HTPresentation * HTFindPresentation ARGS3( { HTAtom * wildcard = HTAtom_for("*"); - if (TRACE) - fprintf(stderr, - "HTFormat: Looking up presentation for %s to %s\n", + CTRACE(tfp, "HTFormat: Looking up presentation for %s to %s\n", HTAtom_name(rep_in), HTAtom_name(rep_out)); /* don't do anymore do it in the Lynx code at startup LJM */ @@ -316,9 +312,7 @@ PRIVATE HTPresentation * HTFindPresentation ARGS3( pres = (HTPresentation *)HTList_objectAt(HTPresentations, i); if (pres->rep == rep_in) { if (pres->rep_out == rep_out) { - if (TRACE) - fprintf(stderr, - "FindPresentation: found exact match: %s\n", + CTRACE(tfp, "FindPresentation: found exact match: %s\n", HTAtom_name(pres->rep)); return pres; @@ -328,9 +322,7 @@ PRIVATE HTPresentation * HTFindPresentation ARGS3( if (!strong_wildcard_match) strong_wildcard_match = pres; /* otherwise use the first one */ - if (TRACE) - fprintf(stderr, - "StreamStack: found strong wildcard match: %s\n", + CTRACE(tfp, "StreamStack: found strong wildcard match: %s\n", HTAtom_name(pres->rep)); } @@ -343,9 +335,7 @@ PRIVATE HTPresentation * HTFindPresentation ARGS3( if (!strong_subtype_wildcard_match) strong_subtype_wildcard_match = pres; /* otherwise use the first one */ - if (TRACE) - fprintf(stderr, - "StreamStack: found strong subtype wildcard match: %s\n", + CTRACE(tfp, "StreamStack: found strong subtype wildcard match: %s\n", HTAtom_name(pres->rep)); } } @@ -355,9 +345,7 @@ PRIVATE HTPresentation * HTFindPresentation ARGS3( if (!weak_wildcard_match) weak_wildcard_match = pres; /* otherwise use the first one */ - if (TRACE) - fprintf(stderr, - "StreamStack: found weak wildcard match: %s\n", + CTRACE(tfp, "StreamStack: found weak wildcard match: %s\n", HTAtom_name(pres->rep_out)); } if (pres->rep_out == wildcard) { @@ -403,9 +391,7 @@ PUBLIC HTStream * HTStreamStack ARGS4( HTPresentation temp; HTPresentation *match; - if (TRACE) - fprintf(stderr, - "HTFormat: Constructing stream stack for %s to %s\n", + CTRACE(tfp, "HTFormat: Constructing stream stack for %s to %s\n", HTAtom_name(rep_in), HTAtom_name(rep_out)); /* don't return on WWW_SOURCE some people might like @@ -419,13 +405,9 @@ PUBLIC HTStream * HTStreamStack ARGS4( if ((match = HTFindPresentation(rep_in, rep_out, &temp))) { if (match == &temp) { - if (TRACE) - fprintf(stderr, - "StreamStack: Using %s\n", HTAtom_name(temp.rep_out)); + CTRACE(tfp, "StreamStack: Using %s\n", HTAtom_name(temp.rep_out)); } else { - if (TRACE) - fprintf(stderr, - "StreamStack: found exact match: %s\n", + CTRACE(tfp, "StreamStack: found exact match: %s\n", HTAtom_name(match->rep)); } return (*match->converter)(match, anchor, sink); @@ -466,9 +448,7 @@ PUBLIC float HTStackValue ARGS4( { HTAtom * wildcard = HTAtom_for("*"); - if (TRACE) - fprintf(stderr, - "HTFormat: Evaluating stream stack for %s worth %.3f to %s\n", + CTRACE(tfp, "HTFormat: Evaluating stream stack for %s worth %.3f to %s\n", HTAtom_name(rep_in), initial_value, HTAtom_name(rep_out)); if (rep_out == WWW_SOURCE || rep_out == rep_in) @@ -498,16 +478,112 @@ PUBLIC float HTStackValue ARGS4( } +/* Display the page while transfer in progress +** ------------------------------------------- +** +** Repaint the page only when necessary. +** This is a traverse call for HText_pageDisplay() - it works!. +** +*/ +PUBLIC void HTDisplayPartial NOARGS +{ +#ifdef DISP_PARTIAL + if (display_partial) { + /* + ** HText_getNumOfLines() = "current" number of lines received + ** NumOfLines_partial = number of lines at the moment of last repaint. + ** + ** We update NumOfLines_partial only when we repaint the display. + ** -1 is the special value: + ** This is a synchronization flag switched to 0 when HText_new() + ** starts a new HTMainText object - all HText_ functions use it, + ** lines counter in particular [we call it from HText_getNumOfLines()]. + ** + ** Otherwise HTMainText holds info from the previous document + ** and we may repaint it instead of the new one: + ** prev doc scrolled to the first line (=Newline_partial) + ** is not good looking :-) 23 Aug 1998 Leonid Pauzner + ** + ** So repaint the page only when necessary: + */ + if ((NumOfLines_partial != -1) + /* new HText object available */ + && ((Newline_partial + display_lines) > NumOfLines_partial) + /* current page not complete... */ + && (partial_threshold > 0 ? + ((Newline_partial + partial_threshold) < HText_getNumOfLines()) : + ((Newline_partial + display_lines) < HText_getNumOfLines())) + /* + * Originally we rendered by increments of 2 lines, + * but that got annoying on slow network connections. + * Then we switched to full-pages. Now it's configurable. + * If partial_threshold <= 0, then it's a full page + */ + ) { + NumOfLines_partial = HText_getNumOfLines(); + HText_pageDisplay(Newline_partial, ""); + } + } +#else /* nothing */ +#endif /* DISP_PARTIAL */ +} + +/* Put this as early as possible, OK just after HTDisplayPartial() */ +PUBLIC void HTFinishDisplayPartial NOARGS +{ +#ifdef DISP_PARTIAL + if (display_partial) { + /* + * Override Newline with a new value if user + * scrolled the document while downloading. + */ + if (Newline_partial != Newline + && NumOfLines_partial > 0) + Newline = Newline_partial; + } + + /* + * End of incremental rendering stage here. + */ + display_partial = FALSE; + NumOfLines_partial = -1; /* initialize to -1 */ + /* -1 restrict HTDisplayPartial() */ + /* until HText_new() start next HTMainText */ + /* and set the flag to 0 */ +#endif /* DISP_PARTIAL */ +} + /* Push data from a socket down a stream ** ------------------------------------- ** ** This routine is responsible for creating and PRESENTING any ** graphic (or other) objects described by the file. ** -** The file number given is assumed to be a TELNET stream ie containing +** The file number given is assumed to be a TELNET stream, i.e., containing ** CRLF at the end of lines which need to be stripped to LF for unix ** when the format is textual. ** +** State of socket and target stream on entry: +** socket (file_number) assumed open, +** target (sink) assumed valid. +** +** Return values: +** HT_INTERRUPTED Interruption or error after some data received. +** -2 Unexpected disconnect before any data received. +** -1 Interruption or error before any data received, or +** (UNIX) other read error before any data received, or +** download cancelled. +** HT_LOADED Normal close of socket (end of file indication +** received), or +** unexpected disconnect after some data received, or +** other read error after some data received, or +** (not UNIX) other read error before any data received. +** +** State of socket and target stream on return depends on return value: +** HT_INTERRUPTED socket still open, target aborted. +** -2 socket still open, target stream still valid. +** -1 socket still open, target aborted. +** otherwise socket closed, target stream still valid. */ PUBLIC int HTCopy ARGS4( HTParentAnchor *, anchor, @@ -516,8 +592,7 @@ PUBLIC int HTCopy ARGS4( HTStream*, sink) { HTStreamClass targetClass; - char line[256]; - int bytes = 0; + int bytes; int rv = 0; /* Push the data down the stream @@ -528,6 +603,7 @@ PUBLIC int HTCopy ARGS4( ** ** This operation could be put into a main event loop */ + HTReadProgress(bytes = 0, 0); for (;;) { int status; @@ -539,7 +615,7 @@ PUBLIC int HTCopy ARGS4( } if (HTCheckForInterrupt()) { - _HTProgress ("Data transfer interrupted."); + _HTProgress (TRANSFER_INTERRUPTED); (*targetClass._abort)(sink, NULL); if (bytes) rv = HT_INTERRUPTED; @@ -554,7 +630,7 @@ PUBLIC int HTCopy ARGS4( if (status == 0) { break; } else if (status == HT_INTERRUPTED) { - _HTProgress ("Data transfer interrupted."); + _HTProgress (TRANSFER_INTERRUPTED); (*targetClass._abort)(sink, NULL); if (bytes) rv = HT_INTERRUPTED; @@ -565,7 +641,7 @@ PUBLIC int HTCopy ARGS4( SOCKET_ERRNO == ECONNRESET || SOCKET_ERRNO == EPIPE) { /* - * Arrrrgh, HTTP 0/1 compability problem, maybe. + * Arrrrgh, HTTP 0/1 compatibility problem, maybe. */ if (bytes <= 0) { /* @@ -575,16 +651,51 @@ PUBLIC int HTCopy ARGS4( rv = -2; goto finished; } else { +#ifdef UNIX + /* + * Treat what we've received already as the complete + * transmission, but not without giving the user + * an alert. I don't know about all the different + * TCP stacks for VMS etc., so this is currently + * only for UNIX. - kw + */ + HTInetStatus("NETREAD"); + HTAlert("Unexpected server disconnect."); + CTRACE(tfp, + "HTCopy: Unexpected server disconnect. Treating as completed.\n"); + status = 0; + break; +#else /* !UNIX */ /* * Treat what we've gotten already * as the complete transmission. - FM */ - if (TRACE) - fprintf(stderr, - "HTCopy: Unexpected server disconnect. Treating as completed.\n"); + CTRACE(tfp, + "HTCopy: Unexpected server disconnect. Treating as completed.\n"); status = 0; break; +#endif /* UNIX */ } +#ifdef UNIX + } else { /* status < 0 and other errno */ + /* + * Treat what we've received already as the complete + * transmission, but not without giving the user + * an alert. I don't know about all the different + * TCP stacks for VMS etc., so this is currently + * only for UNIX. - kw + */ + HTInetStatus("NETREAD"); + HTAlert("Unexpected read error."); + if (bytes) { + (void)NETCLOSE(file_number); + rv = HT_LOADED; + } else { + (*targetClass._abort)(sink, NULL); + rv = -1; + } + goto finished; +#endif } break; } @@ -599,22 +710,18 @@ PUBLIC int HTCopy ARGS4( #endif /* NOT_ASCII */ (*targetClass.put_block)(sink, input_buffer, status); - bytes += status; - if (anchor && anchor->content_length > 0) - sprintf(line, "Read %d of %d bytes of data.", - bytes, anchor->content_length); - else - sprintf(line, "Read %d bytes of data.", bytes); - HTProgress(line); + HTReadProgress(bytes, anchor ? anchor->content_length : 0); + HTDisplayPartial(); } /* next bufferload */ - _HTProgress("Data transfer complete"); + _HTProgress(TRANSFER_COMPLETE); (void)NETCLOSE(file_number); rv = HT_LOADED; finished: + HTFinishDisplayPartial(); return(rv); } @@ -625,14 +732,25 @@ finished: ** graphic (or other) objects described by the file. ** ** +** State of file and target stream on entry: +** FILE* (fp) assumed open, +** target (sink) assumed valid. +** +** Return values: +** HT_INTERRUPTED Interruption after some data read. +** HT_PARTIAL_CONTENT Error after some data read. +** -1 Error before any data read. +** HT_LOADED Normal end of file indication on reading. +** +** State of file and target stream on return: +** always fp still open, target stream still valid. */ PUBLIC int HTFileCopy ARGS2( - FILE *, fp, + FILE *, fp, HTStream*, sink) { HTStreamClass targetClass; - char line[256]; - int status, bytes = 0, nreads = 0, nprogr = 0; + int status, bytes; int rv = HT_OK; /* Push the data down the stream @@ -641,17 +759,15 @@ PUBLIC int HTFileCopy ARGS2( /* Push binary from socket down sink */ + HTReadProgress(bytes = 0, 0); for (;;) { status = fread(input_buffer, 1, INPUT_BUFFER_SIZE, fp); - nreads++; if (status == 0) { /* EOF or error */ if (ferror(fp) == 0) { rv = HT_LOADED; break; } - if (TRACE) - fprintf(stderr, - "HTFormat: Read error, read returns %d\n", + CTRACE(tfp, "HTFormat: Read error, read returns %d\n", ferror(fp)); if (bytes) { rv = HT_PARTIAL_CONTENT; @@ -660,47 +776,85 @@ PUBLIC int HTFileCopy ARGS2( } break; } - (*targetClass.put_block)(sink, input_buffer, status); + (*targetClass.put_block)(sink, input_buffer, status); bytes += status; - if (nreads >= 100) { - /* - ** Show progress messages for local files, and check for - ** user interruption. Start doing so only after a certain - ** number of reads have been done, and don't update it on - ** every read (normally reading in a local file should be - ** speedy). - KW - */ - if (nprogr == 0) { - if (bytes < 1024000) { - sprintf(line, "Read %d bytes of data.", bytes); - } else { - sprintf(line, "Read %d KB of data. %s", - bytes/1024, - "(Press 'z' if you want to abort loading.)"); - } - HTProgress(line); - if (HTCheckForInterrupt()) { - _HTProgress ("Data transfer interrupted."); - if (bytes) { - rv = HT_INTERRUPTED; - } else { - rv = -1; - } - break; - } - nprogr++; - } else if (nprogr == 25) { - nprogr = 0; + HTReadProgress(bytes, 0); + HTDisplayPartial(); + + if (HTCheckForInterrupt()) { + _HTProgress (TRANSFER_INTERRUPTED); + if (bytes) { + rv = HT_INTERRUPTED; } else { - nprogr++; + rv = -1; } + break; } } /* next bufferload */ + HTFinishDisplayPartial(); return rv; } +#ifdef SOURCE_CACHE +/* Push data from an HTChunk down a stream +** --------------------------------------- +** +** This routine is responsible for creating and PRESENTING any +** graphic (or other) objects described by the file. +** +** State of memory and target stream on entry: +** HTChunk* (chunk) and target (sink) assumed valid. +** +** Return values: +** HT_LOADED All data sent. +** HT_INTERRUPTED Interruption after some data read. +** +** State of memory and target stream on return: +** always chunk unchanged, target stream still valid. +*/ +PUBLIC int HTMemCopy ARGS2( + HTChunk *, chunk, + HTStream *, sink) +{ + HTStreamClass targetClass = *(sink->isa); + int bytes = 0; + CONST char *data = chunk->data; + int rv = HT_OK; + + HTReadProgress(0, 0); + for (;;) { + /* Push the data down the stream a piece at a time, in case we're + ** running a large document on a slow machine. + */ + int n = INPUT_BUFFER_SIZE; + if (n > chunk->size - bytes) + n = chunk->size - bytes; + if (n == 0) + break; + (*targetClass.put_block)(sink, data, n); + bytes += n; + data += n; + HTReadProgress(bytes, 0); + HTDisplayPartial(); + + if (HTCheckForInterrupt()) { + _HTProgress (TRANSFER_INTERRUPTED); + if (bytes) { + rv = HT_INTERRUPTED; + } else { + rv = -1; + } + break; + } + } + + HTFinishDisplayPartial(); + return rv; +} +#endif + #ifdef USE_ZLIB /* Push data from a gzip file pointer down a stream ** ------------------------------------- @@ -709,14 +863,25 @@ PUBLIC int HTFileCopy ARGS2( ** graphic (or other) objects described by the file. ** ** +** State of file and target stream on entry: +** gzFile (gzfp) assumed open (should have gzipped content), +** target (sink) assumed valid. +** +** Return values: +** HT_INTERRUPTED Interruption after some data read. +** HT_PARTIAL_CONTENT Error after some data read. +** -1 Error before any data read. +** HT_LOADED Normal end of file indication on reading. +** +** State of file and target stream on return: +** always gzfp still open, target stream still valid. */ PRIVATE int HTGzFileCopy ARGS2( - gzFile, gzfp, + gzFile, gzfp, HTStream*, sink) { HTStreamClass targetClass; - char line[256]; - int status, bytes = 0, nreads = 0, nprogr = 0; + int status, bytes; int gzerrnum; int rv = HT_OK; @@ -724,23 +889,21 @@ PRIVATE int HTGzFileCopy ARGS2( */ targetClass = *(sink->isa); /* Copy pointers to procedures */ - /* read and inflate gzipped file, and push binary down sink + /* read and inflate gzip'd file, and push binary down sink */ + HTReadProgress(bytes = 0, 0); for (;;) { status = gzread(gzfp, input_buffer, INPUT_BUFFER_SIZE); - nreads++; if (status <= 0) { /* EOF or error */ if (status == 0) { rv = HT_LOADED; break; } - if (TRACE) { - fprintf(stderr, - "HTGzFileCopy: Read error, gzread returns %d\n", + CTRACE(tfp, "HTGzFileCopy: Read error, gzread returns %d\n", status); - fprintf(stderr, - "gzerror : %s\n", + CTRACE(tfp, "gzerror : %s\n", gzerror(gzfp, &gzerrnum)); + if (TRACE) { if (gzerrnum == Z_ERRNO) perror("gzerror "); } @@ -751,45 +914,24 @@ PRIVATE int HTGzFileCopy ARGS2( } break; } - (*targetClass.put_block)(sink, input_buffer, status); + (*targetClass.put_block)(sink, input_buffer, status); bytes += status; - if (nreads >= 100) { - /* - ** Show progress messages for local files, and check for - ** user interruption. Start doing so only after a certain - ** number of reads have been done, and don't update it on - ** every read (normally reading in a local file should be - ** speedy). - KW - */ - if (nprogr == 0) { - if (bytes < 1024000) { - sprintf(line, - "Read %d uncompressed bytes of data.", bytes); - } else { - sprintf(line, "Read %d uncompressed KB of data. %s", - bytes/1024, - "(Press 'z' to abort.)"); - } - HTProgress(line); - if (HTCheckForInterrupt()) { - _HTProgress ("Data transfer interrupted."); - if (bytes) { - rv = HT_INTERRUPTED; - } else { - rv = -1; - } - break; - } - nprogr++; - } else if (nprogr == 25) { - nprogr = 0; + HTReadProgress(bytes, -1); + HTDisplayPartial(); + + if (HTCheckForInterrupt()) { + _HTProgress (TRANSFER_INTERRUPTED); + if (bytes) { + rv = HT_INTERRUPTED; } else { - nprogr++; + rv = -1; } + break; } } /* next bufferload */ + HTFinishDisplayPartial(); return rv; } #endif /* USE_ZLIB */ @@ -840,6 +982,30 @@ PUBLIC void HTCopyNoCR ARGS3( ** CRLF at the end of lines which need to be stripped to LF for unix ** when the format is textual. ** +** State of socket and target stream on entry: +** socket (file_number) assumed open, +** target (sink) usually NULL (will call stream stack). +** +** Return values: +** HT_INTERRUPTED Interruption or error after some data received. +** -501 Stream stack failed (cannot present or convert). +** -2 Unexpected disconnect before any data received. +** -1 Stream stack failed (cannot present or convert), or +** Interruption or error before any data received, or +** (UNIX) other read error before any data received, or +** download cancelled. +** HT_LOADED Normal close of socket (end of file indication +** received), or +** unexpected disconnect after some data received, or +** other read error after some data received, or +** (not UNIX) other read error before any data received. +** +** State of socket and target stream on return depends on return value: +** HT_INTERRUPTED socket still open, target aborted. +** -501 socket still open, target stream NULL. +** -2 socket still open, target freed. +** -1 socket still open, target stream aborted or NULL. +** otherwise socket closed, target stream freed. */ PUBLIC int HTParseSocket ARGS5( HTFormat, rep_in, @@ -855,27 +1021,27 @@ PUBLIC int HTParseSocket ARGS5( stream = HTStreamStack(rep_in, format_out, sink, anchor); if (!stream) { - char buffer[1024]; /* @@@@@@@@ */ + char *buffer = 0; if (LYCancelDownload) { LYCancelDownload = FALSE; return -1; } - sprintf(buffer, "Sorry, can't convert from %s to %s.", + HTSprintf0(&buffer, CANNOT_CONVERT_I_TO_O, HTAtom_name(rep_in), HTAtom_name(format_out)); - if (TRACE) - fprintf(stderr, "HTFormat: %s\n", buffer); - return HTLoadError(sink, 501, buffer); /* returns -501 */ + CTRACE(tfp, "HTFormat: %s\n", buffer); + rv = HTLoadError(sink, 501, buffer); /* returns -501 */ + FREE(buffer); + } else { + /* + ** Push the data, don't worry about CRLF we can strip them later. + */ + targetClass = *(stream->isa); /* Copy pointers to procedures */ + rv = HTCopy(anchor, file_number, NULL, stream); + if (rv != -1 && rv != HT_INTERRUPTED) + (*targetClass._free)(stream); } - - /* - ** Push the data, don't worry about CRLF we can strip them later. - */ - targetClass = *(stream->isa); /* Copy pointers to procedures */ - rv = HTCopy(anchor, file_number, NULL, stream); - if (rv != -1 && rv != HT_INTERRUPTED) - (*targetClass._free)(stream); - - return rv; /* full: HT_LOADED; partial: HT_INTERRUPTED; no bytes: -1 */ + return rv; + /* Originally: full: HT_LOADED; partial: HT_INTERRUPTED; no bytes: -1 */ } /* Parse a file given format and file pointer @@ -887,12 +1053,25 @@ PUBLIC int HTParseSocket ARGS5( ** CRLF at the end of lines which need to be stripped to \n for unix ** when the format is textual. ** +** State of file and target stream on entry: +** FILE* (fp) assumed open, +** target (sink) usually NULL (will call stream stack). +** +** Return values: +** -501 Stream stack failed (cannot present or convert). +** -1 Download cancelled. +** HT_NO_DATA Error before any data read. +** HT_PARTIAL_CONTENT Interruption or error after some data read. +** HT_LOADED Normal end of file indication on reading. +** +** State of file and target stream on return: +** always fp still open; target freed, aborted, or NULL. */ PUBLIC int HTParseFile ARGS5( HTFormat, rep_in, HTFormat, format_out, HTParentAnchor *, anchor, - FILE *, fp, + FILE *, fp, HTStream*, sink) { HTStream * stream; @@ -904,16 +1083,17 @@ PUBLIC int HTParseFile ARGS5( sink , anchor); if (!stream) { - char buffer[1024]; /* @@@@@@@@ */ + char *buffer = 0; if (LYCancelDownload) { LYCancelDownload = FALSE; return -1; } - sprintf(buffer, "Sorry, can't convert from %s to %s.", + HTSprintf0(&buffer, CANNOT_CONVERT_I_TO_O, HTAtom_name(rep_in), HTAtom_name(format_out)); - if (TRACE) - fprintf(stderr, "HTFormat(in HTParseFile): %s\n", buffer); - return HTLoadError(sink, 501, buffer); + CTRACE(tfp, "HTFormat(in HTParseFile): %s\n", buffer); + rv = HTLoadError(sink, 501, buffer); + FREE(buffer); + return rv; } /* Push the data down the stream @@ -938,9 +1118,57 @@ PUBLIC int HTParseFile ARGS5( return HT_LOADED; } +#ifdef SOURCE_CACHE +/* Parse a document in memory given format and memory block pointer +** +** This routine is responsible for creating and PRESENTING any +** graphic (or other) objects described by the file. +** +** State of memory and target stream on entry: +** HTChunk* (chunk) assumed valid, +** target (sink) usually NULL (will call stream stack). +** +** Return values: +** -501 Stream stack failed (cannot present or convert). +** HT_LOADED All data sent. +** +** Stat of memory and target stream on return: +** always chunk unchanged; target freed, aborted, or NULL. +*/ +PUBLIC int HTParseMem ARGS5( + HTFormat, rep_in, + HTFormat, format_out, + HTParentAnchor *, anchor, + HTChunk *, chunk, + HTStream *, sink) +{ + HTStream * stream; + HTStreamClass targetClass; + int rv; + + stream = HTStreamStack(rep_in, format_out, sink, anchor); + if (!stream) { + char *buffer = 0; + HTSprintf0(&buffer, CANNOT_CONVERT_I_TO_O, + HTAtom_name(rep_in), HTAtom_name(format_out)); + CTRACE(tfp, "HTFormat(in HTParseMem): %s\n", buffer); + rv = HTLoadError(sink, 501, buffer); + FREE(buffer); + return rv; + } + + /* Push the data down the stream + */ + targetClass = *(stream->isa); + rv = HTMemCopy(chunk, stream); + (*targetClass._free)(stream); + return HT_LOADED; +} +#endif + #ifdef USE_ZLIB PRIVATE int HTCloseGzFile ARGS1( - gzFile, gzfp) + gzFile, gzfp) { int gzres; if (gzfp == NULL) @@ -950,17 +1178,33 @@ PRIVATE int HTCloseGzFile ARGS1( if (gzres == Z_ERRNO) { perror("gzclose "); } else if (gzres != Z_OK) { - fprintf(stderr, "gzclose : error number %d\n", gzres); + CTRACE(tfp, "gzclose : error number %d\n", gzres); } } return(gzres); } +/* HTParseGzFile +** +** State of file and target stream on entry: +** gzFile (gzfp) assumed open, +** target (sink) usually NULL (will call stream stack). +** +** Return values: +** -501 Stream stack failed (cannot present or convert). +** -1 Download cancelled. +** HT_NO_DATA Error before any data read. +** HT_PARTIAL_CONTENT Interruption or error after some data read. +** HT_LOADED Normal end of file indication on reading. +** +** State of file and target stream on return: +** always gzfp closed; target freed, aborted, or NULL. +*/ PUBLIC int HTParseGzFile ARGS5( HTFormat, rep_in, HTFormat, format_out, HTParentAnchor *, anchor, - gzFile, gzfp, + gzFile, gzfp, HTStream*, sink) { HTStream * stream; @@ -972,18 +1216,18 @@ PUBLIC int HTParseGzFile ARGS5( sink , anchor); if (!stream) { - char buffer[1024]; /* @@@@@@@@ */ - extern char LYCancelDownload; + char *buffer = 0; HTCloseGzFile(gzfp); if (LYCancelDownload) { LYCancelDownload = FALSE; return -1; } - sprintf(buffer, "Sorry, can't convert from %s to %s.", + HTSprintf0(&buffer, CANNOT_CONVERT_I_TO_O, HTAtom_name(rep_in), HTAtom_name(format_out)); - if (TRACE) - fprintf(stderr, "HTFormat(in HTParseGzFile): %s\n", buffer); - return HTLoadError(sink, 501, buffer); + CTRACE(tfp, "HTFormat(in HTParseGzFile): %s\n", buffer); + rv = HTLoadError(sink, 501, buffer); + FREE(buffer); + return rv; } /* Push the data down the stream diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFormat.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFormat.h index 225456b6eca..42aeea5021f 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFormat.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFormat.h @@ -1,49 +1,41 @@ /* HTFormat: The format manager in the WWW Library MANAGE DIFFERENT DOCUMENT FORMATS - + Here we describe the functions of the HTFormat module which handles conversion between different data representations. (In MIME parlance, a representation is known as a - content-type. In WWW the term "format" is often used as it is shorter). - - This module is implemented by HTFormat.c . This hypertext document is used to generate - the HTFormat.h include file. Part of the WWW library . - + content-type. In WWW the term "format" is often used as it is shorter). + + This module is implemented by HTFormat.c. This hypertext document is used to generate + the HTFormat.h include file. Part of the WWW library. + Preamble */ #ifndef HTFORMAT_H #define HTFORMAT_H -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ -#include "HTStream.h" -#include "HTAtom.h" -#include "HTList.h" - -#ifdef SHORT_NAMES -#define HTOutputSource HTOuSour -#define HTOutputBinary HTOuBina -#endif +#include +#include +#include /* The HTFormat type - We use the HTAtom object for holding representations. This allows faster manipulation + We use the HTAtom object for holding representations. This allows faster manipulation (comparison and copying) that if we stayed with strings. - + */ typedef HTAtom * HTFormat; - + /* These macros (which used to be constants) define some basic internally referenced representations. The www/xxx ones are of course not MIME standard. - + www/source is an output format which leaves the input untouched. It is useful for diagnostics, and for users who want to see the original, whatever it is. - + */ /* Internal ones */ #define WWW_SOURCE HTAtom_for("www/source") /* Whatever it was originally*/ @@ -52,29 +44,29 @@ typedef HTAtom * HTFormat; www/present represents the user's perception of the document. If you convert to www/present, you present the material to the user. - + */ #define WWW_PRESENT HTAtom_for("www/present") /* The user's perception */ /* The message/rfc822 format means a MIME message or a plain text message with no MIME - header. This is what is returned by an HTTP server. - + header. This is what is returned by an HTTP server. + */ #define WWW_MIME HTAtom_for("www/mime") /* A MIME message */ /* www/print is like www/present except it represents a printed copy. - + */ #define WWW_PRINT HTAtom_for("www/print") /* A printed copy */ /* - www/unknown is a really unknown type. Some default action is appropriate. - + www/unknown is a really unknown type. Some default action is appropriate. + */ #define WWW_UNKNOWN HTAtom_for("www/unknown") @@ -90,7 +82,7 @@ typedef HTAtom * HTFormat; These are regular MIME types. HTML is assumed to be added by the W3 code. application/octet-stream was mistakenly application/binary in earlier libwww versions (pre 2.11). - + */ #define WWW_PLAINTEXT HTAtom_for("text/plain") #define WWW_POSTSCRIPT HTAtom_for("application/postscript") @@ -103,7 +95,7 @@ typedef HTAtom * HTFormat; We must include the following file after defining HTFormat, to which it makes reference. - + The HTEncoding type */ @@ -112,7 +104,7 @@ typedef HTAtom* HTEncoding; /* The following are values for the MIME types: - + */ #define WWW_ENC_7BIT HTAtom_for("7bit") #define WWW_ENC_8BIT HTAtom_for("8bit") @@ -121,7 +113,7 @@ typedef HTAtom* HTEncoding; /* We also add - + */ #define WWW_ENC_COMPRESS HTAtom_for("compress") @@ -138,18 +130,18 @@ typedef HTAtom* HTEncoding; (enc)==WWW_ENC_8BIT || (enc)==WWW_ENC_BINARY || (enc)==WWW_ENC_7BIT) -#include "HTAnchor.h" +#include /* The HTPresentation and HTConverter types This HTPresentation structure represents a possible conversion algorithm from one - format to annother. It includes a pointer to a conversion routine. The conversion + format to annother. It includes a pointer to a conversion routine. The conversion routine returns a stream to which data should be fed. See also HTStreamStack which - scans the list of registered converters and calls one. See the initialisation module + scans the list of registered converters and calls one. See the initialisation module for a list of conversion routines. - + */ typedef struct _HTPresentation HTPresentation; @@ -157,7 +149,7 @@ typedef HTStream * HTConverter PARAMS(( HTPresentation * pres, HTParentAnchor * anchor, HTStream * sink)); - + struct _HTPresentation { HTAtom * rep; /* representation name atmoized */ HTAtom * rep_out; /* resulting representation */ @@ -173,14 +165,14 @@ struct _HTPresentation { The list of presentations is kept by this module. It is also scanned by modules which want to know the set of formats supported. for example. - + */ extern HTList * HTPresentations; /* The default presentation is used when no other is appriporate - + */ extern HTPresentation* default_presentation; @@ -189,18 +181,18 @@ extern HTPresentation* default_presentation; HTSetPresentation: Register a system command to present a format ON ENTRY, - + rep is the MIME - style format name - + command is the MAILCAP - style command template - + quality A degradation faction 0..1.0 - + secs A limit on the time user will wait (0.0 for infinity) secs_per_byte - + maxbytes A limit on the length acceptable as input (0 infinite) - + */ extern void HTSetPresentation PARAMS(( CONST char * representation, @@ -217,13 +209,13 @@ extern void HTSetPresentation PARAMS(( HTSetConversion: Register a converstion routine ON ENTRY, - + rep_in is the content-type input - + rep_out is the resulting content-type - + converter is the routine to make the stream to do it - + */ extern void HTSetConversion PARAMS(( @@ -241,13 +233,13 @@ extern void HTSetConversion PARAMS(( HTStreamStack: Create a stack of streams - This is the routine which actually sets up the conversion. It currently checks only for - direct conversions, but multi-stage conversions are forseen. It takes a stream into + This is the routine which actually sets up the conversion. It currently checks only for + direct conversions, but multi-stage conversions are forseen. It takes a stream into which the output should be sent in the final format, builds the conversion stack, and returns a stream into which the data in the input format should be fed. The anchor is passed because hypertxet objects load information into the anchor object which represents them. - + */ extern HTStream * HTStreamStack PARAMS(( HTFormat format_in, @@ -271,18 +263,18 @@ extern void HTReorderPresentation PARAMS(( HTStackValue: Find the cost of a filter stack Must return the cost of the same stack which HTStreamStack would set up. - + ON ENTRY, - + format_in The fomat of the data to be converted - + format_out The format required - + initial_value The intrinsic "value" of the data before conversion on a scale from 0 to 1 - + length The number of bytes expected in the input format - + */ extern float HTStackValue PARAMS(( HTFormat format_in, @@ -292,13 +284,24 @@ extern float HTStackValue PARAMS(( #define NO_VALUE_FOUND -1e20 /* returned if none found */ +/* Display the page while transfer in progress +** ------------------------------------------- +** +** Repaint the page only when necessary. +** This is a traverse call for HText_pageDispaly() - it works!. +** +*/ +extern void HTDisplayPartial NOPARAMS; + +extern void HTFinishDisplayPartial NOPARAMS; + /* HTCopy: Copy a socket to a stream This is used by the protocol engines to send data down a stream, typically one which has been generated by HTStreamStack. - + */ extern int HTCopy PARAMS(( HTParentAnchor * anchor, @@ -306,26 +309,42 @@ extern int HTCopy PARAMS(( void* handle, HTStream* sink)); - + /* HTFileCopy: Copy a file to a stream This is used by the protocol engines to send data down a stream, typically one which - has been generated by HTStreamStack. It is currently called by HTParseFile - + has been generated by HTStreamStack. It is currently called by HTParseFile + */ extern int HTFileCopy PARAMS(( FILE* fp, HTStream* sink)); - + +#ifdef SOURCE_CACHE +#include +/* + +HTMemCopy: Copy a memory chunk to a stream + + This is used by the protocol engines to send data down a stream, typically one which + has been generated by HTStreamStack. It is currently called by HTParseMem + + */ +extern int HTMemCopy PARAMS(( + HTChunk * chunk, + HTStream* sink)); +#endif + + /* HTCopyNoCR: Copy a socket to a stream, stripping CR characters. It is slower than HTCopy . - + */ extern void HTCopyNoCR PARAMS(( @@ -341,7 +360,7 @@ Clear input buffer and set file number This routine and the one below provide simple character input from sockets. (They are left over from the older architecure and may not be used very much.) The existence of a common routine and buffer saves memory space in small implementations. - + */ extern void HTInitInput PARAMS((int file_number)); @@ -351,7 +370,7 @@ Get next character from buffer */ extern int interrupted_in_htgetcharacter; -extern char HTGetCharacter NOPARAMS; +extern int HTGetCharacter NOPARAMS; /* @@ -360,7 +379,7 @@ HTParseSocket: Parse a socket given its format This routine is called by protocol modules to load an object. uses HTStreamStack and the copy routines above. Returns HT_LOADED if succesful, <0 if not. - + */ extern int HTParseSocket PARAMS(( HTFormat format_in, @@ -373,9 +392,10 @@ extern int HTParseSocket PARAMS(( HTParseFile: Parse a File through a file pointer - This routine is called by protocols modules to load an object. uses HTStreamStack and - HTFileCopy . Returns HT_LOADED if succesful, <0 if not. - + This routine is called by protocols modules to load an object. uses + HTStreamStack and HTFileCopy. Returns HT_LOADED if successful, can also + return HT_PARTIAL_CONTENT, HT_NO_DATA, or other <0 for failure. + */ extern int HTParseFile PARAMS(( HTFormat format_in, @@ -384,6 +404,24 @@ extern int HTParseFile PARAMS(( FILE *fp, HTStream* sink)); +#ifdef SOURCE_CACHE +/* + +HTParseMem: Parse a document in memory + + This routine is called by protocols modules to load an object. uses + HTStreamStack and HTMemCopy. Returns HT_LOADED if successful, can also + return <0 for failure. + + */ +extern int HTParseMem PARAMS(( + HTFormat format_in, + HTFormat format_out, + HTParentAnchor *anchor, + HTChunk* chunk, + HTStream* sink)); +#endif + #ifdef USE_ZLIB #ifdef USE_ZLIB @@ -392,8 +430,9 @@ extern int HTParseFile PARAMS(( /* HTParseGzFile: Parse a gzipped File through a file pointer - This routine is called by protocols modules to load an object. uses HTStreamStack and - HTGzFileCopy . Returns HT_LOADED if succesful, <0 if not. + This routine is called by protocols modules to load an object. uses + HTStreamStack and HTGzFileCopy. Returns HT_LOADED if successful, can also + return HT_PARTIAL_CONTENT, HT_NO_DATA, or other <0 for failure. */ extern int HTParseGzFile PARAMS(( HTFormat format_in, @@ -409,9 +448,9 @@ extern int HTParseGzFile PARAMS(( HTNetToText: Convert Net ASCII to local representation This is a filter stream suitable for taking text from a socket and passing it into a - stream which expects text in the local C representation. It does ASCII and newline - conversion. As usual, pass its output stream to it when creating it. - + stream which expects text in the local C representation. It does ASCII and newline + conversion. As usual, pass its output stream to it when creating it. + */ extern HTStream * HTNetToText PARAMS ((HTStream * sink)); @@ -424,7 +463,7 @@ HTFormatInit: Set up default presentations and conversions automatically be called the first time a conversion is needed. However, if you explicitly add some conversions (eg using HTLoadRules) then you may want also to explicitly call this to get the defaults as well. - + */ extern void HTFormatInit NOPARAMS; diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTGopher.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTGopher.c index 23e8f9d07b7..02a830577c8 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTGopher.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTGopher.c @@ -15,24 +15,23 @@ ** gateway. */ -#include "HTUtils.h" /* Coding convention macros */ -#include "tcp.h" -#include "HTAlert.h" -#include "HTParse.h" -#include "HTTCP.h" -#include "HTFinger.h" +#include /* Coding convention macros */ + +#ifndef DISABLE_GOPHER +#include +#include +#include +#include /* ** Implements. */ -#include "HTGopher.h" - -#define HT_EM_SPACE ((char)2) /* For now */ +#include #define GOPHER_PORT 70 /* See protocol spec */ #define CSO_PORT 105 /* See protocol spec */ #define BIG 1024 /* Bug */ -#define LINE_LENGTH 256 /* Bug */ +#define LINE_LENGTH 256 /* Bug */ /* ** Gopher entity types. @@ -42,7 +41,7 @@ #define GOPHER_CSO '2' #define GOPHER_ERROR '3' #define GOPHER_MACBINHEX '4' -#define GOPHER_PCBINARY '5' +#define GOPHER_PCBINARY '5' #define GOPHER_UUENCODED '6' #define GOPHER_INDEX '7' #define GOPHER_TELNET '8' @@ -59,22 +58,18 @@ #define GOPHER_PLUS_IMAGE ':' /* Addition from Gopher Plus */ #define GOPHER_PLUS_MOVIE ';' #define GOPHER_PLUS_SOUND '<' -#define GOPHER_PLUS_PDF 'P' - -#include - -#include "HTParse.h" -#include "HTFormat.h" -#include "HTTCP.h" +#define GOPHER_PLUS_PDF 'P' -#define FREE(x) if (x) {free(x); x = NULL;} +#include /* ** Hypertext object building machinery. */ -#include "HTML.h" +#include -#include "LYLeaks.h" +#include +#include +#include #define PUTC(c) (*targetClass.put_character)(target, c) #define PUTS(s) (*targetClass.put_string)(target, s) @@ -104,20 +99,20 @@ struct _HTStream HTStreamClass * isa; /* For form-based CSO gateway - FM */ }; -typedef struct _CSOfield_info { /* For form-based CSO gateway - FM */ +typedef struct _CSOfield_info { /* For form-based CSO gateway - FM */ struct _CSOfield_info * next; char * name; char * attributes; char * description; - int id; - int lookup; - int indexed; - int url; - int max_size; - int defreturn; - int explicit_return; - int reserved; - int public; + int id; + int lookup; + int indexed; + int url; + int max_size; + int defreturn; + int explicit_return; + int reserved; + int public; char name_buf[16]; /* Avoid malloc if we can */ char desc_buf[32]; /* Avoid malloc if we can */ char attr_buf[80]; /* Avoid malloc if we can */ @@ -129,13 +124,13 @@ typedef struct _CSOformgen_context { /* For form-based CSO gateway - FM */ char * host; char * seek; CSOfield_info * fld; - int port; - int cur_line; - int cur_off; - int rep_line; - int rep_off; - int public_override; - int field_select; + int port; + int cur_line; + int cur_off; + int rep_line; + int rep_off; + int public_override; + int field_select; } CSOformgen_context; /* Matrix of allowed characters in filenames @@ -196,8 +191,7 @@ PRIVATE void write_anchor ARGS2(CONST char *,text, CONST char *,addr) present[HTML_A_TITLE] = YES; ((CONST char **)value)[HTML_A_TITLE] = text; - if(TRACE) - fprintf(stderr,"HTGopher: adding URL: %s\n",addr); + CTRACE(tfp,"HTGopher: adding URL: %s\n",addr); HT_Is_Gopher_URL = TRUE; /* tell HTML.c that this is a Gopher URL */ (*targetClass.start_element)(target, HTML_A, present, @@ -215,9 +209,8 @@ PRIVATE void parse_menu ARGS2( HTParentAnchor *, anAnchor) { char gtype; - char ch; + int ich; char line[BIG]; - char address[BIG]; char *name = NULL, *selector = NULL; /* Gopher menu fields */ char *host = NULL; char *port; @@ -232,40 +225,38 @@ PRIVATE void parse_menu ARGS2( START(HTML_HTML); - PUTS("\n"); + PUTC('\n'); START(HTML_HEAD); - PUTS("\n"); + PUTC('\n'); START(HTML_TITLE); if ((title = HTAnchor_title(anAnchor))) PUTS(title); else - PUTS("Gopher Menu"); + PUTS(GOPHER_MENU_TITLE); END(HTML_TITLE); - PUTS("\n"); + PUTC('\n'); END(HTML_HEAD); - PUTS("\n"); + PUTC('\n'); START(HTML_BODY); - PUTS("\n"); + PUTC('\n'); START(HTML_H1); if ((title = HTAnchor_title(anAnchor))) PUTS(title); else - PUTS("Gopher Menu"); + PUTS(GOPHER_MENU_TITLE); END(HTML_H1); - PUTS("\n"); + PUTC('\n'); START(HTML_PRE); - while ((ch=NEXT_CHAR) != (char)EOF) { + while ((ich=NEXT_CHAR) != EOF) { if (interrupted_in_htgetcharacter) { - if (TRACE) - fprintf(stderr, - "HTGopher: Interrupted in HTGetCharacter, apparently.\n"); + CTRACE(tfp, "HTGopher: Interrupted in HTGetCharacter, apparently.\n"); goto end_html; } - if (ch != LF) { - *p = ch; /* Put character in line */ + if ((char)ich != LF) { + *p = ich; /* Put character in line */ if (p< &line[BIG-1]) p++; } else { @@ -273,12 +264,11 @@ PRIVATE void parse_menu ARGS2( bytes += p-line; /* add size */ p = line; /* Scan it to parse it */ port = 0; /* Flag "not parsed" */ - if (TRACE) - fprintf(stderr, "HTGopher: Menu item: %s\n", line); + CTRACE(tfp, "HTGopher: Menu item: %s\n", line); gtype = *p++; if (bytes > BytesReported + 1024) { - sprintf(buffer, "Transferred %d bytes", bytes); + sprintf(buffer, TRANSFERRED_X_BYTES, bytes); HTProgress(buffer); BytesReported = bytes; } @@ -336,23 +326,26 @@ PRIVATE void parse_menu ARGS2( PUTS(name); } else if (port) { /* Other types need port */ + char *address = 0; + if (gtype == GOPHER_TELNET) { PUTS(" (TEL) "); - if (*selector) sprintf(address, "telnet://%s@%s/", + if (*selector) + HTSprintf0(&address, "telnet://%s@%s/", selector, host); - else sprintf(address, "telnet://%s/", host); + else + HTSprintf0(&address, "telnet://%s/", host); } else if (gtype == GOPHER_TN3270) { PUTS("(3270) "); if (*selector) - sprintf(address, "tn3270://%s@%s/", + HTSprintf0(&address, "tn3270://%s@%s/", selector, host); else - sprintf(address, "tn3270://%s/", host); + HTSprintf0(&address, "tn3270://%s/", host); } else { /* If parsed ok */ - char *q; char *r; switch(gtype) { @@ -407,19 +400,18 @@ PRIVATE void parse_menu ARGS2( break; } - sprintf(address, "//%s/%c", host, gtype); + HTSprintf0(&address, "//%s/%c", host, gtype); - q = address+ strlen(address); - for(r=selector; *r; r++) { /* Encode selector string */ - if (acceptable[(unsigned char)*r]) *q++ = *r; - else { - *q++ = HEX_ESCAPE; /* Means hex coming */ - *q++ = hex[(TOASCII(*r)) >> 4]; - *q++ = hex[(TOASCII(*r)) & 15]; + for(r = selector; *r; r++) { /* Encode selector string */ + if (acceptable[(unsigned char)*r]) { + HTSprintf(&address, "%c", *r); + } else { + HTSprintf(&address, "%c%c%c", + HEX_ESCAPE, /* Means hex coming */ + hex[(TOASCII(*r)) >> 4], + hex[(TOASCII(*r)) & 15]); } } - - *q++ = '\0'; /* terminate address */ } /* Error response from Gopher doesn't deserve to be a hyperlink. */ @@ -427,14 +419,14 @@ PRIVATE void parse_menu ARGS2( write_anchor(name, address); else PUTS(name); + FREE(address); } else { /* parse error */ - if (TRACE) - fprintf(stderr, "HTGopher: Bad menu item.\n"); + CTRACE(tfp, "HTGopher: Bad menu item.\n"); PUTS(line); } /* parse error */ - PUTS("\n"); + PUTC('\n'); p = line; /* Start again at beginning of line */ } /* if end of line */ @@ -443,11 +435,11 @@ PRIVATE void parse_menu ARGS2( end_html: END(HTML_PRE); - PUTS("\n"); + PUTC('\n'); END(HTML_BODY); - PUTS("\n"); + PUTC('\n'); END(HTML_HTML); - PUTS("\n"); + PUTC('\n'); FREE_TARGET; return; @@ -470,42 +462,42 @@ PRIVATE void parse_cso ARGS2( CONST char *, arg, HTParentAnchor *, anAnchor) { - char ch; + int ich; char line[BIG]; char *p = line; char *second_colon, last_char='\0'; CONST char *title; START(HTML_HEAD); - PUTS("\n"); + PUTC('\n'); START(HTML_TITLE); if ((title = HTAnchor_title(anAnchor))) PUTS(title); else - PUTS("CSO Search Results"); + PUTS(GOPHER_CSO_SEARCH_RESULTS); END(HTML_TITLE); - PUTS("\n"); + PUTC('\n'); END(HTML_HEAD); - PUTS("\n"); + PUTC('\n'); START(HTML_H1); if ((title = HTAnchor_title(anAnchor))) PUTS(title); else { PUTS(arg); - PUTS(" Search Results"); + PUTS(GOPHER_SEARCH_RESULTS); } END(HTML_H1); - PUTS("\n"); + PUTC('\n'); START(HTML_PRE); /* ** Start grabbing chars from the network. */ - while ((ch=NEXT_CHAR) != (char)EOF) + while ((ich=NEXT_CHAR) != EOF) { - if (ch != LF) + if ((char)ich != LF) { - *p = ch; /* Put character in line */ + *p = ich; /* Put character in line */ if (p< &line[BIG-1]) p++; } else @@ -580,7 +572,7 @@ PRIVATE void parse_cso ARGS2( ** Print data. */ PUTS(second_colon+1); - PUTS("\n"); + PUTC('\n'); if (*(second_colon-1) != last_char) /* end seperator */ @@ -602,9 +594,9 @@ PRIVATE void parse_cso ARGS2( } /* Loop over characters */ /* end the text block */ - PUTS("\n"); + PUTC('\n'); END(HTML_PRE); - PUTS("\n"); + PUTC('\n'); FREE_TARGET; return; /* all done */ @@ -620,32 +612,32 @@ PRIVATE void display_cso ARGS2( CONST char * title; START(HTML_HEAD); - PUTS("\n"); + PUTC('\n'); START(HTML_TITLE); if ((title = HTAnchor_title(anAnchor))) PUTS(title); else - PUTS("CSO index"); + PUTS(GOPHER_CSO_INDEX); END(HTML_TITLE); - PUTS("\n"); + PUTC('\n'); START(HTML_ISINDEX); - PUTS("\n"); + PUTC('\n'); END(HTML_HEAD); - PUTS("\n"); + PUTC('\n'); START(HTML_H1); if ((title = HTAnchor_title(anAnchor))) PUTS(title); else { PUTS(arg); - PUTS(" index"); + PUTS(INDEX_SEGMENT); } END(HTML_H1); - PUTS("\nThis is a searchable index of a CSO database.\n"); + PUTS(GOPHER_CSO_INDEX_SUBTITLE); START(HTML_P); - PUTS("\nPress the 's' key and enter search keywords.\n"); + PUTS(GOPHER_CSO_SOLICIT_KEYWORDS); START(HTML_P); - PUTS("\nThe keywords that you enter will allow you to search on a"); - PUTS(" person's name in the database.\n"); + PUTS(SEGMENT_KEYWORDS_WILL); + PUTS(SEGMENT_PERSONS_DB_NAME); if (!HTAnchor_title(anAnchor)) HTAnchor_setTitle(anAnchor, arg); @@ -664,30 +656,30 @@ PRIVATE void display_index ARGS2( CONST char * title; START(HTML_HEAD); - PUTS("\n"); - PUTS("\n"); + PUTC('\n'); + PUTC('\n'); START(HTML_TITLE); if ((title = HTAnchor_title(anAnchor))) PUTS(title); else - PUTS("Gopher index"); + PUTS(GOPHER_INDEX_TITLE); END(HTML_TITLE); - PUTS("\n"); + PUTC('\n'); START(HTML_ISINDEX); - PUTS("\n"); + PUTC('\n'); END(HTML_HEAD); - PUTS("\n"); + PUTC('\n'); START(HTML_H1); if ((title = HTAnchor_title(anAnchor))) PUTS(title); else { PUTS(arg); - PUTS(" index"); + PUTS(INDEX_SEGMENT); } END(HTML_H1); - PUTS("\nThis is a searchable Gopher index.\n"); + PUTS(GOPHER_INDEX_SUBTITLE); START(HTML_P); - PUTS("\nPlease enter search keywords.\n"); + PUTS(GOPHER_SOLICIT_KEYWORDS); if (!HTAnchor_title(anAnchor)) HTAnchor_setTitle(anAnchor, arg); @@ -751,9 +743,9 @@ PRIVATE void free_CSOfields NOPARAMS /* Interpret CSO/PH form template keys. - FM ** ========================================= */ -PRIVATE int interpret_cso_key ARGS5( - char *, key, - char *, buf, +PRIVATE void interpret_cso_key ARGS5( + char *, key, + char *, buf, int *, length, CSOformgen_context *, ctx, HTStream *, Target) @@ -786,7 +778,7 @@ PRIVATE int interpret_cso_key ARGS5( } if (!error) { *length = strlen(buf); - return -1; + return; } } buf[0] = '\0'; @@ -877,10 +869,10 @@ PRIVATE int interpret_cso_key ARGS5( buf[out++] = ')'; buf[out] = '\0'; *length = strlen(buf); - return -1; + return; } *length = strlen(buf); - return 0; + return; } /* Parse the elements in a CSO/PH fields structure. - FM @@ -889,7 +881,6 @@ PRIVATE int interpret_cso_key ARGS5( PRIVATE int parse_cso_field_info ARGS1( CSOfield_info *, blk) { - int i; char *info, *max_spec; /* @@ -903,8 +894,7 @@ PRIVATE int parse_cso_field_info ARGS1( ** are converted to all lower-case for comparison. */ info = blk->attributes; - for (i = 0; info[i]; i++) - info[i] = TOLOWER(info[i]); + LYLowerCase(info); if (strstr(info, "indexed ")) blk->indexed = 1; if (strstr(info, "default ")) @@ -931,10 +921,10 @@ PRIVATE int parse_cso_field_info ARGS1( ** ================================================ */ PRIVATE int parse_cso_fields ARGS2( - char *, buf, + char *, buf, int, size) { - char ch; + int ich; char *p = buf; int i, code = 0, prev_code; size_t alen; @@ -948,19 +938,16 @@ PRIVATE int parse_cso_fields ARGS2( /* ** Start grabbing chars from the network. */ - while ((ch = NEXT_CHAR) != (char)EOF) { + while ((ich = NEXT_CHAR) != EOF) { if (interrupted_in_htgetcharacter) { - if (TRACE) { - fprintf(stderr, - "HTLoadCSO: Interrupted in HTGetCharacter, apparently.\n"); - } + CTRACE(tfp, "HTLoadCSO: Interrupted in HTGetCharacter, apparently.\n"); free_CSOfields(); buf[0] = '\0'; return HT_INTERRUPTED; } - if (ch != LF) { - *p = ch; /* Put character in buffer */ + if ((char)ich != LF) { + *p = ich; /* Put character in buffer */ if (p < &buf[size-1]) { p++; } @@ -1099,9 +1086,9 @@ PRIVATE int parse_cso_fields ARGS2( ** ==================================================== */ PRIVATE int generate_cso_form ARGS4( - char *, host, + char *, host, int, port, - char *, buf, + char *, buf, HTStream *, Target) { int i, j, length; @@ -1199,11 +1186,8 @@ PRIVATE int generate_cso_form ARGS4( j = 0; } if (ctx.seek) { - char *temp = (char *)malloc(strlen(ctx.seek) + 20); - if (temp) { - outofmem(__FILE__, "HTLoadCSO"); - } - sprintf(temp, "Seek fail on %s\n", ctx.seek); + char *temp = 0; + HTSprintf0(&temp, GOPHER_CSO_SEEK_FAILED, ctx.seek); (*Target->isa->put_block)(Target, temp, strlen(temp)); FREE(temp); } @@ -1232,12 +1216,12 @@ PRIVATE int generate_cso_form ARGS4( /* Generate a results report for CSO/PH form-based searches. - FM ** ============================================================== */ -PRIVATE int generate_cso_report ARGS2( - char *, buf, +PRIVATE int generate_cso_report ARGS1( HTStream *, Target) { - char ch; + int ich; char line[BIG]; + char *buf = 0; char *p = line, *href = NULL; int len, i, prev_ndx, ndx; char *rcode, *ndx_str, *fname, *fvalue, *l; @@ -1251,19 +1235,15 @@ PRIVATE int generate_cso_report ARGS2( /* ** Start grabbing chars from the network. */ - while (!stop && (ch = NEXT_CHAR) != (char)EOF) { + while (!stop && (ich = NEXT_CHAR) != EOF) { if (interrupted_in_htgetcharacter) { - buf[0] = '\0'; - if (TRACE) { - fprintf(stderr, - "HTLoadCSO: Interrupted in HTGetCharacter, apparently.\n"); - } - _HTProgress ("Connection interrupted."); + CTRACE(tfp, "HTLoadCSO: Interrupted in HTGetCharacter, apparently.\n"); + _HTProgress (CONNECTION_INTERRUPTED); goto end_CSOreport; } - if (ch != LF) { - *p = ch; /* Put character in line */ + if ((char)ich != LF) { + *p = ich; /* Put character in line */ if (p < &line[BIG-1]) { p++; } @@ -1295,22 +1275,22 @@ PRIVATE int generate_cso_report ARGS2( ndx = atoi(ndx_str); if (prev_ndx != ndx) { if (prev_ndx != -100) { - strcpy(buf, "\n"); + HTSprintf0(&buf, "\n"); (*Target->isa->put_block)(Target, buf, strlen(buf)); } if (ndx == 0) { - strcpy(buf, + HTSprintf0(&buf, "
Information/status
\n"); (*Target->isa->put_block)(Target, buf, strlen(buf)); } else { - sprintf(buf, + HTSprintf0(&buf, "
Entry %d:
\n", ndx); (*Target->isa->put_block)(Target, buf, strlen(buf)); } prev_ndx = ndx; } } else { - sprintf(buf, "
%s\n", rcode); + HTSprintf0(&buf, "
%s\n", rcode); (*Target->isa->put_block)(Target, buf, strlen(buf)); continue; } @@ -1343,27 +1323,22 @@ PRIVATE int generate_cso_report ARGS2( } } if (fld && fld->url) { - sprintf(buf, + HTSprintf0(&buf, "
%s
%s\n", fname, fvalue, fvalue); (*Target->isa->put_block)(Target, buf, strlen(buf)); } else { - sprintf(buf, "
%s
", fname); + HTSprintf0(&buf, "
%s
", fname); (*Target->isa->put_block)(Target, buf, strlen(buf)); - i = 0; - buf[i] = '\0'; + buf[0] = '\0'; l = fvalue; while (*l) { if (*l == '<') { - strcat(buf, "<"); + StrAllocCat(buf, "<"); l++; - i += 4; - buf[i] = '\0'; } else if (*l == '>') { - strcat(buf, ">"); + StrAllocCat(buf, ">"); l++; - i += 4; - buf[i] = '\0'; } else if (strncmp(l, "news:", 5) && strncmp(l, "snews://", 8) && strncmp(l, "nntp://", 7) && @@ -1380,45 +1355,34 @@ PRIVATE int generate_cso_report ARGS2( strncmp(l, "mailto:", 7) && strncmp(l, "cso://", 6) && strncmp(l, "gopher://", 9)) { - buf[i++] = *l++; - buf[i] = '\0'; + HTSprintf(&buf, "%c", *l++); } else { - strcat(buf, ")\"")); - strcat(buf, "\">"); - i = strlen(buf); + StrAllocCat(buf, strtok(href, " \r\n\t,>)\"")); + StrAllocCat(buf, "\">"); while (*l && !strchr(" \r\n\t,>)\"", *l)) { - buf[i++] = *l++; + HTSprintf(&buf, "%c", *l++); } - buf[i] = '\0'; - strcat(buf, ""); - i += 4; + StrAllocCat(buf, ""); FREE(href); } } - strcat(buf, "\n"); + StrAllocCat(buf, "\n"); (*Target->isa->put_block)(Target, buf, strlen(buf)); } } else { - sprintf(buf, "
"); + HTSprintf0(&buf, "
"); (*Target->isa->put_block)(Target, buf, strlen(buf)); - i = 0; - buf[i] = '\0'; + buf[0] = '\0'; l = fvalue; while (*l) { if (*l == '<') { - strcat(buf, "<"); + StrAllocCat(buf, "<"); l++; - i += 4; - buf[i] = '\0'; } else if (*l == '>') { - strcat(buf, ">"); + StrAllocCat(buf, ">"); l++; - i += 4; - buf[i] = '\0'; } else if (strncmp(l, "news:", 5) && strncmp(l, "snews://", 8) && strncmp(l, "nntp://", 7) && @@ -1435,39 +1399,34 @@ PRIVATE int generate_cso_report ARGS2( strncmp(l, "mailto:", 7) && strncmp(l, "cso://", 6) && strncmp(l, "gopher://", 9)) { - buf[i++] = *l++; - buf[i] = '\0'; + HTSprintf(&buf, "%c", *l++); } else { - strcat(buf, ")\"")); - strcat(buf, "\">"); - i = strlen(buf); + StrAllocCat(buf, strtok(href, " \r\n\t,>)\"")); + StrAllocCat(buf, "\">"); while (*l && !strchr(" \r\n\t,>)\"", *l)) { - buf[i++] = *l++; + HTSprintf(&buf, "%c", *l++); } - buf[i] = '\0'; - strcat(buf, ""); - i += 4; + StrAllocCat(buf, ""); FREE(href); } } - strcat(buf, "\n"); + StrAllocCat(buf, "\n"); (*Target->isa->put_block)(Target, buf, strlen(buf)); } } else { - sprintf(buf, "
%s\n", fname ? fname : rcode ); + HTSprintf0(&buf, "
%s\n", fname ? fname : rcode ); (*Target->isa->put_block)(Target, buf, strlen(buf)); } } } end_CSOreport: if (prev_ndx != -100) { - sprintf(buf, "
\n"); + HTSprintf0(&buf, "
\n"); (*Target->isa->put_block)(Target, buf, strlen(buf)); } + FREE(buf); return 0; } @@ -1480,12 +1439,13 @@ PRIVATE int HTLoadCSO ARGS4( HTFormat, format_out, HTStream*, sink) { + static CONST char end_form[] = "\n\n"; char *host, *cp; int port = CSO_PORT; - int status; /* tcp return */ + int status; /* tcp return */ char *command = NULL; char *content = NULL; - int len, i, j, start, finish, flen, ndx, clen; + int len, i, j, start, finish, flen, ndx; int return_type, has_indexed; CSOfield_info *fld; char buf[2048]; @@ -1499,8 +1459,7 @@ PRIVATE int HTLoadCSO ARGS4( return -3; /* Bad if no name sepcified */ if (!*arg) return -2; /* Bad if name had zero length */ - if (TRACE) - fprintf(stderr, "HTLoadCSO: Looking for %s\n", arg); + CTRACE(tfp, "HTLoadCSO: Looking for %s\n", arg); /* ** Set up a socket to the server for the data. @@ -1510,38 +1469,29 @@ PRIVATE int HTLoadCSO ARGS4( /* ** Interrupt cleanly. */ - if (TRACE) - fprintf(stderr, - "HTLoadCSO: Interrupted on connect; recovering cleanly.\n"); - _HTProgress ("Connection interrupted."); + CTRACE(tfp, "HTLoadCSO: Interrupted on connect; recovering cleanly.\n"); + _HTProgress (CONNECTION_INTERRUPTED); return HT_NOT_LOADED; } if (status < 0) { - if (TRACE) - fprintf(stderr, - "HTLoadCSO: Unable to connect to remote host for `%s'.\n", + CTRACE(tfp, "HTLoadCSO: Unable to connect to remote host for `%s'.\n", arg); return HTInetStatus("connect"); } HTInitInput(s); /* Set up input buffering */ - if ((command = (char *)malloc(12)) == NULL) - outofmem(__FILE__, "HTLoadCSO"); - sprintf(command, "fields%c%c", CR, LF); - if (TRACE) - fprintf(stderr, - "HTLoadCSO: Connected, writing command `%s' to socket %d\n", + HTSprintf0(&command, "fields%c%c", CR, LF); + CTRACE(tfp, "HTLoadCSO: Connected, writing command `%s' to socket %d\n", command, s); - _HTProgress ("Sending CSO/PH request."); + _HTProgress (GOPHER_SENDING_CSO_REQUEST); status = NETWRITE(s, command, (int)strlen(command)); FREE(command); if (status < 0) { - if (TRACE) - fprintf(stderr, "HTLoadCSO: Unable to send command.\n"); + CTRACE(tfp, "HTLoadCSO: Unable to send command.\n"); return HTInetStatus("send"); } - _HTProgress ("CSO/PH request sent; waiting for response."); + _HTProgress (GOPHER_SENT_CSO_REQUEST); /* ** Now read the data from the socket. @@ -1550,11 +1500,11 @@ PRIVATE int HTLoadCSO ARGS4( if (status) { NETCLOSE(s); if (status == HT_INTERRUPTED) { - _HTProgress ("Connection interrupted."); + _HTProgress (CONNECTION_INTERRUPTED); } else if (buf[0] != '\0') { HTAlert(buf); } else { - HTAlert("No response from server!"); + HTAlert(FAILED_NO_RESPONSE); } return HT_NOT_LOADED; } @@ -1562,12 +1512,9 @@ PRIVATE int HTLoadCSO ARGS4( format_out, sink, anAnchor); if (!Target || Target == NULL) { - char *temp = (char *)malloc(256); - if (!temp) { - outofmem(__FILE__, "HTLoadCSO"); - } - sprintf(temp, "Sorry, no known way of converting %s to %s.", - HTAtom_name(format_in), HTAtom_name(format_out)); + char *temp = 0; + HTSprintf0(&temp, CANNOT_CONVERT_I_TO_O, + HTAtom_name(format_in), HTAtom_name(format_out)); HTAlert(temp); FREE(temp); NETCLOSE(s); @@ -1591,11 +1538,14 @@ PRIVATE int HTLoadCSO ARGS4( free_CSOfields(); return HT_LOADED; } - sprintf(buf, + + HTSprintf0(&command, "\n\nCSO/PH Results on %s\n\n\n", host); - (*Target->isa->put_block)(Target, buf, strlen(buf)); + (*Target->isa->put_block)(Target, command, strlen(command)); + FREE(command); FREE(host); + StrAllocCopy(content, anAnchor->post_data); if (content[strlen(content)-1] != '&') StrAllocCat(content, "&"); @@ -1609,7 +1559,7 @@ PRIVATE int HTLoadCSO ARGS4( len = strlen(content); return_type = 0; has_indexed = 0; - start = finish = clen = 0; + start = finish = 0; for (i = 0; i < len; i++) { if (!content[i] || content[i] == '&') { /* @@ -1642,17 +1592,13 @@ PRIVATE int HTLoadCSO ARGS4( if (fld->lookup) { if (fld->indexed) has_indexed = 1; - if (clen == 0) { + if (command == 0 || *command == 0) { StrAllocCopy(command, "query "); - clen = 6; } else { StrAllocCat(command, " "); - clen++; } - sprintf(buf, "%s=\"%s\"", - fld->name, &content[j+1]); - StrAllocCat(command, buf); - clen += strlen(buf); + HTSprintf(&command, "%s=\"%s\"", + fld->name, &content[j+1]); } else { strcpy(buf, "Warning: non-lookup field ignored
\n"); @@ -1679,7 +1625,7 @@ PRIVATE int HTLoadCSO ARGS4( } } FREE(content); - if ((clen == 0) || !has_indexed) { + if ((command == 0 || *command == 0) || !has_indexed) { NETCLOSE(s); strcpy(buf, "Error: At least one indexed field value must be specified!\n"); @@ -1695,42 +1641,32 @@ PRIVATE int HTLoadCSO ARGS4( */ if (return_type == 1) { StrAllocCat(command, " return all"); - clen += 11; } else if (return_type == 2) { StrAllocCat(command, " return"); - clen += 7; for (fld = CSOfields; fld; fld = fld->next) { if (fld->explicit_return) { - sprintf(buf, " %s", fld->name); - StrAllocCat(command, buf); - clen += strlen(buf); + HTSprintf(&command, " %s", fld->name); } } } - sprintf(buf, "%c%c", CR, LF); - StrAllocCat(command, buf); - clen += strlen(buf); + HTSprintf(&command, "%c%c", CR, LF); strcpy(buf, "

\nCSO/PH command: "); (*Target->isa->put_block)(Target, buf, strlen(buf)); - (*Target->isa->put_block)(Target, command, clen); + (*Target->isa->put_block)(Target, command, strlen(command)); strcpy(buf, "

\n"); (*Target->isa->put_block)(Target, buf, strlen(buf)); - if (TRACE) - fprintf(stderr, - "HTLoadCSO: Writing command `%s' to socket %d\n", + CTRACE(tfp, "HTLoadCSO: Writing command `%s' to socket %d\n", command, s); - status = NETWRITE(s, command, clen); + status = NETWRITE(s, command, strlen(command)); FREE(command); if (status < 0) { - if (TRACE) - fprintf(stderr, "HTLoadCSO: Unable to send command.\n"); + CTRACE(tfp, "HTLoadCSO: Unable to send command.\n"); free_CSOfields(); return HTInetStatus("send"); } - generate_cso_report(buf, Target); + generate_cso_report(Target); NETCLOSE(s); - strcpy(buf, "\n\n"); - (*Target->isa->put_block)(Target, buf, strlen(buf)); + (*Target->isa->put_block)(Target, end_form, sizeof(end_form)-1); (*Target->isa->_free)(Target); FREE(host); free_CSOfields(); @@ -1750,8 +1686,8 @@ PRIVATE int HTLoadGopher ARGS4( HTStream*, sink) { char *command; /* The whole command */ - int status; /* tcp return */ - char gtype; /* Gopher Node type */ + int status; /* tcp return */ + char gtype; /* Gopher Node type */ char * selector; /* Selector string */ if (!acceptable_inited) @@ -1761,8 +1697,7 @@ PRIVATE int HTLoadGopher ARGS4( return -3; /* Bad if no name sepcified */ if (!*arg) return -2; /* Bad if name had zero length */ - if (TRACE) - fprintf(stderr, "HTGopher: Looking for %s\n", arg); + CTRACE(tfp, "HTGopher: Looking for %s\n", arg); /* ** If it's a port 105 GOPHER_CSO gtype with no ISINDEX token ('?'), @@ -1775,8 +1710,7 @@ PRIVATE int HTLoadGopher ARGS4( if ((len = strlen(arg)) > 5) { if (0 == strcmp((CONST char *)&arg[len-6], ":105/2")) { /* Use CSO gateway. */ - if (TRACE) - fprintf(stderr, "HTGopher: Passing to CSO/PH gateway.\n"); + CTRACE(tfp, "HTGopher: Passing to CSO/PH gateway.\n"); return HTLoadCSO(arg, anAnchor, format_out, sink); } } @@ -1786,9 +1720,13 @@ PRIVATE int HTLoadGopher ARGS4( ** If it's a port 79/0[/...] URL, use the finger gateway. - FM */ if (strstr(arg, ":79/0") != NULL) { - if (TRACE) - fprintf(stderr, "HTGopher: Passing to finger gateway.\n"); +#ifndef DISABLE_FINGER + CTRACE(tfp, "HTGopher: Passing to finger gateway.\n"); return HTLoadFinger(arg, anAnchor, format_out, sink); +#else /* finger is disabled */ + HTAlert(gettext("Unable to access document!")); + return HT_NOT_LOADED; +#endif /* DISABLE_FINGER */ } /* @@ -1864,6 +1802,8 @@ PRIVATE int HTLoadGopher ARGS4( } else { /* Not index */ command = (char *)malloc(strlen(selector)+2+1); + if (command == NULL) + outofmem(__FILE__, "HTLoadGopher"); de_escape(command, selector); } FREE(p1); @@ -1884,17 +1824,13 @@ PRIVATE int HTLoadGopher ARGS4( /* ** Interrupt cleanly. */ - if (TRACE) - fprintf(stderr, - "HTGopher: Interrupted on connect; recovering cleanly.\n"); - _HTProgress ("Connection interrupted."); + CTRACE(tfp, "HTGopher: Interrupted on connect; recovering cleanly.\n"); + _HTProgress (CONNECTION_INTERRUPTED); FREE(command); return HT_NOT_LOADED; } if (status < 0) { - if (TRACE) - fprintf(stderr, - "HTGopher: Unable to connect to remote host for `%s'.\n", + CTRACE(tfp, "HTGopher: Unable to connect to remote host for `%s'.\n", arg); FREE(command); return HTInetStatus("connect"); @@ -1902,9 +1838,7 @@ PRIVATE int HTLoadGopher ARGS4( HTInitInput(s); /* Set up input buffering */ - if (TRACE) - fprintf(stderr, - "HTGopher: Connected, writing command `%s' to socket %d\n", + CTRACE(tfp, "HTGopher: Connected, writing command `%s' to socket %d\n", command, s); #ifdef NOT_ASCII @@ -1916,17 +1850,16 @@ PRIVATE int HTLoadGopher ARGS4( } #endif - _HTProgress ("Sending Gopher request."); + _HTProgress (GOPHER_SENDING_REQUEST); status = NETWRITE(s, command, (int)strlen(command)); FREE(command); if (status < 0) { - if (TRACE) - fprintf(stderr, "HTGopher: Unable to send command.\n"); + CTRACE(tfp, "HTGopher: Unable to send command.\n"); return HTInetStatus("send"); } - _HTProgress ("Gopher request sent; waiting for response."); + _HTProgress (GOPHER_SENT_REQUEST); /* ** Now read the data from the socket. @@ -2002,3 +1935,5 @@ GLOBALDEF (HTProtocol, HTCSO, _HTCSO_C_1_INIT); GLOBALDEF PUBLIC HTProtocol HTGopher = { "gopher", HTLoadGopher, NULL }; GLOBALDEF PUBLIC HTProtocol HTCSO = { "cso", HTLoadCSO, NULL }; #endif /* GLOBALDEF_IS_MACRO */ + +#endif /* not DISABLE_GOPHER */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTGopher.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTGopher.h index 947bd3e93c6..03b89675b8a 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTGopher.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTGopher.h @@ -11,8 +11,8 @@ #ifndef HTGOPHER_H #define HTGOPHER_H -#include "HTAccess.h" -#include "HTAnchor.h" +#include +#include #ifdef GLOBALREF_IS_MACRO extern GLOBALREF (HTProtocol, HTGopher); diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTGroup.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTGroup.c index f6b1757868a..490699d3429 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTGroup.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTGroup.c @@ -42,14 +42,13 @@ */ +#include -#include "HTUtils.h" -#include -#include "HTAAUtil.h" -#include "HTLex.h" /* Lexical analysor */ -#include "HTGroup.h" /* Implemented here */ +#include +#include /* Lexical analysor */ +#include /* Implemented here */ -#include "LYLeaks.h" +#include /* ** Group file parser @@ -68,7 +67,7 @@ typedef struct { GroupDef * translation; } Ref; - + PRIVATE void syntax_error ARGS3(FILE *, fp, char *, msg, @@ -82,8 +81,7 @@ PRIVATE void syntax_error ARGS3(FILE *, fp, if (cnt < 40) buffer[cnt++] = ch; buffer[cnt] = (char)0; - if (TRACE) - fprintf(stderr, "%s %d before: '%s'\nHTGroup.c: %s (got %s)\n", + CTRACE(tfp, "%s %d before: '%s'\nHTGroup.c: %s (got %s)\n", "HTGroup.c: Syntax error in rule file at line", HTlex_line, buffer, msg, lex_verbose(lex_item)); HTlex_line++; @@ -110,10 +108,12 @@ PRIVATE AddressDefList *parse_address_part ARGS1(FILE *, fp) for(;;) { Ref *ref = (Ref*)calloc(1, sizeof(Ref)); + if (ref == NULL) + outofmem(__FILE__, "parse_address_part"); ref->name = NULL; ref->translation = NULL; StrAllocCopy(ref->name, HTlex_buffer); - + HTList_addObject(address_def_list, (void*)ref); if (only_one || (lex_item = lex(fp)) != LEX_ITEM_SEP) @@ -164,12 +164,14 @@ PRIVATE UserDefList *parse_user_part ARGS1(FILE *, fp) for (;;) { Ref *ref = (Ref*)calloc(1, sizeof(Ref)); + if (ref == NULL) + outofmem(__FILE__, "parse_user_part"); ref->name = NULL; ref->translation = NULL; StrAllocCopy(ref->name, HTlex_buffer); HTList_addObject(user_def_list, (void*)ref); - + if (only_one || (lex_item = lex(fp)) != LEX_ITEM_SEP) break; /* @@ -222,7 +224,7 @@ PRIVATE Item *parse_item ARGS1(FILE *, fp) } else { if (user_def_list) { - HTList_delete(user_def_list); /* @@@@ */ + HTList_delete(user_def_list); /* @@@@ */ user_def_list = NULL; } syntax_error(fp, "Expected address part (single address or list)", @@ -237,6 +239,8 @@ PRIVATE Item *parse_item ARGS1(FILE *, fp) return NULL; } item = (Item*)calloc(1, sizeof(Item)); + if (item == NULL) + outofmem(__FILE__, "parse_item"); item->user_def_list = user_def_list; item->address_def_list = address_def_list; return item; @@ -284,15 +288,17 @@ PUBLIC GroupDef *HTAA_parseGroupDef ARGS1(FILE *, fp) return NULL; } group_def = (GroupDef*)calloc(1, sizeof(GroupDef)); + if (group_def == NULL) + outofmem(__FILE__, "HTAA_parseGroupDef"); group_def->group_name = NULL; group_def->item_list = item_list; if ((lex_item = lex(fp)) != LEX_REC_SEP) { syntax_error(fp, "Garbage after group definition", lex_item); } - + return group_def; -} +} PRIVATE GroupDef *parse_group_decl ARGS1(FILE *, fp) @@ -326,7 +332,7 @@ PRIVATE GroupDef *parse_group_decl ARGS1(FILE *, fp) return group_def; } - + /* @@ -343,8 +349,8 @@ PRIVATE GroupDef *find_group_def ARGS2(GroupDefList *, group_list, while (NULL != (group_def = (GroupDef*)HTList_nextObject(cur))) { if (!strcmp(group_name, group_def->group_name)) { return group_def; - } - } + } + } } return NULL; } @@ -382,10 +388,10 @@ PRIVATE GroupDefList *parse_group_file ARGS1(FILE *, fp) { GroupDefList *group_def_list = HTList_new(); GroupDef *group_def; - + while (NULL != (group_def = parse_group_decl(fp))) add_group_def(group_def_list, group_def); - + return group_def_list; } @@ -397,7 +403,7 @@ PRIVATE GroupDefList *parse_group_file ARGS1(FILE *, fp) PRIVATE void print_item ARGS1(Item *, item) { if (!item) - fprintf(stderr, "\tNULL-ITEM\n"); + fprintf(tfp, "\tNULL-ITEM\n"); else { UserDefList *cur1 = item->user_def_list; AddressDefList *cur2 = item->address_def_list; @@ -405,20 +411,20 @@ PRIVATE void print_item ARGS1(Item *, item) Ref *addr_ref = (Ref*)HTList_nextObject(cur2); if (user_ref) { - fprintf(stderr, "\t[%s%s", user_ref->name, + fprintf(tfp, "\t[%s%s", user_ref->name, (user_ref->translation ? "*REF*" : "")); while (NULL != (user_ref = (Ref*)HTList_nextObject(cur1))) - fprintf(stderr, "; %s%s", user_ref->name, + fprintf(tfp, "; %s%s", user_ref->name, (user_ref->translation ? "*REF*" : "")); - fprintf(stderr, "] "); - } else fprintf(stderr, "\tANYBODY "); + fprintf(tfp, "] "); + } else fprintf(tfp, "\tANYBODY "); if (addr_ref) { - fprintf(stderr, "@ [%s", addr_ref->name); + fprintf(tfp, "@ [%s", addr_ref->name); while (NULL != (addr_ref = (Ref*)HTList_nextObject(cur2))) - fprintf(stderr, "; %s", addr_ref->name); - fprintf(stderr, "]\n"); - } else fprintf(stderr, "@ ANYADDRESS\n"); + fprintf(tfp, "; %s", addr_ref->name); + fprintf(tfp, "]\n"); + } else fprintf(tfp, "@ ANYADDRESS\n"); } } @@ -429,7 +435,7 @@ PRIVATE void print_item_list ARGS1(ItemList *, item_list) Item *item; if (!item_list) - fprintf(stderr, "EMPTY"); + fprintf(tfp, "EMPTY"); else while (NULL != (item = (Item*)HTList_nextObject(cur))) print_item(item); } @@ -438,15 +444,15 @@ PRIVATE void print_item_list ARGS1(ItemList *, item_list) PUBLIC void HTAA_printGroupDef ARGS1(GroupDef *, group_def) { if (!group_def) { - fprintf(stderr, "\nNULL RECORD\n"); + fprintf(tfp, "\nNULL RECORD\n"); return; } - fprintf(stderr, "\nGroup %s:\n", + fprintf(tfp, "\nGroup %s:\n", (group_def->group_name ? group_def->group_name : "NULL")); print_item_list(group_def->item_list); - fprintf(stderr, "\n"); + fprintf(tfp, "\n"); } @@ -454,7 +460,7 @@ PRIVATE void print_group_def_list ARGS1(GroupDefList *, group_list) { GroupDefList *cur = group_list; GroupDef *group_def; - + while (NULL != (group_def = (GroupDef*)HTList_nextObject(cur))) HTAA_printGroupDef(group_def); } @@ -483,6 +489,7 @@ PRIVATE BOOL part_match ARGS2(CONST char *, tcur, char actual[4]; CONST char *cur; int cnt; + BOOL status; if (!tcur || !icur) return NO; @@ -498,14 +505,11 @@ PRIVATE BOOL part_match ARGS2(CONST char *, tcur, actual[cnt++] = *(cur++); actual[cnt] = (char)0; - if (TRACE) { - BOOL status = HTAA_templateMatch(required, actual); - fprintf(stderr, "part_match: req: '%s' act: '%s' match: %s\n", + status = HTAA_templateMatch(required, actual); + CTRACE(tfp, "part_match: req: '%s' act: '%s' match: %s\n", required, actual, (status ? "yes" : "no")); - return status; - } - return HTAA_templateMatch(required, actual); + return status; } @@ -513,8 +517,8 @@ PRIVATE BOOL part_match ARGS2(CONST char *, tcur, /* PRIVATE ip_number_match() ** MATCH INET NUMBER AGAINST AN INET NUMBER MASK ** ON ENTRY: -** template mask to match agaist, e.g. 128.141.*.* -** the_inet_addr actual inet address, e.g. 128.141.201.74 +** template mask to match agaist, e.g., 128.141.*.* +** the_inet_addr actual inet address, e.g., 128.141.201.74 ** ** ON EXIT: ** returns YES, if match; NO, if not. @@ -525,7 +529,7 @@ PRIVATE BOOL ip_number_match ARGS2(CONST char *, template, CONST char *tcur = template; CONST char *icur = the_inet_addr; int cnt; - + for (cnt=0; cnt<4; cnt++) { if (!tcur || !icur || !part_match(tcur, icur)) return NO; @@ -572,9 +576,9 @@ PRIVATE BOOL is_domain_mask ARGS1(CONST char *, mask) /* PRIVATE ip_mask_match() ** MATCH AN IP NUMBER MASK OR IP NAME MASK ** AGAINST ACTUAL IP NUMBER OR IP NAME -** +** ** ON ENTRY: -** mask mask. Mask may be either an inet number +** mask mask. Mask may be either an inet number ** mask or a domain name mask, ** e.g. ** 128.141.*.* @@ -618,7 +622,7 @@ PRIVATE BOOL ip_in_def_list ARGS3(AddressDefList *, address_def_list, Ref *ref; while (NULL != (ref = (Ref*)HTList_nextObject(cur))) { - /* Value of ref->translation is ignored, i.e. */ + /* Value of ref->translation is ignored, i.e., */ /* no recursion for ip address tamplates. */ if (ip_mask_match(ref->name, ip_number, ip_name)) return YES; @@ -656,21 +660,21 @@ PUBLIC GroupDefList *HTAA_readGroupFile ARGS1(CONST char *, filename) while (NULL != (group_cache = (GroupCache*)HTList_nextObject(cur))) { if (!strcmp(filename, group_cache->group_filename)) { - if (TRACE) fprintf(stderr, "%s '%s' %s\n", - "HTAA_readGroupFile: group file", - filename, "already found in cache"); + CTRACE(tfp, "%s '%s' %s\n", + "HTAA_readGroupFile: group file", + filename, "already found in cache"); return group_cache->group_list; } /* if cache match */ } /* while cached files remain */ } /* cache exists */ - if (TRACE) fprintf(stderr, "HTAA_readGroupFile: reading group file `%s'\n", - filename); + CTRACE(tfp, "HTAA_readGroupFile: reading group file `%s'\n", + filename); if (!(fp = fopen(filename, "r"))) { - if (TRACE) fprintf(stderr, "%s '%s'\n", - "HTAA_readGroupFile: unable to open group file", - filename); + CTRACE(tfp, "%s '%s'\n", + "HTAA_readGroupFile: unable to open group file", + filename); return NULL; } @@ -683,10 +687,9 @@ PUBLIC GroupDefList *HTAA_readGroupFile ARGS1(CONST char *, filename) HTList_addObject(group_cache_list, (void*)group_cache); fclose(fp); - if (TRACE) { - fprintf(stderr, "Read group file '%s', results follow:\n", filename); + CTRACE(tfp, "Read group file '%s', results follow:\n", filename); + if (TRACE) print_group_def_list(group_cache->group_list); - } return group_cache->group_list; } @@ -724,7 +727,7 @@ PUBLIC HTAAFailReasonType HTAA_userAndInetInGroup ARGS4(GroupDef *, group, while (NULL != (item = (Item*)HTList_nextObject(cur1))) { if (!item->address_def_list || /* Any address allowed */ ip_in_def_list(item->address_def_list, ip_number, ip_name)) { - + if (!item->user_def_list) /* Any user allowed */ return HTAA_OK; else { @@ -732,7 +735,7 @@ PUBLIC HTAAFailReasonType HTAA_userAndInetInGroup ARGS4(GroupDef *, group, Ref *ref; while (NULL != (ref = (Ref*)HTList_nextObject(cur2))) { - + if (ref->translation) { /* Group, check recursively */ reason = HTAA_userAndInetInGroup(ref->translation, username, @@ -753,7 +756,7 @@ PUBLIC HTAAFailReasonType HTAA_userAndInetInGroup ARGS4(GroupDef *, group, } } /* while items in group */ } /* valid parameters */ - + return reason; /* No match, or invalid parameters */ } diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTGroup.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTGroup.h index 496a5077ad0..e78ac5938f5 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTGroup.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTGroup.h @@ -1,22 +1,12 @@ /* GROUP FILE ROUTINES - + */ #ifndef HTGROUP_H #define HTGROUP_H -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ -#include "HTList.h" +#include -#ifdef SHORT_NAMES -#define HTAApGrD HTAA_parseGroupDef -#define HTAArGrR HTAA_resolveGroupReferences -#define HTAApGrD HTAA_printGroupDef -#define HTAAGD_d GroupDef_delete -#define HTAAuIIG HTAA_userAndInetInGroup -#endif /* SHORT_NAMES */ typedef HTList GroupDefList; typedef HTList ItemList; @@ -51,63 +41,63 @@ Group definition grammar string "sequence of alphanumeric characters" - + user_name string - + group_name string - + group_ref group_name - + user_def user_name | group_ref - + user_def_list user_def { ',' user_def } - + user_part user_def | '(' user_def_list ')' - + templ - + "sequence of alphanumeric characters and '*'s" - + ip_number_mask templ '.' templ '.' templ '.' templ - + domain_name_mask templ { '.' templ } - + address - + ip_number_mask | domain_name_mask - + address_def - + address - + address_def_list address_def { ',' address_def } - + address_part address_def | '(' address_def_list ')' - + item [user_part] ['@' address_part] - + item_list item { ',' item } - + group_def item_list - + group_decl group_name ':' group_def - + PARSE GROUP DEFINITION - + */ PUBLIC GroupDef *HTAA_parseGroupDef PARAMS((FILE * fp)); @@ -117,7 +107,7 @@ Fill in Pointers to referenced Group Definitions in a Group Definition References to groups (by their name) are resolved from group_def_list and pointers to those structures are added to group_def. - + */ PUBLIC void HTAA_resolveGroupReferences PARAMS((GroupDef * group_def, @@ -128,7 +118,7 @@ Read Group File (and do caching) If group file is already in cache returns a pointer to previously read group definition list. - + */ PUBLIC GroupDefList *HTAA_readGroupFile PARAMS((CONST char * filename)); @@ -136,9 +126,9 @@ PUBLIC GroupDefList *HTAA_readGroupFile PARAMS((CONST char * filename)); Delete Group Definition - Groups in cache should never be freed by this function. This should only be used to + Groups in cache should never be freed by this function. This should only be used to free group definitions read by HTAA_parseGroupDef. - + */ PUBLIC void GroupDef_delete PARAMS((GroupDef * group_def)); @@ -154,7 +144,7 @@ PUBLIC void HTAA_printGroupDef PARAMS((GroupDef * group_def)); Does a User Belong to a Given Set of Groups This function checks both the username and the internet address. - + */ /* PUBLIC HTAA_userAndInetInGroup() diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTHistory.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTHistory.c deleted file mode 100644 index 726380a6f02..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTHistory.c +++ /dev/null @@ -1,157 +0,0 @@ -#include "HTUtils.h" -#include "tcp.h" /* for standard io */ - -#include "HTHistory.h" - -#include "LYLeaks.h" - -static HTList * history; /* List of visited anchors */ - - -/* Navigation -** ========== -*/ - -/* Record the jump to an anchor -** ---------------------------- -*/ - -void HTHistory_record - ARGS1 (HTAnchor *,destination) -{ - if (destination) { - if (! history) - history = HTList_new(); - HTList_addObject (history, destination); - } -} - -/* Go back in history (find the last visited node) -** ------------------ -*/ - -HTAnchor * HTHistory_backtrack - NOARGS /* FIXME: Should we add a `sticky' option ? */ -{ - if (HTHistory_canBacktrack()) - HTList_removeLastObject(history); - return(HTAnchor *)HTList_lastObject(history); /* is Home if can't backtrack */ -} - -BOOL HTHistory_canBacktrack - NOARGS -{ - return (HTList_objectAt (history, 1) != NULL); -} - -/* Browse through references in the same parent node -** ------------------------------------------------- -** -** Take the n-th child's link after or before the one we took to get here. -** Positive offset means go towards most recently added children. -*/ - -HTAnchor * HTHistory_moveBy - ARGS1 (int,offset) -{ - HTAnchor * last = (HTAnchor *)HTList_objectAt (history, 1); - if (! last) - return NULL; /* No last visited node */ - if (last != (HTAnchor *) last->parent) { /* Was a child */ - HTList * kids = last->parent->children; - int i = HTList_indexOf (kids, last); - HTAnchor * nextOne = (HTAnchor *)HTList_objectAt (kids, i - offset); - if (nextOne) { - HTAnchor * destination = HTAnchor_followMainLink (nextOne); - if (destination) { - HTList_removeLastObject (history); - HTList_removeLastObject (history); - HTList_addObject (history, nextOne); - HTList_addObject (history, destination); - } - return destination; - } else { - if (TRACE) fprintf(stderr, - "HTHistory_moveBy: offset by %+d goes out of list %p.\n", - offset, (void*)kids); - return NULL; - } - } else { /* Was a parent */ - return NULL; /* FIXME we could possibly follow the next link... */ - } -} - -BOOL HTHistory_canMoveBy - ARGS1 (int,offset) -{ - HTAnchor * last = (HTAnchor *)HTList_objectAt (history, 1); - if (! last) - return NO; /* No last visited node */ - if (last != (HTAnchor *) last->parent) { /* Was a child */ - HTList * kids = last->parent->children; - int i = HTList_indexOf (kids, last); - return (HTList_objectAt (kids, i - offset) != NULL); - } else { /* Was a parent */ - return NO; /* FIXME we could possibly follow the next link... */ - } -} - - -/* Retrieval -** ========= -*/ - -/* Read numbered visited anchor (1 is the oldest) -** ---------------------------- -*/ - -HTAnchor * HTHistory_read - ARGS1 (int,number) -{ - return (HTAnchor *)HTList_objectAt(history, HTList_count (history) - number); -} - - -/* Recall numbered visited anchor (1 is the oldest) -** ------------------------------ -** This reads the anchor and stores it again in the list, except if last. -*/ - -HTAnchor * HTHistory_recall - ARGS1 (int,number) -{ - HTAnchor * destination = - (HTAnchor *)HTList_objectAt (history, HTList_count (history) - number); - if (destination && destination != (HTAnchor *)HTList_lastObject (history)) - HTList_addObject (history, destination); - return destination; -} - -/* Number of Anchors stored -** ------------------------ -** -** This is needed in order to check the validity of certain commands -** for menus, etc. -(not needed for now. Use canBacktrack, etc.) -int HTHistory_count - NOARGS -{ - return HTList_count (history); -} -*/ - -/* Change last history entry -** ------------------------- -** -** Sometimes we load a node by one anchor but leave by a different -** one, and it is the one we left from which we want to remember. -*/ - -void HTHistory_leavingFrom - ARGS1 (HTAnchor *,anchor) -{ - if (HTList_removeLastObject (history)) - HTList_addObject (history, anchor); - else - if (TRACE) fprintf(stderr, "HTHistory_leavingFrom: empty history !\n"); -} diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTHistory.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTHistory.h deleted file mode 100644 index a93781e96d5..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTHistory.h +++ /dev/null @@ -1,112 +0,0 @@ -/* */ - -#ifndef HTHISTORY_H -#define HTHISTORY_H - -#include "HTAnchor.h" - -#ifdef SHORT_NAMES -#define HTHistory_record HTHiReco -#define HTHistory_backtrack HTHiBack -#define HTHistory_canBacktrack HTHiCaBa -#define HTHistory_moveBy HTHiMoBy -#define HTHistory_canMoveBy HTHiCaMo -#define HTHistory_read HTHiRead -#define HTHistory_recall HTHiReca -#define HTHistory_count HTHiCoun -#define HTHistory_leavingFrom HTHiLeFr -#endif - -/* Navigation -** ========== -*/ - -/* Record the jump to an anchor -** ---------------------------- -*/ - -extern void HTHistory_record - PARAMS( - (HTAnchor * destination) - ); - -/* Go back in history (find the last visited node) -** ------------------ -*/ - -extern HTAnchor * HTHistory_backtrack - NOPARAMS; /* FIXME: Should we add a `sticky' option ? */ - -extern BOOL HTHistory_canBacktrack - NOPARAMS; - -/* Browse through references in the same parent node -** ------------------------------------------------- -** -** Take the n-th child's link after or before the one we took to get here. -** Positive offset means go towards most recently added children. -*/ - -extern HTAnchor * HTHistory_moveBy - PARAMS( - (int offset) - ); - -extern BOOL HTHistory_canMoveBy - PARAMS( - (int offset) - ); - -#define HTHistory_next (HTHistory_moveBy (+1)) -#define HTHistory_canNext (HTHistory_canMoveBy (+1)) -#define HTHistory_previous (HTHistory_moveBy (-1)) -#define HTHistory_canPrevious (HTHistory_canMoveBy (-1)) - - -/* Retrieval -** ========= -*/ - -/* Read numbered visited anchor (1 is the oldest) -** ---------------------------- -*/ - -extern HTAnchor * HTHistory_read - PARAMS( - (int number) - ); - -/* Recall numbered visited anchor (1 is the oldest) -** ------------------------------ -** This reads the anchor and stores it again in the list, except if last. -*/ - -extern HTAnchor * HTHistory_recall - PARAMS( - (int number) - ); - -/* Number of Anchors stored -** ------------------------ -** -** This is needed in order to check the validity of certain commands -** for menus, etc. -(not needed for now. Use canBacktrack, etc.) -extern int HTHistory_count NOPARAMS; -*/ - -/* Change last history entry -** ------------------------- -** -** Sometimes we load a node by one anchor but leave by a different -** one, and it is the one we left from which we want to remember. -*/ -extern void HTHistory_leavingFrom - PARAMS( - (HTAnchor * anchor) - ); - -#endif /* HTHISTORY_H */ -/* - - */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTInit.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTInit.c deleted file mode 100644 index 764da7b556d..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTInit.c +++ /dev/null @@ -1,176 +0,0 @@ -/* Configuration-specific Initialialization HTInit.c -** ---------------------------------------- -*/ - -/* Define a basic set of suffixes and presentations -** ------------------------------------------------ -** -*/ - -#include "HTUtils.h" - -/* Implements: -*/ -#include "HTInit.h" - -#include "HTML.h" -#include "HTPlain.h" -#include "HTMLGen.h" -#include "HTFile.h" -#include "HTFormat.h" -#include "HTMIME.h" -#include "HTWSRC.h" -#include "HTFWriter.h" - -#include "LYLeaks.h" - -PUBLIC void HTFormatInit NOARGS -{ -#ifdef NeXT - HTSetPresentation("application/postscript", "open %s", 1.0, 2.0, 0.0, 0); - /* The following needs the GIF previewer -- you might not have it. */ - HTSetPresentation("image/gif", "open %s", 0.3, 2.0, 0.0, 0); - HTSetPresentation("image/x-tiff", "open %s", 1.0, 2.0, 0.0, 0); - HTSetPresentation("audio/basic", "open %s", 1.0, 2.0, 0.0, 0); - HTSetPresentation("*", "open %s", 1.0, 0.0, 0.0, 0); -#else - if (getenv("DISPLAY")) { /* Must have X11 */ - HTSetPresentation("application/postscript", "ghostview %s", - 1.0, 3.0, 0.0, 0); - HTSetPresentation("image/gif", "xv %s", 1.0, 3.0, 0.0, 0); - HTSetPresentation("image/x-tiff", "xv %s", 1.0, 3.0, 0.0, 0); - HTSetPresentation("image/jpeg", "xv %s", 1.0, 3.0, 0.0, 0); - } -#endif - HTSetConversion("www/mime", "*", HTMIMEConvert, - 1.0, 0.0, 0.0, 0); - HTSetConversion("application/x-wais-source","*", HTWSRCConvert, - 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); - HTSetConversion("text/html", "www/present", HTMLPresent, - 1.0, 0.0, 0.0, 0); - HTSetConversion("text/plain", "text/html", HTPlainToHTML, - 1.0, 0.0, 0.0, 0); - HTSetConversion("text/plain", "www/present", HTPlainPresent, - 1.0, 0.0, 0.0, 0); - HTSetConversion("application/octet-stream", "www/present", HTSaveLocally, - 0.1, 0.0, 0.0, 0); - HTSetConversion("www/unknown", "www/present", HTSaveLocally, - 0.3, 0.0, 0.0, 0); - HTSetConversion("www/source", "www/present", HTSaveLocally, - 0.3, 0.0, 0.0, 0); -} - - - -/* Define a basic set of suffixes -** ------------------------------ -** -** The LAST suffix for a type is that used for temporary files -** of that type. -** The quality is an apriori bias as to whether the file should be -** used. Not that different suffixes can be used to represent files -** which are of the same format but are originals or regenerated, -** with different values. -*/ - -#ifndef NO_INIT -PUBLIC void HTFileInit NOARGS -{ - /* Suffix Contenet-Type Content-Encoding Quality */ - - HTSetSuffix(".mime", "www/mime", "8bit", 1.0); /* Internal -- MIME is */ - /* not recursive */ - HTSetSuffix(".bin", "application/octet-stream", "binary", 1.0); /* Uninterpreted binary */ - HTSetSuffix(".oda", "application/oda", "binary", 1.0); - HTSetSuffix(".pdf", "application/pdf", "binary", 1.0); - HTSetSuffix(".ai", "application/postscript", "8bit", 0.5); /* Adobe Illustrator */ - HTSetSuffix(".PS", "application/postscript", "8bit", 0.8); /* PostScript */ - HTSetSuffix(".eps", "application/postscript", "8bit", 0.8); - HTSetSuffix(".ps", "application/postscript", "8bit", 0.8); - HTSetSuffix(".rtf", "application/x-rtf", "7bit", 1.0); /* RTF */ - HTSetSuffix(".Z", "application/x-compressed", "binary", 1.0); /* Compressed data */ - HTSetSuffix(".csh", "application/x-csh", "7bit", 0.5); /* C-shell script */ - HTSetSuffix(".dvi", "application/x-dvi", "binary", 1.0); /* TeX DVI */ - HTSetSuffix(".hdf", "application/x-hdf", "binary", 1.0); /* NCSA HDF data file */ - HTSetSuffix(".latex", "application/x-latex", "8bit", 1.0); /* LaTeX source */ - HTSetSuffix(".nc", "application/x-netcdf", "binary", 1.0); /* Unidata netCDF data */ - HTSetSuffix(".cdf", "application/x-netcdf", "binary", 1.0); - HTSetSuffix(".sh", "application/x-sh", "7bit", 0.5); /* Shell-script */ - HTSetSuffix(".tcl", "application/x-tcl", "7bit", 0.5); /* TCL-script */ - HTSetSuffix(".tex", "application/x-tex", "8bit", 1.0); /* TeX source */ - HTSetSuffix(".texi", "application/x-texinfo", "7bit", 1.0); /* Texinfo */ - HTSetSuffix(".texinfo","application/x-texinfo", "7bit", 1.0); - HTSetSuffix(".t", "application/x-troff", "7bit", 0.5); /* Troff */ - HTSetSuffix(".roff", "application/x-troff", "7bit", 0.5); - HTSetSuffix(".tr", "application/x-troff", "7bit", 0.5); - HTSetSuffix(".man", "application/x-troff-man", "7bit", 0.5); /* Troff with man macros*/ - HTSetSuffix(".me", "application/x-troff-me", "7bit", 0.5); /* Troff with me macros */ - HTSetSuffix(".ms", "application/x-troff-ms", "7bit", 0.5); /* Troff with ms macros */ - HTSetSuffix(".src", "application/x-wais-source", "7bit", 1.0); /* WAIS source */ - HTSetSuffix(".zip", "application/zip", "binary", 1.0); /* PKZIP */ - HTSetSuffix(".bcpio", "application/x-bcpio", "binary", 1.0); /* Old binary CPIO */ - HTSetSuffix(".cpio", "application/x-cpio", "binary", 1.0); /* POSIX CPIO */ - HTSetSuffix(".gtar", "application/x-gtar", "binary", 1.0); /* Gnu tar */ - HTSetSuffix(".shar", "application/x-shar", "8bit", 1.0); /* Shell archive */ - HTSetSuffix(".sv4cpio","application/x-sv4cpio", "binary", 1.0); /* SVR4 CPIO */ - HTSetSuffix(".sv4crc", "application/x-sv4crc", "binary", 1.0); /* SVR4 CPIO with CRC */ - HTSetSuffix(".tar", "application/x-tar", "binary", 1.0); /* 4.3BSD tar */ - HTSetSuffix(".ustar", "application/x-ustar", "binary", 1.0); /* POSIX tar */ - HTSetSuffix(".snd", "audio/basic", "binary", 1.0); /* Audio */ - HTSetSuffix(".au", "audio/basic", "binary", 1.0); - HTSetSuffix(".aiff", "audio/x-aiff", "binary", 1.0); - HTSetSuffix(".aifc", "audio/x-aiff", "binary", 1.0); - HTSetSuffix(".aif", "audio/x-aiff", "binary", 1.0); - HTSetSuffix(".wav", "audio/x-wav", "binary", 1.0); /* Windows+ WAVE format */ - HTSetSuffix(".gif", "image/gif", "binary", 1.0); /* GIF */ - HTSetSuffix(".ief", "image/ief", "binary", 1.0); /* Image Exchange fmt */ - HTSetSuffix(".jpg", "image/jpeg", "binary", 1.0); /* JPEG */ - HTSetSuffix(".JPG", "image/jpeg", "binary", 1.0); - HTSetSuffix(".JPE", "image/jpeg", "binary", 1.0); - HTSetSuffix(".jpe", "image/jpeg", "binary", 1.0); - HTSetSuffix(".JPEG", "image/jpeg", "binary", 1.0); - HTSetSuffix(".jpeg", "image/jpeg", "binary", 1.0); - HTSetSuffix(".tif", "image/tiff", "binary", 1.0); /* TIFF */ - HTSetSuffix(".tiff", "image/tiff", "binary", 1.0); - HTSetSuffix(".ras", "image/cmu-raster", "binary", 1.0); - HTSetSuffix(".pnm", "image/x-portable-anymap", "binary", 1.0); /* PBM Anymap format */ - HTSetSuffix(".pbm", "image/x-portable-bitmap", "binary", 1.0); /* PBM Bitmap format */ - HTSetSuffix(".pgm", "image/x-portable-graymap", "binary", 1.0); /* PBM Graymap format */ - HTSetSuffix(".ppm", "image/x-portable-pixmap", "binary", 1.0); /* PBM Pixmap format */ - HTSetSuffix(".rgb", "image/x-rgb", "binary", 1.0); - HTSetSuffix(".xbm", "image/x-xbitmap", "binary", 1.0); /* X bitmap */ - HTSetSuffix(".xpm", "image/x-xpixmap", "binary", 1.0); /* X pixmap format */ - HTSetSuffix(".xwd", "image/x-xwindowdump", "binary", 1.0); /* X window dump (xwd) */ - HTSetSuffix(".html", "text/html", "8bit", 1.0); /* HTML */ - HTSetSuffix(".c", "text/plain", "7bit", 0.5); /* C source */ - HTSetSuffix(".h", "text/plain", "7bit", 0.5); /* C headers */ - HTSetSuffix(".C", "text/plain", "7bit", 0.5); /* C++ source */ - HTSetSuffix(".cc", "text/plain", "7bit", 0.5); /* C++ source */ - HTSetSuffix(".hh", "text/plain", "7bit", 0.5); /* C++ headers */ - HTSetSuffix(".m", "text/plain", "7bit", 0.5); /* Objective-C source */ - HTSetSuffix(".f90", "text/plain", "7bit", 0.5); /* Fortran 90 source */ - HTSetSuffix(".txt", "text/plain", "7bit", 0.5); /* Plain text */ - HTSetSuffix(".rtx", "text/richtext", "7bit", 1.0); /* MIME Richtext format */ - HTSetSuffix(".tsv", "text/tab-separated-values", "7bit", 1.0); /* Tab-separated values */ - HTSetSuffix(".etx", "text/x-setext", "7bit", 0.9); /* Struct Enchanced Txt */ - HTSetSuffix(".MPG", "video/mpeg", "binary", 1.0); /* MPEG */ - HTSetSuffix(".mpg", "video/mpeg", "binary", 1.0); - HTSetSuffix(".MPE", "video/mpeg", "binary", 1.0); - HTSetSuffix(".mpe", "video/mpeg", "binary", 1.0); - HTSetSuffix(".MPEG", "video/mpeg", "binary", 1.0); - HTSetSuffix(".mpeg", "video/mpeg", "binary", 1.0); - HTSetSuffix(".qt", "video/quicktime", "binary", 1.0); /* QuickTime */ - HTSetSuffix(".mov", "video/quicktime", "binary", 1.0); - HTSetSuffix(".avi", "video/x-msvideo", "binary", 1.0); /* MS Video for Windows */ - HTSetSuffix(".movie", "video/x-sgi-movie", "binary", 1.0); /* SGI "moviepalyer" */ - - HTSetSuffix("*.*", "application/octet-stream", "binary", 0.1); - HTSetSuffix("*", "text/plain", "7bit", 0.5); - -} -#endif /* NO_INIT */ - diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTInit.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTInit.h index 61c7d776a57..cedbb25c727 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTInit.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTInit.h @@ -10,14 +10,16 @@ Implemented by HTInit.c by default. */ -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ +#ifndef HTINIT_H +#define HTINIT_H 1 + +#ifndef HTUTILS_H +#include +#endif + extern void HTFormatInit NOPARAMS; extern void HTPreparsedFormatInit NOPARAMS; extern void HTFileInit NOPARAMS; -/* - - */ +#endif /* HTINIT_H */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTLex.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTLex.c index 268701704d1..59901fb3ba6 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTLex.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTLex.c @@ -13,11 +13,11 @@ ** */ -#include "HTUtils.h" -#include "HTAAUtil.h" -#include "HTLex.h" /* Implemented here */ +#include -#include "LYLeaks.h" +#include /* Implemented here */ + +#include /* ** Global variables @@ -47,7 +47,7 @@ PUBLIC LexItem lex ARGS1(FILE *, fp) if (fp != cache) { /* This cache doesn't work ok because the system */ cache = fp; /* often assign same FILE structure the next open */ - HTlex_line = 1; /* file. So, if there are syntax errors in setup */ + HTlex_line = 1; /* file. So, if there are syntax errors in setup */ } /* files it may confuse things later on. */ if (lex_pushed_back != LEX_NONE) { @@ -77,14 +77,14 @@ PUBLIC LexItem lex ARGS1(FILE *, fp) else return LEX_ALPH_STR; } else switch(ch) { - case EOF: return LEX_EOF; break; + case EOF: return LEX_EOF; case '\n': - HTlex_line++; return LEX_REC_SEP; break; - case ':': return LEX_FIELD_SEP; break; - case ',': return LEX_ITEM_SEP; break; - case '(': return LEX_OPEN_PAREN; break; - case ')': return LEX_CLOSE_PAREN; break; - case '@': return LEX_AT_SIGN; break; + HTlex_line++; return LEX_REC_SEP; + case ':': return LEX_FIELD_SEP; + case ',': return LEX_ITEM_SEP; + case '(': return LEX_OPEN_PAREN; + case ')': return LEX_CLOSE_PAREN; + case '@': return LEX_AT_SIGN; default: ; /* Leading white space ignored (SP,TAB,CR) */ } break; @@ -99,44 +99,33 @@ PUBLIC LexItem lex ARGS1(FILE *, fp) PUBLIC char *lex_verbose ARGS1(LexItem, lex_item) { - static char msg[100]; + static char msg[100]; /* @@@@@@@@ */ switch (lex_item) { case LEX_NONE: /* Internally used */ return "NO-LEX-ITEM"; - break; case LEX_EOF: /* End of file */ return "end-of-file"; - break; case LEX_REC_SEP: /* Record separator */ return "record separator (newline)"; - break; case LEX_FIELD_SEP: /* Field separator */ return "field separator ':'"; - break; case LEX_ITEM_SEP: /* List item separator */ return "item separator ','"; - break; case LEX_OPEN_PAREN: /* Group start tag */ return "'('"; - break; case LEX_CLOSE_PAREN: /* Group end tag */ return "')'"; - break; case LEX_AT_SIGN: /* Address qualifier */ return "address qualifier '@'"; - break; case LEX_ALPH_STR: /* Alphanumeric string */ sprintf(msg, "alphanumeric string '%s'", HTlex_buffer); return msg; - break; case LEX_TMPL_STR: /* Template string */ sprintf(msg, "template string '%s'", HTlex_buffer); return msg; - break; default: return "UNKNOWN-LEX-ITEM"; - break; } } diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTLex.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTLex.h index 5895579bccb..f0b6875e1fb 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTLex.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTLex.h @@ -1,20 +1,14 @@ /* LEXICAL ANALYSOR (MAINLY FOR CONFIG FILES) - + */ #ifndef HTLEX_H #define HTLEX_H #ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ - - -#ifdef SHORT_NAMES -#define lex_verb lex_verbose -#endif /*SHORT_NAMES*/ - - +#include +#endif + typedef enum { LEX_NONE, /* Internally used */ LEX_EOF, /* End of file */ @@ -36,7 +30,7 @@ extern int HTlex_line; /* Line number in source file */ Get Next Lexical Item If returns LEX_ALPH_STR or LEX_TMPL_STR the string is in global buffer lex_buffer. - + */ PUBLIC LexItem lex PARAMS((FILE * fp)); @@ -59,6 +53,3 @@ PUBLIC char *lex_verbose PARAMS((LexItem lex_item)); */ #endif /* not HTLEX_H */ -/* - - End of file HTLex.h. */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTList.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTList.c index 839e961ddb5..3ea533697b9 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTList.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTList.c @@ -6,15 +6,10 @@ ** New nodes are inserted between the header and the rest of the list. */ -#include "HTUtils.h" -#include "HTList.h" - -/*#include included by HTUtils.h -- FM *//* joe@athena, TBL 921019 */ - -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} +#include +#include +#include /* Create list. */ @@ -47,6 +42,50 @@ PUBLIC void HTList_delete ARGS1( return; } +/* Reverse order of elements in list. + */ +PUBLIC HTList * HTList_reverse ARGS1( + HTList *, start) +{ + HTList *cur, *succ; + if (!(start && start->next && (cur = start->next->next))) + return start; + start->next->next = NULL; + while (cur) { + succ = cur->next; + cur->next = start->next; + start->next = cur; + cur = succ; + } + return start; +} + +/* Append a list to another. + * + * If successful, the second list will become empty but not freed. + */ +PUBLIC HTList * HTList_appendList ARGS2( + HTList *, start, + HTList *, tail) +{ + HTList * temp = start; + + if (!start) { + CTRACE(tfp, "HTList: Trying to append list %p to a nonexisting list\n", + tail); + return NULL; + } + if (!(tail && tail->next)) + return start; + + while (temp->next) + temp = temp->next; + + temp->next = tail->next; + tail->next = NULL; /* tail is now an empty list */ + return start; +} + /* Add object to START of list (so it is pointed to by the head). */ @@ -63,10 +102,9 @@ PUBLIC void HTList_addObject ARGS2( newNode->next = me->next; me->next = newNode; - } else if (TRACE) { - fprintf(stderr, - "HTList: Trying to add object %p to a nonexisting list\n", - newObject); + } else { + CTRACE(tfp, "HTList: Trying to add object %p to a nonexisting list\n", + newObject); } return; @@ -106,20 +144,14 @@ PUBLIC void HTList_insertObjectAt ARGS3( int Pos = pos; if (!temp) { - if (TRACE) { - fprintf(stderr, - "HTList: Trying to add object %p to a nonexisting list\n", + CTRACE(tfp, "HTList: Trying to add object %p to a nonexisting list\n", newObject); - } return; } if (Pos < 0) { Pos = 0; - if (TRACE) { - fprintf(stderr, - "HTList: Treating negative object position %d as %d.\n", + CTRACE(tfp, "HTList: Treating negative object position %d as %d.\n", pos, Pos); - } } prevNode = temp; @@ -133,7 +165,7 @@ PUBLIC void HTList_insertObjectAt ARGS3( prevNode->next = newNode; return; } - prevNode = temp; + prevNode = temp; Pos--; } if (Pos >= 0) diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTList.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTList.h index 89c0e62bbc9..e3ba6a0fbe6 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTList.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTList.h @@ -8,8 +8,8 @@ #define HTLIST_H #ifndef HTUTILS_H -#include "HTUtils.h" /* for BOOL type and PARAMS and ARGS*/ -#endif /* HTUTILS_H */ +#include +#endif typedef struct _HTList HTList; @@ -18,19 +18,6 @@ struct _HTList { HTList * next; }; -#ifdef SHORT_NAMES -#define HTList_new HTLiNew -#define HTList_delete HTLiDele -#define HTList_addObject HTLiAdOb -#define HTList_removeObject HTLiReOb -#define HTList_removeObjectAt HTLiReAt -#define HTList_removeLastObject HTLiReLa -#define HTList_removeFirstObject HTLiReFi -#define HTList_count HTLiCoun -#define HTList_indexOf HTLiInOf -#define HTList_objectAt HTLiObAt -#endif /* SHORT_NAMES */ - /* Fast macro to traverse a list. Call it first with copy of the list ** header. It returns the first object and increments the passed list @@ -62,6 +49,17 @@ extern HTList * HTList_new NOPARAMS; extern void HTList_delete PARAMS(( HTList * me)); +/* Reverse a list. +*/ +extern HTList * HTList_reverse PARAMS(( + HTList * start)); + +/* Append two lists, making second list empty. +*/ +extern HTList * HTList_appendList PARAMS(( + HTList * start, + HTList * tail)); + /* Add object to START of list (so it is pointed to by the head). */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMIME.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMIME.c index 8d548fb92e1..7426f2d8b14 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMIME.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMIME.c @@ -11,31 +11,23 @@ ** Feb 92 Written Tim Berners-Lee, CERN ** */ -#include "HTUtils.h" -#include "HTMIME.h" /* Implemented here */ -#include "HTAlert.h" -#include "HTCJK.h" -#include "UCMap.h" -#include "UCDefs.h" -#include "UCAux.h" +#include +#include /* Implemented here */ +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include -#include "LYCharSets.h" -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} - -extern CONST char *LYchar_set_names[]; -extern BOOLEAN LYRawMode; extern BOOL HTPassEightBitRaw; extern HTCJKlang HTCJK; -extern void LYSetCookie PARAMS(( - CONST char * SetCookie, - CONST char * SetCookie2, - CONST char * address)); -extern time_t LYmktime PARAMS((char *string, BOOL absolute)); - - /* MIME Object ** ----------- */ @@ -113,7 +105,7 @@ typedef enum _MIME_state { /* TRANSPARENT and IGNORE are defined as stg else in _WINDOWS */ } MIME_state; -#define VALUE_SIZE 1024 /* @@@@@@@ Arbitrary? */ +#define VALUE_SIZE 5120 /* @@@@@@@ Arbitrary? */ struct _HTStream { CONST HTStreamClass * isa; @@ -198,7 +190,17 @@ PRIVATE void HTMIME_put_character ARGS2( ** See NetToText for an implementation which preserves single CR or LF. */ if (me->net_ascii) { + /* + ** This is evidence that at one time, this code supported + ** local character sets other than ASCII. But there is so much + ** code in HTTP.c that depends on line_buffer's having been + ** translated to local character set that I needed to put the + ** FROMASCII translation there, leaving this translation purely + ** destructive. -- gil + */ /* S/390 -- gil -- 0118 */ +#ifndef NOT_ASCII c = FROMASCII(c); +#endif /* NOT_ASCII */ if (c == CR) return; else if (c == LF) @@ -232,17 +234,13 @@ PRIVATE void HTMIME_put_character ARGS2( case 'a': case 'A': me->state = miA; - if (TRACE) - fprintf(stderr, - "HTMIME: Got 'A' at beginning of line, state now A\n"); + CTRACE(tfp, "HTMIME: Got 'A' at beginning of line, state now A\n"); break; case 'c': case 'C': me->state = miC; - if (TRACE) - fprintf (stderr, - "HTMIME: Got 'C' at beginning of line, state now C\n"); + CTRACE (tfp, "HTMIME: Got 'C' at beginning of line, state now C\n"); break; case 'd': @@ -250,17 +248,13 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ate:"; me->if_ok = miDATE; me->state = miCHECK; - if (TRACE) - fprintf (stderr, - "HTMIME: Got 'D' at beginning of line, checking for 'ate:'\n"); + CTRACE (tfp, "HTMIME: Got 'D' at beginning of line, checking for 'ate:'\n"); break; case 'e': case 'E': me->state = miE; - if (TRACE) - fprintf (stderr, - "HTMIME: Got 'E' at beginning of line, state now E\n"); + CTRACE (tfp, "HTMIME: Got 'E' at beginning of line, state now E\n"); break; case 'k': @@ -268,25 +262,19 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "eep-alive:"; me->if_ok = miKEEP_ALIVE; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Got 'K' at beginning of line, checking for 'eep-alive:'\n"); + CTRACE(tfp, "HTMIME: Got 'K' at beginning of line, checking for 'eep-alive:'\n"); break; case 'l': case 'L': me->state = miL; - if (TRACE) - fprintf (stderr, - "HTMIME: Got 'L' at beginning of line, state now L\n"); + CTRACE (tfp, "HTMIME: Got 'L' at beginning of line, state now L\n"); break; case 'p': case 'P': me->state = miP; - if (TRACE) - fprintf (stderr, - "HTMIME: Got 'P' at beginning of line, state now P\n"); + CTRACE (tfp, "HTMIME: Got 'P' at beginning of line, state now P\n"); break; case 'r': @@ -294,49 +282,37 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "etry-after:"; me->if_ok = miRETRY_AFTER; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Got 'R' at beginning of line, checking for 'etry-after'\n"); + CTRACE(tfp, "HTMIME: Got 'R' at beginning of line, checking for 'etry-after'\n"); break; case 's': case 'S': me->state = miS; - if (TRACE) - fprintf (stderr, - "HTMIME: Got 'S' at beginning of line, state now S\n"); + CTRACE (tfp, "HTMIME: Got 'S' at beginning of line, state now S\n"); break; case 't': case 'T': me->state = miT; - if (TRACE) - fprintf (stderr, - "HTMIME: Got 'T' at beginning of line, state now T\n"); + CTRACE (tfp, "HTMIME: Got 'T' at beginning of line, state now T\n"); break; case 'u': case 'U': me->state = miU; - if (TRACE) - fprintf (stderr, - "HTMIME: Got 'U' at beginning of line, state now U\n"); + CTRACE (tfp, "HTMIME: Got 'U' at beginning of line, state now U\n"); break; case 'v': case 'V': me->state = miV; - if (TRACE) - fprintf (stderr, - "HTMIME: Got 'V' at beginning of line, state now V\n"); + CTRACE (tfp, "HTMIME: Got 'V' at beginning of line, state now V\n"); break; case 'w': case 'W': me->state = miW; - if (TRACE) - fprintf (stderr, - "HTMIME: Got 'W' at beginning of line, state now W\n"); + CTRACE (tfp, "HTMIME: Got 'W' at beginning of line, state now W\n"); break; case '\n': /* Blank line: End of Header! */ @@ -345,9 +321,7 @@ PRIVATE void HTMIME_put_character ARGS2( if (strchr(HTAtom_name(me->format), ';') != NULL) { char *cp = NULL, *cp1, *cp2, *cp3 = NULL, *cp4; - if (TRACE) - fprintf(stderr, - "HTMIME: Extended MIME Content-Type is %s\n", + CTRACE(tfp, "HTMIME: Extended MIME Content-Type is %s\n", HTAtom_name(me->format)); StrAllocCopy(cp, HTAtom_name(me->format)); /* @@ -359,8 +333,7 @@ PRIVATE void HTMIME_put_character ARGS2( ** we'll make sure they're still gone from any ** charset parameter we check. - FM */ - for (i = 0; cp[i]; i++) - cp[i] = TOLOWER(cp[i]); + LYLowerCase(cp); if ((cp1 = strchr(cp, ';')) != NULL) { BOOL chartrans_ok = NO; if ((cp2 = strstr(cp1, "charset")) != NULL) { @@ -390,6 +363,13 @@ PRIVATE void HTMIME_put_character ARGS2( else if (chndl < 0) {/* got something but we don't recognize it */ chndl = UCLYhndl_for_unrec; + if (chndl < 0) + /* + ** UCLYhndl_for_unrec not defined :-( + ** fallback to UCLYhndl_for_unspec + ** which always valid. + */ + chndl = UCLYhndl_for_unspec; /* always >= 0 */ if (UCCanTranslateFromTo(chndl, current_char_set)) { chartrans_ok = YES; @@ -400,7 +380,6 @@ PRIVATE void HTMIME_put_character ARGS2( UCT_SETBY_DEFAULT); } } - FREE(cp3); if (chartrans_ok) { LYUCcharset * p_in = HTAnchor_getUCInfoStage(me->anchor, @@ -444,59 +423,48 @@ PRIVATE void HTMIME_put_character ARGS2( HTPassEightBitRaw = TRUE; } } else if (p_out->enc == UCT_ENC_CJK) { - if (LYRawMode) { - if ((!strcmp(p_in->MIMEname, - "euc-jp") || - !strcmp(p_in->MIMEname, - "shift_jis")) && - (!strcmp(p_out->MIMEname, - "euc-jp") || - !strcmp(p_out->MIMEname, - "shift_jis"))) { - HTCJK = JAPANESE; - } else if (!strcmp(p_in->MIMEname, - "euc-cn") && - !strcmp(p_out->MIMEname, - "euc-cn")) { - HTCJK = CHINESE; - } else if (!strcmp(p_in->MIMEname, - "big-5") && - !strcmp(p_out->MIMEname, - "big-5")) { - HTCJK = TAIPEI; - } else if (!strcmp(p_in->MIMEname, - "euc-kr") && - !strcmp(p_out->MIMEname, - "euc-kr")) { - HTCJK = KOREAN; - } else { - HTCJK = NOCJK; - } - } else { - HTCJK = NOCJK; - } + Set_HTCJK(p_in->MIMEname, p_out->MIMEname); } - /* - ** Check for an iso-8859-# we don't know. - FM - */ - } else if - (!strncmp(cp4, "iso-8859-", 9) && - isdigit((unsigned char)cp4[9]) && - !strncmp(LYchar_set_names[current_char_set], - "Other ISO Latin", 15)) { + } else { /* - ** Hope it's a match, for now. - FM + ** Cannot translate. + ** If according to some heuristic the given + ** charset and the current display character + ** both are likely to be like ISO-8859 in + ** structure, pretend we have some kind + ** of match. */ - *cp1 = '\0'; - me->format = HTAtom_for(cp); - cp1 = &cp4[10]; - while (*cp1 && - isdigit((unsigned char)(*cp1))) - cp1++; - *cp1 = '\0'; - StrAllocCopy(me->anchor->charset, cp4); - HTPassEightBitRaw = TRUE; - HTAlert(me->anchor->charset); + BOOL given_is_8859 + = (!strncmp(cp4, "iso-8859-", 9) && + isdigit((unsigned char)cp4[9])); + BOOL given_is_8859like + = (given_is_8859 || + !strncmp(cp4, "windows-", 8) || + !strncmp(cp4, "cp12", 4) || + !strncmp(cp4, "cp-12", 5)); + BOOL given_and_display_8859like + = (given_is_8859like && + (strstr(LYchar_set_names[current_char_set], + "ISO-8859") || + strstr(LYchar_set_names[current_char_set], + "windows-"))); + + if (given_and_display_8859like) { + *cp1 = '\0'; + me->format = HTAtom_for(cp); + } + if (given_is_8859) { + cp1 = &cp4[10]; + while (*cp1 && + isdigit((unsigned char)(*cp1))) + cp1++; + *cp1 = '\0'; + } + if (given_and_display_8859like) { + StrAllocCopy(me->anchor->charset, cp4); + HTPassEightBitRaw = TRUE; + } + HTAlert(*cp4 ? cp4 : me->anchor->charset); } FREE(cp3); } else { @@ -546,26 +514,17 @@ PRIVATE void HTMIME_put_character ARGS2( StrAllocCopy(me->anchor->content_type, HTAtom_name(me->format)); if (!me->compression_encoding) { - if (TRACE) { - fprintf(stderr, - "HTMIME: MIME Content-Type is '%s', converting to '%s'\n", - HTAtom_name(me->format), HTAtom_name(me->targetRep)); - } + CTRACE(tfp, "HTMIME: MIME Content-Type is '%s', converting to '%s'\n", + HTAtom_name(me->format), HTAtom_name(me->targetRep)); } else { /* ** Change the format to that for "www/compressed" ** and set up a stream to deal with it. - FM */ - if (TRACE) { - fprintf(stderr, - "HTMIME: MIME Content-Type is '%s',\n", HTAtom_name(me->format)); - } + CTRACE(tfp, "HTMIME: MIME Content-Type is '%s',\n", HTAtom_name(me->format)); me->format = HTAtom_for("www/compressed"); - if (TRACE) { - fprintf(stderr, - " Treating as '%s'. Converting to '%s'\n", - HTAtom_name(me->format), HTAtom_name(me->targetRep)); - } + CTRACE(tfp, " Treating as '%s'. Converting to '%s'\n", + HTAtom_name(me->format), HTAtom_name(me->targetRep)); } if (me->set_cookie != NULL || me->set_cookie2 != NULL) { LYSetCookie(me->set_cookie, @@ -577,8 +536,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->target = HTStreamStack(me->format, me->targetRep, me->sink , me->anchor); if (!me->target) { - if (TRACE) - fprintf(stderr, "HTMIME: Can't translate! ** \n"); + CTRACE(tfp, "HTMIME: Can't translate! ** \n"); me->target = me->sink; /* Cheat */ } if (me->target) { @@ -598,7 +556,6 @@ PRIVATE void HTMIME_put_character ARGS2( default: goto bad_field_name; - break; } /* switch on character */ break; @@ -610,9 +567,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "cept-ranges:"; me->if_ok = miACCEPT_RANGES; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was A, found C, checking for 'cept-ranges:'\n"); + CTRACE(tfp, "HTMIME: Was A, found C, checking for 'cept-ranges:'\n"); break; case 'g': @@ -620,25 +575,19 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "e:"; me->if_ok = miAGE; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was A, found G, checking for 'e:'\n"); + CTRACE(tfp, "HTMIME: Was A, found G, checking for 'e:'\n"); break; case 'l': case 'L': me->state = miAL; - if (TRACE) - fprintf(stderr, "HTMIME: Was A, found L, state now AL'\n"); + CTRACE(tfp, "HTMIME: Was A, found L, state now AL'\n"); break; default: - if (TRACE) - fprintf(stderr, - "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "'g' or 'l'"); + CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "'g' or 'l'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -650,9 +599,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ow:"; me->if_ok = miALLOW; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was AL, found L, checking for 'ow:'\n"); + CTRACE(tfp, "HTMIME: Was AL, found L, checking for 'ow:'\n"); break; case 't': @@ -660,18 +607,13 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ernates:"; me->if_ok = miALTERNATES; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was AL, found T, checking for 'ernates:'\n"); + CTRACE(tfp, "HTMIME: Was AL, found T, checking for 'ernates:'\n"); break; default: - if (TRACE) - fprintf(stderr, - "HTMIME: Bad character `%c' found where `%s' expected\n", + CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'l' or 't'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -683,25 +625,19 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "che-control:"; me->if_ok = miCACHE_CONTROL; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was C, found A, checking for 'che-control:'\n"); + CTRACE(tfp, "HTMIME: Was C, found A, checking for 'che-control:'\n"); break; case 'o': case 'O': me->state = miCO; - if (TRACE) - fprintf(stderr, "HTMIME: Was C, found O, state now CO'\n"); + CTRACE(tfp, "HTMIME: Was C, found O, state now CO'\n"); break; default: - if (TRACE) - fprintf(stderr, - "HTMIME: Bad character `%c' found where `%s' expected\n", - c, "'a' or 'o'"); + CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", + c, "'a' or 'o'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -711,9 +647,7 @@ PRIVATE void HTMIME_put_character ARGS2( case 'n': case 'N': me->state = miCON; - if (TRACE) - fprintf(stderr, - "HTMIME: Was CO, found N, state now CON\n"); + CTRACE(tfp, "HTMIME: Was CO, found N, state now CON\n"); break; case 'o': @@ -721,18 +655,13 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "kie:"; me->if_ok = miCOOKIE; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was CO, found O, checking for 'kie:'\n"); + CTRACE(tfp, "HTMIME: Was CO, found O, checking for 'kie:'\n"); break; default: - if (TRACE) - fprintf(stderr, - "HTMIME: Bad character `%c' found where `%s' expected\n", + CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'n' or 'o'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -744,9 +673,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ection:"; me->if_ok = miCONNECTION; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was CON, found N, checking for 'ection:'\n"); + CTRACE(tfp, "HTMIME: Was CON, found N, checking for 'ection:'\n"); break; case 't': @@ -754,18 +681,13 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ent-"; me->if_ok = miCONTENT_; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was CON, found T, checking for 'ent-'\n"); + CTRACE(tfp, "HTMIME: Was CON, found T, checking for 'ent-'\n"); break; default: - if (TRACE) - fprintf(stderr, - "HTMIME: Bad character `%c' found where `%s' expected\n", + CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'n' or 't'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -777,9 +699,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ag:"; me->if_ok = miETAG; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was E, found T, checking for 'ag:'\n"); + CTRACE(tfp, "HTMIME: Was E, found T, checking for 'ag:'\n"); break; case 'x': @@ -787,18 +707,13 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "pires:"; me->if_ok = miEXPIRES; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was E, found X, checking for 'pires:'\n"); + CTRACE(tfp, "HTMIME: Was E, found X, checking for 'pires:'\n"); break; default: - if (TRACE) - fprintf(stderr, - "HTMIME: Bad character `%c' found where `%s' expected\n", + CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'t' or 'x'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -810,9 +725,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "st-modified:"; me->if_ok = miLAST_MODIFIED; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was L, found A, checking for 'st-modified:'\n"); + CTRACE(tfp, "HTMIME: Was L, found A, checking for 'st-modified:'\n"); break; case 'i': @@ -820,9 +733,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "nk:"; me->if_ok = miLINK; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was L, found I, checking for 'nk:'\n"); + CTRACE(tfp, "HTMIME: Was L, found I, checking for 'nk:'\n"); break; case 'o': @@ -830,18 +741,13 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "cation:"; me->if_ok = miLOCATION; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was L, found O, checking for 'cation:'\n"); + CTRACE(tfp, "HTMIME: Was L, found O, checking for 'cation:'\n"); break; default: - if (TRACE) - fprintf(stderr, - "HTMIME: Bad character `%c' found where `%s' expected\n", + CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'a', 'i' or 'o'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -851,8 +757,7 @@ PRIVATE void HTMIME_put_character ARGS2( case 'r': case 'R': me->state = miPR; - if (TRACE) - fprintf(stderr, "HTMIME: Was P, found R, state now PR'\n"); + CTRACE(tfp, "HTMIME: Was P, found R, state now PR'\n"); break; case 'u': @@ -860,18 +765,13 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "blic:"; me->if_ok = miPUBLIC; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was P, found U, checking for 'blic:'\n"); + CTRACE(tfp, "HTMIME: Was P, found U, checking for 'blic:'\n"); break; default: - if (TRACE) - fprintf(stderr, - "HTMIME: Bad character `%c' found where `%s' expected\n", + CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'r' or 'u'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -883,9 +783,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "gma:"; me->if_ok = miPRAGMA; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was PR, found A, checking for 'gma'\n"); + CTRACE(tfp, "HTMIME: Was PR, found A, checking for 'gma'\n"); break; case 'o': @@ -893,18 +791,13 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "xy-authenticate:"; me->if_ok = miPROXY_AUTHENTICATE; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was PR, found O, checking for 'xy-authenticate'\n"); + CTRACE(tfp, "HTMIME: Was PR, found O, checking for 'xy-authenticate'\n"); break; default: - if (TRACE) - fprintf(stderr, - "HTMIME: Bad character `%c' found where `%s' expected\n", + CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'a' or 'o'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -916,24 +809,19 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "fe:"; me->if_ok = miSAFE; me->state = miCHECK; - if (TRACE) - fprintf(stderr, "HTMIME: Was S, found A, checking for 'fe:'\n"); + CTRACE(tfp, "HTMIME: Was S, found A, checking for 'fe:'\n"); break; case 'e': case 'E': me->state = miSE; - if (TRACE) - fprintf(stderr, "HTMIME: Was S, found E, state now SE'\n"); + CTRACE(tfp, "HTMIME: Was S, found E, state now SE'\n"); break; default: - if (TRACE) - fprintf(stderr, - "HTMIME: Bad character `%c' found where `%s' expected\n", + CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'a' or 'e'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -945,9 +833,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ver:"; me->if_ok = miSERVER; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was SE, found R, checking for 'ver'\n"); + CTRACE(tfp, "HTMIME: Was SE, found R, checking for 'ver'\n"); break; case 't': @@ -955,18 +841,13 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "-cookie"; me->if_ok = miSET_COOKIE; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was SE, found T, checking for '-cookie'\n"); + CTRACE(tfp, "HTMIME: Was SE, found T, checking for '-cookie'\n"); break; default: - if (TRACE) - fprintf(stderr, - "HTMIME: Bad character `%c' found where `%s' expected\n", + CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'r' or 't'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -976,27 +857,20 @@ PRIVATE void HTMIME_put_character ARGS2( case ':': me->field = miSET_COOKIE1; /* remember it */ me->state = miSKIP_GET_VALUE; - if (TRACE) - fprintf(stderr, - "HTMIME: Was SET_COOKIE, found :, processing\n"); + CTRACE(tfp, "HTMIME: Was SET_COOKIE, found :, processing\n"); break; case '2': me->check_pointer = ":"; me->if_ok = miSET_COOKIE2; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was SET_COOKIE, found 2, checking for ':'\n"); + CTRACE(tfp, "HTMIME: Was SET_COOKIE, found 2, checking for ':'\n"); break; default: - if (TRACE) - fprintf(stderr, - "HTMIME: Bad character `%c' found where `%s' expected\n", + CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "':' or '2'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -1008,9 +882,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "tle:"; me->if_ok = miTITLE; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was T, found I, checking for 'tle:'\n"); + CTRACE(tfp, "HTMIME: Was T, found I, checking for 'tle:'\n"); break; case 'r': @@ -1018,18 +890,13 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ansfer-encoding:"; me->if_ok = miTRANSFER_ENCODING; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was T, found R, checking for 'ansfer-encoding'\n"); + CTRACE(tfp, "HTMIME: Was T, found R, checking for 'ansfer-encoding'\n"); break; default: - if (TRACE) - fprintf(stderr, - "HTMIME: Bad character `%c' found where `%s' expected\n", + CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'i' or 'r'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -1041,9 +908,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "grade:"; me->if_ok = miUPGRADE; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was U, found P, checking for 'grade:'\n"); + CTRACE(tfp, "HTMIME: Was U, found P, checking for 'grade:'\n"); break; case 'r': @@ -1051,18 +916,13 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "i:"; me->if_ok = miURI; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was U, found R, checking for 'i:'\n"); + CTRACE(tfp, "HTMIME: Was U, found R, checking for 'i:'\n"); break; default: - if (TRACE) - fprintf(stderr, - "HTMIME: Bad character `%c' found where `%s' expected\n", + CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'p' or 'r'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -1074,9 +934,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ry:"; me->if_ok = miVARY; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was V, found A, checking for 'ry:'\n"); + CTRACE(tfp, "HTMIME: Was V, found A, checking for 'ry:'\n"); break; case 'i': @@ -1084,18 +942,13 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "a:"; me->if_ok = miVIA; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was V, found I, checking for 'a:'\n"); + CTRACE(tfp, "HTMIME: Was V, found I, checking for 'a:'\n"); break; default: - if (TRACE) - fprintf(stderr, - "HTMIME: Bad character `%c' found where `%s' expected\n", + CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'a' or 'i'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -1107,9 +960,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "rning:"; me->if_ok = miWARNING; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was W, found A, checking for 'rning:'\n"); + CTRACE(tfp, "HTMIME: Was W, found A, checking for 'rning:'\n"); break; case 'w': @@ -1117,18 +968,13 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "w-authenticate:"; me->if_ok = miWWW_AUTHENTICATE; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was W, found W, checking for 'w-authenticate:'\n"); + CTRACE(tfp, "HTMIME: Was W, found W, checking for 'w-authenticate:'\n"); break; default: - if (TRACE) - fprintf(stderr, - "HTMIME: Bad character `%c' found where `%s' expected\n", + CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, "'a' or 'w'"); goto bad_field_name; - break; } /* switch on character */ break; @@ -1138,27 +984,22 @@ PRIVATE void HTMIME_put_character ARGS2( if (!*me->check_pointer) me->state = me->if_ok; } else { /* Error */ - if (TRACE) - fprintf(stderr, - "HTMIME: Bad character `%c' found where `%s' expected\n", + CTRACE(tfp, "HTMIME: Bad character `%c' found where `%s' expected\n", c, me->check_pointer - 1); goto bad_field_name; } break; case miCONTENT_: - if (TRACE) - fprintf (stderr, - "HTMIME: in case CONTENT_\n"); + CTRACE (tfp, "HTMIME: in case CONTENT_\n"); + switch(c) { case 'b': case 'B': me->check_pointer = "ase:"; me->if_ok = miCONTENT_BASE; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was CONTENT_, found B, checking for 'ase:'\n"); + CTRACE(tfp, "HTMIME: Was CONTENT_, found B, checking for 'ase:'\n"); break; case 'd': @@ -1166,9 +1007,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "isposition:"; me->if_ok = miCONTENT_DISPOSITION; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was CONTENT_, found D, checking for 'isposition:'\n"); + CTRACE(tfp, "HTMIME: Was CONTENT_, found D, checking for 'isposition:'\n"); break; case 'e': @@ -1176,9 +1015,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ncoding:"; me->if_ok = miCONTENT_ENCODING; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was CONTENT_, found E, checking for 'ncoding:'\n"); + CTRACE(tfp, "HTMIME: Was CONTENT_, found E, checking for 'ncoding:'\n"); break; case 'f': @@ -1186,17 +1023,13 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "eatures:"; me->if_ok = miCONTENT_FEATURES; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was CONTENT_, found F, checking for 'eatures:'\n"); + CTRACE(tfp, "HTMIME: Was CONTENT_, found F, checking for 'eatures:'\n"); break; case 'l': case 'L': me->state = miCONTENT_L; - if (TRACE) - fprintf (stderr, - "HTMIME: Was CONTENT_, found L, state now CONTENT_L\n"); + CTRACE (tfp, "HTMIME: Was CONTENT_, found L, state now CONTENT_L\n"); break; case 'm': @@ -1204,9 +1037,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "d5:"; me->if_ok = miCONTENT_MD5; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was CONTENT_, found M, checking for 'd5:'\n"); + CTRACE(tfp, "HTMIME: Was CONTENT_, found M, checking for 'd5:'\n"); break; case 'r': @@ -1214,42 +1045,32 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ange:"; me->if_ok = miCONTENT_RANGE; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was CONTENT_, found R, checking for 'ange:'\n"); + CTRACE(tfp, "HTMIME: Was CONTENT_, found R, checking for 'ange:'\n"); break; case 't': case 'T': me->state = miCONTENT_T; - if (TRACE) - fprintf(stderr, - "HTMIME: Was CONTENT_, found T, state now CONTENT_T\n"); + CTRACE(tfp, "HTMIME: Was CONTENT_, found T, state now CONTENT_T\n"); break; default: - if (TRACE) - fprintf(stderr, - "HTMIME: Was CONTENT_, found nothing; bleah\n"); + CTRACE(tfp, "HTMIME: Was CONTENT_, found nothing; bleah\n"); goto bad_field_name; - break; } /* switch on character */ break; case miCONTENT_L: - if (TRACE) - fprintf (stderr, - "HTMIME: in case CONTENT_L\n"); + CTRACE (tfp, "HTMIME: in case CONTENT_L\n"); + switch(c) { case 'a': case 'A': me->check_pointer = "nguage:"; me->if_ok = miCONTENT_LANGUAGE; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was CONTENT_L, found A, checking for 'nguage:'\n"); + CTRACE(tfp, "HTMIME: Was CONTENT_L, found A, checking for 'nguage:'\n"); break; case 'e': @@ -1257,9 +1078,7 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "ngth:"; me->if_ok = miCONTENT_LENGTH; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was CONTENT_L, found E, checking for 'ngth:'\n"); + CTRACE(tfp, "HTMIME: Was CONTENT_L, found E, checking for 'ngth:'\n"); break; case 'o': @@ -1267,34 +1086,26 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "cation:"; me->if_ok = miCONTENT_LOCATION; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was CONTENT_L, found O, checking for 'cation:'\n"); + CTRACE(tfp, "HTMIME: Was CONTENT_L, found O, checking for 'cation:'\n"); break; default: - if (TRACE) - fprintf (stderr, - "HTMIME: Was CONTENT_L, found nothing; bleah\n"); + CTRACE (tfp, "HTMIME: Was CONTENT_L, found nothing; bleah\n"); goto bad_field_name; - break; } /* switch on character */ break; case miCONTENT_T: - if (TRACE) - fprintf (stderr, - "HTMIME: in case CONTENT_T\n"); + CTRACE (tfp, "HTMIME: in case CONTENT_T\n"); + switch(c) { case 'r': case 'R': me->check_pointer = "ansfer-encoding:"; me->if_ok = miCONTENT_TRANSFER_ENCODING; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was CONTENT_T, found R, checking for 'ansfer-encoding:'\n"); + CTRACE(tfp, "HTMIME: Was CONTENT_T, found R, checking for 'ansfer-encoding:'\n"); break; case 'y': @@ -1302,17 +1113,12 @@ PRIVATE void HTMIME_put_character ARGS2( me->check_pointer = "pe:"; me->if_ok = miCONTENT_TYPE; me->state = miCHECK; - if (TRACE) - fprintf(stderr, - "HTMIME: Was CONTENT_T, found Y, checking for 'pe:'\n"); + CTRACE(tfp, "HTMIME: Was CONTENT_T, found Y, checking for 'pe:'\n"); break; default: - if (TRACE) - fprintf (stderr, - "HTMIME: Was CONTENT_T, found nothing; bleah\n"); + CTRACE (tfp, "HTMIME: Was CONTENT_T, found nothing; bleah\n"); goto bad_field_name; - break; } /* switch on character */ break; @@ -1379,11 +1185,11 @@ PRIVATE void HTMIME_put_character ARGS2( /* Fall through to store first character */ case miGET_VALUE: - if (WHITE(c) && c != 32) { /* End of field */ + if (WHITE(c) && c != ' ') { /* End of field */ char *cp; *me->value_pointer = '\0'; cp = (me->value_pointer - 1); - while ((cp >= me->value) && *cp == 32) + while ((cp >= me->value) && *cp == ' ') /* S/390 -- gil -- 0146 */ /* ** Trim trailing spaces. */ @@ -1391,45 +1197,34 @@ PRIVATE void HTMIME_put_character ARGS2( switch (me->field) { case miACCEPT_RANGES: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Accept-Ranges: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Accept-Ranges: '%s'\n", me->value); break; case miAGE: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Age: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Age: '%s'\n", me->value); break; case miALLOW: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Allow: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Allow: '%s'\n", me->value); break; case miALTERNATES: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Alternates: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Alternates: '%s'\n", me->value); break; case miCACHE_CONTROL: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Cache-Control: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Cache-Control: '%s'\n", me->value); if (!(me->value && *me->value)) break; /* ** Convert to lowercase and indicate in anchor. - FM */ - for (i = 0; me->value[i]; i++) - me->value[i] = TOLOWER(me->value[i]); + LYLowerCase(me->value); StrAllocCopy(me->anchor->cache_control, me->value); /* ** Check whether to set no_cache for the anchor. - FM @@ -1474,23 +1269,17 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miCOOKIE: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Cookie: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Cookie: '%s'\n", me->value); break; case miCONNECTION: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Connection: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Connection: '%s'\n", me->value); break; case miCONTENT_BASE: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Content-Base: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Content-Base: '%s'\n", me->value); if (!(me->value && *me->value)) break; @@ -1501,9 +1290,7 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miCONTENT_DISPOSITION: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Content-Disposition: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Content-Disposition: '%s'\n", me->value); if (!(me->value && *me->value)) break; @@ -1553,9 +1340,7 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miCONTENT_ENCODING: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Content-Encoding: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Content-Encoding: '%s'\n", me->value); if (!(me->value && *me->value) || !strcasecomp(me->value, "identity")) @@ -1563,8 +1348,7 @@ PRIVATE void HTMIME_put_character ARGS2( /* ** Convert to lowercase and indicate in anchor. - FM */ - for (i = 0; me->value[i]; i++) - me->value[i] = TOLOWER(me->value[i]); + LYLowerCase(me->value); StrAllocCopy(me->anchor->content_encoding, me->value); FREE(me->compression_encoding); if (!strcmp(me->value, "8bit") || @@ -1574,9 +1358,7 @@ PRIVATE void HTMIME_put_character ARGS2( ** Some server indicated "8bit", "7bit" or "binary" ** inappropriately. We'll ignore it. - FM */ - if (TRACE) - fprintf(stderr, - " Ignoring it!\n"); + CTRACE(tfp, " Ignoring it!\n"); } else { /* ** Save it to use as a flag for setting @@ -1587,31 +1369,24 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miCONTENT_FEATURES: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Content-Features: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Content-Features: '%s'\n", me->value); break; case miCONTENT_LANGUAGE: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Content-Language: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Content-Language: '%s'\n", me->value); if (!(me->value && *me->value)) break; /* ** Convert to lowercase and indicate in anchor. - FM */ - for (i = 0; me->value[i]; i++) - me->value[i] = TOLOWER(me->value[i]); + LYLowerCase(me->value); StrAllocCopy(me->anchor->content_language, me->value); break; case miCONTENT_LENGTH: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Content-Length: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Content-Length: '%s'\n", me->value); if (!(me->value && *me->value)) break; @@ -1621,16 +1396,12 @@ PRIVATE void HTMIME_put_character ARGS2( me->anchor->content_length = atoi(me->value); if (me->anchor->content_length < 0) me->anchor->content_length = 0; - if (TRACE) - fprintf(stderr, - " Converted to integer: '%d'\n", + CTRACE(tfp, " Converted to integer: '%d'\n", me->anchor->content_length); break; case miCONTENT_LOCATION: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Content-Location: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Content-Location: '%s'\n", me->value); if (!(me->value && *me->value)) break; @@ -1641,9 +1412,7 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miCONTENT_MD5: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Content-MD5: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Content-MD5: '%s'\n", me->value); if (!(me->value && *me->value)) break; @@ -1654,16 +1423,12 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miCONTENT_RANGE: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Content-Range: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Content-Range: '%s'\n", me->value); break; case miCONTENT_TRANSFER_ENCODING: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Content-Transfer-Encoding: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Content-Transfer-Encoding: '%s'\n", me->value); if (!(me->value && *me->value)) break; @@ -1671,15 +1436,12 @@ PRIVATE void HTMIME_put_character ARGS2( ** Force the Content-Transfer-Encoding value ** to all lower case. - FM */ - for (i = 0; me->value[i]; i++) - me->value[i] = TOLOWER(me->value[i]); + LYLowerCase(me->value); me->encoding = HTAtom_for(me->value); break; case miCONTENT_TYPE: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Content-Type: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Content-Type: '%s'\n", me->value); if (!(me->value && *me->value)) break; @@ -1697,9 +1459,7 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miDATE: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Date: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Date: '%s'\n", me->value); if (!(me->value && *me->value)) break; @@ -1709,17 +1469,22 @@ PRIVATE void HTMIME_put_character ARGS2( StrAllocCopy(me->anchor->date, me->value); break; case miETAG: - HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP ETag: '%s'\n", + /* Do not trim double quotes: + * an entity tag consists of an opaque quoted string, + * possibly prefixed by a weakness indicator. + */ + CTRACE(tfp, "HTMIME: PICKED UP ETag: %s\n", me->value); + if (!(me->value && *me->value)) + break; + /* + ** Indicate in anchor. - FM + */ + StrAllocCopy(me->anchor->ETag, me->value); break; case miEXPIRES: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Expires: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Expires: '%s'\n", me->value); if (!(me->value && *me->value)) break; @@ -1730,16 +1495,12 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miKEEP_ALIVE: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Keep-Alive: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Keep-Alive: '%s'\n", me->value); break; case miLAST_MODIFIED: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Last-Modified: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Last-Modified: '%s'\n", me->value); if (!(me->value && *me->value)) break; @@ -1750,23 +1511,17 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miLINK: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Link: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Link: '%s'\n", me->value); break; case miLOCATION: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Location: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Location: '%s'\n", me->value); break; case miPRAGMA: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Pragma: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Pragma: '%s'\n", me->value); if (!(me->value && *me->value)) break; @@ -1778,30 +1533,22 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miPROXY_AUTHENTICATE: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Proxy-Authenticate: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Proxy-Authenticate: '%s'\n", me->value); break; case miPUBLIC: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Public: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Public: '%s'\n", me->value); break; case miRETRY_AFTER: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Retry-After: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Retry-After: '%s'\n", me->value); break; case miSAFE: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Safe: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Safe: '%s'\n", me->value); if (!(me->value && *me->value)) break; @@ -1815,9 +1562,7 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miSERVER: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Server: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Server: '%s'\n", me->value); if (!(me->value && *me->value)) break; @@ -1828,9 +1573,7 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miSET_COOKIE1: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Set-Cookie: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Set-Cookie: '%s'\n", me->value); if (me->set_cookie == NULL) { StrAllocCopy(me->set_cookie, me->value); @@ -1841,9 +1584,7 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miSET_COOKIE2: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Set-Cookie2: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Set-Cookie2: '%s'\n", me->value); if (me->set_cookie2 == NULL) { StrAllocCopy(me->set_cookie2, me->value); @@ -1854,58 +1595,42 @@ PRIVATE void HTMIME_put_character ARGS2( break; case miTITLE: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Title: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Title: '%s'\n", me->value); break; case miTRANSFER_ENCODING: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Transfer-Encoding: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Transfer-Encoding: '%s'\n", me->value); break; case miUPGRADE: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Upgrade: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Upgrade: '%s'\n", me->value); break; case miURI: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP URI: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP URI: '%s'\n", me->value); break; case miVARY: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Vary: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Vary: '%s'\n", me->value); break; case miVIA: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Via: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Via: '%s'\n", me->value); break; case miWARNING: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP Warning: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP Warning: '%s'\n", me->value); break; case miWWW_AUTHENTICATE: HTMIME_TrimDoubleQuotes(me->value); - if (TRACE) - fprintf(stderr, - "HTMIME: PICKED UP WWW-Authenticate: '%s'\n", + CTRACE(tfp, "HTMIME: PICKED UP WWW-Authenticate: '%s'\n", me->value); break; default: /* Should never get here */ @@ -1934,8 +1659,7 @@ PRIVATE void HTMIME_put_character ARGS2( return; value_too_long: - if (TRACE) - fprintf(stderr, "HTMIME: *** Syntax error. (string too long)\n"); + CTRACE(tfp, "HTMIME: *** Syntax error. (string too long)\n"); bad_field_name: /* Ignore it */ me->state = miJUNK_LINE; @@ -1960,8 +1684,7 @@ PRIVATE void HTMIME_put_string ARGS2( (*me->targetClass.put_string)(me->target,s); } else if (me->state != MIME_IGNORE) { - if (TRACE) - fprintf(stderr, "HTMIME: %s\n", s); + CTRACE(tfp, "HTMIME: %s\n", s); for (p=s; *p; p++) HTMIME_put_character(me, *p); @@ -1983,8 +1706,7 @@ PRIVATE void HTMIME_write ARGS3( (*me->targetClass.put_block)(me->target, s, l); } else { - if (TRACE) - fprintf(stderr, "HTMIME: %.*s\n", l, s); + CTRACE(tfp, "HTMIME: %.*s\n", l, s); for (p = s; p < s+l; p++) HTMIME_put_character(me, *p); @@ -2061,6 +1783,7 @@ PUBLIC HTStream* HTMIMEConvert ARGS3( FREE(me->anchor->date); FREE(me->anchor->expires); FREE(me->anchor->last_modified); + FREE(me->anchor->ETag); FREE(me->anchor->server); me->target = NULL; me->state = miBEGINNING_OF_LINE; @@ -2145,9 +1868,6 @@ PUBLIC HTStream* HTNetMIME ARGS3( ** Software Foundation Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* #include */ /* Included via previous headers. - FM */ -/* #include */ /* Included via previous headers. - FM */ - /* ** MIME decoding routines ** @@ -2158,7 +1878,8 @@ PUBLIC HTStream* HTNetMIME ARGS3( #ifdef ESC #undef ESC #endif /* ESC */ -#define ESC '\033' +#include /* S/390 -- gil -- 0163 */ +#define ESC CH_ESC PRIVATE char HTmm64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" ; @@ -2280,8 +2001,6 @@ PUBLIC void HTmmdecode ARGS2( int LYhndl; *qm2 = '\0'; - for (p = s+2; *p; p++) - *p = TOLOWER(*p); invalid = ((LYhndl = UCGetLYhndl_byMIME(s+2)) < 0 || UCCanTranslateFromTo(LYhndl, current_char_set)); @@ -2401,61 +2120,6 @@ end: } #endif /* NOTDEFINED */ -/* -** Modified for Lynx-jp by Takuya ASADA (and K&Rized by FM). -*/ -#if NOTDEFINED -PUBLIC int main ARGS2( - int, ac, - char **, av) -{ - FILE *fp; - char buf[BUFLEN]; - char header = 1, body = 0, r_jis = 0; - int i, c; - - for (i = 1; i < ac; i++) { - if (strcmp(av[i], "-B") == NULL) - body = 1; - else if (strcmp(av[i], "-r") == NULL) - r_jis = 1; - else - break; - } - - if (i >= ac) { - fp = stdin; - } else { - if ((fp = fopen(av[i], "r")) == NULL) { - fprintf(stderr, "%s: cannot open %s\n", av[0], av[i]); - exit(1); - } - } - - while (fgets(buf, BUFLEN, fp)) { - if (buf[0] == '\n' && buf[1] == '\0') - header = 0; - if (header) { - c = fgetc(fp); - if (c == ' ' || c == '\t') { - buf[strlen(buf)-1] = '\0'; - ungetc(c, fp); - } else { - ungetc(c, fp); - } - } - if (header || body) - HTmmdecode(buf, buf); - if (r_jis) - HTrjis(buf, buf); - fprintf(stdout, "%s", buf); - } - - close(fp); - exit(0); -} -#endif /* NOTDEFINED */ - /* ** Insert ESC where it seems lost. ** (The author of this function "rjis" is S. Ichikawa.) @@ -2509,7 +2173,7 @@ PUBLIC int HTrjis ARGS2( */ /* * RJIS ( Recover JIS code from broken file ) - * $Header: /home/cvs/src/gnu/usr.bin/lynx/WWW/Library/Implementation/Attic/HTMIME.c,v 1.1.1.1 1998/03/11 17:47:45 maja Exp $ + * $Header: /home/cvs/src/gnu/usr.bin/lynx/WWW/Library/Implementation/Attic/HTMIME.c,v 1.2 2000/03/25 18:16:47 maja Exp $ * Copyright (C) 1992 1994 * Hironobu Takahashi (takahasi@tiny.or.jp) * @@ -2596,4 +2260,3 @@ PUBLIC int HTmaybekanji ARGS2( } return 1; } - diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMIME.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMIME.h index 823f6c76c0d..25c28660ec6 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMIME.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMIME.h @@ -1,30 +1,30 @@ /* /Net/dxcern/userd/timbl/hypertext/WWW/Library/Implementation/HTMIME.html MIME PARSER - - The MIME parser stream presents a MIME document. It recursively invokes the format + + The MIME parser stream presents a MIME document. It recursively invokes the format manager to handle embedded formats. - + As well as stripping off and parsing the headers, the MIME parser has to parse any weirld MIME encodings it may meet within the body parts of messages, and must deal with multipart messages. - + This module is implemented to the level necessary for operation with WWW, but is not currently complete for any arbitrary MIME message. - + Check the source for latest additions to functionality. - + The MIME parser is complicated by the fact that WWW allows real binary to be sent, not - ASCII encoded. Therefore the netascii decoding is included in this module. One cannot - layer it by converting first from Net to local text, then decoding it. Of course, for + ASCII encoded. Therefore the netascii decoding is included in this module. One cannot + layer it by converting first from Net to local text, then decoding it. Of course, for local files, the net ascii decoding is not needed. There are therefore two creation routines. - + */ #ifndef HTMIME_H #define HTMIME_H -#include "HTStream.h" -#include "HTAnchor.h" +#include +#include /* ** This function is for trimming off any paired @@ -39,7 +39,7 @@ extern void HTMIME_TrimDoubleQuotes PARAMS(( /* INPUT: LOCAL TEXT - + */ extern HTStream * HTMIMEConvert PARAMS((HTPresentation * pres, HTParentAnchor * anchor, @@ -47,7 +47,7 @@ extern HTStream * HTMIMEConvert PARAMS((HTPresentation * pres, /* INPUT: NET ASCII - + */ extern HTStream * HTNetMIME PARAMS((HTPresentation * pres, HTParentAnchor * anchor, @@ -57,7 +57,7 @@ extern HTStream * HTNetMIME PARAMS((HTPresentation * pres, /* For handling Japanese headers. - + */ extern void HTmmdec_base64 PARAMS(( char * t, @@ -75,11 +75,10 @@ extern int HTrjis PARAMS(( char * t, char * s)); -PUBLIC int HTmaybekanji PARAMS(( +extern int HTmaybekanji PARAMS(( int c1, int c2)); - #endif /* !HTMIME_H */ /* diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMLDTD.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMLDTD.c index 0d616bf1d2e..b5b6706e99a 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMLDTD.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMLDTD.c @@ -5,16 +5,23 @@ /* Implements: */ -#include "HTUtils.h" -#include "HTMLDTD.h" -#include "LYLeaks.h" +#include +#include +#include + +/* + * Character entities like   now excluded from our DTD tables, + * they are mapped to Unicode and handled by chartrans code directly + * the similar way the numeric entities like { does. + * See src/chrtrans/entities.h for real mapping. + */ /* Entity Names ** ------------ ** ** This table must be matched exactly with ALL the translation tables -** (this is an obsolete translation mechanism, -** currently replaced with unicode chartrans in most cases...) +** (this is an obsolete translation mechanism, probably unused, +** currently replaced with Unicode chartrans in most cases...) */ static CONST char* entities[] = { "AElig", /* capital AE diphthong (ligature) */ @@ -131,9 +138,6 @@ static CONST char* entities[] = { "yuml", /* small y, dieresis or umlaut mark */ }; -#define HTML_ENTITIES 112 - -#include /* Attribute Lists ** --------------- @@ -141,892 +145,921 @@ static CONST char* entities[] = { ** Lists must be in alphabetical order by attribute name ** The tag elements contain the number of attributes */ +#ifdef USE_PSRC +# define N HTMLA_NORMAL +# define i HTMLA_ANAME +# define h HTMLA_HREF +# define c HTMLA_CLASS +# define x HTMLA_AUXCLASS +# define T(t) , t +#else +# define T(t) /*nothing*/ +#endif + static attr a_attr[] = { /* Anchor attributes */ - { "ACCESSKEY" }, - { "CHARSET" }, - { "CLASS" }, - { "CLEAR" }, - { "COORDS" }, - { "DIR" }, - { "HREF" }, - { "ID" }, - { "ISMAP" }, - { "LANG" }, - { "MD" }, - { "NAME" }, - { "NOTAB" }, - { "ONCLICK" }, - { "ONMOUSEOUT" }, - { "ONMOUSEOVER" }, - { "REL" }, - { "REV" }, - { "SHAPE" }, - { "STYLE" }, - { "TABINDEX" }, - { "TARGET" }, - { "TITLE" }, - { "TYPE" }, - { "URN" }, - { 0 } /* Terminate list */ + { "ACCESSKEY" T(N) }, + { "CHARSET" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COORDS" T(N) }, + { "DIR" T(N) }, + { "HREF" T(h) }, + { "ID" T(i) }, + { "ISMAP" T(N) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "NAME" T(i) }, + { "NOTAB" T(N) }, + { "ONCLICK" T(N) }, + { "ONMOUSEOUT" T(N) }, + { "ONMOUSEOVER" T(N) }, + { "REL" T(N) }, + { "REV" T(N) }, + { "SHAPE" T(N) }, + { "STYLE" T(N) }, + { "TABINDEX" T(N) }, + { "TARGET" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { "URN" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr address_attr[] = { /* ADDRESS attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "NOWRAP" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NOWRAP" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr applet_attr[] = { /* APPLET attributes */ - { "ALIGN" }, - { "ALT" }, - { "CLASS" }, - { "CLEAR" }, - { "CODE" }, - { "CODEBASE" }, - { "DIR" }, - { "DOWNLOAD" }, - { "HEIGHT" }, - { "HSPACE" }, - { "ID" }, - { "LANG" }, - { "NAME" }, - { "STYLE" }, - { "TITLE" }, - { "VSPACE" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "ALT" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "CODE" T(N) }, + { "CODEBASE" T(h) }, + { "DIR" T(N) }, + { "DOWNLOAD" T(N) }, + { "HEIGHT" T(N) }, + { "HSPACE" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NAME" T(i) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "VSPACE" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr area_attr[] = { /* AREA attributes */ - { "ALT" }, - { "CLASS" }, - { "CLEAR" }, - { "COORDS" }, - { "DIR" }, - { "HREF" }, - { "ID" }, - { "LANG" }, - { "NOHREF" }, - { "NOTAB" }, - { "ONCLICK" }, - { "ONMOUSEOUT" }, - { "ONMOUSEOVER" }, - { "SHAPE" }, - { "STYLE" }, - { "TABINDEX" }, - { "TARGET" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ALT" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COORDS" T(N) }, + { "DIR" T(N) }, + { "HREF" T(h) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NOHREF" T(N) }, + { "NOTAB" T(N) }, + { "ONCLICK" T(N) }, + { "ONMOUSEOUT" T(N) }, + { "ONMOUSEOVER" T(N) }, + { "SHAPE" T(N) }, + { "STYLE" T(N) }, + { "TABINDEX" T(N) }, + { "TARGET" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr base_attr[] = { /* BASE attributes */ - { "HREF" }, - { "TARGET" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "HREF" T(h) }, + { "TARGET" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr bgsound_attr[] = { /* BGSOUND attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "LOOP" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "LOOP" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr body_attr[] = { /* BODY attributes */ - { "ALINK" }, - { "BACKGROUND" }, - { "BGCOLOR" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "LINK" }, - { "ONLOAD" }, - { "ONUNLOAD" }, - { "STYLE" }, - { "TITLE" }, - { "TEXT" }, - { "VLINK" }, - { 0 } /* Terminate list */ + { "ALINK" T(N) }, + { "BACKGROUND" T(h) }, + { "BGCOLOR" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "LINK" T(N) }, + { "ONLOAD" T(N) }, + { "ONUNLOAD" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "TEXT" T(N) }, + { "VLINK" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr bodytext_attr[] = { /* BODYTEXT attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DATA" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "NAME" }, - { "OBJECT" }, - { "REF" }, - { "STYLE" }, - { "TITLE" }, - { "TYPE" }, - { "VALUE" }, - { "VALUETYPE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DATA" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NAME" T(N) }, + { "OBJECT" T(N) }, + { "REF" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { "VALUE" T(N) }, + { "VALUETYPE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr bq_attr[] = { /* BQ (BLOCKQUOTE) attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "NOWRAP" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CITE" T(h) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NOWRAP" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr button_attr[] = { /* BUTTON attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "DISABLED" }, - { "ID" }, - { "LANG" }, - { "NAME" }, - { "ONFOCUS" }, - { "ONBLUR" }, - { "STYLE" }, - { "TABINDEX" }, - { "TITLE" }, - { "TYPE" }, - { "VALUE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "DISABLED" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NAME" T(N) }, + { "ONFOCUS" T(N) }, + { "ONBLUR" T(N) }, + { "STYLE" T(N) }, + { "TABINDEX" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { "VALUE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr caption_attr[] = { /* CAPTION attributes */ - { "ACCESSKEY" }, - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ACCESSKEY" T(N) }, + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr col_attr[] = { /* COL and COLGROUP attributes */ - { "ALIGN" }, - { "CHAR" }, - { "CHAROFF" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "SPAN" }, - { "STYLE" }, - { "TITLE" }, - { "VALIGN" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "CHAR" T(N) }, + { "CHAROFF" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "SPAN" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "VALIGN" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr credit_attr[] = { /* CREDIT attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr div_attr[] = { /* DIV attributes */ - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr embed_attr[] = { /* EMBED attributes */ - { "ALIGN" }, /* (including, for now, those from FIG and IMG) */ - { "ALT" }, - { "BORDER" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "HEIGHT" }, - { "ID" }, - { "IMAGEMAP" }, - { "ISMAP" }, - { "LANG" }, - { "MD" }, - { "NAME" }, - { "NOFLOW" }, - { "PARAMS" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { "UNITS" }, - { "USEMAP" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, /* (including, for now, those from FIG and IMG) */ + { "ALT" T(N) }, + { "BORDER" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "HEIGHT" T(N) }, + { "ID" T(i) }, + { "IMAGEMAP" T(N) }, + { "ISMAP" T(N) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "NAME" T(i) }, + { "NOFLOW" T(N) }, + { "PARAMS" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "UNITS" T(N) }, + { "USEMAP" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr fig_attr[] = { /* FIG attributes */ - { "ALIGN" }, - { "BORDER" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "HEIGHT" }, - { "ID" }, - { "IMAGEMAP" }, - { "ISOBJECT" }, - { "LANG" }, - { "MD" }, - { "NOFLOW" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { "UNITS" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "BORDER" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "HEIGHT" T(N) }, + { "ID" T(i) }, + { "IMAGEMAP" T(N) }, + { "ISOBJECT" T(N) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "NOFLOW" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "UNITS" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr fieldset_attr[] = { /* FIELDSET attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr fn_attr[] = { /* FN attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr font_attr[] = { /* FONT attributes */ - { "CLASS" }, - { "CLEAR" }, - { "COLOR" }, - { "DIR" }, - { "END" }, - { "FACE" }, - { "ID" }, - { "LANG" }, - { "SIZE" }, - { "STYLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COLOR" T(N) }, + { "DIR" T(N) }, + { "END" T(N) }, + { "FACE" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "SIZE" T(N) }, + { "STYLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr form_attr[] = { /* FORM attributes */ - { "ACCEPT-CHARSET"}, /* HTML 4.0 draft - kw */ - { "ACTION"}, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ENCTYPE" }, - { "ID" }, - { "LANG" }, - { "METHOD" }, - { "ONSUBMIT" }, - { "SCRIPT" }, - { "STYLE" }, - { "SUBJECT" }, - { "TARGET" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ACCEPT-CHARSET" T(N) }, /* HTML 4.0 draft - kw */ + { "ACTION" T(h) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ENCTYPE" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "METHOD" T(N) }, + { "ONSUBMIT" T(N) }, + { "SCRIPT" T(N) }, + { "STYLE" T(N) }, + { "SUBJECT" T(N) }, + { "TARGET" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr frame_attr[] = { /* FRAME attributes */ - { "ID" }, - { "MARGINHEIGHT"}, - { "MARGINWIDTH" }, - { "NAME" }, - { "NORESIZE" }, - { "SCROLLING" }, - { "SRC" }, - { 0 } /* Terminate list */ + { "ID" T(i) }, + { "LONGDESC" T(h) }, + { "MARGINHEIGHT" T(N) }, + { "MARGINWIDTH" T(N) }, + { "NAME" T(N) }, + { "NORESIZE" T(N) }, + { "SCROLLING" T(N) }, + { "SRC" T(h) }, + { 0 T(N) } /* Terminate list */ }; static attr frameset_attr[] = { /* FRAMESET attributes */ - { "COLS"}, - { "ROWS" }, - { 0 } /* Terminate list */ + { "COLS" T(N) }, + { "ROWS" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr gen_attr[] = { /* Minimum HTML 3.0 */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr glossary_attr[] = { /* DL (and DLC) attributes */ - { "CLASS" }, - { "CLEAR" }, - { "COMPACT" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COMPACT" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr h_attr[] = { /* H1 - H6 attributes */ - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "DINGBAT" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "MD" }, - { "NOWRAP" }, - { "SEQNUM" }, - { "SKIP" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DINGBAT" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "NOWRAP" T(N) }, + { "SEQNUM" T(N) }, + { "SKIP" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr hr_attr[] = { /* HR attributes */ - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "MD" }, - { "NOSHADE" }, - { "SIZE" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "MD" T(N) }, + { "NOSHADE" T(N) }, + { "SIZE" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr iframe_attr[] = { /* IFRAME attributes */ - { "ALIGN" }, - { "FRAMEBORDER" }, - { "HEIGHT" }, - { "ID" }, - { "MARGINHEIGHT"}, - { "MARGINWIDTH" }, - { "NAME" }, - { "SCROLLING" }, - { "SRC" }, - { "STYLE" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "FRAMEBORDER" T(N) }, + { "HEIGHT" T(N) }, + { "ID" T(i) }, + { "LONGDESC" T(h) }, + { "MARGINHEIGHT" T(N) }, + { "MARGINWIDTH" T(N) }, + { "NAME" T(N) }, + { "SCROLLING" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr img_attr[] = { /* IMG attributes */ - { "ALIGN" }, - { "ALT" }, - { "BORDER" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "HEIGHT" }, - { "ID" }, - { "ISMAP" }, - { "ISOBJECT" }, - { "LANG" }, - { "MD" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { "UNITS" }, - { "USEMAP" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "ALT" T(N) }, + { "BORDER" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "HEIGHT" T(N) }, + { "LONGDESC" T(h) }, + { "ID" T(i) }, + { "ISMAP" T(N) }, + { "ISOBJECT" T(N) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "UNITS" T(N) }, + { "USEMAP" T(h) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr input_attr[] = { /* INPUT attributes */ - { "ACCEPT" }, - { "ACCEPT-CHARSET" }, /* RFC 2070 HTML i18n - kw */ - { "ALIGN" }, - { "ALT" }, - { "CHECKED" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "DISABLED" }, - { "ERROR" }, - { "HEIGHT" }, - { "ID" }, - { "LANG" }, - { "MAX" }, - { "MAXLENGTH" }, - { "MD" }, - { "MIN" }, - { "NAME" }, - { "NOTAB" }, - { "ONBLUR" }, - { "ONCHANGE" }, - { "ONCLICK" }, - { "ONFOCUS" }, - { "ONSELECT" }, - { "SIZE" }, - { "SRC" }, - { "STYLE" }, - { "TABINDEX" }, - { "TITLE" }, - { "TYPE" }, - { "VALUE" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ACCEPT" T(N) }, + { "ACCEPT-CHARSET" T(N) }, /* RFC 2070 HTML i18n - kw */ + { "ALIGN" T(N) }, + { "ALT" T(N) }, + { "CHECKED" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "DISABLED" T(N) }, + { "ERROR" T(N) }, + { "HEIGHT" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "MAX" T(N) }, + { "MAXLENGTH" T(N) }, + { "MD" T(N) }, + { "MIN" T(N) }, + { "NAME" T(N) }, + { "NOTAB" T(N) }, + { "ONBLUR" T(N) }, + { "ONCHANGE" T(N) }, + { "ONCLICK" T(N) }, + { "ONFOCUS" T(N) }, + { "ONSELECT" T(N) }, + { "SIZE" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TABINDEX" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { "VALUE" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr isindex_attr[] = { /* ISINDEX attributes */ - { "ACTION" }, /* Not in spec. Lynx treats it as HREF. - FM */ - { "DIR" }, - { "HREF" }, /* HTML 3.0 attribute for search action. - FM */ - { "ID" }, - { "LANG" }, - { "PROMPT" }, /* HTML 3.0 attribute for prompt string. - FM */ - { "TITLE" }, - { 0 } /* Terminate list */ + { "ACTION" T(h) }, /* Not in spec. Lynx treats it as HREF. - FM */ + { "DIR" T(N) }, + { "HREF" T(h) }, /* HTML 3.0 attribute for search action. - FM */ + { "ID" T(i) }, + { "LANG" T(N) }, + { "PROMPT" T(N) }, /* HTML 3.0 attribute for prompt string. - FM */ + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr keygen_attr[] = { /* KEYGEN attributes */ - { "CHALLENGE" }, - { "CLASS" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "NAME" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CHALLENGE" T(N) }, + { "CLASS" T(c) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NAME" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr label_attr[] = { /* LABEL attributes */ - { "ACCESSKEY" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "FOR" }, - { "ID" }, - { "LANG" }, - { "ONCLICK" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ACCESSKEY" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "FOR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "ONCLICK" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr legend_attr[] = { /* LEGEND attributes */ - { "ACCESSKEY" }, - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ACCESSKEY" T(N) }, + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr link_attr[] = { /* LINK attributes */ - { "CHARSET" }, /* RFC 2070 HTML i18n -- hint for UA -- - kw */ - { "CLASS" }, - { "HREF" }, - { "ID" }, - { "MEDIA" }, - { "REL" }, - { "REV" }, - { "STYLE" }, - { "TARGET" }, - { "TITLE" }, - { "TYPE" }, - { 0 } /* Terminate list */ + { "CHARSET" T(N) }, /* RFC 2070 HTML i18n -- hint for UA -- - kw */ + { "CLASS" T(c) }, + { "HREF" T(h) }, + { "ID" T(i) }, + { "MEDIA" T(N) }, + { "REL" T(N) }, + { "REV" T(N) }, + { "STYLE" T(N) }, + { "TARGET" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr list_attr[] = { /* LI attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DINGBAT" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "MD" }, - { "SKIP" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { "TYPE" }, - { "VALUE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DINGBAT" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "SKIP" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { "VALUE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr map_attr[] = { /* MAP attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "NAME" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NAME" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr math_attr[] = { /* MATH attributes */ - { "BOX" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "BOX" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr meta_attr[] = { /* META attributes */ - { "CONTENT" }, - { "HTTP-EQUIV" }, - { "NAME" }, - { 0 } /* Terminate list */ + { "CONTENT" T(N) }, + { "HTTP-EQUIV" T(N) }, + { "NAME" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr nextid_attr[] = { /* NEXTID attributes */ - { "N" } + { "N" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr note_attr[] = { /* NOTE attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "MD" }, - { "ROLE" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "ROLE" T(x) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr object_attr[] = { /* OBJECT attributes */ - { "ALIGN" }, - { "BORDER" }, - { "CLASS" }, - { "CLASSID" }, - { "CODEBASE" }, - { "CODETYPE" }, - { "DATA" }, - { "DECLARE" }, - { "DIR" }, - { "HEIGHT" }, - { "HSPACE" }, - { "ID" }, - { "ISMAP" }, - { "LANG" }, - { "NAME" }, - { "NOTAB" }, - { "SHAPES" }, - { "STANDBY" }, - { "STYLE" }, - { "TABINDEX" }, - { "TITLE" }, - { "TYPE" }, - { "USEMAP" }, - { "VSPACE" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "BORDER" T(N) }, + { "CLASS" T(c) }, + { "CLASSID" T(h) }, + { "CODEBASE" T(h) }, + { "CODETYPE" T(N) }, + { "DATA" T(h) }, + { "DECLARE" T(N) }, + { "DIR" T(N) }, + { "HEIGHT" T(N) }, + { "HSPACE" T(N) }, + { "ID" T(i) }, + { "ISMAP" T(N) }, + { "LANG" T(N) }, + { "NAME" T(N) }, + { "NOTAB" T(N) }, + { "SHAPES" T(N) }, + { "STANDBY" T(N) }, + { "STYLE" T(N) }, + { "TABINDEX" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { "USEMAP" T(h) }, + { "VSPACE" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr olist_attr[] = { /* OL attributes */ - { "CLASS" }, - { "CLEAR" }, - { "COMPACT" }, - { "CONTINUE" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "SEQNUM" }, - { "START" }, - { "STYLE" }, - { "TITLE" }, - { "TYPE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COMPACT" T(N) }, + { "CONTINUE" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "SEQNUM" T(N) }, + { "START" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr option_attr[] = { /* OPTION attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "DISABLED" }, - { "ERROR" }, - { "ID" }, - { "LANG" }, - { "SELECTED" }, - { "SHAPE" }, - { "STYLE" }, - { "TITLE" }, - { "VALUE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "DISABLED" T(N) }, + { "ERROR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "SELECTED" T(N) }, + { "SHAPE" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "VALUE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr overlay_attr[] = { /* OVERLAY attributes */ - { "CLASS" }, - { "HEIGHT" }, - { "ID" }, - { "IMAGEMAP" }, - { "MD" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { "UNITS" }, - { "WIDTH" }, - { "X" }, - { "Y" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "HEIGHT" T(N) }, + { "ID" T(i) }, + { "IMAGEMAP" T(N) }, + { "MD" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "UNITS" T(N) }, + { "WIDTH" T(N) }, + { "X" T(N) }, + { "Y" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr p_attr[] = { /* P attributes */ - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "NOWRAP" }, - { "STYLE" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NOWRAP" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr param_attr[] = { /* PARAM attributes */ - { "ACCEPT" }, - { "ACCEPT-CHARSET" }, - { "ACCEPT-ENCODING" }, - { "CLASS" }, - { "CLEAR" }, - { "DATA" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "NAME" }, - { "OBJECT" }, - { "REF" }, - { "STYLE" }, - { "TITLE" }, - { "TYPE" }, - { "VALUE" }, - { "VALUEREF" }, - { "VALUETYPE" }, - { 0 } /* Terminate list */ + { "ACCEPT" T(N) }, + { "ACCEPT-CHARSET" T(N) }, + { "ACCEPT-ENCODING" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DATA" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NAME" T(N) }, + { "OBJECT" T(N) }, + { "REF" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { "VALUE" T(N) }, + { "VALUEREF" T(N) }, + { "VALUETYPE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr script_attr[] = { /* SCRIPT attributes */ - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "EVENT" }, - { "FOR" }, - { "ID" }, - { "LANG" }, - { "LANGUAGE" }, - { "NAME" }, - { "SCRIPTENGINE" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { "TYPE" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "EVENT" T(N) }, + { "FOR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "LANGUAGE" T(N) }, + { "NAME" T(N) }, + { "SCRIPTENGINE" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr select_attr[] = { /* SELECT attributes */ - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "DISABLED" }, - { "ERROR" }, - { "HEIGHT" }, - { "ID" }, - { "LANG" }, - { "MD" }, - { "MULTIPLE" }, - { "NAME" }, - { "NOTAB" }, - { "ONBLUR" }, - { "ONCHANGE" }, - { "ONFOCUS" }, - { "SIZE" }, - { "STYLE" }, - { "TABINDEX" }, - { "TITLE" }, - { "UNITS" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "DISABLED" T(N) }, + { "ERROR" T(N) }, + { "HEIGHT" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "MULTIPLE" T(N) }, + { "NAME" T(N) }, + { "NOTAB" T(N) }, + { "ONBLUR" T(N) }, + { "ONCHANGE" T(N) }, + { "ONFOCUS" T(N) }, + { "SIZE" T(N) }, + { "STYLE" T(N) }, + { "TABINDEX" T(N) }, + { "TITLE" T(N) }, + { "UNITS" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr style_attr[] = { /* STYLE attributes */ - { "DIR" }, - { "LANG" }, - { "NOTATION" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "DIR" T(N) }, + { "LANG" T(N) }, + { "NOTATION" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr tab_attr[] = { /* TAB attributes */ - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "DP" }, - { "ID" }, - { "INDENT" }, - { "LANG" }, - { "STYLE" }, - { "TITLE" }, - { "TO" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "DP" T(N) }, + { "ID" T(i) }, + { "INDENT" T(N) }, + { "LANG" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "TO" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr table_attr[] = { /* TABLE attributes */ - { "ALIGN" }, - { "BORDER" }, - { "CELLPADDING" }, - { "CELLSPACING" }, - { "CLASS" }, - { "CLEAR" }, - { "COLS" }, - { "COLSPEC" }, - { "DIR" }, - { "DP" }, - { "FRAME" }, - { "ID" }, - { "LANG" }, - { "NOFLOW" }, - { "NOWRAP" }, - { "RULES" }, - { "STYLE" }, - { "TITLE" }, - { "UNITS" }, - { "WIDTH" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "BACKGROUND" T(h) }, + { "BORDER" T(N) }, + { "CELLPADDING" T(N) }, + { "CELLSPACING" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COLS" T(N) }, + { "COLSPEC" T(N) }, + { "DIR" T(N) }, + { "DP" T(N) }, + { "FRAME" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NOFLOW" T(N) }, + { "NOWRAP" T(N) }, + { "RULES" T(N) }, + { "STYLE" T(N) }, + { "SUMMARY" T(N) }, + { "TITLE" T(N) }, + { "UNITS" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr td_attr[] = { /* TD and TH attributes */ - { "ALIGN" }, - { "AXES" }, - { "AXIS" }, - { "CHAR" }, - { "CHAROFF" }, - { "CLASS" }, - { "CLEAR" }, - { "COLSPAN" }, - { "DIR" }, - { "DP" }, - { "ID" }, - { "LANG" }, - { "NOWRAP" }, - { "ROWSPAN" }, - { "STYLE" }, - { "TITLE" }, - { "VALIGN" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "AXES" T(N) }, + { "AXIS" T(N) }, + { "BACKGROUND" T(h) }, + { "CHAR" T(N) }, + { "CHAROFF" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COLSPAN" T(N) }, + { "DIR" T(N) }, + { "DP" T(N) }, + { "HEIGHT" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NOWRAP" T(N) }, + { "ROWSPAN" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "VALIGN" T(N) }, + { "WIDTH" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr textarea_attr[] = { /* TEXTAREA attributes */ - { "ACCEPT-CHARSET" }, /* RFC 2070 HTML i18n - kw */ - { "ALIGN" }, - { "CLASS" }, - { "CLEAR" }, - { "COLS" }, - { "DIR" }, - { "DISABLED" }, - { "ERROR" }, - { "ID" }, - { "LANG" }, - { "NAME" }, - { "NOTAB" }, - { "ONBLUR" }, - { "ONCHANGE" }, - { "ONFOCUS" }, - { "ONSELECT" }, - { "ROWS" }, - { "STYLE" }, - { "TABINDEX" }, - { "TITLE" }, - { 0 } /* Terminate list */ + { "ACCEPT-CHARSET" T(N) }, /* RFC 2070 HTML i18n - kw */ + { "ALIGN" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COLS" T(N) }, + { "DIR" T(N) }, + { "DISABLED" T(N) }, + { "ERROR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NAME" T(N) }, + { "NOTAB" T(N) }, + { "ONBLUR" T(N) }, + { "ONCHANGE" T(N) }, + { "ONFOCUS" T(N) }, + { "ONSELECT" T(N) }, + { "ROWS" T(N) }, + { "STYLE" T(N) }, + { "TABINDEX" T(N) }, + { "TITLE" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr tr_attr[] = { /* TR, THEAD, TFOOT, and TBODY attributes */ - { "ALIGN" }, - { "CHAR" }, - { "CHAROFF" }, - { "CLASS" }, - { "CLEAR" }, - { "DIR" }, - { "DP" }, - { "ID" }, - { "LANG" }, - { "NOWRAP" }, - { "STYLE" }, - { "TITLE" }, - { "VALIGN" }, - { 0 } /* Terminate list */ + { "ALIGN" T(N) }, + { "CHAR" T(N) }, + { "CHAROFF" T(N) }, + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "DIR" T(N) }, + { "DP" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "NOWRAP" T(N) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "VALIGN" T(N) }, + { 0 T(N) } /* Terminate list */ }; static attr ulist_attr[] = { /* UL attributes */ - { "CLASS" }, - { "CLEAR" }, - { "COMPACT" }, - { "DINGBAT" }, - { "DIR" }, - { "ID" }, - { "LANG" }, - { "MD" }, - { "PLAIN" }, - { "SRC" }, - { "STYLE" }, - { "TITLE" }, - { "TYPE" }, - { "WRAP" }, - { 0 } /* Terminate list */ + { "CLASS" T(c) }, + { "CLEAR" T(N) }, + { "COMPACT" T(N) }, + { "DINGBAT" T(N) }, + { "DIR" T(N) }, + { "ID" T(i) }, + { "LANG" T(N) }, + { "MD" T(N) }, + { "PLAIN" T(N) }, + { "SRC" T(h) }, + { "STYLE" T(N) }, + { "TITLE" T(N) }, + { "TYPE" T(N) }, + { "WRAP" T(N) }, + { 0 T(N) } /* Terminate list */ }; +#undef N +#undef i +#undef h +#undef c +#undef x + +#undef T + /* From Peter Flynn's intro to the HTML Pro DTD: %structure; @@ -1085,7 +1118,7 @@ static attr ulist_attr[] = { /* UL attributes */ /* self contain icont'n contn'd icont'd canclos omit */ /* { "A" , a_attr, HTML_A_ATTRIBUTES, SGML_MIXED }, */ -#define T_A 0x0008, 0x0B007,0x0FF17,0x37787,0x77BA7,0x8604F,0x00004 +#define T_A 0x0008, 0x0B007,0x0FF17,0x37787,0x77BA7,0x8604F,0x00014 /* { "ABBREV" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ #define T_ABBREV 0x0002, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00003,0x00000 /* { "ACRONYM" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ @@ -1101,7 +1134,7 @@ static attr ulist_attr[] = { /* UL attributes */ /* { "AUTHOR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ #define T_AUTHOR 0x0002, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00003,0x00000 /* { "B" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ -#define T_B 0x0001, 0x8B04F,0xAFFFF,0xA778F,0xF7FBF,0x00001,0x00004 +#define T_B 0x0001, 0x8B04F,0xAFFFF,0xA778F,0xF7FBF,0x00001,0x00014 /* { "BANNER" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ #define T_BANNER 0x0200, 0x0FB8F,0x0FFFF,0x30000,0x30000,0x8031F,0x00000 /* { "BASE" , base_attr, HTML_BASE_ATTRIBUTES, SGML_EMPTY }, */ @@ -1113,9 +1146,9 @@ static attr ulist_attr[] = { /* UL attributes */ /* { "BGSOUND" , bgsound_attr, HTML_BGSOUND_ATTRIBUTES, SGML_EMPTY }, */ #define T_BGSOUND 0x1000, 0x00000,0x00000,0x777AF,0x77FAF,0x8730F,0x00001 /* { "BIG" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ -#define T_BIG 0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00001,0x00004 +#define T_BIG 0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00001,0x00014 /* { "BLINK" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ -#define T_BLINK 0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FAF,0x00001,0x00004 +#define T_BLINK 0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FAF,0x00001,0x00014 /* { "BLOCKQUOTE", bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED }, */ #define T_BLOCKQUOTE 0x0200, 0xAFBCF,0xAFFFF,0xB6680,0xB6FAF,0x8031F,0x00000 /* { "BODY" , body_attr, HTML_BODY_ATTRIBUTES, SGML_MIXED }, */ @@ -1132,7 +1165,7 @@ static attr ulist_attr[] = { /* UL attributes */ /* { "CENTER" , div_attr, HTML_DIV_ATTRIBUTES, SGML_MIXED }, */ #define T_CENTER 0x0200, 0x8FBCF,0x8FFFF,0xB6680,0xB6FA7,0x8071F,0x00000 /* { "CITE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ -#define T_CITE 0x0002, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00002,0x00000 +#define T_CITE 0x0002, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00002,0x00010 /* { "CODE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ #define T_CODE 0x0002, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00002,0x00000 /* { "COL" , col_attr, HTML_COL_ATTRIBUTES, SGML_EMPTY }, */ @@ -1160,7 +1193,7 @@ static attr ulist_attr[] = { /* UL attributes */ /* { "DT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY }, */ #define T_DT 0x0400, 0x0B04F,0x0B1FF,0x00800,0x17FFF,0x8071F,0x00001 /* { "EM" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ -#define T_EM 0x0002, 0x8B04F,0x8FFFF,0xA778F,0xF7FAF,0x00003,0x00000 +#define T_EM 0x0002, 0x8B04F,0x8FFFF,0xA778F,0xF7FAF,0x00003,0x00010 /* { "EMBED" , embed_attr, HTML_EMBED_ATTRIBUTES, SGML_EMPTY }, */ #define T_EMBED 0x2000, 0x8F107,0x8FFF7,0xB6FBF,0xB7FBF,0x1FF7F,0x00001 /* { "FIELDSET", fieldset_attr,HTML_FIELDSET_ATTRIBUTES, SGML_MIXED }, */ @@ -1170,7 +1203,7 @@ static attr ulist_attr[] = { /* UL attributes */ /* { "FN" , fn_attr, HTML_FN_ATTRIBUTES, SGML_MIXED }, */ #define T_FN 0x0200, 0x8FBCF,0x8FFFF,0xB6680,0xB7EBF,0x8114F,0x00000 /* { "FONT" , font_attr, HTML_FONT_ATTRIBUTES, SGML_EMPTY }, */ -#define T_FONT 0x0001, 0x8B04F,0x8FFFF,0xB778F,0xF7FBF,0x00001,0x00004 +#define T_FONT 0x0001, 0x8B04F,0x8FFFF,0xB778F,0xF7FBF,0x00001,0x00014 /* { "FORM" , form_attr, HTML_FORM_ATTRIBUTES, SGML_EMPTY }, */ #define T_FORM 0x0080, 0x0FF6F,0x0FF7F,0x36E07,0x33F07,0x88DFF,0x00000 /* { "FRAME" , frame_attr, HTML_FRAME_ATTRIBUTES, SGML_EMPTY }, */ @@ -1197,7 +1230,7 @@ static attr ulist_attr[] = { /* UL attributes */ #define T_HTML 0x10000,0x7FB8F,0x7FFFF,0x00000,0x00000,0x1FFFF,0x00003 #define T_HY 0x1000, 0x00000,0x00000,0x3779F,0x77FBF,0x8101F,0x00001 /* { "I" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ -#define T_I 0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00001,0x00004 +#define T_I 0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00001,0x00014 #define T_IFRAME 0x2000, 0x8FBCF,0x8FFFF,0xB679F,0xB6FBF,0xD335F,0x00000 /* { "IMG" , img_attr, HTML_IMG_ATTRIBUTES, SGML_EMPTY }, */ #define T_IMG 0x1000, 0x00000,0x00000,0x3779F,0x37FBF,0x80000,0x00001 @@ -1249,7 +1282,7 @@ static attr ulist_attr[] = { /* UL attributes */ /* { "P" , p_attr, HTML_P_ATTRIBUTES, SGML_EMPTY }, */ #define T_P 0x0100, 0x0B04F,0x8FFFF,0x36680,0xB6FA7,0x80117,0x00001 /* { "PARAM" , param_attr, HTML_PARAM_ATTRIBUTES, SGML_EMPTY }, */ -#define T_PARAM 0x1000, 0x00000,0x00000,0x03000,0x17FFF,0x81777,0x00001 +#define T_PARAM 0x1000, 0x00000,0x00000,0x33500,0x37FFF,0x81560,0x00001 /* { "PLAINTEXT", gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL }, */ #define T_PLAINTEXT 0x10000,0xFFFFF,0xFFFFF,0x90000,0x90000,0x3FFFF,0x00001 /* { "PRE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ @@ -1259,22 +1292,22 @@ static attr ulist_attr[] = { /* UL attributes */ /* { "S" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ #define T_S 0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00001,0x00000 /* { "SAMP" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ -#define T_SAMP 0x0002, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00002,0x00000 +#define T_SAMP 0x0002, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00002,0x00010 /* { "SCRIPT" , script_attr, HTML_SCRIPT_ATTRIBUTES, SGML_LITTERAL }, */ #define T_SCRIPT 0x2000, 0x00000,0x00000,0x77F9F,0x77FFF,0x87F5F,0x00000 /* { "SELECT" , select_attr, HTML_SELECT_ATTRIBUTES, SGML_MIXED }, */ #define T_SELECT 0x0040, 0x08000,0x08000,0x03FAF,0x13FBF,0x80F5F,0x00008 #define T_SHY 0x1000, 0x00000,0x00000,0x3779F,0x77FBF,0x8101F,0x00001 /* { "SMALL" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ -#define T_SMALL 0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00001,0x00004 +#define T_SMALL 0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00001,0x00014 /* { "SPAN" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ -#define T_SPAN 0x0002, 0x0B04F,0x0FFFF,0x2778F,0x77FBF,0x80003,0x00000 +#define T_SPAN 0x0002, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x80003,0x00000 /* { "SPOT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY }, */ #define T_SPOT 0x0008, 0x00000,0x00000,0x3FFF7,0x3FFF7,0x00008,0x00001 /* { "STRIKE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ #define T_STRIKE 0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00001,0x00000 /* { "STRONG" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ -#define T_STRONG 0x0002, 0x8B04F,0x8FFFF,0xA778F,0xF7FAF,0x00003,0x00000 +#define T_STRONG 0x0002, 0x8B04F,0x8FFFF,0xA778F,0xF7FAF,0x00003,0x00010 /* { "STYLE" , style_attr, HTML_STYLE_ATTRIBUTES, SGML_LITTERAL }, */ #define T_STYLE 0x40000,0x00000,0x00000,0x7638F,0x76FAF,0x8001F,0x00000 /* { "SUB" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ @@ -1298,15 +1331,15 @@ static attr ulist_attr[] = { /* UL attributes */ /* { "TH" , td_attr, HTML_TD_ATTRIBUTES, SGML_EMPTY }, */ #define T_TH 0x0400, 0x0FBCF,0x0FFFF,0x00020,0xB7FB7,0x8CF5F,0x00001 /* { "THEAD" , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY }, */ -#define T_THEAD 0x0020, 0x00020,0x8FFFF,0x00880,0xB7FB7,0x8CF5F,0x00001 +#define T_THEAD 0x0020, 0x00020,0x8FFFF,0x00800,0xB7FB7,0x8CF5F,0x00001 /* { "TITLE", gen_attr, HTML_GEN_ATTRIBUTES, SGML_RCDATA }, */ #define T_TITLE 0x40000,0x00000,0x00000,0x50000,0x50000,0x0031F,0x00004 /* { "TR" , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY }, */ #define T_TR 0x0020, 0x00400,0x8FFFF,0x00820,0xB7FB7,0x8C75F,0x00001 /* { "TT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ -#define T_TT 0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00001,0x00000 +#define T_TT 0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00001,0x00010 /* { "U" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ -#define T_U 0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00001,0x00004 +#define T_U 0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00001,0x00014 /* { "UL" , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED }, */ #define T_UL 0x0800, 0x0C480,0x8FFFF,0x36680,0xB7FFF,0x8075F,0x00000 /* { "VAR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ @@ -1324,253 +1357,262 @@ static attr ulist_attr[] = { /* UL attributes */ ** Must be in alphabetical order. ** ** The T_* extra info is listed here, but it won't matter (is not used -** in SGML.c if New_DTD is not set). This mainly simplifies comparison +** in SGML.c if Old_DTD is not set). This mainly simplifies comparison ** of the tags_old[] table (otherwise unchanged from original Lynx treatment) ** with the tags_new[] table below. - kw ** ** Name, Attributes, No. of attributes, content, extra info... */ -static HTTag tags_old[HTML_ELEMENTS] = { - { "A" , a_attr, HTML_A_ATTRIBUTES, SGML_EMPTY,T_A}, - { "ABBREV" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_ABBREV}, - { "ACRONYM" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_ACRONYM}, - { "ADDRESS" , address_attr, HTML_ADDRESS_ATTRIBUTES, SGML_MIXED,T_ADDRESS}, - { "APPLET" , applet_attr, HTML_APPLET_ATTRIBUTES, SGML_MIXED,T_APPLET}, - { "AREA" , area_attr, HTML_AREA_ATTRIBUTES, SGML_EMPTY,T_AREA}, - { "AU" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_AU}, - { "AUTHOR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_AUTHOR}, - { "B" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_B}, - { "BANNER" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BANNER}, - { "BASE" , base_attr, HTML_BASE_ATTRIBUTES, SGML_EMPTY,T_BASE}, - { "BASEFONT", font_attr, HTML_FONT_ATTRIBUTES, SGML_EMPTY,T_BASEFONT}, - { "BDO" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BDO}, - { "BGSOUND" , bgsound_attr, HTML_BGSOUND_ATTRIBUTES, SGML_EMPTY,T_BGSOUND}, - { "BIG" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BIG}, - { "BLINK" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_BLINK}, - { "BLOCKQUOTE", bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED,T_BLOCKQUOTE}, - { "BODY" , body_attr, HTML_BODY_ATTRIBUTES, SGML_MIXED,T_BODY}, - { "BODYTEXT", bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED,T_BODYTEXT}, - { "BQ" , bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED,T_BQ}, - { "BR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_BR}, - { "BUTTON" , button_attr, HTML_BUTTON_ATTRIBUTES, SGML_MIXED,T_BUTTON}, - { "CAPTION" , caption_attr, HTML_CAPTION_ATTRIBUTES, SGML_MIXED,T_CAPTION}, - { "CENTER" , div_attr, HTML_DIV_ATTRIBUTES, SGML_MIXED,T_CENTER}, - { "CITE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_CITE}, - { "CODE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_CODE}, - { "COL" , col_attr, HTML_COL_ATTRIBUTES, SGML_EMPTY,T_COL}, - { "COLGROUP", col_attr, HTML_COL_ATTRIBUTES, SGML_EMPTY,T_COLGROUP}, - { "COMMENT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_COMMENT}, - { "CREDIT" , credit_attr, HTML_CREDIT_ATTRIBUTES, SGML_MIXED,T_CREDIT}, - { "DD" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_DD}, - { "DEL" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DEL}, - { "DFN" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DFN}, - { "DIR" , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_DIR}, - { "DIV" , div_attr, HTML_DIV_ATTRIBUTES, SGML_MIXED,T_DIV}, - { "DL" , glossary_attr, HTML_DL_ATTRIBUTES, SGML_MIXED,T_DL}, - { "DLC" , glossary_attr, HTML_DL_ATTRIBUTES, SGML_MIXED,T_DLC}, - { "DT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_DT}, - { "EM" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_EM}, - { "EMBED" , embed_attr, HTML_EMBED_ATTRIBUTES, SGML_EMPTY,T_EMBED}, - { "FIELDSET", fieldset_attr,HTML_FIELDSET_ATTRIBUTES, SGML_MIXED,T_FIELDSET}, - { "FIG" , fig_attr, HTML_FIG_ATTRIBUTES, SGML_MIXED,T_FIG}, - { "FN" , fn_attr, HTML_FN_ATTRIBUTES, SGML_MIXED,T_FN}, - { "FONT" , font_attr, HTML_FONT_ATTRIBUTES, SGML_EMPTY,T_FONT}, - { "FORM" , form_attr, HTML_FORM_ATTRIBUTES, SGML_EMPTY,T_FORM}, - { "FRAME" , frame_attr, HTML_FRAME_ATTRIBUTES, SGML_EMPTY,T_FRAME}, - { "FRAMESET", frameset_attr,HTML_FRAMESET_ATTRIBUTES, SGML_MIXED,T_FRAMESET}, - { "H1" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H1}, - { "H2" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H2}, - { "H3" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H3}, - { "H4" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H4}, - { "H5" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H5}, - { "H6" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H6}, - { "HEAD" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_HEAD}, - { "HR" , hr_attr, HTML_HR_ATTRIBUTES, SGML_EMPTY,T_HR}, - { "HTML" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_HTML}, - { "HY" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_HY}, - { "I" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_I}, - { "IFRAME" , iframe_attr, HTML_IFRAME_ATTRIBUTES, SGML_MIXED,T_IFRAME}, - { "IMG" , img_attr, HTML_IMG_ATTRIBUTES, SGML_EMPTY,T_IMG}, - { "INPUT" , input_attr, HTML_INPUT_ATTRIBUTES, SGML_EMPTY,T_INPUT}, - { "INS" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_INS}, - { "ISINDEX" , isindex_attr, HTML_ISINDEX_ATTRIBUTES,SGML_EMPTY,T_ISINDEX}, - { "KBD" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_KBD}, - { "KEYGEN" , keygen_attr, HTML_KEYGEN_ATTRIBUTES, SGML_EMPTY,T_KEYGEN}, - { "LABEL" , label_attr, HTML_LABEL_ATTRIBUTES, SGML_MIXED,T_LABEL}, - { "LEGEND" , legend_attr, HTML_LEGEND_ATTRIBUTES, SGML_MIXED,T_LEGEND}, - { "LH" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_LH}, - { "LI" , list_attr, HTML_LI_ATTRIBUTES, SGML_EMPTY,T_LI}, - { "LINK" , link_attr, HTML_LINK_ATTRIBUTES, SGML_EMPTY,T_LINK}, - { "LISTING" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_LISTING}, - { "MAP" , map_attr, HTML_MAP_ATTRIBUTES, SGML_MIXED,T_MAP}, - { "MARQUEE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_MARQUEE}, - { "MATH" , math_attr, HTML_MATH_ATTRIBUTES, SGML_LITTERAL,T_MATH}, - { "MENU" , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_MENU}, - { "META" , meta_attr, HTML_META_ATTRIBUTES, SGML_EMPTY,T_META}, - { "NEXTID" , nextid_attr, 1, SGML_EMPTY,T_NEXTID}, - { "NOFRAMES", gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_NOFRAMES}, - { "NOTE" , note_attr, HTML_NOTE_ATTRIBUTES, SGML_MIXED,T_NOTE}, - { "OBJECT" , object_attr, HTML_OBJECT_ATTRIBUTES, SGML_LITTERAL,T_OBJECT}, - { "OL" , olist_attr, HTML_OL_ATTRIBUTES, SGML_MIXED,T_OL}, - { "OPTION" , option_attr, HTML_OPTION_ATTRIBUTES, SGML_EMPTY,T_OPTION}, - { "OVERLAY" , overlay_attr, HTML_OVERLAY_ATTRIBUTES, SGML_EMPTY,T_OVERLAY}, - { "P" , p_attr, HTML_P_ATTRIBUTES, SGML_EMPTY,T_P}, - { "PARAM" , param_attr, HTML_PARAM_ATTRIBUTES, SGML_EMPTY,T_PARAM}, - { "PLAINTEXT", gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_PLAINTEXT}, - { "PRE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_PRE}, - { "Q" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_Q}, - { "S" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_S}, - { "SAMP" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SAMP}, - { "SCRIPT" , script_attr, HTML_SCRIPT_ATTRIBUTES, SGML_LITTERAL,T_SCRIPT}, - { "SELECT" , select_attr, HTML_SELECT_ATTRIBUTES, SGML_MIXED,T_SELECT}, - { "SHY" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_SHY}, - { "SMALL" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SMALL}, - { "SPAN" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SPAN}, - { "SPOT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_SPOT}, - { "STRIKE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_STRIKE}, - { "STRONG" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_STRONG}, - { "STYLE" , style_attr, HTML_STYLE_ATTRIBUTES, SGML_LITTERAL,T_STYLE}, - { "SUB" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SUB}, - { "SUP" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SUP}, - { "TAB" , tab_attr, HTML_TAB_ATTRIBUTES, SGML_EMPTY,T_TAB}, - { "TABLE" , table_attr, HTML_TABLE_ATTRIBUTES, SGML_MIXED,T_TABLE}, - { "TBODY" , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY,T_TBODY}, - { "TD" , td_attr, HTML_TD_ATTRIBUTES, SGML_EMPTY,T_TD}, - { "TEXTAREA", textarea_attr,HTML_TEXTAREA_ATTRIBUTES, SGML_LITTERAL,T_TEXTAREA}, - { "TEXTFLOW", bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED,T_TEXTFLOW}, - { "TFOOT" , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY,T_TFOOT}, - { "TH" , td_attr, HTML_TD_ATTRIBUTES, SGML_EMPTY,T_TH}, - { "THEAD" , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY,T_THEAD}, - { "TITLE", gen_attr, HTML_GEN_ATTRIBUTES, SGML_RCDATA,T_TITLE}, - { "TR" , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY,T_TR}, - { "TT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_TT}, - { "U" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_U}, - { "UL" , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_UL}, - { "VAR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_VAR}, - { "WBR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_WBR}, - { "XMP" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_XMP}, +#ifdef USE_COLOR_STYLE +#define P(x) x , (sizeof x) -1 +#define NULL_HTTag NULL, 0 +#else +#define P(x) x +#define NULL_HTTag NULL +#endif + +static CONST HTTag tags_old[HTML_ELEMENTS] = { + { P("A") , a_attr, HTML_A_ATTRIBUTES, SGML_EMPTY,T_A}, + { P("ABBREV") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_ABBREV}, + { P("ACRONYM") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_ACRONYM}, + { P("ADDRESS") , address_attr, HTML_ADDRESS_ATTRIBUTES, SGML_MIXED,T_ADDRESS}, + { P("APPLET") , applet_attr, HTML_APPLET_ATTRIBUTES, SGML_MIXED,T_APPLET}, + { P("AREA") , area_attr, HTML_AREA_ATTRIBUTES, SGML_EMPTY,T_AREA}, + { P("AU") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_AU}, + { P("AUTHOR") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_AUTHOR}, + { P("B") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_B}, + { P("BANNER") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BANNER}, + { P("BASE") , base_attr, HTML_BASE_ATTRIBUTES, SGML_EMPTY,T_BASE}, + { P("BASEFONT"), font_attr, HTML_FONT_ATTRIBUTES, SGML_EMPTY,T_BASEFONT}, + { P("BDO") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BDO}, + { P("BGSOUND") , bgsound_attr, HTML_BGSOUND_ATTRIBUTES, SGML_EMPTY,T_BGSOUND}, + { P("BIG") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BIG}, + { P("BLINK") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_BLINK}, + { P("BLOCKQUOTE"), bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED,T_BLOCKQUOTE}, + { P("BODY") , body_attr, HTML_BODY_ATTRIBUTES, SGML_MIXED,T_BODY}, + { P("BODYTEXT"), bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED,T_BODYTEXT}, + { P("BQ") , bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED,T_BQ}, + { P("BR") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_BR}, + { P("BUTTON") , button_attr, HTML_BUTTON_ATTRIBUTES, SGML_MIXED,T_BUTTON}, + { P("CAPTION") , caption_attr, HTML_CAPTION_ATTRIBUTES, SGML_MIXED,T_CAPTION}, + { P("CENTER") , div_attr, HTML_DIV_ATTRIBUTES, SGML_MIXED,T_CENTER}, + { P("CITE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_CITE}, + { P("CODE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_CODE}, + { P("COL") , col_attr, HTML_COL_ATTRIBUTES, SGML_EMPTY,T_COL}, + { P("COLGROUP"), col_attr, HTML_COL_ATTRIBUTES, SGML_EMPTY,T_COLGROUP}, + { P("COMMENT") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_COMMENT}, + { P("CREDIT") , credit_attr, HTML_CREDIT_ATTRIBUTES, SGML_MIXED,T_CREDIT}, + { P("DD") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_DD}, + { P("DEL") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DEL}, + { P("DFN") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DFN}, + { P("DIR") , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_DIR}, + { P("DIV") , div_attr, HTML_DIV_ATTRIBUTES, SGML_MIXED,T_DIV}, + { P("DL") , glossary_attr, HTML_DL_ATTRIBUTES, SGML_MIXED,T_DL}, + { P("DLC") , glossary_attr, HTML_DL_ATTRIBUTES, SGML_MIXED,T_DLC}, + { P("DT") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_DT}, + { P("EM") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_EM}, + { P("EMBED") , embed_attr, HTML_EMBED_ATTRIBUTES, SGML_EMPTY,T_EMBED}, + { P("FIELDSET"), fieldset_attr,HTML_FIELDSET_ATTRIBUTES, SGML_MIXED,T_FIELDSET}, + { P("FIG") , fig_attr, HTML_FIG_ATTRIBUTES, SGML_MIXED,T_FIG}, + { P("FN") , fn_attr, HTML_FN_ATTRIBUTES, SGML_MIXED,T_FN}, + { P("FONT") , font_attr, HTML_FONT_ATTRIBUTES, SGML_EMPTY,T_FONT}, + { P("FORM") , form_attr, HTML_FORM_ATTRIBUTES, SGML_EMPTY,T_FORM}, + { P("FRAME") , frame_attr, HTML_FRAME_ATTRIBUTES, SGML_EMPTY,T_FRAME}, + { P("FRAMESET"), frameset_attr,HTML_FRAMESET_ATTRIBUTES, SGML_MIXED,T_FRAMESET}, + { P("H1") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H1}, + { P("H2") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H2}, + { P("H3") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H3}, + { P("H4") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H4}, + { P("H5") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H5}, + { P("H6") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H6}, + { P("HEAD") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_HEAD}, + { P("HR") , hr_attr, HTML_HR_ATTRIBUTES, SGML_EMPTY,T_HR}, + { P("HTML") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_HTML}, + { P("HY") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_HY}, + { P("I") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_I}, + { P("IFRAME") , iframe_attr, HTML_IFRAME_ATTRIBUTES, SGML_MIXED,T_IFRAME}, + { P("IMG") , img_attr, HTML_IMG_ATTRIBUTES, SGML_EMPTY,T_IMG}, + { P("INPUT") , input_attr, HTML_INPUT_ATTRIBUTES, SGML_EMPTY,T_INPUT}, + { P("INS") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_INS}, + { P("ISINDEX") , isindex_attr, HTML_ISINDEX_ATTRIBUTES,SGML_EMPTY,T_ISINDEX}, + { P("KBD") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_KBD}, + { P("KEYGEN") , keygen_attr, HTML_KEYGEN_ATTRIBUTES, SGML_EMPTY,T_KEYGEN}, + { P("LABEL") , label_attr, HTML_LABEL_ATTRIBUTES, SGML_MIXED,T_LABEL}, + { P("LEGEND") , legend_attr, HTML_LEGEND_ATTRIBUTES, SGML_MIXED,T_LEGEND}, + { P("LH") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_LH}, + { P("LI") , list_attr, HTML_LI_ATTRIBUTES, SGML_EMPTY,T_LI}, + { P("LINK") , link_attr, HTML_LINK_ATTRIBUTES, SGML_EMPTY,T_LINK}, + { P("LISTING") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_LISTING}, + { P("MAP") , map_attr, HTML_MAP_ATTRIBUTES, SGML_MIXED,T_MAP}, + { P("MARQUEE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_MARQUEE}, + { P("MATH") , math_attr, HTML_MATH_ATTRIBUTES, SGML_LITTERAL,T_MATH}, + { P("MENU") , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_MENU}, + { P("META") , meta_attr, HTML_META_ATTRIBUTES, SGML_EMPTY,T_META}, + { P("NEXTID") , nextid_attr, 1, SGML_EMPTY,T_NEXTID}, + { P("NOFRAMES"), gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_NOFRAMES}, + { P("NOTE") , note_attr, HTML_NOTE_ATTRIBUTES, SGML_MIXED,T_NOTE}, + { P("OBJECT") , object_attr, HTML_OBJECT_ATTRIBUTES, SGML_LITTERAL,T_OBJECT}, + { P("OL") , olist_attr, HTML_OL_ATTRIBUTES, SGML_MIXED,T_OL}, + { P("OPTION") , option_attr, HTML_OPTION_ATTRIBUTES, SGML_EMPTY,T_OPTION}, + { P("OVERLAY") , overlay_attr, HTML_OVERLAY_ATTRIBUTES, SGML_EMPTY,T_OVERLAY}, + { P("P") , p_attr, HTML_P_ATTRIBUTES, SGML_EMPTY,T_P}, + { P("PARAM") , param_attr, HTML_PARAM_ATTRIBUTES, SGML_EMPTY,T_PARAM}, + { P("PLAINTEXT"), gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_PLAINTEXT}, + { P("PRE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_PRE}, + { P("Q") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_Q}, + { P("S") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_S}, + { P("SAMP") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SAMP}, + { P("SCRIPT") , script_attr, HTML_SCRIPT_ATTRIBUTES, SGML_LITTERAL,T_SCRIPT}, + { P("SELECT") , select_attr, HTML_SELECT_ATTRIBUTES, SGML_MIXED,T_SELECT}, + { P("SHY") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_SHY}, + { P("SMALL") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SMALL}, + { P("SPAN") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SPAN}, + { P("SPOT") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_SPOT}, + { P("STRIKE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_STRIKE}, + { P("STRONG") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_STRONG}, + { P("STYLE") , style_attr, HTML_STYLE_ATTRIBUTES, SGML_LITTERAL,T_STYLE}, + { P("SUB") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SUB}, + { P("SUP") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SUP}, + { P("TAB") , tab_attr, HTML_TAB_ATTRIBUTES, SGML_EMPTY,T_TAB}, + { P("TABLE") , table_attr, HTML_TABLE_ATTRIBUTES, SGML_MIXED,T_TABLE}, + { P("TBODY") , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY,T_TBODY}, + { P("TD") , td_attr, HTML_TD_ATTRIBUTES, SGML_EMPTY,T_TD}, + { P("TEXTAREA"), textarea_attr,HTML_TEXTAREA_ATTRIBUTES, SGML_LITTERAL,T_TEXTAREA}, + { P("TEXTFLOW"), bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED,T_TEXTFLOW}, + { P("TFOOT") , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY,T_TFOOT}, + { P("TH") , td_attr, HTML_TD_ATTRIBUTES, SGML_EMPTY,T_TH}, + { P("THEAD") , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY,T_THEAD}, + { P("TITLE"), gen_attr, HTML_GEN_ATTRIBUTES, SGML_RCDATA,T_TITLE}, + { P("TR") , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY,T_TR}, + { P("TT") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_TT}, + { P("U") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_U}, + { P("UL") , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_UL}, + { P("VAR") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_VAR}, + { P("WBR") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_WBR}, + { P("XMP") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_XMP}, }; -static HTTag tags_new[HTML_ELEMENTS] = { - { "A" , a_attr, HTML_A_ATTRIBUTES, SGML_MIXED,T_A}, - { "ABBREV" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_ABBREV}, - { "ACRONYM" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_ACRONYM}, - { "ADDRESS" , address_attr, HTML_ADDRESS_ATTRIBUTES, SGML_MIXED,T_ADDRESS}, - { "APPLET" , applet_attr, HTML_APPLET_ATTRIBUTES, SGML_MIXED,T_APPLET}, - { "AREA" , area_attr, HTML_AREA_ATTRIBUTES, SGML_EMPTY,T_AREA}, - { "AU" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_AU}, - { "AUTHOR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_AUTHOR}, - { "B" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_B}, - { "BANNER" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BANNER}, - { "BASE" , base_attr, HTML_BASE_ATTRIBUTES, SGML_EMPTY,T_BASE}, - { "BASEFONT", font_attr, HTML_FONT_ATTRIBUTES, SGML_EMPTY,T_BASEFONT}, - { "BDO" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BDO}, - { "BGSOUND" , bgsound_attr, HTML_BGSOUND_ATTRIBUTES, SGML_EMPTY,T_BGSOUND}, - { "BIG" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BIG}, - { "BLINK" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BLINK}, - { "BLOCKQUOTE", bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED,T_BLOCKQUOTE}, - { "BODY" , body_attr, HTML_BODY_ATTRIBUTES, SGML_MIXED,T_BODY}, - { "BODYTEXT", bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED,T_BODYTEXT}, - { "BQ" , bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED,T_BQ}, - { "BR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_BR}, - { "BUTTON" , button_attr, HTML_BUTTON_ATTRIBUTES, SGML_MIXED,T_BUTTON}, - { "CAPTION" , caption_attr, HTML_CAPTION_ATTRIBUTES, SGML_MIXED,T_CAPTION}, - { "CENTER" , div_attr, HTML_DIV_ATTRIBUTES, SGML_MIXED,T_CENTER}, - { "CITE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_CITE}, - { "CODE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_CODE}, - { "COL" , col_attr, HTML_COL_ATTRIBUTES, SGML_EMPTY,T_COL}, - { "COLGROUP", col_attr, HTML_COL_ATTRIBUTES, SGML_ELEMENT,T_COLGROUP}, - { "COMMENT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_PCDATA,T_COMMENT}, - { "CREDIT" , credit_attr, HTML_CREDIT_ATTRIBUTES, SGML_MIXED,T_CREDIT}, - { "DD" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DD}, - { "DEL" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DEL}, - { "DFN" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DFN}, - { "DIR" , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_DIR}, - { "DIV" , div_attr, HTML_DIV_ATTRIBUTES, SGML_MIXED,T_DIV}, - { "DL" , glossary_attr, HTML_DL_ATTRIBUTES, SGML_MIXED,T_DL}, - { "DLC" , glossary_attr, HTML_DL_ATTRIBUTES, SGML_MIXED,T_DLC}, - { "DT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DT}, - { "EM" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_EM}, - { "EMBED" , embed_attr, HTML_EMBED_ATTRIBUTES, SGML_EMPTY,T_EMBED}, - { "FIELDSET", fieldset_attr,HTML_FIELDSET_ATTRIBUTES, SGML_MIXED,T_FIELDSET}, - { "FIG" , fig_attr, HTML_FIG_ATTRIBUTES, SGML_MIXED,T_FIG}, - { "FN" , fn_attr, HTML_FN_ATTRIBUTES, SGML_MIXED,T_FN}, - { "FONT" , font_attr, HTML_FONT_ATTRIBUTES, SGML_MIXED,T_FONT}, - { "FORM" , form_attr, HTML_FORM_ATTRIBUTES, SGML_MIXED,T_FORM}, - { "FRAME" , frame_attr, HTML_FRAME_ATTRIBUTES, SGML_EMPTY,T_FRAME}, - { "FRAMESET", frameset_attr,HTML_FRAMESET_ATTRIBUTES, SGML_ELEMENT,T_FRAMESET}, - { "H1" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H1}, - { "H2" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H2}, - { "H3" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H3}, - { "H4" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H4}, - { "H5" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H5}, - { "H6" , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H6}, - { "HEAD" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_ELEMENT,T_HEAD}, - { "HR" , hr_attr, HTML_HR_ATTRIBUTES, SGML_EMPTY,T_HR}, - { "HTML" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_HTML}, - { "HY" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_HY}, - { "I" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_I}, - { "IFRAME" , iframe_attr, HTML_IFRAME_ATTRIBUTES, SGML_MIXED,T_IFRAME}, - { "IMG" , img_attr, HTML_IMG_ATTRIBUTES, SGML_EMPTY,T_IMG}, - { "INPUT" , input_attr, HTML_INPUT_ATTRIBUTES, SGML_EMPTY,T_INPUT}, - { "INS" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_INS}, - { "ISINDEX" , isindex_attr, HTML_ISINDEX_ATTRIBUTES,SGML_EMPTY,T_ISINDEX}, - { "KBD" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_KBD}, - { "KEYGEN" , keygen_attr, HTML_KEYGEN_ATTRIBUTES, SGML_EMPTY,T_KEYGEN}, - { "LABEL" , label_attr, HTML_LABEL_ATTRIBUTES, SGML_MIXED,T_LABEL}, - { "LEGEND" , legend_attr, HTML_LEGEND_ATTRIBUTES, SGML_MIXED,T_LEGEND}, - { "LH" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_LH}, - { "LI" , list_attr, HTML_LI_ATTRIBUTES, SGML_MIXED,T_LI}, - { "LINK" , link_attr, HTML_LINK_ATTRIBUTES, SGML_EMPTY,T_LINK}, - { "LISTING" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_LISTING}, - { "MAP" , map_attr, HTML_MAP_ATTRIBUTES, SGML_ELEMENT,T_MAP}, - { "MARQUEE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_MARQUEE}, - { "MATH" , math_attr, HTML_MATH_ATTRIBUTES, SGML_LITTERAL,T_MATH}, - { "MENU" , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_MENU}, - { "META" , meta_attr, HTML_META_ATTRIBUTES, SGML_EMPTY,T_META}, - { "NEXTID" , nextid_attr, 1, SGML_EMPTY,T_NEXTID}, - { "NOFRAMES", gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_NOFRAMES}, - { "NOTE" , note_attr, HTML_NOTE_ATTRIBUTES, SGML_MIXED,T_NOTE}, - { "OBJECT" , object_attr, HTML_OBJECT_ATTRIBUTES, SGML_LITTERAL,T_OBJECT}, - { "OL" , olist_attr, HTML_OL_ATTRIBUTES, SGML_MIXED,T_OL}, - { "OPTION" , option_attr, HTML_OPTION_ATTRIBUTES, SGML_PCDATA,T_OPTION}, - { "OVERLAY" , overlay_attr, HTML_OVERLAY_ATTRIBUTES, SGML_PCDATA,T_OVERLAY}, - { "P" , p_attr, HTML_P_ATTRIBUTES, SGML_MIXED,T_P}, - { "PARAM" , param_attr, HTML_PARAM_ATTRIBUTES, SGML_EMPTY,T_PARAM}, - { "PLAINTEXT", gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_PLAINTEXT}, - { "PRE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_PRE}, - { "Q" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_Q}, - { "S" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_S}, - { "SAMP" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SAMP}, - { "SCRIPT" , script_attr, HTML_SCRIPT_ATTRIBUTES, SGML_LITTERAL,T_SCRIPT}, - { "SELECT" , select_attr, HTML_SELECT_ATTRIBUTES, SGML_ELEMENT,T_SELECT}, - { "SHY" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_SHY}, - { "SMALL" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SMALL}, - { "SPAN" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SPAN}, - { "SPOT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_SPOT}, - { "STRIKE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_STRIKE}, - { "STRONG" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_STRONG}, - { "STYLE" , style_attr, HTML_STYLE_ATTRIBUTES, SGML_LITTERAL,T_STYLE}, - { "SUB" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SUB}, - { "SUP" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SUP}, - { "TAB" , tab_attr, HTML_TAB_ATTRIBUTES, SGML_EMPTY,T_TAB}, - { "TABLE" , table_attr, HTML_TABLE_ATTRIBUTES, SGML_ELEMENT,T_TABLE}, - { "TBODY" , tr_attr, HTML_TR_ATTRIBUTES, SGML_ELEMENT,T_TBODY}, - { "TD" , td_attr, HTML_TD_ATTRIBUTES, SGML_MIXED,T_TD}, - { "TEXTAREA", textarea_attr,HTML_TEXTAREA_ATTRIBUTES, SGML_LITTERAL,T_TEXTAREA}, - { "TEXTFLOW", bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED,T_TEXTFLOW}, - { "TFOOT" , tr_attr, HTML_TR_ATTRIBUTES, SGML_ELEMENT,T_TFOOT}, - { "TH" , td_attr, HTML_TD_ATTRIBUTES, SGML_MIXED,T_TH}, - { "THEAD" , tr_attr, HTML_TR_ATTRIBUTES, SGML_ELEMENT,T_THEAD}, - { "TITLE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_PCDATA,T_TITLE}, - { "TR" , tr_attr, HTML_TR_ATTRIBUTES, SGML_MIXED,T_TR}, - { "TT" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_TT}, - { "U" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_U}, - { "UL" , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_UL}, - { "VAR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_VAR}, - { "WBR" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_WBR}, - { "XMP" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_XMP}, +static CONST HTTag tags_new[HTML_ELEMENTS] = { + { P("A") , a_attr, HTML_A_ATTRIBUTES, SGML_MIXED,T_A}, + { P("ABBREV") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_ABBREV}, + { P("ACRONYM") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_ACRONYM}, + { P("ADDRESS") , address_attr, HTML_ADDRESS_ATTRIBUTES, SGML_MIXED,T_ADDRESS}, + { P("APPLET") , applet_attr, HTML_APPLET_ATTRIBUTES, SGML_MIXED,T_APPLET}, + { P("AREA") , area_attr, HTML_AREA_ATTRIBUTES, SGML_EMPTY,T_AREA}, + { P("AU") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_AU}, + { P("AUTHOR") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_AUTHOR}, + { P("B") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_B}, + { P("BANNER") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BANNER}, + { P("BASE") , base_attr, HTML_BASE_ATTRIBUTES, SGML_EMPTY,T_BASE}, + { P("BASEFONT"), font_attr, HTML_FONT_ATTRIBUTES, SGML_EMPTY,T_BASEFONT}, + { P("BDO") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BDO}, + { P("BGSOUND") , bgsound_attr, HTML_BGSOUND_ATTRIBUTES, SGML_EMPTY,T_BGSOUND}, + { P("BIG") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BIG}, + { P("BLINK") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_BLINK}, + { P("BLOCKQUOTE"), bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED,T_BLOCKQUOTE}, + { P("BODY") , body_attr, HTML_BODY_ATTRIBUTES, SGML_MIXED,T_BODY}, + { P("BODYTEXT"), bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED,T_BODYTEXT}, + { P("BQ") , bq_attr, HTML_BQ_ATTRIBUTES, SGML_MIXED,T_BQ}, + { P("BR") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_BR}, + { P("BUTTON") , button_attr, HTML_BUTTON_ATTRIBUTES, SGML_MIXED,T_BUTTON}, + { P("CAPTION") , caption_attr, HTML_CAPTION_ATTRIBUTES, SGML_MIXED,T_CAPTION}, + { P("CENTER") , div_attr, HTML_DIV_ATTRIBUTES, SGML_MIXED,T_CENTER}, + { P("CITE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_CITE}, + { P("CODE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_CODE}, + { P("COL") , col_attr, HTML_COL_ATTRIBUTES, SGML_EMPTY,T_COL}, + { P("COLGROUP"), col_attr, HTML_COL_ATTRIBUTES, SGML_ELEMENT,T_COLGROUP}, + { P("COMMENT") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_PCDATA,T_COMMENT}, + { P("CREDIT") , credit_attr, HTML_CREDIT_ATTRIBUTES, SGML_MIXED,T_CREDIT}, + { P("DD") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DD}, + { P("DEL") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DEL}, + { P("DFN") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DFN}, + { P("DIR") , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_DIR}, + { P("DIV") , div_attr, HTML_DIV_ATTRIBUTES, SGML_MIXED,T_DIV}, + { P("DL") , glossary_attr, HTML_DL_ATTRIBUTES, SGML_MIXED,T_DL}, + { P("DLC") , glossary_attr, HTML_DL_ATTRIBUTES, SGML_MIXED,T_DLC}, + { P("DT") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_DT}, + { P("EM") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_EM}, + { P("EMBED") , embed_attr, HTML_EMBED_ATTRIBUTES, SGML_EMPTY,T_EMBED}, + { P("FIELDSET"), fieldset_attr,HTML_FIELDSET_ATTRIBUTES, SGML_MIXED,T_FIELDSET}, + { P("FIG") , fig_attr, HTML_FIG_ATTRIBUTES, SGML_MIXED,T_FIG}, + { P("FN") , fn_attr, HTML_FN_ATTRIBUTES, SGML_MIXED,T_FN}, + { P("FONT") , font_attr, HTML_FONT_ATTRIBUTES, SGML_MIXED,T_FONT}, + { P("FORM") , form_attr, HTML_FORM_ATTRIBUTES, SGML_MIXED,T_FORM}, + { P("FRAME") , frame_attr, HTML_FRAME_ATTRIBUTES, SGML_EMPTY,T_FRAME}, + { P("FRAMESET"), frameset_attr,HTML_FRAMESET_ATTRIBUTES, SGML_ELEMENT,T_FRAMESET}, + { P("H1") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H1}, + { P("H2") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H2}, + { P("H3") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H3}, + { P("H4") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H4}, + { P("H5") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H5}, + { P("H6") , h_attr, HTML_H_ATTRIBUTES, SGML_MIXED,T_H6}, + { P("HEAD") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_ELEMENT,T_HEAD}, + { P("HR") , hr_attr, HTML_HR_ATTRIBUTES, SGML_EMPTY,T_HR}, + { P("HTML") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_HTML}, + { P("HY") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_HY}, + { P("I") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_I}, + { P("IFRAME") , iframe_attr, HTML_IFRAME_ATTRIBUTES, SGML_MIXED,T_IFRAME}, + { P("IMG") , img_attr, HTML_IMG_ATTRIBUTES, SGML_EMPTY,T_IMG}, + { P("INPUT") , input_attr, HTML_INPUT_ATTRIBUTES, SGML_EMPTY,T_INPUT}, + { P("INS") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_INS}, + { P("ISINDEX") , isindex_attr, HTML_ISINDEX_ATTRIBUTES,SGML_EMPTY,T_ISINDEX}, + { P("KBD") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_KBD}, + { P("KEYGEN") , keygen_attr, HTML_KEYGEN_ATTRIBUTES, SGML_EMPTY,T_KEYGEN}, + { P("LABEL") , label_attr, HTML_LABEL_ATTRIBUTES, SGML_MIXED,T_LABEL}, + { P("LEGEND") , legend_attr, HTML_LEGEND_ATTRIBUTES, SGML_MIXED,T_LEGEND}, + { P("LH") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_LH}, + { P("LI") , list_attr, HTML_LI_ATTRIBUTES, SGML_MIXED,T_LI}, + { P("LINK") , link_attr, HTML_LINK_ATTRIBUTES, SGML_EMPTY,T_LINK}, + { P("LISTING") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_LISTING}, + { P("MAP") , map_attr, HTML_MAP_ATTRIBUTES, SGML_ELEMENT,T_MAP}, + { P("MARQUEE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_MARQUEE}, + { P("MATH") , math_attr, HTML_MATH_ATTRIBUTES, SGML_LITTERAL,T_MATH}, + { P("MENU") , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_MENU}, + { P("META") , meta_attr, HTML_META_ATTRIBUTES, SGML_EMPTY,T_META}, + { P("NEXTID") , nextid_attr, 1, SGML_EMPTY,T_NEXTID}, + { P("NOFRAMES"), gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_NOFRAMES}, + { P("NOTE") , note_attr, HTML_NOTE_ATTRIBUTES, SGML_MIXED,T_NOTE}, + { P("OBJECT") , object_attr, HTML_OBJECT_ATTRIBUTES, SGML_LITTERAL,T_OBJECT}, + { P("OL") , olist_attr, HTML_OL_ATTRIBUTES, SGML_MIXED,T_OL}, + { P("OPTION") , option_attr, HTML_OPTION_ATTRIBUTES, SGML_PCDATA,T_OPTION}, + { P("OVERLAY") , overlay_attr, HTML_OVERLAY_ATTRIBUTES, SGML_PCDATA,T_OVERLAY}, + { P("P") , p_attr, HTML_P_ATTRIBUTES, SGML_MIXED,T_P}, + { P("PARAM") , param_attr, HTML_PARAM_ATTRIBUTES, SGML_EMPTY,T_PARAM}, + { P("PLAINTEXT"), gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_PLAINTEXT}, + { P("PRE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_PRE}, + { P("Q") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_Q}, + { P("S") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_S}, + { P("SAMP") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SAMP}, + { P("SCRIPT") , script_attr, HTML_SCRIPT_ATTRIBUTES, SGML_LITTERAL,T_SCRIPT}, + { P("SELECT") , select_attr, HTML_SELECT_ATTRIBUTES, SGML_ELEMENT,T_SELECT}, + { P("SHY") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_SHY}, + { P("SMALL") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SMALL}, + { P("SPAN") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SPAN}, + { P("SPOT") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_SPOT}, + { P("STRIKE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_STRIKE}, + { P("STRONG") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_STRONG}, + { P("STYLE") , style_attr, HTML_STYLE_ATTRIBUTES, SGML_LITTERAL,T_STYLE}, + { P("SUB") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SUB}, + { P("SUP") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_SUP}, + { P("TAB") , tab_attr, HTML_TAB_ATTRIBUTES, SGML_EMPTY,T_TAB}, + { P("TABLE") , table_attr, HTML_TABLE_ATTRIBUTES, SGML_ELEMENT,T_TABLE}, + { P("TBODY") , tr_attr, HTML_TR_ATTRIBUTES, SGML_ELEMENT,T_TBODY}, + { P("TD") , td_attr, HTML_TD_ATTRIBUTES, SGML_MIXED,T_TD}, + { P("TEXTAREA"), textarea_attr,HTML_TEXTAREA_ATTRIBUTES, SGML_LITTERAL,T_TEXTAREA}, + { P("TEXTFLOW"), bodytext_attr,HTML_BODYTEXT_ATTRIBUTES, SGML_MIXED,T_TEXTFLOW}, + { P("TFOOT") , tr_attr, HTML_TR_ATTRIBUTES, SGML_ELEMENT,T_TFOOT}, + { P("TH") , td_attr, HTML_TD_ATTRIBUTES, SGML_MIXED,T_TH}, + { P("THEAD") , tr_attr, HTML_TR_ATTRIBUTES, SGML_ELEMENT,T_THEAD}, + { P("TITLE") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_PCDATA,T_TITLE}, + { P("TR") , tr_attr, HTML_TR_ATTRIBUTES, SGML_MIXED,T_TR}, + { P("TT") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_TT}, + { P("U") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_U}, + { P("UL") , ulist_attr, HTML_UL_ATTRIBUTES, SGML_MIXED,T_UL}, + { P("VAR") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED,T_VAR}, + { P("WBR") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_EMPTY,T_WBR}, + { P("XMP") , gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL,T_XMP}, }; +#undef P /* Dummy space, will be filled with the contents of either tags_new or tags_old on calling HTSwitchDTD - kw */ @@ -1580,10 +1622,8 @@ static HTTag tags[HTML_ELEMENTS]; PUBLIC CONST SGML_dtd HTML_dtd = { tags, HTML_ELEMENTS, - entities, + entities, /* probably unused */ sizeof(entities)/sizeof(entities[0]), - unicode_entities, - sizeof(unicode_entities)/sizeof(unicode_entities[0]) }; /* This function fills the "tags" part of the HTML_dtd structure with @@ -1597,17 +1637,19 @@ PUBLIC void HTSwitchDTD ARGS1( BOOL, new) { if (TRACE) - fprintf(stderr,"HTMLDTD: Copying DTD element info of size %d, %d * %d\n", - new ? sizeof(tags_new) : sizeof(tags_old), - HTML_ELEMENTS, sizeof(HTTag)); + CTRACE(tfp,"HTMLDTD: Copying DTD element info of size %d, %d * %d\n", + (int) (new ? sizeof(tags_new) : sizeof(tags_old)), + HTML_ELEMENTS, + (int) sizeof(HTTag)); if (new) memcpy(tags, tags_new, HTML_ELEMENTS * sizeof(HTTag)); else memcpy(tags, tags_old, HTML_ELEMENTS * sizeof(HTTag)); } -PUBLIC CONST HTTag HTTag_unrecognized = - { NULL, NULL, 0, SGML_EMPTY,T__UNREC_}; +PUBLIC HTTag HTTag_unrecognized = + + { NULL_HTTag, NULL, 0, SGML_EMPTY,T__UNREC_}; /* ** Utility Routine: Useful for people building HTML objects. diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMLDTD.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMLDTD.h index 15004a1d7da..8b1cd4fb05d 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMLDTD.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMLDTD.h @@ -12,10 +12,7 @@ #ifndef HTMLDTD_H #define HTMLDTD_H -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ -#include "SGML.h" +#include /* ** Lynx internal character representations. @@ -23,9 +20,9 @@ #ifndef HT_NON_BREAK_SPACE #define HT_NON_BREAK_SPACE ((char)1) /* For now */ #endif /* !HT_NON_BREAK_SPACE */ -#ifndef HT_EM_SPACE -#define HT_EM_SPACE ((char)2) /* For now */ -#endif /* !HT_EM_SPACE */ +#ifndef HT_EN_SPACE +#define HT_EN_SPACE ((char)2) /* For now */ +#endif /* !HT_EN_SPACE */ #ifndef LY_SOFT_HYPHEN #define LY_SOFT_HYPHEN ((char)7) #endif /* !LY_SOFT_HYPHEN */ @@ -301,15 +298,16 @@ Attribute numbers #define HTML_BODYTEXT_VALUETYPE 13 #define HTML_BODYTEXT_ATTRIBUTES 14 -#define HTML_BQ_CLASS 0 -#define HTML_BQ_CLEAR 1 -#define HTML_BQ_DIR 2 -#define HTML_BQ_ID 3 -#define HTML_BQ_LANG 4 -#define HTML_BQ_NOWRAP 5 -#define HTML_BQ_STYLE 6 -#define HTML_BQ_TITLE 7 -#define HTML_BQ_ATTRIBUTES 8 +#define HTML_BQ_CITE 0 +#define HTML_BQ_CLASS 1 +#define HTML_BQ_CLEAR 2 +#define HTML_BQ_DIR 3 +#define HTML_BQ_ID 4 +#define HTML_BQ_LANG 5 +#define HTML_BQ_NOWRAP 6 +#define HTML_BQ_STYLE 7 +#define HTML_BQ_TITLE 8 +#define HTML_BQ_ATTRIBUTES 9 #define HTML_BUTTON_CLASS 0 #define HTML_BUTTON_CLEAR 1 @@ -470,14 +468,15 @@ Attribute numbers #define HTML_FORM_TITLE 14 #define HTML_FORM_ATTRIBUTES 15 -#define HTML_FRAME_ID 0 -#define HTML_FRAME_MARGINHEIGHT 1 -#define HTML_FRAME_MARGINWIDTH 2 -#define HTML_FRAME_NAME 3 -#define HTML_FRAME_NORESIZE 4 -#define HTML_FRAME_SCROLLING 5 -#define HTML_FRAME_SRC 6 -#define HTML_FRAME_ATTRIBUTES 7 +#define HTML_FRAME_ID 0 +#define HTML_FRAME_LONGDESC 1 +#define HTML_FRAME_MARGINHEIGHT 2 +#define HTML_FRAME_MARGINWIDTH 3 +#define HTML_FRAME_NAME 4 +#define HTML_FRAME_NORESIZE 5 +#define HTML_FRAME_SCROLLING 6 +#define HTML_FRAME_SRC 7 +#define HTML_FRAME_ATTRIBUTES 8 #define HTML_FRAMESET_COLS 0 #define HTML_FRAMESET_ROWS 1 @@ -522,38 +521,40 @@ Attribute numbers #define HTML_HR_WIDTH 11 #define HTML_HR_ATTRIBUTES 12 -#define HTML_IFRAME_ALIGN 0 -#define HTML_IFRAME_FRAMEBORDER 1 -#define HTML_IFRAME_HEIGHT 2 -#define HTML_IFRAME_ID 3 -#define HTML_IFRAME_MARGINHEIGHT 4 -#define HTML_IFRAME_MARGINWIDTH 5 -#define HTML_IFRAME_NAME 6 -#define HTML_IFRAME_SCROLLING 7 -#define HTML_IFRAME_SRC 8 -#define HTML_IFRAME_STYLE 9 -#define HTML_IFRAME_WIDTH 10 -#define HTML_IFRAME_ATTRIBUTES 11 - -#define HTML_IMG_ALIGN 0 -#define HTML_IMG_ALT 1 -#define HTML_IMG_BORDER 2 -#define HTML_IMG_CLASS 3 -#define HTML_IMG_CLEAR 4 -#define HTML_IMG_DIR 5 -#define HTML_IMG_HEIGHT 6 -#define HTML_IMG_ID 7 -#define HTML_IMG_ISMAP 8 -#define HTML_IMG_ISOBJECT 9 -#define HTML_IMG_LANG 10 -#define HTML_IMG_MD 11 -#define HTML_IMG_SRC 12 -#define HTML_IMG_STYLE 13 -#define HTML_IMG_TITLE 14 -#define HTML_IMG_UNITS 15 -#define HTML_IMG_USEMAP 16 -#define HTML_IMG_WIDTH 17 -#define HTML_IMG_ATTRIBUTES 18 +#define HTML_IFRAME_ALIGN 0 +#define HTML_IFRAME_FRAMEBORDER 1 +#define HTML_IFRAME_HEIGHT 2 +#define HTML_IFRAME_ID 3 +#define HTML_IFRAME_LONGDESC 4 +#define HTML_IFRAME_MARGINHEIGHT 5 +#define HTML_IFRAME_MARGINWIDTH 6 +#define HTML_IFRAME_NAME 7 +#define HTML_IFRAME_SCROLLING 8 +#define HTML_IFRAME_SRC 9 +#define HTML_IFRAME_STYLE 10 +#define HTML_IFRAME_WIDTH 11 +#define HTML_IFRAME_ATTRIBUTES 12 + +#define HTML_IMG_ALIGN 0 +#define HTML_IMG_ALT 1 +#define HTML_IMG_BORDER 2 +#define HTML_IMG_CLASS 3 +#define HTML_IMG_CLEAR 4 +#define HTML_IMG_DIR 5 +#define HTML_IMG_HEIGHT 6 +#define HTML_IMG_ID 7 +#define HTML_IMG_ISMAP 8 +#define HTML_IMG_ISOBJECT 9 +#define HTML_IMG_LANG 10 +#define HTML_IMG_LONGDESC 11 +#define HTML_IMG_MD 12 +#define HTML_IMG_SRC 13 +#define HTML_IMG_STYLE 14 +#define HTML_IMG_TITLE 15 +#define HTML_IMG_UNITS 16 +#define HTML_IMG_USEMAP 17 +#define HTML_IMG_WIDTH 18 +#define HTML_IMG_ATTRIBUTES 19 #define HTML_INPUT_ACCEPT 0 #define HTML_INPUT_ACCEPT_CHARSET 1 /* RFC 2070 HTML i18n - kw */ @@ -858,45 +859,50 @@ Attribute numbers #define HTML_TAB_ATTRIBUTES 11 #define HTML_TABLE_ALIGN 0 -#define HTML_TABLE_BORDER 1 -#define HTML_TABLE_CELLPADDING 2 -#define HTML_TABLE_CELLSPACING 3 -#define HTML_TABLE_CLASS 4 -#define HTML_TABLE_CLEAR 5 -#define HTML_TABLE_COLS 6 -#define HTML_TABLE_COLSPEC 7 -#define HTML_TABLE_DIR 8 -#define HTML_TABLE_DP 9 -#define HTML_TABLE_FRAME 10 -#define HTML_TABLE_ID 11 -#define HTML_TABLE_LANG 12 -#define HTML_TABLE_NOFLOW 13 -#define HTML_TABLE_NOWRAP 14 -#define HTML_TABLE_RULES 15 -#define HTML_TABLE_STYLE 16 -#define HTML_TABLE_TITLE 17 -#define HTML_TABLE_UNITS 18 -#define HTML_TABLE_WIDTH 19 -#define HTML_TABLE_ATTRIBUTES 20 +#define HTML_TABLE_BACKGROUND 1 +#define HTML_TABLE_BORDER 2 +#define HTML_TABLE_CELLPADDING 3 +#define HTML_TABLE_CELLSPACING 4 +#define HTML_TABLE_CLASS 5 +#define HTML_TABLE_CLEAR 6 +#define HTML_TABLE_COLS 7 +#define HTML_TABLE_COLSPEC 8 +#define HTML_TABLE_DIR 9 +#define HTML_TABLE_DP 10 +#define HTML_TABLE_FRAME 11 +#define HTML_TABLE_ID 12 +#define HTML_TABLE_LANG 13 +#define HTML_TABLE_NOFLOW 14 +#define HTML_TABLE_NOWRAP 15 +#define HTML_TABLE_RULES 16 +#define HTML_TABLE_STYLE 17 +#define HTML_TABLE_SUMMARY 18 +#define HTML_TABLE_TITLE 19 +#define HTML_TABLE_UNITS 20 +#define HTML_TABLE_WIDTH 21 +#define HTML_TABLE_ATTRIBUTES 22 #define HTML_TD_ALIGN 0 #define HTML_TD_AXES 1 #define HTML_TD_AXIS 2 -#define HTML_TD_CHAR 3 -#define HTML_TD_CHAROFF 4 -#define HTML_TD_CLASS 5 -#define HTML_TD_CLEAR 6 -#define HTML_TD_COLSPAN 7 -#define HTML_TD_DIR 8 -#define HTML_TD_DP 9 -#define HTML_TD_ID 10 -#define HTML_TD_LANG 11 -#define HTML_TD_NOWRAP 12 -#define HTML_TD_ROWSPAN 13 -#define HTML_TD_STYLE 14 -#define HTML_TD_TITLE 15 -#define HTML_TD_VALIGN 16 -#define HTML_TD_ATTRIBUTES 17 +#define HTML_TD_BACKGROUND 3 +#define HTML_TD_CHAR 4 +#define HTML_TD_CHAROFF 5 +#define HTML_TD_CLASS 6 +#define HTML_TD_CLEAR 7 +#define HTML_TD_COLSPAN 8 +#define HTML_TD_DIR 9 +#define HTML_TD_DP 10 +#define HTML_TD_HEIGHT 11 +#define HTML_TD_ID 12 +#define HTML_TD_LANG 13 +#define HTML_TD_NOWRAP 14 +#define HTML_TD_ROWSPAN 15 +#define HTML_TD_STYLE 16 +#define HTML_TD_TITLE 17 +#define HTML_TD_VALIGN 18 +#define HTML_TD_WIDTH 19 +#define HTML_TD_ATTRIBUTES 20 #define HTML_TEXTAREA_ACCEPT_CHARSET 0 /* RFC 2070 HTML i18n - kw */ #define HTML_TEXTAREA_ALIGN 1 @@ -951,12 +957,21 @@ Attribute numbers #define HTML_UL_WRAP 13 #define HTML_UL_ATTRIBUTES 14 +#ifdef USE_PSRC +/* values of HTML attributes' types */ +#define HTMLA_NORMAL 0 /* nothing specific */ +#define HTMLA_ANAME 1 /* anchor name - 'id' or a's 'name' */ +#define HTMLA_HREF 2 /* href */ +#define HTMLA_CLASS 4 /* class name. */ +#define HTMLA_AUXCLASS 8 /* attribute, the value of which also designates + a class name */ +#endif extern CONST SGML_dtd HTML_dtd; extern void HTSwitchDTD PARAMS(( BOOL new)); -extern CONST HTTag HTTag_unrecognized; +extern HTTag HTTag_unrecognized; /* diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMLGen.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMLGen.c index 1839f3c41a1..a5269eba7be 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMLGen.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMLGen.c @@ -12,30 +12,43 @@ ** which is cleanest. */ -#include "HTUtils.h" -#include "tcp.h" +#include #define BUFFER_SIZE 200 /* Line buffer attempts to make neat breaks */ #define MAX_CLEANNESS 20 /* Implements: */ -#include "HTMLGen.h" +#include -#include -#include "HTMLDTD.h" -#include "HTStream.h" -#include "SGML.h" -#include "HTFormat.h" +#include +#include +#include +#include -#include "LYLeaks.h" +#ifdef USE_COLOR_STYLE +#include +#include +#include +#include +#endif -#define FREE(x) if (x) {free(x); x = NULL;} +#include + +extern BOOLEAN LYPreparsedSource; /* Show source as preparsed? */ #define PUTC(c) (*me->targetClass.put_character)(me->target, c) /* #define PUTS(s) (*me->targetClass.put_string)(me->target, s) */ #define PUTB(s,l) (*me->targetClass.put_block)(me->target, s, l) +#ifdef USE_COLOR_STYLE +PUBLIC char class_string[TEMPSTRINGSIZE]; + +static char *Style_className = NULL; +static char myHash[128]; +static int hcode; +#endif + /* HTML Object ** ----------- */ @@ -60,6 +73,9 @@ struct _HTStructured { BOOL preformatted; BOOL escape_specials; BOOL in_attrval; +#ifdef USE_COLOR_STYLE + HText * text; +#endif }; /* Flush Buffer @@ -87,6 +103,46 @@ PRIVATE void HTMLGen_flush ARGS1( me->delete_line_break_char[0] = NO; } +#ifdef USE_COLOR_STYLE +/* + * We need to flush our buffer each time before we effect a color style + * change, this also relies on the subsequent stage not doing any + * buffering - this is currently true, in cases where it matters the + * target stream should be the HTPlain converter. + * The flushing currently prevents reasonable line breaking in lines + * with tags. Since color styles help visual scanning of displayed + * source lines, and long lines are wrapped in GridText anyway, this + * is probably acceptable (or even A Good Thing - more to see in one + * screenful). + * The pointer to the HText structure is initialized here before + * we effect the first style change. Getting it from the global + * HTMainText variable isn't very clean, since it relies on the fact + * that HText_new() has already been called for the current stream + * stack's document by the time we start processing the first element; + * we rely on HTMLGenerator's callers (HTMLParsedPresent in particular) + * to guarantee this when it matters. Normally the target stream will + * have been setup by HTPlainPresent, which does what we need in this + * respect. (A check whether we have the right output stream could be + * done by checking that targetClass.name is "PlainPresenter" or similar.) + * + * All special color style handling is only done if LYPreparsedSource + * is set. We could always do it for displaying source generated by + * an internal gateway, but this makes the rule more simple for the + * user: color styles are applied to html source only with the + * -preparsed flag. - kw + */ +PRIVATE void do_cstyle_flush ARGS1( + HTStructured *, me) +{ + if (!me->text && LYPreparsedSource) { + me->text = HTMainText; + } + if (me->text) { + HTMLGen_flush(me); + } +} +#endif /* COLOR_STYLE */ + /* Weighted optional line break ** ** We keep track of all the breaks for when we chop the line @@ -111,11 +167,11 @@ PRIVATE void allow_break ARGS3( ** ------------------ ** ** The tricky bits are the line break handling. This attempts -** to synchrononise line breaks on sentence or phrase ends. This +** to synchrononise line breaks on sentence or phrase ends. This ** is important if one stores SGML files in a line-oriented code ** repository, so that if a small change is made, line ends don't ** shift in a ripple-through to apparently change a large part of the -** file. We give extra "cleanness" to spaces appearing directly +** file. We give extra "cleanness" to spaces appearing directly ** after periods (full stops), [semi]colons and commas. ** This should make the source files easier to read and modify ** by hand, too, though this is not a primary design consideration. TBL @@ -125,7 +181,7 @@ PRIVATE void HTMLGen_put_character ARGS2( char, c) { if (me->escape_specials && (unsigned char)c < 32) { - if (c == HT_NON_BREAK_SPACE || c == HT_EM_SPACE || + if (c == HT_NON_BREAK_SPACE || c == HT_EN_SPACE || c == LY_SOFT_HYPHEN) { /* recursion... */ HTMLGen_put_character(me, '&'); HTMLGen_put_character(me, '#'); @@ -135,11 +191,11 @@ PRIVATE void HTMLGen_put_character ARGS2( HTMLGen_put_character(me, 'A'); HTMLGen_put_character(me, '0'); break; - case HT_EM_SPACE: /*   */ + case HT_EN_SPACE: /*   */ HTMLGen_put_character(me, '2'); HTMLGen_put_character(me, '0'); HTMLGen_put_character(me, '0'); - HTMLGen_put_character(me, '3'); + HTMLGen_put_character(me, '2'); break; case LY_SOFT_HYPHEN: /* ­ */ HTMLGen_put_character(me, 'A'); @@ -270,6 +326,59 @@ PRIVATE void HTMLGen_start_element ARGS6( BOOL was_preformatted = me->preformatted; HTTag * tag = &HTML_dtd.tags[element_number]; +#if defined(USE_COLOR_STYLE) + char *title = NULL; + char *title_tmp = NULL; + + if (LYPreparsedSource) { + /* + * Same logic as in HTML_start_element, copied from there. - kw + */ + HTSprintf (&Style_className, ";%s", HTML_dtd.tags[element_number].name); + strcpy (myHash, HTML_dtd.tags[element_number].name); + if (class_string[0]) + { + HTSprintf (&Style_className, ".%s", class_string); + strcat (myHash, "."); + strcat (myHash, class_string); + } + class_string[0] = '\0'; + strtolower(myHash); + hcode = hash_code(myHash); + strtolower(Style_className); + + if (TRACE) + { + fprintf(tfp, "CSSTRIM:%s -> %d", myHash, hcode); + if (hashStyles[hcode].code!=hcode) + { + char *rp=strrchr(myHash, '.'); + fprintf(tfp, " (undefined) %s\n", myHash); + if (rp) + { + int hcd; + *rp='\0'; /* trim the class */ + hcd = hash_code(myHash); + fprintf(tfp, "CSS:%s -> %d", myHash, hcd); + if (hashStyles[hcd].code!=hcd) + fprintf(tfp, " (undefined) %s\n", myHash); + else + fprintf(tfp, " ca=%d\n", hashStyles[hcd].color); + } + } + else + fprintf(tfp, " ca=%d\n", hashStyles[hcode].color); + } + + if (displayStyles[element_number + STARTAT].color > -2) /* actually set */ + { + CTRACE(tfp, "CSSTRIM: start_element: top <%s>\n", + HTML_dtd.tags[element_number].name); + do_cstyle_flush(me); + HText_characterStyle(me->text, hcode, 1); + } + } +#endif /* USE_COLOR_STYLE */ me->preformatted = YES; /* free text within tags */ HTMLGen_put_character(me, '<'); HTMLGen_put_string(me, tag->name); @@ -280,6 +389,36 @@ PRIVATE void HTMLGen_start_element ARGS6( had_attr = YES; HTMLGen_put_character(me, ' '); allow_break(me, 11, YES); +#ifdef USE_COLOR_STYLE + /* + * Try to mimic HTML_start_element's special handling + * for HTML_LINK. If applicable, color the displayed + * attribute / value pairs differently. - kw + */ + if (LYPreparsedSource && + element_number == HTML_LINK && !title && + present[HTML_LINK_CLASS] && + value && *value[HTML_LINK_CLASS]!='\0' && + !present[HTML_LINK_REV] && + (present[HTML_LINK_REL] || present[HTML_LINK_HREF])) { + if (present[HTML_LINK_TITLE] && *value[HTML_LINK_TITLE]) { + StrAllocCopy(title, value[HTML_LINK_TITLE]); + LYTrimHead(title); + LYTrimTail(title); + } + if ((!title || *title=='\0') && present[HTML_LINK_REL]) { + StrAllocCopy(title, value[HTML_LINK_REL]); + } + if (title && *title) { + HTSprintf0(&title_tmp, "link.%s.%s", + value[HTML_LINK_CLASS], title); + CTRACE(tfp, "CSSTRIM:link=%s\n", title_tmp); + + do_cstyle_flush(me); + HText_characterStyle(me->text, hash_code(title_tmp), 1); + } + } +#endif HTMLGen_put_string(me, tag->attributes[i].name); if (value[i]) { me->preformatted = was_preformatted; @@ -309,6 +448,19 @@ PRIVATE void HTMLGen_start_element ARGS6( } } } +#ifdef USE_COLOR_STYLE + if (had_attr && LYPreparsedSource && element_number == HTML_LINK) { + /* + * Clean up after special HTML_LINK handling - kw + */ + if (title && *title) { + do_cstyle_flush(me); + HText_characterStyle(me->text, hash_code(title_tmp), 0); + FREE(title_tmp); + } + FREE(title); + } +#endif if (had_attr) allow_break(me, 12, NO); } @@ -328,6 +480,29 @@ PRIVATE void HTMLGen_start_element ARGS6( else allow_break(me, 2, NO); } + +#if defined(USE_COLOR_STYLE) + /* + * Same logic as in HTML_start_element, copied from there. - kw + */ + +/* end really empty tags straight away */ +#define REALLY_EMPTY(e) ((HTML_dtd.tags[e].contents == SGML_EMPTY) && \ + !(HTML_dtd.tags[e].flags & Tgf_nreie)) + + if (LYPreparsedSource && REALLY_EMPTY(element_number)) + { + CTRACE(tfp, "STYLE:begin_element:ending EMPTY element style\n"); + do_cstyle_flush(me); +#if !defined(USE_HASH) + HText_characterStyle(me->text, element_number+STARTAT, STACK_OFF); +#else + HText_characterStyle(me->text, hcode, STACK_OFF); +#endif /* USE_HASH */ + TrimColorClass(HTML_dtd.tags[element_number].name, + Style_className, &hcode); + } +#endif /* USE_COLOR_STYLE */ } /* End Element @@ -362,6 +537,24 @@ PRIVATE void HTMLGen_end_element ARGS3( if (element_number == HTML_PRE) { me->preformatted = NO; } +#ifdef USE_COLOR_STYLE + /* + * Same logic as in HTML_end_element, copied from there. - kw + */ + TrimColorClass(HTML_dtd.tags[element_number].name, + Style_className, &hcode); + + if (LYPreparsedSource && !REALLY_EMPTY(element_number)) + { + CTRACE(tfp, "STYLE:end_element: ending non-EMPTY style\n"); + do_cstyle_flush(me); +#if !defined(USE_HASH) + HText_characterStyle(me->text, element_number+STARTAT, STACK_OFF); +#else + HText_characterStyle(me->text, hcode, STACK_OFF); +#endif /* USE_HASH */ + } +#endif /* USE_COLOR_STYLE */ } /* Expanding entities @@ -392,6 +585,9 @@ PRIVATE void HTMLGen_free ARGS1( (*me->targetClass.put_character)(me->target, '\n'); HTMLGen_flush(me); (*me->targetClass._free)(me->target); /* ripple through */ +#ifdef USE_COLOR_STYLE + FREE(Style_className); +#endif FREE(me); } @@ -407,6 +603,9 @@ PRIVATE void HTMLGen_abort ARGS2( HTError, e GCC_UNUSED) { HTMLGen_free(me); +#ifdef USE_COLOR_STYLE + FREE(Style_className); +#endif } PRIVATE void PlainToHTML_abort ARGS2( @@ -435,7 +634,6 @@ PRIVATE CONST HTStructuredClass HTMLGeneration = /* As opposed to print etc */ extern int LYcols; /* LYCurses.h, set in LYMain.c */ extern BOOL dump_output_immediately; /* TRUE if no interactive user */ extern int dump_output_width; /* -width instead of 80 */ -extern BOOLEAN LYPreparsedSource; /* Show source as preparsed? */ PUBLIC HTStructured * HTMLGenerator ARGS1( HTStream *, output) @@ -486,6 +684,12 @@ PUBLIC HTStructured * HTMLGenerator ARGS1( */ me->escape_specials = LYPreparsedSource; +#ifdef USE_COLOR_STYLE + me->text = NULL; /* Will be initialized when first needed. - kw */ + FREE(Style_className); + class_string[0] = '\0'; +#endif /* COLOR_STYLE */ + return me; } diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMLGen.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMLGen.h index ac814ad882a..b34b39d2f4a 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMLGen.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTMLGen.h @@ -8,8 +8,8 @@ #ifndef HTMLGEN_H #define HTMLGEN_H -#include "HTML.h" -#include "HTStream.h" +#include +#include /* Subclass: */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTNews.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTNews.c index 2094df68eec..5b16ee3c90d 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTNews.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTNews.c @@ -6,18 +6,18 @@ ** 29 Nov 91 Downgraded to C, for portable implementation. */ -#include "HTUtils.h" /* Coding convention macros */ -#include "tcp.h" +#include /* Coding convention macros */ + +#ifndef DISABLE_NEWS /* Implements: */ -#include "HTNews.h" - -#include "HTCJK.h" -#include "HTMIME.h" -#include "HTTCP.h" +#include -#define FREE(x) if (x) {free(x); x = NULL;} +#include +#include +#include +#include /* this define should be in HTFont.h :( */ #define HT_NON_BREAK_SPACE ((char)1) /* For now */ @@ -39,18 +39,15 @@ PUBLIC int HTNewsMaxChunk = 40; /* Largest number of articles in one window */ #define NEWS_NETCLOSE NETCLOSE #define NEXT_CHAR HTGetCharacter() -#include - -#include "HTML.h" -#include "HTParse.h" -#include "HTFormat.h" -#include "HTAlert.h" +#include +#include +#include +#include -#include "LYNews.h" -#include "LYGlobalDefs.h" -#include "LYLeaks.h" +#include +#include +#include -#define BIG 1024 /* @@@ */ struct _HTStructured { CONST HTStructuredClass * isa; @@ -89,6 +86,9 @@ PRIVATE HTParentAnchor *node_anchor; /* Its anchor */ PRIVATE int diagnostic; /* level: 0=none 2=source */ PRIVATE BOOL rawtext = NO; /* Flag: HEAD or -mime_headers */ PRIVATE HTList *NNTP_AuthInfo = NULL; /* AUTHINFO database */ +PRIVATE char *name = NULL; +PRIVATE char *address = NULL; +PRIVATE char *dbuf = NULL; /* dynamic buffer for long messages etc. */ #define PUTC(c) (*targetClass.put_character)(target, c) #define PUTS(s) (*targetClass.put_string)(target, s) @@ -108,6 +108,7 @@ typedef struct _NNTPAuth { char * pass; } NNTPAuth; +#ifdef LY_FIND_LEAKS PRIVATE void free_news_globals NOARGS { if (s >= 0) { @@ -117,7 +118,11 @@ PRIVATE void free_news_globals NOARGS FREE(HTNewsHost); FREE(NewsHost); FREE(NewsHREF); + FREE(name); + FREE(address); + FREE(dbuf); } +#endif /* LY_FIND_LEAKS */ PRIVATE void free_NNTP_AuthInfo NOARGS { @@ -189,17 +194,16 @@ PRIVATE BOOL initialize NOARGS #else if (getenv("NNTPSERVER")) { StrAllocCopy(HTNewsHost, (char *)getenv("NNTPSERVER")); - if (TRACE) fprintf(stderr, "HTNews: NNTPSERVER defined as `%s'\n", - HTNewsHost); + CTRACE(tfp, "HTNews: NNTPSERVER defined as `%s'\n", + HTNewsHost); } else { char server_name[256]; FILE* fp = fopen(SERVER_FILE, "r"); if (fp) { if (fscanf(fp, "%s", server_name)==1) { StrAllocCopy(HTNewsHost, server_name); - if (TRACE) fprintf(stderr, - "HTNews: File %s defines news host as `%s'\n", - SERVER_FILE, HTNewsHost); + CTRACE(tfp, "HTNews: File %s defines news host as `%s'\n", + SERVER_FILE, HTNewsHost); } fclose(fp); } @@ -209,7 +213,9 @@ PRIVATE BOOL initialize NOARGS #endif /* NeXTStep */ s = -1; /* Disconnected */ +#ifdef LY_FIND_LEAKS atexit(free_news_globals); +#endif return YES; } @@ -227,12 +233,12 @@ PRIVATE int response ARGS1(CONST char *,command) { int result; char * p = response_text; - char ch; + int ich; if (command) { int status; int length = strlen(command); - if (TRACE) fprintf(stderr, "NNTP command to be sent: %s", command); + CTRACE(tfp, "NNTP command to be sent: %s", command); #ifdef NOT_ASCII { CONST char * p; @@ -247,8 +253,7 @@ PRIVATE int response ARGS1(CONST char *,command) status = NEWS_NETWRITE(s, (char *)command, length); #endif /* NOT_ASCII */ if (status < 0){ - if (TRACE) fprintf(stderr, - "HTNews: Unable to send command. Disconnecting.\n"); + CTRACE(tfp, "HTNews: Unable to send command. Disconnecting.\n"); NEWS_NETCLOSE(s); s = -1; return status; @@ -256,27 +261,23 @@ PRIVATE int response ARGS1(CONST char *,command) } /* if command to be sent */ for (;;) { - if (((*p++ = NEXT_CHAR) == LF) || + ich = NEXT_CHAR; + if (((*p++ = ich) == LF) || (p == &response_text[LINE_LENGTH])) { *--p = '\0'; /* Terminate the string */ - if (TRACE) - fprintf(stderr, "NNTP Response: %s\n", response_text); + CTRACE(tfp, "NNTP Response: %s\n", response_text); sscanf(response_text, "%d", &result); return result; } /* if end of line */ - if ((ch = *(p-1)) == (char)EOF) { + if (ich == EOF) { *(p-1) = '\0'; - if (TRACE) { - if (interrupted_in_htgetcharacter) { - fprintf(stderr, - "HTNews: Interrupted on read, closing socket %d\n", + if (interrupted_in_htgetcharacter) { + CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n", s); - } else { - fprintf(stderr, - "HTNews: EOF on read, closing socket %d\n", + } else { + CTRACE(tfp, "HTNews: EOF on read, closing socket %d\n", s); - } } NEWS_NETCLOSE(s); /* End of file, close socket */ s = -1; @@ -344,7 +345,9 @@ PRIVATE NNTPAuthResult HTHandleAuthInfo ARGS1( } } else { NNTP_AuthInfo = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(free_NNTP_AuthInfo); +#endif } /* @@ -358,7 +361,7 @@ PRIVATE NNTPAuthResult HTHandleAuthInfo ARGS1( if ((msg = (char *)calloc(1, (strlen(host) + 30))) == NULL) { outofmem(__FILE__, "HTHandleAuthInfo"); } - sprintf(msg, "Username for news host '%s':", host); + sprintf(msg, gettext("Username for news host '%s':"), host); UserName = HTPrompt(msg, NULL); FREE(msg); if (!(UserName && *UserName)) { @@ -369,9 +372,9 @@ PRIVATE NNTPAuthResult HTHandleAuthInfo ARGS1( sprintf(buffer, "AUTHINFO USER %.*s%c%c", 495, UserName, CR, LF); if ((status = response(buffer)) < 0) { if (status == HT_INTERRUPTED) - _HTProgress("Connection interrupted."); + _HTProgress(CONNECTION_INTERRUPTED); else - HTAlert("Connection closed ???"); + HTAlert(FAILED_CONNECTION_CLOSED); if (auth) { if (auth->user != UserName) { FREE(auth->user); @@ -411,11 +414,11 @@ PRIVATE NNTPAuthResult HTHandleAuthInfo ARGS1( */ HTAlert(response_text); tries--; - if ((tries > 0) && HTConfirm("Change username?")) { + if ((tries > 0) && HTConfirm(gettext("Change username?"))) { if (!auth || auth->user != UserName) { FREE(UserName); } - if ((UserName = HTPrompt("Username:", UserName)) != NULL && + if ((UserName = HTPrompt(gettext("Username:"), UserName)) != NULL && *UserName) { continue; } @@ -434,7 +437,7 @@ PRIVATE NNTPAuthResult HTHandleAuthInfo ARGS1( if (status == 381) { /* - ** Handle the password. - FM + ** Handle the password. - FM */ tries = 3; while (tries) { @@ -442,7 +445,7 @@ PRIVATE NNTPAuthResult HTHandleAuthInfo ARGS1( if ((msg = (char *)calloc(1, (strlen(host) + 30))) == NULL) { outofmem(__FILE__, "HTHandleAuthInfo"); } - sprintf(msg, "Password for news host '%s':", host); + sprintf(msg, gettext("Password for news host '%s':"), host); PassWord = HTPromptPassword(msg); FREE(msg); if (!(PassWord && *PassWord)) { @@ -453,9 +456,9 @@ PRIVATE NNTPAuthResult HTHandleAuthInfo ARGS1( sprintf(buffer, "AUTHINFO PASS %.*s%c%c", 495, PassWord, CR, LF); if ((status = response(buffer)) < 0) { if (status == HT_INTERRUPTED) { - _HTProgress("Connection interrupted."); + _HTProgress(CONNECTION_INTERRUPTED); } else { - HTAlert("Connection closed ???"); + HTAlert(FAILED_CONNECTION_CLOSED); } if (auth) { if (auth->user != UserName) { @@ -525,7 +528,7 @@ PRIVATE NNTPAuthResult HTHandleAuthInfo ARGS1( PassWord = NULL; } tries--; - if ((tries > 0) && HTConfirm("Change password?")) { + if ((tries > 0) && HTConfirm(gettext("Change password?"))) { continue; } if (auth) { @@ -556,12 +559,10 @@ PRIVATE NNTPAuthResult HTHandleAuthInfo ARGS1( */ PRIVATE char * author_name ARGS1 (char *,email) { - static char *name = NULL; char *p, *e; StrAllocCopy(name, email); - if (TRACE) - fprintf(stderr,"Trying to find name in: %s\n",name); + CTRACE(tfp,"Trying to find name in: %s\n",name); if ((p = strchr(name, '(')) && (e = strchr(name, ')'))) { if (e > p) { @@ -594,12 +595,10 @@ PRIVATE char * author_name ARGS1 (char *,email) */ PRIVATE char * author_address ARGS1(char *,email) { - static char *address = NULL; char *p, *at, *e; StrAllocCopy(address, email); - if (TRACE) - fprintf(stderr,"Trying to find address in: %s\n",address); + CTRACE(tfp,"Trying to find address in: %s\n",address); if ((p = strchr(address, '<'))) { if ((e = strchr(p, '>')) && (at = strchr(p, '@'))) { @@ -770,9 +769,7 @@ PRIVATE void write_anchors ARGS1 (char *,text) */ PRIVATE void abort_socket NOARGS { - if (TRACE) - fprintf(stderr, - "HTNews: EOF on read, closing socket %d\n", s); + CTRACE(tfp, "HTNews: EOF on read, closing socket %d\n", s); NEWS_NETCLOSE(s); /* End of file, close socket */ PUTS("Network Error: connection lost"); PUTC('\n'); @@ -838,7 +835,7 @@ PRIVATE void post_article ARGS1( ** nntp headers and message body. - FM */ if ((fd = fopen((postfile ? postfile : ""), "r")) == NULL) { - HTAlert("Cannot open temporary file for news POST."); + HTAlert(FAILED_CANNOT_OPEN_POST); return; } @@ -909,12 +906,7 @@ PRIVATE void post_article ARGS1( } } fclose(fd); -#ifdef VMS - while (remove(postfile) == 0) - ; /* loop through all versions */ -#else - remove(postfile); -#endif /* VMS */ + HTSYS_remove(postfile); /* ** Send the nntp EOF and get the server's response. - FM @@ -955,7 +947,8 @@ PRIVATE void post_article ARGS1( ** s Global socket number is OK ** HT Global hypertext object is ready for appending text */ -PRIVATE int read_article NOARGS +PRIVATE int read_article ARGS1( + HTParentAnchor *, thisanchor) { char line[LINE_LENGTH+1]; char *full_line = NULL; @@ -969,6 +962,8 @@ PRIVATE int read_article NOARGS char *followupto = NULL; /* Followup list */ char *href = NULL; char *p = line; + char *cp; + CONST char *ccp; BOOL done = NO; /* @@ -979,13 +974,12 @@ PRIVATE int read_article NOARGS */ if (!diagnostic && !rawtext) { while (!done) { - char ch = *p++ = NEXT_CHAR; - if (ch == (char)EOF) { + int ich = NEXT_CHAR; + *p++ = ich; + if (ich == EOF) { if (interrupted_in_htgetcharacter) { interrupted_in_htgetcharacter = 0; - if (TRACE) - fprintf(stderr, - "HTNews: Interrupted on read, closing socket %d\n", + CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n", s); NEWS_NETCLOSE(s); s = -1; @@ -994,10 +988,9 @@ PRIVATE int read_article NOARGS abort_socket(); /* End of file, close socket */ return(HT_LOADED); /* End of file on response */ } - if ((ch == LF) || (p == &line[LINE_LENGTH])) { + if (((char)ich == LF) || (p == &line[LINE_LENGTH])) { *--p = '\0'; /* Terminate the string */ - if (TRACE) - fprintf(stderr, "H %s\n", line); + CTRACE(tfp, "H %s\n", line); if (line[0] == '\t' || line[0] == ' ') { int i = 0; @@ -1032,6 +1025,9 @@ PRIVATE int read_article NOARGS HTmmdecode(subject, subject); HTrjis(subject, subject); } + if (*subject) { + HTAnchor_setSubject(thisanchor, subject); + } } else if (match(full_line, "DATE:")) { StrAllocCopy(date, HTStrip(strchr(full_line,':')+1)); @@ -1067,6 +1063,14 @@ PRIVATE int read_article NOARGS } else if (match(full_line, "FOLLOWUP-TO:")) { StrAllocCopy(followupto, HTStrip(strchr(full_line,':')+1)); + } else if (match(full_line, "MESSAGE-ID:")) { + char * msgid = HTStrip(full_line+11); + if (msgid[0] == '<' && msgid[strlen(msgid)-1] == '>') { + msgid[strlen(msgid)-1] = '\0'; /* Chop > */ + msgid++; /* Chop < */ + HTAnchor_setMessageID(thisanchor, msgid); + } + } /* end if match */ p = line; /* Restart at beginning */ } /* if end of line */ @@ -1087,9 +1091,15 @@ PRIVATE int read_article NOARGS */ if (from || replyto) { char *temp=NULL; - StrAllocCopy(temp, replyto ? replyto : from); + StrAllocCopy(temp, author_address(replyto ? replyto : from)); StrAllocCopy(href,"mailto:"); - StrAllocCat(href, author_address(temp)); + if (strchr(temp, '%') || strchr(temp, '?')) { + cp = HTEscape(temp, URL_XPALPHAS); + StrAllocCat(href, cp); + FREE(cp); + } else { + StrAllocCat(href, temp); + } start_link(href, "made"); PUTC('\n'); FREE(temp); @@ -1120,7 +1130,7 @@ PRIVATE int read_article NOARGS if (from) PUTS(from); else - PUTS(from); + PUTS(replyto); MAYBE_END(HTML_DT); PUTC('\n'); @@ -1169,6 +1179,59 @@ PRIVATE int read_article NOARGS FREE(organization); } + /* sanitize some headers - kw */ + if (newsgroups && + ((cp = strchr(newsgroups, '/')) || + (cp = strchr(newsgroups, '(')))) { + *cp = '\0'; + } + if (newsgroups && !*newsgroups) { + FREE(newsgroups); + } + if (followupto && + ((cp = strchr(followupto, '/')) || + (cp = strchr(followupto, '(')))) { + *cp = '\0'; + } + if (followupto && !*followupto) { + FREE(followupto); + } + + if (newsgroups && HTCanPost) { + START(HTML_DT); + START(HTML_B); + PUTS("Newsgroups:"); + END(HTML_B); + PUTC('\n'); + MAYBE_END(HTML_DT); + START(HTML_DD); + write_anchors(newsgroups); + MAYBE_END(HTML_DD); + PUTC('\n'); + } + + if (followupto && !strcasecomp(followupto, "poster")) { + /* + ** "Followup-To: poster" has special meaning. + ** Don't use it to construct a newsreply link. -kw + */ + START(HTML_DT); + START(HTML_B); + PUTS("Followup to:"); + END(HTML_B); + PUTC(' '); + if (href) { + start_anchor(href); + PUTS("poster"); + END(HTML_A); + } else { + PUTS("poster"); + } + MAYBE_END(HTML_DT); + PUTC('\n'); + FREE(followupto); + } + if (newsgroups && HTCanPost) { /* ** We have permission to POST to this host, @@ -1182,17 +1245,20 @@ PRIVATE int read_article NOARGS StrAllocCat(href, NewsHost); StrAllocCat(href, "/"); StrAllocCat(href, (followupto ? followupto : newsgroups)); - - START(HTML_DT); - START(HTML_B); - PUTS("Newsgroups:"); - END(HTML_B); - PUTC('\n'); - MAYBE_END(HTML_DT); - START(HTML_DD); - write_anchors(newsgroups); - MAYBE_END(HTML_DD); - PUTC('\n'); + if (*href == 'n' && + (ccp = HTAnchor_messageID(thisanchor)) && *ccp) { + StrAllocCat(href, ";ref="); + if (strchr(ccp, '<') || strchr(ccp, '&') || + strchr(ccp, ' ') || strchr(ccp, ':') || + strchr(ccp, '/') || strchr(ccp, '%') || + strchr(ccp, ';')) { + char *cp1 = HTEscape(ccp, URL_XPALPHAS); + StrAllocCat(href, cp1); + FREE(cp1); + } else { + StrAllocCat(href, ccp); + } + } START(HTML_DT); START(HTML_B); @@ -1200,7 +1266,11 @@ PRIVATE int read_article NOARGS END(HTML_B); PUTC(' '); start_anchor(href); - PUTS("newsgroup(s)"); + if (strchr((followupto ? followupto : newsgroups), ',')) { + PUTS("newsgroups"); + } else { + PUTS("newsgroup"); + } END(HTML_A); MAYBE_END(HTML_DT); PUTC('\n'); @@ -1249,13 +1319,12 @@ PRIVATE int read_article NOARGS p = line; while (!done) { - char ch = *p++ = NEXT_CHAR; - if (ch == (char)EOF) { + int ich = NEXT_CHAR; + *p++ = ich; + if (ich == EOF) { if (interrupted_in_htgetcharacter) { interrupted_in_htgetcharacter = 0; - if (TRACE) - fprintf(stderr, - "HTNews: Interrupted on read, closing socket %d\n", + CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n", s); NEWS_NETCLOSE(s); s = -1; @@ -1264,10 +1333,9 @@ PRIVATE int read_article NOARGS abort_socket(); /* End of file, close socket */ return(HT_LOADED); /* End of file on response */ } - if ((ch == LF) || (p == &line[LINE_LENGTH])) { + if (((char)ich == LF) || (p == &line[LINE_LENGTH])) { *p++ = '\0'; /* Terminate the string */ - if (TRACE) - fprintf(stderr, "B %s", line); + CTRACE(tfp, "B %s", line); if (line[0] == '.') { /* ** End of article? @@ -1456,13 +1524,12 @@ PRIVATE int read_list ARGS1(char *, arg) START(HTML_DLC); PUTC('\n'); while (!done) { - char ch = NEXT_CHAR; - if (ch == (char)EOF) { + int ich = NEXT_CHAR; + char ch = ich; + if (ich == EOF) { if (interrupted_in_htgetcharacter) { interrupted_in_htgetcharacter = 0; - if (TRACE) - fprintf(stderr, - "HTNews: Interrupted on read, closing socket %d\n", + CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n", s); NEWS_NETCLOSE(s); s = -1; @@ -1482,9 +1549,7 @@ PRIVATE int read_list ARGS1(char *, arg) continue; } } else if (p == &line[LINE_LENGTH]) { - if (TRACE) { - fprintf(stderr, "b %.*s%c[...]\n", (LINE_LENGTH), line, ch); - } + CTRACE(tfp, "b %.*s%c[...]\n", (LINE_LENGTH), line, ch); *p = '\0'; if (ch == LF) { ; /* Will be dealt with below */ @@ -1494,9 +1559,7 @@ PRIVATE int read_list ARGS1(char *, arg) } else if (strchr(line, ' ') == NULL && strchr(line, '\t') == NULL) { /* No separator found */ - if (TRACE) - fprintf(stderr, - "HTNews..... group name too long, discarding.\n"); + CTRACE(tfp, "HTNews..... group name too long, discarding.\n"); skip_this_line = YES; /* ignore whole line */ continue; } else { @@ -1508,8 +1571,7 @@ PRIVATE int read_list ARGS1(char *, arg) if (ch == LF) { skip_rest_of_line = NO; /* done, reset flag */ *p = '\0'; /* Terminate the string */ - if (TRACE) - fprintf(stderr, "B %s", line); + CTRACE(tfp, "B %s", line); if (line[0] == '.') { /* ** End of article? @@ -1569,7 +1631,7 @@ PRIVATE int read_list ARGS1(char *, arg) } /* Loop over characters */ if (!listing) { START(HTML_DT); - sprintf(line, "No matches for: %s", arg); + sprintf(line, gettext("No matches for: %s"), arg); PUTS(line); MAYBE_END(HTML_DT); } @@ -1617,12 +1679,10 @@ PRIVATE int read_group ARGS3( PUTC('\n'); sscanf(response_text, " %d %d %d %d", &status, &count, &first, &last); - if (TRACE) - fprintf(stderr, - "Newsgroup status=%d, count=%d, (%d-%d) required:(%d-%d)\n", + CTRACE(tfp, "Newsgroup status=%d, count=%d, (%d-%d) required:(%d-%d)\n", status, count, first, last, first_required, last_required); if (last == 0) { - PUTS("\nNo articles in this group.\n"); + PUTS(gettext("\nNo articles in this group.\n")); goto add_post; } @@ -1635,21 +1695,20 @@ PRIVATE int read_group ARGS3( last_required = last; if (last_required < first_required) { - PUTS("\nNo articles in this range.\n"); + PUTS(gettext("\nNo articles in this range.\n")); goto add_post; } if (last_required-first_required+1 > HTNewsMaxChunk) { /* Trim this block */ first_required = last_required-HTNewsChunkSize+1; } - if (TRACE) - fprintf(stderr, " Chunk will be (%d-%d)\n", - first_required, last_required); + CTRACE(tfp, " Chunk will be (%d-%d)\n", + first_required, last_required); /* ** Set window title. */ - sprintf(buffer, "%s, Articles %d-%d", + sprintf(buffer, gettext("%s, Articles %d-%d"), groupName, first_required, last_required); START(HTML_H1); PUTS(buffer); @@ -1665,13 +1724,12 @@ PRIVATE int read_group ARGS3( before = first; else before = first_required-HTNewsChunkSize; - sprintf(buffer, "%s%s/%d-%d", NewsHREF, groupName, + HTSprintf0(&dbuf, "%s%s/%d-%d", NewsHREF, groupName, before, first_required-1); - if (TRACE) - fprintf(stderr, " Block before is %s\n", buffer); + CTRACE(tfp, " Block before is %s\n", dbuf); PUTC('('); - start_anchor(buffer); - PUTS("Earlier articles"); + start_anchor(dbuf); + PUTS(gettext("Earlier articles")); END(HTML_A); PUTS("...)\n"); START(HTML_P); @@ -1684,7 +1742,7 @@ PRIVATE int read_group ARGS3( #ifdef USE_XHDR if (count > FAST_THRESHOLD) { sprintf(buffer, - "\nThere are about %d articles currently available in %s, IDs as follows:\n\n", + gettext("\nThere are about %d articles currently available in %s, IDs as follows:\n\n"), count, groupName); PUTS(buffer); sprintf(buffer, "XHDR Message-ID %d-%d%c%c", first, last, CR, LF); @@ -1692,13 +1750,12 @@ PRIVATE int read_group ARGS3( if (status == 221) { p = line; while (!done) { - char ch = *p++ = NEXT_CHAR; - if (ch == (char)EOF) { + int ich = NEXT_CHAR; + *p++ = ich; + if (ich == EOF) { if (interrupted_in_htgetcharacter) { interrupted_in_htgetcharacter = 0; - if (TRACE) - fprintf(stderr, - "HTNews: Interrupted on read, closing socket %d\n", + CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n", s); NEWS_NETCLOSE(s); s = -1; @@ -1707,10 +1764,9 @@ PRIVATE int read_group ARGS3( abort_socket(); /* End of file, close socket */ return(HT_LOADED); /* End of file on response */ } - if ((ch == '\n') || (p == &line[LINE_LENGTH])) { + if (((char)ich == '\n') || (p == &line[LINE_LENGTH])) { *p = '\0'; /* Terminate the string */ - if (TRACE) - fprintf(stderr, "X %s", line); + CTRACE(tfp, "X %s", line); if (line[0] == '.') { /* ** End of article? @@ -1745,7 +1801,7 @@ PRIVATE int read_group ARGS3( if (!done) { START(HTML_B); if (first == first_required && last == last_required) - PUTS("All available articles in "); + PUTS(gettext("All available articles in ")); else PUTS("Articles in "); PUTS(groupName); @@ -1798,13 +1854,12 @@ PRIVATE int read_group ARGS3( p = line; /* Write pointer */ done = NO; while( !done ) { - char ch = *p++ = NEXT_CHAR; - if (ch == (char)EOF) { + int ich = NEXT_CHAR; + *p++ = ich; + if (ich == EOF) { if (interrupted_in_htgetcharacter) { interrupted_in_htgetcharacter = 0; - if (TRACE) - fprintf(stderr, - "HTNews: Interrupted on read, closing socket %d\n", + CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n", s); NEWS_NETCLOSE(s); s = -1; @@ -1813,13 +1868,12 @@ PRIVATE int read_group ARGS3( abort_socket(); /* End of file, close socket */ return(HT_LOADED); /* End of file on response */ } - if ((ch == LF) || + if (((char)ich == LF) || (p == &line[LINE_LENGTH])) { *--p = '\0'; /* Terminate & chop LF*/ p = line; /* Restart at beginning */ - if (TRACE) - fprintf(stderr, "G %s\n", line); + CTRACE(tfp, "G %s\n", line); switch(line[0]) { case '.': @@ -1913,9 +1967,7 @@ PRIVATE int read_group ARGS3( */ } else if (status == HT_INTERRUPTED) { interrupted_in_htgetcharacter = 0; - if (TRACE) - fprintf(stderr, - "HTNews: Interrupted on read, closing socket %d\n", + CTRACE(tfp, "HTNews: Interrupted on read, closing socket %d\n", s); NEWS_NETCLOSE(s); s = -1; @@ -1953,15 +2005,14 @@ PRIVATE int read_group ARGS3( int after; /* End of article after */ after = last_required+HTNewsChunkSize; if (after == last) - sprintf(buffer, "%s%s", NewsHREF, groupName); /* original group */ + HTSprintf0(&dbuf, "%s%s", NewsHREF, groupName); /* original group */ else - sprintf(buffer, "%s%s/%d-%d", NewsHREF, groupName, + HTSprintf0(&dbuf, "%s%s/%d-%d", NewsHREF, groupName, last_required+1, after); - if (TRACE) - fprintf(stderr, " Block after is %s\n", buffer); + CTRACE(tfp, " Block after is %s\n", dbuf); PUTC('('); - start_anchor(buffer); - PUTS("Later articles"); + start_anchor(dbuf); + PUTS(gettext("Later articles")); END(HTML_A); PUTS("...)\n"); } @@ -1985,7 +2036,7 @@ add_post: StrAllocCat(href, "/"); StrAllocCat(href,groupName); start_anchor(href); - PUTS("Post to "); + PUTS(gettext("Post to ")); PUTS(groupName); END(HTML_A); FREE(href); @@ -2029,7 +2080,7 @@ PRIVATE int HTLoadNews ARGS4( format_out == HTAtom_for("www/dump")); rawtext = NO; - if (TRACE) fprintf(stderr, "HTNews: Looking for %s\n", arg); + CTRACE(tfp, "HTNews: Looking for %s\n", arg); if (!initialized) initialized = initialize(); @@ -2072,8 +2123,7 @@ PRIVATE int HTLoadNews ARGS4( if (!strncasecomp(arg, "snewspost:", 10) || !strncasecomp(arg, "snewsreply:", 11)) { - HTAlert( - "This client does not contain support for posting to news with SSL."); + HTAlert(FAILED_CANNOT_POST_SSL); return HT_NOT_LOADED; } if (post_wanted || reply_wanted || spost_wanted || sreply_wanted) { @@ -2086,7 +2136,7 @@ PRIVATE int HTLoadNews ARGS4( p1++; } if (!(p1 && *p1)) { - HTAlert("Invalid URL!"); + HTAlert(WWW_ILLEGAL_URL_MESSAGE); return(HT_NO_DATA); } if (!(cp = HTParse(arg, "", PARSE_HOST)) || *cp == '\0') { @@ -2125,7 +2175,7 @@ PRIVATE int HTLoadNews ARGS4( /* p1 = HTParse(arg, "", PARSE_PATH | PARSE_PUNCTUATION); */ /* ** Don't use HTParse because news: access doesn't follow traditional - ** rules. For instance, if the article reference contains a '#', + ** rules. For instance, if the article reference contains a '#', ** the rest of it is lost -- JFG 10/7/92, from a bug report */ } else if (!strncasecomp (arg, "nntp:", 5)) { @@ -2163,7 +2213,7 @@ PRIVATE int HTLoadNews ARGS4( StrAllocCopy(NewsHREF, command); } else if (!strncasecomp(arg, "snews:", 6)) { - HTAlert("This client does not contain support for SNEWS URLs."); + HTAlert(gettext("This client does not contain support for SNEWS URLs.")); return HT_NOT_LOADED; } else if (!strncasecomp (arg, "news:/", 6)) { @@ -2230,9 +2280,7 @@ PRIVATE int HTLoadNews ARGS4( command[258] = '\0'; FREE(cp); sprintf(proxycmd, "GET %.251s%c%c%c%c", command, CR, LF, CR, LF); - if (TRACE) - fprintf(stderr, - "HTNews: Proxy command is '%.*s'\n", + CTRACE(tfp, "HTNews: Proxy command is '%.*s'\n", (int)(strlen(proxycmd) - 4), proxycmd); strcat(command, "/"); StrAllocCopy(ProxyHREF, NewsHREF); @@ -2346,7 +2394,7 @@ PRIVATE int HTLoadNews ARGS4( FREE(ProxyHost); FREE(ProxyHREF); FREE(ListArg); - HTAlert("No target for raw text!"); + HTAlert(gettext("No target for raw text!")); return(HT_NOT_LOADED); } /* Copy routine entry points */ rawtargetClass = *rawtarget->isa; @@ -2374,20 +2422,17 @@ PRIVATE int HTLoadNews ARGS4( } else { sprintf (url, "%.259s", NewsHREF); } - if (TRACE) - fprintf (stderr, "News: doing HTDoConnect on '%s'\n", url); + CTRACE (tfp, "News: doing HTDoConnect on '%s'\n", url); - _HTProgress("Connecting to NewsHost ..."); + _HTProgress(gettext("Connecting to NewsHost ...")); status = HTDoConnect (url, "NNTP", NEWS_PORT, &s); if (status == HT_INTERRUPTED) { /* ** Interrupt cleanly. */ - if (TRACE) - fprintf(stderr, - "HTNews: Interrupted on connect; recovering cleanly.\n"); - _HTProgress("Connection interrupted."); + CTRACE(tfp, "HTNews: Interrupted on connect; recovering cleanly.\n"); + _HTProgress(CONNECTION_INTERRUPTED); if (!(post_wanted || reply_wanted || spost_wanted || sreply_wanted)) { ABORT_TARGET; @@ -2398,59 +2443,46 @@ PRIVATE int HTLoadNews ARGS4( FREE(ProxyHREF); FREE(ListArg); if (postfile) { -#ifdef VMS - while (remove(postfile) == 0) - ; /* loop through all versions */ -#else - remove(postfile); -#endif /* VMS */ + HTSYS_remove(postfile); FREE(postfile); } return HT_NOT_LOADED; } if (status < 0) { - char message[256]; NEWS_NETCLOSE(s); s = -1; - if (TRACE) - fprintf(stderr, - "HTNews: Unable to connect to news host.\n"); + CTRACE(tfp, "HTNews: Unable to connect to news host.\n"); if (retries < 1) continue; - sprintf(message, "Could not access %s.", NewsHost); + if (!(post_wanted || reply_wanted || + spost_wanted || sreply_wanted)) { + ABORT_TARGET; + } + HTSprintf0(&dbuf, gettext("Could not access %s."), NewsHost); FREE(NewsHost); FREE(NewsHREF); FREE(ProxyHost); FREE(ProxyHREF); FREE(ListArg); if (postfile) { -#ifdef VMS - while (remove(postfile) == 0) - ; /* loop through all versions */ -#else - remove(postfile); -#endif /* VMS */ + HTSYS_remove(postfile); FREE(postfile); } - return HTLoadError(stream, 500, message); + return HTLoadError(stream, 500, dbuf); } else { - if (TRACE) - fprintf(stderr, "HTNews: Connected to news host %s.\n", - NewsHost); + CTRACE(tfp, "HTNews: Connected to news host %s.\n", + NewsHost); HTInitInput(s); /* set up buffering */ if (proxycmd[0]) { status = NEWS_NETWRITE(s, proxycmd, strlen(proxycmd)); - if (TRACE) - fprintf(stderr, - "HTNews: Proxy command returned status '%d'.\n", + CTRACE(tfp, "HTNews: Proxy command returned status '%d'.\n", status); } if (((status = response(NULL)) / 100) != 2) { - char message[BIG]; NEWS_NETCLOSE(s); s = -1; if (status == HT_INTERRUPTED) { - _HTProgress("Connection interrupted."); + _HTProgress(CONNECTION_INTERRUPTED); if (!(post_wanted || reply_wanted || spost_wanted || sreply_wanted)) { ABORT_TARGET; @@ -2461,22 +2493,21 @@ PRIVATE int HTLoadNews ARGS4( FREE(ProxyHREF); FREE(ListArg); if (postfile) { -#ifdef VMS - while (remove(postfile) == 0) - ; /* loop through all versions */ -#else - remove(postfile); -#endif /* VMS */ + HTSYS_remove(postfile); FREE(postfile); } return(HT_NOT_LOADED); } if (retries < 1) continue; - sprintf(message, - "Can't read news info. News host %.20s responded: %.200s", + if (!(post_wanted || reply_wanted || + spost_wanted || sreply_wanted)) { + ABORT_TARGET; + } + HTSprintf0(&dbuf, + gettext("Can't read news info. News host %.20s responded: %.200s"), NewsHost, response_text); - return HTLoadError(stream, 500, message); + return HTLoadError(stream, 500, dbuf); } if (status == 200) { HTCanPost = TRUE; @@ -2484,7 +2515,7 @@ PRIVATE int HTLoadNews ARGS4( HTCanPost = FALSE; if (post_wanted || reply_wanted || spost_wanted || sreply_wanted) { - HTAlert("Cannot POST to this host."); + HTAlert(CANNOT_POST); FREE(NewsHREF); if (ProxyHREF) { StrAllocCopy(NewsHost, ProxyHost); @@ -2493,12 +2524,7 @@ PRIVATE int HTLoadNews ARGS4( } FREE(ListArg); if (postfile) { -#ifdef VMS - while (remove(postfile) == 0) - ; /* loop through all versions */ -#else - remove(postfile); -#endif /* VMS */ + HTSYS_remove(postfile); FREE(postfile); } return(HT_NOT_LOADED); @@ -2510,7 +2536,7 @@ PRIVATE int HTLoadNews ARGS4( if (post_wanted || reply_wanted || spost_wanted || sreply_wanted) { if (!HTCanPost) { - HTAlert("Cannot POST to this host."); + HTAlert(CANNOT_POST); FREE(NewsHREF); if (ProxyHREF) { StrAllocCopy(NewsHost, ProxyHost); @@ -2519,12 +2545,7 @@ PRIVATE int HTLoadNews ARGS4( } FREE(ListArg); if (postfile) { -#ifdef VMS - while (remove(postfile) == 0) - ; /* loop through all versions */ -#else - remove(postfile); -#endif /* VMS */ + HTSYS_remove(postfile); FREE(postfile); } return(HT_NOT_LOADED); @@ -2533,7 +2554,7 @@ PRIVATE int HTLoadNews ARGS4( postfile = LYNewsPost(ListArg, (reply_wanted || sreply_wanted)); } if (postfile == NULL) { - HTProgress("Cancelled!"); + HTProgress(CANCELLED); FREE(NewsHREF); if (ProxyHREF) { StrAllocCopy(NewsHost, ProxyHost); @@ -2555,7 +2576,7 @@ PRIVATE int HTLoadNews ARGS4( sprintf(buffer, "mode reader%c%c", CR, LF); if ((status = response(buffer)) == HT_INTERRUPTED) { - _HTProgress("Connection interrupted."); + _HTProgress(CONNECTION_INTERRUPTED); break; } if (status == 480) { @@ -2570,7 +2591,7 @@ PRIVATE int HTLoadNews ARGS4( break; } if ((status = response(buffer)) == HT_INTERRUPTED) { - _HTProgress("Connection interrupted."); + _HTProgress(CONNECTION_INTERRUPTED); break; } } @@ -2578,7 +2599,7 @@ PRIVATE int HTLoadNews ARGS4( Send_NNTP_command: if ((status = response(command)) == HT_INTERRUPTED) { - _HTProgress("Connection interrupted."); + _HTProgress(CONNECTION_INTERRUPTED); break; } if (status < 0) { @@ -2667,14 +2688,9 @@ Send_NNTP_command: ** Handle posting of an article. - FM */ if (status != 340) { - HTAlert("Cannot POST to this host."); + HTAlert(CANNOT_POST); if (postfile) { -#ifdef VMS - while (remove(postfile) == 0) - ; /* loop through all versions */ -#else - remove(postfile); -#endif /* VMS */ + HTSYS_remove(postfile); } } else { post_article(postfile); @@ -2685,7 +2701,7 @@ Send_NNTP_command: /* ** List available newsgroups. - FM */ - _HTProgress("Reading list of available newsgroups."); + _HTProgress(gettext("Reading list of available newsgroups.")); status = read_list(ListArg); } else if (group_wanted) { /* @@ -2707,17 +2723,17 @@ Send_NNTP_command: retries = 2; goto Send_NNTP_command; } - _HTProgress("Reading list of articles in newsgroup."); + _HTProgress(gettext("Reading list of articles in newsgroup.")); status = read_group(groupName, first, last); } else { /* ** Get an article from a news group. - FM */ - _HTProgress("Reading news article."); - status = read_article(); + _HTProgress(gettext("Reading news article.")); + status = read_article(anAnchor); } if (status == HT_INTERRUPTED) { - _HTProgress("Connection interrupted."); + _HTProgress(CONNECTION_INTERRUPTED); status = HT_LOADED; } if (!(post_wanted || reply_wanted || @@ -2736,18 +2752,13 @@ Send_NNTP_command: } FREE(ListArg); if (postfile) { -#ifdef VMS - while (remove(postfile) == 0) - ; /* loop through all versions */ -#else - remove(postfile); -#endif /* VMS */ + HTSYS_remove(postfile); FREE(postfile); } return status; } /* Retry loop */ - /* HTAlert("Sorry, could not load requested news."); */ + /* HTAlert(gettext("Sorry, could not load requested news.")); */ /* NXRunAlertPanel(NULL, "Sorry, could not load `%s'.", NULL,NULL,NULL, arg);No -- message earlier wil have covered it */ @@ -2764,12 +2775,7 @@ Send_NNTP_command: } FREE(ListArg); if (postfile) { -#ifdef VMS - while (remove(postfile) == 0) - ; /* loop through all versions */ -#else - remove(postfile); -#endif /* VMS */ + HTSYS_remove(postfile); FREE(postfile); } return HT_NOT_LOADED; @@ -2822,3 +2828,5 @@ GLOBALDEF PUBLIC HTProtocol HTSNews = { "snews", HTLoadNews, NULL }; GLOBALDEF PUBLIC HTProtocol HTSNewsPost = { "snewspost", HTLoadNews, NULL }; GLOBALDEF PUBLIC HTProtocol HTSNewsReply = { "snewsreply", HTLoadNews, NULL }; #endif /* GLOBALDEF_IS_MACRO */ + +#endif /* not DISABLE_NEWS */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTNews.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTNews.h index bc25fc87a1b..2e017fce7af 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTNews.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTNews.h @@ -10,8 +10,8 @@ #ifndef HTNEWS_H #define HTNEWS_H -#include "HTAccess.h" -#include "HTAnchor.h" +#include +#include #ifdef GLOBALREF_IS_MACRO extern GLOBALREF(HTProtocol, HTNews); diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTParse.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTParse.c index 655801fa9e3..9e75b8db7c3 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTParse.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTParse.c @@ -2,13 +2,10 @@ ** ================================ */ -#include "HTUtils.h" -#include "tcp.h" -#include "HTParse.h" +#include +#include -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} +#include #define HEX_ESCAPE '%' @@ -190,10 +187,15 @@ PUBLIC char * HTParse ARGS3( char * acc_method; struct struct_parts given, related; - if (TRACE) - fprintf(stderr, - "HTParse: aName:%s relatedName:%s\n", aName, relatedName); + CTRACE(tfp, "HTParse: aName:%s relatedName:%s\n", aName, relatedName); + if (wanted & (PARSE_STRICTPATH | PARSE_QUERY)) { /* if detail wanted... */ + if ((wanted & (PARSE_STRICTPATH | PARSE_QUERY)) + == (PARSE_STRICTPATH | PARSE_QUERY)) /* if strictpath AND query */ + wanted |= PARSE_PATH; /* then treat as if PARSE_PATH wanted */ + if (wanted & PARSE_PATH) /* if PARSE_PATH wanted */ + wanted &= ~(PARSE_STRICTPATH | PARSE_QUERY); /* ignore details */ + } /* ** Allocate the output string. */ @@ -250,7 +252,7 @@ PUBLIC char * HTParse ARGS3( ** this is back to inheriting for identical ** schemes whether or not they are "file". ** If you want to try it again yourself, - ** uncomment the strncasecomp() below. - FM + ** uncomment the strcasecomp() below. - FM */ if ((given.access && related.access) && (/* strcasecomp(given.access, "file") || */ @@ -346,7 +348,11 @@ PUBLIC char * HTParse ARGS3( /* ** Handle the path. */ - if (wanted & PARSE_PATH) { + if (wanted & (PARSE_PATH | PARSE_STRICTPATH | PARSE_QUERY)) { + char *tail = NULL; + int want_detail = (wanted & (PARSE_STRICTPATH | PARSE_QUERY)); + if (want_detail) + tail = result + strlen(result); if (acc_method && !given.absolute && given.relative) { if (!strcasecomp(acc_method, "nntp") || !strcasecomp(acc_method, "snews") || @@ -365,8 +371,7 @@ PUBLIC char * HTParse ARGS3( if (wanted & PARSE_PUNCTUATION) strcat(result, "/"); strcat(result, given.absolute); - if (TRACE) - fprintf(stderr, "1\n"); + CTRACE(tfp, "1\n"); } else if (related.absolute) { /* Adopt path not name */ strcat(result, "/"); strcat(result, related.absolute); @@ -380,16 +385,13 @@ PUBLIC char * HTParse ARGS3( strcat(result, given.relative); /* Add given one */ HTSimplify (result); } - if (TRACE) - fprintf(stderr, "2\n"); + CTRACE(tfp, "2\n"); } else if (given.relative) { strcat(result, given.relative); /* what we've got */ - if (TRACE) - fprintf(stderr, "3\n"); + CTRACE(tfp, "3\n"); } else if (related.relative) { strcat(result, related.relative); - if (TRACE) - fprintf(stderr, "4\n"); + CTRACE(tfp, "4\n"); } else { /* No inheritance */ if (strncasecomp(aName, "lynxcgi:", 8) && strncasecomp(aName, "lynxexec:", 9) && @@ -398,8 +400,24 @@ PUBLIC char * HTParse ARGS3( } if (!strcmp(result, "news:/")) result[5] = '*'; - if (TRACE) - fprintf(stderr, "5\n"); + CTRACE(tfp, "5\n"); + } + if (want_detail) { + p = strchr(tail, '?'); /* Search part? */ + if (p) { + if (PARSE_STRICTPATH) { + *p = '\0'; + } else { + if (!(wanted & PARSE_PUNCTUATION)) + p++; + do { + *tail++ = *p; + } while (*p++); + } + } else { + if (wanted & PARSE_QUERY) + *tail = '\0'; + } } } @@ -414,8 +432,7 @@ PUBLIC char * HTParse ARGS3( strcat(result, (given.anchor) ? given.anchor : related.anchor); } - if (TRACE) - fprintf(stderr, "HTParse: result:%s\n", result); + CTRACE(tfp, "HTParse: result:%s\n", result); FREE(rel); FREE(name); @@ -588,7 +605,7 @@ PUBLIC void HTSimplify ARGS1( ** ------------------- ** ** This function creates and returns a string which gives an expression of -** one address as related to another. Where there is no relation, an absolute +** one address as related to another. Where there is no relation, an absolute ** address is retured. ** ** On entry, @@ -647,8 +664,7 @@ PUBLIC char * HTRelative ARGS2( strcat(result, "../"); strcat(result, last_slash+1); } - if (TRACE) - fprintf(stderr, "HT: `%s' expressed relative to\n `%s' is\n `%s'.", + CTRACE(tfp, "HT: `%s' expressed relative to\n `%s' is\n `%s'.", aName, relatedName, result); return result; } @@ -785,7 +801,11 @@ PUBLIC char * HTUnEscape ARGS1( if (*p) *q = from_hex(*p++) * 16; if (*p) - *q = FROMASCII(*q + from_hex(*p++)); + /* + ** Careful! FROMASCII() may evaluate its arg more than once! + */ /* S/390 -- gil -- 0221 */ + *q = *q + from_hex(*p++) ; + *q = FROMASCII(*q ); q++; } else { *q++ = *p++; @@ -823,9 +843,9 @@ PUBLIC char * HTUnEscapeSome ARGS2( p[1] && p[2] && /* tests shouldn't be needed, but.. */ isxdigit((unsigned char)p[1]) && isxdigit((unsigned char)p[2]) && - (testcode = from_hex(p[1])*16 + from_hex(p[2])) && /* %00 no good*/ + (testcode = FROMASCII(from_hex(p[1])*16 + from_hex(p[2]))) && /* %00 no good*/ strchr(do_trans, testcode)) { /* it's one of the ones we want */ - *q++ = FROMASCII(testcode); + *q++ = testcode; p += 3; } else { *q++ = *p++; @@ -866,7 +886,7 @@ PUBLIC void HTMake822Word ARGS1( return; } for (p = *str; *p; p++) { - a = *p; + a = TOASCII(*p); /* S/390 -- gil -- 0240 */ if (a < 32 || a >= 128 || ((crfc[a-32]) & 1)) { if (!added) @@ -885,13 +905,19 @@ PUBLIC void HTMake822Word ARGS1( if (result == NULL) outofmem(__FILE__, "HTMake822Word"); result[0] = '"'; + /* + ** Having converted the character to ASCII, we can't use symbolic + ** escape codes, since they're in the host character set, which + ** is not necessarily ASCII. Thus we use octal escape codes instead. + ** -- gil (Paul Gilmartin) + */ /* S/390 -- gil -- 0268 */ for (q = result + 1, p = *str; *p; p++) { a = TOASCII(*p); - if ((a != '\t') && ((a & 127) < 32 || + if ((a != '\011') && ((a & 127) < 32 || ( a < 128 && ((crfc[a-32]) & 2)))) - *q++ = '\\'; + *q++ = '\033'; *q++ = *p; - if (a == '\n' || (a == '\r' && (TOASCII(*(p+1)) != '\n'))) + if (a == '\012' || (a == '\015' && (TOASCII(*(p+1)) != '\012'))) *q++ = ' '; } *q++ = '"'; diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTParse.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTParse.h index 2f77f0796cf..2f3c522cb85 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTParse.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTParse.h @@ -9,8 +9,8 @@ #define HTPARSE_H #ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ +#include +#endif /* ** The following are flag bits which may be ORed together to form @@ -22,9 +22,18 @@ #define PARSE_ANCHOR 2 #define PARSE_PUNCTUATION 1 #define PARSE_ALL 31 +/* +** Additional flag bits for more details on components already +** covered by the above. The PARSE_PATH above doesn't really +** strictly refer to the path component in the sense of the URI +** specs only, but rather to that combined with a possible query +** component. - kw +*/ +#define PARSE_STRICTPATH 32 +#define PARSE_QUERY 64 /* -** The following are valid mask values. The terms are the BNF names +** The following are valid mask values. The terms are the BNF names ** in the URL document. */ #define URL_XALPHAS (unsigned char) 1 @@ -83,7 +92,7 @@ extern void HTSimplify PARAMS(( ** ------------------- ** ** This function creates and returns a string which gives an expression of -** one address as related to another. Where there is no relation, an absolute +** one address as related to another. Where there is no relation, an absolute ** address is retured. ** ** On entry, diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTPasswd.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTPasswd.c deleted file mode 100644 index ada39ee5005..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTPasswd.c +++ /dev/null @@ -1,301 +0,0 @@ - -/* MODULE HTPasswd.c -** PASSWORD FILE ROUTINES -** -** AUTHORS: -** AL Ari Luotonen luotonen@dxcern.cern.ch -** MD Mark Donszelmann duns@vxdeop.cern.ch -** -** HISTORY: -** 7 Nov 93 MD free for crypt taken out (static data returned) -** -** -** BUGS: -** -** -*/ - - -#include "HTUtils.h" -#include "tcp.h" /* FROMASCII() */ -#include -#include "HTAAUtil.h" /* Common parts of AA */ -#include "HTAAFile.h" /* File routines */ -#include "HTAAServ.h" /* Server routines */ -#include "HTPasswd.h" /* Implemented here */ - -#include "LYLeaks.h" - -extern char *crypt(); - - -PRIVATE char salt_chars [65] = - "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"; - - -/* PRIVATE next_rec() -** GO TO THE BEGINNING OF THE NEXT RECORD -** Otherwise like HTAAFile_nextRec() but -** does not handle continuation lines -** (because password file has none). -** ON ENTRY: -** fp is the password file from which records are read from. -** -** ON EXIT: -** returns nothing. File read pointer is located at the beginning -** of the next record. -*/ -PRIVATE void next_rec ARGS1(FILE *, fp) -{ - int ch = getc(fp); - - while (ch != EOF && ch != CR && ch != LF) - ch = getc(fp); /* Skip until end-of-line */ - - while (ch != EOF && - (ch == CR || ch == LF)) /*Skip carriage returns and linefeeds*/ - ch = getc(fp); - - if (ch != EOF) - ungetc(ch, fp); -} - - -/* PUBLIC HTAA_encryptPasswd() -** ENCRYPT PASSWORD TO THE FORM THAT IT IS SAVED -** IN THE PASSWORD FILE. -** ON ENTRY: -** password is a string of arbitrary lenght. -** -** ON EXIT: -** returns password in one-way encrypted form. -** -** NOTE: -** Uses currently the C library function crypt(), which -** only accepts at most 8 characters long strings and produces -** always 13 characters long strings. This function is -** called repeatedly so that longer strings can be encrypted. -** This is of course not as safe as encrypting the entire -** string at once, but then again, we are not that paranoid -** about the security inside the machine. -** -*/ -PUBLIC char *HTAA_encryptPasswd ARGS1(CONST char *, password) -{ - char salt[3]; - char chunk[9]; - char *result; - char *tmp; - CONST char *cur = password; - int len = strlen(password); - int randum = (int)theTime; /* This is random enough */ - - if (!(result = (char*)malloc(13*((strlen(password)+7)/8) + 1))) - outofmem(__FILE__, "HTAA_encryptPasswd"); - - *result = (char)0; - while (len > 0) { - salt[0] = salt_chars[randum%64]; - salt[1] = salt_chars[(randum/64)%64]; - salt[2] = (char)0; - - strncpy(chunk, cur, 8); - chunk[8] = (char)0; - - tmp = crypt((char*)password, salt); /*crypt() doesn't change its args*/ - strcat(result, tmp); - - cur += 8; - len -= 8; - } /* while */ - - return result; -} - - - -/* PUBLIC HTAA_passwdMatch() -** VERIFY THE CORRECTNESS OF A GIVEN PASSWORD -** AGAINST A ONE-WAY ENCRYPTED FORM OF PASSWORD. -** ON ENTRY: -** password is cleartext password. -** encrypted is one-way encrypted password, as returned -** by function HTAA_encryptPasswd(). -** This is typically read from the password -** file. -** -** ON EXIT: -** returns YES, if password matches the encrypted one. -** NO, if not, or if either parameter is NULL. -** FIX: -** Only the length of original encrypted password is -** checked -- longer given passwords are accepted if -** common length is correct (but not shorter). -** This is to allow interoperation of servers and clients -** who have a hard-coded limit of 8 to password. -*/ -PUBLIC BOOL HTAA_passwdMatch ARGS2(CONST char *, password, - CONST char *, encrypted) -{ - char *result; - int len; - int status; - - if (!password || !encrypted) - return NO; - - len = 13*((strlen(password)+7)/8); - if (len < strlen(encrypted)) - return NO; - - if (!(result = (char*)malloc(len + 1))) - outofmem(__FILE__, "HTAA_encryptPasswd"); - - *result = (char)0; - while (len > 0) { - char salt[3]; - char chunk[9]; - CONST char *cur1 = password; - CONST char *cur2 = encrypted; - char *tmp; - - salt[0] = *cur2; - salt[1] = *(cur2+1); - salt[2] = (char)0; - - strncpy(chunk, cur1, 8); - chunk[8] = (char)0; - - tmp = crypt((char*)password, salt); - strcat(result, tmp); - - cur1 += 8; - cur2 += 13; - len -= 13; - } /* while */ - - status = strncmp(result, encrypted, strlen(encrypted)); - - if (TRACE) - fprintf(stderr, - "%s `%s' (encrypted: `%s') with: `%s' => %s\n", - "HTAA_passwdMatch: Matching password:", - password, result, encrypted, - (status==0 ? "OK" : "INCORRECT")); - - FREE(result); - - if (status==0) - return YES; - else - return NO; -} - - -/* PUBLIC HTAAFile_readPasswdRec() -** READ A RECORD FROM THE PASSWORD FILE -** ON ENTRY: -** fp open password file -** out_username buffer to put the read username, must be at -** least MAX_USERNAME_LEN+1 characters long. -** out_passwd buffer to put the read password, must be at -** least MAX_PASSWORD_LEN+1 characters long. -** ON EXIT: -** returns EOF on end of file, -** otherwise the number of read fields -** (i.e. in a correct case returns 2). -** out_username contains the null-terminated read username. -** out_password contains the null-terminated read password. -** -** FORMAT OF PASSWORD FILE: -** username:password:maybe real name or other stuff -** (may include even colons) -** -** There may be whitespace (blanks or tabs) in the beginning and -** the end of each field. They are ignored. -*/ -PUBLIC int HTAAFile_readPasswdRec ARGS3(FILE *, fp, - char *, out_username, - char *, out_password) -{ - int terminator; - - terminator = HTAAFile_readField(fp, out_username, MAX_USERNAME_LEN); - - if (terminator == EOF) { /* End of file */ - return EOF; - } - else if (terminator == CR || terminator == LF) { /* End of line */ - next_rec(fp); - return 1; - } - else { - HTAAFile_readField(fp, out_password, MAX_PASSWORD_LEN); - next_rec(fp); - return 2; - } -} - - - -/* PUBLIC HTAA_checkPassword() -** CHECK A USERNAME-PASSWORD PAIR -** ON ENTRY: -** username is a null-terminated string containing -** the client's username. -** password is a null-terminated string containing -** the client's corresponding password. -** filename is a null-terminated absolute filename -** for password file. -** If NULL or empty, the value of -** PASSWD_FILE is used. -** ON EXIT: -** returns YES, if the username-password pair was correct. -** NO, otherwise; also, if open fails. -*/ -PUBLIC BOOL HTAA_checkPassword ARGS3(CONST char *, username, - CONST char *, password, - CONST char *, filename) -{ - FILE *fp = NULL; - char user[MAX_USERNAME_LEN+1]; - char pw[MAX_PASSWORD_LEN+1]; - int status; - - if (filename && *filename) fp = fopen(filename,"r"); - else fp = fopen(PASSWD_FILE,"r"); - - if (!fp) { - if (TRACE) fprintf(stderr, "%s `%s'\n", - "HTAA_checkPassword: Unable to open password file", - (filename && *filename ? filename : PASSWD_FILE)); - return NO; - } - do { - if (2 == (status = HTAAFile_readPasswdRec(fp,user,pw))) { - if (TRACE) - fprintf(stderr, - "HTAAFile_validateUser: %s \"%s\" %s \"%s:%s\"\n", - "Matching username:", username, - "against passwd record:", user, pw); - if (username && user && !strcmp(username,user)) { - /* User's record found */ - if (*pw != '\0') { /* So password is required for this user */ - if (!password || - !HTAA_passwdMatch(password,pw)) /* Check the password */ - status = EOF; /* If wrong, indicate it with EOF */ - } - break; /* exit loop */ - } /* if username found */ - } /* if record is ok */ - } while (status != EOF); - - fclose(fp); - - if (TRACE) fprintf(stderr, "HTAAFile_checkPassword: (%s,%s) %scorrect\n", - username, password, ((status != EOF) ? "" : "in")); - - if (status == EOF) return NO; /* We traversed to the end without luck */ - else return YES; /* The user was found */ -} - diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTPasswd.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTPasswd.h deleted file mode 100644 index 0c3b3eb680f..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTPasswd.h +++ /dev/null @@ -1,129 +0,0 @@ -/* PASSWORD FILE ROUTINES - - */ - -#ifndef HTPASSWD_H -#define HTPASSWD_H - -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ -#include "HTList.h" - -#ifdef SHORT_NAMES -#define HTAAenPw HTAA_encryptPasswd -#define HTAApwMa HTAA_passwdMatch -#define HTAAFrPR HTAAFile_readPasswdRec -#define HTAAchPw HTAA_checkPasswd -#endif /* SHORT_NAMES */ - -/* - -User Authentication - - HTAA_checkPassword(username,password,passwdfile)opens the password file, and checks if - the username-password pair is correct. Return value is YES, if and only if they are - correct. Otherwise, and also if the open fails, returns NO. - - If the given password file name is NULL or an empty string, the default password file - name is used (macro PASSWD_FILE). - - */ - -/* PUBLIC HTAA_checkPassword() -** VALIDATE A USERNAME-PASSWORD PAIR -** ON ENTRY: -** username is a null-terminated string containing -** the client's username. -** password is a null-terminated string containing -** the client's corresponding password. -** filename is a null-terminated absolute filename -** for password file. -** If NULL or empty, the value of -** PASSWD_FILE is used. -** ON EXIT: -** returns YES, if the username-password pair was correct. -** NO, otherwise; also, if open fails. -*/ -PUBLIC BOOL HTAA_checkPassword PARAMS((CONST char * username, - CONST char * password, - CONST char * filename)); -/* - -Password File Maintenance Routines - - */ - -/* PUBLIC HTAA_encryptPasswd() -** ENCRYPT PASSWORD TO THE FORM THAT IT IS SAVED -** IN THE PASSWORD FILE. -** ON ENTRY: -** password is a string of arbitrary lenght. -** -** ON EXIT: -** returns password in one-way encrypted form. -** -** NOTE: -** Uses currently the C library function crypt(), which -** only accepts at most 8 characters long strings and produces -** always 13 characters long strings. This function is -** called repeatedly so that longer strings can be encrypted. -** This is of course not as safe as encrypting the entire -** string at once, but then again, we are not that paranoid -** about the security inside the machine. -** -*/ -PUBLIC char *HTAA_encryptPasswd PARAMS((CONST char * password)); - - -/* PUBLIC HTAA_passwdMatch() -** VERIFY THE CORRECTNESS OF A GIVEN PASSWORD -** AGAINST A ONE-WAY ENCRYPTED FORM OF PASSWORD. -** ON ENTRY: -** password is cleartext password. -** encrypted is one-way encrypted password, as returned -** by function HTAA_encryptPasswd(). -** This is typically read from the password -** file. -** -** ON EXIT: -** returns YES, if password matches the encrypted one. -** NO, if not, or if either parameter is NULL. -*/ -PUBLIC BOOL HTAA_passwdMatch PARAMS((CONST char * password, - CONST char * encrypted)); - - -/* PUBLIC HTAAFile_readPasswdRec() -** READ A RECORD FROM THE PASSWORD FILE -** ON ENTRY: -** fp open password file -** out_username buffer to put the read username, must be at -** least MAX_USERNAME_LEN+1 characters long. -** out_passwd buffer to put the read password, must be at -** least MAX_PASSWORD_LEN+1 characters long. -** ON EXIT: -** returns EOF on end of file, -** otherwise the number of read fields -** (i.e. in a correct case returns 2). -** out_username contains the null-terminated read username. -** out_password contains the null-terminated read password. -** -** FORMAT OF PASSWORD FILE: -** username:password:maybe real name or other stuff -** (may include even colons) -** -** There may be whitespace (blanks or tabs) in the beginning and -** the end of each field. They are ignored. -*/ -PUBLIC int HTAAFile_readPasswdRec PARAMS((FILE * fp, - char * out_username, - char * out_password)); -/* - - */ - -#endif /* not HTPASSWD_H */ -/* - - End of file HTPasswd.h. */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTPlain.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTPlain.c index dda98d5fe82..a1a8a13647a 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTPlain.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTPlain.c @@ -7,33 +7,29 @@ ** Bugs: ** strings written must be less than buffer size. */ -#include "HTUtils.h" -#include "tcp.h" -#include "HTPlain.h" +#include +#include /* S/390 -- gil -- 0288 */ -#include "HTChunk.h" -#include "HText.h" -#include "HTStyle.h" +#include + +#include +#include +#include #define Lynx_HTML_Handler -#include "HTML.h" /* styles[] */ +#include /* styles[] */ #define BUFFER_SIZE 4096; /* Tradeoff */ -#include "HText.h" -#include "HTStyle.h" -#include "HTMLDTD.h" -#include "HTCJK.h" -#include "UCMap.h" -#include "UCDefs.h" -#include "UCAux.h" - -#include "LYCharSets.h" -#include "LYLeaks.h" +#include +#include +#include +#include +#include -#define FREE(x) if (x) {free(x); x = NULL;} +#include +#include -extern BOOLEAN LYRawMode; extern BOOL HTPassEightBitRaw; extern BOOL HTPassHighCtrlRaw; extern HTCJKlang HTCJK; @@ -54,6 +50,7 @@ struct _HTStream { /* ** The node_anchor UCInfo and handle for the output (HTEXT) stage. - FM */ + LYUCcharset * outUCI; int outUCLYhndl; /* ** Counter, value, buffer and pointer for UTF-8 handling. - FM @@ -91,6 +88,7 @@ PRIVATE void HTPlain_getChartransInfo ARGS2( me->outUCLYhndl = HTAnchor_getUCLYhndl(anchor, UCT_STAGE_HTEXT); } me->inUCI = HTAnchor_getUCInfoStage(anchor, UCT_STAGE_PARSER); + me->outUCI = HTAnchor_getUCInfoStage(anchor, UCT_STAGE_HTEXT); } /* Write the buffer out to the socket @@ -136,31 +134,31 @@ PRIVATE void HTPlain_put_character ARGS2( HTPlain_lastraw = c; if (c == '\r') { HText_appendCharacter(me->text, '\n'); - } else if (HTCJK != NOCJK) { - HText_appendCharacter(me->text, c); - } else if ((unsigned char)c >= 127) { + } else if (TOASCII((unsigned char)c) >= 127) { /* S/390 -- gil -- 0305 */ /* ** 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 && + } else if (HTCJK != NOCJK) { + HText_appendCharacter(me->text, c); + } else if (TOASCII((unsigned char)c) >= 127 && TOASCII((unsigned char)c) < 161 && HTPassHighCtrlRaw) { HText_appendCharacter(me->text, c); - } else if ((unsigned char)c == 160) { + } else if ((unsigned char)c == CH_NBSP) { /* S/390 -- gil -- 0341 */ HText_appendCharacter(me->text, ' '); - } else if ((unsigned char)c == 173) { + } else if ((unsigned char)c == CH_SHY) { return; - } else if (((unsigned char)c >= 32 && (unsigned char)c < 127) || + } else if (((unsigned char)c >= ' ' && TOASCII((unsigned char)c) < 127) || c == '\n' || c == '\t') { HText_appendCharacter(me->text, c); - } else if ((unsigned char)c > 160) { + } else if (TOASCII((unsigned char)c) > 160) { if (!HTPassEightBitRaw && - current_char_set != 0) { - size_t len, high, low, i; - int diff = 1; + !((me->outUCLYhndl == LATIN1) || + (me->outUCI->enc & (UCT_CP_SUPERSETOF_LAT1)))) { + int len, high, low, i, diff = 1; CONST char * name; - UCode_t value = (UCode_t)((unsigned char)c - 160); + UCode_t value = (UCode_t)FROMASCII((TOASCII((unsigned char)c) - 160)); name = HTMLGetEntityName(value); len = strlen(name); @@ -169,10 +167,10 @@ PRIVATE void HTPlain_put_character ARGS2( diff < 0 ? (low = i+1) : (high = i)) { /* Binary search */ i = (low + (high-low)/2); - diff = strncmp(HTML_dtd.entity_names[i], name, len); + diff = AS_ncmp(HTML_dtd.entity_names[i], name, len); if (diff == 0) { HText_appendText(me->text, - LYCharSets[current_char_set][i]); + LYCharSets[me->outUCLYhndl][i]); break; } } @@ -216,10 +214,10 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l) CONST char * p; CONST char * e = s+l; char c; - unsigned char c_unsign; + unsigned c_unsign; BOOL chk; - UCode_t code; - long uck = 0; + UCode_t code, uck = -1; + char saved_char_in = '\0'; for (p = s; p < e; p++) { #ifdef REMOVE_CR_ONLY @@ -252,6 +250,7 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l) c = *p; c_unsign = (unsigned char)c; code = (UCode_t)c_unsign; + saved_char_in = '\0'; /* ** Combine any UTF-8 multibytes into Unicode ** to check for special characters. - FM @@ -262,7 +261,7 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l) ** Incomplete characters silently ignored. ** from Linux kernel's console.c - KW */ - if (c_unsign > 127) { + if (TOASCII(c_unsign) > 127) { /* S/390 -- gil -- 0371 */ /* ** We have an octet from a multibyte character. - FM */ @@ -282,8 +281,9 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l) */ *(me->utf_buf_p) = '\0'; code = me->utf_char; - if (code < 256) { + if (code > 0 && code < 256) { c = FROMASCII((char)code); + c_unsign = (unsigned char)c; } } else { /* @@ -295,9 +295,8 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l) /* ** Start handling a new multibyte character. - FM */ - me->utf_buf_p = me->utf_buf; me->utf_buf_p[0] = c; - (me->utf_buf_p)++; + me->utf_buf_p = &me->utf_buf[1]; if ((*p & 0xe0) == 0xc0) { me->utf_count = 1; me->utf_char = (c & 0x1f); @@ -318,37 +317,104 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l) * We got garbage, so ignore it. - FM */ me->utf_count = 0; - me->utf_buf_p = me->utf_buf; me->utf_buf_p[0] = '\0'; + me->utf_buf_p = me->utf_buf; } /* ** Get the next byte. - FM */ continue; } - } else { + } else if (me->utf_count > 0) { /* - ** Got an ASCII character. + ** Got an ASCII character when expecting + ** UTF-8 multibytes, so ignore the buffered + ** multibye characters and fall through with + ** the current ASCII character. - FM */ me->utf_count = 0; me->utf_buf[0] = '\0'; me->utf_buf_p = me->utf_buf; + code = (UCode_t)c_unsign; + } else { + /* + ** Got a valid ASCII character, so fall + ** through with it. - FM + */ + code = (UCode_t)c_unsign; } } - + /* + ** Convert characters from non-UTF-8 charsets + ** to Unicode (if appropriate). - FM + */ + if (!(me->T.decode_utf8 && + (unsigned char)(*p) > 127)) { +#ifdef NOTDEFINED + if (me->T.strip_raw_char_in) + saved_char_in = c; +#endif /* NOTDEFINED */ if (me->T.trans_to_uni && - (code >= 127 || - (code < 32 && code != 0 && + (TOASCII(code) >= LYlowest_eightbit[me->inUCLYhndl] || /* S/390 -- gil -- 0389 */ + (code < ' ' && code != 0 && me->T.trans_C0_to_uni))) { /* ** Convert the octet to Unicode. - FM */ code = (UCode_t)UCTransToUni(c, me->inUCLYhndl); if (code > 0) { + saved_char_in = c; if (code < 256) { - c = FROMASCII((char)code); + c = FROMASCII((char)code); + c_unsign = (unsigned char)c; } } + } else if (code < 32 && code != 0 && + me->T.trans_C0_to_uni) { + /* + ** Quote from SGML.c: + ** "This else if may be too ugly to keep. - KW" + */ + if (me->T.trans_from_uni && + (((code = UCTransToUni(c, me->inUCLYhndl)) >= 32) || + (me->T.transp && + (code = UCTransToUni(c, me->inUCLYhndl)) > 0))) { + saved_char_in = c; + if (code < 256) { + c = FROMASCII((char)code); + c_unsign = (unsigned char)c; + } + } else { + uck = -1; + if (me->T.transp) { + uck = UCTransCharStr(replace_buf, 60, c, + me->inUCLYhndl, + me->inUCLYhndl, NO); + } + if (!me->T.transp || uck < 0) { + uck = UCTransCharStr(replace_buf, 60, c, + me->inUCLYhndl, + me->outUCLYhndl, YES); + } + if (uck == 0) { + continue; + } else if (uck < 0) { + me->utf_buf[0] = '\0'; + code = (unsigned char)c; + } else { + c = replace_buf[0]; + if (c && replace_buf[1]) { + HText_appendText(me->text, replace_buf); + continue; + } + } + me->utf_buf[0] = '\0'; + code = (unsigned char)c; + } /* Next line end of ugly stuff for C0. - KW */ + } else { + me->utf_buf[0] = '\0'; + code = (unsigned char)c; + } } /* ** At this point we have either code in Unicode @@ -358,7 +424,7 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l) /* ** If CJK mode is on, we'll assume the document matches - ** the user's selected character set, and if not, the + ** the user's display character set, and if not, the ** user should toggle off raw/CJK mode to reload. - FM */ if (HTCJK != NOCJK) { @@ -374,58 +440,54 @@ 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 (code >= 127 && code < 161 && + } else if (TOASCII(code) >= 127 && TOASCII(code) < 161 && /* S/390 -- gil -- 0427 */ PASSHICTRL && PASS8859SPECL) { HText_appendCharacter(me->text, c); - } else if (code == 173 && PASS8859SPECL) { + } else if (code == CH_SHY && PASS8859SPECL) { HText_appendCharacter(me->text, c); /* ** If neither HTPassHighCtrlRaw nor CJK is set, play it safe ** and treat 160 (nbsp) as an ASCII space (32). - FM */ - } else if (code == 160) { + } else if (code == CH_NBSP) { HText_appendCharacter(me->text, ' '); /* ** If neither HTPassHighCtrlRaw nor CJK is set, play it safe ** and ignore 173 (shy). - FM */ - } else if (code == 173) { + } else if (code == CH_SHY) { continue; /* ** If we get to here, pass the displayable ASCII characters. - FM */ - } else if ((code >= 32 && code < 127) || + } else if ((code >= ' ' && TOASCII(code) < 127) || (PASSHI8BIT && c >= LYlowest_eightbit[me->outUCLYhndl]) || *p == '\n' || *p == '\t') { HText_appendCharacter(me->text, c); - - } else if (me->T.use_raw_char_in) { - HText_appendCharacter(me->text, *p); -#ifdef NOTDEFINED /* ** Use an ASCII space (32) for ensp, emsp or thinsp. - FM */ } else if (code == 8194 || code == 8195 || code == 8201) { HText_appendCharacter(me->text, ' '); -#endif /* NOTDEFINED */ - + /* + ** If we want the raw character, pass it now. - FM + */ + } else if (me->T.use_raw_char_in && saved_char_in) { + HText_appendCharacter(me->text, saved_char_in); /****************************************************************** * I. LATIN-1 OR UCS2 TO DISPLAY CHARSET ******************************************************************/ } else if ((chk = (me->T.trans_from_uni && code >= 160)) && (uck = UCTransUniChar(code, - me->outUCLYhndl)) >= 32 && + me->outUCLYhndl)) >= ' ' && /* S/390 -- gil -- 0464 */ uck < 256) { - if (TRACE) { - fprintf(stderr, - "UCTransUniChar returned 0x%.2lX:'%c'.\n", + CTRACE(tfp, "UCTransUniChar returned 0x%.2lX:'%c'.\n", uck, FROMASCII((char)uck)); - } HText_appendCharacter(me->text, ((char)(uck & 0xff))); } else if (chk && (uck == -4 || - (me->T.repl_translated_C0 && uck > 0 && uck < 32)) && + (me->T.repl_translated_C0 && uck > 0 && uck < ' ')) && /* S/390 -- gil -- 0481 */ /* ** Not found; look for replacement string. */ @@ -440,7 +502,7 @@ 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 && code > 127 && me->T.output_utf8) { + } else if (chk && TOASCII(code) > 127 && me->T.output_utf8) { /* S/390 -- gil -- 0498 */ /* ** We want UTF-8 output, so do it now. - FM */ @@ -451,7 +513,10 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l) } else if (UCConvertUniToUtf8(code, replace_buf)) { HText_appendText(me->text, replace_buf); } else { - sprintf(replace_buf, "U%.2lX", code); + /* + ** Out of luck, so use the UHHH notation (ugh). - gil + */ /* S/390 -- gil -- 0517 */ + sprintf(replace_buf, "U%.2lX", TOASCII(code)); HText_appendText(me->text, replace_buf); } #ifdef NOTDEFINED @@ -463,23 +528,29 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l) ** (somewhat) readable ASCII. */ HText_appendCharacter(me->text, (char)(*p & 0x7f)); +#endif /* NOTDEFINED */ + /* + ** If we don't actually want the character, + ** make it safe and output that now. - FM + */ + } else if ((c_unsign > 0 && + (int) c_unsign < LYlowest_eightbit[me->outUCLYhndl]) || + (me->T.trans_from_uni && !HTPassEightBitRaw)) { /* ** If 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. Otherwise, or if the ** translation fails, use UHHH notation. - FM */ - } else if (chk && - (chk = (!HTPassEightBitRaw && - (me->outUCLYhndl != - UCGetLYhndl_byMIME("us-ascii")))) && + if ((chk = (me->outUCLYhndl != + UCGetLYhndl_byMIME("us-ascii"))) && (uck = UCTransUniChar(code, UCGetLYhndl_byMIME("us-ascii"))) - >= 32 && uck < 127) { + >= ' ' && TOASCII(uck) < 127) { /* S/390 -- gil -- 0535 */ /* ** Got an ASCII character (yippey). - FM */ - c = ((char)(uck & 0xff)); + c = FROMASCII((char)uck); HText_appendCharacter(me->text, c); } else if ((chk && uck == -4) && (uck = UCTransUniCharStr(replace_buf, @@ -489,110 +560,33 @@ PRIVATE void HTPlain_write ARGS3(HTStream *, me, CONST char*, s, int, l) /* ** Got a repacement string (yippey). - FM */ - HText_appendText(me->text, replace_buf); - } else if (code == 8204 || code == 8205) { - /* - ** Ignore 8204 (zwnj) or 8205 (zwj), if we get to here. - FM - */ - if (TRACE) { - fprintf(stderr, - "HTPlain_write: Ignoring '%ld'.\n", code); - } - } else if (code == 8206 || code == 8207) { - /* - ** Ignore 8206 (lrm) or 8207 (rlm), if we get to here. - FM - */ - if (TRACE) { - fprintf(stderr, - "HTPlain_write: Ignoring '%ld'.\n", code); - } -#endif /* NOTDEFINED */ - } else if (me->T.trans_from_uni && code > 255) { - if (PASSHI8BIT && PASSHICTRL && LYRawMode && - (unsigned char)*p >= LYlowest_eightbit[me->outUCLYhndl]) { - HText_appendCharacter(me->text, *p); - } else { - sprintf(replace_buf, "U%.2lX", code); HText_appendText(me->text, replace_buf); - } - /* - ** 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 (code > 160) { - if (!HTPassEightBitRaw && code <= 255 && - me->outUCLYhndl != 0) { + } else if (code == 8204 || code == 8205) { + /* + ** Ignore 8204 (zwnj) or 8205 (zwj), if we get to here. - FM + */ + CTRACE(tfp, "HTPlain_write: Ignoring '%ld'.\n", code); + } else if (code == 8206 || code == 8207) { + /* + ** Ignore 8206 (lrm) or 8207 (rlm), if we get to here. - FM + */ + CTRACE(tfp, "HTPlain_write: Ignoring '%ld'.\n", code); + } else { /* ** Out of luck, so use the UHHH notation (ugh). - FM */ - size_t len, high, low, i; - int diff = 1; - CONST char * name; - int value = (int)(code - 160); - - name = HTMLGetEntityName(value); - len = strlen(name); - 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 = strncmp(HTML_dtd.entity_names[i], name, len); - if (diff == 0) { - HText_appendText(me->text, - LYCharSets[me->outUCLYhndl][i]); - break; - } - } - if (diff) { - /* - ** Something went wrong in the translation, so - ** either output as UTF8 or a hex representation or - ** pass the raw character and hope it's OK. - */ - if (!PASSHI8BIT) - c = FROMASCII((char)code); - if (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 (me->T.trans_from_uni) { + /* do not print UHHH for now sprintf(replace_buf, "U%.2lX", code); HText_appendText(me->text, replace_buf); - } else - HText_appendCharacter(me->text, c); + */ } - } else { /* - ** Didn't attempt a translation. - FM + ** If we get to here and have a monobyte character, + ** pass it. - FM */ - /* Either output as UTF8 or a hex representation or - ** pass the raw character and hope it's OK. - */ - if (code <= 255 && !PASSHI8BIT) - c = 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'; - - } else if (LYRawMode && - me->inUCLYhndl != me->outUCLYhndl && - (PASSHI8BIT || PASSHICTRL) && - (unsigned char)c >= - LYlowest_eightbit[me->outUCLYhndl]) { - HText_appendCharacter(me->text, c); - } else if (me->T.trans_from_uni && code >= 127) { - sprintf(replace_buf, "U%.2lX", code); - HText_appendText(me->text, replace_buf); - } else + } else if (c_unsign != 0 && c_unsign < 256) { HText_appendCharacter(me->text, c); } - } #endif /* REMOVE_CR_ONLY */ } } @@ -658,7 +652,7 @@ PUBLIC HTStream* HTPlainPresent ARGS3( HTAnchor_getUCInfoStage(anchor,UCT_STAGE_HTEXT)); me->text = HText_new(anchor); - HText_setStyle(me->text, styles[HTML_XMP] ); + HText_setStyle(me->text, LYstyles(HTML_XMP) ); HText_beginAppend(me->text); return (HTStream*) me; diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTPlain.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTPlain.h index f4ce3e14696..0d363f04c63 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTPlain.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTPlain.h @@ -5,8 +5,8 @@ #ifndef HTPLAIN_H #define HTPLAIN_H -#include "HTStream.h" -#include "HTAnchor.h" +#include +#include extern HTStream* HTPlainPresent PARAMS(( HTPresentation * pres, diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTRules.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTRules.c index 93a9eb255ee..97df34e6d33 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTRules.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTRules.c @@ -7,10 +7,10 @@ ** 10 Aug 91 Authorisation added after Daniel Martin (pass, fail) ** Rule order in file changed ** Comments allowed with # on 1st char of rule line -** 17 Jun 92 Bug fix: pass and fail failed if didn't contain '*' TBL -** 1 Sep 93 Bug fix: no memory check - Nathan Torkington -** BYTE_ADDRESSING removed - Arthur Secret -** 11 Sep 93 MD Changed %i into %d in debug printf. +** 17 Jun 92 Bug fix: pass and fail failed if didn't contain '*' TBL +** 1 Sep 93 Bug fix: no memory check - Nathan Torkington +** BYTE_ADDRESSING removed - Arthur Secret +** 11 Sep 93 MD Changed %i into %d in debug printf. ** VMS does not recognize %i. ** Bug Fix: in case of PASS, only one parameter to printf. ** 19 Sep 93 AL Added Access Authorization stuff. @@ -18,16 +18,14 @@ ** */ -/* (c) CERN WorldWideWeb project 1990,91. See Copyright.html for details */ -#include "HTRules.h" +#include -#include "HTUtils.h" -#include "tcp.h" -/*#include included by HTUtils.h -- FM */ -#include "HTFile.h" -#include "HTAAServ.h" /* Access Authorization */ +/* (c) CERN WorldWideWeb project 1990,91. See Copyright.html for details */ +#include -#include "LYLeaks.h" +#include +#include +#include #define LINE_LENGTH 256 @@ -39,11 +37,13 @@ typedef struct _rule { char * equiv; } rule; +#ifndef NO_RULES + /* Global variables ** ---------------- */ PUBLIC char *HTBinDir = NULL; /* Physical /htbin directory path. */ - /* In future this should not be global. */ + /* In future this should not be global. */ PUBLIC char *HTSearchScript = NULL; /* Search script name. */ @@ -61,51 +61,51 @@ PRIVATE rule * rule_tail = 0; /* Pointer to last on list */ ** -------------------- ** ** On entry, -** pattern points to 0-terminated string containing a single "*" +** pattern points to 0-terminated string containing a single "*" ** equiv points to the equivalent string with * for the ** place where the text matched by * goes. ** On exit, -** returns 0 if success, -1 if error. +** returns 0 if success, -1 if error. */ -#ifdef __STDC__ -PUBLIC int HTAddRule (HTRuleOp op, const char * pattern, const char * equiv) -#else -int HTAddRule(op, pattern, equiv) - HTRuleOp op; - char * pattern; - char * equiv; -#endif +PUBLIC int HTAddRule ARGS3( + HTRuleOp, op, + CONST char *, pattern, + CONST char *, equiv) { /* BYTE_ADDRESSING removed and memory check - AS - 1 Sep 93 */ - rule * temp; - char * pPattern; + rule * temp; + char * pPattern; temp = (rule *)malloc(sizeof(*temp)); - if (temp==NULL) - outofmem(__FILE__, "HTAddRule"); + if (temp==NULL) + outofmem(__FILE__, "HTAddRule"); pPattern = (char *)malloc(strlen(pattern)+1); - if (pPattern==NULL) - outofmem(__FILE__, "HTAddRule"); + if (pPattern==NULL) + outofmem(__FILE__, "HTAddRule"); if (equiv) { /* Two operands */ char * pEquiv = (char *)malloc(strlen(equiv)+1); - if (pEquiv==NULL) - outofmem(__FILE__, "HTAddRule"); - temp->equiv = pEquiv; - strcpy(pEquiv, equiv); + if (pEquiv==NULL) + outofmem(__FILE__, "HTAddRule"); + temp->equiv = pEquiv; + strcpy(pEquiv, equiv); } else { - temp->equiv = 0; + temp->equiv = 0; } temp->pattern = pPattern; temp->op = op; strcpy(pPattern, pattern); - if (TRACE) { - if (equiv) - fprintf(stderr, "Rule: For `%s' op %d `%s'\n", pattern, op, equiv); - else - fprintf(stderr, "Rule: For `%s' op %d\n", pattern, op); + if (equiv) { + CTRACE(tfp, "Rule: For `%s' op %d `%s'\n", pattern, op, equiv); + } else { + CTRACE(tfp, "Rule: For `%s' op %d\n", pattern, op); } + if (!rules) { +#ifdef LY_FIND_LEAKS + atexit(HTClearRules); +#endif + } #ifdef PUT_ON_HEAD temp->next = rules; rules = temp; @@ -116,29 +116,24 @@ int HTAddRule(op, pattern, equiv) rule_tail = temp; #endif - + return 0; } -/* Clear all rules HTClearRules() +/* Clear all rules HTClearRules() ** --------------- ** ** On exit, ** There are no rules -** returns 0 if success, -1 if error. ** ** See also ** HTAddRule() */ -#ifdef __STDC__ -int HTClearRules(void) -#else -int HTClearRules() -#endif +void HTClearRules NOARGS { while (rules) { - rule * temp = rules; + rule * temp = rules; rules = temp->next; FREE(temp->pattern); FREE(temp->equiv); @@ -147,8 +142,6 @@ int HTClearRules() #ifndef PUT_ON_HEAD rule_tail = 0; #endif - - return 0; } @@ -160,7 +153,7 @@ int HTClearRules() ** On entry, ** required points to a string whose equivalent value is neeed ** On exit, -** returns the address of the equivalent string allocated from +** returns the address of the equivalent string allocated from ** the heap which the CALLER MUST FREE. If no translation ** occured, then it is a copy of te original. ** NEW FEATURES: @@ -171,12 +164,8 @@ int HTClearRules() ** protected, and so it knows how to handle it. ** -- AL */ -#ifdef __STDC__ -char * HTTranslate(const char * required) -#else -char * HTTranslate(required) - char * required; -#endif +char * HTTranslate ARGS1( + CONST char *, required) { rule * r; char *current = NULL; @@ -185,7 +174,7 @@ char * HTTranslate(required) HTAA_clearProtections(); /* Reset from previous call -- AL */ for(r = rules; r; r = r->next) { - char * p = r->pattern; + char * p = r->pattern; int m=0; /* Number of characters matched against wildcard */ CONST char * q = current; for(;*p && *q; p++, q++) { /* Find first mismatch */ @@ -194,9 +183,9 @@ char * HTTranslate(required) if (*p == '*') { /* Match up to wildcard */ m = strlen(q) - strlen(p+1); /* Amount to match to wildcard */ - if(m<0) continue; /* tail is too short to match */ + if(m<0) continue; /* tail is too short to match */ if (0!=strcmp(q+m, p+1)) continue; /* Tail mismatch */ - } else /* Not wildcard */ + } else /* Not wildcard */ if (*p != *q) continue; /* plain mismatch: go to next rule */ switch (r->op) { /* Perform operation */ @@ -210,13 +199,12 @@ char * HTTranslate(required) char *eff_ids = NULL; char *prot_file = NULL; - if (TRACE) fprintf(stderr, - "HTRule: `%s' matched %s %s: `%s'\n", - current, - (r->op==HT_Protect ? "Protect" : "DefProt"), - "rule, setup", - (r->equiv ? r->equiv : - (r->op==HT_Protect ?"DEFAULT" :"NULL!!"))); + CTRACE(tfp, "HTRule: `%s' matched %s %s: `%s'\n", + current, + (r->op==HT_Protect ? "Protect" : "DefProt"), + "rule, setup", + (r->equiv ? r->equiv : + (r->op==HT_Protect ?"DEFAULT" :"NULL!!"))); if (r->equiv) { StrAllocCopy(local_copy, r->equiv); @@ -238,57 +226,56 @@ char * HTTranslate(required) #endif /* ACCESS_AUTH */ case HT_Pass: /* Authorised */ - if (!r->equiv) { - if (TRACE) fprintf(stderr, "HTRule: Pass `%s'\n", current); + if (!r->equiv) { + CTRACE(tfp, "HTRule: Pass `%s'\n", current); return current; - } + } /* Else fall through ...to map and pass */ - + case HT_Map: if (*p == *q) { /* End of both strings, no wildcard */ - if (TRACE) fprintf(stderr, - "For `%s' using `%s'\n", current, r->equiv); - StrAllocCopy(current, r->equiv); /* use entire translation */ + CTRACE(tfp, "For `%s' using `%s'\n", current, r->equiv); + StrAllocCopy(current, r->equiv); /* use entire translation */ } else { char * ins = strchr(r->equiv, '*'); /* Insertion point */ - if (ins) { /* Consistent rule!!! */ + if (ins) { /* Consistent rule!!! */ char * temp = (char *)malloc( strlen(r->equiv)-1 + m + 1); - if (temp==NULL) + if (temp==NULL) outofmem(__FILE__, "HTTranslate"); /* NT & AS */ - strncpy(temp, r->equiv, ins-r->equiv); + strncpy(temp, r->equiv, ins-r->equiv); /* Note: temp may be unterminated now! */ strncpy(temp+(ins-r->equiv), q, m); /* Matched bit */ strcpy (temp+(ins-r->equiv)+m, ins+1); /* Last bit */ - if (TRACE) fprintf(stderr, "For `%s' using `%s'\n", - current, temp); + CTRACE(tfp, "For `%s' using `%s'\n", + current, temp); FREE(current); - current = temp; /* Use this */ + current = temp; /* Use this */ } else { /* No insertion point */ char * temp = (char *)malloc(strlen(r->equiv)+1); - if (temp==NULL) + if (temp==NULL) outofmem(__FILE__, "HTTranslate"); /* NT & AS */ strcpy(temp, r->equiv); - if (TRACE) fprintf(stderr, "For `%s' using `%s'\n", + CTRACE(tfp, "For `%s' using `%s'\n", current, temp); FREE(current); - current = temp; /* Use this */ + current = temp; /* Use this */ } /* If no insertion point exists */ } if (r->op == HT_Pass) { - if (TRACE) fprintf(stderr, "HTRule: ...and pass `%s'\n", - current); + CTRACE(tfp, "HTRule: ...and pass `%s'\n", + current); return current; } break; case HT_Invalid: case HT_Fail: /* Unauthorised */ - if (TRACE) fprintf(stderr, "HTRule: *** FAIL `%s'\n", - current); - return (char *)0; - + CTRACE(tfp, "HTRule: *** FAIL `%s'\n", + current); + FREE(current); + return (char *)0; } /* if tail matches ... switch operation */ } /* loop over rules */ @@ -304,7 +291,8 @@ char * HTTranslate(required) ** ** returns 0 OK, < 0 syntax error. */ -PUBLIC int HTSetConfiguration ARGS1(CONST char *, config) +PUBLIC int HTSetConfiguration ARGS1( + char *, config) { HTRuleOp op; char * line = NULL; @@ -313,7 +301,7 @@ PUBLIC int HTSetConfiguration ARGS1(CONST char *, config) float quality, secs, secs_per_byte; int maxbytes; int status; - + StrAllocCopy(line, config); { char * p = strchr(line, '#'); /* Chop off comments */ @@ -322,9 +310,9 @@ PUBLIC int HTSetConfiguration ARGS1(CONST char *, config) pointer = line; word1 = HTNextField(&pointer); if (!word1) { - FREE(line); + FREE(line); return 0; - } ; /* Comment only or blank */ + } ; /* Comment only or blank */ word2 = HTNextField(&pointer); @@ -335,13 +323,13 @@ PUBLIC int HTSetConfiguration ARGS1(CONST char *, config) word3 = HTNextField(&pointer); /* Just the next word */ if (!word2) { - fprintf(stderr, "HTRule: Insufficient operands: %s\n", line); + fprintf(stderr, "HTRule: %s %s\n", RULE_NEEDS_DATA, line); FREE(line); return -2; /*syntax error */ } if (0==strcasecomp(word1, "suffix")) { - char * encoding = HTNextField(&pointer); + char * encoding = HTNextField(&pointer); if (pointer) status = sscanf(pointer, "%f", &quality); else status = 0; HTSetSuffix(word2, word3, @@ -349,12 +337,12 @@ PUBLIC int HTSetConfiguration ARGS1(CONST char *, config) status >= 1? quality : 1.0); } else if (0==strcasecomp(word1, "presentation")) { - if (pointer) status = sscanf(pointer, "%f%f%f%d", + if (pointer) status = sscanf(pointer, "%f%f%f%d", &quality, &secs, &secs_per_byte, &maxbytes); - else status = 0; + else status = 0; HTSetPresentation(word2, word3, - status >= 1? quality : 1.0, - status >= 2 ? secs : 0.0, + status >= 1? quality : 1.0, + status >= 2 ? secs : 0.0, status >= 3 ? secs_per_byte : 0.0, status >= 4 ? maxbytes : 0 ); @@ -366,17 +354,17 @@ PUBLIC int HTSetConfiguration ARGS1(CONST char *, config) StrAllocCopy(HTSearchScript, word2); /* Search script name */ } else { - op = 0==strcasecomp(word1, "map") ? HT_Map - : 0==strcasecomp(word1, "pass") ? HT_Pass - : 0==strcasecomp(word1, "fail") ? HT_Fail - : 0==strcasecomp(word1, "defprot") ? HT_DefProt + op = 0==strcasecomp(word1, "map") ? HT_Map + : 0==strcasecomp(word1, "pass") ? HT_Pass + : 0==strcasecomp(word1, "fail") ? HT_Fail + : 0==strcasecomp(word1, "defprot") ? HT_DefProt : 0==strcasecomp(word1, "protect") ? HT_Protect : HT_Invalid; if (op==HT_Invalid) { - fprintf(stderr, "HTRule: Bad rule `%s'\n", config); - } else { + fprintf(stderr, "HTRule: %s '%s'\n", RULE_INCORRECT, config); + } else { HTAddRule(op, word2, word3); - } + } } FREE(line); return 0; @@ -391,20 +379,20 @@ PUBLIC int HTSetConfiguration ARGS1(CONST char *, config) ** On exit, ** Any existing rules will have been kept. ** Any new rules will have been loaded. -** Returns 0 if no error, 0 if error! +** Returns 0 if no error, 0 if error! ** ** Bugs: ** The strings may not contain spaces. */ -int HTLoadRules ARGS1(CONST char *, filename) +int HTLoadRules ARGS1( + CONST char *, filename) { FILE * fp = fopen(filename, "r"); char line[LINE_LENGTH+1]; - + if (!fp) { - if (TRACE) fprintf(stderr, - "HTRules: Can't open rules file %s\n", filename); + CTRACE(tfp, "HTRules: Can't open rules file %s\n", filename); return -1; /* File open error */ } for(;;) { @@ -415,4 +403,4 @@ int HTLoadRules ARGS1(CONST char *, filename) return 0; /* No error or syntax errors ignored */ } - +#endif /* NO_RULES */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTRules.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTRules.h index 8407524467f..fce782f8a4e 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTRules.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTRules.h @@ -1,25 +1,27 @@ -/* Configuration Manager for libwww - CONFIGURATION MANAGER - - Author Tim Berners-Lee/CERN. Public domain. Please mail changes to timbl@info.cern.ch. - - The configuration information loaded includes tables (file suffixes, presentation - methods) in other modules. The most likely routines needed by developers will be: - - HTSetConfiguration to load configuration information. - - HTLoadRules to load a whole file of configuration information - - HTTranslate to translate a URL using the rule table. - +/* Configuration Manager for libwww + * CONFIGURATION MANAGER + * + * Author Tim Berners-Lee/CERN. Public domain. Please mail changes to + * timbl@info.cern.ch. + * + * The configuration information loaded includes tables (file suffixes, + * presentation methods) in other modules. The most likely routines needed by + * developers will be: + * + * HTSetConfiguration to load configuration information. + * + * HTLoadRules to load a whole file of configuration information + * + * HTTranslate to translate a URL using the rule table. + * */ #ifndef HTRULE_H #define HTRULE_H #ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ - +#include +#endif + typedef enum _HTRuleOp { HT_Invalid, HT_Map, @@ -29,20 +31,18 @@ typedef enum _HTRuleOp { HT_Protect } HTRuleOp; -#ifdef SHORT_NAMES -#define HTSearSc HTSearchScript -#endif /*SHORT_NAMES*/ +#ifndef NO_RULES /* Server Side Script Execution If a URL starts with /htbin/ it is understood to mean a script execution request on - server. This feature needs to be turned on by setting HTBinDir by the htbin rule. + server. This feature needs to be turned on by setting HTBinDir by the htbin rule. Index searching is enabled by setting HTSearchScript into the name of script in BinDir doing the actual search by search rule (BinDir must also be set in this case, of course). - + */ extern char * HTBinDir; /* Physical /htbin location */ @@ -53,22 +53,22 @@ extern char * HTSearchScript; /* Search script name */ HTAddRule: Add rule to the list ON ENTRY, - + pattern points to 0-terminated string containing a single "*" - + equiv points to the equivalent string with * for the place where the text matched by * goes. - + ON EXIT, - + returns 0 if success, -1 if error. - + Note that if BYTE_ADDRESSING is set, the three blocks required are allocated and - deallocated as one. This will save time and storage, when malloc's allocation units are + deallocated as one. This will save time and storage, when malloc's allocation units are large. - + */ -extern int HTAddRule PARAMS((HTRuleOp op, const char * pattern, const char * equiv)); +extern int HTAddRule PARAMS((HTRuleOp op, CONST char * pattern, CONST char * equiv)); /* @@ -76,60 +76,47 @@ extern int HTAddRule PARAMS((HTRuleOp op, const char * pattern, const char * equ HTClearRules: Clear all rules ON EXIT, - + Rule file There are no rules - - returns - 0 if success, -1 if error. - - */ -#ifdef __STDC__ -extern int HTClearRules(void); -#else -extern int HTClearRules(); -#endif + */ +extern void HTClearRules PARAMS((void)); /* HTTranslate: Translate by rules */ - + /* ON ENTRY, - + required points to a string whose equivalent value is neeed - + ON EXIT, - + returns the address of the equivalent string allocated from the heap which the CALLER MUST FREE. If no translation occured, then it is a copy of the original. - - */ -#ifdef __STDC__ -extern char * HTTranslate(const char * required); -#else -extern char * HTTranslate(); -#endif + */ +extern char * HTTranslate PARAMS((CONST char * required)); /* HTSetConfiguration: Load one line of configuration information ON ENTRY, - + config is a string in the syntax of a rule file line. - + This routine may be used for loading configuration information from sources other than the rule file, for example INI files for X resources. - + */ -extern int HTSetConfiguration PARAMS((CONST char * config)); +extern int HTSetConfiguration PARAMS((char * config)); /* @@ -137,29 +124,22 @@ extern int HTSetConfiguration PARAMS((CONST char * config)); HtLoadRules: Load the rules from a file ON ENTRY, - + Rule table Rules can be in any state - + ON EXIT, - - Rule table Any existing rules will have been kept. Any new rules will have + + Rule table Any existing rules will have been kept. Any new rules will have been loaded on top, so as to be tried first. - + Returns 0 if no error. - + */ -#ifdef __STDC__ -extern int HTLoadRules(const char * filename); -#else -extern int HTLoadRules(); -#endif +extern int HTLoadRules PARAMS((CONST char * filename)); /* */ - -#endif /* HTUtils.h */ -/* - - end */ +#endif /* NO_RULES */ +#endif /* HTRULE_H */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTStream.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTStream.h index 72344cd367e..dd18e40b348 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTStream.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTStream.h @@ -14,9 +14,9 @@ #define HTSTREAM_H #ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ - +#include +#endif + typedef struct _HTStream HTStream; /* @@ -25,7 +25,7 @@ typedef struct _HTStream HTStream; for end_document which must be called before free. It should be merged with free in fact: it should be dummy for new streams. - The put_block method was write, but this upset systems whiuch had macros for write(). + The put_block method was write, but this upset systems which had macros for write(). */ typedef struct _HTStreamClass { diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTString.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTString.c index 5f358b9775f..90b6665bb3e 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTString.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTString.c @@ -5,15 +5,13 @@ ** 02-Dec-91 (JFG) Added stralloccopy and stralloccat ** 23 Jan 92 (TBL) Changed strallocc* to 8 char HTSAC* for VM and suchlike ** 6 Oct 92 (TBL) Moved WWW_TraceFlag in here to be in library +** 15 Nov 98 (TD) Added HTSprintf. */ -#include -#include "HTUtils.h" -#include "tcp.h" -#include "LYLeaks.h" -#include "LYStrings.h" +#include -#define FREE(x) if (x) {free(x); x = NULL;} +#include +#include PUBLIC int WWW_TraceFlag = 0; /* Global trace flag for ALL W3 code */ @@ -124,18 +122,81 @@ PUBLIC int strncasecomp ARGS3( } #endif /* VM */ +#ifdef NOT_ASCII + +/* Case-insensitive with ASCII collating sequence +** ---------------- +*/ +PUBLIC int AS_casecomp ARGS2( + CONST char*, p, + CONST char*, q) +{ + int diff; + + for ( ; ; p++, q++) { + if (!(*p && *q)) + return ((unsigned char) *p - (unsigned char) *q); + diff = TOASCII(TOLOWER(*p)) + - TOASCII(TOLOWER(*q)); + if (diff) + return diff; + } + /*NOTREACHED*/ +} + + +/* With count limit and ASCII collating sequence +** ---------------- +** AS_cmp uses n == -1 to compare indefinite length. +*/ +PUBLIC int AS_ncmp ARGS3( + CONST char *, p, + CONST char *, q, + unsigned int, n) +{ + CONST char *a = p; + int diff; + + for ( ; (p-a) < n; p++, q++) { + if (!(*p && *q)) + return ((unsigned char) *p - (unsigned char) *q); + diff = TOASCII(*p) + - TOASCII(*q); + if (diff) + return diff; + } + return 0; /* Match up to n characters */ +} + + +/* With ASCII collating sequence +** ---------------- +*/ +PUBLIC int AS_cmp ARGS2( + CONST char *, p, + CONST char *, q) +{ + return( AS_ncmp( p, q, -1 ) ); +} +#endif /* NOT_ASCII */ + + /* Allocate a new copy of a string, and returns it */ PUBLIC char * HTSACopy ARGS2( char **, dest, CONST char *, src) { - FREE(*dest); - if (src) { - *dest = (char *) malloc (strlen(src) + 1); - if (*dest == NULL) - outofmem(__FILE__, "HTSACopy"); - strcpy (*dest, src); + if (src != 0) { + if (src != *dest) { + FREE(*dest); + *dest = (char *) malloc (strlen(src) + 1); + if (*dest == NULL) + outofmem(__FILE__, "HTSACopy"); + strcpy (*dest, src); + } + } else { + FREE(*dest); } return *dest; } @@ -146,7 +207,7 @@ PUBLIC char * HTSACat ARGS2( char **, dest, CONST char *, src) { - if (src && *src) { + if (src && *src && (src != *dest)) { if (*dest) { int length = strlen(*dest); *dest = (char *)realloc(*dest, length + strlen(src) + 1); @@ -235,8 +296,8 @@ PUBLIC char * HTNextField ARGS1( */ PUBLIC char * HTNextTok ARGS4( char **, pstr, - const char *, delims, - const char *, bracks, + CONST char *, delims, + CONST char *, bracks, char *, found) { char * p = *pstr; @@ -342,3 +403,490 @@ PUBLIC char * HTNextTok ARGS4( *pstr = p; return start; } + +PRIVATE char *HTAlloc ARGS2(char *, ptr, size_t, length) +{ + if (ptr != 0) + ptr = (char *)realloc(ptr, length); + else + ptr = (char *)malloc(length); + if (ptr == 0) + outofmem(__FILE__, "HTAlloc"); + return ptr; +} + +/* + * Replacement for sprintf, allocates buffer on the fly according to what's needed + * for its arguments. Unlike sprintf, this always concatenates to the destination + * buffer, so we do not have to provide both flavors. + */ +typedef enum { Flags, Width, Prec, Type, Format } PRINTF; + +#define VA_INTGR(type) ival = va_arg((*ap), type) +#define VA_FLOAT(type) fval = va_arg((*ap), type) +#define VA_POINT(type) pval = (void *)va_arg((*ap), type) + +#define NUM_WIDTH 10 /* allow for width substituted for "*" in "%*s" */ + /* also number of chars assumed to be needed in addition + to a given precision in floating point formats */ + +#define GROW_EXPR(n) (((n) * 3) / 2) +#define GROW_SIZE 256 + +PRIVATE char * StrAllocVsprintf ARGS4( + char **, pstr, + size_t, dst_len, + CONST char *, fmt, + va_list *, ap) +{ + size_t tmp_len = GROW_SIZE; + size_t have, need; + char *tmp_ptr = 0; + char *fmt_ptr; + char *dst_ptr = *pstr; + CONST char *format = fmt; + + if (fmt == 0 || *fmt == '\0') + return 0; + + need = strlen(fmt) + 1; + if ((fmt_ptr = malloc(need*NUM_WIDTH)) == 0 + || (tmp_ptr = malloc(tmp_len)) == 0) { + outofmem(__FILE__, "StrAllocVsprintf"); + } + + if (dst_ptr == 0) { + dst_ptr = HTAlloc(dst_ptr, have = GROW_SIZE + need); + } else { + have = strlen(dst_ptr) + 1; + need += dst_len; + if (have < need) + dst_ptr = HTAlloc(dst_ptr, have = GROW_SIZE + need); + } + + while (*fmt != '\0') { + if (*fmt == '%') { + static char dummy[] = ""; + PRINTF state = Flags; + char *pval = dummy; /* avoid const-cast */ + double fval = 0.0; + int done = FALSE; + int ival = 0; + int prec = -1; + int type = 0; + int used = 0; + int width = -1; + size_t f = 0; + + fmt_ptr[f++] = *fmt; + while (*++fmt != '\0' && !done) { + fmt_ptr[f++] = *fmt; + + if (isdigit(*fmt)) { + int num = *fmt - '0'; + if (state == Flags && num != 0) + state = Width; + if (state == Width) { + if (width < 0) + width = 0; + width = (width * 10) + num; + } else if (state == Prec) { + if (prec < 0) + prec = 0; + prec = (prec * 10) + num; + } + } else if (*fmt == '*') { + VA_INTGR(int); + if (state == Flags) + state = Width; + if (state == Width) { + width = ival; + } else if (state == Prec) { + prec = ival; + } + sprintf(&fmt_ptr[--f], "%d", ival); + f = strlen(fmt_ptr); + } else if (isalpha(*fmt)) { + done = TRUE; + switch (*fmt) { + case 'Z': /* FALLTHRU */ + case 'h': /* FALLTHRU */ + case 'l': /* FALLTHRU */ + case 'L': /* FALLTHRU */ + done = FALSE; + type = *fmt; + break; + case 'o': /* FALLTHRU */ + case 'i': /* FALLTHRU */ + case 'd': /* FALLTHRU */ + case 'u': /* FALLTHRU */ + case 'x': /* FALLTHRU */ + case 'X': /* FALLTHRU */ + if (type == 'l') + VA_INTGR(long); + else if (type == 'Z') + VA_INTGR(size_t); + else + VA_INTGR(int); + used = 'i'; + break; + case 'f': /* FALLTHRU */ + case 'e': /* FALLTHRU */ + case 'E': /* FALLTHRU */ + case 'g': /* FALLTHRU */ + case 'G': /* FALLTHRU */ +#if 0 /* we don't need this, it doesn't work on SunOS 4.x */ + if (type == 'L') + VA_FLOAT(long double); + else +#endif + VA_FLOAT(double); + used = 'f'; + break; + case 'c': + VA_INTGR(int); + used = 'c'; + break; + case 's': + VA_POINT(char *); + if (prec < 0) + prec = strlen(pval); + used = 's'; + break; + case 'p': + VA_POINT(void *); + used = 'p'; + break; + case 'n': + VA_POINT(int *); + used = 0; + break; + default: + CTRACE(tfp, "unknown format character '%c' in %s\n", + *fmt, format); + break; + } + } else if (*fmt == '.') { + state = Prec; + } else if (*fmt == '%') { + done = TRUE; + used = '%'; + } + } + fmt_ptr[f] = '\0'; + + if (prec > 0) { + switch (used) { + case 'f': + if (width < prec + NUM_WIDTH) + width = prec + NUM_WIDTH; + case 'i': + case 'p': + if (width < prec + 2) + width = prec + 2; /* leading sign/space/zero, "0x" */ + case 'c': + case '%': + break; + default: + if (width < prec) + width = prec; + } + } + if (width >= (int)tmp_len) { + tmp_len = GROW_EXPR(tmp_len + width); + tmp_ptr = HTAlloc(tmp_ptr, tmp_len); + } + + switch (used) { + case 'i': + case 'c': + sprintf(tmp_ptr, fmt_ptr, ival); + break; + case 'f': + sprintf(tmp_ptr, fmt_ptr, fval); + break; + default: + sprintf(tmp_ptr, fmt_ptr, pval); + break; + } + need = dst_len + strlen(tmp_ptr) + 1; + if (need >= have) { + dst_ptr = HTAlloc(dst_ptr, have = GROW_EXPR(need)); + } + strcpy(dst_ptr + dst_len, tmp_ptr); + dst_len += strlen(tmp_ptr); + } else { + if ((dst_len + 2) >= have) { + dst_ptr = HTAlloc(dst_ptr, (have += GROW_SIZE)); + } + dst_ptr[dst_len++] = *fmt++; + } + } + + FREE(tmp_ptr); + FREE(fmt_ptr); + dst_ptr[dst_len] = '\0'; + if (pstr) + *pstr = dst_ptr; + return (dst_ptr); +} + +/* + * Replacement for sprintf, allocates buffer on the fly according to what's needed + * for its arguments. Unlike sprintf, this always concatenates to the destination + * buffer. + */ +#if ANSI_VARARGS +PUBLIC char * HTSprintf (char ** pstr, CONST char * fmt, ...) +#else +PUBLIC char * HTSprintf (va_alist) + va_dcl +#endif +{ + char *result = 0; + size_t inuse = 0; + va_list ap; + + LYva_start(ap,fmt); + { +#if !ANSI_VARARGS + char ** pstr = va_arg(ap, char **); + CONST char * fmt = va_arg(ap, CONST char *); +#endif + if (pstr != 0 && *pstr != 0) + inuse = strlen(*pstr); + result = StrAllocVsprintf(pstr, inuse, fmt, &ap); + } + va_end(ap); + + return (result); +} + +/* + * Replacement for sprintf, allocates buffer on the fly according to what's + * needed for its arguments. Like sprintf, this always resets the destination + * buffer. + */ +#if ANSI_VARARGS +PUBLIC char * HTSprintf0 (char ** pstr, CONST char * fmt, ...) +#else +PUBLIC char * HTSprintf0 (va_alist) + va_dcl +#endif +{ + char *result = 0; + va_list ap; + + LYva_start(ap,fmt); + { +#if !ANSI_VARARGS + char ** pstr = va_arg(ap, char **); + CONST char * fmt = va_arg(ap, CONST char *); +#endif + result = StrAllocVsprintf(pstr, 0, fmt, &ap); + } + va_end(ap); + + return (result); +} + +/* + * Returns a quoted or escaped form of the given parameter, suitable for use in + * a command string. + */ +#if USE_QUOTED_PARAMETER +#define S_QUOTE '\'' +#define D_QUOTE '"' +PUBLIC char *HTQuoteParameter ARGS1( + CONST char *, parameter) +{ + size_t i; + size_t last = strlen(parameter); + size_t n = 0; + size_t quoted = 0; + char * result; + + for (i=0; i < last; ++i) + if (strchr("\\&#$^*?(){}<>\"';`|", parameter[i]) != 0 + || isspace(parameter[i])) + ++quoted; + + result = (char *)malloc(last + 5*quoted + 3); + if (result == NULL) + outofmem(__FILE__, "HTQuoteParameter"); + + n = 0; + if (quoted) + result[n++] = S_QUOTE; + for (i = 0; i < last; i++) { + if (parameter[i] == S_QUOTE) { + result[n++] = S_QUOTE; + result[n++] = D_QUOTE; + result[n++] = parameter[i]; + result[n++] = D_QUOTE; + result[n++] = S_QUOTE; + } else if (parameter[i] == '\\') { + result[n++] = parameter[i]; + result[n++] = parameter[i]; + } else { + result[n++] = parameter[i]; + } + } + if (quoted) + result[n++] = S_QUOTE; + result[n] = '\0'; + return result; +} +#endif + +#define HTIsParam(string) ((string[0] == '%' && string[1] == 's')) + +/* + * Returns the number of "%s" tokens in a system command-template. + */ +PUBLIC int HTCountCommandArgs ARGS1( + CONST char *, command) +{ + int number = 0; + while (command[0] != 0) { + if (HTIsParam(command)) + number++; + command++; + } + return number; +} + +/* + * Returns a pointer into the given string after the given parameter number + */ +PRIVATE CONST char *HTAfterCommandArg ARGS2( + CONST char *, command, + int, number) +{ + while (number > 0) { + if (command[0] != 0) { + if (HTIsParam(command)) { + number--; + command++; + } + command++; + } else { + break; + } + } + return command; +} + +/* + * Like HTAddParam, but the parameter may be an environment variable, which we + * will expand and append. Do this only for things like the command-verb, + * where we obtain the parameter from the user's configuration. Any quoting + * required for the environment variable has to be done within its value, e.g., + * + * setenv EDITOR 'xvile -name "No such class"' + * + * This is useful only when we quote parameters, of course. + */ +#if USE_QUOTED_PARAMETER +PUBLIC void HTAddXpand ARGS4( + char **, result, + CONST char *, command, + int, number, + CONST char *, parameter) +{ + if (number > 0) { + CONST char *last = HTAfterCommandArg(command, number - 1); + CONST char *next = last; + + if (number <= 1) { + FREE(*result); + } + + while (next[0] != 0) { + if (HTIsParam(next)) { + if (next != last) { + size_t len = (next - last) + + ((*result != 0) ? strlen(*result) : 0); + HTSACat(result, last); + (*result)[len] = 0; + } + HTSACat(result, parameter); + CTRACE(tfp, "PARAM-EXP:%s\n", *result); + return; + } + next++; + } + } +} +#endif /* USE_QUOTED_PARAMETER */ + +/* + * Append string-parameter to a system command that we are constructing. The + * string is a complete parameter (which is a necessary assumption so we can + * quote it properly). We're given the index of the newest parameter we're + * processing. Zero indicates none, so a value of '1' indicates that we copy + * from the beginning of the command string up to the first parameter, + * substitute the quoted parameter and return the result. + * + * Parameters are substituted at "%s" tokens, like printf. Other printf-style + * tokens are not substituted; they are passed through without change. + */ +PUBLIC void HTAddParam ARGS4( + char **, result, + CONST char *, command, + int, number, + CONST char *, parameter) +{ + if (number > 0) { + CONST char *last = HTAfterCommandArg(command, number - 1); + CONST char *next = last; + char *quoted; + + if (number <= 1) { + FREE(*result); + } + if (parameter == 0) + parameter = ""; + while (next[0] != 0) { + if (HTIsParam(next)) { + if (next != last) { + size_t len = (next - last) + + ((*result != 0) ? strlen(*result) : 0); + HTSACat(result, last); + (*result)[len] = 0; + } +#if USE_QUOTED_PARAMETER + quoted = HTQuoteParameter(parameter); + HTSACat(result, quoted); + FREE(quoted); +#else + HTSACat(result, parameter); +#endif + CTRACE(tfp, "PARAM-ADD:%s\n", *result); + return; + } + next++; + } + } +} + +/* + * Append the remaining command-string to a system command (compare with + * HTAddParam). Any remaining "%s" tokens are copied as empty strings. + */ +PUBLIC void HTEndParam ARGS3( + char **, result, + CONST char *, command, + int, number) +{ + CONST char *last; + int count; + count = HTCountCommandArgs (command); + if (count < number) + number = count; + last = HTAfterCommandArg(command, number); + if (last[0] != 0) { + HTSACat(result, last); + } + CTRACE(tfp, "PARAM-END:%s\n", *result); +} diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTString.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTString.h index 0b2c23dcca6..2891b29544c 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTString.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTString.h @@ -1,4 +1,4 @@ -/* String handling for libwww +/* String handling for libwww STRINGS Case-independent string comparison and allocations with copies etc @@ -8,13 +8,29 @@ #define HTSTRING_H #ifndef HTUTILS_H -#include "HTUtils.h" +#include #endif /* HTUTILS_H */ extern int WWW_TraceFlag; /* Global flag for all W3 trace */ extern CONST char * HTLibraryVersion; /* String for help screen etc */ +/* + EBCDIC string comparison using ASCII collating sequence +*/ +#ifdef NOT_ASCII +extern int AS_casecomp PARAMS((CONST char *a, CONST char *b)); +extern int AS_ncmp PARAMS((CONST char *a, CONST char *b, unsigned int n)); +#define AS_cmp( a, b ) ( AS_ncmp( ( a ), ( b ), -1 ) ) +extern int AS_cmp PARAMS((CONST char *a, CONST char *b)); + +#else +#define AS_casecomp( a, b ) ( strcasecomp( ( a ), ( b ) ) ) +#define AS_ncmp( a, b, c ) ( strncmp( ( a ), ( b ), ( c ) ) ) +#define AS_cmp strcmp + +#endif /* NOT_ASCII */ + /* Case-insensitive string comparison @@ -53,11 +69,37 @@ extern char * HTNextField PARAMS ((char** pstr)); /* A more general parser - kw */ extern char * HTNextTok PARAMS((char ** pstr, - const char * delims, const char * bracks, char * found)); + CONST char * delims, CONST char * bracks, char * found)); + +#if ANSI_VARARGS +extern char * HTSprintf (char ** pstr, CONST char * fmt, ...) + GCC_PRINTFLIKE(2,3); +extern char * HTSprintf0 (char ** pstr, CONST char * fmt, ...) + GCC_PRINTFLIKE(2,3); +#else +extern char * HTSprintf () GCC_PRINTFLIKE(2,3); +extern char * HTSprintf0 () GCC_PRINTFLIKE(2,3); +#endif +#if defined(VMS) || defined(DOSPATH) || defined(__EMX__) +#define USE_QUOTED_PARAMETER 0 +#else +#define USE_QUOTED_PARAMETER 1 #endif -/* - end - - */ +#if USE_QUOTED_PARAMETER +extern char *HTQuoteParameter PARAMS((CONST char *parameter)); +extern void HTAddXpand PARAMS((char ** result, CONST char * command, int number, CONST char * parameter)); +#else +#define HTQuoteParameter(parameter) parameter /* simplify ifdef'ing */ +#define HTAddXpand(result,command,number,parameter) HTAddParam(result,command,number,parameter) +#endif + +extern int HTCountCommandArgs PARAMS((CONST char * command)); +extern void HTAddParam PARAMS((char ** result, CONST char * command, int number, CONST char * parameter)); +extern void HTEndParam PARAMS((char ** result, CONST char * command, int number)); + +/* Force an option, with leading blanks, to be appended without quoting them */ +#define HTOptParam(result, command, number, parameter) HTSACat(result, parameter) + +#endif /* HTSTRING_H */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTStyle.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTStyle.c index a5e242056b6..c5cabf78a11 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTStyle.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTStyle.c @@ -6,23 +6,22 @@ ** ** A StyleSheet is a collection of styles, defining the ** translation necessary to -** represent a document. It is a linked list of styles. +** represent a document. It is a linked list of styles. */ -#include "HTUtils.h" -#include "HTStyle.h" -#include "LYLeaks.h" +#include +#include -#define FREE(x) if (x) {free(x); x = NULL;} +#include /* Create a new style */ PUBLIC HTStyle* HTStyleNew NOARGS { HTStyle * self = (HTStyle *)malloc(sizeof(*self)); + if (self == NULL) + outofmem(__FILE__, "HTStyleNew"); memset((void *)self, 0, sizeof(*self)); - self->font = (HTFont) 0; - self->color = 0; return self; } @@ -73,6 +72,8 @@ HTStyle * HTStyleRead (HTStyle * style, HTStream * stream) if (gotpara) { if (!style->paragraph) { style->paragraph = malloc(sizeof(*(style->paragraph))); + if (!style->paragraph) + outofmem(__FILE__, "HTStyleRead"); style->paragraph->tabs = 0; } p = style->paragraph; @@ -87,6 +88,8 @@ HTStyle * HTStyleRead (HTStyle * style, HTStream * stream) &p->numTabs); FREE(p->tabs); p->tabs = malloc(p->numTabs * sizeof(p->tabs[0])); + if (!p->tabs) + outofmem(__FILE__, "HTStyleRead"); for (tab=0; tab < p->numTabs; tab++) { NXScanf(stream, "%hd%f", &p->tabs[tab].kind, @@ -142,27 +145,26 @@ HTStyle * HTStyleDump (HTStyle * style) { int tab; NXTextStyle *p = style->paragraph; - printf("Style %d `%s' SGML:%s. Font %s %.1f point.\n", + printf(STYLE_DUMP_FONT, style, style->name, style->SGMLTag, [style->font name], style->fontSize); if (p) { - printf( - "\tIndents: first=%.0f others=%.0f, Height=%.1f Desc=%.1f\n" - "\tAlign=%d, %d tabs. (%.0f before, %.0f after)\n", + printf(STYLE_DUMP_IDENT, p->indent1st, p->indent2nd, p->lineHt, - p->descentLine, + p->descentLine); + printf(STYLE_DUMP_ALIGN, p->alignment, p->numTabs, style->spaceBefore, style->spaceAfter); for (tab=0; tab < p->numTabs; tab++) { - printf("\t\tTab kind=%d at %.0f\n", + printf(STYLE_DUMP_TAB, p->tabs[tab].kind, p->tabs[tab].x); } @@ -184,7 +186,7 @@ HTStyle * HTStyleNamed ARGS2 (HTStyleSheet *,self, CONST char *,name) HTStyle * scan; for (scan=self->styles; scan; scan=scan->next) if (0==strcmp(scan->name, name)) return scan; - if (TRACE) fprintf(stderr, "StyleSheet: No style named `%s'\n", name); + CTRACE(tfp, "StyleSheet: No style named `%s'\n", name); return NULL; } @@ -202,7 +204,7 @@ HTStyle * HTStyleMatching (HTStyleSheet * self, HTStyle *style) ** ------------------------------------------ ** ** This heuristic is used for guessing the style for a run of -** text which has been pasted in. In order, we try: +** text which has been pasted in. In order, we try: ** ** A style whose paragraph structure is actually used by the run. ** A style matching in font @@ -235,8 +237,8 @@ HTStyle * HTStyleForRun (HTStyleSheet *self, NXRun *run) } } } - if (TRACE) fprintf(stderr, "HTStyleForRun: Best match for style is %d out of 18\n", - bestMatch); + CTRACE(tfp, "HTStyleForRun: Best match for style is %d out of 18\n", + bestMatch); return best; } #endif /* NEXT_SUPRESS */ @@ -286,6 +288,8 @@ HTStyleSheet * HTStyleSheetRemoveStyle ARGS2 HTStyleSheet * HTStyleSheetNew NOARGS { HTStyleSheet * self = (HTStyleSheet *)malloc(sizeof(*self)); + if (self == NULL) + outofmem(__FILE__, "HTStyleSheetNew"); memset((void*)self, 0, sizeof(*self)); /* ANSI */ /* Harbison c ref man says (char*)self @@ -325,7 +329,7 @@ HTStyleSheet * HTStyleSheetRead(HTStyleSheet * self, NXStream * stream) HTStyle * style; char styleName[80]; NXScanf(stream, " %d ", &numStyles); - if (TRACE) fprintf(stderr, "Stylesheet: Reading %d styles\n", numStyles); + CTRACE(tfp, "Stylesheet: Reading %d styles\n", numStyles); for (i=0; istyles; style; style=style->next) numStyles++; NXPrintf(stream, "%d\n", numStyles); - if (TRACE) fprintf(stderr, "StyleSheet: Writing %d styles\n", numStyles); + CTRACE(tfp, "StyleSheet: Writing %d styles\n", numStyles); for (style=self->styles; style; style=style->next) { NXPrintf(stream, "%s ", style->name); (void) HTStyleWrite(style, stream); diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTStyle.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTStyle.h index bbab0ea662c..0cc15895ed1 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTStyle.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTStyle.h @@ -5,7 +5,7 @@ physical representation. A StyleSheet is a collection of styles, defining the translation necessary to represent - a document. It is a linked list of styles. + a document. It is a linked list of styles. Overriding this module @@ -21,7 +21,7 @@ Overriding this module be compiled with a knowledge of the It we take it out of the library, then of course HTStyle could be declared as an - undefined structure. The only references to it are in the structure-flattening code + undefined structure. The only references to it are in the structure-flattening code HTML.c and HTPlain.c, which only use HTStypeNamed(). You can in any case override this function in your own code, which will prevent the @@ -32,30 +32,10 @@ Overriding this module #ifndef HTStyle_H #define HTStyle_H -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ -#include "HTAnchor.h" +#include typedef long int HTFont; /* Dummy definition instead */ -#ifdef SHORT_NAMES -#define HTStyleNew HTStNew -#define HTStyleFree HTStFree -#define HTStyleRead HTStRead -#define HTStyleWrite HTStWrite -#define HTStyleSheetNew HTStShNe -#define HTStyleSheetFree HTStShFr -#define HTStyleNamed HTStName -#define HTStyleForParagraph HTStFoPa -#define HTStyleMatching HTStMatc -#define HTStyleForRun HTStFoRu -#define HTStyleSheetAddStyle HTStShAd -#define HTStyleSheetRemoveStyle HTStShRm -#define HTStyleSheetRead HTStShRe -#define HTStyleSheetWrite HTStShWr -#endif - #ifdef NeXT_suppressed #include typedef NXCoord HTCoord; diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTCP.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTCP.c index dab7ab7373e..1a6b2621502 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTCP.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTCP.c @@ -16,21 +16,23 @@ ** 16 Jul 95 S. Bjorndahl added kluge to deal with LIBCMU bug */ -#include "HTUtils.h" -#include "tcp.h" /* Defines SHORT_NAMES if necessary */ -#include "HTAccess.h" -#include "HTParse.h" -#include "HTAlert.h" -#include "HTTCP.h" +#include +#include +#include +#include +#include /* added for no_suspend */ +#include #ifdef NSL_FORK #include #include #endif /* NSL_FORK */ -#define FREE(x) if (x) {free(x); x = NULL;} +#ifdef HAVE_RESOLV_H +#include +#endif -extern int HTCheckForInterrupt NOPARAMS; +#define OK_HOST(p) ((p) != 0 && ((p)->h_length) != 0) #ifdef SVR4_BSDSELECT PUBLIC int BSDselect PARAMS(( @@ -51,13 +53,7 @@ PUBLIC int BSDselect PARAMS(( #endif /* SOCKS */ #endif /* SVR4_BSDSELECT */ -#include "LYLeaks.h" - -#ifdef SHORT_NAMES -#define HTInetStatus HTInStat -#define HTInetString HTInStri -#define HTParseInet HTPaInet -#endif /* SHORT_NAMES */ +#include #ifndef FD_SETSIZE #if defined(UCX) || defined(SOCKETSHR_TCP) || defined(CMU_TCP) @@ -117,6 +113,19 @@ extern int sys_nerr; #endif /* !PCNFS */ +#ifdef _WINDOWS_NSL + char host[512]; + struct hostent *phost; /* Pointer to host - See netdb.h */ + int donelookup; + +unsigned long _fork_func (void *arglist) +{ + phost = gethostbyname(host); + donelookup = TRUE; + return (unsigned long)(phost); +} +#endif /* _WINDOWS_NSL */ + #if defined(VMS) && defined(UCX) /* ** A routine to mimic the ioctl function for UCX. @@ -298,6 +307,738 @@ PUBLIC CONST char * HTInetString ARGS1( } #endif /* !DECNET */ +/* Check whether string is a valid Internet hostname - kw +** ------------------------------------------------- +** +** Checks whether +** - contains only valid chars for domain names (actually, the +** restrictions are somewhat relaxed), +** - no leading dots or empty segments, +** - max. length of dot-separated segment <= 63 (RFC 1034,1035), +** - total length <= 254 (if it ends with dot) or 253 (otherwise) +** [an interpretation of RFC 1034,1035, although RFC 1123 +** suggests 255 as limit - kw]. +** +** Note: user (before '@') and port (after ':') components from +** host part of URL should be already stripped (if appropriate) +** from the input string. +** +** On exit, +** returns 1 if valid, otherwise 0. +*/ +PUBLIC BOOL valid_hostname ARGS1( + CONST char *, name) +{ + int i=1, iseg = 0; + CONST char *cp = name; + if (!(name && *name)) + return NO; + for (; (*cp && i <= 253); cp++, i++) { + if (*cp == '.') { + if (iseg == 0) { + return NO; + } else { + iseg = 0; + continue; + } + } else if (++iseg > 63) { + return NO; + } + if (!isalnum((unsigned char)*cp) && + *cp != '-' && *cp != '_' && + *cp != '$' && *cp != '+') { + return NO; + } + } + return (*cp == '\0' || (*cp == '.' && iseg != 0 && cp[1] == '\0')); +} + +#ifdef NSL_FORK +/* +** Function to allow us to be killed with a normal signal (not +** SIGKILL), but don't go through normal libc exit() processing, which +** would screw up parent's stdio. -BL +*/ +PRIVATE void quench ARGS1( + int, sig GCC_UNUSED) +{ + _exit(2); +} +#endif /* NSL_FORK */ + +PUBLIC int lynx_nsl_status = HT_OK; + +#ifndef DJGPP /* much excluded! */ + +#define DEBUG_HOSTENT /* disable in case of problems */ +#define DEBUG_HOSTENT_CHILD /* for NSL_FORK, may screw up trace file */ + +/* +** Two auxiliary functions for name lookup and struct hostent. +** +** dump_hostent - dumps the contents of a struct hostent to the +** trace log or stderr, including all pointer values, strings, and +** addresses, in a format inspired by gdb's print format. - kw +*/ +PRIVATE void dump_hostent ARGS2( + CONST char *, msgprefix, + CONST struct hostent *, phost) +{ + if (TRACE) { + int i; + char **pcnt; + CTRACE(tfp,"%s: %p ", msgprefix, phost); + if (phost) { + CTRACE(tfp,"{ h_name = %p", phost->h_name); + if (phost->h_name) { + CTRACE(tfp, " \"%s\",", phost->h_name); + } else { + CTRACE(tfp, ","); + } + CTRACE(tfp,"\n\t h_aliases = %p", phost->h_aliases); + if (phost->h_aliases) { + CTRACE(tfp, " {"); + for (pcnt = phost->h_aliases; *pcnt; pcnt++) { + CTRACE(tfp,"%s %p \"%s\"", + (pcnt == phost->h_aliases ? " " : ", "), + *pcnt, *pcnt); + } + CTRACE(tfp, "%s0x0 },\n\t", + (*phost->h_aliases ? ", " : " ")); + } else { + CTRACE(tfp, ",\n\t"); + } + CTRACE(tfp," h_addrtype = %d,", phost->h_addrtype); + CTRACE(tfp," h_length = %d,\n\t", phost->h_length); + CTRACE(tfp," h_addr_list = %p", phost->h_addr_list); + if (phost->h_addr_list) { + CTRACE(tfp, " {"); + for (pcnt = phost->h_addr_list; *pcnt; pcnt++) { + CTRACE(tfp,"%s %p", + (pcnt == phost->h_addr_list ? "" : ","), + *pcnt); + for (i = 0; i < phost->h_length; i++) { + CTRACE(tfp, "%s%d%s", (i==0 ? " \"" : "."), + (int)*((unsigned char *)(*pcnt)+i), + (i+1 == phost->h_length ? "\"" : "")); + } + } + if (*phost->h_addr_list) { + CTRACE(tfp, ", 0x0 } }"); + } else { + CTRACE(tfp, " 0x0 } }"); + } + } else { + CTRACE(tfp, "}"); + } + } + CTRACE(tfp,"\n"); + fflush(tfp); + } +} + +/* +** fill_rehostent - copies as much as possible relevant content from +** the struct hostent pointed to by phost to the char buffer given +** by rehostent, subject to maximum output length rehostentsize, +** following pointers and building self-contained output which can be +** cast to a struct hostent. - kw +** See also description of LYGetHostByName. +*/ +PRIVATE size_t fill_rehostent ARGS3( + char *, rehostent, + size_t, rehostentsize, + CONST struct hostent *, phost) +{ + int num_addrs = 0; + int num_aliases = 0; + char **pcnt; + char *p_next_char; + char **p_next_charptr; + size_t name_len = 0; + size_t required_per_addr; + size_t curlen = sizeof(struct hostent); + size_t available = rehostentsize - curlen; + size_t chk_available, mem_this_alias, required_this_alias; + int i_addr, i_alias; + + if (!phost) + return 0; + required_per_addr = phost->h_length + sizeof(char *); + if (phost->h_addr_list) + available -= sizeof(phost->h_addr_list[0]); + if (phost->h_aliases) + available -= sizeof(phost->h_aliases[0]); + if (phost->h_name) + available--; + if (phost->h_addr_list) { + if (phost->h_addr_list[0]) { + if (available >= required_per_addr) { + num_addrs++; + available -= required_per_addr; + } + } + } + if (phost->h_name) { + name_len = strlen(phost->h_name); + if (available >= name_len) { + available -= name_len; + } else { + name_len = 0; + } + } + if (num_addrs) { + for (pcnt=phost->h_addr_list+1; *pcnt; pcnt++) { + if (available >= required_per_addr) { + num_addrs++; + available -= required_per_addr; + } else { + break; + } + } + } + chk_available = available; + if (phost->h_aliases) { + for (pcnt=phost->h_aliases; *pcnt; pcnt++) { + required_this_alias = sizeof(phost->h_aliases[0]) + + strlen(*pcnt) + 1; + if (chk_available >= required_this_alias) { + num_aliases++; + chk_available -= required_this_alias; + } + } + } + + ((struct hostent *)rehostent)->h_addrtype = phost->h_addrtype; + ((struct hostent *)rehostent)->h_length = phost->h_length; + p_next_charptr = (char **)(rehostent + curlen); + p_next_char = rehostent + curlen; + if (phost->h_addr_list) + p_next_char += (num_addrs+1) * sizeof(phost->h_addr_list[0]); + if (phost->h_aliases) + p_next_char += (num_aliases+1) * sizeof(phost->h_aliases[0]); + + if (phost->h_addr_list) { + ((struct hostent *)rehostent)->h_addr_list = p_next_charptr; + for (pcnt=phost->h_addr_list, i_addr = 0; + i_addr < num_addrs; + pcnt++, i_addr++) { + memcpy(p_next_char, *pcnt, sizeof(phost->h_addr_list[0])); + *p_next_charptr++ = p_next_char; + p_next_char += sizeof(phost->h_addr_list[0]); + } + *p_next_charptr++ = NULL; + } else { + ((struct hostent *)rehostent)->h_addr_list = NULL; + } + + if (phost->h_name) { + ((struct hostent *)rehostent)->h_name = p_next_char; + if (name_len) { + strcpy(p_next_char, phost->h_name); + p_next_char += name_len + 1; + } else { + *p_next_char++ = '\0'; + } + } else { + ((struct hostent *)rehostent)->h_name = NULL; + } + + if (phost->h_aliases) { + ((struct hostent *)rehostent)->h_aliases = p_next_charptr; + for (pcnt=phost->h_aliases, i_alias = 0; + (*pcnt && i_alias < num_addrs); + pcnt++, i_alias++) { + mem_this_alias = strlen(*pcnt) + 1; + required_this_alias = sizeof(phost->h_aliases[0]) + + mem_this_alias; + if (available >= required_this_alias) { + i_alias++; + available -= required_this_alias; + strcpy(p_next_char, *pcnt); + *p_next_charptr++ = p_next_char; + p_next_char += mem_this_alias; + } + p_next_char += sizeof(phost->h_aliases[0]); + } + *p_next_charptr++ = NULL; + } else { + ((struct hostent *)rehostent)->h_aliases = NULL; + } + curlen = p_next_char - (char *)rehostent; + return curlen; +} + +#define REHOSTENT_SIZE 128 /* not bigger than pipe buffer! */ + +#ifndef HAVE_H_ERRNO +#undef h_errno +#define h_errno my_errno +static int my_errno; +#else /* we do HAVE_H_ERRNO: */ +extern int h_errno; +#endif + +/* Resolve an internet hostname, like gethostbyname +** ------------------------------------------------ +** +** On entry, +** str points to the given host name, not numeric address, +** without colon or port number. +** +** On exit, +** returns a pointer to a struct hostent in static storage, +** or NULL in case of error or user interruption. +** +** The interface is intended to be exactly the same as for (Unix) +** gethostbyname(), except for the following: +** +** If NSL_FORK is not used, the result of gethostbyname is returned +** directly. Otherwise: +** All lists, addresses, and strings referred to by pointers in the +** returned struct are located, together with the returned struct +** itself, in a buffer of size REHOSTENT_SIZE. If not everything fits, +** some info is omitted, but the function is careful to still return +** a valid structure, without truncating strings; it tries to return, +** in order of decreasing priority, the first address (h_addr), the +** official name (h_name), the additional addresses, then alias names. +** +** If NULL is returned, the reason is made available in the global +** variable lynx_nsl_status, with one of the following values: +** HT_INTERRUPTED Interrupted by user +** HT_NOT_ACCEPTABLE Hostname detected as invalid +** (also sets h_errno) +** HT_H_ERRNO_VALID An error occurred, and h_errno holds +** an appropriate value +** HT_ERROR Resolver error, reason not known +** HT_INTERNAL Internal error +*/ +PUBLIC struct hostent * LYGetHostByName ARGS1( + CONST char *, str) +{ +#ifndef _WINDOWS_NSL + CONST char *host = str; +#endif /* _WINDOWS_NSL */ +#ifdef NSL_FORK + /* for transfer of result between from child to parent: */ + static struct { + struct hostent h; + char rest[REHOSTENT_SIZE]; + } aligned_full_rehostent; + /* + * We could define rehosten directly as a + * static char rehostent[REHOSTENT_SIZE], + * but the indirect approach via the above struct + * should automatically take care of alignment requirements. + * Note that, in addition, + * - this must be static, as we shall return a pointer to it + * which must remain valid, and + * - we have to use the same rehostent in the child process as + * in the parent (its address in the parent's address space + * must be the same as in the child's, otherwise the internal + * pointers built by the child's call to fill_rehostent would + * be invalid when seen by the parent). - kw + */ + char *rehostent = (char *)&aligned_full_rehostent; + + /* for transfer of status from child to parent: */ + struct _statuses { + size_t rehostentlen; + int h_length; + int child_errno; /* maybe not very useful */ + int child_h_errno; + BOOL h_errno_valid; + } statuses; + + size_t rehostentlen = 0; +#endif /* NSL_FORK */ + + struct hostent *result_phost = NULL; + + if (!str) { + CTRACE(tfp, "LYGetHostByName: Can't parse `NULL'.\n"); + lynx_nsl_status = HT_INTERNAL; + return NULL; + } + CTRACE(tfp, "LYGetHostByName: parsing `%s'.\n", str); + + /* Could disable this if all our callers already check - kw */ + if (HTCheckForInterrupt()) { + CTRACE (tfp, "LYGetHostByName: INTERRUPTED for '%s'.\n", str); + lynx_nsl_status = HT_INTERRUPTED; + return NULL; + } + + if (!valid_hostname(host)) { + lynx_nsl_status = HT_NOT_ACCEPTABLE; +#ifdef NO_RECOVERY + h_errno = NO_RECOVERY; +#endif + return NULL; + } + +#ifdef _WINDOWS_NSL + strncpy(host, str, (size_t)512); +#else + host = str; +#endif /* _WINDOWS_NSL */ + +#ifdef MVS /* Outstanding problem with crash in MVS gethostbyname */ + CTRACE(tfp, "LYGetHostByName: Calling gethostbyname(%s)\n", host); +#endif /* MVS */ + + CTRACE_FLUSH(tfp); /* so child messages will not mess parent log */ + + lynx_nsl_status = HT_INTERNAL; /* should be set to something else below */ + +#ifdef NSL_FORK + statuses.h_errno_valid = NO; + /* + ** Start block for fork-based gethostbyname() with + ** checks for interrupts. - Tom Zerucha (tz@execpc.com) & FM + */ + { + int got_rehostent = 0; + /* + ** Pipe, child pid, status buffers, start time, select() + ** control variables. + */ + pid_t fpid, waitret; + int pfd[2], selret, readret, waitstat = 0; + time_t start_time = time(NULL); + fd_set readfds; + struct timeval timeout; + int dns_patience = 30; /* how many seconds will we wait for DNS? */ + int child_exited = 0; + + /* + ** Reap any children that have terminated since last time + ** through. This might include children that we killed, + ** then waited with WNOHANG before they were actually ready + ** to be reaped. (Should be max of 1 in this state, but + ** the loop is safe if waitpid() is implemented correctly: + ** returns 0 when children exist but none have exited; -1 + ** with errno == ECHILD when no children.) -BL + */ + do { + waitret = waitpid(-1, 0, WNOHANG); + } while (waitret > 0 || (waitret == -1 && errno == EINTR)); + waitret = 0; + + pipe(pfd); + + if ((fpid = fork()) == 0 ) { + struct hostent *phost; /* Pointer to host - See netdb.h */ + /* + ** Child - for the long call. + ** + ** Make sure parent can kill us at will. -BL + */ + (void) signal(SIGTERM, quench); + + /* + ** Also make sure the child does not run one of the + ** signal handlers that may have been installed by + ** Lynx if one of those signals occurs. For example + ** we don't want the child to remove temp files on + ** ^C, let the parent deal with that. - kw + */ + (void) signal(SIGINT, quench); +#ifndef NOSIGHUP + (void) signal(SIGHUP, quench); +#endif /* NOSIGHUP */ +#ifdef SIGTSTP + if (no_suspend) + (void) signal(SIGTSTP, SIG_IGN); + else + (void) signal(SIGTSTP, SIG_DFL); +#endif /* SIGTSTP */ +#ifdef SIGWINCH + (void) signal(SIGWINCH, SIG_IGN); +#endif /* SIGWINCH */ +#ifndef __linux__ +#ifndef DOSPATH + signal(SIGBUS, SIG_DFL); +#endif /* DOSPATH */ +#endif /* !__linux__ */ + signal(SIGSEGV, SIG_DFL); + signal(SIGILL, SIG_DFL); + + /* + ** Child won't use read side. -BL + */ + close(pfd[0]); + phost = gethostbyname(host); + statuses.child_h_errno = h_errno; + statuses.h_errno_valid = YES; +#ifdef MVS + CTRACE(tfp, "LYGetHostByName: gethostbyname() returned %d\n", phost); +#endif /* MVS */ + +#ifdef DEBUG_HOSTENT_CHILD + dump_hostent("CHILD gethostbyname", phost); +#endif + if (OK_HOST(phost)) { + rehostentlen = fill_rehostent(rehostent, REHOSTENT_SIZE, phost); +#ifdef DEBUG_HOSTENT_CHILD + dump_hostent("CHILD fill_rehostent", (struct hostent *)rehostent); +#endif + } + if (rehostentlen <= sizeof(struct hostent) || + !OK_HOST((struct hostent *)rehostent)) { + rehostentlen = 0; + statuses.h_length = 0; + } else { + statuses.h_length = ((struct hostent *)rehostent)->h_length; + } + /* + ** Send variables indicating status of lookup to parent. + ** That includes rehostentlen, which the parent will use + ** as the size for the second read (if > 0). + */ + statuses.child_errno = errno; + statuses.rehostentlen = rehostentlen; + write(pfd[1], &statuses, sizeof(statuses)); + + + if (rehostentlen) { + /* + ** Return our resulting rehostent through pipe... + */ + write(pfd[1], rehostent, rehostentlen); + _exit(0); + } else { + /* + ** ... or return error as exit code. + */ + _exit(1); + } + } + + /* + ** (parent) Wait until lookup finishes, or interrupt, + ** or cycled too many times (just in case) -BL + */ + + close(pfd[1]); /* parent won't use write side -BL */ + + if (fpid < 0) { /* fork failed */ + close(pfd[0]); + goto failed; + } + + while (child_exited || time(NULL) - start_time < dns_patience) { + + FD_ZERO(&readfds); + /* + ** This allows us to abort immediately, not after 1-second + ** timeout, when user hits abort key. Can't do this when + ** using SLANG (or at least I don't know how), so SLANG + ** users must live with up-to-1s timeout. -BL + ** + ** Whoops -- we need to make sure stdin is actually + ** selectable! /dev/null isn't, on some systems, which + ** makes some useful Lynx invocations fail. -BL + */ + { + int kbd_fd = LYConsoleInputFD(TRUE); + if (kbd_fd != INVSOC) { + FD_SET(kbd_fd, &readfds); + } + } + + timeout.tv_sec = 1; + timeout.tv_usec = 0; + FD_SET(pfd[0], &readfds); + + /* + ** Return when data received, interrupted, or failed. + ** If nothing is waiting, we sleep for 1 second in + ** select(), to be nice to the system. -BL + */ +#ifdef SOCKS + if (socks_flag) + selret = Rselect(pfd[0] + 1, (void *)&readfds, NULL, NULL, &timeout); + else +#endif /* SOCKS */ + selret = select(pfd[0] + 1, (void *)&readfds, NULL, NULL, &timeout); + + if ((selret > 0) && FD_ISSET(pfd[0], &readfds)) { + /* + ** First get status, including length of address. -BL, kw + */ + readret = read(pfd[0], &statuses, sizeof(statuses)); + if (readret == sizeof(statuses)) { + h_errno = statuses.child_h_errno; + errno = statuses.child_errno; + if (statuses.h_errno_valid) + lynx_nsl_status = HT_H_ERRNO_VALID; + if (statuses.rehostentlen > sizeof(struct hostent)) { + /* + ** Then get the full reorganized hostent. -BL, kw + */ + readret = read(pfd[0], rehostent, statuses.rehostentlen); +#ifdef DEBUG_HOSTENT + dump_hostent("Read from pipe", (struct hostent *)rehostent); +#endif + if (readret == (int) statuses.rehostentlen) { + got_rehostent = 1; + result_phost = (struct hostent *)rehostent; + lynx_nsl_status = HT_OK; + } else if (!statuses.h_errno_valid) { + lynx_nsl_status = HT_INTERNAL; + } + } + } else { + lynx_nsl_status = HT_ERROR; + } + /* + ** Make sure child is cleaned up. -BL + */ + if (!child_exited) + waitret = waitpid(fpid, &waitstat, WNOHANG); + if (!WIFEXITED(waitstat) && !WIFSIGNALED(waitstat)) { + kill(fpid, SIGTERM); + waitret = waitpid(fpid, &waitstat, WNOHANG); + } + break; + } + + /* + ** Clean up if child exited before & no data received. -BL + */ + if (child_exited) { + waitret = waitpid(fpid, &waitstat, WNOHANG); + break; + } + /* + ** If child exited, loop once more looking for data. -BL + */ + if ((waitret = waitpid(fpid, &waitstat, WNOHANG)) > 0) { + /* + ** Data will be arriving right now, so make sure we + ** don't short-circuit out for too many loops, and + ** skip the interrupt check. -BL + */ + child_exited = 1; + continue; + } + + /* + ** Abort if interrupt key pressed. + */ + if (HTCheckForInterrupt()) { + CTRACE(tfp, "LYGetHostByName: INTERRUPTED gethostbyname.\n"); + kill(fpid, SIGTERM); + waitpid(fpid, NULL, WNOHANG); + close(pfd[0]); + lynx_nsl_status = HT_INTERRUPTED; + return NULL; + } + } + close(pfd[0]); + if (waitret <= 0) { + kill(fpid, SIGTERM); + waitret = waitpid(fpid, &waitstat, WNOHANG); + } + if (waitret > 0) { + if (WIFEXITED(waitstat)) { + CTRACE(tfp, "LYGetHostByName: NSL_FORK child %d exited, status 0x%x.\n", + (int)waitret, waitstat); + } else if (WIFSIGNALED(waitstat)) { + CTRACE(tfp, "LYGetHostByName: NSL_FORK child %d got signal, status 0x%x!\n", + (int)waitret, waitstat); +#ifdef WCOREDUMP + if (WCOREDUMP(waitstat)) { + CTRACE(tfp, "LYGetHostByName: NSL_FORK child %d dumped core!\n", + (int)waitret); + } +#endif /* WCOREDUMP */ + } else if (WIFSTOPPED(waitstat)) { + CTRACE(tfp, "LYGetHostByName: NSL_FORK child %d is stopped, status 0x%x!\n", + (int)waitret, waitstat); + } + } + if (!got_rehostent) { + goto failed; + } + } +#else /* Not NSL_FORK: */ + +#ifdef _WINDOWS_NSL + { +#ifdef __BORLANDC__ + HANDLE hThread, dwThreadID; +#else + unsigned long hThread, dwThreadID; +#endif /* __BORLANDC__ */ + phost = (struct hostent *) NULL; + hThread = CreateThread((void *)NULL, 4096UL, +#ifdef __BORLANDC__ + (LPTHREAD_START_ROUTINE)_fork_func, +#else + (unsigned long (*)())_fork_func, +#endif /* __BORLANDC__ */ + (void *)NULL, 0UL, (unsigned long *)&dwThreadID); + if (!hThread) + MessageBox((void *)NULL, "CreateThread", + "CreateThread Failed", 0L); + + donelookup = FALSE; + while (!donelookup) + if (HTCheckForInterrupt()) + { + /* Note that host is a character array and is not freed */ + /* to avoid possible subthread problems: */ + if (!CloseHandle(hThread)) + MessageBox((void *)NULL, "CloseHandle","CloseHandle Failed", + 0L); + lynx_nsl_status = HT_INTERRUPTED; + return NULL; + }; + if (phost) { + lynx_nsl_status = HT_OK; + result_phost = phost; + } else { + lynx_nsl_status = HT_ERROR; + goto failed; + } + }; + +#else /* !NSL_FORK, !_WINDOWS_NSL: */ + { + struct hostent *phost; + phost = gethostbyname((char *)host); /* See netdb.h */ +#ifdef MVS + CTRACE(tfp, "LYGetHostByName: gethostbyname() returned %d\n", phost); +#endif /* MVS */ + if (phost) { + lynx_nsl_status = HT_OK; + result_phost = phost; + } else { + lynx_nsl_status = HT_H_ERRNO_VALID; + goto failed; + } + } +#endif /* !NSL_FORK, !_WINDOWS_NSL */ +#endif /* !NSL_FORK */ + +#ifdef DEBUG_HOSTENT + dump_hostent("End of LYGetHostByName", result_phost); + CTRACE(tfp, "LYGetHostByName: Resolved name to a hostent.\n"); +#endif + + return result_phost; /* OK */ + +failed: + CTRACE(tfp, "LYGetHostByName: Can't find internet node name `%s'.\n", + host); + return NULL; +} + +#endif /* from here on DJGPP joins us again. */ + + /* Parse a network node address and port ** ------------------------------------- ** @@ -307,7 +1048,7 @@ PUBLIC CONST char * HTInetString ARGS1( ** soc_in points to the binary internet or decnet address field. ** ** On exit, -** *soc_in is filled in. If no port is specified in str, that +** *soc_in is filled in. If no port is specified in str, that ** field is left unchanged in *soc_in. */ PUBLIC int HTParseInet ARGS2( @@ -315,24 +1056,25 @@ PUBLIC int HTParseInet ARGS2( CONST char *, str) { char *port; - char *host = NULL; int dotcount_ip = 0; /* for dotted decimal IP addr */ - struct hostent *phost; /* Pointer to host - See netdb.h */ +#ifndef _WINDOWS_NSL + char *host = NULL; +#endif /* _WINDOWS_NSL */ if (!str) { - if (TRACE) { - fprintf(stderr, "HTParseInet: Can't parse `NULL'.\n"); - } + CTRACE(tfp, "HTParseInet: Can't parse `NULL'.\n"); return -1; } + CTRACE(tfp, "HTParseInet: parsing `%s'.\n", str); if (HTCheckForInterrupt()) { - if (TRACE) { - fprintf (stderr, "HTParseInet: INTERRUPTED for '%s'.\n", str); - } + CTRACE (tfp, "HTParseInet: INTERRUPTED for '%s'.\n", str); return -1; } +#ifdef _WINDOWS_NSL + strncpy(host, str, (size_t)512); +#else StrAllocCopy(host, str); /* Make a copy we can mutilate */ - +#endif /* _WINDOWS_NSL */ /* ** Parse port number if present. */ @@ -353,8 +1095,8 @@ PUBLIC int HTParseInet ARGS2( struct servent * serv = getservbyname(port, (char*)0); if (serv) { soc_in->sin_port = serv->s_port; - } else if (TRACE) { - fprintf(stderr, "TCP: Unknown service %s\n", port); + } else { + CTRACE(tfp, "TCP: Unknown service %s\n", port); } #endif /* SUPPRESS */ } @@ -367,11 +1109,8 @@ PUBLIC int HTParseInet ARGS2( */ soc_in->sdn_nam.n_len = min(DN_MAXNAML, strlen(host)); /* <=6 in phase 4 */ strncpy(soc_in->sdn_nam.n_name, host, soc_in->sdn_nam.n_len + 1); - if (TRACE) { - fprintf(stderr, - "DECnet: Parsed address as object number %d on host %.6s...\n", + CTRACE(tfp, "DECnet: Parsed address as object number %d on host %.6s...\n", soc_in->sdn_objnum, host); - } #else /* parse Internet host: */ if (*host >= '0' && *host <= '9') { /* Test for numeric node address: */ @@ -402,224 +1141,102 @@ PUBLIC int HTParseInet ARGS2( #else #ifdef GUSI soc_in->sin_addr = inet_addr(host); /* See netinet/in.h */ +#else +#ifdef HAVE_INET_ATON + if (!inet_aton(host, &(soc_in->sin_addr))) { + CTRACE(tfp, "inet_aton(%s) returns error\n", host); +#ifndef _WINDOWS_NSL + FREE(host); +#endif /* _WINDOWS_NSL */ + return -1; + } #else soc_in->sin_addr.s_addr = inet_addr(host); /* See arpa/inet.h */ +#endif /* HAVE_INET_ATON */ #endif /* GUSI */ #endif /* DGUX_OLD */ #endif /* DJGPP */ +#ifndef _WINDOWS_NSL FREE(host); +#endif /* _WINDOWS_NSL */ } else { /* Alphanumeric node name: */ + #ifdef MVS /* Outstanding problem with crash in MVS gethostbyname */ - if (TRACE) { - fprintf(stderr, - "HTParseInet: Calling gethostbyname(%s)\n", host); - } + CTRACE(tfp, "HTParseInet: Calling LYGetHostByName(%s)\n", host); #endif /* MVS */ -#ifdef NSL_FORK - /* - ** Start block for fork-based gethostbyname() with - ** checks for interrupts. - Tom Zerucha (tz@execpc.com) & FM - */ - { - /* - ** Pipe, child pid, and status buffers. - */ - pid_t fpid, waitret = (pid_t)0; - int pfd[2], cstat, cst1 = 0; - - pipe(pfd); - - if ((fpid = fork()) == 0 ) { - /* - ** Child - for the long call. - */ - phost = gethostbyname(host); - cst1 = 0; - /* - ** Return value (or nulls). - */ - if (phost != NULL) - write(pfd[1], phost->h_addr, phost->h_length); - else - write(pfd[1], &cst1, 4); - /* - ** Return an error code. - */ - _exit(phost == NULL); - } - - /* - ** (parent) Wait until lookup finishes, or interrupt. - */ - cstat = 0; - while (cstat <= 0) { - /* - ** Exit when data sent. - */ - IOCTL(pfd[0], FIONREAD, &cstat); - if (cstat > 0) - break; - /* - ** Exit if child exited. - */ - if ((waitret = waitpid(fpid, &cst1, WNOHANG)) > 0) { - break; - } - /* - ** Abort if interrupt key pressed. - */ - if (HTCheckForInterrupt()) { - if (TRACE) { - fprintf(stderr, - "HTParseInet: INTERRUPTED gethostbyname.\n"); - } - kill(fpid , SIGKILL); - waitpid(fpid, NULL, 0); - FREE(host); - close(pfd[0]); - close(pfd[1]); - return HT_INTERRUPTED; - } - /* - ** Be nice to the system. - */ - sleep(1); - } - if (waitret <= 0) { - waitret = waitpid(fpid, &cst1, WNOHANG); - } - if (TRACE) { - if (WIFEXITED(cst1)) { - fprintf(stderr, - "HTParseInet: NSL_FORK child %d exited, status 0x%x.\n", - (int)waitret, cst1); - } else if (WIFSIGNALED(cst1)) { - fprintf(stderr, - "HTParseInet: NSL_FORK child %d got signal, status 0x%x!\n", - (int)waitret, cst1); -#ifdef WCOREDUMP - if (WCOREDUMP(cst1)) { - fprintf(stderr, - "HTParseInet: NSL_FORK child %d dumped core!\n", - (int)waitret); - } -#endif /* WCOREDUMP */ - } else if (WIFSTOPPED(cst1)) { - fprintf(stderr, - "HTParseInet: NSL_FORK child %d is stopped, status 0x%x!\n", - (int)waitret, cst1); - } - } - /* - ** Read as much as we can - should be the address. - */ - IOCTL(pfd[0], FIONREAD, &cstat); - if (cstat < 4) { - if (TRACE) { - fprintf(stderr, - "HTParseInet: NSL_FORK child returns only %d bytes.\n", - cstat); - fprintf(stderr, - " Trying again without forking.\n"); - } - phost = gethostbyname(host); /* See netdb.h */ - if (!phost) { - if (TRACE) { - fprintf(stderr, - "HTParseInet: Can't find internet node name `%s'.\n", - host); - } - memset((void *)&soc_in->sin_addr, 0, sizeof(soc_in->sin_addr)); - } else { - memcpy((void *)&soc_in->sin_addr, - phost->h_addr, phost->h_length); - } -#ifdef NOTDEFINED - cstat = read(pfd[0], (void *)&soc_in->sin_addr , 4); -#endif /* NOTDEFINED */ - } else { - cstat = read(pfd[0], (void *)&soc_in->sin_addr , cstat); - } - close(pfd[0]); - close(pfd[1]); - } - if (soc_in->sin_addr.s_addr == 0) { - if (TRACE) { - fprintf(stderr, - "HTParseInet: Can't find internet node name `%s'.\n", - host); - } +#ifdef DJGPP + if (!valid_hostname(host)) { FREE(host); - return -1; + return HT_NOT_ACCEPTABLE; /* only HTDoConnect checks this. */ } - FREE(host); -#ifdef MVS - if (TRACE) { - fprintf(stderr, - "HTParseInet: gethostbyname() returned %d\n", phost); - } -#endif /* MVS */ - -#else /* Not NSL_FORK: */ -#ifdef DJGPP soc_in->sin_addr.s_addr = htonl(resolve(host)); - FREE(host); if (soc_in->sin_addr.s_addr == 0) { - if (TRACE) - fprintf(stderr, - "HTTPAccess: Can't find internet node name `%s'.\n",host); - return -1; /* Fail? */ + goto failed; } +#else /* !DJGPP: */ +#ifdef _WINDOWS_NSL + phost = LYGetHostByName(host); /* See above */ + if (!phost) goto failed; + memcpy((void *)&soc_in->sin_addr, phost->h_addr, phost->h_length); +#else /* !DJGPP, !_WINDOWS_NSL: */ + { + struct hostent *phost; + phost = LYGetHostByName(host); /* See above */ + + if (!phost) goto failed; +#if defined(VMS) && defined(CMU_TCP) + /* + ** In LIBCMU, phost->h_length contains not the length of one address + ** (four bytes) but the number of bytes in *h_addr, i.e., some multiple + ** of four. Thus we need to hard code the value here, and remember to + ** change it if/when IP addresses change in size. :-( LIBCMU is no + ** longer supported, and CMU users are encouraged to obtain and use + ** SOCKETSHR/NETLIB instead. - S. Bjorndahl + */ + memcpy((void *)&soc_in->sin_addr, phost->h_addr, 4); #else - phost = gethostbyname(host); /* See netdb.h */ -#ifdef MVS - if (TRACE) { - fprintf(stderr, - "HTParseInet: gethostbyname() returned %d\n", phost); - } -#endif /* MVS */ - if (!phost) { - if (TRACE) { - fprintf(stderr, - "HTParseInet: Can't find internet node name `%s'.\n", - host); + if (!phost) goto failed; + if (phost->h_length != sizeof soc_in->sin_addr) { + HTAlwaysAlert(host, gettext("Address length looks invalid")); } - FREE(host); - return -1; /* Fail? */ + memcpy((void *)&soc_in->sin_addr, phost->h_addr, phost->h_length); +#endif /* VMS && CMU_TCP */ } +#endif /* !DJGPP, !_WINDOWS_NSL */ +#endif /* !DJGPP */ +#ifndef _WINDOWS_NSL FREE(host); -#if defined(VMS) && defined(CMU_TCP) - /* - ** In LIBCMU, phost->h_length contains not the length of one address - ** (four bytes) but the number of bytes in *h_addr, i.e. some multiple - ** of four. Thus we need to hard code the value here, and remember to - ** change it if/when IP addresses change in size. :-( LIBCMU is no - ** longer supported, and CMU users are encouraged to obtain and use - ** SOCKETSHR/NETLIB instead. - S. Bjorndahl - */ - memcpy((void *)&soc_in->sin_addr, phost->h_addr, 4); -#else - memcpy((void *)&soc_in->sin_addr, phost->h_addr, phost->h_length); -#endif /* VMS && CMU_TCP */ -#endif /* DJGPP */ -#endif /* NSL_FORK */ - } +#endif /* _WINDOWS_NSL */ - if (TRACE) { - fprintf(stderr, - "HTParseInet: Parsed address as port %d, IP address %d.%d.%d.%d\n", + } /* Alphanumeric node name */ + + CTRACE(tfp, "HTParseInet: Parsed address as port %d, IP address %d.%d.%d.%d\n", (int)ntohs(soc_in->sin_port), (int)*((unsigned char *)(&soc_in->sin_addr)+0), (int)*((unsigned char *)(&soc_in->sin_addr)+1), (int)*((unsigned char *)(&soc_in->sin_addr)+2), (int)*((unsigned char *)(&soc_in->sin_addr)+3)); - } #endif /* Internet vs. Decnet */ return 0; /* OK */ + +failed: + CTRACE(tfp, "HTParseInet: Can't find internet node name `%s'.\n", + host); +#ifndef _WINDOWS_NSL + FREE(host); +#endif /* _WINDOWS_NSL */ + switch (lynx_nsl_status) { + case HT_NOT_ACCEPTABLE: + case HT_INTERRUPTED: + return lynx_nsl_status; + default: + return -1; +} } +#ifdef LY_FIND_LEAKS /* Free our name for the host on which we are - FM ** ------------------------------------------- ** @@ -628,6 +1245,7 @@ PRIVATE void free_HTTCP_hostname NOARGS { FREE(hostname); } +#endif /* LY_FIND_LEAKS */ /* Derive the name of the host on which we are ** ------------------------------------------- @@ -652,7 +1270,9 @@ PRIVATE void get_host_details NOARGS return; /* Already done */ gethostname(name, namelength); /* Without domain */ StrAllocCopy(hostname, name); +#ifdef LY_FIND_LEAKS atexit(free_HTTCP_hostname); +#endif #ifdef UCX /* ** UCX doesn't give the complete domain name. @@ -671,16 +1291,15 @@ PRIVATE void get_host_details NOARGS #ifndef DECNET /* Decnet ain't got no damn name server 8#OO */ #ifdef NEED_HOST_ADDRESS /* no -- needs name server! */ phost = gethostbyname(name); /* See netdb.h */ - if (!phost) { - if (TRACE) fprintf(stderr, - "TCP: Can't find my own internet node address for `%s'!!\n", - name); + if (!OK_HOST(phost)) { + CTRACE(tfp, "TCP: Can't find my own internet node address for `%s'!!\n", + name); return; /* Fail! */ } StrAllocCopy(hostname, phost->h_name); memcpy(&HTHostAddress, &phost->h_addr, phost->h_length); - if (TRACE) fprintf(stderr, " Name server says that I am `%s' = %s\n", - hostname, HTInetString(&HTHostAddress)); + CTRACE(tfp, " Name server says that I am `%s' = %s\n", + hostname, HTInetString(&HTHostAddress)); #endif /* NEED_HOST_ADDRESS */ #endif /* !DECNET */ @@ -714,6 +1333,7 @@ PUBLIC int HTDoConnect ARGS4( /* ** Set up defaults. */ + memset(soc_in, 0, sizeof(*soc_in)); soc_in->sin_family = AF_INET; soc_in->sin_port = htons(default_port); @@ -731,16 +1351,22 @@ PUBLIC int HTDoConnect ARGS4( } FREE(p1); - line = (char *)calloc(1, (strlen(host) + strlen(protocol) + 128)); - if (line == NULL) - outofmem(__FILE__, "HTDoConnect"); - sprintf (line, "Looking up %s.", host); + HTSprintf0 (&line, gettext("Looking up %s."), host); _HTProgress (line); status = HTParseInet(soc_in, host); if (status) { if (status != HT_INTERRUPTED) { - sprintf (line, "Unable to locate remote host %s.", host); - _HTProgress(line); + if (status == HT_NOT_ACCEPTABLE) { + /* Not HTProgress, so warning won't be overwritten + * immediately; but not HTAlert, because typically + * there will be other alerts from the callers. - kw + */ + HTUserMsg2(gettext("Invalid hostname %s"), host); + } else { + HTSprintf0 (&line, + gettext("Unable to locate remote host %s."), host); + _HTProgress(line); + } status = HT_NO_DATA; } FREE(host); @@ -748,17 +1374,17 @@ PUBLIC int HTDoConnect ARGS4( return status; } - sprintf (line, "Making %s connection to %s.", protocol, host); + HTSprintf0 (&line, gettext("Making %s connection to %s."), protocol, host); _HTProgress (line); FREE(host); + FREE(line); /* ** Now, let's get a socket set up from the server for the data. */ *s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (*s == -1) { - HTAlert("socket failed."); - FREE(line); + HTAlert(gettext("socket failed.")); return HT_NO_DATA; } @@ -777,7 +1403,7 @@ PUBLIC int HTDoConnect ARGS4( int ret = IOCTL(*s, FIONBIO, &val); #endif /* USE_FCNTL */ if (ret == -1) - _HTProgress("Could not make connection non-blocking."); + _HTProgress(gettext("Could not make connection non-blocking.")); } #endif /* !NO_IOCTL || USE_FCNTL */ #endif /* !DOSPATH */ @@ -831,12 +1457,15 @@ PUBLIC int HTDoConnect ARGS4( ** Protect against an infinite loop. */ if (tries++ >= 180000) { - HTAlert("Connection failed for 180,000 tries."); - FREE(line); + HTAlert(gettext("Connection failed for 180,000 tries.")); return HT_NO_DATA; } +#ifdef _WINDOWS_NSL + timeout.tv_sec = 100; +#else timeout.tv_sec = 0; +#endif /* _WINDOWS_NSL */ timeout.tv_usec = 100000; FD_ZERO(&writefds); FD_SET(*s, &writefds); @@ -934,8 +1563,7 @@ PUBLIC int HTDoConnect ARGS4( } } if (HTCheckForInterrupt()) { - if (TRACE) - fprintf(stderr, "*** INTERRUPTED in middle of connect.\n"); + CTRACE(tfp, "*** INTERRUPTED in middle of connect.\n"); status = HT_INTERRUPTED; SOCKET_ERRNO = EINTR; break; @@ -963,12 +1591,11 @@ PUBLIC int HTDoConnect ARGS4( int ret = IOCTL(*s, FIONBIO, &val); #endif /* USE_FCNTL */ if (ret == -1) - _HTProgress("Could not restore socket to blocking."); + _HTProgress(gettext("Could not restore socket to blocking.")); } #endif /* !NO_IOCTL || USE_FCNTL */ #endif /* !DOSPATH */ - FREE(line); return status; } @@ -984,10 +1611,22 @@ PUBLIC int HTDoRead ARGS3( fd_set readfds; struct timeval timeout; int tries=0; -#ifdef UCX +#if defined(UNIX) || defined(UCX) int nb; #endif /* UCX, BSN */ +#ifdef UNIX + if (fildes == 0) { + /* + * 0 can be a valid socket fd, but if it's a tty something must + * have gone wrong. - kw + */ + if (isatty(fildes)) { + CTRACE(tfp, "HTDoRead - refusing to read fd 0 which is a tty!\n"); + return -1; + } + } else +#endif if (fildes <= 0) return -1; @@ -1006,7 +1645,7 @@ PUBLIC int HTDoRead ARGS3( ** Protect against an infinite loop. */ if (tries++ >= 180000) { - HTAlert("Socket read failed for 180,000 tries."); + HTAlert(gettext("Socket read failed for 180,000 tries.")); SOCKET_ERRNO = EINTR; return HT_INTERRUPTED; } @@ -1041,8 +1680,25 @@ PUBLIC int HTDoRead ARGS3( } #if !defined(UCX) || !defined(VAXC) +#ifdef UNIX + while ((nb = SOCKET_READ (fildes, buf, nbyte)) == -1) { + int saved_errno = errno; + if (errno == EINTR) + continue; +#ifdef ERESTARTSYS + if (errno == ERESTARTSYS) + continue; +#endif /* ERESTARTSYS */ + HTInetStatus("read"); + errno = saved_errno; /* our caller may check it */ + break; + } + return nb; +#else /* UNIX */ return SOCKET_READ (fildes, buf, nbyte); -#else +#endif /* !UNIX */ + +#else /* UCX && VAXC */ /* ** VAXC and UCX problem only. */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTCP.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTCP.h index b4dab1d6d88..4e43ed27cd8 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTCP.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTCP.h @@ -1,24 +1,16 @@ /* /Net/dxcern/userd/timbl/hypertext/WWW/Library/src/HTTCP.html GENERIC TCP/IP COMMUNICATION - + This module has the common code for handling TCP/IP connections etc. - + */ #ifndef HTTCP_H #define HTTCP_H #ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ -#include "tcp.h" - -#ifdef SHORT_NAMES -#define HTInetStatus HTInStat -#define HTInetString HTInStri -#define HTParseInet HTPaInet +#include #endif - - + /* Produce a string for an internet address ** --------------------------------------- ** @@ -27,11 +19,7 @@ ** it is to be kept. */ #ifndef _WINDOWS -#ifdef __STDC__ - extern const char * HTInetString(struct sockaddr_in* mysin); -#else - extern char * HTInetString(); -#endif +extern CONST char * HTInetString PARAMS((struct sockaddr_in* mysin)); #endif @@ -76,6 +64,33 @@ extern unsigned int HTCardinal PARAMS((int *pstatus, char **pp, unsigned int max_value)); +/* Check whether string is a valid Internet hostname +** ------------------------------------------------- +*/ + +extern BOOL valid_hostname PARAMS((CONST char * name)); + +/* Resolve an internet hostname, like gethostbyname +** ------------------------------------------------ +** +** On entry, +** str points to the given host name, not numeric address, +** without colon or port number. +** +** On exit, +** returns a pointer to a struct hostent in static storage, +** or NULL in case of error or user interruption. +** +** The interface is intended to be the same as for gethostbyname(), +** but additional status is returned in lynx_nsl_status. +*/ +extern int lynx_nsl_status; + +#ifndef DJGPP +extern struct hostent * LYGetHostByName PARAMS(( + CONST char * str)); +#endif /* DJGPP */ + /* Parse an internet node address and port ** --------------------------------------- @@ -86,7 +101,7 @@ extern unsigned int HTCardinal PARAMS((int *pstatus, ** sin points to the binary internet or decnet address field. ** ** On exit: -** *sin is filled in. If no port is specified in str, that +** *sin is filled in. If no port is specified in str, that ** field is left unchanged in *sin. */ #ifdef __STDC__ @@ -115,6 +130,3 @@ extern int HTDoRead PARAMS(( unsigned nbyte)); #endif /* HTTCP_H */ -/* - - End. */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTP.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTP.c index d13549110d0..96067a51750 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTP.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTP.c @@ -6,10 +6,9 @@ ** 28 Apr 1997 AJL,FM Do Proxy Authorisation. */ -#include "HTUtils.h" -#include "tcp.h" - -#include "HTTP.h" +#include +#include +#include #define HTTP_VERSION "HTTP/1.0" @@ -17,25 +16,25 @@ #define HTTPS_PORT 443 #define SNEWS_PORT 563 -#define INIT_LINE_SIZE 1024 /* Start with line buffer this big */ +#define INIT_LINE_SIZE 1536 /* Start with line buffer this big */ #define LINE_EXTEND_THRESH 256 /* Minimum read size */ #define VERSION_LENGTH 20 /* for returned protocol version */ -#include "HTParse.h" -#include "HTTCP.h" -#include "HTFormat.h" -#include "HTFile.h" -#include -#include "HTAlert.h" -#include "HTMIME.h" -#include "HTML.h" -#include "HTInit.h" -#include "HTAABrow.h" - -#include "LYGlobalDefs.h" -#include "LYLeaks.h" - -/* #define TRACE 1 */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include struct _HTStream { @@ -57,7 +56,7 @@ PUBLIC char * redirecting_url = NULL; /* Location: value. */ PUBLIC BOOL permanent_redirection = FALSE; /* Got 301 status? */ PUBLIC BOOL redirect_post_content = FALSE; /* Don't convert to GET? */ -extern char LYUserSpecifiedURL; /* Is the URL a goto? */ +extern BOOLEAN LYUserSpecifiedURL; /* Is the URL a goto? */ extern BOOL keep_mime_headers; /* Include mime headers and force source dump */ extern BOOL no_url_redirection; /* Don't follow Location: URL for */ @@ -65,18 +64,6 @@ extern char *http_error_file; /* Store HTTP status code in this file */ extern BOOL traversal; /* TRUE if we are doing a traversal */ extern BOOL dump_output_immediately; /* TRUE if no interactive user */ -extern char * HTLoadedDocumentURL NOPARAMS; -extern int HTCheckForInterrupt NOPARAMS; -extern void LYSetCookie PARAMS(( - CONST char * SetCookie, - CONST char * SetCookie2, - CONST char * address)); -extern char * LYCookie PARAMS(( - CONST char * hostname, - CONST char * path, - int port, - BOOL secure)); - #define HTTP_NETREAD(a, b, c, d) NETREAD(a, b, c) #define HTTP_NETWRITE(a, b, c, d) NETWRITE(a, b, c) #define HTTP_NETCLOSE(a, b) (void)NETCLOSE(a) @@ -143,12 +130,12 @@ PRIVATE int HTLoadHTTP ARGS4 ( if (!url) { status = -3; - _HTProgress ("Bad request."); + _HTProgress (BAD_REQUEST); goto done; } if (!*url) { status = -2; - _HTProgress ("Bad request."); + _HTProgress (BAD_REQUEST); goto done; } @@ -165,7 +152,6 @@ try_again: ** so we can start over here... */ eol = 0; - bytes_already_read = 0; had_header = NO; length = 0; doing_redirect = FALSE; @@ -177,7 +163,7 @@ try_again: if (!strncmp(url, "https", 5)) { - HTAlert("This client does not contain support for HTTPS URLs."); + HTAlert(gettext("This client does not contain support for HTTPS URLs.")); status = HT_NOT_LOADED; goto done; } @@ -186,19 +172,15 @@ try_again: /* ** Interrupt cleanly. */ - if (TRACE) - fprintf (stderr, - "HTTP: Interrupted on connect; recovering cleanly.\n"); - _HTProgress ("Connection interrupted."); - status = HT_NOT_LOADED; - goto done; - } - if (status < 0) { - if (TRACE) - fprintf(stderr, - "HTTP: Unable to connect to remote host for `%s' (errno = %d).\n", + CTRACE (tfp, "HTTP: Interrupted on connect; recovering cleanly.\n"); + _HTProgress (CONNECTION_INTERRUPTED); + status = HT_NOT_LOADED; + goto done; + } + if (status < 0) { + CTRACE(tfp, "HTTP: Unable to connect to remote host for `%s' (errno = %d).\n", url, SOCKET_ERRNO); - HTAlert("Unable to connect to remote host."); + HTAlert(gettext("Unable to connect to remote host.")); status = HT_NOT_LOADED; goto done; } @@ -313,8 +295,7 @@ try_again: strcpy(line, pref_charset); if (line[strlen(line)-1] == ',') line[strlen(line)-1] = '\0'; - for (i = 0; line[i]; i++) - line[i] = TOLOWER(line[i]); + LYLowerCase(line); if (strstr(line, "iso-8859-1") == NULL) strcat(line, ", iso-8859-1;q=0.01"); if (strstr(line, "us-ascii") == NULL) @@ -324,14 +305,34 @@ try_again: StrAllocCat(command, line); } +#if 0 /* ** Promote 300 (Multiple Choices) replies, if supported, ** over 406 (Not Acceptable) replies. - FM + ** + ** This used to be done in versions 2.7 and 2.8*, but violates + ** the specs for transparent content negotiation and has the + ** effect that servers supporting those specs will send 300 + ** (Multiple Choices) instead of a normal response (e.g. 200 OK), + ** since they will assume that the client wants to make the + ** choice. It is not clear whether there are any servers or sites + ** for which sending this header really improves anything. + ** + ** If there ever is a need to send "Negotiate: trans" and really + ** mean it, we should send "Negotiate: trans,trans" or similar, + ** since that is semantically equivalent and some servers may + ** ignore "Negotiate: trans" as a special case when it comes from + ** Lynx (to work around the old faulty behavior). - kw + ** + ** References: + ** RFC 2295 (see also RFC 2296), and mail to lynx-dev and + ** new-httpd@apache.org from Koen Holtman, Jan 1999. */ if (!do_post) { sprintf(line, "Negotiate: trans%c%c", CR, LF); StrAllocCat(command, line); } +#endif /* 0 */ /* ** When reloading give no-cache pragma to proxy server to make @@ -441,8 +442,7 @@ try_again: */ sprintf(line, "%s%c%c", auth, CR, LF); StrAllocCat(command, line); - if (TRACE) - fprintf(stderr, "HTTP: Sending authorization: %s\n", auth); + CTRACE(tfp, "HTTP: Sending authorization: %s\n", auth); } else if (auth && *auth == '\0') { /* ** If auth is a zero-length string, the user either @@ -450,25 +450,22 @@ try_again: ** prompt. - FM */ if (!(traversal || dump_output_immediately) && - HTConfirm( - "Proceed without a username and password?")) { + HTConfirm(CONFIRM_WO_PASSWORD)) { show_401 = TRUE; } else { if (traversal || dump_output_immediately) - HTAlert( - "Can't proceed without a username and password."); + HTAlert(FAILED_NEED_PASSWD); FREE(command); FREE(hostname); FREE(docname); + FREE(abspath); FREE(host2); FREE(path2); status = HT_NOT_LOADED; goto done; } } else { - if (TRACE) - fprintf(stderr, - "HTTP: Not sending authorization (yet).\n"); + CTRACE(tfp, "HTTP: Not sending authorization (yet).\n"); } /* ** Add 'Cookie:' header, if it's HTTP or HTTPS @@ -501,9 +498,7 @@ try_again: */ StrAllocCat(command, "Cookie2: $Version=\"1\""); StrAllocCat(command, crlf); - if (TRACE) - fprintf(stderr, - "HTTP: Sending Cookie2: $Version =\"1\"\n"); + CTRACE(tfp, "HTTP: Sending Cookie2: $Version =\"1\"\n"); } if (*cookie != '\0') { /* @@ -514,8 +509,7 @@ try_again: StrAllocCat(command, "Cookie: "); StrAllocCat(command, cookie); StrAllocCat(command, crlf); - if (TRACE) - fprintf(stderr, "HTTP: Sending Cookie: %s\n", cookie); + CTRACE(tfp, "HTTP: Sending Cookie: %s\n", cookie); } FREE(cookie); } @@ -540,9 +534,7 @@ try_again: */ sprintf(line, "%s%c%c", auth, CR, LF); StrAllocCat(command, line); - if (TRACE) - fprintf(stderr, - (auth_proxy ? + CTRACE(tfp, (auth_proxy ? "HTTP: Sending proxy authorization: %s\n" : "HTTP: Sending authorization: %s\n"), auth); @@ -552,8 +544,7 @@ try_again: ** cancelled or goofed at the username and password ** prompt. - FM */ - if (!(traversal || dump_output_immediately) && - HTConfirm("Proceed without a username and password?")) { + if (!(traversal || dump_output_immediately) && HTConfirm(CONFIRM_WO_PASSWORD)) { if (auth_proxy == TRUE) { show_407 = TRUE; } else { @@ -561,7 +552,7 @@ try_again: } } else { if (traversal || dump_output_immediately) - HTAlert("Can't proceed without a username and password."); + HTAlert(FAILED_NEED_PASSWD); FREE(command); FREE(hostname); FREE(docname); @@ -569,9 +560,7 @@ try_again: goto done; } } else { - if (TRACE) - fprintf(stderr, - (auth_proxy ? + CTRACE(tfp, (auth_proxy ? "HTTP: Not sending proxy authorization (yet).\n" : "HTTP: Not sending authorization (yet).\n")); } @@ -581,12 +570,10 @@ try_again: auth_proxy = NO; } - if (do_post) - { - if (TRACE) - fprintf (stderr, "HTTP: Doing post, content-type '%s'\n", - anAnchor->post_content_type ? anAnchor->post_content_type - : "lose"); + if (do_post) { + CTRACE (tfp, "HTTP: Doing post, content-type '%s'\n", + anAnchor->post_content_type ? anAnchor->post_content_type + : "lose"); sprintf (line, "Content-type: %s%c%c", anAnchor->post_content_type ? anAnchor->post_content_type : "lose", CR, LF); @@ -609,21 +596,24 @@ try_again: else StrAllocCat(command, crlf); /* Blank line means "end" of headers */ - if (TRACE) { - fprintf (stderr, - "Writing:\n%s%s----------------------------------\n", + CTRACE (tfp, "Writing:\n%s%s----------------------------------\n", command, (anAnchor->post_data ? crlf : "")); - } - _HTProgress ("Sending HTTP request."); + _HTProgress (gettext("Sending HTTP request.")); +#ifdef NOT_ASCII /* S/390 -- gil -- 0548 */ + { char *p; + + for ( p = command; p < command + strlen(command); p++ ) + *p = TOASCII(*p); + } +#endif /* NOT_ASCII */ status = HTTP_NETWRITE(s, command, (int)strlen(command), handle); FREE(command); if (status <= 0) { if (status == 0) { - if (TRACE) - fprintf (stderr, "HTTP: Got status 0 in initial write\n"); + CTRACE (tfp, "HTTP: Got status 0 in initial write\n"); /* Do nothing. */ } else if ((SOCKET_ERRNO == ENOTCONN || SOCKET_ERRNO == ECONNRESET || @@ -633,28 +623,23 @@ try_again: /* ** Arrrrgh, HTTP 0/1 compability problem, maybe. */ - if (TRACE) - fprintf (stderr, - "HTTP: BONZO ON WRITE Trying again with HTTP0 request.\n"); - _HTProgress ("Retrying as HTTP0 request."); + CTRACE (tfp, "HTTP: BONZO ON WRITE Trying again with HTTP0 request.\n"); + _HTProgress (RETRYING_AS_HTTP0); HTTP_NETCLOSE(s, handle); extensions = NO; already_retrying = TRUE; goto try_again; } else { - if (TRACE) - fprintf (stderr, - "HTTP: Hit unexpected network WRITE error; aborting connection.\n"); + CTRACE (tfp, "HTTP: Hit unexpected network WRITE error; aborting connection.\n"); HTTP_NETCLOSE(s, handle); status = -1; - HTAlert("Unexpected network write error; connection aborted."); + HTAlert(gettext("Unexpected network write error; connection aborted.")); goto done; } } - if (TRACE) - fprintf (stderr, "HTTP: WRITE delivered OK\n"); - _HTProgress ("HTTP request sent; waiting for response."); + CTRACE (tfp, "HTTP: WRITE delivered OK\n"); + _HTProgress (gettext("HTTP request sent; waiting for response.")); /* Read the first line of the response ** ----------------------------------- @@ -665,7 +650,10 @@ try_again: int buffer_length = INIT_LINE_SIZE; line_buffer = (char *)calloc(1, (buffer_length * sizeof(char))); + if (line_buffer == NULL) + outofmem(__FILE__, "HTLoadHTTP"); + HTReadProgress (bytes_already_read = 0, 0); do {/* Loop to read in the first line */ /* ** Extend line buffer if necessary for those crazy WAIS URLs ;-) @@ -674,23 +662,22 @@ try_again: buffer_length = buffer_length + buffer_length; line_buffer = (char *)realloc(line_buffer, (buffer_length * sizeof(char))); + if (line_buffer == NULL) + outofmem(__FILE__, "HTLoadHTTP"); } - if (TRACE) - fprintf (stderr, "HTTP: Trying to read %d\n", + CTRACE (tfp, "HTTP: Trying to read %d\n", buffer_length - length - 1); status = HTTP_NETREAD(s, line_buffer + length, buffer_length - length - 1, handle); - if (TRACE) - fprintf (stderr, "HTTP: Read %d\n", status); + CTRACE (tfp, "HTTP: Read %d\n", status); if (status <= 0) { /* * 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"); - _HTProgress ("Connection interrupted."); + CTRACE (tfp, "HTTP: Interrupted initial read.\n"); + _HTProgress (CONNECTION_INTERRUPTED); HTTP_NETCLOSE(s, handle); status = HT_NO_DATA; goto clean_up; @@ -702,32 +689,35 @@ try_again: /* ** Arrrrgh, HTTP 0/1 compability problem, maybe. */ - if (TRACE) - fprintf (stderr, - "HTTP: BONZO Trying again with HTTP0 request.\n"); + CTRACE (tfp, "HTTP: BONZO Trying again with HTTP0 request.\n"); HTTP_NETCLOSE(s, handle); FREE(line_buffer); FREE(line_kept_clean); extensions = NO; already_retrying = TRUE; - _HTProgress ("Retrying as HTTP0 request."); + _HTProgress (RETRYING_AS_HTTP0); goto try_again; } else { - if (TRACE) - fprintf (stderr, - "HTTP: Hit unexpected network read error; aborting connection; status %d.\n", + CTRACE (tfp, "HTTP: Hit unexpected network read error; aborting connection; status %d.\n", status); - HTAlert("Unexpected network read error; connection aborted."); + HTAlert(gettext("Unexpected network read error; connection aborted.")); HTTP_NETCLOSE(s, handle); status = -1; goto clean_up; } } +#ifdef NOT_ASCII /* S/390 -- gil -- 0564 */ + { char *p; + + for ( p = line_buffer + length; p < line_buffer + length + status; p++ ) + *p = FROMASCII(*p); + } +#endif /* NOT_ASCII */ + bytes_already_read += status; - sprintf (line, "Read %d bytes of data.", bytes_already_read); - HTProgress (line); + HTReadProgress (bytes_already_read, 0); #ifdef UCX /* UCX returns -1 on EOF */ if (status == 0 || status == -1) @@ -743,6 +733,8 @@ try_again: if (line_buffer) { FREE(line_kept_clean); line_kept_clean = (char *)malloc(buffer_length * sizeof(char)); + if (line_kept_clean == NULL) + outofmem(__FILE__, "HTLoadHTTP"); memcpy(line_kept_clean, line_buffer, buffer_length); } @@ -768,11 +760,10 @@ try_again: } /* Scope of loop variables */ - /* We now have a terminated unfolded line. Parse it. - ** ------------------------------------------------- + /* We now have a terminated unfolded line. Parse it. + ** -------------------------------------------------- */ - if (TRACE) - fprintf(stderr, "HTTP: Rx: %s\n", line_buffer); + CTRACE(tfp, "HTTP: Rx: %s\n", line_buffer); /* ** Kludge to work with old buggy servers and the VMS Help gateway. @@ -788,11 +779,10 @@ try_again: FREE(line_kept_clean); extensions = NO; already_retrying = TRUE; - if (TRACE) - fprintf(stderr, "HTTP: close socket %d to retry with HTTP0\n", s); + CTRACE(tfp, "HTTP: close socket %d to retry with HTTP0\n", s); HTTP_NETCLOSE(s, handle); /* print a progress message */ - _HTProgress ("Retrying as HTTP0 request."); + _HTProgress (RETRYING_AS_HTTP0); goto try_again; } @@ -808,8 +798,7 @@ try_again: server_version, &server_status); - if (TRACE) - fprintf (stderr, "HTTP: Scanned %d fields from line_buffer\n", fields); + CTRACE (tfp, "HTTP: Scanned %d fields from line_buffer\n", fields); if (http_error_file) { /* Make the status code externally available */ FILE *error_file; @@ -837,12 +826,11 @@ try_again: server_version[3] != 'P' || server_version[4] != '/' || server_version[6] != '.') { /* - * Ugh! An HTTP0 reply, + * Ugh! An HTTP0 reply, */ HTAtom * encoding; - if (TRACE) - fprintf (stderr, "--- Talking HTTP0.\n"); + CTRACE (tfp, "--- Talking HTTP0.\n"); format_in = HTFileFormat(url, &encoding, NULL); /* @@ -851,27 +839,19 @@ try_again: ** without looking at content. */ if (!strncmp(HTAtom_name(format_in), "text/plain",10)) { - if (TRACE) - fprintf(stderr, - "HTTP: format_in being changed to text/HTML\n"); + CTRACE(tfp, "HTTP: format_in being changed to text/HTML\n"); format_in = WWW_HTML; } if (!IsUnityEnc(encoding)) { /* ** Change the format to that for "www/compressed". */ - if (TRACE) { - fprintf(stderr, - "HTTP: format_in is '%s',\n", HTAtom_name(format_in)); - } + CTRACE(tfp, "HTTP: format_in is '%s',\n", HTAtom_name(format_in)); StrAllocCopy(anAnchor->content_type, HTAtom_name(format_in)); StrAllocCopy(anAnchor->content_encoding, HTAtom_name(encoding)); format_in = HTAtom_for("www/compressed"); - if (TRACE) { - fprintf(stderr, - " Treating as '%s' with encoding '%s'\n", + CTRACE(tfp, " Treating as '%s' with encoding '%s'\n", "www/compressed", HTAtom_name(encoding)); - } } start_of_data = line_kept_clean; @@ -880,8 +860,7 @@ try_again: ** Set up to decode full HTTP/1.n response. - FM */ format_in = HTAtom_for("www/mime"); - if (TRACE) - fprintf (stderr, "--- Talking HTTP1.\n"); + CTRACE (tfp, "--- Talking HTTP1.\n"); /* ** We set start_of_data to "" when !eol here because there @@ -916,7 +895,7 @@ try_again: ** so we'll deal with them by showing the full ** header to the user as text/plain. - FM */ - HTAlert("Got unexpected Informational Status."); + HTAlert(gettext("Got unexpected Informational Status.")); do_head = TRUE; break; @@ -941,7 +920,6 @@ try_again: HTTP_NETCLOSE(s, handle); status = HT_NO_DATA; goto clean_up; - break; case 205: /* @@ -951,11 +929,10 @@ try_again: * user to do that, and restore the current * document. - FM */ - HTAlert("Request fulfilled. Reset Content."); + HTAlert(gettext("Request fulfilled. Reset Content.")); HTTP_NETCLOSE(s, handle); status = HT_NO_DATA; goto clean_up; - break; case 206: /* @@ -968,7 +945,6 @@ try_again: HTTP_NETCLOSE(s, handle); status = HT_NO_DATA; goto clean_up; - break; default: /* @@ -1043,7 +1019,7 @@ try_again: * with it by showing the full header to the user * as text/plain. - FM */ - HTAlert("Got unexpected 304 Not Modified status."); + HTAlert(gettext("Got unexpected 304 Not Modified status.")); do_head = TRUE; break; } @@ -1112,7 +1088,7 @@ try_again: HTTP_NETCLOSE(s, handle); status = -1; HTAlert( - "Redirection of POST content requires user approval."); + gettext("Redirection of POST content requires user approval.")); if (traversal) HTProgress(line_buffer); goto clean_up; @@ -1125,6 +1101,13 @@ try_again: while ((status = HTTP_NETREAD(s, line_buffer, (INIT_LINE_SIZE - 1), handle)) > 0) { +#ifdef NOT_ASCII /* S/390 -- gil -- 0581 */ + { char *p; + + for ( p = line_buffer; p < line_buffer + status; p++ ) + *p = FROMASCII(*p); + } +#endif /* NOT_ASCII */ line_buffer[status] = '\0'; StrAllocCat(line_kept_clean, line_buffer); } @@ -1133,9 +1116,8 @@ try_again: /* * Impatient user. - FM */ - if (TRACE) - fprintf (stderr, "HTTP: Interrupted followup read.\n"); - _HTProgress ("Connection interrupted."); + CTRACE (tfp, "HTTP: Interrupted followup read.\n"); + _HTProgress (CONNECTION_INTERRUPTED); status = HT_INTERRUPTED; goto clean_up; } @@ -1147,11 +1129,9 @@ try_again: * Don't make the redirection permanent * if we have POST content. - FM */ - if (TRACE) - fprintf(stderr, - "HTTP: Have POST content. Treating 301 (Permanent) as Temporary.\n"); + CTRACE(tfp, "HTTP: Have POST content. Treating 301 (Permanent) as Temporary.\n"); HTAlert( - "Have POST content. Treating Permanent Redirection as Temporary.\n"); + gettext("Have POST content. Treating Permanent Redirection as Temporary.\n")); } else { permanent_redirection = TRUE; } @@ -1367,9 +1347,7 @@ Cookie2_continuation: * thus is probably something in the body, so * we'll show the user what was returned. - FM */ - if (TRACE) - fprintf(stderr, - "HTTP: 'Location:' is zero-length!\n"); + CTRACE(tfp, "HTTP: 'Location:' is zero-length!\n"); if (cp1) *cp1 = LF; if (cp2) @@ -1377,7 +1355,7 @@ Cookie2_continuation: bad_location = TRUE; FREE(redirecting_url); HTAlert( - "Got redirection with a bad Location header."); + gettext("Got redirection with a bad Location header.")); HTProgress(line_buffer); break; } @@ -1388,9 +1366,7 @@ Cookie2_continuation: * seek the document at that Location. - FM */ HTProgress(line_buffer); - if (TRACE) - fprintf(stderr, - "HTTP: Picked up location '%s'\n", + CTRACE(tfp, "HTTP: Picked up location '%s'\n", redirecting_url); if (cp1) *cp1 = LF; @@ -1408,9 +1384,7 @@ Cookie2_continuation: * Append our URL. - FM */ StrAllocCat(redirecting_url, anAnchor->address); - if (TRACE) - fprintf(stderr, - "HTTP: Proxy URL is '%s'\n", + CTRACE(tfp, "HTTP: Proxy URL is '%s'\n", redirecting_url); } if (!do_post || @@ -1474,14 +1448,13 @@ Cookie2_continuation: * header, so we'll show the user what we got, if * anything. - FM */ - if (TRACE) - fprintf (stderr, "HTTP: Failed to pick up location.\n"); + CTRACE (tfp, "HTTP: Failed to pick up location.\n"); doing_redirect = FALSE; permanent_redirection = FALSE; start_of_data = line_kept_clean; length = strlen(start_of_data); if (!bad_location) { - HTAlert("Got redirection with no Location header."); + HTAlert(gettext("Got redirection with no Location header.")); HTProgress(line_buffer); } if (traversal) { @@ -1519,8 +1492,7 @@ Cookie2_continuation: */ if (show_401) break; - if (HTAA_shouldRetryWithAuth(start_of_data, length, - (void *)handle, s, NO)) { + if (HTAA_shouldRetryWithAuth(start_of_data, length, s, NO)) { HTTP_NETCLOSE(s, handle); if (dump_output_immediately && !authentication_info[0]) { @@ -1532,29 +1504,25 @@ Cookie2_continuation: goto clean_up; } - if (TRACE) - fprintf(stderr, "%s %d %s\n", - "HTTP: close socket", s, - "to retry with Access Authorization"); + CTRACE(tfp, "%s %d %s\n", + "HTTP: close socket", s, + "to retry with Access Authorization"); _HTProgress ( - "Retrying with access authorization information."); + gettext("Retrying with access authorization information.")); FREE(line_buffer); FREE(line_kept_clean); goto try_again; - break; } else if (!(traversal || dump_output_immediately) && - HTConfirm("Show the 401 message body?")) { + HTConfirm(gettext("Show the 401 message body?"))) { break; } else { if (traversal || dump_output_immediately) - HTAlert( - "Can't retry with authorization! Contact the server's WebMaster."); + HTAlert(FAILED_RETRY_WITH_AUTH); HTTP_NETCLOSE(s, handle); status = -1; goto clean_up; } - break; case 407: /* @@ -1570,8 +1538,7 @@ Cookie2_continuation: */ if (!using_proxy || show_407) break; - if (HTAA_shouldRetryWithAuth(start_of_data, length, - (void *)handle, s, YES)) { + if (HTAA_shouldRetryWithAuth(start_of_data, length, s, YES)) { HTTP_NETCLOSE(s, handle); if (dump_output_immediately && !proxyauth_info[0]) { @@ -1583,19 +1550,16 @@ Cookie2_continuation: goto clean_up; } - if (TRACE) - fprintf(stderr, "%s %d %s\n", - "HTTP: close socket", s, - "to retry with Proxy Authorization"); + CTRACE(tfp, "%s %d %s\n", + "HTTP: close socket", s, + "to retry with Proxy Authorization"); - _HTProgress ( - "Retrying with proxy authorization information."); + _HTProgress (HTTP_RETRY_WITH_PROXY); FREE(line_buffer); FREE(line_kept_clean); goto try_again; - break; } else if (!(traversal || dump_output_immediately) && - HTConfirm("Show the 407 message body?")) { + HTConfirm(gettext("Show the 407 message body?"))) { if (!dump_output_immediately && format_out == HTAtom_for("www/download")) { /* @@ -1608,13 +1572,11 @@ Cookie2_continuation: break; } else { if (traversal || dump_output_immediately) - HTAlert( - "Can't retry with proxy authorization! Contact the server's WebMaster."); + HTAlert(FAILED_RETRY_WITH_PROXY); HTTP_NETCLOSE(s, handle); status = -1; goto clean_up; } - break; case 408: /* @@ -1625,7 +1587,6 @@ Cookie2_continuation: HTTP_NETCLOSE(s, handle); status = HT_NO_DATA; goto done; - break; default: /* @@ -1703,7 +1664,7 @@ Cookie2_continuation: ** Take a chance and hope there is ** something to display. - FM */ - HTAlert("Unknown status reply from server!"); + HTAlert(gettext("Unknown status reply from server!")); HTAlert(line_buffer); if (traversal) { HTTP_NETCLOSE(s, handle); @@ -1725,6 +1686,20 @@ Cookie2_continuation: } /* Full HTTP reply */ } /* scope of fields */ + /* + ** The user may have pressed the 'z'ap key during the pause caused + ** by one of the HTAlerts above if the server reported an error, + ** to skip loading of the error response page. Checking here before + ** setting up the stream stack and feeding it data avoids doing + ** unnecessary work, it also can avoid unnecessarily pushing a + ** loaded document out of the cache to make room for the unwanted + ** error page. - kw + */ + if (HTCheckForInterrupt()) { + HTTP_NETCLOSE(s, handle); + status = HT_INTERRUPTED; + goto clean_up; + } /* ** Set up the stream stack to handle the body of the message. */ @@ -1745,7 +1720,7 @@ Cookie2_continuation: char buffer[1024]; /* @@@@@@@@ */ HTTP_NETCLOSE(s, handle); - sprintf(buffer, "Sorry, no known way of converting %s to %s.", + sprintf(buffer, CANNOT_CONVERT_I_TO_O, HTAtom_name(format_in), HTAtom_name(format_out)); _HTProgress (buffer); status = -1; @@ -1779,8 +1754,7 @@ Cookie2_continuation: (*target->isa->_abort)(target, NULL); HTTP_NETCLOSE(s, handle); if (!already_retrying && !do_post) { - if (TRACE) - fprintf (stderr, "HTTP: Trying again with HTTP0 request.\n"); + CTRACE (tfp, "HTTP: Trying again with HTTP0 request.\n"); /* ** May as well consider it an interrupt -- right? */ @@ -1788,7 +1762,7 @@ Cookie2_continuation: FREE(line_kept_clean); extensions = NO; already_retrying = TRUE; - _HTProgress ("Retrying as HTTP0 request."); + _HTProgress (RETRYING_AS_HTTP0); goto try_again; } else { status = HT_NOT_LOADED; diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTP.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTP.h index 92f1951c63b..cd6925f29d2 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTP.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTP.h @@ -5,7 +5,7 @@ #ifndef HTTP_H #define HTTP_H -#include "HTAccess.h" +#include #ifdef GLOBALREF_IS_MACRO extern GLOBALREF (HTProtocol,HTTP); diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTelnet.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTelnet.c index 2378329b9b4..df6084fac6f 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTelnet.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTelnet.c @@ -10,41 +10,36 @@ ** 26 Jun 92 When over DECnet, suppressed FTP, Gopher and News. (JFG) ** 6 Oct 92 Moved HTClientHost and logfile into here. (TBL) ** 17 Dec 92 Tn3270 added, bug fix. (DD) -** 2 Feb 93 Split from HTAccess.c. Registration.(TBL) +** 2 Feb 93 Split from HTAccess.c. Registration.(TBL) */ -#include "HTUtils.h" -#include "tcp.h" +#include +#include /* Implements: */ -#include "HTTelnet.h" +#include -#include "HTParse.h" -#include "HTAnchor.h" -#include "HTTP.h" -#include "HTFile.h" -/*#include included by tcp.h -- FM */ -/*#include included by HTUtils.h -- FM */ +#include +#include +#include +#include -#include "HText.h" +#include +#include -#include "HTAccess.h" -#include "HTAlert.h" -#if !defined (VMS) && !defined (_WINDOWS) -#include "../../../userdefs.h" /* for TELNET_COMMAND and RLOGIN_COMMAND */ -#endif /* not VMS */ +#include +#include -#ifdef _WINDOWS /* ../../.. doesn't work for me */ -#include "userdefs.h" /* for TELNET_COMMAND and RLOGIN_COMMAND */ -#endif - -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} - -#define HT_NO_DATA -9999 +#include +#include +PRIVATE void do_system ARGS1(char *, command) +{ + CTRACE(tfp, "HTTelnet: Command is: %s\n\n", command); + system(command); + FREE(command); +} /* Telnet or "rlogin" access ** ------------------------- @@ -56,14 +51,10 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) char * cp; char * hostname; char * port; - char command[256]; + char * command = NULL; enum _login_protocol { telnet, rlogin, tn3270 } login_protocol = strcmp(acc_method, "rlogin") == 0 ? rlogin : strcmp(acc_method, "tn3270") == 0 ? tn3270 : telnet; -#ifdef VMS - extern int DCLsystem PARAMS((char *command)); -#define system(a) DCLsystem(a) /* use LYCurses.c routines for spawns */ -#endif /* VMS */ /* * Modified to allow for odd chars in a username only if exists. @@ -94,29 +85,40 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) if (port) *port++ = '\0'; /* Split */ - if (!hostname || *hostname == '\0') { - if (TRACE) - fprintf(stderr, "HTTelnet: No host specified!\n"); - return HT_NO_DATA; - } + if (!hostname || *hostname == '\0') { + CTRACE(tfp, "HTTelnet: No host specified!\n"); + return HT_NO_DATA; + } else if (!valid_hostname(hostname)) { + char *prefix = NULL; + char *line = NULL; + CTRACE(tfp, "HTTelnet: Invalid hostname %s!\n", host); + HTSprintf0(&prefix, + gettext("remote %s session:"), acc_method); + HTSprintf0(&line, + gettext("Invalid hostname %s"), host); + HTAlwaysAlert(prefix, line); + FREE(prefix); + FREE(line); + return HT_NO_DATA; + } - if (user) { - password = strchr(user, ':'); - if (password) { - *password++ = '\0'; + if (user) { + password = strchr(user, ':'); + if (password) { + *password++ = '\0'; + } } - } -/* If the person is already telnetting etc, forbid hopping */ -/* This is a security precaution, for us and remote site */ + /* If the person is already telnetting etc, forbid hopping */ + /* This is a security precaution, for us and remote site */ if (HTSecure) { #ifdef TELNETHOPPER_MAIL - sprintf(command, + HTSprintf0(&command, "finger @%s | mail -s \"**telnethopper %s\" tbl@dxcern.cern.ch", HTClientHost, HTClientHost); - system(command); + do_system(command); #endif printf("\n\nSorry, but the service you have selected is one\n"); printf("to which you have to log in. If you were running www\n"); @@ -134,28 +136,30 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) return HT_NO_DATA; } -/* Not all telnet servers get it even if user name is specified -** so we always tell the guy what to log in as -*/ + /* Not all telnet servers get it even if user name is specified + ** so we always tell the guy what to log in as + */ if (user && login_protocol != rlogin) printf("When you are connected, log in as: %s\n", user); if (password && login_protocol != rlogin) printf(" The password is: %s\n", password); + fflush(stdout); /* * NeXTSTEP is the implied version of the NeXT operating system. * You may need to define this yourself. */ #if defined(NeXT) && defined(NeXTSTEP) && NeXTSTEP<=20100 - sprintf(command, "%s%s%s %s %s", TELNET_COMMAND, - user ? " -l " : "", - user ? user : "", - hostname, - port ? port : ""); +#define FMT_TELNET "%s%s%s %s %s" + + HTAddParam(&command, FMT_TELNET, 1, TELNET_PATH); + HTOptParam(&command, FMT_TELNET, 2, user ? " -l " : ""); + HTAddParam(&command, FMT_TELNET, 3, user); + HTAddParam(&command, FMT_TELNET, 4, hostname); + HTAddParam(&command, FMT_TELNET, 5, port); + HTEndParam(&command, FMT_TELNET, 5); - if (TRACE) - fprintf(stderr, "HTTelnet: Command is: %s\n\n", command); - system(command); + do_system(command); return HT_NO_DATA; /* Ok - it was done but no data */ #define TELNET_DONE #endif @@ -163,30 +167,39 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) /* Most unix machines suppport username only with rlogin */ #if defined(unix) || defined(DOSPATH) #ifndef TELNET_DONE + +#define FMT_RLOGIN "%s %s%s%s" +#define FMT_TN3270 "%s %s %s" +#define FMT_TELNET "%s %s %s" + if (login_protocol == rlogin) { - snprintf(command, sizeof(command) - 1, "%s %s%s%s", RLOGIN_COMMAND, - hostname, - user ? " -l " : "", - user ? user : ""); + + HTAddParam(&command, FMT_RLOGIN, 1, RLOGIN_PATH); + HTAddParam(&command, FMT_RLOGIN, 2, hostname); + HTOptParam(&command, FMT_RLOGIN, 3, user ? " -l " : ""); + HTAddParam(&command, FMT_RLOGIN, 4, user); + HTEndParam(&command, FMT_RLOGIN, 4); } else if (login_protocol == tn3270) { - snprintf(command, sizeof(command) - 1, "%s %s %s", TN3270_COMMAND, - hostname, - port ? port : ""); + + HTAddParam(&command, FMT_TN3270, 1, TN3270_PATH); + HTAddParam(&command, FMT_TN3270, 2, hostname); + HTAddParam(&command, FMT_TN3270, 3, port); + HTEndParam(&command, FMT_TN3270, 3); } else { /* TELNET */ - snprintf(command, sizeof(command) - 1, "%s %s %s", TELNET_COMMAND, - hostname, - port ? port : ""); + + HTAddParam(&command, FMT_TELNET, 1, TELNET_PATH); + HTAddParam(&command, FMT_TELNET, 2, hostname); + HTAddParam(&command, FMT_TELNET, 3, port); + HTEndParam(&command, FMT_TELNET, 3); } - if (TRACE) - fprintf(stderr, "HTTelnet: Normal: Command is: %s\n\n", command); #ifdef __DJGPP__ __djgpp_set_ctrl_c(0); _go32_want_ctrl_break(1); #endif /* __DJGPP__ */ - system(command); + do_system(command); #ifdef __DJGPP__ __djgpp_set_ctrl_c(1); _go32_want_ctrl_break(0); @@ -199,7 +212,7 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) /* VMS varieties */ #if defined(MULTINET) if (login_protocol == rlogin) { - sprintf(command, "RLOGIN%s%s%s%s%s %s", /*lm 930713 */ + HTSprintf0(&command, "RLOGIN%s%s%s%s%s %s", /*lm 930713 */ user ? "/USERNAME=\"" : "", user ? user : "", user ? "\"" : "", @@ -208,21 +221,19 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) hostname); } else if (login_protocol == tn3270) { - sprintf(command, "TELNET/TN3270 %s%s %s", + HTSprintf0(&command, "TELNET/TN3270 %s%s %s", port ? "/PORT=" : "", port ? port : "", hostname); } else { /* TELNET */ - sprintf(command, "TELNET %s%s %s", + HTSprintf0(&command, "TELNET %s%s %s", port ? "/PORT=" : "", port ? port : "", hostname); } - if (TRACE) - fprintf(stderr, "HTTelnet: Command is: %s\n\n", command); - system(command); + do_system(command); return HT_NO_DATA; /* Ok - it was done but no data */ #define TELNET_DONE #endif /* MULTINET */ @@ -234,7 +245,7 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) if ((cp=getenv("WINTCP_COMMAND_STYLE")) != NULL && 0==strncasecomp(cp, "VMS", 3)) { /* VMS command syntax */ if (login_protocol == rlogin) { - sprintf(command, "RLOGIN%s%s%s%s%s %s", /*lm 930713 */ + HTSprintf0(&command, "RLOGIN%s%s%s%s%s %s", /*lm 930713 */ user ? "/USERNAME=\"" : "", user ? user : "", user ? "\"" : "", @@ -243,13 +254,13 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) hostname); } else if (login_protocol == tn3270) { - sprintf(command, "TELNET/TN3270 %s%s %s", + HTSprintf0(&command, "TELNET/TN3270 %s%s %s", port ? "/PORT=" : "", port ? port : "", hostname); } else { /* TELNET */ - sprintf(command, "TELNET %s%s %s", + HTSprintf0(&command, "TELNET %s%s %s", port ? "/PORT=" : "", port ? port : "", hostname); @@ -257,7 +268,7 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) } else { /* UNIX command syntax */ if (login_protocol == rlogin) { - sprintf(command, "RLOGIN %s%s%s%s%s", + HTSprintf0(&command, "RLOGIN %s%s%s%s%s", hostname, user ? " -l " : "", user ? "\"" : "", @@ -265,20 +276,18 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) user ? "\"" : ""); } else if (login_protocol == tn3270) { - sprintf(command, "TN3270 %s %s", + HTSprintf0(&command, "TN3270 %s %s", hostname, port ? port : ""); } else { /* TELNET */ - sprintf(command, "TELNET %s %s", + HTSprintf0(&command, "TELNET %s %s", hostname, port ? port : ""); } } - if (TRACE) - fprintf(stderr, "HTTelnet: Command is: %s\n\n", command); - system(command); + do_system(command); return HT_NO_DATA; /* Ok - it was done but no data */ } #define TELNET_DONE @@ -286,7 +295,7 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) #ifdef UCX if (login_protocol == rlogin) { - sprintf(command, "RLOGIN%s%s%s %s %s", + HTSprintf0(&command, "RLOGIN%s%s%s %s %s", user ? "/USERNAME=\"" : "", user ? user : "", user ? "\"" : "", @@ -294,35 +303,30 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) port ? port : ""); } else if (login_protocol == tn3270) { - sprintf(command, "TN3270 %s %s", + HTSprintf0(&command, "TN3270 %s %s", hostname, port ? port : ""); } else { /* TELNET */ - sprintf(command, "TELNET %s %s", + HTSprintf0(&command, "TELNET %s %s", hostname, port ? port : ""); } - if (TRACE) - fprintf(stderr, "HTTelnet: Command is: %s\n\n", command); - system(command); + do_system(command); return HT_NO_DATA; /* Ok - it was done but no data */ #define TELNET_DONE #endif /* UCX */ #ifdef CMU_TCP if (login_protocol == telnet) { - sprintf(command, "TELNET %s%s %s", + HTSprintf0(&command, "TELNET %s%s %s", port ? "/PORT=" : "", port ? port : "", hostname); - if (TRACE) - fprintf(stderr, "HTTelnet: Command is: %s\n\n", command); - system(command); + do_system(command); } else { - extern int LYgetch NOPARAMS; extern BOOLEAN HadVMSInterrupt; printf( @@ -342,7 +346,7 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) if (getenv("MULTINET_SOCKET_LIBRARY") != NULL) { if (login_protocol == rlogin) { - sprintf(command, "MULTINET RLOGIN%s%s%s%s %s", /*lm 930713 */ + HTSprintf0(&command, "MULTINET RLOGIN%s%s%s%s %s", /*lm 930713 */ user ? "/USERNAME=" : "", user ? user : "", port ? "/PORT=" : "", @@ -350,101 +354,92 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) hostname); } else if (login_protocol == tn3270) { - sprintf(command, "MULTINET TELNET/TN3270 %s%s %s", + HTSprintf0(&command, "MULTINET TELNET/TN3270 %s%s %s", port ? "/PORT=" : "", port ? port : "", hostname); } else { /* TELNET */ - sprintf(command, "MULTINET TELNET %s%s %s", + HTSprintf0(&command, "MULTINET TELNET %s%s %s", port ? "/PORT=" : "", port ? port : "", hostname); } - if (TRACE) - fprintf(stderr, "HTTelnet: Command is: %s\n\n", command); - system(command); + do_system(command); return HT_NO_DATA; /* Ok - it was done but no data */ } else if ((cp=getenv("WINTCP_COMMAND_STYLE")) != NULL) { if (0==strncasecomp(cp, "VMS", 3)) { /* VMS command syntax */ if (login_protocol == rlogin) { - sprintf(command, "RLOGIN%s%s%s%s %s", /*lm 930713 */ + HTSprintf0(&command, "RLOGIN%s%s%s%s %s", /*lm 930713 */ user ? "/USERNAME=" : "", user ? user : "", port ? "/PORT=" : "", port ? port : "", hostname); } else if (login_protocol == tn3270) { - sprintf(command, "TELNET/TN3270 %s%s %s", + HTSprintf0(&command, "TELNET/TN3270 %s%s %s", port ? "/PORT=" : "", port ? port : "", hostname); } else { /* TELNET */ - sprintf(command, "TELNET %s%s %s", + HTSprintf0(&command, "TELNET %s%s %s", port ? "/PORT=" : "", port ? port : "", hostname); } } else { /* UNIX command syntax */ if (login_protocol == rlogin) { - sprintf(command, "RLOGIN %s%s%s", + HTSprintf0(&command, "RLOGIN %s%s%s", hostname, user ? " -l " : "", user ? user : ""); } else if (login_protocol == tn3270) { - sprintf(command, "TN3270 %s %s", + HTSprintf0(&command, "TN3270 %s %s", hostname, port ? port : ""); } else { /* TELNET */ - sprintf(command, "TELNET %s %s", + HTSprintf0(&command, "TELNET %s %s", hostname, port ? port : ""); } } - if (TRACE) - fprintf(stderr, "HTTelnet: Command is: %s\n\n", command); - system(command); + do_system(command); return HT_NO_DATA; /* Ok - it was done but no data */ } else if (getenv("UCX$DEVICE") != NULL) { if (login_protocol == rlogin) { - sprintf(command, "RLOGIN%s%s %s %s", + HTSprintf0(&command, "RLOGIN%s%s %s %s", user ? "/USERNAME=" : "", user ? user : "", hostname, port ? port : ""); } else if (login_protocol == tn3270) { - sprintf(command, "TN3270 %s %s", + HTSprintf0(&command, "TN3270 %s %s", hostname, port ? port : ""); } else { /* TELNET */ - sprintf(command, "TELNET %s %s", + HTSprintf0(&command, "TELNET %s %s", hostname, port ? port : ""); } - if (TRACE) - fprintf(stderr, "HTTelnet: Command is: %s\n\n", command); - system(command); + do_system(command); return HT_NO_DATA; /* Ok - it was done but no data */ } else if (getenv("CMUTEK_ROOT") != NULL) { if (login_protocol == telnet) { - sprintf(command, "TELNET %s%s %s", + HTSprintf0(&command, "TELNET %s%s %s", port ? "/PORT=" : "", port ? port : "", hostname); - if (TRACE) - fprintf(stderr, "HTTelnet: Command is: %s\n\n", command); - system(command); + do_system(command); } else { - extern int LYgetch NOPARAMS; extern BOOLEAN HadVMSInterrupt; printf( @@ -458,16 +453,13 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) } else { if (login_protocol == telnet) { - sprintf(command, "TELNET %s%s %s", + HTSprintf0(&command, "TELNET %s%s %s", port ? "/PORT=" : "", port ? port : "", hostname); - if (TRACE) - fprintf(stderr, "HTTelnet: Command is: %s\n\n", command); - system(command); + do_system(command); } else { - extern int LYgetch NOPARAMS; extern BOOLEAN HadVMSInterrupt; printf( @@ -487,12 +479,10 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) #define SIMPLE_TELNET #endif #ifdef SIMPLE_TELNET - if (login_protocol == telnet) { /* telnet only */ - sprintf(command, "TELNET %s", /* @@ Bug: port ignored */ + if (login_protocol == telnet) { /* telnet only */ + HTSprintf0(&command, "TELNET %s", /* @@ Bug: port ignored */ hostname); - if (TRACE) - fprintf(stderr, "HTTelnet: Command is: %s\n\n", command); - system(command); + do_system(command); return HT_NO_DATA; /* Ok - it was done but no data */ } #endif @@ -509,8 +499,6 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) printf("\nlogging in with username %s", user); printf(".\n"); { - extern int LYgetch NOPARAMS; - printf("\nPress to return to Lynx."); fflush(stdout); LYgetch(); @@ -532,7 +520,7 @@ PRIVATE int remote_session ARGS2(char *, acc_method, char *, host) ** addr must point to the fully qualified hypertext reference. ** ** On exit, -** returns <0 Error has occured. +** returns <0 Error has occured. ** >=0 Value of file descriptor or socket to be used ** to read data. ** *pFormat Set to the format of the file, if known. @@ -553,9 +541,7 @@ ARGS4 int status; if (sink) { - if (TRACE) - fprintf(stderr, - "HTTelnet: Can't output a live session -- must be interactive!\n"); + CTRACE(tfp, "HTTelnet: Can't output a live session -- must be interactive!\n"); return HT_NO_DATA; } acc_method = HTParse(addr, "file:", PARSE_ACCESS); @@ -563,8 +549,7 @@ ARGS4 host = HTParse(addr, "", PARSE_HOST); if (!host || *host == '\0') { status = HT_NO_DATA; - if (TRACE) - fprintf(stderr, "HTTelnet: No host specified!\n"); + CTRACE(tfp, "HTTelnet: No host specified!\n"); } else { status = remote_session(acc_method, host); } diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTelnet.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTelnet.h index 4c5de744fc1..b5ce8877aca 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTelnet.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTelnet.h @@ -6,7 +6,7 @@ #ifndef HTTELNET_H #define HTTELNET_H -#include "HTAccess.h" +#include #ifdef GLOBALREF_IS_MACRO extern GLOBALREF(HTProtocol,HTTelnet); diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTUU.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTUU.c index 865315cc0aa..5465f89f375 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTUU.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTUU.c @@ -34,10 +34,10 @@ ** */ -#include "HTUtils.h" -#include "HTUU.h" +#include +#include -#include "LYLeaks.h" +#include PRIVATE char six2pr[64] = { 'A','B','C','D','E','F','G','H','I','J','K','L','M', @@ -65,7 +65,7 @@ PRIVATE unsigned char pr2six[256]; * * Exit bufcoded contains the coded line. The first 4*nbytes/3 bytes * contain printing ASCII characters representing - * those binary bytes. This may include one or + * those binary bytes. This may include one or * two '=' characters used as padding at the end. * The last byte is a zero byte. * Returns the number of ASCII characters in "bufcoded". @@ -110,7 +110,7 @@ PUBLIC int HTUU_encode ARGS3(unsigned char *, bufin, * * Decode an ASCII-encoded buffer back to its original binary form. * - * Entry bufcoded points to a uuencoded string. It is + * Entry bufcoded points to a uuencoded string. It is * terminated by any character not in * the printable character table six2pr, but * leading whitespace is stripped. @@ -149,21 +149,21 @@ PUBLIC int HTUU_decode ARGS3(char *, bufcoded, for(j=0; j<64; j++) pr2six[(unsigned char)six2pr[j]] = (unsigned char)j; #if 0 - pr2six['A']= 0; pr2six['B']= 1; pr2six['C']= 2; pr2six['D']= 3; - pr2six['E']= 4; pr2six['F']= 5; pr2six['G']= 6; pr2six['H']= 7; - pr2six['I']= 8; pr2six['J']= 9; pr2six['K']=10; pr2six['L']=11; - pr2six['M']=12; pr2six['N']=13; pr2six['O']=14; pr2six['P']=15; - pr2six['Q']=16; pr2six['R']=17; pr2six['S']=18; pr2six['T']=19; - pr2six['U']=20; pr2six['V']=21; pr2six['W']=22; pr2six['X']=23; - pr2six['Y']=24; pr2six['Z']=25; pr2six['a']=26; pr2six['b']=27; - pr2six['c']=28; pr2six['d']=29; pr2six['e']=30; pr2six['f']=31; - pr2six['g']=32; pr2six['h']=33; pr2six['i']=34; pr2six['j']=35; - pr2six['k']=36; pr2six['l']=37; pr2six['m']=38; pr2six['n']=39; - pr2six['o']=40; pr2six['p']=41; pr2six['q']=42; pr2six['r']=43; - pr2six['s']=44; pr2six['t']=45; pr2six['u']=46; pr2six['v']=47; - pr2six['w']=48; pr2six['x']=49; pr2six['y']=50; pr2six['z']=51; - pr2six['0']=52; pr2six['1']=53; pr2six['2']=54; pr2six['3']=55; - pr2six['4']=56; pr2six['5']=57; pr2six['6']=58; pr2six['7']=59; + pr2six['A']= 0; pr2six['B']= 1; pr2six['C']= 2; pr2six['D']= 3; + pr2six['E']= 4; pr2six['F']= 5; pr2six['G']= 6; pr2six['H']= 7; + pr2six['I']= 8; pr2six['J']= 9; pr2six['K']=10; pr2six['L']=11; + pr2six['M']=12; pr2six['N']=13; pr2six['O']=14; pr2six['P']=15; + pr2six['Q']=16; pr2six['R']=17; pr2six['S']=18; pr2six['T']=19; + pr2six['U']=20; pr2six['V']=21; pr2six['W']=22; pr2six['X']=23; + pr2six['Y']=24; pr2six['Z']=25; pr2six['a']=26; pr2six['b']=27; + pr2six['c']=28; pr2six['d']=29; pr2six['e']=30; pr2six['f']=31; + pr2six['g']=32; pr2six['h']=33; pr2six['i']=34; pr2six['j']=35; + pr2six['k']=36; pr2six['l']=37; pr2six['m']=38; pr2six['n']=39; + pr2six['o']=40; pr2six['p']=41; pr2six['q']=42; pr2six['r']=43; + pr2six['s']=44; pr2six['t']=45; pr2six['u']=46; pr2six['v']=47; + pr2six['w']=48; pr2six['x']=49; pr2six['y']=50; pr2six['z']=51; + pr2six['0']=52; pr2six['1']=53; pr2six['2']=54; pr2six['3']=55; + pr2six['4']=56; pr2six['5']=57; pr2six['6']=58; pr2six['7']=59; pr2six['8']=60; pr2six['9']=61; pr2six['+']=62; pr2six['/']=63; #endif } @@ -185,7 +185,7 @@ PUBLIC int HTUU_decode ARGS3(char *, bufcoded, } bufin = bufcoded; - + while (nprbytes > 0) { *(bufout++) = (unsigned char) (DEC(*bufin) << 2 | DEC(bufin[1]) >> 4); *(bufout++) = (unsigned char) (DEC(bufin[1]) << 4 | DEC(bufin[2]) >> 2); @@ -193,7 +193,7 @@ PUBLIC int HTUU_decode ARGS3(char *, bufcoded, bufin += 4; nprbytes -= 4; } - + if(nprbytes & 03) { if(pr2six[(int)bufin[-2]] > MAXVAL) { nbytesdecoded -= 2; diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTUU.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTUU.h index 05874e240a5..2cff52925a8 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTUU.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTUU.h @@ -1,20 +1,20 @@ /* ENCODING TO PRINTABLE CHARACTERS - + File module provides functions HTUU_encode() and HTUU_decode() which convert a buffer - of bytes to/from RFC 1113 printable encoding format. This technique is similar to the + of bytes to/from RFC 1113 printable encoding format. This technique is similar to the familiar Unix uuencode format in that it maps 6 binary bits to one ASCII character (or more aptly, 3 binary bytes to 4 ASCII characters). However, RFC 1113 does not use the same mapping to printable characters as uuencode. - + */ #ifndef HTUU_H #define HTUU_H #ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ - +#include +#endif + PUBLIC int HTUU_encode PARAMS((unsigned char *bufin, unsigned int nbytes, char *bufcoded)); @@ -24,6 +24,3 @@ PUBLIC int HTUU_decode PARAMS((char *bufcoded, int outbufsize)); #endif -/* - - End of file. */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTUtils.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTUtils.h index 21128bb99f4..dd5be2dda44 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTUtils.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTUtils.h @@ -1,108 +1,53 @@ -/* Utitlity macros for the W3 code library +/* Utility macros for the W3 code library MACROS FOR GENERAL USE - - Generates: HTUtils.h - - See also: the system dependent file "tcp.h" - + + See also: the system dependent file "tcp.h", which is included here. + */ -#ifndef DEBUG -#define DEBUG /* Noone ever turns this off as trace is too important */ -#endif /* Keep option for really small memory applications tho */ - +#ifndef NO_LYNX_TRACE +#define DEBUG /* Turns on trace; turn off for smaller binary */ +#endif + #ifndef HTUTILS_H #define HTUTILS_H #ifdef HAVE_CONFIG_H #include /* generated by autoconf 'configure' script */ #include +#include + #else +#ifdef DJGPP +#include /* pseudo-autoconf values for DJGPP libc/headers */ +#endif /* DJGPP */ + +#include + #define DONT_TRACK_INTERNAL_LINKS 1 /* Explicit system-configure */ #ifdef VMS #define NO_SIZECHANGE -#define NO_UNISTD_H +#if defined(VAXC) && !defined(__DECC) +#define NO_UNISTD_H /* DEC C has unistd.h, but not VAX C */ +#endif #define NO_KEYPAD #define NO_UTMP +#define NO_FILIO_H +#define NOUSERS +#define DISP_PARTIAL /* experimental */ #endif -/* FIXME: these will be removed after completing auto-configure script */ - -#ifdef _IBMR2 -#define USE_DIRENT /* sys V style directory open */ -#endif /* _IBMR2 */ - -#ifdef _SYSV3 -#include -#define USE_DIRENT /* sys V style directory open */ -#endif /* _SYSV3 */ - -/* Solaris. */ -#if defined(sun) && defined(__svr4__) && !defined(USE_DIRENT) -#define USE_DIRENT /* sys V style directory open */ -#endif /* sun && __svr4__ && !USE_DIRENT */ - -#ifdef __alpha -#define USE_DIRENT -#endif /* __alpha */ - -#ifndef USE_DIRENT -#ifdef SVR4 -#define USE_DIRENT -#endif /* SVR4 */ -#endif /* !USE_DIRENT */ - -#ifndef SOLARIS2 -#include /* For bzero etc */ -#endif /* !SOLARIS2 */ - -#ifdef SCO -#define sco -#endif /* SCO */ -#ifdef sco -#include -#define USE_DIRENT -#endif /* sco */ - -/* -Intergraph CLIX - */ -#ifdef CLIX -#include -#define USE_DIRENT -#endif /* CLIX */ - -#ifdef ISC -#ifndef NO_UNISTD_H -#include -#endif /* !NO_UNISTD_H */ -#else -#if !defined(NO_UNISTD_H) && !defined(VMS) -#include -#endif /* !NO_UNISTD_H && !VMS */ -#endif /* ISC */ - -#if defined(SVR4) || defined(UNIXWARE) -#include -#ifndef NO_FILIO_H /* BSD Interactive doesn't have filio.h. */ -#include -#endif /* !NO_FILIO_H */ -#endif /* SVR4 || UNIXWARE */ - -/* -SOLARIS 2 - */ -#ifdef SOLARIS2 -#include -#endif /* SOLARIS2 */ - -#ifndef NO_FILIO_H -#define NO_FILIO_H /* prevent conflict between autoconf & BSDI make */ +#if defined(__STDC__) || defined(VMS) +#define ANSI_VARARGS 1 +#undef HAVE_STDARG_H +#define HAVE_STDARG_H 1 #endif +/* FIXME: these should be removed after completing auto-configure script */ + /* Accommodate pre-autoconf Makefile */ #ifndef NO_CBREAK @@ -139,6 +84,7 @@ SOLARIS 2 #endif #ifndef NO_UNISTD_H +#undef HAVE_UNISTD_H #define HAVE_UNISTD_H 1 #endif @@ -146,6 +92,10 @@ SOLARIS 2 #define HAVE_UTMP 1 #endif +#endif /* HAVE_CONFIG_H */ + +#ifndef LY_MAXPATH +#define LY_MAXPATH 256 #endif #ifndef GCC_UNUSED @@ -153,7 +103,7 @@ SOLARIS 2 #endif #ifdef _WINDOWS /* SCW */ -#include "windef.h" +#include #define BOOLEAN_DEFINED #define va_arg #include @@ -161,8 +111,12 @@ SOLARIS 2 #define pclose _pclose #endif /* _WINDOWS */ -#ifdef SHORT_NAMES -#define WWW_TraceFlag HTTrFlag +#ifdef __EMX__ +#include /* should be re-include protected under EMX */ +#include /* should be re-include protected under EMX */ +#define getcwd _getcwd2 +#define chdir _chdir2 + #endif /* @@ -170,31 +124,24 @@ SOLARIS 2 Debug message control. */ -#ifndef STDIO_H -#include -#define STDIO_H -#endif -#ifdef DEBUG +#ifdef NO_LYNX_TRACE +#define TRACE 0 +#define PROGRESS(str) /* nothing for now */ +#else #define TRACE (WWW_TraceFlag) #define PROGRESS(str) printf(str) extern int WWW_TraceFlag; -#else -#define TRACE 0 -#define PROGRESS(str) /* nothing for now */ #endif -#define CTRACE if(TRACE)fprintf -#define tfp stderr - /* ERROR TYPE - + This is passed back when streams are aborted. It might be nice to have some structure - of error messages, numbers, and recursive pointers to reasons. Curently this is a + of error messages, numbers, and recursive pointers to reasons. Curently this is a placeholder for something more sophisticated. - + */ typedef void * HTError; /* Unused at present -- best definition? */ @@ -229,7 +176,6 @@ Standard C library for malloc() etc #include #include -#include #include /* ANSI */ /* BSN */ #endif /* !ultrix */ @@ -237,7 +183,6 @@ Standard C library for malloc() etc #include #include -#include #if defined(VAXC) && !defined(__DECC) #define malloc VAXC$MALLOC_OPT #define calloc VAXC$CALLOC_OPT @@ -310,8 +255,8 @@ Macros for declarations t a; u b; v c; w d; x e; y f; z g; s h; r i; #define ARGS10(t,a,u,b,v,c,w,d,x,e,y,f,z,g,s,h,r,i,q,j) (a,b,c,d,e,f,g,h,i,j) \ t a; u b; v c; w d; x e; y f; z g; s h; r i; q j; - - + + #endif /* __STDC__ (ANSI) */ #ifndef NULL @@ -336,9 +281,9 @@ Booleans #define FALSE (BOOLEAN)0 #endif #endif /* CURSES */ -#endif /* _WINDOWS */ +#endif /* BOOLEAN_DEFINED */ #define BOOLEAN_DEFINED -#endif +#endif /* _WINDOWS */ #ifndef BOOL #define BOOL BOOLEAN @@ -360,15 +305,22 @@ extern BOOL LYOutOfMemory; /* Declared in LYexit.c - FM */ #define WHITE(c) (((unsigned char)(TOASCII(c))) <= 32) +/* Inline Function LYIsASCII: Is character c a traditional ASCII +** character (i.e. <128) after converting from host character set. */ + +#define LYIsASCII(c) (TOASCII((unsigned char)(c)) < 128) /* -Sucess (>=0) and failure (<0) codes +Success (>=0) and failure (<0) codes + +Some of the values are chosen to be HTTP-like, but status return values +are generally not the response status from any specific protocol. */ -#define HT_REDIRECTING 29996 -#define HT_LOADED 29997 /* Instead of a socket */ +#define HT_REDIRECTING 399 +#define HT_LOADED 200 /* Instead of a socket */ #define HT_PARTIAL_CONTENT 206 /* Partial Content */ #define HT_INTERRUPTED -29998 #define HT_NOT_LOADED -29999 @@ -376,22 +328,47 @@ Sucess (>=0) and failure (<0) codes #define HT_ERROR -1 /* Generic failure */ -#define HT_NO_ACCESS -10 /* Access not available */ -#define HT_FORBIDDEN -11 /* Access forbidden */ -#define HT_INTERNAL -12 /* Weird -- should never happen. */ -#define HT_BAD_EOF -12 /* Premature EOF */ +#define HT_CANNOT_TRANSLATE -4 + +#define HT_NO_DATA -204 /* OK but no data was loaded - */ + /* possibly other app started or forked */ +#define HT_NO_ACCESS -401 /* Access not available */ +#define HT_FORBIDDEN -403 /* Access forbidden */ +#define HT_NOT_ACCEPTABLE -406 /* Not Acceptable */ +#define HT_H_ERRNO_VALID -800 /* see h_errno for resolver error */ -#include "HTString.h" /* String utilities */ +#define HT_INTERNAL -900 /* Weird -- should never happen. */ +#define HT_BAD_EOF -12 /* Premature EOF */ #ifndef va_arg -#ifdef __STDC__ -#include +# if HAVE_STDARG_H && ANSI_VARARGS +# include +# else +# if HAVE_VARARGS_H +# include +# endif +# endif +#endif + +#if ANSI_VARARGS +#define LYva_start(ap,format) va_start(ap,format) #else -#include +#define LYva_start(ap,format) va_start(ap) #endif + +/* + * GCC can be told that some functions are like printf (and do type-checking on + * their parameters). + */ +#if GCC_PRINTF +#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) +#else +#define GCC_PRINTFLIKE(fmt,var) /*nothing*/ #endif +#include /* String utilities */ + /* Out Of Memory checking for malloc() return: @@ -402,13 +379,9 @@ Out Of Memory checking for malloc() return: #define __LINE__ "" #endif -#include "LYexit.h" +#include -#define outofmem(file, func)\ - { fprintf(stderr,\ - "\r\n\r\n\r\n%s %s: out of memory. Aborting...\r\n", file, func);\ - LYOutOfMemory = TRUE; exit(-1);} -/* extern void outofmem PARAMS((const char *fname, const char *func)); */ +extern void outofmem PARAMS((CONST char *fname, CONST char *func)); /* @@ -416,8 +389,8 @@ Upper- and Lowercase macros The problem here is that toupper(x) is not defined officially unless isupper(x) is. These macros are CERTAINLY needed on #if defined(pyr) || define(mips) or BDSI - platforms. For safefy, we make them mandatory. - + platforms. For safefy, we make them mandatory. + */ #include #include @@ -428,20 +401,56 @@ Upper- and Lowercase macros #define TOUPPER(c) (islower((unsigned char)c) ? toupper((unsigned char)c) : ((unsigned char)c)) #endif /* TOLOWER */ +#define FREE(x) if (x) {free(x); x = NULL;} + /* The local equivalents of CR and LF We can check for these after net ascii text has been converted to the local - representation. Similarly, we include them in strings to be sent as net ascii after + representation. Similarly, we include them in strings to be sent as net ascii after translation. - + */ #define LF FROMASCII('\012') /* ASCII line feed LOCAL EQUIVALENT */ #define CR FROMASCII('\015') /* Will be converted to ^M for transmission */ -#endif /* HTUTILS_H */ +#define CTRACE if(TRACE)fprintf +#define tfp TraceFP() +#define CTRACE_SLEEP(secs) if (TRACE && LYTraceLogFP == 0) sleep(secs) +#define CTRACE_FLUSH(fp) if(TRACE) fflush(fp) + +extern FILE *TraceFP NOPARAMS; + +#include /* + * We force this include-ordering since socks.h contains redefinitions of + * functions that probably are prototyped via other includes. The socks.h + * definitions have to be included everywhere, since they're making wrappers + * for the stdio functions as well as the network functions. + */ +#if defined(USE_SOCKS5) && !defined(DONT_USE_SOCKS5) +#define SOCKS4TO5 /* turn on the Rxxxx definitions used in Lynx */ +#include + +/* + * The AIX- and SOCKS4-specific definitions in socks.h are inconsistent. + * Repair them so they're consistent (and usable). + */ +#if defined(_AIX) && !defined(USE_SOCKS4_PREFIX) +#undef Raccept +#define Raccept accept +#undef Rgetsockname +#define Rgetsockname getsockname +#undef Rgetpeername +#define Rgetpeername getpeername +#endif + +#endif /* USE_SOCKS5 */ + +#define SHORTENED_RBIND /* FIXME: do this in configure-script */ - end of utilities */ +#include + +#endif /* HTUTILS_H */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMSUtils.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMSUtils.c index 118f95178b2..775d411f2fb 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMSUtils.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMSUtils.c @@ -13,16 +13,13 @@ ** */ -#include "HTUtils.h" -#include "tcp.h" -#include "HTFormat.h" -#include "HTStream.h" -#include "UCDefs.h" -#include "UCMap.h" -#include "UCAux.h" -#include "HTVMSUtils.h" -/*#include included by HTUtils.h -- FM */ -/*#include included by HTUtils.h -- FM */ +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -33,9 +30,8 @@ #include #include -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} +#include +#include #define INFINITY 512 /* File name length @@ FIXME */ @@ -79,12 +75,12 @@ unsigned long Buffer[2]; Result = sys$getjpiw(0, 0, 0, ItemList, 0, 0, 0); if (Result != SS$_NORMAL) - return(NO); + return(NO); if (Buffer[0] & PRV$M_SYSPRV) return(YES); - return(NO); + return(NO); } @@ -95,7 +91,7 @@ unsigned long Buffer[2]; ** No arguments. ** ** ON EXIT: -** +** */ PUBLIC void HTVMS_enableSysPrv NOARGS { @@ -106,12 +102,10 @@ unsigned long Prv[2], PreviousPrv[2]; Prv[1] = 0; Result = sys$setprv(1,&Prv,0,&PreviousPrv); - if (TRACE) { - if (Result == SS$_NORMAL) { - if (!(PreviousPrv[0] & PRV$M_SYSPRV)) { - fprintf(stderr, "HTVMS_enableSysPrv: Enabled SYSPRV\n"); - } - } + if (Result == SS$_NORMAL) { + if (!(PreviousPrv[0] & PRV$M_SYSPRV)) { + CTRACE(tfp, "HTVMS_enableSysPrv: Enabled SYSPRV\n"); + } } } @@ -123,7 +117,7 @@ unsigned long Prv[2], PreviousPrv[2]; ** No arguments. ** ** ON EXIT: -** +** */ PUBLIC void HTVMS_disableSysPrv NOARGS { @@ -134,12 +128,10 @@ unsigned long Prv[2], PreviousPrv[2]; Prv[1] = 0; Result = sys$setprv(0,&Prv,0,&PreviousPrv); - if (TRACE) { - if (Result == SS$_NORMAL) { - if (PreviousPrv[0] & PRV$M_SYSPRV) { - fprintf(stderr, "HTVMS_disableSysPrv: Disabled SYSPRV\n"); - } - } + if (Result == SS$_NORMAL) { + if (PreviousPrv[0] & PRV$M_SYSPRV) { + CTRACE(tfp, "HTVMS_disableSysPrv: Disabled SYSPRV\n"); + } } } @@ -155,7 +147,7 @@ unsigned long Prv[2], PreviousPrv[2]; ** ** ON EXIT: ** returns YES if access is allowed -** +** */ PUBLIC BOOL HTVMS_checkAccess ARGS3( CONST char *, FileName, @@ -226,7 +218,7 @@ char *colon; /* PUBLIC HTVMS_wwwName() -** CONVERTS VMS Name into WWW Name +** CONVERTS VMS Name into WWW Name ** ON ENTRY: ** vmsname VMS file specification (NO NODE) ** @@ -245,10 +237,10 @@ char *colon; ** [DUNS.ECHO.--.TRANS] duns/echo/../../trans ** [.DUNS] duns ** [.DUNS.ECHO] duns/echo -** [.DUNS.ECHO]TEST.COM duns/echo/test.com +** [.DUNS.ECHO]TEST.COM duns/echo/test.com ** TEST.COM test.com ** -** +** */ PUBLIC char * HTVMS_wwwName ARGS1( char *, vmsname) @@ -267,11 +259,11 @@ int dir; case ':': *(dst++) = '/'; break; case '-': if (dir) { - if ((*(src-1)=='[' || *(src-1)=='.' || *(src-1)=='-') && + if ((*(src-1)=='[' || *(src-1)=='.' || *(src-1)=='-') && (*(src+1)=='.' || *(src+1)=='-')) { *(dst++) = '/'; - *(dst++) = '.'; + *(dst++) = '.'; *(dst++) = '.'; } else @@ -296,7 +288,7 @@ int dir; case '[': dir = 1; break; case ']': dir = 0; break; default: if (*(src-1) == ']') *(dst++) = '/'; - *(dst++) = *src; + *(dst++) = *src; break; } } @@ -317,14 +309,14 @@ int dir; ** Bug: Returns pointer to static -- non-reentrant */ PUBLIC char * HTVMS_name ARGS2( - CONST char *, nn, + CONST char *, nn, CONST char *, fn) { -/* We try converting the filename into Files-11 syntax. That is, we assume -** first that the file is, like us, on a VMS node. We try remote -** (or local) DECnet access. Files-11, VMS, VAX and DECnet -** are trademarks of Digital Equipment Corporation. +/* We try converting the filename into Files-11 syntax. That is, we assume +** first that the file is, like us, on a VMS node. We try remote +** (or local) DECnet access. Files-11, VMS, VAX and DECnet +** are trademarks of Digital Equipment Corporation. ** The node is assumed to be local if the hostname WITHOUT DOMAIN ** matches the local one. @@@ */ @@ -333,12 +325,12 @@ PUBLIC char * HTVMS_name ARGS2( char * nodename = (char*)malloc(strlen(nn)+2+1); /* Copies to hack */ char *second; /* 2nd slash */ char *last; /* last slash */ - + char * hostname = (char *)HTHostName(); if (!filename || !nodename) outofmem(__FILE__, "HTVMSname"); strcpy(filename, fn); - strcpy(nodename, ""); /* On same node? Yes if node names match */ + strcpy(nodename, ""); /* On same node? Yes if node names match */ if (strncmp(nn,"localhost",9)) { char *p, *q; for (p=hostname, q=(char *)nn; @@ -355,7 +347,7 @@ PUBLIC char * HTVMS_name ARGS2( second = strchr(filename+1, '/'); /* 2nd slash */ last = strrchr(filename, '/'); /* last slash */ - + if (!second) { /* Only one slash */ sprintf(vmsname, "%s%s", nodename, filename + 1); } else if(second==last) { /* Exactly two slashes */ @@ -382,19 +374,19 @@ PUBLIC char * HTVMS_name ARGS2( ** It is based on the newer WWWLib's HTDirBrw.c. - Foteos Macrides */ PUBLIC int HTStat ARGS2( - CONST char *, filename, - stat_t *, info) + CONST char *, filename, + struct stat *, info) { - /* + /* the following stuff does not work in VMS with a normal stat... --> /disk$user/duns/www if www is a directory - is statted like: /disk$user/duns/www.dir + is statted like: /disk$user/duns/www.dir after a normal stat has failed --> /disk$user/duns if duns is a toplevel directory is statted like: /disk$user/000000/duns.dir --> /disk$user since disk$user is a device is statted like: /disk$user/000000/000000.dir - --> / + --> / searches all devices, no solution yet... --> /vxcern!/disk$cr/wwwteam/login.com is not statted but granted with fake information... @@ -414,7 +406,7 @@ char Name[256]; #ifdef NOT_USED /* if filename contains a node specification (! or ::), we will try to access - the file via DECNET, but we do not stat it..., just return success + the file via DECNET, but we do not stat it..., just return success with some fake information... */ if (HTVMS_checkDecnet(Name)) { @@ -442,19 +434,19 @@ char Name[256]; { /* root requested */ return(-1); } - + /* failed so this might be a directory, add '.dir' */ Len = strlen(Name); if (Name[Len-1] == '/') Name[Len-1] = '\0'; - + /* fail in case of device */ Ptr = strchr(Name+1,'/'); if ((Ptr == NULL) && (Name[0] == '/')) { /* device only... */ strcat(Name,"/000000/000000"); } - + if (Ptr != NULL) { /* correct filename in case of toplevel dir */ Ptr2 = strchr(Ptr+1,'/'); @@ -479,9 +471,6 @@ char Name[256]; return(Result); } -/*** "dirent.h" ***/ -/* #include already in tcp.h */ - #ifndef _POSIX_SOURCE #define d_ino d_fileno /* compatability */ #ifndef NULL @@ -518,7 +507,7 @@ extern void rewinddir(/* DIR *dirp */); #endif #endif /* not defined for VMS */ -/*** #include "sys_dirent.h" ***/ +/*** #include ***/ /*** "sys_dirent.h" ***/ struct dirent { #if 0 @@ -601,7 +590,7 @@ char *dot; } else { - *dot = ']'; + *dot = ']'; strcat(DirEntry,".dir"); } @@ -617,8 +606,8 @@ char *dot; entryname_desc.dsc$b_class = DSC$K_CLASS_S; entryname_desc.dsc$a_pointer = VMSentry; - status = lib$find_file(&(dirname_desc), - &entryname_desc, + status = lib$find_file(&(dirname_desc), + &entryname_desc, &(dir.context), 0,0,0,0); if (!(status & 0x01)) @@ -662,8 +651,8 @@ char *UnixEntry; entryname_desc.dsc$b_class = DSC$K_CLASS_S; entryname_desc.dsc$a_pointer = VMSentry; - status = lib$find_file(&(dirp->dirname_desc), - &entryname_desc, + status = lib$find_file(&(dirp->dirname_desc), + &entryname_desc, &(dirp->context), 0,0,0,0); if (status == RMS$_NMF) @@ -700,15 +689,15 @@ long status; return(0); } -#include "HTAnchor.h" -#include "HTParse.h" -#include "HTBTree.h" -#include "HTFile.h" /* For HTFileFormat() */ -#include "HTAlert.h" +#include +#include +#include +#include /* For HTFileFormat() */ +#include /* ** Hypertext object building machinery. */ -#include "HTML.h" +#include #define PUTC(c) (*targetClass.put_character)(target, c) #define PUTS(s) (*targetClass.put_string)(target, s) #define START(e) (*targetClass.start_element)(target, e, 0, 0, -1, 0) @@ -734,7 +723,7 @@ typedef struct _VMSEntryInfo { BOOLEAN display; /* show this entry? */ } VMSEntryInfo; -PRIVATE void free_VMSEntryInfo_struct_contents ARGS1(VMSEntryInfo *,entry_info) +PRIVATE void free_VMSEntryInfo_contents ARGS1(VMSEntryInfo *,entry_info) { if (entry_info) { FREE(entry_info->filename); @@ -744,13 +733,13 @@ PRIVATE void free_VMSEntryInfo_struct_contents ARGS1(VMSEntryInfo *,entry_info) /* dont free the struct */ } -#define FILE_BY_NAME 0 +#define FILE_BY_NAME 0 #define FILE_BY_TYPE 1 #define FILE_BY_SIZE 2 #define FILE_BY_DATE 3 extern BOOLEAN HTfileSortMethod; /* specifies the method of sorting */ -PUBLIC int compare_VMSEntryInfo_structs ARGS2(VMSEntryInfo *,entry1, +PUBLIC int compare_VMSEntryInfo_structs ARGS2(VMSEntryInfo *,entry1, VMSEntryInfo *,entry2) { int i, status; @@ -761,7 +750,7 @@ PUBLIC int compare_VMSEntryInfo_structs ARGS2(VMSEntryInfo *,entry1, case FILE_BY_SIZE: /* both equal or both 0 */ if(entry1->size == entry2->size) - return(strcasecomp(entry1->filename, + return(strcasecomp(entry1->filename, entry2->filename)); else if(entry1->size > entry2->size) @@ -776,7 +765,7 @@ PUBLIC int compare_VMSEntryInfo_structs ARGS2(VMSEntryInfo *,entry1, return(status); /* else fall to filename comparison */ } - return (strcasecomp(entry1->filename, + return (strcasecomp(entry1->filename, entry2->filename)); break; case FILE_BY_DATE: @@ -786,7 +775,7 @@ PUBLIC int compare_VMSEntryInfo_structs ARGS2(VMSEntryInfo *,entry1, */ if (strlen(entry1->date) != 12 || strlen(entry2->date) != 12) { - return (strcasecomp(entry1->filename, + return (strcasecomp(entry1->filename, entry2->filename)); } /* @@ -852,7 +841,7 @@ PUBLIC int compare_VMSEntryInfo_structs ARGS2(VMSEntryInfo *,entry1, break; case FILE_BY_NAME: default: - return (strcmp(entry1->filename, + return (strcmp(entry1->filename, entry2->filename)); } } @@ -900,7 +889,7 @@ PUBLIC int HTVMSBrowseDir ARGS4( extern BOOLEAN no_dotfiles, show_dotfiles; HTUnEscape(pathname); - CTRACE(stderr,"HTVMSBrowseDir: Browsing `%s\'\n", pathname); + CTRACE(tfp,"HTVMSBrowseDir: Browsing `%s\'\n", pathname); /* * Require at least two elements (presumably a device and directory) @@ -914,13 +903,13 @@ PUBLIC int HTVMSBrowseDir ARGS4( 0==strncmp((cp+1), "000000", 6)) || (dp=HTVMSopendir(pathname)) == NULL) { FREE(pathname); - return HTLoadError(sink, 403, "Could not access directory."); + return HTLoadError(sink, 403, COULD_NOT_ACCESS_DIR); } /* * Set up the output stream. */ - _HTProgress ("Building directory listing..."); + _HTProgress (BUILDING_DIR_LIST); if (UCLYhndl_HTFile_for_unspec >= 0) { HTAnchor_setUCInfoStage(anchor, UCLYhndl_HTFile_for_unspec, @@ -960,30 +949,30 @@ PUBLIC int HTVMSBrowseDir ARGS4( StrAllocCat(pathname, "/"); pathend++; } - + /* * Output the title and header. */ START(HTML_HTML); - PUTS("\n"); + PUTC('\n'); START(HTML_HEAD); - PUTS("\n"); + PUTC('\n'); HTUnEscape(title); START(HTML_TITLE); PUTS(title); PUTS(" directory"); END(HTML_TITLE); - PUTS("\n"); + PUTC('\n'); FREE(title); END(HTML_HEAD); - PUTS("\n"); + PUTC('\n'); START(HTML_BODY); - PUTS("\n"); + PUTC('\n'); HTUnEscape(header); START(HTML_H1); PUTS(header); END(HTML_H1); - PUTS("\n"); + PUTC('\n'); if (HTDirReadme == HT_DIR_README_TOP) { FILE * fp; if (header[strlen(header)-1] != '/') @@ -1015,7 +1004,7 @@ PUBLIC int HTVMSBrowseDir ARGS4( } END(HTML_PRE); fclose(fp); - } + } } FREE(header); if (parent) { @@ -1029,7 +1018,7 @@ PUBLIC int HTVMSBrowseDir ARGS4( PUTS(parent); END(HTML_A); START(HTML_P); - PUTS("\n"); + PUTC('\n'); FREE(relative); FREE(parent); } @@ -1061,7 +1050,7 @@ PUBLIC int HTVMSBrowseDir ARGS4( if (!dirbuf->d_ino) { continue; } - + /* Current and parent directories are never shown in list */ if (dottest && (!strcmp(dirbuf->d_name, ".") || !strcmp(dirbuf->d_name, ".."))) { @@ -1088,7 +1077,7 @@ PUBLIC int HTVMSBrowseDir ARGS4( we however continue to browse through the directory... */ continue; } - entry_info = (VMSEntryInfo *)malloc(sizeof(VMSEntryInfo)); + entry_info = (VMSEntryInfo *)malloc(sizeof(VMSEntryInfo)); if (entry_info == NULL) outofmem(__FILE__, "HTVMSBrowseDir"); entry_info->type = 0; @@ -1101,7 +1090,7 @@ PUBLIC int HTVMSBrowseDir ARGS4( format = HTFileFormat(dirbuf->d_name, &encoding, (CONST char **)&cp); if (!cp) { - if(!strncmp(HTAtom_name(format), "application",11)) + if(!strncmp(HTAtom_name(format), "application",11)) { cp = HTAtom_name(format) + 12; if(!strncmp(cp,"x-", 2)) @@ -1113,17 +1102,13 @@ PUBLIC int HTVMSBrowseDir ARGS4( StrAllocCopy(entry_info->type, cp); StrAllocCopy(entry_info->filename, dirbuf->d_name); - if ((file_info.st_mode & S_IFMT) == S_IFDIR) { + if (S_ISDIR(file_info.st_mode)) { /* strip .DIR part... */ char *dot; dot = strstr(entry_info->filename, ".DIR"); if (dot) *dot = '\0'; - cp = entry_info->filename; - while (cp && *cp) { - *cp = TOLOWER(*cp); - cp++; - } + LYLowerCase(entry_info->filename); StrAllocCopy(entry_info->type, "Directory"); } else { if ((cp = strstr(entry_info->filename, "READ")) == NULL) { @@ -1142,10 +1127,7 @@ PUBLIC int HTVMSBrowseDir ARGS4( cp = entry_info->filename; } } - while (cp && *cp) { - *cp = TOLOWER(*cp); - cp++; - } + LYLowerCase(cp); if (((len = strlen(entry_info->filename)) > 2) && entry_info->filename[len-1] == 'z') { if (entry_info->filename[len-2] == '.' || @@ -1170,7 +1152,7 @@ PUBLIC int HTVMSBrowseDir ARGS4( } /* Get the size */ - if ((file_info.st_mode & S_IFMT) != S_IFDIR) + if (!S_ISDIR(file_info.st_mode)) entry_info->size = (unsigned int)file_info.st_size; else entry_info->size = 0; @@ -1178,9 +1160,9 @@ PUBLIC int HTVMSBrowseDir ARGS4( /* Now, update the BTree etc. */ if(entry_info->display) { - CTRACE(stderr,"Adding file to BTree: %s\n", + CTRACE(tfp,"Adding file to BTree: %s\n", entry_info->filename); - HTBTree_add(bt, (VMSEntryInfo *)entry_info); + HTBTree_add(bt, (VMSEntryInfo *)entry_info); } } /* End while HTVMSreaddir() */ @@ -1202,7 +1184,7 @@ PUBLIC int HTVMSBrowseDir ARGS4( entry_info = (VMSEntryInfo *)HTBTree_object(ele); /* Output the date */ - if(entry_info->date) + if(entry_info->date) { PUTS(entry_info->date); PUTS(" "); @@ -1211,7 +1193,7 @@ PUBLIC int HTVMSBrowseDir ARGS4( PUTS(" * "); /* Output the type */ - if(entry_info->type) + if(entry_info->type) { for(i = 0; entry_info->type[i] != '\0' && i < 15; i++) PUTC(entry_info->type[i]); @@ -1221,12 +1203,12 @@ PUBLIC int HTVMSBrowseDir ARGS4( } /* Output the link for the name */ - HTDirEntry(target, tail, entry_info->filename); + HTDirEntry(target, tail, entry_info->filename); PUTS(entry_info->filename); END(HTML_A); /* Output the size */ - if(entry_info->size) + if(entry_info->size) { if(entry_info->size < 1024) sprintf(string_buffer," %d bytes", @@ -1239,7 +1221,7 @@ PUBLIC int HTVMSBrowseDir ARGS4( PUTC('\n'); /* end of this entry */ - free_VMSEntryInfo_struct_contents(entry_info); + free_VMSEntryInfo_contents(entry_info); } } @@ -1251,14 +1233,56 @@ PUBLIC int HTVMSBrowseDir ARGS4( * Complete the output stream. */ END(HTML_PRE); - PUTS("\n"); + PUTC('\n'); END(HTML_BODY); - PUTS("\n"); + PUTC('\n'); END(HTML_HTML); - PUTS("\n"); + PUTC('\n'); FREE(tail); FREE_TARGET; return HT_LOADED; } /* End of directory reading section */ + +/* + * Remove all versions of the given file. We assume there are no permissions + * problems, since we do this mainly for removing temporary files. + */ +int HTVMS_remove(char *filename) +{ + int code = remove(filename); /* return the first status code */ + while (remove(filename) == 0) + ; + return code; +} + +/* + * Remove all older versions of the given file. We may fail to remove some + * version due to permissions -- the loop stops either at that point, or when + * we run out of older versions to remove. + */ +void HTVMS_purge(char *filename) +{ + char *older_file = 0; + char *oldest_file = 0; + struct stat sb; + + StrAllocCopy(older_file, filename); + StrAllocCat(older_file, ";-1"); + + while (remove(older_file) == 0) + ; + /* + * If we do not have any more older versions, it is safe to rename the + * current file to version #1. + */ + if (stat(older_file, &sb) != 0) { + StrAllocCopy(oldest_file, filename); + StrAllocCat(oldest_file, ";1"); + rename(older_file, oldest_file); + FREE(oldest_file); + } + + FREE(older_file); +} diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMSUtils.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMSUtils.h index e055d6724c6..c5bcb666662 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMSUtils.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMSUtils.h @@ -5,7 +5,11 @@ #ifndef HTVMSUTIL_H #define HTVMSUTIL_H -#include +#ifndef HTUTILS_H +#include +#endif + +#include extern BOOL HTVMSFileVersions; /* Include version numbers in listing? */ @@ -102,7 +106,7 @@ PUBLIC char * HTVMS_name PARAMS(( PUBLIC int HTStat PARAMS(( CONST char * filename, - stat_t * info)); + struct stat * info)); PUBLIC int HTVMSBrowseDir PARAMS(( CONST char * address, @@ -110,7 +114,7 @@ PUBLIC int HTVMSBrowseDir PARAMS(( HTFormat format_out, HTStream * sink)); -#endif /* not HTVMSUTIL_H */ -/* +extern int HTVMS_remove(char *filename); +extern void HTVMS_purge(char *filename); - End of file HTVMSUtil.h. */ +#endif /* not HTVMSUTIL_H */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMS_WaisProt.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMS_WaisProt.c index ee3a51c0e14..760814072e6 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMS_WaisProt.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMS_WaisProt.c @@ -31,12 +31,11 @@ /* This file implements the Z39.50 extensions required for WAIS */ -#include "HTUtils.h" -#include "tcp.h" -#include "HTVMS_WaisUI.h" -#include "HTVMS_WaisProt.h" +#include +#include +#include -#include "LYLeaks.h" +#include /* very rough estimates of the size of an object */ @@ -58,7 +57,7 @@ /*----------------------------------------------------------------------*/ -static unsigned long userInfoTagSize _AP((data_tag tag, +static unsigned long userInfoTagSize PARAMS((data_tag tag, unsigned long length)); static unsigned long @@ -80,7 +79,7 @@ unsigned long length; /*----------------------------------------------------------------------*/ -static char* writeUserInfoHeader _AP((data_tag tag,long infoSize, +static char* writeUserInfoHeader PARAMS((data_tag tag,long infoSize, long estHeaderSize,char* buffer, long* len)); @@ -127,7 +126,7 @@ long* len; /*----------------------------------------------------------------------*/ -static char* readUserInfoHeader _AP((data_tag* tag,unsigned long* num, +static char* readUserInfoHeader PARAMS((data_tag* tag,unsigned long* num, char* buffer)); static char* @@ -228,8 +227,8 @@ char* buffer; char* buf = buffer; unsigned long size; unsigned long headerSize; - data_tag tag; long chunkCode,chunkIDLen; + data_tag tag1; char* chunkMarker = NULL; char* highlightMarker = NULL; char* deHighlightMarker = NULL; @@ -237,7 +236,7 @@ char* buffer; chunkCode = chunkIDLen = UNUSED; - buf = readUserInfoHeader(&tag,&size,buf); + buf = readUserInfoHeader(&tag1,&size,buf); headerSize = buf - buffer; while (buf < (buffer + size + headerSize)) @@ -436,7 +435,7 @@ DocObj* doc; /*----------------------------------------------------------------------*/ -static char* writeDocObj _AP((DocObj* doc,char* buffer,long* len)); +static char* writeDocObj PARAMS((DocObj* doc,char* buffer,long* len)); static char* writeDocObj(doc,buffer,len) @@ -483,7 +482,7 @@ long* len; /*----------------------------------------------------------------------*/ -static char* readDocObj _AP((DocObj** doc,char* buffer)); +static char* readDocObj PARAMS((DocObj** doc,char* buffer)); static char* readDocObj(doc,buffer) @@ -610,7 +609,7 @@ char* buffer; { char* buf = buffer; unsigned long size; unsigned long headerSize; - data_tag tag; + data_tag tag1; char* seedWords = NULL; char* beginDateRange = NULL; char* endDateRange = NULL; @@ -624,7 +623,7 @@ char* buffer; dateFactor = maxDocsRetrieved = UNUSED; - buf = readUserInfoHeader(&tag,&size,buf); + buf = readUserInfoHeader(&tag1,&size,buf); headerSize = buf - buffer; while (buf < (buffer + size + headerSize)) @@ -769,7 +768,7 @@ long* len; unsigned long header_len = userInfoTagSize(DT_DocumentHeaderGroup , DefWAISDocHeaderSize); char* buf = buffer + header_len; - unsigned long size; + unsigned long size1; RESERVE_SPACE_FOR_WAIS_HEADER(len); @@ -800,8 +799,8 @@ long* len; buf = writeString(header->OriginCity,DT_OriginCity,buf,len); /* now write the header and size */ - size = buf - buffer; - buf = writeUserInfoHeader(DT_DocumentHeaderGroup,size,header_len,buffer,len); + size1 = buf - buffer; + buf = writeUserInfoHeader(DT_DocumentHeaderGroup,size1,header_len,buffer,len); return(buf); } @@ -814,9 +813,9 @@ WAISDocumentHeader** header; char* buffer; { char* buf = buffer; - unsigned long size; + unsigned long size1; unsigned long headerSize; - data_tag tag; + data_tag tag1; any* docID = NULL; long versionNumber,score,bestMatch,docLength,lines; char** types = NULL; @@ -827,10 +826,10 @@ char* buffer; versionNumber = score = bestMatch = docLength = lines = UNUSED; - buf = readUserInfoHeader(&tag,&size,buf); + buf = readUserInfoHeader(&tag1,&size1,buf); headerSize = buf - buffer; - while (buf < (buffer + size + headerSize)) + while (buf < (buffer + size1 + headerSize)) { data_tag tag = peekTag(buf); switch (tag) { case DT_DocumentID: @@ -977,13 +976,13 @@ char* buffer; char* buf = buffer; unsigned long size; unsigned long headerSize; - data_tag tag; + data_tag tag1; any* docID = NULL; long versionNumber,score,bestMatch,docLength,lines; versionNumber = score = bestMatch = docLength = lines = UNUSED; - buf = readUserInfoHeader(&tag,&size,buf); + buf = readUserInfoHeader(&tag1,&size,buf); headerSize = buf - buffer; while (buf < (buffer + size + headerSize)) @@ -1105,7 +1104,7 @@ long* len; unsigned long header_len = userInfoTagSize(DT_DocumentLongHeaderGroup , DefWAISLongHeaderSize); char* buf = buffer + header_len; - unsigned long size; + unsigned long size1; RESERVE_SPACE_FOR_WAIS_HEADER(len); @@ -1139,8 +1138,8 @@ long* len; buf = writeString(header->IndustryCodes,DT_IndustryCodes,buf,len); /* now write the header and size */ - size = buf - buffer; - buf = writeUserInfoHeader(DT_DocumentLongHeaderGroup,size,header_len,buffer,len); + size1 = buf - buffer; + buf = writeUserInfoHeader(DT_DocumentLongHeaderGroup,size1,header_len,buffer,len); return(buf); } @@ -1153,9 +1152,9 @@ WAISDocumentLongHeader** header; char* buffer; { char* buf = buffer; - unsigned long size; + unsigned long size1; unsigned long headerSize; - data_tag tag; + data_tag tag1; any* docID; long versionNumber,score,bestMatch,docLength,lines; char **types; @@ -1166,10 +1165,10 @@ char* buffer; types = NULL; source = date = headline = originCity = stockCodes = companyCodes = industryCodes = NULL; - buf = readUserInfoHeader(&tag,&size,buf); + buf = readUserInfoHeader(&tag1,&size1,buf); headerSize = buf - buffer; - while (buf < (buffer + size + headerSize)) + while (buf < (buffer + size1 + headerSize)) { data_tag tag = peekTag(buf); switch (tag) { case DT_DocumentID: @@ -1396,7 +1395,7 @@ long* len; /*----------------------------------------------------------------------*/ static void -cleanUpWaisSearchResponse _AP((char* buf,char* seedWordsUsed, +cleanUpWaisSearchResponse PARAMS((char* buf,char* seedWordsUsed, WAISDocumentHeader** docHeaders, WAISDocumentShortHeader** shortHeaders, WAISDocumentLongHeader** longHeaders, @@ -1474,7 +1473,7 @@ char* buffer; char* buf = buffer; unsigned long size; unsigned long headerSize; - data_tag tag; + data_tag tag1; void* header = NULL; WAISDocumentHeader** docHeaders = NULL; WAISDocumentShortHeader** shortHeaders = NULL; @@ -1491,7 +1490,7 @@ char* buffer; numDocHeaders = numLongHeaders = numShortHeaders = numText = numHeadlines = numCodes = 0; - buf = readUserInfoHeader(&tag,&size,buf); + buf = readUserInfoHeader(&tag1,&size,buf); headerSize = buf - buffer; while (buf < (buffer + size + headerSize)) @@ -1672,14 +1671,14 @@ char* buffer; char* buf = buffer; unsigned long size; unsigned long headerSize; - data_tag tag; + data_tag tag1; any *docID,*documentText; long versionNumber; docID = documentText = NULL; versionNumber = UNUSED; - buf = readUserInfoHeader(&tag,&size,buf); + buf = readUserInfoHeader(&tag1,&size,buf); headerSize = buf - buffer; while (buf < (buffer + size + headerSize)) @@ -1788,7 +1787,7 @@ char* buffer; char* buf = buffer; unsigned long size; unsigned long headerSize; - data_tag tag; + data_tag tag1; any* docID; long versionNumber; char *source,*date,*headline,*originCity; @@ -1797,7 +1796,7 @@ char* buffer; versionNumber = UNUSED; source = date = headline = originCity = NULL; - buf = readUserInfoHeader(&tag,&size,buf); + buf = readUserInfoHeader(&tag1,&size,buf); headerSize = buf - buffer; while (buf < (buffer + size + headerSize)) @@ -1913,7 +1912,7 @@ char* buffer; char* buf = buffer; unsigned long size; unsigned long headerSize; - data_tag tag; + data_tag tag1; any* docID; long versionNumber; char *stockCodes,*companyCodes,*industryCodes; @@ -1922,7 +1921,7 @@ char* buffer; versionNumber = UNUSED; stockCodes = companyCodes = industryCodes = NULL; - buf = readUserInfoHeader(&tag,&size,buf); + buf = readUserInfoHeader(&tag1,&size,buf); headerSize = buf - buffer; while (buf < (buffer + size + headerSize)) @@ -1962,9 +1961,9 @@ char* buffer; char* writePresentInfo(present,buffer,len) -PresentAPDU* present; +PresentAPDU* present GCC_UNUSED; char* buffer; -long* len; +long* len GCC_UNUSED; { /* The WAIS protocol doesn't use present info */ return(buffer); @@ -1986,9 +1985,9 @@ char* buffer; char* writePresentResponseInfo(response,buffer,len) -PresentResponseAPDU* response; +PresentResponseAPDU* response GCC_UNUSED; char* buffer; -long* len; +long* len GCC_UNUSED; { /* The WAIS protocol doesn't use presentResponse info */ return(buffer); @@ -2045,7 +2044,7 @@ char* buffer; ( XXX return type could be in the element set) */ -static query_term** makeWAISQueryTerms _AP((DocObj** docs)); +static query_term** makeWAISQueryTerms PARAMS((DocObj** docs)); static query_term** makeWAISQueryTerms(docs) @@ -2164,7 +2163,7 @@ DocObj** docs; /*----------------------------------------------------------------------*/ -static DocObj** makeWAISQueryDocs _AP((query_term** terms)); +static DocObj** makeWAISQueryDocs PARAMS((query_term** terms)); static DocObj** makeWAISQueryDocs(terms) diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMS_WaisProt.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMS_WaisProt.h index 1a4e83d50f1..feea3264e8a 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMS_WaisProt.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMS_WaisProt.h @@ -29,9 +29,14 @@ */ #ifndef _H_WAIS_protocol_ - #define _H_WAIS_protocol_ +#ifndef HTUTILS_H +#include +#endif + +#include + /*----------------------------------------------------------------------*/ /* Data types / constants */ @@ -218,88 +223,97 @@ typedef struct WAISSearchResponse { /*----------------------------------------------------------------------*/ /* Functions */ -DocObj* makeDocObjUsingWholeDocument _AP((any* aDocID,char* type)); -DocObj* makeDocObjUsingBytes _AP((any* aDocID,char* type,long start,long end)); -DocObj* makeDocObjUsingLines _AP((any* aDocID,char* type,long start,long end)); -DocObj* makeDocObjUsingParagraphs _AP((any* aDocID,char* type,any* start,any* end)); -void freeDocObj _AP((DocObj* doc)); - -WAISInitResponse* makeWAISInitResponse _AP((long chunkCode,long chunkIDLen, +char * +generate_search_apdu PARAMS((char* buff, /* buffer to hold the apdu */ + long *buff_len, /* number of bytes written to the buffer */ + char *seed_words, /* string of the seed words */ + char *database_name, + DocObj** docobjs, + long maxDocsRetrieved + )); + +DocObj* makeDocObjUsingWholeDocument PARAMS((any* aDocID,char* type)); +DocObj* makeDocObjUsingBytes PARAMS((any* aDocID,char* type,long start,long end)); +DocObj* makeDocObjUsingLines PARAMS((any* aDocID,char* type,long start,long end)); +DocObj* makeDocObjUsingParagraphs PARAMS((any* aDocID,char* type,any* start,any* end)); +void freeDocObj PARAMS((DocObj* doc)); + +WAISInitResponse* makeWAISInitResponse PARAMS((long chunkCode,long chunkIDLen, char* chunkMarker,char* highlightMarker, char* deHighlightMarker,char* newLineChars)); -void freeWAISInitResponse _AP((WAISInitResponse* init)); +void freeWAISInitResponse PARAMS((WAISInitResponse* init)); -WAISSearch* makeWAISSearch _AP(( +WAISSearch* makeWAISSearch PARAMS(( char* seedWords,DocObj** docs,char** textList, long dateFactor,char* beginDateRange,char* endDateRange, long maxDocsRetrieved)); -void freeWAISSearch _AP((WAISSearch* query)); +void freeWAISSearch PARAMS((WAISSearch* query)); -WAISDocumentHeader* makeWAISDocumentHeader _AP(( +WAISDocumentHeader* makeWAISDocumentHeader PARAMS(( any* aDocID,long versionNumber,long score,long bestMatch,long docLen, long lines,char** types,char* source,char* date,char* headline,char* originCity)); -void freeWAISDocumentHeader _AP((WAISDocumentHeader* header)); -char* writeWAISDocumentHeader _AP((WAISDocumentHeader* header,char* buffer,long* len)); -char* readWAISDocumentHeader _AP((WAISDocumentHeader** header,char* buffer)); +void freeWAISDocumentHeader PARAMS((WAISDocumentHeader* header)); +char* writeWAISDocumentHeader PARAMS((WAISDocumentHeader* header,char* buffer,long* len)); +char* readWAISDocumentHeader PARAMS((WAISDocumentHeader** header,char* buffer)); -WAISDocumentShortHeader* makeWAISDocumentShortHeader _AP(( +WAISDocumentShortHeader* makeWAISDocumentShortHeader PARAMS(( any* aDocID,long versionNumber,long score,long bestMatch,long docLen,long lines)); -void freeWAISDocumentShortHeader _AP((WAISDocumentShortHeader* header)); -char* writeWAISDocumentShortHeader _AP((WAISDocumentShortHeader* header, +void freeWAISDocumentShortHeader PARAMS((WAISDocumentShortHeader* header)); +char* writeWAISDocumentShortHeader PARAMS((WAISDocumentShortHeader* header, char* buffer,long* len)); -char* readWAISDocumentShortHeader _AP((WAISDocumentShortHeader** header,char* buffer)); +char* readWAISDocumentShortHeader PARAMS((WAISDocumentShortHeader** header,char* buffer)); -WAISDocumentLongHeader* makeWAISDocumentLongHeader _AP(( +WAISDocumentLongHeader* makeWAISDocumentLongHeader PARAMS(( any* aDocID,long versionNumber,long score,long bestMatch,long docLen, long lines,char** types,char* source,char* date, char* headline,char* originCity, char* stockCodes,char* companyCodes,char* industryCodes)); -void freeWAISDocumentLongHeader _AP((WAISDocumentLongHeader* header)); -char* writeWAISDocumentLongHeader _AP((WAISDocumentLongHeader* header,char* buffer,long* len)); -char* readWAISDocumentLongHeader _AP((WAISDocumentLongHeader** header,char* buffer)); +void freeWAISDocumentLongHeader PARAMS((WAISDocumentLongHeader* header)); +char* writeWAISDocumentLongHeader PARAMS((WAISDocumentLongHeader* header,char* buffer,long* len)); +char* readWAISDocumentLongHeader PARAMS((WAISDocumentLongHeader** header,char* buffer)); -WAISSearchResponse* makeWAISSearchResponse _AP(( +WAISSearchResponse* makeWAISSearchResponse PARAMS(( char* seedWordsUsed,WAISDocumentHeader** docHeaders, WAISDocumentShortHeader** shortHeaders, WAISDocumentLongHeader** longHeaders, WAISDocumentText** text,WAISDocumentHeadlines** headlines, WAISDocumentCodes** codes, diagnosticRecord** diagnostics)); -void freeWAISSearchResponse _AP((WAISSearchResponse* response)); +void freeWAISSearchResponse PARAMS((WAISSearchResponse* response)); -WAISDocumentText* makeWAISDocumentText _AP((any* aDocID,long versionNumber, +WAISDocumentText* makeWAISDocumentText PARAMS((any* aDocID,long versionNumber, any* documentText)); -void freeWAISDocumentText _AP((WAISDocumentText* docText)); -char* writeWAISDocumentText _AP((WAISDocumentText* docText,char* buffer,long* len)); -char* readWAISDocumentText _AP((WAISDocumentText** docText,char* buffer)); +void freeWAISDocumentText PARAMS((WAISDocumentText* docText)); +char* writeWAISDocumentText PARAMS((WAISDocumentText* docText,char* buffer,long* len)); +char* readWAISDocumentText PARAMS((WAISDocumentText** docText,char* buffer)); -WAISDocumentHeadlines* makeWAISDocumentHeadlines _AP(( +WAISDocumentHeadlines* makeWAISDocumentHeadlines PARAMS(( any* aDocID,long versionNumber,char* source,char* date,char* headline, char* originCity)); -void freeWAISDocumentHeadlines _AP((WAISDocumentHeadlines* docHeadline)); -char* writeWAISDocumentHeadlines _AP((WAISDocumentHeadlines* docHeadline,char* buffer,long* len)); -char* readWAISDocumentHeadlines _AP((WAISDocumentHeadlines** docHeadline,char* buffer)); +void freeWAISDocumentHeadlines PARAMS((WAISDocumentHeadlines* docHeadline)); +char* writeWAISDocumentHeadlines PARAMS((WAISDocumentHeadlines* docHeadline,char* buffer,long* len)); +char* readWAISDocumentHeadlines PARAMS((WAISDocumentHeadlines** docHeadline,char* buffer)); -WAISDocumentCodes* makeWAISDocumentCodes _AP(( +WAISDocumentCodes* makeWAISDocumentCodes PARAMS(( any* aDocID,long versionNumber,char* stockCodes,char* companyCodes, char* industryCodes)); -void freeWAISDocumentCodes _AP((WAISDocumentCodes* docCodes)); -char* writeWAISDocumentCodes _AP((WAISDocumentCodes* docCodes,char* buffer,long* len)); -char* readWAISDocumentCodes _AP((WAISDocumentCodes** docCodes,char* buffer)); - -any* makeWAISTextQuery _AP((DocObj** docs)); -DocObj** readWAISTextQuery _AP((any* terms)); - -void CSTFreeWAISInitResponse _AP((WAISInitResponse* init)); -void CSTFreeWAISSearch _AP((WAISSearch* query)); -void CSTFreeDocObj _AP((DocObj* doc)); -void CSTFreeWAISDocumentHeader _AP((WAISDocumentHeader* header)); -void CSTFreeWAISDocumentShortHeader _AP((WAISDocumentShortHeader* header)); -void CSTFreeWAISDocumentLongHeader _AP((WAISDocumentLongHeader* header)); -void CSTFreeWAISSearchResponse _AP((WAISSearchResponse* response)); -void CSTFreeWAISDocumentText _AP((WAISDocumentText* docText)); -void CSTFreeWAISDocHeadlines _AP((WAISDocumentHeadlines* docHeadline)); -void CSTFreeWAISDocumentCodes _AP((WAISDocumentCodes* docCodes)); -void CSTFreeWAISTextQuery _AP(( any* query)); +void freeWAISDocumentCodes PARAMS((WAISDocumentCodes* docCodes)); +char* writeWAISDocumentCodes PARAMS((WAISDocumentCodes* docCodes,char* buffer,long* len)); +char* readWAISDocumentCodes PARAMS((WAISDocumentCodes** docCodes,char* buffer)); + +any* makeWAISTextQuery PARAMS((DocObj** docs)); +DocObj** readWAISTextQuery PARAMS((any* terms)); + +void CSTFreeWAISInitResponse PARAMS((WAISInitResponse* init)); +void CSTFreeWAISSearch PARAMS((WAISSearch* query)); +void CSTFreeDocObj PARAMS((DocObj* doc)); +void CSTFreeWAISDocumentHeader PARAMS((WAISDocumentHeader* header)); +void CSTFreeWAISDocumentShortHeader PARAMS((WAISDocumentShortHeader* header)); +void CSTFreeWAISDocumentLongHeader PARAMS((WAISDocumentLongHeader* header)); +void CSTFreeWAISSearchResponse PARAMS((WAISSearchResponse* response)); +void CSTFreeWAISDocumentText PARAMS((WAISDocumentText* docText)); +void CSTFreeWAISDocHeadlines PARAMS((WAISDocumentHeadlines* docHeadline)); +void CSTFreeWAISDocumentCodes PARAMS((WAISDocumentCodes* docCodes)); +void CSTFreeWAISTextQuery PARAMS(( any* query)); /*----------------------------------------------------------------------*/ @@ -334,6 +348,12 @@ void CSTFreeWAISTextQuery _AP(( any* query)); #ifndef WMESSAGE_H #define WMESSAGE_H +#ifndef HTUTILS_H +#include +#endif + +#include + typedef struct wais_header { char msg_len[10]; /* length in bytes of following message */ char msg_type; /* type of message: 'z'=Z39.50 APDU, @@ -367,9 +387,9 @@ typedef struct wais_header { #define UUENCODE 'u' -void readWAISPacketHeader _AP((char* msgBuffer,WAISMessage *header_struct)); -long getWAISPacketLength _AP((WAISMessage* header)); -void writeWAISPacketHeader _AP((char* header,long dataLen,long type, +void readWAISPacketHeader PARAMS((char* msgBuffer,WAISMessage *header_struct)); +long getWAISPacketLength PARAMS((WAISMessage* header)); +void writeWAISPacketHeader PARAMS((char* header,long dataLen,long type, char* server,long compression, long encoding,long version)); diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMS_WaisUI.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMS_WaisUI.c index 81c097070c9..1f9ffcccd18 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMS_WaisUI.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMS_WaisUI.c @@ -17,10 +17,10 @@ Brewster@think.com */ -/* +/* * this is a simple ui toolkit for building other ui's on top. * -brewster - * + * * top level functions: * generate_search_apdu * generate_retrieval_apdu @@ -32,26 +32,22 @@ * generate multiple queries for long documents. * this will crash if the file being retrieved is larger than 100k. * do log_write() - * + * */ -#include "HTUtils.h" -#include "tcp.h" -#include "HTVMS_WaisUI.h" -#include "HTVMS_WaisProt.h" -#include "HTTCP.h" -/*#include included by HTUtils.h -- FM */ -#include -#include +#include +#include +#include +#include + +#undef MAXINT /* we don't need it here, and tcp.h may conflict */ #include -#include -#include "LYexit.h" -#include "LYLeaks.h" +#include +#include void -log_write(s) -char *s; +log_write(char *s GCC_UNUSED) { return; } @@ -59,21 +55,16 @@ char *s; /*----------------------------------------------------------------------*/ /* returns a pointer in the buffer of the first free byte. - if it overflows, then NULL is returned + if it overflows, then NULL is returned */ char * -generate_search_apdu(buff, - buff_len, - seed_words, - database_name, - docobjs, - maxDocsRetrieved) -char* buff; /* buffer to hold the apdu */ -long *buff_len; /* length of the buffer changed to reflect new data written */ -char *seed_words; /* string of the seed words */ -char *database_name; -DocObj** docobjs; -long maxDocsRetrieved; +generate_search_apdu( +char* buff, /* buffer to hold the apdu */ +long *buff_len, /* length of the buffer changed to reflect new data written */ +char *seed_words, /* string of the seed words */ +char *database_name, +DocObj** docobjs, +long maxDocsRetrieved) { /* local variables */ @@ -95,12 +86,12 @@ long maxDocsRetrieved; maxDocsRetrieved ); - search3 = makeSearchAPDU(30, + search3 = makeSearchAPDU(30, 5000, /* should be large */ 30, 1, /* replace indicator */ "", /* result set name */ - database_names, /* database name */ + database_names, /* database name */ QT_RelevanceFeedbackQuery, /* query_type */ 0, /* element name */ NULL, /* reference ID */ @@ -120,22 +111,15 @@ long maxDocsRetrieved; */ char * -generate_retrieval_apdu(buff, - buff_len, - docID, - chunk_type, - start, - end, - type, - database_name) -char *buff; -long *buff_len; /* length of the buffer changed to reflect new data written */ -any *docID; -long chunk_type; -long start; -long end; -char *type; -char *database_name; +generate_retrieval_apdu( +char *buff, +long *buff_len, /* length of the buffer changed to reflect new data written */ +any *docID, +long chunk_type, +long start, +long end, +char *type, +char *database_name) { SearchAPDU *search; char *end_ptr; @@ -159,9 +143,9 @@ char *database_name; refID.size = 1; refID.bytes = "3"; - + switch(chunk_type){ - case CT_line: + case CT_line: DocObjs[0] = makeDocObjUsingLines(docID, type, start, end); break; case CT_byte: @@ -170,11 +154,11 @@ char *database_name; } DocObjs[1] = NULL; - query = makeWAISTextQuery(DocObjs); - search = makeSearchAPDU( 10, 16, 15, + query = makeWAISTextQuery(DocObjs); + search = makeSearchAPDU( 10, 16, 15, 1, /* replace indicator */ "FOO", /* result set name */ - database_names, /* database name */ + database_names, /* database name */ QT_TextRetrievalQuery, /* query_type */ element_names, /* element name */ &refID, /* reference ID */ @@ -192,10 +176,7 @@ char *database_name; * to those trying to modify the transport code to use non-UNIX streams: * This is the function to modify! */ -long read_from_stream(d,buf,nbytes) -int d; /* this is the stream */ -char *buf; -long nbytes; +PRIVATE long read_from_stream(int d, char *buf, long nbytes) { long didRead; long toRead = nbytes; @@ -214,7 +195,7 @@ long nbytes; totalRead += didRead; } if(totalRead != nbytes) /* we overread for some reason */ - return(- totalRead); /* bad news */ + return(- totalRead); /* bad news */ return(totalRead); } @@ -222,25 +203,21 @@ long nbytes; /* returns the length of the response, 0 if an error */ -long -transport_message(connection, - request_message, - request_length, - response_message, - response_buffer_length) -int connection; -char *request_message; -long request_length; -char *response_message; -long response_buffer_length; +PRIVATE long +transport_message( + long connection, + char *request_message, + long request_length, + char *response_message, + long response_buffer_length) { WAISMessage header; long response_length; int rv; - - /* Write out message. Read back header. Figure out response length. */ - + + /* Write out message. Read back header. Figure out response length. */ + if( request_length + HEADER_LENGTH != NETWRITE(connection,request_message, (int)( request_length +HEADER_LENGTH)) ) @@ -272,7 +249,7 @@ long response_buffer_length; response_length = atol(length_array); /* if(verbose){ - printf("WAIS header: '%s' length_array: '%s'\n", + printf("WAIS header: '%s' length_array: '%s'\n", response_message, length_array); } */ @@ -281,7 +258,7 @@ long response_buffer_length; and return 0 */ long i; for(i = 0; i < response_length; i++){ - rv = read_from_stream(connection, + rv = read_from_stream(connection, response_message + HEADER_LENGTH, 1); if (rv == HT_INTERRUPTED) @@ -292,7 +269,7 @@ long response_buffer_length; return(0); } } - rv = read_from_stream(connection, + rv = read_from_stream(connection, response_message + HEADER_LENGTH, response_length); if (rv == HT_INTERRUPTED) @@ -304,19 +281,15 @@ long response_buffer_length; /*----------------------------------------------------------------------*/ -/* returns the number of bytes writen. 0 if an error */ +/* returns the number of bytes written. 0 if an error */ long -interpret_message(request_message,request_length, - response_message, - response_buffer_length, - connection, - verbose) -char *request_message; -long request_length; /* length of the buffer */ -char *response_message; -long response_buffer_length; -int connection; -boolean verbose; +interpret_message( + char *request_message, + long request_length, /* length of the buffer */ + char *response_message, + long response_buffer_length, + long connection, + boolean verbose GCC_UNUSED) { long response_length; @@ -328,7 +301,7 @@ boolean verbose; if(service_name && strlen(service_name) > 0) printf(" for service %s", service_name); printf("\n"); - twais_dsply_rsp_apdu(request_message + HEADER_LENGTH, + twais_dsply_rsp_apdu(request_message + HEADER_LENGTH, request_length); } @@ -358,9 +331,7 @@ boolean verbose; /* modifies the string to exclude all seeker codes. sets length to the new length. */ -char *delete_seeker_codes(string,length) -char *string; -long *length; +PRIVATE char *delete_seeker_codes(char *string, long *length) { long original_count; /* index into the original string */ long new_count = 0; /* index into the collapsed string */ @@ -378,7 +349,7 @@ long *length; *length = new_count; return(string); } - + /*----------------------------------------------------------------------*/ #if defined(VMS) && defined(__GNUC__) /* 10-AUG-1995 [pr] */ @@ -398,11 +369,10 @@ static __const void *__const ctype_dummy[] = { &_ctype_, &ctype_dummy }; #endif /* VMS && __GNUC__ */ /* returns a pointer to a string with good stuff */ -char *trim_junk(headline) -char *headline; +char *trim_junk(char *headline) { long length = strlen(headline) + 1; /* include the trailing null */ - long i; + size_t i; headline = delete_seeker_codes(headline, &length); /* delete leading spaces */ for(i=0; i < strlen(headline); i++){ @@ -430,8 +400,8 @@ char *headline; **----------------------------------------------------------------------*/ /* WIDE AREA INFORMATION SERVER SOFTWARE:` No guarantees or restrictions. See the readme file for the full standard - disclaimer. - + disclaimer. + 3.26.90 Harry Morris, morris@think.com 3.30.90 Harry Morris - Changed any->bits to any->bytes 4.11.90 HWM - generalized conditional includes (see c-dialect.h) @@ -439,44 +409,31 @@ char *headline; #define RESERVE_SPACE_FOR_HEADER(spaceLeft) \ *spaceLeft -= HEADER_LEN; - + #define RELEASE_HEADER_SPACE(spaceLeft) \ if (*spaceLeft > 0) \ *spaceLeft += HEADER_LEN; - -/*----------------------------------------------------------------------*/ - -InitResponseAPDU* -makeInitResponseAPDU(result, - search, - present, - deleteIt, - accessControl, - resourceControl, - prefSize, - maxMsgSize, - auth, - id, - name, - version, - refID, - userInfo) -boolean result; -boolean search; -boolean present; -boolean deleteIt; -boolean accessControl; -boolean resourceControl; -long prefSize; -long maxMsgSize; -char* auth; -char* id; -char* name; -char* version; -any* refID; -void* userInfo; + +/*----------------------------------------------------------------------*/ + +InitResponseAPDU* +makeInitResponseAPDU( +boolean result, +boolean search, +boolean present, +boolean deleteIt, +boolean accessControl, +boolean resourceControl, +long prefSize, +long maxMsgSize, +char* auth, +char* id, +char* name, +char* version, +any* refID, +void* userInfo) /* build an initResponse APDU with user specified information */ -{ +{ InitResponseAPDU* init = (InitResponseAPDU*)s_malloc((size_t)sizeof(InitResponseAPDU)); init->PDUType = initResponseAPDU; @@ -494,15 +451,14 @@ void* userInfo; init->ImplementationVersion = s_strdup(version); init->ReferenceID = duplicateAny(refID); init->UserInformationField = userInfo; /* not copied! */ - + return(init); } /*----------------------------------------------------------------------*/ -void -freeInitResponseAPDU(init) -InitResponseAPDU* init; +void +freeInitResponseAPDU(InitResponseAPDU* init) /* free an initAPDU */ { s_free(init->IDAuthentication); @@ -515,23 +471,20 @@ InitResponseAPDU* init; /*----------------------------------------------------------------------*/ -char* -writeInitResponseAPDU(init,buffer,len) -InitResponseAPDU* init; -char* buffer; -long* len; +char* +writeInitResponseAPDU(InitResponseAPDU* init, char* buffer, long* len) /* write the initResponse to a buffer, adding system information */ -{ +{ char* buf = buffer + HEADER_LEN; /* leave room for the header-length-indicator */ long size; bit_map* optionsBM = NULL; RESERVE_SPACE_FOR_HEADER(len); - + buf = writePDUType(init->PDUType,buf,len); buf = writeBoolean(init->Result,buf,len); buf = writeProtocolVersion(buf,len); - + optionsBM = makeBitMap((unsigned long)5,init->willSearch,init->willPresent, init->willDelete,init->supportAccessControl, init->supportResourceControl); @@ -545,58 +498,56 @@ long* len; buf = writeString(init->ImplementationName,DT_ImplementationName,buf,len); buf = writeString(init->ImplementationVersion,DT_ImplementationVersion,buf,len); buf = writeAny(init->ReferenceID,DT_ReferenceID,buf,len); - + /* go back and write the header-length-indicator */ RELEASE_HEADER_SPACE(len); - size = buf - buffer - HEADER_LEN; + size = buf - buffer - HEADER_LEN; writeBinaryInteger(size,HEADER_LEN,buffer,len); if (init->UserInformationField != NULL) - buf = writeInitResponseInfo(init,buf,len); - + buf = writeInitResponseInfo(init,buf,len); + return(buf); } /*----------------------------------------------------------------------*/ -char* -readInitResponseAPDU(init,buffer) -InitResponseAPDU** init; -char* buffer; +char* +readInitResponseAPDU(InitResponseAPDU** init, char* buffer) { char* buf = buffer; boolean search,present,delete,accessControl,resourceControl; long prefSize,maxMsgSize; char *auth,*id,*name,*version; - long size; + long size; pdu_type pduType; bit_map* versionBM = NULL; bit_map* optionsBM = NULL; boolean result; any *refID = NULL; void* userInfo = NULL; - + auth = id = name = version = NULL; refID = NULL; - + /* read required part */ - buf = readBinaryInteger(&size,HEADER_LEN,buf); + buf = readBinaryInteger(&size,HEADER_LEN,buf); buf = readPDUType(&pduType,buf); buf = readBoolean(&result,buf); - buf = readBitMap(&versionBM,buf); + buf = readBitMap(&versionBM,buf); buf = readBitMap(&optionsBM,buf); buf = readNum(&prefSize,buf); buf = readNum(&maxMsgSize,buf); - + /* decode optionsBM */ search = bitAtPos(0,optionsBM); present = bitAtPos(1,optionsBM); delete = bitAtPos(2,optionsBM); accessControl = bitAtPos(3,optionsBM); resourceControl = bitAtPos(4,optionsBM); - + /* read optional part */ - while (buf < (buffer + size + HEADER_LEN)) + while (buf < (buffer + size + HEADER_LEN)) { data_tag tag = peekTag(buf); switch (tag) { case DT_IDAuthentication: @@ -638,12 +589,12 @@ char* buffer; freeAny(refID); } RETURN_ON_NULL(buf); - + /* construct the basic init object */ *init = makeInitResponseAPDU(result, search,present,delete,accessControl,resourceControl, prefSize,maxMsgSize,auth,id,name,version,refID,userInfo); - + freeBitMap(versionBM); freeBitMap(optionsBM); s_free(auth); @@ -651,19 +602,16 @@ char* buffer; s_free(name); s_free(version); freeAny(refID); - + return(buf); } /*----------------------------------------------------------------------*/ -InitResponseAPDU* -replyToInitAPDU(init,result,userInfo) -InitAPDU* init; -boolean result; -void* userInfo; +InitResponseAPDU* +replyToInitAPDU(InitAPDU* init, boolean result, void* userInfo) /* respond to an init message in the default way - echoing back - the init info + the init info */ { InitResponseAPDU* initResp; @@ -679,27 +627,18 @@ void* userInfo; /*----------------------------------------------------------------------*/ -SearchAPDU* -makeSearchAPDU(small, - large, - medium, - replace, - name, - databases, - type, - elements, - refID, - queryInfo) -long small; -long large; -long medium; -boolean replace; -char* name; -char** databases; -char* type; -char** elements; -any* refID; -void* queryInfo; +SearchAPDU* +makeSearchAPDU( +long small, +long large, +long medium, +boolean replace, +char* name, +char** databases, +char* type, +char** elements, +any* refID, +void* queryInfo) { char* ptr = NULL; long i; @@ -710,7 +649,7 @@ void* queryInfo; query->MediumSetPresentNumber = medium; query->ReplaceIndicator = replace; query->ResultSetName = s_strdup(name); - query->DatabaseNames = NULL; + query->DatabaseNames = NULL; if (databases != NULL) { for (i = 0, ptr = databases[i]; ptr != NULL; ptr = databases[++i]) { if (query->DatabaseNames == NULL) @@ -723,7 +662,7 @@ void* queryInfo; } } query->QueryType = s_strdup(type); - query->ElementSetNames = NULL; + query->ElementSetNames = NULL; if (elements != NULL) { for (i = 0, ptr = elements[i]; ptr != NULL; ptr = elements[++i]) { if (query->ElementSetNames == NULL) @@ -742,9 +681,8 @@ void* queryInfo; /*----------------------------------------------------------------------*/ -void -freeSearchAPDU(query) -SearchAPDU* query; +void +freeSearchAPDU(SearchAPDU* query) { s_free(query->ResultSetName); s_free(query->QueryType); @@ -762,19 +700,16 @@ SearchAPDU* query; #define ES_DELIMITER_1 "\037" /* separates database name from element name */ #define ES_DELIMITER_2 "\036" /* hex 1E separates groups from one another */ -char* -writeSearchAPDU(query,buffer,len) -SearchAPDU* query; -char* buffer; -long* len; -{ +char* +writeSearchAPDU(SearchAPDU* query, char* buffer, long* len) +{ char* buf = buffer + HEADER_LEN; /* leave room for the header-length-indicator */ long size,i; char* ptr = NULL; char* scratch = NULL; RESERVE_SPACE_FOR_HEADER(len); - + buf = writePDUType(query->PDUType,buf,len); buf = writeBinaryInteger(query->SmallSetUpperBound,(size_t)3,buf,len); buf = writeBinaryInteger(query->LargeSetLowerBound,(size_t)3,buf,len); @@ -812,7 +747,7 @@ long* len; ptr = query->ElementSetNames[++i]; /* the element set name */ scratch = (char*)s_realloc(scratch,newScratchSize); s_strncat(scratch,ES_DELIMITER_1,2,newScratchSize); - s_strncat(scratch,ptr,strlen(ptr) + 1,newScratchSize); + s_strncat(scratch,ptr,strlen(ptr) + 1,newScratchSize); } } else @@ -822,38 +757,37 @@ long* len; s_strncat(scratch,ES_DELIMITER_2,2,newScratchSize); s_strncat(scratch,ptr,strlen(ptr) + 1,newScratchSize); s_strncat(scratch,ES_DELIMITER_1,2,newScratchSize); - s_strncat(scratch,esPtr,strlen(esPtr) + 1,newScratchSize); + s_strncat(scratch,esPtr,strlen(esPtr) + 1,newScratchSize); } } buf = writeString(scratch,DT_ElementSetNames,buf,len); s_free(scratch); - } + } buf = writeAny(query->ReferenceID,DT_ReferenceID,buf,len); - + /* go back and write the header-length-indicator */ RELEASE_HEADER_SPACE(len); - size = buf - buffer - HEADER_LEN; + size = buf - buffer - HEADER_LEN; writeBinaryInteger(size,HEADER_LEN,buffer,len); if (query->Query != NULL) - buf = writeSearchInfo(query,buf,len); - + buf = writeSearchInfo(query,buf,len); + return(buf); } /*----------------------------------------------------------------------*/ -SearchResponseAPDU* -makeSearchResponseAPDU(result,count,recordsReturned,nextPos,resultStatus, - presentStatus,refID,records) -long result; -long count; -long recordsReturned; -long nextPos; -long resultStatus; -long presentStatus; -any* refID; -void* records; +SearchResponseAPDU* +makeSearchResponseAPDU( +long result, +long count, +long recordsReturned, +long nextPos, +long resultStatus, +long presentStatus, +any* refID, +void* records) { SearchResponseAPDU* query = (SearchResponseAPDU*)s_malloc((size_t)sizeof(SearchResponseAPDU)); query->PDUType = searchResponseAPDU; @@ -865,14 +799,13 @@ void* records; query->PresentStatus = presentStatus; query->ReferenceID = duplicateAny(refID); query->DatabaseDiagnosticRecords = records; - return(query); + return(query); } /*----------------------------------------------------------------------*/ -void -freeSearchResponseAPDU(queryResponse) -SearchResponseAPDU* queryResponse; +void +freeSearchResponseAPDU(SearchResponseAPDU* queryResponse) { freeAny(queryResponse->ReferenceID); s_free(queryResponse); @@ -880,17 +813,14 @@ SearchResponseAPDU* queryResponse; /*----------------------------------------------------------------------*/ -char* -writeSearchResponseAPDU(queryResponse,buffer,len) -SearchResponseAPDU* queryResponse; -char* buffer; -long* len; +char* +writeSearchResponseAPDU(SearchResponseAPDU* queryResponse, char* buffer, long* len) { char* buf = buffer + HEADER_LEN; /* leave room for the header-length-indicator */ long size; RESERVE_SPACE_FOR_HEADER(len); - + buf = writePDUType(queryResponse->PDUType,buf,len); buf = writeBinaryInteger(queryResponse->SearchStatus,(size_t)1,buf,len); buf = writeBinaryInteger(queryResponse->ResultCount,(size_t)3,buf,len); @@ -899,24 +829,22 @@ long* len; buf = writeNum(queryResponse->ResultSetStatus,DT_ResultSetStatus,buf,len); buf = writeNum(queryResponse->PresentStatus,DT_PresentStatus,buf,len); buf = writeAny(queryResponse->ReferenceID,DT_ReferenceID,buf,len); - + /* go back and write the header-length-indicator */ RELEASE_HEADER_SPACE(len); - size = buf - buffer - HEADER_LEN; + size = buf - buffer - HEADER_LEN; writeBinaryInteger(size,HEADER_LEN,buffer,len); if (queryResponse->DatabaseDiagnosticRecords != NULL) - buf = writeSearchResponseInfo(queryResponse,buf,len); - + buf = writeSearchResponseInfo(queryResponse,buf,len); + return(buf); } /*----------------------------------------------------------------------*/ -char* -readSearchResponseAPDU(queryResponse,buffer) -SearchResponseAPDU** queryResponse; -char* buffer; +char* +readSearchResponseAPDU(SearchResponseAPDU** queryResponse, char* buffer) { char* buf = buffer; long size; @@ -925,20 +853,20 @@ char* buffer; long resultStatus,presentStatus; any *refID = NULL; void* userInfo = NULL; - + /* read required part */ - buf = readBinaryInteger(&size,HEADER_LEN,buf); + buf = readBinaryInteger(&size,HEADER_LEN,buf); buf = readPDUType(&pduType,buf); buf = readBinaryInteger(&result,(size_t)1,buf); buf = readBinaryInteger(&count,(size_t)3,buf); buf = readBinaryInteger(&recordsReturned,(size_t)3,buf); buf = readBinaryInteger(&nextPos,(size_t)3,buf); - + resultStatus = presentStatus = UNUSED; refID = NULL; /* read optional part */ - while (buf < (buffer + size + HEADER_LEN)) + while (buf < (buffer + size + HEADER_LEN)) { data_tag tag = peekTag(buf); switch (tag) { case DT_ResultSetStatus: @@ -956,18 +884,18 @@ char* buffer; break; } } - + buf = readSearchResponseInfo(&userInfo,buf); if (buf == NULL) freeAny(refID); RETURN_ON_NULL(buf); - + /* construct the search object */ *queryResponse = makeSearchResponseAPDU(result,count,recordsReturned,nextPos, (long)resultStatus,(long)presentStatus,refID,userInfo); freeAny(refID); - + return(buf); } @@ -978,11 +906,11 @@ char* buffer; **----------------------------------------------------------------------*/ /* WIDE AREA INFORMATION SERVER SOFTWARE: No guarantees or restrictions. See the readme file for the full standard - disclaimer. - + disclaimer. + 3.26.90 Harry Morris, morris@think.com 3.30.90 Harry Morris - Changed any->bits to any->bytes - 4.11.90 HWM - fixed include file names, changed + 4.11.90 HWM - fixed include file names, changed - writeCompressedIntegerWithPadding() to writeCompressedIntWithPadding() - generalized conditional includes (see c-dialect.h) @@ -992,43 +920,39 @@ char* buffer; char* readErrorPosition = NULL; /* pos where buf stoped making sense */ /*----------------------------------------------------------------------*/ -/* A note on error handling +/* A note on error handling read - these are low level routines, they do not check the type tags which (sometimes) preceed the data (this is done by the higher - level functions which call these functions). There is no + level functions which call these functions). There is no attempt made to check that the reading does not exceed the read - buffer. Such cases should be very rare and usually will be - caught by the calling functions. (note - it is unlikely that + buffer. Such cases should be very rare and usually will be + caught by the calling functions. (note - it is unlikely that a series of low level reads will go far off the edge without triggering a type error. However, it is possible for a single - bad read in an array function (eg. readAny) to attempt to read a + bad read in an array function (eg. readAny) to attempt to read a large ammount, possibly causing a segmentation violation or out of memory condition. */ /*----------------------------------------------------------------------*/ -diagnosticRecord* -makeDiag(surrogate,code,addInfo) -boolean surrogate; -char* code; -char* addInfo; +diagnosticRecord* +makeDiag(boolean surrogate, char* code, char* addInfo) { - diagnosticRecord* diag = + diagnosticRecord* diag = (diagnosticRecord*)s_malloc((size_t)sizeof(diagnosticRecord)); - + diag->SURROGATE = surrogate; memcpy(diag->DIAG,code,DIAGNOSTIC_CODE_SIZE); - diag->ADDINFO = s_strdup(addInfo); + diag->ADDINFO = s_strdup(addInfo); return(diag); } /*----------------------------------------------------------------------*/ -void -freeDiag(diag) -diagnosticRecord* diag; -{ +void +freeDiag(diagnosticRecord* diag) +{ if (diag != NULL) { if (diag->ADDINFO != NULL) s_free(diag->ADDINFO); @@ -1040,53 +964,50 @@ diagnosticRecord* diag; #define END_OF_RECORD 0x1D -char* -writeDiag(diag,buffer,len) -diagnosticRecord* diag; -char* buffer; -long* len; +char* +writeDiag(diagnosticRecord* diag, char* buffer, long* len) /* diagnostics (as per Appendix D) have a very weird format - this changes in SR-1 */ { char* buf = buffer; long length; - + if (diag == NULL) /* handle unspecified optional args */ return(buf); buf = writeTag(DT_DatabaseDiagnosticRecords,buf,len); CHECK_FOR_SPACE_LEFT(0,len); - - length = 3; + + length = 3; if (diag->ADDINFO != NULL) length += strlen(diag->ADDINFO); - + if (length >= 0xFFFF ) /* make sure the length is reasonable */ { length = 0xFFFF - 1; diag->ADDINFO[0xFFFF - 3 - 1] = '\0'; } - + buf = writeBinaryInteger(length,2,buf,len); CHECK_FOR_SPACE_LEFT(1,len); - buf[0] = diag->DIAG[0]; + buf[0] = diag->DIAG[0]; buf++; - + CHECK_FOR_SPACE_LEFT(1,len); buf[0] = diag->DIAG[1]; buf++; - + if (length > 3) { CHECK_FOR_SPACE_LEFT(3,len); memcpy(buf,diag->ADDINFO,(size_t)length - 3); buf += length - 3; } - + CHECK_FOR_SPACE_LEFT(1,len); buf[0] = diag->SURROGATE; buf++; - + CHECK_FOR_SPACE_LEFT(1,len); buf[0] = END_OF_RECORD; buf++; @@ -1096,25 +1017,23 @@ long* len; /*----------------------------------------------------------------------*/ -char* -readDiag(diag,buffer) -diagnosticRecord** diag; -char* buffer; +char* +readDiag(diagnosticRecord** diag, char* buffer) { char* buf = buffer; - diagnosticRecord* d + diagnosticRecord* d = (diagnosticRecord*)s_malloc((size_t)sizeof(diagnosticRecord)); data_tag tag; long len; - + buf = readTag(&tag,buf); - + buf = readBinaryInteger(&len,2,buf); - + d->DIAG[0] = buf[0]; d->DIAG[1] = buf[1]; d->DIAG[2] = '\0'; - + if (len > 3) { d->ADDINFO = (char*)s_malloc((size_t)(len - 3 + 1)); memcpy(d->ADDINFO,(char*)(buf + 2),(size_t)(len - 3)); @@ -1122,9 +1041,9 @@ char* buffer; } else d->ADDINFO = NULL; - + d->SURROGATE = buf[len - 1]; - + *diag = d; return(buf + len + 1); @@ -1137,48 +1056,43 @@ char* buffer; #define dataBits 7 char* -writeCompressedInteger(num,buf,len) -unsigned long num; -char* buf; -long* len; +writeCompressedInteger(unsigned long num, char* buf, long* len) /* write a binary integer in the format described on p. 40. - this might be sped up + this might be sped up */ { char byte; - long i; + unsigned long i; unsigned long size; - + size = writtenCompressedIntSize(num); CHECK_FOR_SPACE_LEFT(size,len); - - for (i = size - 1; i >= 0; i--) + + for (i = size - 1; i != 0; i--) { byte = num & dataMask; if (i != (size-1)) /* turn on continue bit */ byte = (char)(byte | continueBit); buf[i] = byte; num = num >> dataBits; /* don't and here */ } - + return(buf + size); -} +} /*----------------------------------------------------------------------*/ char* -readCompressedInteger(num,buf) -unsigned long *num; -char* buf; +readCompressedInteger(unsigned long *num, char* buf) /* read a binary integer in the format described on p. 40. - this might be sped up + this might be sped up */ { long i = 0; unsigned char byte; *num = 0; - - do + + do { byte = buf[i++]; *num = *num << dataBits; *num += (byte & dataMask); @@ -1186,29 +1100,29 @@ char* buf; while (byte & continueBit); return(buf + i); -} +} /*----------------------------------------------------------------------*/ #define pad 128 /* high bit is set */ char* -writeCompressedIntWithPadding(num,size,buffer,len) -unsigned long num; -unsigned long size; -char* buffer; -long* len; +writeCompressedIntWithPadding( +unsigned long num, +unsigned long size, +char* buffer, +long* len) /* Like writeCompressedInteger, except writes padding (128) to make - sure that size bytes are used. This can be read correctly by + sure that size bytes are used. This can be read correctly by readCompressedInteger() */ { char* buf = buffer; unsigned long needed,padding; long i; - + CHECK_FOR_SPACE_LEFT(size,len); - + needed = writtenCompressedIntSize(num); padding = size - needed; i = padding - 1; @@ -1216,81 +1130,71 @@ long* len; for (i = padding - 1;i >= 0;i--) { buf[i] = pad; } - + buf = writeCompressedInteger(num,buf + padding,len); - + return(buf); -} +} /*----------------------------------------------------------------------*/ unsigned long -writtenCompressedIntSize(num) -unsigned long num; +writtenCompressedIntSize(unsigned long num) /* return the number of bytes needed to represnet the value num in compressed format. curently limited to 4 bytes */ { - if (num < CompressedInt1Byte) + if (num < CompressedInt1Byte) return(1); - else if (num < CompressedInt2Byte) + else if (num < CompressedInt2Byte) return(2); else if (num < CompressedInt3Byte) return(3); else - return(4); + return(4); } /*----------------------------------------------------------------------*/ char* -writeTag(tag,buf,len) -data_tag tag; -char* buf; -long* len; +writeTag(data_tag tag, char* buf, long* len) /* write out a data tag */ -{ +{ return(writeCompressedInteger(tag,buf,len)); -} +} /*----------------------------------------------------------------------*/ char* -readTag(tag,buf) -data_tag* tag; -char* buf; +readTag(data_tag* tag, char* buf) /* read a data tag */ -{ +{ return(readCompressedInteger(tag,buf)); -} +} /*----------------------------------------------------------------------*/ -unsigned long -writtenTagSize(tag) -data_tag tag; -{ +unsigned long +writtenTagSize(data_tag tag) +{ return(writtenCompressedIntSize(tag)); } /*----------------------------------------------------------------------*/ data_tag -peekTag(buf) -char* buf; +peekTag(char* buf) /* read a data tag without advancing the buffer */ { data_tag tag; readTag(&tag,buf); return(tag); -} +} /*----------------------------------------------------------------------*/ -any* -makeAny(size,data) -unsigned long size; -char* data; +any* +makeAny(unsigned long size, char* data) { any* a = (any*)s_malloc((size_t)sizeof(any)); a->size = size; @@ -1301,10 +1205,9 @@ char* data; /*----------------------------------------------------------------------*/ void -freeAny(a) -any* a; -/* destroy an any and its associated data. Assumes a->bytes was - allocated using the s_malloc family of libraries +freeAny(any* a) +/* destroy an any and its associated data. Assumes a->bytes was + allocated using the s_malloc family of libraries */ { if (a != NULL) @@ -1316,9 +1219,8 @@ any* a; /*----------------------------------------------------------------------*/ -any* -duplicateAny(a) -any* a; +any* +duplicateAny(any* a) { any* copy = NULL; @@ -1338,19 +1240,15 @@ any* a; /*----------------------------------------------------------------------*/ -char* -writeAny(a,tag,buffer,len) -any* a; -data_tag tag; -char* buffer; -long* len; +char* +writeAny(any* a, data_tag tag, char* buffer, long* len) /* write an any + tag and size info */ { char* buf = buffer; if (a == NULL) /* handle unspecified optional args */ return(buf); - + /* write the tags */ buf = writeTag(tag,buf,len); buf = writeCompressedInteger(a->size,buf,len); @@ -1365,9 +1263,7 @@ long* len; /*----------------------------------------------------------------------*/ -char *readAny(anAny,buffer) -any** anAny; -char* buffer; +char *readAny(any** anAny, char* buffer) /* read an any + tag and size info */ { char *buf; @@ -1379,9 +1275,9 @@ char* buffer; a=(any*)s_malloc((size_t)sizeof(any)); buf=buffer; - + buf = readTag(&tag,buf); - + buf = readCompressedInteger(&a->size,buf); /* now simply copy the bytes */ @@ -1394,10 +1290,8 @@ a=(any*)s_malloc((size_t)sizeof(any)); /*----------------------------------------------------------------------*/ -unsigned long -writtenAnySize(tag,a) -data_tag tag; -any* a; +unsigned long +writtenAnySize(data_tag tag, any* a) { unsigned long size; @@ -1413,14 +1307,13 @@ any* a; /*----------------------------------------------------------------------*/ any* -stringToAny(s) -char* s; +stringToAny(char* s) { any* a = NULL; - + if (s == NULL) return(NULL); - + a = (any*)s_malloc((size_t)sizeof(any)); a->size = strlen(s); a->bytes = (char*)s_malloc((size_t)a->size); @@ -1431,14 +1324,13 @@ char* s; /*----------------------------------------------------------------------*/ char* -anyToString(a) -any* a; +anyToString(any* a) { char* s = NULL; - + if (a == NULL) return(NULL); - + s = s_malloc((size_t)(a->size + 1)); memcpy(s,a->bytes,(size_t)a->size); s[a->size] = '\0'; @@ -1447,15 +1339,11 @@ any* a; /*----------------------------------------------------------------------*/ -char* -writeString(s,tag,buffer,len) -char* s; -data_tag tag; -char* buffer; -long* len; -/* Write a C style string. The terminating null is not written. +char* +writeString(char* s, data_tag tag, char* buffer, long* len) +/* Write a C style string. The terminating null is not written. This function is not part of the Z39.50 spec. It is provided - for the convienience of those wishing to pass C strings in + for the convienience of those wishing to pass C strings in the place of an any. */ { @@ -1463,7 +1351,7 @@ long* len; any* data = NULL; if (s == NULL) return(buffer); /* handle unused optional item before making an any */ - data = (any*)s_malloc((size_t)sizeof(any)); + data = (any*)s_malloc((size_t)sizeof(any)); data->size = strlen(s); data->bytes = s; /* save a copy here by not using stringToAny() */ buf = writeAny(data,tag,buf,len); @@ -1473,14 +1361,12 @@ long* len; /*----------------------------------------------------------------------*/ -char* -readString(s ,buffer) -char** s ; -char* buffer; +char* +readString(char** s, char* buffer) /* Read an any and convert it into a C style string. This function is not part of the Z39.50 spec. It is provided - for the convienience of those wishing to pass C strings in - the place of an any. + for the convienience of those wishing to pass C strings in + the place of an any. */ { any* data = NULL; @@ -1492,10 +1378,8 @@ char* buffer; /*----------------------------------------------------------------------*/ -unsigned long -writtenStringSize(tag,s) -data_tag tag; -char* s; +unsigned long +writtenStringSize(data_tag tag, char* s) { unsigned long size; @@ -1510,23 +1394,21 @@ char* s; /*----------------------------------------------------------------------*/ -any* -longToAny(num) -long num; +any* +longToAny(long num) /* a convienience function */ { char s[40]; sprintf(s,"%ld",num); - + return(stringToAny(s)); } /*----------------------------------------------------------------------*/ long -anyToLong(a) -any* a; +anyToLong(any* a) /* a convienience function */ { long num; @@ -1537,7 +1419,7 @@ any* a; s_free(str); return(num); } - + /*----------------------------------------------------------------------*/ #define bitsPerByte 8 @@ -1547,22 +1429,22 @@ makeBitMap(unsigned long numBits, ...) /* construct and return a bitmap with numBits elements */ { va_list ap; - long i,j; + unsigned long i,j; bit_map* bm = NULL; - va_start(ap,numBits); - + LYva_start(ap,numBits); + bm = (bit_map*)s_malloc((size_t)sizeof(bit_map)); - bm->size = (unsigned long)ceil((double)numBits / bitsPerByte); + bm->size = (unsigned long)(ceil((double)numBits / bitsPerByte)); bm->bytes = (char*)s_malloc((size_t)bm->size); - + /* fill up the bits */ for (i = 0; i < bm->size; i++) /* iterate over bytes */ { char byte = 0; for (j = 0; j < bitsPerByte; j++) /* iterate over bits */ { if ((i * bitsPerByte + j) < numBits) { boolean bit = false; - bit = (boolean)va_arg(ap,boolean); + bit = (boolean)va_arg(ap,boolean); if (bit) { byte = byte | (1 << (bitsPerByte - j - 1)); } @@ -1579,8 +1461,7 @@ makeBitMap(unsigned long numBits, ...) /*----------------------------------------------------------------------*/ void -freeBitMap(bm) -bit_map* bm; +freeBitMap(bit_map* bm) /* destroy a bit map created by makeBitMap() */ { s_free(bm->bytes); @@ -1589,20 +1470,18 @@ bit_map* bm; /*----------------------------------------------------------------------*/ -/* use this routine to interpret a bit map. pos specifies the bit - number. bit 0 is the Leftmost bit of the first byte. +/* use this routine to interpret a bit map. pos specifies the bit + number. bit 0 is the Leftmost bit of the first byte. Could do bounds checking. */ boolean -bitAtPos(pos,bm) -long pos; -bit_map* bm; +bitAtPos(unsigned long pos, bit_map* bm) { if (pos > bm->size*bitsPerByte) return false; else - return((bm->bytes[(pos / bitsPerByte)] & + return((bm->bytes[(pos / bitsPerByte)] & (0x80>>(pos % bitsPerByte))) ? true : false); } @@ -1610,40 +1489,27 @@ bit_map* bm; /*----------------------------------------------------------------------*/ char* -writeBitMap(bm,tag,buffer,len) -bit_map* bm; -data_tag tag; -char* buffer; -long* len; +writeBitMap(bit_map* bm, data_tag tag, char* buffer, long* len) /* write a bitmap + type and size info */ -{ +{ return(writeAny((any*)bm,tag,buffer,len)); } /*----------------------------------------------------------------------*/ char* -readBitMap(bm,buffer) -bit_map** bm; -char* buffer; +readBitMap(bit_map** bm, char* buffer) /* read a bitmap + type and size info */ { - char *c; - - - -c=readAny((any**)bm,buffer); - - return(c); + char *c; + c = readAny((any**)bm,buffer); + return(c); } /*----------------------------------------------------------------------*/ -char* -writeByte(byte,buf,len) -unsigned long byte; -char* buf; -long* len; +char* +writeByte(unsigned long byte, char* buf, long* len) { CHECK_FOR_SPACE_LEFT(1,len); buf[0] = byte & 0xFF; /* we really only want the first byte */ @@ -1652,10 +1518,8 @@ long* len; /*----------------------------------------------------------------------*/ -char* -readByte(byte,buf) -unsigned char* byte; -char* buf; +char* +readByte(unsigned char* byte, char* buf) { *byte = buf[0]; return(buf + 1); @@ -1663,21 +1527,16 @@ char* buf; /*----------------------------------------------------------------------*/ -char* -writeBoolean(flag,buf,len) -boolean flag; -char* buf; -long* len; +char* +writeBoolean(boolean flag, char* buf, long* len) { return(writeByte(flag,buf,len)); } /*----------------------------------------------------------------------*/ -char* -readBoolean(flag,buffer) -boolean* flag; -char* buffer; +char* +readBoolean(boolean* flag, char* buffer) { unsigned char byte; char* buf = readByte(&byte,buffer); @@ -1688,32 +1547,26 @@ char* buffer; /*----------------------------------------------------------------------*/ char* -writePDUType(pduType,buf,len) -pdu_type pduType; -char* buf; -long* len; +writePDUType(pdu_type pduType, char* buf, long* len) /* PDUType is a single byte */ { return(writeBinaryInteger((long)pduType,(unsigned long)1,buf,len)); -} +} /*----------------------------------------------------------------------*/ char* -readPDUType(pduType,buf) -pdu_type* pduType; -char* buf; +readPDUType(pdu_type* pduType, char* buf) /* PDUType is a single byte */ { return(readBinaryInteger((long*)pduType,(unsigned long)1,buf)); -} +} /*----------------------------------------------------------------------*/ pdu_type -peekPDUType(buf) -char* buf; -/* read the next pdu without advancing the buffer, Note that this +peekPDUType(char* buf) +/* read the next pdu without advancing the buffer, Note that this function is to be used on a buffer that is known to contain an APDU. The pdu_type is written HEADER_LEN bytes into the buffer */ @@ -1728,11 +1581,7 @@ char* buf; #define BINARY_INTEGER_BYTES sizeof(long) /* the number of bytes used by a "binary integer" */ char* -writeBinaryInteger(num,size,buf,len) -long num; -unsigned long size; -char* buf; -long* len; +writeBinaryInteger(long num, unsigned long size, char* buf, long* len) /* write out first size bytes of num - no type info XXX should this take unsigned longs instead ??? */ { @@ -1756,14 +1605,11 @@ long* len; /*----------------------------------------------------------------------*/ char* -readBinaryInteger(num,size,buf) -long* num; -unsigned long size; -char* buf; +readBinaryInteger(long* num, unsigned long size, char* buf) /* read in first size bytes of num - no type info XXX this should take unsigned longs instead !!! */ { - long i; + unsigned long i; unsigned char byte; if (size < 1 || size > BINARY_INTEGER_BYTES) @@ -1781,11 +1627,10 @@ char* buf; /*----------------------------------------------------------------------*/ -unsigned long -writtenCompressedBinIntSize(num) -long num; +unsigned long +writtenCompressedBinIntSize(long num) /* return the number of bytes needed to represent the value num. - currently limited to max of 4 bytes + currently limited to max of 4 bytes Only compresses for positive nums - negatives get whole 4 bytes */ { @@ -1800,42 +1645,36 @@ long num; else return(4); } - + /*----------------------------------------------------------------------*/ char* -writeNum(num,tag,buffer,len) -long num; -data_tag tag; -char* buffer; -long* len; +writeNum(long num, data_tag tag, char* buffer, long* len) /* write a binary integer + size and tag info */ { char* buf = buffer; long size = writtenCompressedBinIntSize(num); - + if (num == UNUSED) return(buffer); - + buf = writeTag(tag,buf,len); - buf = writeCompressedInteger(size,buf,len); - buf = writeBinaryInteger(num,(unsigned long)size,buf,len); + buf = writeCompressedInteger(size,buf,len); + buf = writeBinaryInteger(num,(unsigned long)size,buf,len); return(buf); } /*----------------------------------------------------------------------*/ char* -readNum(num,buffer) -long* num; -char* buffer; +readNum(long* num, char* buffer) /* read a binary integer + size and tag info */ { char* buf = buffer; data_tag tag; unsigned long size; unsigned long val; - + buf = readTag(&tag,buf); buf = readCompressedInteger(&val,buf); size = (unsigned long)val; @@ -1845,29 +1684,25 @@ char* buffer; /*----------------------------------------------------------------------*/ -unsigned long -writtenNumSize(tag,num) -data_tag tag; -long num; +unsigned long +writtenNumSize(data_tag tag, long num) { long dataSize = writtenCompressedBinIntSize(num); long size; - + size = writtenTagSize(tag); /* space for the tag */ size += writtenCompressedIntSize(dataSize); /* space for the size */ size += dataSize; /* space for the data */ - + return(size); } /*----------------------------------------------------------------------*/ -typedef void (voidfunc)(); +typedef void (voidfunc)(void *); void -doList(list,func) -void** list; -voidfunc *func; +doList(void** list, voidfunc *func) /* call func on each element of the NULL terminated list of pointers */ { register long i; @@ -1880,10 +1715,8 @@ voidfunc *func; /*----------------------------------------------------------------------*/ -char* -writeProtocolVersion(buf,len) -char* buf; -long* len; +char* +writeProtocolVersion(char* buf, long* len) /* write a bitmap describing the protocols available */ { static bit_map* version = NULL; @@ -1891,14 +1724,14 @@ long* len; if (version == NULL) { version = makeBitMap((unsigned long)1,true); /* version 1! */ } - + return(writeBitMap(version,DT_ProtocolVersion,buf,len)); } /*----------------------------------------------------------------------*/ char* -defaultImplementationID() +defaultImplementationID(void) { static char ImplementationID[] = "TMC"; return(ImplementationID); @@ -1907,7 +1740,7 @@ defaultImplementationID() /*----------------------------------------------------------------------*/ char* -defaultImplementationName() +defaultImplementationName(void) { static char ImplementationName[] = "Thinking Machines Corporation Z39.50"; return(ImplementationName); @@ -1916,7 +1749,7 @@ defaultImplementationName() /*----------------------------------------------------------------------*/ char* -defaultImplementationVersion() +defaultImplementationVersion(void) { static char ImplementationVersion[] = "2.0A"; return(ImplementationVersion); @@ -1931,28 +1764,22 @@ defaultImplementationVersion() **----------------------------------------------------------------------*/ /* WIDE AREA INFORMATION SERVER SOFTWARE: No guarantees or restrictions. See the readme file for the full standard - disclaimer. - + disclaimer. + 3.26.90 Harry Morris, morris@think.com 4.11.90 HWM - generalized conditional includes (see c-dialect.h) */ /*----------------------------------------------------------------------*/ query_term* -makeAttributeTerm(use, - relation, - position, - structure, - truncation, - completeness, - term) -char* use; -char* relation; -char* position; -char* structure; -char* truncation; -char* completeness; -any* term; +makeAttributeTerm( +char* use, +char* relation, +char* position, +char* structure, +char* truncation, +char* completeness, +any* term) { query_term* qt = (query_term*)s_malloc((size_t)sizeof(query_term)); @@ -1976,9 +1803,8 @@ any* term; /*----------------------------------------------------------------------*/ query_term* -makeResultSetTerm(resultSet) -any* resultSet; -{ +makeResultSetTerm(any* resultSet) +{ query_term* qt = (query_term*)s_malloc((size_t)sizeof(query_term)); qt->TermType = TT_ResultSetID; @@ -1986,15 +1812,14 @@ any* resultSet; qt->ResultSetID = duplicateAny(resultSet); qt->Term = NULL; - + return(qt); } /*----------------------------------------------------------------------*/ -query_term* -makeOperatorTerm(operatorCode) -char* operatorCode; +query_term* +makeOperatorTerm(char* operatorCode) { query_term* qt = (query_term*)s_malloc((size_t)sizeof(query_term)); @@ -2010,10 +1835,10 @@ char* operatorCode; /*----------------------------------------------------------------------*/ -void -freeTerm(qt) -query_term* qt; +void +freeTerm(void* param) { + query_term* qt = (query_term*)param; switch (qt->TermType) { case TT_Attribute: freeAny(qt->Term); @@ -2037,26 +1862,23 @@ query_term* qt; #define ATTRIBUTE_LIST_SIZE ATTRIBUTE_SIZE * 6 #define AT_DELIMITER " " -char* -writeQueryTerm(qt,buffer,len) -query_term* qt; -char* buffer; -long* len; +char* +writeQueryTerm(query_term* qt, char* buffer, long* len) { char* buf = buffer; char attributes[ATTRIBUTE_LIST_SIZE]; switch (qt->TermType) { case TT_Attribute: - strncpy(attributes,qt->Use,ATTRIBUTE_LIST_SIZE); + strncpy(attributes,qt->Use,ATTRIBUTE_LIST_SIZE); s_strncat(attributes,AT_DELIMITER,sizeof(AT_DELIMITER) + 1,ATTRIBUTE_LIST_SIZE); - s_strncat(attributes,qt->Relation,ATTRIBUTE_SIZE,ATTRIBUTE_LIST_SIZE); + s_strncat(attributes,qt->Relation,ATTRIBUTE_SIZE,ATTRIBUTE_LIST_SIZE); s_strncat(attributes,AT_DELIMITER,sizeof(AT_DELIMITER) + 1,ATTRIBUTE_LIST_SIZE); - s_strncat(attributes,qt->Position,ATTRIBUTE_SIZE,ATTRIBUTE_LIST_SIZE); + s_strncat(attributes,qt->Position,ATTRIBUTE_SIZE,ATTRIBUTE_LIST_SIZE); s_strncat(attributes,AT_DELIMITER,sizeof(AT_DELIMITER) + 1,ATTRIBUTE_LIST_SIZE); - s_strncat(attributes,qt->Structure,ATTRIBUTE_SIZE,ATTRIBUTE_LIST_SIZE); + s_strncat(attributes,qt->Structure,ATTRIBUTE_SIZE,ATTRIBUTE_LIST_SIZE); s_strncat(attributes,AT_DELIMITER,sizeof(AT_DELIMITER) + 1,ATTRIBUTE_LIST_SIZE); - s_strncat(attributes,qt->Truncation,ATTRIBUTE_SIZE,ATTRIBUTE_LIST_SIZE); + s_strncat(attributes,qt->Truncation,ATTRIBUTE_SIZE,ATTRIBUTE_LIST_SIZE); s_strncat(attributes,AT_DELIMITER,sizeof(AT_DELIMITER) + 1,ATTRIBUTE_LIST_SIZE); s_strncat(attributes,qt->Completeness,ATTRIBUTE_SIZE,ATTRIBUTE_LIST_SIZE); buf = writeString(attributes,DT_AttributeList,buf,len); @@ -2079,10 +1901,8 @@ long* len; /*----------------------------------------------------------------------*/ -char* -readQueryTerm(qt,buffer) -query_term** qt; -char* buffer; +char* +readQueryTerm(query_term** qt, char* buffer) { char* buf = buffer; char *attributeList = NULL; @@ -2097,7 +1917,7 @@ char* buffer; any* resultSetID = NULL; data_tag tag; - + tag = peekTag(buffer); switch(tag) @@ -2117,7 +1937,7 @@ char* buffer; break; case DT_ResultSetID: buf = readAny(&resultSetID,buf); - *qt = makeResultSetTerm(resultSetID); + *qt = makeResultSetTerm(resultSetID); freeAny(resultSetID); break; case DT_Operator: @@ -2129,21 +1949,20 @@ char* buffer; REPORT_READ_ERROR(buf); break; } - + return(buf); } /*----------------------------------------------------------------------*/ -static unsigned long getQueryTermSize _AP((query_term* qt)); +static unsigned long getQueryTermSize PARAMS((query_term* qt)); static unsigned long -getQueryTermSize(qt) -query_term* qt; +getQueryTermSize(query_term* qt) /* figure out how many bytes it will take to write this query */ { - unsigned long size; - static char attributes[] = "11 22 33 44 55 66"; /* we just need this to + unsigned long size = 0; + static char attributes[] = "11 22 33 44 55 66"; /* we just need this to calculate its written size */ @@ -2169,13 +1988,12 @@ query_term* qt; /*----------------------------------------------------------------------*/ -/* A query is simply a null terminated list of query terms. For +/* A query is simply a null terminated list of query terms. For transmission, a query is written into an any which is sent as the user information field. */ any* -writeQuery(terms) -query_term** terms; +writeQuery(query_term** terms) { any* info = NULL; char* writePos = NULL; @@ -2208,8 +2026,7 @@ query_term** terms; /*----------------------------------------------------------------------*/ query_term** -readQuery(info) -any *info; +readQuery(any *info) { char* readPos = info->bytes; query_term** terms = NULL; @@ -2227,7 +2044,7 @@ log_write(tmp); { terms = (query_term**)s_malloc((size_t)(sizeof(query_term*)*2)); } else - { terms = + { terms = (query_term**)s_realloc((char*)terms, (size_t)(sizeof(query_term*)*(numTerms+2))); } @@ -2258,14 +2075,13 @@ if(qt==NULL) * up a little window to explain the problem. * On a unix box, it will print out the error and call perror() */ - + /*----------------------------------------------------------------------*/ -static void exitAction _AP((long error)); +static void exitAction PARAMS((long error)); static void -exitAction(error) -long error; +exitAction(long error GCC_UNUSED) { long i; for (i = 0; i < 100000; i++) @@ -2283,11 +2099,11 @@ panic(char *format, ...) va_list ap; /* the variable arguments */ fprintf(stderr,PANIC_HEADER); - va_start(ap, format); /* init ap */ + LYva_start(ap, format); /* init ap */ vfprintf(stderr,format,ap); /* print the contents */ va_end(ap); /* free ap */ fflush(stderr); - + exitAction(0); } @@ -2298,24 +2114,20 @@ panic(char *format, ...) ** Routines originally from cutil.c -- FM ** **----------------------------------------------------------------------*/ -/* Wide AREA INFORMATION SERVER SOFTWARE +/* Wide AREA INFORMATION SERVER SOFTWARE No guarantees or restrictions. See the readme file for the full standard - disclaimer. - + disclaimer. + 3.26.90 Harry Morris, morris@think.com 4.11.90 HWM - generalized conditional includes (see c-dialect.h) */ -#include - - /*----------------------------------------------------------------------*/ void -fs_checkPtr(ptr) -void* ptr; +fs_checkPtr(void* ptr) /* If the ptr is NULL, give an error */ -{ +{ if (ptr == NULL) panic("checkPtr found a NULL pointer"); } @@ -2323,45 +2135,41 @@ void* ptr; /*----------------------------------------------------------------------*/ void* -fs_malloc(size) -size_t size; +fs_malloc(size_t size) /* does safety checks and optional accounting */ -{ +{ register void* ptr = NULL; ptr = (void*)calloc((size_t)size,(size_t)1); s_checkPtr(ptr); - + return(ptr); } /*----------------------------------------------------------------------*/ void* -fs_realloc(ptr,size) -void* ptr; -size_t size; -/* does safety checks and optional accounting +fs_realloc(void* ptr, size_t size) +/* does safety checks and optional accounting note - we don't know how big ptr's memory is, so we can't ensure that any new memory allocated is NULLed! */ -{ +{ register void* nptr = NULL; - + if (ptr == NULL) /* this is really a malloc */ return(s_malloc(size)); - + nptr = (void*)realloc(ptr,size); s_checkPtr(ptr); - + return(nptr); } /*----------------------------------------------------------------------*/ void -fs_free(ptr) -void* ptr; +fs_free(void* ptr) /* does safety checks and optional accounting */ { if (ptr != NULL) /* some non-ansi compilers/os's cant handle freeing null */ @@ -2374,20 +2182,19 @@ void* ptr; /*----------------------------------------------------------------------*/ char* -s_strdup(s) -char* s; +s_strdup(char* s) /* return a copy of s. This is identical to the standard library routine - strdup(), except that it is safe. If s == NULL or malloc fails, + strdup(), except that it is safe. If s == NULL or malloc fails, appropriate action is taken. */ { unsigned long len; char* copy = NULL; - + if (s == NULL) /* saftey check to postpone stupid errors */ return(NULL); - + len = strlen(s); /* length of string - terminator */ copy = (char*)s_malloc((size_t)(sizeof(char)*(len + 1))); strncpy(copy,s,len + 1); @@ -2397,19 +2204,15 @@ char* s; /*----------------------------------------------------------------------*/ char* -fs_strncat(dst,src,maxToAdd,maxTotal) -char* dst; - char* src; - size_t maxToAdd; - size_t maxTotal; +fs_strncat(char* dst, char* src, size_t maxToAdd, size_t maxTotal) -/* like strncat, except the fourth argument limits the maximum total +/* like strncat, except the fourth argument limits the maximum total length of the resulting string */ { size_t dstSize = strlen(dst); size_t srcSize = strlen(src); - + if (dstSize + srcSize < maxTotal) /* use regular old strncat */ return(strncat(dst,src,maxToAdd)); else @@ -2425,16 +2228,14 @@ char* dst; /*----------------------------------------------------------------------*/ -char char_downcase(long_ch) -unsigned long long_ch; +char char_downcase(unsigned long long_ch) { unsigned char ch = long_ch & 0xFF; /* just want one byte */ /* when ansi is the way of the world, this can be tolower */ return (((ch >= 'A') && (ch <= 'Z')) ? (ch + 'a' -'A') : ch); } -char *string_downcase(word) -char *word; +char *string_downcase(char *word) { long i = 0; while(word[i] != '\0'){ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMS_WaisUI.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMS_WaisUI.h index 6f492b878e4..150e108df86 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMS_WaisUI.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTVMS_WaisUI.h @@ -8,13 +8,11 @@ #ifndef HTVMSWAIS_H #define HTVMSWAIS_H -#ifndef __STDLIB_LOADED -#include -#endif /* __STDLIB_LOADED */ +#ifndef HTUTILS_H +#include +#endif -#define _AP(args) () - -void log_write _AP((char *)); +void log_write PARAMS((char *)); /* ** Routines originally from Panic.h -- FM @@ -59,11 +57,11 @@ void panic (char* format,...); /* enhanced memory handling functions - don't call them directly, use the macros below */ -void fs_checkPtr _AP((void* ptr)); -void* fs_malloc _AP((size_t size)); -void* fs_realloc _AP((void* ptr,size_t size)); -void fs_free _AP((void* ptr)); -char* fs_strncat _AP((char* dst,char* src,size_t maxToAdd,size_t maxTotal)); +void fs_checkPtr PARAMS((void* ptr)); +void* fs_malloc PARAMS((size_t size)); +void* fs_realloc PARAMS((void* ptr,size_t size)); +void fs_free PARAMS((void* ptr)); +char* fs_strncat PARAMS((char* dst,char* src,size_t maxToAdd,size_t maxTotal)); /* macros for memory functions. call these in your program. */ #define s_checkPtr(ptr) fs_checkPtr(ptr) @@ -72,13 +70,13 @@ char* fs_strncat _AP((char* dst,char* src,size_t maxToAdd,size_t maxTotal)); #define s_free(ptr) { fs_free((char*)ptr); ptr = NULL; } #define s_strncat(dst,src,maxToAdd,maxTotal) fs_strncat((dst),(src),(maxToAdd),(maxTotal)) -char* s_strdup _AP((char* s)); +char* s_strdup PARAMS((char* s)); #define IS_DELIMITER 1 #define NOT_DELIMITER !IS_DELIMITER -char char_downcase _AP((unsigned long ch)); -char *string_downcase _AP((char* word)); +char char_downcase PARAMS((unsigned long ch)); +char *string_downcase PARAMS((char* word)); /*----------------------------------------------------------------------*/ @@ -283,71 +281,71 @@ extern char* readErrorPosition; /* pos where buf stoped making sense */ /*----------------------------------------------------------------------*/ -diagnosticRecord* makeDiag _AP((boolean surrogate,char* code,char* addInfo)); -void freeDiag _AP((diagnosticRecord* diag)); -char* writeDiag _AP((diagnosticRecord* diag,char* buffer,long* len)); -char* readDiag _AP((diagnosticRecord** diag,char* buffer)); +diagnosticRecord* makeDiag PARAMS((boolean surrogate,char* code,char* addInfo)); +void freeDiag PARAMS((diagnosticRecord* diag)); +char* writeDiag PARAMS((diagnosticRecord* diag,char* buffer,long* len)); +char* readDiag PARAMS((diagnosticRecord** diag,char* buffer)); -char* writeCompressedInteger _AP((unsigned long num,char* buf,long* len)); -char* readCompressedInteger _AP((unsigned long *num,char* buf)); -char* writeCompressedIntWithPadding _AP((unsigned long num,unsigned long size, +char* writeCompressedInteger PARAMS((unsigned long num,char* buf,long* len)); +char* readCompressedInteger PARAMS((unsigned long *num,char* buf)); +char* writeCompressedIntWithPadding PARAMS((unsigned long num,unsigned long size, char* buffer,long* len)); -unsigned long writtenCompressedIntSize _AP((unsigned long num)); +unsigned long writtenCompressedIntSize PARAMS((unsigned long num)); -char* writeTag _AP((data_tag tag,char* buf,long* len)); -char* readTag _AP((data_tag* tag,char* buf)); -data_tag peekTag _AP((char* buf)); -unsigned long writtenTagSize _AP((data_tag tag)); +char* writeTag PARAMS((data_tag tag,char* buf,long* len)); +char* readTag PARAMS((data_tag* tag,char* buf)); +data_tag peekTag PARAMS((char* buf)); +unsigned long writtenTagSize PARAMS((data_tag tag)); -any* makeAny _AP((unsigned long size,char* data)); -void freeAny _AP((any* a)); -any* duplicateAny _AP((any* a)); -char* writeAny _AP((any* a,data_tag tag,char* buffer,long* len)); -char* readAny _AP((any** anAny,char* buffer)); -unsigned long writtenAnySize _AP((data_tag tag,any* a)); +any* makeAny PARAMS((unsigned long size,char* data)); +void freeAny PARAMS((any* a)); +any* duplicateAny PARAMS((any* a)); +char* writeAny PARAMS((any* a,data_tag tag,char* buffer,long* len)); +char* readAny PARAMS((any** anAny,char* buffer)); +unsigned long writtenAnySize PARAMS((data_tag tag,any* a)); -any* stringToAny _AP((char* s)); -char* anyToString _AP((any* a)); -unsigned long writtenStringSize _AP((data_tag tag,char* s)); +any* stringToAny PARAMS((char* s)); +char* anyToString PARAMS((any* a)); +unsigned long writtenStringSize PARAMS((data_tag tag,char* s)); -any* longToAny _AP((long Num)); -long anyToLong _AP((any* a)); +any* longToAny PARAMS((long Num)); +long anyToLong PARAMS((any* a)); -char* writeString _AP((char* s,data_tag tag,char* buffer,long* len)); -char* readString _AP((char** s,char* buffer)); +char* writeString PARAMS((char* s,data_tag tag,char* buffer,long* len)); +char* readString PARAMS((char** s,char* buffer)); bit_map* makeBitMap (unsigned long numBits,...); -void freeBitMap _AP((bit_map* bm)); -boolean bitAtPos _AP((long pos,bit_map* bm)); -char* writeBitMap _AP((bit_map* bm,data_tag tag,char* buffer,long* len)); -char* readBitMap _AP((bit_map** bm,char* buffer)); +void freeBitMap PARAMS((bit_map* bm)); +boolean bitAtPos PARAMS((unsigned long pos,bit_map* bm)); +char* writeBitMap PARAMS((bit_map* bm,data_tag tag,char* buffer,long* len)); +char* readBitMap PARAMS((bit_map** bm,char* buffer)); -char* writeByte _AP((unsigned long byte,char* buf,long* len)); -char* readByte _AP((unsigned char* byte,char* buf)); +char* writeByte PARAMS((unsigned long byte,char* buf,long* len)); +char* readByte PARAMS((unsigned char* byte,char* buf)); -char* writeBoolean _AP((boolean flag,char* buf,long* len)); -char* readBoolean _AP((boolean* flag,char* buf)); +char* writeBoolean PARAMS((boolean flag,char* buf,long* len)); +char* readBoolean PARAMS((boolean* flag,char* buf)); -char* writePDUType _AP((pdu_type pduType,char* buf,long* len)); -char* readPDUType _AP((pdu_type* pduType,char* buf)); -pdu_type peekPDUType _AP((char* buf)); +char* writePDUType PARAMS((pdu_type pduType,char* buf,long* len)); +char* readPDUType PARAMS((pdu_type* pduType,char* buf)); +pdu_type peekPDUType PARAMS((char* buf)); -char* writeBinaryInteger _AP((long num,unsigned long size, +char* writeBinaryInteger PARAMS((long num,unsigned long size, char* buf,long* len)); -char* readBinaryInteger _AP((long* num,unsigned long size,char* buf)); -unsigned long writtenCompressedBinIntSize _AP((long num)); +char* readBinaryInteger PARAMS((long* num,unsigned long size,char* buf)); +unsigned long writtenCompressedBinIntSize PARAMS((long num)); -char* writeNum _AP((long num,data_tag tag,char* buffer,long* len)); -char* readNum _AP((long* num,char* buffer)); -unsigned long writtenNumSize _AP((data_tag tag,long num)); +char* writeNum PARAMS((long num,data_tag tag,char* buffer,long* len)); +char* readNum PARAMS((long* num,char* buffer)); +unsigned long writtenNumSize PARAMS((data_tag tag,long num)); -void doList _AP((void** list,void (*func)())); +void doList PARAMS((void** list,void (*func)(void *))); -char* writeProtocolVersion _AP((char* buf,long* len)); -char* defaultImplementationID _AP((void)); -char* defaultImplementationName _AP((void)); -char* defaultImplementationVersion _AP((void)); +char* writeProtocolVersion PARAMS((char* buf,long* len)); +char* defaultImplementationID PARAMS((void)); +char* defaultImplementationName PARAMS((void)); +char* defaultImplementationVersion PARAMS((void)); /*----------------------------------------------------------------------*/ @@ -462,16 +460,16 @@ typedef struct query_term { /*----------------------------------------------------------------------*/ /* functions */ -query_term* makeAttributeTerm _AP(( +query_term* makeAttributeTerm PARAMS(( char* use,char* relation,char* position,char* structure, char* truncation,char* completeness,any* term)); -query_term* makeResultSetTerm _AP((any* resultSet)); -query_term* makeOperatorTerm _AP((char* operatorCode)); -void freeTerm _AP((query_term* qt)); -char* writeQueryTerm _AP((query_term* qt,char* buffer,long* len)); -char* readQueryTerm _AP((query_term** qt,char* buffer)); -any* writeQuery _AP((query_term** terms)); -query_term** readQuery _AP((any* info)); +query_term* makeResultSetTerm PARAMS((any* resultSet)); +query_term* makeOperatorTerm PARAMS((char* operatorCode)); +void freeTerm PARAMS((void* qt)); +char* writeQueryTerm PARAMS((query_term* qt,char* buffer,long* len)); +char* readQueryTerm PARAMS((query_term** qt,char* buffer)); +any* writeQuery PARAMS((query_term** terms)); +query_term** readQuery PARAMS((any* info)); /*----------------------------------------------------------------------*/ @@ -482,16 +480,7 @@ query_term** readQuery _AP((any* info)); **----------------------------------------------------------------------*/ char * -generate_search_apdu _AP((char* buff, /* buffer to hold the apdu */ - long *buff_len, /* number of bytes written to the buffer */ - char *seed_words, /* string of the seed words */ - char *database_name, - DocObj** docobjs, - long maxDocsRetrieved - )); - -char * -generate_retrieval_apdu _AP((char *buff, +generate_retrieval_apdu PARAMS((char *buff, long *buff_len, any *docID, long chunk_type, @@ -501,19 +490,14 @@ generate_retrieval_apdu _AP((char *buff, long -interpret_message _AP((char *request_message, +interpret_message PARAMS((char *request_message, long request_length, char *response_message, long response_buffer_length, /* length of the buffer (modified)*/ - FILE *connection, + long connection, boolean verbose)); - -void -display_text_record_completely _AP((WAISDocumentText *record, - boolean quote_string_quotes)); - -char *trim_junk _AP((char *headline)); +char *trim_junk PARAMS((char *headline)); @@ -601,74 +585,74 @@ typedef struct PresentResponseAPDU { /*----------------------------------------------------------------------*/ /* Functions */ -InitAPDU* makeInitAPDU _AP((boolean search,boolean present,boolean deleteIt, +InitAPDU* makeInitAPDU PARAMS((boolean search,boolean present,boolean deleteIt, boolean accessControl,boolean resourceControl, long prefMsgSize,long maxMsgSize, char* auth,char* id,char* name, char* version, any* refID,void* userInfo)); -void freeInitAPDU _AP((InitAPDU* init)); -char* writeInitAPDU _AP((InitAPDU* init,char* buffer,long* len)); -char* readInitAPDU _AP((InitAPDU** init,char* buffer)); +void freeInitAPDU PARAMS((InitAPDU* init)); +char* writeInitAPDU PARAMS((InitAPDU* init,char* buffer,long* len)); +char* readInitAPDU PARAMS((InitAPDU** init,char* buffer)); -InitResponseAPDU* makeInitResponseAPDU _AP((boolean result, +InitResponseAPDU* makeInitResponseAPDU PARAMS((boolean result, boolean search,boolean present,boolean deleteIt, boolean accessControl,boolean resourceControl, long prefMsgSize,long maxMsgSize, char* auth,char* id,char* name, char* version, any* refID,void* userInfo)); -void freeInitResponseAPDU _AP((InitResponseAPDU* init)); -char* writeInitResponseAPDU _AP((InitResponseAPDU* init,char* buffer,long* len)); -char* readInitResponseAPDU _AP((InitResponseAPDU** init,char* buffer)); -InitResponseAPDU* replyToInitAPDU _AP((InitAPDU* init,boolean result,void* userInfo)); +void freeInitResponseAPDU PARAMS((InitResponseAPDU* init)); +char* writeInitResponseAPDU PARAMS((InitResponseAPDU* init,char* buffer,long* len)); +char* readInitResponseAPDU PARAMS((InitResponseAPDU** init,char* buffer)); +InitResponseAPDU* replyToInitAPDU PARAMS((InitAPDU* init,boolean result,void* userInfo)); -SearchAPDU* makeSearchAPDU _AP((long small,long large, long medium, +SearchAPDU* makeSearchAPDU PARAMS((long small,long large, long medium, boolean replace,char* name,char** databases, char* type,char** elements,any* refID,void* queryInfo)); -void freeSearchAPDU _AP((SearchAPDU* query)); -char* writeSearchAPDU _AP((SearchAPDU* query,char* buffer,long* len)); -char* readSearchAPDU _AP((SearchAPDU** query,char* buffer)); +void freeSearchAPDU PARAMS((SearchAPDU* query)); +char* writeSearchAPDU PARAMS((SearchAPDU* query,char* buffer,long* len)); +char* readSearchAPDU PARAMS((SearchAPDU** query,char* buffer)); -SearchResponseAPDU* makeSearchResponseAPDU _AP((long result,long count, +SearchResponseAPDU* makeSearchResponseAPDU PARAMS((long result,long count, long recordsReturned,long nextPos, long resultStatus,long presentStatus, any* refID,void* records)); -void freeSearchResponseAPDU _AP((SearchResponseAPDU* queryResponse)); -char* writeSearchResponseAPDU _AP((SearchResponseAPDU* queryResponse,char* buffer,long* len)); -char* readSearchResponseAPDU _AP((SearchResponseAPDU** queryResponse,char* buffer)); +void freeSearchResponseAPDU PARAMS((SearchResponseAPDU* queryResponse)); +char* writeSearchResponseAPDU PARAMS((SearchResponseAPDU* queryResponse,char* buffer,long* len)); +char* readSearchResponseAPDU PARAMS((SearchResponseAPDU** queryResponse,char* buffer)); -PresentAPDU* makePresentAPDU _AP((long recsReq, long startPos, +PresentAPDU* makePresentAPDU PARAMS((long recsReq, long startPos, char* resultID,any* refID,void* info)); -void freePresentAPDU _AP((PresentAPDU* present)); -char* writePresentAPDU _AP((PresentAPDU* present,char* buffer,long* len)); -char* readPresentAPDU _AP((PresentAPDU** present,char* buffer)); +void freePresentAPDU PARAMS((PresentAPDU* present)); +char* writePresentAPDU PARAMS((PresentAPDU* present,char* buffer,long* len)); +char* readPresentAPDU PARAMS((PresentAPDU** present,char* buffer)); -PresentResponseAPDU* makePresentResponseAPDU _AP((boolean status,long recsRet, +PresentResponseAPDU* makePresentResponseAPDU PARAMS((boolean status,long recsRet, long nextPos,any* refID, void* records)); -void freePresentResponseAPDU _AP((PresentResponseAPDU* present)); -char* writePresentResponseAPDU _AP((PresentResponseAPDU* present,char* buffer,long* len)); -char* readPresentResponseAPDU _AP((PresentResponseAPDU** present,char* buffer)); +void freePresentResponseAPDU PARAMS((PresentResponseAPDU* present)); +char* writePresentResponseAPDU PARAMS((PresentResponseAPDU* present,char* buffer,long* len)); +char* readPresentResponseAPDU PARAMS((PresentResponseAPDU** present,char* buffer)); /*----------------------------------------------------------------------*/ /* user extension hooks: */ -extern char* writeInitInfo _AP((InitAPDU* init,char* buffer,long* len)); -extern char* readInitInfo _AP((void** info,char* buffer)); +extern char* writeInitInfo PARAMS((InitAPDU* init,char* buffer,long* len)); +extern char* readInitInfo PARAMS((void** info,char* buffer)); -extern char* writeInitResponseInfo _AP((InitResponseAPDU* init,char* buffer,long* len)); -extern char* readInitResponseInfo _AP((void** info,char* buffer)); +extern char* writeInitResponseInfo PARAMS((InitResponseAPDU* init,char* buffer,long* len)); +extern char* readInitResponseInfo PARAMS((void** info,char* buffer)); -extern char* writeSearchInfo _AP((SearchAPDU* query,char* buffer,long* len)); -extern char* readSearchInfo _AP((void** info,char* buffer)); +extern char* writeSearchInfo PARAMS((SearchAPDU* query,char* buffer,long* len)); +extern char* readSearchInfo PARAMS((void** info,char* buffer)); -extern char* writeSearchResponseInfo _AP((SearchResponseAPDU* query,char* buffer,long* len)); -extern char* readSearchResponseInfo _AP((void** info,char* buffer)); +extern char* writeSearchResponseInfo PARAMS((SearchResponseAPDU* query,char* buffer,long* len)); +extern char* readSearchResponseInfo PARAMS((void** info,char* buffer)); -extern char* writePresentInfo _AP((PresentAPDU* present,char* buffer,long* len)); -extern char* readPresentInfo _AP((void** info,char* buffer)); +extern char* writePresentInfo PARAMS((PresentAPDU* present,char* buffer,long* len)); +extern char* readPresentInfo PARAMS((void** info,char* buffer)); -extern char* writePresentResponseInfo _AP((PresentResponseAPDU* present,char* buffer,long* len)); -extern char* readPresentResponseInfo _AP((void** info,char* buffer)); +extern char* writePresentResponseInfo PARAMS((PresentResponseAPDU* present,char* buffer,long* len)); +extern char* readPresentResponseInfo PARAMS((void** info,char* buffer)); #endif /* HTVMSWAIS_H */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWAIS.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWAIS.c index b4a668ce775..6eea24ee3c4 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWAIS.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWAIS.c @@ -48,22 +48,21 @@ Brewster@think.com */ -#include "HTUtils.h" -#include "tcp.h" -#include "HTParse.h" -#include "HTAccess.h" /* We implement a protocol */ -#include "HTML.h" /* The object we will generate */ -#include "HTWSRC.h" -#include "HTTCP.h" -#include "HTCJK.h" -#include "HTAlert.h" +#include +#include +#include /* We implement a protocol */ +#include /* The object we will generate */ +#include +#include +#include +#include /* From WAIS ** --------- */ #ifdef VMS -#include "HTVMS_WaisUI.h" -#include "HTVMS_WaisProt.h" +#include +#include #else #include #endif /* VMS */ @@ -76,11 +75,7 @@ /* FROM WWW ** -------- */ -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} - -extern int HTCheckForInterrupt NOPARAMS; +#include #define DIRECTORY "/cnidr.org:210/directory-of-servers" /* #define DIRECTORY "/quake.think.com:210/directory-of-servers" */ @@ -166,16 +161,16 @@ PRIVATE int mosaic_connect_to_server ARGS3( rv = fd_mosaic_connect_to_server (host_name, port, &fd); if (rv == 0) { - HTAlert ("Could not connect to WAIS server."); + HTAlert (gettext("Could not connect to WAIS server.")); return 0; } else if (rv == -1) { - HTAlert ("Connection interrupted."); + HTAlert (CONNECTION_INTERRUPTED); return -1; } #ifndef VMS if ((file = fdopen(fd,"r+")) == NULL) { - HTAlert ("Could not open WAIS connection for reading."); + HTAlert (gettext("Could not open WAIS connection for reading.")); return 0; } @@ -199,11 +194,11 @@ PRIVATE void showDiags ARGS2( for (i = 0; d[i] != NULL; i++) { if (d[i]->ADDINFO != NULL) { - PUTS("Diagnostic code is "); + PUTS(gettext("Diagnostic code is ")); PUTS(d[i]->DIAG); PUTC(' '); PUTS(d[i]->ADDINFO); - PUTC('\n'); ; + PUTC('\n'); } } } @@ -272,22 +267,20 @@ PRIVATE char * WWW_from_WAIS ARGS1( int i, l; if (TRACE) { char *p; - fprintf(stderr, "WAIS id (%d bytes) is ", (int)docid->size); + fprintf(tfp, "WAIS id (%d bytes) is ", (int)docid->size); for (p = docid->bytes; p < docid->bytes+docid->size; p++) { if ((*p >= ' ') && (*p<= '~')) /* Assume ASCII! */ - fprintf(stderr, "%c", *p); + fprintf(tfp, "%c", *p); else - fprintf(stderr, "<%x>", (unsigned)*p); + fprintf(tfp, "<%x>", (unsigned)*p); } - fprintf(stderr, "\n"); + fprintf(tfp, "\n"); } for (p = docid->bytes; (p < docid->bytes+docid->size) && (q < &buf[BIG]);) { - if (TRACE) - fprintf(stderr, " Record type %d, length %d\n", p[0], p[1]); + CTRACE(tfp, " Record type %d, length %d\n", p[0], p[1]); if (*p > 10) { - if (TRACE) - fprintf(stderr, "Eh? DOCID record type of %d!\n", *p); + CTRACE(tfp, "Eh? DOCID record type of %d!\n", *p); return 0; } { /* Bug fix -- allow any byte value 15 Apr 93 */ @@ -316,8 +309,7 @@ PRIVATE char * WWW_from_WAIS ARGS1( *q++= ';'; /* Terminate field */ } *q++ = 0; /* Terminate string */ - if (TRACE) - fprintf(stderr, "WWW form of id: %s\n", buf); + CTRACE(tfp, "WWW form of id: %s\n", buf); { char * result = (char *)malloc(strlen(buf)+1); if (!result) @@ -347,8 +339,8 @@ PRIVATE any * WAIS_from_WWW ARGS2( char *q; /* Poisition of "=" */ char *s; /* Position of semicolon */ int n; /* size */ - if (TRACE) - fprintf(stderr, "WWW id (to become WAIS id): %s\n", docname); + + CTRACE(tfp, "WWW id (to become WAIS id): %s\n", docname); for (n = 0, p = docname; *p; p++) { /* Count sizes of strings */ n++; if (*p == ';') @@ -404,14 +396,14 @@ PRIVATE any * WAIS_from_WWW ARGS2( if (TRACE) { char *p; - fprintf(stderr, "WAIS id (%d bytes) is ", (int)docid->size); + fprintf(tfp, "WAIS id (%d bytes) is ", (int)docid->size); for (p = docid->bytes; p < docid->bytes+docid->size; p++) { if ((*p >= ' ') && (*p<= '~')) /* Assume ASCII! */ - fprintf(stderr, "%c", *p); + fprintf(tfp, "%c", *p); else - fprintf(stderr, "<%x>", (unsigned)*p); + fprintf(tfp, "<%x>", (unsigned)*p); } - fprintf(stderr, "\n"); + fprintf(tfp, "\n"); } return docid; /* Ok */ @@ -441,7 +433,7 @@ PRIVATE void output_text_record ARGS4( for (count = 0; count < record->DocumentText->size; count++){ long ch = (unsigned char)record->DocumentText->bytes[count]; - if (ch == 27) { /* What is this in for? Tim */ + if (ch == 27) { /* What is this in for? Tim */ /* then we have an escape code */ /* if the next letter is '(' or ')', then ignore two letters */ if ('(' == record->DocumentText->bytes[count + 1] || @@ -473,13 +465,12 @@ PRIVATE void display_search_response ARGS4( BOOL archie = strstr(database, "archie")!=0; /* Specical handling */ - if (TRACE) - fprintf(stderr, "HTWAIS: Displaying search response\n"); - PUTS("Index "); + CTRACE(tfp, "HTWAIS: Displaying search response\n"); + PUTS(gettext("Index ")); START(HTML_EM); PUTS(database); END(HTML_EM); - sprintf(line, " contains the following %d item%s relevant to \"", + sprintf(line, gettext(" contains the following %d item%s relevant to \""), (int)(response->NumberOfRecordsReturned), response->NumberOfRecordsReturned ==1 ? "" : "s"); PUTS(line); @@ -487,11 +478,11 @@ PRIVATE void display_search_response ARGS4( PUTS(keywords); END(HTML_EM); PUTS("\".\n"); - PUTS("The first figure after each entry is its relative score, "); - PUTS("the second is the number of lines in the item."); + PUTS(gettext("The first figure after each entry is its relative score, ")); + PUTS(gettext("the second is the number of lines in the item.")); START(HTML_BR); START(HTML_BR); - PUTS("\n"); + PUTC('\n'); START(HTML_OL); if (response->DatabaseDiagnosticRecords != 0) { @@ -512,9 +503,7 @@ PRIVATE void display_search_response ARGS4( /* ** Make a printable string out of the document id. */ - if (TRACE) - fprintf(stderr, - "HTWAIS: %2ld: Score: %4ld, lines:%4ld '%s'\n", + CTRACE(tfp, "HTWAIS: %2ld: Score: %4ld, lines:%4ld '%s'\n", i, (long int)(info->DocHeaders[k]->Score), (long int)(info->DocHeaders[k]->Lines), @@ -531,7 +520,7 @@ PRIVATE void display_search_response ARGS4( FREE(www_name); } else { PUTS(headline); - PUTS(" (bad file name)"); + PUTS(gettext(" (bad file name)")); } } else { /* Not archie */ docname = WWW_from_WAIS(docid); @@ -553,7 +542,7 @@ PRIVATE void display_search_response ARGS4( FREE(dbname); FREE(docname); } else { - PUTS("(bad doc id)"); + PUTS(gettext("(bad doc id)")); } } @@ -569,21 +558,21 @@ PRIVATE void display_search_response ARGS4( k = 0; while (info->ShortHeaders[k] != 0) { i++; - PUTS( "(Short Header record, can't display)"); + PUTS( gettext("(Short Header record, can't display)")); } } if (info->LongHeaders != 0) { k = 0; while (info->LongHeaders[k] != 0) { i++; - PUTS( "\nLong Header record, can't display\n"); + PUTS( gettext("\nLong Header record, can't display\n")); } } if (info->Text != 0) { k = 0; while (info->Text[k] != 0) { i++; - PUTS( "\nText record\n"); + PUTS( gettext("\nText record\n")); output_text_record((HTStream*)target, info->Text[k++], false, false); } @@ -592,7 +581,7 @@ PRIVATE void display_search_response ARGS4( k = 0; while (info->Headlines[k] != 0) { i++; - PUTS( "\nHeadline record, can't display\n"); + PUTS( gettext("\nHeadline record, can't display\n")); /* dsply_headline_record( info->Headlines[k++]); */ } } @@ -600,13 +589,13 @@ PRIVATE void display_search_response ARGS4( k = 0; while (info->Codes[k] != 0) { i++; - PUTS( "\nCode record, can't display\n"); + PUTS( gettext("\nCode record, can't display\n")); /* dsply_code_record( info->Codes[k++]); */ } } } /* Loop: display user info */ END(HTML_OL); - PUTC('\n'); ; + PUTC('\n'); } /* Load by name HTLoadWAIS @@ -704,10 +693,9 @@ PUBLIC int HTLoadWAIS ARGS4( } if (!ok) - return HTLoadError(sink, 500, "Syntax error in WAIS URL"); + return HTLoadError(sink, 500, gettext("Syntax error in WAIS URL")); - if (TRACE) - fprintf(stderr, "HTWAIS: Parsed OK\n"); + CTRACE(tfp, "HTWAIS: Parsed OK\n"); service = strchr(names, ':'); if (service) @@ -724,19 +712,16 @@ PUBLIC int HTLoadWAIS ARGS4( } else if (!(key && !*key)) { int status; - if (TRACE) - fprintf (stderr, "===WAIS=== calling mosaic_connect_to_server\n"); + CTRACE (tfp, "===WAIS=== calling mosaic_connect_to_server\n"); status = mosaic_connect_to_server(server_name, atoi(service), &connection); if (status == 0) { - if (TRACE) - fprintf (stderr, "===WAIS=== connection failed\n"); + CTRACE (tfp, "===WAIS=== connection failed\n"); FREE(names); return HT_NOT_LOADED; } else if (status == -1) { - if (TRACE) - fprintf (stderr, "===WAIS=== connection interrupted\n"); + CTRACE (tfp, "===WAIS=== connection interrupted\n"); FREE(names); return HT_NOT_LOADED; } @@ -762,7 +747,7 @@ PUBLIC int HTLoadWAIS ARGS4( /* ** If keyword search is performed but there are no keywords, - ** the user has followed a link to the index itself. It would be + ** the user has followed a link to the index itself. It would be ** appropriate at this point to send him the .SRC file - how? */ if (key && !*key) { /* I N D E X */ @@ -773,31 +758,31 @@ PUBLIC int HTLoadWAIS ARGS4( HTStructured * target = HTML_new(anAnchor, format_out, sink); START(HTML_HEAD); - PUTS("\n"); - HTStartIsIndex(target, "Enter WAIS query: ", NULL); - PUTS("\n"); + PUTC('\n'); + HTStartIsIndex(target, HTWAIS_SOLICIT_QUERY , NULL); + PUTC('\n'); { START(HTML_TITLE); PUTS(wais_database); - PUTS(" (WAIS Index)"); + PUTS(gettext(" (WAIS Index)")); END(HTML_TITLE); - PUTS("\n"); + PUTC('\n'); END(HTML_HEAD); - PUTS("\n"); + PUTC('\n'); START(HTML_H1); - PUTS("WAIS Index: "); + PUTS(gettext("WAIS Index: ")); START(HTML_EM); PUTS(wais_database); END(HTML_EM); END(HTML_H1); - PUTS("\n"); - PUTS("This is a link for searching the "); + PUTC('\n'); + PUTS(gettext("This is a link for searching the ")); START(HTML_EM); PUTS(wais_database); END(HTML_EM); - PUTS(" WAIS Index.\n"); + PUTS(gettext(" WAIS Index.\n")); } /* @@ -809,21 +794,21 @@ PUBLIC int HTLoadWAIS ARGS4( server_name, service, www_database); fp = fopen(filename, "r"); /* Have we found this already? */ - if (TRACE) fprintf(stderr, - "HTWAIS: Description of server %s %s.\n", - filename, - fp ? "exists already" : "does NOT exist!"); + CTRACE(tfp, "HTWAIS: Description of server %s %s.\n", + filename, + fp ? "exists already" : "does NOT exist!"); if (fp) { char c; START(HTML_PRE); /* Preformatted description */ - PUTS("\n"); + PUTC('\n'); while((c=getc(fp))!=EOF) PUTC(c); /* Transfer file */ END(HTML_PRE); fclose(fp); + } #endif START(HTML_P); - PUTS("\nEnter the 's'earch command and then specify search words.\n"); + PUTS(gettext("\nEnter the 's'earch command and then specify search words.\n")); FREE_TARGET; } else if (key) { /* S E A R C H */ @@ -839,40 +824,40 @@ PUBLIC int HTLoadWAIS ARGS4( target = HTML_new(anAnchor, format_out, sink); START(HTML_HEAD); - PUTS("\n"); - HTStartIsIndex(target, "Enter WAIS query: ", NULL); - PUTS("\n"); + PUTC('\n'); + HTStartIsIndex(target, HTWAIS_SOLICIT_QUERY, NULL); + PUTC('\n'); START(HTML_TITLE); PUTS(keywords); - PUTS(" (in "); + PUTS(gettext(" (in ")); PUTS(wais_database); - PUTS(")"); + PUTC(')'); END(HTML_TITLE); - PUTS("\n"); + PUTC('\n'); END(HTML_HEAD); - PUTS("\n"); + PUTC('\n'); START(HTML_H1); - PUTS("WAIS Search of \""); + PUTS(gettext("WAIS Search of \"")); START(HTML_EM); PUTS(keywords); END(HTML_EM); - PUTS("\" in: "); + PUTS(gettext("\" in: ")); START(HTML_EM); PUTS(wais_database); END(HTML_EM); END(HTML_H1); - PUTS("\n"); + PUTC('\n'); request_buffer_length = MAX_MESSAGE_LEN; /* Amount left */ - if (TRACE) fprintf(stderr, "HTWAIS: Search for `%s' in `%s'\n", - keywords, wais_database); + CTRACE(tfp, "HTWAIS: Search for `%s' in `%s'\n", + keywords, wais_database); if(NULL == generate_search_apdu(request_message + HEADER_LENGTH, &request_buffer_length, keywords, wais_database, NULL, MAXDOCS)) { #ifdef VMS - HTAlert ("HTWAIS: Request too large."); + HTAlert (gettext("HTWAIS: Request too large.")); return_status = HT_NOT_LOADED; FREE_TARGET; goto CleanUp; @@ -881,7 +866,7 @@ PUBLIC int HTLoadWAIS ARGS4( #endif /* VMS */ } - HTProgress("Searching WAIS database..."); + HTProgress(gettext("Searching WAIS database...")); rv = interpret_message (request_message, MAX_MESSAGE_LEN - request_buffer_length, response_message, @@ -891,13 +876,13 @@ PUBLIC int HTLoadWAIS ARGS4( ); if (rv == HT_INTERRUPTED) { - HTAlert ("Search interrupted."); + HTAlert (gettext("Search interrupted.")); return_status = HT_INTERRUPTED; FREE_TARGET; goto CleanUp; } else if (!rv) { #ifdef VMS - HTAlert ("HTWAIS: Return message too large."); + HTAlert (HTWAIS_MESSAGE_TOO_BIG); return_status = HT_NOT_LOADED; FREE_TARGET; goto CleanUp; @@ -924,9 +909,8 @@ PUBLIC int HTLoadWAIS ARGS4( any doc_chunk; any * docid = &doc_chunk; - if (TRACE) fprintf(stderr, - "HTWAIS: Retrieve document id `%s' type `%s' length %ld\n", - docname, doctype, document_length); + CTRACE(tfp, "HTWAIS: Retrieve document id `%s' type `%s' length %ld\n", + docname, doctype, document_length); format_in = !strcmp(doctype, "WSRC") ? HTAtom_for("application/x-wais-source") : @@ -942,7 +926,7 @@ PUBLIC int HTLoadWAIS ARGS4( target = HTStreamStack(format_in, format_out, sink, anAnchor); if (!target) return HTLoadError(sink, 500, - "Can't convert format of WAIS document"); + gettext("Can't convert format of WAIS document")); /* ** Decode hex or litteral format for document ID. */ @@ -962,11 +946,10 @@ PUBLIC int HTLoadWAIS ARGS4( char *type = s_strdup(doctype); /* Gets freed I guess */ #endif /* VMS */ request_buffer_length = MAX_MESSAGE_LEN; /* Amount left */ - if (TRACE) - fprintf(stderr, "HTWAIS: Slice number %ld\n", count); + CTRACE(tfp, "HTWAIS: Slice number %ld\n", count); if (HTCheckForInterrupt()) { - HTAlert ("Data transfer interrupted."); + HTAlert (TRANSFER_INTERRUPTED); (*target->isa->_abort)(target, NULL); #ifdef VMS FREE(type); @@ -987,7 +970,7 @@ PUBLIC int HTLoadWAIS ARGS4( type, wais_database)) { #ifdef VMS - HTAlert ("HTWAIS: Request too long."); + HTAlert (gettext("HTWAIS: Request too long.")); return_status = HT_NOT_LOADED; FREE_TARGET; FREE(type); @@ -1001,7 +984,7 @@ PUBLIC int HTLoadWAIS ARGS4( /* ** Actually do the transaction given by request_message. */ - HTProgress("Fetching WAIS document..."); + HTProgress(gettext("Fetching WAIS document...")); rv = interpret_message(request_message, MAX_MESSAGE_LEN - request_buffer_length, response_message, @@ -1010,7 +993,7 @@ PUBLIC int HTLoadWAIS ARGS4( false /* true verbose */ ); if (rv == HT_INTERRUPTED) { - HTAlert ("Data transfer interrupted."); + HTAlert (TRANSFER_INTERRUPTED); return_status = HT_INTERRUPTED; FREE_TARGET; FREE(type); @@ -1018,7 +1001,7 @@ PUBLIC int HTLoadWAIS ARGS4( goto CleanUp; } else if (!rv) { #ifdef VMS - HTAlert ("HTWAIS: Return message too large."); + HTAlert (HTWAIS_MESSAGE_TOO_BIG); return_status = HT_NOT_LOADED; FREE_TARGET; FREE(type); @@ -1040,7 +1023,7 @@ PUBLIC int HTLoadWAIS ARGS4( retrieval_response->DatabaseDiagnosticRecords)->Text) { /* display_search_response(target, retrieval_response, wais_database, keywords); */ - PUTS("No text was returned!\n"); + PUTS(gettext("No text was returned!\n")); /* panic("No text was returned"); */ } else { output_text_record(target, diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWAIS.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWAIS.h index 4aa885dcbed..613acedfabf 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWAIS.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWAIS.h @@ -1,34 +1,31 @@ /* WAIS protocol module for the W3 library WAIS PROTOCOL INTERFACE - + This module does not actually perform the WAIS protocol directly, but it does using one - or more libraries of the freeWAIS distribution. The ui.a library came with the old free + or more libraries of the freeWAIS distribution. The ui.a library came with the old free WAIS from TMC, the client.a and wais.a libraries are needed from the freeWAIS from CNIDR. - + If you include this module in the library, you must also - - Register the HTWAIS protocol at initialisation (e.g. HTInit or HTSInit) by compiling + + Register the HTWAIS protocol at initialisation (e.g., HTInit or HTSInit) by compiling it with -DDIRECT_WAIS - + Link with the WAIS libraries - + The wais source files are parsed by a separate and independent module, HTWSRC . You can include HTWSRC without including direct wais using this module, and your WWW code will be able to read source files, and access WAIS indexes through a gateway. - + A WAIS-WWW gateway is just a normal W3 server with a libwww compiled with this module. - + Anyways, this interface won't change much: - + */ #ifndef HTWAIS_H #define HTWAIS_H -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ -#include "HTAccess.h" +#include #ifdef GLOBALREF_IS_MACRO extern GLOBALREF(HTProtocol, HTWAIS); @@ -40,5 +37,5 @@ GLOBALREF HTProtocol HTWAIS; /* Tim BL - + */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWSRC.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWSRC.c index e7f15dad511..3388b100cf2 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWSRC.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWSRC.c @@ -8,18 +8,15 @@ ** 3 June 93 Bug fix: Won't crash if no description */ -#include "HTUtils.h" -#include "tcp.h" +#include -#include "HTWSRC.h" +#include -#include "HTML.h" -#include "HTParse.h" +#include +#include -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} +#include #define BIG 10000 /* Arbitrary limit to value length */ #define PARAM_MAX BIG @@ -162,9 +159,8 @@ PRIVATE void WSRCParser_put_character ARGS2(HTStream*, me, char, c) } } if (!par_name[me->param_number]) { /* Unknown field */ - if (TRACE) fprintf(stderr, - "HTWSRC: Unknown field `%s' in source file\n", - me->param); + CTRACE(tfp, "HTWSRC: Unknown field `%s' in source file\n", + me->param); me->param_number = PAR_UNKNOWN; me->state = before_value; /* Could be better ignore */ return; @@ -286,7 +282,7 @@ PRIVATE void give_parameter ARGS2(HTStream *, me, int, p) PUTS(me->par_value[p]); PUTS("; "); } else { - PUTS(" NOT GIVEN in source file; "); + PUTS(gettext(" NOT GIVEN in source file; ")); } } @@ -307,19 +303,19 @@ PRIVATE void WSRC_gen_html ARGS2(HTStream *, me, BOOL, source_file) } START(HTML_HEAD); - PUTS("\n"); + PUTC('\n'); START(HTML_TITLE); PUTS(shortname); - PUTS(source_file ? " WAIS source file" : " index"); + PUTS(source_file ? gettext(" WAIS source file") : INDEX_SEGMENT); END(HTML_TITLE); - PUTS("\n"); + PUTC('\n'); END(HTML_HEAD); START(HTML_H1); PUTS(shortname); - PUTS(source_file ? " description" : " index"); + PUTS(source_file ? gettext(" description") : INDEX_SEGMENT); END(HTML_H1); - PUTS("\n"); + PUTC('\n'); FREE(shortname); } @@ -327,7 +323,7 @@ PRIVATE void WSRC_gen_html ARGS2(HTStream *, me, BOOL, source_file) if (source_file) { START(HTML_DT); - PUTS("Access links"); + PUTS(gettext("Access links")); MAYBE_END(HTML_DT); START(HTML_DD); if (me->par_value[PAR_IP_NAME] && @@ -344,10 +340,10 @@ PRIVATE void WSRC_gen_html ARGS2(HTStream *, me, BOOL, source_file) www_database); HTStartAnchor(me->target, NULL, WSRC_address); - PUTS("Direct access"); + PUTS(gettext("Direct access")); END(HTML_A); /** Proxy will be used if defined, so let user know that - FM **/ - PUTS(" (or via proxy server, if defined)"); + PUTS(gettext(" (or via proxy server, if defined)")); FREE(www_database); @@ -361,7 +357,7 @@ PRIVATE void WSRC_gen_html ARGS2(HTStream *, me, BOOL, source_file) if (me->par_value[PAR_MAINTAINER]) { START(HTML_DT); - PUTS("Maintainer"); + PUTS(gettext("Maintainer")); MAYBE_END(HTML_DT); START(HTML_DD); PUTS(me->par_value[PAR_MAINTAINER]); @@ -369,7 +365,7 @@ PRIVATE void WSRC_gen_html ARGS2(HTStream *, me, BOOL, source_file) } if (me->par_value[PAR_IP_NAME]) { START(HTML_DT); - PUTS("Host"); + PUTS(gettext("Host")); MAYBE_END(HTML_DT); START(HTML_DD); PUTS(me->par_value[PAR_IP_NAME]); diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWSRC.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWSRC.h index 9241b321c0b..821cf2ff39c 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWSRC.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWSRC.h @@ -1,21 +1,17 @@ /* A parser for WAIS source files WAIS SOURCE FILE PARSER - + This converter returns a stream object into which a WAIS source file can be written. The result is put via a structured stream into whatever format was required for the output stream. - + See also: HTWAIS protocol interface module - + */ #ifndef HTWSRC_H #define HTWSRC_H -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ - -#include "HTFormat.h" +#include extern char from_hex PARAMS((char c)); @@ -29,11 +25,11 @@ extern HTStream* HTWSRCConvert PARAMS(( Escaping Strings HTDeSlash takes out the invlaid characters in a URL path ELEMENT by converting them - into hex-escaped characters. HTEnSlash does the reverse. - + into hex-escaped characters. HTEnSlash does the reverse. + Each returns a pointer to a newly allocated string which must eventually be freed by the caller. - + */ extern char * HTDeSlash PARAMS((CONST char * str)); @@ -44,5 +40,5 @@ extern char * HTEnSlash PARAMS((CONST char * str)); /* Tim BL - + */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWriter.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWriter.c deleted file mode 100644 index f803920f808..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWriter.c +++ /dev/null @@ -1,189 +0,0 @@ -/* FILE WRITER HTWrite.c -** =========== -** -*/ -#include "HTUtils.h" -#include "tcp.h" - -#include "HTWriter.h" - -#define BUFFER_SIZE 4096 /* Tradeoff */ - -/*#include included by HTUtils.h -- FM */ - -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} - -/* HTML Object -** ----------- -*/ - -struct _HTStream { - CONST HTStreamClass * isa; - - int soc; - char *write_pointer; - char buffer[BUFFER_SIZE]; -#ifdef NOT_ASCII - BOOL make_ascii; /* Are we writing to the net? */ -#endif -}; - - -/* Write the buffer out to the socket -** ---------------------------------- -*/ - -PRIVATE void flush ARGS1(HTStream *, me) -{ - char *read_pointer = me->buffer; - char *write_pointer = me->write_pointer; - -#ifdef NOT_ASCII - if (me->make_ascii) { - char * p; - for(p = me->buffer; p < me->write_pointer; p++) - *p = TOASCII(*p); - } -#endif - while (read_pointer < write_pointer) { - int status; - status = NETWRITE(me->soc, me->buffer, /* Put timeout? @@@ */ - write_pointer - read_pointer); - if (status<0) { - if(TRACE) fprintf(stderr, - "HTWrite: Error: write() on socket returns %d !!!\n", status); - return; - } - read_pointer = read_pointer + status; - } - me->write_pointer = me->buffer; -} - - -/*_________________________________________________________________________ -** -** A C T I O N R O U T I N E S -*/ - -/* Character handling -** ------------------ -*/ - -PRIVATE void HTWriter_put_character ARGS2(HTStream *, me, char, c) -{ - if (me->write_pointer == &me->buffer[BUFFER_SIZE]) flush(me); - *me->write_pointer++ = c; -} - - - -/* String handling -** --------------- -** -** Strings must be smaller than this buffer size. -*/ -PRIVATE void HTWriter_put_string ARGS2(HTStream *, me, CONST char*, s) -{ - int l = strlen(s); - if (me->write_pointer + l > &me->buffer[BUFFER_SIZE]) flush(me); - strcpy(me->write_pointer, s); - me->write_pointer = me->write_pointer + l; -} - - -/* Buffer write. Buffers can (and should!) be big. -** ------------ -*/ -PRIVATE void HTWriter_write ARGS3(HTStream *, me, CONST char*, s, int, l) -{ - - CONST char *read_pointer = s; - CONST char *write_pointer = s+l; - - flush(me); /* First get rid of our buffer */ - - while (read_pointer < write_pointer) { - int status = NETWRITE(me->soc, (char *)read_pointer, - write_pointer - read_pointer); - if (status<0) { - if(TRACE) fprintf(stderr, - "HTWriter_write: Error on socket output stream!!!\n"); - return; - } - read_pointer = read_pointer + status; - } -} - - - - -/* Free an HTML object -** ------------------- -** -** Note that the SGML parsing context is freed, but the created object is not, -** as it takes on an existence of its own unless explicitly freed. -*/ -PRIVATE void HTWriter_free ARGS1(HTStream *, me) -{ - flush(me); - NETCLOSE(me->soc); - FREE(me); -} - -PRIVATE void HTWriter_abort ARGS2(HTStream *, me, HTError, e GCC_UNUSED) -{ - HTWriter_free(me); -} - - -/* Structured Object Class -** ----------------------- -*/ -PRIVATE CONST HTStreamClass HTWriter = /* As opposed to print etc */ -{ - "SocketWriter", - HTWriter_free, - HTWriter_abort, - HTWriter_put_character, HTWriter_put_string, - HTWriter_write -}; - - -/* Subclass-specific Methods -** ------------------------- -*/ - -PUBLIC HTStream* HTWriter_new ARGS1(int, soc) -{ - HTStream* me = (HTStream*)malloc(sizeof(*me)); - if (me == NULL) outofmem(__FILE__, "HTML_new"); - me->isa = &HTWriter; - -#ifdef NOT_ASCII - me->make_ascii = NO; -#endif - me->soc = soc; - me->write_pointer = me->buffer; - return me; -} - -/* Subclass-specific Methods -** ------------------------- -*/ - -PUBLIC HTStream* HTASCIIWriter ARGS1(int, soc) -{ - HTStream* me = (HTStream*)malloc(sizeof(*me)); - if (me == NULL) outofmem(__FILE__, "HTML_new"); - me->isa = &HTWriter; - -#ifdef NOT_ASCII - me->make_ascii = YES; -#endif - me->soc = soc; - me->write_pointer = me->buffer; - return me; -} - diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWriter.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWriter.h deleted file mode 100644 index 9fa5f8c6191..00000000000 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTWriter.h +++ /dev/null @@ -1,28 +0,0 @@ -/* */ - -/* Unix File or Socket Writer HTWriter.c -** -------------------------- -** -** This version of the stream object just writes to a socket. -** The socket is assumed open and closed afterward. -** -** There are two versions (identical on ASCII machines) -** one of which converts to ASCII on output. -** -** Bugs: -** strings written must be less than buffer size. -*/ - -#ifndef HTWRITE_H -#define HTWRITE_H - -#include "HTStream.h" - -extern HTStream * HTWriter_new PARAMS((int soc)); - -extern HTStream * HTASCIIWriter PARAMS((int soc)); - -#endif -/* - - */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HText.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/HText.h index 64000eab7d0..7258a34331d 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HText.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HText.h @@ -1,51 +1,21 @@ /* Rich Hypertext object for libWWW RICH HYPERTEXT OBJECT - + */ /* This is the C interface to the Objective-C (or whatever) Style-oriented HyperText - class. It is used when a style-oriented text object is available or craeted in order to + class. It is used when a style-oriented text object is available or craeted in order to display hypertext. - + */ #ifndef HTEXT_H #define HTEXT_H -#include "HTAnchor.h" -#include "HTStyle.h" -#include "HTStream.h" -#include "SGML.h" - -#ifdef SHORT_NAMES -#define HTMainText HTMaText -#define HTMainAnchor HtMaAnch -#define HText_new HTHTNew -#define HText_new2 HTHTNew2 -#define HText_free HTHTFree -#define HText_beginAppend HTHTBeAp -#define HText_endAppend HTHTEnAp -#define HText_setStyle HTHTSeSt -#define HText_appendCharacter HTHTApCh -#define HText_appendImage HTHTApIm -#define HText_appendText HTHTApTe -#define HText_appendParagraph HTHTApPa -#define HText_beginAnchor HTHTBeAn -#define HText_endAnchor HTHTEnAn -#define HText_dump HTHTDump -#define HText_nodeAnchor HTHTNoAn -#define HText_select HTHTSele -#define HText_selectAnchor HTHTSeAn -#define HText_applyStyle HTHTApSt -#define HText_updateStyle HTHTUpSt -#define HText_selectionStyle HTHTStyl -#define HText_replaceSel HTHTRepl -#define HText_applyToSimilar HTHTApTo -#define HText_selectUnstyled HTHTSeUn -#define HText_unlinkSelection HTHTUnSe -#define HText_linkSelTo HTHTLiSe -#define HText_referenceSelected HTHTRefS -#endif +#include +#include +#include +#include #ifndef THINK_C #ifndef HyperText /* Objective C version defined HyperText */ @@ -64,11 +34,11 @@ extern HTParentAnchor * HTMainAnchor; /* Pointer to current text's anchor */ Creation and deletion HTEXT_NEW: CREATE HYPERTEXT OBJECT - - There are several methods depending on how much you want to specify. The output stream + + There are several methods depending on how much you want to specify. The output stream is used with objects which need to output the hypertext to a stream. The structure is for objects which need to refer to the structure which is kep by the creating stream. - + */ extern HText * HText_new PARAMS((HTParentAnchor * anchor)); @@ -82,7 +52,7 @@ Creation and deletion /* FREE HYPERTEXT OBJECT - + */ extern void HText_free PARAMS((HText * me)); @@ -94,7 +64,7 @@ Object Building methods These are used by a parser to build the text in an object HText_beginAppend must be called, then any combination of other append calls, then HText_endAppend. This allows optimised handling using buffers and caches which are flushed at the end. - + */ extern void HText_beginAppend PARAMS((HText * text)); @@ -103,7 +73,7 @@ extern void HText_endAppend PARAMS((HText * text)); /* SET THE STYLE FOR FUTURE TEXT - + */ extern void HText_setStyle PARAMS((HText * text, HTStyle * style)); @@ -111,14 +81,14 @@ extern void HText_setStyle PARAMS((HText * text, HTStyle * style)); /* ADD ONE CHARACTER - + */ extern void HText_appendCharacter PARAMS((HText * text, char ch)); /* ADD A ZERO-TERMINATED STRING - + */ extern void HText_appendText PARAMS((HText * text, CONST char * str)); @@ -126,9 +96,9 @@ extern void HText_appendText PARAMS((HText * text, CONST char * str)); /* NEW PARAGRAPH - + and similar things - + */ extern void HText_appendParagraph PARAMS((HText * text)); @@ -141,15 +111,15 @@ extern void HText_appendHorizontalRule PARAMS((HText * text)); /* START/END SENSITIVE TEXT - + */ /* - The anchor object is created and passed to HText_beginAnchor. The senstive text is + The anchor object is created and passed to HText_beginAnchor. The senstive text is added to the text object, and then HText_endAnchor is called. Anchors may not be nested. - + */ extern int HText_beginAnchor PARAMS(( HText * text, @@ -161,14 +131,14 @@ extern void HText_endAnchor PARAMS((HText * text, int number)); /* APPEND AN INLINE IMAGE - + The image is handled by the creation of an anchor whose destination is the image document to be included. The semantics is the intended inline display of the image. - + An alternative implementation could be, for example, to begin an anchor, append the - alternative text or "IMAGE", then end the anchor. This would simply generate some text + alternative text or "IMAGE", then end the anchor. This would simply generate some text linked to the image itself as a separate document. - + */ extern void HText_appendImage PARAMS(( HText * text, @@ -180,7 +150,7 @@ extern void HText_appendImage PARAMS(( /* DUMP DIAGNOSTICS TO STDERR - + */ extern void HText_dump PARAMS((HText * me)); @@ -188,7 +158,7 @@ extern void HText_dump PARAMS((HText * me)); /* RETURN THE ANCHOR ASSOCIATED WITH THIS NODE - + */ extern HTParentAnchor * HText_nodeAnchor PARAMS((HText * me)); @@ -203,7 +173,7 @@ Browsing functions /* BRING TO FRONT AND HIGHLIGHT IT - + */ @@ -214,10 +184,10 @@ extern BOOL HText_selectAnchor PARAMS((HText * text, HTChildAnchor* anchor)); Editing functions - These are called from the application. There are many more functions not included here - from the orginal text object. These functions NEED NOT BE IMPLEMENTED in a browser + These are called from the application. There are many more functions not included here + from the orginal text object. These functions NEED NOT BE IMPLEMENTED in a browser which cannot edit. - + */ /* Style handling: */ diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/LYLeaks.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/LYLeaks.h index b181cb7fb0c..5ecf8e67d2b 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/LYLeaks.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/LYLeaks.h @@ -41,8 +41,10 @@ /* ** Required includes */ -#include -#include "HTUtils.h" + +#ifndef HTUTILS_H +#include +#endif /* ** Constant defines diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/LYexit.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/LYexit.h index 7007d615ef6..235b3e0b146 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/LYexit.h +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/LYexit.h @@ -19,8 +19,10 @@ /* * Required includes */ -#include -#include "HTUtils.h" + +#ifndef HTUTILS_H +#include +#endif /* * Constant defines @@ -30,8 +32,9 @@ #endif /* _WINDOWS */ #define exit LYexit + #define atexit LYatexit -#define ATEXITSIZE 32 +#define ATEXITSIZE 40 /* * Data structures @@ -48,6 +51,7 @@ /* * Function declarations */ +extern void exit_immediately PARAMS((int status)); /* in LYMain.c */ extern void LYexit PARAMS((int status)); #ifdef __STDC__ extern int LYatexit(void (*function)(void)); diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/SGML.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/SGML.c index 713bb905811..7d436284bef 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/SGML.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/SGML.c @@ -1,16 +1,15 @@ /* General SGML Parser code SGML.c ** ======================== ** -** This module implements an HTStream object. To parse an -** SGML file, create this object which is a parser. The object +** This module implements an HTStream object. To parse an +** SGML file, create this object which is a parser. The object ** is (currently) created by being passed a DTD structure, -** and a target HTStructured oject at which to throw the parsed stuff. +** and a target HTStructured object at which to throw the parsed stuff. ** -** 6 Feb 93 Binary seraches used. Intreface modified. +** 6 Feb 93 Binary searches used. Interface modified. */ -#include "HTUtils.h" -#include "tcp.h" /* For FROMASCII */ +#include /* Remove the following to disable the experimental HTML DTD parsing. Currently only used in this source file. - kw */ @@ -19,31 +18,88 @@ #define EXTENDED_HTMLDTD #endif -#include "SGML.h" -#include "HTMLDTD.h" -#include "HTCJK.h" -#include "UCMap.h" -#include "UCDefs.h" -#include "UCAux.h" +#include +#include +#include +#include +#include +#include -#include -/*#include included in HTUtils.h -- FM */ -#include "HTChunk.h" +#include -#include "LYCharSets.h" -#include "LYLeaks.h" +#include +#include /* S/390 -- gil -- 0635 */ +#include +#include + +#ifdef USE_COLOR_STYLE +# include +#endif +#ifdef USE_PSRC +# include +#endif #define INVALID (-1) -#define FREE(x) if (x) {free(x); x = NULL;} +#ifdef USE_PSRC + +# define PSRC(x) if (psrc_view) { x }; +# define NPSRC(x) if (!psrc_view) { x }; +# define IFDEFPSRC(x) x +# define IFNDEFPSRC(x) + +char* entity_string; /* this is used for printing entity name. + Unconditionally added since redundant assigments don't hurt much*/ + +PRIVATE void fake_put_character ARGS2( + void*, p GCC_UNUSED, + char, c GCC_UNUSED) +{ +} + +#define START TRUE +#define STOP FALSE + +#define PUTS_TR(x) psrc_convert_string = TRUE; PUTS(x) + +#else +# define PSRC(x) +# define NPSRC(x) +# define IFDEFPSRC(x) +# define IFNDEFPSRC(x) x +#endif + + /* will use an inlined version */ +#ifdef USE_INLINE_PUTC +#undef HTChunkPutc +#define HTChunkPutc(ch,c)\ + if (ch->size >= ch->allocated) {\ + ch->allocated = ch->allocated + ch->growby;\ + ch->data = ch->data ? (char *)realloc(ch->data, ch->allocated)\ + : (char *)calloc(1, ch->allocated);\ + if (!ch->data)\ + outofmem(__FILE__, "HTChunkPutc");\ + }\ + ch->data[ch->size++] = c; +#endif + +#define PUTS(str) ((*context->actions->put_string)(context->target, str)) + + +#define OPT 0 /* don't make it 1 otherwise something wrong will be with + TagSoup parser mode - I was unable to undestand why it works incorrectly -HV*/ +#define OPT1 1 /* set to 1 for several optimizations */ + +/*the following macros are used for pretty source view. */ +#define IS_C(attr) (attr.type == HTMLA_CLASS) -PUBLIC HTCJKlang HTCJK = NOCJK; /* CJK enum value. */ +PUBLIC HTCJKlang HTCJK = NOCJK; /* CJK enum value. */ PUBLIC BOOL HTPassEightBitRaw = FALSE; /* Pass 161-172,174-255 raw. */ PUBLIC BOOL HTPassEightBitNum = FALSE; /* Pass ^ numeric entities raw. */ PUBLIC BOOL HTPassHighCtrlRaw = FALSE; /* Pass 127-160,173, raw. */ PUBLIC BOOL HTPassHighCtrlNum = FALSE; /* Pass €-Ÿ raw. */ -extern int LYlowest_eightbit[]; +/* extern int LYlowest_eightbit[]; for completeness here */ /* The State (context) of the parser ** @@ -56,7 +112,7 @@ extern int LYlowest_eightbit[]; /* Element Stack ** ------------- -** This allows us to return down the stack reselcting styles. +** This allows us to return down the stack reselecting styles. ** As we return, attribute values will be garbage in general. */ typedef struct _HTElement HTElement; @@ -74,13 +130,13 @@ struct _HTStream { CONST HTStreamClass * isa; /* inherited from HTStream */ CONST SGML_dtd *dtd; - HTStructuredClass *actions; /* target class */ + CONST HTStructuredClass *actions; /* target class */ HTStructured *target; /* target object */ HTTag *current_tag; - CONST HTTag *unknown_tag; + CONST HTTag *unknown_tag; BOOL inSELECT; - int current_attribute_number; + int current_attribute_number; HTChunk *string; HTElement *element_stack; enum sgml_state { S_text, S_litteral, @@ -89,7 +145,7 @@ struct _HTStream { S_exclamation, S_comment, S_doctype, S_marked, S_sgmlent, S_sgmlele, S_sgmlatt, S_squoted, S_dquoted, S_end, S_entity, - S_esc, S_dollar, S_paren, S_nonascii_text, + S_esc, S_dollar, S_paren, S_nonascii_text, S_dollar_paren, S_esc_sq, S_dollar_sq, S_paren_sq, S_nonascii_text_sq, S_dollar_paren_sq, @@ -112,25 +168,69 @@ struct _HTStream { HTParentAnchor * node_anchor; LYUCcharset * inUCI; /* pointer to anchor UCInfo */ - int inUCLYhndl; /* charset we are fed */ - LYUCcharset * outUCI; /* anchor UCInfo for target */ - int outUCLYhndl; /* charset for target */ + int inUCLYhndl; /* charset we are fed */ + LYUCcharset * outUCI; /* anchor UCInfo for target */ + int outUCLYhndl; /* charset for target */ char utf_count; UCode_t utf_char; char utf_buf[8]; char * utf_buf_p; UCTransParams T; - int current_tag_charset; /* charset to pass attributes */ + int current_tag_charset; /* charset to pass attributes */ char * recover; - int recover_index; + int recover_index; char * include; - int include_index; + int include_index; char * url; char * csi; - int csi_index; + int csi_index; } ; +#ifdef USE_PSRC +static BOOL seen_letter_in_junk_tag; + +PRIVATE void HTMLSRC_apply_markup ARGS3( + HTStream *, context, + HTlexem, lexem, + BOOL, start) +{ + HT_tagspec* ts = *( ( start ? lexem_start : lexem_end ) + lexem); + + while (ts) { +#ifdef USE_COLOR_STYLE + if (ts->start) { + current_tag_style = ts->style; + force_current_tag_style = TRUE; + forced_classname = ts->class_name; + force_classname = TRUE; + } +#endif + CTRACE(tfp,ts->start ? "SRCSTART %d\n" : "SRCSTOP %d\n",(int)lexem); + if (ts->start) + (*context->actions->start_element)( + context->target, + ts->element, + ts->present, + (CONST char **)ts->value, + context->current_tag_charset, + (char **)&context->include); + else + (*context->actions->end_element)( + context->target, + ts->element, + (char **)&context->include); + ts = ts->next; + } +} + +# define PSRCSTART(x) HTMLSRC_apply_markup(context,HTL_##x,START) +# define PSRCSTOP(x) HTMLSRC_apply_markup(context,HTL_##x,STOP) + +PRIVATE BOOL cur_attr_is_href; +PRIVATE BOOL cur_attr_is_name; +#endif + PRIVATE void set_chartrans_handling ARGS3( HTStream *, context, HTParentAnchor *, anchor, @@ -169,9 +269,9 @@ PRIVATE void set_chartrans_handling ARGS3( ** Get the chartrans info for output to the HTML parser. - FM */ context->outUCI = HTAnchor_getUCInfoStage(anchor, - UCT_STAGE_STRUCTURED); + UCT_STAGE_STRUCTURED); context->outUCLYhndl = HTAnchor_getUCLYhndl(context->node_anchor, - UCT_STAGE_STRUCTURED); + UCT_STAGE_STRUCTURED); } /* ** Set the in->out transformation parameters. - FM @@ -200,7 +300,7 @@ PRIVATE void set_chartrans_handling ARGS3( context->T.trans_from_uni) { context->current_tag_charset = UCGetLYhndl_byMIME("utf-8"); } else { - context->current_tag_charset = 0; + context->current_tag_charset = LATIN1; } } @@ -242,9 +342,8 @@ extern BOOL minimal_comments; extern BOOL soft_dquotes; #ifdef USE_COLOR_STYLE -#include "AttrList.h" -extern char class_string[TEMPSTRINGSIZE]; -int current_is_class=0; +#include +static int current_is_class=0; #endif /* Handle Attribute @@ -261,10 +360,20 @@ PRIVATE void handle_attribute_name ARGS2( attr * attributes = tag->attributes; int high, low, i, diff; +#ifdef USE_PSRC + if (psrc_view) { + cur_attr_is_href = FALSE; + cur_attr_is_name = FALSE; + } +#endif /* ** Ignore unknown tag. - KW */ if (tag == context->unknown_tag) { +#ifdef USE_PSRC + if (psrc_view) + context->current_attribute_number = 1; /* anything !=INVALID */ +#endif return; } @@ -278,21 +387,37 @@ PRIVATE void handle_attribute_name ARGS2( diff = strcasecomp(attributes[i].name, s); if (diff == 0) { /* success: found it */ context->current_attribute_number = i; +#ifdef USE_PSRC + if (!psrc_view) { +#endif context->present[i] = YES; FREE(context->value[i]); #ifdef USE_COLOR_STYLE - current_is_class=(!strcasecomp("class", s)); - if (TRACE) - fprintf(stderr, "SGML: found attribute %s, %d\n", s, current_is_class); +# ifdef USE_PSRC +# if !OPT1 + current_is_class = (!strcasecomp("class", s)); +# else + current_is_class = IS_C(attributes[i]); +# endif +# else + current_is_class = (!strcasecomp("class", s)); +# endif + CTRACE(tfp, "SGML: found attribute %s, %d\n", s, current_is_class); +#endif + +#ifdef USE_PSRC + } else { + cur_attr_is_name = (attributes[i].type == HTMLA_ANAME); + cur_attr_is_href = (attributes[i].type == HTMLA_HREF); + } #endif return; } /* if */ } /* for */ - if (TRACE) - fprintf(stderr, "SGML: Unknown attribute %s for tag %s\n", - s, context->current_tag->name); + CTRACE(tfp, "SGML: Unknown attribute %s for tag %s\n", + s, context->current_tag->name); context->current_attribute_number = INVALID; /* Invalid */ } @@ -310,18 +435,15 @@ PRIVATE void handle_attribute_value ARGS2( if (current_is_class) { strncpy (class_string, s, TEMPSTRINGSIZE); - if (TRACE) - fprintf(stderr, "SGML: class is '%s'\n", s); + CTRACE(tfp, "SGML: class is '%s'\n", s); } else { - if (TRACE) - fprintf(stderr, "SGML: attribute value is '%s'\n", s); + CTRACE(tfp, "SGML: attribute value is '%s'\n", s); } #endif } else { - if (TRACE) - fprintf(stderr, "SGML: Attribute value %s ignored\n", s); + CTRACE(tfp, "SGML: Attribute value %s ***ignored\n", s); } context->current_attribute_number = INVALID; /* can't have two assignments! */ } @@ -331,48 +453,60 @@ PRIVATE void handle_attribute_value ARGS2( ** Translate some Unicodes to Lynx special codes and output them. ** Special codes - ones those output depend on parsing. ** -** Additional issue, like handling bidirectional text if nesseccery +** Additional issue, like handling bidirectional text if necessary ** may be called from here: zwnj (8204), zwj (8205), lrm (8206), rlm (8207) -** - currently they are passed to def7_uni.tbl as regular characters. +** - currently they are ignored in SGML.c and LYCharUtils.c +** but also in UCdomap.c because they are non printable... ** */ PRIVATE BOOL put_special_unicodes ARGS2( HTStream *, context, UCode_t, code) { - if (code == 160) { + if (code == CH_NBSP) { /* S/390 -- gil -- 0657 */ /* ** Use Lynx special character for nbsp. */ +#ifdef USE_PSRC + if (!psrc_view) +#endif PUTC(HT_NON_BREAK_SPACE); - } else if (code == 173) { + } else if (code == CH_SHY) { /* ** Use Lynx special character for shy. */ +#ifdef USE_PSRC + if (!psrc_view) +#endif PUTC(LY_SOFT_HYPHEN); - } else if (code == 8194 || code == 8195 || code == 8201) { + } else if (code == 8194 || code == 8201) { /* - ** Use Lynx special character for ensp, emsp or thinsp. + ** Use Lynx special character for ensp or thinsp. ** ** Originally, Lynx use space '32' as word delimiter and omits this ** space at end of line if word is wrapped to the next line. There ** are several other spaces in the Unicode repertoire and we should ** teach Lynx to understand them, not only as regular characters but ** in the context of line wrapping. Unfortunately, if we use - ** HT_EM_SPACE we override the chartrans tables for those spaces - ** (e.g., emsp= double space) with a single '32' for all (but do line - ** wrapping more fancy). In the future we need HT_SPACE with a - ** transferred parameter (Unicode number) which falls back to - ** chartrans if line wrapping is not the case. - ** + ** HT_EN_SPACE we override the chartrans tables for those spaces + ** with a single '32' for all (but do line wrapping more fancy). + ** Assume emsp as two ensp (below). */ - PUTC(HT_EM_SPACE); -#ifdef NOTUSED_FOTEMODS - } else if (code == 8211 || code == 8212) { +#ifdef USE_PSRC + if (!psrc_view) +#endif + PUTC(HT_EN_SPACE); + } else if (code == 8195) { /* - ** Use ASCII hyphen for ndash/endash or mdash/emdash. + ** Use Lynx special character for emsp. */ - PUTC('-'); +#ifdef USE_PSRC + if (!psrc_view) { +#endif + /* PUTC(HT_EN_SPACE); let's stay with a single space :) */ + PUTC(HT_EN_SPACE); +#ifdef USE_PSRC + } #endif } else { /* @@ -403,22 +537,14 @@ PRIVATE BOOL put_special_unicodes ARGS2( PRIVATE char replace_buf [64]; /* buffer for replacement strings */ PRIVATE BOOL FoundEntity = FALSE; -#define IncludesLatin1Enc \ - (context->outUCLYhndl == 0 || \ - (context->outUCI && \ - (context->outUCI->enc & (UCT_CP_SUPERSETOF_LAT1)))) - PRIVATE void handle_entity ARGS2( HTStream *, context, char, term) { UCode_t code; - long uck; + long uck = -1; CONST char *p; CONST char *s = context->string->data; -#ifdef NOTUSED_FOTEMODS - int high, low, i, diff; -#endif /* @@ -431,6 +557,16 @@ PRIVATE void handle_entity ARGS2( ** Check for special Unicodes. - FM */ if (put_special_unicodes(context, code)) { +#ifdef USE_PSRC + if (psrc_view) { + HTMLSRC_apply_markup(context,HTL_entity,START); + PUTC('&'); + PUTS(entity_string); + if (term) + PUTC(term); + HTMLSRC_apply_markup(context,HTL_entity,STOP); + } +#endif FoundEntity = TRUE; return; } @@ -438,9 +574,17 @@ PRIVATE void handle_entity ARGS2( ** Seek a translation from the chartrans tables. */ if ((uck = UCTransUniChar(code, context->outUCLYhndl)) >= 32 && +/* =============== work in ASCII below here =============== S/390 -- gil -- 0672 */ uck < 256 && (uck < 127 || uck >= LYlowest_eightbit[context->outUCLYhndl])) { +#ifdef USE_PSRC + if (psrc_view) { + HTMLSRC_apply_markup(context,HTL_entity,START); + PUTC('&'); PUTS(entity_string); if (term) PUTC(term); + HTMLSRC_apply_markup(context,HTL_entity,STOP); + } else +#endif PUTC(FROMASCII((char)uck)); FoundEntity = TRUE; return; @@ -452,6 +596,16 @@ PRIVATE void handle_entity ARGS2( */ (uck = UCTransUniCharStr(replace_buf, 60, code, context->outUCLYhndl, 0) >= 0)) { +#ifdef USE_PSRC + if (psrc_view) { + HTMLSRC_apply_markup(context,HTL_entity,START); + PUTC('&'); + PUTS(entity_string); + if (term) + PUTC(term); + HTMLSRC_apply_markup(context,HTL_entity,STOP); + } else +#endif for (p = replace_buf; *p; p++) PUTC(*p); FoundEntity = TRUE; @@ -460,107 +614,106 @@ PRIVATE void handle_entity ARGS2( /* ** If we're displaying UTF-8, try that now. - FM */ +#ifndef USE_PSRC if (context->T.output_utf8 && PUTUTF8(code)) { FoundEntity = TRUE; return; } +#else + if (context->T.output_utf8 && (psrc_view ? + (UCPutUtf8_charstring((HTStream *)context->target, + (putc_func_t*)(&fake_put_character), code)): PUTUTF8(code) ) ) { + + if (psrc_view) { + HTMLSRC_apply_markup(context,HTL_entity,START); + PUTC('&'); PUTS(entity_string); if (term) PUTC(term); + HTMLSRC_apply_markup(context,HTL_entity,STOP); + } + + FoundEntity = TRUE; + return; + } +#endif /* ** If it's safe ASCII, use it. - FM */ if (code >= 32 && code < 127) { +#ifdef USE_PSRC + if (psrc_view) { + HTMLSRC_apply_markup(context,HTL_entity,START); + PUTC('&'); + PUTS(entity_string); + if (term) + PUTC(term); + HTMLSRC_apply_markup(context,HTL_entity,STOP); + } else +#endif + PUTC(FROMASCII((char)code)); FoundEntity = TRUE; return; } -#ifdef NOTUSED_FOTEMODS +/* =============== work in ASCII above here =============== S/390 -- gil -- 0682 */ /* - ** 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 + ** Ignore zwnj (8204) and zwj (8205), if we get to here. + ** Note that zwnj may have been handled as + ** by the calling function. - FM */ - if ((chk = ((code > 255) && - context->outUCLYhndl != - UCGetLYhndl_byMIME("us-ascii"))) && - (uck = UCTransUniChar(code, - UCGetLYhndl_byMIME("us-ascii")))>= 32 && - uck < 127) { - /* - ** Got an ASCII character (yippey). - FM - */ - PUTC(((char)(uck & 0xff))); - FoundEntity = TRUE; - return; - } 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); + if (!strcmp(s, "zwnj") || + !strcmp(s, "zwj")) { + CTRACE(tfp, "handle_entity: Ignoring '%s'.\n", s); +#ifdef USE_PSRC + if (psrc_view) { + HTMLSRC_apply_markup(context,HTL_entity,START); + PUTC('&'); + PUTS(entity_string); + if (term) + PUTC(term); + HTMLSRC_apply_markup(context,HTL_entity,STOP); + } +#endif FoundEntity = TRUE; return; } - } - /* - ** Ignore zwnj (8204) and zwj (8205), if we get to here. - ** Note that zwnj may have been handled as - ** by the calling function. - FM - */ - if (!strcmp(s, "zwnj") || - !strcmp(s, "zwj")) { - if (TRACE) { - fprintf(stderr, "handle_entity: Ignoring '%s'.\n", s); - } - FoundEntity = TRUE; - return; - } - - /* - ** Ignore lrm (8206), and rln (8207), if we get to here. - FM - */ - if (!strcmp(s, "lrm") || - !strcmp(s, "rlm")) { - if (TRACE) { - fprintf(stderr, "handle_entity: Ignoring '%s'.\n", s); - } - 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 search */ - i = (low + (high-low)/2); - diff = strcmp(entities[i], s); /* Case sensitive! */ - if (diff == 0) { /* success: found it */ - for (p = LYCharSets[context->outUCLYhndl][i]; *p; p++) { - PUTC(*p); + /* + ** Ignore lrm (8206), and rln (8207), if we get to here. - FM + */ + if (!strcmp(s, "lrm") || + !strcmp(s, "rlm")) { + CTRACE(tfp, "handle_entity: Ignoring '%s'.\n", s); +#ifdef USE_PSRC + if (psrc_view) { + HTMLSRC_apply_markup(context,HTL_entity,START); + PUTC('&'); + PUTS(entity_string); + if (term) + PUTC(term); + HTMLSRC_apply_markup(context,HTL_entity,STOP); } +#endif FoundEntity = TRUE; return; } -#endif } /* ** If entity string not found, display as text. */ - if (TRACE) - fprintf(stderr, "SGML: Unknown entity '%s'\n", s); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(badseq); +#endif + CTRACE(tfp, "SGML: Unknown entity '%s' %ld %ld\n", s, (long)code, uck); /* S/390 -- gil -- 0695 */ PUTC('&'); for (p = s; *p; p++) { PUTC(*p); } if (term != '\0') PUTC(term); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTOP(badseq); +#endif } @@ -572,13 +725,14 @@ PRIVATE void handle_comment ARGS1( { CONST char *s = context->string->data; - if (TRACE) - fprintf(stderr, "SGML Comment:\n<%s>\n", s); + CTRACE(tfp, "SGML Comment:\n<%s>\n", s); if (context->csi == NULL && strncmp(s, "!--#", 4) == 0 && LYCheckForCSI(context->node_anchor, (char **)&context->url) == TRUE) { LYDoCSI(context->url, s, (char **)&context->csi); + } else { + LYCommentHacks(context->node_anchor, context->string->data); } return; @@ -593,8 +747,7 @@ PRIVATE void handle_identifier ARGS1( { CONST char *s = context->string->data; - if (TRACE) - fprintf(stderr, "SGML Identifier\n<%s>\n", s); + CTRACE(tfp, "SGML Identifier:\n<%s>\n", s); return; } @@ -608,8 +761,7 @@ PRIVATE void handle_doctype ARGS1( { CONST char *s = context->string->data; - if (TRACE) - fprintf(stderr, "SGML Doctype\n<%s>\n", s); + CTRACE(tfp, "SGML Doctype:\n<%s>\n", s); return; } @@ -623,8 +775,7 @@ PRIVATE void handle_marked ARGS1( { CONST char *s = context->string->data; - if (TRACE) - fprintf(stderr, "SGML Marked Section:\n<%s>\n", s); + CTRACE(tfp, "SGML Marked Section:\n<%s>\n", s); return; } @@ -638,8 +789,7 @@ PRIVATE void handle_sgmlent ARGS1( { CONST char *s = context->string->data; - if (TRACE) - fprintf(stderr, "SGML Entity Declaration:\n<%s>\n", s); + CTRACE(tfp, "SGML Entity Declaration:\n<%s>\n", s); return; } @@ -653,8 +803,7 @@ PRIVATE void handle_sgmlele ARGS1( { CONST char *s = context->string->data; - if (TRACE) - fprintf(stderr, "SGML Element Declaration:\n<%s>\n", s); + CTRACE(tfp, "SGML Element Declaration:\n<%s>\n", s); return; } @@ -668,8 +817,7 @@ PRIVATE void handle_sgmlatt ARGS1( { CONST char *s = context->string->data; - if (TRACE) - fprintf(stderr, "SGML Attribute Declaration:\n<%s>\n", s); + CTRACE(tfp, "SGML Attribute Declaration:\n<%s>\n", s); return; } @@ -694,7 +842,7 @@ PRIVATE BOOL element_valid_within ARGS3( (stacked_tag->tagclass & usecontained)); } -extern BOOL New_DTD; +extern BOOL Old_DTD; typedef enum { close_NO = 0, @@ -716,12 +864,13 @@ PRIVATE canclose_t can_close ARGS2( return ((stacked_tag->tagclass & new_tag->canclose) ? close_error : close_NO); } + PRIVATE void do_close_stacked ARGS1( HTStream *, context) { HTElement * stacked = context->element_stack; if (!stacked) - return; /* stack was empty */ + return; /* stack was empty */ if (context->inSELECT && !strcasecomp(stacked->tag->name, "SELECT")) { context->inSELECT = FALSE; } @@ -732,6 +881,7 @@ PRIVATE void do_close_stacked ARGS1( context->element_stack = stacked->next; FREE(stacked); } + PRIVATE int is_on_stack ARGS2( HTStream *, context, HTTag *, old_tag) @@ -759,23 +909,21 @@ PRIVATE void end_element ARGS2( canclose_t canclose_check = close_valid; int stackpos = is_on_stack(context, old_tag); - if (New_DTD) { + if (!Old_DTD) { while (canclose_check != close_NO && context->element_stack && (stackpos > 1 || (!extra_action_taken && stackpos == 0))) { canclose_check = can_close(old_tag, context->element_stack->tag); if (canclose_check != close_NO) { - if (TRACE) - fprintf(stderr, "SGML: End \t<- %s end \n", + CTRACE(tfp, "SGML: End \t<- %s end \n", context->element_stack->tag->name, - canclose_check == close_valid ? "supplied," : "forced by", + canclose_check == close_valid ? "supplied," : "***forced by", old_tag->name); do_close_stacked(context); extra_action_taken = YES; stackpos = is_on_stack(context, old_tag); } else { - if (TRACE) - fprintf(stderr, "SGML: Still open %s \t<- invalid end \n", + CTRACE(tfp, "SGML: Still open %s \t<- ***invalid end \n", context->element_stack->tag->name, old_tag->name); return; @@ -783,8 +931,7 @@ PRIVATE void end_element ARGS2( } if (stackpos == 0 && old_tag->contents != SGML_EMPTY) { - if (TRACE) - fprintf(stderr, "SGML: Still open %s, no open %s for \n", + CTRACE(tfp, "SGML: Still open %s, ***no open %s for \n", context->element_stack ? context->element_stack->tag->name : "none", old_tag->name, @@ -792,8 +939,7 @@ PRIVATE void end_element ARGS2( return; } if (stackpos > 1) { - if (TRACE) - fprintf(stderr, "SGML: Nesting <%s>...<%s> \t<- invalid end \n", + CTRACE(tfp, "SGML: Nesting <%s>...<%s> \t<- ***invalid end \n", old_tag->name, context->element_stack->tag->name, old_tag->name); @@ -818,43 +964,37 @@ PRIVATE void end_element ARGS2( /* ** Ignore the end tag. - FM */ - if (TRACE) { - fprintf(stderr, - "SGML: Ignoring end tag in SELECT block.\n", + CTRACE(tfp, "SGML: ***Ignoring end tag in SELECT block.\n", old_tag->name); - } return; } } /* ** Handle the end tag. - FM */ - if (TRACE) - fprintf(stderr, "SGML: End \n", old_tag->name); + CTRACE(tfp, "SGML: End \n", old_tag->name); if (old_tag->contents == SGML_EMPTY) { - if (TRACE) - fprintf(stderr, "SGML: Illegal end tag found.\n", - old_tag->name); + CTRACE(tfp, "SGML: ***Illegal end tag found.\n", + old_tag->name); return; } #ifdef WIND_DOWN_STACK - while (context->element_stack) { /* Loop is error path only */ + while (context->element_stack) /* Loop is error path only */ #else - if (context->element_stack) { /* Substitute and remove one stack element */ + if (context->element_stack) /* Substitute and remove one stack element */ #endif /* WIND_DOWN_STACK */ + { HTElement * N = context->element_stack; HTTag * t = N->tag; if (old_tag != t) { /* Mismatch: syntax error */ if (context->element_stack->next) { /* This is not the last level */ - if (TRACE) fprintf(stderr, - "SGML: Found when expecting . assumed.\n", - old_tag->name, t->name, t->name); + CTRACE(tfp, "SGML: Found when expecting . ***assumed.\n", + old_tag->name, t->name, t->name); } else { /* last level */ - if (TRACE) fprintf(stderr, - "SGML: Found when expecting . Ignored.\n", - old_tag->name, t->name, old_tag->name); - return; /* Ignore */ + CTRACE(tfp, "SGML: Found when expecting . ***Ignored.\n", + old_tag->name, t->name, old_tag->name); + return; /* Ignore */ } } @@ -872,9 +1012,8 @@ PRIVATE void end_element ARGS2( /* Syntax error path only */ } - if (TRACE) - fprintf(stderr, "SGML: Extra end tag found and ignored.\n", - old_tag->name); + CTRACE(tfp, "SGML: Extra end tag found and ignored.\n", + old_tag->name); } @@ -884,6 +1023,10 @@ PRIVATE void start_element ARGS1( HTStream *, context) { HTTag * new_tag = context->current_tag; +#if OPT1 + HTMLElement e = new_tag - context->dtd->tags; + BOOL ok = FALSE; +#endif #ifdef EXTENDED_HTMLDTD @@ -892,7 +1035,7 @@ PRIVATE void start_element ARGS1( BOOL extra_action_taken = NO; canclose_t canclose_check = close_valid; - if (New_DTD) { + if (!Old_DTD) { while (context->element_stack && (canclose_check == close_valid || (canclose_check == close_error && @@ -901,18 +1044,16 @@ PRIVATE void start_element ARGS1( direct_container))) { canclose_check = can_close(new_tag, context->element_stack->tag); if (canclose_check != close_NO) { - if (TRACE) - fprintf(stderr, "SGML: End \t<- %s start <%s>\n", + CTRACE(tfp, "SGML: End \t<- %s start <%s>\n", context->element_stack->tag->name, - canclose_check == close_valid ? "supplied," : "forced by", + canclose_check == close_valid ? "supplied," : "***forced by", new_tag->name); do_close_stacked(context); extra_action_taken = YES; if (canclose_check == close_error) direct_container = NO; } else { - if (TRACE) - fprintf(stderr, "SGML: Still open %s \t<- invalid start <%s>\n", + CTRACE(tfp, "SGML: Still open %s \t<- ***invalid start <%s>\n", context->element_stack->tag->name, new_tag->name); } @@ -921,8 +1062,7 @@ PRIVATE void start_element ARGS1( (context->element_stack->tag->flags & Tgf_strict) && !(valid = element_valid_within(new_tag, context->element_stack->tag, direct_container))) { - if (TRACE) - fprintf(stderr, "SGML: Still open %s \t<- ignoring start <%s>\n", + CTRACE(tfp, "SGML: Still open %s \t<- ***ignoring start <%s>\n", context->element_stack->tag->name, new_tag->name); return; @@ -935,8 +1075,7 @@ PRIVATE void start_element ARGS1( for (; i< new_tag->number_of_attributes && !has_attributes; i++) has_attributes = context->present[i]; if (!has_attributes) { - if (TRACE) - fprintf(stderr, "SGML: Still open %s, converting invalid <%s> to \n", + CTRACE(tfp, "SGML: Still open %s, ***converting invalid <%s> to \n", context->element_stack->tag->name, new_tag->name, new_tag->name); @@ -951,8 +1090,7 @@ PRIVATE void start_element ARGS1( new_tag, context->element_stack->tag, direct_container))) { - if (TRACE) - fprintf(stderr, "SGML: Still open %s \t<- invalid start <%s>\n", + CTRACE(tfp, "SGML: Still open %s \t<- ***invalid start <%s>\n", context->element_stack->tag->name, new_tag->name); } @@ -986,6 +1124,7 @@ PRIVATE void start_element ARGS1( /* ** Ugh, it is not an OPTION. - FM */ +#if !OPT1 if (!strcasecomp(new_tag->name, "INPUT") || !strcasecomp(new_tag->name, "TEXTAREA") || !strcasecomp(new_tag->name, "SELECT") || @@ -994,22 +1133,30 @@ PRIVATE void start_element ARGS1( !strcasecomp(new_tag->name, "LABEL") || !strcasecomp(new_tag->name, "LEGEND") || !strcasecomp(new_tag->name, "FORM")) { +#else + switch (e) { + case HTML_INPUT: case HTML_TEXTAREA: case HTML_SELECT: + case HTML_BUTTON: case HTML_FIELDSET: case HTML_LABEL: + case HTML_LEGEND: case HTML_FORM: + ok = TRUE; + break; + default: + break; + } + if (ok) { +#endif /* ** 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", + CTRACE(tfp, "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", + CTRACE(tfp, "SGML: ***Ignoring start tag <%s> in SELECT block.\n", new_tag->name); return; } @@ -1018,8 +1165,7 @@ PRIVATE void start_element ARGS1( /* ** Handle the start tag. - FM */ - if (TRACE) - fprintf(stderr, "SGML: Start <%s>\n", new_tag->name); + CTRACE(tfp, "SGML: Start <%s>\n", new_tag->name); (*context->actions->start_element)( context->target, new_tag - context->dtd->tags, @@ -1027,14 +1173,18 @@ PRIVATE void start_element ARGS1( (CONST char**) context->value, /* coerce type for think c */ context->current_tag_charset, (char **)&context->include); - if (new_tag->contents != SGML_EMPTY) { /* i.e. tag not empty */ + if (new_tag->contents != SGML_EMPTY) { /* i.e., tag not empty */ HTElement * N = (HTElement *)malloc(sizeof(HTElement)); if (N == NULL) outofmem(__FILE__, "start_element"); N->next = context->element_stack; N->tag = new_tag; context->element_stack = N; +#if !OPT } else if (!strcasecomp(new_tag->name, "META")) { +#else + } else if (e == HTML_META ) { +#endif /* ** Check for result of META tag. - KW & FM */ @@ -1047,7 +1197,7 @@ PRIVATE void start_element ARGS1( ** ------------------------ ** ** On entry, -** dtd points to dtd structire including valid tag list +** dtd points to dtd structure including valid tag list ** string points to name of tag in question ** ** On exit, @@ -1060,11 +1210,12 @@ PUBLIC HTTag * SGMLFindTag ARGS2( CONST char *, string) { int high, low, i, diff; + for (low = 0, high=dtd->number_of_tags; high > low; - diff < 0 ? (low = i+1) : (high = i)) { /* Binary search */ + diff < 0 ? (low = i+1) : (high = i)) { /* Binary search */ i = (low + (high-low)/2); - diff = strcasecomp(dtd->tags[i].name, string); /* Case insensitive */ + diff = AS_casecomp(dtd->tags[i].name, string); /* Case insensitive */ if (diff == 0) { /* success: found it */ return &dtd->tags[i]; } @@ -1073,7 +1224,7 @@ PUBLIC HTTag * SGMLFindTag ARGS2( /* ** Unrecognized, but may be valid. - KW */ - return (HTTag *)&HTTag_unrecognized; + return &HTTag_unrecognized; } return NULL; } @@ -1126,6 +1277,10 @@ PRIVATE void SGML_free ARGS1( for (i = 0; i < MAX_ATTRIBUTES; i++) FREE(context->value[i]); FREE(context); + +#ifdef USE_PSRC + sgml_in_psrc_was_initialized =FALSE; +#endif } PRIVATE void SGML_abort ARGS2( @@ -1164,6 +1319,11 @@ PRIVATE void SGML_abort ARGS2( for (i = 0; i < MAX_ATTRIBUTES; i++) FREE(context->value[i]); FREE(context); + +#ifdef USE_PSRC + sgml_in_psrc_was_initialized =FALSE; +#endif + } @@ -1199,7 +1359,7 @@ PRIVATE void SGML_character ARGS2( CONST char * EntityName; char * p; BOOLEAN chk; /* Helps (?) walk through all the else ifs... */ - UCode_t clong, uck; /* Enough bits for UCS4 ... */ + UCode_t clong, uck = 0; /* Enough bits for UCS4 ... */ char c; char saved_char_in = '\0'; @@ -1219,12 +1379,12 @@ PRIVATE void SGML_character ARGS2( ** Incomplete characters silently ignored. ** From Linux kernel's console.c. - KW */ - if ((unsigned char)c > 127) { + if (TOASCII((unsigned char)c) > 127) { /* S/390 -- gil -- 0710 */ /* ** We have an octet from a multibyte character. - FM */ - if (context->utf_count > 0 && (c & 0xc0) == 0x80) { - context->utf_char = (context->utf_char << 6) | (c & 0x3f); + if (context->utf_count > 0 && (TOASCII(c) & 0xc0) == 0x80) { + context->utf_char = (context->utf_char << 6) | (TOASCII(c) & 0x3f); context->utf_count--; *(context->utf_buf_p) = c; (context->utf_buf_p)++; @@ -1290,7 +1450,7 @@ PRIVATE void SGML_character ARGS2( *(context->utf_buf_p) = '\0'; /* goto top; */ } - } + } /* end of context->T.decode_utf8 S/390 -- gil -- 0726 */ #ifdef NOTDEFINED /* @@ -1308,8 +1468,8 @@ PRIVATE void SGML_character ARGS2( ** to Unicode, try that now. - FM */ if (context->T.trans_to_uni && - ((unsign_c >= 127) || - (unsign_c < 32 && unsign_c != 0 && + ((TOASCII(unsign_c) >= LYlowest_eightbit[context->inUCLYhndl]) || /* S/390 -- gil -- 0744 */ + (unsign_c < ' ' && unsign_c != 0 && context->T.trans_C0_to_uni))) { /* ** Convert the octet to Unicode. - FM @@ -1322,13 +1482,13 @@ PRIVATE void SGML_character ARGS2( } } goto top1; - } else if (unsign_c < 32 && unsign_c != 0 && + } else if (unsign_c < ' ' && unsign_c != 0 && /* S/390 -- gil -- 0768 */ context->T.trans_C0_to_uni) { /* ** This else if may be too ugly to keep. - KW */ if (context->T.trans_from_uni && - (((clong = UCTransToUni(c, context->inUCLYhndl)) >= 32) || + (((clong = UCTransToUni(c, context->inUCLYhndl)) >= ' ') || (context->T.transp && (clong = UCTransToUni(c, context->inUCLYhndl)) > 0))) { saved_char_in = c; @@ -1364,7 +1524,7 @@ PRIVATE void SGML_character ARGS2( } goto top0a; } /* Next line end of ugly stuff for C0. - KW */ - } else { + } else { /* end of context->T.trans_to_uni S/390 -- gil -- 0791 */ goto top0a; } @@ -1376,7 +1536,7 @@ PRIVATE void SGML_character ARGS2( /* ** We jump up to here from below if we have ** stuff in the recover, insert, or csi buffers -** to process. We zero saved_char_in, in effect +** to process. We zero saved_char_in, in effect ** as a flag that the octet in not that of the ** actual call to this function. This may be OK ** for now, for the stuff this function adds to @@ -1403,7 +1563,7 @@ top0a: ** which unsign_c has been defined), and from below ** when we are recycling a character (e.g., because ** it terminated an entity but is not the standard -** semi-colon). The chararcter will already have +** semi-colon). The character will already have ** been put through the Unicode conversions. - FM */ top1: @@ -1411,8 +1571,11 @@ top1: ** Ignore low ISO 646 7-bit control characters ** if HTCJK is not set. - FM */ - if (unsign_c < 32 && - c != 9 && c != 10 && c != 13 && + /* + ** Works for both ASCII and EBCDIC. -- gil + */ /* S/390 -- gil -- 0811 */ + if (TOASCII(unsign_c) < 32 && + c != '\t' && c != '\n' && c != '\r' && HTCJK == NOCJK) return; @@ -1422,7 +1585,7 @@ top1: */ #define PASSHICTRL (context->T.transp || \ unsign_c >= LYlowest_eightbit[context->inUCLYhndl]) - if (c == 127 && + if (TOASCII(c) == 127 && /* S/390 -- gil -- 0830 */ !(PASSHICTRL || HTCJK != NOCJK)) return; @@ -1430,7 +1593,7 @@ top1: ** Ignore 8-bit control characters 128 - 159 if ** neither HTPassHighCtrlRaw nor HTCJK is set. - FM */ - if (unsign_c > 127 && unsign_c < 160 && + if (TOASCII(unsign_c) > 127 && TOASCII(unsign_c) < 160 && /* S/390 -- gil -- 0847 */ !(PASSHICTRL || HTCJK != NOCJK)) return; @@ -1443,7 +1606,7 @@ top1: /* ** Note that if we don't have a CJK input, then this ** is not the second byte of a CJK di-byte, and we're - ** trashing the input. That's why 8-bit characters + ** trashing the input. That's why 8-bit characters ** followed by, for example, '<' can cause the tag to ** be treated as text, not markup. We could try to deal ** with it by holding each first byte and then checking @@ -1455,7 +1618,7 @@ top1: break; case S_text: - if (HTCJK != NOCJK && (c & 0200) != 0) { + if (HTCJK != NOCJK && (TOASCII(c) & 0200) != 0) { /* S/390 -- gil -- 0864 */ /* ** Setting up for Kanji multibyte handling (based on ** Takuya ASADA's (asada@three-a.co.jp) CJK Lynx). @@ -1469,7 +1632,7 @@ top1: context->state = S_in_kanji; PUTC(c); break; - } else if (HTCJK != NOCJK && c == '\033') { + } else if (HTCJK != NOCJK && TOASCII(c) == '\033') { /* S/390 -- gil -- 0881 */ /* ** Setting up for CJK escape sequence handling (based on ** Takuya ASADA's (asada@three-a.co.jp) CJK Lynx). - FM @@ -1478,10 +1641,11 @@ top1: PUTC(c); break; } - if (c == '&' && unsign_c < 127 && + if (c == '&' && TOASCII(unsign_c) < 127 && /* S/390 -- gil -- 0898 */ (!context->element_stack || (context->element_stack->tag && (context->element_stack->tag->contents == SGML_MIXED || + context->element_stack->tag->contents == SGML_ELEMENT || context->element_stack->tag->contents == SGML_PCDATA || context->element_stack->tag->contents == SGML_RCDATA)))) { /* @@ -1489,7 +1653,7 @@ top1: */ string->size = 0; context->state = S_ero; - } else if (c == '<' && unsign_c < 127) { + } else if (c == '<' && TOASCII(unsign_c) < 127) { /* S/390 -- gil -- 0915 */ /* ** Setting up for possible tag. - FM */ @@ -1504,14 +1668,14 @@ top1: ** Convert 160 (nbsp) to Lynx special character if ** neither HTPassHighCtrlRaw nor HTCJK is set. - FM */ - } else if (unsign_c == 160 && + } else if (unsign_c == CH_NBSP && /* S/390 -- gil -- 0932 */ !(PASS8859SPECL || HTCJK != NOCJK)) { PUTC(HT_NON_BREAK_SPACE); /* ** Convert 173 (shy) to Lynx special character if ** neither HTPassHighCtrlRaw nor HTCJK is set. - FM */ - } else if (unsign_c == 173 && + } else if (unsign_c == CH_SHY && /* S/390 -- gil -- 0949 */ !(PASS8859SPECL || HTCJK != NOCJK)) { PUTC(LY_SOFT_HYPHEN); /* @@ -1527,17 +1691,14 @@ top1: PUTC(saved_char_in); saved_char_in = '\0'; /****************************************************************** - * I. LATIN-1 OR UCS2 TO DISPLAY CHARSET + * I. LATIN-1 OR UCS2 TO DISPLAY CHARSET ******************************************************************/ - } else if ((chk = (context->T.trans_from_uni && unsign_c >= 160)) && + } else if ((chk = (context->T.trans_from_uni && TOASCII(unsign_c) >= 160)) && /* S/390 -- gil -- 0968 */ (uck = UCTransUniChar(unsign_c, - context->outUCLYhndl)) >= 32 && + context->outUCLYhndl)) >= ' ' && uck < 256) { - if (TRACE) { - fprintf(stderr, - "UCTransUniChar returned 0x%.2lX:'%c'.\n", + CTRACE(tfp, "UCTransUniChar returned 0x%.2lX:'%c'.\n", uck, FROMASCII((char)uck)); - } /* ** We got one octet from the conversions, so use it. - FM */ @@ -1554,7 +1715,7 @@ top1: 0) >= 0)) { /* ** Got a replacement string. - ** No further tests for valididy - assume that whoever + ** No further tests for validity - assume that whoever ** defined replacement strings knew what she was doing. - KW */ for (p = replace_buf; *p; p++) @@ -1565,24 +1726,45 @@ top1: } else if (context->T.output_utf8 && PUTUTF8(clong)) { ; /* do nothing more */ /* - ** If it's any other (> 160) 8-bit chararcter, and + ** If it's any other (> 160) 8-bit character, and ** we have not set HTPassEightBitRaw nor HTCJK, nor ** have the "ISO Latin 1" character set selected, ** back translate for our character set. - FM */ +#define IncludesLatin1Enc \ + (context->outUCLYhndl == LATIN1 || \ + (context->outUCI && \ + (context->outUCI->enc & (UCT_CP_SUPERSETOF_LAT1)))) + #define PASSHI8BIT (HTPassEightBitRaw || \ (context->T.do_8bitraw && !context->T.trans_from_uni)) + } else if (unsign_c > 160 && unsign_c < 256 && !(PASSHI8BIT || HTCJK != NOCJK) && !IncludesLatin1Enc) { int i; +#ifdef USE_PSRC + int psrc_view_backup = 0; +#endif string->size = 0; EntityName = HTMLGetEntityName((int)(unsign_c - 160)); for (i = 0; EntityName[i]; i++) HTChunkPutc(string, EntityName[i]); HTChunkTerminate(string); +#ifdef USE_PSRC + /* we need to disable it temporary*/ + if (psrc_view) { + psrc_view_backup =1; psrc_view =0; + } +#endif handle_entity(context, '\0'); +#ifdef USE_PSRC + /* we need to disable it temporary*/ + if (psrc_view_backup) + psrc_view = TRUE; +#endif + string->size = 0; if (!FoundEntity) PUTC(';'); @@ -1590,7 +1772,7 @@ top1: ** If we get to here and have an ASCII char, ** pass the character. - KW */ - } else if (unsign_c < 127 && unsign_c > 0) { + } else if (TOASCII(unsign_c) < 127 && unsign_c > 0) { /* S/390 -- gil -- 0987 */ PUTC(c); /* ** If we get to here, and should have translated, @@ -1622,7 +1804,7 @@ top1: ** If we don't actually want the character, ** make it safe and output that now. - FM */ - } else if ((unsigned char)c < + } else if (TOASCII((unsigned char)c) < /* S/390 -- gil -- 0997 */ LYlowest_eightbit[context->outUCLYhndl] || (context->T.trans_from_uni && !HTPassEightBitRaw)) { #ifdef NOTUSED_FOTEMODS @@ -1636,11 +1818,11 @@ top1: UCGetLYhndl_byMIME("us-ascii"))) && (uck = UCTransUniChar(unsign_c, UCGetLYhndl_byMIME("us-ascii"))) - >= 32 && uck < 127) { + >= ' ' && TOASCII(uck) < 127) { /* S/390 -- gil -- 1008 */ /* ** Got an ASCII character (yippey). - FM */ - PUTC(((char)(uck & 0xff))); + PUTC(((char)FROMASCII(TOASCII(uck) & 0xff))); } else if ((chk && uck == -4) && (uck = UCTransUniCharStr(replace_buf, 60, clong, @@ -1652,14 +1834,17 @@ top1: for (p = replace_buf; *p; p++) PUTC(*p); } else { +#endif /* NOTUSED_FOTEMODS */ /* ** Out of luck, so use the UHHH notation (ugh). - FM */ -#endif /* NOTUSED_FOTEMODS */ - sprintf(replace_buf, "U%.2lX", unsign_c); + /* S/390 -- gil -- 1018 */ + /* do not print UHHH for now + sprintf(replace_buf, "U%.2lX", TOASCII(unsign_c)); for (p = replace_buf; *p; p++) { PUTC(*p); } + */ #ifdef NOTUSED_FOTEMODS } #endif /* NOTUSED_FOTEMODS */ @@ -1675,7 +1860,7 @@ top1: ** In litteral mode, waits only for specific end tag (for ** compatibility with old servers, and for Lynx). - FM */ - case S_litteral: + case S_litteral: /*PSRC:this case not understood completely by HV, not done*/ HTChunkPutc(string, c); if (TOUPPER(c) != ((string->size == 1) ? '/' : @@ -1697,10 +1882,11 @@ top1: ** If Mismatch: recover string. */ PUTC('<'); - for (i = 0; i < string->size; i++) /* recover */ + for (i = 0; i < string->size-1; i++) /* recover, except last c */ PUTC(string->data[i]); string->size = 0; context->state = S_text; + goto top1; /* to recover last c */ } break; @@ -1721,7 +1907,7 @@ top1: ** Handle possible named entity. */ case S_entity: - if (unsign_c < 127 && (string->size ? + if (TOASCII(unsign_c) < 127 && (string->size ? /* S/390 -- gil -- 1029 */ isalnum((unsigned char)c) : isalpha((unsigned char)c))) { /* ** Accept valid ASCII character. - FM @@ -1732,7 +1918,15 @@ top1: ** It was an ampersand that's just text, so output ** the ampersand and recycle this character. - FM */ +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(badseq); +#endif PUTC('&'); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTOP(badseq); +#endif context->state = S_text; goto top1; } else { @@ -1740,6 +1934,11 @@ top1: ** Terminate entity name and try to handle it. - FM */ HTChunkTerminate(string); +#ifdef USE_PSRC + entity_string = string->data; +#endif + /* S/390 -- gil -- 1039 */ + /* CTRACE(tfp, "%s: %d: %s\n", __FILE__, __LINE__, string->data); */ if (!strcmp(string->data, "zwnj") && (!context->element_stack || (context->element_stack->tag && @@ -1749,10 +1948,8 @@ top1: */ char temp[8]; - if (TRACE) { - fprintf(stderr, - "SGML_character: Handling 'zwnj' entity as 'WBR' element.\n"); - } + CTRACE(tfp, "SGML_character: Handling 'zwnj' entity as 'WBR' element.\n"); + if (c != ';') { sprintf(temp, "%c", c); } else { @@ -1778,6 +1975,13 @@ top1: ** via handle_entity(), or if the terminator is ** not the "standard" semi-colon for HTML. - FM */ +#ifdef USE_PSRC + if (psrc_view && FoundEntity && c == ';') { + HTMLSRC_apply_markup(context,HTL_entity, START); + PUTC(c); + HTMLSRC_apply_markup(context,HTL_entity, STOP); + } +#endif if (!FoundEntity || c != ';') goto top1; } @@ -1787,10 +1991,10 @@ top1: ** Check for a numeric entity. */ case S_cro: - if (unsign_c < 127 && TOLOWER((unsigned char)c) == 'x') { + if (TOASCII(unsign_c) < 127 && TOLOWER((unsigned char)c) == 'x') { /* S/390 -- gil -- 1060 */ context->isHex = TRUE; context->state = S_incro; - } else if (unsign_c < 127 && isdigit((unsigned char)c)) { + } else if (TOASCII(unsign_c) < 127 && isdigit((unsigned char)c)) { /* ** Accept only valid ASCII digits. - FM */ @@ -1802,8 +2006,16 @@ top1: ** No 'x' or digit following the "&#" so recover ** them and recycle the character. - FM */ +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(badseq); +#endif PUTC('&'); PUTC('#'); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTOP(badseq); +#endif context->state = S_text; goto top1; } @@ -1813,7 +2025,9 @@ top1: ** Handle a numeric entity. */ case S_incro: - if ((unsign_c < 127) && + /* S/390 -- gil -- 1075 */ /* CTRACE(tfp, "%s: %d: numeric %d %d\n", + __FILE__, __LINE__, unsign_c, c); */ + if ((TOASCII(unsign_c) < 127) && (context->isHex ? isxdigit((unsigned char)c) : isdigit((unsigned char)c))) { /* @@ -1825,9 +2039,17 @@ top1: ** No hex digit following the "&#x" so recover ** them and recycle the character. - FM */ +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(badseq); +#endif PUTC('&'); PUTC('#'); PUTC('x'); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTOP(badseq); +#endif context->isHex = FALSE; context->state = S_text; goto top1; @@ -1838,10 +2060,14 @@ top1: UCode_t code; int i; HTChunkTerminate(string); +#ifdef USE_PSRC + entity_string = string->data; +#endif if ((context->isHex ? sscanf(string->data, "%lx", &code) : sscanf(string->data, "%ld", &code)) == 1) { +/* =============== work in ASCII below here =============== S/390 -- gil -- 1092 */ if ((code == 1) || - (code > 129 && code < 156)) { + (code > 127 && code < 156)) { /* ** Assume these are Microsoft code points, ** inflicted on us by FrontPage. - FM @@ -1857,6 +2083,12 @@ top1: */ code = 0x263a; break; + case 128: + /* + ** EURO currency sign + */ + code = 0x20ac; + break; case 130: /* ** SINGLE LOW-9 QUOTATION MARK (sbquo) @@ -1981,10 +2213,8 @@ top1: */ char temp[8]; - if (TRACE) { - fprintf(stderr, - "SGML_character: Handling '8204' (zwnj) reference as 'WBR' element.\n"); - } + CTRACE(tfp, "SGML_character: Handling '8204' (zwnj) reference as 'WBR' element.\n"); + /* ** Include the terminator if it is not ** the standard semi-colon. - FM @@ -2013,6 +2243,16 @@ top1: ** We handled the value as a special character, ** so recycle the terminator or break. - FM */ +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(entity); + PUTS( (context->isHex ? "&#x" : "&#") ); + PUTS(entity_string); + if (c == ';') + PUTC(';'); + PSRCSTOP(entity); + } +#endif string->size = 0; context->isHex = FALSE; context->state = S_text; @@ -2028,7 +2268,19 @@ top1: uck < 256 && (uck < 127 || uck >= LYlowest_eightbit[context->outUCLYhndl])) { +#ifdef USE_PSRC + if (!psrc_view) { +#endif PUTC(FROMASCII((char)uck)); +#ifdef USE_PSRC + } else { + PSRCSTART(entity); + PUTS( (context->isHex ? "&#x" : "&#") ); + PUTS(entity_string); + PUTC(';'); + PSRCSTOP(entity); + } +#endif } else if ((uck == -4 || (context->T.repl_translated_C0 && uck > 0 && uck < 32)) && @@ -2038,6 +2290,15 @@ top1: (uck = UCTransUniCharStr(replace_buf, 60, code, context->outUCLYhndl, 0) >= 0)) { +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(entity); + PUTS( (context->isHex ? "&#x" : "&#") ); + PUTS(entity_string); + PUTC(';'); + PSRCSTOP(entity); + } else +#endif for (p = replace_buf; *p; p++) { PUTC(*p); } @@ -2058,11 +2319,21 @@ top1: UCGetLYhndl_byMIME("us-ascii"))) && (uck = UCTransUniChar(code, UCGetLYhndl_byMIME("us-ascii"))) - >= 32 && uck < 127) { + >= ' ' && uck < 127) { /* ** Got an ASCII character (yippey). - FM */ - PUTC(((char)(uck & 0xff))); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(entity); + PUTS( (context->isHex ? "&#x" : "&#") ); + PUTS(entity_string); + PUTC(';'); + PSRCSTOP(entity); + } else +#endif + PUTC(((char)FROMASCII(uck & 0xff))); +/* =============== work in ASCII above here =============== S/390 -- gil -- 1118 */ } else if ((chk && uck == -4) && (uck = UCTransUniCharStr(replace_buf, 60, code, @@ -2071,8 +2342,18 @@ top1: /* ** Got a replacement string (yippey). - FM */ +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(entity); + PUTS( (context->isHex ? "&#x" : "&#") ); + PUTS(entity_string); + PUTC(';'); + PSRCSTOP(entity); + } else +#endif for (p = replace_buf; *p; p++) PUTC(*p); +#endif /* NOTUSED_FOTEMODS */ /* ** Ignore 8205 (zwj), ** 8206 (lrm), and 8207 (rln), if we get to here. - FM @@ -2085,18 +2366,27 @@ top1: LYstrncpy(replace_buf, string->data, (string->size < 64 ? string->size : 63)); - fprintf(stderr, + fprintf(tfp, "SGML_character: Ignoring '%s%s'.\n", (context->isHex ? "&#x" : "&#"), replace_buf); } +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(badseq); + PUTS( (context->isHex ? "&#x" : "&#") ); + PUTS(entity_string); + if (c == ';') + PUTC(';'); + PSRCSTOP(badseq); + } +#endif string->size = 0; context->isHex = FALSE; context->state = S_text; if (c != ';') goto top1; break; -#endif /* NOTUSED_FOTEMODS */ /* ** Show the numeric entity if we get to here ** and the value: @@ -2111,18 +2401,23 @@ top1: ** - FM */ } else if ((code > 255) || - (code < 32 && - code != 9 && code != 10 && code != 13 && + (code < ' ' && /* S/390 -- gil -- 1140 */ + code != '\t' && code != '\n' && code != '\r' && HTCJK == NOCJK) || - (code == 127 && + (TOASCII(code) == 127 && !(HTPassHighCtrlRaw || HTCJK != NOCJK)) || - (code > 127 && code < 160 && + (TOASCII(code) > 127 && code < 160 && !HTPassHighCtrlNum)) { /* - ** Unhandled or illegal value. Recover the + ** Unhandled or illegal value. Recover the ** "&#" or "&#x" and digit(s), and recycle ** the terminator. - FM */ +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(badseq); + } +#endif PUTC('&'); PUTC('#'); if (context->isHex) { @@ -2132,16 +2427,30 @@ top1: string->size--; for (i = 0; i < string->size; i++) /* recover */ PUTC(string->data[i]); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTOP(badseq); + } +#endif string->size = 0; context->isHex = FALSE; context->state = S_text; goto top1; - } else if (code < 161 || + } else if (TOASCII(code) < 161 || /* S/390 -- gil -- 1162 */ HTPassEightBitNum || IncludesLatin1Enc) { /* ** No conversion needed. - FM */ +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(entity); + PUTS( (context->isHex ? "&#x" : "&#") ); + PUTS(entity_string); + PUTC(';'); + PSRCSTOP(entity); + } else +#endif PUTC(FROMASCII((char)code)); } else { /* @@ -2167,6 +2476,10 @@ top1: ** Our conversion failed, so recover the "&#" ** and digit(s), and recycle the terminator. - FM */ +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(badseq); +#endif PUTC('&'); PUTC('#'); if (context->isHex) { @@ -2176,6 +2489,10 @@ top1: string->size--; for (i = 0; i < string->size; i++) /* recover */ PUTC(string->data[i]); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTOP(badseq); +#endif string->size = 0; context->isHex = FALSE; context->state = S_text; @@ -2205,8 +2522,16 @@ top1: string->size--; HTChunkPutc(string, c); HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(badseq); +#endif PUTC('&'); PUTC('#'); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTOP(badseq); +#endif if (context->isHex) { PUTC('x'); context->isHex = FALSE; @@ -2228,8 +2553,8 @@ top1: /* ** Tag */ - case S_tag: /* new tag */ - if (unsign_c < 127 && (string->size ? + case S_tag: /* new tag */ + if (TOASCII(unsign_c) < 127 && (string->size ? /* S/390 -- gil -- 1179 */ isalnum((unsigned char)c) : isalpha((unsigned char)c))) { /* ** Add valid ASCII character. - FM @@ -2247,7 +2572,7 @@ top1: HTChunkPutc(string, c); break; } else if (!string->size && - (unsign_c <= 160 && + (TOASCII(unsign_c) <= 160 && /* S/390 -- gil -- 1196 */ (c != '/' && c != '?' && c != '_' && c != ':'))) { /* ** '<' must be followed by an ASCII letter to be a valid @@ -2258,7 +2583,15 @@ top1: ** So recover the '<' and following character as data. - FM & KW */ context->state = S_text; +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(badseq); +#endif PUTC('<'); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTOP(badseq); +#endif goto top1; } else { /* End of tag name */ /* @@ -2266,9 +2599,8 @@ top1: */ HTTag * t; if (c == '/') { - if (TRACE) - if (string->size!=0) - fprintf(stderr,"SGML: `<%s/' found!\n", string->data); + if (string->size != 0) + CTRACE(tfp,"SGML: `<%s/' found!\n", string->data); context->state = S_end; break; } @@ -2282,44 +2614,107 @@ top1: ** so we display it and the URL (Lynxism 8-). - FM */ int i; +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(badseq); +#endif PUTC('<'); for (i = 0; i < 3; i++) /* recover */ PUTC(string->data[i]); PUTC(c); - if (TRACE) - fprintf(stderr, "SGML: Treating <%s%c as text\n", +#ifdef USE_PSRC + if (psrc_view) + PSRCSTOP(badseq); +#endif + CTRACE(tfp, "SGML: Treating <%s%c as text\n", string->data, c); string->size = 0; context->state = S_text; break; } else if (!t) { - if (TRACE) - fprintf(stderr, "SGML: *** Invalid element %s\n", + CTRACE(tfp, "SGML: *** Invalid element %s\n", string->data); + +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(abracket);PUTC('<');PSRCSTOP(abracket); + PSRCSTART(badtag); + if (tagname_transform != 1) { + if (tagname_transform == 0) + LYLowerCase(string->data); + else + LYUpperCase(string->data); + } + PUTS(string->data); + + if (c == '>' ) { + PSRCSTOP(badtag); + PSRCSTART(abracket);PUTC('>');PSRCSTOP(abracket); + } + } +#endif context->state = (c == '>') ? S_text : S_junk_tag; break; } else if (t == context->unknown_tag) { - if (TRACE) - fprintf(stderr, "SGML: *** Unknown element %s\n", + CTRACE(tfp, "SGML: *** Unknown element %s\n", string->data); /* ** Fall through and treat like valid ** tag for attribute parsing. - KW */ + } context->current_tag = t; /* ** Clear out attributes. */ +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(abracket);PUTC('<');PSRCSTOP(abracket); + if (t != context->unknown_tag) + PSRCSTART(tag); + else + PSRCSTART(badtag); + if (tagname_transform != 1) { + if (tagname_transform == 0) + LYLowerCase(string->data); + else + LYUpperCase(string->data); + } + PUTS(string->data); + } + if (!psrc_view) /*don't waste time */ +#endif { +#if !OPT1 int i; for (i = 0; i < context->current_tag->number_of_attributes; i++) context->present[i] = NO; +#else + memset( (void*)context->present, 0 , sizeof(BOOL)* + context->current_tag->number_of_attributes); +#endif } + string->size = 0; context->current_attribute_number = INVALID; - +#ifdef USE_PSRC + if (psrc_view) { + if (c == '>') { + if (t != context->unknown_tag) + PSRCSTOP(tag); + else + PSRCSTOP(badtag); + PSRCSTART(abracket); + PUTC('>'); + PSRCSTOP(abracket); + context->state = S_text; + } else { + context->state = S_tag_gap; + } + } else +#endif if (c == '>') { if (context->current_tag->name) start_element(context); @@ -2369,6 +2764,15 @@ top1: ** Try to handle identifier. - FM */ HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(sgmlspecial); + PUTC('<'); + PUTS(string->data); + PUTC('>'); + PSRCSTOP(sgmlspecial); + } else +#endif handle_identifier(context); string->size = 0; context->state = S_text; @@ -2429,6 +2833,15 @@ top1: */ if (c == '>') { HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(comm); + PUTC('<'); + PUTS(string->data); + PUTC('>'); + PSRCSTOP(comm); + } else +#endif handle_comment(context); string->size = 0; context->end_comment = FALSE; @@ -2462,6 +2875,15 @@ top1: ** Terminate and handle the comment. - FM */ HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(comm); + PUTC('<'); + PUTS(string->data); + PUTC('>'); + PSRCSTOP(comm); + } else +#endif handle_comment(context); string->size = 0; context->end_comment = FALSE; @@ -2489,6 +2911,15 @@ top1: } if (c == '>') { HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(sgmlspecial); + PUTC('<'); + PUTS(string->data); + PUTC('>'); + PSRCSTOP(sgmlspecial); + } else +#endif handle_doctype(context); string->size = 0; context->state = S_text; @@ -2512,6 +2943,15 @@ top1: } if (!context->second_bracket && c == '>') { HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(sgmlspecial); + PUTC('<'); + PUTS(string->data); + PUTC('>'); + PSRCSTOP(sgmlspecial); + } else +#endif handle_marked(context); string->size = 0; context->state = S_text; @@ -2537,6 +2977,15 @@ top1: } if (context->end_comment && c == '>') { HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(sgmlspecial); + PUTC('<'); + PUTS(string->data); + PUTC('>'); + PSRCSTOP(sgmlspecial); + } else +#endif handle_sgmlent(context); string->size = 0; context->end_comment = FALSE; @@ -2565,6 +3014,15 @@ top1: } if (context->end_comment && c == '>') { HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(sgmlspecial); + PUTC('<'); + PUTS(string->data); + PUTC('>'); + PSRCSTOP(sgmlspecial); + } else +#endif handle_sgmlele(context); string->size = 0; context->end_comment = FALSE; @@ -2593,6 +3051,15 @@ top1: } if (context->end_comment && c == '>') { HTChunkTerminate(string); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(sgmlspecial); + PUTC('<'); + PUTS(string->data); + PUTC('>'); + PSRCSTOP(sgmlspecial); + } else +#endif handle_sgmlatt(context); string->size = 0; context->end_comment = FALSE; @@ -2607,9 +3074,23 @@ top1: case S_tag_gap: /* Expecting attribute or '>' */ if (WHITE(c)) break; /* Gap between attributes */ - if (c == '>') { /* End of tag */ + if (c == '>') { /* End of tag */ +#ifdef USE_PSRC + if (!psrc_view) +#endif if (context->current_tag->name) start_element(context); +#ifdef USE_PSRC + if (psrc_view) { + if (context->current_tag != context->unknown_tag) + PSRCSTOP(tag); + else + PSRCSTOP(badtag); + PSRCSTART(abracket); + PUTC('>'); + PSRCSTOP(abracket); + } +#endif context->state = S_text; break; } @@ -2622,6 +3103,9 @@ top1: if (WHITE(c) || (c == '>') || (c == '=')) { /* End of word */ HTChunkTerminate(string); handle_attribute_name(context, string->data); +#ifdef USE_PSRC + if (!psrc_view) { +#endif string->size = 0; if (c == '>') { /* End of tag */ if (context->current_tag->name) @@ -2629,6 +3113,41 @@ top1: context->state = S_text; break; } +#ifdef USE_PSRC + } else { + PUTC(' '); + if (context->current_attribute_number == INVALID) + PSRCSTART(badattr); + else + PSRCSTART(attrib); + if (attrname_transform != 1) { + if (attrname_transform == 0) + LYLowerCase(string->data); + else + LYUpperCase(string->data); + } + PUTS(string->data); + if (c == '=' || c == '>') { + if (c == '=' ) PUTC('='); + if (context->current_attribute_number == INVALID) + PSRCSTOP(badattr); + else + PSRCSTOP(attrib); + } + if (c == '>') { + if (context->current_tag != context->unknown_tag) + PSRCSTOP(tag); + else + PSRCSTOP(badtag); + PSRCSTART(abracket); + PUTC('>'); + PSRCSTOP(abracket); + context->state = S_text; + break; + } + string->size = 0; + } +#endif context->state = (c == '=' ? S_equals: S_attr_gap); } else { HTChunkPutc(string, c); @@ -2638,48 +3157,139 @@ top1: case S_attr_gap: /* Expecting attribute or '=' or '>' */ if (WHITE(c)) break; /* Gap after attribute */ - if (c == '>') { /* End of tag */ + if (c == '>') { /* End of tag */ +#ifdef USE_PSRC + if (psrc_view) { + if (context->current_attribute_number == INVALID) + PSRCSTOP(badattr); + else + PSRCSTOP(attrib); + if (context->current_tag != context->unknown_tag) + PSRCSTOP(tag); + else + PSRCSTOP(badtag); + PSRCSTART(abracket); + PUTC('>'); + PSRCSTOP(abracket); + } else +#endif if (context->current_tag->name) start_element(context); context->state = S_text; break; } else if (c == '=') { +#ifdef USE_PSRC + if (psrc_view) { + PUTC('='); + if (context->current_attribute_number == INVALID) + PSRCSTOP(badattr); + else + PSRCSTOP(attrib); + } +#endif context->state = S_equals; break; } +#ifdef USE_PSRC + /* we are here because this char seemed the beginning of attrname */ + if (psrc_view && context->current_attribute_number == INVALID) { + PSRCSTOP(badattr); + PUTC(' '); + } +#endif HTChunkPutc(string, c); - context->state = S_attr; /* Get next attribute */ + context->state = S_attr; /* Get next attribute */ break; case S_equals: /* After attr = */ if (WHITE(c)) break; /* Before attribute value */ - if (c == '>') { /* End of tag */ - if (TRACE) - fprintf(stderr, "SGML: found = but no value\n"); + if (c == '>') { /* End of tag */ + CTRACE(tfp, "SGML: found = but no value\n"); +#ifdef USE_PSRC + if (psrc_view) { + if (context->current_tag != context->unknown_tag) + PSRCSTOP(tag); + else + PSRCSTOP(badtag); + PSRCSTART(abracket); + PUTC('>'); + PSRCSTOP(abracket); + } else +#endif if (context->current_tag->name) start_element(context); context->state = S_text; break; } else if (c == '\'') { +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(attrval); + PUTC(c); + } +#endif context->state = S_squoted; break; } else if (c == '"') { +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(attrval); + PUTC(c); + } +#endif context->state = S_dquoted; break; } - HTChunkPutc(string, c); +#ifdef USE_PSRC + if (psrc_view) + PSRCSTART(attrval); +#endif context->state = S_value; - break; + /* no break! fall through to S_value and proccess current `c` */ case S_value: if (WHITE(c) || (c == '>')) { /* End of word */ HTChunkTerminate(string) ; +#ifdef USE_PSRC + if (psrc_view) { + /*PSRCSTART(attrval);*/ + if (cur_attr_is_name) { + HTStartAnchor(context->target, string->data, NULL); + (*context->actions->end_element)( + context->target, + HTML_A, + (char **)&context->include); + } else if (cur_attr_is_href) { + PSRCSTART(href); + HTStartAnchor(context->target,NULL,string->data); + } + PUTS_TR(string->data); + if (cur_attr_is_href) { + (*context->actions->end_element)( + context->target, + HTML_A, + (char **)&context->include); + PSRCSTOP(href); + } + PSRCSTOP(attrval); + } else +#endif handle_attribute_value(context, string->data); string->size = 0; if (c == '>') { /* End of tag */ +#ifdef USE_PSRC + if (psrc_view) { + if (context->current_tag != context->unknown_tag) + PSRCSTOP(tag); + else + PSRCSTOP(badtag); + PSRCSTART(abracket); + PUTC('>'); + PSRCSTOP(abracket); + } else +#endif if (context->current_tag->name) start_element(context); context->state = S_text; @@ -2713,10 +3323,35 @@ top1: case S_squoted: /* Quoted attribute value */ if (c == '\'') { /* End of attribute value */ HTChunkTerminate(string) ; +#ifdef USE_PSRC + if (psrc_view) { + /*PSRCSTART(attrval);*/ + if (cur_attr_is_name) { + HTStartAnchor(context->target,string->data,NULL); + (*context->actions->end_element)( + context->target, + HTML_A, + (char **)&context->include); + } else if (cur_attr_is_href) { + PSRCSTART(href); + HTStartAnchor(context->target,NULL,string->data); + } + PUTS_TR(string->data); + if (cur_attr_is_href) { + (*context->actions->end_element)( + context->target, + HTML_A, + (char **)&context->include); + PSRCSTOP(href); + } + PUTC('\''); + PSRCSTOP(attrval); + } else +#endif handle_attribute_value(context, string->data); string->size = 0; context->state = S_tag_gap; - } else if (c == '\033') { + } else if (TOASCII(c) == '\033') { /* S/390 -- gil -- 1213 */ /* ** Setting up for possible single quotes in CJK escape ** sequences. - Takuya ASADA (asada@three-a.co.jp) @@ -2748,16 +3383,42 @@ top1: break; case S_dquoted: /* Quoted attribute value */ - if (c == '"' || /* Valid end of attribute value */ + if (c == '"' || /* Valid end of attribute value */ (soft_dquotes && /* If emulating old Netscape bug, treat '>' */ c == '>')) { /* as a co-terminator of dquoted and tag */ HTChunkTerminate(string) ; +#ifdef USE_PSRC + if (psrc_view) { + /*PSRCSTART(attrval);*/ + if (cur_attr_is_name) { + HTStartAnchor(context->target,string->data,NULL); + (*context->actions->end_element)( + context->target, + HTML_A, + (char **)&context->include); + } else if (cur_attr_is_href) { + PSRCSTART(href); + HTStartAnchor(context->target,NULL,string->data); + } + PUTS_TR(string->data); + if (cur_attr_is_href) { + (*context->actions->end_element)( + context->target, + HTML_A, + (char **)&context->include); + PSRCSTOP(href); + } + PUTC(c); + PSRCSTOP(attrval); + } else +#endif + handle_attribute_value(context, string->data); string->size = 0; context->state = S_tag_gap; if (c == '>') /* We emulated the Netscape bug, so we go */ goto top1; /* back and treat it as the tag terminator */ - } else if (c == '\033') { + } else if (TOASCII(c) == '\033') { /* S/390 -- gil -- 1230 */ /* ** Setting up for possible double quotes in CJK escape ** sequences. - Takuya ASADA (asada@three-a.co.jp) @@ -2788,11 +3449,14 @@ top1: } break; - case S_end: /* data) { /* Empty end tag */ @@ -2802,19 +3466,66 @@ top1: t = SGMLFindTag(dtd, string->data); } if (!t || t == context->unknown_tag) { - if (TRACE) - fprintf(stderr, "Unknown end tag \n", string->data); + CTRACE(tfp, "Unknown end tag \n", string->data); +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTART(abracket); + PUTC('<'); + PUTC('/'); + PSRCSTOP(abracket); + PSRCSTART(badtag); + if (tagname_transform != 1) { + if (tagname_transform == 0) + LYLowerCase(string->data); + else + LYUpperCase(string->data); + } + PUTS(string->data); PSRCSTOP(badtag); + PSRCSTART(abracket); PUTC('>'); PSRCSTOP(abracket); + psrc_tagname_processed=TRUE; + } + } else if (psrc_view) { +#endif } else { BOOL tag_OK = (c == '>' || WHITE(c)); +#if OPT + HTMLElement e = context->current_tag - context->dtd->tags; + int branch = 2; /* it can be 0,1,2*/ +#endif context->current_tag = t; +#if OPT +#ifdef EXTENDED_HTMLDTD + if (tag_OK && Old_DTD) { +#else + if (tag_OK) { +#endif + switch (e) { + case HTML_DD: case HTML_DT: case HTML_LI: case HTML_LH : + case HTML_TD: case HTML_TH: case HTML_TR: case HTML_THEAD: + case HTML_TFOOT : case HTML_TBODY : case HTML_COLGROUP: + branch = 0; + break; + + case HTML_A: case HTML_B: case HTML_BLINK: case HTML_CITE: + case HTML_EM: case HTML_FONT: case HTML_FORM: case HTML_I: + case HTML_P: case HTML_STRONG: case HTML_TT: case HTML_U: + branch = 1; + break; + } + } +#endif + #ifdef EXTENDED_HTMLDTD /* ** Just handle ALL end tags normally :-) - kw */ - if (New_DTD) { + if (!Old_DTD) { end_element( context, context->current_tag); } else #endif /* EXTENDED_HTMLDTD */ + + +#if !OPT if (tag_OK && (!strcasecomp(string->data, "DD") || !strcasecomp(string->data, "DT") || @@ -2827,13 +3538,14 @@ top1: !strcasecomp(string->data, "TFOOT") || !strcasecomp(string->data, "TBODY") || !strcasecomp(string->data, "COLGROUP"))) { +#else + if (tag_OK && branch == 0) { +#endif /* ** Don't treat these end tags as invalid, ** nor act on them. - FM */ - if (TRACE) - fprintf(stderr, - "SGML: `data, c); string->size = 0; context->current_attribute_number = INVALID; @@ -2843,6 +3555,7 @@ top1: context->state = S_text; } break; +#if !OPT } else if (tag_OK && (!strcasecomp(string->data, "A") || !strcasecomp(string->data, "B") || @@ -2856,6 +3569,9 @@ top1: !strcasecomp(string->data, "STRONG") || !strcasecomp(string->data, "TT") || !strcasecomp(string->data, "U"))) { +#else + } else if (tag_OK && branch == 1) { +#endif /* ** Handle end tags for container elements declared ** as SGML_EMPTY to prevent "expected tag substitution" @@ -2871,27 +3587,19 @@ top1: /* ** It is not at FORM end tag, so ignore it. - FM */ - if (TRACE) { - fprintf(stderr, - "SGML: Ignoring end tag in SELECT block.\n", + CTRACE(tfp, "SGML: ***Ignoring end tag 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 end tag.\n", + CTRACE(tfp, "SGML: ***Faking SELECT end tag before end tag.\n", string->data); - } end_element(context, SGMLFindTag(context->dtd, "SELECT")); - if (TRACE) { - fprintf(stderr, - "SGML: End \n", string->data); - } + CTRACE(tfp, "SGML: End \n", string->data); + (*context->actions->end_element) (context->target, (context->current_tag - context->dtd->tags), @@ -2902,9 +3610,7 @@ top1: ** Treat a P end tag like a P start tag (Ugh, ** what a hack! 8-). - FM */ - if (TRACE) - fprintf(stderr, - "SGML: `data, c, string->data, c); { int i; @@ -2917,10 +3623,8 @@ top1: if (context->current_tag->name) start_element(context); } else { - if (TRACE) { - fprintf(stderr, - "SGML: End \n", string->data); - } + CTRACE(tfp, "SGML: End \n", string->data); + (*context->actions->end_element) (context->target, (context->current_tag - context->dtd->tags), @@ -2942,11 +3646,35 @@ top1: } } +#ifdef USE_PSRC + if (psrc_view && !psrc_tagname_processed) { + PSRCSTART(abracket); + PUTC('<'); + PUTC('/'); + PSRCSTOP(abracket); + PSRCSTART(tag); + if (tagname_transform != 1) { + if (tagname_transform == 0) + LYLowerCase(string->data); + else + LYUpperCase(string->data); + } + PUTS(string->data); PSRCSTOP(tag); + if ( c != '>' ) + PSRCSTART(badtag); + else { + PSRCSTART(abracket); + PUTC('>'); + PSRCSTOP(abracket); + } + } +#endif + string->size = 0; context->current_attribute_number = INVALID; if (c != '>') { - if (TRACE && !WHITE(c)) - fprintf(stderr,"SGML: `data, c); + if (!WHITE(c)) + CTRACE(tfp,"SGML: `data, c); context->state = S_junk_tag; } else { context->state = S_text; @@ -2955,7 +3683,7 @@ top1: break; - case S_esc: /* Expecting '$'or '(' following CJK ESC. */ + case S_esc: /* Expecting '$'or '(' following CJK ESC. */ if (c == '$') { context->state = S_dollar; } else if (c == '(') { @@ -2996,7 +3724,7 @@ top1: break; case S_nonascii_text: /* Expecting CJK ESC after non-ASCII text. */ - if (c == '\033') { + if (TOASCII(c) == '\033') { /* S/390 -- gil -- 1264 */ context->state = S_esc; } PUTC(c); @@ -3043,7 +3771,7 @@ top1: break; case S_nonascii_text_sq: /* Expecting CJK ESC after non-ASCII text. */ - if (c == '\033') { + if (TOASCII(c) == '\033') { /* S/390 -- gil -- 1281 */ context->state = S_esc_sq; } HTChunkPutc(string, c); @@ -3090,7 +3818,7 @@ top1: break; case S_nonascii_text_dq: /* Expecting CJK ESC after non-ASCII text. */ - if (c == '\033') { + if (TOASCII(c) == '\033') { /* S/390 -- gil -- 1298 */ context->state = S_esc_dq; } HTChunkPutc(string, c); @@ -3098,8 +3826,30 @@ top1: case S_junk_tag: if (c == '>') { +#ifdef USE_PSRC + if (psrc_view) { + PSRCSTOP(badtag); + PSRCSTART(abracket); + PUTC('>'); + PSRCSTOP(abracket); + seen_letter_in_junk_tag = FALSE; + } +#endif context->state = S_text; } +#ifdef USE_PSRC + else if (psrc_view) { + /*pack spaces until first non-space is seen*/ + if (!seen_letter_in_junk_tag) { + if (!WHITE(c)) { + seen_letter_in_junk_tag = TRUE; + PUTC(c); + }; + } else + PUTC(c); + }; +#endif + } /* switch on context->state */ /* @@ -3190,14 +3940,14 @@ PUBLIC CONST HTStreamClass SGMLParser = ** ** On entry, ** dtd represents the DTD, along with -** actions is the sink for the data as a set of routines. +** actions is the sink for the data as a set of routines. ** */ PUBLIC HTStream* SGML_new ARGS3( CONST SGML_dtd *, dtd, HTParentAnchor *, anchor, - HTStructured *, target) + HTStructured *, target) { int i; HTStream* context = (HTStream *) malloc(sizeof(*context)); @@ -3208,11 +3958,11 @@ PUBLIC HTStream* SGML_new ARGS3( context->string = HTChunkCreate(128); /* Grow by this much */ context->dtd = dtd; context->target = target; - context->actions = (HTStructuredClass*)(((HTStream*)target)->isa); + context->actions = (CONST HTStructuredClass*)(((HTStream*)target)->isa); /* Ugh: no OO */ context->unknown_tag = &HTTag_unrecognized; context->state = S_text; - context->element_stack = 0; /* empty */ + context->element_stack = 0; /* empty */ context->inSELECT = FALSE; #ifdef CALLERDATA context->callerData = (void*) callerData; @@ -3256,6 +4006,18 @@ PUBLIC HTStream* SGML_new ARGS3( context->csi = NULL; context->csi_index = 0; +#ifdef USE_PSRC + if (psrc_view) { + psrc_view = FALSE; + SGML_string(context, "source" + "
") ;
+	psrc_view = TRUE;
+	psrc_convert_string = FALSE;
+	sgml_in_psrc_was_initialized = TRUE;
+	seen_letter_in_junk_tag = FALSE;
+    }
+#endif
+
     return context;
 }
 
@@ -3265,7 +4027,7 @@ PUBLIC HTStream* SGML_new  ARGS3(
 **	Added 24-Mar-96 by FM, based on:
 **
 ////////////////////////////////////////////////////////////////////////
-Copyright (c) 1993 Electrotechnical Laboratry (ETL)
+Copyright (c) 1993 Electrotechnical Laboratory (ETL)
 
 Permission to use, copy, modify, and distribute this material
 for any purpose and without fee is hereby granted, provided
@@ -3280,7 +4042,7 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
 /////////////////////////////////////////////////////////////////////////
 Content-Type:	program/C; charset=US-ASCII
 Program:	SJIS.c
-Author: 	Yutaka Sato 
+Author:		Yutaka Sato 
 Description:
 History:
 	930923	extracted from codeconv.c of cosmos
@@ -3290,25 +4052,75 @@ History:
 PUBLIC int TREAT_SJIS = 1;
 
 PUBLIC void JISx0201TO0208_EUC ARGS4(
-	register unsigned char, 	IHI,
-	register unsigned char, 	ILO,
+	register unsigned char,		IHI,
+	register unsigned char,		ILO,
 	register unsigned char *,	OHI,
 	register unsigned char *,	OLO)
 {
     static char *table[] = {
-	"\xA1\xA3", "\xA1\xD6", "\xA1\xD7", "\xA1\xA2", "\xA1\xA6", "\xA5\xF2",
-	"\xA5\xA1", "\xA5\xA3", "\xA5\xA5", "\xA5\xA7", "\xA5\xA9",
-	"\xA5\xE3", "\xA5\xE5", "\xA5\xE7", "\xA5\xC3", "\xA1\xBC",
-	"\xA5\xA2", "\xA5\xA4", "\xA5\xA6", "\xA5\xA8", "\xA5\xAA",
-	"\xA5\xAB", "\xA5\xAD", "\xA5\xAF", "\xA5\xB1", "\xA5\xB3",
-	"\xA5\xB5", "\xA5\xB7", "\xA5\xB9", "\xA5\xBB", "\xA5\xBD",
-	"\xA5\xBF", "\xA5\xC1", "\xA5\xC4", "\xA5\xC6", "\xA5\xC8",
-	"\xA5\xCA", "\xA5\xCB", "\xA5\xCC", "\xA5\xCD", "\xA5\xCE",
-	"\xA5\xCF", "\xA5\xD2", "\xA5\xD5", "\xA5\xD8", "\xA5\xDB",
-	"\xA5\xDE", "\xA5\xDF", "\xA5\xE0", "\xA5\xE1", "\xA5\xE2",
-	"\xA5\xE4", "\xA5\xE6", "\xA5\xE8", "\xA5\xE9", "\xA5\xEA",
-	"\xA5\xEB", "\xA5\xEC", "\xA5\xED", "\xA5\xEF", "\xA5\xF3",
-	"\xA1\xAB", "\xA1\xAC"
+	"\241\243",	/* A1,A3 */
+	"\241\326",	/* A1,D6 */
+	"\241\327",	/* A1,D7 */
+	"\241\242",	/* A1,A2 */
+	"\241\246",	/* A1,A6 */
+	"\245\362",	/* A5,F2 */
+	"\245\241",	/* A5,A1 */
+	"\245\243",	/* A5,A3 */
+	"\245\245",	/* A5,A5 */
+	"\245\247",	/* A5,A7 */
+	"\245\251",	/* A5,A9 */
+	"\245\343",	/* A5,E3 */
+	"\245\345",	/* A5,E5 */
+	"\245\347",	/* A5,E7 */
+	"\245\303",	/* A5,C3 */
+	"\241\274",	/* A1,BC */
+	"\245\242",	/* A5,A2 */
+	"\245\244",	/* A5,A4 */
+	"\245\246",	/* A5,A6 */
+	"\245\250",	/* A5,A8 */
+	"\245\252",	/* A5,AA */
+	"\245\253",	/* A5,AB */
+	"\245\255",	/* A5,AD */
+	"\245\257",	/* A5,AF */
+	"\245\261",	/* A5,B1 */
+	"\245\263",	/* A5,B3 */
+	"\245\265",	/* A5,B5 */
+	"\245\267",	/* A5,B7 */
+	"\245\271",	/* A5,B9 */
+	"\245\273",	/* A5,BB */
+	"\245\275",	/* A5,BD */
+	"\245\277",	/* A5,BF */
+	"\245\301",	/* A5,C1 */
+	"\245\304",	/* A5,C4 */
+	"\245\306",	/* A5,C6 */
+	"\245\310",	/* A5,C8 */
+	"\245\312",	/* A5,CA */
+	"\245\313",	/* A5,CB */
+	"\245\314",	/* A5,CC */
+	"\245\315",	/* A5,CD */
+	"\245\316",	/* A5,CE */
+	"\245\317",	/* A5,CF */
+	"\245\322",	/* A5,D2 */
+	"\245\325",	/* A5,D5 */
+	"\245\330",	/* A5,D8 */
+	"\245\333",	/* A5,DB */
+	"\245\336",	/* A5,DE */
+	"\245\337",	/* A5,DF */
+	"\245\340",	/* A5,E0 */
+	"\245\341",	/* A5,E1 */
+	"\245\342",	/* A5,E2 */
+	"\245\344",	/* A5,E4 */
+	"\245\346",	/* A5,E6 */
+	"\245\350",	/* A5,E8 */
+	"\245\351",	/* A5,E9 */
+	"\245\352",	/* A5,EA */
+	"\245\353",	/* A5,EB */
+	"\245\354",	/* A5,EC */
+	"\245\355",	/* A5,ED */
+	"\245\357",	/* A5,EF */
+	"\245\363",	/* A5,F3 */
+	"\241\253",	/* A1,AB */
+	"\241\254"	/* A1,AC */
     };
 
     if ((IHI == 0x8E) && (ILO >= 0xA1) && (ILO <= 0xDF)) {
@@ -3321,8 +4133,8 @@ PUBLIC void JISx0201TO0208_EUC ARGS4(
 }
 
 PUBLIC unsigned char * SJIS_TO_JIS1 ARGS3(
-	register unsigned char, 	HI,
-	register unsigned char, 	LO,
+	register unsigned char,		HI,
+	register unsigned char,		LO,
 	register unsigned char *,	JCODE)
 {
     HI -= (HI <= 0x9F) ? 0x71 : 0xB1;
@@ -3341,8 +4153,8 @@ PUBLIC unsigned char * SJIS_TO_JIS1 ARGS3(
 }
 
 PUBLIC unsigned char * JIS_TO_SJIS1 ARGS3(
-	register unsigned char, 	HI,
-	register unsigned char, 	LO,
+	register unsigned char,		HI,
+	register unsigned char,		LO,
 	register unsigned char *,	SJCODE)
 {
     if (HI & 1)
@@ -3371,13 +4183,13 @@ PUBLIC unsigned char * EUC_TO_SJIS1 ARGS3(
 }
 
 PUBLIC void JISx0201TO0208_SJIS ARGS3(
-	register unsigned char, 	I,
+	register unsigned char,		I,
 	register unsigned char *,	OHI,
 	register unsigned char *,	OLO)
 {
     unsigned char SJCODE[2];
 
-    JISx0201TO0208_EUC('\x8E', I, OHI, OLO);
+    JISx0201TO0208_EUC(216, I, OHI, OLO);
     JIS_TO_SJIS1(*OHI&0x7F, *OLO&0x7F, SJCODE);
     *OHI = SJCODE[0];
     *OLO = SJCODE[1];
@@ -3487,10 +4299,11 @@ PUBLIC unsigned char * EUC_TO_JIS ARGS4(
 }
 
 PUBLIC unsigned char * TO_EUC ARGS2(
-	unsigned char *,	jis,
+	CONST unsigned char *,	jis,
 	unsigned char *,	euc)
 {
-    register unsigned char *s, *d, c, jis_stat;
+    register CONST unsigned char *s;
+    register unsigned char *d, c, jis_stat;
     register int to1B, to2B;
     register int in_sjis = 0;
 
@@ -3540,13 +4353,13 @@ PUBLIC unsigned char * TO_EUC ARGS2(
 }
 
 PUBLIC void TO_SJIS ARGS2(
-	unsigned char *,	any,
+	CONST unsigned char *,	any,
 	unsigned char *,	sjis)
 {
     unsigned char *euc;
 
     if (!any || !sjis)
-       return;
+	return;
 
     euc = (unsigned char*)malloc(strlen((CONST char *)any)+1);
     if (euc == NULL)
@@ -3558,13 +4371,13 @@ PUBLIC void TO_SJIS ARGS2(
 }
 
 PUBLIC void TO_JIS ARGS2(
-	unsigned char *,	any,
+	CONST unsigned char *,	any,
 	unsigned char *,	jis)
 {
     unsigned char *euc;
 
     if (!any || !jis)
-       return;
+	return;
 
     euc = (unsigned char*)malloc(strlen((CONST char *)any)+1);
     if (euc == NULL)
diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/SGML.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/SGML.h
index 09ff6fe93a4..9ae3ae365dd 100644
--- a/gnu/usr.bin/lynx/WWW/Library/Implementation/SGML.h
+++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/SGML.h
@@ -1,30 +1,24 @@
-/*                                                SGML parse and stream definition for libwww
-                               SGML AND STRUCTURED STREAMS
-                                             
-   The SGML parser is a state machine. It is called for every character
-   
-   of the input stream. The DTD data structure contains pointers
-   
+/*						  SGML parse and stream definition for libwww
+			       SGML AND STRUCTURED STREAMS
+
+   The SGML parser is a state machine.	It is called for every character
+   of the input stream.	 The DTD data structure contains pointers
    to functions which are called to implement the actual effect of the
-   
    text read. When these functions are called, the attribute structures pointed to by the
-   DTD are valid, and the function is passed a pointer to the curent tag structure, and an
+   DTD are valid, and the function is passed a pointer to the current tag structure, and an
    "element stack" which represents the state of nesting within SGML elements.
-   
-   The following aspects are from Dan Connolly's suggestions:  Binary search, Strcutured
-   object scheme basically, SGML content enum type.
-   
+
+   The following aspects are from Dan Connolly's suggestions:  Binary search,
+   Structured object scheme basically, SGML content enum type.
+
    (c) Copyright CERN 1991 - See Copyright.html
-   
+
  */
 #ifndef SGML_H
 #define SGML_H
 
-#ifndef HTUTILS_H
-#include "HTUtils.h"
-#endif /* HTUTILS_H */
-#include "HTStream.h"
-#include "HTAnchor.h"
+#include 
+#include 
 
 /*
 
@@ -32,90 +26,96 @@ SGML content types
 
  */
 typedef enum _SGMLContent {
-    SGML_EMPTY,    /* No content. */
+    SGML_EMPTY,	   /* No content. */
     SGML_LITTERAL, /* Literal character data.  Recognize exact close tag only.
 		      Old www server compatibility only!  Not SGML */
-    SGML_CDATA,    /* Character data.  Recognize 
+#endif
+
 extern BOOL UCCanUniTranslateFrom PARAMS((int from));
 extern BOOL UCCanTranslateUniTo PARAMS((int to));
 extern BOOL UCCanTranslateFromTo PARAMS((int from, int to));
@@ -26,7 +30,7 @@ struct _UCTransParams
 typedef struct _UCTransParams UCTransParams;
 
 #ifndef UCDEFS_H
-#include "UCDefs.h"
+#include 
 #endif /* UCDEFS_H */
 
 extern void UCSetTransParams PARAMS((
@@ -47,7 +51,7 @@ extern void UCSetBoxChars PARAMS((
     int		hori_in));
 
 #ifndef HTSTREAM_H
-#include "HTStream.h"
+#include 
 #endif /* HTSTREAM_H */
 
 typedef void putc_func_t PARAMS((
@@ -55,7 +59,7 @@ typedef void putc_func_t PARAMS((
 	char		ch));
 
 #ifndef UCMAP_H
-#include "UCMap.h"
+#include 
 #endif /* UCMAP_H */
 
 extern BOOL UCPutUtf8_charstring PARAMS((
diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/UCDefs.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/UCDefs.h
index ac2dc3bc2cb..53c3a807a5e 100644
--- a/gnu/usr.bin/lynx/WWW/Library/Implementation/UCDefs.h
+++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/UCDefs.h
@@ -3,21 +3,33 @@
 #ifndef UCDEFS_H
 #define UCDEFS_H
 
+#ifndef HTUTILS_H
+#include 
+#endif
+
 typedef struct _LYUCcharset {
-    int UChndl;
+    int UChndl;  	/* -1 for "old" charsets, >= 0 for chartrans tables */
+
     CONST char * MIMEname;
     int enc;
-    int repertoire;
-    int codepoints;
-    int cpranges;	/* which ranges have valid displayable chars
-			   (including nbsp and shy) */
-    int like8859;	/* for which ranges is it like 8859-1 */
+    int codepage;	/* IBM OS/2 specific number */
+
+    /* parameters below are not used by chartrans mechanism, */
+    /* they describe some relationships against built-in Latin1 charset...*/
+    int repertoire;	/* unused */
+    int codepoints;	/* subset/superset of Latin1 ? */
+    int cpranges;	/* unused, obsolete by LYlowest_eightbit;
+			  "which ranges have valid displayable chars
+			   (including nbsp and shy)" */
+    int like8859;	/* currently used for nbsp and shy only
+			   (but UCT_R_8859SPECL assumed for any UCT_R_8BIT...);
+			  "for which ranges is it like 8859-1" */
 } LYUCcharset;
 
 #define UCT_ENC_7BIT 0
 #define UCT_ENC_8BIT 1
-#define UCT_ENC_8859 2
-#define UCT_ENC_8BIT_C0 3      /* 8-bit some chars in C0 control area */
+#define UCT_ENC_8859 2         /* no displayable chars in 0x80-0x9F */
+#define UCT_ENC_8BIT_C0 3      /* 8-bit + some chars in C0 control area */
 #define UCT_ENC_MAYBE2022 4
 #define UCT_ENC_CJK 5
 #define UCT_ENC_16BIT 6
@@ -45,13 +57,13 @@ typedef struct _LYUCcharset {
  *  More specific bitflags for practically important code point ranges:
  */
 #define UCT_R_LOWCTRL 0x08	/* 0x00-0x1F, for completeness */
-#define UCT_R_7BITINV 0x10	/* invariant, displayable 7bit chars */
-#define UCT_R_7BITNAT 0x20	/* displayable 7bit, national */
-#define UCT_R_HIGHCTRL 0x40
+#define UCT_R_7BITINV 0x10	/* invariant???, displayable 7bit chars */
+#define UCT_R_7BITNAT 0x20	/* displayable 7bit, national??? */
+#define UCT_R_HIGHCTRL 0x40	/* chars in 0x80-0x9F range */
 #define UCT_R_8859SPECL 0x80	/* special chars in 8859-x sets: nbsp and shy*/
 #define UCT_R_HIGH8BIT 0x100	/* rest of 0xA0-0xFF range */
 
-#define UCT_R_ASCII UCT_R_7BITINV | UCT_R_7BITNAT /*displayable US-ASCII*/
+#define UCT_R_ASCII UCT_R_7BITINV | UCT_R_7BITNAT /* displayable US-ASCII */
 #define UCT_R_LAT1 UCT_R_ASCII | UCT_R_8859SPECL | UCT_R_HIGH8BIT
 #define UCT_R_8BIT UCT_R_LAT1 | UCT_R_HIGHCTRL /* full 8bit range */
 
diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/UCMap.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/UCMap.h
index e634f760ee0..80ee73e7092 100644
--- a/gnu/usr.bin/lynx/WWW/Library/Implementation/UCMap.h
+++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/UCMap.h
@@ -1,7 +1,10 @@
-
 #ifndef UCMAP_H
 #define UCMAP_H
 
+#ifndef HTUTILS_H
+#include 
+#endif
+
 typedef long UCode_t;
 
 extern int UCTransUniChar PARAMS((
@@ -31,18 +34,53 @@ extern int UCTransCharStr PARAMS((
 extern UCode_t UCTransToUni PARAMS((
 	char		ch_in,
 	int		charset_in));
-extern int UCGetLYhndl_byMIME PARAMS((
-	CONST char *	p));
 extern int UCGetRawUniMode_byLYhndl PARAMS((
 	int		i));
+extern int UCGetLYhndl_byMIME PARAMS((
+	CONST char *	p)); /* returns -1 if name not recognized */
+extern int safeUCGetLYhndl_byMIME PARAMS((
+	CONST char *	p)); /* returns LATIN1 if name not recognized */
 
 extern int UCLYhndl_for_unspec;
 extern int UCLYhndl_for_unrec;
 extern int UCLYhndl_HTFile_for_unspec;
 extern int UCLYhndl_HTFile_for_unrec;
 
-#define UCTRANS_NOTFOUND (-4)
+/* easy to type: */
+extern int LATIN1;     /* UCGetLYhndl_byMIME("iso-8859-1") */
+extern int US_ASCII;   /* UCGetLYhndl_byMIME("us-ascii")   */
+extern int UTF8;       /* UCGetLYhndl_byMIME("utf-8")      */
+
+/*
+In general, Lynx translates letters from document charset to display charset.
+If document charset is not specified or not recognized by Lynx, we fall back
+to different assumptions below, read also lynx.cfg for info.
+
+UCLYhndl_for_unspec -  assume this as charset for documents that don't
+                       specify a charset parameter in HTTP headers or via META
+                       this corresponds to "assume_charset"
+
+UCLYhndl_HTFile_for_unspec -  assume this as charset of local file
+                       this corresponds to "assume_local_charset"
 
-#define HT_CANNOT_TRANSLATE -4	/* could go into HTUtils.h */
+UCLYhndl_for_unrec  -  in case a charset parameter is not recognized;
+                       this corresponds to "assume_unrec_charset"
+
+UCLYhndl_HTFile_for_unrec  - the same but only for local files,
+                             currently not used.
+
+
+current_char_set  -	this corresponds to "display charset",
+			declared in LYCharSets.c and really important.
+
+All external charset information is available in so called MIME format.
+For internal needs Lynx uses charset handlers as integers
+from UCGetLYhndl_byMIME().  However, there is no way to recover
+from user's error in configuration file lynx.cfg or command line switches,
+those unrecognized MIME names are assumed as LATIN1 (via safeUCGetLYhndl...).
+*/
+
+
+#define UCTRANS_NOTFOUND (-4)
 
 #endif /* UCMAP_H */
diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/crypt.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/crypt.c
index ffc466c7126..3645f63e10d 100644
--- a/gnu/usr.bin/lynx/WWW/Library/Implementation/crypt.c
+++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/crypt.c
@@ -23,13 +23,11 @@
  *
  */
 
-#ifndef HTUTILS_H
-#include "HTUtils.h"
-#endif
+#include 
 
-#include "ufc-crypt.h"
+#include 
 
-#include "LYLeaks.h"
+#include 
 
 #ifdef _UFC_32_
 
diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/crypt_util.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/crypt_util.c
index 9ed7e95d4da..b81264c3d14 100644
--- a/gnu/usr.bin/lynx/WWW/Library/Implementation/crypt_util.c
+++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/crypt_util.c
@@ -23,39 +23,33 @@
  *
  */
 
-#ifndef HTUTILS_H
-#include "HTUtils.h"
-#endif
-
-#ifdef DEBUG
-/*#include   included by HTUTils.h - FM */
-#endif
+#include 
 
 #ifndef STATIC
 #define STATIC static
 #endif
 
 #ifndef DOS
-#include "patchlevel.h"
-#include "ufc-crypt.h"
+#include 
+#include 
 #else
 /*
  * Thanks to greg%wind@plains.NoDak.edu (Greg W. Wettstein)
  * for DOS patches
  */
-#include "pl.h"
-#include "ufc.h"
+#include 
+#include 
 #endif
 
-#include "LYLeaks.h"
+#include 
 
 static char patchlevel_str[] = PATCHLEVEL;
 
-/* 
- * Permutation done once on the 56 bit 
+/*
+ * Permutation done once on the 56 bit
  *  key derived from the original 8 byte ASCII key.
  */
-static int pc1[56] = { 
+static int pc1[56] = {
   57, 49, 41, 33, 25, 17,  9,  1, 58, 50, 42, 34, 26, 18,
   10,  2, 59, 51, 43, 35, 27, 19, 11,  3, 60, 52, 44, 36,
   63, 55, 47, 39, 31, 23, 15,  7, 62, 54, 46, 38, 30, 22,
@@ -66,15 +60,15 @@ static int pc1[56] = {
  * How much to rotate each 28 bit half of the pc1 permutated
  *  56 bit key before using pc2 to give the i' key
  */
-static int rots[16] = { 
-  1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1 
+static int rots[16] = {
+  1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1
 };
 
-/* 
- * Permutation giving the key 
- * of the i' DES round 
+/*
+ * Permutation giving the key
+ * of the i' DES round
  */
-static int pc2[48] = { 
+static int pc2[48] = {
   14, 17, 11, 24,  1,  5,  3, 28, 15,  6, 21, 10,
   23, 19, 12,  4, 26,  8, 16,  7, 27, 20, 13,  2,
   41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48,
@@ -85,7 +79,7 @@ static int pc2[48] = {
  * The E expansion table which selects
  * bits from the 32 bit intermediate result.
  */
-static int esel[48] = { 
+static int esel[48] = {
   32,  1,  2,  3,  4,  5,  4,  5,  6,  7,  8,  9,
    8,  9, 10, 11, 12, 13, 12, 13, 14, 15, 16, 17,
   16, 17, 18, 19, 20, 21, 20, 21, 22, 23, 24, 25,
@@ -93,16 +87,16 @@ static int esel[48] = {
 };
 static int e_inverse[64];
 
-/* 
- * Permutation done on the 
- * result of sbox lookups 
+/*
+ * Permutation done on the
+ * result of sbox lookups
  */
 static int perm32[32] = {
   16,  7, 20, 21, 29, 12, 28, 17,  1, 15, 23, 26,  5, 18, 31, 10,
   2,   8, 24, 14, 32, 27,  3,  9, 19, 13, 30,  6, 22, 11,  4, 25
 };
 
-/* 
+/*
  * The sboxes
  */
 static int sbox[8][4][16]= {
@@ -155,19 +149,19 @@ static int sbox[8][4][16]= {
         }
 };
 
-/* 
- * This is the initial 
+/*
+ * This is the initial
  * permutation matrix
  */
-static int initial_perm[64] = { 
+static int initial_perm[64] = {
   58, 50, 42, 34, 26, 18, 10,  2, 60, 52, 44, 36, 28, 20, 12, 4,
   62, 54, 46, 38, 30, 22, 14,  6, 64, 56, 48, 40, 32, 24, 16, 8,
   57, 49, 41, 33, 25, 17,  9,  1, 59, 51, 43, 35, 27, 19, 11, 3,
   61, 53, 45, 37, 29, 21, 13,  5, 63, 55, 47, 39, 31, 23, 15, 7
 };
 
-/* 
- * This is the final 
+/*
+ * This is the final
  * permutation matrix
  */
 static int final_perm[64] = {
@@ -177,8 +171,8 @@ static int final_perm[64] = {
   34,  2, 42, 10, 50, 18, 58, 26, 33,  1, 41,  9, 49, 17, 57, 25
 };
 
-/* 
- * The 16 DES keys in BITMASK format 
+/*
+ * The 16 DES keys in BITMASK format
  */
 #ifdef _UFC_32_
 long32 _ufc_keytab[16][2];
@@ -205,15 +199,15 @@ long64 _ufc_keytab[16];
 
 #ifdef _UFC_32_
 long32 _ufc_sb0[8192], _ufc_sb1[8192], _ufc_sb2[8192], _ufc_sb3[8192];
-static long32 *sb[4] = {_ufc_sb0, _ufc_sb1, _ufc_sb2, _ufc_sb3}; 
+static long32 *sb[4] = {_ufc_sb0, _ufc_sb1, _ufc_sb2, _ufc_sb3};
 #endif
 
 #ifdef _UFC_64_
 long64 _ufc_sb0[4096], _ufc_sb1[4096], _ufc_sb2[4096], _ufc_sb3[4096];
-static long64 *sb[4] = {_ufc_sb0, _ufc_sb1, _ufc_sb2, _ufc_sb3}; 
+static long64 *sb[4] = {_ufc_sb0, _ufc_sb1, _ufc_sb2, _ufc_sb3};
 #endif
 
-/* 
+/*
  * eperm32tab: do 32 bit permutation and E selection
  *
  * The first index is the byte number in the 32 bit value to be permuted
@@ -224,7 +218,7 @@ static long64 *sb[4] = {_ufc_sb0, _ufc_sb1, _ufc_sb2, _ufc_sb3};
  */
 static ufc_long eperm32tab[4][256][2];
 
-/* 
+/*
  * do_pc1: permform pc1 permutation in the key schedule generation.
  *
  * The first   index is the byte number in the 8 byte ASCII key
@@ -252,7 +246,7 @@ static ufc_long do_pc2[8][128];
 /*
  * efp: undo an extra e selection and do final
  *      permutation giving the DES result.
- * 
+ *
  *      Invoked 6 bit a time on two 48 bit values
  *      giving two 32 bit longs.
  */
@@ -353,7 +347,7 @@ void init_des()
       mask1 = bytemask[comes_from_bit % 8 + 1];
       mask2 = longmask[bit % 28 + 4];
       for(j = 0; j < 128; j++) {
-	if(j & mask1) 
+	if(j & mask1)
 	  do_pc1[comes_from_bit / 8][bit / 28][j] |= mask2;
       }
     }
@@ -373,14 +367,14 @@ void init_des()
       }
     }
 
-    /* 
+    /*
      * Now generate the table used to do combined
      * 32 bit permutation and e expansion
      *
      * We use it because we have to permute 16384 32 bit
      * longs into 48 bit in order to initialize sb.
      *
-     * Looping 48 rounds per permutation becomes 
+     * Looping 48 rounds per permutation becomes
      * just too slow...
      *
      */
@@ -389,17 +383,17 @@ void init_des()
 
     for(bit = 0; bit < 48; bit++) {
       ufc_long mask1,comes_from;
-	
+
       comes_from = perm32[esel[bit]-1]-1;
       mask1      = bytemask[comes_from % 8];
-	
+
       for(j = 256; j--;) {
 	if(j & mask1)
 	  eperm32tab[comes_from / 8][j][bit / 24] |= BITMASK(bit % 24);
       }
     }
-    
-    /* 
+
+    /*
      * Create the sb tables:
      *
      * For each 12 bit segment of an 48 bit intermediate
@@ -414,14 +408,14 @@ void init_des()
     for(sg = 0; sg < 4; sg++) {
       int j1, j2;
       int s1, s2;
-    
+
       for(j1 = 0; j1 < 64; j1++) {
 	s1 = s_lookup(2 * sg, j1);
 	for(j2 = 0; j2 < 64; j2++) {
 	  ufc_long to_permute, inx;
-    
+
 	  s2         = s_lookup(2 * sg + 1, j2);
-	  to_permute = (((ufc_long)s1 << 4)  | 
+	  to_permute = (((ufc_long)s1 << 4)  |
 	               (ufc_long)s2) << (24 - 8 * (ufc_long)sg);
 
 #ifdef _UFC_32_
@@ -437,13 +431,13 @@ void init_des()
 #endif
 #ifdef _UFC_64_
 	  inx = ((j1 << 6)  | j2);
-	  sb[sg][inx]  = 
+	  sb[sg][inx]  =
 	    ((long64)eperm32tab[0][(to_permute >> 24) & 0xff][0] << 32) |
 	     (long64)eperm32tab[0][(to_permute >> 24) & 0xff][1];
 	  sb[sg][inx] |=
 	    ((long64)eperm32tab[1][(to_permute >> 16) & 0xff][0] << 32) |
 	     (long64)eperm32tab[1][(to_permute >> 16) & 0xff][1];
-  	  sb[sg][inx] |= 
+  	  sb[sg][inx] |=
 	    ((long64)eperm32tab[2][(to_permute >>  8) & 0xff][0] << 32) |
 	     (long64)eperm32tab[2][(to_permute >>  8) & 0xff][1];
 	  sb[sg][inx] |=
@@ -452,9 +446,9 @@ void init_des()
 #endif
 	}
       }
-    }  
+    }
 
-    /* 
+    /*
      * Create an inverse matrix for esel telling
      * where to plug out bits if undoing it
      */
@@ -463,7 +457,7 @@ void init_des()
       e_inverse[esel[bit] - 1 + 32] = bit + 48;
     }
 
-    /* 
+    /*
      * create efp: the matrix used to
      * undo the E expansion and effect final permutation
      */
@@ -478,11 +472,11 @@ void init_des()
       o_long = bit / 32; /* 0..1  */
       o_bit  = bit % 32; /* 0..31 */
 
-      /* 
+      /*
        * And find a bit in the e permutated value setting this bit.
        *
        * Note: the e selection may have selected the same bit several
-       * times. By the initialization of e_inverse, we only look
+       * times.  By the initialization of e_inverse, we only look
        * for one specific instance.
        */
       comes_from_f_bit = final_perm[bit] - 1;         /* 0..63 */
@@ -499,7 +493,7 @@ void init_des()
       }
     }
 
-    
+
     /*
      * Create revfinal: an array to undo final
      * the effects of efp
@@ -519,7 +513,7 @@ void init_des()
     initialized++;
   }
 
-/* 
+/*
  * Process the elements of the sb table permuting the
  * bits swapped in the expansion by the current salt.
  */
@@ -551,7 +545,7 @@ STATIC void shuffle_sb(k, saltbits)
   }
 #endif
 
-/* 
+/*
  * Setup the unit for a new salt
  * Hopefully we'll not see a new salt in each crypt call.
  */
@@ -570,8 +564,8 @@ STATIC void setup_salt(s)
     if(s[0] == current_salt[0] && s[1] == current_salt[1])
       return;
     current_salt[0] = s[0]; current_salt[1] = s[1];
-    
-    /* 
+
+    /*
      * This is the only crypt change to DES:
      * entries are swapped in the expansion table
      * according to the bits set in the salt.
@@ -580,10 +574,10 @@ STATIC void setup_salt(s)
     for(i = 0; i < 2; i++) {
       long c=ascii_to_bin(s[i]);
 #ifdef notdef
-      /* 
+      /*
        * Some applications do rely on illegal
-       * salts. It seems that UFC-crypt behaves
-       * identically to standard crypt 
+       * salts.  It seems that UFC-crypt behaves
+       * identically to standard crypt
        * implementations on illegal salts -- glad
        */
       if(c < 0 || c > 63)
@@ -600,7 +594,7 @@ STATIC void setup_salt(s)
      * to reflect the changed e
      * selection table
      */
-    shuffle_sb(_ufc_sb0, current_saltbits ^ saltbits); 
+    shuffle_sb(_ufc_sb0, current_saltbits ^ saltbits);
     shuffle_sb(_ufc_sb1, current_saltbits ^ saltbits);
     shuffle_sb(_ufc_sb2, current_saltbits ^ saltbits);
     shuffle_sb(_ufc_sb3, current_saltbits ^ saltbits);
@@ -654,7 +648,7 @@ STATIC void ufc_mk_keytab(key)
     direction = 0;
   }
 
-/* 
+/*
  * Undo an extra E selection and do final permutations
  */
 
@@ -692,8 +686,8 @@ ufc_long *_ufc_dofinalperm(l1, l2, r1, r2)
     return ary;
   }
 
-/* 
- * crypt only: convert from 64 bit to 11 bit ASCII 
+/*
+ * crypt only: convert from 64 bit to 11 bit ASCII
  * prefixing with the salt
  */
 
@@ -727,10 +721,10 @@ STATIC char *output_conversion(v1, v2, salt)
 
 ufc_long *_ufc_doit();
 
-/* 
+/*
  * UNIX crypt function
  */
-   
+
 char *crypt(key, salt)
   char *key, *salt;
   { ufc_long *s;
@@ -751,7 +745,7 @@ char *crypt(key, salt)
     /*
      * Go for the 25 DES encryptions
      */
-    s = _ufc_doit((ufc_long)0, (ufc_long)0, 
+    s = _ufc_doit((ufc_long)0, (ufc_long)0,
 		  (ufc_long)0, (ufc_long)0, (ufc_long)25);
     /*
      * Do final permutations
@@ -764,7 +758,7 @@ char *crypt(key, salt)
     return output_conversion(s[0], s[1], salt);
   }
 
-/* 
+/*
  * To make fcrypt users happy.
  * They don't need to call init_des.
  */
@@ -775,8 +769,8 @@ char *fcrypt(key, salt)
   { return crypt(key, salt);
   }
 
-/* 
- * UNIX encrypt function. Takes a bitvector
+/*
+ * UNIX encrypt function.  Takes a bitvector
  * represented by one byte per bit and
  * encrypt/decrypt according to edflag
  */
@@ -800,12 +794,12 @@ void encrypt(block, edflag)
       for(i = 0; i < 8; i++) {
 #ifdef _UFC_32_
 	long32 x;
-	x = _ufc_keytab[15-i][0]; 
-        _ufc_keytab[15-i][0] = _ufc_keytab[i][0]; 
+	x = _ufc_keytab[15-i][0];
+        _ufc_keytab[15-i][0] = _ufc_keytab[i][0];
         _ufc_keytab[i][0] = x;
 
-	x = _ufc_keytab[15-i][1]; 
-        _ufc_keytab[15-i][1] = _ufc_keytab[i][1]; 
+	x = _ufc_keytab[15-i][1];
+        _ufc_keytab[15-i][1] = _ufc_keytab[i][1];
         _ufc_keytab[i][1] = x;
 #endif
 #ifdef _UFC_64_
@@ -860,11 +854,11 @@ void encrypt(block, edflag)
     for(i = 0; i < 32; i++) {
       *block++ = (r1 & longmask[i]) != 0;
     }
-    
+
   }
 
-/* 
- * UNIX setkey function. Take a 64 bit DES
+/*
+ * UNIX setkey function.  Take a 64 bit DES
  * key and setup the machinery.
  */
 
@@ -881,14 +875,14 @@ void setkey(key)
 	c = c << 1 | *key++;
       ktab[i] = c >> 1;
     }
-    
+
     ufc_mk_keytab(ktab);
   }
 
-/* 
+/*
  * Ultrix crypt16 function, thanks to pcl@convex.oxford.ac.uk (Paul Leyland)
  */
-   
+
 char *crypt16(key, salt)
   char *key, *salt;
   { ufc_long *s, *t;
@@ -898,44 +892,44 @@ char *crypt16(key, salt)
      * Hack DES tables according to salt
      */
     setup_salt(salt);
-    
+
     /*
      * Setup key schedule
      */
     clearmem(ktab, sizeof ktab);
     (void)strncpy(ktab, key, 8);
     ufc_mk_keytab(ktab);
-    
+
     /*
      * Go for first 20 DES encryptions
      */
-    s = _ufc_doit((ufc_long)0, (ufc_long)0, 
+    s = _ufc_doit((ufc_long)0, (ufc_long)0,
 		  (ufc_long)0, (ufc_long)0, (ufc_long)20);
-    
+
     /*
      * And convert back to 6 bit ASCII
      */
     strcpy (res, output_conversion(s[0], s[1], salt));
-    
+
     clearmem(ttab, sizeof ttab);
     if (strlen (key) > 8) (void)strncpy(ttab, key+8, 8);
     ufc_mk_keytab(ttab);
-    
+
     /*
      * Go for second 5 DES encryptions
      */
-    t = _ufc_doit((ufc_long)0, (ufc_long)0, 
+    t = _ufc_doit((ufc_long)0, (ufc_long)0,
 		  (ufc_long)0, (ufc_long)0, (ufc_long)5);
     /*
      * And convert back to 6 bit ASCII
      */
     strcpy (q, output_conversion(t[0], t[1], salt));
     strcpy (res+13, q+2);
-    
+
     clearmem(ktab, sizeof ktab);
     (void)strncpy(ktab, key, 8);
     ufc_mk_keytab(ktab);
-    
+
     return res;
   }
 
@@ -967,14 +961,14 @@ void ufc_setup_password(cookie, s)
   }
 
 void ufc_do_pw(cookie, guess)
-  long *cookie;  
+  long *cookie;
   char *guess;
   { char ktab[9];
     ufc_long *s;
     clearmem(ktab, sizeof ktab);
     (void)strncpy(ktab, guess, 8);
     ufc_mk_keytab(ktab);
-    s = _ufc_doit((ufc_long)0, (ufc_long)0, 
+    s = _ufc_doit((ufc_long)0, (ufc_long)0,
 		  (ufc_long)0, (ufc_long)0, (ufc_long)25);
     cookie[0] = s[0];    cookie[1] = s[1];
     cookie[2] = s[2];    cookie[3] = s[3];
diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/getline.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/getline.c
index 7f6ff038ceb..3168b9ec0d1 100644
--- a/gnu/usr.bin/lynx/WWW/Library/Implementation/getline.c
+++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/getline.c
@@ -17,16 +17,13 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
 /* CHANGED FOR VMS */
-
 /*
  * 
  */
 
-#include "HTUtils.h"
-#include "tcp.h"
-#include 
+#include 
 
-#include "LYLeaks.h"
+#include 
 
 /* Read up to (and including) a newline from STREAM into *LINEPTR
    (and null-terminate it). *LINEPTR is a pointer returned from malloc (or
diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/getpass.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/getpass.c
index a7f0de7b247..f209da77ad6 100644
--- a/gnu/usr.bin/lynx/WWW/Library/Implementation/getpass.c
+++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/getpass.c
@@ -22,14 +22,13 @@ Cambridge, MA 02139, USA.  */
  * 
  */
 
-#include "HTUtils.h"
-/*#include   included by HTUtils.h -- FM */
+#include 
 #include 
 #include 
 #include 
 #include 
 
-#include "LYLeaks.h"
+#include 
 
 PUBLIC char * getpass ARGS1(CONST char *, prompt)
 {
diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/makefile.in b/gnu/usr.bin/lynx/WWW/Library/Implementation/makefile.in
new file mode 100644
index 00000000000..19def689e85
--- /dev/null
+++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/makefile.in
@@ -0,0 +1,305 @@
+#  Make WWW under unix for a.n.other unix system (bsd)
+#   Use this as a template
+
+# For W3 distribution, machine type for subdirectories
+WWW_MACH	= Implementation
+WWWINC		= $(top_srcdir)/WWW/Library/Implementation
+
+ECHO =		@DONT_ECHO_CC@
+LFLAGS =
+
+prefix		= @prefix@
+exec_prefix	= @exec_prefix@
+top_srcdir	= @top_srcdir@
+srcdir		= @srcdir@
+VPATH		= $(srcdir)
+
+LYFLAGS		= # FIXME: set in parent makefile
+
+CC		= @CC@
+DEFS		= @DEFS@
+CPPFLAGS	= @CPPFLAGS@
+
+INTLDIR_CPPFLAGS= @INTLDIR_CPPFLAGS@ -I$(top_srcdir)/intl
+
+CPPOPTS		= $(DEFS) $(CPPFLAGS) $(LYFLAGS) \
+		-I../../.. \
+		-I../../../src \
+		-I$(top_srcdir) \
+		-I$(top_srcdir)/src \
+		$(INTLDIR_CPPFLAGS) -I$(WWWINC)
+
+LY_CFLAGS	= @CFLAGS@
+CFLAGS		= $(CPPOPTS) $(LY_CFLAGS)
+LINT		= @LINT@
+
+# Directory for installed binary:
+BINDIR		= @bindir@
+
+# Where is the W3 object library to be installed (not normally done)?
+#_________________ OK if normal W3 distribution
+# Where is the WWW source root?
+WWW = $(top_srcdir)/WWW
+
+#  Where should temporary (object) files go?
+WTMP = ../..
+
+# (Version.make)
+VC = 2.14
+#______________________________________________________________________
+# (originally CommonMakefile)
+
+#  If this env var is set to something else Some makes will use that instead
+SHELL = /bin/sh
+
+RANLIB	= @RANLIB@
+
+#	.h files are distributed but originally are made from the
+#	self-documenting hypertext files.
+
+.SUFFIXES: .h .html
+.html.h:
+#	- chmod +w $*.h
+	www -w90 -na -to text/x-c $*.html > $*.h
+#	chmod -w $*.h
+
+# If this is actually run in a subdirectory,
+#
+# WWW = ../../..
+# WWW = ../..	For [cernlib] build in this directory
+
+CMN = $(WWW)/Library/Implementation/
+
+# Where shall we put the objects and built library?
+
+LOB = .
+
+# Only needed if HTWAIS.c is to be compiled. Put into your Makefile.include
+#  uncomment these and fill in WAISINC for adding direct wais access
+#  to Lynx.
+#HTWAIS_c = $(CMN)/HTWAIS.c
+#HTWAIS_o = $(LOB)/HTWAIS.o
+#WAIS = YES
+#WAISINC = -I../../../../freeWAIS-0.202/ir
+#WAISCFLAGS = -DDIRECT_WAIS
+#
+
+# XMOsAIC hack is only for server to cope with xmosaic kludge for mmedia
+#
+# add -DNEW_GATEWAY here for the new gateway config stuff
+CFLAGS2 = $(CFLAGS) $(LYFLAGS) $(WAISCFLAGS) -I$(CMN) -DXMOSAIC_HACK -DACCESS_AUTH
+
+COMPILE	= $(ECHO) $(CC) $(CFLAGS2) -c
+
+COMMON = $(LOB)/HTParse.o $(LOB)/HTAccess.o $(LOB)/HTTP.o \
+	$(LOB)/HTFile.o	$(LOB)/HTBTree.o $(LOB)/HTFTP.o $(LOB)/HTTCP.o \
+	$(LOB)/SGML.o $(LOB)/HTMLDTD.o $(LOB)/HTChunk.o \
+	$(LOB)/HTPlain.o \
+	$(LOB)/HTMLGen.o \
+	$(LOB)/HTAtom.o $(LOB)/HTAnchor.o $(LOB)/HTStyle.o \
+	$(LOB)/HTList.o $(LOB)/HTString.o \
+	$(LOB)/HTRules.o $(LOB)/HTFormat.o  $(LOB)/HTMIME.o \
+	$(LOB)/HTNews.o  $(LOB)/HTGopher.o \
+	$(LOB)/HTTelnet.o $(LOB)/HTFinger.o $(LOB)/HTWSRC.o $(HTWAIS_o) \
+	$(LOB)/HTAAUtil.o $(LOB)/HTAABrow.o \
+	$(LOB)/HTGroup.o \
+	$(LOB)/HTAAProt.o \
+	$(LOB)/HTAssoc.o  $(LOB)/HTLex.o    $(LOB)/HTUU.o \
+	$(LOB)/HTDOS.o
+
+CFILES = $(CMN)HTParse.c $(CMN)HTAccess.c $(CMN)HTTP.c $(CMN)HTFile.c \
+	$(CMN)HTBTree.c \
+	$(CMN)HTFTP.c	$(CMN)HTTCP.c	  $(CMN)SGML.c \
+	$(CMN)HTMLDTD.c \
+	$(CMN)HTPlain.c	\
+	$(CMN)HTMLGen.c \
+	$(CMN)HTChunk.c $(CMN)HTAtom.c    $(CMN)HTAnchor.c $(CMN)HTStyle.c \
+	$(CMN)HTList.c  $(CMN)HTString.c  $(CMN)HTRules.c \
+	$(CMN)HTFormat.c $(CMN)HTMIME.c \
+	$(CMN)HTNews.c  $(CMN)HTGopher.c  $(CMN)HTTelnet.c \
+	$(CMN)HTFinger.c $(HTWAIS_c)	  $(CMN)HTWSRC.c \
+	$(CMN)HTAABrow.c \
+	$(CMN)HTGroup.c  \
+	$(CMN)HTAAProt.c \
+	$(CMN)HTAssoc.c  $(CMN)HTLex.c    $(CMN)HTUU.c
+
+HFILES = $(CMN)HTParse.h $(CMN)HTAccess.h $(CMN)HTTP.h $(CMN)HTFile.h \
+	$(CMN)HTBTree.h $(CMN)HTFTP.h $(CMN)HTTCP.h \
+	$(CMN)SGML.h $(CMN)HTML.h $(CMN)HTMLDTD.h $(CMN)HTChunk.h \
+	$(CMN)HTPlain.h	\
+	$(CMN)HTFWriter.h	$(CMN)HTMLGen.h \
+	$(CMN)HTStream.h \
+	$(CMN)HTAtom.h $(CMN)HTAnchor.h $(CMN)HTStyle.h \
+	$(CMN)HTList.h \
+	$(CMN)HTString.h $(CMN)HTRules.h \
+	$(CMN)HTFormat.h $(CMN)HTInit.h \
+	$(CMN)HTMIME.h $(CMN)HTNews.h \
+	$(CMN)HTGopher.h \
+	$(CMN)HTUtils.h $(CMN)tcp.h $(CMN)HText.h \
+	$(CMN)HTTelnet.h $(CMN)HTFinger.h \
+	$(CMN)HTWAIS.h  $(CMN)HTWSRC.h \
+	$(CMN)HTAABrow.h \
+	$(CMN)HTGroup.h  \
+	$(CMN)HTAAProt.h \
+	$(CMN)HTAssoc.h  $(CMN)HTLex.h    $(CMN)HTUU.h
+
+all : $(LOB)/libwww.a
+
+lint:
+	$(LINT) $(LINTOPTS) $(CPPOPTS) $(srcdir)/../Implementation/*.c  > ../../../lint.libwww
+
+.SUFFIXES: .i .h .html
+
+.c.o:
+@RULE_CC@
+	@ECHO_CC@$(CC) $(CPPOPTS) $(CFLAGS) -c $(srcdir)/$*.c
+
+.c.i:
+@RULE_CC@
+	@ECHO_CC@$(CPP) -C $(CPPOPTS) $(srcdir)/$*.c >$@
+
+depend :
+	makedepend -fmakefile -- $(CFLAGS) -- $(CFILES)
+
+#	Library
+#
+#  On SGI, ranlib is unnecessary and does not exist so we ignore errors
+# for that step
+$(LOB)/libwww.a : $(COMMON)
+	ar r $(LOB)/libwww.a $(COMMON)
+	-$(RANLIB) $(LOB)/libwww.a
+
+#	Clean up everything generatable except final products
+clean :
+	rm $(LOB)/*.o
+
+#			Common code
+#			-----------
+
+$(LOB)/HTList.o : $(OE) $(CMN)HTList.c $(CMN)HTUtils.h $(CMN)HTList.h
+	$(COMPILE) $(CMN)HTList.c
+
+$(LOB)/HTAnchor.o : $(OE) $(CMN)HTAnchor.c $(CMN)HTUtils.h $(CMN)HTList.h
+	$(COMPILE) $(CMN)HTAnchor.c
+
+$(LOB)/HTFormat.o : $(OE) $(CMN)HTFormat.c $(CMN)HTUtils.h $(CMN)HTList.h
+	$(COMPILE) $(CMN)HTFormat.c
+
+$(LOB)/HTMIME.o : $(OE) $(CMN)HTMIME.c $(CMN)HTUtils.h $(CMN)HTList.h
+	$(COMPILE) $(CMN)HTMIME.c
+
+$(LOB)/HTNews.o : $(OE) $(CMN)HTNews.c $(CMN)HTUtils.h $(CMN)HTList.h\
+	 $(CMN)HTMLDTD.h
+	$(COMPILE) $(CMN)HTNews.c
+
+$(LOB)/HTGopher.o : $(OE) $(CMN)HTGopher.c $(CMN)HTUtils.h $(CMN)HTList.h \
+	 $(CMN)HTMLDTD.h
+	$(COMPILE) $(CMN)HTGopher.c
+
+$(LOB)/HTTelnet.o : $(OE) $(CMN)HTTelnet.c $(CMN)HTUtils.h $(CMN)HTTelnet.h $(CMN)../../../userdefs.h
+	$(COMPILE) $(CMN)HTTelnet.c
+
+$(LOB)/HTFinger.o : $(OE) $(CMN)HTFinger.c $(CMN)HTUtils.h $(CMN)HTList.h \
+	$(CMN)HTMLDTD.h
+	$(COMPILE) $(CMN)HTFinger.c
+
+$(LOB)/HTStyle.o : $(OE) $(CMN)HTStyle.c $(CMN)HTUtils.h
+	$(COMPILE) $(CMN)HTStyle.c
+
+$(LOB)/HTAtom.o : $(OE) $(CMN)HTAtom.c $(CMN)HTUtils.h $(CMN)HTList.h
+	$(COMPILE) $(CMN)HTAtom.c
+
+$(LOB)/HTChunk.o : $(OE) $(CMN)HTChunk.c $(CMN)HTUtils.h
+	$(COMPILE) $(CMN)HTChunk.c
+
+$(LOB)/HTString.o : $(OE) $(CMN)HTString.c $(CMN)HTUtils.h $(CMN)Version.make
+	$(COMPILE) -DVC=\"$(VC)\" $(CMN)HTString.c
+
+$(LOB)/HTRules.o : $(OE) $(CMN)HTRules.c $(CMN)HTUtils.h $(CMN)Version.make \
+	 $(CMN)HTAAProt.h
+	$(COMPILE) -DVC=\"$(VC)\" $(CMN)HTRules.c
+
+$(LOB)/SGML.o : $(OE) $(CMN)SGML.c $(CMN)HTUtils.h $(CMN)UCAux.h
+	$(COMPILE) $(CMN)SGML.c
+
+$(LOB)/HTMLGen.o : $(OE) $(CMN)HTMLGen.c $(CMN)HTUtils.h $(CMN)HTMLDTD.h
+	$(COMPILE) $(CMN)HTMLGen.c
+
+$(LOB)/HTMLDTD.o : $(OE) $(CMN)HTMLDTD.c $(CMN)SGML.h
+	$(COMPILE) $(CMN)HTMLDTD.c
+
+$(LOB)/HTPlain.o : $(OE) $(CMN)HTPlain.c $(CMN)HTPlain.h $(CMN)HTStream.h \
+	 $(CMN)UCAux.h
+	$(COMPILE) $(CMN)HTPlain.c
+
+$(LOB)/HTWAIS.o : $(OE) $(CMN)HTWAIS.c $(CMN)HTUtils.h $(CMN)HTList.h
+	$(COMPILE) $(WAISINC) $(CMN)HTWAIS.c
+
+$(LOB)/HTWSRC.o : $(OE) $(CMN)HTWSRC.c $(CMN)HTUtils.h $(CMN)HTList.h
+	$(COMPILE) $(CMN)HTWSRC.c
+
+#	Access Authorization
+
+$(LOB)/HTAAUtil.o : $(OE) $(CMN)HTAAUtil.c $(CMN)HTAAUtil.h \
+	 $(CMN)HTUtils.h $(CMN)HTString.h
+	$(COMPILE) $(CMN)HTAAUtil.c
+
+$(LOB)/HTGroup.o : $(OE) $(CMN)HTGroup.c $(CMN)HTGroup.h \
+	 $(CMN)HTAAUtil.h \
+	 $(CMN)HTAssoc.h $(CMN)HTLex.h
+	$(COMPILE) $(CMN)HTGroup.c
+
+$(LOB)/HTAABrow.o : $(OE) $(CMN)HTAABrow.c $(CMN)HTAABrow.h \
+	 $(CMN)HTAAUtil.h $(CMN)HTUU.h \
+	 $(CMN)HTUtils.h $(CMN)HTString.h \
+	 $(CMN)HTParse.h $(CMN)HTList.h \
+	 $(CMN)HTAssoc.h
+	$(COMPILE) $(CMN)HTAABrow.c
+
+$(LOB)/HTAAProt.o : $(OE) $(CMN)HTAAProt.c $(CMN)HTAAProt.h \
+	 $(CMN)HTUtils.h $(CMN)HTAAUtil.h \
+	 $(CMN)HTAssoc.h $(CMN)HTLex.h
+	$(COMPILE) $(CMN)HTAAProt.c
+
+$(LOB)/HTAssoc.o : $(OE) $(CMN)HTAssoc.c $(CMN)HTAssoc.h \
+	$(CMN)HTUtils.h $(CMN)HTString.h $(CMN)HTList.h
+	$(COMPILE) $(CMN)HTAssoc.c
+
+$(LOB)/HTLex.o : $(OE) $(CMN)HTLex.c $(CMN)HTLex.h $(CMN)HTUtils.h
+	$(COMPILE) $(CMN)HTLex.c
+
+$(LOB)/HTUU.o : $(OE) $(CMN)HTUU.c $(CMN)HTUU.h $(CMN)HTUtils.h
+	$(COMPILE) $(CMN)HTUU.c
+
+
+#	Communications & Files
+
+$(LOB)/HTTP.o : $(OE) $(CMN)HTTP.c $(CMN)HTUtils.h $(CMN)HTAABrow.h
+	$(COMPILE) $(CMN)HTTP.c
+
+$(LOB)/HTTCP.o : $(OE) $(CMN)HTTCP.c $(CMN)HTUtils.h
+	$(COMPILE) $(CMN)HTTCP.c
+
+$(LOB)/HTFile.o : $(OE) $(CMN)HTFile.c $(CMN)HTUtils.h \
+	 $(CMN)HTMLDTD.h
+	$(COMPILE) $(CMN)HTFile.c
+
+$(LOB)/HTBTree.o : $(OE) $(CMN)HTBTree.c $(CMN)HTUtils.h
+	$(COMPILE) $(CMN)HTBTree.c
+
+$(LOB)/HTFTP.o : $(OE) $(CMN)HTFTP.c $(CMN)HTUtils.h
+	$(COMPILE) $(CMN)HTFTP.c
+
+$(LOB)/HTAccess.o : $(OE)  $(CMN)HTAccess.c $(CMN)HTUtils.h
+	$(COMPILE) $(CMN)HTAccess.c
+
+$(LOB)/HTParse.o : $(OE) $(CMN)HTParse.c $(CMN)HTUtils.h
+	$(COMPILE) $(CMN)HTParse.c
+
+$(LOB)/HTVMS_WaisUI.o : $(OE) $(CMN)HTVMS_WaisUI.c $(CMN)HTUtils.h
+	$(COMPILE) $(CMN)HTVMS_WaisUI.c
+
+$(LOB)/HTDOS.o : $(OE) $(CMN)HTDOS.c $(CMN)HTUtils.h
+	$(COMPILE) $(CMN)HTDOS.c
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/tcp.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/tcp.h
index 7dde5f34b16..c9d05dfa2a3 100644
--- a/gnu/usr.bin/lynx/WWW/Library/Implementation/tcp.h
+++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/tcp.h
@@ -1,20 +1,20 @@
 /*                System dependencies in the W3 library
                                    SYSTEM DEPENDENCIES
-                                             
-   System-system differences for TCP include files and macros. This
+
+   System-system differences for TCP include files and macros.  This
    file includes for each system the files necessary for network and
    file I/O.  It should be used in conjunction with HTUtils.h to help
    ensure portability across as many platforms and flavors of platforms
    as possible.
-   
+
   AUTHORS
-  
+
   TBL                Tim Berners-Lee, W3 project, CERN, 
   EvA                     Eelco van Asperen 
   MA                      Marc Andreessen NCSA
   AT                      Aleksandar Totic 
   SCW                     Susan C. Weber 
-                         
+
   HISTORY:
   22 Feb 91               Written (TBL) as part of the WWW library.
   16 Jan 92               PC code from EvA
@@ -29,17 +29,13 @@
 #ifndef TCP_H
 #define TCP_H
 
-#ifndef HTUTILS_H
-#include "HTUtils.h"
-#endif /* !HTUTILS_H */
-
 /*
 
 Default values
 
    These values may be reset and altered by system-specific sections
    later on.  there are also a bunch of defaults at the end .
-   
+
  */
 /* Default values of those: */
 #define NETCLOSE close      /* Routine to close a TCP-IP socket         */
@@ -57,75 +53,98 @@ Default values
 #define GOT_PIPE
 #endif /* unix */
 
-typedef struct sockaddr_in SockA;  /* See netinet/in.h */
-
+#define INVSOC (-1)             /* Unix invalid socket */
+		/* NB: newer libwww has something different for Windows */
 
-#ifndef STDIO_H
-#include 
-#define STDIO_H
-#endif /* !STDIO_H */
+typedef struct sockaddr_in SockA;  /* See netinet/in.h */
 
 #ifndef VMS
 #include 
 
-#if HAVE_DIRENT_H
+#if defined(__DJGPP__) || defined(__BORLANDC__)
+#undef HAVE_DIRENT_H
+#define HAVE_DIRENT_H
+#undef HAVE_SYS_FILIO_H
+#endif /* DJGPP or __BORLANDC__ */
+
+#ifdef HAVE_DIRENT_H
 # include 
 # define D_NAMLEN(dirent) strlen((dirent)->d_name)
 # define STRUCT_DIRENT struct dirent
 #else
 # define D_NAMLEN(dirent) (dirent)->d_namlen
 # define STRUCT_DIRENT struct direct
-# define direct dirent	/* FIXME */
-# if HAVE_SYS_NDIR_H
+# ifdef HAVE_SYS_NDIR_H
 #  include 
 # endif
-# if HAVE_SYS_DIR_H
+# ifdef HAVE_SYS_DIR_H
 #  include 
 # endif
-# if HAVE_NDIR_H
+# ifdef HAVE_NDIR_H
 #  include 
 # endif
 #endif /* HAVE_DIRENT_H */
 #endif /* !VMS */
 
-#if TIME_WITH_SYS_TIME
+#ifdef TIME_WITH_SYS_TIME
 # include 
 # include 
 #else
-# if HAVE_SYS_TIME_H
+# ifdef HAVE_SYS_TIME_H
 #  include 
 # else
 #  include 
 # endif
 #endif
 
-#ifdef _AIX
+#if defined(_AIX) && !defined(AIX)
 #define AIX
 #endif /* _AIX */
-#ifdef AIX
+
+#if defined(AIX) && !defined(unix)
 #define unix
 #endif /* AIX */
 
-#if HAVE_FCNTL_H
+#ifdef HAVE_FCNTL_H
 #include 
 #else
-#if HAVE_SYS_FCNTL_H
+#ifdef HAVE_SYS_FCNTL_H
 #include 
 #endif
 #endif
 
-#if HAVE_STRING_H
+#ifdef HAVE_STRING_H
 #include              /* For bzero etc */
 #endif /* HAVE_STRING_H */
 
 /*
 
-  M ACROS FOR CONVERTING CHARACTERS
+  MACROS FOR CONVERTING CHARACTERS
 
  */
 #ifndef TOASCII
+#ifdef EBCDIC  /* S/390 -- gil -- 1327 */
+
+extern       char un_IBM1047[];
+extern unsigned char IBM1047[];
+/* For debugging
+#include 
+#define   TOASCII(c) (assert((c)>=0 && (c)<256), un_IBM1047[c])
+*/ /* for production */
+#define   TOASCII(c) (un_IBM1047[c])
+
+#define FROMASCII(c) (IBM1047[c])
+
+#else  /* EBCDIC */
+
+#if '0' != 48
+ error Host character set is not ASCII.
+#endif
+
 #define TOASCII(c) (c)
 #define FROMASCII(c) (c)
+
+#endif /* EBCDIC */
 #endif /* !TOASCII */
 
 
@@ -136,9 +155,10 @@ IBM-PC running Windows NT
 */
 
 #ifdef _WINDOWS
-#include "fcntl.h"                      /* For HTFile.c */
-#include "sys\types.h"                  /* For HTFile.c */
-#include "sys\stat.h"                   /* For HTFile.c */
+#define _WINDOWS_NSL
+#include                       /* For HTFile.c */
+#include                   /* For HTFile.c */
+#include                    /* For HTFile.c */
 #undef NETREAD
 #undef NETWRITE
 #undef NETCLOSE
@@ -153,7 +173,6 @@ IBM-PC running Windows NT
 #include 
 #include 
 #include 
-#include 
 #include 
 typedef struct sockaddr_in SockA;  /* See netinet/in.h */
 #define EINPROGRESS          (WSABASEERR+36)
@@ -176,23 +195,23 @@ VAX/VMS
 
    Under VMS, there are many versions of TCP-IP. Define one if you do
    not use Digital's UCX product:
-   
+
   UCX                     DEC's "Ultrix connection" (default)
   CMU_TCP                 Available via FTP from sacusr.mp.usbr.gov
   SOCKETSHR		  Eckhart Meyer's interface to NETLIB
   WIN_TCP                 From Wollongong, now GEC software.
   MULTINET                From SRI, became TGV, then Cisco.
   DECNET                  Cern's TCP socket emulation over DECnet
-                           
+
    The last three do not interfere with the
    unix i/o library, and so they need special calls to read, write and
-   close sockets. In these cases the socket number is a VMS channel
+   close sockets.  In these cases the socket number is a VMS channel
    number, so we make the @@@ HORRIBLE @@@ assumption that a channel
    number will be greater than 10 but a unix file descriptor less than
    10.  It works.
-   
+
  */
-#ifdef VMS 
+#ifdef VMS
 
 #ifdef UCX
 #undef IOCTL
@@ -266,11 +285,6 @@ extern int socket_ioctl();
 
 #include 
 
-#ifndef STDIO_H
-#include 
-#define STDIO_H
-#endif /* !STDIO_H */
-
 #include 
 #include 
 #include 
@@ -289,7 +303,6 @@ extern int socket_ioctl();
 */
 extern int multinet_accept();
 extern int multinet_bind();
-extern int bzero();
 extern int multinet_connect();
 extern int multinet_gethostname();
 extern int multinet_getsockname();
@@ -306,6 +319,7 @@ extern char *vms_errno_string();
 #include 
 #include 
 #ifdef __TIME_T
+#undef  __TYPES
 #define __TYPES 1
 #define __TYPES_LOADED 1
 #endif /* __TIME_T */
@@ -318,9 +332,11 @@ extern char *vms_errno_string();
 #endif /* !__SOCKET_TYPEDEFS */
 #include "multinet_root:[multinet.include]errno.h"
 #ifdef __TYPES
+#undef  __TIME_T
 #define __TIME_T 1
 #endif /* __TYPE */
 #ifdef __TIME_LOADED
+#undef  __TIME
 #define __TIME 1  /* to avoid double definitions in in.h */
 #endif /* __TIME_LOADED */
 #include "multinet_root:[multinet.include.sys]time.h"
@@ -348,10 +364,10 @@ struct timeval {
 #include 
 #include 
 #include 
-#include "types.h"  /* for socket.h */
-#include "socket.h"
-#include "dn"
-#include "dnetdb"
+#include   /* for socket.h */
+#include 
+#include 
+#include 
 /* #include "vms.h" */
 #define TCP_INCLUDES_DONE
 #endif /* DECNET */
@@ -445,7 +461,7 @@ struct timeval {
    On VMS machines, the linker needs to be told to put global data sections into
  a data
    segment using these storage classes. (MarkDonszelmann)
-  
+
  */
 #if defined(VAXC) && !defined(__DECC)
 #define GLOBALDEF globaldef
@@ -483,26 +499,23 @@ struct timeval {
 #define NETREAD read_s
 #undef NETCLOSE
 #define NETCLOSE close_s
+#define getsockname getsockname_s
+#ifdef HAVE_GETTEXT
+#define gettext gettext__
 #endif
+#endif /* DJGPP */
 
-/*
-SCO ODT unix version
- */
-#if HAVE_UNISTD_H
+#ifdef HAVE_UNISTD_H
 #include 
 #endif /* HAVE_UNISTD_H */
 
-#if HAVE_SYS_FILIO_H
+#ifdef HAVE_SYS_FILIO_H
 #include 
 #endif /* HAVE_SYS_FILIO_H */
 
-/*
-MIPS unix
- */
-/* Mips hack (bsd4.3/sysV mixture...) */
-#ifdef mips
+#ifdef DECL_ERRNO
 extern int errno;
-#endif /* mips */
+#endif /* DECL_ERRNO */
 
 /*
 Regular BSD unix versions
@@ -511,11 +524,13 @@ Regular BSD unix versions
  */
 #ifndef INCLUDES_DONE
 #include 
-/* #include                  not ultrix */
-#if HAVE_STRING_H
+#ifdef HAVE_STRING_H
 #include 
 #endif /* HAVE_STRING_H */
 #include           /* independent */
+#ifdef __MVS__  /* S/390 -- gil -- 1361 */
+#include 
+#endif /* __MVS__ */
 #ifdef SCO
 #include 
 #include 
@@ -525,18 +540,20 @@ Regular BSD unix versions
 #endif /* AIX || SVR4 */
 #include        /* independent */
 #include 
+#ifndef __MVS__  /* S/390 -- gil -- 1373 */
 #include 
+#endif /* __MVS__ */
 #include        /* For open() etc */
+
 #if defined(NeXT) || defined(sony_news)
 #ifndef mode_t
 typedef unsigned short mode_t;
 #endif /* !mode_t */
+
 #ifndef pid_t
 typedef int pid_t;
 #endif /* !pid_t */
-#ifndef S_ISREG
-#define S_ISREG(m) (((m) & 0170000) == 0100000)
-#endif /* S_ISREG */
+
 #ifndef WEXITSTATUS
 #ifdef sony_news
 #define WEXITSTATUS(s) WIFEXITED(s)
@@ -544,6 +561,7 @@ typedef int pid_t;
 #define WEXITSTATUS(s) (((s).w_status >> 8) & 0377)
 #endif /* sony_news */
 #endif /* !WEXITSTATUS */
+
 #ifndef WTERMSIG
 #ifdef sony_news
 #define WTERMSIG(s) (s).w_termsig
@@ -551,7 +569,9 @@ typedef int pid_t;
 #define WTERMSIG(s) (((s).w_status >> 8) & 0177)
 #endif /* sony_news */
 #endif /* !WTERMSIG */
+
 #endif /* NeXT || sony_news */
+
 #define INCLUDES_DONE
 #endif  /* Normal includes */
 
@@ -593,28 +613,6 @@ typedef int pid_t;
 
 #else
 
-/* FIXME: remove after completing configure-script */
-#ifdef unix                    /* if this is to compile on a UNIX machine */
-#define HAVE_READDIR 1    /* if directory reading functions are available */
-#ifdef USE_DIRENT             /* sys v version */
-#include 
-#define direct dirent
-#else
-#include 
-#endif /* USE_DIRENT */
-#if defined(sun) && defined(__svr4__)
-#include 
-#include 
-#else
-#if defined(__hpux) || defined(LINUX) || defined (__FreeBSD__) 
-#include 
-#endif /* __hpux || LINUX || __FreeBSD__ */
-#endif /* sun && __svr4__ */
-#if !defined(MAXINT) && defined(INT_MAX)
-#define MAXINT INT_MAX
-#endif /* !MAXINT && INT_MAX */
-#endif /* unix */
-
 #ifndef VM
 #ifndef VMS
 #ifndef THINK_C
@@ -625,6 +623,14 @@ typedef int pid_t;
 
 #endif /* !HAVE_CONFIG_H */
 
+#ifdef HAVE_LIBINTL_H
+#include 
+#endif
+
+#ifndef HAVE_GETTEXT
+#define gettext(s) s
+#endif
+
 /*
 Defaults
 ========
@@ -642,6 +648,70 @@ Defaults
 #include 
 #endif  /* TCP includes */
 
+#ifndef S_ISLNK
+#define S_ISLNK(m)	(((m) & S_IFMT) == S_IFLNK)
+#endif /* S_ISLNK */
+
+#ifndef S_ISDIR
+#define S_ISDIR(m)	(((m) & S_IFMT) == S_IFDIR)
+#endif /* S_ISDIR */
+
+#ifndef S_ISREG
+#define S_ISREG(m)	(((m) & S_IFMT) == S_IFREG)
+#endif /* S_ISREG */
+
+#ifndef S_ISUID
+#define S_ISUID  0004000
+#endif
+#ifndef S_ISGID
+#define S_ISGID  0002000
+#endif
+#ifndef S_ISVTX
+#define S_ISVTX  0001000
+#endif
+
+#ifndef S_IRWXU
+#define S_IRWXU 00700
+#endif
+
+#ifndef S_IRUSR
+#define S_IRUSR 00400
+#endif
+#ifndef S_IWUSR
+#define S_IWUSR 00200
+#endif
+#ifndef S_IXUSR
+#define S_IXUSR 00100
+#endif
+
+#ifndef S_IRWXG
+#define S_IRWXG 00070
+#endif
+
+#ifndef S_IRGRP
+#define S_IRGRP 00040
+#endif
+#ifndef S_IWGRP
+#define S_IWGRP 00020
+#endif
+#ifndef S_IXGRP
+#define S_IXGRP 00010
+#endif
+
+#ifndef S_IRWXO
+#define S_IRWXO 00007
+#endif
+
+#ifndef S_IROTH
+#define S_IROTH 00004
+#endif
+#ifndef S_IWOTH
+#define S_IWOTH 00002
+#endif
+#ifndef S_IXOTH
+#define S_IXOTH 00001
+#endif
+
 /*
 
 ROUGH ESTIMATE OF MAX PATH LENGTH
diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/ufc-crypt.h b/gnu/usr.bin/lynx/WWW/Library/Implementation/ufc-crypt.h
index 13da8b4737d..a7cf7d4fc0a 100644
--- a/gnu/usr.bin/lynx/WWW/Library/Implementation/ufc-crypt.h
+++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/ufc-crypt.h
@@ -12,20 +12,20 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Library General Public License for more details.
- 
+
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the Free
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  * @(#)ufc-crypt.h	1.16 09/21/92
  *
- * Definitions of datatypes 
- * 
+ * Definitions of datatypes
+ *
  */
 
-/* 
+/*
  * Requirements for datatypes:
- * 
+ *
  * A datatype 'ufc_long' of at least 32 bit
  * *and*
  *   A type 'long32' of exactly 32 bits (_UFC_32_)
@@ -54,9 +54,9 @@ typedef long long     long64;
 #endif
 
 #ifdef ksr
-/* 
+/*
  * Note - the KSR machine does not define a unique symbol
- * which we can check. So you MUST add '-Dksr' to your Makefile.
+ * which we can check.  So you MUST add '-Dksr' to your Makefile.
  * Thanks to lijewski@theory.tc.cornell.edu (Mike Lijewski) for
  * the patch.
  */
diff --git a/gnu/usr.bin/lynx/WWW/Library/apollo_m68k/Makefile b/gnu/usr.bin/lynx/WWW/Library/apollo_m68k/Makefile
deleted file mode 100644
index 20aa9ac8cd4..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/apollo_m68k/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-#  Make WWW for apollo   NOTE WWW macro changed for unwritable source tree **
-#
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = apollo_m68k
-
-# For ASIS installation, the ASIS code for the machine/os
-ASIS_MACH = apollo-68k/sr-10.3
-
-
-CFLAGS =  -O  -DDEBUG
-LFLAGS =
-CC = cc
-LFLAGS =
-
-# Directory for installed binary:
-BINDIR = /usr/local/bin
-
-
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-#WWW = /user/timbl/hypertext/WWW
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-
-# Where is the W3 object library?
-# LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
-LIBDIR = /tmp/WWWLibrary_Build
-
-include $(WWW)/Library/Implementation/CommonMakefile
-
-
-
-
diff --git a/gnu/usr.bin/lynx/WWW/Library/clix/Makefile b/gnu/usr.bin/lynx/WWW/Library/clix/Makefile
deleted file mode 100644
index e1996d27019..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/clix/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-#  Make WWW under unix for a.n.other unix system (bsd)
-#   Use this as a template
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = clix
-
-# The ASIS repository's name for the machine we are on
-ASIS_MACH = hardware/os
-
-
-CFLAGS =  -O -DDEBUG -DUSG -DUNIX -DCLIX
-LFLAGS =
-CC = cc
-
-# Directory for installed binary:
-BINDIR = /usr/local/bin
-
-# Where is the W3 object library to be installed (not normally done)?
-LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-
-include $(WWW)/Library/Implementation/CommonMakefile
-
diff --git a/gnu/usr.bin/lynx/WWW/Library/convex/Makefile b/gnu/usr.bin/lynx/WWW/Library/convex/Makefile
deleted file mode 100644
index fcd28786696..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/convex/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#  Make WWW under ConvexOS
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = convex
-
-# The ASIS repository's name for the machine we are on
-ASIS_MACH = hardware/os
-
-
-CFLAGS =  -O -DDEBUG -Dunix
-LFLAGS =
-CC = cc
-
-# Directory for installed binary:
-BINDIR = /usr/local/bin
-
-# Where is the W3 object library to be installed (not normally done)?
-LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-# HTWAIS = $(LOB)/HTWAIS.o
-# WAIS = YES
-# WAISINC = -I/tmp/freeWAIS-0.202/ir
-# WAISCFLAGS = -DDIRECT_WAIS 
-
-include $(WWW)/Library/Implementation/CommonMakefile
diff --git a/gnu/usr.bin/lynx/WWW/Library/decstation/Makefile b/gnu/usr.bin/lynx/WWW/Library/decstation/Makefile
deleted file mode 100644
index b35d278cd38..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/decstation/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-#	Platform-specific Makefile for W3 Library	(decstation)
-#	-----------------------------------------
-#
-
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-
-#CFLAGS = 
-CFLAGS =  -O
-CC = cc
-#LFLAGS = -lresolv
-LFLAGS = 
-
-ASIS_MACH = dec-station/ultrix-4.2
-WWW_MACH = decstation
-
-# Directory for installed binary:
-LIBDIR = /usr/local/lib
-
-include $(WWW)/Library/Implementation/CommonMakefile
diff --git a/gnu/usr.bin/lynx/WWW/Library/djgpp/CommonMakefile b/gnu/usr.bin/lynx/WWW/Library/djgpp/CommonMakefile
index 1fdaf314799..f4bdad38263 100644
--- a/gnu/usr.bin/lynx/WWW/Library/djgpp/CommonMakefile
+++ b/gnu/usr.bin/lynx/WWW/Library/djgpp/CommonMakefile
@@ -12,7 +12,7 @@
 #	make uninstall	Unlink installed version from the system
 #	make clean	Remove intermediate files
 #	make cleanall	Remove intremediate files and products
-#	
+#
 # Macros required to be defined already for make:
 #
 # CC		The C compiler
@@ -20,7 +20,7 @@
 # LFLAGS	Flags for ld
 # LYFLAGS	Flags for Lynx
 #
-# WWW           The WWW source tree directory
+# WWW		The WWW source tree directory
 #
 # Macros needed for make install:
 #
@@ -57,11 +57,11 @@ LOB = $(WTMP)/Library/$(WWW_MACH)
 #HTWAIS = $(LOB)/HTWAIS.o
 #WAIS = YES
 #WAISINC = -I../../../../freeWAIS-0.202/ir
-#WAISCFLAGS = -DDIRECT_WAIS 
+#WAISCFLAGS = -DDIRECT_WAIS
 #
 
 # This path, if relative, is taken relative to the directory
-# in which this makefile is, not the pwd.  This screws up the 
+# in which this makefile is, not the pwd.  This screws up the
 # recursive invocation
 # include $(CMN)Version.make
 include $(ABS)$(WWW)/Library/Implementation/Version.make
@@ -69,59 +69,59 @@ include $(ABS)$(WWW)/Library/Implementation/Version.make
 # XMOsAIC hack is only for server to cope with xmosaic kludge for mmedia
 #
 # add -DNEW_GATEWAY here for the new gateway config stuff
-CFLAGS2 = $(CFLAGS) $(LYFLAGS) $(WAISCFLAGS) -I$(CMN) -DXMOSAIC_HACK -DACCESS_AUTH 
+CFLAGS2 = $(CFLAGS) $(LYFLAGS) $(WAISCFLAGS) -I$(CMN) -DXMOSAIC_HACK -DACCESS_AUTH
 
 CERNLIBBIN = $(WWW)/bin
 
 COMMON = $(LOB)/HTParse.o $(LOB)/HTAccess.o $(LOB)/HTTP.o \
 	$(LOB)/HTFile.o	$(LOB)/HTBTree.o $(LOB)/HTFTP.o $(LOB)/HTTCP.o \
 	$(LOB)/SGML.o $(LOB)/HTMLDTD.o $(LOB)/HTChunk.o \
-	$(LOB)/HTPlain.o $(LOB)/HTWriter.o \
+	$(LOB)/HTPlain.o \
 	$(LOB)/HTMLGen.o \
 	$(LOB)/HTAtom.o $(LOB)/HTAnchor.o $(LOB)/HTStyle.o \
-        $(LOB)/HTList.o $(LOB)/HTString.o $(LOB)/HTDOS.o \
+	$(LOB)/HTList.o $(LOB)/HTString.o $(LOB)/HTDOS.o \
 	$(LOB)/HTRules.o $(LOB)/HTFormat.o  $(LOB)/HTMIME.o \
-	$(LOB)/HTHistory.o $(LOB)/HTNews.o $(LOB)/HTGopher.o \
+	$(LOB)/HTNews.o $(LOB)/HTGopher.o \
 	$(LOB)/HTTelnet.o $(LOB)/HTFinger.o $(LOB)/HTWSRC.o $(HTWAIS) \
-	$(LOB)/HTAAUtil.o $(LOB)/HTAAServ.o $(LOB)/HTAABrow.o \
-	$(LOB)/HTAAFile.o $(LOB)/HTPasswd.o $(LOB)/HTGroup.o  \
-	$(LOB)/HTACL.o    $(LOB)/HTAuth.o   $(LOB)/HTAAProt.o \
+	$(LOB)/HTAAUtil.o $(LOB)/HTAABrow.o \
+	$(LOB)/HTGroup.o  \
+	$(LOB)/HTAAProt.o \
 	$(LOB)/HTAssoc.o  $(LOB)/HTLex.o    $(LOB)/HTUU.o
 
 CFILES = $(CMN)HTParse.c $(CMN)HTAccess.c $(CMN)HTTP.c $(CMN)HTFile.c \
-        $(CMN)HTBTree.c \
-	$(CMN)HTFTP.c   $(CMN)HTTCP.c     $(CMN)SGML.c \
+	$(CMN)HTBTree.c \
+	$(CMN)HTFTP.c	 $(CMN)HTTCP.c	   $(CMN)SGML.c \
 	$(CMN)HTMLDTD.c \
-	$(CMN)HTPlain.c	$(CMN)HTWriter.c  \
-        $(CMN)HTDOS.c  $(CMN)HTMLGen.c \
-	$(CMN)HTChunk.c $(CMN)HTAtom.c   $(CMN)HTAnchor.c $(CMN)HTStyle.c \
-	$(CMN)HTList.c  $(CMN)HTString.c $(CMN)HTRules.c \
-	$(CMN)HTFormat.c $(CMN)HTMIME.c $(CMN)HTHistory.c \
-	$(CMN)HTNews.c  $(CMN)HTGopher.c $(CMN)HTTelnet.c \
-	$(CMN)HTFinger.c $(CMN)HTWAIS.c  $(CMN)HTWSRC.c \
-	$(CMN)HTAAUtil.c $(CMN)HTAAServ.c $(CMN)HTAABrow.c \
-	$(CMN)HTAAFile.c $(CMN)HTPasswd.c $(CMN)HTGroup.c  \
-	$(CMN)HTACL.c    $(CMN)HTAuth.c   $(CMN)HTAAProt.c \
+	$(CMN)HTPlain.c	 \
+	$(CMN)HTDOS.c	 $(CMN)HTMLGen.c \
+	$(CMN)HTChunk.c	 $(CMN)HTAtom.c	  $(CMN)HTAnchor.c $(CMN)HTStyle.c \
+	$(CMN)HTList.c	 $(CMN)HTString.c $(CMN)HTRules.c \
+	$(CMN)HTFormat.c $(CMN)HTMIME.c \
+	$(CMN)HTNews.c	 $(CMN)HTGopher.c $(CMN)HTTelnet.c \
+	$(CMN)HTFinger.c $(CMN)HTWAIS.c	  $(CMN)HTWSRC.c \
+	$(CMN)HTAAUtil.c $(CMN)HTAABrow.c \
+	$(CMN)HTGroup.c  \
+	$(CMN)HTAAProt.c \
 	$(CMN)HTAssoc.c  $(CMN)HTLex.c    $(CMN)HTUU.c
 
 HFILES = $(CMN)HTParse.h $(CMN)HTAccess.h $(CMN)HTTP.h $(CMN)HTFile.h \
 	$(CMN)HTBTree.h $(CMN)HTFTP.h $(CMN)HTTCP.h \
 	$(CMN)SGML.h $(CMN)HTML.h $(CMN)HTMLDTD.h $(CMN)HTChunk.h \
-	$(CMN)HTPlain.h		$(CMN)HTWriter.h \
-        $(CMN)HTFWriter.h       $(CMN)HTMLGen.h $(CMN)HTDOS.h \
+	$(CMN)HTPlain.h	\
+	$(CMN)HTFWriter.h	$(CMN)HTMLGen.h $(CMN)HTDOS.h \
 	$(CMN)HTStream.h \
 	$(CMN)HTAtom.h $(CMN)HTAnchor.h $(CMN)HTStyle.h \
 	$(CMN)HTList.h \
-	$(CMN)HTString.h $(CMN)HTAlert.h $(CMN)HTRules.h \
+	$(CMN)HTString.h $(CMN)HTRules.h \
 	$(CMN)HTFormat.h $(CMN)HTInit.h \
-	$(CMN)HTMIME.h $(CMN)HTHistory.h $(CMN)HTNews.h \
+	$(CMN)HTMIME.h $(CMN)HTNews.h \
 	$(CMN)HTGopher.h \
 	$(CMN)HTUtils.h $(CMN)tcp.h $(CMN)HText.h \
 	$(CMN)HTTelnet.h $(CMN)HTFinger.h \
 	$(CMN)HTWAIS.h  $(CMN)HTWSRC.h \
-	$(CMN)HTAAUtil.h $(CMN)HTAAServ.h $(CMN)HTAABrow.h \
-	$(CMN)HTAAFile.h $(CMN)HTPasswd.h $(CMN)HTGroup.h  \
-	$(CMN)HTACL.h    $(CMN)HTAuth.h   $(CMN)HTAAProt.h \
+	$(CMN)HTAAUtil.h $(CMN)HTAABrow.h \
+	$(CMN)HTGroup.h  \
+	$(CMN)HTAAProt.h \
 	$(CMN)HTAssoc.h  $(CMN)HTLex.h    $(CMN)HTUU.h
 
 SOURCES = $(CFILES) $(HFILES) $(CMN)Version.make \
@@ -146,7 +146,7 @@ $(LOB)/libwww.a : $(COMMON)
 
 #	Clean up everything generatable except final products
 clean :
-	rm $(LOB)/*.o 
+	rm $(LOB)/*.o
 	-rmdir $(LOB)
 
 #	Clean up everything generatable including final products
@@ -159,7 +159,7 @@ cleanall : clean
 install : libwww.a
 	if [ ! -r $(LIBDIR) ] mkdir $(LIBDIR)
 	cp libwww.a $(LIBDIR)/libwww.a
-	
+
 uninstall :
 	rm $(LIBDIR)/libwww.a
 
@@ -209,163 +209,130 @@ $(WWW)/Copyright.txt : $(WWW)/../Copyright.html
 /pub/www/Copyright.txt : $(WWW)/Copyright.txt
 	cp $(WWW)/Copyright.txt /pub/www/Copyright.txt
 
-# 			Common code
+#			Common code
 #			-----------
 
 #	Directory for object files
 
 $(LOB)/HTList.o : $(OE) $(CMN)HTList.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTList.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTList.c
 
 $(LOB)/HTAnchor.o : $(OE) $(CMN)HTAnchor.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAnchor.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTAnchor.c
 
 $(LOB)/HTFormat.o : $(OE) $(CMN)HTFormat.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFormat.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTFormat.c
 
 $(LOB)/HTMIME.o : $(OE) $(CMN)HTMIME.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMIME.c
-
-$(LOB)/HTHistory.o : $(OE) $(CMN)HTHistory.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTHistory.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTMIME.c
 
 $(LOB)/HTDOS.o : $(OE) $(CMN)HTDOS.c $(CMN)HTUtils.h $(CMN)../../../userdefs.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTDOS.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTDOS.c
 
 $(LOB)/HTNews.o : $(OE) $(CMN)HTNews.c $(CMN)HTUtils.h $(CMN)HTList.h\
 	 $(CMN)HTMLDTD.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTNews.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTNews.c
 
 $(LOB)/HTGopher.o : $(OE) $(CMN)HTGopher.c $(CMN)HTUtils.h $(CMN)HTList.h \
 	 $(CMN)HTMLDTD.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTGopher.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTGopher.c
 
 $(LOB)/HTTelnet.o : $(OE) $(CMN)HTTelnet.c $(CMN)HTUtils.h $(CMN)HTTelnet.h $(CMN)../../../userdefs.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTelnet.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTTelnet.c
 
 $(LOB)/HTFinger.o : $(OE) $(CMN)HTFinger.c $(CMN)HTUtils.h $(CMN)HTList.h \
 	$(CMN)HTMLDTD.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFinger.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTFinger.c
 
 $(LOB)/HTStyle.o : $(OE) $(CMN)HTStyle.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTStyle.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTStyle.c
 
 $(LOB)/HTAtom.o : $(OE) $(CMN)HTAtom.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAtom.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTAtom.c
 
 $(LOB)/HTChunk.o : $(OE) $(CMN)HTChunk.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTChunk.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTChunk.c
 
 $(LOB)/HTString.o : $(OE) $(CMN)HTString.c $(CMN)HTUtils.h $(CMN)Version.make
-	$(CC) -c -o $@ $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTString.c
+	$(CC) -c  $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTString.c
 
 $(LOB)/HTRules.o : $(OE) $(CMN)HTRules.c $(CMN)HTUtils.h $(CMN)Version.make \
-	 $(CMN)HTAAServ.h $(CMN)HTAAProt.h
-	$(CC) -c -o $@ $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTRules.c
+	 $(CMN)HTAAProt.h
+	$(CC) -c  $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTRules.c
 
 $(LOB)/SGML.o : $(OE) $(CMN)SGML.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)SGML.c
+	$(CC) -c  $(CFLAGS2) $(CMN)SGML.c
 
 $(LOB)/HTMLGen.o : $(OE) $(CMN)HTMLGen.c $(CMN)HTUtils.h $(CMN)HTMLDTD.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMLGen.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTMLGen.c
 
 $(LOB)/HTMLDTD.o : $(OE) $(CMN)HTMLDTD.c $(CMN)SGML.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMLDTD.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTMLDTD.c
 
 $(LOB)/HTPlain.o : $(OE) $(CMN)HTPlain.c $(CMN)HTPlain.h $(CMN)HTStream.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTPlain.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTPlain.c
 
 $(LOB)/HTWAIS.o : $(OE) $(CMN)HTWAIS.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(WAISINC) $(CMN)HTWAIS.c
+	$(CC) -c  $(CFLAGS2) $(WAISINC) $(CMN)HTWAIS.c
 
 $(LOB)/HTWSRC.o : $(OE) $(CMN)HTWSRC.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTWSRC.c
-
-$(LOB)/HTWriter.o : $(OE) $(CMN)HTWriter.c $(CMN)HTWriter.h $(CMN)HTStream.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTWriter.c
-
+	$(CC) -c  $(CFLAGS2) $(CMN)HTWSRC.c
 
 #	Access Authorization
 
 $(LOB)/HTAAUtil.o : $(OE) $(CMN)HTAAUtil.c $(CMN)HTAAUtil.h \
 	 $(CMN)HTUtils.h $(CMN)HTString.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAAUtil.c
-
-$(LOB)/HTAAFile.o : $(OE) $(CMN)HTAAFile.c $(CMN)HTAAFile.h \
-	 $(CMN)HTAAUtil.h $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAAFile.c
-
-$(LOB)/HTPasswd.o : $(OE) $(CMN)HTPasswd.c $(CMN)HTPasswd.h \
-	 $(CMN)HTAAUtil.h $(CMN)HTAAFile.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTPasswd.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTAAUtil.c
 
 $(LOB)/HTGroup.o : $(OE) $(CMN)HTGroup.c $(CMN)HTGroup.h \
-	 $(CMN)HTAAUtil.h $(CMN)HTAAFile.h \
+	 $(CMN)HTAAUtil.h \
 	 $(CMN)HTAssoc.h $(CMN)HTLex.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTGroup.c
-
-$(LOB)/HTACL.o : $(OE) $(CMN)HTACL.c $(CMN)HTACL.h \
-	 $(CMN)HTAAUtil.h $(CMN)HTAAFile.h $(CMN)HTGroup.h \
-	 $(CMN)HTAssoc.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTACL.c
-
-$(LOB)/HTAuth.o : $(OE) $(CMN)HTAuth.c $(CMN)HTAuth.h \
-	 $(CMN)HTAAUtil.h $(CMN)HTPasswd.h $(CMN)HTAAFile.h \
-	 $(CMN)HTAssoc.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAuth.c
-
-$(LOB)/HTAAServ.o : $(OE) $(CMN)HTAAServ.c $(CMN)HTAAServ.h \
-	$(CMN)HTAAUtil.h $(CMN)HTAAFile.h $(CMN)HTPasswd.h \
-	 $(CMN)HTGroup.h $(CMN)HTACL.h $(CMN)HTAuth.h \
-	 $(CMN)HTUU.h $(CMN)HTParse.h $(CMN)HTList.h \
-	 $(CMN)HTUtils.h $(CMN)HTString.h $(CMN)HTRules.h \
-	 $(CMN)HTAAProt.h $(CMN)HTAssoc.h $(CMN)HTLex.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAAServ.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTGroup.c
 
 $(LOB)/HTAABrow.o : $(OE) $(CMN)HTAABrow.c $(CMN)HTAABrow.h \
 	 $(CMN)HTAAUtil.h $(CMN)HTUU.h \
 	 $(CMN)HTUtils.h $(CMN)HTString.h \
-	 $(CMN)HTParse.h $(CMN)HTList.h $(CMN)HTAlert.h \
+	 $(CMN)HTParse.h $(CMN)HTList.h \
 	 $(CMN)HTAssoc.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAABrow.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTAABrow.c
 
 $(LOB)/HTAAProt.o : $(OE) $(CMN)HTAAProt.c $(CMN)HTAAProt.h \
-	 $(CMN)HTUtils.h $(CMN)HTAAUtil.h $(CMN)HTAAFile.h \
+	 $(CMN)HTUtils.h $(CMN)HTAAUtil.h \
 	 $(CMN)HTAssoc.h $(CMN)HTLex.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAAProt.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTAAProt.c
 
 $(LOB)/HTAssoc.o : $(OE) $(CMN)HTAssoc.c $(CMN)HTAssoc.h \
 	$(CMN)HTUtils.h $(CMN)HTString.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAssoc.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTAssoc.c
 
 $(LOB)/HTLex.o : $(OE) $(CMN)HTLex.c $(CMN)HTLex.h $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTLex.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTLex.c
 
 $(LOB)/HTUU.o : $(OE) $(CMN)HTUU.c $(CMN)HTUU.h $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTUU.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTUU.c
 
 
 #	Communications & Files
 
 $(LOB)/HTTP.o : $(OE) $(CMN)HTTP.c $(CMN)HTUtils.h $(CMN)HTAABrow.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTP.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTTP.c
 
 $(LOB)/HTTCP.o : $(OE) $(CMN)HTTCP.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTCP.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTTCP.c
 
 $(LOB)/HTFile.o : $(OE) $(CMN)HTFile.c $(CMN)HTUtils.h \
-	 $(CMN)HTMLDTD.h $(CMN)HTAAServ.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFile.c
+	 $(CMN)HTMLDTD.h
+	$(CC) -c  $(CFLAGS2) $(CMN)HTFile.c
 
 $(LOB)/HTBTree.o : $(OE) $(CMN)HTBTree.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTBTree.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTBTree.c
 
 $(LOB)/HTFTP.o : $(OE) $(CMN)HTFTP.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFTP.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTFTP.c
 
 $(LOB)/HTAccess.o : $(OE)  $(CMN)HTAccess.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAccess.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTAccess.c
 
 $(LOB)/HTParse.o : $(OE) $(CMN)HTParse.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTParse.c
+	$(CC) -c  $(CFLAGS2) $(CMN)HTParse.c
 
diff --git a/gnu/usr.bin/lynx/WWW/Library/djgpp/makefile b/gnu/usr.bin/lynx/WWW/Library/djgpp/makefile
index d7272e45eca..06e6f2e782b 100644
--- a/gnu/usr.bin/lynx/WWW/Library/djgpp/makefile
+++ b/gnu/usr.bin/lynx/WWW/Library/djgpp/makefile
@@ -7,8 +7,14 @@ WWW_MACH = djgpp
 # The ASIS repository's name for the machine we are on
 #ASIS_MACH = hardware/os
 
-CFLAGS = -O3 -DUSE_ZLIB -DDOSPATH -DNOUSERS -DDEBUG -I../../../djgpp/tcplib/include -I../../../djgpp/tcplib/include/tcp \
--I../../../src -I../../..
+CFLAGS = -O3 -DUSE_ZLIB -DDOSPATH -DNOUSERS -DDISP_PARTIAL \
+-DSOURCE_CACHE -DUSE_PSRC \
+-I../Implementation \
+-I../../../djgpp/tcplib/include \
+-I../../../djgpp/tcplib/include/tcp \
+-I../../../curses \
+-I../../../src \
+-I../../..
 LFLAGS =
 CC = gcc
 
diff --git a/gnu/usr.bin/lynx/WWW/Library/sco/Makefile b/gnu/usr.bin/lynx/WWW/Library/djgpp/makefile.sla
similarity index 50%
rename from gnu/usr.bin/lynx/WWW/Library/sco/Makefile
rename to gnu/usr.bin/lynx/WWW/Library/djgpp/makefile.sla
index a00a948b069..67e3171a74f 100644
--- a/gnu/usr.bin/lynx/WWW/Library/sco/Makefile
+++ b/gnu/usr.bin/lynx/WWW/Library/djgpp/makefile.sla
@@ -2,21 +2,24 @@
 #   Use this as a template
 
 # For W3 distribution, machine type for subdirectories
-WWW_MACH = sco
+WWW_MACH = djgpp
 
 # The ASIS repository's name for the machine we are on
-#  SCO does not presently have ranlib.  Ignore the error
-#  message about that when the CommonMakefile tries to
-#  invoke it.
-ASIS_MACH = intel/sco
-
-
-CFLAGS =  -O -DDEBUG -DSVR4
+#ASIS_MACH = hardware/os
+
+CFLAGS = -O3 -DUSE_SLANG -DUSE_ZLIB -DDOSPATH -DNOUSERS -DDISP_PARTIAL \
+-DSOURCE_CACHE -DUSE_PSRC \
+-I../Implementation \
+-I../../../djgpp/tcplib/include \
+-I../../../djgpp/tcplib/include/tcp \
+-I../../../src \
+-I../../.. $(SLANGINC) $(INTLFLAGS)
 LFLAGS =
-CC = cc
+CC = gcc
+#INTLFLAGS = -DHAVE_GETTEXT -DHAVE_LIBINTL_H
 
 # Directory for installed binary:
-BINDIR = /usr/local/bin
+!BINDIR = /usr/local/bin
 
 # Where is the W3 object library to be installed (not normally done)?
 LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
@@ -28,6 +31,6 @@ WWW = ../..
 #  Where should temporary (object) files go?
 WTMP = ../..
 
-
-include $(WWW)/Library/Implementation/CommonMakefile
-
+include $(WWW)/Library/Implementation/Version.make
+#include $(WWW)/Library/Implementation/CommonMakefile
+include ./CommonMakefile
diff --git a/gnu/usr.bin/lynx/WWW/Library/duns/Makefile b/gnu/usr.bin/lynx/WWW/Library/duns/Makefile
deleted file mode 100644
index 4852817e856..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/duns/Makefile
+++ /dev/null
@@ -1,489 +0,0 @@
-# Makefile generated by imake - do not edit!
-# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
-#
-# The cpp used on this machine replaces all newlines and multiple tabs and
-# spaces in a macro expansion with a single space.  Imake tries to compensate
-# for this, but is not always successful.
-#
-
-###########################################################################
-# Makefile generated from "Imake.tmpl" and 
-# $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $
-#
-# Platform-specific parameters may be set in the appropriate .cf
-# configuration files.  Site-wide parameters may be set in the file
-# site.def.  Full rebuilds are recommended if any parameters are changed.
-#
-# If your C preprocessor doesn't define any unique symbols, you'll need
-# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
-# "make Makefile", "make Makefiles", or "make World").
-#
-# If you absolutely can't get imake to work, you'll need to set the
-# variables at the top of each Makefile as well as the dependencies at the
-# bottom (makedepend will do this automatically).
-#
-
-###########################################################################
-# platform-specific configuration parameters - edit sun.cf to change
-
-# platform:  $XConsortium: sun.cf,v 1.38 89/12/23 16:10:10 jim Exp $
-# operating system:  SunOS 4.0.3
-
-###########################################################################
-# site-specific configuration parameters - edit site.def to change
-
-            SHELL = /bin/sh
-
-              TOP = .
-      CURRENT_DIR = .
-
-               AR = ar clq
-  BOOTSTRAPCFLAGS =
-               CC = cc
-
-         COMPRESS = compress
-              CPP = /lib/cpp $(STD_CPP_DEFINES)
-    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
-          INSTALL = install
-               LD = ld
-             LINT = lint
-      LINTLIBFLAG = -C
-         LINTOPTS = -axz
-               LN = ln -s
-             MAKE = make
-               MV = mv
-               CP = cp
-           RANLIB = ranlib
-  RANLIBINSTFLAGS =
-               RM = rm -f
-     STD_INCLUDES =
-  STD_CPP_DEFINES =
-      STD_DEFINES =
- EXTRA_LOAD_FLAGS =
-  EXTRA_LIBRARIES =
-             TAGS = ctags
-
-    SHAREDCODEDEF = -DSHAREDCODE
-         SHLIBDEF = -DSUNSHLIB
-
-    PROTO_DEFINES =
-
-     INSTPGMFLAGS =
-
-     INSTBINFLAGS = -m 0755
-     INSTUIDFLAGS = -m 4755
-     INSTLIBFLAGS = -m 0664
-     INSTINCFLAGS = -m 0444
-     INSTMANFLAGS = -m 0444
-     INSTDATFLAGS = -m 0444
-    INSTKMEMFLAGS = -m 4755
-
-          DESTDIR =
-
-     TOP_INCLUDES = -I$(INCROOT)
-
-      CDEBUGFLAGS = -O
-        CCOPTIONS =
-      COMPATFLAGS =
-
-      ALLINCLUDES = $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES)
-       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS)
-           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
-        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
-           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
-        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)
-   LDCOMBINEFLAGS = -X -r
-
-        MACROFILE = sun.cf
-           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
-
-    IMAKE_DEFINES =
-
-         IRULESRC = $(CONFIGDIR)
-        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
-
-     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
-			$(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
-			$(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
-
-###########################################################################
-# X Window System Build Parameters
-# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
-
-###########################################################################
-# X Window System make variables; this need to be coordinated with rules
-# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
-
-          PATHSEP = /
-        USRLIBDIR = $(DESTDIR)/usr/lib
-           BINDIR = $(DESTDIR)/usr/bin/X11
-          INCROOT = $(DESTDIR)/usr/include
-     BUILDINCROOT = $(TOP)
-      BUILDINCDIR = $(BUILDINCROOT)/X11
-      BUILDINCTOP = ..
-           INCDIR = $(INCROOT)/X11
-           ADMDIR = $(DESTDIR)/usr/adm
-           LIBDIR = $(USRLIBDIR)/X11
-        CONFIGDIR = $(LIBDIR)/config
-       LINTLIBDIR = $(USRLIBDIR)/lint
-
-          FONTDIR = $(LIBDIR)/fonts
-         XINITDIR = $(LIBDIR)/xinit
-           XDMDIR = $(LIBDIR)/xdm
-           AWMDIR = $(LIBDIR)/awm
-           TWMDIR = $(LIBDIR)/twm
-           GWMDIR = $(LIBDIR)/gwm
-          MANPATH = $(DESTDIR)/usr/man
-    MANSOURCEPATH = $(MANPATH)/man
-           MANDIR = $(MANSOURCEPATH)n
-        LIBMANDIR = $(MANSOURCEPATH)3
-      XAPPLOADDIR = $(LIBDIR)/app-defaults
-
-        SOXLIBREV = 4.2
-          SOXTREV = 4.0
-         SOXAWREV = 4.0
-        SOOLDXREV = 4.0
-         SOXMUREV = 4.0
-        SOXEXTREV = 4.0
-
-       FONTCFLAGS = -t
-
-     INSTAPPFLAGS = $(INSTDATFLAGS)
-
-            IMAKE = imake
-           DEPEND = makedepend
-              RGB = rgb
-            FONTC = bdftosnf
-        MKFONTDIR = mkfontdir
-        MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier.sh
-
-        CONFIGSRC = $(TOP)/config
-        CLIENTSRC = $(TOP)/clients
-          DEMOSRC = $(TOP)/demos
-           LIBSRC = $(TOP)/lib
-          FONTSRC = $(TOP)/fonts
-       INCLUDESRC = $(TOP)/X11
-        SERVERSRC = $(TOP)/server
-          UTILSRC = $(TOP)/util
-        SCRIPTSRC = $(UTILSRC)/scripts
-       EXAMPLESRC = $(TOP)/examples
-       CONTRIBSRC = $(TOP)/../contrib
-           DOCSRC = $(TOP)/doc
-           RGBSRC = $(TOP)/rgb
-        DEPENDSRC = $(UTILSRC)/makedepend
-         IMAKESRC = $(CONFIGSRC)
-         XAUTHSRC = $(LIBSRC)/Xau
-          XLIBSRC = $(LIBSRC)/X
-           XMUSRC = $(LIBSRC)/Xmu
-       TOOLKITSRC = $(LIBSRC)/Xt
-       AWIDGETSRC = $(LIBSRC)/Xaw
-       OLDXLIBSRC = $(LIBSRC)/oldX
-      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
-      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
-     MKFONTDIRSRC = $(FONTSRC)/mkfontdir
-     EXTENSIONSRC = $(TOP)/extensions
-
-  DEPEXTENSIONLIB =
-     EXTENSIONLIB = -lXext
-
-          DEPXLIB = $(DEPEXTENSIONLIB)
-             XLIB = $(EXTENSIONLIB) -lX11
-
-      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
-         XAUTHLIB =  -lXau
-
-        DEPXMULIB =
-           XMULIB = -lXmu
-
-       DEPOLDXLIB =
-          OLDXLIB = -loldX
-
-      DEPXTOOLLIB =
-         XTOOLLIB = -lXt
-
-        DEPXAWLIB =
-           XAWLIB = -lXaw
-
- LINTEXTENSIONLIB = $(USRLIBDIR)/llib-lXext.ln
-         LINTXLIB = $(USRLIBDIR)/llib-lX11.ln
-          LINTXMU = $(USRLIBDIR)/llib-lXmu.ln
-        LINTXTOOL = $(USRLIBDIR)/llib-lXt.ln
-          LINTXAW = $(USRLIBDIR)/llib-lXaw.ln
-
-          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
-
-         DEPLIBS1 = $(DEPLIBS)
-         DEPLIBS2 = $(DEPLIBS)
-         DEPLIBS3 = $(DEPLIBS)
-
-###########################################################################
-# Imake rules for building libraries, programs, scripts, and data files
-# rules:  $XConsortium: Imake.rules,v 1.67 89/12/18 17:14:15 jim Exp $
-
-###########################################################################
-# start of Imakefile
-
-#  Make WWW under unix for a.n.other unix system (bsd)
-#   Use this as a template
-
-TK_WWW_SOURCE_PATH=/a/dxcern/userd/tbl/hypertext/WWW/TkWWW/Tcl
-
-TK_WWW_INSTALL_PATH=/a/dxcern/userd/tbl/hypertext/WWW/TkWWW/$(WWW_MACH)
-
-TK_WWW_HOME_PAGE=http://www.w3.org/default.html
-TK_WWW_START_PAGE=$(TK_WWW_HOME_PAGE)
-
-CC = gcc -fno-builtin -Wall
-
-CDEBUGFLAGS = -O3 -pipe
-
-COMPATFLAGS =   -I/afs/athena.mit.edu/course/other/cdsdev/www-compat
-CCOPTIONS =
-
-BINDIR = $(TK_WWW_INSTALL_PATH)
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = unix.x
-
-# The ASIS repository's name for the machine we are on
-ASIS_MACH = hardware/os
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = /tmp
-
-#	Common Makefile for W3 Library Code
-#	-----------------------------------
-#
-#	(c) CERN 1990, 1991 -- see Copyright.html for conditions
-#
-# This file should be invariant between systems.
-#	DEPENDENCIES NOT COMPLETE
-
-#
-#	make		Compile and link the software (private version)
-#	make clean	Remove intermediate files
-
-WC = $(WWW)/Library
-CMN = $(WWW)/Library/Implementation/
-
-# Where shall we put the objects and built library?
-
-LOB = $(WTMP)/Library/$(WWW_MACH)
-
-# Bug: This path, if relative, is taken relative to the directory
-# in which this makefile is, not the pwd.  This screws up the
-# recursive invocation
-
-VC = 2.14
-
-CFLAGS2 = $(CFLAGS) -I$(CMN)
-
-CERNLIBBIN = $(WWW)/bin
-
-COMMON = $(LOB)/HTParse.o $(LOB)/HTAccess.o $(LOB)/HTTP.o \
-	$(LOB)/HTFile.o	$(LOB)/HTFTP.o $(LOB)/HTTCP.o \
-	$(LOB)/SGML.o $(LOB)/HTMLDTD.o $(LOB)/HTChunk.o \
-	$(LOB)/HTPlain.o $(LOB)/HTWriter.o $(LOB)/HTFWriter.o \
-	$(LOB)/HTMLGen.o \
-	$(LOB)/HTAtom.o $(LOB)/HTAnchor.o $(LOB)/HTStyle.o \
-	$(LOB)/HTList.o $(LOB)/HTString.o $(LOB)/HTAlert.o \
-	$(LOB)/HTRules.o $(LOB)/HTFormat.o $(LOB)/HTInit.o $(LOB)/HTMIME.o \
-	$(LOB)/HTHistory.o $(LOB)/HTNews.o $(LOB)/HTGopher.o \
-	$(LOB)/HTTelnet.o  $(LOB)/HTWSRC.o $(HTWAIS)
-
-CFILES = $(CMN)HTParse.c $(CMN)HTAccess.c $(CMN)HTTP.c $(CMN)HTFile.c \
-	$(CMN)HTFTP.c   $(CMN)HTTCP.c     $(CMN)SGML.c	\
-	$(CMN)HTMLDTD.c \
-	$(CMN)HTPlain.c	$(CMN)HTWriter.c  $(CMN)HTFWriter.c $(CMN)HTMLGen.c	\
-	$(CMN)HTChunk.c $(CMN)HTAtom.c   $(CMN)HTAnchor.c $(CMN)HTStyle.c \
-	$(CMN)HTList.c  $(CMN)HTString.c $(CMN)HTAlert.c $(CMN)HTRules.c \
-	$(CMN)HTFormat.c $(CMN)HTInit.c $(CMN)HTMIME.c $(CMN)HTHistory.c \
-	$(CMN)HTNews.c  $(CMN)HTGopher.c $(CMN)HTTelnet.c \
-	$(CMN)HTWAIS.c  $(CMN)HTWSRC.c
-
-HFILES = $(CMN)HTParse.h $(CMN)HTAccess.h $(CMN)HTTP.h $(CMN)HTFile.h \
-	$(CMN)HTFTP.h $(CMN)HTTCP.h \
-	$(CMN)SGML.h $(CMN)HTML.h $(CMN)HTMLDTD.h $(CMN)HTChunk.h \
-	$(CMN)HTPlain.h		$(CMN)HTWriter.h \
-	$(CMN)HTFWriter.h 	$(CMN)HTMLGen.h	\
-	$(CMN)HTStream.h \
-	$(CMN)HTAtom.h $(CMN)HTAnchor.h $(CMN)HTStyle.h \
-	$(CMN)HTList.h \
-	$(CMN)HTString.h $(CMN)HTAlert.h $(CMN)HTRules.h \
-	$(CMN)HTFormat.h $(CMN)HTInit.h \
-	$(CMN)HTMIME.h $(CMN)HTHistory.h $(CMN)HTNews.h \
-	$(CMN)HTGopher.h \
-	$(CMN)HTUtils.h $(CMN)tcp.h $(CMN)WWW.h $(CMN)HText.h \
-	$(CMN)HTTelnet.h \
-	$(CMN)HTWAIS.h  $(CMN)HTWSRC.h
-
-SOURCES = $(CFILES) $(HFILES) $(CMN)Version.make $(CMN)CommonMakefile \
-	$(WWW)/README.txt $(WWW)/Copyright.txt $(WWW)/BUILD
-SPECIFIC = $(WWW)/All
-
-#	Library
-#
-#  On SGI, ranlib is unnecessary and does not exist so we ignore errors
-# for that step
-all: $(LOB)/libwww.a
-	$(MV) $(LOB)/libwww.a $(WC)/$(WWW_MACH)
-
-$(LOB)/libwww.a : $(COMMON)
-	ar r $(LOB)/libwww.a $(COMMON)
-	-ranlib $(LOB)/libwww.a
-
-#	Clean up everything generatable except final products
-clean ::
-	$(RM) $(LOB)
-
-#	Clean up everything generatable including final products
-
-cleanall :: clean
-	$(RM) $(LOB)/libwww.a
-
-# 			Common code
-#			-----------
-
-#	Directory for object files - .created checks it exists
-
-OE = $(LOB)/.created
-$(OE) :
-	-mkdir $(WTMP)
-	-mkdir $(WTMP)/Library
-	-mkdir $(WTMP)/Library/$(WWW_MACH)
-	touch $@
-
-$(LOB)/HTList.o : $(OE) $(CMN)HTList.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTList.c
-
-$(LOB)/HTAnchor.o : $(OE) $(CMN)HTAnchor.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAnchor.c
-
-$(LOB)/HTFormat.o : $(OE) $(CMN)HTFormat.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFormat.c
-
-$(LOB)/HTInit.o : $(OE) $(CMN)HTInit.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTInit.c
-
-$(LOB)/HTMIME.o : $(OE) $(CMN)HTMIME.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMIME.c
-
-$(LOB)/HTHistory.o : $(OE) $(CMN)HTHistory.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTHistory.c
-
-$(LOB)/HTNews.o : $(OE) $(CMN)HTNews.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTNews.c
-
-$(LOB)/HTGopher.o : $(OE) $(CMN)HTGopher.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTGopher.c
-
-$(LOB)/HTTelnet.o : $(OE) $(CMN)HTTelnet.c $(CMN)HTUtils.h $(CMN)HTTelnet.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTelnet.c
-
-$(LOB)/HTStyle.o : $(OE) $(CMN)HTStyle.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTStyle.c
-
-$(LOB)/HTAtom.o : $(OE) $(CMN)HTAtom.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAtom.c
-
-$(LOB)/HTChunk.o : $(OE) $(CMN)HTChunk.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTChunk.c
-
-$(LOB)/HTString.o : $(OE) $(CMN)HTString.c $(CMN)HTUtils.h $(CMN)Version.make
-	$(CC) -c -o $@ $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTString.c
-
-$(LOB)/HTAlert.o : $(OE) $(CMN)HTAlert.c $(CMN)HTUtils.h $(CMN)Version.make
-	$(CC) -c -o $@ $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTAlert.c
-
-$(LOB)/HTRules.o : $(OE) $(CMN)HTRules.c $(CMN)HTUtils.h $(CMN)Version.make
-	$(CC) -c -o $@ $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTRules.c
-
-$(LOB)/SGML.o : $(OE) $(CMN)SGML.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)SGML.c
-
-$(LOB)/HTMLGen.o : $(OE) $(CMN)HTMLGen.c $(CMN)HTUtils.h $(CMN)HTMLDTD.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMLGen.c
-
-$(LOB)/HTMLDTD.o : $(OE) $(CMN)HTMLDTD.c $(CMN)SGML.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMLDTD.c
-
-$(LOB)/HTPlain.o : $(OE) $(CMN)HTPlain.c $(CMN)HTPlain.h $(CMN)HTStream.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTPlain.c
-
-$(LOB)/HTWAIS.o : $(OE) $(CMN)HTWAIS.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(WAISINC) $(CMN)HTWAIS.c
-
-$(LOB)/HTWSRC.o : $(OE) $(CMN)HTWSRC.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTWSRC.c
-
-$(LOB)/HTWriter.o : $(OE) $(CMN)HTWriter.c $(CMN)HTWriter.h $(CMN)HTStream.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTWriter.c
-
-$(LOB)/HTFWriter.o : $(OE) $(CMN)HTFWriter.c $(CMN)HTFWriter.h $(CMN)HTStream.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFWriter.c
-
-#	Communications & Files
-
-$(LOB)/HTTP.o : $(OE) $(CMN)HTTP.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTP.c
-
-$(LOB)/HTTCP.o : $(OE) $(CMN)HTTCP.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTCP.c
-
-$(LOB)/HTFile.o : $(OE) $(CMN)HTFile.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFile.c
-
-$(LOB)/HTFTP.o : $(OE) $(CMN)HTFTP.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFTP.c
-
-$(LOB)/HTAccess.o : $(OE)  $(CMN)HTAccess.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAccess.c
-
-$(LOB)/HTParse.o : $(OE) $(CMN)HTParse.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTParse.c
-
-###########################################################################
-# common rules for all Makefiles - do not edit
-
-emptyrule::
-
-clean::
-	$(RM_CMD) \#*
-
-Makefile::
-	-@if [ -f Makefile ]; then \
-	echo "	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
-	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
-	else exit 0; fi
-	$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
-
-tags::
-	$(TAGS) -w *.[ch]
-	$(TAGS) -xw *.[ch] > TAGS
-
-saber:
-	#load $(ALLDEFINES) $(SRCS)
-
-osaber:
-	#load $(ALLDEFINES) $(OBJS)
-
-###########################################################################
-# empty rules for directories that do not have SUBDIRS - do not edit
-
-install::
-	@echo "install in $(CURRENT_DIR) done"
-
-install.man::
-	@echo "install.man in $(CURRENT_DIR) done"
-
-Makefiles::
-
-includes::
-
-###########################################################################
-# dependencies generated by makedepend
-
diff --git a/gnu/usr.bin/lynx/WWW/Library/freebsd/Makefile b/gnu/usr.bin/lynx/WWW/Library/freebsd/Makefile
deleted file mode 100644
index a82f13b8757..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/freebsd/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-#  Make WWW under FreeBSD
-#
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = freebsd
-
-# The ASIS repository's name for the machine we are on
-ASIS_MACH = i386/FreeBSD
-
-
-CFLAGS += -DDEBUG
-LFLAGS =
-
-# Directory for installed binary:
-BINDIR = /usr/local/bin
-
-# Where is the W3 object library to be installed (not normally done)?
-LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-include $(WWW)/Library/Implementation/CommonMakefile
diff --git a/gnu/usr.bin/lynx/WWW/Library/isc/Makefile b/gnu/usr.bin/lynx/WWW/Library/isc/Makefile
deleted file mode 100644
index 29de6885626..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/isc/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-#  Make WWW under unix for a.n.other unix system (bsd)
-#   Use this as a template
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = isc
-
-# The ASIS repository's name for the machine we are on
-ASIS_MACH = intel/isc
-
-
-CFLAGS =  -DDEBUG -O -DISC -Dvfork=fork
-LFLAGS =
-CC = cc
-
-# Directory for installed binary:
-BINDIR = /usr/local/bin
-
-# Where is the W3 object library to be installed (not normally done)?
-LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-
-include $(WWW)/Library/Implementation/CommonMakefile
-
diff --git a/gnu/usr.bin/lynx/WWW/Library/mips/Makefile b/gnu/usr.bin/lynx/WWW/Library/mips/Makefile
deleted file mode 100644
index 1c84cbe089c..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/mips/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-# Makefile for WWW under svr4
-#
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = mips
-
-# The ASIS repository's name for the machine we are on
-ASIS_MACH = mips/mips
-
-
-#CFLAGS =  -DDEBUG -systype svr3 -DMIPS -DNO_BCOPY
-CFLAGS =  -O -DDEBUG -systype svr3  -I/svr3/usr/include/bsd
-LFLAGS =
-CC = cc
-
-# Directory for installed binary:
-BINDIR = /usr/local/bin
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-# Where is the W3 object library?
-LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
-
-include $(WWW)/Library/Implementation/CommonMakefile
diff --git a/gnu/usr.bin/lynx/WWW/Library/netbsd/Makefile b/gnu/usr.bin/lynx/WWW/Library/netbsd/Makefile
deleted file mode 100644
index ae92760a5b8..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/netbsd/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#  Make WWW under NetBSD
-#
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = netbsd
-
-# The ASIS repository's name for the machine we are on
-ASIS_MACH = i386/NetBSD
-
-
-CFLAGS = -O -DUSE_DIRENT
-LFLAGS =
-CC = cc
-
-# Directory for installed binary:
-BINDIR = /usr/local/bin
-
-# Where is the W3 object library to be installed (not normally done)?
-LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-include $(WWW)/Library/Implementation/CommonMakefile
-
diff --git a/gnu/usr.bin/lynx/WWW/Library/next/Makefile b/gnu/usr.bin/lynx/WWW/Library/next/Makefile
deleted file mode 100644
index bd35c89a9d0..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/next/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-#	Platform-specific Makefile for W3 Library	(NeXT)
-#	-----------------------------------------
-#
-#	Library compiled with fudge to alow XMOSAIC to
-#	pick up binary files... for now.
-
-WWW = ../..
-
-#  Where should temporary (object) files go? Normally, WTMP = $(WWW)
-#WTMP = /tmp
-WTMP = $(WWW)
-
-# For MACH 3.0 it seems -bsd is needed to order to define errno
-# in /usr/include/bsd/sys/errno.h. But __STRICT_BSD__ is needed for
-# errno.
-
-CFLAGS =  -Wall -O -DXMOSAIC_HACK
-
-#	Yes please, I want direct WAIS access
-#
-#WAIS = ../../../freeWAIS
-#WAISINC = -I$(WAIS)/ir
-#WAISCFLAGS = -DDIRECT_WAIS
-#WAISLIB =  $(WAIS)/bin/client.a $(WAIS)/bin/wais.a
-#  $(WAIS)/bin/inv.a $(WAIS)/bin/wais.a
-#HTWAIS = $(WTMP)/Library/$(WWW_MACH)/HTWAIS.o
-
-CC = cc
-#	For testing memory leaks only!   Use /NextDeveloper/MallocDebug app
-LFLAGS = -lMallocDebug
-#LFLAGS =
-
-WWW_MACH = next
-ASIS_MACH = next/2.0
-
-
-# Directory for installed binary:
-LIBDIR = /usr/local/lib
-
-include $(WWW)/Library/Implementation/CommonMakefile
diff --git a/gnu/usr.bin/lynx/WWW/Library/osf/Makefile b/gnu/usr.bin/lynx/WWW/Library/osf/Makefile
deleted file mode 100644
index a81457a60e9..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/osf/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-#	Platform-specific Makefile for W3 Library	(decstation)
-#	-----------------------------------------
-#
-
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-
-#CFLAGS = 
-CFLAGS = -DSYS5 
-CC = cc -O
-#LFLAGS =
-LFLAGS = 
-
-ASIS_MACH = alpha/osf1
-WWW_MACH = osf
-
-# Directory for installed binary:
-LIBDIR = /usr/local/lib
-
-include $(WWW)/Library/Implementation/CommonMakefile
diff --git a/gnu/usr.bin/lynx/WWW/Library/ptx/Makefile b/gnu/usr.bin/lynx/WWW/Library/ptx/Makefile
deleted file mode 100644
index 772d6c6a038..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/ptx/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#  Make WWW under Sequent's DYNIX/ptx
-#
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = ptx
-
-# The ASIS repository's name for the machine we are on
-ASIS_MACH = Sequent/ptx
-
-
-CFLAGS =  -O -DDEBUG -DUSE_DIRENT -DSVR4 -DNO_IOCTL -DUSE_FCNTL
-LFLAGS =
-CC = cc
-
-# Directory for installed binary:
-BINDIR = /usr/local/bin
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-
-# Where is the W3 object library?
-LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
-
-include $(WWW)/Library/Implementation/CommonMakefile
diff --git a/gnu/usr.bin/lynx/WWW/Library/rs6000/Makefile b/gnu/usr.bin/lynx/WWW/Library/rs6000/Makefile
deleted file mode 100644
index 334a5a4afbd..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/rs6000/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#  Make WWW under unix for rs6000 with no gcc
-#
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = rs6000
-
-# For ASIS
-ASIS_MACH = ibm-rs6000/aix-3.2
-
-# Directory for installed binary:
-BINDIR = /usr/local/bin
-
-# The AIX compiler does not define unix... AIX will do it and avoid realloc bug
-
-CFLAGS = -O -DDEBUG 
-CC = cc
-LFLAGS =
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = $(WWW)
-
-# Where is the W3 object library?
-LIBDIR = /usr/local/lib
-
-include $(WWW)/Library/Implementation/CommonMakefile
diff --git a/gnu/usr.bin/lynx/WWW/Library/sgi/Makefile b/gnu/usr.bin/lynx/WWW/Library/sgi/Makefile
deleted file mode 100644
index 24530722fb7..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/sgi/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-#  Make WWW for Silicon Graphics
-#
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = sgi
-
-# Architecutre in ASIS scheme
-#  SGI does not presently have ranlib.  Ignore the error
-#  message about that when the CommonMakefile tries to
-#  invoke it.
-ASIS_MACH = sgi/iris-3.5
-
-CFLAGS = -DDEBUG -O -cckr
-CC = cc
-LFLAGS =
-
-# Directory for installed binary:
-BINDIR = /usr/local/bin
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-
-# Where is the W3 object library?
-LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
-
-include $(WWW)/Library/Implementation/CommonMakefile
diff --git a/gnu/usr.bin/lynx/WWW/Library/snake/Makefile b/gnu/usr.bin/lynx/WWW/Library/snake/Makefile
deleted file mode 100644
index 06db3012bf1..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/snake/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#  Make WWW under unix for HP 700 or 800 (Snake) using cc
-#
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = snake
-
-# Distribution point for ASIS repository
-ASIS_MACH = hp-700/hpux-8.0
-
-CFLAGS = -O -DDEBUG
-
-#	Link with BSD library for getwd()
-LFLAGS = -lBSD
-
-#CC = cc
-#CC = gcc
-
-# Directory for installed binary:
-BINDIR = /usr/local/bin
-
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-
-# Where is the W3 object library?
-LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
-
-include $(WWW)/Library/Implementation/CommonMakefile
diff --git a/gnu/usr.bin/lynx/WWW/Library/solaris2/Makefile b/gnu/usr.bin/lynx/WWW/Library/solaris2/Makefile
deleted file mode 100644
index a390cae9d0e..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/solaris2/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#  Make WWW under unix for sun 4
-#
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = solaris2
-
-# The ASIS repository's name for the machine we are on
-ASIS_MACH = sun-4/sunos-5.2
-
-
-CFLAGS =  -O -DDEBUG -DNGROUPS=16 -Dd_namlen=d_reclen -DNO_BCOPY -DSOLARIS2 -DSVR4 -DUSE_DIRENT
-LFLAGS =
-
-# Directory for installed binary:
-BINDIR = /usr/local/bin
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-
-# Where is the W3 object library?
-LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
-
-include $(WWW)/Library/Implementation/CommonMakefile
-
diff --git a/gnu/usr.bin/lynx/WWW/Library/sun3/Makefile b/gnu/usr.bin/lynx/WWW/Library/sun3/Makefile
deleted file mode 100644
index ee9c6288e13..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/sun3/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#  Make WWW under unix for sun 3
-#
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = sun3
-
-# For ASIS installation, the ASIS code for the machine/os
-ASIS_MACH = sun-3/sunos-4.1.1
-
-# Directory for installed binary:
-BINDIR = /usr/local/bin
-
-CFLAGS = -DDEBUG -O
-LFLAGS =
-
-# Directory for installed binary:
-BINDIR = /usr/local/bin
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-
-# Where is the W3 object library?
-LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
-
-include $(WWW)/Library/Implementation/CommonMakefile
diff --git a/gnu/usr.bin/lynx/WWW/Library/sun4/Makefile b/gnu/usr.bin/lynx/WWW/Library/sun4/Makefile
deleted file mode 100644
index cf14decbcbf..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/sun4/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#  Make WWW under unix for sun 4
-#
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = sun4
-
-# The ASIS repository's name for the machine we are on
-ASIS_MACH = sun-4/sunos-4.1.1
-
-
-CFLAGS =  -DDEBUG -O
-LFLAGS =
-
-# Directory for installed binary:
-BINDIR = /usr/local/bin
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-
-# Where is the W3 object library?
-LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
-
-include $(WWW)/Library/Implementation/CommonMakefile
-
diff --git a/gnu/usr.bin/lynx/WWW/Library/svr4/Makefile b/gnu/usr.bin/lynx/WWW/Library/svr4/Makefile
deleted file mode 100644
index a97e6656555..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/svr4/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-#  Make WWW under svr4
-#
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = svr4
-
-# The ASIS repository's name for the machine we are on
-ASIS_MACH = generic/svr4
-
-
-CFLAGS =  -O -DDEBUG -DUSE_DIRENT -DSVR4
-LFLAGS =
-CC = cc
-
-# Directory for installed binary:
-BINDIR = /usr/local/bin
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-
-# Where is the W3 object library?
-LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
-
-include $(WWW)/Library/Implementation/CommonMakefile
diff --git a/gnu/usr.bin/lynx/WWW/Library/umaxv-m88k/Makefile b/gnu/usr.bin/lynx/WWW/Library/umaxv-m88k/Makefile
deleted file mode 100644
index 79c323c0d59..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/umaxv-m88k/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-#  Make WWW under unix for a.n.other unix system (bsd)
-#   Use this as a template
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = umaxv-m88k
-
-# The ASIS repository's name for the machine we are on
-ASIS_MACH = hardware/os
-
-
-CFLAGS =  -O -DDEBUG -D_SYSV3
-LFLAGS =
-CC = cc
-
-# Directory for installed binary:
-BINDIR = /usr/local/bin
-
-# Where is the W3 object library to be installed (not normally done)?
-LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-
-include $(WWW)/Library/Implementation/CommonMakefile
-
diff --git a/gnu/usr.bin/lynx/WWW/Library/unix/makefile.in b/gnu/usr.bin/lynx/WWW/Library/unix/makefile.in
deleted file mode 100644
index 94918497d7f..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/unix/makefile.in
+++ /dev/null
@@ -1,62 +0,0 @@
-#  Make WWW under unix for a.n.other unix system (bsd)
-#   Use this as a template
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = unix
-
-# The ASIS repository's name for the machine we are on
-ASIS_MACH = hardware/os
-
-LFLAGS =
-
-prefix		= @prefix@
-exec_prefix	= @exec_prefix@
-top_srcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= $(srcdir)
-
-LYFLAGS		= # FIXME: set in parent makefile
-
-CC		= @CC@
-DEFS		= @DEFS@
-CPPFLAGS	= @CPPFLAGS@
-CPPOPTS		= $(DEFS) $(CPPFLAGS) $(LYFLAGS) -I../../.. -I../../../src -I$(top_srcdir) -I$(top_srcdir)/src
-LY_CFLAGS	= @CFLAGS@
-CFLAGS		= $(CPPOPTS) $(LY_CFLAGS)
-
-# Directory for installed binary:
-BINDIR		= @bindir@
-
-# Where is the W3 object library to be installed (not normally done)?
-LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = $(top_srcdir)/WWW
-
-#  Where should temporary (object) files go?
-WTMP = ../..
-
-@make_include_left@$(WWW)/Library/Implementation/Version.make@make_include_right@
-@make_include_left@$(WWW)/Library/Implementation/CommonMakefile@make_include_right@
-
-# Override values set in CommonMakefile
-
-RANLIB	= @RANLIB@
-
-all : $(LOB)/libwww.a
-
-.SUFFIXES: .i .h .html
-
-.c.o:
-@RULE_CC@
-	@ECHO_CC@$(CC) $(CPPOPTS) $(CFLAGS) -c $(srcdir)/$*.c
-
-.c.i:
-@RULE_CC@
-	@ECHO_CC@$(CPP) -C $(CPPOPTS) $*.c >$@
-
-depend :
-	makedepend -fmakefile -- $(CFLAGS) -- $(CFILES)
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/gnu/usr.bin/lynx/WWW/Library/unix_x/Makefile b/gnu/usr.bin/lynx/WWW/Library/unix_x/Makefile
deleted file mode 100644
index 23c12453cf7..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/unix_x/Makefile
+++ /dev/null
@@ -1,491 +0,0 @@
-# Makefile generated by imake - do not edit!
-# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
-#
-# The cpp used on this machine replaces all newlines and multiple tabs and
-# spaces in a macro expansion with a single space.  Imake tries to compensate
-# for this, but is not always successful.
-#
-
-###########################################################################
-# Makefile generated from "Imake.tmpl" and 
-# $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $
-#
-# Platform-specific parameters may be set in the appropriate .cf
-# configuration files.  Site-wide parameters may be set in the file
-# site.def.  Full rebuilds are recommended if any parameters are changed.
-#
-# If your C preprocessor doesn't define any unique symbols, you'll need
-# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
-# "make Makefile", "make Makefiles", or "make World").
-#
-# If you absolutely can't get imake to work, you'll need to set the
-# variables at the top of each Makefile as well as the dependencies at the
-# bottom (makedepend will do this automatically).
-#
-
-###########################################################################
-# platform-specific configuration parameters - edit sun.cf to change
-
-# platform:  $XConsortium: sun.cf,v 1.38 89/12/23 16:10:10 jim Exp $
-# operating system:  SunOS 4.1.1
-
-###########################################################################
-# site-specific configuration parameters - edit site.def to change
-
-# site:  $XConsortium: site.def,v 1.21 89/12/06 11:46:50 jim Exp $
-
-            SHELL = /bin/sh
-
-              TOP = ../../../.
-      CURRENT_DIR = ./../Library/unix_x
-
-               AR = ar cq
-  BOOTSTRAPCFLAGS =
-               CC = gcc -DNOSTDHDRS -fstrength-reduce -fpcc-struct-return -fwritable-strings -traditional
-
-         COMPRESS = compress
-              CPP = /lib/cpp $(STD_CPP_DEFINES)
-    PREPROCESSCMD = gcc -DNOSTDHDRS -fstrength-reduce -fpcc-struct-return -fwritable-strings -traditional -E $(STD_CPP_DEFINES)
-          INSTALL = install
-               LD = ld
-             LINT = lint
-      LINTLIBFLAG = -C
-         LINTOPTS = -axz
-               LN = ln -s
-             MAKE = make
-               MV = mv
-               CP = cp
-           RANLIB = ranlib
-  RANLIBINSTFLAGS =
-               RM = rm -f
-     STD_INCLUDES =
-  STD_CPP_DEFINES =
-      STD_DEFINES =
- EXTRA_LOAD_FLAGS =
-  EXTRA_LIBRARIES =
-             TAGS = ctags
-
-    SHAREDCODEDEF = -DSHAREDCODE
-         SHLIBDEF = -DSUNSHLIB
-
-    PROTO_DEFINES =
-
-     INSTPGMFLAGS =
-
-     INSTBINFLAGS = -m 0755
-     INSTUIDFLAGS = -m 4755
-     INSTLIBFLAGS = -m 0664
-     INSTINCFLAGS = -m 0444
-     INSTMANFLAGS = -m 0444
-     INSTDATFLAGS = -m 0444
-    INSTKMEMFLAGS = -m 4755
-
-          DESTDIR =
-
-     TOP_INCLUDES = -I$(INCROOT)
-
-      CDEBUGFLAGS = -O
-        CCOPTIONS =
-      COMPATFLAGS =
-
-      ALLINCLUDES = $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES)
-       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS)
-           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
-        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
-           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
-        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)
-   LDCOMBINEFLAGS = -X -r
-
-        MACROFILE = sun.cf
-           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
-
-    IMAKE_DEFINES =
-
-         IRULESRC = $(CONFIGDIR)
-        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
-
-     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
-			$(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
-			$(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
-
-###########################################################################
-# X Window System Build Parameters
-# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
-
-###########################################################################
-# X Window System make variables; this need to be coordinated with rules
-# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
-
-          PATHSEP = /
-        USRLIBDIR = $(DESTDIR)/usr/lib
-           BINDIR = $(DESTDIR)/usr/bin/X11
-          INCROOT = $(DESTDIR)/usr/include
-     BUILDINCROOT = $(TOP)
-      BUILDINCDIR = $(BUILDINCROOT)/X11
-      BUILDINCTOP = ..
-           INCDIR = $(INCROOT)/X11
-           ADMDIR = $(DESTDIR)/usr/adm
-           LIBDIR = $(USRLIBDIR)/X11
-        CONFIGDIR = $(LIBDIR)/config
-       LINTLIBDIR = $(USRLIBDIR)/lint
-
-          FONTDIR = $(LIBDIR)/fonts
-         XINITDIR = $(LIBDIR)/xinit
-           XDMDIR = $(LIBDIR)/xdm
-           AWMDIR = $(LIBDIR)/awm
-           TWMDIR = $(LIBDIR)/twm
-           GWMDIR = $(LIBDIR)/gwm
-          MANPATH = $(DESTDIR)/usr/man
-    MANSOURCEPATH = $(MANPATH)/man
-           MANDIR = $(MANSOURCEPATH)n
-        LIBMANDIR = $(MANSOURCEPATH)3
-      XAPPLOADDIR = $(LIBDIR)/app-defaults
-
-        SOXLIBREV = 4.2
-          SOXTREV = 4.0
-         SOXAWREV = 4.0
-        SOOLDXREV = 4.0
-         SOXMUREV = 4.0
-        SOXEXTREV = 4.0
-
-       FONTCFLAGS = -t
-
-     INSTAPPFLAGS = $(INSTDATFLAGS)
-
-            IMAKE = imake
-           DEPEND = makedepend
-              RGB = rgb
-            FONTC = bdftosnf
-        MKFONTDIR = mkfontdir
-        MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier.sh
-
-        CONFIGSRC = $(TOP)/config
-        CLIENTSRC = $(TOP)/clients
-          DEMOSRC = $(TOP)/demos
-           LIBSRC = $(TOP)/lib
-          FONTSRC = $(TOP)/fonts
-       INCLUDESRC = $(TOP)/X11
-        SERVERSRC = $(TOP)/server
-          UTILSRC = $(TOP)/util
-        SCRIPTSRC = $(UTILSRC)/scripts
-       EXAMPLESRC = $(TOP)/examples
-       CONTRIBSRC = $(TOP)/../contrib
-           DOCSRC = $(TOP)/doc
-           RGBSRC = $(TOP)/rgb
-        DEPENDSRC = $(UTILSRC)/makedepend
-         IMAKESRC = $(CONFIGSRC)
-         XAUTHSRC = $(LIBSRC)/Xau
-          XLIBSRC = $(LIBSRC)/X
-           XMUSRC = $(LIBSRC)/Xmu
-       TOOLKITSRC = $(LIBSRC)/Xt
-       AWIDGETSRC = $(LIBSRC)/Xaw
-       OLDXLIBSRC = $(LIBSRC)/oldX
-      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
-      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
-     MKFONTDIRSRC = $(FONTSRC)/mkfontdir
-     EXTENSIONSRC = $(TOP)/extensions
-
-  DEPEXTENSIONLIB = $(USRLIBDIR)/libXext.a
-     EXTENSIONLIB =  -lXext
-
-          DEPXLIB = $(DEPEXTENSIONLIB)
-             XLIB = $(EXTENSIONLIB) -lX11
-
-      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
-         XAUTHLIB =  -lXau
-
-        DEPXMULIB =
-           XMULIB = -lXmu
-
-       DEPOLDXLIB =
-          OLDXLIB = -loldX
-
-      DEPXTOOLLIB =
-         XTOOLLIB = -lXt
-
-        DEPXAWLIB =
-           XAWLIB = -lXaw
-
- LINTEXTENSIONLIB = $(USRLIBDIR)/llib-lXext.ln
-         LINTXLIB = $(USRLIBDIR)/llib-lX11.ln
-          LINTXMU = $(USRLIBDIR)/llib-lXmu.ln
-        LINTXTOOL = $(USRLIBDIR)/llib-lXt.ln
-          LINTXAW = $(USRLIBDIR)/llib-lXaw.ln
-
-          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
-
-         DEPLIBS1 = $(DEPLIBS)
-         DEPLIBS2 = $(DEPLIBS)
-         DEPLIBS3 = $(DEPLIBS)
-
-###########################################################################
-# Imake rules for building libraries, programs, scripts, and data files
-# rules:  $XConsortium: Imake.rules,v 1.67 89/12/18 17:14:15 jim Exp $
-
-###########################################################################
-# start of Imakefile
-
-#  Make WWW under unix for a.n.other unix system (bsd)
-#   Use this as a template
-
-TK_WWW_SOURCE_PATH=/a/dxcern/userd/tbl/hypertext/WWW/TkWWW/Tcl
-
-TK_WWW_INSTALL_PATH=/a/dxcern/userd/tbl/hypertext/WWW/TkWWW/$WWW_MACH
-
-TK_WWW_HOME_PAGE=http://www.w3.org/default.html
-TK_WWW_START_PAGE=$(TK_WWW_HOME_PAGE)
-
-CC = gcc -fno-builtin -Wall
-
-CDEBUGFLAGS = -O3 -pipe
-
-COMPATFLAGS =   -I/afs/athena.mit.edu/course/other/cdsdev/www-compat
-CCOPTIONS =
-
-BINDIR = $(TK_WWW_INSTALL_PATH)
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = unix_x
-
-# The ASIS repository's name for the machine we are on
-ASIS_MACH = hardware/os
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = /tmp
-
-#	Common Makefile for W3 Library Code
-#	-----------------------------------
-#
-#	(c) CERN 1990, 1991 -- see Copyright.html for conditions
-#
-# This file should be invariant between systems.
-#	DEPENDENCIES NOT COMPLETE
-
-#
-#	make		Compile and link the software (private version)
-#	make clean	Remove intermediate files
-
-WC = $(WWW)/Library
-CMN = $(WWW)/Library/Implementation/
-
-# Where shall we put the objects and built library?
-
-LOB = $(WTMP)/Library/$(WWW_MACH)
-
-# Bug: This path, if relative, is taken relative to the directory
-# in which this makefile is, not the pwd.  This screws up the
-# recursive invocation
-
-VC = 2.14
-
-CFLAGS2 = $(CFLAGS) -I$(CMN)
-
-CERNLIBBIN = $(WWW)/bin
-
-COMMON = $(LOB)/HTParse.o $(LOB)/HTAccess.o $(LOB)/HTTP.o \
-	$(LOB)/HTBTree.o \
-	$(LOB)/HTFile.o	$(LOB)/HTFTP.o $(LOB)/HTTCP.o \
-	$(LOB)/SGML.o $(LOB)/HTMLDTD.o $(LOB)/HTChunk.o \
-	$(LOB)/HTPlain.o $(LOB)/HTWriter.o $(LOB)/HTFWriter.o \
-	$(LOB)/HTMLGen.o \
-	$(LOB)/HTAtom.o $(LOB)/HTAnchor.o $(LOB)/HTStyle.o \
-	$(LOB)/HTList.o $(LOB)/HTString.o $(LOB)/HTAlert.o \
-	$(LOB)/HTRules.o $(LOB)/HTFormat.o $(LOB)/HTInit.o $(LOB)/HTMIME.o \
-	$(LOB)/HTHistory.o $(LOB)/HTNews.o $(LOB)/HTGopher.o \
-	$(LOB)/HTTelnet.o  $(LOB)/HTWSRC.o $(HTWAIS)
-
-CFILES = $(CMN)HTParse.c $(CMN)HTAccess.c $(CMN)HTTP.c $(CMN)HTBTree.c \
-	$(CMN)HTFile.c \
-	$(CMN)HTFTP.c   $(CMN)HTTCP.c     $(CMN)SGML.c	\
-	$(CMN)HTMLDTD.c \
-	$(CMN)HTPlain.c	$(CMN)HTWriter.c  $(CMN)HTFWriter.c $(CMN)HTMLGen.c	\
-	$(CMN)HTChunk.c $(CMN)HTAtom.c   $(CMN)HTAnchor.c $(CMN)HTStyle.c \
-	$(CMN)HTList.c  $(CMN)HTString.c $(CMN)HTAlert.c $(CMN)HTRules.c \
-	$(CMN)HTFormat.c $(CMN)HTInit.c $(CMN)HTMIME.c $(CMN)HTHistory.c \
-	$(CMN)HTNews.c  $(CMN)HTGopher.c $(CMN)HTTelnet.c \
-	$(CMN)HTWAIS.c  $(CMN)HTWSRC.c
-
-HFILES = $(CMN)HTParse.h $(CMN)HTAccess.h $(CMN)HTTP.h $(CMN)HTBTree.h \
-	$(CMN)HTFile.h \
-	$(CMN)HTFTP.h $(CMN)HTTCP.h \
-	$(CMN)SGML.h $(CMN)HTML.h $(CMN)HTMLDTD.h $(CMN)HTChunk.h \
-	$(CMN)HTPlain.h		$(CMN)HTWriter.h \
-	$(CMN)HTFWriter.h 	$(CMN)HTMLGen.h	\
-	$(CMN)HTStream.h \
-	$(CMN)HTAtom.h $(CMN)HTAnchor.h $(CMN)HTStyle.h \
-	$(CMN)HTList.h \
-	$(CMN)HTString.h $(CMN)HTAlert.h $(CMN)HTRules.h \
-	$(CMN)HTFormat.h $(CMN)HTInit.h \
-	$(CMN)HTMIME.h $(CMN)HTHistory.h $(CMN)HTNews.h \
-	$(CMN)HTGopher.h \
-	$(CMN)HTUtils.h $(CMN)tcp.h $(CMN)WWW.h $(CMN)HText.h \
-	$(CMN)HTTelnet.h \
-	$(CMN)HTWAIS.h  $(CMN)HTWSRC.h
-
-SOURCES = $(CFILES) $(HFILES) $(CMN)Version.make $(CMN)CommonMakefile \
-	$(WWW)/README.txt $(WWW)/Copyright.txt $(WWW)/BUILD
-SPECIFIC = $(WWW)/All
-
-#	Library
-#
-#  On SGI, ranlib is unnecessary and does not exist so we ignore errors
-# for that step
-all: $(LOB)/libwww.a
-	$(MV) $(LOB)/libwww.a $(WC)/$(WWW_MACH)
-
-$(LOB)/libwww.a : $(COMMON)
-	ar r $(LOB)/libwww.a $(COMMON)
-	-ranlib $(LOB)/libwww.a
-
-#	Clean up everything generatable except final products
-clean ::
-	$(RM) $(LOB)
-
-#	Clean up everything generatable including final products
-
-cleanall :: clean
-	$(RM) $(LOB)/libwww.a
-
-# 			Common code
-#			-----------
-
-#	Directory for object files - .created checks it exists
-
-OE = $(LOB)/.created
-$(OE) :
-	-mkdir $(WTMP)
-	-mkdir $(WTMP)/Library
-	-mkdir $(WTMP)/Library/$(WWW_MACH)
-	touch $@
-
-$(LOB)/HTList.o : $(OE) $(CMN)HTList.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTList.c
-
-$(LOB)/HTAnchor.o : $(OE) $(CMN)HTAnchor.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAnchor.c
-
-$(LOB)/HTFormat.o : $(OE) $(CMN)HTFormat.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFormat.c
-
-$(LOB)/HTInit.o : $(OE) $(CMN)HTInit.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTInit.c
-
-$(LOB)/HTMIME.o : $(OE) $(CMN)HTMIME.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMIME.c
-
-$(LOB)/HTHistory.o : $(OE) $(CMN)HTHistory.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTHistory.c
-
-$(LOB)/HTNews.o : $(OE) $(CMN)HTNews.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTNews.c
-
-$(LOB)/HTGopher.o : $(OE) $(CMN)HTGopher.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTGopher.c
-
-$(LOB)/HTTelnet.o : $(OE) $(CMN)HTTelnet.c $(CMN)HTUtils.h $(CMN)HTTelnet.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTelnet.c
-
-$(LOB)/HTStyle.o : $(OE) $(CMN)HTStyle.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTStyle.c
-
-$(LOB)/HTAtom.o : $(OE) $(CMN)HTAtom.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAtom.c
-
-$(LOB)/HTChunk.o : $(OE) $(CMN)HTChunk.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTChunk.c
-
-$(LOB)/HTString.o : $(OE) $(CMN)HTString.c $(CMN)HTUtils.h $(CMN)Version.make
-	$(CC) -c -o $@ $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTString.c
-
-$(LOB)/HTAlert.o : $(OE) $(CMN)HTAlert.c $(CMN)HTUtils.h $(CMN)Version.make
-	$(CC) -c -o $@ $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTAlert.c
-
-$(LOB)/HTRules.o : $(OE) $(CMN)HTRules.c $(CMN)HTUtils.h $(CMN)Version.make
-	$(CC) -c -o $@ $(CFLAGS2) -DVC=\"$(VC)\" $(CMN)HTRules.c
-
-$(LOB)/SGML.o : $(OE) $(CMN)SGML.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)SGML.c
-
-$(LOB)/HTMLGen.o : $(OE) $(CMN)HTMLGen.c $(CMN)HTUtils.h $(CMN)HTMLDTD.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMLGen.c
-
-$(LOB)/HTMLDTD.o : $(OE) $(CMN)HTMLDTD.c $(CMN)SGML.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTMLDTD.c
-
-$(LOB)/HTPlain.o : $(OE) $(CMN)HTPlain.c $(CMN)HTPlain.h $(CMN)HTStream.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTPlain.c
-
-$(LOB)/HTWAIS.o : $(OE) $(CMN)HTWAIS.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(WAISINC) $(CMN)HTWAIS.c
-
-$(LOB)/HTWSRC.o : $(OE) $(CMN)HTWSRC.c $(CMN)HTUtils.h $(CMN)HTList.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTWSRC.c
-
-$(LOB)/HTWriter.o : $(OE) $(CMN)HTWriter.c $(CMN)HTWriter.h $(CMN)HTStream.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTWriter.c
-
-$(LOB)/HTFWriter.o : $(OE) $(CMN)HTFWriter.c $(CMN)HTFWriter.h $(CMN)HTStream.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFWriter.c
-
-#	Communications & Files
-
-$(LOB)/HTTP.o : $(OE) $(CMN)HTTP.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTP.c
-
-$(LOB)/HTTCP.o : $(OE) $(CMN)HTTCP.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTTCP.c
-
-$(LOB)/HTBTree.o : $(OE) $(CMN)HTBTree.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTBTree.c
-
-$(LOB)/HTFile.o : $(OE) $(CMN)HTFile.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFile.c
-
-$(LOB)/HTFTP.o : $(OE) $(CMN)HTFTP.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTFTP.c
-
-$(LOB)/HTAccess.o : $(OE)  $(CMN)HTAccess.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAccess.c
-
-$(LOB)/HTParse.o : $(OE) $(CMN)HTParse.c $(CMN)HTUtils.h
-	$(CC) -c -o $@ $(CFLAGS2) $(CMN)HTParse.c
-
-###########################################################################
-# common rules for all Makefiles - do not edit
-
-emptyrule::
-
-clean::
-	$(RM_CMD) \#*
-
-Makefile::
-	-@if [ -f Makefile ]; then \
-	echo "	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
-	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
-	else exit 0; fi
-	$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
-
-tags::
-	$(TAGS) -w *.[ch]
-	$(TAGS) -xw *.[ch] > TAGS
-
-###########################################################################
-# empty rules for directories that do not have SUBDIRS - do not edit
-
-install::
-	@echo "install in $(CURRENT_DIR) done"
-
-install.man::
-	@echo "install.man in $(CURRENT_DIR) done"
-
-Makefiles::
-
-includes::
-
-###########################################################################
-# dependencies generated by makedepend
-
diff --git a/gnu/usr.bin/lynx/WWW/Library/vax_ultrix/Makefile b/gnu/usr.bin/lynx/WWW/Library/vax_ultrix/Makefile
deleted file mode 100644
index 2caf766cc0e..00000000000
--- a/gnu/usr.bin/lynx/WWW/Library/vax_ultrix/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-#  Make WWW under ultrix with gcc
-#
-
-
-# For W3 distribution, machine type for subdirectories
-WWW_MACH = vax_ultrix
-
-# For ASIS installation, the ASIS code for the machine/os
-ASIS_MACH = none
-
-CC = gcc
-CFLAGS = -O  -DDEBUG -Wall
-LFLAGS = -O
-
-#	This is bug fix for out-of-date ultrix on cernvax
-# LFLAGS = -O pfcode.o -lresolv
-
-# Directory for installed binary:
-BINDIR = /usr/local/unix
-
-
-#_________________ OK if normal W3 distribution
-# Where is the WWW source root?
-WWW = ../..
-
-#  Where should temporary (object) files go?
-WTMP = /tmp
-
-
-# Where is the W3 object library?
-LIBDIR = $(WWW)/Library/Implementation/$(WWW_MACH)
-
-include $(WWW)/Library/Implementation/CommonMakefile
diff --git a/gnu/usr.bin/lynx/WWW/Library/vms/descrip.mms b/gnu/usr.bin/lynx/WWW/Library/vms/descrip.mms
index 216e6aee654..6bbdaaba63e 100644
--- a/gnu/usr.bin/lynx/WWW/Library/vms/descrip.mms
+++ b/gnu/usr.bin/lynx/WWW/Library/vms/descrip.mms
@@ -76,12 +76,14 @@
 DEBUGFLAGS = /Debug /NoOptimize
 .endif
 
+INCLUDES = /Include=([-.Implementation],[---.src],[---])
+
 ! defines valid for all compilations
-EXTRADEFINES = DEBUG, ACCESS_AUTH, VC="""$(VC)"""
+EXTRADEFINES = ACCESS_AUTH, VC="""$(VC)"""
 
 ! DECC flags for all compilations
 .ifdef DEC_C
-DCFLAGS = /NoMember /Warning=(disable=implicitfunc)
+DCFLAGS = /NoMember /Warning=(disable=implicitfunc)  $(INCLUDES)
 .endif
 
 .ifdef UCX
@@ -89,7 +91,7 @@ TCP = UCX
 .ifdef DEC_C
 CFLAGS = /decc/Prefix=All $(DEBUGFLAGS) $(DCFLAGS) /Define=($(EXTRADEFINES), UCX)
 .else
-CFLAGS = $(DEBUGFLAGS) /Define=($(EXTRADEFINES), UCX)
+CFLAGS = $(DEBUGFLAGS) /Define=($(EXTRADEFINES), UCX) $(INCLUDES)
 .endif
 .endif
 
@@ -98,43 +100,43 @@ TCP = TCPWARE
 .ifdef DEC_C
 CFLAGS = /decc/Prefix=All $(DEBUGFLAGS) $(DCFLAGS) /Define=($(EXTRADEFINES), UCX, TCPWARE)
 .else
-CFLAGS = $(DEBUGFLAGS) /Define = ($(EXTRADEFINES), UCX, TCPWARE)
+CFLAGS = $(DEBUGFLAGS) /Define = ($(EXTRADEFINES), UCX, TCPWARE) $(INCLUDES)
 .endif
 .endif
 
 .ifdef MULTINET
 TCP = MULTINET
 .ifdef DEC_C
-CFLAGS = /decc/Prefix=ANSI $(DEBUGFLAGS) $(DCFLAGS) /Define=(_DECC_V4_SOURCE, __SOCKET_TYPEDEFS, $(EXTRADEFINES), MULTINET)
+CFLAGS = /decc/Prefix=All $(DEBUGFLAGS) $(DCFLAGS) /Define=(_DECC_V4_SOURCE, __SOCKET_TYPEDEFS, $(EXTRADEFINES), MULTINET)
 .else
-CFLAGS = $(DEBUGFLAGS) /Define = ($(EXTRADEFINES), MULTINET)
+CFLAGS = $(DEBUGFLAGS) /Define = ($(EXTRADEFINES), MULTINET) $(INCLUDES)
 .endif
 .endif
 
 .ifdef WIN_TCP
 TCP = WIN_TCP
 .ifdef DEC_C
-CFLAGS = /decc/Prefix=ANSI $(DEBUGFLAGS) $(DCFLAGS) /Define=($(EXTRADEFINES), WIN_TCP)
+CFLAGS = /decc/Prefix=All $(DEBUGFLAGS) $(DCFLAGS) /Define=($(EXTRADEFINES), WIN_TCP)
 .else
-CFLAGS = $(DEBUGFLAGS) /Define = ($(EXTRADEFINES), WIN_TCP)
+CFLAGS = $(DEBUGFLAGS) /Define = ($(EXTRADEFINES), WIN_TCP) $(INCLUDES)
 .endif
 .endif
 
 .ifdef CMU_TCP
 TCP = CMU_TCP
 .ifdef DEC_C
-CFLAGS = /decc/Prefix=ANSI $(DEBUGFLAGS) $(DCFLAGS) /Define=($(EXTRADEFINES), CMU_TCP)
+CFLAGS = /decc/Prefix=All $(DEBUGFLAGS) $(DCFLAGS) /Define=($(EXTRADEFINES), CMU_TCP)
 .else
-CFLAGS = $(DEBUGFLAGS) /Define = ($(EXTRADEFINES), CMU_TCP)
+CFLAGS = $(DEBUGFLAGS) /Define = ($(EXTRADEFINES), CMU_TCP) $(INCLUDES)
 .endif
 .endif
 
 .ifdef SOCKETSHR_TCP
 TCP = SOCKETSHR_TCP
 .ifdef DEC_C
-CFLAGS = /decc/Prefix=ANSI $(DEBUGFLAGS) $(DCFLAGS) /Define=($(EXTRADEFINES), SOCKETSHR_TCP)
+CFLAGS = /decc/Prefix=All $(DEBUGFLAGS) $(DCFLAGS) /Define=($(EXTRADEFINES), _DECC_V4_SOURCE, SOCKETSHR_TCP)
 .else
-CFLAGS = $(DEBUGFLAGS) /Define = ($(EXTRADEFINES), SOCKETSHR_TCP)
+CFLAGS = $(DEBUGFLAGS) /Define = ($(EXTRADEFINES), SOCKETSHR_TCP) $(INCLUDES)
 .endif
 .endif
 
@@ -143,7 +145,7 @@ TCP = DECNET
 .ifdef DEC_C
 CFLAGS = /decc/Prefix=All $(DEBUGFLAGS) $(DCFLAGS) /Define=($(EXTRADEFINES), DECNET)
 .else
-CFLAGS = $(DEBUGFLAGS) /Define = ($(EXTRADEFINES), DECNET)
+CFLAGS = $(DEBUGFLAGS) /Define = ($(EXTRADEFINES), DECNET) $(INCLUDES)
 .endif
 .endif
 
@@ -151,9 +153,9 @@ CFLAGS = $(DEBUGFLAGS) /Define = ($(EXTRADEFINES), DECNET)
 .else
 TCP = MULTINET			! (Default to MULTINET)
 .ifdef DEC_C
-CFLAGS = /decc/Prefix=ANSI $(DEBUGFLAGS) $(DCFLAGS) /Define=(_DECC_V4_SOURCE, __SOCKET_TYPEDEFS, $(EXTRADEFINES), MULTINET)
+CFLAGS = /decc/Prefix=All $(DEBUGFLAGS) $(DCFLAGS) /Define=(_DECC_V4_SOURCE, __SOCKET_TYPEDEFS, $(EXTRADEFINES), MULTINET)
 .else
-CFLAGS = $(DEBUGFLAGS) /Define = ($(EXTRADEFINES), MULTINET)
+CFLAGS = $(DEBUGFLAGS) /Define = ($(EXTRADEFINES), MULTINET) $(INCLUDES)
 .endif
 .endif
 
@@ -165,22 +167,22 @@ CC = gcc
 !        HTParse.h, HTAccess.h, HTTP.h, HTFile.h, -
 !	HTBTree.h, HTTCP.h, SGML.h, -
 !	HTML.h, HTMLDTD.h, HTChunk.h, HTPlain.h, -
-!	HTWriter.h, HTFwriter.h, HTMLGen.h, -
+!	HTFwriter.h, HTMLGen.h, -
 !	HTAtom.h, HTAnchor.h, HTStyle.h, -
 !	HTList.h, HTString.h, HTAlert.h, -
 !	HTRules.h, HTFormat.h, HTInit.h, -
-!	HTMIME.h, HTHistory.h, HTTelnet.h, -
-!	HTFinger.h, HTAABrow.h, HTAAFile.h, -
-!	HTAAProt.h, HTAAServ.h,  HTAAUtil.h, -
-!	HTAssoc.h, HTPasswd.h, HTAuth.h, HTUU.h, -
+!	HTMIME.h, HTTelnet.h, -
+!	HTFinger.h, HTAABrow.h, -
+!	HTAAProt.h, HTAAUtil.h, -
+!	HTAssoc.h, HTUU.h, -
 !	HTVMSUtils.h, ufc-crypt.h, patchlevel.h
 
 MODULES = HTParse, HTAccess, HTTP, HTFile, HTBTree, HTFTP, HTTCP, HTString, -
-	SGML, HTMLDTD, HTChunk, HTPlain, HTWriter, HTMLGen, -
+	SGML, HTMLDTD, HTChunk, HTPlain, HTMLGen, -
 	HTAtom, HTAnchor, HTStyle, HTList, HTRules, HTFormat, -
-	HTMIME, HTHistory, HTNews, HTGopher, HTTelnet, HTFinger, -
-	HTWSRC, HTAAUtil, HTAABrow, HTAAServ, HTAAFile, HTPasswd, HTGroup, -
-	HTACL, HTAuth, HTAAProt, HTAssoc, HTLex, HTUU, HTVMSUtils, getpass, -
+	HTMIME, HTNews, HTGopher, HTTelnet, HTFinger, -
+	HTWSRC, HTAAUtil, HTAABrow, HTGroup, -
+	HTAAProt, HTAssoc, HTLex, HTUU, HTVMSUtils, getpass, -
 	getline, crypt, crypt_util, HTWAIS, HTVMS_WaisUI, HTVMS_WaisProt
 
 !.ifdef DECNET  ! Strip FTP, Gopher, News, WAIS
@@ -217,7 +219,6 @@ clean :
 !HTBTree.obj :	HTBTree.c HTBTree.h HTUtils.h
 !HTMLDTD.obj :	HTMLDTD.c HTMLDTD.h SGML.h
 !HTPlain.obj :	HTPlain.c HTPlain.h HTStream.h
-!HTWriter.obj :	HTWriter.c HTWriter.h HTStream.h
 !HTMLGen.obj :	HTMLGen.c HTMLGen.h HTUtils.h HTMLDTD.h
 !HTRules.obj :	HTRules.c HTRules.h HTUtils.h Version.make
 !HTMIME.obj :	HTMIME.c HTMIME.h HTUtils.h HTList.h
@@ -231,7 +232,6 @@ clean :
 !HTFTP.obj :	HTFTP.c HTFTP.h HTUtils.h
 !HTGopher.obj :	HTGopher.c HTGopher.h HTUtils.h HTList.h
 !HTFinger.obj :	HTFinger.c HTFinger.h HTUtils.h HTList.h
-!HTHistory.obj :	HTHistory.c HTHistory.h HTUtils.h HTList.h
 !HTNews.obj :	HTNews.c HTNews.h HTUtils.h HTList.h
 !HTParse.obj :	HTParse.c HTParse.h HTUtils.h
 !HTStyle.obj :	HTStyle.c HTStyle.h HTUtils.h
@@ -239,16 +239,11 @@ clean :
 !HTTP.obj :	HTTP.c HTTP.h HTUtils.h
 !SGML.obj :	SGML.c SGML.h HTUtils.h
 !HTAABrow.obj :	HTAABrow.c HTUtils.h
-!HTAAFile.obj :	HTAAFile.c HTUtils.h
 !HTAAProt.obj :	HTAAProt.c HTUtils.h
-!HTAAServ.obj :	HTAAServ.c HTUtils.h
 !HTAAUtil.obj :	HTAAUtil.c HTUtils.h
-!HTACL.obj :	HTACL.c HTUtils.h
 !HTGroup.obj :	HTGroup.c HTUtils.h
 !HTLex.obj :	HTLex.c HTUtils.h
 !HTAssoc.obj :	HTAssoc.c HTAssoc.h HTAAUtil.h HTString.h
-!HTPasswd.obj :	HTPasswd.c HTPasswd.h HTUtils.h HTAAUtil.h HTFile.h tcp.h
-!HTAuth.obj :	HTAuth.c HTAuth.h HTUtils.h HTPasswd.h HTAssoc.h HTUU.h
 !HTUU.obj :	HTUU.c HTUU.h HTUtils.h
 !crypt.obj :	crypt.c ufc-crypt.h
 !HTVMSUtils.obj :	HTVMSUtils.c HTVMSUtils.h HTUtils.h
diff --git a/gnu/usr.bin/lynx/WWW/Library/vms/libmake.com b/gnu/usr.bin/lynx/WWW/Library/vms/libmake.com
index 96223f00407..d0bd31eed7e 100644
--- a/gnu/usr.bin/lynx/WWW/Library/vms/libmake.com
+++ b/gnu/usr.bin/lynx/WWW/Library/vms/libmake.com
@@ -64,6 +64,7 @@ $ if agent .eq. 5 .or. p1 .eqs. "SOCKETSHR_TCP" then transport = "SOCKETSHR_TCP"
 $ if agent .eq. 6 .or. p1 .eqs. "TCPWARE" then transport = "TCPWARE"
 $ if agent .eq. 7 .or. p1 .eqs. "DECNET" then transport = "DECNET"
 $!
+$ if transport .eqs. "SOCKETSHR_TCP" then extra = extra + ",_DECC_V4_SOURCE"
 $ if transport .eqs. "TCPWARE" then extra = extra + ",UCX"
 $!
 $!	Compiler options can be specified here.  If there was
@@ -86,13 +87,13 @@ $  v1 = f$verify(1)
 $!
 $ cc/decc/prefix=all /nomember 'cc_opts'-
     /warning=(disable=implicitfunc)-
-    /DEFINE=(DEBUG,ACCESS_AUTH,'transport''extra',VC="""2.14""")-
+    /DEFINE=(ACCESS_AUTH,'transport''extra',VC="""2.14""")-
     /INCLUDE=([-.Implementation],[---.src],[---.src.chrtrans],[---]) -
     [-.Implementation]HTString.c
 $!
 $ cc := cc/decc/prefix=all /nomember 'cc_opts'-
 	  /warning=(disable=implicitfunc)-
-	  /DEFINE=(DEBUG,ACCESS_AUTH,'transport''extra')-
+	  /DEFINE=(ACCESS_AUTH,'transport''extra')-
 	  /INCLUDE=([-.Implementation],[---.src],[---.src.chrtrans],[---])
 $!
 $  v1 = 'f$verify(0)'
@@ -101,15 +102,15 @@ $  if transport .eqs. "MULTINET" then -
 	extra = extra + ",_DECC_V4_SOURCE,__SOCKET_TYPEDEFS"
 $  v1 = f$verify(1)
 $!
-$ cc/decc/prefix=ansi /nomember 'cc_opts'-
+$ cc/decc/prefix=all /nomember 'cc_opts'-
     /warning=(disable=implicitfunc)-
-    /DEFINE=(DEBUG,ACCESS_AUTH,'transport''extra',VC="""2.14""")-
+    /DEFINE=(ACCESS_AUTH,'transport''extra',VC="""2.14""")-
     /INCLUDE=([-.Implementation],[---.src],[---.src.chrtrans],[---]) -
     [-.Implementation]HTString.c
 $!
-$ cc := cc/decc/prefix=ansi /nomember 'cc_opts'-
+$ cc := cc/decc/prefix=all /nomember 'cc_opts'-
 	  /warning=(disable=implicitfunc)-
-	  /DEFINE=(DEBUG,ACCESS_AUTH,'transport''extra')-
+	  /DEFINE=(ACCESS_AUTH,'transport''extra')-
 	  /INCLUDE=([-.Implementation],[---.src],[---.src.chrtrans],[---])
 $!
 $  v1 = 'f$verify(0)'
@@ -120,11 +121,11 @@ $  THEN
 $   v1 = f$verify(1)
 $! GNUC:
 $!
-$   gcc/DEFINE=(DEBUG,ACCESS_AUTH,'transport''extra',VC="""2.14""") 'cc_opts'-
+$   gcc/DEFINE=(ACCESS_AUTH,'transport''extra',VC="""2.14""") 'cc_opts'-
        /INCLUDE=([-.Implementation],[---.src],[---.src.chrtrans],[---]) -
        [-.Implementation]HTString.c
 $!
-$   cc := gcc/DEFINE=(DEBUG,ACCESS_AUTH,'transport''extra') 'cc_opts'-
+$   cc := gcc/DEFINE=(ACCESS_AUTH,'transport''extra') 'cc_opts'-
 	     /INCLUDE=([-.Implementation],[---.src],[---.src.chrtrans],[---])
 $!
 $   v1 = 'f$verify(0)'
@@ -132,11 +133,11 @@ $  ELSE
 $   v1 = f$verify(1)
 $! VAXC:
 $!
-$   cc/DEFINE=(DEBUG,ACCESS_AUTH,'transport''extra',VC="""2.14""") 'cc_opts'-
+$   cc/DEFINE=(ACCESS_AUTH,'transport''extra',VC="""2.14""") 'cc_opts'-
       /INCLUDE=([-.Implementation],[---.src],[---.src.chrtrans],[---]) -
       [-.Implementation]HTString.c
 $!
-$   cc := cc/DEFINE=(DEBUG,ACCESS_AUTH,'transport''extra') 'cc_opts'-
+$   cc := cc/DEFINE=(ACCESS_AUTH,'transport''extra') 'cc_opts'-
 	    /INCLUDE=([-.Implementation],[---.src],[---.src.chrtrans],[---])
 $!
 $   v1 = 'f$verify(0)'
@@ -154,7 +155,6 @@ $ cc [-.Implementation]SGML.c
 $ cc [-.Implementation]HTMLDTD.c
 $ cc [-.Implementation]HTChunk.c
 $ cc [-.Implementation]HTPlain.c
-$ cc [-.Implementation]HTWriter.c
 $ cc [-.Implementation]HTMLGen.c
 $ cc [-.Implementation]HTAtom.c
 $ cc [-.Implementation]HTAnchor.c
@@ -163,7 +163,6 @@ $ cc [-.Implementation]HTList.c
 $ cc [-.Implementation]HTRules.c
 $ cc [-.Implementation]HTFormat.c
 $ cc [-.Implementation]HTMIME.c
-$ cc [-.Implementation]HTHistory.c
 $ cc [-.Implementation]HTNews.c
 $ cc [-.Implementation]HTGopher.c
 $ cc [-.Implementation]HTTelnet.c
@@ -171,12 +170,7 @@ $ cc [-.Implementation]HTFinger.c
 $ cc [-.Implementation]HTWSRC.c
 $ cc [-.Implementation]HTAAUtil.c
 $ cc [-.Implementation]HTAABrow.c
-$ cc [-.Implementation]HTAAServ.c
-$ cc [-.Implementation]HTAAFile.c
-$ cc [-.Implementation]HTPasswd.c
 $ cc [-.Implementation]HTGroup.c
-$ cc [-.Implementation]HTACL.c
-$ cc [-.Implementation]HTAuth.c
 $ cc [-.Implementation]HTAAProt.c
 $ cc [-.Implementation]HTAssoc.c
 $ cc [-.Implementation]HTLex.c
@@ -189,7 +183,7 @@ $ cc [-.Implementation]crypt_util.c
 $ cc [-.Implementation]HTWAIS.c
 $ cc [-.Implementation]HTVMS_WaisUI.c
 $ cc [-.Implementation]HTVMS_WaisProt.c
-$!    
+$!
 $ If f$search("[-.Implementation]WWWLib_''transport'.olb") .eqs. "" Then -
     LIBRARY/Create [-.Implementation]WWWLib_'transport'.olb
 $ LIBRARY/Replace [-.Implementation]WWWLib_'transport'.olb *.obj
diff --git a/gnu/usr.bin/lynx/aclocal.m4 b/gnu/usr.bin/lynx/aclocal.m4
index fe75e1c20f1..c619e2c8fd0 100644
--- a/gnu/usr.bin/lynx/aclocal.m4
+++ b/gnu/usr.bin/lynx/aclocal.m4
@@ -4,9 +4,409 @@ dnl and Jim Spath 
 dnl and Philippe De Muyter 
 dnl
 dnl Created: 1997/1/28
-dnl Updated: 1997/12/23
+dnl Updated: 1999/5/8
 dnl
+dnl The autoconf used in Lynx development is GNU autoconf, patched
+dnl by Tom Dickey.  See your local GNU archives, and this URL:
+dnl http://www.clark.net/pub/dickey/autoconf/autoconf.html
+dnl
+dnl ---------------------------------------------------------------------------
+dnl ---------------------------------------------------------------------------
+dnl
+AC_DEFUN(AM_GNU_GETTEXT,
+  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+   AC_REQUIRE([AC_PROG_CC])dnl
+   AC_REQUIRE([AC_PROG_RANLIB])dnl
+   AC_REQUIRE([AC_ISC_POSIX])dnl
+   AC_REQUIRE([AC_HEADER_STDC])dnl
+   AC_REQUIRE([AC_C_CONST])dnl
+   AC_REQUIRE([AC_C_INLINE])dnl
+   AC_REQUIRE([AC_TYPE_OFF_T])dnl
+   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+   AC_REQUIRE([AC_FUNC_MMAP])dnl
+
+   AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
+unistd.h values.h sys/param.h])
+   AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
+__argz_count __argz_stringify __argz_next])
+
+   if test "${ac_cv_func_stpcpy+set}" != "set"; then
+     AC_CHECK_FUNCS(stpcpy)
+   fi
+   if test "${ac_cv_func_stpcpy}" = "yes"; then
+     AC_DEFINE(HAVE_STPCPY)
+   fi
+
+   AM_LC_MESSAGES
+   AM_WITH_NLS
+
+   if test "x$CATOBJEXT" != "x"; then
+     if test "x$ALL_LINGUAS" = "x"; then
+       LINGUAS=
+     else
+       AC_MSG_CHECKING(for catalogs to be installed)
+       NEW_LINGUAS=
+       for lang in ${LINGUAS=$ALL_LINGUAS}; do
+         case "$ALL_LINGUAS" in
+          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+         esac
+       done
+       LINGUAS=$NEW_LINGUAS
+       AC_MSG_RESULT($LINGUAS)
+     fi
+
+     dnl Construct list of names of catalog files to be constructed.
+     if test -n "$LINGUAS"; then
+       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+     fi
+   fi
+
+   dnl The reference to  in the installed  file
+   dnl must be resolved because we cannot expect the users of this
+   dnl to define HAVE_LOCALE_H.
+   if test $ac_cv_header_locale_h = yes; then
+     INCLUDE_LOCALE_H="#include "
+   else
+     INCLUDE_LOCALE_H="\
+/* The system does not provide the header .  Take care of it yourself. */"
+   fi
+   AC_SUBST(INCLUDE_LOCALE_H)
+
+   dnl Determine which catalog format we have (if any is needed)
+   dnl For now we know about two different formats:
+   dnl   Linux libc-5 and the normal X/Open format
+   if test "$USE_NLS" = "yes"; then
+     test -d intl || mkdir intl
+     if test "$CATOBJEXT" = ".cat"; then
+       AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
+
+       dnl Transform the SED scripts while copying because some dumb SEDs
+       dnl cannot handle comments.
+       sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
+     fi
+     dnl po2tbl.sed is always needed.
+     if test -f $srcdir/intl/po2tbl.sed.in ; then
+       rm -f intl/po2tbl.sed
+       sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+         $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
+     fi
+   fi
+
+   dnl In the intl/makefile.in we have a special dependency which only
+   dnl makes sense for gettext.  We comment this out for non-gettext
+   dnl packages.
+   if test "$PACKAGE" = "gettext"; then
+     GT_NO="#NO#"
+     GT_YES=
+   else
+     GT_NO=
+     GT_YES="#YES#"
+   fi
+   AC_SUBST(GT_NO)
+   AC_SUBST(GT_YES)
+
+   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
+   dnl Try to locate it.
+   dnl changed mkinstalldirs to mkdirs.sh for Lynx /je spath 1998-Aug-21
+   MKINSTALLDIRS=
+   if test -n "$ac_aux_dir"; then
+     MKINSTALLDIRS="$ac_aux_dir/mkdirs.sh"
+   fi
+   if test -z "$MKINSTALLDIRS"; then
+     MKINSTALLDIRS="\$(top_srcdir)/mkdirs.sh"
+   fi
+   AC_SUBST(MKINSTALLDIRS)
+
+   dnl *** For now the libtool support in intl/makefile is not for real.
+   l=
+   AC_SUBST(l)
+
+   dnl Generate list of files to be processed by xgettext which will
+   dnl be included in po/makefile.
+   if test "x$srcdir" != "x."; then
+     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+       posrcprefix="$srcdir/"
+     else
+       posrcprefix="../$srcdir/"
+     fi
+   else
+     posrcprefix="../"
+   fi
+   if test -f $srcdir/po/POTFILES.in ; then
+   if test "$USE_NLS" = "yes"; then
+     test -d po || mkdir po
+     rm -f po/POTFILES
+     sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+	  < $srcdir/po/POTFILES.in > po/POTFILES
+   fi
+   fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl
+dnl Check whether LC_MESSAGES is available in .
+dnl Ulrich Drepper , 1995.
+dnl
+dnl This file can be copied and used freely without restrictions.  It can
+dnl be used in projects which are not available under the GNU Public License
+dnl but which still want to provide support for the GNU gettext functionality.
+dnl Please note that the actual code is *not* freely available.
+dnl
+dnl serial 1
+dnl
+AC_DEFUN(AM_LC_MESSAGES,
+  [if test $ac_cv_header_locale_h = yes; then
+    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+      [AC_TRY_LINK([#include ], [return LC_MESSAGES],
+       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+    if test $am_cv_val_LC_MESSAGES = yes; then
+      AC_DEFINE(HAVE_LC_MESSAGES)
+    fi
+  fi])
+
 dnl ---------------------------------------------------------------------------
+dnl Search path for a program which passes the given test.
+dnl Ulrich Drepper , 1996.
+dnl
+dnl This file can be copied and used freely without restrictions.  It can
+dnl be used in projects which are not available under the GNU Public License
+dnl but which still want to provide support for the GNU gettext functionality.
+dnl Please note that the actual code is *not* freely available.
+dnl
+dnl serial 1
+dnl
+dnl
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN(AM_PATH_PROG_WITH_TEST,
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+  /*)
+  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in ifelse([$5], , $PATH, [$5]); do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if [$3]; then
+	ac_cv_path_$1="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+  ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test -n "[$]$1"; then
+  AC_MSG_RESULT([$]$1)
+else
+  AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+dnl ---------------------------------------------------------------------------
+dnl gettext macros from hello-1.3.16
+dnl provided courtesy if Karl Eichwalder 
+dnl
+dnl
+dnl Macro to add for using GNU gettext.
+dnl Ulrich Drepper , 1995.
+dnl
+dnl This file can be copied and used freely without restrictions.  It can
+dnl be used in projects which are not available under the GNU Public License
+dnl but which still want to provide support for the GNU gettext functionality.
+dnl Please note that the actual code is *not* freely available.
+dnl
+dnl serial 3
+dnl
+AC_DEFUN(AM_WITH_NLS,
+  [AC_MSG_CHECKING([whether NLS is requested])
+    dnl Default is enabled NLS
+    AC_ARG_ENABLE(nls,
+      [  --enable-nls            use Native Language Support],
+      USE_NLS=$enableval, USE_NLS=no)
+    AC_MSG_RESULT($USE_NLS)
+    AC_SUBST(USE_NLS)
+
+    USE_INCLUDED_LIBINTL=no
+
+    dnl If we use NLS figure out what method
+    if test "$USE_NLS" = "yes"; then
+      AC_DEFINE(ENABLE_NLS)
+      AC_MSG_CHECKING([whether included gettext is requested])
+      AC_ARG_WITH(included-gettext,
+        [  --with-included-gettext use the GNU gettext library included here],
+        nls_cv_force_use_gnu_gettext=$withval,
+        nls_cv_force_use_gnu_gettext=yes)
+      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+        dnl User does not insist on using GNU NLS library.  Figure out what
+        dnl to use.  If gettext or catgets are available (in this order) we
+        dnl use this.  Else we have to fall back to GNU NLS library.
+	dnl catgets is only used if permitted by option --with-catgets.
+	nls_cv_header_intl=
+	nls_cv_header_libgt=
+	CATOBJEXT=NONE
+
+	AC_CHECK_HEADER(libintl.h,
+	  [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
+	    [AC_TRY_LINK([#include ], [return (int) gettext ("")],
+	       gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
+
+	   if test "$gt_cv_func_gettext_libc" != "yes"; then
+	     AC_CHECK_LIB(intl, bindtextdomain,
+	       [AC_CACHE_CHECK([for gettext in libintl],
+		 gt_cv_func_gettext_libintl,
+		 [AC_TRY_LINK([], [return (int) gettext ("")],
+		 gt_cv_func_gettext_libintl=yes,
+		 gt_cv_func_gettext_libintl=no)])])
+	   fi
+
+	   if test "$gt_cv_func_gettext_libc" = "yes" \
+	      || test "$gt_cv_func_gettext_libintl" = "yes"; then
+	      AC_DEFINE(HAVE_GETTEXT)
+	      AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+		[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+	      if test "$MSGFMT" != "no"; then
+		AC_CHECK_FUNCS(dcgettext)
+		AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+		AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+		  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+		AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+			       return _nl_msg_cat_cntr],
+		  [CATOBJEXT=.gmo
+		   DATADIRNAME=share],
+		  [CATOBJEXT=.mo
+		   DATADIRNAME=lib])
+		INSTOBJEXT=.mo
+	      fi
+	    fi
+	])
+
+        if test "$CATOBJEXT" = "NONE"; then
+	  AC_MSG_CHECKING([whether catgets can be used])
+	  AC_ARG_WITH(catgets,
+	    [  --with-catgets          use catgets functions if available],
+	    nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
+	  AC_MSG_RESULT($nls_cv_use_catgets)
+
+	  if test "$nls_cv_use_catgets" = "yes"; then
+	    dnl No gettext in C library.  Try catgets next.
+	    AC_CHECK_LIB(i, main)
+	    AC_CHECK_FUNC(catgets,
+	      [AC_DEFINE(HAVE_CATGETS)
+	       INTLOBJS="\$(CATOBJS)"
+	       AC_PATH_PROG(GENCAT, gencat, no)dnl
+	       if test "$GENCAT" != "no"; then
+		 AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
+		 if test "$GMSGFMT" = "no"; then
+		   AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
+		    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
+		 fi
+		 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+		   [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+		 USE_INCLUDED_LIBINTL=yes
+		 CATOBJEXT=.cat
+		 INSTOBJEXT=.cat
+		 DATADIRNAME=lib
+		 INTLDEPS='$(top_builddir)/intl/libintl.a'
+		 INTLLIBS=$INTLDEPS
+		 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+		 nls_cv_header_intl=intl/libintl.h
+		 nls_cv_header_libgt=intl/libgettext.h
+	       fi])
+	  fi
+        fi
+
+        if test "$CATOBJEXT" = "NONE"; then
+	  dnl Neither gettext nor catgets in included in the C library.
+	  dnl Fall back on GNU gettext library.
+	  nls_cv_use_gnu_gettext=yes
+        fi
+      fi
+
+      if test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions used to generate GNU NLS library.
+        INTLOBJS="\$(GETTOBJS)"
+        AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
+        AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+        AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+        AC_SUBST(MSGFMT)
+	USE_INCLUDED_LIBINTL=yes
+        CATOBJEXT=.gmo
+        INSTOBJEXT=.mo
+        DATADIRNAME=share
+	INTLDEPS='$(top_builddir)/intl/libintl.a'
+	INTLLIBS=$INTLDEPS
+	LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+        nls_cv_header_intl=intl/libintl.h
+        nls_cv_header_libgt=intl/libgettext.h
+      fi
+
+      dnl Test whether we really found GNU xgettext.
+      if test "$XGETTEXT" != ":"; then
+	dnl If it is no GNU xgettext we define it as : so that the
+	dnl makefiles still can work.
+	if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+	  : ;
+	else
+	  AC_MSG_RESULT(
+	    [found xgettext programs is not GNU xgettext; ignore it])
+	  XGETTEXT=":"
+	fi
+      fi
+
+      # We need to process the po/ directory.
+      POSUB=po
+    else
+      DATADIRNAME=share
+      nls_cv_header_intl=intl/libintl.h
+      nls_cv_header_libgt=intl/libgettext.h
+    fi
+
+    # If this is used in GNU gettext we have to set USE_NLS to `yes'
+    # because some of the sources are only built for this goal.
+    if test "$PACKAGE" = gettext; then
+      USE_NLS=yes
+      USE_INCLUDED_LIBINTL=yes
+    fi
+
+    dnl These rules are solely for the distribution goal.  While doing this
+    dnl we only have to keep exactly one list of the available catalogs
+    dnl in configure.in.
+    for lang in $ALL_LINGUAS; do
+      GMOFILES="$GMOFILES $lang.gmo"
+      POFILES="$POFILES $lang.po"
+    done
+
+    dnl Make all variables we use known to autoconf.
+    AC_SUBST(USE_INCLUDED_LIBINTL)
+    AC_SUBST(CATALOGS)
+    AC_SUBST(CATOBJEXT)
+    AC_SUBST(DATADIRNAME)
+    AC_SUBST(GMOFILES)
+    AC_SUBST(INSTOBJEXT)
+    AC_SUBST(INTLDEPS)
+    AC_SUBST(INTLLIBS)
+    AC_SUBST(INTLOBJS)
+    AC_SUBST(POFILES)
+    AC_SUBST(POSUB)
+  ])
 dnl ---------------------------------------------------------------------------
 dnl Add an include-directory to $CPPFLAGS.  Don't add /usr/include, since it's
 dnl redundant.  We don't normally need to add -I/usr/local/include for gcc,
@@ -33,18 +433,23 @@ done
 dnl ---------------------------------------------------------------------------
 dnl Check for existence of alternate-character-set support in curses, so we
 dnl can decide to use it for box characters.
-dnl 
+dnl
 AC_DEFUN([CF_ALT_CHAR_SET],
 [
 AC_MSG_CHECKING([if curses supports alternate-character set])
 AC_CACHE_VAL(cf_cv_alt_char_set,[
+for mapname in acs_map _acs_map
+do
 	AC_TRY_LINK([
-#include <$cf_cv_ncurses_header>
-	],[chtype x = acs_map['l']; acs_map['m'] = 0],
-	[cf_cv_alt_char_set=yes],  
-	[cf_cv_alt_char_set=no])])
+#include <${cf_cv_ncurses_header-curses.h}>
+	],[chtype x = $mapname['l']; $mapname['m'] = 0],
+	[cf_cv_alt_char_set=$mapname
+	 break],
+	[cf_cv_alt_char_set=no])
+done
+	])
 AC_MSG_RESULT($cf_cv_alt_char_set)
-test $cf_cv_alt_char_set = yes && AC_DEFINE(ALT_CHAR_SET)
+test $cf_cv_alt_char_set != no && AC_DEFINE_UNQUOTED(ALT_CHAR_SET,$cf_cv_alt_char_set)
 ])dnl
 dnl ---------------------------------------------------------------------------
 dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES'
@@ -62,13 +467,19 @@ cf_save_CFLAGS="$CFLAGS"
 # HP-UX			-Aa -D_HPUX_SOURCE
 # SVR4			-Xc
 # UnixWare 1.2		(cannot use -Xc, since ANSI/POSIX clashes)
-for cf_arg in "-DCC_HAS_PROTOS" "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" -Xc
+for cf_arg in "-DCC_HAS_PROTOS" \
+	"" \
+	-qlanglvl=ansi \
+	-std1 \
+	"-Aa -D_HPUX_SOURCE +e" \
+	"-Aa -D_HPUX_SOURCE" \
+	-Xc
 do
 	CFLAGS="$cf_save_CFLAGS $cf_arg"
 	AC_TRY_COMPILE(
 [
 #ifndef CC_HAS_PROTOS
-#if !defined(__STDC__) || __STDC__ != 1
+#if !defined(__STDC__) || (__STDC__ != 1)
 choke me
 #endif
 #endif
@@ -93,11 +504,11 @@ fi
 dnl ---------------------------------------------------------------------------
 dnl Allow user to disable a normally-on option.
 AC_DEFUN([CF_ARG_DISABLE],
-[CF_ARG_OPTION($1,[$2 (default: on)],[$3],[$4],yes)])dnl
+[CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl
 dnl ---------------------------------------------------------------------------
 dnl Allow user to enable a normally-off option.
 AC_DEFUN([CF_ARG_ENABLE],
-[CF_ARG_OPTION($1,[$2 (default: off)],[$3],[$4],no)])dnl
+[CF_ARG_OPTION($1,[$2],[$3],[$4],no)])dnl
 dnl ---------------------------------------------------------------------------
 dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus
 dnl values.
@@ -126,7 +537,7 @@ AC_DEFUN([CF_BOOL_DEFS],
 AC_MSG_CHECKING(if TRUE/FALSE are defined)
 AC_CACHE_VAL(cf_cv_bool_defs,[
 AC_TRY_COMPILE([
-#include <$cf_cv_ncurses_header>
+#include <${cf_cv_ncurses_header-curses.h}>
 #include ],[int x = TRUE, y = FALSE],
 	[cf_cv_bool_defs=yes],
 	[cf_cv_bool_defs=no])])
@@ -137,11 +548,45 @@ if test "$cf_cv_bool_defs" = no ; then
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl Check for data that is usually declared in  or 
+dnl Check if we're accidentally using a cache from a different machine.
+dnl Derive the system name, as a check for reusing the autoconf cache.
+dnl
+dnl If we've packaged config.guess and config.sub, run that (since it does a
+dnl better job than uname).
+AC_DEFUN([CF_CHECK_CACHE],
+[
+if test -f $srcdir/config.guess ; then
+	AC_CANONICAL_HOST
+	system_name="$host_os"
+else
+	system_name="`(uname -s -r) 2>/dev/null`"
+	if test -z "$system_name" ; then
+		system_name="`(hostname) 2>/dev/null`"
+	fi
+fi
+test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name")
+AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"])
+
+test -z "$system_name" && system_name="$cf_cv_system_name"
+test -n "$cf_cv_system_name" && AC_MSG_RESULT("Configuring for $cf_cv_system_name")
+
+if test ".$system_name" != ".$cf_cv_system_name" ; then
+	AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name))
+	AC_ERROR("Please remove config.cache and try again.")
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl Check for data that is usually declared in  or , e.g.,
+dnl the 'errno' variable.  Define a DECL_xxx symbol if we must declare it
+dnl ourselves.
+dnl
+dnl (I would use AC_CACHE_CHECK here, but it will not work when called in a
+dnl loop from CF_SYS_ERRLIST).
+dnl
 dnl $1 = the name to check
 AC_DEFUN([CF_CHECK_ERRNO],
 [
-AC_MSG_CHECKING([declaration of $1])
+AC_MSG_CHECKING(if external $1 is declared)
 AC_CACHE_VAL(cf_cv_dcl_$1,[
     AC_TRY_COMPILE([
 #if HAVE_STDLIB_H
@@ -152,33 +597,47 @@ AC_CACHE_VAL(cf_cv_dcl_$1,[
 #include  ],
     [long x = (long) $1],
     [eval 'cf_cv_dcl_'$1'=yes'],
-    [eval 'cf_cv_dcl_'$1'=no]')])
+    [eval 'cf_cv_dcl_'$1'=no]')
+])
+
 eval 'cf_result=$cf_cv_dcl_'$1
 AC_MSG_RESULT($cf_result)
 
-# It's possible (for near-UNIX clones) that the data doesn't exist
-AC_CACHE_VAL(cf_cv_have_$1,[
-if test $cf_result = no ; then
+if test "$cf_result" = no ; then
     eval 'cf_result=DECL_'$1
     CF_UPPER(cf_result,$cf_result)
     AC_DEFINE_UNQUOTED($cf_result)
-    AC_MSG_CHECKING([existence of $1])
-        AC_TRY_LINK([
+fi
+
+# It's possible (for near-UNIX clones) that the data doesn't exist
+CF_CHECK_EXTERN_DATA($1,int)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl Check for existence of external data in the current set of libraries.  If
+dnl we can modify it, it's real enough.
+dnl $1 = the name to check
+dnl $2 = its type
+AC_DEFUN([CF_CHECK_EXTERN_DATA],
+[
+AC_MSG_CHECKING(if external $1 exists)
+AC_CACHE_VAL(cf_cv_have_$1,[
+    AC_TRY_LINK([
 #undef $1
-extern long $1;
+extern $2 $1;
 ],
-            [$1 = 2],
-            [eval 'cf_cv_have_'$1'=yes'],
-            [eval 'cf_cv_have_'$1'=no'])
-        eval 'cf_result=$cf_cv_have_'$1
-        AC_MSG_RESULT($cf_result)
-else
-    eval 'cf_cv_have_'$1'=yes'
+    [$1 = 2],
+    [eval 'cf_cv_have_'$1'=yes'],
+    [eval 'cf_cv_have_'$1'=no'])])
+
+eval 'cf_result=$cf_cv_have_'$1
+AC_MSG_RESULT($cf_result)
+
+if test "$cf_result" = yes ; then
+    eval 'cf_result=HAVE_'$1
+    CF_UPPER(cf_result,$cf_result)
+    AC_DEFINE_UNQUOTED($cf_result)
 fi
-])
-eval 'cf_result=HAVE_'$1
-CF_UPPER(cf_result,$cf_result)
-eval 'test $cf_cv_have_'$1' = yes && AC_DEFINE_UNQUOTED($cf_result)'
+
 ])dnl
 dnl ---------------------------------------------------------------------------
 dnl Check if a function is declared by including a set of include files.
@@ -189,7 +648,7 @@ dnl in the first test, but most compilers will oblige with an error in the
 dnl second test.
 dnl
 dnl CF_CHECK_FUNCDECL(INCLUDES, FUNCTION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-AC_DEFUN(CF_CHECK_FUNCDECL,
+AC_DEFUN([CF_CHECK_FUNCDECL],
 [
 AC_MSG_CHECKING([for $2 declaration])
 AC_CACHE_VAL(ac_cv_func_decl_$2,
@@ -218,7 +677,7 @@ dnl Check if functions are declared by including a set of include files.
 dnl and define DECL_XXX if not.
 dnl
 dnl CF_CHECK_FUNCDECLS(INCLUDES, FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-AC_DEFUN(CF_CHECK_FUNCDECLS,
+AC_DEFUN([CF_CHECK_FUNCDECLS],
 [for ac_func in $2
 do
 CF_CHECK_FUNCDECL([$1], $ac_func,
@@ -232,7 +691,7 @@ dnl ---------------------------------------------------------------------------
 dnl Check if curses supports color.  (Note that while SVr3 curses supports
 dnl color, it does this differently from SVr4 curses; more work would be needed
 dnl to accommodate SVr3).
-dnl 
+dnl
 AC_DEFUN([CF_COLOR_CURSES],
 [
 AC_MSG_CHECKING(if curses supports color attributes)
@@ -278,6 +737,9 @@ hpux10.*)
 		ac_cv_func_initscr=yes
 		])])
 	;;
+linux*) # Suse Linux does not follow /usr/lib convention
+	LIBS="$LIBS -L/lib"
+	;;
 esac
 
 if test ".$With5lib" != ".no" ; then
@@ -304,7 +766,7 @@ if test ".$ac_cv_func_initscr" != .yes ; then
 
 	# Check for library containing initscr
 	test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
-	for cf_curs_lib in curses ncurses xcurses cursesX jcurses unknown
+	for cf_curs_lib in cursesX curses ncurses xcurses jcurses unknown
 	do
 		AC_CHECK_LIB($cf_curs_lib,initscr,[break])
 	done
@@ -346,7 +808,7 @@ AC_MSG_CHECKING([for curses performance tradeoff])
 AC_CACHE_VAL(cf_cv_curs_performance,[
     cf_cv_curs_performance=no
     AC_TRY_COMPILE([
-#include <$cf_cv_ncurses_header>],[
+#include <${cf_cv_ncurses_header-curses.h}>],[
 #if defined(wbkgdset) && defined(clearok) && defined(getbkgd)
 	int x = ERR;
 #else
@@ -355,7 +817,7 @@ AC_CACHE_VAL(cf_cv_curs_performance,[
 	],[
 	AC_TRY_COMPILE([
 #define CURS_PERFORMANCE
-#include <$cf_cv_ncurses_header>],[
+#include <${cf_cv_ncurses_header-curses.h}>],[
 #if defined(wbkgdset) && defined(clearok) && defined(getbkgd)
 	int x = ;	/* force an error */
 #else
@@ -416,6 +878,32 @@ AC_SUBST(SHOW_CC)
 AC_SUBST(ECHO_CC)
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl Check whether character set is EBCDIC.
+AC_DEFUN([CF_EBCDIC],[
+AC_MSG_CHECKING(if character set is EBCDIC)
+AC_CACHE_VAL(cf_cv_ebcdic,[
+	AC_TRY_COMPILE([ ],
+[ /* TryCompile function for CharSet.
+   Treat any failure as ASCII for compatibility with existing art.
+   Use compile-time rather than run-time tests for cross-compiler
+   tolerance.  */
+#if '0'!=240
+make an error "Character set is not EBCDIC"
+#endif ],
+[ # TryCompile action if true
+cf_cv_ebcdic=yes ],
+[ # TryCompile action if false
+cf_cv_ebcdic=no])
+# end of TryCompile ])
+# end of CacheVal CvEbcdic
+AC_MSG_RESULT($cf_cv_ebcdic)
+case "$cf_cv_ebcdic" in  #(vi
+    yes) AC_DEFINE(EBCDIC)
+         AC_DEFINE(NOT_ASCII);; #(vi
+    *)   ;;
+esac
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl Check if 'errno' is declared in 
 AC_DEFUN([CF_ERRNO],
 [
@@ -427,7 +915,7 @@ AC_DEFUN([CF_FANCY_CURSES],
 AC_MSG_CHECKING(if curses supports fancy attributes)
 AC_CACHE_VAL(cf_cv_fancy_curses,[
 	AC_TRY_LINK([
-#include <$cf_cv_ncurses_header>
+#include <${cf_cv_ncurses_header-curses.h}>
 ],
 	[attrset(A_UNDERLINE|A_BOLD|A_REVERSE);
 	 wattrset(stdscr, A_BLINK|A_DIM);
@@ -483,7 +971,7 @@ if test $cf_cv_have_lib_$1 = no ; then
 fi
 case $host_os in #(vi
 linux*) # Suse Linux does not follow /usr/lib convention
-	$1="[$]$1 /lib"
+	LIBS="$LIBS -L/lib"
 	;;
 esac
 ])dnl
@@ -669,7 +1157,7 @@ then
 	changequote(,)dnl
 	cat > conftest.$ac_ext <
+#include 
+#include 
+#include 
+],[inet_aton(0, (struct in_addr *)0)],
+    [cf_cv_have_inet_aton=yes],
+    [cf_cv_have_inet_aton=no])])
+if test "$cf_cv_have_inet_aton" = yes ; then
+    AC_DEFINE(HAVE_INET_ATON)
+else
+    AC_CACHE_CHECK(for inet_addr function,cf_cv_have_inet_addr,[
+    AC_TRY_LINK([#include 
+#include 
+#include 
+#include 
+    ],[inet_addr(0)],
+	[cf_cv_have_inet_addr=yes],
+	[cf_cv_have_inet_addr=no])])
+    if test "$cf_cv_have_inet_addr" = no ; then
+	AC_CACHE_CHECK(for library with inet_addr,cf_cv_lib_inet_addr,[
+	    cf_save_LIBS="$LIBS"
+	    for cf_inetlib in -lbind -lresolv
+	    do
+		LIBS="$cf_save_LIBS $cf_inetlib"
+		AC_TRY_LINK([#include 
+#include 
+#include 
+#include 
+		],[inet_addr(0)],
+		    [cf_cv_lib_inet_addr=$cf_inetlib],
+		    [cf_cv_lib_inet_addr=no])
+		LIBS="$cf_save_LIBS"
+		test "$cf_cv_lib_inet_addr" != no && break
+	    done
+	])
+	if test "$cf_cv_lib_inet_addr" != no ; then
+	    LIBS="$LIBS $cf_cv_lib_inet_addr"
+	else
+	    AC_MSG_WARN(Unable to find library for inet_addr function)
+	fi
+    fi
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl Construct a search-list for a nonstandard library-file
 AC_DEFUN([CF_LIBRARY_PATH],
 [$1=""
@@ -754,61 +1294,6 @@ AC_MSG_RESULT($cf_cv_locale)
 test $cf_cv_locale = yes && AC_DEFINE(LOCALE)
 ])
 dnl ---------------------------------------------------------------------------
-dnl Check for the use of 'include' in 'make' (BSDI is a special case)
-dnl The symbol $ac_make is set in AC_MAKE_SET, as a side-effect.
-AC_DEFUN([CF_MAKE_INCLUDE],
-[
-AC_MSG_CHECKING(for style of include in makefiles)
-
-make_include_left=""
-make_include_right=""
-make_include_quote="unknown"
-
-cf_inc=head$$
-cf_dir=subd$$
-echo 'RESULT=OK' >$cf_inc
-mkdir $cf_dir
-
-for cf_include in "include" ".include" "!include"
-do
-	for cf_quote in '' '"'
-	do
-		cat >$cf_dir/makefile <&AC_FD_CC | grep cf_make_include=OK`
-	if test -n "$cf_make_include"; then
-		make_include_left="$cf_include"
-		make_include_quote="$cf_quote"
-		break
-	else
-		echo Tried 1>&AC_FD_CC
-		cat $cf_dir/makefile 1>&AC_FD_CC
-	fi
-	done
-	test -n "$cf_make_include" && break
-done
-
-rm -rf $cf_inc $cf_dir
-
-if test -z "$make_include_left" ; then
-	AC_ERROR(Your $ac_make program does not support includes)
-fi
-if test ".$make_include_quote" != .unknown ; then
-	make_include_left="$make_include_left $make_include_quote"
-	make_include_right="$make_include_quote"
-fi
-
-AC_MSG_RESULT(${make_include_left}file${make_include_right})
-
-AC_SUBST(make_include_left)
-AC_SUBST(make_include_right)
-])dnl
-dnl ---------------------------------------------------------------------------
 dnl Check for pre-1.9.9g ncurses (among other problems, the most obvious is
 dnl that color combinations don't work).
 AC_DEFUN([CF_NCURSES_BROKEN],
@@ -818,7 +1303,7 @@ if test "$cf_cv_ncurses_version" != no ; then
 AC_MSG_CHECKING(for obsolete/broken version of ncurses)
 AC_CACHE_VAL(cf_cv_ncurses_broken,[
 AC_TRY_COMPILE([
-#include <$cf_cv_ncurses_header>],[
+#include <${cf_cv_ncurses_header-curses.h}>],[
 #if defined(NCURSES_VERSION) && defined(wgetbkgd)
 	make an error
 #else
@@ -1091,6 +1576,22 @@ fi
 ])
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl Check if we use the messages included with this program
+AC_DEFUN([CF_OUR_MESSAGES],
+[
+use_our_messages=no
+if test -d $srcdir/po ; then
+AC_MSG_CHECKING(if we should use included message-library)
+	AC_ARG_ENABLE(included-msgs,
+	[  --enable-included-msgs  use included messages, for i18n support],
+	[use_our_messages=$enableval],
+	[use_our_messages=yes])
+fi
+AC_MSG_RESULT($use_our_messages)
+test $use_our_messages = yes && USE_OUR_MESSAGES=
+AC_SUBST(USE_OUR_MESSAGES)
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl Check for a given program, defining corresponding symbol.
 dnl	$1 = environment variable, which is suffixed by "_PATH" in the #define.
 dnl	$2 = program name to find.
@@ -1107,11 +1608,19 @@ if test "$with_full_paths" = yes ; then
 else
 	AC_MSG_CHECKING(for $2)
 	AC_MSG_RESULT([$]$1)
+	eval 'ac_cv_path_'$1'="'$2'"'
 fi
-
 cf_path_prog=""
 cf_path_args=""
-IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}:"
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
 for cf_temp in $ac_cv_path_$1
 do
 	if test -z "$cf_path_prog" ; then
@@ -1128,6 +1637,31 @@ AC_DEFINE_UNQUOTED($1_PATH,"$cf_path_prog")
 test -n "$cf_path_args" && AC_DEFINE_UNQUOTED($1_ARGS,"$cf_path_args")
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl Check the argument to see that it looks like a pathname.  Rewrite it if it
+dnl begins with one of the prefix/exec_prefix variables, and then again if the
+dnl result begins with 'NONE'.  This is necessary to workaround autoconf's
+dnl delayed evaluation of those symbols.
+AC_DEFUN([CF_PATH_SYNTAX],[
+case ".[$]$1" in #(vi
+./*) #(vi
+  ;;
+.\[$]{*prefix}*) #(vi
+  eval $1="[$]$1"
+  case ".[$]$1" in #(vi
+  .NONE/*)
+    $1=`echo [$]$1 | sed -e s@NONE@$ac_default_prefix@`
+    ;;
+  esac
+  ;; #(vi
+.NONE/*)
+  $1=`echo [$]$1 | sed -e s@NONE@$ac_default_prefix@`
+  ;;
+*)
+  AC_ERROR(expected a pathname)
+  ;;
+esac
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl Re-check on a function to see if we can pick it up by adding a library.
 dnl	$1 = function to check
 dnl	$2 = library to check in
@@ -1260,7 +1794,7 @@ AC_CACHE_VAL(cf_cv_slang_header,[
 		do
 			echo trying $cf_incdir/$cf_header 1>&AC_FD_CC
 			if egrep "SLANG_VERSION" $cf_incdir/$cf_header 1>&AC_FD_CC 2>&1; then
-				cf_cv_slang_header=$cf_incdir/$cf_header 
+				cf_cv_slang_header=$cf_incdir/$cf_header
 				break
 			fi
 		done
@@ -1311,6 +1845,75 @@ AC_MSG_RESULT($cf_result)
 test $cf_result = no && LIBS="$cf_slang_LIBS3"
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl Check for socks library
+dnl $1 = the [optional] directory in which the library may be found
+dnl $2 = the [optional] name of the library
+AC_DEFUN([CF_SOCKS],[
+case "$1" in #(vi
+no|yes) #(vi
+  ;;
+*)
+  LIBS="$LIBS -L$1"
+  ;;
+esac
+LIBS="$LIBS -lsocks"
+AC_DEFINE(SOCKS)
+AC_DEFINE(accept,Raccept)
+AC_DEFINE(bind,Rbind)
+AC_DEFINE(connect,Rconnect)
+AC_DEFINE(getpeername,Rgetpeername)
+AC_DEFINE(getsockname,Rgetsockname)
+AC_DEFINE(listen,Rlisten)
+AC_DEFINE(recvfrom,Rrecvfrom)
+AC_DEFINE(select,Rselect)
+AC_TRY_LINK([
+#include ],[
+	accept((char *)0)],,
+	[AC_ERROR(Cannot link with socks library)])
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl Check for socks5 configuration
+dnl $1 = the [optional] directory in which the library may be found
+AC_DEFUN([CF_SOCKS5],[
+case "$1" in #(vi
+no|yes) #(vi
+  ;;
+*)
+  LIBS="$LIBS -L$1"
+  CFLAGS="$CFLAGS -I$1/../include"
+  ;;
+esac
+LIBS="$LIBS -lsocks5"
+AC_DEFINE(USE_SOCKS5)
+AC_DEFINE(SOCKS)
+AC_MSG_CHECKING(if the socks library uses socks4 prefix)
+AC_TRY_LINK([
+#include ],[
+	Rinit((char *)0)],
+	[AC_DEFINE(USE_SOCKS4_PREFIX)
+	 cf_use_socks4=yes],
+	[AC_TRY_LINK([#include ],
+		[SOCKSinit((char *)0)],
+		[cf_use_socks4=no],
+		[AC_ERROR(Cannot link with socks5 library)])])
+AC_MSG_RESULT($cf_use_socks4)
+if test "$cf_use_socks4" = "yes" ; then
+	AC_DEFINE(accept,Raccept)
+	AC_DEFINE(bind,Rbind)
+	AC_DEFINE(connect,Rconnect)
+	AC_DEFINE(getpeername,Rgetpeername)
+	AC_DEFINE(getsockname,Rgetsockname)
+	AC_DEFINE(listen,Rlisten)
+	AC_DEFINE(recvfrom,Rrecvfrom)
+	AC_DEFINE(select,Rselect)
+else
+	AC_DEFINE(accept,SOCKSaccept)
+	AC_DEFINE(getpeername,SOCKSgetpeername)
+	AC_DEFINE(getsockname,SOCKSgetsockname)
+	AC_DEFINE(recvfrom,SOCKSrecvfrom)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl	Remove "-g" option from the compiler options
 AC_DEFUN([CF_STRIP_G_OPT],
 [$1=`echo ${$1} | sed -e 's/-g //' -e 's/-g$//'`])dnl
@@ -1322,14 +1925,14 @@ $1=`echo ${$1} | sed -e 's/-O[1-9]\? //' -e 's/-O[1-9]\?$//'`
 changequote([,])dnl
 ])dnl
 dnl ---------------------------------------------------------------------------
-AC_DEFUN([CF_SYSTEM_MAIL_FLAGS], 
+AC_DEFUN([CF_SYSTEM_MAIL_FLAGS],
 [
 AC_MSG_CHECKING([system mail flags])
 AC_CACHE_VAL(cf_cv_system_mail_flags,[
 	case $cf_cv_SYSTEM_MAIL in
 	*/mmdf/*)
 		[cf_cv_system_mail_flags="-mlruxto,cc\\\\*"]
-        	;; 
+        	;;
 	*)
         	[cf_cv_system_mail_flags="-t -oi"]
 	esac
@@ -1349,33 +1952,67 @@ do
 done
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl Look for termcap libraries, needed by some versions of slang.
+dnl Look for termcap libraries, or the equivalent in terminfo.
 AC_DEFUN([CF_TERMCAP_LIBS],
 [
-AC_CACHE_VAL(cf_cv_lib_termcap,[
-cf_cv_lib_termcap=none
+AC_CACHE_VAL(cf_cv_termlib,[
+cf_cv_termlib=none
+AC_TRY_LINK([],[char *x=(char*)tgoto("",0,0)],
+[AC_TRY_LINK([],[int x=tigetstr("")],
+	[cf_cv_termlib=terminfo],
+	[cf_cv_termlib=termcap])
+	CF_VERBOSE(using functions in predefined $cf_cv_termlib LIBS)
+],[
+ifelse([$1],,,[
+if test "$1" = ncurses; then
+	CF_NCURSES_CPPFLAGS
+	CF_NCURSES_LIBS
+	cf_cv_termlib=terminfo
+fi
+])
 # HP-UX 9.x terminfo has setupterm, but no tigetstr.
-if test "$termlib" = none; then
-	AC_CHECK_LIB(termlib, tigetstr, [LIBS="$LIBS -ltermlib" cf_cv_lib_termcap=terminfo])
+if test "$cf_cv_termlib" = none; then
+	AC_CHECK_LIB(termlib, tigetstr, [LIBS="$LIBS -ltermlib" cf_cv_termlib=terminfo])
 fi
-if test "$cf_cv_lib_termcap" = none; then
-	AC_CHECK_LIB(termlib, tgoto, [LIBS="$LIBS -ltermlib" cf_cv_lib_termcap=termcap])
+if test "$cf_cv_termlib" = none; then
+	AC_CHECK_LIB(termlib, tgoto, [LIBS="$LIBS -ltermlib" cf_cv_termlib=termcap])
 fi
-if test "$cf_cv_lib_termcap" = none; then
+if test "$cf_cv_termlib" = none; then
 	# allow curses library for broken AIX system.
-	AC_CHECK_LIB(curses, initscr, [LIBS="$LIBS -lcurses" cf_cv_lib_termcap=termcap])
-	AC_CHECK_LIB(termcap, tgoto, [LIBS="$LIBS -ltermcap" cf_cv_lib_termcap=termcap])
+	AC_CHECK_LIB(curses, initscr, [LIBS="$LIBS -lcurses" cf_cv_termlib=termcap])
+	AC_CHECK_LIB(termcap, tgoto, [LIBS="$LIBS -ltermcap" cf_cv_termlib=termcap])
 fi
-if test "$cf_cv_lib_termcap" = none; then
-	AC_CHECK_LIB(termcap, tgoto, [LIBS="$LIBS -ltermcap" cf_cv_lib_termcap=termcap])
+if test "$cf_cv_termlib" = none; then
+	AC_CHECK_LIB(termcap, tgoto, [LIBS="$LIBS -ltermcap" cf_cv_termlib=termcap])
 fi
-if test "$cf_cv_lib_termcap" = none; then
-	AC_CHECK_LIB(ncurses, tgoto, [LIBS="$LIBS -lncurses" cf_cv_lib_termcap=ncurses])
+if test "$cf_cv_termlib" = none; then
+	AC_CHECK_LIB(ncurses, tgoto, [LIBS="$LIBS -lncurses" cf_cv_termlib=ncurses])
 fi
 ])
-if test "$cf_cv_lib_termcap" = none; then
+if test "$cf_cv_termlib" = none; then
 	AC_ERROR([Can't find -ltermlib, -lcurses, or -ltermcap])
 fi
+])])dnl
+dnl ---------------------------------------------------------------------------
+dnl Check if including termio.h with  dies like on sysv68
+dnl FIXME: this is too Lynx-specific
+AC_DEFUN([CF_TERMIO_AND_CURSES],
+[
+AC_CACHE_CHECK(if we can include termio.h with curses,cf_cv_termio_and_curses,[
+    cf_save_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -DHAVE_CONFIG_H -I. -I${srcdir-.} -I${srcdir-.}/src -I${srcdir-.}/WWW/Library/Implementation"
+    touch lynx_cfg.h
+    AC_TRY_COMPILE([
+#include <$1>
+#include ],
+    [putchar(0x0a)],
+    [cf_cv_termio_and_curses=yes],
+    [cf_cv_termio_and_curses=no])
+    CFLAGS="$cf_save_CFLAGS"
+    rm -f lynx_cfg.h
+])
+
+test $cf_cv_termio_and_curses = yes && AC_DEFINE(TERMIO_AND_CURSES)
 ])dnl
 dnl ---------------------------------------------------------------------------
 dnl Check if including both termio.h and termios.h die like on DG.UX
@@ -1401,7 +2038,7 @@ AC_DEFUN([CF_TTYTYPE],
 [
 AC_MSG_CHECKING(if ttytype is declared in curses library)
 AC_CACHE_VAL(cf_cv_have_ttytype,[
-	AC_TRY_LINK([#include <$cf_cv_ncurses_header>],
+	AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>],
 	[char *x = &ttytype[1]; *x = 1],
 	[cf_cv_have_ttytype=yes],
 	[cf_cv_have_ttytype=no])
@@ -1483,6 +2120,35 @@ test $cf_cv_have_utmp != no && AC_DEFINE(HAVE_UTMP)
 test $cf_cv_have_utmp = utmpx && AC_DEFINE(UTMPX_FOR_UTMP)
 ])
 dnl ---------------------------------------------------------------------------
+dnl Check for ANSI stdarg.h vs varargs.h.  Note that some systems include
+dnl  within .
+AC_DEFUN([CF_VARARGS],
+[
+AC_CHECK_HEADERS(stdarg.h varargs.h)
+AC_MSG_CHECKING(for standard varargs)
+AC_CACHE_VAL(cf_cv_ansi_varargs,[
+	AC_TRY_COMPILE([
+#if HAVE_STDARG_H
+#include 
+#else
+#if HAVE_VARARGS_H
+#include 
+#endif
+#endif
+		],
+		[return 0;} int foo(char *fmt,...){va_list args;va_start(args,fmt);va_end(args)],
+		[cf_cv_ansi_varargs=yes],
+		[cf_cv_ansi_varargs=no])
+	])
+AC_MSG_RESULT($cf_cv_ansi_varargs)
+test $cf_cv_ansi_varargs = yes && AC_DEFINE(ANSI_VARARGS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl Use AC_VERBOSE w/o the warnings
+AC_DEFUN([CF_VERBOSE],
+[test -n "$verbose" && echo "	$1" 1>&AC_FD_MSG
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl Build up an expression $cf_wait_headers with the header files needed to
 dnl compile against the prototypes for 'wait()', 'waitpid()', etc.  Assume it's
 dnl Posix, which uses  and , but allow SVr4 variation
@@ -1511,3 +2177,20 @@ 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
+CF_PATH_SYNTAX(withval)
+eval $3="$withval"
+AC_SUBST($3)dnl
+])dnl
diff --git a/gnu/usr.bin/lynx/build-slang.com b/gnu/usr.bin/lynx/build-slang.com
index 852afcae247..234eca5f1c1 100644
--- a/gnu/usr.bin/lynx/build-slang.com
+++ b/gnu/usr.bin/lynx/build-slang.com
@@ -107,7 +107,7 @@ $ 	read sys$command/prompt="Agent [1,2,3,4,5,6] (RETURN = [1]) " agent
 $   EndIf
 $ ENDIF
 $ option = ""
-$ if agent .eq. 1 .or. agent .eqs. "" .or. p1 .eqs. "MULTINET" then -
+$ if agent .eq. 1 .or. agent .eqs. "" .or. p1 .eqs. "" .or. p1 .eqs. "MULTINET" then - 
     option = "MULTINET"
 $ if agent .eq. 2 .or. p1 .eqs. "UCX" then option = "UCX"
 $ if agent .eq. 3 .or. p1 .eqs. "WIN_TCP" then option = "WIN_TCP"
@@ -115,6 +115,12 @@ $ if agent .eq. 4 .or. p1 .eqs. "CMU_TCP" then option = "CMU_TCP"
 $ if agent .eq. 5 .or. p1 .eqs. "SOCKETSHR_TCP" then option = "SOCKETSHR_TCP"
 $ if agent .eq. 6 .or. p1 .eqs. "TCPWARE" then option = "TCPWARE"
 $!
+$ if option .eqs. "" 
+$ then 
+$    write sys$output "TCP/IP agent could not be determined" 
+$    exit 18 
+$ endif 
+$ 
 $ if option .eqs. "TCPWARE"
 $ then
 $    write sys$output "Building Lynx for TCPWARE with UCX emulation..."
@@ -211,13 +217,14 @@ $ THEN
 $  compiler := "DECC"
 $  if option .eqs. "UCX" then optfile = "UCXSHR"
 $  if option .eqs. "TCPWARE" then optfile = "TCPWARESHR"
+$  if option .eqs. "SOCKETSHR_TCP" then extra = extra + ",_DECC_V4_SOURCE"
 $  if option .eqs. "MULTINET" then -
 	extra = extra + ",_DECC_V4_SOURCE,__SOCKET_TYPEDEFS"
 $  v1 = f$verify(1)
 $! DECC:
 $  cc := cc/decc/prefix=all/nomember'cc_opts' -
-	   /DEFINE=(DEBUG,ACCESS_AUTH,'option''extra',USE_SLANG,__VMS_CURSES)-
-	   /INCLUDE=([-],[-.WWW.Library.Implementation],'SLANGINC') 
+	   /DEFINE=(ACCESS_AUTH,'option''extra',USE_SLANG,__VMS_CURSES)-
+	   /INCLUDE=([],[-],[-.WWW.Library.Implementation],[.chrtrans],'SLANGINC') 
 $  v1 = 'f$verify(0)'
 $ ELSE
 $  if option .eqs. "UCX" then optfile = "UCXOLB"
@@ -228,16 +235,16 @@ $   compiler := "GNUC"
 $   v1 = f$verify(1)
 $! GNUC:
 $   cc := gcc'cc_opts' -
-	     /DEFINE=(DEBUG,ACCESS_AUTH,'option''extra',USE_SLANG)-
-	     /INCLUDE=([-],[-.WWW.Library.Implementation],'SLANGINC') 
+	     /DEFINE=(ACCESS_AUTH,'option''extra',USE_SLANG)-
+	     /INCLUDE=([],[-],[-.WWW.Library.Implementation],[.chrtrans],'SLANGINC') 
 $   v1 = 'f$verify(0)'
 $  ELSE
 $   compiler := "VAXC"
 $   v1 = f$verify(1)
 $! VAXC:
 $   cc := cc'cc_opts' -
-	    /DEFINE=(DEBUG,ACCESS_AUTH,'option''extra',USE_SLANG)-
-	    /INCLUDE=([-],[-.WWW.Library.Implementation],'SLANGINC')
+	    /DEFINE=(ACCESS_AUTH,'option''extra',USE_SLANG)-
+	    /INCLUDE=([],[-],[-.WWW.Library.Implementation],[.chrtrans],'SLANGINC')
 $   v1 = 'f$verify(0)'
 $  ENDIF
 $ ENDIF
diff --git a/gnu/usr.bin/lynx/build.com b/gnu/usr.bin/lynx/build.com
index bfec6e39d25..d1275214be9 100644
--- a/gnu/usr.bin/lynx/build.com
+++ b/gnu/usr.bin/lynx/build.com
@@ -86,7 +86,7 @@ $ 	read sys$command/prompt="Agent [1,2,3,4,5,6] (RETURN = [1]) " agent
 $   EndIf
 $ ENDIF
 $ option = ""
-$ if agent .eq. 1 .or. agent .eqs. "" .or. p1 .eqs. "MULTINET" then -
+$ if agent .eq. 1 .or. agent .eqs. "" .or. p1 .eqs. "" .or. p1 .eqs. "MULTINET" then - 
     option = "MULTINET"
 $ if agent .eq. 2 .or. p1 .eqs. "UCX" then option = "UCX"
 $ if agent .eq. 3 .or. p1 .eqs. "WIN_TCP" then option = "WIN_TCP"
@@ -94,6 +94,12 @@ $ if agent .eq. 4 .or. p1 .eqs. "CMU_TCP" then option = "CMU_TCP"
 $ if agent .eq. 5 .or. p1 .eqs. "SOCKETSHR_TCP" then option = "SOCKETSHR_TCP"
 $ if agent .eq. 6 .or. p1 .eqs. "TCPWARE" then option = "TCPWARE"
 $!
+$ if option .eqs. "" 
+$ then 
+$    write sys$output "TCP/IP agent could not be determined" 
+$    exit 18 
+$ endif 
+$ 
 $ if option .eqs. "TCPWARE"
 $ then
 $    write sys$output "Building Lynx for TCPWARE with UCX emulation..."
@@ -190,13 +196,14 @@ $ THEN
 $  compiler := "DECC"
 $  if option .eqs. "UCX" then optfile = "UCXSHR"
 $  if option .eqs. "TCPWARE" then optfile = "TCPWARESHR"
+$  if option .eqs. "SOCKETSHR_TCP" then extra = extra + ",_DECC_V4_SOURCE"
 $  if option .eqs. "MULTINET" then -
 	extra = extra + ",_DECC_V4_SOURCE,__SOCKET_TYPEDEFS"
 $  v1 = f$verify(1)
 $! DECC:
-$  cc := cc/decc/prefix=all/nomember'cc_opts'-
-	   /DEFINE=(DEBUG,ACCESS_AUTH,'option''extra',__VMS_CURSES)-
-	   /INCLUDE=([-],[-.WWW.Library.Implementation],[.chrtrans]) 
+$  cc := cc/decc/prefix=all/nomember'cc_opts' -
+	   /DEFINE=(ACCESS_AUTH,'option''extra',__VMS_CURSES)-
+	   /INCLUDE=([],[-],[-.WWW.Library.Implementation],[.chrtrans]) 
 $  v1 = 'f$verify(0)'
 $ ELSE
 $  if option .eqs. "UCX" then optfile = "UCXOLB"
@@ -207,16 +214,16 @@ $   compiler := "GNUC"
 $   v1 = f$verify(1)
 $! GNUC:
 $   cc := gcc'cc_opts' -
-	     /DEFINE=(DEBUG,ACCESS_AUTH,'option''extra')-
-	     /INCLUDE=([-],[-.WWW.Library.Implementation],[.chrtrans]) 
+	     /DEFINE=(ACCESS_AUTH,'option''extra')-
+	     /INCLUDE=([],[-],[-.WWW.Library.Implementation],[.chrtrans]) 
 $   v1 = 'f$verify(0)'
 $  ELSE
 $   compiler := "VAXC"
 $   v1 = f$verify(1)
 $! VAXC:
 $   cc := cc'cc_opts' -
-	    /DEFINE=(DEBUG,ACCESS_AUTH,'option''extra')-
-	    /INCLUDE=([-],[-.WWW.Library.Implementation],[.chrtrans]) 
+	    /DEFINE=(ACCESS_AUTH,'option''extra')-
+	    /INCLUDE=([],[-],[-.WWW.Library.Implementation],[.chrtrans]) 
 $   v1 = 'f$verify(0)'
 $  ENDIF
 $ ENDIF
diff --git a/gnu/usr.bin/lynx/cfg_defs.sh b/gnu/usr.bin/lynx/cfg_defs.sh
new file mode 100644
index 00000000000..4f8a00347bb
--- /dev/null
+++ b/gnu/usr.bin/lynx/cfg_defs.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Translate the lynx_cfg.h and config.cache data into a table, useful for
+# display at runtime.
+
+OUT=cfg_defs.h
+
+cat >$OUT <>$OUT
+
+cat >>$OUT <>$OUT
+
+cat >>$OUT <'
+# Append a '=' if none present'
+# Break into two strings at '='
+# Prefix ' { "' and suffix '" },'
+sort |
+sed	-e 's!^[ 	]*!!' -e 's![ 	]*$!!' \
+	-e 's!\\!\\\\!g'        \
+	-e 's!"!\\"!g'          \
+	-e 's!&!\&!g' -e 's!!\>!g' \
+	-e 's!^[^=]*$!&=!' \
+	-e 's!=!",	"!'     \
+	-e 's!^!	{ "!' -e 's!$!" },!'
diff --git a/gnu/usr.bin/lynx/config.guess b/gnu/usr.bin/lynx/config.guess
index 90ea468dabd..251d0afee3d 100644
--- a/gnu/usr.bin/lynx/config.guess
+++ b/gnu/usr.bin/lynx/config.guess
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc.
+#   Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -52,11 +52,53 @@ trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     alpha:OSF1:*:*)
+	if test $UNAME_RELEASE = "V4.0"; then
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+	fi
 	# A Vn.n version is a released version.
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'`
+	cat <dummy.s
+	.globl main
+	.ent main
+main:
+	.frame \$30,0,\$26,0
+	.prologue 0
+	.long 0x47e03d80 # implver $0
+	lda \$2,259
+	.long 0x47e20c21 # amask $2,$1
+	srl \$1,8,\$2
+	sll \$2,2,\$2
+	sll \$0,3,\$0
+	addl \$1,\$0,\$0
+	addl \$2,\$0,\$0
+	ret \$31,(\$26),1
+	.end main
+EOF
+	${CC-cc} dummy.s -o dummy 2>/dev/null
+	if test "$?" = 0 ; then
+		./dummy
+		case "$?" in
+			7)
+				UNAME_MACHINE="alpha"
+				;;
+			15)
+				UNAME_MACHINE="alphaev5"
+				;;
+			14)
+				UNAME_MACHINE="alphaev56"
+				;;
+			10)
+				UNAME_MACHINE="alphapca56"
+				;;
+			16)
+				UNAME_MACHINE="alphaev6"
+				;;
+		esac
+	fi
+	rm -f dummy.s dummy
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
 	exit 0 ;;
     21064:Windows_NT:50:3)
 	echo alpha-dec-winnt3.5
@@ -68,12 +110,39 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
       echo m68k-cbm-netbsd${UNAME_RELEASE}
       exit 0 ;;
     amiga:OpenBSD:*:*)
-      echo m68k-unknown-openbsd${UNAME_RELEASE}
-      exit 0 ;;
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit 0 ;;
+    arc64:OpenBSD:*:*)
+	echo mips64el-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    arc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    hkmips:OpenBSD:*:*)
+	echo mips-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    pmax:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sgi:OpenBSD:*:*)
+	echo mips-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    wgrisc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
 	exit 0;;
-    Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
+    arm32:NetBSD:*:*)
+	echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+	exit 0 ;;
+    SR2?01:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit 0;;
+    Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*)
 	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
 		echo pyramid-pyramid-sysv3
@@ -84,6 +153,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     NILE:*:*:dcosx)
 	echo pyramid-pyramid-svr4
 	exit 0 ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit 0 ;;
@@ -108,6 +180,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     sun3*:SunOS:*:*)
 	echo m68k-sun-sunos${UNAME_RELEASE}
 	exit 0 ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit 0 ;;
     aushp:SunOS:*:*)
 	echo sparc-auspex-sunos${UNAME_RELEASE}
 	exit 0 ;;
@@ -132,9 +216,15 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     mvme68k:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+	echo m88k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
     powerpc:machten:*:*)
 	echo powerpc-apple-machten${UNAME_RELEASE}
 	exit 0 ;;
+    macppc:NetBSD:*:*)
+        echo powerpc-apple-netbsd${UNAME_RELEASE}
+        exit 0 ;;
     RISC*:Mach:*:*)
 	echo mips-dec-mach_bsd4.3
 	exit 0 ;;
@@ -144,7 +234,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     VAX*:ULTRIX*:*:*)
 	echo vax-dec-ultrix${UNAME_RELEASE}
 	exit 0 ;;
-    2020:CLIX:*:*)
+    2020:CLIX:*:* | 2430:CLIX:*:*)
 	echo clipper-intergraph-clix${UNAME_RELEASE}
 	exit 0 ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
@@ -217,6 +307,10 @@ EOF
     i?86:AIX:*:*)
 	echo i386-ibm-aix
 	exit 0 ;;
+    *:MVS:*:* | *:OS390:*:*|*:OS/390:*:*)
+			       # uname -m gives a processor model number  /* S/390 -- gil -- 1389 */
+	echo s390-ibm-os390    # on R1 and R2, uname -s reports OS390
+	exit 0 ;;              # on R3, uname -s reports OS/390
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
 		sed 's/^		//' << EOF >dummy.c
@@ -240,7 +334,8 @@ EOF
 	fi
 	exit 0 ;;
     *:AIX:*:4)
-	if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
 	else
 		IBM_ARCH=powerpc
@@ -273,12 +368,44 @@ EOF
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
 	echo m68k-hp-bsd4.4
 	exit 0 ;;
-    9000/[3478]??:HP-UX:*:*)
+    9000/[34678]??:HP-UX:*:*)
 	case "${UNAME_MACHINE}" in
 	    9000/31? )            HP_ARCH=m68000 ;;
 	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
-	    9000/8?? )            HP_ARCH=hppa1.0 ;;
+	    9000/6?? | 9000/7?? | 9000/80[024] | 9000/8?[13679] | 9000/892 )
+              sed 's/^              //' << EOF >dummy.c
+              #include 
+              #include 
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+	(${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy`
+	rm -f dummy.c dummy
 	esac
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -384,6 +511,9 @@ EOF
     hp3[0-9][05]:OpenBSD:*:*)
 	echo m68k-unknown-openbsd${UNAME_RELEASE}
 	exit 0 ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
     i?86:BSD/386:*:* | *:BSD/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
 	exit 0 ;;
@@ -397,52 +527,146 @@ EOF
 	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 	exit 0 ;;
     i*:CYGWIN*:*)
-	echo i386-pc-cygwin32
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit 0 ;;
+    i*:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
 	exit 0 ;;
     p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin32
+	echo powerpcle-unknown-cygwin
 	exit 0 ;;
     prep*:SunOS:5.*:*)
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit 0 ;;
     *:GNU:*:*)
-	echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
 	exit 0 ;;
     *:Linux:*:*)
+	# uname on the ARM produces all sorts of strangeness, and we need to
+	# filter it out.
+	case "$UNAME_MACHINE" in
+	  arm* | sa110*)	      UNAME_MACHINE="arm" ;;
+	esac
+
 	# The BFD linker knows what the default object file format is, so
 	# first see if it will tell us.
 	ld_help_string=`ld --help 2>&1`
-	if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then
-	  echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then
-	  echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then
-	  echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
-	  echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
-	  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0
-	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then
-	  echo "powerpc-unknown-linux-gnu" ; exit 0
-	elif test "${UNAME_MACHINE}" = "alpha" ; then
-	  echo alpha-unknown-linux-gnu ; exit 0
-	elif test "${UNAME_MACHINE}" = "sparc" ; then
-	  echo sparc-unknown-linux-gnu ; exit 0
+	ld_supported_emulations=`echo $ld_help_string \
+			 | sed -ne '/supported emulations:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported emulations: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_emulations" in
+	  i?86linux)  echo "${UNAME_MACHINE}-pc-linux-gnuaout"      ; exit 0 ;;
+	  i?86coff)   echo "${UNAME_MACHINE}-pc-linux-gnucoff"      ; exit 0 ;;
+	  sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+	  armlinux)   echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+	  m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+	  elf32ppc)   echo "powerpc-unknown-linux-gnu"              ; exit 0 ;;
+	esac
+
+	if test "${UNAME_MACHINE}" = "alpha" ; then
+		sed 's/^	//'  <dummy.s
+		.globl main
+		.ent main
+	main:
+		.frame \$30,0,\$26,0
+		.prologue 0
+		.long 0x47e03d80 # implver $0
+		lda \$2,259
+		.long 0x47e20c21 # amask $2,$1
+		srl \$1,8,\$2
+		sll \$2,2,\$2
+		sll \$0,3,\$0
+		addl \$1,\$0,\$0
+		addl \$2,\$0,\$0
+		ret \$31,(\$26),1
+		.end main
+EOF
+		LIBC=""
+		${CC-cc} dummy.s -o dummy 2>/dev/null
+		if test "$?" = 0 ; then
+			./dummy
+			case "$?" in
+			7)
+				UNAME_MACHINE="alpha"
+				;;
+			15)
+				UNAME_MACHINE="alphaev5"
+				;;
+			14)
+				UNAME_MACHINE="alphaev56"
+				;;
+			10)
+				UNAME_MACHINE="alphapca56"
+				;;
+			16)
+				UNAME_MACHINE="alphaev6"
+				;;
+			esac
+
+			objdump --private-headers dummy | \
+			  grep ld.so.1 > /dev/null
+			if test "$?" = 0 ; then
+				LIBC="libc1"
+			fi
+		fi
+		rm -f dummy.s dummy
+		echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
+	elif test "${UNAME_MACHINE}" = "mips" ; then
+	  cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
+	  rm -f dummy.c dummy
 	else
-	  # Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us
-	  # useful --help.  Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout.
-	  test ! -d /usr/lib/ldscripts/. \
-	    && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+	  # Either a pre-BFD a.out linker (linux-gnuoldld)
+	  # or one that does not give us useful --help.
+	  # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+	  # If ld does not provide *any* "supported emulations:"
+	  # that means it is gnuoldld.
+	  echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
+	  test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+
+	  case "${UNAME_MACHINE}" in
+	  i?86)
+	    VENDOR=pc;
+	    ;;
+	  *)
+	    VENDOR=unknown;
+	    ;;
+	  esac
 	  # Determine whether the default compiler is a.out or elf
 	  cat >dummy.c <
 main(argc, argv)
-int argc;
-char *argv[];
+     int argc;
+     char *argv[];
 {
 #ifdef __ELF__
-  printf ("%s-pc-linux-gnu\n", argv[1]);
+# ifdef __GLIBC__
+#  if (__GLIBC__ >= 2)
+    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+#  else
+    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+#  endif
+# else
+   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
 #else
-  printf ("%s-pc-linux-gnuaout\n", argv[1]);
+  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
 #endif
   return 0;
 }
@@ -455,9 +679,31 @@ EOF
     i?86:DYNIX/ptx:4*:*)
 	echo i386-sequent-sysv4
 	exit 0 ;;
+    i?86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit 0 ;;
+    # SysVr5/Unixware7
+    i?86:*:5*:* | i?86:SYSTEM_V:5*:*)
+	 if uname -a | grep SCO >/dev/null 2>/dev/null ; then
+	    (/bin/uname -s|egrep UnixWare >/dev/null) && UNAME_VER=uw${UNAME_VERSION}
+	    if /bin/uname -X 2>/dev/null >/dev/null ; then
+		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+	    fi
+		echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}${UNAME_VER}
+	else
+		echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
+	fi
+	exit 0 ;;
     i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
+		echo ${UNAME_MACHINE}-univel-sysv4.2uw${UNAME_VERSION}
 	else
 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
 	fi
@@ -476,6 +722,18 @@ EOF
 		echo ${UNAME_MACHINE}-pc-sysv32
 	fi
 	exit 0 ;;
+    i?86:UnixWare:*:*)
+	if /bin/uname -X 2>/dev/null >/dev/null ; then
+	  (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+	    && UNAME_MACHINE=i586
+	fi
+	echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION}
+	exit 0 ;;
+    pc:*:*:*)
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit 0 ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
 	exit 0 ;;
@@ -535,6 +793,10 @@ EOF
 		echo ns32k-sni-sysv
 	fi
 	exit 0 ;;
+    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                           # says 
+        echo i586-unisys-sysv4
+        exit 0 ;;
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes .
 	# How about differentiating between stratus architectures? -djm
@@ -547,17 +809,25 @@ EOF
     mc68*:A/UX:*:*)
 	echo m68k-apple-aux${UNAME_RELEASE}
 	exit 0 ;;
-    R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
+    news*:NEWS-OS:*:6*)
+	echo mips-sony-newsos6
+	exit 0 ;;
+    R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
 	        echo mips-nec-sysv${UNAME_RELEASE}
 	else
 	        echo mips-unknown-sysv${UNAME_RELEASE}
 	fi
         exit 0 ;;
-    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                           # says 
-        echo i586-unisys-sysv4
-        exit 0 ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit 0 ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit 0 ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit 0 ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
diff --git a/gnu/usr.bin/lynx/config.hin b/gnu/usr.bin/lynx/config.hin
index 11ac7008aea..3579304245e 100644
--- a/gnu/usr.bin/lynx/config.hin
+++ b/gnu/usr.bin/lynx/config.hin
@@ -3,39 +3,84 @@
 #define LYNX_CFG_H 1
 
 #undef ALT_CHAR_SET		/* CF_ALT_CHAR_SET */
+#undef ANSI_VARARGS		/* CF_VARARGS */
 #undef ARCHIVE_ONLY		/* CF_ARG_DISABLE(dired-archive) */
+#undef BZIP2_PATH		/* CF_PATH_PROG(bzip2) */
 #undef CHMOD_PATH		/* CF_PATH_PROG(chmod) */
 #undef COLOR_CURSES		/* defined by CF_COLOR_CURSES */
 #undef COMPRESS_PATH		/* CF_PATH_PROG(compress) */
 #undef COPY_PATH		/* CF_PATH_PROG(cp) */
 #undef CURS_PERFORMANCE		/* CF_CURS_PERFORMANCE */
 #undef DEBUG			/* configure --enable-debug */
+#undef DECL_ERRNO
 #undef DECL_GETGRGID
 #undef DECL_GETGRNAM
 #undef DECL_STRSTR
 #undef DECL_SYS_ERRLIST
 #undef DIRED_SUPPORT		/* AC_ARG_WITH(dired) */
+#undef DISABLE_FINGER		/* CF_ARG_DISABLE(finger) */
+#undef DISABLE_FTP		/* CF_ARG_DISABLE(ftp) */
+#undef DISABLE_GOPHER		/* CF_ARG_DISABLE(gopher) */
+#undef DISABLE_NEWS		/* CF_ARG_DISABLE(news) */
+#undef DISP_PARTIAL		/* CF_ARG_ENABLE(partial) */
 #undef DONT_TRACK_INTERNAL_LINKS /* CF_ARG_DISABLE(internal-links) */
-#undef EXP_8BIT_TOUPPER		/* AC_ARG_WITH(8bit-toupper) */
-#undef EXP_CHARTRANS_AUTOSWITCH	/* AC_ARG_WITH(font-switch) */
+#undef EBCDIC			/* CF_EBCDIC */
+#undef ENABLE_NLS		/* defined if NLS is requested */
+#undef EXEC_LINKS		/* CF_ARG_ENABLE(exec-links) */
+#undef EXEC_SCRIPTS		/* CF_ARG_ENABLE(exec-scripts) */
+#undef EXP_ADDRLIST_PAGE	/* CF_ARG_ENABLE(addrlist-page) */
+#undef EXP_ALT_BINDINGS		/* CF_ARG_ENABLE(alt-bindings) */
+#undef EXP_CHARTRANS_AUTOSWITCH	/* CF_ARG_ENABLE(font-switch) */
+#undef EXP_KEYBOARD_LAYOUT	/* CF_ARG_ENABLE(kbd-layout) */
+#undef EXP_LIBJS		/* CF_ARG_ENABLE(libjs) */
+#undef EXP_PERSISTENT_COOKIES	/* CF_ARG_ENABLE(persistent-cookies) */
 #undef FANCY_CURSES		/* defined by CF_FANCY_CURSES */
+#undef GCC_PRINTF		/* CF_GCC_ATTRIBUTES */
 #undef GCC_UNUSED		/* CF_GCC_ATTRIBUTES */
+#undef GETGROUPS_T		/* AC_TYPE_GETGROUPS */
 #undef GZIP_PATH		/* CF_PATH_PROG(gzip) */
+#undef HAVE_ALLOCA		/* defined by AM_GNU_GETTEXT */
+#undef HAVE_ALLOCA_H		/* defined by AM_GNU_GETTEXT */
+#undef HAVE_ARGZ_H		/* defined by AM_GNU_GETTEXT */
+#undef HAVE_CATGETS		/* defined if you want to use non-GNU catgets */
 #undef HAVE_CBREAK
+#undef HAVE_CURSESX_H
 #undef HAVE_CUSERID
+#undef HAVE_DCGETTEXT		/* defined by AM_GNU_GETTEXT */
+#undef HAVE_DEFINE_KEY
 #undef HAVE_DIRENT_H		/* defined by AC_HEADER_DIRENT */
 #undef HAVE_FCNTL_H		/* have  */
 #undef HAVE_GETBKGD		/* defined by CF_COLOR_CURSES */
 #undef HAVE_GETCWD
 #undef HAVE_GETGROUPS
+#undef HAVE_GETTEXT		/* defined if you want to use non-GNU gettext */
+#undef HAVE_GETTIMEOFDAY
+#undef HAVE_H_ERRNO
+#undef HAVE_INET_ATON		/* CF_INET_ADDR */
+#undef HAVE_JCURSES_H
 #undef HAVE_KEYPAD
+#undef HAVE_LC_MESSAGES		/* locale messages */
+#undef HAVE_LIBINTL_H		/* AM_GNU_GETTEXT, or cleanup from that */
 #undef HAVE_LIMITS_H
+#undef HAVE_LOCALE_H
 #undef HAVE_LSTAT		/* defined by CF_FUNC_LSTAT */
+#undef HAVE_MALLOC_H		/* defined by AM_GNU_GETTEXT */
+#undef HAVE_MMAP		/* defined by AM_GNU_GETTEXT */
+#undef HAVE_MUNMAP		/* defined by AM_GNU_GETTEXT */
 #undef HAVE_NCURSES_H		/* defined if we include  */
+#undef HAVE_NL_TYPES_H		/* defined by AM_GNU_GETTEXT */
+#undef HAVE_POPEN
 #undef HAVE_PUTENV
 #undef HAVE_READDIR
+#undef HAVE_RESOLV_H
+#undef HAVE_SETENV		/* defined by AM_GNU_GETTEXT */
+#undef HAVE_SETLOCALE
 #undef HAVE_SIZECHANGE		/* defined by CF_SIZECHANGE */
+#undef HAVE_STDARG_H		/* CF_VARARGS */
 #undef HAVE_STDLIB_H
+#undef HAVE_STPCPY		/* defined by AM_GNU_GETTEXT */
+#undef HAVE_STRCASECMP		/* defined by AM_GNU_GETTEXT */
+#undef HAVE_STRCHR		/* defined by AM_GNU_GETTEXT */
 #undef HAVE_STRERROR
 #undef HAVE_STRING_H
 #undef HAVE_SYS_DIR_H		/* defined by AC_HEADER_DIRENT */
@@ -43,15 +88,23 @@
 #undef HAVE_SYS_FILIO_H		/* have  */
 #undef HAVE_SYS_IOCTL_H		/* have  */
 #undef HAVE_SYS_NDIR_H		/* defined by AC_HEADER_DIRENT */
+#undef HAVE_SYS_PARAM_H		/* defined by AM_GNU_GETTEXT */
 #undef HAVE_SYS_WAIT_H		/* have  */
 #undef HAVE_TERMIOS_H		/* have  */
+#undef HAVE_TERMIO_H		/* have  */
 #undef HAVE_TTYTYPE
 #undef HAVE_TYPE_UNIONWAIT	/* CF_UNION_WAIT */
 #undef HAVE_UNISTD_H		/* have  */
+#undef HAVE_UNSETENV
 #undef HAVE_USE_DEFAULT_COLORS	/* ncurses extension */
 #undef HAVE_UTMP
+#undef HAVE_VALUES_H		/* defined by AM_GNU_GETTEXT */
+#undef HAVE_VARARGS_H		/* CF_VARARGS */
 #undef HAVE_WAITPID
 #undef HAVE_WBORDER
+#undef HAVE___ARGZ_COUNT	/* defined by AM_GNU_GETTEXT */
+#undef HAVE___ARGZ_NEXT		/* defined by AM_GNU_GETTEXT */
+#undef HAVE___ARGZ_STRINGIFY	/* defined by AM_GNU_GETTEXT */
 #undef IGNORE_CTRL_C		/* FIXME: make tests? */
 #undef INSTALL_ARGS		/* CF_PATH_PROG(install) */
 #undef INSTALL_PATH		/* CF_PATH_PROG(install) */
@@ -59,6 +112,7 @@
 #undef LINUX			/* FIXME: make tests? */
 #undef LOCALE			/* for locale support */
 #undef LONG_LIST		/* CF_ARG_DISABLE(long-list) */
+#undef LYNXCGI_LINKS		/* CF_ARG_ENABLE(cgi-links) */
 #undef LYNX_CFG_FILE		/* $libdir/lynx.cfg */
 #undef LYNX_LSS_FILE		/* $libdir/lynx.lss */
 #undef LY_FIND_LEAKS		/* configure --disable-leaks */
@@ -69,8 +123,13 @@
 #undef NEED_PTEM_H		/* defined by CF_SIZECHANGE */
 #undef NEED_REMOVE		/* defined by CF_REMOVE_BROKEN */
 #undef NGROUPS			/* defined by CF_NGROUPS */
+#undef NOT_ASCII		/* CF_NOT_ASCII */
 #undef NO_CHANGE_EXECUTE_PERMS	/* CF_ARG_DISABLE(dired-xpermit) */
+#undef NO_CONFIG_INFO		/* CF_ARG_DISABLE(config-info) */
 #undef NO_EXTENDED_HTMLDTD	/* CF_ARG_DISABLE(extended-dtd) */
+#undef NO_LYNX_TRACE		/* CF_ARG_DISABLE(trace) */
+#undef NO_OPTION_FORMS		/* CF_ARG_DISABLE(forms-options) */
+#undef NO_OPTION_MENU		/* CF_ARG_DISABLE(option-menu) */
 #undef NO_PARENT_DIR_REFERENCE	/* configure --disable-parent-dir */
 #undef NSL_FORK			/* CF_ARG_ENABLE(nsl-fork) */
 #undef OK_GZIP			/* CF_ARG_DISABLE(dired-gzip) */
@@ -79,12 +138,20 @@
 #undef OK_TAR			/* CF_ARG_DISABLE(dired-tar) */
 #undef OK_UUDECODE		/* CF_ARG_DISABLE(dired-uudecode) */
 #undef OK_ZIP			/* CF_ARG_DISABLE(dired-zip) */
+#undef RLOGIN_PATH		/* CF_PATH_PROG(rlogin) */
 #undef RM_PATH			/* CF_PATH_PROG(rm) */
+#undef SOCKS			/* CF_SOCKS, CF_SOCKS5 */
+#undef SOURCE_CACHE		/* CF_ARG_ENABLE(source-cache) */
 #undef STDC_HEADERS
+#undef SYSLOG_REQUESTED_URLS	/* CF_ARG_ENABLE(syslog) */
 #undef SYSTEM_MAIL		/* CF_DEFINE_PROG */
 #undef SYSTEM_MAIL_FLAGS	/* defined by CF_SYSTEM_MAIL_FLAGS */
+#undef SYSTEM_NAME		/* CF_CHECK_CACHE */
 #undef TAR_PATH			/* CF_PATH_PROG(tar) */
-#undef TERMIO_AND_TERMIOS	/* termio.h and termios.h combo bug */
+#undef TELNET_PATH		/* CF_PATH_PROG(telnet) */
+#undef TERMIO_AND_CURSES	/* CF_TERMIO_AND_CURSES workaround */
+#undef TERMIO_AND_TERMIOS	/* CF_TERMIO_AND_TERMIOS workaround */
+#undef TN3270_PATH		/* CF_PATH_PROG(tn3270) */
 #undef TOUCH_PATH		/* CF_PATH_PROG(touch) */
 #undef ULTRIX			/* config.sub */
 #undef UNCOMPRESS_PATH		/* CF_PATH_PROG(gunzip) */
@@ -93,11 +160,15 @@
 #undef UNZIP_PATH		/* CF_PATH_PROG(unzip) */
 #undef USE_COLOR_STYLE		/* CF_ARG_ENABLE(color-style) */
 #undef USE_DEFAULT_COLORS	/* CF_ARG_ENABLE(default-colors) */
+#undef USE_EXECVP		/* CF_ARG_DISABLE(full-paths) */
 #undef USE_EXTERNALS		/* CF_ARG_ENABLE(externs) */
 #undef USE_FCNTL		/* CF_FIONBIO */
 #undef USE_HASH			/* see USE_COLOR_STYLE */
+#undef USE_PSRC			/* CF_ARG_ENABLE(prettysrc) */
 #undef USE_SIZECHANGEHACK	/* FIXME: find a case where this works! */
 #undef USE_SLANG		/* AC_ARG_WITH(screen=slang) */
+#undef USE_SOCKS4_PREFIX	/* CF_SOCKS5 */
+#undef USE_SOCKS5		/* CF_SOCKS5 */
 #undef USE_ZLIB			/* AC_ARG_WITH(zlib) */
 #undef UTMPX_FOR_UTMP		/* use  since  not found */
 #undef UUDECODE_PATH		/* CF_PATH_PROG(uudecode) */
@@ -105,25 +176,44 @@
 #undef WAIT_USES_UNION		/* CF_FUNC_WAIT */
 #undef ZCAT_PATH		/* CF_PATH_PROG(zcat) */
 #undef ZIP_PATH			/* CF_PATH_PROG(zip) */
-#undef const			/* defined by AC_C_CONST */
+#undef _ALL_SOURCE		/* AC_AIX */
+#undef inline			/* defined by AC_C_INLINE */
 #undef mode_t			/* defined by AC_TYPE_MODE_T */
+#undef off_t			/* defined by AC_TYPE_OFF_T */
+#undef pid_t			/* defined by AC_TYPE_PID_T */
+#undef uid_t			/* defined by AC_TYPE_UID_T */
 #undef vfork			/* defined by AC_FUNC_FORK */
+
+/* 'const' may be defined externally by the compiler-wrapper, as in 'unproto'
+ * or by AC_C_CONST
+ */
+#ifndef const
+#undef const
+#endif
+
 /* FIXME:ALLOW_USERS_TO_CHANGE_EXEC_WITHIN_OPTIONS */
-/* FIXME:BSDI */
 /* FIXME:DECLARE_WAIS_LOGFILES */
 /* FIXME:DGUX */
 /* FIXME:DGUX_OLD */
-/* FIXME:EXEC_LINKS */
-/* FIXME:EXEC_SCRIPTS */
 /* FIXME:HP_TERMINAL */
 /* FIXME:NOPORT */
 /* FIXME:POSIX_JC */
 /* FIXME:REVERSE_CLEAR_SCREEN_PROBLEM */
 /* FIXME:SHORTENED_RBIND */
 /* FIXME:SNAKE */
-/* FIXME:SOCKS */
 /* FIXME:SVR4_BSDSELECT */
-/* FIXME:SYSLOG_REQUESTED_URLS */
+
+/* Some older socks libraries, especially AIX need special definitions */
+#if defined(_AIX) && !defined(USE_SOCKS5)
+#undef accept
+#undef bind
+#undef connect
+#undef getpeername
+#undef getsockname
+#undef listen
+#undef recvfrom
+#undef select
+#endif
 
 #ifndef HAVE_LSTAT
 #define lstat stat
diff --git a/gnu/usr.bin/lynx/config.sub b/gnu/usr.bin/lynx/config.sub
index 0432524944d..9c47333ac99 100644
--- a/gnu/usr.bin/lynx/config.sub
+++ b/gnu/usr.bin/lynx/config.sub
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Configuration validation subroutine script, version 1.1.
-#   Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+#   Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
 # can handle that machine.  It does not imply ALL GNU software can.
@@ -149,19 +149,21 @@ esac
 case $basic_machine in
 	# Recognize the basic CPU types without company name.
 	# Some are omitted here because they have special meanings below.
-	tahoe | i860 | m68k | m68000 | m88k | ns32k | arm \
-		| arme[lb] | pyramid \
-		| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
-		| alpha | we32k | ns16k | clipper | i370 | sh \
-		| powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \
-		| pdp11 | mips64el | mips64orion | mips64orionel \
-		| sparc | sparclet | sparclite | sparc64)
+	tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
+		| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
+		| 580 | i960 | h8300 \
+		| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w \
+		| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
+		| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
+		| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
+		| mipstx39 | mipstx39el \
+		| sparc | sparclet | sparclite | sparc64 | v850)
 		basic_machine=$basic_machine-unknown
 		;;
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
 	# (2) the word "unknown" tends to confuse beginning users.
-	i[3456]86)
+	i[34567]86)
 	  basic_machine=$basic_machine-pc
 	  ;;
 	# Object if more than one company name word.
@@ -170,14 +172,19 @@ case $basic_machine in
 		exit 1
 		;;
 	# Recognize the basic CPU types with company name.
-	vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
-	      | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
-	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
-	      | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
-	      | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
-	      | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
-	      | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
-	      | mips64el-* | mips64orion-* | mips64orionel-* | f301-*)
+	vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
+	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
+	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+	      | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
+	      | xmp-* | ymp-* \
+	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
+	      | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
+	      | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
+	      | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+	      | sparc64-* | mips64-* | mipsel-* \
+	      | mips64el-* | mips64orion-* | mips64orionel-*  \
+	      | mipstx39-* | mipstx39el-* \
+	      | f301-*)
 		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
@@ -204,9 +211,9 @@ case $basic_machine in
 	amiga | amiga-*)
 		basic_machine=m68k-cbm
 		;;
-	amigados)
+	amigaos | amigados)
 		basic_machine=m68k-cbm
-		os=-amigados
+		os=-amigaos
 		;;
 	amigaunix | amix)
 		basic_machine=m68k-cbm
@@ -344,20 +351,27 @@ case $basic_machine in
 		basic_machine=i370-ibm
 		os=-mvs
 		;;
+	s390 | s390-ibm*)
+# OS/390 support after:
+#  Linkname: Mortice Kern Systems (MKS) Inc. - OS/390 OpenEdition -- GNU Utilities Downloads
+#       URL: http://www.mks.com/s390/gnu/download.htm#autoconf
+		basic_machine=s390-ibm  #  /* S/390 -- gil -- 1419 */
+		os=-os390
+		;;
 # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	i[3456]86v32)
+	i[34567]86v32)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-sysv32
 		;;
-	i[3456]86v4*)
+	i[34567]86v4*)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-sysv4
 		;;
-	i[3456]86v)
+	i[34567]86v)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-sysv
 		;;
-	i[3456]86sol2)
+	i[34567]86sol2)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-solaris2
 		;;
@@ -389,6 +403,14 @@ case $basic_machine in
 	miniframe)
 		basic_machine=m68000-convergent
 		;;
+	mipsel*-linux*)
+		basic_machine=mipsel-unknown
+		os=-linux-gnu
+		;;
+	mips*-linux*)
+		basic_machine=mips-unknown
+		os=-linux-gnu
+		;;
 	mips3*-*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
 		;;
@@ -456,25 +478,23 @@ case $basic_machine in
         pc532 | pc532-*)
 		basic_machine=ns32k-pc532
 		;;
-	pentium | p5)
-		basic_machine=i586-intel
+	pentium | p5 | k5 | nexen)
+		basic_machine=i586-pc
 		;;
-	pentiumpro | p6)
-		basic_machine=i686-intel
+	pentiumpro | p6 | k6 | 6x86)
+		basic_machine=i686-pc
 		;;
-	pentium-* | p5-*)
+	pentiumii | pentium2)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | nexen-*)
 		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	pentiumpro-* | p6-*)
+	pentiumpro-* | p6-* | k6-* | 6x86-*)
 		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	k5)
-		# We don't have specific support for AMD's K5 yet, so just call it a Pentium
-		basic_machine=i586-amd
-		;;
-	nexen)
-		# We don't have specific support for Nexgen yet, so just call it a Pentium
-		basic_machine=i586-nexgen
+	pentiumii-* | pentium2-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	pn)
 		basic_machine=pn-gould
@@ -558,6 +578,12 @@ case $basic_machine in
 		basic_machine=i386-sequent
 		os=-dynix
 		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
 	tower | tower-32)
 		basic_machine=m68k-ncr
 		;;
@@ -577,7 +603,7 @@ case $basic_machine in
 		basic_machine=vax-dec
 		os=-vms
 		;;
-       vpp*|vx|vx-*)
+	vpp*|vx|vx-*)
                basic_machine=f301-fujitsu
                ;;
 	vxworks960)
@@ -607,7 +633,11 @@ case $basic_machine in
 # Here we handle the default manufacturer of certain CPU types.  It is in
 # some cases the only manufacturer, in others, it is the most popular.
 	mips)
-		basic_machine=mips-mips
+		if [ x$os = x-linux-gnu ]; then
+			basic_machine=mips-unknown
+		else
+			basic_machine=mips-mips
+		fi
 		;;
 	romp)
 		basic_machine=romp-ibm
@@ -668,9 +698,12 @@ case $os in
 	-solaris)
 		os=-solaris2
 		;;
-	-unixware* | svr4*)
+	-svr4*)
 		os=-sysv4
 		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
 	-gnu/linux*)
 		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
 		;;
@@ -681,15 +714,16 @@ case $os in
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-	      | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
-	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* | -os390* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
 	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -linux-gnu* | -uxpv*)
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -uxpv* | -beos*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-linux*)
@@ -802,6 +836,12 @@ case $basic_machine in
 	sparc-* | *-sun)
 		os=-sunos4.1.1
 		;;
+	*-be)
+		os=-beos
+		;;
+	s390-ibm)
+		os=-os390  #  /* S/390 -- gil -- 1451 */
+		;;
 	*-ibm)
 		os=-aix
 		;;
@@ -815,7 +855,7 @@ case $basic_machine in
 		os=-sysv
 		;;
 	*-cbm)
-		os=-amigados
+		os=-amigaos
 		;;
 	*-dg)
 		os=-dgux
diff --git a/gnu/usr.bin/lynx/configure b/gnu/usr.bin/lynx/configure
index 4c122ddeafe..83615acc07e 100644
--- a/gnu/usr.bin/lynx/configure
+++ b/gnu/usr.bin/lynx/configure
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 # Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12.971230 
+# Generated automatically using autoconf version 2.13.19990117 
 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
 #
 # This configure script is free software; the Free Software Foundation
@@ -50,6 +50,7 @@ mandir='${prefix}/man'
 # Initialize some other variables.
 subdirs=
 MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
 # Maximum number of lines to put in a shell here document.
 ac_max_here_lines=12
 
@@ -184,42 +185,73 @@ EOF
 cat </dev/null; then
   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
@@ -558,7 +592,6 @@ fi
 
 
 
-
 ac_aux_dir=
 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
   if test -f $ac_dir/install-sh; then
@@ -579,46 +612,79 @@ ac_config_sub=$ac_aux_dir/config.sub
 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 
 
+if test -f $srcdir/config.guess ; then
+	
 # Make sure we can run config.sub.
-if sh $ac_config_sub sun4 >/dev/null 2>&1; then :
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
 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:589: checking host system type" >&5
+echo "configure:624: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
 NONE)
   case $nonopt in
   NONE)
-    if host_alias=`sh $ac_config_guess`; then :
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
     fi ;;
   *) host_alias=$nonopt ;;
   esac ;;
 esac
 
-host=`sh $ac_config_sub $host_alias`
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$host" 1>&6
 
+	system_name="$host_os"
+else
+	system_name="`(uname -s -r) 2>/dev/null`"
+	if test -z "$system_name" ; then
+		system_name="`(hostname) 2>/dev/null`"
+	fi
+fi
+test -n "$system_name" && cat >> confdefs.h <&6
+else
+  cf_cv_system_name="$system_name"
+fi
+
+
+test -z "$system_name" && system_name="$cf_cv_system_name"
+test -n "$cf_cv_system_name" && echo "$ac_t"""Configuring for $cf_cv_system_name"" 1>&6
+
+if test ".$system_name" != ".$cf_cv_system_name" ; then
+	echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
+	{ echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
+fi
+
+
+test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
+
+
 
 
 # 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:614: checking for $ac_word" >&5
+echo "configure:679: 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
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_CC="gcc"
@@ -639,16 +705,17 @@ 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:643: checking for $ac_word" >&5
+echo "configure:709: 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
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_prog_rejected=no
-  for ac_dir in $PATH; do
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
@@ -683,25 +750,61 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+  if test -z "$CC"; then
+    case "`uname -s`" in
+    *win32* | *WIN32*)
+      # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:760: 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
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="cl"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+ ;;
+    esac
+  fi
   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:691: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:792: 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.
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
-cat > conftest.$ac_ext < conftest.$ac_ext << EOF
+
+#line 803 "configure"
 #include "confdefs.h"
+
 main(){return(0);}
 EOF
-if { (eval echo configure:705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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
@@ -715,18 +818,24 @@ else
   ac_cv_prog_cc_works=no
 fi
 rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
 
 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
 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:725: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:834: 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:730: checking whether we are using GNU C" >&5
+echo "configure:839: 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
@@ -735,7 +844,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:739: \"$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:848: \"$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
@@ -746,11 +855,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
 
 if test $ac_cv_prog_gcc = yes; then
   GCC=yes
-  ac_test_CFLAGS="${CFLAGS+set}"
-  ac_save_CFLAGS="$CFLAGS"
-  CFLAGS=
-  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:754: checking whether ${CC-cc} accepts -g" >&5
+else
+  GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:867: 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
@@ -765,20 +878,24 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-  if test "$ac_test_CFLAGS" = set; then
-    CFLAGS="$ac_save_CFLAGS"
-  elif test $ac_cv_prog_cc_g = yes; then
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
     CFLAGS="-g -O2"
   else
-    CFLAGS="-O2"
+    CFLAGS="-g"
   fi
 else
-  GCC=
-  test "${CFLAGS+set}" = set || CFLAGS="-g"
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:782: checking how to run the C preprocessor" >&5
+echo "configure:899: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -793,14 +910,14 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
 else
@@ -810,14 +927,31 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
 else
@@ -829,6 +963,8 @@ else
 fi
 rm -f conftest*
 fi
+rm -f conftest*
+fi
 rm -f conftest*
   ac_cv_prog_CPP="$CPP"
 fi
@@ -841,15 +977,16 @@ 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:845: checking for $ac_word" >&5
+echo "configure:981: 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
   if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_RANLIB="ranlib"
@@ -868,7 +1005,7 @@ else
 fi
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:872: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1009: 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
@@ -894,58 +1031,6 @@ else
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
-
-echo $ac_n "checking for style of include in makefiles""... $ac_c" 1>&6
-echo "configure:900: checking for style of include in makefiles" >&5
-
-make_include_left=""
-make_include_right=""
-make_include_quote="unknown"
-
-cf_inc=head$$
-cf_dir=subd$$
-echo 'RESULT=OK' >$cf_inc
-mkdir $cf_dir
-
-for cf_include in "include" ".include" "!include"
-do
-	for cf_quote in '' '"'
-	do
-		cat >$cf_dir/makefile <&5 | grep cf_make_include=OK`
-	if test -n "$cf_make_include"; then
-		make_include_left="$cf_include"
-		make_include_quote="$cf_quote"
-		break
-	else
-		echo Tried 1>&5
-		cat $cf_dir/makefile 1>&5
-	fi
-	done
-	test -n "$cf_make_include" && break
-done
-
-rm -rf $cf_inc $cf_dir
-
-if test -z "$make_include_left" ; then
-	{ echo "configure: error: Your $ac_make program does not support includes" 1>&2; exit 1; }
-fi
-if test ".$make_include_quote" != .unknown ; then
-	make_include_left="$make_include_left $make_include_quote"
-	make_include_right="$make_include_quote"
-fi
-
-echo "$ac_t""${make_include_left}file${make_include_right}" 1>&6
-
-
-
-
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
 # incompatible versions:
@@ -953,28 +1038,30 @@ echo "$ac_t""${make_include_left}file${make_include_right}" 1>&6
 # SunOS /usr/etc/install
 # IRIX /sbin/install
 # AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
 # 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:961: checking for a BSD compatible install" >&5
+echo "configure:1047: 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
 else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
   for ac_dir in $PATH; do
     # Account for people who put trailing slashes in PATH elements.
     case "$ac_dir/" in
     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
     *)
       # OSF1 and SCO ODT 3.0 have their own names for install.
-      for ac_prog in ginstall installbsd scoinst install; do
+      # Don't use installbsd from OSF since it installs stuff as root
+      # by default.
+      for ac_prog in ginstall scoinst install; do
         if test -f $ac_dir/$ac_prog; then
 	  if test $ac_prog = install &&
             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
 	    # AIX install.  It has an incompatible calling convention.
-	    # OSF/1 installbsd also uses dspmsg, but is usable.
 	    :
 	  else
 	    ac_cv_path_install="$ac_dir/$ac_prog -c"
@@ -1004,6 +1091,8 @@ echo "$ac_t""$INSTALL" 1>&6
 # It thinks the first close brace ends the variable substitution.
 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 for ac_prog in lint alint lclint tdlint
@@ -1011,15 +1100,16 @@ 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:1015: checking for $ac_word" >&5
+echo "configure:1104: 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
   if test -n "$LINT"; then
   ac_cv_prog_LINT="$LINT" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_LINT="$ac_prog"
@@ -1040,12 +1130,58 @@ test -n "$LINT" && break
 done
 
 
+echo $ac_n "checking for AIX""... $ac_c" 1>&6
+echo "configure:1135: checking for AIX" >&5
+cat > conftest.$ac_ext <&5 |
+  egrep "yes" >/dev/null 2>&1; then
+  rm -rf conftest*
+  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
+#define _ALL_SOURCE 1
+EOF
+
+else
+  rm -rf conftest*
+  echo "$ac_t""no" 1>&6
+fi
+rm -f conftest*
+
+
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+echo "configure:1159: checking for POSIXized ISC" >&5
+if test -d /etc/conf/kconfig.d &&
+  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+then
+  echo "$ac_t""yes" 1>&6
+  ISC=yes # If later tests want to check for ISC.
+  cat >> confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+  if test "$GCC" = yes; then
+    CC="$CC -posix"
+  else
+    CC="$CC -Xp"
+  fi
+else
+  echo "$ac_t""no" 1>&6
+  ISC=
+fi
+
+
 
 
 
 
 echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
-echo "configure:1049: checking if you want to see long compiling messages" >&5
+echo "configure:1185: 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
@@ -1084,8 +1220,16 @@ echo "$ac_t""$enableval" 1>&6
 
 
 
+# special case for WWW/*
+if test -n "$ECHO_CC" ; then
+	DONT_ECHO_CC="$SHOW_CC ;"
+else
+	DONT_ECHO_CC=''
+fi
+
+
 echo $ac_n "checking if you want to check memory-leaks""... $ac_c" 1>&6
-echo "configure:1089: checking if you want to check memory-leaks" >&5
+echo "configure:1233: 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
@@ -1109,7 +1253,7 @@ EOF
 
 
 echo $ac_n "checking if you want to enable debug-code""... $ac_c" 1>&6
-echo "configure:1113: checking if you want to enable debug-code" >&5
+echo "configure:1257: 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
@@ -1140,21 +1284,44 @@ CFLAGS=`echo ${CFLAGS} | sed -e 's/-O[1-9]\? //' -e 's/-O[1-9]\?$//'`
 	esac
 else
 	case $host_os in
-	ultrix*|osf*) #(vi
+	osf*) #(vi
+		test -z "$GCC" && CFLAGS="$CFLAGS -std1"
 		CFLAGS=`echo ${CFLAGS} | sed -e 's/-g //' -e 's/-g$//'`
 		;;
 	*)
-			CFLAGS=`echo ${CFLAGS} | sed -e 's/-g //' -e 's/-g$//'`
+		CFLAGS=`echo ${CFLAGS} | sed -e 's/-g //' -e 's/-g$//'`
 		;;
 	esac
 fi
 
+echo $ac_n "checking if you want to enable lynx trace code *recommended* ""... $ac_c" 1>&6
+echo "configure:1299: checking if you want to enable lynx trace code *recommended* " >&5
+
+# Check whether --enable-trace or --disable-trace was given.
+if test "${enable_trace+set}" = set; then
+  enableval="$enable_trace"
+  test "$enableval" != no && enableval=yes
+  if test "$enableval" != "yes" ; then
+    with_trace=$enableval 
+  else
+    with_trace=yes
+  fi
+else
+  enableval=yes 
+  with_trace=yes
+  
+fi
+
+echo "$ac_t""$with_trace" 1>&6
+test $with_trace = no && cat >> confdefs.h <<\EOF
+#define NO_LYNX_TRACE 1
+EOF
 
 
 if test -n "$GCC"
 then
 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
-echo "configure:1158: checking if you want to turn on gcc warnings" >&5
+echo "configure:1325: 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
@@ -1194,9 +1361,9 @@ EOF
 if test -n "$GCC"
 then
 	echo "checking for gcc __attribute__ directives" 1>&6
-echo "configure:1198: checking for gcc __attribute__ directives" >&5
+echo "configure:1365: checking for gcc __attribute__ directives" >&5
 	cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+		if { (eval echo configure:1405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 			test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
 			cat conftest.h >>confdefs.h
 #		else
@@ -1251,11 +1418,11 @@ fi
 if test -n "$GCC"
 then
 		cat > conftest.$ac_ext <&6
-echo "configure:1259: checking for gcc warning options" >&5
+echo "configure:1426: checking for gcc warning options" >&5
 	cf_save_CFLAGS="$CFLAGS"
 	EXTRA_CFLAGS="-W -Wall"
 	cf_warn_CONST=""
@@ -1273,7 +1440,7 @@ echo "configure:1259: checking for gcc warning options" >&5
 		Wstrict-prototypes $cf_warn_CONST
 	do
 		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
-		if { (eval echo configure:1277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+		if { (eval echo configure:1444: \"$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"
@@ -1290,84 +1457,2129 @@ fi
 
 
 
-echo $ac_n "checking if you want full utility pathnames""... $ac_c" 1>&6
-echo "configure:1295: 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"
-  test "$enableval" != no && enableval=yes
-  if test "$enableval" != "yes" ; then
-    with_full_paths=no 
-  else
-    with_full_paths=yes
-  fi
-else
-  enableval=yes 
-  with_full_paths=yes
-  
-fi
-
-echo "$ac_t""$with_full_paths" 1>&6
-
-
-echo $ac_n "checking for system mailer""... $ac_c" 1>&6
-echo "configure:1316: checking for system mailer" >&5
-if eval "test \"`echo '$''{'cf_cv_SYSTEM_MAIL'+set}'`\" = set"; then
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:1462: 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
-  
-	cf_cv_SYSTEM_MAIL=unknown
-	for cv_path in /usr/mmdf/bin/submit \
-	/usr/sbin/sendmail \
-	/usr/lib/sendmail  \
-	
-	do
-		if test -f $cv_path ; then
-			cf_cv_SYSTEM_MAIL=$cv_path
-			break
-		fi
-	done
-	
-fi
-
-echo "$ac_t""$cf_cv_SYSTEM_MAIL" 1>&6
-cat >> confdefs.h < conftest.$ac_ext <
+#include 
+#include 
+#include 
 EOF
-
-
-
-echo $ac_n "checking system mail flags""... $ac_c" 1>&6
-echo "configure:1343: 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
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  ac_cv_header_stdc=yes
 else
-  
-	case $cf_cv_SYSTEM_MAIL in
-	*/mmdf/*)
-		cf_cv_system_mail_flags="-mlruxto,cc\\\\*"
-        	;; 
-	*)
-        	cf_cv_system_mail_flags="-t -oi"
-	esac
-	
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_stdc=no
 fi
+rm -f conftest*
 
-echo "$ac_t""$cf_cv_system_mail_flags" 1>&6
-cat >> confdefs.h < conftest.$ac_ext <
 EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "memchr" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
 
+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
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "free" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
 
+fi
 
-test -z "$CHMOD" && CHMOD=chmod
-if test "$with_full_paths" = yes ; then
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+  :
+else
+  cat > conftest.$ac_ext <
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:1542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+  cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:1566: 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 <j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+  const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:1620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_const=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+  cat >> confdefs.h <<\EOF
+#define const 
+EOF
+
+fi
+
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:1641: checking for inline" >&5
+if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_inline=$ac_kw; break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+fi
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+  inline | yes) ;;
+  no) cat >> confdefs.h <<\EOF
+#define inline 
+EOF
+ ;;
+  *)  cat >> confdefs.h <&6
+echo "configure:1681: checking for off_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+#if STDC_HEADERS
+#include 
+#include 
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_off_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+  cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:1714: checking for size_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+#if STDC_HEADERS
+#include 
+#include 
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_size_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+  cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+
+fi
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments.  Useless!
+echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
+echo "configure:1749: checking for working alloca.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+int main() {
+char *p = alloca(2 * sizeof(int));
+; return 0; }
+EOF
+if { (eval echo configure:1761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_header_alloca_h=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_alloca_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
+if test $ac_cv_header_alloca_h = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA_H 1
+EOF
+
+fi
+
+echo $ac_n "checking for alloca""... $ac_c" 1>&6
+echo "configure:1782: checking for alloca" >&5
+if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+#  define alloca _alloca
+# else
+#  if HAVE_ALLOCA_H
+#   include 
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+int main() {
+char *p = (char *) alloca(1);
+; return 0; }
+EOF
+if { (eval echo configure:1815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_func_alloca_works=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_func_alloca_works=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA 1
+EOF
+
+fi
+
+if test $ac_cv_func_alloca_works = no; then
+  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+  # that cause trouble.  Some versions do not even contain alloca or
+  # contain a buggy version.  If you still want to use their alloca,
+  # use ar to extract alloca.o from them instead of compiling alloca.c.
+  ALLOCA=alloca.${ac_objext}
+  cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+
+
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:1847: checking whether alloca needs Cray hooks" >&5
+if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <&5 |
+  egrep "webecray" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_os_cray=yes
+else
+  rm -rf conftest*
+  ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_os_cray" 1>&6
+if test $ac_cv_os_cray = yes; then
+for ac_func in _getb67 GETB67 getb67; do
+  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1877: 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 <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <&6
+fi
+
+done
+fi
+
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:1932: checking stack direction for C alloca" >&5
+if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_c_stack_direction=0
+else
+  cat > conftest.$ac_ext < addr) ? 1 : -1;
+}
+main ()
+{
+  exit (find_stack_direction() < 0);
+}
+EOF
+if { (eval echo configure:1959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_c_stack_direction=1
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_c_stack_direction=-1
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+cat >> confdefs.h <&6
+echo "configure:1984: 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
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2023: 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 <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:2076: checking for working mmap" >&5
+if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_mmap_fixed_mapped=no
+else
+  cat > conftest.$ac_ext <
+#include 
+#include 
+
+/* This mess was copied from the GNU getpagesize.h.  */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+#  include 
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h.  */
+# ifndef HAVE_SYS_PARAM_H
+#  define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+#  define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+#  ifdef HAVE_SYS_PARAM_H
+#   include 
+#   ifdef EXEC_PAGESIZE
+#    define getpagesize() EXEC_PAGESIZE
+#   else /* no EXEC_PAGESIZE */
+#    ifdef NBPG
+#     define getpagesize() NBPG * CLSIZE
+#     ifndef CLSIZE
+#      define CLSIZE 1
+#     endif /* no CLSIZE */
+#    else /* no NBPG */
+#     ifdef NBPC
+#      define getpagesize() NBPC
+#     else /* no NBPC */
+#      ifdef PAGESIZE
+#       define getpagesize() PAGESIZE
+#      endif /* PAGESIZE */
+#     endif /* no NBPC */
+#    endif /* no NBPG */
+#   endif /* no EXEC_PAGESIZE */
+#  else /* no HAVE_SYS_PARAM_H */
+#   define getpagesize() 8192	/* punt totally */
+#  endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+	char *data, *data2, *data3;
+	int i, pagesize;
+	int fd;
+
+	pagesize = getpagesize();
+
+	/*
+	 * First, make a file with some known garbage in it.
+	 */
+	data = malloc(pagesize);
+	if (!data)
+		exit(1);
+	for (i = 0; i < pagesize; ++i)
+		*(data + i) = rand();
+	umask(0);
+	fd = creat("conftestmmap", 0600);
+	if (fd < 0)
+		exit(1);
+	if (write(fd, data, pagesize) != pagesize)
+		exit(1);
+	close(fd);
+
+	/*
+	 * Next, try to mmap the file at a fixed address which
+	 * already has something else allocated at it.  If we can,
+	 * also make sure that we see the same garbage.
+	 */
+	fd = open("conftestmmap", O_RDWR);
+	if (fd < 0)
+		exit(1);
+	data2 = malloc(2 * pagesize);
+	if (!data2)
+		exit(1);
+	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
+		exit(1);
+	for (i = 0; i < pagesize; ++i)
+		if (*(data + i) != *(data2 + i))
+			exit(1);
+
+	/*
+	 * Finally, make sure that changes to the mapped area
+	 * do not percolate back to the file as seen by read().
+	 * (This is a bug on some variants of i386 svr4.0.)
+	 */
+	for (i = 0; i < pagesize; ++i)
+		*(data2 + i) = *(data2 + i) + 1;
+	data3 = malloc(pagesize);
+	if (!data3)
+		exit(1);
+	if (read(fd, data3, pagesize) != pagesize)
+		exit(1);
+	for (i = 0; i < pagesize; ++i)
+		if (*(data + i) != *(data3 + i))
+			exit(1);
+	close(fd);
+	unlink("conftestmmap");
+	exit(0);
+}
+
+EOF
+if { (eval echo configure:2224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_func_mmap_fixed_mapped=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+                              
+   for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
+unistd.h values.h sys/param.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2252: 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
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+fi
+done
+
+   for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
+__argz_count __argz_stringify __argz_next
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2292: 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 <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+
+
+   if test "${ac_cv_func_stpcpy+set}" != "set"; then
+     for ac_func in stpcpy
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2349: 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 <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+
+   fi
+   if test "${ac_cv_func_stpcpy}" = "yes"; then
+     cat >> confdefs.h <<\EOF
+#define HAVE_STPCPY 1
+EOF
+
+   fi
+
+   if test $ac_cv_header_locale_h = yes; then
+    echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
+echo "configure:2411: checking for LC_MESSAGES" >&5
+if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+int main() {
+return LC_MESSAGES
+; return 0; }
+EOF
+if { (eval echo configure:2423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  am_cv_val_LC_MESSAGES=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  am_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
+    if test $am_cv_val_LC_MESSAGES = yes; then
+      cat >> confdefs.h <<\EOF
+#define HAVE_LC_MESSAGES 1
+EOF
+
+    fi
+  fi
+   echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
+echo "configure:2444: checking whether NLS is requested" >&5
+        
+# Check whether --enable-nls or --disable-nls was given.
+if test "${enable_nls+set}" = set; then
+  enableval="$enable_nls"
+  USE_NLS=$enableval
+else
+  USE_NLS=no
+fi
+
+    echo "$ac_t""$USE_NLS" 1>&6
+    
+
+    USE_INCLUDED_LIBINTL=no
+
+        if test "$USE_NLS" = "yes"; then
+      cat >> confdefs.h <<\EOF
+#define ENABLE_NLS 1
+EOF
+
+      echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
+echo "configure:2465: checking whether included gettext is requested" >&5
+      
+# Check whether --with-included-gettext or --without-included-gettext was given.
+if test "${with_included_gettext+set}" = set; then
+  withval="$with_included_gettext"
+  nls_cv_force_use_gnu_gettext=$withval
+else
+  nls_cv_force_use_gnu_gettext=yes
+fi
+
+      echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
+
+      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+                        		nls_cv_header_intl=
+	nls_cv_header_libgt=
+	CATOBJEXT=NONE
+
+	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
+echo "configure:2485: checking for libintl.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
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
+echo "configure:2512: checking for gettext in libc" >&5
+if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+int main() {
+return (int) gettext ("")
+; return 0; }
+EOF
+if { (eval echo configure:2524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  gt_cv_func_gettext_libc=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  gt_cv_func_gettext_libc=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
+
+	   if test "$gt_cv_func_gettext_libc" != "yes"; then
+	     echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
+echo "configure:2540: checking for bindtextdomain in -lintl" >&5
+ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lintl  $LIBS"
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
+echo "configure:2575: checking for gettext in libintl" >&5
+if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  gt_cv_func_gettext_libintl=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  gt_cv_func_gettext_libintl=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+	   fi
+
+	   if test "$gt_cv_func_gettext_libc" = "yes" \
+	      || test "$gt_cv_func_gettext_libintl" = "yes"; then
+	      cat >> confdefs.h <<\EOF
+#define HAVE_GETTEXT 1
+EOF
+
+	      # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2615: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$MSGFMT" in
+  /*)
+  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+  ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+  echo "$ac_t""$MSGFMT" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+	      if test "$MSGFMT" != "no"; then
+		for ac_func in dcgettext
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2649: 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 <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+
+		# Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2704: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$GMSGFMT" in
+  /*)
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+  ;;
+  ?:/*)			 
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+  ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+  echo "$ac_t""$GMSGFMT" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+		# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2740: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$XGETTEXT" in
+  /*)
+  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+  ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+  echo "$ac_t""$XGETTEXT" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+		cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  CATOBJEXT=.gmo
+		   DATADIRNAME=share
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CATOBJEXT=.mo
+		   DATADIRNAME=lib
+fi
+rm -f conftest*
+		INSTOBJEXT=.mo
+	      fi
+	    fi
+	
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+        if test "$CATOBJEXT" = "NONE"; then
+	  echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
+echo "configure:2803: checking whether catgets can be used" >&5
+	  
+# Check whether --with-catgets or --without-catgets was given.
+if test "${with_catgets+set}" = set; then
+  withval="$with_catgets"
+  nls_cv_use_catgets=$withval
+else
+  nls_cv_use_catgets=no
+fi
+
+	  echo "$ac_t""$nls_cv_use_catgets" 1>&6
+
+	  if test "$nls_cv_use_catgets" = "yes"; then
+	    	    echo $ac_n "checking for main in -li""... $ac_c" 1>&6
+echo "configure:2817: checking for main in -li" >&5
+ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-li  $LIBS"
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <&6
+fi
+
+	    echo $ac_n "checking for catgets""... $ac_c" 1>&6
+echo "configure:2860: checking for catgets" >&5
+if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char catgets();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_catgets) || defined (__stub___catgets)
+choke me
+#else
+catgets();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_catgets=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_catgets=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<\EOF
+#define HAVE_CATGETS 1
+EOF
+
+	       INTLOBJS="\$(CATOBJS)"
+	       # Extract the first word of "gencat", so it can be a program name with args.
+set dummy gencat; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2910: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$GENCAT" in
+  /*)
+  ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
+  ;;
+  ?:/*)			 
+  ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_GENCAT="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
+  ;;
+esac
+fi
+GENCAT="$ac_cv_path_GENCAT"
+if test -n "$GENCAT"; then
+  echo "$ac_t""$GENCAT" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+	       if test "$GENCAT" != "no"; then
+		 # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2946: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$GMSGFMT" in
+  /*)
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+  ;;
+  ?:/*)			 
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
+  ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+  echo "$ac_t""$GMSGFMT" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+		 if test "$GMSGFMT" = "no"; then
+		   # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2983: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$GMSGFMT" in
+  /*)
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+	ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
+  ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+  echo "$ac_t""$GMSGFMT" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+		 fi
+		 # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3018: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$XGETTEXT" in
+  /*)
+  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+  ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+  echo "$ac_t""$XGETTEXT" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+		 USE_INCLUDED_LIBINTL=yes
+		 CATOBJEXT=.cat
+		 INSTOBJEXT=.cat
+		 DATADIRNAME=lib
+		 INTLDEPS='$(top_builddir)/intl/libintl.a'
+		 INTLLIBS=$INTLDEPS
+		 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+		 nls_cv_header_intl=intl/libintl.h
+		 nls_cv_header_libgt=intl/libgettext.h
+	       fi
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+	  fi
+        fi
+
+        if test "$CATOBJEXT" = "NONE"; then
+	  	  	  nls_cv_use_gnu_gettext=yes
+        fi
+      fi
+
+      if test "$nls_cv_use_gnu_gettext" = "yes"; then
+                INTLOBJS="\$(GETTOBJS)"
+        # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3076: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$MSGFMT" in
+  /*)
+  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
+  ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test -n "$MSGFMT"; then
+  echo "$ac_t""$MSGFMT" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+        # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3110: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$GMSGFMT" in
+  /*)
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+  ;;
+  ?:/*)			 
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+  ;;
+esac
+fi
+GMSGFMT="$ac_cv_path_GMSGFMT"
+if test -n "$GMSGFMT"; then
+  echo "$ac_t""$GMSGFMT" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+        # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3146: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$XGETTEXT" in
+  /*)
+  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+  ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test -n "$XGETTEXT"; then
+  echo "$ac_t""$XGETTEXT" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+        
+	USE_INCLUDED_LIBINTL=yes
+        CATOBJEXT=.gmo
+        INSTOBJEXT=.mo
+        DATADIRNAME=share
+	INTLDEPS='$(top_builddir)/intl/libintl.a'
+	INTLLIBS=$INTLDEPS
+	LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+        nls_cv_header_intl=intl/libintl.h
+        nls_cv_header_libgt=intl/libgettext.h
+      fi
+
+            if test "$XGETTEXT" != ":"; then
+			if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+	  : ;
+	else
+	  echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
+	  XGETTEXT=":"
+	fi
+      fi
+
+      # We need to process the po/ directory.
+      POSUB=po
+    else
+      DATADIRNAME=share
+      nls_cv_header_intl=intl/libintl.h
+      nls_cv_header_libgt=intl/libgettext.h
+    fi
+
+    # If this is used in GNU gettext we have to set USE_NLS to `yes'
+    # because some of the sources are only built for this goal.
+    if test "$PACKAGE" = gettext; then
+      USE_NLS=yes
+      USE_INCLUDED_LIBINTL=yes
+    fi
+
+                for lang in $ALL_LINGUAS; do
+      GMOFILES="$GMOFILES $lang.gmo"
+      POFILES="$POFILES $lang.po"
+    done
+
+        
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+  
+
+   if test "x$CATOBJEXT" != "x"; then
+     if test "x$ALL_LINGUAS" = "x"; then
+       LINGUAS=
+     else
+       echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
+echo "configure:3236: checking for catalogs to be installed" >&5
+       NEW_LINGUAS=
+       for lang in ${LINGUAS=$ALL_LINGUAS}; do
+         case "$ALL_LINGUAS" in
+          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+         esac
+       done
+       LINGUAS=$NEW_LINGUAS
+       echo "$ac_t""$LINGUAS" 1>&6
+     fi
+
+          if test -n "$LINGUAS"; then
+       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+     fi
+   fi
+
+            if test $ac_cv_header_locale_h = yes; then
+     INCLUDE_LOCALE_H="#include "
+   else
+     INCLUDE_LOCALE_H="\
+/* The system does not provide the header .  Take care of it yourself. */"
+   fi
+   
+
+            if test "$USE_NLS" = "yes"; then
+     test -d intl || mkdir intl
+     if test "$CATOBJEXT" = ".cat"; then
+       ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
+echo "configure:3265: checking for linux/version.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
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  msgformat=linux
+else
+  echo "$ac_t""no" 1>&6
+msgformat=xopen
+fi
+
+
+                     sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
+     fi
+          if test -f $srcdir/intl/po2tbl.sed.in ; then
+       rm -f intl/po2tbl.sed
+       sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+         $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
+     fi
+   fi
+
+            if test "$PACKAGE" = "gettext"; then
+     GT_NO="#NO#"
+     GT_YES=
+   else
+     GT_NO=
+     GT_YES="#YES#"
+   fi
+   
+   
+
+               MKINSTALLDIRS=
+   if test -n "$ac_aux_dir"; then
+     MKINSTALLDIRS="$ac_aux_dir/mkdirs.sh"
+   fi
+   if test -z "$MKINSTALLDIRS"; then
+     MKINSTALLDIRS="\$(top_srcdir)/mkdirs.sh"
+   fi
+   
+
+      l=
+   
+
+         if test "x$srcdir" != "x."; then
+     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+       posrcprefix="$srcdir/"
+     else
+       posrcprefix="../$srcdir/"
+     fi
+   else
+     posrcprefix="../"
+   fi
+   if test -f $srcdir/po/POTFILES.in ; then
+   if test "$USE_NLS" = "yes"; then
+     test -d po || mkdir po
+     rm -f po/POTFILES
+     sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+	  < $srcdir/po/POTFILES.in > po/POTFILES
+   fi
+   fi
+
+
+
+# Check whether --with-nls-datadir or --without-nls-datadir was given.
+if test "${with_nls_datadir+set}" = set; then
+  withval="$with_nls_datadir"
+  :
+else
+  withval="${NLS_DATADIR-$prefix/$DATADIRNAME}"
+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" 1>&2; exit 1; }
+  ;;
+esac
+
+eval NLS_DATADIR="$withval"
+
+
+INTLDIR_CPPFLAGS="#"
+INTLDIR_MAKE=
+MSG_DIR_MAKE=
+SUB_MAKEFILE=
+
+use_our_messages=no
+if test -d $srcdir/po ; then
+echo $ac_n "checking if we should use included message-library""... $ac_c" 1>&6
+echo "configure:3387: checking if we should use included message-library" >&5
+	
+# Check whether --enable-included-msgs or --disable-included-msgs was given.
+if test "${enable_included_msgs+set}" = set; then
+  enableval="$enable_included_msgs"
+  use_our_messages=$enableval
+else
+  use_our_messages=yes
+fi
+
+fi
+echo "$ac_t""$use_our_messages" 1>&6
+test $use_our_messages = yes && USE_OUR_MESSAGES=
+
+
+if test "$USE_INCLUDED_LIBINTL" = yes ; then
+        if test "$nls_cv_force_use_gnu_gettext" = yes ; then
+		echo "configure: warning: Using included gettext anyway, since none was found" 1>&2
+		SUB_MAKEFILE="intl/makefile"
+	else
+		INTLDIR_MAKE="#"
+	fi
+	if test $use_our_messages = no ; then
+		MSG_DIR_MAKE="#"
+		SUB_MAKEFILE=
+	fi
+	if test "$use_our_messages" = yes ; then
+		SUB_MAKEFILE="$SUB_MAKEFILE po/makefile.in:po/makefile.inn"
+	else
+		MSG_DIR_MAKE="#"
+	fi
+elif test "$USE_NLS" = yes ; then
+	for ac_hdr in libintl.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3423: 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
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+fi
+done
+
+	INTLDIR_MAKE="#"
+	SUB_MAKEFILE="po/makefile.in:po/makefile.inn"
+else
+	INTLDIR_MAKE="#"
+	MSG_DIR_MAKE="#"
+fi
+
+if test -z "$MSG_DIR_MAKE" ; then
+	if test $use_our_messages = no ; then
+		MSG_DIR_MAKE="#"
+		SUB_MAKEFILE=
+	fi
+fi
+
+if test -z "$INTLDIR_MAKE" ; then
+	INTLDIR_CPPFLAGS=
+fi
+
+
+
+
+
+
+if test "$USE_INCLUDED_LIBINTL" = yes ; then
+	if test "$nls_cv_force_use_gnu_gettext" = yes ; then
+		cat >> confdefs.h <<\EOF
+#define HAVE_GETTEXT 1
+EOF
+
+	elif test "$nls_cv_use_gnu_gettext" = yes ; then
+		cat >> confdefs.h <<\EOF
+#define HAVE_GETTEXT 1
+EOF
+
+	fi
+	if test -n "$nls_cv_header_intl" ; then
+		cat >> confdefs.h <<\EOF
+#define HAVE_LIBINTL_H 1
+EOF
+
+	fi
+fi
+
+echo $ac_n "checking if you want full utility pathnames""... $ac_c" 1>&6
+echo "configure:3503: 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"
+  test "$enableval" != no && enableval=yes
+  if test "$enableval" != "yes" ; then
+    with_full_paths=no 
+  else
+    with_full_paths=yes
+  fi
+else
+  enableval=yes 
+  with_full_paths=yes
+  
+fi
+
+echo "$ac_t""$with_full_paths" 1>&6
+test $with_full_paths = no && cat >> confdefs.h <<\EOF
+#define USE_EXECVP 1
+EOF
+
+
+
+echo $ac_n "checking for system mailer""... $ac_c" 1>&6
+echo "configure:3528: 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
+  
+	cf_cv_SYSTEM_MAIL=unknown
+	for cv_path in /usr/mmdf/bin/submit \
+	/usr/sbin/sendmail \
+	/usr/lib/sendmail  \
+	
+	do
+		if test -f $cv_path ; then
+			cf_cv_SYSTEM_MAIL=$cv_path
+			break
+		fi
+	done
+	
+fi
+
+echo "$ac_t""$cf_cv_SYSTEM_MAIL" 1>&6
+cat >> confdefs.h <&6
+echo "configure:3555: 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
+  
+	case $cf_cv_SYSTEM_MAIL in
+	*/mmdf/*)
+		cf_cv_system_mail_flags="-mlruxto,cc\\\\*"
+        	;;
+	*)
+        	cf_cv_system_mail_flags="-t -oi"
+	esac
+	
+fi
+
+echo "$ac_t""$cf_cv_system_mail_flags" 1>&6
+cat >> confdefs.h <&6
-echo "configure:1371: checking for $ac_word" >&5
+echo "configure:3583: 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
@@ -1375,9 +3587,13 @@ else
   /*)
   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
   ;;
+  ?:/*)			 
+  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a dos path.
+  ;;
   *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_CHMOD="$ac_dir/$ac_word"
@@ -1398,13 +3614,21 @@ fi
 
 else
 	echo $ac_n "checking for chmod""... $ac_c" 1>&6
-echo "configure:1402: checking for chmod" >&5
+echo "configure:3618: checking for chmod" >&5
 	echo "$ac_t""$CHMOD" 1>&6
+	eval 'ac_cv_path_'CHMOD'="'chmod'"'
 fi
-
 cf_path_prog=""
 cf_path_args=""
-IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}:"
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
 for cf_temp in $ac_cv_path_CHMOD
 do
 	if test -z "$cf_path_prog" ; then
@@ -1432,7 +3656,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:1436: checking for $ac_word" >&5
+echo "configure:3660: 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
@@ -1440,9 +3664,13 @@ else
   /*)
   ac_cv_path_COMPRESS="$COMPRESS" # Let the user override the test with a path.
   ;;
+  ?:/*)			 
+  ac_cv_path_COMPRESS="$COMPRESS" # Let the user override the test with a dos path.
+  ;;
   *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_COMPRESS="$ac_dir/$ac_word"
@@ -1463,13 +3691,21 @@ fi
 
 else
 	echo $ac_n "checking for compress""... $ac_c" 1>&6
-echo "configure:1467: checking for compress" >&5
+echo "configure:3695: checking for compress" >&5
 	echo "$ac_t""$COMPRESS" 1>&6
+	eval 'ac_cv_path_'COMPRESS'="'compress'"'
 fi
-
 cf_path_prog=""
 cf_path_args=""
-IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}:"
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
 for cf_temp in $ac_cv_path_COMPRESS
 do
 	if test -z "$cf_path_prog" ; then
@@ -1497,7 +3733,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:1501: checking for $ac_word" >&5
+echo "configure:3737: 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
@@ -1505,9 +3741,13 @@ else
   /*)
   ac_cv_path_COPY="$COPY" # Let the user override the test with a path.
   ;;
+  ?:/*)			 
+  ac_cv_path_COPY="$COPY" # Let the user override the test with a dos path.
+  ;;
   *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_COPY="$ac_dir/$ac_word"
@@ -1528,13 +3768,21 @@ fi
 
 else
 	echo $ac_n "checking for cp""... $ac_c" 1>&6
-echo "configure:1532: checking for cp" >&5
+echo "configure:3772: checking for cp" >&5
 	echo "$ac_t""$COPY" 1>&6
+	eval 'ac_cv_path_'COPY'="'cp'"'
 fi
-
 cf_path_prog=""
 cf_path_args=""
-IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}:"
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
 for cf_temp in $ac_cv_path_COPY
 do
 	if test -z "$cf_path_prog" ; then
@@ -1562,7 +3810,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:1566: checking for $ac_word" >&5
+echo "configure:3814: 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
@@ -1570,9 +3818,13 @@ else
   /*)
   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
   ;;
+  ?:/*)			 
+  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a dos path.
+  ;;
   *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_GZIP="$ac_dir/$ac_word"
@@ -1593,13 +3845,21 @@ fi
 
 else
 	echo $ac_n "checking for gzip""... $ac_c" 1>&6
-echo "configure:1597: checking for gzip" >&5
+echo "configure:3849: checking for gzip" >&5
 	echo "$ac_t""$GZIP" 1>&6
+	eval 'ac_cv_path_'GZIP'="'gzip'"'
 fi
-
 cf_path_prog=""
 cf_path_args=""
-IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}:"
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
 for cf_temp in $ac_cv_path_GZIP
 do
 	if test -z "$cf_path_prog" ; then
@@ -1627,7 +3887,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:1631: checking for $ac_word" >&5
+echo "configure:3891: 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
@@ -1635,9 +3895,13 @@ else
   /*)
   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
   ;;
+  ?:/*)			 
+  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a dos path.
+  ;;
   *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_MKDIR="$ac_dir/$ac_word"
@@ -1658,13 +3922,21 @@ fi
 
 else
 	echo $ac_n "checking for mkdir""... $ac_c" 1>&6
-echo "configure:1662: checking for mkdir" >&5
+echo "configure:3926: checking for mkdir" >&5
 	echo "$ac_t""$MKDIR" 1>&6
+	eval 'ac_cv_path_'MKDIR'="'mkdir'"'
 fi
-
 cf_path_prog=""
 cf_path_args=""
-IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}:"
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
 for cf_temp in $ac_cv_path_MKDIR
 do
 	if test -z "$cf_path_prog" ; then
@@ -1692,7 +3964,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:1696: checking for $ac_word" >&5
+echo "configure:3968: 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
@@ -1700,9 +3972,13 @@ else
   /*)
   ac_cv_path_MV="$MV" # Let the user override the test with a path.
   ;;
+  ?:/*)			 
+  ac_cv_path_MV="$MV" # Let the user override the test with a dos path.
+  ;;
   *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_MV="$ac_dir/$ac_word"
@@ -1723,13 +3999,21 @@ fi
 
 else
 	echo $ac_n "checking for mv""... $ac_c" 1>&6
-echo "configure:1727: checking for mv" >&5
+echo "configure:4003: checking for mv" >&5
 	echo "$ac_t""$MV" 1>&6
+	eval 'ac_cv_path_'MV'="'mv'"'
 fi
-
 cf_path_prog=""
 cf_path_args=""
-IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}:"
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
 for cf_temp in $ac_cv_path_MV
 do
 	if test -z "$cf_path_prog" ; then
@@ -1757,7 +4041,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:1761: checking for $ac_word" >&5
+echo "configure:4045: 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
@@ -1765,9 +4049,13 @@ else
   /*)
   ac_cv_path_RM="$RM" # Let the user override the test with a path.
   ;;
+  ?:/*)			 
+  ac_cv_path_RM="$RM" # Let the user override the test with a dos path.
+  ;;
   *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_RM="$ac_dir/$ac_word"
@@ -1788,13 +4076,21 @@ fi
 
 else
 	echo $ac_n "checking for rm""... $ac_c" 1>&6
-echo "configure:1792: checking for rm" >&5
+echo "configure:4080: checking for rm" >&5
 	echo "$ac_t""$RM" 1>&6
+	eval 'ac_cv_path_'RM'="'rm'"'
 fi
-
 cf_path_prog=""
 cf_path_args=""
-IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}:"
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
 for cf_temp in $ac_cv_path_RM
 do
 	if test -z "$cf_path_prog" ; then
@@ -1822,7 +4118,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:1826: checking for $ac_word" >&5
+echo "configure:4122: 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
@@ -1830,9 +4126,13 @@ else
   /*)
   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
   ;;
+  ?:/*)			 
+  ac_cv_path_TAR="$TAR" # Let the user override the test with a dos path.
+  ;;
   *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_TAR="$ac_dir/$ac_word"
@@ -1853,13 +4153,21 @@ fi
 
 else
 	echo $ac_n "checking for tar""... $ac_c" 1>&6
-echo "configure:1857: checking for tar" >&5
+echo "configure:4157: checking for tar" >&5
 	echo "$ac_t""$TAR" 1>&6
+	eval 'ac_cv_path_'TAR'="'tar'"'
 fi
-
 cf_path_prog=""
 cf_path_args=""
-IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}:"
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
 for cf_temp in $ac_cv_path_TAR
 do
 	if test -z "$cf_path_prog" ; then
@@ -1887,7 +4195,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:1891: checking for $ac_word" >&5
+echo "configure:4199: 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
@@ -1895,9 +4203,13 @@ else
   /*)
   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
   ;;
+  ?:/*)			 
+  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a dos path.
+  ;;
   *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_TOUCH="$ac_dir/$ac_word"
@@ -1918,13 +4230,21 @@ fi
 
 else
 	echo $ac_n "checking for touch""... $ac_c" 1>&6
-echo "configure:1922: checking for touch" >&5
+echo "configure:4234: checking for touch" >&5
 	echo "$ac_t""$TOUCH" 1>&6
+	eval 'ac_cv_path_'TOUCH'="'touch'"'
 fi
-
 cf_path_prog=""
 cf_path_args=""
-IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}:"
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
 for cf_temp in $ac_cv_path_TOUCH
 do
 	if test -z "$cf_path_prog" ; then
@@ -1952,7 +4272,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:1956: checking for $ac_word" >&5
+echo "configure:4276: 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
@@ -1960,9 +4280,13 @@ else
   /*)
   ac_cv_path_UNCOMPRESS="$UNCOMPRESS" # Let the user override the test with a path.
   ;;
+  ?:/*)			 
+  ac_cv_path_UNCOMPRESS="$UNCOMPRESS" # Let the user override the test with a dos path.
+  ;;
   *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_UNCOMPRESS="$ac_dir/$ac_word"
@@ -1983,13 +4307,21 @@ fi
 
 else
 	echo $ac_n "checking for gunzip""... $ac_c" 1>&6
-echo "configure:1987: checking for gunzip" >&5
+echo "configure:4311: checking for gunzip" >&5
 	echo "$ac_t""$UNCOMPRESS" 1>&6
+	eval 'ac_cv_path_'UNCOMPRESS'="'gunzip'"'
 fi
-
 cf_path_prog=""
 cf_path_args=""
-IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}:"
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
 for cf_temp in $ac_cv_path_UNCOMPRESS
 do
 	if test -z "$cf_path_prog" ; then
@@ -2017,7 +4349,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:2021: checking for $ac_word" >&5
+echo "configure:4353: 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
@@ -2025,9 +4357,13 @@ else
   /*)
   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
   ;;
+  ?:/*)			 
+  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a dos path.
+  ;;
   *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_UNZIP="$ac_dir/$ac_word"
@@ -2048,13 +4384,21 @@ fi
 
 else
 	echo $ac_n "checking for unzip""... $ac_c" 1>&6
-echo "configure:2052: checking for unzip" >&5
+echo "configure:4388: checking for unzip" >&5
 	echo "$ac_t""$UNZIP" 1>&6
+	eval 'ac_cv_path_'UNZIP'="'unzip'"'
 fi
-
 cf_path_prog=""
 cf_path_args=""
-IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}:"
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
 for cf_temp in $ac_cv_path_UNZIP
 do
 	if test -z "$cf_path_prog" ; then
@@ -2077,12 +4421,89 @@ EOF
 
 
 
+test -z "$BZIP2" && BZIP2=bzip2
+if test "$with_full_paths" = yes ; then
+	# Extract the first word of "bzip2", so it can be a program name with args.
+set dummy bzip2; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4430: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_BZIP2'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$BZIP2" in
+  /*)
+  ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a path.
+  ;;
+  ?:/*)			 
+  ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_BZIP2="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_BZIP2" && ac_cv_path_BZIP2="$BZIP2"
+  ;;
+esac
+fi
+BZIP2="$ac_cv_path_BZIP2"
+if test -n "$BZIP2"; then
+  echo "$ac_t""$BZIP2" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+	echo $ac_n "checking for bzip2""... $ac_c" 1>&6
+echo "configure:4465: checking for bzip2" >&5
+	echo "$ac_t""$BZIP2" 1>&6
+	eval 'ac_cv_path_'BZIP2'="'bzip2'"'
+fi
+cf_path_prog=""
+cf_path_args=""
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
+for cf_temp in $ac_cv_path_BZIP2
+do
+	if test -z "$cf_path_prog" ; then
+		cf_path_prog="$cf_temp"
+	elif test -z "$cf_path_args" ; then
+		cf_path_args="$cf_temp"
+	else
+		cf_path_args="$cf_path_args $cf_temp"
+	fi
+done
+IFS="$cf_save_ifs"
+
+cat >> confdefs.h <> confdefs.h <&6
-echo "configure:2086: checking for $ac_word" >&5
+echo "configure:4507: 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
@@ -2090,9 +4511,13 @@ else
   /*)
   ac_cv_path_UUDECODE="$UUDECODE" # Let the user override the test with a path.
   ;;
+  ?:/*)			 
+  ac_cv_path_UUDECODE="$UUDECODE" # Let the user override the test with a dos path.
+  ;;
   *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_UUDECODE="$ac_dir/$ac_word"
@@ -2113,13 +4538,21 @@ fi
 
 else
 	echo $ac_n "checking for uudecode""... $ac_c" 1>&6
-echo "configure:2117: checking for uudecode" >&5
+echo "configure:4542: checking for uudecode" >&5
 	echo "$ac_t""$UUDECODE" 1>&6
+	eval 'ac_cv_path_'UUDECODE'="'uudecode'"'
 fi
-
 cf_path_prog=""
 cf_path_args=""
-IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}:"
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
 for cf_temp in $ac_cv_path_UUDECODE
 do
 	if test -z "$cf_path_prog" ; then
@@ -2147,7 +4580,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:2151: checking for $ac_word" >&5
+echo "configure:4584: 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
@@ -2155,9 +4588,13 @@ else
   /*)
   ac_cv_path_ZCAT="$ZCAT" # Let the user override the test with a path.
   ;;
+  ?:/*)			 
+  ac_cv_path_ZCAT="$ZCAT" # Let the user override the test with a dos path.
+  ;;
   *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_ZCAT="$ac_dir/$ac_word"
@@ -2178,13 +4615,21 @@ fi
 
 else
 	echo $ac_n "checking for zcat""... $ac_c" 1>&6
-echo "configure:2182: checking for zcat" >&5
+echo "configure:4619: checking for zcat" >&5
 	echo "$ac_t""$ZCAT" 1>&6
+	eval 'ac_cv_path_'ZCAT'="'zcat'"'
 fi
-
 cf_path_prog=""
 cf_path_args=""
-IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}:"
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
 for cf_temp in $ac_cv_path_ZCAT
 do
 	if test -z "$cf_path_prog" ; then
@@ -2212,7 +4657,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:2216: checking for $ac_word" >&5
+echo "configure:4661: 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
@@ -2220,9 +4665,13 @@ else
   /*)
   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
   ;;
+  ?:/*)			 
+  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a dos path.
+  ;;
   *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_path_ZIP="$ac_dir/$ac_word"
@@ -2243,13 +4692,21 @@ fi
 
 else
 	echo $ac_n "checking for zip""... $ac_c" 1>&6
-echo "configure:2247: checking for zip" >&5
+echo "configure:4696: checking for zip" >&5
 	echo "$ac_t""$ZIP" 1>&6
+	eval 'ac_cv_path_'ZIP'="'zip'"'
 fi
-
 cf_path_prog=""
 cf_path_args=""
-IFS="${IFS= 	}"; cf_save_ifs="$IFS"; IFS="${IFS}:"
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
 for cf_temp in $ac_cv_path_ZIP
 do
 	if test -z "$cf_path_prog" ; then
@@ -2263,11 +4720,242 @@ done
 IFS="$cf_save_ifs"
 
 cat >> confdefs.h <> confdefs.h <&6
+echo "configure:4738: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_TELNET'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$TELNET" in
+  /*)
+  ac_cv_path_TELNET="$TELNET" # Let the user override the test with a path.
+  ;;
+  ?:/*)			 
+  ac_cv_path_TELNET="$TELNET" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_TELNET="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_TELNET" && ac_cv_path_TELNET="$TELNET"
+  ;;
+esac
+fi
+TELNET="$ac_cv_path_TELNET"
+if test -n "$TELNET"; then
+  echo "$ac_t""$TELNET" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+	echo $ac_n "checking for telnet""... $ac_c" 1>&6
+echo "configure:4773: checking for telnet" >&5
+	echo "$ac_t""$TELNET" 1>&6
+	eval 'ac_cv_path_'TELNET'="'telnet'"'
+fi
+cf_path_prog=""
+cf_path_args=""
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
+for cf_temp in $ac_cv_path_TELNET
+do
+	if test -z "$cf_path_prog" ; then
+		cf_path_prog="$cf_temp"
+	elif test -z "$cf_path_args" ; then
+		cf_path_args="$cf_temp"
+	else
+		cf_path_args="$cf_path_args $cf_temp"
+	fi
+done
+IFS="$cf_save_ifs"
+
+cat >> confdefs.h <> confdefs.h <&6
+echo "configure:4815: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_TN3270'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$TN3270" in
+  /*)
+  ac_cv_path_TN3270="$TN3270" # Let the user override the test with a path.
+  ;;
+  ?:/*)			 
+  ac_cv_path_TN3270="$TN3270" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_TN3270="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_TN3270" && ac_cv_path_TN3270="$TN3270"
+  ;;
+esac
+fi
+TN3270="$ac_cv_path_TN3270"
+if test -n "$TN3270"; then
+  echo "$ac_t""$TN3270" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+	echo $ac_n "checking for tn3270""... $ac_c" 1>&6
+echo "configure:4850: checking for tn3270" >&5
+	echo "$ac_t""$TN3270" 1>&6
+	eval 'ac_cv_path_'TN3270'="'tn3270'"'
+fi
+cf_path_prog=""
+cf_path_args=""
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
+for cf_temp in $ac_cv_path_TN3270
+do
+	if test -z "$cf_path_prog" ; then
+		cf_path_prog="$cf_temp"
+	elif test -z "$cf_path_args" ; then
+		cf_path_args="$cf_temp"
+	else
+		cf_path_args="$cf_path_args $cf_temp"
+	fi
+done
+IFS="$cf_save_ifs"
+
+cat >> confdefs.h <> confdefs.h <&6
+echo "configure:4892: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_RLOGIN'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$RLOGIN" in
+  /*)
+  ac_cv_path_RLOGIN="$RLOGIN" # Let the user override the test with a path.
+  ;;
+  ?:/*)			 
+  ac_cv_path_RLOGIN="$RLOGIN" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_RLOGIN="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_RLOGIN" && ac_cv_path_RLOGIN="$RLOGIN"
+  ;;
+esac
+fi
+RLOGIN="$ac_cv_path_RLOGIN"
+if test -n "$RLOGIN"; then
+  echo "$ac_t""$RLOGIN" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+	echo $ac_n "checking for rlogin""... $ac_c" 1>&6
+echo "configure:4927: checking for rlogin" >&5
+	echo "$ac_t""$RLOGIN" 1>&6
+	eval 'ac_cv_path_'RLOGIN'="'rlogin'"'
+fi
+cf_path_prog=""
+cf_path_args=""
+IFS="${IFS= 	}"; cf_save_ifs="$IFS"
+case $host_os in #(vi
+os2*) #(vi
+	IFS="${IFS};"
+	;;
+*)
+	IFS="${IFS}:"
+	;;
+esac
+for cf_temp in $ac_cv_path_RLOGIN
+do
+	if test -z "$cf_path_prog" ; then
+		cf_path_prog="$cf_temp"
+	elif test -z "$cf_path_args" ; then
+		cf_path_args="$cf_temp"
+	else
+		cf_path_args="$cf_path_args $cf_temp"
+	fi
+done
+IFS="$cf_save_ifs"
+
+cat >> confdefs.h <> confdefs.h <&6
-echo "configure:2300: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:4988: 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
@@ -2310,15 +4998,21 @@ cf_save_CFLAGS="$CFLAGS"
 # HP-UX			-Aa -D_HPUX_SOURCE
 # SVR4			-Xc
 # UnixWare 1.2		(cannot use -Xc, since ANSI/POSIX clashes)
-for cf_arg in "-DCC_HAS_PROTOS" "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" -Xc
+for cf_arg in "-DCC_HAS_PROTOS" \
+	"" \
+	-qlanglvl=ansi \
+	-std1 \
+	"-Aa -D_HPUX_SOURCE +e" \
+	"-Aa -D_HPUX_SOURCE" \
+	-Xc
 do
 	CFLAGS="$cf_save_CFLAGS $cf_arg"
 	cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ansi_cc="$cf_arg"; break
 else
@@ -2358,12 +5052,12 @@ fi
 
 fi
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2362: checking for working const" >&5
+echo "configure:5056: 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 <&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_c_const=yes
 else
@@ -2434,26 +5128,27 @@ fi
 
 
 PROG_EXT=
+TRY_CFLAGS=
 case $host_os in
 aix4*)
-	CFLAGS="$CFLAGS -DAIX4 -D_BSD=44" 
+	CFLAGS="$CFLAGS -DAIX4 -D_BSD=44 -D_AIX"
 	LIBS="$LIBS -lbsd"
 	;;
 aix*)
 	LIBS="$LIBS -lbsd"
 	;;
 apollo*)
-	CFLAGS="$CFLAGS -D_BUILTINS -W0,-opt,4"
+	TRY_CFLAGS="$TRY_CFLAGS -D_BUILTINS -W0,-opt,4"
 	;;
 bsdi*)
-	CFLAGS="$CFLAGS -DBSDI" 
+	CFLAGS="$CFLAGS -DBSDI"
 	;;
 clix*)
 	# Tested on CLIX 3.1 (T.Dickey).  The original makefile entry
 	# 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:2457: checking for strcmp in -lc_s" >&5
+echo "configure:5152: 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
@@ -2461,7 +5156,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc_s  $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2504,10 +5199,11 @@ convex*)
 	CFLAGS="$CFLAGS -D__STDC__ -Dunix"
 	;;
 dgux*)
-	CFLAGS="$CFLAGS -DDGUX" 
+	CFLAGS="$CFLAGS -DDGUX"
 	;;
 hpux*)
-	CFLAGS="$CFLAGS -DSNAKE" 
+	CFLAGS="$CFLAGS -DSNAKE"
+	test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -Wp,-H600000"
 	;;
 isc*)
 	# -DPOSIX_JC is necessary, else LYBookmark.c never finds out what a mode_t is.
@@ -2518,10 +5214,10 @@ irix*)
 	# The original makefile used the $CFLAGS option -cckr for some form
 	# of K&R compatibility.  However, this causes compilation warnings for
 	# varargs on IRIX 5.2, and does not appear to be needed.
-	#removed: CFLAGS="$CFLAGS -cckr" 
+	#removed: CFLAGS="$CFLAGS -cckr"
 	;;
 linux*)
-	CFLAGS="$CFLAGS -DLINUX" 
+	CFLAGS="$CFLAGS -DLINUX"
 	;;
 next*)
 	CFLAGS="$CFLAGS -DNEXT -DXMOSAIC_HACK"
@@ -2535,13 +5231,18 @@ os2*)
 	LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed "s/-Zexe//g"`
 	PROG_EXT=".exe"
 	;;
+osf4*)
+	# The -Olimit flag (see below) is no longer available with
+	# Digital C 5.2, which is bundled with Digital UNIX 4.0.
+	CFLAGS="$CFLAGS -DDSYS5"
+	;;
 osf*)
 	# Increase the maximum size of functions that will be optimized.
-	test -z "$GCC" && CFLAGS="$CFLAGS -O -Olimit 4000"
+	test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -O -Olimit 4000"
 	CFLAGS="$CFLAGS -DDSYS5"
 	;;
 sco3.2v5*)
-	test $ac_cv_prog_gcc != yes && CC="cc -belf"
+	test $ac_cv_prog_gcc != yes && TRY_CFLAGS="$TRY_CFLAGS -belf"
 	;;
 sco*)
 	LIBS="$LIBS -lmalloc"
@@ -2556,15 +5257,16 @@ 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:2560: checking for $ac_word" >&5
+echo "configure:5261: 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
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       ac_cv_prog_CC="$ac_prog"
@@ -2600,18 +5302,18 @@ sony-newsos*)
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2604: checking for $ac_hdr" >&5
+echo "configure:5306: 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
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:5316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -2648,24 +5350,24 @@ sunos4*)
 	;;
 ultrix*)
 	# Increase the maximum size of functions that will be optimized.
-	test -z "$GCC" && CFLAGS="$CFLAGS -O -Olimit 600 -G 7"
-	CFLAGS="$CFLAGS -DULTRIX" 
+	test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -O -Olimit 600 -G 7"
+	CFLAGS="$CFLAGS -DULTRIX"
 	for ac_hdr in cursesX.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2658: checking for $ac_hdr" >&5
+echo "configure:5360: 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
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:5370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -2684,7 +5386,11 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   cat >> confdefs.h <> confdefs.h <<\EOF
+#define HAVE_CURSESX_H 1
+EOF
+
+		 cf_cv_ncurses_header=cursesX.h
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -2694,11 +5400,262 @@ done
 esac
 
 
+if test -n "$TRY_CFLAGS" ; then
+	cf_save_CFLAGS="$CFLAGS"
+	CFLAGS="$CFLAGS $TRY_CFLAGS"
+	echo $ac_n "checking if we should use compile options $TRY_CFLAGS""... $ac_c" 1>&6
+echo "configure:5408: checking if we should use compile options $TRY_CFLAGS" >&5
+	cat > conftest.$ac_ext <
+int main() {
+FILE *fp = stdin
+; return 0; }
+EOF
+if { (eval echo configure:5417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  cf_result=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cf_result=no
+fi
+rm -f conftest*
+	echo "$ac_t""$cf_result" 1>&6
+	test "$cf_result" = no && CFLAGS="$cf_save_CFLAGS"
+fi
+
+
+### Look for network libraries first, since some functions (such as gethostname)
+### are used in a lot of places.
+echo $ac_n "checking if you want socks library""... $ac_c" 1>&6
+echo "configure:5435: checking if you want socks library" >&5
+if eval "test \"`echo '$''{'cf_cv_use_libsocks'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+
+# Check whether --with-socks or --without-socks was given.
+if test "${with_socks+set}" = set; then
+  withval="$with_socks"
+  cf_cv_use_libsocks=$withval
+else
+  cf_cv_use_libsocks=no
+fi
+
+
+fi
+
+echo "$ac_t""$cf_cv_use_libsocks" 1>&6
+
+echo $ac_n "checking if you want socks5 library""... $ac_c" 1>&6
+echo "configure:5455: checking if you want socks5 library" >&5
+if eval "test \"`echo '$''{'cf_cv_use_libsocks5'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+
+# Check whether --with-socks5 or --without-socks5 was given.
+if test "${with_socks5+set}" = set; then
+  withval="$with_socks5"
+  cf_cv_use_libsocks5=$withval
+else
+  cf_cv_use_libsocks5=no
+fi
+
+
+fi
+
+echo "$ac_t""$cf_cv_use_libsocks5" 1>&6
+
+if test "x$cf_cv_use_libsocks" != xno ; then
+	
+case "$cf_cv_use_libsocks" in #(vi
+no|yes) #(vi
+  ;;
+*)
+  LIBS="$LIBS -L$cf_cv_use_libsocks"
+  ;;
+esac
+LIBS="$LIBS -lsocks"
+cat >> confdefs.h <<\EOF
+#define SOCKS 1
+EOF
+
+cat >> confdefs.h <<\EOF
+#define accept Raccept
+EOF
+
+cat >> confdefs.h <<\EOF
+#define bind Rbind
+EOF
+
+cat >> confdefs.h <<\EOF
+#define connect Rconnect
+EOF
+
+cat >> confdefs.h <<\EOF
+#define getpeername Rgetpeername
+EOF
+
+cat >> confdefs.h <<\EOF
+#define getsockname Rgetsockname
+EOF
+
+cat >> confdefs.h <<\EOF
+#define listen Rlisten
+EOF
+
+cat >> confdefs.h <<\EOF
+#define recvfrom Rrecvfrom
+EOF
+
+cat >> confdefs.h <<\EOF
+#define select Rselect
+EOF
+
+cat > conftest.$ac_ext <
+int main() {
+
+	accept((char *)0)
+; return 0; }
+EOF
+if { (eval echo configure:5530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  { echo "configure: error: Cannot link with socks library" 1>&2; exit 1; }
+fi
+rm -f conftest*
+
+elif test "x$cf_cv_use_libsocks5" != xno ; then
+	
+case "$cf_cv_use_libsocks5" in #(vi
+no|yes) #(vi
+  ;;
+*)
+  LIBS="$LIBS -L$cf_cv_use_libsocks5"
+  CFLAGS="$CFLAGS -I$cf_cv_use_libsocks5/../include"
+  ;;
+esac
+LIBS="$LIBS -lsocks5"
+cat >> confdefs.h <<\EOF
+#define USE_SOCKS5 1
+EOF
+
+cat >> confdefs.h <<\EOF
+#define SOCKS 1
+EOF
+
+echo $ac_n "checking if the socks library uses socks4 prefix""... $ac_c" 1>&6
+echo "configure:5560: checking if the socks library uses socks4 prefix" >&5
+cat > conftest.$ac_ext <
+int main() {
+
+	Rinit((char *)0)
+; return 0; }
+EOF
+if { (eval echo configure:5571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  cat >> confdefs.h <<\EOF
+#define USE_SOCKS4_PREFIX 1
+EOF
+
+	 cf_use_socks4=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cat > conftest.$ac_ext <
+int main() {
+SOCKSinit((char *)0)
+; return 0; }
+EOF
+if { (eval echo configure:5590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  cf_use_socks4=no
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  { echo "configure: error: Cannot link with socks5 library" 1>&2; exit 1; }
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+echo "$ac_t""$cf_use_socks4" 1>&6
+if test "$cf_use_socks4" = "yes" ; then
+	cat >> confdefs.h <<\EOF
+#define accept Raccept
+EOF
+
+	cat >> confdefs.h <<\EOF
+#define bind Rbind
+EOF
+
+	cat >> confdefs.h <<\EOF
+#define connect Rconnect
+EOF
+
+	cat >> confdefs.h <<\EOF
+#define getpeername Rgetpeername
+EOF
+
+	cat >> confdefs.h <<\EOF
+#define getsockname Rgetsockname
+EOF
+
+	cat >> confdefs.h <<\EOF
+#define listen Rlisten
+EOF
+
+	cat >> confdefs.h <<\EOF
+#define recvfrom Rrecvfrom
+EOF
+
+	cat >> confdefs.h <<\EOF
+#define select Rselect
+EOF
+
+else
+	cat >> confdefs.h <<\EOF
+#define accept SOCKSaccept
+EOF
+
+	cat >> confdefs.h <<\EOF
+#define getpeername SOCKSgetpeername
+EOF
+
+	cat >> confdefs.h <<\EOF
+#define getsockname SOCKSgetsockname
+EOF
+
+	cat >> confdefs.h <<\EOF
+#define recvfrom SOCKSrecvfrom
+EOF
 
+fi
 
+else
+	
 cf_test_netlibs=no
 echo $ac_n "checking for network libraries""... $ac_c" 1>&6
-echo "configure:2702: checking for network libraries" >&5
+echo "configure:5659: checking for network libraries" >&5
 if eval "test \"`echo '$''{'cf_cv_netlibs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2709,12 +5666,12 @@ cf_test_netlibs=yes
 for ac_func in gethostname
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2713: checking for $ac_func" >&5
+echo "configure:5670: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2760,7 +5717,7 @@ else
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
-echo "configure:2764: checking for gethostname in -lnsl" >&5
+echo "configure:5721: 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
@@ -2768,7 +5725,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl $cf_cv_netlibs $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2812,7 +5769,7 @@ else
 	
 		
 echo $ac_n "checking for gethostname in -lsocket""... $ac_c" 1>&6
-echo "configure:2816: checking for gethostname in -lsocket" >&5
+echo "configure:5773: 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
@@ -2820,7 +5777,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $cf_cv_netlibs $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2875,21 +5832,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:2879: checking for -linet" >&5
+echo "configure:5836: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_lib_inet=yes
 else
@@ -2912,12 +5869,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:2916: checking for $ac_func" >&5
+echo "configure:5873: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2963,7 +5920,7 @@ else
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:2967: checking for socket in -lsocket" >&5
+echo "configure:5924: 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
@@ -2971,7 +5928,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $cf_cv_netlibs $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3015,7 +5972,7 @@ else
 	
 		
 echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6
-echo "configure:3019: checking for socket in -lbsd" >&5
+echo "configure:5976: 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
@@ -3023,7 +5980,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lbsd $cf_cv_netlibs $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3079,12 +6036,12 @@ fi
 for ac_func in gethostbyname
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3083: checking for $ac_func" >&5
+echo "configure:6040: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3130,7 +6087,7 @@ else
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:3134: checking for gethostbyname in -lnsl" >&5
+echo "configure:6091: 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
@@ -3138,7 +6095,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl $cf_cv_netlibs $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3190,12 +6147,12 @@ done
 for ac_func in strcasecmp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3194: checking for $ac_func" >&5
+echo "configure:6151: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3241,7 +6198,7 @@ else
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
-echo "configure:3245: checking for strcasecmp in -lresolv" >&5
+echo "configure:6202: 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
@@ -3249,7 +6206,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv $cf_cv_netlibs $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3282,30 +6239,148 @@ cf_tr_func=`echo strcasecmp | tr 'a-z' 'A-Z'`
 	cat >> confdefs.h <&6
+
+	ac_cv_func_strcasecmp=unknown
+	unset ac_cv_func_strcasecmp 2>/dev/null
+	
+fi
+
+
+fi
+done
+
+
+fi
+
+LIBS="$LIBS $cf_cv_netlibs"
+test $cf_test_netlibs = no && echo "$cf_cv_netlibs" >&6
+
+fi
+
+echo $ac_n "checking for inet_aton function""... $ac_c" 1>&6
+echo "configure:6267: checking for inet_aton function" >&5
+if eval "test \"`echo '$''{'cf_cv_have_inet_aton'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+cat > conftest.$ac_ext <
+#include 
+#include 
+#include 
+
+int main() {
+inet_aton(0, (struct in_addr *)0)
+; return 0; }
+EOF
+if { (eval echo configure:6284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  cf_cv_have_inet_aton=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cf_cv_have_inet_aton=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$cf_cv_have_inet_aton" 1>&6
+if test "$cf_cv_have_inet_aton" = yes ; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_INET_ATON 1
+EOF
+
+else
+    echo $ac_n "checking for inet_addr function""... $ac_c" 1>&6
+echo "configure:6304: checking for inet_addr function" >&5
+if eval "test \"`echo '$''{'cf_cv_have_inet_addr'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+    cat > conftest.$ac_ext <
+#include 
+#include 
+#include 
+    
+int main() {
+inet_addr(0)
+; return 0; }
+EOF
+if { (eval echo configure:6321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  cf_cv_have_inet_addr=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cf_cv_have_inet_addr=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$cf_cv_have_inet_addr" 1>&6
+    if test "$cf_cv_have_inet_addr" = no ; then
+	echo $ac_n "checking for library with inet_addr""... $ac_c" 1>&6
+echo "configure:6336: checking for library with inet_addr" >&5
+if eval "test \"`echo '$''{'cf_cv_lib_inet_addr'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+	    cf_save_LIBS="$LIBS"
+	    for cf_inetlib in -lbind -lresolv
+	    do
+		LIBS="$cf_save_LIBS $cf_inetlib"
+		cat > conftest.$ac_ext <
+#include 
+#include 
+#include 
+		
+int main() {
+inet_addr(0)
+; return 0; }
+EOF
+if { (eval echo configure:6357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  cf_cv_lib_inet_addr=$cf_inetlib
 else
-  echo "$ac_t""no" 1>&6
-
-	ac_cv_func_strcasecmp=unknown
-	unset ac_cv_func_strcasecmp 2>/dev/null
-	
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cf_cv_lib_inet_addr=no
 fi
-
-
+rm -f conftest*
+		LIBS="$cf_save_LIBS"
+		test "$cf_cv_lib_inet_addr" != no && break
+	    done
+	
 fi
-done
-
 
+echo "$ac_t""$cf_cv_lib_inet_addr" 1>&6
+	if test "$cf_cv_lib_inet_addr" != no ; then
+	    LIBS="$LIBS $cf_cv_lib_inet_addr"
+	else
+	    echo "configure: warning: Unable to find library for inet_addr function" 1>&2
+	fi
+    fi
 fi
 
-LIBS="$LIBS $cf_cv_netlibs"
-test $cf_test_netlibs = no && echo "$cf_cv_netlibs" >&6
-
 
 echo $ac_n "checking for screen type""... $ac_c" 1>&6
-echo "configure:3309: checking for screen type" >&5
+echo "configure:6384: checking for screen type" >&5
 if eval "test \"`echo '$''{'cf_cv_screen'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3340,12 +6415,12 @@ case $cf_cv_screen in
 curses)
 	
 echo $ac_n "checking for initscr""... $ac_c" 1>&6
-echo "configure:3344: checking for initscr" >&5
+echo "configure:6419: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_initscr=yes"
 else
@@ -3389,7 +6464,7 @@ else
 case $host_os in #(vi
 freebsd*) #(vi
 	echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
-echo "configure:3393: checking for tgoto in -lmytinfo" >&5
+echo "configure:6468: 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
@@ -3397,7 +6472,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmytinfo  $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3431,7 +6506,7 @@ fi
 	;;
 hpux10.*)
 	echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
-echo "configure:3435: checking for initscr in -lcur_colr" >&5
+echo "configure:6510: checking for initscr in -lcur_colr" >&5
 ac_lib_var=`echo cur_colr'_'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
@@ -3439,7 +6514,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcur_colr  $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3474,7 +6549,7 @@ else
   echo "$ac_t""no" 1>&6
 
 	echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
-echo "configure:3478: checking for initscr in -lHcurses" >&5
+echo "configure:6553: 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
@@ -3482,7 +6557,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lHcurses  $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3520,6 +6595,9 @@ fi
 
 fi
 
+	;;
+linux*) # Suse Linux does not follow /usr/lib convention
+	LIBS="$LIBS -L/lib"
 	;;
 esac
 
@@ -3539,12 +6617,12 @@ if test ".$ac_cv_func_initscr" != .yes ; then
 	# Check for library containing tgoto.  Do this before curses library
 	# because it may be needed to link the test-case for initscr.
 	echo $ac_n "checking for tgoto""... $ac_c" 1>&6
-echo "configure:3543: checking for tgoto" >&5
+echo "configure:6621: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_tgoto=yes"
 else
@@ -3588,7 +6666,7 @@ else
 		for cf_term_lib in termcap termlib unknown
 		do
 			echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
-echo "configure:3592: checking for tgoto in -l$cf_term_lib" >&5
+echo "configure:6670: checking for tgoto in -l$cf_term_lib" >&5
 ac_lib_var=`echo $cf_term_lib'_'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
@@ -3596,7 +6674,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$cf_term_lib  $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3634,10 +6712,10 @@ fi
 
 	# Check for library containing initscr
 	test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
-	for cf_curs_lib in curses ncurses xcurses cursesX jcurses unknown
+	for cf_curs_lib in cursesX curses ncurses xcurses jcurses unknown
 	do
 		echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
-echo "configure:3641: checking for initscr in -l$cf_curs_lib" >&5
+echo "configure:6719: checking for initscr in -l$cf_curs_lib" >&5
 ac_lib_var=`echo $cf_curs_lib'_'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
@@ -3645,7 +6723,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$cf_curs_lib  $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3682,16 +6760,16 @@ fi
 	LIBS="-l$cf_curs_lib $cf_save_LIBS"
 	if test "$cf_term_lib" = unknown ; then
 		echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
-echo "configure:3686: checking if we can link with $cf_curs_lib library" >&5
+echo "configure:6764: checking if we can link with $cf_curs_lib library" >&5
 		cat > conftest.$ac_ext <
 int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:3695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_result=yes
 else
@@ -3705,16 +6783,16 @@ rm -f conftest*
 		test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
 	elif test "$cf_term_lib" != predefined ; then
 		echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
-echo "configure:3709: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
+echo "configure:6787: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
 		cat > conftest.$ac_ext <
 int main() {
 initscr(); tgoto((char *)0, 0, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:3718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_result=no
 else
@@ -3724,14 +6802,14 @@ else
   
 			LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
 			cat > conftest.$ac_ext <
 int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:3735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_result=yes
 else
@@ -3753,17 +6831,17 @@ fi
 
 	
 echo $ac_n "checking for curses performance tradeoff""... $ac_c" 1>&6
-echo "configure:3757: checking for curses performance tradeoff" >&5
+echo "configure:6835: 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 <
+#include <${cf_cv_ncurses_header-curses.h}>
 int main() {
 
 #if defined(wbkgdset) && defined(clearok) && defined(getbkgd)
@@ -3774,15 +6852,15 @@ int main() {
 	
 ; return 0; }
 EOF
-if { (eval echo configure:3778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
 	cat > conftest.$ac_ext <
+#include <${cf_cv_ncurses_header-curses.h}>
 int main() {
 
 #if defined(wbkgdset) && defined(clearok) && defined(getbkgd)
@@ -3793,7 +6871,7 @@ int main() {
 	
 ; return 0; }
 EOF
-if { (eval echo configure:3797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_curs_performance=yes
 else
@@ -3818,13 +6896,13 @@ EOF
 ncurses)
 	
 echo $ac_n "checking for ncurses header file""... $ac_c" 1>&6
-echo "configure:3822: checking for ncurses header file" >&5
+echo "configure:6900: 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 <
 int main() {
@@ -3841,7 +6919,7 @@ make an error
 	
 ; return 0; }
 EOF
-if { (eval echo configure:3845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ncurses_header=predefined
 else
@@ -3927,7 +7005,7 @@ done
 	;;
 esac
 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
-echo "configure:3931: checking for ncurses version" >&5
+echo "configure:7009: 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
@@ -3952,7 +7030,7 @@ Autoconf "old"
 #endif
 EOF
 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
-	{ (eval echo configure:3956: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
+	{ (eval echo configure:7034: \"$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"
@@ -3961,7 +7039,7 @@ EOF
 
 else
   cat > conftest.$ac_ext <
@@ -3984,7 +7062,7 @@ int main()
 	exit(0);
 }
 EOF
-if { (eval echo configure:3988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
 	cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -4009,7 +7087,7 @@ echo "$ac_t""$cf_cv_ncurses_version" 1>&6
 cf_ncurses_LIBS=""
 cf_ncurses_SAVE="$LIBS"
 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:4013: checking for Gpm_Open in -lgpm" >&5
+echo "configure:7091: 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
@@ -4017,7 +7095,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgpm  $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4044,7 +7122,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:4048: checking for initscr in -lgpm" >&5
+echo "configure:7126: 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
@@ -4052,7 +7130,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgpm  $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4094,7 +7172,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:4098: checking for tgoto in -lmytinfo" >&5
+echo "configure:7176: 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
@@ -4102,7 +7180,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmytinfo  $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4141,12 +7219,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:4145: checking for initscr" >&5
+echo "configure:7223: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_initscr=yes"
 else
@@ -4189,17 +7267,17 @@ else
 
 		cf_save_LIBS="$LIBS"
 		echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
-echo "configure:4193: checking for initscr in -lncurses" >&5
+echo "configure:7271: checking for initscr in -lncurses" >&5
 		LIBS="-lncurses $LIBS"
 		cat > conftest.$ac_ext <
 int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:4203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 			 cf_cv_have_lib_ncurses=yes
@@ -4226,17 +7304,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:4230: checking for -lncurses in $cf_libdir" >&5
+echo "configure:7308: checking for -lncurses in $cf_libdir" >&5
 				LIBS="-L$cf_libdir -lncurses $cf_save_LIBS"
 				cat > conftest.$ac_ext <
 int main() {
 initscr()
 ; return 0; }
 EOF
-if { (eval echo configure:4240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 			 		 cf_cv_have_lib_ncurses=yes
@@ -4261,14 +7339,14 @@ if test $cf_cv_have_lib_ncurses = no ; then
 fi
 case $host_os in #(vi
 linux*) # Suse Linux does not follow /usr/lib convention
-	ncurses="$ncurses /lib"
+	LIBS="$LIBS -L/lib"
 	;;
 esac
 
 
 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:4272: checking if we can link ncurses without $cf_ncurses_LIBS" >&5
+echo "configure:7350: 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'$//'`
@@ -4277,14 +7355,14 @@ echo "configure:4272: checking if we can link ncurses without $cf_ncurses_LIBS"
 		fi
 	done
 	cat > conftest.$ac_ext <
 int main() {
 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:4288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 else
@@ -4301,20 +7379,20 @@ fi
 slang)
 	
 echo $ac_n "checking for slang header file""... $ac_c" 1>&6
-echo "configure:4305: checking for slang header file" >&5
+echo "configure:7383: 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 <
 int main() {
 printf("%s\n", SLANG_VERSION)
 ; return 0; }
 EOF
-if { (eval echo configure:4318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_slang_header=predefined
 else
@@ -4342,7 +7420,7 @@ test "$prefix" != /usr           && cf_search="$cf_search /usr/include /usr/incl
 		do
 			echo trying $cf_incdir/$cf_header 1>&5
 			if egrep "SLANG_VERSION" $cf_incdir/$cf_header 1>&5 2>&1; then
-				cf_cv_slang_header=$cf_incdir/$cf_header 
+				cf_cv_slang_header=$cf_incdir/$cf_header
 				break
 			fi
 		done
@@ -4390,15 +7468,52 @@ esac
 	
 cf_slang_LIBS1="$LIBS"
 
-if eval "test \"`echo '$''{'cf_cv_lib_termcap'+set}'`\" = set"; then
+if eval "test \"`echo '$''{'cf_cv_termlib'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
-cf_cv_lib_termcap=none
+cf_cv_termlib=none
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  cf_cv_termlib=terminfo
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cf_cv_termlib=termcap
+fi
+rm -f conftest*
+	test -n "$verbose" && echo "	using functions in predefined $cf_cv_termlib LIBS" 1>&6
+
+
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  
+
 # HP-UX 9.x terminfo has setupterm, but no tigetstr.
-if test "$termlib" = none; then
+if test "$cf_cv_termlib" = none; then
 	echo $ac_n "checking for tigetstr in -ltermlib""... $ac_c" 1>&6
-echo "configure:4402: checking for tigetstr in -ltermlib" >&5
+echo "configure:7517: 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
@@ -4406,7 +7521,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ltermlib  $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4432,15 +7547,15 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIBS="$LIBS -ltermlib" cf_cv_lib_termcap=terminfo
+  LIBS="$LIBS -ltermlib" cf_cv_termlib=terminfo
 else
   echo "$ac_t""no" 1>&6
 fi
 
 fi
-if test "$cf_cv_lib_termcap" = none; then
+if test "$cf_cv_termlib" = none; then
 	echo $ac_n "checking for tgoto in -ltermlib""... $ac_c" 1>&6
-echo "configure:4444: checking for tgoto in -ltermlib" >&5
+echo "configure:7559: 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
@@ -4448,7 +7563,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ltermlib  $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4474,16 +7589,16 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIBS="$LIBS -ltermlib" cf_cv_lib_termcap=termcap
+  LIBS="$LIBS -ltermlib" cf_cv_termlib=termcap
 else
   echo "$ac_t""no" 1>&6
 fi
 
 fi
-if test "$cf_cv_lib_termcap" = none; then
+if test "$cf_cv_termlib" = none; then
 	# allow curses library for broken AIX system.
 	echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6
-echo "configure:4487: checking for initscr in -lcurses" >&5
+echo "configure:7602: 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
@@ -4491,7 +7606,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcurses  $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4517,13 +7632,13 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIBS="$LIBS -lcurses" cf_cv_lib_termcap=termcap
+  LIBS="$LIBS -lcurses" cf_cv_termlib=termcap
 else
   echo "$ac_t""no" 1>&6
 fi
 
 	echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
-echo "configure:4527: checking for tgoto in -ltermcap" >&5
+echo "configure:7642: 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
@@ -4531,7 +7646,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ltermcap  $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4557,15 +7672,15 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIBS="$LIBS -ltermcap" cf_cv_lib_termcap=termcap
+  LIBS="$LIBS -ltermcap" cf_cv_termlib=termcap
 else
   echo "$ac_t""no" 1>&6
 fi
 
 fi
-if test "$cf_cv_lib_termcap" = none; then
+if test "$cf_cv_termlib" = none; then
 	echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
-echo "configure:4569: checking for tgoto in -ltermcap" >&5
+echo "configure:7684: 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
@@ -4573,7 +7688,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ltermcap  $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4599,15 +7714,15 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIBS="$LIBS -ltermcap" cf_cv_lib_termcap=termcap
+  LIBS="$LIBS -ltermcap" cf_cv_termlib=termcap
 else
   echo "$ac_t""no" 1>&6
 fi
 
 fi
-if test "$cf_cv_lib_termcap" = none; then
+if test "$cf_cv_termlib" = none; then
 	echo $ac_n "checking for tgoto in -lncurses""... $ac_c" 1>&6
-echo "configure:4611: checking for tgoto in -lncurses" >&5
+echo "configure:7726: 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
@@ -4615,7 +7730,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lncurses  $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4641,7 +7756,7 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  LIBS="$LIBS -lncurses" cf_cv_lib_termcap=ncurses
+  LIBS="$LIBS -lncurses" cf_cv_termlib=ncurses
 else
   echo "$ac_t""no" 1>&6
 fi
@@ -4649,19 +7764,21 @@ fi
 fi
 
 fi
-
-if test "$cf_cv_lib_termcap" = none; then
+rm -f conftest*
+if test "$cf_cv_termlib" = none; then
 	{ echo "configure: error: Can't find -ltermlib, -lcurses, or -ltermcap" 1>&2; exit 1; }
 fi
 
+fi
+
 cf_slang_LIBS2="$LIBS"
 echo $ac_n "checking for acos""... $ac_c" 1>&6
-echo "configure:4660: checking for acos" >&5
+echo "configure:7777: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_acos=yes"
 else
@@ -4703,7 +7820,7 @@ else
   echo "$ac_t""no" 1>&6
 
 echo $ac_n "checking for acos in -lm""... $ac_c" 1>&6
-echo "configure:4707: checking for acos in -lm" >&5
+echo "configure:7824: 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
@@ -4711,7 +7828,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm $LIBS $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4762,12 +7879,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:4766: checking for SLtt_get_screen_size" >&5
+echo "configure:7883: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_SLtt_get_screen_size=yes"
 else
@@ -4810,17 +7927,17 @@ else
 
 		cf_save_LIBS="$LIBS"
 		echo $ac_n "checking for SLtt_get_screen_size in -lslang""... $ac_c" 1>&6
-echo "configure:4814: checking for SLtt_get_screen_size in -lslang" >&5
+echo "configure:7931: checking for SLtt_get_screen_size in -lslang" >&5
 		LIBS="-lslang $LIBS"
 		cat > conftest.$ac_ext <
 int main() {
 SLtt_get_screen_size()
 ; return 0; }
 EOF
-if { (eval echo configure:4824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 			 cf_cv_have_lib_slang=yes
@@ -4847,17 +7964,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:4851: checking for -lslang in $cf_libdir" >&5
+echo "configure:7968: checking for -lslang in $cf_libdir" >&5
 				LIBS="-L$cf_libdir -lslang $cf_save_LIBS"
 				cat > conftest.$ac_ext <
 int main() {
 SLtt_get_screen_size()
 ; return 0; }
 EOF
-if { (eval echo configure:4861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 			 		 cf_cv_have_lib_slang=yes
@@ -4882,13 +7999,13 @@ if test $cf_cv_have_lib_slang = no ; then
 fi
 case $host_os in #(vi
 linux*) # Suse Linux does not follow /usr/lib convention
-	slang="$slang /lib"
+	LIBS="$LIBS -L/lib"
 	;;
 esac
 
 cf_slang_LIBS3="$LIBS"
 echo $ac_n "checking if we can link slang without termcap""... $ac_c" 1>&6
-echo "configure:4892: checking if we can link slang without termcap" >&5
+echo "configure:8009: checking if we can link slang without termcap" >&5
 if test -n "`echo $cf_slang_LIBS1 | sed -e 's/ //g'`" ; then
 	cf_exclude=`echo ".$cf_slang_LIBS2" | sed -e "s@$cf_slang_LIBS1@@" -e 's@^.@@'`
 else
@@ -4896,14 +8013,14 @@ else
 fi
 LIBS=`echo ".$cf_slang_LIBS3" | sed -e "s@$cf_exclude@@" -e 's@^.@@'`
 cat > conftest.$ac_ext <
 int main() {
 SLtt_get_screen_size()
 ; return 0; }
 EOF
-if { (eval echo configure:4907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_result=yes
 else
@@ -4923,7 +8040,7 @@ eval cf_libdir=$libdir
 cf_libdir=`echo $cf_libdir | sed -e s@'^NONE/'@$prefix/@ -e s@'^NONE/'@$ac_default_prefix/@`
 
 echo $ac_n "checking for location of config-file""... $ac_c" 1>&6
-echo "configure:4927: checking for location of config-file" >&5
+echo "configure:8044: checking for location of config-file" >&5
 LYNX_CFG_FILE=$cf_libdir/lynx.cfg
 cat >> confdefs.h <&6
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:4937: checking for ANSI C header files" >&5
+echo "configure:8054: 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 <
 #include 
@@ -4946,8 +8063,8 @@ else
 #include 
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:8067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
   ac_cv_header_stdc=yes
@@ -4963,7 +8080,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
@@ -4981,7 +8098,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
@@ -5002,7 +8119,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -5013,7 +8130,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:5017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -5037,12 +8154,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:5041: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:8158: 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 <
 #include 
@@ -5051,7 +8168,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:5055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -5076,12 +8193,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:5080: checking for $ac_hdr that defines DIR" >&5
+echo "configure:8197: 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 <
 #include <$ac_hdr>
@@ -5089,7 +8206,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:5093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -5114,7 +8231,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:5118: checking for opendir in -ldir" >&5
+echo "configure:8235: 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
@@ -5122,7 +8239,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5155,7 +8272,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:5159: checking for opendir in -lx" >&5
+echo "configure:8276: 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
@@ -5163,7 +8280,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5213,18 +8330,18 @@ 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:5217: checking for $ac_hdr" >&5
+echo "configure:8334: 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
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:8344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -5251,13 +8368,13 @@ done
 
 
 echo $ac_n "checking termio.h and termios.h""... $ac_c" 1>&6
-echo "configure:5255: checking termio.h and termios.h" >&5
+echo "configure:8372: 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 <&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_termio_and_termios=yes
 else
@@ -5293,18 +8410,18 @@ 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:5297: checking for $ac_hdr" >&5
+echo "configure:8414: 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
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:8424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -5340,18 +8457,18 @@ 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:5344: checking for $ac_hdr" >&5
+echo "configure:8461: 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
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:8471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -5380,18 +8497,18 @@ 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:5384: checking for $ac_hdr" >&5
+echo "configure:8501: 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
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:8511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -5431,13 +8548,13 @@ fi
 
 
 echo $ac_n "checking for union wait""... $ac_c" 1>&6
-echo "configure:5435: checking for union wait" >&5
+echo "configure:8552: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_type_unionwait=no
 	 echo compiles ok w/o union wait 1>&5
@@ -5459,7 +8576,7 @@ else
   rm -rf conftest*
   
 	cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_type_unionwait=yes
 	 echo compiles ok with union wait and possibly macros too 1>&5
@@ -5483,98 +8600,352 @@ else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  cf_cv_type_unionwait=no
+  cf_cv_type_unionwait=no
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$cf_cv_type_unionwait" 1>&6
+test $cf_cv_type_unionwait = yes && cat >> confdefs.h <<\EOF
+#define HAVE_TYPE_UNIONWAIT 1
+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:8622: 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 <&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  cf_cv_arg_union_wait=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cf_cv_arg_union_wait=no
+fi
+rm -f conftest*
+		
+fi
+
+	echo "$ac_t""$cf_cv_arg_union_wait" 1>&6
+	test $cf_cv_arg_union_wait = yes && cat >> confdefs.h <<\EOF
+#define WAIT_USES_UNION 1
+EOF
+
+
+	echo $ac_n "checking if union wait can be used as waitpid-arg""... $ac_c" 1>&6
+echo "configure:8655: 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 <&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  cf_cv_arg_union_waitpid=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cf_cv_arg_union_waitpid=no
+fi
+rm -f conftest*
+		
+fi
+
+	echo "$ac_t""$cf_cv_arg_union_waitpid" 1>&6
+	test $cf_cv_arg_union_waitpid = yes && cat >> confdefs.h <<\EOF
+#define WAITPID_USES_UNION 1
+EOF
+
+
+fi
+
+
+for ac_hdr in stdarg.h varargs.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:8694: 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
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:8704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+fi
+done
+
+echo $ac_n "checking for standard varargs""... $ac_c" 1>&6
+echo "configure:8731: checking for standard varargs" >&5
+if eval "test \"`echo '$''{'cf_cv_ansi_varargs'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+	cat > conftest.$ac_ext <
+#else
+#if HAVE_VARARGS_H
+#include 
+#endif
+#endif
+		
+int main() {
+return 0;} int foo(char *fmt,...){va_list args;va_start(args,fmt);va_end(args)
+; return 0; }
+EOF
+if { (eval echo configure:8752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  cf_cv_ansi_varargs=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cf_cv_ansi_varargs=no
+fi
+rm -f conftest*
+	
+fi
+
+echo "$ac_t""$cf_cv_ansi_varargs" 1>&6
+test $cf_cv_ansi_varargs = yes && cat >> confdefs.h <<\EOF
+#define ANSI_VARARGS 1
+EOF
+
+
+echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
+echo "configure:8772: checking for uid_t in sys/types.h" >&5
+if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "uid_t" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_uid_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_type_uid_t" 1>&6
+if test $ac_cv_type_uid_t = no; then
+  cat >> confdefs.h <<\EOF
+#define uid_t int
+EOF
+
+  cat >> confdefs.h <<\EOF
+#define gid_t int
+EOF
+
+fi
+
+echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
+echo "configure:8806: checking type of array argument to getgroups" >&5
+if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_type_getgroups=cross
+else
+  cat > conftest.$ac_ext <
+#define NGID 256
+#undef MAX
+#define MAX(x, y) ((x) > (y) ? (x) : (y))
+main()
+{
+  gid_t gidset[NGID];
+  int i, n;
+  union { gid_t gval; long lval; }  val;
+
+  val.lval = -1;
+  for (i = 0; i < NGID; i++)
+    gidset[i] = val.gval;
+  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
+                 gidset);
+  /* Exit non-zero if getgroups seems to require an array of ints.  This
+     happens when gid_t is short but getgroups modifies an array of ints.  */
+  exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
+}
+
+EOF
+if { (eval echo configure:8839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+    ac_cv_type_getgroups=gid_t
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_type_getgroups=int
+fi
+rm -fr conftest*
+fi
+
+if test $ac_cv_type_getgroups = cross; then
+        cat > conftest.$ac_ext <
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_getgroups=gid_t
+else
+  rm -rf conftest*
+  ac_cv_type_getgroups=int
 fi
 rm -f conftest*
+
 fi
-rm -f conftest*
 fi
 
-echo "$ac_t""$cf_cv_type_unionwait" 1>&6
-test $cf_cv_type_unionwait = yes && cat >> confdefs.h <<\EOF
-#define HAVE_TYPE_UNIONWAIT 1
+echo "$ac_t""$ac_cv_type_getgroups" 1>&6
+cat >> confdefs.h <&6
-echo "configure:5505: 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 "checking for pid_t""... $ac_c" 1>&6
+echo "configure:8877: 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 < conftest.$ac_ext <
+#if STDC_HEADERS
+#include 
+#include 
+#endif
 EOF
-if { (eval echo configure:5518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
-  cf_cv_arg_union_wait=yes
+  ac_cv_type_pid_t=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
   rm -rf conftest*
-  cf_cv_arg_union_wait=no
+  ac_cv_type_pid_t=no
 fi
 rm -f conftest*
-		
-fi
 
-	echo "$ac_t""$cf_cv_arg_union_wait" 1>&6
-	test $cf_cv_arg_union_wait = yes && cat >> confdefs.h <<\EOF
-#define WAIT_USES_UNION 1
+fi
+echo "$ac_t""$ac_cv_type_pid_t" 1>&6
+if test $ac_cv_type_pid_t = no; then
+  cat >> confdefs.h <<\EOF
+#define pid_t int
 EOF
 
+fi
 
-	echo $ac_n "checking if union wait can be used as waitpid-arg""... $ac_c" 1>&6
-echo "configure:5538: 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 "checking for uid_t in sys/types.h""... $ac_c" 1>&6
+echo "configure:8910: checking for uid_t in sys/types.h" >&5
+if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  
-		cat > conftest.$ac_ext < conftest.$ac_ext <
 EOF
-if { (eval echo configure:5551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "uid_t" >/dev/null 2>&1; then
   rm -rf conftest*
-  cf_cv_arg_union_waitpid=yes
+  ac_cv_type_uid_t=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
   rm -rf conftest*
-  cf_cv_arg_union_waitpid=no
+  ac_cv_type_uid_t=no
 fi
 rm -f conftest*
-		
+
 fi
 
-	echo "$ac_t""$cf_cv_arg_union_waitpid" 1>&6
-	test $cf_cv_arg_union_waitpid = yes && cat >> confdefs.h <<\EOF
-#define WAITPID_USES_UNION 1
+echo "$ac_t""$ac_cv_type_uid_t" 1>&6
+if test $ac_cv_type_uid_t = no; then
+  cat >> confdefs.h <<\EOF
+#define uid_t int
 EOF
 
+  cat >> confdefs.h <<\EOF
+#define gid_t int
+EOF
 
 fi
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:5573: checking for mode_t" >&5
+echo "configure:8944: checking for mode_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <
 #if STDC_HEADERS
@@ -5583,7 +8954,7 @@ else
 #endif
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_type_mode_t=yes
 else
@@ -5603,53 +8974,20 @@ fi
 
 
 
-echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:5608: 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 <
-#if STDC_HEADERS
-#include 
-#include 
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_pid_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_pid_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_pid_t" 1>&6
-if test $ac_cv_type_pid_t = no; then
-  cat >> confdefs.h <<\EOF
-#define pid_t int
-EOF
-
-fi
-
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:5642: checking for vfork.h" >&5
+echo "configure:8980: 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
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:8990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
   eval "ac_cv_header_$ac_safe=yes"
@@ -5673,18 +9011,18 @@ else
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:5677: checking for working vfork" >&5
+echo "configure:9015: 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:5683: checking for vfork" >&5
+echo "configure:9021: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vfork=yes"
 else
@@ -5726,9 +9064,10 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+ac_cv_func_vfork_works=$ac_cv_func_vfork
 else
   cat > conftest.$ac_ext <
@@ -5823,7 +9162,7 @@ main() {
   }
 }
 EOF
-if { (eval echo configure:5827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_vfork_works=yes
 else
@@ -5847,13 +9186,13 @@ fi
 
 
 echo $ac_n "checking if we should use fcntl or ioctl""... $ac_c" 1>&6
-echo "configure:5851: checking if we should use fcntl or ioctl" >&5
+echo "configure:9190: checking if we should use fcntl or ioctl" >&5
 if eval "test \"`echo '$''{'cf_cv_fionbio'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <
@@ -5865,7 +9204,7 @@ int main() {
 	
 ; return 0; }
 EOF
-if { (eval echo configure:5869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_fionbio=ioctl
 else
@@ -5874,7 +9213,7 @@ else
   rm -rf conftest*
   
 cat > conftest.$ac_ext <
@@ -5891,7 +9230,7 @@ int main() {
 	
 ; return 0; }
 EOF
-if { (eval echo configure:5895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_fionbio=fcntl
 else
@@ -5914,20 +9253,20 @@ EOF
 
 
 echo $ac_n "checking for broken/missing definition of remove""... $ac_c" 1>&6
-echo "configure:5918: checking for broken/missing definition of remove" >&5
+echo "configure:9257: 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 <
 int main() {
 remove("dummy")
 ; return 0; }
 EOF
-if { (eval echo configure:5931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_baddef_remove=no
 else
@@ -5935,7 +9274,7 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <
 		int __unlink(name) { return unlink(name); } 
@@ -5943,7 +9282,7 @@ int main() {
 remove("dummy")
 ; return 0; }
 EOF
-if { (eval echo configure:5947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_baddef_remove=yes
 else
@@ -5967,13 +9306,13 @@ EOF
 
 
 echo $ac_n "checking for lstat""... $ac_c" 1>&6
-echo "configure:5971: checking for lstat" >&5
+echo "configure:9310: checking for lstat" >&5
 if eval "test \"`echo '$''{'ac_cv_func_lstat'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
 cat > conftest.$ac_ext <
@@ -5982,7 +9321,7 @@ int main() {
 lstat(".", (struct stat *)0)
 ; return 0; }
 EOF
-if { (eval echo configure:5986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_lstat=yes
 else
@@ -6007,19 +9346,22 @@ for ac_func in \
 	cuserid \
 	getcwd \
 	getgroups \
+	gettimeofday \
+	popen \
 	putenv \
 	readdir \
 	strerror \
+	unsetenv \
 	waitpid \
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6018: checking for $ac_func" >&5
+echo "configure:9360: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6072,12 +9414,12 @@ for ac_func in \
 
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6076: checking for $ac_func" >&5
+echo "configure:9418: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6121,7 +9463,7 @@ EOF
  
 else
   echo "$ac_t""no" 1>&6
-LIBOBJS="$LIBOBJS ${ac_func}.o"
+LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
 fi
 done
 
@@ -6131,12 +9473,12 @@ for ac_func in strstr
 do
 
 echo $ac_n "checking for $ac_func declaration""... $ac_c" 1>&6
-echo "configure:6135: checking for $ac_func declaration" >&5
+echo "configure:9477: checking for $ac_func declaration" >&5
 if eval "test \"`echo '$''{'ac_cv_func_decl_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <
 int main() {
@@ -6145,11 +9487,11 @@ extern	int	${ac_func}();
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:6149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
 cat > conftest.$ac_ext <
 int main() {
@@ -6158,7 +9500,7 @@ int	(*p)() = ${ac_func};
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:6162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
 eval "ac_cv_func_decl_$ac_func=yes"
@@ -6200,12 +9542,12 @@ for ac_func in getgrgid getgrnam
 do
 
 echo $ac_n "checking for $ac_func declaration""... $ac_c" 1>&6
-echo "configure:6204: checking for $ac_func declaration" >&5
+echo "configure:9546: checking for $ac_func declaration" >&5
 if eval "test \"`echo '$''{'ac_cv_func_decl_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <
@@ -6216,11 +9558,11 @@ extern	int	${ac_func}();
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:6220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
 cat > conftest.$ac_ext <
@@ -6231,7 +9573,7 @@ int	(*p)() = ${ac_func};
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:6235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   
 eval "ac_cv_func_decl_$ac_func=yes"
@@ -6273,22 +9615,22 @@ done
 
 
 echo $ac_n "checking if TRUE/FALSE are defined""... $ac_c" 1>&6
-echo "configure:6277: checking if TRUE/FALSE are defined" >&5
+echo "configure:9619: 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 <
+#include <${cf_cv_ncurses_header-curses.h}>
 #include 
 int main() {
 int x = TRUE, y = FALSE
 ; return 0; }
 EOF
-if { (eval echo configure:6292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_bool_defs=yes
 else
@@ -6314,14 +9656,14 @@ fi
 
 
 
-echo $ac_n "checking declaration of errno""... $ac_c" 1>&6
-echo "configure:6319: checking declaration of errno" >&5
+echo $ac_n "checking if external errno is declared""... $ac_c" 1>&6
+echo "configure:9661: checking if external errno is declared" >&5
 if eval "test \"`echo '$''{'cf_cv_dcl_errno'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval 'cf_cv_dcl_'errno'=yes'
 else
@@ -6344,17 +9686,14 @@ else
   eval 'cf_cv_dcl_'errno'=no'
 fi
 rm -f conftest*
+
 fi
 
+
 eval 'cf_result=$cf_cv_dcl_'errno
 echo "$ac_t""$cf_result" 1>&6
 
-# It's possible (for near-UNIX clones) that the data doesn't exist
-if eval "test \"`echo '$''{'cf_cv_have_errno'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-if test $cf_result = no ; then
+if test "$cf_result" = no ; then
     eval 'cf_result=DECL_'errno
     
 cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
@@ -6363,20 +9702,28 @@ cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
 #define $cf_result 1
 EOF
 
-    echo $ac_n "checking existence of errno""... $ac_c" 1>&6
-echo "configure:6368: checking existence of errno" >&5
-        cat > conftest.$ac_ext <&6
+echo "configure:9711: checking if external errno exists" >&5
+if eval "test \"`echo '$''{'cf_cv_have_errno'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+    cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval 'cf_cv_have_'errno'=yes'
 else
@@ -6386,40 +9733,42 @@ else
   eval 'cf_cv_have_'errno'=no'
 fi
 rm -f conftest*
-        eval 'cf_result=$cf_cv_have_'errno
-        echo "$ac_t""$cf_result" 1>&6
-else
-    eval 'cf_cv_have_'errno'=yes'
 fi
 
-fi
 
-eval 'cf_result=HAVE_'errno
+eval 'cf_result=$cf_cv_have_'errno
+echo "$ac_t""$cf_result" 1>&6
 
+if test "$cf_result" = yes ; then
+    eval 'cf_result=HAVE_'errno
+    
 cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
 
-eval 'test $cf_cv_have_'errno' = yes && cat >> confdefs.h <> confdefs.h <&6
-echo "configure:6410: checking for setlocale()" >&5
+echo "configure:9759: 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 <
 int main() {
 setlocale(LC_ALL, "")
 ; return 0; }
 EOF
-if { (eval echo configure:6423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_locale=yes
 else
@@ -6440,13 +9789,13 @@ EOF
 
 
 echo $ac_n "checking if NGROUPS is defined""... $ac_c" 1>&6
-echo "configure:6444: checking if NGROUPS is defined" >&5
+echo "configure:9793: 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 <&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ngroups=yes
 else
@@ -6468,7 +9817,7 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ngroups=NGROUPS_MAX
 else
@@ -6515,14 +9864,14 @@ fi
 for cf_name in sys_nerr sys_errlist
 do
     
-echo $ac_n "checking declaration of $cf_name""... $ac_c" 1>&6
-echo "configure:6520: checking declaration of $cf_name" >&5
+echo $ac_n "checking if external $cf_name is declared""... $ac_c" 1>&6
+echo "configure:9869: checking if external $cf_name is declared" >&5
 if eval "test \"`echo '$''{'cf_cv_dcl_$cf_name'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
     cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval 'cf_cv_dcl_'$cf_name'=yes'
 else
@@ -6545,17 +9894,14 @@ else
   eval 'cf_cv_dcl_'$cf_name'=no'
 fi
 rm -f conftest*
+
 fi
 
+
 eval 'cf_result=$cf_cv_dcl_'$cf_name
 echo "$ac_t""$cf_result" 1>&6
 
-# It's possible (for near-UNIX clones) that the data doesn't exist
-if eval "test \"`echo '$''{'cf_cv_have_$cf_name'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-if test $cf_result = no ; then
+if test "$cf_result" = no ; then
     eval 'cf_result=DECL_'$cf_name
     
 cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
@@ -6564,20 +9910,28 @@ cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
 #define $cf_result 1
 EOF
 
-    echo $ac_n "checking existence of $cf_name""... $ac_c" 1>&6
-echo "configure:6569: checking existence of $cf_name" >&5
-        cat > conftest.$ac_ext <&6
+echo "configure:9919: checking if external $cf_name exists" >&5
+if eval "test \"`echo '$''{'cf_cv_have_$cf_name'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+    cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval 'cf_cv_have_'$cf_name'=yes'
 else
@@ -6587,34 +9941,36 @@ else
   eval 'cf_cv_have_'$cf_name'=no'
 fi
 rm -f conftest*
-        eval 'cf_result=$cf_cv_have_'$cf_name
-        echo "$ac_t""$cf_result" 1>&6
-else
-    eval 'cf_cv_have_'$cf_name'=yes'
 fi
 
-fi
 
-eval 'cf_result=HAVE_'$cf_name
+eval 'cf_result=$cf_cv_have_'$cf_name
+echo "$ac_t""$cf_result" 1>&6
 
+if test "$cf_result" = yes ; then
+    eval 'cf_result=HAVE_'$cf_name
+    
 cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
 
-eval 'test $cf_cv_have_'$cf_name' = yes && cat >> confdefs.h <> confdefs.h <&6
-echo "configure:6612: checking if struct utmp is declared" >&5
+echo "configure:9968: 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 <
@@ -6623,7 +9979,7 @@ int main() {
 struct utmp x; char *y = &x.ut_host[0]
 ; return 0; }
 EOF
-if { (eval echo configure:6627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_have_utmp=yes
 else
@@ -6631,14 +9987,14 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <
 int main() {
 struct utmpx x; char *y = &x.ut_host[0]
 ; return 0; }
 EOF
-if { (eval echo configure:6642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_have_utmp=utmpx
 else
@@ -6665,28 +10021,128 @@ EOF
 
 
 
+echo $ac_n "checking if external h_errno exists""... $ac_c" 1>&6
+echo "configure:10026: checking if external h_errno exists" >&5
+if eval "test \"`echo '$''{'cf_cv_have_h_errno'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+    cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval 'cf_cv_have_'h_errno'=yes'
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval 'cf_cv_have_'h_errno'=no'
+fi
+rm -f conftest*
+fi
+
+
+eval 'cf_result=$cf_cv_have_'h_errno
+echo "$ac_t""$cf_result" 1>&6
+
+if test "$cf_result" = yes ; then
+    eval 'cf_result=HAVE_'h_errno
+    
+cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
+
+    cat >> confdefs.h <&6
+echo "configure:10073: checking if character set is EBCDIC" >&5
+if eval "test \"`echo '$''{'cf_cv_ebcdic'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+	cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+   # TryCompile action if true
+cf_cv_ebcdic=yes 
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+   # TryCompile action if false
+cf_cv_ebcdic=no
+fi
+rm -f conftest*
+# end of TryCompile 
+fi
+
+# end of CacheVal CvEbcdic
+echo "$ac_t""$cf_cv_ebcdic" 1>&6
+case "$cf_cv_ebcdic" in  #(vi
+    yes) cat >> confdefs.h <<\EOF
+#define EBCDIC 1
+EOF
+
+         cat >> confdefs.h <<\EOF
+#define NOT_ASCII 1
+EOF
+;; #(vi
+    *)   ;;
+esac
+
+
 ### These tests must be run after establishing the curses library.
 if test $cf_cv_screen != slang ; then
 	
 echo $ac_n "checking if curses supports alternate-character set""... $ac_c" 1>&6
-echo "configure:6673: checking if curses supports alternate-character set" >&5
+echo "configure:10126: 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
   
+for mapname in acs_map _acs_map
+do
 	cat > conftest.$ac_ext <
+#include <${cf_cv_ncurses_header-curses.h}>
 	
 int main() {
-chtype x = acs_map['l']; acs_map['m'] = 0
+chtype x = $mapname['l']; $mapname['m'] = 0
 ; return 0; }
 EOF
-if { (eval echo configure:6688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:10143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  cf_cv_alt_char_set=yes
+  cf_cv_alt_char_set=$mapname
+	 break
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
@@ -6694,26 +10150,28 @@ else
   cf_cv_alt_char_set=no
 fi
 rm -f conftest*
+done
+	
 fi
 
 echo "$ac_t""$cf_cv_alt_char_set" 1>&6
-test $cf_cv_alt_char_set = yes && cat >> confdefs.h <<\EOF
-#define ALT_CHAR_SET 1
+test $cf_cv_alt_char_set != no && cat >> confdefs.h <&6
-echo "configure:6708: checking if curses supports fancy attributes" >&5
+echo "configure:10166: 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 <
+#include <${cf_cv_ncurses_header-curses.h}>
 
 int main() {
 attrset(A_UNDERLINE|A_BOLD|A_REVERSE);
@@ -6723,7 +10181,7 @@ attrset(A_UNDERLINE|A_BOLD|A_REVERSE);
 	
 ; return 0; }
 EOF
-if { (eval echo configure:6727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:10185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_fancy_curses=yes
 else
@@ -6743,7 +10201,7 @@ EOF
 
 
 	echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
-echo "configure:6747: checking for ncurses version" >&5
+echo "configure:10205: 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
@@ -6768,7 +10226,7 @@ Autoconf "old"
 #endif
 EOF
 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
-	{ (eval echo configure:6772: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
+	{ (eval echo configure:10230: \"$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"
@@ -6777,7 +10235,7 @@ EOF
 
 else
   cat > conftest.$ac_ext <
@@ -6800,7 +10258,7 @@ int main()
 	exit(0);
 }
 EOF
-if { (eval echo configure:6804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   
 	cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -6820,16 +10278,16 @@ 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:6824: checking for obsolete/broken version of ncurses" >&5
+echo "configure:10282: 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 <
+#include <${cf_cv_ncurses_header-curses.h}>
 int main() {
 
 #if defined(NCURSES_VERSION) && defined(wgetbkgd)
@@ -6840,7 +10298,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:6844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_ncurses_broken=no
 else
@@ -6865,13 +10323,13 @@ fi
 
 	
 echo $ac_n "checking if curses supports color attributes""... $ac_c" 1>&6
-echo "configure:6869: checking if curses supports color attributes" >&5
+echo "configure:10327: 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 <
@@ -6886,7 +10344,7 @@ chtype x = COLOR_BLUE;
 	
 ; return 0; }
 EOF
-if { (eval echo configure:6890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:10348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_color_curses=yes
 else
@@ -6913,7 +10371,7 @@ fi
 
 	
 echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6
-echo "configure:6917: checking declaration of size-change" >&5
+echo "configure:10375: 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
@@ -6927,7 +10385,7 @@ do
     CFLAGS="$cf_save_CFLAGS"
     test -n "$cf_opts" && CFLAGS="$CFLAGS -D$cf_opts"
     cat > conftest.$ac_ext <
 #if HAVE_TERMIOS_H
@@ -6966,7 +10424,7 @@ int main() {
 	
 ; return 0; }
 EOF
-if { (eval echo configure:6970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cf_cv_sizechange=yes
 else
@@ -6998,20 +10456,20 @@ EOF
 
 	
 echo $ac_n "checking if ttytype is declared in curses library""... $ac_c" 1>&6
-echo "configure:7002: checking if ttytype is declared in curses library" >&5
+echo "configure:10460: 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 <
+#include <${cf_cv_ncurses_header-curses.h}>
 int main() {
 char *x = &ttytype[1]; *x = 1
 ; return 0; }
 EOF
-if { (eval echo configure:7015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:10473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   cf_cv_have_ttytype=yes
 else
@@ -7032,18 +10490,19 @@ EOF
 
 	for ac_func in \
 		cbreak \
+		define_key \
 		keypad \
 		use_default_colors \
 		wborder \
 	
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7042: checking for $ac_func" >&5
+echo "configure:10501: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:10529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7078,48 +10537,121 @@ fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+
+fi
+
+
+
+
+echo $ac_n "checking if configuration info should be browsable""... $ac_c" 1>&6
+echo "configure:10559: checking if configuration info should be browsable" >&5
+
+# Check whether --enable-config-info or --disable-config-info was given.
+if test "${enable_config_info+set}" = set; then
+  enableval="$enable_config_info"
+  test "$enableval" != no && enableval=yes
+  if test "$enableval" != "yes" ; then
+    use_config_info=$enableval 
+  else
+    use_config_info=yes
+  fi
+else
+  enableval=yes 
+  use_config_info=yes
+  
+fi
+
+echo "$ac_t""$use_config_info" 1>&6
+test $use_config_info = no && cat >> confdefs.h <<\EOF
+#define NO_CONFIG_INFO 1
+EOF
+
+
+echo $ac_n "checking if new-style forms-based options screen should be used""... $ac_c" 1>&6
+echo "configure:10583: checking if new-style forms-based options screen should be used" >&5
+
+# Check whether --enable-forms-options or --disable-forms-options was given.
+if test "${enable_forms_options+set}" = set; then
+  enableval="$enable_forms_options"
+  test "$enableval" != no && enableval=yes
+  if test "$enableval" != "yes" ; then
+    use_forms_options=$enableval 
+  else
+    use_forms_options=yes
+  fi
+else
+  enableval=yes 
+  use_forms_options=yes
+  
+fi
+
+echo "$ac_t""$use_forms_options" 1>&6
+test $use_forms_options = no && cat >> confdefs.h <<\EOF
+#define NO_OPTION_FORMS 1
 EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
 
-fi
 
+echo $ac_n "checking if old-style options menu should be used""... $ac_c" 1>&6
+echo "configure:10607: checking if old-style options menu should be used" >&5
+
+# Check whether --enable-menu-options or --disable-menu-options was given.
+if test "${enable_menu_options+set}" = set; then
+  enableval="$enable_menu_options"
+  test "$enableval" != no && enableval=yes
+  if test "$enableval" != "yes" ; then
+    use_menu_options=$enableval 
+  else
+    use_menu_options=yes
+  fi
+else
+  enableval=yes 
+  use_menu_options=yes
+  
+fi
 
+echo "$ac_t""$use_menu_options" 1>&6
+test $use_menu_options = no && cat >> confdefs.h <<\EOF
+#define NO_OPTION_MENU 1
+EOF
 
 
-echo $ac_n "checking if experimental 8-bit case-conversion should be used""... $ac_c" 1>&6
-echo "configure:7100: checking if experimental 8-bit case-conversion should be used" >&5
+echo $ac_n "checking if experimental address-list page should be used""... $ac_c" 1>&6
+echo "configure:10631: checking if experimental address-list page should be used" >&5
 
-# Check whether --enable-8bit-toupper or --disable-8bit-toupper was given.
-if test "${enable_8bit_toupper+set}" = set; then
-  enableval="$enable_8bit_toupper"
+# Check whether --enable-addrlist-page or --disable-addrlist-page was given.
+if test "${enable_addrlist_page+set}" = set; then
+  enableval="$enable_addrlist_page"
   test "$enableval" != yes && enableval=no
   if test "$enableval" != "no" ; then
-    use_8bit_toupper=$enableval 
+    use_addrlist_page=$enableval 
   else
-    use_8bit_toupper=no
+    use_addrlist_page=no
   fi
 else
   enableval=no 
-  use_8bit_toupper=no
+  use_addrlist_page=no
   
 fi
 
-test $use_8bit_toupper != no && cat >> confdefs.h <<\EOF
-#define EXP_8BIT_TOUPPER 1
+echo "$ac_t""$use_addrlist_page" 1>&6
+test $use_addrlist_page != no && cat >> confdefs.h <<\EOF
+#define EXP_ADDRLIST_PAGE 1
 EOF
 
 
 echo $ac_n "checking if color-style code should be used""... $ac_c" 1>&6
-echo "configure:7123: checking if color-style code should be used" >&5
+echo "configure:10655: 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
@@ -7164,10 +10696,10 @@ no)
 #define USE_COLOR_STYLE 1
 EOF
 
-	echo "$ac_t""curses-style" 1>&6
+	echo "$ac_t""yes" 1>&6
 
 	echo $ac_n "checking for location of style-sheet file""... $ac_c" 1>&6
-echo "configure:7171: checking for location of style-sheet file" >&5
+echo "configure:10703: checking for location of style-sheet file" >&5
 	LYNX_LSS_FILE=$cf_libdir/lynx.lss
 	cat >> confdefs.h <&6
-echo "configure:7189: checking if you want to use default-colors" >&5
+echo "configure:10721: checking if you want to use default-colors" >&5
 
 # Check whether --enable-default-colors or --disable-default-colors was given.
 if test "${enable_default_colors+set}" = set; then
@@ -7209,8 +10741,108 @@ EOF
 
 fi
 
+echo $ac_n "checking if experimental keyboard-layout logic should be used""... $ac_c" 1>&6
+echo "configure:10746: checking if experimental keyboard-layout logic should be used" >&5
+
+# Check whether --enable-kbd-layout or --disable-kbd-layout was given.
+if test "${enable_kbd_layout+set}" = set; then
+  enableval="$enable_kbd_layout"
+  test "$enableval" != yes && enableval=no
+  if test "$enableval" != "no" ; then
+    use_kbd_layout=$enableval 
+  else
+    use_kbd_layout=no
+  fi
+else
+  enableval=no 
+  use_kbd_layout=no
+  
+fi
+
+echo "$ac_t""$use_kbd_layout" 1>&6
+test $use_kbd_layout != no && cat >> confdefs.h <<\EOF
+#define EXP_KEYBOARD_LAYOUT 1
+EOF
+
+
+
+echo $ac_n "checking if html source should be colorized""... $ac_c" 1>&6
+echo "configure:10771: checking if html source should be colorized" >&5
+
+# Check whether --enable-prettysrc or --disable-prettysrc was given.
+if test "${enable_prettysrc+set}" = set; then
+  enableval="$enable_prettysrc"
+  test "$enableval" != yes && enableval=no
+  if test "$enableval" != "no" ; then
+    use_prettysrc=$enableval 
+  else
+    use_prettysrc=no
+  fi
+else
+  enableval=no 
+  use_prettysrc=no
+  
+fi
+
+echo "$ac_t""$use_prettysrc" 1>&6
+test $use_prettysrc != no && cat >> confdefs.h <<\EOF
+#define USE_PSRC 1
+EOF
+
+
+echo $ac_n "checking if source caching should be used""... $ac_c" 1>&6
+echo "configure:10795: checking if source caching should be used" >&5
+
+# Check whether --enable-source-cache or --disable-source-cache was given.
+if test "${enable_source_cache+set}" = set; then
+  enableval="$enable_source_cache"
+  test "$enableval" != yes && enableval=no
+  if test "$enableval" != "no" ; then
+    use_source_cache=$enableval 
+  else
+    use_source_cache=no
+  fi
+else
+  enableval=no 
+  use_source_cache=no
+  
+fi
+
+echo "$ac_t""$use_source_cache" 1>&6
+test $use_source_cache != no && cat >> confdefs.h <<\EOF
+#define SOURCE_CACHE 1
+EOF
+
+
+
+
+
+echo $ac_n "checking if alternative line-edit bindings should be used""... $ac_c" 1>&6
+echo "configure:10822: checking if alternative line-edit bindings should be used" >&5
+
+# Check whether --enable-alt-bindings or --disable-alt-bindings was given.
+if test "${enable_alt_bindings+set}" = set; then
+  enableval="$enable_alt_bindings"
+  test "$enableval" != yes && enableval=no
+  if test "$enableval" != "no" ; then
+    use_alt_bindings=$enableval 
+  else
+    use_alt_bindings=yes
+  fi
+else
+  enableval=no 
+  use_alt_bindings=yes
+  
+fi
+
+echo "$ac_t""$use_alt_bindings" 1>&6
+test $use_alt_bindings != no && cat >> confdefs.h <<\EOF
+#define EXP_ALT_BINDINGS 1
+EOF
+
+
 echo $ac_n "checking if you want to use extended HTML DTD logic""... $ac_c" 1>&6
-echo "configure:7214: checking if you want to use extended HTML DTD logic" >&5
+echo "configure:10846: checking if you want to use extended HTML DTD logic" >&5
 
 # Check whether --enable-extended-dtd or --disable-extended-dtd was given.
 if test "${enable_extended_dtd+set}" = set; then
@@ -7233,8 +10865,32 @@ test $use_ext_htmldtd = "no" && cat >> confdefs.h <<\EOF
 EOF
 
 
+echo $ac_n "checking if partial-display should be used""... $ac_c" 1>&6
+echo "configure:10870: checking if partial-display should be used" >&5
+
+# Check whether --enable-partial or --disable-partial was given.
+if test "${enable_partial+set}" = set; then
+  enableval="$enable_partial"
+  test "$enableval" != no && enableval=yes
+  if test "$enableval" != "yes" ; then
+    use_partial_display=$enableval 
+  else
+    use_partial_display=yes
+  fi
+else
+  enableval=yes 
+  use_partial_display=yes
+  
+fi
+
+echo "$ac_t""$use_partial_display" 1>&6
+test $use_partial_display != no && cat >> confdefs.h <<\EOF
+#define DISP_PARTIAL 1
+EOF
+
+
 echo $ac_n "checking if you want to use external commands""... $ac_c" 1>&6
-echo "configure:7238: checking if you want to use external commands" >&5
+echo "configure:10894: checking if you want to use external commands" >&5
 
 # Check whether --enable-externs or --disable-externs was given.
 if test "${enable_externs+set}" = set; then
@@ -7258,7 +10914,7 @@ EOF
 
 
 echo $ac_n "checking if you want to use setfont support""... $ac_c" 1>&6
-echo "configure:7262: checking if you want to use setfont support" >&5
+echo "configure:10918: checking if you want to use setfont support" >&5
 
 # Check whether --enable-font-switch or --disable-font-switch was given.
 if test "${enable_font_switch+set}" = set; then
@@ -7281,8 +10937,65 @@ test $use_setfont = yes && cat >> confdefs.h <<\EOF
 EOF
 
 
+echo $ac_n "checking if you want cgi-link support""... $ac_c" 1>&6
+echo "configure:10942: checking if you want cgi-link support" >&5
+
+# Check whether --enable-cgi-links or --disable-cgi-links was given.
+if test "${enable_cgi_links+set}" = set; then
+  enableval="$enable_cgi_links"
+  test "$enableval" != yes && enableval=no
+  if test "$enableval" != "no" ; then
+    cat >> confdefs.h <<\EOF
+#define LYNXCGI_LINKS 1
+EOF
+ 
+  fi
+else
+  enableval=no   
+fi
+
+echo "$ac_t""$enableval" 1>&6
+
+echo $ac_n "checking if you want exec-links support""... $ac_c" 1>&6
+echo "configure:10961: checking if you want exec-links support" >&5
+
+# Check whether --enable-exec-links or --disable-exec-links was given.
+if test "${enable_exec_links+set}" = set; then
+  enableval="$enable_exec_links"
+  test "$enableval" != yes && enableval=no
+  if test "$enableval" != "no" ; then
+    cat >> confdefs.h <<\EOF
+#define EXEC_LINKS 1
+EOF
+ 
+  fi
+else
+  enableval=no   
+fi
+
+echo "$ac_t""$enableval" 1>&6
+
+echo $ac_n "checking if you want exec-scripts support""... $ac_c" 1>&6
+echo "configure:10980: checking if you want exec-scripts support" >&5
+
+# Check whether --enable-exec-scripts or --disable-exec-scripts was given.
+if test "${enable_exec_scripts+set}" = set; then
+  enableval="$enable_exec_scripts"
+  test "$enableval" != yes && enableval=no
+  if test "$enableval" != "no" ; then
+    cat >> confdefs.h <<\EOF
+#define EXEC_SCRIPTS 1
+EOF
+ 
+  fi
+else
+  enableval=no   
+fi
+
+echo "$ac_t""$enableval" 1>&6
+
 echo $ac_n "checking if you want internal-links feature""... $ac_c" 1>&6
-echo "configure:7286: checking if you want internal-links feature" >&5
+echo "configure:10999: checking if you want internal-links feature" >&5
 
 # Check whether --enable-internal-links or --disable-internal-links was given.
 if test "${enable_internal_links+set}" = set; then
@@ -7306,7 +11019,7 @@ EOF
 
 
 echo $ac_n "checking if you want to fork NSL requests""... $ac_c" 1>&6
-echo "configure:7310: checking if you want to fork NSL requests" >&5
+echo "configure:11023: checking if you want to fork NSL requests" >&5
 
 # Check whether --enable-nsl-fork or --disable-nsl-fork was given.
 if test "${enable_nsl_fork+set}" = set; then
@@ -7329,8 +11042,56 @@ test $use_nsl_fork = yes && cat >> confdefs.h <<\EOF
 EOF
 
 
+echo $ac_n "checking if you want to log URL requests via syslog""... $ac_c" 1>&6
+echo "configure:11047: checking if you want to log URL requests via syslog" >&5
+
+# Check whether --enable-syslog or --disable-syslog was given.
+if test "${enable_syslog+set}" = set; then
+  enableval="$enable_syslog"
+  test "$enableval" != yes && enableval=no
+  if test "$enableval" != "no" ; then
+    use_syslog=yes 
+  else
+    use_syslog=no
+  fi
+else
+  enableval=no 
+  use_syslog=no
+  
+fi
+
+echo "$ac_t""$use_syslog" 1>&6
+test $use_syslog = yes && cat >> confdefs.h <<\EOF
+#define SYSLOG_REQUESTED_URLS 1
+EOF
+
+
+echo $ac_n "checking if persistent-cookie logic should be used""... $ac_c" 1>&6
+echo "configure:11071: checking if persistent-cookie logic should be used" >&5
+
+# Check whether --enable-persistent-cookies or --disable-persistent-cookies was given.
+if test "${enable_persistent_cookies+set}" = set; then
+  enableval="$enable_persistent_cookies"
+  test "$enableval" != yes && enableval=no
+  if test "$enableval" != "no" ; then
+    use_filed_cookies=$enableval 
+  else
+    use_filed_cookies=yes
+  fi
+else
+  enableval=no 
+  use_filed_cookies=yes
+  
+fi
+
+echo "$ac_t""$use_filed_cookies" 1>&6
+test $use_filed_cookies != no && cat >> confdefs.h <<\EOF
+#define EXP_PERSISTENT_COOKIES 1
+EOF
+
+
 echo $ac_n "checking if you want to underline links""... $ac_c" 1>&6
-echo "configure:7334: checking if you want to underline links" >&5
+echo "configure:11095: checking if you want to underline links" >&5
 
 # Check whether --enable-underlines or --disable-underlines was given.
 if test "${enable_underlines+set}" = set; then
@@ -7353,8 +11114,37 @@ test $use_underline = yes && cat >> confdefs.h <<\EOF
 EOF
 
 
+echo $ac_n "checking if help files should be gzip'ed""... $ac_c" 1>&6
+echo "configure:11119: checking if help files should be gzip'ed" >&5
+
+# Check whether --enable-gzip-help or --disable-gzip-help was given.
+if test "${enable_gzip_help+set}" = set; then
+  enableval="$enable_gzip_help"
+  test "$enableval" != yes && enableval=no
+  if test "$enableval" != "no" ; then
+    use_gzip_help=$enableval 
+  else
+    use_gzip_help=no
+  fi
+else
+  enableval=no 
+  use_gzip_help=no
+  
+fi
+
+echo "$ac_t""$use_gzip_help" 1>&6
+
+COMPRESS_PROG=
+COMPRESS_EXT=
+if test $use_gzip_help = yes ; then
+	COMPRESS_PROG=$ac_cv_path_GZIP
+	COMPRESS_EXT=.gz
+fi
+
+
+
 echo $ac_n "checking if you want to use zlib for decompression of some gzip files""... $ac_c" 1>&6
-echo "configure:7358: checking if you want to use zlib for decompression of some gzip files" >&5
+echo "configure:11148: 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
@@ -7371,12 +11161,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:7375: checking for gzopen" >&5
+echo "configure:11165: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:11193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gzopen=yes"
 else
@@ -7419,17 +11209,17 @@ else
 
 		cf_save_LIBS="$LIBS"
 		echo $ac_n "checking for gzopen in -lz""... $ac_c" 1>&6
-echo "configure:7423: checking for gzopen in -lz" >&5
+echo "configure:11213: checking for gzopen in -lz" >&5
 		LIBS="-lz $LIBS"
 		cat > conftest.$ac_ext <
 int main() {
 gzopen("name","mode")
 ; return 0; }
 EOF
-if { (eval echo configure:7433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:11223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 			 cf_cv_have_lib_z=yes
@@ -7456,17 +11246,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:7460: checking for -lz in $cf_libdir" >&5
+echo "configure:11250: checking for -lz in $cf_libdir" >&5
 				LIBS="-L$cf_libdir -lz $cf_save_LIBS"
 				cat > conftest.$ac_ext <
 int main() {
 gzopen("name","mode")
 ; return 0; }
 EOF
-if { (eval echo configure:7470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:11260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
 			 		 cf_cv_have_lib_z=yes
@@ -7491,7 +11281,7 @@ if test $cf_cv_have_lib_z = no ; then
 fi
 case $host_os in #(vi
 linux*) # Suse Linux does not follow /usr/lib convention
-	z="$z /lib"
+	LIBS="$LIBS -L/lib"
 	;;
 esac
 
@@ -7501,13 +11291,109 @@ EOF
 
 fi
 
+echo $ac_n "checking if you want to exclude FINGER code""... $ac_c" 1>&6
+echo "configure:11296: checking if you want to exclude FINGER code" >&5
+
+# Check whether --enable-finger or --disable-finger was given.
+if test "${enable_finger+set}" = set; then
+  enableval="$enable_finger"
+  test "$enableval" != no && enableval=yes
+  if test "$enableval" != "yes" ; then
+    use_finger=yes 
+  else
+    use_finger=no
+  fi
+else
+  enableval=yes 
+  use_finger=no
+  
+fi
+
+echo "$ac_t""$use_finger" 1>&6
+test $use_finger != "no" && cat >> confdefs.h <<\EOF
+#define DISABLE_FINGER 1
+EOF
+
+
+echo $ac_n "checking if you want to exclude GOPHER code""... $ac_c" 1>&6
+echo "configure:11320: checking if you want to exclude GOPHER code" >&5
+
+# Check whether --enable-gopher or --disable-gopher was given.
+if test "${enable_gopher+set}" = set; then
+  enableval="$enable_gopher"
+  test "$enableval" != no && enableval=yes
+  if test "$enableval" != "yes" ; then
+    use_gopher=yes 
+  else
+    use_gopher=no
+  fi
+else
+  enableval=yes 
+  use_gopher=no
+  
+fi
+
+echo "$ac_t""$use_gopher" 1>&6
+test $use_gopher != "no" && cat >> confdefs.h <<\EOF
+#define DISABLE_GOPHER 1
+EOF
+
+
+echo $ac_n "checking if you want to exclude NEWS code""... $ac_c" 1>&6
+echo "configure:11344: checking if you want to exclude NEWS code" >&5
+
+# Check whether --enable-news or --disable-news was given.
+if test "${enable_news+set}" = set; then
+  enableval="$enable_news"
+  test "$enableval" != no && enableval=yes
+  if test "$enableval" != "yes" ; then
+    use_news=yes 
+  else
+    use_news=no
+  fi
+else
+  enableval=yes 
+  use_news=no
+  
+fi
+
+echo "$ac_t""$use_news" 1>&6
+test $use_news != "no" && cat >> confdefs.h <<\EOF
+#define DISABLE_NEWS 1
+EOF
+
+
+echo $ac_n "checking if you want to exclude FTP code""... $ac_c" 1>&6
+echo "configure:11368: checking if you want to exclude FTP code" >&5
+
+# Check whether --enable-ftp or --disable-ftp was given.
+if test "${enable_ftp+set}" = set; then
+  enableval="$enable_ftp"
+  test "$enableval" != no && enableval=yes
+  if test "$enableval" != "yes" ; then
+    use_ftp=yes 
+  else
+    use_ftp=no
+  fi
+else
+  enableval=yes 
+  use_ftp=no
+  
+fi
+
+echo "$ac_t""$use_ftp" 1>&6
+test $use_ftp != "no" && cat >> confdefs.h <<\EOF
+#define DISABLE_FTP 1
+EOF
+
+
 
 
 
 # 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:7511: checking if directory-editor code should be used" >&5
+echo "configure:11397: 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
@@ -7533,7 +11419,7 @@ EOF
 
 
 	echo $ac_n "checking if you wish to allow extracting from archives via DirEd""... $ac_c" 1>&6
-echo "configure:7537: checking if you wish to allow extracting from archives via DirEd" >&5
+echo "configure:11423: 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
@@ -7552,7 +11438,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:7556: checking if you wish to allow users to redefine DirEd keys" >&5
+echo "configure:11442: 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
@@ -7578,7 +11464,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:7582: checking if you wish to allow permissions commands via DirEd" >&5
+echo "configure:11468: 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
@@ -7604,7 +11490,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:7608: checking if you wish to allow executable-permission commands via DirEd" >&5
+echo "configure:11494: 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
@@ -7623,7 +11509,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:7627: checking if you wish to allow "tar" commands from DirEd" >&5
+echo "configure:11513: 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
@@ -7649,7 +11535,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:7653: checking if you wish to allow "uudecode" commands from DirEd" >&5
+echo "configure:11539: 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
@@ -7675,7 +11561,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:7679: checking if you wish to allow "zip" and "unzip" commands from DirEd" >&5
+echo "configure:11565: 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
@@ -7701,7 +11587,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:7705: checking if you wish to allow "gzip" and "gunzip" commands from DirEd" >&5
+echo "configure:11591: 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
@@ -7728,7 +11614,7 @@ fi
 fi
 
 echo $ac_n "checking if you want long-directory listings""... $ac_c" 1>&6
-echo "configure:7732: checking if you want long-directory listings" >&5
+echo "configure:11618: 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
@@ -7754,7 +11640,7 @@ fi
 echo "$ac_t""$enableval" 1>&6
 
 echo $ac_n "checking if parent-directory references are permitted""... $ac_c" 1>&6
-echo "configure:7758: checking if parent-directory references are permitted" >&5
+echo "configure:11644: 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
@@ -7772,17 +11658,64 @@ fi
 
 echo "$ac_t""$enableval" 1>&6
 
+
+echo $ac_n "checking if we can include termio.h with curses""... $ac_c" 1>&6
+echo "configure:11664: checking if we can include termio.h with curses" >&5
+if eval "test \"`echo '$''{'cf_cv_termio_and_curses'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+    cf_save_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -DHAVE_CONFIG_H -I. -I${srcdir-.} -I${srcdir-.}/src -I${srcdir-.}/WWW/Library/Implementation"
+    touch lynx_cfg.h
+    cat > conftest.$ac_ext <
+#include 
+int main() {
+putchar(0x0a)
+; return 0; }
+EOF
+if { (eval echo configure:11682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  cf_cv_termio_and_curses=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cf_cv_termio_and_curses=no
+fi
+rm -f conftest*
+    CFLAGS="$cf_save_CFLAGS"
+    rm -f lynx_cfg.h
+
+fi
+
+echo "$ac_t""$cf_cv_termio_and_curses" 1>&6
+
+test $cf_cv_termio_and_curses = yes && cat >> confdefs.h <<\EOF
+#define TERMIO_AND_CURSES 1
+EOF
+
+
+
 ### Finally, build config.h and the makefiles
 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
 srcdir="$srcdir"
 SRCDIR_CLEAN="#"
 if test -n "$srcdir" ; then
 	echo srcdir is $srcdir
-	sh $srcdir/mkdirs.sh WWW/Library/unix
-	sh $srcdir/mkdirs.sh src/chrtrans
+	${CONFIG_SHELL-/bin/sh} $srcdir/mkdirs.sh WWW/Library/Implementation
+	${CONFIG_SHELL-/bin/sh} $srcdir/mkdirs.sh src/chrtrans
+	test "$USE_INCLUDED_LIBINTL" = yes && $srcdir/mkdirs.sh intl
 	test "$srcdir" != "." && SRCDIR_CLEAN=""
 fi
 
+test -z "$CONFIG_SHELL" && CONFIG_SHELL=/bin/sh
+
+
 
 trap '' 1 2 15
 cat > confcache <<\EOF
@@ -7807,7 +11740,7 @@ EOF
 # Ultrix sh set writes to stderr and can't be redirected directly,
 # and sets the high bit in the cache file unless we assign to the vars.
 (set) 2>&1 |
-  case `(ac_space=' '; set) 2>&1 | grep '^ac_space='` in
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
   *ac_space=\ *)
     # `set' does not quote correctly, so add quotes (double-quote substitution
     # turns \\\\ into \\, and sed turns \\ into \).
@@ -7874,7 +11807,7 @@ do
     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.12.971230"
+    echo "$CONFIG_STATUS generated by autoconf version 2.13.19990117"
     exit 0 ;;
   -help | --help | --hel | --he | --h)
     echo "\$ac_cs_usage"; exit 0 ;;
@@ -7886,10 +11819,11 @@ ac_given_srcdir=$srcdir
 ac_given_INSTALL="$INSTALL"
 
 trap 'rm -fr `echo "makefile \
-	WWW/Library/unix/makefile \
+	WWW/Library/Implementation/makefile \
 	src/makefile \
 	src/chrtrans/makefile \
- lynx_cfg.h:config.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+	$SUB_MAKEFILE
+	 lynx_cfg.h:config.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF
 $ac_vpsub
 $extrasub
+s%@SHELL@%$SHELL%g
 s%@CFLAGS@%$CFLAGS%g
 s%@CPPFLAGS@%$CPPFLAGS%g
 s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
 s%@DEFS@%$DEFS%g
 s%@LDFLAGS@%$LDFLAGS%g
 s%@LIBS@%$LIBS%g
@@ -7928,16 +11864,43 @@ s%@CC@%$CC%g
 s%@CPP@%$CPP%g
 s%@RANLIB@%$RANLIB%g
 s%@SET_MAKE@%$SET_MAKE%g
-s%@make_include_left@%$make_include_left%g
-s%@make_include_right@%$make_include_right%g
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
 s%@LINT@%$LINT%g
 s%@ECHO_LD@%$ECHO_LD%g
 s%@RULE_CC@%$RULE_CC%g
 s%@SHOW_CC@%$SHOW_CC%g
 s%@ECHO_CC@%$ECHO_CC%g
+s%@DONT_ECHO_CC@%$DONT_ECHO_CC%g
 s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
+s%@ALLOCA@%$ALLOCA%g
+s%@USE_NLS@%$USE_NLS%g
+s%@MSGFMT@%$MSGFMT%g
+s%@GMSGFMT@%$GMSGFMT%g
+s%@XGETTEXT@%$XGETTEXT%g
+s%@GENCAT@%$GENCAT%g
+s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
+s%@CATALOGS@%$CATALOGS%g
+s%@CATOBJEXT@%$CATOBJEXT%g
+s%@DATADIRNAME@%$DATADIRNAME%g
+s%@GMOFILES@%$GMOFILES%g
+s%@INSTOBJEXT@%$INSTOBJEXT%g
+s%@INTLDEPS@%$INTLDEPS%g
+s%@INTLLIBS@%$INTLLIBS%g
+s%@INTLOBJS@%$INTLOBJS%g
+s%@POFILES@%$POFILES%g
+s%@POSUB@%$POSUB%g
+s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
+s%@GT_NO@%$GT_NO%g
+s%@GT_YES@%$GT_YES%g
+s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
+s%@l@%$l%g
+s%@NLS_DATADIR@%$NLS_DATADIR%g
+s%@USE_OUR_MESSAGES@%$USE_OUR_MESSAGES%g
+s%@INTLDIR_CPPFLAGS@%$INTLDIR_CPPFLAGS%g
+s%@INTLDIR_MAKE@%$INTLDIR_MAKE%g
+s%@MSG_DIR_MAKE@%$MSG_DIR_MAKE%g
 s%@CHMOD@%$CHMOD%g
 s%@COMPRESS@%$COMPRESS%g
 s%@COPY@%$COPY%g
@@ -7949,12 +11912,19 @@ s%@TAR@%$TAR%g
 s%@TOUCH@%$TOUCH%g
 s%@UNCOMPRESS@%$UNCOMPRESS%g
 s%@UNZIP@%$UNZIP%g
+s%@BZIP2@%$BZIP2%g
 s%@UUDECODE@%$UUDECODE%g
 s%@ZCAT@%$ZCAT%g
 s%@ZIP@%$ZIP%g
+s%@TELNET@%$TELNET%g
+s%@TN3270@%$TN3270%g
+s%@RLOGIN@%$RLOGIN%g
 s%@PROG_EXT@%$PROG_EXT%g
 s%@LIBOBJS@%$LIBOBJS%g
 s%@INSTALL_LSS@%$INSTALL_LSS%g
+s%@COMPRESS_PROG@%$COMPRESS_PROG%g
+s%@COMPRESS_EXT@%$COMPRESS_EXT%g
+s%@CONFIG_SHELL@%$CONFIG_SHELL%g
 s%@SRCDIR_CLEAN@%$SRCDIR_CLEAN%g
 
 CEOF
@@ -7998,10 +11968,11 @@ EOF
 cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -8173,10 +12144,26 @@ EOF
 cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF
 # Extra commands, if any
 
+	if test "$USE_NLS" = yes ; then
+	if test "$use_our_messages" = yes ; then
+		echo creating po/makefile
+		rm -f	po/temp$$
+		sed	-e 's@^.*LYMessages.c@../LYMessages.c@' \
+			-e '$s/\\//' po/POTFILES >po/temp$$
+		sed	-e "/POTFILES =/r po/temp$$" \
+			po/makefile.in > po/makefile
+		rm -f	po/temp$$
+	fi
+	fi
+	
 exit 0
 EOF
 chmod +x $CONFIG_STATUS
diff --git a/gnu/usr.bin/lynx/configure.in b/gnu/usr.bin/lynx/configure.in
index 3d6d8cd879b..d41ebbf1828 100644
--- a/gnu/usr.bin/lynx/configure.in
+++ b/gnu/usr.bin/lynx/configure.in
@@ -4,11 +4,17 @@ dnl by T.E.Dickey 
 dnl and Jim Spath 
 
 AC_PREREQ(2.12)
+rm -f config.cache
+
 AC_INIT(userdefs.h)
 AC_CONFIG_HEADER(lynx_cfg.h:config.hin)
 
+CF_CHECK_CACHE
+
+dnl Set of available languages (based on source distribution)
+test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
+
 AC_PREFIX_DEFAULT(/usr/local)
-AC_CANONICAL_HOST
 
 dnl --------------------------------------------------------------------------
 dnl Checks for location of programs
@@ -18,10 +24,12 @@ AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_RANLIB
 AC_PROG_MAKE_SET
-CF_MAKE_INCLUDE
 AC_PROG_INSTALL
 AC_CHECK_PROGS(LINT, lint alint lclint tdlint, [])
 
+AC_AIX
+AC_ISC_POSIX
+
 dnl --------------------------------------------------------------------------
 dnl Debug/development/test
 dnl --------------------------------------------------------------------------
@@ -31,6 +39,14 @@ Development Options:)
 
 CF_DISABLE_ECHO
 
+# special case for WWW/*
+if test -n "$ECHO_CC" ; then
+	DONT_ECHO_CC="$SHOW_CC ;"
+else
+	DONT_ECHO_CC=''
+fi
+AC_SUBST(DONT_ECHO_CC)
+
 AC_MSG_CHECKING(if you want to check memory-leaks)
 CF_ARG_ENABLE(find-leaks,
 	[  --enable-find-leaks     logic for testing memory leaks],
@@ -41,7 +57,7 @@ test "$with_leak_checks" = "yes" && AC_DEFINE(LY_FIND_LEAKS)
 
 AC_MSG_CHECKING(if you want to enable debug-code)
 CF_ARG_ENABLE(debug,
-	[  --enable-debug          logic for traces/debugging],
+	[  --enable-debug          logic for object code debugging],
 	[with_debug=yes],
 	[with_debug=no])
 AC_MSG_RESULT($with_debug)
@@ -56,16 +72,23 @@ if test "$with_debug" = "yes" ; then
 	esac
 else
 	case $host_os in
-	ultrix*|osf*) #(vi
+	osf*) #(vi
+		test -z "$GCC" && CFLAGS="$CFLAGS -std1"
 		CF_STRIP_G_OPT(CFLAGS)
 		;;
 	*)
-			CF_STRIP_G_OPT(CFLAGS)
+		CF_STRIP_G_OPT(CFLAGS)
 		;;
 	esac
 fi
 
-
+AC_MSG_CHECKING(if you want to enable lynx trace code *recommended* )
+CF_ARG_DISABLE(trace,
+	[  --disable-trace         disable logic for trace code],
+	[with_trace=$enableval],
+	[with_trace=yes])
+AC_MSG_RESULT($with_trace)
+test $with_trace = no && AC_DEFINE(NO_LYNX_TRACE)
 
 if test -n "$GCC"
 then
@@ -88,12 +111,84 @@ dnl --------------------------------------------------------------------------
 CF_HELP_MESSAGE(
 Basic Configuration Options:)
 
+dnl internationalization macros
+AM_GNU_GETTEXT
+
+CF_WITH_PATH(nls-datadir,
+[  --with-nls-datadir=DIR  NLS data, parent of locale],
+NLS_DATADIR,
+[PREFIX/DATADIR],
+[$prefix/$DATADIRNAME])
+
+INTLDIR_CPPFLAGS="#"
+INTLDIR_MAKE=
+MSG_DIR_MAKE=
+SUB_MAKEFILE=
+CF_OUR_MESSAGES
+if test "$USE_INCLUDED_LIBINTL" = yes ; then
+        if test "$nls_cv_force_use_gnu_gettext" = yes ; then
+		AC_MSG_WARN(Using included gettext anyway[,] since none was found)
+		SUB_MAKEFILE="intl/makefile"
+	else
+		INTLDIR_MAKE="#"
+	fi
+	if test $use_our_messages = no ; then
+		MSG_DIR_MAKE="#"
+		SUB_MAKEFILE=
+	fi
+	if test "$use_our_messages" = yes ; then
+		SUB_MAKEFILE="$SUB_MAKEFILE po/makefile.in:po/makefile.inn"
+	else
+		MSG_DIR_MAKE="#"
+	fi
+elif test "$USE_NLS" = yes ; then
+	AC_CHECK_HEADERS(libintl.h)
+	INTLDIR_MAKE="#"
+	SUB_MAKEFILE="po/makefile.in:po/makefile.inn"
+else
+	INTLDIR_MAKE="#"
+	MSG_DIR_MAKE="#"
+fi
+
+dnl We might want to use a preinstalled message library rather than the one
+dnl which is bundled with this program.
+if test -z "$MSG_DIR_MAKE" ; then
+	if test $use_our_messages = no ; then
+		MSG_DIR_MAKE="#"
+		SUB_MAKEFILE=
+	fi
+fi
+
+if test -z "$INTLDIR_MAKE" ; then
+	INTLDIR_CPPFLAGS=
+fi
+
+AC_SUBST(INTLDIR_CPPFLAGS)
+AC_SUBST(INTLDIR_MAKE)
+AC_SUBST(MSG_DIR_MAKE)
+
+dnl FIXME:  the underlying AM_GNU_GETTEXT macro either needs some fixes or a
+dnl little documentation.  It doesn't define anything so that we can ifdef our
+dnl own code, except ENABLE_NLS, which is too vague to be of any use.
+
+if test "$USE_INCLUDED_LIBINTL" = yes ; then
+	if test "$nls_cv_force_use_gnu_gettext" = yes ; then
+		AC_DEFINE(HAVE_GETTEXT)
+	elif test "$nls_cv_use_gnu_gettext" = yes ; then
+		AC_DEFINE(HAVE_GETTEXT)
+	fi
+	if test -n "$nls_cv_header_intl" ; then
+		AC_DEFINE(HAVE_LIBINTL_H)
+	fi
+fi
+
 AC_MSG_CHECKING(if you want full utility pathnames)
 CF_ARG_DISABLE(full-paths,
 	[  --disable-full-paths    control whether full utility pathnames are used],
 	[with_full_paths=no],
 	[with_full_paths=yes])
 AC_MSG_RESULT($with_full_paths)
+test $with_full_paths = no && AC_DEFINE(USE_EXECVP)
 
 CF_DEFINE_PROG(system mailer, SYSTEM_MAIL,
 	/usr/mmdf/bin/submit \
@@ -113,9 +208,13 @@ CF_PATH_PROG(TAR,	tar)
 CF_PATH_PROG(TOUCH,	touch)
 CF_PATH_PROG(UNCOMPRESS,gunzip)
 CF_PATH_PROG(UNZIP,	unzip)
+CF_PATH_PROG(BZIP2,	bzip2)
 CF_PATH_PROG(UUDECODE,	uudecode)
 CF_PATH_PROG(ZCAT,	zcat)
 CF_PATH_PROG(ZIP,	zip)
+CF_PATH_PROG(TELNET,	telnet)
+CF_PATH_PROG(TN3270,	tn3270)
+CF_PATH_PROG(RLOGIN,	rlogin)
 
 dnl 'INSTALL' is a special case, since the configure script has to find a
 dnl BSD-compatible one so the build/install works properly.
@@ -142,19 +241,20 @@ AC_C_CONST
 
 dnl Only add to this case statement things that we cannot design tests for.
 PROG_EXT=
+TRY_CFLAGS=
 case $host_os in
 aix4*)
-	CFLAGS="$CFLAGS -DAIX4 -D_BSD=44" 
+	CFLAGS="$CFLAGS -DAIX4 -D_BSD=44 -D_AIX"
 	LIBS="$LIBS -lbsd"
 	;;
 aix*)
 	LIBS="$LIBS -lbsd"
 	;;
 apollo*)
-	CFLAGS="$CFLAGS -D_BUILTINS -W0,-opt,4"
+	TRY_CFLAGS="$TRY_CFLAGS -D_BUILTINS -W0,-opt,4"
 	;;
 bsdi*)
-	CFLAGS="$CFLAGS -DBSDI" 
+	CFLAGS="$CFLAGS -DBSDI"
 	;;
 clix*)
 	# Tested on CLIX 3.1 (T.Dickey).  The original makefile entry
@@ -166,10 +266,11 @@ convex*)
 	CFLAGS="$CFLAGS -D__STDC__ -Dunix"
 	;;
 dgux*)
-	CFLAGS="$CFLAGS -DDGUX" 
+	CFLAGS="$CFLAGS -DDGUX"
 	;;
 hpux*)
-	CFLAGS="$CFLAGS -DSNAKE" 
+	CFLAGS="$CFLAGS -DSNAKE"
+	test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -Wp,-H600000"
 	;;
 isc*)
 	# -DPOSIX_JC is necessary, else LYBookmark.c never finds out what a mode_t is.
@@ -180,10 +281,10 @@ irix*)
 	# The original makefile used the $CFLAGS option -cckr for some form
 	# of K&R compatibility.  However, this causes compilation warnings for
 	# varargs on IRIX 5.2, and does not appear to be needed.
-	#removed: CFLAGS="$CFLAGS -cckr" 
+	#removed: CFLAGS="$CFLAGS -cckr"
 	;;
 linux*)
-	CFLAGS="$CFLAGS -DLINUX" 
+	CFLAGS="$CFLAGS -DLINUX"
 	;;
 next*)
 	CFLAGS="$CFLAGS -DNEXT -DXMOSAIC_HACK"
@@ -197,13 +298,18 @@ os2*)
 	LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed "s/-Zexe//g"`
 	PROG_EXT=".exe"
 	;;
+osf4*)
+	# The -Olimit flag (see below) is no longer available with
+	# Digital C 5.2, which is bundled with Digital UNIX 4.0.
+	CFLAGS="$CFLAGS -DDSYS5"
+	;;
 osf*)
 	# Increase the maximum size of functions that will be optimized.
-	test -z "$GCC" && CFLAGS="$CFLAGS -O -Olimit 4000"
+	test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -O -Olimit 4000"
 	CFLAGS="$CFLAGS -DDSYS5"
 	;;
 sco3.2v5*)
-	test $ac_cv_prog_gcc != yes && CC="cc -belf"
+	test $ac_cv_prog_gcc != yes && TRY_CFLAGS="$TRY_CFLAGS -belf"
 	;;
 sco*)
 	LIBS="$LIBS -lmalloc"
@@ -238,22 +344,56 @@ sunos4*)
 	;;
 ultrix*)
 	# Increase the maximum size of functions that will be optimized.
-	test -z "$GCC" && CFLAGS="$CFLAGS -O -Olimit 600 -G 7"
-	CFLAGS="$CFLAGS -DULTRIX" 
-	AC_CHECK_HEADERS(cursesX.h, cf_cv_ncurses_header=cursesX.h)
+	test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -O -Olimit 600 -G 7"
+	CFLAGS="$CFLAGS -DULTRIX"
+	AC_CHECK_HEADERS(cursesX.h,
+		[AC_DEFINE(HAVE_CURSESX_H)
+		 cf_cv_ncurses_header=cursesX.h])
 	;;
 esac
 AC_SUBST(PROG_EXT)
 
+dnl Collect tests for compiler options into one place
+if test -n "$TRY_CFLAGS" ; then
+	cf_save_CFLAGS="$CFLAGS"
+	CFLAGS="$CFLAGS $TRY_CFLAGS"
+	AC_MSG_CHECKING(if we should use compile options $TRY_CFLAGS)
+	AC_TRY_COMPILE([#include ],[FILE *fp = stdin],[cf_result=yes],[cf_result=no])
+	AC_MSG_RESULT($cf_result)
+	test "$cf_result" = no && CFLAGS="$cf_save_CFLAGS"
+fi
+
 dnl --------------------------------------------------------------------------
 dnl Checks for library configuration (added right-to-left)
 dnl --------------------------------------------------------------------------
 
-CF_NETLIBS
+### Look for network libraries first, since some functions (such as gethostname)
+### are used in a lot of places.
+AC_CACHE_CHECK(if you want socks library,cf_cv_use_libsocks,[
+AC_ARG_WITH(socks,
+	[  --with-socks[=path]     link with socks library if available],
+	[cf_cv_use_libsocks=$withval],
+	[cf_cv_use_libsocks=no])
+])
+
+AC_CACHE_CHECK(if you want socks5 library,cf_cv_use_libsocks5,[
+AC_ARG_WITH(socks5,
+	[  --with-socks5[=path]    link with socks5 library if available],
+	[cf_cv_use_libsocks5=$withval],
+	[cf_cv_use_libsocks5=no])
+])
+
+if test "x$cf_cv_use_libsocks" != xno ; then
+	CF_SOCKS($cf_cv_use_libsocks)
+elif test "x$cf_cv_use_libsocks5" != xno ; then
+	CF_SOCKS5($cf_cv_use_libsocks5)
+else
+	CF_NETLIBS
+fi
+CF_INET_ADDR
 
-AC_MSG_CHECKING(for screen type)
 dnl This has to be cached, since there's a lot of interdependent tests.
-AC_CACHE_VAL(cf_cv_screen,[
+AC_CACHE_CHECK(for screen type, cf_cv_screen,[
 AC_ARG_WITH(screen,
 [  --with-screen=XXX       select screen type
                           (XXX is curses (default), ncurses or slang)],
@@ -266,7 +406,6 @@ curses|ncurses|slang)
 	;;
 esac],
 	[cf_cv_screen=curses])])
-AC_MSG_RESULT($cf_cv_screen)
 
 if test $cf_cv_screen != ncurses ; then
 	if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" != set"; then
@@ -323,6 +462,10 @@ AC_CHECK_HEADERS( \
 )
 CF_TERMIO_AND_TERMIOS
 CF_FUNC_WAIT
+CF_VARARGS
+AC_TYPE_GETGROUPS
+AC_TYPE_PID_T
+AC_TYPE_UID_T
 AC_TYPE_MODE_T
 
 dnl --------------------------------------------------------------------------
@@ -337,9 +480,12 @@ AC_CHECK_FUNCS( \
 	cuserid \
 	getcwd \
 	getgroups \
+	gettimeofday \
+	popen \
 	putenv \
 	readdir \
 	strerror \
+	unsetenv \
 	waitpid \
 )
 AC_REPLACE_FUNCS( \
@@ -362,6 +508,9 @@ CF_LOCALE
 CF_NGROUPS
 CF_SYS_ERRLIST
 CF_UTMP
+CF_CHECK_EXTERN_DATA(h_errno,int)
+
+CF_EBCDIC
 
 ### These tests must be run after establishing the curses library.
 if test $cf_cv_screen != slang ; then
@@ -374,6 +523,7 @@ if test $cf_cv_screen != slang ; then
 	CF_TTYTYPE
 	AC_CHECK_FUNCS( \
 		cbreak \
+		define_key \
 		keypad \
 		use_default_colors \
 		wborder \
@@ -381,18 +531,43 @@ if test $cf_cv_screen != slang ; then
 fi
 
 dnl --------------------------------------------------------------------------
-dnl Miscellaneous options that don't need to test system features
+dnl Experimental options that don't need to test system features
 dnl --------------------------------------------------------------------------
 
 CF_HELP_MESSAGE(
-Miscellaneous Options:)
-
-AC_MSG_CHECKING(if experimental 8-bit case-conversion should be used)
-CF_ARG_ENABLE(8bit-toupper,
-[  --enable-8bit-toupper   use experimental 8-bit case-conversion],
-	[use_8bit_toupper=$enableval],
-	[use_8bit_toupper=no])
-test $use_8bit_toupper != no && AC_DEFINE(EXP_8BIT_TOUPPER)
+Experimental Options:)
+
+AC_MSG_CHECKING(if configuration info should be browsable)
+CF_ARG_DISABLE(config-info,
+[  --disable-config-info   disable browsable configuration-info],
+	[use_config_info=$enableval],
+	[use_config_info=yes])
+AC_MSG_RESULT($use_config_info)
+test $use_config_info = no && AC_DEFINE(NO_CONFIG_INFO)
+
+AC_MSG_CHECKING(if new-style forms-based options screen should be used)
+CF_ARG_DISABLE(forms-options,
+[  --disable-forms-options disable experimental forms-based options],
+	[use_forms_options=$enableval],
+	[use_forms_options=yes])
+AC_MSG_RESULT($use_forms_options)
+test $use_forms_options = no && AC_DEFINE(NO_OPTION_FORMS)
+
+AC_MSG_CHECKING(if old-style options menu should be used)
+CF_ARG_DISABLE(menu-options,
+[  --disable-menu-options  disable old-style option menu],
+	[use_menu_options=$enableval],
+	[use_menu_options=yes])
+AC_MSG_RESULT($use_menu_options)
+test $use_menu_options = no && AC_DEFINE(NO_OPTION_MENU)
+
+AC_MSG_CHECKING(if experimental address-list page should be used)
+CF_ARG_ENABLE(addrlist-page,
+[  --enable-addrlist-page  use experimental address-list page],
+	[use_addrlist_page=$enableval],
+	[use_addrlist_page=no])
+AC_MSG_RESULT($use_addrlist_page)
+test $use_addrlist_page != no && AC_DEFINE(EXP_ADDRLIST_PAGE)
 
 AC_MSG_CHECKING(if color-style code should be used)
 CF_ARG_ENABLE(color-style,
@@ -418,7 +593,7 @@ no)
 	;;
 *)
 	AC_DEFINE(USE_COLOR_STYLE)
-	AC_MSG_RESULT(curses-style)
+	AC_MSG_RESULT(yes)
 
 	AC_MSG_CHECKING(for location of style-sheet file)
 	LYNX_LSS_FILE=$cf_libdir/lynx.lss
@@ -443,6 +618,53 @@ AC_MSG_RESULT($use_dft_colors)
 test $use_dft_colors = "yes" && AC_DEFINE(USE_DEFAULT_COLORS)
 fi
 
+AC_MSG_CHECKING(if experimental keyboard-layout logic should be used)
+CF_ARG_ENABLE(kbd-layout,
+[  --enable-kbd-layout     use experimental keyboard-layout support],
+	[use_kbd_layout=$enableval],
+	[use_kbd_layout=no])
+AC_MSG_RESULT($use_kbd_layout)
+test $use_kbd_layout != no && AC_DEFINE(EXP_KEYBOARD_LAYOUT)
+
+dnl AC_MSG_CHECKING(if experimental JavaScript support should be used)
+dnl CF_ARG_ENABLE(libjs,
+dnl [  --enable-libjs          use experimental JavaScript support (Mozilla libjs)],
+dnl 	[use_libjs=$enableval],
+dnl 	[use_libjs=no])
+dnl AC_MSG_RESULT($use_libjs)
+dnl test $use_libjs != no && AC_DEFINE(EXP_LIBJS)
+
+AC_MSG_CHECKING(if html source should be colorized)
+CF_ARG_ENABLE(prettysrc,
+[  --enable-prettysrc      colorize HTML source],
+	[use_prettysrc=$enableval],
+	[use_prettysrc=no])
+AC_MSG_RESULT($use_prettysrc)
+test $use_prettysrc != no && AC_DEFINE(USE_PSRC)
+
+AC_MSG_CHECKING(if source caching should be used)
+CF_ARG_ENABLE(source-cache,
+[  --enable-source-cache   cache HTML source for parse mode changes],
+	[use_source_cache=$enableval],
+	[use_source_cache=no])
+AC_MSG_RESULT($use_source_cache)
+test $use_source_cache != no && AC_DEFINE(SOURCE_CACHE)
+
+dnl --------------------------------------------------------------------------
+dnl Miscellaneous options that don't need to test system features
+dnl --------------------------------------------------------------------------
+
+CF_HELP_MESSAGE(
+Miscellaneous Options:)
+
+AC_MSG_CHECKING(if alternative line-edit bindings should be used)
+CF_ARG_ENABLE(alt-bindings,
+[  --disable-alt-bindings  disable alternative line-edit bindings],
+	[use_alt_bindings=$enableval],
+	[use_alt_bindings=yes])
+AC_MSG_RESULT($use_alt_bindings)
+test $use_alt_bindings != no && AC_DEFINE(EXP_ALT_BINDINGS)
+
 AC_MSG_CHECKING(if you want to use extended HTML DTD logic)
 CF_ARG_DISABLE(extended-dtd,
 [  --disable-extended-dtd  disable extended HTML DTD logic],
@@ -451,6 +673,14 @@ CF_ARG_DISABLE(extended-dtd,
 AC_MSG_RESULT($use_ext_htmldtd)
 test $use_ext_htmldtd = "no" && AC_DEFINE(NO_EXTENDED_HTMLDTD)
 
+AC_MSG_CHECKING(if partial-display should be used)
+CF_ARG_DISABLE(partial,
+[  --disable-partial       use partial-display logic],
+	[use_partial_display=$enableval],
+	[use_partial_display=yes])
+AC_MSG_RESULT($use_partial_display)
+test $use_partial_display != no && AC_DEFINE(DISP_PARTIAL)
+
 AC_MSG_CHECKING(if you want to use external commands)
 CF_ARG_ENABLE(externs,
 [  --enable-externs        use external commands],
@@ -467,9 +697,27 @@ CF_ARG_ENABLE(font-switch,
 AC_MSG_RESULT($use_setfont)
 test $use_setfont = yes && AC_DEFINE(EXP_CHARTRANS_AUTOSWITCH)
 
+AC_MSG_CHECKING(if you want cgi-link support)
+CF_ARG_ENABLE(cgi-links,
+[  --enable-cgi-links      support cgi links w/o a http daemon],
+	[AC_DEFINE(LYNXCGI_LINKS)])
+AC_MSG_RESULT($enableval)
+
+AC_MSG_CHECKING(if you want exec-links support)
+CF_ARG_ENABLE(exec-links,
+[  --enable-exec-links     allow lynx to execute programs accessed via a link],
+	[AC_DEFINE(EXEC_LINKS)])
+AC_MSG_RESULT($enableval)
+
+AC_MSG_CHECKING(if you want exec-scripts support)
+CF_ARG_ENABLE(exec-scripts,
+[  --enable-exec-scripts   allow lynx to execute programs inferred from a link],
+	[AC_DEFINE(EXEC_SCRIPTS)])
+AC_MSG_RESULT($enableval)
+
 AC_MSG_CHECKING(if you want internal-links feature)
 CF_ARG_ENABLE(internal-links,
-[  --enable-internal-links  handle following links to same doc differently],
+[  --enable-internal-links handle following links to same doc differently],
 	[use_internal_links=yes],
 	[use_internal_links=no])
 AC_MSG_RESULT($use_internal_links)
@@ -483,6 +731,22 @@ CF_ARG_ENABLE(nsl-fork,
 AC_MSG_RESULT($use_nsl_fork)
 test $use_nsl_fork = yes && AC_DEFINE(NSL_FORK)
 
+AC_MSG_CHECKING(if you want to log URL requests via syslog)
+CF_ARG_ENABLE(syslog,
+[  --enable-syslog         log URL requests via syslog],
+	[use_syslog=yes],
+	[use_syslog=no])
+AC_MSG_RESULT($use_syslog)
+test $use_syslog = yes && AC_DEFINE(SYSLOG_REQUESTED_URLS)
+
+AC_MSG_CHECKING(if persistent-cookie logic should be used)
+CF_ARG_ENABLE(persistent-cookies,
+[  --disable-persistent-cookies  disable persistent-cookie support],
+	[use_filed_cookies=$enableval],
+	[use_filed_cookies=yes])
+AC_MSG_RESULT($use_filed_cookies)
+test $use_filed_cookies != no && AC_DEFINE(EXP_PERSISTENT_COOKIES)
+
 AC_MSG_CHECKING(if you want to underline links)
 CF_ARG_ENABLE(underlines,
 [  --enable-underlines     underline links rather than using boldface],
@@ -491,6 +755,22 @@ CF_ARG_ENABLE(underlines,
 AC_MSG_RESULT($use_underline)
 test $use_underline = yes && AC_DEFINE(UNDERLINE_LINKS)
 
+AC_MSG_CHECKING(if help files should be gzip'ed)
+CF_ARG_ENABLE(gzip-help,
+[  --enable-gzip-help      install gzip'ed help files],
+	[use_gzip_help=$enableval],
+	[use_gzip_help=no])
+AC_MSG_RESULT($use_gzip_help)
+
+COMPRESS_PROG=
+COMPRESS_EXT=
+if test $use_gzip_help = yes ; then
+	COMPRESS_PROG=$ac_cv_path_GZIP
+	COMPRESS_EXT=.gz
+fi
+AC_SUBST(COMPRESS_PROG)
+AC_SUBST(COMPRESS_EXT)
+
 AC_MSG_CHECKING(if you want to use zlib for decompression of some gzip files)
 AC_ARG_WITH(zlib,
 [  --with-zlib             use zlib for decompression of some gzip files],
@@ -506,6 +786,38 @@ if test ".$use_zlib" != ".no" ; then
 	AC_DEFINE(USE_ZLIB)
 fi
 
+AC_MSG_CHECKING(if you want to exclude FINGER code)
+CF_ARG_DISABLE(finger,
+[  --disable-finger        disable FINGER logic],
+	[use_finger=yes],
+	[use_finger=no])
+AC_MSG_RESULT($use_finger)
+test $use_finger != "no" && AC_DEFINE(DISABLE_FINGER)
+
+AC_MSG_CHECKING(if you want to exclude GOPHER code)
+CF_ARG_DISABLE(gopher,
+[  --disable-gopher        disable GOPHER logic],
+	[use_gopher=yes],
+	[use_gopher=no])
+AC_MSG_RESULT($use_gopher)
+test $use_gopher != "no" && AC_DEFINE(DISABLE_GOPHER)
+
+AC_MSG_CHECKING(if you want to exclude NEWS code)
+CF_ARG_DISABLE(news,
+[  --disable-news          disable NEWS logic],
+      [use_news=yes],
+      [use_news=no])
+AC_MSG_RESULT($use_news)
+test $use_news != "no" && AC_DEFINE(DISABLE_NEWS)
+
+AC_MSG_CHECKING(if you want to exclude FTP code)
+CF_ARG_DISABLE(ftp,
+[  --disable-ftp           disable FTP logic],
+      [use_ftp=yes],
+      [use_ftp=no])
+AC_MSG_RESULT($use_ftp)
+test $use_ftp != "no" && AC_DEFINE(DISABLE_FTP)
+
 dnl --------------------------------------------------------------------------
 dnl DirEd (directory-editor) options
 dnl --------------------------------------------------------------------------
@@ -517,7 +829,7 @@ Directory Editor Options:)
 # or modified at run time via DIRED_MENU symbols in lynx.cfg.
 AC_MSG_CHECKING(if directory-editor code should be used)
 CF_ARG_DISABLE(dired,
-[  --disable-dired          enable optional directory-editor, DirEd],
+[  --disable-dired          disable optional directory-editor, DirEd],
 	[use_dired=$enableval],
 	[use_dired=yes])
 AC_MSG_RESULT($use_dired)
@@ -579,21 +891,47 @@ CF_ARG_DISABLE(parent-dir-refs,
 	[AC_DEFINE(NO_PARENT_DIR_REFERENCE)])
 AC_MSG_RESULT($enableval)
 
+dnl --------------------------------------------------------------------------
+dnl Test features that rely on configure-definitions
+dnl --------------------------------------------------------------------------
+CF_TERMIO_AND_CURSES(LYCurses.h)
+
 ### Finally, build config.h and the makefiles
 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
 srcdir="$srcdir"
 SRCDIR_CLEAN="#"
 if test -n "$srcdir" ; then
 	echo srcdir is $srcdir
-	sh $srcdir/mkdirs.sh WWW/Library/unix
-	sh $srcdir/mkdirs.sh src/chrtrans
+	${CONFIG_SHELL-/bin/sh} $srcdir/mkdirs.sh WWW/Library/Implementation
+	${CONFIG_SHELL-/bin/sh} $srcdir/mkdirs.sh src/chrtrans
+	test "$USE_INCLUDED_LIBINTL" = yes && $srcdir/mkdirs.sh intl
 	test "$srcdir" != "." && SRCDIR_CLEAN=""
 fi
 
+test -z "$CONFIG_SHELL" && CONFIG_SHELL=/bin/sh
+AC_SUBST(CONFIG_SHELL)
+
 AC_SUBST(SRCDIR_CLEAN)
 AC_OUTPUT(
-	makefile \
-	WWW/Library/unix/makefile \
+	[makefile \
+	WWW/Library/Implementation/makefile \
 	src/makefile \
 	src/chrtrans/makefile \
+	$SUB_MAKEFILE
+	],[
+	if test "$USE_NLS" = yes ; then
+	if test "$use_our_messages" = yes ; then
+		echo creating po/makefile
+		rm -f	po/temp$$
+		sed	-e 's@^.*LYMessages.c@../LYMessages.c@' \
+			-e '$s/\\//' po/POTFILES >po/temp$$
+		sed	-e "/POTFILES =/r po/temp$$" \
+			po/makefile.in > po/makefile
+		rm -f	po/temp$$
+	fi
+	fi
+	],[
+	USE_NLS=$USE_NLS
+	use_our_messages=$use_our_messages
+	]
 )
diff --git a/gnu/usr.bin/lynx/descrip.mms b/gnu/usr.bin/lynx/descrip.mms
index 91dde18b1d6..21f2d69d5f1 100644
--- a/gnu/usr.bin/lynx/descrip.mms
+++ b/gnu/usr.bin/lynx/descrip.mms
@@ -97,12 +97,12 @@ lynx.exe : library exe
 library :
 	Set Default [.www.library.implementation]
 .ifdef DEC_C
-	$(MMS) /Description = [-.VMS]DESCRIP.MMS /Macro = ($(TCPM)=1, DEC_C=1) Library
+	$(MMS) $(MMSQUALIFIERS) /Description = [-.VMS]DESCRIP.MMS /Macro = ($(TCPM)=1, DEC_C=1) Library
 .else
 .ifdef GNU_C
-	$(MMS) /Description = [-.VMS]DESCRIP.MMS /Macro = ($(TCPM)=1, GNU_C=1) Library
+	$(MMS) $(MMSQUALIFIERS) /Description = [-.VMS]DESCRIP.MMS /Macro = ($(TCPM)=1, GNU_C=1) Library
 .else
-	$(MMS) /Description = [-.VMS]DESCRIP.MMS /Macro = ($(TCPM)=1) Library
+	$(MMS) $(MMSQUALIFIERS) /Description = [-.VMS]DESCRIP.MMS /Macro = ($(TCPM)=1) Library
 .endif
 .endif
 	Set Default [---]
@@ -110,12 +110,12 @@ library :
 exe :
 	Set Default [.src]
 .ifdef DEC_C
-	$(MMS) /Macro = ($(TCPM)=1, DEC_C=1) Lynx
+	$(MMS) $(MMSQUALIFIERS) /Macro = ($(TCPM)=1, DEC_C=1) Lynx
 .else
 .ifdef GNU_C
-	$(MMS) /Macro = ($(TCPM)=1, GNU_C=1) Lynx
+	$(MMS) $(MMSQUALIFIERS) /Macro = ($(TCPM)=1, GNU_C=1) Lynx
 .else
-	$(MMS) /Macro = ($(TCPM)=1) Lynx
+	$(MMS) $(MMSQUALIFIERS) /Macro = ($(TCPM)=1) Lynx
 .endif
 .endif
 	Copy /NoLog /NoConfirm lynx.exe [-]
@@ -124,9 +124,9 @@ exe :
 
 clean :
 	Set Default [.www.library.implementation]
-	$(MMS) /Description = [-.VMS]DESCRIP.MMS clean
+	$(MMS) $(MMSQUALIFIERS) /Description = [-.VMS]DESCRIP.MMS clean
 	Set Default [---]
 	Set Default [.src]
-	$(MMS) clean
+	$(MMS) $(MMSQUALIFIERS) clean
 	Set Default [-]
 	- Purge /NoLog /NoConfirm
diff --git a/gnu/usr.bin/lynx/docs/CHANGES2.3 b/gnu/usr.bin/lynx/docs/CHANGES2.3
index f9653d4e6ef..f1a480a2fd1 100644
--- a/gnu/usr.bin/lynx/docs/CHANGES2.3
+++ b/gnu/usr.bin/lynx/docs/CHANGES2.3
@@ -63,13 +63,13 @@
   not to work.  So HTTP redirection appears to work now!
 * Added Referer: header to HTTP requests to list the URL of
   the document listing the requsted URL.   Here's an extract from CERN:
-     This optional header field allows the client to specify, 
-     for the server's benefit, the address ( URI ) of the document 
-     (or element within the document) from which the URI in the 
-     request was obtained. 
+     This optional header field allows the client to specify,
+     for the server's benefit, the address ( URI ) of the document
+     (or element within the document) from which the URI in the
+     request was obtained.
 
-     This allows a server to generate lists of back-links to documents, 
-     for interest, logging, etc. It allows bad links to be traced 
+     This allows a server to generate lists of back-links to documents,
+     for interest, logging, etc.  It allows bad links to be traced
      for maintenance.
 
 2-8-94
@@ -140,7 +140,7 @@
   transfer to abort.  If there is a partial file to show, it
   will be shown.
 * Added command line option -show_curser.  If enabled the curser
-  will not be hidden in the right hand corner but will instead 
+  will not be hidden in the right hand corner but will instead
   be positioned at the start of the currently selected link.
   show curser is the default for systems without FANCY_CURSES
   capibilities, and the default configuration can be changed in
@@ -175,10 +175,10 @@
 -grey area-
 * Ability to FTP to VMS systems. (Foteos Macrides)
 * Fixed lots of display and interupt problems (Foteos Macrides)
-* The Lynx Bookmark file is now interpreted as an HTML document.  
+* The Lynx Bookmark file is now interpreted as an HTML document.
   Old Lynx bookmark files must be converted using the lynx2html
   program or deleted.
-* HTML+ forms as implemented by XMosaic now work. 
+* HTML+ forms as implemented by XMosaic now work.
   fill in the empty spaces and press the submit button to
   submit the form.
 * The TEXTAREA tag isn't done yet.  It will currently only
@@ -188,7 +188,7 @@
 * Incorporated WWWlib 2.14 and fixed up the descrip.mms files.
   Foteos Macrides made VMS port changes and wrote a really nice
   build.com script to make compilation on VMS systems really easy.
-  Foteos also ported Lynx to OpenVMS for alpha axp systems. 
+  Foteos also ported Lynx to OpenVMS for alpha axp systems.
 * 's' now means search a searchable indexed document through the
   server, and can no longer be used to search for strings within
   the displayed document.
@@ -214,14 +214,14 @@
 * '/' always means search within the document.
 
 -grey area-
-* still doing massive rewrite. Debugging!!
+* still doing massive rewrite.  Debugging!!
 
 11-30-93
 * anonymous users cannot change the bookmark page! (thanks to Jyrki Kuoppal for
   pointing out a security hole)
 
 -grey area-
-* massive rewrite.  Removed all Lynx internal format code and 
+* massive rewrite.  Removed all Lynx internal format code and
   restructured all the source files.
 
 11-8-93
@@ -259,7 +259,7 @@
 
 10-12-93
 * The users specified editor is now spawned for mail messages.
-  If no editor is defined or if the user is anonymous, the built-in 
+  If no editor is defined or if the user is anonymous, the built-in
   lynx mail sender is used.
 
 10-11-93
@@ -286,7 +286,7 @@
 * fixed coredump bug for some files with no links.
 
 9-3-93
-* Moved many configuration options including printer setup to 
+* Moved many configuration options including printer setup to
   lynx.cfg file.  The default placement of the lynx.cfg file
   will be /usr/local/lib & sys$public
 
@@ -298,7 +298,7 @@
 * Fixed bug with only one link selectable out of many on the last line
   of the display.
 * Ported to SVR4 courtesy of Nickolay Saukh (from Russia, Wow this is
-  really getting around!) 
+  really getting around!)
 * Uneditable documents don't get refetched. (Nickolay Saukh)
 * National language support through LOCALE
   (instead of ISOLATIN1), protected by #ifdef LOCALE (Nickolay Saukh)
@@ -324,7 +324,7 @@
 
 8-19-93
 * updated help and converted it to HTML.  Made a new help location and
-  server.  The new default help file is 
+  server.  The new default help file is
   http://kufacts.cc.ukans.edu/lynx_help/lynx_help_main.html
 
 8-15-93
@@ -339,10 +339,10 @@
 8-14-93
 * Added document reload command.  CTRL-R when pressed will reload
   the document into memory and redisplay it, clearing the screen.
-  This is very useful when editing documents, outside of Lynx while 
+  This is very useful when editing documents, outside of Lynx while
   using Lynx for rendering.
 * Added source view mode.  '\' when pressed will reload the document
-  and display the HTML source. (doesn't work for gopher directoryies right 
+  and display the HTML source. (doesn't work for gopher directoryies right
   now, but gopher isn't HTML anyways)
 * fixed bug in LibWWW that caused it not to be able to convert to
   www/source.
@@ -354,16 +354,16 @@
 
 ??-??-??
 * At some point I added the ability to edit HTML files on the local
-  machine.  
+  machine.
 
 8-12-93
 * Added Nested Lists, up to six levels, with different bullets
   for each level.
 * Due to the fact that nearly everyone seems to use P to mean
-  two returns within the same style, and Mosaic has been kind 
+  two returns within the same style, and Mosaic has been kind
   enough to support this meaning, :( :( :(  I have changed
   the P tag to reflect this interpretation.  P can be used
-  anywhere and will mean insert two returns.  (i.e. two BR tags)
+  anywhere and will mean insert two returns.  (i.e., two BR tags)
 
 8-11-93
 * Made the default Mime type for unknown file types on ftp servers
diff --git a/gnu/usr.bin/lynx/docs/CHANGES2.4 b/gnu/usr.bin/lynx/docs/CHANGES2.4
index 2d242e2e0f8..19221e36a20 100644
--- a/gnu/usr.bin/lynx/docs/CHANGES2.4
+++ b/gnu/usr.bin/lynx/docs/CHANGES2.4
@@ -349,7 +349,7 @@ Worked in mods from David Trueman (david@cs.dal.ca) - FM:
 * Fixed glitch in 'p'rint menu. - FM
 01-24-95
 * Enabled SOCKSification for any Unix flavor via the SITE-LYDEFS,
-  SITE-DEFS and SOCKSLIB definitions in the top-level Makefile. Added
+  SITE-DEFS and SOCKSLIB definitions in the top-level Makefile.  Added
   info in INSTALLATION on how to do it for VMS.  Included notes that you
   are better off building Lynx normally, and instead using a SOCKSified
   proxy server to get through a firewall. - FM
@@ -447,7 +447,7 @@ Worked in mods from David Trueman (david@cs.dal.ca) - FM:
   This allows you to set both LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE
   to TRUE and a single TRUSTED_EXEC rule that will always fail (e.g.,
   TRUSTED_EXEC:none), so that *ONLY* the lynxexec URL's in the jumps
-  file will be acted upon. - FM 
+  file will be acted upon. - FM
 * Disallow lynxexec URL's in G)oto if no_shell is set or if
   LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE is TRUE. - FM
 12-21-94
@@ -470,7 +470,7 @@ Worked in mods from David Trueman (david@cs.dal.ca) - FM:
 * Added possibility of logging URL access via syslog() on Unix (ifdef'd
   with LOGGING).
 * Improved and made more flexible the security for lynxexec URL's.  The
-  default behaviour is the same as now, but source locations and the path 
+  default behaviour is the same as now, but source locations and the path
   (Unix) or name (VMS) of programs to be executed can be restricted via
   TRUSTED_EXEC rules in the lynx.cfg file.
 * Convert ~ in lynxexec paths to $HOME on Unix.
@@ -544,7 +544,7 @@ Worked in mods from David Trueman (david@cs.dal.ca) - FM:
   files, and updated the instruction files. - FM
 12-09-94
 * Modifed PassesTest() in HTInit.c to avoid the overhead of system() calls
-  by using getenv() when   test -n "$DISPLAY"   and   test -z "$DISPLAY" 
+  by using getenv() when   test -n "$DISPLAY"   and   test -z "$DISPLAY"
   commands are encountered in the mailcap file.  Otherwise, needlessly
   expensive system() calls potentially could be made for virtually every
   viewer mapping in that file!.  For Lynx, those two strings in the mailcap
@@ -579,7 +579,7 @@ Worked in mods from David Trueman (david@cs.dal.ca) - FM:
   submissions of forms to servers (i.e., never use cache).  LYK_ACTIVATE
   (with default binding to right-arrow and RETURN) still fetches from cache
   if available.  Statusline help describes these commands when positioned
-  on a submit button. - FM  
+  on a submit button. - FM
 12-08-94
 * Fixed HText_submitForm() in GridText.c to handle submitting INPUT types
   (e.g., type="image") which have name/value pairs. - FM
@@ -599,7 +599,7 @@ Worked in mods from David Trueman (david@cs.dal.ca) - FM:
   These mods are also desireable for builds on Unix. - FM
 12-02-94
 * Fixed the query recall buffer in do_www_search() of GridText.c to restore
-  the +'s to spaces and unescape properly. - FM 
+  the +'s to spaces and unescape properly. - FM
 * Include file and define fix ups, for SOCKETSHR/NETLIB support and convex
   builds, in tcp.h, LYShowInfo.c and top level Makefile. - FM
 11-27-94
@@ -611,7 +611,7 @@ Worked in mods from David Trueman (david@cs.dal.ca) - FM:
 * Check -trace switch earlier in LYMain.c so that trace messages associated
   with setting up the Lynx configuration will actually be displayed. - GL
 11-23-94
-* More fix ups for the SOCKETSHR/NETLIB support. Close to "all set" but needs
+* More fix ups for the SOCKETSHR/NETLIB support.  Close to "all set" but needs
   more field testing with the full range of TCPIP packages for VMS. - FM
 * Added HP_TERMINAL define for the DIM workaround to the REVERSE problem with
   HP terminals.  If not defined, SNAKE builds will not make that substitution
diff --git a/gnu/usr.bin/lynx/docs/CHANGES2.5 b/gnu/usr.bin/lynx/docs/CHANGES2.5
index 38621df6c2f..6d2980ca605 100644
--- a/gnu/usr.bin/lynx/docs/CHANGES2.5
+++ b/gnu/usr.bin/lynx/docs/CHANGES2.5
@@ -9,7 +9,7 @@
   site-specific libraries associated with any site-specific patches. - FM
 * Fixed an unsigned char typecast in GridText.c - FM
 * Eliminated statusline and TRACE warnings about possibly strange formatting
-  when TABLEs are in a document. - FM 
+  when TABLEs are in a document. - FM
 05-01-96
 * Renamed Lynx2-4-FM for pre-release as Lynx2-5
 04-30-96
@@ -27,7 +27,7 @@
   Any execution links or form ACTIONs are permitted if obtained from
   documents in the realm, but any switches that restrict bookmark operations
   will still apply.  For example, -book -realm will use the bookmark file
-  as the startfile, and restrict URLs to files in the user's account. Adding
+  as the startfile, and restrict URLs to files in the user's account.  Adding
   -restrictions=bookmark_exec will block execution links in the bookmark
   file, but not in other files within the realm (i.e., in the user's
   account).  If the startfile is an http URL, the realm will be equivalent
@@ -229,7 +229,7 @@
    gopher://cegt201.bradley.edu:79/0/w%20davidh   or:
    finger://cegt201.bradley.edu/w/davidh          as URL.s - FM
 * Added LYK_INTERRUPT handling for the CSO/PH and finger gateways, and
-  made their memory management more efficient. - FM 
+  made their memory management more efficient. - FM
 * Made the my_spawn() function in LYLocal.c more portable by using
   waitpid() instead of wait(). - FM
 * Restored the Lynx2-3 behavior of seeking the current position and link
@@ -322,7 +322,7 @@
   or request will be dumped, and the submission or request will be made
   with the  "Pragma: no-cache"  and  "Cache-Control: no-cache"  headers
   included, to ensure that a proxy/cache server also will not return a
-  cached copy (assuming it respects either of those headers). - FM 
+  cached copy (assuming it respects either of those headers). - FM
 03-01-96
 * Converted the client-side image MAP code to a protocol which returns
   a stream, rather than using a temporary file.  This allows saving
@@ -740,7 +740,7 @@
   to the appropriate case before entering them into the anchor hash table
   or otherwise acting on them. - FM
 * Added ability to change the default reply to the "really quit" prompt
-  from "[Y]" to "[N]" via a compilation symbol in userdefs.h. - DT 
+  from "[Y]" to "[N]" via a compilation symbol in userdefs.h. - DT
 11-29-95
 * Added ALIGN attribute for HR (default is "center"). - FM
 11-28-95
@@ -913,7 +913,7 @@
   editor. - FM
 10-25-95
 * Handle all characters in strings for the new line editor as unsigned
-  so they don't go negative if 8-bit. - DW 
+  so they don't go negative if 8-bit. - DW
 * Restored proper handling of the MAXLENGTH attribute in INPUTs for
   strings entered with the new line editor. - FM
 10-24-95
@@ -955,7 +955,7 @@
   "zzz.").  The Roman TYPES are "I" (upper case) and "i" (lower case),
   and can range from 1 (" I." or " i.") to 3000 ("MMM." or  "mmm.").
   SEQNUM values should always be Arabic, and will be converted to
-  other types (e.g. SEQNUM="27" TYPE="a" will yield "aa." for the
+  other types (e.g., SEQNUM="27" TYPE="a" will yield "aa." for the
   next LI). The CONTINUE attribute will cause the sequence and TYPE
   of the preceding OL to be continued for LIs in the current OL. - FM
 10-16-95
@@ -983,7 +983,7 @@
 * Typo fix in HTTCP.c for non-MULTINET VMS builds. - Gary Chow (garyc@mrs.com)
 10-09-95
 * Assume the root as path in HTParse() of HTParse.c if the access and host
-  but no path are given, and the access is http, https, or ftp. - FM 
+  but no path are given, and the access is http, https, or ftp. - FM
 10-05-95
 * Make sure the FREE(x) macro gets defined for HTTCP.c. - FM
 10-04-95
@@ -1082,7 +1082,7 @@
   documents now include emphasis tags for NAME (ID) anchors if it's desired,
   because the most common graphic clients don't emphasize them by default,
   so we should adjust to that in Lynx as well (IMHO 8-).  Added emphasis
-  tags for the NAME anchors in the Lynx help files. - FM 
+  tags for the NAME anchors in the Lynx help files. - FM
 * Eliminated forced uppercasing of H1 headers.  Most documents have mixed
   casing and we should preserve it (IMHO 8-).  Added a BOLD_H1 configuration
   symbol, set FALSE by default, for making H1 headers bold even if BOLD_HEADERS
@@ -1122,7 +1122,7 @@
 09-05-95
 * Enabled the -help switch when no configuration file is available and
   Lynx would otherwise exit (i.e., it now outputs the help message before
-  it exits). - FM 
+  it exits). - FM
 * Documented the -child switch. - FM
 * Fixed and documented the -nolog switch. - FM
 * Changed the -linknums switch to -number_links, fixed the code to work,
@@ -1135,7 +1135,7 @@
   to HTML 3.0, added LH, and implemented full HTML 3.0 ID handling for those,
   and B, BLINK, BR, CENTER, CITE, CODE, DFN, DIR, EM, FORM, KBD, I, LEFT,
   LISTING, MENU, PLAINTEXT, PRE, RIGHT, SAMP, STRONG, TT, U, VAR and XMP
-  (some of which are obsoleted in HTML 3.0, but what the heck 8-). - FM 
+  (some of which are obsoleted in HTML 3.0, but what the heck 8-). - FM
 09-03-95
 * Made bolding of NAME (ID) anchor contents configurable in lynx.cfg. - FM
 09-02-95
@@ -1217,7 +1217,7 @@
   added to lynx2-4-FM.  This is the new stuff. - FM:
 ---------------------------------------------------
   08-16-95
-  * Applied patch from Peter van Heusden (pch@ucthpx.uct.ac.za) to fix 
+  * Applied patch from Peter van Heusden (pch@ucthpx.uct.ac.za) to fix
     a bug when lynx encounters an OPTION tag before the style is
     ever updated. - CL
   08-09-95
@@ -1353,7 +1353,7 @@
   and doesn't send one. - FM
 * Added GNUC support to the VMS descrip.mms files. - FM
 * Tweaks of HTWAIS.c socket handling on VMS (I can't reproduce a reported
-  problem with SOCKETSHR/NetLIB, but these tweaks might help). - FM 
+  problem with SOCKETSHR/NetLIB, but these tweaks might help). - FM
 * Added my guesses at code for HTTelnet.c to implement telnet, tn3270 and
   rlogin support, if available, when building with SOCKETSHR/NetLIB on
   VMS. - FM
@@ -1368,11 +1368,11 @@
    must be uncommented in userdefs.h and TRUSTED_LYNXCGI must be fixed
    in lynx.cfg.  It doesn't handle redirection or mime-types and
    scripts should probably generate partial URLs when referring back to
-   itself. If the file you're going after isn't an executable then it
-   will be loaded as regular file. This makes it possible to go back
-   and forth between cgi-scripts and .html files. 
+   itself.  If the file you're going after isn't an executable then it
+   will be loaded as regular file.  This makes it possible to go back
+   and forth between cgi-scripts and .html files.
    I changed the way TRUSTED_LYNXCGIs are recorded because they don't
-   work quite the same as TRUSTED_EXECs do. Also, George says it works
+   work quite the same as TRUSTED_EXECs do.  Also, George says it works
    fine on SunOS and Solaris, and it seems to work fine on Linux. - CL
   --------------------------------------------
 * Don't block access to the download menu when both no_download and
@@ -1396,7 +1396,7 @@
   Pat Rankin (rankin@eql.caltech.edu).  Needs testing, and the linking
   procedure still needs to be addressed explicitly. - FM
 * Prevent possibility of a null pointer dereference if an ISMAP anchor
-  fetch fails. - David Trueman (david@cs.dal.ca)  
+  fetch fails. - David Trueman (david@cs.dal.ca)
 07-21-95
 * Added LYK_HEAD (mapped by default to ']') to send HEAD requests for the
   current document or link (always sent with LYforce_no_cache). - FM
@@ -1452,12 +1452,12 @@
 		I think.)
 	(Replaced Peter's strdup()'s with more portable code. - FM)
    07-11-95
-* Added Erik Olson's (olson@phys.washngton.edu) patch to use the 
+* Added Erik Olson's (olson@phys.washngton.edu) patch to use the
   _underline_ format when using the -dump option. - CL
   (Kept the old code, #ifdef'ed out, to make this optional someday. - FM)
    07-07-95
 * Fixed a bug in local_dired.  Specifically, a pointer to a fixed array
-  was being fed into StrAllocCopy as the destination. Linux was choking
+  was being fed into StrAllocCopy as the destination.  Linux was choking
   on this although OSF/1 and AIX seemed to handle it better. - CL
 ---------------------------------------------------
 07-15-95
@@ -1680,7 +1680,7 @@
   - JP
 06-12-95
 * Added George Lindholm's new file permission patch.  Here's his description:
-  "Here is a rewamped version of my earlier file permission patch. This version
+  "Here is a rewamped version of my earlier file permission patch.  This version
    uses a html page to prompt for user input (rather than having the user
    enter a obscure unix chmod string) using checkboxes." - JP
 * Added George Lindholm's addition of a compiler flag (NO_ANONYMOUS_EMAIL).
diff --git a/gnu/usr.bin/lynx/docs/CHANGES2.8 b/gnu/usr.bin/lynx/docs/CHANGES2.8
index 6d6fb7f3a3c..42b0ecf3bee 100644
--- a/gnu/usr.bin/lynx/docs/CHANGES2.8
+++ b/gnu/usr.bin/lynx/docs/CHANGES2.8
@@ -8,7 +8,6 @@
 * modify makefile.in so that "make install-cfg" does not edit lynx.cfg
   to point at local helpfiles, while "make install-help" will now do
   that (reported by LP). - TD
-* one more patch to UPPER8 function. - LP
 1998-03-07
 * move ifdef's for EXP_8BIT_TOUPPER inside UPPER8 function to allow
   check for DOS/WINDOWS display charsets. - LP
@@ -132,7 +131,7 @@
   present).  For printed source meta charset added from display_charset (real
   charset after chrtrans).  If the original source has its own meta charset
   and we add the second on top - Lynx currently use those on top and ignore
-  others (old) value (that is correct, although non standard like BASE on top). 
+  others (old) value (that is correct, although non standard like BASE on top).
   The compilation default is FALSE (compatibility).  - LP
 * modify ncurses mouse behavior to match slang (use button 3 rather than
   button 2 for "previous document" (reported by Michael Ritzert) - TD
@@ -219,7 +218,7 @@
   invalid in PRE blocks.  The spaces could be omitted when IMG is
   used invalidly in PRE blocks, but that would revive the problem
   for blind users that they might not be present at all, so it seems
-  better to suffer extra spaces in such cases. - FM 
+  better to suffer extra spaces in such cases. - FM
 1998-01-24
 * Tweak in HTAccess.c to reset the title element in anchors on forced
   reloads. - FM
@@ -374,7 +373,7 @@ from the lynx code.  I think the following patch does this.
   standard file descriptors in conjunction with all fopen() and fclose()
   operations on the TRACE log and redirections of stderr via equality
   statements (see 1997-12-16, 1997-12-13 and 1997-07-18 mods). - FM
-1997-12-18 
+1997-12-18
 * forgotten last } UN-inserted (John Line) - WB
 * few commented messages corrected according to RFC2068 (HTTP1.1)
   (Leonid Pauzner) - WB
@@ -384,7 +383,7 @@ from the lynx code.  I think the following patch does this.
 1997-12-17 (all patches by Leonid Pauzner)
 * open text mode while writing lynx.rc and bookmarks files
   LYrcFile.c and LYBookmark.c (forgotten last } inserted). - WB
-* add a comment about binary mode in LYMain.c and pile them 
+* add a comment about binary mode in LYMain.c and pile them
   in one ifdef - WB
 * few misprinted characters (in comments) corrected in
   \chrtrans\cp850_uni.tbl - WB
@@ -407,7 +406,7 @@ from the lynx code.  I think the following patch does this.
   by the server, but we still report the server's instructions, as we do
   for the Maximum Gobble Date). - FM
 1997-12-14
-* added a lynx.cfg switch to turn on/off extended dos translations for keys. 
+* added a lynx.cfg switch to turn on/off extended dos translations for keys.
   -WB
 * added minor DOS tweaks by Doug Kaufman and myself. - WB
 * fixed windows binary mode piping. - WB
@@ -443,7 +442,7 @@ from the lynx code.  I think the following patch does this.
 * split up install rule to install-bin, install-cfg, install-man and
   install-help. - TD
 * suppress suffixes in top-level makefile so 'make' won't try to create
-  a file named "install" from install.sh - TD 
+  a file named "install" from install.sh - TD
 * make $(CPPFLAGS) inherit consistently from top-level makefile. - TD
   (reported by Mark Mentovai)
 * add configure option --enable-externs, to turn on USE_EXTERNS. - TD
@@ -568,7 +567,7 @@ from the lynx code.  I think the following patch does this.
   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). 
+  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.
@@ -680,7 +679,7 @@ from the lynx code.  I think the following patch does this.
   document itself, for href="").  In contrast, a URL-Reference with a non-
   empty URL refers to a (generally...) external resource.  If the "url"
   happens to coincide with (or, if it is relative, resolve to) the URL from
-  which the current document was retrieved, the current document is a 
+  which the current document was retrieved, the current document is a
   representation of the resource, but not the same thing.  In most such cases
   we can treat href="#fragment" and href="url#fragment" the same way, i.e.
   activating such a link is interpreted as a request to reposition within
@@ -708,7 +707,7 @@ from the lynx code.  I think the following patch does this.
   given).
   The semantics for URL-less URL-References are given in Internet Draft
   ,
-  including that "Traversal of such a reference should not result in an 
+  including that "Traversal of such a reference should not result in an
   additional retrieval action."  No comparable prescriptions are made for
   references which have a URL, in particular it is not stated that they
   should be treated as equivalent when the URL coincides with or resolves
@@ -724,7 +723,7 @@ from the lynx code.  I think the following patch does this.
   (although the prompt texts probably need improvement). - KW
 * The notion of the context of the "current document" is extended, so that
   auxiliary LYNXIMGMAP documents generated by Lynx are within the scope of
-  the underlying document, i.e. the document containing the MAP and AREA
+  the underlying document, i.e., the document containing the MAP and AREA
   elements.  Although they are treated as separate documents for display
   and internal handling, following links between the underlying document
   and its LYNXIMGMAP documents will result in display from cached data
@@ -832,7 +831,7 @@ from the lynx code.  I think the following patch does this.
 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 
+* 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
@@ -844,7 +843,7 @@ from the lynx code.  I think the following patch does this.
   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 
+  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
@@ -885,7 +884,7 @@ from the lynx code.  I think the following patch does this.
   folk to cut and paste them, in the new INSTALLATION file. - LVW
 1997-10-22
 * Many locations of files changed, about_lynx/ directory and references to
-  aboutfilepath removed, userdefs.h reorganized, changed README, new 
+  aboutfilepath removed, userdefs.h reorganized, changed README, new
   INSTALLATION file, doc changes, some doc files removed. - HN
   (Removed paragraph in README which doesn't apply yet, some files still
   not done - KW)
@@ -906,14 +905,14 @@ from the lynx code.  I think the following patch does this.
   extended as if it included all the replacements from the default table.
   Note that mappings for some characters in the default table file still
   differ from the old mappings given in LYCharSets.c, and what is displayed
-  e.g. for umlaut characters may not be consistent, this still has to be
+  e.g., for umlaut characters may not be consistent, this still has to be
   sorted out.  It may just have become more visible now. - KW
 * Tweaks to some replacement strings in def7_uni.tbl; contributions of
   more useful strings would be welcome... - KW
 * Removed mappings for invalid chars from some chartrans files, removed
   Ethiopic chars from iso01_uni.tbl. - KW
 * Some other corrections and tweaks for chartrans mechanisms. - KW
-1997-11-21
+1997-10-21
 * Fixed handling of Control-D (delete character under the cursor) in the
   line editor when the cursor is at the end of the line instead of on a
   character in the string being edited. - FM
@@ -951,7 +950,7 @@ from the lynx code.  I think the following patch does this.
 * Made some of the changes concerning and removal and location changes of
   files proposed by HN. - KW
 * Restored LYCheckForCSI example function to its previous form, with a check
-  added and comments added. - KW 
+  added and comments added. - KW
 1997-10-15
 * Changed the order of display character set entries for the options menu
   popup.  "ISO Latin 1" and its "DosLatin1 (cp850)" and "WinLatin1 (cp1252)"
@@ -1044,14 +1043,14 @@ from the lynx code.  I think the following patch does this.
 * Changed PROBLEMS file for ^Z and for "forgetting emphasis of link text"
   problem (which shouldn't occur any more). - KW
 1997-10-05
-* Changed SGML.c parsing of unrecognized and invalid start tags. If the
+* Changed SGML.c parsing of unrecognized and invalid start tags.  If the
   '<' character in HTML is followed by a 7-bit letter character, we now
   do tag parsing even if the element name is not recognized, instead of
   going to 'S_junk_tag' mode, so that a '>' embedded in an attribute value
   (which may also be part of a CJK character's encoding) will not
   prematurely end the tag.  (But "soft double-quotes parsing" mode is
   recognized.)  Treat a '<' followed by most other 7-bit chars as data,
-  i.e. recover it and the following char. - KW
+  i.e., recover it and the following char. - KW
 1997-10-04
 * Corrected check for empty string at beginning of LYUnEscapeEntities. - KW
 * Squeezed option for "Assume charset if unknown:" into Options screen.
@@ -1064,8 +1063,8 @@ from the lynx code.  I think the following patch does this.
 * Changed order and criteria of transformation attempts in HTPlain.c to
   be more like SGML.c.  For plain text KOI8-R would use 8-bit stripping
   to early.  HTPlain_write still is too different from SGML_character... - KW
-* Reinstate the slash after special interpretation of /~ at beginning of 
-  file URL path for DOSPATH - DK 
+* Reinstate the slash after special interpretation of /~ at beginning of
+  file URL path for DOSPATH - DK
 * Changed SGML_character to not try to convert attribute values to UTF-8
   if HTCJK is in effect (arrggh!) - KW
 * Changed effect of -raw / '@' for CJK display character sets: it now toggles
@@ -1080,7 +1079,7 @@ from the lynx code.  I think the following patch does this.
   more.  Regard #ifdef EXP_CHARTRANS as some strange kind of comment for
   now, until it goes away. - KW
 * Write comment at top of .lynxrc file to make clear that it is different
-  from lynx.cfg, suggested by LWV. - KW 
+  from lynx.cfg, suggested by LWV. - KW
 1997-09-30
 * Changed order of display character sets on options screen a bit, and
   corrected charset listings in lynx.cfg and userdefs.h files - KW
@@ -1090,7 +1089,7 @@ from the lynx code.  I think the following patch does this.
   out more by decorating them with ***** characters, so that users who
   follow the BAD_HTML_USE_TRACE advice can more easily find the relevant
   messages. - KW
-* Reworked LYUnEscapeEntities() while loop into a (hopefully) more 
+* Reworked LYUnEscapeEntities() while loop into a (hopefully) more
   understandable and consistent state-based switch, and integrated
   LYUnEscapeToLatinOne functionality. - KW
 * Non-ASCII characters in URLs and similar strings encountered in the HTML.c
@@ -1167,7 +1166,7 @@ from the lynx code.  I think the following patch does this.
   including values > 255 mapped to arrow keys, etc., when generating the
   'k'eymap display. - KW
 * Changes to prevent many (but not all) compiler warnings about `const'.
-  Not that this is different from TD's recent changes. Also some other minor
+  Not that this is different from TD's recent changes.  Also some other minor
   tweaks relating to (gcc) compiler warnings. - KW
 1997-09-17
 * Mods in GridText.c to use HTEscapeSP() for space-to-plus conversions of
@@ -1192,7 +1191,7 @@ from the lynx code.  I think the following patch does this.
   them the same as other programs (e.g., tin-unoff). - TD
 1997-09-16
 * Added code to JKT's and KW's mods in LYPrint.c to also handle VMS:
-  set the document's title as a logical on VMS (can be accessed via 
+  set the document's title as a logical on VMS (can be accessed via
   f$trnlnm("LYNX_PRINT_TITLE") in scripts). - FM
 * Smaller cleanups here and there - FM & KW
 97-09-15
@@ -1214,7 +1213,7 @@ from the lynx code.  I think the following patch does this.
 97-09-11
 * Tweaks in HTMLGen.c for display of special characters and line breaking
   with -preparsed. - KW
-* Got rid of use of underlining together with reverse for non-current 
+* Got rid of use of underlining together with reverse for non-current
   links for (n)curses if color is not used. - KW
 * Small HTMLDTD.c changes for new parsing. - KW
 * Change in SGML.c to always recognize SOFT HYPHEN when given as ­. - KW
@@ -1250,14 +1249,14 @@ from the lynx code.  I think the following patch does this.
   more raw rendering (in SOURCE view) or the original byte stream (as with
   the -source flag, possibly with BASE information prepended).  Lynx will
   attempt to wrap the text to screen width (or 80 cols for the -source flag),
-  but will not always succeed.  Unrecognized tags and attributes as well as 
-  comments are dropped, attributes reordered, missing end tags supplied, 
+  but will not always succeed.  Unrecognized tags and attributes as well as
+  comments are dropped, attributes reordered, missing end tags supplied,
   abd other changes made, showing how Lynx internally treats the document's
   structure.  This is probably most useful for debugging (of either Lynx's
-  parsing or of HTML documents, although a real validator should be used for 
+  parsing or of HTML documents, although a real validator should be used for
   the latter!).  It can also be instructive to switch the DTD parsing mode
   (with the ^V key) while viewing preparsed source.
-  Note that this doesn't work so well now with character translations and 
+  Note that this doesn't work so well now with character translations and
   entity expansion don't work well now, showing some of the same problems
   which appear for rendered documents and dropping some characters.  Making
   those problems of parsing more directly visible was one of the motivations
@@ -1285,7 +1284,7 @@ from the lynx code.  I think the following patch does this.
 * Corrections to JKT's mods (to avoid memory leaks etc.).  Avoid
   unnecessary stat() calls.  Other fixes in LYCgi.c.  Make
   setting of HTTP_ACCEPT_CHARSET actually work.  Now URL-unescape
-  the path in lynxcgi URLs before doing anything with it.  
+  the path in lynxcgi URLs before doing anything with it.
   Better logic for when to check for restrictions, the previous checking
   for !reloading could be easily circumvented.  Also check whether
   the full path including a possible PATH_INFO passes the restrictions
@@ -1294,7 +1293,7 @@ from the lynx code.  I think the following patch does this.
   part, it gets too confusing.  Strip '#' fragments from the lynxcgi
   path, but leave the interpretation of '#' characters after a '?' as
   before so that they are still regarded as part of the query or search
-  string. If PATHINFO is present, unescaped '#' characters in it will
+  string.  If PATHINFO is present, unescaped '#' characters in it will
   still be rejected by exec_ok(). - KW
 * added a bit of text about running ./configure to INSTALLATION file.
   - David Combs  & KW
@@ -1499,7 +1498,7 @@ from the lynx code.  I think the following patch does this.
 * Add check for FreeBSD library mytinfo (reported by Andrey A. Chernov
   ). - TD
 * Modify ./makefile.in so that 'all', the default target, will build the
-  Lynx executable. The old 'all' target is retained as "make help". - TD
+  Lynx executable.  The old 'all' target is retained as "make help". - TD
 * Modify src/makefile.in to allow development compiles within the src
   directory. - TD
 * Mask spaces in the bkgd (background attribute) calls for color curses to
@@ -1558,7 +1557,7 @@ from the lynx code.  I think the following patch does this.
   form's ACTION). - FM
 * Changed the typedef for HTCoord in HTStyle.h from float to int, for
   significant speedup of rendering on machines without floating-point
-  hardware based on DW's, KW's, BL's analyses.  Note that this should 
+  hardware based on DW's, KW's, BL's analyses.  Note that this should
   be taken into account when/if external style sheet support is added
   for page formatting (e.g., for optimum handling by speech synthesizers
   and braille interfaces), beyond the current emphasis on colorizing. - FM
@@ -1608,7 +1607,7 @@ from the lynx code.  I think the following patch does this.
 1997-07-28
 * Avoid traversing the full list of anchors each time when HText_endAnchor()
   is called with a non-zero anchor number, if that number corresponds to
-  the last anchor added to the HText structure. It is is the most common case
+  the last anchor added to the HText structure.  It is is the most common case
   that HText_endAnchor() refers to the last anchor, and the only case that
   could be handled correctly before FM's changes of 1997-05-13.  Avoiding
   the loop over the list of anchor can improve loading time significantly,
@@ -1621,8 +1620,8 @@ from the lynx code.  I think the following patch does this.
   conflict in this case. - KW
 * Minor LYUtils.c tweaks. - KW
 1997-07-27
-* Changed code for checks in LYGetFile.c for URL schemes which should 
-  be rejected when received as redirections, added checks for more 
+* Changed code for checks in LYGetFile.c for URL schemes which should
+  be rejected when received as redirections, added checks for more
   schemes. - FM
 * Rename top-level Makefile to Makefile.old (it's obsolete) - TD
 * Reduce top-level targets to one, 'lynx' - TD
@@ -1650,13 +1649,13 @@ from the lynx code.  I think the following patch does this.
 * Map charsets of the form "ibmNNN<...>" to "cpNNN<...>" in UCdomap.c
   if not already recognized.  Also recognize "windows-1252". - KW
 * Compared the handling of 4-way "show color (&)" in the 'o'ptions menu
-  against FM's implementation, and made some changes (mostly in formatting, 
+  against FM's implementation, and made some changes (mostly in formatting,
   variable and constant names and usage, ordering of statements) to aid
   further comparison.  The logic is still messy and needs further cleanup
   and simplification, but seems to do what it should.  Note that this
   also handles color-curses, in a (hopefully) reasonable way.  Command
   line flags -nocolor and (if using slang) -color override a preference
-  found in the RC file. See updated "Lynx Users Guide" file and the 
+  found in the RC file.  See updated "Lynx Users Guide" file and the
   comments written to the RC file.
   Documentation changes adapted from FM's changes. - KW
 * Mods of the DIRED_SUPPORT to check the actual URLs of temporary files
@@ -1674,7 +1673,7 @@ from the lynx code.  I think the following patch does this.
   Added protection to permit_location in LYLocal.c, similar to the changes
   of 1997-06-24 to LYDownload.c. - KW
 * Generate CANCELLED message when editing of a string value on the Options
-  Screen has been cancelled (typically with ^G), instead of an 
+  Screen has been cancelled (typically with ^G), instead of an
   inappropriate VALUE_ACCEPTED statusline. - KW
 1997-07-23
 * Tweaks of the strtok() calls for textarea values in HTML.c, so that they
@@ -1691,7 +1690,7 @@ from the lynx code.  I think the following patch does this.
   a binary compiled with slang so that color is not used on startup
   (except by using -nocolor).
   Note that reading show_color from .lynxrc is still commented out. - KW
-* There is now a "trailing comment" handler in LYReadCFG.c. It treats '#'
+* There is now a "trailing comment" handler in LYReadCFG.c.  It treats '#'
   as a comment token only if it is somewhere after the last colon for the
   lynx.cfg entry and is preceded by a space or tab. - FM
 * Added TT to the Utterly Tag and Attribute Soup group of HTML elements. - FM
@@ -1797,7 +1796,7 @@ from the lynx code.  I think the following patch does this.
   of this in www-html@w3c.org by saying that he wished it have been
   otherwise, but "market forces" prevailed (Sigh...) - FM
 1997-07-13
-* Changed is_url() to return immediately if the string to check starts with 
+* Changed is_url() to return immediately if the string to check starts with
   a slash character.  This prevents some false positives if the string
   contains ':' characters. - KW
 * Added support for "MACOS AppleShare IP FTP Server" to HTFTP.c.
@@ -1818,11 +1817,11 @@ from the lynx code.  I think the following patch does this.
 1997-07-10
 * Synchronized the development code against the fotemods patches up to
   1997-07-06 (relevant changes listed below, as usual).  Note that FM
-  has now included the chartrans code, but has eliminated conditional 
-  compilation of it; however, in this code set setting -DEXP_CHARTRANS 
-  at compile time is still necessary (but compilation without it has not 
+  has now included the chartrans code, but has eliminated conditional
+  compilation of it; however, in this code set setting -DEXP_CHARTRANS
+  at compile time is still necessary (but compilation without it has not
   been tested). - KW
-* Fixed character counting logic in display_line() for lines where 
+* Fixed character counting logic in display_line() for lines where
   soft hyphens (­ or  or a soft-hyphen character) are used
   for their intended purpose. - KW
   NOTE: The W3C HTML 4.0 draft explicitly specifies handling of ­,
@@ -1857,7 +1856,7 @@ from the lynx code.  I think the following patch does this.
   (see lynx.cfg) to FORCE_SSL_COOKIES_SECURE is now available, and the
   compilation or configuration default can be toggled via a -force_secure
   command line switch. - FM
-* Make NOCACHE ('x' key) work as expected from history list for internal 
+* Make NOCACHE ('x' key) work as expected from history list for internal
   links. - KW
 * Removed bogus checking for a config file in home directory which had
   been introduced into the development code. - KW
@@ -2175,7 +2174,7 @@ from the lynx code.  I think the following patch does this.
   mode can be defined in userdefs.h and via the 'o'ptions menu.  When
   in SELECT popups, the F_LINK_NUM ('0') command can be used in any mode
   to invoke a "Select option (or page) number:" prompt, which can take
-  'g' or 'p' suffixes, homologously to the 
+  'g' or 'p' suffixes, homologously to the
   "Follow link (or goto link or page) number:"
   prompt in the main document with popups retracted.  Note that when in
   the main document, the F_LINK_NUM command has an implied 'g' suffix
@@ -2224,7 +2223,7 @@ from the lynx code.  I think the following patch does this.
   with screen redraws for every popup retraction.  - FM
 1997-05-27
 * Eliminated in the fotemods code underlining in conjunction with reversing
-  for the current link with slang, to avoid the longstanding bug of 
+  for the current link with slang, to avoid the longstanding bug of
   underlining being lost (and distracting color changes occurring) when that
   link ceases to be current and it was embedded in an underlined region of
   text.  The attributes of the current link can be better handled in the
@@ -2302,7 +2301,7 @@ from the lynx code.  I think the following patch does this.
   them now. - FM
 * Tweaked SIGTSTP interrupt handler in the USE_SLANG for-unix code, so
   that it gets set to SIG_DFL when stop_curses() is called, to prevent
-  strange interferences experienced when ^Z is used while a helper 
+  strange interferences experienced when ^Z is used while a helper
   process is in the foreground. - KW
 * Change in LYForms.c to prevent forced screen refresh after selection
   from a popup box. - KW
@@ -2313,16 +2312,16 @@ from the lynx code.  I think the following patch does this.
   which are invalid when used later as an index into keymap[],
   override[], etc. - KW
 * in the USE_SLANG for-unix start_curses(), honor the no_suspend flag
-  if set.  This implements -restrictions=suspend handling for slang 
-  (although it was intended for curses implementations which have 
+  if set.  This implements -restrictions=suspend handling for slang
+  (although it was intended for curses implementations which have
   problems with ^Z within Lynx; see the PROBLEMS file).
   Note that the no_suspend flag cannot be suspected to have
   the desired effect if lynx is executed from a shell script, unless
   the shell process forked for the script also ignores the SIGTSTP
-  signal generated (usually) by the ^Z key.  Also if the user is 
+  signal generated (usually) by the ^Z key.  Also if the user is
   allowed to execute any helper process (VIEWER, PRINTER, etc.) which
   does allow suspending while no_suspend is in effect for the Lynx
-  parent process (by overriding the SIG_IGN setting done by Lynx or by 
+  parent process (by overriding the SIG_IGN setting done by Lynx or by
   other means), then suspending may still be possible, in addition to
   strange effects either immediately or when the process or process group
   is continued (wrong tty and screen state, zombie processes, total
@@ -2337,7 +2336,7 @@ from the lynx code.  I think the following patch does this.
 * Modified tempname() in LYUtils.c so that it checks whether files
   with the current PID and target count already exist, and if so,
   increments the count until a name for a non-existing file has been
-  created. - FM 
+  created. - FM
 1997-05-18
 * Mods in LYMainLoop.c and LYClean.c so that Control-G is treated as
   a synonym for 'n'o in quit confirmation prompts. - FM
@@ -2365,13 +2364,13 @@ from the lynx code.  I think the following patch does this.
   displayed to the 4th line (not counting the title line).  This can
   be changed by redefining SEARCH_GOAL_LINE in userdefs.h.
   SEARCH_GOAL_LINE can also be a simple expression in terms of the
-  variable display_lines, e.g. `#define SEARCH_GOAL_LINE (display_lines/3)',
+  variable display_lines, e.g., `#define SEARCH_GOAL_LINE (display_lines/3)',
   this should then automatically adapt to screen size changes (provided the
   display system can deal with that...)
-  Note that this this goal line will normally not be used if the next 
+  Note that this this goal line will normally not be used if the next
   target, according to the algorithm Lynx uses, is already on the displayed
   screen.  Also, when the displayed page changes to show a search result,
-  there is no guarantee that it will end up on the line set by 
+  there is no guarantee that it will end up on the line set by
   SEARCH_GOAL_LINE.  It should rather be regarded as a maximum.
   For example the presence of anchors on the line with the target or on
   the preceding lines will change the positioning. - KW
@@ -2418,7 +2417,7 @@ from the lynx code.  I think the following patch does this.
   on the List Page itself caused by documents with . - KW
 * Changed display_title() in GridText.c to not rely on sprintf() to get
   the number of blanks right. - KW
-* (chartrans) Added new lynx.cfg symbols ASSUME_CHARSET, 
+* (chartrans) 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
@@ -2440,14 +2439,14 @@ from the lynx code.  I think the following patch does this.
   when the RAW_TOGGLE key (normally '@') is used.
   The default depends on the display character set (as previously)
   but now also on the ASSUME_CHARSET setting (as determined by a setting
-  in lynx.cfg, possibly overridden by -assume_charset on the command 
+  in lynx.cfg, possibly overridden by -assume_charset on the command
   line, or the default iso-8859-1).  When the display character set
   corresponds to the ASSUME_CHARSET, the default for "raw mode" is ON,
   otherwise it is OFF.
   The effect of "raw mode" on the interpretation of documents which have
   no explicit charset label (from HTTP headers, a META tag, or otherwise)
   is as follows.  There is an internal "assume charset" which may differ
-  from the user-specified ASSUME_CHARSET value.  When "raw mode" is set 
+  from the user-specified ASSUME_CHARSET value.  When "raw mode" is set
   ON, the internal variable is set to correspond to the display character
   set.  When "raw mode" is set OFF, the internal variable changes to
   the user-specified ASSUME_CHARSET or, if that also corresponds to the
@@ -2461,7 +2460,7 @@ from the lynx code.  I think the following patch does this.
 1997-05-13
 * Changed the compilation default in userdefs.h for USE_TRACE_LOG
   to FALSE, for now. - KW
-* Code for "fixing" of relative http and https URLs which start with a 
+* Code for "fixing" of relative http and https URLs which start with a
   ../ segment from FM added, but it has to be enabled with the new
   lynx.cfg symbol STRIP_DOTDOT_URLS (default currently set to FALSE).
   See FM's description under 1997-04-23. - KW
@@ -2508,7 +2507,7 @@ from the lynx code.  I think the following patch does this.
 * Tweaks in LYMainLoop.c to set newdoc.title for various special pages
   generated by Lynx (History Page, Info Page, etc.) and when following
   a link. - FM
-* Small change to the heuristics for New_DTD in start_element() 
+* Small change to the heuristics for New_DTD in start_element()
   in SGML.c (try a bit more to close containing element if it's the
   same tag) - KW
 1997-05-12
@@ -2540,9 +2539,9 @@ from the lynx code.  I think the following patch does this.
   from RT, and added a comment on why code for a block based on the
   scheme is there, despite its being redundant with the current blanket
   restriction based of the ports. - FM
-* Mapped 0 to F_LINK_NUM (as suggested by KW), so that 0 invokes the 
-  "Follow link (or goto link or page) number:" prompt under all 
-  circumstances (but with the 0 not treated as the first digit of 
+* Mapped 0 to F_LINK_NUM (as suggested by KW), so that 0 invokes the
+  "Follow link (or goto link or page) number:" prompt under all
+  circumstances (but with the 0 not treated as the first digit of
   the number entry).  That's a better way
   to do it, because then the F_LINK_NUM command and explanation always
   appears in the "Current Key Map" display, and only the mappings of
@@ -2582,13 +2581,13 @@ from the lynx code.  I think the following patch does this.
   menu, but appear separately at the end of those lists.
   With -hiddenlinks=ignore they don't appear even in listings.
   With -hiddenlinks=merge hidden links are treated as before,
-  i.e. they show up as bracketed numbers if LINKS_ARE_NUMBERED is on,
+  i.e., they show up as bracketed numbers if LINKS_ARE_NUMBERED is on,
   and are numbered together with other links in the sequence of their
   occurrence in the document.  The default is -hiddenlinks=listonly.
   Changed the new follow_help.html file accordingly.
   This may help obviate an apparent need to call something a bug which
   others regard as a feature... - KW
-* Function HText_AreDifferent() updated as in FM's code, but still 
+* Function HText_AreDifferent() updated as in FM's code, but still
   unused. - KW
 1997-05-07
 * Added another argument in follow_link_number() of LYGetFile.c for
@@ -2649,14 +2648,14 @@ from the lynx code.  I think the following patch does this.
   menu for the 'l'ist command or appendix on dumps segregates and clearly
   labels the visible versus hidden links. - FM
 * Plugged a memory leak in LYEntify() of LYCharUtils.c. - FM
-* Modified experimental DTD info to not close anchors when an invalid 
+* Modified experimental DTD info to not close anchors when an invalid
   P, H1-H6, or ADDRESS start tag is encountered, and to change error
   recovery for P and MAP. - KW
 * Modified experimental DTD info and HTML.c to not close PRE when
   an invalid FORM start tag is encountered, and to use the appropriate
-  handling for preformatted text if PRE is in effect but is not the top 
-  element on HTML.c's stack.  The HTStyle structure's freeFormat (which 
-  wasn't used anywhere before) is now used as one test whether we are 
+  handling for preformatted text if PRE is in effect but is not the top
+  element on HTML.c's stack.  The HTStyle structure's freeFormat (which
+  wasn't used anywhere before) is now used as one test whether we are
   within preformatted text, also corrected the style setting of freeFormat
   for PRE in DefaultStyle.c. - KW
 * Changed internal gateways (in HTNews.c, HTFile.c, HTWAIS.c, HTWSRC.c)
@@ -2668,15 +2667,15 @@ from the lynx code.  I think the following patch does this.
   newdoc.line was not being reset. - KW
 1997-05-03
 * (chartrans) 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 displayable characters 
+  near the top of HText_appendCharacter(), to prevent writing C1 control
+  chars to the terminal if they are not valid as displayable 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... - KW
 * (chartrans) Small changes to README files. - KW
-* In the section of HTUtils.h for non-autoconf builds, don't set 
+* In the section of HTUtils.h for non-autoconf builds, don't set
   HAVE_KEYPAD or HAVE_TTYTYPE if USE_SLANG is defined. - KW
-* Modified HText_LinksInLines() to not count hidden form fields. - KW 
+* Modified HText_LinksInLines() to not count hidden form fields. - KW
 * Added support for setting an anchor's no_cache element based on a
   comparison between Expires and Date headers if both were received
   and we didn't set it based on a Cache-Control directive.  Also
@@ -2711,10 +2710,10 @@ from the lynx code.  I think the following patch does this.
   to avoid dangerous chars and shell spoofing. - KW
 * Escape characters properly when constructing URLs from filenames
   in LYConvertToURL.  If a string given for startfile, home page, or
-  a goto command which does not already have the form of an absolute 
-  URL starting with an URL scheme and which does not start with '~' 
-  (but may start with '/') specifies an existing file or directory in 
-  valid Unix-like format for the native filesystem, i.e. without using
+  a goto command which does not already have the form of an absolute
+  URL starting with an URL scheme and which does not start with '~'
+  (but may start with '/') specifies an existing file or directory in
+  valid Unix-like format for the native filesystem, i.e., without using
   escaping, it gets URL-escaped, otherwise it is assumed to already
   be URL-escaped. - KW
 1997-04-29
@@ -2724,7 +2723,7 @@ from the lynx code.  I think the following patch does this.
 * Added support for a 'p' suffix, like the 'g' suffix for making a link
   number the current link rather than ACTIVATE-ing it,
   but for displaying the page indicated by the number preceding the
-  'p' suffix entered at the "follow link (or goto link or page) number:" 
+  'p' suffix entered at the "follow link (or goto link or page) number:"
   prompt.  [...]  If the number
   entered at the prompt is '1' or less followed by the 'p' suffix, or only
   'p' is entered, you get the same behavior as for the HOME command.  If
@@ -2776,14 +2775,14 @@ from the lynx code.  I think the following patch does this.
   of a series of underscores into the HText structure, so that we
   still promote a wrap, if needed, at the space we ensured would be
   present before each INPUT. - FM
-* Made first_option a structure member rather than a static variable 
+* Made first_option a structure member rather than a static variable
   in HTML.c - KW
 1997-04-27
 * Tweak of Control-C and Control-G handling for popup_options() in
   LYForms.c.  They were being sought improperly as command keys rather
   than as raw keyboard entries.  Note that only Control-G should be
   used as "cancel" within popup windows on Unix, because Control-C
-  is not being trapped to a handler as on VMS. - LE & FM 
+  is not being trapped to a handler as on VMS. - LE & FM
 * Tweak of the anchor counting code for HTGetLinkInfo() in GridText.c
   so that it takes form fields into account when making a link current
   based on a "Follow link number" entry with the 'g' suffix.
@@ -2792,8 +2791,8 @@ from the lynx code.  I think the following patch does this.
 * Added information in the "Lynx bookmarks" section of the Users Guide
   about appropriate versus unsupported modifications when editing the
   bookmark files. - FM
-* RP Styles 0.2 fixed a bit and brought up to current experimental code 
-  level (no autoconfig or simple-curses, only older version of Wayne's 
+* RP Styles 0.2 fixed a bit and brought up to current experimental code
+  level (no autoconfig or simple-curses, only older version of Wayne's
   mods, maybe something else is missing, too).  No documentation, no
   detailed checking, no real cleanup.  Makefile slightly adapted,
   but still needs changing for new systems - see comments there. - KW
@@ -2814,7 +2813,7 @@ from the lynx code.  I think the following patch does this.
   retain that first symbolic element, in compliance with the IETF RFCs
   and IDs for resolving URLs, with other URL schemes (e.g., ftp). - FM
 * Added a skip_stack int to the HTML.h struct _HTStructured, to use
-  for flagging that the next call to HTML_start_element or 
+  for flagging that the next call to HTML_start_element or
   HTML_end_element is an internal shortcut and should skip pushing
   or popping the HTML.c paragraph style stack even for elements
   that are not declared SGML_EMPTY.  Added a SET_SKIP_STACK macro
@@ -2822,7 +2821,7 @@ from the lynx code.  I think the following patch does this.
 * Changes to HTML.c to better deal with a number of elements which may
   or may not have been declared SGML_EMPTY in HTMLDTD.c:
   if the last stacked element is HTML_OPTION, treat text as for
-  HTML_SELECT in HTML_put_character and HTML_put_character and 
+  HTML_SELECT in HTML_put_character and HTML_put_character and
   HTML_put_string.  Added handling code for 

to HTML_end_element (similar but not identical to that for P in HTML_start_element). Added check whether a SELECT is still open to FORM handling in @@ -2835,7 +2834,7 @@ from the lynx code. I think the following patch does this. to the content types used with New_DTD, in HTMLDTD.c. Made OPTION non-empty. - KW * Now changed the tags_old[] in HTMLDTD.c, which is used with the - switchable "old" SGML parsing, to follow the changes for A, B, + switchable "old" SGML parsing, to follow the changes for A, B, BLINK, CITE, EM, FONT, I, STRONG, and U mentioned in the entry of 1997-04-15. These, together with FORM and P, are all declared as SGML_EMPTY now when the "old" SGML parsing is in effect, but @@ -2887,9 +2886,9 @@ from the lynx code. I think the following patch does this. * Made SGML parsing switchable between old and new HTMLDTD info and SGML.c code, controlled by a New_DTD global variable and LYK_SWITCH_DTD toggle key. Use (temporarily?) ^V for the toggle key. - This is not yet changeable via command line, lynx.cfg, etc., and the + This is not yet changeable via command line, lynx.cfg, etc., and the default is New_DTD==YES (so that it gets tested :-) ). - KW -* Made some of the error messages before exit in LYMainLoop.c and +* Made some of the error messages before exit in LYMainLoop.c and LYMain.c go to stderr instead of stdout, but only for UNIX and, in the case of the LYMainLoop.c messages, only if dump_output_immediately was in effect. - KW @@ -2938,17 +2937,17 @@ from the lynx code. I think the following patch does this. sought already exists, so existing ones will still have the old lead text. - FM 1997-04-16 -* Extensive changes to try to keep track of whether a document (or +* Extensive changes to try to keep track of whether a document (or a location within it) was reached by an internal (fragment-only) URL reference or not. The basic idea is to be serious about I-D - (currently) draft-fielding-url-syntax-04.txt. + (currently) draft-fielding-url-syntax-04.txt. URL references starting with '#' are always to the current document (from which the reference is made). This leads to a lot of hackery in HTML.c, LYMainLoop.c, LYHistory.c, etc. etc... to distinguish a doc that was reached by an "internal" reference from others. But it seems necessary to keep track of how the reference to a fragment was specified, whether with a non-empty - "real" URL (possibly relative) preceding the '#' or without it, + "real" URL (possibly relative) preceding the '#' or without it, all the way way from the HTML parsing to the mainloop. Only then can the mainloop decide to not start a new retrieval for an internal reference without skipping a new retrieval if a full URL reference @@ -3002,7 +3001,7 @@ from the lynx code. I think the following patch does this. AREA element entries when updating MAP element content, and set the no_cache anchor element in LYLoadIMGmap() so that the updated MAPs always will be used when rendering. - FM -* Not using the no_cache change from last entry, until further +* Not using the no_cache change from last entry, until further investigation. - KW * Removed two spurious lines under case LYK_PRINT: in LYMainLoop.c (from an old cut and paste from case LYK_HISTORY: done too late @@ -3030,11 +3029,11 @@ from the lynx code. I think the following patch does this. * Use logical extension of the rules for HREF references also for USEMAP references to MAPs: relative URL references are resolved with respect to a BASE element if one is present in the document where they - occur, unless they are URL references without a URL, i.e. only a + occur, unless they are URL references without a URL, i.e., only a fragment starting with '#'. In the latter case they are taken as internal references referring to a MAP in the same document where the USEMAP occurs, whether the MAP occurs before the USEMAP (as it - should, according to previous entry) or after the USEMAP. + should, according to previous entry) or after the USEMAP. HREF's in AREA elements follow the same rules. - KW * Fixed bug in HTML_free() for the case when LYMapsOnly is set. We didn't create an HText structure for the stream (just scanned it for @@ -3090,7 +3089,7 @@ from the lynx code. I think the following patch does this. * New translation table koi8r_uni for KOI8-R charset. Lynx can now translate between iso-8859-5 and KOI8-R, at least for the Cyrillic characters present in both. - KW -* New translation table def7_uni with default 7-bit mappings +* New translation table def7_uni with default 7-bit mappings (replacement representation). Based on RFC1345 and mnemonic,ds from ftp://dkuug.dk/i18n/ and previous Lynx replacements in LYCharSets.c and IPA FAQ convention and stuff for Ethiopic and @@ -3109,8 +3108,8 @@ from the lynx code. I think the following patch does this. * Make makeuctb slightly more flexible (accept unicode range for mapping to single code point). - KW 1997-04-07 -* Took out special-case handling in the curses-color code for underlining - when lynx is running under Linux using the linux console with color. +* Took out special-case handling in the curses-color code for underlining + when lynx is running under Linux using the linux console with color. The code was introduced on 1997-03-12 and would ignore "smul" capability info from terminfo or termcap under those circumstances, always using bold instead of underline. - KW @@ -3120,7 +3119,7 @@ from the lynx code. I think the following patch does this. test for HTML_FORM. - KW 1997-04-06 * Patch for IMG elements which have both ISMAP and USEMAP in effect. - In HTML_start_element() don't generate the "[ISMAP]-" string for + In HTML_start_element() don't generate the "[ISMAP]-" string for output in this case, unless clickable_images is set TRUE. - KW 1997-04-05 * Patch for Lynx v2.7.1 to handle invalidly interdigitated container @@ -3165,7 +3164,7 @@ from the lynx code. I think the following patch does this. that it could not in fact function as a server-side image map. - FM 1997-03-27 * 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 + 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. @@ -3175,14 +3174,14 @@ from the lynx code. I think the following patch does this. 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 * In LYLocal.c, modified the code handling DIRED_MENU to do more careful - checking of the selected file. In addition to "TAG", "FILE", and "DIR", + checking of the selected file. In addition to "TAG", "FILE", and "DIR", DIRED_MENU definitions in lynx.cfg now also recognize LINK as a type. DIRED_MENU definitions with a type field of "LINK" are only used if the current selection is a symbolic link ("FILE" and "DIR" definitions are not used in that case). The default menu definitions have been updated to reflect this change, and to avoid the showing of menu items whose action would always fail - KW -* Some cleanup to eliminate compiler warnings, remove some unused +* Some cleanup to eliminate compiler warnings, remove some unused variables - KW * 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 @@ -3258,17 +3257,17 @@ from the lynx code. I think the following patch does this. trademark character (given by ™ or ™) 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 + 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 * 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 + 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-12 -* (chartrans) Make compilation in src/chrtrans less verbose, no more +* (chartrans) Make compilation in src/chrtrans less verbose, no more generating automatic *.h_old backup copies. - KW * Refinement to the SVr4 (ncurses) color support, allowing it to more closely model the slang support. - TD @@ -3279,7 +3278,7 @@ from the lynx code. I think the following patch does this. difference?!). - WB * Altered LYCurses.c so that the DJGPP version could spawn other programs without certain death. - WB -* Ignoring the whole ~/lynx.cfg problem (expanding '~') entirely for the +* Ignoring the whole ~/lynx.cfg problem (expanding '~') entirely for the Win32 version for now. - WB * Some other tweaks for Win32 and DJGPP - WB * Added protection in LYGetFile.c against denial of service attacks via @@ -3320,9 +3319,9 @@ from the lynx code. I think the following patch does this. 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 -* Merged with patches and makefiles from Wayne Buttles - (buttles@wsb.champlain.edu) to enable compilation in two new environments: - Win32 (95/NT) with Borland C++ 4.52 compiler, and 386 DOS with DJGPP +* Merged with patches and makefiles from Wayne Buttles + (buttles@wsb.champlain.edu) to enable compilation in two new environments: + Win32 (95/NT) with Borland C++ 4.52 compiler, and 386 DOS with DJGPP compiler. To add ports for Win32 (95/NT) and 386 DOS computers with a packet driver, four new defines were created: _WINDOWS (Defined for Win32 specific code - Mostly TCP related), DJGPP (Defined for 386 specific code - @@ -3361,10 +3360,10 @@ from the lynx code. I think the following patch does this. * chartrans code for translation of character sets, handling of Unicode, and i18n updated for Lynx 2.7. Support for CHARSET attribute on A tags. New directory src/chrtrans with table files. Compilation flags - -DEXP_CHARTRANS, -DEXP_CHARTRANS_AUTOSWITCH (for Linux), - -DSLANG_MBCS_HACK (for raw unicode console). - New command line options when compiled with -DEXP_CHARTRANS: - -assume_charset, -assume_local_charset, -assume_unrec_charset. + -DEXP_CHARTRANS, -DEXP_CHARTRANS_AUTOSWITCH (for Linux), + -DSLANG_MBCS_HACK (for raw unicode console). + New command line options when compiled with -DEXP_CHARTRANS: + -assume_charset, -assume_local_charset, -assume_unrec_charset. See README.chartrans and README files in src/chrtrans for more info. INFO screen shows of effective charset even if not given explicitly. Translation routines in LYCharUtils.c not chartrans-ified at this point. diff --git a/gnu/usr.bin/lynx/docs/FM.announce b/gnu/usr.bin/lynx/docs/FM.announce index dc3530c46e6..0b2652bff61 100644 --- a/gnu/usr.bin/lynx/docs/FM.announce +++ b/gnu/usr.bin/lynx/docs/FM.announce @@ -28,29 +28,29 @@ addition to access by way of a file management menu. There are two possible modes of operation; the first in which a single file management menu is invoked via the `f', or `F' key; the second, in which the more often used facilities are made available directly -from the keyboard in addition to access via the menu. The second +from the keyboard in addition to access via the menu. The second method provides a much better user interface but requires re-mapping some of the keys from their standard lynx interpretation, temporarily -when file management mode is in effect. For example, if OK_OVERRIDE is +when file management mode is in effect. For example, if OK_OVERRIDE is defined at compile-time, then the line at the bottom of the screen, in novice mode, will be - C)reate D)ownload E)dit F)ull menu M)odify R)emove T)ag U)pload + C)reate D)ownload E)dit F)ull menu M)odify R)emove T)ag U)pload rather than the standard second noviceline, - H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list + H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list -when the user is browsing part of the file system. If OK_OVERRIDE is not +when the user is browsing part of the file system. If OK_OVERRIDE is not defined then all access to file management functionality must be by way -of the menu. The only exception is that the facility to tag files for +of the menu. The only exception is that the facility to tag files for subsequent removal and/or re-location is always available directly from -the keyboard using `t', and `T'. +the keyboard using `t', and `T'. This is a first release of the file management enhancements and suggestions -for improvements are welcome. Among the enhancements which are currently +for improvements are welcome. Among the enhancements which are currently being considered are facilities for changing file access attributes, and -a facility for listing and extracting part of an archive. +a facility for listing and extracting part of an archive. In order to use the file management facilities you may either point the program at a directory on the command line or point the program at @@ -61,9 +61,9 @@ an html file which contains a link of the following form: where the anchor `file://localhost/~/' implies a reference to /home/username. Because the `~/' in a file URL is converted to `/home/username' regardless of origin, these facilities also work when -the anchor shown above is served from an http server as well. In +the anchor shown above is served from an http server as well. In either case the reference is to files on the local system and not -files in the domain of the server. +files in the domain of the server. By default the file listing is in standard Unix mixed format, but you may use the Options menu to select WWW `directories first' format, or diff --git a/gnu/usr.bin/lynx/docs/IBMPC-charsets.announce b/gnu/usr.bin/lynx/docs/IBMPC-charsets.announce index 870abe5bf13..1431cdf381b 100644 --- a/gnu/usr.bin/lynx/docs/IBMPC-charsets.announce +++ b/gnu/usr.bin/lynx/docs/IBMPC-charsets.announce @@ -9,10 +9,11 @@ General Information =================== Lynx comes with built-in translation tables to map the 8-bit character codes or character entities coming in from an HTML document to their equivalent codes, -where possible, for various character sets. You should choose display -character set in Lynx Options Menu according to your font installed locally. -Please contact lynx-dev mailing list if you want any new codepage not listed -there. +where possible, for various character sets. + +IMPORTANT: you should choose display character set in Lynx Options Menu +according to your font installed locally. Probably it would be cpXXX. Please +contact lynx-dev mailing list if you want any new codepage not listed there. Note that all points of the connection between the display at your end and Lynx at the remote end must be 8-bit clean. If the high bit is being stripped at @@ -50,7 +51,7 @@ you're not. If you see box and line-drawing characters and mismatched letters and so on, you are likely displaying 7 bit data, not 8. Ensure that all points of your connection are 8-bit clean: - On any remote UNIX systems you must pass through, do + On any remote UNIX systems you must pass through, do 'stty cs8 -istrip' or 'stty pass8'. 'stty -a' should list your settings. On any remote VMS systems, do 'set terminal /eightbit'. @@ -62,9 +63,9 @@ of your connection are 8-bit clean: 8 bit, some 8-bit character sequences, including those passed by Lynx as well as those which are for your terminal type (vt100, etc.) will be processed by Procomm as ANSI screen - control codes and will most likely result in a garbled display. + control codes and will most likely result in a garbled display. Set it to 7 bit. - If going through a dialup terminal server, you may have to set the + If going through a dialup terminal server, you may have to set the terminal server itself to pass 8 bit data. How to do this varies with the make of the server, and in some cases only a system admin in charge of the box will have the authorization diff --git a/gnu/usr.bin/lynx/docs/OS-390.announce b/gnu/usr.bin/lynx/docs/OS-390.announce new file mode 100644 index 00000000000..6eac7d2536e --- /dev/null +++ b/gnu/usr.bin/lynx/docs/OS-390.announce @@ -0,0 +1,93 @@ +This document suggests steps to install Lynx on OS/390 systems. + +======================================================================== +o Download the archive file lynx2-8-2.tar.Z in BINARY from the site + where you found this announcement or from a site listed at + http://lynx.browser.org/ + +o Unpack with: + + uncompress -in various formats. - HOW TO INSTALL: (4) before compiling: @@ -113,13 +108,13 @@ HOW TO INSTALL: (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. + 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 + 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 + 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.): @@ -129,9 +124,9 @@ HOW TO INSTALL: (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 + Note that definition of new character entities (if e.g., you want Lynx to recognize Ž) are not covered by these table files, - they have to be listed in entities.h. + they have to be listed in entities.h. _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 @@ -140,29 +135,29 @@ HOW TO INSTALL: change 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! + 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). + text on other consoles (if that text contains characters + beyond US-ASCII). (8) Some suggested Web pages for testing: , - especially + especially . -(9) Please report bugs, unexpected behavior, etc. +(9) Please report bugs, unexpected behavior, etc. to . - Suggestions for improvement would be welcome, as well as + Suggestions for improvement would be welcome, as well as contributed translation tables (for stuff that is not available at ftp://dkuug.dk or ftp://ftp.unicode.org). diff --git a/gnu/usr.bin/lynx/docs/SOCKETSHR.announce b/gnu/usr.bin/lynx/docs/SOCKETSHR.announce index eda1c7391f8..4c08a018512 100644 --- a/gnu/usr.bin/lynx/docs/SOCKETSHR.announce +++ b/gnu/usr.bin/lynx/docs/SOCKETSHR.announce @@ -7,8 +7,8 @@ What is SocketShr? SOCKETSHR is Eckhart Meyer's socket library interface to the MadGoat NETLIB package, which provides a vendor-independent interface to the VMS TCP/IP -transports. Using this, the same image will run over any of the available -packages, including UCX, Multinet, CMU, Pathway access and TCPWARE. +transports. Using this, the same image will run over any of the available +packages, including UCX, Multinet, CMU, Pathway access and TCPWARE. SocketShr and NETLIB are separately available libraries that MUST be installed before LYNX can use them. @@ -58,7 +58,7 @@ Both should be defined /system /exec Building LYNX ------------- -Run the BUILD.COM procedures and select the SOCKETSHR_TCP option. This will +Run the BUILD.COM procedures and select the SOCKETSHR_TCP option. This will build an image that will run over the SOCKETSHR/NETLIB routines. diff --git a/gnu/usr.bin/lynx/docs/djgpp.key b/gnu/usr.bin/lynx/docs/djgpp.key new file mode 100644 index 00000000000..0ce8631aac7 --- /dev/null +++ b/gnu/usr.bin/lynx/docs/djgpp.key @@ -0,0 +1,214 @@ + DJGPP Keyhandler Keymaps + +Control_A 0x001 +Control_B 0x002 +Control_C 0x003 +Control_D 0x004 +Control_E 0x005 +Control_F 0x006 +Control_G 0x007 +BackSpace 0x008 +Control_H 0x008 +Tab 0x009 +Control_I 0x009 +LineFeed 0x00a +Control_J 0x00a +Control_K 0x00b +Control_L 0x00c +Return 0x00d +Control_M 0x00d +Control_N 0x00e +Control_O 0x00f +Control_P 0x010 +Control_Q 0x011 +Control_R 0x012 +Control_S 0x013 +Control_T 0x014 +Control_U 0x015 +Control_V 0x016 +Control_W 0x017 +Control_X 0x018 +Control_Y 0x019 +Control_Z 0x01a +Control_LBracket 0x01b +Escape 0x01b +Control_BackSlash 0x01c +Control_RBracket 0x01d +Control_Caret 0x01e +Control_Underscore 0x01f +Space 0x020 +ExclamationPoint 0x021 +DoubleQuote 0x022 +Hash 0x023 +Dollar 0x024 +Percent 0x025 +Ampersand 0x026 +Quote 0x027 +LParen 0x028 +RParen 0x029 +Star 0x02a +Plus 0x02b +Comma 0x02c +Dash 0x02d +Period 0x02e +Slash 0x02f +Colon 0x03a +SemiColon 0x03b +LAngle 0x03c +Equals 0x03d +RAngle 0x03e +QuestionMark 0x03f +At 0x040 +LBracket 0x05b +BackSlash 0x05c +RBracket 0x05d +Caret 0x05e +UnderScore 0x05f +BackQuote 0x060 +LBrace 0x07b +Pipe 0x07c +RBrace 0x07d +Tilde 0x07e +Control_Backspace 0x07f +BackTab 0x10f +Alt_Q 0x110 +Alt_W 0x111 +Alt_E 0x112 +Alt_R 0x113 +Alt_T 0x114 +Alt_Y 0x115 +Alt_U 0x116 +Alt_I 0x117 +Alt_O 0x118 +Alt_P 0x119 +Alt_LBracket 0x11a +Alt_RBracket 0x11b +Alt_Return 0x11c +Alt_A 0x11e +Alt_S 0x11f +Alt_D 0x120 +Alt_F 0x121 +Alt_G 0x122 +Alt_H 0x123 +Alt_J 0x124 +Alt_K 0x125 +Alt_L 0x126 +Alt_Semicolon 0x127 +Alt_Quote 0x128 +Alt_Backquote 0x129 +Alt_Backslash 0x12b +Alt_Z 0x12c +Alt_X 0x12d +Alt_C 0x12e +Alt_V 0x12f +Alt_B 0x130 +Alt_N 0x131 +Alt_M 0x132 +Alt_Comma 0x133 +Alt_Period 0x134 +Alt_Slash 0x135 +Alt_KPStar 0x137 +F2 0x13c +F3 0x13d +F4 0x13e +F5 0x13f +F6 0x140 +F7 0x141 +F8 0x142 +F9 0x143 +F10 0x144 +Alt_KPMinus 0x14a +Center 0x14c +Alt_KPPlus 0x14e +Shift_F1 0x154 +Shift_F2 0x155 +Shift_F3 0x156 +Shift_F4 0x157 +Shift_F5 0x158 +Shift_F6 0x159 +Shift_F7 0x15a +Shift_F8 0x15b +Shift_F9 0x15c +Shift_F10 0x15d +Control_F1 0x15e +Control_F2 0x15f +Control_F3 0x160 +Control_F4 0x161 +Control_F5 0x162 +Control_F6 0x163 +Control_F7 0x164 +Control_F8 0x165 +Control_F9 0x166 +Control_F10 0x167 +Alt_F1 0x168 +Alt_F2 0x169 +Alt_F3 0x16a +Alt_F4 0x16b +Alt_F5 0x16c +Alt_F6 0x16d +Alt_F7 0x16e +Alt_F8 0x16f +Alt_F9 0x170 +Alt_F10 0x171 +Control_Print 0x172 +Control_Left 0x173 +Control_Right 0x174 +Control_End 0x175 +Control_PageDown 0x176 +Control_Home 0x177 +Alt_1 0x178 +Alt_2 0x179 +Alt_3 0x17a +Alt_4 0x17b +Alt_5 0x17c +Alt_6 0x17d +Alt_7 0x17e +Alt_8 0x17f +Alt_9 0x180 +Alt_0 0x181 +Alt_Dash 0x182 +Alt_Equals 0x183 +Control_PageUp 0x184 +F11 0x185 +F12 0x186 +Shift_F11 0x187 +Shift_F12 0x188 +Control_F11 0x189 +Control_F12 0x18a +Alt_F11 0x18b +Alt_F12 0x18c +Control_Up 0x18d +Control_KPDash 0x18e +Control_Center 0x18f +Control_KPPlus 0x190 +Control_Down 0x191 +Control_Insert 0x192 +Control_Delete 0x193 +Control_KPSlash 0x195 +Control_KPStar 0x196 +Alt_EHome 0x197 +Alt_EUp 0x198 +Alt_EPageUp 0x199 +Alt_ELeft 0x19b +Alt_ERight 0x19d +Alt_EEnd 0x19f +Alt_EDown 0x1a0 +Alt_EPageDown 0x1a1 +Alt_EInsert 0x1a2 +Alt_EDelete 0x1a3 +Alt_KPSlash 0x1a4 +Alt_Tab 0x1a5 +Alt_Enter 0x1a6 +Alt_Escape 0x1a7 +Control_At 0x1a8 +Alt_Backspace 0x1a9 +Control_ELeft 0x273 +Control_ERight 0x274 +Control_EEnd 0x275 +Control_EPageDown 0x276 +Control_EHome 0x277 +Control_EPageUp 0x284 +Control_EUp 0x28d +Control_EDown 0x291 +Control_EInsert 0x292 +Control_EDelete 0x293 diff --git a/gnu/usr.bin/lynx/docs/pdcurses.key b/gnu/usr.bin/lynx/docs/pdcurses.key new file mode 100644 index 00000000000..5e383aa8651 --- /dev/null +++ b/gnu/usr.bin/lynx/docs/pdcurses.key @@ -0,0 +1,123 @@ + PDCurses Keymaps + +KEY_F2 0x213 /* F2 */ +KEY_F3 0x214 /* F3 */ +KEY_F4 0x215 /* F4 */ +KEY_F5 0x216 /* F5 */ +KEY_F6 0x217 /* F6 */ +KEY_F7 0x218 /* F7 */ +KEY_F(n) (0x108+(n)) /* If n>7 (9 keys are reserved) */ +ALT_0 0x197 /* Alt-0 */ +ALT_1 0x198 /* Alt-1 */ +ALT_2 0x199 /* Alt-2 */ +ALT_3 0x19a /* Alt-3 */ +ALT_4 0x19b /* Alt-4 */ +ALT_5 0x19c /* Alt-5 */ +ALT_6 0x19d /* Alt-6 */ +ALT_7 0x19e /* Alt-7 */ +ALT_8 0x19f /* Alt-8 */ +ALT_9 0x1a0 /* Alt-9 */ +ALT_A 0x1a1 /* Alt-A */ +ALT_B 0x1a2 /* Alt-B */ +ALT_C 0x1a3 /* Alt-C */ +ALT_D 0x1a4 /* Alt-D */ +ALT_E 0x1a5 /* Alt-E */ +ALT_F 0x1a6 /* Alt-F */ +ALT_G 0x1a7 /* Alt-G */ +ALT_H 0x1a8 /* Alt-H */ +ALT_I 0x1a9 /* Alt-I */ +ALT_J 0x1aa /* Alt-J */ +ALT_K 0x1ab /* Alt-K */ +ALT_L 0x1ac /* Alt-L */ +ALT_M 0x1ad /* Alt-M */ +ALT_N 0x1ae /* Alt-N */ +ALT_O 0x1af /* Alt-O */ +ALT_P 0x1b0 /* Alt-P */ +ALT_Q 0x1b1 /* Alt-Q */ +ALT_R 0x1b2 /* Alt-R */ +ALT_S 0x1b3 /* Alt-S */ +ALT_T 0x1b4 /* Alt-T */ +ALT_U 0x1b5 /* Alt-U */ +ALT_V 0x1b6 /* Alt-V */ +ALT_W 0x1b7 /* Alt-W */ +ALT_X 0x1b8 /* Alt-X */ +ALT_Y 0x1b9 /* Alt-Y */ +ALT_Z 0x1ba /* Alt-Z */ +CTL_LEFT 0x1bb /* Control-Left-Arrow */ +CTL_RIGHT 0x1bc /* Control-Right-Arrow */ +CTL_PGUP 0x1bd /* Control-PgUp */ +CTL_PGDN 0x1be /* Control-PgDn */ +CTL_HOME 0x1bf /* Control-Home */ +CTL_END 0x1c0 /* Control-End */ +KEY_B2 0x1c5 /* center on Virt. keypad */ +PADSLASH 0x1ca /* slash on keypad */ +CTL_PADENTER 0x1cc /* ctl-enter on keypad */ +ALT_PADENTER 0x1cd /* alt-enter on keypad */ +PADSTOP 0x1ce /* stop on keypad */ +PADSTAR 0x1cf /* star on keypad */ +PADMINUS 0x1d0 /* minus on keypad */ +PADPLUS 0x1d1 /* plus on keypad */ +CTL_PADSTOP 0x1d2 /* ctl-stop on keypad */ +CTL_PADCENTER 0x1d3 /* ctl-enter on keypad */ +CTL_PADPLUS 0x1d4 /* ctl-plus on keypad */ +CTL_PADMINUS 0x1d5 /* ctl-minus on keypad */ +CTL_PADSLASH 0x1d6 /* ctl-slash on keypad */ +CTL_PADSTAR 0x1d7 /* ctl-star on keypad */ +ALT_PADPLUS 0x1d8 /* alt-plus on keypad */ +ALT_PADMINUS 0x1d9 /* alt-minus on keypad */ +ALT_PADSLASH 0x1da /* alt-slash on keypad */ +ALT_PADSTAR 0x1db /* alt-star on keypad */ +ALT_PADSTOP 0x1dc /* alt-star on keypad */ +CTL_INS 0x1dd /* ctl-insert */ +ALT_DEL 0x1de /* alt-delete */ +ALT_INS 0x1df /* alt-insert */ +CTL_UP 0x1e0 /* ctl-up arrow */ +CTL_DOWN 0x1e1 /* ctl-down arrow */ +CTL_TAB 0x1e2 /* ctl-tab */ +ALT_TAB 0x1e3 /* alt-tab */ +ALT_MINUS 0x1e4 /* alt-minus */ +ALT_EQUAL 0x1e5 /* alt-equal */ +ALT_HOME 0x1e6 /* alt-home */ +ALT_PGUP 0x1e7 /* alt-pgup */ +ALT_PGDN 0x1e8 /* alt-pgdn */ +ALT_END 0x1e9 /* alt-end */ +ALT_UP 0x1ea /* alt-up arrow */ +ALT_DOWN 0x1eb /* alt-down arrow */ +ALT_RIGHT 0x1ec /* alt-right arrow */ +ALT_LEFT 0x1ed /* alt-left arrow */ +ALT_ENTER 0x1ee /* alt-enter */ +ALT_ESC 0x1ef /* alt-escape */ +ALT_BQUOTE 0x1f0 /* alt-back quote */ +ALT_LBRACKET 0x1f1 /* alt-left bracket */ +ALT_RBRACKET 0x1f2 /* alt-right bracket */ +ALT_SEMICOLON 0x1f3 /* alt-semi-colon */ +ALT_FQUOTE 0x1f4 /* alt-forward quote */ +ALT_COMMA 0x1f5 /* alt-comma */ +ALT_STOP 0x1f6 /* alt-stop */ +ALT_FSLASH 0x1f7 /* alt-forward slash */ +ALT_BKSP 0x1f8 /* alt-backspace */ +CTL_BKSP 0x1f9 /* ctl-backspace */ +PAD0 0x1fa /* ctl-keypad 0 */ +CTL_PAD0 0x1fb /* ctl-keypad 0 */ +CTL_PAD1 0x1fc /* ctl-keypad 1 */ +CTL_PAD2 0x1fd /* ctl-keypad 2 */ +CTL_PAD3 0x1fe /* ctl-keypad 3 */ +CTL_PAD4 0x1ff /* ctl-keypad 4 */ +CTL_PAD5 0x200 /* ctl-keypad 5 */ +CTL_PAD6 0x201 /* ctl-keypad 6 */ +CTL_PAD7 0x202 /* ctl-keypad 7 */ +CTL_PAD8 0x203 /* ctl-keypad 8 */ +CTL_PAD9 0x204 /* ctl-keypad 9 */ +ALT_PAD0 0x205 /* ctl-keypad 0 */ +ALT_PAD1 0x206 /* ctl-keypad 1 */ +ALT_PAD2 0x207 /* ctl-keypad 2 */ +ALT_PAD3 0x208 /* ctl-keypad 3 */ +ALT_PAD4 0x209 /* ctl-keypad 4 */ +ALT_PAD5 0x20a /* ctl-keypad 5 */ +ALT_PAD6 0x20b /* ctl-keypad 6 */ +ALT_PAD7 0x20c /* ctl-keypad 7 */ +ALT_PAD8 0x20d /* ctl-keypad 8 */ +ALT_PAD9 0x20e /* ctl-keypad 9 */ +CTL_DEL 0x20f /* clt-delete */ +ALT_BSLASH 0x210 /* alt-back slash */ +CTL_ENTER 0x211 /* ctl-enter */ diff --git a/gnu/usr.bin/lynx/docs/slang.key b/gnu/usr.bin/lynx/docs/slang.key new file mode 100644 index 00000000000..7310880235c --- /dev/null +++ b/gnu/usr.bin/lynx/docs/slang.key @@ -0,0 +1,4 @@ + S-Lang Keymaps for DOS + +F0 0x200 +F(X) (SL_KEY_F0 + X) /* If X>1 */ diff --git a/gnu/usr.bin/lynx/fixtext.sh b/gnu/usr.bin/lynx/fixtext.sh new file mode 100644 index 00000000000..1f5c1abd56b --- /dev/null +++ b/gnu/usr.bin/lynx/fixtext.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# xgettext only processes literal strings. Someone with a poor sense of humor +# decided to ignore strings in preprocessor lines. So we construct a fake +# ".c" file with the definitions turned into literals. + +sed -e 's/")/");/' \ + -e 's/^#define[ ]*\([^ ]*\)[ ]*gettext/char *\1 = gettext/' \ + -e 's,^#define[ ]*\([^ ]*\)[ ]*\\,/* #define \1 */char *\1 = \\,' \ + $* diff --git a/gnu/usr.bin/lynx/intl/ChangeLog b/gnu/usr.bin/lynx/intl/ChangeLog new file mode 100644 index 00000000000..ecff6f6b2cd --- /dev/null +++ b/gnu/usr.bin/lynx/intl/ChangeLog @@ -0,0 +1,1022 @@ +1997-09-06 02:10 Ulrich Drepper + + * intlh.inst.in: Reformat copyright. + +1997-08-19 15:22 Ulrich Drepper + + * dcgettext.c (DCGETTEXT): Remove wrong comment. + +1997-08-16 00:13 Ulrich Drepper + + * Makefile.in (install-data): Don't change directory to install. + +1997-08-01 14:30 Ulrich Drepper + + * cat-compat.c: Fix copyright. + + * localealias.c: Don't define strchr unless !HAVE_STRCHR. + + * loadmsgcat.c: Update copyright. Fix typos. + + * l10nflist.c: Don't define strchr unless !HAVE_STRCHR. + (_nl_make_l10nflist): Handle sponsor and revision correctly. + + * gettext.c: Update copyright. + * gettext.h: Likewise. + * hash-string.h: Likewise. + + * finddomain.c: Remoave dead code. Define strchr only if + !HAVE_STRCHR. + + * explodename.c: Include . + + * explodename.c: Reformat copyright text. + (_nl_explode_name): Fix typo. + + * dcgettext.c: Define and use __set_errno. + (guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is + not defined. + + * bindtextdom.c: Pretty printing. + +1997-05-01 02:25 Ulrich Drepper + + * dcgettext.c (guess_category_value): Don't depend on + HAVE_LC_MESSAGES. We don't need the macro here. + Patch by Bruno Haible . + + * cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL + macro. Instead use HAVE_LOCALE_NULL and define it when using + glibc, as in dcgettext.c. + Patch by Bruno Haible . + + * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois + Pinard. + +Mon Mar 10 06:51:17 1997 Ulrich Drepper + + * Makefile.in: Implement handling of libtool. + + * gettextP.h: Change data structures for use of generic lowlevel + i18n file handling. + +Wed Dec 4 20:21:18 1996 Ulrich Drepper + + * textdomain.c: Put parentheses around arguments of memcpy macro + definition. + * localealias.c: Likewise. + * l10nflist.c: Likewise. + * finddomain.c: Likewise. + * bindtextdom.c: Likewise. + Reported by Thomas Esken. + +Mon Nov 25 22:57:51 1996 Ulrich Drepper + + * textdomain.c: Move definition of `memcpy` macro to right + position. + +Fri Nov 22 04:01:58 1996 Ulrich Drepper + + * finddomain.c [!HAVE_STRING_H && !_LIBC]: Define memcpy using + bcopy if not already defined. Reported by Thomas Esken. + * bindtextdom.c: Likewise. + * l10nflist.c: Likewise. + * localealias.c: Likewise. + * textdomain.c: Likewise. + +Tue Oct 29 11:10:27 1996 Ulrich Drepper + + * Makefile.in (libdir): Change to use exec_prefix instead of + prefix. Reported by Knut-HåvardAksnes . + +Sat Aug 31 03:07:09 1996 Ulrich Drepper + + * l10nflist.c (_nl_normalize_codeset): We convert to lower case, + so don't prepend uppercase `ISO' for only numeric arg. + +Fri Jul 19 00:15:46 1996 Ulrich Drepper + + * l10nflist.c: Move inclusion of argz.h, ctype.h, stdlib.h after + definition of _GNU_SOURCE. Patch by Roland McGrath. + + * Makefile.in (uninstall): Fix another bug with `for' loop and + empty arguments. Patch by Jim Meyering. Correct name os + uninstalled files: no intl- prefix anymore. + + * Makefile.in (install-data): Again work around shells which + cannot handle mpty for list. Reported by Jim Meyering. + +Sat Jul 13 18:11:35 1996 Ulrich Drepper + + * Makefile.in (install): Split goal. Now depend on install-exec + and install-data. + (install-exec, install-data): New goals. Created from former + install goal. + Reported by Karl Berry. + +Sat Jun 22 04:58:14 1996 Ulrich Drepper + + * Makefile.in (MKINSTALLDIRS): New variable. Path to + mkinstalldirs script. + (install): use MKINSTALLDIRS variable or if the script is not present + try to find it in the $top_scrdir). + +Wed Jun 19 02:56:56 1996 Ulrich Drepper + + * l10nflist.c: Linux libc *partly* includes the argz_* functions. + Grr. Work around by renaming the static version and use macros + for renaming. + +Tue Jun 18 20:11:17 1996 Ulrich Drepper + + * l10nflist.c: Correct presence test macros of __argz_* functions. + + * l10nflist.c: Include based on test of it instead when + __argz_* functions are available. + Reported by Andreas Schwab. + +Thu Jun 13 15:17:44 1996 Ulrich Drepper + + * explodename.c, l10nflist.c: Define NULL for dumb systems. + +Tue Jun 11 17:05:13 1996 Ulrich Drepper + + * intlh.inst.in, libgettext.h (dcgettext): Rename local variable + result to __result to prevent name clash. + + * l10nflist.c, localealias.c, dcgettext.c: Define _GNU_SOURCE to + get prototype for stpcpy and strcasecmp. + + * intlh.inst.in, libgettext.h: Move declaration of + `_nl_msg_cat_cntr' outside __extension__ block to prevent warning + from gcc's -Wnested-extern option. + +Fri Jun 7 01:58:00 1996 Ulrich Drepper + + * Makefile.in (install): Remove comment. + +Thu Jun 6 17:28:17 1996 Ulrich Drepper + + * Makefile.in (install): Work around for another Buglix stupidity. + Always use an `else' close for `if's. Reported by Nelson Beebe. + + * Makefile.in (intlh.inst): Correct typo in phony rule. + Reported by Nelson Beebe. + +Thu Jun 6 01:49:52 1996 Ulrich Drepper + + * dcgettext.c (read_alias_file): Rename variable alloca_list to + block_list as the macro calls assume. + Patch by Eric Backus. + + * localealias.c [!HAVE_ALLOCA]: Define alloca as macro using + malloc. + (read_alias_file): Rename varriabe alloca_list to block_list as the + macro calls assume. + Patch by Eric Backus. + + * l10nflist.c: Correct conditional for inclusion. + Reported by Roland McGrath. + + * Makefile.in (all): Depend on all-@USE_INCLUDED_LIBINTL@, not + all-@USE_NLS@. + + * Makefile.in (install): intlh.inst comes from local dir, not + $(srcdir). + + * Makefile.in (intlh.inst): Special handling of this goal. If + used in gettext, this is really a rul to construct this file. If + used in any other package it is defined as a .PHONY rule with + empty body. + + * finddomain.c: Extract locale file information handling into + l10nfile.c. Rename local stpcpy__ function to stpcpy. + + * dcgettext.c (stpcpy): Add local definition. + + * l10nflist.c: Solve some portability problems. Patches partly by + Thomas Esken. Add local definition of stpcpy. + +Tue Jun 4 02:47:49 1996 Ulrich Drepper + + * intlh.inst.in: Don't depend including on + HAVE_LOCALE_H. Instead configure must rewrite this fiile + depending on the result of the configure run. + + * Makefile.in (install): libintl.inst is now called intlh.inst. + Add rules for updating intlh.inst from intlh.inst.in. + + * libintl.inst: Renamed to intlh.inst.in. + + * localealias.c, dcgettext.c [__GNUC__]: Define HAVE_ALLOCA to 1 + because gcc has __buitlin_alloca. + Reported by Roland McGrath. + +Mon Jun 3 00:32:16 1996 Ulrich Drepper + + * Makefile.in (installcheck): New goal to fulfill needs of + automake's distcheck. + + * Makefile.in (install): Reorder commands so that VERSION is + found. + + * Makefile.in (gettextsrcdir): Now use subdirectory intl/ in + @datadir@/gettext. + (COMSRCS): Add l10nfile.c. + (OBJECTS): Add l10nfile.o. + (DISTFILES): Rename to DISTFILE.normal. Remove $(DISTFILES.common). + (DISTFILE.gettext): Remove $(DISTFILES.common). + (all-gettext): Remove goal. + (install): If $(PACKAGE) = gettext install, otherwose do nothing. No + package but gettext itself should install libintl.h + headers. + (dist): Extend goal to work for gettext, too. + (dist-gettext): Remove goal. + + * dcgettext.c [!HAVE_ALLOCA]: Define macro alloca by using malloc. + +Sun Jun 2 17:33:06 1996 Ulrich Drepper + + * loadmsgcat.c (_nl_load_domain): Parameter is now comes from + find_l10nfile. + +Sat Jun 1 02:23:03 1996 Ulrich Drepper + + * l10nflist.c (__argz_next): Add definition. + + * dcgettext.c [!HAVE_ALLOCA]: Add code for handling missing alloca + code. Use new l10nfile handling. + + * localealias.c [!HAVE_ALLOCA]: Add code for handling missing + alloca code. + + * l10nflist.c: Initial revision. + +Tue Apr 2 18:51:18 1996 Ulrich Drepper + + * Makefile.in (all-gettext): New goal. Same as all-yes. + +Thu Mar 28 23:01:22 1996 Karl Eichwalder + + * Makefile.in (gettextsrcdir): Define using @datadir@. + +Tue Mar 26 12:39:14 1996 Ulrich Drepper + + * finddomain.c: Include . Reported by Roland McGrath. + +Sat Mar 23 02:00:35 1996 Ulrich Drepper + + * finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing + with external declaration. + +Sat Mar 2 00:47:09 1996 Ulrich Drepper + + * Makefile.in (all-no): Rename from all_no. + +Sat Feb 17 00:25:59 1996 Ulrich Drepper + + * gettextP.h [loaded_domain]: Array `successor' must now contain up + to 63 elements (because of codeset name normalization). + + * finddomain.c: Implement codeset name normalization. + +Thu Feb 15 04:39:09 1996 Ulrich Drepper + + * Makefile.in (all): Define to `all-@USE_NLS@'. + (all-yes, all_no): New goals. `all-no' is noop, `all-yes' + is former all. + +Mon Jan 15 21:46:01 1996 Howard Gayle + + * localealias.c (alias_compare): Increment string pointers in loop + of strcasecmp replacement. + +Fri Dec 29 21:16:34 1995 Ulrich Drepper + + * Makefile.in (install-src): Who commented this goal out ? :-) + +Fri Dec 29 15:08:16 1995 Ulrich Drepper + + * dcgettext.c (DCGETTEXT): Save `errno'. Failing system calls + should not effect it because a missing catalog is no error. + Reported by Harald Knig . + +Tue Dec 19 22:09:13 1995 Ulrich Drepper + + * Makefile.in (Makefile): Explicitly use $(SHELL) for running + shell scripts. + +Fri Dec 15 17:34:59 1995 Andreas Schwab + + * Makefile.in (install-src): Only install library and header when + we use the own implementation. Don't do it when using the + system's gettext or catgets functions. + + * dcgettext.c (find_msg): Must not swap domain->hash_size here. + +Sat Dec 9 16:24:37 1995 Ulrich Drepper + + * localealias.c, libintl.inst, libgettext.h, hash-string.h, + gettextP.h, finddomain.c, dcgettext.c, cat-compat.c: + Use PARAMS instead of __P. Suggested by Roland McGrath. + +Tue Dec 5 11:39:14 1995 Larry Schwimmer + + * libgettext.h: Use `#if !defined (_LIBINTL_H)' instead of `#if + !_LIBINTL_H' because Solaris defines _LIBINTL_H as empty. + +Mon Dec 4 15:42:07 1995 Ulrich Drepper + + * Makefile.in (install-src): + Install libintl.inst instead of libintl.h.install. + +Sat Dec 2 22:51:38 1995 Marcus Daniels + + * cat-compat.c (textdomain): + Reverse order in which files are tried you load. First + try local file, when this failed absolute path. + +Wed Nov 29 02:03:53 1995 Nelson H. F. Beebe + + * cat-compat.c (bindtextdomain): Add missing { }. + +Sun Nov 26 18:21:41 1995 Ulrich Drepper + + * libintl.inst: Add missing __P definition. Reported by Nelson Beebe. + + * Makefile.in: + Add dummy `all' and `dvi' goals. Reported by Tom Tromey. + +Sat Nov 25 16:12:01 1995 Franc,ois Pinard + + * hash-string.h: Capitalize arguments of macros. + +Sat Nov 25 12:01:36 1995 Ulrich Drepper + + * Makefile.in (DISTFILES): Prevent files names longer than 13 + characters. libintl.h.glibc->libintl.glibc, + libintl.h.install->libintl.inst. Reported by Joshua R. Poulson. + +Sat Nov 25 11:31:12 1995 Eric Backus + + * dcgettext.c: Fix bug in preprocessor conditionals. + +Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe + + * libgettext.h: Solaris cc does not understand + #if !SYMBOL1 && !SYMBOL2. Sad but true. + +Thu Nov 23 16:22:14 1995 Ulrich Drepper + + * hash-string.h (hash_string): + Fix for machine with >32 bit `unsigned long's. + + * dcgettext.c (DCGETTEXT): + Fix horrible bug in loop for alternative translation. + +Thu Nov 23 01:45:29 1995 Ulrich Drepper + + * po2tbl.sed.in, linux-msg.sed, xopen-msg.sed: + Some further simplifications in message number generation. + +Mon Nov 20 21:08:43 1995 Ulrich Drepper + + * libintl.h.glibc: Use __const instead of const in prototypes. + + * Makefile.in (install-src): + Install libintl.h.install instead of libintl.h. This + is a stripped-down version. Suggested by Peter Miller. + + * libintl.h.install, libintl.h.glibc: Initial revision. + + * localealias.c (_nl_expand_alias, read_alias_file): + Protect prototypes in type casts by __P. + +Tue Nov 14 16:43:58 1995 Ulrich Drepper + + * hash-string.h: Correct prototype for hash_string. + +Sun Nov 12 12:42:30 1995 Ulrich Drepper + + * hash-string.h (hash_string): Add prototype. + + * gettextP.h: Fix copyright. + (SWAP): Add prototype. + +Wed Nov 8 22:56:33 1995 Ulrich Drepper + + * localealias.c (read_alias_file): Forgot sizeof. + Avoid calling *printf function. This introduces a big overhead. + Patch by Roland McGrath. + +Tue Nov 7 14:21:08 1995 Ulrich Drepper + + * finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy. + + * finddomain.c (stpcpy): + Define substitution function local. The macro was to flaky. + + * cat-compat.c: Fix typo. + + * xopen-msg.sed, linux-msg.sed: + While bringing message number to right place only accept digits. + + * linux-msg.sed, xopen-msg.sed: Now that the counter does not have + leading 0s we don't need to remove them. Reported by Marcus + Daniels. + + * Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in + dependency. Reported by Marcus Daniels. + + * cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement. + Generally cleanup using #if instead of #ifndef. + + * Makefile.in: Correct typos in comment. By Franc,ois Pinard. + +Mon Nov 6 00:27:02 1995 Ulrich Drepper + + * Makefile.in (install-src): Don't install libintl.h and libintl.a + if we use an available gettext implementation. + +Sun Nov 5 22:02:08 1995 Ulrich Drepper + + * libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS. Reported + by Franc,ois Pinard. + + * libgettext.h: Use #if instead of #ifdef/#ifndef. + + * finddomain.c: + Comments describing what has to be done should start with FIXME. + +Sun Nov 5 19:38:01 1995 Ulrich Drepper + + * Makefile.in (DISTFILES): Split. Use DISTFILES with normal meaning. + DISTFILES.common names the files common to both dist goals. + DISTFILES.gettext are the files only distributed in GNU gettext. + +Sun Nov 5 17:32:54 1995 Ulrich Drepper + + * dcgettext.c (DCGETTEXT): Correct searching in derived locales. + This was necessary since a change in _nl_find_msg several weeks + ago. I really don't know this is still not fixed. + +Sun Nov 5 12:43:12 1995 Ulrich Drepper + + * loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL. This + might mark a special condition. + + * finddomain.c (make_entry_rec): Don't make illegal entry as decided. + + * Makefile.in (dist): Suppress error message when ln failed. + Get files from $(srcdir) explicitly. + + * libgettext.h (gettext_const): Rename to gettext_noop. + +Fri Nov 3 07:36:50 1995 Ulrich Drepper + + * finddomain.c (make_entry_rec): + Protect against wrong locale names by testing mask. + + * libgettext.h (gettext_const): Add macro definition. + Capitalize macro arguments. + +Thu Nov 2 23:15:51 1995 Ulrich Drepper + + * finddomain.c (_nl_find_domain): + Test for pointer != NULL before accessing value. + Reported by Tom Tromey. + + * gettext.c (NULL): + Define as (void*)0 instad of 0. Reported by Franc,ois Pinard. + +Mon Oct 30 21:28:52 1995 Ulrich Drepper + + * po2tbl.sed.in: Serious typo bug fixed by Jim Meyering. + +Sat Oct 28 23:20:47 1995 Ulrich Drepper + + * libgettext.h: Disable dcgettext optimization for Solaris 2.3. + + * localealias.c (alias_compare): + Peter Miller reported that tolower in some systems is + even dumber than I thought. Protect call by `isupper'. + +Fri Oct 27 22:22:51 1995 Ulrich Drepper + + * Makefile.in (libdir, includedir): New variables. + (install-src): Install libintl.a and libintl.h in correct dirs. + +Fri Oct 27 22:07:29 1995 Ulrich Drepper + + * Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c. + + * po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques. + + * localealias.c: + Fix typo and superflous test. Reported by Christian von Roques. + +Fri Oct 6 11:52:05 1995 Ulrich Drepper + + * finddomain.c (_nl_find_domain): + Correct some remainder from the pre-CEN syntax. Now + we don't have a constant number of successors anymore. + +Wed Sep 27 21:41:13 1995 Ulrich Drepper + + * Makefile.in (DISTFILES): Add libintl.h.glibc. + + * Makefile.in (dist-libc): Add goal for packing sources for glibc. + (COMSRCS, COMHDRS): Splitted to separate sources shared with glibc. + + * loadmsgcat.c: Forget to continue #if line. + + * localealias.c: + [_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name + space clean. + + * dcgettext.c, finddomain.c: Better comment to last change. + + * loadmsgcat.c: + [_LIBC]: Rename fstat, open, close, read, mmap, and munmap to + __fstat, __open, __close, __read, __mmap, and __munmap resp + to keep ANSI C name space clean. + + * finddomain.c: + [_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean. + + * dcgettext.c: + [_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to + keep ANSI C name space clean. + + * libgettext.h: + Include sys/types.h for those old SysV systems out there. + Reported by Francesco Potorti`. + + * loadmsgcat.c (use_mmap): Define if compiled for glibc. + + * bindtextdom.c: Include all those standard headers + unconditionally if _LIBC is defined. + + * finddomain.c: Fix 2 times defiend -> defined. + + * textdomain.c: Include libintl.h instead of libgettext.h when + compiling for glibc. Include all those standard headers + unconditionally if _LIBC is defined. + + * localealias.c, loadmsgcat.c: Prepare to be compiled in glibc. + + * gettext.c: + Include libintl.h instead of libgettext.h when compiling for glibc. + Get NULL from stddef.h if we compile for glibc. + + * finddomain.c: Include libintl.h instead of libgettext.h when + compiling for glibc. Include all those standard headers + unconditionally if _LIBC is defined. + + * dcgettext.c: Include all those standard headers unconditionally + if _LIBC is defined. + + * dgettext.c: If compiled in glibc include libintl.h instead of + libgettext.h. + (locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc. + + * dcgettext.c: If compiled in glibc include libintl.h instead of + libgettext.h. + (getcwd): Don't rely on HAVE_GETCWD when compiling for glibc. + + * bindtextdom.c: + If compiled in glibc include libintl.h instead of libgettext.h. + +Mon Sep 25 22:23:06 1995 Ulrich Drepper + + * localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0. + Reported by Marcus Daniels. + + * cat-compat.c (bindtextdomain): + String used in putenv must not be recycled. + Reported by Marcus Daniels. + + * libgettext.h (__USE_GNU_GETTEXT): + Additional symbol to signal that we use GNU gettext + library. + + * cat-compat.c (bindtextdomain): + Fix bug with the strange stpcpy replacement. + Reported by Nelson Beebe. + +Sat Sep 23 08:23:51 1995 Ulrich Drepper + + * cat-compat.c: Include for stpcpy prototype. + + * localealias.c (read_alias_file): + While expand strdup code temporary variable `cp' hided + higher level variable with same name. Rename to `tp'. + + * textdomain.c (textdomain): + Avoid warning by using temporary variable in strdup code. + + * finddomain.c (_nl_find_domain): Remove unused variable `application'. + +Thu Sep 21 15:51:44 1995 Ulrich Drepper + + * localealias.c (alias_compare): + Use strcasecmp() only if available. Else use + implementation in place. + + * intl-compat.c: + Wrapper functions now call *__ functions instead of __*. + + * libgettext.h: Declare prototypes for *__ functions instead for __*. + + * cat-compat.c, loadmsgcat.c: + Don't use xmalloc, xstrdup, and stpcpy. These functions are not part + of the standard libc and so prevent libintl.a from being used + standalone. + + * bindtextdom.c: + Don't use xmalloc, xstrdup, and stpcpy. These functions are not part + of the standard libc and so prevent libintl.a from being used + standalone. + Rename to bindtextdomain__ if not used in GNU C Library. + + * dgettext.c: + Rename function to dgettext__ if not used in GNU C Library. + + * gettext.c: + Don't use xmalloc, xstrdup, and stpcpy. These functions are not part + of the standard libc and so prevent libintl.a from being used + standalone. + Functions now called gettext__ if not used in GNU C Library. + + * dcgettext.c, localealias.c, textdomain.c, finddomain.c: + Don't use xmalloc, xstrdup, and stpcpy. These functions are not part + of the standard libc and so prevent libintl.a from being used + standalone. + +Sun Sep 17 23:14:49 1995 Ulrich Drepper + + * finddomain.c: Correct some bugs in handling of CEN standard + locale definitions. + +Thu Sep 7 01:49:28 1995 Ulrich Drepper + + * finddomain.c: Implement CEN syntax. + + * gettextP.h (loaded_domain): Extend number of successors to 31. + +Sat Aug 19 19:25:29 1995 Ulrich Drepper + + * Makefile.in (aliaspath): Remove path to X11 locale dir. + + * Makefile.in: Make install-src depend on install. This helps + gettext to install the sources and other packages can use the + install goal. + +Sat Aug 19 15:19:33 1995 Ulrich Drepper + + * Makefile.in (uninstall): Remove stuff installed by install-src. + +Tue Aug 15 13:13:53 1995 Ulrich Drepper + + * VERSION.in: Initial revision. + + * Makefile.in (DISTFILES): + Add VERSION file. This is not necessary for gettext, but + for other packages using this library. + +Tue Aug 15 06:16:44 1995 Ulrich Drepper + + * gettextP.h (_nl_find_domain): + New prototype after changing search strategy. + + * finddomain.c (_nl_find_domain): + We now try only to find a specified catalog. Fall back to other + catalogs listed in the locale list is now done in __dcgettext. + + * dcgettext.c (__dcgettext): + Now we provide message fall back even to different languages. + I.e. if a message is not available in one language all the other + in the locale list a tried. Formerly fall back was only possible + within one language. Implemented by moving one loop from + _nl_find_domain to here. + +Mon Aug 14 23:45:50 1995 Ulrich Drepper + + * Makefile.in (gettextsrcdir): + Directory where source of GNU gettext library are made + available. + (INSTALL, INSTALL_DATA): Programs used for installing sources. + (gettext-src): New. Rule to install GNU gettext sources for use in + gettextize shell script. + +Sun Aug 13 14:40:48 1995 Ulrich Drepper + + * loadmsgcat.c (_nl_load_domain): + Use mmap for loading only when munmap function is + also available. + + * Makefile.in (install): Depend on `all' goal. + +Wed Aug 9 11:04:33 1995 Ulrich Drepper + + * localealias.c (read_alias_file): + Do not overwrite '\n' when terminating alias value string. + + * localealias.c (read_alias_file): + Handle long lines. Ignore the rest not fitting in + the buffer after the initial `fgets' call. + +Wed Aug 9 00:54:29 1995 Ulrich Drepper + + * gettextP.h (_nl_load_domain): + Add prototype, replacing prototype for _nl_load_msg_cat. + + * finddomain.c (_nl_find_domain): + Remove unneeded variable filename and filename_len. + (expand_alias): Remove prototype because functions does not + exist anymore. + + * localealias.c (read_alias_file): + Change type of fname_len parameter to int. + (xmalloc): Add prototype. + + * loadmsgcat.c: Better prototypes for xmalloc. + +Tue Aug 8 22:30:39 1995 Ulrich Drepper + + * finddomain.c (_nl_find_domain): + Allow alias name to be constructed from the four components. + + * Makefile.in (aliaspath): New variable. Set to preliminary value. + (SOURCES): Add localealias.c. + (OBJECTS): Add localealias.o. + + * gettextP.h: Add prototype for _nl_expand_alias. + + * finddomain.c: Aliasing handled in intl/localealias.c. + + * localealias.c: Aliasing for locale names. + + * bindtextdom.c: Better prototypes for xmalloc and xstrdup. + +Mon Aug 7 23:47:42 1995 Ulrich Drepper + + * Makefile.in (DISTFILES): gettext.perl is now found in misc/. + + * cat-compat.c (bindtextdomain): + Correct implementation. dirname parameter was not used. + Reported by Marcus Daniels. + + * gettextP.h (loaded_domain): + New fields `successor' and `decided' for oo, lazy + message handling implementation. + + * dcgettext.c: + Adopt for oo, lazy message handliing. + Now we can inherit translations from less specific locales. + (find_msg): New function. + + * loadmsgcat.c, finddomain.c: + Complete rewrite. Implement oo, lazy message handling :-). + We now have an additional environment variable `LANGUAGE' with + a higher priority than LC_ALL for the LC_MESSAGE locale. + Here we can set a colon separated list of specifications each + of the form `language[_territory[.codeset]][@modifier]'. + +Sat Aug 5 09:55:42 1995 Ulrich Drepper + + * finddomain.c (unistd.h): + Include to get _PC_PATH_MAX defined on system having it. + +Fri Aug 4 22:42:00 1995 Ulrich Drepper + + * finddomain.c (stpcpy): Include prototype. + + * Makefile.in (dist): Remove `copying instead' message. + +Wed Aug 2 18:52:03 1995 Ulrich Drepper + + * Makefile.in (ID, TAGS): Do not use $^. + +Tue Aug 1 20:07:11 1995 Ulrich Drepper + + * Makefile.in (TAGS, ID): Use $^ as command argument. + (TAGS): Give etags -o option t write to current directory, + not $(srcdir). + (ID): Use $(srcdir) instead os $(top_srcdir)/src. + (distclean): Remove ID. + +Sun Jul 30 11:51:46 1995 Ulrich Drepper + + * Makefile.in (gnulocaledir): + New variable, always using share/ for data directory. + (DEFS): Add GNULOCALEDIR, used in finddomain.c. + + * finddomain.c (_nl_default_dirname): + Set to GNULOCALEDIR, because it always has to point + to the directory where GNU gettext Library writes it to. + + * intl-compat.c (textdomain, bindtextdomain): + Undefine macros before function definition. + +Sat Jul 22 01:10:02 1995 Ulrich Drepper + + * libgettext.h (_LIBINTL_H): + Protect definition in case where this file is included as + libgettext.h on Solaris machines. Add comment about this. + +Wed Jul 19 02:36:42 1995 Ulrich Drepper + + * intl-compat.c (textdomain): Correct typo. + +Wed Jul 19 01:51:35 1995 Ulrich Drepper + + * dcgettext.c (dcgettext): Function now called __dcgettext. + + * dgettext.c (dgettext): Now called __dgettext and calls + __dcgettext. + + * gettext.c (gettext): + Function now called __gettext and calls __dgettext. + + * textdomain.c (textdomain): Function now called __textdomain. + + * bindtextdom.c (bindtextdomain): Function now called + __bindtextdomain. + + * intl-compat.c: Initial revision. + + * Makefile.in (SOURCES): Add intl-compat.c. + (OBJECTS): We always compile the GNU gettext library functions. + OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o, + and intl-compat.o. + (GETTOBJS): Contains now only intl-compat.o. + + * libgettext.h: + Re-include protection matches dualistic character of libgettext.h. + For all functions in GNU gettext library define __ counter part. + + * finddomain.c (strchr): Define as index if not found in C library. + (_nl_find_domain): For relative paths paste / in between. + +Tue Jul 18 16:37:45 1995 Ulrich Drepper + + * loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h. + + * xopen-msg.sed: Fix bug with `msgstr ""' lines. + A little bit better comments. + +Tue Jul 18 01:18:27 1995 Ulrich Drepper + + * Makefile.in: + po-mode.el, makelinks, combine-sh are now found in ../misc. + + * po-mode.el, makelinks, combine-sh, elisp-comp: + Moved to ../misc/. + + * libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__. + +Sun Jul 16 22:33:02 1995 Ulrich Drepper + + * Makefile.in (INSTALL, INSTALL_DATA): New variables. + (install-data, uninstall): Install/uninstall .elc file. + + * po-mode.el (Installation comment): + Add .pox as possible extension of .po files. + +Sun Jul 16 13:23:27 1995 Ulrich Drepper + + * elisp-comp: Complete new version by Franc,ois: This does not + fail when not compiling in the source directory. + +Sun Jul 16 00:12:17 1995 Ulrich Drepper + + * Makefile.in (../po/cat-id-tbl.o): + Use $(MAKE) instead of make for recursive make. + + * Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh. + (install-exec): Add missing dummy goal. + (install-data, uninstall): @ in multi-line shell command at + beginning, not in front of echo. Reported by Eric Backus. + +Sat Jul 15 00:21:28 1995 Ulrich Drepper + + * Makefile.in (DISTFILES): + Rename libgettext.perl to gettext.perl to fit in 14 chars + file systems. + + * gettext.perl: + Rename to gettext.perl to fit in 14 chars file systems. + +Thu Jul 13 23:17:20 1995 Ulrich Drepper + + * cat-compat.c: If !STDC_HEADERS try to include malloc.h. + +Thu Jul 13 20:55:02 1995 Ulrich Drepper + + * po2tbl.sed.in: Pretty printing. + + * linux-msg.sed, xopen-msg.sed: + Correct bugs with handling substitute flags in branches. + + * hash-string.h (hash_string): + Old K&R compilers don't under stand `unsigned char'. + + * gettext.h (nls_uint32): + Some old K&R compilers (eg HP) don't understand `unsigned int'. + + * cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes. + +Thu Jul 13 01:34:33 1995 Ulrich Drepper + + * Makefile.in (ELCFILES): New variable. + (DISTFILES): Add elisp-comp. + Add implicit rule for .el -> .elc compilation. + (install-data): install $ELCFILES + (clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp. + + * elisp-comp: Initial revision + +Wed Jul 12 16:14:52 1995 Ulrich Drepper + + * Makefile.in: + cat-id-tbl.c is now found in po/. This enables us to use an identical + intl/ directory in all packages. + + * dcgettext.c (dcgettext): hashing does not work for table size <= 2. + + * textdomain.c: fix typo (#if def -> #if defined) + +Tue Jul 11 18:44:43 1995 Ulrich Drepper + + * Makefile.in (stamp-cat-id): use top_srcdir to address source files + (DISTFILES,distclean): move tupdate.perl to src/ + + * po-to-tbl.sed.in: + add additional jump to clear change flag to recognize multiline strings + +Tue Jul 11 01:32:50 1995 Ulrich Drepper + + * textdomain.c: Protect inclusion of stdlib.h and string.h. + + * loadmsgcat.c: Protect inclusion of stdlib.h. + + * libgettext.h: Protect inclusion of locale.h. + Allow use in C++ programs. + Define NULL is not happened already. + + * Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of + po-to-tbl.sed. + (distclean): remove po-to-tbl.sed and tupdate.perl. + + * tupdate.perl.in: Substitute Perl path even in exec line. + Don't include entries without translation from old .po file. + +Tue Jul 4 00:41:51 1995 Ulrich Drepper + + * tupdate.perl.in: use "Updated: " in msgid "". + + * cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR). + Define getenv if !__STDC__. + + * bindtextdom.c: Protect stdlib.h and string.h inclusion. + Define free if !__STDC__. + + * finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR. + Define free if !__STDC__. + + * cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR. + +Mon Jul 3 23:56:30 1995 Ulrich Drepper + + * Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR. + Remove unneeded $(srcdir) from Makefile.in dependency. + + * makelinks: Add copyright and short description. + + * po-mode.el: Last version for 0.7. + + * tupdate.perl.in: Fix die message. + + * dcgettext.c: Protect include of string.h. + + * gettext.c: Protect include of stdlib.h and further tries to get NULL. + + * finddomain.c: Some corrections in includes. + + * Makefile.in (INCLUDES): Prune list correct path to Makefile.in. + + * po-to-tbl.sed: Adopt for new .po file format. + + * linux-msg.sed, xopen-msg.sed: Adopt for new .po file format. + +Sun Jul 2 23:55:03 1995 Ulrich Drepper + + * tupdate.perl.in: Complete rewrite for new .po file format. + +Sun Jul 2 02:06:50 1995 Ulrich Drepper + + * First official release. This directory contains all the code + needed to internationalize own packages. It provides functions + which allow to use the X/Open catgets function with an interface + like the Uniforum gettext function. For system which does not + have neither of those a complete implementation is provided. diff --git a/gnu/usr.bin/lynx/intl/VERSION b/gnu/usr.bin/lynx/intl/VERSION new file mode 100644 index 00000000000..d31950a61d6 --- /dev/null +++ b/gnu/usr.bin/lynx/intl/VERSION @@ -0,0 +1 @@ +GNU gettext library from gettext-0.10.32 diff --git a/gnu/usr.bin/lynx/intl/bindtextdom.c b/gnu/usr.bin/lynx/intl/bindtextdom.c new file mode 100644 index 00000000000..d700dd53397 --- /dev/null +++ b/gnu/usr.bin/lynx/intl/bindtextdom.c @@ -0,0 +1,199 @@ +/* Implementation of the bindtextdomain(3) function + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif + +#ifdef _LIBC +# include +#else +# include +#endif +#include +#include + +/* @@ end of prolog @@ */ + +/* Contains the default location of the message catalogs. */ +extern const char _nl_default_dirname[]; + +/* List with bindings of specific domains. */ +extern struct binding *_nl_domain_bindings; + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define BINDTEXTDOMAIN __bindtextdomain +# define strdup(str) __strdup (str) +#else +# define BINDTEXTDOMAIN bindtextdomain__ +#endif + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +char * +BINDTEXTDOMAIN (domainname, dirname) + const char *domainname; + const char *dirname; +{ + struct binding *binding; + + /* Some sanity checks. */ + if (domainname == NULL || domainname[0] == '\0') + return NULL; + + for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) + { + int compare = strcmp (domainname, binding->domainname); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It is not in the list. */ + binding = NULL; + break; + } + } + + if (dirname == NULL) + /* The current binding has be to returned. */ + return binding == NULL ? (char *) _nl_default_dirname : binding->dirname; + + if (binding != NULL) + { + /* The domain is already bound. If the new value and the old + one are equal we simply do nothing. Otherwise replace the + old binding. */ + if (strcmp (dirname, binding->dirname) != 0) + { + char *new_dirname; + + if (strcmp (dirname, _nl_default_dirname) == 0) + new_dirname = (char *) _nl_default_dirname; + else + { +#if defined _LIBC || defined HAVE_STRDUP + new_dirname = strdup (dirname); + if (new_dirname == NULL) + return NULL; +#else + size_t len = strlen (dirname) + 1; + new_dirname = (char *) malloc (len); + if (new_dirname == NULL) + return NULL; + + memcpy (new_dirname, dirname, len); +#endif + } + + if (binding->dirname != _nl_default_dirname) + free (binding->dirname); + + binding->dirname = new_dirname; + } + } + else + { + /* We have to create a new binding. */ + size_t len; + struct binding *new_binding = + (struct binding *) malloc (sizeof (*new_binding)); + + if (new_binding == NULL) + return NULL; + +#if defined _LIBC || defined HAVE_STRDUP + new_binding->domainname = strdup (domainname); + if (new_binding->domainname == NULL) + return NULL; +#else + len = strlen (domainname) + 1; + new_binding->domainname = (char *) malloc (len); + if (new_binding->domainname == NULL) + return NULL; + memcpy (new_binding->domainname, domainname, len); +#endif + + if (strcmp (dirname, _nl_default_dirname) == 0) + new_binding->dirname = (char *) _nl_default_dirname; + else + { +#if defined _LIBC || defined HAVE_STRDUP + new_binding->dirname = strdup (dirname); + if (new_binding->dirname == NULL) + return NULL; +#else + len = strlen (dirname) + 1; + new_binding->dirname = (char *) malloc (len); + if (new_binding->dirname == NULL) + return NULL; + memcpy (new_binding->dirname, dirname, len); +#endif + } + + /* Now enqueue it. */ + if (_nl_domain_bindings == NULL + || strcmp (domainname, _nl_domain_bindings->domainname) < 0) + { + new_binding->next = _nl_domain_bindings; + _nl_domain_bindings = new_binding; + } + else + { + binding = _nl_domain_bindings; + while (binding->next != NULL + && strcmp (domainname, binding->next->domainname) > 0) + binding = binding->next; + + new_binding->next = binding->next; + binding->next = new_binding; + } + + binding = new_binding; + } + + return binding->dirname; +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__bindtextdomain, bindtextdomain); +#endif diff --git a/gnu/usr.bin/lynx/intl/cat-compat.c b/gnu/usr.bin/lynx/intl/cat-compat.c new file mode 100644 index 00000000000..13323820c88 --- /dev/null +++ b/gnu/usr.bin/lynx/intl/cat-compat.c @@ -0,0 +1,262 @@ +/* Compatibility code for gettext-using-catgets interface. + Copyright (C) 1995, 1997 Free Software Foundation, Inc. + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#ifdef STDC_HEADERS +# include +# include +#else +char *getenv (); +# ifdef HAVE_MALLOC_H +# include +# endif +#endif + +#ifdef HAVE_NL_TYPES_H +# include +#endif + +#include + +/* @@ end of prolog @@ */ + +/* XPG3 defines the result of `setlocale (category, NULL)' as: + ``Directs `setlocale()' to query `category' and return the current + setting of `local'.'' + However it does not specify the exact format. And even worse: POSIX + defines this not at all. So we can use this feature only on selected + system (e.g., those using GNU C Library). */ +#ifdef _LIBC +# define HAVE_LOCALE_NULL +#endif + +/* The catalog descriptor. */ +static nl_catd catalog = (nl_catd) -1; + +/* Name of the default catalog. */ +static const char default_catalog_name[] = "messages"; + +/* Name of currently used catalog. */ +static const char *catalog_name = default_catalog_name; + +/* Get ID for given string. If not found return -1. */ +static int msg_to_cat_id PARAMS ((const char *msg)); + +/* Substitution for systems lacking this function in their C library. */ +#if !_LIBC && !HAVE_STPCPY +static char *stpcpy PARAMS ((char *dest, const char *src)); +#endif + + +/* Set currently used domain/catalog. */ +char * +textdomain (domainname) + const char *domainname; +{ + nl_catd new_catalog; + char *new_name; + size_t new_name_len; + char *lang; + +#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \ + && defined HAVE_LOCALE_NULL + lang = setlocale (LC_MESSAGES, NULL); +#else + lang = getenv ("LC_ALL"); + if (lang == NULL || lang[0] == '\0') + { + lang = getenv ("LC_MESSAGES"); + if (lang == NULL || lang[0] == '\0') + lang = getenv ("LANG"); + } +#endif + if (lang == NULL || lang[0] == '\0') + lang = "C"; + + /* See whether name of currently used domain is asked. */ + if (domainname == NULL) + return (char *) catalog_name; + + if (domainname[0] == '\0') + domainname = default_catalog_name; + + /* Compute length of added path element. */ + new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang) + + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1 + + sizeof (".cat"); + + new_name = (char *) malloc (new_name_len); + if (new_name == NULL) + return NULL; + + strcpy (new_name, PACKAGE); + new_catalog = catopen (new_name, 0); + + if (new_catalog == (nl_catd) -1) + { + /* NLSPATH search didn't work, try absolute path */ + sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang, + PACKAGE); + new_catalog = catopen (new_name, 0); + + if (new_catalog == (nl_catd) -1) + { + free (new_name); + return (char *) catalog_name; + } + } + + /* Close old catalog. */ + if (catalog != (nl_catd) -1) + catclose (catalog); + if (catalog_name != default_catalog_name) + free ((char *) catalog_name); + + catalog = new_catalog; + catalog_name = new_name; + + return (char *) catalog_name; +} + +char * +bindtextdomain (domainname, dirname) + const char *domainname; + const char *dirname; +{ +#if HAVE_SETENV || HAVE_PUTENV + char *old_val, *new_val, *cp; + size_t new_val_len; + + /* This does not make much sense here but to be compatible do it. */ + if (domainname == NULL) + return NULL; + + /* Compute length of added path element. If we use setenv we don't need + the first byts for NLSPATH=, but why complicate the code for this + peanuts. */ + new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname) + + sizeof ("/%L/LC_MESSAGES/%N.cat"); + + old_val = getenv ("NLSPATH"); + if (old_val == NULL || old_val[0] == '\0') + { + old_val = NULL; + new_val_len += 1 + sizeof (LOCALEDIR) - 1 + + sizeof ("/%L/LC_MESSAGES/%N.cat"); + } + else + new_val_len += strlen (old_val); + + new_val = (char *) malloc (new_val_len); + if (new_val == NULL) + return NULL; + +# if HAVE_SETENV + cp = new_val; +# else + cp = stpcpy (new_val, "NLSPATH="); +# endif + + cp = stpcpy (cp, dirname); + cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:"); + + if (old_val == NULL) + { +# if __STDC__ + stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat"); +# else + + cp = stpcpy (cp, LOCALEDIR); + stpcpy (cp, "/%L/LC_MESSAGES/%N.cat"); +# endif + } + else + stpcpy (cp, old_val); + +# if HAVE_SETENV + setenv ("NLSPATH", new_val, 1); + free (new_val); +# else + putenv (new_val); + /* Do *not* free the environment entry we just entered. It is used + from now on. */ +# endif + +#endif + + return (char *) domainname; +} + +#undef gettext +char * +gettext (msg) + const char *msg; +{ + int msgid; + + if (msg == NULL || catalog == (nl_catd) -1) + return (char *) msg; + + /* Get the message from the catalog. We always use set number 1. + The message ID is computed by the function `msg_to_cat_id' + which works on the table generated by `po-to-tbl'. */ + msgid = msg_to_cat_id (msg); + if (msgid == -1) + return (char *) msg; + + return catgets (catalog, 1, msgid, (char *) msg); +} + +/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries + for the one equal to msg. If it is found return the ID. In case when + the string is not found return -1. */ +static int +msg_to_cat_id (msg) + const char *msg; +{ + int cnt; + + for (cnt = 0; cnt < _msg_tbl_length; ++cnt) + if (strcmp (msg, _msg_tbl[cnt]._msg) == 0) + return _msg_tbl[cnt]._msg_number; + + return -1; +} + + +/* @@ begin of epilog @@ */ + +/* We don't want libintl.a to depend on any other library. So we + avoid the non-standard function stpcpy. In GNU C Library this + function is available, though. Also allow the symbol HAVE_STPCPY + to be defined. */ +#if !_LIBC && !HAVE_STPCPY +static char * +stpcpy (dest, src) + char *dest; + const char *src; +{ + while ((*dest++ = *src++) != '\0') + /* Do nothing. */ ; + return dest - 1; +} +#endif diff --git a/gnu/usr.bin/lynx/intl/dcgettext.c b/gnu/usr.bin/lynx/intl/dcgettext.c new file mode 100644 index 00000000000..47331cc662c --- /dev/null +++ b/gnu/usr.bin/lynx/intl/dcgettext.c @@ -0,0 +1,593 @@ +/* Implementation of the dcgettext(3) function + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#ifdef __GNUC__ +# define alloca __builtin_alloca +# define HAVE_ALLOCA 1 +#else +# if defined HAVE_ALLOCA_H || defined _LIBC +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca +char *alloca (); +# endif +# endif +# endif +#endif + +#include +#ifndef errno +extern int errno; +#endif +#ifndef __set_errno +# define __set_errno(val) errno = (val) +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +char *getenv (); +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include +#else +# include +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#include +#include +#ifdef _LIBC +# include +#else +# include +#endif +#include + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# define getcwd __getcwd +# define stpcpy __stpcpy +#else +# if !defined HAVE_GETCWD +char *getwd (); +# define getcwd(buf, max) getwd (buf) +# else +char *getcwd (); +# endif +# ifndef HAVE_STPCPY +static char *stpcpy PARAMS ((char *dest, const char *src)); +# endif +#endif + +/* Amount to increase buffer size by in each try. */ +#define PATH_INCR 32 + +/* The following is from pathmax.h. */ +/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define + PATH_MAX but might cause redefinition warnings when sys/param.h is + later included (as on MORE/BSD 4.3). */ +#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__)) +# include +#endif + +#ifndef _POSIX_PATH_MAX +# define _POSIX_PATH_MAX 255 +#endif + +#if !defined(PATH_MAX) && defined(_PC_PATH_MAX) +# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX)) +#endif + +/* Don't include sys/param.h if it already has been. */ +#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN) +# include +#endif + +#if !defined(PATH_MAX) && defined(MAXPATHLEN) +# define PATH_MAX MAXPATHLEN +#endif + +#ifndef PATH_MAX +# define PATH_MAX _POSIX_PATH_MAX +#endif + +/* XPG3 defines the result of `setlocale (category, NULL)' as: + ``Directs `setlocale()' to query `category' and return the current + setting of `local'.'' + However it does not specify the exact format. And even worse: POSIX + defines this not at all. So we can use this feature only on selected + system (e.g., those using GNU C Library). */ +#ifdef _LIBC +# define HAVE_LOCALE_NULL +#endif + +/* Name of the default domain used for gettext(3) prior any call to + textdomain(3). The default value for this is "messages". */ +const char _nl_default_default_domain[] = "messages"; + +/* Value used as the default domain for gettext(3). */ +const char *_nl_current_default_domain = _nl_default_default_domain; + +/* Contains the default location of the message catalogs. */ +const char _nl_default_dirname[] = GNULOCALEDIR; + +/* List with bindings of specific domains created by bindtextdomain() + calls. */ +struct binding *_nl_domain_bindings; + +/* Prototypes for local functions. */ +static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file, + const char *msgid)); +static const char *category_to_name PARAMS ((int category)); +static const char *guess_category_value PARAMS ((int category, + const char *categoryname)); + + +/* For those loosing systems which don't have `alloca' we have to add + some additional code emulating it. */ +#ifdef HAVE_ALLOCA +/* Nothing has to be done. */ +# define ADD_BLOCK(list, address) /* nothing */ +# define FREE_BLOCKS(list) /* nothing */ +#else +struct block_list +{ + void *address; + struct block_list *next; +}; +# define ADD_BLOCK(list, addr) \ + do { \ + struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ + /* If we cannot get a free block we cannot add the new element to \ + the list. */ \ + if (newp != NULL) { \ + newp->address = (addr); \ + newp->next = (list); \ + (list) = newp; \ + } \ + } while (0) +# define FREE_BLOCKS(list) \ + do { \ + while (list != NULL) { \ + struct block_list *old = list; \ + list = list->next; \ + free (old); \ + } \ + } while (0) +# undef alloca +# define alloca(size) (malloc (size)) +#endif /* have alloca */ + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define DCGETTEXT __dcgettext +#else +# define DCGETTEXT dcgettext__ +#endif + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +char * +DCGETTEXT (domainname, msgid, category) + const char *domainname; + const char *msgid; + int category; +{ +#ifndef HAVE_ALLOCA + struct block_list *block_list = NULL; +#endif + struct loaded_l10nfile *domain; + struct binding *binding; + const char *categoryname; + const char *categoryvalue; + char *dirname, *xdomainname; + char *single_locale; + char *retval; + int saved_errno = errno; + + /* If no real MSGID is given return NULL. */ + if (msgid == NULL) + return NULL; + + /* If DOMAINNAME is NULL, we are interested in the default domain. If + CATEGORY is not LC_MESSAGES this might not make much sense but the + defintion left this undefined. */ + if (domainname == NULL) + domainname = _nl_current_default_domain; + + /* First find matching binding. */ + for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) + { + int compare = strcmp (domainname, binding->domainname); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It is not in the list. */ + binding = NULL; + break; + } + } + + if (binding == NULL) + dirname = (char *) _nl_default_dirname; + else if (binding->dirname[0] == '/') + dirname = binding->dirname; + else + { + /* We have a relative path. Make it absolute now. */ + size_t dirname_len = strlen (binding->dirname) + 1; + size_t path_max; + char *ret; + + path_max = (unsigned) PATH_MAX; + path_max += 2; /* The getcwd docs say to do this. */ + + dirname = (char *) alloca (path_max + dirname_len); + ADD_BLOCK (block_list, dirname); + + __set_errno (0); + while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE) + { + path_max += PATH_INCR; + dirname = (char *) alloca (path_max + dirname_len); + ADD_BLOCK (block_list, dirname); + __set_errno (0); + } + + if (ret == NULL) + { + /* We cannot get the current working directory. Don't signal an + error but simply return the default string. */ + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return (char *) msgid; + } + + stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname); + } + + /* Now determine the symbolic name of CATEGORY and its value. */ + categoryname = category_to_name (category); + categoryvalue = guess_category_value (category, categoryname); + + xdomainname = (char *) alloca (strlen (categoryname) + + strlen (domainname) + 5); + ADD_BLOCK (block_list, xdomainname); + + stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"), + domainname), + ".mo"); + + /* Creating working area. */ + single_locale = (char *) alloca (strlen (categoryvalue) + 1); + ADD_BLOCK (block_list, single_locale); + + + /* Search for the given string. This is a loop because we perhaps + got an ordered list of languages to consider for th translation. */ + while (1) + { + /* Make CATEGORYVALUE point to the next element of the list. */ + while (categoryvalue[0] != '\0' && categoryvalue[0] == ':') + ++categoryvalue; + if (categoryvalue[0] == '\0') + { + /* The whole contents of CATEGORYVALUE has been searched but + no valid entry has been found. We solve this situation + by implicitly appending a "C" entry, i.e., no translation + will take place. */ + single_locale[0] = 'C'; + single_locale[1] = '\0'; + } + else + { + char *cp = single_locale; + while (categoryvalue[0] != '\0' && categoryvalue[0] != ':') + *cp++ = *categoryvalue++; + *cp = '\0'; + } + + /* If the current locale value is C (or POSIX) we don't load a + domain. Return the MSGID. */ + if (strcmp (single_locale, "C") == 0 + || strcmp (single_locale, "POSIX") == 0) + { + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return (char *) msgid; + } + + + /* Find structure describing the message catalog matching the + DOMAINNAME and CATEGORY. */ + domain = _nl_find_domain (dirname, single_locale, xdomainname); + + if (domain != NULL) + { + retval = find_msg (domain, msgid); + + if (retval == NULL) + { + int cnt; + + for (cnt = 0; domain->successor[cnt] != NULL; ++cnt) + { + retval = find_msg (domain->successor[cnt], msgid); + + if (retval != NULL) + break; + } + } + + if (retval != NULL) + { + FREE_BLOCKS (block_list); + __set_errno (saved_errno); + return retval; + } + } + } + /* NOTREACHED */ +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__dcgettext, dcgettext); +#endif + + +static char * +find_msg (domain_file, msgid) + struct loaded_l10nfile *domain_file; + const char *msgid; +{ + size_t top, act, bottom; + struct loaded_domain *domain; + + if (domain_file->decided == 0) + _nl_load_domain (domain_file); + + if (domain_file->data == NULL) + return NULL; + + domain = (struct loaded_domain *) domain_file->data; + + /* Locate the MSGID and its translation. */ + if (domain->hash_size > 2 && domain->hash_tab != NULL) + { + /* Use the hashing table. */ + nls_uint32 len = strlen (msgid); + nls_uint32 hash_val = hash_string (msgid); + nls_uint32 idx = hash_val % domain->hash_size; + nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); + nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]); + + if (nstr == 0) + /* Hash table entry is empty. */ + return NULL; + + if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len + && strcmp (msgid, + domain->data + W (domain->must_swap, + domain->orig_tab[nstr - 1].offset)) == 0) + return (char *) domain->data + W (domain->must_swap, + domain->trans_tab[nstr - 1].offset); + + while (1) + { + if (idx >= domain->hash_size - incr) + idx -= domain->hash_size - incr; + else + idx += incr; + + nstr = W (domain->must_swap, domain->hash_tab[idx]); + if (nstr == 0) + /* Hash table entry is empty. */ + return NULL; + + if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len + && strcmp (msgid, + domain->data + W (domain->must_swap, + domain->orig_tab[nstr - 1].offset)) + == 0) + return (char *) domain->data + + W (domain->must_swap, domain->trans_tab[nstr - 1].offset); + } + /* NOTREACHED */ + } + + /* Now we try the default method: binary search in the sorted + array of messages. */ + bottom = 0; + top = domain->nstrings; + while (bottom < top) + { + int cmp_val; + + act = (bottom + top) / 2; + cmp_val = strcmp (msgid, domain->data + + W (domain->must_swap, + domain->orig_tab[act].offset)); + if (cmp_val < 0) + top = act; + else if (cmp_val > 0) + bottom = act + 1; + else + break; + } + + /* If an translation is found return this. */ + return bottom >= top ? NULL : (char *) domain->data + + W (domain->must_swap, + domain->trans_tab[act].offset); +} + + +/* Return string representation of locale CATEGORY. */ +static const char * +category_to_name (category) + int category; +{ + const char *retval; + + switch (category) + { +#ifdef LC_COLLATE + case LC_COLLATE: + retval = "LC_COLLATE"; + break; +#endif +#ifdef LC_CTYPE + case LC_CTYPE: + retval = "LC_CTYPE"; + break; +#endif +#ifdef LC_MONETARY + case LC_MONETARY: + retval = "LC_MONETARY"; + break; +#endif +#ifdef LC_NUMERIC + case LC_NUMERIC: + retval = "LC_NUMERIC"; + break; +#endif +#ifdef LC_TIME + case LC_TIME: + retval = "LC_TIME"; + break; +#endif +#ifdef LC_MESSAGES + case LC_MESSAGES: + retval = "LC_MESSAGES"; + break; +#endif +#ifdef LC_RESPONSE + case LC_RESPONSE: + retval = "LC_RESPONSE"; + break; +#endif +#ifdef LC_ALL + case LC_ALL: + /* This might not make sense but is perhaps better than any other + value. */ + retval = "LC_ALL"; + break; +#endif + default: + /* If you have a better idea for a default value let me know. */ + retval = "LC_XXX"; + } + + return retval; +} + +/* Guess value of current locale from value of the environment variables. */ +static const char * +guess_category_value (category, categoryname) + int category; + const char *categoryname; +{ + const char *retval; + + /* The highest priority value is the `LANGUAGE' environment + variable. This is a GNU extension. */ + retval = getenv ("LANGUAGE"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* `LANGUAGE' is not set. So we have to proceed with the POSIX + methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some + systems this can be done by the `setlocale' function itself. */ +#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL + return setlocale (category, NULL); +#else + /* Setting of LC_ALL overwrites all other. */ + retval = getenv ("LC_ALL"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* Next comes the name of the desired category. */ + retval = getenv (categoryname); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* Last possibility is the LANG environment variable. */ + retval = getenv ("LANG"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* We use C as the default domain. POSIX says this is implementation + defined. */ + return "C"; +#endif +} + +/* @@ begin of epilog @@ */ + +/* We don't want libintl.a to depend on any other library. So we + avoid the non-standard function stpcpy. In GNU C Library this + function is available, though. Also allow the symbol HAVE_STPCPY + to be defined. */ +#if !_LIBC && !HAVE_STPCPY +static char * +stpcpy (dest, src) + char *dest; + const char *src; +{ + while ((*dest++ = *src++) != '\0') + /* Do nothing. */ ; + return dest - 1; +} +#endif diff --git a/gnu/usr.bin/lynx/intl/dgettext.c b/gnu/usr.bin/lynx/intl/dgettext.c new file mode 100644 index 00000000000..d5f479c3eb7 --- /dev/null +++ b/gnu/usr.bin/lynx/intl/dgettext.c @@ -0,0 +1,59 @@ +/* dgettext.c -- implementation of the dgettext(3) function + Copyright (C) 1995 Software Foundation, Inc. + +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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if defined HAVE_LOCALE_H || defined _LIBC +# include +#endif + +#ifdef _LIBC +# include +#else +# include +#endif + +/* @@ end of prolog @@ */ + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define DGETTEXT __dgettext +# define DCGETTEXT __dcgettext +#else +# define DGETTEXT dgettext__ +# define DCGETTEXT dcgettext__ +#endif + +/* Look up MSGID in the DOMAINNAME message catalog of the current + LC_MESSAGES locale. */ +char * +DGETTEXT (domainname, msgid) + const char *domainname; + const char *msgid; +{ + return DCGETTEXT (domainname, msgid, LC_MESSAGES); +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__dgettext, dgettext); +#endif diff --git a/gnu/usr.bin/lynx/intl/explodename.c b/gnu/usr.bin/lynx/intl/explodename.c new file mode 100644 index 00000000000..a7cce98b2a7 --- /dev/null +++ b/gnu/usr.bin/lynx/intl/explodename.c @@ -0,0 +1,181 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Contributed by Ulrich Drepper , 1995. + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#include + +/* On some strange systems still no definition of NULL is found. Sigh! */ +#ifndef NULL +# if defined __STDC__ && __STDC__ +# define NULL ((void *) 0) +# else +# define NULL 0 +# endif +#endif + +/* @@ end of prolog @@ */ + +int +_nl_explode_name (name, language, modifier, territory, codeset, + normalized_codeset, special, sponsor, revision) + char *name; + const char **language; + const char **modifier; + const char **territory; + const char **codeset; + const char **normalized_codeset; + const char **special; + const char **sponsor; + const char **revision; +{ + enum { undecided, xpg, cen } syntax; + char *cp; + int mask; + + *modifier = NULL; + *territory = NULL; + *codeset = NULL; + *normalized_codeset = NULL; + *special = NULL; + *sponsor = NULL; + *revision = NULL; + + /* Now we determine the single parts of the locale name. First + look for the language. Termination symbols are `_' and `@' if + we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ + mask = 0; + syntax = undecided; + *language = cp = name; + while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@' + && cp[0] != '+' && cp[0] != ',') + ++cp; + + if (*language == cp) + /* This does not make sense: language has to be specified. Use + this entry as it is without exploding. Perhaps it is an alias. */ + cp = strchr (*language, '\0'); + else if (cp[0] == '_') + { + /* Next is the territory. */ + cp[0] = '\0'; + *territory = ++cp; + + while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@' + && cp[0] != '+' && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= TERRITORY; + + if (cp[0] == '.') + { + /* Next is the codeset. */ + syntax = xpg; + cp[0] = '\0'; + *codeset = ++cp; + + while (cp[0] != '\0' && cp[0] != '@') + ++cp; + + mask |= XPG_CODESET; + + if (*codeset != cp && (*codeset)[0] != '\0') + { + *normalized_codeset = _nl_normalize_codeset (*codeset, + cp - *codeset); + if (strcmp (*codeset, *normalized_codeset) == 0) + free ((char *) *normalized_codeset); + else + mask |= XPG_NORM_CODESET; + } + } + } + + if (cp[0] == '@' || (syntax != xpg && cp[0] == '+')) + { + /* Next is the modifier. */ + syntax = cp[0] == '@' ? xpg : cen; + cp[0] = '\0'; + *modifier = ++cp; + + while (syntax == cen && cp[0] != '\0' && cp[0] != '+' + && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= XPG_MODIFIER | CEN_AUDIENCE; + } + + if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_')) + { + syntax = cen; + + if (cp[0] == '+') + { + /* Next is special application (CEN syntax). */ + cp[0] = '\0'; + *special = ++cp; + + while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_') + ++cp; + + mask |= CEN_SPECIAL; + } + + if (cp[0] == ',') + { + /* Next is sponsor (CEN syntax). */ + cp[0] = '\0'; + *sponsor = ++cp; + + while (cp[0] != '\0' && cp[0] != '_') + ++cp; + + mask |= CEN_SPONSOR; + } + + if (cp[0] == '_') + { + /* Next is revision (CEN syntax). */ + cp[0] = '\0'; + *revision = ++cp; + + mask |= CEN_REVISION; + } + } + + /* For CEN syntax values it might be important to have the + separator character in the file name, not for XPG syntax. */ + if (syntax == xpg) + { + if (*territory != NULL && (*territory)[0] == '\0') + mask &= ~TERRITORY; + + if (*codeset != NULL && (*codeset)[0] == '\0') + mask &= ~XPG_CODESET; + + if (*modifier != NULL && (*modifier)[0] == '\0') + mask &= ~XPG_MODIFIER; + } + + return mask; +} diff --git a/gnu/usr.bin/lynx/intl/finddomain.c b/gnu/usr.bin/lynx/intl/finddomain.c new file mode 100644 index 00000000000..33c11fc7a3e --- /dev/null +++ b/gnu/usr.bin/lynx/intl/finddomain.c @@ -0,0 +1,189 @@ +/* Handle list of needed message catalogs + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#include +#include +#ifdef _LIBC +# include +#else +# include +#endif + +/* @@ end of prolog @@ */ +/* List of already loaded domains. */ +static struct loaded_l10nfile *_nl_loaded_domains; + + +/* Return a data structure describing the message catalog described by + the DOMAINNAME and CATEGORY parameters with respect to the currently + established bindings. */ +struct loaded_l10nfile * +_nl_find_domain (dirname, locale, domainname) + const char *dirname; + char *locale; + const char *domainname; +{ + struct loaded_l10nfile *retval; + const char *language; + const char *modifier; + const char *territory; + const char *codeset; + const char *normalized_codeset; + const char *special; + const char *sponsor; + const char *revision; + const char *alias_value; + int mask; + + /* LOCALE can consist of up to four recognized parts for the XPG syntax: + + language[_territory[.codeset]][@modifier] + + and six parts for the CEN syntax: + + language[_territory][+audience][+special][,[sponsor][_revision]] + + Beside the first all of them are allowed to be missing. If the + full specified locale is not found, the less specific one are + looked for. The various part will be stripped of according to + the following order: + (1) revision + (2) sponsor + (3) special + (4) codeset + (5) normalized codeset + (6) territory + (7) audience/modifier + */ + + /* If we have already tested for this locale entry there has to + be one data set in the list of loaded domains. */ + retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, + strlen (dirname) + 1, 0, locale, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, domainname, 0); + if (retval != NULL) + { + /* We know something about this locale. */ + int cnt; + + if (retval->decided == 0) + _nl_load_domain (retval); + + if (retval->data != NULL) + return retval; + + for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) + { + if (retval->successor[cnt]->decided == 0) + _nl_load_domain (retval->successor[cnt]); + + if (retval->successor[cnt]->data != NULL) + break; + } + return cnt >= 0 ? retval : NULL; + /* NOTREACHED */ + } + + /* See whether the locale value is an alias. If yes its value + *overwrites* the alias name. No test for the original value is + done. */ + alias_value = _nl_expand_alias (locale); + if (alias_value != NULL) + { + size_t len = strlen (alias_value) + 1; + locale = (char *) malloc (len); + if (locale == NULL) + return NULL; + + memcpy (locale, alias_value, len); + } + + /* Now we determine the single parts of the locale name. First + look for the language. Termination symbols are `_' and `@' if + we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ + mask = _nl_explode_name (locale, &language, &modifier, &territory, + &codeset, &normalized_codeset, &special, + &sponsor, &revision); + + /* Create all possible locale entries which might be interested in + generalization. */ + retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, + strlen (dirname) + 1, mask, language, territory, + codeset, normalized_codeset, modifier, special, + sponsor, revision, domainname, 1); + if (retval == NULL) + /* This means we are out of core. */ + return NULL; + + if (retval->decided == 0) + _nl_load_domain (retval); + if (retval->data == NULL) + { + int cnt; + for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) + { + if (retval->successor[cnt]->decided == 0) + _nl_load_domain (retval->successor[cnt]); + if (retval->successor[cnt]->data != NULL) + break; + } + } + + /* The room for an alias was dynamically allocated. Free it now. */ + if (alias_value != NULL) + free (locale); + + return retval; +} diff --git a/gnu/usr.bin/lynx/intl/gettext.c b/gnu/usr.bin/lynx/intl/gettext.c new file mode 100644 index 00000000000..b7791872e7b --- /dev/null +++ b/gnu/usr.bin/lynx/intl/gettext.c @@ -0,0 +1,70 @@ +/* Implementation of gettext(3) function + Copyright (C) 1995, 1997 Free Software Foundation, Inc. + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifdef _LIBC +# define __need_NULL +# include +#else +# ifdef STDC_HEADERS +# include /* Just for NULL. */ +# else +# ifdef HAVE_STRING_H +# include +# else +# define NULL ((void *) 0) +# endif +# endif +#endif + +#ifdef _LIBC +# include +#else +# include +#endif + +/* @@ end of prolog @@ */ + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define GETTEXT __gettext +# define DGETTEXT __dgettext +#else +# define GETTEXT gettext__ +# define DGETTEXT dgettext__ +#endif + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +char * +GETTEXT (msgid) + const char *msgid; +{ + return DGETTEXT (NULL, msgid); +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__gettext, gettext); +#endif diff --git a/gnu/usr.bin/lynx/intl/gettext.h b/gnu/usr.bin/lynx/intl/gettext.h new file mode 100644 index 00000000000..6b4b9e3316c --- /dev/null +++ b/gnu/usr.bin/lynx/intl/gettext.h @@ -0,0 +1,105 @@ +/* Internal header for GNU gettext internationalization functions + Copyright (C) 1995, 1997 Free Software Foundation, Inc. + + 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, 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 Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _GETTEXT_H +#define _GETTEXT_H 1 + +#include + +#if HAVE_LIMITS_H || _LIBC +# include +#endif + +/* @@ end of prolog @@ */ + +/* The magic number of the GNU message catalog format. */ +#define _MAGIC 0x950412de +#define _MAGIC_SWAPPED 0xde120495 + +/* Revision number of the currently used .mo (binary) file format. */ +#define MO_REVISION_NUMBER 0 + +/* The following contortions are an attempt to use the C preprocessor + to determine an unsigned integral type that is 32 bits wide. An + alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but + doing that would require that the configure script compile and *run* + the resulting executable. Locally running cross-compiled executables + is usually not possible. */ + +#if __STDC__ +# define UINT_MAX_32_BITS 4294967295U +#else +# define UINT_MAX_32_BITS 0xFFFFFFFF +#endif + +/* If UINT_MAX isn't defined, assume it's a 32-bit type. + This should be valid for all systems GNU cares about because + that doesn't include 16-bit systems, and only modern systems + (that certainly have ) have 64+-bit integral types. */ + +#ifndef UINT_MAX +# define UINT_MAX UINT_MAX_32_BITS +#endif + +#if UINT_MAX == UINT_MAX_32_BITS +typedef unsigned nls_uint32; +#else +# if USHRT_MAX == UINT_MAX_32_BITS +typedef unsigned short nls_uint32; +# else +# if ULONG_MAX == UINT_MAX_32_BITS +typedef unsigned long nls_uint32; +# else + /* The following line is intended to throw an error. Using #error is + not portable enough. */ + "Cannot determine unsigned 32-bit data type." +# endif +# endif +#endif + + +/* Header for binary .mo file format. */ +struct mo_file_header +{ + /* The magic number. */ + nls_uint32 magic; + /* The revision number of the file format. */ + nls_uint32 revision; + /* The number of strings pairs. */ + nls_uint32 nstrings; + /* Offset of table with start offsets of original strings. */ + nls_uint32 orig_tab_offset; + /* Offset of table with start offsets of translation strings. */ + nls_uint32 trans_tab_offset; + /* Size of hashing table. */ + nls_uint32 hash_tab_size; + /* Offset of first hashing entry. */ + nls_uint32 hash_tab_offset; +}; + +struct string_desc +{ + /* Length of addressed string. */ + nls_uint32 length; + /* Offset of string in file. */ + nls_uint32 offset; +}; + +/* @@ begin of epilog @@ */ + +#endif /* gettext.h */ diff --git a/gnu/usr.bin/lynx/intl/gettextP.h b/gnu/usr.bin/lynx/intl/gettextP.h new file mode 100644 index 00000000000..197d62dad53 --- /dev/null +++ b/gnu/usr.bin/lynx/intl/gettextP.h @@ -0,0 +1,73 @@ +/* Header describing internals of gettext library + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef _GETTEXTP_H +#define _GETTEXTP_H + +#include + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +#ifndef W +# define W(flag, data) ((flag) ? SWAP (data) : (data)) +#endif + + +static nls_uint32 SWAP PARAMS ((nls_uint32 i)); + +static inline nls_uint32 +SWAP (i) + nls_uint32 i; +{ + return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); +} + + +struct loaded_domain +{ + const char *data; + int must_swap; + nls_uint32 nstrings; + struct string_desc *orig_tab; + struct string_desc *trans_tab; + nls_uint32 hash_size; + nls_uint32 *hash_tab; +}; + +struct binding +{ + struct binding *next; + char *domainname; + char *dirname; +}; + +struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname, + char *__locale, + const char *__domainname)); +void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain)); + +/* @@ begin of epilog @@ */ + +#endif /* gettextP.h */ diff --git a/gnu/usr.bin/lynx/intl/hash-string.h b/gnu/usr.bin/lynx/intl/hash-string.h new file mode 100644 index 00000000000..e66e8417a97 --- /dev/null +++ b/gnu/usr.bin/lynx/intl/hash-string.h @@ -0,0 +1,63 @@ +/* Implements a string hashing function. + Copyright (C) 1995, 1997 Free Software Foundation, Inc. + + 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, 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 Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_VALUES_H +# include +#endif + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(Args) Args +# else +# define PARAMS(Args) () +# endif +#endif + +/* We assume to have `unsigned long int' value with at least 32 bits. */ +#define HASHWORDBITS 32 + + +/* Defines the so called `hashpjw' function by P.J. Weinberger + [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, + 1986, 1987 Bell Telephone Laboratories, Inc.] */ +static unsigned long hash_string PARAMS ((const char *__str_param)); + +static inline unsigned long +hash_string (str_param) + const char *str_param; +{ + unsigned long int hval, g; + const char *str = str_param; + + /* Compute the hash value for the given string. */ + hval = 0; + while (*str != '\0') + { + hval <<= 4; + hval += (unsigned long) *str++; + g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4)); + if (g != 0) + { + hval ^= g >> (HASHWORDBITS - 8); + hval ^= g; + } + } + return hval; +} diff --git a/gnu/usr.bin/lynx/intl/intl-compat.c b/gnu/usr.bin/lynx/intl/intl-compat.c new file mode 100644 index 00000000000..e17e68d757f --- /dev/null +++ b/gnu/usr.bin/lynx/intl/intl-compat.c @@ -0,0 +1,76 @@ +/* intl-compat.c - Stub functions to call gettext functions from GNU gettext + Library. + Copyright (C) 1995 Software Foundation, Inc. + +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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +/* @@ end of prolog @@ */ + + +#undef gettext +#undef dgettext +#undef dcgettext +#undef textdomain +#undef bindtextdomain + + +char * +bindtextdomain (domainname, dirname) + const char *domainname; + const char *dirname; +{ + return bindtextdomain__ (domainname, dirname); +} + + +char * +dcgettext (domainname, msgid, category) + const char *domainname; + const char *msgid; + int category; +{ + return dcgettext__ (domainname, msgid, category); +} + + +char * +dgettext (domainname, msgid) + const char *domainname; + const char *msgid; +{ + return dgettext__ (domainname, msgid); +} + + +char * +gettext (msgid) + const char *msgid; +{ + return gettext__ (msgid); +} + + +char * +textdomain (domainname) + const char *domainname; +{ + return textdomain__ (domainname); +} diff --git a/gnu/usr.bin/lynx/intl/l10nflist.c b/gnu/usr.bin/lynx/intl/l10nflist.c new file mode 100644 index 00000000000..2ae3596280a --- /dev/null +++ b/gnu/usr.bin/lynx/intl/l10nflist.c @@ -0,0 +1,409 @@ +/* Handle list of needed message catalogs + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#if defined _LIBC || defined HAVE_ARGZ_H +# include +#endif +#include +#include + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#include + +/* On some strange systems still no definition of NULL is found. Sigh! */ +#ifndef NULL +# if defined __STDC__ && __STDC__ +# define NULL ((void *) 0) +# else +# define NULL 0 +# endif +#endif + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# define stpcpy(dest, src) __stpcpy(dest, src) +#else +# ifndef HAVE_STPCPY +static char *stpcpy PARAMS ((char *dest, const char *src)); +# endif +#endif + +/* Define function which are usually not available. */ + +#if !defined _LIBC && !defined HAVE___ARGZ_COUNT +/* Returns the number of strings in ARGZ. */ +static size_t argz_count__ PARAMS ((const char *argz, size_t len)); + +static size_t +argz_count__ (argz, len) + const char *argz; + size_t len; +{ + size_t count = 0; + while (len > 0) + { + size_t part_len = strlen (argz); + argz += part_len + 1; + len -= part_len + 1; + count++; + } + return count; +} +# undef __argz_count +# define __argz_count(argz, len) argz_count__ (argz, len) +#endif /* !_LIBC && !HAVE___ARGZ_COUNT */ + +#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY +/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's + except the last into the character SEP. */ +static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep)); + +static void +argz_stringify__ (argz, len, sep) + char *argz; + size_t len; + int sep; +{ + while (len > 0) + { + size_t part_len = strlen (argz); + argz += part_len; + len -= part_len + 1; + if (len > 0) + *argz++ = sep; + } +} +# undef __argz_stringify +# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep) +#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ + +#if !defined _LIBC && !defined HAVE___ARGZ_NEXT +static char *argz_next__ PARAMS ((char *argz, size_t argz_len, + const char *entry)); + +static char * +argz_next__ (argz, argz_len, entry) + char *argz; + size_t argz_len; + const char *entry; +{ + if (entry) + { + if (entry < argz + argz_len) + entry = strchr (entry, '\0') + 1; + + return entry >= argz + argz_len ? NULL : (char *) entry; + } + else + if (argz_len > 0) + return argz; + else + return 0; +} +# undef __argz_next +# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry) +#endif /* !_LIBC && !HAVE___ARGZ_NEXT */ + + +/* Return number of bits set in X. */ +static int pop PARAMS ((int x)); + +static inline int +pop (x) + int x; +{ + /* We assume that no more than 16 bits are used. */ + x = ((x & ~0x5555) >> 1) + (x & 0x5555); + x = ((x & ~0x3333) >> 2) + (x & 0x3333); + x = ((x >> 4) + x) & 0x0f0f; + x = ((x >> 8) + x) & 0xff; + + return x; +} + + +struct loaded_l10nfile * +_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, + territory, codeset, normalized_codeset, modifier, special, + sponsor, revision, filename, do_allocate) + struct loaded_l10nfile **l10nfile_list; + const char *dirlist; + size_t dirlist_len; + int mask; + const char *language; + const char *territory; + const char *codeset; + const char *normalized_codeset; + const char *modifier; + const char *special; + const char *sponsor; + const char *revision; + const char *filename; + int do_allocate; +{ + char *abs_filename; + struct loaded_l10nfile *last = NULL; + struct loaded_l10nfile *retval; + char *cp; + size_t entries; + int cnt; + + /* Allocate room for the full file name. */ + abs_filename = (char *) malloc (dirlist_len + + strlen (language) + + ((mask & TERRITORY) != 0 + ? strlen (territory) + 1 : 0) + + ((mask & XPG_CODESET) != 0 + ? strlen (codeset) + 1 : 0) + + ((mask & XPG_NORM_CODESET) != 0 + ? strlen (normalized_codeset) + 1 : 0) + + (((mask & XPG_MODIFIER) != 0 + || (mask & CEN_AUDIENCE) != 0) + ? strlen (modifier) + 1 : 0) + + ((mask & CEN_SPECIAL) != 0 + ? strlen (special) + 1 : 0) + + (((mask & CEN_SPONSOR) != 0 + || (mask & CEN_REVISION) != 0) + ? (1 + ((mask & CEN_SPONSOR) != 0 + ? strlen (sponsor) + 1 : 0) + + ((mask & CEN_REVISION) != 0 + ? strlen (revision) + 1 : 0)) : 0) + + 1 + strlen (filename) + 1); + + if (abs_filename == NULL) + return NULL; + + retval = NULL; + last = NULL; + + /* Construct file name. */ + memcpy (abs_filename, dirlist, dirlist_len); + __argz_stringify (abs_filename, dirlist_len, ':'); + cp = abs_filename + (dirlist_len - 1); + *cp++ = '/'; + cp = stpcpy (cp, language); + + if ((mask & TERRITORY) != 0) + { + *cp++ = '_'; + cp = stpcpy (cp, territory); + } + if ((mask & XPG_CODESET) != 0) + { + *cp++ = '.'; + cp = stpcpy (cp, codeset); + } + if ((mask & XPG_NORM_CODESET) != 0) + { + *cp++ = '.'; + cp = stpcpy (cp, normalized_codeset); + } + if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0) + { + /* This component can be part of both syntaces but has different + leading characters. For CEN we use `+', else `@'. */ + *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@'; + cp = stpcpy (cp, modifier); + } + if ((mask & CEN_SPECIAL) != 0) + { + *cp++ = '+'; + cp = stpcpy (cp, special); + } + if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0) + { + *cp++ = ','; + if ((mask & CEN_SPONSOR) != 0) + cp = stpcpy (cp, sponsor); + if ((mask & CEN_REVISION) != 0) + { + *cp++ = '_'; + cp = stpcpy (cp, revision); + } + } + + *cp++ = '/'; + stpcpy (cp, filename); + + /* Look in list of already loaded domains whether it is already + available. */ + last = NULL; + for (retval = *l10nfile_list; retval != NULL; retval = retval->next) + if (retval->filename != NULL) + { + int compare = strcmp (retval->filename, abs_filename); + if (compare == 0) + /* We found it! */ + break; + if (compare < 0) + { + /* It's not in the list. */ + retval = NULL; + break; + } + + last = retval; + } + + if (retval != NULL || do_allocate == 0) + { + free (abs_filename); + return retval; + } + + retval = (struct loaded_l10nfile *) + malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len) + * (1 << pop (mask)) + * sizeof (struct loaded_l10nfile *))); + if (retval == NULL) + return NULL; + + retval->filename = abs_filename; + retval->decided = (__argz_count (dirlist, dirlist_len) != 1 + || ((mask & XPG_CODESET) != 0 + && (mask & XPG_NORM_CODESET) != 0)); + retval->data = NULL; + + if (last == NULL) + { + retval->next = *l10nfile_list; + *l10nfile_list = retval; + } + else + { + retval->next = last->next; + last->next = retval; + } + + entries = 0; + /* If the DIRLIST is a real list the RETVAL entry corresponds not to + a real file. So we have to use the DIRLIST separation mechanism + of the inner loop. */ + cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask; + for (; cnt >= 0; --cnt) + if ((cnt & ~mask) == 0 + && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0) + && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0)) + { + /* Iterate over all elements of the DIRLIST. */ + char *dir = NULL; + + while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir)) + != NULL) + retval->successor[entries++] + = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt, + language, territory, codeset, + normalized_codeset, modifier, special, + sponsor, revision, filename, 1); + } + retval->successor[entries] = NULL; + + return retval; +} + +/* Normalize codeset name. There is no standard for the codeset + names. Normalization allows the user to use any of the common + names. */ +const char * +_nl_normalize_codeset (codeset, name_len) + const char *codeset; + size_t name_len; +{ + int len = 0; + int only_digit = 1; + char *retval; + char *wp; + size_t cnt; + + for (cnt = 0; cnt < name_len; ++cnt) + if (isalnum (codeset[cnt])) + { + ++len; + + if (isalpha (codeset[cnt])) + only_digit = 0; + } + + retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1); + + if (retval != NULL) + { + if (only_digit) + wp = stpcpy (retval, "iso"); + else + wp = retval; + + for (cnt = 0; cnt < name_len; ++cnt) + if (isalpha (codeset[cnt])) + *wp++ = tolower (codeset[cnt]); + else if (isdigit (codeset[cnt])) + *wp++ = codeset[cnt]; + + *wp = '\0'; + } + + return (const char *) retval; +} + + +/* @@ begin of epilog @@ */ + +/* We don't want libintl.a to depend on any other library. So we + avoid the non-standard function stpcpy. In GNU C Library this + function is available, though. Also allow the symbol HAVE_STPCPY + to be defined. */ +#if !_LIBC && !HAVE_STPCPY +static char * +stpcpy (dest, src) + char *dest; + const char *src; +{ + while ((*dest++ = *src++) != '\0') + /* Do nothing. */ ; + return dest - 1; +} +#endif diff --git a/gnu/usr.bin/lynx/intl/libgettext.h b/gnu/usr.bin/lynx/intl/libgettext.h new file mode 100644 index 00000000000..3d49ab51ea0 --- /dev/null +++ b/gnu/usr.bin/lynx/intl/libgettext.h @@ -0,0 +1,182 @@ +/* Message catalogs for internationalization. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* Because on some systems (e.g., Solaris) we sometimes have to include + the systems libintl.h as well as this file we have more complex + include protection above. But the systems header might perhaps also + define _LIBINTL_H and therefore we have to protect the definition here. */ + +#if !defined (_LIBINTL_H) || !defined (_LIBGETTEXT_H) +#if !defined (_LIBINTL_H) +# define _LIBINTL_H 1 +#endif +#define _LIBGETTEXT_H 1 + +/* We define an additional symbol to signal that we use the GNU + implementation of gettext. */ +#define __USE_GNU_GETTEXT 1 + +#include + +#if HAVE_LOCALE_H +# include +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + +/* @@ end of prolog @@ */ + +#ifndef PARAMS +# if __STDC__ +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +#ifndef NULL +# if !defined __cplusplus || defined __GNUC__ +# define NULL ((void *) 0) +# else +# define NULL (0) +# endif +#endif + +#if !HAVE_LC_MESSAGES +/* This value determines the behaviour of the gettext() and dgettext() + function. But some system does not have this defined. Define it + to a default value. */ +# define LC_MESSAGES (-1) +#endif + + +/* Declarations for gettext-using-catgets interface. Derived from + Jim Meyering's libintl.h. */ +struct _msg_ent +{ + const char *_msg; + int _msg_number; +}; + + +#if HAVE_CATGETS +/* These two variables are defined in the automatically by po-to-tbl.sed + generated file `cat-id-tbl.c'. */ +extern const struct _msg_ent _msg_tbl[]; +extern int _msg_tbl_length; +#endif + + +/* For automatical extraction of messages sometimes no real + translation is needed. Instead the string itself is the result. */ +#define gettext_noop(Str) (Str) + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +extern char *gettext PARAMS ((const char *__msgid)); +extern char *gettext__ PARAMS ((const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current + LC_MESSAGES locale. */ +extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid)); +extern char *dgettext__ PARAMS ((const char *__domainname, + const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid, + int __category)); +extern char *dcgettext__ PARAMS ((const char *__domainname, + const char *__msgid, int __category)); + + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +extern char *textdomain PARAMS ((const char *__domainname)); +extern char *textdomain__ PARAMS ((const char *__domainname)); + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +extern char *bindtextdomain PARAMS ((const char *__domainname, + const char *__dirname)); +extern char *bindtextdomain__ PARAMS ((const char *__domainname, + const char *__dirname)); + +#if ENABLE_NLS + +/* Solaris 2.3 has the gettext function but dcgettext is missing. + So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4 + has dcgettext. */ +# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT) + +# define gettext(Msgid) \ + dgettext (NULL, Msgid) + +# define dgettext(Domainname, Msgid) \ + dcgettext (Domainname, Msgid, LC_MESSAGES) + +# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7 +/* This global variable is defined in loadmsgcat.c. We need a sign, + whether a new catalog was loaded, which can be associated with all + translations. */ +extern int _nl_msg_cat_cntr; + +# define dcgettext(Domainname, Msgid, Category) \ + (__extension__ \ + ({ \ + char *__result; \ + if (__builtin_constant_p (Msgid)) \ + { \ + static char *__translation__; \ + static int __catalog_counter__; \ + if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \ + { \ + __translation__ = \ + dcgettext__ (Domainname, Msgid, Category); \ + __catalog_counter__ = _nl_msg_cat_cntr; \ + } \ + __result = __translation__; \ + } \ + else \ + __result = dcgettext__ (Domainname, Msgid, Category); \ + __result; \ + })) +# endif +# endif + +#else + +# define gettext(Msgid) (Msgid) +# define dgettext(Domainname, Msgid) (Msgid) +# define dcgettext(Domainname, Msgid, Category) (Msgid) +# define textdomain(Domainname) while (0) /* nothing */ +# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */ + +#endif + +/* @@ begin of epilog @@ */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/gnu/usr.bin/lynx/intl/libintl.h b/gnu/usr.bin/lynx/intl/libintl.h new file mode 100644 index 00000000000..4b91230f884 --- /dev/null +++ b/gnu/usr.bin/lynx/intl/libintl.h @@ -0,0 +1,108 @@ +/* libintl.h -- Message catalogs for internationalization. +Copyright (C) 1995 Free Software Foundation, Inc. + +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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef _LIBINTL_H +#define _LIBINTL_H 1 + +#ifdef HAVE_LOCALE_H +# include +#endif + +/* We define an additional symbol to signal that we use the GNU + implementation of gettext. */ +#define __USE_GNU_GETTEXT 1 + +#ifndef __P +# if __STDC__ +# define __P(args) args +# else +# define __P(args) () +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +extern char *gettext __P ((const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current + LC_MESSAGES locale. */ +extern char *dgettext __P ((const char *__domainname, const char *__msgid)); + +/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +extern char *dcgettext __P ((const char *__domainname, const char *__msgid, + int __category)); + + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +extern char *textdomain __P ((const char *__domainname)); + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +extern char *bindtextdomain __P ((const char *__domainname, + const char *__dirname)); + + +/* Optimized version of the functions above. */ +#if defined __OPTIMIZED +/* These must be a macro. Inlined functions are useless because the + `__builtin_constant_p' predicate in dcgettext would always return + false. */ + +# define gettext(msgid) dgettext ((char *) 0, msgid) + +# define dgettext(domainname, msgid) \ + dcgettext (domainname, msgid, LC_MESSAGES) + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define dcgettext(domainname, msgid, category) \ + (__extension__ \ + ({ \ + char *result; \ + if (__builtin_constant_p (msgid)) \ + { \ + extern int _nl_msg_cat_cntr; \ + static char *__translation__; \ + static int __catalog_counter__; \ + if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \ + { \ + __translation__ = \ + (dcgettext) ((domainname), (msgid), (category)); \ + __catalog_counter__ = _nl_msg_cat_cntr; \ + } \ + result = __translation__; \ + } \ + else \ + result = (dcgettext) ((domainname), (msgid), (category)); \ + result; \ + })) +# endif +#endif /* Optimizing. */ + + +#ifdef __cplusplus +} +#endif + +#endif /* libintl.h */ diff --git a/gnu/usr.bin/lynx/intl/linux-msg.sed b/gnu/usr.bin/lynx/intl/linux-msg.sed new file mode 100644 index 00000000000..5918e720a9a --- /dev/null +++ b/gnu/usr.bin/lynx/intl/linux-msg.sed @@ -0,0 +1,100 @@ +# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file +# Copyright (C) 1995 Free Software Foundation, Inc. +# Ulrich Drepper , 1995. +# +# 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# +# The first directive in the .msg should be the definition of the +# message set number. We use always set number 1. +# +1 { + i\ +$set 1 # Automatically created by po2msg.sed + h + s/.*/0/ + x +} +# +# Mitch's old catalog format does not allow comments. +# +# We copy the original message as a comment into the .msg file. +# +/^msgid/ { + s/msgid[ ]*"// +# +# This does not work now with the new format. +# /"$/! { +# s/\\$// +# s/$/ ... (more lines following)"/ +# } + x +# The following nice solution is by +# Bruno + td +# Increment a decimal number in pattern space. +# First hide trailing `9' digits. + :d + s/9\(_*\)$/_\1/ + td +# Assure at least one digit is available. + s/^\(_*\)$/0\1/ +# Increment the last digit. + s/8\(_*\)$/9\1/ + s/7\(_*\)$/8\1/ + s/6\(_*\)$/7\1/ + s/5\(_*\)$/6\1/ + s/4\(_*\)$/5\1/ + s/3\(_*\)$/4\1/ + s/2\(_*\)$/3\1/ + s/1\(_*\)$/2\1/ + s/0\(_*\)$/1\1/ +# Convert the hidden `9' digits to `0's. + s/_/0/g + x + G + s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p +} +# +# The .msg file contains, other then the .po file, only the translations +# but each given a unique ID. Starting from 1 and incrementing by 1 for +# each message we assign them to the messages. +# It is important that the .po file used to generate the cat-id-tbl.c file +# (with po-to-tbl) is the same as the one used here. (At least the order +# of declarations must not be changed.) +# +/^msgstr/ { + s/msgstr[ ]*"\(.*\)"/# \1/ +# Clear substitution flag. + tb +# Append the next line. + :b + N +# Look whether second part is continuation line. + s/\(.*\n\)"\(.*\)"/\1\2/ +# Yes, then branch. + ta + P + D +# Note that D includes a jump to the start!! +# We found a continuation line. But before printing insert '\'. + :a + s/\(.*\)\(\n.*\)/\1\\\2/ + P +# We cannot use D here. + s/.*\n\(.*\)/\1/ + tb +} +d diff --git a/gnu/usr.bin/lynx/intl/loadinfo.h b/gnu/usr.bin/lynx/intl/loadinfo.h new file mode 100644 index 00000000000..c67c2eb2e8e --- /dev/null +++ b/gnu/usr.bin/lynx/intl/loadinfo.h @@ -0,0 +1,58 @@ +#ifndef PARAMS +# if __STDC__ +# define PARAMS(args) args +# else +# define PARAMS(args) () +# endif +#endif + +/* Encoding of locale name parts. */ +#define CEN_REVISION 1 +#define CEN_SPONSOR 2 +#define CEN_SPECIAL 4 +#define XPG_NORM_CODESET 8 +#define XPG_CODESET 16 +#define TERRITORY 32 +#define CEN_AUDIENCE 64 +#define XPG_MODIFIER 128 + +#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE) +#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER) + + +struct loaded_l10nfile +{ + const char *filename; + int decided; + + const void *data; + + struct loaded_l10nfile *next; + struct loaded_l10nfile *successor[1]; +}; + + +extern const char *_nl_normalize_codeset PARAMS ((const char *codeset, + size_t name_len)); + +extern struct loaded_l10nfile * +_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list, + const char *dirlist, size_t dirlist_len, int mask, + const char *language, const char *territory, + const char *codeset, + const char *normalized_codeset, + const char *modifier, const char *special, + const char *sponsor, const char *revision, + const char *filename, int do_allocate)); + + +extern const char *_nl_expand_alias PARAMS ((const char *name)); + +extern int _nl_explode_name PARAMS ((char *name, const char **language, + const char **modifier, + const char **territory, + const char **codeset, + const char **normalized_codeset, + const char **special, + const char **sponsor, + const char **revision)); diff --git a/gnu/usr.bin/lynx/intl/loadmsgcat.c b/gnu/usr.bin/lynx/intl/loadmsgcat.c new file mode 100644 index 00000000000..19b2cce9434 --- /dev/null +++ b/gnu/usr.bin/lynx/intl/loadmsgcat.c @@ -0,0 +1,199 @@ +/* Load needed message catalogs + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#if defined HAVE_UNISTD_H || defined _LIBC +# include +#endif + +#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC +# include +#endif + +#include +#include + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ISO C functions. This is required by the standard + because some ISO C functions will require linking with this object + file and the name space must not be polluted. */ +# define fstat __fstat +# define open __open +# define close __close +# define read __read +# define mmap __mmap +# define munmap __munmap +#endif + +/* We need a sign, whether a new catalog was loaded, which can be associated + with all translations. This is important if the translations are + cached by one of GCC's features. */ +int _nl_msg_cat_cntr = 0; + + +/* Load the message catalogs specified by FILENAME. If it is no valid + message catalog do nothing. */ +void +_nl_load_domain (domain_file) + struct loaded_l10nfile *domain_file; +{ + int fd; + struct stat st; + struct mo_file_header *data = (struct mo_file_header *) -1; +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + int use_mmap = 0; +#endif + struct loaded_domain *domain; + + domain_file->decided = 1; + domain_file->data = NULL; + + /* If the record does not represent a valid locale the FILENAME + might be NULL. This can happen when according to the given + specification the locale file name is different for XPG and CEN + syntax. */ + if (domain_file->filename == NULL) + return; + + /* Try to open the addressed file. */ + fd = open (domain_file->filename, O_RDONLY); + if (fd == -1) + return; + + /* We must know about the size of the file. */ + if (fstat (fd, &st) != 0 + && st.st_size < (off_t) sizeof (struct mo_file_header)) + { + /* Something went wrong. */ + close (fd); + return; + } + +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + /* Now we are ready to load the file. If mmap() is available we try + this first. If not available or it failed we try to load it. */ + data = (struct mo_file_header *) mmap (NULL, st.st_size, PROT_READ, + MAP_PRIVATE, fd, 0); + + if (data != (struct mo_file_header *) -1) + { + /* mmap() call was successful. */ + close (fd); + use_mmap = 1; + } +#endif + + /* If the data is not yet available (i.e., mmap'ed) we try to load + it manually. */ + if (data == (struct mo_file_header *) -1) + { + off_t to_read; + char *read_ptr; + + data = (struct mo_file_header *) malloc (st.st_size); + if (data == NULL) + return; + + to_read = st.st_size; + read_ptr = (char *) data; + do + { + long int nb = (long int) read (fd, read_ptr, to_read); + if (nb == -1) + { + close (fd); + return; + } + + read_ptr += nb; + to_read -= nb; + } + while (to_read > 0); + + close (fd); + } + + /* Using the magic number we can test whether it really is a message + catalog file. */ + if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED) + { + /* The magic number is wrong: not a message catalog file. */ +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + if (use_mmap) + munmap ((caddr_t) data, st.st_size); + else +#endif + free (data); + return; + } + + domain_file->data + = (struct loaded_domain *) malloc (sizeof (struct loaded_domain)); + if (domain_file->data == NULL) + return; + + domain = (struct loaded_domain *) domain_file->data; + domain->data = (char *) data; + domain->must_swap = data->magic != _MAGIC; + + /* Fill in the information about the available tables. */ + switch (W (domain->must_swap, data->revision)) + { + case 0: + domain->nstrings = W (domain->must_swap, data->nstrings); + domain->orig_tab = (struct string_desc *) + ((char *) data + W (domain->must_swap, data->orig_tab_offset)); + domain->trans_tab = (struct string_desc *) + ((char *) data + W (domain->must_swap, data->trans_tab_offset)); + domain->hash_size = W (domain->must_swap, data->hash_tab_size); + domain->hash_tab = (nls_uint32 *) + ((char *) data + W (domain->must_swap, data->hash_tab_offset)); + break; + default: + /* This is an illegal revision. */ +#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ + || defined _LIBC + if (use_mmap) + munmap ((caddr_t) data, st.st_size); + else +#endif + free (data); + free (domain); + domain_file->data = NULL; + return; + } + + /* Show that one domain is changed. This might make some cached + translations invalid. */ + ++_nl_msg_cat_cntr; +} diff --git a/gnu/usr.bin/lynx/intl/localealias.c b/gnu/usr.bin/lynx/intl/localealias.c new file mode 100644 index 00000000000..d13b2c645b8 --- /dev/null +++ b/gnu/usr.bin/lynx/intl/localealias.c @@ -0,0 +1,378 @@ +/* Handle aliases for locale names + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#ifdef __GNUC__ +# define alloca __builtin_alloca +# define HAVE_ALLOCA 1 +#else +# if defined HAVE_ALLOCA_H || defined _LIBC +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca +char *alloca (); +# endif +# endif +# endif +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#else +char *getenv (); +# ifdef HAVE_MALLOC_H +# include +# else +void free (); +# endif +#endif + +#if defined HAVE_STRING_H || defined _LIBC +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC +# ifndef strchr +# define strchr index +# endif +#endif + +#include +#include + +/* @@ end of prolog @@ */ + +#ifdef _LIBC +/* Rename the non ANSI C functions. This is required by the standard + because some ANSI C functions will require linking with this object + file and the name space must not be polluted. */ +# define strcasecmp __strcasecmp +#endif + + +/* For those loosing systems which don't have `alloca' we have to add + some additional code emulating it. */ +#ifdef HAVE_ALLOCA +/* Nothing has to be done. */ +# define ADD_BLOCK(list, address) /* nothing */ +# define FREE_BLOCKS(list) /* nothing */ +#else +struct block_list +{ + void *address; + struct block_list *next; +}; +# define ADD_BLOCK(list, addr) \ + do { \ + struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ + /* If we cannot get a free block we cannot add the new element to \ + the list. */ \ + if (newp != NULL) { \ + newp->address = (addr); \ + newp->next = (list); \ + (list) = newp; \ + } \ + } while (0) +# define FREE_BLOCKS(list) \ + do { \ + while (list != NULL) { \ + struct block_list *old = list; \ + list = list->next; \ + free (old); \ + } \ + } while (0) +# undef alloca +# define alloca(size) (malloc (size)) +#endif /* have alloca */ + + +struct alias_map +{ + const char *alias; + const char *value; +}; + + +static struct alias_map *map; +static size_t nmap = 0; +static size_t maxmap = 0; + + +/* Prototypes for local functions. */ +static size_t read_alias_file PARAMS ((const char *fname, int fname_len)); +static void extend_alias_table PARAMS ((void)); +static int alias_compare PARAMS ((const struct alias_map *map1, + const struct alias_map *map2)); + + +const char * +_nl_expand_alias (name) + const char *name; +{ + static const char *locale_alias_path = LOCALE_ALIAS_PATH; + struct alias_map *retval; + size_t added; + + do + { + struct alias_map item; + + item.alias = name; + + if (nmap > 0) + retval = (struct alias_map *) bsearch (&item, map, nmap, + sizeof (struct alias_map), + (int (*) PARAMS ((const void *, + const void *)) + ) alias_compare); + else + retval = NULL; + + /* We really found an alias. Return the value. */ + if (retval != NULL) + return retval->value; + + /* Perhaps we can find another alias file. */ + added = 0; + while (added == 0 && locale_alias_path[0] != '\0') + { + const char *start; + + while (locale_alias_path[0] == ':') + ++locale_alias_path; + start = locale_alias_path; + + while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':') + ++locale_alias_path; + + if (start < locale_alias_path) + added = read_alias_file (start, locale_alias_path - start); + } + } + while (added != 0); + + return NULL; +} + + +static size_t +read_alias_file (fname, fname_len) + const char *fname; + int fname_len; +{ +#ifndef HAVE_ALLOCA + struct block_list *block_list = NULL; +#endif + FILE *fp; + char *full_fname; + size_t added; + static const char aliasfile[] = "/locale.alias"; + + full_fname = (char *) alloca (fname_len + sizeof aliasfile); + ADD_BLOCK (block_list, full_fname); + memcpy (full_fname, fname, fname_len); + memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile); + + fp = fopen (full_fname, "r"); + if (fp == NULL) + { + FREE_BLOCKS (block_list); + return 0; + } + + added = 0; + while (!feof (fp)) + { + /* It is a reasonable approach to use a fix buffer here because + a) we are only interested in the first two fields + b) these fields must be usable as file names and so must not + be that long + */ + char buf[BUFSIZ]; + char *alias; + char *value; + char *cp; + + if (fgets (buf, BUFSIZ, fp) == NULL) + /* EOF reached. */ + break; + + cp = buf; + /* Ignore leading white space. */ + while (isspace (cp[0])) + ++cp; + + /* A leading '#' signals a comment line. */ + if (cp[0] != '\0' && cp[0] != '#') + { + alias = cp++; + while (cp[0] != '\0' && !isspace (cp[0])) + ++cp; + /* Terminate alias name. */ + if (cp[0] != '\0') + *cp++ = '\0'; + + /* Now look for the beginning of the value. */ + while (isspace (cp[0])) + ++cp; + + if (cp[0] != '\0') + { + char *tp; + size_t len; + + value = cp++; + while (cp[0] != '\0' && !isspace (cp[0])) + ++cp; + /* Terminate value. */ + if (cp[0] == '\n') + { + /* This has to be done to make the following test + for the end of line possible. We are looking for + the terminating '\n' which do not overwrite here. */ + *cp++ = '\0'; + *cp = '\n'; + } + else if (cp[0] != '\0') + *cp++ = '\0'; + + if (nmap >= maxmap) + extend_alias_table (); + + /* We cannot depend on strdup available in the libc. Sigh! */ + len = strlen (alias) + 1; + tp = (char *) malloc (len); + if (tp == NULL) + { + FREE_BLOCKS (block_list); + return added; + } + memcpy (tp, alias, len); + map[nmap].alias = tp; + + len = strlen (value) + 1; + tp = (char *) malloc (len); + if (tp == NULL) + { + FREE_BLOCKS (block_list); + return added; + } + memcpy (tp, value, len); + map[nmap].value = tp; + + ++nmap; + ++added; + } + } + + /* Possibly not the whole line fits into the buffer. Ignore + the rest of the line. */ + while (strchr (cp, '\n') == NULL) + { + cp = buf; + if (fgets (buf, BUFSIZ, fp) == NULL) + /* Make sure the inner loop will be left. The outer loop + will exit at the `feof' test. */ + *cp = '\n'; + } + } + + /* Should we test for ferror()? I think we have to silently ignore + errors. --drepper */ + fclose (fp); + + if (added > 0) + qsort (map, nmap, sizeof (struct alias_map), + (int (*) PARAMS ((const void *, const void *))) alias_compare); + + FREE_BLOCKS (block_list); + return added; +} + + +static void +extend_alias_table () +{ + size_t new_size; + struct alias_map *new_map; + + new_size = maxmap == 0 ? 100 : 2 * maxmap; + new_map = (struct alias_map *) malloc (new_size + * sizeof (struct alias_map)); + if (new_map == NULL) + /* Simply don't extend: we don't have any more core. */ + return; + + memcpy (new_map, map, nmap * sizeof (struct alias_map)); + + if (maxmap != 0) + free (map); + + map = new_map; + maxmap = new_size; +} + + +static int +alias_compare (map1, map2) + const struct alias_map *map1; + const struct alias_map *map2; +{ +#if defined _LIBC || defined HAVE_STRCASECMP + return strcasecmp (map1->alias, map2->alias); +#else + const unsigned char *p1 = (const unsigned char *) map1->alias; + const unsigned char *p2 = (const unsigned char *) map2->alias; + unsigned char c1, c2; + + if (p1 == p2) + return 0; + + do + { + /* I know this seems to be odd but the tolower() function in + some systems libc cannot handle nonalpha characters. */ + c1 = isupper (*p1) ? tolower (*p1) : *p1; + c2 = isupper (*p2) ? tolower (*p2) : *p2; + if (c1 == '\0') + break; + ++p1; + ++p2; + } + while (c1 == c2); + + return c1 - c2; +#endif +} diff --git a/gnu/usr.bin/lynx/intl/makefile.in b/gnu/usr.bin/lynx/intl/makefile.in new file mode 100644 index 00000000000..10c0aefec6a --- /dev/null +++ b/gnu/usr.bin/lynx/intl/makefile.in @@ -0,0 +1,216 @@ +# Makefile for directory with message catalog handling in GNU NLS Utilities. +# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +# +# 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# PACKAGE = @PACKAGE@ +PACKAGE = lynx +# VERSION = @VERSION@ +VERSION = 2.8.2 + +SHELL = @CONFIG_SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +top_builddir = .. +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +transform = @program_transform_name@ +libdir = $(exec_prefix)/lib +includedir = $(prefix)/include +datadir = @NLS_DATADIR@ +localedir = $(datadir)/locale +gnulocaledir = $(prefix)/share/locale +gettextsrcdir = @datadir@/gettext/intl +aliaspath = $(localedir):. +subdir = intl + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @MKINSTALLDIRS@ + +l = @l@ + +AR = ar +CC = @CC@ +LIBTOOL = @LIBTOOL@ +RANLIB = @RANLIB@ + +DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \ +-DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@ +CPPFLAGS = @CPPFLAGS@ +CFLAGS = @CFLAGS@ +LDFLAGS = @LDFLAGS@ + +COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) + +HEADERS = $(COMHDRS) libgettext.h loadinfo.h +COMHDRS = gettext.h gettextP.h hash-string.h +SOURCES = $(COMSRCS) intl-compat.c cat-compat.c +COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \ +finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \ +explodename.c +OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \ +finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \ +explodename.$lo +CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo +GETTOBJS = intl-compat.$lo +DISTFILES.common = ChangeLog makefile.in linux-msg.sed po2tbl.sed.in \ +xopen-msg.sed $(HEADERS) $(SOURCES) +DISTFILES.normal = VERSION +DISTFILES.gettext = libintl.glibc intlh.inst.in + +.SUFFIXES: +.SUFFIXES: .c .o .lo +.c.o: + $(COMPILE) $< +.c.lo: + $(LIBTOOL) --mode=compile $(COMPILE) $< + +INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib + +all: all-@USE_INCLUDED_LIBINTL@ + +all-yes: libintl.$la intlh.inst +all-no: + +libintl.a: $(OBJECTS) + rm -f $@ + $(AR) cru $@ $(OBJECTS) + $(RANLIB) $@ + +libintl.la: $(OBJECTS) + $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \ + -version-info 1:0 -rpath $(libdir) + +../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot + cd ../po && $(MAKE) cat-id-tbl.$lo + +check: all + +# This installation goal is only used in GNU gettext. Packages which +# only use the library should use install instead. + +# We must not install the libintl.h/libintl.a files if we are on a +# system which has the gettext() function in its C library or in a +# separate library or use the catgets interface. A special case is +# where configure found a previously installed GNU gettext library. +# If you want to use the one which comes with this version of the +# package, you have to use `configure --with-included-gettext'. +install: install-exec install-data +install-exec: all + if test "$(PACKAGE)" = "gettext" \ + && test '@INTLOBJS@' = '$(GETTOBJS)'; then \ + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $(libdir) $(includedir); \ + else \ + $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \ + fi; \ + $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \ + $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \ + else \ + : ; \ + fi +install-data: all + if test "$(PACKAGE)" = "gettext"; then \ + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $(gettextsrcdir); \ + else \ + $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ + fi; \ + $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \ + dists="$(DISTFILES.common)"; \ + for file in $$dists; do \ + $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: + dists="$(DISTFILES.common)"; \ + for file in $$dists; do \ + rm -f $(gettextsrcdir)/$$file; \ + done + +info dvi: + +$(OBJECTS): ../lynx_cfg.h libgettext.h +bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h +dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h + +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) + here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) + +id: ID + +ID: $(HEADERS) $(SOURCES) + here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES) + + +mostlyclean: + rm -f *.a *.o *.lo core core.* + +clean: mostlyclean + +distclean: clean + rm -f makefile ID TAGS po2msg.sed po2tbl.sed # libintl.h + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + + +# GNU gettext needs not contain the file `VERSION' but contains some +# other files which should not be distributed in other packages. +distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: makefile $(DISTFILES) + if test "$(PACKAGE)" = gettext; then \ + additional="$(DISTFILES.gettext)"; \ + else \ + additional="$(DISTFILES.normal)"; \ + fi; \ + for file in $(DISTFILES.common) $$additional; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +dist-libc: + tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc + +makefile: makefile.in ../config.status + cd .. \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +# The dependency for intlh.inst is different in gettext and all other +# packages. Because we cannot you GNU make features we have to solve +# the problem while rewriting makefile.in. +@GT_YES@intlh.inst: intlh.inst.in ../config.status +@GT_YES@ cd .. \ +@GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ +@GT_YES@ $(SHELL) ./config.status +@GT_NO@.PHONY: intlh.inst +@GT_NO@intlh.inst: + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/gnu/usr.bin/lynx/intl/po2tbl.sed.in b/gnu/usr.bin/lynx/intl/po2tbl.sed.in new file mode 100644 index 00000000000..b3bcca4d730 --- /dev/null +++ b/gnu/usr.bin/lynx/intl/po2tbl.sed.in @@ -0,0 +1,102 @@ +# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets +# Copyright (C) 1995 Free Software Foundation, Inc. +# Ulrich Drepper , 1995. +# +# 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +1 { + i\ +/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\ +\ +#if HAVE_CONFIG_H\ +# include \ +#endif\ +\ +#include "libgettext.h"\ +\ +const struct _msg_ent _msg_tbl[] = { + h + s/.*/0/ + x +} +# +# Write msgid entries in C array form. +# +/^msgid/ { + s/msgid[ ]*\(".*"\)/ {\1/ + tb +# Append the next line + :b + N +# Look whether second part is continuation line. + s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/ +# Yes, then branch. + ta +# Because we assume that the input file correctly formed the line +# just read cannot be again be a msgid line. So it's safe to ignore +# it. + s/\(.*\)\n.*/\1/ + bc +# We found a continuation line. But before printing insert '\'. + :a + s/\(.*\)\(\n.*\)/\1\\\2/ + P +# We cannot use D here. + s/.*\n\(.*\)/\1/ +# Some buggy seds do not clear the `successful substitution since last ``t''' +# flag on `N', so we do a `t' here to clear it. + tb +# Not reached + :c + x +# The following nice solution is by +# Bruno + td +# Increment a decimal number in pattern space. +# First hide trailing `9' digits. + :d + s/9\(_*\)$/_\1/ + td +# Assure at least one digit is available. + s/^\(_*\)$/0\1/ +# Increment the last digit. + s/8\(_*\)$/9\1/ + s/7\(_*\)$/8\1/ + s/6\(_*\)$/7\1/ + s/5\(_*\)$/6\1/ + s/4\(_*\)$/5\1/ + s/3\(_*\)$/4\1/ + s/2\(_*\)$/3\1/ + s/1\(_*\)$/2\1/ + s/0\(_*\)$/1\1/ +# Convert the hidden `9' digits to `0's. + s/_/0/g + x + G + s/\(.*\)\n\([0-9]*\)/\1, \2},/ + s/\(.*\)"$/\1/ + p +} +# +# Last line. +# +$ { + i\ +};\ + + g + s/0*\(.*\)/int _msg_tbl_length = \1;/p +} +d diff --git a/gnu/usr.bin/lynx/intl/textdomain.c b/gnu/usr.bin/lynx/intl/textdomain.c new file mode 100644 index 00000000000..cddebefddd6 --- /dev/null +++ b/gnu/usr.bin/lynx/intl/textdomain.c @@ -0,0 +1,106 @@ +/* Implementation of the textdomain(3) function + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Written by Ulrich Drepper , 1995. + + 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if defined STDC_HEADERS || defined _LIBC +# include +#endif + +#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC +# include +#else +# include +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif + +#ifdef _LIBC +# include +#else +# include +#endif + +/* @@ end of prolog @@ */ + +/* Name of the default text domain. */ +extern const char _nl_default_default_domain[]; + +/* Default text domain in which entries for gettext(3) are to be found. */ +extern const char *_nl_current_default_domain; + + +/* Names for the libintl functions are a problem. They must not clash + with existing names and they should follow ANSI C. But this source + code is also used in GNU C Library where the names have a __ + prefix. So we have to make a difference here. */ +#ifdef _LIBC +# define TEXTDOMAIN __textdomain +# define strdup(str) __strdup (str) +#else +# define TEXTDOMAIN textdomain__ +#endif + +/* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +char * +TEXTDOMAIN (domainname) + const char *domainname; +{ + char *old; + + /* A NULL pointer requests the current setting. */ + if (domainname == NULL) + return (char *) _nl_current_default_domain; + + old = (char *) _nl_current_default_domain; + + /* If domain name is the null string set to default domain "messages". */ + if (domainname[0] == '\0' + || strcmp (domainname, _nl_default_default_domain) == 0) + _nl_current_default_domain = _nl_default_default_domain; + else + { + /* If the following malloc fails `_nl_current_default_domain' + will be NULL. This value will be returned and so signals we + are out of core. */ +#if defined _LIBC || defined HAVE_STRDUP + _nl_current_default_domain = strdup (domainname); +#else + size_t len = strlen (domainname) + 1; + char *cp = (char *) malloc (len); + if (cp != NULL) + memcpy (cp, domainname, len); + _nl_current_default_domain = cp; +#endif + } + + if (old != _nl_default_default_domain) + free (old); + + return (char *) _nl_current_default_domain; +} + +#ifdef _LIBC +/* Alias for function name in GNU C Library. */ +weak_alias (__textdomain, textdomain); +#endif diff --git a/gnu/usr.bin/lynx/intl/xopen-msg.sed b/gnu/usr.bin/lynx/intl/xopen-msg.sed new file mode 100644 index 00000000000..b19c0bbd0ec --- /dev/null +++ b/gnu/usr.bin/lynx/intl/xopen-msg.sed @@ -0,0 +1,104 @@ +# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file +# Copyright (C) 1995 Free Software Foundation, Inc. +# Ulrich Drepper , 1995. +# +# 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# +# The first directive in the .msg should be the definition of the +# message set number. We use always set number 1. +# +1 { + i\ +$set 1 # Automatically created by po2msg.sed + h + s/.*/0/ + x +} +# +# We copy all comments into the .msg file. Perhaps they can help. +# +/^#/ s/^#[ ]*/$ /p +# +# We copy the original message as a comment into the .msg file. +# +/^msgid/ { +# Does not work now +# /"$/! { +# s/\\$// +# s/$/ ... (more lines following)"/ +# } + s/^msgid[ ]*"\(.*\)"$/$ Original Message: \1/ + p +} +# +# The .msg file contains, other then the .po file, only the translations +# but each given a unique ID. Starting from 1 and incrementing by 1 for +# each message we assign them to the messages. +# It is important that the .po file used to generate the cat-id-tbl.c file +# (with po-to-tbl) is the same as the one used here. (At least the order +# of declarations must not be changed.) +# +/^msgstr/ { + s/msgstr[ ]*"\(.*\)"/\1/ + x +# The following nice solution is by +# Bruno + td +# Increment a decimal number in pattern space. +# First hide trailing `9' digits. + :d + s/9\(_*\)$/_\1/ + td +# Assure at least one digit is available. + s/^\(_*\)$/0\1/ +# Increment the last digit. + s/8\(_*\)$/9\1/ + s/7\(_*\)$/8\1/ + s/6\(_*\)$/7\1/ + s/5\(_*\)$/6\1/ + s/4\(_*\)$/5\1/ + s/3\(_*\)$/4\1/ + s/2\(_*\)$/3\1/ + s/1\(_*\)$/2\1/ + s/0\(_*\)$/1\1/ +# Convert the hidden `9' digits to `0's. + s/_/0/g + x +# Bring the line in the format ` ' + G + s/^[^\n]*$/& / + s/\(.*\)\n\([0-9]*\)/\2 \1/ +# Clear flag from last substitution. + tb +# Append the next line. + :b + N +# Look whether second part is a continuation line. + s/\(.*\n\)"\(.*\)"/\1\2/ +# Yes, then branch. + ta + P + D +# Note that `D' includes a jump to the start!! +# We found a continuation line. But before printing insert '\'. + :a + s/\(.*\)\(\n.*\)/\1\\\2/ + P +# We cannot use the sed command `D' here + s/.*\n\(.*\)/\1/ + tb +} +d diff --git a/gnu/usr.bin/lynx/lynx.cfg b/gnu/usr.bin/lynx/lynx.cfg index 38a6b520ca7..26f20d969a6 100644 --- a/gnu/usr.bin/lynx/lynx.cfg +++ b/gnu/usr.bin/lynx/lynx.cfg @@ -2,27 +2,86 @@ # The default placement for this file is /usr/local/lib/lynx.cfg (Unix) # or Lynx_Dir:lynx.cfg (VMS) # +# # Definition pairs are of the form VARIABLE:DEFINITION # NO spaces are allowed between the pair items. # -# If you do not have access to /usr/local/bin you may change +# If you do not have write access to /usr/local/bin you may change # the default location of this file in the userdefs.h file and recompile, -# or specify it's location on the command line with the "-cfg" +# or specify its location on the command line with the "-cfg" # command line option. # # Items may be commented out by putting a '#' as the FIRST char of the line # # All definitions must be flush left and have NO spaces.!!! + +# An HTML'ized description of all settings (based on comments in this file, +# with alphabetical table of settings and with table of settings by category) +# is available at http://www.hippo.ru/~hvv/lynxcfg_toc.html + +# Starting with Lynx 2.8.1, the lynx.cfg file has a crude "include" +# facility. This means that you can take advantage of the global lynx.cfg +# while also supplying your own tweaks. +# +# You can use a command-line argument (-cfg /where/is/lynx.cfg) or an +# environment variable (LYNX_CFG=/where/is/lynx.cfg). +# For instance, put in your .profile or .login: +# +# LYNX_CFG=~/lynx.cfg; export LYNX_CFG # in .profile for sh/ksh/bash/etc. +# setenv LYNX_CFG ~/lynx.cfg # in .login for [t]csh +# +# Then in ~/lynx.cfg: +# +# INCLUDE:/usr/local/lib/lynx.cfg +# ^^^^^^^^^^^^^^^^^^^^^^^ or whatever is appropriate on your system +# and now your own tweaks. +# +# Starting with Lynx 2.8.2, the INCLUDE facility is yet more powerful. You can +# suppress all but specific settings that will be read from included files. +# This allows sysadmins to provide users the ability to customize lynx with +# options that normally do not affect security, such as COLOR, VIEWER, KEYMAP. +# +# The syntax is +# +# INCLUDE:filename for +# +# sample: +#INCLUDE:~/lynx.cfg for COLOR VIEWER KEYMAP +# only one space character should surround the word 'for'. On Unix systems ':' +# is also accepted as separator. In that case, the example can be written as +#INCLUDE:~/lynx.cfg:COLOR VIEWER KEYMAP +# In the example, only the settings COLOR, VIEWER and KEYMAP are accepted by +# lynx. Other settings are ignored. Note: INCLUDE is also treated as a +# setting, so to allow an included file to include other files, put INCLUDE in +# the list of allowed settings. +# +# If you allow an included file to include other files, and if a list of +# allowed settings is specified for that file with the INCLUDE command, nested +# files are only allowed to include the list of settings that is the set AND of +# settings allowed for the included file and settings allowed by nested INCLUDE +# commands. In short, there is no security hole introduced by including a +# user-defined configuration file if the original list of allowed settings is +# secure. + +# STARTFILE is the default starting URL if none is specified +# on the command line or via a WWW_HOME environment variable; +# Lynx will refuse to start without a starting URL of some kind. +# STARTFILE can be remote, e.g. http://www.w3.org/default.html , +# or local, e.g. file://localhost/PATH_TO/FILENAME , +# where PATH_TO is replaced with the complete path to FILENAME +# using Unix shell syntax and including the device on VMS. +# +# Normally we expect you will connect to a remote site, e.g., the Lynx starting +# site: +STARTFILE:http://www.OpenBSD.org/ # +# As an alternative, you may want to use a local URL. A good choice for this is +# the user's home directory: +#STARTFILE:file://localhost/~/ # -# STARTFILE is the default URL if none is specified on the command line -# or via a WWW_HOME environment variable. -# note: these files can be remote (http://www.w3.org/default.html) -# or local (file://localhost/PATH_TO/FILENAME -# replace PATH_TO with the complete path to FILENAME -# use Unix SHELL syntax and include the device on VMS systems) -# -STARTFILE:http://www.OpenBSD.org/ +# Your choice of STARTFILE should reflect your site's needs, and be a URL that +# you can connect to reliably. Otherwise users will become confused and think +# that they cannot run Lynx. # HELPFILE must be defined as a URL and must have a # complete path if local: @@ -52,40 +111,39 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # #GOTOBUFFER:FALSE -# JUMP_PROMPT is the default statusline prompt for jumps files (see below). +# JUMP_PROMPT is the default statusline prompt for selecting a jumps file +# shortcut. (see below). # You can change the prompt here from that defined in userdefs.h. Any -# trailing white space will be trimmed, and a single space added by Lynx +# trailing white space will be trimmed, and a single space is added by Lynx # following the last non-white character. You must set the default prompt -# before setting the default jumps file (below). If a default jumps file +# before setting the default jumps file (below). If a default jumps file # was set via userdefs.h, and you change the prompt here, you must set the # default jumps file again (below) for the change to be implemented. # #JUMP_PROMPT:Jump to (use '?' for list): -# JUMPFILE is the default local file checked for shortcut URL's when -# the user presses the 'J' (JUMP) key. The user will be prompted for -# a shortcut entry (analogously to 'g'oto), and can enter one -# or use '?' for a list of the shortcuts with associated links to -# their actual URL's. See the sample jumps files in the samples -# subdirectory. Make sure your jumps file includes a '?' shortcut -# for a file://localhost URL to itself: -# +# JUMPFILE is the local file checked for short-cut names for URLs +# when the user presses the 'j' (JUMP) key. The user will be prompted +# to enter a short-cut name for an URL, which Lynx will then follow +# in a similar manner to 'g'oto; alternatively, s/he can enter '?' +# to view the full JUMPFILE list of short-cuts with associated URLs. +# There is an example jumps file in the samples subdirectory. +# If not defined here or in userdefs.h , the JUMP command will invoke +# the NO_JUMPFILE statusline message (cp LYMessages_en.h ). +# +# To allow '?' to work, include in the JUMPFILE +# a short-cut to the JUMPFILE itself, e.g. #
?
This Shortcut List # -# If not defined here or in userdefs.h, the JUMP command will invoke -# the NO_JUMPFILE statusline message (see userdefs.h). -# # On VMS, use Unix SHELL syntax (including a lead slash) to define it. # -# Do not include "file://localhost" in the definition. -# -# Additional, alternate jumps files can be defined and mapped to -# keystrokes at the bottom of lynx.cfg, but you should first define -# the default jumps file (mapped by default to 'J', and to 'j' when -# the "VI keys" 'o'ption is not ON) here or in userdefs.h, if you -# wish to implement the jumps mechanism. +# Additional jumps files can be defined and mapped to keystrokes +# in lynx.cfg , but you should first define the default jumps file, +# which is mapped by default to 'j' (or 'J' when VI keys are ON). # -#JUMPFILE:/Lynx_Dir/jumps.html +# In the following line, include the actual full local path to JUMPFILE, +# but do not include 'file://localhost' in the line. +#JUMPFILE:/FULL_LOCAL_PATH/jumps.html # Set JUMPBUFFER to TRUE if you want to have the previous jump target, # if any, offered for reuse or editing when using the 'J'ump command. @@ -141,134 +199,180 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # #LOCAL_DOMAIN:ukans.edu -# 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 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. 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 "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, 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. -# 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 defines the display character set, i.e., 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 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 or 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. For Lynx a "character set" has two names: a MIME name (for +# recognizing properly labeled charset parameters in HTTP headers etc.), and a +# human-readable string for the 'O'ptions Menu (so you may find info about +# language or group of languages besides MIME name). Not all 'human-readable' +# names correspond to exactly one valid MIME charset (example is "Chinese"); +# in that case an appropriate valid (and more specific) MIME name should be +# used where required. Well-known synonyms are also processed in the code. +# +# Raw (CJK) mode +# +# Lynx normally translates characters from a document's charset to display +# charset, using ASSUME_CHARSET value (see below) if the document's charset +# is not specified explicitly. Raw (CJK) mode is OFF for this case. +# When the document charset is specified explicitly, that charset +# overrides any assumption like ASSUME_CHARSET or raw (CJK) mode. +# +# For the Asian (CJK) display character sets, the corresponding charset is +# assumed in documents, i.e., raw (CJK) mode is ON by default. 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 display +# character set. The mode should be toggled OFF when an Asian (CJK) display +# character set is selected but the document is not CJK and its charset not +# specified explicitly. +# +# Raw (CJK) mode may be toggled by user via '@' (LYK_RAW_TOGGLE) key, +# the -raw command line switch or from the 'o'ptions menu. +# +# Raw (CJK) mode effectively changes the charset assumption about unlabeled +# documents. You can toggle raw mode ON if you believe the document has a +# charset which does correspond to your Display Character Set. On the other +# hand, if you set ASSUME_CHARSET the same as Display Character Set you get raw +# mode ON by default (but you get assume_charset=iso-8859-1 if you try raw mode +# OFF after it). +# +# 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. There is a "Transparent" pseudo # character set for more "rawness". # -# The default character sets include: -# Display Character Set name MIME name -# ========================== ========= -# 7 bit approximations us-ascii -# Chinese euc-cn -# DEC Multinational dec-mcs -# DosArabic (cp864) cp864 -# DosBaltRim (cp775) cp775 -# DosCyrillic (cp866) cp866 -# DosGreek (cp737) cp737 -# DosGreek2 (cp869) cp869 -# DosHebrew (cp862) cp862 -# DosLatin1 (cp850) cp850 -# DosLatin2 (cp852) cp852 -# DosLatinUS (cp437) cp437 -# ISO 8859-10 iso-8859-10 -# ISO 8859-5 Cyrillic iso-8859-5 -# ISO 8859-6 Arabic iso-8859-6 -# ISO 8859-7 Greek iso-8859-7 -# ISO 8859-8 Hebrew iso-8859-8 -# ISO 8859-9 (Latin 5) iso-8859-9 -# ISO Latin 1 iso-8859-1 -# ISO Latin 2 iso-8859-2 -# ISO Latin 3 iso-8859-3 -# ISO Latin 4 iso-8859-4 -# Japanese (EUC) euc-jp -# Japanese (SJIS) shift_jis -# KOI8-R Cyrillic koi8-r -# Korean euc-kr -# Macintosh (8 bit) macintosh -# NeXT character set next -# RFC 1345 Mnemonic mnemonic -# RFC 1345 w/o Intro mnemonic+ascii+0 -# Taipei (Big5) big5 -# Transparent x-transparent -# UNICODE UTF 8 utf-8 -# Vietnamese (VISCII) viscii -# WinArabic (cp1256) windows-1256 -# WinBaltRim (cp1257) windows-1257 -# WinCyrillic (cp1251) windows-1251 -# WinGreek (cp1253) windows-1253 -# WinHebrew (cp1255) windows-1255 -# WinLatin1 (cp1252) windows-1252 -# WinLatin2 (cp1250) windows-1250 -# -#CHARACTER_SET:ISO Latin 1 +# Since Lynx now supports a wide range of platforms it may be useful to note +# the cpXXX codepages used by IBM PC compatible computers, and windows-xxxx +# used by native MS-Windows apps. We also note that cpXXX pages rarely are +# found on Internet, but are mostly for local needs on DOS. +# +# Recognized character sets include: +# +# string for 'O'ptions Menu MIME name +# =========================== ========= +# 7 bit approximations (US-ASCII) us-ascii +# Western (ISO-8859-1) iso-8859-1 +# Western (ISO-8859-15) iso-8859-15 +# Western (cp850) cp850 +# Western (windows-1252) windows-1252 +# IBM PC US codepage (cp437) cp437 +# DEC Multinational dec-mcs +# Macintosh (8 bit) macintosh +# NeXT character set next +# HP Roman8 hp-roman8 +# Chinese euc-cn +# Japanese (EUC-JP) euc-jp +# Japanese (Shift_JIS) shift_jis +# Korean euc-kr +# Taipei (Big5) big5 +# Vietnamese (VISCII) viscii +# Eastern European (ISO-8859-2) iso-8859-2 +# Eastern European (cp852) cp852 +# Eastern European (windows-1250) windows-1250 +# Latin 3 (ISO-8859-3) iso-8859-3 +# Latin 4 (ISO-8859-4) iso-8859-4 +# Baltic Rim (cp775) cp775 +# Baltic Rim (windows-1257) windows-1257 +# Cyrillic (ISO-8859-5) iso-8859-5 +# Cyrillic (cp866) cp866 +# Cyrillic (windows-1251) windows-1251 +# Cyrillic (KOI8-R) koi8-r +# Arabic (ISO-8859-6) iso-8859-6 +# Arabic (cp864) cp864 +# Arabic (windows-1256) windows-1256 +# Greek (ISO-8859-7) iso-8859-7 +# Greek (cp737) cp737 +# Greek2 (cp869) cp869 +# Greek (windows-1253) windows-1253 +# Hebrew (ISO-8859-8) iso-8859-8 +# Hebrew (cp862) cp862 +# Hebrew (windows-1255) windows-1255 +# Turkish (ISO-8859-9) iso-8859-9 +# ISO-8859-10 iso-8859-10 +# Ukrainian Cyrillic (cp866u) cp866u +# Ukrainian Cyrillic (KOI8-U) koi8-u +# UNICODE (UTF-8) utf-8 +# RFC 1345 w/o Intro mnemonic+ascii+0 +# RFC 1345 Mnemonic mnemonic +# Transparent x-transparent +# +# The value should be the MIME name of a character set recognized by +# Lynx (case insensitive). +# Find RFC 1345 at http://www.ics.uci.edu/pub/ietf/uri/rfc1345.txt . +# +#CHARACTER_SET:iso-8859-1 # ASSUME_CHARSET changes the handling of documents which do not # explicitly specify a charset. Normally Lynx assumes that 8-bit # 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, +# is defined here or by an -assume_charset command line flag is in effect, # Lynx will treat documents as if they were encoded accordingly. # See above on how this interacts with "raw mode" and the Display # Character Set. -# The value should be the MIME name of a character set recognized by -# Lynx (case insensitive). +# ASSUME_CHARSET can also be changed via the 'o'ptions menu but will +# not be saved as permanent value in user's .lynxrc file to avoid more chaos. # #ASSUME_CHARSET:iso-8859-1 # ASSUME_LOCAL_CHARSET is like ASSUME_CHARSET but only applies to local # files. If no setting is given here or by an -assume_local_charset # command line option, the value for ASSUME_CHARSET or -assume_charset -# is used. It works for both text/plain and text/html files. -# This option may interfere with "raw mode" toggling when local files -# are viewed (it is "stronger" than the effective change of the charset -# assumption caused by changing "raw mode"), so only use when necessary. +# is used. It works for both text/plain and text/html files. +# This option will ignore "raw mode" toggling when local files are viewed +# (it is "stronger" than "assume_charset" or the effective change +# of the charset assumption caused by changing "raw mode"), +# so only use when necessary. # #ASSUME_LOCAL_CHARSET:iso-8859-1 -# PREPEND_CHARSET_TO_SOURCE:TRUE allow prepending a META CHARSET +# PREPEND_CHARSET_TO_SOURCE:TRUE tells Lynx to prepend a META CHARSET line # to text/html source files when they are retrieved for 'd'ownloading -# or passed to 'p'rint functions. This is necessary for resolving charset -# for local html files, while the assume_local_charset just an assumption... -# For 'd'ownload option charset will be added only if HTTP charset present. -# The compilation default is FALSE. -# It is generally desired to have charset information for every -# local html file, but META CHARSET string may cause -# compatibility problems with other browsers, so -# if you use all CHARACTER_SET, ASSUME_CHARSET, ASSUME_LOCAL_CHARSET -# unchanged from theirs default value iso-8859-1 you usually -# need not change the compilation default for PREPEND_CHARSET_TO_SOURCE. +# or passed to 'p'rint functions, so HTTP headers will not be lost. +# This is necessary for resolving charset for local html files, +# while the assume_local_charset is just an assumption. +# For the 'd'ownload option, a META CHARSET will be added only if the HTTP +# charset is present. The compilation default is TRUE. +# It is generally desirable to have charset information for every local +# html file, but META CHARSET string potentially could cause +# compatibility problems with other browsers, see also PREPEND_BASE_TO_SOURCE. # Note that the prepending is not done for -source dumps. # -#PREPEND_CHARSET_TO_SOURCE:FALSE +#PREPEND_CHARSET_TO_SOURCE:TRUE + +# NCR_IN_BOOKMARKS:TRUE allows you to save 8-bit characters in bookmark titles +# in the unicode format (NCR). This may be useful if you need to switch +# display charsets frequently. This is the case when you use Lynx on different +# platforms, e.g., on UNIX and from a remote PC, and want to keep the bookmarks +# file persistent. +# Another aspect is compatibility: NCR is part of I18N and HTML4.0 +# specifications supported starting with Lynx 2.7.2, Netscape 4.0 and MSIE 4.0. +# Older browser versions will fail so keep NCR_IN_BOOKMARKS:FALSE if you +# plan to use them. +# +#NCR_IN_BOOKMARKS:FALSE + +# FORCE_8BIT_TOUPPER overrides locale settings and uses internal 8-bit +# case-conversion mechanism for case-insensitive searches in non-ASCII display +# character sets. It is FALSE by default and should not be changed unless +# you encounter problems with case-insensitive searches. +# +#FORCE_8BIT_TOUPPER:FALSE + +# While Lynx supports different platforms and display character sets +# we need to limit the charset in outgoing mail to reduce +# trouble for remote recipients who may not recognize our charset. +# You may try US-ASCII as the safest value (7 bit), any other MIME name, +# or leave this field blank (default) to use the display character set. +# Charset translations currently are implemented for mail "subjects= " only. +# +#OUTGOING_MAIL_CHARSET: # If Lynx encounters a charset parameter it doesn't recognize, it will # replace the value given by ASSUME_UNREC_CHARSET (or a corresponding @@ -291,17 +395,18 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # PREFERRED_CHARSET specifies the character set in MIME notation (e.g., # "ISO-8859-2", "ISO-8859-5") which Lynx will indicate you prefer in -# requests to http servers using an Accept-Charsets header. Users can +# requests to http servers using an Accept-Charsets header. Users can # change it via the 'o'ptions menu and save that preference in their RC file. # The value should NOT include "ISO-8859-1" or "US-ASCII", # since those values are always assumed by default. # If a file in that character set is available, the server will send it. # If no Accept-Charset header is present, the default is that any -# character set is acceptable. If an Accept-Charset header is present, +# character set is acceptable. If an Accept-Charset header is present, # and if the server cannot send a response which is acceptable # according to the Accept-Charset header, then the server SHOULD send # an error response with the 406 (not acceptable) status code, though -# the sending of an unacceptable response is also allowed. (RFC2068) +# the sending of an unacceptable response is also allowed. See RFC 2068 +# (http://www.ics.uci.edu/pub/ietf/uri/rfc2068.txt). # #PREFERRED_CHARSET: @@ -312,7 +417,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # can be comma-separated lists. Each prefix must end with a dot, each # suffix must begin with a dot, and either may contain other dots (e.g., # .com.jp). The default lists are defined in userdefs.h and can be -# changed here. Each prefix will be used with each suffix, in order, +# replaced here. Each prefix will be used with each suffix, in order, # until a valid Internet host is created, based on a successful DNS # lookup (e.g., foo will be tested as www.foo.com and then www.foo.edu # etc.). The first element can include a :port and/or /path which will @@ -329,11 +434,28 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #URL_DOMAIN_PREFIXES:www. #URL_DOMAIN_SUFFIXES:.com,.edu,.net,.org +# Lynx Options Menu style toggle: forms-based or old-style. +# Works if old-style menu is compiled in as well as the forms-based menu. +#FORMS_OPTIONS:TRUE + +# Display partial pages while downloading +#PARTIAL:TRUE + +# Set the threshold # of lines Lynx must render before it +# redraws the screen in PARTIAL mode. Anything < 0 implies +# use of the screen size. +#PARTIAL_THRES:-1 + +# While getting large files, Lynx shows the approximate rate of transfer. +# Set this to change the units shown: +# TRUE for KB/sec or FALSE for bytes/sec: default is TRUE. +#SHOW_KB_RATE:TRUE + # The following three definitions set the number of seconds for # pauses following statusline messages that would otherwise be # replaced immediately, and are more important than the unpaused # progress messages. Those set by INFOSECS are also basically -# progress messages (e.g., that a prompted input has been cancelled) +# progress messages (e.g., that a prompted input has been canceled) # and should have the shortest pause. Those set by MESSAGESECS are # informational (e.g., that a function is disabled) and should have # a pause of intermediate duration. Those set by ALERTSECS typically @@ -370,6 +492,15 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # #SHOW_CURSOR:FALSE +# VERBOSE_IMAGES controls whether or not Lynx replaces the [LINK], [INLINE] and +# [IMAGE] comments (for images without ALT) with filenames of these images. +# This can be useful in determining what images are decorations +# (button.gif, line.gif) and what images are important (if the page writer +# bothers to use useful names). +# +# If this option is set here, it will override the setting in userdefs.h. +#VERBOSE_IMAGES:TRUE + # If BOLD_HEADERS is set to TRUE the HT_BOLD default style will be acted # upon for

through

headers. The compilation default is FALSE # (only the indentation styles are acted upon, but see BOLD_H1, below). @@ -407,11 +538,11 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # amount (bytes) of virtual memory that can be allocated and not yet be freed # before previous documents are removed from memory. If the values for both # the DEFAULT_CACHE_SIZE and DEFAULT_VIRTUAL_MEMORY_SIZE are exceeded, then -# least recently displayed documents will be freed until one or the other -# value is no longer exceeded. The default value was defined in userdefs.h. +# the least recently displayed documents will be freed until one or the other +# value is no longer exceeded. The default value is defined in userdefs.h. # -# The Unix and VMS but not VAXC implementations use the C library malloc's -# and calloc's for memory allocation, and procedures for taking the actual +# The Unix and VMS (but not VAXC) implementations use the C library malloc's +# and calloc's for memory allocation, but procedures for taking the actual # amount of cache into account still need to be developed. They use only # the DEFAULT_CACHE_SIZE value, and that specifies the absolute maximum # number of documents to cache (rather than the maximum number only if @@ -420,6 +551,20 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #DEFAULT_CACHE_SIZE:10 #DEFAULT_VIRTUAL_MEMORY_SIZE:512000 +# SOURCE_CACHE sets the source caching behavior for Lynx: +# FILE causes Lynx to keep a temporary file for each cached document +# containing the HTML source of the document, which it uses to regenerate +# the document when certain settings are changed (for instance, +# historical vs. minimal vs. valid comment parsing) instead of reloading +# the source from the network. +# MEMORY is like FILE, except the document source is kept in memory. You +# may wish to adjust DEFAULT_CACHE_SIZE and DEFAULT_VIRTUAL_MEMORY_SIZE +# accordingly. +# NONE is the default; the document source is not cached, and is reloaded +# from the network when needed. +# +#SOURCE_CACHE:NONE + # If ALWAYS_RESUBMIT_POSTS is set TRUE, Lynx always will resubmit forms # with method POST, dumping any cache from a previous submission of the # form, including when the document returned by that form is sought with @@ -473,10 +618,9 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # #SEEK_FRAG_AREA_IN_CUR:TRUE -# Local execution links and scripts are completely disabled -# in the source code unless they are enabled in the -# userdefs.h file and the sources recompiled. Please -# see the Lynx source code distribution and the userdefs.h +# Local execution links and scripts are by default completely disabled +# unless a change is made to the userdefs.h file to enabled them. +# See the Lynx source code distribution and the userdefs.h # file for more detail on enabling execution links and scripts. # # If you have enabled execution links or scripts the following @@ -502,9 +646,9 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # If LOCAL_EXECUTION_LINK_ON_BUT_NOT_REMOTE is TRUE, and no TRUSTED_EXEC # rule is defined, it defaults to "file://localhost/" and any lynxexec # or lynxprog command will be permitted if it was referenced with a URL -# beginning with that string. If you wish to restrict the referencing URL's +# beginning with that string. If you wish to restrict the referencing URLs # further, you can extend the string to include a trusted path. You also can -# specify a trusted directory for http URL's, which will then be treated as +# specify a trusted directory for http URLs, which will then be treated as # if they were local rather than remote. For example: # # TRUSTED_EXEC:file://localhost/trusted/ @@ -529,10 +673,10 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # rules below, you need not repeat them as TRUSTED_EXEC rules. # # If EXEC_LINKS and JUMPFILE have been defined, any lynxexec or lynxprog -# URL's in that file will be permitted, regardless of other settings. If +# URLs in that file will be permitted, regardless of other settings. If # you also set LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE:TRUE and a single # TRUSTED_EXEC rule that will always fail (e.g., "none"), then *ONLY* the -# lynxexec or lynxprog URL's in JUMPFILE (and any ALWAYS_TRUSTED_EXEC rules, +# lynxexec or lynxprog URLs in JUMPFILE (and any ALWAYS_TRUSTED_EXEC rules, # see below) will be allowed. Note, however, that if Lynx was compiled with # CAN_ANONYMOUS_JUMP set to FALSE (default is TRUE), or -restrictions=jump # is included with the -anonymous switch at run time, then users of an @@ -546,7 +690,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # If EXEC_LINKS was defined, any lynxexec or lynxprog URL can be made # always enabled by an ALWAYS_TRUSTED_EXEC rule for it. This is useful for # anonymous accounts in which you have disabled execution links generally, -# and may also have disabled jump file links, but still want to allow +# and may also have disabled jumps file links, but still want to allow # execution of particular utility scripts or programs. The format is # like that for TRUSTED_EXEC. For example: # @@ -583,7 +727,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # ===== # LYNXCGI_ENVIRONMENT adds the current value of the specified # environment variable to the list of environment variables passed on to the -# lynxcgi script. Useful variables are HOME, USER, EDITOR, etc... +# lynxcgi script. Useful variables are HOME, USER, EDITOR, etc... # # VMS: # ==== @@ -618,7 +762,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # the information, or ALERTMAIL if there is no owner, every time # that a document cannot be accessed! # -# NOTE: This can generate A LOT of mail, be warned. +# NOTE: This can generate A LOT of mail, be warned. # #MAIL_SYSTEM_ERROR_LOGGING:FALSE @@ -640,14 +784,17 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #CHECKMAIL:FALSE # To enable news reading ability via Lynx, the environment variable NNTPSERVER -# must be set so that it points to your site's NNTP server (see INSTALLATION). -# Lynx respects RFC 1738 (http://www.ics.uci.edu/pub/ietf/uri/rfc1738.txt) and -# and does not accept a host field in news URLs (use nntp: instead news: for +# must be set so that it points to your site's NNTP server +# (see Lynx Users Guide on environment variables). +# Lynx respects RFC 1738 (http://www.ics.uci.edu/pub/ietf/uri/rfc1738.txt) +# and does not accept a host field in news URLs (use nntp: instead of news: for # the scheme if you wish to specify an NNTP host in a URL, as explained in the # RFC). If you have not set the variable externally, you can set it at run # time via this configuration file. It will not override an external setting. # Note that on VMS it is set as a process logical rather than symbol, and will # outlive the Lynx image. +# The news reading facility in Lynx is quite limited. Lynx does not provide a +# full featured news reader with elaborate error checking and safety features. # #NNTPSERVER:news.server.dom @@ -685,7 +832,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # Set NEWS_POSTING to FALSE if you do not want to support posting to # news groups via Lynx. If left TRUE, Lynx will use its news gateway to # post new messages or followups to news groups, using the URL schemes -# described in the "Supported URL" section of the online 'h'elp. The +# described in the "Supported URLs" section of the online 'h'elp. The # posts will be attempted via the nntp server specified in the URL, or # if none was specified, via the NNTPSERVER configuration or environment # variable. Links with these URLs for posting or sending followups are @@ -694,6 +841,8 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # The compilation default set in userdefs.h can be changed here. If # the default is TRUE, posting can still be disallowed via the # -restrictions command line switch. +# The posting facility in Lynx is quite limited. Lynx does not provide a +# full featured news poster with elaborate error checking and safety features. # #NEWS_POSTING:TRUE @@ -708,15 +857,20 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # If USE_MOUSE is set TRUE, Lynx (when configured with ncurses) will allow # the user to click with button-1 on links to select them. -#USE_MOUSE: FALSE +#USE_MOUSE:FALSE # If COLLAPSE_BR_TAGS is set FALSE, Lynx will not collapse serial BR tags. -# Note that the valid way to insert extra blank lines in HTML is via a PRE -# block with only newlines in the block. -# The default is defined in userdefs.h, and can be overridden here. +# If set TRUE, two or more concurrent BRs will be collapsed into a single +# line break. Note that the valid way to insert extra blank lines in HTML +# is via a PRE block with only newlines in the block. # #COLLAPSE_BR_TAGS:TRUE +# If TAGSOUP is set, Lynx uses the "Tag Soup DTD" rather than "SortaSGML". +# The two approaches differ by the style of error detection and recovery. +# Tag Soup DTD allows for improperly nested tags; SortaSGML is stricter. +#TAGSOUP:FALSE + # If SET_COOKIES is set FALSE, Lynx will ignore Set-Cookie headers # in http server replies. # The default is defined in userdefs.h, and can be overridden here, @@ -724,6 +878,45 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # #SET_COOKIES:TRUE +# If ACCEPT_ALL_COOKIES is set TRUE, Lynx will accept cookies from all +# domains with no user interaction. +# The default is defined in userdefs.h and can be overridden here, or +# in the .lynxrc file via an o(ptions) screen setting. It may also be +# toggled via the -accept_all_cookies command line switch. +# +#ACCEPT_ALL_COOKIES:FALSE + +# COOKIE_ACCEPT_DOMAINS and COOKIE_REJECT_DOMAINS are comma-delimited lists +# of domains from which Lynx should automatically accept or reject all +# cookies. If a domain is specified in both options, rejection will take +# precedence. The ACCEPT_ALL_COOKIES parameter will override any settings +# made here. +# +#COOKIE_ACCEPT_DOMAINS: +#COOKIE_REJECT_DOMAINS: + +# COOKIE_LOOSE_INVALID_DOMAINS, COOKIE_STRICT_INVALID_DOMAINS, and +# COOKIE_QUERY_INVALID_DOMAINS are comma-delimited lists of which domains +# should be subjected to varying degrees of validity checking. If a +# domain is set to strict checking, strict conformance to RFC2109 will +# be applied. A domain with loose checking will be allowed to set cookies +# with an invalid path or domain attribute. All domains will default to +# querying the user for an invalid path or domain. +# +#COOKIE_LOOSE_INVALID_DOMAINS: +#COOKIE_STRICT_INVALID_DOMAINS: +#COOKIE_QUERY_INVALID_DOMAINS: + +# COOKIE_FILE is the default file to store persistent downloaded cookies +# in, if Lynx was compiled with EXP_PERSISTENT_COOKIES. The cookie file +# can also be specified in .lynxrc or on the commandline. +#COOKIE_FILE:~/.lynx_cookies + +# PERSISTENT_COOKIES indicates that cookies should be stored for use between +# Lynx sessions. It is only used if Lynx was compiled with +# EXP_PERSISTENT_COOKIES. Use this flag to disable the feature. +#PERSISTENT_COOKIES:TRUE + # VMS: #===== # The mail command and qualifiers are defined in userdefs.h. Lynx @@ -738,7 +931,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # function in LYPrint.c, may be required. # #SYSTEM_MAIL:PMDF SEND -#SYSERM_MAIL_FLAGS:/headers +#SYSTEM_MAIL_FLAGS:/headers # #SYSTEM_MAIL:MAIL #SYSTEM_MAIL_FLAGS: @@ -759,6 +952,12 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #SYSTEM_MAIL:/usr/lib/sendmail #SYSTEM_MAIL_FLAGS:-t -oi +# Win32: +#======= +# Please read sendmail.txt in the LYNX_W32.ZIP distribution +# +#SYSTEM_MAIL:sendmail -f me@my.host -h my.host -r my.smtp.mailer -m SMTP + # VMS ONLY: #========== # MAIL_ADRS is defined in userdefs.h and normally is structured for PMDF's @@ -791,12 +990,11 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # #EMACS_KEYS_ALWAYS_ON:FALSE -# DEFAULT_KEYPAD_MODE specifies whether by default the user -# has numbers that work like arrows or else numbered links. -# DEFAULT KEYPAD MODE may be set to TRUE for using numbers -# as arrows as the default, or FALSE for using numbered links -# as the default (LINKS_AND_FORM_FIELDS_ARE_NUMBERED cannot -# currently be set by this option.). +# DEFAULT_KEYPAD_MODE specifies whether numbers work like arrows or +# numbered links. +# DEFAULT_KEYPAD_MODE set to TRUE indicates numbers act as arrows, +# and set to FALSE indicates numbers refer to numbered links on the page. +# LINKS_AND_FORM_FIELDS_ARE_NUMBERED cannot currently be set by this option. # #DEFAULT_KEYPAD_MODE_IS_NUMBERS_AS_ARROWS:TRUE @@ -805,10 +1003,10 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # #CASE_SENSITIVE_ALWAYS_ON:FALSE -# DEFAULT_BOOKMARK_FILE is a default filename for use as a personal -# bookmark file. It will reference a file from the user's home directory. +# DEFAULT_BOOKMARK_FILE is the filename used for storing personal bookmarks. +# It will be prepended by the user's home directory. # NOTE that a file ending in .html or other suffix mapped to text/html -# should be used to ensure it's treatment as HTML. The built-in default +# should be used to ensure its treatment as HTML. The built-in default # is lynx_bookmarks.html. On both Unix and VMS, if a subdirectory off of # the HOME directory is desired, the path should begin with "./" (e.g., # ./BM/lynx_bookmarks.html), but the subdirectory must already exist. @@ -831,11 +1029,11 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # override that in userdefs.h. The user can turn on multiple bookmark # support via the 'o'ptions menu, and can save that choice as the startup # default via the .lynxrc file. When on, the setting can be STANDARD or -# ADVANCED. If support is set to the latter, and the user mode also is +# ADVANCED. If SUPPORT is set to the latter, and the user mode also is # ADVANCED, the VIEW_BOOKMARK command will invoke a statusline prompt at # which the user can enter the letter token (A - Z) of the desired bookmark, # or '=' to get a menu of available bookmark files. The menu always is -# presented in NOVICE or INTERMEDIATE mode, or if the support is set to +# presented in NOVICE or INTERMEDIATE mode, or if the SUPPORT is set to # STANDARD. No prompting or menu display occurs if only one (the startup # default) bookmark file has been defined (define additional ones via the # 'o'ptions menu). The startup default, however set, can be overridden on @@ -853,9 +1051,9 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #BLOCK_MULTI_BOOKMARKS:FALSE # DEFAULT_USER_MODE sets the default user mode for Lynx users. -# NOVICE shows a three line help message at the bottom of the screen -# INTERMEDIATE shows normal amount of help (one line) -# ADVANCED help is replaced by the URL of the current link +# NOVICE shows a three line help message at the bottom of the screen. +# INTERMEDIATE shows normal amount of help (one line). +# ADVANCED help is replaced by the URL of the current link. # #DEFAULT_USER_MODE:NOVICE @@ -867,7 +1065,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # line oriented mail input mode will be used. # NOTE: Do not define an editor unless you know that every user will # know how to use it. Most users do not enjoy getting stuck in -# an unknown editor that they can't get out of. Users can +# an unknown editor that they can't exit. Users can # easily define an editor of their own using the options menu, # so it is not always desirable to set the DEFAULT_EDITOR. # @@ -879,16 +1077,15 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #SYSTEM_EDITOR: # Proxy variables -# Lynx version 2.2 and beyond supports the use of proxy servers that can -# act as firewall gateways and caching servers. They are preferable to -# the older gateway servers. Each protocol used by Lynx can be mapped -# separately using PROTOCOL_proxy environment variables (see INSTALLATION). -# If you have not set them externally, you can set them at run time via -# this configuration file. They will not override external settings. -# The no_proxy variable can be a comma-separated list of hosts which should -# not be proxied, or an asterisk to override all proxy variables. -# Note that on VMS they are set as process logicals rather than symbols, -# to preserve lowercasing, and will outlive the Lynx image. +# Lynx version 2.2 and beyond supports the use of proxy servers that can act as +# firewall gateways and caching servers. They are preferable to the older +# gateway servers. Each protocol used by Lynx can be mapped separately using +# PROTOCOL_proxy environment variables (see Lynx Users Guide). If you have not set +# them externally, you can set them at run time via this configuration file. +# They will not override external settings. The no_proxy variable can be used +# to inhibit proxying to selected regions of the Web (see below). Note that on +# VMS these proxy variables are set as process logicals rather than symbols, to +# preserve lowercasing, and will outlive the Lynx image. # #http_proxy:http://some.server.dom:port/ #https_proxy:http://some.server.dom:port/ @@ -906,119 +1103,100 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #cso_proxy:http://some.server.dom:port/ #no_proxy:host.domain.dom -# Printer definitions -# any number of printers may be defined by using multiple -# printer definition sets. Printers may be any program -# that could be useful to your users, they do not necessarily -# have to print. -# -# the definition of a printer is of the form -# PRINTER:::: -# -# is the name that the user will see. -# is the command line arguments for printing a file. -# The %s will be replaced with the file being printed. -# If a second %s is given the second %s will be replaced by -# a suggested filename that is prettier than the tempfile -# name given in the first %s. This does not remove the first -# %s from the command line in any manner. If you need to -# use only the second %s file name in your printer command, -# then I suggest creating a script which will first copy the -# first %s file name to the second %s file name, and then -# executing your print command with the second %s file name. -# specifies whether the printer should be disabled for -# users without printing options. The options are -# TRUE or FALSE; -# TRUE means the printer will always be ENABLED -# regardless of printer or anonymous settings -# FALSE means the printer will be DISABLED when -# the -noprint option is on, or for anonymous -# users which are not allowed to print -# -# is an optional parameter for indicating the number of -# lines per page for the printer. Defaults to 66. Used -# for computing the approximate number of pages and -# generating a statusline query of whether to proceed if -# the document is longer than 4 printer pages. Uses the -# current screen length for the computation when the -# built in "print to screen" option is selected. -# -# You must put the whole definition on one line. -# -# If you must use a colon, precede it with a backslash! -# -# If you have a very busy VMS print queue and Lynx deletes the temporary -# files before they have been queued, use the VMSPrint.com included in -# the distribution. -# -# examples +# The no_proxy variable can be a comma-separated list of strings defining +# no-proxy zones in the DNS domain name space. If a tail substring of the +# domain-path for a host matches one of these strings, transactions with that +# node will not be proxied. +#no_proxy:domain.path1,path2 +# +# A single asterisk as an entry will override all proxy variables and no +# transactions will be proxied. +#no_proxy:* +# This is the only allowed use of * in no_proxy. +# +# Warning: Note that setting 'il' as an entry in this list will block proxying +# for the .mil domain as well as the .il domain. If the entry is '.il' this +# will not happen. + +# PRINTER & DOWNLOADER DEFINITIONS: +# Lynx has 4 pre-defined print options & 1 pre-defined download option, +# which are called up on-screen when `p' or `d' are entered; +# any number of options can be added by the user, as explained below. +# +# For `p' pre-defined options are: `Save to local file', `E-mail the file', +# `Print to screen' and `Print to local printer attached to vt100'. +# `Print to screen' allows file transfers in the absence of alternatives +# and is often the only option allowed here for anonymous users; +# the 3rd & 4th options are not pre-defined for DOS/WINDOWS versions of Lynx. +# For `d' the pre-defined option is: `Download to local file'. +# +# To define your own print or download option use the following formats: +# PRINTER::: in the +# internal html markup +# HTMLSRC_ATTRVAL: span.attrval : !span +# - values of the attributes will be surrounded by the +# +# HTMLSRC_HREF:: +# - no special html markup will surround hyperlink destinations ( +# this means that only default color style for hrefs will be applied +# to them) +# +# For lynx compiled with lss support, the following settings are the default: +#HTMLSRC_COMM:span.htmlsrc_comment:!span +#HTMLSRC_TAG:span.htmlsrc_tag:!span +#HTMLSRC_ATTRIB:span.htmlsrc_attrib:!span +#HTMLSRC_ATTRVAL:span.htmlsrc_attrval:!span +#HTMLSRC_ABRACKET:span.htmlsrc_abracket:!span +#HTMLSRC_ENTITY:span.htmlsrc_entity:!span +#HTMLSRC_HREF:span.htmlsrc_href:!span +#HTMLSRC_ENTIRE:span.htmlsrc_entire:!span +#HTMLSRC_BADSEQ:span.htmlsrc_badseq:!span +#HTMLSRC_BADTAG:span.htmlsrc_badtag:!span +#HTMLSRC_BADATTR:span.htmlsrc_badattr:!span +#HTMLSRC_SGMLSPECIAL:span.htmlsrc_sgmlspecial:!span +# the styles corresponding to them are present in sample .lss file. +# For lynx compiled without lss support, the following settings are the default: +#HTMLSRC_COMM:b:!b +#HTMLSRC_TAG:b:!b +#HTMLSRC_ATTRIB:: +#HTMLSRC_ATTRVAL:!b:b +#HTMLSRC_ABRACKET:b:!b +#HTMLSRC_ENTITY:b:!b +#HTMLSRC_HREF:: +#HTMLSRC_ENTIRE:: +#HTMLSRC_BADSEQ:b:!b +#HTMLSRC_BADTAG:: +#HTMLSRC_BADATTR:!b:b +#HTMLSRC_SGMLSPECIAL:b:!b +# +# Other source-view related options: +# +# Options HTMLSRC_TAGNAME_XFORM and HTMLSRC_ATTRNAME_XFORM control the way the +# names of tags and names of attributes are transformed correspondingly. +# Possible values: 0 - lowercase, 1 - leave as is, 2 - uppercase. +#HTMLSRC_TAGNAME_XFORM:2 +#HTMLSRC_ATTRNAME_XFORM:2 diff --git a/gnu/usr.bin/lynx/lynx.hlp b/gnu/usr.bin/lynx/lynx.hlp index 895e421f02e..bc2ca656a0d 100644 --- a/gnu/usr.bin/lynx/lynx.hlp +++ b/gnu/usr.bin/lynx/lynx.hlp @@ -1,6 +1,6 @@ 1 LYNX NAME - lynx - a general purpose distributed information browser for the World + lynx - a general purpose distributed information browser for the World Wide Web 2 SYNOPSIS @@ -15,7 +15,8 @@ display). It will display hypertext markup language (HTML) documents con- taining links to files residing on the local system, as well as files residing on remote systems running Gopher, HTTP, FTP, WAIS, and NNTP - servers. Current versions of Lynx run on Unix and VMS. + servers. Current versions of Lynx run on Unix, VMS, Windows95/NT, + 386DOS and OS/2 EMX. Lynx can be used to access information on the World Wide Web, or to build information systems intended primarily for local access. For example, Lynx @@ -23,7 +24,7 @@ addition, Lynx can be used to build systems isolated within a single LAN. 2 OPTIONS - At start up, Lynx will load any local file or remote URL specified at + At start up, Lynx will load any local file or remote URL specified at the command line. For help with URLs, press "?" or "h" while running Lynx. Then follow the link titled, "Help on URLs." @@ -34,6 +35,9 @@ -get_data or -post_data arguments (see below). Encase it in double-quotes ("-"). + -accept_all_cookies + accept all cookies. + -anonymous used to specify the anonymous account. @@ -95,10 +99,16 @@ -cookies toggles handling of Set-Cookie headers. + -cookie_file=FILENAME + specifies a file to use to store cookies. + -crawl with -traversal, output each page to a file. with -dump, format output as with -traversal, but to stdout. + -debug_partial + incremental display stages with MessageSecs delay + -display=DISPLAY set the display variable for X rexec-ed programs. @@ -121,6 +131,9 @@ -error_file=FILE define a file where Lynx will report HTTP access codes. + -exec + enable local program execution (normally not configured). + -fileversions include all versions of files in local VMS directory listings. @@ -130,10 +143,13 @@ -force_secure toggles forcing of the secure flag for SSL cookies. + -forms_options + toggles the style of options (menu or forms). + -from toggles transmissions of From headers. - -ftp + -ftp disable ftp access. -get_data @@ -143,7 +159,22 @@ send a HEAD request for the mime headers. -help - print this Lynx command syntax usage message. + print the Lynx command syntax usage message. + + -hiddenlinks=[option] + control the display of hidden links. + + + merge + hidden links show up as bracketed numbers and are numbered together + with other links in the sequence of their occurrence in the document. + + + listonly + hidden links are shown only on L)ist screens and listings generated by + -dump or from the P)rint menu, but appear separately at the end of + those lists. This is the default behavior. + + + ignore + hidden links do not appear even in listings. -historical toggles use of '>' or '-->' as a terminator for comments. @@ -230,6 +261,13 @@ -number_links force numbering of links. + -partial + display partial pages while downloading. + + -partial_thres=NUMBER + number of lines to render before repainting display + with partial-display logic + -pauth=ID:PASSWD set authorization ID and password for a protected proxy server at startup. Be sure to protect any script files @@ -277,8 +315,8 @@ files (but still allow it for directories) when local file management is enabled. - default - same as command line option -anonymous. Disables default - services for anonymous users. Currently set to all restricted + default - same as command line option -anonymous. Disables default + services for anonymous users. Currently set to all restricted except for: inside_telnet, outside_telnet, inside_news, inside_ftp, outside_ftp, inside_rlogin, outside_rlogin, jump, mail and goto. Defaults are setable within userdefs.h. @@ -365,13 +403,23 @@ changed in userdefs.h or lynx.cfg. The command line switch toggles the default. + -soft_dquotes + toggles emulation of the old Netscape and Mosaic bug which + treated '>' as a co-terminator for double-quotes and tags. + -source works the same as dump but outputs HTML source instead of formatted text. + -stack_dump + disable SIGINT cleanup handler + -startfile_ok allow non-http startfile and homepage with -validate. + -tagsoup + initialize parser, using Tag Soup DTD rather than SortaSGML. + -telnet disable recognition of telnet commands. @@ -396,6 +444,14 @@ -underscore toggles use of _underline_ format in dumps. + -use_mouse + turn on xterm mouse support. + Clicking the left mouse button on a link traverses it. + Clicking the right mouse button pops back. + Click in the first line of a page to scroll up. + Click in the last line of a page to scroll down. + Lynx must be compiled with ncurses or slang to support this feature. + -useragent=Name set alternate Lynx User-Agent header. @@ -403,8 +459,12 @@ accept only http URLs (for validation). Complete security restrictions also are implemented. + -verbose + taggles [LINK], [IMAGE] and [INLINE] comments + with filenames of these images. + -version - print version information + print version information. -vikeys enable vi-like key movement. @@ -416,11 +476,274 @@ o Use Up arrow and Down arrow to scroll through hypertext links. o Right arrow or Return will follow a highlighted hypertext link. o Left Arrow will retreat from a link. - o Type "h" or "?" for online help and descriptions of key-stroke commands. - o Type "k" for a complete list of the current key-stroke command mappings. + o Type "H" or "?" for online help and descriptions of key-stroke commands. + o Type "K" for a complete list of the current key-stroke command mappings. + +2 ENVIRONMENT + In addition to various "standard" environment variables + such as HOME, PATH, USER, DISPLAY, TMPDIR, etc, Lynx uti- + lizes several Lynx-specific environment variables, if they + exist. + + Others may be created or modified by Lynx to pass data to + an external program, or for other reasons. These are + listed separately below. + + See also the sections on SIMULATED CGI SUPPORT and NATIVE + LANGUAGE SUPPORT, below. + + Note: Not all environment variables apply to all types of + platforms supported by Lynx, though most do. Feedback on + platform dependencies is solicited. + + Environment Variables Used By Lynx: + + COLORTERM If set, color capability for the ter- + minal is forced on at startup time. + The actual value assigned to the vari- + able is ignored. This variable is + only meaningful if Lynx was built + using the slang screen-handling + library. + + LYNX_CFG This variable, if set, will override + the default location and name of the + global configuration file (normally, + lynx.cfg) that was defined by the + LYNX_CFG_FILE constant in the + userdefs.h file, during installation. + See the userdefs.h file for more + information. + + LYNX_LSS This variable, if set, specifies the + location of the default Lynx character + style sheet file. [Currently only + meaningful if Lynx was built using + experimental color style support.] + + LYNX_SAVE_SPACE This variable, if set, will override + the default path prefix for files + saved to disk that is defined in the + lynx.cfg SAVE_SPACE: statement. See + the lynx.cfg file for more informa- + tion. + + LYNX_TEMP_SPACE This variable, if set, will override + the default path prefix for temporary + files that was defined during instal- + lation, as well as any value that may + be assigned to the TMPDIR variable. + + MAIL This variable specifies the default + inbox Lynx will check for new mail, if + such checking is enabled in the + lynx.cfg file. + + NEWS_ORGANIZATION This variable, if set, provides the + string used in the Organization: + header of USENET news postings. It + will override the setting of the ORGA- + NIZATION environment variable, if it + is also set (and, on UNIX, the con- + tents of an /etc/organization file, if + present). + + NNTPSERVER If set, this variable specifies the + default NNTP server that will be used + for USENET news reading and posting + with Lynx, via news: URL's. + + ORGANIZATION This variable, if set, provides the + string used in the Organization: + header of USENET news postings. On + UNIX, it will override the contents of + an /etc/organization file, if present. + + PROTOCOL_proxy Lynx supports the use of proxy servers + that can act as firewall gateways and + caching servers. They are preferable + to the older gateway servers (see + WWW_access_GATEWAY, below). Each pro- + tocol used by Lynx, (http, ftp, + gopher, etc), can be mapped separately + by setting environment variables of + the form PROTOCOL_proxy (literally: + http_proxy, ftp_proxy, gopher_proxy, + etc), to + "http://some.server.dom:port/". + See Lynx Users Guide for additional + details and examples. + + WWW_access_GATEWAY Lynx still supports use of gateway + servers, with the servers specified + via "WWW_access_GATEWAY" variables + (where "access" is lower case and can + be "http", "ftp", "gopher" or "wais"), + however most gateway servers have been + discontinued. Note that you do not + include a terminal '/' for gateways, + but do for proxies specified by PROTO- + COL_proxy environment variables. See + Lynx Users Guide for details. + + WWW_HOME This variable, if set, will override + the default startup URL specified in + any of the Lynx configuration files. + + Environment Variables Set or Modified By Lynx: + + LYNX_PRINT_DATE This variable is set by the Lynx + p(rint) function, to the Date: string + seen in the document's "Information + about" page (= cmd), if any. It is + created for use by an external pro- + gram, as defined in a lynx.cfg + PRINTER: definition statement. If the + field does not exist for the document, + the variable is set to a null string + under UNIX, or "No Date" under VMS. + + LYNX_PRINT_LASTMOD This variable is set by the Lynx + p(rint) function, to the Last Mod: + string seen in the document's "Infor- + mation about" page (= cmd), if any. + It is created for use by an external + program, as defined in a lynx.cfg + PRINTER: definition statement. If the + field does not exist for the document, + the variable is set to a null string + under UNIX, or "No LastMod" under VMS. + + LYNX_PRINT_TITLE This variable is set by the Lynx + p(rint) function, to the Linkname: + string seen in the document's "Infor- + mation about" page (= cmd), if any. + It is created for use by an external + program, as defined in a lynx.cfg + PRINTER: definition statement. If the + field does not exist for the document, + the variable is set to a null string + under UNIX, or "No Title" under VMS. + + LYNX_PRINT_URL This variable is set by the Lynx + p(rint) function, to the URL: string + seen in the document's "Information + about" page (= cmd), if any. It is + created for use by an external pro- + gram, as defined in a lynx.cfg + PRINTER: definition statement. If the + field does not exist for the document, + the variable is set to a null string + under UNIX, or "No URL" under VMS. + + LYNX_VERSION This variable is always set by Lynx, + and may be used by an external program + to determine if it was invoked by + Lynx. See also the comments in the + distribution's sample mailcap file, + for notes on usage in such a file. + + TERM Normally, this variable is used by + Lynx to determine the terminal type + being used to invoke Lynx. If, how- + ever, it is unset at startup time (or + has the value "unknown"), or if the + -term command-line option is used (see + OPTIONS section above), Lynx will set + or modify its value to the user speci- + fied terminal type (for the Lynx exe- + cution environment). Note: If + set/modified by Lynx, the values of + the LINES and/or COLUMNS environment + variables may also be changed. + +2 SIMULATED CGI SUPPORT + If built with the cgi-links option enabled, Lynx allows + access to a cgi script directly without the need for an + http daemon. + + When executing such "lynxcgi scripts" (if enabled), the + following variables may be set for simulating a CGI envi- + ronment: + + CONTENT_LENGTH + + CONTENT_TYPE + + DOCUMENT_ROOT + + HTTP_ACCEPT_CHARSET + + HTTP_ACCEPT_LANGUAGE + + HTTP_USER_AGENT + + PATH_INFO + + PATH_TRANSLATED + + QUERY_STRING + + REMOTE_ADDR + + REMOTE_HOST + + REQUEST_METHOD + + SERVER_SOFTWARE + + Other environment variables are not inherited by the + script, unless they are provided via a LYNXCGI_ENVIRONMENT + statement in the configuration file. See the lynx.cfg + file, and the (draft) CGI 1.1 Specification + + for the definition and usage of these variables. + + The CGI Specification, and other associated documentation, + should be consulted for general information on CGI script + programming. + +2 NATIVE LANGUAGE SUPPORT + If configured and installed with Native Language Support, + Lynx will display status and other messages in your local + language. See the file ABOUT_NLS in the source distribu- + tion, or at your local GNU site, for more information + about internationalization. + + The following environment variables may be used to alter + default settings: + + LANG This variable, if set, will override + the default message language. It is + an ISO 639 two-letter code identifying + the language. Language codes are NOT + the same as the country codes given in + ISO 3166. + + LANGUAGE This variable, if set, will override + the default message language. This is + a GNU extension that has higher prior- + ity for setting the message catalog + than LANG or LC_ALL. + + LC_ALL and + + LC_MESSAGES These variables, if set, specify the + notion of native language formatting + style. They are POSIXly correct. + + LINGUAS This variable, if set prior to config- + uration, limits the installed lan- + guages to specific values. It is a + space-separated list of two-letter + codes. Currently, it is hard-coded to + a wish list. + + NLSPATH This variable, if set, is used as the + path prefix for message catalogs. 2 NOTES - This is the Lynx v2.8 Release + This is the Lynx v2.8.2 Release If you wish to contribute to the further development of Lynx, subscribe to our mailing list. Send email to with @@ -434,14 +757,33 @@ "unsubscribe lynx-dev" as the only line in the body of your message. Do not send the unsubscribe message to the lynx-dev list, itself. +2 SEE ALSO + catgets(3), curses(3), environ(7), execve(2), ftp(1), + gettext(GNU), localeconv(3), ncurses(3), setlocale(3), + slang(?), termcap(5), terminfo(5), wget(GNU) + + Note that man page availability and section numbering is + somewhat platform dependent, and may vary from the above + references. + + A section shown as (GNU), is intended to denote that the + topic may be available via an info page, instead of a man + page (ie, try "info subject", rather than "man subject"). + + A section shown as (?) denotes that documentation on the + topic exists, but is not part of an established documenta- + tion retrieval system (see the distribution files associ- + ated with the topic, or contact your System Administrator + for further information). + 2 ACKNOWLEDGMENTS Lynx has incorporated code from a variety of sources along the way. The earliest versions of Lynx included code from Earl Fogel of Computing Services at the University of Saskatchewan, who implemented HYPERREZ - in the Unix environment. HYPERREZ was developed by Niel Larson of + in the Unix environment. HYPERREZ was developed by Niel Larson of Think.com and served as the model for the early versions of Lynx. Those versions also incorporated libraries from the Unix Gopher clients - developed at the University of Minnesota, and the later versions of + developed at the University of Minnesota, and the later versions of Lynx rely on the WWW client library code developed by Tim Berners-Lee and the WWW community. Also a special thanks to Foteos Macrides who ported much of Lynx to VMS and did or organized most of its development @@ -456,7 +798,7 @@ Academic Computing Services University of Kansas Lawrence, Kansas 66047 - + Foteos Macrides Worcester Foundation for Biomedical Research Shrewsbury, Massachusetts 01545 diff --git a/gnu/usr.bin/lynx/lynx.man b/gnu/usr.bin/lynx/lynx.man index 7ae40c47747..498d3267266 100644 --- a/gnu/usr.bin/lynx/lynx.man +++ b/gnu/usr.bin/lynx/lynx.man @@ -5,7 +5,7 @@ .SH NAME lynx \- a general purpose distributed information browser for the World Wide Web .SH SYNOPSIS -.B Lynx +.B lynx [options] [path or URL] .PP use "lynx -help" to display a complete list of current options. @@ -22,7 +22,7 @@ use "lynx -help" to display a complete list of current options. Lynx is a fully-featured World Wide Web (WWW) client for users running cursor-addressable, character-cell display devices (e.g., -vt100 terminals, vt100 emulators running on PCs or Macs, or any +vt100 terminals, vt100 emulators running on Windows 95/NT or Macintoshes, or any other "curses-oriented" display). It will display hypertext markup language (HTML) documents containing links to files residing on the local system, as well as files residing on @@ -31,7 +31,7 @@ Current versions of .I Lynx run on -Unix, VMS, Windows95/NT, 386DOS and OS/2 EMX. +Unix, VMS, Windows 95/NT, 386DOS and OS/2 EMX. .PP .I Lynx @@ -47,10 +47,10 @@ Lynx can be used to build systems isolated within a single LAN. .SH OPTIONS -At start up, \fILynx\fR will load any local +At start up, \fILynx\fR will load any local file or remote URL specified at the command line. For help with URLs, press \fB"?"\fR -or \fB"h"\fR while running \fILynx\fR. +or \fB"H"\fR while running \fILynx\fR. Then follow the link titled, "Help on URLs." .PP .TP @@ -60,6 +60,9 @@ the arguments from stdin. This is to allow for the potentially very long command line that can be associated with the -get_data or -post_data arguments (see below). .TP +.B -accept_all_cookies +accept all cookies. +.TP .B -anonymous used to specify the anonymous account. .TP @@ -69,7 +72,7 @@ charset for documents that don't specify it. .B -assume_local_charset\fR=\fIID\fR:\fIMIMEname charset assumed for local files. .TP -.B -assume_unrec_charset\fR=\fIID\fR:\fIMIMEname +.B -assume_unrec_charset\fR=\fIMIMEname use this instead of unrecognized charsets. .TP .B -auth\fR=\fIID\fR:\fIPASSWD @@ -123,6 +126,9 @@ in .lynxrc on startup is overridden by this flag. .B -cookies toggles handling of Set-Cookie headers. .TP +.B -cookie_file\fR=\fIFILENAME +specifies a file to use to store cookies. +.TP .B -core toggles forced core dumps on fatal errors. .TP @@ -130,14 +136,18 @@ toggles forced core dumps on fatal errors. with -traversal, output each page to a file. with -dump, format output as with -traversal, but to stdout. .TP +.B -debug_partial +incremental display stages with MessageSecs delay +.TP .B -display\fR=\fIDISPLAY set the display variable for X rexec-ed programs. .TP .B -dump dumps the formatted output of the default document or one -specified on the command line to standard out. +specified on the command line to standard out. This can be used in the following way: -lynx -dump http://www.crl.com/~subir/lynx.html. +.sp +lynx -dump http://www.crl.com/~subir/lynx.html .TP .B -editor\fR=\fIEDITOR enable edit mode using the specified @@ -153,7 +163,10 @@ toggles compatibility with comm programs' scrollback keys .B -error_file\fR=\fIFILE define a file where Lynx will report HTTP access codes. .TP -.B -fileversions +.B -exec +enable local program execution (normally not configured). +.TP +.B -fileversions include all versions of files in local VMS directory listings. .TP .B -force_html @@ -162,10 +175,13 @@ forces the first document to be interpreted as HTML. .B -force_secure toggles forcing of the secure flag for SSL cookies. .TP +.B -forms_options +toggles the style of options (menu or forms). +.TP .B -from toggles transmissions of From headers. .TP -.B -ftp +.B -ftp disable ftp access. .TP .B -get_data @@ -175,7 +191,7 @@ send form data from stdin using GET method and dump results. send a HEAD request for the mime headers. .TP .B -help -print this Lynx command syntax usage message. +print the Lynx command syntax usage message. .TP .B -hiddenlinks=[option] control the display of hidden links. @@ -279,6 +295,13 @@ disable the retrieval status messages. .B -number_links force numbering of links. .TP +.B -partial +display partial pages while downloading. +.TP +.B partial_thres\fR=\fINUMBER +number of lines to render before repainting display +with partial-display logic +.TP .B -pauth\fR=\fIID\fR:\fIPASSWD set authorization ID and password for a protected proxy server at startup. Be sure to protect any script files @@ -295,6 +318,9 @@ send form data from stdin using POST method and dump results. show HTML source preparsed and reformatted when used with -source or in source view. .TP +.B -prettysrc +show HTML source view with lexical elements and tags in color. +.TP .B -print enable print functions. (default) .TP @@ -317,12 +343,12 @@ allows a list of services to be disabled selectively. The following list is printed if no options are specified. -.I all +.I all - restricts all options. -.I bookmark -- disallow changing the location of the bookmark -file. +.I bookmark +- disallow changing the location of the bookmark +file. .I bookmark_exec - disallow execution links via the bookmark file. @@ -332,57 +358,57 @@ file. (but still allow it for directories) when local file management is enabled. -.I default -- same as command line option -anonymous. -Disables default services for anonymous users. -Currently set to all restricted except for: -inside_telnet, outside_telnet, inside_news, +.I default +- same as command line option -anonymous. +Disables default services for anonymous users. +Currently set to all restricted except for: +inside_telnet, outside_telnet, inside_news, inside_ftp, outside_ftp, inside_rlogin, -outside_rlogin, jump, mail and goto. Defaults +outside_rlogin, jump, mail and goto. Defaults are setable within userdefs.h. .I dired_support - disallow local file management. -.I disk_save +.I disk_save - disallow saving to disk in the download and print menus. .I download - disallow downloaders in the download menu. -.I editor +.I editor - disallow editing. -.I exec +.I exec - disable execution scripts. .I exec_frozen -- disallow the user from changing the local +- disallow the user from changing the local execution option. -.I file_url +.I file_url - disallow using G)oto, served links or bookmarks for file: URLs. -.I goto -- disable the 'g' (goto) command. +.I goto +- disable the 'g' (goto) command. .I inside_ftp - disallow ftps for people coming from inside your domain (utmp required for selectivity). .I inside_news -- disallow USENET news posting for people coming +- disallow USENET news posting for people coming from inside your domain (utmp required for selectivity). .I inside_rlogin - disallow rlogins for people coming from inside your domain (utmp required for selectivity). -.I inside_telnet -- disallow telnets for people coming from inside -your domain (utmp required for selectivity). +.I inside_telnet +- disallow telnets for people coming from inside +your domain (utmp required for selectivity). .I jump - disable the 'j' (jump) command. @@ -396,7 +422,7 @@ your domain (utmp required for selectivity). .I news_post - disallow USENET News posting. -.I options_save +.I options_save - disallow saving options in .lynxrc. .I outside_ftp @@ -404,24 +430,24 @@ your domain (utmp required for selectivity). domain (utmp required for selectivity). .I outside_news -- disallow USENET news posting for people coming +- disallow USENET news posting for people coming from outside your domain (utmp required for selectivity). .I outside_rlogin - disallow rlogins for people coming from outside your domain (utmp required for selectivity). -.I outside_telnet -- disallow telnets for people coming from -outside your domain (utmp required for selectivity). +.I outside_telnet +- disallow telnets for people coming from +outside your domain (utmp required for selectivity). -.I print -- disallow most print options. +.I print +- disallow most print options. -.I shell +.I shell - disallow shell escapes and lynxexec or lynxprog G)oto's. -.I suspend +.I suspend - disallow Unix Control-Z suspends with escape to shell. .I telnet_port @@ -450,13 +476,23 @@ systems without FANCY_CURSES capabilities. The default configuration can be changed in userdefs.h or lynx.cfg. The command line switch toggles the default. .TP +.B -soft_dquotes +toggles emulation of the old Netscape and Mosaic bug which +treated '>' as a co-terminator for double-quotes and tags. +.TP .B -source works the same as dump but outputs HTML source instead of formatted text. .TP +.B -stack_dump +disable SIGINT cleanup handler +.TP .B -startfile_ok allow non-http startfile and homepage with -validate. .TP +.B -tagsoup +initialize parser, using Tag Soup DTD rather than SortaSGML. +.TP .B -telnet disable recognition of telnet commands. .TP @@ -481,6 +517,14 @@ for more information. .B -underscore toggles use of _underline_ format in dumps. .TP +.B -use_mouse +turn on xterm mouse support. +Clicking the left mouse button on a link traverses it. +Clicking the right mouse button pops back. +Click in the first line of a page to scroll up. +Click in the last line of a page to scroll down. +Lynx must be compiled with ncurses or slang to support this feature. +.TP .B -useragent=Name set alternate Lynx User-Agent header. .TP @@ -488,6 +532,9 @@ set alternate Lynx User-Agent header. accept only http URLs (for validation). Complete security restrictions also are implemented. .TP +.B -verbose +taggles [LINK], [IMAGE] and [INLINE] comments with filenames of these images. +.TP .B -version print version information. .TP @@ -503,13 +550,228 @@ o \fBRight arrow\fR or \fBReturn\fR will follow a highlighted hypertext link. .br o \fBLeft Arrow\fR will retreat from a link. .br -o Type \fB"h"\fR or \fB"?"\fR for online help and descriptions +o Type \fB"H"\fR or \fB"?"\fR for online help and descriptions of key-stroke commands. .br -o Type \fB"k"\fR for a complete list of the current key-stroke +o Type \fB"K"\fR for a complete list of the current key-stroke command mappings. +.SH ENVIRONMENT +In addition to various "standard" environment variables such as +\fBHOME\fR, \fBPATH\fR, \fBUSER\fR, \fBDISPLAY\fR, \fBTMPDIR\fR, \fBetc\fR, +\fILynx\fR utilizes several Lynx-specific environment variables, if they +exist. +.PP +Others may be created or modified by \fILynx\fR to pass data to an external +program, or for other reasons. These are listed separately below. +.PP +See also the sections on \fBSIMULATED CGI SUPPORT\fR and +\fBNATIVE LANGUAGE SUPPORT\fR, below. +.PP +Note: Not all environment variables apply to all types of platforms +supported by \fILynx\fR, though most do. Feedback on platform +dependencies is solicited. +.PP +Environment Variables Used By \fILynx\fR: +.TP 20 +.B COLORTERM +If set, color capability for the terminal is forced on at startup time. +The actual value assigned to the variable is ignored. This variable is +only meaningful if \fILynx\fR was built using the \fBslang\fR +screen-handling library. +.TP 20 +.B LYNX_CFG +This variable, if set, will override the default location and name of +the global configuration file (normally, \fBlynx.cfg\fR) that was defined +by the LYNX_CFG_FILE constant in the userdefs.h file, during installation. +See the userdefs.h file for more information. +.TP 20 +.B LYNX_LSS +This variable, if set, specifies the location of the default \fILynx\fR +character style sheet file. [Currently only meaningful if \fILynx\fR was +built using experimental color style support.] +.TP 20 +.B LYNX_SAVE_SPACE +This variable, if set, will override the default path prefix for files +saved to disk that is defined in the \fBlynx.cfg SAVE_SPACE:\fR statement. +See the \fBlynx.cfg\fR file for more information. +.TP 20 +.B LYNX_TEMP_SPACE +This variable, if set, will override the default path prefix for temporary +files that was defined during installation, as well as any value that may +be assigned to the \fBTMPDIR\fR variable. +.TP 20 +.B MAIL +This variable specifies the default inbox \fILynx\fR will check for new +mail, if such checking is enabled in the \fBlynx.cfg\fR file. +.TP 20 +.B NEWS_ORGANIZATION +This variable, if set, provides the string used in the \fBOrganization:\fR +header of \fBUSENET\fR news postings. It will override the setting of the +ORGANIZATION environment variable, if it is also set (and, on \fBUNIX\fR, +the contents of an /etc/organization file, if present). +.TP 20 +.B NNTPSERVER +If set, this variable specifies the default NNTP server that will be used +for \fBUSENET\fR news reading and posting with \fILynx\fR, via news: URL's. +.TP 20 +.B ORGANIZATION +This variable, if set, provides the string used in the \fBOrganization:\fR +header of \fBUSENET\fR news postings. On \fBUNIX\fR, it will override the +contents of an /etc/organization file, if present. +.TP 20 +.B PROTOCOL_proxy +\fILynx\fR supports the use of proxy servers that can act as firewall +gateways and caching servers. They are preferable to the older gateway +servers (see WWW_access_GATEWAY, below). Each protocol used by \fILynx\fR, +(http, ftp, gopher, etc), can be mapped separately by setting environment +variables of the form PROTOCOL_proxy (literally: http_proxy, ftp_proxy, +gopher_proxy, etc), to "http://some.server.dom:port/". +See \fBLynx Users Guide\fR for additional details and examples. +.TP 20 +.B WWW_access_GATEWAY +\fILynx\fR still supports use of gateway servers, with the servers specified +via "WWW_access_GATEWAY" variables (where "access" is lower case and can be +"http", "ftp", "gopher" or "wais"), however most gateway servers have been +discontinued. Note that you do not include a terminal '/' for gateways, but +do for proxies specified by PROTOCOL_proxy environment variables. +See \fBLynx Users Guide\fR for details. +.TP 20 +.B WWW_HOME +This variable, if set, will override the default startup URL specified +in any of the \fILynx\fR configuration files. +.PP +Environment Variables \fBSet\fR or \fBModified\fR By \fILynx\fR: +.TP 20 +.B LYNX_PRINT_DATE +This variable is set by the \fILynx\fR p(rint) function, to the +\fBDate:\fR +string seen in the document's "\fBInformation about\fR" page (= cmd), +if any. +It is created for use by an external program, as defined in a +\fBlynx.cfg PRINTER:\fR definition statement. +If the field does not exist for the document, the variable is set to a +null string under \fBUNIX\fR, or "No Date" under \fBVMS\fR. +.TP 20 +.B LYNX_PRINT_LASTMOD +This variable is set by the \fILynx\fR p(rint) function, to the +\fBLast Mod:\fR +string seen in the document's "\fBInformation about\fR" page (= cmd), +if any. +It is created for use by an external program, as defined in a +\fBlynx.cfg PRINTER:\fR definition statement. +If the field does not exist for the document, the variable is set to a +null string under \fBUNIX\fR, or "No LastMod" under \fBVMS\fR. +.TP 20 +.B LYNX_PRINT_TITLE +This variable is set by the \fILynx\fR p(rint) function, to the +\fBLinkname:\fR +string seen in the document's "\fBInformation about\fR" page (= cmd), +if any. +It is created for use by an external program, as defined in a +\fBlynx.cfg PRINTER:\fR definition statement. +If the field does not exist for the document, the variable is set to a +null string under \fBUNIX\fR, or "No Title" under \fBVMS\fR. +.TP 20 +.B LYNX_PRINT_URL +This variable is set by the \fILynx\fR p(rint) function, to the +\fBURL:\fR +string seen in the document's "\fBInformation about\fR" page (= cmd), +if any. +It is created for use by an external program, as defined in a +\fBlynx.cfg PRINTER:\fR definition statement. +If the field does not exist for the document, the variable is set to a +null string under \fBUNIX\fR, or "No URL" under \fBVMS\fR. +.TP 20 +.B LYNX_VERSION +This variable is always set by \fILynx\fR, and may be used by an external +program to determine if it was invoked by \fILynx\fR. See also the comments +in the distribution's sample \fBmailcap\fR file, for notes on usage in such +a file. +.TP 20 +.B TERM +Normally, this variable is used by \fILynx\fR to determine the terminal type +being used to invoke \fILynx\fR. If, however, it is unset at startup time +(or has the value "unknown"), +or if the \fB-term\fR command-line option is used (see \fBOPTIONS\fR section +above), \fILynx\fR will set or modify its value to the user specified +terminal type (for the \fILynx\fR execution environment). +Note: If set/modified by \fILynx\fR, the values of the \fBLINES\fR and/or +\fBCOLUMNS\fR environment variables may also be changed. +.SH SIMULATED CGI SUPPORT +If built with the \fBcgi-links\fR option enabled, \fILynx\fR allows access +to a cgi script directly without the need for an http daemon. +.PP +When executing such "lynxcgi scripts" (if enabled), the following variables +may be set for simulating a CGI environment: +.PP +.B CONTENT_LENGTH +.PP +.B CONTENT_TYPE +.PP +.B DOCUMENT_ROOT +.PP +.B HTTP_ACCEPT_CHARSET +.PP +.B HTTP_ACCEPT_LANGUAGE +.PP +.B HTTP_USER_AGENT +.PP +.B PATH_INFO +.PP +.B PATH_TRANSLATED +.PP +.B QUERY_STRING +.PP +.B REMOTE_ADDR +.PP +.B REMOTE_HOST +.PP +.B REQUEST_METHOD +.PP +.B SERVER_SOFTWARE +.PP +Other environment variables are not inherited by the script, unless they +are provided via a LYNXCGI_ENVIRONMENT statement in the configuration file. +See the \fBlynx.cfg\fR file, and the (draft) CGI 1.1 Specification + for the +definition and usage of these variables. +.PP +The CGI Specification, and other associated documentation, should be consulted +for general information on CGI script programming. +.SH NATIVE LANGUAGE SUPPORT +If configured and installed with \fBNative Language Support\fR, \fILynx\fR +will display status and other messages in your local language. See the +file \fBABOUT_NLS\fR in the source distribution, or at your local \fBGNU\fR +site, for more information about internationalization. +.PP +The following environment variables may be used to alter default settings: +.TP 20 +.B LANG +This variable, if set, will override the default message language. It +is an \fBISO 639\fR two-letter code identifying the language. Language +codes are \fBNOT\fR the same as the country codes given in \fBISO 3166\fR. +.TP 20 +.B LANGUAGE +This variable, if set, will override the default message language. +This is a \fBGNU\fR extension that has higher priority for setting +the message catalog than \fBLANG\fR or \fBLC_ALL\fR. +.TP 20 +.B LC_ALL +and +.TP 20 +.B LC_MESSAGES +These variables, if set, specify the notion of native language +formatting style. They are \fBPOSIXly\fR correct. +.TP 20 +.B LINGUAS +This variable, if set prior to configuration, limits the installed +languages to specific values. It is a space-separated list of two-letter +codes. Currently, it is hard-coded to a wish list. +.TP 20 +.B NLSPATH +This variable, if set, is used as the path prefix for message catalogs. .SH NOTES -This is the Lynx v2.8 Release +This is the Lynx v2.8.2 Release .PP If you wish to contribute to the further development of \fILynx\fR, subscribe to our mailing list. Send email to @@ -522,14 +784,42 @@ after subscribing. Unsubscribe by sending email to with "unsubscribe lynx-dev" as the only line in the body of your message. Do not send the unsubscribe message to the lynx-dev list, itself. +.SH SEE ALSO +.hy 0 +\fIcatgets\fR(3), +\fIcurses\fR(3), +\fIenviron\fR(7), +\fIexecve\fR(2), +\fIftp\fR(1), +\fIgettext\fR(GNU), +\fIlocaleconv\fR(3), +\fIncurses\fR(3), +\fIsetlocale\fR(3), +\fIslang\fR(?), +\fItermcap\fR(5), +\fIterminfo\fR(5), +\fIwget\fR(GNU) +.hy 1 +.PP +Note that man page availability and section numbering is somewhat +platform dependent, and may vary from the above references. +.PP +A section shown as (GNU), is intended to denote that the topic +may be available via an info page, instead of a man page (ie, try +"info subject", rather than "man subject"). +.PP +A section shown as (?) denotes that documentation on the topic exists, +but is not part of an established documentation retrieval system (see +the distribution files associated with the topic, or contact your +System Administrator for further information). .SH ACKNOWLEDGMENTS Lynx has incorporated code from a variety of sources along the way. The earliest versions of Lynx included code from Earl Fogel of Computing Services at the University of Saskatchewan, who implemented HYPERREZ -in the Unix environment. HYPERREZ was developed by Niel Larson of +in the Unix environment. HYPERREZ was developed by Niel Larson of Think.com and served as the model for the early versions of Lynx. Those versions also incorporated libraries from the Unix Gopher clients -developed at the University of Minnesota, and the later versions of +developed at the University of Minnesota, and the later versions of Lynx rely on the WWW client library code developed by Tim Berners-Lee and the WWW community. Also a special thanks to Foteos Macrides who ported much of Lynx to VMS and did or organized most of its development since the diff --git a/gnu/usr.bin/lynx/lynx_help/Lynx_users_guide.html b/gnu/usr.bin/lynx/lynx_help/Lynx_users_guide.html index 49cec8d355c..45d82fab93d 100644 --- a/gnu/usr.bin/lynx/lynx_help/Lynx_users_guide.html +++ b/gnu/usr.bin/lynx/lynx_help/Lynx_users_guide.html @@ -1,12 +1,12 @@ -Lynx Users Guide v2.8 +Lynx Users Guide v2.8.2 -

Lynx Users Guide v2.8

+

Lynx Users Guide v2.8.2

Lynx is a fully-featured World Wide Web (WWW) client for users running cursor-addressable, character-cell display devices (e.g., @@ -18,7 +18,7 @@ well as files on remote systems running http, gopher, cso/ph/qi servers, and services accessible via logins to telnet, tn3270 or rlogin accounts (see URL Schemes Supported by Lynx). -Current versions of Lynx run on Unix, VMS, +Current versions of Lynx run on Unix, VMS, Windows95/NT, 386DOS and OS/2 EMX.

Lynx can be used to access information on the WWW, or to build @@ -27,57 +27,61 @@ has been used to build several Campus Wide Information Systems (CWIS). In addition, Lynx can be used to build systems isolated within a single LAN. -

Table of Contents

+

Table of Contents

-

Lynx online help

+

Lynx online help

Online help is available while viewing any document. Press the -'?' or 'H' key (or the 'h key if vi-like -key movement is not on) to see a list of help topics. See the section -titled Navigating hypertext documents with Lynx for -information on navigating through the help files. +'?' or 'H' key (or the 'h' key if +vi-like key movement is not on) to see a list of help topics. +See the section titled Navigating +hypertext documents with Lynx for information on navigating +through the help files.

In addition, a summary description of all the Lynx keystroke commands and their key bindings is available by pressing the 'K' key (or the 'k' key if vi-like key movement is not on). -[ToC] +[ToC] -

Viewing local files with Lynx

+

Viewing local files with Lynx

Lynx can be started by entering the Lynx command along with the name of a file to display. For example these commands could @@ -105,7 +109,7 @@ all be used to display an arbitrary ASCII text or HTML file:

When executed, Lynx will clear the screen and display as much of the specified file as will fit on the screen. Pressing a down-arrow will bring up the next screen, and pressing an up-arrow will bring -up the previous screen. If no file is specified at startup, a default file +up the previous screen. If no file is specified at startup, a default file will be displayed. (The default is configured by the system administrator when the command is installed.) @@ -133,11 +137,12 @@ selected link when a right-arrow or a Return key is pressed. To select a particular link, press the up-arrow or down-arrow keys until the desired link becomes "highlighted," and then press the right-arrow or Return key to view -the linked information. Information included in the HTML file tells Lynx +the linked information. Information included in the HTML file tells Lynx where to find the linked file and what kind of server will provide it -(i.e. HTTP, Gopher, etc.). +(i.e., HTTP, Gopher, etc.). -

Lynx renders HTML files and saves the rendition, not the source, +

Lynx renders HTML files and saves the rendition (and the source, if +so configured in the lynx.cfg file) for initial display and should you select the link again. If you do select a link again and have reason to desire a new fetch and rendering of the file, use the NOCACHE command, normally mapped to 'x' and @@ -147,22 +152,22 @@ of the currently displayed document via the RELOAD command, normally mapped to Control-R.

When a binary file is encountered Lynx will ask the user if he/she -wishes to download the file or cancel. If the user selects 'D' +wishes to download the file or cancel. If the user selects 'D' for download, Lynx will transfer the file into a temporary location and -present the user with a list of options. The only default option is +present the user with a list of options. The only default option is Save to disk, which is disabled if Lynx is running in anonymous -mode. Any number of additional download methods may be defined in the -lynx.cfg file by the system administrator. Programs like kermit, zmodem -and FTP are some possible options. [ToC] +mode. Additional download methods may be defined in the +lynx.cfg file. Programs like kermit, zmodem +and FTP are some possible options. [ToC] -

Leaving Lynx

+

Leaving Lynx

To exit Lynx use the 'q' command. You will be asked whether you really want to quit. Answering 'y' will exit and 'n' -will return you to the current document. Use 'Q' or -Control-D to quit without verification. [ToC] +will return you to the current document. Use 'Q' or +Control-D to quit without verification. [ToC] -

Starting Lynx with a Remote File

+

Starting Lynx with a Remote File

If you wish to view a remote file (that is, a file residing on some computer system other than the one upon which you are running @@ -219,10 +224,9 @@ portions of it in the startfile argument. For example:
will be expanded to:
ftp://ftp.more.net/pub
See URL Schemes Supported by Lynx for -more detailed information. [ToC] +more detailed information. [ToC] -

Starting Lynx with the WWW_HOME environment variable.

+

Starting Lynx with the WWW_HOME environment variable.

You may also specify a starting file for Lynx using the WWW_HOME environment variable, @@ -242,9 +246,9 @@ environment variable, Note that on VMS the double-quoting must be included to preserve -casing. +casing. [ToC] -

Navigating hypertext documents with Lynx

+

Navigating hypertext documents with Lynx

The process of moving within a hypertext web, selecting and displaying links is known as "navigation." With Lynx almost all navigation can be @@ -268,7 +272,7 @@ accomplished with the arrow keys and the numeric keypad. There are also a few other keyboard commands to aid in navigation. The Control and Function keys used for navigation within the current document are described in Scrolling and Other useful commands. Some +HREF="#MiscKeys">Scrolling and Other useful commands. Some additional commands depend on the fact that Lynx keeps a list of each link you visited to reach the current document, called the History Page, and a @@ -283,9 +287,9 @@ show the Visited Links Page, and you similarly can select links in that list. The MAIN_MENU keystroke command, normally mapped to 'm' and 'M', will take you back to the starting document unless you specified the -homepage=URL option at the command line. Also, the -LIST keystroke command, normally mapped to 'l' and L', -will create a compact list of all the links in the current document, and -they can be selected via that list. +LIST and ADDRLIST keystroke commands, normally mapped to 'l' and +A' respectively, will create a compact lists of all the links in +the current document, and they can be selected via those lists.

The 'i' key presents an index of documents. The default index is usually a document pointing to servers around the world, but the index @@ -297,9 +301,9 @@ program you are using was configured. will automatically prompt for a username and a password. If you give the correct information, you will then be served the requested information. Lynx will automatically send your username and password to the same server -if it is needed again. [ToC] +if it is needed again. [ToC] -

Printing, Mailing, and Saving rendered files to disk.

Rendered HTML documents, and plain text files, may be printed using the @@ -317,8 +321,8 @@ mail files to themselves and print the entire file to the screen. Lynx from their own accounts (that is, so-called "non-anonymous users"). In particular, the Save to a local file option allows you to save the document into a file on your disk -space. Any number of additional print options may also be -available as configured by your system administrator. +space. Additional print options may also be +available as configured in the lynx.cfg file.

Some options, such as Save to a local file, involve prompting for an output filename. All output filename entries are saved in a @@ -326,23 +330,25 @@ circular buffer, and any previous entries can be retrieved for re-use by pressing the up-arrow or down-arrow keys at the prompt.

Note that if you want exact copies of text files without any expansions -of TAB characters to spaces you should use the Download -options. [ToC] +of TAB characters to spaces you should use the +Download options. +[ToC] -

Viewing the HTML document source and editing documents

When viewing HTML documents it is possible to retrieve and display the unrendered (i.e., the original HTML) source of the document by pressing -the '\' (backslash) key. The document must be reloaded from the -server or disk to be displayed on the screen unrendered, since Lynx -originally rendered what it received and does not still have it as source. +the '\' (backslash) key. Lynx usually caches only the rendering +of the document and doesn't keep the source (unless it is configured to do +so in the lynx.cfg file), so to display the source +unrendered, Lynx must reload it from the server or disk. When viewing unrendered documents you may print them as any normal document.

Selecting the Print to a local file option from the Print Menu, makes it possible to save the source of the document to disk so that you may have a local copy of the document source, but it is better to Download the source. +href="#RemoteSource">Download the source.

NOTE: When saving an HTML document it is important to name the document with a .html extension, if you want to read it with @@ -366,32 +372,45 @@ documents by using the 'e' command. When the 'e' command is entered your specified editor is spawned to edit the file. After changes are completed, exit your editor and you will return to Lynx. Lynx will reload and render the file so that changes can be immediately -examined. [ToC] - -

Downloading and Saving source files.

- -If the DOWNLOAD keystroke command ('d' or D) is used -when positioned on a link for an HTML, plain text, or binary file, Lynx -will transfer the file, without rendering or modification, into a temporary -location and present the user with a list of options, as when a link for a -binary file of a type for which no viewer has been mapped is activated. -As described above, the only default Download option is -Save to disk, which is disabled if Lynx is running in -anonymous mode, and any number of additional download methods such as -kermit and zmodem may be defined in the lynx.cfg file by the -system administrator. Downloading the sources of HTML and plain text -files, instead of toggling to display the source -('\') and then using Printing options, ensures -that no modifications of the source (e.g., expansions of TAB characters -to a series of spaces) will occur. +examined. [ToC] + +

Downloading and Saving source files.

+ +If the DOWNLOAD keystroke command ('d' or D) is +used when positioned on a link for an HTML, plain text, or binary +file, Lynx will transfer the file, without rendering, into a +temporary location and present the user with a list of options, +just as it does when a link for a binary file of a type for which +no viewer has been mapped is activated. + +

There is a default Download option of Save to +disk. This is disabled if Lynx is running in anonymous +mode. Any number of download methods such as kermit and zmodem +may be defined in addition to this default in the +lynx.cfg file. Using the Save to disk option +under the PRINT command after viewing the source of an HTML with +the VIEW SOURCE (\) command will result in a file which +differs from the original source in various ways such as tab +characters expanded to spaces. Lynx formats the source presentation +in this mode. On the other hand, if the DOWNLOAD command is used, +the only change will be that Lynx optionally puts +

+<!--X-URL: http://www.site.foo/path/to/file.html -->
+<BASE href="http://www.site.foo/path/to/file.html"> +
+at the start of the file so that relative URLs in the document +will still work. + +Even this modification can be prevented by setting +PREPEND_BASE_TO_SOURCE:FALSE in lynx.cfg.

Some options, such as Save to disk, involve prompting for an output filename. All output filename entries are saved in a circular buffer, and any previous entries can be retrieved for re-use by pressing the up-arrow or down-arrow keys at the prompt. -[ToC] +[ToC] -

Reloading files and refreshing the display

The RELOAD (Control-R) command will reload and re-render the file @@ -406,17 +425,19 @@ cache from a previous request or submission exits. The request or submission will include Pragma: no-cache and Cache-Control: no-cache in its headers. Note that FORMs with POST content will be resubmitted regardless of whether the NOCACHE or ACTIVATE command is used (see Lynx and HTML Forms). [ToC] +HREF="#Forms">Lynx and HTML Forms). +[ToC] -

Lynx searching commands

+ Two commands activate searching in Lynx: '/' and 's'. -

While viewing a normal document use the '/' command to find a -word or phrase within the current document. The search type will depend on -the search option setting in the Options Menu. The search -options are case sensitive and case insensitive. These searches are entirely -local to Lynx. +

While viewing a normal document use the '/' command +to find a word or phrase within the current document. The search +type will depend on the search option setting in the Options Menu. The search options +are case sensitive and case insensitive. These searches are +entirely local to Lynx.

Some documents are designated index documents by virtue of an ISINDEX element in their HEAD section. These documents can be used to @@ -441,7 +462,7 @@ documents, or if the current document is reloaded. The search cycles to the top of the document if the word or phrase is not located below your current position. -

Although HTML Forms have largely replaced index +

Although HTML Forms have largely replaced index documents for searches via http servers, they are still useful for performing searches directly via WAIS or Gopher servers in conjunction with the internal gateways for such servers. For example, an HTML index document can act as a @@ -450,39 +471,97 @@ strings for searching it, and include an element such as:
<ISINDEX PROMPT="Enter WAIS query:"
HREF="wais://net.bio.net/biologists-addresses">

for submitting a search of the Biologist's Addresses database directly -to the net.bio.net WAIS server. [ToC] +to the net.bio.net WAIS server. [ToC] -

Lynx Options Menu

+

Lynx Options Menu

The Lynx Options Menu may be accessed by pressing the 'o' -key. The current Options Menu contains the following configurable -options. +key. The current Options Menu allows you to change options which are +useful at runtime. Most of these are read/saved from your .lynxrc file. +Other options are stored in the lynx.cfg file. + +

Lynx supports two styles of options menu. The new style shown below is an HTML +file generated at runtime: + +

+
+                    Options Menu (Lynx Version 2.8.2pre.6)
+
+      Accept Changes - Reset Changes Left Arrow cancels changes HELP!
+
+                         Save options to disk: [_]
+
+  Personal Preferences
+  Cookies                          : [ask user..]
+  Editor                           : __________________________________________
+  Emacs keys                       : [OFF]
+  Keypad mode                      : [Numbers act as arrows.............]
+  Personal mail address            : __________________________________________
+  Searching type                   : [Case insensitive]
+  Show color                       : [ON....]
+  Show cursor                      : [OFF]
+  User mode                        : [Advanced....]
+  VI keys                          : [OFF]
+  Display character set            : [Western (ISO-8859-1)...........]
+  X Display                        : __________________________________________
+
+  Document Layout
+  Assumed document character set   : [iso-8859-1......]
+  Raw 8-bit                        : [ON.]
+  HTML error recovery              : [strict (SortaSGML mode)]
+  Popups for select fields         : [ON.]
+  Show images                      : [as labels]
+  Verbose images                   : [show filename]
+
+  Bookmark Options
+  Multi-bookmarks                  : [OFF.....]
+  Bookmarks file                   : __________________________________________
+
+  File Management Options
+  FTP sort criteria                : [By Name]
+  Local directory sort criteria    : [Mixed style......]
+
+  Headers transferred to remote server
+  Preferred document character set : _________________________________
+  Preferred document language      : _________________________________
+  User-Agent header                : __________________________________________
+
+  Check your lynx.cfg here
+
+         Accept Changes - Reset Changes Left Arrow cancels changes
+
+
+ +

The old style of options menu is a fixed form. Normally this will be +compiled into Lynx, and is accessed by setting FORMS_OPTIONS true in your +lynx.cfg file.

-                      Options Menu
+             Options Menu (Lynx Version 2.8.2pre.6)
 
-     E)ditor                      : emacs
-     D)ISPLAY variable            : aixtest.cc.ukans.edu:0.0
+     (E)ditor                     : emacs
+     (D)ISPLAY variable           : aixtest.cc.ukans.edu:0.0
      mu(L)ti-bookmarks: OFF       B)ookmark file: lynx_bookmarks.html
-     F)TP sort criteria           : By Filename
-     P)ersonal mail address       : montulli@netscape.com
-     S)earching type              : CASE INSENSITIVE
+     (F)TP sort criteria          : By Filename
+     (P)ersonal mail address      : montulli@netscape.com
+     (S)earching type             : CASE INSENSITIVE
      preferred document lan(G)uage: en
      preferred document c(H)arset : NONE
-     display (C)haracter set      : ISO Latin 1
-     raw 8-bit or CJK m(O)de      : ON      show color (&)  : OFF
-     V)I keys: OFF    e(M)acs keys: OFF     sho(W) dot files: OFF
+     display (C)haracter set      : Western (ISO-8859-1)
+     raw 8-bit or CJK m(O)de      : ON      show color (&)  : OFF
+     (V)I keys: OFF   e(M)acs keys: OFF     sho(W) dot files: OFF
      popups for selec(T) fields   : ON      show cursor (@) : OFF
-     K)eypad mode                 : Numbers act as arrows
+     (K)eypad mode                : Numbers act as arrows
      li(N)e edit style            : Default Binding
      l(I)st directory style       : Mixed style
-     U)ser mode                   : Advanced
+     (U)ser mode                  : Advanced      verbose images (!) : ON
      user (A)gent                 : [User-Agent header]
      local e(X)ecution links      : FOR LOCAL FILES ONLY
 
An option can be changed by entering the capital letter or character in -parentheses for the option you wish to change (e.g. 'E' for Editor +parentheses for the option you wish to change (e.g., 'E' for Editor or '@' for show cursor). For fields where text must be entered, simply enter the text by typing on the keyboard. The Line Editor can be used to @@ -494,13 +573,14 @@ to get back to the Command? prompt. to toggle the choices and press the Return key to finish the change. -

For fields where you potentially have more than two choices, popup -windows may be evoked which function homologously to those for select -fields in HTML Forms. The popup windows will be invoked -only if you have popups for select fields set to ON (see below). Otherwise, -your cursor will be positioned at the current choice, and you can press any -key to cycle through the choices, then press the Return key to -finish the change. +

For fields where you potentially have more than two choices, +popup windows may be evoked which function homologously to those +for select fields in HTML Forms. The popup +windows will be invoked only if you have popups for select fields +set to ON (see below). Otherwise, your cursor will be positioned +at the current choice, and you can press any key to cycle through +the choices, then press the Return key to finish the +change.

When you are done changing options use the 'r' command to return to Lynx or the '>' command to save the options to a @@ -542,7 +622,7 @@ return to Lynx or the '>' command to save the options to a href="keystrokes/edit_help.html">Line Editor. Bookmark files allow frequently traveled links to be stored in personal easy to access files. Using the 'a'dd bookmark - link command (see Lynx bookmarks) you may save + link command (see Lynx bookmarks) you may save any link that does not have associated POST content into a bookmark file. All bookmark files must be in or under your account's home directory. If the location specified does not @@ -571,7 +651,8 @@ return to Lynx or the '>' command to save the options to a yourself and will be included as the From: address in any mail or comments that you send. It will also be sent as the From: field in HTTP or HTTPS requests if inclusion of that header - has been enabled via the NO_FROM_HEADER definition in lynx.cfg + has been enabled via the NO_FROM_HEADER definition in + lynx.cfg (the compilation default is not to send the header), or via the -from command line toggle. @@ -598,7 +679,7 @@ return to Lynx or the '>' command to save the options to a (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 + 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, utf-8;q=0.8 @@ -611,24 +692,41 @@ return to Lynx or the '>' command to save the options to a 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. + character set installed on your terminal. (Since Lynx now + supports a wide range of platforms it may be useful to note + that cpXXX codepages used within IBM PC computers, and + windows-xxxx within native MS-Windows apps.)

Raw 8-bit or CJK Mode
Whether 8-bit characters are assumed to correspond with the - selected character set and therefore are processed without + display character set and therefore are processed without translation via the chartrans conversion tables. Should be ON - by default when the selected character set is one of the Asian - (CJK) sets and the 8-bit characters are Kanji multibytes. - Should be OFF for the other character sets, but can be turned ON + by default when the display character set is one of the + Asian (CJK) sets and the 8-bit characters are Kanji multibytes. + Should be OFF for the other display 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 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 - is ISO-8859-1. The setting also can be toggled via the RAW_TOGGLE + is ISO-8859-1 or another 'assumed document character set'. + The setting also can be toggled via the RAW_TOGGLE command, normally mapped to '@', and at startup via the -raw switch. +
Assumed document character set +
This option changes the handling of documents which do not + explicitly specify a charset. Normally Lynx assumes that 8-bit + characters in those documents are encoded according to iso-8859-1 + (the official default for the HTTP protocol). Unfortunately, + many non-English web pages "forget" to include proper charset info; + this option helps you to browse those broken pages if you know + by some means what the charset is. When the value + given here or by an -assume_charset command line flag is in effect, + Lynx will treat documents as if they were encoded accordingly. + This option active when 'Raw 8-bit or CJK Mode' is OFF. +
Show color.
This option will be present if color support is available. If set to ON or ALWAYS, color mode will be forced on if possible. @@ -641,7 +739,7 @@ return to Lynx or the '>' command to save the options to a cause Lynx to set color mode on at startup if supported. If Lynx is built with the slang library, this is equivalent to having included the -color command line switch or having the - COLORTERM environment variable set. If color support is + COLORTERM environment variable set. If color support is provided by curses or ncurses, this is equivalent to the default behavior of using color when the terminal type supports it. If (n)curses color support is available but cannot be used for @@ -670,6 +768,8 @@ return to Lynx or the '>' command to save the options to a uppercase H, J, K, and L keys remain mapped to their configured bindings (normally HELP, JUMP, KEYMAP, and LIST, respectively). +

Note: this has no effect on the line-editor's key bindings. +

Emacs keys
If set to ON then the CTRL-P, CTRL-N, CTRL-F, and CTRL-B keys will be mapped to up-arrow, down-arrow, right-arrow, and @@ -677,6 +777,8 @@ return to Lynx or the '>' command to save the options to a their configured bindings (normally UP_TWO lines, DOWN_TWO lines, NEXT_PAGE, and PREV_PAGE, respectively). +

Note: this has no effect on the line-editor's key bindings. +

Show dot files
If display/creation of hidden (dot) files/directories is enabled, you can turn the feature on or off via this setting. @@ -709,9 +811,9 @@ return to Lynx or the '>' command to save the options to a selected or made current by numbers as well as using the arrow keys, or having every link as well as every form field numbered so that they can be selected or sought by numbers. See the
-   Follow link (or page) number: and
-   Select option (or page) number:
help for more information. @@ -751,23 +853,31 @@ return to Lynx or the '>' command to save the options to a link at the bottom of the screen. +
Verbose Images +
Controls whether or not Lynx replaces the [LINK], [INLINE] and + [IMAGE] comments (for images without ALT) with filenames of these + images. This is extremely useful because now we can determine + immediately what images are just decorations (button.gif, line.gif) + and what images are important. This setting can also be toggled + on startup via the -verbose switch. +
User Agent
The header string which Lynx sends to servers to indicate the User-Agent is displayed here. Changes may be disallowed via the -restrictions switch. Otherwise, the header can be - changed temporarily to a string such as L_y_n_x/2.8 + changed temporarily to a string such as L_y_n_x/2.8.2 for access to sites which discriminate against Lynx based on - checks for the presence of "Lynx" in the header. If + checks for the presence of "Lynx" in the header. If changed during a Lynx session, the default User-Agent header can be restored by deleting the modified string in the - Options Menu. Whenever the User-Agent header is + Options Menu. Whenever the User-Agent header is changed, the current document is reloaded, with the no-cache - flags set, on exit from the Options Menu. Changes of + flags set, on exit from the Options Menu. Changes of the header are not saved in the RC file.
NOTE that Netscape Communications Corp. has claimed that false transmissions of "Mozilla" as the User-Agent are a copyright infringement, which will be prosecuted. DO NOT - misrepresent Lynx as Mozilla. The Options Menu issues + misrepresent Lynx as Mozilla. The Options Menu issues a warning about possible copyright infringement whenever the header is changed to one which does not include "Lynx" or "lynx". @@ -792,19 +902,30 @@ return to Lynx or the '>' command to save the options to a
If the users options permit the script to be executed Lynx will - spawn a shell and run the script. If the script cannot be + spawn a shell and run the script. If the script cannot be executed Lynx will show the script within the Lynx window and inform the user that the script is not allowed to be executed and will ask the user to check his/her options. - [ToC] + [ToC] -

Comments and mailto: links

+

Comments and mailto: links

At any time while viewing documents within Lynx, you may use the 'c' command to send a mail message to the owner of the current -document if the author of the document has specified ownership. If no -ownership is specified then comments are disabled. Certain links called +document if the author of the document has specified ownership. (Note to +authors: if you want to assign the ownership to your document, you need to add +into HEAD section a LINK element with appropriate value for REV attribute. Two +values are recognized: owner and made (these are case +insensitive). For example,
+<HEAD>
+    …
+    <LINK REV="made" HREF="mailto:user@somedomain.com">
+    …
+<HEAD>
+
+You may also add a TITLE attribute with, for example, the name of your page) If +no ownership is specified then comments are disabled. Certain links called mailto: links will also allow you to send mail to other people. Using the mail features within Lynx is straightforward. @@ -817,7 +938,7 @@ address, and the subject of the message. If you have filled in the address will be filled in automatically. After entering the above information, if you have an editor defined in the Options Menu and you are not an anonymous user then your specified editor will be -spawned for you so that you can enter your message. If you do not have +spawned for you so that you can enter your message. If you do not have an editor defined or you are an anonymous user, a simple line mode input scheme will allow you to enter your message. @@ -825,12 +946,13 @@ scheme will allow you to enter your message. using the simple line mode input scheme, type a '.' (period) on a line by itself. You will be asked a final time whether to send the message. If you press 'y', you will be prompted whether to -append your signature file if one was defined in lynx.cfg and is accessible, +append your signature file if one was defined in +lynx.cfg and is accessible, and then the message will be sent, whereas if you press 'n' the message will be deleted. Entering Control-G in response to any prompts -also will cancel the mailing.[ToC] +also will cancel the mailing.[ToC] -

USENET News posting

+

USENET News posting

While reading lynx.cfg and is accessible. See Supported URLs for more information about the URL schemes for posting or sending followups (replies) to nntp servers with Lynx. - [ToC] + [ToC] -

Lynx bookmarks

+

Lynx bookmarks

It is often useful to place a bookmark to aid in returning quickly to a document. To use the bookmark feature you must first use the @@ -910,32 +1032,44 @@ and spacing (other than the Anchor content or HREF value) within lines is changed or other HTML markup is added, the 'a'dd and 'r'emove commands may not work properly. -

When multi-bookmarks (see Options Menu) is OFF, -you will always view or add links to the default bookmark file. When -it is STANDARD, a menu of up to 26 bookmark files will be invoked, -and you select the bookmark file by entering its letter token. When -it is ADVANCED, you will be prompted for the letter token, but can -enter '=' to invoke the STANDARD selection menu, or -RETURN for the default bookmark file. -[ToC] - -

Jump Command

- -A feature similar to the Lynx bookmarks is the jump command. The jump -command allows you to enter a shortcut name to access a URL. If the jump -feature is active, typing 'j' will produce a prompt where you may -enter the shortcut name. Type '?' at the jump prompt for a list -of shortcut names available. - -

All jump shortcut entries are saved in a circular buffer, and any -previous entries can be retrieved for re-use by pressing the -up-arrow or down-arrow keys at the prompt. - -

Note to System Administrators: Read the lynx.cfg file on how -to set up the jump command for your system and how to define shortcut names. -[ToC] - -

Directory Editing

+

When multi-bookmarks (see Options Menu) is OFF, you will +always view or add links to the default bookmark file. When it +is STANDARD, a menu of up to 26 bookmark files will be invoked, +and you select the bookmark file by entering its letter +token. When it is ADVANCED, you will be prompted for the letter +token, but can enter '=' to invoke the STANDARD +selection menu, or RETURN for the default bookmark file. +[ToC] + +

Jump Command

+ +Similar to the bookmarks file is the jumps file: for an example, +look in the samples subdirectory in the distribution package. +To use the jumps command, create a jumps file with the same format +as the sample file, but containing your own URLs & short-cut names. +Once you have done that, typing 'j' prompts you to enter +a short-cut name, which will take you straight to the URL +associated with the short-cut in the jumps file, +much like using 'g'. +If you want to check which short-cuts are available, +type '?' at the jump prompt for the full list.

+ +All jump short-cuts you have entered are saved in a circular buffer +in the same way as with 'g' and '/' (search):
+previous entries can be retrieved with up-arrow +or down-arrow.

+ +The jumps feature is especially useful for system administrators +who have unsophisticated users to care for, but ordinary Lynx users +who have a number of URLs they regularly visit while browsing +may find using the jumps command speeds their movements.

+ +For more advice how to set up the jumps command on your system +and how to define short-cut names, read lynx.cfg . +[ToC] + +

Directory Editing

Lynx offers extended DIRED support on Unix (on VMS the more powerful CSwing program is recommended for character cell terminals, and can be @@ -979,9 +1113,9 @@ on your local system. The commands available in DIRED mode are
Type 'u' to upload a file to the present directory. Upload methods are defined by your system administrator. -[ToC] +[ToC] -

Scrolling and Other useful commands

+

Scrolling and Other useful commands

A summary of all the keystroke commands and their key bindings can be invoked via the KEYMAP command, normally mapped to 'k' and @@ -1008,7 +1142,8 @@ commands. the current document, and thus is a synonym for the Keypad and Function Page-Up keys. However, Control-B acts as right-arrow when emacs-like key movement is - enabled (see Lynx Options Menu). + enabled (see Lynx + Options Menu).
^F
Control-F normally jumps you to the next page of the current document, and thus is a synonym for the Keypad and @@ -1096,7 +1231,7 @@ commands. document's author.
;
The ; command shows the Lynx Trace Log - (lynx.trace in the home directory) if one has been + (Lynx.trace in the home directory) if one has been started for the current session. If a log has not been started, any trace and other stderr messages will be sent to the screen (and will disturb the normal display) unless the system supports @@ -1108,7 +1243,7 @@ commands. create a log can be toggled on with the -tlog switch. Note that this ability is disabled in anonymous or validation accounts. -
* +
*
The '*' command toggles image_links mode on and off. When on, links will be created for all images, including inlines. If you have an image viewer mapped to the image's MIME type, you @@ -1119,7 +1254,7 @@ commands. When on, the charset is assumed to match the selected character set and 8-bit characters are not reverse translated with respect to the ISO-8859-1 conversion tables. -
[ +
[
The '[' command toggles pseudo_inlines mode on and off. When on, inline images which have no ALT string specified will have an [INLINE] pseudo-ALT string inserted in the Lynx @@ -1142,7 +1277,7 @@ commands. href="keystrokes/cookie_help.html">Cookie Jar Page if it contains cookies.
z -
Lynx supports completely interruptible I/O processes. Press the +
Lynx supports completely interruptible I/O processes. Press the 'z' key at any time during a connect or transfer process and the process will be halted. If any data was transferred before the interrupt, it will be displayed. @@ -1155,10 +1290,10 @@ commands. href="keystrokes/follow_help.html#select-option" >Select option (or page) number:
prompts. - [ToC] + [ToC] -

Lynx and HTML Forms

+

Lynx and HTML Forms

This section describes the Lynx Forms Interface. HTML gives document providers the ability to create on-line forms which may be filled out @@ -1172,7 +1307,7 @@ options from a list, and fields for entering text.
Buttons:
Buttons are displayed in the same way that Lynx displays links in - a document. To "push" the button press the right-arrow or + a document. To "push" the button press the right-arrow or Return key. If it is a form submission button, you also can use the RESUBMIT ('x') or DOWNLOAD ('d') keystroke commands to "push" the button (see below). @@ -1195,10 +1330,11 @@ options from a list, and fields for entering text. page-down, and other navigation keys to move the cursor among options, and the right-arrow or Return key to select an option. You also can use the '/' and 'n'ext - searching commands for navigating to options which + searching commands for navigating to options which contain particular strings. NOTE that the popup menu feature can be disabled via compilation and/or configuration options, - or via the Options Menu, in which case the selection + or via the Options Menu, + in which case the selection field options will be converted to a list of radio buttons. The default setting for use of popups or radio button lists can be toggled via the -popup command line switch. @@ -1216,6 +1352,8 @@ options from a list, and fields for entering text. entry field. NOTE, however, that Return also will submit the form if the text entry field is the only non-hidden field in the form. + +
TEXTAREA Fields
TEXTAREA fields are handled as if they were a series of text entry (INPUT) fields for which successive lines imply a newline at the end of the preceding line. You enter text on each line to construct the overall @@ -1225,12 +1363,49 @@ options from a list, and fields for entering text. or next line of the overall message, as for INPUT fields, and the TAB key will move you down beyond the bottom of the TEXTAREA field, or to the first line on the next page if the overall field - extends beyond the currently displayed page. + extends beyond the currently displayed page.

+ +

Editing TEXTAREA Fields +
TEXTAREA fields can be edited using an external editor + by entering ^ve when in the TEXTAREA.

+ + You can also use two other special TEXTAREA functions + by adding KEYMAP bindings to your lynx.cfg file, e.g.

+ +   KEYMAP:$:GROWTEXTAREA
+   KEYMAP:#:INSERTFILE

+ + With these binding -- you can choose other keys -- ,
+ (in a TEXTAREA only) ^v$ adds 5 lines to the TEXTAREA + and ^v# brings up the name of an existing file + to be inserted into the TEXTAREA (above the cursorline). + An automatic variation is normally compiled in, + so that hitting Enter with the cursor on the last line + adds a new line to the TEXTAREA, with the cursor on it.

+ + Some flavors of UNIX, shells & terminal settings require + that you enter ^v^ve in order to start the editor, + as they also use ^v as default command-line quote key + (called `lnext' in stty man pages and `stty -a' output); + to avoid this, you can put `stty lnext undef' in .cshrc + or invoke Lynx with a wrapper script, e.g.

+ + +   #!/bin/sh
+   stty lnext undef
+   $HOME/bin/lynx "$@"
+   stty lnext ^V
+   exit

+ + NB when NOT in a TEXTAREA, ^v is the default command + to switch between SortaSGML and TagSoup HTML parsing + (i.e., SWITCH_DTD ). +

In general, you can move around the form using the standard Lynx navigation keys. The up-arrow and down-arrow keys, respectively, -select the previous or next field, box, or button. The TAB key +select the previous or next field, box, or button. The TAB key selects the next field (or next page of a TEXTAREA if it extends onto the next page), box, or button. @@ -1271,7 +1446,7 @@ which you activated, and then you go back via the PREV_DOC (left-arrow) command or via the History Page. Lynx can be compiled so that it resubmits the form in those cases as well, and the default -can be changed via lynx.cfg, and toggled via the +can be changed via lynx.cfg, and toggled via the -resubmit_posts command line switch.

If the form has one text entry field and no other fields except, @@ -1290,7 +1465,7 @@ content.

Inlined images can be used as submit buttons in forms. If such buttons are assigned NAMEs in the markup, for graphic clients they can -also serve as image maps, and the x,y coordinates of +also serve as image maps, and the x,y coordinates of the graphic client's cursor position in the image when it was clicked are included in the form content. Since Lynx cannot inline the image, and the user could not have moved a cursor from the @@ -1385,9 +1560,9 @@ any document: <META HTTP-EQUIV="Content-Disposition"
CONTENT="file; filename=name.suffix">

-[ToC] +[ToC] -

Lynx and HTML Tables

+

Lynx and HTML Tables

HTML includes markup for creating tables structured as arrays of cells aligned by columns and rows on the displayed page. @@ -1407,11 +1582,11 @@ alignments intended for the table will be missed.

If inherently tabular data must be presented with Lynx, one can use PRE formatted content, or, if the table includes markup not allowed for PRE content, construct the table using HTML Tabs. An example table using TAB +href="#Tabs">HTML Tabs. An example table using TAB elements is included in the test subdirectory of the Lynx distribution. -[ToC] +[ToC] -

Lynx and HTML Tabs

+

Lynx and HTML Tabs

Lynx implements the HTML 3.0 @@ -1429,11 +1604,11 @@ distribution as a model for using this functionality.

Note that this Users Guide and the Supported URLs page include TAB markup in a manner which degrades gracefully for WWW browsers which do not -support it. Toggle to display of source and search for <tab to examine the use of TAB markup -in these documents. [ToC] +support it. Toggle to display of source and search for <tab to examine the use of TAB markup +in these documents. [ToC] -

Lynx and HTML Frames

+

Lynx and HTML Frames

Some implementations of HTML include markup, primarily designed for graphic clients, that is intended to create an array of simultaneously displayed, @@ -1451,14 +1626,14 @@ section or a link in it to a document suitable for text clients, you can usually guess from the labeling of the frame links which one has the substantive material (if there is any), or you can try each of those links to see if anything worthwhile is returned. -[ToC] +[ToC]

Some sites -- in ignorance of Lynx capabilities -- may tell you (for example) "to view this page you need Netscape Navigator". You can simply ignore such warnings and access the frames via the Lynx-generated links as above. -

Lynx and HTML Banners

+

Lynx and HTML Banners

Some implementations of HTML markup include provisions for creating a non-scrolling window to be positioned at the top of each page, containing @@ -1523,9 +1698,9 @@ content with a '#' because the content need not be only a series of links with brief, descriptive links names, but does add a '#' at the top, left-hand corner of the screen when the content is not being displayed, to indicate it's accessibility via the TOOLBAR keystroke command. -[ToC] +[ToC] -

Lynx and HTML Footnotes

+

Lynx and HTML Footnotes

Lynx implements the HTML 3.0 @@ -1547,9 +1722,9 @@ does not use popups for FN blocks.</p></FN> you can return to your previous position in the document by pressing the left-arrow key. The content of an FN element can be any HTML markup that is valid in the BODY of the document. -[ToC] +[ToC] -

Lynx and HTML Notes

+

Lynx and HTML Notes

Lynx implements the HTML 3.0 @@ -1562,18 +1737,19 @@ default label NOTE: will be used. Lynx recognizes the values caution and warning, for which, respectively, the labels CAUTION: or WARNING: will be used. The NOTE element can have an ID attribute, which will be treated as a named Anchor, as -for HTML Footnotes, but the NOTE block need not be placed +for HTML Footnotes, +but the NOTE block need not be placed at the bottom of the document. The content of a NOTE block can be any HTML -markup that is valid in the BODY of the document. This is an example:
+markup that is valid in the BODY of the document. This is an example:
<NOTE CLASS="warning" ID="too-bad">
<p>The W3C vendors did not retain NOTE in the HTML 3.2 draft.</p>
</NOTE>

It will degrade gracefully for WWW browsers which do not support NOTE, except for recognition of the ID attribute as a named Anchor. -[ToC] +[ToC] -

Lynx and HTML Lists

+

Lynx and HTML Lists

Lynx implements the HTML 3.0 @@ -1631,9 +1807,9 @@ nesting levels. by default, i.e., single spaces between LH and LI elements within those blocks. For DL blocks, double spacing will be used to separate the DT and DD elements unless the COMPACT attribute has been specified. -[ToC] +[ToC] -

Lynx and HTML Quotes

+

Lynx and HTML Quotes

The HTML 3.0 and @@ -1656,10 +1832,20 @@ its first line. (") versus grave accent (`) and apostrophe ('), respectively, for even versus odd depths in the nest. -

Any ID attributes in BLOCKQUOTE, BQ or Q elements will be treated as -named Anchors. [ToC] +

Any ID attributes in BLOCKQUOTE, BQ or Q elements can be the target +of a hyperlink in the form URL#id. It is treated just +like the NAME in Anchors. [ToC] + +

Lynx and HTML Internationalization: 8bit, unicode, etc.

+ +Lynx has superior support for HTML 4.0/I18N internationalization issues. +However, to see the characters other than 7bit properly you should +set your display character set +from Option Menu and save its value, this is a Frequently Asked Question. +Fine-turning is also available from lynx.cfg +[ToC] -

Lynx and Client-Side-Image-Maps

+

Lynx and Client-Side-Image-Maps

HTML includes markup, designed primarily for graphic clients, that treats inlined images as maps, such that areas of the image within which a mouse @@ -1707,7 +1893,8 @@ map can be accessed, and their nature indicated via ALT attributes, Lynx-friendly sites can map 0,0 such that the server returns a for-text-client document homologous to the content of FIG elements (see below). Inclusion of such a link for submissions to the server can be -disabled by default via the configuration file (lynx.cfg), and the +disabled by default via the configuration file +(lynx.cfg), and the default can be toggled via the -ismap command line switch.

Lynx also recognizes the client-side-image-maps and/or server-side-image-maps. -[ToC] +[ToC] -

Lynx and Client-Side-Pull

+

Lynx and Client-Side-Pull

HTML includes provision for passing instructions to clients via directives in META elements, and one such instruction, via the token Refresh, @@ -1754,16 +1941,16 @@ is not critical and you can activate the link whenever you like. If it is long (e.g., 60 seconds), a server process may be generating new documents or images at that interval, and you would be wasting bandwidth by activating the link at a shorter interval. -[ToC] +[ToC] -

Lynx State Management +

Lynx State Management (Me want cookie!)

HTTP provides a means to carry state information across successive connections between a browser and an http server. Normally, http servers respond to each browser request without relating that request to previous or subsequent requests. Though the inclusion of INPUT fields with -TYPE="hidden" can be used as a sort of state management by HTML Forms, a more general approach involves exchanges of MIME headers between the server and browser. When replying to a request, the server can send a Set-Cookie MIME header which contains @@ -1777,9 +1964,20 @@ more elaborate format for cookies, designated as Version 1, is being standardized by the IETF (Internet Engineering Task Force). Lynx supports both Version 0 and Version 1 cookie exchanges. This support can be disabled by default via the SET_COOKIES symbol in the -compilation (userdefs.h) and/or run time (lynx.cfg) +compilation (userdefs.h) and/or run time +(lynx.cfg) configuration files, and that default setting can be toggled via the -cookies command line switch. +The SET_COOKIES symbol can be further modified by the ACCEPT_ALL_COOKIES mode. +If ACCEPT_ALL_COOKIES is set TRUE, and SET_COOKIES is TRUE, Lynx will accept +all cookies. Additionally, the cookies that are automatically accepted or +rejected by Lynx can be further modified with the COOKIE_ACCEPT_DOMAINS and +COOKIE_REJECT_DOMAINS options in your .lynxrc file, each of which is a +comma-separated list of domains to perform the desired action. The domain +listed in these options must be identical to the domain the cookie comes +from, there is no wildcard matching. If a domain is specific in both +COOKIE_ACCEPT_DOMAINS and COOKIE_REJECT_DOMAINS, rejection will take +precedence.

When cookie support is enabled, Set-Cookie MIME headers received from an http server invoke confirmation prompts with possible @@ -1792,9 +1990,10 @@ prompts, or ne'V'er to never allow cookies from that MIME headers). All unexpired cookies are held in a hypothetical Cookie Jar which can be examined via the COOKIE_JAR keystroke command, normally mapped to Ctrl-K, for invoking the Cookie Jar Page. The -Cookie Jar, and any 'A'lways or ne'V'er -'allow' settings, do not presently outlast the Lynx session. +href="keystrokes/cookie_help.html">Cookie Jar Page. If Lynx has been +compiled with the --enable-persistent-cookies flag, then unexpired cookies +will be stored between sessions in the filename set with the COOKIE_FILE +option in your .lynxrc.

A common use of cookies by http servers is simply to track the documents visited by individual users. Though this can be useful to the @@ -1815,9 +2014,9 @@ about how they will be used in subsequent requests to that site, nor can infer how they will be used, you can Gobble (delete) the cookies and/or change the 'allow' setting for its domain via the Cookie Jar Page. -[ToC] +[ToC] -

The Lynx command line

+

The Lynx command line

A summary of the Lynx command line options (switches) is returned to stdout if Lynx is invoked with the -help switch. A description @@ -1855,7 +2054,7 @@ where
-
If the argument is only '-' (dash), then Lynx - expects to receive the arguments from stdin. This is to + expects to receive the arguments from stdin. This is to allow for the potentially very long command line that can be associated with the -get_data or -post_data arguments (see below). On VMS, it @@ -1864,6 +2063,8 @@ where command file input terminated by a line that begins with '$'. On Unix, the keyboard input terminator is Control-D. On Win32, [???]. +
-accept_all_cookies +
accept all cookies.
-anonymous
used to specify the anonymous account.
-assume_charset=MIMEname @@ -1902,7 +2103,7 @@ where
enable case-sensitive string searching.
-cfg=FILENAME
specifies a Lynx configuration file other than the default - lynx.cfg. + lynx.cfg.
-child
exit on left-arrow in startfile, and disable save to disk.
-color @@ -1957,7 +2158,7 @@ where
disable ftp access.
-get_data
properly formatted data for a get form are read in from - stdin and passed to the form. Input is terminated by a + stdin and passed to the form. Input is terminated by a line that starts with '---'.
-head
send a HEAD request for the mime headers. @@ -2027,6 +2228,8 @@ where
disable the retrieval status messages.
-number_links
force numbering of links. +
-partial +
toggles display partial pages while downloading.
-pauth=ID:PW
set authorization ID and password for a protected proxy server at startup. Be sure to protect any script files @@ -2034,16 +2237,21 @@ where
-popup
toggles handling of single-choice SELECT options via popup windows or as lists of radio buttons. The default - configuration can be changed in userdefs.h or lynx.cfg. + configuration can be changed in userdefs.h or + lynx.cfg. It also can be set and saved via the 'o'ptions menu. The command line switch toggles the default.
-post_data
properly formatted data for a post form are read in from - stdin and passed to the form. Input is terminated by a + stdin and passed to the form. Input is terminated by a line that starts with '---'.
-preparsed
show source preparsed and reformatted when used with -source or in source view ('\'). + May be useful for debugging of broken HTML markup + to visualize the difference between SortaSGML and TagSoup + recovery modes, + switched by '^V'.
-print
enable print functions. (default)
-pseudo_inlines @@ -2161,7 +2369,8 @@ where corner but will instead be positioned at the start of the currently selected link. Show cursor is the default for systems without FANCY_CURSES capabilities. The default - configuration can be changed in userdefs.h or lynx.cfg. + configuration can be changed in userdefs.h or + lynx.cfg. It also can be set and saved via the 'o'ptions menu. The command line switch toggles the default.
-soft_dquotes @@ -2174,6 +2383,9 @@ where
-startfile_ok
allow non-http startfile and homepage with -validate. +
-tagsoup +
initialize DTD with "TagSoup" tables, + more details.
-telnet
disable recognition of telnet commands.
-term=TERM @@ -2183,7 +2395,7 @@ where a script that, in turn, starts another Lynx process.)
-tlog
toggles use of a Lynx Trace Log for the current - session. The log is named lynx.trace and is + session. The log is named Lynx.trace and is created in the home directory when Lynx trace mode is turned on via the -trace command line switch (see below), or via the TOGGLE_TRACE (Control-T) @@ -2194,7 +2406,7 @@ where keystroke command.
-trace
turns on Lynx trace mode. If a Lynx Trace Log - (lynx.trace in the home directory) has + (Lynx.trace in the home directory) has been started for the current session, all trace and other stderr messages are written to that log, and can be examined during the session via the TRACE_LOG @@ -2211,8 +2423,11 @@ where
-validate
accept only http URLs (for validation). Complete security restrictions also are implemented. +
-verbose +
toggles [LINK], [IMAGE] and [INLINE] comments + with filenames of these images.
-version -
print version information +
print version information.
-vikeys
enable vi-like key movement.
-width=NUMBER @@ -2222,9 +2437,55 @@ where

No options are required, nor is a startfile argument required. White space may be substituted for any equal sign ('=') -appearing in the option list above. [ToC] +appearing in the option list above. [ToC] + + +

Environment variables used by Lynx

+ +Lynx uses certain environment variables and sets a few of them. +Please visit a separate page +for this rather technical information. +[ToC] + + +

Main configuration file lynx.cfg

+ +Lynx has several levels of customization: +from the Options Menu (accessible on-line, +and possibly stored in your local .lynxrc file), +via command-line switches +on startup (mainly for batch processing). +The most important and numerous default settings are stored +in the Lynx configuration file lynx.cfg. + +

If you are on a UNIX system you should have +appropriate permissions to make changes there or ask your +system administrator to modify lynx.cfg for your needs. +This file provides default settings for all accounts on your system. +It may be copied to your shell account and included with -cfg command line +switch or via an environment variable LYNX_CFG (if you have shell access). +Starting with version 2.8.1 Lynx has an include facility so you can +load the system-wide configuration file and easily add one or more settings +from your local add-on configuration file. It is really cool to read +lynx.cfg with its comments for hundreds of options, +most of them commented out because they are built-in defaults. +You may visit an index of options: +by category or +by alphabet. + +

To see the current lynx.cfg state you may press 'o' key +for Options Menu and follow check your lynx.cfg link +near the bottom; alternatively, you may also press '=' key +for Lynx Information Page and follow a link from there near the top. + +

However, for those who have a restricted account many Lynx features +may be disabled by the system administrator, you probably will not see +your lynx.cfg. + + +[ToC] -

Lynx development history

+

Lynx development history

Lynx grew out of efforts to build a campus-wide information system at The University of Kansas. The earliest versions of Lynx provided a @@ -2266,15 +2527,17 @@ implemented by Lou Montulli and maintained by Garrett Arch Blythe and Craig Lavender.

Foteos Macrides and members of the -lynx-dev list have developed and supported Lynx -since release of v2.3 in May 1994. -The Lynx2-3FM code set was released as v2.4 in June 1995. -The Lynx2-4FM code set was released as v2.5 in May 1996. -The Lynx2-5FM code set was released as v2.6 in September 1996. -The Lynx2-6FM code set was released as v2.7 in February 1997. -The v2-7FM code set was released as v2.7.1 in April 1997. -The v2-7-1FM code set was released as v2.7.2 in January 1998. -The 2.7.1 development set was released as v2.8 in March 1998. +lynx-dev +list have developed and supported Lynx since release of v2.3 in May 1994.
+The Lynx2-3FM code set was released as v2.4 in June 1995.
+The Lynx2-4FM code set was released as v2.5 in May 1996.
+The Lynx2-5FM code set was released as v2.6 in September 1996.
+The Lynx2-6FM code set was released as v2.7 in February 1997.
+The v2-7FM code set was released as v2.7.1 in April 1997.
+The v2-7-1FM code set was released as v2.7.2 in January 1998.
+The 2.7.1 development set was released as v2.8 in March 1998.
+The 2.8 development set was released as v2.8.1 in October 1998.
+The 2.8.1 development set was released as v2.8.2 in June 1999.

Since early 1997, the Lynx code has expanded into autoconfigure and PC versions. The branching of the Lynx source base from a single diff --git a/gnu/usr.bin/lynx/lynx_help/about_lynx.html b/gnu/usr.bin/lynx/lynx_help/about_lynx.html index 33faa7cd96b..053ec674a4e 100644 --- a/gnu/usr.bin/lynx/lynx_help/about_lynx.html +++ b/gnu/usr.bin/lynx/lynx_help/about_lynx.html @@ -6,10 +6,10 @@ - +

[ About Lynx-Dev | Lynx-Dev Archives ] - +

About Lynx

@@ -49,12 +49,14 @@ Internet community coordinated via the lynx-dev mailing list.

Lynx is copyrighted by the University of Kansas and is distributed -without restrictions on usage or redistribution -under the GNU General Public License. +without restrictions on usage or redistribution +under the GNU +General Public License.

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 +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. @@ -73,7 +75,7 @@ other systems).

Also, special thanks go to Foteos Macrides 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 -Earl Fogel of the University of Saskatchewan. Earl implemented +Earl Fogel 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 diff --git a/gnu/usr.bin/lynx/lynx_help/help_files.txt b/gnu/usr.bin/lynx/lynx_help/help_files.txt new file mode 100644 index 00000000000..c88cbb618c3 --- /dev/null +++ b/gnu/usr.bin/lynx/lynx_help/help_files.txt @@ -0,0 +1,56 @@ +# Format: +# KEYWORD=.html +# No space is allowed. +# +# Usage: +# ... href="@KEYWORD@">whatever keyword says +# ... href="@KEYWORD@#section>... +# ... href="../@KEYWORD#section>... +# +# Help files which are used in Lynx's help directory. +# Each filename has to end with '.html' otherwise install-help will fail. +# +ABOUT_LYNX=about_lynx.html +ALT_EDIT_HELP=alt_edit_help.html +BOOKMARK_HELP=bookmark_help.html +COOKIE_HELP=cookie_help.html +DIRED_HELP=dired_help.html +EDIT_HELP=edit_help.html +ENVIRONMENTS=environments.html +FOLLOW_HELP=follow_help.html +GOPHER_TYPES_HELP=gopher_types_help.html +HISTORY_HELP=history_help.html +KEYSTROKE_HELP=keystroke_help.html +LYNX_HELP_MAIN=lynx_help_main.html +LYNX_URL_SUPPORT=lynx_url_support.html +LYNX_USERS_GUIDE=Lynx_users_guide.html +MOVEMENT_HELP=movement_help.html +OPTION_HELP=option_help.html +OTHER_HELP=other_help.html +PRINT_HELP=print_help.html +SCROLLING_HELP=scrolling_help.html +TEST_DISPLAY=test_display.html +VISITED_HELP=visited_help.html +XTERM_HELP=xterm_help.html +LYNX_DEV=lynx-dev.html +# +# Frequently used or configurable links used in help files. +# Each link has to contain 'http:' or 'ftp:' otherwise install-help will fail. +# +LYNX_DEV_ARCHIVE=http://www.flora.org/lynx-dev/html/ +LYNX_DIST=http://www.slcc.edu/lynx/current/index.html +LYNX_FAQ=http://www.slcc.edu/lynx/faq.html +LYNX_FAQ_AL=http://www.access.digex.net/~asgilman/lynx/FAQ/ +LYNX_HOME=http://lynx.browser.org/ +LYNX_SPEECH=http://leb.net/blinux/blynx/ +LYNX_SUBIR=http://www.crl.com/~subir/lynx.html +WWW_NEWS=http://www.w3.org/hypertext/DataSources/News/Groups/Overview.html +WWW_HTML2=http://www.w3.org/MarkUp/html-spec/html-spec_toc.html +WWW_HTML3=http://www.w3.org/MarkUp/html3/Contents.html +# +# E-mail addresses used in help files. +# Each e-mail address has to contain a '@' otherwise install-help will fail. +# +LYNX_DEV_MAIL=lynx-dev@sig.net +LYNX_LIST_HOST=majordomo@sig.net +LYNX_LIST_OWNER=majordomo-owner@sig.net diff --git a/gnu/usr.bin/lynx/lynx_help/keystrokes/alt_edit_help.html b/gnu/usr.bin/lynx/lynx_help/keystrokes/alt_edit_help.html new file mode 100644 index 00000000000..bd79c6e89cd --- /dev/null +++ b/gnu/usr.bin/lynx/lynx_help/keystrokes/alt_edit_help.html @@ -0,0 +1,54 @@ + + + +Lynx Line Editor Alternate Key Binding + + + +

+++ALTERNATE BINDINGS+++

+ +Lynx invokes a built-in Line Editor for entering strings in +response to prompts, in forms, and for email messages if an external editor +has not been defined. Administrators can offer additional alternate key +bindings by adding them in LYEditmap.c before compiling Lynx. If available, +they may be selected via the 'o'ptions menu, or by editing lineedit_mode in +the '.lynxrc' file. + +

Note: setting emacs/vi keys ON has no effect on line-editor bindings. + +

This is the Alternate Bindings keymap: + +

+     ENTER  Input complete        -  RETURN
+     TAB    Input complete        -  TAB, Do
+     ABORT  Input cancelled       -  Ctrl-G, Ctrl-O, (Ctrl-C on some systems)
+     ERASE  Erase the line        -  Ctrl-U
+
+     BACK   Cursor back     char  -  Left-Arrow,  Ctrl-B
+     FORW   Cursor forward  char  -  Right-Arrow, Ctrl-F
+     BACKW  Cursor back     word  -  Ctrl-P
+     FORWW  Cursor forward  word  -  Ctrl-N
+     BOL    Go to begin of  line  -  Ctrl-A, Home, Find
+     EOL    Go to end   of  line  -  Ctrl-E, End,  Select
+
+     DELP   Delete prev     char  -  Ctrl-H, DELETE, Remove
+     DELN   Delete next [1] char  -  Ctrl-D
+     DELPW  Delete prev     word  -  Ctrl-R
+     DELNW  Delete next     word  -  Ctrl-T
+     DELBL  Delete to beg of line -  Ctrl-X
+     DELEL  Delete to end of line -  Ctrl-K
+
+     UPPER  Upper case the line   -  Ctrl-^
+     LOWER  Lower case the line   -  Ctrl-_
+
+     LKCMD  Invoke cmd prompt     -  Ctrl-V (in form text fields, only) [2]
+
+[1] "next" means the character "under" a box or underline style cursor; it
+     means "to the immediate right of" an I-beam (between characters) type
+     cursor.
+
+[2]  Follow Ctrl-V with the key "e" bound to the EDIT function,
+     to edit the form's textarea field using an external editor.
+
+ + diff --git a/gnu/usr.bin/lynx/lynx_help/keystrokes/cookie_help.html b/gnu/usr.bin/lynx/lynx_help/keystrokes/cookie_help.html index 0fd5b255f4e..081bb3e52bf 100644 --- a/gnu/usr.bin/lynx/lynx_help/keystrokes/cookie_help.html +++ b/gnu/usr.bin/lynx/lynx_help/keystrokes/cookie_help.html @@ -10,7 +10,7 @@ The Cookie Jar Page displays all of the unexpired cookies you have accumulated in the hypothetical Cookie Jar. The cookies are obtained via Set-Cookie MIME headers in replies from http servers, -and are used for State Management +and are used for State Management across successive requests to the servers.

The cookies are listed by domain (server's Fully Qualified @@ -29,13 +29,10 @@ for the request which caused the cookie to be sent, and whether the secure flag is set for the cookie, in which case it will be sent only via secure connections (presently, only SSL). The Maximum Gobble Date, i.e., when the cookie is intended to -expire, also is indicated. Note, however, that Lynx presently gobbles -all of it's accumulated cookies on exit from the current session, even -if the server indicated an expiration in the distant future. Also, a -server may change the expiration date, or cause the cookie to be deleted, -in its replies to subsequent requests from Lynx. If the server included -any explanatory comments in its Set-Cookie MIME headers, those -also are displayed in the listing. +expire, also is indicated. Also, a server may change the expiration date, +or cause the cookie to be deleted, in its replies to subsequent requests +from Lynx. If the server included any explanatory comments in its +Set-Cookie MIME headers, those also are displayed in the listing.

The domain=value pairs, and each cookie's name=value, are links in the listing. Activating a domain=value link will @@ -44,7 +41,7 @@ should be Gobbled (deleted from the Cookie Jar), and/or whether the domain entry should be Gobbled if all of its cookies have been Gobbled, or whether to change the 'allow' setting for that domain. Activating a cookie's -name=value link will cause that particular cookie to be Gobbled. +name=value link will cause that particular cookie to be Gobbled. You will be prompted for confirmations of deletions, to avoid any accidental Gobbling. diff --git a/gnu/usr.bin/lynx/lynx_help/keystrokes/edit_help.html b/gnu/usr.bin/lynx/lynx_help/keystrokes/edit_help.html index 52c081b2d20..92008a637e7 100644 --- a/gnu/usr.bin/lynx/lynx_help/keystrokes/edit_help.html +++ b/gnu/usr.bin/lynx/lynx_help/keystrokes/edit_help.html @@ -10,31 +10,48 @@ Lynx invokes a built-in Line Editor for entering strings in response to prompts, in forms, and for email messages if an external editor has not been defined. Administrators can offer alternate key bindings -by adding them in LYEditmap.c before compiling Lynx, and they can -be selected via the 'o'ptions menu. This is the Default Binding: -

-     ENTER  Input complete       -  RETURN
-     TAB    Input complete       -  TAB, Do
-     ABORT  Input cancelled      -  Ctrl-G, Ctrl-O, Ctrl-C
-     ERASE  Erase the line       -  Ctrl-U, Ctrl-X
-
-     BACK   Cursor back    char  -  Left-Arrow
-     FORW   Cursor forward char  -  Right-Arrow
-     BACKW  Cursor back    word  -  Ctrl-P
-     FORWW  Cursor forward word  -  Ctrl-N
-     BOL    Go to begin of line  -  Ctrl-A, Home, Find
-     EOL    Go to end   of line  -  Ctrl-E, End,  Select
-
-     DELP   Delete prev    char  -  Ctrl-H, DELETE, Remove
-     DELC   Delete current char  -  Ctrl-D
-     DELN   Delete next    char  -  Ctrl-R
-     DELPW  Delete prev    word  -  Ctrl-B
-     DELNW  Delete next    word  -  Ctrl-F
-
-     LOWER  Lower case the line  -  Ctrl-K
-     UPPER  Upper case the line  -  Ctrl-T
-
-     LKCMD  Invoke cmd prompt    -  Ctrl-V (in form text fields, only)
+by adding them in LYEditmap.c before compiling Lynx.  If available, they may
+be selected via the 'o'ptions menu, or by editing lineedit_mode in the
+'.lynxrc' file.
+
+

One such alternate key binding, which may be available on your system, +is the Alternate Bindings keymap. + +

Note: setting emacs/vi keys ON has no effect on line-editor bindings. + +

This is the Default Binding keymap: + +

+     ENTER  Input complete        -  RETURN
+     TAB    Input complete        -  TAB, Do
+     ABORT  Input cancelled       -  Ctrl-G, Ctrl-O, (Ctrl-C on some systems)
+     ERASE  Erase the line        -  Ctrl-U, Ctrl-X
+
+     BACK   Cursor back     char  -  Left-Arrow
+     FORW   Cursor forward  char  -  Right-Arrow
+     BACKW  Cursor back     word  -  Ctrl-P
+     FORWW  Cursor forward  word  -  Ctrl-N
+     BOL    Go to begin of  line  -  Ctrl-A, Home, Find
+     EOL    Go to end   of  line  -  Ctrl-E, End,  Select
+
+     DELP   Delete prev     char  -  Ctrl-H, DELETE, Remove
+     DELN   Delete next [1] char  -  Ctrl-D, Ctrl-R
+     DELPW  Delete prev     word  -  Ctrl-B
+     DELNW  Delete next     word  -  Ctrl-F
+     DELEL  Delete to end of line -  Ctrl-_
+
+     UPPER  Upper case the line   -  Ctrl-T
+     LOWER  Lower case the line   -  Ctrl-K
+
+     LKCMD  Invoke cmd prompt     -  Ctrl-V (in form text fields, only) [2]
+     SWMAP  Switch input keymap   -  Ctrl-^
+
+[1] "next" means the character "under" a box or underline style cursor; it
+     means "to the immediate right of" an I-beam (between characters) type
+     cursor.
+
+[2]  Follow Ctrl-V with the key "e" bound to the EDIT function,
+     to edit the form's textarea field using an external editor.
 
diff --git a/gnu/usr.bin/lynx/lynx_help/keystrokes/environments.html b/gnu/usr.bin/lynx/lynx_help/keystrokes/environments.html new file mode 100644 index 00000000000..9e578fdc35c --- /dev/null +++ b/gnu/usr.bin/lynx/lynx_help/keystrokes/environments.html @@ -0,0 +1,437 @@ + + + +Help on Environment variables + + + +
+
+ENVIRONMENT
+       In addition to various  "standard"  environment  variables
+       such as HOME, PATH, USER, DISPLAY, TMPDIR, etc, Lynx utilizes
+       several Lynx-specific environment variables, if they exist.
+
+       Others may be created or modified by Lynx to pass data to
+       an external program, or for other reasons.  These are
+       listed separately below.
+
+       See also the sections on SIMULATED CGI SUPPORT and
+       NATIVE LANGUAGE SUPPORT, below.
+
+       Note:  Not all environment variables apply to all types of
+       platforms supported by Lynx, though most do.  Feedback on
+       platform dependencies is solicited.  See also win32/dos specific
+       variables.
+
+
+Environment Variables Used By Lynx:
+
+       COLORTERM
+                           If set, color capability for the terminal
+                           is forced on at startup time. The actual
+                           value assigned to the variable is ignored.
+                           This variable is only meaningful if Lynx
+                           was built using the slang screen-handling
+                           library.
+
+       LYNX_CFG
+                           This variable, if set,  will  override
+                           the  default  location and name of the
+                           global configuration  file  (normally,
+                           lynx.cfg)  that  was  defined  by  the
+                           LYNX_CFG_FILE    constant    in    the
+                           userdefs.h  file, during installation.
+                           See  the  userdefs.h  file  for   more
+                           information.
+
+       LYNX_LSS
+                           This  variable,  if set, specifies the
+                           location of the default Lynx character
+                           style  sheet  file.   [Currently  only
+                           meaningful if  Lynx  was  built  using
+                           experimental color style support.]
+
+       LYNX_SAVE_SPACE
+                           This  variable,  if set, will override
+                           the  default  path  prefix  for  files
+                           saved  to  disk that is defined in the
+                           lynx.cfg SAVE_SPACE:  statement.   See
+                           the lynx.cfg file for more information.
+
+       LYNX_TEMP_SPACE
+                           This variable, if set,  will  override
+                           the  default path prefix for temporary
+                           files that was defined during installation,
+                           as well as any value that may
+                           be assigned to the TMPDIR variable.
+
+       MAIL
+                           This variable  specifies  the  default
+                           inbox Lynx will check for new mail, if
+                           such  checking  is  enabled   in   the
+                           lynx.cfg file.
+
+       NEWS_ORGANIZATION
+                           This  variable,  if  set, provides the
+                           string  used  in   the   Organization:
+                           header of USENET news postings.  It will
+                           override the setting of the ORGANIZATION
+                           environment  variable, if it is also set
+                           (and, on  UNIX, the contents of an
+                            /etc/organization file, if present).
+
+       NNTPSERVER
+                           If set, this  variable  specifies  the
+                           default  NNTP server that will be used
+                           for USENET news  reading  and  posting
+                           with Lynx, via news: URL's.
+
+       ORGANIZATION
+                           This  variable,  if  set, provides the
+                           string  used  in   the   Organization:
+                           header  of  USENET  news postings.  On
+                           UNIX, it will override the contents of
+                           an /etc/organization file, if present.
+
+       PROTOCOL_proxy
+                           Lynx supports the use of proxy servers
+                           that  can act as firewall gateways and
+                           caching servers.  They are  preferable
+                           to  the  older  gateway  servers  (see
+                           WWW_access_GATEWAY, below).
+                           Each protocol used by Lynx (http, ftp,
+                           gopher, etc), can be mapped separately
+                           by setting environment variables of
+                           the form PROTOCOL_proxy (literally:
+                           http_proxy, ftp_proxy, gopher_proxy,
+                           etc), to "http://some.server.dom:port/".
+                           See details and examples.
+
+       WWW_access_GATEWAY
+                           Lynx still  supports  use  of  gateway
+                           servers,  with  the  servers specified
+                           via   "WWW_access_GATEWAY"   variables
+                           (where  "access" is lower case and can
+                           be "http", "ftp", "gopher" or "wais"),
+                           however most gateway servers have been
+                           discontinued.  Note that  you  do  not
+                           include  a  terminal '/' for gateways,
+                           but do for proxies specified by PROTOCOL_proxy
+                           environment variables.  See details.
+
+       WWW_HOME
+                           This  variable,  if set, will override
+                           the default startup URL  specified  in
+                           any of the Lynx configuration files.
+
+
+Environment Variables Set or Modified By Lynx:
+
+
+       LYNX_PRINT_DATE     This  variable  is  set  by  the  Lynx
+                           p(rint) function, to the Date:  string
+                           seen  in  the  document's "Information
+                           about" page (= cmd), if  any.   It  is
+                           created  for  use  by an external program,
+                           as  defined   in   a   lynx.cfg
+                           PRINTER: definition statement.  If the
+                           field does not exist for the document,
+                           the  variable  is set to a null string
+                           under UNIX, or "No Date" under VMS.
+
+       LYNX_PRINT_LASTMOD  This  variable  is  set  by  the  Lynx
+                           p(rint)  function,  to  the  Last Mod:
+                           string seen in the document's  "Information
+                           about"  page  (= cmd), if any.
+                           It is created for use by  an  external
+                           program,  as  defined  in  a  lynx.cfg
+                           PRINTER: definition statement.  If the
+                           field does not exist for the document,
+                           the variable is set to a  null  string
+                           under UNIX, or "No LastMod" under VMS.
+
+       LYNX_PRINT_TITLE    This  variable  is  set  by  the  Lynx
+                           p(rint)  function,  to  the  Linkname:
+                           string seen in the document's  "Information
+                           about"  page  (= cmd), if any.
+                           It is created for use by  an  external
+                           program,  as  defined  in  a  lynx.cfg
+                           PRINTER: definition statement.  If the
+                           field does not exist for the document,
+                           the variable is set to a  null  string
+                           under UNIX, or "No Title" under VMS.
+
+       LYNX_PRINT_URL      This  variable  is  set  by  the  Lynx
+                           p(rint) function, to the  URL:  string
+                           seen  in  the  document's "Information
+                           about" page (= cmd), if  any.   It  is
+                           created  for  use  by an external program,
+                           as  defined   in   a   lynx.cfg
+                           PRINTER: definition statement.  If the
+                           field does not exist for the document,
+                           the  variable  is set to a null string
+                           under UNIX, or "No URL" under VMS.
+
+       LYNX_VERSION        This variable is always set  by  Lynx,
+                           and may be used by an external program
+                           to determine  if  it  was  invoked  by
+                           Lynx.   See  also  the comments in the
+                           distribution's  sample  mailcap  file,
+                           for notes on usage in such a file.
+
+       TERM                Normally,  this  variable  is  used by
+                           Lynx to determine  the  terminal  type
+                           being  used  to invoke Lynx.  If, however,
+                           it is unset at startup time  (or
+                           has  the  value  "unknown"), or if the
+                           -term  command-line option is used,
+                           Lynx will set or modify its value
+                           to the user specified  terminal type
+                           (for the Lynx execution   environment).
+                           Note: If set/modified by Lynx, the values of
+                           the LINES and/or  COLUMNS  environment
+                           variables may also be changed.
+
+
+
+SIMULATED CGI SUPPORT
+
+       If built with the cgi-links option  enabled,  Lynx  allows
+       access  to  a  cgi script directly without the need for an
+       http daemon.
+
+       When executing such "lynxcgi scripts"  (if  enabled),  the
+       following  variables may be set for simulating a CGI environment:
+
+       CONTENT_LENGTH
+
+       CONTENT_TYPE
+
+       DOCUMENT_ROOT
+
+       HTTP_ACCEPT_CHARSET
+
+       HTTP_ACCEPT_LANGUAGE
+
+       HTTP_USER_AGENT
+
+       PATH_INFO
+
+       PATH_TRANSLATED
+
+       QUERY_STRING
+
+       REMOTE_ADDR
+
+       REMOTE_HOST
+
+       REQUEST_METHOD
+
+       SERVER_SOFTWARE
+
+       Other environment  variables  are  not  inherited  by  the
+       script, unless they are provided via a LYNXCGI_ENVIRONMENT
+       statement in the configuration  file.   See  the  lynx.cfg
+       file,    and    the    (draft)   CGI   1.1   Specification
+       <http://Web.Golux.Com/coar/cgi/draft-coar-cgi-v11-00.txt>
+       for the definition and usage of these variables.
+
+       The CGI Specification, and other associated documentation,
+       should be consulted for general information on CGI  script
+       programming.
+
+
+NATIVE LANGUAGE SUPPORT
+
+       If  configured and installed with Native Language Support,
+       Lynx will display status and other messages in your local
+       language.  See the file ABOUT_NLS in the source distribution,
+       or at your local GNU site, for more information about
+       internationalization.
+
+       The following environment variables may be used to alter
+       default settings:
+
+       LANG                This variable, if set,  will  override
+                           the  default  message language.  It is
+                           an ISO 639 two-letter code identifying
+                           the  language.  Language codes are NOT
+                           the same as the country codes given in
+                           ISO 3166.
+
+       LANGUAGE            This  variable,  if set, will override
+			   the default message language.  This is a
+			   GNU extension that has higher priority for
+			   setting the message catalog than LANG or
+			   LC_ALL.
+
+       LC_ALL              and
+
+       LC_MESSAGES         These  variables,  if set, specify the
+                           notion of native  language  formatting
+                           style.  They are POSIXly correct.
+
+       LINGUAS             This variable, if set prior to configuration,
+			   limits the installed languages to specific values.
+			   It is a space-separated list of two-letter codes.
+			   Currently, it is hard-coded to a wish list.
+
+       NLSPATH             This variable, if set, is used as  the
+                           path prefix for message catalogs.
+
+
+Proxy:
+
+
+    To set your site's NTTP server as the default host for news reading
+    and posting via Lynx, set the environment variable NNTPSERVER so that
+    it points to its Internet address.  The variable "NNTPSERVER" is used
+    to specify the host which will be used as the default for news URLs.
+
+        UNIX
+                setenv NNTPSERVER "news.server.dom"
+
+        VMS
+                define/system NNTPSERVER "news.server.dom"
+
+    Lynx still supports use of gateway servers, with the servers specified
+    via the variables "WWW_access_GATEWAY", where "access" is lower case
+    and can be "http", "ftp", "gopher" or "wais".  Most of the gateway
+    servers have been discontinued, but "http://www.w3.org:8001" is
+    available for wais searches (note that you do not include a
+    terminal '/' for gateways, but do for proxies; see below).
+
+    Lynx version 2.2 and beyond supports the use of proxy servers that
+    can act as firewall gateways and caching servers.  They are
+    preferable to the older gateway servers.  Each protocol used by
+    Lynx can be mapped separately using PROTOCOL_proxy environment
+    variables of the form:
+
+        UNIX
+                setenv http_proxy "http://some.server.dom:port/"
+                setenv https_proxy "http://some.server.dom:port/"
+                setenv ftp_proxy "http://some.server.dom:port/"
+                setenv gopher_proxy "http://some.server.dom:port/"
+                setenv news_proxy "http://some.server.dom:port/"
+                setenv newspost_proxy "http://some.server.dom:port/"
+                setenv newsreply_proxy "http://some.server.dom:port/"
+                setenv snews_proxy "http://some.server.dom:port/"
+                setenv snewspost_proxy "http://some.server.dom:port/"
+                setenv snewsreply_proxy "http://some.server.dom:port/"
+                setenv nntp_proxy "http://some.server.dom:port/"
+                setenv wais_proxy "http://some.server.dom:port/"
+                setenv finger_proxy "http://some.server.dom:port/"
+                setenv cso_proxy "http://some.server.dom:port/"
+
+        VMS
+                define "http_proxy" "http://some.server.dom:port/"
+                define "https_proxy" "http://some.server.dom:port/"
+                define "ftp_proxy" "http://some.server.dom:port/"
+                define "gopher_proxy" "http://some.server.dom:port/"
+                define "news_proxy" "http://some.server.dom:port/"
+                define "newspost_proxy" "http://some.server.dom:port/"
+                define "newsreply_proxy" "http://some.server.dom:port/"
+                define "snews_proxy" "http://some.server.dom:port/"
+                define "snewspost_proxy" "http://some.server.dom:port/"
+                define "snewsreply_proxy" "http://some.server.dom:port/"
+                define "nntp_proxy" "http://some.server.dom:port/"
+                define "wais_proxy" "http://some.server.dom:port/"
+                define "finger_proxy" "http://some.server.dom:port/"
+                define "cso_proxy" "http://some.server.dom:port/"
+                (Encase *BOTH* strings in double-quotes to maintain
+                 lower case for the PROTOCOL_proxy variable and for
+                 the http access type; include /system if you want
+                 proxying for all clients on your system.)
+
+    If you wish to override the use of a proxy server for specific hosts or
+    entire domains you may use the "no_proxy" environment variable.
+    The no_proxy variable can be a comma-separated list of strings defining
+    no-proxy zones in the DNS domain name space.  If a tail substring of the
+    domain-path for a host matches one of these strings, transactions with that
+    node will not be proxied.  Here is an example use of "no_proxy":
+
+        UNIX
+                setenv no_proxy "host.domain.dom, domain1.dom, domain2"
+
+        VMS
+                define "no_proxy" "host.domain.dom, domain1.dom, domain2"
+
+    You can include a port number in the no_proxy list to override use
+    of a proxy server for the host accessed via that port, but not via
+    other ports.  For example, if you use "host.domain.dom:119" and/or
+    "host.domain.dom:210", then news (port 119) URLs and/or any wais
+    (port 210) searches on that host would be excluded, but http, ftp,
+    and gopher services (if normally proxied) would still be included,
+    as would any news or wais services on other hosts.
+
+    Warning:  Note that setting 'il' as an entry in this list
+    will block proxying for the .mil domain as well as the .il domain.
+    If the entry is '.il' this will not happen.
+
+    If you wish to override the use of a proxy server completely (i.e.,
+    globally override any existing proxy variables), set the value of
+    "no_proxy" to "*".  This is the only allowed use of * in no_proxy.
+
+    Note that Lynx treats file URLs on the local host as requests for
+    direct access to the file, and does not attempt ftp if that fails.
+    It treats both ftp URLs and file URLs on remote hosts as ftp URLs,
+    and does not attempt direct file access for either.  If ftp URLs are
+    being proxied, file URLs on a remote host will be converted to ftp
+    URLs before submission by Lynx to the proxy server, so no special
+    procedure for inducing the proxy server to handle them is required.
+    Other WWW clients may require that the http server's configuration
+    file have "Map file:* ftp:*" in it to perform that conversion.
+
+    If you have not set NNTPSERVER, proxy or no_proxy environment variables
+    you can set them at run time via the configuration file lynx.cfg
+    (this will not override external settings).
+
+
+Win32 (95/NT) and 386 DOS
+
+  (adapted from "readme.txt" by Wayne Buttles
+  and "readme.dos" by Doug Kaufman)
+
+    Here are some environment variables that should be set, usually in a
+    batch file that runs the lynx executable. Make sure that you have enough
+    room left in your environment. You may need to change your "SHELL="
+    setting in config.sys. In addition, lynx looks for a "SHELL" environment
+    variable when shelling to DOS.  If  you wish to preserve the environment
+    space when shelling, put a line like this in your AUTOEXEC.BAT file also
+    "SET SHELL=C:\COMMAND.COM /E:2048". It should match CONFIG.SYS.
+
+    HOME         Where to keep the bookmark file and personal config files.
+    TEMP or TMP  Bookmarks are kept here with no HOME.  Temp files here.
+    USER         Set to your login name
+    LYNX_CFG     Set to the full path and filename for lynx.cfg
+
+    386 version only:
+    WATTCP.CFG   Set to the full path for the WATTCP.CFG directory
+    (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 for Win32 may look like:
+        @ECHO OFF
+        set home=d:\win32
+        set temp=d:\tmp
+        set lynx_cfg=d:\win32\lynx.cfg
+        d:\win32\lynx.exe %1 %2 %3 %4 %5
+
+    In lynx_386, a typical batch file might look like:
+
+        @echo off
+        set HOME=f:/lynx2-8
+        set USER=your_login_name
+        set LYNX_CFG=%HOME%/lynx.cfg
+        set WATTCP.CFG=%HOME%
+        f:\lynx2-8\lynx %1 %2 %3 %4 %5 %6 %7 %8 %9
+
+    You will also need to make sure that the WATTCP.CFG file has the
+    correct information for IP number, Gateway, Netmask, and Domain Name
+    Server. This can also be automated in the batch file.
+
+
+
+ + diff --git a/gnu/usr.bin/lynx/lynx_help/keystrokes/follow_help.html b/gnu/usr.bin/lynx/lynx_help/keystrokes/follow_help.html index f30fbb7754b..76f5b93460d 100644 --- a/gnu/usr.bin/lynx/lynx_help/keystrokes/follow_help.html +++ b/gnu/usr.bin/lynx/lynx_help/keystrokes/follow_help.html @@ -14,7 +14,7 @@ the current session via the Options menu, then hypertext links (and form fields, depending on the keypad mode) are prefixed with numbers in square brackets. Entering a keyboard or keypad number is treated as an F_LINK_NUM command, and should -invoke the Follow link (or goto link or page) number: statusline +invoke the Follow link (or goto link or page) number: statusline prompt for a potentially multiple digit number corresponding to an indicated link number. If RETURN is pressed to terminate the number entry (e.g., @@ -39,10 +39,33 @@ numbered mode. 123p), Lynx will make the page corresponding to that number the currently displayed page, and the first link on that page, if any, the current link. The 'g' and 'p' suffixes thus -convert the +convert the Follow link (or goto link or page) number: feature to an advanced navigation aid. +

Finally, a user may add a + or - suffix to a number +command to indicate jumping forward or back relative to the current link or +page. +For example, typing 1g+ followed by RETURN will move the current +link to the next numbered link, skipping any intervening pages +or unnumbered links; 1g- goes to the preceding numbered link. +On a page without links, 3g+ goes to the 3rd link following +the page. 5p+ skips ahead 5 pages, and so on. +You can also enter 5+ or 5-, which will activate +the 5th link ahead/behind where you are currently positioned. +Note that typing 1g+ is different from typing a down arrow +in that 1g+ may skip pages containing no links, or +intervening non-numbered links, such as form fields when +form fields are not numbered. It also differs from +the <tab> command in that 1g+ +does not skip over whole textareas, unless form fields +are not numbered. + +

+NOTE: 1+g 1-g 1+p 1-p are all recognized as equivalent
+to 1g+ 1g- 1p+ 1p- . Any other (mistyped) characters terminate
+the formula: e.g. 1gh+ is treated as 1g. +

If the user has set Keypad mode to Numbers act as arrows, then only '0', rather than every number, will be treated as an F_LINK_NUM command for invoking the Follow link (or goto link or page) @@ -74,6 +97,19 @@ command when positioned on the OPTION. For purposes of paging (e.g., in conjunction with the 'p' suffix), a page is defined as the number of OPTIONs displayed within the vertical dimension of the popup window. +Finally, the + and - suffixes can be used +to move forward or back from the current option or page in +a popup menu, +similarly to the way they are used for links For example, +while viewing a popup window, the user can type +3p+ and RETURN +to skip ahead 3 pages, and 50g- will move the +current selection back 50 options. +This will work whether or not keypad mode is +Links and form fields are numbered since options +are numbered internally. If form field numbering is +turned off, the option numbers won't appear on screen, +but the user can still navigate using these commands.

Note that HTML can be structured so that it includes hidden links, i.e., without a visible link name intended for ACTIVATE-ing @@ -84,7 +120,7 @@ have support for image handling available. They also can be created by having truly empty Anchor content, in cases for which the value of an Anchor's HREF attribute is intended as a navigation aid for robots (typically indexers) and not as content for a browser's rendition of the -document. With the -ismap command line switch, Lynx will +document. With the -ismap command line switch, Lynx will additionally treat a link to a server-side image maps as hidden if there also is a client-side map for the same image. Finally, in some cases links which are not intended to be hidden @@ -92,14 +128,14 @@ may effectively become hidden links because of bad HTML. The hidden links differ from Anchors which have only a NAME or ID attribute name/value pair (intended as positioning targets from other links which do have HREF attributes and values that include a -fragment). +fragment).

Lynx respects instructions for hidden links and normally does not include them in the rendition of the document. However, if the command line switch -hiddenlinks=merge is used, such links will still be numbered in sequence with other links which are not hidden, and if Links are numbered mode is also on, link numbers will appear for them in the -displayed text (except for links to image maps which are hidden because of +displayed text (except for links to image maps which are hidden because of -ismap). If -hiddenlinks=listonly or -hiddenlinks=ignore is in effect, hidden links will not be shown in the text even in links are numbered mode. Not using a @@ -108,13 +144,13 @@ shown in the text even in links are numbered mode. Not using a

If a document includes hidden links, they will be reported, with appropriate labeling, -in the menu created for the LIST ('l') command, -unless -hiddenlinks=ignore is used. They can then be -ACTIVATE-ed via that menu. Also, if a link was hidden due to an ALT +in the menus created for the LIST ('l') or ADDRLIST ('A') +commands, unless -hiddenlinks=ignore is used. They can then be +ACTIVATE-ed via those menus. Also, if a link was hidden due to an ALT attribute in an IMG element, it will be converted to a visible link whenever the IMAGE_TOGGLE ('*') command is used to create links -for SRC attritute values of IMG elements, because this indicates that the -user does have some form of image handling enabled via a helper application, +for SRC attribute values of IMG elements, because this indicates that the +user does have some form of image handling enabled via a helper application, or wishes to download files for subsequent use with a graphic browsers or other suitable software. @@ -124,8 +160,9 @@ for the form, but the value should not be displayed in the rendered form. Lynx respects this attribute as well, and neither displays the HIDDEN field, nor assigns it a number for the F_LINK_NUM ('0') command and Links and form fields are numbered keypad mode handling, nor -includes an entry for it in the menu created for the LIST ('l') -command. However, the HIDDEN name/value pairs are included in any displays +includes an entry for it in the menus created for the LIST ('l') +or ADDRLIST ('A') +commands. However, the HIDDEN name/value pairs are included in any displays of submitted form content in the Information about the current document that is invoked by the INFO ('=') command. diff --git a/gnu/usr.bin/lynx/lynx_help/keystrokes/keystroke_help.html b/gnu/usr.bin/lynx/lynx_help/keystrokes/keystroke_help.html index f3a57bc35d9..aa7a3da110a 100644 --- a/gnu/usr.bin/lynx/lynx_help/keystrokes/keystroke_help.html +++ b/gnu/usr.bin/lynx/lynx_help/keystrokes/keystroke_help.html @@ -39,10 +39,10 @@ r - Remove selected file t - Tag highlighted file u - Upload a file into the current directory - + OTHER: ? (or h) - Help (this screen) a - Add the current link to a bookmark file - c - Send a comment to the document owner + c - Send a comment to the document owner d - Download the current link e - Edit the current file g - Goto a user specified alternative parsing of HTML documents CTRL-W - Refresh the screen - CTRL-U - Erase input line + CTRL-U - Erase input line (more input line commands) CTRL-G - Cancel input or transfer CTRL-T - Toggle trace mode on and off - ; - View the Lynx Trace Log for the current - session. + ; - View the Lynx Trace Log for the current session CTRL-K - Invoke the Cookie Jar Page - numbers - Invoke the prompt + numbers - Invoke the prompt Follow link (or goto link or page) number: or the diff --git a/gnu/usr.bin/lynx/lynx_help/keystrokes/option_help.html b/gnu/usr.bin/lynx/lynx_help/keystrokes/option_help.html index 2ef8151ce4d..17205d779fe 100644 --- a/gnu/usr.bin/lynx/lynx_help/keystrokes/option_help.html +++ b/gnu/usr.bin/lynx/lynx_help/keystrokes/option_help.html @@ -5,258 +5,385 @@ -

+++ Options Screen Help +++

-
-        The Options Screen allows you to set and
-        modify many of Lynx's features. The following
-        options may be set.
-
-     Editor             -  If non-empty it defines the editor to spawn
-                           when editing a local file or sending mail.
-			   Any valid text editor may be entered here.
-
-     DISPLAY variable   -  If non-empty it specifies your X terminal
-                           display address.
-
-     Multi-bookmarks    -  When OFF, the default bookmark file is used
-                           for the 'v'iew bookmarks and 'a'dd bookmark
-                           link commands.  If set to STANDARD, a menu
-                           of available bookmarks always is invoked
-                           when you seek to view a bookmark file or add
-                           a link, and you select the bookmark file by
-                           its letter token in that menu.  If set to
-                           ADVANCED, you instead are prompted for the
-                           letter of the desired bookmark file, but can
-                           enter '=' to invoke the STANDARD selection
-                           menu, or RETURN for the default bookmark file.
-
-     Bookmark file      -  If non-empty and multi-bookmarks is OFF, it
-                           specifies your default 'Bookmark file'.
-                           If multi-bookmarks is STANDARD or ADVANCED,
-                           entering 'B' will invoke a menu in which you
-                           can specify the filepaths and descriptions
-                           of up to 26 bookmark files.  The filepaths
-                           must be from your home directory, and begin
-                           with dot-slash (./) if subdirectories are
-                           included (e.g, ./BM/lynx_bookmarks.html).
-                           Lynx will create bookmark files when you
-                           first 'a'dd a link, but any subdirectories
-                           in the filepath must already exist.
-
-     FTP sort criteria  -  This option allows you to specify how files
-                           will be sorted within FTP listings.  The
-                           current options include "By Filename",
-                           "By Size", "By Type", and "By Date".
-
-     Personal Mail      -  You may set your mail address here so that
-     Address               when mailing messages to other people or
-                           mailing files to yourself, your email address
-                           can be automatically filled in.  Your email
-                           address will also be sent to HTTP servers in
-                           a from: field.
-
-     Searching type     -  If set to 'case sensitive', user searches
-                           invoked by the '/' command will be case 
-                           sensitive substring searches.  The
-                           default is 'Case Insensitive' substring
-                           searches
-
-     Preferred Document -  The language you prefer if multi-language files
-     Language              are available from servers.  Use RFC 1766 tags,
-                           e.g., en for English, fr for French, etc.  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:
-				da, en-gb;q=0.8, en;q=0.7
-
-     Preferred Document -  The character set you prefer if sets in addition
-     Charset               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:
-				iso-8859-5, unicode-1-1;q=0.8
-
-     Display Character  -  This option allows you to set up the default
-     set                   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
-                           character set installed on your terminal.
-
-     Raw 8-bit or CJK   -  Toggles whether 8-bit characters are assumed to
-     mode                  correspond with the selected character set and
-                           therefore are processed without translation via
-                           the chartrans conversion tables.  Should be ON
-                           by default when the selected character set is one
-                           of the Asian (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 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 is ISO-8859-1.  The setting also can be
-                           toggled via the RAW_TOGGLE command, normally mapped
-                           to '@', and at startup via the -raw switch.
-
-     Show color        -   This option will be present if color support is
-                           available.  If set to ON or ALWAYS, color mode will
-                           be forced on if possible.  If (n)curses color
-                           support is available but cannot be used for the
-                           current terminal type, selecting ON is rejected
-                           with a message.  If set to OFF or NEVER, color mode
-                           will be turned off.
-                           ALWAYS and NEVER are not offered in anonymous
-                           accounts.  If saved to a '.lynxrc' file in
-                           non-anonymous accounts, ALWAYS will cause Lynx to
-                           set color mode on at startup if supported.  If Lynx
-                           is built with the slang library, this is equivalent
-                           to having included the -color command line switch
-                           or having the COLORTERM environment variable
-                           set. If color support is provided by curses or
-                           ncurses, this is equivalent to the default behavior
-                           of using color when the terminal type supports it.
-                           If (n)curses color support is available but cannot
-                           be used for the current terminal type, the
-                           preference can still be saved but will have no
-                           effect.
-                           A saved value of NEVER will cause Lynx to assume a
-                           monochrome terminal at startup.  It is similar to
-                           the -nocolor switch, but (when the slang library is
-                           used) can be overridden with the -color switch.
-                           If the setting is OFF or ON when the current
-                           options are saved to a '.lynxrc' file, the default
-                           startup behavior is retained, such that color mode
-                           will be turned on at startup only if the terminal
-                           info indicates that you have a color-capable
-                           terminal, or (when the slang library is used) if
-                           forced on via the -color switch or COLORTERM
-                           variable.  This default behavior always is used in
-                           anonymous accounts, or if the 'option'_save
-                           restriction is set explicitly.  If for any reason
-                           the startup color mode is incorrect for your
-                           terminal, set it appropriately on or off via this
-                           option.
-
-     VI keys           -   If set to 'ON' then the lowercase h, j, k, and l,
-                           keys will be mapped to left-arrow, down-arrow,
-			   up-arrow, and right-arrow, respectively.  The
-                           uppercase H, J, K, and L keys remain mapped to
-                           their configured bindings (normally HELP, JUMP,
-                           KEYMAP, and LIST, respectively).
-
-     Emacs keys        -   If set to 'ON' then the CTRL-P, CTRL-N, CTRL-F, 
-                           and CTRL-B keys will be mapped to up-arrow,
-                           down-arrow, right-arrow,  and left-arrow,
-                           respectively.  Otherwise, they remain mapped
-                           to their configured bindings (normally UP_TWO
-                           lines, DOWN_TWO lines, NEXT_PAGE, and PREV_PAGE,
-                           respectively).
-
-     Show dot files    -   If display/creation of hidden (dot)
-                           files/directories is enabled, you can turn
-                           the feature on or off via this setting.
-
-     Popups for select -   Lynx normally uses a popup window for the
-     fields                OPTIONs in form SELECT fields when the field
-                           does not have the MULTIPLE attribute specified,
-                           and thus only one OPTION can be selected.  The
-                           use of popup windows can be disabled by changing
-                           this setting to OFF, in which case the OPTIONs
-                           will be rendered as a list of radio buttons.
-                           Note that if the SELECT field does have the
-                           MULTIPLE attribute specified, the OPTIONs always
-                           are rendered as a list of checkboxes.
-
-     Show cursor for   -   Lynx normally hides the cursor by positioning it
-     current link or       to the right and if possible the very bottom of
-     option                the screen, so that the current link or OPTION
-                           is indicated solely by its highlighting or color.
-                           If show cursor is set to ON, the cursor will be
-	                   positioned at the left of the current link or
-                           OPTION.  This is helpful when Lynx is being used
-                           with a speech or braille interface.  It also is
-                           useful for sighted users when the terminal cannot
-                           distinguish the character attributes used to
-                           distinguish the current link or OPTION from the
-                           others in the screen display.
-
-     Keypad mode       -   This option gives the choice between navigating 
-                           with the keypad (as arrows; see Lynx Navigation)
-                           and having every link numbered (numbered links)
-			   so that the links may be selected by numbers
-			   instead of moving to them with the arrow keys.
-
-     Line edit style   -   This option allows you to set alternate key
-                           bindings for the built-in line editor, if your
-                           system administrator has installed alternates.
-                           Otherwise, Lynx uses the Default Binding.
-
-     List directory    -   Applies to Directory Editing.  Files and
-     style                 directories can be presented in the following
-                           ways:
-                            Mixed style
-                              Files and directories are listed together in
-                              alphabetical order.
-                            Directories first
-                              Files and directories are separated into two
-                              alphabetical lists.  Directories are listed
-                              first.
-                            Files first
-                              Files and directories are separated into two
-                              alphabetical lists.  Files are listed first.
-
-     User Mode         -   Beginner 
-                              Shows two extra lines of help at the bottom 
-                              of the screen
-                           Intermediate (normal mode) 
-                              The "normal" statusline messages appear. 
-                           Advanced 
-                              The URL is shown on the statusline. 
-
-      User Agent       -   The header string which Lynx sends to servers
-                           to indicate the User-Agent is displayed here.
-                           Changes may be disallowed via the -restrictions
-                           switch.  Otherwise, the header can be changed
-                           temporarily to a string such as L_y_n_x/2.7.2 for
-                           access to sites which discriminate against Lynx
-                           based on checks for the presence of "Lynx" in the
-                           header. If changed during a Lynx session, the
-                           default User-Agent header can be restored by
-                           deleting the modified string in the Options Menu.
-                           Whenever the User-Agent header is changed, the
-                           current document is reloaded, with the no-cache
-                           flags set, on exit from the Options Menu.  Changes
-                           of the header are not saved in the RC file.
-                           NOTE that Netscape Communications Corp. has
-                           claimed that false transmissions of "Mozilla" as
-                           the User-Agent are a copyright infringement, which
-                           will be prosecuted.  DO NOT misrepresent Lynx as
-                           Mozilla.  The Options Menu issues a warning about
-                           possible copyright infringement whenever the header
-                           is changed to one which does not include "Lynx" or
-                           "lynx".
-
-     Local execution   -   If set to 'ALWAYS ON', Lynx will locally execute
-     links                 commands contained inside of any links.  This
-                           can be HIGHLY DANGEROUS so it is recommended
-                           that they remain 'ALWAYS OFF' or 'FOR LOCAL
-                           FILES ONLY' unless otherwise set by your system
-                           administrator.  This option may not be available
-                           on most versions of Lynx.
-
-
+

OPTIONS SCREEN HELP

+ +The Options Screen allows you to set and modify many Lynx features.
+Note: some options appear on the screen only if they have been +compiled in or chosen in `lynx.cfg':

+ +

+ +

Cookies

+ +This can be set to accept or reject all cookies or to ask each time. +See the Users Guide for details of cookie usage. + +

Editor

+ +This is the editor to be invoked when editing browsable files, +sending mail or comments, or filling form's textarea (multiline input field). +The full pathname of the editor command should be specified when possible. +It is assumed the text editor supports the same character set +you have for "display character set" in Lynx. + +

Emacs keys

+ +If set to 'ON' then the CTRL-P, CTRL-N, CTRL-F and CTRL-B keys will be mapped +to up-arrow, down-arrow, right-arrow and left-arrow respectively. Otherwise, +they remain mapped to their configured bindings (normally UP_TWO lines, +DOWN_TWO lines, NEXT_PAGE and PREV_PAGE respectively). +

Note: setting emacs keys does not affect the line-editor bindings. + +

Execution links

+ +If set to 'ALWAYS ON', Lynx will locally execute commands contained +inside any links. This can be HIGHLY DANGEROUS, so it is recommended +that they remain 'ALWAYS OFF' or 'FOR LOCAL FILES ONLY'. + +

Keypad mode

+ +This gives the choice between navigating with the keypad (as arrows; +see Lynx Navigation) and having every link numbered (numbered links) +so that the links may be selected by numbers instead of moving to them +with the arrow keys. You can also number form fields. + +

Line edit style

+ +This allows you to set alternate key bindings for the built-in line editor, +if your system administrator has installed +Alternate Bindings. +Otherwise, Lynx uses the Default Binding. + +

Personal Mail Address

+ +You may set your mail address here so that when mailing messages +to other people or mailing files to yourself, your email address can be +automatically filled in. Your email address will also be sent +to HTTP servers in a `from:' field. + +

Pop-ups for select fields

+ +Lynx normally uses a pop-up window for the OPTIONs in form SELECT fields +when the field does not have the MULTIPLE attribute specified, and thus +only one OPTION can be selected. The use of pop-up windows can be disabled +by changing this setting to OFF, in which case the OPTIONs will be rendered +as a list of radio buttons. Note that if the SELECT field does have +the MULTIPLE attribute specified, the OPTIONs always are rendered +as a list of checkboxes. + +

Searching type

+ +If set to 'case sensitive', user searches invoked by '/' will be +case-sensitive substring searches. Default is 'Case Insensitive'. + +

Show color

+ +This will be present if color support is available. +
    +
  • If set to ON or ALWAYS, +color mode will be forced on if possible. If (n)curses color support +is available but cannot be used for the current terminal type, selecting ON +is rejected with a message. +
  • If set to OFF or NEVER, color mode will be +turned off. +
  • ALWAYS and NEVER are not offered in anonymous accounts. +If saved to a '.lynxrc' file in non-anonymous accounts, ALWAYS will cause Lynx +to set color mode on at startup if supported. +
+If Lynx is built with slang, +this is equivalent to having included the -color command line switch +or having the COLORTERM environment variable set. If color support is +provided by curses or ncurses, this is equivalent to the default behavior +of using color when the terminal type supports it. If (n)curses color support +is available but cannot be used for the current terminal type, the preference +can still be saved but will have no effect. + +

A saved value of NEVER will +cause Lynx to assume a monochrome terminal at start-up. It is similar +to the -nocolor switch, but (when the slang library is used) can be overridden +with the -color switch. If the setting is OFF or ON when the current options +are saved to a '.lynxrc' file, the default start-up behavior is retained, +such that color mode will be turned on at startup only if the terminal info +indicates that you have a color-capable terminal, or (when slang is used) +if forced on via the -color switch or COLORTERM variable. This default +behavior always is used in anonymous accounts, or if the 'option'_save +restriction is set explicitly. If for any reason the start-up color mode +is incorrect for your terminal, set it appropriately on or off via this option. + +

Show cursor for current link or option

+ +Lynx normally hides the cursor by positioning it to the right and if possible +the very bottom of the screen, so that the current link or OPTION is indicated +solely by its highlighting or color. If show cursor is set to ON, the cursor +will be positioned at the left of the current link or OPTION. This is helpful +when Lynx is being used with a speech or braille interface. It is also useful +for sighted users when the terminal cannot distinguish the character attributes +used to distinguish the current link or OPTION from the others in the display. + +

User Mode

+ +
+
Novice: Shows 2 extra lines of help at the bottom of the screen +for beginners. +
Intermediate (normal): Normal status-line messages appear. +
Advanced: The URL is shown on the status line. +
+ +

Assumed document character set

+ +This changes the handling of documents which do not explicitly specify +a charset. Normally Lynx assumes that 8-bit characters in those documents +are encoded according to iso-8859-1 (the official default for HTTP protocol). +Unfortunately, many non-English web pages forget to include proper charset +info; this option helps you browse those broken pages if you know somehow +what the charset is. When the value given here or by an -assume_charset +command-line flag is in effect, Lynx will treat documents as if they were +encoded accordingly. Option is active when 'Raw 8-bit or CJK Mode' is OFF. + +

Raw 8-bit or CJK mode

+ +This is set automatically, but can be toggled manually in certain cases: +it toggles whether 8-bit characters are assumed to correspond with the display +character set and therefore are processed without translation +via the chartrans conversion tables. ON by default when the display +character set is one of the Asian (CJK) sets and the 8-bit characters +are Kanji multibytes. OFF for the other display 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 specified +in a reply header from an HTTP server to indicate what it is), +but you have no better idea than viewing it as from display character set +(see 'assumed document character set' for best choice). Should be OFF +when an Asian (CJK) set is selected but the document is ISO-8859-1 +or another 'assumed document character set'. The setting can also be toggled +via the RAW_TOGGLE command, normally mapped to '@', and at startup +via the -raw switch. + +

HTML error recovery

+ +Lynx often has to deal with invalid HTML markup. It always tries to +recover from errors, but there is no universally correct way for doing +this. As a result, there are two parsing modes: +"SortaSGML" attempts to enforce valid nesting of most tags +at an earlier stage of processing, while "TagSoup" relies +more on the HTML rendering stage to mimic the behavior of some other +browsers. +You can also switch between these modes with the CTRL-V key, and the +default can be changed in lynx.cfg or with the -tagsoup command line +switch. + +

+The "SortaSGML" mode will often appear to be more strict, and makes +some errors apparent that are otherwise unnoticeable. One particular +difference is the handling of block elements or +<li>..</li> inside <a HREF="some.url">..</a>. +Invalid nesting like this may turn anchors into hidden links which +cannot be easily followed, this is avoided in "TagSoup" mode. See the +help on following links by +number for more information on hidden links. Often pages may be +more readable in "TagSoup" mode, but sometimes the opposite is true. +Most documents with valid HTML, and documents with only minor errors, +should be rendered the same way in both modes. + +

+If you are curious about what goes on behind the scenes, but find that +the information from the -trace switch is just too much, Lynx can be +started with the -preparsed switch; going into SOURCE mode ('\' key) +and toggling the parsing mode (with CTRL-V) should then show some of +the differences. + + + + +

Show Images

+ +Text-based browser cannot show images directly, so we have a choice: +ignore all images without ALT= text string +(this is also switched by '[' key), +show labels (see also "verbose images" for choice between [IMAGE] and filename), +use links for every image to make it possible to download them +(also switched by '*' key). +Changing these settings will not be saved but could be made permanent +by changing the respective settings in lynx.cfg. + +

Verbose Images

+ +Controls whether or not Lynx replaces the [LINK], [INLINE] and [IMAGE] comments +(for images without ALT) with filenames of these images. This is extremely +useful because now we can determine immediately which images are decorations +(button.gif, line.gif) and which are important. + +

VI keys

+ +If set to 'ON' then the lowercase h, j, k and l keys will be mapped +to left-arrow, down-arrow, up-arrow and right-arrow respectively. +

The uppercase H, J, K, and L keys remain mapped to their configured bindings +(normally HELP, JUMP, KEYMAP and LIST, respectively). +

Note: setting vi keys does not affect the line-editor bindings. + +

Display Character set

+ +This allows you to set up the default character set for 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, +try the test here. +Since Lynx now supports a wide range of platforms +it may be useful to note that cpXXX codepages are used within IBM PC computers, +and windows-xxxx within native MS-Windows applications. + +

X DISPLAY variable

+ +This option is only relevant to X Window users. It specifies +the DISPLAY (Unix) or DECW$DISPLAY (VMS) variable. It is picked up +automatically from the environment if it has been previously set. + +

Multi-bookmarks

+ +Manage multiple bookmark files: +
    +
  • When OFF, the default bookmark file is used for the 'v'iew-bookmarks +and 'a'dd-bookmark link commands. +
  • If set to STANDARD, a menu of available +bookmarks is always invoked when you seek to view a bookmark file +or add a link, and you select the bookmark file by its letter token +in that menu. +
  • If set to ADVANCED, you are instead prompted for the letter +of the desired bookmark file, but can enter '=' to invoke the STANDARD +selection menu, or RETURN for the default bookmark file. +
+ +

Bookmark file

+ +Manage the default bookmark file: +
    +
  • If non-empty and multi-bookmarks is OFF, +it specifies your default 'Bookmark file'. +
  • If multi-bookmarks is STANDARD or ADVANCED, +entering 'B' will invoke a menu in which you can specify +filepaths and descriptions of up to 26 bookmark files. +
+The filepaths must be from your home directory and begin with './' +if subdirectories are included (e.g., './BM/lynx_bookmarks.html'). +

+Lynx will create bookmark files when you first 'a'dd a link, +but any subdirectories in the filepath must already exist. + +

FTP sort criteria

+ +This allows you to specify how files will be sorted within FTP listings. +The current options include +`By Filename', `By Size', `By Type', `By Date'. + +

List directory style

+ +Applies to Directory Editing. +Files and directories can be presented in the following ways: +
+
Mixed style: Files and directories are listed together +in alphabetical order. +
Directories first: Files and directories are separated +into 2 alphabetical lists: directories are listed first. +
Files first: Files and directories are separated +into 2 alphabetical lists: files are listed first. +
+ +

Show dot files

+ +If display/creation of hidden (dot) files/directories is enabled, +you can turn the feature on or off via this setting. + +

Preferred Document Charset

+ +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 make your order +of preference explicit by using `q factors' as defined by the HTTP protocol, +for servers which understand it: e.g., iso-8859-5, utf-8;q=0.8. + +

Preferred Document Language

+ +The language you prefer if multi-language files are available from servers. +Use RFC 1766 tags, e.g., `en' English, `fr' French. Can be a comma-separated +list, and you can use `q factors' (see previous help item): +e.g., da, en-gb;q=0.8, en;q=0.7 . + +

User Agent

+ +The header string which Lynx sends to servers to indicate the User-Agent +is displayed here. Changes may be disallowed via the -restrictions switch. +Otherwise, the header can be changed temporarily to e.g., L_y_n_x/2.8.2 +for access to sites which discriminate against Lynx based on checks +for the presence of `Lynx' in the header. If changed during a Lynx session, +the default User-Agent header can be restored by deleting the modified string +in the Options Menu. Whenever the User-Agent header is changed, the current +document is reloaded, with the no-cache flags set, on exit from Options Menu. +Changes of the header are not saved in the .lynxrc file. +

+NOTE Netscape Communications Corp. has claimed that false transmissions +of `Mozilla' as the User-Agent are a copyright infringement, which will +be prosecuted. DO NOT misrepresent Lynx as Mozilla. The Options Menu issues +a warning about possible copyright infringement whenever the header is changed +to one which does not include `Lynx' or `lynx'. + + diff --git a/gnu/usr.bin/lynx/lynx_help/keystrokes/other_help.html b/gnu/usr.bin/lynx/lynx_help/keystrokes/other_help.html index 511ddaac4b7..2aa7f337493 100644 --- a/gnu/usr.bin/lynx/lynx_help/keystrokes/other_help.html +++ b/gnu/usr.bin/lynx/lynx_help/keystrokes/other_help.html @@ -17,7 +17,7 @@ d - Downloads the file pointed to by the current link and displays an option menu allowing the file to - be saved or transfered by configurable options. + be saved or transferred by configurable options. Can also be used when positioned on a form SUBMIT button to download the reply to a form submission. @@ -29,22 +29,22 @@ g - Allows you to enter any URL or filename that you wish to view, and then goto it. - + G - Allows you to edit the current document's URL and use that as a goto URL. - + ? or H - Hypertext help to explain how to navigate in Lynx and use its features. - i - Shows an index of files or subjects. This is - configurable by the System administrator, or + i - Shows an index of files or subjects. This is + configurable by the System administrator, or within documents that you may be viewing. - j - Allows you to enter a "short" name to execute a + j - Allows you to enter a "short" name to execute a jump command configured by your system administrator. Press "?" and ENTER to see a list of defined jump commands. - + k - Shows a list of key mappings. Keys remapped in "lynx.cfg" show up in this list. @@ -52,34 +52,36 @@ document, which can be used for rapid access to the links in large documents. - m - Returns to the first screen and empties the + m - Returns to the first screen and empties the history stack. p - Brings up a list of print commands. - o - Brings up a list of setable options. + o - Brings up a list of settable options. - q - Quits Lynx. ('Q' quits without asking) + q - Quits Lynx. ('Q' quits without asking) - / - Search for a string of characters in the current - document case insensitive or case sensitive - depending on the options set. (see options). + / - Search for a string of characters in the current document + (case insensitive or case sensitive + depending on the options set). s - Search through an external searchable indexed document. - n - Move to the next instance of a search string if you + n - Move to the next instance of a search string if you have searched previously. v - View a Bookmark file. + V - Go to the Visited Links Page + x - Force submission of form or link with no-cache. z - Abort a network transfer in progress. If any partial - data has been transfered it will be displayed. + data has been transferred it will be displayed. - <backspace> - displays the history page. + <backspace> - displays the History Page. - = - Show information about the file and link that you + = - Show information about the file and link that you are currently viewing. \ - Toggles between viewing the HTML source of a @@ -101,7 +103,7 @@ Note that any protected documents that are still in cache can still be accessed. - ` - Toggles minimal or valid comment parsing. When minimal, any + ` - Toggles minimal or valid comment parsing. When minimal, any two successive dashes followed by a close-angle-bracket will be treated as a comment terminator, emulating the parsing bug in Netscape v2.0. If historical comment parsing is set, that @@ -110,14 +112,15 @@ * - Toggles image_links mode on and off. When on, links will be created for all images, including inlines. - @ - Toggles raw 8-bit translations or CJK mode on and off. + @ - Toggles raw 8-bit translations or CJK mode on and off, only + for documents which does not specify character set explicitely. Should be on when the document's charset matches the - selected character set, and otherwise off so that 8-bit - characters will be reverse translated with respect to the - ISO-8859-1 conversion table for the character set (see - options). + display character set, and otherwise off so that 8-bit + characters will be translated by Lynx with respect to the + Assumed document charset, using approximations if necessary + (see options). - [ - Toggles pseudo_inlines mode on and off. When on, inline + [ - Toggles pseudo_inlines mode on and off. When on, inline images which have no ALT string specified will have an "[INLINE]" pseudo-ALT string inserted in the Lynx display. When off, they will be treated as having ALT="" (i.e., @@ -134,7 +137,7 @@ cache. Note that for form submissions, http servers vary in whether they'll treat HEAD requests as valid and return the CGI script's headers, or treat it as invalid and return - an error message. + an error message. " - Toggles valid or "soft" double-quote parsing. When soft, a close-angle-bracket will serve as both a close-double- @@ -145,7 +148,8 @@ CTRL-V - Switches to an alternative way of parsing HTML documents. This may help to get a more readable rendering of some - documents with invalidly placed HTML tags. + documents with invalidly placed HTML tags, more details. CTRL-W - Resets or cleans up the display. diff --git a/gnu/usr.bin/lynx/lynx_help/keystrokes/test_display.html b/gnu/usr.bin/lynx/lynx_help/keystrokes/test_display.html new file mode 100644 index 00000000000..b053daeb068 --- /dev/null +++ b/gnu/usr.bin/lynx/lynx_help/keystrokes/test_display.html @@ -0,0 +1,55 @@ + + + +Quick test for identifying display character set + + + +

Try this page with Lynx 2.7.2 or above:

+ +If you see several letters instead of a single - your promised display charset +does not support this character so "7 bit approximation" is in effect. +If you see any single letter which definitely far from being supposed +you have a wrong lynx settings. +Press 'o' for Options menu and change "Display character set". +Try again if necessary.
+When you are satisfied save your changes in Options menu, thanks. +
+
+
+0x00A9    ©           # COPYRIGHT SIGN
+
+0x00C7    Ç           # LATIN CAPITAL LETTER C WITH CEDILLA
+
+0x00DC    Ü           # LATIN CAPITAL LETTER U WITH DIAERESIS
+
+0x00D1    Ñ           # LATIN CAPITAL LETTER N WITH TILDE
+
+0x0107    ć           # LATIN SMALL LETTER C WITH ACUTE
+0x0108    Ĉ           # LATIN CAPITAL LETTER C WITH CIRCUMFLEX
+0x010C    Č           # LATIN CAPITAL LETTER C WITH CARON
+
+
+0x03BB    λ           # GREEK SMALL LETTER LAMDA
+
+0x041B    Л           # CYRILLIC CAPITAL LETTER EL
+0x042E    Ю           # CYRILLIC CAPITAL LETTER YU
+0x043B    л           # CYRILLIC SMALL LETTER EL
+0x044E    ю           # CYRILLIC SMALL LETTER YU
+
+0x2026    …           # HORIZONTAL ELLIPSIS
+0x2122    ™           # TRADE MARK SIGN
+
+0x255D    ╝           # BOX DRAWINGS DOUBLE UP AND LEFT
+0x255E    ╞           # BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
+
+0xFB01    fi           # LATIN SMALL LIGATURE FI
+
+
+
+
+This is only a quick test to see obvious problems. + + + + diff --git a/gnu/usr.bin/lynx/lynx_help/keystrokes/visited_help.html b/gnu/usr.bin/lynx/lynx_help/keystrokes/visited_help.html index ebb03a709b8..0a6874f3fc9 100644 --- a/gnu/usr.bin/lynx/lynx_help/keystrokes/visited_help.html +++ b/gnu/usr.bin/lynx/lynx_help/keystrokes/visited_help.html @@ -20,8 +20,8 @@ the URLs differ due to appended fragments), and is supplementary to the

You may select any link on the Visited Links Page to retrieve a document that you had previously visited, or you can use this list to save such links in your bookmark files, or to Download -them. +>bookmark files, or to Download them.

In contrast to the History Page, the Visited Links Page includes any links which were retrieved for 'd'ownloading or were passed to diff --git a/gnu/usr.bin/lynx/lynx_help/lynx-dev.html b/gnu/usr.bin/lynx/lynx_help/lynx-dev.html index f062f6748d9..07abb81bdcd 100644 --- a/gnu/usr.bin/lynx/lynx_help/lynx-dev.html +++ b/gnu/usr.bin/lynx/lynx_help/lynx-dev.html @@ -1,4 +1,4 @@ - + Lynx-Dev Discussion List @@ -6,65 +6,129 @@ - -[ Lynx-Dev Archives | +

+[ Lynx-Dev Archive | About Lynx ] - +
-

Lynx-Dev Discussion List

- -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. - -

Subscribing to Lynx-Dev

- -If you are interested in joining this mailing list, -send email to majordomo@sig.net with only the following request -in the body of your message: SUBSCRIBE LYNX-DEV address
-where inclusion of your email address is optional if it can be obtained, -correctly, from the mail headers of your subscription request. - -

NOTE: Subject headers are ignored by the majordomo. - -

Unsubscribing from Lynx-Dev

- -To unsubscribe, send an email message to -majordomo@sig.net with only the following request -in the body: UNSUBSCRIBE LYNX-DEV address
-where inclusion of your email address is optional if it can be obtained, -correctly, from the mail headers of your request. +

The Lynx Development Process

+

+Lynx is maintained and improved by an international co-operative +of volunteers. Newcomers are welcome to join the group: +you needn't be a super programmer, but you should be prepared +to listen and learn, as well as to contribute patches if you can. +Since everyone is a volunteer, you will usually be expected +to try to implement any suggestions you make. -

Majordomo Commands

- -To receive a brief description of majordomo commands, place -the following request in a message to majordomo@sig.net: HELP - -

Contacting Lynx-Dev

- -If you have questions, problems, or comments about using Lynx or -installing it on your system, send email to -lynx-dev@sig.net (after you've subscribed). - -

If you have problems with majordomo not responding to your requests, -send email to the list owner: majordomo-owner@sig.net. Please, -DO NOT send them to lynx-dev@sig.net as they -will be distributed to everyone on the list and will clutter -up their mailboxes. - -

Lynx-Dev Archives

- -Archives of messages posted to lynx-dev are now in html format so that -you can view them using Lynx. +

Lynx-Dev Discussion List

+

+The developers communicate through a majordomo mailing list +-- see below for details -- , which is open to interested users +as well as programmers. Topics include fixing bugs, increasing +Lynx's tools and powers, meeting the ever-changing demands +of the Internet and porting Lynx to new systems. +

+Anyone may read what has been said on the list by visiting + the Archive. + +

Development Versions of Lynx

+

+Besides releases, which are stable versions of Lynx +which come out once or twice a year and can be obtained +from the release site, +there are development versions, +which are experimental -- though usually stable enough to use -- +and appear every few weeks, depending on current activity. +You can find the latest development version of Lynx +by visiting +the development site. + +

Subscribing to Lynx-Dev

+

+If you are interested in joining the Lynx mailing list, +send e-mail to  majordomo@sig.net +with only the following request in the body of your message: +

+  subscribe lynx-dev (address) +

+where your e-address is optional if it can be obtained correctly +from the mail headers of your subscription request. You will need +to answer one follow-up question to confirm you want to subscribe. +Majordomo will then enroll you and send all messages +which you address to lynx-dev@sig.net to all subscribers; +you will also receive all messages sent by other subscribers. +

+NOTE: Subject headers are ignored when (un)subscribing. + +

Unsubscribing from Lynx-Dev

+

+To unsubscribe, send an e-mail to + majordomo@sig.net +with only the following request in the body of your message: +

+  unsubscribe lynx-dev (address) +

+where your e-address is optional if it can be obtained correctly +from the mail headers of your subscription request. + +

Casual Inquiries

+

+Anyone may ask a question or offer a comment by sending e-mail +to  the list. +Since all subscribers are volunteers, +you depend on their goodwill and will be more likely +to get a response if you give the e-mail a meaningful `Subject' +and include details of your version of Lynx, hardware and software. +You can check the Archive to find any responses.

+Messages from non-subscribers are not immediately distributed +to avoid spam. Usually, if your message appears genuine, +it will be retrieved from the pile headed for the wastebasket +within a day or so and distributed to the list. +For best results, subscribe as described above. + +

Subscribing to Lynx-Dev-Contrib

+

+If you simply want to contribute e-mail to the list +without receiving the sometimes heavy discussion as well, +you can subscribe to lynx-dev-contrib instead. +E-mail from the address you subscribe will be recognized +as from a subscriber and automatically distributed to the list, +but no e-mail will be sent from the list to you. If you have +multiple accounts from which you want to post to the list, +subscribe one of them to lynx-dev to receive the list mail +and the others to lynx-dev-contrib. +

+To subscribe to lynx-dev-contrib, send e-mail to + majordomo@sig.net +with only the following request in the body of your message: +

+  subscribe lynx-dev-contrib (address) + +

Majordomo Commands

+

+To receive a brief description of majordomo commands, +send e-mail to + majordomo@sig.net +with only the following request in the body of your message: +

+  help +

+You will receive by return e-mail a list of commands. +Further information is available from the + majordomo website. +

+If you have problems with majordomo not responding to requests, +send e-mail to the list owner: + majordomo-owner@sig.net. +PLEASE DO NOT send them to lynx-dev@sig.net, +where they would be distributed to everyone on the list, +causing irritation by cluttering their mailboxes. + +

The Lynx-Dev Archive

+

+Messages posted to lynx-dev are archived in html format +so that you can view them using Lynx: go to the +HTML Archive. -

Go to the Lynx-Dev Archives. diff --git a/gnu/usr.bin/lynx/lynx_help/lynx_help_main.html b/gnu/usr.bin/lynx/lynx_help/lynx_help_main.html index 0871f1d9f24..ea2005f41a9 100644 --- a/gnu/usr.bin/lynx/lynx_help/lynx_help_main.html +++ b/gnu/usr.bin/lynx/lynx_help/lynx_help_main.html @@ -2,83 +2,103 @@ -Help! - Press the Left arrow key to exit help +The Lynx Help Page -

Lynx Help Menu

+

Lynx help files (usually in your local directories):

-
    -Choose a subject: +
    • Lynx Users Guide - -
    • HTML 2.0 -| HTML 3.0 -| HTML i18n -| HTML 3.2 -| HTML 4.0 - -
        -
      • Spyglass/Stonehand Technical Reference -
          -
        • Keep Your Comments Legal +

          Other sources of Lynx help:

          + +
            +
          • lynx.cfg options + -- a reference for advanced configurations +
          • Lynx Help for Beginners -- quick help on many common problems +
          • Al Gilman's FAQs -- many common queries, some more advanced +
          • Lynx Links + -- source & binaries, FAQs, developers & archives,
            +SSL & security, and more +
          • Lynxstuff + -- SSL, Wyse terminals, Lynx-friendly Web design +
          • Blynx + -- Speech-Friendly Help for the visually impaired
          -
        • A Kinder, Gentler HTML Validator -
        • WebTechs HTML Validation Service -
        • HTML Primer -| HTML Quick Reference Guide + +

          World Wide Web Consortium documents:

          + + -
        • HTTP 1.0 -| HTTP 1.1 - -
        • The World Wide Web Consortium (W3C) - -
        • Alta Vista -| Yahoo! -| Savvy Search -| WebCrawler -
        • Infoseek Guide -| Lycos -| Excite -| MetaCrawler +

          Help with HTML:

          + + + +

          HTML validation services:

          + + + +

          Other browsing software:

          + +
            +
          • WGET + -- powerful & flexible non-interactive downloader +
          • cURL + -- non-interactive downloader which supports HTTPS +
          • SNARF + -- small simple 1-file non-interactive downloader +
          + +

          Meta-indexes: lists of links

          + + + +

          Search engines:

          + + + diff --git a/gnu/usr.bin/lynx/lynx_help/lynx_url_support.html b/gnu/usr.bin/lynx/lynx_help/lynx_url_support.html index 27f069ab41f..759e32f2bd5 100644 --- a/gnu/usr.bin/lynx/lynx_help/lynx_url_support.html +++ b/gnu/usr.bin/lynx/lynx_help/lynx_url_support.html @@ -1,12 +1,12 @@ - + URL Schemes Supported in Lynx - +
          [http, https | telnet, tn3270, rlogin | gopher | @@ -21,31 +21,31 @@ lynxexec, lynxprog | lynxcgi| internal] - +

          URL Schemes Supported in Lynx

          Lynx handles a number of URL types, that are enumerated below. For more details about URLs (Uniform Resource Locators) see RFC1738: -
            +

            Lynx resolves partial or relative URLs in documents with respect to the BASE if one was specified, otherwise with respect to the document's absolute URL, using the rules described in RFC1808: -

              + and in subsequent drafts of the IETF: -
                + @@ -71,7 +71,7 @@ DCL into a valid URL, e.g., [] will be expanded to are SOLELY for startfile or 'g'oto entries! Any partial or relative URLs within HTML documents are resolved according to the rules specified in RFC1808 and subsequent IETF drafts. -
                +

                The http and https URLs:

                @@ -90,17 +90,17 @@ which can correspond to positions in the rendering of the document.

                The https URL has the same format, but the default port is :443. Patches for support of https URLs and the CONNECT procedure are available -for qualified recipients via Lynx links. US Export laws and associated red tape pose severe impediments to inclusion of this support in the general distributions of freeware WWW clients such as Lynx. Sorry. -


                +

                The telnet, tn3270, and rlogin URLs:

                A telnet URL generally results in Lynx spawning a telnet -session. Lynx implements the complete telnet URL scheme, i.e.:
                +session. Lynx implements the complete telnet URL scheme, i.e.:
                telnet://user:password@host:port

                The user and/or :password fields may be omitted, and @@ -116,7 +116,7 @@ hosts. URLs which point to anonymous or other public access accounts, and for most TCP-IP software you will be prompted for a password whether or not one was included in the URL. -


                +

                The gopher URL:

                @@ -159,7 +159,7 @@ adopted during development of the University of Minnesota gopher software to facilitate the offering of links to MIME-capable http servers in the listings returned by gopher servers, but should be considered Lynxisms and UMN Gopherisms. -
                +

                The file URL:

                @@ -189,7 +189,7 @@ VMS, invoke Lynx with the desired file or directory as the startfile using any spec acceptable to DCL, and then use the showinfo command (=) to see the file URL which Lynx created for it. -
                +

                The ftp URL:

                @@ -237,7 +237,7 @@ do wish to get a listing of the login directory or have the path string treated as a file or path under the login directory, include a tilde (~) as for file URLs, e.g.:
                ftp://user@myhost/~ -
                +

                The wais URL:

                @@ -257,7 +257,7 @@ submit your search with the wais_query appended. Lynx will convert the server's reply into a hit list with URLs that include the wais_type and wais_path for retrieving items from the hit list. -
                +

                The news, nntp, and snews URLs:

                @@ -316,7 +316,7 @@ to="ngno">(retrieves the message by number)
                Use of this scheme is not recommended, because the message numbers are specific to each nntp server, unlike the unique identifiers for news messages. -
                +

                The newspost, newsreply, snewspost, and @@ -334,7 +334,7 @@ respectively, to standard nntp servers, with default port :119. Lynx now also supports homologous snewspost and snewsreply URLs for use with SSL capable nntp servers, but the latter requires patches for built in SSL support, or use of a daemon which handles the secure communications -on behalf of Lynx. +on behalf of Lynx.

                The formats are:
                newspost://host:port/newsgroup(s)  mailto
                URLs, with the qualification that they presently are supported only by Lynx. -


                +

                The mailto URL:

                @@ -448,7 +448,7 @@ an option to include the currently displayed document. If this option is accepted, each line of that document is prefixed with a right-angle-bracket, and the prefixed inclusion should be trimmed by the user to just those passages relevant to the message which will be sent. -
                +

                The finger URL:

                @@ -482,7 +482,7 @@ port 79 and the plain text (0) gophertype specified:
                gopher://host:79/0
                Lynx will handle such URLs equivalently to overt finger URLs, including creation of links for any strings which appear to be supported URLs. -
                +

                The cso URL:

                @@ -500,20 +500,7 @@ URLs and create a FORM for submitting additional requests (searches) to the server. Any strings in the reports returned for these requests (searches) which appear to be a URL with a supported scheme will be converted into a link for accessing that URL. -
                - -

                The chargen URL:

                - -The chargen URL is intended to provide a gateway to the chargen service. -The requests are made on port 19 (:19). You can omit the port, -and no other value is allowed. The format is:
                -chargen://host
                - -

                Lynx will accept approximately 55 lines of characters in the stream -returned by the server, then close the connection and display the lines -as PRE formatted text. Note that if port 19 is used for a URL with a -scheme other than chargen, the URL will be rejected by Lynx. -


                +

                The lynxexec and lynxprog URLs:

                @@ -540,7 +527,7 @@ from the utility invoked via lynxprog.

                These are Lynxisms and should be used only in local documents intended solely for Lynx. -


                +

                The lynxcgi URL:

                @@ -563,7 +550,7 @@ from +

                The LYNXfoo internal URLs:

                @@ -577,7 +564,7 @@ find the self-restraint to resist that temptation!!! >Return to your <A HREF="LYNXHIST:0">Startfile</A>
                Review your <A HREF="LYNXKEYMAP:">Keymap</A>
                -(Yes, they'll work. No, they won't do any harm. But...) +(Yes, they'll work. No, they won't do any harm. But...)

                If you must try one, the second is OK from the command line:
                lynx LYNXKEYMAP:
                diff --git a/gnu/usr.bin/lynx/makefile.in b/gnu/usr.bin/lynx/makefile.in index ffe0dafe0f5..d18c00c2ea7 100644 --- a/gnu/usr.bin/lynx/makefile.in +++ b/gnu/usr.bin/lynx/makefile.in @@ -1,6 +1,6 @@ ##makefile for lynx -SHELL = /bin/sh +SHELL = @CONFIG_SHELL@ x = @PROG_EXT@ @@ -8,6 +8,7 @@ x = @PROG_EXT@ @SET_MAKE@ prefix = @prefix@ exec_prefix = @exec_prefix@ +top_srcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = $(srcdir) @@ -15,6 +16,7 @@ CC = @CC@ CFLAGS = @CFLAGS@ DEFS = @DEFS@ CPPFLAGS = @CPPFLAGS@ +LINT = @LINT@ LIBS = @LIBS@ @@ -22,31 +24,50 @@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ +## This is the version which we are developing (or, upon release, make this +## the same). Use no dots in the name, since it must work on VMS and MS-DOS. +VERSION = 2-8-2 + ##this is the name of the directory the lynx source code is in. -##(e.g. lynx2-8, not the full path) -lynxdir= lynx2-8 -lynxname= lynx2-8 +##(e.g., lynx2-8-2, not the full path) +lynxdir= lynx$(VERSION) +lynxname= lynx$(VERSION) + +## The 'DESTDIR' variable allows you to install the program into a different +## location, e.g., for packaging, without affecting the compiled-in pathnames. +DESTDIR= ## Where you want lynx installed bindir= @bindir@ +BINDIR= $(DESTDIR)$(bindir) ## Where you want the lynx man file installed mandir= @mandir@/man1 +MANDIR= $(DESTDIR)$(mandir) ## Where you want the lynx.cfg file installed libdir= @libdir@ +LIBDIR= $(DESTDIR)$(libdir) + +## Where you want the doc-files installed +docdir= @libdir@/lynx_doc +DOCDIR= $(DESTDIR)$(docdir) ## Where you want the help-files installed helpdir= @libdir@/lynx_help - -installbin= @INSTALL_PROGRAM@ -s -m 755 -installdoc= @INSTALL_DATA@ +HELPDIR= $(DESTDIR)$(helpdir) ##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 +## Path to gzip that will compress the help files. +## It will be used when --enable-gzip-help is set by configure. +## Leave *both* empty if you don't want to gzip help files. +COMPRESS_PROG=@COMPRESS_PROG@ +COMPRESS_EXT=@COMPRESS_EXT@ + # !!!!!!!!!!! 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 @@ -55,20 +76,6 @@ WWWINC= WWW/Library/Implementation # 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. @@ -108,9 +115,9 @@ SITE_DEFS = # Your defines here # -DIGNORE_CTRL_C Define if Control-C shouldn't exit lynx. # -DNOPORT if you must use PASV instead of PORT for FTP # -DNO_CPU_LIMIT Disables Max CPU timeout (includes CLOCKS_PER_SECOND) +# -DNO_RULES Disables CERN-style access rules (see lynx.cfg). # -DSHORTENED_RBIND For a SOCKSified lynx with the short version of Rbind. # -DSLANG_MBCS_HACK prevent cutoff lines when using UTF8 console (slang only) -# -DSOCKS For making a SOCKSified lynx. # # if you are linking to freeWAIS-0.202 or older, you should define this # in SITE_DEFS @@ -131,21 +138,23 @@ SITE_DEFS = # Your defines here # for their inet_addr(host) calls. # # -DDGUX_OLD -# -# if you would like logging of client requests via syslog(), you should -# define this in SITE_DEFS -# -# -DSYSLOG_REQUESTED_URLS # defines which have configure options (see INSTALLATION, Section II-1c.): # -DARCHIVE_ONLY # -DDIRED_SUPPORT +# -DDISP_PARTIAL +# -DDONT_TRACK_INTERNAL_LINKS +# -DEXEC_LINKS +# -DEXEC_SCRIPTS # -DEXP_CHARTRANS_AUTOSWITCH +# -DEXP_PERSISTENT_COOKIES # -DLINKEDSTYLES # -DLONG_LIST +# -DLYNXCGI_LINKS # -DLY_FIND_LEAKS # -DNCURSES # -DNO_CHANGE_EXECUTE_PERMS +# -DNO_EXTENDED_HTMLDTD # -DNO_PARENT_DIR_REFERENCE # -DNSL_FORK # -DOK_GZIP @@ -154,27 +163,50 @@ SITE_DEFS = # Your defines here # -DOK_TAR # -DOK_UUDECODE # -DOK_ZIP +# -DOPTIONS_FORMS +# -DOPTIONS_MENU +# -DSOCKS +# -DSYSLOG_REQUESTED_URLS # -DUNDERLINE_LINKS # -DUSE_COLOR_STYLE +# -DUSE_DEFAULT_COLORS +# -DUSE_EXTERNALS # -DUSE_HASH # -DUSE_SLANG +# -DUSE_SOCKS5 # -DUSE_ZLIB # # for installation of local execution links, please see the file userdefs.h # TESTED: Linux FreeBSD SunOS Solaris IRIX CLIX HP-UX AIX SCO -all lynx$x: - cd WWW/Library/unix && $(MAKE) CC="$(CC)" \ +all lynx$x: cfg_defs.h LYHelp.h +@MSG_DIR_MAKE@ $(SHELL) $(srcdir)/fixtext.sh $(srcdir)/LYMessages_en.h >LYMessages.c +@INTLDIR_MAKE@ cd intl && $(MAKE) CC="$(CC)" +@MSG_DIR_MAKE@ cd po && $(MAKE) CC="$(CC)" + cd $(WWWINC) && $(MAKE) CC="$(CC)" \ LY_CFLAGS="$(CFLAGS)" \ CPPFLAGS="$(CPPFLAGS)" \ LYFLAGS="$(SITE_LYDEFS)" cd src && $(MAKE) all CC="$(CC)" \ CFLAGS="$(CFLAGS)" \ CPPFLAGS="$(CPPFLAGS)" \ - LIBS="$(LIBS) $(RESOLVLIB) $(WAISLIB) $(SOCKSLIB) $(SITE_LIBS)" \ + LIBS="$(LIBS) $(RESOLVLIB) $(WAISLIB) $(SITE_LIBS)" \ + SITE_DEFS="$(SITE_DEFS)" \ + WWWINC=$(WWWINC) \ + WWWLIB="../$(WWWINC)/libwww.a" + +lint: + cd $(WWWINC) && $(MAKE) LINT="$(LINT)" CC="$(CC)" \ + LY_CFLAGS="$(CFLAGS)" \ + CPPFLAGS="$(CPPFLAGS)" \ + LYFLAGS="$(SITE_LYDEFS)" lint + cd src && $(MAKE) all LINT="$(LINT)" CC="$(CC)" \ + CFLAGS="$(CFLAGS)" \ + CPPFLAGS="$(CPPFLAGS)" \ + LIBS="$(LIBS) $(RESOLVLIB) $(WAISLIB) $(SITE_LIBS)" \ SITE_DEFS="$(SITE_DEFS)" \ WWWINC=$(WWWINC) \ - WWWLIB="../WWW/Library/unix/libwww.a" + WWWLIB="../$(WWWINC)/libwww.a" lint help: @echo @@ -189,13 +221,17 @@ help: ##Miscellaneous actions clean: - rm -f WWW/Library/*/*.[aob] + rm -f WWW/Library/*/*.[aoib] rm -f WWW/Library/*/.created cd src && $(MAKE) clean - rm -f *.b src/lynx$x core Lynx.leaks - -depend: - cd WWW/Library/unix && $(MAKE) $@ +@MSG_DIR_MAKE@ rm -f LYMessages.c +@INTLDIR_MAKE@ cd intl && $(MAKE) $@ +@MSG_DIR_MAKE@ cd po && $(MAKE) $@ + rm -f *.b src/lynx$x *.leaks cfg_defs.h LYHelp.h lint.* + rm -f core *.core + +depend: cfg_defs.h LYHelp.h + cd $(WWWINC) && $(MAKE) $@ cd src && $(MAKE) $@ distclean: clean @@ -204,16 +240,20 @@ distclean: clean -rm -rf src/obsolete -cd src && $(MAKE) $@ -cd src/chrtrans && $(MAKE) $@ +@INTLDIR_MAKE@ cd intl && $(MAKE) $@ +@MSG_DIR_MAKE@ -rmdir intl +@MSG_DIR_MAKE@ cd po && $(MAKE) $@ +@MSG_DIR_MAKE@ -rmdir po -rm -f *~ *.bak *.sav - -rm -f WWW/Library/unix/makefile src/makefile src/chrtrans/makefile - @SRCDIR_CLEAN@-find . -type f -name '*.rej' -exec -rm -f {} \; - @SRCDIR_CLEAN@-find . -type f -name '*.orig' -exec -rm -f {} \; - @SRCDIR_CLEAN@-rmdir WWW/Library/unix && rmdir WWW/Library && rmdir WWW - @SRCDIR_CLEAN@-rmdir src/chrtrans && rmdir src + -rm -f $(WWWINC)/makefile src/makefile src/chrtrans/makefile +@SRCDIR_CLEAN@ -rmdir $(WWWINC) && rmdir WWW/Library && rmdir WWW +@SRCDIR_CLEAN@ -rmdir src/chrtrans && rmdir src -rm -f makefile lynx_cfg.h config.status config.log config.cache -rm -f lynx$x install-* maintainer-clean: distclean + -find . -type f -name '*.rej' -exec rm -f {} \; + -find . -type f -name '*.orig' -exec rm -f {} \; -rm -rf WWW/Library/*/obsolete -rm -f Lynx.prj .*_aux @@ -240,50 +280,148 @@ save: compress: tar cd ..; rm -f $(lynxname).tar.Z; compress -f -v $(lynxname).tar +# Directory containing reference source for patch generation, +# either absolute or relative to $(top_srcdir)/.. +REFDIR=orig/$(lynxdir) + +lynx.patch: $(top_srcdir) $(top_srcdir)/CHANGES + cd $(top_srcdir)/.. && cd $(REFDIR) && { rm -f \ + config.log \ + config.status \ + lynx_cfg.h \ + ; \ + for I in . src $(WWWINC); do ( set +e; \ + ( set -x; cd $$I && rm -f *.orig *.rej makefile ); : ); \ + done; } + ( cd $(top_srcdir)/..; echo "%%% Created `date` by target $@. %%%"; \ + diff -brc $(REFDIR) $(lynxdir) ) \ + | grep -v '^Common' \ + | grep -v '^Binary files ' \ + | grep -v '^Only ' | tee $@ | grep '^--- $(lynxdir)' + install: lynx$x install-bin install-man install-cfg @INSTALL_LSS@ @echo @echo "Use $(MAKE) install-help to install the help-files" + @echo "Use $(MAKE) install-doc to install extra documentation files" @echo -install-bin: $(bindir) - -mv -f $(bindir)/lynx$x $(bindir)/lynx.old - $(installbin) lynx$x $(bindir)/ +install-full: install install-help install-doc + @echo Full installation complete. + +install-bin: $(BINDIR) +@MSG_DIR_MAKE@ cd po && $(MAKE) CC="$(CC)" install + -mv -f $(BINDIR)/lynx$x $(BINDIR)/lynx.old + $(INSTALL_PROGRAM) lynx$x $(BINDIR)/lynx$x -install-man : $(mandir) - $(installdoc) $(srcdir)/lynx.man $(mandir)/lynx.1 +install-man : $(MANDIR) + $(INSTALL_DATA) $(srcdir)/lynx.man $(MANDIR)/lynx.1 -install-help : $(helpdir) - (cd $(helpdir) && rm -rf *) - (cd $(srcdir)/lynx_help && tar cf - . ) | ( cd $(helpdir) && tar xf - ) +install-doc : $(DOCDIR) + @echo Copying sample files (cd $(srcdir) && tar cf - C[HO]* PROBLEMS README samples test ) | \ - ( cd $(helpdir) && tar xf - ) - -rm -f $(libdir)/lynx.tmp - sh -c 'if test -f $(libdir)/lynx.cfg ; then \ - mv $(libdir)/lynx.cfg $(libdir)/lynx.tmp ; \ + ( cd $(DOCDIR) && tar xf - ) + +# HPUX 'sed' does not seem to like '=' as pattern delimiter. +FIX_SED = tr '=' '%' +#FIX_SED = cat + +install-help : $(DOCDIR) $(HELPDIR) + (cd $(HELPDIR) && rm -rf *) + @echo Constructing sed-script + @ECHO_CC@sed -e '/^#/d' -e '/^$$/d' \ + -e 's%\(.*\)=\(.*\@.*\)$$%s=@\1@=\2=g%' \ + -e 's%\(.*\)=\(http:.*\)$$%s=@\1@=\2=g%' \ + -e 's%\(.*\)=\(ftp:.*\)$$%s=@\1@=\2=g%' \ + -e 's%\(.*\)=\(.*\.html\)$$%s=@\1@=\2$(COMPRESS_EXT)=g%' \ + $(srcdir)/lynx_help/help_files.txt | $(FIX_SED) > \ + $(HELPDIR)/help_files.sed + @echo Appending interim-fix for existing html files + @ECHO_CC@sed -e '/^#/d' -e '/[:@]/d' -e '/^$$/d' \ + -e 's%\(.*\)=\(.*\.html\)$$%s=\2=\2$(COMPRESS_EXT)=g%' \ + -e 's%\.html=%\\.html=%' \ + $(srcdir)/lynx_help/help_files.txt | $(FIX_SED) >> \ + $(HELPDIR)/help_files.sed + @ECHO_CC@if test -n "$(COMPRESS_EXT)"; then echo 's%\$(COMPRESS_EXT)\$(COMPRESS_EXT)%$(COMPRESS_EXT)%g' >> \ + $(HELPDIR)/help_files.sed; fi + @echo Translating/copying html files + @ECHO_CC@$(SHELL) -c 'cd $(srcdir)/lynx_help && ( \ + dirs=keystrokes; \ + (cd $(HELPDIR) && mkdir $$dirs 2>/dev/null ) ; \ + files="*.html */*.html" ; \ + for f in $$files ; do \ + sed -f $(HELPDIR)/help_files.sed $$f > $(HELPDIR)/$$f ; \ + done ; \ + if test "$(COMPRESS_PROG)" != "" ; then \ + (cd $(HELPDIR) && $(COMPRESS_PROG) $$files ) \ + fi ; \ + )' + -rm -f $(HELPDIR)/help_files.sed + @echo Updating $(libdir)/lynx.cfg + $(SHELL) -c 'if test -f $(LIBDIR)/lynx.cfg ; then \ + mv $(LIBDIR)/lynx.cfg $(LIBDIR)/lynx.tmp ; \ else \ - cp $(srcdir)/lynx.cfg $(libdir)/lynx.tmp ; \ + cp $(srcdir)/lynx.cfg $(LIBDIR)/lynx.tmp ; \ fi' - sed -e '/^HELPFILE:http/s@^@#@' \ + @echo Updating $(libdir)/lynx.cfg to point to installed help-files + @ECHO_CC@sed -e '/^HELPFILE:http/s@^@#@' \ -e '/^#HELPFILE:file/s@#@@' \ -e '/^HELPFILE:file/s@/PATH_TO/lynx_help@$(helpdir)@' \ - $(libdir)/lynx.tmp >$(libdir)/lynx.cfg - chmod 644 $(libdir)/lynx.cfg - -rm -f $(libdir)/lynx.tmp + -e '/^[A-Z_]*:/s@/PATH_TO/lynx_doc@$(docdir)@' \ + -e '/^HELPFILE:file/s@$$@$(COMPRESS_EXT)@' \ + -e '/^HELPFILE:file/s@$(COMPRESS_EXT)$(COMPRESS_EXT)$$@$(COMPRESS_EXT)@' \ + $(LIBDIR)/lynx.tmp >$(LIBDIR)/lynx.cfg + chmod 644 $(LIBDIR)/lynx.cfg + -rm -f $(LIBDIR)/lynx.tmp + $(INSTALL_DATA) $(srcdir)/COPYHEADER $(DOCDIR)/COPYHEADER + $(INSTALL_DATA) $(srcdir)/COPYING $(DOCDIR)/COPYING + cd $(HELPDIR) && ( \ + ln $(DOCDIR)/COPYHEADER . || cp $(DOCDIR)/COPYHEADER . ; \ + ln $(DOCDIR)/COPYING . || cp $(DOCDIR)/COPYING . ) + +LYHelp.h : LYHelp.hin + @echo Constructing sed-script + @ECHO_CC@sed -e '/^#/d' -e '/^$$/d' \ + -e 's%\(.*\)=\(.*\@.*\)$$%s=@\1@=\2=g%' \ + -e 's%\(.*\)=\(http:.*\)$$%s=@\1@=\2=g%' \ + -e 's%\(.*\)=\(ftp:.*\)$$%s=@\1@=\2=g%' \ + -e 's%\(.*\)=\(.*\.html\)$$%s=@\1@=\2$(COMPRESS_EXT)=g%' \ + $(srcdir)/lynx_help/help_files.txt | $(FIX_SED) > \ + help_files.sed + @echo Creating $@ + @sed -f help_files.sed $(srcdir)/LYHelp.hin > $@ + -@rm -f help_files.sed + @echo '**********************************************' + @echo + @$(SHELL) -c 'if test "$(COMPRESS_PROG)" = "" ; then \ + echo " Help files will NOT be gzipped."; \ + else \ + echo " Help links point to compressed files"; \ + echo " To access them properly you have to type"; \ + echo " make install-help"; \ + fi' + @echo + @echo '**********************************************' -install-cfg : $(libdir) - -mv -f $(libdir)/lynx.cfg $(libdir)/lynx.oldcfg - $(INSTALL_DATA) $(srcdir)/lynx.cfg $(libdir)/lynx.cfg +cfg_defs.h : $(srcdir)/cfg_defs.sh config.cache lynx_cfg.h + @rm -f $@ + PATH=$(srcdir):$$PATH; export PATH; $(SHELL) -c '$(srcdir)/cfg_defs.sh' -install-lss : $(libdir) - -mv -f $(libdir)/lynx.lss $(libdir)/lynx.oldlss - $(INSTALL_DATA) $(srcdir)/samples/lynx.lss $(libdir)/lynx.lss +install-cfg : $(LIBDIR) + -mv -f $(LIBDIR)/lynx.cfg $(LIBDIR)/lynx.oldcfg + $(INSTALL_DATA) $(srcdir)/lynx.cfg $(LIBDIR)/lynx.cfg -uninstall: - -rm -f $(bindir)/lynx$x - -rm -f $(mandir)/lynx.1 - -rm -f $(libdir)/lynx.cfg - -rm -f $(libdir)/lynx.lss - -rm -rf $(libdir)/lynx_help +install-lss : $(LIBDIR) + -mv -f $(LIBDIR)/lynx.lss $(LIBDIR)/lynx.oldlss + $(INSTALL_DATA) $(srcdir)/samples/lynx.lss $(LIBDIR)/lynx.lss -$(bindir) $(mandir) $(libdir) $(helpdir) : +uninstall: +@MSG_DIR_MAKE@ cd po && $(MAKE) CC="$(CC)" uninstall + -rm -f $(BINDIR)/lynx$x + -rm -f $(MANDIR)/lynx.1 + -rm -f $(LIBDIR)/lynx.cfg + -rm -f $(LIBDIR)/lynx.lss + -rm -rf $(HELPDIR) + -rm -rf $(DOCDIR) + +$(BINDIR) $(MANDIR) $(LIBDIR) $(HELPDIR) $(DOCDIR) : $(srcdir)/mkdirs.sh $@ diff --git a/gnu/usr.bin/lynx/po/ChangeLog b/gnu/usr.bin/lynx/po/ChangeLog new file mode 100644 index 00000000000..81690d0294a --- /dev/null +++ b/gnu/usr.bin/lynx/po/ChangeLog @@ -0,0 +1,99 @@ +1998-02-14 Karl Eichwalder + + * no.po: Update. + +Sun May 25 19:19:51 1997 Karl Eichwalder + + * de.po: Update. + +Mon Apr 28 17:38:54 1997 Karl Eichwalder + + * es.po: Update. + +Wed Mar 26 09:58:18 1997 Karl Eichwalder + + * de.po: Update. + +Sun Mar 23 18:28:18 1997 Karl Eichwalder + + * sv.po: Update. + +Fri Feb 14 08:24:07 1997 Karl Eichwalder + + * pl.po: Update. + +Sun Feb 2 18:42:04 1997 Karl Eichwalder + + * de.po es.po fr.po sv.po: Update. + +Sat Jan 11 16:51:45 1997 Karl Eichwalder + + * nl.po: Update. + +Fri Jan 10 13:09:59 1997 Karl Eichwalder + + * fr.po: Update. + +Wed Jan 8 08:53:41 1997 Karl Eichwalder + + * no.po: Update. + +Tue Jan 7 18:34:57 1997 Karl Eichwalder + + * es.po: Update. + +Sun Jan 5 09:58:47 1997 Karl Eichwalder + + * de.po fr.po: Updates. + +Sat Jan 4 17:49:59 1997 Karl Eichwalder + + * es.po: Update. + +Thu Dec 12 18:58:01 1996 Karl Eichwalder + + * it.po: Remove. + +Wed Dec 11 20:05:00 1996 Karl Eichwalder + + * mailshar gnu-translation@prep.ai.mit.edu + hello-1.3.6/po/hello.pot. + + * POTFILES.in: remove `src/getopt1.c'. + + * de.po es.po fr.po ko.po nl.po no.po pl.po pt.po sl.po sv.po: new + files from alpha.gnu.ai.mit.edu:/gnu/po/maint/hello. + +Fri Mar 15 12:43:14 1996 Karl Eichwalder + + * fr.po: New (version 1.3.2). + +Tue Mar 12 10:15:26 1996 Karl Eichwalder + + * mailshar gnu-translation@prep.ai.mit.edu + hello-1.3.4/po/hello.pot. + +Fri Mar 8 20:40:50 1996 Karl Eichwalder + + * de.po: New. + +Tue Mar 5 09:58:14 1996 Karl Eichwalder + + * de.po: New. Reflect current version 1.3.2; now 1.3.3. + +Sun Mar 3 21:06:15 1996 Karl Eichwalder + + * Makefile.in.in ($(PACKAGE).pot): Add POTFILES. + + * POTFILES.in: remove `src/version.c'. + +Tue Dec 19 10:16:39 1995 Karl Eichwalder + + * POTFILES.in: Reflect, that source files now in ../src/. + +Fri Dec 15 11:59:51 1995 Karl Eichwalder + + * POTFILES.in: New file. Lists `getopt.c', `getopt1.c', + `hello.c', and `version.c'. + + diff --git a/gnu/usr.bin/lynx/po/POTFILES.in b/gnu/usr.bin/lynx/po/POTFILES.in new file mode 100644 index 00000000000..30e50b50940 --- /dev/null +++ b/gnu/usr.bin/lynx/po/POTFILES.in @@ -0,0 +1,45 @@ +# List of source files containing translatable strings. + +# Package source files (use 'gettext()' function). + +LYMessages.c +WWW/Library/Implementation/HTAABrow.c +WWW/Library/Implementation/HTAccess.c +WWW/Library/Implementation/HTFTP.c +WWW/Library/Implementation/HTFile.c +WWW/Library/Implementation/HTFinger.c +WWW/Library/Implementation/HTGopher.c +WWW/Library/Implementation/HTNews.c +WWW/Library/Implementation/HTTCP.c +WWW/Library/Implementation/HTTP.c +WWW/Library/Implementation/HTTelnet.c +WWW/Library/Implementation/HTWAIS.c +WWW/Library/Implementation/HTWSRC.c +src/GridText.c +src/HTAlert.c +src/HTML.c +src/LYBookmark.c +src/LYCgi.c +src/LYClean.c +src/LYCookie.c +src/LYCurses.c +src/LYDownload.c +src/LYHistory.c +src/LYLeaks.c +src/LYList.c +src/LYLocal.c +src/LYMail.c +src/LYMain.c +src/LYMainLoop.c +src/LYNews.c +src/LYOptions.c +src/LYPrint.c +src/LYReadCFG.c +src/LYShowInfo.c +src/LYStyle.c +src/LYTraversal.c +src/LYUpload.c +src/LYUtils.c +src/LYrcFile.c + +# end of file POTFILE.in diff --git a/gnu/usr.bin/lynx/po/de.po b/gnu/usr.bin/lynx/po/de.po new file mode 100644 index 00000000000..be47a1c8b22 --- /dev/null +++ b/gnu/usr.bin/lynx/po/de.po @@ -0,0 +1,31 @@ +# +# Sat Aug 22 18:47:32 EDT 1998 +# +msgid "" +msgstr "" +"Date: 1998-08-22 16:12:20-0400\n" +"From: Webmaster Jim \n" +"Content-Type: text/plain; charset=\n" +"Files: src/LYMain.c\n" + +#: src/LYMain.c:2507 +#, c-format +msgid "%s Version %s %s" +msgstr "%s Programmversion %s %s" + +#: src/LYMain.c:2509 +#, c-format +msgid "Copyrights held by the University of Kansas, CERN, and other contributors.\n" +msgstr "Copyright hielt durch die Universität von Kansas, von CERN und von anderen Mitwirkenden an.\n" + +#: src/LYMain.c:2511 +msgid "Distributed under the GNU General Public License.\n" +msgstr "Verteilt unter die GNU-Öffentlichkeit Lizenz\n" + +#: src/LYMain.c:2508 +msgid "" +"See http://lynx.browser.org/ and the online help for more information.\n" +"\n" +msgstr "Sehen Sie http://lynx.browser.org / und die On-line Hilfe zu mehr Information.\n" +"\n" + diff --git a/gnu/usr.bin/lynx/po/es.po b/gnu/usr.bin/lynx/po/es.po new file mode 100644 index 00000000000..d1e1193c4a9 --- /dev/null +++ b/gnu/usr.bin/lynx/po/es.po @@ -0,0 +1,27 @@ +msgid "" +msgstr "" +"Date: 1998-08-22 16:12:20-0400\n" +"From: Webmaster Jim \n" +"Content-Type: text/plain; charset=\n" +"Xgettext-Options: --default-domain=po/de\n" +"Files: src/LYMain.c\n" + +#: src/LYMain.c:2502 +msgid "%s Version %s %s" +msgstr "%s Versión %s" + +#: src/LYMain.c:2504 +msgid "Copyrights held by the University of Kansas, CERN, and other contributors.\n" +msgstr "El copyright sostuvo al lado de la universidad de Kansas, de la CERN, y de otros contribuidores.\n" + +#: src/LYMain.c:2506 +msgid "Distributed under the GNU General Public License.\n" +msgstr "Distribuido bajo la licencia el público en general de GNU.\n" + +#: src/LYMain.c:2508 +msgid "" +"See http://lynx.browser.org/ and the online help for more information.\n" +"\n" +msgstr "" +"Vea http://lynx.browser.org/ y la ayuda en línea para más información.\n" +"\n" diff --git a/gnu/usr.bin/lynx/po/fr.po b/gnu/usr.bin/lynx/po/fr.po new file mode 100644 index 00000000000..6b6b950be7f --- /dev/null +++ b/gnu/usr.bin/lynx/po/fr.po @@ -0,0 +1,7827 @@ +msgid "Prompt" +msgstr "Confirmer" + +msgid "Unable to open temporary file for deletion of link." +msgstr "Impossible d'ouvrir le fichier temporaire pour supprimer un lien" + +msgid "change permissions of your files on Community Net" +msgstr "TR=change permissions of your files on Community Net" + +msgid "NeXT character set " +msgstr "Jeu de car. NeXT " + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# The French translations for Lynx were created by the +# Chebucto Project. +# Contributors include: +# Chris Maxwell (CM) +# David Potter +# David Trueman (NdT) +# * * * * * * * * * * +# J.E. Spath wedged this into Lynx +# started: Wed Sep 2 20:22:45 EDT 1998 +# +# , fuzzy +# MUST GO AND FIND NdT= to address problems. +msgid "yes" +msgstr "oui" + +msgid "no" +msgstr "non" + +msgid " (p %d of %d)" +msgstr " (p %d de %d)" + +# WWW/Library/Implementation/HTFormat.c +msgid "Read %d KB of data. %s" +msgstr "Lecture de %d kilooctets de données. %s" + +msgid "(Press 'z' if you want to abort loading.)" +msgstr "(Appuyer sur 'z' pour interrompre le chargement.)" + +msgid "

                You have reached the Visited Links Page

                \n" +msgstr "

                Vous avez accédé à la Page des liens activés

                \n" + +msgid "list the references (links) in the current document" +msgstr "afficher la liste des références du document ouvert" + +msgid "Unable to get status of '%s' " +msgstr "Impossible d'obtenir l'état de '%s' " + +msgid "Unable to determine status of '%s'. " +msgstr "Impossible de déterminer l'état de '%s'. " + +msgid "Unable to get status of '%s'. " +msgstr "Impossible d'obtenir l'état de '%s'. " + +msgid "Executing %s " +msgstr "Exécution de la commande %s " + +msgid "Current directory is %s
                \n" +msgstr "Le répertoire courant est %s
                \n" + +msgid "Current selection is %s

                \n" +msgstr "La sélection courante est %s

                \n" + +msgid "Nothing currently selected.

                \n" +msgstr "Il n'y a rien de sélectionné.

                \n" + +# msgid "Current selection is %d tagged item%s" +# msgstr "La sélection courante est %d article(s) marqué(s):" +msgid "Current selection is %d tagged items" +msgstr "La sélection courante est %d articles marqués" + +# Following added for Blue Skies Modifications. +msgid " -exit=EXITPROG program to exec on exit\n" +msgstr " -exit=EXITPROG programme à exécuter en quittant\n" + +msgid " (HEAD)" +msgstr " (HEAD)" + +# Now, here they changed the text a bit. +# Lines 7,8 added ("# and the corr...) +# Lines 11-18 ("# If keypad mode.... Enumerate Form Inputs") +# Lines 20,21 replace the last line in the old version +msgid "" +"# If keypad_mode is set to \"NUMBERS_AS_ARROWS\", then the numbers on\n" +"# your keypad when the numlock is on will act as arrow keys:\n" +"# 8 = Up Arrow\n" +"# 4 = Left Arrow 6 = Right Arrow\n" +"# 2 = Down Arrow\n" +"# and the corresponding keyboard numbers will act as arrow keys,\n" +"# regardless of whether numlock is on.\n" +"# If keypad_mode is set to \"LINKS_ARE_NUMBERED\", then numbers will\n" +"# appear next to each link and numbers are used to select links.\n" +"# If keypad_mode is set to \"LINKS_AND_FORM_FIELDS_ARE_NUMBERED\", then\n" +"# numbers will appear next to each link and visible form input field.\n" +"# Numbers are used to select links, or to move the \"current link\" to a\n" +"# form input field or button. In addition, options in popup menus are\n" +"# indexed so that the user may type an option number to select an option in\n" +"# a popup menu, even if the option isn't visible on the screen. Reference\n" +"# lists and output from the list command also enumerate form inputs.\n" +"# NOTE: Some fixed format documents may look disfigured when\n" +"# \"LINKS_ARE_NUMBERED\" or \"LINKS_AND_FORM_FIELDS_ARE_NUMBERED\" are\n" +"# enabled.\n" +msgstr "" +"# TR = If keypad_mode is set to \"NUMBERS_AS_ARROWS\", then the numbers on\n" +"# your keypad when the numlock is on will act as arrow keys:\n" +"# 8 = Up Arrow\n" +"# 4 = Left Arrow 6 = Right Arrow\n" +"# 2 = Down Arrow\n" +"# and the corresponding keyboard numbers will act as arrow keys,\n" +"# regardless of whether numlock is on.\n" +"# If keypad_mode is set to \"LINKS_ARE_NUMBERED\", then numbers will\n" +"# appear next to each link and numbers are used to select links.\n" +"# If keypad_mode is set to \"LINKS_AND_FORM_FIELDS_ARE_NUMBERED\", then\n" +"# numbers will appear next to each link and visible form input field.\n" +"# Numbers are used to select links, or to move the \"current link\" to a\n" +"# form input field or button. In addition, options in popup menus are\n" +"# indexed so that the user may type an option number to select an option in\n" +"# a popup menu, even if the option isn't visible on the screen. Reference\n" +"# lists and output from the list command also enumerate form inputs.\n" +"# NOTE: Some fixed format documents may look disfigured when\n" +"# \"LINKS_ARE_NUMBERED\" or \"LINKS_AND_FORM_FIELDS_ARE_NUMBERED\" are\n" +"# enabled.\n" + +msgid "Really exit from Lynx? [N] " +msgstr "Vous voulez vraiment quitter Lynx? [N]" + +msgid "UNMODIFIABLE form text field. Use UP or DOWN arrows or tab to move off. " +msgstr "Utilisez les touches HAUT/BAS ou le tabulateur pour vous déplacer" + +msgid "(Form submit button) Use right-arrow or to submit ('x' for no cache)." +msgstr "Touche DROITE ou pour confirmer («x» : nouvelle instance)" + +msgid "The resource requested is not available at this time." +msgstr "La ressource demandée n'est pas disponible en ce moment." + +msgid "URL: %s" +msgstr "l'URL : %s" + +msgid "Unable to access WWW file!!!" +msgstr "Impossible d'accéder au fichier W3!" + +msgid "Currently viewing document source. Press '\\' to return to rendered version." +msgstr "Vous visualisez le code source. Faites '\\' pour la version hypertexte" + +msgid "H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list \n" +msgstr "H) Accueil S) Paramètres P) Imprimer G) Aller M)Départ Q)uitter /=chercher [Y]=Historique\n" + +# NOVICE_LINE_TWO_A +msgid " O)ther cmds G)o to P)rint B)ack H)ome page C)omment ^L)Refresh Q)uit\n" +msgstr " O) Commandes G) Aller B) PagePréc H) Accueil C)ommenter ^L) Rafraîchir Q)uitter\n" + +# NOVICE_LINE_TWO_B +# msgid " O)ther cmds E)dit S)ettings W)hereis N)ext D)ownload U)pload \n" +# msgid " O)ther cmds E)dit S)ettings W)hereis N)ext D)ownload U)pload L)ist \n" +msgid " O)ther cmds E)dit S)ettings W)hereis N)ext D)ownload U)pload \n" +msgstr " O) Commandes S) Paramètres W) Recherche N) Suivant D) Décharger U) Charger\n" + +# NOVICE_LINE_TWO_C +msgid " O)ther cmds K)eymap ^R)eload histor(Y) Bookmarks: v)iew, A)dd, R)emove\n" +msgstr " O) Commandes K) Clavier ^R) Recharger Signets: v)oir A)jouter R) Suppr\n" + +# NOVICE_LINE_TWO_D +# msgid " O)ther cmds I)P list V)isited links Z)ap transfer \n" +# msgid " O)ther cmds E)dit I)P list L)ist links V)isited links Z)ap transfer \n" +msgid " O)ther cmds I)P list V)isited links L)ist links Z)ap transfer \n" +msgstr " O) Commandes E) Éditer Y) Historique P) Imprimer L) Références \n" + +# NOVICE_LINE_TWO_E +msgid " O)ther cmds k)eymap \n" +msgstr " O) Commandes I) Liste IP V) Liens activés \n" + +msgid "Mailto form submission Cancelled!!!" +msgstr "Envoi du formulaire mailto annulé!" + +msgid "You cannot download a input field." +msgstr "Impossible de décharger une zone de saisie" + +msgid "You cannot download an permit option." +msgstr "Impossible de télédécharger une option de permission." + +msgid "No random URLs have been used thus far." +msgstr "Aucun URL arbitraire n'a encore été utilisé." + +# !!! becomes +msgid "" +"# preferred_charset specifies the character set in MIME notation (e.g.,\n" +"# ISO-8859-2, ISO-8859-5) which Lynx will indicate you prefer in requests\n" +"# to http servers using an Accept-Charset header. The value should NOT\n" +"!# include ISO-8859-1 or US-ASCII, since those values are always assumed\n" +"!# by default. May be a comma-separated list.\n" +"!# If a file in that character set is available, the server will send it.\n" +"!# If no Accept-Charset header is present, the default is that any\n" +"!# character set is acceptable. If an Accept-Charset header is present,\n" +"!# and if the server cannot send a response which is acceptable\n" +"!# according to the Accept-Charset header, then the server SHOULD send\n" +"!# an error response, though the sending of an unacceptable response\n" +"!# is also allowed.\n" +msgstr "" +"# preferred_charset specifies the character set in MIME notation (e.g.,\n" +"# ISO-8859-2, ISO-8859-5) which Lynx will indicate you prefer in requests\n" +"# to http servers using an Accept-Charset header. The value should NOT\n" +"# include ISO-8859-1 or US-ASCII, since those values are always assumed\n" +"# by default. May be a comma-separated list.\n" +"# If a file in that character set is available, the server will send it.\n" +"# If no Accept-Charset header is present, the default is that any\n" +"# character set is acceptable. If an Accept-Charset header is present,\n" +"# and if the server cannot send a response which is acceptable\n" +"# according to the Accept-Charset header, then the server SHOULD send\n" +"# an error response, though the sending of an unacceptable response\n" +"# is also allowed.\n" + +# ! ! ! Becomes +msgid "" +"Syntax Error parsing COLOR in configuration file:\n" +"The line must be of the form:\n" +"COLOR:INTEGER:FOREGROUND:BACKGROUND\n" +"\n" +"!Here FOREGROUND and BACKGROUND must be one of:\n" +"!The special strings 'nocolor' or 'default', or\n" +msgstr "" +"Syntax Error parsing COLOR in configuration file:\n" +"The line must be of the form:\n" +"COLOR:INTEGER:FOREGROUND:BACKGROUND\n" +"\n" +"!Here FOREGROUND and BACKGROUND must be one of:\n" +"!The special strings 'nocolor' or 'default', or\n" + +msgid "Unable to open bookmark file for deletion of link." +msgstr "Impossible d'ouvrir le fichier de signets pour supprimer un lien" + +msgid "Zip and download all tagged files." +msgstr "Compresser et décharger tous les fichiers marqués." + +msgid "display and manipulate your files on Community Net" +msgstr "TR=display and manipulate your files on Community Net" + +msgid "(of selected file)" +msgstr "(de la sélection courante)" + +# ---------------------- 97-Dec-29 +msgid "File is not in a publically accessable area." +msgstr "TR=File is not in a publically accessable area." + +msgid "Cancel" +msgstr "Annul" + +msgid "Always" +msgstr "Toujours" + +msgid "neVer" +msgstr "Jamais" + +# NOTE: I will have to get you an example text. +# +# Example: +# csuite.chebucto.ns.ca cookie: Status=Active+Requests Allow? (Y/N/Always/neVer +# ie cookie: = Allow? +# Ndt: Yes! The word order might be different... +# NdT: Can you make the system accept the O, N, T, J commands? +msgid "%s cookie: %.*s=%.*s Allow? (Y/N/Always/neVer)" +msgstr "cookie de %s : %.*s=%.*s Accepter? (O/N/Toujours/Jamais)" + +msgid "" +" USAGE: lynx -restrictions=[option][,option][,option]\n" +" List of Options:\n" +" all restricts all options.\n" +" bookmark disallow changing the location of the bookmark file.\n" +" bookmark_exec disallow execution links via the bookmark file\n" +" change_exec_perms disallow changing the eXecute permission on files\n" +" (but still allow it for directories) when local file\n" +" management is enabled.\n" +" default same as commandline option -anonymous. Disables\n" +" default services for anonymous users. Currently set to,\n" +" all restricted except for: inside_telnet, outside_telnet,\n" +" inside_news, inside_ftp, outside_ftp, inside_rlogin,\n" +" outside_rlogin, goto, jump and mail. Defaults\n" +" are settable within userdefs.h\n" +" dired_support disallow local file management\n" +" disk_save disallow saving to disk in the download and print menus\n" +" dotfiles disallow access to, or creation of, hidden (dot) files\n" +" download disallow downloaders in the download menu\n" +" editor disallow editing\n" +" exec disable execution scripts\n" +" exec_frozen disallow the user from changing the execution link\n" +" externals disable passing URLs to external programs\n" +" file_url disallow using G)oto, served links or bookmarks for\n" +" file: URL's\n" +" goto disable the 'g' (goto) command\n" +" inside_ftp disallow ftps for people coming from inside your\n" +" domain (utmp required for selectivity)\n" +" inside_news disallow USENET news posting for people coming from\n" +" inside your domain (utmp required for selectivity)\n" +" inside_rlogin disallow rlogins for people coming from inside your\n" +" domain (utmp required for selectivity)\n" +" inside_telnet disallow telnets for people coming from inside your\n" +" domain (utmp required for selectivity)\n" +" inside_ftp disallow ftps for people coming from inside your domain\n" +" inside_news disallow USENET news posting for people coming from inside\n" +" your domain\n" +" inside_rlogin disallow rlogins for people coming from inside your domain\n" +" inside_telnet disallow telnets for people coming from inside your domain\n" +" jump disable the 'j' (jump) command\n" +" mail disallow mail\n" +" multibook disallow multiple bookmark files\n" +" news_post disallow USENET News posting.\n" +" option_save disallow saving options in .lynxrc\n" +" outside_ftp disallow ftps for people coming from outside your\n" +" domain (utmp required for selectivity)\n" +" outside_news disallow USENET news posting for people coming from\n" +" outside your domain (utmp required for selectivity)\n" +" outside_rlogin disallow rlogins for people coming from outside your\n" +" domain (utmp required for selectivity)\n" +" outside_telnet disallow telnets for people coming from outside your\n" +" domain (utmp required for selectivity)\n" +" outside_ftp disallow ftps for people coming from outside your domain\n" +" outside_news disallow USENET news posting for people coming from outside\n" +" your domain\n" +" outside_rlogin disallow rlogins for people coming from outside your domain\n" +" outside_telnet disallow telnets for people coming from outside your domain\n" +" print disallow most print options\n" +" shell disallow shell escapes, and lynxexec, lynxprog or lynxcgi\n" +" G)oto's\n" +" suspend disallow Control-Z suspends with escape to shell\n" +" telnet_port disallow specifying a port in telnet G)oto's\n" +" useragent disallow modifications of the User-Agent header\n" +msgstr "" +" USAGE: lynx -restrictions=[option][,option][,option]\n" +" List of Options:\n" +" all restricts all options.\n" +" bookmark disallow changing the location of the bookmark file.\n" +" bookmark_exec disallow execution links via the bookmark file\n" +" change_exec_perms disallow changing the eXecute permission on files\n" +" (but still allow it for directories) when local file\n" +" management is enabled.\n" +" default same as commandline option -anonymous. Disables\n" +" default services for anonymous users. Currently set to,\n" +" all restricted except for: inside_telnet, outside_telnet,\n" +" inside_news, inside_ftp, outside_ftp, inside_rlogin,\n" +" outside_rlogin, goto, jump and mail. Defaults\n" +" are settable within userdefs.h\n" +" dired_support disallow local file management\n" +" disk_save disallow saving to disk in the download and print menus\n" +" dotfiles disallow access to, or creation of, hidden (dot) files\n" +" download disallow downloaders in the download menu\n" +" editor disallow editing\n" +" exec disable execution scripts\n" +" exec_frozen disallow the user from changing the execution link\n" +" externals disable passing URLs to external programs\n" +" file_url disallow using G)oto, served links or bookmarks for\n" +" file: URL's\n" +" goto disable the 'g' (goto) command\n" +" inside_ftp disallow ftps for people coming from inside your\n" +" domain (utmp required for selectivity)\n" +" inside_news disallow USENET news posting for people coming from\n" +" inside your domain (utmp required for selectivity)\n" +" inside_rlogin disallow rlogins for people coming from inside your\n" +" domain (utmp required for selectivity)\n" +" inside_telnet disallow telnets for people coming from inside your\n" +" domain (utmp required for selectivity)\n" +" inside_ftp disallow ftps for people coming from inside your domain\n" +" inside_news disallow USENET news posting for people coming from inside\n" +" your domain\n" +" inside_rlogin disallow rlogins for people coming from inside your domain\n" +" inside_telnet disallow telnets for people coming from inside your domain\n" +" jump disable the 'j' (jump) command\n" +" mail disallow mail\n" +" multibook disallow multiple bookmark files\n" +" news_post disallow USENET News posting.\n" +" option_save disallow saving options in .lynxrc\n" +" outside_ftp disallow ftps for people coming from outside your\n" +" domain (utmp required for selectivity)\n" +" outside_news disallow USENET news posting for people coming from\n" +" outside your domain (utmp required for selectivity)\n" +" outside_rlogin disallow rlogins for people coming from outside your\n" +" domain (utmp required for selectivity)\n" +" outside_telnet disallow telnets for people coming from outside your\n" +" domain (utmp required for selectivity)\n" +" outside_ftp disallow ftps for people coming from outside your domain\n" +" outside_news disallow USENET news posting for people coming from outside\n" +" your domain\n" +" outside_rlogin disallow rlogins for people coming from outside your domain\n" +" outside_telnet disallow telnets for people coming from outside your domain\n" +" print disallow most print options\n" +" shell disallow shell escapes, and lynxexec, lynxprog or lynxcgi\n" +" G)oto's\n" +" suspend disallow Control-Z suspends with escape to shell\n" +" telnet_port disallow specifying a port in telnet G)oto's\n" +" useragent disallow modifications of the User-Agent header\n" + +# ------------------------------------------------------------------------------ +# Following Added for completeness, but will never appear on CSuite +# as they only appear on the command line. Will get done "when there is time." +# +msgid "" +"Copyrights held by the University of Kansas, CERN, and other contributors.\n" +"Distributed under the GNU General Public License.\n" +"See http://lynx.browser.org/ and the online help for more information.\n" +"\n" +msgstr "" +"Copyrights held by the University of Kansas, CERN, and other contributors.\n" +"Distributed under the GNU General Public License.\n" +"See http://lynx.browser.org/ and the online help for more information.\n" +"\n" + +msgid "(*) Additional options are available in Advanced User Mode" +msgstr "(*) Options supplémentaires disponibles en mode utilisateur avancé" + +msgid "Help" +msgstr "Aide" + +# src/LYOptions.c: David Potter's Mods +msgid "User Options" +msgstr "Options utilisateur" + +msgid "Color config line too long" +msgstr "Ligne de configuration des couleurs trop longue" + +# src/LYPrint.c +msgid " Ok..." +msgstr " Ok..." + +msgid "Show cursor: " +msgstr "Afficher le curseur : " + +msgid "You are already at main screen!" +msgstr "Vous êtes déjà à l'écran principal." + +msgid "Show color: " +msgstr "Afficher les couleurs : " + +msgid "Follow link number: " +msgstr "Activer le lien numéro : " + +# LYOptions.c/h +msgid "Assume charset if unknown :" +msgstr "Lynx assume que le jeu de caractère est inconnu :" + +msgid "" +"\n" +"\n" +" Please enter your message below.\n" +" When you are done, press enter and put a single period (.)\n" +" on a line and press enter again." +msgstr "" +"\n" +"\n" +" Veuillez entrer votre message ci-après.\n" +" Une fois terminé, faites Entr et tapez un simple point (.)\n" +" sur une ligne, puis faites Entr de nouveau." + +msgid "Change File Access Menu Not Available\n" +msgstr "Menu de changement de permission d'accès non disponible\n" + +msgid "-index- %s" +msgstr "-index- %s" + +msgid "-more- %s" +msgstr "-suite- %s" + +msgid "" +"\n" +"%s Version %s (1997)\n" +msgstr "" +"\n" +"%s version %s (1997)\n" + +msgid "(internal) " +msgstr "(interne) " + +msgid "in " +msgstr "dans " + +msgid "Used an invalid Shell Character: (&, `, |, ;)" +msgstr "TR=Used an invalid Shell Character: (&, `, |, ;)" + +msgid "Japanese (SJIS) " +msgstr "Japonais (SJIS) " + +msgid "

                Comment: %s\n" +msgstr "
                Commentaire : %s\n" + +# _("
                CommentURL: %s\n"), +# Address, +# Title) +msgid "
                CommentURL: %s\n" +msgstr "
                CommenterURL : %s\n" + +msgid "
                PortList=\"%s\"\n" +msgstr "
                Liste de ports=\"%s\"\n" + +msgid "[IMAGE]-Submit" +msgstr "[IMAGE]-Envoyer" + +msgid "Submit" +msgstr "Envoyer" + +# If Submit and [IMAGE]-Submit buttons appear, see GridText.c:6635, and HTML.c:4882 +msgid "Reset:" +msgstr "Effacer :" + +msgid "" +"\n" +"\n" +"Error drawing page!\n" +"Bad HText structure!\n" +msgstr "" +"\n" +"\n" +"Impossible de générer la page.\n" +"Structure HText erronée.\n" + +msgid "" +"\n" +"\n" +"Error accessing document.\n" +"No data available.\n" +msgstr "" +"\n" +"\n" +"Erreur d'accès au document.\n" +"Aucune donnée disponible.\n" + +msgid "Memory exhausted, will interrupt transfer" +msgstr "Mémoire insuffisante; le transfert sera interrompu" + +msgid "" +"HTTP: Proxy authorization required.\n" +" Use the -pauth=id:pw parameter.\n" +msgstr "" +"HTTP : autorisation du mandataire requise.\n" +" Utiliser le paramètre -pauth=id:pw.\n" + +msgid "Title: " +msgstr "Titre : " + +msgid "Got redirection to a proxy from the proxy!" +msgstr "Réacheminement vers un mandataire depuis le mandataire!" + +msgid "Read %d uncompressed KB of data. %s(Press 'z' to abort.)" +msgstr "Lecture de %d Ko de données décompressées. %s(Appuyer sur 'z' pour annuler.)" + +# WWW/Library/Implementation/HTFormat.c +msgid "Read %d uncompressed bytes of data." +msgstr "Lecture de %d octets de données décompressées." + +# WWW/Libary/Implementation/HTFile.c +msgid "Could not open file for decompression!" +msgstr "Impossible d'ouvrir le fichier pour décompression." + +msgid "This client doesn't know how to compose proxyauthorization information for scheme" +msgstr "Ce client ne sait pas comment composer l'informationd'autorisation du mandataire pour le schème d'adressage" + +# replaces: +msgid "Enter username for %s at %s:" +msgstr "Nom d'utilisateur pour %s à %s : " + +msgid "Convert DOS file" +msgstr "Conversion de fichier DOS" + +msgid "Convert Mac file" +msgstr "Conversion de fichier Mac" + +msgid "HTML check" +msgstr "Vérificateur HTML" + +msgid "Spell check" +msgstr "Vérificateur d'orthographe" + +msgid "Remove File" +msgstr "Supprimer le fichier" + +msgid "Ftp access is disabled!" +msgstr "L'accès FTP est désactivé." + +msgid "Unable to open command file." +msgstr "Impossible d'ouvrir le fichier de commande." + +# following are from F)ull menu +msgid "Modify File Name" +msgstr "Modifier le nom du fichier" + +msgid ", execute" +msgstr ", exécuter" + +msgid ", search" +msgstr ", rechercher" + +msgid "Mailing file. Please wait..." +msgstr "Envoi du fichier. Veuillez attendre..." + +msgid ", write" +msgstr ", écrire" + +msgid "File is %d pages long. Are you sure you want to print? [y]" +msgstr "Le fichier représente %d pages. Vous voulez l'inmprimer? [o]" + +msgid "Please enter a valid internet mail address: " +msgstr "Veuillez entrer une adresse de courrier Internet valide : " + +msgid "Hit return to accept entered data." +msgstr "Faites pour confirmer." + +msgid "Hit return to accept entered data. Delete data to invoke the default." +msgstr " pour confirmer; pour revenir à la valeur par défaut." + +msgid "Hit any key to change value; RETURN to accept: " +msgstr "N'importe quelle touche pour changer la valeur; pour accepter." + +# I would need contect I guess here +# It can be lire, lisez, even lecture... depending the context +msgid ", read" +msgstr ", lecture" + +msgid " World: " +msgstr " Global : " + +msgid " Group: " +msgstr " Groupe : " + +msgid "Write" +msgstr "Écriture" + +# following refer to file permissions +msgid "Read" +msgstr "Lecture" + +msgid "IP or Interest group (? for list): " +msgstr "IP ou groupe d'intérêt (? pour la liste) : " + +msgid "Using Zmodem" +msgstr "Utiliser Zmodem" + +msgid "Using Kermit" +msgstr "Utiliser Kermit" + +msgid "ADVANCED" +msgstr "AVANCÉ" + +msgid "ALWAYS OFF " +msgstr "TOUJOURS DÉSACTIVÉ " + +msgid "ALWAYS ON " +msgstr "TOUJOURS ACTIVÉ " + +msgid "Advanced " +msgstr "Avancé " + +msgid "By Date " +msgstr "Date " + +# msgid "By Filename" +# msgstr "Nom de fichier" +msgid "By Size " +msgstr "Volume " + +msgid "By Type " +msgstr "Type " + +msgid "CASE INSENSITIVE " +msgstr "AUCUNE DISTINCT. MAJ/MIN" + +msgid "CASE SENSITIVE " +msgstr "DISTINCTION MAJ/MIN " + +msgid "Directories first" +msgstr "Répertoires d'abord" + +# msgid "FOR LOCAL FILES ONLY" +# msgstr "POUR FICHIERS LOCAUX UNIQUEMENT" +msgid "Files first " +msgstr "Fichiers d'abord " + +# msgid "Intermediate" +# msgstr "Intermédiaire" +msgid "Links are numbered " +msgstr "Les liens sont numérotés " + +msgid "Mixed style " +msgstr "Style mixte " + +msgid "NONE" +msgstr "AUCUN(E)" + +msgid "Novice " +msgstr "Novice " + +msgid "Numbers act as arrows" +msgstr "Chiffres comme touches fléchées" + +msgid "OFF " +msgstr "DÉSACTIVÉ " + +msgid "OFF" +msgstr "DÉSACTIVÉ" + +msgid "ON " +msgstr "ACTIVÉ " + +msgid "STANDARD" +msgstr "STANDARD" + +msgid "Remove Directory" +msgstr "Supprimer le répertoire" + +# msgid "

                You have reached the Visited Links Page

                \n" +# msgstr "

                Vous avez accédé à la Page des liens activés

                \n" +# msgid "Lynx Visited Links Page" +# msgstr "Lynx - Page des liens activés" +# msgid "You are sending a comment to:\n " +# msgstr "Vous envoyez maintenant un commentaire à : " +# msgid "The Cookie Jar is empty." +# msgstr "Le fichier des «cookies» est vide" +# msgid "Lynx Cookie Jar" +# msgstr "Lynx - Page des «cookies»" +# msgid "You have reached the Lynx Cookie Jar Page" +# msgstr "Vous avez accédé à la Page des «cookies»" +msgid "Modify Directory Name" +msgstr "Modifier le nom du répertoire" + +msgid "
                     URL: %s\n" +msgstr "
                     URL : %s\n" + +msgid "Resubmit POST content to %s ?" +msgstr "Ré-envoyer le contenu POST vers %s ?" + +msgid "mode:" +msgstr "Mode :" + +msgid "
                    mode: %s\n" +msgstr "
                    Mode : %s\n" + +# msgid "Failed to obtain status of current link!" +# msgstr "Impossible d'obtenir l'état du lien actif!" +msgid "Shortcut (? for list) or URL: " +msgstr "Raccourci (? pour la liste) ou URL : " + +msgid "Current directory is " +msgstr "Le répertoire courant est " + +msgid " directory" +msgstr " répertoire" + +msgid "forms mode" +msgstr "mode formulaires" + +msgid "normal" +msgstr "normal" + +# Whatever it means! Could not figure what what it +# was safe to do. +msgid ", safe" +msgstr ", sécuritaire" + +msgid ", internal link" +msgstr ", lien interne" + +msgid "(email)" +msgstr "(courriel)" + +msgid "
                  Action: %s\n" +msgstr "
                  Action : %s\n" + +# msgid "
                Filename: %s\n" +# msgstr "
                Nom de fichier : %s\n" +# END of INFO page +# Following are from the file browser/F)ull menu +msgid "(in current directory)" +msgstr "(dans le répertoire courant)" + +msgid "(of current selection)" +msgstr "(sélection courante)" + +# msgstr "(la sélection courante)" +# RC/CM 97-Dec-07 for File Browser Options: "Installer (la selection)..." +# msgstr "(de la sélection courante)" +msgid "(current selection)" +msgstr "(sélection courante)" + +msgid "(using zip)" +msgstr "(zip)" + +msgid "(using Unix compress)" +msgstr "(compression Unix)" + +msgid "(using GNU gzip)" +msgstr "(gzip)" + +msgid "(using gzip)" +msgstr "(gzip)" + +# END of the file browser/F)ull menu +# Following are from the File browser +msgid "Welcome" +msgstr "Bienvenue" + +msgid "Up to " +msgstr "jusqu'à " + +msgid "Access is not permitted for this path." +msgstr "L'accès n'est pas permis pour ce chemin." + +msgid "Directory browsing is not allowed." +msgstr "La lecture du répertoire n'est pas permise." + +msgid "Selective access is not enabled for this directory" +msgstr "L'accès sélectif n'est pas activé pour ce répertoire." + +# msgid "Directory browsing is not allowed." +# msgstr "La lecture du répertoire n'est pas permise." +# msgid "Selective access is not enabled for this directory" +# msgstr "L'accès sélectif n'est pas activé pour ce répertoire." +msgid "This directory is not readable." +msgstr "Ce répertoire ne peut être lu." + +msgid "Directories:" +msgstr "Répertoires :" + +msgid "Subdirectories:" +msgstr "Sous-répertoires :" + +msgid "Files" +msgstr "Fichiers" + +# msgid "Files:" +# msgstr "Fichiers :" +msgid "Empty Directory" +msgstr "Répertoire vide" + +msgid "Can't access requested file." +msgstr "Impossible d'accéder au fichier requis." + +# END of the File browser +# Following are from the K)eymap +msgid "Up Arrow" +msgstr "Haut" + +msgid "Down Arrow" +msgstr "Bas" + +msgid "Right Arrow" +msgstr "Droite" + +msgid "Left Arrow" +msgstr "Gauche" + +msgid "Page Down" +msgstr "DéfilBas" + +msgid "Page Up" +msgstr "DéfilHaut" + +msgid "Home" +msgstr "Début" + +msgid "End" +msgstr "Fin" + +msgid "Do key" +msgstr "«Do»" + +msgid "Find key" +msgstr "«Find»" + +msgid "Select key" +msgstr "«Select»" + +msgid "Insert key" +msgstr "Inser" + +msgid "Remove key" +msgstr "Suppr" + +msgid "<tab> " +msgstr "<Tab> " + +msgid "<Enter> " +msgstr "<Entr> " + +msgid "<space> " +msgstr "<Esp> " + +msgid "<delete> " +msgstr "<Suppr> " + +# msgid "Sorry, no known way of converting %s to %s." +# msgstr "Désolé, impossible de convertir %s à %s" +msgid "Unknown target '%s'" +msgstr "Cible inconnue «%s»" + +# Only "Read" should be translated +msgid " Read
                \n" +msgstr " Lecture
                \n" + +# Only "Write" should be translated +msgid " Write
                \n" +msgstr " Écriture
                \n" + +# The X permission on directories allows traversal or search of that directory +msgid "Search" +msgstr "Recherche" + +# the X permission on a file allows that file to be executed as a program +msgid "Execute" +msgstr "Exécution" + +# Only "Read" should be translated +msgid " Read
                \n" +msgstr " Lecture
                \n" + +# Only "Write" should be translated +msgid " Write
                \n" +msgstr " Écriture
                \n" + +# Only "Read" should be translated +msgid " Read
                \n" +msgstr " Lecture
                \n" + +# Only "Write" should be translated +msgid " Write
                \n" +msgstr " Écriture
                \n" + +msgid "directory" +msgstr "répertoire" + +msgid "Directory: " +msgstr "Répertoire : " + +msgid "file" +msgstr "fichier" + +# msgid "Read %d bytes of data." +# msgstr "Lecture de %d octets de données" +msgid "Read %d of %d bytes of data." +msgstr "Lecture de %d de %d octets de données" + +# Strings from LYOptions.h - modified for form for settings page +msgid "Editor: " +msgstr "Éditeur : " + +msgid "Display Variable: " +msgstr "Variable d'affichage : " + +msgid "Bookmark file: " +msgstr "Fichier de signets : " + +msgid "Personal mail address: " +msgstr "Adresse de courriel : " + +msgid "Line edit style: " +msgstr "Style d'édition de ligne : " + +msgid "User mode: " +msgstr "Mode utilisateur : " + +msgid "User agent: " +msgstr "Agent utilisateur : " + +msgid "Raw 8-bit or CJK mode: " +msgstr "Mode 8-bit ou CJK : " + +msgid "Preferred document language: " +msgstr "Langue préférée : " + +msgid "Preferred document charset: " +msgstr "Jeu de caractères préféré : " + +msgid "Multiple Bookmarks: " +msgstr "Signets multiples : " + +msgid "FTP sort criteria: " +msgstr "Critères de tri FTP : " + +msgid "Search type: " +msgstr "Type de recherche : " + +msgid "Character set: " +msgstr "Jeu de caractères : " + +msgid "Popups for selected field: " +msgstr "Menus-éclair pour sélections : " + +msgid "Keypad Mode: " +msgstr "Bloc numérique : " + +msgid "Vi keys: " +msgstr "Touches vi : " + +msgid "Emacs keys: " +msgstr "Touches emacs" + +msgid "Show dot files: " +msgstr "Montrer les fichiers cachés : " + +msgid "[Review bookmarks]" +msgstr "[Revoir les signets]" + +# msgid "ADVANCED" +# msgstr "AVANCÉ" +# msgid "STANDARD" +# msgstr "STANDARD" +# msgid "By Filename" +# msgstr "Nom de fichier" +# msgid "By Size " +# msgstr "Taille " +# msgid "By Type " +# msgstr "Type " +# msgid "By Date " +# msgstr "Date " +# msgid "OFF" +# msgstr "ACTIVÉ " +# msgid "ON " +# msgstr "DÉSACTIVÉ" +msgid "CASE SENSITIVE " +msgstr "DISTINCTION MAJ/MIN " + +msgid "CASE INSENSITIVE" +msgstr "AUCUNE DISTINCT. MAJ/MIN" + +# msgid "Numbers act as arrows" +# msgstr "Les chiffres servent de touches fléchées" +# msgid "Numbers act as arrows " +# msgstr "Les chiffres servent de touches fléchées" +# msgid "Links are numbered " +# msgstr "Les liens sont numérotés " +# msgid "Links are numbered " +# msgstr "Les liens sont numérotés " +msgid "Links and form fields are numbered" +msgstr "Les liens et les champs des formulaires sont numérotés" + +msgid "List directory style: " +msgstr "Liste de répertoires : " + +# msgid "Files first " +# msgstr "Fichiers d'abord " +# msgid "Mixed style " +# msgstr "Style mixte " +# msgid "Directories first " +# msgstr "Répertoires d'abord " +msgid "NOVICE " +msgstr "NOVICE " + +msgid "INTERMEDIATE" +msgstr "INTERMÉDIAIRE" + +msgid "Local execution links: " +msgstr "Liens exécutables locaux : " + +# msgid "ALWAYS ON " +# msgstr "TOUJOURS ACTIVÉ " +# msgid "FOR LOCAL FILES ONLY" +# msgstr "FICHIERS LOCAUX SEULEMENT" +# msgid "ALWAYS OFF " +# msgstr "TOUJOURS DÉSACTIVÉ " +msgid "ALWAYS " +msgstr "TOUJOURS " + +msgid "Always Try" +msgstr "Toujours essayer" + +msgid "NEVER " +msgstr "JAMAIS " + +msgid "[Reset to last saved values]" +msgstr "[Remettre les dernières valeurs enregistrées]" + +msgid "[Return to lynx with displayed values]" +msgstr "[Retourner à Lynx avec les valeurs affichées]" + +# msgid "[Return to lynx with displayed values]" +# msgstr "[Retourner à Lynx avec les valeurs affichées]" +msgid "[Save Settings]" +msgstr "[Enregistrer les paramètres]" + +# msgid "(of selected directory)" +# msgstr "(des répertoires choisis)" +msgid "list links visited during the current Lynx session" +msgstr "lister les liens activés durant la session courante" + +msgid "display stack of currently-suspended documents" +msgstr "afficher la pile de documents en suspens" + +msgid "Examine the Cookie Jar" +msgstr "examiner les «cookies»" + +# msgid " directory" +# msgstr " répertoire" +msgid "Default Binding " +msgstr "Clavier implicite " + +msgid "Current directory is" +msgstr "Le répertoire courant est" + +msgid "You have reached the Lynx Cookie Jar Page" +msgstr "Vous avez accédé à la Page des «cookies»" + +msgid "Accept: %s%s" +msgstr "Accepter : %s%s" + +msgid "Accept: " +msgstr "Accepter :" + +# 98-Feb-07 -CM +# Charsets from src/charsets/*.tbl +# Collate and a submit for translation in 1.1 +# "WinLatin2 (cp1250) " +# "WinCyrillic (cp1251)" +# "WinLatin1 (cp1252) " +# "WinGreek (cp1253) " +# "WinHebrew (cp1255) " +# "WinArabic (cp1256) " +# "IBM PC character set" +# "DosGreek (cp737) " +# "IBM PC codepage 850 " +# "PC Latin2 CP 852 " +# "DosHebrew (cp862) " +# "DosArabic (cp864) " +# "DosCyrillic (cp866) " +# "DosGreek2 (cp869) " +# "us-ascii " +# "DEC Multinational " +# "ISO Latin 1 " +# "ISO Latin 2 " +# "ISO Latin 3 " +# "ISO Latin 4 " +# "ISO 8859-5 Cyrillic " +# "ISO 8859-6 Arabic " +# "ISO 8859-7 Greek " +# "ISO 8859-8 Hebrew " +# "ISO 8859-9 (Latin 5)" +# "ISO 8859-10 " +# "KOI8-R Cyrillic " +# "Macintosh (8 bit) " +# "RFC1345 Mnem " +# "RFC 1345 Mnemonic " +# "NeXT character set " +# "RFC 1345 w/o Intro " +# "UNICODE UTF 8 " +# "Vietnamese (VISCII) " +msgid "Transparent " +msgstr "Transparent " + +msgid "7 bit approximations" +msgstr "Approximations 7-bit" + +msgid "DosArabic (cp864)" +msgstr "DosArabique (cp864)" + +msgid "The maximum temporary file count has been reached!" +msgstr "Le nombre maximum de fichiers temporaires a été atteint." + +msgid "DosCyrillic (cp866)" +msgstr "DosCyrilique (cp866)" + +msgid "Vietnamese (VISCII) " +msgstr "Vietnamien (VISCII) " + +msgid "Taipei (Big5) " +msgstr "Taipei (Big5) " + +# ------ end LYMessages_en.h +msgid "Use vt100 print sequence to print to your attached printer" +msgstr "Utiliser la séquence vt100 pour imprimer à votre imprimante" + +msgid "Korean " +msgstr "Coréen " + +msgid "Use Kermit to send to your computer" +msgstr "Utiliser Kermit pour envoyer à votre ordinateur" + +msgid "Use Zmodem to send to your computer" +msgstr "Utiliser Zmodem pour envoyer à votre ordinateur" + +# Character Sets from LYCharSets.c +msgid "ISO Latin 1 " +msgstr "ISO Latin 1 " + +msgid "ISO Latin 2 " +msgstr "ISO Latin 2 " + +msgid "Other ISO Latin " +msgstr "Autre ISO Latin " + +msgid "DEC Multinational " +msgstr "DEC multinational " + +msgid "IBM PC character set" +msgstr "Jeu de car. IBM PC " + +msgid "IBM PC codepage 850 " +msgstr "Code de page 850 IBM" + +msgid "Macintosh (8 bit) " +msgstr "Macintosh (8 bit) " + +msgid "KOI8-R character set" +msgstr "Jeu de car. KO18-R " + +msgid "KOI8-R Cyrillic" +msgstr "KOI8-R Cyrillique" + +msgid "Chinese " +msgstr "Chinois " + +msgid "Japanese (EUC) " +msgstr "Japonais (EUC) " + +#: /extra/garagan/gettext/lynx2-6/src/GridText.c:661 +msgid "" +"\n" +"\n" +"Error accessing document\n" +"No data available\n" +msgstr "" +"\n" +"\n" +"Erreur d'accès au document\n" +"Aucune donnée disponible\n" + +#: /extra/garagan/gettext/lynx2-6/src/GridText.c:931 +msgid "" +"\n" +" Document is empty" +msgstr "" +"\n" +" Le document est vide" + +#: /extra/garagan/gettext/lynx2-6/src/GridText.c:4377 src/GridText.c:7852 src/GridText.c:7855 +msgid "Submitting %s" +msgstr "Envoi de %s" + +#: /extra/garagan/gettext/lynx2-6/src/HTAlert.c:31 /extra/garagan/gettext/lynx2-6/src/HTAlert.c:33 /extra/garagan/gettext/lynx2-6/src/HTAlert.c:37 +msgid "" +"\n" +"Alert!: %s" +msgstr "" +"\n" +"Alerte! : %s" + +#: /extra/garagan/gettext/lynx2-6/src/HTAlert.c:220 +msgid "Server asked for redirection of POST content to" +msgstr "Le serveur demande le réacheminement du contenu POST vers" + +#: /extra/garagan/gettext/lynx2-6/src/HTAlert.c:221 src/HTAlert.c:583 src/HTAlert.c:598 +msgid "P)roceed, use G)ET or C)ancel " +msgstr "P) Continuer, utiliser G)ET ou C) Annuler " + +#: /extra/garagan/gettext/lynx2-6/src/HTAlert.c:223 src/HTAlert.c:592 src/HTAlert.c:607 +msgid "Redirection of POST content. P)roceed, see U)RL, use G)ET or C)ancel" +msgstr "Réacheminement du contenu POST. P)Continuer, U)RL, G)ET ou C) Annuler" + +#: /extra/garagan/gettext/lynx2-6/src/HTAlert.c:224 src/HTAlert.c:594 src/HTAlert.c:609 +msgid "Location: " +msgstr "Emplacement : " + +#: /extra/garagan/gettext/lynx2-6/src/HTML.c:1339 /extra/garagan/gettext/lynx2-6/src/HTML.c:1343 src/GridText.c:4568 src/GridText.c:4569 src/HTML.c:1212 src/HTML.c:1213 src/HTML.c:1214 src/HTML.c:1216 src/HTML.c:1217 src/HTML.c:1218 +msgid "Enter a database query: " +msgstr "Entrez une recherche dans la base de données : " + +#: /extra/garagan/gettext/lynx2-6/src/HTML.c:1492 +msgid "HTML: ****** Maximum nesting of %d divisions exceeded!\n" +msgstr "HTML : Imbrication maximale de %d divisions dépassée!\n" + +#: /extra/garagan/gettext/lynx2-6/src/HTML.c:1748 +msgid "HTML: TAB tag has no attributes. Ignored.\n" +msgstr "HTML : le codet TAB n'a pas d'attributs et n'est pas reconnu\n" + +#: /extra/garagan/gettext/lynx2-6/src/HTML.c:1763 +msgid "HTML: ALIGN not 'left'. Using space instead of TAB.\n" +msgstr "HTML : code ALIGN mal défini; interprété comme espace au lieu de TAB\n" + +#: /extra/garagan/gettext/lynx2-6/src/HTML.c:1776 +msgid "HTML: Not HT_LEFT. Using space instead of TAB.\n" +msgstr "Élément mal défini; interprété comme un espace au lieu de TAB\n" + +#: /extra/garagan/gettext/lynx2-6/src/HTML.c:1816 +msgid "HTML: Column out of bounds. Using space instead of TAB.\n" +msgstr "HTML : colonnes hors limites; interprété comme espace au lieu de TAB\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYBookmark.c:173 src/LYBookmark.c:147 src/LYBookmark.c:153 +msgid "" +" This file is an HTML representation of the X Mosaic hotlist file.\n" +" Outdated or invalid links may be removed by using the\n" +" remove bookmark command, it is usually the 'R' key but may have\n" +" been remapped by you or your system administrator.\n" +"\n" +"

                \n" +"

                  \n" +msgstr "" +" Ce fichier est une représentation HTML du fichier de signets de X Mosaic.\n" +" Les liens désuets ou non valides peuvent être supprimés au moyen de la\n" +" commande de suppression de signet, habituellement la touche 'R' mais les\n" +" touches peuvent avoir été reconfigurées par vous ou l'administrateur système.\n" +"\n" +"

                  \n" +"

                    \n" + +#: /extra/garagan/gettext/lynx2-6/src/LYBookmark.c:339 +msgid "" +" You can delete links using the remove bookmark command. It\n" +" is usually the 'R' key but may have been remapped by you or\n" +" your system administrator.
                    \n" +" This file may also be edited with a standard text editor.\n" +" Outdated or invalid links may be removed by simply deleting\n" +" the line the link appears on in this file.\n" +" Please refer to the Lynx documentation or help files\n" +" for the HTML link syntax.\n" +"\n" +"

                    \n" +"

                      \n" +msgstr "" +" Vous pouvez supprimer des liens avec la commande de suppression de signet,\n" +" habituellement la touche 'R' mais les touches peuvent avoir été\n" +" reconfigurées par vous ou par votre administrateur système.
                      \n" +" Le fichier peut aussi être édité au moyen d'un éditeur de texte standard.\n" +" Les liens désuets ou non valides peuvent être supprimés en effaçant\n" +" simplement la ligne où ce lien apparaît dans le fichier.\n" +" Voir la documentation Lynx ou les fichiers d'aide\n" +" pour la syntaxe des liens HTML.\n" +"\n" +"

                      \n" +"

                        \n" + +#: /extra/garagan/gettext/lynx2-6/src/LYBookmark.h:17 src/LYBookmark.c:325 src/LYBookmark.c:333 +msgid "Bookmark file" +msgstr "Fichier de signets" + +#: /extra/garagan/gettext/lynx2-6/src/LYBookmark.h:18 src/LYBookmark.c:146 src/LYBookmark.c:152 +msgid "Converted Mosaic Hotlist" +msgstr "Liste de signets Mosaic convertie" + +#: /extra/garagan/gettext/lynx2-6/src/LYCgi.c:274 +msgid "Read %d bytes of data." +msgstr "Lecture de %d octets de données" + +#: /extra/garagan/gettext/lynx2-6/src/LYCgi.c:410 src/LYCgi.c:593 src/LYCgi.c:594 +msgid "" +"\n" +"Good Advice\n" +"\n" +"\n" +msgstr "" +"\n" +"Avis\n" +"\n" +"\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYCgi.c:413 src/LYCgi.c:596 src/LYCgi.c:597 +msgid "

                        Good Advice

                        \n" +msgstr "

                        Avis

                        \n" + +#: /extra/garagan/gettext/lynx2-6/src/LYCgi.c:416 src/LYCgi.c:599 src/LYCgi.c:600 +msgid "An excellent http server for VMS is available via this link.\n" +msgstr ">ce lien.\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYCgi.c:427 src/LYCgi.c:610 src/LYCgi.c:611 +msgid "

                        It provides state of the art CGI script support.\n" +msgstr "

                        Il offre un soutien hors pair pour le script CGI.\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYCurses.c:197 src/LYCurses.c:751 src/LYCurses.c:753 +msgid "Terminal initialisation failed - unknown terminal type?\n" +msgstr "Défaut d'initialisation au terminal; type de terminal inconnu?\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYCurses.c:309 src/LYCurses.c:973 src/LYCurses.c:977 src/LYCurses.c:987 +msgid "Terminal = %s\n" +msgstr "Terminal = %s\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYCurses.c:314 src/LYCurses.c:978 src/LYCurses.c:982 src/LYCurses.c:992 +msgid "You must use a vt100, 200, etc. terminal with this program.\n" +msgstr "Il faut utiliser un terminal vt100, 200, etc. avec ce programme.\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYCurses.c:315 src/LYCurses.c:979 src/LYCurses.c:983 src/LYCurses.c:993 +msgid "Proceed (n/y)? " +msgstr "Continuer (n/o)? " + +#: /extra/garagan/gettext/lynx2-6/src/LYCurses.c:359 src/LYCurses.c:1056 src/LYCurses.c:1060 src/LYCurses.c:1070 +msgid "" +"\n" +"\n" +" Your Terminal type is unknown!\n" +"\n" +msgstr "" +"\n" +"\n" +" Votre type de terminal n'est pas reconnu.\n" +"\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYCurses.c:360 src/LYCurses.c:1057 src/LYCurses.c:1061 src/LYCurses.c:1071 +msgid " Enter a terminal type: [vt100] " +msgstr " Entrez un type de terminal : [vt100] " + +#: /extra/garagan/gettext/lynx2-6/src/LYCurses.c:371 src/LYCurses.c:1068 src/LYCurses.c:1072 src/LYCurses.c:1082 +msgid "" +"\n" +"TERMINAL TYPE IS SET TO %s\n" +msgstr "" +"\n" +"TYPE DE TERMINAL RÉGLÉ À %s\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYCurses.c:525 +msgid "" +"\n" +"A Fatal error has occured in %s Ver. %s\n" +msgstr "" +"\n" +"Une erreur fatale s'est produite dans %s Ver. %s\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYCurses.c:527 src/LYCurses.c:1302 src/LYCurses.c:1306 src/LYCurses.c:1316 +msgid "" +"\n" +"Please notify your system administrator to confirm a bug, and if\n" +msgstr "" +"\n" +"Demandez à l'administrateur système de confirmer un défaut, et en\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYCurses.c:529 +msgid "confirmed, to notify the lynx-dev list. Bug reports should have concise\n" +msgstr "cas de défaut, d'informer la liste lynx-dev. Le rapport doit comprendre: \n" + +#: /extra/garagan/gettext/lynx2-6/src/LYCurses.c:531 +msgid "descriptions of the command and/or URL which causes the problem, the\n" +msgstr "description concise de la commande et/ou l'URL fautive, nom et\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYCurses.c:533 +msgid "operating system name with version number, the TCPIP implementation, the\n" +msgstr "version du système d'exploitation, configuration TCPIP, contenu\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYCurses.c:535 +msgid "TRACEBACK if it can be captured, and any other relevant information.\n" +msgstr "de TRACEBACK si possible, et toute autre information pertinente.\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYCurses.c:538 src/LYCurses.c:1309 src/LYCurses.c:1313 src/LYCurses.c:1323 +msgid "" +"\n" +"Press RETURN to clean up: " +msgstr "" +"\n" +"Appuyez sur ENTRÉE pour restaurer : " + +#: /extra/garagan/gettext/lynx2-6/src/LYDownload.c:546 +msgid "

                        Download Options (%s Version %s)

                        \n" +msgstr "

                        Options de déchargement de fichier (%s Version %s)

                        \n" + +#: /extra/garagan/gettext/lynx2-6/src/LYDownload.c:550 +msgid "You have the following download choices.
                        \n" +msgstr "Vous avez les options de déchargement suivantes :
                        \n" + +#: /extra/garagan/gettext/lynx2-6/src/LYDownload.c:551 /home/sean/lynx/lynx2-6/src/LYPrint.c:915 /home/sean/lynx/lynx2-6/src/LYUpload.c:272 +msgid "" +"Please select one:
                        \n" +"
                        \n"
                        +msgstr ""
                        +"Veuillez faire votre choix :
                        \n" +"
                        \n"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYDownload.c:565
                        +msgid "   Save to disk disabled.\n"
                        +msgstr "   Enregistrement sur disque désactivé\n"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYDownload.c:578 /home/sean/lynx/lynx2-6/src/LYUpload.c:283 src/LYDownload.c:645 src/LYDownload.c:652 src/LYUpload.c:250 src/LYUpload.c:253
                        +msgid "No Name Given"
                        +msgstr "Aucun nom donné"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYDownload.c:583
                        +msgid ""
                        +"\n"
                        +"   \\\n"
                        +"No other download methods have been defined yet.  You may define\n"
                        +"   \\\n"
                        +"an unlimited number of download methods using the lynx.cfg file.\n"
                        +msgstr ""
                        +"\n"
                        +"   \\\n"
                        +"Aucune autre méthode de déchargement de fichier n'a encore été définie.\n"
                        +"   \\\n"
                        +"Vous pouvez définir de nombreuses méthodes à l'aide du fichier lynx.cfg.\n"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYDownload.h:12 src/LYDownload.c:605 src/LYDownload.c:617 src/LYHistory.c:71 src/LYHistory.c:73 src/LYHistory.c:126 src/LYHistory.c:130 src/LYMainLoop.c:2940 src/LYMainLoop.c:2964 src/LYMainLoop.c:4633 src/LYMainLoop.c:4664 src/LYMainLoop.c:4665 src/LYMainLoop.c:4851 src/LYMainLoop.c:4882 src/LYMainLoop.c:4883
                        +msgid "Lynx Download Options"
                        +msgstr "Options de déchargement de fichier - Lynx"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYHistory.c:219
                        +msgid "

                        You have reached the History Page

                        \n" +msgstr "

                        Vous avez accédé à l'Historique

                        \n" + +#: /extra/garagan/gettext/lynx2-6/src/LYHistory.c:220 +msgid "" +"

                        %s Version %s

                        \n" +"
                        "
                        +msgstr ""
                        +"

                        %s Version %s

                        \n" +"
                        "
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYHistory.c:221 src/LYHistory.c:389 src/LYHistory.c:414
                        +msgid "You selected:\n"
                        +msgstr "Vous avez choisi :\n"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYHistory.c:241 src/LYHistory.c:409 src/LYHistory.c:434 src/LYHistory.c:567 src/LYHistory.c:594
                        +msgid "(no address)"
                        +msgstr "(aucune addresse)"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYHistory.c:293 src/LYHistory.c:485 src/LYHistory.c:510 src/LYMainLoop.c:1989 src/LYMainLoop.c:2017 src/LYMainLoop.c:2875 src/LYMainLoop.c:2899 src/LYMainLoop.c:4927 src/LYMainLoop.c:4958 src/LYMainLoop.c:4959 src/LYMainLoop.c:5481 src/LYMainLoop.c:5506 src/LYMainLoop.c:5507 src/LYMainLoop.c:5542 src/LYMainLoop.c:5567 src/LYMainLoop.c:5568
                        +msgid "Document from Form with POST content.  Resubmit?"
                        +msgstr "Document FORM avec contenu POST. Envoyer de nouveau?"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYHistory.c:303 src/LYHistory.c:498 src/LYHistory.c:523
                        +msgid " (From History)"
                        +msgstr " (de l'Historique)"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYHistory.h:15 src/LYHistory.c:69 src/LYHistory.c:71 src/LYHistory.c:124 src/LYHistory.c:128 src/LYHistory.c:386 src/LYHistory.c:411 src/LYMainLoop.c:2556 src/LYMainLoop.c:2580 src/LYMainLoop.c:2604 src/LYMainLoop.c:2944 src/LYMainLoop.c:2968 src/LYMainLoop.c:4616 src/LYMainLoop.c:4647 src/LYMainLoop.c:4648 src/LYMainLoop.c:4922 src/LYMainLoop.c:4953 src/LYMainLoop.c:4954
                        +msgid "Lynx History Page"
                        +msgstr "Historique - Lynx"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:399
                        +msgid "toggle source/presentation for current document"
                        +msgstr "permuter code source/affichage hypertexte du document"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:400
                        +msgid "reload the current document"
                        +msgstr "recharger le document ouvert"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:401
                        +msgid "pipe the current document to an external command"
                        +msgstr "acheminer le document ouvert vers une commande externe"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:402
                        +msgid "quit the browser"
                        +msgstr "quitter le navigateur"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:403
                        +msgid "quit the browser unconditionally"
                        +msgstr "quitter le navigateur sans condition"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:404
                        +msgid "view the next page of the document"
                        +msgstr "visualiser la prochaine page du document"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:405
                        +msgid "view the previous page of the document"
                        +msgstr "visualiser la page précédente du document"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:406
                        +msgid "go back two lines in the document"
                        +msgstr "reculer de deux lignes dans le document"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:407
                        +msgid "go forward two lines in the document"
                        +msgstr "avancer de deux lignes dans le document"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:408
                        +msgid "go back half a page in the document"
                        +msgstr "reculer d'une demi-page dans le document"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:409
                        +msgid "go forward half a page in the document"
                        +msgstr "avancer d'une demi-page dans le document"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:410
                        +msgid "refresh the screen to clear garbled text"
                        +msgstr "rafraîchir l'écran pour effacer le texte brouillé"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:411
                        +msgid "go to the beginning of the current document"
                        +msgstr "aller au début du document ouvert"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:412
                        +msgid "go to the end of the current document"
                        +msgstr "aller à la fin du document ouvert"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:413
                        +msgid "make the previous link current"
                        +msgstr "activer le lien précédent"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:414
                        +msgid "make the next link current"
                        +msgstr "activer le lien suivant"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:415
                        +msgid "move up the page to a previous link"
                        +msgstr "remonter vers un lien précédent"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:416
                        +msgid "move down the page to another link"
                        +msgstr "avancer vers un autre lien"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:417
                        +msgid "move right to another link"
                        +msgstr "défiler à droite vers un autre lien"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:418
                        +msgid "move left to a previous link"
                        +msgstr "défiler à gauche vers un autre lien"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:419
                        +msgid "display a list of previously viewed documents"
                        +msgstr "afficher une liste de documents déjà consultés"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:420
                        +msgid "go back to the previous document"
                        +msgstr "retourner au document précédent"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:421
                        +msgid "go to the document given by the current link"
                        +msgstr "aller au document vers lequel pointe le lien actif"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:422
                        +msgid "go to a document given as a URL"
                        +msgstr "aller à un document correspondant à un URL"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:423
                        +msgid "display help on using the browser"
                        +msgstr "afficher l'aide sur l'utilisation du navigateur"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:424
                        +msgid "display an index of potentially useful documents"
                        +msgstr "afficher un index de documents potentiellement utiles"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:425
                        +msgid "force submission of form or link with no-cache"
                        +msgstr "envoyer nouvelle instance du fichier ou formulaire"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:426
                        +msgid "interrupt network transmission"
                        +msgstr "interrompre la transmission réseau"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:427
                        +msgid "return to the first screen (home page)"
                        +msgstr "retourner à la première page (page d'accueil)"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:428
                        +msgid "display and change option settings"
                        +msgstr "afficher et modifier les paramètres"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:429
                        +msgid "allow searching of an index"
                        +msgstr "effectuer une recherche dans un index"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:430
                        +msgid "search within the current document"
                        +msgstr "rechercher dans le document ouvert"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:431
                        +msgid "search for the next occurence"
                        +msgstr "rechercher la prochaine occurrence"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:432
                        +msgid "send a comment to the author of the current document"
                        +msgstr "envoyer un commentaire à l'auteur du document ouvert"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:433
                        +msgid "edit the current document"
                        +msgstr "éditer le document ouvert"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:434
                        +msgid "display information on the current document and link"
                        +msgstr "afficher info. sur le document et le lien actifs"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:435
                        +msgid "display choices for printing the current document"
                        +msgstr "afficher les options d'impression du document ouvert"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:436
                        +msgid "add to your personal bookmark list"
                        +msgstr "ajouter à votre liste personnelle de signets"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:437
                        +msgid "delete from your personal bookmark list"
                        +msgstr "supprimer de votre liste personnelle de signets"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:438
                        +msgid "view your personal bookmark list"
                        +msgstr "voir votre liste personnelle de signets"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:439
                        +msgid "escape from the browser to the system"
                        +msgstr "quitter le navigateur et revenir au système"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:440
                        +msgid "download the current link to your computer"
                        +msgstr "décharger le lien actif vers votre ordinateur"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:441
                        +msgid "toggle tracing of browser operations"
                        +msgstr "activ/dés le traçage des opérations du navigateur"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:442
                        +msgid "toggle handling of all images as links"
                        +msgstr "créer des liens pour toutes les images"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:443
                        +msgid "toggle pseudo-ALTs for inlines with no ALT string"
                        +msgstr "pseudo-ALTs pour images insérées sans ALT"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:444
                        +msgid "send a HEAD request for the current document or link"
                        +msgstr "envoyer une demande HEAD pour document ou lien actif"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:446
                        +msgid "show other commands in the novice help menu"
                        +msgstr "afficher autres commandes dans l'aide du novice"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:447
                        +msgid "go directly to a target document or action"
                        +msgstr "aller directement à un document ou une action cible"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:448
                        +msgid "display the current key map"
                        +msgstr "afficher la configuration des touches en cours"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:450
                        +msgid "go to Toolbar or Banner in the current document"
                        +msgstr "barre d'outil ou bannière du document ouvert"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:451
                        +msgid "toggle historical vs. valid/minimal comment parsing"
                        +msgstr "activer ou non la valeur 'historical' pour l'analyse"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:452
                        +msgid "toggle minimal vs. valid comment parsing"
                        +msgstr "activer ou non la valeur 'minimal' pour l'analyse"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:453
                        +msgid "toggle valid vs. soft double-quote parsing"
                        +msgstr "activ/dés la valeur 'soft_dquotes' pour l'analyse"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:454
                        +msgid "toggle raw 8-bit translations or CJK mode ON or OFF"
                        +msgstr "activer ou non la traduction en mode 8 bits ou CJK"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:456
                        +msgid "create a new file or directory"
                        +msgstr "créer un nouveau fichier ou répertoire"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:457
                        +msgid "remove a file or directory"
                        +msgstr "supprimer un fichier ou un répertoire"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:458
                        +msgid "modify the name or location of a file or directory"
                        +msgstr "modifier nom ou emplacement de fichier ou répertoire"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:459
                        +msgid "tag a file or directory for later action"
                        +msgstr "marquer fichier ou répertoire pour action ultérieure"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:460
                        +msgid "display a full menu of file operations"
                        +msgstr "afficher un menu complet de traitement de fichier"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:461
                        +msgid "upload from your computer to the current directory"
                        +msgstr "charger de l'ordinateur vers le répertoire courant"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:462
                        +msgid "install file or tagged files into a system area"
                        +msgstr "installer le fichier ou les fichiers marqué(s)"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:465
                        +msgid "report version of lynx"
                        +msgstr "rapporter la version de lynx"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:466 /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:467
                        +msgid "toggle a checkbox"
                        +msgstr "activer ou désactiver une case d'option"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:516 src/LYHistory.c:78 src/LYHistory.c:82 src/LYKeymap.c:709 src/LYKeymap.c:713 src/LYMainLoop.c:5322 src/LYMainLoop.c:5347 src/LYMainLoop.c:5348
                        +msgid "Current Key Map"
                        +msgstr "Configuration des touches"
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYKeymap.c:562
                        +msgid ""
                        +"

                        %s (%s Version %s)

                        \n" +"
                        "
                        +msgstr ""
                        +"

                        %s (%s Version %s)

                        \n" +"
                        "
                        +
                        +#: /extra/garagan/gettext/lynx2-6/src/LYList.c:84
                        +msgid "

                        You have reached the List Page

                        \n" +msgstr "Vous avez accédé à la Page de références\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYList.c:85 /home/sean/lynx/lynx2-6/src/LYShowInfo.c:98 +msgid "

                        %s Version %s

                        \n" +msgstr "

                        %s Version %s

                        \n" + +#: /extra/garagan/gettext/lynx2-6/src/LYList.c:87 +msgid " References in this document:

                        \n" +msgstr "Références dans ce document :

                        \n" + +#: /extra/garagan/gettext/lynx2-6/src/LYList.c:144 src/LYList.c:256 +msgid "References" +msgstr "Références" + +#: /extra/garagan/gettext/lynx2-6/src/LYList.h:8 src/LYHistory.c:79 src/LYHistory.c:83 src/LYList.c:84 src/LYMainLoop.c:4382 src/LYMainLoop.c:4395 src/LYMainLoop.c:4413 src/LYMainLoop.c:4414 src/LYMainLoop.c:4426 src/LYMainLoop.c:4427 src/LYMainLoop.c:4656 src/LYMainLoop.c:4687 src/LYMainLoop.c:4688 src/LYUtils.c:5839 src/LYUtils.c:5872 src/LYUtils.c:5890 +msgid "Lynx List Page" +msgstr "Page de références - Lynx" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:73 +msgid "New File" +msgstr "Nouveau fichier" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:76 +msgid "New Directory" +msgstr "Nouveau répertoire" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:79 +msgid "Install" +msgstr "Installer" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:82 +msgid "Modify Name" +msgstr "Modifier le nom" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:86 +msgid "Permit Name" +msgstr "Modifier le permis d'accès" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:90 +msgid "Change Location" +msgstr "Modifier l'emplacement" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:93 +msgid "Remove" +msgstr "Supprimer" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:97 +msgid "UUDecode" +msgstr "UUDecode" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:102 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:107 +msgid "Expand" +msgstr "Développer" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:117 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:122 +msgid "Uncompress" +msgstr "Décompresser" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:127 +msgid "UnTar" +msgstr "Extraire avec Tar" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:142 +msgid "Package and compress" +msgstr "Regrouper et compresser" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:146 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:150 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:155 +msgid "Compress" +msgstr "Compresser" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:159 +msgid "Move all tagged items to another location." +msgstr "Déplacer articles marqués vers autre emplacement" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:162 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:188 +msgid "Remove all tagged files and directories." +msgstr "Supprimer fichiers/répertoires marqués" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:165 +msgid "Untag all tagged files and directories." +msgstr "Annuler marquage sur fichiers/répertoires" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:209 +msgid "System error - failed to get status of %s " +msgstr "Erreur système; impossible d'obtenir l'état de %s " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:257 +msgid "Enter new location for tagged items: " +msgstr "Entrer un nouvel emplacement pour articles marqués : " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:301 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:346 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:430 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:517 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:569 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1127 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1784 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1791 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1807 +msgid "Unable to get status of %s " +msgstr "Impossible d'obtenir l'état de %s " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:357 src/LYLocal.c:429 src/LYLocal.c:470 +msgid "Source and destination are the same location - request ignored!" +msgstr "Source et destination identiques; demande non traitée" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:397 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:599 +msgid "Destination has different owner! Request denied. " +msgstr "Destination associée à autre utilisateur; demande non traitée" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:404 +msgid "Destination is not a valid directory! Request denied. " +msgstr "Destination non valide; demande non traitée" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:438 +msgid "Enter new name for directory: " +msgstr "Entrer un nouveau nom pour le répertoire : " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:440 +msgid "Enter new name for file: " +msgstr "Entrer un nouveau nom pour le fichier : " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:443 +msgid "The selected item is not a file or a directory! Request ignored. " +msgstr "L'article n'est pas un fichier/répertoire; demande non traitée" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:453 +msgid "Illegal character \"/\" found! Request ignored. " +msgstr "Caractère non autorisé \"/\" détecté; demande non traitée" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:465 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:718 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:781 +msgid "Unable to determine status of %s " +msgstr "Impossible de déterminer l'état de %s " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:480 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:732 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:795 +msgid "There is already a directory with that name! Request ignored. " +msgstr "Un répertoire de ce nom existe déjà; demande non traitée" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:484 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:736 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:799 +msgid "There is already a file with that name! Request ignored. " +msgstr "Un fichier de ce nom existe déjà; demande non traitée" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:488 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:740 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:803 +msgid "The specified name is already in use! Request ignored. " +msgstr "Nom spécifié déjà utilisé; demande non traitée" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:526 src/LYLocal.c:596 src/LYLocal.c:628 +msgid "Enter new location for directory: " +msgstr "Entrez nouvel emplacement pour répertoire : " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:528 +msgid "Enter new location for the file: " +msgstr "Entrez nouvel emplacement pour fichier : " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:531 src/LYLocal.c:600 src/LYLocal.c:632 +msgid "The specified item is not a file or a directory - request ignored." +msgstr "L'article n'est pas un fichier/répertoire; demande non traitée" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:554 src/LYLocal.c:622 src/LYLocal.c:655 +msgid "Unexpected failure - unable to find trailing \"/\"" +msgstr "Impossible de trouver la marque de fin de fichier \"/\"" + +# Duplicate +# msgid "Destination is not a valid directory! Request denied. " +# msgstr "La destination n'est pas valide; demande refusée" +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:576 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:585 src/LYLocal.c:650 src/LYLocal.c:681 +msgid "Source and destination are the same location! Request ignored!" +msgstr "Source et destination identiques; demande non traitée" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:639 +msgid "Modify name, location, or permission (n, l, or p): " +msgstr "Modifier nom, emplacement ou permission (n, l ou p) : " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:641 +msgid "Modify name, or location (n or l): " +msgstr "Modifier le nom ou l'emplacement (n ou l) : " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:676 +msgid "This feature not yet implemented! " +msgstr "Cette fonction n'est pas encore offerte. " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:694 +msgid "Enter name of file to create: " +msgstr "Entrez le nom du fichier : " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:703 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:767 src/LYLocal.c:772 src/LYLocal.c:794 src/LYLocal.c:832 src/LYLocal.c:854 +msgid "Illegal redirection \"//\" found! Request ignored." +msgstr "Réacheminement \"//\" non autorisé; demande non traitée" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:758 src/LYLocal.c:822 src/LYLocal.c:844 +msgid "Enter name for new directory: " +msgstr "Entrer le nom du nouveau répertoire : " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:819 src/LYLocal.c:877 src/LYLocal.c:899 +msgid "Create file or directory (f or d): " +msgstr "Créer un fichier ou un répertoire (f ou r) :" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:853 +msgid "System error - failed to get status of %s. " +msgstr "Erreur système - impossible d'obtenir l'état de %s. " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:868 +msgid "Remove %s and all of its contents (y or n): " +msgstr "Supprimer %s et tout son contenu (o ou n) : " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:870 src/LYLocal.c:938 src/LYLocal.c:948 +msgid "Remove directory and all of its contents (y or n): " +msgstr "Supprimer le répertoire et tout son contenu (o ou n) : " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:873 +msgid "Remove file %s (y or n): " +msgstr "Supprimer le fichier %s (o ou n) : " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:875 src/LYLocal.c:944 src/LYLocal.c:954 +msgid "Remove file (y or n): " +msgstr "Supprimer le fichier (o ou n) : " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:878 +msgid "Remove symbolic link %s (y or n): " +msgstr "Supprimer le lien symbolique %s (o ou n) : " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:880 src/LYLocal.c:951 src/LYLocal.c:961 +msgid "Remove symbolic link (y or n): " +msgstr "Supprimer le lien symbolique (o ou n) : " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:882 +msgid "Unable to determine status of %s. " +msgstr "Impossible de déterminer l'état de %s. " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:998 +msgid "Unable to get status of %s. " +msgstr "Impossible d'obtenir l'état de %s. " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1005 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1134 src/LYLocal.c:1088 src/LYLocal.c:1250 +msgid "The specified item is not a file nor a directory - request ignored." +msgstr "L'article n'est ni un fichier ni un répertoire; demande non traitée" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1022 src/LYLocal.c:1090 src/LYLocal.c:1100 +msgid "Unable to open permit options file" +msgstr "Impossible d'ouvrir le fichier demandé" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1041 src/LYLocal.c:1113 src/LYLocal.c:1124 +msgid "

                        Permissions for %s

                        \n" +msgstr "

                        Permissions d'accès pour %s

                        \n" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1049 src/LYLocal.c:1123 src/LYLocal.c:1134 +msgid "
                        1. Specify permissions below:

                          \n" +msgstr "
                          1. Spécifier les permissions d'accès ci-après :

                            \n" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1166 src/LYLocal.c:1272 src/LYLocal.c:1283 +msgid "Invalid mode format." +msgstr "Format de mode non valide" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1171 src/LYLocal.c:1276 src/LYLocal.c:1287 +msgid "Invalid syntax format." +msgstr "Format de syntaxe non valide" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1363 src/LYLocal.c:1459 src/LYLocal.c:1470 +msgid "Warning! UUDecoded file will exist in the directory you started Lynx." +msgstr "Le fichier UUDecoded sera dans le répertoire où vous avez lancé Lynx" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1469 src/LYLocal.c:1569 src/LYLocal.c:1580 +msgid "Executing system command. This might take a while." +msgstr "Exécution de la commande système. Veuillez patienter." + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1519 +msgid "Unable to open file management menu file" +msgstr "Impossible d'ouvrir le menu de gestion de fichier." + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1579 +msgid "" +"\n" +"

                            File Management Options (%s Version %s)

                            " +msgstr "" +"\n" +"

                            Options de gestion de fichier (%s Version %s)

                            " + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1582 +msgid "Current directory is %s
                            \n" +msgstr "Le répertoire courant est %s
                            \n" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1586 +msgid "Current selection is %s

                            \n" +msgstr "La sélection courante est %s

                            \n" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1588 +msgid "Nothing currently selected.

                            \n" +msgstr "Il n'y a rien de sélectionné.

                            \n" + +# msgid "Current selection is %d tagged item%s" +# msgstr "La sélection courante est %d articles marqués%s" +# Followed by ( n == 1) ? ":" : "s:" (like PINE. ick, ick.) +# Works fine for French. But..... +# FIXME! +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1596 +msgid "Current selection is %d tagged item%s" +msgstr "La sélection courante est %d article(s) marqué%s" + +# msgid "Current selection is %d tagged item" +# msgstr "La sélection courante est %d article marqué" +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1648 +msgid "

                            Upload to current directory:

                            \n" +msgstr "

                            Charger vers le répertoire courant :

                            \n" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1687 +msgid "Unable to %s due to system error!" +msgstr "Opération impossible dû à une erreur système!" + +# msgstr "Erreur système - impossible de %s " +# src/LYLocal.c +# I need to see the variable in context! +# +# sprintf(tmpbuf, _("remove %s"), testpath); +# if (LYExecv(RM_PATH, args, tmpbuf) <= 0) { +# +# +# LYExecv (path, argv, msg) { +# if (fork () == -1) +# sprintf(tmpbuf, _("Unable to %s due to system error!"), msg); +# } +# if (WEXITSTATUS(wstatus) != 0 || { +# WTERMSIG(wstatus) > 0) { /* error return */ +# sprintf(tmpbuf, _("Probable failure to %s due to system error!"), +# msg); +# rc = 0; +# Execute a command and if it fails, print out what you were trying to do as part +# of the error message. eg LYExecv ("/csuite/bin/lynx", new_url, "Spawn new browser with URL" [msg]); +# +# msgid "Unable to %s due to system error!" +# msgstr "Impossible de %s dû à une erreur système." +# , msg); +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1702 src/LYLocal.c:2085 src/LYLocal.c:2145 +msgid "Probable failure to %s due to system error!" +msgstr "Défaut de %s dû probablement à une erreur système" + +# NdT= Any string with variables should be documented! +# msgid "Probable failure to %s due to system error!" +# msgstr "Échec probable de %s dû a une erreur système." +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1742 /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1754 src/LYLocal.c:1761 src/LYLocal.c:1772 src/LYLocal.c:1800 src/LYLocal.c:1811 +msgid "Illegal filename; request ignored." +msgstr "Nom de fichier invalide; demande non traitée" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1813 +msgid "The selected item is not a directory! Request ignored. " +msgstr "L'article n'est pas un répertoire; demande non traitée." + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1817 src/LYLocal.c:1816 src/LYLocal.c:1870 +msgid "Install in the selected directory not permitted." +msgstr "Installation dans le répertoire choisi non permise." + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1822 +msgid "Just a moment, ..." +msgstr "Attendez un moment, ..." + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:1847 +msgid "Installation complete" +msgstr "Installation terminée" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.c:2014 src/LYLocal.c:2017 src/LYLocal.c:2084 +msgid "Temporary URL or list would be too long." +msgstr "L'URL ou la liste temporaires seraient trop longs." + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.h:62 src/LYHistory.c:74 src/LYHistory.c:78 src/LYHistory.c:128 src/LYHistory.c:132 src/LYLocal.c:1642 src/LYLocal.c:1682 src/LYMainLoop.c:2929 src/LYMainLoop.c:2953 src/LYMainLoop.c:3163 src/LYMainLoop.c:3187 src/LYMainLoop.c:3245 src/LYMainLoop.c:3269 src/LYMainLoop.c:4588 src/LYMainLoop.c:4619 src/LYMainLoop.c:4620 src/LYMainLoop.c:4624 src/LYMainLoop.c:4655 src/LYMainLoop.c:4656 +msgid "File Management Options" +msgstr "Options de gestion de fichier" + +#: /extra/garagan/gettext/lynx2-6/src/LYLocal.h:63 src/LYHistory.c:76 src/LYHistory.c:80 src/LYHistory.c:130 src/LYHistory.c:134 src/LYLocal.c:1112 src/LYLocal.c:1123 src/LYMainLoop.c:2803 src/LYMainLoop.c:2827 src/LYMainLoop.c:2932 src/LYMainLoop.c:2956 src/LYMainLoop.c:3166 src/LYMainLoop.c:3190 src/LYMainLoop.c:3248 src/LYMainLoop.c:3272 src/LYMainLoop.c:4627 src/LYMainLoop.c:4658 src/LYMainLoop.c:4659 src/LYMainLoop.c:4901 src/LYMainLoop.c:4932 src/LYMainLoop.c:4933 +msgid "File Permission Options" +msgstr "Options de permission d'accès" + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:216 src/LYMail.c:554 src/LYMail.c:568 +msgid "" +"Sending form content:\n" +"\n" +"$ %s\n" +"\n" +"Please wait..." +msgstr "" +"Envoi du contenu du formulaire :\n" +"\n" +"$ %s\n" +"\n" +"Veuillez attendre ..." + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:299 src/LYMail.c:732 +msgid "The link %s :?: %s \n" +msgstr "Le lien %s :?: %s \n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:301 src/LYMail.c:734 +msgid "called \"%s\"\n" +msgstr "appelé «%s»\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:302 src/LYMail.c:735 +msgid "in the file \"%s\" called \"%s\"" +msgstr "dans le fichier «%s» appelé «%s»" + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:304 src/LYMail.c:737 +msgid "" +"\n" +"was requested but was not available." +msgstr "" +"\n" +"a été demandé mais n'est pas disponible." + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:305 src/LYMail.c:738 +msgid "" +"\n" +"\n" +"Thought you might want to know." +msgstr "" +"\n" +"\n" +"Pour votre information." + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:307 src/LYMail.c:740 +msgid "" +"\n" +"\n" +"This message was automatically generated by\n" +msgstr "" +"\n" +"\n" +"Ce message est généré automatiquement par\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:308 src/LYMail.c:741 +msgid "Lynx ver. %s" +msgstr "Lynx ver. %s" + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:513 src/LYMail.c:1328 src/LYMail.c:1330 +msgid "" +"\n" +"\n" +"Use Ctrl-G to cancel if you do not want to send a message\n" +msgstr "" +"\n" +"\n" +"Faites Ctrl-G pour annuler l'envoi du message\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:519 +msgid "" +"\n" +" Please enter your name, " +msgstr "" +"\n" +" Veuillez entrer votre nom, " + +# <------------- Already translated. +# msgid "\n Please enter your name, " +# msgstr "\n Veuillez entrer votre nom, " +# msgid "or leave it blank if you wish to remain anonymous\n" +# msgstr "ou laissez un blanc si vous désirez rester anonyme\n" +# <--------------- End already.... +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:519 /extra/garagan/gettext/lynx2-6/src/LYMail.c:520 src/LYMail.c:1600 src/LYMail.c:1602 +msgid "" +"\n" +" Please review the message body:\n" +"\n" +msgstr "" +"\n" +" Veuillez revoir le corps du message :\n" +"\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:520 +msgid "or leave it blank if you wish to remain anonymous\n" +msgstr "ou laissez un blanc si vous désirez rester anonyme\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:524 /extra/garagan/gettext/lynx2-6/src/LYMail.c:560 /extra/garagan/gettext/lynx2-6/src/LYMail.c:595 src/LYMail.c:1341 src/LYMail.c:1343 src/LYMail.c:1382 src/LYMail.c:1384 src/LYMail.c:1429 src/LYMail.c:1431 src/LYMail.c:1466 src/LYMail.c:1468 +msgid " Use Control-U to erase the default.\n" +msgstr "Faites Ctrl-U pour effacer la valeur par défaut.\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:557 src/LYMail.c:1379 src/LYMail.c:1381 +msgid "" +"\n" +" Please enter a mail address or some other\n" +msgstr "" +"\n" +" Entrez une adresse de courriel ou un autre moyen\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:558 src/LYMail.c:1380 src/LYMail.c:1382 +msgid " means to contact you, if you desire a response.\n" +msgstr " de vous joindre si vous désirez une réponse.\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:594 src/LYMail.c:1428 src/LYMail.c:1430 +msgid "" +"\n" +" Please enter a subject line.\n" +msgstr "" +"\n" +" Veuillez entrer le sujet du message.\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:629 src/LYMail.c:1464 src/LYMail.c:1466 +msgid "" +"\n" +" Enter a mail address for a CC of your message.\n" +msgstr "" +"\n" +" Entrez une adresse de courriel pour la copie conforme.\n" + +# msgid " Use Control-U to erase the default.\n" +# msgstr "Faites Ctrl-U pour effacer la valeur par défaut.\n" +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:631 /extra/garagan/gettext/lynx2-6/src/LYMail.c:707 src/LYMail.c:1638 src/LYMail.c:1640 +msgid "" +"\n" +" Please enter your message below." +msgstr "" +"\n" +" Veuillez entrer votre message ci-après." + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:632 src/LYMail.c:1467 src/LYMail.c:1469 +msgid " (Leave blank if you don't want a copy.)\n" +msgstr " (Laissez en blanc si vous ne voulez pas de copie.)\n" + +# msgid "\n When you are done, press enter and put a single period (.)" +# msgstr "\n Une fois terminé, faitez et tapez un point (.)" +# msgid "\n on a line and press enter again." +# msgstr "\n sur une ligne, puis faites de nouveau." +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:708 /extra/garagan/gettext/lynx2-6/src/LYMail.c:709 src/LYUtils.c:1971 src/LYUtils.c:1972 src/LYUtils.c:1973 +msgid " C)reate D)ownload E)dit F)ull menu M)odify R)emove T)ag U)pload \n" +msgstr "C)réer D)écharger E)diter F) Menu M)odifier R) Supprimer T) Marquer U) Charger\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMail.c:796 src/LYMail.c:1825 src/LYMail.c:1827 src/LYMail.c:1867 src/LYMail.c:1869 +msgid "" +"Sending your comment:\n" +"\n" +"$ %s\n" +"\n" +"Please wait..." +msgstr "" +"Envoi de votre commentaire :\n" +"\n" +"$ %s\n" +"\n" +"Veuillez attendre..." + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:691 src/LYMain.c:1128 src/LYMain.c:1145 src/LYMain.c:1148 +msgid "" +"\n" +"Configuration file %s is not available.\n" +"\n" +msgstr "" +"\n" +"Le fichier de configuration %s n'est pas disponible.\n" +"\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:701 src/LYMain.c:1217 src/LYMain.c:1220 src/LYMain.c:1234 +msgid "" +"\n" +"Lynx edit map not declared.\n" +"\n" +msgstr "" +"\n" +"Relevé de liens Lynx non déclaré.\n" +"\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:835 +msgid "Session start: %s" +msgstr "Début de session : %s" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:837 +msgid "Session start" +msgstr "Début de session" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1107 src/LYMain.c:1604 src/LYMain.c:1607 +msgid "" +"The '-head' switch is for http HEAD requests and cannot be used for\n" +"'%s'.\n" +msgstr "" +"L'option '-head' est pour les demandes HEAD et ne peut servir pour\n" +"'%s'.\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1126 src/LYMain.c:1625 src/LYMain.c:1628 +msgid "" +"The '-mime_header' switch is for http URLs and cannot be used for\n" +"'%s'.\n" +msgstr "" +"L'option '-mime_header' est pour les URL http et ne peut servir pour\n" +"'%s'.\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1145 src/LYMain.c:1646 src/LYMain.c:1649 +msgid "" +"The '-traversal' switch is for http URLs and cannot be used for\n" +"'%s'.\n" +msgstr "" +"L'option '-traversal' est pour les URL http et ne peut servir pour\n" +"'%s'.\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1296 +msgid "" +"\n" +" USAGE: lynx -restrictions=[option][,option][,option]\n" +" List of Options:\n" +" all restricts all options.\n" +msgstr "" +"\n" +" USAGE: lynx -restrictions=[option][,option][,option]\n" +" Liste d'options:\n" +" all invalide toutes les options.\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1300 +msgid "" +" bookmark disallow changing the location of the bookmark file.\n" +" bookmark_exec disallow execution links via the bookmark file\n" +msgstr "" +" bookmark invalide changement emplacement du fichier signets\n" +" bookmark_exec invalide liens exécutables depuis fichier de signets\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1304 +msgid "" +" change_exec_perms disallow changing the eXecute permission on files\n" +" (but still allow it for directories) when local file\n" +"\t\t management is enabled.\n" +msgstr "" +" change_exec_perms invalide modification de l'accès à 'eXecute' pour fichiers\n" +" (mais l'autorise pour les répertoires) lorsque la gestion des\n" +"\t\t fichiers locaux est activée.\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1309 +msgid "" +" default same as commandline option -anonymous. Disables\n" +" default services for anonymous users. Currently set to,\n" +" all restricted except for: inside_telnet, outside_telnet,\n" +" inside_news, inside_ftp, outside_ftp, inside_rlogin,\n" +"\t\t outside_rlogin, goto, jump and mail. Defaults\n" +" are settable within userdefs.h\n" +msgstr "" +" default semblable à l'option -anonymous. Désactive\n" +" services par défaut pour utilisateurs anonymes. Réglé à\n" +" restriction générale sauf: inside_telnet, outside_telnet,\n" +" inside_news, inside_ftp, outside_ftp, inside_rlogin,\n" +"\t\t outside_rlogin, goto, jump et mail. Valeurs par défaut\n" +" paramétrables dans 'userdefs.h'\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1317 +msgid " dired_support disallow local file management\n" +msgstr " dired_support invalide la gestion de fichier local\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1320 +msgid "" +" disk_save disallow saving binary files to disk in the download menu\n" +" dotfiles disallow access to, or creation of, hidden (dot) files\n" +" download disallow downloaders in the download menu\n" +" editor disallow editing\n" +" exec disable execution scripts\n" +" exec_frozen disallow the user from changing the execution link\n" +" file_url disallow using G)oto, served links or bookmarks for\n" +" file: URL's\n" +" goto disable the 'g' (goto) command\n" +msgstr "" +" disk_save invalide enreg. de fichiers binaires dans menu de déchargement\n" +" dotfiles invalide l'accès aux fichiers cachés (point) ou leur création\n" +" download invalide le programme de déchargement dans menu de déchargement\n" +" editor invalide l'édition\n" +" exec invalide les scripts exécutables\n" +" exec_frozen invalide la modification du lien exécutable\n" +" file_url invalide l'utilisation de G)oto, des liens ou des signets\n" +" pour les URL du fichier : \n" +" goto désactive la commande «g» (goto)\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1331 +msgid "" +" inside_ftp disallow ftps for people coming from inside your\n" +" domain (utmp required for selectivity)\n" +" inside_news disallow USENET news posting for people coming from\n" +" inside your domain (utmp required for selectivity)\n" +" inside_rlogin disallow rlogins for people coming from inside your\n" +" domain (utmp required for selectivity)\n" +" inside_telnet disallow telnets for people coming from inside your\n" +" domain (utmp required for selectivity)\n" +msgstr "" +" inside_ftp invalide ftp pour ceux qui accèdent depuis votre\n" +" domaine (utmp requis pour la sélectivité)\n" +" inside_news invalide l'envoi USENET pour ceux qui accèdent depuis\n" +" votre domaine (utmp requis pour la sélectivité)\n" +" inside_rlogin invalide rlogin pour ceux qui accèdent depuis\n" +" votre domaine (utmp requis pour la sélectivité)\n" +" inside_telnet invalide telnet pour ceux qui accèdent depuis\n" +" votre domaine (utmp requis pour la sélectivité)\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1341 +msgid "" +" inside_ftp disallow ftps for people coming from inside your domain\n" +" inside_news disallow USENET news posting for people coming from inside\n" +" your domain\n" +" inside_rlogin disallow rlogins for people coming from inside your domain\n" +" inside_telnet disallow telnets for people coming from inside your domain\n" +msgstr "" +" inside_ftp invalide ftp pour ceux qui accèdent depuis votre domaine\n" +" inside_news invalide l'envoi USENET pour ceux qui accèdent depuis\n" +" votre domaine\n" +" inside_rlogin invalide rlogin pour ceux qui accèdent depuis votre domaine\n" +" inside_telnet invalide telnet pour ceux qui accèdent depuis votre domaine\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1348 +msgid "" +" jump disable the 'j' (jump) command\n" +" mail disallow mail\n" +" multibook disallow multiple bookmark files\n" +" news_post disallow USENET News posting setting in the O)ptions menu\n" +" option_save disallow saving options in .lynxrc\n" +msgstr "" +" jump désactive la commande 'j' (jump)\n" +" mail invalide le courrier\n" +" multibook invalide les fichiers de signets multiples\n" +" news_post invalide paramètres d'envoi USENET dans menu O)ptions\n" +" option_save invalide les options d'enregistrement dans .lynxrc\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1355 +msgid "" +" outside_ftp disallow ftps for people coming from outside your\n" +" domain (utmp required for selectivity)\n" +" outside_news disallow USENET news posting for people coming from\n" +" outside your domain (utmp required for selectivity)\n" +" outside_rlogin disallow rlogins for people coming from outside your\n" +" domain (utmp required for selectivity)\n" +" outside_telnet disallow telnets for people coming from outside your\n" +" domain (utmp required for selectivity)\n" +msgstr "" +" outside_ftp invalide ftp pour ceux qui accèdent hors de\n" +" votre domaine (utmp requis pour la sélectivité)\n" +" outside_news invalide l'envoi USENET pour ceux qui accèdent hors de\n" +" votre domaine (utmp requis pour la sélectivité)\n" +" outside_rlogin invalide rlogin pour ceux qui accèdent hors de\n" +" votre domaine (utmp requis pour la sélectivité)\n" +" outside_telnet invalide les sessions telnet pour ceux qui accèdent hors de\n" +" votre domaine (utmp requis pour la sélectivité)\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1365 +msgid "" +" outside_ftp disallow ftps for people coming from outside your domain\n" +" outside_news disallow USENET news posting for people coming from outside\n" +" your domain\n" +" outside_rlogin disallow rlogins for people coming from outside your domain\n" +" outside_telnet disallow telnets for people coming from outside your domain\n" +msgstr "" +" outside_ftp invalide ftp pour ceux qui accèdent hors de votre domaine\n" +" outside_news invalide l'envoi USENET pour ceux qui accèdent hors de\n" +" votre domaine\n" +" outside_rlogin invalide rlogin pour ceux qui accèdent hors de votre domaine\n" +" outside_telnet invalide telnet pour ceux qui accèdent hors de votre domaine\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1372 +msgid "" +" print disallow most print options\n" +" shell disallow shell escapes, and lynxexec, lynxprog or lynxcgi\n" +" G)oto's\n" +" suspend disallow Control-Z suspends with escape to shell\n" +" telnet_port disallow specifying a port in telnet G)oto's\n" +" useragent disallow modifications of the User-Agent header\n" +msgstr "" +" print invalide la plupart des options d'impression\n" +" shell invalide Échap vers shell et G)oto' slynxexec, lynxprog\n" +" ou lynxcgi\n" +" suspend invalide la séquence Control-Z/Échappement vers shell\n" +" telnet_port invalide spécification d'un port dans G)oto' telnet\n" +" useragent invalide modification de l'en-tête agent-utilisateur\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1761 +msgid " LYNX: Invalid Option: %s\n" +msgstr "LYNX : Option non valide : %s\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1762 +msgid "USAGE: lynx [options] [file]\n" +msgstr "USAGE : lynx [options] [fichier]\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1764 src/LYMain.c:3153 src/LYMain.c:3180 src/LYMain.c:3202 +msgid "%s: Invalid Option: %s\n" +msgstr "%s : Option non valide : %s\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1765 src/LYMain.c:2974 src/LYMain.c:3001 src/LYMain.c:3023 +msgid "USAGE: %s [options] [file]\n" +msgstr "USAGE : %s [options] [fichier]\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1767 src/LYMain.c:2975 src/LYMain.c:3002 src/LYMain.c:3024 +msgid "Options are:\n" +msgstr "Les options sont :\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1768 +msgid " - receive the arguments from stdin (enclose\n" +msgstr " - réception des arguments de stdin (inclusion\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1769 +msgid " in double-quotes (\"-\") on VMS)\n" +msgstr " entre guillements («-») sur VMS)\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1770 +msgid " -anonymous used to specify the anonymous account\n" +msgstr " -anonymous spécifier le compte anonyme\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1771 +msgid " -auth=id:pw authentication information for protected forms\n" +msgstr " -auth=id:pw authentification pour les formulaires protégés\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1772 +msgid " -book use the bookmark page as the startfile\n" +msgstr " -book page de signets comme fichier de départ\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1773 +msgid " -buried_news toggles scanning of news articles for buried references\n" +msgstr " -buried_news balayage des nouvelles pour repérer des références\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1774 +msgid " -cache=NUMBER NUMBER of documents cached in memory (default is %d)\n" +msgstr " -cache=NUMBER NOMBRE de documents dans mémoire cache (défaut: %d)\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1775 +msgid " -case enable case sensitive user searching\n" +msgstr " -case active la recherche avec distinction maj./min.\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1776 +msgid " -cfg=FILENAME specifies a lynx.cfg file other than the default\n" +msgstr " -cfg=FILENAME spécifie fichier lynx.cfg autre que l'implicite\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1777 +msgid " -child exit on left-arrow in startfile, and disable save to disk\n" +msgstr " -child flèche GAUCHE pour aller dans fichier départ sans enreg.\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1779 +msgid " -color force color mode on with standard bg colors\n" +msgstr " -color mode couleur avec couleur de fond standard\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1780 +msgid " -blink force color mode on with high intensity bg colors\n" +msgstr " -blink mode couleur avec couleur de fond intense\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1782 +msgid " -crawl with -traversal, output each page to a file\n" +msgstr " -crawl avec -traversal, envoie chaque page dans un fichier\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1783 +msgid " with -dump, format output as with -traversal, but to stdout\n" +msgstr " avec -dump, formate sortie comme avec -traversal, vers stdout\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1784 +msgid " -display=DISPLAY set the display variable for X execed programs\n" +msgstr " -display=DISPLAY règle la variable pour programmes XWindows\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1785 +msgid " -dump dump the first file to stdout and exit\n" +msgstr " -dump copie le premier fichier dans stdout et quitte\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1786 +msgid " -editor=EDITOR enable edit mode with specified editor\n" +msgstr " -editor=EDITOR mode d'édition avec éditeur spécifié\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1787 +msgid " -emacskeys enable emacs-like key movement\n" +msgstr " -emacskeys mouvement de touche compatible emacs\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1788 +msgid " -enable_scrollback toggle compatibility with comm programs' scrollback\n" +msgstr " -enable_scrollback active les touches de défil. arrière du programme\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1789 +msgid " keys (may be incompatible with some curses packages)\n" +msgstr " de communication (incompatibilité possible)\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1790 +msgid " -error_file=FILE write the HTTP status code here\n" +msgstr " -error_file=FILE écrit le code d'état HTTP ici\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1793 +msgid " -exec enable local program execution\n" +msgstr " -exec autorise l'exécution du programme local\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1795 +msgid " -locexec enable local program execution from local files only\n" +msgstr " -locexec exécution du programme local depuis fichiers locaux\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1796 +msgid " -noexec disable local program execution (DEFAULT)\n" +msgstr " -noexec invalide exécution du programme local (DÉFAUT)\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1798 +msgid " -fileversions include all versions of files in local VMS directory\n" +msgstr " -fileversions toutes versions fichiers dans répertoire VMS local\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1799 +msgid " listings\n" +msgstr " listes\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1800 +msgid " -force_html forces the first document to be interpreted as HTML\n" +msgstr " -force_html le premier document est interprété comme HTML\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1801 +msgid " -ftp disable ftp access\n" +msgstr " -ftp désactive l'accès ftp\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1802 +msgid " -get_data user data for get forms, read from stdin,\n" +msgstr " -get_data données util. pour form. GET lues dans stdin,\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1803 /extra/garagan/gettext/lynx2-6/src/LYMain.c:1832 +msgid " terminated by '---' on a line\n" +msgstr " terminé par '---' sur une ligne\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1804 +msgid " -head send a HEAD request\n" +msgstr " -head envoi d'une demande HEAD\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1805 +msgid " -help print this usage message\n" +msgstr " -help imprime ce message d'usage\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1806 +msgid " -historical toggles use of '>' or '-->' as a terminator for comments\n" +msgstr " -historical active '>' ou '-->' comme code de fin de commentaire\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1807 +msgid " -homepage=URL set homepage separate from start page\n" +msgstr " -homepage=URL distinction page d'accueil vs page de départ\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1808 +msgid " -image_links toggles inclusion of links for all images\n" +msgstr " -image_links inclusion de liens pour toutes les images\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1809 +msgid " -index=URL set the default index file to URL\n" +msgstr " -index=URL règle le fichier index par défaut à l'URL\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1810 +msgid " -link=NUMBER starting count for lnk#.dat files produced by -crawl\n" +msgstr " -link=NUMBER lance compteur pour fichiers lnk#.dat créés par -crawl\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1811 +msgid " -localhost disable URLs that point to remote hosts\n" +msgstr " -localhost désactive pointeurs vers hôtes distants\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1812 +msgid " -mime_header include mime headers and force source dump\n" +msgstr " -mime_header inclut en-têtes MIME et induit vidage source\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1813 +msgid " -minimal toggles minimal versus valid comment parsing\n" +msgstr " -minimal analyse réglée à 'minimal' versus 'valid'\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1814 +msgid " -newschunksize=NUMBER number of articles in chunked news listings\n" +msgstr " -newschunksize=NUMBER articles dans listes de nouvelles par bloc\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1815 +msgid " -newsmaxchunk=NUMBER maximum news articles in listings before chunking\n" +msgstr " -newsmaxchunk=NUMBER maximum d'articles avant compilation par bloc\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1816 +msgid " -nobrowse disable directory browsing\n" +msgstr " -nobrowse désactive navigation dans répertoires\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1817 +msgid " -nofilereferer disable transmissions of Referer headers for file URLs\n" +msgstr " -nofilereferer désactive transmission d'en-têtes 'Referer' pour URL\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1818 +msgid " -nofrom disable transmissions of From headers\n" +msgstr " -nofrom désactive transmission d'en-têtes 'From'\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1819 +msgid " -nolist disable the link list feature in dumps\n" +msgstr " -nolist désactive liste de liens dans vidages\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1820 +msgid " -nolog disable mailing of error messages to document owners\n" +msgstr " -nolog désactive messages d'erreur aux propriétaires\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1821 +msgid " -noprint disable print functions\n" +msgstr " -noprint désactive les fonctions d'impression\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1822 +msgid " -noredir don't follow Location: redirection\n" +msgstr " -noredir ignorer l'emplacement : réacheminement\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1823 +msgid " -noreferer disable transmissions of Referer headers\n" +msgstr " -noreferer désactive la transmission de 'Referer'\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1827 +msgid " -nostatus disable the miscellaneous information messages\n" +msgstr " -nostatus désactive les messages d'information divers\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1828 +msgid " -number_links force numbering of links\n" +msgstr " -number_links induit le numérotage des liens\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1829 +msgid " -popup toggles handling of single-choice SELECT options via\n" +msgstr " -popup active ou non le traitement des options au moyen de\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1830 +msgid " popup windows or as lists of radio buttons\n" +msgstr " fenêtres flash ou de boutons d'option\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1831 +msgid " -post_data user data for post forms, read from stdin,\n" +msgstr " -post_data données util. pour form. POST lues dans stdin,\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1833 +msgid " -print enable print functions (DEFAULT)\n" +msgstr " -print active fonctions d'impression (DÉFAUT)\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1834 +msgid " -pseudo_inlines toggles pseudo-ALTs for inlines with no ALT string\n" +msgstr " -pseudo_inlines crée 'pseudo-ALT' pour images sans attribut ALT\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1835 +msgid " -raw toggles default setting of 8-bit character translations\n" +msgstr " -raw paramètre par défaut de traduction en caractères 8-bits\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1836 +msgid " or CJK mode for the startup character set\n" +msgstr " ou mode CJK pour jeu de caractères de départ\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1837 +msgid " -realm restricts access to URLs in the starting realm\n" +msgstr " -realm accès restreint aux URL dans partition de départ\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1838 +msgid " -reload flushes the cache on a proxy server\n" +msgstr " -reload évacue le cache sur un serveur proxy\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1839 +msgid " (only the first document affected)\n" +msgstr " (seul le premier document est touché)\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1840 +msgid " -restrictions=[options] use -restrictions to see list\n" +msgstr " -restrictions=[options] -restrictions pour voir la liste\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1841 +msgid " -resubmit_posts toggles forced resubmissions (no-cache) of forms with\n" +msgstr " -resubmit_posts envoi d'une nouvelle instance du formulaire avec la\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1842 +msgid " method POST when the documents they returned are sought\n" +msgstr " méthode POST quand les documents retournés sont cherchés\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1843 +msgid " with the PREV_DOC command or from the History List\n" +msgstr " avec la commande PREV_DOC ou depuis l'Historique\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1844 +msgid " -rlogin disable rlogins\n" +msgstr " -rlogin désactive les sessions rlogin\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1845 +msgid " -selective require .www_browsable files to browse directories\n" +msgstr " -selective fichiers .www_browsable requis pour la navigation\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1846 +msgid " -show_cursor don't hide the curser in the lower right corner\n" +msgstr " -show_cursor le curseur reste visible à l'écran\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1847 +msgid " -soft_dquotes toggles emulation of the old Netscape and Mosaic bug which\n" +msgstr " -soft_dquotes émulation des anciennnes versions Netscape et Mosaic qui\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1848 +msgid " treated '>' as a co-terminator for double-quotes and tags\n" +msgstr " traitaient '>' comme fermeture des guillemets et des codets\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1849 +msgid " -source dump the source of the first file to stdout and exit\n" +msgstr " -source envoie source du premier fichier vers stdout et quitte\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1850 +msgid " -startfile_ok allow non-http startfile and homepage with -validate\n" +msgstr " -startfile_ok avec -validate, permet fichiers/pages de départ non-http\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1853 +msgid " -syslog=text information for syslog call\n" +msgstr " -syslog=text information pour appels syslog\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1856 +msgid " -telnet disable telnets\n" +msgstr " -telnet désactive les sessions telnet\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1857 +msgid " -term=TERM set terminal type to TERM\n" +msgstr " -term=TERM règle le type de terminal à TERM\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1858 +msgid " -trace turns on WWW trace mode\n" +msgstr " -trace active le mode de traçage W3\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1859 +msgid " -traversal traverse all http links derived from startfile\n" +msgstr " -traversal parcourt liens http dérivés du fichier de départ\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1860 +msgid " -underscore toggles use of _underline_ format in dumps\n" +msgstr " -underscore utilisation du format _underline_ dans les vidages\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1861 +msgid " -validate accept only http URLs (for validation)\n" +msgstr " -validate n'accepte que les URL http (pour validation)\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1862 +msgid " -version print Lynx version information\n" +msgstr " -version imprime information sur version de Lynx\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1863 +msgid " -vikeys enable vi-like key movement\n" +msgstr " -vikeys active mouvement de touche compatible vi\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1876 +msgid "" +"\\r\n" +"A Fatal error has occurred in %s Ver. %s\\r\n" +msgstr "" +"\\r\n" +"Un erreur fatale s'est produite dans %s Ver. %s\\r\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1879 +msgid "" +"\\r\n" +"Please notify your system administrator to confirm a bug, and\\r\n" +"if confirmed, to notify the lynx-dev list. Bug reports should\\r\n" +"have concise descriptions of the command and/or URL which causes\\r\n" +"the problem, the operating system name with version number, the\\r\n" +"TCPIP implementation, and any other relevant information.\\r\n" +msgstr "" +"\\r\n" +"Demandez à l'administrateur système de confirmer un défaut, et en cas\\r\n" +"de défaut, d' informer la liste lynx-dev. Le rapport doit comprendre:\\r\n" +"description concise de la commande et/ou l'URL fautive, nom du\\r\n" +"système d'exploitation et numéro de version, configuration TCPIP\\r\n" +"et toute autre information pertinente.\\r\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1886 +msgid "" +"\\r\n" +"Do NOT mail the core file if one was generated.\\r\n" +msgstr "" +"\\r\n" +"Ne PAS poster le fichier de mémoire si ce fichier a été généré\\r\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMain.c:1889 +msgid "" +"\\r\n" +"Lynx now exiting with signal: %d\\r\n" +"\\r\n" +msgstr "" +"\\r\n" +"Lynx quitte maintenant avec le signal: %d\\r\n" +"\\r\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMainLoop.c:180 /extra/garagan/gettext/lynx2-6/src/LYMainLoop.c:1049 /extra/garagan/gettext/lynx2-6/src/LYMainLoop.c:1087 /extra/garagan/gettext/lynx2-6/src/LYMainLoop.c:2294 src/LYMainLoop.c:275 src/LYMainLoop.c:282 src/LYMainLoop.c:3699 src/LYMainLoop.c:3723 +msgid "Entry into main screen" +msgstr "Entrée dans l'écran principal" + +#: /extra/garagan/gettext/lynx2-6/src/LYMainLoop.c:369 +msgid "" +"\n" +"lynx: Can't access start file %s\n" +msgstr "" +"\n" +"lynx : accès impossible au fichier de départ %s\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMainLoop.c:446 src/LYMainLoop.c:743 src/LYMainLoop.c:754 +msgid "" +"\n" +"lynx: Start file could not be found or is not text/html or text/plain\n" +msgstr "" +"\n" +"lynx : fichier de départ introuvable ou son mode n'est pas reconnu\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMainLoop.c:447 +msgid " Exiting...\n" +msgstr " Sortie ...\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMainLoop.c:927 +msgid "Fatal error - could not open output file %s\n" +msgstr "Erreur fatale - impossible d'ouvrir le fichier de sortie %s\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYMainLoop.c:2122 src/LYMainLoop.c:3584 src/LYMainLoop.c:3608 +msgid "A URL specified by the user" +msgstr "Un URL spécifié par l'utilisateur" + +#: /extra/garagan/gettext/lynx2-6/src/LYMainLoop.c:2232 src/LYMainLoop.c:3634 src/LYMainLoop.c:3658 +msgid "System Index" +msgstr "Index système" + +#: /extra/garagan/gettext/lynx2-6/src/LYMainLoop.c:2259 +msgid "'X' can only toggle a form link" +msgstr "'X' peut seulement activer un lien de formulaire" + +#: /extra/garagan/gettext/lynx2-6/src/LYMainLoop.c:2262 +msgid "'X' only toggles in forms mode" +msgstr "'X' peut seulement activer en mode formulaires" + +#: /extra/garagan/gettext/lynx2-6/src/LYMainLoop.c:2276 +msgid "'Z' can only toggle a form link" +msgstr "'Z' peut seulement activer un lien de formulaire" + +#: /extra/garagan/gettext/lynx2-6/src/LYMainLoop.c:2279 +msgid "'Z' only toggles in forms mode" +msgstr "'Z' peut seulement activer en mode formulaires" + +#: /extra/garagan/gettext/lynx2-6/src/LYMainLoop.c:2389 src/HTFWriter.c:269 src/HTFWriter.c:285 src/LYGetFile.c:766 src/LYGetFile.c:790 +msgid "Using %s" +msgstr "Utilisation de %s" + +#: /extra/garagan/gettext/lynx2-6/src/LYMainLoop.c:2394 +msgid "A URL specified by redirection" +msgstr "Un URL spécifié par réacheminement" + +#: /extra/garagan/gettext/lynx2-6/src/LYMainLoop.c:3414 +msgid "*** %s Version %s ***" +msgstr "*** %s Version %s ***" + +#: /extra/garagan/gettext/lynx2-6/src/LYNews.c:84 src/LYNews.c:110 src/LYNews.c:111 +msgid "You will be posting to:" +msgstr "Vous postez à : " + +#: /extra/garagan/gettext/lynx2-6/src/LYNews.c:95 +msgid "" +"\n" +"\n" +" Please enter your mail address\n" +msgstr "" +"\n" +"\n" +" Veuillez entrer votre adresse de courriel\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYNews.c:121 +msgid "" +"\n" +"\n" +" Please enter a subject line\n" +msgstr "" +"\n" +"\n" +" Veuillez entrer l'objet du message\n" + +#: /extra/garagan/gettext/lynx2-6/src/LYNews.c:205 src/LYNews.c:255 src/LYNews.c:256 +msgid "" +"\n" +"\n" +" Please enter your message below." +msgstr "" +"\n" +"\n" +"Veuillez entrer votre message ci-après :" + +#: /extra/garagan/gettext/lynx2-6/src/LYNews.c:206 src/LYMail.c:1639 src/LYMail.c:1641 src/LYNews.c:256 src/LYNews.c:257 +msgid "" +"\n" +" When you are done, press enter and put a single period (.)" +msgstr "" +"\n" +" Une fois terminé, faites et tapez un point (.)" + +#: /extra/garagan/gettext/lynx2-6/src/LYNews.c:207 src/LYMail.c:1640 src/LYMail.c:1642 src/LYNews.c:257 src/LYNews.c:258 +msgid "" +"\n" +" on a line and press enter again." +msgstr "" +"\n" +" sur une ligne, puis faites de nouveau." + +#: /extra/garagan/gettext/lynx2-6/src/LYNews.c:260 +msgid "" +"Posting your message:\n" +"\n" +"%s\n" +"\n" +"Please wait..." +msgstr "" +"Envoi de votre message:\n" +"\n" +"%s\n" +"\n" +"Veuillez attendre..." + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:92 src/LYOptions.c:90 src/LYOptions.c:98 src/LYOptions.c:151 src/LYOptions.c:159 +msgid "Screen height must be at least 23 lines for the Options menu!" +msgstr "Hauteur d'écran : au moins 23 lignes pour le menu des paramètres" + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:116 +msgid " Options Menu (" +msgstr " Menu des paramètres (" + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:118 +msgid " Version " +msgstr " Version " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:124 +msgid "E)ditor : " +msgstr "E) Éditeur : " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:128 +msgid "D)ISPLAY variable : " +msgstr "D) Affichage : " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:132 +msgid "mu(L)ti-bookmarks: " +msgstr "L) Signets multiples: " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:139 /extra/garagan/gettext/lynx2-6/src/LYOptions.c:431 src/LYOptions.c:558 src/LYOptions.c:619 +msgid "review/edit B)ookmarks files" +msgstr "B) Éditer fichiers signets " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:141 /extra/garagan/gettext/lynx2-6/src/LYOptions.c:433 src/LYOptions.c:560 src/LYOptions.c:621 +msgid "B)ookmark file: " +msgstr "B) Fichier de signets : " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:146 +msgid "F)TP sort criteria : " +msgstr "F) Critères de tri FTP : " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:147 +msgid "By Filename" +msgstr "Nom de fichier" + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:148 +msgid "By Size" +msgstr "Volume " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:149 +msgid "By Type" +msgstr "Type" + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:150 +msgid "By Date" +msgstr "Date" + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:153 +msgid "P)ersonal mail address : " +msgstr "P)Adresse de courriel : " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:158 +msgid "S)earching type : " +msgstr "S) Type de recherche : " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:162 +msgid "display (C)haracter set : " +msgstr "C) Jeu de caractères : " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:166 +msgid "Raw 8-bit or CJK m(O)de : " +msgstr "O) Mode 8-bit ou CJK : " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:170 +msgid "preferred document lan(G)uage: " +msgstr "G) Langue préférée : " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:174 +msgid "preferred document c(H)arset: " +msgstr "H) Jeu de caractères préféré :" + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:178 +msgid "V)I keys: " +msgstr "V) Touches VI : " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:182 +msgid "e(M)acs keys: " +msgstr "M) Touches emacs : " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:186 +msgid "sho(W) dot files: " +msgstr "W) Montrer fichiers cachés : " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:190 +msgid "popups for selec(T) fields : " +msgstr "T) Menus-éclair pour sélections :" + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:194 +msgid "K)eypad mode : " +msgstr "K) Bloc numérique : " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:196 +msgid "Links are numbered" +msgstr "Liens numérotés" + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:199 +msgid "li(N)e edit style : " +msgstr "N) Édition de ligne : " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:204 +msgid "l(I)st directory style : " +msgstr "I) Liste de répertoires" + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:205 +msgid "Files first " +msgstr "Fichiers d'abord " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:206 +msgid "Mixed style " +msgstr "Style mixte " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:207 +msgid "Directories first " +msgstr "Répertoires d'abord " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:211 +msgid "U)ser mode : " +msgstr "U) Mode utilisateur : " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:212 +msgid "Novice" +msgstr "Novice" + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:213 +msgid "Intermediate" +msgstr "Intermédiaire" + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:214 +msgid "Advanced" +msgstr "Avancé" + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:217 +msgid "user (A)gent : " +msgstr "A) Agent utilisateur : " + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:222 +msgid "local e(X)ecution links : " +msgstr "X) Liens exécutables en local" + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:224 +msgid "ALWAYS ON" +msgstr "TOUJOURS ACTIVÉ" + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:225 /extra/garagan/gettext/lynx2-6/src/LYOptions.c:228 +msgid "FOR LOCAL FILES ONLY" +msgstr "FICHIER LOCAUX UNIQUEMENT" + +#: /extra/garagan/gettext/lynx2-6/src/LYOptions.c:226 /extra/garagan/gettext/lynx2-6/src/LYOptions.c:229 +msgid "ALWAYS OFF" +msgstr "TOUJOURS DÉSACTIVÉ" + +#: /home/sean/lynx/lynx2-6/src/LYLocal.c:132 +msgid "Tar" +msgstr "Tar" + +#: /home/sean/lynx/lynx2-6/src/LYLocal.c:137 +msgid "Tar and compress" +msgstr "Tar et compression" + +#: /home/sean/lynx/lynx2-6/src/LYLocal.c:974 src/LYLocal.c:1056 src/LYLocal.c:1059 +msgid "Sorry, don't know how to permit non-UNIX files yet." +msgstr "Désolé, impossible d'accepter les fichier non UNIX pour le moment" + +#: /home/sean/lynx/lynx2-6/src/LYPrint.c:902 +msgid "

                            Printing Options (%s Version %s)

                            \n" +msgstr "

                            Options d'impression (%s Version %s)

                            \n" + +#: /home/sean/lynx/lynx2-6/src/LYPrint.c:907 +msgid "There are %d lines, or approximately %d page%s, to print.
                            \n" +msgstr "Il y a %d lignes, ou environ %d page%s à imprimer.
                            \n" + +#: /home/sean/lynx/lynx2-6/src/LYPrint.c:912 +msgid "Some print functions have been disabled!!!
                            \n" +msgstr "Certaines fonctions d'impression ont été désactivées.
                            \n" + +#: /home/sean/lynx/lynx2-6/src/LYPrint.c:914 +msgid "You have the following print choices.
                            \n" +msgstr "Vous avez les options d'impression suivantes.
                            \n" + +#: /home/sean/lynx/lynx2-6/src/LYPrint.c:919 src/LYPrint.c:1290 src/LYPrint.c:1294 src/LYPrint.c:1322 +msgid " Save to a local file\n" +msgstr " Enregistrer dans un fichier local\n" + +#: /home/sean/lynx/lynx2-6/src/LYPrint.c:923 src/LYPrint.c:1296 src/LYPrint.c:1300 src/LYPrint.c:1328 +msgid " Mail the file\n" +msgstr " Envoyer le fichier par courriel\n" + +#: /home/sean/lynx/lynx2-6/src/LYPrint.c:926 src/LYPrint.c:1301 src/LYPrint.c:1305 src/LYPrint.c:1333 +msgid " Print to the screen\n" +msgstr " Imprimer à l'écran\n" + +#: /home/sean/lynx/lynx2-6/src/LYPrint.h:12 src/LYHistory.c:70 src/LYHistory.c:72 src/LYHistory.c:125 src/LYHistory.c:129 src/LYMainLoop.c:2949 src/LYMainLoop.c:2973 src/LYMainLoop.c:4359 src/LYMainLoop.c:4364 src/LYMainLoop.c:4391 src/LYMainLoop.c:4395 src/LYMainLoop.c:4396 src/LYMainLoop.c:4620 src/LYMainLoop.c:4651 src/LYMainLoop.c:4652 src/LYMainLoop.c:4884 src/LYMainLoop.c:4915 src/LYMainLoop.c:4916 src/LYPrint.c:1272 src/LYPrint.c:1299 +msgid "Lynx Printing Options" +msgstr "Options d'impression Lynx" + +# ----------------------- +# 1998 March 7. Text Changed from 0.98 to 0.102 +#: /home/sean/lynx/lynx2-6/src/LYReadCFG.c:317 +msgid "" +"Syntax Error parsing COLOR in configuration file:\n" +"The line must be of the form:\n" +"COLOR:INTEGER:FOREGROUND:BACKGROUND\n" +"\n" +"Here FOREGROUND and BACKGROUND must be one of:\n" +msgstr "" +"Erreur de syntaxe pour COLOR dans le fichier de configuration :\n" +"La séquence doit être la suivante :\n" +"COLOR:INTEGER:FOREGROUND:BACKGROUND\n" +"\n" +"FOREGROUND et BACKGROUND doivent être :\n" + +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:97 +msgid "

                            You have reached the Information Page

                            \n" +msgstr "

                            Vous avez accédé à la Page d'information

                            \n" + +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:103 +msgid "" +"

                            Directory that you are currently viewing

                            \n" +"
                            "
                            +msgstr ""
                            +"

                            Répertoire que vous visualisez présentement

                            \n" +"
                            "
                            +
                            +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:130 src/LYShowInfo.c:160 src/LYShowInfo.c:177
                            +msgid ""
                            +"\n"
                            +"Directory that you have currently selected\n"
                            +"\n"
                            +msgstr ""
                            +"\n"
                            +"Répertoire que vous avez sélectionné\n"
                            +"\n"
                            +
                            +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:133 src/LYShowInfo.c:163 src/LYShowInfo.c:180
                            +msgid ""
                            +"\n"
                            +"File that you have currently selected\n"
                            +"\n"
                            +msgstr ""
                            +"\n"
                            +"Fichier que vous avez sélectionné\n"
                            +"\n"
                            +
                            +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:136 src/LYShowInfo.c:167 src/LYShowInfo.c:184
                            +msgid ""
                            +"\n"
                            +"Symbolic link that you have currently selected\n"
                            +"\n"
                            +msgstr ""
                            +"\n"
                            +"Lien symbolique que vous avez sélectionné\n"
                            +"\n"
                            +
                            +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:139 src/LYShowInfo.c:171 src/LYShowInfo.c:188
                            +msgid ""
                            +"\n"
                            +"Item that you have currently selected\n"
                            +"\n"
                            +msgstr ""
                            +"\n"
                            +"Article que vous avez sélectionné\n"
                            +"\n"
                            +
                            +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:149 src/LYShowInfo.c:182 src/LYShowInfo.c:199
                            +msgid "Unable to follow link"
                            +msgstr "Impossible d'activer le lien"
                            +
                            +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:151 src/LYShowInfo.c:184 src/LYShowInfo.c:201
                            +msgid "  Points to file:  %s\n"
                            +msgstr "Pointe vers le fichier :  %s\n"
                            +
                            +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:155 src/LYShowInfo.c:189 src/LYShowInfo.c:206
                            +msgid "   Name of owner:  %s\n"
                            +msgstr "   Nom du propriétaire :  %s\n"
                            +
                            +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:158 src/LYShowInfo.c:192 src/LYShowInfo.c:209
                            +msgid "      Group name:  %s\n"
                            +msgstr "         Nom du groupe :  %s\n"
                            +
                            +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:160 src/LYShowInfo.c:194 src/LYShowInfo.c:211
                            +msgid "       File size:  %ld (bytes)\n"
                            +msgstr "     Volume du fichier :  %ld (octets)\n"
                            +
                            +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:168 src/LYShowInfo.c:202 src/LYShowInfo.c:219
                            +msgid "   Creation date:  %s"
                            +msgstr "      Date de création :  %s"
                            +
                            +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:171 src/LYShowInfo.c:205 src/LYShowInfo.c:222
                            +msgid "   Last modified:  %s"
                            +msgstr "  Dernière mise à jour :  %s"
                            +
                            +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:174 src/LYShowInfo.c:208 src/LYShowInfo.c:225
                            +msgid "   Last accessed:  %s\n"
                            +msgstr "         Dernier accès :  %s\n"
                            +
                            +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:176
                            +msgid "   Access Permissions\n"
                            +msgstr "  Permissions d'accès\n"
                            +
                            +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:177 src/LYShowInfo.c:211 src/LYShowInfo.c:228
                            +msgid "      Owner:  "
                            +msgstr "          Propriétaire :  "
                            +
                            +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:239 src/LYShowInfo.c:275 src/LYShowInfo.c:292
                            +msgid ""
                            +"

                            File that you are currently viewing

                            \n" +"
                            " +msgstr "" +"

                            Fichier que vous visualisez présentement

                            \n" +"
                            " + +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:243 /home/sean/lynx/lynx2-6/src/LYShowInfo.c:288 src/LYShowInfo.c:345 src/LYShowInfo.c:362 +msgid "
                            Linkname: %s\n" +msgstr "
                            Nom du lien : %s\n" + +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:257 src/LYShowInfo.c:311 src/LYShowInfo.c:328 +msgid "
                            Last Mod: %s\n" +msgstr "
                            Dernière modification : %s\n" + +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:262 src/LYShowInfo.c:315 src/LYShowInfo.c:332 +msgid "
                            Post Data: %s\n" +msgstr "
                            Données POST : %s\n" + +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:264 src/LYShowInfo.c:317 src/LYShowInfo.c:334 +msgid "
                            Post Content Type: %s\n" +msgstr "
                            Type de contenu POST : %s\n" + +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:285 src/LYShowInfo.c:342 src/LYShowInfo.c:359 +msgid "" +"

                            Link that you currently have selected

                            \n" +"
                            " +msgstr "" +"

                            Lien que vous avez sélectionné

                            \n" +"
                            " + +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:320 +msgid "
                            Filename: %s\n" +msgstr "
                            Nom du fichier : %s\n" + +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.c:325 src/LYShowInfo.c:383 src/LYShowInfo.c:400 +msgid "

                            No Links on the current page

                            " +msgstr "

                            Aucun lien dans la page courante

                            " + +#: /home/sean/lynx/lynx2-6/src/LYShowInfo.h:12 src/LYHistory.c:80 src/LYHistory.c:84 src/LYMainLoop.c:4323 src/LYMainLoop.c:4327 src/LYMainLoop.c:4355 src/LYMainLoop.c:4359 src/LYMainLoop.c:4618 src/LYMainLoop.c:4649 src/LYMainLoop.c:4650 src/LYShowInfo.c:116 src/LYShowInfo.c:132 +msgid "Information about the current document" +msgstr "Information sur le document courant" + +#: /home/sean/lynx/lynx2-6/src/LYTraversal.c:117 src/LYTraversal.c:117 +msgid "" +"\n" +"\n" +"TRAVERSAL WAS INTERUPTED\n" +"\n" +"\t here is a list of the history stack so that you may rebuild\n" +"\n" +msgstr "" +"\n" +"\n" +"PARCOURS INTERROMPU \n" +"\n" +"\t voici une liste de l'Historique que vous pouvez reconstituer\n" +"\n" + +#: /home/sean/lynx/lynx2-6/src/LYUpload.c:82 src/LYUpload.c:84 src/LYUpload.c:85 +msgid "ERROR! - upload command is misconfigured" +msgstr "ERREUR - commande de chargement mal configurée" + +#: /home/sean/lynx/lynx2-6/src/LYUpload.c:94 /home/sean/lynx/lynx2-6/src/LYUpload.c:157 src/LYDownload.c:126 src/LYDownload.c:130 src/LYDownload.c:156 src/LYDownload.c:160 src/LYDownload.c:189 src/LYDownload.c:193 src/LYDownload.c:398 src/LYDownload.c:410 src/LYDownload.c:428 src/LYDownload.c:440 src/LYDownload.c:461 src/LYDownload.c:473 src/LYPrint.c:246 src/LYPrint.c:251 src/LYPrint.c:289 src/LYPrint.c:294 src/LYPrint.c:322 src/LYPrint.c:327 src/LYPrint.c:1006 src/LYPrint.c:1026 src/LYPrint.c:1044 src/LYPrint.c:1064 src/LYPrint.c:1078 src/LYPrint.c:1098 src/LYUpload.c:96 src/LYUpload.c:97 src/LYUpload.c:151 src/LYUpload.c:152 +msgid "Enter a filename: " +msgstr "Entrez un nom de fichier : " + +#: /home/sean/lynx/lynx2-6/src/LYUpload.c:105 +msgid "Illegal redirection \"../\" found! Request ignored. " +msgstr "Réacheminement «../» non autorisé; demande non traitée" + +#: /home/sean/lynx/lynx2-6/src/LYUpload.c:109 +msgid "Illegal character \"/\" found! Request ignored. " +msgstr "Caractère «/» non autorisé; demande non traitée" + +#: /home/sean/lynx/lynx2-6/src/LYUpload.c:114 +msgid "Illegal redirection using \"~\" found! Request ignored. " +msgstr "Réacheminement avec «~» non autorisé; demande non traitée" + +#: /home/sean/lynx/lynx2-6/src/LYUpload.c:128 +msgid "File name may not begin with dot. Enter a new filename: " +msgstr "Nom de fichier ne peut commencer par un point. Entrez un nouveau nom: " + +#: /home/sean/lynx/lynx2-6/src/LYUpload.c:138 src/LYDownload.c:282 src/LYDownload.c:298 src/LYPrint.c:416 src/LYPrint.c:437 src/LYUpload.c:132 src/LYUpload.c:133 +msgid "File exists. Create higher version? (y/n)" +msgstr "Ce fichier existe déjà. Créer une nouvelle version? (o/n)" + +#: /home/sean/lynx/lynx2-6/src/LYUpload.c:140 src/LYDownload.c:284 src/LYDownload.c:300 src/LYPrint.c:418 src/LYPrint.c:439 src/LYUpload.c:134 src/LYUpload.c:135 +msgid "File exists. Overwrite? (y/n)" +msgstr "Ce fichier existe déjà. Remplacer? (o/n)" + +#: /home/sean/lynx/lynx2-6/src/LYUpload.c:168 src/LYUpload.c:163 src/LYUpload.c:164 +msgid "Cannot write to file. Enter a new filename: " +msgstr "Écriture non autorisée. Entrez un nouveau nom de fichier : " + +#: /home/sean/lynx/lynx2-6/src/LYUpload.c:198 src/LYUpload.c:193 src/LYUpload.c:194 +msgid "Unable to upload file." +msgstr "Impossible de charger le fichier." + +#: /home/sean/lynx/lynx2-6/src/LYUpload.c:204 src/LYUpload.c:197 src/LYUpload.c:198 +msgid "Cancelling." +msgstr "Annulation." + +#: /home/sean/lynx/lynx2-6/src/LYUpload.c:268 +msgid "

                            Upload Options (%s Version %s)

                            \n" +msgstr "

                            Options de chargement de fichier (%s Version %s)

                            \n" + +#: /home/sean/lynx/lynx2-6/src/LYUpload.c:271 +msgid "You have the following upload choices.
                            \n" +msgstr "Vous avez les options de chargement suivantes.
                            \n" + +#: /home/sean/lynx/lynx2-6/src/LYUpload.c:287 +msgid "" +"\n" +" \\\n" +"No other upload methods have been defined yet. You may define\n" +" \\\n" +"an unlimited number of upload methods using the lynx.cfg file.\n" +msgstr "" +"\n" +" \\\n" +"Aucune autre méthode de chargement de fichier encore définie. Vous\n" +" \\\n" +"pouvez définir de nombreuses méthodes au moyen du fichier lynx.cfg.\n" + +#: /home/sean/lynx/lynx2-6/src/LYUpload.h:12 src/LYHistory.c:75 src/LYHistory.c:79 src/LYHistory.c:129 src/LYHistory.c:133 src/LYMainLoop.c:2935 src/LYMainLoop.c:2959 src/LYMainLoop.c:3169 src/LYMainLoop.c:3193 src/LYMainLoop.c:3251 src/LYMainLoop.c:3275 src/LYMainLoop.c:4630 src/LYMainLoop.c:4661 src/LYMainLoop.c:4662 src/LYMainLoop.c:4893 src/LYMainLoop.c:4924 src/LYMainLoop.c:4925 src/LYMainLoop.c:5045 src/LYMainLoop.c:5051 src/LYMainLoop.c:5064 src/LYMainLoop.c:5065 src/LYMainLoop.c:5070 src/LYMainLoop.c:5071 src/LYUpload.c:237 src/LYUpload.c:240 +msgid "Lynx Upload Options" +msgstr "Options de chargement de fichier - Lynx" + +#: /home/sean/lynx/lynx2-6/src/LYUtils.c:437 /home/sean/lynx/lynx2-6/src/LYUtils.c:446 src/LYUtils.c:1982 src/LYUtils.c:1983 src/LYUtils.c:1984 src/LYUtils.c:1991 src/LYUtils.c:1992 src/LYUtils.c:1993 +msgid "This is a searchable index. Use " +msgstr "Il s'agit d'un index consultable. Utilisez " + +#: /home/sean/lynx/lynx2-6/src/LYUtils.c:439 /home/sean/lynx/lynx2-6/src/LYUtils.c:448 src/LYUtils.c:1984 src/LYUtils.c:1985 src/LYUtils.c:1986 src/LYUtils.c:1993 src/LYUtils.c:1994 src/LYUtils.c:1995 +msgid " to search:" +msgstr " pour la recherche :" + +#: /home/sean/lynx/lynx2-6/src/LYUtils.c:443 src/LYUtils.c:1988 src/LYUtils.c:1989 src/LYUtils.c:1990 +msgid "space for more" +msgstr "Touche d'espacement pour continuer" + +#: /home/sean/lynx/lynx2-6/src/LYUtils.c:450 src/LYUtils.c:1995 src/LYUtils.c:1996 src/LYUtils.c:1997 +msgid "Type a command or ? for help:" +msgstr "Tapez une commande ou ? pour obtenir de l'aide :" + +#: /home/sean/lynx/lynx2-6/src/LYUtils.c:456 src/LYUtils.c:2001 src/LYUtils.c:2002 src/LYUtils.c:2003 +msgid "Press space for next page" +msgstr "Appuyez sur la touche d'espacement pour aller à la page suivante " + +#: /home/sean/lynx/lynx2-6/src/LYUtils.c:2216 src/LYUtils.c:4223 src/LYUtils.c:4224 src/LYUtils.c:4225 +msgid "Looking up '%s' first.\n" +msgstr "Recherche de '%s' d'abord.\n" + +#: /home/sean/lynx/lynx2-6/src/LYUtils.c:2276 src/LYUtils.c:4218 src/LYUtils.c:4219 src/LYUtils.c:4220 src/LYUtils.c:4335 src/LYUtils.c:4341 src/LYUtils.c:4342 +msgid "Looking up " +msgstr "Recherche " + +#: /home/sean/lynx/lynx2-6/src/LYUtils.c:2278 src/LYUtils.c:4337 src/LYUtils.c:4343 src/LYUtils.c:4344 +msgid ", guessing..." +msgstr ", analyse en cours..." + +#: /home/sean/lynx/lynx2-6/src/LYUtils.c:2281 src/LYUtils.c:4340 src/LYUtils.c:4346 src/LYUtils.c:4347 +msgid "Looking up '%s', guessing...\n" +msgstr "Recherche '%s', analyse en cours...\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:490 +msgid "" +"# Lynx User Defaults File\n" +"\n" +msgstr "" +"# Valeurs implicites utilisateur - Lynx\n" +"\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:495 src/LYrcFile.c:586 src/LYrcFile.c:597 +msgid "" +"# file_editor specifies the editor to be invoked when editing local files\n" +"# or sending mail. If no editor is specified, then file editing is disabled\n" +"# unless it is activated from the command line, and the built-in line editor\n" +"# will be used for sending mail.\n" +msgstr "" +"# file_editor spécifie l'éditeur pour l'édition de fichiers locaux\n" +"# ou l'envoi de courrier. Si aucun n'est précisé, l'édition de fichier est désactivée,\n" +"# à moins qu'elle soit activée de la ligne de commande, auquel cas l'éditeur de lignes\n" +"# sera utilisé pour l'envoi de courrier.\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:505 src/LYrcFile.c:596 src/LYrcFile.c:607 +msgid "" +"# bookmark_file specifies the name and location of the default bookmark\n" +"# file into which the user can paste links for easy access at a later\n" +"# date.\n" +msgstr "" +"# bookmark_file spécifie le nom et l'emplacement du fichier de signets par défaut\n" +"# dans lequel l'utilisateur peut copier des liens pour un accès rapide\n" +"# ultérieurement.\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:514 +msgid "" +"# if sub_bookmarks is not turned \"off\", and multiple bookmarks have\n" +"# been defined (see below), then all bookmark operations will first\n" +"# prompt the user to select an active sub-bookmark file. If the default\n" +"# Lynx bookmark_file is defined (see above), it will be used as the\n" +"# default selection. When this option is set to \"advanced\", and the\n" +"# user mode is advanced, the 'v'iew bookmark command will invoke a\n" +"# statusline prompt instead of the menu seen in novice and intermediate\n" +"# user modes. When this option is set to \"standard\", the menu will be\n" +"# presented regardless of user mode.\n" +msgstr "" +"# Si sub_bookmarks n'est pas réglé à «désactivé» et que des signets multiples\n" +"# ont été définis (voir ci-après), le système demande d'abord\n" +"# à l'utilisateur de choisir une sous-catégorie de signets actif. Si le fichier\n" +"# bookmark_file implicite est défini (voir ci-après), il sera utilisé comme\n" +"# sélection par défaut. Lorsque cette option n'est pas réglée à «avancé» et que le\n" +"# mode utilisateur est Avancé, la commande 'v' (visualiser les signets) appelle une\n" +"# invite de ligne d'état au lieu du menu propre aux modes utilisateur\n" +"# Novice et Intermédiaire. Lorsque l'option est réglée à «standard», le menu \n" +"# est présenté peu importe le mode utilisateur.\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:532 src/LYrcFile.c:623 src/LYrcFile.c:634 +msgid "" +"# The following allow you to define sub-bookmark files and descriptions.\n" +"# The format is multi_bookmark=,\n" +"# Up to 26 bookmark files (for the English capital letters) are allowed.\n" +"# We start with \"multi_bookmarkB\" since 'A' is the default (see above).\n" +msgstr "" +"# Vous pouvez définir des sous-catégories de signets et de descriptions.\n" +"# Le format est multi_bookmark=,\n" +"# vous pouvez définir jusque 26 fichiers de signets (l'alphabet anglais).\n" +"# commencez avec «multi_bookmarkB» puisque 'A' est le fichier implicite (voir ci-après.\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:551 src/LYrcFile.c:642 src/LYrcFile.c:653 +msgid "" +"# The file_sorting_method specifies which value to sort on when viewing\n" +"# file lists such as FTP directories. The options are:\n" +"# BY_FILENAME -- sorts on the name of the file\n" +"# BY_TYPE -- sorts on the type of the file\n" +"# BY_SIZE -- sorts on the size of the file\n" +"# BY_DATE -- sorts on the date of the file\n" +msgstr "" +"# file_sorting_method spécifie le mode de tri à utiliser pour consulter\n" +"# des listes de fichiers tels que des répertoires FTP. Les options sont:\n" +"# MOM -- tri selon le nom de fichier\n" +"# TYPE -- tri selon le type de fichier\n" +"# VOLUME -- tri selon le volume du fichier\n" +"# DATE -- tri selon la date du fichier\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:569 +msgid "" +"# personal_mail_address specifies your personal mail address. The\n" +"# address will be sent during HTTP file transfers for authorization and\n" +"# logging purposes, and for mailed comments.\n" +"# If you do not want this information given out, set the NO_FROM_HEADER\n" +"# to TRUE in lynx.cfg, or use the -nofrom command line switch. You also\n" +"# could leave this field blank, but then you won't have if it included in\n" +"# your mailed comments.\n" +msgstr "" +"# personal_mail_address spécifie votre adresse de courrier personnel.\n" +"# L'adresse est envoyée durant le transfert HTTP aux fins d'autorisation et\n" +"# de connexion, et pour l'envoi de commentaires. Pour ne pas que cette\n" +"# information soit connue, réglez le paramètre NO_FROM_HEADER à TRUE\n" +"# dans lynx.cfg, ou utilisez l'option -nofrom (ligne de commande). Vous pouvez\n" +"# laisser ce champ vierge, auquel cas cette ligne ne sera pas incluse dans\n" +"# les commentaires que vous envoyez.\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:583 src/LYrcFile.c:674 src/LYrcFile.c:685 +msgid "" +"# If case_sensitive_searching is \"on\" then when the user invokes a search\n" +"# using the 's' or '/' keys, the search performed will be case sensitive\n" +"# instead of case INsensitive. The default is usually \"off\".\n" +msgstr "" +"# Si case_sensitive_searching est réglé à «ACTIVÉ», lors d'une recherche au\n" +"# moyen des touches 's' ou '/', la recherche tient compte des maj./min. au lieu\n" +"# de reconnaître tous les caractères. La valeur par défaut est «DÉSACTIVÉ».\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:593 src/LYrcFile.c:684 src/LYrcFile.c:695 +msgid "" +"# The character_set definition controls the representation of 8 bit\n" +"# characters for your terminal. If 8 bit characters do not show up\n" +"# correctly on your screen you may try changing to a different 8 bit\n" +"# set or using the 7 bit character approximations.\n" +"# Current valid characters sets are:\n" +msgstr "" +"# Le paramètre character_set définit la représentation des caractères\n" +"# 8 bits pour votre terminal. Si un tel caractère ne s'affiche pas correctement\n" +"# à votre écran, vous pouvez essayer de changer pour un jeu de caractères 8 bits\n" +"# différent ou utiliser les caractères approximatifs 7 bits.\n" +"# Les jeux de caractères valides courants sont :\n" + +# msgid "" +# "# preferred_language specifies the language in MIME notation (e.g., en,\n" +# "# fr) which Lynx will indicate you prefer in requests to http servers.\n" +# "# If a file in that language is available, the server will send it.\n" +# "# Otherwise, the server will send the file in it's default language.\n" +# msgstr "" +# "# preferred_language spécifie la langue selon le code MIME (ex., en,\n" +# "# fr). Lynx tient compte des préférences lors des requêtes aux serveurs http.\n" +# "# Si un fichier est disponible dans la langue précisée, le serveur l'envoie.\n" +# "# Sinon, le serveur envoie le fichier dans la langue par défaut.\n" +# !!! +# becomes +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:607 +msgid "" +"# preferred_language specifies the language in MIME notation (e.g., en,\n" +"!# fr, may be a comma-separated list in decreasing preference)\n" +"!# which Lynx will indicate you prefer in requests to http servers.\n" +"# If a file in that language is available, the server will send it.\n" +"# Otherwise, the server will send the file in it's default language.\n" +msgstr "" +"# preferred_language specifies the language in MIME notation (e.g., en,\n" +"# fr, may be a comma-separated list in decreasing preference)\n" +"# which Lynx will indicate you prefer in requests to http servers.\n" +"# If a file in that language is available, the server will send it.\n" +"# Otherwise, the server will send the file in it's default language.\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:607 +msgid "" +"# preferred_language specifies the language in MIME notation (e.g., en,\n" +"# fr) which Lynx will indicate you prefer in requests to http servers.\n" +"# If a file in that language is available, the server will send it.\n" +"# Otherwise, the server will send the file in it's default language.\n" +msgstr "" +"# preferred_language spécifie la langue selon le code MIME (ex., en,\n" +"# fr). Lynx tient compte des préférences lors des requêtes aux serveurs http.\n" +"# Si un fichier est disponible dans la langue précisée, le serveur l'envoie.\n" +"# Sinon, le serveur envoie le fichier dans la langue par défaut.\n" + +# And +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:617 +msgid "" +"# preferred_charset specifies the character set in MIME notation (e.g.,\n" +"# ISO-8859-2, ISO-8859-5), which Lynx will indicate you prefer in requests\n" +"# to http servers using an Accept-Charset header. The value should NOT\n" +"# include ISO-8859-1 or US-ASCII, since those values are always assumed by\n" +"# default. If a file in that character set is available, the server will\n" +"# send it. Otherwise, the server will send the file in ISO-8859-1 or\n" +"# US-ASCII.\n" +msgstr "" +"# preferred_charset spécifie le jeu de caractères selon le code MIME (ex.,\n" +"# ISO-8859-2, ISO-8859-5). Lynx tient compte des préférences lors des requêtes aux\n" +"# serveurs http et utilise une en-tête Accept-Charset. Ne PAS inclure les valeurs\n" +"# ISO-8859-1 ou US-ASCII puisqu'elles sont toujours prises en compte par défaut.\n" +"# Si un fichier est disponible dans ce jeu de caractères, le serveur l'envoie.\n" +"# Sinon, le serveur envoie le fichier en ISO-8859-1 ou en US-ASCII.\n" + +# Then we will be having to put these on the screen. +# NdT= What about \"default\", \"on\" and \"off\" ? +# msgid "default" +# msgstr "implicite" +# msgid "on" +# msgstr "oui" +# msgid "off" +# msgstr "non" +# Then there is the little matter of when to show colours +# Oh! Except that the rc file is commented in FR, but the options +# are english. Now I get it. Ofcourse, it would not have worked anyway, +# since I did not gettext the never/always. +# msgid "never" +# msgstr "jamais" +# msgid "always" +# msgstr "toujours" +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:631 src/LYrcFile.c:754 src/LYrcFile.c:765 +msgid "" +"# If vi_keys is set to \"on\", then the normal VI movement keys:\n" +"# j = down k = up\n" +"# h = left l = right\n" +"# will be enabled. These keys are only lower case.\n" +"# Capital 'H', 'J' and 'K will still activate help, jump shortcuts,\n" +"# and the keymap display, respectively.\n" +msgstr "" +"# Si vi_keys est réglé à «ACTIVÉ», le mouvement de touches VI normal :\n" +"# j = bas k = haut\n" +"# h = gauche l = droite\n" +"# est activé. Ces touches sont en minuscule uniquement.\n" +"# Les majuscules 'H', 'J' et 'K' activent l'aide, les touches de raccourci\n" +"# et la configuration des touches respectivement.\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:643 src/LYrcFile.c:766 src/LYrcFile.c:777 +msgid "" +"# If emacs_keys is to \"on\" then the normal EMACS movement keys:\n" +"# ^N = down ^P = up\n" +"# ^B = left ^F = right\n" +"# will be enabled.\n" +msgstr "" +"# Si emacs_keys est réglé à «ACTIVÉ», le mouvement de touche EMACS normal :\n" +"# ^N = bas ^P = haut\n" +"# ^B = gauche ^F = droite\n" +"# est activé.\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:653 src/LYrcFile.c:776 src/LYrcFile.c:787 +msgid "" +"# show_dotfiles specifies that the directory listing should include\n" +"# \"hidden\" (dot) files/directories. If set \"on\", this will be\n" +"# honored only if enabled via userdefs.h and/or lynx.cfg, and not\n" +"# restricted via a command line switch. If display of hidden files\n" +"# is disabled, creation of such files via Lynx also is disabled.\n" +msgstr "" +"# Le paramètre show_dotfiles spécifie que la liste des répertoires doit inclure\n" +"# les fichiers et répertoires «cachés». S'il est réglé à «ACTIVÉ», il n'est\n" +"# pris en compte que s'il est activé dans userdefs.h et/ou lynx.cfg et s'il n'est pas\n" +"# restreint par une option de la ligne de commande. Si l'affichage des fichiers cachés\n" +"# est désactivé, la création de tels fichiers dans Lynx est aussi désactivée.\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:664 +msgid "" +"# select_popups spécifie sicifies whether the OPTIONs in a SELECT block which\n" +"# lacks a MULTIPLE attribute are presented as a vertical list of radio\n" +"# buttons or via a popup menu. Note that if the MULTIPLE attribute is\n" +"# present in the SELECT start tag, Lynx always will create a vertical list\n" +"# of checkboxes for the OPTIONs. A value of \"on\" will set popup menus\n" +"# as the default while a value of \"off\" will set use of radio boxes.\n" +"# The default can be overridden via the -popup command line toggle.\n" +msgstr "" +"# select_popups spécifie si les OPTIONs dans un bloc SELECT dépourvu d'un attribut\n" +"# MULTIPLE sont présentés comme des listes ou des boutons d'option verticaux ou comme\n" +"# un menu-éclair. Si l'attribut MULTIPLE est présent dans le codet de départ SELECT,\n" +"# Lynx crée toujours une liste verticale de cases à cocher pour les OPTIONs.\n" +"# La valeur «activé» règle le défaut à menus-éclairs alors que la valeur\n" +"# «désactivé» règle le défaut à cases d'option. La valeur par défaut peut être\n" +"# substitué au moyen de la bascule de ligne de commande -popup.\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:677 +msgid "" +"# If keypad_mode is set to \"NUMBERS_AS_ARROWS\", then the numbers on\n" +"# your keypad when the numlock is on will act as arrow keys:\n" +"# 8 = Up Arrow\n" +"# 4 = Left Arrow 6 = Right Arrow\n" +"# 2 = Down Arrow\n" +"# If keypad_mode is set to \"LINKS_ARE_NUMBERED\", then numbers will\n" +"# appear next to each link and numbers are used to select links.\n" +"# NOTE: Some fixed format documents may look disfigured when\n" +"# \"LINKS_ARE_NUMBERED\" is enabled.\n" +msgstr "" +"# Lorsque keypad_mode est réglé à «NUMBERS_AS_ARROWS», si le verrouillage numérique\n" +"# est activé, les chiffres de votre bloc numérique tiennent lieu de touches fléchées:\n" +"# 8 = Flèche Haut\n" +"# 4 = Flèche Gauche 6 = Flèche Droite\n" +"# 2 = Flèche Bas\n" +"# Si le paramètre keypad_mode est réglé à «LINKS_ARE_NUMBERED», les chiffres\n" +"# sont affichés en regard de chaque lien et ils servent à choisir les liens.\n" +"# NOTA - Certains document de format fixe peuvent être affectés lorsque\n" +"# «LINKS_ARE_NUMBERED» est activé.\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:694 +msgid "" +"# linedit_mode specifies the key binding used for inputting strings in\n" +"# prompts and forms. If lineedit_mode is set to \"Default Binding\" then\n" +"# the following control characters are used for moving and deleting:\n" +"#\n" +"# Prev Next Enter = Accept input\n" +"# Move char: <- -> ^G = Cancel input\n" +"# Move word: ^P ^N ^U = Erase line\n" +"# Delete char: ^H ^R ^A = Beginning of line\n" +"# Delete word: ^B ^F ^E = End of line\n" +"#\n" +"# Current lineedit modes are:\n" +msgstr "" +"# linedit_mode spécifie le jeu de touches utilisé pour entrer des chaînes de caractères\n" +"# aux invites et dans les formulaires. S'il est réglé à «Clavier implicite», alors\n" +"# les caractères de commande suivants servent à se déplacer et à supprimer :\n" +"#\n" +"# Préc. Suiv. Entr = Accepter l'entrée\n" +"# Dépl. car. : <- -> ^G = Annuler l'entrée\n" +"# Dépl. mot : ^P ^N ^U = Effacer la ligne\n" +"# Suppr. car. : ^H ^R ^A = Début de la ligne\n" +"# Suppr. mot : ^B ^F ^E = Fin de la ligne\n" +"#\n" +"# Les modes d'édition de ligne courants sont :\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:719 src/LYrcFile.c:871 src/LYrcFile.c:895 +msgid "" +"# dir_list_styles specifies the directory list style under DIRED_SUPPORT\n" +"# (if implemented). The default is \"MIXED_STYLE\", which sorts both\n" +"# files and directories together. \"FILES_FIRST\" lists files first and\n" +"# \"DIRECTORIES_FIRST\" lists directories first.\n" +msgstr "" +"# Le paramètre dir_list_styles spécifie le style de liste de répertoires sous DIRED_SUPPORT\n" +"# (si l'option est offerte). La valeur «MIXED_STYLE» (défaut) permet de trier fichiers\n" +"# et répertoires ensemble. La valeur «FILES_FIRST» permet de lister les fichiers d'abord\n" +"# tandis que «DIRECTORIES_FIRST» permet de lister les répertoires d'abord.\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:734 src/LYrcFile.c:886 src/LYrcFile.c:910 +msgid "" +"# user_mode specifies the users level of knowledge with Lynx. The\n" +"# default is \"NOVICE\" which displays two extra lines of help at the\n" +"# bottom of the screen to aid the user in learning the basic Lynx\n" +"# commands. Set user_mode to \"INTERMEDIATE\" to turn off the extra info.\n" +"# Use \"ADVANCED\" to see the URL of the currently selected link at the\n" +"# bottom of the screen.\n" +msgstr "" +"# Le paramètre user_mode spécifie le niveau de connaissance de Lynx par l'utilisateur. La\n" +"# valeur «NOVICE» (défaut) commande l'affichage de deux lignes supplémentaires d'aide\n" +"# au bas de l'écran pour aider l'utilisateur à apprendre les commandes Lynx\n" +"# de base. Réglez le paramètre user_mode à «INTERMEDIATE» pour éliminer ces lignes.\n" +"# Utilisez l'option «ADVANCED» pour afficher l'URL du lien sélectionné au bas\n" +"# de l'écran.\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:750 src/LYrcFile.c:940 +msgid "" +"# If run_all_execution_links is set \"on\" then all local exection links\n" +"# will be executed when they are selected.\n" +"#\n" +"# WARNING - This is potentially VERY dangerous. Since you may view\n" +"# information that is written by unknown and untrusted sources\n" +"# there exists the possibility that Trojan horse links could be\n" +"# written. Trojan horse links could be written to erase files\n" +"# or compromise security. This should only be set to \"on\" if\n" +"# you are viewing trusted source information.\n" +msgstr "" +"# Si 'run_all_execution_links' est réglé à «activé», tous les liens exécutables\n" +"# locaux sont exécutés lorsqu'ils sont choisis.\n" +"#\n" +"# AVIS - Cette option est potentiellement très dangereuse car elle permet de\n" +"# voir de l'information écrite par des sources inconnues ou non fiables.\n" +"# Il existe un danger que des fichiers Cheval de Troie soient inclus.\n" +"# Les fichiers troyens peuvent provoquer l'effacement de fichiers ou\n" +"# compromettre la sécurité. Cette fonction devrait être réglée à\n" +"# «activé» uniquement si vous consultez de l'information fiable.\n" + +#: /home/sean/lynx/lynx2-6/src/LYrcFile.c:766 src/LYrcFile.c:956 src/LYrcFile.c:980 +msgid "" +"# If run_execution_links_on_local_files is set \"on\" then all local\n" +"# execution links that are found in LOCAL files will be executed when they\n" +"# are selected. This is different from run_all_execution_links in that\n" +"# only files that reside on the local system will have execution link\n" +"# permissions.\n" +"#\n" +"# WARNING - This is potentially dangerous. Since you may view\n" +"# information that is written by unknown and untrusted sources\n" +"# there exists the possibility that Trojan horse links could be\n" +"# written. Trojan horse links could be written to erase files\n" +"# or compromise security. This should only be set to \"on\" if\n" +"# you are viewing trusted source information.\n" +msgstr "" +"# Si 'run_execution_links_on_local_files' est réglé à «activé», tous les liens\n" +"# exécutables qui se trouvent dans des fichiers LOCAUX seront exécutés lorsque\n" +"# choisis. Cette option est différente de 'run_all_execution_links' en ce que\n" +"# les permissions d'accès sont accordées uniquement pour les fichiers hébergés\n" +"# sur le serveur local.\n" +"#\n" +"# AVIS - Cette option est potentiellement très dangereuse car elle permet de\n" +"# voir de l'information écrite par des sources inconnues ou non fiables.\n" +"# Il existe un danger que des fichiers Cheval de Troie soient inclus.\n" +"# Les fichiers troyens peuvent provoquer l'effacement de fichiers ou\n" +"# compromettre la sécurité. Cette fonction devrait être réglée à\n" +"# «activé» uniquement si vous consultez de l'information fiable.\n" + +#: LYMainLoop.c:1079 +msgid "-more- -index- %s" +msgstr "-suite- -index- %s" + +# msgid "Directory browsing is not allowed." +# msgstr "Cette fonction n'est pas autorisée." +# msgid "This directory is not readable." +# msgstr "Ce répertoire ne peut être consulté." +# ## ------------ Below this point all strings need translation ------ +# sprintf(msg, _("Username for '%s' at %s '%s%s':"), +# realm->realmname, +# (IsProxy ? "proxy" : "server"), +# (theHost ? theHost : "??"), +# (thePort ? thePort : "")); +#: WWW/Library/Implementation/HTAABrow.c:652 +msgid "Username for '%s' at %s '%s%s':" +msgstr "TR-Username for '%s' at %s '%s%s':" + +#: WWW/Library/Implementation/HTAABrow.c:917 +msgid "This client doesn't know how to compose proxy authorization information for scheme" +msgstr "" + +#: WWW/Library/Implementation/HTAABrow.c:991 +msgid "This client doesn't know how to compose authorization information for scheme" +msgstr "" + +#: WWW/Library/Implementation/HTAABrow.c:1101 +msgid "Invalid header '%s%s%s%s%s'" +msgstr "" + +#: WWW/Library/Implementation/HTAABrow.c:1172 +msgid "Authorization failed. Retry?" +msgstr "" + +# WWW/Libary/Implementation/HTAABrow.c +#: WWW/Library/Implementation/HTAABrow.c:1205 +msgid "Proxy authorization required -- retrying" +msgstr "Autorisation du mandataire requise - nouvelle tentative" + +#: WWW/Library/Implementation/HTAABrow.c:1264 +msgid "Access without authorization denied -- retrying" +msgstr "Accès non autorisé refusé - nouvelle tentative" + +#: WWW/Library/Implementation/HTAAProt.c:327 +msgid "Mask group syntax error" +msgstr "" + +#: WWW/Library/Implementation/HTAccess.c:678 WWW/Library/Implementation/HTAccess.c:687 WWW/Library/Implementation/HTAccess.c:722 WWW/Library/Implementation/HTAccess.c:731 +msgid "Redirection limit of 10 URL's reached." +msgstr "Réacheminement : limite de 10 URL atteinte." + +# WWW/Libary/Implementation/HTAccess.c +#: WWW/Library/Implementation/HTAccess.c:697 WWW/Library/Implementation/HTAccess.c:706 +msgid "Document with POST content not found in cache. Resubmit?" +msgstr "Document avec contenu POST non trouvé dans l'antémémoire. Recommencer?" + +#: WWW/Library/Implementation/HTAccess.c:937 WWW/Library/Implementation/HTAccess.c:946 +msgid "Loading incomplete." +msgstr "Chargement incomplet." + +#: WWW/Library/Implementation/HTAccess.c:967 WWW/Library/Implementation/HTAccess.c:976 +msgid "**** HTAccess: socket or file number returned by obsolete load routine!\n" +msgstr "" + +#: WWW/Library/Implementation/HTAccess.c:969 WWW/Library/Implementation/HTAccess.c:978 +msgid "**** HTAccess: Internal software error. Please mail lynx_dev@sig.net!\n" +msgstr "" + +#: WWW/Library/Implementation/HTAccess.c:970 WWW/Library/Implementation/HTAccess.c:979 +msgid "**** HTAccess: Status returned was: %d\n" +msgstr "" + +#: WWW/Library/Implementation/HTAccess.c:983 WWW/Library/Implementation/HTAccess.c:992 +msgid "Unable to access document." +msgstr "Impossible d'accéder au document." + +#: WWW/Library/Implementation/HTFTP.c:681 +msgid "Enter password for user %s@%s:" +msgstr "" + +#: WWW/Library/Implementation/HTFTP.c:705 WWW/Library/Implementation/HTFTP.c:737 WWW/Library/Implementation/HTFTP.c:775 WWW/Library/Implementation/HTFTP.c:839 WWW/Library/Implementation/HTFTP.c:853 WWW/Library/Implementation/HTFTP.c:2596 WWW/Library/Implementation/HTFinger.c:186 WWW/Library/Implementation/HTFinger.c:187 WWW/Library/Implementation/HTFinger.c:388 WWW/Library/Implementation/HTFinger.c:389 WWW/Library/Implementation/HTNews.c:361 WWW/Library/Implementation/HTNews.c:362 WWW/Library/Implementation/HTNews.c:445 WWW/Library/Implementation/HTNews.c:446 WWW/Library/Implementation/HTNews.c:2340 WWW/Library/Implementation/HTNews.c:2344 WWW/Library/Implementation/HTNews.c:2388 WWW/Library/Implementation/HTNews.c:2402 WWW/Library/Implementation/HTNews.c:2478 WWW/Library/Implementation/HTNews.c:2493 WWW/Library/Implementation/HTNews.c:2501 WWW/Library/Implementation/HTNews.c:2507 WWW/Library/Implementation/HTNews.c:2522 WWW/Library/Implementation/HTNews.c:2530 +#: WWW/Library/Implementation/HTNews.c:2635 WWW/Library/Implementation/HTNews.c:2669 WWW/Library/Implementation/HTTP.c:177 WWW/Library/Implementation/HTTP.c:187 WWW/Library/Implementation/HTTP.c:652 WWW/Library/Implementation/HTTP.c:662 WWW/Library/Implementation/HTTP.c:1075 WWW/Library/Implementation/HTTP.c:1085 +msgid "Connection interrupted." +msgstr "Connexion interrompue." + +#: WWW/Library/Implementation/HTFTP.c:708 +msgid "Unable to connect to FTP host." +msgstr "Impossible d'établir une connexion à l'hôte FTP" + +#: WWW/Library/Implementation/HTFTP.c:2302 +msgid "Receiving FTP directory." +msgstr "" + +#: WWW/Library/Implementation/HTFTP.c:2425 WWW/Library/Implementation/HTGopher.c:273 WWW/Library/Implementation/HTGopher.c:274 +msgid "Transferred %d bytes" +msgstr "" + +#: WWW/Library/Implementation/HTFTP.c:2533 WWW/Library/Implementation/HTFTP.c:3233 WWW/Library/Implementation/HTFormat.c:547 WWW/Library/Implementation/HTFormat.c:561 WWW/Library/Implementation/HTFormat.c:562 WWW/Library/Implementation/HTFormat.c:563 WWW/Library/Implementation/HTFormat.c:565 WWW/Library/Implementation/HTFormat.c:576 WWW/Library/Implementation/HTFormat.c:578 WWW/Library/Implementation/HTFormat.c:580 WWW/Library/Implementation/HTFormat.c:666 WWW/Library/Implementation/HTFormat.c:680 WWW/Library/Implementation/HTFormat.c:682 WWW/Library/Implementation/HTFormat.c:684 WWW/Library/Implementation/HTFormat.c:733 WWW/Library/Implementation/HTFormat.c:747 WWW/Library/Implementation/HTFormat.c:749 WWW/Library/Implementation/HTFormat.c:751 +msgid "Data transfer interrupted." +msgstr "Transfert de données interrompu" + +#: WWW/Library/Implementation/HTFTP.c:2650 +msgid "connect for data" +msgstr "" + +#: WWW/Library/Implementation/HTFTP.c:3229 +msgid "Receiving FTP file." +msgstr "" + +#: WWW/Library/Implementation/HTFWriter.c:241 WWW/Library/Implementation/HTFWriter.c:242 +msgid "Can't save data to file -- please run WWW locally" +msgstr "" + +#: WWW/Library/Implementation/HTFWriter.c:259 WWW/Library/Implementation/HTFWriter.c:260 src/HTFWriter.c:548 src/HTFWriter.c:564 src/HTFWriter.c:986 src/HTFWriter.c:1002 src/HTInit.c:537 src/HTInit.c:543 src/LYDownload.c:594 src/LYDownload.c:605 src/LYHistory.c:377 src/LYHistory.c:401 src/LYHistory.c:522 src/LYHistory.c:548 src/LYList.c:74 src/LYNews.c:71 src/LYNews.c:72 src/LYNews.c:83 src/LYNews.c:84 src/LYReadCFG.c:1249 src/LYShowInfo.c:45 src/LYShowInfo.c:90 src/LYShowInfo.c:106 src/LYUpload.c:220 src/LYUpload.c:221 src/LYUtils.c:5871 +msgid "Can't open temporary file!" +msgstr "Impossible d'ouvrir le fichier temporaire!" + +#: WWW/Library/Implementation/HTFinger.c:265 WWW/Library/Implementation/HTFinger.c:266 WWW/Library/Implementation/HTFinger.c:295 WWW/Library/Implementation/HTFinger.c:296 WWW/Library/Implementation/HTFinger.c:303 WWW/Library/Implementation/HTFinger.c:304 +msgid "Could not load data." +msgstr "" + +#: WWW/Library/Implementation/HTFinger.c:272 WWW/Library/Implementation/HTFinger.c:273 +msgid "Could not set up finger connection." +msgstr "" + +#: WWW/Library/Implementation/HTFinger.c:317 WWW/Library/Implementation/HTFinger.c:318 +msgid "Could not load data (no sitename in finger URL)" +msgstr "" + +#: WWW/Library/Implementation/HTFinger.c:325 WWW/Library/Implementation/HTFinger.c:326 +msgid "Invalid port number - will only use port 79!" +msgstr "" + +#: WWW/Library/Implementation/HTFinger.c:397 WWW/Library/Implementation/HTFinger.c:398 +msgid "Could not access finger host." +msgstr "" + +#: WWW/Library/Implementation/HTFinger.c:408 WWW/Library/Implementation/HTFinger.c:409 +msgid "No response from finger server." +msgstr "" + +#: WWW/Library/Implementation/HTFormat.c:612 WWW/Library/Implementation/HTFormat.c:626 WWW/Library/Implementation/HTFormat.c:628 WWW/Library/Implementation/HTFormat.c:630 +msgid "Data transfer complete" +msgstr "Transfert de données terminé" + +#: WWW/Library/Implementation/HTFormat.c:813 WWW/Library/Implementation/HTFormat.c:827 WWW/Library/Implementation/HTFormat.c:829 WWW/Library/Implementation/HTFormat.c:831 WWW/Library/Implementation/HTFormat.c:861 WWW/Library/Implementation/HTFormat.c:875 WWW/Library/Implementation/HTFormat.c:877 WWW/Library/Implementation/HTFormat.c:879 WWW/Library/Implementation/HTFormat.c:929 WWW/Library/Implementation/HTFormat.c:943 WWW/Library/Implementation/HTFormat.c:945 WWW/Library/Implementation/HTFormat.c:947 +msgid "Sorry, can't convert from %s to %s." +msgstr "Désolé, impossible de convertir de %s à %s" + +#: WWW/Library/Implementation/HTGopher.c:237 WWW/Library/Implementation/HTGopher.c:238 WWW/Library/Implementation/HTGopher.c:249 WWW/Library/Implementation/HTGopher.c:250 +msgid "Gopher Menu" +msgstr "" + +#: WWW/Library/Implementation/HTGopher.c:476 WWW/Library/Implementation/HTGopher.c:477 +msgid "CSO Search Results" +msgstr "" + +#: WWW/Library/Implementation/HTGopher.c:486 WWW/Library/Implementation/HTGopher.c:487 +msgid " Search Results" +msgstr "" + +#: WWW/Library/Implementation/HTGopher.c:619 WWW/Library/Implementation/HTGopher.c:620 +msgid "CSO index" +msgstr "" + +#: WWW/Library/Implementation/HTGopher.c:634 WWW/Library/Implementation/HTGopher.c:635 +msgid "" +"\n" +"This is a searchable index of a CSO database.\n" +msgstr "" + +#: WWW/Library/Implementation/HTGopher.c:636 WWW/Library/Implementation/HTGopher.c:637 +msgid "" +"\n" +"Press the 's' key and enter search keywords.\n" +msgstr "" + +#: WWW/Library/Implementation/HTGopher.c:638 WWW/Library/Implementation/HTGopher.c:639 +msgid "" +"\n" +"The keywords that you enter will allow you to search on a" +msgstr "" + +#: WWW/Library/Implementation/HTGopher.c:639 WWW/Library/Implementation/HTGopher.c:640 +msgid " person's name in the database.\n" +msgstr "" + +#: WWW/Library/Implementation/HTGopher.c:664 WWW/Library/Implementation/HTGopher.c:665 +msgid "Gopher index" +msgstr "" + +#: WWW/Library/Implementation/HTGopher.c:676 WWW/Library/Implementation/HTGopher.c:677 +msgid " index" +msgstr "" + +#: WWW/Library/Implementation/HTGopher.c:679 WWW/Library/Implementation/HTGopher.c:680 +msgid "" +"\n" +"This is a searchable Gopher index.\n" +msgstr "" + +#: WWW/Library/Implementation/HTGopher.c:681 WWW/Library/Implementation/HTGopher.c:682 +msgid "" +"\n" +"Please enter search keywords.\n" +msgstr "" + +#: WWW/Library/Implementation/HTGopher.c:1192 WWW/Library/Implementation/HTGopher.c:1193 +msgid "Seek fail on %s\n" +msgstr "" + +#: WWW/Library/Implementation/HTGopher.c:1532 WWW/Library/Implementation/HTGopher.c:1533 +msgid "No response from server!" +msgstr "" + +#: WWW/Library/Implementation/HTGopher.c:1544 WWW/Library/Implementation/HTGopher.c:1545 WWW/Library/Implementation/HTTP.c:1667 WWW/Library/Implementation/HTTP.c:1677 src/LYCgi.c:315 src/LYCgi.c:316 src/LYCookie.c:2261 src/LYCookie.c:2278 src/LYCookie.c:2332 src/LYKeymap.c:701 src/LYMap.c:520 src/LYMap.c:522 +msgid "Sorry, no known way of converting %s to %s." +msgstr "Désolé. Aucun moyen connu de convertir %s to %s. " + +#: WWW/Library/Implementation/HTMIME.c:2105 WWW/Library/Implementation/HTMIME.c:2112 WWW/Library/Implementation/HTMIME.c:2142 +msgid "%s: cannot open %s\n" +msgstr "%s: Impossible d'ouvrir %s\n" + +# msgid "Sorry, can't convert from %s to %s." +# msgstr "Désolé, impossible de convertir de %s à %s." +#: WWW/Library/Implementation/HTNews.c:350 WWW/Library/Implementation/HTNews.c:351 csuite/bin/lynx/WWW/Library/Implementation/HTFormat.c:1000 +msgid "Username for news host '%s':" +msgstr "Nom d'utilisateur pour l'hôte de forums '%s' :" + +#: WWW/Library/Implementation/HTNews.c:363 WWW/Library/Implementation/HTNews.c:364 WWW/Library/Implementation/HTNews.c:447 WWW/Library/Implementation/HTNews.c:448 +msgid "Connection closed ???" +msgstr "Connexion terminée ???" + +#: WWW/Library/Implementation/HTNews.c:403 WWW/Library/Implementation/HTNews.c:404 +msgid "Change username?" +msgstr "Modifier le nom d'utilisateur?" + +#: WWW/Library/Implementation/HTNews.c:434 WWW/Library/Implementation/HTNews.c:435 +msgid "Password for news host '%s':" +msgstr "Mot de passe pour l'hôte de forums '%s' :" + +#: WWW/Library/Implementation/HTNews.c:517 WWW/Library/Implementation/HTNews.c:518 +msgid "Change password?" +msgstr "Changer le mot de passe?" + +#: WWW/Library/Implementation/HTNews.c:826 WWW/Library/Implementation/HTNews.c:827 +msgid "Cannot open temporary file for news POST." +msgstr "Impossible d'ouvrir un fichier temporaire pour les articles de forums." + +#: WWW/Library/Implementation/HTNews.c:1540 WWW/Library/Implementation/HTNews.c:1544 +msgid "No matches for: %s" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1591 WWW/Library/Implementation/HTNews.c:1595 +msgid "" +"\n" +"No articles in this group.\n" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1604 WWW/Library/Implementation/HTNews.c:1608 +msgid "" +"\n" +"No articles in this range.\n" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1617 WWW/Library/Implementation/HTNews.c:1621 +msgid "%s, Articles %d-%d" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1638 WWW/Library/Implementation/HTNews.c:1642 +msgid "Earlier articles" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1651 WWW/Library/Implementation/HTNews.c:1655 +msgid "" +"\n" +"There are about %d articles currently available in %s, IDs as follows:\n" +"\n" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1709 WWW/Library/Implementation/HTNews.c:1713 +msgid "All available articles in " +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1919 WWW/Library/Implementation/HTNews.c:1923 +msgid "Later articles" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1943 WWW/Library/Implementation/HTNews.c:1947 +msgid "Post to " +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2031 WWW/Library/Implementation/HTNews.c:2035 +msgid "This client does not contain support for posting to news with SSL." +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2044 WWW/Library/Implementation/HTNews.c:2048 +msgid "Invalid URL!" +msgstr "URL invalide!" + +#: WWW/Library/Implementation/HTNews.c:2121 WWW/Library/Implementation/HTNews.c:2125 +msgid "This client does not contain support for SNEWS URLs." +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2302 WWW/Library/Implementation/HTNews.c:2306 +msgid "No target for raw text!" +msgstr "Aucune cible pour le texte brut!" + +#: WWW/Library/Implementation/HTNews.c:2332 WWW/Library/Implementation/HTNews.c:2336 +msgid "Connecting to NewsHost ..." +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2363 WWW/Library/Implementation/HTNews.c:2372 +msgid "Could not access %s." +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2407 WWW/Library/Implementation/HTNews.c:2426 +msgid "Can't read news info. News host %.20s responded: %.200s" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2417 WWW/Library/Implementation/HTNews.c:2436 WWW/Library/Implementation/HTNews.c:2438 WWW/Library/Implementation/HTNews.c:2462 WWW/Library/Implementation/HTNews.c:2590 WWW/Library/Implementation/HTNews.c:2619 +msgid "Cannot POST to this host." +msgstr "Impossible d'envoyer des articles vers cet hôte." + +#: WWW/Library/Implementation/HTNews.c:2456 WWW/Library/Implementation/HTNews.c:2485 +msgid "Cancelled!" +msgstr "Annulé!" + +#: WWW/Library/Implementation/HTNews.c:2603 WWW/Library/Implementation/HTNews.c:2637 +msgid "Reading list of available newsgroups." +msgstr "Lecture de la liste des forums disponibles." + +#: WWW/Library/Implementation/HTNews.c:2625 WWW/Library/Implementation/HTNews.c:2659 +msgid "Reading list of articles in newsgroup." +msgstr "Lecture de la liste des articles du forum." + +#: WWW/Library/Implementation/HTNews.c:2631 WWW/Library/Implementation/HTNews.c:2665 +msgid "Reading news article." +msgstr "Lecture d'articles de forums." + +#: WWW/Library/Implementation/HTRules.c:334 +msgid "HTRule: Insufficient operands: %s\n" +msgstr "" + +#: WWW/Library/Implementation/HTRules.c:372 +msgid "HTRule: Bad rule `%s'\n" +msgstr "" + +#: WWW/Library/Implementation/HTStyle.c:145 +msgid "Style %d `%s' SGML:%s. Font %s %.1f point.\n" +msgstr "" + +#: WWW/Library/Implementation/HTStyle.c:153 +msgid "" +"\tIndents: first=%.0f others=%.0f, Height=%.1f Desc=%.1f\n" +"\tAlign=%d, %d tabs. (%.0f before, %.0f after)\n" +msgstr "" + +#: WWW/Library/Implementation/HTStyle.c:165 +msgid "\t\tTab kind=%d at %.0f\n" +msgstr "" + +# %s will be a hostname +#: WWW/Library/Implementation/HTTCP.c:747 WWW/Library/Implementation/HTTCP.c:748 WWW/Library/Implementation/HTTCP.c:786 WWW/Library/Implementation/HTTCP.c:846 +msgid "Looking up %s." +msgstr "Recherche de %s" + +#: WWW/Library/Implementation/HTTCP.c:752 WWW/Library/Implementation/HTTCP.c:753 WWW/Library/Implementation/HTTCP.c:791 WWW/Library/Implementation/HTTCP.c:851 +msgid "Unable to locate remote host %s." +msgstr "Impossible de localiser l'hôte distant %s" + +# First %s will be FTP, HTTP or other protocol and second %s will be hostname +#: WWW/Library/Implementation/HTTCP.c:761 WWW/Library/Implementation/HTTCP.c:762 WWW/Library/Implementation/HTTCP.c:800 WWW/Library/Implementation/HTTCP.c:860 +msgid "Making %s connection to %s." +msgstr "Connexion %s à %s " + +#: WWW/Library/Implementation/HTTCP.c:770 WWW/Library/Implementation/HTTCP.c:771 WWW/Library/Implementation/HTTCP.c:809 WWW/Library/Implementation/HTTCP.c:869 +msgid "socket failed." +msgstr "" + +#: WWW/Library/Implementation/HTTCP.c:790 WWW/Library/Implementation/HTTCP.c:791 WWW/Library/Implementation/HTTCP.c:829 WWW/Library/Implementation/HTTCP.c:889 +msgid "Could not make connection non-blocking." +msgstr "" + +#: WWW/Library/Implementation/HTTCP.c:844 WWW/Library/Implementation/HTTCP.c:845 WWW/Library/Implementation/HTTCP.c:883 WWW/Library/Implementation/HTTCP.c:943 +msgid "Connection failed for 180,000 tries." +msgstr "" + +#: WWW/Library/Implementation/HTTCP.c:979 WWW/Library/Implementation/HTTCP.c:980 WWW/Library/Implementation/HTTCP.c:1018 WWW/Library/Implementation/HTTCP.c:1078 +msgid "Could not restore socket to blocking." +msgstr "" + +#: WWW/Library/Implementation/HTTCP.c:1022 WWW/Library/Implementation/HTTCP.c:1023 WWW/Library/Implementation/HTTCP.c:1061 WWW/Library/Implementation/HTTCP.c:1121 +msgid "Socket read failed for 180,000 tries." +msgstr "" + +# END of the K)eymap +# Following are from the WWW library and are mostly progress messages +#: WWW/Library/Implementation/HTTP.c:134 WWW/Library/Implementation/HTTP.c:139 WWW/Library/Implementation/HTTP.c:144 WWW/Library/Implementation/HTTP.c:149 +msgid "Bad request." +msgstr "Demande erronée" + +#: WWW/Library/Implementation/HTTP.c:167 WWW/Library/Implementation/HTTP.c:177 +msgid "This client does not contain support for HTTPS URLs." +msgstr "Ce client n'est pas conçu pour traiter les URL HTTPS" + +#: WWW/Library/Implementation/HTTP.c:184 WWW/Library/Implementation/HTTP.c:194 +msgid "Unable to connect to remote host." +msgstr "Impossible d'établir une connexion à l'hôte distant" + +#: WWW/Library/Implementation/HTTP.c:435 WWW/Library/Implementation/HTTP.c:445 WWW/Library/Implementation/HTTP.c:530 WWW/Library/Implementation/HTTP.c:540 +msgid "Proceed without a username and password?" +msgstr "Procéder sans id-utilisateur et mot de passe?" + +#: WWW/Library/Implementation/HTTP.c:440 WWW/Library/Implementation/HTTP.c:450 WWW/Library/Implementation/HTTP.c:538 WWW/Library/Implementation/HTTP.c:548 +msgid "Can't proceed without a username and password." +msgstr "Impossible de procéder sans id-utilisateur et mot de passe." + +#: WWW/Library/Implementation/HTTP.c:586 WWW/Library/Implementation/HTTP.c:596 +msgid "Sending HTTP request." +msgstr "Envoi de la requête HTTP" + +#: WWW/Library/Implementation/HTTP.c:603 WWW/Library/Implementation/HTTP.c:613 WWW/Library/Implementation/HTTP.c:671 WWW/Library/Implementation/HTTP.c:681 WWW/Library/Implementation/HTTP.c:747 WWW/Library/Implementation/HTTP.c:757 WWW/Library/Implementation/HTTP.c:1709 WWW/Library/Implementation/HTTP.c:1719 +msgid "Retrying as HTTP0 request." +msgstr "Nouvel essai de requête HTTP0" + +#: WWW/Library/Implementation/HTTP.c:612 WWW/Library/Implementation/HTTP.c:622 +msgid "Unexpected network write error; connection aborted." +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:618 WWW/Library/Implementation/HTTP.c:628 +msgid "HTTP request sent; waiting for response." +msgstr "Demande acheminée au serveur. Veuillez attendre" + +# END of Permit FORM +# More progress strings follow +#: WWW/Library/Implementation/HTTP.c:676 WWW/Library/Implementation/HTTP.c:686 +msgid "Unexpected network read error; connection aborted." +msgstr "Erreur de lecture inattendue; connexion interrompue" + +#: WWW/Library/Implementation/HTTP.c:860 WWW/Library/Implementation/HTTP.c:870 +msgid "Got unexpected Informational Status." +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:894 WWW/Library/Implementation/HTTP.c:904 WWW/Library/Implementation/HTTP.c:937 +msgid "Request fulfilled. Reset Content." +msgstr "Requête fructueuse. Restauration du contenu." + +#: WWW/Library/Implementation/HTTP.c:984 WWW/Library/Implementation/HTTP.c:994 +msgid "Got unexpected 304 Not Modified status." +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:1053 WWW/Library/Implementation/HTTP.c:1063 +msgid "Redirection of POST content requires user approval." +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:1089 WWW/Library/Implementation/HTTP.c:1099 csuite/bin/lynx/WWW/Library/Implementation/HTTP.c:976 +msgid "Have POST content. Treating Permanent Redirection as Temporary.\n" +msgstr "Contenu POST; réacheminement permanent traité comme temporaire.\n" + +#: WWW/Library/Implementation/HTTP.c:1313 WWW/Library/Implementation/HTTP.c:1323 +msgid "Got redirection with a bad Location header." +msgstr "Réacheminement assorti d'un en-tête d'emplacement incorrect." + +#: WWW/Library/Implementation/HTTP.c:1412 WWW/Library/Implementation/HTTP.c:1422 +msgid "Got redirection with no Location header." +msgstr "" + +# msgid "Connection interrupted." +# msgstr "Connexion interrompue" +#: WWW/Library/Implementation/HTTP.c:1467 WWW/Library/Implementation/HTTP.c:1477 +msgid "Retrying with access authorization information." +msgstr "Nouvel essai avec information d'autorisation d'accès" + +#: WWW/Library/Implementation/HTTP.c:1472 WWW/Library/Implementation/HTTP.c:1482 +msgid "Show the 401 message body?" +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:1477 WWW/Library/Implementation/HTTP.c:1487 +msgid "Can't retry with authorization! Contact the server's WebMaster." +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:1514 WWW/Library/Implementation/HTTP.c:1524 +msgid "Retrying with proxy authorization information." +msgstr "Nouvelle tentative avec info d'autorisation du mandataire" + +#: WWW/Library/Implementation/HTTP.c:1519 WWW/Library/Implementation/HTTP.c:1529 +msgid "Show the 407 message body?" +msgstr "Afficher le corps du message 407?" + +#: WWW/Library/Implementation/HTTP.c:1533 WWW/Library/Implementation/HTTP.c:1543 +msgid "Can't retry with proxy authorization! Contact the server's WebMaster." +msgstr "Impossible sans autorisation du mandataire; contacter le webmestre." + +#: WWW/Library/Implementation/HTTP.c:1625 WWW/Library/Implementation/HTTP.c:1635 +msgid "Unknown status reply from server!" +msgstr "" + +#: WWW/Library/Implementation/HTVMSUtils.c:914 WWW/Library/Implementation/HTVMSUtils.c:915 +msgid "Building directory listing..." +msgstr "Création des listes de répertoire..." + +#: WWW/Library/Implementation/HTWAIS.c:198 +msgid "Diagnostic code is " +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:470 +msgid "Index " +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:474 +msgid " contains the following %d item%s relevant to \"" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:482 +msgid "The first figure after each entry is its relative score, " +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:483 +msgid "the second is the number of lines in the item." +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:524 +msgid " (bad file name)" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:546 +msgid "(bad doc id)" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:562 +msgid "(Short Header record, can't display)" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:569 +msgid "" +"\n" +"Long Header record, can't display\n" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:576 +msgid "" +"\n" +"Text record\n" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:585 +msgid "" +"\n" +"Headline record, can't display\n" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:593 +msgid "" +"\n" +"Code record, can't display\n" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:763 WWW/Library/Implementation/HTWAIS.c:829 +msgid "Enter WAIS query: " +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:769 +msgid " (WAIS Index)" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:776 +msgid "WAIS Index: " +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:782 +msgid "This is a link for searching the " +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:786 +msgid " WAIS Index.\n" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:812 +msgid "" +"\n" +"Enter the 's'earch command and then specify search words.\n" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:833 +msgid " (in " +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:842 +msgid "WAIS Search of \"" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:846 +msgid "\" in: " +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:1027 +msgid "No text was returned!\n" +msgstr "" + +#: WWW/Library/Implementation/HTWSRC.c:286 +msgid " NOT GIVEN in source file; " +msgstr "" + +#: WWW/Library/Implementation/HTWSRC.c:327 +msgid "Access links" +msgstr "" + +#: WWW/Library/Implementation/HTWSRC.c:344 +msgid "Direct access" +msgstr "" + +#: WWW/Library/Implementation/HTWSRC.c:347 +msgid " (or via proxy server, if defined)" +msgstr "" + +#: WWW/Library/Implementation/HTWSRC.c:361 +msgid "Maintainer" +msgstr "" + +#: WWW/Library/Implementation/HTWSRC.c:369 +msgid "Host" +msgstr "" + +# src/GridText.c +#: src/GridText.c:335 +msgid "Memory exhausted, display interrupted!" +msgstr "Mémoire insuffisante; interruption de l'affichage." + +#: src/GridText.c:340 +msgid "Memory exhausted, will interrupt transfer!" +msgstr "" + +#: src/GridText.c:1511 +msgid "Maximum links per page exceeded! Use half-page or two-line scrolling." +msgstr "Nombre maximum dépassé. Utilisez le défilement demi-page ou double lignes" + +# msgid "\n\nError drawing page!\nBad HText structure!\n" +# msgstr "\n\nImpossible de générer la page.\nStructure HText erronée.\n" +# msgid "\n Document is empty" +# msgstr "\n Le document est vide" +#: src/GridText.c:2110 +msgid " *** MEMORY EXHAUSTED ***" +msgstr " *** MÉMOIRE INSUFFISANTE ***" + +#: src/GridText.c:3484 src/GridText.c:3485 src/GridText.c:3488 src/GridText.c:3491 src/GridText.c:3492 src/GridText.c:3495 src/LYList.c:247 +msgid "unknown field or link" +msgstr "champ ou lien inconnu" + +#: src/GridText.c:3500 src/GridText.c:3501 src/GridText.c:3504 +msgid "text entry field" +msgstr "champ de saisie de texte" + +#: src/GridText.c:3503 src/GridText.c:3504 src/GridText.c:3507 +msgid "password entry field" +msgstr "champ d'entrée du mot de passe" + +#: src/GridText.c:3506 src/GridText.c:3507 src/GridText.c:3510 +msgid "checkbox" +msgstr "case d'option" + +#: src/GridText.c:3509 src/GridText.c:3510 src/GridText.c:3513 +msgid "radio button" +msgstr "bouton d'option" + +#: src/GridText.c:3512 src/GridText.c:3513 src/GridText.c:3516 +msgid "submit button" +msgstr "bouton Envoyer" + +#: src/GridText.c:3515 src/GridText.c:3516 src/GridText.c:3519 +msgid "reset button" +msgstr "bouton Effacer" + +#: src/GridText.c:3518 src/GridText.c:3519 src/GridText.c:3522 +msgid "popup menu" +msgstr "menu éclair" + +#: src/GridText.c:3521 src/GridText.c:3522 src/GridText.c:3525 +msgid "hidden form field" +msgstr "champ de formulaire caché" + +#: src/GridText.c:3524 src/GridText.c:3525 src/GridText.c:3528 +msgid "text entry area" +msgstr "zone d'entrée de texte" + +#: src/GridText.c:3527 src/GridText.c:3528 src/GridText.c:3531 +msgid "range entry field" +msgstr "champ de saisie (range)" + +#: src/GridText.c:3530 src/GridText.c:3531 src/GridText.c:3534 +msgid "file entry field" +msgstr "champ de saisie (file)" + +#: src/GridText.c:3533 src/GridText.c:3534 src/GridText.c:3537 +msgid "text-submit field" +msgstr "champ d'envoi (texte)" + +#: src/GridText.c:3536 src/GridText.c:3537 src/GridText.c:3540 +msgid "image-submit button" +msgstr "bouton d'envoi (image)" + +#: src/GridText.c:3539 src/GridText.c:3540 src/GridText.c:3543 +msgid "keygen field" +msgstr "champ «keygen»" + +#: src/GridText.c:3542 src/GridText.c:3543 src/GridText.c:3546 +msgid "unknown form field" +msgstr "champ de formulaire inconnu" + +#: src/GridText.c:4570 src/GridText.c:4571 src/GridText.c:4601 src/GridText.c:4602 src/GridText.c:4632 src/GridText.c:4633 src/LYForms.c:1293 src/LYForms.c:1347 src/LYOptions.c:2880 src/LYOptions.c:2884 src/LYOptions.c:2940 src/LYSearch.c:270 src/LYSearch.c:322 +msgid "Edit the current query: " +msgstr "Éditer la recherche en cours :" + +#: src/GridText.c:4604 src/GridText.c:4605 src/GridText.c:4635 src/GridText.c:4636 src/LYForms.c:1297 src/LYForms.c:1352 src/LYOptions.c:2884 src/LYOptions.c:2888 src/LYOptions.c:2939 src/LYOptions.c:2943 src/LYOptions.c:2944 src/LYOptions.c:2999 src/LYSearch.c:273 src/LYSearch.c:325 +msgid "Edit the previous query: " +msgstr "Éditer la recherche précédente :" + +#: src/GridText.c:4606 src/GridText.c:4607 src/GridText.c:4637 src/GridText.c:4638 src/LYForms.c:1299 src/LYForms.c:1354 src/LYOptions.c:2886 src/LYOptions.c:2890 src/LYOptions.c:2941 src/LYOptions.c:2945 src/LYOptions.c:2946 src/LYOptions.c:3001 src/LYSearch.c:275 src/LYSearch.c:327 +msgid "Edit a previous query: " +msgstr "Éditer une recherche précédente :" + +#: src/GridText.c:4646 src/GridText.c:4647 src/GridText.c:4655 src/GridText.c:4656 src/LYCookie.c:2146 src/LYCookie.c:2163 src/LYCookie.c:2217 src/LYForms.c:505 src/LYForms.c:1242 src/LYForms.c:1253 src/LYForms.c:1306 src/LYForms.c:1362 src/LYGetFile.c:943 src/LYGetFile.c:967 src/LYHistory.c:492 src/LYHistory.c:517 src/LYJump.c:229 src/LYJump.c:245 src/LYJump.c:302 src/LYJump.c:342 src/LYMail.c:1611 src/LYMail.c:1613 src/LYMainLoop.c:1826 src/LYMainLoop.c:1854 src/LYMainLoop.c:1966 src/LYMainLoop.c:1990 src/LYMainLoop.c:1994 src/LYMainLoop.c:2018 src/LYMainLoop.c:2659 src/LYMainLoop.c:2683 src/LYMainLoop.c:2876 src/LYMainLoop.c:2900 src/LYMainLoop.c:3032 src/LYMainLoop.c:3056 src/LYMainLoop.c:3226 src/LYMainLoop.c:3250 src/LYMainLoop.c:3310 src/LYMainLoop.c:3334 src/LYMainLoop.c:3351 src/LYMainLoop.c:3375 src/LYMainLoop.c:3378 src/LYMainLoop.c:3402 src/LYMainLoop.c:3420 src/LYMainLoop.c:3444 src/LYMainLoop.c:3464 src/LYMainLoop.c:3488 src/LYMainLoop.c:4928 src/LYMainLoop.c:4959 +#: src/LYMainLoop.c:4960 src/LYMainLoop.c:5211 src/LYMainLoop.c:5236 src/LYMainLoop.c:5237 src/LYMainLoop.c:5248 src/LYMainLoop.c:5267 src/LYMainLoop.c:5273 src/LYMainLoop.c:5274 src/LYMainLoop.c:5292 src/LYMainLoop.c:5293 src/LYMainLoop.c:5438 src/LYMainLoop.c:5463 src/LYMainLoop.c:5464 src/LYOptions.c:414 src/LYOptions.c:454 src/LYOptions.c:475 src/LYOptions.c:515 src/LYOptions.c:630 src/LYOptions.c:691 src/LYOptions.c:718 src/LYOptions.c:779 src/LYOptions.c:926 src/LYOptions.c:927 src/LYOptions.c:962 src/LYOptions.c:963 src/LYOptions.c:986 src/LYOptions.c:1022 src/LYOptions.c:1452 src/LYOptions.c:1453 src/LYOptions.c:1512 src/LYOptions.c:1728 src/LYOptions.c:1729 src/LYOptions.c:1788 src/LYOptions.c:2071 src/LYOptions.c:2072 src/LYOptions.c:2131 src/LYOptions.c:2829 src/LYOptions.c:2833 src/LYOptions.c:2840 src/LYOptions.c:2844 src/LYOptions.c:2889 src/LYOptions.c:2893 src/LYOptions.c:2897 src/LYOptions.c:2900 src/LYOptions.c:2949 src/LYOptions.c:2953 src/LYOptions.c:3009 +#: src/LYOptions.c:3068 src/LYOptions.c:3072 src/LYOptions.c:3128 src/LYSearch.c:219 src/LYSearch.c:233 src/LYSearch.c:284 src/LYSearch.c:336 +msgid "Cancelled!!!" +msgstr "Annulé!" + +#: src/GridText.c:4664 src/GridText.c:4665 +msgid "Use Control-R to resubmit the current query." +msgstr "Faites Ctrl-R pour lancer de nouveau la recherche en cours" + +#: src/GridText.c:4682 src/GridText.c:4683 src/LYGetFile.c:624 src/LYGetFile.c:646 +msgid "Getting %s" +msgstr "Accès à %s" + +# msgid "Server asked for redirection of POST content to" +# msgstr "Le serveur requiert le réacheminement du contenu POST vers" +# msgid "P)roceed, use G)ET or C)ancel " +# msgstr "P) Continuer, utiliser G)ET ou C) Annuler " +# msgid "Redirection of POST content. P)roceed, see U)RL, use G)ET or C)ancel" +# msgstr "Réacheminement du contenu POST. P) Continuer, voir U)RL, G)ET ou C) Annuler" +# msgid "Location: " +# msgstr "Emplacement : " +#: src/GridText.c:5290 src/GridText.c:5291 src/GridText.c:5292 src/LYForms.c:1408 src/LYForms.c:1446 src/LYOptions.c:2999 src/LYOptions.c:3003 src/LYOptions.c:3041 src/LYOptions.c:3045 src/LYOptions.c:3059 src/LYOptions.c:3101 +msgid "'%s' not found!" +msgstr "'%s' non trouvé!" + +#: src/GridText.c:6971 src/GridText.c:6975 src/GridText.c:6977 src/LYMail.c:86 src/LYMail.c:255 +msgid "Malformed mailto form submission! Cancelled!" +msgstr "Envoi de formulaire mailto incorrect. Demande annulée!" + +#: src/GridText.c:7250 src/GridText.c:7253 src/GridText.c:7373 src/GridText.c:7376 src/GridText.c:7475 src/GridText.c:7478 +msgid "Warning: Cannot transcode form data to charset %s!" +msgstr "Transcodage impossible des données au jeu de caractères %s!" + +#: src/GridText.c:7874 src/GridText.c:7877 +msgid "Submitting form..." +msgstr "Envoi du formulaire... " + +#: src/GridText.c:7926 src/GridText.c:7929 +msgid "Resetting form..." +msgstr "Réinitialisation du formulaire..." + +#: src/HTAlert.c:120 +msgid "Read %ld of %ld %s of data." +msgstr "" + +#: src/HTAlert.c:121 +msgid "bytes" +msgstr "" + +#: src/HTAlert.c:122 +msgid "Read %ld %s of data." +msgstr "" + +#: src/HTAlert.c:124 +msgid " %ld kb/sec." +msgstr "" + +#: src/HTAlert.c:125 +msgid "KB" +msgstr "" + +#: src/HTAlert.c:127 src/HTAlert.c:142 +msgid " (Press 'z' to abort)" +msgstr "" + +#: src/HTAlert.c:132 +msgid "Read %ld of %ld %s of data" +msgstr "" + +#: src/HTAlert.c:134 +msgid "Read %ld %s of data" +msgstr "" + +#: src/HTAlert.c:137 +msgid ", %ld %s/sec." +msgstr "" + +#: src/HTAlert.c:160 src/HTAlert.c:175 +msgid "%s (y/n) " +msgstr "" + +#: src/HTAlert.c:218 src/HTAlert.c:233 +msgid "Password: " +msgstr "Mot de passe : " + +#: src/HTAlert.c:222 src/HTAlert.c:237 +msgid "lynx: Password required!!!" +msgstr "lynx : mot de passe requis!" + +#: src/HTAlert.c:322 src/HTAlert.c:337 +msgid "lynx: Username and Password required!!!" +msgstr "lynx : nom d'utilisateur et mot de passe requis!" + +#: src/HTAlert.c:350 src/HTAlert.c:365 +msgid "Username: " +msgstr "Nom d'utilisateur : " + +#: src/HTAlert.c:486 src/HTAlert.c:501 src/LYCookie.c:2136 src/LYCookie.c:2153 src/LYCookie.c:2207 +msgid "'A'lways allowing from domain '%s'." +msgstr "Toujours accepter les cookies du domaine '%s'." + +#: src/HTAlert.c:495 src/HTAlert.c:510 +msgid "Rejecting this cookie." +msgstr "Rejet du cookie" + +#: src/HTAlert.c:510 src/HTAlert.c:525 +msgid "Allowing this cookie." +msgstr "Acceptation du cookie" + +# msgid "Value accepted!" +# msgstr "Valeur acceptée!" +# msgid "Value accepted! -- WARNING: Lynx is configured for XWINDOWS!" +# msgstr "Valeur acceptée! NOTA : Lynx est configuré pour XWINDOWS." +# msgid "Value accepted! -- WARNING: Lynx is NOT configured for XWINDOWS!" +# msgstr "Valeur acceptée! NOTA : Lynx n'est pas configuré pour XWINDOWS." +# msgid "You are not allowed to change which editor to use!" +# msgstr "Vous ne pouvez pas choisir un autre éditeur!" +# msgid "Failed to set DISPLAY variable!" +# msgstr "Impossible de régler la variable AFFICHAGE." +# msgid "Failed to clear DISPLAY variable!" +# msgstr "Impossible d'effacer la variable AFFICHAGE." +# msgid "You are not allowed to change the bookmark file!" +# msgstr "Changement du fichier de signets non autorisé!" +# msgid "Access to dot files is disabled!" +# msgstr "L'accès aux fichiers cachés est désactivé!" +# msgid "WARNING: Misrepresentation of the User-Agent may be a copyright violation!" +# msgstr "Substituer l'agent-utilisateur peut être une violation du droit d'auteur" +# msgid "You are not allowed to change this setting." +# msgstr "Vous n'êtes pas autorisé à changer ce paramètre." +# msgid "Saving Options..." +# msgstr "Enregistrement des options..." +# msgid "Options saved!" +# msgstr "Options enregistrées!" +# msgid "Unable to save Options!" +# msgstr "Impossible d'enregistrer les options!" +# msgid " 'r' to return to Lynx " +# msgstr " Entrez « r » pour retourner à Lynx." +# msgid " '>' to save, or 'r' to return to Lynx " +# msgstr " Entrez « > » pour enreg. ou « r » pour retourner à Lynx." +# msgid "Hit any key to change value; RETURN to accept: " +# msgstr "N'importe quelle touche pour changer la valeur; pour accepter" +# msgid "Error uncompressing temporary file!" +# msgstr "Erreur de décompression du fichier temporaire!" +# msgid "Unsupported URL scheme!" +# msgstr "Schème de URL non reconnu!" +# msgid "Unsupported data: URL! Use SHOWINFO, for now." +# msgstr "Données non reconnues; consultez la page d'informations." +# msgid "Server asked for redirection of POST content to" +# msgstr "Le serveur requiert le réacheminement du contenu POST vers" +# NdT= I need an explicit context for variable (an actual example of message) +#: src/HTAlert.c:574 src/HTAlert.c:589 +msgid "Server asked for %d redirection of POST content to" +msgstr "Le serveur a demandé %d réacheminement du contenu POST vers" + +# msgid "P)roceed, use G)ET or C)ancel " +# msgstr "P) Continuer, utiliser G)ET ou C) Annuler " +# msgid "P)roceed, use G)ET or C)ancel " +# msgstr "P) Continuer, utiliser G)ET ou C) Annuler " +#: src/HTAlert.c:585 src/HTAlert.c:600 +msgid "P)roceed, or C)ancel " +msgstr "P) Continuer ou C) Annuler " + +# msgid "Redirection of POST content. P)roceed, see U)RL, use G)ET or C)ancel" +# msgstr "Réacheminement du contenu POST. P)Continuer, voir U)RL, G)ET ou C)Annuler" +# msgid "Redirection of POST content. P)roceed, see U)RL, use G)ET or C)ancel" +# msgstr "Réacheminement du contenu POST. P) Continuer, U)RL, G)ET ou C) Annuler" +#: src/HTAlert.c:593 src/HTAlert.c:608 +msgid "Redirection of POST content. P)roceed, see U)RL, or C)ancel" +msgstr "Réacheminement du contenu POST. P) Continuer, voir U)RL ou C) Annuler" + +#: src/HTFWriter.c:201 src/HTFWriter.c:207 +msgid "Error uncompressing temporary file!" +msgstr "Erreur de décompression du fichier temporaire!" + +#: src/HTFWriter.c:505 src/HTFWriter.c:521 src/LYGetFile.c:409 src/LYGetFile.c:422 +msgid "Execution is not enabled for this file. See the Options menu (use %s)." +msgstr "Exécution non activée pour ce fichier. Voir les paramètres (use %s). " + +#: src/HTFWriter.c:632 src/HTFWriter.c:648 +msgid "This file cannot be displayed on this terminal." +msgstr "Ce fichier ne peut être affiché sur votre terminal." + +#: src/HTFWriter.c:643 src/HTFWriter.c:645 src/HTFWriter.c:659 src/HTFWriter.c:661 +msgid "%s D)ownload, or C)ancel" +msgstr "%s D) Décharger ou C) Annuler" + +#: src/HTFWriter.c:647 src/HTFWriter.c:663 +msgid "This file cannot be displayed on this terminal: D)ownload, or C)ancel" +msgstr "Ne peut être affiché sur votre terminal: D) Décharger ou C) Annuler " + +# msgid "%s D)ownload, or C)ancel" +# msgstr "%s D) Décharger ou C) Annuler" +#: src/HTFWriter.c:668 src/HTFWriter.c:684 +msgid "Cancelling file." +msgstr "Annulation!" + +#: src/HTFWriter.c:701 src/HTFWriter.c:717 +msgid "Can't open output file! Cancelling!" +msgstr "Impossible d'ouvrir le fichier de sortie! Demande annulée." + +#: src/HTFWriter.c:760 src/HTFWriter.c:776 +msgid "Retrieving file. - PLEASE WAIT -" +msgstr "Récupération du fichier. - VEUILLEZ ATTENDRE -" + +#: src/HTFWriter.c:795 src/HTFWriter.c:811 +msgid "\n" +msgstr "" + +#: src/HTInit.c:237 src/HTInit.c:243 src/HTInit.c:282 src/HTInit.c:285 src/HTInit.c:288 src/HTInit.c:291 src/HTInit.c:299 src/HTInit.c:305 src/HTInit.c:346 src/HTInit.c:352 src/HTInit.c:541 src/HTInit.c:547 +msgid "Out of memory" +msgstr "" + +#: src/HTML.c:745 src/HTML.c:746 +msgid "HREF in BASE tag is not an absolute URL." +msgstr "L'attribut HREF de l'élément BASE n'est pas un URL absolu" + +#: src/HTML.c:4078 src/HTML.c:4080 src/HTML.c:4081 src/HTML.c:4324 src/HTML.c:4326 src/HTML.c:4327 src/HTML.c:4343 src/HTML.c:4345 src/HTML.c:4346 src/HTML.c:4703 src/HTML.c:4705 src/HTML.c:4706 src/HTML.c:4793 src/HTML.c:4795 src/HTML.c:4796 src/HTML.c:4826 src/HTML.c:4828 src/HTML.c:4829 src/HTML.c:5415 src/HTML.c:5417 src/HTML.c:5418 src/HTML.c:5440 src/HTML.c:5442 src/HTML.c:5443 src/HTML.c:5542 src/HTML.c:5544 src/HTML.c:5545 src/HTML.c:5904 src/HTML.c:5906 src/HTML.c:5907 src/HTML.c:5976 src/HTML.c:5978 src/HTML.c:5979 src/HTML.c:6174 src/HTML.c:6176 src/HTML.c:6177 src/HTML.c:6195 src/HTML.c:6197 src/HTML.c:6198 src/HTML.c:6252 src/HTML.c:6254 src/HTML.c:6255 src/HTML.c:6431 src/HTML.c:6433 src/HTML.c:6434 src/HTML.c:6455 src/HTML.c:6457 src/HTML.c:6458 src/HTML.c:6752 src/HTML.c:6754 src/HTML.c:6755 src/HTML.c:6775 src/HTML.c:6777 src/HTML.c:6778 src/HTML.c:6821 src/HTML.c:6823 src/HTML.c:6824 src/HTML.c:6841 src/HTML.c:6843 src/HTML.c:6844 src/LYCharUtils.c:3194 +#: src/LYCharUtils.c:3198 src/LYCharUtils.c:3216 src/LYCharUtils.c:3220 src/LYCharUtils.c:3238 src/LYCharUtils.c:3260 src/LYCharUtils.c:3300 src/LYCharUtils.c:3304 src/LYCharUtils.c:3344 +msgid "** Bad HTML!! Use -trace to diagnose. **" +msgstr "** Erreur de code HTML! Utiliser -trace pour le diagnostic. **" + +#: src/HTML.c:5224 src/HTML.c:5226 src/HTML.c:5227 +msgid "Maximum nesting of HTML elements exceeded." +msgstr "Imbrication maximale d'éléments HTML dépassée." + +# -------------------- 98-Jan-10 +# There are character strings, in preferred charsets, the names have to +# get fully translated, some are. +# ---- +# HTML.c +#: src/HTML.c:5485 src/HTML.c:5487 src/HTML.c:5488 +msgid "

                            Description: " +msgstr "

                            Description : " + +#: src/HTML.c:5489 src/HTML.c:5491 src/HTML.c:5492 +msgid "(none)" +msgstr "(aucun(e))" + +#: src/HTML.c:5493 src/HTML.c:5495 src/HTML.c:5496 +msgid "
                               Filepath: " +msgstr "
                               Chemin de fichier : " + +#: src/HTML.c:5497 src/HTML.c:5499 src/HTML.c:5500 +msgid "(unknown)" +msgstr "(inconnu)" + +# src/HTML.c +#: src/HTML.c:6800 src/HTML.c:6802 src/HTML.c:6803 +msgid "Document has only hidden links. Use the 'l'ist command." +msgstr "Le document ne contient que des liens cachés. Utiliser L) Références." + +#: src/LYBookmark.c:61 src/LYBookmark.c:66 src/LYBookmark.c:703 src/LYBookmark.c:726 +msgid "Bookmark file is not defined. Use %s to see options." +msgstr "Le fichier de signets n'est pas défini. Utilisez %s pour voir les options." + +#: src/LYBookmark.c:138 src/LYBookmark.c:144 +msgid "Unable to open tempfile for X Mosaic hotlist conversion." +msgstr "Impossible d'ouvrir le fichier temp. pour convertir les signets X Mosaic" + +#: src/LYBookmark.c:206 src/LYBookmark.c:212 +msgid "Malformed address." +msgstr "Adresse incorrecte." + +#: src/LYBookmark.c:252 src/LYBookmark.c:258 src/LYMainLoop.c:4685 src/LYMainLoop.c:4716 src/LYMainLoop.c:4717 +msgid "Reproduce L)ink in this bookmark file or C)ancel? (l,c): " +msgstr "Copier le L)ien dans ce fichier de signets ou C) Annuler? (l,c) : " + +#: src/LYBookmark.c:306 src/LYBookmark.c:314 +msgid "ERROR - unable to open bookmark file." +msgstr "ERREUR - impossible d'ouvrir le fichier de signets." + +#: src/LYBookmark.c:326 src/LYBookmark.c:334 +msgid "" +" You can delete links using the remove bookmark command. It is usually\n" +" the 'R' key but may have been remapped by you or your system\n" +" administrator.
                            \n" +" This file also may be edited with a standard text editor to delete\n" +" outdated or invalid links, or to change their order.\n" +"\n" +"\n" +"\n" +"

                            \n" +"

                              \n" +msgstr "" + +# Needs retranslation from the next text. +#: src/LYBookmark.c:350 +msgid "" +" You can delete links using the remove bookmark command. It is usually\n" +" the 'R' key but may have been remapped by you or your system\n" +" administrator.
                              \n" +" This file also may be edited with a standard text editor to delete\n" +" outdated or invalid links, or to change their order, but you should\n" +" not change the format within the lines or add other HTML markup.\n" +"\n" +"

                              \n" +"

                                \n" +msgstr "" +" Vous pouvez supprimer des liens avec la commande de suppression de signet,\n" +" habituellement la touche 'R' mais les touches peuvent avoir été\n" +" reconfigurées par vous ou par votre administrateur système.
                                \n" +" Le fichier peut aussi être édité au moyen d'un éditeur de texte standard.\n" +" Vous pouvez supprimer les liens désuets ou non valides ou en modifier\n" +" l'ordre, mais vous ne devez pas changer le format à l'intérieur des lignes\n" +" ni ajouter d'autres balises HTML.\n" +"\n" +"

                                \n" +"

                                  \n" + +#: src/LYBookmark.c:389 src/LYBookmark.c:399 +msgid "Done!" +msgstr "Terminé!" + +#: src/LYBookmark.c:428 src/LYBookmark.c:435 src/LYBookmark.c:438 src/LYBookmark.c:445 +msgid "Unable to open scratch file for deletion of link." +msgstr "Impossible d'ouvrir le fichier de travail pour supprimer un lien" + +#: src/LYBookmark.c:448 src/LYBookmark.c:458 +msgid "Unable to reopen temporary file for deletion of link." +msgstr "Impossible de réouvrir le fichier temporaire pour supprimer un lien" + +#: src/LYBookmark.c:480 src/LYBookmark.c:490 +msgid "Link is not by itself all on one line in bookmark file." +msgstr "Le lien ne tient pas sur une seule ligne dans le fichier de signets" + +#: src/LYBookmark.c:519 src/LYBookmark.c:529 +msgid "Unable to copy temporary file for deletion of link." +msgstr "" + +#: src/LYBookmark.c:549 src/LYBookmark.c:572 +msgid "Error renaming scratch file." +msgstr "Erreur de renommage du fichier de travail." + +#: src/LYBookmark.c:551 src/LYBookmark.c:574 +msgid "Error renaming temporary file." +msgstr "Erreur de renommage du fichier temporaire." + +#: src/LYBookmark.c:559 src/LYBookmark.c:582 +msgid "Bookmark deletion failed." +msgstr "Impossible de supprimer le signet." + +#: src/LYBookmark.c:589 src/LYBookmark.c:612 +msgid "Select subbookmark, '=' for menu, or ^G to cancel: " +msgstr "Choisir classeur de signets, '=' pour le menu ou ^G pour annuler : " + +#: src/LYBookmark.c:696 src/LYBookmark.c:719 +msgid "Screen too small! (8x35 min)" +msgstr "L'écran est trop petit! (8x35 min)" + +# msgid "Location: " +# msgstr "Emplacement : " +# msgid "'%s' not found!" +# msgstr "'%s' non trouvé!" +# msgid "Default Bookmark File" +# msgstr "fichier de signets par défaut" +# msgid "Screen too small! (8x35 min)" +# msgstr "L'écran est trop petit! (8x35 min) " +# msgid "Select destination or ^G to Cancel: " +# msgstr "Choisissez une destination ou entrez ^G pour annuler : " +# msgid "Select subbookmark, '=' for menu, or ^G to cancel: " +# msgstr "Choisissez classeur de signets, '=' pour le menu, ^G pour annuler : " +# msgid "Reproduce L)ink in this bookmark file or C)ancel? (l,c): " +# msgstr "Copier le L)ien dans ce fichier de signets ou C) Annuler? (l,c) : " +# msgid "Multiple bookmark support is not available." +# msgstr "Le soutien des fichiers multiples n'est pas disponible." +#: src/LYBookmark.c:731 src/LYBookmark.c:754 +msgid " Select Bookmark (screen %d of %d)" +msgstr "Sélection de signets (écran %d de %d)" + +#: src/LYBookmark.c:734 src/LYBookmark.c:757 +msgid " Select Bookmark" +msgstr "Sélection de signets" + +#: src/LYBookmark.c:764 src/LYBookmark.c:787 src/LYOptions.c:1843 src/LYOptions.c:1844 src/LYOptions.c:1903 +msgid "previous" +msgstr "écran précédent" + +#: src/LYBookmark.c:770 src/LYBookmark.c:793 src/LYOptions.c:1849 src/LYOptions.c:1850 src/LYOptions.c:1909 +msgid "next screen" +msgstr "écran suivant" + +#: src/LYBookmark.c:773 src/LYBookmark.c:796 +msgid "Select destination or ^G to Cancel: " +msgstr "Choisissez une destination ou entrez ^G pour annuler : " + +#: src/LYCgi.c:141 +msgid "Bad request!" +msgstr "Demande erronée!" + +# src/LYCgi.c +#: src/LYCgi.c:206 +msgid "Unable to access cgi script" +msgstr "Impossible d'accéder au script cgi" + +#: src/LYCgi.c:256 src/LYCgi.c:257 +msgid "cgi support has been disabled by system administrator." +msgstr "l'administrateur système a désactivé le soutien cgi." + +#: src/LYCgi.c:271 src/LYCgi.c:272 src/LYGetFile.c:347 src/LYGetFile.c:352 +msgid "Execution via bookmarks is disabled." +msgstr "L'exécution à partir des signets est désactivée." + +#: src/LYCgi.c:321 src/LYCgi.c:322 src/LYCgi.c:328 src/LYCgi.c:329 +msgid "Unable to set up connection." +msgstr "Impossible de finaliser la connexion." + +#: src/LYCgi.c:565 src/LYCgi.c:566 +msgid "Unable to make connection" +msgstr "Impossible d'établir la connexion." + +#: src/LYCgi.c:621 src/LYCgi.c:622 +msgid "Lynxcgi capabilities are not compiled into this version." +msgstr "Fonctionnalités Lynxcgi non compilées dans cette version" + +#: src/LYCharUtils.c:2892 src/LYCharUtils.c:2896 src/LYCharUtils.c:2936 +msgid "Refresh URL is not absolute." +msgstr "Il ne s'agit pas d'un URL absolu" + +#: src/LYCharUtils.c:3503 src/LYCharUtils.c:3507 src/LYCharUtils.c:3547 +msgid "Bad partial reference! Stripping lead dots." +msgstr "Référence partielle eronnée! Suppression des points (../)." + +#: src/LYClean.c:60 src/LYClean.c:61 +msgid "Really exit from Lynx? [Y] " +msgstr "Vous voulez vraiment quitter Lynx? [O] " + +#: src/LYClean.c:62 src/LYClean.c:63 src/LYMainLoop.c:2188 src/LYMainLoop.c:2205 src/LYMainLoop.c:2206 src/LYMainLoop.c:2212 +msgid "Are you sure you want to quit? [N] " +msgstr "Désirez-vous vraiment quitter? [N]" + +#: src/LYClean.c:108 src/LYClean.c:109 +msgid "" +"\n" +"\n" +"Exiting via interrupt: %d\n" +"\n" +msgstr "" + +#: src/LYCookie.c:353 src/LYCookie.c:356 src/LYCookie.c:359 src/LYCookie.c:363 +msgid "Accept invalid cookie domain=%s for '%s'?" +msgstr "" + +#: src/LYCookie.c:2023 src/LYCookie.c:2040 src/LYCookie.c:2094 +msgid "The Cookie Jar is empty." +msgstr "Le fichier des «cookies» est vide" + +#: src/LYCookie.c:2081 src/LYCookie.c:2098 src/LYCookie.c:2152 +msgid "Delete this cookie?" +msgstr "Supprimer ce cookie?" + +#: src/LYCookie.c:2089 src/LYCookie.c:2106 src/LYCookie.c:2160 src/LYCookie.c:2194 src/LYCookie.c:2211 src/LYCookie.c:2265 +msgid "Delete this empty domain?" +msgstr "Supprimer ce domaine vide?" + +#: src/LYCookie.c:2101 src/LYCookie.c:2118 src/LYCookie.c:2160 src/LYCookie.c:2172 src/LYCookie.c:2177 src/LYCookie.c:2231 +msgid "The domain has been eaten!" +msgstr "Le domaine a été supprimé!" + +#: src/LYCookie.c:2103 src/LYCookie.c:2120 src/LYCookie.c:2174 +msgid "The cookie has been eaten!" +msgstr "Le cookie a été supprimé!" + +#: src/LYCookie.c:2117 src/LYCookie.c:2134 src/LYCookie.c:2188 +msgid "D)elete domain, set allow A)lways/P)rompt/neV)er, or C)ancel? " +msgstr "D)Supprimer domaine; régler permission: T)oujours C)onfirmer J)amais A)nnul? " + +# NdT: Does P)rompt trigger a confirmation screen? +# NOTE: Option letters come from the capitalised letter in the option, +# so if introducing a new option make sure it has a translation. +#: src/LYCookie.c:2119 src/LYCookie.c:2136 src/LYCookie.c:2190 +msgid "D)elete domain's cookies, set allow A)lways/P)rompt/neV)er, or C)ancel? " +msgstr "D)Supprimer cookies; régler permission: T)oujours C)onfirmer J)amais A)nnul? " + +#: src/LYCookie.c:2181 src/LYCookie.c:2198 src/LYCookie.c:2252 +msgid "All cookies in the domain have been eaten!" +msgstr "Tous les cookies du domaine ont été supprimés!" + +# NdT: What does happen exatly when you chose P)rompt? +#: src/LYCookie.c:2211 src/LYCookie.c:2228 src/LYCookie.c:2282 +msgid "'P'rompting to allow from domain '%s'." +msgstr "Confirmer avant d'accepter les cookies du domaine '%s'." + +#: src/LYCookie.c:2221 src/LYCookie.c:2238 src/LYCookie.c:2292 +msgid "ne'V'er allowing from domain '%s'." +msgstr "Ne jamais accepter les cookies du domaine '%s'." + +#: src/LYCookie.c:2224 src/LYCookie.c:2241 src/LYCookie.c:2295 +msgid "Delete all cookies in this domain?" +msgstr "Supprimer tous les cookies de ce domaine?" + +#: src/LYCookie.c:2244 src/LYCookie.c:2261 src/LYCookie.c:2315 +msgid "All of the cookies in the jar have been eaten!" +msgstr "Tous les cookies ont été supprimés!" + +#: src/LYCookie.c:2274 src/LYCookie.c:2291 src/LYCookie.c:2345 src/LYKeymap.c:711 +msgid "

                                  %s (%s), help on %s

                                  \n" +msgstr "" + +# -------- +# Missed strings 97-12-07 +# LYMessages_en.h (LYCookie.c) +# NdT: What do they mean by "gobble up an entire domain"? +#: src/LYCookie.c:2279 src/LYCookie.c:2296 src/LYCookie.c:2350 +msgid "Activate links to gobble up cookies or entire domains," +msgstr "Activer les liens pour supprimer les cookies ou les domaines," + +#: src/LYCookie.c:2281 src/LYCookie.c:2298 src/LYCookie.c:2352 +msgid "or to change a domain's 'allow' setting." +msgstr "ou pour changer les paramètres de permission pour un domaine." + +#: src/LYCookie.c:2302 src/LYCookie.c:2319 src/LYCookie.c:2373 +msgid "(Cookies always allowed.)" +msgstr "(Cookies toujours acceptés)" + +#: src/LYCookie.c:2305 src/LYCookie.c:2322 src/LYCookie.c:2376 +msgid "(Cookies never allowed.)" +msgstr "(Cookies jamais acceptés)" + +#: src/LYCookie.c:2308 src/LYCookie.c:2325 src/LYCookie.c:2379 +msgid "(Cookies allowed via prompt.)" +msgstr "(Cookies acceptés à l'invite)" + +#: src/LYCookie.c:2311 src/LYCookie.c:2328 src/LYCookie.c:2382 +msgid "(Persistent Cookies.)" +msgstr "" + +#: src/LYCookie.c:2335 src/LYCookie.c:2352 src/LYCookie.c:2406 +msgid "(No name.)" +msgstr "(Aucun nom)" + +#: src/LYCookie.c:2341 src/LYCookie.c:2358 src/LYCookie.c:2412 +msgid "(No value.)" +msgstr "(Aucune valeur)" + +# src/LYCookie.c +#: src/LYCookie.c:2404 src/LYCookie.c:2421 src/LYCookie.c:2475 +msgid "
                                  Maximum Gobble Date: %s%s" +msgstr "
                                  Date d'expiration maximale : %s%s" + +#: src/LYCookie.c:2408 src/LYCookie.c:2425 src/LYCookie.c:2479 +msgid "(End of session.)" +msgstr "(Fin de session)" + +#: src/LYCurses.c:1299 src/LYCurses.c:1303 src/LYCurses.c:1313 +msgid "" +"\n" +"A Fatal error has occurred in %s Ver. %s\n" +msgstr "" + +#: src/LYCurses.c:1313 src/LYCurses.c:1317 src/LYCurses.c:1318 src/LYCurses.c:1322 src/LYCurses.c:1327 src/LYCurses.c:1332 src/LYMain.c:3228 src/LYMain.c:3255 src/LYMain.c:3277 +msgid "Memory exhausted! Program aborted!" +msgstr "" + +# msgid "Enter a filename: " +# msgstr "Entrez un nom de fichier :" +#: src/LYDownload.c:163 src/LYDownload.c:167 src/LYDownload.c:196 src/LYDownload.c:200 src/LYDownload.c:435 src/LYDownload.c:447 src/LYDownload.c:468 src/LYDownload.c:480 src/LYPrint.c:296 src/LYPrint.c:301 src/LYPrint.c:329 src/LYPrint.c:334 src/LYPrint.c:1051 src/LYPrint.c:1071 src/LYPrint.c:1085 src/LYPrint.c:1105 +msgid "Edit the previous filename: " +msgstr "Éditez le nom de fichier précédent : " + +#: src/LYDownload.c:165 src/LYDownload.c:169 src/LYDownload.c:198 src/LYDownload.c:202 src/LYDownload.c:437 src/LYDownload.c:449 src/LYDownload.c:470 src/LYDownload.c:482 src/LYPrint.c:298 src/LYPrint.c:303 src/LYPrint.c:331 src/LYPrint.c:336 src/LYPrint.c:1053 src/LYPrint.c:1073 src/LYPrint.c:1087 src/LYPrint.c:1107 +msgid "Edit a previous filename: " +msgstr "Éditez un nom de fichier précédent : " + +#: src/LYDownload.c:212 src/LYDownload.c:216 src/LYDownload.c:484 src/LYDownload.c:496 src/LYPrint.c:346 src/LYPrint.c:351 src/LYPrint.c:1102 src/LYPrint.c:1122 src/LYUpload.c:119 src/LYUpload.c:120 +msgid "File name may not begin with a dot." +msgstr "Le nom de fichier ne peut commencer avec un point." + +#: src/LYDownload.c:213 src/LYDownload.c:217 src/LYDownload.c:302 src/LYDownload.c:318 src/LYDownload.c:319 src/LYDownload.c:335 src/LYDownload.c:485 src/LYDownload.c:497 src/LYPrint.c:347 src/LYPrint.c:352 src/LYPrint.c:436 src/LYPrint.c:445 src/LYPrint.c:457 src/LYPrint.c:466 src/LYPrint.c:1103 src/LYPrint.c:1123 src/LYUpload.c:120 src/LYUpload.c:121 +msgid "Enter a new filename: " +msgstr "Entrez un nouveau nom de fichier : " + +#: src/LYDownload.c:326 src/LYDownload.c:342 +msgid "Saving..." +msgstr "Enregistrement..." + +#: src/LYDownload.c:528 src/LYDownload.c:540 +msgid "ERROR! - download command is misconfigured." +msgstr "ERREUR - la commande de déchargement est mal configurée." + +#: src/LYDownload.c:558 src/LYDownload.c:570 +msgid "Unable to download file." +msgstr "Impossible de télédécharger le fichier." + +#: src/LYDownload.c:563 src/LYDownload.c:575 +msgid "Cancelling!" +msgstr "Annulation!" + +#: src/LYDownload.c:608 +msgid " Downloaded link: %s\n" +msgstr "" + +#: src/LYDownload.c:612 +msgid " Suggested file name: %s\n" +msgstr "" + +#: src/LYDownload.c:616 src/LYPrint.c:1317 +msgid "" +"\n" +"%s options:\n" +msgstr "" + +#: src/LYDownload.c:617 +msgid "Download" +msgstr "" + +#: src/LYDownload.c:617 +msgid "Standard download" +msgstr "" + +#: src/LYDownload.c:620 +msgid "" +" You download the link: %s\n" +" Suggested file name: %s%s\n" +msgstr "" + +#: src/LYDownload.c:624 +msgid "" +"\n" +"Standard download options:\n" +msgstr "" + +#: src/LYDownload.c:627 src/LYDownload.c:633 +msgid " Save to disk\n" +msgstr " Enregistrer\n" + +#: src/LYDownload.c:631 src/LYDownload.c:640 src/LYPrint.c:1293 src/LYPrint.c:1297 src/LYPrint.c:1325 +msgid " Save to disk disabled.\n" +msgstr " Enregistrement sur disque dsactiv\n" + +#: src/LYDownload.c:635 src/LYDownload.c:642 src/LYPrint.c:1308 src/LYPrint.c:1312 src/LYPrint.c:1341 +msgid "" +"\n" +"Local additions:\n" +msgstr "" + +#: src/LYDownload.c:641 src/LYDownload.c:648 +msgid " " +msgstr "" + +#: src/LYDownload.c:657 +msgid "" +" <NONE>\n" +"\n" +" \n" +msgstr "" + +#: src/LYEdit.c:40 src/LYEdit.c:44 +msgid "Lynx cannot currently (E)dit remote WWW files" +msgstr "Lynx ne peut (E) Éditer de fichiers W3 distants." + +#: src/LYEdit.c:71 src/LYEdit.c:83 +msgid "Could not access file." +msgstr "Impossible d'accéder au fichier." + +#: src/LYEdit.c:86 src/LYEdit.c:106 +msgid "You are not authorized to edit this file." +msgstr "Vous n'êtes pas autorisé à éditer ce fichier." + +#: src/LYExtern.c:46 src/LYExtern.c:49 +msgid "External support is currently disabled." +msgstr "Le soutien externe est présentement inactivé." + +#: src/LYForms.c:75 +msgid "Bad HTML!! Unable to create popup window!" +msgstr "Erreur de code HTML! Impossible de créer de fenêtre flash." + +#: src/LYForms.c:141 +msgid "One radio button must be checked at all times!" +msgstr "Un seul bouton d'option peut être coché à la fois." + +#: src/LYForms.c:202 src/LYMainLoop.c:2753 src/LYMainLoop.c:2777 +msgid "** Bad HTML!! No form action defined. **" +msgstr "** Erreur de code HTML! Aucune action définie pour le formulaire. **" + +#: src/LYForms.c:206 src/LYMainLoop.c:2765 src/LYMainLoop.c:2789 +msgid "Mail disallowed! Cannot submit." +msgstr "La fonction de courrier est invalidée. Impossible de soumettre l'envoi!" + +#: src/LYForms.c:303 +msgid "Form field value exceeds buffer length! Trim the tail." +msgstr "La valeur excède la zone tampon; Élaguer les lignes finales (tail)." + +#: src/LYForms.c:306 src/LYMainLoop.c:1357 src/LYMainLoop.c:1385 +msgid "(Password entry field) Enter text. Use UP or DOWN arrows or tab to move off." +msgstr "Entrez le texte. Touches HAUT/BAS ou tabulateur pour vous déplacer" + +#: src/LYForms.c:310 src/LYMainLoop.c:1402 src/LYMainLoop.c:1430 +msgid "(mailto form submit button) Use right-arrow or to submit." +msgstr "Utilisez la touche DROITE ou pour confirmer" + +#: src/LYForms.c:312 src/LYMainLoop.c:1388 src/LYMainLoop.c:1416 +msgid "(Form field) Enter text. Use to submit, arrows or tab to move off." +msgstr "Entrez le texte. pour confirmer; flèches ou tabulateur pour se déplacer" + +#: src/LYForms.c:314 src/LYMainLoop.c:1390 src/LYMainLoop.c:1418 +msgid "(Form field) Enter text. Use to submit ('x' for no cache)." +msgstr "Entrez le texte. pour confirmer («x» : nouvelle instance)" + +#: src/LYForms.c:319 src/LYMainLoop.c:1421 src/LYMainLoop.c:1449 +msgid "(Text entry field) Enter text. Use UP or DOWN arrows or tab to move off." +msgstr "Entrez le texte. Touches HAUT/BAS ou tabulateur pour se déplacer" + +#: src/LYForms.c:357 +msgid "Enter Lynx keystroke command: " +msgstr "Entrer la commande Lynx au clavier : " + +#: src/LYForms.c:400 +msgid "Do you want to go back to the previous document? [N]" +msgstr "Voulez-vous retourner au document précédent? [N]" + +#: src/LYForms.c:407 +msgid "Use arrows or tab to move off of field." +msgstr "Touches fléchées ou tabulateur pour se déplacer hors du champ" + +#: src/LYForms.c:409 src/LYForms.c:426 +msgid "Enter text. Use arrows or tab to move off of field." +msgstr "Entrez le texte. Flèches ou tabulateur pour se déplacer hors du champ" + +#: src/LYForms.c:453 +msgid "Modified tail combined with head of form field value." +msgstr "Lignes finales modifiés combinées avec en-tête (champ de formulaire)" + +#: src/LYForms.c:499 +msgid "Select option (or page) number: " +msgstr "Choisir le numéro d'option (ou de page) : " + +#: src/LYForms.c:696 src/LYOptions.c:2248 src/LYOptions.c:2249 src/LYOptions.c:2308 +msgid "Unable to create popup window!" +msgstr "Impossible de créer de fenêtre flash." + +#: src/LYForms.c:868 +msgid "You are already at the beginning of this option list." +msgstr "Vous êtes déjà au début de cette liste d'options." + +#: src/LYForms.c:870 src/LYForms.c:879 src/LYForms.c:894 src/LYForms.c:907 src/LYForms.c:971 src/LYForms.c:997 src/LYForms.c:1015 src/LYForms.c:1454 src/LYMainLoop.c:1361 src/LYMainLoop.c:1389 +msgid "UNMODIFIABLE option list. Use return or arrow keys to review or leave." +msgstr "Faites ou touches fléchées pour revoir les options et quitter" + +#: src/LYForms.c:872 src/LYForms.c:881 src/LYForms.c:896 src/LYForms.c:909 src/LYForms.c:923 src/LYForms.c:931 src/LYForms.c:973 src/LYForms.c:999 src/LYForms.c:1017 src/LYForms.c:1456 src/LYMainLoop.c:1363 src/LYMainLoop.c:1391 +msgid "(Option list) Hit return and use arrow keys and return to select option." +msgstr "Faites et touches fléchées, puis pour choisir une option" + +#: src/LYForms.c:892 +msgid "You are already at the end of this option list." +msgstr "Vous êtes déjà à la fin de cette liste d'options." + +#: src/LYForms.c:918 +msgid "You are already at page %d of this option list." +msgstr "Vous êtes déjà à la page %d de cette liste d'options." + +# /maxwell/lynx2.7.1/LYMessages_en.h +#: src/LYForms.c:921 src/LYOptions.c:2273 src/LYOptions.c:2274 src/LYOptions.c:2333 src/LYOptions.c:2449 src/LYOptions.c:2453 src/LYOptions.c:2509 src/LYOptions.c:2559 src/LYOptions.c:2563 src/LYOptions.c:2585 src/LYOptions.c:2589 src/LYOptions.c:2619 src/LYOptions.c:2645 src/LYOptions.c:3051 src/LYOptions.c:3055 src/LYOptions.c:3111 +msgid "(Choice list) Hit return and use arrow keys and return to select option." +msgstr "(Liste de choix) Entr, puis touches fléchées et Entr pour faire votre choix" + +#: src/LYForms.c:929 src/LYOptions.c:2271 src/LYOptions.c:2272 src/LYOptions.c:2331 src/LYOptions.c:2447 src/LYOptions.c:2451 src/LYOptions.c:2488 src/LYOptions.c:2492 src/LYOptions.c:2507 src/LYOptions.c:2548 src/LYOptions.c:2557 src/LYOptions.c:2561 src/LYOptions.c:2583 src/LYOptions.c:2587 src/LYOptions.c:2601 src/LYOptions.c:2605 src/LYOptions.c:2617 src/LYOptions.c:2643 src/LYOptions.c:2661 src/LYOptions.c:3049 src/LYOptions.c:3053 src/LYOptions.c:3109 +msgid "UNMODIFIABLE choice list. Use return or arrow keys to review or leave." +msgstr "Liste de choix NON MODIFIABLE. Entr ou touches fléchées pour revoir ou quitter" + +#: src/LYForms.c:968 +msgid "Option number %d already is current." +msgstr "L'option %d est déjà l'option en cours." + +#: src/LYForms.c:1007 +msgid "You have entered an invalid option number." +msgstr "Vous avez entré un numéro d'option non valide." + +# msgid "Enter a database query: " +# msgstr "Entrez une recherche dans la base de données : " +#: src/LYForms.c:1235 src/LYOptions.c:2822 src/LYOptions.c:2826 src/LYOptions.c:2882 src/LYSearch.c:210 +msgid "Enter a whereis query: " +msgstr "Entrez le mot à rechercher : " + +#: src/LYGetFile.c:110 src/LYGetFile.c:116 +msgid "Port 19 not permitted in URLs." +msgstr "Le port 19 n'est pas permis" + +#: src/LYGetFile.c:115 src/LYGetFile.c:121 +msgid "Port 25 not permitted in URLs." +msgstr "Le port 25 n'est pas permis" + +#: src/LYGetFile.c:121 src/LYGetFile.c:127 +msgid "Port %lu not permitted in URLs." +msgstr "Le port %lu n'est pas permis dans les URL." + +#: src/LYGetFile.c:127 src/LYGetFile.c:133 +msgid "URL has a bad port field." +msgstr "Champ de port d'URL erroné." + +#: src/LYGetFile.c:161 src/LYGetFile.c:167 +msgid "Not an http URL or form ACTION!" +msgstr "L'élément n'est ni un URL http ni un attribut ACTION!" + +#: src/LYGetFile.c:201 src/LYGetFile.c:207 +msgid "URL is not in starting realm!" +msgstr "L'URL n'est pas dans la partition de départ spécifiée" + +# src/LYGetFile.c +#: src/LYGetFile.c:219 src/LYGetFile.c:225 +msgid "POST not supported for this URL - ignoring POST data!" +msgstr "Méthode POST non fonctionnelle pour cet URL; données POST ignorées" + +#: src/LYGetFile.c:233 src/LYGetFile.c:239 +msgid "Unsupported URL scheme!" +msgstr "Schème de URL non reconnu!" + +#: src/LYGetFile.c:237 src/LYGetFile.c:243 src/LYMainLoop.c:4959 src/LYMainLoop.c:4991 src/LYMainLoop.c:4992 +msgid "Unsupported data: URL! Use SHOWINFO, for now." +msgstr "Données non reconnues; consultez la page d'informations pour le moment" + +#: src/LYGetFile.c:255 src/LYGetFile.c:260 +msgid "News posting is disabled!" +msgstr "L'envoi d'articles Usenet est désactivé" + +#: src/LYGetFile.c:283 src/LYGetFile.c:288 src/LYGetFile.c:299 src/LYGetFile.c:304 +msgid "File management support is disabled!" +msgstr "Le soutien de gestion de fichier est désactivé." + +#: src/LYGetFile.c:344 src/LYGetFile.c:349 +msgid "Execution is disabled." +msgstr "L'exécution est désactivée." + +#: src/LYGetFile.c:392 +msgid "Press to return to Lynx." +msgstr "Appuyez sur pour retourner à Lynx " + +#: src/LYGetFile.c:405 +msgid "" +"\n" +"%s" +msgstr "" + +#: src/LYGetFile.c:414 src/LYGetFile.c:427 +msgid "Execution capabilities are not compiled into this version." +msgstr "Capacités d'exécution non compilées dans cette version." + +#: src/LYGetFile.c:420 src/LYGetFile.c:433 +msgid "Mail access is disabled!" +msgstr "L'accès au courrier est désactivé." + +#: src/LYGetFile.c:454 src/LYGetFile.c:467 src/LYMainLoop.c:4994 +msgid "Only files and servers on the local host can be accessed." +msgstr "Seuls les fichiers/serveurs logés sur l'hôte local sont accessibles" + +#: src/LYGetFile.c:464 src/LYGetFile.c:477 +msgid "Telnet access is disabled!" +msgstr "L'accès Telnet est désactivé." + +#: src/LYGetFile.c:466 src/LYGetFile.c:479 +msgid "Telnet port specifications are disabled." +msgstr "Les spécifications de port Telnet sont désactivées." + +#: src/LYGetFile.c:480 src/LYGetFile.c:493 +msgid "USENET news access is disabled!" +msgstr "L'accès aux articles USENET est désactivé." + +#: src/LYGetFile.c:485 src/LYGetFile.c:498 +msgid "Rlogin access is disabled!" +msgstr "L'accès Rlogin est désactivé." + +#: src/LYGetFile.c:676 src/LYGetFile.c:698 +msgid "Location URL is not absolute." +msgstr "Il ne s'agit pas d'un URL absolu" + +#: src/LYGetFile.c:736 src/LYGetFile.c:760 +msgid "Illegal redirection URL received from server!" +msgstr "URL de réacheminement illégal reçu du serveur!" + +# msgid "Using %s" +# msgstr "Utilisation de %s" +#: src/LYGetFile.c:738 src/LYGetFile.c:762 +msgid "Illegal URL: %s" +msgstr "URL illégal : %s" + +#: src/LYGetFile.c:743 src/LYGetFile.c:767 +msgid "Illegal Redirection URL: %s" +msgstr "URL de réacheminement illégal : %s" + +#: src/LYGetFile.c:903 src/LYGetFile.c:927 +msgid "Badly formed address %s" +msgstr "Adresse mal formée %s" + +# This one actually changed from "Follow link number: " +#: src/LYGetFile.c:938 src/LYGetFile.c:962 +msgid "Follow link (or goto link or page) number: " +msgstr "Accéder au lien (commande G) Aller) numéro : " + +#: src/LYGetFile.c:1154 src/LYGetFile.c:1178 +msgid "Executable link rejected due to malformed request." +msgstr "Lien exécutable rejeté dû à une demande erronée." + +#: src/LYGetFile.c:1170 src/LYGetFile.c:1180 src/LYGetFile.c:1194 src/LYGetFile.c:1204 +msgid "Executable link rejected due to relative path string ('../')." +msgstr "Lien exécutable rejeté dû à un chemin relatif ('../')" + +#: src/LYGetFile.c:1197 src/LYGetFile.c:1221 +msgid "Executable link rejected due to `%c' character." +msgstr "Lien exécutable rejeté dû au caractère `%c'." + +#: src/LYGetFile.c:1231 src/LYGetFile.c:1255 +msgid "Executable link rejected due to location or path." +msgstr "Lien exécutable rejeté dû à l'emplacement ou au chemin d'accès" + +#: src/LYHistory.c:72 src/LYHistory.c:75 +msgid "Lynx Options Page" +msgstr "" + +#: src/LYHistory.c:81 src/LYHistory.c:85 src/LYMainLoop.c:2534 src/LYMainLoop.c:2558 src/LYMainLoop.c:2923 src/LYMainLoop.c:2947 src/LYMainLoop.c:4635 src/LYMainLoop.c:4666 src/LYMainLoop.c:4667 src/LYMainLoop.c:4877 src/LYMainLoop.c:4908 src/LYMainLoop.c:4909 +msgid "Lynx Cookie Jar" +msgstr "Lynx - Page des «cookies»" + +#: src/LYHistory.c:82 src/LYHistory.c:86 src/LYHistory.c:531 src/LYHistory.c:558 src/LYMainLoop.c:4412 src/LYMainLoop.c:4427 src/LYMainLoop.c:4443 src/LYMainLoop.c:4444 src/LYMainLoop.c:4458 src/LYMainLoop.c:4459 src/LYMainLoop.c:4658 src/LYMainLoop.c:4689 src/LYMainLoop.c:4690 +msgid "Lynx Visited Links Page" +msgstr "Lynx - Page des liens activés" + +#: src/LYHistory.c:83 src/LYHistory.c:87 src/LYMain.c:1057 src/LYMain.c:1074 src/LYMain.c:1077 src/LYMainLoop.c:464 src/LYMainLoop.c:471 src/LYMainLoop.c:5098 src/LYMainLoop.c:5118 src/LYMainLoop.c:5119 src/LYMainLoop.c:5137 src/LYMainLoop.c:5139 src/LYMainLoop.c:5140 src/LYMainLoop.c:5162 src/LYMainLoop.c:5163 +msgid "Lynx Trace Log" +msgstr "Journal de parcours Lynx" + +#: src/LYHistory.c:90 src/LYHistory.c:94 src/LYHistory.c:399 src/LYHistory.c:424 src/LYHistory.c:547 src/LYHistory.c:574 +msgid "(no title)" +msgstr "" + +#: src/LYHistory.c:296 src/LYHistory.c:329 +msgid "History List maximum reached! Document not pushed." +msgstr "Vous avez atteint le maximum de l'Historique. Accès impossible" + +# src/LYGlobalDefs.h +# msgid "Bookmark file" +# msgstr "Fichier de signets" +# msgid "Converted Mosaic Hotlist" +# msgstr "Liste de signets Mosaic convertie" +# src/LYHistory.c +#: src/LYHistory.c:413 src/LYHistory.c:438 +msgid " (internal)" +msgstr " (interne)" + +#: src/LYHistory.c:415 src/LYHistory.c:440 +msgid " (was internal)" +msgstr " (était interne)" + +#: src/LYHistory.c:535 src/LYHistory.c:562 +msgid "You visited (POSTs, bookmark, menu and list files excluded):\n" +msgstr "Vous avez consulté (fichiers POST, références et signets exclus):\n" + +#: src/LYJump.c:91 +msgid "Out of memory in LYJumpInit" +msgstr "" + +#: src/LYJump.c:196 +msgid "Key '%c' is not mapped to a jump file!" +msgstr "Touche '%c' non configurée pour correspondre à un fichier-raccourci" + +#: src/LYJump.c:256 +msgid "Random URL is disallowed! Use a shortcut." +msgstr "L'accès arbitraire à un URL est invalidé. Utilisez un raccourci." + +#: src/LYJump.c:290 src/LYJump.c:330 +msgid "Edit the current shortcut: " +msgstr "Éditer le raccourci courant :" + +#: src/LYJump.c:293 src/LYJump.c:333 +msgid "Edit the previous shortcut: " +msgstr "Éditer le raccourci précédent :" + +#: src/LYJump.c:295 src/LYJump.c:335 +msgid "Edit a previous shortcut: " +msgstr "Éditer un raccourci précédent :" + +#: src/LYJump.c:378 +msgid "Cannot locate jump file!" +msgstr "Impossible de localiser le fichier-raccourci." + +#: src/LYJump.c:384 +msgid "Out of memory reading jump file!" +msgstr "Mémoire insuffisante pour lire le fichier-raccourci." + +#: src/LYJump.c:393 src/LYJump.c:403 +msgid "Cannot open jump file!" +msgstr "Impossible d'ouvrir le fichier-raccourci." + +#: src/LYJump.c:413 src/LYJump.c:423 +msgid "Error reading jump file!" +msgstr "Erreur de lecture du fichier-raccourci." + +#: src/LYJump.c:442 +msgid "Out of memory reading jump table!" +msgstr "Mémoire insuffisante pour lire les tables de raccourcis" + +# +# ------------------- End Extra Strings ----------------------------------- +# Not sure if the CFG file is in francais or english, but if it is +# en francais, then we have trouble, because the parsing routines +# are reading english. Just noting this somewhere someone can find it. :-) +# ------ No translation, like with the LYMain.c -------------------------- +# src/LYStyle.c +# msgid "" +# "Syntax Error parsing style in lss file:\n" +# "[%s]\n" +# "The line must be of the form:\n" +# "OBJECT:MONO:COLOR (ie em:bold:brightblue:white)\n" +# "where OBJECT is one of EM,STRONG,B,I,U,BLINK etc.\n\n" +# msgstr "" +# "Syntax Error parsing style in lss file:\n" +# "[%s]\n" +# "The line must be of the form:\n" +# "OBJECT:MONO:COLOR (ie em:bold:brightblue:white)\n" +# "where OBJECT is one of EM,STRONG,B,I,U,BLINK etc.\n\n" +# ------------ End No translation --------------------- +# --------- 97/12/01 New Strings from 0.96 --------------- +#: src/LYKeymap.c:475 +msgid "clear all authorization info for this session" +msgstr "efface toute l'info d'autorisation pour cette session" + +#: src/LYLeaks.c:79 +msgid "Invalid pointer detected.\n" +msgstr "" + +#: src/LYLeaks.c:81 src/LYLeaks.c:111 +msgid "Pointer:\t%p\n" +msgstr "" + +#: src/LYLeaks.c:91 src/LYLeaks.c:96 src/LYLeaks.c:128 +msgid "FileName:\t%s\n" +msgstr "" + +#: src/LYLeaks.c:93 src/LYLeaks.c:98 src/LYLeaks.c:130 src/LYLeaks.c:139 +msgid "LineCount:\t%d\n" +msgstr "" + +#: src/LYLeaks.c:110 +msgid "Memory leak detected.\n" +msgstr "" + +#: src/LYLeaks.c:112 +msgid "Contains:\t" +msgstr "" + +#: src/LYLeaks.c:126 +msgid "ByteSize:\t%d\n" +msgstr "" + +#: src/LYLeaks.c:137 +msgid "realloced:\t%s\n" +msgstr "" + +#: src/LYLeaks.c:156 +msgid "" +"\n" +"Total memory leakage this run:\t%u\n" +msgstr "" + +#: src/LYList.c:64 +msgid "There are only hidden links from this document." +msgstr "Ce document ne renvoie qu'à des liens cachés." + +#: src/LYList.c:68 +msgid "There are no references from this document." +msgstr "Il n'y a aucune référence dans ce document." + +#: src/LYList.c:88 +msgid "References in %s

                                  \n" +msgstr "" + +#: src/LYList.c:89 +msgid "this document:" +msgstr "" + +# msgid "

                                  You have reached the Visited Links Page

                                  \n" +# msgstr "

                                  Vous avez accédé à la Page des liens activés

                                  \n" +# msgstr "

                                  Vous avez accédé à la Page des liens consultés

                                  \n" +# src/LYList.c +# msgid "unknown field or link" +# msgstr "champ ou lien inconnu" +#: src/LYList.c:95 +msgid "Visible links:\n" +msgstr "Liens visibles :\n" + +#: src/LYList.c:185 +msgid "Hidden links:\n" +msgstr "Liens cachés :\n" + +#: src/LYList.c:256 +msgid "" +"\n" +"%s\n" +"\n" +msgstr "" + +#: src/LYList.c:258 +msgid " Visible links:\n" +msgstr "" + +#: src/LYList.c:308 +msgid "%s Hidden links:\n" +msgstr "" + +#: src/LYLocal.c:257 src/LYLocal.c:312 +msgid "Remove all tagged files and directories (y or n): " +msgstr "" + +#: src/LYLocal.c:280 src/LYLocal.c:917 +msgid "System error - failed to get status of '%s'." +msgstr "" + +#: src/LYLocal.c:289 src/LYLocal.c:336 +msgid "remove %s" +msgstr "" + +#: src/LYLocal.c:373 src/LYLocal.c:419 src/LYLocal.c:505 src/LYLocal.c:587 src/LYLocal.c:637 src/LYLocal.c:1083 src/LYLocal.c:1245 src/LYLocal.c:1667 src/LYLocal.c:1843 src/LYLocal.c:1863 +msgid "Unable to get status of '%s'." +msgstr "" + +#: src/LYLocal.c:395 src/LYLocal.c:438 +msgid "Path too long" +msgstr "" + +#: src/LYLocal.c:455 src/LYLocal.c:492 src/LYLocal.c:543 src/LYLocal.c:577 src/LYLocal.c:654 src/LYLocal.c:685 +msgid "move %s to %s" +msgstr "" + +#: src/LYLocal.c:472 src/LYLocal.c:509 src/LYLocal.c:663 src/LYLocal.c:694 +msgid "Destination has different owner! Request denied." +msgstr "" + +#: src/LYLocal.c:478 src/LYLocal.c:515 src/LYLocal.c:642 src/LYLocal.c:673 +msgid "Destination is not a valid directory! Request denied." +msgstr "" + +#: src/LYLocal.c:516 src/LYLocal.c:550 src/LYLocal.c:1848 +msgid "The selected item is not a file or a directory! Request ignored." +msgstr "" + +#: src/LYLocal.c:526 src/LYLocal.c:560 src/LYUpload.c:109 src/LYUpload.c:110 +msgid "Illegal character \"/\" found! Request ignored." +msgstr "Caractère «/» non autorisé; demande non traitée" + +#: src/LYLocal.c:540 src/LYLocal.c:574 src/LYLocal.c:788 src/LYLocal.c:810 src/LYLocal.c:845 src/LYLocal.c:867 src/LYLocal.c:955 src/LYLocal.c:965 +msgid "Unable to determine status of '%s'." +msgstr "" + +#: src/LYLocal.c:553 src/LYLocal.c:587 src/LYLocal.c:800 src/LYLocal.c:822 src/LYLocal.c:857 src/LYLocal.c:879 +msgid "There is already a directory with that name! Request ignored." +msgstr "" + +#: src/LYLocal.c:555 src/LYLocal.c:589 src/LYLocal.c:802 src/LYLocal.c:824 src/LYLocal.c:859 src/LYLocal.c:881 +msgid "There is already a file with that name! Request ignored." +msgstr "" + +#: src/LYLocal.c:557 src/LYLocal.c:591 src/LYLocal.c:804 src/LYLocal.c:826 src/LYLocal.c:861 src/LYLocal.c:883 +msgid "The specified name is already in use! Request ignored." +msgstr "" + +#: src/LYLocal.c:598 src/LYLocal.c:630 +msgid "Enter new location for file: " +msgstr "" + +#: src/LYLocal.c:744 src/LYLocal.c:766 +msgid "This feature not yet implemented!" +msgstr "" + +#: src/LYLocal.c:792 src/LYLocal.c:814 +msgid "create %s" +msgstr "" + +#: src/LYLocal.c:935 src/LYLocal.c:945 +msgid "Remove '%s' and all of its contents (y or n): " +msgstr "Supprimer '%s' et tout son contenu (o ou n) : " + +#: src/LYLocal.c:942 src/LYLocal.c:952 +msgid "Remove file '%s' (y or n): " +msgstr "Supprimer le fichier '%s' (o ou n) : " + +#: src/LYLocal.c:949 src/LYLocal.c:959 +msgid "Remove symbolic link '%s' (y or n): " +msgstr "Supprimer le lien symbolique '%s' (o ou n) : " + +# Following strings are from the modify/permissions form +#: src/LYLocal.c:1124 src/LYLocal.c:1135 +msgid "Owner:
                                  \n" +msgstr "Propriétaire :
                                  \n" + +#: src/LYLocal.c:1140 src/LYLocal.c:1151 +msgid "Group %s:
                                  \n" +msgstr "Groupe %s :
                                  \n" + +#: src/LYLocal.c:1156 src/LYLocal.c:1167 +msgid "Others:
                                  \n" +msgstr "Autres :
                                  \n" + +# Translate second "Submit" and "form to permit"; %s is the filename +# This one will have to be tested in context; I am ensure +#: src/LYLocal.c:1173 src/LYLocal.c:1184 +msgid "" +"
                                  \n" +"
                                1. form to permit %s %s.\n" +"
                                \n" +"\n" +msgstr "" +"
                                \n" +"
                              1. la permission pour %s %s.\n" +"
                              \n" +"\n" + +#: src/LYLocal.c:1195 src/LYLocal.c:1197 src/LYLocal.c:1206 src/LYLocal.c:1208 src/LYLocal.c:1226 src/LYLocal.c:1228 src/LYLocal.c:1232 src/LYLocal.c:1234 +msgid "Special URL only valid from current File Permission menu!" +msgstr "URL spécial valide uniquement depuis le menu de permission d'accès actif" + +#: src/LYLocal.c:1377 src/LYLocal.c:1388 +msgid "NULL URL pointer" +msgstr "" + +#: src/LYLocal.c:1611 src/LYLocal.c:1628 +msgid "Unable to open file management menu file." +msgstr "Impossible d'ouvrir le menu de gestion de fichier." + +#: src/LYLocal.c:1644 src/LYLocal.c:1684 +msgid "Current directory: %s
                              \n" +msgstr "" + +#: src/LYLocal.c:1648 src/LYLocal.c:1688 +msgid "Current selection: %s

                              \n" +msgstr "" + +#: src/LYLocal.c:1650 src/LYLocal.c:1690 +msgid "Current selection: Nothing currently selected.

                              \n" +msgstr "" + +#: src/LYLocal.c:1663 src/LYLocal.c:1703 +msgid "Current selection: %d tagged item%s" +msgstr "" + +#: src/LYLocal.c:1813 src/LYLocal.c:1867 +msgid "The selected item is not a directory! Request ignored." +msgstr "" + +#: src/LYMail.c:49 +msgid "Warning! Control codes in mail address replaced by ?" +msgstr "" + +#: src/LYMail.c:295 +msgid "Subject: " +msgstr "Objet : " + +#: src/LYMail.c:300 src/LYMail.c:320 +msgid "Mailto form submission cancelled!!!" +msgstr "Envoi du formulaire mailto annul!" + +#: src/LYMail.c:337 src/LYMail.c:345 src/LYMail.c:385 +msgid "Mailto form submission failed!" +msgstr "Impossible d'envoyer le formulaire mailto!" + +#: src/LYMail.c:404 +msgid "Sending form content..." +msgstr "Envoi du contenu du formulaire..." + +#: src/LYMail.c:835 src/LYMainLoop.c:605 src/LYMainLoop.c:610 +msgid "Unable to open traversal errors output file" +msgstr "Impossible d'ouvrir le fichier sortie d'erreurs de parcours" + +#: src/LYMail.c:915 src/LYMail.c:917 src/LYMail.c:1164 src/LYMail.c:1166 +msgid "No email address is present in mailto URL!" +msgstr "Aucune adresse de courrier ne figure dans l'URL mailto!" + +#: src/LYMail.c:920 src/LYMail.c:922 src/LYMail.c:926 src/LYMail.c:928 src/LYMail.c:1839 src/LYMail.c:1841 +msgid "Unable to open temporary file for mailto URL!" +msgstr "Impossible d'ouvrir de fichier temporaire pour l'URL mailto!" + +# NdT: This one is not clear... +#: src/LYMail.c:1283 src/LYMail.c:1285 +msgid "" +"You are sending a message with body to:\n" +" " +msgstr "" +"Vous envoyez un message à :\n" +" " + +#: src/LYMail.c:1285 src/LYMail.c:1287 +msgid "" +"You are sending a comment to:\n" +" " +msgstr "Vous envoyez maintenant un commentaire à : " + +#: src/LYMail.c:1309 src/LYMail.c:1311 +msgid "" +"\n" +" With copies to:\n" +" " +msgstr "" + +#: src/LYMail.c:1311 src/LYMail.c:1313 +msgid "" +"\n" +" With copy to:\n" +" " +msgstr "" + +# The following two messages have been put together to make: +#: src/LYMail.c:1337 src/LYMail.c:1339 +msgid "" +"\n" +" Please enter your name, or leave it blank to remain anonymous\n" +msgstr "" +"\n" +" Entrez votre nom (ou laissez un blanc pour rester anonyme)\n" + +#: src/LYMail.c:1346 src/LYMail.c:1348 +msgid "Personal_name: " +msgstr "" + +#: src/LYMail.c:1351 src/LYMail.c:1353 +msgid "Personal Name: " +msgstr "Nom: " + +#: src/LYMail.c:1356 src/LYMail.c:1358 src/LYMail.c:1398 src/LYMail.c:1400 src/LYMail.c:1444 src/LYMail.c:1446 src/LYMail.c:1477 src/LYMail.c:1479 src/LYMail.c:1646 src/LYMail.c:1648 src/LYMail.c:1659 src/LYMail.c:1661 src/LYMail.c:1846 src/LYMail.c:1848 src/LYMail.c:1852 src/LYMail.c:1854 +msgid "Comment request cancelled!!!" +msgstr "Demande de commentaire annulée!" + +#: src/LYMail.c:1555 src/LYMail.c:1557 +msgid "Do you wish to include the preparsed source? (y/n) " +msgstr "Voulez-vous inclure la source pré-analysée? (o/n) " + +#: src/LYMail.c:1557 src/LYMail.c:1559 src/LYNews.c:216 src/LYNews.c:217 +msgid "Do you wish to include the original message? (y/n) " +msgstr "Voulez-vous inclure le message d'origine? (o/n) " + +#: src/LYMail.c:1585 src/LYMail.c:1587 +msgid "Spawning your selected editor to edit mail message" +msgstr "Lancement de votre éditeur de choix pour l'édition du message" + +#: src/LYMail.c:1589 src/LYMail.c:1591 src/LYNews.c:247 src/LYNews.c:248 +msgid "Error spawning editor, check your editor definition in the options menu" +msgstr "Erreur de lancement; vérifier les données sur l'éditeur dans les paramètres" + +#: src/LYMail.c:1606 src/LYMail.c:1608 +msgid "" +"\n" +"Press RETURN to continue: " +msgstr "" +"\n" +"Faites ENTR pour continuer :" + +# ========================== +# More missed strings 97-Dec-9 -CM (from LYMessages_en.h) +#: src/LYMail.c:1679 src/LYMail.c:1681 +msgid "Send this message? (y/n) " +msgstr "Envoyer ce message? (o/n)" + +#: src/LYMail.c:1681 src/LYMail.c:1683 +msgid "Send this comment? (y/n) " +msgstr "Envoyer ce commentaire? (o/n) " + +# Must find context of APPEND_SIG_FILE assume +# printf (APPEND_SIG_FILE, sig_filename); +# ie "Append '~/.signature'? (y/n) " +#: src/LYMail.c:1694 src/LYMail.c:1696 src/LYNews.c:305 src/LYNews.c:306 +msgid "Append '%s'? (y/n) " +msgstr "Adjoindre '%s'? (o/n) " + +#: src/LYMail.c:1835 src/LYMail.c:1837 +msgid "Sending your message..." +msgstr "Envoi de votre message..." + +#: src/LYMain.c:536 src/LYMain.c:539 src/LYMain.c:564 +msgid "No Winsock found, sorry." +msgstr "" + +#: src/LYMain.c:687 src/LYMain.c:690 src/LYMain.c:722 +msgid "You MUST define a valid TMP or TEMP area!\n" +msgstr "" + +#: src/LYMain.c:1038 src/LYMain.c:1051 src/LYMain.c:1058 src/LYMain.c:1060 src/LYMain.c:1068 src/LYMain.c:1071 src/LYMainLoop.c:142 src/LYMainLoop.c:145 +msgid "Trace Log open failed. Trace off!." +msgstr "Échec d'ouverture du journal de parcours. Annuler la commande!" + +#: src/LYMain.c:1071 src/LYMain.c:1088 src/LYMain.c:1091 +msgid "Jump to (use '?' for list): " +msgstr "Accès à (entrez '?' pour la liste des raccourcis) : " + +# src/LYList.h +# msgid "Lynx List Page" +# msgstr "Page de références Lynx" +# src/LYMain.c +#: src/LYMain.c:1144 src/LYMain.c:1161 src/LYMain.c:1163 +msgid "" +"\n" +"Lynx character sets not declared.\n" +"\n" +msgstr "" +"\n" +"Jeux de caractères Lynx non précisés.\n" +"\n" + +#: src/LYMain.c:1203 src/LYMain.c:1220 +msgid "" +"\n" +"Lynx file %s is not available.\n" +"\n" +msgstr "" + +#: src/LYMain.c:1206 +msgid "" +"\n" +"Lynxile file %s is not available.\n" +"\n" +msgstr "" +"\n" +"Le fichier Lynxile %s n'est pas disponible.\n" +"\n" + +# msgid "Default Bookmark File" +# msgstr "fichier de signets par défaut" +# msgid "Default Bookmark File" +# msgstr "fichier de signets implicite" +#: src/LYMain.c:1652 src/LYMain.c:1684 src/LYMain.c:1687 src/LYrcFile.c:102 +msgid "Default Bookmark File" +msgstr "fichier signets implicite" + +#: src/LYMain.c:2444 +msgid "" +"\n" +"%s Version %s (%.*s)\n" +msgstr "" + +#: src/LYMain.c:2451 src/LYMain.c:2489 src/LYMain.c:2510 src/LYMain.c:2511 +msgid "Copyrights held by the University of Kansas, CERN, and other contributors.\n" +msgstr "Copyright s'est tenu par l'université du Kansas, du CERN, et d'autres contribuants\n" + +#: src/LYMain.c:2453 src/LYMain.c:2491 src/LYMain.c:2512 src/LYMain.c:2513 +msgid "Distributed under the GNU General Public License.\n" +msgstr "Distribué sous le permis de grand public de GNU\n" + +#: src/LYMain.c:2455 src/LYMain.c:2493 src/LYMain.c:2514 src/LYMain.c:2515 +msgid "" +"See http://lynx.browser.org/ and the online help for more information.\n" +"\n" +msgstr "Voyez http://lynx.browser.org / et d'aide en ligne pour plus d'information.\n" + +#: src/LYMain.c:2486 src/LYMain.c:2507 src/LYMain.c:2508 +msgid "%s Version %s %s" +msgstr "%s Version %s %s" + +#: src/LYMainLoop.c:300 src/LYMainLoop.c:307 src/LYMainLoop.c:896 src/LYMainLoop.c:915 src/LYMainLoop.c:4610 src/LYMainLoop.c:4641 src/LYMainLoop.c:4642 src/LYMainLoop.c:4774 src/LYMainLoop.c:4805 src/LYMainLoop.c:4806 +msgid "Bookmark features are currently disabled." +msgstr "Les fonctions de signets sont présentement désactivées." + +#: src/LYMainLoop.c:304 src/LYMainLoop.c:311 +msgid "Bookmark files cannot be traversed (only http URLs)." +msgstr "Les fichiers de signets ne peuvent être parcourus (seuls les URL http)" + +#: src/LYMainLoop.c:316 src/LYMainLoop.c:323 src/LYMainLoop.c:846 src/LYMainLoop.c:857 src/LYMainLoop.c:911 src/LYMainLoop.c:939 +msgid "Lynx Bookmarks" +msgstr "" + +#: src/LYMainLoop.c:325 src/LYMainLoop.c:332 src/LYMainLoop.c:4801 src/LYMainLoop.c:4832 src/LYMainLoop.c:4833 +msgid "Unable to open bookmark file, use 'a' to save a link first" +msgstr "Impossible d'ouvrir le fichier; tapez 'a' pour enreg. un lien d'abord" + +#: src/LYMainLoop.c:640 src/LYMainLoop.c:645 src/LYMainLoop.c:647 src/LYMainLoop.c:652 +msgid "" +"\n" +"lynx: Can't access startfile %s\n" +msgstr "" +"\n" +"lynx : accès impossible au fichier de départ %s\n" + +#: src/LYMainLoop.c:1127 src/LYMainLoop.c:1155 src/LYMainLoop.c:1181 src/LYMainLoop.c:1188 src/LYMainLoop.c:1209 src/LYMainLoop.c:1216 src/LYShowInfo.c:324 src/LYShowInfo.c:341 src/ShowInfo.c:285 +msgid "None" +msgstr "Aucun(e)" + +#: src/LYMainLoop.c:1337 src/LYMainLoop.c:1365 +msgid "Currently viewing document source. Press '' to return to rendered version." +msgstr "" + +#: src/LYMainLoop.c:1355 src/LYMainLoop.c:1383 +msgid "UNMODIFIABLE form password. Use UP or DOWN arrows or tab to move off." +msgstr "Utilisez les touches HAUT/BAS ou le tabulateur pour vous déplacer" + +#: src/LYMainLoop.c:1367 src/LYMainLoop.c:1395 +msgid "UNMODIFIABLE form checkbox. Use UP or DOWN arrows or tab to move off." +msgstr "Utilisez les touches HAUT/BAS ou le tabulateur pour vous déplacer" + +#: src/LYMainLoop.c:1369 src/LYMainLoop.c:1397 +msgid "(Checkbox Field) Use right-arrow or to toggle." +msgstr "Touche DROITE ou pour changer d'option" + +#: src/LYMainLoop.c:1373 src/LYMainLoop.c:1401 +msgid "UNMODIFIABLE form radio button. Use UP or DOWN arrows or tab to move off." +msgstr "Utilisez les touches HAUT/BAS ou le tabulateur pour vous déplacer" + +#: src/LYMainLoop.c:1375 src/LYMainLoop.c:1403 +msgid "(Radio Button) Use right-arrow or to toggle." +msgstr "Touche DROITE ou pour changer d'option" + +#: src/LYMainLoop.c:1379 src/LYMainLoop.c:1407 +msgid "UNMODIFIABLE form field. Use UP or DOWN arrows or tab to move off." +msgstr "Utilisez les touches HAUT/BAS ou le tabulateur pour vous déplacer" + +#: src/LYMainLoop.c:1384 src/LYMainLoop.c:1412 +msgid "(mailto form field) Mail is disallowed so you cannot submit." +msgstr "Fonction de courrier invalidée; impossible de soumettre l'envoi" + +#: src/LYMainLoop.c:1386 src/LYMainLoop.c:1414 +msgid "(mailto form field) Enter text. Use to submit, arrows to move off." +msgstr "Entrez le texte. pour confirmer; touches fléchées pour vous déplacer" + +#: src/LYMainLoop.c:1396 src/LYMainLoop.c:1424 +msgid "DISABLED form submit button. Use UP or DOWN arrows or tab to move off." +msgstr "Utilisez les touches HAUT/BAS ou le tabulateur pour vous déplacer" + +#: src/LYMainLoop.c:1400 src/LYMainLoop.c:1428 +msgid "(mailto form submit button) Mail is disallowed so you cannot submit." +msgstr "Fonction de courrier invalidée; envoi impossible" + +#: src/LYMainLoop.c:1405 src/LYMainLoop.c:1433 +msgid "(Form submit button) Use right-arrow or to submit." +msgstr "Utilisez la touche DROITE ou pour confirmer" + +#: src/LYMainLoop.c:1407 src/LYMainLoop.c:1435 +msgid "(Form submit button) Use right-arrow or to submit ('x' for no cache). " +msgstr "" + +#: src/LYMainLoop.c:1412 src/LYMainLoop.c:1440 +msgid "DISABLED form reset button. Use UP or DOWN arrows or tab to move off." +msgstr "Utilisez les touches HAUT/BAS ou le tabulateur pour vous déplacer" + +#: src/LYMainLoop.c:1414 src/LYMainLoop.c:1442 +msgid "(Form reset button) Use right-arrow or to reset form to defaults." +msgstr "Utilisez la touche DROITE ou pour réinitialiser le formulaire" + +#: src/LYMainLoop.c:1419 src/LYMainLoop.c:1447 +msgid "UNMODIFIABLE form text field. Use UP or DOWN arrows or tab to move off." +msgstr "" + +#: src/LYMainLoop.c:1425 src/LYMainLoop.c:1453 +msgid "(NORMAL LINK) Use right-arrow or to activate." +msgstr "Utilisez la touche DROITE ou pour activer le lien" + +#: src/LYMainLoop.c:1464 src/LYMainLoop.c:1492 +msgid "--More-- This is a searchable index. Use %s to search." +msgstr "-Suite- Ceci est un index consultable. Utilisez %s pour la recherche." + +#: src/LYMainLoop.c:1469 src/LYMainLoop.c:1497 +msgid "This is a searchable index. Use %s to search." +msgstr "Ceci est un index consultable. Utilisez %s pour la recherche." + +#: src/LYMainLoop.c:1473 src/LYMainLoop.c:1501 +msgid "-- press space for next page --" +msgstr "- appuyez sur la touche d'espacement pour aller à la page suivante -" + +#: src/LYMainLoop.c:1475 src/LYMainLoop.c:1503 src/LYMainLoop.c:1724 src/LYMainLoop.c:1752 +msgid "-- press space for more, use arrow keys to move, '?' for help, 'q' to quit." +msgstr "touche d'espac.: page suiv., flèches: se déplacer, '?': aide, 'q': quitter" + +#: src/LYMainLoop.c:1477 src/LYMainLoop.c:1505 src/LYMainLoop.c:1726 src/LYMainLoop.c:1754 +msgid "Commands: Use arrow keys to move, '?' for help, 'q' to quit, '<-' to go back." +msgstr "Touches fléchées: se déplacer, '?': aide, 'q': quitter, '<-': retour" + +# Z)ap Transfer missing from line, since it does nothing +#: src/LYMainLoop.c:1551 src/LYMainLoop.c:1579 +msgid " Enter text into the field by typing on the keyboard " +msgstr "Entrez le texte dans la zone à partir du clavier " + +#: src/LYMainLoop.c:1553 src/LYMainLoop.c:1581 +msgid " Ctrl-U to delete all text in field, [Backspace] to delete a character " +msgstr "Ctrl-U pour supprimer tout le texte, [rapp. arrière] pour effacer caractère" + +#: src/LYMainLoop.c:1844 src/LYMainLoop.c:1872 src/LYMainLoop.c:3050 src/LYMainLoop.c:3074 +msgid "Discarding POST data..." +msgstr "Suppression de données POST..." + +# Needs context for LINK_ALREADY_CURRENT +# Prints "Enter link number to follow: " +# User enters 5 +# Their cursor was on the 5th link, so it says: +# "Link number 5 already is current." +#: src/LYMainLoop.c:1902 src/LYMainLoop.c:1930 +msgid "Link number %d already is current." +msgstr "Le lien %d est déjà le lien actif." + +#: src/LYMainLoop.c:1935 src/LYMainLoop.c:1963 src/LYMainLoop.c:2228 src/LYMainLoop.c:2247 src/LYMainLoop.c:2252 src/LYMainLoop.c:2271 src/LYMainLoop.c:2284 src/LYMainLoop.c:2308 src/LYMainLoop.c:2365 src/LYMainLoop.c:2389 src/LYMainLoop.c:2466 src/LYMainLoop.c:2490 +msgid "You are already at the beginning of this document." +msgstr "Vous êtes déjà au début du document." + +#: src/LYMainLoop.c:1937 src/LYMainLoop.c:1965 src/LYMainLoop.c:2216 src/LYMainLoop.c:2240 src/LYMainLoop.c:2262 src/LYMainLoop.c:2286 src/LYMainLoop.c:2299 src/LYMainLoop.c:2323 src/LYMainLoop.c:2407 src/LYMainLoop.c:2431 src/LYMainLoop.c:2509 src/LYMainLoop.c:2533 +msgid "You are already at the end of this document." +msgstr "Vous êtes déjà à la fin du document." + +#: src/LYMainLoop.c:1941 src/LYMainLoop.c:1969 +msgid "You are already at page %d of this document." +msgstr "Vous êtes déjà à la page %d du document." + +#: src/LYMainLoop.c:1951 src/LYMainLoop.c:1979 +msgid "You have entered an invalid link number." +msgstr "Vous avez entré un numéro de lien invalide." + +#: src/LYMainLoop.c:2021 src/LYMainLoop.c:2049 src/LYMainLoop.c:3792 src/LYMainLoop.c:3816 +msgid "Reloading document. Any form entries will be lost!" +msgstr "Rechargement du document. Toutes les entrées seront effacées!" + +#: src/LYMainLoop.c:2052 src/LYMainLoop.c:2082 src/LYMainLoop.c:2086 src/LYMainLoop.c:2114 src/LYMainLoop.c:2120 src/LYMainLoop.c:2146 src/LYMainLoop.c:2147 src/LYMainLoop.c:2171 src/LYMainLoop.c:3767 src/LYMainLoop.c:3791 +msgid "Document will not be reloaded!" +msgstr "Le document ne sera pas rechargé!" + +#: src/LYMainLoop.c:2066 src/LYMainLoop.c:2094 +msgid "Historical comment parsing ON (Minimal is overridden)!" +msgstr "Analyse historique ACTIVÉE (analyse minimale annulée)" + +#: src/LYMainLoop.c:2067 src/LYMainLoop.c:2095 +msgid "Historical comment parsing OFF (Minimal is in effect)!" +msgstr "Analyse historique DÉSACTIVÉE (analyse minimale en cours)" + +#: src/LYMainLoop.c:2070 src/LYMainLoop.c:2098 +msgid "Historical comment parsing ON (Valid is overridden)!" +msgstr "Analyse historique ACTIVÉE (analyse de validation annulée)" + +#: src/LYMainLoop.c:2071 src/LYMainLoop.c:2099 +msgid "Historical comment parsing OFF (Valid is in effect)!" +msgstr "Analyse historique DÉSACTIVÉE (analyse de validation en cours)" + +#: src/LYMainLoop.c:2101 src/LYMainLoop.c:2127 +msgid "Minimal comment parsing ON (and in effect)!" +msgstr "Analyse minimale ACTIVÉE (et en cours)" + +#: src/LYMainLoop.c:2102 src/LYMainLoop.c:2128 +msgid "Minimal comment parsing OFF (Valid is in effect)!" +msgstr "Analyse minimale DÉSACTIVÉE (analyse de validation en cours)" + +#: src/LYMainLoop.c:2105 src/LYMainLoop.c:2131 +msgid "Minimal comment parsing ON (but Historical is in effect)!" +msgstr "Analyse minimale ACTIVÉE (mais l'analyse historique est en cours)" + +#: src/LYMainLoop.c:2106 src/LYMainLoop.c:2132 +msgid "Minimal comment parsing OFF (Historical is in effect)!" +msgstr "Analyse minimale DÉSACTIVÉE (l'analyse historique est en cours)" + +#: src/LYMainLoop.c:2133 src/LYMainLoop.c:2157 +msgid "Soft double-quote parsing ON!" +msgstr "Analyse à tolérance de fautes (soft double-quote) ACTIVÉE" + +#: src/LYMainLoop.c:2134 src/LYMainLoop.c:2158 +msgid "Soft double-quote parsing OFF!" +msgstr "Analyse à tolérance de fautes (soft double-quote) DÉSACTIVÉE" + +#: src/LYMainLoop.c:2174 src/LYMainLoop.c:2198 +msgid "Now using SortaSGML parsing of HTML!" +msgstr "Analyse du HTML à l'aide de SortaSGML." + +#: src/LYMainLoop.c:2175 src/LYMainLoop.c:2199 +msgid "Now using TagSoup parsing of HTML." +msgstr "Analyse du HTML à l'aide de TagSoup." + +# BEGINNING of second set +#: src/LYMainLoop.c:2186 src/LYMainLoop.c:2203 src/LYMainLoop.c:2204 src/LYMainLoop.c:2210 +msgid "Are you sure you want to quit? [Y] " +msgstr "Désirez-vous vraiment quitter? [O]" + +#: src/LYMainLoop.c:2196 src/LYMainLoop.c:2201 src/LYMainLoop.c:2213 src/LYMainLoop.c:2214 src/LYMainLoop.c:2218 src/LYMainLoop.c:2219 src/LYMainLoop.c:2220 src/LYMainLoop.c:2225 +msgid "Excellent!!!" +msgstr "Excellent!" + +# msgid "You are already at the beginning of this document." +# msgstr "Vous êtes déjà au début du document." +# msgid "You are already at the beginning of this document." +# msgstr "Vous êtes déjà au début du document." +#: src/LYMainLoop.c:2436 src/LYMainLoop.c:2460 +msgid "There are no links above this line of the document." +msgstr "Il n'y a pas de lien au-delà de cette ligne dans le document" + +#: src/LYMainLoop.c:2492 src/LYMainLoop.c:2516 +msgid "There are no links below this line of the document." +msgstr "Il n'y a pas de lien en deçà de cette ligne dans le document" + +#: src/LYMainLoop.c:2664 src/LYMainLoop.c:2688 +msgid "Skipping %s" +msgstr "Ignoré : %s" + +#: src/LYMainLoop.c:2702 src/LYMainLoop.c:2726 +msgid "You are already at the first document" +msgstr "Vous êtes déjà au premier document." + +#: src/LYMainLoop.c:2714 src/LYMainLoop.c:2738 src/LYMainLoop.c:3142 src/LYMainLoop.c:3166 +msgid "You are not on a form submission button or normal link." +msgstr "Vous n'êtes pas à un bouton Envoyer ou un lien normal." + +#: src/LYMainLoop.c:2779 src/LYMainLoop.c:2803 +msgid "file: ACTIONs are disallowed!" +msgstr "L'attribut ACTION n'est pas permis avec l'URL 'file:'" + +#: src/LYMainLoop.c:2831 src/LYMainLoop.c:2855 +msgid "This special URL cannot be a form ACTION!" +msgstr "Cet URL spécial ne peut être un attribut ACTION" + +#: src/LYMainLoop.c:2849 src/LYMainLoop.c:2873 +msgid "Enctype multipart/form-data not yet supported! Cannot submit." +msgstr "«Enctype multipart/form-data» non fonctionnel. Envoi impossible." + +#: src/LYMainLoop.c:2906 src/LYMainLoop.c:2930 +msgid "file: URLs via served links are disallowed!" +msgstr "L'URL 'file:' n'est pas permis dans les liens du serveur" + +#: src/LYMainLoop.c:2910 src/LYMainLoop.c:2934 +msgid "file: URLs via bookmarks are disallowed!" +msgstr "L'URL 'file:' n'est pas permis dans les signets" + +#: src/LYMainLoop.c:2950 src/LYMainLoop.c:2974 +msgid "This special URL is not allowed in external documents!" +msgstr "Cet URL spécial n'est pas permis dans les documents externes!" + +#: src/LYMainLoop.c:3127 src/LYMainLoop.c:3151 src/LYMainLoop.c:3238 src/LYMainLoop.c:3262 src/LYMainLoop.c:3319 src/LYMainLoop.c:3343 +msgid "Goto a random URL is disallowed!" +msgstr "Accès à un URL arbitraire invalidé." + +#: src/LYMainLoop.c:3175 src/LYMainLoop.c:3199 src/LYMainLoop.c:3257 src/LYMainLoop.c:3281 +msgid "You cannot edit File Management URLs" +msgstr "" + +#: src/LYMainLoop.c:3195 src/LYMainLoop.c:3219 +msgid "Edit the current link's URL: " +msgstr "" + +#: src/LYMainLoop.c:3277 src/LYMainLoop.c:3301 +msgid "Current document has POST data." +msgstr "Le document en cours contient des données POST." + +#: src/LYMainLoop.c:3282 src/LYMainLoop.c:3306 +msgid "Edit this document's URL: " +msgstr "Éditer l'URL de ce document :" + +#: src/LYMainLoop.c:3342 src/LYMainLoop.c:3366 +msgid "URL to open: " +msgstr "URL à ouvrir: " + +#: src/LYMainLoop.c:3404 src/LYMainLoop.c:3428 src/LYMainLoop.c:3448 src/LYMainLoop.c:3472 +msgid "Edit the current Goto URL: " +msgstr "Éditer la commande Goto URL en cours :" + +#: src/LYMainLoop.c:3407 src/LYMainLoop.c:3431 src/LYMainLoop.c:3451 src/LYMainLoop.c:3475 +msgid "Edit the previous Goto URL: " +msgstr "Éditer la commande Goto URL précédente :" + +#: src/LYMainLoop.c:3409 src/LYMainLoop.c:3433 src/LYMainLoop.c:3453 src/LYMainLoop.c:3477 +msgid "Edit a previous Goto URL: " +msgstr "Éditer une commande Goto URL précédente :" + +#: src/LYMainLoop.c:3483 src/LYMainLoop.c:3507 +msgid "You are not allowed to goto \"file:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «file:»" + +#: src/LYMainLoop.c:3491 src/LYMainLoop.c:3515 +msgid "You are not allowed to goto \"lynxexec:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «lynxexec:»" + +#: src/LYMainLoop.c:3499 src/LYMainLoop.c:3523 +msgid "You are not allowed to goto \"lynxprog:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «lynxprog:»" + +#: src/LYMainLoop.c:3503 src/LYMainLoop.c:3527 +msgid "You are not allowed to goto \"lynxcgi:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «lynxcgi:»" + +#: src/LYMainLoop.c:3508 src/LYMainLoop.c:3532 +msgid "Goto a non-http URL is disallowed!" +msgstr "Accès à un URL non http invalidé." + +#: src/LYMainLoop.c:3512 src/LYMainLoop.c:3536 +msgid "You are not allowed to goto \"cso:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «cso:»" + +#: src/LYMainLoop.c:3516 src/LYMainLoop.c:3540 +msgid "You are not allowed to goto \"finger:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «finger:»" + +#: src/LYMainLoop.c:3520 src/LYMainLoop.c:3544 +msgid "You are not allowed to goto \"ftp:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «ftp:»" + +#: src/LYMainLoop.c:3524 src/LYMainLoop.c:3548 +msgid "You are not allowed to goto \"gopher:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «gopher:»" + +#: src/LYMainLoop.c:3528 src/LYMainLoop.c:3552 +msgid "You are not allowed to goto \"http:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «http:»" + +#: src/LYMainLoop.c:3532 src/LYMainLoop.c:3556 +msgid "You are not allowed to goto \"https:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «https:»" + +#: src/LYMainLoop.c:3536 src/LYMainLoop.c:3560 +msgid "You are not allowed to goto \"mailto:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «mailto:»" + +#: src/LYMainLoop.c:3540 src/LYMainLoop.c:3564 +msgid "You are not allowed to goto \"news:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «news:»" + +#: src/LYMainLoop.c:3544 src/LYMainLoop.c:3568 +msgid "You are not allowed to goto \"nntp:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «nntp:»" + +#: src/LYMainLoop.c:3548 src/LYMainLoop.c:3572 +msgid "You are not allowed to goto \"rlogin:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «rlogin:»" + +#: src/LYMainLoop.c:3552 src/LYMainLoop.c:3576 +msgid "You are not allowed to goto \"snews:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «snews:»" + +#: src/LYMainLoop.c:3556 src/LYMainLoop.c:3580 +msgid "You are not allowed to goto \"telnet:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «telnet:»" + +#: src/LYMainLoop.c:3560 src/LYMainLoop.c:3584 +msgid "You are not allowed to goto \"tn3270:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «tn3270:»" + +#: src/LYMainLoop.c:3564 src/LYMainLoop.c:3588 +msgid "You are not allowed to goto \"wais:\" URLs" +msgstr "Vous ne pouvez accéder aux URL «wais:»" + +#: src/LYMainLoop.c:3571 src/LYMainLoop.c:3595 +msgid "This special URL is not allowed as a goto!" +msgstr "Cet URL spécial n'est pas accessible par la commande G) Aller" + +#: src/LYMainLoop.c:3610 src/LYMainLoop.c:3634 +msgid "Help Screen" +msgstr "" + +#: src/LYMainLoop.c:3629 src/LYMainLoop.c:3653 +msgid "No index is currently available." +msgstr "Aucun index n'est présentement disponible." + +#: src/LYMainLoop.c:3695 src/LYMainLoop.c:3719 +msgid "Do you really want to go to the Main screen? (y/n) [n] " +msgstr "Voulez-vous vraiment aller à l'écran principal? (o/n) [n] " + +#: src/LYMainLoop.c:3839 src/LYMainLoop.c:3843 src/LYOptions.c:3787 +msgid "Options Menu" +msgstr "" + +#: src/LYMainLoop.c:3936 src/LYMainLoop.c:3960 +msgid "Not a searchable indexed document -- press '/' to search for a text string" +msgstr "Document non indexé - faites '/' pour chercher une séquence de texte." + +#: src/LYMainLoop.c:4013 src/LYMainLoop.c:4037 +msgid "No owner is defined for this file so you cannot send a comment" +msgstr "Aucun propriétaire pour ce fichier; impossible d'envoyer un commentaire" + +#: src/LYMainLoop.c:4018 src/LYMainLoop.c:4042 +msgid "Mail is disallowed so you cannot send a comment" +msgstr "Fonction de courrier invalidée; impossible d'envoyer un commentaire" + +#: src/LYMainLoop.c:4021 src/LYMainLoop.c:4045 +msgid "Do you wish to send a comment? [N]" +msgstr "Voulez-vous envoyer un commentaire? [N]" + +#: src/LYMainLoop.c:4054 src/LYMainLoop.c:4078 +msgid "No owner is defined. Use %s? [N] " +msgstr "Aucun propriétaire n'est défini. Utiliser %s? [N] " + +#: src/LYMainLoop.c:4187 src/LYMainLoop.c:4211 src/LYOptions.c:384 src/LYOptions.c:445 +msgid "The 'e'dit command is currently disabled." +msgstr "La commande 'e' (Éditer) est présentement désactivée." + +#: src/LYMainLoop.c:4209 src/LYMainLoop.c:4238 +msgid "System error - failure to get status." +msgstr "Erreur système - impossible d'obtenir l'état." + +#: src/LYMainLoop.c:4266 src/LYMainLoop.c:4298 +msgid "No editor is defined!" +msgstr "Aucun éditeur n'est défini." + +#: src/LYMainLoop.c:4281 src/LYMainLoop.c:4313 +msgid "Do you really want to delete this link from your bookmark file? (y/n)" +msgstr "Voulez-vous vraiment supprimer ce lien de vos signets? (o/n)" + +#: src/LYMainLoop.c:4350 src/LYMainLoop.c:4382 +msgid "The 'p'rint command is currently disabled." +msgstr "La commande 'p' (Imprimer) est présentement désactivée." + +#: src/LYMainLoop.c:4424 src/LYMainLoop.c:4455 src/LYMainLoop.c:4456 +msgid "No previously visited links available!" +msgstr "Aucun lien déjà activé n'est disponible" + +#: src/LYMainLoop.c:4445 src/LYMainLoop.c:4476 src/LYMainLoop.c:4477 +msgid "Document has no Toolbar links or Banner." +msgstr "Aucun lien vers une barre d'outil ou une bannière" + +# msgid "Memory exhausted! Program aborted!" +# msgstr "Mémoire insuffisante. Abandon!" +#: src/LYMainLoop.c:4482 src/LYMainLoop.c:4513 src/LYMainLoop.c:4514 +msgid "Directory/File Manager not available" +msgstr "Gestionnaire de fichier/répertoire non disponible" + +#: src/LYMainLoop.c:4617 src/LYMainLoop.c:4619 src/LYMainLoop.c:4623 src/LYMainLoop.c:4626 src/LYMainLoop.c:4632 src/LYMainLoop.c:4634 +msgid "" +msgstr "" +"Date: 1998-11-02 00:47:46-0500\n" +"From: jim \n" +"Content-Type: text/plain; charset=\n" +"Xgettext-Options: -f /j/NetBSD/src/lynx/lynx-translations/files.t -F -j -p po -d fr\n" +"Files: src/GridText.c src/HTAlert.c src/HTFWriter.c src/HTInit.c src/HTML.c src/LYBookmark.c src/LYCgi.c src/LYCharUtils.c src/LYClean.c src/LYCookie.c src/LYCurses.c src/LYDownload.c src/LYEdit.c src/LYExtern.c src/LYForms.c src/LYGetFile.c src/LYHistory.c src/LYJump.c src/LYKeymap.c src/LYLeaks.c src/LYList.c src/LYLocal.c src/LYMail.c src/LYMain.c src/LYMainLoop.c src/LYMap.c src/LYNews.c src/LYOptions.c src/LYPrint.c src/LYReadCFG.c src/LYSearch.c src/LYShowInfo.c src/LYStrings.c src/LYStyle.c src/LYTraversal.c src/LYUpload.c src/LYUtils.c src/LYexit.c src/LYrcFile.c WWW/Library/Implementation/HTAABrow.c WWW/Library/Implementation/HTAAProt.c WWW/Library/Implementation/HTAccess.c WWW/Library/Implementation/HTFTP.c WWW/Library/Implementation/HTFWriter.c WWW/Library/Implementation/HTFinger.c WWW/Library/Implementation/HTFormat.c WWW/Library/Implementation/HTGopher.c WWW/Library/Implementation/HTMIME.c WWW/Library/Implementation/HTNews.c WWW/Library/Implementation/HTRules.c " +"WWW/Library/Implementation/HTStyle.c WWW/Library/Implementation/HTTCP.c WWW/Library/Implementation/HTTP.c WWW/Library/Implementation/HTVMSUtils.c WWW/Library/Implementation/HTWAIS.c WWW/Library/Implementation/HTWSRC.c\n" + +#: src/LYMainLoop.c:4617 src/LYMainLoop.c:4619 src/LYMainLoop.c:4623 src/LYMainLoop.c:4626 src/LYMainLoop.c:4632 src/LYMainLoop.c:4634 src/LYMainLoop.c:4648 src/LYMainLoop.c:4650 src/LYMainLoop.c:4654 src/LYMainLoop.c:4657 src/LYMainLoop.c:4663 src/LYMainLoop.c:4665 src/LYMainLoop.c:4696 src/LYMainLoop.c:4697 +msgid "Save D)ocument or L)ink to bookmark file or C)ancel? (d,l,c): " +msgstr "D) Enreg. le document, L) Enreg. le lien ou C) Annuler? (d,l,c) : " + +#: src/LYMainLoop.c:4649 src/LYMainLoop.c:4651 src/LYMainLoop.c:4655 src/LYMainLoop.c:4658 src/LYMainLoop.c:4664 src/LYMainLoop.c:4666 src/LYMainLoop.c:4691 src/LYMainLoop.c:4710 src/LYMainLoop.c:4722 src/LYMainLoop.c:4723 src/LYMainLoop.c:4731 src/LYMainLoop.c:4741 src/LYMainLoop.c:4742 src/LYMainLoop.c:4762 src/LYMainLoop.c:4763 +msgid "Documents from forms with POST content cannot be saved as bookmarks." +msgstr "Les documents ayant un contenu POST ne peuvent être marqués d'un signet" + +#: src/LYMainLoop.c:4700 src/LYMainLoop.c:4731 src/LYMainLoop.c:4732 +msgid "Save L)ink to bookmark file or C)ancel? (l,c): " +msgstr "L) Enreg. le Lien sous fichier de signets ou C) Annuler? (l,c) : " + +#: src/LYMainLoop.c:4721 src/LYMainLoop.c:4752 src/LYMainLoop.c:4753 +msgid "Cannot save form fields/links" +msgstr "Impossible d'enregistrer les zones ou les liens d'un formulaire." + +#: src/LYMainLoop.c:4738 src/LYMainLoop.c:4769 src/LYMainLoop.c:4770 +msgid "There are no links in this bookmark file!" +msgstr "Il n'y a aucun lien dans ce fichier!" + +#: src/LYMainLoop.c:4741 src/LYMainLoop.c:4772 src/LYMainLoop.c:4773 +msgid "Save D)ocument to bookmark file or C)ancel? (d,c): " +msgstr "D) Enreg. le Document sous fichier de signets ou C) Annuler? (d,c) : " + +#: src/LYMainLoop.c:4765 src/LYMainLoop.c:4796 src/LYMainLoop.c:4797 +msgid "History, showinfo, menu and list files cannot be saved as bookmarks." +msgstr "Historique, Information, Menu et Références ne peuvent être des signets" + +#: src/LYMainLoop.c:4791 src/LYMainLoop.c:4822 src/LYMainLoop.c:4823 +msgid "Lynx bookmark file" +msgstr "" + +#: src/LYMainLoop.c:4815 src/LYMainLoop.c:4846 src/LYMainLoop.c:4847 +msgid "Spawning DCL subprocess. Use 'logout' to return to Lynx.\n" +msgstr "Lancement du sous-processus DCL; «logout» pour retourner à Lynx.\n" + +#: src/LYMainLoop.c:4818 src/LYMainLoop.c:4849 src/LYMainLoop.c:4850 +msgid "Type EXIT to return to Lynx.\n" +msgstr "" + +#: src/LYMainLoop.c:4820 src/LYMainLoop.c:4851 src/LYMainLoop.c:4852 +msgid "Spawning your default shell. Use 'exit' to return to Lynx.\n" +msgstr "Lancement du shell implicite. Entrez «exit» pour retourner à Lynx.\n" + +#: src/LYMainLoop.c:4829 src/LYMainLoop.c:4860 src/LYMainLoop.c:4861 +msgid "Spawning is currently disabled." +msgstr "Le lancement est présentement désactivé." + +#: src/LYMainLoop.c:4842 src/LYMainLoop.c:4873 src/LYMainLoop.c:4874 +msgid "The 'd'ownload command is currently disabled." +msgstr "La commande «d» (décharger) est présentement désactivée." + +#: src/LYMainLoop.c:4862 src/LYMainLoop.c:4893 src/LYMainLoop.c:4894 +msgid "Form has a mailto action! Cannot download." +msgstr "Le formulaire contient une entité 'mailto:'. Déchargement impossible." + +#: src/LYMainLoop.c:4873 src/LYMainLoop.c:4904 src/LYMainLoop.c:4905 +msgid "You cannot download an input field." +msgstr "" + +#: src/LYMainLoop.c:4880 src/LYMainLoop.c:4911 src/LYMainLoop.c:4912 +msgid "You cannot download cookies." +msgstr "Vous ne pouvez télécharger les cookies." + +#: src/LYMainLoop.c:4887 src/LYMainLoop.c:4918 src/LYMainLoop.c:4919 +msgid "You cannot download a printing option." +msgstr "Impossible de télédécharger une option d'impression" + +#: src/LYMainLoop.c:4896 src/LYMainLoop.c:4927 src/LYMainLoop.c:4928 +msgid "You cannot download an upload option." +msgstr "Impossible de télédécharger une option de chargement." + +#: src/LYMainLoop.c:4976 src/LYMainLoop.c:5008 src/LYMainLoop.c:5009 +msgid "This special URL cannot be downloaded!" +msgstr "Cet URL spécial ne peut être déchargé!" + +#: src/LYMainLoop.c:4980 src/LYMainLoop.c:5012 src/LYMainLoop.c:5013 +msgid "You cannot download a mailto: link." +msgstr "" + +#: src/LYMainLoop.c:5034 src/LYMainLoop.c:5053 src/LYMainLoop.c:5054 +msgid "Nothing to download." +msgstr "Il n'y a rien à télédécharger." + +#: src/LYMainLoop.c:5101 src/LYMainLoop.c:5121 src/LYMainLoop.c:5122 +msgid "Trace ON!" +msgstr "Traçage ACTIVÉ" + +#: src/LYMainLoop.c:5102 src/LYMainLoop.c:5122 src/LYMainLoop.c:5123 +msgid "Trace OFF!" +msgstr "Traçage DÉSACTIVÉ" + +#: src/LYMainLoop.c:5111 src/LYMainLoop.c:5131 src/LYMainLoop.c:5132 +msgid "No trace log has been started for this session." +msgstr "Aucun journal de parcours n'a été lancé pour cette session." + +#: src/LYMainLoop.c:5157 src/LYMainLoop.c:5182 src/LYMainLoop.c:5183 +msgid "Links will be included for all images! Reloading..." +msgstr "Les liens seront inclus pour toutes les images! Chargement..." + +#: src/LYMainLoop.c:5158 src/LYMainLoop.c:5183 src/LYMainLoop.c:5184 +msgid "Standard image handling restored! Reloading..." +msgstr "Traitement d'image standard restauré. Chargement... " + +#: src/LYMainLoop.c:5169 src/LYMainLoop.c:5194 src/LYMainLoop.c:5195 +msgid "Pseudo_ALTs will be inserted for inlines without ALT strings! Reloading..." +msgstr "'pseudo-ALT' sera assigné aux images incluses sans l'attribut ALT! Chargement..." + +#: src/LYMainLoop.c:5170 src/LYMainLoop.c:5195 src/LYMainLoop.c:5196 +msgid "Inlines without an ALT string specified will be ignored! Reloading..." +msgstr "Les images incluses sans l'attribut ALT seront ignorées! Chargement..." + +#: src/LYMainLoop.c:5179 src/LYMainLoop.c:5204 src/LYMainLoop.c:5205 +msgid "Raw 8-bit or CJK mode toggled OFF! Reloading..." +msgstr "Le mode 8-bits ou CJK est réglé à DÉSACTIVÉ! Chargement..." + +#: src/LYMainLoop.c:5180 src/LYMainLoop.c:5205 src/LYMainLoop.c:5206 +msgid "Raw 8-bit or CJK mode toggled ON! Reloading..." +msgstr "Le mode 8-bits ou CJK est réglé à ACTIVÉ! Chargement..." + +#: src/LYMainLoop.c:5195 src/LYMainLoop.c:5220 src/LYMainLoop.c:5221 +msgid "Send HEAD request for D)ocument or L)ink, or C)ancel? (d,l,c): " +msgstr "Envoyer requête HEAD pour D)ocument, L)ien ou C) Annuler? (d,l,c) : " + +#: src/LYMainLoop.c:5201 src/LYMainLoop.c:5226 src/LYMainLoop.c:5227 src/LYMainLoop.c:5295 src/LYMainLoop.c:5320 src/LYMainLoop.c:5321 +msgid "Sorry, the document is not an http URL." +msgstr "Désolé, le document n'est pas un URL http." + +#: src/LYMainLoop.c:5210 src/LYMainLoop.c:5235 src/LYMainLoop.c:5236 src/LYMainLoop.c:5266 src/LYMainLoop.c:5291 src/LYMainLoop.c:5292 +msgid "Document from POST action, HEAD may not be understood. Proceed?" +msgstr "Document de type POST; l'élément HEAD peut être inconnu. Procéder?" + +#: src/LYMainLoop.c:5234 src/LYMainLoop.c:5259 src/LYMainLoop.c:5260 +msgid "Sorry, the link is not an http URL." +msgstr "Désolé, le document n'est pas un URL http." + +#: src/LYMainLoop.c:5237 src/LYMainLoop.c:5262 src/LYMainLoop.c:5263 +msgid "Sorry, the ACTION for this form is disabled." +msgstr "Désolé, l'attribut ACTION est invalidé pour ce formulaire." + +#: src/LYMainLoop.c:5243 src/LYMainLoop.c:5268 src/LYMainLoop.c:5269 +msgid "Sorry, the ACTION for this form is not an http URL." +msgstr "Désolé, l'attribut ACTION pour ce formulaire n'est pas un URL http." + +#: src/LYMainLoop.c:5247 src/LYMainLoop.c:5272 src/LYMainLoop.c:5273 +msgid "Form submit action is POST, HEAD may not be understood. Proceed?" +msgstr "Envoi par méthode POST; l'élément HEAD peut être inconnu. Procéder?" + +#: src/LYMainLoop.c:5276 src/LYMainLoop.c:5301 src/LYMainLoop.c:5302 +msgid "Send HEAD request for D)ocument, or C)ancel? (d,c): " +msgstr "Envoyer requête HEAD pour D)ocument ou C) Annuler? (d,c) :" + +#: src/LYMainLoop.c:5360 src/LYMainLoop.c:5385 src/LYMainLoop.c:5386 +msgid "Jumping to a shortcut URL is disallowed!" +msgstr "L'accès à un URL par raccourci est invalidé!" + +#: src/LYMainLoop.c:5362 src/LYMainLoop.c:5387 src/LYMainLoop.c:5388 +msgid "No jump file is currently available." +msgstr "Aucun fichier-raccourci n'est présentement disponible." + +# LYMessages_en.h +#: src/LYMainLoop.c:5428 src/LYMainLoop.c:5453 src/LYMainLoop.c:5454 +msgid "Clear all authorization info for this session?" +msgstr "Effacer toute l'information d'autorisation pour cette session?" + +#: src/LYMainLoop.c:5436 src/LYMainLoop.c:5461 src/LYMainLoop.c:5462 +msgid "Authorization info cleared." +msgstr "Information d'autorisation effacée." + +#: src/LYMainLoop.c:5494 src/LYMainLoop.c:5501 src/LYMainLoop.c:5519 src/LYMainLoop.c:5520 src/LYMainLoop.c:5526 src/LYMainLoop.c:5527 +msgid "List from document with POST data. Reload %s ?" +msgstr "Liste d'un document avec données POST. Recharger %s ?" + +#: src/LYMap.c:194 src/LYMap.c:196 +msgid "Out of memory in LYAddImageMap" +msgstr "" + +#: src/LYMap.c:423 src/LYMap.c:425 +msgid "Misdirected client-side image MAP request!" +msgstr "Erreur de demande d'image référencée client." + +#: src/LYMap.c:436 src/LYMap.c:438 src/LYMap.c:477 src/LYMap.c:479 +msgid "LYNXIMGMAP: Document from Form with POST content. Resubmit?" +msgstr "" + +# src/LYMap.c +#: src/LYMap.c:439 src/LYMap.c:441 src/LYMap.c:480 src/LYMap.c:482 +msgid "Image map from POST response not available!" +msgstr "Image référencée de la réponse POST non disponible" + +#: src/LYMap.c:451 src/LYMap.c:453 src/LYMap.c:492 src/LYMap.c:494 +msgid "Client-side image MAP is not accessible!" +msgstr "L'image référencée client n'est pas accessible." + +#: src/LYMap.c:462 src/LYMap.c:464 +msgid "No client-side image MAPs are available!" +msgstr "Aucune image référencée client n'est disponible." + +#: src/LYMap.c:506 src/LYMap.c:508 +msgid "Client-side image MAP is not available!" +msgstr "L'image référencée client n'est pas disponible." + +# src/LYNews.c +# msgid "You will be posting to:" +# msgstr "Vous envoyez un message à :" +#: src/LYNews.c:119 src/LYNews.c:120 +msgid "" +"\n" +"\n" +" Please provide your mail address for the From: header\n" +msgstr "" +"\n" +"\n" +" Veuillez fournir ou éditer l'en-tête Exp. :\n" + +#: src/LYNews.c:126 src/LYNews.c:127 src/LYNews.c:155 src/LYNews.c:156 src/LYNews.c:190 src/LYNews.c:191 src/LYNews.c:264 src/LYNews.c:265 src/LYNews.c:275 src/LYNews.c:276 +msgid "News Post Cancelled!!!" +msgstr "Envoi des nouvelles annulé!" + +#: src/LYNews.c:138 src/LYNews.c:139 +msgid "" +"\n" +"\n" +" Please provide or edit the Subject: header\n" +msgstr "" +"\n" +"\n" +" Veuillez fournir ou éditer l'en-tête Objet :\n" + +#: src/LYNews.c:186 src/LYNews.c:187 +msgid "" +"\n" +"\n" +" Please provide or edit the Organization: header\n" +msgstr "" +"\n" +"\n" +" Veuillez fournir ou éditer l'en-tête Organisme :\n" + +#: src/LYNews.c:243 src/LYNews.c:244 +msgid "Spawning your selected editor to edit news message" +msgstr "Lancement de votre éditeur pour éditer un message" + +#: src/LYNews.c:292 src/LYNews.c:293 +msgid "Post this message? (y/n) " +msgstr "Envoyer ce message? (o/n) " + +#: src/LYNews.c:363 src/LYNews.c:364 +msgid "Posting to newsgroup(s)..." +msgstr "Envoi du message..." + +#: src/LYOptions.c:85 src/LYOptions.c:146 +msgid "Screen height must be at least 24 lines for the Options menu!" +msgstr "La hauteur d'écran doit être au moins 24 lignes pour ce menu!" + +# msgid "Screen height must be at least 23 lines for the Options menu!" +# msgstr "La hauteur d'écran doit être au moins 23 lignes pour ce menu!" +#: src/LYOptions.c:103 src/LYOptions.c:164 +msgid "Screen height must be at least 22 lines for the Options menu!" +msgstr "La hauteur d'écran doit être au moins 22 lignes pour ce menu!" + +#: src/LYOptions.c:338 src/LYOptions.c:399 +msgid "Select " +msgstr "Choisir " + +#: src/LYOptions.c:340 src/LYOptions.c:401 +msgid "capital letter" +msgstr "majuscule" + +#: src/LYOptions.c:342 src/LYOptions.c:403 +msgid " of option line," +msgstr " de la ligne d'option," + +#: src/LYOptions.c:349 src/LYOptions.c:410 src/LYOptions.c:1859 src/LYOptions.c:1860 src/LYOptions.c:1919 +msgid " to save," +msgstr " pour enregistrer," + +#: src/LYOptions.c:351 src/LYOptions.c:412 src/LYOptions.c:1861 src/LYOptions.c:1862 src/LYOptions.c:1921 +msgid " or " +msgstr " ou " + +#: src/LYOptions.c:357 src/LYOptions.c:418 src/LYOptions.c:1867 src/LYOptions.c:1868 src/LYOptions.c:1927 +msgid " to return to Lynx." +msgstr " pour retourner à Lynx" + +#: src/LYOptions.c:364 src/LYOptions.c:417 src/LYOptions.c:425 src/LYOptions.c:457 src/LYOptions.c:470 src/LYOptions.c:478 src/LYOptions.c:497 src/LYOptions.c:518 src/LYOptions.c:531 src/LYOptions.c:558 src/LYOptions.c:633 src/LYOptions.c:694 src/LYOptions.c:929 src/LYOptions.c:930 src/LYOptions.c:965 src/LYOptions.c:966 src/LYOptions.c:989 src/LYOptions.c:1025 src/LYOptions.c:1459 src/LYOptions.c:1460 src/LYOptions.c:1519 src/LYOptions.c:1731 src/LYOptions.c:1732 src/LYOptions.c:1791 src/LYOptions.c:3084 src/LYOptions.c:3088 src/LYOptions.c:3144 +msgid "Value accepted!" +msgstr "Valeur acceptée!" + +#: src/LYOptions.c:369 src/LYOptions.c:430 +msgid "Command: " +msgstr "Commande :" + +# msgid "Value accepted! -- WARNING: Lynx is configured for XWINDOWS!" +# msgstr "Valeur acceptée! NOTA : Lynx est configuré pour XWINDOWS." +# msgid "Value accepted! -- WARNING: Lynx is NOT configured for XWINDOWS!" +# msgstr "Valeur acceptée! NOTA : Lynx n'est pas configuré pour XWINDOWS." +#: src/LYOptions.c:386 src/LYOptions.c:447 +msgid "You are not allowed to change which editor to use!" +msgstr "Vous ne pouvez pas choisir un autre éditeur!" + +#: src/LYOptions.c:395 src/LYOptions.c:432 src/LYOptions.c:456 src/LYOptions.c:493 src/LYOptions.c:599 src/LYOptions.c:660 src/LYOptions.c:698 src/LYOptions.c:721 src/LYOptions.c:759 src/LYOptions.c:782 src/LYOptions.c:907 src/LYOptions.c:908 src/LYOptions.c:943 src/LYOptions.c:944 src/LYOptions.c:967 src/LYOptions.c:1003 src/LYOptions.c:1959 src/LYOptions.c:1960 src/LYOptions.c:2019 +msgid "Hit RETURN to accept entered data." +msgstr "Appuyer sur ENTR pour accepter les données entrées." + +#: src/LYOptions.c:492 src/LYOptions.c:553 +msgid "Value accepted! -- WARNING: Lynx is configured for XWINDOWS!" +msgstr "Valeur acceptée! NOTA : Lynx est configuré pour XWINDOWS!" + +#: src/LYOptions.c:495 src/LYOptions.c:556 +msgid "Value accepted! -- WARNING: Lynx is NOT configured for XWINDOWS!" +msgstr "Valeur acceptée! NOTA : Lynx n'est PAS configuré pour XWINDOWS!" + +#: src/LYOptions.c:501 src/LYOptions.c:562 +msgid "Failed to set DISPLAY variable!" +msgstr "Impossible de régler la variable AFFICHAGE." + +#: src/LYOptions.c:503 src/LYOptions.c:564 +msgid "Failed to clear DISPLAY variable!" +msgstr "Impossible d'effacer la variable AFFICHAGE." + +#: src/LYOptions.c:512 src/LYOptions.c:573 +msgid "Multiple bookmark support is not available." +msgstr "Le soutien des fichiers multiples n'est pas disponible." + +#: src/LYOptions.c:616 src/LYOptions.c:677 src/LYOptions.c:2017 src/LYOptions.c:2018 src/LYOptions.c:2077 +msgid "Use a filepath off your login directory in SHELL syntax!" +msgstr "Utilisez un chemin de fichier à partir de votre répertoire de connexion" + +#: src/LYOptions.c:618 src/LYOptions.c:679 src/LYOptions.c:2019 src/LYOptions.c:2020 src/LYOptions.c:2079 +msgid "Use a filepath off your home directory!" +msgstr "Utilisez un chemin de fichier à partir de votre répertoire personnel" + +#: src/LYOptions.c:636 src/LYOptions.c:697 +msgid "You are not allowed to change the bookmark file!" +msgstr "Changement du fichier de signets non autorisé!" + +#: src/LYOptions.c:818 src/LYOptions.c:878 +msgid "That key requires Advanced User mode." +msgstr "Cette touche n'est active qu'en mode utilisateur avancé." + +#: src/LYOptions.c:1019 src/LYOptions.c:1020 src/LYOptions.c:1079 +msgid "Access to dot files is disabled!" +msgstr "L'accès aux fichiers cachés est désactivé!" + +#: src/LYOptions.c:1066 src/LYOptions.c:1067 src/LYOptions.c:1126 src/LYOptions.c:1127 src/LYOptions.c:1128 src/LYOptions.c:1187 +msgid "Your '%s' terminal does not support color." +msgstr "Votre terminal '%s' ne permet pas l'affichage couleur." + +#: src/LYOptions.c:1069 src/LYOptions.c:1070 src/LYOptions.c:1129 src/LYOptions.c:1130 src/LYOptions.c:1131 src/LYOptions.c:1190 +msgid "Terminal does not support color" +msgstr "Le terminal ne permet pas l'affichage couleur" + +#: src/LYOptions.c:1430 src/LYOptions.c:1431 src/LYOptions.c:1490 +msgid "Hit RETURN to accept entered data. Delete data to invoke the default." +msgstr "ENTR pour accepter les données; SUPPR pour récupérer les valeurs implicites" + +#: src/LYOptions.c:1457 src/LYOptions.c:1458 src/LYOptions.c:1462 src/LYOptions.c:1463 src/LYOptions.c:1517 src/LYOptions.c:1522 src/LYOptions.c:3685 +msgid "WARNING: Misrepresentation of the User-Agent may be a copyright violation!" +msgstr "Substituer l'agent-utilisateur peut être une violation du droit d'auteur!" + +#: src/LYOptions.c:1471 src/LYOptions.c:1472 src/LYOptions.c:1531 +msgid "You are not allowed to change this setting." +msgstr "Vous n'êtes pas autorisé à changer ce paramètre." + +#: src/LYOptions.c:1555 src/LYOptions.c:1556 src/LYOptions.c:1615 src/LYOptions.c:1896 src/LYOptions.c:1897 src/LYOptions.c:1956 src/LYOptions.c:3658 src/LYOptions.c:3660 src/LYOptions.c:3728 +msgid "Saving Options..." +msgstr "Enregistrement des options..." + +#: src/LYOptions.c:1558 src/LYOptions.c:1559 src/LYOptions.c:1618 src/LYOptions.c:1898 src/LYOptions.c:1899 src/LYOptions.c:1958 src/LYOptions.c:3660 src/LYOptions.c:3662 src/LYOptions.c:3730 +msgid "Options saved!" +msgstr "Options enregistrées" + +#: src/LYOptions.c:1560 src/LYOptions.c:1561 src/LYOptions.c:1620 src/LYOptions.c:1900 src/LYOptions.c:1901 src/LYOptions.c:1960 src/LYOptions.c:3662 src/LYOptions.c:3664 src/LYOptions.c:3732 +msgid "Unable to save Options!" +msgstr "Impossible d'enregistrer les options!" + +#: src/LYOptions.c:1563 src/LYOptions.c:1564 src/LYOptions.c:1580 src/LYOptions.c:1581 src/LYOptions.c:1623 src/LYOptions.c:1640 src/LYOptions.c:1902 src/LYOptions.c:1903 src/LYOptions.c:1962 +msgid " 'r' to return to Lynx " +msgstr " Entrez « r » pour retourner à Lynx. " + +#: src/LYOptions.c:1578 src/LYOptions.c:1579 src/LYOptions.c:1638 +msgid " '>' to save, or 'r' to return to Lynx " +msgstr " Entrez « > » pour enregistrer; « r » pour retourner à Lynx." + +#: src/LYOptions.c:1620 src/LYOptions.c:1621 src/LYOptions.c:1680 +msgid "Hit any key to change value; RETURN to accept." +msgstr "N'importe quelle touche pour changer la valeur; ENTR pour accepter" + +#: src/LYOptions.c:1797 src/LYOptions.c:1798 src/LYOptions.c:1857 +msgid "Editing Bookmark DESCRIPTION and FILEPATH (%d of 2)" +msgstr "Édition de la description et du chemin de fichier (%d de 2)" + +# UNSURE +#: src/LYOptions.c:1800 src/LYOptions.c:1801 src/LYOptions.c:1860 +msgid " Editing Bookmark DESCRIPTION and FILEPATH" +msgstr " Édition de la description et du chemin de fichier" + +# UNSURE +#: src/LYOptions.c:1876 src/LYOptions.c:1877 src/LYOptions.c:1936 +msgid "Letter: " +msgstr "Lettre : " + +#: src/LYOptions.c:2064 src/LYOptions.c:2065 src/LYOptions.c:2124 +msgid "Option choice (or page) number: " +msgstr "Numéro d'option (ou de page) : " + +#: src/LYOptions.c:2445 src/LYOptions.c:2449 src/LYOptions.c:2505 +msgid "You are already at the beginning of this choice list." +msgstr "Vous êtes déjà au début de cette liste de choix." + +#: src/LYOptions.c:2456 src/LYOptions.c:2460 src/LYOptions.c:2516 +msgid "UNMODIFIABLE choice list. " +msgstr "" + +#: src/LYOptions.c:2459 src/LYOptions.c:2463 src/LYOptions.c:2476 src/LYOptions.c:2480 src/LYOptions.c:2490 src/LYOptions.c:2494 src/LYOptions.c:2506 src/LYOptions.c:2510 src/LYOptions.c:2516 src/LYOptions.c:2519 src/LYOptions.c:2520 src/LYOptions.c:2536 src/LYOptions.c:2550 src/LYOptions.c:2566 src/LYOptions.c:2576 src/LYOptions.c:2603 src/LYOptions.c:2607 src/LYOptions.c:2663 +msgid "(Choice list) Hit return an" +msgstr "" + +#: src/LYOptions.c:2471 src/LYOptions.c:2475 src/LYOptions.c:2531 +msgid "You are already at the end of this choice list." +msgstr "Vous êtes déjà à la fin de cette liste de choix." + +#: src/LYOptions.c:2473 src/LYOptions.c:2477 src/LYOptions.c:2533 +msgid "UNMODIFIABLE choice list." +msgstr "" + +#: src/LYOptions.c:2500 src/LYOptions.c:2504 src/LYOptions.c:2560 +msgid "You are already at page %d of this choice list." +msgstr "Vous êtes déjà à la page %d de cette liste de choix." + +#: src/LYOptions.c:2503 src/LYOptions.c:2507 src/LYOptions.c:2563 +msgid "UNMODIFIABLE choice list. Use " +msgstr "" + +#: src/LYOptions.c:2513 src/LYOptions.c:2517 src/LYOptions.c:2573 +msgid "UNMODIFIABLE choice list. Use" +msgstr "" + +#: src/LYOptions.c:2554 src/LYOptions.c:2558 src/LYOptions.c:2614 +msgid "Choice number %d already is current." +msgstr "Le choix %d est déjà le choix en cours." + +#: src/LYOptions.c:2593 src/LYOptions.c:2597 src/LYOptions.c:2653 +msgid "You have entered an invalid choice number." +msgstr "Vous avez entré un numéro de choix non valide." + +#: src/LYOptions.c:3698 src/LYOptions.c:3710 src/LYOptions.c:3779 src/LYPrint.c:600 src/LYPrint.c:606 src/LYPrint.c:618 src/LYPrint.c:624 +msgid "Unable to open tempfile" +msgstr "Impossible d'ouvrir le fichier temporaire." + +#: src/LYOptions.c:3729 src/LYOptions.c:3739 src/LYOptions.c:3807 +msgid " - \n" +msgstr "" + +#: src/LYOptions.c:3730 src/LYOptions.c:3740 src/LYOptions.c:3808 src/LYOptions.c:4037 src/LYOptions.c:4047 src/LYOptions.c:4119 +msgid "\n" +msgstr "" + +#: src/LYOptions.c:3731 src/LYOptions.c:3741 src/LYOptions.c:3809 src/LYOptions.c:4038 src/LYOptions.c:4048 src/LYOptions.c:4120 +msgid "Left Arrow cancels changes\n" +msgstr "" + +#: src/LYOptions.c:3732 src/LYOptions.c:3742 src/LYOptions.c:3810 +msgid "HELP!\n" +msgstr "" + +#: src/LYOptions.c:3737 src/LYOptions.c:3747 src/LYOptions.c:3815 +msgid "

                              Save options to disk: " +msgstr "" + +#: src/LYOptions.c:3746 src/LYOptions.c:3756 +msgid "" +"\n" +"Personal Preferences\n" +msgstr "" + +#: src/LYOptions.c:3749 src/LYOptions.c:3759 src/LYOptions.c:3827 +msgid "Cookies" +msgstr "" + +#: src/LYOptions.c:3763 +msgid "Display" +msgstr "" + +#: src/LYOptions.c:3767 src/LYOptions.c:3773 src/LYOptions.c:3841 +msgid "Editor" +msgstr "" + +#: src/LYOptions.c:3772 src/LYOptions.c:3778 src/LYOptions.c:3846 +msgid "Emacs keys" +msgstr "" + +#: src/LYOptions.c:3779 src/LYOptions.c:3785 src/LYOptions.c:3853 +msgid "Execution links" +msgstr "" + +#: src/LYOptions.c:3798 src/LYOptions.c:3804 src/LYOptions.c:3872 +msgid "Keypad mode" +msgstr "" + +#: src/LYOptions.c:3804 src/LYOptions.c:3810 src/LYOptions.c:3878 +msgid "Personal mail address" +msgstr "" + +#: src/LYOptions.c:3809 src/LYOptions.c:3815 src/LYOptions.c:3883 +msgid "Popups for select fields" +msgstr "" + +#: src/LYOptions.c:3815 src/LYOptions.c:3821 src/LYOptions.c:3889 +msgid "Searching type" +msgstr "" + +#: src/LYOptions.c:3824 +msgid "" +"\n" +" Personal Preferences\n" +msgstr "" + +#: src/LYOptions.c:3826 src/LYOptions.c:3832 src/LYOptions.c:3900 +msgid "Show color" +msgstr "" + +#: src/LYOptions.c:3892 src/LYOptions.c:3902 +msgid "" +"\n" +"Bookmark Options\n" +msgstr "" + +#: src/LYOptions.c:3913 src/LYOptions.c:3923 src/LYOptions.c:3991 +msgid "Review/edit Bookmarks files" +msgstr "" + +#: src/LYOptions.c:3915 src/LYOptions.c:3925 src/LYOptions.c:3993 +msgid "Goto multi-bookmark menu\n" +msgstr "" + +#: src/LYOptions.c:3918 src/LYOptions.c:3928 src/LYOptions.c:3996 +msgid "Bookmarks file" +msgstr "" + +#: src/LYOptions.c:3926 src/LYOptions.c:3936 +msgid "" +"\n" +"Character Set Options\n" +msgstr "" + +#: src/LYOptions.c:3945 src/LYOptions.c:3955 src/LYOptions.c:4021 +msgid "Assumed document character set" +msgstr "" + +#: src/LYOptions.c:3956 src/LYOptions.c:3966 src/LYOptions.c:4032 +msgid "Display character set" +msgstr "" + +#: src/LYOptions.c:3970 +msgid "" +"\n" +" Bookmark Options\n" +msgstr "" + +#: src/LYOptions.c:3975 src/LYOptions.c:3985 src/LYOptions.c:4051 +msgid "CJK mode" +msgstr "" + +#: src/LYOptions.c:3977 src/LYOptions.c:3987 src/LYOptions.c:4053 +msgid "Raw 8-bit" +msgstr "" + +#: src/LYOptions.c:3986 src/LYOptions.c:3996 +msgid "" +"\n" +"File Management Options\n" +msgstr "" + +#: src/LYOptions.c:3989 src/LYOptions.c:3999 src/LYOptions.c:4065 +msgid "FTP sort criteria" +msgstr "" + +#: src/LYOptions.c:3996 src/LYOptions.c:4006 src/LYOptions.c:4072 +msgid "Local directory sort criteria" +msgstr "" + +#: src/LYOptions.c:4004 +msgid "" +"\n" +" Character Set Options\n" +msgstr "" + +#: src/LYOptions.c:4004 src/LYOptions.c:4014 src/LYOptions.c:4080 +msgid "Show dot files" +msgstr "" + +#: src/LYOptions.c:4013 src/LYOptions.c:4023 +msgid "" +"\n" +"Headers transferred to remote server\n" +msgstr "" + +#: src/LYOptions.c:4016 src/LYOptions.c:4026 src/LYOptions.c:4092 +msgid "Preferred document character set" +msgstr "" + +#: src/LYOptions.c:4021 src/LYOptions.c:4031 src/LYOptions.c:4097 +msgid "Preferred document language" +msgstr "" + +#: src/LYOptions.c:4027 src/LYOptions.c:4037 src/LYOptions.c:4103 +msgid "User-Agent header" +msgstr "" + +#: src/LYOptions.c:4036 src/LYOptions.c:4046 src/LYOptions.c:4118 +msgid "" +"\n" +" - " +msgstr "" + +#: src/LYOptions.c:4062 +msgid "" +"\n" +" File Management Options\n" +msgstr "" + +#: src/LYOptions.c:4089 +msgid "" +"\n" +" Headers transferred to remote server\n" +msgstr "" + +#: src/LYPrint.c:340 src/LYPrint.c:345 src/LYPrint.c:364 src/LYPrint.c:369 src/LYPrint.c:427 src/LYPrint.c:432 src/LYPrint.c:448 src/LYPrint.c:453 +msgid "Save request cancelled!!!" +msgstr "Demande d'enregistrement annulée!" + +# msgid "File exists. Create higher version? (y/n)" +# msgstr "Ce fichier existe déjà. Créer une nouvelle version? (o/n)" +# msgid "File exists. Overwrite? (y/n)" +# msgstr "Ce fichier existe déjà. Superposer? (o/n)" +#: src/LYPrint.c:444 src/LYPrint.c:465 +msgid "Cannot write to file." +msgstr "Écriture non autorisée." + +#: src/LYPrint.c:525 src/LYPrint.c:549 +msgid "Viewing preparsed source. Are you sure you want to mail it? [y]" +msgstr "Lecture de la source pré-analysée. Veuillez confirmer l'envoi? [o]" + +#: src/LYPrint.c:533 src/LYPrint.c:542 src/LYPrint.c:553 src/LYPrint.c:557 src/LYPrint.c:566 src/LYPrint.c:577 +msgid "Mail request cancelled!!!" +msgstr "Demande de courrier annulée!" + +#: src/LYPrint.c:547 src/LYPrint.c:571 +msgid "Please enter a valid Internet mail address: " +msgstr "Veuillez entrer une adresse de courrier Internet valide : " + +#: src/LYPrint.c:724 src/LYPrint.c:742 +msgid "ERROR - Unable to mail file" +msgstr "ERREUR - impossible d'envoyer le fichier." + +#: src/LYPrint.c:834 src/LYPrint.c:854 +msgid "" +"Sending \n" +"\n" +"$ %s\n" +"\n" +"Please wait..." +msgstr "" + +#: src/LYPrint.c:851 src/LYPrint.c:871 src/LYPrint.c:936 src/LYPrint.c:956 +msgid "File is %d screens long. Are you sure you want to print? [y]" +msgstr "Le fichier représente %d écrans. Vous voulez l'imprimer? [o]" + +#: src/LYPrint.c:857 src/LYPrint.c:865 src/LYPrint.c:877 src/LYPrint.c:878 src/LYPrint.c:885 src/LYPrint.c:898 src/LYPrint.c:942 src/LYPrint.c:950 src/LYPrint.c:962 src/LYPrint.c:970 src/LYPrint.c:1096 src/LYPrint.c:1116 src/LYPrint.c:1120 src/LYPrint.c:1140 +msgid "Print request cancelled!!!" +msgstr "Demande d'impression annulée!" + +#: src/LYPrint.c:871 src/LYPrint.c:891 +msgid "Be sure your printer is on-line. Press to start printing:" +msgstr "" + +#: src/LYPrint.c:873 src/LYPrint.c:893 +msgid "Press to begin: " +msgstr "Appuyez sur pour commencer : " + +#: src/LYPrint.c:920 src/LYPrint.c:940 +msgid "Press to finish: " +msgstr "Appuyez sur pour terminer : " + +#: src/LYPrint.c:962 src/LYPrint.c:982 +msgid "ERROR - Unable to allocate file space!!!" +msgstr "ERREUR - impossible d'allouer de l'espace pour le fichier!" + +#: src/LYPrint.c:1140 src/LYPrint.c:1160 +msgid "ERROR! - printer is misconfigured!" +msgstr "ERREUR - l'imprimante est mal configurée." + +#: src/LYPrint.c:1153 src/LYPrint.c:1173 +msgid "Printing file. Please wait..." +msgstr "Impression du fichier. Veuillez attendre." + +#: src/LYPrint.c:1264 src/LYPrint.c:1293 +msgid "Unable to open print options file" +msgstr "Impossible d'ouvrir le fichier d'options d'impression." + +#: src/LYPrint.c:1276 +msgid "" +" You print the document: %s\n" +" Number of lines: %d\n" +" Number of pages: %d page%s (approximately)\n" +msgstr "" + +#: src/LYPrint.c:1278 src/LYPrint.c:1305 +msgid "" +" Document: %s\n" +" Number of lines: %d\n" +" Number of pages: %d page%s (approximately)\n" +msgstr "" + +#: src/LYPrint.c:1284 src/LYPrint.c:1288 src/LYPrint.c:1315 +msgid " Some print functions have been disabled!\n" +msgstr " Certaines fonctions d'impression ont t dsactives.\n" + +#: src/LYPrint.c:1286 src/LYPrint.c:1290 +msgid "" +"\n" +"Standard print options:\n" +msgstr "" + +#: src/LYPrint.c:1304 src/LYPrint.c:1308 src/LYPrint.c:1336 +msgid " Print out on a printer attached to your vt100 terminal\n" +msgstr "" + +#: src/LYPrint.c:1318 +msgid "Print" +msgstr "" + +#: src/LYPrint.c:1318 +msgid "Standard print" +msgstr "" + +#: src/LYReadCFG.c:361 src/LYReadCFG.c:369 +msgid "" +"Syntax Error parsing COLOR in configuration file:\n" +"The line must be of the form:\n" +"COLOR:INTEGER:FOREGROUND:BACKGROUND\n" +"\n" +"Here FOREGROUND and BACKGROUND must be one of:\n" +"The special strings 'nocolor' or 'default', or\n" +msgstr "" + +# src/LYReadCFG.c +# NdT= I have translated by "faulty line". I am not sure what they mean by "offending". +#: src/LYReadCFG.c:374 src/LYReadCFG.c:382 +msgid "" +"Offending line:\n" +"%s\n" +msgstr "" +"Ligne fautive :\n" +"%s\n" + +#: src/LYReadCFG.c:624 src/LYReadCFG.c:638 +msgid "key remapping of %s to %s failed\n" +msgstr "" + +#: src/LYReadCFG.c:994 src/LYReadCFG.c:1020 +msgid "More than %d nested lynx.cfg includes -- perhaps there is a loop?!?\n" +msgstr "" + +#: src/LYReadCFG.c:996 src/LYReadCFG.c:1022 +msgid "Last attempted include was '%s',\n" +msgstr "" + +#: src/LYReadCFG.c:997 src/LYReadCFG.c:1023 +msgid "included from '%s'.\n" +msgstr "" + +#: src/LYReadCFG.c:1256 +msgid "Lynx.cfg Information" +msgstr "" + +#: src/LYReadCFG.c:1260 +msgid "This is read from your lynx.cfg file,\n" +msgstr "" + +#: src/LYReadCFG.c:1267 +msgid "please \"read\" distribution's lynx.cfg" +msgstr "" + +#: src/LYReadCFG.c:1269 +msgid "" +" for more comments.\n" +"\n" +msgstr "" + +#: src/LYReadCFG.c:1271 +msgid " #Your primary configuration %s\n" +msgstr "" + +#: src/LYReadCFG.c:1274 +msgid "" +"This is read from your lynx.cfg file:\n" +"\n" +msgstr "" + +#: src/LYShowInfo.c:49 +msgid "Configuration Definitions" +msgstr "" + +#: src/LYShowInfo.c:52 +msgid "" +"See also your lynx.cfg for run-time options\n" +"\n" +msgstr "" + +#: src/LYShowInfo.c:55 +msgid "" +"The following data were derived during the automatic configuration/build\n" +"process of this copy of Lynx. When reporting a bug, please include a copy\n" +"of this page." +msgstr "" + +#: src/LYShowInfo.c:63 +msgid "" +"The following data were used as automatically-configured compile-time\n" +"definitions when this copy of Lynx was built." +msgstr "" + +#: src/LYShowInfo.c:134 src/LYShowInfo.c:157 +msgid "" +"\n" +"Directory that you are currently viewing\n" +"\n" +msgstr "" + +#: src/LYShowInfo.c:139 +msgid "development version" +msgstr "" + +#: src/LYShowInfo.c:139 +msgid "latest release" +msgstr "" + +#: src/LYShowInfo.c:142 +msgid " - compile time settings\n" +msgstr "" + +msgid "Name:" +msgstr "Nom :" + +msgid "URL:" +msgstr "URL :" + +#: src/LYShowInfo.c:144 src/LYShowInfo.c:163 +msgid " Name: %s\n" +msgstr " Nom : %s\n" + +#: src/LYShowInfo.c:145 src/LYShowInfo.c:164 +msgid " URL: %s\n" +msgstr " URL : %s\n" + +#: src/LYShowInfo.c:145 +msgid " - your lynx.cfg\n" +msgstr "" + +#: src/LYShowInfo.c:155 src/LYShowInfo.c:172 +msgid "Failed to obtain status of current link!" +msgstr "Impossible d'obtenir l'état du lien actif!" + +#: src/LYShowInfo.c:173 src/LYShowInfo.c:190 +msgid " Full name: %s\n" +msgstr "" + +#: src/LYShowInfo.c:210 src/LYShowInfo.c:227 +msgid " Access Permissions\n" +msgstr "" + +#: src/LYShowInfo.c:279 src/LYShowInfo.c:296 +msgid "

                              Linkname: %s%s\n" +msgstr "
                              Nom du lien : %s%s\n" + +#: src/LYShowInfo.c:288 src/LYShowInfo.c:305 +msgid "
                               Charset: %s\n" +msgstr "" + +# LYShowInfo.c +#: src/LYShowInfo.c:299 src/LYShowInfo.c:316 +msgid "
                               Charset: %s (assumed)\n" +msgstr "
                               Jeu de caractères : %s (présumé)\n" + +#: src/LYShowInfo.c:305 src/LYShowInfo.c:322 +msgid "
                                Server: %s\n" +msgstr "
                                Serveur : %s\n" + +#: src/LYShowInfo.c:308 src/LYShowInfo.c:325 +msgid "
                                  Date: %s\n" +msgstr "
                                  Date : %s\n" + +# Following are from the INFO page +#: src/LYShowInfo.c:326 src/LYShowInfo.c:343 +msgid "
                              Owner(s): %s\n" +msgstr "
                              Propriétaire(s) : %s\n" + +#: src/LYShowInfo.c:329 src/LYShowInfo.c:346 +msgid "
                                  size: %d lines\n" +msgstr "
                                Taille : %d lignes\n" + +#: src/LYShowInfo.c:331 src/LYShowInfo.c:348 +msgid "
                                  mode: %s%s%s\n" +msgstr "" + +#: src/LYShowInfo.c:352 src/LYShowInfo.c:369 +msgid "
                                Method: %s\n" +msgstr "
                                Méthode : %s\n" + +# msgid "
                                  mode: %s\n" +# msgstr "
                                  Mode : %s\n" +#: src/LYShowInfo.c:356 src/LYShowInfo.c:373 +msgid "
                               Enctype: %s\n" +msgstr "
                               Encodage : %s\n" + +#: src/LYShowInfo.c:368 src/LYShowInfo.c:385 +msgid "
                               (Form field)\n" +msgstr "
                               (champ de formulaire)\n" + +#: src/LYStrings.c:392 +msgid "Keysym %s is unknown\n" +msgstr "" + +#: src/LYStrings.c:489 src/LYStrings.c:717 +msgid "Error processing line %d of %s\n" +msgstr "" + +#: src/LYStrings.c:1200 src/LYStrings.c:1447 +msgid "Maximum length reached! Delete text or move off field." +msgstr "Vous avez le maximum permis; supprimez du texte ou quittez le champ" + +# msgid "%s: Invalid Option: %s\n" +# msgstr "%s: Invalid Option: %s\n" +# msgid "USAGE: %s [options] [file]\n" +# msgstr "USAGE: %s [options] [file]\n" +#: src/LYStyle.c:123 +msgid "" +"Syntax Error parsing style in lss file:\n" +"[%s]\n" +"The line must be of the form:\n" +"OBJECT:MONO:COLOR (ie em:bold:brightblue:white)\n" +"where OBJECT is one of EM,STRONG,B,I,U,BLINK etc.\n" +"\n" +msgstr "" +"Syntax Error parsing style in lss file:\n" +"[%s]\n" +"The line must be of the form:\n" +"OBJECT:MONO:COLOR (ie em:bold:brightblue:white)\n" +"where OBJECT is one of EM,STRONG,B,I,U,BLINK etc.\n" +"\n" + +#: src/LYTraversal.c:20 +msgid "unable to open or create a traversal file" +msgstr "" + +#: src/LYTraversal.c:58 src/LYTraversal.c:113 +msgid "unable to open traversal file" +msgstr "" + +#: src/LYTraversal.c:133 +msgid "unable to open reject file" +msgstr "" + +#: src/LYUpload.c:106 src/LYUpload.c:107 +msgid "Illegal redirection \"../\" found! Request ignored." +msgstr "Réacheminement «../» non autorisé; demande non traitée" + +#: src/LYUpload.c:112 src/LYUpload.c:113 +msgid "Illegal redirection using \"~\" found! Request ignored." +msgstr "Réacheminement avec «~» non autorisé; demande non traitée" + +#: src/LYUpload.c:240 src/LYUpload.c:243 +msgid " Upload To: %s\n" +msgstr "" + +#: src/LYUpload.c:241 src/LYUpload.c:244 +msgid "" +"\n" +"Upload options:\n" +msgstr "" + +#: src/LYUpload.c:257 +msgid "" +" <NONE>\n" +"\n" +" You may define an unlimited number of upload methods.\n" +" Please refer to the lynx.cfg file, sections 'UPLOAD' and 'INCLUDE'.\n" +msgstr "" + +#: src/LYUtils.c:1966 src/LYUtils.c:1967 src/LYUtils.c:1968 +msgid " Arrow keys: Up and Down to move. Right to follow a link; Left to go back. \n" +msgstr "HAUT/BAS: se déplacer; DROITE: activer le lien; GAUCHE: document précédent\n" + +# Is the AIDE command correct? There is no online Help in Lynx. +#: src/LYUtils.c:1976 src/LYUtils.c:1977 src/LYUtils.c:1978 +msgid " H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list \n" +msgstr "H) Accueil S) Paramètres P) Imprimer G) Aller M) Départ Q)uitter /=chercher [Y]=Historique\n" + +#: src/LYUtils.c:3570 src/LYUtils.c:3571 src/LYUtils.c:3578 +msgid "*** You have unread mail. ***" +msgstr "*** Vous avez du courrier non ouvert. ***" + +#: src/LYUtils.c:3573 src/LYUtils.c:3574 src/LYUtils.c:3581 src/LYUtils.c:3614 src/LYUtils.c:3615 src/LYUtils.c:3622 +msgid "*** You have new mail. ***" +msgstr "*** Vous avez du nouveau courrier. ***" + +#: src/LYUtils.c:3616 src/LYUtils.c:3617 src/LYUtils.c:3624 +msgid "*** You have mail. ***" +msgstr "*** Vous avez du courrier. ***" + +#: src/LYUtils.c:4220 src/LYUtils.c:4221 src/LYUtils.c:4222 +msgid " first." +msgstr "" + +#: src/LYUtils.c:5862 src/LYUtils.c:5863 src/LYUtils.c:5896 src/LYUtils.c:5914 +msgid "

                              %s (%s Version %s)

                              \n" +msgstr "" + +#: src/LYUtils.c:5892 src/LYUtils.c:5910 +msgid "

                              %s (%s Version %s), help

                              \n" +msgstr "" + +#: src/LYexit.c:112 +msgid "" +"\n" +"Memory exhausted! Program aborted!\n" +"\n" +msgstr "" +"\n" +"Mémoire insuffisante. Abandon!\n" + +#: src/LYexit.c:176 +msgid "" +"\n" +"\n" +"\n" +"%s %s: out of memory. Aborting...\n" +msgstr "" + +# So, ya, then they replaced the previous string with the following +#: src/LYrcFile.c:573 src/LYrcFile.c:584 +msgid "" +"# Lynx User Defaults File\n" +"#\n" +"# This file contains options saved from the Lynx Options Screen (normally\n" +"# with the '>' key). There is normally no need to edit this file manually,\n" +"# since the defaults here can be controlled from the Options Screen, and the\n" +"# next time options are saved from the Options Screen this file will be\n" +"# completely rewritten. You have been warned...\n" +"# If you are looking for the general configuration file - it is normally\n" +"# called lynx.cfg, and it has different content and a different format.\n" +"# It is not this file.\n" +"\n" +msgstr "" +"# Valeurs implicites utilisateur - Lynx\n" +"#\n" +"# Ce fichier contient des options enregistrées à partir du menu Paramètres (normalement\n" +"# à l'aide de la touche '>'). Il n'est pas nécessaire d'éditer ce fichier manuellement\n" +"# puisque les valeurs implicites peuvent être modifiées à partir du menu Paramètres; la\n" +"# prochaine fois que vous enregistrez les nouvelles valeurs dans ce ce menu, le fichier\n" +"# est complètement renouvelé. Vous êtes prévenus...\n" +"# Si vous cherchez le fichier de configuration générale il s'appelle normalement\n" +"# lynx.cfg et il a un contenu et un format différents.\n" +"# Ce n'est pas ce fichier.\n" +"\n" + +#: src/LYrcFile.c:605 src/LYrcFile.c:616 +msgid "" +"# If sub_bookmarks is not turned \"off\", and multiple bookmarks have\n" +"# been defined (see below), then all bookmark operations will first\n" +"# prompt the user to select an active sub-bookmark file. If the default\n" +"# Lynx bookmark_file is defined (see above), it will be used as the\n" +"# default selection. When this option is set to \"advanced\", and the\n" +"# user mode is advanced, the 'v'iew bookmark command will invoke a\n" +"# statusline prompt instead of the menu seen in novice and intermediate\n" +"# user modes. When this option is set to \"standard\", the menu will be\n" +"# presented regardless of user mode.\n" +msgstr "" + +#: src/LYrcFile.c:660 src/LYrcFile.c:671 +msgid "" +"# personal_mail_address specifies your personal mail address. The\n" +"# address will be sent during HTTP file transfers for authorization and\n" +"# logging purposes, and for mailed comments.\n" +"# If you do not want this information given out, set the NO_FROM_HEADER\n" +"# to TRUE in lynx.cfg, or use the -nofrom command line switch. You also\n" +"# could leave this field blank, but then you won't have it included in\n" +"# your mailed comments.\n" +msgstr "" + +# Let's Talk about Colours! +#: src/LYrcFile.c:685 src/LYrcFile.c:729 src/LYrcFile.c:740 +msgid "" +"# show_color specifies how to set the color mode at startup. A value of\n" +"# \"never\" will force color mode off (treat the terminal as monochrome)\n" +"# at startup even if the terminal appears to be color capable. A value of\n" +"# \"always\" will force color mode on even if the terminal appears to be\n" +"# monochrome, if this is supported by the library used to build lynx.\n" +"# A value of \"default\" will yield the behavior of assuming\n" +"# a monochrome terminal unless color capability is inferred at startup\n" +"# based on the terminal type, or the -color command line switch is used, or\n" +"# the COLORTERM environment variable is set. The default behavior always is\n" +"# used in anonymous accounts or if the \"option_save\" restriction is set.\n" +"# The effect of the saved value can be overridden via\n" +"# the -color and -nocolor command line switches.\n" +"# The mode set at startup can be changed via the \"show color\" option in\n" +"# the 'o'ptions menu. If the option settings are saved, the \"on\" and\n" +"# \"off\" \"show color\" settings will be treated as \"default\".\n" +msgstr "" +"# show_color permet de paramétrer le mode couleur à l'initialisation. La valeur\n" +"# «jamais» désactive le mode couleur (ce qui équivaut à un terminal monochrome)\n" +"# même si le terminal est capable d'afficher les couleurs. La valeur «toujours»\n" +"# active le mode couleur même si le terminal est monochrome, en autant que cette valeur\n" +"# soit incluse dans la librairie utilisée pour créer Lynx. La valeur «implicite» suppose\n" +"# par défaut un terminal monochrome à moins que la capacité d'afficher les couleurs soit\n" +"# déterminée à l'initialisation en fonction du type de terminal, ou que l'option\n" +"# -color soit entrée à la ligne de commande, ou que la variable d'environnement\n" +"# soit réglée à COLORTERM. La valeur implicite est toujours utilisée dans le cas des\n" +"# connexions anonymes ou si la restriction «option_save» est activée. L'effet de la\n" +"# valeur enregistrée peut être annulé en permutant les options -color et -nocolor sur\n" +"# la ligne de commande. Le mode attribué à l'initialisation peut être modifié au\n" +"# moyen de l'option «afficher les couleurs» dans le menu Paramètres. Si les paramètres\n" +"# sont enregistrés, les attributs «oui» et «non» de l'option «afficher les couleurs»\n" +"# sont interprétés comme étant la valeur «implicite».\n" + +#: src/LYrcFile.c:698 src/LYrcFile.c:709 +msgid "" +"# preferred_language specifies the language in MIME notation (e.g., en,\n" +"# fr, may be a comma-separated list in decreasing preference)\n" +"# which Lynx will indicate you prefer in requests to http servers.\n" +"# If a file in that language is available, the server will send it.\n" +"# Otherwise, the server will send the file in it's default language.\n" +msgstr "" + +#: src/LYrcFile.c:709 src/LYrcFile.c:720 +msgid "" +"# preferred_charset specifies the character set in MIME notation (e.g.,\n" +"# ISO-8859-2, ISO-8859-5) which Lynx will indicate you prefer in requests\n" +"# to http servers using an Accept-Charset header. The value should NOT\n" +"# include ISO-8859-1 or US-ASCII, since those values are always assumed\n" +"# by default. May be a comma-separated list.\n" +"# If a file in that character set is available, the server will send it.\n" +"# If no Accept-Charset header is present, the default is that any\n" +"# character set is acceptable. If an Accept-Charset header is present,\n" +"# and if the server cannot send a response which is acceptable\n" +"# according to the Accept-Charset header, then the server SHOULD send\n" +"# an error response, though the sending of an unacceptable response\n" +"# is also allowed.\n" +msgstr "" + +# And what about showing cursors? +#: src/LYrcFile.c:757 src/LYrcFile.c:800 +msgid "" +"# show_cursor specifies whether to 'hide' the cursor to the right (and\n" +"# bottom, if possible) of the screen, or to place it to the left of the\n" +"# current link in documents, or current option in select popup windows.\n" +"# Positioning the cursor to the left of the current link or option is\n" +"# helpful for speech or braille interfaces, and when the terminal is\n" +"# one which does not distingish the current link based on highlighting\n" +"# or color. A value of \"on\" will set positioning to the left as the\n" +"# default while a value of \"off\" will set 'hiding' of the cursor.\n" +"# The default can be overridden via the -show_cursor command line toggle.\n" +msgstr "" +"# show_cursor permet d'indiquer si le curseur doit être 'caché' à la droite\n" +"# (et au bas, si possible) de l'écran, ou s'il doit être placé à la gauche du\n" +"# lien actif dans les documents, ou de l'option active dans les fenêtres flash.\n" +"# Le placement du curseur à la gauche de l'option ou du lien actif est utile dans\n" +"# le cas des interfaces de reconnaissance de la parole ou de braille, et quand le\n" +"# terminal est incapable de distinguer le lien actif au moyen de la surbrillance\n" +"# ou de la couleur. La valeur «oui» règle le placement du curseur à la gauche par\n" +"# défaut, tandis que la valeur «non» équivaut à 'cacher' le curseur de l'écran.\n" +"# La valeur implicite peut être annulée à la ligne de commande au moyen de l'option\n" +"# -show_cursor.\n" + +#: src/LYrcFile.c:787 src/LYrcFile.c:798 +msgid "" +"# select_popups specifies whether the OPTIONs in a SELECT block which\n" +"# lacks a MULTIPLE attribute are presented as a vertical list of radio\n" +"# buttons or via a popup menu. Note that if the MULTIPLE attribute is\n" +"# present in the SELECT start tag, Lynx always will create a vertical list\n" +"# of checkboxes for the OPTIONs. A value of \"on\" will set popup menus\n" +"# as the default while a value of \"off\" will set use of radio boxes.\n" +"# The default can be overridden via the -popup command line toggle.\n" +msgstr "" + +#: src/LYrcFile.c:811 +msgid "" +"# show_cursor specifies whether to 'hide' the cursor to the right (and\n" +"# bottom, if possible) of the screen, or to place it to the left of the\n" +"# current link in documents, or current option in select popup windows.\n" +"# Positioning the cursor to the left of the current link or option is\n" +"# helpful for speech or braille interfaces, and when the terminal is\n" +"# one which does not distinguish the current link based on highlighting\n" +"# or color. A value of \"on\" will set positioning to the left as the\n" +"# default while a value of \"off\" will set 'hiding' of the cursor.\n" +"# The default can be overridden via the -show_cursor command line toggle.\n" +msgstr "" + +#: src/LYrcFile.c:815 src/LYrcFile.c:826 +msgid "" +"# If keypad_mode is set to \"NUMBERS_AS_ARROWS\", then the numbers on\n" +"# your keypad when the numlock is on will act as arrow keys:\n" +"# 8 = Up Arrow\n" +"# 4 = Left Arrow 6 = Right Arrow\n" +"# 2 = Down Arrow\n" +"# and the corresponding keyboard numbers will act as arrow keys,\n" +"# regardless of whether numlock is on.\n" +msgstr "" + +#: src/LYrcFile.c:826 src/LYrcFile.c:837 +msgid "" +"# If keypad_mode is set to \"LINKS_AND_FORM_FIELDS_ARE_NUMBERED\", then\n" +"# numbers will appear next to each link and visible form input field.\n" +"# Numbers are used to select links, or to move the \"current link\" to a\n" +"# form input field or button. In addition, options in popup menus are\n" +"# indexed so that the user may type an option number to select an option in\n" +"# a popup menu, even if the option isn't visible on the screen. Reference\n" +"# lists and output from the list command also enumerate form inputs.\n" +msgstr "" + +#: src/LYrcFile.c:834 src/LYrcFile.c:845 +msgid "" +"# NOTE: Some fixed format documents may look disfigured when\n" +"# \"LINKS_ARE_NUMBERED\" or \"LINKS_AND_FORM_FIELDS_ARE_NUMBERED\" are\n" +"# enabled.\n" +msgstr "" + +#: src/LYrcFile.c:846 src/LYrcFile.c:870 +msgid "" +"# lineedit_mode specifies the key binding used for inputting strings in\n" +"# prompts and forms. If lineedit_mode is set to \"Default Binding\" then\n" +"# the following control characters are used for moving and deleting:\n" +"#\n" +"# Prev Next Enter = Accept input\n" +"# Move char: <- -> ^G = Cancel input\n" +"# Move word: ^P ^N ^U = Erase line\n" +"# Delete char: ^H ^R ^A = Beginning of line\n" +"# Delete word: ^B ^F ^E = End of line\n" +"#\n" +"# Current lineedit modes are:\n" +msgstr "" + +#: src/LYrcFile.c:901 src/LYrcFile.c:925 +msgid "" +"# accept_all_cookies allows the user to tell Lynx to automatically\n" +"# accept all cookies if desired. The default is \"FALSE\" which will\n" +"# prompt for each cookie. Set accept_all_cookies to \"TRUE\" to accept\n" +"# all cookies.\n" +msgstr "" + +#: src/LYrcFile.c:909 src/LYrcFile.c:933 +msgid "" +"# cookie_accept_domains and cookie_reject_domains are comma-delimited\n" +"# lists of domains (with a leading '.') to automatically accept or\n" +"# reject all cookies from. The accept_all_cookies parameter will\n" +"# override any settings made here. If a single domain is specified in\n" +"# both cookie_accept_domains and in cookie_reject_domains, the rejection\n" +"# will take precedence.\n" +msgstr "" + +#: src/LYrcFile.c:929 src/LYrcFile.c:953 +msgid "" +"# cookie_file specifies the file in which to store persistent cookies.\n" +"# The default is ~/.lynx_cookies.\n" +msgstr "" + +#: src/LYrcFile.c:964 +msgid "" +"# If run_all_execution_links is set \"on\" then all local execution links\n" +"# will be executed when they are selected.\n" +"#\n" +"# WARNING - This is potentially VERY dangerous. Since you may view\n" +"# information that is written by unknown and untrusted sources\n" +"# there exists the possibility that Trojan horse links could be\n" +"# written. Trojan horse links could be written to erase files\n" +"# or compromise security. This should only be set to \"on\" if\n" +"# you are viewing trusted source information.\n" +msgstr "" + +#: src/LYrcFile.c:973 src/LYrcFile.c:997 +msgid "" +"# If verbose_images is \"on\", lynx will print the name of the image\n" +"# source file in place of [INLINE], [LINK] or [IMAGE]\n" +"# See also VERBOSE_IMAGES in lynx.cfg\n" +msgstr "" diff --git a/gnu/usr.bin/lynx/po/it.po b/gnu/usr.bin/lynx/po/it.po new file mode 100644 index 00000000000..180e0f8ee94 --- /dev/null +++ b/gnu/usr.bin/lynx/po/it.po @@ -0,0 +1,247 @@ +# Lynx Italian message catalog +# created: Sat Aug 22 18:47:32 EDT 1998 +# updated: Sep 7 +# +msgid "" +msgstr "" +"Date: 1998-08-22 16:12:20-0400\n" +"From: Webmaster Jim \n" +"Content-Type: text/plain; charset=\n" +"Files: src/LYMain.c src/LYMainLoop.c src/LYNews.c WWW/Library/Implementation/HTNews.c\n" + +# Lynx message catalog +# Copyright (C) 1998 Free Software Foundation, Inc. +# Webmaster Jim , 1998. +# Lynx development group , 1998. +# http://lynx.browser.org/ +# +# , fuzzy +#: WWW/Library/Implementation/HTNews.c:350 +msgid "Username for news host '%s':" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:361 WWW/Library/Implementation/HTNews.c:445 WWW/Library/Implementation/HTNews.c:2344 WWW/Library/Implementation/HTNews.c:2402 WWW/Library/Implementation/HTNews.c:2507 WWW/Library/Implementation/HTNews.c:2522 WWW/Library/Implementation/HTNews.c:2530 WWW/Library/Implementation/HTNews.c:2669 +msgid "Connection interrupted." +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:363 WWW/Library/Implementation/HTNews.c:447 +msgid "Connection closed ???" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:403 +msgid "Change username?" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:517 +msgid "Change password?" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:826 +msgid "Cannot open temporary file for news POST." +msgstr "Impossibile aprire file temporaneo" + +#: WWW/Library/Implementation/HTNews.c:1595 +msgid "" +"\n" +"No articles in this group.\n" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1608 +msgid "" +"\n" +"No articles in this range.\n" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1642 +msgid "Earlier articles" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1655 +msgid "" +"\n" +"There are about %d articles currently available in %s, IDs as follows:\n" +"\n" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1713 +msgid "All available articles in " +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1923 +msgid "Later articles" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1947 +msgid "Post to " +msgstr "Inviare a aree di conferenza " + +#: WWW/Library/Implementation/HTNews.c:2035 +msgid "This client does not contain support for posting to news with SSL." +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2048 +msgid "Invalid URL!" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2125 +msgid "This client does not contain support for SNEWS URLs." +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2306 +msgid "No target for raw text!" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2336 +msgid "Connecting to NewsHost ..." +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2436 WWW/Library/Implementation/HTNews.c:2462 WWW/Library/Implementation/HTNews.c:2619 +msgid "Cannot POST to this host." +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2485 +msgid "Cancelled!" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2637 +msgid "Reading list of available newsgroups." +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2659 +msgid "Reading list of articles in newsgroup." +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2665 +msgid "Reading news article." +msgstr "" + +#: src/LYMain.c:2502 +msgid "" +"\n" +"%s Version %s (1998)\n" +msgstr "" + +#: src/LYMain.c:2507 +msgid "%s Version %s %s" +msgstr "%s Versione %s %s" + +#: src/LYMain.c:2510 +msgid "Copyrights held by the University of Kansas, CERN, and other contributors.\n" +msgstr "Il copyright ha tenuto dall' università di Kansas, di CERN e di altri contributori.\n" + +#: src/LYMain.c:2512 +msgid "Distributed under the GNU General Public License.\n" +msgstr "Distribuito sotto l' autorizzazione del grande pubblico di GNU.\n" + +#: src/LYMain.c:2514 +msgid "" +"See http://lynx.browser.org/ and the online help for more information.\n" +"\n" +msgstr "Vedere http://lynx.browser.org / e l' aiuto in linea per le più informazioni.\n" +"\n" + +#: src/LYMainLoop.c:2204 +msgid "Are you sure you want to quit? [Y] " +msgstr " Vuoi abbandonare? [Y] " + +#: src/LYMainLoop.c:2206 +msgid "Are you sure you want to quit? [N] " +msgstr " Vuoi abbandonare? [N] " + +#: src/LYMainLoop.c:2214 src/LYMainLoop.c:2219 +msgid "Excellent!!!" +msgstr "Bene!!!" + +#: src/LYNews.c:72 src/LYNews.c:84 +msgid "Can't open temporary file!" +msgstr "Impossibile aprire file temporaneo!" + +#: src/LYNews.c:111 +msgid "You will be posting to:" +msgstr "" + +#: src/LYNews.c:120 +msgid "" +"\n" +"\n" +" Please provide your mail address for the From: header\n" +msgstr "" + +#: src/LYNews.c:127 src/LYNews.c:156 src/LYNews.c:191 src/LYNews.c:265 src/LYNews.c:276 +msgid "News Post Cancelled!!!" +msgstr "Invio news cancellato!!!" + +#: src/LYNews.c:139 +msgid "" +"\n" +"\n" +" Please provide or edit the Subject: header\n" +msgstr "" +"\n" +"\n" +" Inserire il soggetto.\n" + +#: src/LYNews.c:187 +msgid "" +"\n" +"\n" +" Please provide or edit the Organization: header\n" +msgstr "" + +#: src/LYNews.c:217 +msgid "Do you wish to include the original message? (y/n) " +msgstr "Vuoi includere il messaggio originario? (s/n) " + +#: src/LYNews.c:244 +msgid "Spawning your selected editor to edit news message" +msgstr "Avvio dell'editor selezionato per editare messaggi news" + +#: src/LYNews.c:248 +msgid "Error spawning editor, check your editor definition in the options menu" +msgstr "Errore nell'avvio dell'editor, verifica la definizione dell'editor nelle opzioni" + +#: src/LYNews.c:256 +msgid "" +"\n" +"\n" +" Please enter your message below." +msgstr "" + +#: src/LYNews.c:257 +msgid "" +"\n" +" When you are done, press enter and put a single period (.)" +msgstr "" + +#: src/LYNews.c:258 +msgid "" +"\n" +" on a line and press enter again." +msgstr "" + +#: src/LYNews.c:293 +msgid "Post this message? (y/n) " +msgstr "Inviare questo messaggio? (s/n)" + +#: src/LYNews.c:306 +msgid "Append '%s'? (y/n) " +msgstr "Aggiungere '%s'? (s/n) " + +#: src/LYNews.c:364 +msgid "Posting to newsgroup(s)..." +msgstr "Inviare a aree di conferenza..." + +#: src/LYexit.c:112 +msgid "" +"\n" +"Memory exhausted! Program aborted!\n" +"\n" +msgstr "\nMemoria esaurita! Fine anomala del programma!\n\n" + +#: src/LYexit.c:176 +msgid "" +"\n" +"\n" +"\n" +"%s %s: out of memory. Aborting..." +msgstr "\n\n\n%s %s: Memoria esaurita! Fine anomala del programma!" diff --git a/gnu/usr.bin/lynx/po/ko.po b/gnu/usr.bin/lynx/po/ko.po new file mode 100644 index 00000000000..413ecd3f631 --- /dev/null +++ b/gnu/usr.bin/lynx/po/ko.po @@ -0,0 +1,11 @@ +msgid "" +msgstr "" +"Date: 1998-08-22 16:12:20-0400\n" +"From: Webmaster Jim \n" +"Content-Type: text/plain; charset=\n" +"Xgettext-Options: --default-domain=po/de\n" +"Files: src/LYMain.c\n" + +#: src/LYMain.c:2502 +msgid "%s Version %s %s" +msgstr "" diff --git a/gnu/usr.bin/lynx/po/lynx.pot b/gnu/usr.bin/lynx/po/lynx.pot new file mode 100644 index 00000000000..cdd31be81b9 --- /dev/null +++ b/gnu/usr.bin/lynx/po/lynx.pot @@ -0,0 +1,4820 @@ +msgid "" +msgstr "" +"Date: 1999-05-25 07:12:28-0400\n" +"From: Thomas Dickey,,, \n" +"Content-Type: text/plain; charset=\n" +"Xgettext-Options: --default-domain=lynx --directory=.. --add-comments --keyword=_ --keyword=N_ --files-from=./POTFILES.in\n" +"Files: LYMessages.c WWW/Library/Implementation/HTAABrow.c WWW/Library/Implementation/HTAccess.c WWW/Library/Implementation/HTFTP.c WWW/Library/Implementation/HTFile.c WWW/Library/Implementation/HTFinger.c WWW/Library/Implementation/HTGopher.c WWW/Library/Implementation/HTNews.c WWW/Library/Implementation/HTTCP.c WWW/Library/Implementation/HTTP.c WWW/Library/Implementation/HTTelnet.c WWW/Library/Implementation/HTWAIS.c WWW/Library/Implementation/HTWSRC.c src/GridText.c src/HTAlert.c src/HTML.c src/LYBookmark.c src/LYCgi.c src/LYClean.c src/LYCookie.c src/LYCurses.c src/LYDownload.c src/LYHistory.c src/LYLeaks.c src/LYList.c src/LYLocal.c src/LYMail.c src/LYMain.c src/LYMainLoop.c src/LYNews.c src/LYOptions.c src/LYPrint.c src/LYReadCFG.c src/LYShowInfo.c src/LYStyle.c src/LYTraversal.c src/LYUpload.c src/LYUtils.c src/LYrcFile.c\n" + +#: LYMessages.c:30 +msgid "Alert!: %s" +msgstr "" + +#: LYMessages.c:31 +msgid "Welcome" +msgstr "" + +#: LYMessages.c:32 LYMessages.c:33 +msgid "Are you sure you want to quit?" +msgstr "" + +#: LYMessages.c:35 LYMessages.c:36 +msgid "Really exit from Lynx?" +msgstr "" + +#. VMS +#: LYMessages.c:38 +msgid "Connection interrupted." +msgstr "" + +#: LYMessages.c:39 +msgid "Data transfer interrupted." +msgstr "" + +#: LYMessages.c:40 +msgid "Cancelled!!!" +msgstr "" + +#: LYMessages.c:41 +msgid "Cancelling!" +msgstr "" + +#: LYMessages.c:42 +msgid "Excellent!!!" +msgstr "" + +#: LYMessages.c:43 +msgid "Done!" +msgstr "" + +#: LYMessages.c:44 +msgid "Bad request!" +msgstr "" + +#: LYMessages.c:45 +msgid "previous" +msgstr "" + +#: LYMessages.c:46 +msgid "next screen" +msgstr "" + +#: LYMessages.c:47 +msgid "HELP!" +msgstr "" + +#: LYMessages.c:48 +msgid ", help on " +msgstr "" + +#. #define HELP +#: LYMessages.c:50 +msgid "Commands: Use arrow keys to move, '?' for help, 'q' to quit, '<-' to go back." +msgstr "" + +#. #define MOREHELP +#: LYMessages.c:52 +msgid "-- press space for more, use arrow keys to move, '?' for help, 'q' to quit." +msgstr "" + +#: LYMessages.c:53 +msgid "-- press space for next page --" +msgstr "" + +#. Forms messages +#. #define FORM_LINK_TEXT_MESSAGE +#: LYMessages.c:57 +msgid "(Text entry field) Enter text. Use UP or DOWN arrows or tab to move off." +msgstr "" + +#. #define FORM_LINK_TEXTAREA_MESSAGE +#: LYMessages.c:59 +msgid "(Textarea) Enter text. Use UP/DOWN arrows or TAB to move off (^Ve for editor)." +msgstr "" + +#. #define FORM_LINK_TEXT_UNM_MSG +#: LYMessages.c:61 +msgid "UNMODIFIABLE form text field. Use UP or DOWN arrows or tab to move off." +msgstr "" + +#. #define FORM_LINK_TEXT_SUBMIT_MESSAGE +#: LYMessages.c:63 +msgid "(Form field) Enter text. Use to submit ('x' for no cache)." +msgstr "" + +#. #define FORM_LINK_TEXT_RESUBMIT_MESSAGE +#: LYMessages.c:65 +msgid "(Form field) Enter text. Use to submit, arrows or tab to move off." +msgstr "" + +#. #define FORM_LINK_TEXT_SUBMIT_UNM_MSG +#: LYMessages.c:67 +msgid "UNMODIFIABLE form field. Use UP or DOWN arrows or tab to move off." +msgstr "" + +#. #define FORM_LINK_TEXT_SUBMIT_MAILTO_MSG +#: LYMessages.c:69 +msgid "(mailto form field) Enter text. Use to submit, arrows to move off." +msgstr "" + +#. #define FORM_LINK_TEXT_SUBMIT_MAILTO_DIS_MSG +#: LYMessages.c:71 +msgid "(mailto form field) Mail is disallowed so you cannot submit." +msgstr "" + +#. #define FORM_LINK_PASSWORD_MESSAGE +#: LYMessages.c:73 +msgid "(Password entry field) Enter text. Use UP or DOWN arrows or tab to move off." +msgstr "" + +#. #define FORM_LINK_PASSWORD_UNM_MSG +#: LYMessages.c:75 +msgid "UNMODIFIABLE form password. Use UP or DOWN arrows or tab to move off." +msgstr "" + +#. #define FORM_LINK_CHECKBOX_MESSAGE +#: LYMessages.c:77 +msgid "(Checkbox Field) Use right-arrow or to toggle." +msgstr "" + +#. #define FORM_LINK_CHECKBOX_UNM_MSG +#: LYMessages.c:79 +msgid "UNMODIFIABLE form checkbox. Use UP or DOWN arrows or tab to move off." +msgstr "" + +#. #define FORM_LINK_RADIO_MESSAGE +#: LYMessages.c:81 +msgid "(Radio Button) Use right-arrow or to toggle." +msgstr "" + +#. #define FORM_LINK_RADIO_UNM_MSG +#: LYMessages.c:83 +msgid "UNMODIFIABLE form radio button. Use UP or DOWN arrows or tab to move off." +msgstr "" + +#. #define FORM_LINK_SUBMIT_PREFIX +#: LYMessages.c:85 +msgid "Submit ('x' for no cache) to " +msgstr "" + +#. #define FORM_LINK_RESUBMIT_PREFIX +#: LYMessages.c:87 +msgid "Submit to " +msgstr "" + +#. #define FORM_LINK_SUBMIT_MESSAGE +#: LYMessages.c:89 +msgid "(Form submit button) Use right-arrow or to submit ('x' for no cache)." +msgstr "" + +#. #define FORM_LINK_RESUBMIT_MESSAGE +#: LYMessages.c:91 +msgid "(Form submit button) Use right-arrow or to submit." +msgstr "" + +#. #define FORM_LINK_SUBMIT_DIS_MSG +#: LYMessages.c:93 +msgid "DISABLED form submit button. Use UP or DOWN arrows or tab to move off." +msgstr "" + +#. #define FORM_LINK_SUBMIT_MAILTO_PREFIX +#: LYMessages.c:95 +msgid "Submit mailto form to " +msgstr "" + +#. #define FORM_LINK_SUBMIT_MAILTO_MSG +#: LYMessages.c:97 +msgid "(mailto form submit button) Use right-arrow or to submit." +msgstr "" + +#. #define FORM_LINK_SUBMIT_MAILTO_DIS_MSG +#: LYMessages.c:99 +msgid "(mailto form submit button) Mail is disallowed so you cannot submit." +msgstr "" + +#. #define FORM_LINK_RESET_MESSAGE +#: LYMessages.c:101 +msgid "(Form reset button) Use right-arrow or to reset form to defaults." +msgstr "" + +#. #define FORM_LINK_RESET_DIS_MSG +#: LYMessages.c:103 +msgid "DISABLED form reset button. Use UP or DOWN arrows or tab to move off." +msgstr "" + +#. #define FORM_LINK_OPTION_LIST_MESSAGE +#: LYMessages.c:105 +msgid "(Option list) Hit return and use arrow keys and return to select option." +msgstr "" + +#. #define CHOICE_LIST_MESSAGE +#: LYMessages.c:107 +msgid "(Choice list) Hit return and use arrow keys and return to select option." +msgstr "" + +#. #define FORM_LINK_OPTION_LIST_UNM_MSG +#: LYMessages.c:109 +msgid "UNMODIFIABLE option list. Use return or arrow keys to review or leave." +msgstr "" + +#. #define CHOICE_LIST_UNM_MSG +#: LYMessages.c:111 +msgid "UNMODIFIABLE choice list. Use return or arrow keys to review or leave." +msgstr "" + +#: LYMessages.c:112 +msgid "Submitting form..." +msgstr "" + +#: LYMessages.c:113 +msgid "Resetting form..." +msgstr "" + +#. #define RELOADING_FORM +#: LYMessages.c:115 +msgid "Reloading document. Any form entries will be lost!" +msgstr "" + +#: LYMessages.c:116 +msgid "Warning: Cannot transcode form data to charset %s!" +msgstr "" + +#. #define NORMAL_LINK_MESSAGE +#: LYMessages.c:119 +msgid "(NORMAL LINK) Use right-arrow or to activate." +msgstr "" + +#: LYMessages.c:120 +msgid "The resource requested is not available at this time." +msgstr "" + +#: LYMessages.c:121 +msgid "Enter Lynx keystroke command: " +msgstr "" + +#: LYMessages.c:122 +msgid "Looking up " +msgstr "" + +#: LYMessages.c:123 +msgid "Getting %s" +msgstr "" + +#: LYMessages.c:124 +msgid "Skipping %s" +msgstr "" + +#: LYMessages.c:125 +msgid "Using %s" +msgstr "" + +#: LYMessages.c:126 +msgid "Illegal URL: %s" +msgstr "" + +#: LYMessages.c:127 +msgid "Badly formed address %s" +msgstr "" + +#: LYMessages.c:128 +msgid "URL: %s" +msgstr "" + +#: LYMessages.c:129 +msgid "Unable to access WWW file!!!" +msgstr "" + +#: LYMessages.c:130 +msgid "This is a searchable index. Use %s to search." +msgstr "" + +#. #define WWW_INDEX_MORE_MESSAGE +#: LYMessages.c:132 +msgid "--More-- This is a searchable index. Use %s to search." +msgstr "" + +#: LYMessages.c:133 +msgid "You have entered an invalid link number." +msgstr "" + +#. #define SOURCE_HELP +#: LYMessages.c:135 +msgid "Currently viewing document source. Press '\\' to return to rendered version." +msgstr "" + +#. #define NOVICE_LINE_ONE +#: LYMessages.c:137 +msgid " Arrow keys: Up and Down to move. Right to follow a link; Left to go back. \n" +msgstr "" + +#. #define NOVICE_LINE_TWO +#: LYMessages.c:139 +msgid " H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list \n" +msgstr "" + +#. #define NOVICE_LINE_TWO_A +#: LYMessages.c:141 +msgid " O)ther cmds H)elp K)eymap G)oto P)rint M)ain screen o)ptions Q)uit \n" +msgstr "" + +#. #define NOVICE_LINE_TWO_B +#: LYMessages.c:143 +msgid " O)ther cmds B)ack E)dit D)ownload ^R)eload ^W)ipe screen search doc: / \n" +msgstr "" + +#. #define NOVICE_LINE_TWO_C +#: LYMessages.c:145 +msgid " O)ther cmds C)omment History: Bookmarks: V)iew, A)dd, R)emove \n" +msgstr "" + +#. #define FORM_NOVICELINE_ONE +#: LYMessages.c:147 +msgid " Enter text into the field by typing on the keyboard " +msgstr "" + +#. #define FORM_NOVICELINE_TWO +#: LYMessages.c:149 +msgid " Ctrl-U to delete all text in field, [Backspace] to delete a character " +msgstr "" + +#. mailto +#: LYMessages.c:152 +msgid "Malformed mailto form submission! Cancelled!" +msgstr "" + +#: LYMessages.c:153 +msgid "Warning! Control codes in mail address replaced by ?" +msgstr "" + +#: LYMessages.c:154 +msgid "Mail disallowed! Cannot submit." +msgstr "" + +#: LYMessages.c:155 +msgid "Mailto form submission failed!" +msgstr "" + +#: LYMessages.c:156 +msgid "Mailto form submission Cancelled!!!" +msgstr "" + +#: LYMessages.c:157 +msgid "Sending form content..." +msgstr "" + +#: LYMessages.c:158 +msgid "No email address is present in mailto URL!" +msgstr "" + +#. #define MAILTO_URL_TEMPOPEN_FAILED +#: LYMessages.c:160 +msgid "Unable to open temporary file for mailto URL!" +msgstr "" + +#: LYMessages.c:161 +msgid "Comment request cancelled!!!" +msgstr "" + +#. #define INC_ORIG_MSG_PROMPT +#: LYMessages.c:163 +msgid "Do you wish to include the original message?" +msgstr "" + +#. #define INC_PREPARSED_MSG_PROMPT +#: LYMessages.c:165 +msgid "Do you wish to include the preparsed source?" +msgstr "" + +#. #define SPAWNING_EDITOR_FOR_MAIL +#: LYMessages.c:167 +msgid "Spawning your selected editor to edit mail message" +msgstr "" + +#. #define ERROR_SPAWNING_EDITOR +#: LYMessages.c:169 +msgid "Error spawning editor, check your editor definition in the options menu" +msgstr "" + +#: LYMessages.c:170 +msgid "Send this comment?" +msgstr "" + +#: LYMessages.c:171 +msgid "Send this message?" +msgstr "" + +#: LYMessages.c:172 +msgid "Sending your message..." +msgstr "" + +#: LYMessages.c:173 +msgid "Sending your comment:" +msgstr "" + +#. textarea +#: LYMessages.c:176 +msgid "Not in a TEXTAREA; cannot use external editor." +msgstr "" + +#: LYMessages.c:179 +msgid "file: ACTIONs are disallowed!" +msgstr "" + +#. #define FILE_SERVED_LINKS_DISALLOWED +#: LYMessages.c:181 +msgid "file: URLs via served links are disallowed!" +msgstr "" + +#: LYMessages.c:182 +msgid "file: URLs via bookmarks are disallowed!" +msgstr "" + +#. #define SPECIAL_VIA_EXTERNAL_DISALLOWED +#: LYMessages.c:184 +msgid "This special URL is not allowed in external documents!" +msgstr "" + +#: LYMessages.c:185 +msgid "Press to return to Lynx." +msgstr "" + +#. #define SPAWNING_MSG +#: LYMessages.c:188 +msgid "Spawning DCL subprocess. Use 'logout' to return to Lynx.\n" +msgstr "" + +#. #define SPAWNING_MSG +#: LYMessages.c:192 +msgid "Type EXIT to return to Lynx.\n" +msgstr "" + +#. UNIX +#. #define SPAWNING_MSG +#: LYMessages.c:195 +msgid "Spawning your default shell. Use 'exit' to return to Lynx.\n" +msgstr "" + +#. VMS +#: LYMessages.c:198 +msgid "Spawning is currently disabled." +msgstr "" + +#: LYMessages.c:199 +msgid "The 'd'ownload command is currently disabled." +msgstr "" + +#: LYMessages.c:200 +msgid "You cannot download an input field." +msgstr "" + +#: LYMessages.c:201 +msgid "Form has a mailto action! Cannot download." +msgstr "" + +#: LYMessages.c:202 +msgid "You cannot download a mailto: link." +msgstr "" + +#: LYMessages.c:203 +msgid "You cannot download cookies." +msgstr "" + +#: LYMessages.c:204 +msgid "You cannot download a printing option." +msgstr "" + +#: LYMessages.c:205 +msgid "You cannot download an upload option." +msgstr "" + +#: LYMessages.c:206 +msgid "You cannot download an permit option." +msgstr "" + +#: LYMessages.c:207 +msgid "This special URL cannot be downloaded!" +msgstr "" + +#: LYMessages.c:208 +msgid "Nothing to download." +msgstr "" + +#: LYMessages.c:209 +msgid "Trace ON!" +msgstr "" + +#: LYMessages.c:210 +msgid "Trace OFF!" +msgstr "" + +#. #define CLICKABLE_IMAGES_ON +#: LYMessages.c:212 +msgid "Links will be included for all images! Reloading..." +msgstr "" + +#. #define CLICKABLE_IMAGES_OFF +#: LYMessages.c:214 +msgid "Standard image handling restored! Reloading..." +msgstr "" + +#. #define PSEUDO_INLINE_ALTS_ON +#: LYMessages.c:216 +msgid "Pseudo_ALTs will be inserted for inlines without ALT strings! Reloading..." +msgstr "" + +#. #define PSEUDO_INLINE_ALTS_OFF +#: LYMessages.c:218 +msgid "Inlines without an ALT string specified will be ignored! Reloading..." +msgstr "" + +#: LYMessages.c:219 +msgid "Raw 8-bit or CJK mode toggled OFF! Reloading..." +msgstr "" + +#: LYMessages.c:220 +msgid "Raw 8-bit or CJK mode toggled ON! Reloading..." +msgstr "" + +#. #define HEAD_D_L_OR_CANCEL +#: LYMessages.c:222 +msgid "Send HEAD request for D)ocument or L)ink, or C)ancel? (d,l,c): " +msgstr "" + +#. #define HEAD_D_OR_CANCEL +#: LYMessages.c:224 +msgid "Send HEAD request for D)ocument, or C)ancel? (d,c): " +msgstr "" + +#: LYMessages.c:225 +msgid "Sorry, the document is not an http URL." +msgstr "" + +#: LYMessages.c:226 +msgid "Sorry, the link is not an http URL." +msgstr "" + +#: LYMessages.c:227 +msgid "Sorry, the ACTION for this form is disabled." +msgstr "" + +#. #define FORM_ACTION_NOT_HTTP_URL +#: LYMessages.c:229 +msgid "Sorry, the ACTION for this form is not an http URL." +msgstr "" + +#: LYMessages.c:230 +msgid "Not an http URL or form ACTION!" +msgstr "" + +#: LYMessages.c:231 +msgid "This special URL cannot be a form ACTION!" +msgstr "" + +#: LYMessages.c:232 +msgid "URL is not in starting realm!" +msgstr "" + +#: LYMessages.c:233 +msgid "News posting is disabled!" +msgstr "" + +#: LYMessages.c:234 +msgid "File management support is disabled!" +msgstr "" + +#: LYMessages.c:235 +msgid "No jump file is currently available." +msgstr "" + +#: LYMessages.c:236 +msgid "Jump to (use '?' for list): " +msgstr "" + +#: LYMessages.c:237 +msgid "Jumping to a shortcut URL is disallowed!" +msgstr "" + +#: LYMessages.c:238 +msgid "Random URL is disallowed! Use a shortcut." +msgstr "" + +#: LYMessages.c:239 +msgid "No random URLs have been used thus far." +msgstr "" + +#: LYMessages.c:240 +msgid "Bookmark features are currently disabled." +msgstr "" + +#: LYMessages.c:241 +msgid "Execution via bookmarks is disabled." +msgstr "" + +#. #define BOOKMARK_FILE_NOT_DEFINED +#: LYMessages.c:243 +msgid "Bookmark file is not defined. Use %s to see options." +msgstr "" + +#. #define NO_TEMP_FOR_HOTLIST +#: LYMessages.c:245 +msgid "Unable to open tempfile for X Mosaic hotlist conversion." +msgstr "" + +#: LYMessages.c:246 +msgid "ERROR - unable to open bookmark file." +msgstr "" + +#. #define BOOKMARK_OPEN_FAILED_FOR_DEL +#: LYMessages.c:248 +msgid "Unable to open bookmark file for deletion of link." +msgstr "" + +#. #define BOOKSCRA_OPEN_FAILED_FOR_DEL +#: LYMessages.c:250 +msgid "Unable to open scratch file for deletion of link." +msgstr "" + +#: LYMessages.c:252 +msgid "Error renaming scratch file." +msgstr "" + +#: LYMessages.c:254 +msgid "Error renaming temporary file." +msgstr "" + +#. #define BOOKTEMP_COPY_FAIL +#: LYMessages.c:256 +msgid "Unable to copy temporary file for deletion of link." +msgstr "" + +#. #define BOOKTEMP_REOPEN_FAIL_FOR_DEL +#: LYMessages.c:258 +msgid "Unable to reopen temporary file for deletion of link." +msgstr "" + +#. VMS +#. #define BOOKMARK_LINK_NOT_ONE_LINE +#: LYMessages.c:261 +msgid "Link is not by itself all on one line in bookmark file." +msgstr "" + +#: LYMessages.c:262 +msgid "Bookmark deletion failed." +msgstr "" + +#. #define BOOKMARKS_NOT_TRAVERSED +#: LYMessages.c:264 +msgid "Bookmark files cannot be traversed (only http URLs)." +msgstr "" + +#. #define BOOKMARKS_NOT_OPEN +#: LYMessages.c:266 +msgid "Unable to open bookmark file, use 'a' to save a link first" +msgstr "" + +#: LYMessages.c:267 +msgid "There are no links in this bookmark file!" +msgstr "" + +#. #define BOOK_D_L_OR_CANCEL +#: LYMessages.c:269 +msgid "Save D)ocument or L)ink to bookmark file or C)ancel? (d,l,c): " +msgstr "" + +#: LYMessages.c:270 +msgid "Save D)ocument to bookmark file or C)ancel? (d,c): " +msgstr "" + +#: LYMessages.c:271 +msgid "Save L)ink to bookmark file or C)ancel? (l,c): " +msgstr "" + +#. #define NOBOOK_POST_FORM +#: LYMessages.c:273 +msgid "Documents from forms with POST content cannot be saved as bookmarks." +msgstr "" + +#: LYMessages.c:274 +msgid "Cannot save form fields/links" +msgstr "" + +#. #define NOBOOK_HSML +#: LYMessages.c:276 +msgid "History, showinfo, menu and list files cannot be saved as bookmarks." +msgstr "" + +#. #define CONFIRM_BOOKMARK_DELETE +#: LYMessages.c:278 +msgid "Do you really want to delete this link from your bookmark file?" +msgstr "" + +#: LYMessages.c:279 +msgid "Malformed address." +msgstr "" + +#. #define HISTORICAL_ON_MINIMAL_OFF +#: LYMessages.c:281 +msgid "Historical comment parsing ON (Minimal is overridden)!" +msgstr "" + +#. #define HISTORICAL_OFF_MINIMAL_ON +#: LYMessages.c:283 +msgid "Historical comment parsing OFF (Minimal is in effect)!" +msgstr "" + +#. #define HISTORICAL_ON_VALID_OFF +#: LYMessages.c:285 +msgid "Historical comment parsing ON (Valid is overridden)!" +msgstr "" + +#. #define HISTORICAL_OFF_VALID_ON +#: LYMessages.c:287 +msgid "Historical comment parsing OFF (Valid is in effect)!" +msgstr "" + +#. #define MINIMAL_ON_IN_EFFECT +#: LYMessages.c:289 +msgid "Minimal comment parsing ON (and in effect)!" +msgstr "" + +#. #define MINIMAL_OFF_VALID_ON +#: LYMessages.c:291 +msgid "Minimal comment parsing OFF (Valid is in effect)!" +msgstr "" + +#. #define MINIMAL_ON_BUT_HISTORICAL +#: LYMessages.c:293 +msgid "Minimal comment parsing ON (but Historical is in effect)!" +msgstr "" + +#. #define MINIMAL_OFF_HISTORICAL_ON +#: LYMessages.c:295 +msgid "Minimal comment parsing OFF (Historical is in effect)!" +msgstr "" + +#: LYMessages.c:296 +msgid "Soft double-quote parsing ON!" +msgstr "" + +#: LYMessages.c:297 +msgid "Soft double-quote parsing OFF!" +msgstr "" + +#: LYMessages.c:298 +msgid "Now using TagSoup parsing of HTML." +msgstr "" + +#: LYMessages.c:299 +msgid "Now using SortaSGML parsing of HTML!" +msgstr "" + +#: LYMessages.c:300 +msgid "You are already at the end of this document." +msgstr "" + +#: LYMessages.c:301 +msgid "You are already at the beginning of this document." +msgstr "" + +#: LYMessages.c:302 +msgid "You are already at page %d of this document." +msgstr "" + +#: LYMessages.c:303 +msgid "Link number %d already is current." +msgstr "" + +#: LYMessages.c:304 +msgid "You are already at the first document" +msgstr "" + +#: LYMessages.c:305 +msgid "There are no links above this line of the document." +msgstr "" + +#: LYMessages.c:306 +msgid "There are no links below this line of the document." +msgstr "" + +#. #define MAXLEN_REACHED_DEL_OR_MOV +#: LYMessages.c:308 +msgid "Maximum length reached! Delete text or move off field." +msgstr "" + +#. #define NOT_ON_SUBMIT_OR_LINK +#: LYMessages.c:310 +msgid "You are not on a form submission button or normal link." +msgstr "" + +#. #define NEED_CHECKED_RADIO_BUTTON +#: LYMessages.c:312 +msgid "One radio button must be checked at all times!" +msgstr "" + +#: LYMessages.c:313 +msgid "Do you want to go back to the previous document?" +msgstr "" + +#: LYMessages.c:314 +msgid "Use arrows or tab to move off of field." +msgstr "" + +#. #define ENTER_TEXT_ARROWS_OR_TAB +#: LYMessages.c:316 +msgid "Enter text. Use arrows or tab to move off of field." +msgstr "" + +#: LYMessages.c:317 +msgid "** Bad HTML!! No form action defined. **" +msgstr "" + +#: LYMessages.c:318 +msgid "Bad HTML!! Unable to create popup window!" +msgstr "" + +#: LYMessages.c:319 +msgid "Unable to create popup window!" +msgstr "" + +#: LYMessages.c:320 +msgid "Goto a random URL is disallowed!" +msgstr "" + +#: LYMessages.c:321 +msgid "Goto a non-http URL is disallowed!" +msgstr "" + +#: LYMessages.c:322 +msgid "You are not allowed to goto \"cso:\" URLs" +msgstr "" + +#: LYMessages.c:323 +msgid "You are not allowed to goto \"file:\" URLs" +msgstr "" + +#: LYMessages.c:324 +msgid "You are not allowed to goto \"finger:\" URLs" +msgstr "" + +#: LYMessages.c:325 +msgid "You are not allowed to goto \"ftp:\" URLs" +msgstr "" + +#: LYMessages.c:326 +msgid "You are not allowed to goto \"gopher:\" URLs" +msgstr "" + +#: LYMessages.c:327 +msgid "You are not allowed to goto \"http:\" URLs" +msgstr "" + +#: LYMessages.c:328 +msgid "You are not allowed to goto \"https:\" URLs" +msgstr "" + +#: LYMessages.c:329 +msgid "You are not allowed to goto \"lynxcgi:\" URLs" +msgstr "" + +#: LYMessages.c:330 +msgid "You are not allowed to goto \"lynxexec:\" URLs" +msgstr "" + +#: LYMessages.c:331 +msgid "You are not allowed to goto \"lynxprog:\" URLs" +msgstr "" + +#: LYMessages.c:332 +msgid "You are not allowed to goto \"mailto:\" URLs" +msgstr "" + +#: LYMessages.c:333 +msgid "You are not allowed to goto \"news:\" URLs" +msgstr "" + +#: LYMessages.c:334 +msgid "You are not allowed to goto \"nntp:\" URLs" +msgstr "" + +#: LYMessages.c:335 +msgid "You are not allowed to goto \"rlogin:\" URLs" +msgstr "" + +#: LYMessages.c:336 +msgid "You are not allowed to goto \"snews:\" URLs" +msgstr "" + +#: LYMessages.c:337 +msgid "You are not allowed to goto \"telnet:\" URLs" +msgstr "" + +#: LYMessages.c:338 +msgid "You are not allowed to goto \"tn3270:\" URLs" +msgstr "" + +#: LYMessages.c:339 +msgid "You are not allowed to goto \"wais:\" URLs" +msgstr "" + +#: LYMessages.c:340 +msgid "This special URL is not allowed as a goto!" +msgstr "" + +#: LYMessages.c:341 +msgid "URL to open: " +msgstr "" + +#: LYMessages.c:342 +msgid "Edit the current Goto URL: " +msgstr "" + +#: LYMessages.c:343 +msgid "Edit the previous Goto URL: " +msgstr "" + +#: LYMessages.c:344 +msgid "Edit a previous Goto URL: " +msgstr "" + +#: LYMessages.c:345 +msgid "Current document has POST data." +msgstr "" + +#: LYMessages.c:346 +msgid "Edit this document's URL: " +msgstr "" + +#: LYMessages.c:347 +msgid "Edit the current link's URL: " +msgstr "" + +#: LYMessages.c:348 +msgid "You cannot edit File Management URLs" +msgstr "" + +#: LYMessages.c:349 +msgid "Enter a database query: " +msgstr "" + +#: LYMessages.c:350 +msgid "Enter a whereis query: " +msgstr "" + +#: LYMessages.c:351 +msgid "Edit the current query: " +msgstr "" + +#: LYMessages.c:352 +msgid "Edit the previous query: " +msgstr "" + +#: LYMessages.c:353 +msgid "Edit a previous query: " +msgstr "" + +#. #define USE_C_R_TO_RESUB_CUR_QUERY +#: LYMessages.c:355 +msgid "Use Control-R to resubmit the current query." +msgstr "" + +#: LYMessages.c:356 +msgid "Edit the current shortcut: " +msgstr "" + +#: LYMessages.c:357 +msgid "Edit the previous shortcut: " +msgstr "" + +#: LYMessages.c:358 +msgid "Edit a previous shortcut: " +msgstr "" + +#: LYMessages.c:359 +msgid "Key '%c' is not mapped to a jump file!" +msgstr "" + +#: LYMessages.c:360 +msgid "Cannot locate jump file!" +msgstr "" + +#: LYMessages.c:361 +msgid "Cannot open jump file!" +msgstr "" + +#: LYMessages.c:362 +msgid "Error reading jump file!" +msgstr "" + +#: LYMessages.c:363 +msgid "Out of memory reading jump file!" +msgstr "" + +#: LYMessages.c:364 +msgid "Out of memory reading jump table!" +msgstr "" + +#: LYMessages.c:365 +msgid "No index is currently available." +msgstr "" + +#. #define CONFIRM_MAIN_SCREEN +#: LYMessages.c:367 +msgid "Do you really want to go to the Main screen?" +msgstr "" + +#: LYMessages.c:368 +msgid "You are already at main screen!" +msgstr "" + +#. #define NOT_ISINDEX +#: LYMessages.c:370 +msgid "Not a searchable indexed document -- press '/' to search for a text string" +msgstr "" + +#. #define NO_OWNER +#: LYMessages.c:372 +msgid "No owner is defined for this file so you cannot send a comment" +msgstr "" + +#: LYMessages.c:373 +msgid "No owner is defined. Use %s?" +msgstr "" + +#: LYMessages.c:374 +msgid "Do you wish to send a comment?" +msgstr "" + +#: LYMessages.c:375 +msgid "Mail is disallowed so you cannot send a comment" +msgstr "" + +#: LYMessages.c:376 +msgid "The 'e'dit command is currently disabled." +msgstr "" + +#: LYMessages.c:377 +msgid "System error - failure to get status." +msgstr "" + +#: LYMessages.c:378 +msgid "No editor is defined!" +msgstr "" + +#: LYMessages.c:379 +msgid "The 'p'rint command is currently disabled." +msgstr "" + +#: LYMessages.c:380 +msgid "Document has no Toolbar links or Banner." +msgstr "" + +#: LYMessages.c:381 +msgid "Unable to open traversal file." +msgstr "" + +#: LYMessages.c:382 +msgid "Unable to open traversal found file." +msgstr "" + +#: LYMessages.c:383 +msgid "Unable to open reject file." +msgstr "" + +#: LYMessages.c:384 +msgid "Unable to open traversal errors output file" +msgstr "" + +#: LYMessages.c:385 +msgid "TRAVERSAL WAS INTERRUPTED" +msgstr "" + +#: LYMessages.c:386 +msgid "Follow link (or goto link or page) number: " +msgstr "" + +#: LYMessages.c:387 +msgid "Select option (or page) number: " +msgstr "" + +#: LYMessages.c:388 +msgid "Option choice (or page) number: " +msgstr "" + +#: LYMessages.c:389 +msgid "Option number %d already is current." +msgstr "" + +#: LYMessages.c:390 +msgid "Choice number %d already is current." +msgstr "" + +#. #define ALREADY_AT_OPTION_END +#: LYMessages.c:392 +msgid "You are already at the end of this option list." +msgstr "" + +#. #define ALREADY_AT_CHOICE_END +#: LYMessages.c:394 +msgid "You are already at the end of this choice list." +msgstr "" + +#. #define ALREADY_AT_OPTION_BEGIN +#: LYMessages.c:396 +msgid "You are already at the beginning of this option list." +msgstr "" + +#. #define ALREADY_AT_CHOICE_BEGIN +#: LYMessages.c:398 +msgid "You are already at the beginning of this choice list." +msgstr "" + +#. #define ALREADY_AT_OPTION_PAGE +#: LYMessages.c:400 +msgid "You are already at page %d of this option list." +msgstr "" + +#. #define ALREADY_AT_CHOICE_PAGE +#: LYMessages.c:402 +msgid "You are already at page %d of this choice list." +msgstr "" + +#: LYMessages.c:403 +msgid "You have entered an invalid option number." +msgstr "" + +#: LYMessages.c:404 +msgid "You have entered an invalid choice number." +msgstr "" + +#: LYMessages.c:405 +msgid "** Bad HTML!! Use -trace to diagnose. **" +msgstr "" + +#: LYMessages.c:406 +msgid "Give name of file to save in" +msgstr "" + +#: LYMessages.c:407 +msgid "Can't save data to file -- please run WWW locally" +msgstr "" + +#: LYMessages.c:408 +msgid "Can't open temporary file!" +msgstr "" + +#: LYMessages.c:409 +msgid "Can't open output file! Cancelling!" +msgstr "" + +#: LYMessages.c:410 +msgid "Execution is disabled." +msgstr "" + +#. #define EXECUTION_DISABLED_FOR_FILE +#: LYMessages.c:412 +msgid "Execution is not enabled for this file. See the Options menu (use %s)." +msgstr "" + +#. #define EXECUTION_NOT_COMPILED +#: LYMessages.c:414 +msgid "Execution capabilities are not compiled into this version." +msgstr "" + +#: LYMessages.c:415 +msgid "This file cannot be displayed on this terminal." +msgstr "" + +#. #define CANNOT_DISPLAY_FILE_D_OR_C +#: LYMessages.c:417 +msgid "This file cannot be displayed on this terminal: D)ownload, or C)ancel" +msgstr "" + +#: LYMessages.c:418 +msgid "%s D)ownload, or C)ancel" +msgstr "" + +#: LYMessages.c:419 +msgid "Cancelling file." +msgstr "" + +#: LYMessages.c:420 +msgid "Retrieving file. - PLEASE WAIT -" +msgstr "" + +#: LYMessages.c:421 +msgid "Enter a filename: " +msgstr "" + +#: LYMessages.c:422 +msgid "Edit the previous filename: " +msgstr "" + +#: LYMessages.c:423 +msgid "Edit a previous filename: " +msgstr "" + +#: LYMessages.c:424 +msgid "Enter a new filename: " +msgstr "" + +#: LYMessages.c:425 +msgid "File name may not begin with a dot." +msgstr "" + +#: LYMessages.c:427 +msgid "File exists. Create higher version?" +msgstr "" + +#: LYMessages.c:429 +msgid "File exists. Overwrite?" +msgstr "" + +#. VMS +#: LYMessages.c:431 +msgid "Cannot write to file." +msgstr "" + +#: LYMessages.c:432 +msgid "ERROR! - download command is misconfigured." +msgstr "" + +#: LYMessages.c:433 +msgid "Unable to download file." +msgstr "" + +#: LYMessages.c:434 +msgid "Building directory listing..." +msgstr "" + +#: LYMessages.c:435 +msgid "Saving..." +msgstr "" + +#: LYMessages.c:436 +msgid "Could not edit file '%s'." +msgstr "" + +#: LYMessages.c:437 +msgid "Could not access file." +msgstr "" + +#: LYMessages.c:438 +msgid "Could not access directory." +msgstr "" + +#: LYMessages.c:439 +msgid "Could not load data." +msgstr "" + +#. #define CANNOT_EDIT_REMOTE_FILES +#: LYMessages.c:441 +msgid "Lynx cannot currently (e)dit remote WWW files." +msgstr "" + +#. #define CANNOT_EDIT_FIELD +#: LYMessages.c:443 +msgid "This field cannot be (e)dited with an external editor." +msgstr "" + +#: LYMessages.c:444 +msgid "Bad rule" +msgstr "" + +#: LYMessages.c:445 +msgid "Insufficient operands:" +msgstr "" + +#: LYMessages.c:446 +msgid "You are not authorized to edit this file." +msgstr "" + +#: LYMessages.c:447 +msgid "Title: " +msgstr "" + +#: LYMessages.c:448 +msgid "Subject: " +msgstr "" + +#: LYMessages.c:449 +msgid "Username: " +msgstr "" + +#: LYMessages.c:450 +msgid "Password: " +msgstr "" + +#: LYMessages.c:451 +msgid "lynx: Username and Password required!!!" +msgstr "" + +#: LYMessages.c:452 +msgid "lynx: Password required!!!" +msgstr "" + +#: LYMessages.c:453 +msgid "Clear all authorization info for this session?" +msgstr "" + +#: LYMessages.c:454 +msgid "Authorization info cleared." +msgstr "" + +#: LYMessages.c:455 +msgid "Authorization failed. Retry?" +msgstr "" + +#: LYMessages.c:456 +msgid "cgi support has been disabled by system administrator." +msgstr "" + +#. #define CGI_NOT_COMPILED +#: LYMessages.c:458 +msgid "Lynxcgi capabilities are not compiled into this version." +msgstr "" + +#: LYMessages.c:459 +msgid "Sorry, no known way of converting %s to %s." +msgstr "" + +#: LYMessages.c:460 +msgid "Unable to set up connection." +msgstr "" + +#: LYMessages.c:461 +msgid "Unable to make connection" +msgstr "" + +#. #define MALFORMED_EXEC_REQUEST +#: LYMessages.c:463 +msgid "Executable link rejected due to malformed request." +msgstr "" + +#. #define BADCHAR_IN_EXEC_LINK +#: LYMessages.c:465 +msgid "Executable link rejected due to `%c' character." +msgstr "" + +#. #define RELPATH_IN_EXEC_LINK +#: LYMessages.c:467 +msgid "Executable link rejected due to relative path string ('../')." +msgstr "" + +#. #define BADLOCPATH_IN_EXEC_LINK +#: LYMessages.c:469 +msgid "Executable link rejected due to location or path." +msgstr "" + +#: LYMessages.c:470 +msgid "Mail access is disabled!" +msgstr "" + +#. #define ACCESS_ONLY_LOCALHOST +#: LYMessages.c:472 +msgid "Only files and servers on the local host can be accessed." +msgstr "" + +#: LYMessages.c:473 +msgid "Telnet access is disabled!" +msgstr "" + +#. #define TELNET_PORT_SPECS_DISABLED +#: LYMessages.c:475 +msgid "Telnet port specifications are disabled." +msgstr "" + +#: LYMessages.c:476 +msgid "USENET news access is disabled!" +msgstr "" + +#: LYMessages.c:477 +msgid "Rlogin access is disabled!" +msgstr "" + +#: LYMessages.c:478 +msgid "Ftp access is disabled!" +msgstr "" + +#: LYMessages.c:479 +msgid "There are no references from this document." +msgstr "" + +#: LYMessages.c:480 +msgid "There are only hidden links from this document." +msgstr "" + +#: LYMessages.c:482 +msgid "Unable to open command file." +msgstr "" + +#. VMS +#: LYMessages.c:484 +msgid "News Post Cancelled!!!" +msgstr "" + +#. #define SPAWNING_EDITOR_FOR_NEWS +#: LYMessages.c:486 +msgid "Spawning your selected editor to edit news message" +msgstr "" + +#: LYMessages.c:487 +msgid "Post this message?" +msgstr "" + +#: LYMessages.c:488 +msgid "Append '%s'?" +msgstr "" + +#: LYMessages.c:489 +msgid "Posting to newsgroup(s)..." +msgstr "" + +#: LYMessages.c:491 +msgid "*** You have unread mail. ***" +msgstr "" + +#: LYMessages.c:493 +msgid "*** You have mail. ***" +msgstr "" + +#. VMS +#: LYMessages.c:495 +msgid "*** You have new mail. ***" +msgstr "" + +#: LYMessages.c:496 +msgid "File insert cancelled!!!" +msgstr "" + +#: LYMessages.c:497 +msgid "File does not exist." +msgstr "" + +#: LYMessages.c:498 +msgid "File does not exist - reenter or cancel:" +msgstr "" + +#: LYMessages.c:499 +msgid "File is not readable." +msgstr "" + +#: LYMessages.c:500 +msgid "File is not readable - reenter or cancel:" +msgstr "" + +#: LYMessages.c:501 +msgid "Nothing to insert - file is 0-length." +msgstr "" + +#: LYMessages.c:502 +msgid "Save request cancelled!!!" +msgstr "" + +#: LYMessages.c:503 +msgid "Mail request cancelled!!!" +msgstr "" + +#. #define CONFIRM_MAIL_SOURCE_PREPARSED +#: LYMessages.c:505 +msgid "Viewing preparsed source. Are you sure you want to mail it?" +msgstr "" + +#: LYMessages.c:506 +msgid "Please wait..." +msgstr "" + +#: LYMessages.c:507 +msgid "Mailing file. Please wait..." +msgstr "" + +#: LYMessages.c:508 +msgid "ERROR - Unable to mail file" +msgstr "" + +#. #define CONFIRM_LONG_SCREEN_PRINT +#: LYMessages.c:510 +msgid "File is %d screens long. Are you sure you want to print?" +msgstr "" + +#: LYMessages.c:511 +msgid "Print request cancelled!!!" +msgstr "" + +#: LYMessages.c:512 +msgid "Press to begin: " +msgstr "" + +#: LYMessages.c:513 +msgid "Press to finish: " +msgstr "" + +#. #define CONFIRM_LONG_PAGE_PRINT +#: LYMessages.c:515 +msgid "File is %d pages long. Are you sure you want to print?" +msgstr "" + +#. #define CHECK_PRINTER +#: LYMessages.c:517 +msgid "Be sure your printer is on-line. Press to start printing:" +msgstr "" + +#: LYMessages.c:518 +msgid "ERROR - Unable to allocate file space!!!" +msgstr "" + +#: LYMessages.c:519 +msgid "Unable to open tempfile" +msgstr "" + +#: LYMessages.c:520 +msgid "Unable to open print options file" +msgstr "" + +#: LYMessages.c:521 +msgid "Printing file. Please wait..." +msgstr "" + +#: LYMessages.c:522 +msgid "Please enter a valid internet mail address: " +msgstr "" + +#: LYMessages.c:523 +msgid "ERROR! - printer is misconfigured!" +msgstr "" + +#: LYMessages.c:524 +msgid "Image map from POST response not available!" +msgstr "" + +#: LYMessages.c:525 +msgid "Misdirected client-side image MAP request!" +msgstr "" + +#: LYMessages.c:526 +msgid "Client-side image MAP is not accessible!" +msgstr "" + +#: LYMessages.c:527 +msgid "No client-side image MAPs are available!" +msgstr "" + +#: LYMessages.c:528 +msgid "Client-side image MAP is not available!" +msgstr "" + +#. #define OPTION_SCREEN_NEEDS_24 +#: LYMessages.c:531 +msgid "Screen height must be at least 24 lines for the Options menu!" +msgstr "" + +#. #define OPTION_SCREEN_NEEDS_23 +#: LYMessages.c:533 +msgid "Screen height must be at least 23 lines for the Options menu!" +msgstr "" + +#. #define OPTION_SCREEN_NEEDS_22 +#: LYMessages.c:535 +msgid "Screen height must be at least 22 lines for the Options menu!" +msgstr "" + +#. !NO_OPTION_MENU +#: LYMessages.c:537 +msgid "That key requires Advanced User mode." +msgstr "" + +#: LYMessages.c:538 +msgid "Content-type: %s" +msgstr "" + +#: LYMessages.c:539 +msgid "Command: " +msgstr "" + +#: LYMessages.c:540 +msgid " Version " +msgstr "" + +#: LYMessages.c:541 +msgid " first." +msgstr "" + +#: LYMessages.c:542 +msgid ", guessing..." +msgstr "" + +#: LYMessages.c:543 +msgid "Permissions for " +msgstr "" + +#: LYMessages.c:544 +msgid "Select " +msgstr "" + +#: LYMessages.c:545 +msgid "capital letter" +msgstr "" + +#: LYMessages.c:546 +msgid " of option line," +msgstr "" + +#: LYMessages.c:547 +msgid " to save," +msgstr "" + +#: LYMessages.c:548 +msgid " to " +msgstr "" + +#: LYMessages.c:549 +msgid " or " +msgstr "" + +#: LYMessages.c:550 +msgid " index" +msgstr "" + +#: LYMessages.c:551 +msgid " to return to Lynx." +msgstr "" + +#: LYMessages.c:552 +msgid "Accept Changes" +msgstr "" + +#: LYMessages.c:553 +msgid "Reset Changes" +msgstr "" + +#: LYMessages.c:554 +msgid "Left Arrow cancels changes" +msgstr "" + +#: LYMessages.c:555 +msgid "Save options to disk" +msgstr "" + +#: LYMessages.c:556 +msgid "Hit RETURN to accept entered data." +msgstr "" + +#. #define ACCEPT_DATA_OR_DEFAULT +#: LYMessages.c:558 +msgid "Hit RETURN to accept entered data. Delete data to invoke the default." +msgstr "" + +#: LYMessages.c:559 +msgid "Value accepted!" +msgstr "" + +#. #define VALUE_ACCEPTED_WARNING_X +#: LYMessages.c:561 +msgid "Value accepted! -- WARNING: Lynx is configured for XWINDOWS!" +msgstr "" + +#. #define VALUE_ACCEPTED_WARNING_NONX +#: LYMessages.c:563 +msgid "Value accepted! -- WARNING: Lynx is NOT configured for XWINDOWS!" +msgstr "" + +#: LYMessages.c:564 +msgid "You are not allowed to change which editor to use!" +msgstr "" + +#: LYMessages.c:565 +msgid "Failed to set DISPLAY variable!" +msgstr "" + +#: LYMessages.c:566 +msgid "Failed to clear DISPLAY variable!" +msgstr "" + +#. #define BOOKMARK_CHANGE_DISALLOWED +#: LYMessages.c:568 +msgid "You are not allowed to change the bookmark file!" +msgstr "" + +#: LYMessages.c:569 +msgid "Terminal does not support color" +msgstr "" + +#: LYMessages.c:570 +msgid "Your '%s' terminal does not support color." +msgstr "" + +#: LYMessages.c:571 +msgid "Access to dot files is disabled!" +msgstr "" + +#. #define UA_COPYRIGHT_WARNING +#: LYMessages.c:573 +msgid "WARNING: Misrepresentation of the User-Agent may be a copyright violation!" +msgstr "" + +#. #define CHANGE_OF_SETTING_DISALLOWED +#: LYMessages.c:575 +msgid "You are not allowed to change this setting." +msgstr "" + +#: LYMessages.c:576 +msgid "Saving Options..." +msgstr "" + +#: LYMessages.c:577 +msgid "Options saved!" +msgstr "" + +#: LYMessages.c:578 +msgid "Unable to save Options!" +msgstr "" + +#: LYMessages.c:579 +msgid " 'r' to return to Lynx " +msgstr "" + +#: LYMessages.c:580 +msgid " '>' to save, or 'r' to return to Lynx " +msgstr "" + +#. #define ANY_KEY_CHANGE_RET_ACCEPT +#: LYMessages.c:582 +msgid "Hit any key to change value; RETURN to accept." +msgstr "" + +#: LYMessages.c:583 +msgid "Error uncompressing temporary file!" +msgstr "" + +#: LYMessages.c:584 +msgid "Unsupported URL scheme!" +msgstr "" + +#: LYMessages.c:585 +msgid "Unsupported data: URL! Use SHOWINFO, for now." +msgstr "" + +#: LYMessages.c:586 +msgid "Redirection limit of 10 URL's reached." +msgstr "" + +#: LYMessages.c:587 +msgid "Illegal redirection URL received from server!" +msgstr "" + +#. #define SERVER_ASKED_FOR_REDIRECTION +#: LYMessages.c:589 +msgid "Server asked for %d redirection of POST content to" +msgstr "" + +#: LYMessages.c:590 +msgid "P)roceed, use G)ET or C)ancel " +msgstr "" + +#: LYMessages.c:591 +msgid "P)roceed, or C)ancel " +msgstr "" + +#. #define ADVANCED_POST_GET_REDIRECT +#: LYMessages.c:593 +msgid "Redirection of POST content. P)roceed, see U)RL, use G)ET or C)ancel" +msgstr "" + +#. #define ADVANCED_POST_REDIRECT +#: LYMessages.c:595 +msgid "Redirection of POST content. P)roceed, see U)RL, or C)ancel" +msgstr "" + +#. #define CONFIRM_POST_RESUBMISSION +#: LYMessages.c:597 +msgid "Document from Form with POST content. Resubmit?" +msgstr "" + +#. #define CONFIRM_POST_RESUBMISSION_TO +#: LYMessages.c:599 +msgid "Resubmit POST content to %s ?" +msgstr "" + +#. #define CONFIRM_POST_LIST_RELOAD +#: LYMessages.c:601 +msgid "List from document with POST data. Reload %s ?" +msgstr "" + +#. #define CONFIRM_POST_DOC_HEAD +#: LYMessages.c:603 +msgid "Document from POST action, HEAD may not be understood. Proceed?" +msgstr "" + +#. #define CONFIRM_POST_LINK_HEAD +#: LYMessages.c:605 +msgid "Form submit action is POST, HEAD may not be understood. Proceed?" +msgstr "" + +#: LYMessages.c:606 +msgid "Proceed without a username and password?" +msgstr "" + +#: LYMessages.c:607 +msgid "Proceed (%s)?" +msgstr "" + +#: LYMessages.c:608 +msgid "Cannot POST to this host." +msgstr "" + +#: LYMessages.c:609 +msgid "POST not supported for this URL - ignoring POST data!" +msgstr "" + +#: LYMessages.c:610 +msgid "Discarding POST data..." +msgstr "" + +#: LYMessages.c:611 +msgid "Document will not be reloaded!" +msgstr "" + +#: LYMessages.c:612 +msgid "Location: " +msgstr "" + +#: LYMessages.c:613 +msgid "'%s' not found!" +msgstr "" + +#: LYMessages.c:614 +msgid "Default Bookmark File" +msgstr "" + +#: LYMessages.c:615 +msgid "Screen too small! (8x35 min)" +msgstr "" + +#: LYMessages.c:616 +msgid "Select destination or ^G to Cancel: " +msgstr "" + +#. #define MULTIBOOKMARKS_SELECT +#: LYMessages.c:618 +msgid "Select subbookmark, '=' for menu, or ^G to cancel: " +msgstr "" + +#. #define MULTIBOOKMARKS_SELF +#: LYMessages.c:620 +msgid "Reproduce L)ink in this bookmark file or C)ancel? (l,c): " +msgstr "" + +#: LYMessages.c:621 +msgid "Multiple bookmark support is not available." +msgstr "" + +#: LYMessages.c:622 +msgid " Select Bookmark (screen %d of %d)" +msgstr "" + +#: LYMessages.c:623 +msgid " Select Bookmark" +msgstr "" + +#. #define MULTIBOOKMARKS_EHEAD_MASK +#: LYMessages.c:625 +msgid "Editing Bookmark DESCRIPTION and FILEPATH (%d of 2)" +msgstr "" + +#. #define MULTIBOOKMARKS_EHEAD +#: LYMessages.c:627 +msgid " Editing Bookmark DESCRIPTION and FILEPATH" +msgstr "" + +#: LYMessages.c:628 +msgid "Letter: " +msgstr "" + +#. #define USE_PATH_OFF_HOME +#: LYMessages.c:631 +msgid "Use a filepath off your login directory in SHELL syntax!" +msgstr "" + +#: LYMessages.c:633 +msgid "Use a filepath off your home directory!" +msgstr "" + +#. VMS +#. #define MAXLINKS_REACHED +#: LYMessages.c:636 +msgid "Maximum links per page exceeded! Use half-page or two-line scrolling." +msgstr "" + +#. #define MAXHIST_REACHED +#: LYMessages.c:638 +msgid "History List maximum reached! Document not pushed." +msgstr "" + +#: LYMessages.c:639 +msgid "No previously visited links available!" +msgstr "" + +#: LYMessages.c:640 +msgid "Memory exhausted! Program aborted!" +msgstr "" + +#: LYMessages.c:641 +msgid "Memory exhausted! Aborting..." +msgstr "" + +#: LYMessages.c:642 +msgid "Directory/File Manager not available" +msgstr "" + +#: LYMessages.c:643 +msgid "HREF in BASE tag is not an absolute URL." +msgstr "" + +#: LYMessages.c:644 +msgid "Location URL is not absolute." +msgstr "" + +#: LYMessages.c:645 +msgid "Refresh URL is not absolute." +msgstr "" + +#. #define SENDING_MESSAGE_WITH_BODY_TO +#: LYMessages.c:647 +msgid "" +"You are sending a message with body to:\n" +" " +msgstr "" + +#: LYMessages.c:648 +msgid "" +"You are sending a comment to:\n" +" " +msgstr "" + +#: LYMessages.c:649 +msgid "" +"\n" +" With copy to:\n" +" " +msgstr "" + +#: LYMessages.c:650 +msgid "" +"\n" +" With copies to:\n" +" " +msgstr "" + +#. #define CTRL_G_TO_CANCEL_SEND +#: LYMessages.c:652 +msgid "" +"\n" +"\n" +"Use Ctrl-G to cancel if you do not want to send a message\n" +msgstr "" + +#. #define ENTER_NAME_OR_BLANK +#: LYMessages.c:654 +msgid "" +"\n" +" Please enter your name, or leave it blank to remain anonymous\n" +msgstr "" + +#. #define ENTER_MAIL_ADDRESS_OR_OTHER +#: LYMessages.c:656 +msgid "" +"\n" +" Please enter a mail address or some other\n" +msgstr "" + +#. #define MEANS_TO_CONTACT_FOR_RESPONSE +#: LYMessages.c:658 +msgid " means to contact you, if you desire a response.\n" +msgstr "" + +#: LYMessages.c:659 +msgid "" +"\n" +" Please enter a subject line.\n" +msgstr "" + +#. #define ENTER_ADDRESS_FOR_CC +#: LYMessages.c:661 +msgid "" +"\n" +" Enter a mail address for a CC of your message.\n" +msgstr "" + +#: LYMessages.c:662 +msgid " (Leave blank if you don't want a copy.)\n" +msgstr "" + +#: LYMessages.c:663 +msgid "" +"\n" +" Please review the message body:\n" +"\n" +msgstr "" + +#: LYMessages.c:664 +msgid "" +"\n" +"Press RETURN to continue: " +msgstr "" + +#: LYMessages.c:665 +msgid "" +"\n" +"Press RETURN to clean up: " +msgstr "" + +#: LYMessages.c:666 +msgid " Use Control-U to erase the default.\n" +msgstr "" + +#: LYMessages.c:667 +msgid "" +"\n" +" Please enter your message below." +msgstr "" + +#. #define ENTER_PERIOD_WHEN_DONE_A +#: LYMessages.c:669 src/LYNews.c:331 +msgid "" +"\n" +" When you are done, press enter and put a single period (.)" +msgstr "" + +#. #define ENTER_PERIOD_WHEN_DONE_B +#: LYMessages.c:671 src/LYNews.c:332 +msgid "" +"\n" +" on a line and press enter again." +msgstr "" + +#. #define ADVANCED_COOKIE_CONFIRMATION +#: LYMessages.c:675 +msgid "%s cookie: %.*s=%.*s Allow? (Y/N/Always/neVer)" +msgstr "" + +#. #define INVALID_COOKIE_DOMAIN_CONFIRMATION +#: LYMessages.c:677 +msgid "Accept invalid cookie domain=%s for '%s'?" +msgstr "" + +#. #define INVALID_COOKIE_PATH_CONFIRMATION +#: LYMessages.c:679 +msgid "Accept invalid cookie path=%s as a prefix of '%s'?" +msgstr "" + +#: LYMessages.c:680 +msgid "Allowing this cookie." +msgstr "" + +#: LYMessages.c:681 +msgid "Rejecting this cookie." +msgstr "" + +#: LYMessages.c:682 +msgid "The Cookie Jar is empty." +msgstr "" + +#. #define ACTIVATE_TO_GOBBLE +#: LYMessages.c:684 +msgid "Activate links to gobble up cookies or entire domains," +msgstr "" + +#: LYMessages.c:685 +msgid "or to change a domain's 'allow' setting." +msgstr "" + +#: LYMessages.c:686 +msgid "(Cookies never allowed.)" +msgstr "" + +#: LYMessages.c:687 +msgid "(Cookies always allowed.)" +msgstr "" + +#: LYMessages.c:688 +msgid "(Cookies allowed via prompt.)" +msgstr "" + +#: LYMessages.c:689 +msgid "(Persistent Cookies.)" +msgstr "" + +#: LYMessages.c:690 +msgid "(No title.)" +msgstr "" + +#: LYMessages.c:691 +msgid "(No name.)" +msgstr "" + +#: LYMessages.c:692 +msgid "(No value.)" +msgstr "" + +#: LYMessages.c:693 +msgid "None" +msgstr "" + +#: LYMessages.c:694 +msgid "(End of session.)" +msgstr "" + +#: LYMessages.c:695 +msgid "Delete this cookie?" +msgstr "" + +#: LYMessages.c:696 +msgid "The cookie has been eaten!" +msgstr "" + +#: LYMessages.c:697 +msgid "Delete this empty domain?" +msgstr "" + +#: LYMessages.c:698 +msgid "The domain has been eaten!" +msgstr "" + +#. #define DELETE_COOKIES_SET_ALLOW_OR_CANCEL +#: LYMessages.c:700 +msgid "D)elete domain's cookies, set allow A)lways/P)rompt/neV)er, or C)ancel? " +msgstr "" + +#. #define DELETE_DOMAIN_SET_ALLOW_OR_CANCEL +#: LYMessages.c:702 +msgid "D)elete domain, set allow A)lways/P)rompt/neV)er, or C)ancel? " +msgstr "" + +#: LYMessages.c:703 +msgid "All cookies in the domain have been eaten!" +msgstr "" + +#: LYMessages.c:704 +msgid "'A'lways allowing from domain '%s'." +msgstr "" + +#: LYMessages.c:705 +msgid "ne'V'er allowing from domain '%s'." +msgstr "" + +#: LYMessages.c:706 +msgid "'P'rompting to allow from domain '%s'." +msgstr "" + +#: LYMessages.c:707 +msgid "Delete all cookies in this domain?" +msgstr "" + +#: LYMessages.c:708 +msgid "All of the cookies in the jar have been eaten!" +msgstr "" + +#: LYMessages.c:710 +msgid "Port 19 not permitted in URLs." +msgstr "" + +#: LYMessages.c:711 +msgid "Port 25 not permitted in URLs." +msgstr "" + +#: LYMessages.c:712 +msgid "Port %lu not permitted in URLs." +msgstr "" + +#: LYMessages.c:713 +msgid "URL has a bad port field." +msgstr "" + +#: LYMessages.c:714 +msgid "Maximum nesting of HTML elements exceeded." +msgstr "" + +#: LYMessages.c:715 +msgid "Bad partial reference! Stripping lead dots." +msgstr "" + +#: LYMessages.c:716 +msgid "Trace Log open failed. Trace off!." +msgstr "" + +#: LYMessages.c:717 +msgid "Lynx Trace Log" +msgstr "" + +#: LYMessages.c:718 +msgid "No trace log has been started for this session." +msgstr "" + +#. #define MAX_TEMPCOUNT_REACHED +#: LYMessages.c:720 +msgid "The maximum temporary file count has been reached!" +msgstr "" + +#. #define FORM_VALUE_TOO_LONG +#: LYMessages.c:722 +msgid "Form field value exceeds buffer length! Trim the tail." +msgstr "" + +#. #define FORM_TAIL_COMBINED_WITH_HEAD +#: LYMessages.c:724 +msgid "Modified tail combined with head of form field value." +msgstr "" + +#. HTFile.c +#: LYMessages.c:727 +msgid "Directory" +msgstr "" + +#: LYMessages.c:728 +msgid "Directory browsing is not allowed." +msgstr "" + +#: LYMessages.c:729 +msgid "Selective access is not enabled for this directory" +msgstr "" + +#: LYMessages.c:730 +msgid "Multiformat: directory scan failed." +msgstr "" + +#: LYMessages.c:731 +msgid "This directory is not readable." +msgstr "" + +#: LYMessages.c:732 +msgid "Can't access requested file." +msgstr "" + +#: LYMessages.c:733 +msgid "Could not find suitable representation for transmission." +msgstr "" + +#: LYMessages.c:734 +msgid "Could not open file for decompression!" +msgstr "" + +#: LYMessages.c:735 +msgid "Files:" +msgstr "" + +#: LYMessages.c:736 +msgid "Subdirectories:" +msgstr "" + +#: LYMessages.c:737 +msgid " directory" +msgstr "" + +#: LYMessages.c:738 +msgid "Up to " +msgstr "" + +#: LYMessages.c:739 +msgid "Current directory is " +msgstr "" + +#. HTGopher.c +#: LYMessages.c:742 +msgid "No response from server!" +msgstr "" + +#: LYMessages.c:743 +msgid "CSO index" +msgstr "" + +#: LYMessages.c:744 +msgid "" +"\n" +"This is a searchable index of a CSO database.\n" +msgstr "" + +#: LYMessages.c:745 +msgid "CSO Search Results" +msgstr "" + +#: LYMessages.c:746 +msgid "Seek fail on %s\n" +msgstr "" + +#: LYMessages.c:747 +msgid "" +"\n" +"Press the 's' key and enter search keywords.\n" +msgstr "" + +#: LYMessages.c:748 +msgid "" +"\n" +"This is a searchable Gopher index.\n" +msgstr "" + +#: LYMessages.c:749 +msgid "Gopher index" +msgstr "" + +#: LYMessages.c:750 +msgid "Gopher Menu" +msgstr "" + +#: LYMessages.c:751 +msgid " Search Results" +msgstr "" + +#: LYMessages.c:752 +msgid "Sending CSO/PH request." +msgstr "" + +#: LYMessages.c:753 +msgid "Sending Gopher request." +msgstr "" + +#: LYMessages.c:754 +msgid "CSO/PH request sent; waiting for response." +msgstr "" + +#: LYMessages.c:755 +msgid "Gopher request sent; waiting for response." +msgstr "" + +#: LYMessages.c:756 +msgid "" +"\n" +"Please enter search keywords.\n" +msgstr "" + +#: LYMessages.c:757 +msgid "" +"\n" +"The keywords that you enter will allow you to search on a" +msgstr "" + +#: LYMessages.c:758 +msgid " person's name in the database.\n" +msgstr "" + +#: LYMessages.c:761 +msgid "Connection closed ???" +msgstr "" + +#: LYMessages.c:762 +msgid "Cannot open temporary file for news POST." +msgstr "" + +#: LYMessages.c:763 +msgid "This client does not contain support for posting to news with SSL." +msgstr "" + +#. HTStyle.c +#: LYMessages.c:766 +msgid "Style %d `%s' SGML:%s. Font %s %.1f point.\n" +msgstr "" + +#: LYMessages.c:767 +msgid "\tIndents: first=%.0f others=%.0f, Height=%.1f Desc=%.1f\n" +msgstr "" + +#: LYMessages.c:768 +msgid "\tAlign=%d, %d tabs. (%.0f before, %.0f after)\n" +msgstr "" + +#: LYMessages.c:769 +msgid "\t\tTab kind=%d at %.0f\n" +msgstr "" + +#. HTTP.c +#: LYMessages.c:772 +msgid "Can't proceed without a username and password." +msgstr "" + +#: LYMessages.c:773 +msgid "Can't retry with authorization! Contact the server's WebMaster." +msgstr "" + +#: LYMessages.c:774 +msgid "Can't retry with proxy authorization! Contact the server's WebMaster." +msgstr "" + +#: LYMessages.c:775 +msgid "Retrying with proxy authorization information." +msgstr "" + +#. HTWAIS.c +#: LYMessages.c:778 +msgid "HTWAIS: Return message too large." +msgstr "" + +#: LYMessages.c:779 +msgid "Enter WAIS query: " +msgstr "" + +#. Miscellaneous status +#: LYMessages.c:782 +msgid "Retrying as HTTP0 request." +msgstr "" + +#: LYMessages.c:783 +msgid "Transferred %d bytes" +msgstr "" + +#: LYMessages.c:784 +msgid "Data transfer complete" +msgstr "" + +#: LYMessages.c:785 +msgid "Error processing line %d of %s\n" +msgstr "" + +#. Lynx internal page titles +#: LYMessages.c:788 +msgid "Address List Page" +msgstr "" + +#: LYMessages.c:789 +msgid "Bookmark file" +msgstr "" + +#: LYMessages.c:790 +msgid "Configuration Definitions" +msgstr "" + +#: LYMessages.c:791 +msgid "Cookie Jar" +msgstr "" + +#: LYMessages.c:792 +msgid "Current Key Map" +msgstr "" + +#: LYMessages.c:793 +msgid "File Management Options" +msgstr "" + +#: LYMessages.c:794 +msgid "Download Options" +msgstr "" + +#: LYMessages.c:795 +msgid "History Page" +msgstr "" + +#: LYMessages.c:796 +msgid "List Page" +msgstr "" + +#: LYMessages.c:797 +msgid "Lynx.cfg Information" +msgstr "" + +#: LYMessages.c:798 +msgid "Converted Mosaic Hotlist" +msgstr "" + +#: LYMessages.c:799 +msgid "Options Menu" +msgstr "" + +#: LYMessages.c:800 +msgid "File Permission Options" +msgstr "" + +#: LYMessages.c:801 +msgid "Printing Options" +msgstr "" + +#: LYMessages.c:802 +msgid "Information about the current document" +msgstr "" + +#: LYMessages.c:803 +msgid "Your recent statusline messages" +msgstr "" + +#: LYMessages.c:804 +msgid "Upload Options" +msgstr "" + +#: LYMessages.c:805 +msgid "Visited Links Page" +msgstr "" + +#. CONFIG_DEF_TITLE subtitles +#: LYMessages.c:808 +msgid "See also" +msgstr "" + +#: LYMessages.c:809 +msgid "your" +msgstr "" + +#: LYMessages.c:810 +msgid "for runtime options" +msgstr "" + +#: LYMessages.c:811 +msgid "compile time options" +msgstr "" + +#: LYMessages.c:812 +msgid "latest release" +msgstr "" + +#: LYMessages.c:813 +msgid "development version" +msgstr "" + +#. #define AUTOCONF_CONFIG_CACHE +#: LYMessages.c:815 +msgid "" +"The following data were derived during the automatic configuration/build\n" +"process of this copy of Lynx. When reporting a bug, please include a copy\n" +"of this page." +msgstr "" + +#. #define AUTOCONF_LYNXCFG_H +#: LYMessages.c:819 +msgid "" +"The following data were used as automatically-configured compile-time\n" +"definitions when this copy of Lynx was built." +msgstr "" + +#. #define DIRED_NOVICELINE +#: LYMessages.c:824 +msgid " C)reate D)ownload E)dit F)ull menu M)odify R)emove T)ag U)pload \n" +msgstr "" + +#: LYMessages.c:825 +msgid "Failed to obtain status of current link!" +msgstr "" + +#. #define INVALID_PERMIT_URL +#: LYMessages.c:828 +msgid "Special URL only valid from current File Permission menu!" +msgstr "" + +#: LYMessages.c:832 +msgid "External support is currently disabled." +msgstr "" + +#: WWW/Library/Implementation/HTAABrow.c:647 +msgid "Username for '%s' at %s '%s%s':" +msgstr "" + +#: WWW/Library/Implementation/HTAABrow.c:914 +msgid "This client doesn't know how to compose proxy authorization information for scheme" +msgstr "" + +#: WWW/Library/Implementation/HTAABrow.c:989 +msgid "This client doesn't know how to compose authorization information for scheme" +msgstr "" + +#: WWW/Library/Implementation/HTAABrow.c:1097 +msgid "Invalid header '%s%s%s%s%s'" +msgstr "" + +#: WWW/Library/Implementation/HTAABrow.c:1201 +msgid "Proxy authorization required -- retrying" +msgstr "" + +#: WWW/Library/Implementation/HTAABrow.c:1260 +msgid "Access without authorization denied -- retrying" +msgstr "" + +#: WWW/Library/Implementation/HTAccess.c:644 +msgid "Access forbidden by rule" +msgstr "" + +#: WWW/Library/Implementation/HTAccess.c:741 +msgid "Document with POST content not found in cache. Resubmit?" +msgstr "" + +#: WWW/Library/Implementation/HTAccess.c:975 +msgid "Loading incomplete." +msgstr "" + +#: WWW/Library/Implementation/HTAccess.c:1005 +msgid "**** HTAccess: socket or file number returned by obsolete load routine!\n" +msgstr "" + +#: WWW/Library/Implementation/HTAccess.c:1007 +msgid "**** HTAccess: Internal software error. Please mail lynx_dev@sig.net!\n" +msgstr "" + +#: WWW/Library/Implementation/HTAccess.c:1008 +msgid "**** HTAccess: Status returned was: %d\n" +msgstr "" + +#: WWW/Library/Implementation/HTAccess.c:1014 src/LYMainLoop.c:6233 +msgid "Can't Access" +msgstr "" + +#: WWW/Library/Implementation/HTAccess.c:1022 +msgid "Unable to access document." +msgstr "" + +#: WWW/Library/Implementation/HTFTP.c:707 +msgid "Enter password for user %s@%s:" +msgstr "" + +#: WWW/Library/Implementation/HTFTP.c:735 +msgid "Unable to connect to FTP host." +msgstr "" + +#: WWW/Library/Implementation/HTFTP.c:994 +msgid "close master socket" +msgstr "" + +#: WWW/Library/Implementation/HTFTP.c:1034 +msgid "socket for master socket" +msgstr "" + +#. +#. ** It's a symbolic link, does the user care about +#. ** knowing if it is symbolic? I think so since +#. ** it might be a directory. +#. +#: WWW/Library/Implementation/HTFTP.c:1963 +msgid "Symbolic Link" +msgstr "" + +#: WWW/Library/Implementation/HTFTP.c:2316 +msgid "Receiving FTP directory." +msgstr "" + +#: WWW/Library/Implementation/HTFTP.c:2664 +msgid "connect for data" +msgstr "" + +#: WWW/Library/Implementation/HTFTP.c:3243 +msgid "Receiving FTP file." +msgstr "" + +#: WWW/Library/Implementation/HTFile.c:1562 +msgid "Reading directory..." +msgstr "" + +#: WWW/Library/Implementation/HTFile.c:1644 +msgid "OK" +msgstr "" + +#: WWW/Library/Implementation/HTFinger.c:275 +msgid "Could not set up finger connection." +msgstr "" + +#: WWW/Library/Implementation/HTFinger.c:320 +msgid "Could not load data (no sitename in finger URL)" +msgstr "" + +#: WWW/Library/Implementation/HTFinger.c:328 +msgid "Invalid port number - will only use port 79!" +msgstr "" + +#: WWW/Library/Implementation/HTFinger.c:396 +msgid "Could not access finger host." +msgstr "" + +#: WWW/Library/Implementation/HTFinger.c:407 +msgid "No response from finger server." +msgstr "" + +#. finger is disabled +#: WWW/Library/Implementation/HTGopher.c:1727 +msgid "Unable to access document!" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:364 +msgid "Username for news host '%s':" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:417 +msgid "Change username?" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:421 +msgid "Username:" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:448 +msgid "Password for news host '%s':" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:531 +msgid "Change password?" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1634 +msgid "No matches for: %s" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1685 +msgid "" +"\n" +"No articles in this group.\n" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1698 +msgid "" +"\n" +"No articles in this range.\n" +msgstr "" + +#. +#. ** Set window title. +#. +#: WWW/Library/Implementation/HTNews.c:1711 +msgid "%s, Articles %d-%d" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1732 +msgid "Earlier articles" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1745 +msgid "" +"\n" +"There are about %d articles currently available in %s, IDs as follows:\n" +"\n" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:1804 +msgid "All available articles in " +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2015 +msgid "Later articles" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2039 +msgid "Post to " +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2216 +msgid "This client does not contain support for SNEWS URLs." +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2397 +msgid "No target for raw text!" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2427 +msgid "Connecting to NewsHost ..." +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2461 +msgid "Could not access %s." +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2508 +msgid "Can't read news info. News host %.20s responded: %.200s" +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2704 +msgid "Reading list of available newsgroups." +msgstr "" + +#: WWW/Library/Implementation/HTNews.c:2726 +msgid "Reading list of articles in newsgroup." +msgstr "" + +#. +#. ** Get an article from a news group. - FM +#. +#: WWW/Library/Implementation/HTNews.c:2732 +msgid "Reading news article." +msgstr "" + +#: WWW/Library/Implementation/HTTCP.c:1201 +msgid "Address length looks invalid" +msgstr "" + +#: WWW/Library/Implementation/HTTCP.c:1354 +msgid "Looking up %s." +msgstr "" + +#: WWW/Library/Implementation/HTTCP.c:1364 WWW/Library/Implementation/HTTelnet.c:99 +msgid "Invalid hostname %s" +msgstr "" + +#: WWW/Library/Implementation/HTTCP.c:1367 +msgid "Unable to locate remote host %s." +msgstr "" + +#: WWW/Library/Implementation/HTTCP.c:1377 +msgid "Making %s connection to %s." +msgstr "" + +#: WWW/Library/Implementation/HTTCP.c:1387 +msgid "socket failed." +msgstr "" + +#. USE_FCNTL +#: WWW/Library/Implementation/HTTCP.c:1406 +msgid "Could not make connection non-blocking." +msgstr "" + +#: WWW/Library/Implementation/HTTCP.c:1460 +msgid "Connection failed for 180,000 tries." +msgstr "" + +#. USE_FCNTL +#: WWW/Library/Implementation/HTTCP.c:1594 +msgid "Could not restore socket to blocking." +msgstr "" + +#: WWW/Library/Implementation/HTTCP.c:1648 +msgid "Socket read failed for 180,000 tries." +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:166 +msgid "This client does not contain support for HTTPS URLs." +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:183 +msgid "Unable to connect to remote host." +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:603 +msgid "Sending HTTP request." +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:636 +msgid "Unexpected network write error; connection aborted." +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:642 +msgid "HTTP request sent; waiting for response." +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:704 +msgid "Unexpected network read error; connection aborted." +msgstr "" + +#. +#. ** HTTP/1.1 Informational statuses. +#. ** 100 Continue. +#. ** 101 Switching Protocols. +#. ** > 101 is unknown. +#. ** We should never get these, and they have only +#. ** the status line and possibly other headers, +#. ** so we'll deal with them by showing the full +#. ** header to the user as text/plain. - FM +#. +#: WWW/Library/Implementation/HTTP.c:898 +msgid "Got unexpected Informational Status." +msgstr "" + +#. +#. * Reset Content. The server has fulfilled the +#. * request but nothing is returned and we should +#. * reset any form content. We'll instruct the +#. * user to do that, and restore the current +#. * document. - FM +#. +#: WWW/Library/Implementation/HTTP.c:932 +msgid "Request fulfilled. Reset Content." +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:1022 +msgid "Got unexpected 304 Not Modified status." +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:1091 +msgid "Redirection of POST content requires user approval." +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:1134 +msgid "Have POST content. Treating Permanent Redirection as Temporary.\n" +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:1358 +msgid "Got redirection with a bad Location header." +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:1457 +msgid "Got redirection with no Location header." +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:1512 +msgid "Retrying with access authorization information." +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:1517 +msgid "Show the 401 message body?" +msgstr "" + +#: WWW/Library/Implementation/HTTP.c:1562 +msgid "Show the 407 message body?" +msgstr "" + +#. +#. ** Bad or unknown server_status number. +#. ** Take a chance and hope there is +#. ** something to display. - FM +#. +#: WWW/Library/Implementation/HTTP.c:1667 +msgid "Unknown status reply from server!" +msgstr "" + +#: WWW/Library/Implementation/HTTelnet.c:97 +msgid "remote %s session:" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:164 +msgid "Could not connect to WAIS server." +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:173 +msgid "Could not open WAIS connection for reading." +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:197 +msgid "Diagnostic code is " +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:469 +msgid "Index " +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:473 +msgid " contains the following %d item%s relevant to \"" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:481 +msgid "The first figure after each entry is its relative score, " +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:482 +msgid "the second is the number of lines in the item." +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:523 +msgid " (bad file name)" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:545 +msgid "(bad doc id)" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:561 +msgid "(Short Header record, can't display)" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:568 +msgid "" +"\n" +"Long Header record, can't display\n" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:575 +msgid "" +"\n" +"Text record\n" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:584 +msgid "" +"\n" +"Headline record, can't display\n" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:592 +msgid "" +"\n" +"Code record, can't display\n" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:696 +msgid "Syntax error in WAIS URL" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:768 +msgid " (WAIS Index)" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:775 +msgid "WAIS Index: " +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:781 +msgid "This is a link for searching the " +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:785 +msgid " WAIS Index.\n" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:811 +msgid "" +"\n" +"Enter the 's'earch command and then specify search words.\n" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:832 +msgid " (in " +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:841 +msgid "WAIS Search of \"" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:845 +msgid "\" in: " +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:860 +msgid "HTWAIS: Request too large." +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:869 +msgid "Searching WAIS database..." +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:879 +msgid "Search interrupted." +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:929 +msgid "Can't convert format of WAIS document" +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:973 +msgid "HTWAIS: Request too long." +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:987 +msgid "Fetching WAIS document..." +msgstr "" + +#: WWW/Library/Implementation/HTWAIS.c:1026 +msgid "No text was returned!\n" +msgstr "" + +#: WWW/Library/Implementation/HTWSRC.c:285 +msgid " NOT GIVEN in source file; " +msgstr "" + +#: WWW/Library/Implementation/HTWSRC.c:309 +msgid " WAIS source file" +msgstr "" + +#: WWW/Library/Implementation/HTWSRC.c:316 +msgid " description" +msgstr "" + +#: WWW/Library/Implementation/HTWSRC.c:326 +msgid "Access links" +msgstr "" + +#: WWW/Library/Implementation/HTWSRC.c:343 +msgid "Direct access" +msgstr "" + +#: WWW/Library/Implementation/HTWSRC.c:346 +msgid " (or via proxy server, if defined)" +msgstr "" + +#: WWW/Library/Implementation/HTWSRC.c:360 +msgid "Maintainer" +msgstr "" + +#: WWW/Library/Implementation/HTWSRC.c:368 +msgid "Host" +msgstr "" + +#: src/GridText.c:385 +msgid "Memory exhausted, display interrupted!" +msgstr "" + +#: src/GridText.c:390 +msgid "Memory exhausted, will interrupt transfer!" +msgstr "" + +#: src/GridText.c:2523 +msgid " *** MEMORY EXHAUSTED ***" +msgstr "" + +#: src/GridText.c:4005 src/GridText.c:4012 src/LYList.c:260 +msgid "unknown field or link" +msgstr "" + +#: src/GridText.c:4021 +msgid "text entry field" +msgstr "" + +#: src/GridText.c:4024 +msgid "password entry field" +msgstr "" + +#: src/GridText.c:4027 +msgid "checkbox" +msgstr "" + +#: src/GridText.c:4030 +msgid "radio button" +msgstr "" + +#: src/GridText.c:4033 +msgid "submit button" +msgstr "" + +#: src/GridText.c:4036 +msgid "reset button" +msgstr "" + +#: src/GridText.c:4039 +msgid "popup menu" +msgstr "" + +#: src/GridText.c:4042 +msgid "hidden form field" +msgstr "" + +#: src/GridText.c:4045 +msgid "text entry area" +msgstr "" + +#: src/GridText.c:4048 +msgid "range entry field" +msgstr "" + +#: src/GridText.c:4051 +msgid "file entry field" +msgstr "" + +#: src/GridText.c:4054 +msgid "text-submit field" +msgstr "" + +#: src/GridText.c:4057 +msgid "image-submit button" +msgstr "" + +#: src/GridText.c:4060 +msgid "keygen field" +msgstr "" + +#: src/GridText.c:4063 +msgid "unknown form field" +msgstr "" + +#: src/GridText.c:8810 +msgid "Submitting %s" +msgstr "" + +#: src/HTAlert.c:158 src/LYShowInfo.c:291 +msgid "bytes" +msgstr "" + +#: src/HTAlert.c:162 +msgid "KB" +msgstr "" + +#: src/HTAlert.c:169 +msgid "Read %ld of %ld %s of data" +msgstr "" + +#: src/HTAlert.c:171 +msgid "Read %ld %s of data" +msgstr "" + +#: src/HTAlert.c:174 +msgid ", %ld %s/sec." +msgstr "" + +#: src/HTAlert.c:179 +msgid " (Press 'z' to abort)" +msgstr "" + +#: src/HTAlert.c:208 +msgid "yes" +msgstr "" + +#: src/HTAlert.c:209 +msgid "no" +msgstr "" + +#: src/HTML.c:5828 +msgid "Description:" +msgstr "" + +#: src/HTML.c:5833 +msgid "(none)" +msgstr "" + +#: src/HTML.c:5837 +msgid "Filepath:" +msgstr "" + +#: src/HTML.c:5842 +msgid "(unknown)" +msgstr "" + +#: src/HTML.c:7127 +msgid "Document has only hidden links. Use the 'l'ist command." +msgstr "" + +#: src/LYBookmark.c:154 +msgid "" +" This file is an HTML representation of the X Mosaic hotlist file.\n" +" Outdated or invalid links may be removed by using the\n" +" remove bookmark command, it is usually the 'R' key but may have\n" +" been remapped by you or your system administrator." +msgstr "" + +#: src/LYBookmark.c:340 +msgid "" +" You can delete links using the remove bookmark command. It is usually\n" +" the 'R' key but may have been remapped by you or your system\n" +" administrator." +msgstr "" + +#: src/LYBookmark.c:344 +msgid "" +" This file also may be edited with a standard text editor to delete\n" +" outdated or invalid links, or to change their order." +msgstr "" + +#: src/LYBookmark.c:347 +msgid "" +"Note: if you edit this file manually\n" +" you should not change the format within the lines\n" +" or add other HTML markup.\n" +" Make sure any bookmark link is saved as a single line." +msgstr "" + +#. +#. * Neither the path as given nor any components examined by +#. * backing up were stat()able. - kw +#. +#: src/LYCgi.c:237 +msgid "Unable to access cgi script" +msgstr "" + +#: src/LYCgi.c:650 src/LYCgi.c:653 +msgid "Good Advice" +msgstr "" + +#: src/LYCgi.c:656 +msgid "An excellent http server for VMS is available via" +msgstr "" + +#: src/LYCgi.c:663 +msgid "this link" +msgstr "" + +#: src/LYCgi.c:667 +msgid "It provides state of the art CGI script support.\n" +msgstr "" + +#: src/LYClean.c:108 +msgid "Exiting via interrupt:" +msgstr "" + +#: src/LYCookie.c:2145 +msgid "(From Cookie Jar)" +msgstr "" + +#: src/LYCookie.c:2568 +msgid "(from a previous session)" +msgstr "" + +#. +#. * Show the Maximum Gobble Date. - FM +#. +#: src/LYCookie.c:2628 +msgid "Maximum Gobble Date:" +msgstr "" + +#: src/LYCurses.c:787 +msgid "Terminal initialisation failed - unknown terminal type?" +msgstr "" + +#: src/LYCurses.c:1030 +msgid "Terminal =" +msgstr "" + +#: src/LYCurses.c:1035 +msgid "You must use a vt100, 200, etc. terminal with this program." +msgstr "" + +#: src/LYCurses.c:1113 +msgid "Your Terminal type is unknown!" +msgstr "" + +#: src/LYCurses.c:1114 +msgid "Enter a terminal type:" +msgstr "" + +#: src/LYCurses.c:1127 +msgid "TERMINAL TYPE IS SET TO" +msgstr "" + +#: src/LYCurses.c:1370 +msgid "" +"\n" +"A Fatal error has occurred in %s Ver. %s\n" +msgstr "" + +#: src/LYCurses.c:1372 +msgid "" +"\n" +"Please notify your system administrator to confirm a bug, and if\n" +"confirmed, to notify the lynx-dev list. Bug reports should have concise\n" +"descriptions of the command and/or URL which causes the problem, the\n" +"operating system name with version number, the TCPIP implementation, the\n" +"TRACEBACK if it can be captured, and any other relevant information.\n" +msgstr "" + +#: src/LYDownload.c:503 +msgid "Downloaded link:" +msgstr "" + +#: src/LYDownload.c:508 +msgid "Suggested file name:" +msgstr "" + +#: src/LYDownload.c:513 +msgid "Standard download options:" +msgstr "" + +#: src/LYDownload.c:514 +msgid "Download options:" +msgstr "" + +#: src/LYDownload.c:528 +msgid "Save to disk" +msgstr "" + +#: src/LYDownload.c:530 +msgid "Save to disk disabled." +msgstr "" + +#: src/LYDownload.c:534 src/LYPrint.c:1303 +msgid "Local additions:" +msgstr "" + +#: src/LYDownload.c:543 src/LYUpload.c:226 +msgid "No Name Given" +msgstr "" + +#: src/LYHistory.c:405 +msgid "You selected:" +msgstr "" + +#: src/LYHistory.c:429 src/LYHistory.c:597 +msgid "(no address)" +msgstr "" + +#: src/LYHistory.c:433 +msgid " (internal)" +msgstr "" + +#: src/LYHistory.c:435 +msgid " (was internal)" +msgstr "" + +#: src/LYHistory.c:524 +msgid " (From History)" +msgstr "" + +#: src/LYHistory.c:561 +msgid "You visited (POSTs, bookmark, menu and list files excluded):" +msgstr "" + +#: src/LYLeaks.c:78 +msgid "Invalid pointer detected." +msgstr "" + +#: src/LYLeaks.c:80 src/LYLeaks.c:117 +msgid "Pointer:" +msgstr "" + +#: src/LYLeaks.c:91 src/LYLeaks.c:98 src/LYLeaks.c:137 +msgid "FileName:" +msgstr "" + +#: src/LYLeaks.c:94 src/LYLeaks.c:101 src/LYLeaks.c:140 src/LYLeaks.c:151 +msgid "LineCount:" +msgstr "" + +#: src/LYLeaks.c:115 +msgid "Memory leak detected." +msgstr "" + +#: src/LYLeaks.c:120 +msgid "Contains:" +msgstr "" + +#: src/LYLeaks.c:134 +msgid "ByteSize:" +msgstr "" + +#: src/LYLeaks.c:148 +msgid "realloced:" +msgstr "" + +#: src/LYLeaks.c:169 +msgid "Total memory leakage this run:" +msgstr "" + +#: src/LYList.c:93 +msgid "References in " +msgstr "" + +#: src/LYList.c:94 +msgid "this document:" +msgstr "" + +#: src/LYList.c:100 +msgid "Visible links:" +msgstr "" + +#: src/LYList.c:201 src/LYList.c:321 +msgid "Hidden links:" +msgstr "" + +#: src/LYList.c:269 +msgid "References" +msgstr "" + +#: src/LYList.c:271 +msgid "Visible links" +msgstr "" + +#: src/LYLocal.c:242 +msgid "Unable to get status of '%s'." +msgstr "" + +#: src/LYLocal.c:274 +msgid "The selected item is not a file or a directory! Request ignored." +msgstr "" + +#: src/LYLocal.c:301 +msgid "move %s to %s" +msgstr "" + +#: src/LYLocal.c:322 +msgid "There is already a directory with that name! Request ignored." +msgstr "" + +#: src/LYLocal.c:324 +msgid "There is already a file with that name! Request ignored." +msgstr "" + +#: src/LYLocal.c:326 +msgid "The specified name is already in use! Request ignored." +msgstr "" + +#: src/LYLocal.c:337 +msgid "Destination has different owner! Request denied." +msgstr "" + +#: src/LYLocal.c:340 +msgid "Destination is not a valid directory! Request denied." +msgstr "" + +#: src/LYLocal.c:363 +msgid "Remove all tagged files and directories " +msgstr "" + +#: src/LYLocal.c:384 +msgid "remove %s" +msgstr "" + +#: src/LYLocal.c:426 +msgid "Enter new location for tagged items: " +msgstr "" + +#: src/LYLocal.c:488 +msgid "Path too long" +msgstr "" + +#: src/LYLocal.c:519 +msgid "Source and destination are the same location - request ignored!" +msgstr "" + +#. +#. * Change the name of the file or directory. +#. +#: src/LYLocal.c:579 +msgid "Enter new name for directory: " +msgstr "" + +#: src/LYLocal.c:581 +msgid "Enter new name for file: " +msgstr "" + +#: src/LYLocal.c:592 src/LYUpload.c:106 +msgid "Illegal character \"/\" found! Request ignored." +msgstr "" + +#: src/LYLocal.c:639 +msgid "Enter new location for directory: " +msgstr "" + +#: src/LYLocal.c:641 +msgid "Enter new location for file: " +msgstr "" + +#: src/LYLocal.c:665 +msgid "Unexpected failure - unable to find trailing \"/\"" +msgstr "" + +#: src/LYLocal.c:686 +msgid "Source and destination are the same location! Request ignored!" +msgstr "" + +#: src/LYLocal.c:733 +msgid "Modify name, location, or permission (n, l, or p): " +msgstr "" + +#: src/LYLocal.c:735 +msgid "Modify name, or location (n or l): " +msgstr "" + +#. +#. * Code for changing ownership needed here. +#. +#: src/LYLocal.c:761 +msgid "This feature not yet implemented!" +msgstr "" + +#: src/LYLocal.c:779 +msgid "Enter name of file to create: " +msgstr "" + +#: src/LYLocal.c:789 src/LYLocal.c:837 +msgid "Illegal redirection \"//\" found! Request ignored." +msgstr "" + +#: src/LYLocal.c:804 +msgid "create %s" +msgstr "" + +#: src/LYLocal.c:827 +msgid "Enter name for new directory: " +msgstr "" + +#: src/LYLocal.c:870 +msgid "Create file or directory (f or d): " +msgstr "" + +#: src/LYLocal.c:916 +msgid "Remove '%s' and all of its contents: " +msgstr "" + +#: src/LYLocal.c:919 +msgid "Remove directory and all of its contents: " +msgstr "" + +#: src/LYLocal.c:923 +msgid "Remove file '%s': " +msgstr "" + +#: src/LYLocal.c:925 +msgid "Remove file: " +msgstr "" + +#: src/LYLocal.c:930 +msgid "Remove symbolic link '%s': " +msgstr "" + +#: src/LYLocal.c:932 +msgid "Remove symbolic link: " +msgstr "" + +#: src/LYLocal.c:1024 +msgid "Sorry, don't know how to permit non-UNIX files yet." +msgstr "" + +#: src/LYLocal.c:1057 +msgid "Unable to open permit options file" +msgstr "" + +#: src/LYLocal.c:1084 +msgid "Specify permissions below:" +msgstr "" + +#: src/LYLocal.c:1085 src/LYShowInfo.c:173 +msgid "Owner:" +msgstr "" + +#: src/LYLocal.c:1101 +msgid "Group" +msgstr "" + +#: src/LYLocal.c:1117 +msgid "Others:" +msgstr "" + +#: src/LYLocal.c:1135 +msgid "form to permit" +msgstr "" + +#: src/LYLocal.c:1233 +msgid "Invalid mode format." +msgstr "" + +#: src/LYLocal.c:1237 +msgid "Invalid syntax format." +msgstr "" + +#: src/LYLocal.c:1356 +msgid "NULL URL pointer" +msgstr "" + +#: src/LYLocal.c:1441 +msgid "Warning! UUDecoded file will exist in the directory you started Lynx." +msgstr "" + +#: src/LYLocal.c:1553 +msgid "Executing %s " +msgstr "" + +#: src/LYLocal.c:1556 +msgid "Executing system command. This might take a while." +msgstr "" + +#: src/LYLocal.c:1601 +msgid "Unable to open file management menu file." +msgstr "" + +#: src/LYLocal.c:1635 +msgid "Current directory:" +msgstr "" + +#: src/LYLocal.c:1638 src/LYLocal.c:1656 +msgid "Current selection:" +msgstr "" + +#: src/LYLocal.c:1642 +msgid "Nothing currently selected." +msgstr "" + +#: src/LYLocal.c:1657 +msgid "tagged item:" +msgstr "" + +#: src/LYLocal.c:1657 +msgid "tagged items:" +msgstr "" + +#: src/LYLocal.c:1754 src/LYLocal.c:1765 +msgid "Illegal filename; request ignored." +msgstr "" + +#: src/LYLocal.c:1806 +msgid "The selected item is not a directory! Request ignored." +msgstr "" + +#: src/LYLocal.c:1809 +msgid "Install in the selected directory not permitted." +msgstr "" + +#: src/LYLocal.c:1813 +msgid "Just a moment, ..." +msgstr "" + +#: src/LYLocal.c:1843 +msgid "Installation complete" +msgstr "" + +#: src/LYLocal.c:2013 +msgid "Temporary URL or list would be too long." +msgstr "" + +#: src/LYLocal.c:2055 +msgid "Unable to %s due to system error!" +msgstr "" + +#. !HAVE_WAITPID +#. error return +#: src/LYLocal.c:2084 +msgid "Probable failure to %s due to system error!" +msgstr "" + +#. VMS +#: src/LYMail.c:736 +msgid "The link %s :?: %s \n" +msgstr "" + +#: src/LYMail.c:738 +msgid "called \"%s\"\n" +msgstr "" + +#: src/LYMail.c:739 +msgid "in the file \"%s\" called \"%s\"\n" +msgstr "" + +#: src/LYMail.c:740 +msgid "was requested but was not available." +msgstr "" + +#: src/LYMail.c:741 +msgid "Thought you might want to know." +msgstr "" + +#: src/LYMail.c:743 +msgid "This message was automatically generated by" +msgstr "" + +#: src/LYMail.c:744 +msgid "Lynx ver. %s" +msgstr "" + +#: src/LYMail.c:1345 +msgid "Personal_name: " +msgstr "" + +#: src/LYMail.c:1347 +msgid "X_Personal_name: " +msgstr "" + +#: src/LYMail.c:1350 +msgid "Personal Name: " +msgstr "" + +#: src/LYMain.c:679 +msgid "No Winsock found, sorry." +msgstr "" + +#: src/LYMain.c:834 +msgid "You MUST define a valid TMP or TEMP area!\n" +msgstr "" + +#: src/LYMain.c:1229 +msgid "" +"\n" +"Configuration file %s is not available.\n" +"\n" +msgstr "" + +#. +#. * Make sure we have the character sets declared. +#. * This will initialize the CHARTRANS handling. - KW +#. +#: src/LYMain.c:1245 +msgid "" +"\n" +"Lynx character sets not declared.\n" +"\n" +msgstr "" + +#: src/LYMain.c:1269 +msgid "" +"\n" +"Lynx edit map not declared.\n" +"\n" +msgstr "" + +#: src/LYMain.c:1312 +msgid "" +"\n" +"Lynx file %s is not available.\n" +"\n" +msgstr "" + +#: src/LYMain.c:1908 +msgid "persistent cookies state will be changed in next session only." +msgstr "" + +#: src/LYMain.c:2554 +msgid "" +"\n" +"%s Version %s (%.*s)\n" +msgstr "" + +#: src/LYMain.c:2566 +msgid "Built on %s %s %s\n" +msgstr "" + +#: src/LYMain.c:2570 +msgid "Copyrights held by the University of Kansas, CERN, and other contributors.\n" +msgstr "" + +#: src/LYMain.c:2572 +msgid "Distributed under the GNU General Public License.\n" +msgstr "" + +#: src/LYMain.c:2574 +msgid "" +"See http://lynx.browser.org/ and the online help for more information.\n" +"\n" +msgstr "" + +#: src/LYMain.c:3103 +msgid "USAGE: %s [options] [file]\n" +msgstr "" + +#: src/LYMain.c:3104 +msgid "Options are:\n" +msgstr "" + +#: src/LYMain.c:3312 +msgid "%s: Invalid Option: %s\n" +msgstr "" + +#: src/LYMainLoop.c:305 src/LYMainLoop.c:3797 +msgid "Entry into main screen" +msgstr "" + +#: src/LYMainLoop.c:1204 +msgid "Reparsing document under current settings..." +msgstr "" + +#: src/LYMainLoop.c:1379 src/LYMainLoop.c:1383 +msgid "Fatal error - could not open output file %s\n" +msgstr "" + +#: src/LYMainLoop.c:3010 +msgid "Enctype multipart/form-data not yet supported! Cannot submit." +msgstr "" + +#. +#. * Make a name for this new URL. +#. +#: src/LYMainLoop.c:3728 +msgid "A URL specified by the user" +msgstr "" + +#. +#. * Make a name for this help file. +#. +#: src/LYMainLoop.c:3754 +msgid "Help Screen" +msgstr "" + +#: src/LYMainLoop.c:3778 +msgid "System Index" +msgstr "" + +#: src/LYMainLoop.c:5447 +msgid "charset for this document specified explicitely, sorry..." +msgstr "" + +#: src/LYMainLoop.c:6228 +msgid "lynx: Can't access startfile" +msgstr "" + +#: src/LYMainLoop.c:6240 +msgid "lynx: Start file could not be found or is not text/html or text/plain" +msgstr "" + +#: src/LYMainLoop.c:6241 +msgid " Exiting..." +msgstr "" + +#. Enable scrolling. +#: src/LYNews.c:180 +msgid "You will be posting to:" +msgstr "" + +#. +#. * Get the mail address for the From header, +#. * offering personal_mail_address as default. +#. +#: src/LYNews.c:189 +msgid "" +"\n" +"\n" +" Please provide your mail address for the From: header\n" +msgstr "" + +#. +#. * Get the Subject header, offering the current +#. * document's title as the default if this is a +#. * followup rather than a new post. - FM +#. +#: src/LYNews.c:208 +msgid "" +"\n" +"\n" +" Please provide or edit the Subject: header\n" +msgstr "" + +#: src/LYNews.c:258 +msgid "" +"\n" +"\n" +" Please provide or edit the Organization: header\n" +msgstr "" + +#. +#. * Use the built in line editior. +#. +#: src/LYNews.c:330 +msgid "" +"\n" +"\n" +" Please enter your message below." +msgstr "" + +#: src/LYNews.c:364 +msgid "Message has no original text!" +msgstr "" + +#: src/LYOptions.c:659 +msgid "review/edit B)ookmarks files" +msgstr "" + +#: src/LYOptions.c:661 +msgid "B)ookmark file: " +msgstr "" + +#. +#. * preformatted text follows +#. +#: src/LYOptions.c:4143 +msgid "Personal Preferences" +msgstr "" + +#. Cookies: SELECT +#: src/LYOptions.c:4146 +msgid "Cookies" +msgstr "" + +#. Editor: INPUT +#: src/LYOptions.c:4160 +msgid "Editor" +msgstr "" + +#: src/LYOptions.c:4165 +msgid "Emacs keys" +msgstr "" + +#: src/LYOptions.c:4171 +msgid "Keypad mode" +msgstr "" + +#. Mail Address: INPUT +#: src/LYOptions.c:4201 +msgid "Personal mail address" +msgstr "" + +#: src/LYOptions.c:4206 +msgid "Searching type" +msgstr "" + +#: src/LYOptions.c:4217 +msgid "Show color" +msgstr "" + +#. Show cursor: ON/OFF +#: src/LYOptions.c:4256 +msgid "Show cursor" +msgstr "" + +#. User Mode: SELECT +#: src/LYOptions.c:4262 +msgid "User mode" +msgstr "" + +#. VI Keys: ON/OFF +#: src/LYOptions.c:4268 +msgid "VI keys" +msgstr "" + +#. Display Character Set: SELECT +#: src/LYOptions.c:4274 +msgid "Display character set" +msgstr "" + +#. X Display: INPUT +#: src/LYOptions.c:4287 +msgid "X Display" +msgstr "" + +#: src/LYOptions.c:4293 +msgid "Document Layout" +msgstr "" + +#: src/LYOptions.c:4310 +msgid "Assumed document character set" +msgstr "" + +#. +#. * Since CJK people hardly mixed with other world +#. * we split the header to make it more readable: +#. * "CJK mode" for CJK display charsets, and "Raw 8-bit" for others. +#. +#: src/LYOptions.c:4327 +msgid "CJK mode" +msgstr "" + +#: src/LYOptions.c:4329 +msgid "Raw 8-bit" +msgstr "" + +#. HTML error recovery: SELECT +#: src/LYOptions.c:4336 +msgid "HTML error recovery" +msgstr "" + +#. Select Popups: ON/OFF +#: src/LYOptions.c:4342 +msgid "Popups for select fields" +msgstr "" + +#. Show Images: SELECT +#: src/LYOptions.c:4348 +msgid "Show images" +msgstr "" + +#. Verbose Images: ON/OFF +#: src/LYOptions.c:4362 +msgid "Verbose images" +msgstr "" + +#. +#. * Bookmark Options +#. +#: src/LYOptions.c:4370 +msgid "Bookmark Options" +msgstr "" + +#. Multi-Bookmark Mode: SELECT +#: src/LYOptions.c:4374 +msgid "Multi-bookmarks" +msgstr "" + +#: src/LYOptions.c:4391 +msgid "Review/edit Bookmarks files" +msgstr "" + +#: src/LYOptions.c:4393 +msgid "Goto multi-bookmark menu" +msgstr "" + +#: src/LYOptions.c:4396 +msgid "Bookmarks file" +msgstr "" + +#: src/LYOptions.c:4407 +msgid "FTP sort criteria" +msgstr "" + +#: src/LYOptions.c:4414 +msgid "Local directory sort criteria" +msgstr "" + +#: src/LYOptions.c:4422 +msgid "Show dot files" +msgstr "" + +#. Execution links: SELECT +#: src/LYOptions.c:4430 +msgid "Execution links" +msgstr "" + +#. ALLOW_USERS_TO_CHANGE_EXEC_WITHIN_OPTIONS +#. +#. * Headers transferred to remote server +#. +#: src/LYOptions.c:4451 +msgid "Headers transferred to remote server" +msgstr "" + +#. Preferred Document Character Set: INPUT +#: src/LYOptions.c:4454 +msgid "Preferred document character set" +msgstr "" + +#. Preferred Document Language: INPUT +#: src/LYOptions.c:4459 +msgid "Preferred document language" +msgstr "" + +#: src/LYOptions.c:4465 +msgid "User-Agent header" +msgstr "" + +#: src/LYPrint.c:769 +msgid "Sending" +msgstr "" + +#: src/LYPrint.c:1261 +msgid "Document:" +msgstr "" + +#: src/LYPrint.c:1262 +msgid "Number of lines:" +msgstr "" + +#: src/LYPrint.c:1263 +msgid "Number of pages:" +msgstr "" + +#: src/LYPrint.c:1264 +msgid "pages" +msgstr "" + +#: src/LYPrint.c:1264 +msgid "page" +msgstr "" + +#: src/LYPrint.c:1265 +msgid "(approximately)" +msgstr "" + +#: src/LYPrint.c:1270 +msgid "Some print functions have been disabled!" +msgstr "" + +#: src/LYPrint.c:1274 +msgid "Standard print options:" +msgstr "" + +#: src/LYPrint.c:1275 +msgid "Print options:" +msgstr "" + +#: src/LYPrint.c:1281 +msgid "Save to a local file" +msgstr "" + +#: src/LYPrint.c:1283 +msgid "Save to disk disabled" +msgstr "" + +#: src/LYPrint.c:1289 +msgid "Mail the file" +msgstr "" + +#: src/LYPrint.c:1295 +msgid "Print to the screen" +msgstr "" + +#: src/LYPrint.c:1299 +msgid "Print out on a printer attached to your vt100 terminal" +msgstr "" + +#: src/LYReadCFG.c:382 +msgid "" +"Syntax Error parsing COLOR in configuration file:\n" +"The line must be of the form:\n" +"COLOR:INTEGER:FOREGROUND:BACKGROUND\n" +"\n" +"Here FOREGROUND and BACKGROUND must be one of:\n" +"The special strings 'nocolor' or 'default', or\n" +msgstr "" + +#: src/LYReadCFG.c:395 +msgid "Offending line:" +msgstr "" + +#: src/LYReadCFG.c:645 +msgid "key remapping of " +msgstr "" + +#: src/LYReadCFG.c:647 +msgid " failed" +msgstr "" + +#: src/LYReadCFG.c:749 +msgid "Lynx: cannot start, CERN rules file %s is not available\n" +msgstr "" + +#: src/LYReadCFG.c:751 +msgid "(no name)" +msgstr "" + +#: src/LYReadCFG.c:1285 +msgid "More than %d nested lynx.cfg includes -- perhaps there is a loop?!?\n" +msgstr "" + +#: src/LYReadCFG.c:1287 +msgid "Last attempted include was '%s',\n" +msgstr "" + +#: src/LYReadCFG.c:1288 +msgid "included from '%s'.\n" +msgstr "" + +#. no absolute path... for lynx.cfg on DOS/Win32 +#: src/LYReadCFG.c:1737 src/LYReadCFG.c:1750 src/LYReadCFG.c:1778 +msgid "The following is read from your lynx.cfg file." +msgstr "" + +#: src/LYReadCFG.c:1738 src/LYReadCFG.c:1751 +msgid "Please read the distribution" +msgstr "" + +#: src/LYReadCFG.c:1744 src/LYReadCFG.c:1754 +msgid "for more comments." +msgstr "" + +#: src/LYReadCFG.c:1760 +msgid "RELOAD THE CHANGES" +msgstr "" + +#: src/LYReadCFG.c:1769 +msgid "Your primary configuration" +msgstr "" + +#: src/LYShowInfo.c:103 +msgid "Directory that you are currently viewing" +msgstr "" + +#: src/LYShowInfo.c:109 +msgid "Name:" +msgstr "" + +#: src/LYShowInfo.c:110 +msgid "URL:" +msgstr "" + +#: src/LYShowInfo.c:123 +msgid "Directory that you have currently selected" +msgstr "" + +#: src/LYShowInfo.c:126 +msgid "File that you have currently selected" +msgstr "" + +#: src/LYShowInfo.c:130 +msgid "Symbolic link that you have currently selected" +msgstr "" + +#: src/LYShowInfo.c:134 +msgid "Item that you have currently selected" +msgstr "" + +#: src/LYShowInfo.c:136 +msgid "Full name:" +msgstr "" + +#: src/LYShowInfo.c:145 +msgid "Unable to follow link" +msgstr "" + +#: src/LYShowInfo.c:147 +msgid "Points to file:" +msgstr "" + +#: src/LYShowInfo.c:152 +msgid "Name of owner" +msgstr "" + +#: src/LYShowInfo.c:155 +msgid "Group name:" +msgstr "" + +#: src/LYShowInfo.c:158 +msgid "File size:" +msgstr "" + +#: src/LYShowInfo.c:164 +msgid "Creation date:" +msgstr "" + +#: src/LYShowInfo.c:167 +msgid "Last modified:" +msgstr "" + +#: src/LYShowInfo.c:170 +msgid "Last accessed:" +msgstr "" + +#: src/LYShowInfo.c:172 +msgid "Access Permissions" +msgstr "" + +#. DIRED_SUPPORT +#: src/LYShowInfo.c:237 +msgid "File that you are currently viewing" +msgstr "" + +#: src/LYShowInfo.c:242 src/LYShowInfo.c:348 +msgid "Linkname:" +msgstr "" + +#: src/LYShowInfo.c:252 src/LYShowInfo.c:264 +msgid "Charset:" +msgstr "" + +#: src/LYShowInfo.c:270 +msgid "Server:" +msgstr "" + +#: src/LYShowInfo.c:273 +msgid "Date:" +msgstr "" + +#: src/LYShowInfo.c:276 +msgid "Last Mod:" +msgstr "" + +#: src/LYShowInfo.c:282 +msgid " Expires:" +msgstr "" + +#: src/LYShowInfo.c:286 +msgid "Cache-Control:" +msgstr "" + +#: src/LYShowInfo.c:290 +msgid "Content-Length:" +msgstr "" + +#: src/LYShowInfo.c:295 +msgid "Language:" +msgstr "" + +#: src/LYShowInfo.c:302 +msgid "Post Data:" +msgstr "" + +#: src/LYShowInfo.c:304 +msgid "Post Content Type:" +msgstr "" + +#: src/LYShowInfo.c:313 +msgid "Owner(s):" +msgstr "" + +#: src/LYShowInfo.c:316 +msgid "size:" +msgstr "" + +#: src/LYShowInfo.c:316 +msgid "lines" +msgstr "" + +#: src/LYShowInfo.c:319 +msgid "mode:" +msgstr "" + +#: src/LYShowInfo.c:321 +msgid "forms mode" +msgstr "" + +#: src/LYShowInfo.c:323 +msgid "source" +msgstr "" + +#: src/LYShowInfo.c:323 +msgid "normal" +msgstr "" + +#: src/LYShowInfo.c:324 +msgid ", safe" +msgstr "" + +#: src/LYShowInfo.c:325 +msgid ", internal link" +msgstr "" + +#: src/LYShowInfo.c:331 +msgid ", no-cache" +msgstr "" + +#: src/LYShowInfo.c:333 +msgid ", ISMAP script" +msgstr "" + +#: src/LYShowInfo.c:335 +msgid ", bookmark file" +msgstr "" + +#: src/LYShowInfo.c:344 +msgid "Link that you currently have selected" +msgstr "" + +#: src/LYShowInfo.c:357 +msgid "Method:" +msgstr "" + +#: src/LYShowInfo.c:362 +msgid "Enctype:" +msgstr "" + +#: src/LYShowInfo.c:374 +msgid "(Form field)" +msgstr "" + +#: src/LYShowInfo.c:389 +msgid "No Links on the current page" +msgstr "" + +#: src/LYStyle.c:170 +msgid "" +"Syntax Error parsing style in lss file:\n" +"[%s]\n" +"The line must be of the form:\n" +"OBJECT:MONO:COLOR (ie em:bold:brightblue:white)\n" +"where OBJECT is one of EM,STRONG,B,I,U,BLINK etc.\n" +"\n" +msgstr "" + +#: src/LYTraversal.c:107 +msgid "here is a list of the history stack so that you may rebuild" +msgstr "" + +#: src/LYUpload.c:81 +msgid "ERROR! - upload command is misconfigured" +msgstr "" + +#: src/LYUpload.c:103 +msgid "Illegal redirection \"../\" found! Request ignored." +msgstr "" + +#: src/LYUpload.c:109 +msgid "Illegal redirection using \"~\" found! Request ignored." +msgstr "" + +#: src/LYUpload.c:170 +msgid "Unable to upload file." +msgstr "" + +#: src/LYUpload.c:216 +msgid "Upload To:" +msgstr "" + +#: src/LYUpload.c:217 +msgid "Upload options:" +msgstr "" + +#: src/LYUtils.c:4899 +msgid "Ignoring invalid HOME" +msgstr "" + +#: src/LYrcFile.c:565 +msgid "" +"Lynx User Defaults File\n" +"\n" +"This file contains options saved from the Lynx Options Screen (normally\n" +"with the '>' key). There is normally no need to edit this file manually,\n" +"since the defaults here can be controlled from the Options Screen, and the\n" +"next time options are saved from the Options Screen this file will be\n" +"completely rewritten. You have been warned...\n" +"If you are looking for the general configuration file - it is normally\n" +"called lynx.cfg, and it has different content and a different format.\n" +"It is not this file.\n" +msgstr "" + +#. +#. * File editor +#. +#: src/LYrcFile.c:582 +msgid "" +"file_editor specifies the editor to be invoked when editing local files\n" +"or sending mail. If no editor is specified, then file editing is disabled\n" +"unless it is activated from the command line, and the built-in line editor\n" +"will be used for sending mail.\n" +msgstr "" + +#. +#. * Default bookmark file. +#. +#: src/LYrcFile.c:593 +msgid "" +"bookmark_file specifies the name and location of the default bookmark\n" +"file into which the user can paste links for easy access at a later\n" +"date.\n" +msgstr "" + +#: src/LYrcFile.c:603 +msgid "" +"If sub_bookmarks is not turned \"off\", and multiple bookmarks have\n" +"been defined (see below), then all bookmark operations will first\n" +"prompt the user to select an active sub-bookmark file. If the default\n" +"Lynx bookmark_file is defined (see above), it will be used as the\n" +"default selection. When this option is set to \"advanced\", and the\n" +"user mode is advanced, the 'v'iew bookmark command will invoke a\n" +"statusline prompt instead of the menu seen in novice and intermediate\n" +"user modes. When this option is set to \"standard\", the menu will be\n" +"presented regardless of user mode.\n" +msgstr "" + +#. +#. * Multiple (sub)bookmark definitions and descriptions. +#. +#: src/LYrcFile.c:622 +msgid "" +"The following allow you to define sub-bookmark files and descriptions.\n" +"The format is multi_bookmark=,\n" +"Up to 26 bookmark files (for the English capital letters) are allowed.\n" +"We start with \"multi_bookmarkB\" since 'A' is the default (see above).\n" +msgstr "" + +#. +#. * FTP/file sorting method. +#. +#: src/LYrcFile.c:642 +msgid "" +"The file_sorting_method specifies which value to sort on when viewing\n" +"file lists such as FTP directories. The options are:\n" +" BY_FILENAME -- sorts on the name of the file\n" +" BY_TYPE -- sorts on the type of the file\n" +" BY_SIZE -- sorts on the size of the file\n" +" BY_DATE -- sorts on the date of the file\n" +msgstr "" + +#: src/LYrcFile.c:661 +msgid "" +"personal_mail_address specifies your personal mail address. The\n" +"address will be sent during HTTP file transfers for authorization and\n" +"logging purposes, and for mailed comments.\n" +"If you do not want this information given out, set the NO_FROM_HEADER\n" +"to TRUE in lynx.cfg, or use the -nofrom command line switch. You also\n" +"could leave this field blank, but then you won't have it included in\n" +"your mailed comments.\n" +msgstr "" + +#. +#. * Searching type. +#. +#: src/LYrcFile.c:676 +msgid "" +"If case_sensitive_searching is \"on\" then when the user invokes a search\n" +"using the 's' or '/' keys, the search performed will be case sensitive\n" +"instead of case INsensitive. The default is usually \"off\".\n" +msgstr "" + +#. +#. * Character set. +#. +#: src/LYrcFile.c:687 +msgid "" +"The character_set definition controls the representation of 8 bit\n" +"characters for your terminal. If 8 bit characters do not show up\n" +"correctly on your screen you may try changing to a different 8 bit\n" +"set or using the 7 bit character approximations.\n" +"Current valid characters sets are:\n" +msgstr "" + +#. +#. * Preferred language. +#. +#: src/LYrcFile.c:702 +msgid "" +"preferred_language specifies the language in MIME notation (e.g., en,\n" +"fr, may be a comma-separated list in decreasing preference)\n" +"which Lynx will indicate you prefer in requests to http servers.\n" +"If a file in that language is available, the server will send it.\n" +"Otherwise, the server will send the file in it's default language.\n" +msgstr "" + +#: src/LYrcFile.c:714 +msgid "" +"preferred_charset specifies the character set in MIME notation (e.g.,\n" +"ISO-8859-2, ISO-8859-5) which Lynx will indicate you prefer in requests\n" +"to http servers using an Accept-Charset header. The value should NOT\n" +"include ISO-8859-1 or US-ASCII, since those values are always assumed\n" +"by default. May be a comma-separated list.\n" +"If a file in that character set is available, the server will send it.\n" +"If no Accept-Charset header is present, the default is that any\n" +"character set is acceptable. If an Accept-Charset header is present,\n" +"and if the server cannot send a response which is acceptable\n" +"according to the Accept-Charset header, then the server SHOULD send\n" +"an error response, though the sending of an unacceptable response\n" +"is also allowed.\n" +msgstr "" + +#: src/LYrcFile.c:735 +msgid "" +"show_color specifies how to set the color mode at startup. A value of\n" +"\"never\" will force color mode off (treat the terminal as monochrome)\n" +"at startup even if the terminal appears to be color capable. A value of\n" +"\"always\" will force color mode on even if the terminal appears to be\n" +"monochrome, if this is supported by the library used to build lynx.\n" +"A value of \"default\" will yield the behavior of assuming\n" +"a monochrome terminal unless color capability is inferred at startup\n" +"based on the terminal type, or the -color command line switch is used, or\n" +"the COLORTERM environment variable is set. The default behavior always is\n" +"used in anonymous accounts or if the \"option_save\" restriction is set.\n" +"The effect of the saved value can be overridden via\n" +"the -color and -nocolor command line switches.\n" +"The mode set at startup can be changed via the \"show color\" option in\n" +"the 'o'ptions menu. If the option settings are saved, the \"on\" and\n" +"\"off\" \"show color\" settings will be treated as \"default\".\n" +msgstr "" + +#. +#. * VI keys. +#. +#: src/LYrcFile.c:761 +msgid "" +"If vi_keys is set to \"on\", then the normal VI movement keys:\n" +" j = down k = up\n" +" h = left l = right\n" +"will be enabled. These keys are only lower case.\n" +"Capital 'H', 'J' and 'K will still activate help, jump shortcuts,\n" +"and the keymap display, respectively.\n" +msgstr "" + +#: src/LYrcFile.c:774 +msgid "" +"If emacs_keys is to \"on\" then the normal EMACS movement keys:\n" +" ^N = down ^P = up\n" +" ^B = left ^F = right\n" +"will be enabled.\n" +msgstr "" + +#. +#. * Show dot files. +#. +#: src/LYrcFile.c:785 +msgid "" +"show_dotfiles specifies that the directory listing should include\n" +"\"hidden\" (dot) files/directories. If set \"on\", this will be\n" +"honored only if enabled via userdefs.h and/or lynx.cfg, and not\n" +"restricted via a command line switch. If display of hidden files\n" +"is disabled, creation of such files via Lynx also is disabled.\n" +msgstr "" + +#. +#. * Select popups. +#. +#: src/LYrcFile.c:797 +msgid "" +"select_popups specifies whether the OPTIONs in a SELECT block which\n" +"lacks a MULTIPLE attribute are presented as a vertical list of radio\n" +"buttons or via a popup menu. Note that if the MULTIPLE attribute is\n" +"present in the SELECT start tag, Lynx always will create a vertical list\n" +"of checkboxes for the OPTIONs. A value of \"on\" will set popup menus\n" +"as the default while a value of \"off\" will set use of radio boxes.\n" +"The default can be overridden via the -popup command line toggle.\n" +msgstr "" + +#: src/LYrcFile.c:811 +msgid "" +"show_cursor specifies whether to 'hide' the cursor to the right (and\n" +"bottom, if possible) of the screen, or to place it to the left of the\n" +"current link in documents, or current option in select popup windows.\n" +"Positioning the cursor to the left of the current link or option is\n" +"helpful for speech or braille interfaces, and when the terminal is\n" +"one which does not distinguish the current link based on highlighting\n" +"or color. A value of \"on\" will set positioning to the left as the\n" +"default while a value of \"off\" will set 'hiding' of the cursor.\n" +"The default can be overridden via the -show_cursor command line toggle.\n" +msgstr "" + +#. +#. * Keypad mode. +#. +#: src/LYrcFile.c:827 +msgid "" +"If keypad_mode is set to \"NUMBERS_AS_ARROWS\", then the numbers on\n" +"your keypad when the numlock is on will act as arrow keys:\n" +" 8 = Up Arrow\n" +" 4 = Left Arrow 6 = Right Arrow\n" +" 2 = Down Arrow\n" +"and the corresponding keyboard numbers will act as arrow keys,\n" +"regardless of whether numlock is on.\n" +msgstr "" + +#: src/LYrcFile.c:836 +msgid "" +"If keypad_mode is set to \"LINKS_ARE_NUMBERED\", then numbers will\n" +"appear next to each link and numbers are used to select links.\n" +msgstr "" + +#: src/LYrcFile.c:840 +msgid "" +"If keypad_mode is set to \"LINKS_AND_FORM_FIELDS_ARE_NUMBERED\", then\n" +"numbers will appear next to each link and visible form input field.\n" +"Numbers are used to select links, or to move the \"current link\" to a\n" +"form input field or button. In addition, options in popup menus are\n" +"indexed so that the user may type an option number to select an option in\n" +"a popup menu, even if the option isn't visible on the screen. Reference\n" +"lists and output from the list command also enumerate form inputs.\n" +msgstr "" + +#: src/LYrcFile.c:849 +msgid "" +"NOTE: Some fixed format documents may look disfigured when\n" +"\"LINKS_ARE_NUMBERED\" or \"LINKS_AND_FORM_FIELDS_ARE_NUMBERED\" are\n" +"enabled.\n" +msgstr "" + +#. +#. * Partial display threshold +#. +#: src/LYrcFile.c:864 +msgid "" +"partial_thres specifies the number of lines Lynx should download and render\n" +"before we redraw the screen in Partial Display logic\n" +"e.g., partial_thres=2\n" +"would have Lynx redraw every 2 lines that it renders\n" +"partial_thres=-1 would use the entire screensize\n" +msgstr "" + +#: src/LYrcFile.c:878 +msgid "" +"lineedit_mode specifies the key binding used for inputting strings in\n" +"prompts and forms. If lineedit_mode is set to \"Default Binding\" then\n" +"the following control characters are used for moving and deleting:\n" +"\n" +" Prev Next Enter = Accept input\n" +" Move char: <- -> ^G = Cancel input\n" +" Move word: ^P ^N ^U = Erase line\n" +" Delete char: ^H ^R ^A = Beginning of line\n" +" Delete word: ^B ^F ^E = End of line\n" +"\n" +"Current lineedit modes are:\n" +msgstr "" + +#: src/LYrcFile.c:907 +msgid "" +"dir_list_styles specifies the directory list style under DIRED_SUPPORT\n" +"(if implemented). The default is \"MIXED_STYLE\", which sorts both\n" +"files and directories together. \"FILES_FIRST\" lists files first and\n" +"\"DIRECTORIES_FIRST\" lists directories first.\n" +msgstr "" + +#: src/LYrcFile.c:923 +msgid "" +"user_mode specifies the users level of knowledge with Lynx. The\n" +"default is \"NOVICE\" which displays two extra lines of help at the\n" +"bottom of the screen to aid the user in learning the basic Lynx\n" +"commands. Set user_mode to \"INTERMEDIATE\" to turn off the extra info.\n" +"Use \"ADVANCED\" to see the URL of the currently selected link at the\n" +"bottom of the screen.\n" +msgstr "" + +#. +#. * Cookie options +#. +#: src/LYrcFile.c:939 +msgid "" +"accept_all_cookies allows the user to tell Lynx to automatically\n" +"accept all cookies if desired. The default is \"FALSE\" which will\n" +"prompt for each cookie. Set accept_all_cookies to \"TRUE\" to accept\n" +"all cookies.\n" +msgstr "" + +#: src/LYrcFile.c:948 +msgid "" +"cookie_accept_domains and cookie_reject_domains are comma-delimited\n" +"lists of domains from which Lynx should automatically accept or reject\n" +"all cookies. If a domain is specified in both options, rejection will\n" +"take precedence. The accept_all_cookies parameter will override any\n" +"settings made here.\n" +msgstr "" + +#: src/LYrcFile.c:963 +msgid "" +"cookie_loose_invalid_domains, cookie_strict_invalid_domains, and\n" +"cookie_query_invalid_domains are comma-delimited lists of which domains\n" +"should be subjected to varying degrees of validity checking. If a\n" +"domain is set to strict checking, strict conformance to RFC2109 will\n" +"be applied. A domain with loose checking will be allowed to set cookies\n" +"with an invalid path or domain attribute. All domains will default to\n" +"querying the user for an invalid path or domain.\n" +msgstr "" + +#. +#. * Cookie file. +#. +#: src/LYrcFile.c:987 +msgid "" +"cookie_file specifies the file in which to store persistent cookies.\n" +"The default is ~/.lynx_cookies.\n" +msgstr "" + +#. +#. * Local execution mode - all links. +#. +#: src/LYrcFile.c:1001 +msgid "" +"If run_all_execution_links is set \"on\" then all local execution links\n" +"will be executed when they are selected.\n" +"\n" +"WARNING - This is potentially VERY dangerous. Since you may view\n" +" information that is written by unknown and untrusted sources\n" +" there exists the possibility that Trojan horse links could be\n" +" written. Trojan horse links could be written to erase files\n" +" or compromise security. This should only be set to \"on\" if\n" +" you are viewing trusted source information.\n" +msgstr "" + +#. +#. * Local execution mode - only links in local files. +#. +#: src/LYrcFile.c:1018 +msgid "" +"If run_execution_links_on_local_files is set \"on\" then all local\n" +"execution links that are found in LOCAL files will be executed when they\n" +"are selected. This is different from run_all_execution_links in that\n" +"only files that reside on the local system will have execution link\n" +"permissions.\n" +"\n" +"WARNING - This is potentially dangerous. Since you may view\n" +" information that is written by unknown and untrusted sources\n" +" there exists the possibility that Trojan horse links could be\n" +" written. Trojan horse links could be written to erase files\n" +" or compromise security. This should only be set to \"on\" if\n" +" you are viewing trusted source information.\n" +msgstr "" + +#. defined(EXEC_LINKS) || defined(EXEC_SCRIPTS) +#: src/LYrcFile.c:1036 +msgid "" +"If verbose_images is \"on\", lynx will print the name of the image\n" +"source file in place of [INLINE], [LINK] or [IMAGE]\n" +"See also VERBOSE_IMAGES in lynx.cfg\n" +msgstr "" diff --git a/gnu/usr.bin/lynx/po/makefile.inn b/gnu/usr.bin/lynx/po/makefile.inn new file mode 100644 index 00000000000..3be84bdbe63 --- /dev/null +++ b/gnu/usr.bin/lynx/po/makefile.inn @@ -0,0 +1,249 @@ +# Makefile for program source directory in GNU NLS utilities package. +# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper +# +# This file file be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. + +# PACKAGE = @PACKAGE@ +PACKAGE = lynx +# VERSION = @VERSION@ +VERSION = 2.8.2 + +SHELL = @CONFIG_SHELL@ +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datadir = @NLS_DATADIR@ +localedir = $(datadir)/locale +gnulocaledir = $(prefix)/share/locale +gettextsrcdir = $(prefix)/share/gettext/po +subdir = po + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @MKINSTALLDIRS@ + +CC = @CC@ +GENCAT = @GENCAT@ +GMSGFMT = PATH=../src:$$PATH @GMSGFMT@ +MSGFMT = @MSGFMT@ +XGETTEXT = PATH=../src:$$PATH @XGETTEXT@ +MSGMERGE = PATH=../src:$$PATH msgmerge + +DEFS = @DEFS@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ + +INCLUDES = -I.. -I$(top_srcdir)/intl + +COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) + +SOURCES = # cat-id-tbl.c +POFILES = @POFILES@ +GMOFILES = @GMOFILES@ +DISTFILES = ChangeLog makefile.inn POTFILES.in $(PACKAGE).pot \ +stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES) + +POTFILES = \ + +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +INSTOBJEXT = @INSTOBJEXT@ + +.SUFFIXES: +.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat + +.c.o: + $(COMPILE) $< + +.po.pox: + $(MAKE) $(PACKAGE).pot + $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox + +.po.mo: + $(MSGFMT) -o $@ $< + +.po.gmo: + file=./`echo $* | sed 's,.*/,,'`.gmo \ + && rm -f $$file && $(GMSGFMT) -o $$file $< + +.po.cat: + sed -f ../intl/po2msg.sed < $< > $*.msg \ + && rm -f $@ && $(GENCAT) $@ $*.msg + + +all: all-@USE_NLS@ + +all-yes: $(SOURCES) $(CATALOGS) +all-no: + +$(srcdir)/$(PACKAGE).pot: $(POTFILES) + $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ + --add-comments --keyword=_ --keyword=N_ \ + --files-from=$(srcdir)/POTFILES.in + sh -c "case '.$(XGETTEXT)' in *:);; *) rm -f $(srcdir)/$(PACKAGE).pot; mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot;; esac" + +$(srcdir)/cat-id-tbl.c: stamp-cat-id; @: +$(srcdir)/stamp-cat-id: $(PACKAGE).pot + rm -f cat-id-tbl.tmp + sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \ + | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp + if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \ + rm cat-id-tbl.tmp; \ + else \ + echo cat-id-tbl.c changed; \ + rm -f $(srcdir)/cat-id-tbl.c; \ + mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \ + fi + cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id + + +install: install-exec install-data +install-exec: +install-data: install-data-@USE_NLS@ +install-data-no: all +install-data-yes: all + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $(datadir); \ + else \ + $(top_srcdir)/mkdirs.sh $(datadir); \ + fi + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + case "$$cat" in \ + *.gmo) destdir=$(gnulocaledir);; \ + *) destdir=$(localedir);; \ + esac; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + dir=$$destdir/$$lang/LC_MESSAGES; \ + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $$dir; \ + else \ + $(top_srcdir)/mkdirs.sh $$dir; \ + fi; \ + if test -r $$cat; then \ + $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + fi; \ + if test -r $$cat.m; then \ + $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + if test -r $(srcdir)/$$cat.m ; then \ + $(INSTALL_DATA) $(srcdir)/$$cat.m \ + $$dir/$(PACKAGE)$(INSTOBJEXT).m; \ + echo "installing $(srcdir)/$$cat as" \ + "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \ + else \ + true; \ + fi; \ + fi; \ + done + if test "$(PACKAGE)" = "gettext"; then \ + if test -r $(MKINSTALLDIRS); then \ + $(MKINSTALLDIRS) $(gettextsrcdir); \ + else \ + $(top_srcdir)/mkdirs.sh $(gettextsrcdir); \ + fi; \ + $(INSTALL_DATA) $(srcdir)/makefile.inn \ + $(gettextsrcdir)/makefile.inn; \ + else \ + : ; \ + fi + +# Define this as empty until I find a useful application. +installcheck: + +uninstall: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ + rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \ + done + rm -f $(gettextsrcdir)/po-makefile.inn + +check: all + +cat-id-tbl.o: ../intl/libgettext.h + +dvi info tags TAGS ID: + +mostlyclean: + rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f cat-id-tbl.c stamp-cat-id *.gmo + rm -f makefile makefile.in POTFILES *.mo *.msg *.cat *.cat.m + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f $(GMOFILES) + +distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: update-po $(DISTFILES) + dists="$(DISTFILES)"; \ + for file in $$dists; do \ + ln $(srcdir)/$$file $(distdir) 2> /dev/null \ + || cp -p $(srcdir)/$$file $(distdir); \ + done + +update-po: makefile + $(MAKE) $(PACKAGE).pot + PATH=`pwd`/../src:$$PATH; \ + cd $(srcdir); \ + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ + mv $$lang.po $$lang.old.po; \ + echo "$$lang:"; \ + if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \ + rm -f $$lang.old.po; \ + else \ + echo "msgmerge for $$cat failed!"; \ + rm -f $$lang.po; \ + mv $$lang.old.po $$lang.po; \ + fi; \ + done + +POTFILES: POTFILES.in + ( if test 'x$(srcdir)' != 'x.'; then \ + posrcprefix='$(top_srcdir)/'; \ + else \ + posrcprefix="../"; \ + fi; \ + rm -f $@-t $@ \ + && (sed -e '/^#/d' -e '/^[ ]*$$/d' \ + -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ + | sed -e '$$s/\\$$//') > $@-t \ + && chmod a-w $@-t \ + && mv $@-t $@ ) + +makefile: makefile.inn ../config.status POTFILES + cd .. \ + && CONFIG_FILES=$(subdir)/$@.in:$(subdir)/$@.inn CONFIG_HEADERS= \ + $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/gnu/usr.bin/lynx/po/nl.po b/gnu/usr.bin/lynx/po/nl.po new file mode 100644 index 00000000000..413ecd3f631 --- /dev/null +++ b/gnu/usr.bin/lynx/po/nl.po @@ -0,0 +1,11 @@ +msgid "" +msgstr "" +"Date: 1998-08-22 16:12:20-0400\n" +"From: Webmaster Jim \n" +"Content-Type: text/plain; charset=\n" +"Xgettext-Options: --default-domain=po/de\n" +"Files: src/LYMain.c\n" + +#: src/LYMain.c:2502 +msgid "%s Version %s %s" +msgstr "" diff --git a/gnu/usr.bin/lynx/po/no.po b/gnu/usr.bin/lynx/po/no.po new file mode 100644 index 00000000000..413ecd3f631 --- /dev/null +++ b/gnu/usr.bin/lynx/po/no.po @@ -0,0 +1,11 @@ +msgid "" +msgstr "" +"Date: 1998-08-22 16:12:20-0400\n" +"From: Webmaster Jim \n" +"Content-Type: text/plain; charset=\n" +"Xgettext-Options: --default-domain=po/de\n" +"Files: src/LYMain.c\n" + +#: src/LYMain.c:2502 +msgid "%s Version %s %s" +msgstr "" diff --git a/gnu/usr.bin/lynx/po/pl.po b/gnu/usr.bin/lynx/po/pl.po new file mode 100644 index 00000000000..413ecd3f631 --- /dev/null +++ b/gnu/usr.bin/lynx/po/pl.po @@ -0,0 +1,11 @@ +msgid "" +msgstr "" +"Date: 1998-08-22 16:12:20-0400\n" +"From: Webmaster Jim \n" +"Content-Type: text/plain; charset=\n" +"Xgettext-Options: --default-domain=po/de\n" +"Files: src/LYMain.c\n" + +#: src/LYMain.c:2502 +msgid "%s Version %s %s" +msgstr "" diff --git a/gnu/usr.bin/lynx/po/pt.po b/gnu/usr.bin/lynx/po/pt.po new file mode 100644 index 00000000000..5ce001350c9 --- /dev/null +++ b/gnu/usr.bin/lynx/po/pt.po @@ -0,0 +1,27 @@ +msgid "" +msgstr "" +"Date: 1998-08-22 16:12:20-0400\n" +"From: Webmaster Jim \n" +"Content-Type: text/plain; charset=\n" +"Xgettext-Options: --default-domain=po/de\n" +"Files: src/LYMain.c\n" + +#: src/LYMain.c:2502 +msgid "%s Version %s %s" +msgstr "%s Versão %s %s" + +#: src/LYMain.c:2504 +msgid "Copyrights held by the University of Kansas, CERN, and other contributors.\n" +msgstr "O copyright prendeu pela universidade de Kansas, de CERN, e de outros contribuinte.\n" + +#: src/LYMain.c:2506 +msgid "Distributed under the GNU General Public License.\n" +msgstr "Distribuído sob a licença do general público de GNU.\n" + +#: src/LYMain.c:2508 +msgid "" +"See http://lynx.browser.org/ and the online help for more information.\n" +"\n" +msgstr "" +"Veja http://lynx.browser.org / e a ajuda em linha para mais informação.\n" +"\n" diff --git a/gnu/usr.bin/lynx/po/readme b/gnu/usr.bin/lynx/po/readme new file mode 100644 index 00000000000..0a6feacc808 --- /dev/null +++ b/gnu/usr.bin/lynx/po/readme @@ -0,0 +1,21 @@ + +> I want to translate to xxxxxx. + +The full list of messages is in lynx.pot, which is generated from looking +at the calls to gettext, use it as template for translations. + +syntax: + +#: src/LYMainLoop.c:1512 src/LYMainLoop.c:1516 +msgid "Fatal error - could not open output file %s\n" +msgstr "" + +First line is a comment beginning with #, for your information. +Original english string is , do not change it. +Translation in , empty string assume english default. +Do not forget to include %s properly in your contributed translation! + +A good place to start is with the messages derived from LYMessages_en.h + +We are collecting Lynx user contributed message translation files at +http://www.slcc.edu/lynx/po/ to avoid increasing the distribution size. diff --git a/gnu/usr.bin/lynx/po/sl.po b/gnu/usr.bin/lynx/po/sl.po new file mode 100644 index 00000000000..413ecd3f631 --- /dev/null +++ b/gnu/usr.bin/lynx/po/sl.po @@ -0,0 +1,11 @@ +msgid "" +msgstr "" +"Date: 1998-08-22 16:12:20-0400\n" +"From: Webmaster Jim \n" +"Content-Type: text/plain; charset=\n" +"Xgettext-Options: --default-domain=po/de\n" +"Files: src/LYMain.c\n" + +#: src/LYMain.c:2502 +msgid "%s Version %s %s" +msgstr "" diff --git a/gnu/usr.bin/lynx/po/sv.po b/gnu/usr.bin/lynx/po/sv.po new file mode 100644 index 00000000000..413ecd3f631 --- /dev/null +++ b/gnu/usr.bin/lynx/po/sv.po @@ -0,0 +1,11 @@ +msgid "" +msgstr "" +"Date: 1998-08-22 16:12:20-0400\n" +"From: Webmaster Jim \n" +"Content-Type: text/plain; charset=\n" +"Xgettext-Options: --default-domain=po/de\n" +"Files: src/LYMain.c\n" + +#: src/LYMain.c:2502 +msgid "%s Version %s %s" +msgstr "" diff --git a/gnu/usr.bin/lynx/samples/blue-background.lss b/gnu/usr.bin/lynx/samples/blue-background.lss new file mode 100644 index 00000000000..f5d93b0b70d --- /dev/null +++ b/gnu/usr.bin/lynx/samples/blue-background.lss @@ -0,0 +1,84 @@ +# From: Sergey Svishchev +# Notes: +# I use this in OS/2 VIO window, and occasionally on Linux console. + +normal:normal:default:blue +em:bold:brightgreen:blue +strong:bold:brightred:blue +b:bold:white:blue +i:bold:yellow:blue +alink:reverse:white:cyan +a:bold:cyan:blue +img:dim:gray:blue +status:reverse:white:green +fig:normal:gray:blue +caption:reverse:brown:blue +hr:normal:yellow:blue +blockquote:normal:brightblue:blue +#ul:normal:brown:blue +address:normal:magenta:blue +#title:normal:magenta:blue +tt:dim:gray:blue +h1:bold:yellow:blue +label:normal:magenta:blue +value:normal:green:blue +high:bold:brightmagenta:blue +q:normal:yellow:magenta +small:dim:gray:blue +big:bold:yellow:blue +sup:bold:yellow:blue +sub:dim:gray:blue +lh:bold:yellow:magenta + +# glitch fixes +area:normal:default:blue +body:normal:default:blue +br:normal:default:blue +center:normal:default:blue +center.header:normal:default:blue +div:normal:default:blue +font:normal:default:blue +font.letter:normal:default:blue +h2:normal:default:blue +h3:normal:default:blue +h4:normal:default:blue +h5:normal:default:blue +h6:normal:default:blue +head:normal:default:blue +link:normal:default:blue +map:normal:default:blue +meta:normal:default:blue +p:normal:default:blue +table:normal:default:blue +td:normal:default:blue +tr:normal:default:blue +title:normal:default:blue + +form:normal:default:blue +input:normal:default:blue +input.submit:normal:cyan:blue +select:normal:default:blue +option:normal:default:blue + +pre:normal:default:blue +dd:normal:default:blue +dt:normal:default:blue +ul:normal:default:blue +li:normal:default:blue + +base:normal:default:blue +iframe:normal:default:blue +cite:normal:yellow:blue + +span.htmlsrc_comment:normal:green:blue +span.htmlsrc_tag:normal:brightgreen:blue +span.htmlsrc_attrib:normal:brightcyan:blue +span.htmlsrc_attrval:normal:white:blue +span.htmlsrc_abracket:normal:brightgreen:blue +span.htmlsrc_entity:normal:white:blue +##span.htmlsrc_href: +##span.htmlsrc_entire: +span.htmlsrc_badseq:normal:red:blue +span.htmlsrc_badtag:normal:red:blue +span.htmlsrc_badattr:normal:red:blue +span.htmlsrc_sgmlspecial:normal:yellow:blue diff --git a/gnu/usr.bin/lynx/samples/cernrules.txt b/gnu/usr.bin/lynx/samples/cernrules.txt new file mode 100644 index 00000000000..1064e74eeae --- /dev/null +++ b/gnu/usr.bin/lynx/samples/cernrules.txt @@ -0,0 +1,226 @@ +# This files contains examples and an explanation for the RULESFILE / RULE +# feature. +# +# Rules for Lynx are experimental. They provide a rudimentary capability +# for URL rejection and substitution based on string matching. +# Most users and most installations will not need this feature, it is here +# in case you find it useful. Note that this may change or go away in +# future releases of Lynx; if you find it useful, consider describing your +# use of it in a message to . +# +# Syntax: +# ======= +# As you may have guessed, comments are introduced by a '#' character. +# Rules have the general form +# Operator Operand1 [Operand2] +# with words separated by whitespace. +# +# Recognized operators are +# +# Fail URL1 +# Reject access to this URL, stop processing further rules. +# +# Map URL1 URL2 +# Change the URL to URL2, then continue processing. +# +# Pass URL1 [URL2] +# Accept this URL and stop processing further rules; if URL2 +# is given, apply this as the last mapping. +# +# Rules are processed sequentially first to last, a rule applies +# if the current URL (for the resource the user is trying to access) +# matches URL1. case-sensitive (!) string comparison is used, in addition +# URL1 can contain one '*' which is interpreted as a wildcard matching +# 0 or more characters. So if for example +# "http://example.com/dir/doc.html" is requested, it would matches any of +# the following: +# Pass http:* +# Pass http://example.com/*.html +# Pass http://example.com/* +# Pass http://example* +# Pass http://*/doc.html +# but not: +# Pass http://example/* +# Pass http://Example.COM/dir/doc.html +# Pass http://Example.COM/* +# +# If a URL2 is given and also contains a '*', that character will be +# replaced by whatever matched in URL1. Processing stops with the +# first matching "Fail" or "Pass" or when the end of the rules is reached. +# If the end is reached without a "Fail" or "Pass", the URL is allowed +# (equivalent to a final "Pass *"). +# +# The requested URL will have been transformed to Lynx's normal +# representation. This means that local file resources should be +# expected in the form "file://localhost/", +# not in the machine's native representation for filenames. +# +# Anyone with experience configuring the venerable CERN httpd server will +# recognize the syntax - in fact, the code implementing rules goes back +# to a common ancestor. But note the differences: all URLs and URL- +# patterns here have to be given as absolute URLs, even for local files. +# (Absolute URLs don't imply proxying - you cannot control that from here.) +# +# CAVEAT +# ====== +# First, to squash any false expectations, and example for what NOT TO DO. +# It might be expected that a rule like +# Fail file://localhost/etc/passwd # <- DON'T RELY ON THIS +# could be used to prevent access to the file "/etc/passwd". This might +# fool a naive user, but the more sophisticated user could still gain +# access, by experimenting with other forms like (@@@ untested) +# "file:///etc/passwd" or "/etc//passwd" +# or "/etc/p%61asswd" or "/etc/passwd?" or "/etc/passwd#X" and so on. +# There are many URL forms for accessing the same resource, and Lynx +# just doesn't guarantee that URLs for the same resource will look the +# same way. +# +# The same reservation applies to any attempts to block access to unwanted +# sites and so on. This isn't the right place for implementing it. +# (Lynx has a number of mechanisms documented elsewhere to restrict access, +# see the INSTALLATION file, lynx.cfg, lynx -help, lynx -restrictions.) +# +# Some more useful applications: +# +# 1. Disabling URLs by access scheme +# ---------------------------------- +# Fail gopher:* +# Fail finger:* +# Fail lynxcgi:* +# Fail LYNXIMGMAP:* +# This should work (but no guarantees) because Lynx canonicalizes +# the case of recognized access schemes and does not interpret +# %-escaping in the scheme part (@@@ always?) +# +# Note that for many access schemes Lynx already has mechanisms to +# restrict access (see lynx.cfg, -help, -restrictions, etc.), others +# have to be specifically enabled. Those mechanisms should be used +# in preference. +# Note especially Limitation 1 below. +# This can be used for the remaining cases, or in addition by the +# more paranoid. Note that disabling "file:*" will also make many +# of the special pages generated by lynx as temporary files (INFO, +# history, ...) inaccessible, on the other hand it doesn't prevent +# _writing_ of various temp files - probably not what you want. +# +# You could also direct access for a scheme to a brief text explaining +# why it's not available: +# Map news:* http://localhost/texts/newsserver-is-broken.html +# (That text shouldn't contain any relative links, they would be +# broken.) +# +# 2. Preventing accidental access +# ------------------------------- +# If there is a page or site you don't want to access for whatever +# reason (say there's a link to it that crashes Lynx [don't forget to +# report a bug], or it that starts sending you a 5 Mb file you don't +# want, or you just don't like the people...), you can prevent yourself +# from accidentally accessing it: +# Fail http://bad.site.com/* +# +# 3. Compressed files +# ------------------- +# You have downloaded a bunch of HTML documents, and compressed them +# to save space. Then you discover that links between the files don't +# work, because they all use the names of the uncompressed files. The +# following kind of rule will alow you to navigate, invisibly accessing +# the compressed files: +# Map file://localhost/somedir/*.html file://localhost/somedir/*.html.gz +# +# 4. Use local copies +# ------------------- +# You have downloaded a tree of HTML documents, but there are many links +# between them that still point to the remote location. You want to access +# the local copies instead, after all that's why you downloaded them. You +# could start editing the HTML, but the following might be simpler: +# Map http://remote.com/docs/*.html file://localhost/home/me/docs/*.html +# Or even combine this with compressing the files: +# Map http://remote.com/docs/*.html file://localhost/home/me/docs/*.html.gz +# +# 5. Broken links etc. +# -------------------- +# A user has moved from http://www.siteA.com/~jdoe to http://siteB.org/john, +# or http://www.provider.com/company/ has moved to their own server +# http://www.company.com, but there are still links to the old location +# all over the place; they now are broken or lead to a stupid "this page +# has moved, please update your bookmarks. Refresh in 5 seconds" page +# which you're tired of seeing. This will not fix your bookmarks, and +# it will let you see the outdated URLs for longer (Limitation 3 below), +# but for a quick fix: +# Map http://www.siteA.com/~jdoe/* http://siteB.org/john/* +# Map http://www.provider.com/company/* http://www.company.com/* +# But note that you are likely to create invalid links if not all documents +# from a site are mapped (Limitation 3). +# +# 6. DNS troubles +# --------------- +# A special case of broken links. If a site is inaccessible because the +# name cannot be resolved (your or their name server is broken, or the +# name registry once again made a mistake, or they really didn't pay in +# time...) but you still somehow know the address; or if name lookups are +# just too slow: +# Map http://www.somesite.com/* http://10.1.2.3/* +# (You could do the equivalent more cleanly by adding an entry to the hosts +# file, if you have access to it.) +# +# Or, if a name resolves to several addresses of which one is down, and the +# DNS hasn't caught up: +# Map http://www.w3.org/* http://www12.w3.org/* +# +# Note that this can break access to some name-based virtually hosted sites. + + +# Limitations +# =========== +# First, see CAVEAT above. There are other limitations: +# +# 1. Applicable URL schemes +# ------------------------- +# Rules processing does not apply to all URL schemes. Some are +# handled differently from the generic access code, therefore rules +# for such URLs will never be "seen". This limitation applies at +# least to lynxexec:, lynxprog:, mailto:, and LYNXHIST: URLs. +# +# Also, a scheme has to be known to Lynx in order to get as far as +# applying rules - you cannot just define your own new foobar: scheme +# and then map it to something here. +# +# 2. No re-checking +# ----------------- +# When a URL is mapped to a different one, the new URL is not checked +# again for compliance with most restrictions established by -anonymous, +# -restrictions, lynx.cfg and so on. This can be regarded as a feature: +# it allows specific exceptions. Of course it means that users for +# whom any restrictions must be enforced cannot have write access to a +# personal rules file, but that should be obvious anyway! +# +# 3. Mappings are invisible +# ------------------------- +# Changing the URL with "Map" or "Pass" rules will in general not be +# visible to the user, because it happens at a late stage of processing +# a request (similar to directing a request through a proxy). One +# can think of two kinds of URL for every resource: a "Document URL" as +# the user sees it (on INFO page, history list, status line, etc.), and +# a "physical URL" used for the actual access. Rules change only the +# physical URL. This is different from the effect of HTTP redirection. +# Often this is bad, sometimes it may be desirable. +# +# Changing the URL can create broken links if a document has relative URLs, +# since they are taken to be relative to the "Document URL" (if no BASE tag +# is present) when the HTML is parsed. +# +# 4. Interaction with proxying +# ---------------------------- +# Rules processing is done after most other access checks, but before +# proxy (and gateway) settings are examined. A "Fail" rule works +# as expected, but when the URL has been mapped to a different one, +# the subsequent proxy checking can get confused. If it decides that +# access is through a proxy or gateway, it will generally use the +# original URL to construct the "physical" URL, effectively overriding +# the mapping rules. If the mapping is to a different access scheme +# or hostname, proxy checking could also be fooled to use a proxy when +# it shouldn't, to not use one when it should, or (if different proxies +# are used for different schemes) to use the wrong proxy. So "just +# don't do that"; in some cases setting the no_proxy variable will help. +# Example 3 happens to work nicely if there is a http_proxy but no +# ftp_proxy. diff --git a/gnu/usr.bin/lynx/samples/lynx-keymaps b/gnu/usr.bin/lynx/samples/lynx-keymaps new file mode 100644 index 00000000000..ee6039afe23 --- /dev/null +++ b/gnu/usr.bin/lynx/samples/lynx-keymaps @@ -0,0 +1,116 @@ +# This is a sample key sequence definition file. It is used by Lynx when +# built with ncurses or slang, to augment the definitions from your terminal's +# termcap or terminfo description. + +# (Lynx implements this mechanism only if USE_KEYMAPS is defined during +# compilation, which has nothing to do with the KEYMAP directives in lynx.cfg, +# see source file LYCurses.h.) + +# Lines that start with a '#' are comment lines. Blank lines are ignored. + +# The 'setkey' function may be used in two ways: +# +# 1. setkey ESC-SEQUENCE KEYSYM +# 2. setkey ESC-SEQUENCE KEYSYM_NAME +# +# where KEYSYM is an integer. A keysym is essentially with the lynx.cfg +# file calls a 'keystroke', but I think that keysym is a more appropriate +# name. The keysym is an integer and may be expressed in various ways: +# +# as a decimal integer: 97 +# hexadecimal: 0x61 +# Octal: 0141 +# as an ASCII character: 'a' +# +# Some keysyms may be expressed symbolically as a keysym name using the +# second form. The currently recognized symbolic names are: +# +# UPARROW +# DNARROW +# RTARROW +# LTARROW +# PGDOWN +# PGUP +# HOME +# END +# F1 +# DO_KEY +# FIND_KEY +# SELECT_KEY +# INSERT_KEY +# REMOVE_KEY +# DO_NOTHING +# +# It does not matter if your keyboard does not have some of the keys +# implied by the above names. The fact is that lynx uses these keys as an +# an intermediate representation. +# +# The ESC-SEQUENCE should be enclosed in double quotes. The '^' character +# is special and indicates a control character, e.g., ^K is Ctrl-K. An ESC +# character (ascii 27) may be represented as ^[. As an example, many +# terminals have arrow keys that emit 'ESC [ A' for the UP arrow. This may +# be represented as the escape sequence "^[[A". The default keymapping is +# given below: +# +setkey "\033[A" UPARROW +setkey "\033OA" UPARROW +setkey "\033[B" DNARROW +setkey "\033OB" DNARROW +setkey "\033[C" RTARROW +setkey "\033OC" RTARROW +setkey "\033[D" LTARROW +setkey "\033OD" LTARROW +setkey "\033[1~" FIND_KEY +setkey "\033[2~" INSERT_KEY +setkey "\033[3~" REMOVE_KEY +setkey "\033[4~" SELECT_KEY +setkey "\033[5~" PGUP +setkey "\033[6~" PGDOWN +setkey "\033[8~" END +setkey "\033[7~" HOME +setkey "\033[28~" F1 +setkey "\033[29~" DO_KEY +# +# All other keys map to themselves, e.g, +# +setkey "a" 'a' +# +# Now suppose that your terminal produces different escape sequences for +# HOME and END. In particular, suppose that the home key produces 'ESC [ +# H' and that the end key produces 'ESC [ K'. Then these may be defined to +# map to lynx HOME and END keys via +# +setkey "^[[H" HOME +setkey "^[[K" END +# +# Similarly, we may map emacs-like sequences to these functions: +# +setkey "^[<" HOME +setkey "^[>" END +# +# Note that it may be impossible to map several sequences to the same +# keysym (NCURSES only?), in that case the mapping occurring last wins. +# +# The following maps a sequence commonly used for Shift+Tab to the +# corresponding code. It should not be needed if the terminfo file +# has the correct info for kcbt. +# +setkey "^[[Z" 0x10F +# +# Other special escapes: +# \a bell +# \b backspace +# \f form-feed +# \n newline (line-feed) +# \r carriage-return +# \t tab +# \v vertical tab +# \ octal number, up to 3 digits, e.g., "\033". +# \d decimal number, up to 3 digits, e.g., "\d99" +# \x hexidecimal number, up to 2 digits, e.g., "\xFF" +# +# For Unix-systems (which have termcap or terminfo) you may also use symbols +# that refer to the termcap/terminfo, by referencing the name bracketed by +# "^(" and ")", e.g., +setkey "^(cuu1)" UPARROW +setkey "^(up)" UPARROW diff --git a/gnu/usr.bin/lynx/samples/lynx.cfg b/gnu/usr.bin/lynx/samples/lynx.cfg index a0a89ef114e..cb4ab72378e 100644 --- a/gnu/usr.bin/lynx/samples/lynx.cfg +++ b/gnu/usr.bin/lynx/samples/lynx.cfg @@ -2,27 +2,86 @@ # The default placement for this file is /usr/local/lib/lynx.cfg (Unix) # or Lynx_Dir:lynx.cfg (VMS) # +# # Definition pairs are of the form VARIABLE:DEFINITION # NO spaces are allowed between the pair items. # -# If you do not have access to /usr/local/bin you may change +# If you do not have write access to /usr/local/bin you may change # the default location of this file in the userdefs.h file and recompile, -# or specify it's location on the command line with the "-cfg" +# or specify its location on the command line with the "-cfg" # command line option. # # Items may be commented out by putting a '#' as the FIRST char of the line # # All definitions must be flush left and have NO spaces.!!! + +# An HTML'ized description of all settings (based on comments in this file, +# with alphabetical table of settings and with table of settings by category) +# is available at http://www.hippo.ru/~hvv/lynxcfg_toc.html + +# Starting with Lynx 2.8.1, the lynx.cfg file has a crude "include" +# facility. This means that you can take advantage of the global lynx.cfg +# while also supplying your own tweaks. +# +# You can use a command-line argument (-cfg /where/is/lynx.cfg) or an +# environment variable (LYNX_CFG=/where/is/lynx.cfg). +# For instance, put in your .profile or .login: +# +# LYNX_CFG=~/lynx.cfg; export LYNX_CFG # in .profile for sh/ksh/bash/etc. +# setenv LYNX_CFG ~/lynx.cfg # in .login for [t]csh +# +# Then in ~/lynx.cfg: +# +# INCLUDE:/usr/local/lib/lynx.cfg +# ^^^^^^^^^^^^^^^^^^^^^^^ or whatever is appropriate on your system +# and now your own tweaks. +# +# Starting with Lynx 2.8.2, the INCLUDE facility is yet more powerful. You can +# suppress all but specific settings that will be read from included files. +# This allows sysadmins to provide users the ability to customize lynx with +# options that normally do not affect security, such as COLOR, VIEWER, KEYMAP. +# +# The syntax is +# +# INCLUDE:filename for +# +# sample: +#INCLUDE:~/lynx.cfg for COLOR VIEWER KEYMAP +# only one space character should surround the word 'for'. On Unix systems ':' +# is also accepted as separator. In that case, the example can be written as +#INCLUDE:~/lynx.cfg:COLOR VIEWER KEYMAP +# In the example, only the settings COLOR, VIEWER and KEYMAP are accepted by +# lynx. Other settings are ignored. Note: INCLUDE is also treated as a +# setting, so to allow an included file to include other files, put INCLUDE in +# the list of allowed settings. +# +# If you allow an included file to include other files, and if a list of +# allowed settings is specified for that file with the INCLUDE command, nested +# files are only allowed to include the list of settings that is the set AND of +# settings allowed for the included file and settings allowed by nested INCLUDE +# commands. In short, there is no security hole introduced by including a +# user-defined configuration file if the original list of allowed settings is +# secure. + +# STARTFILE is the default starting URL if none is specified +# on the command line or via a WWW_HOME environment variable; +# Lynx will refuse to start without a starting URL of some kind. +# STARTFILE can be remote, e.g. http://www.w3.org/default.html , +# or local, e.g. file://localhost/PATH_TO/FILENAME , +# where PATH_TO is replaced with the complete path to FILENAME +# using Unix shell syntax and including the device on VMS. +# +# Normally we expect you will connect to a remote site, e.g., the Lynx starting +# site: +STARTFILE:http://lynx.browser.org/ # +# As an alternative, you may want to use a local URL. A good choice for this is +# the user's home directory: +#STARTFILE:file://localhost/~/ # -# STARTFILE is the default URL if none is specified on the command line -# or via a WWW_HOME environment variable. -# note: these files can be remote (http://www.w3.org/default.html) -# or local (file://localhost/PATH_TO/FILENAME -# replace PATH_TO with the complete path to FILENAME -# use Unix SHELL syntax and include the device on VMS systems) -# -STARTFILE:http://lynx.browser.org/ +# Your choice of STARTFILE should reflect your site's needs, and be a URL that +# you can connect to reliably. Otherwise users will become confused and think +# that they cannot run Lynx. # HELPFILE must be defined as a URL and must have a # complete path if local: @@ -52,40 +111,39 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # #GOTOBUFFER:FALSE -# JUMP_PROMPT is the default statusline prompt for jumps files (see below). +# JUMP_PROMPT is the default statusline prompt for selecting a jumps file +# shortcut. (see below). # You can change the prompt here from that defined in userdefs.h. Any -# trailing white space will be trimmed, and a single space added by Lynx +# trailing white space will be trimmed, and a single space is added by Lynx # following the last non-white character. You must set the default prompt -# before setting the default jumps file (below). If a default jumps file +# before setting the default jumps file (below). If a default jumps file # was set via userdefs.h, and you change the prompt here, you must set the # default jumps file again (below) for the change to be implemented. # #JUMP_PROMPT:Jump to (use '?' for list): -# JUMPFILE is the default local file checked for shortcut URL's when -# the user presses the 'J' (JUMP) key. The user will be prompted for -# a shortcut entry (analogously to 'g'oto), and can enter one -# or use '?' for a list of the shortcuts with associated links to -# their actual URL's. See the sample jumps files in the samples -# subdirectory. Make sure your jumps file includes a '?' shortcut -# for a file://localhost URL to itself: -# +# JUMPFILE is the local file checked for short-cut names for URLs +# when the user presses the 'j' (JUMP) key. The user will be prompted +# to enter a short-cut name for an URL, which Lynx will then follow +# in a similar manner to 'g'oto; alternatively, s/he can enter '?' +# to view the full JUMPFILE list of short-cuts with associated URLs. +# There is an example jumps file in the samples subdirectory. +# If not defined here or in userdefs.h , the JUMP command will invoke +# the NO_JUMPFILE statusline message (cp LYMessages_en.h ). +# +# To allow '?' to work, include in the JUMPFILE +# a short-cut to the JUMPFILE itself, e.g. #
                              ?
                              This Shortcut List # -# If not defined here or in userdefs.h, the JUMP command will invoke -# the NO_JUMPFILE statusline message (see userdefs.h). -# # On VMS, use Unix SHELL syntax (including a lead slash) to define it. # -# Do not include "file://localhost" in the definition. +# Additional jumps files can be defined and mapped to keystrokes +# in lynx.cfg , but you should first define the default jumps file, +# which is mapped by default to 'j' (or 'J' when VI keys are ON). # -# Additional, alternate jumps files can be defined and mapped to -# keystrokes at the bottom of lynx.cfg, but you should first define -# the default jumps file (mapped by default to 'J', and to 'j' when -# the "VI keys" 'o'ption is not ON) here or in userdefs.h, if you -# wish to implement the jumps mechanism. -# -#JUMPFILE:/Lynx_Dir/jumps.html +# In the following line, include the actual full local path to JUMPFILE, +# but do not include 'file://localhost' in the line. +#JUMPFILE:/FULL_LOCAL_PATH/jumps.html # Set JUMPBUFFER to TRUE if you want to have the previous jump target, # if any, offered for reuse or editing when using the 'J'ump command. @@ -141,119 +199,181 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # #LOCAL_DOMAIN:ukans.edu -# 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 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. 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 "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, 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. -# 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 defines the display character set, i.e., 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 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 or 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. For Lynx a "character set" has two names: a MIME name (for +# recognizing properly labeled charset parameters in HTTP headers etc.), and a +# human-readable string for the 'O'ptions Menu (so you may find info about +# language or group of languages besides MIME name). Not all 'human-readable' +# names correspond to exactly one valid MIME charset (example is "Chinese"); +# in that case an appropriate valid (and more specific) MIME name should be +# used where required. Well-known synonyms are also processed in the code. +# +# Raw (CJK) mode +# +# Lynx normally translates characters from a document's charset to display +# charset, using ASSUME_CHARSET value (see below) if the document's charset +# is not specified explicitly. Raw (CJK) mode is OFF for this case. +# When the document charset is specified explicitly, that charset +# overrides any assumption like ASSUME_CHARSET or raw (CJK) mode. +# +# For the Asian (CJK) display character sets, the corresponding charset is +# assumed in documents, i.e., raw (CJK) mode is ON by default. 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 display +# character set. The mode should be toggled OFF when an Asian (CJK) display +# character set is selected but the document is not CJK and its charset not +# specified explicitly. +# +# Raw (CJK) mode may be toggled by user via '@' (LYK_RAW_TOGGLE) key, +# the -raw command line switch or from the 'o'ptions menu. +# +# Raw (CJK) mode effectively changes the charset assumption about unlabeled +# documents. You can toggle raw mode ON if you believe the document has a +# charset which does correspond to your Display Character Set. On the other +# hand, if you set ASSUME_CHARSET the same as Display Character Set you get raw +# mode ON by default (but you get assume_charset=iso-8859-1 if you try raw mode +# OFF after it). +# +# 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. There is a "Transparent" pseudo # character set for more "rawness". # -# The default character sets include: -# Display Character Set name MIME name -# ========================== ========= -# 7 bit approximations us-ascii -# Chinese euc-cn -# DEC Multinational dec-mcs -# DosArabic (cp864) cp864 -# DosBaltRim (cp775) cp775 -# DosCyrillic (cp866) cp866 -# DosGreek (cp737) cp737 -# DosGreek2 (cp869) cp869 -# DosHebrew (cp862) cp862 -# DosLatin1 (cp850) cp850 -# DosLatin2 (cp852) cp852 -# DosLatinUS (cp437) cp437 -# ISO 8859-10 iso-8859-10 -# ISO 8859-5 Cyrillic iso-8859-5 -# ISO 8859-6 Arabic iso-8859-6 -# ISO 8859-7 Greek iso-8859-7 -# ISO 8859-8 Hebrew iso-8859-8 -# ISO 8859-9 (Latin 5) iso-8859-9 -# ISO Latin 1 iso-8859-1 -# ISO Latin 2 iso-8859-2 -# ISO Latin 3 iso-8859-3 -# ISO Latin 4 iso-8859-4 -# Japanese (EUC) euc-jp -# Japanese (SJIS) shift_jis -# KOI8-R Cyrillic koi8-r -# Korean euc-kr -# Macintosh (8 bit) macintosh -# NeXT character set next -# RFC 1345 Mnemonic mnemonic -# RFC 1345 w/o Intro mnemonic+ascii+0 -# Taipei (Big5) big5 -# Transparent x-transparent -# UNICODE UTF 8 utf-8 -# Vietnamese (VISCII) viscii -# WinArabic (cp1256) windows-1256 -# WinBaltRim (cp1257) windows-1257 -# WinCyrillic (cp1251) windows-1251 -# WinGreek (cp1253) windows-1253 -# WinHebrew (cp1255) windows-1255 -# WinLatin1 (cp1252) windows-1252 -# WinLatin2 (cp1250) windows-1250 -# -#CHARACTER_SET:ISO Latin 1 +# Since Lynx now supports a wide range of platforms it may be useful to note +# the cpXXX codepages used by IBM PC compatible computers, and windows-xxxx +# used by native MS-Windows apps. We also note that cpXXX pages rarely are +# found on Internet, but are mostly for local needs on DOS. +# +# Recognized character sets include: +# +# string for 'O'ptions Menu MIME name +# =========================== ========= +# 7 bit approximations (US-ASCII) us-ascii +# Western (ISO-8859-1) iso-8859-1 +# Western (ISO-8859-15) iso-8859-15 +# Western (cp850) cp850 +# Western (windows-1252) windows-1252 +# IBM PC US codepage (cp437) cp437 +# DEC Multinational dec-mcs +# Macintosh (8 bit) macintosh +# NeXT character set next +# HP Roman8 hp-roman8 +# Chinese euc-cn +# Japanese (EUC-JP) euc-jp +# Japanese (Shift_JIS) shift_jis +# Korean euc-kr +# Taipei (Big5) big5 +# Vietnamese (VISCII) viscii +# Eastern European (ISO-8859-2) iso-8859-2 +# Eastern European (cp852) cp852 +# Eastern European (windows-1250) windows-1250 +# Latin 3 (ISO-8859-3) iso-8859-3 +# Latin 4 (ISO-8859-4) iso-8859-4 +# Baltic Rim (cp775) cp775 +# Baltic Rim (windows-1257) windows-1257 +# Cyrillic (ISO-8859-5) iso-8859-5 +# Cyrillic (cp866) cp866 +# Cyrillic (windows-1251) windows-1251 +# Cyrillic (KOI8-R) koi8-r +# Arabic (ISO-8859-6) iso-8859-6 +# Arabic (cp864) cp864 +# Arabic (windows-1256) windows-1256 +# Greek (ISO-8859-7) iso-8859-7 +# Greek (cp737) cp737 +# Greek2 (cp869) cp869 +# Greek (windows-1253) windows-1253 +# Hebrew (ISO-8859-8) iso-8859-8 +# Hebrew (cp862) cp862 +# Hebrew (windows-1255) windows-1255 +# Turkish (ISO-8859-9) iso-8859-9 +# ISO-8859-10 iso-8859-10 +# Ukrainian Cyrillic (cp866u) cp866u +# Ukrainian Cyrillic (KOI8-U) koi8-u +# UNICODE (UTF-8) utf-8 +# RFC 1345 w/o Intro mnemonic+ascii+0 +# RFC 1345 Mnemonic mnemonic +# Transparent x-transparent +# +# The value should be the MIME name of a character set recognized by +# Lynx (case insensitive). +# Find RFC 1345 at http://www.ics.uci.edu/pub/ietf/uri/rfc1345.txt . +# +#CHARACTER_SET:iso-8859-1 # ASSUME_CHARSET changes the handling of documents which do not # explicitly specify a charset. Normally Lynx assumes that 8-bit # 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, +# is defined here or by an -assume_charset command line flag is in effect, # Lynx will treat documents as if they were encoded accordingly. # See above on how this interacts with "raw mode" and the Display # Character Set. -# The value should be the MIME name of a character set recognized by -# Lynx (case insensitive). +# ASSUME_CHARSET can also be changed via the 'o'ptions menu but will +# not be saved as permanent value in user's .lynxrc file to avoid more chaos. # #ASSUME_CHARSET:iso-8859-1 # ASSUME_LOCAL_CHARSET is like ASSUME_CHARSET but only applies to local # files. If no setting is given here or by an -assume_local_charset # command line option, the value for ASSUME_CHARSET or -assume_charset -# is used. -# This option may interfere with "raw mode" toggling when local files -# are viewed (it is "stronger" than the effective change of the charset -# assumption caused by changing "raw mode"), so only use when necessary. +# is used. It works for both text/plain and text/html files. +# This option will ignore "raw mode" toggling when local files are viewed +# (it is "stronger" than "assume_charset" or the effective change +# of the charset assumption caused by changing "raw mode"), +# so only use when necessary. # #ASSUME_LOCAL_CHARSET:iso-8859-1 +# PREPEND_CHARSET_TO_SOURCE:TRUE tells Lynx to prepend a META CHARSET line +# to text/html source files when they are retrieved for 'd'ownloading +# or passed to 'p'rint functions, so HTTP headers will not be lost. +# This is necessary for resolving charset for local html files, +# while the assume_local_charset is just an assumption. +# For the 'd'ownload option, a META CHARSET will be added only if the HTTP +# charset is present. The compilation default is TRUE. +# It is generally desirable to have charset information for every local +# html file, but META CHARSET string potentially could cause +# compatibility problems with other browsers, see also PREPEND_BASE_TO_SOURCE. +# Note that the prepending is not done for -source dumps. +# +#PREPEND_CHARSET_TO_SOURCE:TRUE + +# NCR_IN_BOOKMARKS:TRUE allows you to save 8-bit characters in bookmark titles +# in the unicode format (NCR). This may be useful if you need to switch +# display charsets frequently. This is the case when you use Lynx on different +# platforms, e.g., on UNIX and from a remote PC, and want to keep the bookmarks +# file persistent. +# Another aspect is compatibility: NCR is part of I18N and HTML4.0 +# specifications supported starting with Lynx 2.7.2, Netscape 4.0 and MSIE 4.0. +# Older browser versions will fail so keep NCR_IN_BOOKMARKS:FALSE if you +# plan to use them. +# +#NCR_IN_BOOKMARKS:FALSE + +# FORCE_8BIT_TOUPPER overrides locale settings and uses internal 8-bit +# case-conversion mechanism for case-insensitive searches in non-ASCII display +# character sets. It is FALSE by default and should not be changed unless +# you encounter problems with case-insensitive searches. +# +#FORCE_8BIT_TOUPPER:FALSE + +# While Lynx supports different platforms and display character sets +# we need to limit the charset in outgoing mail to reduce +# trouble for remote recipients who may not recognize our charset. +# You may try US-ASCII as the safest value (7 bit), any other MIME name, +# or leave this field blank (default) to use the display character set. +# Charset translations currently are implemented for mail "subjects= " only. +# +#OUTGOING_MAIL_CHARSET: + # If Lynx encounters a charset parameter it doesn't recognize, it will # replace the value given by ASSUME_UNREC_CHARSET (or a corresponding # -assume_unrec_charset command line option) for it. This can be used @@ -275,17 +395,18 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # PREFERRED_CHARSET specifies the character set in MIME notation (e.g., # "ISO-8859-2", "ISO-8859-5") which Lynx will indicate you prefer in -# requests to http servers using an Accept-Charsets header. Users can +# requests to http servers using an Accept-Charsets header. Users can # change it via the 'o'ptions menu and save that preference in their RC file. # The value should NOT include "ISO-8859-1" or "US-ASCII", # since those values are always assumed by default. # If a file in that character set is available, the server will send it. # If no Accept-Charset header is present, the default is that any -# character set is acceptable. If an Accept-Charset header is present, +# character set is acceptable. If an Accept-Charset header is present, # and if the server cannot send a response which is acceptable # according to the Accept-Charset header, then the server SHOULD send # an error response with the 406 (not acceptable) status code, though -# the sending of an unacceptable response is also allowed. (RFC2068) +# the sending of an unacceptable response is also allowed. See RFC 2068 +# (http://www.ics.uci.edu/pub/ietf/uri/rfc2068.txt). # #PREFERRED_CHARSET: @@ -296,7 +417,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # can be comma-separated lists. Each prefix must end with a dot, each # suffix must begin with a dot, and either may contain other dots (e.g., # .com.jp). The default lists are defined in userdefs.h and can be -# changed here. Each prefix will be used with each suffix, in order, +# replaced here. Each prefix will be used with each suffix, in order, # until a valid Internet host is created, based on a successful DNS # lookup (e.g., foo will be tested as www.foo.com and then www.foo.edu # etc.). The first element can include a :port and/or /path which will @@ -313,11 +434,28 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #URL_DOMAIN_PREFIXES:www. #URL_DOMAIN_SUFFIXES:.com,.edu,.net,.org +# Lynx Options Menu style toggle: forms-based or old-style. +# Works if old-style menu is compiled in as well as the forms-based menu. +#FORMS_OPTIONS:TRUE + +# Display partial pages while downloading +#PARTIAL:TRUE + +# Set the threshold # of lines Lynx must render before it +# redraws the screen in PARTIAL mode. Anything < 0 implies +# use of the screen size. +#PARTIAL_THRES:-1 + +# While getting large files, Lynx shows the approximate rate of transfer. +# Set this to change the units shown: +# TRUE for KB/sec or FALSE for bytes/sec: default is TRUE. +#SHOW_KB_RATE:TRUE + # The following three definitions set the number of seconds for # pauses following statusline messages that would otherwise be # replaced immediately, and are more important than the unpaused # progress messages. Those set by INFOSECS are also basically -# progress messages (e.g., that a prompted input has been cancelled) +# progress messages (e.g., that a prompted input has been canceled) # and should have the shortest pause. Those set by MESSAGESECS are # informational (e.g., that a function is disabled) and should have # a pause of intermediate duration. Those set by ALERTSECS typically @@ -354,6 +492,15 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # #SHOW_CURSOR:FALSE +# VERBOSE_IMAGES controls whether or not Lynx replaces the [LINK], [INLINE] and +# [IMAGE] comments (for images without ALT) with filenames of these images. +# This can be useful in determining what images are decorations +# (button.gif, line.gif) and what images are important (if the page writer +# bothers to use useful names). +# +# If this option is set here, it will override the setting in userdefs.h. +#VERBOSE_IMAGES:TRUE + # If BOLD_HEADERS is set to TRUE the HT_BOLD default style will be acted # upon for

                              through

                              headers. The compilation default is FALSE # (only the indentation styles are acted upon, but see BOLD_H1, below). @@ -391,11 +538,11 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # amount (bytes) of virtual memory that can be allocated and not yet be freed # before previous documents are removed from memory. If the values for both # the DEFAULT_CACHE_SIZE and DEFAULT_VIRTUAL_MEMORY_SIZE are exceeded, then -# least recently displayed documents will be freed until one or the other -# value is no longer exceeded. The default value was defined in userdefs.h. +# the least recently displayed documents will be freed until one or the other +# value is no longer exceeded. The default value is defined in userdefs.h. # -# The Unix and VMS but not VAXC implementations use the C library malloc's -# and calloc's for memory allocation, and procedures for taking the actual +# The Unix and VMS (but not VAXC) implementations use the C library malloc's +# and calloc's for memory allocation, but procedures for taking the actual # amount of cache into account still need to be developed. They use only # the DEFAULT_CACHE_SIZE value, and that specifies the absolute maximum # number of documents to cache (rather than the maximum number only if @@ -404,6 +551,20 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #DEFAULT_CACHE_SIZE:10 #DEFAULT_VIRTUAL_MEMORY_SIZE:512000 +# SOURCE_CACHE sets the source caching behavior for Lynx: +# FILE causes Lynx to keep a temporary file for each cached document +# containing the HTML source of the document, which it uses to regenerate +# the document when certain settings are changed (for instance, +# historical vs. minimal vs. valid comment parsing) instead of reloading +# the source from the network. +# MEMORY is like FILE, except the document source is kept in memory. You +# may wish to adjust DEFAULT_CACHE_SIZE and DEFAULT_VIRTUAL_MEMORY_SIZE +# accordingly. +# NONE is the default; the document source is not cached, and is reloaded +# from the network when needed. +# +#SOURCE_CACHE:NONE + # If ALWAYS_RESUBMIT_POSTS is set TRUE, Lynx always will resubmit forms # with method POST, dumping any cache from a previous submission of the # form, including when the document returned by that form is sought with @@ -457,10 +618,9 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # #SEEK_FRAG_AREA_IN_CUR:TRUE -# Local execution links and scripts are completely disabled -# in the source code unless they are enabled in the -# userdefs.h file and the sources recompiled. Please -# see the Lynx source code distribution and the userdefs.h +# Local execution links and scripts are by default completely disabled +# unless a change is made to the userdefs.h file to enabled them. +# See the Lynx source code distribution and the userdefs.h # file for more detail on enabling execution links and scripts. # # If you have enabled execution links or scripts the following @@ -486,9 +646,9 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # If LOCAL_EXECUTION_LINK_ON_BUT_NOT_REMOTE is TRUE, and no TRUSTED_EXEC # rule is defined, it defaults to "file://localhost/" and any lynxexec # or lynxprog command will be permitted if it was referenced with a URL -# beginning with that string. If you wish to restrict the referencing URL's +# beginning with that string. If you wish to restrict the referencing URLs # further, you can extend the string to include a trusted path. You also can -# specify a trusted directory for http URL's, which will then be treated as +# specify a trusted directory for http URLs, which will then be treated as # if they were local rather than remote. For example: # # TRUSTED_EXEC:file://localhost/trusted/ @@ -513,10 +673,10 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # rules below, you need not repeat them as TRUSTED_EXEC rules. # # If EXEC_LINKS and JUMPFILE have been defined, any lynxexec or lynxprog -# URL's in that file will be permitted, regardless of other settings. If +# URLs in that file will be permitted, regardless of other settings. If # you also set LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE:TRUE and a single # TRUSTED_EXEC rule that will always fail (e.g., "none"), then *ONLY* the -# lynxexec or lynxprog URL's in JUMPFILE (and any ALWAYS_TRUSTED_EXEC rules, +# lynxexec or lynxprog URLs in JUMPFILE (and any ALWAYS_TRUSTED_EXEC rules, # see below) will be allowed. Note, however, that if Lynx was compiled with # CAN_ANONYMOUS_JUMP set to FALSE (default is TRUE), or -restrictions=jump # is included with the -anonymous switch at run time, then users of an @@ -530,7 +690,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # If EXEC_LINKS was defined, any lynxexec or lynxprog URL can be made # always enabled by an ALWAYS_TRUSTED_EXEC rule for it. This is useful for # anonymous accounts in which you have disabled execution links generally, -# and may also have disabled jump file links, but still want to allow +# and may also have disabled jumps file links, but still want to allow # execution of particular utility scripts or programs. The format is # like that for TRUSTED_EXEC. For example: # @@ -567,7 +727,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # ===== # LYNXCGI_ENVIRONMENT adds the current value of the specified # environment variable to the list of environment variables passed on to the -# lynxcgi script. Useful variables are HOME, USER, EDITOR, etc... +# lynxcgi script. Useful variables are HOME, USER, EDITOR, etc... # # VMS: # ==== @@ -602,7 +762,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # the information, or ALERTMAIL if there is no owner, every time # that a document cannot be accessed! # -# NOTE: This can generate A LOT of mail, be warned. +# NOTE: This can generate A LOT of mail, be warned. # #MAIL_SYSTEM_ERROR_LOGGING:FALSE @@ -624,14 +784,17 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #CHECKMAIL:FALSE # To enable news reading ability via Lynx, the environment variable NNTPSERVER -# must be set so that it points to your site's NNTP server (see INSTALLATION). -# Lynx respects RFC 1738 (http://www.ics.uci.edu/pub/ietf/uri/rfc1738.txt) and -# and does not accept a host field in news URLs (use nntp: instead news: for +# must be set so that it points to your site's NNTP server +# (see Lynx Users Guide on environment variables). +# Lynx respects RFC 1738 (http://www.ics.uci.edu/pub/ietf/uri/rfc1738.txt) +# and does not accept a host field in news URLs (use nntp: instead of news: for # the scheme if you wish to specify an NNTP host in a URL, as explained in the # RFC). If you have not set the variable externally, you can set it at run # time via this configuration file. It will not override an external setting. # Note that on VMS it is set as a process logical rather than symbol, and will # outlive the Lynx image. +# The news reading facility in Lynx is quite limited. Lynx does not provide a +# full featured news reader with elaborate error checking and safety features. # #NNTPSERVER:news.server.dom @@ -669,7 +832,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # Set NEWS_POSTING to FALSE if you do not want to support posting to # news groups via Lynx. If left TRUE, Lynx will use its news gateway to # post new messages or followups to news groups, using the URL schemes -# described in the "Supported URL" section of the online 'h'elp. The +# described in the "Supported URLs" section of the online 'h'elp. The # posts will be attempted via the nntp server specified in the URL, or # if none was specified, via the NNTPSERVER configuration or environment # variable. Links with these URLs for posting or sending followups are @@ -678,6 +841,8 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # The compilation default set in userdefs.h can be changed here. If # the default is TRUE, posting can still be disallowed via the # -restrictions command line switch. +# The posting facility in Lynx is quite limited. Lynx does not provide a +# full featured news poster with elaborate error checking and safety features. # #NEWS_POSTING:TRUE @@ -692,15 +857,20 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # If USE_MOUSE is set TRUE, Lynx (when configured with ncurses) will allow # the user to click with button-1 on links to select them. -#USE_MOUSE: FALSE +#USE_MOUSE:FALSE # If COLLAPSE_BR_TAGS is set FALSE, Lynx will not collapse serial BR tags. -# Note that the valid way to insert extra blank lines in HTML is via a PRE -# block with only newlines in the block. -# The default is defined in userdefs.h, and can be overridden here. +# If set TRUE, two or more concurrent BRs will be collapsed into a single +# line break. Note that the valid way to insert extra blank lines in HTML +# is via a PRE block with only newlines in the block. # #COLLAPSE_BR_TAGS:TRUE +# If TAGSOUP is set, Lynx uses the "Tag Soup DTD" rather than "SortaSGML". +# The two approaches differ by the style of error detection and recovery. +# Tag Soup DTD allows for improperly nested tags; SortaSGML is stricter. +#TAGSOUP:FALSE + # If SET_COOKIES is set FALSE, Lynx will ignore Set-Cookie headers # in http server replies. # The default is defined in userdefs.h, and can be overridden here, @@ -708,6 +878,45 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # #SET_COOKIES:TRUE +# If ACCEPT_ALL_COOKIES is set TRUE, Lynx will accept cookies from all +# domains with no user interaction. +# The default is defined in userdefs.h and can be overridden here, or +# in the .lynxrc file via an o(ptions) screen setting. It may also be +# toggled via the -accept_all_cookies command line switch. +# +#ACCEPT_ALL_COOKIES:FALSE + +# COOKIE_ACCEPT_DOMAINS and COOKIE_REJECT_DOMAINS are comma-delimited lists +# of domains from which Lynx should automatically accept or reject all +# cookies. If a domain is specified in both options, rejection will take +# precedence. The ACCEPT_ALL_COOKIES parameter will override any settings +# made here. +# +#COOKIE_ACCEPT_DOMAINS: +#COOKIE_REJECT_DOMAINS: + +# COOKIE_LOOSE_INVALID_DOMAINS, COOKIE_STRICT_INVALID_DOMAINS, and +# COOKIE_QUERY_INVALID_DOMAINS are comma-delimited lists of which domains +# should be subjected to varying degrees of validity checking. If a +# domain is set to strict checking, strict conformance to RFC2109 will +# be applied. A domain with loose checking will be allowed to set cookies +# with an invalid path or domain attribute. All domains will default to +# querying the user for an invalid path or domain. +# +#COOKIE_LOOSE_INVALID_DOMAINS: +#COOKIE_STRICT_INVALID_DOMAINS: +#COOKIE_QUERY_INVALID_DOMAINS: + +# COOKIE_FILE is the default file to store persistent downloaded cookies +# in, if Lynx was compiled with EXP_PERSISTENT_COOKIES. The cookie file +# can also be specified in .lynxrc or on the commandline. +#COOKIE_FILE:~/.lynx_cookies + +# PERSISTENT_COOKIES indicates that cookies should be stored for use between +# Lynx sessions. It is only used if Lynx was compiled with +# EXP_PERSISTENT_COOKIES. Use this flag to disable the feature. +#PERSISTENT_COOKIES:TRUE + # VMS: #===== # The mail command and qualifiers are defined in userdefs.h. Lynx @@ -722,7 +931,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # function in LYPrint.c, may be required. # #SYSTEM_MAIL:PMDF SEND -#SYSERM_MAIL_FLAGS:/headers +#SYSTEM_MAIL_FLAGS:/headers # #SYSTEM_MAIL:MAIL #SYSTEM_MAIL_FLAGS: @@ -743,6 +952,12 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #SYSTEM_MAIL:/usr/lib/sendmail #SYSTEM_MAIL_FLAGS:-t -oi +# Win32: +#======= +# Please read sendmail.txt in the LYNX_W32.ZIP distribution +# +#SYSTEM_MAIL:sendmail -f me@my.host -h my.host -r my.smtp.mailer -m SMTP + # VMS ONLY: #========== # MAIL_ADRS is defined in userdefs.h and normally is structured for PMDF's @@ -775,12 +990,11 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # #EMACS_KEYS_ALWAYS_ON:FALSE -# DEFAULT_KEYPAD_MODE specifies whether by default the user -# has numbers that work like arrows or else numbered links. -# DEFAULT KEYPAD MODE may be set to TRUE for using numbers -# as arrows as the default, or FALSE for using numbered links -# as the default (LINKS_AND_FORM_FIELDS_ARE_NUMBERED cannot -# currently be set by this option.). +# DEFAULT_KEYPAD_MODE specifies whether numbers work like arrows or +# numbered links. +# DEFAULT_KEYPAD_MODE set to TRUE indicates numbers act as arrows, +# and set to FALSE indicates numbers refer to numbered links on the page. +# LINKS_AND_FORM_FIELDS_ARE_NUMBERED cannot currently be set by this option. # #DEFAULT_KEYPAD_MODE_IS_NUMBERS_AS_ARROWS:TRUE @@ -789,10 +1003,10 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # #CASE_SENSITIVE_ALWAYS_ON:FALSE -# DEFAULT_BOOKMARK_FILE is a default filename for use as a personal -# bookmark file. It will reference a file from the user's home directory. +# DEFAULT_BOOKMARK_FILE is the filename used for storing personal bookmarks. +# It will be prepended by the user's home directory. # NOTE that a file ending in .html or other suffix mapped to text/html -# should be used to ensure it's treatment as HTML. The built-in default +# should be used to ensure its treatment as HTML. The built-in default # is lynx_bookmarks.html. On both Unix and VMS, if a subdirectory off of # the HOME directory is desired, the path should begin with "./" (e.g., # ./BM/lynx_bookmarks.html), but the subdirectory must already exist. @@ -815,11 +1029,11 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # override that in userdefs.h. The user can turn on multiple bookmark # support via the 'o'ptions menu, and can save that choice as the startup # default via the .lynxrc file. When on, the setting can be STANDARD or -# ADVANCED. If support is set to the latter, and the user mode also is +# ADVANCED. If SUPPORT is set to the latter, and the user mode also is # ADVANCED, the VIEW_BOOKMARK command will invoke a statusline prompt at # which the user can enter the letter token (A - Z) of the desired bookmark, # or '=' to get a menu of available bookmark files. The menu always is -# presented in NOVICE or INTERMEDIATE mode, or if the support is set to +# presented in NOVICE or INTERMEDIATE mode, or if the SUPPORT is set to # STANDARD. No prompting or menu display occurs if only one (the startup # default) bookmark file has been defined (define additional ones via the # 'o'ptions menu). The startup default, however set, can be overridden on @@ -837,9 +1051,9 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #BLOCK_MULTI_BOOKMARKS:FALSE # DEFAULT_USER_MODE sets the default user mode for Lynx users. -# NOVICE shows a three line help message at the bottom of the screen -# INTERMEDIATE shows normal amount of help (one line) -# ADVANCED help is replaced by the URL of the current link +# NOVICE shows a three line help message at the bottom of the screen. +# INTERMEDIATE shows normal amount of help (one line). +# ADVANCED help is replaced by the URL of the current link. # #DEFAULT_USER_MODE:NOVICE @@ -851,7 +1065,7 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html # line oriented mail input mode will be used. # NOTE: Do not define an editor unless you know that every user will # know how to use it. Most users do not enjoy getting stuck in -# an unknown editor that they can't get out of. Users can +# an unknown editor that they can't exit. Users can # easily define an editor of their own using the options menu, # so it is not always desirable to set the DEFAULT_EDITOR. # @@ -863,16 +1077,15 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #SYSTEM_EDITOR: # Proxy variables -# Lynx version 2.2 and beyond supports the use of proxy servers that can -# act as firewall gateways and caching servers. They are preferable to -# the older gateway servers. Each protocol used by Lynx can be mapped -# separately using PROTOCOL_proxy environment variables (see INSTALLATION). -# If you have not set them externally, you can set them at run time via -# this configuration file. They will not override external settings. -# The no_proxy variable can be a comma-separated list of hosts which should -# not be proxied, or an asterisk to override all proxy variables. -# Note that on VMS they are set as process logicals rather than symbols, -# to preserve lowercasing, and will outlive the Lynx image. +# Lynx version 2.2 and beyond supports the use of proxy servers that can act as +# firewall gateways and caching servers. They are preferable to the older +# gateway servers. Each protocol used by Lynx can be mapped separately using +# PROTOCOL_proxy environment variables (see Lynx Users Guide). If you have not set +# them externally, you can set them at run time via this configuration file. +# They will not override external settings. The no_proxy variable can be used +# to inhibit proxying to selected regions of the Web (see below). Note that on +# VMS these proxy variables are set as process logicals rather than symbols, to +# preserve lowercasing, and will outlive the Lynx image. # #http_proxy:http://some.server.dom:port/ #https_proxy:http://some.server.dom:port/ @@ -890,112 +1103,100 @@ DEFAULT_INDEX_FILE:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/MetaIndex.html #cso_proxy:http://some.server.dom:port/ #no_proxy:host.domain.dom -# Printer definitions -# any number of printers may be defined by using multiple -# printer definition sets. Printers may be any program -# that could be useful to your users, they do not necessarily -# have to print. -# -# the definition of a printer is of the form -# PRINTER:::: -# -# is the name that the user will see. -# is the command line arguments for printing a file. -# The %s will be replaced with the file being printed. -# If a second %s is given the second %s will be replaced by -# a suggested filename that is prettier than the tempfile -# name given in the first %s. This does not remove the first -# %s from the command line in any manner. If you need to -# use only the second %s file name in your printer command, -# then I suggest creating a script which will first copy the -# first %s file name to the second %s file name, and then -# executing your print command with the second %s file name. -# specifies whether the printer should be disabled for -# users without printing options. The options are -# TRUE or FALSE; -# TRUE means the printer will always be ENABLED -# regardless of printer or anonymous settings -# FALSE means the printer will be DISABLED when -# the -noprint option is on, or for anonymous -# users which are not allowed to print -# -# is an optional parameter for indicating the number of -# lines per page for the printer. Defaults to 66. Used -# for computing the approximate number of pages and -# generating a statusline query of whether to proceed if -# the document is longer than 4 printer pages. Uses the -# current screen length for the computation when the -# built in "print to screen" option is selected. -# -# You must put the whole definition on one line. -# -# If you must use a colon, precede it with a backslash! -# -# If you have a very busy VMS print queue and Lynx deletes the temporary -# files before they have been queued, use the VMSPrint.com included in -# the distribution. -# -# examples +# The no_proxy variable can be a comma-separated list of strings defining +# no-proxy zones in the DNS domain name space. If a tail substring of the +# domain-path for a host matches one of these strings, transactions with that +# node will not be proxied. +#no_proxy:domain.path1,path2 +# +# A single asterisk as an entry will override all proxy variables and no +# transactions will be proxied. +#no_proxy:* +# This is the only allowed use of * in no_proxy. +# +# Warning: Note that setting 'il' as an entry in this list will block proxying +# for the .mil domain as well as the .il domain. If the entry is '.il' this +# will not happen. + +# PRINTER & DOWNLOADER DEFINITIONS: +# Lynx has 4 pre-defined print options & 1 pre-defined download option, +# which are called up on-screen when `p' or `d' are entered; +# any number of options can be added by the user, as explained below. +# +# For `p' pre-defined options are: `Save to local file', `E-mail the file', +# `Print to screen' and `Print to local printer attached to vt100'. +# `Print to screen' allows file transfers in the absence of alternatives +# and is often the only option allowed here for anonymous users; +# the 3rd & 4th options are not pre-defined for DOS/WINDOWS versions of Lynx. +# For `d' the pre-defined option is: `Download to local file'. +# +# To define your own print or download option use the following formats: +# PRINTER:::

                            \n"); - (*target->isa->put_block)(target, buf, strlen(buf)); + HTSprintf0(&buf, "
                            \n"); + PUTS(buf); } - sprintf(buf, "
                            \n\n"); - (*target->isa->put_block)(target, buf, strlen(buf)); + HTSprintf0(&buf, "
                            \n\n"); + PUTS(buf); /* * Free the target to complete loading of the * Cookie Jar Page, and report a successful load. - FM */ (*target->isa->_free)(target); + FREE(buf); return(HT_LOADED); } + +/* cookie_domain_flag_set +** ---------------------- +** All purpose function to handle setting domain flags for a +** comma-delimited list of domains. cookie_domain_flags handles +** invcheck behavior, as well as accept/reject behavior. - BJP +*/ + +PUBLIC void cookie_domain_flag_set ARGS2( + char *, domainstr, + int, flag) +{ + domain_entry *de = NULL; + domain_entry *de2 = NULL; + HTList *hl = NULL; + char **str = (char **)calloc(1, sizeof(domainstr)); + char *dstr = NULL; + char *strsmall = NULL; + int isexisting = FALSE; + + if (str == NULL) + outofmem(__FILE__, "cookie_set_invcheck"); + + /* + * Is this the first domain we're handling? If so, initialize + * domain_list. + */ + + if (domain_list == NULL) { +#ifdef LY_FIND_LEAKS + atexit(LYCookieJar_free); +#endif + domain_list = HTList_new(); + total_cookies = 0; + } + + StrAllocCopy(dstr, domainstr); + + *str = dstr; + + while ((strsmall = LYstrsep(str, ",")) != 0) { + + /* + * Check the list of existing domains to see if this is a + * re-setting of an already existing domains -- if so, just + * change the behavior, if not, create a new domain entry. + */ + + for (hl = domain_list; hl != NULL; hl = hl->next) { + de2 = (domain_entry *)hl->object; + if ((de2 != NULL && de2->domain != NULL) && + !strcmp(strsmall, de2->domain)) { + isexisting = TRUE; + break; + } else { + isexisting = FALSE; + } + } + + if(!isexisting) { + de = (domain_entry *)calloc(1, sizeof(domain_entry)); + + if (de == NULL) + outofmem(__FILE__, "cookie_domain_flag_set"); + + switch(flag) { + case (FLAG_ACCEPT_ALWAYS): de->bv = ACCEPT_ALWAYS; + de->invcheck_bv = INVCHECK_QUERY; + break; + case (FLAG_REJECT_ALWAYS): de->bv = REJECT_ALWAYS; + de->invcheck_bv = INVCHECK_QUERY; + break; + case (FLAG_QUERY_USER): de->bv = QUERY_USER; + de->invcheck_bv = INVCHECK_QUERY; + break; + case (FLAG_FROM_FILE): de->bv = FROM_FILE; + de->invcheck_bv = INVCHECK_QUERY; + break; + case (FLAG_INVCHECK_QUERY): de->invcheck_bv = INVCHECK_QUERY; + de->bv = QUERY_USER; + break; + case (FLAG_INVCHECK_STRICT): de->invcheck_bv = INVCHECK_STRICT; + de->bv = QUERY_USER; + break; + case (FLAG_INVCHECK_LOOSE): de->invcheck_bv = INVCHECK_LOOSE; + de->bv = QUERY_USER; + break; + } + + StrAllocCopy(de->domain, strsmall); + de->cookie_list = HTList_new(); + HTList_appendObject(domain_list, de); + } else { + switch(flag) { + case (FLAG_ACCEPT_ALWAYS): de2->bv = ACCEPT_ALWAYS; + break; + case (FLAG_REJECT_ALWAYS): de2->bv = REJECT_ALWAYS; + break; + case (FLAG_QUERY_USER): de2->bv = QUERY_USER; + break; + case (FLAG_FROM_FILE): de2->bv = FROM_FILE; + break; + case (FLAG_INVCHECK_QUERY): de2->invcheck_bv = INVCHECK_QUERY; + break; + case (FLAG_INVCHECK_STRICT): de2->invcheck_bv = INVCHECK_STRICT; + break; + case (FLAG_INVCHECK_LOOSE): de2->invcheck_bv = INVCHECK_LOOSE; + break; + } + } + } + + FREE(strsmall); + FREE(str); + FREE(dstr); +} + #ifdef GLOBALDEF_IS_MACRO #define _LYCOOKIE_C_GLOBALDEF_1_INIT { "LYNXCOOKIE",LYHandleCookies,0} GLOBALDEF (HTProtocol,LYLynxCookies,_LYCOOKIE_C_GLOBALDEF_1_INIT); diff --git a/gnu/usr.bin/lynx/src/LYCookie.h b/gnu/usr.bin/lynx/src/LYCookie.h index 9900a01756f..b811e371c91 100644 --- a/gnu/usr.bin/lynx/src/LYCookie.h +++ b/gnu/usr.bin/lynx/src/LYCookie.h @@ -1,7 +1,32 @@ - #ifndef LYCOOKIES_H #define LYCOOKIES_H +#ifndef HTUTILS_H +#include +#endif + +#include + +typedef enum {ACCEPT_ALWAYS, REJECT_ALWAYS, QUERY_USER, FROM_FILE} behaviour; +typedef enum {INVCHECK_QUERY, + INVCHECK_STRICT, + INVCHECK_LOOSE} invcheck_behaviour; +typedef enum {FLAG_ACCEPT_ALWAYS, + FLAG_REJECT_ALWAYS, + FLAG_QUERY_USER, + FLAG_FROM_FILE, + FLAG_INVCHECK_QUERY, + FLAG_INVCHECK_STRICT, + FLAG_INVCHECK_LOOSE} cookie_domain_flags; + +struct _domain_entry { + char * domain; /* Domain for which these cookies are valid */ + behaviour bv; + invcheck_behaviour invcheck_bv; + HTList * cookie_list; +}; +typedef struct _domain_entry domain_entry; + extern void LYSetCookie PARAMS(( CONST char * SetCookie, CONST char * SetCookie2, @@ -11,14 +36,19 @@ extern char *LYCookie PARAMS(( CONST char * partialpath, int port, BOOL secure)); - -typedef enum {ACCEPT_ALWAYS, REJECT_ALWAYS, QUERY_USER} behaviour; - -struct _domain_entry { - char * domain; /* Domain for which these cookies are valid */ - behaviour bv; - HTList * cookie_list; -}; -typedef struct _domain_entry domain_entry; +extern void LYStoreCookies PARAMS(( + char * cookie_file)); +extern void LYLoadCookies PARAMS(( + char * cookie_file)); +extern void cookie_add_acceptlist PARAMS(( + char * acceptdomains)); +extern void cookie_add_rejectlist PARAMS(( + char * rejectdomains)); +extern void cookie_set_invcheck PARAMS(( + char * domains, + invcheck_behaviour setting)); +extern void cookie_domain_flag_set PARAMS(( + char * domainstr, + int flag)); #endif /* LYCOOKIES_H */ diff --git a/gnu/usr.bin/lynx/src/LYCurses.c b/gnu/usr.bin/lynx/src/LYCurses.c index 9defcfa2adc..c6c08a2e6ad 100644 --- a/gnu/usr.bin/lynx/src/LYCurses.c +++ b/gnu/usr.bin/lynx/src/LYCurses.c @@ -1,27 +1,19 @@ -#include "HTUtils.h" -#include "tcp.h" -#include "LYCurses.h" -#include "LYStyle.h" -#include "LYUtils.h" -#include "LYGlobalDefs.h" -#include "LYMainLoop.h" -#include "LYSignal.h" -#include "LYClean.h" -#include "LYReadCFG.h" -#include "LYStrings.h" -#include "LYCharSets.h" -#include "UCAux.h" - -#include "LYexit.h" -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} - -#ifdef VMS -#define DISPLAY "DECW$DISPLAY" -#else -#define DISPLAY "DISPLAY" -#endif /* VMS */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include #if defined(VMS) && defined(__GNUC__) #include @@ -34,15 +26,19 @@ extern int _NOSHARE(COLS); #endif /* VMS && __GNUC__ */ #ifdef USE_COLOR_STYLE -#include "AttrList.h" -#include "LYHash.h" +#include +#include #endif #if defined(COLOR_CURSES) int lynx_has_color = FALSE; #endif +#if defined(USE_COLOR_STYLE) && !USE_COLOR_TABLE +#define COLOR_BKGD ((s_normal != NOSTYLE) ? hashStyles[s_normal].color : A_NORMAL) +#else #define COLOR_BKGD ((COLOR_PAIRS >= 9) ? COLOR_PAIR(9) : A_NORMAL) +#endif /* * These are routines to start and stop curses and to cleanup @@ -56,6 +52,11 @@ BOOLEAN LYCursesON = FALSE; PRIVATE int Current_Attr; #endif +#define OMIT_SCN_KEEPING 0 /* whether to omit keeping of Style_className + in HTML.c when lss support is on. 1 to increase performance. The value + must correspond to the value of macro OMIT_SCN_KEEPING defined in HTML.c*/ + + #ifdef USE_SLANG PUBLIC unsigned int Lynx_Color_Flags = 0; PUBLIC BOOLEAN FullRefresh = FALSE; @@ -67,6 +68,8 @@ PUBLIC int curscr = 0; PUBLIC int PHYSICAL_SLtt_Screen_Cols = 10; #endif /* SLANG_MBCS_HACK */ + + PUBLIC void LY_SLrefresh NOARGS { if (FullRefresh) { @@ -157,7 +160,7 @@ PRIVATE void sl_suspend ARGS1( SLang_init_tty(3, 0, 1); #endif /* SLANG_VERSION > 9929 */ signal(SIGTSTP, sl_suspend); -#ifndef _WINDOWS +#if !defined(_WINDOWS) && !defined(__DJGPP__) SLtty_set_suspend_state(1); #endif if (sig == SIGTSTP) @@ -216,7 +219,7 @@ PUBLIC void VMSbox ARGS3( */ PUBLIC void LYbox ARGS2( WINDOW *, win, - BOOLEAN, formfield) + BOOLEAN, formfield GCC_UNUSED) { /* * If the terminal is in UTF-8 mode, it probably cannot understand @@ -258,11 +261,6 @@ PUBLIC void LYbox ARGS2( #endif /* VMS */ #endif /* USE_SLANG */ -#if defined(USE_COLOR_STYLE) -PRIVATE int last_styles[128]; -PRIVATE int last_ptr=0; -#endif - #if defined(USE_COLOR_STYLE) /* Ok, explanation of the USE_COLOR_STYLE styles. The basic styles (ie non * HTML) are set the same as the SLANG version for ease of programming. The @@ -283,14 +281,15 @@ PUBLIC void setStyle ARGS4(int,style,int,color,int,cattr,int,mono) PUBLIC void setHashStyle ARGS5(int,style,int,color,int,cattr,int,mono,char*,element) { bucket* ds=&hashStyles[style]; - if (TRACE) - fprintf(stderr, "CSS(SET): <%s> hash=%d, ca=%d, ma=%d\n", element, style, color, mono); + CTRACE(tfp, "CSS(SET): <%s> hash=%d, ca=%d, ma=%d\n", element, style, color, mono); ds->color=color; ds->cattr=cattr; ds->mono=mono; ds->code=style; FREE(ds->name); ds->name=malloc(sizeof(char)*(strlen(element)+2)); + if(!ds->name) + outofmem(__FILE__, "setHashStyle"); strcpy(ds->name, element); } @@ -299,8 +298,7 @@ PUBLIC void setHashStyle ARGS5(int,style,int,color,int,cattr,int,mono,char*,elem */ PRIVATE int LYAttrset ARGS3(WINDOW*,win,int,color,int,mono) { - if (TRACE) - fprintf(stderr, "CSS:LYAttrset (%d, %d)\n", color, mono); + CTRACE(tfp, "CSS:LYAttrset (%#x, %#x)\n", color, mono); if (lynx_has_color && LYShowColor >= SHOW_COLOR_ON && color > -1) { wattrset(win,color); @@ -315,19 +313,35 @@ PRIVATE int LYAttrset ARGS3(WINDOW*,win,int,color,int,mono) return A_NORMAL; } -PUBLIC void curses_w_style ARGS4(WINDOW*,win,int,style,int,dir,int,previous) +PUBLIC void curses_w_style ARGS3( + WINDOW*, win, + int, style, + int, dir) { +#if OMIT_SCN_KEEPING +# define SPECIAL_STYLE /*(CSHASHSIZE+1) */ 88888 + /* if TRACEs are not compiled in, this macro is redundant - we neend't valid + 'ds' to stack off. */ +#endif + int YP,XP; - bucket* ds=&hashStyles[style]; +#if !OMIT_SCN_KEEPING + bucket* ds= (style == NOSTYLE ? &nostyle_bucket : &hashStyles[style]); +#else + bucket* ds= (style == NOSTYLE ? &nostyle_bucket : + (style== SPECIAL_STYLE ? &special_bucket :&hashStyles[style]) ); +#endif + if (!ds->name) { - if (TRACE) - fprintf(stderr, "CSS.CS:Style %d not configured\n",style); + CTRACE(tfp, "CSS.CS:Style %d not configured\n",style); +#if !OMIT_SCN_KEEPING return; +#endif } - if (TRACE) - fprintf(stderr, "CSS.CS:<%s%s> (%d)\n",(dir?"":"/"),ds->name,ds->code); + + CTRACE(tfp, "CSS.CS:<%s%s> (%d)\n",(dir?"":"/"),ds->name,ds->code); getyx (win, YP, XP); @@ -342,49 +356,48 @@ PUBLIC void curses_w_style ARGS4(WINDOW*,win,int,style,int,dir,int,previous) { /* ABS_OFF is the same as STACK_OFF for the moment */ case STACK_OFF: - if (last_ptr) - LYAttrset(win,last_styles[--last_ptr],-1); + if (last_colorattr_ptr) { + int last_attr = last_styles[--last_colorattr_ptr]; + LYAttrset(win,last_attr,last_attr); + } else LYAttrset(win,A_NORMAL,-1); return; case STACK_ON: /* remember the current attributes */ - if (last_ptr > 127) { - if (TRACE) - fprintf(stderr,"........... %s (0x%x) %s\r\n", + if (last_colorattr_ptr > 127) { + CTRACE(tfp,"........... %s (0x%x) %s\r\n", "attribute cache FULL, dropping last", - last_styles[last_ptr], - "in LynxChangStyle(curses_w_style)"); - last_ptr--; + last_styles[last_colorattr_ptr], + "in LynxChangeStyle(curses_w_style)"); + last_colorattr_ptr--; } - last_styles[last_ptr++] = getattrs(stdscr); + last_styles[last_colorattr_ptr++] = getattrs(stdscr); /* don't cache style changes for active links */ +#if OMIT_SCN_KEEPING + /* since we don't compute the hcode + to stack off in HTML.c, we don't know whether this style is + configured. So, we shouldn't simply return on stacking on on + unconfigured styles, we should push curr attrs on stack. -HV + */ + if (!ds->name) return; +#endif if (style != s_alink) { - if (TRACE) - fprintf(stderr, "CACHED: <%s> @(%d,%d)\n", ds->name, YP, XP); + CTRACE(tfp, "CACHED: <%s> @(%d,%d)\n", ds->name, YP, XP); if (win==stdscr) cached_styles[YP][XP]=style; - LYAttrset(win, ds->color, ds->mono); - } - else - { - LYAttrset(win, ds->color, ds->mono); } + LYAttrset(win, ds->color, ds->mono); return; case ABS_ON: /* change without remembering the previous style */ /* don't cache style changes for active links */ if (style != s_alink) { - if (TRACE) - fprintf(stderr, "CACHED: <%s> @(%d,%d)\n", ds->name, YP, XP); + CTRACE(tfp, "CACHED: <%s> @(%d,%d)\n", ds->name, YP, XP); if (win==stdscr) cached_styles[YP][XP]=style; - LYAttrset(win, ds->color, ds->mono); - } - else - { - LYAttrset(win, ds->color, ds->mono); } + LYAttrset(win, ds->color, ds->mono); return; } } @@ -398,16 +411,15 @@ PUBLIC void wcurses_css ARGS3(WINDOW *,win,char*,name,int,dir) while (try_again) { int tmpHash=hash_code(name); - if (TRACE) - fprintf(stderr, "CSSTRIM:trying to set [%s] style - ", name); + CTRACE(tfp, "CSSTRIM:trying to set [%s] style - ", name); if (tmpHash==NOSTYLE) { char *class=strrchr(name, '.'); - if (TRACE) fprintf(stderr, "undefined, trimming at %p\n", class); + CTRACE(tfp, "undefined, trimming at %p\n", class); if (class) *class='\0'; else try_again=0; } else { - if (TRACE) fprintf(stderr, "ok (%d)\n", hash_code(name)); - curses_w_style(win, hash_code(name), dir, 0); + CTRACE(tfp, "ok (%d)\n", hash_code(name)); + curses_w_style(win, hash_code(name), dir); try_again=0; } } @@ -415,12 +427,14 @@ PUBLIC void wcurses_css ARGS3(WINDOW *,win,char*,name,int,dir) PUBLIC void curses_css ARGS2(char *,name,int,dir) { - wcurses_css(stdscr, name, dir); + wcurses_css(stdscr, name, dir); } -PUBLIC void curses_style ARGS3(int,style,int,dir,int,previous) +PUBLIC void curses_style ARGS2( + int, style, + int, dir) { - curses_w_style(stdscr, style, dir, previous); + curses_w_style(stdscr, style, dir); } #ifdef NOT_USED @@ -474,24 +488,15 @@ PRIVATE void LYsetWAttr ARGS1(WINDOW *, win) int code = 0; int attr = A_NORMAL; int offs = 1; - static int have_underline = -1; - static int no_color_video = -1; + static int NoColorVideo = -1; - if (have_underline < 0) { -#ifndef DOSPATH - have_underline = tigetstr("smul") != 0; -#else - have_underline = 1; -#endif /* DOSPATH */ - } - -#if ( !defined(__DJGPP__) && !defined(_WINDOWS) ) - if (no_color_video < 0) { - no_color_video = tigetnum("ncv"); +#ifdef UNIX + if (NoColorVideo < 0) { + NoColorVideo = tigetnum("ncv"); } - if (no_color_video < 0) - no_color_video = 0; -#endif /* !__DJGPP__ and !_WINDOWS */ + if (NoColorVideo < 0) + NoColorVideo = 0; +#endif /* UNIX */ if (Current_Attr & A_BOLD) code |= 1; @@ -502,14 +507,14 @@ PRIVATE void LYsetWAttr ARGS1(WINDOW *, win) attr = lynx_color_cfg[code].attr; /* - * FIXME: no_color_video isn't implemented (97/4/14) in ncurses 4.x, - * but may be in SVr4 (which would make this redundant for the latter). + * no_color_video isn't implemented (97/4/14) in ncurses 4.1, but may + * be in SVr4 (which would make this redundant for the latter). */ - if ((Current_Attr & A_BOLD) && !(no_color_video & 33)) { + if ((Current_Attr & A_BOLD) && !(NoColorVideo & 33)) { attr |= A_BOLD; } - if ((Current_Attr == A_UNDERLINE) && !(no_color_video & 2)) { + if ((Current_Attr == A_UNDERLINE) && !(NoColorVideo & 2)) { attr |= A_UNDERLINE; } @@ -555,6 +560,7 @@ PUBLIC int lynx_chg_color ARGS3( int, bg ) { + if (fg == ERR_COLOR || bg == ERR_COLOR) return -1; if (color >= 0 && color < 8) { lynx_color_cfg[color].fg = (fg > 7) ? (fg & 7) : fg; lynx_color_cfg[color].bg = (bg > 7) ? (bg & 7) : bg; @@ -616,6 +622,7 @@ PUBLIC void lynx_setup_colors NOARGS } #endif /* USE_COLOR_TABLE */ +#ifdef NOTUSED #if defined (DJGPP) && !defined (USE_SLANG) /* * Sorry about making a completely new function, @@ -623,46 +630,58 @@ PUBLIC void lynx_setup_colors NOARGS */ PUBLIC void start_curses NOARGS { - static BOOLEAN first_time = TRUE; - - if(first_time) - { - initscr(); /* start curses */ - first_time = FALSE; - cbreak(); - keypad(stdscr, TRUE); - fflush(stdin); - fflush(stdout); - if (has_colors()) { - lynx_has_color = TRUE; - start_color(); - } - lynx_init_colors(); - lynx_called_initscr = TRUE; - - /* Inform pdcurses that we're interested in knowing when mouse - buttons are clicked. Maybe someday pdcurses will support it. - */ - if (LYUseMouse) - lynx_enable_mouse (1); + static BOOLEAN first_time = TRUE; - } else sock_init(); + if(first_time) + { + initscr(); /* start curses */ + first_time = FALSE; + cbreak(); + keypad(stdscr, TRUE); + fflush(stdin); + fflush(stdout); + if (has_colors()) { + lynx_has_color = TRUE; + start_color(); + } + lynx_init_colors(); + lynx_called_initscr = TRUE; + + /* Inform pdcurses that we're interested in knowing when mouse buttons + * are clicked. Maybe someday pdcurses will support it. + */ + if (LYUseMouse) + lynx_enable_mouse (1); + + } else + sock_init(); - LYCursesON = TRUE; - clear(); - noecho(); + LYCursesON = TRUE; + CTRACE(tfp, "start_curses: done.\n"); + clear(); + noecho(); } #else +#endif /* defined (DJGPP) && !defined (USE_SLANG) */ +#endif /* NOTUSED */ + + PUBLIC void start_curses NOARGS { #ifdef USE_SLANG static int slinit; - if (LYCursesON) + if (LYCursesON) { + CTRACE(tfp, "start_curses: Hmm, already ON.\n"); return; + } if (slinit == 0) { SLtt_get_terminfo(); +#if defined(__DJGPP__) && !defined(DJGPP_KEYHANDLER) + SLkp_init (); +#endif /* __DJGPP__ && !DJGPP_KEYHANDLER */ + #ifdef UNIX #if SLANG_VERSION >= 9935 SLang_TT_Read_FD = fileno(stdin); @@ -699,6 +718,7 @@ PUBLIC void start_curses NOARGS } size_change(0); +#if defined(VMS) || defined(UNIX) SLtt_add_color_attribute(4, SLTT_ULINE_MASK); SLtt_add_color_attribute(5, SLTT_ULINE_MASK); /* @@ -710,7 +730,12 @@ PUBLIC void start_curses NOARGS } else { SLtt_Blink_Mode = 0; } +#endif /* VMS || UNIX */ } +#ifdef __DJGPP__ + else sock_init(); +#endif /* __DJGPP__ */ + slinit = 1; Current_Attr = 0; #ifndef VMS @@ -723,12 +748,12 @@ PUBLIC void start_curses NOARGS SLsmg_init_smg(); SLsmg_Display_Eight_Bit = LYlowest_eightbit[current_char_set]; if (SLsmg_Display_Eight_Bit > 191) - SLsmg_Display_Eight_Bit = 191; /* may print ctrl chars otherwise - kw */ + SLsmg_Display_Eight_Bit = 191; /* may print ctrl chars otherwise - kw */ scrollok(0,0); SLsmg_Backspace_Moves = 1; #ifndef VMS -#ifndef _WINDOWS - SLtty_set_suspend_state(1); +#if !defined(_WINDOWS) && !defined(__DJGPP__) + SLtty_set_suspend_state(1); #endif /* !_WINDOWS */ #ifdef SIGTSTP if (!no_suspend) @@ -741,13 +766,15 @@ PUBLIC void start_curses NOARGS #else /* Using curses: */ + #ifdef VMS /* - * If we are VMS then do initsrc() everytime start_curses() + * If we are VMS then do initscr() everytime start_curses() * is called! */ initscr(); /* start curses */ -#else /* Unix: */ +#else /* Unix: */ + static BOOLEAN first_time = TRUE; if (first_time) { @@ -756,22 +783,18 @@ PUBLIC void start_curses NOARGS * and one time only! */ if (initscr() == NULL) { /* start curses */ - fprintf(stderr, - "Terminal initialisation failed - unknown terminal type?\n"); -#ifndef NOSIGHUP - (void) signal(SIGHUP, SIG_DFL); -#endif /* !NOSIGHUP */ - (void) signal(SIGTERM, SIG_DFL); - (void) signal(SIGINT, SIG_DFL); -#ifdef SIGTSTP - if (no_suspend) - (void) signal(SIGTSTP,SIG_DFL); -#endif /* SIGTSTP */ - exit (-1); + fprintf(tfp, "%s\n", + gettext("Terminal initialisation failed - unknown terminal type?")); + exit_immediately (-1); } #if defined(SIGWINCH) && defined(NCURSES_VERSION) size_change(0); + recent_sizechange = FALSE; /* prevent mainloop drawing 1st doc twice */ #endif /* SIGWINCH */ +#if defined(USE_KEYMAPS) && defined(NCURSES_VERSION) + if (-1 == lynx_initialize_keymaps ()) + exit (-1); +#endif /* * This is a workaround for a bug in SVr4 curses, observed on Solaris @@ -785,9 +808,9 @@ PUBLIC void start_curses NOARGS { int n; for (n = 0; n < 128; n++) - if (acs_map[n] & 0x80) { - acs_map[n] &= 0xff; - acs_map[n] |= A_ALTCHARSET; + if (ALT_CHAR_SET[n] & 0x80) { + ALT_CHAR_SET[n] &= 0xff; + ALT_CHAR_SET[n] |= A_ALTCHARSET; } } #endif @@ -814,7 +837,10 @@ PUBLIC void start_curses NOARGS lynx_called_initscr = TRUE; #endif /* USE_COLOR_TABLE */ } -#endif /* VMS */ +#ifdef __DJGPP__ + else sock_init(); +#endif /* __DJGPP__ */ +#endif /* not VMS */ /* nonl(); */ /* seems to slow things down */ @@ -848,34 +874,68 @@ PUBLIC void start_curses NOARGS #endif LYCursesON = TRUE; + CTRACE(tfp, "start_curses: done.\n"); } -#endif /* defined (DJGPP) && !defined (USE_SLANG) */ + PUBLIC void lynx_enable_mouse ARGS1(int,state) { - if (LYUseMouse == 0) - return; + +#ifdef __BORLANDC__ +/* modify lynx_enable_mouse() for pdcurses configuration so that mouse support + is disabled unless -use_mouse is specified. This is ifdef'd with + __BORLANDC__ for the time being (WB). +*/ + HANDLE hConIn = INVALID_HANDLE_VALUE; + hConIn = GetStdHandle(STD_INPUT_HANDLE); + if (LYUseMouse == 0) + { + SetConsoleMode(hConIn, ENABLE_WINDOW_INPUT); + FlushConsoleInputBuffer(hConIn); + return; + } +#endif + + if (LYUseMouse == 0) + return; #ifdef USE_SLANG_MOUSE - SLtt_set_mouse_mode (state, 0); - SLtt_flush_output (); + SLtt_set_mouse_mode (state, 0); + SLtt_flush_output (); #else + #ifdef NCURSES_MOUSE_VERSION - /* Inform ncurses that we're interested in knowing when mouse - button 1 is clicked */ -#ifndef _WINDOWS - if (state) - mousemask(BUTTON1_CLICKED | BUTTON3_CLICKED, NULL); - else - mousemask(0, NULL); +#if defined(__BORLANDC__) && defined(__PDCURSES__) + if (state) + { + SetConsoleMode(hConIn, ENABLE_MOUSE_INPUT | ENABLE_WINDOW_INPUT); + FlushConsoleInputBuffer(hConIn); + } #else - if (state) mouse_set(BUTTON1_CLICKED && BUTTON2_CLICKED && BUTTON3_CLICKED); -#endif /* !_WINDOWS */ + /* Inform ncurses that we're interested in knowing when mouse + * button 1 is clicked. We cannot just specify + * BUTTON1_CLICKED | BUTTON3_CLICKED, since ncurses will try hard + * to translate other events to single-clicks. + * Compensate for small value of maxclick in ncurses. */ + if (state) { + static int was = 0; + + if (!was) { + int old = mouseinterval(-1); + + was++; + if (old < 200) /* Default 166 */ + mouseinterval(300); + } + mousemask(ALL_MOUSE_EVENTS, NULL); + } else + mousemask(0, NULL); +#endif /* __BORLANDC__ and __PDCURSES__ */ #endif /* NCURSES_MOUSE_VERSION */ #if defined(DJGPP) && !defined(USE_SLANG) - if (state) - mouse_set(BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED); + if (state) + mouse_set(BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED); #endif #endif /* NOT USE_SLANG_MOUSE */ } @@ -904,11 +964,12 @@ PUBLIC void stop_curses NOARGS fflush(stderr); LYCursesON = FALSE; + CTRACE(tfp, "stop_curses: done.\n"); #if defined(SIGTSTP) && defined(USE_SLANG) #ifndef VMS - if (!no_suspend) - signal(SIGTSTP, SIG_DFL); + if (!no_suspend) + signal(SIGTSTP, SIG_DFL); #endif /* !VMS */ #endif /* SIGTSTP && USE_SLANG */ @@ -926,7 +987,7 @@ PUBLIC BOOLEAN setup ARGS1( { int c; int status; - char *dummy, *cp, term[81]; + char *dummy = 0, *cp, term[81]; #ifdef USE_SLANG extern void longname(); #endif /* USE_SLANG */ @@ -935,10 +996,10 @@ PUBLIC BOOLEAN setup ARGS1( * If the display was not set by a command line option then * see if it is available from the environment. */ - if ((cp = getenv(DISPLAY)) != NULL && *cp != '\0') { - StrAllocCopy(display, cp); + if ((cp = LYgetXDisplay()) != 0) { + StrAllocCopy(x_display, cp); } else { - FREE(display); + FREE(x_display); } /* @@ -964,17 +1025,15 @@ PUBLIC BOOLEAN setup ARGS1( #endif /* SIGTSTP */ exit(status); } - for (cp = term; *cp != '\0'; cp++) - if (isupper(*cp)) - *cp = TOLOWER(*cp); + LYLowerCase(term); - printf("Terminal = %s\n", term); + printf("%s%s\n", gettext("Terminal ="), term); sleep(InfoSecs); if ((strlen(term) < 5) || strncmp(term, "vt", 2) || !isdigit(term[2])) { - printf( - "You must use a vt100, 200, etc. terminal with this program.\n"); - printf("Proceed (n/y)? "); + printf("%s\n", + gettext("You must use a vt100, 200, etc. terminal with this program.")); + printf(CONFIRM_PROCEED, "n/y"); c = getchar(); if (c != 'y' && c != 'Y') { printf("\n"); @@ -1004,8 +1063,8 @@ PUBLIC BOOLEAN setup ARGS1( PUBLIC BOOLEAN setup ARGS1( char *, terminal) { - static char term_putenv[120]; - char buffer[120]; + char *term_putenv = NULL; + char *buffer = NULL; char *cp; #if defined(HAVE_SIZECHANGE) && !defined(USE_SLANG) && defined(NOTDEFINED) /* @@ -1034,14 +1093,14 @@ PUBLIC BOOLEAN setup ARGS1( * If the display was not set by a command line option then * see if it is available from the environment . */ - if ((cp = getenv(DISPLAY)) != NULL && *cp != '\0') { - StrAllocCopy(display, cp); + if ((cp = LYgetXDisplay()) != NULL) { + StrAllocCopy(x_display, cp); } else { - FREE(display); + FREE(x_display); } if (terminal != NULL) { - sprintf(term_putenv, "TERM=%s", terminal); + HTSprintf0(&term_putenv, "TERM=%.106s", terminal); (void) putenv(term_putenv); } @@ -1051,19 +1110,21 @@ PUBLIC BOOLEAN setup ARGS1( if (dumbterm(getenv("TERM"))) { char *s; - printf("\n\n Your Terminal type is unknown!\n\n"); - printf(" Enter a terminal type: [vt100] "); - *buffer = '\0'; - fgets(buffer, sizeof(buffer), stdin); - if ((s = strchr(buffer, '\n')) != NULL) - *s = '\0'; + printf("\n\n %s\n\n", gettext("Your Terminal type is unknown!")); + printf(" %s [vt100] ", gettext("Enter a terminal type:")); - if (strlen(buffer) == 0) - strcpy(buffer,"vt100"); + if (LYSafeGets(&buffer, stdin) != 0) + if ((s = strchr(buffer, '\n')) != NULL) + *s = '\0'; - sprintf(term_putenv,"TERM=%s", buffer); - putenv(term_putenv); - printf("\nTERMINAL TYPE IS SET TO %s\n",getenv("TERM")); + if (buffer == 0 || *buffer == 0) + StrAllocCopy(buffer,"vt100"); + + HTSprintf0(&term_putenv,"TERM=%.106s", buffer); + FREE(buffer); + + (void) putenv(term_putenv); + printf("\n%s %s\n", gettext("TERMINAL TYPE IS SET TO"), getenv("TERM")); sleep(MESSAGESECS); } @@ -1166,6 +1227,12 @@ PUBLIC void LYsubAttr ARGS1( PUBLIC void LYstartTargetEmphasis NOARGS { +#ifdef USE_COLOR_STYLE + if (s_whereis != NOSTYLE) { + curses_style(s_whereis, STACK_ON); + return; + } +#endif #if defined(FANCY_CURSES) || defined(USE_SLANG) start_bold(); start_reverse(); @@ -1175,6 +1242,12 @@ PUBLIC void LYstartTargetEmphasis NOARGS PUBLIC void LYstopTargetEmphasis NOARGS { +#ifdef USE_COLOR_STYLE + if (s_whereis != NOSTYLE) { + curses_style(s_whereis, STACK_OFF); + return; + } +#endif stop_underline(); #if defined(FANCY_CURSES) || defined(USE_SLANG) stop_reverse(); @@ -1225,7 +1298,6 @@ PUBLIC void LYstopTargetEmphasis NOARGS #include #include #include -#include #include #include #include @@ -1242,7 +1314,7 @@ PUBLIC void LYstopTargetEmphasis NOARGS #undef system #endif /* system */ #include -#include "LYVMSdef.h" +#include #define EFN 0 /* Event flag */ @@ -1295,25 +1367,20 @@ PUBLIC void VMSexit NOARGS if (!DidCleanup) { if (LYOutOfMemory == FALSE) { fprintf(stderr, -"\nA Fatal error has occurred in %s Ver. %s\n", LYNX_NAME, LYNX_VERSION); - fprintf(stderr, -"\nPlease notify your system administrator to confirm a bug, and if\n"); - fprintf(stderr, -"confirmed, to notify the lynx-dev list. Bug reports should have concise\n"); - fprintf(stderr, -"descriptions of the command and/or URL which causes the problem, the\n"); - fprintf(stderr, -"operating system name with version number, the TCPIP implementation, the\n"); +gettext("\nA Fatal error has occurred in %s Ver. %s\n"), LYNX_NAME, LYNX_VERSION); fprintf(stderr, -"TRACEBACK if it can be captured, and any other relevant information.\n"); +gettext("\nPlease notify your system administrator to confirm a bug, and if\n\ +confirmed, to notify the lynx-dev list. Bug reports should have concise\n\ +descriptions of the command and/or URL which causes the problem, the\n\ +operating system name with version number, the TCPIP implementation, the\n\ +TRACEBACK if it can be captured, and any other relevant information.\n")); if (LYTraceLogFP == NULL) { - fprintf(stderr,"\nPress RETURN to clean up: "); + fprintf(stderr,RETURN_TO_CLEANUP); (void) getchar(); } } else if (LYCursesON) { - _statusline(MEMORY_EXHAUSTED_ABORT); - sleep(AlertSecs); + HTAlert(MEMORY_EXHAUSTED_ABORT); } cleanup(); } @@ -1518,7 +1585,7 @@ again: * and VMSsignal() is just a "helper", also not a full emulation. */ -PUBLIC void *VMSsignal (sig,func) +PUBLIC void VMSsignal (sig,func) int sig; void (*func)(); { @@ -1577,7 +1644,7 @@ void (*func)(); * Exception-handler routines for regulating interrupts and enabling * Control-T during spawns. Includes TRUSTED flag for versions of VMS * which require it in captive accounts. This code should be used - * instead of the VAXC or DECC system(), by including LYSystem.h in + * instead of the VAXC or DECC system(), by including LYUtils.h in * modules which have system() calls. It helps ensure that we return * to Lynx instead of breaking out to DCL if a user issues interrupts * or generates an ACCVIO during spawns. @@ -1586,13 +1653,12 @@ void (*func)(); PRIVATE unsigned int DCLspawn_exception ARGS2( void *, sigarr, void *, mecharr) -{ #else PRIVATE int DCLspawn_exception ARGS2( void *, sigarr, void *, mecharr) -{ #endif /* __DECC */ +{ int status; status = lib$sig_to_ret(sigarr, mecharr); @@ -1618,10 +1684,11 @@ PRIVATE int spawn_DCLprocess ARGS1( #ifdef __ALPHA /** OpenVMS/AXP lacked the TRUSTED flag before v6.1 **/ if (VersionVMS[1] > '6' || (VersionVMS[1] == '6' && VersionVMS[2] == '.' && - VersionVMS[3] >= '1')) { + VersionVMS[3] >= '1')) #else - if (VersionVMS[1] >= '6') { + if (VersionVMS[1] >= '6') #endif /* __ALPHA */ + { /* * Include TRUSTED flag. */ @@ -1668,11 +1735,9 @@ PUBLIC void lynx_force_repaint NOARGS { #if defined(COLOR_CURSES) chtype a; -#ifndef USE_COLOR_STYLE if (LYShowColor >= SHOW_COLOR_ON) a = COLOR_BKGD; else -#endif a = A_NORMAL; bkgdset(a | ' '); #ifndef USE_COLOR_STYLE @@ -1703,7 +1768,9 @@ PUBLIC void lynx_start_link_color ARGS2( /* start_bold(); */ start_reverse(); #if defined(USE_SLANG) +#ifndef __DJGPP__ if (SLtt_Use_Ansi_Colors) +#endif /* !__DJGPP__ */ start_underline (); #endif /* USE_SLANG */ #if defined(FANCY_CURSES) && defined(COLOR_CURSES) @@ -1723,7 +1790,7 @@ PUBLIC void lynx_start_link_color ARGS2( PUBLIC void lynx_stop_link_color ARGS2( int, flag, - int, pending) + int, pending GCC_UNUSED) { #ifdef USE_COLOR_STYLE LynxChangeStyle(flag == ON ? s_alink : s_a, ABS_OFF, 0); @@ -1731,7 +1798,9 @@ PUBLIC void lynx_stop_link_color ARGS2( if (flag) { stop_reverse(); #if defined(USE_SLANG) +#ifndef __DJGPP__ if (SLtt_Use_Ansi_Colors) +#endif /* !__DJGPP__ */ stop_underline (); #endif /* USE_SLANG */ #if defined(FANCY_CURSES) && defined(COLOR_CURSES) diff --git a/gnu/usr.bin/lynx/src/LYCurses.h b/gnu/usr.bin/lynx/src/LYCurses.h index 41d04aea62d..bf0dc01414b 100644 --- a/gnu/usr.bin/lynx/src/LYCurses.h +++ b/gnu/usr.bin/lynx/src/LYCurses.h @@ -1,7 +1,9 @@ #ifndef LYCURSES_H #define LYCURSES_H -#include "userdefs.h" +#ifndef HTUTILS_H +#include +#endif /* * The simple color scheme maps the 8 combinations of bold/underline/reverse @@ -26,9 +28,6 @@ #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 #else /* Using curses: */ @@ -98,9 +97,14 @@ extern void LYsubwindow PARAMS((WINDOW * param)); # endif /* NCURSES */ +#if defined(NCURSES_VERSION) && defined(HAVE_DEFINE_KEY) +#include +#define USE_KEYMAPS 1 +#endif + #else # if defined(VMS) && defined(__GNUC__) -# include "LYGCurses.h" +# include # else # include /* everything else */ # endif /* VMS && __GNUC__ */ @@ -145,10 +149,6 @@ extern void LYbox PARAMS((WINDOW *win, BOOLEAN formfield)); extern int LYlines; /* replaces LINES */ extern int LYcols; /* replaces COLS */ -#ifndef HTUTILS_H -#include "HTUtils.h" -#endif /* HTUTILS_H */ - extern void start_curses NOPARAMS; extern void stop_curses NOPARAMS; extern BOOLEAN setup PARAMS((char *terminal)); @@ -156,24 +156,25 @@ extern void LYstartTargetEmphasis NOPARAMS; extern void LYstopTargetEmphasis NOPARAMS; #ifdef VMS +extern int DCLsystem (char *command); extern void VMSexit(); extern int ttopen(); extern int ttclose(); extern int ttgetc(); -extern void *VMSsignal PARAMS((int sig, void (*func)())); +extern void VMSsignal PARAMS((int sig, void (*func)())); #endif /* VMS */ #if defined(USE_COLOR_STYLE) extern void curses_css PARAMS((char * name, int dir)); -extern void curses_style PARAMS((int style, int dir, int previous)); -extern void curses_w_style PARAMS((WINDOW* win, int style, int dir, int previous)); +extern void curses_style PARAMS((int style, int dir)); +extern void curses_w_style PARAMS((WINDOW* win, int style, int dir)); extern void setHashStyle PARAMS((int style, int color, int cattr, int mono, char* element)); extern void setStyle PARAMS((int style, int color, int cattr, int mono)); extern void wcurses_css PARAMS((WINDOW * win, char* name, int dir)); -#define LynxChangeStyle curses_style +#define LynxChangeStyle(style,dir,previous) curses_style(style,dir) #else extern int slang_style PARAMS((int style, int dir, int previous)); -#define LynxChangeStyle slang_style +#define LynxChangeStyle(style,dir,previous) slang_style(style,dir,previous) #endif /* USE_COLOR_STYLE */ #if USE_COLOR_TABLE @@ -184,13 +185,19 @@ extern unsigned int Lynx_Color_Flags; #endif #ifdef USE_SLANG + #if !defined(VMS) && !defined(DJGPP) #define USE_SLANG_MOUSE 1 -#endif /* USE_SLANG */ +#endif + +#if !defined(__DJGPP__) +#define USE_KEYMAPS 1 +#endif #define SL_LYNX_USE_COLOR 1 #define SL_LYNX_USE_BLINK 2 #define SL_LYNX_OVERRIDE_COLOR 4 + #define start_bold() LYaddAttr(1) #define start_reverse() LYaddAttr(2) #define start_underline() LYaddAttr(4) @@ -205,6 +212,9 @@ extern unsigned int Lynx_Color_Flags; /* * Map some curses functions to slang functions. */ +#ifndef WINDOW +#define WINDOW void +#endif #define stdscr NULL #ifdef SLANG_MBCS_HACK extern int PHYSICAL_SLtt_Screen_Cols; @@ -288,9 +298,7 @@ extern void VTHome NOPARAMS; */ #if USE_COLOR_TABLE extern void LYaddWAttr PARAMS((WINDOW *win, int a)); -extern void LYaddAttr PARAMS((int a)); extern void LYsubWAttr PARAMS((WINDOW *win, int a)); -extern void LYsubAttr PARAMS((int a)); extern void LYaddWAttr PARAMS((WINDOW *win, int a)); extern void LYsubWAttr PARAMS((WINDOW *win, int a)); extern void lynx_set_color PARAMS((int a)); @@ -315,7 +323,11 @@ extern int lynx_chg_color PARAMS((int, int, int)); #else /* not UNDERLINE_LINKS: */ #define start_bold() LYaddAttr(A_BOLD) #define stop_bold() LYsubAttr(A_BOLD) +#ifdef USE_COLOR_STYLE +#define start_underline() attron(A_UNDERLINE) /* allow combining - kw */ +#else #define start_underline() LYaddAttr(A_UNDERLINE) +#endif /* USE_COLOR_STYLE */ #define stop_underline() LYsubAttr(A_UNDERLINE) #endif /* UNDERLINE_LINKS */ #if defined(SNAKE) && defined(HP_TERMINAL) @@ -333,6 +345,14 @@ extern int lynx_chg_color PARAMS((int, int, int)); #else /* Not FANCY_CURSES: */ +#ifdef COLOR_CURSES +#undef COLOR_CURSES +Error FANCY_CURSES +There is a problem with the configuration. We expect to have FANCY_CURSES +defined when COLOR_CURSES is defined, since we build on the attributes used in +FANCY_CURSES. Check your config.log to see why the FANCY_CURSES test failed. +#endif + /* * We only have [w]standout() and [w]standin(), * so we'll use them synonymously for bold and @@ -378,4 +398,24 @@ extern void lynx_start_radio_color NOPARAMS; extern void lynx_stop_radio_color NOPARAMS; extern void lynx_stop_all_colors NOPARAMS; +/* + * To prevent corrupting binary data on DOS, MS-WINDOWS or OS/2 we open files + * and stdout in BINARY mode by default. Where necessary we should open and + * (close!) TEXT mode. + * + * Note: EMX has no corresponding variable like _fmode on DOS, but it does + * have setmode. + */ +#if defined(_WINDOWS) || defined(DJGPP) || defined(__EMX__) +#define SetOutputMode(mode) setmode(fileno(stdout), mode) +#else +#define SetOutputMode(mode) /* nothing */ +#endif + +#if defined(_WINDOWS) || defined(DJGPP) +#define SetDefaultMode(mode) _fmode = mode +#else +#define SetDefaultMode(mode) /* nothing */ +#endif + #endif /* LYCURSES_H */ diff --git a/gnu/usr.bin/lynx/src/LYDownload.c b/gnu/usr.bin/lynx/src/LYDownload.c index bc047b87a41..eaf1690b43b 100644 --- a/gnu/usr.bin/lynx/src/LYDownload.c +++ b/gnu/usr.bin/lynx/src/LYDownload.c @@ -1,28 +1,14 @@ -#include "HTUtils.h" -#include "tcp.h" -#include "HTParse.h" -#include "HTList.h" -#include "HTAlert.h" -#include "LYCurses.h" -#include "LYUtils.h" -#include "LYGlobalDefs.h" -#include "LYSignal.h" -#include "LYStrings.h" -#include "LYClean.h" -#include "LYGetFile.h" -#include "LYDownload.h" -#include "LYSystem.h" -#ifdef VMS -#include "HTVMSUtils.h" -#endif /* VMS */ -#ifdef DOSPATH -#include "HTDOS.h" -#endif - -#include "LYexit.h" -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include /* * LYDownload takes a URL and downloads it using a user selected @@ -33,11 +19,10 @@ * LYNXDOWNLOAD://Method=<#>/File=/SugFile= */ #ifdef VMS -#define COPY_COMMAND "copy/nolog/noconf %s %s" PUBLIC BOOLEAN LYDidRename = FALSE; #endif /* VMS */ -PRIVATE char LYValidDownloadFile[256] = "\0"; +PRIVATE char LYValidDownloadFile[LY_MAXPATH] = "\0"; PUBLIC void LYDownload ARGS1( char *, line) @@ -45,11 +30,11 @@ PUBLIC void LYDownload ARGS1( char *Line = NULL, *method, *file, *sug_file = NULL; int method_number; int count; - char buffer[512]; - char command[512]; - char *cp, *cp1; + char *the_command = 0; + char buffer[LY_MAXPATH]; + char command[LY_MAXPATH]; + char *cp; lynx_html_item_type *download_command = 0; - int c, len; FILE *fp; int ch, recall; int FnameTotal; @@ -57,7 +42,6 @@ PUBLIC void LYDownload ARGS1( BOOLEAN FirstRecall = TRUE; BOOLEAN SecondS = FALSE; #ifdef VMS - extern BOOLEAN HadVMSInterrupt; LYDidRename = FALSE; #endif /* VMS */ @@ -85,6 +69,7 @@ PUBLIC void LYDownload ARGS1( * Go past "SugFile=". */ sug_file += 8; + HTUnEscape(sug_file); } if ((file = (char *)strstr(Line, "File=")) == NULL) @@ -104,6 +89,7 @@ PUBLIC void LYDownload ARGS1( } #ifdef DIRED_SUPPORT + /* FIXME: use HTLocalName */ if (!strncmp(file, "file://localhost", 16)) file += 16; else if (!strncmp(file, "file:", 5)) @@ -214,114 +200,41 @@ check_recall: goto cancelled; } - if (no_dotfiles || !show_dotfiles) { - if (*buffer == '.' || -#ifdef VMS - ((cp = strrchr(buffer, ':')) && *(cp+1) == '.') || - ((cp = strrchr(buffer, ']')) && *(cp+1) == '.') || -#endif /* VMS */ - ((cp = strrchr(buffer, '/')) && *(cp+1) == '.')) { - HTAlert(FILENAME_CANNOT_BE_DOT); - _statusline(NEW_FILENAME_PROMPT); - FirstRecall = TRUE; - FnameNum = FnameTotal; - goto retry; - } - } - /* - * Cancel if the user entered "/dev/null" on Unix, - * or an "nl:" path (case-insensitive) on VMS. - FM - */ -#ifdef VMS - if (!strncasecomp(buffer, "nl:", 3) || - !strncasecomp(buffer, "/nl/", 4)) -#else - if (!strcmp(buffer, "/dev/null")) -#endif /* VMS */ - { + strcpy(command, buffer); + if (!LYValidateFilename(buffer, command)) goto cancelled; +#if HAVE_POPEN + else if (LYIsPipeCommand(buffer)) { + /* I don't know how to download to a pipe */ + HTAlert(CANNOT_WRITE_TO_FILE); + _statusline(NEW_FILENAME_PROMPT); + FirstRecall = TRUE; + FnameNum = FnameTotal; + goto retry; } - if ((cp = strchr(buffer, '~'))) { - *(cp++) = '\0'; - strcpy(command, buffer); - if ((len = strlen(command)) > 0 && command[len-1] == '/') - command[len-1] = '\0'; -#ifdef DOSPATH - strcat(command, HTDOS_wwwName((char *)Home_Dir())); -#else -#ifdef VMS - strcat(command, HTVMS_wwwName((char *)Home_Dir())); -#else - strcat(command, Home_Dir()); -#endif /* VMS */ -#endif /* DOSPATH */ - strcat(command, cp); - strcpy(buffer, command); - } -#ifdef VMS - if (strchr(buffer, '/') != NULL) { - strcpy(command, HTVMS_name("", buffer)); - strcpy(buffer, command); - } - if (buffer[0] != '/' && strchr(buffer, ':') == NULL) { - strcpy(command, "sys$disk:"); - if (strchr(buffer, ']') == NULL) - strcat(command, "[]"); - strcat(command, buffer); - strcpy(buffer, command); - } -#else - if (*buffer != '/') - cp = getenv("PWD"); - else - cp = NULL; - if (cp) { - sprintf(command, "%s/%s", cp, buffer); -#ifdef DOSPATH - strcpy(buffer, HTDOS_name(command)); -#else - strcpy(buffer, command); #endif - } -#endif /* VMS */ /* * See if it already exists. */ - if ((fp = fopen(buffer, "r")) != NULL) { - fclose(fp); - -#ifdef VMS - _statusline(FILE_EXISTS_HPROMPT); -#else - _statusline(FILE_EXISTS_OPROMPT); -#endif /* VMS */ - c = 0; - while(TOUPPER(c)!='Y' && TOUPPER(c)!='N' && c != 7 && c != 3) - c = LYgetch(); -#ifdef VMS - if (HadVMSInterrupt) { - HadVMSInterrupt = FALSE; - FREE(Line); - return; - } -#endif /* VMS */ - - if (c == 7 || c == 3) { /* Control-G or Control-C */ - goto cancelled; - } - - if (TOUPPER(c) == 'N') { - _statusline(NEW_FILENAME_PROMPT); - FirstRecall = TRUE; - FnameNum = FnameTotal; - goto retry; - } + switch (LYValidateOutput(buffer)) { + case 'Y': + break; + case 'N': + _statusline(NEW_FILENAME_PROMPT); + FirstRecall = TRUE; + FnameNum = FnameTotal; + goto retry; + default: + FREE(Line); + return; } /* * See if we can write to it. */ + CTRACE(tfp, "LYDownload: filename is %s", buffer); + if ((fp = fopen(buffer, "w")) != NULL) { fclose(fp); remove(buffer); @@ -334,30 +247,18 @@ check_recall: } SecondS = TRUE; - _statusline(SAVING); - sleep(InfoSecs); + HTInfoMsg(SAVING); #ifdef VMS /* * Try rename() first. - FM */ - if (TRACE) - fprintf(stderr, "command: rename(%s, %s)\n", file, buffer); + CTRACE(tfp, "command: rename(%s, %s)\n", file, buffer); if (rename(file, buffer)) { /* * Failed. Use spawned COPY_COMMAND. - FM */ - if (TRACE) - fprintf(stderr, " FAILED!\n"); - sprintf(command, COPY_COMMAND, file, buffer); - if (TRACE) - fprintf(stderr, "command: %s\n", command); - fflush(stderr); - fflush(stdout); - stop_curses(); - system(command); - fflush(stdout); - fflush(stderr); - start_curses(); + CTRACE(tfp, " FAILED!\n"); + LYCopyFile(file, buffer); } else { /* * We don't have the temporary file (it was renamed to @@ -368,23 +269,9 @@ check_recall: } chmod(buffer, HIDE_CHMOD); #else /* Unix: */ - /* - * Prevent spoofing of the shell. - */ - cp = quote_pathname(file); - cp1 = quote_pathname(buffer); - sprintf(command, "%s %s %s", COPY_PATH, cp, cp1); - FREE(cp); - FREE(cp1); - if (TRACE) - fprintf(stderr, "command: %s\n", command); - fflush(stderr); - fflush(stdout); - stop_curses(); - system(command); - fflush(stdout); - fflush(stderr); - start_curses(); + + LYCopyFile(file, buffer); + #if defined(UNIX) LYRelaxFilePermissions(buffer); #endif /* defined(UNIX) */ @@ -409,11 +296,10 @@ check_recall: * Check for two '%s' and ask for the local filename if * there is. */ - char *first_s = strstr(download_command->command, "%s"); - if (first_s && strstr(first_s+1, "%s")) { + if (HTCountCommandArgs(download_command->command) >= 2) { _statusline(FILENAME_PROMPT); again: if (sug_file) - strcpy(buffer, sug_file); + strncpy(buffer, sug_file, (sizeof(buffer)/2) - 1); else *buffer = '\0'; check_again: @@ -496,12 +382,7 @@ check_recall: } if (no_dotfiles || !show_dotfiles) { - if (*buffer == '.' || -#ifdef VMS - ((cp = strrchr(buffer, ':')) && *(cp+1) == '.') || - ((cp = strrchr(buffer, ']')) && *(cp+1) == '.') || -#endif /* VMS */ - ((cp = strrchr(buffer, '/')) && *(cp+1) == '.')) { + if (*LYPathLeaf(buffer) == '.') { HTAlert(FILENAME_CANNOT_BE_DOT); _statusline(NEW_FILENAME_PROMPT); goto again; @@ -530,35 +411,21 @@ check_recall: * It actually is not a bug at all and does as it should, * putting both names on the command line. */ -#ifdef VMS - sprintf(command, download_command->command, file, buffer, - "", "", "", "", "", "", "", "", "", ""); -#else /* Unix: */ - /* - * Prevent spoofing of the shell. - */ - cp = quote_pathname(file); - cp1 = quote_pathname(buffer); - sprintf(command, download_command->command, cp, cp1, - "", "", "", "", "", "", "", "", "", ""); - FREE(cp); - FREE(cp1); -#endif /* VMS */ + count = 1; + HTAddParam(&the_command, download_command->command, count, file); + if (HTCountCommandArgs(download_command->command) > 1) + HTAddParam(&the_command, download_command->command, ++count, buffer); + HTEndParam(&the_command, download_command->command, count); } else { - _statusline(MISCONF_DOWNLOAD_COMMAND); - sleep(AlertSecs); + HTAlert(MISCONF_DOWNLOAD_COMMAND); goto failed; } - if (TRACE) - fprintf(stderr, "command: %s\n", command); + CTRACE(tfp, "command: %s\n", the_command); stop_curses(); - fflush(stderr); - fflush(stdout); - system(command); - fflush(stderr); - fflush(stdout); + LYSystem(the_command); + FREE(the_command); start_curses(); /* don't remove(file); */ } @@ -582,21 +449,19 @@ check_recall: return; failed: - _statusline(CANNOT_DOWNLOAD_FILE); - sleep(AlertSecs); + HTAlert(CANNOT_DOWNLOAD_FILE); FREE(Line); return; cancelled: - _statusline(CANCELLING); - sleep(InfoSecs); + HTInfoMsg(CANCELLING); FREE(Line); return; } /* * LYdownload_options writes out the current download choices to - * a file so that the user can select printers in the same way that + * a file so that the user can select downloaders in the same way that * they select all other links. Download links look like: * LYNXDOWNLOAD://Method=<#>/File=/SugFile= */ @@ -604,90 +469,86 @@ PUBLIC int LYdownload_options ARGS2( char **, newfile, char *, data_file) { - static char tempfile[256]; - static BOOLEAN first = TRUE; - static char download_filename[256]; + static char tempfile[LY_MAXPATH]; + char *downloaded_url = NULL; char *sug_filename = NULL; FILE *fp0; lynx_html_item_type *cur_download; int count; - if (first) { - tempname(tempfile, NEW_FILE); - first = FALSE; -#if defined (VMS) || defined (DOSPATH) - sprintf(download_filename, "file://localhost/%s", tempfile); -#else - sprintf(download_filename, "file://localhost%s", tempfile); -#endif /* VMS */ -#ifdef VMS - } else { - remove(tempfile); /* Remove duplicates on VMS. */ -#endif /* VMS */ - } - /* * Get a suggested filename. */ StrAllocCopy(sug_filename, *newfile); change_sug_filename(sug_filename); - if ((fp0 = LYNewTxtFile(tempfile)) == NULL) { + LYRemoveTemp(tempfile); + if ((fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w")) == NULL) { HTAlert(CANNOT_OPEN_TEMP); return(-1); } + StrAllocCopy(downloaded_url, *newfile); + LYLocalFileToURL(newfile, tempfile); LYstrncpy(LYValidDownloadFile, data_file, (sizeof(LYValidDownloadFile) - 1)); - StrAllocCopy(*newfile, download_filename); LYforce_no_cache = TRUE; /* don't cache this doc */ - fprintf(fp0, "\n%s\n\n\n", - DOWNLOAD_OPTIONS_TITLE); - fprintf(fp0,"

                            Download Options (%s Version %s)

                            \n",
                            -				       LYNX_NAME, LYNX_VERSION);
                            +    BeginInternalPage(fp0, DOWNLOAD_OPTIONS_TITLE, DOWNLOAD_OPTIONS_HELP);
                            +
                            +    fprintf(fp0, "
                            \n");
                            +    fprintf(fp0, "%s %s\n",
                            +    	    gettext("Downloaded link:"),
                            +	    downloaded_url);
                            +    FREE(downloaded_url);
                             
                            +    fprintf(fp0, "%s %s\n",
                            +    	    gettext("Suggested file name:"),
                            +	    sug_filename);
                             
                            -    fprintf(fp0, "   You have the following download choices.\n");
                            -    fprintf(fp0, "   Please select one:\n\n");
                            +    fprintf(fp0, "\n%s\n",
                            +	    (user_mode == NOVICE_MODE)
                            +	    ? gettext("Standard download options:")
                            +	    : gettext("Download options:"));
                             
                            -    if(!no_disk_save && !child_lynx)
                            +    if (!no_disk_save && !child_lynx) {
                             #ifdef DIRED_SUPPORT
                             	/*
                             	 *  Disable save to disk option for local files.
                             	 */
                             	if (!lynx_edit_mode)
                             #endif /* DIRED_SUPPORT */
                            -	    fprintf(fp0,"   \
                            -Save to disk\n",
                            -	   data_file, (lynx_save_space ? lynx_save_space : ""), sug_filename);
                            -#ifdef DIRED_SUPPORT
                            -	else {}
                            -#endif /* DIRED_SUPPORT */
                            -    else
                            -	fprintf(fp0,"   Save to disk disabled.\n");
                            +	fprintf(fp0,
                            +		"   %s\n",
                            +		data_file,
                            +		(lynx_save_space ? lynx_save_space : ""),
                            +		sug_filename,
                            +		gettext("Save to disk"));
                            +    } else {
                            +	fprintf(fp0, "   %s\n", gettext("Save to disk disabled."));
                            +    }
                            +
                            +    if (user_mode == NOVICE_MODE)
                            +	fprintf(fp0, "\n%s\n", gettext("Local additions:"));
                             
                                 if (downloaders != NULL) {
                             	for (count = 0, cur_download = downloaders; cur_download != NULL;
                             			cur_download = cur_download->next, count++) {
                             	    if (!no_download || cur_download->always_enabled) {
                            -		fprintf(fp0,"   \
                            -",
                            -				count,data_file, sug_filename);
                            -		fprintf(fp0, (cur_download->name ?
                            -				cur_download->name : "No Name Given"));
                            +		fprintf(fp0, "   ",
                            +			count,data_file, sug_filename);
                            +		fprintf(fp0, "%s", (cur_download->name ?
                            +			cur_download->name : gettext("No Name Given")));
                             		fprintf(fp0,"\n");
                             	    }
                             	}
                            -    } else {
                            -	fprintf(fp0, "\n\
                            -No other download methods have been defined yet.  You may define\n\
                            -an unlimited number of download methods using the lynx.cfg file.\n");
                                 }
                            -    fprintf(fp0, "
                            \n\n"); - fclose(fp0); + + fprintf(fp0, "
                            \n"); + EndInternalPage(fp0); + LYCloseTempFP(fp0); /* * Free off temp copy. diff --git a/gnu/usr.bin/lynx/src/LYDownload.h b/gnu/usr.bin/lynx/src/LYDownload.h index 21cd30dd481..aeed2b1980b 100644 --- a/gnu/usr.bin/lynx/src/LYDownload.h +++ b/gnu/usr.bin/lynx/src/LYDownload.h @@ -3,13 +3,11 @@ #define LYDOWNLOAD_H #ifndef LYSTRUCTS_H -#include "LYStructs.h" +#include #endif /* LYSTRUCTS_H */ extern void LYDownload PARAMS((char *line)); extern int LYdownload_options PARAMS((char **newfile, char *data_file)); -#define DOWNLOAD_OPTIONS_TITLE "Lynx Download Options" - #endif /* LYDOWNLOAD_H */ diff --git a/gnu/usr.bin/lynx/src/LYEdit.c b/gnu/usr.bin/lynx/src/LYEdit.c index 2ab96cf4970..8e2ab7a9a23 100644 --- a/gnu/usr.bin/lynx/src/LYEdit.c +++ b/gnu/usr.bin/lynx/src/LYEdit.c @@ -1,32 +1,35 @@ -#include "HTUtils.h" -#include "tcp.h" -#include "HTParse.h" -#include "HTAlert.h" -#include "LYCurses.h" -#include "LYSignal.h" -#include "LYUtils.h" -#include "LYClean.h" -#include "LYGlobalDefs.h" -#include "LYEdit.h" -#include "LYStrings.h" -#include "LYSystem.h" +#include +#include +#include +#include +#include +#include +#include #ifdef VMS #include -#include "HTVMSUtils.h" #endif /* VMS */ -#ifdef DOSPATH -#include "HTDOS.h" -#endif -#include "LYLeaks.h" +#include -#define FREE(x) if (x) {free(x); x = NULL;} +PUBLIC BOOLEAN editor_can_position NOARGS +{ +#ifdef VMS + return (strstr(editor, "sedt") || strstr(editor, "SEDT")); +#else + return (strstr(editor, "emacs") || strstr(editor, "vi") || + strstr(editor, "pico") || strstr(editor, "jove") || + strstr(editor, "jed") || strstr(editor, "joe") || + strstr(editor, "jstar") || strstr(editor, "jmacs") || + strstr(editor, "rjoe") || strstr(editor, "jpico")); +#endif +} /* - * In edit mode invoke either emacs, vi, pico, jove, jed sedt or the - * default editor to display and edit the current file. - * For emacs, vi, pico, jove and jed, Lynx will open the file to the - * same line that the screen cursor is on when editing is invoked. + * In edit mode invoke the given (or default) editor to display and edit the + * current file. For editors listed in 'editor_can_position()', Lynx + * will open the file to the same line that the screen cursor is on (or + * close...) when editing is invoked. + * * Returns FALSE if file is uneditable. */ PUBLIC int edit_current_file ARGS3( @@ -34,17 +37,20 @@ PUBLIC int edit_current_file ARGS3( int, cur, int, lineno) { - char command[512]; + int result = FALSE; + int params = 1; + char *format = "%s %s"; + char *command = NULL; char *filename = NULL; char *colon, *number_sign; + char position[80]; FILE *fp; /* * If its a remote file then we can't edit it. */ if (!LYisLocalFile(newfile)) { - _statusline(CANNOT_EDIT_REMOTE_FILES); - sleep(MessageSecs); + HTUserMsg(CANNOT_EDIT_REMOTE_FILES); return FALSE; } @@ -61,7 +67,7 @@ PUBLIC int edit_current_file ARGS3( * * On VMS, only try the path. */ -#if !defined (VMS) && !defined (DOSPATH) +#if !defined (VMS) && !defined (DOSPATH) && !defined (__EMX__) colon = strchr(newfile, ':'); StrAllocCopy(filename, (colon + 1)); HTUnEscape(filename); @@ -70,23 +76,14 @@ PUBLIC int edit_current_file ARGS3( #endif /* !VMS */ filename = HTParse(newfile, "", PARSE_PATH+PARSE_PUNCTUATION); HTUnEscape(filename); -#ifdef DOSPATH - if (strlen(filename)>1) filename++; -#endif -#ifdef DOSPATH - if ((fp = fopen(HTDOS_name(filename),"r")) == NULL) { -#else -#ifdef VMS - if ((fp = fopen(HTVMS_name("", filename), "r")) == NULL) { -#else - if ((fp = fopen(filename, "r")) == NULL) { -#endif /* VMS */ -#endif /* DOSPATH */ + StrAllocCopy(filename, HTSYS_name(filename)); + if ((fp = fopen(filename, "r")) == NULL) + { HTAlert(COULD_NOT_ACCESS_FILE); - FREE(filename); - goto failure; + CTRACE(tfp, "filename: '%s'\n", filename); + goto done; } -#if !defined (VMS) && !defined (DOSPATH) +#if !defined (VMS) && !defined (DOSPATH) && !defined (__EMX__) } #endif /* !VMS */ fclose(fp); @@ -95,18 +92,10 @@ PUBLIC int edit_current_file ARGS3( /* * Don't allow editing if user lacks append access. */ -#ifdef DOSPATH - if ((fp = fopen(HTDOS_name("", filename), "a")) == NULL) { -#else -#ifdef VMS - if ((fp = fopen(HTVMS_name("", filename), "a")) == NULL) { -#else - if ((fp = fopen(filename, "a")) == NULL) { -#endif /* VMS */ -#endif /* DOSPATH */ - _statusline(NOAUTH_TO_EDIT_FILE); - sleep(MessageSecs); - goto failure; + if ((fp = fopen(filename, "a")) == NULL) + { + HTUserMsg(NOAUTH_TO_EDIT_FILE); + goto done; } fclose(fp); #endif /* VMS || CANT_EDIT_UNWRITABLE_FILES */ @@ -121,69 +110,54 @@ PUBLIC int edit_current_file ARGS3( /* * Set up the command for the editor. - FM */ + *position = 0; #ifdef VMS - if ((strstr(editor, "sedt") || strstr(editor, "SEDT")) && - ((lineno - 1) + (nlinks ? links[cur].ly : 0)) > 0) { - sprintf(command, "%s %s -%d", - editor, - HTVMS_name("", filename), - ((lineno - 1) + (nlinks ? links[cur].ly : 0))); - } else { - sprintf(command, "%s %s", editor, HTVMS_name("", filename)); - } -#else - if (strstr(editor, "emacs") || strstr(editor, "vi") || - strstr(editor, "pico") || strstr(editor, "jove") || - strstr(editor, "jed")) - sprintf(command, "%s +%d \"%s\"", - editor, - (lineno + (nlinks ? links[cur].ly : 0)), -#ifdef DOSPATH - HTDOS_name(filename)); -#else - filename); -#endif /* DOSPATH */ - else -#ifdef __DJGPP__ - sprintf(command, "%s %s", editor, HTDOS_name(filename)); -#else - sprintf(command, "%s \"%s\"", editor, -#ifdef DOSPATH - HTDOS_name(filename)); + lineno--; +#endif + lineno += (nlinks ? links[cur].ly : 0); + if (lineno > 0) + sprintf(position, "%d", lineno); + + if (editor_can_position() && *position) { +#ifdef VMS + format = "%s %s -%s"; + HTAddXpand(&command, format, params++, editor); + HTAddParam(&command, format, params++, filename); + HTAddParam(&command, format, params++, position); + HTEndParam(&command, format, params); #else - filename); -#endif /* DOSPATH */ -#endif /* __DJGPP__ */ -#endif /* VMS */ - if (TRACE) { - fprintf(stderr, "LYEdit: %s\n", command); - sleep(MessageSecs); + format = "%s +%s %s"; + HTAddXpand(&command, format, params++, editor); + HTAddParam(&command, format, params++, position); + HTAddParam(&command, format, params++, filename); + HTEndParam(&command, format, params); +#endif + } else { + HTAddXpand(&command, format, params++, editor); + HTAddParam(&command, format, params++, filename); + HTEndParam(&command, format, params); } - FREE(filename); + + CTRACE(tfp, "LYEdit: %s\n", command); + CTRACE_SLEEP(MessageSecs); /* * Invoke the editor. - FM */ - fflush(stderr); - fflush(stdout); stop_curses(); - system(command); - fflush(stdout); - fflush(stderr); + LYSystem(command); start_curses(); - /* - * Restore the fragment if there was one. - FM - */ - if (number_sign) - *number_sign = '#'; - return TRUE; + result = TRUE; -failure: +done: /* * Restore the fragment if there was one. - FM */ if (number_sign) *number_sign = '#'; - return FALSE; + + FREE(command); + FREE(filename); + return (result); } diff --git a/gnu/usr.bin/lynx/src/LYEdit.h b/gnu/usr.bin/lynx/src/LYEdit.h index 08c07625081..84fec84a281 100644 --- a/gnu/usr.bin/lynx/src/LYEdit.h +++ b/gnu/usr.bin/lynx/src/LYEdit.h @@ -1,7 +1,12 @@ - #ifndef LYEDIT_H #define LYEDIT_H +#ifndef HTUTILS_H +#include +#endif + extern int edit_current_file PARAMS((char *newfile, int cur, int lineno)); +extern BOOLEAN editor_can_position NOPARAMS; + #endif /* LYEDIT_H */ diff --git a/gnu/usr.bin/lynx/src/LYEditmap.c b/gnu/usr.bin/lynx/src/LYEditmap.c index 54c146ff9f4..d7ebebb7363 100644 --- a/gnu/usr.bin/lynx/src/LYEditmap.c +++ b/gnu/usr.bin/lynx/src/LYEditmap.c @@ -2,24 +2,24 @@ Keybindings for line and form editting. */ -#include "HTUtils.h" -#include "tcp.h" -#include "LYStrings.h" +#include +#include +#include /* only for KEYMAP_SIZE - kw */ PUBLIC int current_lineedit = 0; /* Index into LYLineEditors[] */ /* * See LYStrings.h for the LYE definitions. */ -PRIVATE char DefaultEditBinding[]={ +PRIVATE char DefaultEditBinding[KEYMAP_SIZE-1]={ LYE_NOP, LYE_BOL, LYE_DELPW, LYE_ABORT, /* nul ^A ^B ^C */ -LYE_DELC, LYE_EOL, LYE_DELNW, LYE_ABORT, +LYE_DELN, LYE_EOL, LYE_DELNW, LYE_ABORT, /* ^D ^E ^F ^G */ -LYE_DELP, LYE_ENTER, LYE_ENTER, LYE_LOWER, +LYE_DELP, LYE_TAB, LYE_ENTER, LYE_LOWER, /* bs tab nl ^K */ LYE_NOP, LYE_ENTER, LYE_FORWW, LYE_ABORT, @@ -34,7 +34,7 @@ LYE_UPPER, LYE_ERASE, LYE_LKCMD, LYE_NOP, LYE_ERASE, LYE_NOP, LYE_NOP, LYE_NOP, /* ^X ^Y ^Z ESC */ -LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_SWMAP, LYE_DELEL, /* ^\ ^] ^^ ^_ */ /* sp .. RUBOUT */ @@ -100,24 +100,383 @@ LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, -/* 100..10E function key definitions in LYStrings.h */ -LYE_NOP, LYE_NOP, LYE_FORW, LYE_BACK, +/* 100..10F function key definitions in LYStrings.h */ +LYE_FORM_PASS, LYE_FORM_PASS, LYE_FORW, LYE_BACK, /* UPARROW DNARROW RTARROW LTARROW */ -LYE_NOP, LYE_NOP, LYE_BOL, LYE_EOL, +LYE_FORM_PASS, LYE_FORM_PASS, LYE_BOL, LYE_EOL, /* PGDOWN PGUP HOME END */ +#if (defined(_WINDOWS) || defined(__DJGPP__)) + +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +/* F1 */ + +#else + LYE_NOP, LYE_TAB, LYE_BOL, LYE_EOL, /* F1 Do key Find key Select key */ -LYE_NOP, LYE_DELP, LYE_NOP, LYE_NOP, -/* Insert key Remove key DO_NOTHING ... */ +#endif /* _WINDOWS || __DJGPP__ */ + +LYE_NOP, LYE_DELP, LYE_NOP, LYE_FORM_PASS, +/* Insert key Remove key DO_NOTHING Back tab */ + +/* 110..18F */ +#if (defined(_WINDOWS) || defined(__DJGPP__)) && defined(USE_SLANG) && !defined(DJGPP_KEYHANDLER) + +LYE_DELP, LYE_ENTER, LYE_NOP, LYE_NOP, +/* Backspace Enter */ + +#else + +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, + +#endif /* USE_SLANG &&(_WINDOWS || __DJGPP) && !DJGPP_KEYHANDLER */ + +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +/* MOUSE_KEY */ +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +/* 190..20F */ + +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +/* 210..28F */ + +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +/* 290..293 */ +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, }; /* - * Add your favorite key binding HERE + * Add your favorite key bindings HERE */ +/* KED-01 */ /* Default except: ^B=cursor-backward, ^F=cursor-forward, */ + /* ^K=delete-to-EOL, ^X=delete-to-BOL, */ + /* ^R=delete-prev-word, ^T=delete-next-word, */ + /* ^^=upper-case-line, ^_=lower-case-line */ +/* Why the difference for tab? - kw */ + +#ifdef EXP_ALT_BINDINGS +PRIVATE char BetterEditBinding[KEYMAP_SIZE-1]={ + +LYE_NOP, LYE_BOL, LYE_BACK, LYE_ABORT, +/* nul ^A ^B ^C */ + +LYE_DELN, LYE_EOL, LYE_FORW, LYE_ABORT, +/* ^D ^E ^F ^G */ + +LYE_DELP, LYE_ENTER, LYE_ENTER, LYE_DELEL, +/* bs tab nl ^K */ + +LYE_NOP, LYE_ENTER, LYE_FORWW, LYE_ABORT, +/* ^L cr ^N ^O */ + +LYE_BACKW, LYE_NOP, LYE_DELPW, LYE_NOP, +/* ^P XON ^R XOFF */ + +LYE_DELNW, LYE_ERASE, LYE_LKCMD, LYE_NOP, +/* ^T ^U ^V ^W */ + +LYE_DELBL, LYE_NOP, LYE_NOP, LYE_NOP, +/* ^X ^Y ^Z ESC */ + +LYE_NOP, LYE_NOP, LYE_UPPER, LYE_LOWER, +/* ^\ ^] ^^ ^_ */ + +/* sp .. RUBOUT */ +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_DELP, + +/* 80..9F ISO-8859-1 8-bit escape characters. */ +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_AIX, +/* 97 AIX */ +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, + +/* A0..FF (permissible ISO-8859-1) 8-bit characters. */ +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, +LYE_CHAR, LYE_CHAR, LYE_CHAR, LYE_CHAR, + +/* 100..10E function key definitions in LYStrings.h */ +LYE_FORM_PASS, LYE_FORM_PASS, LYE_FORW, LYE_BACK, +/* UPARROW DNARROW RTARROW LTARROW */ + +LYE_FORM_PASS, LYE_FORM_PASS, LYE_BOL, LYE_EOL, +/* PGDOWN PGUP HOME END */ + +#if (defined(_WINDOWS) || defined(__DJGPP__)) + +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +/* F1 */ + +#else + +LYE_NOP, LYE_TAB, LYE_BOL, LYE_EOL, +/* F1 Do key Find key Select key */ + +#endif /* _WINDOWS || __DJGPP__ */ + +LYE_NOP, LYE_DELP, LYE_NOP, LYE_FORM_PASS, +/* Insert key Remove key DO_NOTHING Back tab */ + +/* 110..18F */ +#if (defined(_WINDOWS) || defined(__DJGPP__)) && defined(USE_SLANG) && !defined(DJGPP_KEYHANDLER) + +LYE_DELP, LYE_ENTER, LYE_NOP, LYE_NOP, +/* Backspace Enter */ + +#else + +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, + +#endif /* USE_SLANG &&(_WINDOWS || __DJGPP) && !DJGPP_KEYHANDLER */ + +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +/* MOUSE_KEY */ +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +/* 190..20F */ + +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +/* 210..28F */ + +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +/* 290..293 */ +LYE_NOP, LYE_NOP, LYE_NOP, LYE_NOP, +}; +#endif + /* * Add the array name to LYLineEditors @@ -125,6 +484,9 @@ LYE_NOP, LYE_DELP, LYE_NOP, LYE_NOP, PUBLIC char * LYLineEditors[]={ DefaultEditBinding, /* You can't please everyone, so you ... DW */ +#ifdef EXP_ALT_BINDINGS + BetterEditBinding, /* No, you certainly can't ... /ked 10/27/98*/ +#endif }; /* @@ -132,8 +494,11 @@ PUBLIC char * LYLineEditors[]={ * The order of LYLineEditors and LyLineditNames MUST be the same */ PUBLIC char * LYLineeditNames[]={ - "Default Binding ", - (char *) 0 + "Default Binding", +#ifdef EXP_ALT_BINDINGS + "Alternate Bindings", +#endif + (char *) 0 }; /* diff --git a/gnu/usr.bin/lynx/src/LYExtern.c b/gnu/usr.bin/lynx/src/LYExtern.c index 9e793a04791..5fb378407c3 100644 --- a/gnu/usr.bin/lynx/src/LYExtern.c +++ b/gnu/usr.bin/lynx/src/LYExtern.c @@ -15,83 +15,45 @@ See lynx.cfg for other info. */ -#include "tcp.h" -#include "LYGlobalDefs.h" -#include "LYUtils.h" -#include "LYExtern.h" -#include "LYCurses.h" - -#include "LYLeaks.h" +#include #ifdef USE_EXTERNALS -#define FREE(x) if (x) {free(x); x = NULL;} - -void run_external ARGS1(char *, c) -{ - char command[1024]; - lynx_html_item_type *externals2=0; - if (externals == NULL) return; +#include +#include +#include +#include +#include - for(externals2=externals; externals2 != NULL; - externals2=externals2->next) - { - -#ifdef _WINDOWS - if (!strnicmp(externals2->name,c,strlen(externals2->name))) -#else - if (!strncasecomp(externals2->name,c,strlen(externals2->name))) -#endif - { - char *cp; +void run_external ARGS1(char *, cmd) +{ + char *the_command = 0; + lynx_html_item_type *ext = 0; - if(no_externals && !externals2->always_enabled) - { - statusline(EXTERNALS_DISABLED); - sleep(MessageSecs); - return; - } + for (ext = externals; ext != NULL; ext = ext->next) { - /* Too dangerous to leave any URL that may come along unquoted. - * They often contain '&', ';', and '?' chars, and who knows - * what else may occur. - * Prevent spoofing of the shell. - * Dunno how this needs to be modified for VMS or DOS. - kw - */ -#if defined(VMS) || defined(DOSPATH) - sprintf(command, externals2->command, c); -#else /* Unix or DOS/Win: */ - cp = quote_pathname(c); - sprintf(command, externals2->command, cp); - FREE(cp); -#endif /* VMS */ + if (ext->command != 0 + && !strncasecomp(ext->name, cmd, strlen(ext->name))) { - if (*command != '\0') - { + if (no_externals && !ext->always_enabled) { + HTUserMsg(EXTERNALS_DISABLED); + } else { - statusline(command); - sleep(MessageSecs); + HTAddParam(&the_command, ext->command, 1, cmd); + HTEndParam(&the_command, ext->command, 1); - stop_curses(); - fflush(stdout); -#ifdef __DJGPP__ - __djgpp_set_ctrl_c(0); - _go32_want_ctrl_break(1); -#endif /* __DJGPP__ */ - system(command); -#ifdef __DJGPP__ - __djgpp_set_ctrl_c(1); - _go32_want_ctrl_break(0); -#endif /* __DJGPP__ */ + HTUserMsg(the_command); - fflush(stdout); - start_curses(); - } + stop_curses(); + LYSystem(the_command); + FREE(the_command); + start_curses(); + } - return; - } + break; } + } - return; + return; } #endif /* USE_EXTERNALS */ diff --git a/gnu/usr.bin/lynx/src/LYExtern.h b/gnu/usr.bin/lynx/src/LYExtern.h index 09983b47c98..094f4ddc6bf 100644 --- a/gnu/usr.bin/lynx/src/LYExtern.h +++ b/gnu/usr.bin/lynx/src/LYExtern.h @@ -2,7 +2,7 @@ #define EXTERNALS_H #ifndef LYSTRUCTS_H -#include "LYStructs.h" +#include #endif /* LYSTRUCTS_H */ void run_external PARAMS((char * c)); diff --git a/gnu/usr.bin/lynx/src/LYForms.c b/gnu/usr.bin/lynx/src/LYForms.c index 0387ad1ddeb..399f61df7e7 100644 --- a/gnu/usr.bin/lynx/src/LYForms.c +++ b/gnu/usr.bin/lynx/src/LYForms.c @@ -1,24 +1,23 @@ -#include "HTUtils.h" -#include "tcp.h" -#include "HTCJK.h" -#include "HTTP.h" -#include "HTAlert.h" -#include "LYCurses.h" -#include "GridText.h" -#include "LYCharSets.h" -#include "UCAux.h" -#include "LYUtils.h" -#include "LYStructs.h" /* includes HTForms.h */ -#include "LYStrings.h" -#include "LYGlobalDefs.h" -#include "LYKeymap.h" -#include "LYSignal.h" - -#include "LYLeaks.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* includes HTForms.h */ +#include +#include +#include +#include + +#include #ifdef USE_COLOR_STYLE -#include "AttrList.h" -#include "LYHash.h" +#include +#include #endif extern HTCJKlang HTCJK; @@ -34,9 +33,8 @@ PRIVATE int popup_options PARAMS(( int i_length, int disabled)); -PUBLIC int change_form_link ARGS6( +PUBLIC int change_form_link ARGS5( struct link *, form_link, - int, mode, document *, newdoc, BOOLEAN *, refresh_screen, char *, link_name, @@ -139,9 +137,7 @@ PUBLIC int change_form_link ARGS6( * only one down at a time! */ if (form->num_value) { - _statusline(NEED_CHECKED_RADIO_BUTTON); - sleep(MessageSecs); - + HTUserMsg(NEED_CHECKED_RADIO_BUTTON); } else { int i; /* @@ -202,8 +198,7 @@ PUBLIC int change_form_link ARGS6( if (c == '\r' || c == '\n') { form_link->hightext = form->value; if (!form->submit_action || *form->submit_action == '\0') { - _statusline(NO_FORM_ACTION); - sleep(MessageSecs); + HTUserMsg(NO_FORM_ACTION); c = DO_NOTHING; break; } else if (form->submit_method == URL_MAIL_METHOD && no_mail) { @@ -268,11 +263,7 @@ PRIVATE int form_getstr ARGS1( int max_length; int startcol, startline; BOOL HaveMaxlength = FALSE; - int action; - -#ifdef VMS - extern BOOLEAN HadVMSInterrupt; /* Flag from cleanup_sig() AST */ -#endif + int action, repeat, non_first = 0; EditFieldData MyEdit; BOOLEAN Edited = FALSE; /* Value might be updated? */ @@ -293,7 +284,7 @@ PRIVATE int form_getstr ARGS1( form->maxlength < sizeof(MyEdit.buffer)) ? form->maxlength : (sizeof(MyEdit.buffer) - 1)); - if (strlen(form->value) > max_length) { + if (strlen(form->value) > (size_t)max_length) { /* * We can't fit the entire value into the editing buffer, * so enter as much of the tail as fits. - FM @@ -304,8 +295,7 @@ PRIVATE int form_getstr ARGS1( /* * If we can edit it, report that we are using the tail. - FM */ - _statusline(FORM_VALUE_TOO_LONG); - sleep(MessageSecs); + HTUserMsg(FORM_VALUE_TOO_LONG); switch(form->type) { case F_PASSWORD_TYPE: statusline(FORM_LINK_PASSWORD_MESSAGE); @@ -320,9 +310,11 @@ PRIVATE int form_getstr ARGS1( } break; case F_TEXT_TYPE: - case F_TEXTAREA_TYPE: statusline(FORM_LINK_TEXT_MESSAGE); break; + case F_TEXTAREA_TYPE: + statusline(FORM_LINK_TEXTAREA_MESSAGE); + break; default: break; } @@ -343,14 +335,38 @@ PRIVATE int form_getstr ARGS1( */ for (;;) { again: - ch = LYgetch(); + repeat = -1; + get_mouse_link(); /* Reset mouse_link. */ + /* Try to set position basing on the last mouse event */ + if (!non_first++) + peek_mouse_levent(); + + ch = LYgetch_for(FOR_INPUT); #ifdef VMS if (HadVMSInterrupt) { HadVMSInterrupt = FALSE; ch = 7; } #endif /* VMS */ - +# ifdef NCURSES_MOUSE_VERSION + if (ch == MOUSE_KEY) { /* Need to process ourselves */ + MEVENT event; + int curx, cury; + + getmouse(&event); + LYGetYX(cury, curx); + if (event.y == cury) { + repeat = event.x - curx; + if (repeat < 0) { + ch = LTARROW; + repeat = - repeat; + } else + ch = RTARROW; + } + } +# endif /* defined NCURSES_MOUSE_VERSION */ + if (peek_mouse_link() != -1) + break; /* * Filter out global navigation keys that should not be passed * to line editor, and LYK_REFRESH. @@ -358,6 +374,8 @@ again: action = EditBinding(ch); if (action == LYE_ENTER) break; + if (action == LYE_FORM_PASS) + break; if (action == LYE_LKCMD) { _statusline(ENTER_LYNX_COMMAND); ch = LYgetch(); @@ -382,30 +400,29 @@ again: if (keymap[ch + 1] == LYK_REFRESH) break; switch (ch) { +#ifdef NOTDEFINED /* The first four are mapped to LYE_FORM_PASS now */ case DNARROW: case UPARROW: case PGUP: case PGDOWN: -#ifdef NOTDEFINED case HOME: - case END: + case END_KEY: case FIND_KEY: case SELECT_KEY: -#endif /* NOTDEFINED */ goto breakfor; +#endif /* NOTDEFINED */ /* * Left arrrow in column 0 deserves special treatment here, * else you can get trapped in a form without submit button! */ case LTARROW: - if (MyEdit.pos == 0) { - int c = 'Y'; /* Go back immediately if no changes */ + if (MyEdit.pos == 0 && repeat == -1) { + int c = YES; /* Go back immediately if no changes */ if (strcmp(MyEdit.buffer, value)) { - _statusline(PREV_DOC_QUERY); - c = LYgetch(); + c = HTConfirmDefault(PREV_DOC_QUERY, NO); } - if (TOUPPER(c) == 'Y') { + if (c == YES) { return(ch); } else { if (form->disabled == YES) @@ -422,7 +439,10 @@ again: /* * Make sure the statusline uses editmode help. */ - LYLineEdit(&MyEdit, ch, TRUE); + if (repeat < 0) + repeat = 1; + while (repeat--) + LYLineEdit(&MyEdit, ch, TRUE); if (MyEdit.strlen >= max_length) { HaveMaxlength = TRUE; } else if (HaveMaxlength && @@ -436,7 +456,9 @@ again: LYRefreshEdit(&MyEdit); } } +#ifdef NOTDEFINED breakfor: +#endif /* NOTDEFINED */ if (Edited) { char *p; @@ -455,16 +477,15 @@ breakfor: */ form->value[(strlen(form->value) - strlen(value))] = '\0'; StrAllocCat(form->value, MyEdit.buffer); - _statusline(FORM_TAIL_COMBINED_WITH_HEAD); - sleep(MessageSecs); + HTUserMsg(FORM_TAIL_COMBINED_WITH_HEAD); } /* * Remove trailing spaces * - * Do we really need to do that here? Trailing spaces will only - * be there if user keyed them in. Rather rude to throw away - * their hard earned spaces. Better deal with trailing spaces + * Do we really need to do that here? Trailing spaces will only + * be there if user keyed them in. Rather rude to throw away + * their hard earned spaces. Better deal with trailing spaces * when submitting the form???? */ p = &(form->value[strlen(form->value)]); @@ -492,10 +513,13 @@ breakfor: ** If a 'g' or 'p' suffix is included, that will be ** loaded into c. Otherwise, c is zeroed. - FM & LE */ -PRIVATE int get_popup_option_number ARGS1( - int *, c) +PRIVATE int get_popup_option_number ARGS2( + int *, c, + int *, rel) { char temp[120]; + char *p = temp; + int num; /* * Load the c argument into the prompt buffer. @@ -508,24 +532,42 @@ PRIVATE int get_popup_option_number ARGS1( * Get the number, possibly with a suffix, from the user. */ if (LYgetstr(temp, VISIBLE, sizeof(temp), NORECALL) < 0 || *temp == 0) { - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); *c = '\0'; + *rel = '\0'; return(0); } + *rel = '\0'; + num = atoi(p); + while ( isdigit(*p) ) + ++p; + switch ( *p ) { + case '+': case '-': + /* 123+ or 123- */ + *rel = *p++; *c = *p; + break; + default: + *c = *p++; + *rel = *p; + case 0: + break; + } + /* * If we had a 'g' or 'p' suffix, load it into c. * Otherwise, zero c. Then return the number. */ - if (strchr(temp, 'g') != NULL || strchr(temp, 'G') != NULL) { + if ( *p == 'g' || *p == 'G' ) { *c = 'g'; - } else if (strchr(temp, 'p') != NULL || strchr(temp, 'P') != NULL) { + } else if (*p == 'p' || *p == 'P' ) { *c = 'p'; } else { *c = '\0'; } - return(atoi(temp)); + if ( *rel != '+' && *rel != '-' ) + *rel = 0; + return num; } /* Use this rather than the 'wprintw()' function to write a blank-padded @@ -563,7 +605,7 @@ PRIVATE int popup_options ARGS7( * and to position the popup window appropriately, * taking the user_mode setting into account. -- FM */ - int c = 0, cmd = 0, i = 0, j = 0; + int c = 0, cmd = 0, i = 0, j = 0, rel = 0; int orig_selection = cur_selection; #ifndef USE_SLANG WINDOW * form_window; @@ -573,9 +615,6 @@ PRIVATE int popup_options ARGS7( int window_offset = 0; int lines_to_show; int npages; -#ifdef VMS - extern BOOLEAN HadVMSInterrupt; /* Flag from cleanup_sig() AST */ -#endif /* VMS */ static char prev_target[512]; /* Search string buffer */ static char prev_target_buffer[512]; /* Next search buffer */ static BOOL first = TRUE; @@ -587,7 +626,6 @@ PRIVATE int popup_options ARGS7( OptionType * tmp_ptr; BOOLEAN ReDraw = FALSE; int number; - char buffer[512]; /* * Initialize the search string buffer. - FM @@ -812,8 +850,8 @@ redraw: SLsmg_gotorc((LYlines - 1), (LYcols - 1)); SLsmg_refresh(); #else - wstart_reverse(form_window); wmove(form_window, ((i + 1) - window_offset), 2); + wstart_reverse(form_window); paddstr(form_window, width, opt_ptr->name); wstop_reverse(form_window); /* @@ -832,11 +870,19 @@ redraw: wrefresh(form_window); #endif /* USE_SLANG */ - c = LYgetch(); - if (c == 3 || c == 7) /* Control-C or Control-G */ + c = LYgetch_for(FOR_CHOICE); + if (c == 3 || c == 7) { /* Control-C or Control-G */ cmd = LYK_QUIT; - else +#ifndef USE_SLANG + } else if (c == MOUSE_KEY) { + if ((cmd = fancy_mouse(form_window, i + 1 + window_offset, &cur_selection)) < 0) + goto redraw; + if (cmd == LYK_ACTIVATE) + break; +#endif + } else { cmd = keymap[c+1]; + } #ifdef VMS if (HadVMSInterrupt) { HadVMSInterrupt = FALSE; @@ -861,8 +907,27 @@ redraw: * a 'g' or 'p' suffix (which will be loaded * into c). - FM & LE */ - number = get_popup_option_number((int *)&c); - + number = get_popup_option_number((int *)&c,(int *)&rel); + + /* handle + or - suffix */ + CTRACE(tfp,"got popup option number %d, ",number); + CTRACE(tfp,"rel='%c', c='%c', cur_selection=%d\n", + rel,c,cur_selection); + if ( c == 'p' ) { + int curpage = ((cur_selection + 1) > length) ? + (((cur_selection + 1) + (length - 1))/(length)) + : 1; + CTRACE(tfp," curpage=%d\n",curpage); + if ( rel == '+' ) + number = curpage + number; + else if ( rel == '-' ) + number = curpage - number; + } else if ( rel == '+' ) { + number = cur_selection + number + 1; + } else if ( rel == '-' ) { + number = cur_selection - number + 1; + } + if ( rel ) CTRACE(tfp,"new number=%d\n",number); /* * Check for a 'p' suffix. - FM */ @@ -872,8 +937,7 @@ redraw: */ if (number <= 1) { if (window_offset == 0) { - _statusline(ALREADY_AT_OPTION_BEGIN); - sleep(MessageSecs); + HTUserMsg(ALREADY_AT_OPTION_BEGIN); if (disabled) { _statusline(FORM_LINK_OPTION_LIST_UNM_MSG); } else { @@ -897,8 +961,7 @@ redraw: */ if (number >= npages) { if (window_offset >= ((num_options - length) + 1)) { - _statusline(ALREADY_AT_OPTION_END); - sleep(MessageSecs); + HTUserMsg(ALREADY_AT_OPTION_END); if (disabled) { _statusline(FORM_LINK_OPTION_LIST_UNM_MSG); } else { @@ -924,9 +987,10 @@ redraw: * We want an intermediate page. - FM */ if (((number - 1) * length) == window_offset) { - sprintf(buffer, ALREADY_AT_OPTION_PAGE, number); - _statusline(buffer); - sleep(MessageSecs); + char *msg = 0; + HTSprintf0(&msg, ALREADY_AT_OPTION_PAGE, number); + HTUserMsg(msg); + FREE(msg); if (disabled) { _statusline(FORM_LINK_OPTION_LIST_UNM_MSG); } else { @@ -974,10 +1038,10 @@ redraw: /* * The option already is current. - FM */ - sprintf(buffer, - OPTION_ALREADY_CURRENT, (number + 1)); - _statusline(buffer); - sleep(MessageSecs); + char *msg = 0; + HTSprintf0(&msg, OPTION_ALREADY_CURRENT, (number + 1)); + HTUserMsg(msg); + FREE(msg); if (disabled) { _statusline(FORM_LINK_OPTION_LIST_UNM_MSG); } else { @@ -1015,8 +1079,7 @@ redraw: /* * Not in range. - FM */ - _statusline(BAD_OPTION_NUM_ENTERED); - sleep(MessageSecs); + HTUserMsg(BAD_OPTION_NUM_ENTERED); } } @@ -1031,6 +1094,7 @@ redraw: break; case LYK_PREV_LINK: + case LYK_FASTBACKW_LINK: case LYK_UP_LINK: if (cur_selection > 0) @@ -1046,6 +1110,7 @@ redraw: break; case LYK_NEXT_LINK: + case LYK_FASTFORW_LINK: case LYK_DOWN_LINK: if (cur_selection < num_options) cur_selection++; @@ -1251,8 +1316,7 @@ redraw: /* * User cancelled the search via ^G. - FM */ - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); goto restore_popup_statusline; } } @@ -1263,8 +1327,7 @@ check_recall: /* * No entry. Simply break. - FM */ - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); goto restore_popup_statusline; } @@ -1317,8 +1380,7 @@ check_recall: /* * User cancelled the search via ^G. - FM */ - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); goto restore_popup_statusline; } goto check_recall; @@ -1374,8 +1436,7 @@ check_recall: /* * User cancelled the search via ^G. - FM */ - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); goto restore_popup_statusline; } goto check_recall; @@ -1421,8 +1482,7 @@ check_recall: * If we started at the beginning, it can't be present. - FM */ if (cur_selection == 0) { - _user_message(STRING_NOT_FOUND, prev_target_buffer); - sleep(MessageSecs); + HTUserMsg2(STRING_NOT_FOUND, prev_target_buffer); goto restore_popup_statusline; } @@ -1460,8 +1520,7 @@ check_recall: /* * Didn't find it in the preceding options either. - FM */ - _user_message(STRING_NOT_FOUND, prev_target_buffer); - sleep(MessageSecs); + HTUserMsg2(STRING_NOT_FOUND, prev_target_buffer); restore_popup_statusline: /* diff --git a/gnu/usr.bin/lynx/src/LYGetFile.c b/gnu/usr.bin/lynx/src/LYGetFile.c index 2bec52b31fb..0850a8ae266 100644 --- a/gnu/usr.bin/lynx/src/LYGetFile.c +++ b/gnu/usr.bin/lynx/src/LYGetFile.c @@ -1,42 +1,36 @@ -#include "HTUtils.h" -#include "tcp.h" -#include "HTTP.h" -#include "HTAnchor.h" /* Anchor class */ -#include "HTAccess.h" -#include "HTParse.h" -#include "LYCurses.h" -#include "GridText.h" -#include "LYGlobalDefs.h" -#include "LYUtils.h" -#include "LYCharSets.h" -#include "LYCharUtils.h" -#include "HTAlert.h" -#include "LYSignal.h" -#include "LYGetFile.h" -#include "LYPrint.h" -#include "LYHistory.h" -#include "LYStrings.h" -#include "LYClean.h" -#include "LYDownload.h" -#include "LYNews.h" -#include "LYMail.h" -#include "LYSystem.h" -#include "LYKeymap.h" -#include "LYBookmark.h" -#include "LYMap.h" -#include "LYList.h" -#ifdef VMS -#include "HTVMSUtils.h" -#endif /* VMS */ -#ifdef DOSPATH -#include "HTDOS.h" -#endif +#include +#include +#include /* Anchor class */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef DIRED_SUPPORT -#include "LYLocal.h" +#include #endif /* DIRED_SUPPORT */ +#include -#include "LYexit.h" -#include "LYLeaks.h" +#include +#include #ifndef VMS #ifdef SYSLOG_REQUESTED_URLS @@ -44,49 +38,12 @@ #endif /* SYSLOG_REQUESTED_URLS */ #endif /* !VMS */ -#define FREE(x) if (x) {free(x); x = NULL;} - PRIVATE int fix_http_urls PARAMS((document *doc)); extern char * WWW_Download_File; #ifdef VMS extern BOOLEAN LYDidRename; #endif /* VMS */ -#if 0 /* UNUSED */ -#ifdef DIRED_SUPPORT -PRIVATE char * LYSanctify ARGS1( - char *, href) -{ - int i; - char *p, *cp, *tp; - char address_buffer[1024]; - - i = (strlen(href) - 1); - while (i && href[i] == '/') href[i--] = '\0'; - - if ((cp = (char *)strchr(href,'~')) != NULL) { - if (!strncmp(href, "file://localhost/", 17)) - tp = (href + 17); - else - tp = (href + 5); - if ((cp - tp) && *(cp-1) != '/') - return href; - LYstrncpy(address_buffer, href, (cp - href)); - if (address_buffer[(strlen(address_buffer) - 1)] == '/') - address_buffer[(strlen(address_buffer) - 1)] = '\0'; - p = (char *)Home_Dir(); - strcat(address_buffer, p); - if (strlen(++cp)) - strcat(address_buffer, cp); - if (strcmp(href, address_buffer)) - StrAllocCopy(href, address_buffer); - } - return href; -} -#endif /* DIRED_SUPPORT */ -#endif - - PUBLIC BOOLEAN getfile ARGS1( document *, doc) { @@ -99,9 +56,7 @@ PUBLIC BOOLEAN getfile ARGS1( * Reset LYCancelDownload to prevent unwanted delayed effect. - KW */ if (LYCancelDownload) { - if (TRACE) - fprintf(stderr, - "getfile: resetting LYCancelDownload to FALSE\n"); + CTRACE(tfp, "getfile: resetting LYCancelDownload to FALSE\n"); LYCancelDownload = FALSE; } @@ -131,9 +86,7 @@ Try_Redirected_URL: */ redirect_post_content = FALSE; - if (TRACE) { - fprintf(stderr,"getfile: getting %s\n\n",doc->address); - } + CTRACE(tfp,"getfile: getting %s\n\n",doc->address); /* * Protect against denial of service attacks @@ -164,9 +117,10 @@ Try_Redirected_URL: return(NULLFILE); } if (value > 65535 || value < 0) { - char msg[265]; - sprintf(msg, PORT_INVALID, (unsigned long)value); + char *msg = 0; + HTSprintf0(&msg, PORT_INVALID, (unsigned long)value); HTAlert(msg); + FREE(msg); FREE(temp); return(NULLFILE); } @@ -205,8 +159,7 @@ Try_Redirected_URL: (lynxjumpfile != NULL && 0==strncasecomp(WWWDoc.address, lynxjumpfile, strlen(lynxjumpfile))))) { - _statusline(NOT_HTTP_URL_OR_ACTION); - sleep(MessageSecs); + HTUserMsg(NOT_HTTP_URL_OR_ACTION); return(NULLFILE); } } @@ -225,6 +178,9 @@ Try_Redirected_URL: url_type == LYNXIMGMAP_URL_TYPE || url_type == LYNXCOOKIE_URL_TYPE || url_type == LYNXPRINT_URL_TYPE || + url_type == LYNXOPTIONS_URL_TYPE || + url_type == LYNXCFG_URL_TYPE || + url_type == LYNXCOMPILE_OPTS_URL_TYPE || url_type == LYNXDOWNLOAD_URL_TYPE || url_type == MAILTO_URL_TYPE || url_type == NEWSPOST_URL_TYPE || @@ -245,8 +201,7 @@ Try_Redirected_URL: (lynxjumpfile != NULL && 0==strncasecomp(WWWDoc.address, lynxjumpfile, strlen(lynxjumpfile))))) { - _statusline(NOT_IN_STARTING_REALM); - sleep(MessageSecs); + HTUserMsg(NOT_IN_STARTING_REALM); return(NULLFILE); } } @@ -258,14 +213,13 @@ Try_Redirected_URL: url_type != GOPHER_URL_TYPE && url_type != CSO_URL_TYPE && url_type != PROXY_URL_TYPE && + url_type != LYNXOPTIONS_URL_TYPE && !(url_type == FILE_URL_TYPE && *(LYlist_temp_url()) && !strncmp(WWWDoc.address, LYlist_temp_url(), strlen(LYlist_temp_url())))) { - if (TRACE) - fprintf(stderr, - "getfile: dropping post_data!\n"); - HTAlert("POST not supported for this URL - ignoring POST data!"); + CTRACE(tfp, "getfile: dropping post_data!\n"); + HTAlert(IGNORED_POST); FREE(doc->post_data); FREE(doc->post_content_type); WWWDoc.post_data = NULL; @@ -289,19 +243,40 @@ Try_Redirected_URL: } else if (url_type == LYNXPRINT_URL_TYPE) { return(printfile(doc)); +#ifndef NO_OPTION_FORMS + } else if (url_type == LYNXOPTIONS_URL_TYPE) { + /* proceed forms-based options menu */ + return(postoptions(doc)); +#endif + + } else if (url_type == LYNXCFG_URL_TYPE) { + /* show/change/reload lynx.cfg settings */ + return(lynx_cfg_infopage(doc)); + +#if defined(HAVE_CONFIG_H) && !defined(NO_CONFIG_INFO) + } else if (url_type == LYNXCOMPILE_OPTS_URL_TYPE) { + /* show compile-time settings */ + return(lynx_compile_opts(doc)); +#endif + + } else if (url_type == LYNXMESSAGES_URL_TYPE) { + /* show list of recent statusline messages */ + return(LYshow_statusline_messages(doc)); + +#ifndef DISABLE_NEWS } else if (url_type == NEWSPOST_URL_TYPE || url_type == NEWSREPLY_URL_TYPE || url_type == SNEWSPOST_URL_TYPE || url_type == SNEWSREPLY_URL_TYPE) { if (no_newspost) { - _statusline(NEWSPOSTING_DISABLED); - sleep(MessageSecs); + HTUserMsg(NEWSPOSTING_DISABLED); return(NULLFILE); } else { HTLoadAbsolute(&WWWDoc); return(NULLFILE); } +#endif } else if (url_type == LYNXDOWNLOAD_URL_TYPE) { LYDownload(doc->address); @@ -324,8 +299,7 @@ Try_Redirected_URL: } else if (url_type == LYNXDIRED_URL_TYPE) { #ifdef DIRED_SUPPORT if (no_dired_support) { - _statusline(DIRED_DISABLED); - sleep(MessageSecs); + HTUserMsg(DIRED_DISABLED); return(NULLFILE); } else { local_dired(doc); @@ -341,8 +315,7 @@ Try_Redirected_URL: return(NORMAL); } #else - _statusline(DIRED_DISABLED); - sleep(MessageSecs); + HTUserMsg(DIRED_DISABLED); return(NULLFILE); #endif /* DIRED_SUPPORT */ @@ -355,7 +328,6 @@ Try_Redirected_URL: */ if ((historytarget(doc) == FALSE) || !doc || !doc->address) { - HTMLSetCharacterHandling(current_char_set); return(NOT_FOUND); } @@ -375,10 +347,8 @@ Try_Redirected_URL: #endif if (!HTLoadAbsolute(&WWWDoc)) { - HTMLSetCharacterHandling(current_char_set); return(NOT_FOUND); } - HTMLSetCharacterHandling(current_char_set); return(NORMAL); } else if (url_type == LYNXEXEC_URL_TYPE || @@ -387,12 +357,10 @@ Try_Redirected_URL: if (no_exec && !exec_ok(HTLoadedDocumentURL(), doc->address+9, ALWAYS_EXEC_PATH)) { - statusline(EXECUTION_DISABLED); - sleep(MessageSecs); + HTUserMsg(EXECUTION_DISABLED); } else if (no_bookmark_exec && HTLoadedDocumentBookmark()) { - statusline(BOOKMARK_EXEC_DISABLED); - sleep(MessageSecs); + HTUserMsg(BOOKMARK_EXEC_DISABLED); } else if (local_exec || (local_exec_on_local_files && exec_ok(HTLoadedDocumentURL(), doc->address+9, EXEC_PATH))) { @@ -403,7 +371,8 @@ Try_Redirected_URL: * Bug puts slash on end if none is in the string. */ char *last_slash = strrchr(doc->address,'/'); - if (last_slash-doc->address==strlen(doc->address)-1) + if (last_slash - doc->address + == (int)strlen(doc->address) - 1) doc->address[strlen(doc->address)-1] = '\0'; p = doc->address; @@ -413,15 +382,7 @@ Try_Redirected_URL: if ((cp = strchr(doc->address, '~'))) { strncpy(addressbuf, doc->address, cp-doc->address); addressbuf[cp - doc->address] = '\0'; -#ifdef DOSPATH - p = HTDOS_wwwName((char *)Home_Dir()); -#else -#ifdef VMS - p = HTVMS_wwwName((char *)Home_Dir()); -#else - p = (char *)Home_Dir(); -#endif /* VMS */ -#endif /* DOSPATH */ + p = wwwName(Home_Dir()); strcat(addressbuf, p); strcat(addressbuf, cp+1); p = addressbuf; @@ -429,16 +390,15 @@ Try_Redirected_URL: /* * Show URL before executing it. */ - statusline(doc->address); - sleep(InfoSecs); + HTInfoMsg(doc->address); stop_curses(); /* * Run the command. */ if (strstr(p,"//") == p+9) - system(p+11); + LYSystem(p+11); else - system(p+9); + LYSystem(p+9); if (url_type != LYNXPROG_URL_TYPE) { /* * Make sure user gets to see screen output. @@ -450,44 +410,50 @@ Try_Redirected_URL: fflush(stdout); LYgetch(); #ifdef VMS - { - extern BOOLEAN HadVMSInterrupt; - HadVMSInterrupt = FALSE; - } + HadVMSInterrupt = FALSE; #endif /* VMS */ } start_curses(); LYAddVisitedLink(doc); } else { - char buf[512]; + char *buf = 0; - sprintf(buf, + HTSprintf0(&buf, EXECUTION_DISABLED_FOR_FILE, key_for_func(LYK_OPTIONS)); - _statusline(buf); - sleep(AlertSecs); + HTAlert(buf); + FREE(buf); } #else /* no exec_links */ - _statusline(EXECUTION_NOT_COMPILED); - sleep(MessageSecs); + HTUserMsg(EXECUTION_NOT_COMPILED); #endif /* EXEC_LINKS */ return(NULLFILE); } else if (url_type == MAILTO_URL_TYPE) { if (no_mail) { - _statusline(MAIL_DISABLED); - sleep(MessageSecs); + HTUserMsg(MAIL_DISABLED); } else { HTParentAnchor *tmpanchor; CONST char *title; + char *tmptitle = NULL; title = ""; if ((tmpanchor = HTAnchor_parent( HTAnchor_findAddress(&WWWDoc) - )) != NULL) { - if (HTAnchor_title(tmpanchor)) { + )) != NULL && + HTAnchor_title(tmpanchor)) { title = HTAnchor_title(tmpanchor); + } else if (HTMainAnchor && !LYUserSpecifiedURL) { + title = HTAnchor_subject(HTMainAnchor); + if (title && *title) { + if (strncasecomp(title, "Re:", 3)) { + StrAllocCopy(tmptitle, "Re: "); + StrAllocCat(tmptitle, title); + title = tmptitle; + } + } else { + title = ""; } } cp = (char *)strchr(doc->address,':')+1; @@ -495,7 +461,10 @@ Try_Redirected_URL: ((HTMainAnchor && !LYUserSpecifiedURL) ? (char *)HTMainAnchor->address : (char *)doc->address), - title); + title, + (HTMainAnchor && !LYUserSpecifiedURL) ? + HTMainAnchor->message_id : NULL); + FREE(tmptitle); } return(NULLFILE); @@ -511,8 +480,7 @@ Try_Redirected_URL: url_type != LYNXCGI_URL_TYPE && !(LYisLocalHost(doc->address) || LYisLocalAlias(doc->address))) { - statusline(ACCESS_ONLY_LOCALHOST); - sleep(MessageSecs); + HTUserMsg(ACCESS_ONLY_LOCALHOST); return(NULLFILE); /* @@ -522,11 +490,9 @@ Try_Redirected_URL: url_type == TN3270_URL_TYPE || url_type == TELNET_GOPHER_URL_TYPE) { if (!telnet_ok) { - _statusline(TELNET_DISABLED); - sleep(MessageSecs); + HTUserMsg(TELNET_DISABLED); } else if (no_telnet_port && strchr(doc->address+7, ':')) { - statusline(TELNET_PORT_SPECS_DISABLED); - sleep(MessageSecs); + HTUserMsg(TELNET_PORT_SPECS_DISABLED); } else { stop_curses(); HTLoadAbsolute(&WWWDoc); @@ -539,15 +505,15 @@ Try_Redirected_URL: /* * Disable www news access if not news_ok. */ +#ifndef DISABLE_NEWS } else if (url_type == NEWS_URL_TYPE && !news_ok) { - _statusline(NEWS_DISABLED); - sleep(MessageSecs); + HTUserMsg(NEWS_DISABLED); return(NULLFILE); +#endif } else if (url_type == RLOGIN_URL_TYPE) { if (!rlogin_ok) { - statusline(RLOGIN_DISABLED); - sleep(MessageSecs); + HTUserMsg(RLOGIN_DISABLED); } else { stop_curses(); HTLoadAbsolute(&WWWDoc); @@ -608,8 +574,7 @@ Try_Redirected_URL: } else { if (url_type == FTP_URL_TYPE && !ftp_ok) { - statusline(FTP_DISABLED); - sleep(MessageSecs); + HTUserMsg(FTP_DISABLED); return(NULLFILE); } @@ -621,9 +586,7 @@ Try_Redirected_URL: if ((cp=strchr(doc->address+9, '/')) != NULL && 0==strncmp(++cp, "hGET%20/", 8)) { StrAllocCopy(tmp, "http://"); - if (TRACE) - fprintf(stderr, - "getfile: URL '%s'\n", + CTRACE(tfp, "getfile: URL '%s'\n", doc->address); *cp = '\0'; StrAllocCat(tmp, doc->address+9); @@ -637,9 +600,8 @@ Try_Redirected_URL: if (strlen(cp+7) > 1) StrAllocCat(tmp, cp+8); StrAllocCopy(doc->address, tmp); - if (TRACE) - fprintf(stderr, " changed to '%s'\n", - doc->address); + CTRACE(tfp, " changed to '%s'\n", + doc->address); FREE(tmp); url_type = HTTP_URL_TYPE; } @@ -670,42 +632,29 @@ Try_Redirected_URL: char *cp1 = strstr(doc->address, "/~"); char *cp2; - if (TRACE) - fprintf(stderr, "getfile: URL '%s'\n", - doc->address); + CTRACE(tfp, "getfile: URL '%s'\n", + doc->address); *cp1 = '\0'; cp1 += 2; StrAllocCopy(temp, doc->address); -#ifdef DOSPATH - StrAllocCat(temp, "/"); - StrAllocCat(temp, HTDOS_wwwName((char *)Home_Dir())); -#else -#ifdef VMS - StrAllocCat(temp, - HTVMS_wwwName((char *)Home_Dir())); -#else - StrAllocCat(temp, Home_Dir()); -#endif /* VMS */ -#endif /* DOSPATH */ + StrAllocCopy(cp, wwwName(Home_Dir())); + if (!LYIsHtmlSep(*cp)) + LYAddHtmlSep(&temp); + StrAllocCat(temp, cp); if ((cp2 = strchr(cp1, '/')) != NULL) { LYTrimRelFromAbsPath(cp2); StrAllocCat(temp, cp2); } StrAllocCopy(doc->address, temp); FREE(temp); - if (TRACE) - fprintf(stderr, " changed to '%s'\n", - doc->address); + CTRACE(tfp, " changed to '%s'\n", + doc->address); WWWDoc.address = doc->address; } FREE(cp); } - if (TRACE && LYTraceLogFP == NULL) - sleep(MessageSecs); + CTRACE_SLEEP(MessageSecs); user_message(WWW_WAIT_MESSAGE, doc->address); -#ifdef NOTDEFINED - sleep(InfoSecs); -#endif /* NOTDEFINED */ if (TRACE) { #ifdef USE_SLANG if (LYCursesON) { @@ -713,7 +662,7 @@ Try_Redirected_URL: refresh(); } #endif /* USE_SLANG */ - fprintf(stderr,"\n"); + fprintf(tfp,"\n"); } if ((LYNoRefererHeader == FALSE && LYNoRefererForThis == FALSE) && @@ -757,7 +706,7 @@ Try_Redirected_URL: * the RIGHT thing and returning an invalid * address message. - FM */ - HTAlert(LOCATION_NOT_ABSOLUTE); + HTUserMsg(LOCATION_NOT_ABSOLUTE); temp = HTParse(use_this_url_instead, WWWDoc.address, PARSE_ALL); @@ -766,7 +715,6 @@ Try_Redirected_URL: } FREE(temp); } - HTMLSetCharacterHandling(current_char_set); url_type = is_url(use_this_url_instead); if (url_type == LYNXDOWNLOAD_URL_TYPE || url_type == LYNXEXEC_URL_TYPE || @@ -775,6 +723,9 @@ Try_Redirected_URL: url_type == LYNXDIRED_URL_TYPE || #endif /* DIRED_SUPPORT */ url_type == LYNXPRINT_URL_TYPE || + url_type == LYNXOPTIONS_URL_TYPE || + url_type == LYNXCFG_URL_TYPE || + url_type == LYNXCOMPILE_OPTS_URL_TYPE || url_type == LYNXHIST_URL_TYPE || url_type == LYNXCOOKIE_URL_TYPE || (LYValidate && @@ -798,14 +749,18 @@ Try_Redirected_URL: url_type == HTTPS_URL_TYPE) || (no_goto_mailto && url_type == MAILTO_URL_TYPE) || +#ifndef DISABLE_NEWS (no_goto_news && url_type == NEWS_URL_TYPE) || (no_goto_nntp && url_type == NNTP_URL_TYPE) || +#endif (no_goto_rlogin && url_type == RLOGIN_URL_TYPE) || +#ifndef DISABLE_NEWS (no_goto_snews && url_type == SNEWS_URL_TYPE) || +#endif (no_goto_telnet && url_type == TELNET_URL_TYPE) || (no_goto_tn3270 && @@ -823,7 +778,7 @@ Try_Redirected_URL: sleep(AlertSecs); } else { fprintf(stderr, - "Illegal Redirection URL: %s", + WWW_ILLEGAL_URL_MESSAGE, use_this_url_instead); } FREE(use_this_url_instead); @@ -840,20 +795,16 @@ Try_Redirected_URL: * be positioned at the top of that document, * so there's no harm done. - FM */ - if (TRACE) { - fprintf(stderr, + CTRACE(tfp, "getfile: Adding fragment '%s' to redirection URL.\n", pound); - } StrAllocCat(use_this_url_instead, pound); } - if (TRACE && LYTraceLogFP == NULL) - sleep(MessageSecs); + CTRACE_SLEEP(MessageSecs); _user_message(WWW_USING_MESSAGE, use_this_url_instead); sleep(InfoSecs); - if (TRACE) - fprintf(stderr, "\n"); + CTRACE(tfp, "\n"); StrAllocCopy(doc->address, use_this_url_instead); FREE(use_this_url_instead); @@ -872,7 +823,6 @@ Try_Redirected_URL: */ goto Try_Redirected_URL; } - HTMLSetCharacterHandling(current_char_set); return(NOT_FOUND); } @@ -902,10 +852,9 @@ Try_Redirected_URL: HTParentAnchor *tmpanchor; char *fname = NULL; - HTMLSetCharacterHandling(current_char_set); /* * Check for a suggested filename from - * the Content-Dispostion header. - FM + * the Content-Disposition header. - FM */ if (((tmpanchor = HTAnchor_parent( HTAnchor_findAddress(&WWWDoc) @@ -967,7 +916,6 @@ Try_Redirected_URL: * Also check the isHEAD element. - FM */ doc->isHEAD != HTLoadedDocumentIsHEAD())) { - HTMLSetCharacterHandling(current_char_set); /* * Nothing needed to be shown. */ @@ -980,18 +928,14 @@ Try_Redirected_URL: */ if (pound != NULL) HTFindPoundSelector(pound+1); - HTMLSetCharacterHandling(current_char_set); return(NORMAL); } } } } else { - if (TRACE && LYTraceLogFP == NULL) - sleep(MessageSecs); - _user_message(WWW_BAD_ADDR_MESSAGE, doc->address); - if (TRACE) - fprintf(stderr,"\n"); - sleep(MessageSecs); + CTRACE_SLEEP(MessageSecs); + HTUserMsg2(WWW_BAD_ADDR_MESSAGE, doc->address); + CTRACE(tfp,"\n"); return(NULLFILE); } } @@ -1019,9 +963,13 @@ PUBLIC int follow_link_number ARGS4( int *, num) { char temp[120]; + char *p = temp; + int rel = 0; int new_top, new_link; BOOL want_go; + int curline = *num; /* passed in from mainloop() */ + CTRACE(tfp,"follow_link_number(%d,%d,...)\n",c,cur); temp[0] = c; temp[1] = '\0'; *num = -1; @@ -1030,23 +978,46 @@ PUBLIC int follow_link_number ARGS4( * Get the number, possibly with a letter suffix, from the user. */ if (LYgetstr(temp, VISIBLE, sizeof(temp), NORECALL) < 0 || *temp == 0) { - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); return(DO_NOTHING); } - *num = atoi(temp); + *num = atoi(p); + while ( isdigit(*p) ) + ++p; + c = *p; /* reuse c; 0 or g or p or + or - */ + switch ( c ) { + case '+': case '-': + /* 123+ or 123- */ + rel = c; c = *++p; + break; + default: + rel = *++p; + case 0: + break; + } + /* don't currently check for errors typing suffix */ + CTRACE(tfp," temp=%s, *num=%d, rel='%c'\n",temp,*num,rel); /* * Check if we had a 'p' or 'P' following the number as * a flag for displaying the page with that number. - FM */ - if (strchr(temp, 'p') != NULL || strchr(temp, 'P') != NULL) { + if ( c == 'p' || c == 'P' ) { int nlines = HText_getNumOfLines(); int npages = ((nlines + 1) > display_lines) ? (((nlines + 1) + (display_lines - 1))/(display_lines)) : 1; + int curpage = ((curline + 1) > display_lines) ? + (((curline + 1) + (display_lines - 1))/(display_lines)) + : 1; + CTRACE(tfp," nlines=%d, npages=%d, curline=%d, curpage=%d\n", + nlines,npages,curline,curpage); if (*num < 1) - *num = 1; + *num = rel ? 0 : 1; + if ( rel == '+' ) + *num = curpage + *num; + else if ( rel == '-' ) + *num = curpage - *num; doc->line = (npages <= 1) ? 1 : ((*num <= npages) ? (((*num - 1) * display_lines) + 1) @@ -1058,8 +1029,13 @@ PUBLIC int follow_link_number ARGS4( * Check if we want to make the link corresponding to the * number the current link, rather than ACTIVATE-ing it. */ - want_go = (strchr(temp, 'g') != NULL || strchr(temp, 'G') != NULL); + want_go = ( c == 'g' || c == 'G' ); + /* If rel, add or subtract num from current link, or + * nearest previous/subsequent link if current link is not on screen. + */ + if ( rel ) + *num = HTGetRelLinkNum( *num, rel, cur ); /* * If we have a valid number, act on it. */ @@ -1121,6 +1097,7 @@ static struct trust *trusted_exec = &trusted_exec_default; static struct trust *always_trusted_exec = &always_trusted_exec_default; static struct trust *trusted_cgi = &trusted_cgi_default; +#ifdef LY_FIND_LEAKS PRIVATE void LYTrusted_free NOARGS { struct trust *cur; @@ -1161,9 +1138,10 @@ PRIVATE void LYTrusted_free NOARGS return; } +#endif /* LY_FIND_LEAKS */ PUBLIC void add_trusted ARGS2( - char *, str, + char *, str, int, type) { struct trust *tp; @@ -1175,7 +1153,9 @@ PUBLIC void add_trusted ARGS2( if (!src) return; if (first) { +#ifdef LY_FIND_LEAKS atexit(LYTrusted_free); +#endif first = FALSE; } @@ -1219,7 +1199,7 @@ PUBLIC void add_trusted ARGS2( */ PUBLIC BOOLEAN exec_ok ARGS3( CONST char *, source, - CONST char *, link, + CONST char *, linktext, int, type) { struct trust *tp; @@ -1250,7 +1230,7 @@ PUBLIC BOOLEAN exec_ok ARGS3( /* * Security: reject on relative path. */ - if ((cp = strchr(link, '[')) != NULL) { + if ((cp = strchr(linktext, '[')) != NULL) { char *cp1; if (((cp1 = strchr(cp, '-')) != NULL) && strchr(cp1, ']') != NULL) { @@ -1267,7 +1247,7 @@ PUBLIC BOOLEAN exec_ok ARGS3( /* * Security: reject on relative path. */ - if (strstr(link, "../") != NULL) { + if (strstr(linktext, "../") != NULL) { HTAlert(RELPATH_IN_EXEC_LINK); return FALSE; } @@ -1275,19 +1255,20 @@ PUBLIC BOOLEAN exec_ok ARGS3( /* * Security: reject on strange character. */ - for (cp = link; *cp != '\0'; cp++) { + for (cp = linktext; *cp != '\0'; cp++) { if (!isalnum(*cp) && *cp != '_' && *cp != '-' && *cp != ' ' && *cp != ':' && *cp != '.' && *cp != '/' && *cp != '@' && *cp != '~' && *cp != '$' && *cp != '&' && *cp != '+' && *cp != '=' && *cp != '\t') { - char buf[128]; + char *buf = 0; - sprintf(buf, + HTSprintf0(&buf, BADCHAR_IN_EXEC_LINK, *cp); HTAlert(buf); + FREE(buf); return FALSE; } } @@ -1296,9 +1277,9 @@ PUBLIC BOOLEAN exec_ok ARGS3( check_tp_for_entry: while (tp) { if (tp->type == Type) { - char CONST *command = link; + char CONST *command = linktext; - if (strstr(command,"//") == link) { + if (strstr(command,"//") == linktext) { command += 2; } #ifdef VMS @@ -1333,7 +1314,7 @@ PRIVATE int fix_http_urls ARGS1( * If it's an ftp URL with a trailing slash, trim it off. */ if (!strncmp(doc->address, "ftp", 3) && - doc->address[strlen(doc->address)-1] == '/') { + LYIsHtmlSep(doc->address[strlen(doc->address)-1])) { char * proxy; char *path = HTParse(doc->address, "", PARSE_PATH|PARSE_PUNCTUATION); @@ -1341,7 +1322,7 @@ PRIVATE int fix_http_urls ARGS1( * If the path is a lone slash, we're done. - FM */ if (path) { - if (path[0] == '/' && path[1] == '\0') { + if (LYIsHtmlSep(path[0]) && path[1] == '\0') { FREE(path); return 0; } @@ -1358,32 +1339,24 @@ PRIVATE int fix_http_urls ARGS1( /* * If we get to here, trim the trailing slash. - FM */ - if (TRACE) - fprintf(stderr, "fix_http_urls: URL '%s'\n", doc->address); - doc->address[strlen(doc->address)-1] = '\0'; - if (TRACE) { - fprintf(stderr, " changed to '%s'\n", doc->address); - if (!LYTraceLogFP) - sleep(MessageSecs); - } + CTRACE(tfp, "fix_http_urls: URL '%s'\n", doc->address); + LYTrimHtmlSep(doc->address); + CTRACE(tfp, " changed to '%s'\n", doc->address); + CTRACE_SLEEP(MessageSecs); } /* * If there isn't a slash besides the two at the beginning, append one. */ if ((slash = strrchr(doc->address, '/')) != NULL) { - if (*(slash-1) != '/' || *(slash-2) != ':') { + if (!LYIsHtmlSep(*(slash-1)) || *(slash-2) != ':') { return(0); } } - if (TRACE) - fprintf(stderr, "fix_http_urls: URL '%s'\n", doc->address); - StrAllocCat(doc->address, "/"); - if (TRACE) { - fprintf(stderr, " changed to '%s'\n",doc->address); - if (!LYTraceLogFP) - sleep(MessageSecs); - } + CTRACE(tfp, "fix_http_urls: URL '%s'\n", doc->address); + LYAddHtmlSep(&(doc->address)); + CTRACE(tfp, " changed to '%s'\n",doc->address); + CTRACE_SLEEP(MessageSecs); return(1); } diff --git a/gnu/usr.bin/lynx/src/LYGetFile.h b/gnu/usr.bin/lynx/src/LYGetFile.h index 8ddfb99910b..93239e83e01 100644 --- a/gnu/usr.bin/lynx/src/LYGetFile.h +++ b/gnu/usr.bin/lynx/src/LYGetFile.h @@ -1,7 +1,8 @@ - #ifndef LYGETFILE_H #define LYGETFILE_H +#include + #define NOT_FOUND 0 #define NORMAL 1 #define NULLFILE 3 diff --git a/gnu/usr.bin/lynx/src/LYGlobalDefs.h b/gnu/usr.bin/lynx/src/LYGlobalDefs.h index 80cba70605a..8e8d49ba41a 100644 --- a/gnu/usr.bin/lynx/src/LYGlobalDefs.h +++ b/gnu/usr.bin/lynx/src/LYGlobalDefs.h @@ -3,18 +3,34 @@ #ifndef LYGLOBALDEFS_H #define LYGLOBALDEFS_H -#ifndef USERDEFS_H -#include "userdefs.h" -#endif /* USERDEFS_H */ - #ifndef HTUTILS_H -#include "HTUtils.h" +#include #endif /* HTUTILS_H */ #ifndef LYSTRUCTS_H -#include "LYStructs.h" +#include #endif /* LYSTRUCTS_H */ +#ifdef HAVE_CONFIG_H +#include +#else +#define COOKIE_JAR_HELP "Lynx_users_guide.html#Cookies" +#define CURRENT_KEYMAP_HELP "keystrokes/keystroke_help.html" +#define DIRED_MENU_HELP "keystrokes/dired_help.html" +#define DOWNLOAD_OPTIONS_HELP "Lynx_users_guide.html#RemoteSource" +#define HISTORY_PAGE_HELP "keystrokes/history_help.html" +#define LIST_PAGE_HELP "keystrokes/follow_help.html" +#define LYNXCFG_HELP "lynx.cfg" +#define OPTIONS_HELP "keystrokes/option_help.html" +#define PRINT_OPTIONS_HELP "keystrokes/print_help.html" +#define UPLOAD_OPTIONS_HELP "Lynx_users_guide.html#DirEd" +#define VISITED_LINKS_HELP "keystrokes/visited_help.html" +#endif /* LYHELP_H */ + +#ifdef SOURCE_CACHE +#include +#endif + #ifdef SOCKS extern BOOLEAN socks_flag; #endif /* SOCKS */ @@ -29,22 +45,6 @@ extern BOOLEAN UseFixedRecords; /* convert binary files to FIXED 512 records */ #endif /* VMS */ #ifndef VMS -extern char *NNTPSERVER_putenv_cmd; -extern char *http_proxy_putenv_cmd; -extern char *https_proxy_putenv_cmd; -extern char *ftp_proxy_putenv_cmd; -extern char *gopher_proxy_putenv_cmd; -extern char *cso_proxy_putenv_cmd; -extern char *news_proxy_putenv_cmd; -extern char *newspost_proxy_putenv_cmd; -extern char *newsreply_proxy_putenv_cmd; -extern char *snews_proxy_putenv_cmd; -extern char *snewspost_proxy_putenv_cmd; -extern char *snewsreply_proxy_putenv_cmd; -extern char *nntp_proxy_putenv_cmd; -extern char *wais_proxy_putenv_cmd; -extern char *finger_proxy_putenv_cmd; -extern char *no_proxy_putenv_cmd; extern char *list_format; #endif /* !VMS */ @@ -55,7 +55,7 @@ extern char *LYCSwingPath; #ifdef DIRED_SUPPORT extern BOOLEAN lynx_edit_mode; extern BOOLEAN no_dired_support; -extern BOOLEAN dir_list_style; +extern int dir_list_style; extern HTList *tagged; #define FILES_FIRST 1 #define MIXED_STYLE 2 @@ -100,7 +100,6 @@ extern BOOLEAN LYUseNoviceLineTwo; /* True if TOGGLE_HELP is not mapped */ extern char star_string[MAX_LINE + 1]; /* from GridText.c */ #define STARS(n) \ ((n) >= MAX_LINE ? star_string : &star_string[(MAX_LINE-1)] - (n)) -#define DIRNAMESIZE 256 #define SHOW_COLOR_UNKNOWN (-1) #define SHOW_COLOR_NEVER 0 @@ -111,7 +110,13 @@ extern int LYShowColor; /* Show color or monochrome? */ extern int LYChosenShowColor; /* extended color/monochrome choice */ extern int LYrcShowColor; /* ... as read or last written */ +#if !defined(NO_OPTION_FORMS) && !defined(NO_OPTION_MENU) +extern BOOLEAN LYUseFormsOptions; /* use Forms-based options menu */ +#else +#define LYUseFormsOptions FALSE /* simplify ifdef'ing in LYMainLoop.c */ +#endif extern BOOLEAN LYShowCursor; /* Show the cursor or hide it? */ +extern BOOLEAN verbose_img; /* display filenames of images? */ extern BOOLEAN LYUseDefShoCur; /* Command line -show_cursor toggle */ extern BOOLEAN LYCursesON; /* start_curses()->TRUE, stop_curses()->FALSE */ extern BOOLEAN LYUserSpecifiedURL; /* URL from a goto or document? */ @@ -129,19 +134,21 @@ extern char *checked_radio; /* form radio buttons */ extern char *unchecked_radio; /* form radio buttons */ extern char *empty_string; extern char *LynxHome; +extern char *original_dir; extern char *startfile; extern char *helpfile; extern char *helpfilepath; extern char *lynxjumpfile; extern char *lynxlistfile; extern char *lynxlinksfile; -extern char *display; +extern char *x_display; extern char *language; extern char *pref_charset; /* Lynx's preferred character set - MM */ extern BOOLEAN LYNewsPosting; /* News posting supported if TRUE */ extern char *LynxSigFile; /* Signature file, in or off home */ extern char *system_mail; extern char *system_mail_flags; +extern char *lynx_cfg_file; /* location of active lynx.cfg file */ extern char *lynx_temp_space; extern char *lynx_save_space; extern BOOLEAN LYforce_HTML_mode; @@ -149,7 +156,8 @@ extern BOOLEAN LYforce_no_cache; extern BOOLEAN LYoverride_no_cache; /* don't need fresh copy, from history */ extern BOOLEAN LYinternal_flag; /* don't need fresh copy, was internal link */ extern BOOLEAN LYresubmit_posts; -extern BOOLEAN user_mode; /* novice or advanced */ +extern BOOLEAN LYshow_kb_rate; /* show KB/sec in HTReadProgress */ +extern int user_mode; /* novice or advanced */ extern BOOLEAN is_www_index; extern BOOLEAN dump_output_immediately; extern int dump_output_width; @@ -162,20 +170,19 @@ extern BOOLEAN telnet_ok; extern BOOLEAN news_ok; extern BOOLEAN ftp_ok; extern BOOLEAN rlogin_ok; -extern BOOLEAN no_print; /* TRUE to disable printing */ -extern BOOLEAN system_editor; /* True if locked-down editor */ -extern BOOLEAN child_lynx; /* TRUE to exit with an arrow */ +extern BOOLEAN system_editor; /* True if locked-down editor */ +extern BOOLEAN child_lynx; /* TRUE to exit with an arrow */ extern BOOLEAN error_logging; /* TRUE to mail error messages */ extern BOOLEAN check_mail; /* TRUE to report unread/new mail messages */ extern BOOLEAN vi_keys; /* TRUE to turn on vi-like key movement */ extern BOOLEAN emacs_keys; /* TRUE to turn on emacs-like key movement */ -extern BOOLEAN keypad_mode; /* is set to either NUMBERS_AS_ARROWS * +extern int keypad_mode; /* is set to either NUMBERS_AS_ARROWS * * or LINKS_ARE_NUMBERED */ extern BOOLEAN case_sensitive; /* TRUE to turn on case sensitive search */ extern BOOLEAN no_inside_telnet; /* this and following are restrictions */ extern BOOLEAN no_outside_telnet; extern BOOLEAN no_telnet_port; -extern BOOLEAN no_inside_news; +extern BOOLEAN no_inside_news; extern BOOLEAN no_outside_news; extern BOOLEAN no_inside_ftp; extern BOOLEAN no_outside_ftp; @@ -188,8 +195,8 @@ extern BOOLEAN no_bookmark; extern BOOLEAN no_multibook; extern BOOLEAN no_bookmark_exec; extern BOOLEAN no_option_save; -extern BOOLEAN no_print; extern BOOLEAN no_download; +extern BOOLEAN no_print; /* TRUE to disable printing */ extern BOOLEAN no_disk_save; extern BOOLEAN no_exec; extern BOOLEAN no_lynxcgi; @@ -243,21 +250,40 @@ extern BOOLEAN nolist; extern BOOLEAN historical_comments; extern BOOLEAN minimal_comments; extern BOOLEAN soft_dquotes; +#ifdef SOURCE_CACHE +extern char * source_cache_filename; +extern HTChunk * source_cache_chunk; +extern BOOLEAN from_source_cache; /* mutable */ +extern int LYCacheSource; +#define SOURCE_CACHE_NONE 0 +#define SOURCE_CACHE_FILE 1 +#define SOURCE_CACHE_MEMORY 2 +#endif extern BOOLEAN LYCancelDownload; +extern BOOLEAN LYRestricted; extern BOOLEAN LYValidate; extern BOOLEAN LYPermitURL; extern BOOLEAN enable_scrollback; /* Clear screen before displaying new page */ extern BOOLEAN keep_mime_headers; /* Include mime headers and * * force source dump */ extern BOOLEAN no_url_redirection; /* Don't follow URL redirections */ +#ifdef DISP_PARTIAL +extern BOOLEAN display_partial; /* Display document during download */ +extern int Newline_partial; /* -//- "current" newline position */ +extern int NumOfLines_partial; /* -//- "current" number of lines */ +extern int partial_threshold; +extern BOOLEAN debug_display_partial; /* show with MessageSecs delay */ +extern BOOLEAN display_partial_flag; /* permanent flag, not mutable */ +extern int Newline; /* original newline position, from mainloop() */ +#endif extern char *form_post_data; /* User data for post form */ extern char *form_get_data; /* User data for get form */ extern char *http_error_file; /* Place HTTP status code in this file */ extern char *authentication_info[2]; /* Id:Password for protected documents */ -extern char *proxyauth_info[2]; /* Id:Password for protected proxy server */ -extern BOOLEAN HEAD_request; /* Do a HEAD request */ +extern char *proxyauth_info[2]; /* Id:Password for protected proxy server */ +extern BOOLEAN HEAD_request; /* Do a HEAD request */ extern BOOLEAN scan_for_buried_news_references; -extern BOOLEAN bookmark_start; /* Use bookmarks as startfile */ +extern BOOLEAN bookmark_start; /* Use bookmarks as startfile */ extern BOOLEAN clickable_images; extern BOOLEAN pseudo_inline_alts; extern BOOLEAN crawl; @@ -279,36 +305,52 @@ extern BOOLEAN LYNoFromHeader; /* Never send From header? */ extern BOOLEAN LYListNewsNumbers; extern BOOLEAN LYUseMouse; extern BOOLEAN LYListNewsDates; + extern BOOLEAN LYRawMode; extern BOOLEAN LYDefaultRawMode; extern BOOLEAN LYUseDefaultRawMode; extern char *UCAssume_MIMEcharset; -extern char *UCAssume_localMIMEcharset; -extern char *UCAssume_unrecMIMEcharset; +extern BOOLEAN UCSaveBookmarksInUnicode; /* in titles, chars >127 save as &#xUUUU */ +extern BOOLEAN UCForce8bitTOUPPER; /* disable locale case-conversion for >127 */ +extern int outgoing_mail_charset; /* translate outgoing mail to this charset */ + extern BOOLEAN LYisConfiguredForX; extern char *URLDomainPrefixes; extern char *URLDomainSuffixes; extern BOOLEAN startfile_ok; extern BOOLEAN LYSelectPopups; /* Cast popups to radio buttons? */ extern BOOLEAN LYUseDefSelPop; /* Command line -popup toggle */ -extern int LYMultiBookmarks; /* Multi bookmark support on? */ +extern BOOLEAN LYMultiBookmarks; /* Multi bookmark support on? */ extern BOOLEAN LYMBMBlocked; /* Force MBM support off? */ extern BOOLEAN LYMBMAdvanced; /* MBM statusline for ADVANCED? */ extern int LYStatusLine; /* Line for statusline() or -1 */ extern BOOLEAN LYCollapseBRs; /* Collapse serial BRs? */ extern BOOLEAN LYSetCookies; /* Process Set-Cookie headers? */ +extern BOOLEAN LYAcceptAllCookies; /* accept ALL cookies? */ +extern char *LYCookieAcceptDomains; /* domains to accept all cookies */ +extern char *LYCookieRejectDomains; /* domains to reject all cookies */ +extern char *LYCookieStrictCheckDomains; /* domains to check strictly */ +extern char *LYCookieLooseCheckDomains; /* domains to check loosely */ +extern char *LYCookieQueryCheckDomains; /* domains to check w/a query */ +extern char *LYCookieSAcceptDomains; /* domains to accept all cookies */ +extern char *LYCookieSRejectDomains; /* domains to reject all cookies */ +extern char *LYCookieSStrictCheckDomains;/* domains to check strictly */ +extern char *LYCookieSLooseCheckDomains;/* domains to check loosely */ +extern char *LYCookieSQueryCheckDomains;/* domains to check w/a query */ +#ifdef EXP_PERSISTENT_COOKIES +extern BOOLEAN persistent_cookies; +extern char *LYCookieFile; /* file to store cookies in */ +#endif /* EXP_PERSISTENT_COOKIES */ extern char *XLoadImageCommand; /* Default image viewer for X */ #ifdef USE_EXTERNALS -extern BOOLEAN no_externals; /* don't allow the use of externals */ +extern BOOLEAN no_externals; /* don't allow the use of externals */ #endif extern BOOLEAN LYNoISMAPifUSEMAP; /* Omit ISMAP link if MAP present? */ extern int LYHiddenLinks; -extern BOOL New_DTD; +extern BOOL Old_DTD; -#define BOOKMARK_TITLE "Bookmark file" -#define MOSAIC_BOOKMARK_TITLE "Converted Mosaic Hotlist" -#define MBM_V_MAXFILES 25 /* Max number of sub-bookmark files */ +#define MBM_V_MAXFILES 25 /* Max number of sub-bookmark files */ /* * Arrays that holds the names of sub-bookmark files * and their descriptions. @@ -318,7 +360,6 @@ extern char *MBM_A_subdescript[MBM_V_MAXFILES+1]; extern FILE *LYTraceLogFP; /* Pointer for TRACE log */ extern char *LYTraceLogPath; /* Path for TRACE log */ extern BOOLEAN LYUseTraceLog; /* Use a TRACE log? */ -extern FILE LYOrigStderr; /* Original stderr pointer */ extern BOOLEAN LYSeekFragMAPinCur; extern BOOLEAN LYSeekFragAREAinCur; extern BOOLEAN LYStripDotDotURLs; /* Try to fix ../ in some URLs? */ @@ -329,10 +370,6 @@ extern BOOLEAN LYPrependBaseToSource; extern BOOLEAN LYPrependCharsetToSource; extern BOOLEAN LYQuitDefaultYes; -#ifdef RAWDOSKEYHACK -extern BOOLEAN raw_dos_key_hack; /* Turn on and off DOS key hack */ -#endif /* RAWDOSKEYHACK */ - #ifndef VMS extern BOOLEAN LYNoCore; #endif /* !VMS */ diff --git a/gnu/usr.bin/lynx/src/LYHash.c b/gnu/usr.bin/lynx/src/LYHash.c index a6eea95f594..a40f392b92d 100644 --- a/gnu/usr.bin/lynx/src/LYHash.c +++ b/gnu/usr.bin/lynx/src/LYHash.c @@ -1,14 +1,9 @@ /* A hash table for the (fake) CSS support in Lynx-rp ** (c) 1996 Rob Partington */ +#include -#include "LYStructs.h" -#include "LYCurses.h" -#include "AttrList.h" -#include "SGML.h" -#include "HTMLDTD.h" - -#include "LYHash.h" +#ifdef USE_COLOR_STYLE #ifdef NOT_USED @@ -16,36 +11,67 @@ PUBLIC int hash_table[CSHASHSIZE]; /* 32K should be big enough */ PUBLIC int hash_code_rp ARGS1(char*,string) { - char* hash_ptr = string; - int hash_tmp = 0xC00A | ((*hash_ptr) << 4); - - while (*hash_ptr++) - { - hash_tmp ^= (((*hash_ptr)<<4) ^ ((*hash_ptr)<<12)); - hash_tmp >>= 1; - } - return (hash_tmp % CSHASHSIZE); + char* hash_ptr = string; + int hash_tmp = 0xC00A | ((*hash_ptr) << 4); + + while (*hash_ptr++) + { + hash_tmp ^= (((*hash_ptr)<<4) ^ ((*hash_ptr)<<12)); + hash_tmp >>= 1; + } + return (hash_tmp % CSHASHSIZE); } #endif /* - * This is the same function as the private HASH_FUNCTION() in HTAnchor.c, - * but with a different value for HASH_SIZE. - */ + * This is the same function as the private HASH_FUNCTION() in HTAnchor.c, + * but with a different value for HASH_SIZE. + */ #ifdef NOT_USED -#define HASH_SIZE 8193 /* Arbitrary prime. Memory/speed tradeoff */ +#define HASH_SIZE 8193 /* Arbitrary prime. Memory/speed tradeoff */ #else #define HASH_SIZE CSHASHSIZE #endif +#define HASH_OF(h, v) ((int)((h) * 3 + (unsigned char)(v)) % HASH_SIZE) + PUBLIC int hash_code ARGS1 (char*, string) { int hash; unsigned char *p; for (p = (unsigned char *)string, hash = 0; *p; p++) - hash = (int) (hash * 3 + (*(unsigned char *)p)) % HASH_SIZE; + hash = HASH_OF(hash,*p); + + return hash; +} + +PUBLIC int hash_code_lowercase_on_fly ARGS1 (char*, string) +{ + int hash; + unsigned char *p; + + for (p = (unsigned char *)string, hash = 0; *p; p++) + hash = HASH_OF(hash,tolower(*(char *)p)); return hash; } + +PUBLIC int hash_code_aggregate_char ARGS2 (char, c,int,hash) +{ + return HASH_OF(hash,c); +} + +PUBLIC int hash_code_aggregate_lower_str ARGS2 (char*, string,int,hash_was) +{ + int hash; + unsigned char *p; + + for (p = (unsigned char *)string, hash = hash_was ; *p; p++) + hash = HASH_OF(hash,tolower(*(char *)p)); + + return hash; +} + +#endif /* USE_COLOR_STYLE */ diff --git a/gnu/usr.bin/lynx/src/LYHash.h b/gnu/usr.bin/lynx/src/LYHash.h index 00f8066c5e2..7945051c3ff 100644 --- a/gnu/usr.bin/lynx/src/LYHash.h +++ b/gnu/usr.bin/lynx/src/LYHash.h @@ -1,6 +1,10 @@ #if !defined(_LYHASH_H_) #define _LYHASH_H_ 1 +#ifndef HTUTILS_H +#include +#endif + struct _hashbucket { char *name; /* name of this item */ int code; /* code of this item */ @@ -13,7 +17,7 @@ struct _hashbucket { typedef struct _hashbucket bucket; #if !defined(CSHASHSIZE) -#ifdef NOT_USED +#ifdef NOT_USED #define CSHASHSIZE 32768 #else #define CSHASHSIZE 8193 @@ -24,13 +28,24 @@ typedef struct _hashbucket bucket; extern bucket hashStyles[CSHASHSIZE]; extern int hash_code PARAMS((char* string)); +extern bucket special_bucket;/*it's used when OMIT_SCN_KEEPING is 1 in HTML.c + and LYCurses.c. */ +extern bucket nostyle_bucket;/*initialized properly - to be used in CTRACE when + NOSTYLE is passed as 'style' to curses_w_style */ + +extern int hash_code_lowercase_on_fly PARAMS((char* string)); +extern int hash_code_aggregate_char PARAMS((char c,int hash)); +extern int hash_code_aggregate_lower_str PARAMS((char* c,int hash_was)); + + #ifdef NOT_USED extern int hash_table[CSHASHSIZE]; /* 32K should be big enough */ #endif extern int s_alink, s_a, s_status, s_label, s_value, s_high, - s_normal, s_alert, s_title; + s_normal, s_alert, s_title, + s_whereis; #define CACHEW 128 #define CACHEH 64 diff --git a/gnu/usr.bin/lynx/src/LYHistory.c b/gnu/usr.bin/lynx/src/LYHistory.c index bccb2ec81fa..65c3874cd0c 100644 --- a/gnu/usr.bin/lynx/src/LYHistory.c +++ b/gnu/usr.bin/lynx/src/LYHistory.c @@ -1,33 +1,33 @@ -#include "HTUtils.h" -#include "tcp.h" -#include "HTTP.h" -#include "HTAlert.h" -#include "HText.h" -#include "LYGlobalDefs.h" -#include "LYUtils.h" -#include "LYHistory.h" -#include "LYPrint.h" -#include "LYDownload.h" -#include "LYKeymap.h" -#include "LYList.h" -#include "LYShowInfo.h" -#include "LYSignal.h" -#include "LYStrings.h" -#include "LYCharUtils.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef DIRED_SUPPORT -#include "LYUpload.h" -#include "LYLocal.h" +#include +#include #endif /* DIRED_SUPPORT */ -#include "LYexit.h" -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} +#include +#include -PUBLIC HTList * Visited_Links = NULL; /* List of safe popped docs. */ +PUBLIC HTList * Visited_Links = NULL; /* List of safe popped docs. */ -/* +#ifdef LY_FIND_LEAKS +/* * Utility for freeing the list of visited links. - FM */ PRIVATE void Visited_Links_free NOARGS @@ -36,7 +36,7 @@ PRIVATE void Visited_Links_free NOARGS HTList *cur = Visited_Links; if (!cur) - return; + return; while (NULL != (vl = (VisitedLink *)HTList_nextObject(cur))) { FREE(vl->address); @@ -47,8 +47,9 @@ PRIVATE void Visited_Links_free NOARGS Visited_Links = NULL; return; } +#endif /* LY_FIND_LEAKS */ -/* +/* * Utility for listing visited links, making any repeated * links the most current in the list. - FM */ @@ -60,16 +61,21 @@ PUBLIC void LYAddVisitedLink ARGS1( HTList *cur; if (!(doc->address && *doc->address)) - return; + return; /* - * Exclude POST or HEAD replies, and bookmark, menu - * or list files. - FM + * Exclude POST or HEAD replies, and bookmark, menu + * or list files. - FM */ if (doc->post_data || doc->isHEAD || doc->bookmark || + (/* special url or a temp file */ + (!strncmp(doc->address, "LYNX", 4) || + !strncmp(doc->address, "file://localhost/", 17)) + && ( !strcmp((doc->title ? doc->title : ""), HISTORY_PAGE_TITLE) || !strcmp((doc->title ? doc->title : ""), PRINT_OPTIONS_TITLE) || !strcmp((doc->title ? doc->title : ""), DOWNLOAD_OPTIONS_TITLE) || + !strcmp((doc->title ? doc->title : ""), OPTIONS_TITLE) || #ifdef DIRED_SUPPORT !strcmp((doc->title ? doc->title : ""), DIRED_MENU_TITLE) || !strcmp((doc->title ? doc->title : ""), UPLOAD_OPTIONS_TITLE) || @@ -77,21 +83,29 @@ PUBLIC void LYAddVisitedLink ARGS1( #endif /* DIRED_SUPPORT */ !strcmp((doc->title ? doc->title : ""), CURRENT_KEYMAP_TITLE) || !strcmp((doc->title ? doc->title : ""), LIST_PAGE_TITLE) || +#ifdef EXP_ADDRLIST_PAGE + !strcmp((doc->title ? doc->title : ""), ADDRLIST_PAGE_TITLE) || +#endif !strcmp((doc->title ? doc->title : ""), SHOWINFO_TITLE) || + !strcmp((doc->title ? doc->title : ""), STATUSLINES_TITLE) || + !strcmp((doc->title ? doc->title : ""), CONFIG_DEF_TITLE) || + !strcmp((doc->title ? doc->title : ""), LYNXCFG_TITLE) || !strcmp((doc->title ? doc->title : ""), COOKIE_JAR_TITLE) || !strcmp((doc->title ? doc->title : ""), VISITED_LINKS_TITLE) || - !strcmp((doc->title ? doc->title : ""), LYNX_TRACELOG_TITLE)) { + !strcmp((doc->title ? doc->title : ""), LYNX_TRACELOG_TITLE)))) { return; } if ((new = (VisitedLink *)calloc(1, sizeof(*new))) == NULL) - outofmem(__FILE__, "HTAddVisitedLink"); + outofmem(__FILE__, "LYAddVisitedLink"); StrAllocCopy(new->address, doc->address); - StrAllocCopy(new->title, (doc->title ? doc->title : "(no title)")); + StrAllocCopy(new->title, (doc->title ? doc->title : NO_TITLE)); if (!Visited_Links) { - Visited_Links = HTList_new(); + Visited_Links = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(Visited_Links_free); +#endif HTList_addObject(Visited_Links, new); return; } @@ -101,7 +115,7 @@ PUBLIC void LYAddVisitedLink ARGS1( if (!strcmp((old->address ? old->address : ""), (new->address ? new->address : "")) && !strcmp((old->title ? new->title : ""), - (new->title ? new->title : ""))) { + (new->title ? new->title : ""))) { FREE(old->address); FREE(old->title); HTList_removeObject(Visited_Links, old); @@ -114,6 +128,26 @@ PUBLIC void LYAddVisitedLink ARGS1( return; } +/* + * Returns true if this is a page that we would push onto the stack if not + * forced. + */ +PUBLIC BOOLEAN LYwouldPush ARGS1( + char *, title) +{ + return (!strcmp(title, HISTORY_PAGE_TITLE) + || !strcmp(title, PRINT_OPTIONS_TITLE) + || !strcmp(title, DOWNLOAD_OPTIONS_TITLE) +#ifdef DIRED_SUPPORT + || !strcmp(title, DIRED_MENU_TITLE) + || !strcmp(title, UPLOAD_OPTIONS_TITLE) + || !strcmp(title, PERMIT_OPTIONS_TITLE) +#endif /* DIRED_SUPPORT */ + ) + ? FALSE + : TRUE; +} + /* * Push the current filename, link and line number onto the history list. */ @@ -122,98 +156,54 @@ PUBLIC void LYpush ARGS2( BOOLEAN, force_push) { /* - * Don't push NULL file names. + * Don't push NULL file names. */ if (*doc->address == '\0') return; /* - * Check whether this is a document we - * don't push unless forced. - FM + * Check whether this is a document we + * don't push unless forced. - FM */ if (!force_push) { /* * Don't push the history, printer, or download lists. */ - if (!strcmp(doc->title, HISTORY_PAGE_TITLE) || - !strcmp(doc->title, PRINT_OPTIONS_TITLE) || - !strcmp(doc->title, DOWNLOAD_OPTIONS_TITLE)) { - if (!LYforce_no_cache) - LYoverride_no_cache = TRUE; - return; - } - -#ifdef DIRED_SUPPORT - /* - * Don't push DIRED menu, upload or permit lists. - */ - if (!strcmp(doc->title, DIRED_MENU_TITLE) || - !strcmp(doc->title, UPLOAD_OPTIONS_TITLE) || - !strcmp(doc->title, PERMIT_OPTIONS_TITLE)) { + if (!LYwouldPush(doc->title)) { if (!LYforce_no_cache) LYoverride_no_cache = TRUE; return; } -#endif /* DIRED_SUPPORT */ } /* - * If file is identical to one before it, don't push it. + * If file is identical to one before it, don't push it. */ if (nhist> 1 && - STREQ(history[nhist-1].address, doc->address) && - !strcmp(history[nhist-1].post_data ? + STREQ(history[nhist-1].address, doc->address) && + !strcmp(history[nhist-1].post_data ? history[nhist-1].post_data : "", - doc->post_data ? + doc->post_data ? doc->post_data : "") && - !strcmp(history[nhist-1].bookmark ? + !strcmp(history[nhist-1].bookmark ? history[nhist-1].bookmark : "", - doc->bookmark ? + doc->bookmark ? doc->bookmark : "") && history[nhist-1].isHEAD == doc->isHEAD) { if (history[nhist-1].internal_link == doc->internal_link) { /* But it is nice to have the last position remembered! - kw */ history[nhist-1].link = doc->link; - history[nhist-1].page = doc->line; - return; + history[nhist-1].line = doc->line; + return; } } - -#ifdef NOTDEFINED -/* -** The following segment not used any more - What's it good for, -** anyway?? Doing a pop when a push is requested is confusing, -** also to the user. Moreover, the way it was done seems to cause -** a memory leak. - KW -*/ /* - * If file is identical to one two before it, don't push it. - */ - if (nhist > 2 && - STREQ(history[nhist-2].address, doc->address) && - !strcmp(history[nhist-2].post_data ? - history[nhist-2].post_data : "", - doc->post_data ? - doc->post_data : "") && - !strcmp(history[nhist-2].bookmark ? - history[nhist-2].bookmark : "", - doc->bookmark ? - doc->bookmark : "") && - history[nhist-2].isHEAD == doc->isHEAD) { - /* - * Pop one off the stack. - */ - nhist--; - return; - } -#endif /* NOTDEFINED */ - /* - * OK, push it if we have stack space. + * OK, push it if we have stack space. */ if (nhist < MAXHIST) { history[nhist].link = doc->link; - history[nhist].page = doc->line; + history[nhist].line = doc->line; history[nhist].title = NULL; StrAllocCopy(history[nhist].title, doc->title); history[nhist].address = NULL; @@ -230,7 +220,7 @@ PUBLIC void LYpush ARGS2( history[nhist].internal_link = FALSE; /* by default */ history[nhist].intern_seq_start = -1; /* by default */ if (doc->internal_link) { - /* Now some tricky stuff: if the caller thinks that the doc + /* Now some tricky stuff: if the caller thinks that the doc to push was the result of following an internal (fragment) link, we check whether we believe it. It is only accepted as valid if the immediately preceding @@ -291,7 +281,7 @@ PUBLIC void LYpush ARGS2( HTAnchor_parent(HTAnchor_findAddress(&WWWDoc)); } /* In addition to equality of the ParentAnchors, require - ** that IF we have a HTMainText (i.e. it wasn't just + ** that IF we have a HTMainText (i.e., it wasn't just ** HTuncache'd by mainloop), THEN it has to be consistent ** with what we are trying to push. ** This may be overkill... - kw @@ -303,37 +293,24 @@ PUBLIC void LYpush ARGS2( history[nhist].intern_seq_start = history[nhist-1].intern_seq_start >= 0 ? history[nhist-1].intern_seq_start : nhist-1; - if (TRACE) { - fprintf(stderr, - "\nLYpush: pushed as internal link, OK\n"); - } + CTRACE(tfp, "\nLYpush: pushed as internal link, OK\n"); } } } if (!history[nhist].internal_link) { - if (TRACE) { - fprintf(stderr, - "\nLYpush: push as internal link requested, %s\n", + CTRACE(tfp, "\nLYpush: push as internal link requested, %s\n", "but didn't check out!"); - } } } + CTRACE(tfp, "\nLYpush[%d]: address:%s\n title:%s\n", + nhist, doc->address, doc->title); nhist++; - if (TRACE) { - fprintf(stderr, - "\nLYpush: address:%s\n title:%s\n", - doc->address, doc->title); - } } else { - if (LYCursesON) { - _statusline(MAXHIST_REACHED); - sleep(AlertSecs); - } - if (TRACE) { - fprintf(stderr, - "\nLYpush: MAXHIST reached for:\n address:%s\n title:%s\n", - doc->address, doc->title); + if (LYCursesON) { + HTAlert(MAXHIST_REACHED); } + CTRACE(tfp, "\nLYpush: MAXHIST reached for:\n address:%s\n title:%s\n", + doc->address, doc->title); } } @@ -346,11 +323,11 @@ PUBLIC void LYpop ARGS1( if (nhist > 0) { nhist--; doc->link = history[nhist].link; - doc->line = history[nhist].page; + doc->line = history[nhist].line; FREE(doc->title); doc->title = history[nhist].title; /* will be freed later */ FREE(doc->address); - doc->address = history[nhist].address; /* will be freed later */ + doc->address = history[nhist].address; /* will be freed later */ FREE(doc->post_data); doc->post_data = history[nhist].post_data; FREE(doc->post_content_type); @@ -360,11 +337,12 @@ PUBLIC void LYpop ARGS1( doc->isHEAD = history[nhist].isHEAD; doc->safe = history[nhist].safe; doc->internal_link = history[nhist].internal_link; - if (TRACE) { - fprintf(stderr, - "LYpop: address:%s\n title:%s\n", - doc->address, doc->title); - } +#ifdef DISP_PARTIAL + /* assume we pop the 'doc' to show it soon... */ + Newline_partial = doc->line; /* reinitialize */ +#endif /* DISP_PARTIAL */ + CTRACE(tfp, "LYpop[%d]: address:%s\n title:%s\n", + nhist, doc->address, doc->title); } } @@ -379,7 +357,7 @@ PUBLIC void LYpop_num ARGS2( { if (number >= 0 && nhist > number) { doc->link = history[number].link; - doc->line = history[number].page; + doc->line = history[number].line; StrAllocCopy(doc->title, history[number].title); StrAllocCopy(doc->address, history[number].address); StrAllocCopy(doc->post_data, history[number].post_data); @@ -388,6 +366,10 @@ PUBLIC void LYpop_num ARGS2( doc->isHEAD = history[number].isHEAD; doc->safe = history[number].safe; doc->internal_link = history[number].internal_link; /* ?? */ +#ifdef DISP_PARTIAL + /* assume we pop the 'doc' to show it soon... */ + Newline_partial = doc->line; /* reinitialize */ +#endif /* DISP_PARTIAL */ } } @@ -397,46 +379,30 @@ PUBLIC void LYpop_num ARGS2( PUBLIC int showhistory ARGS1( char **, newfile) { - static char tempfile[256]; - static BOOLEAN first = TRUE; - static char hist_filename[256]; + static char tempfile[LY_MAXPATH]; char *Title = NULL; int x = 0; FILE *fp0; - if (first) { - tempname(tempfile, NEW_FILE); - /* - * Make the file a URL now. - */ -#if defined (VMS) || defined (DOSPATH) - sprintf(hist_filename,"file://localhost/%s", tempfile); -#else - sprintf(hist_filename,"file://localhost%s", tempfile); -#endif /* VMS */ - first = FALSE; -#ifdef VMS - } else { - remove(tempfile); /* Remove duplicates on VMS. */ -#endif /* VMS */ - } - - if ((fp0 = LYNewTxtFile(tempfile)) == NULL) { + LYRemoveTemp(tempfile); + if ((fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w")) == NULL) { HTAlert(CANNOT_OPEN_TEMP); return(-1); } - StrAllocCopy(*newfile, hist_filename); + LYLocalFileToURL(newfile, tempfile); + LYforce_HTML_mode = TRUE; /* force this file to be HTML */ LYforce_no_cache = TRUE; /* force this file to be new */ - fprintf(fp0, "\n"); - LYAddMETAcharsetToFD(fp0, -1); - fprintf(fp0, "%s\n\n\n", - HISTORY_PAGE_TITLE); - fprintf(fp0, "

                            You have reached the History Page

                            \n"); - fprintf(fp0, "

                            %s Version %s

                            \n
                            ", LYNX_NAME, LYNX_VERSION);
                            -    fprintf(fp0, "You selected:\n");
                            +    BeginInternalPage(fp0, HISTORY_PAGE_TITLE, HISTORY_PAGE_HELP);
                            +
                            +    fprintf(fp0, " [%s] \n",
                            +		 STATUSLINES_TITLE);
                            +
                            +    fprintf(fp0, "
                            \n");
                            +
                            +    fprintf(fp0, "%s\n", gettext("You selected:"));
                                 for (x = nhist-1; x >= 0; x--) {
                             	/*
                             	 *  The number of the document in the hist stack,
                            @@ -445,36 +411,40 @@ PUBLIC int showhistory ARGS1(
                             	if (history[x].title != NULL) {
                             	    StrAllocCopy(Title, history[x].title);
                             	    LYEntify(&Title, TRUE);
                            +	    LYTrimLeading(Title);
                            +	    LYTrimTrailing(Title);
                            +	    if (*Title == '\0')
                            +		StrAllocCopy(Title , NO_TITLE);
                             	} else {
                            -	    StrAllocCopy(Title, "(no title)");
                            +	    StrAllocCopy(Title, NO_TITLE);
                             	}
                             	fprintf(fp0,
                             		"%s%d. %s\n",
                            -		(x > 99 ? "" : x < 10 ? "  " : " "),  
                            +		(x > 99 ? "" : x < 10 ? "  " : " "),
                             		x, x, x, Title);
                             	if (history[x].address != NULL) {
                             	    StrAllocCopy(Title, history[x].address);
                             	    LYEntify(&Title, TRUE);
                             	} else {
                            -	    StrAllocCopy(Title, "(no address)");
                            +	    StrAllocCopy(Title, gettext("(no address)"));
                             	}
                             	if (history[x].internal_link) {
                             	    if (history[x].intern_seq_start == history[nhist-1].intern_seq_start)
                            -		StrAllocCat(Title, " (internal)");
                            +		StrAllocCat(Title, gettext(" (internal)"));
                             	    else
                            -		StrAllocCat(Title, " (was internal)");
                            +		StrAllocCat(Title, gettext(" (was internal)"));
                             	}
                             	fprintf(fp0, "%s\n", x, Title);
                                 }
                            +    fprintf(fp0,"
                            \n"); + EndInternalPage(fp0); - fprintf(fp0,"
                            \n\n"); - - fclose(fp0); + LYCloseTempFP(fp0); FREE(Title); return(0); } -/* +/* * This function makes the history page seem like any other type of * file since more info is needed than can be provided by the normal * link structure. We saved out the history number to a special URL. @@ -490,11 +460,17 @@ PUBLIC BOOLEAN historytarget ARGS1( BOOLEAN treat_as_intern = FALSE; if ((!newdoc || !newdoc->address) || - strlen(newdoc->address) < 10 || !isdigit(*(newdoc->address+9))) + strlen(newdoc->address) < 10 || !isdigit(*(newdoc->address+9))) return(FALSE); if ((number = atoi(newdoc->address+9)) > nhist || number < 0) - return(FALSE); + return(FALSE); + + /* + * Optimization: assume we came from the History Page, + * so never return back - always a new version next time. + */ + HTuncache_current_document(); /* don't waste the cache */ LYpop_num(number, newdoc); if (((newdoc->internal_link && @@ -513,20 +489,20 @@ PUBLIC BOOLEAN historytarget ARGS1( newdoc->internal_link = FALSE; } /* - * If we have POST content, and have LYresubmit_posts set - * or have no_cache set or do not still have the text cached, - * ask the user whether to resubmit the form. - FM + * If we have POST content, and have LYresubmit_posts set + * or have no_cache set or do not still have the text cached, + * ask the user whether to resubmit the form. - FM */ if (newdoc->post_data != NULL) { WWWDoc.address = newdoc->address; - WWWDoc.post_data = newdoc->post_data; - WWWDoc.post_content_type = newdoc->post_content_type; - WWWDoc.bookmark = newdoc->bookmark; + WWWDoc.post_data = newdoc->post_data; + WWWDoc.post_content_type = newdoc->post_content_type; + WWWDoc.bookmark = newdoc->bookmark; WWWDoc.isHEAD = newdoc->isHEAD; WWWDoc.safe = newdoc->safe; tmpanchor = HTAnchor_parent(HTAnchor_findAddress(&WWWDoc)); text = (HText *)HTAnchor_document(tmpanchor); - if (((((LYresubmit_posts == TRUE) || + if (((((LYresubmit_posts == TRUE) || (LYforce_no_cache == TRUE && LYoverride_no_cache == FALSE)) && !(treat_as_intern && !reloading)) || @@ -539,14 +515,13 @@ PUBLIC BOOLEAN historytarget ARGS1( LYforce_no_cache = FALSE; LYoverride_no_cache = TRUE; } else { - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); return(FALSE); } } if (number != 0) - StrAllocCat(newdoc->title," (From History)"); + StrAllocCat(newdoc->title, gettext(" (From History)")); return(TRUE); } @@ -557,9 +532,7 @@ PUBLIC BOOLEAN historytarget ARGS1( PUBLIC int LYShowVisitedLinks ARGS1( char **, newfile) { - static char tempfile[256]; - static BOOLEAN first = TRUE; - static char vl_filename[256]; + static char tempfile[LY_MAXPATH]; char *Title = NULL; char *Address = NULL; int x; @@ -568,42 +541,24 @@ PUBLIC int LYShowVisitedLinks ARGS1( HTList *cur = Visited_Links; if (!cur) - return(-1); - - if (first) { - tempname(tempfile, NEW_FILE); - /* - * Make the file a URL now. - */ -#if defined (VMS) || defined (DOSPATH) - sprintf(vl_filename,"file://localhost/%s", tempfile); -#else - sprintf(vl_filename,"file://localhost%s", tempfile); -#endif /* VMS */ - first = FALSE; -#ifdef VMS - } else { - remove(tempfile); /* Remove duplicates on VMS. */ -#endif /* VMS */ - } + return(-1); - if ((fp0 = LYNewTxtFile(tempfile)) == NULL) { + LYRemoveTemp(tempfile); + if ((fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w")) == NULL) { HTAlert(CANNOT_OPEN_TEMP); return(-1); } - StrAllocCopy(*newfile, vl_filename); + LYLocalFileToURL(newfile, tempfile); + LYforce_HTML_mode = TRUE; /* force this file to be HTML */ LYforce_no_cache = TRUE; /* force this file to be new */ - fprintf(fp0, "\n"); - LYAddMETAcharsetToFD(fp0, -1); - fprintf(fp0, "%s\n\n\n", - VISITED_LINKS_TITLE); - fprintf(fp0, "

                            You have reached the Visited Links Page

                            \n"); - fprintf(fp0, "

                            %s Version %s

                            \n
                            ", LYNX_NAME, LYNX_VERSION);
                            -    fprintf(fp0, 
                            -  "You visited (POSTs, bookmark, menu and list files excluded):\n");
                            +    BeginInternalPage(fp0, VISITED_LINKS_TITLE, VISITED_LINKS_HELP);
                            +
                            +    fprintf(fp0, "
                            \n");
                            +    fprintf(fp0, "%s\n",
                            +	    gettext("You visited (POSTs, bookmark, menu and list files excluded):"));
                                 x = HTList_count(Visited_Links);
                                 while (NULL != (vl = (VisitedLink *)HTList_nextObject(cur))) {
                             	/*
                            @@ -614,8 +569,12 @@ PUBLIC int LYShowVisitedLinks ARGS1(
                             	if (vl->title != NULL && *vl->title != '\0') {
                             	    StrAllocCopy(Title, vl->title);
                             	    LYEntify(&Title, TRUE);
                            +	    LYTrimLeading(Title);
                            +	    LYTrimTrailing(Title);
                            +	    if (*Title == '\0')
                            +		StrAllocCopy(Title , NO_TITLE);
                             	} else {
                            -	    StrAllocCopy(Title , "(no title)");
                            +	    StrAllocCopy(Title , NO_TITLE);
                             	}
                             	if (vl->address != NULL && *vl->address != '\0') {
                             	    StrAllocCopy(Address, vl->address);
                            @@ -635,13 +594,172 @@ PUBLIC int LYShowVisitedLinks ARGS1(
                             	    LYEntify(&Address, TRUE);
                             	}
                             	fprintf(fp0, "%s\n", x,
                            -		     ((Address != NULL) ? Address : "(no address)"));
                            +		     ((Address != NULL) ? Address : gettext("(no address)")));
                                 }
                            +    fprintf(fp0,"
                            \n"); + EndInternalPage(fp0); - fprintf(fp0,"
                            \n\n"); - - fclose(fp0); + LYCloseTempFP(fp0); FREE(Title); FREE(Address); return(0); } + + +/* + * Keep cycled buffer for statusline messages. + */ +#define STATUSBUFSIZE 40 +PRIVATE char * buffstack[STATUSBUFSIZE]; +PRIVATE int topOfStack = 0; +#ifdef LY_FIND_LEAKS +PRIVATE int already_registered_free_messages_stack = 0; +#endif + +#ifdef LY_FIND_LEAKS +PRIVATE void free_messages_stack NOARGS +{ + topOfStack = STATUSBUFSIZE; + + while (--topOfStack >= 0) { + FREE(buffstack[topOfStack]); + } +} +#endif + +PRIVATE void to_stack ARGS1(char *, str) +{ + /* + * Cycle buffer: + */ + if (topOfStack == STATUSBUFSIZE) { + topOfStack = 0; + } + + /* + * Register string. + */ + FREE(buffstack[topOfStack]); + buffstack[topOfStack] = str; + topOfStack++; +#ifdef LY_FIND_LEAKS + if(!already_registered_free_messages_stack) { + already_registered_free_messages_stack = 1; + atexit(free_messages_stack); + } +#endif +} + + +/* + * Status line messages list, LYNXMESSAGES:/ internal page, + * called from getfile() cyrcle. + */ +PUBLIC int LYshow_statusline_messages ARGS1( + document *, newdoc) +{ + static char tempfile[LY_MAXPATH]; + static char *info_url; + DocAddress WWWDoc; /* need on exit */ + FILE *fp0; + int i; + + LYRemoveTemp(tempfile); + if ((fp0 = LYOpenTemp (tempfile, HTML_SUFFIX, "w")) == 0) { + HTAlert(CANNOT_OPEN_TEMP); + return(NOT_FOUND); + } + LYLocalFileToURL(&info_url, tempfile); + + LYforce_no_cache = TRUE; /* don't cache this doc */ + + BeginInternalPage (fp0, STATUSLINES_TITLE, NULL); + fprintf(fp0, "
                            \n");
                            +    fprintf(fp0, "
                              \n"); + + /* print messages in reverse order: */ + i = topOfStack; + while (--i >= 0) { + if (buffstack[i] != NULL) + fprintf(fp0, "
                            1. %s\n", buffstack[i]); + } + i = STATUSBUFSIZE; + while (--i >= topOfStack) { + if (buffstack[i] != NULL) + fprintf(fp0, "
                            2. %s\n", buffstack[i]); + } + + fprintf(fp0, "
                            \n"); + fprintf(fp0, "
                            \n"); + EndInternalPage(fp0); + LYCloseTempFP(fp0); + + + /* exit to getfile() cyrcle */ + StrAllocCopy(newdoc->address, info_url); + WWWDoc.address = newdoc->address; + WWWDoc.post_data = newdoc->post_data; + WWWDoc.post_content_type = newdoc->post_content_type; + WWWDoc.bookmark = newdoc->bookmark; + WWWDoc.isHEAD = newdoc->isHEAD; + WWWDoc.safe = newdoc->safe; + + if (!HTLoadAbsolute(&WWWDoc)) + return(NOT_FOUND); + return(NORMAL); +} + +/* + * Dump statusline messages into the buffer. + * Called from mainloop() when exit immediately with an error: + * can not access startfile (first_file) so a couple of alert messages + * will be very useful on exit. + * (Don't expect everyone will look a trace log in case of difficulties:)) + */ +PUBLIC void LYstatusline_messages_on_exit ARGS1( + char **, buf) +{ + int i; + + StrAllocCat(*buf, "\n"); + /* print messages in chronological order: + * probably a single message but let's do it. + */ + i = topOfStack - 1; + while (++i <= STATUSBUFSIZE) { + if (buffstack[i] != NULL) { + StrAllocCat(*buf, buffstack[i]); + StrAllocCat(*buf, "\n"); + } + } + i = -1; + while (++i < topOfStack) { + if (buffstack[i] != NULL) { + StrAllocCat(*buf, buffstack[i]); + StrAllocCat(*buf, "\n"); + } + } +} + + +PUBLIC void LYstore_message2 ARGS2( + CONST char *, message, + CONST char *, argument) +{ + + if (message != NULL) { + char *temp = NULL; + HTSprintf(&temp, message, (argument == 0) ? "" : argument); + to_stack(temp); + } +} + +PUBLIC void LYstore_message ARGS1( + CONST char *, message) +{ + if (message != NULL) { + char *temp = NULL; + StrAllocCopy(temp, message); + to_stack(temp); + } +} diff --git a/gnu/usr.bin/lynx/src/LYHistory.h b/gnu/usr.bin/lynx/src/LYHistory.h index caac9605f58..751568062c5 100644 --- a/gnu/usr.bin/lynx/src/LYHistory.h +++ b/gnu/usr.bin/lynx/src/LYHistory.h @@ -1,20 +1,22 @@ - #ifndef LYHISTORY_H #define LYHISTORY_H #ifndef LYSTRUCTS_H -#include "LYStructs.h" +#include #endif /* LYSTRUCTS_H */ +extern BOOLEAN LYwouldPush PARAMS((char *title)); +extern BOOLEAN historytarget PARAMS((document *newdoc)); +extern int LYShowVisitedLinks PARAMS((char **newfile)); +extern int showhistory PARAMS((char **newfile)); extern void LYAddVisitedLink PARAMS((document *doc)); -extern void LYpush PARAMS((document *doc, BOOLEAN force_push)); extern void LYpop PARAMS((document *doc)); extern void LYpop_num PARAMS((int number, document *doc)); -extern int showhistory PARAMS((char **newfile)); -extern BOOLEAN historytarget PARAMS((document *newdoc)); -extern int LYShowVisitedLinks PARAMS((char **newfile)); +extern void LYpush PARAMS((document *doc, BOOLEAN force_push)); -#define HISTORY_PAGE_TITLE "Lynx History Page" -#define VISITED_LINKS_TITLE "Lynx Visited Links Page" +extern void LYstore_message2 PARAMS((CONST char *message, CONST char *argument)); +extern void LYstore_message PARAMS((CONST char *message)); +extern int LYshow_statusline_messages PARAMS((document *newdoc)); +extern void LYstatusline_messages_on_exit PARAMS((char **buf)); #endif /* LYHISTORY_H */ diff --git a/gnu/usr.bin/lynx/src/LYJump.c b/gnu/usr.bin/lynx/src/LYJump.c index e01000992b4..5b185d0c756 100644 --- a/gnu/usr.bin/lynx/src/LYJump.c +++ b/gnu/usr.bin/lynx/src/LYJump.c @@ -1,22 +1,18 @@ -#include "HTUtils.h" -#include "tcp.h" -#include "HTAlert.h" -#include "LYUtils.h" -#include "LYStrings.h" -#include "LYGlobalDefs.h" -#include "LYJump.h" -#include "LYKeymap.h" -#include "LYSignal.h" -#include "GridText.h" - -#include "LYLeaks.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include #ifdef VMS #include #endif /* VMS */ -#define FREE(x) if (x) {free(x); x = NULL;} - struct JumpTable *JThead = NULL; PRIVATE int LYCompare PARAMS ((CONST void *e1, CONST void *e2)); @@ -65,7 +61,7 @@ PUBLIC void LYAddJumpShortcut ARGS2(HTList *, historyp, char *,shortcut) return; if ((new = (char *)calloc(1, (strlen(shortcut) + 1))) == NULL) - outofmem(__FILE__, "HTAddJumpShortcut"); + outofmem(__FILE__, "LYAddJumpShortcut"); strcpy(new, shortcut); while (NULL != (old = (char *)HTList_nextObject(cur))) { @@ -90,8 +86,7 @@ PUBLIC BOOL LYJumpInit ARGS1 (char *, config) */ jtp = (struct JumpTable *) calloc(1, sizeof(*jtp)); if (jtp == NULL) { - perror("Out of memory in LYJumpInit"); - return FALSE; + outofmem(__FILE__, "LYJumpInit"); } /* @@ -114,8 +109,10 @@ PUBLIC BOOL LYJumpInit ARGS1 (char *, config) return FALSE; } StrAllocCopy(jtp->file, cp); +#ifdef LY_FIND_LEAKS if (!JThead) atexit(LYJumpTable_free); +#endif /* LY_FIND_LEAKS */ /* * Get the key, if present. @@ -149,8 +146,7 @@ PUBLIC BOOL LYJumpInit ARGS1 (char *, config) StrAllocCopy(jumpfile, JThead->file); jtp = (struct JumpTable *) calloc(1, sizeof(*jtp)); if (jtp == NULL) { - perror("Out of memory in LYJumpInit"); - return FALSE; + outofmem(__FILE__, "LYJumpInit"); } StrAllocCopy(jtp->file, JThead->file); } @@ -194,9 +190,10 @@ PUBLIC char *LYJump ARGS1(int, key) while (jtp && jtp->key && jtp->key != key) jtp = jtp->next; if (!jtp) { - char msg[40]; - sprintf(msg, KEY_NOT_MAPPED_TO_JUMP_FILE, key); + char *msg = 0; + HTSprintf0(&msg, KEY_NOT_MAPPED_TO_JUMP_FILE, key); HTAlert(msg); + FREE(msg); return NULL; } if (!jtp->table) @@ -228,8 +225,7 @@ PUBLIC char *LYJump ARGS1(int, key) /* * User cancelled the Jump via ^G. - FM */ - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); return NULL; } @@ -237,8 +233,7 @@ check_recall: bp = buf; if (toupper(key) == 'G' && strncmp(buf, "o ", 2) == 0) bp++; - while (isspace(*bp)) - bp++; + bp = LYSkipBlanks(bp); if (*bp == '\0' && !(recall && (ch == UPARROW || ch == DNARROW))) { /* @@ -246,8 +241,7 @@ check_recall: */ *buf = '\0'; StrAllocCopy(jtp->shortcut, buf); - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); return NULL; } #ifdef PERMIT_GOTO_FROM_JUMP @@ -258,8 +252,7 @@ check_recall: if (no_goto) { *buf = '\0'; StrAllocCopy(jtp->shortcut, buf); - _statusline(RANDOM_URL_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(RANDOM_URL_DISALLOWED); return NULL; } StrAllocCopy(temp, "Go "); @@ -305,8 +298,7 @@ check_recall: /* * User cancelled the jump via ^G. */ - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); return NULL; } goto check_recall; @@ -346,8 +338,7 @@ check_recall: /* * User cancelled the jump via ^G. */ - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); return NULL; } goto check_recall; @@ -403,10 +394,11 @@ PRIVATE unsigned LYRead_Jumpfile ARGS1(struct JumpTable *,jtp) return 0; } } else - if ((fd=open(jtp->file, O_RDONLY, "mbc=32")) < 0) { + if ((fd=open(jtp->file, O_RDONLY, "mbc=32")) < 0) #else - if ((fd=open(jtp->file, O_RDONLY)) < 0) { + if ((fd=open(jtp->file, O_RDONLY)) < 0) #endif /* VMS */ + { HTAlert(CANNOT_OPEN_JUMP_FILE); FREE(mp); return 0; diff --git a/gnu/usr.bin/lynx/src/LYJump.h b/gnu/usr.bin/lynx/src/LYJump.h index 5da8f885be6..3a82b075744 100644 --- a/gnu/usr.bin/lynx/src/LYJump.h +++ b/gnu/usr.bin/lynx/src/LYJump.h @@ -1,7 +1,8 @@ - #ifndef LYJUMP_H #define LYJUMP_H +#include + typedef struct _JumpDatum { char *key; char *url; diff --git a/gnu/usr.bin/lynx/src/LYKeymap.c b/gnu/usr.bin/lynx/src/LYKeymap.c index bd70042bf4e..b7dd523af86 100644 --- a/gnu/usr.bin/lynx/src/LYKeymap.c +++ b/gnu/usr.bin/lynx/src/LYKeymap.c @@ -1,17 +1,40 @@ -#include "HTUtils.h" -#include "tcp.h" -#include "LYUtils.h" -#include "LYKeymap.h" -#include "LYGlobalDefs.h" -#include "HTAccess.h" -#include "HTFormat.h" -#include "HTAlert.h" +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifdef EXP_KEYBOARD_LAYOUT +#include +#include +#include +#endif + +#ifdef EXP_KEYBOARD_LAYOUT +PUBLIC int current_layout = 0; /* Index into LYKbLayouts[] */ -#include "LYLeaks.h" +PUBLIC LYKeymap_t * LYKbLayouts[]={ + kb_layout_rot13, + kb_layout_jcuken, + kb_layout_yawerty +}; -PRIVATE CONST DocAddress keymap_anchor = {"LYNXKEYMAP", NULL, NULL}; +PUBLIC char * LYKbLayoutNames[]={ + "ROT13'd keyboard layout", + "JCUKEN Cyrillic, for AT 101-key kbd", + "YAWERTY Cyrillic, for DEC LK201 kbd", + (char *) 0 +}; +#endif -struct _HTStream +PRIVATE CONST DocAddress keymap_anchor = {"LYNXKEYMAP", NULL, NULL, + NULL, FALSE, FALSE}; + +struct _HTStream { HTStreamClass * isa; }; @@ -19,18 +42,18 @@ struct _HTStream /* the character gets 1 added to it before lookup, * so that EOF maps to 0 */ -char keymap[] = { +LYKeymap_t keymap[KEYMAP_SIZE] = { 0, /* EOF */ -0, LYK_HOME, LYK_PREV_PAGE, 0, +LYK_DO_NOTHING, LYK_HOME, LYK_PREV_PAGE, 0, /* nul */ /* ^A */ /* ^B */ /* ^C */ LYK_ABORT, LYK_END, LYK_NEXT_PAGE, 0, /* ^D */ /* ^E */ /* ^F */ /* ^G */ -LYK_HISTORY, LYK_NEXT_LINK, LYK_ACTIVATE, LYK_COOKIE_JAR, +LYK_HISTORY, LYK_FASTFORW_LINK, LYK_ACTIVATE, LYK_COOKIE_JAR, /* bs */ /* ht */ /* nl */ /* ^K */ LYK_REFRESH, LYK_ACTIVATE, LYK_DOWN_TWO, 0, @@ -39,10 +62,6 @@ LYK_REFRESH, LYK_ACTIVATE, LYK_DOWN_TWO, 0, LYK_UP_TWO, 0, LYK_RELOAD, 0, /* ^P */ /* XON */ /* ^R */ /* XOFF */ -#ifdef NOT_USED -LYK_TRACE_TOGGLE, 0, LYK_VERSION, LYK_REFRESH, -/* ^T */ /* ^U */ /* ^V */ /* ^W */ -#endif /* NOT_USED */ LYK_TRACE_TOGGLE, 0, LYK_SWITCH_DTD, LYK_REFRESH, /* ^T */ /* ^U */ /* ^V */ /* ^W */ @@ -81,18 +100,18 @@ LYK_8, LYK_9, 0, LYK_TRACE_LOG, LYK_UP_LINK, LYK_INFO, LYK_DOWN_LINK, LYK_HELP, /* < */ /* = */ /* > */ /* ? */ -LYK_RAW_TOGGLE, LYK_ADD_BOOKMARK, LYK_PREV_PAGE, LYK_COMMENT, +LYK_RAW_TOGGLE, LYK_ADDRLIST, LYK_PREV_PAGE, LYK_COMMENT, /* @ */ /* A */ /* B */ /* C */ -LYK_DOWNLOAD, LYK_ELGOTO, -/* D */ /* E */ +LYK_DOWNLOAD, LYK_ELGOTO, +/* D */ /* E */ #if defined(DIRED_SUPPORT) || defined(VMS) LYK_DIRED_MENU, #else -0, +0, #endif /* DIRED_SUPPORT || VMS */ -/* F */ +/* F */ LYK_ECGOTO, /* G */ @@ -106,20 +125,9 @@ LYK_LIST, LYK_MAIN_MENU, LYK_NEXT, LYK_OPTIONS, LYK_PRINT, LYK_ABORT, LYK_DEL_BOOKMARK, LYK_INDEX_SEARCH, /* P */ /* Q */ /* R */ /* S */ -#ifdef DIRED_SUPPORT -LYK_TAG_LINK, -#else -0, -#endif /* DIRED_SUPPORT */ -/* T */ - - LYK_PREV_DOC, LYK_VLINKS, 0, - /* U */ /* V */ /* W */ +LYK_TAG_LINK, LYK_PREV_DOC, LYK_VLINKS, 0, +/* T */ /* U */ /* V */ /* W */ -#ifdef NOT_USED -LYK_FORM_UP, 0, LYK_FORM_DOWN, LYK_INLINE_TOGGLE, -/* X */ /* Y */ /* Z */ /* [ */ -#endif /* NOT_USED */ LYK_NOCACHE, 0, LYK_INTERRUPT, LYK_INLINE_TOGGLE, /* X */ /* Y */ /* Z */ /* [ */ @@ -129,15 +137,15 @@ LYK_SOURCE, LYK_HEAD, 0, LYK_CLEAR_AUTH, LYK_MINIMAL, LYK_ADD_BOOKMARK, LYK_PREV_PAGE, LYK_COMMENT, /* ` */ /* a */ /* b */ /* c */ -LYK_DOWNLOAD, LYK_EDIT, -/* d */ /* e */ +LYK_DOWNLOAD, LYK_EDIT, +/* d */ /* e */ #if defined(DIRED_SUPPORT) || defined(VMS) LYK_DIRED_MENU, #else -0, +0, #endif /* DIRED_SUPPORT || VMS */ -/* f */ +/* f */ LYK_GOTO, /* g */ @@ -151,26 +159,24 @@ LYK_LIST, LYK_MAIN_MENU, LYK_NEXT, LYK_OPTIONS, LYK_PRINT, LYK_QUIT, LYK_DEL_BOOKMARK, LYK_INDEX_SEARCH, /* p */ /* q */ /* r */ /* s */ -#ifdef DIRED_SUPPORT -LYK_TAG_LINK, -#else -0, -#endif /* DIRED_SUPPORT */ -/* t */ - - LYK_PREV_DOC, LYK_VIEW_BOOKMARK, 0, - /* u */ /* v */ /* w */ +LYK_TAG_LINK, LYK_PREV_DOC, LYK_VIEW_BOOKMARK, 0, +/* t */ /* u */ /* v */ /* w */ -#ifdef NOT_USED -LYK_FORM_UP, 0, LYK_FORM_DOWN, 0, -/* x */ /* y */ /* z */ /* { */ -#endif /* NOT_USED */ LYK_NOCACHE, 0, LYK_INTERRUPT, 0, /* x */ /* y */ /* z */ /* { */ +#if (defined(_WINDOWS) || defined(__DJGPP__)) + +LYK_PIPE, 0, 0, 0, +/* | */ /* } */ /* ~ */ + +#else + LYK_PIPE, 0, 0, LYK_HISTORY, /* | */ /* } */ /* ~ */ /* del */ +#endif /* _WINDOWS || __DJGPP__ */ + /* 80..9F (illegal ISO-8859-1) 8-bit characters. */ 0, 0, 0, 0, 0, 0, 0, 0, @@ -207,21 +213,156 @@ LYK_PIPE, 0, 0, LYK_HISTORY, 0, 0, 0, 0, 0, 0, 0, 0, -/* 100..10E function key definitions in LYStrings.h */ +/* 100..10F function key definitions in LYStrings.h */ LYK_PREV_LINK, LYK_NEXT_LINK, LYK_ACTIVATE, LYK_PREV_DOC, /* UPARROW */ /* DNARROW */ /* RTARROW */ /* LTARROW */ LYK_NEXT_PAGE, LYK_PREV_PAGE, LYK_HOME, LYK_END, /* PGDOWN */ /* PGUP */ /* HOME */ /* END */ +#if (defined(_WINDOWS) || defined(__DJGPP__)) + +LYK_HELP, 0, 0, 0, +/* F1*/ +#else + LYK_HELP, LYK_ACTIVATE, LYK_HOME, LYK_END, /* F1*/ /* Do key */ /* Find key */ /* Select key */ -LYK_UP_TWO, LYK_DOWN_TWO, -/* Insert key */ /* Remove key */ +#endif /* _WINDOWS || __DJGPP__ */ + +LYK_UP_TWO, LYK_DOWN_TWO, LYK_DO_NOTHING, LYK_FASTBACKW_LINK, +/* Insert key */ /* Remove key */ /* DO_NOTHING*/ /* Back tab */ + +/* 110..18F */ + +#if (defined(_WINDOWS) || defined(__DJGPP__)) && defined(USE_SLANG) && !defined(DJGPP_KEYHANDLER) + LYK_HISTORY, LYK_ACTIVATE, 0, 0, + /* Backspace */ /* Enter */ +#else + 0, 0, 0, 0, +#endif /* USE_SLANG &&(_WINDOWS || __DJGPP) && !DJGPP_KEYHANDLER */ + 0, 0, 0, 0, + 0, LYK_DO_NOTHING, 0, 0, + /* 0x11d: MOUSE_KEY */ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +#ifdef DJGPP_KEYHANDLER + 0, LYK_ABORT, 0, 0, + /* ALT_X */ +#else + 0, 0, 0, 0, +#endif /* DJGPP_KEYHANDLER */ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +/* 190..20F */ + + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +#if (defined(_WINDOWS) || defined(__DJGPP__)) && !defined(USE_SLANG) /* PDCurses */ + LYK_ABORT, 0, 0, 0, + /* ALT_X */ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, LYK_WHEREIS, 0, + /* KP_SLASH */ + 0, 0, 0, LYK_IMAGE_TOGGLE, + /* KP_* */ + LYK_PREV_PAGE, LYK_NEXT_PAGE, 0, 0, + /* KP_- */ /* KP_+ */ +#else + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +#endif /* (_WINDOWS || __DJGPP__) && !USE_SLANG */ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +/* 210..28F */ -LYK_DO_NOTHING, -/* DO_NOTHING*/ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + /* 290...293 */ + LYK_CHANGE_LINK, 0, 0, 0, }; #if defined(DIRED_SUPPORT) && defined(OK_OVERRIDE) @@ -231,7 +372,7 @@ LYK_DO_NOTHING, * allowed at compile time. */ -char override[] = { +LYKeymap_t key_override[KEYMAP_SIZE] = { 0, /* EOF */ @@ -368,7 +509,7 @@ LYK_TAG_LINK, LYK_UPLOAD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -/* 100..10E function key definitions in LYStrings.h */ +/* 100..10F function key definitions in LYStrings.h */ 0, 0, 0, 0, /* UPARROW */ /* DNARROW */ /* RTARROW */ /* LTARROW */ @@ -378,18 +519,122 @@ LYK_TAG_LINK, LYK_UPLOAD, 0, 0, 0, 0, 0, 0, /* F1*/ /* Do key */ /* Find key */ /* Select key */ - 0, 0, -/* Insert key */ /* Remove key */ + 0, 0, LYK_DO_NOTHING, 0, +/* Insert key */ /* Remove key */ /* DO_NOTHING */ /* Back tab */ -LYK_DO_NOTHING, -/* DO_NOTHING*/ +/* 110..18F */ + + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +/* 190..20F */ + + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +/* 210..28F */ + + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + /* 290...293 */ + 0, 0, 0, 0, }; #endif /* DIRED_SUPPORT && OK_OVERRIDE */ struct rmap { - char *name; - char *doc; + CONST char *name; + CONST char *doc; }; + +/* The order of this array must match the LYKeymapCode enum in LYKeymap.h */ PRIVATE struct rmap revmap[] = { { "UNMAPPED", NULL }, { "1", NULL }, @@ -417,6 +662,8 @@ PRIVATE struct rmap revmap[] = { { "END", "go to the end of the current document" }, { "PREV_LINK", "make the previous link current" }, { "NEXT_LINK", "make the next link current" }, +{ "FASTBACKW_LINK", "previous link or text area, only stops on links" }, +{ "FASTFORW_LINK", "next link or text area, only stops on links" }, { "UP_LINK", "move up the page to a previous link" }, { "DOWN_LINK", "move down the page to another link" }, { "RIGHT_LINK", "move right to another link" }, @@ -429,14 +676,14 @@ PRIVATE struct rmap revmap[] = { { "HELP", "display help on using the browser" }, { "INDEX", "display an index of potentially useful documents" }, { "NOCACHE", "force submission of form or link with no-cache" }, -{ "INTERRUPT", "interrupt network transmission" }, +{ "INTERRUPT", "interrupt network connection or transmission" }, { "MAIN_MENU", "return to the first screen (home page)" }, { "OPTIONS", "display and change option settings" }, { "INDEX_SEARCH", "allow searching of an index" }, { "WHEREIS", "search within the current document" }, { "NEXT", "search for the next occurence" }, { "COMMENT", "send a comment to the author of the current document" }, -{ "EDIT", "edit the current document" }, +{ "EDIT", "edit the current document or a form's textarea" }, { "INFO", "display information on the current document and link" }, { "PRINT", "display choices for printing the current document" }, { "ADD_BOOKMARK", "add to your personal bookmark list" }, @@ -465,6 +712,13 @@ PRIVATE struct rmap revmap[] = { { "CLEAR_AUTH", "clear all authorization info for this session" }, { "SWITCH_DTD", "switch between two ways of parsing HTML" }, { "ELGOTO", "edit the current link's URL or ACTION and go to it" }, +{ "CHANGE_LINK", "force reset of the current link on the page" }, +{ "EDITTEXTAREA", "use an external editor to edit a form's textarea" }, +{ "GROWTEXTAREA", "add 5 new blank lines to the bottom of a textarea" }, +{ "INSERTFILE", "insert file into a textarea (just above cursorline)" }, +#ifdef EXP_ADDRLIST_PAGE +{ "ADDRLIST", "like LIST command, but always shows the links URL's" }, +#endif #ifdef USE_EXTERNALS { "EXTERN", "run external program with url" }, #endif @@ -481,15 +735,10 @@ PRIVATE struct rmap revmap[] = { { "INSTALL", "install file or tagged files into a system area" }, #endif /* DIRED_SUPPORT */ #endif /* VMS */ -#ifdef NOT_USED -{ "VERSION", "report version of lynx"}, -{ "FORM_UP", "toggle a checkbox" }, -{ "FORM_DOWN", "toggle a checkbox" }, -#endif /* NOT_USED */ { NULL, "" } }; -PRIVATE char *funckey[] = { +PRIVATE CONST char *funckey[] = { "Up Arrow", "Down Arrow", "Right Arrow", @@ -503,7 +752,12 @@ PRIVATE char *funckey[] = { "Find key", "Select key", "Insert key", - "Remove key" + "Remove key", + "(DO_NOTHING)", /* should normally not appear in list */ + "Back Tab", + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + "mouse pseudo key", /* normally not mapped to keymap[] action? */ }; PRIVATE char *pretty ARGS1 (int, c) @@ -511,43 +765,66 @@ PRIVATE char *pretty ARGS1 (int, c) static char buf[30]; if (c == '\t') - sprintf(buf, "<tab> "); + sprintf(buf, "<tab> "); else if (c == '\r') - sprintf(buf, "<return> "); + sprintf(buf, "<return> "); else if (c == ' ') - sprintf(buf, "<space> "); + sprintf(buf, "<space> "); else if (c == '<') - sprintf(buf, "< "); + sprintf(buf, "< "); else if (c == '>') - sprintf(buf, "> "); + sprintf(buf, "> "); else if (c == 0177) - sprintf(buf, "<delete> "); + sprintf(buf, "<delete> "); else if (c > ' ' && c <= 0377) sprintf(buf, "%c", c); else if (c < ' ') sprintf(buf, "^%c", c|0100); - else + else if (c >= 0400 && (c - 0400) < (int) TABLESIZE(funckey) + && funckey[c-0400]) sprintf(buf, "%s", funckey[c-0400]); - + else if (c >= 0400) + sprintf(buf, "%#x", c); + else + return 0; + return buf; } -PRIVATE void print_binding ARGS3(HTStream *, target, char *, buf, int, i) +PRIVATE char * format_binding ARGS2( + LYKeymap_t *, table, + int, i) +{ + unsigned the_key = table[i]; + char *buf = 0; + char *formatted; + + if (the_key != 0 + && the_key < TABLESIZE(revmap) + && revmap[the_key].name != 0 + && revmap[the_key].doc != 0 + && (formatted = pretty(i-1)) != 0) { + HTSprintf0(&buf, "%-11s %-13s %s\n", formatted, + revmap[the_key].name, + revmap[the_key].doc); + return buf; + } + return 0; +} + +PRIVATE void print_binding ARGS2(HTStream *, target, int, i) { + char *buf; #if defined(DIRED_SUPPORT) && defined(OK_OVERRIDE) if (prev_lynx_edit_mode && !no_dired_support && - override[i] && revmap[(unsigned char)override[i]].doc) { - sprintf(buf, "%-12s%-14s%s\n", pretty(i-1), - revmap[(unsigned char)override[i]].name, - revmap[(unsigned char)override[i]].doc); + (buf = format_binding(key_override, i)) != 0) { (*target->isa->put_block)(target, buf, strlen(buf)); + FREE(buf); } else #endif /* DIRED_SUPPORT && OK_OVERRIDE */ - if (keymap[i] && revmap[(unsigned char)keymap[i]].doc) { - sprintf(buf, "%-12s%-14s%s\n", pretty(i-1), - revmap[(unsigned char)keymap[i]].name, - revmap[(unsigned char)keymap[i]].doc); + if ((buf = format_binding(keymap, i)) != 0) { (*target->isa->put_block)(target, buf, strlen(buf)); + FREE(buf); } } @@ -559,7 +836,7 @@ PRIVATE int LYLoadKeymap ARGS4 ( { HTFormat format_in = WWW_HTML; HTStream *target; - char buf[256]; + char *buf = 0; int i; /* @@ -567,42 +844,49 @@ PRIVATE int LYLoadKeymap ARGS4 ( */ target = HTStreamStack(format_in, format_out, sink, anAnchor); if (!target || target == NULL) { - sprintf(buf, CANNOT_CONVERT_I_TO_O, - HTAtom_name(format_in), HTAtom_name(format_out)); + HTSprintf0(&buf, CANNOT_CONVERT_I_TO_O, + HTAtom_name(format_in), HTAtom_name(format_out)); HTAlert(buf); + FREE(buf); return(HT_NOT_LOADED); } anAnchor->no_cache = TRUE; - sprintf(buf, "\n%s\n\n\n", - CURRENT_KEYMAP_TITLE); + HTSprintf0(&buf, "\n%s\n\n\n", + CURRENT_KEYMAP_TITLE); (*target->isa->put_block)(target, buf, strlen(buf)); - - sprintf(buf, "

                            %s (%s Version %s)

                            \n
                            ",
                            -		 CURRENT_KEYMAP_TITLE, LYNX_NAME, LYNX_VERSION);
                            +    HTSprintf0(&buf, "

                            %s (%s)%s%s

                            \n", + LYNX_NAME, LYNX_VERSION, + HELP_ON_SEGMENT, + helpfilepath, CURRENT_KEYMAP_HELP, CURRENT_KEYMAP_TITLE); + (*target->isa->put_block)(target, buf, strlen(buf)); + HTSprintf0(&buf, "
                            \n");
                                 (*target->isa->put_block)(target, buf, strlen(buf));
                             
                                 for (i = 'a'+1; i <= 'z'+1; i++) {
                            -	print_binding(target, buf, i);
                            +	print_binding(target, i);
                             	if (keymap[i - ' '] != keymap[i]) {
                            -	    print_binding(target, buf,
                            -			  i-' ');  /* uppercase mapping is different */
                            +	    print_binding(target, i-' ');  /* uppercase mapping is different */
                             	}
                                 }
                            -    for (i = 1; i < (int) sizeof(keymap); i++) {
                            +    for (i = 1; i < KEYMAP_SIZE; i++) {
                             	/*
                             	 *  LYK_PIPE not implemented yet.
                            +	 *
                            +	 *  Don't show CHANGE_LINK if mouse not enabled.
                             	 */
                            -	if ((i > 127 || i <= ' ' || !isalpha(i-1)) &&
                            -	    strcmp(revmap[(unsigned char)keymap[i]].name, "PIPE")) {
                            -	    print_binding(target, buf, i);
                            +	if ((i >= 0400 || i <= ' ' || !isalpha(i-1)) &&
                            +	    strcmp(revmap[keymap[i]].name, "PIPE") &&
                            +	    (LYUseMouse || strcmp(revmap[keymap[i]].name, "CHANGE_LINK"))) {
                            +	    print_binding(target, i);
                             	}
                                 }
                             
                            -    sprintf(buf,"
                            \n\n"); + HTSprintf0(&buf,"
                            \n\n"); (*target->isa->put_block)(target, buf, strlen(buf)); (*target->isa->_free)(target); + FREE(buf); return(HT_LOADED); } @@ -618,8 +902,10 @@ GLOBALDEF PUBLIC HTProtocol LYLynxKeymap = {"LYNXKEYMAP", LYLoadKeymap, 0}; * func must be present in the revmap table. * returns TRUE if the mapping was made, FALSE if not. */ -PUBLIC int remap ARGS2(char *,key, char *,func) - { +PUBLIC int remap ARGS2( + char *, key, + char *, func) +{ int i; struct rmap *mp; int c = 0; @@ -646,8 +932,8 @@ PUBLIC int remap ARGS2(char *,key, char *,func) PUBLIC void set_vms_keys NOARGS { keymap[26+1] = LYK_ABORT; /* control-Z */ - keymap['$'+1] = LYK_SHELL; -} + keymap['$'+1] = LYK_SHELL; +} static char saved_vi_keys[4]; static BOOLEAN did_vi_keys; @@ -763,55 +1049,82 @@ PUBLIC void reset_numbers_as_arrows NOARGS did_number_keys = FALSE; } -PUBLIC char *key_for_func ARGS1 ( - int, func) +PUBLIC int lookup_keymap ARGS1( + int, func) { - static char buf[512]; - size_t i; - - buf[0] = '\0'; - for (i = 1; i < sizeof(keymap); i++) { - if (keymap[i] == func) { - if (*buf) - strcat(buf, " or "); - strcat(buf, pretty(i-1)); - } + size_t i; + + for (i = 1; i < KEYMAP_SIZE; i++) { + if (LYisNonAlnumKeyname(i, func)) { + return i; } - return buf; + } + return -1; +} + +PUBLIC char *key_for_func ARGS1 ( + int, func) +{ + static char *buf; + int i; + char *formatted; + + if ((i = LYReverseKeymap(func)) >= 0) { + formatted = pretty(i); + StrAllocCopy(buf, formatted != 0 ? formatted : "?"); + } else if (buf == 0) { + StrAllocCopy(buf, ""); + } + return buf; } /* * This function returns TRUE if the ch is non-alphanumeric * and maps to key_name (LYK_foo in the keymap[] array). - FM - */ + */ PUBLIC BOOL LYisNonAlnumKeyname ARGS2( int, ch, int, key_name) { if ((ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'z') || - ch < 0 || ch > 269) + ch < 0 || ch >= KEYMAP_SIZE) return (FALSE); return(keymap[ch+1] == key_name); } -#ifdef NOTUSED_FOTEMODS /* * 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, key_name) { int i; - for (i = 1; i < sizeof(keymap); i++) { + for (i = 1; i < KEYMAP_SIZE; i++) { if (keymap[i] == key_name) { return(i - 1); } } - return(0); + return(-1); +} + +#ifdef EXP_KEYBOARD_LAYOUT +PUBLIC int LYSetKbLayout ARGS1( + char *, layout_id) +{ + int i; + + for (i = 0; i < (int) TABLESIZE(LYKbLayoutNames) - 1; i++) { + if (!strcmp(LYKbLayoutNames[i], layout_id)) { + current_layout = i; + return (-1); + } + } + + return 0; } #endif diff --git a/gnu/usr.bin/lynx/src/LYKeymap.h b/gnu/usr.bin/lynx/src/LYKeymap.h index 77feb48fd7b..c7e3b634fd6 100644 --- a/gnu/usr.bin/lynx/src/LYKeymap.h +++ b/gnu/usr.bin/lynx/src/LYKeymap.h @@ -1,125 +1,155 @@ #ifndef LYKEYMAP_H #define LYKEYMAP_H +#ifndef HTUTILS_H +#include +#endif + +extern BOOLEAN LYisNonAlnumKeyname PARAMS((int ch, int key_name)); +extern char *key_for_func PARAMS((int func)); +extern int LYReverseKeymap PARAMS((int key_name)); +extern int lookup_keymap PARAMS((int code)); extern int remap PARAMS((char *key, char *func)); -extern void set_vms_keys NOPARAMS; -extern void set_vi_keys NOPARAMS; +extern void print_keymap PARAMS((char **newfile)); +extern void reset_emacs_keys NOPARAMS; +extern void reset_numbers_as_arrows NOPARAMS; extern void reset_vi_keys NOPARAMS; extern void set_emacs_keys NOPARAMS; -extern void reset_emacs_keys NOPARAMS; 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 key_name)); -extern int LYReverseKeymap PARAMS((int key_name)); +extern void set_vi_keys NOPARAMS; +extern void set_vms_keys NOPARAMS; -extern char keymap[]; /* main keymap matrix */ +/* We only use unsigned keycodes; if there's a problem matching with enum + * (which is supposed to be 'int'), that would be okay, but not as clean + * for type-checking. + */ +typedef unsigned short LYKeymap_t; + +#define KEYMAP_SIZE 661 +extern LYKeymap_t keymap[KEYMAP_SIZE]; /* main keymap matrix */ + +#ifdef EXP_KEYBOARD_LAYOUT +extern int current_layout; +extern LYKeymap_t * LYKbLayouts[]; +extern char * LYKbLayoutNames[]; +extern int LYSetKbLayout PARAMS((char *layout_id)); +#endif #if defined(DIRED_SUPPORT) && defined(OK_OVERRIDE) -extern char override[]; +extern LYKeymap_t key_override[]; #endif -#define CURRENT_KEYMAP_TITLE "Current Key Map" +/* The order of this enum must match the 'revmap[]' array in LYKeymap.c */ +typedef enum { + LYK_UNKNOWN=0 + , LYK_1 + , LYK_2 + , LYK_3 + , LYK_4 + , LYK_5 + , LYK_6 + , LYK_7 + , LYK_8 + , LYK_9 + , LYK_SOURCE + , LYK_RELOAD + , LYK_PIPE + , LYK_QUIT + , LYK_ABORT + , LYK_NEXT_PAGE + , LYK_PREV_PAGE + , LYK_UP_TWO + , LYK_DOWN_TWO + , LYK_UP_HALF + , LYK_DOWN_HALF + , LYK_REFRESH + , LYK_HOME + , LYK_END + , LYK_PREV_LINK + , LYK_NEXT_LINK + , LYK_FASTBACKW_LINK + , LYK_FASTFORW_LINK + , LYK_UP_LINK + , LYK_DOWN_LINK + , LYK_RIGHT_LINK + , LYK_LEFT_LINK + , LYK_HISTORY + , LYK_PREV_DOC + , LYK_ACTIVATE + , LYK_GOTO + , LYK_ECGOTO + , LYK_HELP + , LYK_INDEX + , LYK_NOCACHE + , LYK_INTERRUPT + , LYK_MAIN_MENU + , LYK_OPTIONS + , LYK_INDEX_SEARCH + , LYK_WHEREIS + , LYK_NEXT + , LYK_COMMENT + , LYK_EDIT + , LYK_INFO + , LYK_PRINT + , LYK_ADD_BOOKMARK + , LYK_DEL_BOOKMARK + , LYK_VIEW_BOOKMARK + , LYK_VLINKS + , LYK_SHELL + , LYK_DOWNLOAD + , LYK_TRACE_TOGGLE + , LYK_TRACE_LOG + , LYK_IMAGE_TOGGLE + , LYK_INLINE_TOGGLE + , LYK_HEAD + , LYK_DO_NOTHING + , LYK_TOGGLE_HELP + , LYK_JUMP + , LYK_KEYMAP + , LYK_LIST + , LYK_TOOLBAR + , LYK_HISTORICAL + , LYK_MINIMAL + , LYK_SOFT_DQUOTES + , LYK_RAW_TOGGLE + , LYK_COOKIE_JAR + , LYK_F_LINK_NUM + , LYK_CLEAR_AUTH + , LYK_SWITCH_DTD + , LYK_ELGOTO + , LYK_CHANGE_LINK + , LYK_EDIT_TEXTAREA + , LYK_GROW_TEXTAREA + , LYK_INSERT_FILE -#define LYK_1 1 -#define LYK_2 2 -#define LYK_3 3 -#define LYK_4 4 -#define LYK_5 5 -#define LYK_6 6 -#define LYK_7 7 -#define LYK_8 8 -#define LYK_9 9 -#define LYK_SOURCE 10 -#define LYK_RELOAD 11 -#define LYK_PIPE 12 -#define LYK_QUIT 13 -#define LYK_ABORT 14 -#define LYK_NEXT_PAGE 15 -#define LYK_PREV_PAGE 16 -#define LYK_UP_TWO 17 -#define LYK_DOWN_TWO 18 -#define LYK_UP_HALF 19 -#define LYK_DOWN_HALF 20 -#define LYK_REFRESH 21 -#define LYK_HOME 22 -#define LYK_END 23 -#define LYK_PREV_LINK 24 -#define LYK_NEXT_LINK 25 -#define LYK_UP_LINK 26 -#define LYK_DOWN_LINK 27 -#define LYK_RIGHT_LINK 28 -#define LYK_LEFT_LINK 29 -#define LYK_HISTORY 30 -#define LYK_PREV_DOC 31 -#define LYK_ACTIVATE 32 -#define LYK_GOTO 33 -#define LYK_ECGOTO 34 -#define LYK_HELP 35 -#define LYK_INDEX 36 -#define LYK_NOCACHE 37 -#define LYK_INTERRUPT 38 -#define LYK_MAIN_MENU 39 -#define LYK_OPTIONS 40 -#define LYK_INDEX_SEARCH 41 -#define LYK_WHEREIS 42 -#define LYK_NEXT 43 -#define LYK_COMMENT 44 -#define LYK_EDIT 45 -#define LYK_INFO 46 -#define LYK_PRINT 47 -#define LYK_ADD_BOOKMARK 48 -#define LYK_DEL_BOOKMARK 49 -#define LYK_VIEW_BOOKMARK 50 -#define LYK_VLINKS 51 -#define LYK_SHELL 52 -#define LYK_DOWNLOAD 53 -#define LYK_TRACE_TOGGLE 54 -#define LYK_TRACE_LOG 55 -#define LYK_IMAGE_TOGGLE 56 -#define LYK_INLINE_TOGGLE 57 -#define LYK_HEAD 58 -#define LYK_DO_NOTHING 59 -#define LYK_TOGGLE_HELP 60 -#define LYK_JUMP 61 -#define LYK_KEYMAP 62 -#define LYK_LIST 63 -#define LYK_TOOLBAR 64 -#define LYK_HISTORICAL 65 -#define LYK_MINIMAL 66 -#define LYK_SOFT_DQUOTES 67 -#define LYK_RAW_TOGGLE 68 -#define LYK_COOKIE_JAR 69 -#define LYK_F_LINK_NUM 70 -#define LYK_CLEAR_AUTH 71 -#define LYK_SWITCH_DTD 72 -#define LYK_ELGOTO 73 +#ifdef EXP_ADDRLIST_PAGE + , LYK_ADDRLIST +#else +#define LYK_ADDRLIST LYK_ADD_BOOKMARK +#endif #ifdef USE_EXTERNALS -#define LYK_EXTERN 74 -#if defined(VMS) || defined(DIRED_SUPPORT) -#define LYK_DIRED_MENU 75 -#endif /* VMS || DIRED_SUPPORT */ -#else /* USE_EXTERNALS */ + , LYK_EXTERN +#endif /* !defined(USE_EXTERNALS) */ + #if defined(VMS) || defined(DIRED_SUPPORT) -#define LYK_DIRED_MENU 74 + , LYK_DIRED_MENU +#else +#define LYK_DIRED_MENU LYK_UNKNOWN #endif /* VMS || DIRED_SUPPORT */ -#endif /* !defined(USE_EXTERNALS) */ #ifdef DIRED_SUPPORT -#define LYK_CREATE (LYK_DIRED_MENU+1) -#define LYK_REMOVE (LYK_DIRED_MENU+2) -#define LYK_MODIFY (LYK_DIRED_MENU+3) -#define LYK_TAG_LINK (LYK_DIRED_MENU+4) -#define LYK_UPLOAD (LYK_DIRED_MENU+5) -#define LYK_INSTALL (LYK_DIRED_MENU+6) + , LYK_CREATE + , LYK_REMOVE + , LYK_MODIFY + , LYK_TAG_LINK + , LYK_UPLOAD + , LYK_INSTALL +#else +#define LYK_TAG_LINK LYK_UNKNOWN #endif /* DIRED_SUPPORT */ -#ifdef NOT_USED -#define LYK_VERSION 81 -#define LYK_FORM_UP 82 -#define LYK_FORM_DOWN 83 -#endif /* NOT_USED */ +} LYKeymapCodes; + #endif /* LYKEYMAP_H */ diff --git a/gnu/usr.bin/lynx/src/LYLeaks.c b/gnu/usr.bin/lynx/src/LYLeaks.c index 79ebf838825..504954a367c 100644 --- a/gnu/usr.bin/lynx/src/LYLeaks.c +++ b/gnu/usr.bin/lynx/src/LYLeaks.c @@ -9,15 +9,10 @@ */ #define NO_MEMORY_TRACKING -#include "HTUtils.h" -#include "tcp.h" -#include "LYexit.h" -#include "LYLeaks.h" -#include "LYUtils.h" -#include -/*#include included by HTUtils.h -- FM */ - -#define FREE(x) if (x) {free(x); x = NULL;} +#include +#include +#include +#include PRIVATE AllocationList *ALp_RunTimeAllocations = NULL; @@ -79,10 +74,10 @@ PUBLIC void LYLeaks NOARGS * bad request, then it was a bad pointer * value in a realloc statement. */ - fprintf(Fp_leakagesink, - "Invalid pointer detected.\n"); - fprintf(Fp_leakagesink, - "Pointer:\t%p\n", ALp_head->vp_BadRequest); + fprintf(Fp_leakagesink, "%s.\n", + gettext("Invalid pointer detected.")); + fprintf(Fp_leakagesink, "%s\t%p\n", + gettext("Pointer:"), ALp_head->vp_BadRequest); /* * Don't free the bad request, it is an invalid pointer. @@ -92,18 +87,23 @@ PUBLIC void LYLeaks NOARGS * values also. */ if (ALp_head->SL_memory.cp_FileName == NULL) { - fprintf(Fp_leakagesink, "FileName:\t%s\n", + fprintf(Fp_leakagesink, "%s\t%s\n", + gettext("FileName:"), ALp_head->SL_realloc.cp_FileName); - fprintf(Fp_leakagesink, "LineCount:\t%d\n", + fprintf(Fp_leakagesink, "%s\t%d\n", + gettext("LineCount:"), ALp_head->SL_realloc.ssi_LineNumber); } else { - fprintf(Fp_leakagesink, "FileName:\t%s\n", - ALp_head->SL_memory.cp_FileName); - fprintf(Fp_leakagesink, "LineCount:\t%d\n", - ALp_head->SL_memory.ssi_LineNumber); + fprintf(Fp_leakagesink, "%s\t%s\n", + gettext("FileName:"), + ALp_head->SL_memory.cp_FileName); + fprintf(Fp_leakagesink, "%s\t%d\n", + gettext("LineCount:"), + ALp_head->SL_memory.ssi_LineNumber); } } else { size_t i_counter; + char *value = (char *)(ALp_head->vp_Alloced); /* * Increment the count of total memory lost and @@ -111,36 +111,44 @@ PUBLIC void LYLeaks NOARGS */ st_total += ALp_head->st_Bytes; - fprintf(Fp_leakagesink, "Memory leak detected.\n"); - fprintf(Fp_leakagesink, "Pointer:\t%p\n", ALp_head->vp_Alloced); - fprintf(Fp_leakagesink, "Contains:\t"); + fprintf(Fp_leakagesink, "%s\n", + gettext("Memory leak detected.")); + fprintf(Fp_leakagesink, "%s\t%p\n", + gettext("Pointer:"), + ALp_head->vp_Alloced); + fprintf(Fp_leakagesink, "%s:\t", + gettext("Contains:")); for (i_counter = 0; i_counter < ALp_head->st_Bytes && i_counter < MAX_CONTENT_LENGTH; i_counter++) { - if (isprint(((char *)(ALp_head->vp_Alloced))[i_counter])) { - fprintf(Fp_leakagesink, "%c", - ((char *)(ALp_head->vp_Alloced))[i_counter]); + if (isprint(value[i_counter])) { + fprintf(Fp_leakagesink, "%c", value[i_counter]); } else { fprintf(Fp_leakagesink, "|"); } } fprintf(Fp_leakagesink, "\n"); FREE(ALp_head->vp_Alloced); - fprintf(Fp_leakagesink, "ByteSize:\t%d\n", + fprintf(Fp_leakagesink, "%s\t%d\n", + gettext("ByteSize:"), (int)(ALp_head->st_Bytes)); - fprintf(Fp_leakagesink, "FileName:\t%s\n", + fprintf(Fp_leakagesink, "%s\t%s\n", + gettext("FileName:"), ALp_head->SL_memory.cp_FileName); - fprintf(Fp_leakagesink, "LineCount:\t%d\n", + fprintf(Fp_leakagesink, "%s\t%d\n", + gettext("LineCount:"), ALp_head->SL_memory.ssi_LineNumber); /* * Give the last time the pointer was realloced * if it happened also. */ if (ALp_head->SL_realloc.cp_FileName != NULL) { - fprintf(Fp_leakagesink, "realloced:\t%s\n", + fprintf(Fp_leakagesink, "%s\t%s\n", + gettext("realloced:"), ALp_head->SL_realloc.cp_FileName); - fprintf(Fp_leakagesink, "LineCount:\t%d\n", + fprintf(Fp_leakagesink, "%s\t%d\n", + gettext("LineCount:"), ALp_head->SL_realloc.ssi_LineNumber); } } @@ -157,25 +165,12 @@ PUBLIC void LYLeaks NOARGS * Give a grand total of the leakage. * Close the output file. */ - fprintf(Fp_leakagesink, "\nTotal memory leakage this run:\t%u\n", - (unsigned)st_total); + fprintf(Fp_leakagesink, "\n%s\t%u\n", + gettext("Total memory leakage this run:"), + (unsigned)st_total); fclose(Fp_leakagesink); -#ifdef VMS - { - char VMSfilename[256]; - /* - * Purge lower versions of the file. - */ - sprintf(VMSfilename, "%s;-1", LEAKAGE_SINK); - while (remove(VMSfilename) == 0) - ; - /* - * Reset version number. - */ - sprintf(VMSfilename, "%s;1", LEAKAGE_SINK); - rename(LEAKAGE_SINK, VMSfilename); - } -#endif /* VMS */ + + HTSYS_purge(LEAKAGE_SINK); } /* @@ -183,7 +178,7 @@ PUBLIC void LYLeaks NOARGS ** the information in a list. ** Arguments: st_bytes The size of the allocation requested ** in bytes. -** cp_File The file from which the request for +** cp_File The file from which the request for ** allocation came from. ** ssi_Line The line number in cp_File where the ** allocation request came from. @@ -196,7 +191,7 @@ PUBLIC void LYLeaks NOARGS ** 05-26-94 created Lynx 2-3-1 Garrett Arch Blythe */ PUBLIC void *LYLeakMalloc ARGS3( - size_t, st_bytes, + size_t, st_bytes, CONST char *, cp_File, CONST short, ssi_Line) { @@ -243,7 +238,7 @@ PUBLIC void *LYLeakMalloc ARGS3( ** save relevant information in a list. ** Arguments: st_number The number of items to allocate. ** st_bytes The size of each item. -** cp_File The file which wants to allocation. +** cp_File The file which wants to allocation. ** ssi_Line The line number in cp_File requesting ** the allocation. ** Return Value: void * The allocated memory, or NULL on failure as @@ -255,8 +250,8 @@ PUBLIC void *LYLeakMalloc ARGS3( ** 05-26-94 created Lynx 2-3-1 Garrett Arch Blythe */ PUBLIC void *LYLeakCalloc ARGS4( - size_t, st_number, - size_t, st_bytes, + size_t, st_number, + size_t, st_bytes, CONST char *, cp_File, CONST short, ssi_Line) { @@ -308,7 +303,7 @@ PUBLIC void *LYLeakCalloc ARGS4( ** realloc works just like ** malloc. ** st_newBytes The new size of the chunk of memory. -** cp_File The file containing the realloc. +** cp_File The file containing the realloc. ** ssi_Line The line containing the realloc in cp_File. ** Return Value: void * The new pointer value (could be the same) or ** NULL if unable to resize (old block @@ -322,8 +317,8 @@ PUBLIC void *LYLeakCalloc ARGS4( ** 05-26-94 created Lynx 2-3-1 Garrett Arch Blythe */ PUBLIC void *LYLeakRealloc ARGS4( - void *, vp_Alloced, - size_t, st_newBytes, + void *, vp_Alloced, + size_t, st_newBytes, CONST char *, cp_File, CONST short, ssi_Line) { @@ -397,7 +392,7 @@ PUBLIC void *LYLeakRealloc ARGS4( ** Purpose: Capture all requests to free information and also ** remove items from the allocation list. ** Arguments: vp_Alloced The memory to free. -** cp_File The file calling free. +** cp_File The file calling free. ** ssi_Line The line of cp_File calling free. ** Return Value: void ** Remarks/Portability/Dependencies/Restrictions: @@ -409,7 +404,7 @@ PUBLIC void *LYLeakRealloc ARGS4( ** 05-26-94 created Lynx 2-3-1 Garrett Arch Blythe */ PUBLIC void LYLeakFree ARGS3( - void *, vp_Alloced, + void *, vp_Alloced, CONST char *, cp_File, CONST short, ssi_Line) { @@ -470,6 +465,12 @@ PUBLIC char * LYLeakSACopy ARGS4( CONST char *, cp_File, CONST short, ssi_Line) { + if (src != NULL && src == *dest) { + CTRACE(tfp, + "LYLeakSACopy: *dest equals src, contains \"%s\"\n", + src); + return *dest; + } if (*dest) { LYLeakFree(*dest, cp_File, ssi_Line); *dest = NULL; @@ -495,6 +496,12 @@ PUBLIC char * LYLeakSACat ARGS4( CONST short, ssi_Line) { if (src && *src) { + if (src == *dest) { + CTRACE(tfp, + "LYLeakSACat: *dest equals src, contains \"%s\"\n", + src); + return *dest; + } if (*dest) { int length = strlen(*dest); *dest = (char *)LYLeakRealloc(*dest, @@ -549,7 +556,7 @@ PRIVATE void AddToList ARGS1( ** 05-26-94 created Lynx 2-3-1 Garrett Arch Blythe */ PRIVATE AllocationList *FindInList ARGS1( - void *, vp_find) + void *, vp_find) { AllocationList *ALp_find = ALp_RunTimeAllocations; diff --git a/gnu/usr.bin/lynx/src/LYList.c b/gnu/usr.bin/lynx/src/LYList.c index b283ed3bf12..f1e111ff3b6 100644 --- a/gnu/usr.bin/lynx/src/LYList.c +++ b/gnu/usr.bin/lynx/src/LYList.c @@ -5,24 +5,22 @@ ** */ -#include "HTUtils.h" -#include "tcp.h" -#include "LYUtils.h" -#include "GridText.h" -#include "LYList.h" -#include "LYSignal.h" -#include "LYGlobalDefs.h" -#include "LYCharUtils.h" +#include +#include +#include +#include +#include +#include +#include +#include #ifdef DIRED_SUPPORT -#include "LYUpload.h" -#include "LYLocal.h" +#include +#include #endif /* DIRED_SUPPORT */ -#include "LYexit.h" -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} +#include +#include /* showlist - F.Macrides (macrides@sci.wfeb.edu) ** -------- @@ -34,7 +32,7 @@ ** Clear: we only get addresses. */ -static char list_filename[256] = "\0"; +static char *list_filename = 0; /* * Returns the name of the file used for the List Page, if one has @@ -43,7 +41,7 @@ static char list_filename[256] = "\0"; */ PUBLIC char * LYlist_temp_url NOARGS { - return list_filename; + return list_filename ? list_filename : ""; } PUBLIC int showlist ARGS2( @@ -52,10 +50,10 @@ PUBLIC int showlist ARGS2( { int cnt; int refs, hidden_links; - static char tempfile[256]; - static BOOLEAN first = TRUE; + static char tempfile[LY_MAXPATH]; FILE *fp0; char *Address = NULL, *Title = NULL, *cp = NULL; + char *LinkTitle = NULL; /* Rel stored as property of link, not of dest */ BOOLEAN intern_w_post = FALSE; char *desc = "unknown field or link"; @@ -63,73 +61,43 @@ PUBLIC int showlist ARGS2( hidden_links = HText_HiddenLinkCount(HTMainText); if (refs <= 0 && hidden_links > 0 && LYHiddenLinks != HIDDENLINKS_SEPARATE) { - _statusline(NO_VISIBLE_REFS_FROM_DOC); - sleep(MessageSecs); + HTUserMsg(NO_VISIBLE_REFS_FROM_DOC); return(-1); } if (refs <= 0 && hidden_links <= 0) { - _statusline(NO_REFS_FROM_DOC); - sleep(MessageSecs); + HTUserMsg(NO_REFS_FROM_DOC); return(-1); } - if (first) { - tempname(tempfile, NEW_FILE); - /* - * Make the file a URL now. - */ -#if defined (VMS) || defined (DOSPATH) - sprintf(list_filename, "file://localhost/%s", tempfile); -#else - sprintf(list_filename, "file://localhost%s", tempfile); -#endif /* VMS */ - first = FALSE; -#ifdef VMS - } else { - remove(tempfile); /* Remove duplicates on VMS. */ -#endif /* VMS */ - } - - if ((fp0 = LYNewTxtFile(tempfile)) == NULL) { - _statusline(CANNOT_OPEN_TEMP); - sleep(MessageSecs); + LYRemoveTemp(tempfile); + if ((fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w")) == NULL) { + HTUserMsg(CANNOT_OPEN_TEMP); return(-1); } + LYLocalFileToURL(&list_filename, tempfile); + StrAllocCopy(newdoc->address, list_filename); LYforce_HTML_mode = TRUE; /* force this file to be HTML */ LYforce_no_cache = TRUE; /* force this file to be new */ +#ifdef EXP_ADDRLIST_PAGE + if (titles != TRUE) + BeginInternalPage(fp0, ADDRLIST_PAGE_TITLE, LIST_PAGE_HELP); + else +#endif + BeginInternalPage(fp0, LIST_PAGE_TITLE, LIST_PAGE_HELP); - fprintf(fp0, "\n"); - LYAddMETAcharsetToFD(fp0, -1); - if (strchr(HTLoadedDocumentURL(), '"') == NULL) { - /* - * Insert a BASE tag so there is some way to relate the List Page - * file to its underlying document after we are done. It won't - * be actually used for resolving relative URLs. - kw - */ - StrAllocCopy(Address, HTLoadedDocumentURL()); - LYEntify(&Address, FALSE); - fprintf(fp0, "\n", Address); - FREE(Address); - } - fprintf(fp0, "%s\n\n\n", - LIST_PAGE_TITLE); - fprintf(fp0, "

                            You have reached the List Page

                            \n"); - fprintf(fp0, "

                            %s Version %s

                            \n", LYNX_NAME, LYNX_VERSION); StrAllocCopy(Address, HTLoadedDocumentURL()); LYEntify(&Address, FALSE); - fprintf(fp0, - " References in %s

                            \n", - ((Address != NULL && *Address != '\0') ? - Address : "this document:")); + fprintf(fp0, "%s%s

                            \n", gettext("References in "), + ((Address != NULL && *Address != '\0') ? Address : gettext("this document:"))); FREE(Address); if (refs > 0) { fprintf(fp0, "<%s compact>\n", ((keypad_mode == NUMBERS_AS_ARROWS) ? "ol" : "ul")); if (hidden_links > 0) - fprintf(fp0, "Visible links:\n"); + fprintf(fp0, "%s\n", gettext("Visible links:")); } if (hidden_links > 0) { if (LYHiddenLinks == HIDDENLINKS_IGNORE) @@ -179,14 +147,24 @@ PUBLIC int showlist ARGS2( /* * Set flag to note that we had at least one internal link, * if the document from which we are generating the list - * has assosiated POST data; after an extra check that the - * link destination really has hthe same POST data so that + * has associated POST data; after an extra check that the + * link destination really has the same POST data so that * we can believe it is an internal link. */ intern_w_post = TRUE; } address = HTAnchor_address(dest); title = titles ? HTAnchor_title(parent) : NULL; + if (dest_intl) { + HTSprintf0(&LinkTitle, "(internal)"); + } else if (titles && child->mainLink.type && + dest == child->mainLink.dest && + !strncmp(HTAtom_name(child->mainLink.type), + "RelTitle: ", 10)) { + HTSprintf0(&LinkTitle, "(%s)", HTAtom_name(child->mainLink.type)+10); + } else { + FREE(LinkTitle); + } StrAllocCopy(Address, address); FREE(address); LYEntify(&Address, TRUE); @@ -202,7 +180,7 @@ PUBLIC int showlist ARGS2( fprintf(fp0, "

                          2. %s%s%s%s%s\n", Address, dest_intl ? " TYPE=\"internal link\"" : "", - dest_intl ? "(internal) " : "", + LinkTitle ? LinkTitle : "", ((HTAnchor*)parent != dest) && Title ? "in " : "", (char *)(Title ? Title : Address), (Title && cp) ? " - " : "", @@ -211,6 +189,7 @@ PUBLIC int showlist ARGS2( FREE(Address); FREE(Title); } + FREE(LinkTitle); if (hidden_links > 0) { if (refs > 0) @@ -219,7 +198,7 @@ PUBLIC int showlist ARGS2( "ol" : "ul")); fprintf(fp0, "<%s compact>\n", ((keypad_mode == NUMBERS_AS_ARROWS) ? "ol continue" : "ul")); - fprintf(fp0, "Hidden links:\n"); + fprintf(fp0, "%s\n", gettext("Hidden links:")); } for (cnt = 0; cnt < hidden_links; cnt++) { @@ -234,14 +213,16 @@ PUBLIC int showlist ARGS2( FREE(Address); } - fprintf(fp0,"\n\n\n", ((keypad_mode == NUMBERS_AS_ARROWS) ? - "ol" : "ul")); + fprintf(fp0,"\n\n", ((keypad_mode == NUMBERS_AS_ARROWS) ? + "ol" : "ul")); + EndInternalPage(fp0); + LYCloseTempFP(fp0); /* * Make necessary changes to newdoc before returning to caller. * If the intern_w_post flag is set, we keep the POST data in * newdoc that have been passed in. They should be the same as - * in the loaded locument for which we generated the list. + * in the loaded document for which we generated the list. * In that case the file we have written will be associated with * the same POST data when it is loaded after we are done here, * so that following one of the links we have marked as "internal @@ -257,7 +238,6 @@ PUBLIC int showlist ARGS2( } newdoc->isHEAD = FALSE; newdoc->safe = FALSE; - fclose(fp0); return(0); } @@ -274,13 +254,10 @@ PUBLIC void printlist ARGS2( FILE *, fp, BOOLEAN, titles) { -#ifdef VMS - extern BOOLEAN HadVMSInterrupt; -#endif /* VMS */ int cnt; int refs, hidden_links; char *address = NULL; - char *desc = "unknown field or link"; + char *desc = gettext("unknown field or link"); refs = HText_sourceAnchors(HTMainText); if (refs <= 0 && LYHiddenLinks != HIDDENLINKS_SEPARATE) @@ -289,9 +266,9 @@ PUBLIC void printlist ARGS2( if (refs <= 0 && hidden_links <= 0) { return; } else { - fprintf(fp, "\n%s\n\n", "References"); + fprintf(fp, "\n%s\n\n", gettext("References")); if (hidden_links > 0) { - fprintf(fp, " Visible links:\n"); + fprintf(fp, " %s\n", gettext("Visible links")); if (LYHiddenLinks == HIDDENLINKS_IGNORE) hidden_links = 0; } @@ -304,7 +281,7 @@ PUBLIC void printlist ARGS2( if (child == 0) { /* * child should not be 0 unless form field numbering is on - * and cnt is the number of a form intput field. + * and cnt is the number of a form input field. * HText_FormDescNumber() will set desc to a description * of what type of input field this is. We'll create a * within-document link to ensure that the link numbers on @@ -319,7 +296,7 @@ PUBLIC void printlist ARGS2( } dest = HTAnchor_followMainLink((HTAnchor *)child); /* - * Ignore if child anchor points to itself, i.e. we had + * Ignore if child anchor points to itself, i.e., we had * something like and it is not * treated as a hidden link. Useful if someone 'P'rints * the List Page (which isn't a very useful action to do, @@ -341,7 +318,7 @@ PUBLIC void printlist ARGS2( } if (hidden_links > 0) - fprintf(fp, "%s Hidden links:\n", ((refs > 0) ? "\n" : "")); + fprintf(fp, "%s %s\n", ((refs > 0) ? "\n" : ""), gettext("Hidden links:")); for (cnt = 0; cnt < hidden_links; cnt++) { StrAllocCopy(address, HText_HiddenLinkAt(HTMainText, cnt)); if (!(address && *address)) { diff --git a/gnu/usr.bin/lynx/src/LYList.h b/gnu/usr.bin/lynx/src/LYList.h index 4a717284744..4288107bc64 100644 --- a/gnu/usr.bin/lynx/src/LYList.h +++ b/gnu/usr.bin/lynx/src/LYList.h @@ -1,11 +1,10 @@ - #ifndef LYLIST_H #define LYLIST_H +#include + extern char * LYlist_temp_url NOPARAMS; extern int showlist PARAMS((document *newdoc, BOOLEAN titles)); extern void printlist PARAMS((FILE *fp, BOOLEAN titles)); -#define LIST_PAGE_TITLE "Lynx List Page" - #endif /* LYLIST_H */ diff --git a/gnu/usr.bin/lynx/src/LYLocal.c b/gnu/usr.bin/lynx/src/LYLocal.c index 871395612b8..04a85fa27d6 100644 --- a/gnu/usr.bin/lynx/src/LYLocal.c +++ b/gnu/usr.bin/lynx/src/LYLocal.c @@ -28,34 +28,32 @@ ** Cast all code into the Lynx programming style. - FM */ -#include "HTUtils.h" -#include "tcp.h" -#include "HTAlert.h" -#include "HTParse.h" -#include "LYCurses.h" -#include "LYGlobalDefs.h" -#include "LYUtils.h" -#include "LYStrings.h" -#include "LYCharUtils.h" -#include "LYStructs.h" -#include "LYGetFile.h" -#include "LYHistory.h" -#include "LYUpload.h" -#include "LYLocal.h" -#include "LYSystem.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef VMS #ifndef _WINDOWS #ifdef HAVE_SYS_WAIT_H #include #endif -#include -#include #endif /*_WINDOWS */ #endif /* VMS */ #ifndef WEXITSTATUS -# if HAVE_TYPE_UNIONWAIT +# ifdef HAVE_TYPE_UNIONWAIT # define WEXITSTATUS(status) (status.w_retcode) # else # define WEXITSTATUS(status) (((status) & 0xff00) >> 8) @@ -63,17 +61,14 @@ #endif #ifndef WTERMSIG -# if HAVE_TYPE_UNIONWAIT +# ifdef HAVE_TYPE_UNIONWAIT # define WTERMSIG(status) (status.w_termsig) # else # define WTERMSIG(status) ((status) & 0x7f) # endif #endif -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} - +#include PRIVATE int LYExecv PARAMS(( char * path, @@ -81,10 +76,10 @@ PRIVATE int LYExecv PARAMS(( char * msg)); #ifdef DIRED_SUPPORT -PUBLIC char LYPermitFileURL[256] = "\0"; -PUBLIC char LYDiredFileURL[256] = "\0"; +PUBLIC char LYPermitFileURL[LY_MAXPATH] = "\0"; +PUBLIC char LYDiredFileURL[LY_MAXPATH] = "\0"; -PRIVATE char *filename PARAMS(( +PRIVATE char *get_filename PARAMS(( char * prompt, char * buf, size_t bufsize)); @@ -97,7 +92,7 @@ PRIVATE BOOLEAN permit_location PARAMS(( #endif /* OK_PERMIT */ PRIVATE char *render_item PARAMS(( - char * s, + CONST char * s, char * path, char * dir, char * buf, @@ -139,7 +134,7 @@ struct dired_menu { { DE_DIR, "", "Modify Directory Name", "(of current selection)", "LYNXDIRED://MODIFY_NAME%p", NULL }, { DE_SYMLINK, "", "Modify Name", -"(of selected symbolic link)", "LYNXDIRED://MODIFY_NAME%p", NULL }, +"(of selected symbolic link)", "LYNXDIRED://MODIFY_NAME%p", NULL }, #ifdef OK_PERMIT { DE_FILE, "", "Modify File Permissions", @@ -241,68 +236,165 @@ struct dired_menu { NULL, NULL, NULL } }; +PRIVATE BOOLEAN cannot_stat ARGS1(char *, name) +{ + char *tmpbuf = 0; + HTSprintf(&tmpbuf, gettext("Unable to get status of '%s'."), name); + HTAlert(tmpbuf); + FREE(tmpbuf); + return FALSE; +} + +PRIVATE BOOLEAN ok_stat ARGS2(char *, name, struct stat*, sb) +{ + CTRACE(tfp, "testing ok_stat(%s)\n", name); + if (stat(name, sb) < 0) { + return cannot_stat(name); + } + return TRUE; +} + +#ifdef HAVE_LSTAT +PRIVATE BOOLEAN ok_lstat ARGS2(char *, name, struct stat*, sb) +{ + CTRACE(tfp, "testing ok_lstat(%s)\n", name); + if (lstat(name, sb) < 0) { + return cannot_stat(name); + } + return TRUE; +} +#else +#define ok_lstat(name,sb) ok_stat(name,sb) +#endif + +PRIVATE BOOLEAN ok_file_or_dir ARGS1(struct stat*, sb) +{ + if (!S_ISDIR(sb->st_mode) + && !S_ISREG(sb->st_mode)) { + HTAlert(gettext("The selected item is not a file or a directory! Request ignored.")); + return FALSE; + } + return TRUE; +} + +PRIVATE BOOLEAN ok_localname ARGS2(char*, dst, char*, src) +{ + char *s = HTfullURL_toFile(strip_trailing_slash(src)); + struct stat dir_info; + + if (!ok_stat(s, &dir_info) + || !ok_file_or_dir(&dir_info)) { + FREE(s); + return FALSE; + } + strcpy(dst, s); + FREE(s); + return TRUE; +} + +PRIVATE int move_file ARGS2(char *, source, char *, target) +{ + int code; + char *msg = 0; + char *args[5]; + + HTSprintf(&msg, gettext("move %s to %s"), source, target); + args[0] = "mv"; + args[1] = source; + args[2] = target; + args[3] = (char *) 0; + code = (LYExecv(MV_PATH, args, msg) <= 0) ? -1 : 1; + FREE(msg); + return code; +} + +PRIVATE BOOLEAN not_already_exists ARGS1(char *, name) +{ + struct stat dir_info; + + if (stat(name, &dir_info) == -1) { + if (errno != ENOENT) { + cannot_stat(name); + } else { + return TRUE; + } + } else if (S_ISDIR(dir_info.st_mode)) { + HTAlert(gettext("There is already a directory with that name! Request ignored.")); + } else if (S_ISREG(dir_info.st_mode)) { + HTAlert(gettext("There is already a file with that name! Request ignored.")); + } else { + HTAlert(gettext("The specified name is already in use! Request ignored.")); + } + return FALSE; +} + +PRIVATE BOOLEAN dir_has_same_owner ARGS2(struct stat *, info, uid_t, owner) +{ + if (S_ISDIR(info->st_mode)) { + if (info->st_uid == owner) { + return TRUE; + } else { + HTAlert(gettext("Destination has different owner! Request denied.")); + } + } else { + HTAlert(gettext("Destination is not a valid directory! Request denied.")); + } + return FALSE; +} + /* * Remove all tagged files and directories. */ PRIVATE BOOLEAN remove_tagged NOARGS { - int c, ans; - char *cp, *tp; - char tmpbuf[1024]; + int ans; + BOOL will_clear = TRUE; + char *cp; + char *tmpbuf = NULL; char *testpath = NULL; struct stat dir_info; - int count, i; + int count; HTList *tag; char *args[5]; if (HTList_isEmpty(tagged)) /* should never happen */ return 0; - _statusline("Remove all tagged files and directories (y or n): "); - c = LYgetch(); - ans = TOUPPER(c); + ans = HTConfirm(gettext("Remove all tagged files and directories ")); count = 0; tag = tagged; - while (ans == 'Y' && (cp = (char *)HTList_nextObject(tag)) != NULL) { - if (is_url(cp) == FILE_URL_TYPE) { /* unecessary check */ - tp = cp; - if (!strncmp(tp, "file://localhost", 16)) { - tp += 16; - } else if (!strncmp(tp, "file:", 5)) { - tp += 5; - } - StrAllocCopy(testpath, tp); - HTUnEscape(testpath); - if ((i = strlen(testpath)) && testpath[i-1] == '/') - testpath[(i - 1)] = '\0'; + while (ans == YES && (cp = (char *)HTList_nextObject(tag)) != NULL) { + if (is_url(cp) == FILE_URL_TYPE) { /* unnecessary check */ + testpath = HTfullURL_toFile(cp); + LYTrimPathSep(testpath); + will_clear = TRUE; /* * Check the current status of the path to be deleted. */ - if (stat(testpath,&dir_info) == -1) { - sprintf(tmpbuf, - "System error - failed to get status of '%s'.", - testpath); - _statusline(tmpbuf); - sleep(AlertSecs); - return count; + if (!ok_stat(testpath, &dir_info)) { + will_clear = FALSE; + break; } else { args[0] = "rm"; args[1] = "-rf"; args[2] = testpath; args[3] = (char *) 0; - sprintf(tmpbuf, "remove %s", testpath); + HTSprintf0(&tmpbuf, gettext("remove %s"), testpath); if (LYExecv(RM_PATH, args, tmpbuf) <= 0) { - FREE(testpath); - return ((count == 0) ? -1 : count); + if (count == 0) count = -1; + will_clear = FALSE; + break; } ++count; } } } FREE(testpath); - clear_tags(); + FREE(tmpbuf); + if (will_clear) + clear_tags(); return count; } @@ -325,14 +417,13 @@ PRIVATE BOOLEAN modify_tagged ARGS1( char *savepath = NULL; char *srcpath = NULL; struct stat dir_info; - char *args[5]; int count = 0; HTList *tag; if (HTList_isEmpty(tagged)) /* should never happen */ return 0; - _statusline("Enter new location for tagged items: "); + _statusline(gettext("Enter new location for tagged items: ")); tmpbuf[0] = '\0'; LYgetstr(tmpbuf, VISIBLE, sizeof(tmpbuf), NORECALL); @@ -360,25 +451,20 @@ PRIVATE BOOLEAN modify_tagged ARGS1( if (!cp) /* Last resort, should never happen. */ cp = "/"; } - if (!strncmp(cp, "file://localhost", 16)) { - cp += 16; - } else if (!strncmp(cp, "file:", 5)) { - cp += 5; - } + if (testpath == NULL) { /* * Get the directory containing the file or subdir. */ - cp = strip_trailing_slash(cp); + cp = HTfullURL_toFile(strip_trailing_slash(cp)); savepath = HTParse(".", cp, PARSE_PATH+PARSE_PUNCTUATION); } else { + cp = HTfullURL_toFile(cp); StrAllocCopy(savepath, cp); } - HTUnEscape(savepath); - if (stat(savepath, &dir_info) == -1) { - sprintf(tmpbuf, "Unable to get status of '%s'.", savepath); - _statusline(tmpbuf); - sleep(AlertSecs); + FREE(cp); + + if (!ok_stat(savepath, &dir_info)) { FREE(savepath); return 0; } @@ -399,9 +485,7 @@ PRIVATE BOOLEAN modify_tagged ARGS1( StrAllocCopy(cp1, Home_Dir()); StrAllocCat(cp1, (tmpbuf + 1)); if (strlen(cp1) > (sizeof(tmpbuf) - 1)) { - sprintf(tmpbuf, "%s", "Path too long"); - _statusline(tmpbuf); - sleep(AlertSecs); + HTAlert(gettext("Path too long")); FREE(savepath); FREE(cp1); return 0; @@ -413,9 +497,8 @@ PRIVATE BOOLEAN modify_tagged ARGS1( /* * If path is relative, prefix it with current location. */ - if (tmpbuf[0] != '/') { - if (savepath[(strlen(savepath) - 1)] != '/') - StrAllocCat(savepath,"/"); + if (!LYIsPathSep(tmpbuf[0])) { + LYAddPathSep(&savepath); StrAllocCat(savepath,tmpbuf); } else { StrAllocCopy(savepath,tmpbuf); @@ -424,10 +507,7 @@ PRIVATE BOOLEAN modify_tagged ARGS1( /* * stat() the target location to determine type and ownership. */ - if (stat(savepath, &dir_info) == -1) { - sprintf(tmpbuf,"Unable to get status of '%s'.",savepath); - _statusline(tmpbuf); - sleep(AlertSecs); + if (!ok_stat(savepath, &dir_info)) { FREE(savepath); return 0; } @@ -436,9 +516,7 @@ PRIVATE BOOLEAN modify_tagged ARGS1( * Make sure the source and target locations are not the same place. */ if (dev == dir_info.st_dev && inode == dir_info.st_ino) { - _statusline( - "Source and destination are the same location - request ignored!"); - sleep(AlertSecs); + HTAlert(gettext("Source and destination are the same location - request ignored!")); FREE(savepath); return 0; } @@ -447,54 +525,31 @@ PRIVATE BOOLEAN modify_tagged ARGS1( * Make sure the target location is a directory which is owned * by the same uid as the owner of the current location. */ - if ((dir_info.st_mode & S_IFMT) == S_IFDIR) { - if (dir_info.st_uid == owner) { - count = 0; - tag = tagged; - - /* - * Move all tagged items to the target location. - */ - while ((cp = (char *)HTList_nextObject(tag)) != NULL) { - if (!strncmp(cp, "file://localhost", 16)) { - cp += 16; - } else if (!strncmp(cp, "file:", 5)) { - cp += 5; - } - StrAllocCopy(srcpath, cp); - HTUnEscape(srcpath); - - sprintf(tmpbuf, "move %s to %s", srcpath, savepath); - args[0] = "mv"; - args[1] = srcpath; - args[2] = savepath; - args[3] = (char *) 0; - if (LYExecv(MV_PATH, args, tmpbuf) <= 0) { - if (count == 0) - count = -1; - break; - } - ++count; + if (dir_has_same_owner(&dir_info, owner)) { + count = 0; + tag = tagged; + + /* + * Move all tagged items to the target location. + */ + while ((cp = (char *)HTList_nextObject(tag)) != NULL) { + cp = HTfullURL_toFile(cp); + StrAllocCopy(srcpath, cp); + + if (move_file(srcpath, savepath) < 0) { + FREE(cp); + if (count == 0) + count = -1; + break; } - FREE(srcpath); - FREE(savepath); - clear_tags(); - return count; - } else { - _statusline( - "Destination has different owner! Request denied."); - sleep(AlertSecs); - FREE(srcpath); - FREE(savepath); - return 0; + FREE(cp); + ++count; } - } else { - _statusline( - "Destination is not a valid directory! Request denied."); - sleep(AlertSecs); - FREE(savepath); - return 0; + clear_tags(); + FREE(srcpath); } + FREE(savepath); + return count; } return 0; } @@ -510,40 +565,31 @@ PRIVATE BOOLEAN modify_name ARGS1( char newpath[512]; char savepath[512]; struct stat dir_info; - char *args[5]; /* * Determine the status of the selected item. */ testpath = strip_trailing_slash(testpath); - if (stat(testpath, &dir_info) == -1) { - sprintf(tmpbuf, "Unable to get status of '%s'.", testpath); - _statusline(tmpbuf); - sleep(AlertSecs); - } else { + if (ok_stat(testpath, &dir_info)) { /* * Change the name of the file or directory. */ - if ((dir_info.st_mode & S_IFMT) == S_IFDIR) { - cp = "Enter new name for directory: "; - } else if ((dir_info.st_mode & S_IFMT) == S_IFREG) { - cp = "Enter new name for file: "; + if (S_ISDIR(dir_info.st_mode)) { + cp = gettext("Enter new name for directory: "); + } else if (S_ISREG(dir_info.st_mode)) { + cp = gettext("Enter new name for file: "); } else { - _statusline( - "The selected item is not a file or a directory! Request ignored."); - sleep(AlertSecs); - return 0; + return ok_file_or_dir(&dir_info); } - if (filename(cp, tmpbuf, sizeof(tmpbuf)) == NULL) + if (get_filename(cp, tmpbuf, sizeof(tmpbuf)) == NULL) return 0; /* * Do not allow the user to also change the location at this time. */ if (strchr(tmpbuf, '/') != NULL) { - _statusline("Illegal character \"/\" found! Request ignored."); - sleep(AlertSecs); + HTAlert(gettext("Illegal character \"/\" found! Request ignored.")); } else if (strlen(tmpbuf) && (cp = strrchr(testpath, '/')) != NULL) { strcpy(savepath,testpath); @@ -554,34 +600,8 @@ PRIVATE BOOLEAN modify_name ARGS1( /* * Make sure the destination does not already exist. */ - if (stat(newpath, &dir_info) == -1) { - if (errno != ENOENT) { - sprintf(tmpbuf, - "Unable to determine status of '%s'.", newpath); - _statusline(tmpbuf); - sleep(AlertSecs); - } else { - sprintf(tmpbuf, "move %s to %s", savepath, newpath); - args[0] = "mv"; - args[1] = savepath; - args[2] = newpath; - args[3] = (char *) 0; - if (LYExecv(MV_PATH, args, tmpbuf) <= 0) - return (-1); - return 1; - } - } else if ((dir_info.st_mode & S_IFMT) == S_IFDIR) { - _statusline( - "There is already a directory with that name! Request ignored."); - sleep(AlertSecs); - } else if ((dir_info.st_mode & S_IFMT) == S_IFREG) { - _statusline( - "There is already a file with that name! Request ignored."); - sleep(AlertSecs); - } else { - _statusline( - "The specified name is already in use! Request ignored."); - sleep(AlertSecs); + if (not_already_exists(newpath)) { + return move_file(savepath, newpath); } } } @@ -594,7 +614,6 @@ PRIVATE BOOLEAN modify_name ARGS1( PRIVATE BOOLEAN modify_location ARGS1( char *, testpath) { - int mode; char *cp; dev_t dev; ino_t inode; @@ -603,34 +622,27 @@ PRIVATE BOOLEAN modify_location ARGS1( char newpath[512]; char savepath[512]; struct stat dir_info; - char *args[5]; /* * Determine the status of the selected item. */ testpath = strip_trailing_slash(testpath); - if (stat(testpath, &dir_info) == -1) { - sprintf(tmpbuf, "Unable to get status of '%s'.", testpath); - _statusline(tmpbuf); - sleep(AlertSecs); + if (!ok_stat(testpath, &dir_info)) { return 0; } /* * Change the location of the file or directory. */ - if ((dir_info.st_mode & S_IFMT) == S_IFDIR) { - cp = "Enter new location for directory: "; - } else if ((dir_info.st_mode & S_IFMT) == S_IFREG) { - cp = "Enter new location for file: "; + if (S_ISDIR(dir_info.st_mode)) { + cp = gettext("Enter new location for directory: "); + } else if (S_ISREG(dir_info.st_mode)) { + cp = gettext("Enter new location for file: "); } else { - _statusline( - "The specified item is not a file or a directory - request ignored."); - sleep(AlertSecs); - return 0; + return ok_file_or_dir(&dir_info); } - if (filename(cp, tmpbuf, sizeof(tmpbuf)) == NULL) + if (get_filename(cp, tmpbuf, sizeof(tmpbuf)) == NULL) return 0; if (strlen(tmpbuf)) { strcpy(savepath, testpath); @@ -639,18 +651,18 @@ PRIVATE BOOLEAN modify_location ARGS1( /* * Allow ~/ references to the home directory. */ - if (!strncmp(tmpbuf,"~/",2)) { + if (!strncmp(tmpbuf, "~/", 2) + || !strcmp(tmpbuf,"~")) { strcpy(newpath, Home_Dir()); strcat(newpath, (tmpbuf + 1)); strcpy(tmpbuf, newpath); } - if (tmpbuf[0] != '/') { + if (!LYIsPathSep(tmpbuf[0])) { if ((cp = strrchr(newpath,'/')) != NULL) { *++cp = '\0'; strcat(newpath,tmpbuf); } else { - _statusline("Unexpected failure - unable to find trailing \"/\""); - sleep(AlertSecs); + HTAlert(gettext("Unexpected failure - unable to find trailing \"/\"")); return 0; } } else { @@ -661,19 +673,9 @@ PRIVATE BOOLEAN modify_location ARGS1( * Make sure the source and target have the same owner (uid). */ dev = dir_info.st_dev; - mode = dir_info.st_mode; inode = dir_info.st_ino; owner = dir_info.st_uid; - if (stat(newpath, &dir_info) == -1) { - sprintf(tmpbuf,"Unable to get status of '%s'.",newpath); - _statusline(tmpbuf); - sleep(AlertSecs); - return 0; - } - if ((dir_info.st_mode & S_IFMT) != S_IFDIR) { - _statusline( - "Destination is not a valid directory! Request denied."); - sleep(AlertSecs); + if (!ok_stat(newpath, &dir_info)) { return 0; } @@ -681,24 +683,11 @@ PRIVATE BOOLEAN modify_location ARGS1( * Make sure the source and target are not the same location. */ if (dev == dir_info.st_dev && inode == dir_info.st_ino) { - _statusline( - "Source and destination are the same location! Request ignored!"); - sleep(AlertSecs); + HTAlert(gettext("Source and destination are the same location! Request ignored!")); return 0; } - if (dir_info.st_uid == owner) { - sprintf(tmpbuf,"move %s to %s",savepath,newpath); - args[0] = "mv"; - args[1] = savepath; - args[2] = newpath; - args[3] = (char *) 0; - if (LYExecv(MV_PATH, args, tmpbuf) <= 0) - return (-1); - return 1; - } else { - _statusline("Destination has different owner! Request denied."); - sleep(AlertSecs); - return 0; + if (dir_has_same_owner(&dir_info, owner)) { + return move_file(savepath,newpath); } } return 0; @@ -717,14 +706,10 @@ PUBLIC BOOLEAN local_modify ARGS2( int count; if (!HTList_isEmpty(tagged)) { - cp = doc->address; - if (!strncmp(cp, "file://localhost", 16)) { - cp += 16; - } else if (!strncmp(cp, "file:", 5)) { - cp += 5; - } + cp = HTpartURL_toFile(doc->address); strcpy(testpath, cp); - HTUnEscapeSome(testpath, "/"); + FREE(cp); + count = modify_tagged(testpath); if (doc->link > (nlinks-count - 1)) @@ -745,22 +730,17 @@ PUBLIC BOOLEAN local_modify ARGS2( * This reduces functionality but reduces difficulty for the novice. */ #ifdef OK_PERMIT - _statusline("Modify name, location, or permission (n, l, or p): "); + _statusline(gettext("Modify name, location, or permission (n, l, or p): ")); #else - _statusline("Modify name, or location (n or l): "); + _statusline(gettext("Modify name, or location (n or l): ")); #endif /* OK_PERMIT */ c = LYgetch(); ans = TOUPPER(c); if (strchr("NLP", ans) != NULL) { - cp = links[doc->link].lname; - if (!strncmp(cp, "file://localhost", 16)) { - cp += 16; - } else if(!strncmp(cp, "file:", 5)) { - cp += 5; - } + cp = HTfullURL_toFile(links[doc->link].lname); strcpy(testpath, cp); - HTUnEscape(testpath); + FREE(cp); if (ans == 'N') { return(modify_name(testpath)); @@ -778,8 +758,7 @@ PUBLIC BOOLEAN local_modify ARGS2( /* * Code for changing ownership needed here. */ - _statusline("This feature not yet implemented!"); - sleep(AlertSecs); + HTAlert(gettext("This feature not yet implemented!")); } } return 0; @@ -791,15 +770,15 @@ PUBLIC BOOLEAN local_modify ARGS2( PRIVATE BOOLEAN create_file ARGS1( char *, current_location) { + int code = FALSE; char tmpbuf[512]; char testpath[512]; - struct stat dir_info; char *args[5]; char *bad_chars = ".~/"; - if (filename("Enter name of file to create: ", - tmpbuf, sizeof(tmpbuf)) == NULL) { - return 0; + if (get_filename(gettext("Enter name of file to create: "), + tmpbuf, sizeof(tmpbuf)) == NULL) { + return code; } if (!no_dotfiles && show_dotfiles) { @@ -807,13 +786,10 @@ PRIVATE BOOLEAN create_file ARGS1( } if (strstr(tmpbuf, "//") != NULL) { - _statusline("Illegal redirection \"//\" found! Request ignored."); - sleep(AlertSecs); + HTAlert(gettext("Illegal redirection \"//\" found! Request ignored.")); } else if (strlen(tmpbuf) && strchr(bad_chars, tmpbuf[0]) == NULL) { strcpy(testpath,current_location); - if (testpath[(strlen(testpath) - 1)] != '/') { - strcat(testpath,"/"); - } + LYAddPathSep0(testpath); /* * Append the target filename to the current location. @@ -823,36 +799,17 @@ PRIVATE BOOLEAN create_file ARGS1( /* * Make sure the target does not already exist */ - if (stat(testpath, &dir_info) == -1) { - if (errno != ENOENT) { - sprintf(tmpbuf, - "Unable to determine status of '%s'.", testpath); - _statusline(tmpbuf); - sleep(AlertSecs); - return 0; - } - sprintf(tmpbuf,"create %s",testpath); + if (not_already_exists(testpath)) { + char *msg = 0; + HTSprintf(&msg,gettext("create %s"),testpath); args[0] = "touch"; args[1] = testpath; args[2] = (char *) 0; - if (LYExecv(TOUCH_PATH, args, tmpbuf) <= 0) - return (-1); - return 1; - } else if ((dir_info.st_mode & S_IFMT) == S_IFDIR) { - _statusline( - "There is already a directory with that name! Request ignored."); - sleep(AlertSecs); - } else if ((dir_info.st_mode & S_IFMT) == S_IFREG) { - _statusline( - "There is already a file with that name! Request ignored."); - sleep(AlertSecs); - } else { - _statusline( - "The specified name is already in use! Request ignored."); - sleep(AlertSecs); + code = (LYExecv(TOUCH_PATH, args, msg) <= 0) ? -1 : 1; + FREE(msg); } } - return 0; + return code; } /* @@ -861,15 +818,15 @@ PRIVATE BOOLEAN create_file ARGS1( PRIVATE BOOLEAN create_directory ARGS1( char *, current_location) { + int code = FALSE; char tmpbuf[512]; char testpath[512]; - struct stat dir_info; char *args[5]; char *bad_chars = ".~/"; - if (filename("Enter name for new directory: ", - tmpbuf, sizeof(tmpbuf)) == NULL) { - return 0; + if (get_filename(gettext("Enter name for new directory: "), + tmpbuf, sizeof(tmpbuf)) == NULL) { + return code; } if (!no_dotfiles && show_dotfiles) { @@ -877,48 +834,27 @@ PRIVATE BOOLEAN create_directory ARGS1( } if (strstr(tmpbuf, "//") != NULL) { - _statusline("Illegal redirection \"//\" found! Request ignored."); - sleep(AlertSecs); + HTAlert(gettext("Illegal redirection \"//\" found! Request ignored.")); } else if (strlen(tmpbuf) && strchr(bad_chars, tmpbuf[0]) == NULL) { strcpy(testpath,current_location); - if (testpath[(strlen(testpath) - 1)] != '/') { - strcat(testpath,"/"); - } + LYAddPathSep0(testpath); + strcat(testpath, tmpbuf); /* * Make sure the target does not already exist. */ - if (stat(testpath, &dir_info) == -1) { - if (errno != ENOENT) { - sprintf(tmpbuf, - "Unable to determine status of '%s'.", testpath); - _statusline(tmpbuf); - sleep(AlertSecs); - return 0; - } - sprintf(tmpbuf,"make directory %s",testpath); + if (not_already_exists(testpath)) { + char *msg = 0; + HTSprintf(&msg,"make directory %s",testpath); args[0] = "mkdir"; args[1] = testpath; args[2] = (char *) 0; - if (LYExecv(MKDIR_PATH, args, tmpbuf) <= 0) - return (-1); - return 1; - } else if ((dir_info.st_mode & S_IFMT) == S_IFDIR) { - _statusline( - "There is already a directory with that name! Request ignored."); - sleep(AlertSecs); - } else if ((dir_info.st_mode & S_IFMT) == S_IFREG) { - _statusline( - "There is already a file with that name! Request ignored."); - sleep(AlertSecs); - } else { - _statusline( - "The specified name is already in use! Request ignored."); - sleep(AlertSecs); + code = (LYExecv(MKDIR_PATH, args, msg) <= 0) ? -1 : 1; + FREE(msg); } } - return 0; + return code; } /* @@ -931,18 +867,13 @@ PUBLIC BOOLEAN local_create ARGS1( char *cp; char testpath[512]; - _statusline("Create file or directory (f or d): "); + _statusline(gettext("Create file or directory (f or d): ")); c = LYgetch(); ans = TOUPPER(c); - cp = doc->address; - if (!strncmp(cp, "file://localhost", 16)) { - cp += 16; - } else if (!strncmp(cp, "file:", 5)) { - cp += 5; - } + cp = HTfullURL_toFile(doc->address); strcpy(testpath,cp); - HTUnEscape(testpath); + FREE(cp); if (ans == 'F') { return(create_file(testpath)); @@ -959,21 +890,13 @@ PUBLIC BOOLEAN local_create ARGS1( PRIVATE BOOLEAN remove_single ARGS1( char *, testpath) { - int c; + int code = 0; char *cp; - char tmpbuf[1024]; + char *tmpbuf = 0; struct stat dir_info; char *args[5]; - /* - * lstat() first in case its a symbolic link. - */ - if (lstat(testpath, &dir_info) == -1 && - stat(testpath, &dir_info) == -1) { - sprintf(tmpbuf, - "System error - failed to get status of '%s'.", testpath); - _statusline(tmpbuf); - sleep(AlertSecs); + if (!ok_lstat(testpath, &dir_info)) { return 0; } @@ -985,48 +908,46 @@ PRIVATE BOOLEAN remove_single ARGS1( } else { cp = testpath; } - if ((dir_info.st_mode & S_IFMT) == S_IFDIR) { + if (S_ISDIR(dir_info.st_mode)) { + /*** This strlen stuff will probably screw up intl translations /jes ***/ + /*** Course, it's probably broken for screen sizes other 80, too ***/ if (strlen(cp) < 37) { - sprintf(tmpbuf, - "Remove '%s' and all of its contents (y or n): ", cp); + HTSprintf0(&tmpbuf, + gettext("Remove '%s' and all of its contents: "), cp); } else { - sprintf(tmpbuf, - "Remove directory and all of its contents (y or n): "); + HTSprintf0(&tmpbuf, + gettext("Remove directory and all of its contents: ")); } - } else if ((dir_info.st_mode & S_IFMT) == S_IFREG) { + } else if (S_ISREG(dir_info.st_mode)) { if (strlen(cp) < 60) { - sprintf(tmpbuf, "Remove file '%s' (y or n): ", cp); + HTSprintf0(&tmpbuf, gettext("Remove file '%s': "), cp); } else { - sprintf(tmpbuf, "Remove file (y or n): "); + HTSprintf0(&tmpbuf, gettext("Remove file: ")); } #ifdef S_IFLNK - } else if ((dir_info.st_mode & S_IFMT) == S_IFLNK) { + } else if (S_ISLNK(dir_info.st_mode)) { if (strlen(cp) < 50) { - sprintf(tmpbuf, "Remove symbolic link '%s' (y or n): ", cp); + HTSprintf0(&tmpbuf, gettext("Remove symbolic link '%s': "), cp); } else { - sprintf(tmpbuf, "Remove symbolic link (y or n): "); + HTSprintf0(&tmpbuf, gettext("Remove symbolic link: ")); } #endif } else { - sprintf(tmpbuf, "Unable to determine status of '%s'.", testpath); - _statusline(tmpbuf); - sleep(AlertSecs); + cannot_stat(testpath); + FREE(tmpbuf); return 0; } - _statusline(tmpbuf); - c = LYgetch(); - if (TOUPPER(c) == 'Y') { - sprintf(tmpbuf,"remove %s",testpath); + if (HTConfirm(tmpbuf) == YES) { + HTSprintf0(&tmpbuf,"remove %s",testpath); args[0] = "rm"; args[1] = "-rf"; args[2] = testpath; args[3] = (char *) 0; - if (LYExecv(RM_PATH, args, tmpbuf) <= 0) - return (-1); - return 1; + code = (LYExecv(RM_PATH, args, tmpbuf) <= 0) ? -1 : 1; } - return 0; + FREE(tmpbuf); + return code; } /* @@ -1051,16 +972,13 @@ PUBLIC BOOLEAN local_remove ARGS1( } cp = links[doc->link].lname; if (is_url(cp) == FILE_URL_TYPE) { - tp = cp; - if (!strncmp(tp, "file://localhost", 16)) { - tp += 16; - } else if (!strncmp(tp, "file:", 5)) { - tp += 5; - } + tp = HTfullURL_toFile(cp); strcpy(testpath, tp); - HTUnEscape(testpath); + FREE(tp); + if ((i = strlen(testpath)) && testpath[i - 1] == '/') testpath[(i - 1)] = '\0'; + if (remove_single(testpath)) { if (doc->link == (nlinks - 1)) --doc->link; @@ -1076,8 +994,8 @@ PUBLIC BOOLEAN local_remove ARGS1( * Makes the code a bit cleaner. */ static struct { - char *string_mode; /* Key for value below */ - long permit_bits; /* Value for chmod/whatever */ + CONST char *string_mode; /* Key for value below */ + long permit_bits; /* Value for chmod/whatever */ } permissions[] = { {"IRUSR", S_IRUSR}, {"IWUSR", S_IWUSR}, @@ -1092,11 +1010,7 @@ static struct { use shell access for that. */ }; -#ifndef S_ISDIR -#define S_ISDIR(mode) ((mode&0xF000) == 0x4000) -#endif /* !S_ISDIR */ - -PRIVATE char LYValidPermitFile[256] = "\0"; +PRIVATE char LYValidPermitFile[LY_MAXPATH] = "\0"; /* * Handle DIRED permissions. @@ -1107,14 +1021,13 @@ PRIVATE BOOLEAN permit_location ARGS3( char **, newpath) { #ifndef UNIX - _statusline("Sorry, don't know how to permit non-UNIX files yet."); - sleep(AlertSecs); + HTAlert(gettext("Sorry, don't know how to permit non-UNIX files yet.")); return(0); #else - static char tempfile[256] = "\0"; - static BOOLEAN first = TRUE; + static char tempfile[LY_MAXPATH] = "\0"; char *cp; - char tmpbuf[LINESIZE]; + char *tmpbuf = NULL; + char tmpdst[LY_MAXPATH]; struct stat dir_info; if (srcpath) { @@ -1122,77 +1035,43 @@ PRIVATE BOOLEAN permit_location ARGS3( * Create form. */ FILE *fp0; + char local_src[LY_MAXPATH]; char * user_filename; - struct group * grp; char * group_name; + cp = HTfullURL_toFile(strip_trailing_slash(srcpath)); + strcpy(local_src, cp); + FREE(cp); + /* * A couple of sanity tests. */ - srcpath = strip_trailing_slash(srcpath); - if (strncmp(srcpath, "file://localhost", 16) == 0) - srcpath += 16; - if (lstat(srcpath, &dir_info) == -1) { - sprintf(tmpbuf, "Unable to get status of '%s'.", srcpath); - _statusline(tmpbuf); - sleep(AlertSecs); + if (!ok_lstat(local_src, &dir_info) + || !ok_file_or_dir(&dir_info)) return 0; - } else if ((dir_info.st_mode & S_IFMT) != S_IFDIR && - (dir_info.st_mode & S_IFMT) != S_IFREG) { - _statusline( - "The specified item is not a file nor a directory - request ignored."); - sleep(AlertSecs); - return(0); - } - user_filename = srcpath; - cp = strrchr(srcpath, '/'); - if (cp != NULL) { - user_filename = (cp + 1); - } + user_filename = LYPathLeaf(local_src); - if (first) { - /* - * Get an unused tempfile name. - FM - */ - tempname(tempfile, NEW_FILE); + LYRemoveTemp(tempfile); + if ((fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w")) == NULL) { + HTAlert(gettext("Unable to open permit options file")); + return(0); } /* - * Open the tempfile for writing and set its - * protection in case this wasn't done via an - * external umask. - FM + * Make the tempfile a URL. */ - if ((fp0 = LYNewTxtFile(tempfile)) == NULL) { - _statusline("Unable to open permit options file"); - sleep(AlertSecs); - return(0); - } - - if (first) { - /* - * Make the tempfile a URL. - */ - strcpy(LYPermitFileURL, "file://localhost"); - strcat(LYPermitFileURL, tempfile); - first = FALSE; - } - StrAllocCopy(*newpath, LYPermitFileURL); - - grp = getgrgid(dir_info.st_gid); - if (grp == NULL) { - group_name = ""; - } else { - group_name = grp->gr_name; - } + LYLocalFileToURL(newpath, tempfile); + strcpy(LYPermitFileURL, *newpath); + group_name = HTAA_GidToName (dir_info.st_gid); LYstrncpy(LYValidPermitFile, - srcpath, + local_src, (sizeof(LYValidPermitFile) - 1)); fprintf(fp0, "\n%s\n\n\n", PERMIT_OPTIONS_TITLE); - fprintf(fp0,"

                            Permissions for %s

                            \n", user_filename); + fprintf(fp0,"

                            %s%s

                            \n", PERMISSIONS_SEGMENT, user_filename); { /* * Prevent filenames which include '#' or '?' from messing it up. */ @@ -1202,8 +1081,8 @@ PRIVATE BOOLEAN permit_location ARGS3( FREE(srcpath_url); } - fprintf(fp0, "
                            1. Specify permissions below:

                              \n"); - fprintf(fp0, "Owner:
                              \n"); + fprintf(fp0, "
                              1. %s

                                \n", gettext("Specify permissions below:")); + fprintf(fp0, "%s:
                                \n", gettext("Owner:")); fprintf(fp0, " Read
                                \n", (dir_info.st_mode & S_IRUSR) ? "checked" : ""); @@ -1219,7 +1098,7 @@ PRIVATE BOOLEAN permit_location ARGS3( (dir_info.st_mode & S_IXUSR) ? "checked" : "", S_ISDIR(dir_info.st_mode) ? "Search" : "Execute"); - fprintf(fp0, "Group %s:
                                \n", group_name); + fprintf(fp0, "%s %s:
                                \n", gettext("Group"), group_name); fprintf(fp0, " Read
                                \n", (dir_info.st_mode & S_IRGRP) ? "checked" : ""); @@ -1235,7 +1114,7 @@ PRIVATE BOOLEAN permit_location ARGS3( (dir_info.st_mode & S_IXGRP) ? "checked" : "", S_ISDIR(dir_info.st_mode) ? "Search" : "Execute"); - fprintf(fp0, "Others:
                                \n"); + fprintf(fp0, "%s
                                \n", gettext("Others:")); fprintf(fp0, " Read
                                \n", (dir_info.st_mode & S_IROTH) ? "checked" : ""); @@ -1251,13 +1130,13 @@ PRIVATE BOOLEAN permit_location ARGS3( (dir_info.st_mode & S_IXOTH) ? "checked" : "", S_ISDIR(dir_info.st_mode) ? "Search" : "Execute"); - fprintf(fp0, -"
                                \n
                              2. \ -form to permit %s %s.\n
                              \n\n", - (dir_info.st_mode & S_IFMT) == S_IFDIR ? "directory" : "file", + fprintf(fp0, +"
                              \n
                            2. %s %s %s.\n
                            \n\n", + gettext("form to permit"), + S_ISDIR(dir_info.st_mode) ? "directory" : "file", user_filename); fprintf(fp0, ""); - fclose(fp0); + LYCloseTempFP(fp0); LYforce_no_cache = TRUE; return(PERMIT_FORM_RESULT); /* Special flag for LYMainLoop */ @@ -1277,8 +1156,7 @@ form to permit %s %s.\n
                          \n\n", HTAlert(INVALID_PERMIT_URL); else fprintf(stderr, "%s\n", INVALID_PERMIT_URL); - if (TRACE) - fprintf(stderr, "permit_location: called for <%s>.\n", + CTRACE(tfp, "permit_location: called for <%s>.\n", (destpath ? destpath : "NULL URL pointer")); return 0; @@ -1293,7 +1171,12 @@ form to permit %s %s.\n
                        \n\n", *cp++ = '\0'; /* Null terminate file name and start working on the masks. */ - HTUnEscape(destpath); /* Will now operate only on filename part. */ + if ((destpath = HTfullURL_toFile(destpath)) == 0) + return(0); + + strcpy(tmpdst, destpath); /* operate only on filename */ + FREE(destpath); + destpath = tmpdst; /* * Make sure that the file string is the one from @@ -1304,8 +1187,7 @@ form to permit %s %s.\n
                      \n\n", HTAlert(INVALID_PERMIT_URL); else fprintf(stderr, "%s\n", INVALID_PERMIT_URL); - if (TRACE) - fprintf(stderr, "permit_location: called for file '%s'.\n", + CTRACE(tfp, "permit_location: called for file '%s'.\n", destpath); return 0; } @@ -1314,16 +1196,8 @@ form to permit %s %s.\n
                    \n\n", * A couple of sanity tests. */ destpath = strip_trailing_slash(destpath); - if (stat(destpath, &dir_info) == -1) { - sprintf(tmpbuf, "Unable to get status of '%s'.", destpath); - _statusline(tmpbuf); - sleep(AlertSecs); - return 0; - } else if ((dir_info.st_mode & S_IFMT) != S_IFDIR && - (dir_info.st_mode & S_IFMT) != S_IFREG) { - _statusline( - "The specified item is not a file nor a directory - request ignored."); - sleep(AlertSecs); + if (!ok_stat(destpath, &dir_info) + || !ok_file_or_dir(&dir_info)) { return 0; } @@ -1356,13 +1230,11 @@ form to permit %s %s.\n
                  \n\n", } } if (permissions[i].string_mode == NULL) { - _statusline("Invalid mode format."); - sleep(AlertSecs); + HTAlert(gettext("Invalid mode format.")); return 0; } } else { - _statusline("Invalid syntax format."); - sleep(AlertSecs); + HTAlert(gettext("Invalid syntax format.")); return 0; } @@ -1373,15 +1245,17 @@ form to permit %s %s.\n
                \n\n", /* * Call chmod(). */ - sprintf(tmpbuf, "chmod %.4o %s", (unsigned int)new_mode, destpath); + HTSprintf(&tmpbuf, "chmod %.4o %s", (unsigned int)new_mode, destpath); sprintf(amode, "%.4o", (unsigned int)new_mode); args[0] = "chmod"; args[1] = amode; args[2] = destpath; args[3] = (char *) 0; if (LYExecv(CHMOD_PATH, args, tmpbuf) <= 0) { + FREE(tmpbuf); return (-1); } + FREE(tmpbuf); #endif /* UNIX */ LYforce_no_cache = TRUE; /* Force update of dired listing. */ return 1; @@ -1441,9 +1315,24 @@ PUBLIC void showtags ARGS1( } } +PRIVATE char * DirectoryOf ARGS1( + char *, pathname) +{ + char *result = 0; + char *leaf; + + StrAllocCopy(result, pathname); + leaf = LYPathLeaf(result); + if (leaf != result) { + *leaf = '\0'; + LYTrimPathSep(result); + } + return result; +} + /* * Perform file management operations for LYNXDIRED URL's. - * Attempt to be consistent. These are (pseudo) URLs - i.e. they should + * Attempt to be consistent. These are (pseudo) URLs - i.e., they should * be in URL syntax: some bytes will be URL-escaped with '%'. This is * necessary because these (pseudo) URLs will go through some of the same * kinds of interpretations and mutilations as real ones: HTParse, stripping @@ -1456,22 +1345,21 @@ PUBLIC int local_dired ARGS1( { char *line_url; /* will point to doc's address, which is a URL */ char *line = NULL; /* same as line_url, but HTUnEscaped, will be alloced */ - char *cp, *tp, *bp; - char tmpbuf[256]; - char buffer[512]; + char *tp = NULL; + char *tmpbuf = NULL; + char *buffer = NULL; + char *dirname = NULL; line_url = doc->address; - if (TRACE) - fprintf(stderr, "local_dired: called for <%s>.\n", + CTRACE(tfp, "local_dired: called for <%s>.\n", (line_url ? - line_url : "NULL URL pointer")); + line_url : gettext("NULL URL pointer"))); HTUnEscapeSome(line_url, "/"); /* don't mess too much with *doc */ StrAllocCopy(line, line_url); HTUnEscape(line); /* _file_ (not URL) syntax, for those functions that need it. Don't forget to FREE it. */ - tp = NULL; if (!strncmp(line, "LYNXDIRED://NEW_FILE", 20)) { if (create_file(&line[20]) > 0) LYforce_no_cache = TRUE; @@ -1481,6 +1369,7 @@ PUBLIC int local_dired ARGS1( } else if (!strncmp(line, "LYNXDIRED://INSTALL_SRC", 23)) { local_install(NULL, &line[23], &tp); StrAllocCopy(doc->address, tp); + FREE(tp); FREE(line); return 0; } else if (!strncmp(line, "LYNXDIRED://INSTALL_DEST", 24)) { @@ -1504,6 +1393,7 @@ PUBLIC int local_dired ARGS1( */ StrAllocCopy(doc->address, tp); FREE(line); + FREE(tp); return 0; } else if (!strncmp(line, "LYNXDIRED://PERMIT_LOCATION", 27)) { permit_location(&line_url[27], NULL, &tp); @@ -1526,9 +1416,8 @@ PUBLIC int local_dired ARGS1( if (LYUpload(line_url)) LYforce_no_cache = TRUE; } else { - if (line[(strlen(line) - 1)] == '/') - line[strlen(line)-1] = '\0'; - if ((cp = strrchr(line, '/')) == NULL) { + LYTrimPathSep(line); + if (strrchr(line, '/') == NULL) { FREE(line); return 0; } @@ -1537,137 +1426,140 @@ PUBLIC int local_dired ARGS1( * Construct the appropriate system command taking care to * escape all path references to avoid spoofing the shell. */ - *buffer = '\0'; if (!strncmp(line, "LYNXDIRED://DECOMPRESS", 22)) { - tp = quote_pathname(line + 22); - sprintf(buffer,"%s %s", UNCOMPRESS_PATH, tp); - FREE(tp); +#define FMT_UNCOMPRESS "%s %s" + HTAddParam(&buffer, FMT_UNCOMPRESS, 1, UNCOMPRESS_PATH); + HTAddParam(&buffer, FMT_UNCOMPRESS, 2, line+22); + HTEndParam(&buffer, FMT_UNCOMPRESS, 2); #if defined(OK_UUDECODE) && !defined(ARCHIVE_ONLY) } else if (!strncmp(line, "LYNXDIRED://UUDECODE", 20)) { - tp = quote_pathname(line + 20); - sprintf(buffer,"%s %s", UUDECODE_PATH, tp); - _statusline( - "Warning! UUDecoded file will exist in the directory you started Lynx."); - sleep(AlertSecs); - FREE(tp); +#define FMT_UUDECODE "%s %s" + HTAddParam(&buffer, FMT_UUDECODE, 1, UUDECODE_PATH); + HTAddParam(&buffer, FMT_UUDECODE, 2, line+20); + HTEndParam(&buffer, FMT_UUDECODE, 2); + HTAlert(gettext("Warning! UUDecoded file will exist in the directory you started Lynx.")); #endif /* OK_UUDECODE && !ARCHIVE_ONLY */ #ifdef OK_TAR # ifndef ARCHIVE_ONLY # ifdef OK_GZIP } else if (!strncmp(line, "LYNXDIRED://UNTAR_GZ", 20)) { - tp = quote_pathname(line+20); - *cp++ = '\0'; - cp = quote_pathname(line + 20); - sprintf(buffer, "%s -qdc %s | (cd %s; %s -xf -)", - GZIP_PATH, tp, cp, TAR_PATH); - FREE(cp); - FREE(tp); +#define FMT_UNTAR_GZ "%s -qdc %s | (cd %s; %s -xf -)" + dirname = DirectoryOf(line+20); + HTAddParam(&buffer, FMT_UNTAR_GZ, 1, GZIP_PATH); + HTAddParam(&buffer, FMT_UNTAR_GZ, 2, line+20); + HTAddParam(&buffer, FMT_UNTAR_GZ, 3, dirname); + HTAddParam(&buffer, FMT_UNTAR_GZ, 4, TAR_PATH); + HTEndParam(&buffer, FMT_UNTAR_GZ, 4); # endif /* OK_GZIP */ } else if (!strncmp(line, "LYNXDIRED://UNTAR_Z", 19)) { - tp = quote_pathname(line + 19); - *cp++ = '\0'; - cp = quote_pathname(line + 19); - sprintf(buffer, "%s %s | (cd %s; %s -xf -)", - ZCAT_PATH, tp, cp, TAR_PATH); - FREE(cp); - FREE(tp); +#define FMT_UNTAR_Z "%s %s | (cd %s; %s -xf -)" + dirname = DirectoryOf(line+19); + HTAddParam(&buffer, FMT_UNTAR_Z, 1, ZCAT_PATH); + HTAddParam(&buffer, FMT_UNTAR_Z, 2, line+19); + HTAddParam(&buffer, FMT_UNTAR_Z, 3, dirname); + HTAddParam(&buffer, FMT_UNTAR_Z, 4, TAR_PATH); + HTEndParam(&buffer, FMT_UNTAR_Z, 4); } else if (!strncmp(line, "LYNXDIRED://UNTAR", 17)) { - tp = quote_pathname(line + 17); - *cp++ = '\0'; - cp = quote_pathname(line + 17); - sprintf(buffer, "cd %s; %s -xf %s", cp, TAR_PATH, tp); - FREE(cp); - FREE(tp); +#define FMT_UNTAR "cd %s; %s -xf %s" + dirname = DirectoryOf(line+17); + HTAddParam(&buffer, FMT_UNTAR, 1, dirname); + HTAddParam(&buffer, FMT_UNTAR, 2, TAR_PATH); + HTAddParam(&buffer, FMT_UNTAR, 3, line+17); + HTEndParam(&buffer, FMT_UNTAR, 3); # endif /* !ARCHIVE_ONLY */ # ifdef OK_GZIP } else if (!strncmp(line, "LYNXDIRED://TAR_GZ", 18)) { - *cp++ = '\0'; - cp = quote_pathname(cp); - tp = quote_pathname(line + 18); - sprintf(buffer, "(cd %s; %s -cf - %s) | %s -qc >%s/%s.tar.gz", - tp, TAR_PATH, cp, GZIP_PATH, tp, cp); - FREE(cp); - FREE(tp); +#define FMT_TAR_GZ "(cd %s; %s -cf - %s) | %s -qc >%s/%s.tar.gz" + dirname = DirectoryOf(line+18); + HTAddParam(&buffer, FMT_TAR_GZ, 1, dirname); + HTAddParam(&buffer, FMT_TAR_GZ, 2, TAR_PATH); + HTAddParam(&buffer, FMT_TAR_GZ, 3, LYPathLeaf(line+18)); + HTAddParam(&buffer, FMT_TAR_GZ, 4, GZIP_PATH); + HTAddParam(&buffer, FMT_TAR_GZ, 5, dirname); + HTAddParam(&buffer, FMT_TAR_GZ, 6, LYPathLeaf(line+18)); + HTEndParam(&buffer, FMT_TAR_GZ, 6); # endif /* OK_GZIP */ } else if (!strncmp(line, "LYNXDIRED://TAR_Z", 17)) { - *cp++ = '\0'; - cp = quote_pathname(cp); - tp = quote_pathname(line + 17); - sprintf(buffer, "(cd %s; %s -cf - %s) | %s >%s/%s.tar.Z", - tp, TAR_PATH, cp, COMPRESS_PATH, tp, cp); - FREE(cp); - FREE(tp); +#define FMT_TAR_Z "(cd %s; %s -cf - %s) | %s >%s/%s.tar.Z" + dirname = DirectoryOf(line+17); + HTAddParam(&buffer, FMT_TAR_Z, 1, dirname); + HTAddParam(&buffer, FMT_TAR_Z, 2, TAR_PATH); + HTAddParam(&buffer, FMT_TAR_Z, 3, LYPathLeaf(line+17)); + HTAddParam(&buffer, FMT_TAR_Z, 4, COMPRESS_PATH); + HTAddParam(&buffer, FMT_TAR_Z, 5, dirname); + HTAddParam(&buffer, FMT_TAR_Z, 6, LYPathLeaf(line+17)); + HTEndParam(&buffer, FMT_TAR_Z, 6); } else if (!strncmp(line, "LYNXDIRED://TAR", 15)) { - *cp++ = '\0'; - cp = quote_pathname(cp); - tp = quote_pathname(line + 15); - sprintf(buffer, "(cd %s; %s -cf %s.tar %s)", - tp, TAR_PATH, cp, cp); - FREE(cp); - FREE(tp); +#define FMT_TAR "(cd %s; %s -cf %s.tar %s)" + dirname = DirectoryOf(line+15); + HTAddParam(&buffer, FMT_TAR, 1, dirname); + HTAddParam(&buffer, FMT_TAR, 2, TAR_PATH); + HTAddParam(&buffer, FMT_TAR, 3, LYPathLeaf(line+15)); + HTAddParam(&buffer, FMT_TAR, 4, LYPathLeaf(line+15)); + HTEndParam(&buffer, FMT_TAR, 4); #endif /* OK_TAR */ #ifdef OK_GZIP } else if (!strncmp(line, "LYNXDIRED://GZIP", 16)) { - tp = quote_pathname(line + 16); - sprintf(buffer, "%s -q %s", GZIP_PATH, tp); - FREE(tp); +#define FMT_GZIP "%s -q %s" + HTAddParam(&buffer, FMT_GZIP, 1, GZIP_PATH); + HTAddParam(&buffer, FMT_GZIP, 2, line+16); + HTEndParam(&buffer, FMT_GZIP, 2); #ifndef ARCHIVE_ONLY } else if (!strncmp(line, "LYNXDIRED://UNGZIP", 18)) { - tp = quote_pathname(line + 18); - sprintf(buffer, "%s -d %s", GZIP_PATH, tp); - FREE(tp); +#define FMT_UNGZIP "%s -d %s" + HTAddParam(&buffer, FMT_UNGZIP, 1, GZIP_PATH); + HTAddParam(&buffer, FMT_UNGZIP, 2, line+18); + HTEndParam(&buffer, FMT_UNGZIP, 2); #endif /* !ARCHIVE_ONLY */ #endif /* OK_GZIP */ #ifdef OK_ZIP } else if (!strncmp(line, "LYNXDIRED://ZIP", 15)) { - tp = quote_pathname(line + 15); - *cp++ = '\0'; - bp = quote_pathname(cp); - cp = quote_pathname(line + 15); - sprintf(buffer, "cd %s; %s -rq %s.zip %s", cp, ZIP_PATH, tp, bp); - FREE(cp); - FREE(bp); - FREE(tp); +#define FMT_ZIP "cd %s; %s -rq %s.zip %s" + dirname = DirectoryOf(line+15); + HTAddParam(&buffer, FMT_ZIP, 1, dirname); + HTAddParam(&buffer, FMT_ZIP, 2, ZIP_PATH); + HTAddParam(&buffer, FMT_ZIP, 3, line+15); + HTAddParam(&buffer, FMT_ZIP, 4, LYPathLeaf(line+15)); + HTEndParam(&buffer, FMT_ZIP, 4); #ifndef ARCHIVE_ONLY } else if (!strncmp(line, "LYNXDIRED://UNZIP", 17)) { - tp = quote_pathname(line + 17); - *cp = '\0'; - cp = quote_pathname(line + 17); - sprintf(buffer, "cd %s; %s -q %s", cp, UNZIP_PATH, tp); - FREE(cp); - FREE(tp); +#define FMT_UNZIP "cd %s; %s -q %s" + dirname = DirectoryOf(line+17); + HTAddParam(&buffer, FMT_UNZIP, 1, dirname); + HTAddParam(&buffer, FMT_UNZIP, 2, UNZIP_PATH); + HTAddParam(&buffer, FMT_UNZIP, 3, line+17); + HTEndParam(&buffer, FMT_UNZIP, 3); # endif /* !ARCHIVE_ONLY */ #endif /* OK_ZIP */ } else if (!strncmp(line, "LYNXDIRED://COMPRESS", 20)) { - tp = quote_pathname(line + 20); - sprintf(buffer, "%s %s", COMPRESS_PATH, tp); - FREE(tp); +#define FMT_COMPRESS "%s %s" + HTAddParam(&buffer, FMT_COMPRESS, 1, COMPRESS_PATH); + HTAddParam(&buffer, FMT_COMPRESS, 2, line+20); + HTEndParam(&buffer, FMT_COMPRESS, 2); } - if (strlen(buffer)) { + if (buffer != 0) { if (strlen(buffer) < 60) { - sprintf(tmpbuf, "Executing %s ", buffer); + HTSprintf0(&tmpbuf, gettext("Executing %s "), buffer); } else { - sprintf(tmpbuf, - "Executing system command. This might take a while."); + HTSprintf0(&tmpbuf, + gettext("Executing system command. This might take a while.")); } _statusline(tmpbuf); stop_curses(); printf("%s\n", tmpbuf); - fflush(stdout); - system(buffer); + LYSystem(buffer); #ifdef VMS - extern BOOLEAN HadVMSInterrupt HadVMSInterrupt = FALSE; #endif /* VMS */ start_curses(); @@ -1675,7 +1567,11 @@ PUBLIC int local_dired ARGS1( } } + FREE(dirname); + FREE(tmpbuf); + FREE(buffer); FREE(line); + FREE(tp); LYpop(doc); return 0; } @@ -1687,114 +1583,63 @@ PUBLIC int dired_options ARGS2( document *, doc, char **, newfile) { - static char tempfile[256]; - static BOOLEAN first = TRUE; + static char tempfile[LY_MAXPATH]; char path[512], dir[512]; /* much too large */ - char tmpbuf[LINESIZE]; lynx_html_item_type *nxt; struct stat dir_info; FILE *fp0; char *cp = NULL; - char *dir_url = NULL; /* Will hold URL-escaped path of - directory from where DIRED_MENU was - invoked (NOT its full URL). */ - char *path_url = NULL; /* Will hold URL-escaped path of file - (or directory) which was selected - when DIRED_MENU was invoked (NOT - its full URL). */ + char *dir_url; + char *path_url; BOOLEAN nothing_tagged; int count; struct dired_menu *mp; char buf[2048]; - - if (first) { - /* - * Get an unused tempfile name. - FM - */ - tempname(tempfile, NEW_FILE); + LYRemoveTemp(tempfile); + if ((fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w")) == NULL) { + HTAlert(gettext("Unable to open file management menu file.")); + return(0); } /* - * Open the tempfile for writing and set its - * protection in case this wasn't done via an - * external umask. - FM + * Make the tempfile a URL. */ - if ((fp0 = LYNewTxtFile(tempfile)) == NULL) { - _statusline("Unable to open file management menu file."); - sleep(AlertSecs); - return(0); - } - - if (first) { - /* - * Make the tempfile a URL. - */ - strcpy(LYDiredFileURL, "file://localhost"); - strcat(LYDiredFileURL, tempfile); - first = FALSE; - } - StrAllocCopy(*newfile, LYDiredFileURL); + LYLocalFileToURL(newfile, tempfile); + strcpy(LYDiredFileURL, *newfile); - cp = doc->address; - if (!strncmp(cp, "file://localhost", 16)) { - cp += 16; - } else if (!strncmp(cp, "file:", 5)) { - cp += 5; - } + cp = HTpartURL_toFile(doc->address); strcpy(dir, cp); - StrAllocCopy(dir_url, cp); - if (dir_url[(strlen(dir_url) - 1)] == '/') - dir_url[(strlen(dir_url) - 1)] = '\0'; - HTUnEscape(dir); - if (dir[(strlen(dir) - 1)] == '/') - dir[(strlen(dir) - 1)] = '\0'; + LYTrimPathSep(dir); + FREE(cp); if (doc->link > -1 && doc->link < (nlinks+1)) { - cp = links[doc->link].lname; - if (!strncmp(cp, "file://localhost", 16)) { - cp += 16; - } else if (!strncmp(cp, "file:", 5)) { - cp += 5; - } + cp = HTfullURL_toFile(links[doc->link].lname); strcpy(path, cp); - StrAllocCopy(path_url, cp); - if (*path_url && path_url[1] && path_url[(strlen(path_url) - 1)] == '/') - path_url[(strlen(path_url) - 1)] = '\0'; - HTUnEscape(path); - if (*path && path[1] && path[(strlen(path) - 1)] == '/') - path[(strlen(path) - 1)] = '\0'; - - if (lstat(path, &dir_info) == -1 && stat(path, &dir_info) == -1) { - sprintf(tmpbuf, "Unable to get status of '%s'.", path); - _statusline(tmpbuf); - sleep(AlertSecs); - FREE(dir_url); - FREE(path_url); + LYTrimPathSep(path); + FREE(cp); + + if (!ok_lstat(path, &dir_info)) { + LYCloseTempFP(fp0); return 0; } } else { path[0] = '\0'; - StrAllocCopy(path_url, path); } nothing_tagged = (HTList_isEmpty(tagged)); - fprintf(fp0, - "\n%s\n\n", DIRED_MENU_TITLE); - - fprintf(fp0, - "\n

                File Management Options (%s Version %s)

                ", - LYNX_NAME, LYNX_VERSION); + BeginInternalPage(fp0, DIRED_MENU_TITLE, DIRED_MENU_HELP); - fprintf(fp0, "Current directory is %s
                \n", dir); + fprintf(fp0, "%s %s
                \n", gettext("Current directory:"), dir); if (nothing_tagged) { + fprintf(fp0, "%s ", gettext("Current selection:")); if (strlen(path)) { - fprintf(fp0, "Current selection is %s

                \n", path); + fprintf(fp0, "%s

                \n", path); } else { - fprintf(fp0, "Nothing currently selected.

                \n"); + fprintf(fp0, "%s.

                \n", gettext("Nothing currently selected.")); } } else { /* @@ -1807,19 +1652,19 @@ PUBLIC int dired_options ARGS2( char *cd = NULL; int i, m; #define NUM_TAGS_TO_WRITE 10 - fprintf(fp0, "Current selection is %d tagged item%s", - n, ((n == 1) ? ":" : "s:")); + fprintf(fp0, "%s %d %s", + gettext("Current selection:"), + n, ((n == 1) ? gettext("tagged item:") : gettext("tagged items:"))); StrAllocCopy(cd, doc->address); HTUnEscapeSome(cd, "/"); - if (*cd && cd[(strlen(cd) - 1)] != '/') - StrAllocCat(cd, "/"); + LYAddHtmlSep(&cd); m = (n < NUM_TAGS_TO_WRITE) ? n : NUM_TAGS_TO_WRITE; for (i = 1; i <= m; i++) { cp1 = HTRelative(HTList_objectAt(tagged, i-1), (*cd ? cd : "file://localhost")); HTUnEscape(cp1); LYEntify(&cp1, TRUE); /* _should_ do this everywhere... */ - fprintf(fp0, "%s
                \n    %s", + fprintf(fp0, "%s
                \n   %s", (i == 1 ? "" : " ,"), cp1); FREE(cp1); } @@ -1846,26 +1691,30 @@ PUBLIC int dired_options ARGS2( if (mp->cond == DE_TAG && nothing_tagged) continue; if (mp->cond == DE_DIR && - (!*path || (dir_info.st_mode & S_IFMT) != S_IFDIR)) + (!*path || !S_ISDIR(dir_info.st_mode))) continue; if (mp->cond == DE_FILE && - (!*path || (dir_info.st_mode & S_IFMT) != S_IFREG)) + (!*path || !S_ISREG(dir_info.st_mode))) continue; #ifdef S_IFLNK if (mp->cond == DE_SYMLINK && - (!*path || (dir_info.st_mode & S_IFMT) != S_IFLNK)) + (!*path || !S_ISLNK(dir_info.st_mode))) continue; #endif if (*mp->sfx && (strlen(path) < strlen(mp->sfx) || strcmp(mp->sfx, &path[(strlen(path) - strlen(mp->sfx))]) != 0)) continue; + dir_url = HTEscape(dir, URL_PATH); + path_url = HTEscape(path, URL_PATH); fprintf(fp0, "
                href, path_url, dir_url, buf,2048, YES)); + render_item(mp->href, path_url, dir_url, buf,sizeof(buf), YES)); fprintf(fp0, "\">%s ", - render_item(mp->link, path, dir, buf,2048, NO)); + render_item(mp->link, path, dir, buf,sizeof(buf), NO)); fprintf(fp0, "%s
                \n", - render_item(mp->rest, path, dir, buf,2048, NO)); + render_item(mp->rest, path, dir, buf,sizeof(buf), NO)); + FREE(dir_url); + FREE(path_url); } if (uploaders != NULL) { @@ -1879,11 +1728,8 @@ PUBLIC int dired_options ARGS2( } } - fprintf(fp0, "\n"); - fclose(fp0); - - FREE(dir_url); - FREE(path_url); + EndInternalPage(fp0); + LYCloseTempFP(fp0); LYforce_no_cache = TRUE; @@ -1893,10 +1739,10 @@ PUBLIC int dired_options ARGS2( /* * Check DIRED filename. */ -PRIVATE char *filename ARGS3( +PRIVATE char *get_filename ARGS3( char *, prompt, char *, buf, - size_t, bufsize) + size_t, bufsize) { char *cp; @@ -1905,8 +1751,7 @@ PRIVATE char *filename ARGS3( *buf = '\0'; LYgetstr(buf, VISIBLE, bufsize, NORECALL); if (strstr(buf, "../") != NULL) { - _statusline("Illegal filename; request ignored."); - sleep(AlertSecs); + HTAlert(gettext("Illegal filename; request ignored.")); return NULL; } @@ -1917,8 +1762,7 @@ PRIVATE char *filename ARGS3( else cp = buf; if (*cp == '.') { - _statusline("Illegal filename; request ignored."); - sleep(AlertSecs); + HTAlert(gettext("Illegal filename; request ignored.")); return NULL; } } @@ -1933,9 +1777,8 @@ PUBLIC BOOLEAN local_install ARGS3( char *, srcpath, char **, newpath) { - char tmpbuf[512]; - static char savepath[512]; /* This will be the link that - is to be installed. */ + char *tmpbuf = NULL; + char savepath[512]; /* This will be the link that is to be installed. */ struct stat dir_info; char *args[6]; HTList *tag; @@ -1946,49 +1789,28 @@ PUBLIC BOOLEAN local_install ARGS3( * Determine the status of the selected item. */ if (srcpath) { - srcpath = strip_trailing_slash(srcpath); - if (strncmp(srcpath, "file://localhost", 16) == 0) - srcpath += 16; - if (stat(srcpath, &dir_info) == -1) { - sprintf(tmpbuf, "Unable to get status of '%s'.", srcpath); - _statusline(tmpbuf); - sleep(AlertSecs); - return 0; - } else if ((dir_info.st_mode & S_IFMT) != S_IFDIR && - (dir_info.st_mode & S_IFMT) != S_IFREG) { - _statusline( - "The selected item is not a file or a directory! Request ignored."); - sleep(AlertSecs); + if (!ok_localname(savepath, srcpath)) return 0; - } - strcpy(savepath, srcpath); + LYforce_no_cache = TRUE; - strcpy(tmpbuf, "file://localhost"); - strcat(tmpbuf, Home_Dir()); - strcat(tmpbuf, "/.installdirs.html"); - StrAllocCopy(*newpath, tmpbuf); + LYLocalFileToURL(newpath, Home_Dir()); + StrAllocCat(*newpath, "/.installdirs.html"); return 0; } destpath = strip_trailing_slash(destpath); - if (stat(destpath,&dir_info) == -1) { - sprintf(tmpbuf,"Unable to get status of '%s'.",destpath); - _statusline(tmpbuf); - sleep(AlertSecs); + if (!ok_stat(destpath, &dir_info)) { return 0; - } else if ((dir_info.st_mode & S_IFMT) != S_IFDIR) { - _statusline( - "The selected item is not a directory! Request ignored."); - sleep(AlertSecs); + } else if (!S_ISDIR(dir_info.st_mode)) { + HTAlert(gettext("The selected item is not a directory! Request ignored.")); return 0; - } else if (0 /*directory not writeable*/) { - _statusline("Install in the selected directory not permitted."); - sleep(AlertSecs); + } else if (0 /*directory not writable*/) { + HTAlert(gettext("Install in the selected directory not permitted.")); return 0; } - statusline("Just a moment, ..."); + statusline(gettext("Just a moment, ...")); args[n++] = "install"; #ifdef INSTALL_ARGS args[n++] = INSTALL_ARGS; @@ -1996,7 +1818,7 @@ PUBLIC BOOLEAN local_install ARGS3( src = n++; args[n++] = destpath; args[n] = (char *)0; - sprintf(tmpbuf, "install %s", destpath); + HTSprintf(&tmpbuf, "install %s", destpath); tag = tagged; if (HTList_isEmpty(tagged)) { @@ -2007,18 +1829,18 @@ PUBLIC BOOLEAN local_install ARGS3( } else { char *name; while ((name = (char *)HTList_nextObject(tag))) { - args[src] = name; - if (strncmp("file://localhost", args[src], 16) == 0) - args[src] = (name + 16); - - if (LYExecv(INSTALL_PATH, args, tmpbuf) <= 0) + int err; + args[src] = HTfullURL_toFile(name); + err = (LYExecv(INSTALL_PATH, args, tmpbuf) <= 0); + FREE(args[src]); + if (err) return ((count == 0) ? -1 : count); count++; } clear_tags(); } - statusline("Installation complete"); - sleep(InfoSecs); + FREE(tmpbuf); + HTInfoMsg(gettext("Installation complete")); return count; } @@ -2053,6 +1875,8 @@ PUBLIC void add_menu_item ARGS1( menu_head = NULL; new = (struct dired_menu *)calloc(1, sizeof(*new)); + if (new == NULL) + outofmem(__FILE__, "add_menu_item"); /* * Conditional on tagged != NULL ? @@ -2101,7 +1925,7 @@ PUBLIC void add_menu_item ARGS1( * Create URL for DIRED HREF value. */ PRIVATE char * render_item ARGS6( - char *, s, + CONST char *, s, char *, path, char *, dir, char *, buf, @@ -2122,25 +1946,18 @@ PRIVATE char * render_item ARGS6( switch (*s) { case '%': *BP_INC = '%'; -#ifdef NOTDEFINED - /* - * These chars come from lynx.cfg or the default, let's - * just assume there won't be any improper %'s there that - * would need escaping. - */ - if(url_syntax) { - *BP_INC = '2'; - *BP_INC = '5'; - } -#endif /* NOTDEFINED */ break; case 'p': cp = path; + if (!LYIsHtmlSep(*cp)) + *BP_INC = '/'; while (*cp) *BP_INC = *cp++; break; case 'd': cp = dir; + if (!LYIsHtmlSep(*cp)) + *BP_INC = '/'; while (*cp) *BP_INC = *cp++; break; @@ -2179,19 +1996,13 @@ PRIVATE char * render_item ARGS6( break; default: *BP_INC = '%'; -#ifdef NOTDEFINED - if (url_syntax) { - *BP_INC = '2'; - *BP_INC = '5'; - } -#endif /* NOTDEFINED */ *BP_INC =*s; break; } } else { /* * Other chars come from the lynx.cfg or - * the default. Let's assume there isn't + * the default. Let's assume there isn't * anything weird there that needs escaping. */ *BP_INC =*s; @@ -2199,9 +2010,8 @@ PRIVATE char * render_item ARGS6( s++; } if (overrun & url_syntax) { - sprintf(buf,"Temporary URL or list would be too long."); - _statusline(buf); - sleep(AlertSecs); + strcpy(buf,gettext("Temporary URL or list would be too long.")); + HTAlert(buf); bp = buf; /* set to start, will return empty string as URL */ } *bp = '\0'; @@ -2218,31 +2028,39 @@ PRIVATE int LYExecv ARGS3( char *, msg) { #if defined(VMS) || defined(_WINDOWS) - if (TRACE) { - fprintf(stderr, "LYExecv: Called inappropriately!\n"); - } + CTRACE(tfp, "LYExecv: Called inappropriately!\n"); return(0); #else int rc; - char tmpbuf[512]; + char *tmpbuf = 0; pid_t pid; -#if HAVE_TYPE_UNIONWAIT +#ifdef HAVE_TYPE_UNIONWAIT union wait wstatus; #else int wstatus; #endif + if (TRACE) { + int n; + CTRACE(tfp, "LYExecv path='%s'\n", path); + for (n = 0; argv[n] != 0; n++) + CTRACE(tfp, "argv[%d] = '%s'\n", n, argv[n]); + } + rc = 1; /* It will work */ - tmpbuf[0] = '\0'; /* empty buffer for alert messages */ stop_curses(); pid = fork(); /* fork and execute rm */ switch (pid) { case -1: - sprintf(tmpbuf, "Unable to %s due to system error!", msg); + HTSprintf(&tmpbuf, gettext("Unable to %s due to system error!"), msg); rc = 0; break; /* don't fall thru! - KW */ case 0: /* child */ +#ifdef USE_EXECVP + execvp(path, argv); /* this uses our $PATH */ +#else execv(path, argv); +#endif exit(-1); /* execv failed, give wait() something to look at */ default: /* parent */ #if !HAVE_WAITPID @@ -2263,8 +2081,8 @@ PRIVATE int LYExecv ARGS3( #endif /* !HAVE_WAITPID */ if (WEXITSTATUS(wstatus) != 0 || WTERMSIG(wstatus) > 0) { /* error return */ - sprintf(tmpbuf, "Probable failure to %s due to system error!", - msg); + HTSprintf(&tmpbuf, gettext("Probable failure to %s due to system error!"), + msg); rc = 0; } } @@ -2277,9 +2095,9 @@ PRIVATE int LYExecv ARGS3( sleep(AlertSecs); } start_curses(); - if (tmpbuf[0]) { - _statusline(tmpbuf); - sleep(AlertSecs); + if (tmpbuf != 0) { + HTAlert(tmpbuf); + FREE(tmpbuf); } return(rc); diff --git a/gnu/usr.bin/lynx/src/LYLocal.h b/gnu/usr.bin/lynx/src/LYLocal.h index 47fff5c01cf..029718d1360 100644 --- a/gnu/usr.bin/lynx/src/LYLocal.h +++ b/gnu/usr.bin/lynx/src/LYLocal.h @@ -6,11 +6,6 @@ #ifdef VMS #include #include -#else -#if 0 /* already included in tcp.h */ -#include -#include -#endif #endif /* VMS */ #ifndef S_IRWXU @@ -65,9 +60,6 @@ extern void showtags PARAMS((HTList *tag)); extern int local_dired PARAMS((document *doc)); extern int dired_options PARAMS ((document *doc, char ** newfile)); -#define DIRED_MENU_TITLE "File Management Options" -#define PERMIT_OPTIONS_TITLE "File Permission Options" - extern void add_menu_item PARAMS((char *str)); #endif /* DIRED_SUPPORT */ diff --git a/gnu/usr.bin/lynx/src/LYMail.c b/gnu/usr.bin/lynx/src/LYMail.c index e7e79b866ba..d4d6a8123a5 100644 --- a/gnu/usr.bin/lynx/src/LYMail.c +++ b/gnu/usr.bin/lynx/src/LYMail.c @@ -1,34 +1,62 @@ -#include "HTUtils.h" -#include "tcp.h" -#include "HTParse.h" -#include "LYGlobalDefs.h" -#include "HTAlert.h" -#include "LYCurses.h" -#include "LYSignal.h" -#include "LYUtils.h" -#include "LYClean.h" -#include "LYStrings.h" -#include "GridText.h" -#include "LYSystem.h" -#include "LYMail.h" -#include "LYCharSets.h" /* to get current charset for mail header */ - -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} +/* + * This file checked for sprintf() buffer overruns on 1998/05/06 by Bela + * Lubkin . Please don't introduce any new ones... + * + * See comments marked "- BL" for two still-possible overruns in the VMS + * code. + * + * Not yet checked for any other sort of buffer overrun. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* to get current charset for mail header */ + +#include BOOLEAN term_letter; /* Global variable for async i/o. */ PRIVATE void terminate_letter PARAMS((int sig)); PRIVATE void remove_tildes PARAMS((char *string)); +/* HTUnEscape with control-code nuking */ +PRIVATE void SafeHTUnEscape ARGS1( + char *, string) +{ + int i; + int flg = FALSE; + + HTUnEscape(string); + for (i=0; string[i] != '\0'; i++) + { + /* FIXME: this is no longer explicitly 7-bit ASCII, + but are there portability problems? */ + if ((!LYIsASCII(string[i])) || !isprint(string[i])) + { + string[i] = '?'; + flg = TRUE; + } + } + if (flg) + HTAlert(MAILTO_SQUASH_CTL); +} + /* ** mailform() sends form content to the mailto address(es). - FM */ PUBLIC void mailform ARGS4( - char *, mailto_address, - char *, mailto_subject, - char *, mailto_content, - char *, mailto_type) + CONST char *, mailto_address, + CONST char *, mailto_subject, + CONST char *, mailto_content, + CONST char *, mailto_type) { FILE *fd; char *address = NULL; @@ -41,12 +69,14 @@ PUBLIC void mailform ARGS4( char cmd[512]; int len, i, ch; #if defined(VMS) || defined(DOSPATH) - char my_tmpfile[256]; - char *address_ptr1, *address_ptr2; + char my_tmpfile[LY_MAXPATH]; char *command = NULL; +#ifdef VMS + char *address_ptr1, *address_ptr2; BOOLEAN first = TRUE; +#endif BOOLEAN isPMDF = FALSE; - char hdrfile[256]; + char hdrfile[LY_MAXPATH]; FILE *hfd; if (!strncasecomp(system_mail, "PMDF SEND", 9)) { @@ -88,7 +118,7 @@ PUBLIC void mailform ARGS4( *cp1 = '\0'; } if (*cp) { - HTUnEscape(subject); + SafeHTUnEscape(subject); LYstrncpy(subject, cp, 70); } if (cp1) { @@ -195,7 +225,7 @@ PUBLIC void mailform ARGS4( } if (keywords != NULL) { if (*keywords != '\0') { - HTUnEscape(keywords); + SafeHTUnEscape(keywords); } else { FREE(keywords); } @@ -248,9 +278,9 @@ PUBLIC void mailform ARGS4( /* * Unescape the address and ccaddr fields. - FM */ - HTUnEscape(address); + SafeHTUnEscape(address); if (ccaddr != NULL) { - HTUnEscape(ccaddr); + SafeHTUnEscape(ccaddr); } /* @@ -269,8 +299,7 @@ PUBLIC void mailform ARGS4( /* * User cancelled via ^G. - FM */ - _statusline(FORM_MAILTO_CANCELLED); - sleep(InfoSecs); + HTInfoMsg(FORM_MAILTO_CANCELLED); FREE(address); FREE(ccaddr); FREE(keywords); @@ -290,8 +319,7 @@ PUBLIC void mailform ARGS4( /* * User cancelled via ^G. - FM */ - _statusline(FORM_MAILTO_CANCELLED); - sleep(InfoSecs); + HTInfoMsg(FORM_MAILTO_CANCELLED); FREE(address); FREE(ccaddr); FREE(keywords); @@ -307,14 +335,7 @@ PUBLIC void mailform ARGS4( } #if defined(VMS) || defined(DOSPATH) - tempname(my_tmpfile, NEW_FILE); - if (((cp = strrchr(my_tmpfile, '.')) != NULL) && - NULL == strchr(cp, ']') && - NULL == strchr(cp, '/')) { - *cp = '\0'; - strcat(my_tmpfile, ".txt"); - } - if ((fd = LYNewTxtFile(my_tmpfile)) == NULL) { + if ((fd = LYOpenTemp(my_tmpfile, ".txt", "w")) == NULL) { HTAlert(FORM_MAILTO_FAILED); FREE(address); FREE(ccaddr); @@ -322,15 +343,9 @@ PUBLIC void mailform ARGS4( return; } if (isPMDF) { - tempname(hdrfile, NEW_FILE); - if (((cp = strrchr(hdrfile, '.')) != NULL) && - NULL == strchr(cp, ']') && - NULL == strchr(cp, '/')) { - *cp = '\0'; - strcat(hdrfile, ".txt"); - } - if ((hfd = LYNewTxtFile(hdrfile)) == NULL) { + if ((hfd = LYOpenTemp(hdrfile, ".txt", "w")) == NULL) { HTAlert(FORM_MAILTO_FAILED); + LYCloseTempFP(fd); FREE(address); FREE(ccaddr); FREE(keywords); @@ -402,33 +417,33 @@ PUBLIC void mailform ARGS4( i = 0; len = strlen(mailto_content); while (len > 78) { - strncpy(cmd, (char *)&mailto_content[i], 78); + strncpy(cmd, &mailto_content[i], 78); cmd[78] = '\0'; fprintf(fd, "%s\n", cmd); i += 78; - len = strlen((char *)&mailto_content[i]); + len = strlen(&mailto_content[i]); } - fprintf(fd, "%s\n", (char *)&mailto_content[i]); + fprintf(fd, "%s\n", &mailto_content[i]); mailto_content = (cp+1); } i = 0; len = strlen(mailto_content); while (len > 78) { - strncpy(cmd, (char *)&mailto_content[i], 78); + strncpy(cmd, &mailto_content[i], 78); cmd[78] = '\0'; fprintf(fd, "%s\n", cmd); i += 78; - len = strlen((char *)&mailto_content[i]); + len = strlen(&mailto_content[i]); } if (len) - fprintf(fd, "%s\n", (char *)&mailto_content[i]); + fprintf(fd, "%s\n", &mailto_content[i]); #ifdef UNIX pclose(fd); sleep(MessageSecs); #endif /* UNIX */ #if defined(VMS) || defined(DOSPATH) - fclose(fd); + LYCloseTempFP(fd); #ifdef VMS /* * Set the mail command. - FM @@ -442,7 +457,7 @@ PUBLIC void mailform ARGS4( fprintf(hfd, "Keywords: %s\n", keywords); } fprintf(hfd, "Subject: %s\n\n", subject); - fclose(hfd); + LYCloseTempFP(hfd); /* * Now set up the command. - FM */ @@ -458,6 +473,8 @@ PUBLIC void mailform ARGS4( * command, and ignore any keywords to minimize risk * of them making the line too long or having problem * characters. - FM + * + * Possibly still a problem if user supplies long subject. - BL */ sprintf(cmd, "%s %s%s/subject=\"%s\" %s ", @@ -485,8 +502,12 @@ PUBLIC void mailform ARGS4( * 4 letters is arbitrarily the smallest possible mail * address, at least for lynx. That way extra spaces * won't confuse the mailer and give a blank address. + * + * ignore addresses so long that they would overflow the + * temporary buffer (i.e., about 500 chars). - BL */ - if (strlen(address_ptr1) > 3) { + if (strlen(address_ptr1) > 3 && + strlen(address_ptr1) + strlen(mail_adrs) < sizeof(cmd)) { if (!first) { StrAllocCat(command, ","); } @@ -514,8 +535,12 @@ PUBLIC void mailform ARGS4( * 4 letters is arbitrarily the smallest possible mail * address, at least for lynx. That way extra spaces * won't confuse the mailer and give a blank address. + * + * ignore addresses so long that they would overflow the + * temporary buffer (i.e., about 500 chars). - BL */ - if (strlen(address_ptr1) > 3) { + if (strlen(address_ptr1) > 3 && + strlen(address_ptr1) + strlen(mail_adrs) < sizeof(cmd)) { StrAllocCat(command, ","); sprintf(cmd, mail_adrs, address_ptr1); if (isPMDF) { @@ -528,21 +553,26 @@ PUBLIC void mailform ARGS4( } stop_curses(); - printf("Sending form content:\n\n$ %s\n\nPlease wait...", command); - system(command); + printf("%s\n\n$ %s\n\n%s", SENDING_FORM_CONTENT, command, PLEASE_WAIT); + LYSystem(command); FREE(command); sleep(AlertSecs); start_curses(); - remove(my_tmpfile); - remove(hdrfile); + LYRemoveTemp(my_tmpfile); + LYRemoveTemp(hdrfile); #else /* DOSPATH */ - sprintf(cmd, "%s -t \"%s\" -F %s", system_mail, address, my_tmpfile); + StrAllocCopy(command, system_mail); + StrAllocCat(command, " -t \""); + StrAllocCat(command, address); + StrAllocCat(command, "\" -F "); + StrAllocCat(command, my_tmpfile); stop_curses(); - printf("Sending form content:\n\n$ %s\n\nPlease wait...", cmd); - system(cmd); + printf("%s\n\n$ %s\n\n%s", SENDING_FORM_CONTENT, command, PLEASE_WAIT); + LYSystem(command); + FREE(command); sleep(MessageSecs); start_curses(); - remove(my_tmpfile); + LYRemoveTemp(my_tmpfile); #endif #endif /* VMS */ @@ -565,16 +595,23 @@ PUBLIC void mailmsg ARGS4( FILE *fd, *fp; char *address = NULL; char *searchpart = NULL; - char cmd[512], *cp, *cp0, *cp1; + char *cmd = NULL, *cp, *cp0, *cp1; #if defined(VMS) || defined(DOSPATH) - char my_tmpfile[256]; - char *address_ptr1, *address_ptr2; + char my_tmpfile[LY_MAXPATH]; char *command = NULL; +#ifdef VMS + char *address_ptr1, *address_ptr2; BOOLEAN first = TRUE; +#endif BOOLEAN isPMDF = FALSE; - char hdrfile[256]; + char hdrfile[LY_MAXPATH]; FILE *hfd; + CTRACE(tfp, "mailmsg(%d, \"%s\", \"%s\", \"%s\")\n", cur, + owner_address?owner_address:"", + filename?filename:"", + linkname?linkname:""); + if (!strncasecomp(system_mail, "PMDF SEND", 9)) { isPMDF = TRUE; } @@ -646,28 +683,22 @@ PUBLIC void mailmsg ARGS4( /* * Unescape the address field. - FM */ - HTUnEscape(address); + SafeHTUnEscape(address); if (address[(strlen(address) - 1)] == ',') address[(strlen(address) - 1)] = '\0'; if (*address == '\0') { FREE(address); - if (TRACE) { - fprintf(stderr, - "mailmsg: No address in '%s'.\n", + CTRACE(tfp, "mailmsg: No address in '%s'.\n", owner_address); - } return; } #ifdef UNIX - sprintf(cmd, "%s %s", system_mail, system_mail_flags); + HTSprintf0(&cmd, "%s %s", system_mail, system_mail_flags); if ((fd = popen(cmd, "w")) == NULL) { FREE(address); - if (TRACE) { - fprintf(stderr, - "mailmsg: '%s' failed.\n", + CTRACE(tfp, "mailmsg: '%s' failed.\n", cmd); - } return; } @@ -680,36 +711,16 @@ PUBLIC void mailmsg ARGS4( fprintf(fd, "X-Mailer: Lynx, Version %s\n\n", LYNX_VERSION); #endif /* UNIX */ #if defined(VMS) || defined(DOSPATH) - tempname(my_tmpfile, NEW_FILE); - if (((cp = strrchr(my_tmpfile, '.')) != NULL) && - NULL == strchr(cp, ']') && - NULL == strchr(cp, '/')) { - *cp = '\0'; - strcat(my_tmpfile, ".txt"); - } - if ((fd = LYNewTxtFile(my_tmpfile)) == NULL) { - if (TRACE) { - fprintf(stderr, - "mailmsg: Could not fopen '%s'.\n", + if ((fd = LYOpenTemp(my_tmpfile, ".txt", "w")) == NULL) { + CTRACE(tfp, "mailmsg: Could not fopen '%s'.\n", my_tmpfile); - } FREE(address); return; } if (isPMDF) { - tempname(hdrfile, NEW_FILE); - if (((cp = strrchr(hdrfile, '.')) != NULL) && - NULL == strchr(cp, ']') && - NULL == strchr(cp, '/')) { - *cp = '\0'; - strcat(hdrfile, ".txt"); - } - if ((hfd = LYNewTxtFile(hdrfile)) == NULL) { - if (TRACE) { - fprintf(stderr, - "mailmsg: Could not fopen '%s'.\n", + if ((hfd = LYOpenTemp(hdrfile, ".txt", "w")) == NULL) { + CTRACE(tfp, "mailmsg: Could not fopen '%s'.\n", hdrfile); - } FREE(address); return; } @@ -722,20 +733,19 @@ PUBLIC void mailmsg ARGS4( } #endif /* VMS */ - fprintf(fd, "The link %s :?: %s \n", + fprintf(fd, gettext("The link %s :?: %s \n"), links[cur].lname, links[cur].target); - fprintf(fd, "called \"%s\"\n", links[cur].hightext); - fprintf(fd, "in the file \"%s\" called \"%s\"", filename, linkname); + fprintf(fd, gettext("called \"%s\"\n"), links[cur].hightext); + fprintf(fd, gettext("in the file \"%s\" called \"%s\"\n"), filename, linkname); + fprintf(fd, "%s\n\n", gettext("was requested but was not available.")); + fprintf(fd, "%s\n\n", gettext("Thought you might want to know.")); - fputs("\nwas requested but was not available.", fd); - fputs("\n\nThought you might want to know.", fd); - - fputs("\n\nThis message was automatically generated by\n", fd); - fprintf(fd, "Lynx ver. %s", LYNX_VERSION); + fprintf(fd, "%s\n", gettext("This message was automatically generated by")); + fprintf(fd, gettext("Lynx ver. %s"), LYNX_VERSION); if ((LynxSigFile != NULL) && (fp = fopen(LynxSigFile, "r")) != NULL) { fputs("-- \n", fd); - while (fgets(cmd, sizeof(cmd), fp) != NULL) + while (LYSafeGets(&cmd, fp) != NULL) fputs(cmd, fd); fclose(fp); } @@ -743,7 +753,7 @@ PUBLIC void mailmsg ARGS4( pclose(fd); #endif /* UNIX */ #if defined(VMS) || defined(DOSPATH) - fclose(fd); + LYCloseTempFP(fd); #ifdef VMS if (isPMDF) { /* @@ -751,11 +761,11 @@ PUBLIC void mailmsg ARGS4( * header file and close it. - FM */ fprintf(hfd, "Subject: Lynx Error in %.56s\n\n", filename); - fclose(hfd); + LYCloseTempFP(hfd); /* * Now set up the command. - FM */ - sprintf(cmd, + HTSprintf0(&command, "%s %s %s,%s ", system_mail, system_mail_flags, @@ -766,14 +776,13 @@ PUBLIC void mailmsg ARGS4( * For "generic" VMS MAIL, include the * subject in the command. - FM */ - sprintf(cmd, + HTSprintf0(&command, "%s %s/self/subject=\"Lynx Error in %.56s\" %s ", system_mail, system_mail_flags, filename, my_tmpfile); } - StrAllocCopy(command, cmd); address_ptr1 = address; do { if ((cp = strchr(address_ptr1, ',')) != NULL) { @@ -782,27 +791,39 @@ PUBLIC void mailmsg ARGS4( } else address_ptr2 = NULL; - if (strlen(address) > 3) { - if (!first) { - StrAllocCat(command, ","); - } - sprintf(cmd, mail_adrs, address_ptr1); - StrAllocCat(command, cmd); - first = FALSE; + /* + * 4 letters is arbitrarily the smallest possible mail + * address, at least for lynx. That way extra spaces + * won't confuse the mailer and give a blank address. + * + * ignore addresses so long that they would overflow the + * temporary buffer (i.e., about 500 chars). - BL + */ + if (!first) { + StrAllocCat(command, ","); } + HTSprintf0(&cmd, mail_adrs, address_ptr1); + StrAllocCat(command, cmd); + first = FALSE; address_ptr1 = address_ptr2; } while (address_ptr1 != NULL); - system(command); + LYSystem(command); FREE(command); - remove(my_tmpfile); + FREE(cmd); + LYRemoveTemp(my_tmpfile); if (isPMDF) { - remove(hdrfile); + LYRemoveTemp(hdrfile); } #else /* DOSPATH */ - sprintf(cmd, "%s -t \"%s\" -F %s", system_mail, address, my_tmpfile); - system(cmd); - remove(my_tmpfile); + StrAllocCopy(command, system_mail); + StrAllocCat(command, " -t \""); + StrAllocCat(command, address); + StrAllocCat(command, "\" -F "); + StrAllocCat(command, my_tmpfile); + LYSystem(command); + FREE(command); + LYRemoveTemp(my_tmpfile); #endif #endif /* VMS */ @@ -812,18 +833,7 @@ PUBLIC void mailmsg ARGS4( if ((ofp = LYAppendToTxtFile(TRAVERSE_ERRORS)) == NULL) { if ((ofp = LYNewTxtFile(TRAVERSE_ERRORS)) == NULL) { perror(NOOPEN_TRAV_ERR_FILE); -#ifndef NOSIGHUP - (void) signal(SIGHUP, SIG_DFL); -#endif /* NOSIGHUP */ - (void) signal(SIGTERM, SIG_DFL); -#ifndef VMS - (void) signal(SIGINT, SIG_DFL); -#endif /* !VMS */ -#ifdef SIGTSTP - if (no_suspend) - (void) signal(SIGTSTP,SIG_DFL); -#endif /* SIGTSTP */ - exit(-1); + exit_immediately(-1); } } @@ -840,10 +850,11 @@ PUBLIC void mailmsg ARGS4( ** reply_by_mail() invokes sendmail on Unix or mail on VMS to send ** a comment from the users to the owner */ -PUBLIC void reply_by_mail ARGS3( +PUBLIC void reply_by_mail ARGS4( char *, mail_address, char *, filename, - CONST char *, title) + CONST char *, title, + CONST char *, refid) { char user_input[1000]; FILE *fd, *fp; @@ -856,18 +867,22 @@ PUBLIC void reply_by_mail ARGS3( char *temp = NULL; int i, len; int c = 0; /* user input */ - char my_tmpfile[256], cmd[512]; + char my_tmpfile[LY_MAXPATH], cmd[512]; #ifdef DOSPATH - char tmpfile2[256]; + char tmpfile2[LY_MAXPATH]; +#endif +#if defined(DOSPATH) || defined(VMS) + char *command = NULL; #endif +#ifndef NO_ANONYMOUS_EMAIL static char *personal_name = NULL; +#endif char subject[80]; #ifdef VMS char *address_ptr1 = NULL, *address_ptr2 = NULL; - char *command = NULL; BOOLEAN first = TRUE; BOOLEAN isPMDF = FALSE; - char hdrfile[256]; + char hdrfile[LY_MAXPATH]; FILE *hfd; if (!strncasecomp(system_mail, "PMDF SEND", 9)) { @@ -879,6 +894,12 @@ PUBLIC void reply_by_mail ARGS3( int n; #endif /* VMS */ + CTRACE(tfp, "reply_by_mail(\"%s\", \"%s\", \"%s\", \"%s\")\n", + mail_address?mail_address:"", + filename?filename:"", + title?title:"", + refid?refid:""); + term_letter = FALSE; if (mail_address && *mail_address) { @@ -888,29 +909,13 @@ PUBLIC void reply_by_mail ARGS3( return; } - tempname(my_tmpfile, NEW_FILE); - if (((cp = strrchr(my_tmpfile, '.')) != NULL) && -#ifdef VMS - NULL == strchr(cp, ']') && -#endif /* VMS */ - NULL == strchr(cp, '/')) { - *cp = '\0'; - strcat(my_tmpfile, ".txt"); - } - if ((fd = LYNewTxtFile(my_tmpfile)) == NULL) { + if ((fd = LYOpenTemp(my_tmpfile, ".txt", "w")) == NULL) { HTAlert(MAILTO_URL_TEMPOPEN_FAILED); return; } #ifdef VMS if (isPMDF) { - tempname(hdrfile, NEW_FILE); - if (((cp = strrchr(hdrfile, '.')) != NULL) && - NULL == strchr(cp, ']') && - NULL == strchr(cp, '/')) { - *cp = '\0'; - strcat(hdrfile, ".txt"); - } - if ((hfd = LYNewTxtFile(hdrfile)) == NULL) { + if ((hfd = LYOpenTemp(hdrfile, ".txt", "w")) == NULL) { HTAlert(MAILTO_URL_TEMPOPEN_FAILED); return; } @@ -943,7 +948,7 @@ PUBLIC void reply_by_mail ARGS3( if (*cp) { strncpy(subject, cp, 70); subject[70] = '\0'; - HTUnEscape(subject); + SafeHTUnEscape(subject); } if (cp1) { *cp1 = '&'; @@ -1050,7 +1055,7 @@ PUBLIC void reply_by_mail ARGS3( } if (keywords != NULL) { if (*keywords != '\0') { - HTUnEscape(keywords); + SafeHTUnEscape(keywords); } else { FREE(keywords); } @@ -1147,8 +1152,8 @@ PUBLIC void reply_by_mail ARGS3( FREE(ccaddr); FREE(keywords); FREE(body); - fclose(fd); /* Close the tmpfile. */ - remove(my_tmpfile); /* Delete the tmpfile. */ + LYCloseTempFP(fd); /* Close the tmpfile. */ + LYRemoveTemp(my_tmpfile); /* Delete the tmpfile. */ HTAlert(NO_ADDRESS_IN_MAILTO_URL); return; } @@ -1173,9 +1178,9 @@ PUBLIC void reply_by_mail ARGS3( /* * Unescape the address and ccaddr fields. - FM */ - HTUnEscape(address); + SafeHTUnEscape(address); if (ccaddr != NULL) { - HTUnEscape(ccaddr); + SafeHTUnEscape(ccaddr); } /* @@ -1216,11 +1221,9 @@ PUBLIC void reply_by_mail ARGS3( * Put the To: line in the header. */ #ifndef DOSPATH - asprintf(&header, "To: %s\n", address); - if (!header) { - fprintf(stderr, "Out of memory, you loose!\n"); - exit(1); - } + StrAllocCopy(header, "To: "); + StrAllocCat(header, address); + StrAllocCat(header, "\n"); #endif /* @@ -1250,13 +1253,23 @@ PUBLIC void reply_by_mail ARGS3( /* * Put the X-URL and X-Mailer lines in the header. */ - sprintf(buf, - "X-URL: %s%s\n", - (filename && *filename) ? filename : "mailto:", - (filename && *filename) ? "" : address); - StrAllocCat(header, buf); + StrAllocCat(header, "X-URL: "); + if (filename && *filename) { + StrAllocCat(header, filename); + } + else { + StrAllocCat(header, "mailto:"); + StrAllocCat(header, address); + } + StrAllocCat(header, "\n"); sprintf(buf, "X-Mailer: Lynx, Version %s\n", LYNX_VERSION); StrAllocCat(header, buf); + + if (refid && *refid) { + StrAllocCat(header, "In-Reply-To: <"); + StrAllocCat(header, refid); + StrAllocCat(header, ">\n"); + } #endif /* VMS */ /* @@ -1329,19 +1342,18 @@ PUBLIC void reply_by_mail ARGS3( } #ifdef VMS if (isPMDF) { - addstr("Personal_name: "); + addstr(gettext("Personal_name: ")); } else { - addstr("X_Personal_name: "); + addstr(gettext("X_Personal_name: ")); } #else - addstr("Personal Name: "); + addstr(gettext("Personal Name: ")); #endif /* VMS */ if (LYgetstr(user_input, VISIBLE, sizeof(user_input), NORECALL) < 0 || term_letter) { addstr("\n"); - _statusline(COMMENT_REQUEST_CANCELLED); - sleep(InfoSecs); - fclose(fd); /* Close the tmpfile. */ + HTInfoMsg(COMMENT_REQUEST_CANCELLED); + LYCloseTempFP(fd); /* Close the tmpfile. */ scrollok(stdscr,FALSE); /* Stop scrolling. */ goto cleanup; } @@ -1354,8 +1366,9 @@ PUBLIC void reply_by_mail ARGS3( fprintf((isPMDF ? hfd : fd), "X-Personal_name: %s\n",user_input); #else - sprintf(buf, "X-Personal_name: %s\n", user_input); - StrAllocCat(header, buf); + StrAllocCat(header, "X-Personal_name: "); + StrAllocCat(header, user_input); + StrAllocCat(header, "\n"); #endif /* VMS */ } @@ -1381,9 +1394,8 @@ PUBLIC void reply_by_mail ARGS3( if (LYgetstr(user_input, VISIBLE, sizeof(user_input), NORECALL) < 0 || term_letter) { addstr("\n"); - _statusline(COMMENT_REQUEST_CANCELLED); - sleep(InfoSecs); - fclose(fd); /* Close the tmpfile. */ + HTInfoMsg(COMMENT_REQUEST_CANCELLED); + LYCloseTempFP(fd); /* Close the tmpfile. */ scrollok(stdscr,FALSE); /* Stop scrolling. */ goto cleanup; } @@ -1400,8 +1412,9 @@ PUBLIC void reply_by_mail ARGS3( fprintf(fd, "\n"); } #else - sprintf(buf, "From: %s\n", user_input); - StrAllocCat(header, buf); + StrAllocCat(header, "From: "); + StrAllocCat(header, user_input); + StrAllocCat(header, "\n"); #endif /* VMS */ #endif /* !NO_ANONYMOUS_EMAIL */ #ifdef VMS @@ -1413,7 +1426,7 @@ PUBLIC void reply_by_mail ARGS3( */ addstr(ENTER_SUBJECT_LINE); addstr(CTRL_U_TO_ERASE); - addstr("Subject: "); + addstr(SUBJECT_PROMPT); /* Add the default subject. */ sprintf(user_input, "%.70s%.63s", (subject[0] != '\0') ? @@ -1427,9 +1440,8 @@ PUBLIC void reply_by_mail ARGS3( if (LYgetstr(user_input, VISIBLE, 71, NORECALL) < 0 || term_letter) { addstr("\n"); - _statusline(COMMENT_REQUEST_CANCELLED); - sleep(InfoSecs); - fclose(fd); /* Close the tmpfile. */ + HTInfoMsg(COMMENT_REQUEST_CANCELLED); + LYCloseTempFP(fd); /* Close the tmpfile. */ scrollok(stdscr,FALSE); /* Stop scrolling. */ goto cleanup; } @@ -1438,8 +1450,9 @@ PUBLIC void reply_by_mail ARGS3( #ifdef VMS sprintf(subject, "%.70s", user_input); #else - sprintf(buf, "Subject: %s\n", user_input); - StrAllocCat(header, buf); + StrAllocCat(header, "Subject: "); + StrAllocCat(header, user_input); + StrAllocCat(header, "\n"); #endif /* VMS */ /* @@ -1460,16 +1473,15 @@ PUBLIC void reply_by_mail ARGS3( if (LYgetstr(user_input, VISIBLE, sizeof(user_input), NORECALL) < 0 || term_letter) { addstr("\n"); - _statusline(COMMENT_REQUEST_CANCELLED); - sleep(InfoSecs); - fclose(fd); /* Close the tmpfile. */ + HTInfoMsg(COMMENT_REQUEST_CANCELLED); + LYCloseTempFP(fd); /* Close the tmpfile. */ scrollok(stdscr, FALSE); /* Stop scrolling. */ goto cleanup; } addstr("\n"); } remove_tildes(user_input); -#if defined (VMS) || defined (DOSPATH) + if (*user_input) { cp = user_input; while (*cp == ',' || isspace((unsigned char)*cp)) @@ -1483,11 +1495,12 @@ PUBLIC void reply_by_mail ARGS3( } } } -#endif + #ifdef DOSPATH if (*address) { - sprintf(buf, "To: %s\n", address); - StrAllocCat(header, buf); + StrAllocCat(header, "To: "); + StrAllocCat(header, address); + StrAllocCat(header, "\n"); } #endif @@ -1515,6 +1528,7 @@ PUBLIC void reply_by_mail ARGS3( */ sprintf(buf, "\n"); StrAllocCat(header, buf); + CTRACE(tfp,"**header==\n%s",header); #endif /* !VMS */ if (!no_editor && editor && *editor != '\0') { @@ -1536,15 +1550,9 @@ PUBLIC void reply_by_mail ARGS3( */ BOOLEAN is_preparsed = (LYPreparsedSource && HTisDocumentSource()); - if (is_preparsed) - _statusline(INC_PREPARSED_MSG_PROMPT); - else - _statusline(INC_ORIG_MSG_PROMPT); - c = 0; - while (TOUPPER(c) != 'Y' && TOUPPER(c) != 'N' && - !term_letter && c != 7 && c != 3) - c = LYgetch(); - if (TOUPPER(c) == 'Y') { + if (HTConfirm(is_preparsed + ? INC_PREPARSED_MSG_PROMPT + : INC_ORIG_MSG_PROMPT) == YES) { /* * The 1 will add the reply "> " in front of every line. */ @@ -1554,7 +1562,7 @@ PUBLIC void reply_by_mail ARGS3( print_wwwfile_to_fd(fd, 1); } } - fclose(fd); /* Close the tmpfile. */ + LYCloseTempFP(fd); /* Close the tmpfile. */ scrollok(stdscr,FALSE); /* Stop scrolling. */ if (term_letter || c == 7 || c == 3) @@ -1569,10 +1577,9 @@ PUBLIC void reply_by_mail ARGS3( sprintf(user_input, "%s%s %s", editor, editor_arg, my_tmpfile); _statusline(SPAWNING_EDITOR_FOR_MAIL); stop_curses(); - if (system(user_input)) { + if (LYSystem(user_input)) { start_curses(); - _statusline(ERROR_SPAWNING_EDITOR); - sleep(AlertSecs); + HTAlert(ERROR_SPAWNING_EDITOR); } else { start_curses(); } @@ -1596,16 +1603,16 @@ PUBLIC void reply_by_mail ARGS3( if (term_letter || c == 7 || c == 3) { addstr(CANCELLED); sleep(InfoSecs); - fclose(fd); /* Close the tmpfile. */ + LYCloseTempFP(fd); /* Close the tmpfile. */ scrollok(stdscr, FALSE); /* Stop scrolling. */ goto cleanup; } i = (LYlines - 2); } *cp++ = '\0'; - sprintf(cmd, "%s\n", cp1); - fprintf(fd, cmd); - addstr(cmd); + fprintf(fd, "%s\n", cp1); + addstr(cp1); + addstr("\n"); cp1 = cp; i--; } @@ -1614,7 +1621,7 @@ PUBLIC void reply_by_mail ARGS3( i--; } refresh(); - fclose(fd); /* Close the tmpfile. */ + LYCloseTempFP(fd); /* Close the tmpfile. */ scrollok(stdscr,FALSE); /* Stop scrolling. */ } else { @@ -1629,9 +1636,8 @@ PUBLIC void reply_by_mail ARGS3( *user_input = '\0'; if (LYgetstr(user_input, VISIBLE, sizeof(user_input), NORECALL) < 0 || term_letter || STREQ(user_input, ".")) { - _statusline(COMMENT_REQUEST_CANCELLED); - sleep(InfoSecs); - fclose(fd); /* Close the tmpfile. */ + HTInfoMsg(COMMENT_REQUEST_CANCELLED); + LYCloseTempFP(fd); /* Close the tmpfile. */ scrollok(stdscr,FALSE); /* Stop scrolling. */ goto cleanup; } @@ -1643,16 +1649,15 @@ PUBLIC void reply_by_mail ARGS3( *user_input = '\0'; if (LYgetstr(user_input, VISIBLE, sizeof(user_input), NORECALL) < 0) { - _statusline(COMMENT_REQUEST_CANCELLED); - sleep(InfoSecs); - fclose(fd); /* Close the tmpfile. */ + HTInfoMsg(COMMENT_REQUEST_CANCELLED); + LYCloseTempFP(fd); /* Close the tmpfile. */ scrollok(stdscr,FALSE); /* Stop scrolling. */ goto cleanup; } } fprintf(fd, "\n"); /* Terminate the message. */ - fclose(fd); /* Close the tmpfile. */ + LYCloseTempFP(fd); /* Close the tmpfile. */ scrollok(stdscr,FALSE); /* Stop scrolling. */ } @@ -1663,33 +1668,31 @@ PUBLIC void reply_by_mail ARGS3( signal(SIGINT, SIG_IGN); #endif /* !VMS */ LYStatusLine = (LYlines - 1); - if (body) - _statusline(SEND_MESSAGE_PROMPT); - else - _statusline(SEND_COMMENT_PROMPT); + c = HTConfirm (body ? SEND_MESSAGE_PROMPT : SEND_COMMENT_PROMPT); LYStatusLine = -1; - c = 0; - while (TOUPPER(c) != 'Y' && TOUPPER(c) != 'N' && - !term_letter && c != 7 && c != 3) - c = LYgetch(); - if (TOUPPER(c) != 'Y') { + if (c != YES) { clear(); /* clear the screen */ goto cleanup; } if ((body == NULL && LynxSigFile != NULL) && (fp = fopen(LynxSigFile, "r")) != NULL) { LYStatusLine = (LYlines - 1); - _user_message(APPEND_SIG_FILE, LynxSigFile); - c = 0; + if (term_letter) { + _user_message(APPEND_SIG_FILE, LynxSigFile); + c = 0; + } else { + char *msg = NULL; + HTSprintf0(&msg, APPEND_SIG_FILE, LynxSigFile); + c = HTConfirm(msg); + FREE(msg); + } LYStatusLine = -1; - while (TOUPPER(c) != 'Y' && TOUPPER(c) != 'N' && - !term_letter && c != 7 && c != 3) - c = LYgetch(); - if (TOUPPER(c) == 'Y') { + if (c == YES) { if ((fd = fopen(my_tmpfile, "a")) != NULL) { + char *buffer = NULL; fputs("-- \n", fd); - while (fgets(user_input, sizeof(user_input), fp) != NULL) { - fputs(user_input, fd); + while (LYSafeGets(&buffer, fp) != NULL) { + fputs(buffer, fd); } fclose(fd); } @@ -1714,7 +1717,7 @@ PUBLIC void reply_by_mail ARGS3( fprintf(hfd, "Keywords: %s\n", keywords); } fprintf(hfd, "Subject: %s\n\n", subject); - fclose(hfd); + LYCloseTempFP(hfd); /* * Now set up the command. - FM */ @@ -1730,6 +1733,8 @@ PUBLIC void reply_by_mail ARGS3( * command, and ignore any keywords to minimize risk * of them making the line too long or having problem * characters. - FM + * + * Possibly still a problem if user supplies long subject. - BL */ sprintf(cmd, "%s %s%s/subject=\"%s\" %s ", @@ -1757,8 +1762,12 @@ PUBLIC void reply_by_mail ARGS3( * 4 letters is arbitrarily the smallest possible mail * address, at least for lynx. That way extra spaces * won't confuse the mailer and give a blank address. + * + * ignore addresses so long that they would overflow the + * temporary buffer (i.e., about 500 chars). - BL */ - if (strlen(address_ptr1) > 3) { + if (strlen(address_ptr1) > 3 && + strlen(address_ptr1) + strlen(mail_adrs) < sizeof(cmd)) { if (!first) { StrAllocCat(command, ","); } @@ -1786,8 +1795,12 @@ PUBLIC void reply_by_mail ARGS3( * 4 letters is arbitrarily the smallest possible mail * address, at least for lynx. That way extra spaces * won't confuse the mailer and give a blank address. + * + * ignore addresses so long that they would overflow the + * temporary buffer (i.e., about 500 chars). - BL */ - if (strlen(address_ptr1) > 3) { + if (strlen(address_ptr1) > 3 && + strlen(address_ptr1) + strlen(mail_adrs) < sizeof(cmd)) { StrAllocCat(command, ","); sprintf(cmd, mail_adrs, address_ptr1); if (isPMDF) { @@ -1800,8 +1813,8 @@ PUBLIC void reply_by_mail ARGS3( } stop_curses(); - printf("Sending your comment:\n\n$ %s\n\nPlease wait...", command); - system(command); + printf("%s\n\n$ %s\n\n%s", SENDING_COMMENT, command, PLEASE_WAIT); + LYSystem(command); FREE(command); sleep(AlertSecs); start_curses(); @@ -1813,13 +1826,7 @@ PUBLIC void reply_by_mail ARGS3( _statusline(SENDING_YOUR_MSG); sprintf(cmd, "%s %s", system_mail, system_mail_flags); #ifdef DOSPATH - tempname(tmpfile2, NEW_FILE); - if (((cp = strrchr(tmpfile2, '.')) != NULL) && - NULL == strchr(cp, '/')) { - *cp = '\0'; - strcat(tmpfile2, ".txt"); - } - if ((fp = LYNewTxtFile(tmpfile2)) == NULL) { + if ((fp = LYOpenTemp(tmpfile2, ".txt", "w")) == NULL) { HTAlert(MAILTO_URL_TEMPOPEN_FAILED); return; } @@ -1827,15 +1834,13 @@ PUBLIC void reply_by_mail ARGS3( signal(SIGINT, SIG_IGN); fp = popen(cmd, "w"); if (fp == NULL) { - _statusline(COMMENT_REQUEST_CANCELLED); - sleep(InfoSecs); + HTInfoMsg(COMMENT_REQUEST_CANCELLED); goto cleanup; } #endif /* DOSPATH */ fd = fopen(my_tmpfile, "r"); if (fd == NULL) { - _statusline(COMMENT_REQUEST_CANCELLED); - sleep(InfoSecs); + HTInfoMsg(COMMENT_REQUEST_CANCELLED); pclose(fp); goto cleanup; } @@ -1843,21 +1848,25 @@ PUBLIC void reply_by_mail ARGS3( while ((n = fread(buf, 1, sizeof(buf), fd)) != 0) fwrite(buf, 1, n, fp); #ifdef DOSPATH - sprintf(cmd, "%s -t \"%s\" -F %s", system_mail, address, tmpfile2); - fclose(fp); /* Close the tmpfile. */ - stop_curses(); - printf("Sending your comment:\n\n$ %s\n\nPlease wait...", cmd); - system(cmd); - sleep(MessageSecs); - start_curses(); - remove(tmpfile2); /* Delete the tmpfile. */ + StrAllocCopy(command, system_mail); + StrAllocCat(command, " -t \""); + StrAllocCat(command, address); + StrAllocCat(command, "\" -F "); + StrAllocCat(command, tmpfile2); + LYCloseTempFP(fp); /* Close the tmpfile. */ + stop_curses(); + printf("%s\n\n$ %s\n\n%s", SENDING_COMMENT, command, PLEASE_WAIT); + LYSystem(command); + FREE(command); + sleep(MessageSecs); + start_curses(); + LYRemoveTemp(tmpfile2); /* Delete the tmpfile. */ #else pclose(fp); #endif - fclose(fd); /* Close the tmpfile. */ + LYCloseTempFP(fd); /* Close the tmpfile. */ - if (TRACE) - printf("%s\n", cmd); + CTRACE(tfp, "%s\n", cmd); #endif /* VMS */ /* @@ -1875,14 +1884,11 @@ cleandown: term_letter = FALSE; #ifdef VMS FREE(command); - while (remove(my_tmpfile) == 0) - ; /* Delete the tmpfile(s). */ if (isPMDF) { - remove(hdrfile); /* Delete the hdrfile. */ + LYRemoveTemp(hdrfile); } -#else - remove(my_tmpfile); /* Delete the tmpfile. */ #endif /* VMS */ + LYRemoveTemp(my_tmpfile); FREE(address); FREE(ccaddr); FREE(keywords); diff --git a/gnu/usr.bin/lynx/src/LYMail.h b/gnu/usr.bin/lynx/src/LYMail.h index 22ce906337b..00728e38e1c 100644 --- a/gnu/usr.bin/lynx/src/LYMail.h +++ b/gnu/usr.bin/lynx/src/LYMail.h @@ -3,16 +3,16 @@ #define LYMAIL_H #ifndef LYSTRUCTS_H -#include "LYStructs.h" +#include #endif /* LYSTRUCTS_H */ extern BOOLEAN term_letter; extern void mailform PARAMS(( - char * mailto_address, - char * mailto_subject, - char * mailto_content, - char * mailto_type)); + CONST char * mailto_address, + CONST char * mailto_subject, + CONST char * mailto_content, + CONST char * mailto_type)); extern void mailmsg PARAMS(( int cur, char * owner_address, @@ -21,6 +21,7 @@ extern void mailmsg PARAMS(( extern void reply_by_mail PARAMS(( char * mail_address, char * filename, - CONST char * title)); + CONST char * title, + CONST char * refid)); #endif /* LYMAIL_H */ diff --git a/gnu/usr.bin/lynx/src/LYMain.c b/gnu/usr.bin/lynx/src/LYMain.c index 07be64e0d7b..9f1f717e83a 100644 --- a/gnu/usr.bin/lynx/src/LYMain.c +++ b/gnu/usr.bin/lynx/src/LYMain.c @@ -1,37 +1,40 @@ -#include "HTUtils.h" -#include "tcp.h" -#include "HTTP.h" -#include "HTParse.h" -#include "HTAccess.h" -#include "HTList.h" -#include "HTFile.h" -#include "UCMap.h" -#include "UCDefs.h" -#ifdef VMS -#include "HTVMSUtils.h" -#endif /* VMS */ -#include "HTInit.h" -#include "LYCurses.h" -#include "LYStyle.h" -#include "HTML.h" -#include "LYUtils.h" -#include "LYGlobalDefs.h" -#include "LYSignal.h" -#include "LYGetFile.h" -#include "LYStrings.h" -#include "LYClean.h" -#include "LYCharSets.h" -#include "LYCharUtils.h" -#include "UCMap.h" -#include "LYReadCFG.h" -#include "LYrcFile.h" -#include "LYKeymap.h" -#include "LYList.h" -#include "LYJump.h" -#include "LYMainLoop.h" -#include "LYBookmark.h" -#ifdef DOSPATH -#include "HTDOS.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __DJGPP__ +#include +#include +#endif /* __DJGPP__ */ + +#ifdef __EMX__ +#include #endif #ifndef VMS @@ -41,19 +44,21 @@ #endif /* !VMS */ #ifdef LOCALE -#include +#undef gettext /* Solaris locale.h prototypes gettext() */ +#include +#ifndef HAVE_GETTEXT +#define gettext(s) s +#endif #endif /* LOCALE */ -#include "LYexit.h" -#include "LYLeaks.h" +#include +#include -#define FREE(x) if (x) {free(x); x = NULL;} - -#ifdef VMS -#define DISPLAY "DECW$DISPLAY" +#ifdef FNAMES_8_3 +#define COOKIE_FILE "cookies" #else -#define DISPLAY "DISPLAY" -#endif /* VMS */ +#define COOKIE_FILE ".lynx_cookies" +#endif /* FNAMES_8_3 */ /* ahhhhhhhhhh!! Global variables :-< */ #ifdef SOCKS @@ -75,26 +80,10 @@ PUBLIC BOOLEAN UseFixedRecords = USE_FIXED_RECORDS; #endif /* VMS */ #ifndef VMS -PUBLIC char *lynx_version_putenv_command = NULL; -PUBLIC char *NNTPSERVER_putenv_cmd = NULL; /* lynx.cfg defined NNTPSERVER */ -PUBLIC char *http_proxy_putenv_cmd = NULL; /* lynx.cfg defined http_proxy */ -PUBLIC char *https_proxy_putenv_cmd = NULL; /* lynx.cfg defined https_proxy */ -PUBLIC char *ftp_proxy_putenv_cmd = NULL; /* lynx.cfg defined ftp_proxy */ -PUBLIC char *gopher_proxy_putenv_cmd = NULL; /* lynx.cfg defined gopher_proxy */ -PUBLIC char *cso_proxy_putenv_cmd = NULL; /* lynx.cfg defined cso_proxy */ -PUBLIC char *news_proxy_putenv_cmd = NULL; /* lynx.cfg defined news_proxy */ -PUBLIC char *newspost_proxy_putenv_cmd = NULL; -PUBLIC char *newsreply_proxy_putenv_cmd = NULL; -PUBLIC char *snews_proxy_putenv_cmd = NULL; /* lynx.cfg defined snews_proxy */ -PUBLIC char *snewspost_proxy_putenv_cmd = NULL; -PUBLIC char *snewsreply_proxy_putenv_cmd = NULL; -PUBLIC char *nntp_proxy_putenv_cmd = NULL; /* lynx.cfg defined nntp_proxy */ -PUBLIC char *wais_proxy_putenv_cmd = NULL; /* lynx.cfg defined wais_proxy */ -PUBLIC char *finger_proxy_putenv_cmd = NULL; /* lynx.cfg defined finger_proxy */ -PUBLIC char *no_proxy_putenv_cmd = NULL; /* lynx.cfg defined no_proxy */ -PUBLIC char *list_format=NULL; /* LONG_LIST formatting mask */ +PRIVATE char *lynx_version_putenv_command = NULL; +PUBLIC char *list_format = NULL; /* LONG_LIST formatting mask */ #ifdef SYSLOG_REQUESTED_URLS -PUBLIC char *syslog_txt = NULL; /* syslog arb text for session */ +PUBLIC char *syslog_txt = NULL; /* syslog arb text for session */ #endif /* SYSLOG_REQUESTED_URLS */ #endif /* !VMS */ @@ -105,7 +94,7 @@ PUBLIC char *LYCSwingPath = NULL; #ifdef DIRED_SUPPORT PUBLIC BOOLEAN lynx_edit_mode = FALSE; PUBLIC BOOLEAN no_dired_support = FALSE; -PUBLIC BOOLEAN dir_list_style = MIXED_STYLE; +PUBLIC int dir_list_style = MIXED_STYLE; PUBLIC HTList *tagged = NULL; #ifdef OK_OVERRIDE PUBLIC BOOLEAN prev_lynx_edit_mode = FALSE; @@ -163,18 +152,23 @@ PUBLIC int port_syntax = 1; PUBLIC int LYShowColor = SHOW_COLOR_UNKNOWN; /* to show or not to show */ PUBLIC int LYChosenShowColor = SHOW_COLOR_UNKNOWN; /* whether to show and save */ PUBLIC int LYrcShowColor = SHOW_COLOR_UNKNOWN; /* ... as last read or written */ +#if !defined(NO_OPTION_FORMS) && !defined(NO_OPTION_MENU) +PUBLIC BOOLEAN LYUseFormsOptions = TRUE; /* use forms-based options menu */ +#endif PUBLIC BOOLEAN LYShowCursor = SHOW_CURSOR; /* to show or not to show */ +PUBLIC BOOLEAN verbose_img = VERBOSE_IMAGES; /* show filenames or not */ PUBLIC BOOLEAN LYUseDefShoCur = TRUE; /* Command line -show_cursor toggle */ PUBLIC BOOLEAN LYforce_no_cache = FALSE; PUBLIC BOOLEAN LYoverride_no_cache = FALSE;/*override no-cache b/c history etc*/ PUBLIC BOOLEAN LYinternal_flag = FALSE; /* override no-cache b/c internal link*/ PUBLIC BOOLEAN LYresubmit_posts = ALWAYS_RESUBMIT_POSTS; +PUBLIC BOOLEAN LYshow_kb_rate = TRUE; PUBLIC BOOLEAN LYUserSpecifiedURL = TRUE;/* always TRUE the first time */ PUBLIC BOOLEAN LYJumpFileURL = FALSE; /* always FALSE the first time */ PUBLIC BOOLEAN jump_buffer = JUMPBUFFER; /* TRUE if offering default shortcut */ PUBLIC BOOLEAN goto_buffer = GOTOBUFFER; /* TRUE if offering default goto URL */ PUBLIC BOOLEAN recent_sizechange = FALSE;/* the window size changed recently? */ -PUBLIC BOOLEAN user_mode = NOVICE_MODE; +PUBLIC int user_mode = NOVICE_MODE; PUBLIC BOOLEAN dump_output_immediately = FALSE; PUBLIC BOOLEAN is_www_index = FALSE; PUBLIC BOOLEAN lynx_mode = NORMAL_LYNX_MODE; @@ -186,6 +180,7 @@ PUBLIC BOOLEAN nolist = FALSE; PUBLIC BOOLEAN historical_comments = FALSE; PUBLIC BOOLEAN minimal_comments = FALSE; PUBLIC BOOLEAN soft_dquotes = FALSE; +PUBLIC BOOLEAN LYRestricted = FALSE; PUBLIC BOOLEAN LYValidate = FALSE; PUBLIC BOOLEAN LYPermitURL = FALSE; PUBLIC BOOLEAN child_lynx = FALSE; @@ -193,24 +188,25 @@ PUBLIC BOOLEAN error_logging = MAIL_SYSTEM_ERROR_LOGGING; PUBLIC BOOLEAN check_mail = CHECKMAIL; PUBLIC BOOLEAN vi_keys = VI_KEYS_ALWAYS_ON; PUBLIC BOOLEAN emacs_keys = EMACS_KEYS_ALWAYS_ON; -PUBLIC BOOLEAN keypad_mode = DEFAULT_KEYPAD_MODE; +PUBLIC int keypad_mode = DEFAULT_KEYPAD_MODE; PUBLIC BOOLEAN case_sensitive = CASE_SENSITIVE_ALWAYS_ON; PUBLIC BOOLEAN telnet_ok = TRUE; +#ifndef DISABLE_NEWS PUBLIC BOOLEAN news_ok = TRUE; +#endif PUBLIC BOOLEAN rlogin_ok = TRUE; PUBLIC BOOLEAN ftp_ok = TRUE; PUBLIC BOOLEAN system_editor = FALSE; #ifdef USE_EXTERNALS PUBLIC BOOLEAN no_externals = FALSE; #endif -#ifdef RAWDOSKEYHACK -PUBLIC BOOLEAN raw_dos_key_hack = TRUE; -#endif /* RAWDOSKEYHACK */ PUBLIC BOOLEAN no_inside_telnet = FALSE; PUBLIC BOOLEAN no_outside_telnet = FALSE; PUBLIC BOOLEAN no_telnet_port = FALSE; +#ifndef DISABLE_NEWS PUBLIC BOOLEAN no_inside_news = FALSE; PUBLIC BOOLEAN no_outside_news = FALSE; +#endif PUBLIC BOOLEAN no_inside_ftp = FALSE; PUBLIC BOOLEAN no_outside_ftp = FALSE; PUBLIC BOOLEAN no_inside_rlogin = FALSE; @@ -240,16 +236,22 @@ PUBLIC BOOLEAN no_goto_lynxcgi = FALSE; PUBLIC BOOLEAN no_goto_lynxexec = FALSE; PUBLIC BOOLEAN no_goto_lynxprog = FALSE; PUBLIC BOOLEAN no_goto_mailto = FALSE; +#ifndef DISABLE_NEWS PUBLIC BOOLEAN no_goto_news = FALSE; PUBLIC BOOLEAN no_goto_nntp = FALSE; +#endif PUBLIC BOOLEAN no_goto_rlogin = FALSE; +#ifndef DISABLE_NEWS PUBLIC BOOLEAN no_goto_snews = FALSE; +#endif PUBLIC BOOLEAN no_goto_telnet = FALSE; PUBLIC BOOLEAN no_goto_tn3270 = FALSE; PUBLIC BOOLEAN no_goto_wais = FALSE; PUBLIC BOOLEAN no_jump = FALSE; PUBLIC BOOLEAN no_file_url = FALSE; +#ifndef DISABLE_NEWS PUBLIC BOOLEAN no_newspost = FALSE; +#endif PUBLIC BOOLEAN no_mail = FALSE; PUBLIC BOOLEAN no_dotfiles = NO_DOT_FILES; PUBLIC BOOLEAN no_useragent = FALSE; @@ -259,13 +261,14 @@ PUBLIC BOOLEAN local_host_only = FALSE; PUBLIC BOOLEAN override_no_download = FALSE; PUBLIC BOOLEAN show_dotfiles = FALSE; /* From rcfile if no_dotfiles is false */ PUBLIC BOOLEAN LYforce_HTML_mode = FALSE; -PUBLIC char *homepage = NULL; /* home page or main screen */ PUBLIC char *editor = NULL; /* the name of the current editor */ PUBLIC char *jumpfile = NULL; /* the name of the default jumps file */ PUBLIC char *jumpprompt = NULL; /* the default jumps prompt */ PUBLIC char *bookmark_page = NULL; /* the name of the default bookmark page */ PUBLIC char *BookmarkPage = NULL; /* the name of the current bookmark page */ PUBLIC char *LynxHome = NULL; /* the default Home HREF. */ +PUBLIC char *homepage = NULL; /* home page or main screen */ +PUBLIC char *original_dir = NULL; /* the original directory */ PUBLIC char *startfile = NULL; /* the first file */ PUBLIC char *helpfile = NULL; /* the main help file */ PUBLIC char *helpfilepath = NULL; /* the path to the help file set */ @@ -274,8 +277,9 @@ PUBLIC char *lynxlistfile = NULL; /* the current list file URL */ PUBLIC char *lynxlinksfile = NULL; /* the current visited links file URL */ PUBLIC char *startrealm = NULL; /* the startfile realm */ PUBLIC char *indexfile = NULL; /* an index file if there is one */ +PUBLIC int outgoing_mail_charset = -1; /* translate mail to this charset */ PUBLIC char *personal_mail_address = NULL; /* the users mail address */ -PUBLIC char *display = NULL; /* display environment variable */ +PUBLIC char *x_display = NULL; /* display environment variable */ PUBLIC char *personal_type_map = NULL; /* .mailcap */ PUBLIC char *global_type_map = NULL; /* global mailcap */ PUBLIC char *global_extension_map = NULL; /* global mime.types */ @@ -286,9 +290,10 @@ PUBLIC BOOLEAN LYNewsPosting = NEWS_POSTING; /* News posting supported? */ PUBLIC char *LynxSigFile = NULL; /* Signature file, in or off home */ PUBLIC char *system_mail = NULL; /* The path for sending mail */ PUBLIC char *system_mail_flags = NULL; /* Flags for sending mail */ +PUBLIC char *lynx_cfg_file = NULL; /* location of active lynx.cfg */ PUBLIC char *lynx_temp_space = NULL; /* The prefix for temporary file paths */ PUBLIC char *lynx_save_space = NULL; /* The prefix for save to disk paths */ -PUBLIC char *LYHostName = NULL; /* treat as a local host name */ +PUBLIC char *LYHostName = NULL; /* treat as a local host name */ PUBLIC char *LYLocalDomain = NULL; /* treat as a local domain tail */ PUBLIC BOOLEAN clickable_images = MAKE_LINKS_FOR_ALL_IMAGES; PUBLIC BOOLEAN pseudo_inline_alts = MAKE_PSEUDO_ALTS_FOR_INLINES; @@ -315,8 +320,8 @@ PUBLIC BOOLEAN LYRawMode; PUBLIC BOOLEAN LYDefaultRawMode; PUBLIC BOOLEAN LYUseDefaultRawMode = TRUE; PUBLIC char *UCAssume_MIMEcharset = NULL; -PUBLIC char *UCAssume_localMIMEcharset = NULL; -PUBLIC char *UCAssume_unrecMIMEcharset = NULL; +PUBLIC BOOLEAN UCSaveBookmarksInUnicode = FALSE; +PUBLIC BOOLEAN UCForce8bitTOUPPER = FALSE; /* override locale for case-conversion? */ PUBLIC int LYlines = 24; PUBLIC int LYcols = 80; PUBLIC int dump_output_width = 0; @@ -343,21 +348,35 @@ PUBLIC char *URLDomainSuffixes = NULL; PUBLIC BOOLEAN startfile_ok = FALSE; PUBLIC BOOLEAN LYSelectPopups = USE_SELECT_POPUPS; PUBLIC BOOLEAN LYUseDefSelPop = TRUE; /* Command line -popup toggle */ -PUBLIC int LYMultiBookmarks = MULTI_BOOKMARK_SUPPORT; +PUBLIC BOOLEAN LYMultiBookmarks = MULTI_BOOKMARK_SUPPORT; PUBLIC BOOLEAN LYMBMBlocked = BLOCK_MULTI_BOOKMARKS; PUBLIC BOOLEAN LYMBMAdvanced = TRUE; PUBLIC int LYStatusLine = -1; /* Line for statusline() if > -1 */ PUBLIC BOOLEAN LYCollapseBRs = COLLAPSE_BR_TAGS; /* Collapse serial BRs? */ PUBLIC BOOLEAN LYSetCookies = SET_COOKIES; /* Process Set-Cookie headers? */ +PUBLIC BOOLEAN LYAcceptAllCookies = ACCEPT_ALL_COOKIES; /* take all cookies? */ +PUBLIC char *LYCookieAcceptDomains = NULL; /* domains to accept all cookies */ +PUBLIC char *LYCookieRejectDomains = NULL; /* domains to reject all cookies */ +PUBLIC char *LYCookieStrictCheckDomains = NULL; /* check strictly */ +PUBLIC char *LYCookieLooseCheckDomains = NULL; /* check loosely */ +PUBLIC char *LYCookieQueryCheckDomains = NULL; /* check w/a query */ +PUBLIC char *LYCookieSAcceptDomains = NULL; /* domains to accept all cookies */ +PUBLIC char *LYCookieSRejectDomains = NULL; /* domains to reject all cookies */ +PUBLIC char *LYCookieSStrictCheckDomains = NULL; /* check strictly */ +PUBLIC char *LYCookieSLooseCheckDomains = NULL; /* check loosely */ +PUBLIC char *LYCookieSQueryCheckDomains = NULL; /* check w/a query */ +#ifdef EXP_PERSISTENT_COOKIES +BOOLEAN persistent_cookies = TRUE; +PUBLIC char *LYCookieFile = NULL; /* default cookie file */ +#endif /* EXP_PERSISTENT_COOKIES */ PUBLIC char *XLoadImageCommand = NULL; /* Default image viewer for X */ PUBLIC BOOLEAN LYNoISMAPifUSEMAP = FALSE; /* Omit ISMAP link if MAP present? */ PUBLIC int LYHiddenLinks = HIDDENLINKS_SEPARATE; /* Show hidden links? */ -PUBLIC BOOL New_DTD = YES; +PUBLIC BOOL Old_DTD = NO; PUBLIC FILE *LYTraceLogFP = NULL; /* Pointer for TRACE log */ PUBLIC char *LYTraceLogPath = NULL; /* Path for TRACE log */ PUBLIC BOOLEAN LYUseTraceLog = USE_TRACE_LOG; /* Use a TRACE log? */ -PUBLIC FILE LYOrigStderr; /* Original stderr pointer */ PUBLIC BOOLEAN LYSeekFragMAPinCur = TRUE; PUBLIC BOOLEAN LYSeekFragAREAinCur = TRUE; @@ -366,19 +385,26 @@ PUBLIC BOOLEAN LYForceSSLCookiesSecure = FALSE; PUBLIC BOOLEAN LYNoCc = FALSE; PUBLIC BOOLEAN LYPreparsedSource = FALSE; /* Show source as preparsed? */ PUBLIC BOOLEAN LYPrependBaseToSource = TRUE; -PUBLIC BOOLEAN LYPrependCharsetToSource = FALSE; +PUBLIC BOOLEAN LYPrependCharsetToSource = TRUE; PUBLIC BOOLEAN LYQuitDefaultYes = QUIT_DEFAULT_YES; +#ifdef DISP_PARTIAL +PUBLIC BOOLEAN display_partial_flag = TRUE; /* Display document during download */ +PUBLIC BOOLEAN debug_display_partial = FALSE; /* Show with MessageSecs delay */ +PUBLIC int partial_threshold = -1; /* # of lines to be d/l'ed until we repaint */ +#endif + /* These are declared in cutil.h for current freeWAIS libraries. - FM */ #ifdef DECLARE_WAIS_LOGFILES PUBLIC char *log_file_name = NULL; /* for WAIS log file name in libWWW */ PUBLIC FILE *logfile = NULL; /* for WAIS log file output in libWWW */ #endif /* DECLARE_WAIS_LOGFILES */ +#ifndef DISABLE_NEWS extern int HTNewsChunkSize; /* Number of news articles per chunk (HTNews.c) */ extern int HTNewsMaxChunk; /* Max news articles before chunking (HTNews.c) */ +#endif -PRIVATE BOOLEAN anon_restrictions_set = FALSE; PRIVATE BOOLEAN stack_dump = FALSE; PRIVATE char *terminal = NULL; PRIVATE char *pgm; @@ -386,7 +412,19 @@ PRIVATE BOOLEAN number_links = FALSE; PRIVATE BOOLEAN LYPrependBase = FALSE; PRIVATE HTList *LYStdinArgs = NULL; -PRIVATE void parse_arg PARAMS((char **arg, int *i, int argc)); +#ifndef EXTENDED_OPTION_LOGIC +/* if set then '--' will be recognized as the end of options */ +#define EXTENDED_OPTION_LOGIC 1 +#endif + +#if EXTENDED_OPTION_LOGIC +PRIVATE BOOLEAN no_options_further=FALSE; /* set to TRUE after '--' argument */ +#endif + + +PRIVATE void parse_arg PARAMS((char **arg, int *i)); +PRIVATE void print_help_and_exit PARAMS((int exit_status)); + #ifndef VMS PUBLIC BOOLEAN LYNoCore = NO_FORCED_CORE_DUMP; PRIVATE void FatalProblem PARAMS((int sig)); @@ -397,12 +435,28 @@ PRIVATE void FatalProblem PARAMS((int sig)); #endif #ifdef __DJGPP__ -void reset_break() +PRIVATE int LY_set_ctrl_break(int setting) +{ + (void)signal(SIGINT, (setting ? SIG_DFL : SIG_IGN)); + setcbrk(setting); +} + +PRIVATE int LY_get_ctrl_break(void) +{ + __dpmi_regs regs; + regs.h.ah = 0x33; + regs.h.al = 0x00; + __dpmi_int (0x21, ®s); + return ((int) regs.h.dl); +} + +PRIVATE void reset_break(void) { - PDC_set_ctrl_break(init_ctrl_break[0]); + LY_set_ctrl_break(init_ctrl_break[0]); } #endif /* __DJGPP__ */ +#ifdef LY_FIND_LEAKS PRIVATE void free_lynx_globals NOARGS { int i; @@ -415,23 +469,7 @@ PRIVATE void free_lynx_globals NOARGS #ifdef LYNXCGI_LINKS /* WebSter Mods -jkt */ FREE(LYCgiDocumentRoot); #endif /* LYNXCGI_LINKS */ - FREE(lynx_version_putenv_command); - FREE(NNTPSERVER_putenv_cmd); - FREE(http_proxy_putenv_cmd); - FREE(https_proxy_putenv_cmd); - FREE(ftp_proxy_putenv_cmd); - FREE(gopher_proxy_putenv_cmd); - FREE(cso_proxy_putenv_cmd); - FREE(news_proxy_putenv_cmd); - FREE(newspost_proxy_putenv_cmd); - FREE(newsreply_proxy_putenv_cmd); - FREE(snews_proxy_putenv_cmd); - FREE(snewspost_proxy_putenv_cmd); - FREE(snewsreply_proxy_putenv_cmd); - FREE(nntp_proxy_putenv_cmd); - FREE(wais_proxy_putenv_cmd); - FREE(finger_proxy_putenv_cmd); - FREE(no_proxy_putenv_cmd); + free_lynx_cfg(); #endif /* !VMS */ #ifdef VMS @@ -441,14 +479,17 @@ PRIVATE void free_lynx_globals NOARGS #endif /* VMS */ FREE(LynxHome); + FREE(homepage); + FREE(original_dir); FREE(startfile); FREE(helpfile); + FREE(helpfilepath); FREE(jumpprompt); #ifdef JUMPFILE FREE(jumpfile); #endif /* JUMPFILE */ FREE(indexfile); - FREE(display); + FREE(x_display); FREE(global_type_map); FREE(personal_type_map); FREE(global_extension_map); @@ -458,13 +499,19 @@ PRIVATE void free_lynx_globals NOARGS FREE(LynxSigFile); FREE(system_mail); FREE(system_mail_flags); +#ifdef EXP_PERSISTENT_COOKIES + FREE(LYCookieFile); +#endif + FREE(LYCookieAcceptDomains); + FREE(LYCookieRejectDomains); + FREE(LYCookieLooseCheckDomains); + FREE(LYCookieStrictCheckDomains); + FREE(LYCookieQueryCheckDomains); FREE(LYUserAgent); FREE(LYUserAgentDefault); FREE(LYHostName); FREE(LYLocalDomain); FREE(lynx_save_space); - FREE(homepage); - FREE(helpfilepath); FREE(bookmark_page); FREE(BookmarkPage); for (i = 0; i <= MBM_V_MAXFILES; i++) { @@ -482,13 +529,23 @@ PRIVATE void free_lynx_globals NOARGS FREE(URLDomainPrefixes); FREE(URLDomainSuffixes); FREE(XLoadImageCommand); +#ifndef VMS + FREE(lynx_version_putenv_command); +#endif + FREE(lynx_temp_space); FREE(LYTraceLogPath); + FREE(lynx_cfg_file); #if defined(USE_HASH) FREE(lynx_lss_file); #endif FREE(UCAssume_MIMEcharset); - FREE(UCAssume_unrecMIMEcharset); - FREE(UCAssume_localMIMEcharset); + { + char *p = LYlist_temp_url(); + if (p && *p) { + *p = '\0'; + FREE(p); + } + } for (i = 0; i < nlinks; i++) { FREE(links[i].lname); } @@ -496,6 +553,7 @@ PRIVATE void free_lynx_globals NOARGS return; } +#endif /* LY_FIND_LEAKS */ /* * This function frees the LYStdinArgs list. - FM @@ -516,6 +574,80 @@ PRIVATE void LYStdinArgs_free NOARGS return; } +PUBLIC void exit_immediately ARGS1( + int, code) +{ +#ifndef NOSIGHUP + (void) signal(SIGHUP, SIG_DFL); +#endif /* NOSIGHUP */ + (void) signal(SIGTERM, SIG_DFL); +#ifndef VMS + (void) signal(SIGINT, SIG_DFL); +#endif /* !VMS */ +#ifdef SIGTSTP + if (no_suspend) + (void) signal(SIGTSTP, SIG_DFL); +#endif /* SIGTSTP */ + exit(code); +} + +#ifdef EBCDIC + char un_IBM1047[ 256 ] = ""; +unsigned char IBM1047[ 256 ] = /* ATOE OEMVS311 */ +{ +0x00,0x01,0x02,0x03,0x37,0x2d,0x2e,0x2f,0x16,0x05,0x15,0x0b,0x0c,0x0d,0x0e,0x0f, +0x10,0x11,0x12,0x13,0x3c,0x3d,0x32,0x26,0x18,0x19,0x3f,0x27,0x1c,0x1d,0x1e,0x1f, +0x40,0x5a,0x7f,0x7b,0x5b,0x6c,0x50,0x7d,0x4d,0x5d,0x5c,0x4e,0x6b,0x60,0x4b,0x61, +0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0x7a,0x5e,0x4c,0x7e,0x6e,0x6f, +0x7c,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6, +0xd7,0xd8,0xd9,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xad,0xe0,0xbd,0x5f,0x6d, +0x79,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96, +0x97,0x98,0x99,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xc0,0x4f,0xd0,0xa1,0x07, +0x20,0x21,0x22,0x23,0x24,0x25,0x06,0x17,0x28,0x29,0x2a,0x2b,0x2c,0x09,0x0a,0x1b, +0x30,0x31,0x1a,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3a,0x3b,0x04,0x14,0x3e,0xff, +0x41,0xaa,0x4a,0xb1,0x9f,0xb2,0x6a,0xb5,0xbb,0xb4,0x9a,0x8a,0xb0,0xca,0xaf,0xbc, +0x90,0x8f,0xea,0xfa,0xbe,0xa0,0xb6,0xb3,0x9d,0xda,0x9b,0x8b,0xb7,0xb8,0xb9,0xab, +0x64,0x65,0x62,0x66,0x63,0x67,0x9e,0x68,0x74,0x71,0x72,0x73,0x78,0x75,0x76,0x77, +0xac,0x69,0xed,0xee,0xeb,0xef,0xec,0xbf,0x80,0xfd,0xfe,0xfb,0xfc,0xba,0xae,0x59, +0x44,0x45,0x42,0x46,0x43,0x47,0x9c,0x48,0x54,0x51,0x52,0x53,0x58,0x55,0x56,0x57, +0x8c,0x49,0xcd,0xce,0xcb,0xcf,0xcc,0xe1,0x70,0xdd,0xde,0xdb,0xdc,0x8d,0x8e,0xdf +} ; + +static void FixCharacters(void) +{ + int c; + int work1[256], + work2[256]; + + for (c = 0; c < 256; c++) { + un_IBM1047[IBM1047[c]] = c; + work1[c] = keymap[c+1]; + work2[c] = key_override[c+1]; + } + for (c = 0; c < 256; c++) { + keymap [IBM1047[c]+1] = work1[c]; + key_override[IBM1047[c]+1] = work2[c]; + } +} +#endif /* EBCDIC */ + +/* these are used for matching commandline options. */ +PRIVATE int argcmp ARGS2( + char*, str, + char*, what) +{ + if (str[0] == '-' && str[1] == '-' ) ++str; + return strcmp(str,what); +} + +PRIVATE int argncmp ARGS2( + char*, str, + char*, what) +{ + if (str[0] == '-' && str[1] == '-' ) ++str; + return strncmp(str, what, strlen(what)); +} + /* * Wow! Someone wants to start up Lynx. */ @@ -525,14 +657,16 @@ PUBLIC int main ARGS2( { int i; /* indexing variable */ int status = 0; /* exit status */ - int len; - char *lynx_cfg_file = NULL; char *temp = NULL; char *cp; FILE *fp; - char filename[256]; + char filename[LY_MAXPATH]; BOOL LYGetStdinArgs = FALSE; +#ifdef NOT_ASCII + FixCharacters(); +#endif /* NOT_ASCII */ + #ifdef _WINDOWS WSADATA WSAData; { @@ -544,7 +678,7 @@ PUBLIC int main ARGS2( err = WSAStartup(wVerReq, &WSAData); if (err != 0) { - printf("No Winsock found, sorry."); + printf(gettext("No Winsock found, sorry.")); sleep(5); return; } @@ -552,26 +686,28 @@ PUBLIC int main ARGS2( #endif /* _WINDOWS */ #ifdef __DJGPP__ -if (PDC_get_ctrl_break() == 0) { - PDC_set_ctrl_break(TRUE); - init_ctrl_break[0] = 0;} -else {init_ctrl_break[0] = 1;} + if (LY_get_ctrl_break() == 0) { + LY_set_ctrl_break(TRUE); + init_ctrl_break[0] = 0; + } else { + init_ctrl_break[0] = 1; + } atexit(reset_break); + dbug_init(); sock_init(); #endif -#if defined(_WINDOWS) || defined(DJGPP) - /* - * To prevent corrupting binary data with _WINDOWS and DJGPP - * we open files and stdout in BINARY mode by default. - * Where necessary we should open and (close!) TEXT mode. - */ - _fmode = O_BINARY; - setmode( fileno( stdout ), O_BINARY ); -#endif + /* + * To prevent corrupting binary data on DOS, MS-WINDOWS or OS/2 + * we open files and stdout in BINARY mode by default. + * Where necessary we should open and (close!) TEXT mode. + * (use LYNewTxtFile/LYAppendToTxtFile to open text files for writing) + */ + SetDefaultMode(O_BINARY); + SetOutputMode(O_BINARY); #ifdef DOSPATH - terminal = "vt100"; + if (getenv("TERM")==NULL) putenv("TERM=vt100"); #endif LYShowColor = (SHOW_COLOR ? SHOW_COLOR_ON : SHOW_COLOR_OFF); @@ -587,8 +723,8 @@ else {init_ctrl_break[0] = 1;} * Act on -help NOW, so we only output the help and exit. - FM */ for (i = 1; i < argc; i++) { - if (strncmp(argv[i], "-help", 5) == 0) { - parse_arg(&argv[i], &i, argc); + if (argncmp(argv[i], "-help") == 0) { + parse_arg(&argv[i], &i); } } @@ -598,11 +734,12 @@ else {init_ctrl_break[0] = 1;} * Will display memory leaks if LY_FIND_LEAKS is defined. */ atexit(LYLeaks); -#endif /* LY_FIND_LEAKS */ /* * Register the function which will free our allocated globals. */ atexit(free_lynx_globals); +#endif /* LY_FIND_LEAKS */ + #ifdef LOCALE /* @@ -610,6 +747,13 @@ else {init_ctrl_break[0] = 1;} */ setlocale(LC_ALL, ""); #endif /* LOCALE */ + /* Set the text message domain. */ +#ifdef HAVE_LIBINTL_H +#ifndef __DJGPP__ + bindtextdomain ("lynx", LOCALEDIR); +#endif /* !__DJGPP__ */ + textdomain ("lynx"); +#endif /* HAVE_LIBINTL_H */ /* * Initialize our startup and global variables. @@ -643,19 +787,7 @@ else {init_ctrl_break[0] = 1;} AlertSecs = (int)ALERTSECS; StrAllocCopy(helpfile, HELPFILE); StrAllocCopy(startfile, STARTFILE); - LYTrimHead(startfile); - if (!strncasecomp(startfile, "lynxexec:", 9) || - !strncasecomp(startfile, "lynxprog:", 9)) { - /* - * The original implementations of these schemes expected - * white space without hex escaping, and did not check - * for hex escaping, so we'll continue to support that, - * until that code is redone in conformance with SGML - * principles. - FM - */ - HTUnEscapeSome(startfile, " \r\n\t"); - convert_to_spaces(startfile, TRUE); - } + LYTrimStartfile(startfile); StrAllocCopy(indexfile, DEFAULT_INDEX_FILE); StrAllocCopy(global_type_map, GLOBAL_MAILCAP); StrAllocCopy(personal_type_map, PERSONAL_MAILCAP); @@ -678,33 +810,39 @@ else {init_ctrl_break[0] = 1;} #else StrAllocCopy(lynx_version_putenv_command, "LYNX_VERSION="); StrAllocCat(lynx_version_putenv_command, LYNX_VERSION); - putenv(lynx_version_putenv_command); + (void) putenv(lynx_version_putenv_command); + /* Note: you must not free the data passed to 'putenv()' until you give it + * a new value for that variable. + */ #endif /* VMS */ + if ((cp = getenv("LYNX_TEMP_SPACE")) != NULL) StrAllocCopy(lynx_temp_space, cp); - else -#ifdef DOSPATH - if ((cp = getenv("TEMP")) != NULL) +#if defined (UNIX) + else if ((cp = getenv("TMPDIR")) != NULL) StrAllocCopy(lynx_temp_space, cp); +#endif +#if defined (DOSPATH) || defined (__EMX__) + else if ((cp = getenv("TEMP")) != NULL) + StrAllocCopy(lynx_temp_space, HTDOS_name(cp)); else if ((cp = getenv("TMP")) != NULL) - StrAllocCopy(lynx_temp_space, cp); - else + StrAllocCopy(lynx_temp_space, HTDOS_name(cp)); #endif + else +#ifdef TEMP_SPACE StrAllocCopy(lynx_temp_space, TEMP_SPACE); +#else + { + printf(gettext("You MUST define a valid TMP or TEMP area!\n")); + exit(-1); + } +#endif + if ((cp = strchr(lynx_temp_space, '~'))) { *(cp++) = '\0'; StrAllocCopy(temp, lynx_temp_space); - if (((len = strlen(temp)) > 0) && temp[len-1] == '/') - temp[len-1] = '\0'; -#ifdef DOSPATH - StrAllocCat(temp, HTDOS_wwwName((char *)Home_Dir())); -#else -#ifdef VMS - StrAllocCat(temp, HTVMS_wwwName((char *)Home_Dir())); -#else - StrAllocCat(temp, Home_Dir()); -#endif /* VMS */ -#endif /* DOSPATH */ + LYTrimPathSep(temp); + StrAllocCat(temp, wwwName(Home_Dir())); StrAllocCat(temp, cp); StrAllocCopy(lynx_temp_space, temp); FREE(temp); @@ -724,14 +862,12 @@ else {init_ctrl_break[0] = 1;} } } #ifdef VMS - for (i = 0; lynx_temp_space[i]; i++) - lynx_temp_space[i] = TOLOWER(lynx_temp_space[i]); + LYLowerCase(lynx_temp_space); if (strchr(lynx_temp_space, '/') != NULL) { - if ((len = strlen(lynx_temp_space)) == 1) { + if (strlen(lynx_temp_space) == 1) { StrAllocCopy(lynx_temp_space, "sys$scratch:"); } else { - if (lynx_temp_space[len-1] != '/') - StrAllocCat(lynx_temp_space, "/"); + LYAddPathSep(&lynx_temp_space); StrAllocCopy(temp, HTVMS_name("", lynx_temp_space)); StrAllocCopy(lynx_temp_space, temp); FREE(temp); @@ -742,19 +878,7 @@ else {init_ctrl_break[0] = 1;} StrAllocCat(lynx_temp_space, ":"); } #else - StrAllocCat(lynx_temp_space, "/lynx-XXXXXX"); - lynx_temp_space = mkdtemp(lynx_temp_space); -#ifndef __DJGPP__ - if (((len = strlen(lynx_temp_space)) > 1) && - lynx_temp_space[len-1] != '/') { - StrAllocCat(lynx_temp_space, "/"); - } -#else - if (((len = strlen(lynx_temp_space)) > 1) && - lynx_temp_space[len-1] != '\\') { - StrAllocCat(lynx_temp_space, "\\"); - } -#endif /* __DJGPP__ */ + LYAddPathSep(&lynx_temp_space); #endif /* VMS */ #ifdef VMS StrAllocCopy(mail_adrs, MAIL_ADRS); @@ -771,19 +895,6 @@ else {init_ctrl_break[0] = 1;} StrAllocCopy(URLDomainPrefixes, URL_DOMAIN_PREFIXES); StrAllocCopy(URLDomainSuffixes, URL_DOMAIN_SUFFIXES); StrAllocCopy(XLoadImageCommand, XLOADIMAGE_COMMAND); - /* - * Set up the compilation default character set. - FM - */ - for (i = 0; LYchar_set_names[i]; i++) { - if (!strncmp(CHARACTER_SET, LYchar_set_names[i], - strlen(CHARACTER_SET))) { - current_char_set=i; - break; - } - } - if (!LYchar_set_names[i]) - current_char_set = i = 0; - HTMLSetRawModeDefault(i); /* * Disable news posting if the compilation-based @@ -791,7 +902,9 @@ else {init_ctrl_break[0] = 1;} * further down via lynx.cfg or the -restriction * command line switch. - FM */ +#ifndef DISABLE_NEWS no_newspost = (LYNewsPosting == FALSE); +#endif /* * Set up trace, the anonymous account defaults, @@ -801,28 +914,28 @@ else {init_ctrl_break[0] = 1;} * the help menu, output that and exit. - FM */ for (i = 1; i < argc; i++) { - if (strncmp(argv[i], "-trace", 6) == 0) { + if (argncmp(argv[i], "-trace") == 0) { WWW_TraceFlag = TRUE; - } else if (strncmp(argv[i], "-tlog", 5) == 0) { + } else if (argncmp(argv[i], "-tlog") == 0) { if (LYUseTraceLog) { LYUseTraceLog = FALSE; } else { LYUseTraceLog = TRUE; } - } else if (strncmp(argv[i], "-anonymous", 10) == 0) { + } else if (argncmp(argv[i], "-anonymous") == 0) { if (!LYValidate) parse_restrictions("default"); - anon_restrictions_set = TRUE; - } else if (strcmp(argv[i], "-validate") == 0) { + LYRestricted = TRUE; + } else if (argcmp(argv[i], "-validate") == 0) { /* * Follow only http URLs. */ LYValidate = TRUE; #ifdef SOCKS - } else if (strncmp(argv[i], "-nosocks", 8) == 0) { + } else if (argncmp(argv[i], "-nosocks") == 0) { socks_flag = FALSE; #endif /* SOCKS */ - } else if (strncmp(argv[i], "-cfg", 4) == 0) { + } else if (argncmp(argv[i], "-cfg") == 0) { if ((cp=strchr(argv[i],'=')) != NULL) StrAllocCopy(lynx_cfg_file, cp+1); else { @@ -831,15 +944,14 @@ else {init_ctrl_break[0] = 1;} } #if defined(USE_HASH) - } else if (strncmp(argv[i], "-lss", 4) == 0) { + } else if (argncmp(argv[i], "-lss") == 0) { if ((cp=strchr(argv[i],'=')) != NULL) StrAllocCopy(lynx_lss_file, cp+1); else { StrAllocCopy(lynx_lss_file, argv[i+1]); i++; } - if (TRACE) - fprintf(stderr, "LYMain found -lss flag, lss file is %s\n", + CTRACE(tfp, "LYMain found -lss flag, lss file is %s\n", lynx_lss_file ? lynx_lss_file : ""); #endif } @@ -866,9 +978,9 @@ else {init_ctrl_break[0] = 1;} } } if (LYGetStdinArgs == TRUE) { - char buf[1025]; + char *buf = NULL; - while (fgets(buf, sizeof(buf) - 1, stdin)) { + while (LYSafeGets(&buf, stdin) != 0) { int j; for (j = strlen(buf) - 1; j > 0 && @@ -876,57 +988,50 @@ else {init_ctrl_break[0] = 1;} buf[j] = '\0'; } - if (strncmp(buf, "-trace", 6) == 0) { + if (argncmp(buf, "-trace") == 0) { WWW_TraceFlag = TRUE; - } else if (strncmp(buf, "-tlog", 5) == 0) { + } else if (argncmp(buf, "-tlog") == 0) { if (LYUseTraceLog) { LYUseTraceLog = FALSE; } else { LYUseTraceLog = TRUE; } - } else if (strncmp(buf, "-anonymous", 10) == 0) { - if (!LYValidate && !anon_restrictions_set) + } else if (argncmp(buf, "-anonymous") == 0) { + if (!LYValidate && !LYRestricted) parse_restrictions("default"); - anon_restrictions_set = TRUE; - } else if (strcmp(buf, "-validate") == 0) { + LYRestricted = TRUE; + } else if (argcmp(buf, "-validate") == 0) { /* * Follow only http URLs. */ LYValidate = TRUE; #ifdef SOCKS - } else if (strncmp(buf, "-nosocks", 8) == 0) { + } else if (argncmp(buf, "-nosocks") == 0) { socks_flag = FALSE; #endif /* SOCKS */ - } else if (strncmp(buf, "-cfg", 4) == 0) { + } else if (argncmp(buf, "-cfg") == 0) { if ((cp = strchr(buf,'=')) != NULL) { StrAllocCopy(lynx_cfg_file, cp+1); } else { - cp = buf; - while (*cp && !isspace((unsigned char)*cp)) - cp++; - while (*cp && isspace((unsigned char)*cp)) - cp++; + cp = LYSkipNonBlanks(buf); + cp = LYSkipBlanks(cp); if (*cp) StrAllocCopy(lynx_cfg_file, cp); } #if defined(USE_HASH) - } else if (strncmp(buf, "-lss", 4) == 0) { + } else if (argncmp(buf, "-lss") == 0) { if ((cp = strchr(buf,'=')) != NULL) { StrAllocCopy(lynx_lss_file, cp+1); } else { - cp = buf; - while (*cp && !isspace((unsigned char)*cp)) - cp++; - while (*cp && isspace((unsigned char)*cp)) - cp++; + cp = LYSkipNonBlanks(buf); + cp = LYSkipBlanks(cp); if (*cp) - StrAllocCopy(lynx_cfg_file, cp); + StrAllocCopy(lynx_lss_file, cp); } - if (TRACE) - fprintf(stderr, "LYMain found -lss flag, lss file is %s\n", + CTRACE(tfp, "LYMain found -lss flag, lss file is %s\n", lynx_lss_file ? lynx_lss_file : ""); #endif - } else if (strcmp(buf, "-get_data") == 0) { + } else if (argcmp(buf, "-get_data") == 0) { /* * User data for GET form. */ @@ -952,7 +1057,7 @@ else {init_ctrl_break[0] = 1;} * Build GET data for later. Stop reading when we see * a line with "---" as its first three characters. */ - while (fgets(buf, sizeof(buf), stdin) && + while (LYSafeGets(&buf, stdin) != 0 && strncmp(buf, "---", 3) != 0) { int j2; @@ -965,7 +1070,7 @@ else {init_ctrl_break[0] = 1;} } StrAllocCat(*get_data, buf); } - } else if (strcmp(buf, "-post_data") == 0) { + } else if (argcmp(buf, "-post_data") == 0) { /* * User data for POST form. */ @@ -990,7 +1095,7 @@ else {init_ctrl_break[0] = 1;} * Build post data for later. Stop reading when we see * a line with "---" as its first three characters. */ - while (fgets(buf, sizeof(buf), stdin) && + while (LYSafeGets(&buf, stdin) != 0 && strncmp(buf, "---", 3) != 0) { int j2; @@ -1008,12 +1113,15 @@ else {init_ctrl_break[0] = 1;} if (LYStdinArgs == NULL) { LYStdinArgs = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(LYStdinArgs_free); +#endif } StrAllocCopy(argument, buf); HTList_appendObject(LYStdinArgs, argument); } } + FREE(buf); } #ifdef SOCKS @@ -1036,68 +1144,29 @@ else {init_ctrl_break[0] = 1;} * set the default restrictions for that account and disallow * a TRACE log NOW. - FM */ - if (!LYValidate && !anon_restrictions_set && + if (!LYValidate && !LYRestricted && strlen((char *)ANONYMOUS_USER) > 0 && #if defined (VMS) || defined (NOUSERS) !strcasecomp(((char *)getenv("USER")==NULL ? " " : getenv("USER")), - ANONYMOUS_USER)) { + ANONYMOUS_USER)) #else #if HAVE_CUSERID - STREQ((char *)cuserid((char *) NULL), ANONYMOUS_USER)) { + STREQ((char *)cuserid((char *) NULL), ANONYMOUS_USER)) #else - STREQ(((char *)getlogin()==NULL ? " " : getlogin()), ANONYMOUS_USER)) { + STREQ(((char *)getlogin()==NULL ? " " : getlogin()), ANONYMOUS_USER)) #endif /* HAVE_CUSERID */ #endif /* VMS */ + { parse_restrictions("default"); - anon_restrictions_set = TRUE; + LYRestricted = TRUE; LYUseTraceLog = FALSE; } /* * Set up the TRACE log path, and logging if appropriate. - FM */ -#ifdef VMS - StrAllocCopy(LYTraceLogPath, "sys$login:Lynx.trace"); -#else - StrAllocCopy(LYTraceLogPath, (Home_Dir() ? Home_Dir() : "")); - StrAllocCat(LYTraceLogPath, "/Lynx.trace"); -#endif /* VMS */ - LYOrigStderr = *stderr; - if (TRACE && LYUseTraceLog) { - /* - * If we can't open it for writing, give up. - * Otherwise, on VMS close it, delete it and any - * versions from previous sessions so they don't - * accumulate, and open it again. - FM - */ - if ((LYTraceLogFP = LYNewTxtFile(LYTraceLogPath)) == NULL) { - WWW_TraceFlag = FALSE; - fprintf(stderr, "%s\n", TRACELOG_OPEN_FAILED); - exit(-1); - } -#ifdef VMS - fclose(LYTraceLogFP); - while (remove(LYTraceLogPath) == 0) - ; - if ((LYTraceLogFP = LYNewTxtFile(LYTraceLogPath)) == NULL) { - WWW_TraceFlag = FALSE; - printf("%s\n", TRACELOG_OPEN_FAILED); - exit(-1); - } -#endif /* VMS */ - fflush(stdout); - fflush(stderr); - *stderr = *LYTraceLogFP; - fprintf(stderr, "\t\t%s\n\n", LYNX_TRACELOG_TITLE); - } - - /* - * If TRACE is on, indicate whether the - * anonymous restrictions are set. - FM - */ - if (TRACE && anon_restrictions_set) { - fprintf(stderr, "LYMain: Anonymous restrictions set.\n"); - } + LYAddPathToHome(LYTraceLogPath = malloc(LY_MAXPATH), LY_MAXPATH, "Lynx.trace"); + LYOpenTraceLog(); /* * Set up the default jump file stuff. - FM @@ -1112,8 +1181,7 @@ else {init_ctrl_break[0] = 1;} } else { sprintf(temp, "JUMPFILE:%s", jumpfile); if (!LYJumpInit(temp)) { - if (TRACE) - fprintf(stderr, "Failed to register %s\n", temp); + CTRACE(tfp, "Failed to register %s\n", temp); } FREE(temp); } @@ -1142,7 +1210,7 @@ else {init_ctrl_break[0] = 1;} */ #ifndef _WINDOWS /* avoid the whole ~ thing for now */ /* I think this should only be performed if lynx_cfg_file starts with ~/ */ - if ((lynx_cfg_file[0] == '~') && (lynx_cfg_file[1] == '/')) + if ((lynx_cfg_file[0] == '~') && LYIsPathSep(lynx_cfg_file[1])) { #ifdef VMS StrAllocCopy(temp, HTVMS_wwwName((char *)Home_Dir())); @@ -1160,18 +1228,47 @@ else {init_ctrl_break[0] = 1;} * inform the user and exit. */ if ((fp = fopen(lynx_cfg_file, "r")) == NULL) { - fprintf(stderr, "\nConfiguration file %s is not available.\n\n", + fprintf(stderr, gettext("\nConfiguration file %s is not available.\n\n"), lynx_cfg_file); exit(-1); } fclose(fp); +#if defined(USE_KEYMAPS) && defined(USE_SLANG) + if (-1 == lynx_initialize_keymaps ()) + exit (-1); +#endif + /* * Make sure we have the character sets declared. * This will initialize the CHARTRANS handling. - KW */ if (!LYCharSetsDeclared()) { - fprintf(stderr, "\nLynx character sets not declared.\n\n"); + fprintf(stderr, gettext("\nLynx character sets not declared.\n\n")); + exit(-1); + } + /* + * (**) in Lynx, UCLYhndl_HTFile_for_unspec and UCLYhndl_for_unrec may be + * valid or not, but current_char_set and UCLYhndl_for_unspec SHOULD + * ALWAYS be a valid charset. Initialized here and may be changed later + * from lynx.cfg/command_line/options_menu. - LP (**) + */ + /* + * Set up the compilation default character set. - FM + */ + current_char_set = safeUCGetLYhndl_byMIME(CHARACTER_SET); + /* + * Set up HTTP default for unlabeled charset (iso-8859-1). + */ + UCLYhndl_for_unspec = LATIN1; + StrAllocCopy(UCAssume_MIMEcharset, + LYCharSet_UC[UCLYhndl_for_unspec].MIMEname); + + /* + * Make sure we have the edit map declared. - FM + */ + if (!LYEditmapDeclared()) { + fprintf(stderr, gettext("\nLynx edit map not declared.\n\n")); exit(-1); } @@ -1199,8 +1296,7 @@ else {init_ctrl_break[0] = 1;} if ((cp = strchr(lynx_lss_file, '~'))) { *(cp++) = '\0'; StrAllocCopy(temp, lynx_lss_file); - if ((len=strlen(temp)) > 0 && temp[len-1] == '/') - temp[len-1] = '\0'; + LYTrimPathSep(temp); #ifdef VMS StrAllocCat(temp, HTVMS_wwwName((char *)Home_Dir())); #else @@ -1215,7 +1311,7 @@ else {init_ctrl_break[0] = 1;} * inform the user and exit. */ if ((fp = fopen(lynx_lss_file, "r")) == NULL) { - fprintf(stderr, "\nLynxile file %s is not available.\n\n", + fprintf(stderr, gettext("\nLynx file %s is not available.\n\n"), lynx_lss_file); } else @@ -1223,22 +1319,24 @@ else {init_ctrl_break[0] = 1;} fclose(fp); style_readFromFile(lynx_lss_file); } -#endif - - /* - * Make sure we have the edit map declared. - FM - */ - if (!LYEditmapDeclared()) { - fprintf(stderr, "\nLynx edit map not declared.\n\n"); - exit(-1); - } +#endif /* USE_HASH */ #if USE_COLOR_TABLE /* * Set up default foreground and background colors. */ lynx_setup_colors(); -#endif /* USE_SLANG */ +#endif /* USE_COLOR_TABLE */ + + /* + * Set the original directory, used for default download + */ + if (!strcmp(Current_Dir(filename), ".")) { + if ((cp = getenv("PWD")) != 0) + StrAllocCopy(original_dir, cp); + } else { + StrAllocCopy(original_dir, filename); + } /* * Set the compilation default signature file. - FM @@ -1248,25 +1346,110 @@ else {init_ctrl_break[0] = 1;} StrAllocCopy(LynxSigFile, filename); LYAddPathToHome(filename, sizeof(filename), LynxSigFile); StrAllocCopy(LynxSigFile, filename); - if (TRACE) - fprintf(stderr, "LYNX_SIG_FILE set to '%s'\n", LynxSigFile); + CTRACE(tfp, "LYNX_SIG_FILE set to '%s'\n", LynxSigFile); } else { - if (TRACE) - fprintf(stderr, "LYNX_SIG_FILE '%s' is bad. Ignoring.\n", - LYNX_SIG_FILE); + CTRACE(tfp, "LYNX_SIG_FILE '%s' is bad. Ignoring.\n", LYNX_SIG_FILE); } +#ifdef USE_PSRC + /*this is required for checking the tagspecs when parsing cfg file by + LYReadCFG.c:parse_html_src_spec -HV */ + HTSwitchDTD(TRUE); +#endif /* * Process the configuration file. */ - if (TRACE) { - fprintf(stderr, - "Loading cfg file '%s'.\n", lynx_cfg_file); + read_cfg(lynx_cfg_file, "main program", 1, (FILE *)0); + + /* + * Process the RC file. + */ + read_rc(); + + /* + * Get WWW_HOME environment variable if it exists. + */ + if ((cp = getenv("WWW_HOME")) != NULL) { + StrAllocCopy(startfile, cp); + LYTrimStartfile(startfile); + } + + /* + * Set the LynxHome URL. If it's a file URL and the + * host is defaulted, force in "//localhost", and if + * it's not an absolute URL, make it one. - FM + */ + StrAllocCopy(LynxHome, startfile); + LYFillLocalFileURL((char **)&LynxHome, "file://localhost"); + LYEnsureAbsoluteURL((char **)&LynxHome, "LynxHome", FALSE); + + /* + * Process any command line arguments not already handled. - FM + */ + for (i = 1; i < argc; i++) { + parse_arg(&argv[i], &i); } - read_cfg(lynx_cfg_file); - FREE(lynx_cfg_file); - HTSwitchDTD(New_DTD); + /* + * Process any stdin-derived arguments for a lone "-" which we've + * loaded into LYStdinArgs. - FM + */ + if (LYStdinArgs != NULL) { + char *my_args[2]; + HTList *cur = LYStdinArgs; + + my_args[1] = NULL; + while (NULL != (my_args[0] = (char *)HTList_nextObject(cur))) { + parse_arg(my_args, (int *)0); + } + LYStdinArgs_free(); + } + + /* + * Initialize other things based on the configuration read. + */ + +#ifdef USE_PSRC + if ( (!Old_DTD) != TRUE ) /* skip if they are already initialized -HV */ +#endif + HTSwitchDTD(!Old_DTD); + + /* + * Set up the proper character set with the desired + * startup raw 8-bit or CJK mode handling. - FM + */ + HTMLUseCharacterSet(current_char_set); + +#ifdef EXP_PERSISTENT_COOKIES + /* + * Sod it, this looks like a reasonable place to load the + * cookies file, probably. - RP + */ + if (persistent_cookies) { + if(LYCookieFile == NULL) { + LYAddPathToHome(LYCookieFile = malloc(LY_MAXPATH), LY_MAXPATH, COOKIE_FILE); + } else { + if ((cp = strchr(LYCookieFile, '~'))) { + temp = NULL; + *(cp++) = '\0'; + StrAllocCopy(temp, cp); + LYTrimPathSep(temp); + StrAllocCopy(LYCookieFile, wwwName(Home_Dir())); + StrAllocCat(LYCookieFile, temp); + FREE(temp); + } + } + LYLoadCookies(LYCookieFile); + } +#endif + + /* + * Set up our help and about file base paths. - FM + */ + StrAllocCopy(helpfilepath, helpfile); + if ((cp = LYPathLeaf(helpfilepath)) != helpfilepath) + *cp = '\0'; + LYAddHtmlSep(&helpfilepath); /* * Check for a save space path in the environment. @@ -1286,30 +1469,19 @@ else {init_ctrl_break[0] = 1;} if ((cp = strchr(lynx_save_space, '~')) != NULL) { *(cp++) = '\0'; StrAllocCopy(temp, lynx_save_space); - if (((len = strlen(temp)) > 0) && temp[len-1] == '/') - temp[len-1] = '\0'; -#ifdef DOSPATH - StrAllocCat(temp, HTDOS_wwwName((char *)Home_Dir())); -#else -#ifdef VMS - StrAllocCat(temp, HTVMS_wwwName((char *)Home_Dir())); -#else - StrAllocCat(temp, Home_Dir()); -#endif /* VMS */ -#endif /* DOSPATH */ + LYTrimPathSep(temp); + StrAllocCat(temp, wwwName(Home_Dir())); StrAllocCat(temp, cp); StrAllocCopy(lynx_save_space, temp); FREE(temp); } #ifdef VMS - for (i = 0; lynx_save_space[i]; i++) - lynx_save_space[i] = TOLOWER(lynx_save_space[i]); + LYLowerCase(lynx_save_space); if (strchr(lynx_save_space, '/') != NULL) { - if ((len = strlen(lynx_save_space)) == 1) { + if (strlen(lynx_save_space) == 1) { StrAllocCopy(lynx_save_space, "sys$login:"); } else { - if (lynx_save_space[len-1] != '/') - StrAllocCat(lynx_save_space, "/"); + LYAddPathSep(&lynx_save_space); StrAllocCopy(temp, HTVMS_name("", lynx_save_space)); StrAllocCopy(lynx_save_space, temp); FREE(temp); @@ -1320,12 +1492,7 @@ else {init_ctrl_break[0] = 1;} StrAllocCat(lynx_save_space, ":"); } #else - { - if (((len = strlen(lynx_save_space)) > 1) && - lynx_save_space[len-1] != '/') { - StrAllocCat(lynx_save_space, "/"); - } - } + LYAddPathSep(&lynx_save_space); #endif /* VMS */ } @@ -1339,71 +1506,15 @@ else {init_ctrl_break[0] = 1;} HTFormatInit(); HTFileInit(); - /* - * Get WWW_HOME environment variable if it exists. - */ - if ((cp = getenv("WWW_HOME")) != NULL) { - StrAllocCopy(startfile, cp); - LYTrimHead(startfile); - if (!strncasecomp(startfile, "lynxexec:", 9) || - !strncasecomp(startfile, "lynxprog:", 9)) { - /* - * The original implementations of these schemes expected - * white space without hex escaping, and did not check - * for hex escaping, so we'll continue to support that, - * until that code is redone in conformance with SGML - * principles. - FM - */ - HTUnEscapeSome(startfile, " \r\n\t"); - convert_to_spaces(startfile, TRUE); - } +#ifndef VMS +#ifdef SYSLOG_REQUESTED_URLS + if (syslog_txt) { + syslog(LOG_INFO, "Session start:%s", syslog_txt); + } else { + syslog(LOG_INFO, "Session start"); } - - /* - * Set the LynxHome URL. If it's a file URL and the - * host is defaulted, force in "//localhost", and if - * it's not an absolute URL, make it one. - FM - */ - StrAllocCopy(LynxHome, startfile); - LYFillLocalFileURL((char **)&LynxHome, "file://localhost"); - LYEnsureAbsoluteURL((char **)&LynxHome, "LynxHome"); - - /* - * Process any command line arguments not already handled. - FM - */ - for (i = 1; i < argc; i++) { - parse_arg(&argv[i], &i, argc); - } - - /* - * Process any stdin-derived arguments for a lone "-" which we've - * loaded into LYStdinArgs. - FM - */ - if (LYStdinArgs != NULL) { - char *my_args[2]; - HTList *cur = LYStdinArgs; - - my_args[1] = NULL; - while (NULL != (my_args[0] = (char *)HTList_nextObject(cur))) { - parse_arg(my_args, NULL, -1); - } - LYStdinArgs_free(); - } - -#ifndef VMS -#ifdef SYSLOG_REQUESTED_URLS - if (syslog_txt) { - syslog(LOG_INFO, "Session start:%s", syslog_txt); - } else { - syslog(LOG_INFO, "Session start"); - } -#endif /* SYSLOG_REQUESTED_URLS */ -#endif /* !VMS */ - - /* - * Process the RC file. - */ - read_rc(); +#endif /* SYSLOG_REQUESTED_URLS */ +#endif /* !VMS */ #ifdef USE_SLANG if (LYShowColor >= SHOW_COLOR_ON && @@ -1483,6 +1594,21 @@ else {init_ctrl_break[0] = 1;} no_multibook = TRUE; } +#ifdef SOURCE_CACHE + /* + * Disable source caching if not interactive. + */ + if (dump_output_immediately) + LYCacheSource = SOURCE_CACHE_NONE; +#endif +#ifdef DISP_PARTIAL + /* + * Disable partial mode if not interactive. + */ + if (dump_output_immediately) + display_partial_flag = FALSE; +#endif + #ifdef VMS set_vms_keys(); #endif /* VMS */ @@ -1521,19 +1647,64 @@ else {init_ctrl_break[0] = 1;} } #endif /* !VMS */ +#ifdef SIGTSTP + /* + * Block Control-Z suspending if requested. - FM + */ + if (no_suspend) + (void) signal(SIGTSTP,SIG_IGN); +#endif /* SIGTSTP */ + /* - * Set up the proper character set with the desired - * startup raw 8-bit or CJK mode handling. - FM + * Check for a valid HEAD request. - FM */ - HTMLUseCharacterSet(current_char_set); + if (HEAD_request && LYCanDoHEAD(startfile) != TRUE) { + fprintf(stderr, + "The '-head' switch is for http HEAD requests and cannot be used for\n'%s'.\n", + startfile); + exit_immediately(-1); + } + + /* + * Check for a valid MIME headers request. - FM + */ + if (keep_mime_headers && LYCanDoHEAD(startfile) != TRUE) { + fprintf(stderr, + "The '-mime_header' switch is for http URLs and cannot be used for\n'%s'.\n", + startfile); + exit_immediately(-1); + } + + /* + * Check for a valid traversal request. - FM + */ + if (traversal && strncmp(startfile, "http", 4)) { + fprintf(stderr, + "The '-traversal' switch is for http URLs and cannot be used for\n'%s'.\n", + startfile); + exit_immediately(-1); + } + + /* + * Finish setting up for an INTERACTIVE session. + * Done here so that URL guessing in LYEnsureAbsoluteURL() can be + * interruptible (terminal is in raw mode, select() works). -BL + */ +#ifdef USE_PSRC + if (!dump_output_immediately) + HTMLSRC_init_caches(); /* do it before terminal is initialized*/ +#endif + if (!dump_output_immediately) { + setup(terminal); + } /* * If startfile is a file URL and the host is defaulted, * force in "//localhost", and if it's not an absolute URL, * make it one. - FM */ LYFillLocalFileURL((char **)&startfile, "file://localhost"); - LYEnsureAbsoluteURL((char **)&startfile, "STARTFILE"); + LYEnsureAbsoluteURL((char **)&startfile, "STARTFILE", FALSE); /* * If homepage was specified and is a file URL with the @@ -1542,7 +1713,7 @@ else {init_ctrl_break[0] = 1;} */ if (homepage) { LYFillLocalFileURL((char **)&homepage, "file://localhost"); - LYEnsureAbsoluteURL((char **)&homepage, "HOMEPAGE"); + LYEnsureAbsoluteURL((char **)&homepage, "HOMEPAGE", FALSE); } /* @@ -1562,110 +1733,30 @@ else {init_ctrl_break[0] = 1;} if (inlocaldomain()) { #if !defined(HAVE_UTMP) || defined(VMS) /* not selective */ telnet_ok = !no_inside_telnet && !no_outside_telnet && telnet_ok; +#ifndef DISABLE_NEWS news_ok = !no_inside_news && !no_outside_news && news_ok; +#endif ftp_ok = !no_inside_ftp && !no_outside_ftp && ftp_ok; rlogin_ok = !no_inside_rlogin && !no_outside_rlogin && rlogin_ok; #else - if (TRACE) - fprintf(stderr,"LYMain.c: User in Local domain\n"); + CTRACE(tfp,"LYMain.c: User in Local domain\n"); telnet_ok = !no_inside_telnet && telnet_ok; +#ifndef DISABLE_NEWS news_ok = !no_inside_news && news_ok; +#endif ftp_ok = !no_inside_ftp && ftp_ok; rlogin_ok = !no_inside_rlogin && rlogin_ok; #endif /* !HAVE_UTMP || VMS */ } else { - if (TRACE) - fprintf(stderr,"LYMain.c: User in REMOTE domain\n"); + CTRACE(tfp,"LYMain.c: User in REMOTE domain\n"); telnet_ok = !no_outside_telnet && telnet_ok; +#ifndef DISABLE_NEWS news_ok = !no_outside_news && news_ok; +#endif ftp_ok = !no_outside_ftp && ftp_ok; rlogin_ok = !no_outside_rlogin && rlogin_ok; } -#ifdef SIGTSTP - /* - * Block Control-Z suspending if requested. - FM - */ - if (no_suspend) - (void) signal(SIGTSTP,SIG_IGN); -#endif /* SIGTSTP */ - - /* - * Check for a valid HEAD request. - FM - */ - if (HEAD_request && LYCanDoHEAD(startfile) != TRUE) { - fprintf(stderr, - "The '-head' switch is for http HEAD requests and cannot be used for\n'%s'.\n", - startfile); -#ifndef NOSIGHUP - (void) signal(SIGHUP, SIG_DFL); -#endif /* NOSIGHUP */ - (void) signal(SIGTERM, SIG_DFL); -#ifndef VMS - (void) signal(SIGINT, SIG_DFL); -#endif /* !VMS */ -#ifdef SIGTSTP - if (no_suspend) - (void) signal(SIGTSTP,SIG_DFL); -#endif /* SIGTSTP */ - exit(-1); - } - - /* - * Check for a valid MIME headers request. - FM - */ - if (keep_mime_headers && LYCanDoHEAD(startfile) != TRUE) { - fprintf(stderr, - "The '-mime_header' switch is for http URLs and cannot be used for\n'%s'.\n", - startfile); -#ifndef NOSIGHUP - (void) signal(SIGHUP, SIG_DFL); -#endif /* NOSIGHUP */ - (void) signal(SIGTERM, SIG_DFL); -#ifndef VMS - (void) signal(SIGINT, SIG_DFL); -#endif /* !VMS */ -#ifdef SIGTSTP - if (no_suspend) - (void) signal(SIGTSTP,SIG_DFL); -#endif /* SIGTSTP */ - exit(-1); - } - - /* - * Check for a valid traversal request. - FM - */ - if (traversal && strncmp(startfile, "http", 4)) { - fprintf(stderr, - "The '-traversal' switch is for http URLs and cannot be used for\n'%s'.\n", - startfile); -#ifndef NOSIGHUP - (void) signal(SIGHUP, SIG_DFL); -#endif /* NOSIGHUP */ - (void) signal(SIGTERM, SIG_DFL); -#ifndef VMS - (void) signal(SIGINT, SIG_DFL); -#endif /* !VMS */ -#ifdef SIGTSTP - if (no_suspend) - (void) signal(SIGTSTP,SIG_DFL); -#endif /* SIGTSTP */ - exit(-1); - } - - /* - * Set up our help and about file base paths. - FM - */ - StrAllocCopy(helpfilepath, helpfile); - if ((cp=strrchr(helpfilepath, '/')) != NULL) - *cp = '\0'; - /* - * Remove code to merge the historical about_lynx - * directory into lynx_help. - HN - */ - StrAllocCat(helpfilepath, "/"); - - /* * Make sure our bookmark default strings * are all allocated and synchronized. - FM @@ -1698,7 +1789,7 @@ else {init_ctrl_break[0] = 1;} keypad_mode = LINKS_ARE_NUMBERED; } } - if (display != NULL && *display != '\0') { + if (x_display != NULL && *x_display != '\0') { LYisConfiguredForX = TRUE; } if (dump_output_width > 0) { @@ -1709,33 +1800,37 @@ else {init_ctrl_break[0] = 1;} (keypad_mode == LINKS_ARE_NUMBERED || keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED)) printlist(stdout,FALSE); -#ifndef NOSIGHUP - (void) signal(SIGHUP, SIG_DFL); -#endif /* NOSIGHUP */ - (void) signal(SIGTERM, SIG_DFL); -#ifndef VMS - (void) signal(SIGINT, SIG_DFL); -#endif /* !VMS */ -#ifdef SIGTSTP - if (no_suspend) - (void) signal(SIGTSTP,SIG_DFL); -#endif /* SIGTSTP */ +#ifdef EXP_PERSISTENT_COOKIES + /* + * We want to save cookies picked up when in immediate dump + * mode. Instead of calling cleanup() here, let's only call + * this one. - BJP + */ + if (persistent_cookies) + LYStoreCookies(LYCookieFile); +#endif /* EXP_PERSISTENT_COOKIES */ + cleanup_files(); + exit_immediately(status); } else { /* - * Finish setting up and start an - * INTERACTIVE session. - FM + * Start an INTERACTIVE session. - FM */ - if (setup(terminal)) { - if (display != NULL && *display != '\0') { - LYisConfiguredForX = TRUE; - } - ena_csi((LYlowest_eightbit[current_char_set] > 155)); - status = mainloop(); + if (x_display != NULL && *x_display != '\0') { + LYisConfiguredForX = TRUE; } +#ifdef USE_COLOR_STYLE + cache_tag_styles(); +#endif + + ena_csi((LYlowest_eightbit[current_char_set] > 155)); + LYOpenCloset(); + status = mainloop(); + LYCloseCloset(); + cleanup(); + exit(status); } - cleanup(); - exit(status); + return(status); /* though redundant, for compiler-warnings */ } /* @@ -1763,682 +1858,582 @@ PUBLIC void LYRegisterLynxProtocols NOARGS HTRegisterProtocol(&LYLynxCookies); } +#ifndef NO_CONFIG_INFO /* - * Parse one argument, optionally picking up the next entry in argv (if - * appropriate). + * Some stuff to reload lynx.cfg without restarting new lynx session, + * also load options menu items and command-line options + * to make things consistent. Not implemented yet. + * Warning: experimental, more main() reorganization required. + * + * Called by user of interactive session by LYNXCFG://reload/ link. */ - -PRIVATE char * scan3D ARGS2( - char **, argv, - int *, i) +PUBLIC void reload_read_cfg NOARGS { - char *result; + if (LYRestricted) return; /* for sure */ - if ((result=strchr(argv[0],'=')) != NULL) - return result+1; - if (argv[1] && i) - (*i)++; /* Let master know we've stolen an argument */ - return argv[1]; -} - -PRIVATE void parse_arg ARGS3( - char **, argv, - int *, i, - int, argc) -{ - char *cp; -#ifndef VMS - static char display_putenv_command[142]; -#endif /* !VMS */ -#define nextarg ((cp=scan3D(&argv[0], i))!=NULL) - - /* - * Check for a command line startfile. - FM - */ - if (argv[0][0] != '-') { - StrAllocCopy(startfile, argv[0]); - LYTrimHead(startfile); - if (!strncasecomp(startfile, "lynxexec:", 9) || - !strncasecomp(startfile, "lynxprog:", 9)) { - /* - * The original implementations of these schemes expected - * white space without hex escaping, and did not check - * for hex escaping, so we'll continue to support that, - * until that code is redone in conformance with SGML - * principles. - FM - */ - HTUnEscapeSome(startfile, " \r\n\t"); - convert_to_spaces(startfile, TRUE); - } - return; - } + /* save .lynxrc file in case we change something from Options Menu */ + if (!save_rc()) return; /* can not write the very own file :( */ - /* - * Skip any lone "-" arguments, because we've loaded - * the stdin input into an HTList structure for - * special handling. - FM - */ - if (strcmp(argv[0], "-") == 0) { - return; - } - - switch (TOLOWER(argv[0][1])) { + { + /* set few safe flags: */ +#ifdef PERSISTENT_COOKIES + BOOLEAN persistent_cookies_flag = persistent_cookies; + char * LYCookieFile_flag = LYCookieFile; +#endif - case 'a': - if (strncmp(argv[0], "-anonymous", 10) == 0) { + free_lynx_cfg(); /* free downloaders, printers, not always environments */ /* - * Should already have been set, so we don't - * override or replace any additional - * restrictions from the command line. - FM + * Process the configuration file. */ - if (!anon_restrictions_set) - parse_restrictions("default"); - anon_restrictions_set = TRUE; - - } else if ((strncmp(argv[0], "-assume_charset", 15) == 0) || - (strncmp(argv[0], "-assume_local_charset", 21) == 0) || - (strncmp(argv[0], "-assume_unrec_charset", 21) == 0)) { - BOOL local_flag = (argv[0][8] == 'l'); - BOOL unrec_flag = (argv[0][8] == 'u'); - - if (nextarg) { - int j; - - for (j = 0; cp[j]; j++) - cp[j] = TOLOWER(cp[j]); - if (local_flag) { - StrAllocCopy(UCAssume_localMIMEcharset, cp); - if (UCAssume_localMIMEcharset && *UCAssume_localMIMEcharset) - UCLYhndl_HTFile_for_unspec = - UCGetLYhndl_byMIME(UCAssume_localMIMEcharset); - } else if (unrec_flag) { - StrAllocCopy(UCAssume_unrecMIMEcharset, cp); - if (UCAssume_unrecMIMEcharset && *UCAssume_unrecMIMEcharset) - UCLYhndl_for_unrec = - UCGetLYhndl_byMIME(UCAssume_unrecMIMEcharset); - } else { - StrAllocCopy(UCAssume_MIMEcharset, cp); - if (UCAssume_MIMEcharset && *UCAssume_MIMEcharset) - UCLYhndl_for_unspec = - UCGetLYhndl_byMIME(UCAssume_MIMEcharset); - } - } else { - if (local_flag) - UCLYhndl_HTFile_for_unspec = 0; - else if (unrec_flag) - UCLYhndl_for_unrec = 0; - else - UCLYhndl_for_unspec = 0; - } + read_cfg(lynx_cfg_file, "main program", 1, (FILE *)0); - } else if (strncmp(argv[0], "-auth", 5) == 0) { /* - * Authentication information for protected documents. + * Process the RC file. */ - char *auth_info = NULL; + read_rc(); - if (nextarg) { - StrAllocCopy(auth_info, cp); - memset(cp, ' ', strlen(cp)); /* Let's not show too much */ - } - if (auth_info != NULL) { - if ((cp = strchr(auth_info, ':')) != NULL) { /* Pw */ - *cp++ = '\0'; /* Terminate ID */ - if (*cp) { - HTUnEscape(cp); - StrAllocCopy(authentication_info[1], cp); - } - } - if (*auth_info) { /* Id */ - HTUnEscape(auth_info); - StrAllocCopy(authentication_info[0], auth_info); - } - FREE(auth_info); - } - } else { - goto Output_Error_and_Help_List; - } - break; + /* We are not interested in startfile here */ + /* but other things may be lost: */ - case 'b': - if (strcmp(argv[0], "-base") == 0) { /* - * Treat -source equivalently to an interactive - * download with LYPrefixBaseToSource configured - * to TRUE, so that a BASE tag is prepended for - * text/html content types. We normally treat - * the module-wide global LYPrefixBaseToSource - * flag as FALSE with -source, but force it TRUE, - * later, if LYPrependBase is set TRUE here. - FM + * Process any command line arguments not already handled. */ - LYPrependBase = TRUE; - if (HTOutputFormat == HTAtom_for("www/dump")) { - HTOutputFormat = HTAtom_for("www/download"); - } + /* Not implemented yet here */ - } else if (strcmp(argv[0], "-book") == 0) { /* - * Use bookmarks as startfile. + * Process any stdin-derived arguments for a lone "-" which we've + * loaded into LYStdinArgs. */ - bookmark_start = TRUE; + /* Not implemented yet here */ - } else if (strcmp(argv[0], "-buried_news") == 0) { /* - * Toggle scans for buried news references. + * Initialize other things based on the configuration read. */ - if (scan_for_buried_news_references) - scan_for_buried_news_references = FALSE; - else - scan_for_buried_news_references = TRUE; - -#ifdef USE_SLANG - } else if (strncmp(argv[0], "-blink", 6) == 0) { - Lynx_Color_Flags |= SL_LYNX_USE_BLINK; -#endif /* USE_SLANG */ + /* Not implemented yet here, + * a major problem: file paths + * like lynx_save_space, LYCookieFile etc. + */ +#ifdef PERSISTENT_COOKIES + /* restore old settings */ + if (persistent_cookies != persistent_cookies_flag) { + persistent_cookies = persistent_cookies_flag; + HTAlert(gettext("persistent cookies state will be changed in next session only.")); + } + if (strcmp(LYCookieFile, LYCookieFile_flag)) { + StrAllocCopy(LYCookieFile, LYCookieFile_flag); + CTRACE(tfp, "cookies file can be changed in next session only, restored.\n") + } +#endif - } else { - goto Output_Error_and_Help_List; } - break; - - case 'c': - if (strncmp(argv[0], "-cache", 6) == 0) { - if (nextarg) - HTCacheSize = atoi(cp); - /* - * Limit size. - */ - if (HTCacheSize < 2) HTCacheSize = 2; +} +#endif /* !NO_CONFIG_INFO */ - } else if (strncmp(argv[0], "-case", 5) == 0) { - case_sensitive = TRUE; - } else if (strncmp(argv[0], "-cfg", 4) == 0) { - /* - * Already read the alternate configuration file - * so just check whether we need to increment i - */ - if (nextarg) - ; /* do nothing */ +/* There are different ways of setting arguments on the command line, and + * there are different types of arguments. These include: + * + * -set_some_variable ==> some_variable = TRUE + * -toggle_some_variable ==> some_variable = !some_variable + * -some_variable=value ==> some_variable = value + * + * Others are complicated and require a function call. + */ - } else if (strncmp(argv[0], "-child", 6) == 0) { - child_lynx = TRUE; - no_disk_save = TRUE; +struct parse_args_type; +typedef int (*ParseFunc) PARAMS((char *)); -#ifdef USE_SLANG - } else if (strncmp(argv[0], "-color", 6) == 0) { - Lynx_Color_Flags |= SL_LYNX_USE_COLOR; - if (LYShowColor != SHOW_COLOR_ALWAYS) { - LYShowColor = SHOW_COLOR_ON; - } -#endif /* USE_SLANG */ +typedef union { + BOOLEAN * set_value; + int * int_value; + char ** str_value; + ParseFunc fun_value; +} ParseUnion; - } else if (strncmp(argv[0], "-crawl", 6) == 0) { - crawl = TRUE; - LYcols = 80; +/* + * Storing the four types of data in separate fields costs about 1K of data. + * However, this provides usable type-checking. The initial version of the + * parse_args_type used 'long' for all types, and dumped core when processing + * "lynx -help". (The compiler was unable to detect some minor errors). + */ +#ifdef PARSE_DEBUG +#define ParseData BOOLEAN *set_value; int *int_value; char **str_value; ParseFunc fun_value +#define PARSE_SET(n,t,v,h) {n,t, v, 0, 0, 0, h} +#define PARSE_INT(n,t,v,h) {n,t, 0, v, 0, 0, h} +#define PARSE_STR(n,t,v,h) {n,t, 0, 0, v, 0, h} +#define PARSE_FUN(n,t,v,h) {n,t, 0, 0, 0, v, h} +#else +#define ParseData long value +#define PARSE_SET(n,t,v,h) {n,t, (long) (v), h} +#define PARSE_INT(n,t,v,h) {n,t, (long) (v), h} +#define PARSE_STR(n,t,v,h) {n,t, (long) (v), h} +#define PARSE_FUN(n,t,v,h) {n,t, (long) (v), h} +#endif - } else if (strncmp(argv[0], "-cookies", 8) == 0) { - if (LYSetCookies) - LYSetCookies = FALSE; - else - LYSetCookies = TRUE; +typedef struct parse_args_type +{ + CONST char *name; + int type; +#define IGNORE_ARG 0x000 +#define TOGGLE_ARG 0x001 +#define SET_ARG 0x002 +#define UNSET_ARG 0x003 +#define FUNCTION_ARG 0x004 +#define LYSTRING_ARG 0x005 +#define INT_ARG 0x006 +#define STRING_ARG 0x007 +#define ARG_TYPE_MASK 0x0FF +#define NEED_NEXT_ARG 0x100 + +#define NEED_INT_ARG (NEED_NEXT_ARG | INT_ARG) +#define NEED_LYSTRING_ARG (NEED_NEXT_ARG | LYSTRING_ARG) +#define NEED_STRING_ARG (NEED_NEXT_ARG | STRING_ARG) +#define NEED_FUNCTION_ARG (NEED_NEXT_ARG | FUNCTION_ARG) + + /* If the NEED_NEXT_ARG flags is set, and the option was not specified + * with an '=' character, then use the next argument in the argv list. + */ + + ParseData; + CONST char *help_string; +} +Parse_Args_Type; -#ifndef VMS - } else if (strncmp(argv[0], "-core", 5) == 0) { - if (LYNoCore) - LYNoCore = FALSE; - else - LYNoCore = TRUE; -#endif /* !VMS */ +/* -auth, -pauth */ +static int parse_authentication ARGS2( + char *, next_arg, + char **, result) +{ + /* + * Authentication information for protected documents. + */ + char *auth_info = 0; - } else { - goto Output_Error_and_Help_List; + if (next_arg != 0) { + StrAllocCopy(auth_info, next_arg); + memset(next_arg, ' ', strlen(next_arg)); /* Let's not show too much */ } - break; - - case 'd': - if (strncmp(argv[0], "-display", 8) == 0) { - if (nextarg) { -#ifdef VMS - int j; - for (j = 0; cp[j]; j++) - cp[j] = TOUPPER(cp[j]); - Define_VMSLogical(DISPLAY, cp ? cp : ""); -#else - sprintf(display_putenv_command, "DISPLAY=%s", cp ? cp : ""); - putenv(display_putenv_command); -#endif /* VMS */ - if ((cp = getenv(DISPLAY)) != NULL && *cp != '\0') { - StrAllocCopy(display, cp); - } - } - } else if (strncmp(argv[0], "-dump", 5) == 0) { - dump_output_immediately = TRUE; - LYcols=80; + if (auth_info != 0) { + char *cp; - } else { - goto Output_Error_and_Help_List; + if ((cp = strchr(auth_info, ':')) != 0) { /* Pw */ + *cp++ = '\0'; /* Terminate ID */ + HTUnEscape(cp); + StrAllocCopy(result[1], cp); + } + if (*auth_info) { /* Id */ + HTUnEscape(auth_info); + StrAllocCopy(result[0], auth_info); + } + FREE(auth_info); } - break; - - case 'e': - if (strncmp(argv[0], "-editor", 7) == 0) { - if (nextarg) - StrAllocCopy(editor,cp); - system_editor = TRUE; + return 0; +} - } else if (strncmp(argv[0], "-emacskeys", 10) == 0) { - emacs_keys = TRUE; +/* -anonymous */ +static int anonymous_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + /* + * Should already have been set, so we don't + * override or replace any additional + * restrictions from the command line. - FM + */ + if (!LYRestricted) + parse_restrictions("default"); + LYRestricted = TRUE; + return 0; +} - } else if (strncmp(argv[0], "-enable_scrollback", 18) == 0) { - if (enable_scrollback) - enable_scrollback = FALSE; - else - enable_scrollback = TRUE; +/* -assume_charset */ +static int assume_charset_fun ARGS1( + char *, next_arg) +{ + UCLYhndl_for_unspec = safeUCGetLYhndl_byMIME(next_arg); + StrAllocCopy(UCAssume_MIMEcharset, + LYCharSet_UC[UCLYhndl_for_unspec].MIMEname); +/* this may be a memory for bogus typo - + StrAllocCopy(UCAssume_MIMEcharset, next_arg); + LYLowerCase(UCAssume_MIMEcharset); */ + + return 0; +} - } else if (strncmp(argv[0], "-error_file", 11) == 0) { - /* - * Output return (success/failure) code - * of an HTTP transaction. - */ - if (nextarg) - http_error_file = cp; +/* -assume_local_charset */ +static int assume_local_charset_fun ARGS1( + char *, next_arg) +{ + UCLYhndl_HTFile_for_unspec = safeUCGetLYhndl_byMIME(next_arg); + return 0; +} -#if defined(EXEC_LINKS) || defined(EXEC_SCRIPTS) - } else if (strncmp(argv[0], "-exec", 5) == 0) { -#ifndef NEVER_ALLOW_REMOTE_EXEC - local_exec = TRUE; -#else - local_exec_on_local_files = TRUE; -#endif /* NEVER_ALLOW_REMOTE_EXEC */ -#endif /* EXEC_LINKS || EXEC_SCRIPTS */ - - } else { - goto Output_Error_and_Help_List; - } - break; - - case 'f': - if (strncmp(argv[0], "-force_html", 11) == 0) { - LYforce_HTML_mode = TRUE; - - } else if (strncmp(argv[0], "-fileversions", 13) == 0) { -#ifdef VMS - HTVMSFileVersions = TRUE; -#else - break;; -#endif /* VMS */ - - } else if (strncmp(argv[0], "-force_secure", 13) == 0) { - if (LYForceSSLCookiesSecure) - LYForceSSLCookiesSecure = FALSE; - else - LYForceSSLCookiesSecure = TRUE; +/* -assume_unrec_charset */ +static int assume_unrec_charset_fun ARGS1( + char *, next_arg) +{ + UCLYhndl_for_unrec = safeUCGetLYhndl_byMIME(next_arg); + return 0; +} - } else if (strncmp(argv[0], "-from", 5) == 0) { - if (LYNoFromHeader) - LYNoFromHeader = FALSE; - else - LYNoFromHeader = TRUE; +/* -auth */ +static int auth_fun ARGS1( + char *, next_arg) +{ + parse_authentication(next_arg, authentication_info); + return 0; +} - } else if (strncmp(argv[0], "-ftp", 4) == 0) { - ftp_ok = FALSE; +/* -base */ +static int base_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + /* + * Treat -source equivalently to an interactive download with + * LYPrefixBaseToSource configured to TRUE, so that a BASE tag is + * prepended for text/html content types. We normally treat the + * module-wide global LYPrefixBaseToSource flag as FALSE with + * -source, but force it TRUE, later, if LYPrependBase is set + * TRUE here. - FM + */ + LYPrependBase = TRUE; + if (HTOutputFormat == HTAtom_for("www/dump")) + HTOutputFormat = HTAtom_for("www/download"); - } else { - goto Output_Error_and_Help_List; - } - break; + return 0; +} - case 'g': - if (strcmp(argv[0], "-get_data") == 0) { - /* - * User data for GET form. - */ - char **get_data; - char buf[1024]; +#ifdef USE_SLANG +/* -blink */ +static int blink_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + Lynx_Color_Flags |= SL_LYNX_USE_BLINK; + return 0; +} +#endif - /* - * On Unix, conflicts with curses when interactive - * so let's force a dump. - CL - * - * On VMS, mods have been made in LYCurses.c to deal with - * potential conflicts, so don't force the dump here. - FM - */ -#ifndef VMS - dump_output_immediately = TRUE; - LYcols = 80; -#endif /* VMS */ +/* -cache */ +static int cache_fun ARGS1( + char *, next_arg) +{ + if (next_arg != 0) + HTCacheSize = atoi(next_arg); + /* + * Limit size. + */ + if (HTCacheSize < 2) HTCacheSize = 2; - StrAllocCopy(form_get_data, "?"); /* Prime the pump */ - get_data = &form_get_data; + return 0; +} - /* - * Build GET data for later. Stop reading when we see a line - * with "---" as its first three characters. - */ - while (fgets(buf, sizeof(buf), stdin) && - strncmp(buf, "---", 3) != 0) { - int j; +/* -child */ +static int child_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + child_lynx = TRUE; + no_disk_save = TRUE; + return 0; +} - for (j = strlen(buf) - 1; j >= 0 && /* Strip line terminators */ - (buf[j] == CR || buf[j] == LF); j--) { - buf[j] = '\0'; - } - StrAllocCat(*get_data, buf); - } +#ifdef USE_SLANG +/* -color */ +static int color_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + Lynx_Color_Flags |= SL_LYNX_USE_COLOR; - } else { - goto Output_Error_and_Help_List; - } - break; + if (LYShowColor != SHOW_COLOR_ALWAYS) + LYShowColor = SHOW_COLOR_ON; - case 'h': - if (strcmp(argv[0], "-help") == 0) { - goto Output_Help_List; + return 0; +} +#endif - } else if (strcmp(argv[0], "-head") == 0) { - /* - * Return mime headers. - */ - HEAD_request = TRUE; - - } else if (strncmp(argv[0], "-hiddenlinks", 7) == 0) { - if (nextarg) { - if (strncasecomp(cp, "merge", 1) == 0) - LYHiddenLinks = HIDDENLINKS_MERGE; - else if (strncasecomp(cp, "listonly", 1) == 0) - LYHiddenLinks = HIDDENLINKS_SEPARATE; - else if (strncasecomp(cp, "ignore", 1) == 0) - LYHiddenLinks = HIDDENLINKS_IGNORE; - else - goto Output_Error_and_Help_List; - } else - LYHiddenLinks = HIDDENLINKS_MERGE; +/* -crawl */ +static int crawl_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + crawl = TRUE; + LYcols = 80; + return 0; +} - } else if (strncmp(argv[0], "-historical", 11) == 0) { - if (historical_comments) - historical_comments = FALSE; - else - historical_comments = TRUE; - - } else if (strncmp(argv[0], "-homepage", 9) == 0) { - if (nextarg) { - StrAllocCopy(homepage, cp); - LYTrimHead(homepage); - if (!strncasecomp(homepage, "lynxexec:", 9) || - !strncasecomp(homepage, "lynxprog:", 9)) { - /* - * The original implementations of these schemes expected - * white space without hex escaping, and did not check - * for hex escaping, so we'll continue to support that, - * until that code is redone in conformance with SGML - * principles. - FM - */ - HTUnEscapeSome(homepage, " \r\n\t"); - convert_to_spaces(homepage, TRUE); - } - } - } else { - goto Output_Error_and_Help_List; +/* -display */ +static int display_fun ARGS1( + char *, next_arg) +{ + if (next_arg != 0) { + LYsetXDisplay(next_arg); + if ((next_arg = LYgetXDisplay()) != 0) + StrAllocCopy(x_display, next_arg); } - break; - case 'i': - if (strncmp(argv[0], "-image_links", 12) == 0) { - if (clickable_images) - clickable_images = FALSE; - else - clickable_images = TRUE; - - } else if (strncmp(argv[0], "-index", 6) == 0) { - if (nextarg) - StrAllocCopy(indexfile, cp); - - } else if (strncmp(argv[0], "-ismap", 6) == 0) { - if (LYNoISMAPifUSEMAP) - LYNoISMAPifUSEMAP = FALSE; - else - LYNoISMAPifUSEMAP = TRUE; + return 0; +} - } else { - goto Output_Error_and_Help_List; - } - break; +/* -dump */ +static int dump_output_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + dump_output_immediately = TRUE; + LYcols = 80; + return 0; +} - case 'l': - if (strncmp(argv[0], "-link", 5) == 0) { - if (nextarg) - ccount = atoi(cp); +/* -editor */ +static int editor_fun ARGS1( + char *, next_arg) +{ + if (next_arg != 0) + StrAllocCopy(editor, next_arg); + system_editor = TRUE; + return 0; +} - } else if (strncmp(argv[0], "-localhost", 10) == 0) { - local_host_only = TRUE; +/* -error_file */ +static int error_file_fun ARGS1( + char *, next_arg) +{ + /* + * Output return (success/failure) code + * of an HTTP transaction. + */ + if (next_arg != 0) + http_error_file = next_arg; + return 0; +} #if defined(EXEC_LINKS) || defined(EXEC_SCRIPTS) - } else if (strncmp(argv[0], "-locexec", 8) == 0) { - local_exec_on_local_files = TRUE; -#endif /* EXEC_LINKS || EXEC_SCRIPTS */ - -#if defined(USE_HASH) - } else if (strncmp(argv[0], "-lss", 4) == 0) { - /* - * Already read the alternate lynx-style file - * so just check whether we need to increment i - */ - if (nextarg) - ; /* do nothing */ +/* -exec */ +static int exec_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ +#ifndef NEVER_ALLOW_REMOTE_EXEC + local_exec = TRUE; +#else + local_exec_on_local_files = TRUE; +#endif /* NEVER_ALLOW_REMOTE_EXEC */ + return 0; +} #endif - } else { - goto Output_Error_and_Help_List; - } - break; - - case 'm': - if (strcmp(argv[0], "-mime_header") == 0) { - /* - * Include mime headers and force source dump. - */ - keep_mime_headers = TRUE; - dump_output_immediately = TRUE; - HTOutputFormat = (LYPrependBase ? - HTAtom_for("www/download") : HTAtom_for("www/dump")); - LYcols=999; - - } else if (strncmp(argv[0], "-minimal", 8) == 0) { - if (minimal_comments) - minimal_comments = FALSE; - else - minimal_comments = TRUE; - - } else { - goto Output_Error_and_Help_List; - } - break; +/* -get_data */ +static int get_data_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + /* + * User data for GET form. + */ + char **get_data; + char *buf = NULL; - case 'n': - if (strncmp(argv[0], "-newschunksize", 14) == 0) { - if (nextarg) { - HTNewsChunkSize = atoi(cp); - /* - * If the new HTNewsChunkSize exceeds the maximum, - * increase HTNewsMaxChunk to this size. - FM - */ - if (HTNewsChunkSize > HTNewsMaxChunk) { - HTNewsMaxChunk = HTNewsChunkSize; - } - } + /* + * On Unix, conflicts with curses when interactive + * so let's force a dump. - CL + * + * On VMS, mods have been made in LYCurses.c to deal with + * potential conflicts, so don't force the dump here. - FM + */ +#ifndef VMS + dump_output_immediately = TRUE; + LYcols = 80; +#endif /* VMS */ - } else if (strncmp(argv[0], "-newsmaxchunk", 13) == 0) { - if (nextarg) { - HTNewsMaxChunk = atoi(cp); - /* - * If HTNewsChunkSize exceeds the new maximum, - * reduce HTNewsChunkSize to this maximum. - FM - */ - if (HTNewsChunkSize > HTNewsMaxChunk) { - HTNewsChunkSize = HTNewsMaxChunk; - } - } + StrAllocCopy(form_get_data, "?"); /* Prime the pump */ + get_data = &form_get_data; - } else if (strncmp(argv[0], "-nobrowse", 9) == 0) { - HTDirAccess = HT_DIR_FORBID; + /* + * Build GET data for later. Stop reading when we see a line + * with "---" as its first three characters. + */ + while (LYSafeGets(&buf, stdin) != 0 && + strncmp(buf, "---", 3) != 0) { + int j; - } else if (strncmp(argv[0], "-nocc", 5) == 0) { - LYNoCc = TRUE; + for (j = strlen(buf) - 1; j >= 0 && /* Strip line terminators */ + (buf[j] == CR || buf[j] == LF); j--) + buf[j] = '\0'; - } else if (strncmp(argv[0], "-nocolor", 8) == 0) { - LYShowColor = SHOW_COLOR_NEVER; -#ifdef USE_SLANG - Lynx_Color_Flags &= ~SL_LYNX_USE_COLOR; - Lynx_Color_Flags |= SL_LYNX_OVERRIDE_COLOR; -#endif + StrAllocCat(*get_data, buf); + } -#if defined(EXEC_LINKS) || defined(EXEC_SCRIPTS) - } else if (strncmp(argv[0], "-noexec", 7) == 0) { - local_exec = FALSE; -#endif /* EXEC_LINKS || EXEC_SCRIPTS */ + return 0; +} - } else if (strncmp(argv[0], "-nofilereferer", 14) == 0) { - no_filereferer = TRUE; +/* -help */ +static int help_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + print_help_and_exit (0); + return 0; +} - } else if (strncmp(argv[0], "-nolist", 7) == 0) { - nolist = TRUE; +/* -hiddenlinks */ +static int hiddenlinks_fun ARGS1( + char *, next_arg) +{ + if (next_arg != 0) { + if (strncasecomp(next_arg, "merge", 1) == 0) + LYHiddenLinks = HIDDENLINKS_MERGE; + else if (strncasecomp(next_arg, "listonly", 1) == 0) + LYHiddenLinks = HIDDENLINKS_SEPARATE; + else if (strncasecomp(next_arg, "ignore", 1) == 0) + LYHiddenLinks = HIDDENLINKS_IGNORE; + else + print_help_and_exit (-1); + } else { + LYHiddenLinks = HIDDENLINKS_MERGE; + } - } else if (strncmp(argv[0], "-nolog", 6) == 0) { - error_logging = FALSE; + return 0; +} - } else if (strcmp(argv[0], "-nopause") == 0) { /* No statusline pauses */ - InfoSecs = 0; - MessageSecs = 0; - AlertSecs = 0; +/* -homepage */ +static int homepage_fun ARGS1( + char *, next_arg) +{ + if (next_arg != 0) { + StrAllocCopy(homepage, next_arg); + LYTrimStartfile(homepage); + } + return 0; +} - } else if (strncmp(argv[0], "-noprint", 8) == 0) { - no_print = TRUE; +/* -mime_header */ +static int mime_header_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + /* + * Include mime headers and force source dump. + */ + keep_mime_headers = TRUE; + dump_output_immediately = TRUE; + HTOutputFormat = (LYPrependBase ? + HTAtom_for("www/download") : HTAtom_for("www/dump")); + LYcols = 999; + return 0; +} - } else if (strcmp(argv[0], "-noredir") == 0) { +#ifndef DISABLE_NEWS +/* -newschunksize */ +static int newschunksize_fun ARGS1( + char *, next_arg) +{ + if (next_arg != 0) { + HTNewsChunkSize = atoi(next_arg); /* - * Don't follow URL redirections. + * If the new HTNewsChunkSize exceeds the maximum, + * increase HTNewsMaxChunk to this size. - FM */ - no_url_redirection = TRUE; - - } else if (strncmp(argv[0], "-noreferer", 10) == 0) { - LYNoRefererHeader = TRUE; - -#ifdef SOCKS - } else if (strncmp(argv[0], "-nosocks", 8) == 0) { - socks_flag = FALSE; -#endif /* SOCKS */ - - } else if (strncmp(argv[0], "-nostatus", 9) == 0) { - no_statusline = TRUE; - - } else if (strncmp(argv[0], "-number_links", 13) == 0) { - number_links = TRUE; - - } else { - goto Output_Error_and_Help_List; + if (HTNewsChunkSize > HTNewsMaxChunk) + HTNewsMaxChunk = HTNewsChunkSize; } - break; + return 0; +} - case 'p': - if (strncmp(argv[0], "-pauth", 6) == 0) { +/* -newsmaxchunk */ +static int newsmaxchunk_fun ARGS1( + char *, next_arg) +{ + if (next_arg) { + HTNewsMaxChunk = atoi(next_arg); /* - * Authentication information for protected proxy server. - AJL + * If HTNewsChunkSize exceeds the new maximum, + * reduce HTNewsChunkSize to this maximum. - FM */ - char *pauth_info = NULL; + if (HTNewsChunkSize > HTNewsMaxChunk) + HTNewsChunkSize = HTNewsMaxChunk; + } + return 0; +} +#endif /* not DISABLE_NEWS */ - if (nextarg) { - StrAllocCopy(pauth_info, cp); - memset(cp, ' ', strlen(cp)); /* Let's not show too much */ - } - if (pauth_info != NULL) { - if ((cp = strchr(pauth_info, ':')) != NULL) { /* Pw */ - *cp++ = '\0'; /* Terminate ID */ - if (*cp) { - HTUnEscape(cp); - StrAllocCopy(proxyauth_info[1], cp); - } - } - if (*pauth_info) { /* Id */ - HTUnEscape(pauth_info); - StrAllocCopy(proxyauth_info[0], pauth_info); - } - FREE(pauth_info); - } +/* -nobrowse */ +static int nobrowse_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + HTDirAccess = HT_DIR_FORBID; + return 0; +} - } else if (strncmp(argv[0], "-popup", 6) == 0) { - LYUseDefSelPop = FALSE; +/* -nocolor */ +static int nocolor_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + LYShowColor = SHOW_COLOR_NEVER; +#ifdef USE_SLANG + Lynx_Color_Flags &= ~SL_LYNX_USE_COLOR; + Lynx_Color_Flags |= SL_LYNX_OVERRIDE_COLOR; +#endif + return 0; +} - } else if (strcmp(argv[0], "-post_data") == 0) { - /* - * User data for POST form. - */ - char **post_data; - char buf[1024]; +/* -nopause */ +static int nopause_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + InfoSecs = 0; + MessageSecs = 0; + AlertSecs = 0; + return 0; +} - /* - * On Unix, conflicts with curses when interactive - * so let's force a dump. - CL - * - * On VMS, mods have been made in LYCurses.c to deal with - * potential conflicts, so don't force a dump here. - FM - */ +/* -pauth */ +static int pauth_fun ARGS1( + char *, next_arg) +{ + parse_authentication(next_arg, proxyauth_info); + return 0; +} + +/* -post_data */ +static int post_data_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + /* + * User data for POST form. + */ + char **post_data; + char *buf = NULL; + + /* + * On Unix, conflicts with curses when interactive so let's force a dump. + * - CL + * + * On VMS, mods have been made in LYCurses.c to deal with potential + * conflicts, so don't force a dump here. - FM + */ #ifndef VMS - dump_output_immediately = TRUE; - LYcols = 80; + dump_output_immediately = TRUE; + LYcols = 80; #endif /* VMS */ - post_data = &form_post_data; + post_data = &form_post_data; - /* - * Build post data for later. Stop reading when we see a line - * with "---" as its first three characters. - */ - while (fgets(buf, sizeof(buf), stdin) && - strncmp(buf, "---", 3) != 0) { - int j; + /* + * Build post data for later. Stop reading when we see a line with "---" + * as its first three characters. + */ + while (LYSafeGets(&buf, stdin) != 0 && + strncmp(buf, "---", 3) != 0) { + int j; - for (j = strlen(buf) - 1; j >= 0 && /* Strip line terminators */ - (buf[j] == CR || buf[j] == LF); j--) { - buf[j] = '\0'; - } - StrAllocCat(*post_data, buf); + for (j = strlen(buf) - 1; j >= 0 && /* Strip line terminators */ + (buf[j] == CR || buf[j] == LF); j--) { + buf[j] = '\0'; } - - } else if (strncmp(argv[0], "-preparsed", 9) == 0) { - LYPreparsedSource = TRUE; - - } else if (strncmp(argv[0], "-print", 6) == 0) { - no_print=FALSE; - - } else if (strncmp(argv[0], "-pseudo_inlines", 15) == 0) { - if (pseudo_inline_alts) - pseudo_inline_alts = FALSE; - else - pseudo_inline_alts = TRUE; - - } else { - goto Output_Error_and_Help_List; + StrAllocCat(*post_data, buf); } - break; - - case 'r': - if (strncmp(argv[0], "-raw", 4) == 0) { - LYUseDefaultRawMode = FALSE; - - } else if (strncmp(argv[0], "-realm", 6) == 0) { - check_realm = TRUE; - - } else if (strncmp(argv[0], "-reload", 7) == 0) { - reloading = TRUE; + return 0; +} - } else if (strncmp(argv[0], "-restrictions", 13) == 0) { - if ((cp=strchr(argv[0],'=')) != NULL) - parse_restrictions(cp+1); - else { - static CONST char *Usage[] = { +/* -restrictions */ +static int restrictions_fun ARGS1( + char *, next_arg) +{ + static CONST char *Usage[] = { "" ," USAGE: lynx -restrictions=[option][,option][,option]" ," List of Options:" @@ -2514,317 +2509,821 @@ PRIVATE void parse_arg ARGS3( ," suspend disallow Control-Z suspends with escape to shell" ," telnet_port disallow specifying a port in telnet G)oto's" ," useragent disallow modifications of the User-Agent header" - }; - size_t n; - for (n = 0; n < sizeof(Usage)/sizeof(Usage[0]); n++) - printf("%s\n", Usage[n]); - exit(0); - } - - } else if (strncmp(argv[0], "-resubmit_posts", 15) == 0) { - if (LYresubmit_posts) - LYresubmit_posts = FALSE; - else - LYresubmit_posts = TRUE; - - } else if (strncmp(argv[0], "-rlogin", 7) == 0) { - rlogin_ok = FALSE; + }; + size_t n; + if (next_arg != 0) { + parse_restrictions(next_arg); } else { - goto Output_Error_and_Help_List; + SetOutputMode( O_TEXT ); + for (n = 0; n < sizeof(Usage)/sizeof(Usage[0]); n++) + printf("%s\n", Usage[n]); + SetOutputMode( O_BINARY ); + exit(0); } - break; + return 0; +} - case 's': - if (strncmp(argv[0], "-selective", 10) == 0) { - HTDirAccess = HT_DIR_SELECTIVE; +/* -selective */ +static int selective_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + HTDirAccess = HT_DIR_SELECTIVE; + return 0; +} - } else if (strncmp(argv[0], "-show_cursor", 12) == 0) { - LYUseDefShoCur = FALSE; +/* -source */ +static int source_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + dump_output_immediately = TRUE; + HTOutputFormat = (LYPrependBase ? + HTAtom_for("www/download") : HTAtom_for("www/dump")); + LYcols = 999; + return 0; +} - } else if (strncmp(argv[0], "-soft_dquotes", 13) == 0) { - if (soft_dquotes) - soft_dquotes = FALSE; - else - soft_dquotes = TRUE; +/* -traversal */ +static int traversal_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + traversal = TRUE; +#ifdef USE_SLANG + LYcols = 80; +#else + LYcols = 999; +#endif /* USE_SLANG */ - } else if (strncmp(argv[0], "-source", 7) == 0) { - dump_output_immediately = TRUE; - HTOutputFormat = (LYPrependBase ? - HTAtom_for("www/download") : HTAtom_for("www/dump")); - LYcols=999; + return 0; +} - } else if (strncmp(argv[0], "-stack_dump", 11) == 0) { - stack_dump = TRUE; +/* -version */ +static int version_fun ARGS1( + char *, next_arg GCC_UNUSED) +{ + SetOutputMode( O_TEXT ); + + printf("\n"); + printf(gettext("\n%s Version %s (%.*s)\n"), + LYNX_NAME, LYNX_VERSION, + LYNX_DATE_LEN, + LYNX_RELEASE ? LYNX_RELEASE_DATE : &LYNX_DATE[LYNX_DATE_OFF] + ); +#ifdef SYSTEM_NAME +#ifndef __DATE__ +#define __DATE__ "" +#endif +#ifndef __TIME__ +#define __TIME__ "" +#endif + printf(gettext("Built on %s %s %s\n"), SYSTEM_NAME, __DATE__, __TIME__); +#endif + printf("\n"); + printf(gettext( + "Copyrights held by the University of Kansas, CERN, and other contributors.\n" + )); + printf(gettext("Distributed under the GNU General Public License.\n")); + printf(gettext( + "See http://lynx.browser.org/ and the online help for more information.\n\n" + )); + + SetOutputMode( O_BINARY ); + + exit(0); + /* NOT REACHED */ + return 0; +} + +/* -width */ +static int width_fun ARGS1( + char *, next_arg) +{ + if (next_arg != 0) { + int w = atoi(next_arg); + if (w > 0) + dump_output_width = ((w < 999) ? w : 999); + } - } else if (strncmp(argv[0], "-startfile_ok", 13) == 0) { - startfile_ok = TRUE; + return 0; +} +/* NOTE: This table is sorted by name; the lookup relies on that. */ +static Parse_Args_Type Arg_Table [] = +{ + PARSE_SET( + "accept_all_cookies", SET_ARG, &LYAcceptAllCookies, + "\naccepts all cookies" + ), + PARSE_FUN( + "anonymous", FUNCTION_ARG, anonymous_fun, + "used to specify the anonymous account" + ), + PARSE_FUN( + "assume_charset", NEED_FUNCTION_ARG, assume_charset_fun, + "=MIMEname\ncharset for documents that don't specify it" + ), + PARSE_FUN( + "assume_local_charset", NEED_FUNCTION_ARG,assume_local_charset_fun, + "=MIMEname\ncharset assumed for local files" + ), + PARSE_FUN( + "assume_unrec_charset", NEED_FUNCTION_ARG,assume_unrec_charset_fun, + "=MIMEname\nuse this instead of unrecognized charsets" + ), + PARSE_FUN( + "auth", NEED_FUNCTION_ARG, auth_fun, + "=id:pw\nauthentication information for protected documents" + ), + PARSE_FUN( + "base", FUNCTION_ARG, base_fun, + "prepend a request URL comment and BASE tag to text/html\noutputs for -source dumps" + ), +#ifdef USE_SLANG + PARSE_FUN( + "blink", FUNCTION_ARG, blink_fun, + "force high intensity bg colors in color mode" + ), +#endif + PARSE_SET( + "book", SET_ARG, &bookmark_start, + "use the bookmark page as the startfile" + ), + PARSE_SET( + "buried_news", TOGGLE_ARG, &scan_for_buried_news_references, + "toggles scanning of news articles for buried references" + ), + PARSE_FUN( + "cache", NEED_FUNCTION_ARG, cache_fun, + "=NUMBER\nNUMBER of documents cached in memory" + ), + PARSE_SET( + "case", SET_ARG, &case_sensitive, + "enable case sensitive user searching" + ), + PARSE_STR( + "cfg", IGNORE_ARG|NEED_NEXT_ARG, 0, + "=FILENAME\nspecifies a lynx.cfg file other than the default" + ), + PARSE_FUN( + "child", FUNCTION_ARG, child_fun, + "exit on left-arrow in startfile, and disable save to disk" + ), +#ifdef USE_SLANG + PARSE_FUN( + "color", FUNCTION_ARG, color_fun, + "force color mode on with standard bg colors" + ), +#endif + PARSE_SET( + "cookies", TOGGLE_ARG, &LYSetCookies, + "toggles handling of Set-Cookie headers" + ), +#ifdef EXP_PERSISTENT_COOKIES + PARSE_STR( + "cookie_file", LYSTRING_ARG, &LYCookieFile, + "=FILENAME\nspecifies a file to use to store cookies" + ), +#endif /* EXP_PERSISTENT_COOKIES */ +#ifndef VMS + PARSE_SET( + "core", TOGGLE_ARG, &LYNoCore, + "toggles forced core dumps on fatal errors" + ), +#endif + PARSE_FUN( + "crawl", FUNCTION_ARG, crawl_fun, + "with -traversal, output each page to a file\n\ +with -dump, format output as with -traversal, but to stdout" + ), +#ifdef DISP_PARTIAL + PARSE_SET( + "debug_partial", TOGGLE_ARG, &debug_display_partial, + "incremental display stages with MessageSecs delay" + ), +#endif + PARSE_FUN( + "display", NEED_FUNCTION_ARG, display_fun, + "=DISPLAY\nset the display variable for X exec'ed programs" + ), + PARSE_FUN( + "dump", FUNCTION_ARG, dump_output_fun, + "dump the first file to stdout and exit" + ), + PARSE_FUN( + "editor", NEED_FUNCTION_ARG, editor_fun, + "=EDITOR\nenable edit mode with specified editor" + ), + PARSE_SET( + "emacskeys", SET_ARG, &emacs_keys, + "enable emacs-like key movement" + ), + PARSE_SET( + "enable_scrollback", TOGGLE_ARG, &enable_scrollback, + "\ntoggles compatibility with comm programs' scrollback\n\ +keys (may be incompatible with some curses packages)" + ), + PARSE_FUN( + "error_file", NEED_FUNCTION_ARG, error_file_fun, + "=FILE\nwrite the HTTP status code here" + ), +#if defined(EXEC_LINKS) || defined(EXEC_SCRIPTS) +#ifndef NEVER_ALLOW_REMOTE_EXEC + PARSE_FUN( + "exec", FUNCTION_ARG, exec_fun, + "enable local program execution" + ), +#endif + PARSE_SET( + "locexec", SET_ARG, &local_exec_on_local_files, + "enable local program execution from local files only" + ), + PARSE_SET( + "noexec", UNSET_ARG, &local_exec, + "disable local program execution (DEFAULT)" + ), +#endif /* EXEC_LINKS || EXEC_SCRIPTS */ +#ifdef VMS + PARSE_SET( + "fileversions", SET_ARG, &HTVMSFileVersions, + "include all versions of files in local VMS directory\nlistings" + ), +#endif + PARSE_SET( + "force_html", SET_ARG, &LYforce_HTML_mode, + "forces the first document to be interpreted as HTML" + ), + PARSE_SET( + "force_secure", TOGGLE_ARG, &LYForceSSLCookiesSecure, + "toggles forcing of the secure flag for SSL cookies" + ), + PARSE_SET( + "from", TOGGLE_ARG, &LYNoFromHeader, + "toggle transmissions of From headers" + ), +#if !defined(NO_OPTION_FORMS) && !defined(NO_OPTION_MENU) + PARSE_SET( + "forms_options", TOGGLE_ARG, &LYUseFormsOptions, + "toggles forms-based vs old-style options menu" + ), +#endif + PARSE_SET( + "ftp", UNSET_ARG, &ftp_ok, + "disable ftp access" + ), + PARSE_FUN( + "get_data", FUNCTION_ARG, get_data_fun, + "user data for get forms, read from stdin,\nterminated by '---' on a line" + ), + PARSE_SET( + "head", SET_ARG, &HEAD_request, + "send a HEAD request" + ), + PARSE_FUN( + "help", FUNCTION_ARG, help_fun, + "print this usage message" + ), + PARSE_FUN( + "hiddenlinks", NEED_FUNCTION_ARG, hiddenlinks_fun, + "=[option]\nhidden links: options are merge, listonly, or ignore" + ), + PARSE_SET( + "historical", TOGGLE_ARG, &historical_comments, + "toggles use of '>' or '-->' as a terminator for comments" + ), + PARSE_FUN( + "homepage", NEED_FUNCTION_ARG, homepage_fun, + "=URL\nset homepage separate from start page" + ), + PARSE_SET( + "image_links", TOGGLE_ARG, &clickable_images, + "toggles inclusion of links for all images" + ), + PARSE_STR( + "index", NEED_LYSTRING_ARG, &indexfile, + "=URL\nset the default index file to URL" + ), + PARSE_SET( + "ismap", TOGGLE_ARG, &LYNoISMAPifUSEMAP, + "toggles inclusion of ISMAP links when client-side\nMAPs are present" + ), + PARSE_INT( + "link", NEED_INT_ARG, &ccount, + "=NUMBER\nstarting count for lnk#.dat files produced by -crawl" + ), + PARSE_SET( + "localhost", SET_ARG, &local_host_only, + "disable URLs that point to remote hosts" + ), +#if defined(USE_HASH) + PARSE_STR( + "lss", IGNORE_ARG|NEED_NEXT_ARG, 0, + "=FILENAME\nspecifies a lynx.lss file other than the default" + ), +#endif + PARSE_FUN( + "mime_header", FUNCTION_ARG, mime_header_fun, + "include mime headers and force source dump" + ), + PARSE_SET( + "minimal", TOGGLE_ARG, &minimal_comments, + "toggles minimal versus valid comment parsing" + ), +#ifndef DISABLE_NEWS + PARSE_FUN( + "newschunksize", NEED_FUNCTION_ARG, newschunksize_fun, + "=NUMBER\nnumber of articles in chunked news listings" + ), + PARSE_FUN( + "newsmaxchunk", NEED_FUNCTION_ARG, newsmaxchunk_fun, + "=NUMBER\nmaximum news articles in listings before chunking" + ), +#endif + PARSE_FUN( + "nobrowse", FUNCTION_ARG, nobrowse_fun, + "disable directory browsing" + ), + PARSE_SET( + "nocc", SET_ARG, &LYNoCc, + "disable Cc: prompts for self copies of mailings" + ), + PARSE_FUN( + "nocolor", FUNCTION_ARG, nocolor_fun, + "turn off color support" + ), + PARSE_SET( + "nofilereferer", SET_ARG, &no_filereferer, + "disable transmissions of Referer headers for file URLs" + ), + PARSE_SET( + "nolist", SET_ARG, &nolist, + "disable the link list feature in dumps" + ), + PARSE_SET( + "nolog", UNSET_ARG, &error_logging, + "disable mailing of error messages to document owners" + ), + PARSE_FUN( + "nopause", FUNCTION_ARG, nopause_fun, + "disable forced pauses for statusline messages" + ), + PARSE_SET( + "noprint", SET_ARG, &no_print, + "disable print functions" + ), + PARSE_SET( + "noredir", SET_ARG, &no_url_redirection, + "don't follow Location: redirection" + ), + PARSE_SET( + "noreferer", SET_ARG, &LYNoRefererHeader, + "disable transmissions of Referer headers" + ), +#ifdef SOCKS + PARSE_SET( + "nosocks", UNSET_ARG, &socks_flag, + "don't use SOCKS proxy for this session" + ), +#endif + PARSE_SET( + "nostatus", SET_ARG, &no_statusline, + "disable the miscellaneous information messages" + ), + PARSE_SET( + "number_links", SET_ARG, &number_links, + "force numbering of links" + ), +#ifdef DISP_PARTIAL + PARSE_SET( + "partial", TOGGLE_ARG, &display_partial_flag, + "toggles display partial pages while downloading" + ), + PARSE_INT( + "partial_thres", NEED_INT_ARG, &partial_threshold, + "[=NUMBER]\nnumber of lines to render before repainting display\n\ +with partial-display logic" + ), +#endif + PARSE_FUN( + "pauth", NEED_FUNCTION_ARG, pauth_fun, + "=id:pw\nauthentication information for protected proxy server" + ), + PARSE_SET( + "popup", UNSET_ARG, &LYUseDefSelPop, + "toggles handling of single-choice SELECT options via\npopup windows or as lists of radio buttons" + ), + PARSE_FUN( + "post_data", FUNCTION_ARG, post_data_fun, + "user data for post forms, read from stdin,\nterminated by '---' on a line" + ), + PARSE_SET( + "preparsed", SET_ARG, &LYPreparsedSource, + "show parsed text/html with -source and in source view\n\ +to visualize how lynx behaves with invalid HTML" + ), +#ifdef USE_PSRC + PARSE_SET( + "prettysrc", SET_ARG, &LYpsrc, + "do syntax highlighting and hyperlink handling in source view" + ), +#endif + PARSE_SET( + "print", UNSET_ARG, &no_print, + "enable print functions (DEFAULT)" + ), + PARSE_SET( + "pseudo_inlines", TOGGLE_ARG, &pseudo_inline_alts, + "toggles pseudo-ALTs for inlines with no ALT string" + ), + PARSE_SET( + "raw", UNSET_ARG, &LYUseDefaultRawMode, + "toggles default setting of 8-bit character translations\nor CJK mode for the startup character set" + ), + PARSE_SET( + "realm", SET_ARG, &check_realm, + "restricts access to URLs in the starting realm" + ), + PARSE_SET( + "reload", SET_ARG, &reloading, + "flushes the cache on a proxy server\n(only the first document affected)" + ), + PARSE_FUN( + "restrictions", FUNCTION_ARG, restrictions_fun, + "=[options]\nuse -restrictions to see list" + ), + PARSE_SET( + "resubmit_posts", TOGGLE_ARG, &LYresubmit_posts, + "toggles forced resubmissions (no-cache) of forms with\n\ +method POST when the documents they returned are sought\n\ +with the PREV_DOC command or from the History List" + ), + PARSE_SET( + "rlogin", UNSET_ARG, &rlogin_ok, + "disable rlogins" + ), + PARSE_FUN( + "selective", FUNCTION_ARG, selective_fun, + "require .www_browsable files to browse directories" + ), + PARSE_SET( + "show_cursor", TOGGLE_ARG, &LYUseDefShoCur, + "toggles hiding of the cursor in the lower right corner" + ), + PARSE_SET( + "soft_dquotes", TOGGLE_ARG, &soft_dquotes, + "toggles emulation of the old Netscape and Mosaic bug which\n\ +treated '>' as a co-terminator for double-quotes and tags" + ), + PARSE_FUN( + "source", FUNCTION_ARG, source_fun, + "dump the source of the first file to stdout and exit" + ), + PARSE_SET( + "stack_dump", SET_ARG, &stack_dump, + "disable SIGINT cleanup handler" + ), + PARSE_SET( + "startfile_ok", SET_ARG, &startfile_ok, + "allow non-http startfile and homepage with -validate" + ), #ifndef VMS #ifdef SYSLOG_REQUESTED_URLS - } else if (strncmp(argv[0], "-syslog", 7) == 0) { - if (nextarg) - StrAllocCopy(syslog_txt, cp); -#endif /* SYSLOG_REQUESTED_URLS */ -#endif /* !VMS */ + PARSE_STR( + "syslog", NEED_LYSTRING_ARG, &syslog_txt, + "=text\ninformation for syslog call" + ), +#endif +#endif + PARSE_SET( + "tagsoup", SET_ARG, &Old_DTD, + "use TagSoup rather than SortaSGML parser" + ), + PARSE_SET( + "telnet", UNSET_ARG, &telnet_ok, + "disable telnets" + ), + PARSE_STR( + "term", NEED_STRING_ARG, &terminal, + "=TERM\nset terminal type to TERM" + ), + PARSE_SET( + "tlog", IGNORE_ARG, 0, + "toggles use of a Lynx Trace Log for the current session" + ), + PARSE_SET( + "trace", IGNORE_ARG, 0, + "turns on Lynx trace mode" + ), + PARSE_FUN( + "traversal", FUNCTION_ARG, traversal_fun, + "traverse all http links derived from startfile" + ), + PARSE_SET( + "underscore", TOGGLE_ARG, &use_underscore, + "toggles use of _underline_ format in dumps" + ), +#if defined(NCURSES_MOUSE_VERSION) || defined(USE_SLANG_MOUSE) + PARSE_SET( + "use_mouse", SET_ARG, &LYUseMouse, + "turn on xterm mouse support" + ), +#endif + PARSE_STR( + "useragent", NEED_LYSTRING_ARG, &LYUserAgent, + "=Name\nset alternate Lynx User-Agent header" + ), + PARSE_SET( + "validate", IGNORE_ARG, 0, + "accept only http URLs (for validation)" + ), + PARSE_SET( + "verbose", TOGGLE_ARG, &verbose_img, + "toggles [LINK], [IMAGE] and [INLINE] comments \nwith filenames of these images" + ), + PARSE_FUN( + "version", FUNCTION_ARG, version_fun, + "print Lynx version information" + ), + PARSE_SET( + "vikeys", SET_ARG, &vi_keys, + "enable vi-like key movement" + ), + PARSE_FUN( + "width", NEED_FUNCTION_ARG, width_fun, + "=NUMBER\nscreen width for formatting of dumps (default is 80)" + ), + {NULL, 0, 0, NULL} +}; + +static void print_help_strings ARGS3( + CONST char *, name, + CONST char *, help, + CONST char *, value) +{ + int pad; + int c; + int first; + int field_width = 20; + + pad = field_width - (4 + (int) strlen (name)); + + fprintf (stdout, " -%s", name); + if (*help != '=') { + pad--; + while (pad > 0) { + fputc (' ', stdout); + pad--; + } + fputc (' ', stdout); /* at least one space */ + first = 0; } else { - goto Output_Error_and_Help_List; + first = pad; } - break; - case 't': - if (strncmp(argv[0], "-telnet", 7) == 0) { - telnet_ok = FALSE; + if (strchr (help, '\n') == 0) { + fprintf (stdout, "%s", help); + } else { + while ((c = *help) != 0) { + if (c == '\n') { + if ((pad = --first) < 0) { + pad = field_width; + } else { + c = ' '; + } + fputc (c, stdout); + while (pad--) + fputc (' ', stdout); + } else { + fputc (c, stdout); + } + help++; + first--; + } + } + if (value) + printf(" (%s)", value); + fputc ('\n', stdout); +} - } else if (strncmp(argv[0], "-term", 5) == 0) { - if (nextarg) - terminal = cp; +static void print_help_and_exit ARGS1(int, exit_status) +{ + Parse_Args_Type *p; - } else if (strncmp(argv[0], "-tlog", 5) == 0) { - /* - * Already handled. - FM - */ - break; + if (pgm == NULL) pgm = "lynx"; - } else if (strncmp(argv[0], "-trace", 6) == 0) { - /* - * Already handled. - FM - */ - break; + SetOutputMode( O_TEXT ); - } else if (strncmp(argv[0], "-traversal", 10) == 0) { - traversal = TRUE; -#ifdef USE_SLANG - LYcols=80; -#else - LYcols=999; -#endif /* USE_SLANG */ + fprintf (stdout, gettext("USAGE: %s [options] [file]\n"), pgm); + fprintf (stdout, gettext("Options are:\n")); + print_help_strings("", +"receive the arguments from stdin (enclose\n\ +in double-quotes (\"-\") on VMS)", NULL); - } else { - goto Output_Error_and_Help_List; + for (p = Arg_Table; p->name != 0; p++) { + char temp[LINESIZE], *value = temp; +#ifdef PARSE_DEBUG + Parse_Args_Type * q = p; +#else + ParseUnion *q = (ParseUnion *)(&(p->value)); +#endif + switch (p->type & ARG_TYPE_MASK) { + case TOGGLE_ARG: + case SET_ARG: + sprintf(temp, "%s", *(q->set_value) ? "on" : "off"); + break; + case UNSET_ARG: + sprintf(temp, "%s", *(q->set_value) ? "off" : "on"); + break; + case INT_ARG: + sprintf(temp, "%d", *(q->int_value)); + break; + case STRING_ARG: + if ((value = *(q->str_value)) != 0 + && !*value) + value = 0; + break; + default: + value = 0; + break; + } + print_help_strings(p->name, p->help_string, value); } - break; - case 'u': - if (strncmp(argv[0], "-underscore", 11) == 0) { - if (use_underscore) - use_underscore = FALSE; - else - use_underscore = TRUE; + SetOutputMode( O_BINARY ); - } else if (strncmp(argv[0], "-useragent", 10) == 0) { - /* - * Set alternate Lynx User-Agent header. - */ - if (nextarg) - StrAllocCopy(LYUserAgent, cp); + exit (exit_status); +} -#if defined(NCURSES_MOUSE_VERSION) || defined(USE_SLANG_MOUSE) - } else if (strncmp(argv[0], "-use_mouse", 9) == 0) { - LYUseMouse = TRUE; +/* + * This function performs a string comparison on two strings a and b. a is + * assumed to be an ordinary null terminated string, but b may be terminated + * by an '=', '+' or '-' character. If terminated by '=', *c will be pointed + * to the character following the '='. If terminated by '+' or '-', *c will + * be pointed to that character. (+/- added for toggle processing - BL.) + * If a and b match, it returns 1. Otherwise 0 is returned. + */ +static int arg_eqs_parse ARGS3( + CONST char *, a, + char *, b, + char **, c) +{ + *c = NULL; + while (1) { + if ((*a != *b) + || (*a == 0) + || (*b == 0)) { + if (*a == 0) { + switch (*b) { + case '=': + *c = b + 1; + return 1; + case '-': /* FALLTHRU */ + case '+': + *c = b; + return 1; + case 0: + return 1; + default: + return 0; + } + } else { + return 0; + } + } + a++; + b++; + } +} + +#define is_true(s) (*s == '1' || *s == '+' || !strcmp(s, "on")) +#define is_false(s) (*s == '0' || *s == '-' || !strcmp(s, "off")) + +PRIVATE void parse_arg ARGS2( + char **, argv, + int *, i) +{ + Parse_Args_Type *p; + char *arg_name; + + arg_name = argv[0]; + + /* + * Check for a command line startfile. - FM + */ +#if !EXTENDED_OPTION_LOGIC + if (*arg_name != '-') +#else + if (*arg_name != '-' || no_options_further == TRUE ) #endif - } else { - goto Output_Error_and_Help_List; + { + StrAllocCopy(startfile, arg_name); + LYTrimStartfile(startfile); + return; } - break; +#if EXTENDED_OPTION_LOGIC + if (strcmp(arg_name,"--") == 0) { + no_options_further = TRUE; + return; + } +#endif - case 'v': - if (strcmp(argv[0], "-validate") == 0) { - /* - * Follow only http URLs. - * Already handled. - FM - */ - break; - - } else if (strncmp(argv[0], "-version", 8) == 0) { - printf("\n%s Version %s (1998)\n", LYNX_NAME, LYNX_VERSION); - printf( - "Copyrights held by the University of Kansas, CERN, and other contributors.\n" - ); - printf("Distributed under the GNU General Public License.\n"); - printf( - "See http://lynx.browser.org/ and the online help for more information.\n\n" - ); - exit(0); + /* lose the first '-' character */ + arg_name++; - } else if (strncmp(argv[0], "-vikeys", 7) == 0) { - vi_keys = TRUE; + /* + * Skip any lone "-" arguments, because we've loaded + * the stdin input into an HTList structure for + * special handling. - FM + */ + if (*arg_name == 0) + return; - } else { - goto Output_Error_and_Help_List; - } - break; + /* allow GNU-style options with -- prefix*/ + if (*arg_name == '-') ++arg_name; - case 'w': - if (strncmp(argv[0], "-width", 2) == 0) { - if (nextarg) { - int w = atoi(cp); - if (w > 0) { - dump_output_width = ((w < 999) ? w : 999); - break; - } + + p = Arg_Table; + while (p->name != 0) { +#ifdef PARSE_DEBUG + Parse_Args_Type *q = p; +#else + ParseUnion *q = (ParseUnion *)(&(p->value)); +#endif + ParseFunc fun; + char *next_arg = NULL; + + if ((p->name[0] != *arg_name) + || (0 == arg_eqs_parse (p->name, arg_name, &next_arg))) { + p++; + continue; } - dump_output_width = 80; - } else { - goto Output_Error_and_Help_List; + + if ((p->type & NEED_NEXT_ARG) && (next_arg == 0)) { + next_arg = argv[1]; + if ((i != 0) && (next_arg != 0)) + (*i)++; + } + + switch (p->type & ARG_TYPE_MASK) { + case TOGGLE_ARG: /* FALLTHRU */ + case SET_ARG: /* FALLTHRU */ + case UNSET_ARG: + if (q->set_value != 0) { + if (next_arg == 0) { + switch (p->type & ARG_TYPE_MASK) { + case TOGGLE_ARG: + *(q->set_value) = !(*(q->set_value)); + break; + case SET_ARG: + *(q->set_value) = TRUE; + break; + case UNSET_ARG: + *(q->set_value) = FALSE; + break; + } + } else if (is_true(next_arg)) { + *(q->set_value) = TRUE; + } else if (is_false(next_arg)) { + *(q->set_value) = FALSE; + } + /* deliberately ignore anything else - BL */ + } + break; + + case FUNCTION_ARG: + fun = q->fun_value; + if (0 != fun) { + if (-1 == (*fun) (next_arg)) { + } + } + break; + + case LYSTRING_ARG: + if ((q->str_value != 0) && (next_arg != 0)) + StrAllocCopy(*(q->str_value), next_arg); + break; + + case INT_ARG: + if ((q->int_value != 0) && (next_arg != 0)) + *(q->int_value) = atoi (next_arg); + break; + + case STRING_ARG: + if ((q->str_value != 0) && (next_arg != 0)) + *(q->str_value) = next_arg; + break; + + case IGNORE_ARG: + break; + } + + return; } - break; - default: -Output_Error_and_Help_List: -#ifdef VMS - printf(" LYNX: Invalid Option: %s\n", argv[0]); -#else -#ifdef UNIX - if (strncmp(argv[0], "-help", 5) != 0) - fprintf(stderr, "%s: Invalid Option: %s\n", pgm, argv[0]); - else -#endif /* UNIX */ - printf("%s: Invalid Option: %s\n", pgm, argv[0]); -#endif /* VMS */ -Output_Help_List: -#ifdef VMS - printf("USAGE: lynx [options] [file]\n"); -#else - printf("USAGE: %s [options] [file]\n",pgm); -#endif /* VMS */ - { - static CONST char *Options[] = { - "Options are:" -," - receive the arguments from stdin (enclose" -," in double-quotes (\"-\") on VMS)" -," -anonymous used to specify the anonymous account" -," -assume_charset=MIMEname charset for documents that don't specify it" -," -assume_local_charset=MIMEname charset assumed for local files" -," -assume_unrec_charset=MIMEname use this instead of unrecognized charsets" -," -auth=id:pw authentication information for protected documents" -," -base prepend a request URL comment and BASE tag to text/html" -," outputs for -source dumps" -," -book use the bookmark page as the startfile" -," -buried_news toggles scanning of news articles for buried references" -," -cache=NUMBER NUMBER of documents cached in memory" -," -case enable case sensitive user searching" -," -cfg=FILENAME specifies a lynx.cfg file other than the default" -," -child exit on left-arrow in startfile, and disable save to disk" -#ifdef USE_SLANG -," -color force color mode on with standard bg colors" -," -blink force high intensity bg colors in color mode" -#endif /* USE_SLANG */ -," -cookies toggles handling of Set-Cookie headers" -#ifndef VMS -," -core toggles forced core dumps on fatal errors" -#endif /* !VMS */ -," -crawl with -traversal, output each page to a file" -," with -dump, format output as with -traversal, but to stdout" -," -display=DISPLAY set the display variable for X execed programs" -," -dump dump the first file to stdout and exit" -," -editor=EDITOR enable edit mode with specified editor" -," -emacskeys enable emacs-like key movement" -," -enable_scrollback toggles compatibility with comm programs' scrollback" -," keys (may be incompatible with some curses packages)" -," -error_file=FILE write the HTTP status code here" -#if defined(EXEC_LINKS) || defined(EXEC_SCRIPTS) -#ifndef NEVER_ALLOW_REMOTE_EXEC -," -exec enable local program execution" -#endif /* !NEVER_ALLOW_REMOTE_EXEC */ -," -locexec enable local program execution from local files only" -," -noexec disable local program execution (DEFAULT)" -#endif /* EXEC_LINKS || EXEC_SCRIPTS */ -," -fileversions include all versions of files in local VMS directory" -," listings" -," -force_html forces the first document to be interpreted as HTML" -," -force_secure toggles forcing of the secure flag for SSL cookies" -," -from toggle transmissions of From headers" -," -ftp disable ftp access" -," -get_data user data for get forms, read from stdin," -," terminated by '---' on a line" -," -head send a HEAD request" -," -help print this usage message" -," -hiddenlinks=[option] hidden links: options are merge, listonly, or ignore" -," -historical toggles use of '>' or '-->' as a terminator for comments" -," -homepage=URL set homepage separate from start page" -," -image_links toggles inclusion of links for all images" -," -index=URL set the default index file to URL" -," -ismap toggles inclusion of ISMAP links when client-side" -," MAPs are present" -," -link=NUMBER starting count for lnk#.dat files produced by -crawl" -," -localhost disable URLs that point to remote hosts" -#if defined(USE_HASH) -," -lss=FILENAME specifies a lynx.css file other than the default" -#endif -," -mime_header include mime headers and force source dump" -," -minimal toggles minimal versus valid comment parsing" -," -newschunksize=NUMBER number of articles in chunked news listings" -," -newsmaxchunk=NUMBER maximum news articles in listings before chunking" -," -nobrowse disable directory browsing" -," -nocc disable Cc: prompts for self copies of mailings" -," -nofilereferer disable transmissions of Referer headers for file URLs" -," -nolist disable the link list feature in dumps" -," -nolog disable mailing of error messages to document owners" -," -nopause disable forced pauses for statusline messages" -," -noprint disable print functions" -," -noredir don't follow Location: redirection" -," -noreferer disable transmissions of Referer headers" -#ifdef SOCKS -," -nosocks don't use SOCKS proxy for this session" -#endif /* SOCKS */ -," -nostatus disable the miscellaneous information messages" -," -number_links force numbering of links" -," -pauth=id:pw authentication information for protected proxy server" -," -popup toggles handling of single-choice SELECT options via" -," popup windows or as lists of radio buttons" -," -post_data user data for post forms, read from stdin," -," terminated by '---' on a line" -," -preparsed show parsed text/html with -source and in source view" -," -print enable print functions (DEFAULT)" -," -pseudo_inlines toggles pseudo-ALTs for inlines with no ALT string" -," -raw toggles default setting of 8-bit character translations" -," or CJK mode for the startup character set" -," -realm restricts access to URLs in the starting realm" -," -reload flushes the cache on a proxy server" -," (only the first document affected)" -," -restrictions=[options] use -restrictions to see list" -," -resubmit_posts toggles forced resubmissions (no-cache) of forms with" -," method POST when the documents they returned are sought" -," with the PREV_DOC command or from the History List" -," -rlogin disable rlogins" -," -selective require .www_browsable files to browse directories" -," -show_cursor toggles hiding of the cursor in the lower right corner" -," -soft_dquotes toggles emulation of the old Netscape and Mosaic bug which" -," treated '>' as a co-terminator for double-quotes and tags" -," -source dump the source of the first file to stdout and exit" -," -startfile_ok allow non-http startfile and homepage with -validate" -#ifndef VMS -#ifdef SYSLOG_REQUESTED_URLS -," -syslog=text information for syslog call" -#endif /* SYSLOG_REQUESTED_URLS */ -#endif /* !VMS */ -," -telnet disable telnets" -," -term=TERM set terminal type to TERM" -," -tlog toggles use of a Lynx Trace Log for the current session" -," -trace turns on Lynx trace mode" -," -traversal traverse all http links derived from startfile" -," -underscore toggles use of _underline_ format in dumps" -," -useragent=Name set alternate Lynx User-Agent header" -#if defined(NCURSES_MOUSE_VERSION) || defined(USE_SLANG_MOUSE) -," -use_mouse enable use of the mouse" -#endif -," -validate accept only http URLs (for validation)" -," -version print Lynx version information" -," -vikeys enable vi-like key movement" -," -width=NUMBER screen width for formatting of dumps (default is 80)" - }; - size_t n; - for (n = 0; n < sizeof(Options)/sizeof(Options[0]); n++) - printf("%s\n", Options[n]); - } - if (strncmp(argv[0], "-help", 5) != 0) - exit(-1); - exit(0); - break; + if (pgm == 0) pgm = "LYNX"; - } /* end of switch. */ + fprintf (stderr, gettext("%s: Invalid Option: %s\n"), pgm, argv[0]); + print_help_and_exit (-1); } #ifndef VMS diff --git a/gnu/usr.bin/lynx/src/LYMainLoop.c b/gnu/usr.bin/lynx/src/LYMainLoop.c index 07faecb7728..8bdc0ae0edd 100644 --- a/gnu/usr.bin/lynx/src/LYMainLoop.c +++ b/gnu/usr.bin/lynx/src/LYMainLoop.c @@ -1,69 +1,67 @@ -#include "HTUtils.h" -#include "tcp.h" -#include "HTAccess.h" -#include "HTParse.h" -#include "HTList.h" -#include "HTML.h" -#include "HTFTP.h" -#include "HTFile.h" -#include "HTTP.h" -#include "HTAABrow.h" -#include "HTNews.h" -#include "LYCurses.h" -#include "LYStyle.h" -#include "LYGlobalDefs.h" -#include "HTAlert.h" -#include "LYUtils.h" -#include "GridText.h" -#include "LYStrings.h" -#include "LYOptions.h" -#include "LYSignal.h" -#include "LYGetFile.h" -#include "HTForms.h" -#include "LYSearch.h" -#include "LYClean.h" -#include "LYHistory.h" -#include "LYPrint.h" -#include "LYMail.h" -#include "LYEdit.h" -#include "LYShowInfo.h" -#include "LYBookmark.h" -#include "LYSystem.h" -#include "LYKeymap.h" -#include "LYJump.h" -#include "LYDownload.h" -#include "LYList.h" -#include "LYMap.h" -#include "LYTraversal.h" -#include "LYCharSets.h" -#include "LYCharUtils.h" -#include "LYCookie.h" -#include "LYMainLoop.h" -#ifdef DOSPATH -#include "HTDOS.h" -#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef USE_EXTERNALS -#include "LYExtern.h" +#include #endif -#ifdef VMS -#include "HTVMSUtils.h" -#endif /* VMS */ +#ifdef __EMX__ +#include +#endif #ifdef DIRED_SUPPORT -#include "LYLocal.h" -#include "LYUpload.h" +#include +#include #endif /* DIRED_SUPPORT */ -#include "LYexit.h" -#include "LYLeaks.h" +#include +#include + +PRIVATE void exit_immediately_with_error_message PARAMS((int state, BOOLEAN first_file)); +PRIVATE void print_status_message PARAMS((CONST linkstruct curlink, char **cp)); PRIVATE BOOL confirm_post_resub PARAMS(( - CONST char* address, - CONST char* title, - int if_imgmap, - int if_file)); + CONST char* address, + CONST char* title, + int if_imgmap, + int if_file)); PRIVATE int are_different PARAMS((document *doc1, document *doc2)); PUBLIC void HTGotoURLs_free NOPARAMS; PUBLIC void HTAddGotoURL PARAMS((char *url)); @@ -73,31 +71,35 @@ PRIVATE int are_phys_different PARAMS((document *doc1, document *doc2)); #endif #define FASTTAB -#ifdef FASTTAB + PRIVATE int sametext ARGS2( - char *, een, - char *, twee) + char *, een, + char *, twee) { if (een && twee) return (strcmp(een, twee) == 0); return TRUE; } -#endif /* FASTTAB */ - -#define FREE(x) if (x) {free(x); x = NULL;} PUBLIC HTList * Goto_URLs = NULL; /* List of Goto URLs */ PUBLIC char * LYRequestTitle = NULL; /* newdoc.title in calls to getfile() */ +#ifdef DISP_PARTIAL +PUBLIC int Newline_partial = 0; /* required for display_partial mode */ +PUBLIC int NumOfLines_partial = -1; /* initialize to -1 the very first time */ +PUBLIC BOOLEAN display_partial = FALSE; +PUBLIC int Newline = 0; +#else +PRIVATE int Newline = 0; +#endif + PRIVATE document newdoc; PRIVATE document curdoc; PRIVATE char *traversal_host = NULL; PRIVATE char *traversal_link_to_add = NULL; -PRIVATE char *CurrentUserAgent = NULL; -PRIVATE char *CurrentNegoLanguage = NULL; -PRIVATE char *CurrentNegoCharset = NULL; +#ifdef LY_FIND_LEAKS /* * Function for freeing allocated mainloop() variables. - FM */ @@ -119,15 +121,103 @@ PRIVATE void free_mainloop_variables NOARGS #endif FREE(traversal_host); FREE(traversal_link_to_add); - FREE(CurrentUserAgent); - FREE(CurrentNegoLanguage); - FREE(CurrentNegoCharset); #ifdef DIRED_SUPPORT clear_tags(); #endif /* DIRED_SUPPORT */ return; } +#endif /* LY_FIND_LEAKS */ + +PUBLIC FILE *TraceFP NOARGS +{ + if (LYTraceLogFP != 0) { + return LYTraceLogFP; + } + return stderr; +} + +PRIVATE void TracelogOpenFailed NOARGS +{ + WWW_TraceFlag = FALSE; + if (LYCursesON) { + HTUserMsg(TRACELOG_OPEN_FAILED); + } else { + fprintf(stderr, "%s\n", TRACELOG_OPEN_FAILED); + exit(-1); + } +} + +PUBLIC BOOLEAN LYOpenTraceLog NOARGS +{ + if (TRACE && LYUseTraceLog && LYTraceLogFP == NULL) { + /* + * If we can't open it for writing, give up. Otherwise, on VMS close + * it, delete it and any versions from previous sessions so they don't + * accumulate, and open it again. - FM + */ + if ((LYTraceLogFP = LYNewTxtFile(LYTraceLogPath)) == NULL) { + TracelogOpenFailed(); + return FALSE; + } +#ifdef VMS + LYCloseTracelog(); + HTSYS_remove(LYTraceLogPath); + if ((LYTraceLogFP = LYNewTxtFile(LYTraceLogPath)) == NULL) { + TracelogOpenFailed(); + return FALSE; + } +#endif /* VMS */ + fflush(stdout); + fflush(stderr); + fprintf(tfp, "\t\t%s (%s)\n\n", LYNX_TRACELOG_TITLE, LYNX_VERSION); + /* + * If TRACE is on, indicate whether the + * anonymous restrictions are set. - FM + */ + if (LYRestricted) { + CTRACE(tfp, "Anonymous restrictions are set.\n"); + } + } + return TRUE; +} + +PUBLIC void LYCloseTracelog NOARGS +{ + if (LYTraceLogFP != 0) { + fflush(stdout); + fflush(stderr); + fclose(LYTraceLogFP); + LYTraceLogFP = 0; + } +} + +PRIVATE BOOLEAN LYReopenTracelog ARGS1(BOOLEAN *, trace_flag_ptr) +{ + CTRACE(tfp, "\nTurning off TRACE for fetch of log.\n"); + LYCloseTracelog(); + if ((LYTraceLogFP = LYAppendToTxtFile(LYTraceLogPath)) == NULL) { + TracelogOpenFailed(); + return FALSE; + } + if (TRACE) { + WWW_TraceFlag = FALSE; + *trace_flag_ptr = TRUE; + } + return TRUE; +} + +PRIVATE void do_change_link ARGS1( + char *, prev_target) +{ + /* Is there a mouse-clicked link waiting? */ + int mouse_tmp = get_mouse_link(); + /* If yes, use it as the link */ + if (mouse_tmp != -1) { + highlight(OFF, curdoc.link, prev_target); + curdoc.link = mouse_tmp; + } +} /* * Here's where we do all the work. @@ -144,8 +234,6 @@ int mainloop NOARGS int cmd = LYK_DO_NOTHING, real_cmd = LYK_DO_NOTHING; int getresult; int arrowup = FALSE, show_help = FALSE; - int lines_in_file = -1; - int Newline = 0; char prev_target[512]; char user_input_buffer[1024]; char *owner_address = NULL; /* Holds the responsible owner's address */ @@ -160,21 +248,11 @@ int mainloop NOARGS BOOLEAN rlink_allowed; BOOLEAN vi_keys_flag = vi_keys; BOOLEAN emacs_keys_flag = emacs_keys; - BOOLEAN keypad_mode_flag = keypad_mode; - BOOLEAN user_mode_flag = user_mode; - BOOLEAN HTfileSortMethod_flag = HTfileSortMethod; - int CurrentCharSet_flag = current_char_set; - BOOLEAN show_dotfiles_flag = show_dotfiles; - BOOLEAN LYRawMode_flag = LYRawMode; - BOOLEAN LYSelectPopups_flag = LYSelectPopups; BOOLEAN trace_mode_flag = FALSE; BOOLEAN forced_HTML_mode = LYforce_HTML_mode; char cfile[128]; FILE *cfp; char *cp, *toolbar; -#ifdef VMS - extern BOOLEAN HadVMSInterrupt; /* Flag from cleanup_sig */ -#endif /* VMS */ int ch, recall; int URLTotal; int URLNum; @@ -184,6 +262,7 @@ int mainloop NOARGS BOOLEAN override_LYresubmit_posts = FALSE; unsigned int len; int i; + int n; #ifdef DIRED_SUPPORT char *tp = NULL; @@ -217,17 +296,13 @@ int mainloop NOARGS user_input_buffer[(sizeof(user_input_buffer) - 1)] = '\0'; *prev_target = '\0'; *user_input_buffer = '\0'; - StrAllocCopy(CurrentUserAgent, (LYUserAgent ? - LYUserAgent : "")); - StrAllocCopy(CurrentNegoLanguage, (language ? - language : "")); - StrAllocCopy(CurrentNegoCharset, (pref_charset ? - pref_charset : "")); +#ifdef LY_FIND_LEAKS atexit(free_mainloop_variables); +#endif initialize: StrAllocCopy(newdoc.address, startfile); StrAllocCopy(startrealm, startfile); - StrAllocCopy(newdoc.title, "Entry into main screen"); + StrAllocCopy(newdoc.title, gettext("Entry into main screen")); newdoc.isHEAD = FALSE; newdoc.safe = FALSE; newdoc.internal_link = FALSE; @@ -240,8 +315,7 @@ initialize: refresh(); } #endif /* USE_SLANG */ - if (TRACE) - fprintf(stderr,"Entering mainloop, startfile=%s\n",startfile); + CTRACE(tfp,"Entering mainloop, startfile=%s\n",startfile); if (form_post_data) { StrAllocCopy(newdoc.post_data, form_post_data); @@ -253,13 +327,11 @@ initialize: if (bookmark_start) { if (LYValidate) { - _statusline(BOOKMARKS_DISABLED); - sleep(AlertSecs); + HTAlert(BOOKMARKS_DISABLED); bookmark_start = FALSE; goto initialize; } else if (traversal) { - _statusline(BOOKMARKS_NOT_TRAVERSED); - sleep(AlertSecs); + HTAlert(BOOKMARKS_NOT_TRAVERSED); traversal = FALSE; crawl = FALSE; bookmark_start = FALSE; @@ -278,11 +350,9 @@ initialize: FREE(newdoc.post_content_type); newdoc.isHEAD = FALSE; newdoc.safe = FALSE; - if (TRACE) - fprintf(stderr, "Using bookmarks=%s\n", newdoc.address); + CTRACE(tfp, "Using bookmarks=%s\n", newdoc.address); } else { - _statusline(BOOKMARKS_NOT_OPEN); - sleep(MessageSecs); + HTUserMsg(BOOKMARKS_NOT_OPEN); bookmark_start = FALSE; goto initialize; } @@ -330,7 +400,8 @@ try_again: * elements to the curdoc structure elements * under case NORMAL. - FM */ - if (strncmp(newdoc.address, "LYNXDOWNLOAD:", 13)) { + if (strncmp(newdoc.address, "LYNXDOWNLOAD:", 13)) + { LYpush(&curdoc, ForcePush); } } else if (!newdoc.address) { @@ -432,26 +503,11 @@ try_again: WWWDoc.safe = newdoc.safe; tmpanchor = HTAnchor_parent(HTAnchor_findAddress(&WWWDoc)); if ((HText *)HTAnchor_document(tmpanchor) == NULL) { - if (TRACE) - fprintf(stderr, - "\nTurning off TRACE for fetch of log.\n"); - fflush(stdout); - fflush(stderr); - fclose(LYTraceLogFP); - *stderr = LYOrigStderr; - if ((LYTraceLogFP = LYAppendToTxtFile(LYTraceLogPath)) == NULL) { - WWW_TraceFlag = FALSE; - _statusline(TRACELOG_OPEN_FAILED); - sleep(MessageSecs); + if (!LYReopenTracelog(&trace_mode_flag)) { old_c = 0; cmd = LYK_PREV_DOC; goto new_cmd; } - *stderr = *LYTraceLogFP; - if (TRACE) { - WWW_TraceFlag = FALSE; - trace_mode_flag = TRUE; - } } } @@ -466,6 +522,25 @@ try_again: LYPermitURL = TRUE; } + Newline = newdoc.line; /* bypass for partial mode */ +#ifdef DISP_PARTIAL + display_partial = display_partial_flag; /* restore */ + Newline_partial = Newline; /* initialize */ + /* + * Disable display_partial if requested URL has #fragment + * and we are not popped from the history stack + * so can't calculate correct newline position for fragment. + * Otherwise user got the new document from the first page + * and be moved to #fragment later after download + * completed, but only if s/he did not mess screen up by + * scrolling before... So fall down to old behavior here. + */ + if (Newline_partial == 1 && strchr(newdoc.address, '#')) + display_partial = FALSE; +#endif /* DISP_PARTIAL */ +#ifdef USE_PSRC + psrc_first_tag = TRUE; +#endif #ifndef DONT_TRACK_INTERNAL_LINKS if (try_internal) { if (newdoc.address && @@ -525,12 +600,12 @@ try_again: * Do any error logging, if appropriate. */ LYoverride_no_cache = FALSE; /* Was TRUE if popped. - FM */ - popped_doc = FALSE; /* Was TRUE if popped. - FM */ + popped_doc = FALSE; /* Was TRUE if popped. - FM */ LYinternal_flag = FALSE; /* Reset to default. - kw */ if (trace_mode_flag == TRUE) { WWW_TraceFlag = TRUE; trace_mode_flag = FALSE; - fprintf(stderr, "Turning TRACE back on.\n\n"); + fprintf(tfp, "Turning TRACE back on.\n\n"); } if (error_logging && first_file && owner_address && !LYCancelledFetch) { @@ -554,18 +629,7 @@ try_again: if ((ofp = LYAppendToTxtFile(TRAVERSE_ERRORS)) == NULL) { if ((ofp = LYNewTxtFile(TRAVERSE_ERRORS)) == NULL) { perror(NOOPEN_TRAV_ERR_FILE); -#ifndef NOSIGHUP - (void) signal(SIGHUP, SIG_DFL); -#endif /* NOSIGHUP */ - (void) signal(SIGTERM, SIG_DFL); -#ifndef VMS - (void) signal(SIGINT, SIG_DFL); -#endif /* !VMS */ -#ifdef SIGTSTP - if (no_suspend) - (void) signal(SIGTSTP,SIG_DFL); -#endif /* SIGTSTP */ - exit(-1); + exit_immediately(-1); } } fprintf(ofp, "%s %s\tin %s\n", @@ -584,30 +648,7 @@ try_again: /* * If nhist = 0 then it must be the first file. */ - if (!dump_output_immediately) - cleanup(); -#ifdef UNIX - if (dump_output_immediately) - fprintf(stderr,"\nlynx: Can't access startfile %s\n", - startfile); - else -#endif /* UNIX */ - printf("\nlynx: Can't access startfile %s\n", - startfile); - if (!dump_output_immediately) { -#ifndef NOSIGHUP - (void) signal(SIGHUP, SIG_DFL); -#endif /* NOSIGHUP */ - (void) signal(SIGTERM, SIG_DFL); -#ifndef VMS - (void) signal(SIGINT, SIG_DFL); -#endif /* !VMS */ -#ifdef SIGTSTP - if (no_suspend) - (void) signal(SIGTSTP,SIG_DFL); -#endif /* SIGTSTP */ - exit(-1); - } + exit_immediately_with_error_message(NOT_FOUND, first_file); return(-1); } @@ -616,12 +657,12 @@ try_again: * Not supposed to return any file. */ LYoverride_no_cache = FALSE; /* Was TRUE if popped. - FM */ - popped_doc = FALSE; /* Was TRUE if popped. - FM */ + popped_doc = FALSE; /* Was TRUE if popped. - FM */ LYinternal_flag = FALSE; /* Reset to default. - kw */ if (trace_mode_flag == TRUE) { WWW_TraceFlag = TRUE; trace_mode_flag = FALSE; - fprintf(stderr, "Turning TRACE back on.\n\n"); + fprintf(tfp, "Turning TRACE back on.\n\n"); } FREE(newdoc.address); /* to pop last doc */ FREE(newdoc.bookmark); @@ -645,15 +686,15 @@ try_again: FREE(traversal_link_to_add); } } - /* - * Make sure the first file was found and - * has not gone missing. - */ - if (!nhist) { - /* - * If nhist = 0 then it must be the first file. - */ - if (first_file && homepage && + /* + * Make sure the first file was found and + * has not gone missing. + */ + if (!nhist) { + /* + * If nhist = 0 then it must be the first file. + */ + if (first_file && homepage && #ifdef VMS strcasecomp(homepage, startfile) != 0 #else @@ -679,37 +720,10 @@ try_again: newdoc.safe = FALSE; newdoc.internal_link = FALSE; goto try_again; - } else { - if (!dump_output_immediately) - cleanup(); -#ifdef UNIX - if (dump_output_immediately) { - fprintf(stderr, - "\nlynx: Start file could not be found or is not text/html or text/plain\n"); - fprintf(stderr," Exiting...\n"); - } else -#endif /* UNIX */ - { - printf( - "\nlynx: Start file could not be found or is not text/html or text/plain\n"); - printf(" Exiting...\n"); - } - if (!dump_output_immediately) { -#ifndef NOSIGHUP - (void) signal(SIGHUP, SIG_DFL); -#endif /* NOSIGHUP */ - (void) signal(SIGTERM, SIG_DFL); -#ifndef VMS - (void) signal(SIGINT, SIG_DFL); -#endif /* !VMS */ -#ifdef SIGTSTP - if (no_suspend) - (void) signal(SIGTSTP,SIG_DFL); -#endif /* SIGTSTP */ - exit(-1); - } + } else { + exit_immediately_with_error_message(NULLFILE, first_file); return(-1); - } + } } /* @@ -757,10 +771,9 @@ try_again: } cmd = LYK_PREV_DOC; goto new_cmd; - } + } override_LYresubmit_posts = TRUE; goto try_again; - break; case NORMAL: /* @@ -771,7 +784,7 @@ try_again: if (trace_mode_flag == TRUE) { WWW_TraceFlag = TRUE; trace_mode_flag = FALSE; - fprintf(stderr, "Turning TRACE back on.\n\n"); + fprintf(tfp, "Turning TRACE back on.\n\n"); } *prev_target = '\0'; /* Reset for this document. - FM */ @@ -788,15 +801,7 @@ try_again: BOOKMARK_TITLE))) && (temp = HTParse(newdoc.address, "", PARSE_PATH+PARSE_PUNCTUATION)) != NULL) { -#ifdef DOSPATH - cp = HTDOS_wwwName((char *)Home_Dir()); -#else -#ifdef VMS - cp = HTVMS_wwwName((char *)Home_Dir()); -#else - cp = (char *)Home_Dir(); -#endif /* VMS */ -#endif /* DOSPATH */ + cp = wwwName(Home_Dir()); len = strlen(cp); #ifdef VMS if (!strncasecomp(temp, cp, len) && @@ -843,8 +848,7 @@ try_again: if (i <= MBM_V_MAXFILES) { FREE(temp); if (LYValidate) { - _statusline(BOOKMARKS_DISABLED); - sleep(AlertSecs); + HTAlert(BOOKMARKS_DISABLED); return(-1); } if ((temp = HTParse(newdoc.address, "", @@ -852,17 +856,8 @@ try_again: StrAllocCopy(newdoc.address, temp); HTuncache_current_document(); FREE(curdoc.address); -#ifdef DOSPATH StrAllocCat(newdoc.address, - HTDOS_wwwName((char *)Home_Dir())); -#else -#ifdef VMS - StrAllocCat(newdoc.address, - HTVMS_wwwName((char *)Home_Dir())); -#else - StrAllocCat(newdoc.address, Home_Dir()); -#endif /* VMS */ -#endif /* DOSPATH */ + wwwName(Home_Dir())); StrAllocCat(newdoc.address, "/"); StrAllocCat(newdoc.address, (strncmp(BookmarkPage, "./", 2) ? @@ -883,9 +878,7 @@ try_again: if (!strcmp(homepage, startfile)) StrAllocCopy(homepage, newdoc.address); StrAllocCopy(startfile, newdoc.address); - if (TRACE) - fprintf(stderr, - "Reloading as bookmarks=%s\n", + CTRACE(tfp, "Reloading as bookmarks=%s\n", newdoc.address); goto try_again; } @@ -938,7 +931,22 @@ try_again: * line the user was on if s/he has been in the file * before, or it is 1 if this is a new file. */ - Newline = newdoc.line; +#ifdef DISP_PARTIAL + /* Newline = newdoc.line; */ + /* - alreary set and probably updated in partial mode */ + /* incremental rendering stage already closed (but see below) */ + + if (Newline != Newline_partial || display_partial == TRUE) { + /* This is the case when we came from the history stack + * _and_ cached HText was used instead of HT*Copy() call. + * Set Newline and close partial mode here. + */ + Newline = Newline_partial; + display_partial = FALSE; + } +#else + Newline = newdoc.line; /* now here, no partial mode */ +#endif /* * If we are going to a target line or @@ -953,7 +961,13 @@ try_again: * to Newline, so we get a redraw. */ curdoc.line = -1; - +#ifdef USE_PSRC + if (psrc_view) + HTMark_asSource(); /* this flag is not set, since when + displaying source, psrc_view is temporary unset when + writing the HTML header - and HTMainText is created + at that time.*/ +#endif break; } /* end switch */ @@ -980,10 +994,15 @@ try_again: /* * Set the remaining document elements and add to - * the visitied links list. - FM + * the visited links list. - FM */ if (ownerS_address != NULL) { +#ifndef USE_PSRC if (HTOutputFormat == WWW_SOURCE && !HText_getOwner()) +#else + if ( (LYpsrc ? psrc_view : HTOutputFormat == WWW_SOURCE) + && !HText_getOwner() ) +#endif HText_setMainTextOwner(ownerS_address); FREE(ownerS_address); } @@ -992,7 +1011,7 @@ try_again: } else if (!dump_output_immediately) { StrAllocCopy(curdoc.title, newdoc.title); } - owner_address = HText_getOwner(); + StrAllocCopy(owner_address, HText_getOwner()); curdoc.safe = HTLoadedDocumentIsSafe(); if (!dump_output_immediately) { LYAddVisitedLink(&curdoc); @@ -1004,6 +1023,11 @@ try_again: * the source, we get rendered HTML from now on. */ HTOutputFormat = WWW_PRESENT; +#ifdef USE_PSRC + psrc_view = FALSE; +#endif + + HTMLSetCharacterHandling(current_char_set); /* restore, for sure? */ /* * Reset all of the other relevant flags. - FM @@ -1013,7 +1037,7 @@ try_again: LYNoRefererForThis = FALSE; /* always reset on return here */ reloading = FALSE; /* only set for RELOAD and RESUBMIT */ HEAD_request = FALSE; /* only set for HEAD requests */ - LYPermitURL = FALSE; /* only set for LYValidate */ + LYPermitURL = FALSE; /* only set for LYValidate */ ForcePush = FALSE; /* only set for some PRINT requests. */ LYforce_HTML_mode = FALSE; popped_doc = FALSE; @@ -1038,6 +1062,8 @@ try_again: start_curses(); clear(); refresh_screen = TRUE; /* to force a redraw */ + if (HTMainText) /* to REALLY force it... - kw */ + HText_setStale(HTMainText); recent_sizechange = FALSE; if (user_mode == NOVICE_MODE) { display_lines = LYlines-4; @@ -1053,7 +1079,6 @@ try_again: */ Newline = www_search_result; www_search_result = -1; /* reset */ - more = HText_canScrollDown(); } if (first_file == TRUE) { @@ -1070,15 +1095,13 @@ try_again: temp = HTParse(curdoc.address, "", PARSE_ACCESS+PARSE_HOST+PARSE_PUNCTUATION); if (!temp || *temp == '\0') { - StrAllocCopy(startrealm, "None"); + StrAllocCopy(startrealm, NO_NOTHING); } else { StrAllocCopy(startrealm, temp); FREE(temp); if (!(temp = HTParse(curdoc.address, "", PARSE_PATH+PARSE_PUNCTUATION))) { - if (startrealm[strlen(startrealm)-1] != '/') { - StrAllocCat(startrealm, "/"); - } + LYAddHtmlSep(&startrealm); } else { if (forced_HTML_mode && !dump_output_immediately && @@ -1111,9 +1134,7 @@ try_again: } } FREE(temp); - if (TRACE) { - fprintf(stderr, "Starting realm is '%s'\n\n", startrealm); - } + CTRACE(tfp, "Starting realm is '%s'\n\n", startrealm); if (traversal) { /* * Set up the crawl output stuff. @@ -1128,26 +1149,21 @@ try_again: */ if (strncmp((curdoc.address ? curdoc.address : "NULL"), "http", 4)) { - StrAllocCopy(traversal_host, "None"); + StrAllocCopy(traversal_host, NO_NOTHING); } else if (check_realm) { StrAllocCopy(traversal_host, startrealm); } else { temp = HTParse(curdoc.address, "", PARSE_ACCESS+PARSE_HOST+PARSE_PUNCTUATION); if (!temp || *temp == '\0') { - StrAllocCopy(traversal_host, "None"); + StrAllocCopy(traversal_host, NO_NOTHING); } else { StrAllocCopy(traversal_host, temp); - if (traversal_host[strlen(traversal_host)-1] != '/') { - StrAllocCat(traversal_host, "/"); - } + LYAddHtmlSep(&traversal_host); } FREE(temp); } - if (TRACE) { - fprintf(stderr, - "Traversal host is '%s'\n\n", traversal_host); - } + CTRACE(tfp, "Traversal host is '%s'\n\n", traversal_host); } if (startfile) { /* @@ -1175,10 +1191,55 @@ try_again: } } +#ifdef SOURCE_CACHE + /* + * If the parse settings have changed since this HText was + * generated, we need to reparse and redraw it. -dsb + * + * Should be configured to avoid shock for experienced lynx users. + * Currently enabled for cached sources only. + */ + if (HTdocument_settings_changed()) { + if (HTcan_reparse_document()) { + HTUserMsg(gettext("Reparsing document under current settings...")); + if (HTreparse_document()) {} + } else { + /* + * Urk. I have no idea how to recover from a failure here. + * At a guess, I'll try reloading. -dsb + */ + /* currently disabled *** + HTUserMsg(gettext("Reparsing document under current settings...")); + cmd = LYK_RELOAD; + goto new_cmd; + */ + } + } + + /* + * Trying to accomodate HTreparse_document() logic + * with mainloop events. Working out of force_load cycle + * set all the necessary flags here, from case NORMAL + * (see also LYK_SOURCE, some staff implemented directly there). + */ + if (from_source_cache) { + from_source_cache = FALSE; /* done */ + + /* + * Make sure curdoc.line will not be equal + * to Newline, so we get a redraw. + */ + curdoc.line = -1; + + } +#endif + + /* * If the curdoc.line is different than Newline then there must * have been a change since last update. Run HText_pageDisplay() * create a fresh screen of text out. + * All display_partial calls ends here for final redraw. */ if (curdoc.line != Newline) { @@ -1190,13 +1251,12 @@ try_again: if (lynx_edit_mode && nlinks > 0 && !HTList_isEmpty(tagged)) showtags(tagged); #endif /* DIRED_SUPPORT */ + /* - * If more equals TRUE, then there is more - * info below this page . + * If more equals TRUE, then there is more info below this page. */ more = HText_canScrollDown(); curdoc.line = Newline = HText_getTopOfScreen()+1; - lines_in_file = HText_getNumOfLines(); if (curdoc.title == NULL) { /* @@ -1225,7 +1285,7 @@ try_again: /* * We may have popped a doc (possibly in local_dired) * which didn't have any links when it was pushed, but - * does have links now (e.g. a file was created) - KW + * does have links now (e.g., a file was created) - KW */ curdoc.link = 0; } @@ -1256,6 +1316,12 @@ try_again: if (lynx_edit_mode && nlinks > 0 && !HTList_isEmpty(tagged)) showtags(tagged); #endif /* DIRED_SUPPORT */ + + /* + * If more equals TRUE, then there is more info below this page. + */ + more = HText_canScrollDown(); + if (user_mode == NOVICE_MODE) noviceline(more); /* print help message */ refresh_screen = FALSE; @@ -1265,8 +1331,8 @@ try_again: /* * Report unread or new mail, if appropriate. */ - if (check_mail && !no_mail && LYCheckMail()) - sleep(MessageSecs); + if (check_mail && !no_mail) + LYCheckMail(); /* * If help is not on the screen, @@ -1274,161 +1340,7 @@ try_again: * to tell the user other misc info. */ if (!show_help) { - /* - * Make sure form novice lines are replaced. - */ - if (user_mode == NOVICE_MODE) { - noviceline(more); - } - - /* - * If we are in forms mode then explicitly - * tell the user what each kind of link is. - */ - if (HTisDocumentSource()) { - /* - * Currently displaying HTML source. - */ - _statusline(SOURCE_HELP); - -#ifdef INDICATE_FORMS_MODE_FOR_ALL_LINKS_ON_PAGE - } else if (lynx_mode == FORMS_LYNX_MODE && nlinks > 0) { -#else -#ifdef NORMAL_NON_FORM_LINK_STATUSLINES_FOR_ALL_USER_MODES - } else if (lynx_mode == FORMS_LYNX_MODE && nlinks > 0 && - !(links[curdoc.link].type & WWW_LINK_TYPE)) { -#else - } else if (lynx_mode == FORMS_LYNX_MODE && nlinks > 0 && - !(user_mode == ADVANCED_MODE && - (links[curdoc.link].type & WWW_LINK_TYPE))) { -#endif /* NORMAL_NON_FORM_LINK_STATUSLINES_FOR_ALL_USER_MODES */ -#endif /* INDICATE_FORMS_MODE_FOR_ALL_LINKS_ON_PAGE */ - if (links[curdoc.link].type == WWW_FORM_LINK_TYPE) - switch(links[curdoc.link].form->type) { - case F_PASSWORD_TYPE: - if (links[curdoc.link].form->disabled == YES) - statusline(FORM_LINK_PASSWORD_UNM_MSG); - else - statusline(FORM_LINK_PASSWORD_MESSAGE); - break; - case F_OPTION_LIST_TYPE: - if (links[curdoc.link].form->disabled == YES) - statusline(FORM_LINK_OPTION_LIST_UNM_MSG); - else - statusline(FORM_LINK_OPTION_LIST_MESSAGE); - break; - case F_CHECKBOX_TYPE: - if (links[curdoc.link].form->disabled == YES) - statusline(FORM_LINK_CHECKBOX_UNM_MSG); - else - statusline(FORM_LINK_CHECKBOX_MESSAGE); - break; - case F_RADIO_TYPE: - if (links[curdoc.link].form->disabled == YES) - statusline(FORM_LINK_RADIO_UNM_MSG); - else - statusline(FORM_LINK_RADIO_MESSAGE); - break; - case F_TEXT_SUBMIT_TYPE: - if (links[curdoc.link].form->disabled == YES) { - statusline(FORM_LINK_TEXT_SUBMIT_UNM_MSG); - } else if (links[curdoc.link].form->submit_method == - URL_MAIL_METHOD) { - if (no_mail) - statusline( - FORM_LINK_TEXT_SUBMIT_MAILTO_DIS_MSG); - else - statusline(FORM_LINK_TEXT_SUBMIT_MAILTO_MSG); - } else if (links[curdoc.link].form->no_cache) { - statusline(FORM_LINK_TEXT_RESUBMIT_MESSAGE); - } else { - statusline(FORM_LINK_TEXT_SUBMIT_MESSAGE); - } - break; - case F_SUBMIT_TYPE: - case F_IMAGE_SUBMIT_TYPE: - if (links[curdoc.link].form->disabled == YES) { - statusline(FORM_LINK_SUBMIT_DIS_MSG); - } else if (links[curdoc.link].form->submit_method == - URL_MAIL_METHOD) { - if (no_mail) { - statusline(FORM_LINK_SUBMIT_MAILTO_DIS_MSG); - } else { - statusline(FORM_LINK_SUBMIT_MAILTO_MSG); - } - } else if (links[curdoc.link].form->no_cache) { - statusline(FORM_LINK_RESUBMIT_MESSAGE); - } else { - statusline(FORM_LINK_SUBMIT_MESSAGE); - } - break; - case F_RESET_TYPE: - if (links[curdoc.link].form->disabled == YES) - statusline(FORM_LINK_RESET_DIS_MSG); - else - statusline(FORM_LINK_RESET_MESSAGE); - break; - case F_TEXT_TYPE: - case F_TEXTAREA_TYPE: - if (links[curdoc.link].form->disabled == YES) - statusline(FORM_LINK_TEXT_UNM_MSG); - else - statusline(FORM_LINK_TEXT_MESSAGE); - break; - } - else - statusline(NORMAL_LINK_MESSAGE); - - /* - * Let them know if it's an index -- very rare. - */ - if (is_www_index) { - move(LYlines-1,LYcols-8); - start_reverse(); - addstr("-index-"); - stop_reverse(); - } - - } else if (user_mode == ADVANCED_MODE && nlinks > 0) { - /* - * Show the URL or, for some internal links, the fragment - */ - cp = NULL; - if (links[curdoc.link].type == WWW_INTERN_LINK_TYPE && - strncmp(links[curdoc.link].lname, "LYNXIMGMAP:", 11)) { - cp = strchr(links[curdoc.link].lname, '#'); - } - if (!cp) - cp = links[curdoc.link].lname; - if (more) - if (is_www_index) - _user_message("-more- -index- %s", - cp); - else - _user_message("-more- %s",cp); - else - if (is_www_index) - _user_message("-index- %s",cp); - else - statusline(cp); - } else if (is_www_index && more) { - char buf[128]; - - sprintf(buf, WWW_INDEX_MORE_MESSAGE, key_for_func(LYK_INDEX_SEARCH)); - _statusline(buf); - } else if (is_www_index) { - char buf[128]; - - sprintf(buf, WWW_INDEX_MESSAGE, key_for_func(LYK_INDEX_SEARCH)); - _statusline(buf); - } else if (more) { - if (user_mode == NOVICE_MODE) - _statusline(MORE); - else - _statusline(MOREHELP); - } else { - _statusline(HELP); - } + print_status_message(links[curdoc.link], &cp); } else { show_help = FALSE; } @@ -1464,24 +1376,13 @@ try_again: #ifdef UNIX if (dump_output_immediately) fprintf(stderr, - "Fatal error - could not open output file %s\n",cfile); + gettext("Fatal error - could not open output file %s\n"),cfile); else #endif printf( - "Fatal error - could not open output file %s\n",cfile); + gettext("Fatal error - could not open output file %s\n"),cfile); if (!dump_output_immediately) { -#ifndef NOSIGHUP - (void) signal(SIGHUP, SIG_DFL); -#endif /* NOSIGHUP */ - (void) signal(SIGTERM, SIG_DFL); -#ifndef VMS - (void) signal(SIGINT, SIG_DFL); -#endif /* !VMS */ -#ifdef SIGTSTP - if (no_suspend) - (void) signal(SIGTSTP,SIG_DFL); -#endif /* SIGTSTP */ - exit(-1); + exit_immediately(-1); } return(-1); } @@ -1506,11 +1407,63 @@ try_again: addstr(FORM_NOVICELINE_TWO); } c = change_form_link(&links[curdoc.link], - FORM_UP, &newdoc, &refresh_screen, + &newdoc, &refresh_screen, links[curdoc.link].form->name, links[curdoc.link].form->value); - if (c == '\n' || c == '\r') + if (c == '\n' || c == '\r') { +#ifdef AUTOGROW + /* + * If on the bottom line of a TEXTAREA, and the user hit + * the ENTER key, we add a new line/anchor automatically, + * positioning the cursor on it. + * + * If at the bottom of the screen, we effectively perform + * an LYK_DOWN_HALF-like operation, then move down to the + * new line we just added. --KED 02/14/99 + * + * [There is some redundancy and non-standard indentation + * in the monster-if() below. This is intentional ... to + * try and improve the "readability" (such as it is). + * Caveat emptor to anyone trying to change it.] + */ + if ((links[curdoc.link].type == WWW_FORM_LINK_TYPE && + links[curdoc.link].form->type == F_TEXTAREA_TYPE) + && + ((curdoc.link == nlinks-1) + || + ((curdoc.link < nlinks-1) && + !(links[curdoc.link+1].type == WWW_FORM_LINK_TYPE && + links[curdoc.link+1].form->type == F_TEXTAREA_TYPE)) + || + ((curdoc.link < nlinks-1) && + ((links[curdoc.link+1].type == WWW_FORM_LINK_TYPE && + links[curdoc.link+1].form->type == F_TEXTAREA_TYPE) + && + ((links[curdoc.link].form->number != + links[curdoc.link+1].form->number) || + (strcmp (links[curdoc.link].form->name, + links[curdoc.link+1].form->name) != 0)))))) { + + HText_ExpandTextarea (&links[curdoc.link], 1); + + if (links[curdoc.link].ly < display_lines) { + refresh_screen = TRUE; + + } else { + + Newline += (display_lines/2); + if (nlinks > 0 && curdoc.link > -1 && + links[curdoc.link].ly > display_lines/2) { + newdoc.link = curdoc.link; + for (i = 0; links[i].ly <= (display_lines/2); i++) + --newdoc.link; + newdoc.link++; + } + } + } +#endif /* AUTOGROW */ + #ifdef FASTTAB /* * Make return act like down-arrow. @@ -1522,6 +1475,7 @@ try_again: */ c = '\t'; #endif /* FASTTAB */ + } } else { /* * Get a keystroke from the user. @@ -1597,18 +1551,7 @@ new_keyboard_input: (nhist <= 0 )) { if (!dump_output_immediately) { cleanup(); -#ifndef NOSIGHUP - (void) signal(SIGHUP, SIG_DFL); -#endif /* NOSIGHUP */ - (void) signal(SIGTERM, SIG_DFL); -#ifndef VMS - (void) signal(SIGINT, SIG_DFL); -#endif /* !VMS */ -#ifdef SIGTSTP - if (no_suspend) - (void) signal(SIGTSTP,SIG_DFL); -#endif /* SIGTSTP */ - exit(-1); + exit_immediately(-1); } return(-1); } @@ -1636,18 +1579,7 @@ new_keyboard_input: (nhist <= 0 )) { if (!dump_output_immediately) { cleanup(); -#ifndef NOSIGHUP - (void) signal(SIGHUP, SIG_DFL); -#endif /* NOSIGHUP */ - (void) signal(SIGTERM, SIG_DFL); -#ifndef VMS - (void) signal(SIGINT, SIG_DFL); -#endif /* !VMS */ -#ifdef SIGTSTP - if (no_suspend) - (void) signal(SIGTSTP,SIG_DFL); -#endif /* SIGTSTP */ - exit(-1); + exit_immediately(-1); } return(-1); } @@ -1659,8 +1591,8 @@ new_keyboard_input: cmd = keymap[c+1]; /* add 1 to map EOF to 0 */ #if defined(DIRED_SUPPORT) && defined(OK_OVERRIDE) - if (lynx_edit_mode && override[c+1] && !no_dired_support) - cmd = override[c+1]; + if (lynx_edit_mode && key_override[c+1] && !no_dired_support) + cmd = key_override[c+1]; #endif /* DIRED_SUPPORT && OK_OVERRIDE */ real_cmd = cmd; @@ -1670,6 +1602,8 @@ new_cmd: /* * back through the getch() loop. */ + CTRACE_FLUSH(tfp); + switch(cmd) { case 0: /* unmapped character */ default: @@ -1710,6 +1644,10 @@ new_cmd: /* int lindx = ((nlinks > 0) ? curdoc.link : 0); int number; + /* pass cur line num for use in follow_link_number() + * Note: Current line may not equal links[cur].line + */ + number = curdoc.line; switch (follow_link_number(c, lindx, &newdoc, &number)) { case DO_LINK_STUFF: /* @@ -1728,8 +1666,7 @@ new_cmd: /* if (links[lindx].type == WWW_INTERN_LINK_TYPE) { LYinternal_flag = TRUE; newdoc.internal_link = TRUE; - if (0==strcmp((curdoc.title ? curdoc.title : ""), - LIST_PAGE_TITLE) && + if (LYIsListpageTitle(curdoc.title ? curdoc.title : "") && 0==strcmp(HTLoadedDocumentURL(), LYlist_temp_url())) { if (!curdoc.post_data || /* @@ -1776,8 +1713,7 @@ new_cmd: /* StrAllocCopy(newdoc.address, curdoc.address); StrAllocCopy(newdoc.title, curdoc.title); newdoc.internal_link = curdoc.internal_link; - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); if (nlinks > 0) HText_pageDisplay(curdoc.line, prev_target); break; @@ -1795,8 +1731,7 @@ new_cmd: /* FREE(newdoc.post_data); FREE(newdoc.post_content_type); newdoc.internal_link = FALSE; - _statusline(DISCARDING_POST_DATA); - sleep(AlertSecs); + HTAlert(DISCARDING_POST_DATA); } } } @@ -1855,8 +1790,7 @@ new_cmd: /* StrAllocCopy(temp, user_input_buffer); sprintf(user_input_buffer, LINK_ALREADY_CURRENT, number); - _statusline(user_input_buffer); - sleep(MessageSecs); + HTUserMsg(user_input_buffer); strcpy(user_input_buffer, temp); FREE(temp); } else { @@ -1888,26 +1822,23 @@ new_cmd: /* * users (like me 8-). - FM */ if (Newline <= 1) { - _statusline(ALREADY_AT_BEGIN); + HTInfoMsg(ALREADY_AT_BEGIN); } else if (!more) { - _statusline(ALREADY_AT_END); + HTInfoMsg(ALREADY_AT_END); } else { StrAllocCopy(temp, user_input_buffer); sprintf(user_input_buffer, ALREADY_AT_PAGE, number); - _statusline(user_input_buffer); - sleep(MessageSecs); + HTUserMsg(user_input_buffer); strcpy(user_input_buffer, temp); FREE(temp); } - sleep(MessageSecs); } break; case PRINT_ERROR: old_c = real_c; - _statusline(BAD_LINK_NUM_ENTERED); - sleep(MessageSecs); + HTUserMsg(BAD_LINK_NUM_ENTERED); break; } break; @@ -1922,21 +1853,52 @@ new_cmd: /* curdoc.safe != TRUE) && confirm_post_resub(curdoc.address, curdoc.title, 1, 1) == FALSE) { - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); break; } if (HTisDocumentSource()) { HTOutputFormat = WWW_PRESENT; +#ifdef USE_PSRC + psrc_view = FALSE; +#endif } else { if (HText_getOwner()) StrAllocCopy(ownerS_address, HText_getOwner()); LYUCPushAssumed(HTMainAnchor); +#ifdef USE_PSRC + if (LYpsrc) + psrc_view = TRUE; + else + HTOutputFormat = WWW_SOURCE; +#else HTOutputFormat = WWW_SOURCE; +#endif } - LYforce_no_cache = TRUE; + +#ifdef SOURCE_CACHE + if (HTreparse_document()) { + /* + * These normally get cleaned up after getfile() returns; + * since we're not calling getfile(), we have to clean them + * up ourselves. -dsb + */ + HTOutputFormat = WWW_PRESENT; +#ifdef USE_PSRC + if (psrc_view) + HTMark_asSource(); + psrc_view = FALSE; +#endif + FREE(ownerS_address); /* not used with source_cache */ + LYUCPopAssumed(); /* probably a right place here */ + HTMLSetCharacterHandling(current_char_set); /* restore now */ + + break; + } +#endif + FREE(curdoc.address); /* so it doesn't get pushed */ + LYforce_no_cache = TRUE; break; case LYK_RELOAD: /* control-R to reload and refresh */ @@ -1947,17 +1909,27 @@ new_cmd: /* if ((curdoc.post_data != NULL && curdoc.safe != TRUE) && HTConfirm(CONFIRM_POST_RESUBMISSION) == FALSE) { - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); break; } /* * Check to see if should reload source, or load html */ + if (HTisDocumentSource()) { + force_old_UCLYhndl_on_reload = TRUE; + forced_UCLYhdnl = HTMainText_Get_UCLYhndl(); +#ifndef USE_PSRC HTOutputFormat = WWW_SOURCE; +#else + if (LYpsrc) + psrc_view = TRUE; + else + HTOutputFormat = WWW_SOURCE; +#endif } + HEAD_request = HTLoadedDocumentIsHEAD(); HTuncache_current_document(); #ifdef NO_ASSUME_SAME_DOC @@ -1973,19 +1945,8 @@ new_cmd: /* * this. As the problems show up, we'll try to fix them, * or add warnings. - FM) */ - if (lynx_mode == FORMS_LYNX_MODE) { - /* - * Note that if there are no form links on the current - * page, lynx_mode won't have this setting and we won't - * know that this warning should be issued. - FM - */ - _statusline(RELOADING_FORM); - sleep(AlertSecs); - } - newdoc.line = ((curdoc.line > 0) ? - curdoc.line : 1); - newdoc.link = ((curdoc.link > -1) ? - curdoc.link : 0); + newdoc.line = curdoc.line; + newdoc.link = curdoc.link; #endif /* NO_ASSUME_SAME_DOC */ FREE(curdoc.address); /* so it doesn't get pushed */ #ifdef VMS @@ -2003,7 +1964,10 @@ new_cmd: /* reloading = TRUE; break; - case LYK_HISTORICAL: + case LYK_HISTORICAL: /* toggle 'historical' comments parsing */ +#ifdef SOURCE_CACHE + if (!HTcan_reparse_document()) { +#endif /* * Check if this is a reply from a POST, and if so, * seek confirmation of reload if the safe element @@ -2013,29 +1977,40 @@ new_cmd: /* curdoc.safe != TRUE) && confirm_post_resub(curdoc.address, NULL, 0, 0) == FALSE) { - _statusline(WILL_NOT_RELOAD_DOC); - sleep(InfoSecs); + HTInfoMsg(WILL_NOT_RELOAD_DOC); } else { HTuncache_current_document(); StrAllocCopy(newdoc.address, curdoc.address); FREE(curdoc.address); + newdoc.line = curdoc.line; + newdoc.link = curdoc.link; } +#ifdef SOURCE_CACHE + } /* end if no bypass */ +#endif if (historical_comments) historical_comments = FALSE; else historical_comments = TRUE; if (minimal_comments) { - _statusline(historical_comments ? - HISTORICAL_ON_MINIMAL_OFF : HISTORICAL_OFF_MINIMAL_ON); + HTAlert(historical_comments ? + HISTORICAL_ON_MINIMAL_OFF : HISTORICAL_OFF_MINIMAL_ON); } else { - _statusline(historical_comments ? + HTAlert(historical_comments ? HISTORICAL_ON_VALID_OFF : HISTORICAL_OFF_VALID_ON); } - sleep(AlertSecs); +#ifdef SOURCE_CACHE + if (HTreparse_document()) { + break; /* OK */ + } +#endif break; - case LYK_MINIMAL: + case LYK_MINIMAL: /* toggle 'minimal' comments parsing */ if (!historical_comments) { +#ifdef SOURCE_CACHE + if (!HTcan_reparse_document()) { +#endif /* * Check if this is a reply from a POST, and if so, * seek confirmation of reload if the safe element @@ -2045,29 +2020,40 @@ new_cmd: /* curdoc.safe != TRUE) && confirm_post_resub(curdoc.address, NULL, 0, 0) == FALSE) { - _statusline(WILL_NOT_RELOAD_DOC); - sleep(InfoSecs); + HTInfoMsg(WILL_NOT_RELOAD_DOC); } else { HTuncache_current_document(); StrAllocCopy(newdoc.address, curdoc.address); FREE(curdoc.address); + newdoc.line = curdoc.line; + newdoc.link = curdoc.link; } } +#ifdef SOURCE_CACHE + } /* end if no bypass */ +#endif if (minimal_comments) minimal_comments = FALSE; else minimal_comments = TRUE; if (!historical_comments) { - _statusline(minimal_comments ? + HTAlert(minimal_comments ? MINIMAL_ON_IN_EFFECT : MINIMAL_OFF_VALID_ON); } else { - _statusline(minimal_comments ? - MINIMAL_ON_BUT_HISTORICAL : MINIMAL_OFF_HISTORICAL_ON); + HTAlert(minimal_comments ? + MINIMAL_ON_BUT_HISTORICAL : MINIMAL_OFF_HISTORICAL_ON); + } +#ifdef SOURCE_CACHE + if (HTreparse_document()) { + break; /* OK */ } - sleep(AlertSecs); +#endif break; case LYK_SOFT_DQUOTES: +#ifdef SOURCE_CACHE + if (!HTcan_reparse_document()) { +#endif /* * Check if this is a reply from a POST, and if so, * seek confirmation of reload if the safe element @@ -2077,23 +2063,34 @@ new_cmd: /* curdoc.safe != TRUE) && confirm_post_resub(curdoc.address, NULL, 1, 1) == FALSE) { - _statusline(WILL_NOT_RELOAD_DOC); - sleep(InfoSecs); + HTInfoMsg(WILL_NOT_RELOAD_DOC); } else { HTuncache_current_document(); StrAllocCopy(newdoc.address, curdoc.address); FREE(curdoc.address); + newdoc.line = curdoc.line; + newdoc.link = curdoc.link; } +#ifdef SOURCE_CACHE + } /* end if no bypass */ +#endif if (soft_dquotes) soft_dquotes = FALSE; else soft_dquotes = TRUE; - _statusline(soft_dquotes ? - SOFT_DOUBLE_QUOTE_ON : SOFT_DOUBLE_QUOTE_OFF); - sleep(MessageSecs); + HTUserMsg(soft_dquotes ? + SOFT_DOUBLE_QUOTE_ON : SOFT_DOUBLE_QUOTE_OFF); +#ifdef SOURCE_CACHE + if (HTreparse_document()) { + break; /* OK */ + } +#endif break; case LYK_SWITCH_DTD: +#ifdef SOURCE_CACHE + if (!HTcan_reparse_document()) { +#endif /* * Check if this is a reply from a POST, and if so, * seek confirmation of reload if the safe element @@ -2103,35 +2100,59 @@ new_cmd: /* curdoc.safe != TRUE) && confirm_post_resub(curdoc.address, NULL, 1, 1) == FALSE) { - _statusline(WILL_NOT_RELOAD_DOC); - sleep(InfoSecs); + HTInfoMsg(WILL_NOT_RELOAD_DOC); } else { /* * If currently viewing preparsed source, switching * to the other DTD parsing may show source differences, * so stay in source view - kw */ + + /* NOTE: this conditional can be considered incorrect - + current behaviour - when viewing source and + LYPreparsedSource==TRUE, pressing ^V will toggle parser mode + AND switch back from the source view to presentation view.-HV + */ if (HTisDocumentSource() && LYPreparsedSource) { - HTOutputFormat = WWW_SOURCE; +#ifdef USE_PSRC + if (LYpsrc) + psrc_view = TRUE; + else +#endif + HTOutputFormat = WWW_SOURCE; } HTuncache_current_document(); StrAllocCopy(newdoc.address, curdoc.address); FREE(curdoc.address); - } #ifdef NO_ASSUME_SAME_DOC - newdoc.line=1; - newdoc.link=0; + newdoc.line = 1; + newdoc.link = 0; #else - newdoc.line = ((curdoc.line > 0) ? curdoc.line : 1); - newdoc.link = ((curdoc.link > -1) ? curdoc.link : 0); + newdoc.line = curdoc.line; + newdoc.link = curdoc.link; #endif /* NO_ASSUME_SAME_DOC */ - if (New_DTD) - New_DTD = NO; - else - New_DTD = YES; - HTSwitchDTD(New_DTD); - _statusline(New_DTD ? USING_DTD_1 : USING_DTD_0); - sleep(MessageSecs); + } +#ifdef SOURCE_CACHE + } /* end if no bypass */ +#endif + Old_DTD = !Old_DTD; + HTSwitchDTD(!Old_DTD); + HTUserMsg(Old_DTD ? USING_DTD_0 : USING_DTD_1); +#ifdef SOURCE_CACHE + if (HTcan_reparse_document()) { + if (HTisDocumentSource() && LYPreparsedSource) { +#ifdef USE_PSRC + if (LYpsrc) + psrc_view = TRUE; + else +#endif + HTOutputFormat = WWW_SOURCE; + } + if (HTreparse_document()) { + break; + } + } /* end if no bypass */ +#endif break; #ifdef NOT_DONE_YET @@ -2142,30 +2163,25 @@ new_cmd: /* case LYK_QUIT: /* quit */ if (LYQuitDefaultYes == TRUE) { - _statusline(REALLY_QUIT_Y); + c = HTConfirmDefault(REALLY_QUIT_Y, YES); } else { - _statusline(REALLY_QUIT_N); + c = HTConfirmDefault(REALLY_QUIT_N, NO); } - c = LYgetch(); if (LYQuitDefaultYes == TRUE) { - if (TOUPPER(c) != 'N' && - c != 7) { + if (c != NO) { return(0); } else { - statusline(NO_CANCEL); - sleep(InfoSecs); + HTInfoMsg(NO_CANCEL); } - } else if (TOUPPER(c) == 'Y') { + } else if (c == YES) { return(0); } else { - statusline(NO_CANCEL); - sleep(InfoSecs); + HTInfoMsg(NO_CANCEL); } break; - case LYK_ABORT: /* don't ask the user about quitting */ + case LYK_ABORT: /* don't ask the user about quitting */ return(0); - break; case LYK_NEXT_PAGE: /* next page */ if (more) { @@ -2175,8 +2191,7 @@ new_cmd: /* curdoc.link = nlinks-1; /* put on last link */ } else if (old_c != real_c) { old_c = real_c; - _statusline(ALREADY_AT_END); - sleep(MessageSecs); + HTInfoMsg(ALREADY_AT_END); } break; @@ -2188,8 +2203,7 @@ new_cmd: /* curdoc.link = 0; /* put on first link */ } else if (old_c != real_c) { old_c = real_c; - _statusline(ALREADY_AT_BEGIN); - sleep(MessageSecs); + HTInfoMsg(ALREADY_AT_BEGIN); } break; @@ -2208,8 +2222,7 @@ new_cmd: /* } } else if (old_c != real_c) { old_c = real_c; - _statusline(ALREADY_AT_BEGIN); - sleep(MessageSecs); + HTInfoMsg(ALREADY_AT_BEGIN); } break; @@ -2224,8 +2237,7 @@ new_cmd: /* } } else if (old_c != real_c) { old_c = real_c; - _statusline(ALREADY_AT_END); - sleep(MessageSecs); + HTInfoMsg(ALREADY_AT_END); } break; @@ -2247,8 +2259,7 @@ new_cmd: /* } } else if (old_c != real_c) { old_c = real_c; - _statusline(ALREADY_AT_BEGIN); - sleep(MessageSecs); + HTInfoMsg(ALREADY_AT_BEGIN); } break; @@ -2263,8 +2274,7 @@ new_cmd: /* } } else if (old_c != real_c) { old_c = real_c; - _statusline(ALREADY_AT_END); - sleep(MessageSecs); + HTInfoMsg(ALREADY_AT_END); } break; @@ -2284,7 +2294,7 @@ new_cmd: /* case LYK_END: if (more) { - Newline = MAXINT; /* go to end of file */ + Newline = HText_getNumOfLines() - display_lines + 3; /* go to end of file */ arrowup = TRUE; /* position on last link */ } else { cmd = LYK_NEXT_PAGE; @@ -2330,8 +2340,7 @@ new_cmd: /* } else if (old_c != real_c) { old_c = real_c; - _statusline(ALREADY_AT_BEGIN); - sleep(MessageSecs); + HTInfoMsg(ALREADY_AT_BEGIN); } break; @@ -2373,11 +2382,180 @@ new_cmd: /* } else if (old_c != real_c) { old_c = real_c; - _statusline(ALREADY_AT_END); - sleep(MessageSecs); + HTInfoMsg(ALREADY_AT_END); } break; + case LYK_FASTFORW_LINK: + { + int samepage = 0, nextlink = curdoc.link; + if (nlinks > 1) { + + /* + * If in textarea, move to first link or field + * after it if there is one on this screen. - kw + */ + if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && + links[curdoc.link].form->type == F_TEXTAREA_TYPE) { + int thisgroup = links[curdoc.link].form->number; + char *thisname = links[curdoc.link].form->name; + + if (curdoc.link < nlinks-1 && + !(links[nlinks-1].type == WWW_FORM_LINK_TYPE && + links[nlinks-1].form->type == F_TEXTAREA_TYPE && + links[nlinks-1].form->number == thisgroup && + sametext(links[nlinks-1].form->name, thisname))) { + do nextlink++; + while + (links[nextlink].type == WWW_FORM_LINK_TYPE && + links[nextlink].form->type == F_TEXTAREA_TYPE && + links[nextlink].form->number == thisgroup && + sametext(links[nextlink].form->name, thisname)); + samepage = 1; + } else if (!more && Newline == 1 && curdoc.link > 0) { + nextlink = 0; + samepage = 1; + } + } else if (curdoc.link < nlinks-1) { + nextlink++; + samepage = 1; + } else if (!more && Newline == 1 && curdoc.link > 0) { + nextlink = 0; + samepage = 1; + } + } + if (samepage) { + highlight(OFF, curdoc.link, prev_target); + curdoc.link = nextlink; + break; /* and we are done. */ + + /* + * At the bottom of list and there is only one page. + * Move to the top link on the page. + */ + } else if (!more && Newline == 1 && curdoc.link == nlinks-1) { + highlight(OFF, curdoc.link, prev_target); + curdoc.link = 0; + + } else if (more && /* need a later page */ + HTGetLinkOrFieldStart(curdoc.link, + &Newline, &newdoc.link, + 1, TRUE) != NO) { + Newline++; /* our line counting starts with 1 not 0 */ + /* nothing more to do here */ + + } else if (old_c != real_c) { + old_c = real_c; + HTInfoMsg(NO_LINKS_BELOW); + } + break; + } + case LYK_FASTBACKW_LINK: + { + int samepage = 0, nextlink = curdoc.link; + int res; + if (nlinks > 1) { + + /* + * If in textarea, move to first link or textarea group + * before it if there is one on this screen. - kw + */ + if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && + links[curdoc.link].form->type == F_TEXTAREA_TYPE) { + int thisgroup = links[curdoc.link].form->number; + char *thisname = links[curdoc.link].form->name; + + if (curdoc.link > 0 && + !(links[0].type == WWW_FORM_LINK_TYPE && + links[0].form->type == F_TEXTAREA_TYPE && + links[0].form->number == thisgroup && + sametext(links[0].form->name, thisname))) { + do nextlink--; + while + (links[nextlink].type == WWW_FORM_LINK_TYPE && + links[nextlink].form->type == F_TEXTAREA_TYPE && + links[nextlink].form->number == thisgroup && + sametext(links[nextlink].form->name, thisname)); + samepage = 1; + + } else if (!more && Newline == 1 && + (links[0].type == WWW_FORM_LINK_TYPE && + links[0].form->type == F_TEXTAREA_TYPE && + links[0].form->number == thisgroup && + sametext(links[0].form->name, thisname)) && + !(links[nlinks-1].type == WWW_FORM_LINK_TYPE && + links[nlinks-1].form->type == F_TEXTAREA_TYPE && + links[nlinks-1].form->number == thisgroup && + sametext(links[nlinks-1].form->name, thisname))) { + nextlink = nlinks - 1; + samepage = 1; + + } else if (!more && Newline == 1 && curdoc.link > 0) { + nextlink = 0; + samepage = 1; + } + } else if (curdoc.link > 0) { + nextlink--; + samepage = 1; + } else if (!more && Newline == 1) { + nextlink = nlinks - 1; + samepage = 1; + } + } + if (samepage) { + /* + * If the link as determined so far is part of a + * group of textarea fields, try to use the first + * of them that's on the screen instead. - kw + */ + if (nextlink > 0 && + links[nextlink].type == WWW_FORM_LINK_TYPE && + links[nextlink].form->type == F_TEXTAREA_TYPE) { + int thisgroup = links[nextlink].form->number; + char *thisname = links[nextlink].form->name; + if (links[0].type == WWW_FORM_LINK_TYPE && + links[0].form->type == F_TEXTAREA_TYPE && + links[0].form->number == thisgroup && + sametext(links[0].form->name, thisname)) { + nextlink = 0; + } else + while + (nextlink > 1 && + links[nextlink-1].type == WWW_FORM_LINK_TYPE && + links[nextlink-1].form->type == F_TEXTAREA_TYPE && + links[nextlink-1].form->number == thisgroup && + sametext(links[nextlink-1].form->name, thisname)) { + nextlink--; + } + } + highlight(OFF, curdoc.link, prev_target); + curdoc.link = nextlink; + break; /* and we are done. */ + + } else if (Newline > 1 && /* need a previous page */ + (res = HTGetLinkOrFieldStart(curdoc.link, + &Newline, &newdoc.link, + -1, TRUE)) != NO) { + if (res == LINK_DO_ARROWUP) { + /* + * It says we should use the normal PREV_LINK + * mechanism, so we'll do that. - kw + */ + if (nlinks > 0) + curdoc.link = 0; + cmd = LYK_PREV_LINK; + goto new_cmd; + } + Newline++; /* our line counting starts with 1 not 0 */ + /* nothing more to do here */ + + } else if (old_c != real_c) { + old_c = real_c; + HTInfoMsg(NO_LINKS_ABOVE); + } + break; + } + case LYK_UP_LINK: if (curdoc.link > 0 && (links[0].ly != links[curdoc.link].ly || @@ -2403,8 +2581,7 @@ new_cmd: /* #else } else if (old_c != real_c) { old_c = real_c; - _statusline(NO_LINKS_ABOVE); - sleep(MessageSecs); + HTUserMsg(NO_LINKS_ABOVE); #endif /* NOTDEFINED */ } @@ -2434,8 +2611,7 @@ new_cmd: /* } else if (old_c != real_c) { old_c = real_c; - _statusline(ALREADY_AT_BEGIN); - sleep(MessageSecs); + HTInfoMsg(ALREADY_AT_BEGIN); } break; @@ -2461,8 +2637,7 @@ new_cmd: /* Newline += (display_lines); } else if (old_c != real_c) { old_c = real_c; - _statusline(NO_LINKS_BELOW); - sleep(MessageSecs); + HTUserMsg(NO_LINKS_BELOW); break; } #ifdef NOTDEFINED @@ -2479,11 +2654,14 @@ new_cmd: /* } else if (old_c != real_c) { old_c = real_c; - _statusline(ALREADY_AT_END); - sleep(MessageSecs); + HTInfoMsg(ALREADY_AT_END); } break; + case LYK_CHANGE_LINK: + do_change_link(prev_target); + break; + case LYK_RIGHT_LINK: if (curdoc.link 1 && !are_different( @@ -2675,8 +2852,7 @@ new_cmd: /* } else if (old_c != real_c) { old_c = real_c; - _statusline(ALREADY_AT_FIRST); - sleep(MessageSecs); + HTUserMsg(ALREADY_AT_FIRST); } break; @@ -2688,8 +2864,7 @@ new_cmd: /* if (old_c == real_c) break; old_c = real_c; - _statusline(NOT_ON_SUBMIT_OR_LINK); - sleep(MessageSecs); + HTUserMsg(NOT_ON_SUBMIT_OR_LINK); break; } else { LYforce_no_cache = TRUE; @@ -2728,8 +2903,7 @@ new_cmd: /* if (!links[curdoc.link].form->submit_action || *links[curdoc.link].form->submit_action == '\0') { - _statusline(NO_FORM_ACTION); - sleep(MessageSecs); + HTUserMsg(NO_FORM_ACTION); HTOutputFormat = WWW_PRESENT; LYforce_no_cache = FALSE; reloading = FALSE; @@ -2808,11 +2982,8 @@ new_cmd: /* links[curdoc.link].form->submit_action, "lynxprog:", 9)) { HTAlert(SPECIAL_ACTION_DISALLOWED); - if (TRACE) { - fprintf(stderr, - "LYMainLoop: Rejected '%s'\n", + CTRACE(tfp, "LYMainLoop: Rejected '%s'\n", links[curdoc.link].form->submit_action); - } HTOutputFormat = WWW_PRESENT; LYforce_no_cache = FALSE; reloading = FALSE; @@ -2828,7 +2999,7 @@ new_cmd: /* links[curdoc.link].form->submit_enctype, "multipart/form-data")) { HTAlert( - "Enctype multipart/form-data not yet supported! Cannot submit."); + gettext("Enctype multipart/form-data not yet supported! Cannot submit.")); HTOutputFormat = WWW_PRESENT; LYforce_no_cache = FALSE; reloading = FALSE; @@ -2847,7 +3018,7 @@ new_cmd: /* links[curdoc.link].hightext); } c = change_form_link(&links[curdoc.link], - FORM_UP, &newdoc, &refresh_screen, + &newdoc, &refresh_screen, links[curdoc.link].form->name, links[curdoc.link].form->value); if (HTOutputFormat == HTAtom_for("www/download") && @@ -2855,8 +3026,7 @@ new_cmd: /* newdoc.safe == FALSE) { if ((HText_POSTReplyLoaded(&newdoc) == TRUE) && HTConfirm(CONFIRM_POST_RESUBMISSION) == FALSE) { - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); HTOutputFormat = WWW_PRESENT; LYforce_no_cache = FALSE; StrAllocCopy(newdoc.address, curdoc.address); @@ -2963,9 +3133,8 @@ new_cmd: /* * for an internal link within the document the * List Page is about. - kw */ - if (0==strcmp(curdoc.address, LYlist_temp_url()) && - 0==strcmp((curdoc.title ? curdoc.title : ""), - LIST_PAGE_TITLE)) { + if ( 0==strcmp(curdoc.address, LYlist_temp_url()) && + (LYIsListpageTitle(curdoc.title ? curdoc.title : ""))) { if (!curdoc.post_data || /* * Normal case - List Page is not associated @@ -3012,8 +3181,7 @@ new_cmd: /* StrAllocCopy(newdoc.address, curdoc.address); StrAllocCopy(newdoc.title, curdoc.title); newdoc.internal_link = curdoc.internal_link; - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); break; } else if (LYresubmit_posts && cmd != LYK_NOCACHE) { @@ -3031,8 +3199,7 @@ new_cmd: /* FREE(newdoc.post_data); FREE(newdoc.post_content_type); newdoc.internal_link = FALSE; - _statusline(DISCARDING_POST_DATA); - sleep(AlertSecs); + HTAlert(DISCARDING_POST_DATA); } } } @@ -3083,6 +3250,10 @@ new_cmd: /* } newdoc.link = 0; force_load = TRUE; /* force MainLoop to reload */ +#ifdef USE_PSRC + psrc_view = FALSE; /* we get here if link is not internal */ +#endif + #ifdef DIRED_SUPPORT if (lynx_edit_mode) { HTuncache_current_document(); @@ -3109,8 +3280,7 @@ new_cmd: /* */ if (old_c != real_c) { old_c = real_c; - _statusline(GOTO_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_DISALLOWED); } break; } @@ -3125,8 +3295,7 @@ new_cmd: /* */ if (old_c != real_c) { old_c = real_c; - _statusline(NOT_ON_SUBMIT_OR_LINK); - sleep(MessageSecs); + HTUserMsg(NOT_ON_SUBMIT_OR_LINK); } break; } @@ -3138,8 +3307,7 @@ new_cmd: /* */ if (old_c != real_c) { old_c = real_c; - _statusline(NO_FORM_ACTION); - sleep(MessageSecs); + HTUserMsg(NO_FORM_ACTION); } break; } @@ -3160,8 +3328,7 @@ new_cmd: /* */ if (old_c != real_c) { old_c = real_c; - _statusline(EDIT_FM_MENU_URLS_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(EDIT_FM_MENU_URLS_DISALLOWED); } break; } @@ -3175,7 +3342,7 @@ new_cmd: /* LYstrncpy(user_input_buffer, ((links[curdoc.link].type == WWW_FORM_LINK_TYPE) ? - links[curdoc.link].form->submit_action : links[curdoc.link].lname), + links[curdoc.link].form->submit_action : links[curdoc.link].lname), (sizeof(user_input_buffer) - 1)); /* @@ -3189,20 +3356,8 @@ new_cmd: /* ((links[curdoc.link].type == WWW_FORM_LINK_TYPE) ? links[curdoc.link].form->submit_action : links[curdoc.link].lname))) { - LYTrimHead(user_input_buffer); - if (!strncasecomp(user_input_buffer, "lynxexec:", 9) || - !strncasecomp(user_input_buffer, "lynxprog:", 9)) { - /* - * The original implementations of these schemes expected - * white space without hex escaping, and did not check - * for hex escaping, so we'll continue to support that, - * until that code is redone in conformance with SGML - * principles. - FM - */ - HTUnEscapeSome(user_input_buffer, " \r\n\t"); - convert_to_spaces(user_input_buffer, TRUE); - } else { - collapse_spaces(user_input_buffer); + if (!LYTrimStartfile(user_input_buffer)) { + LYRemoveBlanks(user_input_buffer); } if (user_input_buffer[0] != '\0') { goto check_goto_URL; @@ -3212,8 +3367,7 @@ new_cmd: /* * User cancelled via ^G, a full deletion, * or not modifying the URL. - FM */ - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); strcpy(user_input_buffer, temp); FREE(temp); break; @@ -3225,8 +3379,7 @@ new_cmd: /* */ if (old_c != real_c) { old_c = real_c; - _statusline(GOTO_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_DISALLOWED); } break; } @@ -3245,8 +3398,7 @@ new_cmd: /* */ if (old_c != real_c) { old_c = real_c; - _statusline(EDIT_FM_MENU_URLS_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(EDIT_FM_MENU_URLS_DISALLOWED); } break; } @@ -3276,20 +3428,8 @@ new_cmd: /* sizeof(user_input_buffer), RECALL)) >= 0) && user_input_buffer[0] != '\0' && strcmp(user_input_buffer, curdoc.address)) { - LYTrimHead(user_input_buffer); - if (!strncasecomp(user_input_buffer, "lynxexec:", 9) || - !strncasecomp(user_input_buffer, "lynxprog:", 9)) { - /* - * The original implementations of these schemes expected - * white space without hex escaping, and did not check - * for hex escaping, so we'll continue to support that, - * until that code is redone in conformance with SGML - * principles. - FM - */ - HTUnEscapeSome(user_input_buffer, " \r\n\t"); - convert_to_spaces(user_input_buffer, TRUE); - } else { - collapse_spaces(user_input_buffer); + if (!LYTrimStartfile(user_input_buffer)) { + LYRemoveBlanks(user_input_buffer); } if (user_input_buffer[0] != '\0') { goto check_goto_URL; @@ -3299,8 +3439,7 @@ new_cmd: /* * User cancelled via ^G, a full deletion, * or not modifying the URL. - FM */ - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); strcpy(user_input_buffer, temp); FREE(temp); break; @@ -3309,8 +3448,7 @@ new_cmd: /* if (no_goto && !LYValidate) { if (old_c != real_c) { old_c = real_c; - _statusline(GOTO_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_DISALLOWED); } break; } @@ -3342,8 +3480,7 @@ new_cmd: /* */ strcpy(user_input_buffer, temp); FREE(temp); - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); break; } @@ -3351,27 +3488,14 @@ check_recall: /* * Get rid of leading spaces (and any other spaces). */ - LYTrimHead(user_input_buffer); - if (!strncasecomp(user_input_buffer, "lynxexec:", 9) || - !strncasecomp(user_input_buffer, "lynxprog:", 9)) { - /* - * The original implementations of these schemes expected - * white space without hex escaping, and did not check - * for hex escaping, so we'll continue to support that, - * until that code is redone in conformance with SGML - * principles. - FM - */ - HTUnEscapeSome(user_input_buffer, " \r\n\t"); - convert_to_spaces(user_input_buffer, TRUE); - } else { - collapse_spaces(user_input_buffer); + if (!LYTrimStartfile(user_input_buffer)) { + LYRemoveBlanks(user_input_buffer); } if (*user_input_buffer == '\0' && !(recall && (ch == UPARROW || ch == DNARROW))) { strcpy(user_input_buffer, temp); FREE(temp); - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); break; } if (recall && ch == UPARROW) { @@ -3413,8 +3537,7 @@ check_recall: */ strcpy(user_input_buffer, temp); FREE(temp); - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); break; } goto check_recall; @@ -3458,8 +3581,7 @@ check_recall: */ strcpy(user_input_buffer, temp); FREE(temp); - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); break; } goto check_recall; @@ -3467,19 +3589,28 @@ check_recall: } check_goto_URL: + /* allow going to anchors*/ + if (*user_input_buffer == '#' ) { + if ( user_input_buffer[1] && + HTFindPoundSelector(user_input_buffer+1) ) { + /* HTFindPoundSelector will initialize www_search_result, + so we do nothing else. */ + HTAddGotoURL(user_input_buffer); + } + break; + } /* * If its not a URL then make it one. */ StrAllocCopy(temp, user_input_buffer); LYFillLocalFileURL((char **)&temp, "file://localhost"); - LYEnsureAbsoluteURL((char **)&temp, ""); + LYEnsureAbsoluteURL((char **)&temp, "", TRUE); sprintf(user_input_buffer, "%.*s", (int)(sizeof(user_input_buffer) - 1), temp); FREE(temp); if ((no_file_url || no_goto_file) && !strncmp(user_input_buffer,"file:",5)) { - _statusline(GOTO_FILE_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_FILE_DISALLOWED); } else if ((no_shell || no_goto_lynxexec #ifdef EXEC_LINKS @@ -3487,8 +3618,7 @@ check_goto_URL: #endif /* EXEC_LINKS */ ) && !strncmp(user_input_buffer, "lynxexec:",9)) { - _statusline(GOTO_EXEC_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_EXEC_DISALLOWED); } else if ((no_shell || no_goto_lynxprog #ifdef EXEC_LINKS @@ -3496,96 +3626,85 @@ check_goto_URL: #endif /* EXEC_LINKS */ ) && !strncmp(user_input_buffer, "lynxprog:",9)) { - _statusline(GOTO_PROG_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_PROG_DISALLOWED); } else if ((no_shell || no_goto_lynxcgi) && !strncmp(user_input_buffer, "lynxcgi:", 8)) { - _statusline(GOTO_CGI_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_CGI_DISALLOWED); } else if (LYValidate && strncmp(user_input_buffer, "http:", 5) && strncmp(user_input_buffer, "https:", 6)) { - _statusline(GOTO_NON_HTTP_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_NON_HTTP_DISALLOWED); } else if (no_goto_cso && !strncmp(user_input_buffer, "cso:", 4)) { - _statusline(GOTO_CSO_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_CSO_DISALLOWED); } else if (no_goto_finger && !strncmp(user_input_buffer, "finger:", 7)) { - _statusline(GOTO_FINGER_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_FINGER_DISALLOWED); } else if (no_goto_ftp && !strncmp(user_input_buffer, "ftp:", 4)) { - _statusline(GOTO_FTP_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_FTP_DISALLOWED); - } else if (no_goto_gopher && + } else if (no_goto_gopher && !strncmp(user_input_buffer, "gopher:", 7)) { - _statusline(GOTO_GOPHER_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_GOPHER_DISALLOWED); } else if (no_goto_http && !strncmp(user_input_buffer, "http:", 5)) { - _statusline(GOTO_HTTP_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_HTTP_DISALLOWED); } else if (no_goto_https && !strncmp(user_input_buffer, "https:", 6)) { - _statusline(GOTO_HTTPS_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_HTTPS_DISALLOWED); } else if (no_goto_mailto && !strncmp(user_input_buffer, "mailto:", 7)) { - _statusline(GOTO_MAILTO_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_MAILTO_DISALLOWED); +#ifndef DISABLE_NEWS } else if (no_goto_news && !strncmp(user_input_buffer, "news:", 5)) { - _statusline(GOTO_NEWS_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_NEWS_DISALLOWED); } else if (no_goto_nntp && !strncmp(user_input_buffer, "nntp:", 5)) { - _statusline(GOTO_NNTP_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_NNTP_DISALLOWED); +#endif } else if (no_goto_rlogin && !strncmp(user_input_buffer, "rlogin:", 7)) { - _statusline(GOTO_RLOGIN_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_RLOGIN_DISALLOWED); +#ifndef DISABLE_NEWS } else if (no_goto_snews && !strncmp(user_input_buffer, "snews:", 6)) { - _statusline(GOTO_SNEWS_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_SNEWS_DISALLOWED); +#endif } else if (no_goto_telnet && !strncmp(user_input_buffer, "telnet:", 7)) { - _statusline(GOTO_TELNET_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_TELNET_DISALLOWED); } else if (no_goto_tn3270 && !strncmp(user_input_buffer, "tn3270:", 7)) { - _statusline(GOTO_TN3270_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_TN3270_DISALLOWED); } else if (no_goto_wais && !strncmp(user_input_buffer, "wais:", 5)) { - _statusline(GOTO_WAIS_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_WAIS_DISALLOWED); } else if (!strncmp(user_input_buffer, "LYNXCOOKIE:", 11) || !strncmp(user_input_buffer, "LYNXDIRED:", 10) || !strncmp(user_input_buffer, "LYNXDOWNLOAD:", 13) || + !strncmp(user_input_buffer, "LYNXOPTIONS:", 12) || + !strncmp(user_input_buffer, "LYNXCFG:", 8) || + !strncmp(user_input_buffer, "LYNXCOMPILEOPTS:", 16) || !strncmp(user_input_buffer, "LYNXPRINT:", 10)) { - _statusline(GOTO_SPECIAL_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(GOTO_SPECIAL_DISALLOWED); } else { StrAllocCopy(newdoc.address, user_input_buffer); @@ -3598,7 +3717,7 @@ check_goto_URL: /* * Make a name for this new URL. */ - StrAllocCopy(newdoc.title, "A URL specified by the user"); + StrAllocCopy(newdoc.title, gettext("A URL specified by the user")); FREE(newdoc.post_data); FREE(newdoc.post_content_type); FREE(newdoc.bookmark); @@ -3624,7 +3743,7 @@ check_goto_URL: /* * Make a name for this help file. */ - StrAllocCopy(newdoc.title, "Help Screen"); + StrAllocCopy(newdoc.title, gettext("Help Screen")); FREE(newdoc.post_data); FREE(newdoc.post_content_type); FREE(newdoc.bookmark); @@ -3643,13 +3762,12 @@ check_goto_URL: if (indexfile[0]=='\0') { /* no defined index */ if (old_c != real_c) { old_c = real_c; - _statusline(NO_INDEX_FILE); - sleep(MessageSecs); + HTUserMsg(NO_INDEX_FILE); } } else { StrAllocCopy(newdoc.address, indexfile); - StrAllocCopy(newdoc.title, "System Index"); /* name it */ + StrAllocCopy(newdoc.title, gettext("System Index")); /* name it */ FREE(newdoc.post_data); FREE(newdoc.post_content_type); FREE(newdoc.bookmark); @@ -3660,61 +3778,15 @@ check_goto_URL: } /* end if */ break; -#ifdef NOT_USED - case LYK_FORM_UP: /* change form */ - break; /* not implemented */ - if (lynx_mode == FORMS_LYNX_MODE) { - if (links[curdoc.link].type == WWW_FORM_LINK_TYPE) { - c = change_form_link(&links[curdoc.link], - FORM_UP, &newdoc, &refresh_screen, - links[curdoc.link].form->name, - links[curdoc.link].form->value); - /* - * Code to handle multiple submit buttons? - * Taken out due to bug it causes. - if (links[curdoc.link].form->type == F_SUBMIT_TYPE || - links[curdoc.link].form->type == F_IMAGESUBMIT_TYPE) { - curdoc.address = NULL; - } - */ - goto new_keyboard_input; - } else { - _statusline("'X' can only toggle a form link"); - } - } else { - _statusline("'X' only toggles in forms mode"); - } - break; - - case LYK_FORM_DOWN: /* change form */ - break; /* not implemented */ - if (lynx_mode==FORMS_LYNX_MODE) { - if (links[curdoc.link].type == WWW_FORM_LINK_TYPE) { - c = change_form_link(&links[curdoc.link], - FORM_DOWN,&newdoc,&refresh_screen, - links[curdoc.link].form->name, - links[curdoc.link].form->value); - goto new_keyboard_input; - } else { - _statusline("'Z' can only toggle a form link"); - } - } else { - _statusline("'Z' only toggles in forms mode"); - } - break; -#endif /* NOT_USED */ - case LYK_MAIN_MENU: /* return to main screen */ /* * If its already the homepage then don't reload it. */ if (!STREQ(curdoc.address,homepage)) { - _statusline(CONFIRM_MAIN_SCREEN); - c = LYgetch(); - if (TOUPPER(c)=='Y') { + if (HTConfirmDefault(CONFIRM_MAIN_SCREEN, NO) == YES) { StrAllocCopy(newdoc.address, homepage); - StrAllocCopy(newdoc.title, "Entry into main screen"); + StrAllocCopy(newdoc.title, gettext("Entry into main screen")); FREE(newdoc.post_data); FREE(newdoc.post_content_type); FREE(newdoc.bookmark); @@ -3727,15 +3799,10 @@ check_goto_URL: HTuncache_current_document(); #endif /* DIRED_SUPPORT */ } -#ifdef VMS - if (HadVMSInterrupt) - HadVMSInterrupt = FALSE; -#endif /* VMS */ } else { if (old_c != real_c) { old_c = real_c; - _statusline(IN_MAIN_SCREEN); - sleep(MessageSecs); + HTUserMsg(IN_MAIN_SCREEN); } } break; @@ -3744,7 +3811,28 @@ check_goto_URL: #ifdef DIRED_SUPPORT c = dir_list_style; #endif /* DIRED_SUPPORT */ - options(); /* do the options stuff */ +#ifndef NO_OPTION_MENU +if (!LYUseFormsOptions) { + BOOLEAN LYUseDefaultRawMode_flag = LYUseDefaultRawMode; + BOOLEAN LYSelectPopups_flag = LYSelectPopups; + BOOLEAN verbose_img_flag = verbose_img; + BOOLEAN keypad_mode_flag = keypad_mode; + BOOLEAN show_dotfiles_flag = show_dotfiles; + BOOLEAN user_mode_flag = user_mode; + int CurrentAssumeCharSet_flag = UCLYhndl_for_unspec; + int CurrentCharSet_flag = current_char_set; + int HTfileSortMethod_flag = HTfileSortMethod; + char *CurrentUserAgent = NULL; + char *CurrentNegoLanguage = NULL; + char *CurrentNegoCharset = NULL; + StrAllocCopy(CurrentUserAgent, (LYUserAgent ? + LYUserAgent : "")); + StrAllocCopy(CurrentNegoLanguage, (language ? + language : "")); + StrAllocCopy(CurrentNegoCharset, (pref_charset ? + pref_charset : "")); + + LYoptions(); /** do the old-style options stuff **/ if (keypad_mode_flag != keypad_mode || (user_mode_flag != user_mode && @@ -3758,7 +3846,9 @@ check_goto_URL: (!strncmp(curdoc.address, "file:", 5) || !strncmp(curdoc.address, "ftp:", 4))) || CurrentCharSet_flag != current_char_set || - LYRawMode_flag != LYRawMode || + CurrentAssumeCharSet_flag != UCLYhndl_for_unspec || + verbose_img_flag != verbose_img || + LYUseDefaultRawMode_flag != LYUseDefaultRawMode || LYSelectPopups_flag != LYSelectPopups || ((strcmp(CurrentUserAgent, (LYUserAgent ? LYUserAgent : "")) || @@ -3777,9 +3867,7 @@ check_goto_URL: curdoc.safe != TRUE) && confirm_post_resub(curdoc.address, curdoc.title, 2, 1) == FALSE) { - _statusline(WILL_NOT_RELOAD_DOC); - sleep(InfoSecs); - + HTInfoMsg(WILL_NOT_RELOAD_DOC); } else { StrAllocCopy(newdoc.address, curdoc.address); if (((strcmp(CurrentUserAgent, (LYUserAgent ? @@ -3803,43 +3891,85 @@ check_goto_URL: */ reloading = TRUE; } - if (lynx_mode == FORMS_LYNX_MODE) { - _statusline(RELOADING_FORM); - sleep(AlertSecs); - } if (HTisDocumentSource()) { +#ifndef USE_PSRC HTOutputFormat = WWW_SOURCE; +#else + if (LYpsrc) + psrc_view = TRUE; + else + HTOutputFormat = WWW_SOURCE; +#endif + } +#ifdef SOURCE_CACHE + if (reloading == FALSE) { + /* one more attempt to be smart enough: */ + if (HTreparse_document()) { + FREE(CurrentUserAgent); + FREE(CurrentNegoLanguage); + FREE(CurrentNegoCharset); + break; + } } +#endif HEAD_request = HTLoadedDocumentIsHEAD(); HTuncache_current_document(); #ifdef NO_ASSUME_SAME_DOC newdoc.line = 1; newdoc.link = 0; #else - newdoc.line = ((curdoc.line > 0) ? - curdoc.line : 1); - newdoc.link = ((curdoc.link > -1) ? - curdoc.link : 0); + newdoc.line = curdoc.line; + newdoc.link = curdoc.link; #endif /* NO_ASSUME_SAME_DOC */ LYforce_no_cache = TRUE; FREE(curdoc.address); /* So it doesn't get pushed. */ } } - keypad_mode_flag = keypad_mode; - user_mode_flag = user_mode; - HTfileSortMethod_flag = HTfileSortMethod; - CurrentCharSet_flag = current_char_set; - show_dotfiles_flag = show_dotfiles; - LYRawMode_flag = LYRawMode; - LYSelectPopups_flag = LYSelectPopups; - StrAllocCopy(CurrentUserAgent, (LYUserAgent ? - LYUserAgent : "")); - StrAllocCopy(CurrentNegoLanguage, (language ? - language : "")); - StrAllocCopy(CurrentNegoCharset, (pref_charset ? - pref_charset : "")); + FREE(CurrentUserAgent); + FREE(CurrentNegoLanguage); + FREE(CurrentNegoCharset); refresh_screen = TRUE; /* to repaint screen */ break; +} /* end if !LYUseFormsOptions */ +#endif /* !NO_OPTION_MENU */ +#ifndef NO_OPTION_FORMS + /* + * Generally stolen from LYK_COOKIE_JAR. Options menu handling is + * done in postoptions(), called from getfile() currently. + * + * postoptions() is also responsible for reloading the document + * before the 'options menu' but only when (a few) important + * options were changed. + * + * It is critical that post_data is freed here since the + * submission of changed options is done via the same protocol as + * LYNXOPTIONS: + */ + /* + * Don't do if already viewing options page. + */ + if (strcmp((curdoc.title ? curdoc.title : ""), OPTIONS_TITLE)) { + + StrAllocCopy(newdoc.address, "LYNXOPTIONS:/"); + FREE(newdoc.post_data); + FREE(newdoc.post_content_type); + FREE(newdoc.bookmark); + newdoc.isHEAD = FALSE; + newdoc.safe = FALSE; + newdoc.internal_link = FALSE; + LYforce_no_cache = TRUE; + if (LYValidate || check_realm) { + LYPermitURL = TRUE; + } + } else { + /* + * If already in the options menu, get out. + */ + cmd = LYK_PREV_DOC; + goto new_cmd; + } +#endif /* !NO_OPTION_FORMS */ + break; case LYK_INDEX_SEARCH: /* search for a user string */ if (is_www_index) { @@ -3913,8 +4043,7 @@ check_goto_URL: } } else if (old_c != real_c) { old_c = real_c; - _statusline(NOT_ISINDEX); - sleep(MessageSecs); + HTUserMsg(NOT_ISINDEX); } break; @@ -3991,19 +4120,15 @@ check_goto_URL: strncasecomp(curdoc.address, "http", 4)) { if (old_c != real_c) { old_c = real_c; - _statusline(NO_OWNER); - sleep(MessageSecs); + HTUserMsg(NO_OWNER); } } else if (no_mail) { if (old_c != real_c) { old_c = real_c; - _statusline(MAIL_DISALLOWED); - sleep(MessageSecs); + HTUserMsg(MAIL_DISALLOWED); } } else { - _statusline(CONFIRM_COMMENT); - c = LYgetch(); - if (TOUPPER(c) == 'Y') { + if (HTConfirmDefault(CONFIRM_COMMENT, NO)) { if (!owner_address) { /* * No owner defined, so make a guess and @@ -4033,10 +4158,10 @@ check_goto_URL: StrAllocCopy(address, "mailto:WebMaster@"); temp = HTParse(curdoc.address, "", PARSE_HOST); StrAllocCat(address, temp); + HTSprintf0(&temp, NO_OWNER_USE, address); + c = HTConfirmDefault(temp, NO); FREE(temp); - _user_message(NO_OWNER_USE, address); - c = LYgetch(); - if (TOUPPER(c) == 'Y') { + if (c == YES) { StrAllocCopy(owner_address, address); FREE(address); } else { @@ -4054,23 +4179,37 @@ check_goto_URL: /* * The owner_address is a mailto: URL. */ - cp = HText_getRevTitle(); + CONST char *kp = HText_getRevTitle(); + CONST char *id = HText_getMessageID(); + char *tmptitle = NULL; + if (!kp && HTMainAnchor) { + kp = HTAnchor_subject(HTMainAnchor); + if (kp && *kp) { + if (strncasecomp(kp, "Re: ", 4)) { + StrAllocCopy(tmptitle, "Re: "); + StrAllocCat(tmptitle, kp); + kp = tmptitle; + } + } + } + if (strchr(owner_address,':')!=NULL) /* * Send a reply. The address is after the colon. */ reply_by_mail(strchr(owner_address,':')+1, curdoc.address, - (cp ? cp : "")); + (kp ? kp : ""), id); else reply_by_mail(owner_address, curdoc.address, - (cp ? cp : "")); + (kp ? kp : ""), id); + FREE(tmptitle); refresh_screen = TRUE; /* to force a showpage */ - } - } - } - break; + } + } + } + break; #ifdef DIRED_SUPPORT case LYK_TAG_LINK: /* tag or untag the current link */ @@ -4165,13 +4304,41 @@ check_goto_URL: case LYK_EDIT: /* edit */ if (no_editor) { - if (old_c != real_c) { + if (old_c != real_c) { old_c = real_c; - _statusline(EDIT_DISABLED); - sleep(MessageSecs); + HTUserMsg(EDIT_DISABLED); } break; } +#ifdef AUTOEXTEDIT + /* + * If we're in a forms TEXTAREA, invoke the editor on *its* + * contents, rather than attempting to edit the html source + * document. KED + */ + if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && + links[curdoc.link].form->type == F_TEXTAREA_TYPE) { + cmd = LYK_EDIT_TEXTAREA; + goto new_cmd; + } + + /* + * If we're in a forms TEXT type, tell user the request + * is bogus (though in reality, without this trap, if the + * document with the TEXT field is local, the editor *would* + * be invoked on the source .html file; eg, the o(ptions) + * form tempfile). + * + * [This is done to avoid possible user confusion, due to + * auto invocation of the editor on the TEXTAREA's contents + * via the above if() statement.] + */ + if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && + links[curdoc.link].form->type == F_TEXT_TYPE) { + HTUserMsg (CANNOT_EDIT_FIELD); + break; + } +#endif /* AUTOEXTEDIT */ #ifdef DIRED_SUPPORT /* @@ -4183,23 +4350,15 @@ check_goto_URL: if (nlinks > 0) { cp = links[curdoc.link].lname; if (is_url(cp) == FILE_URL_TYPE) { - if (!strncmp(cp, "file://localhost", 16)) { - /* - * This is the only case that should occur. - kw - */ - StrAllocCopy(tp, cp + 16); - } else if (!strncmp(cp, "file:", 5)) { - StrAllocCopy(tp, cp + 5); - } else { - StrAllocCopy(tp, cp); - } - HTUnEscape(tp); + cp = HTfullURL_toFile(cp); + StrAllocCopy(tp, cp); + FREE(cp); + if (stat(tp, &dir_info) == -1) { - _statusline(NO_STATUS); - sleep(AlertSecs); + HTAlert(NO_STATUS); } else { - if (((dir_info.st_mode) & S_IFMT) == S_IFREG) { - StrAllocCopy(tp, cp); + if (S_ISREG(dir_info.st_mode)) { + StrAllocCopy(tp, links[curdoc.link].lname); HTUnEscapeSome(tp, "/"); if (edit_current_file(tp, curdoc.link, Newline)) { @@ -4218,10 +4377,8 @@ check_goto_URL: * Seek old position, * which probably changed. */ - newdoc.line = - ((curdoc.line > 0) ? curdoc.line : 1); - newdoc.link = - ((curdoc.link > -1) ? curdoc.link : 0); + newdoc.line = curdoc.line; + newdoc.link = curdoc.link; #endif /* NO_SEEK_OLD_POSITION */ clear(); /* clear the screen */ } @@ -4256,8 +4413,7 @@ check_goto_URL: } else { if (old_c != real_c) { old_c = real_c; - _statusline(NO_EDITOR); - sleep(MessageSecs); + HTUserMsg(NO_EDITOR); } } break; @@ -4265,16 +4421,14 @@ check_goto_URL: case LYK_DEL_BOOKMARK: /* remove a bookmark file link */ #ifdef DIRED_SUPPORT case LYK_REMOVE: /* remove files and directories */ - c = 'N'; + c = NO; if (lynx_edit_mode && nlinks > 0 && !no_dired_support) { local_remove(&curdoc); - c = 'Y'; + c = YES; } else #endif /* DIRED_SUPPORT */ if (curdoc.bookmark != NULL) { - _statusline(CONFIRM_BOOKMARK_DELETE); - c = LYgetch(); - if (TOUPPER(c) != 'Y') + if ((c = HTConfirmDefault(CONFIRM_BOOKMARK_DELETE,NO)) != YES) break; remove_bookmark_link(links[curdoc.link].anchor_number-1, curdoc.bookmark); @@ -4286,7 +4440,7 @@ check_goto_URL: } break; } - if (TOUPPER(c) == 'Y') { + if (c == YES) { HTuncache_current_document(); StrAllocCopy(newdoc.address, curdoc.address); FREE(curdoc.address); @@ -4315,8 +4469,8 @@ check_goto_URL: */ if (strcmp((curdoc.title ? curdoc.title : ""), SHOWINFO_TITLE)) { - if (!showinfo(&curdoc, lines_in_file, - &newdoc, owner_address)) + if (showinfo(&curdoc, HText_getNumOfLines(), + &newdoc, owner_address) < 0) break; StrAllocCopy(newdoc.title, SHOWINFO_TITLE); FREE(newdoc.post_data); @@ -4337,12 +4491,100 @@ check_goto_URL: } break; + case LYK_EDIT_TEXTAREA: /* use external editor on a TEXTAREA - KED */ + if (no_editor) { + if (old_c != real_c) { + old_c = real_c; + HTUserMsg(EDIT_DISABLED); + } + break; + } + + /* + * See if the current link is in a form TEXTAREA. + */ + if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && + links[curdoc.link].form->type == F_TEXTAREA_TYPE) { + + /* stop screen */ + stop_curses(); + + n = HText_ExtEditForm (&links[curdoc.link]); + + /* + * TODO: Move cursor "n" lines from the current line to + * position it on the 1st trailing blank line in + * the now edited TEXTAREA. If the target line/ + * anchor requires us to scroll up/down, position + * the target in the approximate center of the + * screen. + */ + + /* curdoc.link += n;*/ /* works, except for page crossing, */ + /* damnit; why is nothing ever easy */ + + /* start screen */ + start_curses(); + refresh_screen = TRUE; + + } else { + + HTInfoMsg (NOT_IN_TEXTAREA); + } + break; + + case LYK_GROW_TEXTAREA: /* add new lines to bottom of TEXTAREA - KED */ + /* + * See if the current link is in a form TEXTAREA. + */ + if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && + links[curdoc.link].form->type == F_TEXTAREA_TYPE) { + + HText_ExpandTextarea (&links[curdoc.link], TEXTAREA_EXPAND_SIZE); + + refresh_screen = TRUE; + + } else { + + HTInfoMsg (NOT_IN_TEXTAREA); + } + break; + + case LYK_INSERT_FILE: /* insert file in TEXTAREA, above cursor - KED */ + /* + * See if the current link is in a form TEXTAREA. + */ + if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && + links[curdoc.link].form->type == F_TEXTAREA_TYPE) { + + n = HText_InsertFile (&links[curdoc.link]); + + /* + * TODO: Move cursor "n" lines from the current line to + * position it on the 1st line following the text + * that was inserted. If the target line/anchor + * requires us to scroll up/down, position the + * target in the approximate center of the screen. + * + * [Current behavior leaves cursor on the same line relative + * to the start of the TEXTAREA that it was on before the + * insertion. This is the same behavior that occurs with + * (my) editor, so this TODO will stay unimplemented.] + */ + + refresh_screen = TRUE; + + } else { + + HTInfoMsg (NOT_IN_TEXTAREA); + } + break; + case LYK_PRINT: /* print the file */ if (LYValidate) { if (old_c != real_c) { old_c = real_c; - _statusline(PRINT_DISABLED); - sleep(MessageSecs); + HTUserMsg(PRINT_DISABLED); } break; } @@ -4353,7 +4595,8 @@ check_goto_URL: if (strcmp((curdoc.title ? curdoc.title : ""), PRINT_OPTIONS_TITLE)) { - if (print_options(&newdoc.address, lines_in_file) < 0) + if (print_options(&newdoc.address, + &curdoc.address, HText_getNumOfLines()) < 0) break; StrAllocCopy(newdoc.title, PRINT_OPTIONS_TITLE); FREE(newdoc.post_data); @@ -4361,7 +4604,7 @@ check_goto_URL: FREE(newdoc.bookmark); newdoc.isHEAD = FALSE; newdoc.safe = FALSE; - ForcePush = TRUE; + ForcePush = TRUE; /* see LYpush() and print_options() */ if (check_realm) LYPermitURL = TRUE; refresh_screen = TRUE; /* redisplay */ @@ -4401,6 +4644,41 @@ check_goto_URL: } break; +#ifdef EXP_ADDRLIST_PAGE + case LYK_ADDRLIST: /* always list URL's (only) */ + /* + * Don't do if already viewing list addresses page. + */ + if (!strcmp((curdoc.title ? curdoc.title : ""), + ADDRLIST_PAGE_TITLE)) { + /* + * Already viewing list page, so get out. + */ + cmd = LYK_PREV_DOC; + goto new_cmd; + } + + /* + * Print address list page to file. + */ + if (showlist(&newdoc, FALSE) < 0) + break; + StrAllocCopy(newdoc.title, ADDRLIST_PAGE_TITLE); + /* + * showlist will set newdoc's other fields. It may leave + * post_data intact so the list can be used to follow + * internal links in the current document even if it is + * a POST response. - kw + */ + + refresh_screen = TRUE; /* redisplay */ + if (LYValidate || check_realm) { + LYPermitURL = TRUE; + StrAllocCopy(lynxlistfile, newdoc.address); + } + break; +#endif /* EXP_ADDRLIST_PAGE */ + case LYK_VLINKS: /* list links visited during the current session */ if (!strcmp((curdoc.title ? curdoc.title : ""), VISITED_LINKS_TITLE)) { @@ -4415,8 +4693,7 @@ check_goto_URL: * Print visited links page to file. */ if (LYShowVisitedLinks(&newdoc.address) < 0) { - _statusline(VISITED_LINKS_EMPTY); - sleep(MessageSecs); + HTUserMsg(VISITED_LINKS_EMPTY); break; } StrAllocCopy(newdoc.title, VISITED_LINKS_TITLE); @@ -4437,8 +4714,7 @@ check_goto_URL: if (!HText_hasToolbar(HTMainText)) { if (old_c != real_c) { old_c = real_c; - _statusline(NO_TOOLBAR); - sleep(MessageSecs); + HTUserMsg(NO_TOOLBAR); } } else if (old_c != real_c) { old_c = real_c; @@ -4446,6 +4722,9 @@ check_goto_URL: *cp = '\0'; toolbar = (char *)malloc(strlen(curdoc.address) + strlen(LYToolbarName) + 2); + if (!toolbar) + outofmem(__FILE__, "mainloop"); + sprintf(toolbar, "%s#%s", curdoc.address, LYToolbarName); if (cp) *cp = '#'; @@ -4457,7 +4736,7 @@ check_goto_URL: break; #if defined(DIRED_SUPPORT) || defined(VMS) - case LYK_DIRED_MENU: /* provide full file management menu */ + case LYK_DIRED_MENU: /* provide full file management menu */ #ifdef VMS /* * Check if the CSwing Directory/File Manager is available. @@ -4475,8 +4754,7 @@ check_goto_URL: HTDirAccess == HT_DIR_SELECTIVE) { if (old_c != real_c) { old_c = real_c; - _statusline(DFM_NOT_AVAILABLE); - sleep(MessageSecs); + HTUserMsg(DFM_NOT_AVAILABLE); } break; } @@ -4502,8 +4780,7 @@ check_goto_URL: cp = HTParse(curdoc.address, "", PARSE_PATH|PARSE_PUNCTUATION); HTUnEscape(cp); if (HTStat(cp, &stat_info) == -1) { - if (TRACE) - fprintf(stderr, "mainloop: Can't stat %s\n", cp); + CTRACE(tfp, "mainloop: Can't stat %s\n", cp); FREE(cp); temp = (char *)calloc(1, (strlen(LYCSwingPath) + 4)); if (temp == NULL) @@ -4513,13 +4790,12 @@ check_goto_URL: } else { char *VMSdir = NULL; - if (((stat_info.st_mode) & S_IFMT) == S_IFDIR) { + if (S_ISDIR(stat_info.st_mode)) { /* * We're viewing a local directory. Make * that the CSwing argument. - FM */ - if (cp[(strlen(cp) - 1)] != '/') - StrAllocCat(cp, "/"); + LYAddPathSep(&cp); StrAllocCopy(VMSdir, HTVMS_name("", cp)); FREE(cp); } else { @@ -4573,7 +4849,7 @@ check_goto_URL: refresh_screen = TRUE; /* redisplay */ } stop_curses(); - system(temp); + LYSystem(temp); start_curses(); FREE(temp); break; @@ -4594,8 +4870,11 @@ check_goto_URL: #ifdef USE_EXTERNALS case LYK_EXTERN: /* use external program on url */ - run_external(links[curdoc.link].lname); - refresh_screen = TRUE; + if ((nlinks > 0) && (links[curdoc.link].lname != NULL)) + { + run_external(links[curdoc.link].lname); + refresh_screen = TRUE; + } break; #endif /* USE_EXTERNALS */ @@ -4603,8 +4882,7 @@ check_goto_URL: if (LYValidate) { if (old_c != real_c) { old_c = real_c; - _statusline(BOOKMARKS_DISABLED); - sleep(MessageSecs); + HTUserMsg(BOOKMARKS_DISABLED); } break; } @@ -4630,6 +4908,8 @@ check_goto_URL: DOWNLOAD_OPTIONS_TITLE) && strcmp((curdoc.title ? curdoc.title : ""), COOKIE_JAR_TITLE) && + strcmp((curdoc.title ? curdoc.title : ""), + OPTIONS_TITLE) && ((nlinks <= 0) || (links[curdoc.link].lname != NULL && strncmp(links[curdoc.link].lname, @@ -4642,13 +4922,14 @@ check_goto_URL: "LYNXDOWNLOAD:", 13) && strncmp(links[curdoc.link].lname, "LYNXCOOKIE:", 11) && + strncmp(links[curdoc.link].lname, + "LYNXOPTIONS:", 12) && strncmp(links[curdoc.link].lname, "LYNXLIST:", 9)))) { if (nlinks > 0) { if (curdoc.post_data == NULL && curdoc.bookmark == NULL && - strcmp((curdoc.title ? curdoc.title : ""), - LIST_PAGE_TITLE) && + !LYIsListpageTitle(curdoc.title ? curdoc.title : "") && strcmp((curdoc.title ? curdoc.title : ""), VISITED_LINKS_TITLE)) { /* @@ -4683,8 +4964,7 @@ check_goto_URL: /* * Internal link, and document has POST content. */ - _statusline(NOBOOK_POST_FORM); - sleep(MessageSecs); + HTUserMsg(NOBOOK_POST_FORM); break; } else { /* @@ -4703,8 +4983,7 @@ check_goto_URL: /* * Internal link, and document has POST content. */ - _statusline(NOBOOK_POST_FORM); - sleep(MessageSecs); + HTUserMsg(NOBOOK_POST_FORM); break; } /* @@ -4715,8 +4994,7 @@ check_goto_URL: links[curdoc.link].hightext); refresh_screen = TRUE; /* MultiBookmark support */ } else { - _statusline(NOBOOK_FORM_FIELD); - sleep(MessageSecs); + HTUserMsg(NOBOOK_FORM_FIELD); break; } } else { @@ -4726,16 +5004,14 @@ check_goto_URL: /* * No links, and document has POST content. - FM */ - _statusline(NOBOOK_POST_FORM); - sleep(MessageSecs); + HTUserMsg(NOBOOK_POST_FORM); break; } else if (curdoc.bookmark != NULL) { /* * It's a bookmark file from which all * of the links were deleted. - FM */ - _statusline(BOOKMARKS_NOLINKS); - sleep(MessageSecs); + HTUserMsg(BOOKMARKS_NOLINKS); break; } else { _statusline(BOOK_D_OR_CANCEL); @@ -4762,8 +5038,7 @@ check_add_bookmark_to_self: } else { if (old_c != real_c) { old_c = real_c; - _statusline(NOBOOK_HSML); - sleep(MessageSecs); + HTUserMsg(NOBOOK_HSML); } } break; @@ -4772,8 +5047,7 @@ check_add_bookmark_to_self: if (LYValidate) { if (old_c != real_c) { old_c = real_c; - _statusline(BOOKMARKS_DISABLED); - sleep(MessageSecs); + HTUserMsg(BOOKMARKS_DISABLED); } break; } @@ -4812,49 +5086,14 @@ check_add_bookmark_to_self: case LYK_SHELL: /* shell escape */ if (!no_shell) { stop_curses(); - printf(SPAWNING_MSG); - fflush(stdout); - fflush(stderr); - if (LYTraceLogFP) - /* - * Set stderr back to its original value - * during the shell escape. - FM - */ - *stderr = LYOrigStderr; -#ifdef DOSPATH -#ifdef __DJGPP__ - __djgpp_set_ctrl_c(0); - _go32_want_ctrl_break(1); -#endif /* __DJGPP__ */ - if (getenv("SHELL") != NULL) { - system(getenv("SHELL")); - } else { - system(getenv("COMSPEC") == NULL ? "command.com" : getenv("COMSPEC")); - } -#ifdef __DJGPP__ - __djgpp_set_ctrl_c(1); - _go32_want_ctrl_break(0); -#endif /* __DJGPP__ */ -#else -#ifdef VMS - system(""); -#else - system("exec $SHELL"); -#endif /* VMS */ -#endif /* DOSPATH */ - if (LYTraceLogFP) - /* - * Set stderr back to the log file on - * return from the shell escape. - FM - */ - *stderr = *LYTraceLogFP; + printf("%s\r\n", SPAWNING_MSG); + LYSystem(LYSysShell()); start_curses(); refresh_screen = TRUE; /* for an HText_pageDisplay() */ } else { if (old_c != real_c) { old_c = real_c; - _statusline(SPAWNING_DISABLED); - sleep(MessageSecs); + HTUserMsg(SPAWNING_DISABLED); } } break; @@ -4867,8 +5106,7 @@ check_add_bookmark_to_self: (no_download && !override_no_download && no_disk_save)) { if (old_c != real_c) { old_c = real_c; - _statusline(DOWNLOAD_DISABLED); - sleep(MessageSecs); + HTUserMsg(DOWNLOAD_DISABLED); } break; } @@ -4888,8 +5126,15 @@ check_add_bookmark_to_self: URL_MAIL_METHOD) { if (old_c != real_c) { old_c = real_c; - _statusline(NO_DOWNLOAD_MAILTO_ACTION); - sleep(MessageSecs); + HTUserMsg(NO_DOWNLOAD_MAILTO_ACTION); + } + break; + } + if (!strncmp(links[curdoc.link].form->submit_action, + "LYNXOPTIONS:", 12)) { + if (old_c != real_c) { + old_c = real_c; + HTUserMsg(NO_DOWNLOAD_SPECIAL); } break; } @@ -4900,24 +5145,21 @@ check_add_bookmark_to_self: } if (old_c != real_c) { old_c = real_c; - _statusline(NO_DOWNLOAD_INPUT); - sleep(MessageSecs); + HTUserMsg(NO_DOWNLOAD_INPUT); } } else if (!strcmp((curdoc.title ? curdoc.title : ""), COOKIE_JAR_TITLE)) { if (old_c != real_c) { old_c = real_c; - _statusline(NO_DOWNLOAD_COOKIES); - sleep(MessageSecs); + HTUserMsg(NO_DOWNLOAD_COOKIES); } } else if (!strcmp((curdoc.title ? curdoc.title : ""), PRINT_OPTIONS_TITLE)) { if (old_c != real_c) { old_c = real_c; - _statusline(NO_DOWNLOAD_PRINT_OP); - sleep(MessageSecs); + HTUserMsg(NO_DOWNLOAD_PRINT_OP); } #ifdef DIRED_SUPPORT @@ -4926,8 +5168,7 @@ check_add_bookmark_to_self: UPLOAD_OPTIONS_TITLE)) { if (old_c != real_c) { old_c = real_c; - _statusline(NO_DOWNLOAD_UPLOAD_OP); - sleep(MessageSecs); + HTUserMsg(NO_DOWNLOAD_UPLOAD_OP); } } else if (!strcmp(curdoc.address, LYPermitFileURL) || @@ -4935,8 +5176,7 @@ check_add_bookmark_to_self: PERMIT_OPTIONS_TITLE)) { if (old_c != real_c) { old_c = real_c; - _statusline(NO_DOWNLOAD_PERMIT_OP); - sleep(MessageSecs); + HTUserMsg(NO_DOWNLOAD_PERMIT_OP); } } else if (lynx_edit_mode && !no_dired_support) { @@ -4960,10 +5200,12 @@ check_add_bookmark_to_self: if ((history[number].post_data != NULL && history[number].safe != TRUE) && HTConfirm(CONFIRM_POST_RESUBMISSION) == FALSE) { - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); break; } + /* + * OK, we download from history page, restore URL from stack. + */ StrAllocCopy(newdoc.address, history[number].address); StrAllocCopy(newdoc.title, links[curdoc.link].hightext); StrAllocCopy(newdoc.bookmark, history[number].bookmark); @@ -5000,13 +5242,35 @@ check_add_bookmark_to_self: "LYNXDOWNLOAD:", 13) || !strncmp(links[curdoc.link].lname, "LYNXPRINT:", 10) || + !strncmp(links[curdoc.link].lname, + "LYNXOPTIONS:", 12) || + !strncmp(links[curdoc.link].lname, + "LYNXCFG:", 8) || + !strncmp(links[curdoc.link].lname, + "LYNXCOMPILEOPTS:", 16) || !strncmp(links[curdoc.link].lname, "lynxexec:", 9) || !strncmp(links[curdoc.link].lname, "lynxprog:", 9)) { - _statusline(NO_DOWNLOAD_SPECIAL); - sleep(MessageSecs); + HTUserMsg(NO_DOWNLOAD_SPECIAL); + } else if (!strncmp(links[curdoc.link].lname, + "mailto:", 7)) { + HTUserMsg(NO_DOWNLOAD_MAILTO_LINK); + + /* + * From here on we could have a remote host, so check if + * that's allowed. + * + * We copy all these checks from getfile() to LYK_DOWNLOAD + * here because LYNXDOWNLOAD:// will NOT be pushing the + * previous document into the history stack so preserve + * getfile() from returning a wrong status (NULLFILE). + */ + } else if (local_host_only && + !(LYisLocalHost(links[curdoc.link].lname) || + LYisLocalAlias(links[curdoc.link].lname))) { + HTUserMsg(ACCESS_ONLY_LOCALHOST); } else { /* Not a forms, options or history link */ /* * Follow a normal link or anchor. Note that @@ -5045,8 +5309,7 @@ check_add_bookmark_to_self: } } else if (old_c != real_c) { old_c = real_c; - _statusline(NO_DOWNLOAD_CHOICE); - sleep(MessageSecs); + HTUserMsg(NO_DOWNLOAD_CHOICE); } break; @@ -5081,46 +5344,9 @@ check_add_bookmark_to_self: #endif /* DIRED_SUPPORT */ case LYK_TRACE_TOGGLE: /* Toggle TRACE mode. */ - if (WWW_TraceFlag) - WWW_TraceFlag = FALSE; - else - WWW_TraceFlag = TRUE; - - _statusline(WWW_TraceFlag ? TRACE_ON : TRACE_OFF); - sleep(MessageSecs); - - if (TRACE && LYUseTraceLog && LYTraceLogFP == NULL) { - /* - * We haven't yet started a TRACE log for this - * session. If we can't open the file with write - * access, turn off TRACE and give up. Otherwise, - * on VMS we'll close it and delete it and any - * log file from a previous session, so they don't - * accumulate, and then open it again, including - * "shr=get" to overcome open file locking when - * attempting to read the log via the TRACE_LOG - * command. - FM - */ - if ((LYTraceLogFP = LYNewTxtFile(LYTraceLogPath)) == NULL) { - WWW_TraceFlag = FALSE; - _statusline(TRACELOG_OPEN_FAILED); - sleep(MessageSecs); - break; - } -#ifdef VMS - fclose(LYTraceLogFP); - while (remove(LYTraceLogPath) == 0) - ; - if ((LYTraceLogFP = LYNewTxtFile(LYTraceLogPath)) == NULL) { - WWW_TraceFlag == FALSE; - _statusline(TRACELOG_OPEN_FAILED); - sleep(MessageSecs); - break; - } -#endif /* VMS */ - *stderr = *LYTraceLogFP; - fprintf(stderr, "\t\t%s\n\n", LYNX_TRACELOG_TITLE); - } + WWW_TraceFlag = ! WWW_TraceFlag; + if (LYOpenTraceLog()) + HTUserMsg(WWW_TraceFlag ? TRACE_ON : TRACE_OFF); break; case LYK_TRACE_LOG: /* View TRACE log. */ @@ -5129,8 +5355,7 @@ check_add_bookmark_to_self: * in this session. - FM */ if (LYTraceLogFP == NULL) { - _statusline(NO_TRACELOG_STARTED); - sleep(MessageSecs); + HTUserMsg(NO_TRACELOG_STARTED); break; } @@ -5152,29 +5377,10 @@ check_add_bookmark_to_self: * and open it again, to make sure all stderr messages thus * far will be in the log. - FM */ - if (TRACE) - fprintf(stderr, "\nTurning off TRACE for fetch of log.\n"); - fflush(stdout); - fflush(stderr); - fclose(LYTraceLogFP); - *stderr = LYOrigStderr; - if ((LYTraceLogFP = LYAppendToTxtFile(LYTraceLogPath)) == NULL) { - WWW_TraceFlag = FALSE; - _statusline(TRACELOG_OPEN_FAILED); - sleep(MessageSecs); + if (!LYReopenTracelog(&trace_mode_flag)) break; - } - *stderr = *LYTraceLogFP; - if (TRACE) { - WWW_TraceFlag = FALSE; - trace_mode_flag = TRUE; - } - StrAllocCopy(newdoc.address, "file://localhost"); -#ifdef VMS - StrAllocCat(newdoc.address, HTVMS_wwwName(LYTraceLogPath)); -#else - StrAllocCat(newdoc.address, LYTraceLogPath); -#endif /* VMS */ + + LYLocalFileToURL (&(newdoc.address), LYTraceLogPath); StrAllocCopy(newdoc.title, LYNX_TRACELOG_TITLE); FREE(newdoc.post_data); FREE(newdoc.post_content_type); @@ -5194,12 +5400,15 @@ check_add_bookmark_to_self: else clickable_images = TRUE; - _statusline(clickable_images ? + HTUserMsg(clickable_images ? CLICKABLE_IMAGES_ON : CLICKABLE_IMAGES_OFF); - sleep(MessageSecs); +#ifdef SOURCE_CACHE + if (HTreparse_document()) { + break; + } +#endif cmd = LYK_RELOAD; goto new_cmd; - break; case LYK_INLINE_TOGGLE: if (pseudo_inline_alts) @@ -5207,25 +5416,32 @@ check_add_bookmark_to_self: else pseudo_inline_alts = TRUE; - _statusline(pseudo_inline_alts ? - PSEUDO_INLINE_ALTS_ON : PSEUDO_INLINE_ALTS_OFF); - sleep(MessageSecs); + HTUserMsg(pseudo_inline_alts ? + PSEUDO_INLINE_ALTS_ON : PSEUDO_INLINE_ALTS_OFF); +#ifdef SOURCE_CACHE + if (HTreparse_document()) { + break; + } +#endif cmd = LYK_RELOAD; goto new_cmd; - break; case LYK_RAW_TOGGLE: - if (LYUseDefaultRawMode) - LYUseDefaultRawMode = FALSE; - else - LYUseDefaultRawMode = TRUE; - _statusline(LYRawMode ? RAWMODE_OFF : RAWMODE_ON); - HTMLSetCharacterHandling(current_char_set); - LYRawMode_flag = LYRawMode; - sleep(MessageSecs); - cmd = LYK_RELOAD; - goto new_cmd; - break; + if (HTLoadedDocumentCharset()) { + HTUserMsg(gettext("charset for this document specified explicitely, sorry...")); + break; + } else { + LYUseDefaultRawMode = !LYUseDefaultRawMode; + HTUserMsg(LYRawMode ? RAWMODE_OFF : RAWMODE_ON); + HTMLSetCharacterHandling(current_char_set); +#ifdef SOURCE_CACHE + if (HTreparse_document()) { + break; + } +#endif + cmd = LYK_RELOAD; + goto new_cmd; + } case LYK_HEAD: if (nlinks > 0 && @@ -5242,8 +5458,7 @@ check_add_bookmark_to_self: char *scheme = strncmp(curdoc.address, "LYNXIMGMAP:", 11) ? curdoc.address : curdoc.address + 11; if (LYCanDoHEAD(scheme) != TRUE) { - _statusline(DOC_NOT_HTTP_URL); - sleep(MessageSecs); + HTUserMsg(DOC_NOT_HTTP_URL); } else { /* * Check if this is a reply from a POST, @@ -5253,8 +5468,7 @@ check_add_bookmark_to_self: if ((curdoc.post_data != NULL && curdoc.safe != TRUE) && HTConfirm(CONFIRM_POST_DOC_HEAD) == FALSE) { - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); break; } HEAD_request = TRUE; @@ -5277,25 +5491,21 @@ check_add_bookmark_to_self: (links[curdoc.link].type != WWW_INTERN_LINK_TYPE || !curdoc.address || strncmp(curdoc.address, "http", 4))) { - _statusline(LINK_NOT_HTTP_URL); - sleep(MessageSecs); + HTUserMsg(LINK_NOT_HTTP_URL); } else if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && links[curdoc.link].form->disabled) { - _statusline(FORM_ACTION_DISABLED); - sleep(MessageSecs); + HTUserMsg(FORM_ACTION_DISABLED); } else if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && strncmp(links[curdoc.link].form->submit_action, "lynxcgi:", 8) && strncmp(links[curdoc.link].form->submit_action, "http", 4)) { - _statusline(FORM_ACTION_NOT_HTTP_URL); - sleep(MessageSecs); + HTUserMsg(FORM_ACTION_NOT_HTTP_URL); } else if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && links[curdoc.link].form->submit_method == URL_POST_METHOD && HTConfirm(CONFIRM_POST_LINK_HEAD) == FALSE) { - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); } else { HEAD_request = TRUE; LYforce_no_cache = TRUE; @@ -5314,8 +5524,7 @@ check_add_bookmark_to_self: if ((curdoc.post_data != NULL && curdoc.safe != TRUE) && HTConfirm(CONFIRM_POST_DOC_HEAD) == FALSE) { - _statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); break; } else if (nlinks > 0) { /* @@ -5343,8 +5552,7 @@ check_add_bookmark_to_self: * current document. - FM */ if (LYCanDoHEAD(scheme) != TRUE) { - _statusline(DOC_NOT_HTTP_URL); - sleep(MessageSecs); + HTUserMsg(DOC_NOT_HTTP_URL); } else { HEAD_request = TRUE; LYforce_no_cache = TRUE; @@ -5409,10 +5617,9 @@ check_add_bookmark_to_self: if (old_c != real_c) { old_c = real_c; if (no_jump) - _statusline(JUMP_DISALLOWED); + HTUserMsg(JUMP_DISALLOWED); else - _statusline(NO_JUMPFILE); - sleep(MessageSecs); + HTUserMsg(NO_JUMPFILE); } } else { LYJumpFileURL = TRUE; @@ -5432,8 +5639,7 @@ check_add_bookmark_to_self: goto check_recall; } FREE(temp); - statusline(NO_RANDOM_URLS_YET); - sleep(MessageSecs); + HTUserMsg(NO_RANDOM_URLS_YET); break; } ret = HTParse((ret+3), startfile, PARSE_ALL); @@ -5443,21 +5649,8 @@ check_add_bookmark_to_self: } #endif /* PERMIT_GOTO_FROM_JUMP */ ret = HTParse(ret, startfile, PARSE_ALL); - LYTrimHead(ret); - if (!strncasecomp(ret, "lynxexec:", 9) || - !strncasecomp(ret, "lynxprog:", 9)) { - /* - * The original implementations of these schemes - * expected white space without hex escaping, - * and did not check for hex escaping, so we'll - * continue to support that, until that code is - * redone in conformance with SGML principles. - * - FM - */ - HTUnEscapeSome(ret, " \r\n\t"); - convert_to_spaces(ret, TRUE); - } else { - collapse_spaces(user_input_buffer); + if (!LYTrimStartfile(ret)) { + LYRemoveBlanks(user_input_buffer); } StrAllocCopy(newdoc.address, ret); StrAllocCopy(lynxjumpfile, ret); @@ -5485,28 +5678,18 @@ check_add_bookmark_to_self: FREE(proxyauth_info[0]); FREE(proxyauth_info[1]); HTClearHTTPAuthInfo(); +#ifndef DISABLE_NEWS HTClearNNTPAuthInfo(); +#endif +#ifndef DISABLE_FTP HTClearFTPPassword(); - _statusline(AUTH_INFO_CLEARED); +#endif + HTUserMsg(AUTH_INFO_CLEARED); } else { - _statusline(CANCELLED); + HTUserMsg(CANCELLED); } - sleep(MessageSecs); - } - break; - -#ifdef NOT_USED - case LYK_VERSION: - if (old_c != real_c) { - char version[128]; - old_c = real_c; - sprintf(version, "*** %s Version %s ***", - LYNX_NAME, LYNX_VERSION); - statusline(version); - sleep(AlertMessage); } break; -#endif /* NOT_USED */ case LYK_DO_NOTHING: /* pretty self explanatory */ break; @@ -5773,7 +5956,7 @@ PUBLIC void HTGotoURLs_free NOARGS * repeated URLs the most current in the list. - FM */ PUBLIC void HTAddGotoURL ARGS1( - char *, url) + char *, url) { char *new; char *old; @@ -5788,7 +5971,9 @@ PUBLIC void HTAddGotoURL ARGS1( if (!Goto_URLs) { Goto_URLs = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(HTGotoURLs_free); +#endif HTList_addObject(Goto_URLs, new); return; } @@ -5805,3 +5990,261 @@ PUBLIC void HTAddGotoURL ARGS1( return; } + +/* + * When help is not on the screen, + * put a message on the screen + * to tell the user other misc info. + */ +PRIVATE void print_status_message ARGS2( + CONST linkstruct, curlink, + char **, cp) +{ + /* + * Make sure form novice lines are replaced. + */ + if (user_mode == NOVICE_MODE) { + noviceline(more); + } + + /* + * If we are in forms mode then explicitly + * tell the user what each kind of link is. + */ + if (HTisDocumentSource()) { + /* + * Currently displaying HTML source. + */ + _statusline(SOURCE_HELP); + +#ifdef INDICATE_FORMS_MODE_FOR_ALL_LINKS_ON_PAGE + } else if (lynx_mode == FORMS_LYNX_MODE && nlinks > 0) { +#else +#ifdef NORMAL_NON_FORM_LINK_STATUSLINES_FOR_ALL_USER_MODES + } else if (lynx_mode == FORMS_LYNX_MODE && nlinks > 0 && + !(curlink.type & WWW_LINK_TYPE)) { +#else + } else if (lynx_mode == FORMS_LYNX_MODE && nlinks > 0 && + !(user_mode == ADVANCED_MODE && + (curlink.type & WWW_LINK_TYPE))) { +#endif /* NORMAL_NON_FORM_LINK_STATUSLINES_FOR_ALL_USER_MODES */ +#endif /* INDICATE_FORMS_MODE_FOR_ALL_LINKS_ON_PAGE */ + if (curlink.type == WWW_FORM_LINK_TYPE) { + switch(curlink.form->type) { + case F_PASSWORD_TYPE: + if (curlink.form->disabled == YES) + statusline(FORM_LINK_PASSWORD_UNM_MSG); + else + statusline(FORM_LINK_PASSWORD_MESSAGE); + break; + case F_OPTION_LIST_TYPE: + if (curlink.form->disabled == YES) + statusline(FORM_LINK_OPTION_LIST_UNM_MSG); + else + statusline(FORM_LINK_OPTION_LIST_MESSAGE); + break; + case F_CHECKBOX_TYPE: + if (curlink.form->disabled == YES) + statusline(FORM_LINK_CHECKBOX_UNM_MSG); + else + statusline(FORM_LINK_CHECKBOX_MESSAGE); + break; + case F_RADIO_TYPE: + if (curlink.form->disabled == YES) + statusline(FORM_LINK_RADIO_UNM_MSG); + else + statusline(FORM_LINK_RADIO_MESSAGE); + break; + case F_TEXT_SUBMIT_TYPE: + if (curlink.form->disabled == YES) { + statusline(FORM_LINK_TEXT_SUBMIT_UNM_MSG); + } else if (curlink.form->submit_method == + URL_MAIL_METHOD) { + if (no_mail) + statusline(FORM_LINK_TEXT_SUBMIT_MAILTO_DIS_MSG); + else + statusline(FORM_LINK_TEXT_SUBMIT_MAILTO_MSG); + } else if (curlink.form->no_cache) { + statusline(FORM_LINK_TEXT_RESUBMIT_MESSAGE); + } else { + statusline(FORM_LINK_TEXT_SUBMIT_MESSAGE); + } + break; + case F_SUBMIT_TYPE: + case F_IMAGE_SUBMIT_TYPE: + if (curlink.form->disabled == YES) { + statusline(FORM_LINK_SUBMIT_DIS_MSG); + } else if (curlink.form->submit_method == + URL_MAIL_METHOD) { + if (no_mail) { + statusline(FORM_LINK_SUBMIT_MAILTO_DIS_MSG); + } else { + if(user_mode == ADVANCED_MODE) { + char *submit_str = NULL; + + StrAllocCopy(submit_str, FORM_LINK_SUBMIT_MAILTO_PREFIX); + StrAllocCat(submit_str, curlink.form->submit_action); + statusline(submit_str); + FREE(submit_str); + } else { + statusline(FORM_LINK_SUBMIT_MAILTO_MSG); + } + } + } else if (curlink.form->no_cache) { + if(user_mode == ADVANCED_MODE) { + char *submit_str = NULL; + + StrAllocCopy(submit_str, FORM_LINK_RESUBMIT_PREFIX); + StrAllocCat(submit_str, curlink.form->submit_action); + statusline(submit_str); + FREE(submit_str); + } else { + statusline(FORM_LINK_RESUBMIT_MESSAGE); + } + } else { + if(user_mode == ADVANCED_MODE) { + char *submit_str = NULL; + + StrAllocCopy(submit_str, FORM_LINK_SUBMIT_PREFIX); + StrAllocCat(submit_str, curlink.form->submit_action); + statusline(submit_str); + FREE(submit_str); + } else { + statusline(FORM_LINK_SUBMIT_MESSAGE); + } + } + break; + case F_RESET_TYPE: + if (curlink.form->disabled == YES) + statusline(FORM_LINK_RESET_DIS_MSG); + else + statusline(FORM_LINK_RESET_MESSAGE); + break; + case F_TEXT_TYPE: + if (curlink.form->disabled == YES) + statusline(FORM_LINK_TEXT_UNM_MSG); + else + statusline(FORM_LINK_TEXT_MESSAGE); + break; + case F_TEXTAREA_TYPE: + if (curlink.form->disabled == YES) + statusline(FORM_LINK_TEXT_UNM_MSG); + else + statusline(FORM_LINK_TEXTAREA_MESSAGE); + break; + } + } else { + statusline(NORMAL_LINK_MESSAGE); + } + + /* + * Let them know if it's an index -- very rare. + */ + if (is_www_index) { + move(LYlines-1, LYcols-8); + start_reverse(); + addstr("-index-"); + stop_reverse(); + } + + } else if (user_mode == ADVANCED_MODE && nlinks > 0) { + /* + * Show the URL or, for some internal links, the fragment + */ + *cp = NULL; + if (curlink.type == WWW_INTERN_LINK_TYPE && + strncmp(curlink.lname, "LYNXIMGMAP:", 11)) { + *cp = strchr(curlink.lname, '#'); + } + if (!(*cp)) + *cp = curlink.lname; + if (more) { + if (is_www_index) + _user_message("-more- -index- %s", + *cp); + else + _user_message("-more- %s",*cp); + } else { + if (is_www_index) + _user_message("-index- %s",*cp); + else + statusline(*cp); + } + } else if (is_www_index && more) { + char buf[128]; + + sprintf(buf, WWW_INDEX_MORE_MESSAGE, key_for_func(LYK_INDEX_SEARCH)); + _statusline(buf); + } else if (is_www_index) { + char buf[128]; + + sprintf(buf, WWW_INDEX_MESSAGE, key_for_func(LYK_INDEX_SEARCH)); + _statusline(buf); + } else if (more) { + if (user_mode == NOVICE_MODE) + _statusline(MORE); + else + _statusline(MOREHELP); + } else { + _statusline(HELP); + } + /* turn off cursor since now it's probably on statusline -HV */ + move((LYlines - 1), (LYcols - 1)); +} + + +PRIVATE void exit_immediately_with_error_message ARGS2( + int, state, + BOOLEAN, first_file) +{ + char *buf = 0; + char *buf2 = 0; + + if (first_file) { + /* print statusline messages as a hint, if any */ + LYstatusline_messages_on_exit(&buf2); + } + + if (state == NOT_FOUND) + { + HTSprintf0(&buf, "%s\n%s %s\n", + buf2, + gettext("lynx: Can't access startfile"), + /* + * hack: if we fail in HTAccess.c + * avoid duplicating URL, oh. + */ + strstr(buf2, gettext("Can't Access")) ? "" : startfile); + } + + if (state == NULLFILE) + { + HTSprintf0(&buf, "%s\n%s\n%s\n", + buf2, + gettext("lynx: Start file could not be found or is not text/html or text/plain"), + gettext(" Exiting...")); + } + + FREE(buf2); + + if (!dump_output_immediately) + cleanup(); + +#ifdef UNIX + if (dump_output_immediately) { + fprintf(stderr, buf); + } else +#endif /* UNIX */ + { + SetOutputMode( O_TEXT ); + printf(buf); + SetOutputMode( O_BINARY ); + } + + FREE(buf); + + if (!dump_output_immediately) { + exit_immediately(-1); + } + /* else: return(-1) in mainloop */ +} diff --git a/gnu/usr.bin/lynx/src/LYMainLoop.h b/gnu/usr.bin/lynx/src/LYMainLoop.h index b3a5bd99635..4b9b562f022 100644 --- a/gnu/usr.bin/lynx/src/LYMainLoop.h +++ b/gnu/usr.bin/lynx/src/LYMainLoop.h @@ -1,7 +1,16 @@ - #ifndef LYMAINLOOP_H #define LYMAINLOOP_H +#ifndef HTUTILS_H +#include +#endif + +#define TEXTAREA_EXPAND_SIZE 5 +#define AUTOGROW +#define AUTOEXTEDIT + +extern BOOLEAN LYOpenTraceLog NOPARAMS; +extern void LYCloseTracelog NOPARAMS; extern int mainloop NOPARAMS; #endif /* LYMAINLOOP_H */ diff --git a/gnu/usr.bin/lynx/src/LYMap.c b/gnu/usr.bin/lynx/src/LYMap.c index 618bf368a0e..055939107b6 100644 --- a/gnu/usr.bin/lynx/src/LYMap.c +++ b/gnu/usr.bin/lynx/src/LYMap.c @@ -5,31 +5,28 @@ ** */ -#include "HTUtils.h" -#include "tcp.h" -#include "HTTP.h" -#include "HTAnchor.h" -#include "HTAccess.h" -#include "HTFormat.h" -#include "HTParse.h" -#include "HTAlert.h" -#include "LYUtils.h" -#include "LYMap.h" -#include "GridText.h" -#include "LYSignal.h" -#include "LYGlobalDefs.h" -#include "LYKeymap.h" -#include "LYCharUtils.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef DIRED_SUPPORT -#include "LYUpload.h" -#include "LYLocal.h" +#include +#include #endif -#include "LYexit.h" -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x=NULL;} +#include +#include typedef struct _LYMapElement { char * address; @@ -88,6 +85,7 @@ PUBLIC void ImageMapList_free ARGS1( return; } +#ifdef LY_FIND_LEAKS /* * Utility for freeing the global list of MAPs. - kw */ @@ -97,6 +95,7 @@ PRIVATE void LYLynxMaps_free NOARGS LynxMaps = NULL; return; } +#endif /* LY_FIND_LEAKS */ /* * We keep two kinds of lists: @@ -107,7 +106,7 @@ PRIVATE void LYLynxMaps_free NOARGS * HTParentAnchor structure and is freed when the document is removed * from memory, in the course of normal removal of anchors. * MAPs from POST responses can only be accessed via internal links, - * i.e. from within the same document (with the same post_data). + * i.e., from within the same document (with the same post_data). * The notion of "same document" is extended, so that LYNXIMGMAP: * and List Page screens are logically part of the document on which * they are based. - kw @@ -163,7 +162,9 @@ PUBLIC BOOL LYAddImageMap ARGS3( { if (!LynxMaps) { LynxMaps = HTList_new(); +#ifdef LY_FIND_LEAKS atexit(LYLynxMaps_free); +#endif } theList = LynxMaps; } @@ -171,6 +172,8 @@ PUBLIC BOOL LYAddImageMap ARGS3( if (theList) { cur = theList; while (NULL != (old = (LYImageMap *)HTList_nextObject(cur))) { + if (old->address == 0) /* shouldn't happen */ + continue; if (!strcmp(old->address, address)) { FREE(old->address); FREE(old->title); @@ -193,7 +196,7 @@ PUBLIC BOOL LYAddImageMap ARGS3( new = (old != NULL) ? old : (LYImageMap *)calloc(1, sizeof(LYImageMap)); if (new == NULL) { - perror("Out of memory in LYAddImageMap"); + outofmem(__FILE__, "LYAddImageMap"); return FALSE; } StrAllocCopy(new->address, address); @@ -318,7 +321,7 @@ PUBLIC BOOL LYHaveImageMap ARGS1( * the underlying resource. ALso returns a pointer to that anchor in * *punderlying if we are dealing with POST data. - kw * - * address is the address of the underlying resource, i.e. the one + * address is the address of the underlying resource, i.e., the one * containing the MAP element, the MAP's name appended as * fragment is ignored. * anAnchor is the LYNXIMGMAP: anchor; if it is associated with POST @@ -361,7 +364,7 @@ PRIVATE void fill_DocAddress ARGS4( * list if a List Page for a POST response is requested. Also * fill in the DocAddress structure etc. by calling fill_DocAddress(). * - * address is the address of the underlying resource, i.e. the one + * address is the address of the underlying resource, i.e., the one * containing the MAP element, the MAP's name appended as * fragment is ignored. * anchor is the LYNXIMGMAP: anchor for which LYLoadIMGmap() is @@ -403,7 +406,7 @@ PRIVATE int LYLoadIMGmap ARGS4 ( { HTFormat format_in = WWW_HTML; HTStream *target = NULL; - char buf[1024]; + char *buf = NULL; LYMapElement *new = NULL; LYImageMap *theMap = NULL; char *MapTitle = NULL; @@ -433,12 +436,8 @@ PRIVATE int LYLoadIMGmap ARGS4 ( if (!theList) { if (anAnchor->post_data && !WWWDoc.safe && ((underlying && underlying->document && !LYforce_no_cache) || - HTConfirm( -#if __STDC__ - "LYNXIMGMAP: " -#endif - CONFIRM_POST_RESUBMISSION) != TRUE)) { - HTAlert("Image map from POST response not available!"); + HTConfirm(CONFIRM_POST_RESUBMISSION) != TRUE)) { + HTAlert(FAILED_MAP_POST_REQUEST); return(HT_NOT_LOADED); } LYforce_no_cache = TRUE; @@ -474,12 +473,8 @@ PRIVATE int LYLoadIMGmap ARGS4 ( if (!(theMap && theMap->elements)) { if (anAnchor->post_data && !WWWDoc.safe && ((underlying && underlying->document && !LYforce_no_cache) || - HTConfirm( -#if __STDC__ - "LYNXIMGMAP: " -#endif - CONFIRM_POST_RESUBMISSION) != TRUE)) { - HTAlert("Image map from POST response not available!"); + HTConfirm(CONFIRM_POST_RESUBMISSION) != TRUE)) { + HTAlert(FAILED_MAP_POST_REQUEST); return(HT_NOT_LOADED); } LYforce_no_cache = TRUE; @@ -519,9 +514,10 @@ PRIVATE int LYLoadIMGmap ARGS4 ( sink, anAnchor); if (!target || target == NULL) { - sprintf(buf, CANNOT_CONVERT_I_TO_O, + HTSprintf(&buf, CANNOT_CONVERT_I_TO_O, HTAtom_name(format_in), HTAtom_name(format_out)); HTAlert(buf); + FREE(buf); return(HT_NOT_LOADED); } @@ -541,44 +537,63 @@ PRIVATE int LYLoadIMGmap ARGS4 ( LYEntify(&MapTitle, TRUE); } - sprintf(buf,"\n%s\n\n\n", MapTitle); - (*target->isa->put_block)(target, buf, strlen(buf)); +#define PUTS(buf) (*target->isa->put_block)(target, buf, strlen(buf)) + + HTSprintf0(&buf, "\n\n"); + PUTS(buf); + HTSprintf0(&buf, "\n", + "http-equiv=\"content-type\"", + LYCharSet_UC[current_char_set].MIMEname); + PUTS(buf); + /* + * This page is a list of titles and anchors for them. + * Since titles already passed SGML/HTML stage + * they converted to current_char_set. + * That is why we insist on META charset for this page. + */ + HTSprintf0(&buf, "%s\n", MapTitle); + PUTS(buf); + HTSprintf0(&buf, "\n\n"); + PUTS(buf); - sprintf(buf,"

                %s

                \n", MapTitle); - (*target->isa->put_block)(target, buf, strlen(buf)); + HTSprintf0(&buf,"

                %s

                \n", MapTitle); + PUTS(buf); StrAllocCopy(MapAddress, address); LYEntify(&MapAddress, FALSE); - sprintf(buf,"

                MAP: %s

                \n", MapAddress); - (*target->isa->put_block)(target, buf, strlen(buf)); + HTSprintf0(&buf,"

                MAP: %s

                \n", MapAddress); + PUTS(buf); - sprintf(buf, "<%s compact>\n", ((keypad_mode == NUMBERS_AS_ARROWS) ? + HTSprintf0(&buf, "<%s compact>\n", ((keypad_mode == NUMBERS_AS_ARROWS) ? "ol" : "ul")); - (*target->isa->put_block)(target, buf, strlen(buf)); + PUTS(buf); cur = theMap->elements; while (NULL != (new=(LYMapElement *)HTList_nextObject(cur))) { StrAllocCopy(MapAddress, new->address); LYEntify(&MapAddress, FALSE); - (*target->isa->put_block)(target, "
              • isa->put_block)(target, MapAddress, strlen(MapAddress)); + PUTS("
              • intern_flag) - (*target->isa->put_block)(target, "\" TYPE=\"internal link\"\n>",24); - else + PUTS(" TYPE=\"internal link\""); #endif - (*target->isa->put_block)(target, "\"\n>", 3); + PUTS("\n>"); StrAllocCopy(MapTitle, new->title); LYEntify(&MapTitle, TRUE); - (*target->isa->put_block)(target, MapTitle, strlen(MapTitle)); - (*target->isa->put_block)(target, "\n", 5); + PUTS(MapTitle); + PUTS("\n"); } - sprintf(buf,"\n\n", ((keypad_mode == NUMBERS_AS_ARROWS) ? - "ol" : "ul")); - (*target->isa->put_block)(target, buf, strlen(buf)); + HTSprintf0(&buf, "\n\n\n", + ((keypad_mode == NUMBERS_AS_ARROWS) + ? "ol" + : "ul")); + PUTS(buf); (*target->isa->_free)(target); FREE(MapAddress); FREE(MapTitle); + FREE(buf); return(HT_LOADED); } diff --git a/gnu/usr.bin/lynx/src/LYMap.h b/gnu/usr.bin/lynx/src/LYMap.h index ae0f9d6935b..077347a8de2 100644 --- a/gnu/usr.bin/lynx/src/LYMap.h +++ b/gnu/usr.bin/lynx/src/LYMap.h @@ -1,7 +1,13 @@ - #ifndef LYMAP_H #define LYMAP_H +#ifndef HTUTILS_H +#include +#endif + +#include +#include + extern BOOL LYMapsOnly; extern void ImageMapList_free PARAMS((HTList * list)); diff --git a/gnu/usr.bin/lynx/src/LYNews.c b/gnu/usr.bin/lynx/src/LYNews.c index 77824ebd696..1b27f64412e 100644 --- a/gnu/usr.bin/lynx/src/LYNews.c +++ b/gnu/usr.bin/lynx/src/LYNews.c @@ -1,27 +1,23 @@ -#include "HTUtils.h" -#include "tcp.h" -#include "HTParse.h" -#include "HTAccess.h" -#include "HTCJK.h" -#include "HTAlert.h" -#include "LYCurses.h" -#include "LYSignal.h" -#include "LYStructs.h" -#include "LYUtils.h" -#include "LYClean.h" -#include "LYStrings.h" -#include "LYGetFile.h" -#include "LYHistory.h" -#include "LYSystem.h" -#include "GridText.h" -#include "LYCharSets.h" -#include "LYNews.h" +#include +#ifndef DISABLE_NEWS +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -#include "LYGlobalDefs.h" +#include -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} +#include /* ** Global variable for async i/o. @@ -29,6 +25,56 @@ BOOLEAN term_message = FALSE; PRIVATE void terminate_message PARAMS((int sig)); +PRIVATE BOOLEAN message_has_content ARGS1( + CONST char *, filename) +{ + FILE *fp; + char *buffer = NULL; + BOOLEAN in_headers = TRUE; + + if (!filename || (fp = fopen(filename, "r")) == NULL) { + CTRACE(tfp, "Failed to open file %s for reading!\n", + filename ? filename : "()"); + return FALSE; + } + while (LYSafeGets(&buffer, fp) != NULL) { + char *cp = buffer; + char firstnonblank = '\0'; + if (*cp == '\0') { + break; + } + for (; *cp; cp++) { + if (*cp == '\n') { + break; + } else if (*cp != ' ') { + if (!firstnonblank && isgraph((unsigned char)*cp)) { + firstnonblank = *cp; + } + } + } + if (*cp != '\n') { + int c; + while ((c = getc(fp)) != EOF && c != (int)(unsigned char)'\n') { + if (!firstnonblank && isgraph((unsigned char)c)) + firstnonblank = (char)c; + } + } + if (firstnonblank && firstnonblank != '>') { + if (!in_headers) { + fclose(fp); + FREE(buffer); + return TRUE; + } + } + if (!firstnonblank) { + in_headers = FALSE; + } + } + FREE(buffer); + fclose(fp); + return FALSE; +} + /* ** This function is called from HTLoadNews() to have the user ** create a file with news headers and a body for posting of @@ -47,15 +93,18 @@ PUBLIC char *LYNewsPost ARGS2( char user_input[1024]; char CJKinput[1024]; char *cp = NULL; + CONST char *kp = NULL; int c = 0; /* user input */ FILE *fd = NULL; - char my_tempfile[256]; + char my_tempfile[LY_MAXPATH]; FILE *fc = NULL; - char CJKfile[256]; + char CJKfile[LY_MAXPATH]; char *postfile = NULL; char *NewsGroups = NULL; + char *References = NULL; char *org = NULL; FILE *fp = NULL; + BOOLEAN nonempty = FALSE; /* * Make sure a non-zero length newspost, newsreply, @@ -68,8 +117,7 @@ PUBLIC char *LYNewsPost ARGS2( * Open a temporary file for the headers * and message body. - FM */ - tempname(my_tempfile, NEW_FILE); - if ((fd = LYNewTxtFile(my_tempfile)) == NULL) { + if ((fd = LYOpenTemp(my_tempfile, HTML_SUFFIX, "w")) == NULL) { HTAlert(CANNOT_OPEN_TEMP); return(postfile); } @@ -79,18 +127,11 @@ PUBLIC char *LYNewsPost ARGS2( * open a temporary file for a conversion to JIS. - FM */ CJKfile[0] = '\0'; - if (!strncmp(LYchar_set_names[current_char_set], "Japanese (EUC)", 14) || - !strncmp(LYchar_set_names[current_char_set], "Japanese (SJIS)", 15)) { - tempname(CJKfile, NEW_FILE); - if ((fc = LYNewTxtFile(CJKfile)) == NULL) { + if (current_char_set == UCGetLYhndl_byMIME("euc-jp") || + current_char_set == UCGetLYhndl_byMIME("shift_jis")) { + if ((fc = LYOpenTemp(CJKfile, HTML_SUFFIX, "w")) == NULL) { HTAlert(CANNOT_OPEN_TEMP); - fclose(fd); -#ifdef VMS - while (remove(my_tempfile) == 0) - ; /* loop through all versions */ -#else - remove(my_tempfile); -#endif /* VMS */ + LYRemoveTemp(my_tempfile); return(postfile); } } @@ -101,7 +142,27 @@ PUBLIC char *LYNewsPost ARGS2( * may also have been hex escaped. - FM */ StrAllocCopy(NewsGroups, newsgroups); + if ((cp = strstr(NewsGroups, ";ref="))) { + *cp = '\0'; + cp += 5; + if (*cp == '<') { + StrAllocCopy(References, cp); + } else { + StrAllocCopy(References, "<"); + StrAllocCat(References, cp); + StrAllocCat(References, ">"); + } + HTUnEscape(References); + if (!((cp = strchr(References, '@')) && cp > References + 1 && + isalnum(cp[1]))) { + FREE(References); + } + } HTUnEscape(NewsGroups); + if (!*NewsGroups) { + LYCloseTempFP(fd); /* Close the temp file. */ + goto cleanup; + } /* * Allow ^C to cancel the posting, @@ -116,7 +177,7 @@ PUBLIC char *LYNewsPost ARGS2( clear(); move(2,0); scrollok(stdscr, TRUE); /* Enable scrolling. */ - addstr("You will be posting to:"); + addstr(gettext("You will be posting to:")); addstr("\n\t"); addstr(NewsGroups); addch('\n'); @@ -125,17 +186,16 @@ PUBLIC char *LYNewsPost ARGS2( * Get the mail address for the From header, * offering personal_mail_address as default. */ - addstr("\n\n Please provide your mail address for the From: header\n"); + addstr(gettext("\n\n Please provide your mail address for the From: header\n")); strcpy(user_input, "From: "); if (personal_mail_address) strcat(user_input, personal_mail_address); if (LYgetstr(user_input, VISIBLE, sizeof(user_input), NORECALL) < 0 || term_message) { - _statusline(NEWS_POST_CANCELLED); - sleep(InfoSecs); - fclose(fd); /* Close the temp file. */ - scrollok(stdscr, FALSE); /* Stop scrolling. */ + HTInfoMsg(NEWS_POST_CANCELLED); + LYCloseTempFP(fd); /* Close the temp file. */ + scrollok(stdscr, FALSE); /* Stop scrolling. */ goto cleanup; } fprintf(fd, "%s\n", user_input); @@ -145,30 +205,27 @@ PUBLIC char *LYNewsPost ARGS2( * document's title as the default if this is a * followup rather than a new post. - FM */ - addstr("\n\n Please provide or edit the Subject: header\n"); + addstr(gettext("\n\n Please provide or edit the Subject: header\n")); strcpy(user_input, "Subject: "); if ((followup == TRUE && nhist > 0) && - (cp = HText_getTitle()) != NULL) { + (kp = HText_getTitle()) != NULL) { /* * Add the default subject. */ - while (isspace(*cp)) { - cp++; + kp = LYSkipCBlanks(kp); + if (strncasecomp(kp, "Re:", 3)) { + strcat(user_input, "Re: "); } - if (strncasecomp(cp, "Re:", 3)) { - strcat(user_input, "Re: "); - } - strcat(user_input, cp); + strcat(user_input, kp); } cp = NULL; if (LYgetstr(user_input, VISIBLE, sizeof(user_input), NORECALL) < 0 || term_message) { - _statusline(NEWS_POST_CANCELLED); - sleep(InfoSecs); - fclose(fd); /* Close the temp file. */ - scrollok(stdscr, FALSE); /* Stop scrolling. */ - goto cleanup; + HTInfoMsg(NEWS_POST_CANCELLED); + LYCloseTempFP(fd); /* Close the temp file. */ + scrollok(stdscr, FALSE); /* Stop scrolling. */ + goto cleanup; } fprintf(fd,"%s\n",user_input); @@ -179,35 +236,39 @@ PUBLIC char *LYNewsPost ARGS2( if (((org = getenv("ORGANIZATION")) != NULL) && *org != '\0') { StrAllocCat(cp, org); } else if (((org = getenv("NEWS_ORGANIZATION")) != NULL) && - *org != '\0') { + *org != '\0') { StrAllocCat(cp, org); #ifndef VMS } else if ((fp = fopen("/etc/organization", "r")) != NULL) { - if (fgets(user_input, sizeof(user_input), fp) != NULL) { - if ((org = strchr(user_input, '\n')) != NULL) { - *org = '\0'; + char *buffer = 0; + if (LYSafeGets(&buffer, fp) != NULL) { + if ((org = strchr(buffer, '\n')) != NULL) { + *org = '\0'; } if (user_input[0] != '\0') { - StrAllocCat(cp, user_input); + StrAllocCat(cp, buffer); } } + FREE(buffer); fclose(fp); #endif /* !VMS */ } LYstrncpy(user_input, cp, (sizeof(user_input) - 16)); - FREE(cp); - addstr("\n\n Please provide or edit the Organization: header\n"); + FREE(cp); + addstr(gettext("\n\n Please provide or edit the Organization: header\n")); if (LYgetstr(user_input, VISIBLE, sizeof(user_input), NORECALL) < 0 || term_message) { - _statusline(NEWS_POST_CANCELLED); - sleep(InfoSecs); - fclose(fd); /* Close the temp file. */ - scrollok(stdscr, FALSE); /* Stop scrolling. */ - goto cleanup; + HTInfoMsg(NEWS_POST_CANCELLED); + LYCloseTempFP(fd); /* Close the temp file. */ + scrollok(stdscr, FALSE); /* Stop scrolling. */ + goto cleanup; } fprintf(fd, "%s\n", user_input); + if (References) { + fprintf(fd, "References: %s\n", References); + } /* * Add Newsgroups Summary and Keywords headers. */ @@ -217,7 +278,7 @@ PUBLIC char *LYNewsPost ARGS2( * Have the user create the message body. */ if (!no_editor && editor && *editor != '\0') { - /* + /* * Use an external editor. */ char *editor_arg = ""; @@ -226,23 +287,21 @@ PUBLIC char *LYNewsPost ARGS2( /* * Ask if the user wants to include the original message. */ - _statusline(INC_ORIG_MSG_PROMPT); - c = 0; - while (TOUPPER(c) != 'Y' && TOUPPER(c) != 'N' && - !term_message && c != 7 && c != 3) - c = LYgetch(); - if (TOUPPER(c) == 'Y') - /* + if (term_message) { + _statusline(INC_ORIG_MSG_PROMPT); + } else if (HTConfirm(INC_ORIG_MSG_PROMPT) == YES) { + /* * The 1 will add the reply ">" in front of every line. * We're assuming that if the display character set is * Japanese and the document did not have a CJK charset, * any non-EUC or non-SJIS 8-bit characters in it where * converted to 7-bit equivalents. - FM */ - print_wwwfile_to_fd(fd, 1); + print_wwwfile_to_fd(fd, 1); + } } - fclose(fd); /* Close the temp file. */ - scrollok(stdscr, FALSE); /* Stop scrolling. */ + LYCloseTempFP(fd); /* Close the temp file. */ + scrollok(stdscr, FALSE); /* Stop scrolling. */ if (term_message || c == 7 || c == 3) goto cleanup; @@ -255,84 +314,87 @@ PUBLIC char *LYNewsPost ARGS2( sprintf(user_input,"%s%s %s", editor, editor_arg, my_tempfile); _statusline(SPAWNING_EDITOR_FOR_NEWS); stop_curses(); - if (system(user_input)) { + if (LYSystem(user_input)) { start_curses(); - _statusline(ERROR_SPAWNING_EDITOR); - sleep(AlertSecs); + HTAlert(ERROR_SPAWNING_EDITOR); } else { start_curses(); } + + nonempty = message_has_content(my_tempfile); + } else { - /* + /* * Use the built in line editior. */ - addstr("\n\n Please enter your message below."); - addstr("\n When you are done, press enter and put a single period (.)"); - addstr("\n on a line and press enter again."); + addstr(gettext("\n\n Please enter your message below.")); + addstr(gettext("\n When you are done, press enter and put a single period (.)")); + addstr(gettext("\n on a line and press enter again.")); addstr("\n\n"); refresh(); - *user_input = '\0'; + *user_input = '\0'; if (LYgetstr(user_input, VISIBLE, - sizeof(user_input), NORECALL) < 0 || + sizeof(user_input), NORECALL) < 0 || term_message) { - _statusline(NEWS_POST_CANCELLED); - sleep(InfoSecs); - fclose(fd); /* Close the temp file. */ + HTInfoMsg(NEWS_POST_CANCELLED); + LYCloseTempFP(fd); /* Close the temp file. */ scrollok(stdscr, FALSE); /* Stop scrolling. */ goto cleanup; } - while (!STREQ(user_input,".") && !term_message) { + while (!STREQ(user_input,".") && !term_message) { addch('\n'); fprintf(fd,"%s\n",user_input); + if (!nonempty && strlen(user_input)) + nonempty = TRUE; *user_input = '\0'; if (LYgetstr(user_input, VISIBLE, - sizeof(user_input), NORECALL) < 0) { - _statusline(NEWS_POST_CANCELLED); - sleep(InfoSecs); - fclose(fd); /* Close the temp file. */ - scrollok(stdscr, FALSE); /* Stop scrolling. */ - goto cleanup; + sizeof(user_input), NORECALL) < 0) { + HTInfoMsg(NEWS_POST_CANCELLED); + LYCloseTempFP(fd); /* Close the temp file. */ + scrollok(stdscr, FALSE); /* Stop scrolling. */ + goto cleanup; } - } + } fprintf(fd, "\n"); - fclose(fd); /* Close the temp file. */ - scrollok(stdscr, FALSE); /* Stop scrolling. */ + LYCloseTempFP(fd); /* Close the temp file. */ + scrollok(stdscr, FALSE); /* Stop scrolling. */ } + if (!nonempty) { + HTAlert(gettext("Message has no original text!")); + goto cleanup; + } /* * Confirm whether to post, and if so, * whether to append the sig file. - FM */ LYStatusLine = (LYlines - 1); - _statusline(POST_MSG_PROMPT); - c = 0; + c = HTConfirm(POST_MSG_PROMPT); LYStatusLine = -1; - while (TOUPPER(c) != 'Y' && TOUPPER(c) != 'N' && - !term_message && c != 7 && c != 3) - c = LYgetch(); - if (TOUPPER(c) != 'Y') { - clear(); /* clear the screen */ + if (c != YES) { + clear(); /* clear the screen */ goto cleanup; } - if ((LynxSigFile != NULL) && - (fp = fopen(LynxSigFile, "r")) != NULL) { + if ((LynxSigFile != NULL) && (fp = fopen(LynxSigFile, "r")) != NULL) { + char *msg = NULL; + HTSprintf0(&msg, APPEND_SIG_FILE, LynxSigFile); + LYStatusLine = (LYlines - 1); - _user_message(APPEND_SIG_FILE, LynxSigFile); - c = 0; - LYStatusLine = -1; - while (TOUPPER(c) != 'Y' && TOUPPER(c) != 'N' && - !term_message && c != 7 && c != 3) - c = LYgetch(); - if (TOUPPER(c) == 'Y') { - if ((fd = fopen(my_tempfile, "a")) != NULL) { - fputs("-- \n", fd); - while (fgets(user_input, sizeof(user_input), fp) != NULL) { - fputs(user_input, fd); + if (term_message) { + _user_message(APPEND_SIG_FILE, LynxSigFile); + } else if (HTConfirm(msg) == YES) { + if ((fd = LYAppendToTxtFile (my_tempfile)) != NULL) { + char *buffer = NULL; + fputs("-- \n", fd); + while (LYSafeGets(&buffer, fp) != NULL) { + fputs(buffer, fd); } fclose(fd); } } fclose(fp); + FREE(msg); + LYStatusLine = -1; } clear(); /* clear the screen */ @@ -345,21 +407,16 @@ PUBLIC char *LYNewsPost ARGS2( */ if (CJKfile[0] != '\0') { if ((fd = fopen(my_tempfile, "r")) != NULL) { - while (fgets(user_input, sizeof(user_input), fd) != NULL) { - TO_JIS((unsigned char *)user_input, + char *buffer = NULL; + while (LYSafeGets(&buffer, fd) != NULL) { + TO_JIS((unsigned char *)buffer, (unsigned char *)CJKinput); fputs(CJKinput, fc); } - fclose(fc); + LYCloseTempFP(fc); StrAllocCopy(postfile, CJKfile); fclose(fd); -#ifdef VMS - while (remove(my_tempfile) == 0) - ; /* loop through all versions */ -#else - remove(my_tempfile); -#endif /* VMS */ - fd = fc; + LYRemoveTemp(my_tempfile); strcpy(my_tempfile, CJKfile); CJKfile[0] = '\0'; } else { @@ -369,7 +426,7 @@ PUBLIC char *LYNewsPost ARGS2( StrAllocCopy(postfile, my_tempfile); } if (!followup) { - /* + /* * If it's not a followup, the current document * most likely is the group listing, so force a * to have the article show up in the list after @@ -378,12 +435,11 @@ PUBLIC char *LYNewsPost ARGS2( * do a reload manually on returning to the * group listing. - FM */ - LYforce_no_cache = TRUE; + LYforce_no_cache = TRUE; } LYStatusLine = (LYlines - 1); - statusline(POSTING_TO_NEWS); + HTUserMsg(POSTING_TO_NEWS); LYStatusLine = -1; - sleep(MessageSecs); /* * Come here to cleanup and exit. @@ -393,24 +449,11 @@ cleanup: signal(SIGINT, cleanup_sig); #endif /* !VMS */ term_message = FALSE; - if (!postfile) { -#ifdef VMS - while (remove(my_tempfile) == 0) - ; /* loop through all versions */ -#else - remove(my_tempfile); -#endif /* VMS */ - } - if (CJKfile[0] != '\0') { -#ifdef VMS - fclose(fc); - while (remove(CJKfile) == 0) - ; /* loop through all versions */ -#else - remove(CJKfile); -#endif /* VMS */ - } + if (!postfile) + LYRemoveTemp(my_tempfile); + LYRemoveTemp(CJKfile); FREE(NewsGroups); + FREE(References); return(postfile); } @@ -431,3 +474,5 @@ PRIVATE void terminate_message ARGS1( refresh(); #endif /* VMS */ } + +#endif /* not DISABLE_NEWS */ diff --git a/gnu/usr.bin/lynx/src/LYNews.h b/gnu/usr.bin/lynx/src/LYNews.h index 17d9d48adb2..9eaa8e131a7 100644 --- a/gnu/usr.bin/lynx/src/LYNews.h +++ b/gnu/usr.bin/lynx/src/LYNews.h @@ -2,7 +2,7 @@ #define LYNEWSPOST_H #ifndef LYSTRUCTS_H -#include "LYStructs.h" +#include #endif /* LYSTRUCTS_H */ extern BOOLEAN term_message; diff --git a/gnu/usr.bin/lynx/src/LYOptions.c b/gnu/usr.bin/lynx/src/LYOptions.c index c63740a40cc..0884d18a876 100644 --- a/gnu/usr.bin/lynx/src/LYOptions.c +++ b/gnu/usr.bin/lynx/src/LYOptions.c @@ -1,53 +1,108 @@ -#include "HTUtils.h" -#include "tcp.h" -#include "HTFTP.h" -#include "HTML.h" -#include "LYCurses.h" -#include "LYUtils.h" -#include "LYStrings.h" -#include "LYGlobalDefs.h" -#include "LYOptions.h" -#include "LYSignal.h" -#include "LYClean.h" -#include "LYCharSets.h" -#include "LYCharUtils.h" -#include "UCMap.h" -#include "UCAux.h" -#include "LYKeymap.h" -#include "LYrcFile.h" -#include "HTAlert.h" -#include "LYBookmark.h" -#include "GridText.h" - -#include "LYLeaks.h" - -#define FREE(x) if (x) {free(x); x = NULL;} +#include +#include +#include /* 'reloading' flag */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include -#ifdef VMS -#define DISPLAY "DECW$DISPLAY" -#else -#define DISPLAY "DISPLAY" -#endif /* VMS */ +BOOLEAN term_options; +PRIVATE void terminate_options PARAMS((int sig)); + +#if !defined(NO_OPTION_MENU) || defined(NCURSES_MOUSE_VERSION) #define COL_OPTION_VALUES 36 /* display column where option values start */ +#endif -BOOLEAN term_options; -PRIVATE void terminate_options PARAMS((int sig)); +#ifndef NO_OPTION_MENU PRIVATE int boolean_choice PARAMS(( int status, int line, int column, - char ** choices)); -PRIVATE int popup_choice PARAMS(( - int cur_choice, - int line, - int column, - char ** choices, - int i_length, - int disabled)); + char ** choices)); #define MAXCHOICES 10 +/* + * Values for the options menu. - FM + * + * L_foo values are the Y coordinates for the menu item. + * B_foo values are the X coordinates for the item's prompt string. + * C_foo values are the X coordinates for the item's value string. + */ +#define L_EDITOR 2 +#define L_DISPLAY 3 + +#define L_HOME 4 +#define C_MULTI 24 +#define B_BOOK 34 +#define C_DEFAULT 50 + +#define L_FTPSTYPE 5 +#define L_MAIL_ADDRESS 6 +#define L_SSEARCH 7 +#define L_LANGUAGE 8 +#define L_PREF_CHARSET 9 +#define L_ASSUME_CHARSET (L_PREF_CHARSET + 1) +#define L_CHARSET 10 +#define L_RAWMODE 11 + +#define L_COLOR L_RAWMODE +#define B_COLOR 44 +#define C_COLOR 62 + +#define L_BOOL_A 12 +#define B_VIKEYS 5 +#define C_VIKEYS 15 +#define B_EMACSKEYS 22 +#define C_EMACSKEYS 36 +#define B_SHOW_DOTFILES 44 +#define C_SHOW_DOTFILES 62 + +#define L_BOOL_B 13 +#define B_SELECT_POPUPS 5 +#define C_SELECT_POPUPS 36 +#define B_SHOW_CURSOR 44 +#define C_SHOW_CURSOR 62 + +#define L_KEYPAD 14 +#define L_LINEED 15 +#define L_LAYOUT 16 + +#ifdef DIRED_SUPPORT +#define L_DIRED 17 +#define L_USER_MODE 18 +#define L_USER_AGENT 19 +#define L_EXEC 20 +#else +#define L_USER_MODE 17 +#define L_USER_AGENT 18 +#define L_EXEC 19 +#endif /* DIRED_SUPPORT */ + +#define L_VERBOSE_IMAGES L_USER_MODE +#define B_VERBOSE_IMAGES 50 +#define C_VERBOSE_IMAGES (B_VERBOSE_IMAGES + 21) + +/* a kludge to add assume_charset only in ADVANCED mode... */ #define L_Bool_A (use_assume_charset ? L_BOOL_A + 1 : L_BOOL_A) #define L_Bool_B (use_assume_charset ? L_BOOL_B + 1 : L_BOOL_B) #define L_Exec (use_assume_charset ? L_EXEC + 1 : L_EXEC) @@ -56,58 +111,52 @@ PRIVATE int popup_choice PARAMS(( #define L_Color (use_assume_charset ? L_COLOR + 1 : L_COLOR) #define L_Keypad (use_assume_charset ? L_KEYPAD + 1 : L_KEYPAD) #define L_Lineed (use_assume_charset ? L_LINEED + 1 : L_LINEED) +#define L_Layout (use_assume_charset ? L_LAYOUT + 1 : L_LAYOUT) #define L_Dired (use_assume_charset ? L_DIRED + 1 : L_DIRED) #define L_User_Mode (use_assume_charset ? L_USER_MODE + 1 : L_USER_MODE) #define L_User_Agent (use_assume_charset ? L_USER_AGENT + 1 : L_USER_AGENT) -PRIVATE void option_statusline ARGS1( - CONST char *, text) -{ - /* - * Make sure we have a pointer to a string. - */ - if (text == NULL) - return; - - /* - * Don't print statusline messages if dumping to stdout. - */ - if (dump_output_immediately) - return; +#define LPAREN '(' +#define RPAREN ')' - /* - * Use _statusline() set to output on the bottom line. - FM - */ - LYStatusLine = (LYlines - 1); - _statusline(text); - LYStatusLine = -1; +PRIVATE int add_it ARGS2(char *, text, int, len) +{ + if (len) { + text[len] = '\0'; + addstr(text); + } + return 0; } -PRIVATE void option_user_message ARGS2( - CONST char *, message, - char *, argument) +/* + * addlbl() is used instead of plain addstr() in old-style options menu + * to show hot keys in bold. + */ +PRIVATE void addlbl ARGS1(CONST char *, text) { - /* - * Make sure we have a pointer to a string. - */ - if (message == NULL || argument == NULL) - return; - - /* - * Don't print statusline messages if dumping to stdout. - */ - if (dump_output_immediately) - return; - - /* - * Use _user_message() set to output on the bottom line. - */ - LYStatusLine = (LYlines - 1); - _user_message(message, argument); - LYStatusLine = -1; + char actual[80]; + int s, d; + BOOL b = FALSE; + + for (s = d = 0; text[s]; s++) { + actual[d++] = text[s]; + if (text[s] == LPAREN) { + d = add_it(actual, d-1); + start_bold(); + b = TRUE; + actual[d++] = text[s]; + } else if (text[s] == RPAREN) { + d = add_it(actual, d); + stop_bold(); + b = FALSE; + } + } + add_it(actual, d); + if (b) + stop_bold(); } -PUBLIC void options NOARGS +PUBLIC void LYoptions NOARGS { #ifdef ALLOW_USERS_TO_CHANGE_EXEC_WITHIN_OPTIONS int itmp; @@ -117,13 +166,10 @@ PUBLIC void options NOARGS * If the user changes the display we need memory to put it in. */ char display_option[256]; -#ifndef VMS - static char putenv_command[142]; -#endif /* !VMS */ char *choices[MAXCHOICES]; int CurrentCharSet = current_char_set; - int CurrentShowColor = LYShowColor; int CurrentAssumeCharSet = UCLYhndl_for_unspec; + int CurrentShowColor = LYShowColor; BOOLEAN CurrentRawMode = LYRawMode; BOOLEAN AddValueAccepted = FALSE; char *cp = NULL; @@ -144,8 +190,7 @@ PUBLIC void options NOARGS #else #ifdef ALLOW_USERS_TO_CHANGE_EXEC_WITHIN_OPTIONS if (LYlines < 23) { - HTAlert( - "Screen height must be at least 23 lines for the Options menu!"); + HTAlert(OPTION_SCREEN_NEEDS_23); return; } #else @@ -157,6 +202,7 @@ PUBLIC void options NOARGS #endif /* DIRED_SUPPORT */ term_options = FALSE; + LYStatusLine = (LYlines - 1); /* screen is otherwise too crowded */ signal(SIGINT, terminate_options); if (no_option_save) { if (LYShowColor == SHOW_COLOR_NEVER) { @@ -225,58 +271,58 @@ draw_options: addch(')'); lynx_stop_h1_color (); move(L_EDITOR, 5); - addstr("E)ditor : "); + addlbl("(E)ditor : "); addstr((editor && *editor) ? editor : "NONE"); move(L_DISPLAY, 5); - addstr("D)ISPLAY variable : "); - addstr((display && *display) ? display : "NONE"); + addlbl("(D)ISPLAY variable : "); + addstr((x_display && *x_display) ? x_display : "NONE"); move(L_HOME, 5); - addstr("mu(L)ti-bookmarks: "); + addlbl("mu(L)ti-bookmarks: "); addstr((LYMultiBookmarks ? (LYMBMAdvanced ? "ADVANCED" : "STANDARD") : "OFF ")); move(L_HOME, B_BOOK); if (LYMultiBookmarks) { - addstr("review/edit B)ookmarks files"); + addlbl("review/edit (B)ookmarks files"); } else { - addstr("B)ookmark file: "); + addlbl("(B)ookmark file: "); addstr((bookmark_page && *bookmark_page) ? bookmark_page : "NONE"); } move(L_FTPSTYPE, 5); - addstr("F)TP sort criteria : "); + addlbl("(F)TP sort criteria : "); addstr((HTfileSortMethod == FILE_BY_NAME ? "By Filename" : (HTfileSortMethod == FILE_BY_SIZE ? "By Size " : (HTfileSortMethod == FILE_BY_TYPE ? "By Type " : "By Date ")))); move(L_MAIL_ADDRESS, 5); - addstr("P)ersonal mail address : "); + addlbl("(P)ersonal mail address : "); addstr((personal_mail_address && *personal_mail_address) ? personal_mail_address : "NONE"); move(L_SSEARCH, 5); - addstr("S)earching type : "); + addlbl("(S)earching type : "); addstr(case_sensitive ? "CASE SENSITIVE " : "CASE INSENSITIVE"); move(L_Charset, 5); - addstr("display (C)haracter set : "); + addlbl("display (C)haracter set : "); addstr((char *)LYchar_set_names[current_char_set]); move(L_LANGUAGE, 5); - addstr("preferred document lan(G)uage: "); + addlbl("preferred document lan(G)uage: "); addstr((language && *language) ? language : "NONE"); move(L_PREF_CHARSET, 5); - addstr("preferred document c(H)arset : "); + addlbl("preferred document c(H)arset : "); addstr((pref_charset && *pref_charset) ? pref_charset : "NONE"); if (use_assume_charset) { move(L_ASSUME_CHARSET, 5); - addstr("^A)ssume charset if unknown : "); + addlbl("(^A)ssume charset if unknown : "); if (UCAssume_MIMEcharset) addstr(UCAssume_MIMEcharset); else @@ -286,19 +332,19 @@ draw_options: } move(L_Rawmode, 5); - addstr("Raw 8-bit or CJK m(O)de : "); + addlbl("Raw 8-bit or CJK m(O)de : "); addstr(LYRawMode ? "ON " : "OFF"); #if defined(USE_SLANG) || defined(COLOR_CURSES) move(L_Color, B_COLOR); - addstr("show color (&) : "); + addlbl("show color (&) : "); if (no_option_save) { addstr((LYShowColor == SHOW_COLOR_OFF ? "OFF" : "ON ")); } else { switch (LYChosenShowColor) { case SHOW_COLOR_NEVER: - addstr("NEVER "); + addstr("NEVER "); break; case SHOW_COLOR_OFF: addstr("OFF"); @@ -318,27 +364,27 @@ draw_options: #endif /* USE_SLANG || COLOR_CURSES */ move(L_Bool_A, B_VIKEYS); - addstr("V)I keys: "); + addlbl("(V)I keys: "); addstr(vi_keys ? "ON " : "OFF"); move(L_Bool_A, B_EMACSKEYS); - addstr("e(M)acs keys: "); + addlbl("e(M)acs keys: "); addstr(emacs_keys ? "ON " : "OFF"); move(L_Bool_A, B_SHOW_DOTFILES); - addstr("sho(W) dot files: "); + addlbl("sho(W) dot files: "); addstr((!no_dotfiles && show_dotfiles) ? "ON " : "OFF"); move(L_Bool_B, B_SELECT_POPUPS); - addstr("popups for selec(T) fields : "); + addlbl("popups for selec(T) fields : "); addstr(LYSelectPopups ? "ON " : "OFF"); move(L_Bool_B, B_SHOW_CURSOR); - addstr("show cursor (@) : "); + addlbl("show cursor (@) : "); addstr(LYShowCursor ? "ON " : "OFF"); move(L_Keypad, 5); - addstr("K)eypad mode : "); + addlbl("(K)eypad mode : "); addstr((keypad_mode == NUMBERS_AS_ARROWS) ? "Numbers act as arrows " : ((keypad_mode == LINKS_ARE_NUMBERED) ? @@ -346,30 +392,39 @@ draw_options: "Links and form fields are numbered")); move(L_Lineed, 5); - addstr("li(N)e edit style : "); + addlbl("li(N)e edit style : "); addstr(LYLineeditNames[current_lineedit]); +#ifdef EXP_KEYBOARD_LAYOUT + move(L_Layout, 5); + addlbl("Ke(Y)board layout : "); + addstr(LYKbLayoutNames[current_layout]); +#endif + #ifdef DIRED_SUPPORT move(L_Dired, 5); - addstr("l(I)st directory style : "); + addlbl("l(I)st directory style : "); addstr((dir_list_style == FILES_FIRST) ? "Files first " : ((dir_list_style == MIXED_STYLE) ? "Mixed style " : "Directories first")); #endif /* DIRED_SUPPORT */ move(L_User_Mode, 5); - addstr("U)ser mode : "); + addlbl("(U)ser mode : "); addstr( (user_mode == NOVICE_MODE) ? "Novice " : ((user_mode == INTERMEDIATE_MODE) ? "Intermediate" : "Advanced ")); + addlbl(" verbose images (!) : "); + addstr( verbose_img ? "ON " : "OFF" ); + move(L_User_Agent, 5); - addstr("user (A)gent : "); + addlbl("user (A)gent : "); addstr((LYUserAgent && *LYUserAgent) ? LYUserAgent : "NONE"); #ifdef ALLOW_USERS_TO_CHANGE_EXEC_WITHIN_OPTIONS move(L_Exec, 5); - addstr("local e(X)ecution links : "); + addlbl("local e(X)ecution links : "); #ifndef NEVER_ALLOW_REMOTE_EXEC addstr( local_exec ? "ALWAYS ON " : (local_exec_on_local_files ? "FOR LOCAL FILES ONLY" : @@ -407,7 +462,7 @@ draw_options: response != '>' && !term_options && response != 7 && response != 3) { if (AddValueAccepted == TRUE) { - option_statusline(VALUE_ACCEPTED); + _statusline(VALUE_ACCEPTED); AddValueAccepted = FALSE; } move((LYlines - 2), 0); @@ -427,9 +482,9 @@ draw_options: case 'e': /* Change the editor. */ case 'E': if (no_editor) { - option_statusline(EDIT_DISABLED); + _statusline(EDIT_DISABLED); } else if (system_editor ) { - option_statusline(EDITOR_LOCKED); + _statusline(EDITOR_LOCKED); } else { if (editor && *editor) strcpy(display_option, editor); @@ -438,7 +493,7 @@ draw_options: addstr(" "); *display_option = '\0'; } - option_statusline(ACCEPT_DATA); + _statusline(ACCEPT_DATA); move(L_EDITOR, COL_OPTION_VALUES); start_bold(); ch = LYgetstr(display_option, VISIBLE, @@ -457,11 +512,10 @@ draw_options: } clrtoeol(); if (ch == -1) { - option_statusline(CANCELLED); - sleep(InfoSecs); - option_statusline(""); + HTInfoMsg(CANCELLED); + HTInfoMsg(""); } else { - option_statusline(VALUE_ACCEPTED); + _statusline(VALUE_ACCEPTED); } } response = ' '; @@ -469,14 +523,14 @@ draw_options: case 'd': /* Change the display. */ case 'D': - if (display && *display) { - strcpy(display_option, display); + if (x_display && *x_display) { + strcpy(display_option, x_display); } else { /* clear the NONE */ move(L_DISPLAY, COL_OPTION_VALUES); addstr(" "); *display_option = '\0'; } - option_statusline(ACCEPT_DATA); + _statusline(ACCEPT_DATA); move(L_DISPLAY, COL_OPTION_VALUES); start_bold(); ch = LYgetstr(display_option, VISIBLE, @@ -484,38 +538,37 @@ draw_options: stop_bold(); move(L_DISPLAY, COL_OPTION_VALUES); if ((term_options || ch == -1) || - (display != NULL && + (x_display != NULL && #ifdef VMS - !strcasecomp(display, display_option))) + !strcasecomp(x_display, display_option))) #else - !strcmp(display, display_option))) + !strcmp(x_display, display_option))) #endif /* VMS */ { /* * Cancelled, or a non-NULL display string * wasn't changed. - FM */ - addstr((display && *display) ? display : "NONE"); + addstr((x_display && *x_display) ? x_display : "NONE"); clrtoeol(); if (ch == -1) { - option_statusline(CANCELLED); - sleep(InfoSecs); - option_statusline(""); + HTInfoMsg(CANCELLED); + HTInfoMsg(""); } else { - option_statusline(VALUE_ACCEPTED); + _statusline(VALUE_ACCEPTED); } response = ' '; break; } else if (*display_option == '\0') { - if ((display == NULL) || - (display != NULL && *display == '\0')) { + if ((x_display == NULL) || + (x_display != NULL && *x_display == '\0')) { /* * NULL or zero-length display string * wasn't changed. - FM */ addstr("NONE"); clrtoeol(); - option_statusline(VALUE_ACCEPTED); + _statusline(VALUE_ACCEPTED); response = ' '; break; } @@ -523,42 +576,32 @@ draw_options: /* * Set the new DISPLAY variable. - FM */ -#ifdef VMS - { - int i; - for (i = 0; display_option[i]; i++) - display_option[i] = TOUPPER(display_option[i]); - Define_VMSLogical(DISPLAY, display_option); - } -#else - sprintf(putenv_command, "DISPLAY=%s", display_option); - putenv(putenv_command); -#endif /* VMS */ - if ((cp = getenv(DISPLAY)) != NULL && *cp != '\0') { - StrAllocCopy(display, cp); + LYsetXDisplay(display_option); + if ((cp = LYgetXDisplay()) != NULL) { + StrAllocCopy(x_display, cp); } else { - FREE(display); + FREE(x_display); } cp = NULL; - addstr(display ? display : "NONE"); + addstr(x_display ? x_display : "NONE"); clrtoeol(); - if ((display == NULL && *display_option == '\0') || - (display != NULL && - !strcmp(display, display_option))) { - if (display == NULL && + if ((x_display == NULL && *display_option == '\0') || + (x_display != NULL && + !strcmp(x_display, display_option))) { + if (x_display == NULL && LYisConfiguredForX == TRUE) { - option_statusline(VALUE_ACCEPTED_WARNING_X); - } else if (display != NULL && + _statusline(VALUE_ACCEPTED_WARNING_X); + } else if (x_display != NULL && LYisConfiguredForX == FALSE) { - option_statusline(VALUE_ACCEPTED_WARNING_NONX); + _statusline(VALUE_ACCEPTED_WARNING_NONX); } else { - option_statusline(VALUE_ACCEPTED); + _statusline(VALUE_ACCEPTED); } } else { if (*display_option) { - option_statusline(FAILED_TO_SET_DISPLAY); + _statusline(FAILED_TO_SET_DISPLAY); } else { - option_statusline(FAILED_CLEAR_SET_DISPLAY); + _statusline(FAILED_CLEAR_SET_DISPLAY); } } response = ' '; @@ -567,7 +610,7 @@ draw_options: case 'l': /* Change multibookmarks option. */ case 'L': if (LYMBMBlocked) { - option_statusline(MULTIBOOKMARKS_DISALLOWED); + _statusline(MULTIBOOKMARKS_DISALLOWED); response = ' '; break; } @@ -613,9 +656,9 @@ draw_options: move(L_HOME, B_BOOK); clrtoeol(); if (LYMultiBookmarks) { - addstr("review/edit B)ookmarks files"); + addstr(gettext("review/edit B)ookmarks files")); } else { - addstr("B)ookmark file: "); + addstr(gettext("B)ookmark file: ")); addstr((bookmark_page && *bookmark_page) ? bookmark_page : "NONE"); } @@ -654,7 +697,7 @@ draw_options: clrtoeol(); *display_option = '\0'; } - option_statusline(ACCEPT_DATA); + _statusline(ACCEPT_DATA); move(L_HOME, C_DEFAULT); start_bold(); ch = LYgetstr(display_option, VISIBLE, @@ -670,7 +713,7 @@ draw_options: addstr((bookmark_page && *bookmark_page) ? bookmark_page : "NONE"); clrtoeol(); - option_statusline(USE_PATH_OFF_HOME); + _statusline(USE_PATH_OFF_HOME); response = ' '; break; } else { @@ -681,14 +724,13 @@ draw_options: } clrtoeol(); if (ch == -1) { - option_statusline(CANCELLED); - sleep(InfoSecs); - option_statusline(""); + HTInfoMsg(CANCELLED); + HTInfoMsg(""); } else { - option_statusline(VALUE_ACCEPTED); + _statusline(VALUE_ACCEPTED); } } else { /* anonymous */ - option_statusline(BOOKMARK_CHANGE_DISALLOWED); + _statusline(BOOKMARK_CHANGE_DISALLOWED); } response = ' '; break; @@ -750,7 +792,7 @@ draw_options: addstr(" "); *display_option = '\0'; } - option_statusline(ACCEPT_DATA); + _statusline(ACCEPT_DATA); move(L_MAIL_ADDRESS, COL_OPTION_VALUES); start_bold(); ch = LYgetstr(display_option, VISIBLE, @@ -770,16 +812,15 @@ draw_options: } clrtoeol(); if (ch == -1) { - option_statusline(CANCELLED); - sleep(InfoSecs); - option_statusline(""); + HTInfoMsg(CANCELLED); + HTInfoMsg(""); } else { - option_statusline(VALUE_ACCEPTED); + _statusline(VALUE_ACCEPTED); } response = ' '; break; - case 's': /* Change case sentitivity for searches. */ + case 's': /* Change case sensitivity for searches. */ case 'S': /* * Copy strings into choice array. @@ -832,9 +873,9 @@ draw_options: } /* - * Set the raw 8-bit or CJK mode defaults and - * character set if changed. - FM - */ + * Set the raw 8-bit or CJK mode defaults and + * character set if changed. - FM + */ if (CurrentAssumeCharSet != UCLYhndl_for_unspec || UCLYhndl_for_unspec != curval) { if (UCLYhndl_for_unspec != CurrentAssumeCharSet) { @@ -843,7 +884,7 @@ draw_options: } LYRawMode = (UCLYhndl_for_unspec == current_char_set); HTMLSetUseDefaultRawMode(current_char_set, LYRawMode); - HTMLUseCharacterSet(current_char_set); + HTMLSetCharacterHandling(current_char_set); CurrentAssumeCharSet = UCLYhndl_for_unspec; CurrentRawMode = LYRawMode; #if !defined(VMS) && !defined(USE_SLANG) @@ -870,12 +911,12 @@ draw_options: #endif /* !VMS || USE_SLANG */ } } else { - option_statusline(NEED_ADVANCED_USER_MODE); + _statusline(NEED_ADVANCED_USER_MODE); AddValueAccepted = FALSE; } break; - case 'c': /* Change charset setting. */ + case 'c': /* Change display charset setting. */ case 'C': if (!LYSelectPopups) { current_char_set = boolean_choice(current_char_set, @@ -897,7 +938,6 @@ draw_options: * character set if changed. - FM */ if (CurrentCharSet != current_char_set) { - HTMLSetRawModeDefault(current_char_set); LYUseDefaultRawMode = TRUE; HTMLUseCharacterSet(current_char_set); CurrentCharSet = current_char_set; @@ -960,7 +1000,7 @@ draw_options: addstr(" "); *display_option = '\0'; } - option_statusline(ACCEPT_DATA); + _statusline(ACCEPT_DATA); move(L_LANGUAGE, COL_OPTION_VALUES); start_bold(); ch = LYgetstr(display_option, VISIBLE, @@ -979,11 +1019,10 @@ draw_options: } clrtoeol(); if (ch == -1) { - option_statusline(CANCELLED); - sleep(InfoSecs); - option_statusline(""); + HTInfoMsg(CANCELLED); + HTInfoMsg(""); } else { - option_statusline(VALUE_ACCEPTED); + _statusline(VALUE_ACCEPTED); } response = ' '; break; @@ -997,7 +1036,7 @@ draw_options: addstr(" "); *display_option = '\0'; } - option_statusline(ACCEPT_DATA); + _statusline(ACCEPT_DATA); move(L_PREF_CHARSET, COL_OPTION_VALUES); start_bold(); ch = LYgetstr(display_option, VISIBLE, @@ -1016,11 +1055,10 @@ draw_options: } clrtoeol(); if (ch == -1) { - option_statusline(CANCELLED); - sleep(InfoSecs); - option_statusline(""); + HTInfoMsg(CANCELLED); + HTInfoMsg(""); } else { - option_statusline(VALUE_ACCEPTED); + _statusline(VALUE_ACCEPTED); } response = ' '; break; @@ -1074,7 +1112,7 @@ draw_options: case 'W': /* Change show dotfiles setting. */ case 'w': if (no_dotfiles) { - option_statusline(DOTFILE_ACCESS_DISABLED); + _statusline(DOTFILE_ACCESS_DISABLED); } else { /* * Copy strings into choice array. @@ -1120,12 +1158,11 @@ draw_options: if (!has_colors()) { char * terminal = getenv("TERM"); if (terminal) - option_user_message( + HTUserMsg2( COLOR_TOGGLE_DISABLED_FOR_TERM, terminal); else - option_statusline(COLOR_TOGGLE_DISABLED); - sleep(AlertSecs); + HTUserMsg(COLOR_TOGGLE_DISABLED); } #endif /* @@ -1182,12 +1219,11 @@ draw_options: if (again) { char * terminal = getenv("TERM"); if (terminal) - option_user_message( + HTUserMsg2( COLOR_TOGGLE_DISABLED_FOR_TERM, terminal); else - option_statusline(COLOR_TOGGLE_DISABLED); - sleep(AlertSecs); + HTUserMsg(COLOR_TOGGLE_DISABLED); } #endif } while (again); @@ -1334,6 +1370,40 @@ draw_options: } break; +#ifdef EXP_KEYBOARD_LAYOUT + case 'y': /* Change keyboard layout */ + case 'Y': + if (!LYSelectPopups) { + current_layout = boolean_choice(current_layout, + L_Layout, -1, + LYKbLayoutNames); + } else { + current_layout = popup_choice(current_layout, + L_Layout, -1, + LYKbLayoutNames, + 0, FALSE); +#if defined(VMS) || defined(USE_SLANG) + move(L_Layout, COL_OPTION_VALUES); + clrtoeol(); + addstr(LYKbLayoutNames[current_layout]); +#endif /* VMS || USE_SLANG */ + } + response = ' '; + if (LYSelectPopups) { +#if !defined(VMS) || defined(USE_SLANG) + if (term_options) { + term_options = FALSE; + } else { + AddValueAccepted = TRUE; + } + goto draw_options; +#else + term_options = FALSE; +#endif /* !VMS || USE_SLANG */ + } + break; +#endif /* EXP_KEYBOARD_LAYOUT */ + #ifdef DIRED_SUPPORT case 'i': /* Change local directory sorting. */ case 'I': @@ -1437,6 +1507,46 @@ draw_options: } break; + case '!': + /* + * Copy strings into choice array. + */ + choices[0] = NULL; + StrAllocCopy(choices[0], "OFF"); + choices[1] = NULL; + StrAllocCopy(choices[1], "ON "); + choices[2] = NULL; + if (!LYSelectPopups) { + verbose_img = boolean_choice(verbose_img, + L_VERBOSE_IMAGES, + C_VERBOSE_IMAGES, + choices); + } else { + verbose_img = popup_choice(verbose_img, + L_VERBOSE_IMAGES, + C_VERBOSE_IMAGES, + choices, + 2, FALSE); + } + FREE(choices[0]); + FREE(choices[1]); + response = ' '; + if (LYSelectPopups) { +#if !defined(VMS) || defined(USE_SLANG) + if (term_options) { + term_options = FALSE; + } else { + AddValueAccepted = TRUE; + } + goto draw_options; +#else + term_options = FALSE; + if (use_assume_charset != old_use_assume_charset) + goto draw_options; +#endif /* !VMS || USE_SLANG */ + } + break; + case 'a': /* Change user agent string. */ case 'A': if (!no_useragent) { @@ -1447,7 +1557,7 @@ draw_options: addstr(" "); *display_option = '\0'; } - option_statusline(ACCEPT_DATA_OR_DEFAULT); + _statusline(ACCEPT_DATA_OR_DEFAULT); move(L_User_Agent, COL_OPTION_VALUES); start_bold(); ch = LYgetstr(display_option, VISIBLE, @@ -1469,18 +1579,17 @@ draw_options: } clrtoeol(); if (ch == -1) { - option_statusline(CANCELLED); - sleep(InfoSecs); - option_statusline(""); + HTInfoMsg(CANCELLED); + HTInfoMsg(""); } else if (LYUserAgent && *LYUserAgent && !strstr(LYUserAgent, "Lynx") && !strstr(LYUserAgent, "lynx")) { - option_statusline(UA_COPYRIGHT_WARNING); + _statusline(UA_COPYRIGHT_WARNING); } else { - option_statusline(VALUE_ACCEPTED); + _statusline(VALUE_ACCEPTED); } } else { /* disallowed */ - option_statusline(UA_COPYRIGHT_WARNING); + _statusline(UA_COPYRIGHT_WARNING); } response = ' '; break; @@ -1489,7 +1598,7 @@ draw_options: case 'x': /* Change local exec restriction. */ case 'X': if (exec_frozen && !LYSelectPopups) { - option_statusline(CHANGE_OF_SETTING_DISALLOWED); + _statusline(CHANGE_OF_SETTING_DISALLOWED); response = ' '; break; } @@ -1573,15 +1682,15 @@ draw_options: case '>': /* Save current options to RC file. */ if (!no_option_save) { - option_statusline(SAVING_OPTIONS); + _statusline(SAVING_OPTIONS); if (save_rc()) { LYrcShowColor = LYChosenShowColor; - option_statusline(OPTIONS_SAVED); + _statusline(OPTIONS_SAVED); } else { HTAlert(OPTIONS_NOT_SAVED); } } else { - option_statusline(R_TO_RETURN_TO_LYNX); + _statusline(R_TO_RETURN_TO_LYNX); /* * Change response so that we don't exit * the options menu. @@ -1596,14 +1705,15 @@ draw_options: default: if (!no_option_save) { - option_statusline(SAVE_OR_R_TO_RETURN_TO_LYNX); + _statusline(SAVE_OR_R_TO_RETURN_TO_LYNX); } else { - option_statusline(R_TO_RETURN_TO_LYNX); + _statusline(R_TO_RETURN_TO_LYNX); } } /* end switch */ } /* end while */ term_options = FALSE; + LYStatusLine = -1; /* let user_mode have some of the screen */ signal(SIGINT, cleanup_sig); } @@ -1622,9 +1732,6 @@ PRIVATE int boolean_choice ARGS4( int number = 0; int col = (column >= 0 ? column : COL_OPTION_VALUES); int orig_choice = cur_choice; -#ifdef VMS - extern BOOLEAN HadVMSInterrupt; /* Flag from cleanup_sig() AST */ -#endif /* VMS */ /* * Get the number of choices and then make @@ -1637,7 +1744,7 @@ PRIVATE int boolean_choice ARGS4( /* * Update the statusline. */ - option_statusline(ANY_KEY_CHANGE_RET_ACCEPT); + _statusline(ANY_KEY_CHANGE_RET_ACCEPT); /* * Highlight the current choice. @@ -1704,6 +1811,7 @@ PRIVATE int boolean_choice ARGS4( case LYK_UP_HALF: case LYK_UP_TWO: case LYK_PREV_LINK: + case LYK_FASTBACKW_LINK: case LYK_UP_LINK: case LYK_LEFT_LINK: if (cur_choice == 0) @@ -1745,16 +1853,16 @@ PRIVATE int boolean_choice ARGS4( if (term_options) { term_options = FALSE; - option_statusline(CANCELLED); - sleep(InfoSecs); - option_statusline(""); + HTInfoMsg(CANCELLED); + HTInfoMsg(""); } else { - option_statusline(VALUE_ACCEPTED); + _statusline(VALUE_ACCEPTED); } return(cur_choice); } } } +#endif /* !NO_OPTION_MENU */ PRIVATE void terminate_options ARGS1( int, sig GCC_UNUSED) @@ -1823,7 +1931,7 @@ draw_bookmark_list: if (LYlines < (MBM_V_MAXFILES + MULTI_OFFSET)) { for (a = ((MBM_V_MAXFILES/2 + 1) * (MBM_current - 1)); - a <= ((float)MBM_V_MAXFILES/2 * MBM_current); a++) { + a <= (MBM_current * MBM_V_MAXFILES/2 ); a++) { move((3 + a) - ((MBM_V_MAXFILES/2 + 1)*(MBM_current - 1)), 5); addch((unsigned char)(a + 'A')); addstr(" : "); @@ -1913,13 +2021,13 @@ draw_bookmark_list: */ if (response == '>') { if (!no_option_save) { - option_statusline(SAVING_OPTIONS); + _statusline(SAVING_OPTIONS); if (save_rc()) - option_statusline(OPTIONS_SAVED); + _statusline(OPTIONS_SAVED); else HTAlert(OPTIONS_NOT_SAVED); } else { - option_statusline(R_TO_RETURN_TO_LYNX); + _statusline(R_TO_RETURN_TO_LYNX); /* * Change response so that we don't exit * the options menu. @@ -1976,7 +2084,7 @@ draw_bookmark_list: goto draw_bookmark_list; } } - option_statusline(ACCEPT_DATA); + _statusline(ACCEPT_DATA); if (a > 0) { start_bold(); @@ -2061,6 +2169,7 @@ draw_bookmark_list: signal(SIGINT, cleanup_sig); } +#if !defined(NO_OPTION_MENU) || defined(NCURSES_MOUSE_VERSION) /* ** This function prompts for a choice or page number. ** If a 'g' or 'p' suffix is included, that will be @@ -2076,15 +2185,14 @@ PRIVATE int get_popup_choice_number ARGS1( */ temp[0] = *c; temp[1] = '\0'; - option_statusline(OPTION_CHOICE_NUMBER); + _statusline(OPTION_CHOICE_NUMBER); /* * Get the number, possibly with a suffix, from the user. */ if (LYgetstr(temp, VISIBLE, sizeof(temp), NORECALL) < 0 || *temp == 0 || term_options) { - option_statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); *c = '\0'; term_options = FALSE; return(0); @@ -2109,7 +2217,7 @@ PRIVATE int get_popup_choice_number ARGS1( * option via a popup window which functions like * that for selection of options in a form. - FM */ -PRIVATE int popup_choice ARGS6( +PUBLIC int popup_choice ARGS6( int, cur_choice, int, line, int, column, @@ -2124,16 +2232,14 @@ PRIVATE int popup_choice ARGS6( #ifndef USE_SLANG WINDOW * form_window; #endif /* !USE_SLANG */ - int num_choices = 0, top, bottom, length = -1, width = 0; + int num_choices = 0, top, bottom, length = -1; + unsigned width = 0; char ** Cptr = choices; int window_offset = 0; int DisplayLines = (LYlines - 2); char Cnum[64]; int Lnum; int npages; -#ifdef VMS - extern BOOLEAN HadVMSInterrupt; /* Flag from cleanup_sig() AST */ -#endif /* VMS */ static char prev_target[512]; /* Search string buffer */ static char prev_target_buffer[512]; /* Next search buffer */ static BOOL first = TRUE; @@ -2260,7 +2366,7 @@ PRIVATE int popup_choice ARGS6( if (!(form_window = newwin(bottom - top, (Lnum + width + 4), top, (lx - 1))) && !(form_window = newwin(bottom - top, 0, top, 0))) { - option_statusline(POPUP_FAILED); + HTAlert(POPUP_FAILED); return(orig_choice); } scrollok(form_window, TRUE); @@ -2283,9 +2389,9 @@ PRIVATE int popup_choice ARGS6( move((LYlines - 2), 0); clrtoeol(); if (disabled) { - option_statusline(CHOICE_LIST_UNM_MSG); + _statusline(CHOICE_LIST_UNM_MSG); } else { - option_statusline(CHOICE_LIST_MESSAGE); + _statusline(CHOICE_LIST_MESSAGE); } /* @@ -2416,12 +2522,16 @@ redraw: #endif /* USE_SLANG */ term_options = FALSE; - c = LYgetch(); + c = LYgetch_for(FOR_CHOICE); if (term_options || c == 3 || c == 7) { - /* - * Control-C or Control-G - */ cmd = LYK_QUIT; +#ifndef USE_SLANG + } else if (c == MOUSE_KEY) { + if ((cmd = fancy_mouse(form_window, i + 1 + window_offset, &cur_choice)) < 0) + goto redraw; + if (cmd == LYK_ACTIVATE) + break; +#endif } else { cmd = keymap[c+1]; } @@ -2460,21 +2570,20 @@ redraw: */ if (number <= 1) { if (window_offset == 0) { - option_statusline(ALREADY_AT_CHOICE_BEGIN); - sleep(MessageSecs); + HTUserMsg(ALREADY_AT_CHOICE_BEGIN); if (disabled) { - option_statusline(CHOICE_LIST_UNM_MSG); + _statusline(CHOICE_LIST_UNM_MSG); } else { - option_statusline(CHOICE_LIST_MESSAGE); + _statusline(CHOICE_LIST_MESSAGE); } break; } window_offset = 0; cur_choice = 0; if (disabled) { - option_statusline(CHOICE_LIST_UNM_MSG); + _statusline(CHOICE_LIST_UNM_MSG); } else { - option_statusline(CHOICE_LIST_MESSAGE); + _statusline(CHOICE_LIST_MESSAGE); } goto redraw; } @@ -2485,12 +2594,11 @@ redraw: */ if (number >= npages) { if (window_offset >= ((num_choices - length) + 1)) { - option_statusline(ALREADY_AT_CHOICE_END); - sleep(MessageSecs); + HTUserMsg(ALREADY_AT_CHOICE_END); if (disabled) { - option_statusline(CHOICE_LIST_UNM_MSG); + _statusline(CHOICE_LIST_UNM_MSG); } else { - option_statusline(CHOICE_LIST_MESSAGE); + _statusline(CHOICE_LIST_MESSAGE); } break; } @@ -2501,9 +2609,9 @@ redraw: if (cur_choice < window_offset) cur_choice = window_offset; if (disabled) { - option_statusline(CHOICE_LIST_UNM_MSG); + _statusline(CHOICE_LIST_UNM_MSG); } else { - option_statusline(CHOICE_LIST_MESSAGE); + _statusline(CHOICE_LIST_MESSAGE); } goto redraw; } @@ -2513,20 +2621,19 @@ redraw: */ if (((number - 1) * length) == window_offset) { sprintf(buffer, ALREADY_AT_CHOICE_PAGE, number); - option_statusline(buffer); - sleep(MessageSecs); + HTUserMsg(buffer); if (disabled) { - option_statusline(CHOICE_LIST_UNM_MSG); + _statusline(CHOICE_LIST_UNM_MSG); } else { - option_statusline(CHOICE_LIST_MESSAGE); + _statusline(CHOICE_LIST_MESSAGE); } break; } cur_choice = window_offset = ((number - 1) * length); if (disabled) { - option_statusline(CHOICE_LIST_UNM_MSG); + _statusline(CHOICE_LIST_UNM_MSG); } else { - option_statusline(CHOICE_LIST_MESSAGE); + _statusline(CHOICE_LIST_MESSAGE); } goto redraw; @@ -2564,12 +2671,11 @@ redraw: */ sprintf(buffer, CHOICE_ALREADY_CURRENT, (number + 1)); - option_statusline(buffer); - sleep(MessageSecs); + HTUserMsg(buffer); if (disabled) { - option_statusline(CHOICE_LIST_UNM_MSG); + _statusline(CHOICE_LIST_UNM_MSG); } else { - option_statusline(CHOICE_LIST_MESSAGE); + _statusline(CHOICE_LIST_MESSAGE); } break; } @@ -2593,9 +2699,9 @@ redraw: window_offset = 0; } if (disabled) { - option_statusline(CHOICE_LIST_UNM_MSG); + _statusline(CHOICE_LIST_UNM_MSG); } else { - option_statusline(CHOICE_LIST_MESSAGE); + _statusline(CHOICE_LIST_MESSAGE); } goto redraw; } @@ -2603,8 +2709,7 @@ redraw: /* * Not in range. - FM */ - option_statusline(BAD_CHOICE_NUM_ENTERED); - sleep(MessageSecs); + HTUserMsg(BAD_CHOICE_NUM_ENTERED); } } @@ -2612,9 +2717,9 @@ redraw: * Restore the popup statusline. - FM */ if (disabled) { - option_statusline(CHOICE_LIST_UNM_MSG); + _statusline(CHOICE_LIST_UNM_MSG); } else { - option_statusline(CHOICE_LIST_MESSAGE); + _statusline(CHOICE_LIST_MESSAGE); } break; @@ -2832,15 +2937,14 @@ redraw: strcpy(prev_target, prev_target_buffer); case LYK_WHEREIS: if (*prev_target == '\0' ) { - option_statusline(ENTER_WHEREIS_QUERY); + _statusline(ENTER_WHEREIS_QUERY); if ((ch = LYgetstr(prev_target, VISIBLE, sizeof(prev_target_buffer), recall)) < 0) { /* * User cancelled the search via ^G. - FM */ - option_statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); goto restore_popup_statusline; } } @@ -2851,8 +2955,7 @@ check_recall: /* * No entry. Simply break. - FM */ - option_statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); goto restore_popup_statusline; } @@ -2892,21 +2995,20 @@ check_recall: strcpy(prev_target, cp); if (*prev_target_buffer && !strcmp(prev_target_buffer, prev_target)) { - option_statusline(EDIT_CURRENT_QUERY); + _statusline(EDIT_CURRENT_QUERY); } else if ((*prev_target_buffer && QueryTotal == 2) || (!(*prev_target_buffer) && QueryTotal == 1)) { - option_statusline(EDIT_THE_PREV_QUERY); + _statusline(EDIT_THE_PREV_QUERY); } else { - option_statusline(EDIT_A_PREV_QUERY); + _statusline(EDIT_A_PREV_QUERY); } if ((ch = LYgetstr(prev_target, VISIBLE, sizeof(prev_target_buffer), recall)) < 0) { /* * User cancelled the search via ^G. - FM */ - option_statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); goto restore_popup_statusline; } goto check_recall; @@ -2947,14 +3049,14 @@ check_recall: strcpy(prev_target, cp); if (*prev_target_buffer && !strcmp(prev_target_buffer, prev_target)) { - option_statusline(EDIT_CURRENT_QUERY); + _statusline(EDIT_CURRENT_QUERY); } else if ((*prev_target_buffer && QueryTotal == 2) || (!(*prev_target_buffer) && QueryTotal == 1)) { - option_statusline(EDIT_THE_PREV_QUERY); + _statusline(EDIT_THE_PREV_QUERY); } else { - option_statusline(EDIT_A_PREV_QUERY); + _statusline(EDIT_A_PREV_QUERY); } if ((ch = LYgetstr(prev_target, VISIBLE, sizeof(prev_target_buffer), @@ -2962,8 +3064,7 @@ check_recall: /* * User cancelled the search via ^G. - FM */ - option_statusline(CANCELLED); - sleep(InfoSecs); + HTInfoMsg(CANCELLED); goto restore_popup_statusline; } goto check_recall; @@ -3013,8 +3114,7 @@ check_recall: * If we started at the beginning, it can't be present. - FM */ if (cur_choice == 0) { - option_user_message(STRING_NOT_FOUND, prev_target_buffer); - sleep(MessageSecs); + HTUserMsg2(STRING_NOT_FOUND, prev_target_buffer); goto restore_popup_statusline; } @@ -3056,8 +3156,7 @@ check_recall: /* * Didn't find it in the preceding choices either. - FM */ - option_user_message(STRING_NOT_FOUND, prev_target_buffer); - sleep(MessageSecs); + HTUserMsg2(STRING_NOT_FOUND, prev_target_buffer); restore_popup_statusline: /* @@ -3065,9 +3164,9 @@ restore_popup_statusline: * reset the search variables. - FM */ if (disabled) - option_statusline(CHOICE_LIST_UNM_MSG); + _statusline(CHOICE_LIST_UNM_MSG); else - option_statusline(CHOICE_LIST_MESSAGE); + _statusline(CHOICE_LIST_MESSAGE); *prev_target = '\0'; QueryTotal = (search_queries ? HTList_count(search_queries) : 0); @@ -3084,8 +3183,7 @@ restore_popup_statusline: case LYK_PREV_DOC: cur_choice = orig_choice; term_options = TRUE; - option_statusline(CANCELLED); - sleep(MessageSecs); + HTUserMsg(CANCELLED); cmd = LYK_ACTIVATE; /* to exit */ break; } @@ -3098,10 +3196,1302 @@ restore_popup_statusline: #endif /* !USE_SLANG */ if (disabled || term_options) { - option_statusline(""); + _statusline(""); return(orig_choice); } else { - option_statusline(VALUE_ACCEPTED); + _statusline(VALUE_ACCEPTED); return(cur_choice); } } + +#endif /* !NO_OPTION_MENU */ + +#ifndef NO_OPTION_FORMS + +/* + * I'm paranoid about mistyping strings. Also, this way they get combined + * so we don't have to worry about the intelligence of the compiler. + * We don't need to burn memory like it's cheap. We're better than that. + */ +#define SELECTED(flag) (flag) ? selected_string : "" +#define DISABLED(flag) (flag) ? disabled_string : "" +#define NOTEMPTY(text) (text && text[0]) ? text : "" + +typedef struct { + int value; + CONST char *LongName; + CONST char *HtmlName; +} OptValues; + +typedef struct { + char * tag; + char * value; +} PostPair; + +static CONST char selected_string[] = "selected"; +static CONST char disabled_string[] = "disabled"; +static CONST char on_string[] = "ON"; +static CONST char off_string[] = "OFF"; +static CONST char never_string[] = "NEVER"; +static CONST char always_string[] = "ALWAYS"; +static OptValues bool_values[] = { + { FALSE, "OFF", "OFF" }, + { TRUE, "ON", "ON" }, + { 0, 0, 0 }}; + +static char * secure_string = "secure"; +static char * secure_value = NULL; +static char * save_options_string = "save_options"; + +/* + * Personal Preferences + */ +static char * cookies_string = "cookies"; +static char * cookies_ignore_all_string = "ignore"; +static char * cookies_up_to_user_string = "ask user"; +static char * cookies_accept_all_string = "accept all"; +static char * x_display_string = "display"; +static char * editor_string = "editor"; +static char * emacs_keys_string = "emacs_keys"; + +#ifdef ALLOW_USERS_TO_CHANGE_EXEC_WITHIN_OPTIONS +#define EXEC_ALWAYS 2 +#define EXEC_LOCAL 1 +#define EXEC_NEVER 0 +static char * exec_links_string = "exec_options"; +static OptValues exec_links_values[] = { + { EXEC_NEVER, "ALWAYS OFF", "ALWAYS OFF" }, + { EXEC_LOCAL, "FOR LOCAL FILES ONLY", "FOR LOCAL FILES ONLY" }, +#ifndef NEVER_ALLOW_REMOTE_EXEC + { EXEC_ALWAYS, "ALWAYS ON", "ALWAYS ON" }, +#endif + { 0, 0, 0 }}; +#endif /* ALLOW_USERS_TO_CHANGE_EXEC_WITHIN_OPTIONS */ + +#ifdef EXP_KEYBOARD_LAYOUT +static char * kblayout_string = "kblayout"; +#endif +static char * keypad_mode_string = "keypad_mode"; +static OptValues keypad_mode_values[] = { + { NUMBERS_AS_ARROWS, "Numbers act as arrows", "number_arrows" }, + { LINKS_ARE_NUMBERED, "Links are numbered", "links_numbered" }, + { LINKS_AND_FORM_FIELDS_ARE_NUMBERED, + "Links and form fields are numbered", + "links_and_forms" }, + { 0, 0, 0 }}; +static char * lineedit_style_string = "lineedit_style"; +static char * mail_address_string = "mail_address"; +static char * search_type_string = "search_type"; +static OptValues search_type_values[] = { + { FALSE, "Case insensitive", "case_insensitive" }, + { TRUE, "Case sensitive", "case_sensitive" }, + { 0, 0, 0 }}; +#if defined(USE_SLANG) || defined(COLOR_CURSES) +static char * show_color_string = "show_color"; +static OptValues show_color_values[] = { + { SHOW_COLOR_NEVER, never_string, never_string }, + { SHOW_COLOR_OFF, off_string, off_string }, + { SHOW_COLOR_ON, on_string, on_string }, + { SHOW_COLOR_ALWAYS, always_string, always_string }, + { 0, 0, 0 }}; +#endif +static char * show_cursor_string = "show_cursor"; +static char * user_mode_string = "user_mode"; +static OptValues user_mode_values[] = { + { NOVICE_MODE, "Novice", "Novice" }, + { INTERMEDIATE_MODE, "Intermediate", "Intermediate" }, + { ADVANCED_MODE, "Advanced", "Advanced" }, + { 0, 0, 0 }}; +static char * vi_keys_string = "vi_keys"; + +/* + * Document Layout + */ +static char * DTD_recovery_string = "DTD"; +static OptValues DTD_type_values[] = { + /* Old_DTD variable */ + { TRUE, "relaxed (TagSoup mode)", "tagsoup" }, + { FALSE, "strict (SortaSGML mode)", "sortasgml" }, + { 0, 0, 0 }}; +static char * select_popups_string = "select_popups"; +static char * images_string = "images"; +static char * images_ignore_all_string = "ignore"; +static char * images_use_label_string = "as labels"; +static char * images_use_links_string = "as links"; +static char * verbose_images_string = "verbose_images"; +static OptValues verbose_images_type_values[] = { + /* verbose_img variable */ + { FALSE, "OFF", "OFF" }, + { TRUE, "show filename", "ON" }, + { 0, 0, 0 }}; + +/* + * Bookmark Options + */ +static char * mbm_advanced_string = "ADVANCED"; +static char * mbm_off_string = "OFF"; +static char * mbm_standard_string = "STANDARD"; +static char * mbm_string = "multi_bookmarks_mode"; +static char * single_bookmark_string = "single_bookmark_name"; + +/* + * Character Set Options + */ +static char * assume_char_set_string = "assume_char_set"; +static char * display_char_set_string = "display_char_set"; +static char * raw_mode_string = "raw_mode"; + +/* + * File Management Options + */ +static char * show_dotfiles_string = "show_dotfiles"; +#ifdef DIRED_SUPPORT +static char * dired_sort_string = "dired_sort"; +static OptValues dired_values[] = { + { 0, "Directories first", "dired_dir" }, + { FILES_FIRST, "Files first", "dired_files" }, + { MIXED_STYLE, "Mixed style", "dired_mixed" }, + { 0, 0, 0 }}; +#endif /* DIRED_SUPPORT */ +static char * ftp_sort_string = "ftp_sort"; +static OptValues ftp_sort_values[] = { + { FILE_BY_NAME, "By Name", "ftp_by_name" }, + { FILE_BY_TYPE, "By Type", "ftp_by_type" }, + { FILE_BY_SIZE, "By Size", "ftp_by_size" }, + { FILE_BY_DATE, "By Date", "ftp_by_date" }, + { 0, 0, 0 }}; + +/* + * Headers transferred to remote server + */ +static char * preferred_doc_char_string = "preferred_doc_char"; +static char * preferred_doc_lang_string = "preferred_doc_lang"; +static char * user_agent_string = "user_agent"; + +#define PutLabel(fp, text) \ + fprintf(fp," %-33s: ", text) + +#define PutTextInput(fp, Name, Value, Size, disable) \ + fprintf(fp,\ + "\n",\ + (int) Size, Name, Value, disable) + +#define PutOption(fp, flag, html, name) \ + fprintf(fp,"