[Commit] Character classification functions

2003-11-04 Thread Peter Gibbs
The infrastructure is now in place to test for character classes other than is_digit. Character class functions may be specific to one class, or generic; this split is controlled by the sequence of the enums in chartype.h Currently only is_digit has a dedicated function call slot, as this is the o

Re: Character classification functions

2003-11-02 Thread Dan Sugalski
At 5:37 PM +0200 11/1/03, Peter Gibbs wrote: The current chartype struct contains an is_digit function. Do we want to add is_alpha, is_space, etc., or will a single is_ctype function, with an enum parameter, suffice? It'd suffice, but I'd rather not do that for the moment. When these get called a

Re: Character classification functions

2003-11-01 Thread Peter Gibbs
"Michael Scott" <[EMAIL PROTECTED]> wrote: > Since the enum will specify what you yourself call character classes > can't we call the function is_charclass() instead? The isascii etc macros have been defined in a header called ctype.h for some time, and glibc actually has a macro 'isctype' whic

Re: Character classification functions

2003-11-01 Thread Leopold Toetsch
Peter Gibbs <[EMAIL PROTECTED]> wrote: > I prefer the single function approach, so that is what I will start > implementing if there are no timeous objections. Yep, a single is_ctype() should really be enough. > Regards > Peter Gibbs leo

Re: Character classification functions

2003-11-01 Thread Michael Scott
On 1 Nov 2003, at 16:37, Peter Gibbs wrote: The current chartype struct contains an is_digit function. Do we want to add is_alpha, is_space, etc., or will a single is_ctype function, with an enum parameter, suffice? Excuse me for being naming fusspot for a second. What Parrot calls a chartype

Character classification functions

2003-11-01 Thread Peter Gibbs
The current chartype struct contains an is_digit function. Do we want to add is_alpha, is_space, etc., or will a single is_ctype function, with an enum parameter, suffice? A single function would simplify the addition of new character classes, but at a (small?) cost in speed. It would also keep th