1#include <stdio.h>23#undef gets45char *6gets(char *s)7{8 int ch;9 char *t = s;1011 while ((ch = getc(stdin)) != EOF && ch != '\n')12 *t++ = ch;13 if (ch == EOF && s == t)14 return NULL;15 *t = '\0';1617 return s;18}
A fork of https://git.simple-cc.org/scc/ for Qute
git clone https://git.8pit.net/scc.git
1#include <stdio.h>23#undef gets45char *6gets(char *s)7{8 int ch;9 char *t = s;1011 while ((ch = getc(stdin)) != EOF && ch != '\n')12 *t++ = ch;13 if (ch == EOF && s == t)14 return NULL;15 *t = '\0';1617 return s;18}