From: kramm Date: Wed, 16 Apr 2003 18:52:09 +0000 (+0000) Subject: added O_BINARY X-Git-Tag: release-0-4-4~5 X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;h=32db40cde1afee595bf3f8fb500d515da77e22d7;p=swftools.git added O_BINARY --- diff --git a/src/swfc.c b/src/swfc.c index d2ef74d..db12bd7 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -619,7 +619,7 @@ void s_font(char*name, char*filename) int f; SWF swf; SWFFONT* font; - f = open(filename,O_RDONLY); + f = open(filename,O_RDONLY|O_BINARY); if (f<0) { warning("Couldn't open file \"%s\": %s", filename, strerror(errno)); font = (SWFFONT*)malloc(sizeof(SWFFONT)); diff --git a/src/swfcombine.c b/src/swfcombine.c index 8514bda..e76b5c6 100644 --- a/src/swfcombine.c +++ b/src/swfcombine.c @@ -278,7 +278,7 @@ static void makestackmaster(SWF*swf) { SWF head; int ret; - int fi=open(slave_filename[t],O_RDONLY); + int fi=open(slave_filename[t],O_RDONLY|O_BINARY); TAG*tag; if(fi<0 || swf_ReadSWF(fi, &head)<0) { logf(" Couldn't open/read %s.", slave_filename[t]); @@ -1074,7 +1074,7 @@ int main(int argn, char *argv[]) else { int ret; logf(" master entity %s (named \"%s\")\n", master_filename, master_name); - fi = open(master_filename, O_RDONLY); + fi = open(master_filename, O_RDONLY|O_BINARY); if(fi<0) { logf(" Failed to open %s\n", master_filename); exit(1); @@ -1139,7 +1139,7 @@ int main(int argn, char *argv[]) if(!config.dummy) { int ret; - fi = open(slave_filename[t], O_RDONLY); + fi = open(slave_filename[t], O_RDONLY|O_BINARY); if(!fi) { logf(" Failed to open %s\n", slave_filename[t]); exit(1); diff --git a/src/swfextract.c b/src/swfextract.c index d7cbf10..b0cb511 100644 --- a/src/swfextract.c +++ b/src/swfextract.c @@ -874,7 +874,7 @@ int main (int argc,char ** argv) } initLog(0,-1,0,0,-1, verbose); - f = open(filename,O_RDONLY); + f = open(filename,O_RDONLY|O_BINARY); if (f<0) { diff --git a/src/swfstrings.c b/src/swfstrings.c index 311e354..1aedf6d 100644 --- a/src/swfstrings.c +++ b/src/swfstrings.c @@ -74,7 +74,7 @@ int main (int argc,char ** argv) if(!filename) exit(0); - f = open(filename,O_RDONLY); + f = open(filename,O_RDONLY|O_BINARY); if (f>=0) { if FAILED(swf_ReadSWF(f,&swf)) { fprintf(stderr,"%s is not a valid SWF file or contains errors.\n",filename);