[docs] xmldocs - docelic modified 3 files
docs at icdevgroup.org
docs at icdevgroup.org
Tue Oct 12 05:41:24 EDT 2004
User: docelic
Date: 2004-10-12 09:41:24 GMT
Modified: . TODO
Modified: bin refs-autogen stattree
Log:
- bin/stattree:
- Properly remember line numbers for {glob,cat}confs
- Behave TABs in source reports for {glob,cat}confs
- bin/refs-autogen:
- Clean up template for glob/catconfs
- Show line number for glob/catconfs in Source section
- TODO: items
Revision Changes Path
1.33 +3 -0 xmldocs/TODO
rev 1.33, prev_rev 1.32
Index: TODO
===================================================================
RCS file: /var/cvs/xmldocs/TODO,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- TODO 9 Oct 2004 11:30:28 -0000 1.32
+++ TODO 12 Oct 2004 09:41:24 -0000 1.33
@@ -9,6 +9,9 @@
multiple times within +- of first occurence, we treat it like one context.
but the header says 'displaying 2/2 contexts', it doesn't remove
'duplicates'. fix that.
+- If usertag MapRoutines, display the routine
+- If See Also item starts with '<', do not perform any scrabmle on it and
+ pass as-is
- In iccattut:
- make a "translation map" of /etc/interchange/* to RPM-equivs.
1.45 +9 -19 xmldocs/bin/refs-autogen
rev 1.45, prev_rev 1.44
Index: refs-autogen
===================================================================
RCS file: /var/cvs/xmldocs/bin/refs-autogen,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- refs-autogen 9 Oct 2004 14:32:40 -0000 1.44
+++ refs-autogen 12 Oct 2004 09:41:24 -0000 1.45
@@ -238,12 +238,13 @@
my ( $cstart, $cend, $ctxmeta ) = ("", "", "");
#if (0) { use Data::Dumper; print Dumper $ctx; sleep 10; }
+ # WE SHOW ONLY PART OF CONTEXT FOR THOSE
+ $ctxmeta = "<sbr/>Line $ln";
if ( $gkey !~ /(tag|conf)$/ ) {
- # WE SHOW ONLY PART OF CONTEXT FOR THOSE
$cstart = $$ctx{lnum}-$$ctx{ctxpre};
$cend = $$ctx{lnum}+$$ctx{ctxpost};
- $ctxmeta = "<sbr/>Line $$ctx{lnum} (context shows lines " .
- ( $cstart . "-" . $cend );
+ $ctxmeta .= " (context shows lines " . ( $cstart . "-" . $cend );
+
} else {
# WE SHOW ALL FOR THOSE
$cstart = 1;
@@ -262,12 +263,16 @@
}
my $r = $hash{revision}{$plf}->[0];
my $d = $hash{revision}{$plf}->[1];
+ my $revinfo = "";
+ if ( $gkey !~ /conf$/ ) {
+ $revinfo = "(rev. $r from $d)";
+ }
{ no warnings; # XXX If someone can figure out which of the used vars here is undefined...
$$ag{source} .= <<ENDD;
<para>
</para>
<example>
-<title>$loc (rev. $r from $d)$ctxmeta</title>
+<title>$loc $revinfo$ctxmeta</title>
<screen linenumbering='numbered' startinglinenumber='$ls'>
<![CDATA[$ctxsdata]]>
@@ -903,13 +908,6 @@
<para>$ag{"description"}</para>
</refsect1>
-<!-- Disabled. I could remove it unless I do something useful with it.
-<refsect1 id='$ag{"name"}_structure"}'>
-<title>TAG STRUCTURE</title>
-<para>$ag{"structure"}</para>
-</refsect1>
--->
-
<refsect1 id='$ag{"name"}_examples'>
<title>EXAMPLES</title>
$ag{"example"}
@@ -938,14 +936,6 @@
<title>AUTHORS</title>
<para>$ag{"author"}</para>
</refsect1>
-
-<!-- Removed because copyright is seen in Source (first few lines),
- and the generated document starts with copyright notice
-<refsect1 id='$ag{"name"}_copyright'>
-<title>COPYRIGHT</title>
-$ag{"copyright"}
-</refsect1>
--->
<refsect1 id='$ag{"name"}_seeAlso'>
<title>SEE ALSO</title>
1.24 +15 -9 xmldocs/bin/stattree
rev 1.24, prev_rev 1.23
Index: stattree
===================================================================
RCS file: /var/cvs/xmldocs/bin/stattree,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- stattree 9 Oct 2004 11:41:34 -0000 1.23
+++ stattree 12 Oct 2004 09:41:24 -0000 1.24
@@ -218,7 +218,7 @@
# Open text file, parse contents
open IN, "< $file" or die "Can't open $file ($!)\n";
my @filedata = <IN>;
- unshift @filedata, ""; # Match index numbers with line numbers
+ unshift @filedata, ""; # Match index numbers with line numbers # MINUS
close IN;
# Global variables to use in the loop below
@@ -362,7 +362,7 @@
last;
}
- } # END IF
+ } # END FOR each line
# Now in addition to above general line-by-line processing, do some more
# processing on exactly *some* files:
@@ -503,7 +503,8 @@
my %c = %{ (shift) };
my $content = shift; # Complete lib/Vend/Config.pm file
- my $linenr = 0; # Increases as we parse Config.pm
+ my $linenr = -1; # Increases as we parse Config.pm (search "MINUS" above)
+ my $startline; # Remember first line nr. of context, not last
my $context = ""; # Globconf (global) or catconf (catalog) config array
my $run = 0; # Engine turned on?
my $multiline; # Directive definition spans multiple lines?
@@ -517,6 +518,7 @@
$linenr++;
goto MULTILINE if $multiline;
+ $startline = $linenr;
# Determine context
if ( $line =~ /^sub\s+global_directives\s+{\s*$/ ) {
@@ -556,10 +558,10 @@
# Register the directive and do some statistics
if ( $context eq 'globconf' ) {
- push @globconf, $directive ;
+ push @globconf, [ $directive, $startline ] ;
$hash{total}{globconfs}++;
} elsif ( $context eq 'catconf' ){
- push @catconf, $directive;
+ push @catconf, [ $directive, $startline ];
$hash{total}{catconfs}++;
}
$hash{total}{confs}++;
@@ -582,18 +584,22 @@
# Well, let's congratulate ourselves.
- for my $ln (@globconf) {
+ for my $itm (@globconf) {
+ my ($ln, $lnum) = @$itm;
$ln =~ /^\s*\['(\S+?)'/ or die "Can't match global directive name in '$ln'?\n";
push @{ $hash{symbols}{globconf}{$1} }, {
%c,
- ctx => [ split /\n/, $ln ],
+ lnum => $lnum,
+ ctx => [ format_ctx(split(/\n/, $ln)) ],
}
}
- for my $ln (@catconf) {
+ for my $itm (@catconf) {
+ my ($ln, $lnum) = @$itm;
$ln =~ /^\s*\['(\S+?)'/ or die "Can't match catalog directive name in '$ln'?\n";
push @{ $hash{symbols}{catconf}{$1} }, {
%c,
- ctx => [ split /\n/, $ln ],
+ lnum => $lnum,
+ ctx => [ format_ctx(split(/\n/, $ln)) ],
}
}
}
More information about the docs
mailing list