summaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-10-02 07:17:07 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-10-02 07:17:07 -0400
commit1ed760cc7809c1610e943c6218cee9f296ad0e6d (patch)
treead806def1a645818022e374e2e86f8b40447e241 /devtools
parentc98351b9219091f207b0b126458dd57aea14f6d4 (diff)
downloadgpsd-1ed760cc7809c1610e943c6218cee9f296ad0e6d.tar.gz
Driver code generation for boolean fields.
Diffstat (limited to 'devtools')
-rwxr-xr-xdevtools/tablegen.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/devtools/tablegen.py b/devtools/tablegen.py
index cdad2633..779f6ed7 100755
--- a/devtools/tablegen.py
+++ b/devtools/tablegen.py
@@ -113,6 +113,8 @@ def make_driver_code(wfp):
(target, {'u':'U', 'e':'U', 'i':'S'}[ftype[0].lower()], offset, width)
elif ftype == 't':
print >>wfp, indent + "UCHARS(%s, %s);" % (offset, target)
+ elif ftype == 'b':
+ print >>wfp, indent + "%s\t= (bool)UBITS(%s, 1);" % (target, offset)
else:
print >>wfp, indent + "/* %s bits of type %s */" % (width,ftype)
last = name