mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-05 02:38:31 +00:00
Add LISP interpreter
This commit is contained in:
parent
4f98ad1054
commit
d31bebdd2d
84 changed files with 9081 additions and 0 deletions
43
tool/plinko/lib/char.h
Normal file
43
tool/plinko/lib/char.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_PLINKO_LIB_CHAR_H_
|
||||
#define COSMOPOLITAN_TOOL_PLINKO_LIB_CHAR_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
static inline pureconst bool IsC0(int c) {
|
||||
return (0 <= c && c < 32) || c == 0177;
|
||||
}
|
||||
|
||||
static inline pureconst bool IsDigit(int c) {
|
||||
return L'0' <= c && c <= L'9';
|
||||
}
|
||||
|
||||
static inline pureconst bool IsUpper(int c) {
|
||||
return L'A' <= c && c <= L'Z';
|
||||
}
|
||||
|
||||
static inline pureconst bool IsLower(int c) {
|
||||
return L'a' <= c && c <= L'z';
|
||||
}
|
||||
|
||||
static inline pureconst bool IsMathAlnum(int c) {
|
||||
return 0x1d400 <= c && c <= 0x1d7ff;
|
||||
}
|
||||
|
||||
static inline pureconst bool IsControl(int c) {
|
||||
return (0 <= c && c <= 0x1F) || (0x7F <= c && c <= 0x9F);
|
||||
}
|
||||
|
||||
static noinstrument pureconst inline int ToUpper(int c) {
|
||||
return 'a' <= c && c <= 'z' ? 'A' - 'a' + c : c;
|
||||
}
|
||||
|
||||
int GetDiglet(int) pureconst;
|
||||
bool IsHex(int) pureconst;
|
||||
bool IsParen(int) pureconst;
|
||||
bool IsSpace(int) pureconst;
|
||||
int GetMonospaceCharacterWidth(int) pureconst;
|
||||
bool IsWide(int) pureconst;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_PLINKO_LIB_CHAR_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue