2002-06-15 15:49:32 +00:00
|
|
|
#ifndef _STDIO_H_
|
2010-02-22 21:24:09 +00:00
|
|
|
#define _STDIO_H_
|
2002-06-15 15:49:32 +00:00
|
|
|
|
2002-06-17 13:19:18 +00:00
|
|
|
#include <_ansi.h>
|
|
|
|
|
2002-06-15 15:49:32 +00:00
|
|
|
#define __need_size_t
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
#define __need___va_list
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
#ifndef NULL
|
2010-02-22 21:24:09 +00:00
|
|
|
#define NULL 0
|
2002-06-15 15:49:32 +00:00
|
|
|
#endif
|
|
|
|
|
2010-02-22 21:24:09 +00:00
|
|
|
#define EOF (-1)
|
2002-06-15 15:49:32 +00:00
|
|
|
|
|
|
|
#ifndef SEEK_SET
|
2010-02-22 21:24:09 +00:00
|
|
|
#define SEEK_SET 0 /* set file offset to offset */
|
2002-06-15 15:49:32 +00:00
|
|
|
#endif
|
|
|
|
#ifndef SEEK_CUR
|
2010-02-22 21:24:09 +00:00
|
|
|
#define SEEK_CUR 1 /* set file offset to current plus offset */
|
2002-06-15 15:49:32 +00:00
|
|
|
#endif
|
|
|
|
#ifndef SEEK_END
|
2010-02-22 21:24:09 +00:00
|
|
|
#define SEEK_END 2 /* set file offset to EOF plus offset */
|
2002-06-15 15:49:32 +00:00
|
|
|
#endif
|
|
|
|
|
2010-02-22 21:24:09 +00:00
|
|
|
#define TMP_MAX 26
|
2002-06-15 15:49:32 +00:00
|
|
|
|
|
|
|
#ifdef __GNUC__
|
|
|
|
#define __VALIST __gnuc_va_list
|
|
|
|
#else
|
|
|
|
#define __VALIST char*
|
|
|
|
#endif
|
|
|
|
|
2010-05-06 21:04:40 +00:00
|
|
|
int vsnprintf (char *buf, size_t size, const char *fmt, __VALIST ap);
|
|
|
|
|
|
|
|
int sprintf (char *buf, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3);
|
|
|
|
|
|
|
|
int snprintf (char *buf, size_t size, const char *fmt, ...)
|
|
|
|
ATTRIBUTE_PRINTF(3, 4);
|
|
|
|
|
|
|
|
int sscanf(const char *s, const char *fmt, ...)
|
|
|
|
ATTRIBUTE_SCANF(2, 3);
|
2002-06-15 15:49:32 +00:00
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
#ifdef SIMULATOR
|
|
|
|
typedef void FILE;
|
|
|
|
int vfprintf(FILE *stream, const char *format, __VALIST ap);
|
|
|
|
#ifdef WIN32
|
|
|
|
#define FILENAME_MAX 260 /* ugly hard-coded value of a limit that is set
|
|
|
|
in file.h */
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2002-06-15 15:49:32 +00:00
|
|
|
#endif /* _STDIO_H_ */
|