Deleted Added
full compact
findfp.c (72732) findfp.c (80541)
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

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

34 * SUCH DAMAGE.
35 */
36
37#if defined(LIBC_SCCS) && !defined(lint)
38#if 0
39static char sccsid[] = "@(#)findfp.c 8.2 (Berkeley) 1/4/94";
40#endif
41static const char rcsid[] =
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

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

34 * SUCH DAMAGE.
35 */
36
37#if defined(LIBC_SCCS) && !defined(lint)
38#if 0
39static char sccsid[] = "@(#)findfp.c 8.2 (Berkeley) 1/4/94";
40#endif
41static const char rcsid[] =
42 "$FreeBSD: head/lib/libc/stdio/findfp.c 72732 2001-02-20 01:56:52Z peter $";
42 "$FreeBSD: head/lib/libc/stdio/findfp.c 80541 2001-07-29 15:08:14Z sheldonh $";
43#endif /* LIBC_SCCS and not lint */
44
45#include <sys/param.h>
46#include <machine/atomic.h>
47#include <unistd.h>
48#include <stdio.h>
49#include <stdlib.h>
50#include <string.h>

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

187 return (fp);
188}
189
190/*
191 * XXX. Force immediate allocation of internal memory. Not used by stdio,
192 * but documented historically for certain applications. Bad applications.
193 */
194__warn_references(f_prealloc,
43#endif /* LIBC_SCCS and not lint */
44
45#include <sys/param.h>
46#include <machine/atomic.h>
47#include <unistd.h>
48#include <stdio.h>
49#include <stdlib.h>
50#include <string.h>

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

187 return (fp);
188}
189
190/*
191 * XXX. Force immediate allocation of internal memory. Not used by stdio,
192 * but documented historically for certain applications. Bad applications.
193 */
194__warn_references(f_prealloc,
195 "warning: this program uses f_prealloc(), which is stupid.");
195 "warning: this program uses f_prealloc(), which is not recommended.");
196
197void
198f_prealloc()
199{
200 struct glue *g;
201 int n;
202
203 n = getdtablesize() - FOPEN_MAX + 20; /* 20 for slop. */

--- 52 unchanged lines hidden ---
196
197void
198f_prealloc()
199{
200 struct glue *g;
201 int n;
202
203 n = getdtablesize() - FOPEN_MAX + 20; /* 20 for slop. */

--- 52 unchanged lines hidden ---