texlive[57635] Build/source/texk/ps2pk: ps2pk: Show TL version number

commits+takuji at tug.org commits+takuji at tug.org
Sat Feb 6 05:50:57 CET 2021


Revision: 57635
          http://tug.org/svn/texlive?view=revision&revision=57635
Author:   takuji
Date:     2021-02-06 05:50:56 +0100 (Sat, 06 Feb 2021)
Log Message:
-----------
ps2pk: Show TL version number and bug report address in usage

Modified Paths:
--------------
    trunk/Build/source/texk/ps2pk/ChangeLog
    trunk/Build/source/texk/ps2pk/c-auto.in
    trunk/Build/source/texk/ps2pk/configure
    trunk/Build/source/texk/ps2pk/configure.ac
    trunk/Build/source/texk/ps2pk/mag.c
    trunk/Build/source/texk/ps2pk/pfb2pfa.c
    trunk/Build/source/texk/ps2pk/pk2bm.c
    trunk/Build/source/texk/ps2pk/pktest.c
    trunk/Build/source/texk/ps2pk/ps2pk.c

Modified: trunk/Build/source/texk/ps2pk/ChangeLog
===================================================================
--- trunk/Build/source/texk/ps2pk/ChangeLog	2021-02-06 04:44:15 UTC (rev 57634)
+++ trunk/Build/source/texk/ps2pk/ChangeLog	2021-02-06 04:50:56 UTC (rev 57635)
@@ -1,3 +1,10 @@
+2021-02-06  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
+
+	* ps2pk.c, mag.c, pfb2pfa.c, pk2bm.c, pktest.c, configure.ac:
+	Show TeX Live version number and bug report address in usage.
+	* ps2pk.c, pk2bm.c, mag.c:
+	Avoid compiler warnings.
+
 2018-12-05  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>
 
 	* mag.c, pk2bm.c: check for missing arguments.

Modified: trunk/Build/source/texk/ps2pk/c-auto.in
===================================================================
--- trunk/Build/source/texk/ps2pk/c-auto.in	2021-02-06 04:44:15 UTC (rev 57634)
+++ trunk/Build/source/texk/ps2pk/c-auto.in	2021-02-06 04:50:56 UTC (rev 57635)
@@ -139,6 +139,9 @@
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
+/* Define to the current TeX Live version string. */
+#undef TL_VERSION
+
 /* Enable large inode numbers on Mac OS X 10.5.  */
 #ifndef _DARWIN_USE_64_BIT_INODE
 # define _DARWIN_USE_64_BIT_INODE 1

Modified: trunk/Build/source/texk/ps2pk/configure
===================================================================
--- trunk/Build/source/texk/ps2pk/configure	2021-02-06 04:44:15 UTC (rev 57634)
+++ trunk/Build/source/texk/ps2pk/configure	2021-02-06 04:50:56 UTC (rev 57635)
@@ -13729,6 +13729,11 @@
 ac_config_headers="$ac_config_headers c-auto.h:c-auto.in"
 
 
+
+
+$as_echo "#define TL_VERSION \"TeX Live 2021/dev\"" >>confdefs.h
+
+
 for ac_prog in kpsewhich
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.

Modified: trunk/Build/source/texk/ps2pk/configure.ac
===================================================================
--- trunk/Build/source/texk/ps2pk/configure.ac	2021-02-06 04:44:15 UTC (rev 57634)
+++ trunk/Build/source/texk/ps2pk/configure.ac	2021-02-06 04:50:56 UTC (rev 57635)
@@ -32,6 +32,10 @@
 
 AC_CONFIG_HEADERS([c-auto.h:c-auto.in])
 
+m4_include([../../version.ac])[] dnl define tex_live_version
+AC_DEFINE([TL_VERSION], ["TeX Live tex_live_version()"],
+          [Define to the current TeX Live version string.])
+
 dnl For tests
 AC_CHECK_PROGS([KPSEWHICH], [kpsewhich], [false])
 

Modified: trunk/Build/source/texk/ps2pk/mag.c
===================================================================
--- trunk/Build/source/texk/ps2pk/mag.c	2021-02-06 04:44:15 UTC (rev 57634)
+++ trunk/Build/source/texk/ps2pk/mag.c	2021-02-06 04:50:56 UTC (rev 57635)
@@ -104,7 +104,7 @@
       	    if (*++argv[0] == '\0') {
       	       argc--; argv++;
       	    }
-      	    if (argv[0] == '\0') goto invalid;
+      	    if (argv[0] == NULL) goto invalid;
 	    DPI = atof(argv[0]);
 	    done = 1;
       	    break;
