diff options
author | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2021-02-06 04:50:56 +0000 |
---|---|---|
committer | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2021-02-06 04:50:56 +0000 |
commit | da96ba2fdf574a1a100232deb53150d6099cc56c (patch) | |
tree | f3ab062d9fe7ed76d83ae34a5d0758d8a93494b8 /Build/source | |
parent | f9f122183ddc88522d9022c5ac66c432572b5226 (diff) |
ps2pk: Show TL version number and bug report address in usage
git-svn-id: svn://tug.org/texlive/trunk@57635 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/ps2pk/ChangeLog | 7 | ||||
-rw-r--r-- | Build/source/texk/ps2pk/c-auto.in | 3 | ||||
-rwxr-xr-x | Build/source/texk/ps2pk/configure | 5 | ||||
-rw-r--r-- | Build/source/texk/ps2pk/configure.ac | 4 | ||||
-rw-r--r-- | Build/source/texk/ps2pk/mag.c | 7 | ||||
-rw-r--r-- | Build/source/texk/ps2pk/pfb2pfa.c | 5 | ||||
-rw-r--r-- | Build/source/texk/ps2pk/pk2bm.c | 14 | ||||
-rw-r--r-- | Build/source/texk/ps2pk/pktest.c | 5 | ||||
-rw-r--r-- | Build/source/texk/ps2pk/ps2pk.c | 21 |
9 files changed, 47 insertions, 24 deletions
diff --git a/Build/source/texk/ps2pk/ChangeLog b/Build/source/texk/ps2pk/ChangeLog index 09eebc9b8bf..8bd30034a58 100644 --- a/Build/source/texk/ps2pk/ChangeLog +++ b/Build/source/texk/ps2pk/ChangeLog @@ -1,3 +1,10 @@ +2021-02-06 TANAKA Takuji <ttk@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@gmail.com> * mag.c, pk2bm.c: check for missing arguments. diff --git a/Build/source/texk/ps2pk/c-auto.in b/Build/source/texk/ps2pk/c-auto.in index f6eb86702d0..7599035ee37 100644 --- a/Build/source/texk/ps2pk/c-auto.in +++ b/Build/source/texk/ps2pk/c-auto.in @@ -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 diff --git a/Build/source/texk/ps2pk/configure b/Build/source/texk/ps2pk/configure index 31e8e16daa3..85c6f0565d5 100755 --- a/Build/source/texk/ps2pk/configure +++ b/Build/source/texk/ps2pk/configure @@ -13729,6 +13729,11 @@ done 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. diff --git a/Build/source/texk/ps2pk/configure.ac b/Build/source/texk/ps2pk/configure.ac index 9d0f79dc682..b4f7fbe1bfb 100644 --- a/Build/source/texk/ps2pk/configure.ac +++ b/Build/source/texk/ps2pk/configure.ac @@ -32,6 +32,10 @@ AC_CHECK_FUNCS([memset]) 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]) diff --git a/Build/source/texk/ps2pk/mag.c b/Build/source/texk/ps2pk/mag.c index 3f5c6b61d57..5303a6e0493 100644 --- a/Build/source/texk/ps2pk/mag.c +++ b/Build/source/texk/ps2pk/mag.c @@ -104,7 +104,7 @@ int main(int argc, char *argv[]) { 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 @@ invalid: } 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 diff --git a/Build/source/texk/ps2pk/pfb2pfa.c b/Build/source/texk/ps2pk/pfb2pfa.c index 368d0a9b578..62d58fb0200 100644 --- a/Build/source/texk/ps2pk/pfb2pfa.c +++ b/Build/source/texk/ps2pk/pfb2pfa.c @@ -50,8 +50,9 @@ int main (int argc, char *argv[]) } 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++; diff --git a/Build/source/texk/ps2pk/pk2bm.c b/Build/source/texk/ps2pk/pk2bm.c index 5445bf74092..7f13430cab4 100644 --- a/Build/source/texk/ps2pk/pk2bm.c +++ b/Build/source/texk/ps2pk/pk2bm.c @@ -64,21 +64,21 @@ int main(int argc, char *argv[]) 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': 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': 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 @@ int main(int argc, char *argv[]) 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 @@ invalid: } 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 diff --git a/Build/source/texk/ps2pk/pktest.c b/Build/source/texk/ps2pk/pktest.c index 2cc97f1c7c5..bb677209a43 100644 --- a/Build/source/texk/ps2pk/pktest.c +++ b/Build/source/texk/ps2pk/pktest.c @@ -49,8 +49,9 @@ int main(int argc, char *argv[]) } 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]; diff --git a/Build/source/texk/ps2pk/ps2pk.c b/Build/source/texk/ps2pk/ps2pk.c index c59d9a7f82b..b4c7a05c9f1 100644 --- a/Build/source/texk/ps2pk/ps2pk.c +++ b/Build/source/texk/ps2pk/ps2pk.c @@ -269,7 +269,7 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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 @@ invalid: } 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++; |