summaryrefslogtreecommitdiff
path: root/one-off
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-06-28 06:09:44 -0700
committerPeter Wu <peter@lekensteyn.nl>2015-06-28 06:09:44 -0700
commit3c6128ee266024d164650955f93c7740484abd68 (patch)
tree345dbf77bcd7464fee70689a5ed9f7bf6e9823d7 /one-off
parent4d11f07180d9c115eb14bd860e9a47d82d3d1dcd (diff)
downloadwireshark-notes-3c6128ee266024d164650955f93c7740484abd68.tar.gz
cleanup: modify unknown lines and append FIXMEs
Affects 13 dissectors.
Diffstat (limited to 'one-off')
-rwxr-xr-xone-off/cleanup-rewrite.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/one-off/cleanup-rewrite.py b/one-off/cleanup-rewrite.py
index 6853bbe..608109c 100755
--- a/one-off/cleanup-rewrite.py
+++ b/one-off/cleanup-rewrite.py
@@ -45,6 +45,10 @@
import sys, re, logging
_logger = logging.getLogger(__name__)
+# Set to True to allow more code to be modified.
+# Unknown lines will be suffixed with a " // FIXME" comment.
+AUDIT = False
+
# For quick sanity checking (funcName, is_prototype)
RE_FUNCTION_HEADER = re.compile(
r'''
@@ -175,7 +179,10 @@ class Function(object):
handled = True
if not handled:
- self.unknown_lines += line
+ if AUDIT:
+ self.lines_keep += line.replace('\n', ' // FIXME\n')
+ else:
+ self.unknown_lines += line
if self.unknown_lines:
_logger.error('Unknown lines in %s:\n%s',