]>
git.saurik.com Git - wxWidgets.git/blob - src/regex/regcustom.h
1 #ifndef _REGEX_CUSTOM_H_
2 #define _REGEX_CUSTOM_H_
5 * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
7 * Development of this software was funded, in part, by Cray Research Inc.,
8 * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
9 * Corporation, none of whom are responsible for the results. The author
12 * Redistribution and use in source and binary forms -- with or without
13 * modification -- are permitted for any purpose, provided that
14 * redistributions in source form retain this entire copyright notice and
15 * indicate the origin and nature of any modifications.
17 * I'd appreciate being given credit for this package in the documentation
18 * of software which uses it, but that is not a requirement.
20 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
23 * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
26 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 /* FreeBSD, Watcom and DMars require this, CW doesn't have nor need it. */
37 /* Others also don't seem to need it. If you have an error related to */
38 /* (not) including <sys/types.h> please report details to */
39 /* wx-dev@lists.wxwindows.org */
40 #if defined(__UNIX__) || defined(__WATCOMC__) || defined(__DIGITALMARS__)
41 # include <sys/types.h>
50 #include "wx/wxchar.h"
57 #define wx_wchar wxChar
59 /* overrides for regguts.h definitions, if any */
60 #define FUNCPTR(name, args) (*name) args
61 #define MALLOC(n) malloc(n)
62 #define FREE(p) free(VS(p))
63 #define REALLOC(p,n) realloc(VS(p),n)
65 /* internal character type and related */
66 typedef wx_wchar chr
; /* the type itself */
67 typedef unsigned long uchr
; /* unsigned type that will hold a chr */
68 typedef long celt
; /* type to hold chr, MCCE number, or
71 #define NOCELT (-1) /* celt value which is not valid chr or
73 #define CHR(c) ((unsigned char) (c)) /* turn char literal into chr
75 #define DIGITVAL(c) ((c)-'0') /* turn chr digit into its value */
78 # define CHRBITS (SIZEOF_WCHAR_T << 3) /* bits in a chr; must not use sizeof */
79 # define CHR_MAX ((1 << CHRBITS) - 1)
80 # define CHR_MIN 0x00000000 /* smallest and largest chr; the value */
85 #endif /*wxUSE_WCHAR_T*/
87 /* functions operating on chr */
88 #define iscalnum(x) wx_isalnum(x)
89 #define iscalpha(x) wx_isalpha(x)
90 #define iscdigit(x) wx_isdigit(x)
91 #define iscspace(x) wx_isspace(x)
93 extern int wx_strlen(const wx_wchar
* szString
);
95 /* and pick up the standard header */
98 #endif /* _REGEX_CUSTOM_H_ */