2012-02-03 06:08:17 -05:00
|
|
|
#ifndef __STDIO_H
|
|
|
|
#define __STDIO_H
|
|
|
|
|
2012-05-25 16:45:28 -04:00
|
|
|
#include <stddef.h>
|
2012-02-03 06:08:17 -05:00
|
|
|
|
2012-02-07 09:02:44 -05:00
|
|
|
int putchar(int c);
|
|
|
|
int puts(const char *s);
|
|
|
|
|
2012-02-03 06:08:17 -05:00
|
|
|
int snprintf(char *buf, size_t size, const char *fmt, ...);
|
|
|
|
int scnprintf(char *buf, size_t size, const char *fmt, ...);
|
|
|
|
int sprintf(char *buf, const char *fmt, ...);
|
|
|
|
|
|
|
|
int printf(const char *fmt, ...);
|
|
|
|
|
2012-05-31 14:16:24 -04:00
|
|
|
/* Not sure this belongs here... */
|
|
|
|
typedef long long loff_t;
|
|
|
|
typedef long off_t;
|
|
|
|
typedef int mode_t;
|
|
|
|
typedef int dev_t;
|
|
|
|
|
2012-05-25 16:45:28 -04:00
|
|
|
/*
|
|
|
|
* Note: this library does not provide FILE operations.
|
|
|
|
* User code must implement them.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef BUFSIZ
|
|
|
|
#define BUFSIZ 1024
|
|
|
|
#endif
|
|
|
|
|
2012-05-28 11:17:13 -04:00
|
|
|
#ifndef EOF
|
|
|
|
#define EOF -1
|
|
|
|
#endif
|
|
|
|
|
2012-06-03 15:32:36 -04:00
|
|
|
#ifndef SEEK_SET
|
|
|
|
#define SEEK_SET 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SEEK_CUR
|
|
|
|
#define SEEK_CUR 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SEEK_END
|
|
|
|
#define SEEK_END 2
|
|
|
|
#endif
|
|
|
|
|
2012-05-25 16:45:28 -04:00
|
|
|
typedef int FILE;
|
|
|
|
|
|
|
|
extern FILE *stdin;
|
|
|
|
extern FILE *stdout;
|
|
|
|
extern FILE *stderr;
|
|
|
|
|
|
|
|
int fprintf(FILE *stream, const char *format, ...);
|
|
|
|
int fflush(FILE *stream);
|
|
|
|
|
|
|
|
FILE *fopen(const char *path, const char *mode);
|
2012-05-28 11:17:13 -04:00
|
|
|
FILE *freopen(const char *path, const char *mode, FILE *stream);
|
2012-05-25 16:45:28 -04:00
|
|
|
char *fgets(char *s, int size, FILE *stream);
|
|
|
|
size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
|
|
|
|
size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
|
2012-05-28 11:17:13 -04:00
|
|
|
int getc(FILE *stream);
|
|
|
|
int fputc(int c, FILE *stream);
|
|
|
|
int ferror(FILE *stream);
|
|
|
|
int feof(FILE *stream);
|
2012-05-25 16:45:28 -04:00
|
|
|
int fclose(FILE *fp);
|
|
|
|
|
2012-06-03 15:32:36 -04:00
|
|
|
int fseek(FILE *stream, long offset, int whence);
|
|
|
|
long ftell(FILE *stream);
|
|
|
|
|
|
|
|
|
2012-02-03 06:08:17 -05:00
|
|
|
#endif /* __STDIO_H */
|