Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 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
}