Viet-Trung Luu | 96b05c1 | 2016-01-11 11:26:36 -0800 | [diff] [blame] | 1 | #include "stdio_impl.h" |
2 | #include <limits.h> | ||||
3 | #include <string.h> | ||||
4 | |||||
George Kulakowski | 17e3b04 | 2016-02-18 15:59:50 -0800 | [diff] [blame] | 5 | char* gets(char* s) { |
6 | char* ret = fgets(s, INT_MAX, stdin); | ||||
7 | if (ret && s[strlen(s) - 1] == '\n') | ||||
8 | s[strlen(s) - 1] = 0; | ||||
9 | return ret; | ||||
Viet-Trung Luu | 96b05c1 | 2016-01-11 11:26:36 -0800 | [diff] [blame] | 10 | } |