+2005-07-27 Christopher Faylor <cgf@timesys.com>
+
+ * gendef: Use nocr to remove \r's from input.
+ gendef (nocr): New function.
+
2005-07-27 Christopher Faylor <cgf@timesys.com>
* fhandler_clipboard.cc (fhandler_dev_clipboard::close): Set membuffer
#!/usr/bin/perl
use strict;
+sub nocr(@);
my $in = shift;
my $tls_offsets = shift;
my $out = shift;
open(IN, $in) or die "$0: couldn't open \"$in\" - $!\n";
my @top = ();
while (<IN>) {
- push(@top, $_);
+ push(@top, nocr $_);
last if /^\s*exports\s*$/i;
}
-my $libline = <IN>;
-my @in = <IN>;
+my $libline = nocr scalar(<IN>);
+my @in = nocr <IN>;
close(IN);
my %sigfe = ();
ret
EOF
}
+
+sub nocr(@) {
+ map {s/\r//g; $_} @_;
+}