Commit graph

4 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 bbb9214e0e Invert sense of hires/lowres options 2013-11-24 22:57:36 +00:00
Kp ac174b5efe Remove unused gamefont_curfontname 2013-10-29 03:24:42 +00:00
Kp b2b56098a1 Move similar/main/gamefont.c -> similar/main/gamefont.cpp 2013-10-05 21:35:58 +00:00
Renamed from similar/main/gamefont.c (Browse further)