dxx-rebirth/common/include/editor
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
..
centers.h Remove unused declaration of Center_names 2013-12-22 20:56:35 +00:00
editor.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
ehostage.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
eobject.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
esegment.h Store warning segments in countarray object 2013-12-22 05:27:16 +00:00
eswitch.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
info.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
kdefs.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
kfuncs.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
macro.h Move */include/editor/macro.h -> common/include/editor/macro.h 2013-03-03 01:03:33 +00:00
meddraw.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
medlisp.h Move */include/editor/medlist.h -> common/include/editor/medlist.h 2013-03-03 01:03:33 +00:00
medmisc.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
medrobot.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
medsel.h Store found segments in countarray object 2013-12-22 01:54:15 +00:00
medwall.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
objpage.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
seguvs.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
texpage.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00