1#include "stdio_impl.h" 2#include <limits.h> 3#include <string.h> 4 5char* 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; 10} 11