diff options
author | Christopher Faylor <me@cgf.cx> | 2009-06-28 18:23:35 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2009-06-28 18:23:35 +0000 |
commit | 91000b5d66688fe62926edc72a00f00c9cda30ab (patch) | |
tree | ab91f851af48612503d3ac3e46353508bcce27b8 /winsup/cygwin/gendef | |
parent | d0880d6200dc27d472c5151020f48078aae552a5 (diff) | |
download | cygnal-91000b5d66688fe62926edc72a00f00c9cda30ab.tar.gz cygnal-91000b5d66688fe62926edc72a00f00c9cda30ab.tar.bz2 cygnal-91000b5d66688fe62926edc72a00f00c9cda30ab.zip |
* gendef (cleanup): Rename from 'nocr'. Remove comments and trailing spaces.
* cygwin.din: Add long-needed comment describing what dll_crt0__FP11per_process
demangles to.
Diffstat (limited to 'winsup/cygwin/gendef')
-rwxr-xr-x | winsup/cygwin/gendef | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef index 7c17a11ee..9c17010b4 100755 --- a/winsup/cygwin/gendef +++ b/winsup/cygwin/gendef @@ -8,7 +8,8 @@ # details. # use strict; -sub nocr(@); +sub cleanup(@); + my $in = shift; my $tls_offsets = shift; my $out = shift; @@ -24,11 +25,11 @@ require $tls_offsets; open(IN, $in) or die "$0: couldn't open \"$in\" - $!\n"; my @top = (); while (<IN>) { - push(@top, nocr $_); + push(@top, cleanup $_); last if /^\s*exports\s*$/i; } -my $libline = nocr scalar(<IN>); -my @in = nocr <IN>; +my $libline = cleanup scalar(<IN>); +my @in = cleanup <IN>; close(IN); my %sigfe = (); @@ -456,6 +457,8 @@ _longjmp: EOF } -sub nocr(@) { +sub cleanup(@) { map {s/\r//g; $_} @_; + map {s/#.*//g; $_} @_; + map {s/[ \t]+$//g; $_} @_; } |