1*2fe8fb19SBen Gras /* $NetBSD: cclass.h,v 1.7 2003/08/07 16:43:19 agc Exp $ */ 2*2fe8fb19SBen Gras 3b7061124SArun Thomas /*- 4b7061124SArun Thomas * Copyright (c) 1992, 1993, 1994 5b7061124SArun Thomas * The Regents of the University of California. All rights reserved. 6b7061124SArun Thomas * 7b7061124SArun Thomas * This code is derived from software contributed to Berkeley by 8b7061124SArun Thomas * Henry Spencer. 9b7061124SArun Thomas * 10b7061124SArun Thomas * Redistribution and use in source and binary forms, with or without 11b7061124SArun Thomas * modification, are permitted provided that the following conditions 12b7061124SArun Thomas * are met: 13b7061124SArun Thomas * 1. Redistributions of source code must retain the above copyright 14b7061124SArun Thomas * notice, this list of conditions and the following disclaimer. 15b7061124SArun Thomas * 2. Redistributions in binary form must reproduce the above copyright 16b7061124SArun Thomas * notice, this list of conditions and the following disclaimer in the 17b7061124SArun Thomas * documentation and/or other materials provided with the distribution. 18*2fe8fb19SBen Gras * 3. Neither the name of the University nor the names of its contributors 19*2fe8fb19SBen Gras * may be used to endorse or promote products derived from this software 20*2fe8fb19SBen Gras * without specific prior written permission. 21*2fe8fb19SBen Gras * 22*2fe8fb19SBen Gras * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23*2fe8fb19SBen Gras * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24*2fe8fb19SBen Gras * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25*2fe8fb19SBen Gras * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26*2fe8fb19SBen Gras * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27*2fe8fb19SBen Gras * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28*2fe8fb19SBen Gras * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29*2fe8fb19SBen Gras * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30*2fe8fb19SBen Gras * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31*2fe8fb19SBen Gras * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32*2fe8fb19SBen Gras * SUCH DAMAGE. 33*2fe8fb19SBen Gras * 34*2fe8fb19SBen Gras * @(#)cclass.h 8.3 (Berkeley) 3/20/94 35*2fe8fb19SBen Gras */ 36*2fe8fb19SBen Gras 37*2fe8fb19SBen Gras /*- 38*2fe8fb19SBen Gras * Copyright (c) 1992, 1993, 1994 Henry Spencer. 39*2fe8fb19SBen Gras * 40*2fe8fb19SBen Gras * This code is derived from software contributed to Berkeley by 41*2fe8fb19SBen Gras * Henry Spencer. 42*2fe8fb19SBen Gras * 43*2fe8fb19SBen Gras * Redistribution and use in source and binary forms, with or without 44*2fe8fb19SBen Gras * modification, are permitted provided that the following conditions 45*2fe8fb19SBen Gras * are met: 46*2fe8fb19SBen Gras * 1. Redistributions of source code must retain the above copyright 47*2fe8fb19SBen Gras * notice, this list of conditions and the following disclaimer. 48*2fe8fb19SBen Gras * 2. Redistributions in binary form must reproduce the above copyright 49*2fe8fb19SBen Gras * notice, this list of conditions and the following disclaimer in the 50*2fe8fb19SBen Gras * documentation and/or other materials provided with the distribution. 51b7061124SArun Thomas * 3. All advertising materials mentioning features or use of this software 52b7061124SArun Thomas * must display the following acknowledgement: 53b7061124SArun Thomas * This product includes software developed by the University of 54b7061124SArun Thomas * California, Berkeley and its contributors. 55b7061124SArun Thomas * 4. Neither the name of the University nor the names of its contributors 56b7061124SArun Thomas * may be used to endorse or promote products derived from this software 57b7061124SArun Thomas * without specific prior written permission. 58b7061124SArun Thomas * 59b7061124SArun Thomas * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 60b7061124SArun Thomas * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 61b7061124SArun Thomas * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 62b7061124SArun Thomas * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 63b7061124SArun Thomas * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 64b7061124SArun Thomas * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 65b7061124SArun Thomas * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 66b7061124SArun Thomas * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 67b7061124SArun Thomas * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 68b7061124SArun Thomas * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 69b7061124SArun Thomas * SUCH DAMAGE. 70b7061124SArun Thomas * 71b7061124SArun Thomas * @(#)cclass.h 8.3 (Berkeley) 3/20/94 72b7061124SArun Thomas */ 73b7061124SArun Thomas 74b7061124SArun Thomas /* character-class table */ 75*2fe8fb19SBen Gras static const struct cclass { 76*2fe8fb19SBen Gras const char *name; 77*2fe8fb19SBen Gras const char *chars; 78*2fe8fb19SBen Gras const char *multis; 79b7061124SArun Thomas } cclasses[] = { 80*2fe8fb19SBen Gras { "alnum", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ 81*2fe8fb19SBen Gras 0123456789", "" }, 82*2fe8fb19SBen Gras { "alpha", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", 83*2fe8fb19SBen Gras "" }, 84e3f68488SBen Gras { "blank", " \t", "" }, 85*2fe8fb19SBen Gras { "cntrl", "\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24\ 86*2fe8fb19SBen Gras \25\26\27\30\31\32\33\34\35\36\37\177", "" }, 87e3f68488SBen Gras { "digit", "0123456789", "" }, 88*2fe8fb19SBen Gras { "graph", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ 89*2fe8fb19SBen Gras 0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", 90*2fe8fb19SBen Gras "" }, 91*2fe8fb19SBen Gras { "lower", "abcdefghijklmnopqrstuvwxyz", 92*2fe8fb19SBen Gras "" }, 93*2fe8fb19SBen Gras { "print", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ 94*2fe8fb19SBen Gras 0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ", 95*2fe8fb19SBen Gras "" }, 96*2fe8fb19SBen Gras { "punct", "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", 97*2fe8fb19SBen Gras "" }, 98e3f68488SBen Gras { "space", "\t\n\v\f\r ", "" }, 99*2fe8fb19SBen Gras { "upper", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 100*2fe8fb19SBen Gras "" }, 101*2fe8fb19SBen Gras { "xdigit", "0123456789ABCDEFabcdef", 102*2fe8fb19SBen Gras "" }, 103e3f68488SBen Gras { NULL, 0, "" } 104b7061124SArun Thomas }; 105