@@ -115,8 +115,9 @@
       }
 
    if (argc < 1) {
-      msg  ("mag (ps2pk) version " PACKAGE_VERSION "\n");
-      fatal("Usage: %s [-r] [-Rdpi] size . . .\n", myname);
+      msg  ("mag (ps2pk) version " PACKAGE_VERSION " (" TL_VERSION ")\n");
+      msg  ("Usage: %s [-r] [-Rdpi] size . . .\n", myname);
+      fatal("\nEmail bug reports to %s.\n", PACKAGE_BUGREPORT);
    }
    
 #ifdef WIN32

Modified: trunk/Build/source/texk/ps2pk/pfb2pfa.c
===================================================================
--- trunk/Build/source/texk/ps2pk/pfb2pfa.c	2021-02-06 04:44:15 UTC (rev 57634)
+++ trunk/Build/source/texk/ps2pk/pfb2pfa.c	2021-02-06 04:50:56 UTC (rev 57635)
@@ -50,8 +50,9 @@
       }
 
    if (argc < 1) {
-     msg  ("pfb2pfa (ps2pk) version " PACKAGE_VERSION "\n");
-     fatal("Usage: %s [-v] pfbfile [pfafile]\n", myname);
+     msg  ("pfb2pfa (ps2pk) version " PACKAGE_VERSION " (" TL_VERSION ")\n");
+     msg  ("Usage: %s [-v] pfbfile [pfafile]\n", myname);
+     fatal("\nEmail bug reports to %s.\n", PACKAGE_BUGREPORT);
    }
    
    pfbname = argv[0]; argc--; argv++;

Modified: trunk/Build/source/texk/ps2pk/pk2bm.c
===================================================================
--- trunk/Build/source/texk/ps2pk/pk2bm.c	2021-02-06 04:44:15 UTC (rev 57634)
+++ trunk/Build/source/texk/ps2pk/pk2bm.c	2021-02-06 04:50:56 UTC (rev 57635)
@@ -64,7 +64,7 @@
       	    if (*++argv[0] == '\0') {
       	       argc--;  argv++;
       	    }
-      	    if (argv[0] == '\0') goto invalid;
+      	    if (argv[0] == NULL) goto invalid;
       	    C = *argv[0];
       	    done = 1; break;
       	 case 'o':
@@ -71,7 +71,7 @@
       	    if (*++argv[0] == '\0') {
       	       argc--;  ++argv;
       	    }
-      	    if (argv[0] == '\0') goto invalid;
+      	    if (argv[0] == NULL) goto invalid;
       	    C = atoo(argv[0]);
       	    done = 1; break;
       	 case 'H':
@@ -78,7 +78,7 @@
       	    if (*++argv[0] == '\0') {
       	       argc--; argv++;
       	    }
-      	    if (argv[0] == '\0') goto invalid;
+      	    if (argv[0] == NULL) goto invalid;
       	    h = atoi(argv[0]);
             done=1;
       	    break;
@@ -86,7 +86,7 @@
       	    if (*++argv[0] == '\0') {
       	       argc--; argv++;
       	    }
-      	    if (argv[0] == '\0') goto invalid;
+      	    if (argv[0] == NULL) goto invalid;
       	    w = atoi(argv[0]);
 	    done=1;
       	    break;
@@ -104,9 +104,9 @@
    }
 
    if (argc == 0) {
-       msg  ("pk2bm (ps2pk) version " PACKAGE_VERSION "\n");
-      printf("Usage: %s [-bh] {-c char|-o octchar} [-W width -H height] pkfile\n", myname);
-      exit(1);
+       msg  ("pk2bm (ps2pk) version " PACKAGE_VERSION " (" TL_VERSION ")\n");
+       msg  ("Usage: %s [-bh] {-c char|-o octchar} [-W width -H height] pkfile\n", myname);
+       fatal("\nEmail bug reports to %s.\n", PACKAGE_BUGREPORT);
    }
 
 #ifdef WIN32

Modified: trunk/Build/source/texk/ps2pk/pktest.c
===================================================================
--- trunk/Build/source/texk/ps2pk/pktest.c	2021-02-06 04:44:15 UTC (rev 57634)
+++ trunk/Build/source/texk/ps2pk/pktest.c	2021-02-06 04:50:56 UTC (rev 57635)
@@ -49,8 +49,9 @@
    }
 
    if (argc == 0 || C == 0 || W*H == 0) {
-      msg  ("pktest (ps2pk) version " PACKAGE_VERSION "\n");
-      fatal("Usage: %s -c<char> -W<width> -H<height> pkfile\n", myname);
+      msg  ("pktest (ps2pk) version " PACKAGE_VERSION " (" TL_VERSION ")\n");
+      msg  ("Usage: %s -c<char> -W<width> -H<height> pkfile\n", myname);
+      fatal("\nEmail bug reports to %s.\n", PACKAGE_BUGREPORT);
    }
 
    pkname = argv[0];

