X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fcgi%2Fmkindexcic.pl;h=a31f5ecfb08d2316e919fd37df760e0016c99950;hb=97c2d258a5c524eb5c4b85208899d80751a2c82f;hp=0033a512ae210a7ec954e1f9f4478958df1f3b3f;hpb=f79d66d3f1e28269afdeab16b78b21f7cecdbd65;p=helm.git diff --git a/helm/cgi/mkindexcic.pl b/helm/cgi/mkindexcic.pl index 0033a512a..a31f5ecfb 100755 --- a/helm/cgi/mkindexcic.pl +++ b/helm/cgi/mkindexcic.pl @@ -20,13 +20,14 @@ use CGI; my $cgi = new CGI($ENV{"REQUEST_URL"}); $uri = $cgi->param('cicuri'); +$getterURL = $cgi->param('getterURL'); $uri =~ s/(.*)\/$/$1/; # Remove a final slash if present $uri .= "/"; # Put a final slash $myurl = $cgi->url(); $cont = ""; # modified by side-effect by &callback my $ua = LWP::UserAgent->new; -my $request = HTTP::Request->new(GET => $getter_url."ls?format=txt&baseuri=".$uri); +my $request = HTTP::Request->new(GET => $getterURL."ls?format=txt&baseuri=".$uri); my $response = $ua->request($request, \&callback); @filenames = split(/\n/, $cont); @@ -38,38 +39,31 @@ if ($uri ne "cic:/") { $output = < [BACK] -Parent Directory +Parent Directory EOT } foreach $i (@filenames) { - my ($type,$name) = split(/,/, $i); + my ($type,$name,$flags) = split(/, /, $i); + my ($flagscic, $flagstypes) = split(/,/, $flags); + $flagscic =~ s/^<(.*)/$1/; + $flagstypes =~ s/(.*)>$/$1/; if ($type eq "dir") { $output .= < [DIR] -$name +$name EOT } elsif ($type eq "object") { - if ($name =~ /\.(con|var|ind)(\.types)?$/) { + if ($name =~ /\.(con|var|ind)$/) { # cic file $output .= < [DIR] -$name - -EOT - } elsif ($name =~ /\.(con|var|ind)\.ann$/) { - my $name_without_ann = $name; - $name_without_ann_and_xml =~ s/(.*)\.ann/$1/; - # cic file - $output .= < -[DIR] -$name +$name EOT } else {