cmdline: add internal wrapper for vdprintf
[dpdk.git] / lib / librte_cmdline / cmdline_private.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2020 Dmitry Kozlyuk
3  */
4
5 #ifndef _CMDLINE_PRIVATE_H_
6 #define _CMDLINE_PRIVATE_H_
7
8 #include <stdarg.h>
9
10 #include <rte_common.h>
11
12 #include <cmdline.h>
13
14 /* Disable buffering and echoing, save previous settings to oldterm. */
15 void terminal_adjust(struct cmdline *cl);
16
17 /* Restore terminal settings form oldterm. */
18 void terminal_restore(const struct cmdline *cl);
19
20 /* Check if a single character can be read from input. */
21 int cmdline_poll_char(struct cmdline *cl);
22
23 /* Read one character from input. */
24 ssize_t cmdline_read_char(struct cmdline *cl, char *c);
25
26 /* vdprintf(3) */
27 __rte_format_printf(2, 0)
28 int cmdline_vdprintf(int fd, const char *format, va_list op);
29
30 #endif