[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev Lynx Litter on VMS
From: |
brian j. pardy |
Subject: |
Re: lynx-dev Lynx Litter on VMS |
Date: |
Tue, 13 Oct 1998 22:19:14 -0700 |
address@hidden wrote:
>
> RE: Lynx2.8.1pre6 with persistant cookies
>
> On VMS (all versions) the cookie save file is creating a new version on every
> exit from lynx, not a fatal problem but definitely untidy. .lynxrc and
> lynx_bookmarks.html are handled correctly. (ie only one version, created if
> necessary)
>
> So after a short while users will have....
> LYNX_COOKIES.DAT;27 LYNX_COOKIES.DAT;26 LYNX_COOKIES.DAT;25
> LYNX_COOKIES.DAT;24 LYNX_COOKIES.DAT;23 LYNX_COOKIES.DAT;22
> LYNX_COOKIES.DAT;21 LYNX_COOKIES.DAT;20
[...]
Hmm.
I really can't test this, but could you give this patch a try? I used a
slightly modified copy of what we do for the .lynxrc file. Assuming
cookie_file is set properly by the other VMS stuff I did that I wasn't
sure would work right (which I guess it is), this seems like it'll work
to me.
diff -cr 2.8.1pre.9/src/LYCookie.c 2.8.1pre.9.bri/src/LYCookie.c
*** 2.8.1pre.9/src/LYCookie.c Tue Oct 13 22:14:36 1998
--- 2.8.1pre.9.bri/src/LYCookie.c Tue Oct 13 22:13:29 1998
***************
*** 1975,1980 ****
--- 1975,1981 ----
cookie *co;
FILE *cookie_handle;
#ifdef VMS
+ char *VMScookie_file;
extern BOOLEAN HadVMSInterrupt;
#endif /* VMS */
time_t now = time(NULL); /* system specific? - RP */
***************
*** 2030,2035 ****
--- 2031,2054 ----
}
}
fclose(cookie_handle);
+
+ #ifdef VMS
+ /*
+ * Get rid of any copies of the cookie file that VMS creates.
+ */
+
+ StrAllocCopy(VMScookie_file, cookie_file);
+ StrAllocCat(VMScookie_file, ";-1");
+
+ while (remove(VMScookie_file) == 0) ;
+ /*
+ * Reset version number.
+ */
+ StrAllocCopy(VMScookie_file, cookie_file);
+ StrAllocCat(VMScookie_file, ";1");
+ rename(cookie_file, VMScookie_file);
+ #endif /* VMS */
+
}
#endif
--
Computers are useless. They can only give you answers.
-- Pablo Picasso