155853Sbostic /*- 266362Sbostic * Copyright (c) 1992, 1993, 1994 Henry Spencer. 366362Sbostic * Copyright (c) 1992, 1993, 1994 461164Sbostic * The Regents of the University of California. All rights reserved. 555853Sbostic * 655853Sbostic * This code is derived from software contributed to Berkeley by 7*66406Sbostic * Henry Spencer. 855853Sbostic * 955853Sbostic * %sccs.include.redist.c% 1055853Sbostic * 11*66406Sbostic * @(#)utils.h 8.3 (Berkeley) 03/20/94 1255853Sbostic */ 1355853Sbostic 1455853Sbostic /* utility definitions */ 1555853Sbostic #define DUPMAX _POSIX2_RE_DUP_MAX /* xxx is this right? */ 1666362Sbostic #define INFINITY (DUPMAX + 1) 1766362Sbostic #define NC (CHAR_MAX - CHAR_MIN + 1) 1866362Sbostic typedef unsigned char uch; 1960201Sbostic 2066362Sbostic /* switch off assertions (if not already off) if no REDEBUG */ 2156355Sbostic #ifndef REDEBUG 2256355Sbostic #ifndef NDEBUG 2356355Sbostic #define NDEBUG /* no assertions please */ 2455853Sbostic #endif 2556355Sbostic #endif 2656355Sbostic #include <assert.h> 2766362Sbostic 2866362Sbostic /* for old systems with bcopy() but no memmove() */ 2966362Sbostic #ifdef USEBCOPY 3066362Sbostic #define memmove(d, s, c) bcopy(s, d, c) 3166362Sbostic #endif 32