Fixed the empty input segfault
[iomenu.git] / util.h
blob6029be85a73d06bd1057ad6e353bf4465d6ec3bd
1 /* enums */
2 enum { FALSE = 0, TRUE = 1 };
3 enum { NEXT = 0, PREV = 1, BOTH = 2 };
5 /* macros */
6 #define LENGTH(x) (sizeof(x) / sizeof(*x))
7 #define CONTROL(char) (char ^ 0x40)
8 #define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
9 #define MAX(X, Y) (((X) > (Y)) ? (X) : (Y))
11 void die(const char *);
12 struct termios set_terminal(int);