forked from osmocom/wireshark
![Gerald Combs](/assets/img/avatar_default.png)
Our authors lists and man pages are encoded as UTF-8 and have been for quite a while. Remove perlnoutf.pl and ensure that standard I/O uses UTF-8 as described at https://www.perl.com/pub/2012/05/perlunicook-make-all-io-default-to-utf-8.html/ Change-Id: I7016ec5e3a12934463b43bcfdde2c424069c20ac Reviewed-on: https://code.wireshark.org/review/37817 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
54 lines
1.1 KiB
Perl
Executable file
54 lines
1.1 KiB
Perl
Executable file
# Convert AUTHORS-SHORT file for use in man page and HTML documentation
|
|
# after processing through pod2man and pod2html.
|
|
#
|
|
# Copyright 2004 Graeme Hewson <ghewson@wormhole.me.uk>
|
|
#
|
|
# Wireshark - Network traffic analyzer
|
|
# By Gerald Combs <gerald@wireshark.org>
|
|
# Copyright 1998 Gerald Combs
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
#
|
|
|
|
use strict;
|
|
use open qw(:std :utf8);
|
|
|
|
# This might not be necessary.
|
|
print "=for html <style>div#authors pre, div#authors pre code { white-space: pre-wrap; }</style>\n\n";
|
|
print "=for html <div id=authors>\n\n";
|
|
|
|
print "=for man .nf\n\n";
|
|
|
|
while (<>) {
|
|
printline();
|
|
}
|
|
|
|
print "\n=for html </div>\n";
|
|
print "\n=for man .fi\n";
|
|
|
|
sub printline {
|
|
my $line = shift || $_;
|
|
|
|
if ($line =~ /^=/) {
|
|
#
|
|
# Convert Asciidoctor-style headings to Pod.
|
|
#
|
|
$line =~ s/^= /=head2 /;
|
|
$line =~ s/\s*=+$//;
|
|
print $line;
|
|
return;
|
|
}
|
|
|
|
if ($line =~ /<\S+\[AT\]\S+>$/i or $line =~ /address removed.*\)/) {
|
|
# Make the author lists verbatim paragraphs.
|
|
$line = " " . $line;
|
|
}
|
|
|
|
if ($line =~ /^and by:/) {
|
|
# This needs to be a regular paragraph.
|
|
$line = "\n" . $line;
|
|
}
|
|
|
|
print $line;
|
|
}
|