073f00974a
C++ does not require this pattern. import re, fileinput to = re.compile(r'^typedef struct ([a-z_A-Z]+)\s*{') tc = re.compile(r'^}(.*?)\s*([a-z_A-Z]+);$') osn = None for line in fileinput.input(inplace=True): m = to.match(line) if m: osn = m.group(1) print 'struct %s\n{' % osn continue if osn: m = tc.match(line) if m: csn = m.group(2) if osn == csn: print '}%s;' % m.group(1) osn = None continue else: osn = None print line, |
||
---|---|---|
.. | ||
button.cpp | ||
checkbox.cpp | ||
dialog.cpp | ||
file.cpp | ||
gadget.cpp | ||
icon.cpp | ||
inputbox.cpp | ||
keypad.cpp | ||
keypress.cpp | ||
keytrap.cpp | ||
listbox.cpp | ||
menu.cpp | ||
menubar.cpp | ||
message.cpp | ||
radio.cpp | ||
scroll.cpp | ||
ui.cpp | ||
uidraw.cpp | ||
userbox.cpp |