Ardour  9.0-pre0-582-g084a23a80d
lctype.h File Reference
#include "lua.h"
#include <limits.h>
#include "llimits.h"
Include dependency graph for lctype.h:

Go to the source code of this file.

Macros

#define LUA_USE_CTYPE   0
 
#define ALPHABIT   0
 
#define DIGITBIT   1
 
#define PRINTBIT   2
 
#define SPACEBIT   3
 
#define XDIGITBIT   4
 
#define MASK(B)   (1 << (B))
 
#define testprop(c, p)   (luai_ctype_[(c)+1] & (p))
 
#define lislalpha(c)   testprop(c, MASK(ALPHABIT))
 
#define lislalnum(c)   testprop(c, (MASK(ALPHABIT) | MASK(DIGITBIT)))
 
#define lisdigit(c)   testprop(c, MASK(DIGITBIT))
 
#define lisspace(c)   testprop(c, MASK(SPACEBIT))
 
#define lisprint(c)   testprop(c, MASK(PRINTBIT))
 
#define lisxdigit(c)   testprop(c, MASK(XDIGITBIT))
 
#define ltolower(c)   ((c) | ('A' ^ 'a'))
 

Variables

const lu_byte luai_ctype_ [UCHAR_MAX+2]
 

Macro Definition Documentation

◆ ALPHABIT

#define ALPHABIT   0

Definition at line 39 of file lctype.h.

◆ DIGITBIT

#define DIGITBIT   1

Definition at line 40 of file lctype.h.

◆ lisdigit

#define lisdigit (   c)    testprop(c, MASK(DIGITBIT))

Definition at line 59 of file lctype.h.

◆ lislalnum

#define lislalnum (   c)    testprop(c, (MASK(ALPHABIT) | MASK(DIGITBIT)))

Definition at line 58 of file lctype.h.

◆ lislalpha

#define lislalpha (   c)    testprop(c, MASK(ALPHABIT))

Definition at line 57 of file lctype.h.

◆ lisprint

#define lisprint (   c)    testprop(c, MASK(PRINTBIT))

Definition at line 61 of file lctype.h.

◆ lisspace

#define lisspace (   c)    testprop(c, MASK(SPACEBIT))

Definition at line 60 of file lctype.h.

◆ lisxdigit

#define lisxdigit (   c)    testprop(c, MASK(XDIGITBIT))

Definition at line 62 of file lctype.h.

◆ ltolower

#define ltolower (   c)    ((c) | ('A' ^ 'a'))

Definition at line 67 of file lctype.h.

◆ LUA_USE_CTYPE

#define LUA_USE_CTYPE   0

Definition at line 23 of file lctype.h.

◆ MASK

#define MASK (   B)    (1 << (B))

Definition at line 46 of file lctype.h.

◆ PRINTBIT

#define PRINTBIT   2

Definition at line 41 of file lctype.h.

◆ SPACEBIT

#define SPACEBIT   3

Definition at line 42 of file lctype.h.

◆ testprop

#define testprop (   c,
 
)    (luai_ctype_[(c)+1] & (p))

Definition at line 52 of file lctype.h.

◆ XDIGITBIT

#define XDIGITBIT   4

Definition at line 43 of file lctype.h.

Variable Documentation

◆ luai_ctype_

const lu_byte luai_ctype_[UCHAR_MAX+2]
extern