Modified: trunk/Build/source/texk/ps2pk/ps2pk.c
===================================================================
--- trunk/Build/source/texk/ps2pk/ps2pk.c	2021-02-06 04:44:15 UTC (rev 57634)
+++ trunk/Build/source/texk/ps2pk/ps2pk.c	2021-02-06 04:50:56 UTC (rev 57635)
@@ -269,7 +269,7 @@
       	    if (*++argv[0] == '\0') {
       	       argc--; argv++;
       	    }
-      	    if (argv[0] == '\0') goto invalid;
+      	    if (argv[0] == NULL) goto invalid;
 	    afmname = argv[0]; 
 	    done = 1;
       	    break;
@@ -280,7 +280,7 @@
       	    if (*++argv[0] == '\0') {
       	       argc--; argv++;
       	    }
-      	    if (argv[0] == '\0') goto invalid;
+      	    if (argv[0] == NULL) goto invalid;
 	    encname = argv[0]; 
 	    add_option("-e", encname);
 	    done = 1;
@@ -289,7 +289,7 @@
       	    if (*++argv[0] == '\0') {
       	       argc--; argv++;
       	    }
-      	    if (argv[0] == '\0') goto invalid;
+      	    if (argv[0] == NULL) goto invalid;
 	    efactor = atof(argv[0]);
 	    add_option("-E", argv[0]);
 	    done = 1;
@@ -302,7 +302,7 @@
       	    if (*++argv[0] == '\0') {
       	       argc--; argv++;
       	    }
-      	    if (argv[0] == '\0') goto invalid;
+      	    if (argv[0] == NULL) goto invalid;
 	    pointsize = atof(argv[0]); 
 	    add_option("-P", argv[0]);
 	    done = 1;
@@ -311,7 +311,7 @@
       	    if (*++argv[0] == '\0') {
       	       argc--; argv++;
       	    }
-      	    if (argv[0] == '\0') goto invalid;
+      	    if (argv[0] == NULL) goto invalid;
 	    base_resolution = atoi(argv[0]); 
 	    add_option("-R", argv[0]);
 	    done = 1;
@@ -320,7 +320,7 @@
       	    if (*++argv[0] == '\0') {
       	       argc--; argv++;
       	    }
-      	    if (argv[0] == '\0') goto invalid;
+      	    if (argv[0] == NULL) goto invalid;
 	    slant = atof(argv[0]);
 	    add_option("-S", argv[0]);
 	    done = 1;
@@ -329,7 +329,7 @@
       	    if (*++argv[0] == '\0') {
       	       argc--; argv++;
       	    }
-      	    if (argv[0] == '\0') goto invalid;
+      	    if (argv[0] == NULL) goto invalid;
 	    x_resolution = atoi(argv[0]); done = 1;
 	    if (y_resolution == 0) y_resolution = x_resolution;
 	    add_option("-X", argv[0]);
@@ -338,7 +338,7 @@
       	    if (*++argv[0] == '\0') {
       	       argc--; argv++;
       	    }
-      	    if (argv[0] == '\0') goto invalid;
+      	    if (argv[0] == NULL) goto invalid;
 	    y_resolution = atoi(argv[0]); done = 1;
 	    if (x_resolution == 0) x_resolution = y_resolution;
 	    add_option("-Y", argv[0]);
@@ -353,10 +353,11 @@
       }
 
    if (argc < 1 || argc >2) {
-      msg  ("ps2pk version " PACKAGE_VERSION " (1992-2016)\n");
+      msg  ("ps2pk version " PACKAGE_VERSION " (" TL_VERSION ")\n");
       msg  ("Usage: %s [options] type1font [pkname]\n", myname);
       msg  ("options: -d -v -e<enc> -X<xres> -E<expansion> -S<slant>\n");
-      fatal("options: -O -P<pointsize> -Y<yres> -a<AFM> -R<baseres>\n");
+      msg  ("options: -O -P<pointsize> -Y<yres> -a<AFM> -R<baseres>\n");
+      fatal("\nEmail bug reports to %s.\n", PACKAGE_BUGREPORT);
    }
 
    psname = argv[0]; argc--; argv++;



More information about the tex-live-commits mailing list.