1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * CDDL HEADER START 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*0Sstevel@tonic-gate * with the License. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*0Sstevel@tonic-gate * See the License for the specific language governing permissions 12*0Sstevel@tonic-gate * and limitations under the License. 13*0Sstevel@tonic-gate * 14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*0Sstevel@tonic-gate * 20*0Sstevel@tonic-gate * CDDL HEADER END 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate /* 23*0Sstevel@tonic-gate * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24*0Sstevel@tonic-gate * Use is subject to license terms. 25*0Sstevel@tonic-gate */ 26*0Sstevel@tonic-gate 27*0Sstevel@tonic-gate /* 28*0Sstevel@tonic-gate * regerror: map error number to text string 29*0Sstevel@tonic-gate * 30*0Sstevel@tonic-gate * Copyright 1985, 1992 by Mortice Kern Systems Inc. All rights reserved. 31*0Sstevel@tonic-gate * 32*0Sstevel@tonic-gate */ 33*0Sstevel@tonic-gate /* 34*0Sstevel@tonic-gate * static char rcsID[] = "$Header: /u/rd/src/libc/regex/rcs/regerror.c " 35*0Sstevel@tonic-gate * "1.28 1994/11/07 14:40:06 jeffhe Exp $"; 36*0Sstevel@tonic-gate */ 37*0Sstevel@tonic-gate 38*0Sstevel@tonic-gate #ifndef _REGERROR_MSG_H 39*0Sstevel@tonic-gate #define _REGERROR_MSG_H 40*0Sstevel@tonic-gate 41*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 42*0Sstevel@tonic-gate 43*0Sstevel@tonic-gate /* 44*0Sstevel@tonic-gate * This string array holds the error message strings for 45*0Sstevel@tonic-gate * the regerror() function. The method function implemented in 46*0Sstevel@tonic-gate * libc_i18n strongly depends on this array. Do not modify this 47*0Sstevel@tonic-gate * array without synchronizing with the method function. 48*0Sstevel@tonic-gate * Also, the _MSG macro is used to extract the message strings 49*0Sstevel@tonic-gate * for the gettext() messaging by the makelibccatalog.sh script. 50*0Sstevel@tonic-gate */ 51*0Sstevel@tonic-gate static const char *regerrors[] = { 52*0Sstevel@tonic-gate _MSG("success"), /* 0: REG_OK */ 53*0Sstevel@tonic-gate _MSG("failed to match"), /* 1: REG_NOMATCH */ 54*0Sstevel@tonic-gate _MSG("invalid collation element"), /* 2: REG_ECOLLATE */ 55*0Sstevel@tonic-gate _MSG("trailing \\ in pattern"), /* 3: REG_EESCAPE */ 56*0Sstevel@tonic-gate _MSG("newline found before end of pattern"), 57*0Sstevel@tonic-gate /* 4: REG_ENEWLINE */ 58*0Sstevel@tonic-gate "", /* 5: REG_ENSUB (OBS) */ 59*0Sstevel@tonic-gate _MSG("number in \\[0-9] invalid"), /* 6: REG_ESUBREG */ 60*0Sstevel@tonic-gate _MSG("[ ] imbalance or syntax error"), /* 7: REG_EBRACK */ 61*0Sstevel@tonic-gate _MSG("( ) or \\( \\) imbalance"), /* 8: REG_EPAREN */ 62*0Sstevel@tonic-gate _MSG("{ } or \\{ \\} imbalance"), /* 9: REG_EBRACE */ 63*0Sstevel@tonic-gate _MSG("invalid endpoint in range"), /* 10: REG_ERANGE */ 64*0Sstevel@tonic-gate _MSG("out of memory"), /* 11: REG_ESPACE */ 65*0Sstevel@tonic-gate _MSG("?, *, +, or { } not preceded by valid regular expression"), 66*0Sstevel@tonic-gate /* 12: REG_BADRPT */ 67*0Sstevel@tonic-gate _MSG("invalid character class type"), /* 13: REG_ECTYPE */ 68*0Sstevel@tonic-gate _MSG("syntax error"), /* 14: REG_BADPAT */ 69*0Sstevel@tonic-gate _MSG("contents of { } or \\{ \\} invalid"), 70*0Sstevel@tonic-gate /* 15: REG_BADBR */ 71*0Sstevel@tonic-gate _MSG("internal error"), /* 16: REG_EFATAL */ 72*0Sstevel@tonic-gate _MSG("invalid multibyte character"), /* 17: REG_ECHAR */ 73*0Sstevel@tonic-gate _MSG("backtrack stack overflow: expression generates too many " 74*0Sstevel@tonic-gate "alternatives"), /* 18: REG_STACK */ 75*0Sstevel@tonic-gate _MSG("function not supported"), /* 19: REG_ENOSYS */ 76*0Sstevel@tonic-gate _MSG("unknown regex error"), /* 20: (reserved) */ 77*0Sstevel@tonic-gate _MSG("^ anchor not at beginning of pattern"), 78*0Sstevel@tonic-gate /* 21: REG_EBOL */ 79*0Sstevel@tonic-gate _MSG("$ anchor not at end of pattern"), /* 22: REG_EEOL */ 80*0Sstevel@tonic-gate }; 81*0Sstevel@tonic-gate 82*0Sstevel@tonic-gate #endif /* _REGERROR_MSG_H */ 83