diff options
author | Vadim Bendebury (вб) <vbendeb@google.com> | 2009-12-20 03:29:49 -0500 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-02-02 08:33:55 -0500 |
commit | da60fbbcb637b37b1d77a41886ae4e275422ca96 (patch) | |
tree | b75965f0cc17567b1b7723094e1e9358e23c3b12 /scripts/kconfig/util.c | |
parent | 5358db0b0e16470337c6ec08177deb3f68ed7673 (diff) |
menuconfig: wrap long help lines
Help text for certain config options is very extensive (the text
includes the names of all other options the option in question depends
on). Long lines are not wrapped, making it impossible to see the list
without scrolling horizontally.
This patch adds some logic which wraps help screen lines at word
boundaries to prevent truncating.
Tested by running
ARCH=powerpc make menuconfig O=/tmp/build
which shows that the long lines are now wrapped, and
ARCH=powerpc make xconfig O=/tmp/build
to demonstrate that it still compiles and operates as expected.
Signed-off-by: Vadim Bendebury <vbendeb@google.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/kconfig/util.c')
-rw-r--r-- | scripts/kconfig/util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c index b6b2a46af14c..81c100d953ef 100644 --- a/scripts/kconfig/util.c +++ b/scripts/kconfig/util.c | |||
@@ -78,6 +78,7 @@ struct gstr str_new(void) | |||
78 | struct gstr gs; | 78 | struct gstr gs; |
79 | gs.s = malloc(sizeof(char) * 64); | 79 | gs.s = malloc(sizeof(char) * 64); |
80 | gs.len = 64; | 80 | gs.len = 64; |
81 | gs.max_width = 0; | ||
81 | strcpy(gs.s, "\0"); | 82 | strcpy(gs.s, "\0"); |
82 | return gs; | 83 | return gs; |
83 | } | 84 | } |
@@ -88,6 +89,7 @@ struct gstr str_assign(const char *s) | |||
88 | struct gstr gs; | 89 | struct gstr gs; |
89 | gs.s = strdup(s); | 90 | gs.s = strdup(s); |
90 | gs.len = strlen(s) + 1; | 91 | gs.len = strlen(s) + 1; |
92 | gs.max_width = 0; | ||
91 | return gs; | 93 | return gs; |
92 | } | 94 | } |
93 | 95 | ||