From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Dirk Gouders <dirk@gouders.net>
Cc: linux-kbuild@vger.kernel.org
Subject: Re: [PATCH] nconf: use function calls instead of ncurses' variables LINES and COLS
Date: Mon, 13 May 2013 18:39:56 +0200 [thread overview]
Message-ID: <20130513163956.GA17848@free.fr> (raw)
In-Reply-To: <1368437038-30444-1-git-send-email-dirk@gouders.net>
Dirk, All,
On 2013-05-13 11:23 +0200, Dirk Gouders spake thusly:
> According to the documentation [1], LINES and COLS are initialized by
> initscr(); it does not say anything about the behavior when windows are
> resized.
>
> Do not rely on the current implementation of ncurses that updates
> these variables on resize, but use the propper function calls or macros
> to get window dimensions.
>
> The use of the variables in main() was OK, but for the sake of
> consistency it was modified to use the macro getmaxyx().
>
> [1] ncurses(3X)
>
> Signed-off-by: Dirk Gouders <dirk@gouders.net>
Queued in my tree, with two very, very light changes:
> diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
> index dbf31ed..55fe5a6 100644
> --- a/scripts/kconfig/nconf.c
> +++ b/scripts/kconfig/nconf.c
[--SMIP--]
> @@ -1455,14 +1456,19 @@ static void conf_save(void)
>
> void setup_windows(void)
> {
> + int lines;
> + int columns;
I've chamged this to be a single line:
int lines, columns;
[--SNIP--]
> @@ -1470,6 +1476,8 @@ void setup_windows(void)
>
> int main(int ac, char **av)
> {
> + int lines;
> + int columns;
Ditto.
Thank you!
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
prev parent reply other threads:[~2013-05-13 16:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-10 12:59 [RFC] mconf: make extensive use of ncurses' variables LINES and COLS Dirk Gouders
2013-05-11 9:48 ` Yann E. MORIN
2013-05-11 11:20 ` Dirk Gouders
2013-05-11 11:27 ` Dirk Gouders
2013-05-11 20:58 ` Yann E. MORIN
2013-05-12 10:30 ` [PATCH v4] mconf: use function calls instead " Dirk Gouders
2013-05-12 12:55 ` Yann E. MORIN
2013-05-12 13:41 ` Dirk Gouders
2013-05-12 14:22 ` Yann E. MORIN
2013-05-13 9:23 ` [PATCH] nconf: " Dirk Gouders
2013-05-13 16:39 ` Yann E. MORIN [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130513163956.GA17848@free.fr \
--to=yann.morin.1998@free.fr \
--cc=dirk@gouders.net \
--cc=linux-kbuild@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox