Re: [PATCH v5 02/12] ctype: support iscntrl, ispunct, isxdigit and isprint
- From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
- Date
- Oct 14, 2012, 13:59 UTC
- Message-ID
- <507AC543.2020402@lsrfire.ath.cx>
- In-Reply-To
- <CACsJy8B+6OPkP6ijMDzm+n0eHnDZ4Pj8UO_KasdfEP4wF+_hww@mail.gmail.com>
Am 14.10.2012 15:25, schrieb Nguyen Thai Ngoc Duy:
Show 7 quoted lines
> On Sun, Oct 14, 2012 at 7:59 PM, René Scharfe > <rene.scharfe@lsrfire.ath.cx> 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 special (vs punctuation).
That's not a problem, an entry in the table can have more than one bit set -- just OR them together in ctype.c. It may not look as nice, but that's OK. You could also define a character for GIT_SPACE | GIT_CNTRL etc. for cosmetic reasons.
René