[docs] xmldocs - docelic modified bin/refs-autogen

docs at icdevgroup.org docs at icdevgroup.org
Sun Nov 7 09:27:34 EST 2004


User:      docelic
Date:      2004-11-07 14:27:34 GMT
Modified:  bin      refs-autogen
Log:
Commented all lines regarding See Also list generation.
I got a better idea for it.

Revision  Changes    Path
1.61      +45 -43    xmldocs/bin/refs-autogen


rev 1.61, prev_rev 1.60
Index: refs-autogen
===================================================================
RCS file: /var/cvs/xmldocs/bin/refs-autogen,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- refs-autogen	7 Nov 2004 13:44:23 -0000	1.60
+++ refs-autogen	7 Nov 2004 14:27:34 -0000	1.61
@@ -334,46 +334,46 @@
 	# jump out to symbol-specific-subroutine that will handle that.
 	################################################################
 
-	# _See Also_ section: "bidirectional" linking
-	if ( defined @{ $ag{'_see also'} } ) {
-		my $list = $ag{'_see also'};
-		@$list = grep {$autogenerated{$group}{$_} and $_ ne $ag{name}} @$list;
-		
-		for my $sym ( @$list ) {
-			my $list2 = $autogenerated{$group}{$sym}{'_see also'};
-			push @$list2, @$list, $k;
-			{ my %h; @$list2 = grep {!$h{$_}++ and $sym ne $_} @$list2 }
-			@{ $autogenerated{$group}{$sym}{'_see also'} } = @$list2;
-		}
-	}
-
-	# Turn 'See Also' items to refentries
-	my @see_items = @{ $ag{'_see also'} };
-	# XXX only if it's the symbol from same category, otherwise use
-	# olink to link between documents
-	for my $itm ( @see_items ) {
-		next if $itm =~ /^</;
-		if ( $autogenerated{$group}{$itm} ) {
-			my $linktype = "link"; # the default, linking inside the same document
-			my $linkarg = "linkend";
-			if ( $autogenerated{$group}{$itm}{'_symbol type'} eq
-				$ag{'_symbol type'} ) {
-				# Nothing, just use link linkend= if the targets are inside the same
-				# document.
-			} else {
-				# If they're not, find appropriate external document to link to
-				for my $sect ( keys %symbol_lists ) {
-					if ( grep {/^$itm$/} @{ $symbol_lists{$sect} } ) {
-						$linktype = "olink";
-						$linkarg = "targetdoc='${sect}s' targetptr";
-					}
-				}
-			}
-			# Now that $linktype and $linkarg are set, make the link/citerefentry
-			$itm =~ s/^(.+)$/<$linktype $linkarg='$1'><citerefentry><refentrytitle>$1<\/refentrytitle><manvolnum>7ic<\/manvolnum><\/citerefentry><\/$linktype>/;
-		}
-	}
-	@{ $ag{'_see also'} } = @see_items;
+	## _See Also_ section: "bidirectional" linking
+	#if ( defined @{ $ag{'_see also'} } ) {
+	#	my $list = $ag{'_see also'};
+	#	@$list = grep {$autogenerated{$group}{$_} and $_ ne $ag{name}} @$list;
+	#	
+	#	for my $sym ( @$list ) {
+	#		my $list2 = $autogenerated{$group}{$sym}{'_see also'};
+	#		push @$list2, @$list, $k;
+	#		{ my %h; @$list2 = grep {!$h{$_}++ and $sym ne $_} @$list2 }
+	#		@{ $autogenerated{$group}{$sym}{'_see also'} } = @$list2;
+	#	}
+	#}
+#
+#	# Turn 'See Also' items to refentries
+#	my @see_items = @{ $ag{'_see also'} };
+#	# XXX only if it's the symbol from same category, otherwise use
+#	# olink to link between documents
+#	for my $itm ( @see_items ) {
+#		next if $itm =~ /^</;
+#		if ( $autogenerated{$group}{$itm} ) {
+#			my $linktype = "link"; # the default, linking inside the same document
+#			my $linkarg = "linkend";
+#			if ( $autogenerated{$group}{$itm}{'_symbol type'} eq
+#				$ag{'_symbol type'} ) {
+#				# Nothing, just use link linkend= if the targets are inside the same
+#				# document.
+#			} else {
+#				# If they're not, find appropriate external document to link to
+#				for my $sect ( keys %symbol_lists ) {
+#					if ( grep {/^$itm$/} @{ $symbol_lists{$sect} } ) {
+#						$linktype = "olink";
+#						$linkarg = "targetdoc='${sect}s' targetptr";
+#					}
+#				}
+#			}
+#			# Now that $linktype and $linkarg are set, make the link/citerefentry
+#			$itm =~ s/^(.+)$/<$linktype $linkarg='$1'><citerefentry><refentrytitle>$1<\/refentrytitle><manvolnum>7ic<\/manvolnum><\/citerefentry><\/$linktype>/;
+#		}
+#	}
+#	$ag{'_see also'} = @see_items;
 
 	# Finally, set default values if they weren't overriden by real information
 	for my $field (@page_order) {
@@ -390,7 +390,8 @@
 	##########################################################################
 	# "Stringify" array values
 	$ag{"available in"} = join ", ", @{ $ag{"_available in"} };
-	$ag{'see also'} = join ", ", $ag{'_see also'};
+	#$ag{'see also'} = join(", \n", $ag{'_see also'}) if
+	#	(ref $ag{'_see also'} and scalar @{ $ag{'_see also'}});
 	# Compress 4.6.0, 4.8.0, 5.0.0 to 4.6.0-5.0.0
 	$ag{'available in'} = compress_availability($ag{'_available in'});
 
@@ -736,8 +737,9 @@
 		if ( $sect =~ /^see also$/i ) {
 			( my $list = $content ) =~ s/,/ /g;
 			my @list = split /\s+/, $list;
-			push @{ $$sref{'_see also'} }, @list;
-			$$sref{'see also'} = join ", ", @{$$sref{'_see also'}};
+			@{ $$sref{'_see also'} } = @list;
+			#push @{ $$sref{'_see also'} }, @list;
+			#$$sref{'see also'} = join ", ", @{$$sref{'_see also'}};
 		}
 
 	} else { # "Missing" section








More information about the docs mailing list