diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2007-07-05 18:01:39 +0200 |
---|---|---|
committer | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-07-05 18:01:39 +0200 |
commit | 0f184e3a556caee477f44750da2a7584febd829f (patch) | |
tree | 589e103859465c2fdb8aa2879365ccfe8c627848 /include/stdio.h | |
parent | 9b4dfd79953ffb79685a53a0821bd0a205e15088 (diff) | |
download | barebox-0f184e3a556caee477f44750da2a7584febd829f.tar.gz barebox-0f184e3a556caee477f44750da2a7584febd829f.tar.xz |
svn_rev_273
split up header files, make src pointer in write functions const
Diffstat (limited to 'include/stdio.h')
-rw-r--r-- | include/stdio.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/include/stdio.h b/include/stdio.h new file mode 100644 index 0000000000..f641952d84 --- /dev/null +++ b/include/stdio.h @@ -0,0 +1,43 @@ +#ifndef __STDIO_H +#define __STDIO_H + +#include <stdarg.h> + +/* + * STDIO based functions (can always be used) + */ + +/* serial stuff */ +void serial_printf (const char *fmt, ...); + +/* stdin */ +int getc(void); +int tstc(void); + +/* stdout */ +void putc(const char c); +void puts(const char *s); +void printf(const char *fmt, ...); +void vprintf(const char *fmt, va_list args); + +/* stderr */ +#define eputc(c) fputc(stderr, c) +#define eputs(s) fputs(stderr, s) +#define eprintf(fmt,args...) fprintf(stderr,fmt ,##args) + +/* + * FILE based functions (can only be used AFTER relocation!) + */ + +#define stdin 0 +#define stdout 1 +#define stderr 2 +#define MAX_FILES 16 + +void fprintf(int file, const char *fmt, ...); +void fputs(int file, const char *s); +void fputc(int file, const char c); +int ftstc(int file); +int fgetc(int file); + +#endif /* __STDIO_H */ |