Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: [Ethereal-dev] Patch for make-authors-short.pl

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Graeme Hewson <ghewson@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 05 Sep 2004 19:33:38 +0100
Unfortunately, there are still problems with the authors list wrapping
in ethereal.1 and ethereal.html.  My earlier patch to
make-authors-short.pl relies on a trick which only works with very old
versions of pod2man, and doesn't work at all with any version of pod2html I have.

This patch works by wrapping .nf/.fi macros around the authors list in
the man page and by wrapping <pre> and </pre> tags around it in the HTML
file.  Please could it be checked in.

Using the above method means we're free to use pod E<> escapes, such as E<aacute>, which is translated by pod2man and pod2html respectively to a\*' and &aacute;. Why do this? Perhaps man/nroff escapes and HTML entities, being translated closer to the user's machine, if not on it, have a better chance of being displayed correctly on a wider range of machines than UTF-8. I propose extending make-authors-short.pl to translate UTF-8 accented characters in AUTHORS into pod escapes in AUTHORS-SHORT.

The AUTHORS file isn't in UTF-8, though! I thought it was converted to UTF-8 in May, and there's a UTF-8 BOM at the top, but it's actually in something like ISO 8859-1. So we need to convert the accented characters to UTF-8... yes?


Graeme
--- make-authors-short.pl.orig	Thu Aug 12 22:45:12 2004
+++ make-authors-short.pl	Sun Sep  5 12:26:30 2004
@@ -10,6 +10,13 @@
 my $subinfo=0;
 my $nextline;
 
+print "=for html <pre>\n\n";
+print "=for man .nf\n\n";
+
+$_ = <>;
+s/\xef\xbb\xbf//;		# Skip UTF-8 byte order mark
+print unless /^\n/;
+
 while (<>) {
 	if (/(.*){/) {
 		$subinfo = 1;
@@ -22,7 +29,9 @@
 	} elsif ($subinfo == 1) {
 		next;
 	} else {
-		s/^$/ /;	# Make it a verbatim paragraph
 		print;
 	}
 }
+
+print "\n=for html </pre>\n";
+print "\n=for man .fi\n";