Lines 209-216
Link Here
|
209 |
$file = shift; |
209 |
$file = shift; |
210 |
if ($file && !-r $file) { warn "$file: $!\n"; next; } |
210 |
if ($file && !-r $file) { warn "$file: $!\n"; next; } |
211 |
if ($jisconvert) { |
211 |
if ($jisconvert) { |
212 |
require 'flush.pl'; |
212 |
# flush.pl obsolete (originally in Perl 4) |
213 |
&flush(STDOUT); |
213 |
# replaced with equivalent code of &flush(STDOUT) |
|
|
214 |
local($old_stdout) = select(STDOUT); |
215 |
$| = 1; |
216 |
print ""; |
217 |
$| = 0; |
218 |
select($old_stdout); |
219 |
# end of equivalent code |
214 |
open(F, "-|") || &jis($file); |
220 |
open(F, "-|") || &jis($file); |
215 |
} else { |
221 |
} else { |
216 |
$file = '-' if $file eq ''; |
222 |
$file = '-' if $file eq ''; |
Lines 477-486
Link Here
|
477 |
} |
483 |
} |
478 |
|
484 |
|
479 |
sub print_header { |
485 |
sub print_header { |
480 |
require('ctime.pl'); |
|
|
481 |
return if $header_is_printed++; |
486 |
return if $header_is_printed++; |
482 |
|
487 |
|
483 |
chop(local($date) = &ctime(time)); |
488 |
# ctime.pl obsolete (originally in Perl 4) |
|
|
489 |
# ctime.pl behaves differently when TZ is not set, |
490 |
# but the behavior will not affect the PostScript file details |
491 |
local($date) = scalar localtime; |
492 |
|
484 |
local($orientation) = $portrait ? "Portrait" : "Landscape"; |
493 |
local($orientation) = $portrait ? "Portrait" : "Landscape"; |
485 |
|
494 |
|
486 |
print <<"---"; |
495 |
print <<"---"; |
Lines 526-532
Link Here
|
526 |
printf("/lines %d def\n", $linesperpage); |
535 |
printf("/lines %d def\n", $linesperpage); |
527 |
printf("/columns %d def\n", $columnsperline); |
536 |
printf("/columns %d def\n", $columnsperline); |
528 |
$sublabel = $default_sublabel unless defined $sublabel; |
537 |
$sublabel = $default_sublabel unless defined $sublabel; |
529 |
print "/date (", &date($sublabel, time), ") def\n"; |
538 |
# function name changed to a2ps_date to avoid confusion |
|
|
539 |
print "/date (", &a2ps_date($sublabel, time), ") def\n"; |
530 |
if ($ascii_mag) { |
540 |
if ($ascii_mag) { |
531 |
printf("/doasciimag true def /asciimagsize %f def\n", $ascii_mag); |
541 |
printf("/doasciimag true def /asciimagsize %f def\n", $ascii_mag); |
532 |
} else { |
542 |
} else { |
Lines 549-555
Link Here
|
549 |
print "%%EndProlog\n\n"; |
559 |
print "%%EndProlog\n\n"; |
550 |
} |
560 |
} |
551 |
|
561 |
|
552 |
sub date { |
562 |
# function name changed to a2ps_date to avoid confusion |
|
|
563 |
sub a2ps_date { |
553 |
local($_, $time) = @_; |
564 |
local($_, $time) = @_; |
554 |
local($sec, $min, $hour, $mday, $mon, $year, $wday) = localtime($time); |
565 |
local($sec, $min, $hour, $mday, $mon, $year, $wday) = localtime($time); |
555 |
$year += 1900; |
566 |
$year += 1900; |