Path: galaxy.trc.rwcp.or.jp!news.trc!imnet3!nspixp2!nntp-egw.ocn.ad.jp!nn-os001.ocn.ad.jp!shiva.tri.asanuma.co.jp!usenet
From: MORI Kouji <mori@tri.asanuma.co.jp>
Newsgroups: fj.comp.lang.perl,fj.comp.lang.postscript,fj.sources.d
Subject: Re: unofficial patch for a2ps.pl-1.43-pre1 (was: a2ps.pl-1.43-pre1)
Date: 03 Mar 1999 17:00:46 +0900
Organization: Techinical Research Institute, Asanuma Corp., Takatsuki, Japan
Lines: 102
Sender: mori@kurishna.tri.asanuma.co.jp
Message-ID: <80vhgjt32p.fsf@kurishna.tri.asanuma.co.jp>
References: <19990110234830V.utashiro@iij.ad.jp>
	<wk678jwv3g.fsf@remus.dti.ne.jp>
NNTP-Posting-Host: shiva.tri.asanuma.co.jp
Mime-Version: 1.0 (generated by SEMI 1.12.0 - "Nishi-Kanazawa")
Content-Type: text/plain; charset=ISO-2022-JP
User-Agent: Chao-gnus/6.12.5 SEMI/1.12.0 (Nishi-Kanazawa) FLIM/1.12.1
 (=?ISO-8859-4?Q?Nishinoky=F2?=) Emacs/20.3.92 (i386--freebsd) MULE/4.0
 (HANANOEN)
Xref: galaxy.trc.rwcp.or.jp fj.comp.lang.perl:1077 fj.comp.lang.postscript:209 fj.sources.d:3330
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.sources.d&nb=3330&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

$BF|IU$O(B pr $B$_$?$$$K=$@5;~9o$,0u:~$G$-$k$H4r$7$$$H;W$&$N$G$9$,!"(B
$B$I$&$G$7$g$&(B?

$B$H;W$C$F!"8=:_$N;~9o$8$c$J$/$F=$@5$7$?;~9o$G0u:~$9$k%*%W%7%g%s$r(B
$BDI2C$7$F$_$^$7$?!#(B-M $B$G%U%!%$%k$N=$@5;~9o$r;H$C$F0u:~$7$^$9!#(B
$B%G%U%)%k%H$O%*%j%8%J%k$N$^$^$G$9!#(B

$B$($s$I$&$5$s$N%Q%C%A$r$"$F$?$b$N$X$N%Q%C%A$K$J$C$F$^$9!#(B


# $B%*%W%7%g%s$rE,MQ$7$J$$;~$O%*%j%8%J%k$HF1$8%3!<%I$rEG$/$h$&$K(B
# $B$7$?$+$C$?$N$G$9$,!"$=$&$9$k$H=$@52U=j$,A}$($F$7$^$&$N$G;_$a$^$7$?!#(B

# $B6qBNE*$K$O(B /datewidth, /filenameroom $B$NDj5A$,JQ99$K$J$j$^$9!#(B
# $B32$O$J$$$H;W$$$^$9$,!"4*0c$$$7$F$k$+$b$7$l$^$;$s!#(B

-- 
$B?9(B $B9@Fs(B(MORI Kouji)
($B3t(B)$B^I>BAH(B $B5;=Q8&5f=j(B
E-mail: mori@tri.asanuma.co.jp


--- a2ps.pl-1.43-pre1Wed Mar  3 14:09:36 1999
+++ a2ps.pl-1.43-pre1-moriWed Mar  3 16:31:09 1999
@@ -93,6 +93,7 @@
 #$numformat = '%4d  ';
 $oblique = 1;
 $bold = 1;
+$use_mod_time = 0;
 $kanji_ascii_ratio = 1.0;
 $default_sublabel = q#%month %mday %year %hour:%min#;
 
@@ -156,6 +157,9 @@
 while (@ARGV) {
     $file = shift;
     if ($file && !-r $file) { warn "$file: $!\n"; next; }
+    if ($use_mod_time) {
+$modifier_time = ($file ne '') ? (stat($file))[9] : time;
+    }
     if ($jisconvert) {
 $| = ($|, $| = 1, print '')[$[];# fflush(STDOUT)
 open(F, "-|") || &jis($file);
@@ -232,6 +236,7 @@
 if (s/^(n?)b//){$bold= !$1;redo;}
 
 if (s/^(n?)n//){$numbering= !$1;redo;}
+if (s/^(n?)M//){$use_mod_time= !$1;redo;}
 &usage;
     }
     return @opts;
@@ -260,6 +265,7 @@
 -[n]rreset sheet number on each file (r)
 -[n]buse bold/gothic font for overstruck characters (b)
 -[n]ouse oblique font for underlined characters (o)
+-[n]Muse modifier time (nM)
 -a#change baselineskip (1.0)
 -f[x]#font size or maginificent (6.6 or 9.8)
 -fn#normal font (C: Courier)
@@ -397,6 +403,9 @@
 }
 print "%%Page: $sheets $ordinal\n";
 print "/sheet $sheets def\n";
+if ($use_mod_time) {
+  print "/date (", &date($sublabel, $modifier_time), ") def\n";
+}
 print "($label) initfilename\n";
 $kanji_init = 0;
 print "kanji_init\n" if $kanji;
@@ -578,7 +587,9 @@
     printf("/lines %d def\n", $linesperpage);
     printf("/columns %d def\n", $columnsperline);
     $sublabel = $default_sublabel unless defined $sublabel;
-    print "/date (", &date($sublabel, time), ") def\n";
+    unless ($use_mod_time) {
+      print "/date (", &date($sublabel, time), ") def\n";
+    }
     if ($ascii_mag) {
 printf("/doasciimag true def /asciimagsize %f def\n", $ascii_mag);
     } else {
@@ -804,13 +815,19 @@
 
 % Other initializations.
 datefont setfont
-/datewidth date stringwidth pop def
+%/datewidth date stringwidth pop def
+/datewidth { date stringwidth pop } bind def
 /pagenumwidth (Page 999) stringwidth pop def
+%/filenameroom
+%          pagewidth
+% filenamefontsize 4 mul datewidth add pagenumwidth add
+%      sub
+%   def
 /filenameroom
-         pagewidth
+      {  pagewidth
  filenamefontsize 4 mul datewidth add pagenumwidth add
       sub
-   def
+   } bind def
 
 
 % Function startdoc: initializes printer and global variables.
