Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!ames!oliveb!pyramid!nsc!nsta!tom From: tom@nsta.UUCP Newsgroups: comp.bugs.misc,comp.bugs.4bsd Subject: doscan.o bug in Ultrix 1.2 & 2.0 Message-ID: <309@nsta.UUCP> Date: Tue, 7-Jul-87 04:18:55 EDT Article-I.D.: nsta.309 Posted: Tue Jul 7 04:18:55 1987 Date-Received: Thu, 9-Jul-87 03:13:55 EDT Reply-To: tom%nsta@nsc.com (Tom Gorodecki) Distribution: world Organization: National Semiconductor (Israel) Ltd. Lines: 31 Xref: utgpu comp.bugs.misc:57 comp.bugs.4bsd:394 Bug in doscan.o in /lib/libc.a on ULTRIX 1.2 and ULTRIX 2.0. Try in you program.c the following line: val = fscanf(file,"%*[ \t\n]%74[abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]", namebuf); In case your input does not begin with space, tab or newline, scanf will return 0 which is not right, since "*" should match "0 or more" . The pascal compiler uses this type of scanf to read enumerated type data. Try for example the following program: ( you can use any enumerated type instead of boolean). program test(input,output); var a :boolean; begin readln(a); writeln(a); end. Try as input the word "false" with and without leading blank. You will get the following error : ( without leading blank) Trace/BPT trap Unknown name "" found on enumerated type read I have inform DEC, but meanwhile i installed 4.3 doscan.o into Ultrix libc.a.