stdio1.h revision 219557
1/****************************************************************
2Copyright (C) 1997-1999 Lucent Technologies
3All Rights Reserved
4
5Permission to use, copy, modify, and distribute this software and
6its documentation for any purpose and without fee is hereby
7granted, provided that the above copyright notice appear in all
8copies and that both that the copyright notice and this
9permission notice and warranty disclaimer appear in supporting
10documentation, and that the name of Lucent or any of its entities
11not be used in advertising or publicity pertaining to
12distribution of the software without specific, written prior
13permission.
14
15LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
17IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
18SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
20IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
21ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
22THIS SOFTWARE.
23****************************************************************/
24
25/* stdio1.h -- for using Printf, Fprintf, Sprintf while
26 * retaining the system-supplied printf, fprintf, sprintf.
27 */
28
29#ifndef STDIO1_H_included
30#define STDIO1_H_included
31#ifndef STDIO_H_included	/* allow suppressing stdio.h */
32#include <stdio.h>		/* in case it's already included, */
33#endif				/* e.g., by cplex.h */
34
35#ifdef KR_headers
36#ifndef _SIZE_T
37#define _SIZE_T
38typedef unsigned int size_t;
39#endif
40#define ANSI(x) ()
41#include "varargs.h"
42#ifndef Char
43#define Char char
44#endif
45#else
46#define ANSI(x) x
47#include "stdarg.h"
48#ifndef Char
49#define Char void
50#endif
51#endif
52
53#ifndef NO_STDIO1
54
55#ifdef __cplusplus
56extern "C" {
57#endif
58
59extern int Fprintf ANSI((FILE*, const char*, ...));
60extern int Printf ANSI((const char*, ...));
61extern int Sprintf ANSI((char*, const char*, ...));
62extern int Snprintf ANSI((char*, size_t, const char*, ...));
63extern void Perror ANSI((const char*));
64extern int Vfprintf ANSI((FILE*, const char*, va_list));
65extern int Vsprintf ANSI((char*, const char*, va_list));
66extern int Vsnprintf ANSI((char*, size_t, const char*, va_list));
67
68#ifdef PF_BUF
69extern FILE *stderr_ASL;
70extern void (*pfbuf_print_ASL) ANSI((char*));
71extern char *pfbuf_ASL;
72extern void fflush_ASL ANSI((FILE*));
73#ifdef fflush
74#define old_fflush_ASL fflush
75#undef  fflush
76#endif
77#define fflush fflush_ASL
78#endif
79
80#ifdef __cplusplus
81	}
82#endif
83
84#undef printf
85#undef fprintf
86#undef sprintf
87#undef perror
88#undef vfprintf
89#undef vsprintf
90#define printf Printf
91#define fprintf Fprintf
92#undef snprintf		/* for MacOSX */
93#undef vsnprintf	/* for MacOSX */
94#define snprintf Snprintf
95#define sprintf Sprintf
96#define perror Perror
97#define vfprintf Vfprintf
98#define vsnprintf Vsnprintf
99#define vsprintf Vsprintf
100
101#endif /* NO_STDIO1 */
102
103#endif /* STDIO1_H_included */
104