* 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:
Vladimir 'phcoder' Serbinenko 2012-02-26 19:07:59 +01:00
parent 7e8fac16ad
commit 585031cb92
4 changed files with 82 additions and 14 deletions

View file

@ -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);
}