picox  0.1
xstdio.h
[詳解]
1 
14 /*
15  * License: MIT license
16  * Copyright (c) <2015> <MaskedW [maskedw00@gmail.com]>
17  *
18  * Permission is hereby granted, free of charge, to any person
19  * obtaining a copy of this software and associated documentation
20  * files (the "Software"), to deal in the Software without
21  * restriction, including without limitation the rights to use, copy,
22  * modify, merge, publish, distribute, sublicense, and/or sell copies
23  * of the Software, and to permit persons to whom the Software is
24  * furnished to do so, subject to the following conditions:
25  *
26  * The above copyright notice and this permission notice shall be
27  * included in all copies or substantial portions of the Software.
28  *
29  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
30  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
31  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
32  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
33  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
34  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
35  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
36  * SOFTWARE.
37  */
38 
39 #ifndef picox_core_detail_xstdio_h_
40 #define picox_core_detail_xstdio_h_
41 
42 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif /* __cplusplus */
54 
55 
130 typedef int (*XCharPutFunc)(int c);
131 
132 
146 
147 
152 int x_putc(int c);
153 
154 
159 int x_puts(const char* str);
160 
161 
166 int x_puts2(const char* str);
167 
168 
171 int x_snprintf(char* buf, size_t size, const char* fmt, ...);
172 
173 
179 int x_sprintf(char* buf, const char* fmt, ...);
180 
181 
184 int x_vsnprintf(char* buf, size_t size, const char* fmt, va_list args);
185 
186 
192 int x_vsprintf(char* buf, const char* fmt, va_list args);
193 
194 
197 int x_printf(const char* fmt, ...);
198 
199 
202 int x_vprintf(const char* fmt, va_list args);
203 
204 
207 int x_printf_to_cputter(XCharPutFunc cputter, const char* fmt, ...);
208 
209 
212 int x_vprintf_to_cputter(XCharPutFunc cputter, const char* fmt, va_list args);
213 
214 
217 int x_printf_to_stream(XStream* stream, const char* fmt, ...);
218 
219 
222 int x_vprintf_to_stream(XStream* stream, const char* fmt, va_list args);
223 
224 
229 #ifdef __cplusplus
230 }
231 #endif /* __cplusplus */
232 
233 
239 #endif /* picox_core_detail_xstdio_h_ */
int x_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
fmtに従って、出力をsizeバイトの領域を持つbufに書き込みます
Definition: xstdio.c:137
int x_snprintf(char *buf, size_t size, const char *fmt,...)
fmtに従って、出力をsizeバイトの領域を持つbufに書き込みます
Definition: xstdio.c:117
int(* XCharPutFunc)(int c)
1文字出力を行う関数ポインタ型です
Definition: xstdio.h:130
int x_sprintf(char *buf, const char *fmt,...)
fmtに従って、出力をbufに書き込みます
Definition: xstdio.c:127
int x_vsprintf(char *buf, const char *fmt, va_list args)
fmtに従って、出力をbufに書き込みます
Definition: xstdio.c:153
int x_putc(int c)
cをuint8_tにキャストして出力先に書き込みます
Definition: xstdio.c:81
int x_printf_to_cputter(XCharPutFunc cputter, const char *fmt,...)
fmtに従ってcputterに書き込みます
Definition: xstdio.c:169
int x_printf(const char *fmt,...)
fmtに従って出力先に書き込みます
Definition: xstdio.c:159
int x_vprintf(const char *fmt, va_list args)
fmtに従って出力先に書き込みます
Definition: xstdio.c:189
int x_vprintf_to_stream(XStream *stream, const char *fmt, va_list args)
fmtに従ってstreamに書き込みます
Definition: xstdio.c:203
int x_puts(const char *str)
strと改行を出力します
Definition: xstdio.c:89
int x_printf_to_stream(XStream *stream, const char *fmt,...)
fmtに従ってstreamに書き込みます
Definition: xstdio.c:179
ストリームを表す抽象型です
Definition: xstream.h:152
int x_vprintf_to_cputter(XCharPutFunc cputter, const char *fmt, va_list args)
fmtに従ってcputterに書き込みます
Definition: xstdio.c:196
int x_puts2(const char *str)
strを出力します
Definition: xstdio.c:103
XCharPutFunc x_putc_stdout
1文字出力関数ポインタです
Definition: xstdio.c:78