summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/ttf2pk/ChangeLog8
-rw-r--r--Build/source/texk/ttf2pk/errormsg.h20
-rw-r--r--Build/source/texk/ttf2pk/pklib.c2
-rw-r--r--Build/source/texk/ttf2pk/tfmaux.c7
-rw-r--r--Build/source/texk/ttf2pk/ttf2tfm.c2
-rw-r--r--Build/source/texk/ttf2pk2/ChangeLog8
-rw-r--r--Build/source/texk/ttf2pk2/errormsg.h20
-rw-r--r--Build/source/texk/ttf2pk2/pklib.c2
-rw-r--r--Build/source/texk/ttf2pk2/tfmaux.c7
-rw-r--r--Build/source/texk/ttf2pk2/ttf2tfm.c2
10 files changed, 26 insertions, 52 deletions
diff --git a/Build/source/texk/ttf2pk/ChangeLog b/Build/source/texk/ttf2pk/ChangeLog
index c43a3b26645..226fc38a2c2 100644
--- a/Build/source/texk/ttf2pk/ChangeLog
+++ b/Build/source/texk/ttf2pk/ChangeLog
@@ -1,3 +1,11 @@
+2012-07-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tfmaux.c, ttf2tfm.c: Use binary mode for output files.
+ * pklib.c (putshort), tfmaux.c (write16): Change the param from
+ short into int to avoid MSVC warnings without casting args.
+ * errormsg.h, tfmaux.c [WIN32]: Drop XCDECL.
+ From W32TeX.
+
2011-12-06 Peter Breitenlohner <peb@mppmu.mpg.de>
* Makefile.am: Replace ${prefix}/texmf => $(datarootdir)/texmf.
diff --git a/Build/source/texk/ttf2pk/errormsg.h b/Build/source/texk/ttf2pk/errormsg.h
index 841dd42a036..1c534ce92ed 100644
--- a/Build/source/texk/ttf2pk/errormsg.h
+++ b/Build/source/texk/ttf2pk/errormsg.h
@@ -11,26 +11,6 @@
#ifndef ERRORMSG_H
#define ERRORMSG_H
-
-/*
- Disable some annoying warnings when you compile with -W3. Namely the
- warnings about missing __cdecl specifiers at some places where they are
- not really needed because the compiler can generate them.
-
- This is relevant only if you compile with -Gr option, i.e., use fastcall
- calling convention.
-
- This is needed for fpTeX.
- */
-
-#ifdef WIN32
-#pragma warning (disable : 4007 4096)
-#define XCDECL __cdecl
-#else
-#define XCDECL
-#endif
-
-
extern const char *progname; /* the origin of the error/warning message */
void oops(const char *message,
diff --git a/Build/source/texk/ttf2pk/pklib.c b/Build/source/texk/ttf2pk/pklib.c
index 5b5b380c277..25b1c5c956c 100644
--- a/Build/source/texk/ttf2pk/pklib.c
+++ b/Build/source/texk/ttf2pk/pklib.c
@@ -652,7 +652,7 @@ pk_bm_cvt(void)
static void
-putshort(short w)
+putshort(int w)
{
putc(w >> 8, pk_file);
putc(w, pk_file);
diff --git a/Build/source/texk/ttf2pk/tfmaux.c b/Build/source/texk/ttf2pk/tfmaux.c
index 208307d3684..68e80a708bf 100644
--- a/Build/source/texk/ttf2pk/tfmaux.c
+++ b/Build/source/texk/ttf2pk/tfmaux.c
@@ -50,7 +50,7 @@ static int unsort[257];
* A simple function for sorting sf_array (in inverse order)
*/
-static int XCDECL
+static int
compare_sf(const void *a, const void *b)
{
return (int)(((const struct sf *)b)->sf_code - ((const struct sf *)a)->sf_code);
@@ -163,8 +163,7 @@ remap(long *what,
static void
-write16(register short what,
- register FILE *out)
+write16(int what, FILE *out)
{
(void)fputc(what >> 8, out);
(void)fputc(what & 0xFF, out);
@@ -607,7 +606,7 @@ writeenc(Font *fnt)
strcat(enc_name, fnt->fullname);
strcat(enc_name, ".enc");
- if ((out = fopen(enc_name, "wt")) == NULL)
+ if ((out = fopen(enc_name, "wb")) == NULL)
oops("Cannot open enc file `%s'.", enc_name);
free(enc_name);
diff --git a/Build/source/texk/ttf2pk/ttf2tfm.c b/Build/source/texk/ttf2pk/ttf2tfm.c
index 7f566af32f4..b118529014f 100644
--- a/Build/source/texk/ttf2pk/ttf2tfm.c
+++ b/Build/source/texk/ttf2pk/ttf2tfm.c
@@ -688,7 +688,7 @@ handle_options(int argc, char *argv[], Font *fnt)
oops("Bad small caps height.");
if (vpl_name)
- if ((fnt->vplout = fopen(vpl_name, "wt")) == NULL)
+ if ((fnt->vplout = fopen(vpl_name, "wb")) == NULL)
oops("Cannot open vpl output file.");
if (fnt->subfont_ligs)
diff --git a/Build/source/texk/ttf2pk2/ChangeLog b/Build/source/texk/ttf2pk2/ChangeLog
index 1e9fb42ec42..840cd0bb0ac 100644
--- a/Build/source/texk/ttf2pk2/ChangeLog
+++ b/Build/source/texk/ttf2pk2/ChangeLog
@@ -1,3 +1,11 @@
+2012-07-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tfmaux.c, ttf2tfm.c: Use binary mode for output files.
+ * pklib.c (putshort), tfmaux.c (write16): Change the param from
+ short into int to avoid MSVC warnings without casting args.
+ * errormsg.h, tfmaux.c [WIN32]: Drop XCDECL.
+ From W32TeX.
+
2011-12-06 Peter Breitenlohner <peb@mppmu.mpg.de>
* Makefile.am: Replace ${prefix}/texmf => $(datarootdir)/texmf.
diff --git a/Build/source/texk/ttf2pk2/errormsg.h b/Build/source/texk/ttf2pk2/errormsg.h
index 841dd42a036..1c534ce92ed 100644
--- a/Build/source/texk/ttf2pk2/errormsg.h
+++ b/Build/source/texk/ttf2pk2/errormsg.h
@@ -11,26 +11,6 @@
#ifndef ERRORMSG_H
#define ERRORMSG_H
-
-/*
- Disable some annoying warnings when you compile with -W3. Namely the
- warnings about missing __cdecl specifiers at some places where they are
- not really needed because the compiler can generate them.
-
- This is relevant only if you compile with -Gr option, i.e., use fastcall
- calling convention.
-
- This is needed for fpTeX.
- */
-
-#ifdef WIN32
-#pragma warning (disable : 4007 4096)
-#define XCDECL __cdecl
-#else
-#define XCDECL
-#endif
-
-
extern const char *progname; /* the origin of the error/warning message */
void oops(const char *message,
diff --git a/Build/source/texk/ttf2pk2/pklib.c b/Build/source/texk/ttf2pk2/pklib.c
index 5b5b380c277..25b1c5c956c 100644
--- a/Build/source/texk/ttf2pk2/pklib.c
+++ b/Build/source/texk/ttf2pk2/pklib.c
@@ -652,7 +652,7 @@ pk_bm_cvt(void)
static void
-putshort(short w)
+putshort(int w)
{
putc(w >> 8, pk_file);
putc(w, pk_file);
diff --git a/Build/source/texk/ttf2pk2/tfmaux.c b/Build/source/texk/ttf2pk2/tfmaux.c
index 208307d3684..68e80a708bf 100644
--- a/Build/source/texk/ttf2pk2/tfmaux.c
+++ b/Build/source/texk/ttf2pk2/tfmaux.c
@@ -50,7 +50,7 @@ static int unsort[257];
* A simple function for sorting sf_array (in inverse order)
*/
-static int XCDECL
+static int
compare_sf(const void *a, const void *b)
{
return (int)(((const struct sf *)b)->sf_code - ((const struct sf *)a)->sf_code);
@@ -163,8 +163,7 @@ remap(long *what,
static void
-write16(register short what,
- register FILE *out)
+write16(int what, FILE *out)
{
(void)fputc(what >> 8, out);
(void)fputc(what & 0xFF, out);
@@ -607,7 +606,7 @@ writeenc(Font *fnt)
strcat(enc_name, fnt->fullname);
strcat(enc_name, ".enc");
- if ((out = fopen(enc_name, "wt")) == NULL)
+ if ((out = fopen(enc_name, "wb")) == NULL)
oops("Cannot open enc file `%s'.", enc_name);
free(enc_name);
diff --git a/Build/source/texk/ttf2pk2/ttf2tfm.c b/Build/source/texk/ttf2pk2/ttf2tfm.c
index 7f566af32f4..b118529014f 100644
--- a/Build/source/texk/ttf2pk2/ttf2tfm.c
+++ b/Build/source/texk/ttf2pk2/ttf2tfm.c
@@ -688,7 +688,7 @@ handle_options(int argc, char *argv[], Font *fnt)
oops("Bad small caps height.");
if (vpl_name)
- if ((fnt->vplout = fopen(vpl_name, "wt")) == NULL)
+ if ((fnt->vplout = fopen(vpl_name, "wb")) == NULL)
oops("Cannot open vpl output file.");
if (fnt->subfont_ligs)