home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume1 / rn / patch23 < prev    next >
Encoding:
Text File  |  1986-11-30  |  2.8 KB  |  104 lines

  1. System: rn version 4.3
  2. Patch #: 23
  3. Priority: HIGH for sites without line buffering
  4. Subject: the NOLINEBUF option doesn't work
  5. >From: msb@lsuc.UUCP (Mark Brader)
  6.  
  7. Description:
  8.     Rn has a hidden feature such that if you define NOLINEBUF it is
  9.     supposed to do its own buffering, so that a system call isn't
  10.     made on every character of output.  Unfortunately, the feature
  11.     was never tested, and had two glaring errors right at the start.
  12.     The buffer for stdout was declared as auto rather than static,
  13.     and the setbuf() call was missing an argument.  Heesh.
  14.  
  15. Fix:    From rn, say "| patch -d DIR", where DIR is your rn source directory.
  16.     Outside of rn, say "cd DIR; patch <thisarticle".  If you don't have
  17.     the patch program, apply the following by hand, or get patch.
  18.  
  19.     If patch indicates that patchlevel is the wrong version, you may need
  20.     to apply one or more previous patches, or the patch may already
  21.     have been applied.  See the patchlevel file to find out what has or
  22.     has not been applied.  In any event, don't continue with the patch.
  23.  
  24. Index: patchlevel
  25. Prereq: 22
  26. 1c1
  27. < Patch #: 22
  28. ---
  29. > Patch #: 23
  30.  
  31. Index: init.c
  32. Prereq: 4.3.1.2
  33. *** init.c.old    Tue Jul 23 18:09:36 1985
  34. --- init.c    Tue Jul 23 18:09:42 1985
  35. ***************
  36. *** 1,4
  37. ! /* $Header: init.c,v 4.3.1.2 85/05/21 14:22:46 lwall Exp $
  38.    *
  39.    * $Log:    init.c,v $
  40.    * Revision 4.3.1.2  85/05/21  14:22:46  lwall
  41.  
  42. --- 1,4 -----
  43. ! /* $Header: init.c,v 4.3.1.3 85/07/23 18:08:36 lwall Exp $
  44.    *
  45.    * $Log:    init.c,v $
  46.    * Revision 4.3.1.3  85/07/23  18:08:36  lwall
  47. ***************
  48. *** 1,6
  49.   /* $Header: init.c,v 4.3.1.2 85/05/21 14:22:46 lwall Exp $
  50.    *
  51.    * $Log:    init.c,v $
  52.    * Revision 4.3.1.2  85/05/21  14:22:46  lwall
  53.    * Sped up "rn -c" by avoiding unnecessary initialization.
  54.    * 
  55.  
  56. --- 1,9 -----
  57.   /* $Header: init.c,v 4.3.1.3 85/07/23 18:08:36 lwall Exp $
  58.    *
  59.    * $Log:    init.c,v $
  60. +  * Revision 4.3.1.3  85/07/23  18:08:36  lwall
  61. +  * Fixed up NOLINEBUF option to work.
  62. +  * 
  63.    * Revision 4.3.1.2  85/05/21  14:22:46  lwall
  64.    * Sped up "rn -c" by avoiding unnecessary initialization.
  65.    * 
  66. ***************
  67. *** 51,57
  68.       register bool foundany = FALSE;
  69.       long time();
  70.   #ifdef NOLINEBUF
  71. !     char std_out_buf[BUFSIZ];
  72.   
  73.       setbuf(std_out_buf);
  74.   #endif
  75.  
  76. --- 54,60 -----
  77.       register bool foundany = FALSE;
  78.       long time();
  79.   #ifdef NOLINEBUF
  80. !     static char std_out_buf[BUFSIZ];    /* must be static or malloced */
  81.   
  82.       setbuf(stdout, std_out_buf);
  83.   #endif
  84. ***************
  85. *** 53,59
  86.   #ifdef NOLINEBUF
  87.       char std_out_buf[BUFSIZ];
  88.   
  89. !     setbuf(std_out_buf);
  90.   #endif
  91.   
  92.       tcbuf = safemalloc(1024);        /* make temp buffer for termcap and */
  93.  
  94. --- 56,62 -----
  95.   #ifdef NOLINEBUF
  96.       static char std_out_buf[BUFSIZ];    /* must be static or malloced */
  97.   
  98. !     setbuf(stdout, std_out_buf);
  99.   #endif
  100.   
  101.       tcbuf = safemalloc(1024);        /* make temp buffer for termcap and */
  102.  
  103.  
  104.