home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
gnu
/
src
/
amiga
/
libnix-0.7-src.lha
/
libnix-0.7
/
sources
/
nix
/
stdio
/
gets.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1994-12-12
|
218 b
|
18 lines
#include <stdio.h>
char *gets(char *s)
{
int c;
char *s2=s;
for(;;)
{ c=fgetc(stdin);
if(ferror(stdin))
return NULL;
if(c==EOF||c=='\n')
break;
*s2++=c;
}
*s2++='\0';
return s;
}