1894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman/*- 2894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * This code is derived from OpenBSD's libc/regex, original license follows: 3894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * 4894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * This code is derived from OpenBSD's libc/regex, original license follows: 5894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * 6894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * Copyright (c) 1992, 1993, 1994 Henry Spencer. 7894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * Copyright (c) 1992, 1993, 1994 8894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * The Regents of the University of California. All rights reserved. 9894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * 10894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * This code is derived from software contributed to Berkeley by 11894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * Henry Spencer. 12894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * 13894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * Redistribution and use in source and binary forms, with or without 14894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * modification, are permitted provided that the following conditions 15894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * are met: 16894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * 1. Redistributions of source code must retain the above copyright 17894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * notice, this list of conditions and the following disclaimer. 18894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * 2. Redistributions in binary form must reproduce the above copyright 19894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * notice, this list of conditions and the following disclaimer in the 20894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * documentation and/or other materials provided with the distribution. 21894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * 3. Neither the name of the University nor the names of its contributors 22894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * may be used to endorse or promote products derived from this software 23894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * without specific prior written permission. 24894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * 25894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 26894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 29894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * SUCH DAMAGE. 36894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * 37894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman * @(#)cclass.h 8.3 (Berkeley) 3/20/94 38894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman */ 39894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman 40894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman/* character-class table */ 41894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Baumanstatic struct cclass { 42894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman const char *name; 43894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman const char *chars; 44894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman const char *multis; 45894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman} cclasses[] = { 46894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman { "alnum", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ 47894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman0123456789", ""} , 48894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman { "alpha", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", 49894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman ""} , 50894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman { "blank", " \t", ""} , 51894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman { "cntrl", "\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24\ 52894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman\25\26\27\30\31\32\33\34\35\36\37\177", ""} , 53894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman { "digit", "0123456789", ""} , 54894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman { "graph", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ 55894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", 56894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman ""} , 57894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman { "lower", "abcdefghijklmnopqrstuvwxyz", 58894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman ""} , 59894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman { "print", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ 60894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ", 61894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman ""} , 62894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman { "punct", "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", 63894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman ""} , 64894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman { "space", "\t\n\v\f\r ", ""} , 65894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman { "upper", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 66894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman ""} , 67894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman { "xdigit", "0123456789ABCDEFabcdef", 68894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman ""} , 69894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman { NULL, 0, "" } 70894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman}; 71