Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
#!/usr/bin/env python
import re
import sys
cmd = []
for infile in sys.argv[1:]:
with open(infile) as f:
for line in f:
match = re.search('COMMAND\("(\w*)",(\w*)\);', line)
if match:
cmd.append(match.groups())
print "//generated by " + sys.argv[0] + " DO NOT EDIT"
for name,ptr in cmd:
print "extern void " + ptr + "(char *);"
print "cmd_t cmd[] = {"
for name,ptr in cmd:
print "\"" + name + "\", " + ptr + ","
print "};"
b9868dca5This file is pinned to the selected release. Download the original to open it in your design tool.