/usr/bin/sc-mkf77sym is in libsc-dev 2.3.1-18+deb9u1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | #
eval 'exec perl $0 $*'
if 0;
$method = 'symbol_';
$in = shift;
if ($in eq "-method") {
$method = shift;
$symbol = f77symbol($method, shift);
print "$symbol\n";
}
else {
$out = shift;
open(IN,"<$in");
open(OUT,">$out");
while(<IN>) {
if (/\# *define F77_([A-Z]+[A-Z0-9]+)/) {
$f77name = $1;
$cname = f77symbol($method, $f77name);
printf OUT "#define F77_%s %s\n", $f77name, $cname;
}
else {
printf OUT "%s", $_;
}
}
}
sub f77symbol {
my $method = shift;
my $f77name = shift;
my $cname;
if ($method eq "symbol_") {
$cname = lc($f77name);
$cname = "${cname}_";
}
elsif ($method eq "symbol") {
$cname = lc($f77name);
}
elsif ($method eq "SYMBOL") {
$cname = uc($f77name);
}
elsif ($method eq "SYMBOL_") {
$cname = uc($f77name);
$cname = "${cname}_";
}
return $cname;
}
|