Outputed swf was corrupt on Windows
authordseg <dseg>
Thu, 2 Jun 2005 04:57:06 +0000 (04:57 +0000)
committerdseg <dseg>
Thu, 2 Jun 2005 04:57:06 +0000 (04:57 +0000)
lib/example/box.c
lib/example/buttontest.c
lib/example/edittext.c
lib/example/glyphshape.c
lib/example/jpegtest.c
lib/example/shape1.c
lib/example/sound.c
lib/example/sprites.c
lib/example/text.c
lib/example/transtest.c
lib/example/zlibtest.c

index 0e7caa1..3fbedcb 100644 (file)
@@ -304,7 +304,7 @@ int main (int argc,char ** argv)
 //  swf_WriteCGI(&swf);
  
 
-  f = open("box.swf",O_RDWR|O_CREAT|O_TRUNC,0644);
+  f = open("box.swf",O_RDWR|O_CREAT|O_TRUNC|O_BINARY,0644);
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");
   close(f);
 
index 9f9f41b..76ba207 100644 (file)
@@ -132,7 +132,7 @@ int main (int argc,char ** argv)
   t = swf_InsertTag(t,ST_SHOWFRAME);
   t = swf_InsertTag(t,ST_END);
 
-  f = open("buttontest.swf",O_WRONLY|O_CREAT, 0644);
+  f = open("buttontest.swf",O_WRONLY|O_CREAT|O_BINARY, 0644);
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");
   close(f);
 
index 463b888..19b04a4 100644 (file)
@@ -121,7 +121,7 @@ int main (int argc,char ** argv)
   tag = swf_InsertTag(tag,ST_SHOWFRAME);
   tag = swf_InsertTag(tag,ST_END);
 
-  f = open("edittext.swf",O_WRONLY|O_CREAT|O_TRUNC, 0644);
+  f = open("edittext.swf",O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644);
   if(swf_WriteSWF(f,&swf)<0) fprintf(stderr,"WriteSWF() failed.\n");
   close(f);
 
index c7e16f6..d1e8d01 100644 (file)
@@ -157,7 +157,7 @@ int main(int argc, char ** argv)
  \r
 //  swf_WriteCGI(&swf);\r
  \r
-  f = open("glyphshape.swf",O_RDWR|O_CREAT|O_TRUNC,0644);\r
+  f = open("glyphshape.swf",O_RDWR|O_CREAT|O_TRUNC|O_BINARY,0644);\r
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");\r
   close(f);\r
 \r
index 3931814..4e195d9 100644 (file)
@@ -148,7 +148,7 @@ int main( int argc, char ** argv)
 
 //  swf_WriteCGI(&swf);
 
-  f = open("jpegtest.swf",O_WRONLY|O_CREAT, 0644);
+  f = open("jpegtest.swf",O_WRONLY|O_CREAT||O_BINARY, 0644);
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");
   close(f);
   
index a65d0e4..2520ce1 100644 (file)
@@ -103,7 +103,7 @@ int main (int argc,char ** argv)
   
                                             // write movie to file
 
-  f = open("shape1.swf",O_WRONLY|O_CREAT|O_TRUNC, 0644);
+  f = open("shape1.swf",O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644);
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");
   close(f);
 
index 2c0d892..de86113 100644 (file)
@@ -70,7 +70,7 @@ int main (int argc,char ** argv)
   
   tag = swf_InsertTag(tag, ST_END);
 
-  f = open("sound.swf",O_WRONLY|O_CREAT|O_TRUNC, 0644);
+  f = open("sound.swf",O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644);
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");
   close(f);
 
index 7c97c3c..569eca3 100644 (file)
@@ -158,7 +158,7 @@ int main(int argc, char ** argv)
 
 //  swf_WriteCGI(&swf);
 
-  f = open("sprites.swf",O_RDWR|O_CREAT|O_TRUNC,0644);
+  f = open("sprites.swf",O_RDWR|O_CREAT|O_TRUNC|O_BINARY,0644);
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");
   close(f);
 
index 6bfe13a..d684c0e 100644 (file)
@@ -142,7 +142,7 @@ int main(int argc, char ** argv)
 //  swf_WriteCGI(&swf);
  
 
-  f = open("text.swf",O_RDWR|O_CREAT|O_TRUNC,0644);
+  f = open("text.swf",O_RDWR|O_CREAT|O_TRUNC|O_BINARY,0644);
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");
   close(f);
 
index 56f5180..0e835be 100644 (file)
@@ -151,7 +151,7 @@ int main (int argc,char ** argv)
   
 //  swf_WriteCGI(&swf);
 
-  f = open("transtest.swf",O_RDWR|O_CREAT|O_TRUNC,0644);
+  f = open("transtest.swf",O_RDWR|O_CREAT|O_TRUNC|O_BINARY,0644);
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");
   close(f);
 
index 967f861..816f17d 100644 (file)
@@ -199,7 +199,7 @@ int main ( int argc, char ** argv)
 
 //  swf_WriteCGI(&swf);
 
-  f = open("zlibtest.swf",O_RDWR|O_CREAT|O_TRUNC,0644);
+  f = open("zlibtest.swf",O_RDWR|O_CREAT|O_TRUNC|O_BINARY,0644);
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");
   close(f);