diff options
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/seetexk/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/seetexk/dvibook.c | 2 | ||||
-rw-r--r-- | Build/source/texk/seetexk/dviconcat.c | 4 | ||||
-rw-r--r-- | Build/source/texk/seetexk/dviselect.c | 2 | ||||
-rw-r--r-- | Build/source/texk/seetexk/dvitodvi.c | 2 |
5 files changed, 15 insertions, 0 deletions
diff --git a/Build/source/texk/seetexk/ChangeLog b/Build/source/texk/seetexk/ChangeLog index 980f0f6ff36..962a2fbf06c 100644 --- a/Build/source/texk/seetexk/ChangeLog +++ b/Build/source/texk/seetexk/ChangeLog @@ -1,3 +1,8 @@ +2017-06-11 TANAKA Takuji <ttk@t-lab.opal.ne.jp> + + * dvibook.c, dviconcat.c, dviselect.c, dvitodvi.c: + Show usage and exit if stdin is set to a keyboard. + 2015-10-05 Peter Breitenlohner <peb@mppmu.mpg.de> * dvitodvi.c (ParseSpecs): Avoid to return the address of a diff --git a/Build/source/texk/seetexk/dvibook.c b/Build/source/texk/seetexk/dvibook.c index 80a16e1266c..747952c1657 100644 --- a/Build/source/texk/seetexk/dvibook.c +++ b/Build/source/texk/seetexk/dvibook.c @@ -446,6 +446,8 @@ Usage: %s [-s signature] [-q] [-i infile] [-o outfile] [infile [outfile]]\n", inf = stdin; if (!isatty(fileno(inf))) SET_BINARY(fileno(inf)); + else + goto usage; } else if ((inf = fopen(DVIFileName, FOPEN_RBIN_MODE)) == 0) error(1, -1, "cannot read %s", DVIFileName); if (outname == NULL) { diff --git a/Build/source/texk/seetexk/dviconcat.c b/Build/source/texk/seetexk/dviconcat.c index d776e57a3b5..dad528e4806 100644 --- a/Build/source/texk/seetexk/dviconcat.c +++ b/Build/source/texk/seetexk/dviconcat.c @@ -437,6 +437,8 @@ usage: if (optind >= argc) { if (!isatty(fileno(stdin))) SET_BINARY(fileno(stdin)); + else + goto usage; doit("`stdin'", stdin); } else { @@ -445,6 +447,8 @@ usage: if (*s == '-' && s[1] == 0) { if (!isatty(fileno(stdin))) SET_BINARY(fileno(stdin)); + else + goto usage; 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 6e55ab7a330..5f8a79d9aa7 100644 --- a/Build/source/texk/seetexk/dviselect.c +++ b/Build/source/texk/seetexk/dviselect.c @@ -575,6 +575,8 @@ Usage: %s [-s] [-i infile] [-o outfile] pages [...] [infile [outfile]]\n", inf = stdin; if (!isatty(fileno(inf))) SET_BINARY(fileno(inf)); + else + goto usage; } else if ((inf = fopen(DVIFileName, FOPEN_RBIN_MODE)) == 0) error(1, -1, "cannot read %s", DVIFileName); diff --git a/Build/source/texk/seetexk/dvitodvi.c b/Build/source/texk/seetexk/dvitodvi.c index e081fc3a0cf..deffc3146bd 100644 --- a/Build/source/texk/seetexk/dvitodvi.c +++ b/Build/source/texk/seetexk/dvitodvi.c @@ -688,6 +688,8 @@ Usage: %s [-q] [-i infile] [-o outfile] [-w width] [-h height] <pagespecs> [infi inf = stdin; if (!isatty(fileno(inf))) SET_BINARY(fileno(inf)); + else + goto usage; } else if ((inf = fopen(DVIFileName, FOPEN_RBIN_MODE)) == 0) error(1, -1, "cannot read %s", DVIFileName); if (outname == NULL) { |