lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev How about this?


From: brian j pardy
Subject: Re: lynx-dev How about this?
Date: Tue, 21 Dec 1999 18:51:45 -0500

On Sun, Dec 19, 1999, Klaus Weide wrote:
> 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);
>      }

Mix and match from LV, KW, and my first patch.

This is tested.  If I screwed up again, it's time for me to take some
time off until after Christmas, my brain obviously isn't working.

(I'm still continuing to dig into -source/-post_data/-head/-dump (any
I'm missing?), probably not until after dev.18 -- things are getting
hectic now.)

diff -ru 2.8.3dev.17/src/LYMain.c 2.8.3dev.17.bri/src/LYMain.c
--- 2.8.3dev.17/src/LYMain.c    Wed Dec 15 18:22:16 1999
+++ 2.8.3dev.17.bri/src/LYMain.c        Tue Dec 21 18:48:44 1999
@@ -1605,28 +1605,29 @@
        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 (dump_output_immediately) {
-       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);
-           }
+    if (LYCookieSaveFile == NULL) {
+       if (dump_output_immediately) {
+               StrAllocCopy(LYCookieSaveFile, "/dev/null");
        } else {
-           StrAllocCopy(LYCookieSaveFile, "/dev/null");
-       }
-    } else {
-       if (LYCookieSaveFile == NULL) {
-           StrAllocCopy(LYCookieSaveFile, LYCookieFile);
+               StrAllocCopy(LYCookieSaveFile, LYCookieFile);
        }
     }
 #endif

-- 
Can't open /usr/games/lib/fortunes.dat.

reply via email to

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