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);
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);
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);