[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev How about this?
From: |
Klaus Weide |
Subject: |
Re: lynx-dev How about this? |
Date: |
Sun, 19 Dec 1999 19:53:21 -0600 (CST) |
On Sun, 19 Dec 1999, Larry W. Virden wrote:
> Taking the patch and KW's comments , this is what I tried - what do you think?
> *** LYMain.c.orig Wed Dec 15 06:03:18 1999
> --- LYMain.c Sun Dec 19 20:36:22 1999
[ snipped dev.17 version ]
> --- 1605,1632 ----
> LYLoadCookies(LYCookieFile);
> }
>
> + /* tilde-expand LYCookieSaveFile */
> + if (LYCookieSaveFile != NULL) {
> + if (LYCookieSaveFile[0] == '~' && LYCookieSaveFile[1] == '/' &&
> + LYCookieSaveFile[2] != '\0') {
> + temp = NULL;
> + StrAllocCopy(temp, LYCookieSaveFile + 2);
> + StrAllocCopy(LYCookieSaveFile, wwwName(Home_Dir()));
> + LYAddPathSep(&LYCookieSaveFile);
> + StrAllocCat(LYCookieSaveFile, temp);
> + FREE(temp);
> + }
> + }
> +
> /*
> * In dump_output_immediately mode, LYCookieSaveFile defaults to
> * /dev/null, otherwise it defaults to LYCookieFile.
> */
> ! if (LYCookieSaveFile != NULL) {
> ! if(dump_output_immediately)
> StrAllocCopy(LYCookieSaveFile, "/dev/null");
> } else {
> ! StrAllocCopy(LYCookieSaveFile, LYCookieFile);
> }
> #endif
The last part (after the comment) should look more like this:
if (LYCookieSaveFile == NULL) {
if(dump_output_immediately)
StrAllocCopy(LYCookieSaveFile, "/dev/null");
else
StrAllocCopy(LYCookieSaveFile, LYCookieFile);
}
(still untested)
Klaus