Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.sources.bugs Subject: Re: uupc for MS-DOS problem Message-ID: <1111@bsu-cs.UUCP> Date: Sat, 5-Sep-87 20:56:45 EDT Article-I.D.: bsu-cs.1111 Posted: Sat Sep 5 20:56:45 1987 Date-Received: Sun, 6-Sep-87 09:12:54 EDT References: <339@gsg.UUCP> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 34 Keywords: COM1=a COM2=b Summary: source code is correct but not consistent with doc and binary >sscanf(name, "COM%d", &i); I have just finished converting the posted uupc source to compile and run using Turbo C. The source code is correct. The problem that the original poster observed was probably caused by the fact that the source code as posted seems not to be the source code that was actually used to generate the posted compiled code. One of the documentation files says that the port must be called "COM1" or "COM2." The above sscanf should work correctly if this is so. BUT one of the example files, called Systems, uses a different convention for the port name: it uses "a" instead of "COM1" and, presumably, would use "b" instead of "COM2". And the binary that was posted actually seems to accept "a" if you want to use COM1. So if you compile the source, you need to simply make your Systmes file say "COM1" where it currently says "a". However, to maintain compatibility with the posted binary, I chose to change the source code to accept both "a" and "COM1" for the first port and both "b" and "COM2" for the second port. Regrettably, I did not follow the admonishment that users change only the system-dependent portions of the code. There were a lot of unused variables that I removed. There were quite a few undeclared functions throughout the source that I declared. There were a few other minor things that I wasn't happy leaving unchanged. One or two compiler- specific header files had to be changed. Not all these changes were necessary, but I like to leave all of Turbo C's warning messages turned on so I made the changes. -- Rahul Dhesi UUCP: {ihnp4,seismo}!{iuvax,pur-ee}!bsu-cs!dhal