Path: utzoo!attcan!uunet!sugar!peter From: peter@sugar.uu.net (Peter da Silva) Newsgroups: comp.sys.amiga.tech Subject: Re: popen/pclose for 1.3 Keywords: pipes Message-ID: <3311@sugar.uu.net> Date: 21 Jan 89 23:29:53 GMT References: <3768@druwy.ATT.COM> <442@solaria.csun.edu> <1200@osupyr.mast.ohio-state.edu> Distribution: comp Organization: Sugar Land Unix - Houston, TX Lines: 23 In article <1200@osupyr.mast.ohio-state.edu>, vkr@osupyr.mast.ohio-state.edu (Vidhyanath K. Rao) writes: > gets() is implemented usually as `Read(Stdin(), sptr, 256L)' I certainly hope this isn't true. Any implementation of the standard I/O library that does this is badly broken. Gets should be freely intermixable with getchar(), fread(), fgets(), and so on... it should behave as if it's: gets(s) char *s; { int c; char *ptr; while((c = getchar()) != EOF) { if(c=='\n') break; *ptr++ = c; } *ptr == 0; return (c==EOF)?0:s; } -- Peter "Have you hugged your wolf today" da Silva `-_-' Hackercorp. ...texbell!sugar!peter, or peter@sugar.uu.net 'U`