checksrc: Windows-specific input fixes

lib/config-win32ce.h
- Fix whitespace for checksrc compliance.

lib/checksrc.pl
- Remove trailing carriage returns from input.

projects/checksrc.bat
- Ignore tool_hugehelp.c.
This commit is contained in:
Jay Satiro 2015-03-30 16:22:58 -04:00 committed by Daniel Stenberg
parent 5b66860652
commit 6419aee248
3 changed files with 6 additions and 5 deletions

View File

@ -30,14 +30,15 @@ my $supressed; # whitelisted problems
my $file; my $file;
my $dir="."; my $dir=".";
my $wlist; my $wlist;
my $windows_os = $^O eq 'MSWin32' || $^O eq 'msys' || $^O eq 'cygwin';
my %whitelist; my %whitelist;
sub readwhitelist { sub readwhitelist {
open(W, "<$dir/checksrc.whitelist"); open(W, "<$dir/checksrc.whitelist");
my @all=<W>; my @all=<W>;
for(@all) { for(@all) {
chomp; $windows_os ? $_ =~ s/\r?\n$// : chomp;
$whitelist{$_}=1; $whitelist{$_}=1;
} }
close(W); close(W);
@ -120,7 +121,7 @@ sub scanfile {
my $copyright=0; my $copyright=0;
while(<R>) { while(<R>) {
chomp; $windows_os ? $_ =~ s/\r?\n$// : chomp;
my $l = $_; my $l = $_;
my $column = 0; my $column = 0;

View File

@ -443,6 +443,6 @@
#define ENOMEM 2 #define ENOMEM 2
#define EAGAIN 3 #define EAGAIN 3
extern int stat(const char *path,struct stat *buffer ); extern int stat(const char *path, struct stat *buffer);
#endif /* HEADER_CURL_CONFIG_WIN32CE_H */ #endif /* HEADER_CURL_CONFIG_WIN32CE_H */

View File

@ -46,7 +46,7 @@ rem ***************************************************************************
if not exist "%SRC_DIR%" goto nosrc if not exist "%SRC_DIR%" goto nosrc
:start :start
for /f "delims=" %%i in ('dir %SRC_DIR%\src\*.c.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\src "%%i" for /f "delims=" %%i in ('dir %SRC_DIR%\src\*.c.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\src -Wtool_hugehelp.c "%%i"
for /f "delims=" %%i in ('dir %SRC_DIR%\src\*.h.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\src "%%i" for /f "delims=" %%i in ('dir %SRC_DIR%\src\*.h.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\src "%%i"
for /f "delims=" %%i in ('dir %SRC_DIR%\lib\*.c.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\lib "%%i" for /f "delims=" %%i in ('dir %SRC_DIR%\lib\*.c.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\lib "%%i"
for /f "delims=" %%i in ('dir %SRC_DIR%\lib\*.h.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\lib -Wcurl_config.h.cmake "%%i" for /f "delims=" %%i in ('dir %SRC_DIR%\lib\*.h.* /b') do @perl %SRC_DIR%\lib\checksrc.pl -D%SRC_DIR%\lib -Wcurl_config.h.cmake "%%i"