From d33f472e402f09a1ef721be6f633db25a77f512b Mon Sep 17 00:00:00 2001 From: Dan White Date: Mon, 13 May 2013 11:58:43 -0500 Subject: [PATCH] msp4th: make luFunc() easier to read --- msp4th/msp4th.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/msp4th/msp4th.c b/msp4th/msp4th.c index ea2877f..688e811 100644 --- a/msp4th/msp4th.c +++ b/msp4th/msp4th.c @@ -716,25 +716,25 @@ int16_t lookupToken(uint8_t *word, uint8_t *list) void luFunc(void) { - int16_t i; + int16_t opcode; - i = lookupToken(wordBuffer, (uint8_t *)cmdListBi); + opcode = lookupToken(wordBuffer, (uint8_t *)cmdListBi); - if (i) { - i += 20000; - pushMathStack(i); + if (opcode) { + opcode += 20000; + pushMathStack(opcode); pushMathStack(1); } else { // need to test internal interp commands - i = lookupToken(wordBuffer, (uint8_t *)cmdListBi2); - if (i) { - i += 10000; - pushMathStack(i); + opcode = lookupToken(wordBuffer, (uint8_t *)cmdListBi2); + if (opcode) { + opcode += 10000; + pushMathStack(opcode); pushMathStack(1); } else { - i = lookupToken(wordBuffer, cmdList); - if (i) { - pushMathStack(i); + opcode = lookupToken(wordBuffer, cmdList); + if (opcode) { + pushMathStack(opcode); pushMathStack(1); } else { pushMathStack(0); -- 2.25.1