1 /* 2 * pANS stdio -- gets 3 */ 4 #include "iolib.h" gets(char * as)5char *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 } 18