pkgsrc/editors/mg2a/patches/patch-ap
tron 3266459653 Fix build with GCC 4.x:
- Include "stdlib.h" and "string.h" where appropriate.
- Don't use function-local forward declarations of static functions.
2006-06-30 15:59:58 +00:00

65 lines
1.6 KiB
Text

$NetBSD: patch-ap,v 1.1 2006/06/30 15:59:58 tron Exp $
--- extend.c.orig 1988-07-03 18:48:52.000000000 +0100
+++ extend.c 2006-06-30 16:56:09.000000000 +0100
@@ -18,7 +18,9 @@
#endif
#endif
-extern char *strncpy();
+#include <stdlib.h>
+#include <string.h>
+
extern int rescan();
/* insert a string, mainly for use from macros (created by selfinsert) */
@@ -68,6 +70,8 @@
* don't have them. Care is taken so running out of memory will leave
* the keymap in a usable state.
*/
+static KEYMAP *realocmap();
+
static int remap(curmap, c, funct, pref_map)
register KEYMAP *curmap;/* pointer to the map being changed */
int c; /* character being changed */
@@ -80,7 +84,6 @@
KEYMAP *mp;
PF *pfp;
MAP_ELEMENT *mep;
- static KEYMAP *realocmap();
if(ele >= &curmap->map_element[curmap->map_num] || c < ele->k_base) {
if(ele > &curmap->map_element[0] && (funct!=prefix ||
@@ -225,13 +228,14 @@
return TRUE;
}
+static VOID fixmap();
+
/* reallocate a keymap, used above */
static KEYMAP *realocmap(curmap)
register KEYMAP *curmap;
{
register KEYMAP *mp;
register int i;
- static VOID fixmap();
extern int nmaps;
if((mp = (KEYMAP *)malloc((unsigned)(sizeof(KEYMAP)+
@@ -550,6 +554,8 @@
return TRUE;
}
+static char *skipwhite(), *parsetoken();
+
/*
* excline - run a line from a load file or eval-expression.
* if FKEYS is defined, duplicate functionallity of dobind so function
@@ -578,7 +584,6 @@
#endif
PF name_function();
LINE *lalloc();
- static char *skipwhite(), *parsetoken();
if(macrodef || inmacro) {
ewprintf("Not now!");