//////////////////////////////// //PaScheme PaScheme// //////////////////////////////// // // // Distribute under GPL v.2 // // or later // // (c)2002 Petr Cermak // // xgxg@seznam.cz // //////////////////////////////// //#include "main.h" #include #include #include "functions.h" FILE* InputFile; int main(int argc, char* argv[]) { char* code; long int flength; if (argc==1) { error("No input file given\n", 1); return 1; } if (! (InputFile=fopen(argv[1], "rb"))) { error("Can't open input file\n", 1); } fseek(InputFile, 0, SEEK_END); flength=ftell(InputFile); fseek(InputFile, 0, SEEK_SET); code=(char *)malloc(flength+1); fread(code, flength, 1, InputFile); fclose(InputFile); code[flength]='\0'; print_object(execute(code)); printf("\n"); free(code); #ifdef WAINTENTER getchar(); #endif return 0; }