235 #if !defined(__DOXYGEN__)
248 #define __SSTR 0x0004
249 #define __SPGM 0x0008
250 #define __SERR 0x0010
251 #define __SEOF 0x0020
252 #define __SUNGET 0x040
253 #define __SMALLOC 0x80
257 #define __SLBF 0x0200
258 #define __SNBF 0x0400
259 #define __SMBF 0x0800
263 int (*put)(char,
struct __file *);
264 int (*
get)(
struct __file *);
284 #define stdin (__iob[0])
293 #define stdout (__iob[1])
304 #define stderr (__iob[2])
319 #define fdev_set_udata(stream, u) do { (stream)->udata = u; } while(0)
323 #define fdev_get_udata(stream) ((stream)->udata)
325 #if defined(__DOXYGEN__)
346 #define fdev_setup_stream(stream, put, get, rwflag)
348 #define fdev_setup_stream(stream, p, g, f) \
352 (stream)->flags = f; \
353 (stream)->udata = 0; \
357 #define _FDEV_SETUP_READ __SRD
358 #define _FDEV_SETUP_WRITE __SWR
359 #define _FDEV_SETUP_RW (__SRD|__SWR)
366 #define _FDEV_ERR (-1)
373 #define _FDEV_EOF (-2)
375 #if defined(__DOXYGEN__)
385 #define FDEV_SETUP_STREAM(put, get, rwflag)
387 #define FDEV_SETUP_STREAM(p, g, f) \
400 #if !defined(__DOXYGEN__)
405 extern struct __file *__iob[];
407 #if defined(__STDIO_FDEVOPEN_COMPAT_12)
413 extern FILE *
fdevopen(
int (*__put)(
char),
int (*__get)(
void),
414 int __opts __attribute__((unused)));
445 #if defined(__DOXYGEN__)
446 # define fdev_close()
448 # define fdev_close() ((void)0)
608 extern int vfprintf(
FILE *__stream,
const char *__fmt, va_list __ap);
614 extern int vfprintf_P(
FILE *__stream,
const char *__fmt, va_list __ap);
621 extern int fputc(
int __c,
FILE *__stream);
623 #if !defined(__DOXYGEN__)
626 extern int putc(
int __c,
FILE *__stream);
638 #define putc(__c, __stream) fputc(__c, __stream)
643 #define putchar(__c) fputc(__c, stdout)
649 extern int printf(
const char *__fmt, ...);
655 extern int printf_P(
const char *__fmt, ...);
663 extern int vprintf(
const char *__fmt, va_list __ap);
669 extern int sprintf(
char *__s,
const char *__fmt, ...);
675 extern int sprintf_P(
char *__s,
const char *__fmt, ...);
685 extern int snprintf(
char *__s,
size_t __n,
const char *__fmt, ...);
691 extern int snprintf_P(
char *__s,
size_t __n,
const char *__fmt, ...);
697 extern int vsprintf(
char *__s,
const char *__fmt, va_list ap);
703 extern int vsprintf_P(
char *__s,
const char *__fmt, va_list ap);
713 extern int vsnprintf(
char *__s,
size_t __n,
const char *__fmt, va_list ap);
719 extern int vsnprintf_P(
char *__s,
size_t __n,
const char *__fmt, va_list ap);
724 extern int fprintf(
FILE *__stream,
const char *__fmt, ...);
730 extern int fprintf_P(
FILE *__stream,
const char *__fmt, ...);
737 extern int fputs(
const char *__str,
FILE *__stream);
742 extern int fputs_P(
const char *__str,
FILE *__stream);
748 extern int puts(
const char *__str);
753 extern int puts_P(
const char *__str);
762 extern size_t fwrite(
const void *__ptr,
size_t __size,
size_t __nmemb,
773 #if !defined(__DOXYGEN__)
788 #define getc(__stream) fgetc(__stream)
794 #define getchar() fgetc(stdin)
822 extern char *
fgets(
char *__str,
int __size,
FILE *__stream);
829 extern char *
gets(
char *__str);
840 extern size_t fread(
void *__ptr,
size_t __size,
size_t __nmemb,
848 #if !defined(__DOXYGEN__)
850 #define clearerror(s) do { (s)->flags &= ~(__SERR | __SEOF); } while(0)
859 #if !defined(__DOXYGEN__)
861 #define feof(s) ((s)->flags & __SEOF)
870 #if !defined(__DOXYGEN__)
872 #define ferror(s) ((s)->flags & __SERR)
875 extern int vfscanf(
FILE *__stream,
const char *__fmt, va_list __ap);
880 extern int vfscanf_P(
FILE *__stream,
const char *__fmt, va_list __ap);
888 extern int fscanf(
FILE *__stream,
const char *__fmt, ...);
893 extern int fscanf_P(
FILE *__stream,
const char *__fmt, ...);
900 extern int scanf(
const char *__fmt, ...);
905 extern int scanf_P(
const char *__fmt, ...);
913 extern int vscanf(
const char *__fmt, va_list __ap);
921 extern int sscanf(
const char *__buf,
const char *__fmt, ...);
926 extern int sscanf_P(
const char *__buf,
const char *__fmt, ...);
928 #if defined(__DOXYGEN__)
938 static __inline__
int fflush(
FILE *stream __attribute__((unused)))
947 typedef long long fpos_t;
948 extern int fgetpos(
FILE *stream, fpos_t *pos);
949 extern FILE *fopen(
const char *path,
const char *mode);
950 extern FILE *freopen(
const char *path,
const char *mode,
FILE *stream);
951 extern FILE *fdopen(
int,
const char *);
952 extern int fseek(
FILE *stream,
long offset,
int whence);
953 extern int fsetpos(
FILE *stream, fpos_t *pos);
954 extern long ftell(
FILE *stream);
955 extern int fileno(
FILE *);
956 extern void perror(
const char *s);
957 extern int remove(
const char *pathname);
958 extern int rename(
const char *oldpath,
const char *newpath);
959 extern void rewind(
FILE *stream);
960 extern void setbuf(
FILE *stream,
char *buf);
961 extern int setvbuf(
FILE *stream,
char *buf,
int mode,
size_t size);
962 extern FILE *tmpfile(
void);
963 extern char *tmpnam (
char *s);
int vfscanf(FILE *__stream, const char *__fmt, va_list __ap)
Definition: vfscanf.c:704
int vprintf(const char *__fmt, va_list __ap)
Definition: vprintf.c:38
size_t fwrite(const void *__ptr, size_t __size, size_t __nmemb, FILE *__stream)
Definition: fwrite.c:38
int scanf(const char *__fmt,...)
Definition: scanf.c:38
#define getc(__stream)
Definition: stdio.h:788
struct __file FILE
Definition: stdio.h:275
int vscanf(const char *__fmt, va_list __ap)
Definition: vscanf.c:38
int puts_P(const char *__str)
Definition: puts_p.c:41
int fclose(FILE *__stream)
Definition: fclose.c:40
int sprintf(char *__s, const char *__fmt,...)
Definition: sprintf.c:40
int snprintf_P(char *__s, size_t __n, const char *__fmt,...)
Definition: snprintf_p.c:39
int vfscanf_P(FILE *__stream, const char *__fmt, va_list __ap)
Definition: vfscanf_p.c:38
int vsnprintf(char *__s, size_t __n, const char *__fmt, va_list ap)
Definition: vsnprintf.c:39
#define putc(__c, __stream)
Definition: stdio.h:638
int sscanf(const char *__buf, const char *__fmt,...)
Definition: sscanf.c:40
int ferror(FILE *__stream)
Definition: ferror.c:40
int puts(const char *__str)
Definition: puts.c:38
int printf_P(const char *__fmt,...)
Definition: printf_p.c:39
int vsprintf(char *__s, const char *__fmt, va_list ap)
Definition: vsprintf.c:40
FILE * fdevopen(int(*put)(char, FILE *), int(*get)(FILE *))
Definition: fdevopen.c:87
int scanf_P(const char *__fmt,...)
Definition: scanf_p.c:39
int vsprintf_P(char *__s, const char *__fmt, va_list ap)
Definition: vsprintf_p.c:40
char * gets(char *__str)
Definition: gets.c:38
int vfprintf_P(FILE *__stream, const char *__fmt, va_list __ap)
Definition: vfprintf_p.c:38
int fputs_P(const char *__str, FILE *__stream)
Definition: fputs_p.c:41
void clearerr(FILE *__stream)
Definition: clearerr.c:40
int fputs(const char *__str, FILE *__stream)
Definition: fputs.c:38
int snprintf(char *__s, size_t __n, const char *__fmt,...)
Definition: snprintf.c:39
#define putchar(__c)
Definition: stdio.h:643
unsigned char uint8_t
Definition: stdint.h:80
int fprintf_P(FILE *__stream, const char *__fmt,...)
Definition: fprintf_p.c:39
int feof(FILE *__stream)
Definition: feof.c:40
int fputc(int __c, FILE *__stream)
Definition: fputc.c:38
int fprintf(FILE *__stream, const char *__fmt,...)
Definition: fprintf.c:38
char * fgets(char *__str, int __size, FILE *__stream)
Definition: fgets.c:38
int fgetc(FILE *__stream)
Definition: fgetc.c:38
size_t fread(void *__ptr, size_t __size, size_t __nmemb, FILE *__stream)
Definition: fread.c:38
int ungetc(int __c, FILE *__stream)
Definition: ungetc.c:38
int sscanf_P(const char *__buf, const char *__fmt,...)
Definition: sscanf_p.c:40
#define getchar()
Definition: stdio.h:794
int vsnprintf_P(char *__s, size_t __n, const char *__fmt, va_list ap)
Definition: vsnprintf_p.c:39
int fscanf(FILE *__stream, const char *__fmt,...)
Definition: fscanf.c:38
int fscanf_P(FILE *__stream, const char *__fmt,...)
Definition: fscanf_p.c:39
int printf(const char *__fmt,...)
Definition: printf.c:38
int sprintf_P(char *__s, const char *__fmt,...)
Definition: sprintf_p.c:40
int vfprintf(FILE *__stream, const char *__fmt, va_list __ap)
Definition: vfprintf.c:286