1 /*-------------------------------------------------------------------------
2 stdio.h - ANSI functions forward declarations
4 Copyright (C) 1998, Sandeep Dutta . sandeep.dutta@usa.net
6 This library is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this library; see the file COPYING. If not, write to the
18 Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
21 As a special exception, if you link this library with other files,
22 some of which are compiled with SDCC, to produce an executable,
23 this library does not by itself cause the resulting executable to
24 be covered by the GNU General Public License. This exception does
25 not however invalidate any other reasons why the executable file
26 might be covered by the GNU General Public License.
27 -------------------------------------------------------------------------*/
29 #ifndef __SDC51_STDIO_H
30 #define __SDC51_STDIO_H 1
45 #define NULL (void *)0
48 #ifndef __SIZE_T_DEFINED
49 #define __SIZE_T_DEFINED
50 typedef unsigned int size_t;
53 /* Bounds-checking interfaces from annex K of the C11 standard. */
54 #if defined (__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__
56 #ifndef __RSIZE_T_DEFINED
57 #define __RSIZE_T_DEFINED
58 typedef size_t rsize_t
;
61 #ifndef __ERRNO_T_DEFINED
62 #define __ERRNO_T_DEFINED
68 typedef void (*pfn_outputchar
)(char c
, void* p
) _REENTRANT
;
70 extern int _print_format (pfn_outputchar pfn
, void* pvoid
, const char *format
, va_list ap
);
72 /*-----------------------------------------------------------------------*/
74 extern void printf_small (char *,...) _REENTRANT
;
75 extern int printf (const char *,...);
76 extern int vprintf (const char *, va_list);
77 extern int sprintf (char *, const char *, ...);
78 extern int vsprintf (char *, const char *, va_list);
79 extern int puts(const char *);
81 #if __STDC_VERSION__ < 201112L
82 extern char *gets(char *);
85 extern int getchar(void);
86 extern int putchar(int);
88 #if defined(__SDCC_mcs51) && !defined(__SDCC_USE_XSTACK)
89 extern void printf_fast(__code
const char *fmt
, ...) _REENTRANT
;
90 extern void printf_fast_f(__code
const char *fmt
, ...) _REENTRANT
;
91 extern void printf_tiny(__code
const char *fmt
, ...) _REENTRANT
;
94 #endif /* __SDC51_STDIO_H */