NetBSD/lib/libcompat/regexp/regerror.c

29 lines
448 B
C
Raw Normal View History

1997-10-09 14:20:07 +04:00
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: regerror.c,v 1.8 1999/09/20 04:48:04 lukem Exp $");
#endif /* not lint */
#include <assert.h>
1993-03-21 12:45:37 +03:00
#include <regexp.h>
#include <stdio.h>
1999-05-04 21:14:54 +04:00
/*ARGSUSED*/
1993-03-21 12:45:37 +03:00
void
__compat_regerror(s)
1993-03-21 12:45:37 +03:00
const char *s;
{
_DIAGASSERT(s != NULL);
1993-03-21 12:45:37 +03:00
#ifdef ERRAVAIL
error("regexp: %s", s);
#else
/*
fprintf(stderr, "regexp(3): %s\n", s);
exit(1);
*/
return; /* let std. egrep handle errors */
#endif
/* NOTREACHED */
}