[docs] xmldocs - docelic modified bin/refs-autogen
docs at icdevgroup.org
docs at icdevgroup.org
Thu Oct 28 14:36:41 EDT 2004
User: docelic
Date: 2004-10-28 18:36:40 GMT
Modified: bin refs-autogen
Log:
Fix bugs regarding symbol availability and source context line numbering
I introduced at some point.
Revision Changes Path
1.54 +22 -26 xmldocs/bin/refs-autogen
rev 1.54, prev_rev 1.53
Index: refs-autogen
===================================================================
RCS file: /var/cvs/xmldocs/bin/refs-autogen,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- refs-autogen 26 Oct 2004 10:00:55 -0000 1.53
+++ refs-autogen 28 Oct 2004 18:36:40 -0000 1.54
@@ -174,7 +174,7 @@
# 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";
+ warn "$key IS BOTH $gk and $gkey!\n" if $verbose;
goto SKIPDUPCHECK;
}
@@ -271,7 +271,7 @@
# WE SHOW ONLY PART OF CONTEXT FOR THOSE
if ( $gkey !~ /(tag|conf|filter)$/ ) {
$cstart = $$ctx{lnum}-$$ctx{ctxpre};
- $cend = $$ctx{lnum}+$$ctx{ctxpost};
+ $cend = $cstart+$$ctx{lnum}+$$ctx{ctxpost};
} else {
# WE SHOW ALL FOR THOSE
@@ -281,9 +281,10 @@
$cstart == 1 and $cend -= 1;
}
- # General fix, shouldn't break anything
+ # General fix, shouldn't break anything (Heh, you bet..)
$cstart <= 0 and $cstart = 1;
- $cend > @{ $$ctx{ctx} } and $cend = @{ $$ctx{ctx} }-1;
+ $cend >= $cstart+@{ $$ctx{ctx} } and
+ $cend = $cstart+@{ $$ctx{ctx} }-1;
if ( ! $all ) {
$ctxmeta = "<sbr/>Line $ln";
@@ -291,13 +292,7 @@
} else {
$ctxmeta = "<sbr/>Lines: $cend";
}
- # XXX - eliminate negative numbers in source context spans
- # ( 0-6 == OK, -4-6 != OK )
- #if ( $cstart < 0 ) {
- # print STDERR "CSTART IS $cstart FOR $$ag{name}\n";
- # $cstart = 0 ;
- #}
-
+
if ( $$ctx{funclnum} ) {
$ctxmeta .= " in $$ctx{func}():$$ctx{funclnum}" ;
}
@@ -590,21 +585,22 @@
# those cases (we could leave through in any case, but that would waste
# time).
- # TODO: Move some of this to the above code that calls process_symbol() ?
- #if ( ref $autogenerated{$group}{$name} ) { # Symbol known
- # if ( $autogenerated{$group}{$name}{"_symbol type"} ne $group ) { # But changed grp.
- # # The good entry is already in symbol_lists (done in wanted()), we
- # # only need to remove this invalid one here.
- # @{$symbol_lists{$group} } = grep{!/^$name$/} @{ $symbol_lists{$group}};
- # # XXX In a new system, add file pathname change to NOTES section.
- # # And correct the field (we can't simply let through to regenerate
- # # the skeleton because that would delete previous "available in"
- # # information):
- # $autogenerated{$name}{"_symbol type"} = $group;
- # $autogenerated{$name}{"symbol type"} = "&SYMBOL_" . uc($group) . ";",
- # }
- # return
- #}
+ # Move some of this to the above code that calls process_symbol() ?
+ # Or, what the f* was I thinking when I disabled this region?
+ if ( ref $autogenerated{$group}{$name} ) { # Symbol known
+ if ( $autogenerated{$group}{$name}{"_symbol type"} ne $group ) { # But changed grp.
+ # The good entry is already in symbol_lists (done in wanted()), we
+ # only need to remove this invalid one here.
+ @{$symbol_lists{$group} } = grep{!/^$name$/} @{ $symbol_lists{$group}};
+ # XXX In a new system, add file pathname change to NOTES section.
+ # And correct the field (we can't simply let through to regenerate
+ # the skeleton because that would delete previous "available in"
+ # information):
+ $autogenerated{$group}{$name}{"_symbol type"} = $group;
+ $autogenerated{$group}{$name}{"symbol type"} = "&SYMBOL_" . uc($group) . ";",
+ }
+ return
+ }
# Make skel
$autogenerated{$group}{$name} = {
More information about the docs
mailing list