* Copyright (c) 1992 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* James da Silva at the University of Maryland at College Park.
* %sccs.include.redist.c%
* Compatibility routines that implement the old re_comp/re_exec interface in
* terms of the regcomp/regexec interface. It's possible that some programs
* rely on dark corners of re_comp/re_exec and won't work with this version,
* but most programs should be fine.
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid
[] = "@(#)regex.c 5.1 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
static regexp
*re_regexp
;
return (re_goterr
? re_errstr
: NULL
);
rc
= regexec(re_regexp
, s
);
return (re_goterr
? -1 : rc
);