Deleted Added
full compact
stdio.h (101914) stdio.h (102227)
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

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

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)stdio.h 8.5 (Berkeley) 4/29/95
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

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

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)stdio.h 8.5 (Berkeley) 4/29/95
37 * $FreeBSD: head/include/stdio.h 101914 2002-08-15 10:28:52Z robert $
37 * $FreeBSD: head/include/stdio.h 102227 2002-08-21 16:20:02Z mike $
38 */
39
40#ifndef _STDIO_H_
41#define _STDIO_H_
42
43#include <sys/cdefs.h>
38 */
39
40#ifndef _STDIO_H_
41#define _STDIO_H_
42
43#include <sys/cdefs.h>
44#include <machine/ansi.h>
44#include <sys/_types.h>
45
45
46#ifdef _BSD_SIZE_T_
47typedef _BSD_SIZE_T_ size_t;
48#undef _BSD_SIZE_T_
46#ifndef _SIZE_T_DECLARED
47typedef __size_t size_t;
48#define _SIZE_T_DECLARED
49#endif
50
51#ifndef NULL
52#define NULL 0
53#endif
54
49#endif
50
51#ifndef NULL
52#define NULL 0
53#endif
54
55typedef _BSD_OFF_T_ fpos_t;
55typedef __off_t fpos_t;
56
57#define _FSTDIO /* Define for new stdio with functions. */
58
59/*
60 * NB: to fit things in six character monocase externals, the stdio
61 * code uses the prefix `__s' for stdio objects, typically followed
62 * by a three-character attempt at a mnemonic.
63 */

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

246void setbuf(FILE *__restrict, char *__restrict);
247int setvbuf(FILE *__restrict, char *__restrict, int, size_t);
248int sprintf(char *__restrict, const char *__restrict, ...);
249int sscanf(const char *, const char *, ...);
250FILE *tmpfile(void);
251char *tmpnam(char *);
252int ungetc(int, FILE *);
253int vfprintf(FILE *__restrict, const char *__restrict,
56
57#define _FSTDIO /* Define for new stdio with functions. */
58
59/*
60 * NB: to fit things in six character monocase externals, the stdio
61 * code uses the prefix `__s' for stdio objects, typically followed
62 * by a three-character attempt at a mnemonic.
63 */

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

246void setbuf(FILE *__restrict, char *__restrict);
247int setvbuf(FILE *__restrict, char *__restrict, int, size_t);
248int sprintf(char *__restrict, const char *__restrict, ...);
249int sscanf(const char *, const char *, ...);
250FILE *tmpfile(void);
251char *tmpnam(char *);
252int ungetc(int, FILE *);
253int vfprintf(FILE *__restrict, const char *__restrict,
254 _BSD_VA_LIST_);
255int vprintf(const char *__restrict, _BSD_VA_LIST_);
254 __va_list);
255int vprintf(const char *__restrict, __va_list);
256int vsprintf(char *__restrict, const char *__restrict,
256int vsprintf(char *__restrict, const char *__restrict,
257 _BSD_VA_LIST_);
257 __va_list);
258
259#if __ISO_C_VISIBLE >= 1999
260int snprintf(char *__restrict, size_t, const char *__restrict,
261 ...) __printflike(3, 4);
262int vsnprintf(char *__restrict, size_t, const char *__restrict,
258
259#if __ISO_C_VISIBLE >= 1999
260int snprintf(char *__restrict, size_t, const char *__restrict,
261 ...) __printflike(3, 4);
262int vsnprintf(char *__restrict, size_t, const char *__restrict,
263 _BSD_VA_LIST_) __printflike(3, 0);
263 __va_list) __printflike(3, 0);
264#endif
265
266/*
267 * Functions defined in all versions of POSIX 1003.1.
268 */
269#if __POSIX_VISIBLE
270/* size for cuserid(3); UT_NAMESIZE + 1, see <utmp.h> */
271#define L_cuserid 17

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

293 */
294int getc_unlocked(FILE *);
295int getchar_unlocked(void);
296int putc_unlocked(int, FILE *);
297int putchar_unlocked(int);
298#endif
299
300#if __POSIX_VISIBLE >= 200112
264#endif
265
266/*
267 * Functions defined in all versions of POSIX 1003.1.
268 */
269#if __POSIX_VISIBLE
270/* size for cuserid(3); UT_NAMESIZE + 1, see <utmp.h> */
271#define L_cuserid 17

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

293 */
294int getc_unlocked(FILE *);
295int getchar_unlocked(void);
296int putc_unlocked(int, FILE *);
297int putchar_unlocked(int);
298#endif
299
300#if __POSIX_VISIBLE >= 200112
301int fseeko(FILE *, _BSD_OFF_T_, int);
302_BSD_OFF_T_ ftello(FILE *);
301int fseeko(FILE *, __off_t, int);
302__off_t ftello(FILE *);
303#endif
304
305#if __BSD_VISIBLE || __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600
306int getw(FILE *);
307int putw(int, FILE *);
308#endif /* BSD or X/Open before issue 6 */
309
310#if __XSI_VISIBLE

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

