1 /* $OpenBSD: local.h,v 1.14 2009/10/22 01:23:16 guenther Exp $ */
4 * SPDX-License-Identifier: BSD-3-Clause
6 * Copyright (C) 1990, 1993
7 * The Regents of the University of California. All rights reserved.
9 * This code is derived from software contributed to Berkeley by
14 * Information local to this implementation of stdio,
15 * in particular, macros and private variables.
20 #include "ust-helper.h"
26 int __sflush(LTTNG_UST_LFILE
*);
28 LTTNG_UST_LFILE
*__sfp(void);
30 int __srefill(LTTNG_UST_LFILE
*);
32 int __sread(void *, char *, int);
34 int __swrite(void *, const char *, int);
36 fpos_t __sseek(void *, fpos_t, int);
44 void __smakebuf(LTTNG_UST_LFILE
*);
46 int __swhatbuf(LTTNG_UST_LFILE
*, size_t *, int *);
48 int _fwalk(int (*)(LTTNG_UST_LFILE
*));
50 int __swsetup(LTTNG_UST_LFILE
*);
52 int __sflags(const char *, int *);
54 wint_t __fgetwc_unlock(LTTNG_UST_LFILE
*);
57 extern void __atexit_register_cleanup(void (*)(void));
59 extern int __sdidinit
;
62 * Return true if the given LTTNG_UST_LFILE cannot be written now.
64 #define cantwrite(fp) \
65 ((((fp)->_flags & __SWR) == 0 || (fp)->_bf._base == NULL) && \
69 * Test whether the given stdio file has an active ungetc buffer;
70 * release such a buffer, without restoring ordinary unread data.
72 #define HASUB(fp) (_UB(fp)._base != NULL)
73 #define FREEUB(fp) { \
74 if (_UB(fp)._base != (fp)->_ubuf) \
75 free(_UB(fp)._base); \
76 _UB(fp)._base = NULL; \
80 * test for an fgetln() buffer.
82 #define HASLB(fp) ((fp)->_lb._base != NULL)
83 #define FREELB(fp) { \
84 free((char *)(fp)->_lb._base); \
85 (fp)->_lb._base = NULL; \
This page took 0.035096 seconds and 4 git commands to generate.