From 2f6e1cc9e4c3f899a4142cbdf44e6fc10af0d32b Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Mon, 16 Jul 2012 07:27:23 +0000 Subject: 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 --- Build/source/texk/web2c/patgen.ch | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'Build/source/texk/web2c/patgen.ch') 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 @@/ 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; -- cgit v1.2.3