From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 881E2A0548; Sat, 11 Sep 2021 01:16:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 000FD4014F; Sat, 11 Sep 2021 01:16:47 +0200 (CEST) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) by mails.dpdk.org (Postfix) with ESMTP id 5C2A54003E for ; Sat, 11 Sep 2021 01:16:46 +0200 (CEST) Received: by mail-lj1-f179.google.com with SMTP id q21so5715542ljj.6 for ; Fri, 10 Sep 2021 16:16:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zJtbaOmdg1Ywv9G9nv4o0uyigKfo7RLSMJQ25BYjlkI=; b=lofa8r+JctuyQHM40lWmhd5uX027aJKFYHjCzwPvOdiz5AciB4uqOQqGb6k++vWD5O 9wOz0y/fRUXX/ndOeA/KRW3ZMRlKHo0w4SWjNiqwMRkONPq8Ne/tkccZg9+FYymC6zGa Y0Ys7GTjFiVuZRYhjQyrZlkUpHCAv/zj8PunxpA/u0PGYhs+iTxld7XAjqa2iwhcsDv9 iapBIUyMAwgz797mSFxNkzB65m8K/AWvM0ydTgtRdF6+GwrJDRA+3ZN+gIHfvl/Cf7zL ElmFwm+KKlCRLfdZQDK+tEqFxoHD/1Y7+tR8UJd7GdjmZD6/ZsKxypCw3XkxSWlu0jLh IAYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zJtbaOmdg1Ywv9G9nv4o0uyigKfo7RLSMJQ25BYjlkI=; b=4SDVvfdtXBfsnmmqBoH8vw4z7kaguHFBKsO/8RQagqveuJBsXOPjozBnGEOnjqinnl nqxiUgHer3/zCJ8D/XNwAwahiXv3yCznUEgMORRkb5Rd3MWlW4dd+S8/NPxOBnbhlZo4 BRiLPdL5yUFVDdee6/MppLxmlAUQlXfZe9whoqyhvJ8LkzG5NG1hDS0MsUGkyecTGQba 7ebgJNgo7wn4ileawWV9OOIMjgZ5Y46VXmiyZ9Wwh99tA1gj+J8E89jX/1XRgLqOjsco uN2BDB3pPFRNlDnkWKnpmVKGiWLTgAtypNyNp0amw8APSBVUijZGW+tfe3SL5CBghLgR At7A== X-Gm-Message-State: AOAM5318293D4++XtjmCZUQg3GWG7t1LPTd3e0GJC7s0nzLGJrY8uHFE ddEyaA5rw6+tmZPW2YoSt57lOrFIel0= X-Google-Smtp-Source: ABdhPJxCgQ+qHusPk1/W3kTdVIwehKlCxFojvSQZxv1LoN7SpwslgYjUcPXKzA/8twOcGglemoWslw== X-Received: by 2002:a2e:9ac7:: with SMTP id p7mr73382ljj.72.1631315805418; Fri, 10 Sep 2021 16:16:45 -0700 (PDT) Received: from sovereign.. (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id n3sm11572lft.63.2021.09.10.16.16.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 16:16:44 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Kozlyuk , Olivier Matz Date: Sat, 11 Sep 2021 02:16:38 +0300 Message-Id: <20210910231639.789066-1-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.29.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] cmdline: make cmdline structure opaque X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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 -#endif - #include #include @@ -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