aboutsummaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorVladimir Menshakov2011-06-15 23:00:05 +0400
committerVladimir Menshakov2011-06-15 23:00:05 +0400
commit3b85dede39f6d0f4836788adb6df0ff868434885 (patch)
tree9f1b7aa822e5255998bf0ae0b4adbd2cfbe996eb /devtools
parent4e75c4bfd2aca2ef08d649ba95e5dbe90767ecb1 (diff)
downloadscummvm-rg350-3b85dede39f6d0f4836788adb6df0ff868434885.tar.gz
scummvm-rg350-3b85dede39f6d0f4836788adb6df0ff868434885.tar.bz2
scummvm-rg350-3b85dede39f6d0f4836788adb6df0ff868434885.zip
DREAMWEB: added banner to autogenerated files
Diffstat (limited to 'devtools')
-rw-r--r--devtools/tasmrecover/tasm/cpp.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/devtools/tasmrecover/tasm/cpp.py b/devtools/tasmrecover/tasm/cpp.py
index fe9e39c092..4e37dc8e5b 100644
--- a/devtools/tasmrecover/tasm/cpp.py
+++ b/devtools/tasmrecover/tasm/cpp.py
@@ -16,8 +16,16 @@ class cpp:
self.namespace = namespace
fname = namespace + ".cpp"
header = namespace + ".h"
+ banner = "/* PLEASE DO NOT MODIFY THIS FILE. ALL CHANGES WILL BE LOST! LOOK FOR README FOR DETAILS */"
self.fd = open(fname, "wt")
self.hd = open(header, "wt")
+ hid = "TASMRECOVER_%s_STUBS_H__" %namespace.upper()
+ self.hd.write("""#ifndef %s
+#define %s
+
+%s
+
+""" %(hid, hid, banner))
self.context = context
self.data_seg = context.binary_data
self.procs = context.proc_list
@@ -29,11 +37,13 @@ class cpp:
self.translated = []
self.proc_addr = []
self.forwards = []
- self.fd.write("""#include \"%s\"
+ self.fd.write("""%s
+
+#include \"%s\"
namespace %s {
-""" %(header, namespace))
+""" %(banner, header, namespace))
def expand_cb(self, match):
name = match.group(0).lower()
@@ -531,12 +541,8 @@ namespace %s {
if (n & 0xf) == 0:
data_impl += "\n\t\t"
data_impl += "};\n\tcontext.ds.assign(src, src + sizeof(src));\n"
- hid = "TASMRECOVER_%s_STUBS_H__" %self.namespace.upper()
- self.hd.write("""#ifndef %s
-#define %s
-""" %(hid, hid))
self.hd.write(
-"""\n#\tinclude "runtime.h"
+"""\n#include "dreamweb/runtime.h"
namespace %s {