Article View: comp.sys.amiga.tech
Article #11086Re: popen/pclose for 1.3
From: Peter da Silva
Date: Sat, 21 Jan 1989 23:29
Date: Sat, 21 Jan 1989 23:29
23 lines
1106 bytes
1106 bytes
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`
Technical Details
Message-ID:
<3311@sugar.uu.net>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!sugar!peterReferences:
<3768@druwy.ATT.COM> <442@solaria.csun.edu> <1200@osupyr.mast.ohio-state.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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