Преглед на файлове

Clean some remaining comments and debugging printf

pull/11/head
mtardy преди 4 години
родител
ревизия
e26c5c565f
променени са 1 файла, в които са добавени 1 реда и са изтрити 33 реда
  1. +1
    -33
      parse.leg

+ 1
- 33
parse.leg Целия файл

@ -529,7 +529,6 @@ typedef struct input_t
input_t *inputStack= NULL;
void inputStackPush(char *name) {
printf("IMPUT STACK PUSH: %s\n", name);
FILE *file = stdin;
if (NULL != name) {
file= fopen(name, "rb");
@ -544,7 +543,7 @@ void inputStackPush(char *name) {
input->name= memcheck(strdup(name));
input->lineNumber= 1;
input->file= file;
input->next= inputStack;
input->next= inputStack;
inputStack= input;
return;
}
@ -1752,10 +1751,8 @@ oop prim_import(oop params)
{
if (map_hasIntegerKey(params, 0)) {
char *file= get(get(params, Map, elements)[0].value, String, value);
printf("PRIM IMPORT: %s\n", file);
if (yyctx->__pos < yyctx->__limit) {
yyctx->__limit--;
printf("UNGET: %c\n", yyctx->__buf[yyctx->__limit]);
ungetc(yyctx->__buf[yyctx->__limit], inputStack->file);
}
readEvalPrint(file);
@ -1817,35 +1814,6 @@ int main(int argc, char **argv)
readEvalPrint(NULL);
}
/*
while (inputStack) {
printf("UNSTACK: %s\n", inputStack->name);
// set input to stdin or open file
if (!strcmp(inputStack->name, "<stdin>")) {
input= stdin;
} else {
input = fopen(inputStack->name, "rb");
if (NULL == input) {
perror(inputStack->name);
exit(1);
}
}
fileName= inputStack->name;
readEvalPrint();
// close file
if (input != stdin) {
int res= fclose(input);
if (0 != res) {
perror(inputStack->name);
exit(1);
}
}
inputStackPop();
}
*/
return 0;
(void)yyAccept;

Зареждане…
Отказ
Запис