|
From: Peep P. <so...@us...> - 2004-07-23 14:25:04
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20017 Modified Files: compile.c Log Message: string.h for strerror; manual yylloc declaration; set prog to NULL if file not found Index: compile.c =================================================================== RCS file: /cvsroot/agd/server/src/compile.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- compile.c 21 Jul 2004 12:09:47 -0000 1.28 +++ compile.c 23 Jul 2004 14:24:55 -0000 1.29 @@ -1,5 +1,6 @@ #include <stdlib.h> #include <stdio.h> +#include <string.h> #include <errno.h> #include <sys/time.h> #include <time.h> @@ -15,6 +16,8 @@ #include "instr.h" #include "lang.h" +extern YYLTYPE yylloc; + extern object_t *this_ob; program_t *this_prog; @@ -603,7 +606,7 @@ yyin = fopen(real_path, "r"); if(!yyin) { printf("failed (can't open %s: %s)\n", real_path, strerror(errno)); - this_prog = 0; + prog = NULL; goto out; } @@ -633,13 +636,13 @@ compile_warnings == 1 ? "": "s"); } printf(" - failed\n"); - free(this_prog); + free(prog); prog = NULL; goto out; } if(check_fun_definitions()) { - free(this_prog); + free(prog); prog = NULL; goto out; } |