diff options
-rw-r--r-- | usr.bin/mg/extend.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/mg/extend.c b/usr.bin/mg/extend.c index 67b764b0633..609021ebd2d 100644 --- a/usr.bin/mg/extend.c +++ b/usr.bin/mg/extend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: extend.c,v 1.28 2002/07/03 03:47:59 vincent Exp $ */ +/* $OpenBSD: extend.c,v 1.29 2002/09/15 14:48:50 vincent Exp $ */ /* * Extended (M-X) commands, rebinding, and startup file processing. @@ -22,7 +22,7 @@ #endif /* FKEYS */ static int remap(KEYMAP *, int, PF, KEYMAP *); -static KEYMAP *realocmap(KEYMAP *); +static KEYMAP *reallocmap(KEYMAP *); static void fixmap(KEYMAP *, KEYMAP *, KEYMAP *); static int dobind(KEYMAP *, const char *, int); static char *skipwhite(char *); @@ -137,7 +137,7 @@ remap(KEYMAP *curmap, /* pointer to the map being changed */ ele->k_funcp = pfp; } else { if (curmap->map_num >= curmap->map_max && - (curmap = realocmap(curmap)) == NULL) + (curmap = reallocmap(curmap)) == NULL) return FALSE; if ((pfp = malloc(sizeof(PF))) == NULL) { ewprintf("Out of memory"); @@ -158,11 +158,11 @@ remap(KEYMAP *curmap, /* pointer to the map being changed */ curmap->map_num++; } if (funct == NULL) { - if (pref_map != NULL) { + if (pref_map != NULL) ele->k_prefmap = pref_map; - } else { - if (!(mp = (KEYMAP *)malloc(sizeof(KEYMAP) + - (MAPINIT - 1) * sizeof(MAP_ELEMENT)))) { + else { + if ((mp = (KEYMAP *)malloc(sizeof(KEYMAP) + + (MAPINIT - 1) * sizeof(MAP_ELEMENT))) == NULL) { ewprintf("Out of memory"); ele->k_funcp[c - ele->k_base] = curmap->map_default; @@ -213,7 +213,7 @@ remap(KEYMAP *curmap, /* pointer to the map being changed */ for (i = 0; n2 && i < n1; i++) n2 &= ele->k_funcp[i] != NULL; if (curmap->map_num >= curmap->map_max && - (curmap = realocmap(curmap)) == NULL) + (curmap = reallocmap(curmap)) == NULL) return FALSE; if ((pfp = malloc((ele->k_num - c + !n2) * sizeof(PF))) == NULL) { @@ -259,7 +259,7 @@ remap(KEYMAP *curmap, /* pointer to the map being changed */ * Reallocate a keymap, used above. */ static KEYMAP * -realocmap(KEYMAP *curmap) +reallocmap(KEYMAP *curmap) { MAPS *mps; KEYMAP *mp; |