xref: /csrg-svn/lib/libc/regex/utils.h (revision 66362)
155853Sbostic /*-
2*66362Sbostic  * Copyright (c) 1992, 1993, 1994 Henry Spencer.
3*66362Sbostic  * 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
755853Sbostic  * Henry Spencer of the University of Toronto.
855853Sbostic  *
955853Sbostic  * %sccs.include.redist.c%
1055853Sbostic  *
11*66362Sbostic  *	@(#)utils.h	8.2 (Berkeley) 03/16/94
1255853Sbostic  */
1355853Sbostic 
1455853Sbostic /* utility definitions */
1555853Sbostic #define	DUPMAX		_POSIX2_RE_DUP_MAX	/* xxx is this right? */
16*66362Sbostic #define	INFINITY	(DUPMAX + 1)
17*66362Sbostic #define	NC		(CHAR_MAX - CHAR_MIN + 1)
18*66362Sbostic typedef unsigned char uch;
1960201Sbostic 
20*66362Sbostic /* 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>
27*66362Sbostic 
28*66362Sbostic /* for old systems with bcopy() but no memmove() */
29*66362Sbostic #ifdef USEBCOPY
30*66362Sbostic #define	memmove(d, s, c)	bcopy(s, d, c)
31*66362Sbostic #endif
32