diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-01-28 10:53:37 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-01-28 10:53:37 +0000 |
commit | abab41041d20fb5f577fecb50544eedd941d6abf (patch) | |
tree | d3add1084c18fd00f58e18780044925b4798d941 | |
parent | e55e6e7f456155a7484a265131c869454a04e9e0 (diff) | |
download | portage-abab41041d20fb5f577fecb50544eedd941d6abf.tar.gz portage-abab41041d20fb5f577fecb50544eedd941d6abf.tar.bz2 portage-abab41041d20fb5f577fecb50544eedd941d6abf.zip |
translate unicode quotes to ascii ones so we can keep our regex simple
svn path=/main/trunk/; revision=5804
-rwxr-xr-x | bin/check-implicit-pointer-usage.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/check-implicit-pointer-usage.py b/bin/check-implicit-pointer-usage.py index 948bc675e..1648dc53d 100755 --- a/bin/check-implicit-pointer-usage.py +++ b/bin/check-implicit-pointer-usage.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# coding: iso-8859-15 # Ripped from HP and updated from Debian # Update by Gentoo to support unicode output @@ -18,14 +17,14 @@ import re import sys implicit_pattern = re.compile("([^:]*):(\d+): warning: implicit declaration " - + "of function [`'‘]+([^'‘]*)['‘]") + + "of function `([^']*)'") pointer_pattern = re.compile( "([^:]*):(\d+): warning: " + "(" + "(assignment" + "|initialization" + "|return" - + "|passing arg \d+ of [`'‘][^'‘]*['‘]" + + "|passing arg \d+ of `[^']*'" + "|passing arg \d+ of pointer to function" + ") makes pointer from integer without a cast" + "|" @@ -38,6 +37,8 @@ while True: line = sys.stdin.readline() if line == '': break + # translate unicode open/close quotes to ascii ones + line = line.replace("\xE2\x80\x98", "`").replace("\xE2\x80\x99", "'") m = implicit_pattern.match(line) if m: last_implicit_filename = m.group(1) |