1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
In TeX Live we treat all output files as binary.
diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.104.orig/liblcdf/filename.cc lcdf-typetools-2.104/liblcdf/filename.cc
--- lcdf-typetools-2.104.orig/liblcdf/filename.cc 2013-09-17 15:40:15.000000000 +0200
+++ lcdf-typetools-2.104/liblcdf/filename.cc 2014-07-05 11:50:21.000000000 +0200
@@ -126,5 +126,5 @@
if (_actual || !_path)
return _actual;
else
- return fopen(_path.c_str(), binary ? "wb" : "w");
+ return fopen(_path.c_str(), "wb");
}
diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.104.orig/otftotfm/automatic.cc lcdf-typetools-2.104/otftotfm/automatic.cc
--- lcdf-typetools-2.104.orig/otftotfm/automatic.cc 2014-04-10 14:27:02.000000000 +0200
+++ lcdf-typetools-2.104/otftotfm/automatic.cc 2014-07-05 11:50:21.000000000 +0200
@@ -311,7 +311,7 @@
String ls_r = writable_texdir + "ls-R";
bool success = false;
if (access(ls_r.c_str(), R_OK) >= 0) // make sure it already exists
- if (FILE *f = fopen(ls_r.c_str(), "a")) {
+ if (FILE *f = fopen(ls_r.c_str(), "ab")) {
fprintf(f, "./%s:\n%s\n", directory.c_str(), file.c_str());
success = true;
fclose(f);
@@ -675,7 +675,7 @@
#endif
{
fclose(f);
- f = fopen(map_file.c_str(), "w");
+ f = fopen(map_file.c_str(), "wb");
fd = fileno(f);
}
diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.104.orig/otftotfm/otftotfm.cc lcdf-typetools-2.104/otftotfm/otftotfm.cc
--- lcdf-typetools-2.104.orig/otftotfm/otftotfm.cc 2014-07-06 15:17:25.000000000 +0200
+++ lcdf-typetools-2.104/otftotfm/otftotfm.cc 2014-07-07 08:32:34.000000000 +0200
@@ -582,7 +582,7 @@
if (verbose)
errh->message("creating %s", filename.c_str());
- FILE *f = fopen(filename.c_str(), "w");
+ FILE *f = fopen(filename.c_str(), "wb");
if (!f) {
errh->error("%s: %s", filename.c_str(), strerror(errno));
return;
@@ -1024,7 +1024,7 @@
#endif
{
fclose(f);
- f = fopen(filename.c_str(), "w");
+ f = fopen(filename.c_str(), "wb");
fd = fileno(f);
}
diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.104.orig/t1dotlessj/t1dotlessj.cc lcdf-typetools-2.104/t1dotlessj/t1dotlessj.cc
--- lcdf-typetools-2.104.orig/t1dotlessj/t1dotlessj.cc 2014-05-23 15:13:20.000000000 +0200
+++ lcdf-typetools-2.104/t1dotlessj/t1dotlessj.cc 2014-07-05 11:50:21.000000000 +0200
@@ -410,10 +410,10 @@
// write it to output
if (!outputf)
outputf = stdout;
- if (binary) {
#if defined(_MSDOS) || defined(_WIN32)
- _setmode(_fileno(outputf), _O_BINARY);
+ _setmode(_fileno(outputf), _O_BINARY);
#endif
+ if (binary) {
Type1PFBWriter w(outputf);
dotless_font->write(w);
} else {
diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.104.orig/t1rawafm/t1rawafm.cc lcdf-typetools-2.104/t1rawafm/t1rawafm.cc
--- lcdf-typetools-2.104.orig/t1rawafm/t1rawafm.cc 2014-05-23 15:13:20.000000000 +0200
+++ lcdf-typetools-2.104/t1rawafm/t1rawafm.cc 2014-07-05 11:50:21.000000000 +0200
@@ -356,6 +356,9 @@
if (!outf)
errh->fatal("%s: %s", output_file, strerror(errno));
}
+#if defined(_MSDOS) || defined(_WIN32)
+ _setmode(_fileno(outf), _O_BINARY);
+#endif
write_afm(outf, font);
diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.104.orig/t1reencode/t1reencode.cc lcdf-typetools-2.104/t1reencode/t1reencode.cc
--- lcdf-typetools-2.104.orig/t1reencode/t1reencode.cc 2013-09-17 15:27:20.000000000 +0200
+++ lcdf-typetools-2.104/t1reencode/t1reencode.cc 2014-07-05 11:50:21.000000000 +0200
@@ -1094,10 +1094,10 @@
if (!outf)
errh->fatal("%s: %s", output_file, strerror(errno));
}
- if (binary) {
#if defined(_MSDOS) || defined(_WIN32)
- _setmode(_fileno(outf), _O_BINARY);
+ _setmode(_fileno(outf), _O_BINARY);
#endif
+ if (binary) {
Type1PFBWriter w(outf);
font->write(w);
} else {
diff -ur -x Makefile.in -x aclocal.m4 -x autoconf.h.in -x configure lcdf-typetools-2.104.orig/t1testpage/t1testpage.cc lcdf-typetools-2.104/t1testpage/t1testpage.cc
--- lcdf-typetools-2.104.orig/t1testpage/t1testpage.cc 2013-09-17 15:27:20.000000000 +0200
+++ lcdf-typetools-2.104/t1testpage/t1testpage.cc 2014-07-05 11:50:21.000000000 +0200
@@ -665,6 +665,9 @@
if (!outf)
errh->fatal("%s: %s", output_file, strerror(errno));
}
+#if defined(_MSDOS) || defined(_WIN32)
+ _setmode(_fileno(outf), _O_BINARY);
+#endif
//font->undo_synthetic();
|