[Mew-dist 10106] Re: X-Mail-Count: X-ML-Name:
SAKAI Kiyotaka
ksakai at example.com
1999年 8月 16日 (月) 19:10:09 JST
>> In article <19990621101711M.motonori at example.com>, Motonori Nakamura <motonori at example.com> writes:
>> + %N x-ml-name
>> + %Z x-mail-count
> これ、.たとえば im/Config で
> ScanHeaderPick=N:x-ml-name,Z:x-mail-count
> みたいに書けるといいのかなぁ。
これを実現するパッチです。
--
酒井 清隆 (E-mail: ksakai at example.com)
-------------- next part --------------
Index: IM/Config.pm.in
===================================================================
RCS file: /home/ksakai/cvsroot/im-120/IM/Config.pm.in,v
retrieving revision 1.2
diff -u -c -r1.2 Config.pm.in
*** Config.pm.in 1999/08/16 08:47:50 1.2
--- Config.pm.in 1999/08/16 10:06:57
***************
*** 34,40 ****
preserve_dot
folder_mode msg_mode allowcrlf no_sync
addrbook_file aliases_file petname_file
! context_file getchksbr_file getsbr_file scansbr_file
address addresses_regex
msgdbfile msgdbtype
mbox_style
--- 34,40 ----
preserve_dot
folder_mode msg_mode allowcrlf no_sync
addrbook_file aliases_file petname_file
! context_file getchksbr_file getsbr_file scansbr_file scan_header_pick
address addresses_regex
msgdbfile msgdbtype
mbox_style
***************
*** 117,122 ****
--- 117,123 ----
'getchksbr;s;;GetChkSbrFile' => 'GetChk hook subroutine script',
'getsbr;s;;GetSbrFile' => 'Get hook subroutine script',
'scansbr;s;;ScanSbrFile' => 'Scan hook subroutine script',
+ 'scanheaderpick;s;;ScanHeaderPick' => 'Scan headers to pick up',
'mboxstyle;s;;MBoxStyle' => 'Style of local MBox format',
'nntpservers;s;;NNTPservers' => 'List of NNTP servers',
'nntphistory;s;;NNTPhistory' => 'Status file of NNTP access',
***************
*** 808,813 ****
--- 809,818 ----
sub scansbr_file () {
return &expand_path($ScanSbrFile);
+ }
+
+ sub scan_header_pick () {
+ return $ScanHeaderPick;
}
sub petname_file () {
Index: IM/Scan.pm
===================================================================
RCS file: /home/ksakai/cvsroot/im-120/IM/Scan.pm,v
retrieving revision 1.1.1.1
diff -u -c -r1.1.1.1 Scan.pm
*** Scan.pm 1999/08/16 08:18:47 1.1.1.1
--- Scan.pm 1999/08/16 10:08:13
***************
*** 14,21 ****
require 5.003;
require Exporter;
! use IM::Config qw(allowcrlf scansbr_file mail_path address addresses_regex
! addrbook_file petname_file);
use IM::Util;
use IM::EncDec qw(mime_decode_string);
use IM::Address qw(extract_addr fetch_addr);
--- 14,21 ----
require 5.003;
require Exporter;
! use IM::Config qw(allowcrlf scansbr_file scan_header_pick mail_path address
! addresses_regex addrbook_file petname_file);
use IM::Util;
use IM::EncDec qw(mime_decode_string);
use IM::Address qw(extract_addr fetch_addr);
***************
*** 653,658 ****
--- 653,667 ----
my @symbols = ();
my ($format, $jis_safe, $plus, $hyphen, $size, $type, $arg);
+
+ if (scan_header_pick()) {
+ my $elem;
+ foreach $elem (split /,/, scan_header_pick()) {
+ if ($elem =~ /^([a-zA-Z]+):(.*)$/) {
+ $symbol_table{$1} = "$2";
+ }
+ }
+ }
while ($SCANFORM ne '') {
if ($SCANFORM =~ /^%(!?)(\+?)(-?)(\d*)([a-zA-Z]|{\w+})(.*)/) {
Mew-dist メーリングリストの案内