From 0f0e478dba51669836f1a6f3078a27c64816f151 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Tue, 11 May 2010 08:39:25 +0000 Subject: SET_BINARY and casts to void git-svn-id: svn://tug.org/texlive/trunk@18196 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/seetexk/ChangeLog | 5 +++++ Build/source/texk/seetexk/dvibook.c | 6 +++--- Build/source/texk/seetexk/dviconcat.c | 8 ++++---- Build/source/texk/seetexk/dviselect.c | 6 +++--- Build/source/texk/seetexk/dvitodvi.c | 6 +++--- 5 files changed, 18 insertions(+), 13 deletions(-) (limited to 'Build/source/texk/seetexk') diff --git a/Build/source/texk/seetexk/ChangeLog b/Build/source/texk/seetexk/ChangeLog index 71bfeef36b5..941de2c59cb 100644 --- a/Build/source/texk/seetexk/ChangeLog +++ b/Build/source/texk/seetexk/ChangeLog @@ -1,3 +1,8 @@ +2010-05-10 Peter Breitenlohner + + * dvibook.c, dviconcat.c, dviselect.c, dvitodvi.c [SET_BINARY}: + Add casts to void. (SET_BINARY): Remove casts to void. + 2010-02-26 Peter Breitenlohner * types.h: Don't #include for KPATHSEA. diff --git a/Build/source/texk/seetexk/dvibook.c b/Build/source/texk/seetexk/dvibook.c index d02dfe73d33..d33d383f9c7 100644 --- a/Build/source/texk/seetexk/dvibook.c +++ b/Build/source/texk/seetexk/dvibook.c @@ -22,7 +22,7 @@ #else #define FOPEN_RBIN_MODE "r" #define FOPEN_RBIN_MODE "w" -#define SET_BINARY(x) 0 +#define SET_BINARY(x) (void)0 extern char *optarg; extern int optind; #endif @@ -429,13 +429,13 @@ Usage: %s [-s signature] [-q] [-i infile] [-o outfile] [infile [outfile]]\n", DVIFileName = "`stdin'"; inf = stdin; if (!isatty(fileno(inf))) - (void)SET_BINARY(fileno(inf)); + SET_BINARY(fileno(inf)); } else if ((inf = fopen(DVIFileName, FOPEN_RBIN_MODE)) == 0) error(1, -1, "cannot read %s", DVIFileName); if (outname == NULL) { outf = stdout; if (!isatty(fileno(outf))) - (void)SET_BINARY(fileno(outf)); + SET_BINARY(fileno(outf)); } else if ((outf = fopen(outname, FOPEN_WBIN_MODE)) == 0) error(1, -1, "cannot write %s", outname); diff --git a/Build/source/texk/seetexk/dviconcat.c b/Build/source/texk/seetexk/dviconcat.c index 9bc8ee112e0..45d3821b2ae 100644 --- a/Build/source/texk/seetexk/dviconcat.c +++ b/Build/source/texk/seetexk/dviconcat.c @@ -20,7 +20,7 @@ #else #define FOPEN_RBIN_MODE "rb" #define FOPEN_RBIN_MODE "wb" -#define SET_BINARY(x) 0 +#define SET_BINARY(x) (void)0 extern char *optarg; extern int optind; #endif @@ -414,7 +414,7 @@ usage: if (outf == NULL) { outf = stdout; if (!isatty(fileno(outf))) - (void)SET_BINARY(fileno(outf)); + SET_BINARY(fileno(outf)); } if ((FontFinder = SCreate(sizeof(struct fontinfo *))) == 0) error(1, 0, "cannot create font finder (out of memory?)"); @@ -426,7 +426,7 @@ usage: */ if (optind >= argc) { if (!isatty(fileno(stdin))) - (void)SET_BINARY(fileno(stdin)); + SET_BINARY(fileno(stdin)); doit("`stdin'", stdin); } else { @@ -434,7 +434,7 @@ usage: s = argv[c]; if (*s == '-' && s[1] == 0) { if (!isatty(fileno(stdin))) - (void)SET_BINARY(fileno(stdin)); + SET_BINARY(fileno(stdin)); doit("`stdin'", stdin); } else if ((f = fopen(s, FOPEN_RBIN_MODE)) == NULL) { diff --git a/Build/source/texk/seetexk/dviselect.c b/Build/source/texk/seetexk/dviselect.c index f5a14667ea1..a1ab9ac67cf 100644 --- a/Build/source/texk/seetexk/dviselect.c +++ b/Build/source/texk/seetexk/dviselect.c @@ -25,7 +25,7 @@ #else #define FOPEN_RBIN_MODE "rb" #define FOPEN_RBIN_MODE "wb" -#define SET_BINARY(x) 0 +#define SET_BINARY(x) (void)0 extern char *optarg; extern int optind; #endif @@ -523,13 +523,13 @@ Usage: %s [-s] [-i infile] [-o outfile] pages [...] [infile [outfile]]\n", DVIFileName = "`stdin'"; inf = stdin; if (!isatty(fileno(inf))) - (void)SET_BINARY(fileno(inf)); + SET_BINARY(fileno(inf)); } else if ((inf = fopen(DVIFileName, FOPEN_RBIN_MODE)) == 0) error(1, -1, "cannot read %s", DVIFileName); if (outname == NULL) { outf = stdout; if (!isatty(fileno(outf))) - (void)SET_BINARY(fileno(outf)); + SET_BINARY(fileno(outf)); } else if ((outf = fopen(outname, FOPEN_WBIN_MODE)) == 0) error(1, -1, "cannot write %s", outname); diff --git a/Build/source/texk/seetexk/dvitodvi.c b/Build/source/texk/seetexk/dvitodvi.c index a91aa0c4045..d8643512fed 100644 --- a/Build/source/texk/seetexk/dvitodvi.c +++ b/Build/source/texk/seetexk/dvitodvi.c @@ -22,7 +22,7 @@ #else #define FOPEN_RBIN_MODE "r" #define FOPEN_RBIN_MODE "w" -#define SET_BINARY(x) 0 +#define SET_BINARY(x) (void)0 extern char *optarg; extern int optind; #endif @@ -665,13 +665,13 @@ Usage: %s [-q] [-i infile] [-o outfile] [-w width] [-h height] [infi DVIFileName = "`stdin'"; inf = stdin; if (!isatty(fileno(inf))) - (void)SET_BINARY(fileno(inf)); + SET_BINARY(fileno(inf)); } else if ((inf = fopen(DVIFileName, FOPEN_RBIN_MODE)) == 0) error(1, -1, "cannot read %s", DVIFileName); if (outname == NULL) { outf = stdout; if (!isatty(fileno(outf))) - (void)SET_BINARY(fileno(outf)); + SET_BINARY(fileno(outf)); } else if ((outf = fopen(outname, FOPEN_WBIN_MODE)) == 0) error(1, -1, "cannot write %s", outname); -- cgit v1.2.3