Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/regex/utils.h
Show All 33 Lines | |||||
* | * | ||||
* @(#)utils.h 8.3 (Berkeley) 3/20/94 | * @(#)utils.h 8.3 (Berkeley) 3/20/94 | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
/* utility definitions */ | /* utility definitions */ | ||||
#define DUPMAX _POSIX2_RE_DUP_MAX /* xxx is this right? */ | #define DUPMAX _POSIX2_RE_DUP_MAX /* xxx is this right? */ | ||||
#define INFINITY (DUPMAX + 1) | #define INFINITY (DUPMAX + 1) | ||||
#define NC (CHAR_MAX - CHAR_MIN + 1) | #define NC_MAX (CHAR_MAX - CHAR_MIN + 1) | ||||
#define NC ((MB_CUR_MAX == 1) ? \ | |||||
(CHAR_MAX - CHAR_MIN + 1) : (CHAR_MAX + 1)) | |||||
typedef unsigned char uch; | typedef unsigned char uch; | ||||
/* switch off assertions (if not already off) if no REDEBUG */ | /* switch off assertions (if not already off) if no REDEBUG */ | ||||
#ifndef REDEBUG | #ifndef REDEBUG | ||||
#ifndef NDEBUG | #ifndef NDEBUG | ||||
#define NDEBUG /* no assertions please */ | #define NDEBUG /* no assertions please */ | ||||
#endif | #endif | ||||
#endif | #endif | ||||
#include <assert.h> | #include <assert.h> | ||||
/* for old systems with bcopy() but no memmove() */ | /* for old systems with bcopy() but no memmove() */ | ||||
#ifdef USEBCOPY | #ifdef USEBCOPY | ||||
#define memmove(d, s, c) bcopy(s, d, c) | #define memmove(d, s, c) bcopy(s, d, c) | ||||
#endif | #endif |