Fix the location where the new coldfire boards appear in the documentation
[barebox-mini2440.git] / include / stdio.h
blobce53c97fdfc1d4d88a95958ef4666e1a6d73cc00
1 #ifndef __STDIO_H
2 #define __STDIO_H
4 #include <stdarg.h>
5 #include <console.h>
7 /*
8 * STDIO based functions (can always be used)
9 */
11 /* serial stuff */
12 void serial_printf (const char *fmt, ...);
14 /* stdin */
15 int tstc(void);
17 /* stdout */
18 void console_putc(unsigned int ch, const char c);
19 int getc(void);
20 void console_puts(unsigned int ch, const char *s);
22 static inline void puts(const char *s) {
23 console_puts(CONSOLE_STDOUT, s);
26 static inline void putchar(char c) {
27 console_putc(CONSOLE_STDOUT, c);
30 int printf(const char *fmt, ...);
31 int vprintf(const char *fmt, va_list args);
32 int sprintf(char * buf, const char *fmt, ...);
33 int vsprintf(char *buf, const char *fmt, va_list args);
35 /* stderr */
36 #define eputc(c) console_putc(CONSOLE_STDERR, c)
37 #define eputs(s) console_puts(CONSOLE_STDERR, s)
38 #define eprintf(fmt,args...) fprintf(stderr,fmt ,##args)
41 * FILE based functions
44 #define stdin 0
45 #define stdout 1
46 #define stderr 2
47 #define MAX_FILES 16
49 void fprintf(int file, const char *fmt, ...);
50 int fputs(int file, const char *s);
51 int fputc(int file, const char c);
52 int ftstc(int file);
53 int fgetc(int file);
55 #endif /* __STDIO_H */