322#define __ATTR_FORMAT_ARG __attribute__((__format_arg__(2)))
323#else
324#define __ATTR_FORMAT_ARG
325#endif
326__const char *fmtcheck(const char *, const char *) __ATTR_FORMAT_ARG;
327int fpurge(FILE *);
328void setbuffer(FILE *, char *, int);
329int setlinebuf(FILE *);
303#endif
304
305#if __BSD_VISIBLE || __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600
306int getw(FILE *);
307int putw(int, FILE *);
308#endif /* BSD or X/Open before issue 6 */
309
310#if __XSI_VISIBLE

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

322#define __ATTR_FORMAT_ARG __attribute__((__format_arg__(2)))
323#else
324#define __ATTR_FORMAT_ARG
325#endif
326__const char *fmtcheck(const char *, const char *) __ATTR_FORMAT_ARG;
327int fpurge(FILE *);
328void setbuffer(FILE *, char *, int);
329int setlinebuf(FILE *);
330int vasprintf(char **, const char *, _BSD_VA_LIST_)
330int vasprintf(char **, const char *, __va_list)
331 __printflike(2, 0);
331 __printflike(2, 0);
332int vscanf(const char *, _BSD_VA_LIST_) __scanflike(1, 0);
333int vsscanf(const char *, const char *, _BSD_VA_LIST_)
332int vscanf(const char *, __va_list) __scanflike(1, 0);
333int vsscanf(const char *, const char *, __va_list)
334 __scanflike(2, 0);
335
336/*
337 * The system error table contains messages for the first sys_nerr
338 * positive errno values. Use strerror() or strerror_r() from <string.h>
339 * instead.
340 */
341extern __const int sys_nerr;

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

359#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
360#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
361
362/*
363 * Portability hacks. See <sys/types.h>.
364 */
365#ifndef _FTRUNCATE_DECLARED
366#define _FTRUNCATE_DECLARED
334 __scanflike(2, 0);
335
336/*
337 * The system error table contains messages for the first sys_nerr
338 * positive errno values. Use strerror() or strerror_r() from <string.h>
339 * instead.
340 */
341extern __const int sys_nerr;

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

359#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
360#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
361
362/*
363 * Portability hacks. See <sys/types.h>.
364 */
365#ifndef _FTRUNCATE_DECLARED
366#define _FTRUNCATE_DECLARED
367int ftruncate(int, _BSD_OFF_T_);
367int ftruncate(int, __off_t);
368#endif
369#ifndef _LSEEK_DECLARED
370#define _LSEEK_DECLARED
368#endif
369#ifndef _LSEEK_DECLARED
370#define _LSEEK_DECLARED
371_BSD_OFF_T_ lseek(int, _BSD_OFF_T_, int);
371__off_t lseek(int, __off_t, int);
372#endif
373#ifndef _MMAP_DECLARED
374#define _MMAP_DECLARED
372#endif
373#ifndef _MMAP_DECLARED
374#define _MMAP_DECLARED
375void *mmap(void *, size_t, int, int, int, _BSD_OFF_T_);
375void *mmap(void *, size_t, int, int, int, __off_t);
376#endif
377#ifndef _TRUNCATE_DECLARED
378#define _TRUNCATE_DECLARED
376#endif
377#ifndef _TRUNCATE_DECLARED
378#define _TRUNCATE_DECLARED
379int truncate(const char *, _BSD_OFF_T_);
379int truncate(const char *, __off_t);
380#endif
381#endif /* __BSD_VISIBLE */
382
383/*
384 * Functions internal to the implementation.
385 */
386int __srget(FILE *);
380#endif
381#endif /* __BSD_VISIBLE */
382
383/*
384 * Functions internal to the implementation.
385 */
386int __srget(FILE *);
387int __vfscanf(FILE *, const char *, _BSD_VA_LIST_);
388int __svfscanf(FILE *, const char *, _BSD_VA_LIST_);
387int __vfscanf(FILE *, const char *, __va_list);
388int __svfscanf(FILE *, const char *, __va_list);
389int __swbuf(int, FILE *);
390
391/*
392 * The __sfoo macros are here so that we can
393 * define function versions in the C library.
394 */
395#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
396#if defined(__GNUC__) && defined(__STDC__)

--- 41 unchanged lines hidden ---
389int __swbuf(int, FILE *);
390
391/*
392 * The __sfoo macros are here so that we can
393 * define function versions in the C library.
394 */
395#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
396#if defined(__GNUC__) && defined(__STDC__)

--- 41 unchanged lines hidden ---