/);
next if (/^$/);
if (/Source Search Path:/) {
$mode = 's';
}
elsif (/Object Search Path:/) {
$mode = 'o';
}
elsif ($mode eq 's') {
push (@src_dir, $_);
}
elsif ($mode eq 'o') {
push (@obj_dir, $_);
}
}
close (PIPE);
}
else
{
push (@src_dir, "./");
push (@obj_dir, "./");
}
foreach (@list_files) {
local ($dir) = $_;
$dir =~ s/\/([^\/]+)$//;
push (@src_dir, $dir. '/');
push (@obj_dir, $dir. '/');
}
### Defines and compiles the Ada key words :
local (@Ada_keywords) = ('abort', 'abs', 'accept', 'access', 'all', 'and',
'array', 'at', 'begin', 'body', 'case', 'constant',
'declare', 'delay', 'delta', 'digits', 'do', 'else',
'elsif', 'end', 'entry', 'exception', 'exit', 'for',
'function', 'generic', 'goto', 'if', 'in', 'is',
'limited', 'loop', 'mod', 'new', 'not', 'null', 'of',
'or', 'others', 'out', 'package', 'pragma', 'private',
'procedure', 'raise', 'range', 'record', 'rem',
'renames', 'return', 'reverse', 'select', 'separate',
'subtype', 'task', 'terminate', 'then', 'type',
'until', 'use', 'when', 'while', 'with', 'xor');
local (@Ada95_keywords) = ('abstract', 'aliased', 'protected', 'requeue',
'tagged');
local (%keywords) = ();
grep (++ $keywords{$_}, @Ada_keywords);
grep (++ $keywords{$_}, @Ada95_keywords) unless ($ada83_mode);
### Symbols declarations for the current file
### format is (line_column => 1, ...)
local (%symbols);
### Symbols usage for the current file
### format is ($adafile#$line_$column => $htmlfile#$linedecl_$columndecl, ...)
local (%symbols_used);
### the global index of all symbols
### format is ($name => [[file, line, column], [file, line, column], ...])
local (%global_index);
#########
## This function create the header of every html file.
## These header is returned as a string
## Params: - Name of the Ada file associated with this html file
#########
sub create_header
{
local ($adafile) = shift;
local ($string) = "$adafile
\n";
if ($adafile ne "")
{
$string .= "
File : $adafile "
. "
\n";
}
return $string;
}
#########
## Protect a string (or character) from the Html parser
## Params: - the string to protect
## Out: - the protected string
#########
sub protect_string
{
local ($string) = shift;
$string =~ s/&/&/g;
$string =~ s/</g;
$string =~ s/>/>/g;
return $string;
}
#########
## This function creates the footer of the html file
## The footer is returned as a string
## Params : - Name of the Ada file associated with this html file
#########
sub create_footer
{
local ($adafile) = shift;
local ($string) = "";
$string = "
" if ($adafile ne "");
return $string . "