mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-19 07:20:50 +00:00
Better handling of progs.dat and line numbers.
Not enough testing :P
This commit is contained in:
parent
d5c831b6da
commit
fb82a96cc7
1 changed files with 11 additions and 5 deletions
|
@ -86,7 +86,7 @@ current_file = []
|
|||
source_list = []
|
||||
qcc_list = []
|
||||
defines = {}
|
||||
progs_dat = "progs.dat"
|
||||
progs_dat = None
|
||||
progs_src = "progs.src"
|
||||
compile_this_file = 1
|
||||
keep_newlines = 1
|
||||
|
@ -252,6 +252,7 @@ def process_source (source_file):
|
|||
arg1 = string.strip (g[1])
|
||||
margs = string.strip (g[4])
|
||||
#pprint ((directive, arg1, margs))
|
||||
comment_out = True
|
||||
if directive == 'pragma':
|
||||
if condition[-1]:
|
||||
parse_pragma (arg1, margs)
|
||||
|
@ -286,8 +287,11 @@ def process_source (source_file):
|
|||
del condition[-1]
|
||||
else:
|
||||
if condition[-1]:
|
||||
print "ignoring " + l
|
||||
output.append ('//' + l)
|
||||
comment_out = False
|
||||
if comment_out:
|
||||
output.append ('//' + l)
|
||||
else:
|
||||
output.append (l)
|
||||
else:
|
||||
if (includelist):
|
||||
fname = parse_filename (l)
|
||||
|
@ -341,9 +345,11 @@ while i < len (sys.argv):
|
|||
del sys.argv[i]
|
||||
continue
|
||||
i = i + 1
|
||||
progs_dat = None
|
||||
do_preprogs_src ()
|
||||
progs_dat = source_list[0]
|
||||
source_list = source_list[1:]
|
||||
if progs_dat == None:
|
||||
progs_dat = source_list[0]
|
||||
source_list = source_list[1:]
|
||||
for s in source_list:
|
||||
process_source (s)
|
||||
f = open (progs_src, "wb")
|
||||
|
|
Loading…
Reference in a new issue