aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1999-05-24 19:10:08 -0400
committerThomas E. Dickey <dickey@invisible-island.net>1999-05-24 19:10:08 -0400
commit46aabf47e7a5156ccee95d9ed587de6a71e4c603 (patch)
treeadcf859049fd4f8820ae55f074e0e4c4b120001f
parent479f8d01393c541fede1688676f860bb49d44668 (diff)
downloadlynx-snapshots-46aabf47e7a5156ccee95d9ed587de6a71e4c603.tar.gz
snapshot of project "lynx", label v2-8-2pre_6
-rw-r--r--CHANGES26
-rw-r--r--WWW/Library/Implementation/HTFile.c9
-rw-r--r--WWW/Library/Implementation/HTParse.c2
-rw-r--r--WWW/Library/Implementation/HTTCP.c2
-rw-r--r--WWW/Library/Implementation/HTTP.c2
-rw-r--r--WWW/Library/Implementation/SGML.c4
-rw-r--r--docs/CHANGES2.82
-rw-r--r--lynx_help/Lynx_users_guide.html20
-rw-r--r--lynx_help/about_lynx.html4
-rw-r--r--makefile.in14
-rw-r--r--src/GridText.c21
-rw-r--r--src/GridText.h2
-rw-r--r--src/HTAlert.c14
-rw-r--r--src/HTFWriter.c2
-rw-r--r--src/LYCgi.c1
-rw-r--r--src/LYCharSets.c2
-rw-r--r--src/LYCharSets.h2
-rw-r--r--src/LYCurses.c7
-rw-r--r--src/LYMainLoop.c50
-rw-r--r--userdefs.h4
20 files changed, 129 insertions, 61 deletions
diff --git a/CHANGES b/CHANGES
index 7c24486a..c5eadb6d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,32 @@
Changes since Lynx 2.8 release
===============================================================================
+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 -LP
+* correct a few mismatches between variable declarations (char vs BOOLEAN) -LP
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
diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c
index 18efcc9e..f0b294e7 100644
--- a/WWW/Library/Implementation/HTFile.c
+++ b/WWW/Library/Implementation/HTFile.c
@@ -1910,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);
/*
@@ -1918,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
diff --git a/WWW/Library/Implementation/HTParse.c b/WWW/Library/Implementation/HTParse.c
index 2b13b791..9e75b8db 100644
--- a/WWW/Library/Implementation/HTParse.c
+++ b/WWW/Library/Implementation/HTParse.c
@@ -432,7 +432,7 @@ PUBLIC char * HTParse ARGS3(
strcat(result, (given.anchor) ?
given.anchor : related.anchor);
}
- CTRACE(tfp, "HTParse: result:%s\n", result);
+ CTRACE(tfp, "HTParse: result:%s\n", result);
FREE(rel);
FREE(name);
diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c
index 3dade594..1a6b2621 100644
--- a/WWW/Library/Implementation/HTTCP.c
+++ b/WWW/Library/Implementation/HTTCP.c
@@ -687,6 +687,8 @@ PUBLIC struct hostent * LYGetHostByName ARGS1(
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
diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c
index be91586e..96067a51 100644
--- a/WWW/Library/Implementation/HTTP.c
+++ b/WWW/Library/Implementation/HTTP.c
@@ -56,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 */
diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c
index b219ad0b..4ce8dabb 100644
--- a/WWW/Library/Implementation/SGML.c
+++ b/WWW/Library/Implementation/SGML.c
@@ -747,7 +747,7 @@ PRIVATE void handle_identifier ARGS1(
{
CONST char *s = context->string->data;
- CTRACE(tfp, "SGML Identifier\n<%s>\n", s);
+ CTRACE(tfp, "SGML Identifier:\n<%s>\n", s);
return;
}
@@ -761,7 +761,7 @@ PRIVATE void handle_doctype ARGS1(
{
CONST char *s = context->string->data;
- CTRACE(tfp, "SGML Doctype\n<%s>\n", s);
+ CTRACE(tfp, "SGML Doctype:\n<%s>\n", s);
return;
}
diff --git a/docs/CHANGES2.8 b/docs/CHANGES2.8
index df62faff..42b0ecf3 100644
--- a/docs/CHANGES2.8
+++ b/docs/CHANGES2.8
@@ -912,7 +912,7 @@ from the lynx code. I think the following patch does this.
* 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
diff --git a/lynx_help/Lynx_users_guide.html b/lynx_help/Lynx_users_guide.html
index dcac79ba..c0299455 100644
--- a/lynx_help/Lynx_users_guide.html
+++ b/lynx_help/Lynx_users_guide.html
@@ -2521,16 +2521,16 @@ implemented by Lou Montulli and maintained by Garrett Arch Blythe and
Craig Lavender.
<p><em>Foteos Macrides</em> and members of the
-<a href="lynx-dev.html">lynx-dev</a> 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.
+<a href="lynx-dev.html">lynx-dev</a>
+list have developed and supported Lynx since release of v2.3 in May 1994.<br>
+The Lynx2-3FM code set was released as v2.4 in June 1995.<br>
+The Lynx2-4FM code set was released as v2.5 in May 1996.<br>
+The Lynx2-5FM code set was released as v2.6 in September 1996.<br>
+The Lynx2-6FM code set was released as v2.7 in February 1997.<br>
+The v2-7FM code set was released as v2.7.1 in April 1997.<br>
+The v2-7-1FM code set was released as v2.7.2 in January 1998.<br>
+The 2.7.1 development set was released as v2.8 in March 1998.<br>
+The 2.8 development set was released as v2.8.1 in October 1998.<br>
<p>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/lynx_help/about_lynx.html b/lynx_help/about_lynx.html
index e59cf9d3..053ec674 100644
--- a/lynx_help/about_lynx.html
+++ b/lynx_help/about_lynx.html
@@ -49,9 +49,9 @@ Internet community coordinated via the
<A HREF="#lynx-dev_list"><EM>lynx-dev mailing list</EM></A>.
<P>Lynx is copyrighted by the University of Kansas and is distributed
-<A HREF="ftp://ftp2.cc.ukans.edu/pub/lynx/lynx2-8/lynx2-8/COPYHEADER"
+<A HREF="COPYHEADER"
>without restrictions on usage or redistribution</A>
-under the <A HREF="http://www.gnu.org/copyleft/gpl.html">GNU
+under the <A HREF="COPYING">GNU
General Public License</A>.
<P>Lynx was built over an early version of the Common Code Library
diff --git a/makefile.in b/makefile.in
index 3742c604..c0fb9767 100644
--- a/makefile.in
+++ b/makefile.in
@@ -23,6 +23,7 @@ LIBS = @LIBS@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
+LN_S = @LN_S@
## 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.
@@ -321,7 +322,7 @@ install-doc : $(docdir)
FIX_SED = tr '=' '%'
#FIX_SED = cat
-install-help : $(helpdir)
+install-help : $(docdir) $(helpdir)
(cd $(helpdir) && rm -rf *)
@echo Constructing sed-script
@ECHO_CC@sed -e '/^#/d' -e '/^$$/d' \
@@ -368,13 +369,18 @@ install-help : $(helpdir)
$(libdir)/lynx.tmp >$(libdir)/lynx.cfg
chmod 644 $(libdir)/lynx.cfg
-rm -f $(libdir)/lynx.tmp
+ $(INSTALL_DATA) COPYHEADER $(docdir)/COPYHEADER
+ $(INSTALL_DATA) 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%\(.*\)=\(.*\@.*\)$$%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
diff --git a/src/GridText.c b/src/GridText.c
index 3ce36bb3..b0e3238b 100644
--- a/src/GridText.c
+++ b/src/GridText.c
@@ -6195,7 +6195,9 @@ PUBLIC BOOLEAN HTreparse_document NOARGS
format = HTFileFormat(HTMainText->source_cache_file, NULL, NULL);
format = HTCharsetFormat(format, HTMainText->node_anchor,
UCLYhndl_for_unspec);
- /* not UCLYhndl_HTFile_for_unspec - we are talking about remote documents... */
+ /* not UCLYhndl_HTFile_for_unspec - we are talking about remote
+ * documents...
+ */
}
CTRACE(tfp, " Content type is \"%s\"\n", format->name);
@@ -6242,6 +6244,18 @@ PUBLIC BOOLEAN HTreparse_document NOARGS
(void *)HTMainText->source_cache_chunk);
/*
+ * This is only done to make things aligned with SOURCE_CACHE_NONE and
+ * SOURCE_CACHE_FILE when switching to source mode since the original
+ * document's charset will be LYPushAssumed() and then LYPopAssumed().
+ * See LYK_SOURCE in mainloop if you change something here. No
+ * user-visible benefits, seems just '=' Info Page will show source's
+ * effective charset as "(assumed)".
+ */
+ format = HTCharsetFormat(format, HTMainText->node_anchor,
+ UCLYhndl_for_unspec);
+ /* not UCLYhndl_HTFile_for_unspec - we are talking about remote documents... */
+
+ /*
* Pass the source cache HTChunk on to the next HText. Clear it
* here so that it won't get deleted by HText_free().
*/
@@ -10752,3 +10766,8 @@ PUBLIC void HTMark_asSource NOARGS
HTMainText->source = TRUE;
}
#endif
+
+PUBLIC int HTMainText_Get_UCLYhndl NOARGS
+{
+ return (HTMainText ? HTMainText->node_anchor->UCStages->s[0].C.UChndl : 0);
+}
diff --git a/src/GridText.h b/src/GridText.h
index a25ed496..f82dd2d2 100644
--- a/src/GridText.h
+++ b/src/GridText.h
@@ -283,4 +283,6 @@ extern void redraw_lines_of_link PARAMS((int cur));
extern void HTMark_asSource NOPARAMS;
#endif
+extern int HTMainText_Get_UCLYhndl NOPARAMS;
+
#endif /* LYGRIDTEXT_H */
diff --git a/src/HTAlert.c b/src/HTAlert.c
index 205dc82c..d16b2665 100644
--- a/src/HTAlert.c
+++ b/src/HTAlert.c
@@ -111,8 +111,8 @@ PUBLIC void HTProgress ARGS1(
CONST char *, Msg)
{
statusline(Msg);
- LYstore_message(Msg);
- CTRACE(tfp, "%s\n", Msg);
+ LYstore_message(Msg);
+ CTRACE(tfp, "%s\n", Msg);
}
/* Issue a read-progress message. HTReadProgress()
@@ -178,12 +178,10 @@ PUBLIC void HTReadProgress ARGS2(
if (total < -1)
strcat(line, gettext(" (Press 'z' to abort)"));
}
-
- /* do not store the message for history page. */
- if (TRACE)
- fprintf(tfp, "%s\n", line);
- else
- statusline(line);
+
+ /* do not store the message for history page. */
+ statusline(line);
+ CTRACE(tfp, "%s\n", line);
}
}
}
diff --git a/src/HTFWriter.c b/src/HTFWriter.c
index 60b710f6..28a4d1b5 100644
--- a/src/HTFWriter.c
+++ b/src/HTFWriter.c
@@ -31,7 +31,7 @@
PUBLIC char * WWW_Download_File=NULL; /* contains the name of the temp file
** which is being downloaded into
*/
-PUBLIC char LYCancelDownload=FALSE; /* exported to HTFormat.c in libWWW */
+PUBLIC BOOLEAN LYCancelDownload=FALSE; /* exported to HTFormat.c in libWWW */
#ifdef VMS
PRIVATE char * FIXED_RECORD_COMMAND = NULL;
diff --git a/src/LYCgi.c b/src/LYCgi.c
index a28725bb..9e0bfce0 100644
--- a/src/LYCgi.c
+++ b/src/LYCgi.c
@@ -380,6 +380,7 @@ PRIVATE int LYLoadCGI ARGS4(
}
fflush(stdout);
fflush(stderr);
+ CTRACE_FLUSH(tfp);
if ((pid = fork()) > 0) { /* The good, */
int chars, total_chars;
diff --git a/src/LYCharSets.c b/src/LYCharSets.c
index 837f4d9a..e58cc37e 100644
--- a/src/LYCharSets.c
+++ b/src/LYCharSets.c
@@ -21,6 +21,8 @@ extern HTCJKlang HTCJK;
PUBLIC HTkcode kanji_code = NOKANJI;
PUBLIC BOOLEAN LYHaveCJKCharacterSet = FALSE;
PUBLIC BOOLEAN DisplayCharsetMatchLocale = TRUE;
+PUBLIC BOOL force_old_UCLYhndl_on_reload;
+PUBLIC int forced_UCLYhdnl;
extern void UCInit NOARGS;
extern int UCInitialized;
PUBLIC int LYNumCharsets = 0; /* Will be initialized later by UC_Register. */
diff --git a/src/LYCharSets.h b/src/LYCharSets.h
index 5d35ee40..1f21db0f 100644
--- a/src/LYCharSets.h
+++ b/src/LYCharSets.h
@@ -49,4 +49,6 @@ extern CONST char * HTMLGetEntityName PARAMS((UCode_t code));
*/
+extern BOOL force_old_UCLYhndl_on_reload;
+extern int forced_UCLYhdnl;
#endif /* LYCHARSETS_H */
diff --git a/src/LYCurses.c b/src/LYCurses.c
index a8a8c641..c6c08a2e 100644
--- a/src/LYCurses.c
+++ b/src/LYCurses.c
@@ -657,6 +657,7 @@ PUBLIC void start_curses NOARGS
sock_init();
LYCursesON = TRUE;
+ CTRACE(tfp, "start_curses: done.\n");
clear();
noecho();
}
@@ -670,8 +671,10 @@ 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();
@@ -871,6 +874,7 @@ PUBLIC void start_curses NOARGS
#endif
LYCursesON = TRUE;
+ CTRACE(tfp, "start_curses: done.\n");
}
@@ -960,6 +964,7 @@ PUBLIC void stop_curses NOARGS
fflush(stderr);
LYCursesON = FALSE;
+ CTRACE(tfp, "stop_curses: done.\n");
#if defined(SIGTSTP) && defined(USE_SLANG)
#ifndef VMS
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index 385dd714..1ddee54e 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -1231,10 +1231,6 @@ try_again:
*/
curdoc.line = -1;
- /*
- * I have no idea what this does, but it seems to be necessary... -dsb
- */
- LYUCPopAssumed();
}
#endif
@@ -1861,46 +1857,46 @@ new_cmd: /*
break;
}
-
-#ifndef USE_PSRC
- if (HTisDocumentSource()) {
- HTOutputFormat = WWW_PRESENT;
- } else {
- if (HText_getOwner())
- StrAllocCopy(ownerS_address, HText_getOwner());
- LYUCPushAssumed(HTMainAnchor);
- HTOutputFormat = WWW_SOURCE;
- }
-#else
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
+ }
+
#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;
+ /*
+ * 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;
+ if (psrc_view)
+ HTMark_asSource();
+ psrc_view = FALSE;
#endif
- break;
+ 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;
@@ -1922,6 +1918,8 @@ new_cmd: /*
*/
if (HTisDocumentSource()) {
+ force_old_UCLYhndl_on_reload = TRUE;
+ forced_UCLYhdnl = HTMainText_Get_UCLYhndl();
#ifndef USE_PSRC
HTOutputFormat = WWW_SOURCE;
#else
diff --git a/userdefs.h b/userdefs.h
index 76dd4a7c..8cd51748 100644
--- a/userdefs.h
+++ b/userdefs.h
@@ -1244,12 +1244,12 @@
* the version definition with the Project Version on checkout. Just
* ignore it. - kw */
/* $Format: "#define LYNX_VERSION \"$ProjectVersion$\""$ */
-#define LYNX_VERSION "2.8.2pre.5"
+#define LYNX_VERSION "2.8.2pre.6"
#define LYNX_WWW_HOME "http://lynx.browser.org/"
#define LYNX_WWW_DIST "http://www.slcc.edu/lynx/current/"
#define LYNX_RELEASE FALSE
/* $Format: "#define LYNX_DATE \"$ProjectDate$\""$ */
-#define LYNX_DATE "Thu, 20 May 1999 06:48:10 -0600"
+#define LYNX_DATE "Mon, 24 May 1999 13:00:53 -0600"
#define LYNX_DATE_OFF 5 /* truncate the automatically-generated date */
#define LYNX_DATE_LEN 11 /* truncate the automatically-generated date */
#define LYNX_RELEASE_DATE "1998"