source:
azure_iot_hub/trunk/musl-1.1.18/src/stdio/gets.c@
389
Last change on this file since 389 was 389, checked in by , 5 years ago | |
---|---|
|
|
File size: 197 bytes |
Rev | Line | |
---|---|---|
[388] | 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.