summaryrefslogtreecommitdiffstats
path: root/lib/libcompat/regexp/regerror.c
blob: c98b8a3d4f71d63109b495c6288235f78dd95d93 (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
/*	$OpenBSD: regerror.c,v 1.5 2003/06/26 23:19:32 deraadt Exp $	*/
#ifndef lint
static char *rcsid = "$OpenBSD: regerror.c,v 1.5 2003/06/26 23:19:32 deraadt Exp $";
#endif /* not lint */

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

static void (*_new_regerror)(const char *) = NULL;

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

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