summaryrefslogtreecommitdiff
path: root/editors/mg2a/patches/patch-aq
diff options
context:
space:
mode:
authortron <tron>2006-06-30 15:59:58 +0000
committertron <tron>2006-06-30 15:59:58 +0000
commit7b2a3dc62578dd617ea9ec549b0bc92467d7310f (patch)
tree65fb644f851089b43327ea17694e649abab41b59 /editors/mg2a/patches/patch-aq
parent1215816469f7a3bd8dc101403647c091f3ee3d16 (diff)
downloadpkgsrc-7b2a3dc62578dd617ea9ec549b0bc92467d7310f.tar.gz
Fix build with GCC 4.x:
- Include "stdlib.h" and "string.h" where appropriate. - Don't use function-local forward declarations of static functions.
Diffstat (limited to 'editors/mg2a/patches/patch-aq')
-rw-r--r--editors/mg2a/patches/patch-aq62
1 files changed, 62 insertions, 0 deletions
diff --git a/editors/mg2a/patches/patch-aq b/editors/mg2a/patches/patch-aq
new file mode 100644
index 00000000000..8706a87f498
--- /dev/null
+++ b/editors/mg2a/patches/patch-aq
@@ -0,0 +1,62 @@
+$NetBSD: patch-aq,v 1.1 2006/06/30 15:59:58 tron Exp $
+
+--- help.c.orig 1988-07-03 18:50:10.000000000 +0100
++++ help.c 2006-06-30 16:57:54.000000000 +0100
+@@ -10,6 +10,8 @@
+ #endif
+ extern int rescan();
+
++#include <string.h>
++
+ /*
+ * Read a key from the keyboard, and look it
+ * up in the keymap. Display the name of the function
+@@ -87,12 +89,13 @@
+ static BUFFER *bp;
+ static char buf[80]; /* used by showall and findbind */
+
++static int showall();
++
+ /*ARGSUSED*/
+ wallchart(f, n)
+ {
+ int m;
+ static char locbind[80] = "Local keybindings for mode ";
+- static int showall();
+
+ bp = bfind("*help*", TRUE);
+ if (bclear(bp) != TRUE) return FALSE; /* Clear it out. */
+@@ -181,6 +184,8 @@
+ static char buf2[128];
+ static char *buf2p;
+
++static VOID findbind();
++
+ /*ARGSUSED*/
+ apropos_command(f, n)
+ int f, n;
+@@ -189,7 +194,6 @@
+ char string[32];
+ FUNCTNAMES *fnp;
+ BUFFER *bp;
+- static VOID findbind();
+
+ if(eread("apropos: ", string, sizeof(string), EFNEW) == ABORT) return ABORT;
+ /* FALSE means we got a 0 character string, which is fine */
+@@ -212,6 +216,8 @@
+ return popbuftop(bp);
+ }
+
++static VOID bindfound();
++
+ static VOID findbind(funct, ind, map)
+ PF funct;
+ char *ind;
+@@ -221,7 +227,6 @@
+ register int i;
+ char *cp;
+ int last;
+- static VOID bindfound();
+
+ last = -1;
+ for(ele = &map->map_element[0]; ele < &map->map_element[map->map_num]; ele++) {