diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-02-03 08:30:32 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-02-03 08:30:32 -0500 |
commit | 9768030f8b1bdb9fc0cf641d6772573901ab5c68 (patch) | |
tree | 47b56724ad8c6656786b5599a0dff89f52490d46 /maskaudit.py.in | |
parent | 938d271e688decf266675c8b640a71ab967af4d5 (diff) | |
download | gpsd-9768030f8b1bdb9fc0cf641d6772573901ab5c68.tar.gz |
Fix a code-generation issue.
Diffstat (limited to 'maskaudit.py.in')
-rw-r--r-- | maskaudit.py.in | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/maskaudit.py.in b/maskaudit.py.in index e725e66e..508a784a 100644 --- a/maskaudit.py.in +++ b/maskaudit.py.in @@ -8,6 +8,8 @@ # With -c, generate C code to dump client-side masks for debugging purposes. # # With -d, generate C code to dump demon-side masks for debugging purposes. +# +# With -t, rtabulate usage of defines to find unused ones. Requires -c or -d. import sys, commands, glob, getopt @@ -16,14 +18,14 @@ class SourceExtractor: self.sourcefile = sourcefile self.suffix = suffix self.clientside = clientside - self.daemonfiles = ["gpsd.c", "libgpsd_core.c", "pseudonmea.c"] + glob.glob("driver_*.c") + ["gpsmon.c"] + glob.glob("monitor_*.c") + self.daemonfiles = ["gpsd.c", "libgpsd_core.c", "pseudonmea.c"] + glob.glob("driver_*.c") + ["gpsmon.c", "subframe.c"] + glob.glob("monitor_*.c") self.masks = [] self.primitive_masks = [] for line in file(self.sourcefile): if line.startswith("#define") and self.suffix in line: fields = line.split() self.masks.append((fields[1], fields[2])) - if fields[2].endswith("u"): + if fields[2].startswith("(1<<") or fields[2].startswith("((gps_mask_t)"): self.primitive_masks.append((fields[1], fields[2])) def in_library(self, flag): |