1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22/* 23 * Copyright 1996-2003 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27#pragma ident "%Z%%M% %I% %E% SMI" 28 29/* 30 * TOKENS THAT MARK SUBEXPRESSIONS IN COMPILED REGULAR EXPRESSIONS 31 * 32 * regcmp() uses the tokens in compiled regular expressions, and 33 * regex() decodes them when checking character strings against 34 * compiled regular expressions. 35 * 36 * NOTE: To maintain backward compatibility with previous versions of regcmp() 37 * and regex(), these values must stay the same. 38 */ 39 40#ifndef _LIBC_REGEX_H 41#define _LIBC_REGEX_H 42 43 44/* TOKENS USED IN COMPILED REGULAR EXPRESSIONS */ 45 46#define ASCII_CHAR 20 47#define ANY_CHAR 16 48#define COUNT 0x3 49#define COUNTED_GROUP 48 50#define END_GROUP 44 51#define END_REGEX 52 52#define END_SAVED_GROUP 12 53#define END_OF_STRING_MARK 28 54#define IN_ASCII_CHAR_CLASS 80 55#define IN_MULTIBYTE_CHAR_CLASS 72 56#define IN_OLD_ASCII_CHAR_CLASS 24 57#define MAX_SINGLE_BYTE_INT 0xff 58#define MULTIBYTE_CHAR 36 59#define NOT_IN_ASCII_CHAR_CLASS 84 60#define NOT_IN_MULTIBYTE_CHAR_CLASS 76 61#define NOT_IN_OLD_ASCII_CHAR_CLASS 8 62#define ONE_OR_MORE 0x2 63#define ONE_OR_MORE_GROUP 68 64#define SAVED_GROUP 60 65#define SIMPLE_GROUP 40 66#define START_OF_STRING_MARK 32 67#define THRU 16 68#define TIMES_256_SHIFT 8 69#ifdef UNLIMITED 70#undef UNLIMITED 71#endif 72#define UNLIMITED 0xff 73#define ZERO_OR_MORE 0x1 74#define ZERO_OR_MORE_GROUP 56 75 76 77/* NUMBER OF SUBSTRING POINTERS THAT MAY BE RETURNED BY regex() */ 78 79#define NSUBSTRINGS 10 80 81#endif /* #ifndef _LIBC_REGEX_H */ 82