lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev How about this?


From: Larry W. Virden
Subject: lynx-dev How about this?
Date: Sun, 19 Dec 1999 20:40:07 -0500 (EST)

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
***************
*** 1605,1633 ****
        LYLoadCookies(LYCookieFile);
      }
  
      /*
       * 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);
!           }
!       } else {
            StrAllocCopy(LYCookieSaveFile, "/dev/null");
-       }
      } else {
!       if (LYCookieSaveFile == NULL) {
!           StrAllocCopy(LYCookieSaveFile, LYCookieFile);
!       }
      }
  #endif
  
--- 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
  
-- 
Larry W. Virden <URL:mailto:address@hidden><http://www.usenix.org/events/tcl2k/>
<URL: http://www.purl.org/NET/lvirden/> <*> O- 
Unless explicitly stated to the contrary, nothing in this posting should 
be construed as representing my employer's opinions.
-><-

reply via email to

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