Choco OS  V.0.16.9.0
Join to the chocolate world
oc_stdio.h
Go to the documentation of this file.
1 
28 #ifndef SYSTEM_CORE_INC_POSIX_OC_STDIO_H_
29 #define SYSTEM_CORE_INC_POSIX_OC_STDIO_H_
30 
31 #include <oc_errors.h>
32 #include <oc_vt100.h>
33 #include <oc_stdtypes.h>
34 #include <oc_array.h>
35 #include <stdbool.h>
36 #include <stdarg.h>
37 #include <stddef.h>
38 #include <oc_compiler.h>
39 
45 #define _________________________________________MACROS_SECTION_____________________________________________________________________________
46 
47 #undef feof
48 #undef putc
49 
50 //==========================================================================================================================================
51 //==========================================================================================================================================
52 #define oC_PrintErrorMessage( Message , ErrorCode ) printf(oC_VT100_RESET_ALL_ATTRIBUTES oC_VT100_BRIGHT oC_VT100_FG_WHITE Message oC_VT100_RESET_ALL_ATTRIBUTES oC_VT100_FG_RED "%s\n\r" oC_VT100_RESET_ALL_ATTRIBUTES , oC_GetErrorString(ErrorCode))
53 
54 //==========================================================================================================================================
55 //==========================================================================================================================================
56 #define oC_PrintWarningMessage( Message ) printf(oC_VT100_RESET_ALL_ATTRIBUTES oC_VT100_BRIGHT oC_VT100_FG_YELLOW Message oC_VT100_RESET_ALL_ATTRIBUTES "\n\r")
57 #define sprintf(outString,...) sprintf_s(outString , oC_ARRAY_SIZE(outString) , __VA_ARGS__) oC_FUNCTION_ONLY_FOR_STATIC_BUFFER(outString,sprintf,sprintf_s)
58 
59 
60 #define stdin ((void*)0)
61 #define stdout ((void*)1)
62 #define stderr ((void*)2)
63 
64 #undef _________________________________________MACROS_SECTION_____________________________________________________________________________
65 
66 
72 #define _________________________________________TYPES_SECTION______________________________________________________________________________
73 
76 typedef void FILE;
77 
78 #undef _________________________________________TYPES_SECTION______________________________________________________________________________
79 
86 #define _________________________________________FUNCTIONS_SECTION__________________________________________________________________________
87 
90 //==========================================================================================================================================
91 //==========================================================================================================================================
92 extern int vprintf( const char * Format , va_list ArgumentList );
93 //==========================================================================================================================================
94 //==========================================================================================================================================
95 extern int printf( const char * Format , ... );
96 
97 //==========================================================================================================================================
98 //==========================================================================================================================================
99 extern int puts( const char * String );
100 
101 //==========================================================================================================================================
102 //==========================================================================================================================================
103 extern int putc(int C, FILE *stream);
104 
105 //==========================================================================================================================================
106 //==========================================================================================================================================
107 extern int sprintf_s( char * outString , oC_UInt_t Size , const char * Format, ... );
108 
109 //==========================================================================================================================================
110 //==========================================================================================================================================
111 extern int scanf( const char * Format , ... );
112 
113 //==========================================================================================================================================
114 //==========================================================================================================================================
115 extern int sscanf( const char * String , const char * Format , ...);
116 
117 //==========================================================================================================================================
118 //==========================================================================================================================================
119 extern bool oC_ArgumentOccur( int Argc , char ** Argv , const char * Argument );
120 
121 //==========================================================================================================================================
122 //==========================================================================================================================================
123 extern int oC_GetArgumentNumber( int Argc , char ** Argv , const char * Argument );
124 
125 //==========================================================================================================================================
126 //==========================================================================================================================================
127 extern bool oC_IsMemSetTo( void * Buffer , oC_UInt_t Size , uint8_t Value );
128 
129 //==========================================================================================================================================
130 //==========================================================================================================================================
131 extern FILE * fopen ( const char * FileName, const char * Mode );
132 
133 //==========================================================================================================================================
134 //==========================================================================================================================================
135 extern int fclose ( FILE * stream );
136 
137 //==========================================================================================================================================
138 //==========================================================================================================================================
139 extern size_t fread ( void * Buffer, size_t ElementSize, size_t Count, FILE * File );
140 
141 //==========================================================================================================================================
142 //==========================================================================================================================================
143 extern size_t fwrite(const void * Buffer, size_t ElementSize, size_t Count, FILE * File );
144 
145 //==========================================================================================================================================
146 //==========================================================================================================================================
147 extern int feof( FILE * File );
148 
149 #undef _________________________________________FUNCTIONS_SECTION__________________________________________________________________________
150 
152 #endif /* SYSTEM_CORE_INC_POSIX_OC_STDIO_H_ */
The file with interface for VT100 terminal standard.
The file contains definitions for the compiler, that helps to manage errors, etc. ...
Static array definitions.
FILE__DESCRIPTION