1 #define LESSTEST_VERSION 1 2 3 typedef unsigned long wchar; 4 typedef unsigned char byte; 5 typedef unsigned char Attr; 6 typedef unsigned char Color; 7 8 #define NULL_COLOR ((Color)0xff) 9 10 #define ATTR_BOLD (1<<0) 11 #define ATTR_UNDERLINE (1<<1) 12 #define ATTR_STANDOUT (1<<2) 13 #define ATTR_BLINK (1<<3) 14 15 #define ESC '\33' 16 #define LESS_DUMP_CHAR '\35' 17 #define UNICODE_MAX_BYTES 4 18 #define MAX_SCREENBUF_SIZE (16*1024) 19 20 #define RUN_OK 0 21 #define RUN_ERR 1 22 23 #define LTS_CHAR_ATTR '@' 24 #define LTS_CHAR_FG_COLOR '$' 25 #define LTS_CHAR_BG_COLOR '!' 26 #define LTS_CHAR_CURSOR '#' 27 28 #define is_ascii(ch) ((ch) >= ' ' && (ch) < 0x7f) 29 #define pr_ascii(ch) (is_ascii(ch) ? ((char)ch) : '.') 30 31 #undef countof 32 #define countof(a) (sizeof(a)/sizeof(*a)) 33