this header evolved to facilitate the extremely lazy practice of omitting explicit includes of the necessary headers in individual stdio source files; not only was this sloppy, but it also increased build time. now, stdio_impl.h is only including the headers it needs for its own use; any further headers needed by source files are included directly where needed.
11 lines
197 B
C
11 lines
197 B
C
#include "stdio_impl.h"
|
|
#include <limits.h>
|
|
#include <string.h>
|
|
|
|
char *gets(char *s)
|
|
{
|
|
char *ret = fgets(s, INT_MAX, stdin);
|
|
if (ret && s[strlen(s)-1] == '\n') s[strlen(s)-1] = 0;
|
|
return ret;
|
|
}
|