Ethereal-dev: [Ethereal-dev] ethereal man page

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

From: Carlos Pignataro <cpignata@xxxxxxxxx>
Date: Tue, 25 May 2004 08:57:58 -0400
Hello,

There's 2 small issues with ethereal man page:

1. Since now ethereal.1 is made from pod2man $(srcdir)/ethereal-tmp.pod, the man title
   now displays "ETHEREAL-TMP 1" instead of "ETHEREAL 1":

man ethereal | head
ETHEREAL-TMP(1)          The Ethereal Network Analyzer         ETHEREAL-TMP(1)

NAME
       ethereal - Interactively browse network traffic

   Maybe doc/ethereal.pod should actually be doc/ethereal-tmp.pod and then in Makefiles 
   change to:
   cat ethereal-tmp.pod ../AUTHORS-SHORT > ethereal.pod

2. Since make-authors-short.pl is making AUTHORS-SHORT with all lines starting without
   space or tab, pod is treating the paragraphs as `Ordinary Paragraph' instead of 
   `Verbatim Paragraph' [check man perlpod] and misaligning:

AUTHORS
     Original Author -------- ------ Gerald Combs
     <gerald[AT]ethereal.com>

     Contributors ------------ Gilbert Ramirez
     <gram[AT]alumni.rice.edu> Hannes R. Boehm
     <hannes[AT]boehm.org> Mike Hall               <mike [AT]
[snip]

The following patch fixes #2 by prepending a space into all non empty lines.

Index: make-authors-short.pl
===================================================================
RCS file: /cvsroot/ethereal/make-authors-short.pl,v
retrieving revision 1.3
diff -u -r1.3 make-authors-short.pl
--- make-authors-short.pl       22 May 2004 14:05:33 -0000      1.3
+++ make-authors-short.pl       25 May 2004 12:37:23 -0000
@@ -13,15 +13,15 @@
 while (<>) {
        if (/(.*){/) {
                $subinfo = 1;
-               print "$1\n";
+               print " $1\n";
        } elsif (/}/) {
                $subinfo = 0;
                if (($nextline = <>) !~ /^[\s\r]*$/) {
-                       print $nextline;
+                       print " $nextline";
                }
        } elsif ($subinfo == 1) {
                next;
        } else {
-               print;
+               printf "%s%s", ($_ =~ /^[\s\r]*$/) ? "" : " ", $_;
        }
 }

Regards,


--Carlos.
Escalation RTP - Cisco Systems