diff options
Diffstat (limited to 'Build/source/texk/web2c/ptexdir/ptftopl.ch')
-rw-r--r-- | Build/source/texk/web2c/ptexdir/ptftopl.ch | 56 |
1 files changed, 15 insertions, 41 deletions
diff --git a/Build/source/texk/web2c/ptexdir/ptftopl.ch b/Build/source/texk/web2c/ptexdir/ptftopl.ch index f5bd13a1a54..a4e0937c723 100644 --- a/Build/source/texk/web2c/ptexdir/ptftopl.ch +++ b/Build/source/texk/web2c/ptexdir/ptftopl.ch @@ -12,7 +12,7 @@ @x [2] l.64 - pTeX: @d banner=='This is TFtoPL, Version 3.2' {printed when the program starts} @y -@d banner=='This is Nihongo TFtoPL, Version 3.2-p1.7' +@d banner=='This is pTFtoPL, Version 3.2-p1.7' {printed when the program starts} @z @@ -32,7 +32,7 @@ var @!k:integer; {all-purpose initiallization index} @x parse_arguments; @y - init_default_kanji; + init_kanji; parse_arguments; @z @@ -40,9 +40,7 @@ var @!k:integer; {all-purpose initiallization index} print_ln (version_string); @y print_ln (version_string); - print ('process kanji code is '); - print (conststringcast(get_enc_string)); - print_ln('.'); + print_ln ('process kanji code is ', conststringcast(get_enc_string), '.'); @z @x [18.20] l.438 - pTeX: @@ -352,23 +350,6 @@ const n_options = 4; {Pascal won't count array lengths for us.} @y const n_options = 6; {Pascal won't count array lengths for us.} @z -@x -var @!long_options: array[0..n_options] of getopt_struct; - @!getopt_return_val: integer; - @!option_index: c_int_type; - @!current_option: 0..n_options; -begin - @<Initialize the option variables@>; -@y -var @!long_options: array[0..n_options] of getopt_struct; - @!getopt_return_val: integer; - @!option_index: c_int_type; - @!current_option: 0..n_options; - @!version_switch: boolean; -begin - @<Initialize the option variables@>; - version_switch := false; -@z @x usage ('tftopl'); @@ -381,24 +362,23 @@ begin @y usage_help (PTFTOPL_HELP, nil); @z + @x - end else if argument_is ('version') then begin - print_version_and_exit (banner, nil, 'D.E. Knuth', nil); + end; {Else it was a flag; |getopt| has already done the assignment.} @y - end else if argument_is ('version') then begin - version_switch := true; - end else if argument_is ('kanji') then begin - @<Set process kanji code@>; + if (not set_enc_string(optarg,optarg)) then + print_ln('Bad kanji encoding "', stringcast(optarg), '".'); + + end; {Else it was a flag; |getopt| has already done the assignment.} @z + @x - end; {Else it was a flag; |getopt| has already done the assignment.} - until getopt_return_val = -1; + print_ln ('tftopl: Need one or two file arguments.'); + usage ('tftopl'); @y - end; {Else it was a flag; |getopt| has already done the assignment.} - until getopt_return_val = -1; - if (version_switch) then - print_version_and_exit (banner, nil, 'D.E. Knuth', nil); + print_ln ('ptftopl: Need one or two file arguments.'); + usage ('ptftopl'); @z @x @@ -553,7 +533,7 @@ begin if ix<=8*94-1 then index_to_jis:=(ix div 94 + @"21) * @'400 + (ix mod 94 + @"21) else - index_to_jis:=((ix+7 * 94) div 94 + @"21) * @'400 + ((ix+7*94) mod 94 + @"21) + index_to_jis:=((ix+7 * 94) div 94 + @"21) * @'400 + ((ix+7*94) mod 94 + @"21); end; @ @<declare kanji conversion functions@>= @@ -568,11 +548,5 @@ else jis_to_index:=(first_byte-7)*94+second_byte; end -@ output kanji code. - -@ @<Set process kanji code@>= - if (not set_enc_string(optarg,optarg)) then - print_ln('Bad kanjicode encoding "', stringcast(optarg), '".'); - @* Index. @z |