Re: [PATCH v5 02/12] ctype: support iscntrl, ispunct, isxdigit and isprint

2012-10-17 Thread Nguyen Thai Ngoc Duy
On Wed, Oct 17, 2012 at 7:09 PM, "Jan H. Schönherr" wrote: >> const unsigned char sane_ctype[256] = { >> - 0, 0, 0, 0, 0, 0, 0, 0, 0, S, S, 0, 0, S, 0, 0, /* 0.. 15 */ >> - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 16.. 31 */ >> + X, X, X, X, X, X, X, X, X,

Re: [PATCH v5 02/12] ctype: support iscntrl, ispunct, isxdigit and isprint

2012-10-17 Thread Jan H. Schönherr
Hi Nguyen. I just had a need for isprint() myself, and then I found your code here. I had a look at the POSIX locale as describe here: http://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/locales/POSIX Some remarks below. Am 14.10.2012 16:26, schrieb Nguyen Thai Ngoc Duy: > -- 8< -- > di

Re: [PATCH v5 02/12] ctype: support iscntrl, ispunct, isxdigit and isprint

2012-10-14 Thread Nguyen Thai Ngoc Duy
On Sun, Oct 14, 2012 at 03:59:31PM +0200, René Scharfe wrote: > Am 14.10.2012 15:25, schrieb Nguyen Thai Ngoc Duy: > > On Sun, Oct 14, 2012 at 7:59 PM, René Scharfe > > wrote: > >> With that, couldn't you squeeze the other two classes into the existing > >> sane_type? > > > > No there are still co

Re: [PATCH v5 02/12] ctype: support iscntrl, ispunct, isxdigit and isprint

2012-10-14 Thread René Scharfe
Am 14.10.2012 15:25, schrieb Nguyen Thai Ngoc Duy: On Sun, Oct 14, 2012 at 7:59 PM, René Scharfe wrote: With that, couldn't you squeeze the other two classes into the existing sane_type? No there are still conflicts: 9, 10 and 13 as spaces (vs controls) and 123, 124 and 126 as regex/pathspec

Re: [PATCH v5 02/12] ctype: support iscntrl, ispunct, isxdigit and isprint

2012-10-14 Thread Nguyen Thai Ngoc Duy
On Sun, Oct 14, 2012 at 7:59 PM, René Scharfe wrote: >> +const unsigned char sane_ctype2[256] = { >> + CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, /* >> 0..15 */ >> + CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, /* >> 16..31 */ >> + 0, PU,

Re: [PATCH v5 02/12] ctype: support iscntrl, ispunct, isxdigit and isprint

2012-10-14 Thread René Scharfe
Am 14.10.2012 04:35, schrieb Nguyễn Thái Ngọc Duy: Signed-off-by: Nguyễn Thái Ngọc Duy --- ctype.c | 18 ++ git-compat-util.h | 13 + 2 files changed, 31 insertions(+) diff --git a/ctype.c b/ctype.c index faeaf34..b4bf48a 100644 --- a/ctype.c +++ b/cty

Re: [PATCH v5 02/12] ctype: support iscntrl, ispunct, isxdigit and isprint

2012-10-13 Thread Nguyen Thai Ngoc Duy
On Sun, Oct 14, 2012 at 12:02 PM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> Signed-off-by: Nguyễn Thái Ngọc Duy >> --- > > The description to justify why it is ctype2[] seems to have been > lost. Intended? Nope. I added the description after generating patches and forgot to up

Re: [PATCH v5 02/12] ctype: support iscntrl, ispunct, isxdigit and isprint

2012-10-13 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- The description to justify why it is ctype2[] seems to have been lost. Intended? > ctype.c | 18 ++ > git-compat-util.h | 13 + > 2 files changed, 31 insertions(+) > > diff --git a

[PATCH v5 02/12] ctype: support iscntrl, ispunct, isxdigit and isprint

2012-10-13 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- ctype.c | 18 ++ git-compat-util.h | 13 + 2 files changed, 31 insertions(+) diff --git a/ctype.c b/ctype.c index faeaf34..b4bf48a 100644 --- a/ctype.c +++ b/ctype.c @@ -26,6 +26,24 @@ const unsigned char sane_ctype[2