summaryrefslogtreecommitdiffstats
path: root/lib/libcompat/regexp/regerror.c
blob: c1b96806d476e839e6179657b770fb5a5555cd21 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*	$OpenBSD: regerror.c,v 1.3 1999/08/02 17:10:47 downsj Exp $	*/
#ifndef lint
static char *rcsid = "$OpenBSD: regerror.c,v 1.3 1999/08/02 17:10:47 downsj Exp $";
#endif /* not lint */

#include <regexp.h>
#include <stdio.h>

static void (*_new_regerror)() = NULL;

void
v8_regerror(s)
	const char *s;
{
	if (_new_regerror != NULL)
		_new_regerror(s);
	else
		warnx(s);
	return;
}

void
v8_setregerror(f)
	void (*f)();
{
	_new_regerror = f;
}