texlive[44561] Build/source/texk/seetexk: texk/seetexk: Show usage

commits+takuji at tug.org commits+takuji at tug.org
Sun Jun 11 16:50:50 CEST 2017


Revision: 44561
          http://tug.org/svn/texlive?view=revision&revision=44561
Author:   takuji
Date:     2017-06-11 16:50:50 +0200 (Sun, 11 Jun 2017)
Log Message:
-----------
texk/seetexk: Show usage and exit if stdin is set to a keyboard

Modified Paths:
--------------
    trunk/Build/source/texk/seetexk/ChangeLog
    trunk/Build/source/texk/seetexk/dvibook.c
    trunk/Build/source/texk/seetexk/dviconcat.c
    trunk/Build/source/texk/seetexk/dviselect.c
    trunk/Build/source/texk/seetexk/dvitodvi.c

Modified: trunk/Build/source/texk/seetexk/ChangeLog
===================================================================
--- trunk/Build/source/texk/seetexk/ChangeLog	2017-06-11 08:54:15 UTC (rev 44560)
+++ trunk/Build/source/texk/seetexk/ChangeLog	2017-06-11 14:50:50 UTC (rev 44561)
@@ -1,3 +1,8 @@
+2017-06-11  TANAKA Takuji  <ttk at 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 at mppmu.mpg.de>
 
 	* dvitodvi.c (ParseSpecs): Avoid to return the address of a

Modified: trunk/Build/source/texk/seetexk/dvibook.c
===================================================================
--- trunk/Build/source/texk/seetexk/dvibook.c	2017-06-11 08:54:15 UTC (rev 44560)
+++ trunk/Build/source/texk/seetexk/dvibook.c	2017-06-11 14:50:50 UTC (rev 44561)
@@ -446,6 +446,8 @@
 		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) {

Modified: trunk/Build/source/texk/seetexk/dviconcat.c
===================================================================
--- trunk/Build/source/texk/seetexk/dviconcat.c	2017-06-11 08:54:15 UTC (rev 44560)
+++ trunk/Build/source/texk/seetexk/dviconcat.c	2017-06-11 14:50:50 UTC (rev 44561)
@@ -437,6 +437,8 @@
 	if (optind >= argc) {
 	  if (!isatty(fileno(stdin)))
 	    SET_BINARY(fileno(stdin));
+	  else
+	    goto usage;
 	  doit("`stdin'", stdin);
 	}
 	else {
@@ -445,6 +447,8 @@
 			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) {

Modified: trunk/Build/source/texk/seetexk/dviselect.c
===================================================================
--- trunk/Build/source/texk/seetexk/dviselect.c	2017-06-11 08:54:15 UTC (rev 44560)
+++ trunk/Build/source/texk/seetexk/dviselect.c	2017-06-11 14:50:50 UTC (rev 44561)
@@ -575,6 +575,8 @@
 		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);
 

Modified: trunk/Build/source/texk/seetexk/dvitodvi.c
===================================================================
--- trunk/Build/source/texk/seetexk/dvitodvi.c	2017-06-11 08:54:15 UTC (rev 44560)
+++ trunk/Build/source/texk/seetexk/dvitodvi.c	2017-06-11 14:50:50 UTC (rev 44561)
@@ -688,6 +688,8 @@
 		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) {



More information about the tex-live-commits mailing list