summaryrefslogtreecommitdiff
path: root/lib/libcompat/regexp/regerror.c
blob: 3f129ea329bf1bafb1db12f9896ee9884a8f0e12 (plain)
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.4 2000/06/30 16:00:06 millert Exp $	*/
#ifndef lint
static char *rcsid = "$OpenBSD: regerror.c,v 1.4 2000/06/30 16:00:06 millert 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", s);
	return;
}

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