Files
musl/src/stdio/gets.c

9 lines
157 B
C
Raw Normal View History

2011-02-12 00:22:29 -05:00
#include "stdio_impl.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;
}