xref: /aosp_15_r20/external/libcups/vcnet/regex/utils.h (revision 5e7646d21f1134fb0638875d812ef646c12ab91e)
1*5e7646d2SAndroid Build Coastguard Worker /* utility definitions */
2*5e7646d2SAndroid Build Coastguard Worker #ifdef _POSIX2_RE_DUP_MAX
3*5e7646d2SAndroid Build Coastguard Worker #define	DUPMAX	_POSIX2_RE_DUP_MAX
4*5e7646d2SAndroid Build Coastguard Worker #else
5*5e7646d2SAndroid Build Coastguard Worker #define	DUPMAX	255
6*5e7646d2SAndroid Build Coastguard Worker #endif
7*5e7646d2SAndroid Build Coastguard Worker #define	INFINITY	(DUPMAX + 1)
8*5e7646d2SAndroid Build Coastguard Worker #define	NC		(CHAR_MAX - CHAR_MIN + 1)
9*5e7646d2SAndroid Build Coastguard Worker typedef unsigned char uch;
10*5e7646d2SAndroid Build Coastguard Worker 
11*5e7646d2SAndroid Build Coastguard Worker /* switch off assertions (if not already off) if no REDEBUG */
12*5e7646d2SAndroid Build Coastguard Worker #ifndef REDEBUG
13*5e7646d2SAndroid Build Coastguard Worker #ifndef NDEBUG
14*5e7646d2SAndroid Build Coastguard Worker #define	NDEBUG	/* no assertions please */
15*5e7646d2SAndroid Build Coastguard Worker #endif
16*5e7646d2SAndroid Build Coastguard Worker #endif
17*5e7646d2SAndroid Build Coastguard Worker #include <assert.h>
18*5e7646d2SAndroid Build Coastguard Worker 
19*5e7646d2SAndroid Build Coastguard Worker /* for old systems with bcopy() but no memmove() */
20*5e7646d2SAndroid Build Coastguard Worker #ifdef USEBCOPY
21*5e7646d2SAndroid Build Coastguard Worker #define	memmove(d, s, c)	bcopy(s, d, c)
22*5e7646d2SAndroid Build Coastguard Worker #endif
23