From: Richard Russon Date: Wed, 18 Jul 2018 22:16:50 +0000 (+0100) Subject: rename descr X-Git-Tag: 2019-10-25~749^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f9483d93483f58e52ffd5130b169d16b1dc43bff;p=neomutt rename descr --- diff --git a/help.c b/help.c index 8b8dc4c2b..e6acadd9b 100644 --- a/help.c +++ b/help.c @@ -309,10 +309,10 @@ static void dump_menu(FILE *f, int menu) if (map->op == OP_MACRO) { - if (!map->descr) + if (!map->desc) format_line(f, -1, buf, "macro", map->macro); else - format_line(f, 1, buf, map->macro, map->descr); + format_line(f, 1, buf, map->macro, map->desc); } else { diff --git a/keymap.c b/keymap.c index d6000b2bd..1c147e46d 100644 --- a/keymap.c +++ b/keymap.c @@ -267,7 +267,7 @@ static size_t parsekeys(const char *str, keycode_t *d, size_t max) * @param menu Menu id, e.g. #MENU_EDITOR * @param op Operation, e.g. OP_DELETE * @param macro Macro string - * @param descr Description of macro (OPTIONAL) + * @param desc Description of macro (OPTIONAL) * @param err Buffer for error message * @retval 0 Success * @retval -2 Error @@ -275,7 +275,7 @@ static size_t parsekeys(const char *str, keycode_t *d, size_t max) * Insert a key sequence into the specified map. * The map is sorted by ASCII value (lowest to highest) */ -static int km_bind_err(char *s, int menu, int op, char *macro, char *descr, struct Buffer *err) +static int km_bind_err(char *s, int menu, int op, char *macro, char *desc, struct Buffer *err) { int retval = 0; struct Keymap *last = NULL, *next = NULL; @@ -287,7 +287,7 @@ static int km_bind_err(char *s, int menu, int op, char *macro, char *descr, stru struct Keymap *map = alloc_keys(len, buf); map->op = op; map->macro = mutt_str_strdup(macro); - map->descr = mutt_str_strdup(descr); + map->desc = mutt_str_strdup(desc); struct Keymap *tmp = Keymaps[menu]; @@ -331,7 +331,7 @@ static int km_bind_err(char *s, int menu, int op, char *macro, char *descr, stru next = tmp->next; FREE(&tmp->macro); FREE(&tmp->keys); - FREE(&tmp->descr); + FREE(&tmp->desc); FREE(&tmp); tmp = next; } while (tmp && len >= pos); @@ -376,13 +376,13 @@ static int km_bind_err(char *s, int menu, int op, char *macro, char *descr, stru * @param menu Menu id, e.g. #MENU_EDITOR * @param op Operation, e.g. OP_DELETE * @param macro Macro string - * @param descr Description of macro (OPTIONAL) + * @param desc Description of macro (OPTIONAL) * @retval 0 Success * @retval -2 Error */ -int km_bind(char *s, int menu, int op, char *macro, char *descr) +int km_bind(char *s, int menu, int op, char *macro, char *desc) { - return km_bind_err(s, menu, op, macro, descr, NULL); + return km_bind_err(s, menu, op, macro, desc, NULL); } /** @@ -1451,7 +1451,7 @@ void mutt_free_keys(void) next = map->next; FREE(&map->macro); - FREE(&map->descr); + FREE(&map->desc); FREE(&map->keys); FREE(&map); } diff --git a/keymap.h b/keymap.h index bfc99d714..06285517e 100644 --- a/keymap.h +++ b/keymap.h @@ -32,7 +32,7 @@ /* type for key storage, the rest of neomutt works fine with int type */ typedef short keycode_t; -int km_bind(char *s, int menu, int op, char *macro, char *descr); +int km_bind(char *s, int menu, int op, char *macro, char *desc); int km_dokey(int menu); void init_extended_keys(void); @@ -45,7 +45,7 @@ void init_extended_keys(void); struct Keymap { char *macro; /**< macro expansion (op == OP_MACRO) */ - char *descr; /**< description of a macro for the help menu */ + char *desc; /**< description of a macro for the help menu */ struct Keymap *next; /**< next key in map */ short op; /**< operation to perform */ short eq; /**< number of leading keys equal to next entry */