Commit graph

7 commits

Author SHA1 Message Date
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
Kp a3d66a3b37 Add typedef palette_array_t for palette data 2013-12-22 00:05:13 +00:00
Kp cea46651fc Check type of window handler function 2013-12-15 18:51:26 +00:00
Kp a2cec5d71f Switch PHYSFSX_fgets to auto-sized variant where possible 2013-12-07 18:39:19 +00:00
Kp 1d3395cad1 Improve strlen usage 2013-12-06 00:24:07 +00:00
Kp 2714679284 Mark private functions static 2013-11-02 04:23:55 +00:00
Kp f4393ca1b6 Move similar/main/credits.c -> similar/main/credits.cpp 2013-10-05 21:35:58 +00:00
Renamed from similar/main/credits.c (Browse further)