lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev bug in pre.4 (patch)


From: Leonid Pauzner
Subject: lynx-dev bug in pre.4 (patch)
Date: Thu, 13 Apr 2000 14:24:18 +0400 (MSD)

>> On Tue, 11 Apr 100, T.E.Dickey wrote:
>> > I haven't seen any interesting bug reports against the pre.* series,

Oops, I am very very sorry but my recent changes really buggy

2000-03-26 (2.8.3dev.23)
* add Last-Modified header into the printed/downloaded source, in addition to
  the Date header (it is there for years).  (Last-Modified field will not be
  printed if it is not present, or equal to 1 Jan 1970 (i.e., ctime(0)),
  a common mistake in scripts) -LP



That was untested patch. (It introduce a wrong condition
and occusionally coredumps in localtime()...
so I made a comparison against constant text string for sure):


* fix printing of Last-Modified field in downloaded/printed source.


diff -u old/changes ./changes
--- old/changes Fri Apr  7 12:12:12 2000
+++ ./changes   Thu Apr 13 14:14:14 2000
@@ -97,8 +97,8 @@
   the same name during a session.  Define EXP_NAME_TEMPNAME in userdefs.h -TD
 * add Last-Modified header into the printed/downloaded source, in addition to
   the Date header (it is there for years).  (Last-Modified field will not be
-  printed if it is not present, or equal to 1 Jan 1970 (i.e., ctime(0)),
-  a common mistake in scripts) -LP
+  printed if it is not present, or equal to the Date header or equal to
+  "Thu, 01 Jan 1970 00:00:01 GMT", a common mistake in scripts) -LP
 * defined DIRED_SUPPORT in makefile.msc -TD
 * several small fixes in LYLocal.c for dired support, mostly win32-specific -TD
 * modify PDCurses mouse logic to use BUTTON_PRESSED mask rather than
diff -u old/htfwrite.c ./htfwrite.c
--- old/htfwrite.c      Fri Mar 31 16:33:40 2000
+++ ./htfwrite.c        Thu Apr 13 14:01:44 2000
@@ -891,8 +891,8 @@
            fprintf(ret_obj->fp,
                "<!-- Date: %s -->\n", anchor->date);
            if (anchor->last_modified && *anchor->last_modified
-                       && !strcmp(anchor->last_modified, anchor->date)
-                       && !strcmp(anchor->last_modified, ctime((time_t)0))) {
+                       && strcmp(anchor->last_modified, anchor->date)
+                       && strcmp(anchor->last_modified, "Thu, 01 Jan 1970 
00:00:01 GMT")) {
                fprintf(ret_obj->fp,
                    "<!-- Last-Modified: %s -->\n", anchor->last_modified);
            }
diff -u old/lyprint.c ./lyprint.c
--- old/lyprint.c       Sun Mar 26 19:14:00 2000
+++ ./lyprint.c Thu Apr 13 14:02:28 2000
@@ -406,8 +406,8 @@
            fprintf(outfile_fp,
                "<!-- Date: %s -->\n", HText_getDate());
            if (HText_getLastModified() != NULL
-                       && !strcmp(HText_getLastModified(), HText_getDate())
-                       && !strcmp(HText_getLastModified(), ctime((time_t)0))) {
+                       && strcmp(HText_getLastModified(), HText_getDate())
+                       && strcmp(HText_getLastModified(), "Thu, 01 Jan 1970 
00:00:01 GMT")) {
                fprintf(outfile_fp,
                    "<!-- Last-Modified: %s -->\n", HText_getLastModified());
            }
Only in .: mccmeonl.cap
Only in .: old
Only in .: status.me
Only in .: terminat.cap
Only in .: time



reply via email to

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