Converted scope-local variables into function-local variables.

The 6502-specific LC implementation doesn't allow for scope-local vaiables between PT_BEGIN/PROCESS_BEGIN/PSOCK_BEGIN and PT_BEGIN/PROCESS_END/PSOCK_END.
This commit is contained in:
Oliver Schmidt 2011-04-12 14:12:09 +02:00
parent b19fb0ac9e
commit 07f3df45be
11 changed files with 50 additions and 44 deletions

View file

@ -90,6 +90,8 @@ PROCESS_THREAD(shell_vars_process, ev, data)
PROCESS_THREAD(shell_var_process, ev, data)
{
int i;
int j;
char numbuf[32];
PROCESS_BEGIN();
@ -99,8 +101,6 @@ PROCESS_THREAD(shell_var_process, ev, data)
for(i = 0; i < symbols_nelts; ++i) {
if(symbols[i].name != NULL &&
strncmp(symbols[i].name, data, strlen(symbols[i].name)) == 0) {
char numbuf[32];
int j;
sprintf(numbuf, " %d", *((int *)symbols[i].value));
shell_output_str(&var_command, (char *)symbols[i].name, numbuf);