summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Schlueter <jschlueter@navigationsolutions.com>2015-02-13 09:29:31 -0500
committerJon Schlueter <jschlueter@navigationsolutions.com>2015-02-13 09:29:31 -0500
commitb355c9f8e6f8283f26b0636f5f44f0563e5c8adb (patch)
treea732162e7cea055beb3a388aa3c9888268941379
parent97d1010ef776571688dd1026092c86f1222f6085 (diff)
downloadgpsd-b355c9f8e6f8283f26b0636f5f44f0563e5c8adb.tar.gz
pep8 maskaudit.py.in whitespace cleanup
-rw-r--r--maskaudit.py.in27
1 files changed, 17 insertions, 10 deletions
diff --git a/maskaudit.py.in b/maskaudit.py.in
index 855ffe97..31be05ac 100644
--- a/maskaudit.py.in
+++ b/maskaudit.py.in
@@ -21,7 +21,14 @@ class SourceExtractor:
def __init__(self, sourcefile, clientside):
self.sourcefile = sourcefile
self.clientside = clientside
- self.daemonfiles = ["gpsd.c", "libgpsd_core.c", "pseudonmea.c", "drivers.c"] + glob.glob("driver_*.c") + ["gpsmon.c", "subframe.c"] + glob.glob("monitor_*.c")
+ self.daemonfiles = [
+ "gpsd.c",
+ "libgpsd_core.c",
+ "pseudonmea.c",
+ "drivers.c",
+ "gpsmon.c",
+ "subframe.c"
+ ] + glob.glob("driver_*.c") + glob.glob("monitor_*.c")
self.masks = []
self.primitive_masks = []
for line in file(self.sourcefile):
@@ -109,28 +116,28 @@ const char *gps_maskdump(gps_mask_t set)
{
static char buf[%d];
const struct {
- gps_mask_t mask;
- const char *name;
- } *sp, names[] = {""" % (maxout + 3,)
+ gps_mask_t mask;
+ const char *name;
+ } *sp, names[] = {""" % (maxout + 3,)
for (flag, value) in clientside.primitive_masks + daemonside.primitive_masks:
stem = flag
if stem.endswith("_SET"):
stem = stem[:-4]
if stem.endswith("_IS"):
stem = stem[:-3]
- print "\t{%s,\t\"%s\"}," % (flag, stem)
+ print " {%s,\t\"%s\"}," % (flag, stem)
print '''\
};
memset(buf, '\\0', sizeof(buf));
buf[0] = '{';
for (sp = names; sp < names + sizeof(names)/sizeof(names[0]); sp++)
- if ((set & sp->mask)!=0) {
- (void)strlcat(buf, sp->name, sizeof(buf));
- (void)strlcat(buf, "|", sizeof(buf));
- }
+ if ((set & sp->mask)!=0) {
+ (void)strlcat(buf, sp->name, sizeof(buf));
+ (void)strlcat(buf, "|", sizeof(buf));
+ }
if (buf[1] != \'\\0\')
- buf[strlen(buf)-1] = \'\\0\';
+ buf[strlen(buf)-1] = \'\\0\';
(void)strlcat(buf, "}", sizeof(buf));
return buf;
}