source:
EcnlProtoTool/trunk/musl-1.1.18/src/stdio/gets.c@
445
Last change on this file since 445 was 444, checked in by , 4 years ago | |
---|---|
|
|
File size: 197 bytes |
Line | |
---|---|
1 | #include "stdio_impl.h" |
2 | #include <limits.h> |
3 | #include <string.h> |
4 | |
5 | char *gets(char *s) |
6 | { |
7 | char *ret = fgets(s, INT_MAX, stdin); |
8 | if (ret && s[strlen(s)-1] == '\n') s[strlen(s)-1] = 0; |
9 | return ret; |
10 | } |
Note:
See TracBrowser
for help on using the repository browser.