aboutsummaryrefslogtreecommitdiff
path: root/src/libregexp/regerror.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libregexp/regerror.c')
-rw-r--r--src/libregexp/regerror.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libregexp/regerror.c b/src/libregexp/regerror.c
new file mode 100644
index 00000000..2cd1e3e2
--- /dev/null
+++ b/src/libregexp/regerror.c
@@ -0,0 +1,14 @@
+#include "lib9.h"
+#include "regexp9.h"
+
+void
+regerror(char *s)
+{
+ char buf[132];
+
+ strcpy(buf, "regerror: ");
+ strcat(buf, s);
+ strcat(buf, "\n");
+ write(2, buf, strlen(buf));
+ exit(1);
+}