summaryrefslogtreecommitdiff
path: root/lib/libcompat/regexp/regerror.c
blob: 86dd12fa6f5901675a531c164000e3d5886e5386 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*	$OpenBSD: regerror.c,v 1.7 2009/10/27 23:59:28 deraadt Exp $	*/
#include <err.h>
#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;
}