stdio.h (306845) | stdio.h (315282) |
---|---|
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 --- 16 unchanged lines hidden (view full) --- 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)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 --- 16 unchanged lines hidden (view full) --- 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)stdio.h 8.5 (Berkeley) 4/29/95 |
33 * $FreeBSD: stable/11/include/stdio.h 306845 2016-10-08 14:07:34Z vangyzen $ | 33 * $FreeBSD: stable/11/include/stdio.h 315282 2017-03-14 20:14:57Z pfg $ |
34 */ 35 36#ifndef _STDIO_H_ 37#define _STDIO_H_ 38 39#include <sys/cdefs.h> 40#include <sys/_null.h> 41#include <sys/_types.h> 42 | 34 */ 35 36#ifndef _STDIO_H_ 37#define _STDIO_H_ 38 39#include <sys/cdefs.h> 40#include <sys/_null.h> 41#include <sys/_types.h> 42 |
43__NULLABILITY_PRAGMA_PUSH 44 |
|
43typedef __off_t fpos_t; 44 45#ifndef _SIZE_T_DECLARED 46typedef __size_t size_t; 47#define _SIZE_T_DECLARED 48#endif 49 50#if __POSIX_VISIBLE >= 200809 --- 67 unchanged lines hidden (view full) --- 118 int _w; /* (*) write space left for putc() */ 119 short _flags; /* (*) flags, below; this FILE is free if 0 */ 120 short _file; /* (*) fileno, if Unix descriptor, else -1 */ 121 struct __sbuf _bf; /* (*) the buffer (at least 1 byte, if !NULL) */ 122 int _lbfsize; /* (*) 0 or -_bf._size, for inline putc */ 123 124 /* operations */ 125 void *_cookie; /* (*) cookie passed to io functions */ | 45typedef __off_t fpos_t; 46 47#ifndef _SIZE_T_DECLARED 48typedef __size_t size_t; 49#define _SIZE_T_DECLARED 50#endif 51 52#if __POSIX_VISIBLE >= 200809 --- 67 unchanged lines hidden (view full) --- 120 int _w; /* (*) write space left for putc() */ 121 short _flags; /* (*) flags, below; this FILE is free if 0 */ 122 short _file; /* (*) fileno, if Unix descriptor, else -1 */ 123 struct __sbuf _bf; /* (*) the buffer (at least 1 byte, if !NULL) */ 124 int _lbfsize; /* (*) 0 or -_bf._size, for inline putc */ 125 126 /* operations */ 127 void *_cookie; /* (*) cookie passed to io functions */ |
126 int (*_close)(void *); 127 int (*_read)(void *, char *, int); 128 fpos_t (*_seek)(void *, fpos_t, int); 129 int (*_write)(void *, const char *, int); | 128 int (* _Nullable _close)(void *); 129 int (* _Nullable _read)(void *, char *, int); 130 fpos_t (* _Nullable _seek)(void *, fpos_t, int); 131 int (* _Nullable _write)(void *, const char *, int); |
130 131 /* separate buffer for long sequences of ungetc() */ 132 struct __sbuf _ub; /* ungetc buffer */ 133 unsigned char *_up; /* saved _p when _p is doing ungetc data */ 134 int _ur; /* saved _r when _r is counting ungetc data */ 135 136 /* tricks to meet minimum requirements even when malloc() fails */ 137 unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */ --- 282 unchanged lines hidden (view full) --- 420 */ 421extern const int sys_nerr; 422extern const char * const sys_errlist[]; 423 424/* 425 * Stdio function-access interface. 426 */ 427FILE *funopen(const void *, | 132 133 /* separate buffer for long sequences of ungetc() */ 134 struct __sbuf _ub; /* ungetc buffer */ 135 unsigned char *_up; /* saved _p when _p is doing ungetc data */ 136 int _ur; /* saved _r when _r is counting ungetc data */ 137 138 /* tricks to meet minimum requirements even when malloc() fails */ 139 unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */ --- 282 unchanged lines hidden (view full) --- 422 */ 423extern const int sys_nerr; 424extern const char * const sys_errlist[]; 425 426/* 427 * Stdio function-access interface. 428 */ 429FILE *funopen(const void *, |
428 int (*)(void *, char *, int), 429 int (*)(void *, const char *, int), 430 fpos_t (*)(void *, fpos_t, int), 431 int (*)(void *)); | 430 int (* _Nullable)(void *, char *, int), 431 int (* _Nullable)(void *, const char *, int), 432 fpos_t (* _Nullable)(void *, fpos_t, int), 433 int (* _Nullable)(void *)); |
432#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0) 433#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0) 434 435typedef __ssize_t cookie_read_function_t(void *, char *, size_t); 436typedef __ssize_t cookie_write_function_t(void *, const char *, size_t); 437typedef int cookie_seek_function_t(void *, off64_t *, int); 438typedef int cookie_close_function_t(void *); 439typedef struct { --- 96 unchanged lines hidden (view full) --- 536#define putc_unlocked(x, fp) __sputc(x, fp) 537 538#define getchar_unlocked() getc_unlocked(stdin) 539#define putchar_unlocked(x) putc_unlocked(x, stdout) 540#endif 541#endif /* __cplusplus */ 542 543__END_DECLS | 434#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0) 435#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0) 436 437typedef __ssize_t cookie_read_function_t(void *, char *, size_t); 438typedef __ssize_t cookie_write_function_t(void *, const char *, size_t); 439typedef int cookie_seek_function_t(void *, off64_t *, int); 440typedef int cookie_close_function_t(void *); 441typedef struct { --- 96 unchanged lines hidden (view full) --- 538#define putc_unlocked(x, fp) __sputc(x, fp) 539 540#define getchar_unlocked() getc_unlocked(stdin) 541#define putchar_unlocked(x) putc_unlocked(x, stdout) 542#endif 543#endif /* __cplusplus */ 544 545__END_DECLS |
546__NULLABILITY_PRAGMA_POP 547 |
|
544#endif /* !_STDIO_H_ */ | 548#endif /* !_STDIO_H_ */ |