added O_BINARY
authorkramm <kramm>
Wed, 16 Apr 2003 18:52:09 +0000 (18:52 +0000)
committerkramm <kramm>
Wed, 16 Apr 2003 18:52:09 +0000 (18:52 +0000)
src/swfc.c
src/swfcombine.c
src/swfextract.c
src/swfstrings.c

index d2ef74d..db12bd7 100644 (file)
@@ -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));
index 8514bda..e76b5c6 100644 (file)
@@ -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("<fatal> Couldn't open/read %s.", slave_filename[t]);
@@ -1074,7 +1074,7 @@ int main(int argn, char *argv[])
     else {
        int ret;
        logf("<verbose> 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("<fatal> 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("<fatal> Failed to open %s\n", slave_filename[t]);
                    exit(1);
index d7cbf10..b0cb511 100644 (file)
@@ -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)
     { 
index 311e354..1aedf6d 100644 (file)
@@ -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);