diff --git a/lib83/ctype.c b/lib83/ctype.c index db4fe4a..8b9b58d 100644 --- a/lib83/ctype.c +++ b/lib83/ctype.c @@ -12,7 +12,7 @@ #define GRAPH 0x80 // TODO. -static unsigned char tab[256] = { +static const unsigned char tab[256] = { GRAPH, LOWER|SPECL|ALPHA, LOWER|SPECL|ALPHA, LOWER|SPECL|ALPHA, LOWER|SPECL|ALPHA, GRAPH, GRAPH, GRAPH, SPECL|GRAPH, SPECL|GRAPH, SPECL|GRAPH, SPECL|GRAPH, SPECL|GRAPH, SPECL|GRAPH, SPECL|GRAPH, ALPHA|UPPER|SPECL, GRAPH|SPECL, SPECL, SPECL, GRAPH|SPECL, GRAPH|SPECL, GRAPH|SPECL, GRAPH|SPECL, SPECL, SPECL, SPECL, SPECL, SPECL, SPECL, SPECL, GRAPH|SPECL, GRAPH|SPECL, SPACE, PUNCT|SPECL, PUNCT|SPECL, SPECL|GRAPH, SPECL, SPECL|GRAPH, PUNCT|SPECL|GRAPH, PUNCT|SPECL|GRAPH, PUNCT|SPECL|GRAPH, PUNCT|SPECL|GRAPH, SPECL|GRAPH, SPECL|GRAPH, PUNCT|SPECL|GRAPH, SPECL|GRAPH, PUNCT|SPECL|GRAPH, SPECL|GRAPH, diff --git a/lib83/stddef.h b/lib83/stddef.h new file mode 100644 index 0000000..1429181 --- /dev/null +++ b/lib83/stddef.h @@ -0,0 +1,23 @@ + +#ifndef _STDDEF_H +#define _STDDEF_H + +#define NULL ((void *)0) + +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned long uint32_t; + +typedef signed char int8_t; +typedef signed short int16_t; +typedef signed long int32_t; + +typedef uint16_t size_t; +typedef int16_t ssize_t; +typedef int16_t ptrdiff_t; + +#define true 1 +#define false 0 + +#endif + diff --git a/lib83/string.h b/lib83/string.h new file mode 100644 index 0000000..e69de29 diff --git a/main.c b/main.c index f53dd5f..b3d8fd5 100644 --- a/main.c +++ b/main.c @@ -1,5 +1,7 @@ #include +#include void main() { - assert(0); + bool b = 0; + assert(b); }