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

  1. System: rn version 4.3
  2. Patch #: 17
  3. Priority: REALLY LOW
  4. Subject: articles which are subdirectories should really be ignored
  5. >From: lwall@sdcrdcf (Larry Wall)
  6.  
  7. Description:
  8.     In a newsgroup like net.micro, there is a subdirectory named 432
  9.     for storing articles in net.micro.432.  Unfortunately this looks like
  10.     an article number to rn, so it tries to display it.  No big deal,
  11.     but it could be confusing.  The following patch causes rn to ignore
  12.     "articles" that aren't regular files.
  13.  
  14. Fix:    From rn, say "| patch -d DIR", where DIR is your rn source directory.
  15.     Outside of rn, say "cd DIR; patch <thisarticle".  If you don't have
  16.     the patch program, apply the following by hand, or get patch.
  17.  
  18.     If patch indicates that patchlevel is the wrong version, you may need
  19.     to apply one or more previous patches, or the patch may already
  20.     have been applied.  See the patchlevel file to find out what has or
  21.     has not been applied.  In any event, don't continue with the patch.
  22.  
  23. Index: patchlevel
  24. Prereq: 16
  25. 1c1
  26. < Patch #: 16
  27. ---
  28. > Patch #: 17
  29.  
  30. Index: art.c
  31. Prereq: 4.3.1.3
  32. *** art.c.old    Thu May 23 12:01:18 1985
  33. --- art.c    Thu May 23 12:01:45 1985
  34. ***************
  35. *** 1,4
  36. ! /* $Header: art.c,v 4.3.1.3 85/05/13 09:29:55 lwall Exp $
  37.    *
  38.    * $Log:    art.c,v $
  39.    * Revision 4.3.1.3  85/05/13  09:29:55  lwall
  40.  
  41. --- 1,4 -----
  42. ! /* $Header: art.c,v 4.3.1.4 85/05/23 12:13:31 lwall Exp $
  43.    *
  44.    * $Log:    art.c,v $
  45.    * Revision 4.3.1.4  85/05/23  12:13:31  lwall
  46. ***************
  47. *** 1,6
  48.   /* $Header: art.c,v 4.3.1.3 85/05/13 09:29:55 lwall Exp $
  49.    *
  50.    * $Log:    art.c,v $
  51.    * Revision 4.3.1.3  85/05/13  09:29:55  lwall
  52.    * Added CUSTOMLINES option.
  53.    * 
  54.  
  55. --- 1,9 -----
  56.   /* $Header: art.c,v 4.3.1.4 85/05/23 12:13:31 lwall Exp $
  57.    *
  58.    * $Log:    art.c,v $
  59. +  * Revision 4.3.1.4  85/05/23  12:13:31  lwall
  60. +  * shouldn't display article that's really a subdirectory.
  61. +  * 
  62.    * Revision 4.3.1.3  85/05/13  09:29:55  lwall
  63.    * Added CUSTOMLINES option.
  64.    * 
  65. ***************
  66. *** 97,102
  67.       if (fstat(artfp->_file,&filestat))
  68.                   /* get article file stats */
  69.       return DA_CLEAN;
  70.       artsize = filestat.st_size;
  71.                   /* from that get article size */
  72.       sprintf(prompt_buf,
  73.  
  74. --- 100,107 -----
  75.       if (fstat(artfp->_file,&filestat))
  76.                   /* get article file stats */
  77.       return DA_CLEAN;
  78. +     if (filestat.st_mode & S_IFMT != S_IFREG)
  79. +     return DA_NORM;
  80.       artsize = filestat.st_size;
  81.                   /* from that get article size */
  82.       sprintf(prompt_buf,
  83.  
  84.  
  85.