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
2714679284
Mark private functions static
2013-11-02 04:23:55 +00:00
Kp
685c3fd8e7
Fix Win64 build errors due to pointer casting
2013-10-28 04:14:20 +00:00
Kp
8ed99faf5c
Make headers freestanding
2013-10-26 03:50:28 +00:00
Kp
b4107e6526
Remove duplicate declarations
2013-10-03 03:11:52 +00:00
Kp
a881ee455e
Remove fix.h
2013-08-08 03:01:48 +00:00
Kp
17d9dd4f1e
Move common/texmap/tmapflat.c -> common/texmap/tmapflat.cpp
2013-08-04 17:57:06 +00:00
Kp
3c2b518d0d
Move common/texmap/scanline.c -> common/texmap/scanline.cpp
2013-08-04 17:56:51 +00:00
Kp
33725eb510
Move common/texmap/ntmap.c -> common/texmap/ntmap.cpp
2013-08-04 17:56:36 +00:00
Kp
2f4ffebde6
Add const markers to some texture mapping code
2013-07-27 21:28:53 +00:00
Kp
4187648621
Remove redundant/obsolete declarations
2013-07-21 21:55:00 +00:00
Kp
4577dd3977
Merge branch 'd2x-rebirth/master' into unification/master
2013-07-21 21:34:46 +00:00
Kp
a9123e0b45
Move */texmap/*.c -> common/texmap
2013-03-17 23:01:32 +00:00