diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-04-25 16:30:32 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-04-25 16:30:32 -0400 |
commit | cee7beef1583b8bbd9b7b6bbcd3b8e604fad224c (patch) | |
tree | ca6361bf93ce2d84765bc739c84d7d866b94877e /devtools | |
parent | 78ed39bd60d8356c49a9669495e5f3af35196bb8 (diff) | |
download | gpsd-cee7beef1583b8bbd9b7b6bbcd3b8e604fad224c.tar.gz |
In AIS, add partial support for IMO 236 FID 25 (untested).
Daemon support fort analyzing and reporting. Client-library support
is not done, it needs machinery to handle the array of repeated
elements at the end.
All regression tests pass.
Diffstat (limited to 'devtools')
-rwxr-xr-x | devtools/tablegen.py | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/devtools/tablegen.py b/devtools/tablegen.py index abacf6b6..5a041c05 100755 --- a/devtools/tablegen.py +++ b/devtools/tablegen.py @@ -291,14 +291,17 @@ def make_json_generator(wfp): if __name__ == '__main__': try: - (options, arguments) = getopt.getopt(sys.argv[1:], "tc:s:d:S:E:r:") + (options, arguments) = getopt.getopt(sys.argv[1:], "a:tc:s:d:S:E:r:") except getopt.GetoptError, msg: print "tablecheck.py: " + str(msg) raise SystemExit, 1 - generate = maketable = makestruct = makedump = readgen = False + generate = maketable = makestruct = makedump = readgen = all = False after = before = None for (switch, val) in options: - if switch == '-c': + if switch == '-a': + all = True + structname = val + elif switch == '-c': generate = True structname = val elif switch == '-s': @@ -317,7 +320,7 @@ if __name__ == '__main__': elif switch == '-E': before = val - if not generate and not maketable and not makestruct and not makedump and not readgen: + if not generate and not maketable and not makestruct and not makedump and not readgen and not all: print >>sys.stderr, "tablecheck.py: no mode selected" sys.exit(1) @@ -361,7 +364,12 @@ if __name__ == '__main__': offsets[i] += " " * (owidth - len(offsets[i])) # Here's where we generate useful output. - if maketable: + if all: + make_driver_code(open(structname + ".c", "w")) + make_structure(open(structname + ".h", "w")) + make_json_dumper(open(structname + "_json.c", "w")) + make_json_generator(open(structname + ".py", "w")) + elif maketable: correct_table(sys.stdout) elif generate: make_driver_code(sys.stdout) |