Deleted Added
full compact
fgetln.c (92986) fgetln.c (126802)
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Chris Torek.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 */
36
37#if defined(LIBC_SCCS) && !defined(lint)
38static char sccsid[] = "@(#)fgetln.c 8.2 (Berkeley) 1/2/94";
39#endif /* LIBC_SCCS and not lint */
40#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Chris Torek.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 */
36
37#if defined(LIBC_SCCS) && !defined(lint)
38static char sccsid[] = "@(#)fgetln.c 8.2 (Berkeley) 1/2/94";
39#endif /* LIBC_SCCS and not lint */
40#include <sys/cdefs.h>
41__FBSDID("$FreeBSD: head/lib/libc/stdio/fgetln.c 92986 2002-03-22 21:53:29Z obrien $");
41__FBSDID("$FreeBSD: head/lib/libc/stdio/fgetln.c 126802 2004-03-10 09:28:38Z tjr $");
42
43#include "namespace.h"
44#include <stdio.h>
45#include <stdlib.h>
46#include <string.h>
47#include "un-namespace.h"
48#include "libc_private.h"
49#include "local.h"

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

82char *
83fgetln(FILE *fp, size_t *lenp)
84{
85 unsigned char *p;
86 size_t len;
87 size_t off;
88
89 FLOCKFILE(fp);
42
43#include "namespace.h"
44#include <stdio.h>
45#include <stdlib.h>
46#include <string.h>
47#include "un-namespace.h"
48#include "libc_private.h"
49#include "local.h"

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

82char *
83fgetln(FILE *fp, size_t *lenp)
84{
85 unsigned char *p;
86 size_t len;
87 size_t off;
88
89 FLOCKFILE(fp);
90 ORIENT(fp, -1);
90 /* make sure there is input */
91 if (fp->_r <= 0 && __srefill(fp)) {
92 *lenp = 0;
93 FUNLOCKFILE(fp);
94 return (NULL);
95 }
96
97 /* look for a newline in the input */

--- 70 unchanged lines hidden ---
91 /* make sure there is input */
92 if (fp->_r <= 0 && __srefill(fp)) {
93 *lenp = 0;
94 FUNLOCKFILE(fp);
95 return (NULL);
96 }
97
98 /* look for a newline in the input */

--- 70 unchanged lines hidden ---