CNDP  22.08.0
cne_stdio.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2019-2022 Intel Corporation.
3  */
4 
5 #ifndef __CNE_STDIO_H_
6 #define __CNE_STDIO_H_
7 
13 // IWYU pragma: no_include <bits/termios-struct.h>
14 
15 #include <termios.h>
16 #include <stdarg.h> // for va_list
17 #include <stdint.h> // for int16_t
18 #include <stdio.h> // for FILE
19 #include <string.h> // for strlen
20 #include <unistd.h> // for write
21 
22 #include <cne_atomic.h> // for atomic_exchange, atomic_int_least32_t, atomic...
23 #include <cne_common.h>
24 #include <cne_system.h>
25 #include <vt100_out.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
37 CNDP_API int cne_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
38 
49 CNDP_API int cne_printf_pos(int16_t r, int16_t c, const char *fmt, ...)
50  __attribute__((format(printf, 3, 0)));
51 
62 CNDP_API int cne_fprintf(FILE *f, const char *fmt, ...) __attribute__((format(printf, 2, 0)));
63 
76 CNDP_API int cne_snprintf(char *buff, int len, const char *fmt, ...)
77  __attribute__((format(printf, 3, 4)));
78 
90 CNDP_API int cne_cprintf(int16_t r, int16_t ncols, const char *fmt, ...)
91  __attribute__((format(printf, 3, 4)));
92 
107 CNDP_API int cne_vsnprintf(char *buff, int len, const char *fmt, va_list ap)
108  __attribute__((format(printf, 3, 0)));
109 
120 CNDP_API int cne_vprintf(const char *fmt, va_list ap) __attribute__((format(printf, 1, 0)));
121 
122 #ifdef __cplusplus
123 }
124 #endif
125 
126 #endif /* __CNE_STDIO_H_ */
CNDP_API int cne_cprintf(int16_t r, int16_t ncols, const char *fmt,...)
CNDP_API int cne_fprintf(FILE *f, const char *fmt,...)
CNDP_API int cne_snprintf(char *buff, int len, const char *fmt,...)
CNDP_API int cne_vprintf(const char *fmt, va_list ap)
CNDP_API int cne_vsnprintf(char *buff, int len, const char *fmt, va_list ap)
CNDP_API int cne_printf_pos(int16_t r, int16_t c, const char *fmt,...)
CNDP_API int cne_printf(const char *fmt,...)