Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!utcsri!uthub!ecf!me!utradio!cks From: cks@utradio.UUCP Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: MS-DOS NRO (an 'NROFF'- 'RNO'-like Source in C) Message-ID: <390@utradio.toronto.edu> Date: Sat, 23-May-87 23:47:44 EDT Article-I.D.: utradio.390 Posted: Sat May 23 23:47:44 1987 Date-Received: Tue, 26-May-87 01:08:46 EDT References: <405@ritcv.UUCP> <725@thumper.UUCP> Reply-To: cks@utradio.UUCP (Chris Siebenmann) Distribution: na Organization: Newsreaders Anonymous Lines: 30 Keywords: NRO Xref: utgpu comp.lang.c:2133 comp.sys.ibm.pc:3797 When I brought NRO up on the Sun here, it needed two big changes and one small bugfix. The small bugfix was to getname() in nrocmd.c, which needed a check to avoid passing strcmp() a NULL pointer. One big change was making most of the uses of \r conditional on IBMPC, since they were neither desirable nor needed under Unix. The other big change was preceding each use of tolower() with a check (via isupper()) to make sure that the character we were trying to make lower case was indeed in upper case (I should also have checked for isascii(), but I was in a hurry and the expressions needed got rather large, as most cases required use of ?:). Without this check, NRO refused to recognize either dot commands or command line arguments. For a good paper on tolower() and the need for isascii()/isupper() first, as well as other portability glitches and problems, check out "Can't Happen or /*NOTREACHED*/ or Real Programs Dump Core" by Ian Darwin and Geoff Collyer (presented at the 1985 Dallas Usenix conference). I learned a lot from it. -- "I shall clasp my hands together and bow to the corners of the world." Number Ten Ox, "Bridge of Birds" Chris Siebenmann {allegra,mnetor,decvax,pyramid}!utgpu!radio!cks cks@radio.toronto.edu or ...!utgpu!{yetti!lethe, darwin}!ontmoh!cks