mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 17:53:02 +00:00
don't use strlen to compute visual width
* src/output.c (prepare_symbol_names): Use mbswidth.
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include <filename.h> /* IS_PATH_WITH_DIR */
|
#include <filename.h> /* IS_PATH_WITH_DIR */
|
||||||
#include <get-errno.h>
|
#include <get-errno.h>
|
||||||
|
#include <mbswidth.h>
|
||||||
#include <path-join.h>
|
#include <path-join.h>
|
||||||
#include <quotearg.h>
|
#include <quotearg.h>
|
||||||
#include <spawn-pipe.h>
|
#include <spawn-pipe.h>
|
||||||
@@ -236,7 +237,7 @@ prepare_symbol_names (char const *muscle_name)
|
|||||||
/* Width of the next token, including the two quotes, the
|
/* Width of the next token, including the two quotes, the
|
||||||
comma and the space. */
|
comma and the space. */
|
||||||
int width
|
int width
|
||||||
= strlen (cp) + 2
|
= mbswidth (cp, 0) + 2
|
||||||
+ (translatable ? strlen ("N_()") : 0);
|
+ (translatable ? strlen ("N_()") : 0);
|
||||||
|
|
||||||
if (col + width > 75)
|
if (col + width > 75)
|
||||||
|
|||||||
Reference in New Issue
Block a user