Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site sdcrdcf.UUCP Path: utzoo!utcs!lsuc!pesnta!hplabs!sdcrdcf!lwall From: lwall@sdcrdcf.UUCP (Larry Wall) Newsgroups: net.sources.bugs Subject: rn 4.3 patch #17 Message-ID: <2018@sdcrdcf.UUCP> Date: Thu, 23-May-85 18:42:35 EDT Article-I.D.: sdcrdcf.2018 Posted: Thu May 23 18:42:35 1985 Date-Received: Sat, 25-May-85 22:21:20 EDT Organization: System Development Corp. R+D, Santa Monica Lines: 82 System: rn version 4.3 Patch #: 17 Priority: REALLY LOW Subject: articles which are subdirectories should really be ignored From: lwall@sdcrdcf (Larry Wall) Description: In a newsgroup like net.micro, there is a subdirectory named 432 for storing articles in net.micro.432. Unfortunately this looks like an article number to rn, so it tries to display it. No big deal, but it could be confusing. The following patch causes rn to ignore "articles" that aren't regular files. Fix: From rn, say "| patch -d DIR", where DIR is your rn source directory. Outside of rn, say "cd DIR; patch Patch #: 17 Index: art.c Prereq: 4.3.1.3 *** art.c.old Thu May 23 12:01:18 1985 --- art.c Thu May 23 12:01:45 1985 *************** *** 1,4 ! /* $Header: art.c,v 4.3.1.3 85/05/13 09:29:55 lwall Exp $ * * $Log: art.c,v $ * Revision 4.3.1.3 85/05/13 09:29:55 lwall --- 1,4 ----- ! /* $Header: art.c,v 4.3.1.4 85/05/23 12:13:31 lwall Exp $ * * $Log: art.c,v $ * Revision 4.3.1.4 85/05/23 12:13:31 lwall *************** *** 1,6 /* $Header: art.c,v 4.3.1.3 85/05/13 09:29:55 lwall Exp $ * * $Log: art.c,v $ * Revision 4.3.1.3 85/05/13 09:29:55 lwall * Added CUSTOMLINES option. * --- 1,9 ----- /* $Header: art.c,v 4.3.1.4 85/05/23 12:13:31 lwall Exp $ * * $Log: art.c,v $ + * Revision 4.3.1.4 85/05/23 12:13:31 lwall + * shouldn't display article that's really a subdirectory. + * * Revision 4.3.1.3 85/05/13 09:29:55 lwall * Added CUSTOMLINES option. * *************** *** 97,102 if (fstat(artfp->_file,&filestat)) /* get article file stats */ return DA_CLEAN; artsize = filestat.st_size; /* from that get article size */ sprintf(prompt_buf, --- 100,107 ----- if (fstat(artfp->_file,&filestat)) /* get article file stats */ return DA_CLEAN; + if (filestat.st_mode & S_IFMT != S_IFREG) + return DA_NORM; artsize = filestat.st_size; /* from that get article size */ sprintf(prompt_buf,