1999-04-08 05:05:13 +08:00
|
|
|
/* utility definitions */
|
1999-11-14 00:51:33 +08:00
|
|
|
|
|
|
|
#include "regex_extra.h"
|
|
|
|
|
1999-11-13 04:27:52 +08:00
|
|
|
#ifdef _POSIX2_RE_DUP_MAX
|
|
|
|
#define DUPMAX _POSIX2_RE_DUP_MAX
|
|
|
|
#else
|
|
|
|
#define DUPMAX 255
|
1999-04-08 05:05:13 +08:00
|
|
|
#endif
|
|
|
|
#define INFINITY (DUPMAX + 1)
|
|
|
|
#define NC (CHAR_MAX - CHAR_MIN + 1)
|
|
|
|
typedef unsigned char uch;
|
|
|
|
|
|
|
|
/* switch off assertions (if not already off) if no REDEBUG */
|
|
|
|
#ifndef REDEBUG
|
|
|
|
#ifndef NDEBUG
|
|
|
|
#define NDEBUG /* no assertions please */
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
|
|
/* for old systems with bcopy() but no memmove() */
|
|
|
|
#ifdef USEBCOPY
|
|
|
|
#define memmove(d, s, c) bcopy(s, d, c)
|
|
|
|
#endif
|