vis-lua: expose win.syntax
[vis.git] / util.h
blobf2e3d65448ba5e28317953db5be2f1f635ec82b8
1 #ifndef UTIL_H
2 #define UTIL_H
4 #define LENGTH(x) ((int)(sizeof (x) / sizeof *(x)))
5 #define MIN(a, b) ((a) > (b) ? (b) : (a))
6 #define MAX(a, b) ((a) < (b) ? (b) : (a))
8 /* is c the start of a utf8 sequence? */
9 #define ISUTF8(c) (((c)&0xC0)!=0x80)
10 #define ISASCII(ch) ((unsigned char)ch < 0x80)
12 #endif