Skip to content

Commit

Permalink
checksrc: Windows-specific input fixes
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jay authored and bagder committed Mar 30, 2015
1 parent 5b66860 commit 6419aee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions lib/checksrc.pl
Expand Up @@ -30,14 +30,15 @@
my $file;
my $dir=".";
my $wlist;
my $windows_os = $^O eq 'MSWin32' || $^O eq 'msys' || $^O eq 'cygwin';

my %whitelist;

sub readwhitelist {
open(W, "<$dir/checksrc.whitelist");
my @all=<W>;
for(@all) {
chomp;
for(@all) {
$windows_os ? $_ =~ s/\r?\n$// : chomp;
$whitelist{$_}=1;
}
close(W);
Expand Down Expand Up @@ -120,7 +121,7 @@ sub scanfile {
my $copyright=0;

while(<R>) {
chomp;
$windows_os ? $_ =~ s/\r?\n$// : chomp;
my $l = $_;
my $column = 0;

Expand Down
2 changes: 1 addition & 1 deletion lib/config-win32ce.h
Expand Up @@ -443,6 +443,6 @@
#define ENOMEM 2
#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 */
2 changes: 1 addition & 1 deletion projects/checksrc.bat
Expand Up @@ -46,7 +46,7 @@ rem ***************************************************************************
if not exist "%SRC_DIR%" goto nosrc

: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%\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"
Expand Down

0 comments on commit 6419aee

Please sign in to comment.