diff options
-rw-r--r-- | CHANGES | 10 | ||||
-rw-r--r-- | WWW/Library/Implementation/SGML.c | 17 | ||||
-rw-r--r-- | lynx.cfg | 11 | ||||
-rw-r--r-- | lynx.hlp | 4 | ||||
-rw-r--r-- | lynx.man | 7 | ||||
-rw-r--r-- | makefile.in | 26 | ||||
-rwxr-xr-x | scripts/install-cfg.sh | 6 | ||||
-rwxr-xr-x | scripts/man2hlp.sh | 9 | ||||
-rw-r--r-- | src/LYGlobalDefs.h | 8 | ||||
-rw-r--r-- | src/LYMain.c | 9 | ||||
-rw-r--r-- | src/LYReadCFG.c | 5 | ||||
-rw-r--r-- | src/LYrcFile.h | 3 |
12 files changed, 86 insertions, 29 deletions
diff --git a/CHANGES b/CHANGES index b75c4a0d..e9d0f885 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,17 @@ --- $LynxId: CHANGES,v 1.296 2008/09/07 17:00:23 tom Exp $ +-- $LynxId: CHANGES,v 1.299 2008/09/10 14:03:11 tom Exp $ =============================================================================== Changes since Lynx 2.8 release =============================================================================== 2008-0?-?? (2.8.7dev.10) +* fixes for srcdir!=objdir (report by FLWM) -TD +* modify man2hlp.sh to work from subdirectory, e.g., its parameter would be + "../lynx.man" -TD +* set POSIX locale for install-cfg.sh and man2hlp.sh since they use character + ranges -TD +* add switch -xhtml-parsing and lynx.cfg XHTML_PARSING setting to control + whether the extensions for XHTML 1.0 are used (prompted by bug report by + FLWM, as well as discussion on lynx-dev) -TD * modify external editing of TEXTAREA to not do tab-conversion -TD * modify LYhighlight() to limit display of multicolumn characters -TD * rewrite LYRefreshEdit(), to display multibyte/multicolumn characters properly diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c index 6b3863d0..51e7895b 100644 --- a/WWW/Library/Implementation/SGML.c +++ b/WWW/Library/Implementation/SGML.c @@ -1,5 +1,5 @@ /* - * $LynxId: SGML.c,v 1.110 2008/09/06 14:44:04 tom Exp $ + * $LynxId: SGML.c,v 1.114 2008/09/10 12:56:58 tom Exp $ * * General SGML Parser code SGML.c * ======================== @@ -1534,7 +1534,10 @@ static BOOL ignore_when_empty(HTTag * tag) { BOOL result = FALSE; - if (tag->name != 0 + if (!LYPreparsedSource + && LYxhtml_parsing + && tag->name != 0 + && !(tag->flags & Tgf_mafse) && tag->contents != SGML_EMPTY && tag->tagclass != Tgc_Plike && (tag->tagclass == Tgc_SELECTlike @@ -1549,15 +1552,14 @@ static BOOL ignore_when_empty(HTTag * tag) static void discard_empty(HTStream *context) { + static HTTag empty_tag; + CTRACE((tfp, "SGML discarding empty %s\n", NonNull(context->current_tag->name))); CTRACE_FLUSH(tfp); - /* disable start_element() */ - context->current_tag->name = 0; - - /* these may be redundant: */ - context->current_tag->contents = SGML_EMPTY; + memset(&empty_tag, 0, sizeof(empty_tag)); + context->current_tag = &empty_tag; context->string->size = 0; /* do not call end_element() if start_element() was not called */ @@ -3854,7 +3856,6 @@ static void SGML_character(HTStream *context, char c_in) HTChunkTerminate(string); #ifdef USE_PRETTYSRC if (psrc_view) { - /*PSRCSTART(attrval); */ if (attr_is_name) { HTStartAnchor(context->target, string->data, NULL); (*context->actions->end_element) (context->target, diff --git a/lynx.cfg b/lynx.cfg index 3fc28235..3d01501a 100644 --- a/lynx.cfg +++ b/lynx.cfg @@ -1,4 +1,4 @@ -# $LynxId: lynx.cfg,v 1.161 2008/07/04 15:15:35 Philip.Webb Exp $ +# $LynxId: lynx.cfg,v 1.162 2008/09/10 12:16:54 tom Exp $ # lynx.cfg file. # The default placement for this file is /usr/local/lib/lynx.cfg (Unix) # or Lynx_Dir:lynx.cfg (VMS) @@ -3315,6 +3315,15 @@ COLOR:6:brightred:black # #HIDDEN_LINK_MARKER: +.h2 XHTML_PARSING +# XHTML_PARSING - HTML parsing +# When true, tells lynx that it can ignore certain tags which have no content +# in an XHTML 1.0 document. For example +# <p /> +# <a /> +# When the option is false, lynx will not treat the tag as an ending. +#XHTML_PARSING:FALSE + .h1 Appearance .h2 JUSTIFY diff --git a/lynx.hlp b/lynx.hlp index e645c6d4..6cf93f5b 100644 --- a/lynx.hlp +++ b/lynx.hlp @@ -723,6 +723,10 @@ emit backspaces in output if -dump'ing or -crawl'ing (like `man' does) + -xhtml_parsing + tells lynx that it can ignore certain tags which have no content + in an XHTML 1.0 document. For example "<p/>" will be discarded. + 2 Commands o Use Up arrow and Down arrow to scroll through hypertext links. diff --git a/lynx.man b/lynx.man index 430261d4..424dc4ad 100644 --- a/lynx.man +++ b/lynx.man @@ -1,4 +1,4 @@ -.\" $LynxId: lynx.man,v 1.80 2008/02/17 19:14:40 Paul.B.Mahol Exp $ +.\" $LynxId: lynx.man,v 1.81 2008/09/10 13:09:54 tom Exp $ .nr N -1 .nr D 5 .TH LYNX 1 @@ -842,6 +842,11 @@ number of columns for formatting of dumps, default is 80. .TP .B \-with_backspaces emit backspaces in output if \fB\-dump\fR'ing or \fB\-crawl\fR'ing (like 'man' does) +.TP +.B \-xhtml_parsing +tells lynx that it can ignore certain tags which have no content +in an XHTML 1.0 document. +For example "<p/>" will be discarded. .SH COMMANDS .TP 3 .B o diff --git a/makefile.in b/makefile.in index 95889259..9bb21d26 100644 --- a/makefile.in +++ b/makefile.in @@ -1,4 +1,4 @@ -# $LynxId: makefile.in,v 1.99 2008/07/19 10:45:44 tom Exp $ +# $LynxId: makefile.in,v 1.100 2008/09/10 13:53:35 tom Exp $ ##makefile for lynx SHELL = @CONFIG_SHELL@ @@ -10,6 +10,7 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ top_srcdir = @top_srcdir@ srcdir = @srcdir@ +builddir = . VPATH = $(srcdir) CC = @CC@ @@ -61,29 +62,30 @@ sysconfdir= @sysconfdir@ SYSCONFDIR= $(DESTDIR)$(sysconfdir) ## Where you want the doc-files installed -docdir= @datadir@/lynx_doc -DOCDIR= $(DESTDIR)$(docdir) +docdir = @datadir@/lynx_doc +DOCDIR = $(DESTDIR)$(docdir) ## Where you want the help-files installed -helpdir= @datadir@/lynx_help -HELPDIR= $(DESTDIR)$(helpdir) +helpdir = @datadir@/lynx_help +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!!! -WWW_DIR= $(srcdir)/WWW/Library/Implementation +WWW_DIR = $(builddir)/WWW/Library/Implementation ##set the relative location of the message-file directory ##do not set this to be an absolute path!!! -PO_DIR= $(srcdir)/po +PO_DIR = $(builddir)/po +PO_SRCDIR = $(srcdir)/po ##set the relative location of the main source-directory ##do not set this to be an absolute path!!! -SRC_DIR= $(srcdir)/src +SRC_DIR = $(builddir)/src ##set the relative location of the character-translation data directory ##do not set this to be an absolute path!!! -CHR_DIR= $(SRC_DIR)/chrtrans +CHR_DIR = $(SRC_DIR)/chrtrans ## Path to gzip that will compress the help files. ## It will be used when --enable-gzip-help is set by configure. @@ -396,7 +398,7 @@ install-help : help_files.sed $(HELPDIR) chmod 644 $(SYSCONFDIR)/lynx.cfg -rm -f $(SYSCONFDIR)/lynx.tmp -LYHelp.h : help_files.sed LYHelp.hin +LYHelp.h : help_files.sed $(srcdir)/LYHelp.hin @echo Creating $@ @sed -f help_files.sed $(srcdir)/LYHelp.hin > $@ @echo '**********************************************' @@ -438,8 +440,8 @@ uninstall-doc :: -test -d $(HELPDIR) && WD=`cd $(HELPDIR) && pwd` && HEAD=`echo $$WD|sed -e 's!/lynx_help$$!!'` && test $$WD != $$HEAD && cd $(HELPDIR) && rm -f COPYING COPYHEADER update-po: - rsync -Lrtvz translationproject.org::tp/latest/lynx/ $(PO_DIR) - test -f $(PO_DIR)/makefile && cd $(PO_DIR) && $(MAKE_RECUR) $@ + rsync -Lrtvz translationproject.org::tp/latest/lynx/ $(PO_SRCDIR) + test -f $(PO_SRCDIR)/makefile && cd $(PO_SRCDIR) && $(MAKE_RECUR) $@ $(BINDIR) \ $(MANDIR) \ diff --git a/scripts/install-cfg.sh b/scripts/install-cfg.sh index 5780e5c2..bd8129f6 100755 --- a/scripts/install-cfg.sh +++ b/scripts/install-cfg.sh @@ -1,4 +1,5 @@ #!/bin/sh +# $LynxId: install-cfg.sh,v 1.3 2008/09/10 13:15:35 tom Exp $ # install lynx.cfg, ensuring the old config-file is saved to a unique file, # and prepending customizations to the newly-installed file. # @@ -9,6 +10,11 @@ PRG="$1" SRC=$2 DST=$3 +LANG=C; export LANG +LC_ALL=C; export LC_ALL +LC_CTYPE=C; export LC_CTYPE +LANGUAGE=C; export LANGUAGE + if test -f "$DST" ; then echo "** checking if you have customized $DST" OLD=lynx-cfg.old diff --git a/scripts/man2hlp.sh b/scripts/man2hlp.sh index d522bc57..fed9b428 100755 --- a/scripts/man2hlp.sh +++ b/scripts/man2hlp.sh @@ -1,11 +1,18 @@ #!/bin/sh +# $LynxId: man2hlp.sh,v 1.3 2008/09/10 13:25:45 tom Exp $ # This script uses rman (Rosetta Man), which complements TkMan, to strip # nroff headers from a manpage file, and format the result into a VMS help # file. + +LANG=C; export LANG +LC_ALL=C; export LC_ALL +LC_CTYPE=C; export LC_CTYPE +LANGUAGE=C; export LANGUAGE + for name in $* do NAME=`echo $name |sed -e 's/\.man$/.1/'` - (echo 1 `echo $NAME | sed -e 's/\..*$//' | tr '[a-z]' '[A-Z]'` ; \ + (echo 1 `echo $NAME | sed -e 's/^.*\///' -e 's/\..*$//' | tr '[a-z]' '[A-Z]'` ; \ (echo '.hy 0'; cat $name) |\ nroff -Tascii -man |\ rman -n$NAME |\ diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h index c2ea05d2..87d9428f 100644 --- a/src/LYGlobalDefs.h +++ b/src/LYGlobalDefs.h @@ -1,5 +1,8 @@ -/* $LynxId: LYGlobalDefs.h,v 1.109 2008/03/18 00:38:10 Paul.B.Mahol Exp $ */ -/* global variable definitions */ +/* + * $LynxId: LYGlobalDefs.h,v 1.110 2008/09/10 11:56:53 tom Exp $ + * + * global variable definitions + */ #ifndef LYGLOBALDEFS_H #define LYGLOBALDEFS_H @@ -211,6 +214,7 @@ extern "C" { extern BOOLEAN LYoverride_no_cache; /* don't need fresh copy, from history */ extern BOOLEAN LYresubmit_posts; extern BOOLEAN LYtrimInputFields; + extern BOOLEAN LYxhtml_parsing; extern BOOLEAN bold_H1; extern BOOLEAN bold_headers; extern BOOLEAN bold_name_anchors; diff --git a/src/LYMain.c b/src/LYMain.c index a6e88023..b0cf33d9 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -1,4 +1,6 @@ -/* $LynxId: LYMain.c,v 1.184 2008/07/02 21:26:25 Paul.B.Mahol Exp $ */ +/* + * $LynxId: LYMain.c,v 1.185 2008/09/10 11:58:28 tom Exp $ + */ #include <HTUtils.h> #include <HTTP.h> #include <HTParse.h> @@ -191,6 +193,7 @@ BOOLEAN LYinternal_flag = FALSE; /* override no-cache b/c internal link */ BOOLEAN LYoverride_no_cache = FALSE; /*override no-cache b/c history etc */ BOOLEAN LYresubmit_posts = ALWAYS_RESUBMIT_POSTS; BOOLEAN LYtrimInputFields = FALSE; +BOOLEAN LYxhtml_parsing = FALSE; BOOLEAN bold_H1 = FALSE; BOOLEAN bold_headers = FALSE; BOOLEAN bold_name_anchors = FALSE; @@ -3987,6 +3990,10 @@ with filenames of these images" "emit backspaces in output if -dumping or -crawling\n(like 'man' does)" ), #endif + PARSE_SET( + "xhtml-parsing", 4|SET_ARG, LYxhtml_parsing, + "enable XHTML 1.0 parsing" + ), PARSE_NIL }; /* *INDENT-ON* */ diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c index 4096feed..718344fd 100644 --- a/src/LYReadCFG.c +++ b/src/LYReadCFG.c @@ -1,4 +1,6 @@ -/* $LynxId: LYReadCFG.c,v 1.128 2008/03/18 00:38:10 Paul.B.Mahol Exp $ */ +/* + * $LynxId: LYReadCFG.c,v 1.129 2008/09/10 12:06:23 tom Exp $ + */ #ifndef NO_RULES #include <HTRules.h> #else @@ -1601,6 +1603,7 @@ static Config_Type Config_Table [] = PARSE_FUN(RC_VIEWER, viewer_fun), PARSE_Env(RC_WAIS_PROXY, 0), PARSE_STR(RC_XLOADIMAGE_COMMAND, XLoadImageCommand), + PARSE_SET(RC_XHTML_PARSING, LYxhtml_parsing), PARSE_PRG(RC_ZCAT_PATH, ppZCAT), PARSE_PRG(RC_ZIP_PATH, ppZIP), diff --git a/src/LYrcFile.h b/src/LYrcFile.h index e446642f..26504d88 100644 --- a/src/LYrcFile.h +++ b/src/LYrcFile.h @@ -1,5 +1,5 @@ /* - * $LynxId: LYrcFile.h,v 1.25 2008/03/18 00:38:10 Paul.B.Mahol Exp $ + * $LynxId: LYrcFile.h,v 1.26 2008/09/10 12:05:26 tom Exp $ */ #ifndef LYRCFILE_H #define LYRCFILE_H @@ -254,6 +254,7 @@ #define RC_VI_KEYS_ALWAYS_ON "vi_keys_always_on" #define RC_WAIS_PROXY "wais_proxy" #define RC_XLOADIMAGE_COMMAND "xloadimage_command" +#define RC_XHTML_PARSING "xhtml_parsing" #define RC_ZCAT_PATH "zcat_path" #define RC_ZIP_PATH "zip_path" |