head 1.1; branch 1.1.1; access ; symbols start:1.1.1.1 vendor:1.1.1; locks ; strict; comment @# @; 1.1 date 2004.04.10.16.02.50; author tarookumichi; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2004.04.10.16.02.50; author tarookumichi; state Exp; branches ; next ; desc @@ 1.1 log @Initial revision @ text @sub d6_createheader { my ($filename,$headerfile) = @@_; my @@ar = @@d3_files; my $html = ""; my $body = d3_readfile($headerfile,0); my ($fl_title,$fl_html); my @@cur = (); my @@next = (); my $id = 1; $fl_html = "
";
    foreach(sort (@@ar)) {
	s/[\s\n\r]//g;
	if (not($_ eq "")) {
	    my @@c = @@cur;
	    my $p = "";
	    my $pdir = "";
	    my $fnn_fry = d3_gethtmlname($_);
	    @@next = split("[\\/]",$fnn_fry);
	    my $fnn = $next[$#next];
	    @@next = split("[\\/]",$fnn_fry);
	    splice(@@next,$#next,1);
	    @@cur = @@next;
	    while ($#next != -1 && $#c != -1) {
		if ($next[0] eq $c[0]) { 
		    $p .= "|";
		    splice(@@next,0,1);
		    splice(@@c,0,1);
		    $pdir .= "/".$next[0];
		} else { last; }
	    } 
	    while ($#c>=0) {
		$fl_html .= "";	
		splice(@@c,0,1);
	    }
	    while ($#next>=0) {
		#visibility:hidden; 
		$fl_html .= "\"close\"$next[0]
"; splice(@@cur,0,1); } $fl_html .= "
"; # $fl_title = "   Filelist:
"; # $fl_title = $d5_divstart."$fl_title
"; # $fl_title =~ s/%id%/$d2_id/g; # $fl_html = $fl_title.$fl_html.$d5_divend; $d2_id++; $body = d3_template_replace($body); $body =~ s/%filelist%/$html/; $html = $body.$fl_html; return $html; } sub d6_createusage { my ($compbody) = @@_; my @@ar = @@d3_files; my ($usagereg,$pos,$fn,$cfn,$pfn,$body); my $reg = "($id)\\.vhd\$"; my (@@usage,$htmlname,$vhdlname); %d3_usedby_set = (); foreach(@@ar) { $pfn = $_; if (/$reg/) { $cfn = $1; $usagereg = "use".$sp."work".$sp."\\.".$sp."$cfn".$sp."\\.".$sp."all".$sp.";"; if ($dbgon == 1) { print ("Creating usage for $cfn: $usagereg\n"); } $pos = 0; $body = $compbody; @@usage = (); while (length($body) != 0) { ($body,@@match) = d2_scannext($body,$usagereg); if ($#match != -1) { $fn = d3_filename($pos + $match[6]); if ($dbgon == 1) { print ("Found using file:$fn\n"); } push (@@usage,$fn); $pos = $pos + $match[6] + $match[0]; } } $html = ""; foreach(@@usage) { $vhdlname = $_; $htmlname = d3_gethtmlname($vhdlname); $html .= "used by $_\n
"; } $vhdlname = $pfn; $htmlname = d3_gethtmlname($vhdlname); $d3_pathreplace{"%$d3_pathreplaceid%"} = $htmlname; $title = "   File $vhdlname "; $title = $d5_divstart."$title
"; $title =~ s/%id%/$d2_id/g; $d3_pathreplaceid++; $html = $title.$html.$d5_divend; %tmp = ( id => $d2_id++, html => $html ); $d3_usedby_set{$cfn} = [%tmp]; } } } 1; @ 1.1.1.1 log @Core library @ text @@