From: Tobias Leich Date: Wed, 11 Nov 2009 19:41:27 +0000 (+0100) Subject: skipping constants starting with underscore X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4d168ccc3cbbb48f988eab6cc2842b265c871f30;p=sdlgit%2FSDL_perl.git skipping constants starting with underscore --- diff --git a/scripts/auto_constants.pl b/scripts/auto_constants.pl index 280ed69..a998e00 100644 --- a/scripts/auto_constants.pl +++ b/scripts/auto_constants.pl @@ -17,10 +17,10 @@ foreach (@header) while() { # pattern: "#define SDL_RELEASED 0" (decimal) - printf("sub %s{ return %s; }\n", $1, $2) if($_ =~ /^#define\s+(\w+)\s+(\d+)\s*$/); + printf("sub %s{ return %s; }\n", $1, $2) if($_ =~ /^#define\s+([^_]\w+)\s+(\d+)\s*$/); # pattern: "#define SDL_RELEASED 0x1234" (hex) - printf("sub %s{ return %s; }\n", $1, $2) if($_ =~ /^#define\s+(\w+)\s+(0x\d+)\s*$/); + printf("sub %s{ return %s; }\n", $1, $2) if($_ =~ /^#define\s+([^_]\w+)\s+(0x\d+)\s*$/); } close FH; }