* grub-core/gnulib/argp-fmtstream.c (__argp_get_display_len):
New function. (add_length): Likewise. (__argp_fmtstream_update): Handle strings with non-ASCII chars. * grub-core/gnulib/argp-fmtstream.h (__argp_get_display_len): New proto. * grub-core/gnulib/argp-help.c (argp_args_usage): Use __argp_get_display_len.
This commit is contained in:
parent
7e8fac16ad
commit
585031cb92
4 changed files with 82 additions and 14 deletions
|
@ -1448,7 +1448,7 @@ argp_args_usage (const struct argp *argp, const struct argp_state *state,
|
|||
|
||||
/* Manually do line wrapping so that it (probably) won't get wrapped at
|
||||
any embedded spaces. */
|
||||
space (stream, 1 + nl - cp);
|
||||
space (stream, 1 + __argp_get_display_len (cp, nl));
|
||||
|
||||
__argp_fmtstream_write (stream, cp, nl - cp);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue