Commit graph

10 commits

Author SHA1 Message Date
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
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 9de54cfa74 Switch to C++ linkage
import fileinput
guard = 0
cxxguard = '#ifdef __cplusplus\n'
for line in fileinput.input(inplace=True):
	if line == cxxguard:
		guard = 1
		continue
	if guard:
		if line == 'extern "C" {\n':
			guard = 2
			continue
		if line == '}\n':
			guard = 0
			continue
		if guard == 2:
			assert(line == '#endif\n')
			guard = 0
			print cxxguard,
			continue
	print line,
2013-12-06 03:35:32 +00:00
Kp ed8484f096 Remove unnecessary packing on vms_vector 2013-11-08 03:14:43 +00:00
Kp 9dec31d801 Remove unused vms_svec 2013-11-01 02:58:05 +00:00
Kp eb65b73b2a Move common/3d/draw.c -> common/3d/draw.cpp 2013-08-03 17:45:22 +00:00
Kp 4577dd3977 Merge branch 'd2x-rebirth/master' into unification/master 2013-07-21 21:34:46 +00:00
Kp a1ba420031 Mark various parameters and variables as const 2013-07-20 23:12:24 +00:00
Kp 012d8e249b Merge branch d1x-rebirth/master into unification/master 2013-07-19 22:32:28 +00:00
Kp ac1af0a58a Move */include/vecmat.h -> common/include/vecmat.h 2013-03-03 01:03:33 +00:00
Renamed from d2x-rebirth/include/vecmat.h (Browse further)