summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Labrecque <vincent@cvs.openbsd.org>2004-02-01 22:26:42 +0000
committerVincent Labrecque <vincent@cvs.openbsd.org>2004-02-01 22:26:42 +0000
commit8dd76e39cefff01dd2ee312bf5e18c1841b86a54 (patch)
tree20c94102e51185def8f1caa5243ce2cee6ab8dbc
parent4c6ea3fcb798e74165764d6fee09e17c6bc07342 (diff)
remove old precompiler weirdness that is not really needed...
-rw-r--r--usr.bin/mg/kbd.c6
-rw-r--r--usr.bin/mg/key.h17
-rw-r--r--usr.bin/mg/macro.c13
-rw-r--r--usr.bin/mg/macro.h24
4 files changed, 29 insertions, 31 deletions
diff --git a/usr.bin/mg/kbd.c b/usr.bin/mg/kbd.c
index 1006c1c293a..5c02d405430 100644
--- a/usr.bin/mg/kbd.c
+++ b/usr.bin/mg/kbd.c
@@ -1,11 +1,9 @@
-/* $OpenBSD: kbd.c,v 1.14 2002/07/01 14:33:44 vincent Exp $ */
+/* $OpenBSD: kbd.c,v 1.15 2004/02/01 22:26:40 vincent Exp $ */
/*
* Terminal independent keyboard handling.
*/
-#define EXTERN
-
#include "def.h"
#include "kbd.h"
#include "key.h"
@@ -30,6 +28,8 @@ static int pushedc;
MAP_ELEMENT *ele;
+struct key key;
+
/*
* Toggle the value of use_metakey
*/
diff --git a/usr.bin/mg/key.h b/usr.bin/mg/key.h
index 6e5a95c4837..bd79463ffb0 100644
--- a/usr.bin/mg/key.h
+++ b/usr.bin/mg/key.h
@@ -1,15 +1,12 @@
-/* $OpenBSD: key.h,v 1.3 2001/01/29 01:58:07 niklas Exp $ */
+/* $OpenBSD: key.h,v 1.4 2004/02/01 22:26:41 vincent Exp $ */
/* key.h: Insert file for mg 2 functions that need to reference key pressed */
-#ifndef EXTERN
-#define EXTERN extern
-#endif
-
#define MAXKEY 8 /* maximum number of prefix chars */
-EXTERN struct { /* the chacter sequence in a key */
- int k_count; /* number of chars */
- KCHAR k_chars[MAXKEY]; /* chars */
-} key;
-#undef EXTERN
+struct key { /* the chacter sequence in a key */
+ int k_count; /* number of chars */
+ KCHAR k_chars[MAXKEY]; /* chars */
+};
+
+extern struct key key;
diff --git a/usr.bin/mg/macro.c b/usr.bin/mg/macro.c
index bd774924723..466991a5584 100644
--- a/usr.bin/mg/macro.c
+++ b/usr.bin/mg/macro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macro.c,v 1.6 2002/07/01 14:33:44 vincent Exp $ */
+/* $OpenBSD: macro.c,v 1.7 2004/02/01 22:26:41 vincent Exp $ */
/*
* Keyboard macros.
@@ -7,10 +7,17 @@
#ifndef NO_MACRO
#include "def.h"
#include "key.h"
-#define EXTERN
-#define INIT(i) = (i)
#include "macro.h"
+int inmacro = FALSE;
+int macrodef = FALSE;
+int macrocount = 0;
+
+LINE *maclhead = NULL;
+LINE *maclcur;
+
+union macrodef macro[MAXMACRO];
+
/* ARGSUSED */
int
definemacro(int f, int n)
diff --git a/usr.bin/mg/macro.h b/usr.bin/mg/macro.h
index abfc4765b29..7624be8728f 100644
--- a/usr.bin/mg/macro.h
+++ b/usr.bin/mg/macro.h
@@ -1,25 +1,19 @@
-/* $OpenBSD: macro.h,v 1.4 2001/05/24 03:05:24 mickey Exp $ */
+/* $OpenBSD: macro.h,v 1.5 2004/02/01 22:26:41 vincent Exp $ */
/* definitions for keyboard macros */
-#ifndef EXTERN
-#define EXTERN extern
-#define INIT(i)
-#endif
-
#define MAXMACRO 256 /* maximum functs in a macro */
-EXTERN int inmacro INIT(FALSE);
-EXTERN int macrodef INIT(FALSE);
-EXTERN int macrocount INIT(0);
+extern int inmacro;
+extern int macrodef;
+extern int macrocount;
-EXTERN union {
+union macrodef {
PF m_funct;
int m_count; /* for count-prefix */
-} macro[MAXMACRO];
+};
-EXTERN LINE *maclhead INIT(NULL);
-EXTERN LINE *maclcur;
+extern union macrodef macro[MAXMACRO];
-#undef EXTERN
-#undef INIT
+extern LINE *maclhead;
+extern LINE *maclcur;