Remove the definition of `struct cmdline` from public header. Deprecation notice: https://mails.dpdk.org/archives/dev/2020-September/183310.html
Signed-off-by: Dmitry Kozlyuk <dmitry.kozl...@gmail.com> --- Unfortunately there's no deprection notice for struct rdline. If its definition was also hidden, the line buffer size limit could be changed or removed completely in the future. lib/cmdline/cmdline.h | 19 ------------------- lib/cmdline/cmdline_private.h | 11 ++++++++++- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/lib/cmdline/cmdline.h b/lib/cmdline/cmdline.h index c29762ddae..96674dfda2 100644 --- a/lib/cmdline/cmdline.h +++ b/lib/cmdline/cmdline.h @@ -7,10 +7,6 @@ #ifndef _CMDLINE_H_ #define _CMDLINE_H_ -#ifndef RTE_EXEC_ENV_WINDOWS -#include <termios.h> -#endif - #include <rte_common.h> #include <rte_compat.h> @@ -27,23 +23,8 @@ extern "C" { #endif -#ifndef RTE_EXEC_ENV_WINDOWS - -struct cmdline { - int s_in; - int s_out; - cmdline_parse_ctx_t *ctx; - struct rdline rdl; - char prompt[RDLINE_PROMPT_SIZE]; - struct termios oldterm; -}; - -#else - struct cmdline; -#endif /* RTE_EXEC_ENV_WINDOWS */ - struct cmdline *cmdline_new(cmdline_parse_ctx_t *ctx, const char *prompt, int s_in, int s_out); void cmdline_set_prompt(struct cmdline *cl, const char *prompt); void cmdline_free(struct cmdline *cl); diff --git a/lib/cmdline/cmdline_private.h b/lib/cmdline/cmdline_private.h index a87c45275c..7743807d0b 100644 --- a/lib/cmdline/cmdline_private.h +++ b/lib/cmdline/cmdline_private.h @@ -33,7 +33,16 @@ struct cmdline { char repeated_char; WORD repeat_count; }; -#endif +#else +struct cmdline { + int s_in; + int s_out; + cmdline_parse_ctx_t *ctx; + struct rdline rdl; + char prompt[RDLINE_PROMPT_SIZE]; + struct termios oldterm; +}; +#endif /* !RTE_EXEC_ENV_WINDOWS */ /* Disable buffering and echoing, save previous settings to oldterm. */ void terminal_adjust(struct cmdline *cl); -- 2.29.3