]> rtime.felk.cvut.cz Git - arc.git/blob - clib/stdio.h
74593ad963cdf3085244a247675cb58050a6a090
[arc.git] / clib / stdio.h
1 /* -------------------------------- Arctic Core ------------------------------\r
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com\r
3  *\r
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>\r
5  *\r
6  * This source code is free software; you can redistribute it and/or modify it\r
7  * under the terms of the GNU General Public License version 2 as published by the\r
8  * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.\r
9  *\r
10  * This program is distributed in the hope that it will be useful, but\r
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\r
12  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\r
13  * for more details.\r
14  * -------------------------------- Arctic Core ------------------------------*/\r
15 \r
16 #ifndef STDIO_H_\r
17 #define STDIO_H_\r
18 \r
19 #include <stdarg.h>\r
20 #include <stdlib.h>\r
21 #include <clib.h>\r
22 \r
23 typedef _FileType FILE;\r
24 \r
25 #define EOF             (-1)\r
26 \r
27 /* File handles */\r
28 #define stdin           (_EnvPtr->_stdin)\r
29 #define stdout          (_EnvPtr->_stdout)\r
30 #define stderr          (_EnvPtr->_stderr)\r
31 \r
32 int printf(const char *format, ...);\r
33 int fprintf(FILE *file, const char *format, ...);\r
34 int sprintf(char *buffer, const char *format, ...);\r
35 int snprintf(char *buffer, size_t n, const char *format, ...);\r
36 int vprintf(const char *format, va_list ap);\r
37 int vsprintf(char *buffer, const char *format, va_list ap);\r
38 int vfprintf(FILE *file, const char *format, va_list ap);\r
39 int vsnprintf(char *buffer, size_t n, const char *format, va_list ap);\r
40 \r
41 int fileno( FILE *);\r
42 \r
43 #define putc(_x,_file)  fputc(_x,_file)\r
44 #define putchar(_x)             fputc(_x,stdout)\r
45 \r
46 int     fputc(int, FILE *);\r
47 int     fputs(const char *, FILE *);\r
48 \r
49 \r
50 #endif /* STDIO_H_ */\r