objects.pl revision 7c478bd95313f5f23a4c958a745db2134aa03244
$max_nid=0;
$o=0;
while(<NUMIN>)
{
chop;
$o++;
s/#.*$//;
next if /^\s*$/;
$_ = 'X'.$_;
$Cname =~ s/^X//;
}
close NUMIN;
$Cname="";
$o=0;
while (<IN>)
{
chop;
$o++;
if (/^!module\s+(.*)$/)
{
$module =~ s/\./_/g;
$module =~ s/-/_/g;
}
if (/^!global$/)
{ $module = ""; }
if (/^!Cname\s+(.*)$/)
{ $Cname = $1; }
if (/^!Alias\s+(.+?)\s+(.*)$/)
{
$myoid = $2;
$Cname =~ s/-/_/g;
$_ = "";
$Cname = "";
}
s/!.*$//;
s/#.*$//;
next if /^\s*$/;
$mysn =~ s/^\s*//;
$mysn =~ s/\s*$//;
$myln =~ s/^\s*//;
$myln =~ s/\s*$//;
$myoid =~ s/^\s*//;
$myoid =~ s/\s*$//;
if ($myoid ne "")
{
}
{
$Cname =~ s/\./_/g;
$Cname =~ s/-/_/g;
{ die "objects.txt:$o:There's already an object with long name ",$ln{$module.$Cname}," on line ",$order{$module.$Cname},"\n"; }
}
if ($Cname eq "")
{
$Cname =~ s/-/_/g;
{ die "objects.txt:$o:There's already an object with short name ",$sn{$module.$Cname}," on line ",$order{$module.$Cname},"\n"; }
}
if ($Cname eq "")
{
$Cname =~ s/-/_/g;
$Cname =~ s/\./_/g;
$Cname =~ s/ /_/g;
{ die "objects.txt:$o:There's already an object with long name ",$ln{$module.$Cname}," on line ",$order{$module.$Cname},"\n"; }
}
$Cname =~ s/\./_/g;
$Cname =~ s/-/_/g;
{
$max_nid++;
}
$Cname="";
}
close IN;
foreach (sort { $a <=> $b } keys %nidn)
{
}
close NUMOUT;
print OUT <<'EOF';
*/
*
*
*
*
* "This product includes cryptographic software written by
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
*
*
*/
#define SN_undef "UNDEF"
#define LN_undef "undefined"
#define NID_undef 0
#define OBJ_undef 0L
foreach (sort { $a <=> $b } keys %ordern)
{
print OUT "\n";
}
close OUT;
sub process_oid
{
local($oid)=@_;
local(@a,$oid_pref);
@a = split(/\s+/,$myoid);
$pref_oid = "";
$pref_sep = "";
if (!($a[0] =~ /^[0-9]+$/))
{
$a[0] =~ s/-/_/g;
if (!defined($obj{$a[0]}))
{ die "$ARGV[0]:$o:Undefined identifier ",$a[0],"\n"; }
$pref_sep = ",";
shift @a;
}
if ($oids ne "L")
{
}
else
{
}
return($oids);
}