[docs] xmldocs - docelic modified bin/refs-autogen
docs at icdevgroup.org
docs at icdevgroup.org
Tue Oct 26 04:56:57 EDT 2004
User: docelic
Date: 2004-10-26 08:56:57 GMT
Modified: bin refs-autogen
Log:
- Improved handling of different symbols with the same name. This is
still work in progress.
bin/stattree is fine but bin/refs-autogen does need more work. (primarily,
replacing $autogenerated{$key} structure with $autogenerated{$gkey}{$key} )
Revision Changes Path
1.52 +16 -0 xmldocs/bin/refs-autogen
rev 1.52, prev_rev 1.51
Index: refs-autogen
===================================================================
RCS file: /var/cvs/xmldocs/bin/refs-autogen,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- refs-autogen 20 Oct 2004 17:02:33 -0000 1.51
+++ refs-autogen 26 Oct 2004 08:56:56 -0000 1.52
@@ -154,10 +154,25 @@
# %symbol_lists. We need to check if it already exists in all
# under %symbol_lists, searching in the same group is not enough
# because group might have changed in next version (usertag -> uitag).
+ # UPDATE: Item can only float between categories if it is a tag,
+ # for all other symbols it means we have different symbols of
+ # the same name (such as 'value' which is both a tag and filter).
my $found = 0;
+
for my $gk ( keys %symbol_lists ) {
if ( grep {/^$key$/} @{ $symbol_lists{$gk} } ) {
if ( $gk ne $gkey ) { # SPLAT! Symbol changed category over time.
+
+ # Found non-unique symbol name. (We are not interested in changes
+ # from uitag->usertag (or similar), but only in real symbols that
+ # are different but have same name). When that happens,
+ # refs/<file> needs to be deleted, and refs/<file>.{gk,gkey}
+ # created to uniquely identify items.
+ if ( $gkey !~ /tag$/ ) {
+ warn "$key IS BOTH $gk and $gkey!\n";
+ goto SKIPDUPCHECK;
+ }
+
# Delete item from old location
my $prev = scalar @{ $symbol_lists{$gk} }; # Quick sanity check
@{ $symbol_lists{$gk} } = grep {!/^$key$/} @{ $symbol_lists{$gk} };
@@ -169,6 +184,7 @@
}
}
}
+ SKIPDUPCHECK:
!$found and push @{ $symbol_lists{$gkey} }, $key;
# Define basic hash for the item ( $autogenerated{<name>} ), and
More information about the docs
mailing list