aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2008-01-24 18:18:28 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2008-01-24 18:18:28 +0000
commitbb660328014c8ed8ecd299c288b19b12233a5449 (patch)
treef040543141f7b62baf4ad86effa2fc4fe863ceb0 /tools
parentf16a56346668bb2a810dde2a0d105cdb93bcf993 (diff)
Add check for non-ASCII characters (defined, for now, as any whose value is > 0x80) anywhere in the source files (as per discussion on -dev). Amazingly, this does not appear to slow the tool down too much.
svn path=/trunk/; revision=24177
Diffstat (limited to 'tools')
-rwxr-xr-xtools/checkAPIs.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/checkAPIs.pl b/tools/checkAPIs.pl
index a1fedb61da..9fab2dd9ff 100755
--- a/tools/checkAPIs.pl
+++ b/tools/checkAPIs.pl
@@ -160,6 +160,12 @@ while ($_ = $ARGV[0])
# Read in the file (ouch, but it's easier that way)
my $fileContents = `cat $filename`;
+ if ($fileContents =~ m{[\x80-\xFF]})
+ {
+ print "Error: found non-ASCII characters in " .$filename."\n";
+ $errorCount++;
+ }
+
# Remove all the C-comments and strings
$fileContents =~ s {$commentAndStringRegex} []g;