/[dtapublic]/to_be_filed/sf_code/esrgpcpj/shared/tcl_base/regcustom.h
ViewVC logotype

Annotation of /to_be_filed/sf_code/esrgpcpj/shared/tcl_base/regcustom.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 29 - (hide annotations) (download)
Sat Oct 8 07:08:47 2016 UTC (7 years, 5 months ago) by dashley
File MIME type: text/plain
File size: 4458 byte(s)
Directories relocated.
1 dashley 25 /* $Header: /cvsroot/esrg/sfesrg/esrgpcpj/shared/tcl_base/regcustom.h,v 1.1.1.1 2001/06/13 04:31:35 dtashley Exp $ */
2    
3     /*
4     * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
5     *
6     * Development of this software was funded, in part, by Cray Research Inc.,
7     * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
8     * Corporation, none of whom are responsible for the results. The author
9     * thanks all of them.
10     *
11     * Redistribution and use in source and binary forms -- with or without
12     * modification -- are permitted for any purpose, provided that
13     * redistributions in source form retain this entire copyright notice and
14     * indicate the origin and nature of any modifications.
15     *
16     * I'd appreciate being given credit for this package in the documentation
17     * of software which uses it, but that is not a requirement.
18     *
19     * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
20     * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21     * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
22     * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28     * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29     */
30    
31     /* headers if any */
32     #include "tclInt.h"
33    
34     /* overrides for regguts.h definitions, if any */
35     #define FUNCPTR(name, args) (*name) _ANSI_ARGS_(args)
36     #define MALLOC(n) ckalloc(n)
37     #define FREE(p) ckfree(VS(p))
38     #define REALLOC(p,n) ckrealloc(VS(p),n)
39    
40    
41    
42     /*
43     * Do not insert extras between the "begin" and "end" lines -- this
44     * chunk is automatically extracted to be fitted into regex.h.
45     */
46     /* --- begin --- */
47     /* ensure certain things don't sneak in from system headers */
48     #ifdef __REG_WIDE_T
49     #undef __REG_WIDE_T
50     #endif
51     #ifdef __REG_WIDE_COMPILE
52     #undef __REG_WIDE_COMPILE
53     #endif
54     #ifdef __REG_WIDE_EXEC
55     #undef __REG_WIDE_EXEC
56     #endif
57     #ifdef __REG_REGOFF_T
58     #undef __REG_REGOFF_T
59     #endif
60     #ifdef __REG_VOID_T
61     #undef __REG_VOID_T
62     #endif
63     #ifdef __REG_CONST
64     #undef __REG_CONST
65     #endif
66     #ifdef __REG_NOFRONT
67     #undef __REG_NOFRONT
68     #endif
69     #ifdef __REG_NOCHAR
70     #undef __REG_NOCHAR
71     #endif
72     /* interface types */
73     #define __REG_WIDE_T Tcl_UniChar
74     #define __REG_REGOFF_T long /* not really right, but good enough... */
75     #define __REG_VOID_T VOID
76     #define __REG_CONST CONST
77     /* names and declarations */
78     #define __REG_WIDE_COMPILE TclReComp
79     #define __REG_WIDE_EXEC TclReExec
80     #define __REG_NOFRONT /* don't want regcomp() and regexec() */
81     #define __REG_NOCHAR /* or the char versions */
82     #define regfree TclReFree
83     #define regerror TclReError
84     /* --- end --- */
85    
86    
87    
88     /* internal character type and related */
89     typedef Tcl_UniChar chr; /* the type itself */
90     typedef int pchr; /* what it promotes to */
91     typedef unsigned uchr; /* unsigned type that will hold a chr */
92     typedef int celt; /* type to hold chr, MCCE number, or NOCELT */
93     #define NOCELT (-1) /* celt value which is not valid chr or MCCE */
94     #define CHR(c) (UCHAR(c)) /* turn char literal into chr literal */
95     #define DIGITVAL(c) ((c)-'0') /* turn chr digit into its value */
96     #define CHRBITS 16 /* bits in a chr; must not use sizeof */
97     #define CHR_MIN 0x0000 /* smallest and largest chr; the value */
98     #define CHR_MAX 0xffff /* CHR_MAX-CHR_MIN+1 should fit in uchr */
99    
100     /* functions operating on chr */
101     #define iscalnum(x) Tcl_UniCharIsAlnum(x)
102     #define iscalpha(x) Tcl_UniCharIsAlpha(x)
103     #define iscdigit(x) Tcl_UniCharIsDigit(x)
104     #define iscspace(x) Tcl_UniCharIsSpace(x)
105    
106     /* name the external functions */
107     #define compile TclReComp
108     #define exec TclReExec
109    
110     /* enable/disable debugging code (by whether REG_DEBUG is defined or not) */
111     #if 0 /* no debug unless requested by makefile */
112     #define REG_DEBUG /* */
113     #endif
114    
115     /* and pick up the standard header */
116     #include "regex.h"
117    
118     /* $History: regcustom.h $
119     *
120     * ***************** Version 1 *****************
121     * User: Dtashley Date: 1/02/01 Time: 12:08a
122     * Created in $/IjuScripter, IjuConsole/Source/Tcl Base
123     * Initial check-in.
124     */
125    
126     /* End of REGCUSTOM.H */

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25