Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ptsfa!ihnp4!occrsh!uokmax!rmtodd From: rmtodd@uokmax.UUCP (Richard Michael Todd) Newsgroups: comp.os.minix Subject: slight bug in stdio library (puts) Message-ID: <614@uokmax.UUCP> Date: Fri, 3-Jul-87 19:56:36 EDT Article-I.D.: uokmax.614 Posted: Fri Jul 3 19:56:36 1987 Date-Received: Sat, 4-Jul-87 19:52:04 EDT Reply-To: rmtodd@uokmax.UUCP (Richard Michael Todd) Organization: University of Oklahoma, Norman Lines: 15 There is a bug in the implementation of puts. The stdio.h file has #define puts(s) fputs(s,stdout) This is not quite correct. The UNIX man pages state quite clearly that puts() puts out a newline after the string is printed, and fputs does not. To fix this, delete the definition for puts from stdio.h and add to the library file fputs.c: puts(s) char *s; { fputs(s,stdout); fputc('\n',stdout); } ___________________________________________________________________________ Richard Todd USSnail:820 Annie Court,Norman OK 73069 UUCP: {allegra!cbosgd|ihnp4}!okstate!uokmax!rmtodd