2007-07-05 16:01:39 +00:00
|
|
|
#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);
|
2007-07-05 16:01:43 +00:00
|
|
|
int sprintf(char * buf, const char *fmt, ...);
|
|
|
|
int vsprintf(char *buf, const char *fmt, va_list args);
|
2007-07-05 16:01:39 +00:00
|
|
|
|
|
|
|
/* 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 */
|