Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2009-06-28 22:23:35 +0400
committerChristopher Faylor <me@cgf.cx>2009-06-28 22:23:35 +0400
commit91000b5d66688fe62926edc72a00f00c9cda30ab (patch)
treeab91f851af48612503d3ac3e46353508bcce27b8 /winsup/cygwin/gendef
parentd0880d6200dc27d472c5151020f48078aae552a5 (diff)
* 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-xwinsup/cygwin/gendef13
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; $_} @_;
}