dxx-rebirth/common/ui
Kp 073f00974a Eliminate uses of the typedef struct X { ... } X; pattern
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,
2013-12-28 22:48:07 +00:00
..
button.cpp Use d_strdup for ui_add_gadget_button 2013-12-05 00:10:35 +00:00
checkbox.cpp Remove fix.h 2013-08-08 03:01:48 +00:00
dialog.cpp Use ui_dputs_at instead of ui_dprintf_at where possible 2013-12-17 04:03:34 +00:00
file.cpp Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
gadget.cpp Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
icon.cpp Mark private functions static 2013-11-02 04:23:55 +00:00
inputbox.cpp Remove unused strcins/strndel 2013-09-07 16:39:25 +00:00
keypad.cpp Switch PHYSFSX_fgets to auto-sized variant where possible 2013-12-07 18:39:19 +00:00
keypress.cpp Remove fix.h 2013-08-08 03:01:48 +00:00
keytrap.cpp Remove fix.h 2013-08-08 03:01:48 +00:00
listbox.cpp Mark various functions static 2013-10-03 03:11:51 +00:00
menu.cpp Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
menubar.cpp Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
message.cpp Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
radio.cpp Remove fix.h 2013-08-08 03:01:48 +00:00
scroll.cpp Remove fix.h 2013-08-08 03:01:48 +00:00
ui.cpp Remove fix.h 2013-08-08 03:01:48 +00:00
uidraw.cpp Remove fix.h 2013-08-08 03:01:48 +00:00
userbox.cpp Remove fix.h 2013-08-08 03:01:48 +00:00