summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/dvicopy.ch
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-07-16 07:27:23 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-07-16 07:27:23 +0000
commit2f6e1cc9e4c3f899a4142cbdf44e6fc10af0d32b (patch)
tree6ca7032c7cce84a2826dc9105b9aaf479800b561 /Build/source/texk/web2c/dvicopy.ch
parent41e050122555719daad3bc3da47e3d559e39c42f (diff)
texk/*: Pass known program names as arg2 to kpse_set_program_name()
git-svn-id: svn://tug.org/texlive/trunk@27073 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/dvicopy.ch')
-rw-r--r--Build/source/texk/web2c/dvicopy.ch21
1 files changed, 14 insertions, 7 deletions
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;