gets.c\stdio\src - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/stdio/gets.c
blob: 6c4645e5640b7b9d4df8387346a02122dfc0f5ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#include "stdio_impl.h"
#include <limits.h>
#include <string.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;
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月27日 04:55:07 +0000

AltStyle によって変換されたページ (->オリジナル) /