Ethereal-dev: [Ethereal-dev] [PATCH] -G option & doc/dfilter... change to include hfinfo->blur

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

From: Vassilii Khachaturov <vassilii@xxxxxxxxxxxxxxx>
Date: Tue, 13 Aug 2002 16:01:52 -0400 (EDT)
Included is a patch that modifies the -G option handling along
with the postprocessing perl scripts to include the "blurb" description,
when present, into the resulting manpage.

(I guess one of the reason people rarely fill in the human-readable
long field description is that until now the only place it
is shown is the GUI version hint for a selected field.)

The pod pipeline works, but I haven't tested my dfilter2sgml change 
- my environment Makefiles never seem to invoke it - I guess I need 
to checkout ethereal-doc for it?

--- epan/proto.c	2002/08/02 21:29:39	1.71
+++ epan/proto.c	2002/08/13 19:14:16
@@ -3044,8 +3044,8 @@
 			g_assert(parent_hfinfo);
 
 			enum_name = ftype_name(hfinfo->type);
-			printf("F\t%s\t%s\t%s\t%s\n", hfinfo->name, hfinfo->abbrev,
-				enum_name,parent_hfinfo->abbrev);
+			printf("F\t%s\t%s\t%s\t%s\t%s\n", hfinfo->name, hfinfo->abbrev,
+				enum_name,parent_hfinfo->abbrev, hfinfo->blurb);
 		}
 	}
 }
--- doc/dfilter2pod.pl	2001/04/19 23:17:30	1.2
+++ doc/dfilter2pod.pl	2002/08/13 19:14:16
@@ -49,10 +49,10 @@
 	}
 	# Store header field information
 	else {
-		($junk, $name, $abbrev, $type, $parent) =
+		($junk, $name, $abbrev, $type, $parent, $blurb) =
 			split(/\t+/, $_);
 		push(@{$field_abbrev{$parent}}, $abbrev);
-		$field_info{$abbrev} = [ $name, $type ];
+		$field_info{$abbrev} = [ $name, $type, $blurb ];
 	}
 }
 
@@ -87,8 +87,12 @@
 		if ($field_abbrev{$proto_abbrev{$proto_name}}) {
 
 			for $field_abbrev (sort @{$field_abbrev{$proto_abbrev{$proto_name}}}) {
-				print "    $field_abbrev  ", $field_info{$field_abbrev}[0],"\n";
-				print "        ", $ftenum_names{$field_info{$field_abbrev}[1]}, "\n\n";
+				print "    $field_abbrev  ", $field_info{$field_abbrev}[0],"\n",
+				      "        ", $ftenum_names{$field_info{$field_abbrev}[1]},
+				   "\n";
+				print "        ", $field_info{$field_abbrev}[2], "\n"
+					if $field_info{$field_abbrev}[2];
+				print "\n";
 			}
 		}
 	}
--- doc/dfilter2sgml	2001/04/19 23:17:30	1.2
+++ doc/dfilter2sgml	2002/08/13 19:23:07
@@ -49,10 +49,10 @@
 	}
 	# Store header field information
 	else {
-		($junk, $name, $abbrev, $type, $parent) =
+		($junk, $name, $abbrev, $type, $parent, $blurb) =
 			split(/\t+/, $_);
 		push(@{$field_abbrev{$parent}}, $abbrev);
-		$field_info{$abbrev} = [ $name, $type ];
+		$field_info{$abbrev} = [ $name, $type, $blurb ];
 	}
 }
 
@@ -92,11 +92,11 @@
 		print "<section id=\"SID$ns_proto_name\"><title>$proto_name ($proto_abbrev{$proto_name})</>\n\n";
 
 		print "<table id=\"TID$ns_proto_name\"><title>$proto_name ($proto_abbrev{$proto_name})</>\n";
-		print "<tgroup cols=\"3\">\n";
+		print "<tgroup cols=\"4\">\n";
 #		print "<colspec colnum=\"1\" colwidth=\"80pt\">\n";
 #		print "<colspec colnum=\"2\" colwidth=\"80pt\"\n>";
 		print "<thead>\n  <row>\n    ";
-		print "<entry>Field</>\n    <entry>Field Name</>\n    <entry>Type</>\n\n";
+		print "<entry>Field</>\n    <entry>Field Name</>\n    <entry>Type</>\n\n    <entry>Description</>";
 
 		print "  </row>\n</thead>\n<tbody>\n";
 
@@ -109,6 +109,7 @@
 			    print "    <entry>$field_abbrev</>\n";
 			    print "    <entry>", $field_info{$field_abbrev}[0], "</>\n";
 			    print "    <entry>", $ftenum_names{$field_info{$field_abbrev}[1]}, "</>\n";
+				print "    <entry>", $field_info{$field_abbrev}[2], "</>\n";
 			    print "  </row>\n\n";
 
 			}