xref: /original-bsd/lib/libc/regex/utils.h (revision a8f82b20)
1 /*-
2  * Copyright (c) 1992, 1993, 1994 Henry Spencer.
3  * Copyright (c) 1992, 1993, 1994
4  *	The Regents of the University of California.  All rights reserved.
5  *
6  * This code is derived from software contributed to Berkeley by
7  * Henry Spencer of the University of Toronto.
8  *
9  * %sccs.include.redist.c%
10  *
11  *	@(#)utils.h	8.2 (Berkeley) 03/16/94
12  */
13 
14 /* utility definitions */
15 #define	DUPMAX		_POSIX2_RE_DUP_MAX	/* xxx is this right? */
16 #define	INFINITY	(DUPMAX + 1)
17 #define	NC		(CHAR_MAX - CHAR_MIN + 1)
18 typedef unsigned char uch;
19 
20 /* switch off assertions (if not already off) if no REDEBUG */
21 #ifndef REDEBUG
22 #ifndef NDEBUG
23 #define	NDEBUG	/* no assertions please */
24 #endif
25 #endif
26 #include <assert.h>
27 
28 /* for old systems with bcopy() but no memmove() */
29 #ifdef USEBCOPY
30 #define	memmove(d, s, c)	bcopy(s, d, c)
31 #endif
32