fgets.c (dc36d6f9bb1753f3808552f3afd30eda9a7b206a) fgets.c (e55512504d0178983978d64d67eed1cc85826523)
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1990, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Chris Torek.

--- 26 unchanged lines hidden (view full) ---

35#include "namespace.h"
36#include <errno.h>
37#include <stdio.h>
38#include <string.h>
39#include "un-namespace.h"
40#include "local.h"
41#include "libc_private.h"
42
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1990, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Chris Torek.

--- 26 unchanged lines hidden (view full) ---

35#include "namespace.h"
36#include <errno.h>
37#include <stdio.h>
38#include <string.h>
39#include "un-namespace.h"
40#include "local.h"
41#include "libc_private.h"
42
43#undef fgets /* _FORTIFY_SOURCE */
44
43/*
44 * Read at most n-1 characters from the given file.
45 * Stop when a newline has been read, or the count runs out.
46 * Return first argument, or NULL if no characters were read.
47 */
48char *
49fgets(char * __restrict buf, int n, FILE * __restrict fp)
50{

--- 63 unchanged lines hidden ---
45/*
46 * Read at most n-1 characters from the given file.
47 * Stop when a newline has been read, or the count runs out.
48 * Return first argument, or NULL if no characters were read.
49 */
50char *
51fgets(char * __restrict buf, int n, FILE * __restrict fp)
52{

--- 63 unchanged lines hidden ---