lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev PATCH [dev21]: source caching, take 2


From: Leonid Pauzner
Subject: Re: lynx-dev PATCH [dev21]: source caching, take 2
Date: Mon, 12 Apr 1999 14:15:21 +0400 (MSD)

12-Apr-99 11:34 I wrote:

> 2) when SOURCE_CACHE:FILE and I run into the document with DOS/WINDOWS
>    end-of-line (cr/lf) style, the cached source has the same line endings
>    (at least with DJGPP when html files opened in a text mode)
>    and when I press "\" I saw the source with additional blank lines
>    between the actual source lines (in a nornal case lynx handle this
>    on an early stage). Seems due to opening temp files via LYUtils.c
>    functions. Don't know a workaround yet, this seems affect only
>    DOS/WINDOWS platforms and can be done laterly.

Here the fix of this problem, hope it will not add more problems for UNIX/VMS
platforms. This patch against your "take 2" version
and affect the code #ifdef'ed with SOURCE_CACHE,
the comment is self-explanatory.


diff -u old/html.c ./html.c
--- old/html.c  Mon Apr 12 13:41:22 1999
+++ ./html.c    Mon Apr 12 13:47:28 1999
@@ -7416,7 +7416,13 @@
            return target;
        }

-       if (!(stream->fp = LYOpenTemp(filename, HTML_SUFFIX, "w"))) {
+       /*
+        * Note: LYOpenTemp with "b" mode is a hack: should be "w" since
+        * the file is essentially a text but let will not fall into the
+        * compatibility problems with non-UNIX end-of-line styles,
+        * so save data verbatim.
+        */
+       if (!(stream->fp = LYOpenTemp(filename, HTML_SUFFIX, "b"))) {
            CTRACE(tfp, "Cannot get source cache file for URL %s\n",
                   HTAnchor_address((HTAnchor *)anchor));
            FREE(stream);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]