summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/mg/def.h5
-rw-r--r--usr.bin/mg/grep.c6
-rw-r--r--usr.bin/mg/keymap.c4
3 files changed, 9 insertions, 6 deletions
diff --git a/usr.bin/mg/def.h b/usr.bin/mg/def.h
index 3cab2907800..78c4aff8611 100644
--- a/usr.bin/mg/def.h
+++ b/usr.bin/mg/def.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: def.h,v 1.65 2005/10/06 16:48:00 kjell Exp $ */
+/* $OpenBSD: def.h,v 1.66 2005/10/11 00:50:00 kjell Exp $ */
/* This file is in the public domain. */
@@ -608,6 +608,9 @@ int add_autoexec(const char *, const char *);
/* mail.c X */
void mail_init(void);
+/* grep.c X */
+int next_error(int, int);
+
/*
* Externals.
*/
diff --git a/usr.bin/mg/grep.c b/usr.bin/mg/grep.c
index 39e543cc286..461b9b4024f 100644
--- a/usr.bin/mg/grep.c
+++ b/usr.bin/mg/grep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grep.c,v 1.16 2005/08/09 00:53:48 kjell Exp $ */
+/* $OpenBSD: grep.c,v 1.17 2005/10/11 00:50:00 kjell Exp $ */
/*
* Copyright (c) 2001 Artur Grabowski <art@openbsd.org>. All rights reserved.
*
@@ -30,7 +30,7 @@
#include <ctype.h>
static int compile_goto_error(int, int);
-static int next_error(int, int);
+int next_error(int, int);
static int grep(int, int);
static int compile(int, int);
static int gid(int, int);
@@ -281,7 +281,7 @@ fail:
return (FALSE);
}
-static int
+int
next_error(int f, int n)
{
if (compile_win == NULL || compile_buffer == NULL) {
diff --git a/usr.bin/mg/keymap.c b/usr.bin/mg/keymap.c
index 78658686e8f..4d292bfc84b 100644
--- a/usr.bin/mg/keymap.c
+++ b/usr.bin/mg/keymap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: keymap.c,v 1.31 2005/10/06 20:02:10 kjell Exp $ */
+/* $OpenBSD: keymap.c,v 1.32 2005/10/11 00:50:00 kjell Exp $ */
/* This file is in the public domain. */
@@ -113,7 +113,7 @@ static PF cXeq[] = {
static PF cXcar[] = {
enlargewind, /* ^ */
rescan, /* _ */
- rescan, /* ` */
+ next_error, /* ` */
rescan, /* a */
usebuffer, /* b */
rescan, /* c */