summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/dviljk/win32/ChangeLog4
-rw-r--r--Build/source/texk/dviljk/win32/dvihp.c2
-rw-r--r--Build/source/texk/dvipos/ChangeLog4
-rw-r--r--Build/source/texk/dvipos/dvipos.c2
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.0.11-PATCHES/patch-04-kpse_init14
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.0.11/src/FileFinder.cpp2
-rw-r--r--Build/source/texk/gsftopk/ChangeLog4
-rw-r--r--Build/source/texk/gsftopk/gsftopk.c2
-rw-r--r--Build/source/texk/makeindexk/ChangeLog4
-rw-r--r--Build/source/texk/makeindexk/mkind.c2
-rw-r--r--Build/source/texk/mendexk/ChangeLog4
-rw-r--r--Build/source/texk/mendexk/kp.c2
-rw-r--r--Build/source/texk/web2c/ChangeLog7
-rw-r--r--Build/source/texk/web2c/bibtex.ch13
-rw-r--r--Build/source/texk/web2c/dvicopy.ch21
-rw-r--r--Build/source/texk/web2c/dvitype.ch19
-rw-r--r--Build/source/texk/web2c/gftodvi.ch15
-rw-r--r--Build/source/texk/web2c/gftopk.ch15
-rw-r--r--Build/source/texk/web2c/gftype.ch15
-rw-r--r--Build/source/texk/web2c/mft.ch17
-rw-r--r--Build/source/texk/web2c/omegaware/ChangeLog5
-rw-r--r--Build/source/texk/web2c/omegaware/odvicopy.ch21
-rw-r--r--Build/source/texk/web2c/omegaware/odvitype.ch19
-rw-r--r--Build/source/texk/web2c/omegaware/ofm2opl.ch15
-rw-r--r--Build/source/texk/web2c/omegaware/opl2ofm.ch15
-rw-r--r--Build/source/texk/web2c/omegaware/otangle.ch15
-rw-r--r--Build/source/texk/web2c/omegaware/ovf2ovp.ch15
-rw-r--r--Build/source/texk/web2c/omegaware/ovp2ovf.ch15
-rw-r--r--Build/source/texk/web2c/otps/win32/ChangeLog4
-rw-r--r--Build/source/texk/web2c/otps/win32/mkocp.c2
-rw-r--r--Build/source/texk/web2c/patgen.ch15
-rw-r--r--Build/source/texk/web2c/pdftexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/pdftexdir/ttf2afm.c2
-rw-r--r--Build/source/texk/web2c/pktogf.ch15
-rw-r--r--Build/source/texk/web2c/pktype.ch15
-rw-r--r--Build/source/texk/web2c/pltotf.ch15
-rw-r--r--Build/source/texk/web2c/pooltype.ch16
-rw-r--r--Build/source/texk/web2c/ptexdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/ptexdir/pbibtex.ch16
-rw-r--r--Build/source/texk/web2c/ptexdir/pdvitype.ch16
-rw-r--r--Build/source/texk/web2c/ptexdir/ppltotf.ch16
-rw-r--r--Build/source/texk/web2c/ptexdir/ptftopl.ch16
-rw-r--r--Build/source/texk/web2c/tangle.ch15
-rw-r--r--Build/source/texk/web2c/tangleboot.pin6
-rw-r--r--Build/source/texk/web2c/tftopl.ch15
-rw-r--r--Build/source/texk/web2c/uptexdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/uptexdir/upbibtex.ch16
-rw-r--r--Build/source/texk/web2c/uptexdir/updvitype.ch16
-rw-r--r--Build/source/texk/web2c/uptexdir/uppltotf.ch16
-rw-r--r--Build/source/texk/web2c/uptexdir/uptftopl.ch16
-rw-r--r--Build/source/texk/web2c/vftovp.ch15
-rw-r--r--Build/source/texk/web2c/vptovf.ch15
-rw-r--r--Build/source/texk/web2c/weave.ch15
53 files changed, 366 insertions, 229 deletions
diff --git a/Build/source/texk/dviljk/win32/ChangeLog b/Build/source/texk/dviljk/win32/ChangeLog
index f3a3da3e9b6..d92fc44fdcb 100644
--- a/Build/source/texk/dviljk/win32/ChangeLog
+++ b/Build/source/texk/dviljk/win32/ChangeLog
@@ -1,3 +1,7 @@
+2012-07-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * dvihp.c: Pass program name string to kpse_set_program_name.
+
2011-08-04 Peter Breitenlohner <peb@mppmu.mpg.de>
* stackenv.c: Do not #include "variables.h".
diff --git a/Build/source/texk/dviljk/win32/dvihp.c b/Build/source/texk/dviljk/win32/dvihp.c
index ec9ecbfb5dd..5f37dd3a923 100644
--- a/Build/source/texk/dviljk/win32/dvihp.c
+++ b/Build/source/texk/dviljk/win32/dvihp.c
@@ -144,7 +144,7 @@ main (int argc, char *argv[])
output_and_cleanup_function = output_and_cleanup;
progname = argv[0];
- kpse_set_program_name (progname, NULL);
+ kpse_set_program_name (argv[0], "dvihp");
#ifdef _WIN32
setmode(fileno(stdin), _O_BINARY);
setmode(fileno(stdout), _O_BINARY);
diff --git a/Build/source/texk/dvipos/ChangeLog b/Build/source/texk/dvipos/ChangeLog
index 3b4f017c8df..b6caa0e5367 100644
--- a/Build/source/texk/dvipos/ChangeLog
+++ b/Build/source/texk/dvipos/ChangeLog
@@ -1,3 +1,7 @@
+2012-07-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * dvipos.c: Pass program name string to kpse_set_program_name.
+
2012-07-10 Peter Breitenlohner <peb@mppmu.mpg.de>
* dvipos.c: Use binary mode for output files.
diff --git a/Build/source/texk/dvipos/dvipos.c b/Build/source/texk/dvipos/dvipos.c
index f4613111289..62fd5b4e9d2 100644
--- a/Build/source/texk/dvipos/dvipos.c
+++ b/Build/source/texk/dvipos/dvipos.c
@@ -229,7 +229,7 @@ int main (int argc, char *argv[])
msg_out(M_FAIL, "Could not open the framed DVI file %s.\n", frmfname);
#ifdef KPATHSEA
- kpse_set_program_name(argv[0], NULL);
+ kpse_set_program_name(argv[0], "dvipos");
#elif MIKTEX
miktex_initialize();
#endif
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.0.11-PATCHES/patch-04-kpse_init b/Build/source/texk/dvisvgm/dvisvgm-1.0.11-PATCHES/patch-04-kpse_init
new file mode 100644
index 00000000000..6db8fda0af5
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.0.11-PATCHES/patch-04-kpse_init
@@ -0,0 +1,14 @@
+ Pass explicit program name to kpse_set_program_name.
+
+diff -ur dvisvgm-1.0.11.orig/src/FileFinder.cpp dvisvgm-1.0.11/src/FileFinder.cpp
+--- dvisvgm-1.0.11.orig/src/FileFinder.cpp 2012-03-12 09:58:46.000000000 +0100
++++ dvisvgm-1.0.11/src/FileFinder.cpp 2012-07-15 21:28:35.000000000 +0200
+@@ -79,7 +79,7 @@
+ if (FAILED(hres))
+ throw MessageException("MiKTeX.Session could not be initialized");
+ #else
+- kpse_set_program_name(progname, NULL);
++ kpse_set_program_name(progname, "dvisvgm");
+ // enable tfm and mf generation (actually invoked by calls of kpse_make_tex)
+ kpse_set_program_enabled(kpse_tfm_format, 1, kpse_src_env);
+ kpse_set_program_enabled(kpse_mf_format, 1, kpse_src_env);
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.0.11/src/FileFinder.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.0.11/src/FileFinder.cpp
index b452be8e4cb..eaa1e7e90fe 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.0.11/src/FileFinder.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.0.11/src/FileFinder.cpp
@@ -79,7 +79,7 @@ void FileFinder::init (const char *progname, bool enable_mktexmf, const char *us
if (FAILED(hres))
throw MessageException("MiKTeX.Session could not be initialized");
#else
- kpse_set_program_name(progname, NULL);
+ kpse_set_program_name(progname, "dvisvgm");
// enable tfm and mf generation (actually invoked by calls of kpse_make_tex)
kpse_set_program_enabled(kpse_tfm_format, 1, kpse_src_env);
kpse_set_program_enabled(kpse_mf_format, 1, kpse_src_env);
diff --git a/Build/source/texk/gsftopk/ChangeLog b/Build/source/texk/gsftopk/ChangeLog
index dac076baf07..639f30a36aa 100644
--- a/Build/source/texk/gsftopk/ChangeLog
+++ b/Build/source/texk/gsftopk/ChangeLog
@@ -1,3 +1,7 @@
+2012-07-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * gsftopk.c: Pass program name string to kpse_set_program_name.
+
2011-12-06 Peter Breitenlohner <peb@mppmu.mpg.de>
* Makefile.am: Replace ${prefix}/texmf => $(datarootdir)/texmf.
diff --git a/Build/source/texk/gsftopk/gsftopk.c b/Build/source/texk/gsftopk/gsftopk.c
index a626d4778c7..23bf508a42a 100644
--- a/Build/source/texk/gsftopk/gsftopk.c
+++ b/Build/source/texk/gsftopk/gsftopk.c
@@ -2251,7 +2251,7 @@ Author of gsftopk: Paul Vojta.");
#ifdef WIN32
setmode(fileno(stdout), _O_BINARY);
#endif
- kpse_set_program_name(argv[0], NULL);
+ kpse_set_program_name(argv[0], "gsftopk");
kpse_init_prog("GSFTOPK", (int) (dpi + 0.5), NULL, "cmr10");
if (!test)
xputenv_int("KPATHSEA_DPI", (int) (dpi + 0.5));
diff --git a/Build/source/texk/makeindexk/ChangeLog b/Build/source/texk/makeindexk/ChangeLog
index bf7c2c6a1c9..64bbcb621a2 100644
--- a/Build/source/texk/makeindexk/ChangeLog
+++ b/Build/source/texk/makeindexk/ChangeLog
@@ -1,3 +1,7 @@
+2012-07-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mkind.c: Pass program name string to kpse_set_program_name.
+
2011-09-30 Peter Breitenlohner <peb@mppmu.mpg.de>
* mkind.c (main): The argument of kpse_set_program_name() must
diff --git a/Build/source/texk/makeindexk/mkind.c b/Build/source/texk/makeindexk/mkind.c
index 2373671eff3..63360fe320b 100644
--- a/Build/source/texk/makeindexk/mkind.c
+++ b/Build/source/texk/makeindexk/mkind.c
@@ -106,7 +106,7 @@ main(int argc, char *argv[])
int log_given = FALSE;
#if USE_KPATHSEA
- kpse_set_program_name (*argv, NULL);
+ kpse_set_program_name (argv[0], "makeindex");
#endif
/* determine program name */
diff --git a/Build/source/texk/mendexk/ChangeLog b/Build/source/texk/mendexk/ChangeLog
index 01dd6507b56..146be2bddd5 100644
--- a/Build/source/texk/mendexk/ChangeLog
+++ b/Build/source/texk/mendexk/ChangeLog
@@ -1,3 +1,7 @@
+2012-07-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * kp.c: Pass program name string to kpse_set_program_name.
+
2012-03-04 Peter Breitenlohner <peb@mppmu.mpg.de>
Avoid 'differ in signedness' warnings.
diff --git a/Build/source/texk/mendexk/kp.c b/Build/source/texk/mendexk/kp.c
index 572c7a2fe58..b319faa9c65 100644
--- a/Build/source/texk/mendexk/kp.c
+++ b/Build/source/texk/mendexk/kp.c
@@ -8,7 +8,7 @@
int
KP_init(char *prog)
{
- kpse_set_program_name(prog, NULL);
+ kpse_set_program_name(prog, "mendex");
return 0;
}
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index 8b050bca762..fd4608d7587 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,10 @@
+2012-07-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * bibtex.ch, dvicopy.ch, dvitype.ch, gftodvi.ch, gftopk.ch,
+ gftype.ch, mft.ch, patgen.ch, pktogf.ch, pktype.ch, pltotf.ch,
+ pooltype.ch, tangle.ch, tftopl.ch, vftovp.ch, vptovf.ch,
+ weave.ch: Define and use my_name.
+
2012-07-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* texextra.c: Must #define DLLPROC before reading texd.h.
diff --git a/Build/source/texk/web2c/bibtex.ch b/Build/source/texk/web2c/bibtex.ch
index ce7faf597f6..5653ca9f805 100644
--- a/Build/source/texk/web2c/bibtex.ch
+++ b/Build/source/texk/web2c/bibtex.ch
@@ -22,6 +22,13 @@
\let\maybe = \iffalse % process only changed sections
@z
+@x [1] Define my_name
+@d banner=='This is BibTeX, Version 0.99d' {printed when the program starts}
+@y
+@d my_name=='bibtex'
+@d banner=='This is BibTeX, Version 0.99d' {printed when the program starts}
+@z
+
% [2] `term_in' and `term_out' are standard input and output. But
% there is a complication: BibTeX passes `term_out' to some routines as
% a var parameter. web2c turns a var parameter f into &f at the calling
@@ -1518,7 +1525,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('bibtex');
+ usage (my_name);
end else if argument_is ('min-crossrefs') then begin
min_crossrefs := atoi (optarg);
@@ -1535,8 +1542,8 @@ begin
{Now |optind| is the index of first non-option on the command line.
We must have one remaining argument.}
if (optind + 1 <> argc) then begin
- write_ln (stderr, 'bibtex: Need exactly one file argument.');
- usage ('bibtex');
+ write_ln (stderr, my_name, ': Need exactly one file argument.');
+ usage (my_name);
end;
end;
diff --git a/Build/source/texk/web2c/dvicopy.ch b/Build/source/texk/web2c/dvicopy.ch
index 81f51d9d18a..9f0e044c7cf 100644
--- a/Build/source/texk/web2c/dvicopy.ch
+++ b/Build/source/texk/web2c/dvicopy.ch
@@ -15,7 +15,14 @@
\let\maybe=\iffalse
@z
-@x [1] No random reading on stdin, may be not seekable.
+@x [1] Define my_name
+@d banner=='This is DVIcopy, Version 1.6' {printed when the program starts}
+@y
+@d my_name=='dvicopy'
+@d banner=='This is DVIcopy, Version 1.6' {printed when the program starts}
+@z
+
+@x [2] No random reading on stdin, may be not seekable.
@d random_reading==true {should we skip around in the file?}
@y
@<Globals in the outer block@>=
@@ -31,7 +38,7 @@ procedure initialize; {this procedure gets things started properly}
procedure initialize; {this procedure gets things started properly}
var @<Local variables for initialization@>@/
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
parse_arguments;
print (banner); print_ln (version_string);
@z
@@ -553,7 +560,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('dvicopy');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (DVICOPY_HELP, nil);
@@ -577,8 +584,8 @@ begin
{Now |optind| is the index of first non-option on the command line.
We can have zero, one, or two remaining arguments.}
if (optind > argc) or (optind + 2 < argc) then begin
- write_ln (stderr, 'dvicopy: Need at most two file arguments.');
- usage ('dvicopy');
+ write_ln (stderr, my_name, ': Need at most two file arguments.');
+ usage (my_name);
end;
if optind = argc then begin
@@ -665,7 +672,7 @@ while optarg[m] do begin
end else if optarg[m] = "." then begin
incr (k);
if k >= 10 then begin
- write_ln (stderr, 'dvicopy: More than ten count registers specified.');
+ write_ln (stderr, my_name, ': More than ten count registers specified.');
uexit (1);
end;
incr (m);
@@ -673,7 +680,7 @@ while optarg[m] do begin
end else begin
start_count[k] := strtol (optarg + m, address_of (end_num), 10);
if end_num = optarg + m then begin
- write_ln (stderr, 'dvicopy: -page-start values must be numeric or *.');
+ write_ln (stderr, my_name, ': -page-start values must be numeric or *.');
uexit (1);
end;
start_there[k] := true;
diff --git a/Build/source/texk/web2c/dvitype.ch b/Build/source/texk/web2c/dvitype.ch
index 960d6893591..813fa9b94a7 100644
--- a/Build/source/texk/web2c/dvitype.ch
+++ b/Build/source/texk/web2c/dvitype.ch
@@ -28,6 +28,13 @@
\def\title{DVI$\,$\lowercase{type} changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is DVItype, Version 3.6' {printed when the program starts}
+@y
+@d my_name=='dvitype'
+@d banner=='This is DVItype, Version 3.6' {printed when the program starts}
+@z
+
% [3] Specify the output file to simplify web2c, and don't print the
% banner until later.
@x
@@ -47,7 +54,7 @@ procedure initialize; {this procedure gets things started properly}
procedure initialize; {this procedure gets things started properly}
var i:integer; {loop index for initializations}
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
parse_arguments;
print (banner);
print_ln (version_string);
@@ -537,7 +544,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('dvitype');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (DVITYPE_HELP, nil);
@@ -569,8 +576,8 @@ begin
{Now |optind| is the index of first non-option on the command line.}
if (optind + 1 <> argc) then begin
- write_ln (stderr, 'dvitype: Need exactly one file argument.');
- usage ('dvitype');
+ write_ln (stderr, my_name, ': Need exactly one file argument.');
+ usage (my_name);
end;
dvi_name := extend_filename (cmdline (optind), 'dvi');
end;
@@ -630,7 +637,7 @@ while optarg[m] do begin
end else if optarg[m] = "." then begin
incr (k);
if k >= 10 then begin
- write_ln (stderr, 'dvitype: More than ten count registers specified.');
+ write_ln (stderr, my_name, ': More than ten count registers specified.');
uexit (1);
end;
incr (m);
@@ -638,7 +645,7 @@ while optarg[m] do begin
end else begin
start_count[k] := strtol (optarg + m, address_of (end_num), 10);
if end_num = optarg + m then begin
- write_ln (stderr, 'dvitype: -page-start values must be numeric or *.');
+ write_ln (stderr, my_name, ': -page-start values must be numeric or *.');
uexit (1);
end;
start_there[k] := true;
diff --git a/Build/source/texk/web2c/gftodvi.ch b/Build/source/texk/web2c/gftodvi.ch
index 5e0092cee7c..9decc79927d 100644
--- a/Build/source/texk/web2c/gftodvi.ch
+++ b/Build/source/texk/web2c/gftodvi.ch
@@ -43,6 +43,13 @@
\def\title{GF$\,$\lowercase{to}$\,$DVI changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is GFtoDVI, Version 3.0' {printed when the program starts}
+@y
+@d my_name=='gftodvi'
+@d banner=='This is GFtoDVI, Version 3.0' {printed when the program starts}
+@z
+
@x [3] Redirect output to term_out.
@d print(#)==write(#)
@d print_ln(#)==write_ln(#)
@@ -69,7 +76,7 @@ var @<Globals in the outer block@>@/
procedure initialize; {this procedure gets things started properly}
var @!i,@!j,@!m,@!n:integer; {loop indices for initializations}
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
kpse_init_prog ('GFTODVI', 0, nil, nil);
parse_arguments;
if verbose then begin
@@ -650,7 +657,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('gftodvi');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (GFTODVI_HELP, nil);
@@ -668,8 +675,8 @@ begin
{Now |optind| is the index of first non-option on the command line.
We must have one remaining argument.}
if (optind + 1 <> argc) then begin
- write_ln (stderr, 'gftodvi: Need exactly one file argument.');
- usage ('gftodvi');
+ write_ln (stderr, my_name, ': Need exactly one file argument.');
+ usage (my_name);
end;
end;
diff --git a/Build/source/texk/web2c/gftopk.ch b/Build/source/texk/web2c/gftopk.ch
index b8d418e3b8e..af4f10fcb77 100644
--- a/Build/source/texk/web2c/gftopk.ch
+++ b/Build/source/texk/web2c/gftopk.ch
@@ -19,6 +19,13 @@
\def\title{GF$\,$\lowercase{to}$\,$PK changes C}
@z
+@x [1] Define my_name
+@d banner=='This is GFtoPK, Version 2.3' {printed when the program starts}
+@y
+@d my_name=='gftopk'
+@d banner=='This is GFtoPK, Version 2.3' {printed when the program starts}
+@z
+
@x [4] No global labels.
@ The binary input comes from |gf_file|, and the output font is written
on |pk_file|. All text output is written on \PASCAL's standard |output|
@@ -55,7 +62,7 @@ var @<Globals in the outer block@>@/
procedure initialize; {this procedure gets things started properly}
var i:integer; {loop index for initializations}
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
kpse_init_prog ('GFTOPK', 0, nil, nil);
parse_arguments;
print(banner); print_ln(version_string);
@@ -416,7 +423,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('gftopk'); {|getopt| has already given an error message.}
+ usage (my_name); {|getopt| has already given an error message.}
end else if argument_is ('help') then begin
usage_help (GFTOPK_HELP, nil);
@@ -430,8 +437,8 @@ begin
{Now |optind| is the index of first non-option on the command line.
We must have one or two remaining arguments.}
if (optind + 1 <> argc) and (optind + 2 <> argc) then begin
- write_ln (stderr, 'gftopk: Need one or two file arguments.');
- usage ('gftopk');
+ write_ln (stderr, my_name, ': Need one or two file arguments.');
+ usage (my_name);
end;
gf_name := cmdline (optind);
diff --git a/Build/source/texk/web2c/gftype.ch b/Build/source/texk/web2c/gftype.ch
index 13411f03b92..a663670e5f7 100644
--- a/Build/source/texk/web2c/gftype.ch
+++ b/Build/source/texk/web2c/gftype.ch
@@ -23,6 +23,13 @@
\def\title{GF$\,$\lowercase{type} changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is GFtype, Version 3.1' {printed when the program starts}
+@y
+@d my_name=='gftype'
+@d banner=='This is GFtype, Version 3.1' {printed when the program starts}
+@z
+
@x [3] No global labels.
@d print(#)==write(#)
@d print_ln(#)==write_ln(#)
@@ -51,7 +58,7 @@ procedure initialize; {this procedure gets things started properly}
@!bound_default:integer; {temporary for setup}
@!bound_name:const_cstring; {temporary for setup}
begin
- kpse_set_program_name (argv[0], 'gftype');
+ kpse_set_program_name (argv[0], my_name);
kpse_init_prog ('GFTYPE', 0, nil, nil);
parse_arguments;
print(banner);print_ln(version_string);
@@ -436,7 +443,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('gftype');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (GFTYPE_HELP, nil);
@@ -450,8 +457,8 @@ begin
{Now |optind| is the index of first non-option on the command line.
We must have one remaining argument.}
if (optind + 1 <> argc) then begin
- write_ln (stderr, 'gftype: Need exactly one file argument.');
- usage ('gftype');
+ write_ln (stderr, my_name, ': Need exactly one file argument.');
+ usage (my_name);
end;
end;
diff --git a/Build/source/texk/web2c/mft.ch b/Build/source/texk/web2c/mft.ch
index 70f3a7016ba..9f028aba5de 100644
--- a/Build/source/texk/web2c/mft.ch
+++ b/Build/source/texk/web2c/mft.ch
@@ -36,6 +36,13 @@ been developed in January, 1980.
Changes for \MP\ by W.~Bzyl in July, 2001.
@z
+@x [2] Define my_name
+@d banner=='This is MFT, Version 2.0'
+@y
+@d my_name=='mft'
+@d banner=='This is MFT, Version 2.0'
+@z
+
% [3] No need for the final label in C.
% AIX defines `class' in <math.h>, so let's take this opportunity to
% define that away.
@@ -59,7 +66,7 @@ procedure initialize;
procedure initialize;
var @<Local variables for initialization@>@/
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
parse_arguments;
@<Set initial values@>;
@z
@@ -1090,7 +1097,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('mft');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (MFT_HELP, nil);
@@ -1106,7 +1113,7 @@ begin
end else if argument_is ('style') then begin
if (n_style_name = max_style_name) then begin
fatal_error ('Too many style files specified.');
- usage ('mft');
+ usage (my_name);
end;
style_name[n_style_name] := extend_filename (optarg, 'mft');
n_style_name := n_style_name + 1;
@@ -1117,8 +1124,8 @@ begin
{Now |optind| is the index of first non-option on the command line.
We must have exactly one remaining argument.}
if (optind + 1 <> argc) then begin
- write_ln (stderr, 'mft: Need exactly one file argument.');
- usage ('mft');
+ write_ln (stderr, my_name, ': Need exactly one file argument.');
+ usage (my_name);
end;
suffix := find_suffix (cmdline (optind));
diff --git a/Build/source/texk/web2c/omegaware/ChangeLog b/Build/source/texk/web2c/omegaware/ChangeLog
index 3355c20aeb1..9010f9d7bad 100644
--- a/Build/source/texk/web2c/omegaware/ChangeLog
+++ b/Build/source/texk/web2c/omegaware/ChangeLog
@@ -1,3 +1,8 @@
+2012-07-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * odvicopy.ch, odvitype.ch, ofm2opl.ch, opl2ofm.ch, otangle.ch,
+ ovf2ovp.ch, ovp2ovf.ch: Define and use my_name.
+
2012-05-15 Peter Breitenlohner <peb@mppmu.mpg.de>
* am/omegaware.am: Add rule to build wovp2ovf.
diff --git a/Build/source/texk/web2c/omegaware/odvicopy.ch b/Build/source/texk/web2c/omegaware/odvicopy.ch
index 57f73b00071..762751acde5 100644
--- a/Build/source/texk/web2c/omegaware/odvicopy.ch
+++ b/Build/source/texk/web2c/omegaware/odvicopy.ch
@@ -24,7 +24,14 @@
\let\maybe=\iffalse
@z
-@x [1] No random reading on stdin, may be not seekable.
+@x [1] Define my_name
+@d banner=='This is ODVIcopy, Version 1.6' {printed when the program starts}
+@y
+@d my_name=='odvicopy'
+@d banner=='This is ODVIcopy, Version 1.6' {printed when the program starts}
+@z
+
+@x [2] No random reading on stdin, may be not seekable.
@d random_reading==true {should we skip around in the file?}
@y
@<Globals in the outer block@>=
@@ -40,7 +47,7 @@ procedure initialize; {this procedure gets things started properly}
procedure initialize; {this procedure gets things started properly}
var @<Local variables for initialization@>@/
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
parse_arguments;
print (banner); print_ln (version_string);
@z
@@ -629,7 +636,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('odvicopy');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (ODVICOPY_HELP, nil);
@@ -653,8 +660,8 @@ begin
{Now |optind| is the index of first non-option on the command line.
We can have zero, one, or two remaining arguments.}
if (optind > argc) or (optind + 2 < argc) then begin
- write_ln (stderr, 'odvicopy: Need at most two file arguments.');
- usage ('odvicopy');
+ write_ln (stderr, my_name, ': Need at most two file arguments.');
+ usage (my_name);
end;
if optind = argc then begin
@@ -741,7 +748,7 @@ while optarg[m] do begin
end else if optarg[m] = "." then begin
incr (k);
if k >= 10 then begin
- write_ln (stderr, 'odvicopy: More than ten count registers specified.');
+ write_ln (stderr, my_name, ': More than ten count registers specified.');
uexit (1);
end;
incr (m);
@@ -749,7 +756,7 @@ while optarg[m] do begin
end else begin
start_count[k] := strtol (optarg + m, address_of (end_num), 10);
if end_num = optarg + m then begin
- write_ln (stderr, 'odvicopy: -page-start values must be numeric or *.');
+ write_ln (stderr, my_name, ': -page-start values must be numeric or *.');
uexit (1);
end;
start_there[k] := true;
diff --git a/Build/source/texk/web2c/omegaware/odvitype.ch b/Build/source/texk/web2c/omegaware/odvitype.ch
index 02cd626cddf..7af82f33c8a 100644
--- a/Build/source/texk/web2c/omegaware/odvitype.ch
+++ b/Build/source/texk/web2c/omegaware/odvitype.ch
@@ -36,6 +36,13 @@
\def\title{DVI$\,$\lowercase{type} changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is ODVItype, Version 1.5' {printed when the program starts}
+@y
+@d my_name=='odvitype'
+@d banner=='This is ODVItype, Version 1.5' {printed when the program starts}
+@z
+
% [3] Specify the output file to simplify web2c, and don't print the
% banner until later.
@x
@@ -55,7 +62,7 @@ procedure initialize; {this procedure gets things started properly}
procedure initialize; {this procedure gets things started properly}
var i:integer; {loop index for initializations}
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
parse_arguments;
print (banner);
print_ln (version_string);
@@ -616,7 +623,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('odvitype');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (ODVITYPE_HELP, nil);
@@ -649,8 +656,8 @@ begin
{Now |optind| is the index of first non-option on the command line.}
if (optind + 1 <> argc) then begin
- write_ln (stderr, 'odvitype: Need exactly one file argument.');
- usage ('odvitype');
+ write_ln (stderr, my_name, ': Need exactly one file argument.');
+ usage (my_name);
end;
dvi_name := extend_filename (cmdline (optind), 'dvi');
end;
@@ -710,7 +717,7 @@ while optarg[m] do begin
end else if optarg[m] = "." then begin
incr (k);
if k >= 10 then begin
- write_ln (stderr, 'odvitype: More than ten count registers specified.');
+ write_ln (stderr, my_name, ': More than ten count registers specified.');
uexit (1);
end;
incr (m);
@@ -718,7 +725,7 @@ while optarg[m] do begin
end else begin
start_count[k] := strtol (optarg + m, address_of (end_num), 10);
if end_num = optarg + m then begin
- write_ln (stderr, 'odvitype: -page-start values must be numeric or *.');
+ write_ln (stderr, my_name, ': -page-start values must be numeric or *.');
uexit (1);
end;
start_there[k] := true;
diff --git a/Build/source/texk/web2c/omegaware/ofm2opl.ch b/Build/source/texk/web2c/omegaware/ofm2opl.ch
index cde0495cd88..fc71e983c9b 100644
--- a/Build/source/texk/web2c/omegaware/ofm2opl.ch
+++ b/Build/source/texk/web2c/omegaware/ofm2opl.ch
@@ -30,6 +30,13 @@
%\def\title{TF\lowercase{to}PL changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is OFM2OPL, Version 1.12'
+@y
+@d my_name=='ofm2opl'
+@d banner=='This is OFM2OPL, Version 1.12'
+@z
+
% [2] Fix files in program statement. We need to tell web2c about one
% special variable. Perhaps it would be better to allow @define's
% anywhere in a source file, but that seemed just as painful as this.
@@ -49,7 +56,7 @@ procedure initialize; {this procedure gets things started properly}
@<Define |parse_arguments|@>
procedure initialize; {this procedure gets things started properly}
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
kpse_init_prog ('OFM2OPL', 0, nil, nil);
{We |xrealloc| when we know how big the file is. The 1000 comes
from the negative lower bound.}
@@ -341,7 +348,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('ofm2opl');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (OFM2OPL_HELP, nil);
@@ -363,8 +370,8 @@ begin
{Now |optind| is the index of first non-option on the command line.}
if (optind + 1 <> argc) and (optind + 2 <> argc) then begin
- write_ln (stderr, 'ofm2opl: Need one or two file arguments.');
- usage ('ofm2opl');
+ write_ln (stderr, my_name, ': Need one or two file arguments.');
+ usage (my_name);
end;
tfm_name := cmdline (optind);
diff --git a/Build/source/texk/web2c/omegaware/opl2ofm.ch b/Build/source/texk/web2c/omegaware/opl2ofm.ch
index 72ebcf928e3..d44734533a5 100644
--- a/Build/source/texk/web2c/omegaware/opl2ofm.ch
+++ b/Build/source/texk/web2c/omegaware/opl2ofm.ch
@@ -26,6 +26,13 @@
%\def\title{OPL2OFM changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is OPL2OFM, Version 1.12'
+@y
+@d my_name=='opl2ofm'
+@d banner=='This is OPL2OFM, Version 1.12'
+@z
+
@x [still 2] No banner unless verbose.
procedure initialize; {this procedure gets things started properly}
var @<Local variables for initialization@>@/
@@ -35,7 +42,7 @@ procedure initialize; {this procedure gets things started properly}
procedure initialize; {this procedure gets things started properly}
var @<Local variables for initialization@>@/
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
parse_arguments;
@z
@@ -299,7 +306,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('opl2ofm');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (OPL2OFM_HELP, nil);
@@ -314,8 +321,8 @@ begin
{Now |optind| is the index of first non-option on the command line.
We must have one or two remaining arguments.}
if (optind + 1 <> argc) and (optind + 2 <> argc) then begin
- write_ln (stderr, 'opl2ofm: Need one or two file arguments.');
- usage ('opl2ofm');
+ write_ln (stderr, my_name, ': Need one or two file arguments.');
+ usage (my_name);
end;
pl_name := extend_filename (cmdline (optind), 'opl');
diff --git a/Build/source/texk/web2c/omegaware/otangle.ch b/Build/source/texk/web2c/omegaware/otangle.ch
index 6dc54623d97..0baf8628e73 100644
--- a/Build/source/texk/web2c/omegaware/otangle.ch
+++ b/Build/source/texk/web2c/omegaware/otangle.ch
@@ -52,6 +52,13 @@
\def\title{TANGLE changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is OTANGLE, Version 4.4'
+@y
+@d my_name=='otangle'
+@d banner=='This is OTANGLE, Version 4.4'
+@z
+
@x [2] Eliminate the |end_of_TANGLE| label.
@d end_of_TANGLE = 9999 {go here to wrap it up}
@@ -71,7 +78,7 @@ procedure initialize;
procedure initialize;
var @<Local variables for initialization@>@/
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
parse_arguments;
@<Set initial values@>@/
@z
@@ -425,7 +432,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('otangle');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (OTANGLE_HELP, nil);
@@ -439,8 +446,8 @@ begin
{Now |optind| is the index of first non-option on the command line.}
if (optind + 1 <> argc) and (optind + 2 <> argc) then begin
- write_ln (stderr, 'otangle: Need one or two file arguments.');
- usage ('otangle');
+ write_ln (stderr, my_name, ': Need one or two file arguments.');
+ usage (my_name);
end;
{Supply |".web"| and |".ch"| extensions if necessary.}
diff --git a/Build/source/texk/web2c/omegaware/ovf2ovp.ch b/Build/source/texk/web2c/omegaware/ovf2ovp.ch
index 70523958741..2251354ce1b 100644
--- a/Build/source/texk/web2c/omegaware/ovf2ovp.ch
+++ b/Build/source/texk/web2c/omegaware/ovf2ovp.ch
@@ -17,6 +17,13 @@
%\def\title{VF$\,$\lowercase{to}$\,$VP changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is OVF2OVP, Version 1.12' {printed when the program starts}
+@y
+@d my_name=='ovf2ovp'
+@d banner=='This is OVF2OVP, Version 1.12' {printed when the program starts}
+@z
+
% [2] We need to tell web2c about one special variable.
% Perhaps it would be better to allow @define's
% anywhere in a source file, but that seemed just as painful as this.
@@ -38,7 +45,7 @@ procedure initialize; {this procedure gets things started properly}
procedure initialize; {this procedure gets things started properly}
var @!k:integer; {all-purpose index for initialization}
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
kpse_init_prog ('VFTOVP', 0, nil, nil);
{We |xrealloc| when we know how big the file is. The 1000 comes
from the negative lower bound.}
@@ -521,7 +528,7 @@ begin
if getopt_return_val = -1 then begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('ovf2ovp');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (OVF2OVP_HELP, nil);
@@ -545,8 +552,8 @@ begin
We must have one two three remaining arguments.}
if (optind + 1 <> argc) and (optind + 2 <> argc)
and (optind + 3 <> argc) then begin
- write_ln (stderr, 'ovf2ovp: Need one to three file arguments.');
- usage ('ovf2ovp');
+ write_ln (stderr, my_name, ': Need one to three file arguments.');
+ usage (my_name);
end;
vf_name := cmdline (optind);
diff --git a/Build/source/texk/web2c/omegaware/ovp2ovf.ch b/Build/source/texk/web2c/omegaware/ovp2ovf.ch
index f390a4780ec..759ae090d58 100644
--- a/Build/source/texk/web2c/omegaware/ovp2ovf.ch
+++ b/Build/source/texk/web2c/omegaware/ovp2ovf.ch
@@ -15,6 +15,13 @@
%\def\title{OVP2OVF changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is OVP2OVF, Version 1.12'
+@y
+@d my_name=='ovp2ovf'
+@d banner=='This is OVP2OVF, Version 1.12'
+@z
+
@x [2] Print the banner later.
procedure initialize; {this procedure gets things started properly}
var @<Local variables for initialization@>@/
@@ -24,7 +31,7 @@ procedure initialize; {this procedure gets things started properly}
procedure initialize; {this procedure gets things started properly}
var @<Local variables for initialization@>@/
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
parse_arguments;
@z
@@ -265,7 +272,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('ovp2ovf'); {|getopt| has already given an error message.}
+ usage (my_name); {|getopt| has already given an error message.}
end else if argument_is ('help') then begin
usage_help (OVP2OVF_HELP, nil);
@@ -281,8 +288,8 @@ begin
We must have one to three remaining arguments.}
if (optind + 1 <> argc) and (optind + 2 <> argc)
and (optind + 3 <> argc) then begin
- write_ln (stderr, 'ovp2ovf: Need one to three file arguments.');
- usage ('ovp2ovf');
+ write_ln (stderr, my_name, ': Need one to three file arguments.');
+ usage (my_name);
end;
vpl_name := extend_filename (cmdline (optind), 'ovp');
diff --git a/Build/source/texk/web2c/otps/win32/ChangeLog b/Build/source/texk/web2c/otps/win32/ChangeLog
index c6f4182b478..5cb6af36010 100644
--- a/Build/source/texk/web2c/otps/win32/ChangeLog
+++ b/Build/source/texk/web2c/otps/win32/ChangeLog
@@ -1,3 +1,7 @@
+2012-07-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mkocp.c: Pass program name string to kpse_set_program_name.
+
2011-05-24 Peter Breitenlohner <peb@mppmu.mpg.de>
* mkocp.c, mkofm.c: New files from Akira's W32TeX.
diff --git a/Build/source/texk/web2c/otps/win32/mkocp.c b/Build/source/texk/web2c/otps/win32/mkocp.c
index b8a8fde8c56..75bea56d1a8 100644
--- a/Build/source/texk/web2c/otps/win32/mkocp.c
+++ b/Build/source/texk/web2c/otps/win32/mkocp.c
@@ -20,7 +20,7 @@ int main(int ac, char **av)
char fullname[256];
char *p;
- kpse_set_program_name(av[0], NULL);
+ kpse_set_program_name(av[0], "mkocp");
if(ac != 2) {
fprintf(stderr,"%s : Usage %s ocpname\n", av[0], av[0]);
diff --git a/Build/source/texk/web2c/patgen.ch b/Build/source/texk/web2c/patgen.ch
index f86c2218e41..0dd93d9585a 100644
--- a/Build/source/texk/web2c/patgen.ch
+++ b/Build/source/texk/web2c/patgen.ch
@@ -13,6 +13,13 @@
\def\title{PATGEN changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is PATGEN, Version 2.4' {printed when the program starts}
+@y
+@d my_name=='patgen'
+@d banner=='This is PATGEN, Version 2.4' {printed when the program starts}
+@z
+
@x Terminal I/O, Need standard input.
@d get_input(#)==read(input,#)
@d get_input_ln(#)==
@@ -45,7 +52,7 @@ procedure initialize; {this procedure gets things started properly}
procedure initialize; {this procedure gets things started properly}
var @<Local variables for initialization@>@/
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
parse_arguments;
print (banner);
print_ln (version_string);
@@ -220,7 +227,7 @@ begin
do_nothing;
end else if getopt_return_val = '?' then begin
- usage ('patgen');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (PATGEN_HELP, nil);
@@ -235,8 +242,8 @@ begin
{Now |optind| is the index of first non-option on the command line.}
if (optind + 4 <> argc) then begin
- write_ln (stderr, 'patgen: Need exactly four arguments.');
- usage ('patgen');
+ write_ln (stderr, my_name, ': Need exactly four arguments.');
+ usage (my_name);
end;
end;
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog
index f0f1a879176..21a5aee2347 100644
--- a/Build/source/texk/web2c/pdftexdir/ChangeLog
+++ b/Build/source/texk/web2c/pdftexdir/ChangeLog
@@ -1,3 +1,7 @@
+2012-07-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * ttf2afm.c: Pass program name string to kpse_set_program_name.
+
2012-07-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* pdftexextra.c: Must #define DLLPROC before reading pdftexd.h.
diff --git a/Build/source/texk/web2c/pdftexdir/ttf2afm.c b/Build/source/texk/web2c/pdftexdir/ttf2afm.c
index 0529b947771..93fa933b730 100644
--- a/Build/source/texk/web2c/pdftexdir/ttf2afm.c
+++ b/Build/source/texk/web2c/pdftexdir/ttf2afm.c
@@ -1021,7 +1021,7 @@ int main(int argc, char **argv)
char date[128], *s;
time_t t = time(&t);
int c;
- kpse_set_program_name(argv[0], NULL);
+ kpse_set_program_name(argv[0], "ttf2afm");
kpse_init_prog("ttf2afm", 0, 0, 0);
while ((c = getopt(argc, argv, "iucve:o:m:")) != -1)
switch (c) {
diff --git a/Build/source/texk/web2c/pktogf.ch b/Build/source/texk/web2c/pktogf.ch
index 3639d1ba80c..a8115b12e21 100644
--- a/Build/source/texk/web2c/pktogf.ch
+++ b/Build/source/texk/web2c/pktogf.ch
@@ -20,6 +20,13 @@
\def\title{PK$\,$\lowercase{to}$\,$GF changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is PKtoGF, Version 1.1'
+@y
+@d my_name=='pktogf'
+@d banner=='This is PKtoGF, Version 1.1'
+@z
+
@x [4] No global labels.
@ Both the input and output come from binary files. On line interaction
is handled through \PASCAL's standard |input| and |output| files.
@@ -52,7 +59,7 @@ procedure initialize; {this procedure gets things started properly}
procedure initialize; {this procedure gets things started properly}
var i:integer; {loop index for initializations}
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
kpse_init_prog ('PKTOGF', 0, nil, nil);
parse_arguments;
print_ln(banner);@/
@@ -454,7 +461,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('pktogf');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (PKTOGF_HELP, nil);
@@ -468,8 +475,8 @@ begin
{Now |optind| is the index of first non-option on the command line.
We must have one or two remaining arguments.}
if (optind + 1 <> argc) and (optind + 2 <> argc) then begin
- write_ln (stderr, 'pktogf: Need one or two file arguments.');
- usage ('pktogf');
+ write_ln (stderr, my_name, ': Need one or two file arguments.');
+ usage (my_name);
end;
end;
diff --git a/Build/source/texk/web2c/pktype.ch b/Build/source/texk/web2c/pktype.ch
index 037538c9b79..7e18913318f 100644
--- a/Build/source/texk/web2c/pktype.ch
+++ b/Build/source/texk/web2c/pktype.ch
@@ -16,6 +16,13 @@
\def\title{PK$\,$\lowercase{type} changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is PKtype, Version 2.3' {printed when the program starts}
+@y
+@d my_name=='pktype'
+@d banner=='This is PKtype, Version 2.3' {printed when the program starts}
+@z
+
@x [4] Redirect output to stdout.
@d t_print_ln(#)==write_ln(typ_file,#)
@y
@@ -38,7 +45,7 @@ var @<Globals in the outer block@>@/
procedure initialize; {this procedure gets things started properly}
var i:integer; {loop index for initializations}
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
kpse_init_prog ('PKTYPE', 0, nil, nil);
parse_arguments;
print(banner); print_ln(version_string);@/
@@ -324,7 +331,7 @@ begin
do_nothing;
end else if getopt_return_val = '?' then begin
- usage ('pktype');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (PKTYPE_HELP, nil);
@@ -337,8 +344,8 @@ begin
{Now |optind| is the index of first non-option on the command line.}
if (optind + 1 <> argc) then begin
- write_ln (stderr, 'pktype: Need exactly one file argument.');
- usage ('pktype');
+ write_ln (stderr, my_name, ': Need exactly one file argument.');
+ usage (my_name);
end;
end;
diff --git a/Build/source/texk/web2c/pltotf.ch b/Build/source/texk/web2c/pltotf.ch
index 100c74248b1..921cdaeec79 100644
--- a/Build/source/texk/web2c/pltotf.ch
+++ b/Build/source/texk/web2c/pltotf.ch
@@ -19,6 +19,13 @@
\def\title{PL$\,$\lowercase{to}$\,$TF changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is PLtoTF, Version 3.5' {printed when the program starts}
+@y
+@d my_name=='pltotf'
+@d banner=='This is PLtoTF, Version 3.5' {printed when the program starts}
+@z
+
@x [still 2] No banner unless verbose.
procedure initialize; {this procedure gets things started properly}
var @<Local variables for initialization@>@/
@@ -28,7 +35,7 @@ procedure initialize; {this procedure gets things started properly}
procedure initialize; {this procedure gets things started properly}
var @<Local variables for initialization@>@/
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
parse_arguments;
@z
@@ -255,7 +262,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('pltotf');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (PLTOTF_HELP, nil);
@@ -269,8 +276,8 @@ begin
{Now |optind| is the index of first non-option on the command line.
We must have one or two remaining arguments.}
if (optind + 1 <> argc) and (optind + 2 <> argc) then begin
- write_ln (stderr, 'pltotf: Need one or two file arguments.');
- usage ('pltotf');
+ write_ln (stderr, my_name, ': Need one or two file arguments.');
+ usage (my_name);
end;
pl_name := extend_filename (cmdline (optind), 'pl');
diff --git a/Build/source/texk/web2c/pooltype.ch b/Build/source/texk/web2c/pooltype.ch
index 0af0b00774e..cbff918acf7 100644
--- a/Build/source/texk/web2c/pooltype.ch
+++ b/Build/source/texk/web2c/pooltype.ch
@@ -12,6 +12,14 @@
\def\title{POOL\lowercase{type} changes for C}
@z
+@x [1] Define my_name
+copied from \TeX82.
+@y
+copied from \TeX82.
+
+@d my_name=='pooltype'
+@z
+
@x [2] main program changes: no global labels, read command line.
label 9999; {this labels the end of the program}
@y
@@ -25,7 +33,7 @@ procedure initialize; {this procedure gets things started properly}
procedure initialize; {this procedure gets things started properly}
var @<Local variables for initialization@>@;
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
parse_arguments;
@<Set initial values of key variables@>
@z
@@ -115,7 +123,7 @@ begin
do_nothing;
end else if getopt_return_val = '?' then begin
- usage ('pooltype');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (POOLTYPE_HELP, nil);
@@ -130,8 +138,8 @@ begin
{Now |optind| is the index of first non-option on the command line.}
if (optind + 1 <> argc) then begin
- write_ln (stderr, 'pooltype: Need exactly one file argument.');
- usage ('pooltype');
+ write_ln (stderr, my_name, ': Need exactly one file argument.');
+ usage (my_name);
end;
pool_name := extend_filename (cmdline (optind), 'pool');
diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog
index dae9ffdb618..4eda595b09e 100644
--- a/Build/source/texk/web2c/ptexdir/ChangeLog
+++ b/Build/source/texk/web2c/ptexdir/ChangeLog
@@ -1,3 +1,8 @@
+2012-07-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * pbibtex.ch, pdvitype.ch, ppltotf.ch, ptftopl.ch:
+ Adapt to the use my_name.
+
2012-07-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* ptexextra.c: Must #define DLLPROC before reading ptexd.h.
diff --git a/Build/source/texk/web2c/ptexdir/pbibtex.ch b/Build/source/texk/web2c/ptexdir/pbibtex.ch
index 5a6adc4112a..1752e8059d7 100644
--- a/Build/source/texk/web2c/ptexdir/pbibtex.ch
+++ b/Build/source/texk/web2c/ptexdir/pbibtex.ch
@@ -42,8 +42,10 @@
% [1] banner
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@x
+@d my_name=='bibtex'
@d banner=='This is BibTeX, Version 0.99d' {printed when the program starts}
@y
+@d my_name=='pbibtex'
@d banner=='This is pBibTeX, Version 0.99d-j0.33'
{printed when the program starts}
@z
@@ -520,12 +522,6 @@ const n_options = 6; {Pascal won't count array lengths for us.}
@z
@x
- usage ('bibtex');
-@y
- usage ('pbibtex');
-@z
-
-@x
usage_help (BIBTEX_HELP, nil);
@y
usage_help (PBIBTEX_HELP, nil);
@@ -542,14 +538,6 @@ const n_options = 6; {Pascal won't count array lengths for us.}
@z
@x
- write_ln (stderr, 'bibtex: Need exactly one file argument.');
- usage ('bibtex');
-@y
- write_ln (stderr, 'pbibtex: Need exactly one file argument.');
- usage ('pbibtex');
-@z
-
-@x
long_options[current_option].name := 'version';
long_options[current_option].has_arg := 0;
long_options[current_option].flag := 0;
diff --git a/Build/source/texk/web2c/ptexdir/pdvitype.ch b/Build/source/texk/web2c/ptexdir/pdvitype.ch
index 53f0a0ebc6d..d9df210e39a 100644
--- a/Build/source/texk/web2c/ptexdir/pdvitype.ch
+++ b/Build/source/texk/web2c/ptexdir/pdvitype.ch
@@ -3,8 +3,10 @@
% 09/27/95 (KA) Supporting ASCII pTeX
%
@x
+@d my_name=='dvitype'
@d banner=='This is DVItype, Version 3.6' {printed when the program starts}
@y
+@d my_name=='pdvitype'
@d banner=='This is pDVItype, Version 3.6-p0.4'
{printed when the program starts}
@z
@@ -489,12 +491,6 @@ const n_options = 10; {Pascal won't count array lengths for us.}
@z
@x
- usage ('dvitype');
-@y
- usage ('pdvitype');
-@z
-
-@x
usage_help (DVITYPE_HELP, nil);
@y
usage_help (PDVITYPE_HELP, nil);
@@ -513,14 +509,6 @@ const n_options = 10; {Pascal won't count array lengths for us.}
@z
@x
- write_ln (stderr, 'dvitype: Need exactly one file argument.');
- usage ('dvitype');
-@y
- write_ln (stderr, 'pdvitype: Need exactly one file argument.');
- usage ('pdvitype');
-@z
-
-@x
@ An element with all zeros always ends the list.
@y
@ Shift-JIS terminal (the flag is ignored except for WIN32).
diff --git a/Build/source/texk/web2c/ptexdir/ppltotf.ch b/Build/source/texk/web2c/ptexdir/ppltotf.ch
index d7d68421a85..a071bf0f82c 100644
--- a/Build/source/texk/web2c/ptexdir/ppltotf.ch
+++ b/Build/source/texk/web2c/ptexdir/ppltotf.ch
@@ -11,8 +11,10 @@
@z
@x [2] l.69 - pTeX:
+@d my_name=='pltotf'
@d banner=='This is PLtoTF, Version 3.5' {printed when the program starts}
@y
+@d my_name=='ppltotf'
@d banner=='This is pPLtoTF, Version 3.5-p1.8'
{printed when the program starts}
@z
@@ -355,12 +357,6 @@ const n_options = 5; {Pascal won't count array lengths for us.}
@z
@x
- usage ('pltotf');
-@y
- usage ('ppltotf');
-@z
-
-@x
usage_help (PLTOTF_HELP, nil);
@y
usage_help (PPLTOTF_HELP, nil);
@@ -377,14 +373,6 @@ const n_options = 5; {Pascal won't count array lengths for us.}
@z
@x
- write_ln (stderr, 'pltotf: Need one or two file arguments.');
- usage ('pltotf');
-@y
- write_ln (stderr, 'ppltotf: Need one or two file arguments.');
- usage ('ppltotf');
-@z
-
-@x
@ An element with all zeros always ends the list.
@y
@ Shift-JIS terminal (the flag is ignored except for WIN32).
diff --git a/Build/source/texk/web2c/ptexdir/ptftopl.ch b/Build/source/texk/web2c/ptexdir/ptftopl.ch
index 691b87506de..ad7d889b025 100644
--- a/Build/source/texk/web2c/ptexdir/ptftopl.ch
+++ b/Build/source/texk/web2c/ptexdir/ptftopl.ch
@@ -10,8 +10,10 @@
@z
@x [2] l.64 - pTeX:
+@d my_name=='tftopl'
@d banner=='This is TFtoPL, Version 3.2' {printed when the program starts}
@y
+@d my_name=='ptftopl'
@d banner=='This is pTFtoPL, Version 3.2-p1.7'
{printed when the program starts}
@z
@@ -352,12 +354,6 @@ const n_options = 6; {Pascal won't count array lengths for us.}
@z
@x
- usage ('tftopl');
-@y
- usage ('ptftopl');
-@z
-
-@x
usage_help (TFTOPL_HELP, nil);
@y
usage_help (PTFTOPL_HELP, nil);
@@ -374,14 +370,6 @@ const n_options = 6; {Pascal won't count array lengths for us.}
@z
@x
- print_ln ('tftopl: Need one or two file arguments.');
- usage ('tftopl');
-@y
- print_ln ('ptftopl: Need one or two file arguments.');
- usage ('ptftopl');
-@z
-
-@x
@ An element with all zeros always ends the list.
@y
@ Shift-JIS terminal (the flag is ignored except for WIN32).
diff --git a/Build/source/texk/web2c/tangle.ch b/Build/source/texk/web2c/tangle.ch
index 3b8c24b819e..e3871df2bfe 100644
--- a/Build/source/texk/web2c/tangle.ch
+++ b/Build/source/texk/web2c/tangle.ch
@@ -44,6 +44,13 @@
\def\title{TANGLE changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is TANGLE, Version 4.5'
+@y
+@d my_name=='tangle'
+@d banner=='This is TANGLE, Version 4.5'
+@z
+
@x [2] Eliminate the |end_of_TANGLE| label.
@d end_of_TANGLE = 9999 {go here to wrap it up}
@@ -63,7 +70,7 @@ procedure initialize;
procedure initialize;
var @<Local variables for initialization@>@/
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
parse_arguments;
@<Set initial values@>@/
@z
@@ -674,7 +681,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('tangle');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (TANGLE_HELP, nil);
@@ -713,8 +720,8 @@ begin
{Now |optind| is the index of first non-option on the command line.}
if (optind + 1 <> argc) and (optind + 2 <> argc) then begin
- write_ln (stderr, 'tangle: Need one or two file arguments.');
- usage ('tangle');
+ write_ln (stderr, my_name, ': Need one or two file arguments.');
+ usage (my_name);
end;
{Supply |".web"| and |".ch"| extensions if necessary.}
diff --git a/Build/source/texk/web2c/tangleboot.pin b/Build/source/texk/web2c/tangleboot.pin
index e0ca48e45eb..5d9331c4610 100644
--- a/Build/source/texk/web2c/tangleboot.pin
+++ b/Build/source/texk/web2c/tangleboot.pin
@@ -118,14 +118,14 @@ strictmode:=false;
end else if(strcmp(longoptions[optionindex].name,'length')=0)then begin
len:=atoi(optarg);if(len<=0)or(len>maxidlength)then len:=maxidlength;
unambiglength:=len;end;until getoptreturnval=-1;
-if(optind+1<>argc)and(optind+2<>argc)then begin writeln(stderr,
-'tangle: Need one or two file arguments.');usage('tangle');end;
+if(optind+1<>argc)and(optind+2<>argc)then begin writeln(stderr,'tangle',
+': Need one or two file arguments.');usage('tangle');end;
webname:=extendfilename(cmdline(optind),'web');
if optind+2=argc then begin chgname:=extendfilename(cmdline(optind+1),
'ch');end;pascalname:=basenamechangesuffix(webname,'.web','.p');end;
{:188}procedure initialize;var{16:}i:0..255;{:16}{41:}wi:0..2;
{:41}{45:}zi:0..4;{:45}{51:}h:0..hashsize;
-{:51}begin kpsesetprogramname(argv[0],nil);parsearguments;
+{:51}begin kpsesetprogramname(argv[0],'tangle');parsearguments;
{10:}history:=0;{:10}{14:}xchr[32]:=' ';xchr[33]:='!';xchr[34]:='"';
xchr[35]:='#';xchr[36]:='$';xchr[37]:='%';xchr[38]:='&';xchr[39]:='''';
xchr[40]:='(';xchr[41]:=')';xchr[42]:='*';xchr[43]:='+';xchr[44]:=',';
diff --git a/Build/source/texk/web2c/tftopl.ch b/Build/source/texk/web2c/tftopl.ch
index 33ce0dc564a..8c1644962e9 100644
--- a/Build/source/texk/web2c/tftopl.ch
+++ b/Build/source/texk/web2c/tftopl.ch
@@ -23,6 +23,13 @@
\def\title{TF\lowercase{to}PL changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is TFtoPL, Version 3.2' {printed when the program starts}
+@y
+@d my_name=='tftopl'
+@d banner=='This is TFtoPL, Version 3.2' {printed when the program starts}
+@z
+
@x [2] Print all terminal output on stderr, so the pl can be sent to stdout.
@d print(#)==write(#)
@d print_ln(#)==write_ln(#)
@@ -50,7 +57,7 @@ procedure initialize; {this procedure gets things started properly}
@<Define |parse_arguments|@>
procedure initialize; {this procedure gets things started properly}
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
kpse_init_prog ('TFTOPL', 0, nil, nil);
{We |xrealloc| when we know how big the file is. The 1000 comes
from the negative lower bound.}
@@ -332,7 +339,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('tftopl');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (TFTOPL_HELP, nil);
@@ -353,8 +360,8 @@ begin
{Now |optind| is the index of first non-option on the command line.}
if (optind + 1 <> argc) and (optind + 2 <> argc) then begin
- print_ln ('tftopl: Need one or two file arguments.');
- usage ('tftopl');
+ print_ln (my_name, ': Need one or two file arguments.');
+ usage (my_name);
end;
tfm_name := cmdline (optind);
diff --git a/Build/source/texk/web2c/uptexdir/ChangeLog b/Build/source/texk/web2c/uptexdir/ChangeLog
index b3a0ca07db0..cd0fe9635e3 100644
--- a/Build/source/texk/web2c/uptexdir/ChangeLog
+++ b/Build/source/texk/web2c/uptexdir/ChangeLog
@@ -1,3 +1,8 @@
+2012-07-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * upbibtex.ch, updvitype.ch, uppltotf.ch, uptftopl.ch:
+ Adapt to the use my_name.
+
2012-07-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* uptexextra.c: Must #define DLLPROC before reading uptexd.h.
diff --git a/Build/source/texk/web2c/uptexdir/upbibtex.ch b/Build/source/texk/web2c/uptexdir/upbibtex.ch
index 7efd6449da0..737c8e74005 100644
--- a/Build/source/texk/web2c/uptexdir/upbibtex.ch
+++ b/Build/source/texk/web2c/uptexdir/upbibtex.ch
@@ -1,6 +1,8 @@
@x
+@d my_name=='pbibtex'
@d banner=='This is pBibTeX, Version 0.99d-j0.33'
@y
+@d my_name=='upbibtex'
@d banner=='This is upBibTeX, Version 0.99d-j0.33-u1.10'
@z
@@ -285,12 +287,6 @@ const n_options = 7; {Pascal won't count array lengths for us.}
@z
@x
- usage ('pbibtex');
-@y
- usage ('upbibtex');
-@z
-
-@x
usage_help (PBIBTEX_HELP, nil);
@y
usage_help (UPBIBTEX_HELP, nil);
@@ -308,14 +304,6 @@ const n_options = 7; {Pascal won't count array lengths for us.}
@z
@x
- write_ln (stderr, 'pbibtex: Need exactly one file argument.');
- usage ('pbibtex');
-@y
- write_ln (stderr, 'upbibtex: Need exactly one file argument.');
- usage ('upbibtex');
-@z
-
-@x
@ An element with all zeros always ends the list.
@y
@ Kanji-internal option.
diff --git a/Build/source/texk/web2c/uptexdir/updvitype.ch b/Build/source/texk/web2c/uptexdir/updvitype.ch
index e4d19f9a3cd..b5cb829940d 100644
--- a/Build/source/texk/web2c/uptexdir/updvitype.ch
+++ b/Build/source/texk/web2c/uptexdir/updvitype.ch
@@ -1,6 +1,8 @@
@x
+@d my_name=='pdvitype'
@d banner=='This is pDVItype, Version 3.6-p0.4'
@y
+@d my_name=='updvitype'
@d banner=='This is upDVItype, Version 3.6-p0.4-u1.10'
@z
@@ -30,22 +32,8 @@
@z
@x
- usage ('pdvitype');
-@y
- usage ('updvitype');
-@z
-
-@x
usage_help (PDVITYPE_HELP, nil);
@y
usage_help (UPDVITYPE_HELP, nil);
@z
-@x
- write_ln (stderr, 'pdvitype: Need exactly one file argument.');
- usage ('pdvitype');
-@y
- write_ln (stderr, 'updvitype: Need exactly one file argument.');
- usage ('updvitype');
-@z
-
diff --git a/Build/source/texk/web2c/uptexdir/uppltotf.ch b/Build/source/texk/web2c/uptexdir/uppltotf.ch
index c5cacc9d0d9..77fd8e3d118 100644
--- a/Build/source/texk/web2c/uptexdir/uppltotf.ch
+++ b/Build/source/texk/web2c/uptexdir/uppltotf.ch
@@ -1,30 +1,18 @@
@x
+@d my_name=='ppltotf'
@d banner=='This is pPLtoTF, Version 3.5-p1.8'
@y
+@d my_name=='uppltotf'
@d banner=='This is upPLtoTF, Version 3.5-p1.8-u1.10'
@z
@x
- usage ('ppltotf');
-@y
- usage ('uppltotf');
-@z
-
-@x
usage_help (PPLTOTF_HELP, nil);
@y
usage_help (UPPLTOTF_HELP, nil);
@z
@x
- write_ln (stderr, 'ppltotf: Need one or two file arguments.');
- usage ('ppltotf');
-@y
- write_ln (stderr, 'uppltotf: Need one or two file arguments.');
- usage ('uppltotf');
-@z
-
-@x
max_kanji=7237; { maximam number of 2byte characters }
@y
max_kanji=65535; { maximam number of 2byte characters }
diff --git a/Build/source/texk/web2c/uptexdir/uptftopl.ch b/Build/source/texk/web2c/uptexdir/uptftopl.ch
index 39f691dc628..5a57f416d8a 100644
--- a/Build/source/texk/web2c/uptexdir/uptftopl.ch
+++ b/Build/source/texk/web2c/uptexdir/uptftopl.ch
@@ -1,30 +1,18 @@
@x
+@d my_name=='ptftopl'
@d banner=='This is pTFtoPL, Version 3.2-p1.7'
@y
+@d my_name=='uptftopl'
@d banner=='This is upTFtoPL, Version 3.2-p1.7-u1.10'
@z
@x
- usage ('ptftopl');
-@y
- usage ('uptftopl');
-@z
-
-@x
usage_help (PTFTOPL_HELP, nil);
@y
usage_help (UPTFTOPL_HELP, nil);
@z
@x
- print_ln ('ptftopl: Need one or two file arguments.');
- usage ('ptftopl');
-@y
- print_ln ('uptftopl: Need one or two file arguments.');
- usage ('uptftopl');
-@z
-
-@x
@d max_kanji=7237 {number of the kanji characters - 1}
@y
@d max_kanji=65535 {number of the kanji characters - 1}
diff --git a/Build/source/texk/web2c/vftovp.ch b/Build/source/texk/web2c/vftovp.ch
index 1dc20d184e4..273b6337995 100644
--- a/Build/source/texk/web2c/vftovp.ch
+++ b/Build/source/texk/web2c/vftovp.ch
@@ -10,6 +10,13 @@
\def\title{VF$\,$\lowercase{to}$\,$VP changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is VFtoVP, Version 1.3' {printed when the program starts}
+@y
+@d my_name=='vftovp'
+@d banner=='This is VFtoVP, Version 1.3' {printed when the program starts}
+@z
+
@x [2] All terminal output goes to stderr, so we can dump the vpl on stdout.
@d print(#)==write(#)
@d print_ln(#)==write_ln(#)
@@ -41,7 +48,7 @@ procedure initialize; {this procedure gets things started properly}
procedure initialize; {this procedure gets things started properly}
var @!k:integer; {all-purpose index for initialization}
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
kpse_init_prog ('VFTOVP', 0, nil, nil);
{We |xrealloc| when we know how big the file is. The 1000 comes
from the negative lower bound.}
@@ -587,7 +594,7 @@ begin
if getopt_return_val = -1 then begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('vftovp');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (VFTOVP_HELP, nil);
@@ -610,8 +617,8 @@ begin
We must have one two three remaining arguments.}
if (optind + 1 <> argc) and (optind + 2 <> argc)
and (optind + 3 <> argc) then begin
- print_ln ('vftovp: Need one to three file arguments.');
- usage ('vftovp');
+ print_ln (my_name, ': Need one to three file arguments.');
+ usage (my_name);
end;
vf_name := cmdline (optind);
diff --git a/Build/source/texk/web2c/vptovf.ch b/Build/source/texk/web2c/vptovf.ch
index 8c62af94142..d3a6ef13ec0 100644
--- a/Build/source/texk/web2c/vptovf.ch
+++ b/Build/source/texk/web2c/vptovf.ch
@@ -8,6 +8,13 @@
\def\title{VP$\,$\lowercase{to}$\,$VF changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is VPtoVF, Version 1.5' {printed when the program starts}
+@y
+@d my_name=='vptovf'
+@d banner=='This is VPtoVF, Version 1.5' {printed when the program starts}
+@z
+
@x [2] Print the banner later.
procedure initialize; {this procedure gets things started properly}
var @<Local variables for initialization@>@/
@@ -17,7 +24,7 @@ procedure initialize; {this procedure gets things started properly}
procedure initialize; {this procedure gets things started properly}
var @<Local variables for initialization@>@/
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
parse_arguments;
@z
@@ -245,7 +252,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('vptovf'); {|getopt| has already given an error message.}
+ usage (my_name); {|getopt| has already given an error message.}
end else if argument_is ('help') then begin
usage_help (VPTOVF_HELP, nil);
@@ -260,8 +267,8 @@ begin
We must have one to three remaining arguments.}
if (optind + 1 <> argc) and (optind + 2 <> argc)
and (optind + 3 <> argc) then begin
- write_ln (stderr, 'vptovf: Need one to three file arguments.');
- usage ('vptovf');
+ write_ln (stderr, my_name ,': Need one to three file arguments.');
+ usage (my_name);
end;
vpl_name := extend_filename (cmdline (optind), 'vpl');
diff --git a/Build/source/texk/web2c/weave.ch b/Build/source/texk/web2c/weave.ch
index 3b2fe2beeed..c1530e6cfb2 100644
--- a/Build/source/texk/web2c/weave.ch
+++ b/Build/source/texk/web2c/weave.ch
@@ -55,6 +55,13 @@
\def\title{WEAVE changes for C}
@z
+@x [1] Define my_name
+@d banner=='This is WEAVE, Version 4.4'
+@y
+@d my_name=='weave'
+@d banner=='This is WEAVE, Version 4.4'
+@z
+
@x [2] No global labels, define and call parse_arguments.
label end_of_WEAVE; {go here to finish}
const @<Constants in the outer block@>@/
@@ -73,7 +80,7 @@ var @<Globals in the outer block@>@/
procedure initialize;
var @<Local variables for initialization@>@/
begin
- kpse_set_program_name (argv[0], nil);
+ kpse_set_program_name (argv[0], my_name);
parse_arguments;
@<Set initial values@>@/
@z
@@ -360,7 +367,7 @@ begin
{End of arguments; we exit the loop below.} ;
end else if getopt_return_val = "?" then begin
- usage ('weave');
+ usage (my_name);
end else if argument_is ('help') then begin
usage_help (WEAVE_HELP, nil);
@@ -373,8 +380,8 @@ begin
{Now |optind| is the index of first non-option on the command line.}
if (optind + 1 <> argc) and (optind + 2 <> argc) then begin
- write_ln (stderr, 'weave: Need one or two file arguments.');
- usage ('weave');
+ write_ln (stderr, my_name, ': Need one or two file arguments.');
+ usage (my_name);
end;
{Supply |".web"| and |".ch"| extensions if necessary.}