kconfig: don't trim spaces with leading pipe

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
This commit is contained in:
Yann E. MORIN" 2011-05-08 15:12:55 +02:00
parent c1053caf91
commit 3796ca5885

View File

@ -133,7 +133,13 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e
prop->visible.expr = menu_check_dep(dep); prop->visible.expr = menu_check_dep(dep);
if (prompt) { if (prompt) {
if (isspace(*prompt)) { /* For crostool-NG, a leading pipe followed with spaces
* means that pipe shall be removed, and the spaces should
* not be trimmed.
*/
if (*prompt == '|')
prompt++;
else if (isspace(*prompt)) {
prop_warn(prop, "leading whitespace ignored"); prop_warn(prop, "leading whitespace ignored");
while (isspace(*prompt)) while (isspace(*prompt))
prompt++; prompt++;