1219422Sdas/**************************************************************** 2219422SdasCopyright (C) 1997-1999 Lucent Technologies 3219422SdasAll Rights Reserved 4219422Sdas 5219422SdasPermission to use, copy, modify, and distribute this software and 6219422Sdasits documentation for any purpose and without fee is hereby 7219422Sdasgranted, provided that the above copyright notice appear in all 8219422Sdascopies and that both that the copyright notice and this 9219422Sdaspermission notice and warranty disclaimer appear in supporting 10219422Sdasdocumentation, and that the name of Lucent or any of its entities 11219422Sdasnot be used in advertising or publicity pertaining to 12219422Sdasdistribution of the software without specific, written prior 13219422Sdaspermission. 14219422Sdas 15219422SdasLUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 16219422SdasINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. 17219422SdasIN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY 18219422SdasSPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 19219422SdasWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 20219422SdasIN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 21219422SdasARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 22219422SdasTHIS SOFTWARE. 23219422Sdas****************************************************************/ 24219422Sdas 25219422Sdas/* stdio1.h -- for using Printf, Fprintf, Sprintf while 26219422Sdas * retaining the system-supplied printf, fprintf, sprintf. 27219422Sdas */ 28219422Sdas 29219422Sdas#ifndef STDIO1_H_included 30219422Sdas#define STDIO1_H_included 31219422Sdas#ifndef STDIO_H_included /* allow suppressing stdio.h */ 32219422Sdas#include <stdio.h> /* in case it's already included, */ 33219422Sdas#endif /* e.g., by cplex.h */ 34219422Sdas 35219422Sdas#ifdef KR_headers 36219422Sdas#ifndef _SIZE_T 37219422Sdas#define _SIZE_T 38219422Sdastypedef unsigned int size_t; 39219422Sdas#endif 40219422Sdas#define ANSI(x) () 41219422Sdas#include "varargs.h" 42219422Sdas#ifndef Char 43219422Sdas#define Char char 44219422Sdas#endif 45219422Sdas#else 46219422Sdas#define ANSI(x) x 47219422Sdas#include "stdarg.h" 48219422Sdas#ifndef Char 49219422Sdas#define Char void 50219422Sdas#endif 51219422Sdas#endif 52219422Sdas 53219422Sdas#ifndef NO_STDIO1 54219422Sdas 55219422Sdas#ifdef __cplusplus 56219422Sdasextern "C" { 57219422Sdas#endif 58219422Sdas 59219422Sdasextern int Fprintf ANSI((FILE*, const char*, ...)); 60219422Sdasextern int Printf ANSI((const char*, ...)); 61219422Sdasextern int Sprintf ANSI((char*, const char*, ...)); 62219422Sdasextern int Snprintf ANSI((char*, size_t, const char*, ...)); 63219422Sdasextern void Perror ANSI((const char*)); 64219422Sdasextern int Vfprintf ANSI((FILE*, const char*, va_list)); 65219422Sdasextern int Vsprintf ANSI((char*, const char*, va_list)); 66219422Sdasextern int Vsnprintf ANSI((char*, size_t, const char*, va_list)); 67219422Sdas 68219422Sdas#ifdef PF_BUF 69219422Sdasextern FILE *stderr_ASL; 70219422Sdasextern void (*pfbuf_print_ASL) ANSI((char*)); 71219422Sdasextern char *pfbuf_ASL; 72219422Sdasextern void fflush_ASL ANSI((FILE*)); 73219422Sdas#ifdef fflush 74219422Sdas#define old_fflush_ASL fflush 75219422Sdas#undef fflush 76219422Sdas#endif 77219422Sdas#define fflush fflush_ASL 78219422Sdas#endif 79219422Sdas 80219422Sdas#ifdef __cplusplus 81219422Sdas } 82219422Sdas#endif 83219422Sdas 84219422Sdas#undef printf 85219422Sdas#undef fprintf 86219422Sdas#undef sprintf 87219422Sdas#undef perror 88219422Sdas#undef vfprintf 89219422Sdas#undef vsprintf 90219422Sdas#define printf Printf 91219422Sdas#define fprintf Fprintf 92219422Sdas#undef snprintf /* for MacOSX */ 93219422Sdas#undef vsnprintf /* for MacOSX */ 94219422Sdas#define snprintf Snprintf 95219422Sdas#define sprintf Sprintf 96219422Sdas#define perror Perror 97219422Sdas#define vfprintf Vfprintf 98219422Sdas#define vsnprintf Vsnprintf 99219422Sdas#define vsprintf Vsprintf 100219422Sdas 101219422Sdas#endif /* NO_STDIO1 */ 102219422Sdas 103219422Sdas#endif /* STDIO1_H_included */ 104