[docs] xmldocs - docelic modified 12 files

docs at icdevgroup.org docs at icdevgroup.org
Tue Jul 13 07:59:01 EDT 2004


User:      docelic
Date:      2004-07-13 11:58:59 GMT
Modified:  .        Makefile
Modified:  bin      mkreport stattree
Modified:  cache/cvs-head .cache.bin
Modified:  docbook  catalog.xml
Removed:   images/.xvpics end-example.png end-example.xcf example.png
Removed:            example.xcf example2.png example2.xcf icon_ic2.png
Log:
- Makefile:
  - is now silent.
  - added Jon's suggestion (-f to clean target)

- bin/stattree:
  - the second line of output (filename:linenr) for each symbol found
    in the source (pragmas and global vars for now), now has one field
    more: " x:y", where x is context_prev, y is content_next.
    (then what follows is x+1+y lines of context where the symbol
    appears).
  - files parsing routine was enhanced (to be able to get context info,
    but it's generally better too).

- Wrongly added images/.xvpics directory was removed

Revision  Changes    Path
1.4       +4 -3      xmldocs/Makefile


rev 1.4, prev_rev 1.3
Index: Makefile
===================================================================
RCS file: /var/cvs/xmldocs/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Makefile	12 Jul 2004 10:20:03 -0000	1.3
+++ Makefile	13 Jul 2004 11:58:57 -0000	1.4
@@ -13,6 +13,7 @@
 XSLT = xsltproc
 XSLT_FLAGS = --xinclude
 IC_VERSIONS = cvs-head
+.SILENT:
 
 VPATH = guides
 
@@ -174,10 +175,10 @@
 #
 #
 distclean clean:
-	-rm -r $(OUTPUT)
-	-rm $(DOCBOOKDIR)/*.db
+	-rm -rf $(OUTPUT)
+	-rm -f $(DOCBOOKDIR)/*.db
 	-for p in $(IC_VERSIONS); do \
-		  rm $(CACHE)/$$p/* \
+	  rm -f $(CACHE)/$$p/* \
 	; done
 
 final:



1.4       +4 -1      xmldocs/bin/mkreport


rev 1.4, prev_rev 1.3
Index: mkreport
===================================================================
RCS file: /var/cvs/xmldocs/bin/mkreport,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mkreport	12 Jul 2004 17:37:59 -0000	1.3
+++ mkreport	13 Jul 2004 11:58:58 -0000	1.4
@@ -79,6 +79,7 @@
 
 ");
 close (OUT);
+select STDOUT;
 
 for my $p (qw/pragma globvar/) {
 	my $tfile = '';
@@ -90,7 +91,9 @@
 		$tfile .= "$k\n";
 			for my $fe ( @$v ) {
 				local $" = ":";
-				$tfile .= "\t@$fe\n";
+				$tfile .= "\t@$fe[0,1] $$fe[2]\n";
+				local $" = "\t\t";
+				$tfile .= "\t\t@{@$fe[3]}\n";
 			}
 	}
 	open(OUT, "> $reportdir/$i{ver}/symbols.$p") or



1.4       +16 -9     xmldocs/bin/stattree


rev 1.4, prev_rev 1.3
Index: stattree
===================================================================
RCS file: /var/cvs/xmldocs/bin/stattree,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- stattree	12 Jul 2004 17:37:59 -0000	1.3
+++ stattree	13 Jul 2004 11:58:58 -0000	1.4
@@ -27,6 +27,8 @@
 my $cachedir = $ENV{CACHE} || "cache";
 my %hash;
 my $cpath = $ENV{PWD};
+my $ctx_p = 1; # How much context lines to show before
+my $ctx_n = 1; #                                after
 
 # All types should be listed here or the stats wont. It should be
 # reported if an unknown file is found in the archive
@@ -169,11 +171,12 @@
 
 	# Open text file, parse contents
 	open IN, "< $file" or die "Can't open $file ($!)\n";
+	my @file = <IN>;
+	unshift @file, ""; # Match indices with line numbers
+	close IN;
 
-	my $lnum = 0;
-	while (<IN>) {
-		my $line = $_; 
-		$lnum ++;
+	for (my $lnum = 1; $lnum < scalar @file; $lnum++) {
+		my $line = $file[$lnum];
 
 		$hash{tree}{$file}{lines}++ ;
 		$hash{total}{lines}++ ;
@@ -207,15 +210,21 @@
 				# Ph33r, PH33R my MaD R3G3X skiLLz! ;-)
 				# This matches $::Pragma->{} or $$::Pragma{}
 				if ( $line =~ /(()|\$())\$::Pragma(->\2|\3){(\w+?)}/ ) {
-					push @{ $hash{symbols}{pragma}{$5} }, [ $file, $lnum ];
+					push @{ $hash{symbols}{pragma}{$5} },
+						# TODO Here, and 2 places below: make sure if ctx is say, 5:5,
+						# it always shows that much (that is, workaround file beginning/
+						# file end problems).
+						[ $file, $lnum, "$ctx_p\:$ctx_n", [@file[$lnum-$ctx_p..$lnum+$ctx_n]] ];
 				}
 
 				# Diskover global variables
 				if ( $line =~ /(()|\$())\$Global::Variable(->\2|\3){(\w+?)}/ ) {
-					push @{ $hash{symbols}{globvar}{$5} }, [ $file, $lnum ];
+					push @{ $hash{symbols}{globvar}{$5} },
+						[ $file, $lnum, "$ctx_p\:$ctx_n", [@file[$lnum-$ctx_p..$lnum+$ctx_n]] ];
 				}
 				if ( $line =~ /\$Tag->var\s*\(\s*(["'])(\S+?)\1(\s*,\s*(\d))?/ ) {
-					push @{ $hash{symbols}{globvar}{$5} }, [ $file, $lnum ];
+					push @{ $hash{symbols}{globvar}{$5} },
+						[ $file, $lnum, "$ctx_p\:$ctx_n", [@file[$lnum-$ctx_p..$lnum+$ctx_n]] ];
 					warn "\$Tag->var syntax never used in .pl/.pm files by now.
 						I'll register that, but is it a mistake? ($2, $4)\n";
 				}
@@ -231,8 +240,6 @@
 		#   (adds 1 to both)
 
 	}
-
-	close IN;
 }
 
 # Storable dumper



1.4       +1361 -895 xmldocs/cache/cvs-head/.cache.bin


<<.cache.bin: data>>


1.2       +3 -0      xmldocs/docbook/catalog.xml


rev 1.2, prev_rev 1.1
Index: catalog.xml
===================================================================
RCS file: /var/cvs/xmldocs/docbook/catalog.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- catalog.xml	11 Jul 2004 21:06:33 -0000	1.1
+++ catalog.xml	13 Jul 2004 11:58:59 -0000	1.2
@@ -15,5 +15,8 @@
 	<system systemId="iccattut-chunks-targets"
 		uri="iccattut-chunks-targets.db" />
 
+	<system systemId="xmldocs.css"
+		uri="xmldocs.css" />
+
 </catalog>
 








More information about the docs mailing list