Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!sdcsvax!nosc!cod!bmarsh From: bmarsh@cod.UUCP (William C. Marsh) Newsgroups: comp.sys.ibm.pc Subject: Re: MS-DOS NRO (an 'NROFF'- 'RNO'-like Source in C) Message-ID: <693@cod.UUCP> Date: Thu, 21-May-87 11:54:53 EDT Article-I.D.: cod.693 Posted: Thu May 21 11:54:53 1987 Date-Received: Sat, 23-May-87 11:44:51 EDT References: <405@ritcv.UUCP> <725@thumper.UUCP> Reply-To: bmarsh@cod.nosc.mil.UUCP (William C. Marsh) Distribution: na Organization: Naval Ocean Systems Center, San Diego Lines: 83 Keywords: NRO In article <725@thumper.UUCP> tr@thumper.UUCP writes: > >I tried compiling this source code on my PC. It worked without >modification using Lattice C v 3.1. With Microsoft C v 4.0, I had to >add one line to two files. The line was > > #include > >Tom Reingold >INTERNET: tr@bellcore.bellcore.com >UUCP: ..!decvax!ucbvax!ulysses!bellcore!tr > ..ihnp4!bellcore!tr This is not all that is needed to get the nro program to work under Microsoft C. One more little change is needed, or you get a file full of unrecognized command errors. The diffs (including the ctype.h stuff) follow: *** nrotxt.old Thu May 21 08:49:06 1987 --- nrotxt.c Thu May 21 08:47:20 1987 *************** *** 7,12 */ #include #include "nro.h" #include "nroxtrn.h" --- 7,13 ----- */ #include + #include #include "nro.h" #include "nroxtrn.h" *** nrocmd.old Thu May 21 08:47:34 1987 --- nrocmd.c Thu May 21 08:46:42 1987 *************** *** 7,12 */ #include #include "nro.h" #include "nroxtrn.h" --- 7,13 ----- */ #include + #include #include "nro.h" #include "nroxtrn.h" *************** *** 266,272 strcpy(m,s); return(MACRO); } ! c1 = tolower(*p++); c2 = tolower(*p); if (c1 == 'b' && c2 == 'o') return(BO); if (c1 == 'b' && c2 == 'p') return(BP); --- 267,274 ----- strcpy(m,s); return(MACRO); } ! c1 = tolower(*p); ! p++; c2 = tolower(*p); if (c1 == 'b' && c2 == 'o') return(BO); if (c1 == 'b' && c2 == 'p') return(BP); ------ Bill Marsh, Naval Ocean Systems Center, San Diego, CA {arpa,mil}net: bmarsh@cod.nosc.mil uucp: {ihnp4,akgua,decvax,dcdwest,ucbvax}!sdcsvax!nosc!bmarsh "If everything seems to be coming your way, you're probably in the wrong lane."