Fix for Windows: added O_BINARY.
authorkramm <kramm>
Wed, 22 Sep 2004 11:43:41 +0000 (11:43 +0000)
committerkramm <kramm>
Wed, 22 Sep 2004 11:43:41 +0000 (11:43 +0000)
swfs/PreLoaderTemplate.c
swfs/keyboard_viewer.c
swfs/simple_viewer.c

index e99948f..fd95b1a 100644 (file)
@@ -98,7 +98,7 @@ int main (int argc,char ** argv)
   
   tag = swf_InsertTag(tag,ST_END);
 
-  f = open("PreLoaderTemplate.swf",O_WRONLY|O_CREAT|O_TRUNC, 0644);
+  f = open("PreLoaderTemplate.swf",O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644);
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");
   close(f);
 
index e90a84e..6fb0a2d 100644 (file)
@@ -203,7 +203,7 @@ int main (int argc,char ** argv)
   tag = swf_InsertTag(tag,ST_SHOWFRAME);
   tag = swf_InsertTag(tag,ST_END);
   
-  f = open("keyboard_viewer.swf",O_WRONLY|O_CREAT|O_TRUNC, 0644);
+  f = open("keyboard_viewer.swf",O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644);
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");
   close(f);
 
index 7a21883..507409f 100644 (file)
@@ -271,7 +271,7 @@ int main (int argc,char ** argv)
   tag = swf_InsertTag(tag,ST_END);
   
 
-  f = open("simple_viewer.swf",O_WRONLY|O_CREAT|O_TRUNC, 0644);
+  f = open("simple_viewer.swf",O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644);
   if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n");
   close(f);