add support for creating a list of codes or atoms incrementally.

This commit is contained in:
Vítor Santos Costa
2008-12-22 13:49:44 +00:00
parent 7598b56c38
commit 8efcdf7eaa
8 changed files with 133 additions and 98 deletions

View File

@@ -218,23 +218,6 @@ mkfunction(iswupper)
mkfunction(iswpunct)
mkfunction(iswspace)
#ifdef __SWI_PROLOG__
#define INIT_DEF(Type, Name, Size) \
static void init_ ## Name (void) {} \
static const Type Name[] {
#define ADD_DEF2(Atom, Type) \
{ Atom, Type },
#define ADD_DEF5(Atom, Type, Reverse, Arity, Ctx) \
{ Atom, Type, Reverse, Arity, Ctx },
\
#define END_DEFS(Atom, F) \
{ Atom, F }
}
#endif
INIT_DEF(char_type, char_types, 26)
ADD_DEF2(ATOM_alnum, fiswalnum)
ADD_DEF2(ATOM_csym, fiscsym )