From c1376f7b0e1100db899e4a2e68f42903fa6ebe6a Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Mon, 11 Jun 2001 17:03:09 +0000 Subject: [PATCH] command/function cosmetics from Byrial Jensen. --- keymap.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/keymap.c b/keymap.c index 38226ba92..7b48e97ef 100644 --- a/keymap.c +++ b/keymap.c @@ -837,45 +837,45 @@ int mutt_parse_macro (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) return (r); } -/* exec command-name */ +/* exec function-name */ int mutt_parse_exec (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) { int ops[128]; int nops = 0; struct binding_t *bindings = NULL; - char *command; - + char *function; + if (!MoreArgs (s)) { - strfcpy (err->data, _("exec: too few arguments"), err->dsize); + strfcpy (err->data, _("exec: no arguments"), err->dsize); return (-1); } do { mutt_extract_token (buf, s, 0); - command = buf->data; + function = buf->data; if ((bindings = km_get_table (CurrentMenu)) == NULL && CurrentMenu != MENU_PAGER) bindings = OpGeneric; - - ops[nops] = get_op (bindings, command, mutt_strlen(command)); + + ops[nops] = get_op (bindings, function, mutt_strlen(function)); if (ops[nops] == OP_NULL && CurrentMenu != MENU_PAGER) - ops[nops] = get_op (OpGeneric, command, mutt_strlen(command)); - + ops[nops] = get_op (OpGeneric, function, mutt_strlen(function)); + if (ops[nops] == OP_NULL) { mutt_flushinp (); - mutt_error (_("%s: no such command"), command); + mutt_error (_("%s: no such function"), function); return (-1); } nops++; } while(MoreArgs(s) && nops < sizeof(ops)/sizeof(ops[0])); - + while(nops) mutt_ungetch(0, ops[--nops]); - + return 0; } -- 2.40.0