diff options
author | Vincent Labrecque <vincent@cvs.openbsd.org> | 2002-09-15 14:48:51 +0000 |
---|---|---|
committer | Vincent Labrecque <vincent@cvs.openbsd.org> | 2002-09-15 14:48:51 +0000 |
commit | ba92a4f94fc3421f043679c7ea95aa47aa38f786 (patch) | |
tree | 5c5edf01312b3aa1a1475874f2feee24bf2634f3 /usr.bin/mg | |
parent | d0073649ddf89e718f9893cb59508fb3b60d823b (diff) |
rename realocmap to reallocmap, plus some style.
ok art@
Diffstat (limited to 'usr.bin/mg')
-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; |