Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / mhnull.pl
CommitLineData
86530b38
AT
1##---------------------------------------------------------------------------##
2## File:
3## $Id: mhnull.pl,v 1.7 2001/09/17 16:10:30 ehood Exp $
4## Author:
5## Earl Hood mhonarc@mhonarc.org
6## Description:
7## Library defines the null filter routine for MHonArc. Its use
8## is for dropping unwanted data from messages.
9## Filter routine can be registered with the following:
10## <MIMEFILTERS>
11## some-type/some-subtype;m2h_null::filter;mhnull.pl
12## </MIMEFILTERS>
13##---------------------------------------------------------------------------##
14## MHonArc -- Internet mail-to-HTML converter
15## Copyright (C) 1998,1999 Earl Hood, mhonarc@mhonarc.org
16##
17## This program is free software; you can redistribute it and/or modify
18## it under the terms of the GNU General Public License as published by
19## the Free Software Foundation; either version 2 of the License, or
20## (at your option) any later version.
21##
22## This program is distributed in the hope that it will be useful,
23## but WITHOUT ANY WARRANTY; without even the implied warranty of
24## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25## GNU General Public License for more details.
26##
27## You should have received a copy of the GNU General Public License
28## along with this program; if not, write to the Free Software
29## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
30## 02111-1307, USA
31##---------------------------------------------------------------------------##
32
33package m2h_null;
34
35sub filter {
36 my($fields, $data, $isdecode, $args) = @_;
37 my($ctype) = $fields->{'content-type'}[0] =~ m%^\s*([\w\-\./]+)%;
38 my($disp, $nameparm) = readmail::MAILhead_get_disposition($fields);
39 join("", '<p><tt>&lt;&lt;',
40 ($disp ? "$disp: " : ""),
41 ($nameparm ? $nameparm : $ctype),
42 '&gt;&gt;</tt></p>');
43}
44
45##---------------------------------------------------------------------------##
461;