summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-09-18 17:43:20 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-09-18 17:43:20 +0000
commite4ee473ae6d8ad39dac9bc5f7584d63556fce55d (patch)
tree34613896eaf904a9537b7ec6b4f216671844414d /Build
parent1e58bd25fb8f8e0ec41232b3d65750f4f6d0562f (diff)
web2c/web2c: Adapt to W32TeX (from Akira)
git-svn-id: svn://tug.org/texlive/trunk@27708 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/web2c/ChangeLog7
-rw-r--r--Build/source/texk/web2c/web2c/fixwrites.c10
-rw-r--r--Build/source/texk/web2c/web2c/main.c8
-rw-r--r--Build/source/texk/web2c/web2c/makecpool.c9
-rw-r--r--Build/source/texk/web2c/web2c/splitup.c11
5 files changed, 44 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/web2c/ChangeLog b/Build/source/texk/web2c/web2c/ChangeLog
index ba721c0800c..d34d286d243 100644
--- a/Build/source/texk/web2c/web2c/ChangeLog
+++ b/Build/source/texk/web2c/web2c/ChangeLog
@@ -1,3 +1,10 @@
+2012-08-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * fixwrites.c, main.c, makecpool.c, splitup.c:
+ Use binary mode for output files.
+ * fixwrites.c: Recognize (u)ppltotf as pltotf variant.
+ From Akira Kakuto <kakuto@fuk.kindai.ac.jp> (W32TeX).
+
2012-07-09 Peter Breitenlohner <peb@mppmu.mpg.de>
* web2c-parser.[ch]: Regenerate with bison 2.5.1.
diff --git a/Build/source/texk/web2c/web2c/fixwrites.c b/Build/source/texk/web2c/web2c/fixwrites.c
index 82d0c8f4ca1..a0375b1fdf7 100644
--- a/Build/source/texk/web2c/web2c/fixwrites.c
+++ b/Build/source/texk/web2c/web2c/fixwrites.c
@@ -181,6 +181,11 @@ advance_cp (char *cp, int lefts)
return advance_cp (cp1, lefts - 1);
}
+#ifdef WIN32
+#include <io.h>
+#include <fcntl.h>
+#endif
+
int
main (int argc, string *argv)
{
@@ -188,6 +193,9 @@ main (int argc, string *argv)
int blanks_done, indent, i;
const char *program_name = "";
+#ifdef WIN32
+ setmode(fileno(stdout), _O_BINARY);
+#endif
for (i = 1; i < argc; i++)
{
if (STREQ(argv[i],"-t"))
@@ -357,6 +365,8 @@ main (int argc, string *argv)
|| (strncmp (cp, "buffer", 6) == 0
&& (STREQ (program_name, "vptovf")
|| STREQ (program_name, "pltotf")
+ || STREQ (program_name, "ppltotf")
+ || STREQ (program_name, "uppltotf")
|| STREQ (program_name, "ovp2ovf")
|| STREQ (program_name, "opl2ofm")))
|| (((strncmp (cp, "buf", 3) == 0
diff --git a/Build/source/texk/web2c/web2c/main.c b/Build/source/texk/web2c/web2c/main.c
index bec91001847..082317595fa 100644
--- a/Build/source/texk/web2c/web2c/main.c
+++ b/Build/source/texk/web2c/web2c/main.c
@@ -218,11 +218,19 @@ initialize (void)
coerce = xfopen (coerce_name, FOPEN_W_MODE);
}
+#ifdef WIN32
+#include <io.h>
+#include <fcntl.h>
+#endif
+
int
main (int argc, string *argv)
{
int error, i;
+#ifdef WIN32
+ setmode(fileno(stdout), _O_BINARY);
+#endif
for (i = 1; i < argc; i++)
if (argv[i][0] == '-')
switch (argv[i][1])
diff --git a/Build/source/texk/web2c/web2c/makecpool.c b/Build/source/texk/web2c/web2c/makecpool.c
index 434d87064ae..74d936c33f7 100644
--- a/Build/source/texk/web2c/web2c/makecpool.c
+++ b/Build/source/texk/web2c/web2c/makecpool.c
@@ -5,6 +5,11 @@
#include <string.h>
#include <stdlib.h>
+#ifdef WIN32
+#include <io.h>
+#include <fcntl.h>
+#endif
+
static const char __svn_version[] =
"$Id: makecpool.c 1230 2008-05-03 11:11:32Z oneiros $ $URL: svn://scm.foundry.supelec.fr/svn/luatex/trunk/src/texk/web2c/luatexdir/makecpool.c $";
@@ -15,6 +20,10 @@ int main(int argc, char *argv[])
char data[1024];
int is_metafont = 0;
int is_luatex = 0;
+
+#ifdef WIN32
+ setmode(fileno(stdout), _O_BINARY);
+#endif
if (argc != 2) {
fprintf(stderr,
"%s: need exactly one argument (base name).\n",
diff --git a/Build/source/texk/web2c/web2c/splitup.c b/Build/source/texk/web2c/web2c/splitup.c
index f40c9b820e1..eb3442eacf9 100644
--- a/Build/source/texk/web2c/web2c/splitup.c
+++ b/Build/source/texk/web2c/web2c/splitup.c
@@ -75,6 +75,11 @@ read_line (void)
return true;
}
+#ifdef WIN32
+#include <io.h>
+#include <fcntl.h>
+#endif
+
int
main (int argc, string *argv)
{
@@ -82,6 +87,10 @@ main (int argc, string *argv)
unsigned coerce_len;
int option;
+#ifdef WIN32
+ setmode(fileno(stdout), _O_BINARY);
+#endif
+
while ((option = getopt(argc, argv, "il:")) != -1) {
switch (option) {
case 'i':
@@ -181,7 +190,7 @@ main (int argc, string *argv)
{
/* Read one routine into a temp file */
has_ini = false;
- temp = xfopen (tempfile, "w+");
+ temp = xfopen (tempfile, "wb+");
while (read_line ())
{