* gendef: Tighten up whitespace detection.
This commit is contained in:
parent
0427598641
commit
588b40e260
|
@ -1,3 +1,7 @@
|
||||||
|
2012-08-15 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||||
|
|
||||||
|
* gendef: Tighten up whitespace detection.
|
||||||
|
|
||||||
2012-08-15 Christopher Faylor <me.cygwin2012@cgf.cx>
|
2012-08-15 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||||
|
|
||||||
* gendef: Delete unneeded read from <IN> which ate an arbitrary line
|
* gendef: Delete unneeded read from <IN> which ate an arbitrary line
|
||||||
|
|
|
@ -26,7 +26,7 @@ open(IN, $in) or die "$0: couldn't open \"$in\" - $!\n";
|
||||||
my @top = ();
|
my @top = ();
|
||||||
while (<IN>) {
|
while (<IN>) {
|
||||||
push(@top, cleanup $_);
|
push(@top, cleanup $_);
|
||||||
last if /^\s*exports\s*$/i;
|
last if /^\s*exports$/i;
|
||||||
}
|
}
|
||||||
my @in = cleanup <IN>;
|
my @in = cleanup <IN>;
|
||||||
close(IN);
|
close(IN);
|
||||||
|
@ -37,14 +37,14 @@ my @nosigfuncs = ();
|
||||||
my @text = ();
|
my @text = ();
|
||||||
for (@in) {
|
for (@in) {
|
||||||
chomp;
|
chomp;
|
||||||
s/\sDATA$//o and do {
|
s/\s+DATA$//o and do {
|
||||||
push @data, $_;
|
push @data, $_;
|
||||||
next;
|
next;
|
||||||
};
|
};
|
||||||
if (/=/o) {
|
if (/=/o) {
|
||||||
if (s/\s+NOSIGFE\s*$//) {
|
if (s/\s+NOSIGFE\s*$//) {
|
||||||
# nothing
|
# nothing
|
||||||
} elsif (s/ SIGFE(_MAYBE)?$//) {
|
} elsif (s/\s+SIGFE(_MAYBE)?$//) {
|
||||||
my $func = (split(' '))[2];
|
my $func = (split(' '))[2];
|
||||||
my $maybe = lc $1 . '_';
|
my $maybe = lc $1 . '_';
|
||||||
$sigfe{$func} = '_sigfe' . $maybe . $func;
|
$sigfe{$func} = '_sigfe' . $maybe . $func;
|
||||||
|
@ -67,7 +67,7 @@ for (@in) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (@text) {
|
for (@text) {
|
||||||
my ($alias, $func) = /^(\S+) = (\S+)\s*$/o;
|
my ($alias, $func) = /^(\S+)\s+=\s+(\S+)\s*$/o;
|
||||||
$_ = $alias . ' = ' . $sigfe{$func}
|
$_ = $alias . ' = ' . $sigfe{$func}
|
||||||
if defined($func) && $sigfe{$func};
|
if defined($func) && $sigfe{$func};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue