summaryrefslogtreecommitdiffstats
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-03-25 15:07:43 +0100
committerBram Moolenaar <Bram@vim.org>2017-03-25 15:07:43 +0100
commit6c0c1e8052811a818739e2f3d543291b7a347ad0 (patch)
tree7a7a122d90a436acf99b24b59a29728ae1d03370 /src/ex_docmd.c
parentba6ad17378ddb9b33412d85174224997b8ff7a4f (diff)
patch 8.0.0506: can't build with ANSI Cv8.0.0506
Problem: Can't build with ANSI C. Solution: Move declarations to start of block.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 17fec33ecd..9782557c13 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -3250,6 +3250,9 @@ find_command(exarg_T *eap, int *full UNUSED)
if (ASCII_ISLOWER(eap->cmd[0]))
{
+ int c1 = eap->cmd[0];
+ int c2 = eap->cmd[1];
+
if (command_count != (int)CMD_SIZE)
{
iemsg((char_u *)_("E943: Command table needs to be updated, run 'make cmdidxs'"));
@@ -3258,8 +3261,6 @@ find_command(exarg_T *eap, int *full UNUSED)
/* Use a precomputed index for fast look-up in cmdnames[]
* taking into account the first 2 letters of eap->cmd. */
- int c1 = eap->cmd[0];
- int c2 = eap->cmd[1];
eap->cmdidx = cmdidxs1[CharOrdLow(c1)];
if (ASCII_ISLOWER(c2))
eap->cmdidx += cmdidxs2[CharOrdLow(c1)][CharOrdLow(c2)];