From: Dan White Date: Mon, 13 May 2013 16:58:43 +0000 (-0500) Subject: msp4th: make luFunc() easier to read X-Git-Tag: cheetah~82 X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=d33f472e402f09a1ef721be6f633db25a77f512b;p=430.git msp4th: make luFunc() easier to read --- 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);