From 3d275807060de671987815ae40e7677c9d0c9bfc Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Tue, 18 Dec 2007 22:00:17 +0000 Subject: [PATCH] =?utf8?q?in=20print=5Fopt=5Ffull(),=20use=20strlenpt()=20?= =?utf8?q?instead=20of=20strlen(),=20so=20that=20tabs=20are=20placed=20pro?= =?utf8?q?perly=20when=20displaying=20translated=20strings=20in=20UTF-8,?= =?utf8?q?=20as=20found=20by=20Jean-Philippe=20Gu=C3=A9rard?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_2_0_branch/nano@4208 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 4 ++++ src/nano.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d345097f..652302ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -86,6 +86,10 @@ CVS code - middle of the line instead of just the uncompleted part of the match). (DLR) - nano.c: + print_opt_full() + - Use strlenpt() instead of strlen(), so that tabs are placed + properly when displaying translated strings in UTF-8. (DLR, + found by Jean-Philippe Guérard) version() - Display copyright notices. (DLR) copy_from_file() diff --git a/src/nano.c b/src/nano.c index 3845322e..2c193f00 100644 --- a/src/nano.c +++ b/src/nano.c @@ -751,14 +751,14 @@ void print_opt_full(const char *shortflag , const char *desc) { printf(" %s\t", shortflag); - if (strlen(shortflag) < 8) + if (strlenpt(shortflag) < 8) printf("\t"); #ifdef HAVE_GETOPT_LONG printf("%s\t", longflag); - if (strlen(longflag) < 8) + if (strlenpt(longflag) < 8) printf("\t\t"); - else if (strlen(longflag) < 16) + else if (strlenpt(longflag) < 16) printf("\t"); #endif -- 2.39.5