Mercurial > vim
comparison src/ex_docmd.c @ 11240:06307d812ca7 v8.0.0506
patch 8.0.0506: can't build with ANSI C
commit https://github.com/vim/vim/commit/6c0c1e8052811a818739e2f3d543291b7a347ad0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 25 15:07:43 2017 +0100
patch 8.0.0506: can't build with ANSI C
Problem: Can't build with ANSI C.
Solution: Move declarations to start of block.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 25 Mar 2017 15:15:05 +0100 |
parents | 62c96fee518e |
children | 17ba19406c50 |
comparison
equal
deleted
inserted
replaced
11239:1b22eac86341 | 11240:06307d812ca7 |
---|---|
3248 } | 3248 } |
3249 } | 3249 } |
3250 | 3250 |
3251 if (ASCII_ISLOWER(eap->cmd[0])) | 3251 if (ASCII_ISLOWER(eap->cmd[0])) |
3252 { | 3252 { |
3253 int c1 = eap->cmd[0]; | |
3254 int c2 = eap->cmd[1]; | |
3255 | |
3253 if (command_count != (int)CMD_SIZE) | 3256 if (command_count != (int)CMD_SIZE) |
3254 { | 3257 { |
3255 iemsg((char_u *)_("E943: Command table needs to be updated, run 'make cmdidxs'")); | 3258 iemsg((char_u *)_("E943: Command table needs to be updated, run 'make cmdidxs'")); |
3256 getout(1); | 3259 getout(1); |
3257 } | 3260 } |
3258 | 3261 |
3259 /* Use a precomputed index for fast look-up in cmdnames[] | 3262 /* Use a precomputed index for fast look-up in cmdnames[] |
3260 * taking into account the first 2 letters of eap->cmd. */ | 3263 * taking into account the first 2 letters of eap->cmd. */ |
3261 int c1 = eap->cmd[0]; | |
3262 int c2 = eap->cmd[1]; | |
3263 eap->cmdidx = cmdidxs1[CharOrdLow(c1)]; | 3264 eap->cmdidx = cmdidxs1[CharOrdLow(c1)]; |
3264 if (ASCII_ISLOWER(c2)) | 3265 if (ASCII_ISLOWER(c2)) |
3265 eap->cmdidx += cmdidxs2[CharOrdLow(c1)][CharOrdLow(c2)]; | 3266 eap->cmdidx += cmdidxs2[CharOrdLow(c1)][CharOrdLow(c2)]; |
3266 } | 3267 } |
3267 else | 3268 else |