about summary refs log tree commit diff
path: root/src/stdio/gets.c
blob: 24319eb2dcf62b431648bfef6641b2eda5854476 (plain) (blame)
1
2
3
4
5
6
7
8
#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;
}