Expand PMF_FN_* macros.
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / mantools / get_anchors.pl
blobf0df23a95bf74f33ef3f12d6c6313f2f7f763057
1 #! /usr/bin/perl -w
3 # Copyright (c) 2004 Liviu Daia <Liviu.Daia@imar.ro>
4 # All rights reserved.
6 # $Revision: 1.1.1.1 $
7 # $Id: get_anchors.pl,v 1.1.1.1 2009/06/23 10:08:36 tron Exp $
8 # $Source: /pub/NetBSD/misc/repositories/cvsroot/src/external/ibm-public/postfix/dist/mantools/get_anchors.pl,v $
11 use HTML::Parser;
13 use strict;
14 use Carp ();
15 local $SIG{__WARN__} = \&Carp::cluck;
17 my ($p, $fn, %a);
20 sub
21 html_parse_start ($$)
23 my ($t, $attr) = @_;
25 push @{$a{$attr->{name}}}, $fn
26 if ($t eq 'a' and defined $attr->{name});
30 $p = HTML::Parser->new(api_version => 3);
31 $p->strict_comment (0);
32 $p->report_tags (qw(a));
33 $p->ignore_elements (qw(script style));
35 $p->handler (start => \&html_parse_start, 'tagname, attr');
37 while ($fn = shift)
39 $p->parse_file ($fn);
40 $p->eof;
43 for (keys %a)
45 print "$_\t\tdefined in ", (join ', ', @{$a{$_}}), "\n"
46 if (@{$a{$_}} > 1);
47 print "$_\t\tnumerical in ", (join ', ', @{$a{$_}}), "\n"
48 if (m/^[\d.]+$/o);