Skip to content

Commit

Permalink
Added the option for specifying a different public name for an intern…
Browse files Browse the repository at this point in the history
…al data structure in makedmt.py
  • Loading branch information
danij committed Mar 9, 2008
1 parent 55f919c commit 819d465
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions doomsday/engine/scripts/makedmt.py
Expand Up @@ -88,9 +88,13 @@ def println(f, line, comment=''):
verbatim = internal_file
elif tokens[0] == 'public':
verbatim = public_file
elif count == 2:
elif count == 2 or count == 3:
if tokens[0] == 'struct':
current = tokens[1]
if count == 3:
publicName = tokens[2]
else:
publicName = tokens[1]
println(internal_file, "typedef struct %s_s {" % current, line_comment)
println(internal_file, " runtime_mapdata_header_t header;", '')
else:
Expand All @@ -100,7 +104,7 @@ def println(f, line, comment=''):
# Use "-" to omit the DDVT type declaration (internal usage only).
if tokens[0] != '-':
println(public_file,
"#define DMT_%s_%s DDVT_%s" % (current.upper(),
"#define DMT_%s_%s DDVT_%s" % (publicName.upper(),
tokens[2].upper(),
tokens[0].upper()), line_comment)
# Determine the C type.
Expand Down

0 comments on commit 819d465

Please sign in to comment.