Deleted Added
sdiff udiff text old ( 165903 ) new ( 178287 )
full compact
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 * @(#)local.h 8.3 (Berkeley) 7/3/94
33 * $FreeBSD: head/lib/libc/stdio/local.h 178287 2008-04-17 22:17:54Z jhb $
34 */
35
36#include <sys/types.h> /* for off_t */
37#include <pthread.h>
38#include <string.h>
39#include <wchar.h>
40
41/*

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

75extern int __vfwprintf(FILE *, const wchar_t *, __va_list);
76extern int __vfwscanf(FILE * __restrict, const wchar_t * __restrict,
77 __va_list);
78extern size_t __fread(void * __restrict buf, size_t size, size_t count,
79 FILE * __restrict fp);
80extern int __sdidinit;
81
82
83/*
84 * Prepare the given FILE for writing, and return 0 iff it
85 * can be written now. Otherwise, return EOF and set errno.
86 */
87#define prepwrite(fp) \
88 ((((fp)->_flags & __SWR) == 0 || \
89 ((fp)->_bf._base == NULL && ((fp)->_flags & __SSTR) == 0)) && \
90 __swsetup(fp))

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

104 * test for an fgetln() buffer.
105 */
106#define HASLB(fp) ((fp)->_lb._base != NULL)
107#define FREELB(fp) { \
108 free((char *)(fp)->_lb._base); \
109 (fp)->_lb._base = NULL; \
110}
111
112/*
113 * Set the orientation for a stream. If o > 0, the stream has wide-
114 * orientation. If o < 0, the stream has byte-orientation.
115 */
116#define ORIENT(fp, o) do { \
117 if ((fp)->_orientation == 0) \
118 (fp)->_orientation = (o); \
119} while (0)