home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / alt / gopher / 1062 < prev    next >
Encoding:
Text File  |  1992-07-23  |  4.3 KB  |  149 lines

  1. Newsgroups: alt.gopher
  2. Path: sparky!uunet!usc!cs.utexas.edu!uwm.edu!psuvax1!news.cc.swarthmore.edu!hirai
  3. From: hirai@cc.swarthmore.edu (Eiji Hirai)
  4. Subject: unofficial Unix gopher 1.01 patch (Re: Is Less Really More?)
  5. Message-ID: <VM6MBNXW@cc.swarthmore.edu>
  6. Sender: news@cc.swarthmore.edu (USENET News System)
  7. Nntp-Posting-Host: gingko
  8. Organization: Swarthmore College Computing Center, Swarthmore, PA, USA
  9. References: <9207221743.AA00366@mirc00.ncms.org>
  10. Date: Thu, 23 Jul 1992 21:34:31 GMT
  11. Lines: 136
  12.  
  13. chrisl@mirc00.ncms.org (Chris Lang) writes:
  14. > However, while that will fix 'less' for use with Gopher, I second the
  15. > suggestion of adding a GOPHER_PAGER variable, particularly since I don't
  16. > want to leave 'r' and 'f' in my global LESS variable.
  17.  
  18. Here's the patch.  I hope Paul will incorporate it in the next release.
  19.  
  20. Here's the precedence:
  21. (1) use the "Pagercmd: " setting in ~/.gopherrc
  22. (2) use the GOPHER_PAGER environment variable
  23. (3) use the PAGER environment variable
  24. (4) use the compiled-in PAGER_COMMAND setting from conf.h.
  25.  
  26. I reordered the precedence in gopher.c so that .gopherrc takes precedence
  27. over environment variables - this now makes more logical sense.
  28.  
  29. --
  30. Eiji Hirai <hirai@cc.swarthmore.edu>    :     :    :   :  : :: ::: :::: :::::
  31. Unix Hacker for Swarthmore College      :     :    :   :  : :: ::: :::: :::::
  32. Computing Center, Swarthmore, PA, USA.  Copyright 1992 by Eiji Hirai.
  33. I don't speak for Swarthmore College.   All Rights Reserved.
  34.  
  35.  
  36. *** gopher.c.old    Mon Jun 22 12:17:30 1992
  37. --- gopher.c    Thu Jul 23 17:12:21 1992
  38. ***************
  39. *** 599,606 ****
  40.        /** get defaults from the rc file **/
  41.   
  42.        set_defs();
  43. -      read_rc();
  44.        read_env();
  45.   
  46.   
  47.        /*** Set up the curses environment ***/
  48. --- 600,607 ----
  49.        /** get defaults from the rc file **/
  50.   
  51.        set_defs();
  52.        read_env();
  53. +      read_rc();
  54.   
  55.   
  56.        /*** Set up the curses environment ***/
  57. *** gopherrc.c.old    Thu Jun 11 20:19:41 1992
  58. --- gopherrc.c    Thu Jul 23 17:25:09 1992
  59. ***************
  60. *** 62,67 ****
  61. --- 62,70 ----
  62.              
  63.              GDsetTitle(BookmarkDir, "Bookmarks");
  64.         }
  65. +       else if (strncasecmp(inputline, "Pagercmd: ", 10) == 0) {
  66. +            STRset(PagerCommand, inputline + 10);
  67. +       }
  68.         else if (strncasecmp(inputline, "Printercmd: ", 12) == 0) {
  69.              STRset(PrinterCommand, inputline + 12);
  70.         }
  71. ***************
  72. *** 89,94 ****
  73. --- 92,98 ----
  74.   void
  75.   set_defs()
  76.   {
  77. +      STRset(PagerCommand, PAGER_COMMAND);
  78.        STRset(MailCommand, MAIL_COMMAND);
  79.        STRset(PrinterCommand, PRINTER_COMMAND);
  80.        STRset(TelnetCommand, TELNET_COMMAND);
  81. ***************
  82. *** 103,111 ****
  83.   {
  84.        /** Get the pager command **/
  85.        
  86. !      if (getenv("PAGER") == NULL)
  87. !       STRset(PagerCommand, PAGER_COMMAND);
  88. !      else
  89.         STRset(PagerCommand, getenv("PAGER"));
  90.   
  91.        if (getenv("EDITOR") == NULL)
  92. --- 107,115 ----
  93.   {
  94.        /** Get the pager command **/
  95.        
  96. !      if (getenv("GOPHER_PAGER") != NULL)
  97. !       STRset(PagerCommand, getenv("GOPHER_PAGER"));
  98. !      else if (getenv("PAGER") != NULL)
  99.         STRset(PagerCommand, getenv("PAGER"));
  100.   
  101.        if (getenv("EDITOR") == NULL)
  102. ***************
  103. *** 174,180 ****
  104.         return;    
  105.        }
  106.   
  107. !      writestring(rcfile, "Printercmd: ");
  108.        writestring(rcfile, STRget(PrinterCommand));
  109.        writestring(rcfile, "\nTelnetcmd: ");
  110.        writestring(rcfile, STRget(TelnetCommand));
  111. --- 178,186 ----
  112.         return;    
  113.        }
  114.   
  115. !      writestring(rcfile, "Pagercmd: ");
  116. !      writestring(rcfile, STRget(PagerCommand));
  117. !      writestring(rcfile, "\nPrintercmd: ");
  118.        writestring(rcfile, STRget(PrinterCommand));
  119.        writestring(rcfile, "\nTelnetcmd: ");
  120.        writestring(rcfile, STRget(TelnetCommand));
  121. ***************
  122. *** 192,197 ****
  123. --- 198,204 ----
  124.         GDtoLink(BookmarkDir, rcfile);
  125.        }
  126.   
  127. +      writestring (rcfile, "\n");
  128.        close(rcfile);
  129.   }
  130. *** gopher.hlp.old    Thu May 21 11:04:44 1992
  131. --- gopher.hlp    Thu Jul 23 17:42:15 1992
  132. ***************
  133. *** 28,34 ****
  134.   q : Quit with prompt
  135.   Q : Quit unconditionally.
  136.   = : Display Technical information about current item.
  137. ! o : change options
  138.   
  139.   
  140.   The Gopher development team hopes that you find this software useful.
  141. --- 28,34 ----
  142.   q : Quit with prompt
  143.   Q : Quit unconditionally.
  144.   = : Display Technical information about current item.
  145. ! O : change options
  146.   
  147.   
  148.   The Gopher development team hopes that you find this software useful.
  149.