Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!batcomputer!munnari.oz.au!metro!cluster!tmx!brahman!melb.bull.oz.au!sjg From: sjg@melb.bull.oz.au (Simon J. Gerraty) Newsgroups: news.software.b Subject: white space in NEWSCTL/sys Summary: watch out for white space on blank lines in NEWSCTL/sys Message-ID: <1991Jan23.233044.9026@melb.bull.oz.au> Date: 23 Jan 91 23:30:44 GMT Sender: @melb.bull.oz.au Organization: Bull HN Information Systems Australia. Lines: 40 Nntp-Posting-Host: sun0 Yesterday, after updating an entry in NEWSCTL/sys our News software (relaynews) went berserk. The error message involved was: relaynews: whitespace in system name (or exclusions) of sys entry for ` ' Self explanitary I know. But it took me ages to twig that the problem was a space on a line by itself (at the end of the sys file). I was looking for problems _in_ the sys file entries. It seems to me that white-space can creep into a file like this too easily for relaynews not to cope with the situation. So I thought the following patch might be a good idea. I have not yet installed this myself BTW. Anyone know what it might break? *** sys.c.orig Thu Jan 24 08:17:08 1991 --- sys.c Thu Jan 24 10:21:15 1991 *************** *** 126,131 **** --- 126,140 ---- register struct system *sysp =(struct system *)nemalloc(sizeof *sysp); char *flagstring; + /* + * 91-01-23 + * A line containing only a '\t' or ' ' in NEWSCTL/sys + * has very undesirable results. + */ + while (*sysline && (*sysline == ' ' || *sysline == '\t')) + sysline++; + if (*sysline == '#' || *sysline == '\n') + return ; trim(sysline); next = sysline; parse(&sysp->sy_name); -- Simon J. Gerraty #include /* imagine something *very* witty here */