Loading...
regex/cclass.h Libc-262 Libc-498
--- Libc/Libc-262/regex/cclass.h
+++ Libc/Libc-498/regex/cclass.h
@@ -1,25 +1,5 @@
-/*
- * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * The contents of this file constitute Original Code as defined in and
- * are subject to the Apple Public Source License Version 1.1 (the
- * "License").  You may not use this file except in compliance with the
- * License.  Please obtain a copy of the License at
- * http://www.apple.com/publicsource and read it before using this file.
- * 
- * This Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
- * License for the specific language governing rights and limitations
- * under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-/*
+/*-
+ * Copyright (c) 1992, 1993, 1994 Henry Spencer.
  * Copyright (c) 1992, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
  *
@@ -53,36 +33,31 @@
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
+ *
+ *	@(#)cclass.h	8.3 (Berkeley) 3/20/94
+ * $FreeBSD: src/lib/libc/regex/cclass.h,v 1.4 2002/03/22 23:41:56 obrien Exp $
  */
+
+
+typedef enum {CALNUM, CALPHA, CBLANK, CCNTRL, CDIGIT, CGRAPH,
+	      CLOWER, CPRINT, CPUNCT, CSPACE, CUPPER, CXDIGIT} citype;
 
 /* character-class table */
 static struct cclass {
 	char *name;
-	char *chars;
-	char *multis;
+	citype fidx;
 } cclasses[] = {
-	"alnum",	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
-0123456789",				"",
-	"alpha",	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
-					"",
-	"blank",	" \t",		"",
-	"cntrl",	"\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24\
-\25\26\27\30\31\32\33\34\35\36\37\177",	"",
-	"digit",	"0123456789",	"",
-	"graph",	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
-0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
-					"",
-	"lower",	"abcdefghijklmnopqrstuvwxyz",
-					"",
-	"print",	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
-0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ",
-					"",
-	"punct",	"!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
-					"",
-	"space",	"\t\n\v\f\r ",	"",
-	"upper",	"ABCDEFGHIJKLMNOPQRSTUVWXYZ",
-					"",
-	"xdigit",	"0123456789ABCDEFabcdef",
-					"",
-	NULL,		0,		""
+	{"alnum",       CALNUM},
+	{"alpha",       CALPHA},
+	{"blank",       CBLANK},
+	{"cntrl",       CCNTRL},
+	{"digit",       CDIGIT},
+	{"graph",       CGRAPH},
+	{"lower",       CLOWER},
+	{"print",       CPRINT},
+	{"punct",       CPUNCT},
+	{"space",       CSPACE},
+	{"upper",       CUPPER},
+	{"xdigit",      CXDIGIT},
+	{NULL,          }
 };