From: kramm Date: Tue, 6 Jan 2009 21:33:26 +0000 (+0000) Subject: renamed syntaxerror to as3_error, added a warning X-Git-Tag: release-0-9-0~389 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=fff0629f8e37e5a94549502096bf595f19339547 renamed syntaxerror to as3_error, added a warning --- diff --git a/lib/as3/files.c b/lib/as3/files.c index 10e5de6..52e1552 100644 --- a/lib/as3/files.c +++ b/lib/as3/files.c @@ -131,6 +131,9 @@ char*find_file(char*filename) } return 0; } + if(!i) { + as3_warning("Include directory stack is empty, while looking for file %s", filename); + } while(i) { char*p = concat_paths(i->path, filename); fi = fopen(p, "rb"); @@ -146,12 +149,12 @@ char*find_file(char*filename) char*enter_file(char*filename, void*state) { if(include_stack_ptr >= MAX_INCLUDE_DEPTH) { - syntaxerror("Includes nested too deeply"); + as3_error("Includes nested too deeply"); exit(1); } char*fullfilename = find_file(filename); if(!fullfilename) { - syntaxerror("Couldn't find file %s", filename); + as3_error("Couldn't find file %s", filename); include_dir_t*i = current_include_dirs; while(i) { fprintf(stderr, "include dir: %s\n", i->path);