dxx-rebirth/common/2d
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
..
2dsline.cpp Move 2d/2dsline.c -> 2d/2dsline.cpp 2012-11-11 22:12:51 +00:00
bitblt.cpp Make gr_bitmap_scale_to static 2013-08-07 02:42:25 +00:00
bitmap.cpp Use array for palette_array_t 2013-12-22 00:37:36 +00:00
bitmap.h Add typedef palette_array_t for palette data 2013-12-22 00:05:13 +00:00
box.cpp Mark private functions static 2013-11-02 04:23:55 +00:00
canvas.cpp Move common/2d/canvas.c -> common/2d/canvas.cpp 2013-07-27 22:30:54 +00:00
circle.cpp Move common/2d/circle.c -> common/2d/circle.cpp 2013-07-27 22:30:54 +00:00
clip.h Move */2d/clip.h,line.c -> common/2d/clip.h,line.c 2013-03-03 01:03:33 +00:00
disc.cpp Move common/2d/disc.c -> common/2d/disc.cpp 2013-07-27 22:30:54 +00:00
gpixel.cpp Move common/2d/gpixel.c -> common/2d/gpixel.cpp 2013-07-27 22:30:54 +00:00
line.cpp Mark private functions static 2013-11-02 04:23:55 +00:00
pixel.cpp Move common/2d/pixel.c -> common/2d/pixel.cpp 2013-07-27 22:30:54 +00:00
rect.cpp Move common/2d/rect.c -> common/2d/rect.cpp 2013-07-27 22:30:54 +00:00
rle.cpp Eliminate uses of the typedef struct X { ... } X; pattern 2013-12-28 22:48:07 +00:00
scalec.cpp Mark private functions static 2013-11-02 04:23:55 +00:00