From 95188f7e5e440a90515a50c85478ed2fc9ed6859 Mon Sep 17 00:00:00 2001 From: kramm Date: Sat, 12 Jun 2004 16:04:26 +0000 Subject: [PATCH] added "b" flag to fopen. --- pdf2swf/ttf2pt1/bdf.c | 2 +- pdf2swf/ttf2pt1/t1asm.c | 4 ++-- pdf2swf/ttf2pt1/ttf2pt1.c | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pdf2swf/ttf2pt1/bdf.c b/pdf2swf/ttf2pt1/bdf.c index 9f6c727..cc580ec 100644 --- a/pdf2swf/ttf2pt1/bdf.c +++ b/pdf2swf/ttf2pt1/bdf.c @@ -428,7 +428,7 @@ openfont( struct line *cl; int i, l; - if ((bdf_file = fopen(fname, "r")) == NULL) { + if ((bdf_file = fopen(fname, "rb")) == NULL) { fprintf(stderr, "**** Cannot open file '%s'\n", fname); exit(1); } else { diff --git a/pdf2swf/ttf2pt1/t1asm.c b/pdf2swf/ttf2pt1/t1asm.c index 0c60a0c..9756231 100644 --- a/pdf2swf/ttf2pt1/t1asm.c +++ b/pdf2swf/ttf2pt1/t1asm.c @@ -526,14 +526,14 @@ int main(int argc, char **argv) /* possibly open input & output files */ if (argc - optind >= 1) { - ifp = fopen(argv[optind], "r"); + ifp = fopen(argv[optind], "rb"); if (!ifp) { fprintf(stderr, "error: cannot open %s for reading\n", argv[1]); exit(1); } } if (argc - optind >= 2) { - ofp = fopen(argv[optind + 1], "w"); + ofp = fopen(argv[optind + 1], "wb"); if (!ofp) { fprintf(stderr, "error: cannot open %s for writing\n", argv[2]); exit(1); diff --git a/pdf2swf/ttf2pt1/ttf2pt1.c b/pdf2swf/ttf2pt1/ttf2pt1.c index 4daae85..009f707 100644 --- a/pdf2swf/ttf2pt1/ttf2pt1.c +++ b/pdf2swf/ttf2pt1/ttf2pt1.c @@ -607,7 +607,7 @@ unicode_init_user( } /* now read in the encoding description file, if requested */ - if ((unicode_map_file = fopen(path, "r")) == NULL) { + if ((unicode_map_file = fopen(path, "rb")) == NULL) { fprintf(stderr, "**** Cannot access map file '%s' ****\n", path); exit(1); } @@ -1709,7 +1709,7 @@ ttf2pt1_main( /* save the command line for the record * (we don't bother about escaping the shell special characters) */ - + j = 0; for(i=1; i