Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!cwruecmp!hal!ncoast!allbery From: allbery@ncoast.UUCP Newsgroups: comp.sys.ibm.pc Subject: nro sources Message-ID: <983@watmum.UUCP> Date: Fri, 22-May-87 10:30:02 EDT Article-I.D.: watmum.983 Posted: Fri May 22 10:30:02 1987 Date-Received: Mon, 25-May-87 06:37:08 EDT Sender: allbery@ncoast.UUCP Distribution: comp Organization: U of Waterloo, Ontario Lines: 18 Keywords: nro sources bug Approved: allbery@ncoast.UUCP Resubmitted-From: comp.sources.misc When compiling the recently posted nro sources under Lattice 3.1 or Microsoft 4.00, everything compiles OK, but it does not process the options properly. It skips the character immediately following the - character. This is due to the following code: switch(tolower(*++p)) { which fails with LC and MSC because tolower is implemented as a macro that uses the argument more than once. Thus, p is incremented more than once. The correct fix is: ++p; switch(tolower(*p)) { I have not scanned the code for any further errors like this, so please beware. I have no connection with the authour of the code, nor the poster, nor anyone else it might hurt me to have a connection with.