]> git.lizzy.rs Git - plan9front.git/blob - sys/src/libstdio/gets.c
fix typo
[plan9front.git] / sys / src / libstdio / gets.c
1 /*
2  * pANS stdio -- gets
3  */
4 #include "iolib.h"
5 char *gets(char *as){
6 #ifdef secure
7         stdin->flags|=ERR;
8         return NULL;
9 #else
10         char *s=as;
11         int c;
12         while((c=getchar())!='\n' && c!=EOF) *s++=c;
13         if(c!=EOF || s!=as) *s='\0';
14         else return NULL;
15         return as;
16 #endif
17 }