mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Aleksey Kuleshov <rndfax@yandex.ru>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: [PATCH 2/2] rework menu so that it can support multiline titles
Date: Thu, 18 Aug 2016 14:24:17 +0300	[thread overview]
Message-ID: <9271471519457@web2g.yandex.ru> (raw)
In-Reply-To: <20160818071159.GG20657@pengutronix.de>

>>  + for (src = tmp, i = 0; i < lines; i++) {
>>  + if (parser)
>>  + m->display[i] = parser(src);
>>  + else
>>  + m->display[i] = xstrdup(src);
>
> What's the reason for running parser() over the separated strings? Can't
> you run parser() over the original multiline string instead?

For example, shell_expand removes '\n' from the string making it just ' ' (space).
So, to not lose this information parser apllies to every single already expanded string.

But with new patch I'm working on this will be unnecessary.
menu_add_title will do only one thing: adding the title (which can be miltilined) and nothing else.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2016-08-18 11:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17  7:58 [PATCH 0/2] " Aleksey Kuleshov
2016-08-17  7:58 ` [PATCH 1/2] hush: do not do anything if string is zero length Aleksey Kuleshov
2016-08-18  6:35   ` Sascha Hauer
2016-08-18  8:52     ` Aleksey Kuleshov
2016-08-17  7:58 ` [PATCH 2/2] rework menu so that it can support multiline titles Aleksey Kuleshov
2016-08-18  7:11   ` Sascha Hauer
2016-08-18  9:36     ` Aleksey Kuleshov
2016-08-18 10:26       ` Sascha Hauer
2016-08-18 10:48         ` Aleksey Kuleshov
2016-08-18 11:24     ` Aleksey Kuleshov [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=9271471519457@web2g.yandex.ru \
    --to=rndfax@yandex.ru \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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