Thread (10 messages) 10 messages, 2 authors, 2016-08-18

Re: [PATCH 2/2] rework menu so that it can support multiline titles

From: Aleksey Kuleshov <hidden>
Date: 2016-08-18 11:24:42

quoted
 + 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help