/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
/*LINTLIBRARY*/
#include <stdlib.h>
#include "utility.h"
/* this code was taken from REGCMP(3X) */
/* definition so it was changed to FEOF */
/* definition so it was changed to FCEOF */
int __i_size;
/*ARGSUSED2*/
char *
{
char c;
int *adx;
int i, cflg;
int cclcnt;
*__sp_ = -1;
while (*adx)
return (NULL);
goto cerror;
if (c == '^') {
c = *sp++;
}
if ((c == '*') || (c == '+') || (c == '{'))
goto cerror;
sp--;
for (;;) {
if (*adx) {
continue;
}
goto cerror;
return (sep);
}
if ((c != '*') && (c != '{') && (c != '+'))
switch (c) {
case '(':
*ep++ = -1;
continue;
case ')':
if ((c = *sp++) == '$') {
goto cerror;
*ep++ = (c-'0');
continue;
}
sp--;
switch (c) {
case '+':
break;
case '*':
break;
case '{':
break;
default:
continue;
}
i -= 256;
*++eptr = (char) i;
continue;
case '\\':
goto cerror;
*ep++ = c;
continue;
case '{':
cflg = 0;
nlim:
i = 0;
do {
if ('0' <= c && c <= '9')
i = (i*10+(c-'0'));
else goto cerror;
if (i > 255) goto cerror;
*ep++ = (char) i;
if (c == ',') {
if ((c = *sp++) == '}') {
*ep++ = -1;
continue;
} else {
sp--;
goto nlim;
}
}
if (!cflg)
*ep++ = (char) i;
goto cerror;
continue;
case '.':
continue;
case '+':
goto cerror;
continue;
case '*':
goto cerror;
continue;
case '$':
goto defchar;
continue;
case '[':
*ep++ = 0;
cclcnt = 1;
if ((c = *sp++) == '^') {
c = *sp++;
}
do {
if (c == FEOF)
goto cerror;
(*sp != ']')) {
ep++;
cclcnt++;
continue;
}
*ep++ = c;
cclcnt++;
} while ((c = *sp++) != ']');
continue;
default:
*ep++ = c;
}
}
return (0);
}
int
{
int i;
i = 1;
while (*strg++)
i++;
return (i);
}
__rpop(void)
{
}
int
{
return (0);
return (1);
}