X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fcgi%2Fmkindexcic.pl;h=a31f5ecfb08d2316e919fd37df760e0016c99950;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=6f816d3271a660d4d28348ce8eae36cd5ffbf530;hpb=d122e00855f9f44ac0d268e96cbe7b3dccd04db1;p=helm.git diff --git a/helm/cgi/mkindexcic.pl b/helm/cgi/mkindexcic.pl index 6f816d327..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 { @@ -98,7 +92,7 @@ Content-type: text/html Index of $uri -