diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2015-03-18 01:44:48 -0400 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-03-18 13:48:36 +0100 |
commit | 28de58504ecb0e8651741a1a55943108b56048bd (patch) | |
tree | 7717c51f2742433a5ada9d3dd5dbf11f96c7338e | |
parent | 7e16aa936f148235882a651c9800adde1aa3775d (diff) | |
download | curl-28de58504ecb0e8651741a1a55943108b56048bd.tar.gz |
mkhelp: Remove trailing carriage return from every line of input
- Get rid of this flood of warnings in Windows mingw build:
warning: missing terminating " character
The warning is due to the carriage return. When msysgit checks out files
from the repo by default it converts the line endings to CRLF. Prior to
this change when mkhelp.pl processed the MANUAL and curl.1 in CRLF
format the trailing carriage returns caused unnecessary CR in the
output.
-rw-r--r-- | src/mkhelp.pl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mkhelp.pl b/src/mkhelp.pl index 7ed86f7cd..088a09a06 100644 --- a/src/mkhelp.pl +++ b/src/mkhelp.pl @@ -54,6 +54,9 @@ while (<STDIN>) { # this should be removed: $line =~ s/(.|_)//g; + # remove trailing CR from line. msysgit checks out files as line+CRLF + $line =~ s/\r$//; + if($line =~ /^([ \t]*\n|curl)/i) { # cut off headers and empty lines $wline++; # count number of cut off lines @@ -90,7 +93,12 @@ open(READ, "<$README") || die "couldn't read the README infile $README"; while(<READ>) { - push @out, $_; + my $line = $_; + + # remove trailing CR from line. msysgit checks out files as line+CRLF + $line =~ s/\r$//; + + push @out, $line; } close(READ); |