Re: uc_width and wcwidth optimization

2011-12-14 Thread Alexander V. Lukyanov
On Wed, Dec 14, 2011 at 02:02:33PM +0400, Alexander V. Lukyanov wrote: > It means that it is possible to avoid is_cjk_encoding() calling at all, > because uc_width only uses encoding for cjk checking and uc_width is only > called by wcwidth for UTF-8 case (which is not a cjk encoding). Here is a p

Re: Accessing the environment's locale encoding settings

2011-12-14 Thread Ludovic Courtès
Hi, Since adding an implicit setlocale(LC_ALL, "") cannot be done in Guile 2.0 (it would change the default port encoding as a side effect, etc.), I committed something similar to the hack proposed in [0]. Bruno Haible skribis: > If I were you, I would start using the gnulib-tool option --local

[PATCH] localcharset: Use an absolute path in TESTS_ENVIRONMENT

2011-12-14 Thread Ludovic Courtès
Hello, This patch allows running unit tests that are in a subdirectory from another directory. OK to apply? Thanks, Ludo’. >From b8bbedfbc22cbe0c0500a6bef5166d0c1d76b779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 15 Dec 2011 01:10:48 +0100 Subject: [PATCH] loc

Re: [PATCH] test-strftime: Test nanosecond display

2011-12-14 Thread Alex Nelson
On Dec 14, 2011, at 08:10 , Eric Blake wrote: > On 12/13/2011 07:52 PM, Alex Nelson wrote: >> The test-strftime program did not test the display of nanoseconds. This >> patch clarifies the expected output for a number of nanoseconds with >> trailing zeroes. >> >> Signed-off-by: Alex Nelson >>

Re: [PATCH] test-strftime: Test nanosecond display

2011-12-14 Thread Eric Blake
On 12/13/2011 07:52 PM, Alex Nelson wrote: > The test-strftime program did not test the display of nanoseconds. This > patch clarifies the expected output for a number of nanoseconds with > trailing zeroes. > > Signed-off-by: Alex Nelson > --- > tests/test-strftime.c |1 + > 1 files changed

Re: uc_width and wcwidth optimization

2011-12-14 Thread Alexander V. Lukyanov
On Wed, Dec 14, 2011 at 02:02:33PM +0400, Alexander V. Lukyanov wrote: > is_cjk_encoding() is on the second place after locale_charset. * Only in certain cases. -- Alexander.

Re: uc_width and wcwidth optimization

2011-12-14 Thread Alexander V. Lukyanov
On Wed, Dec 14, 2011 at 02:06:45PM +0400, Alexander V. Lukyanov wrote: > On Tue, Dec 13, 2011 at 11:32:53AM +0100, Bruno Haible wrote: > > I would love to have locale_charset be either faster or use some thread-safe > > cache. Do you have an idea how to realize this? > > BTW, is it possible to hoo

Re: uc_width and wcwidth optimization

2011-12-14 Thread Alexander V. Lukyanov
On Tue, Dec 13, 2011 at 11:32:53AM +0100, Bruno Haible wrote: > 2) The wcwidth change is a good idea, but unfortunately is not multithread- > safe. Different threads can have different locales, therefore a global > variable as a cache won't lead to correct results always. Fortunately c

Re: uc_width and wcwidth optimization

2011-12-14 Thread Alexander V. Lukyanov
On Tue, Dec 13, 2011 at 11:32:53AM +0100, Bruno Haible wrote: > I would love to have locale_charset be either faster or use some thread-safe > cache. Do you have an idea how to realize this? BTW, is it possible to hook setlocale call to reset or disable the cache? E.g. save thread-id with the cac

[PATCH] test-strftime: Test nanosecond display

2011-12-14 Thread Alex Nelson
The test-strftime program did not test the display of nanoseconds. This patch clarifies the expected output for a number of nanoseconds with trailing zeroes. Signed-off-by: Alex Nelson --- tests/test-strftime.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tests/test-