X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Ffiles.c;fp=lib%2Fas3%2Ffiles.c;h=cf6145b81104e11f0c4c585eb8ebd3adaf5f9069;hb=6280f844ee2e70d15c06e49d2caec41308c26aae;hp=8b951d9149a9a31362be65c82262f66e1eaf5952;hpb=07022f6394b1436b8bc67b61d535579c46208088;p=swftools.git diff --git a/lib/as3/files.c b/lib/as3/files.c index 8b951d9..cf6145b 100644 --- a/lib/as3/files.c +++ b/lib/as3/files.c @@ -23,7 +23,9 @@ #include #include #include +#include #include "files.h" +#include "tokenizer.h" static int verbose = 0; static void dbg(const char*format, ...) @@ -182,6 +184,17 @@ char*enter_file(char*filename, void*state) return fullfilename; } +FILE*enter_file2(char*filename, void*state) +{ + char*fullfilename = enter_file(filename, state); + FILE*fi = fopen(fullfilename, "rb"); + if(!fi) { + as3_error("Couldn't find file %s: %s", fullfilename, strerror(errno)); + } + return fi; +} + + void* leave_file() { dbg("leaving file %s", current_filename);