Re: [PATCH 2/2] rework menu so that it can support multiline titles
From: Aleksey Kuleshov <hidden>
Date: 2016-08-18 11:24:42
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