diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-07-18 06:21:39 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-07-18 06:21:39 +0000 |
commit | 619f14f6c7d6fcc6fd505f712dbddc51725a7e9f (patch) | |
tree | f1add9eb5e95ad7a4ac82195ca3014a860607538 /Build/source/texk/ttf2pk2 | |
parent | 5cfb31b17c6d794f6e75d71a4f971af2a320e350 (diff) |
ttf2pk(2): Use binary mode for output files
Change function params to int to avoid MSVC warnings without casting
Drop XCDECL (from W32TeX)
git-svn-id: svn://tug.org/texlive/trunk@27080 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/ttf2pk2')
-rw-r--r-- | Build/source/texk/ttf2pk2/ChangeLog | 8 | ||||
-rw-r--r-- | Build/source/texk/ttf2pk2/errormsg.h | 20 | ||||
-rw-r--r-- | Build/source/texk/ttf2pk2/pklib.c | 2 | ||||
-rw-r--r-- | Build/source/texk/ttf2pk2/tfmaux.c | 7 | ||||
-rw-r--r-- | Build/source/texk/ttf2pk2/ttf2tfm.c | 2 |
5 files changed, 13 insertions, 26 deletions
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) |