1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
/*
* util.h
*
* Some useful defines.
*
* $Id: util.h,v 1.4 1998/09/09 21:06:38 gert Exp $
*
*/
/*
* Generic constants
*/
#undef TRUE
#undef FALSE
#define TRUE (0==0)
#define FALSE (0==1)
#undef OK
#undef FAIL
#define OK (0)
#define FAIL (-1)
#define UNKNOWN_EVENT (-2)
#define INTERRUPTED (0x4d00)
#ifndef M_PI
# define M_PI 3.14159265358979323846
#endif
/*
* Special modem control characters
*/
#undef ETX
#undef NL
#undef CR
#undef DLE
#undef XON
#undef XOFF
#undef DC4
#undef CAN
#undef FS
#define ETX (0x03)
#define NL (0x0a)
#define CR (0x0d)
#define DLE (0x10)
#define XON (0x11)
#define XOFF (0x13)
#define DC4 (0x14)
#define CAN (0x18)
#define FS (0x1c)
/*
* Check, that the system we are running on has proper bit sizes and
* does proper handling of right bit shift operations
*/
extern void check_system (void);
/*
* Useful path concatenation function
*/
extern void make_path (char *result, char *path, char *name);
/*
* Wildmat match for strings
*/
extern int wildmat(char *text, char *p, int length);
|