dxx-rebirth/common/main
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
..
ai.h Move object* -> objnum conversion into init_ai_object 2013-12-28 22:10:24 +00:00
aistruct.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
automap.h Split compiler.h for PCH compatibility 2013-12-21 05:12:38 +00:00
bm.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
cntrlcen.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
collide.h Added MULTI_EFFECT_BLOWUP to remotely blast switches connected to triggers, ensuring sync and preventing misguided (i.e. delayed) player fire accidentially make puzzles or game progress impossible 2013-12-19 13:48:33 +01:00
config.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
controls.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
credits.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
digi.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
effects.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
endlevel.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
escort.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
fireball.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
fuelcen.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
fvi.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
game.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
gamefont.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
gamemine.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
gamepal.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
gamesave.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
gameseg.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
gameseq.h Rearrange headers to build under all test modes 2013-12-22 20:56:35 +00:00
gauges.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
hostage.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
hudmsg.h Use HUD_init_message_literal instead of HUD_init_message where possible 2013-12-17 04:03:34 +00:00
inferno.h Remove obsolete setjmp/longjmp 2013-12-21 01:40:56 +00:00
kconfig.h Split compiler.h for PCH compatibility 2013-12-21 05:12:38 +00:00
kmatrix.h Add EVENT_WINDOW_CREATED to centralize window init/deinit logic 2013-12-20 02:51:24 +00:00
laser.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
lighting.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
menu.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
mission.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
morph.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
multi.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
multibot.h Rearrange headers to build under all test modes 2013-12-22 20:56:35 +00:00
net_udp.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
newdemo.h Compact known file extension storage 2013-12-13 03:58:01 +00:00
newmenu.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
object.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
paging.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
physics.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
piggy.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
player.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
playsave.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
polyobj.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
powerup.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
render.h Use on-stack bit array for tracking AI segment visits 2013-12-15 18:50:39 +00:00
robot.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
scores.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
screens.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
segment.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
segpoint.h Make headers freestanding 2013-10-26 03:50:28 +00:00
slew.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
songs.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
sounds.h
state.h Added quick load ability for savestates 2013-12-10 18:13:32 +01:00
switch.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
terrain.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
texmerge.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
text.h Rearrange headers to build under all test modes 2013-12-22 20:56:35 +00:00
textures.h Rearrange headers to build under all test modes 2013-12-22 20:56:35 +00:00
titles.h Switch to C++ linkage 2013-12-06 03:35:32 +00:00
vclip.h Use unsigned count of frames in a vclip 2013-12-22 00:05:13 +00:00
vers_id.h Merge branch d1x-rebirth/master into unification/master 2013-07-19 22:32:28 +00:00
wall.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
weapon.h Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00