#!/usr/bin/perl
#
# lintian-info -- transform lintian tags into descriptive text
#
# Copyright (C) 1998 by Christian Schwarz and Richard Braakman
#
# This program is free software.  It is distributed under the terms of
# the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any
# later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, you can find it on the World Wide
# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.

# ---end-of-configuration-part---

# turn file buffering off:
$| = 1;

# determine LINTIAN_ROOT
($LINTIAN_ROOT = $ENV{'LINTIAN_ROOT'}) or ($LINTIAN_ROOT = '/usr/share/lintian');

# import perl libraries
require "$LINTIAN_ROOT/lib/read_taginfo.pl";

read_tag_info();

while (<>) {
  print;

  if (/^[OEWX]:\s+\S+\s+(\S+)/o) {
    $tag = $1;

    next if not $tag_info{$tag} or $already_displayed{$tag}++;

    print "N:\n";
    print wrap_paragraphs('N:   ',$tag_info{$tag});
    print "N:\n";
  }
}

exit 0;
