}
-static void DEFUN_VOID(perform)
+static int DEFUN_VOID(perform)
{
tos = stack;
+ int errors = 0;
while (at(ptr, idx)) {
/* It's worth looking through the command list */
else
{
fprintf(stderr,"warning, %s is not recognised\n", next);
+ errors++;
skip_past_newline();
}
else skip_past_newline();
}
+ return errors;
}
dict_type *
int ret=0;
/* add words to the dictionary */
char *word;
+ dict_type *lookup;
+
string = nextword(string, &word);
while (string && *string && word[0])
{
break;
default:
add_to_definition(ptr, call);
- add_to_definition(ptr, lookup_word(word));
+ lookup = lookup_word(word);
+ if (!lookup) ret++;
+ add_to_definition(ptr, lookup);
}
string = nextword(string, &word);
char *av[])
{
unsigned int i;
-
+ int status = 0;
string_type buffer;
string_type pptr;
read_in(&b, f);
if( compile(b.ptr) ) { fclose(f); exit(1); }
- perform();
+ status = perform();
fclose(f);
}
else if (av[i][1] == 'i')
}
write_buffer(stack+0);
- return 0;
+ return status;
}
-
-
-