Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/48968 )

Change subject: scons: Delete the unused do_embed_text function.
......................................................................

scons: Delete the unused do_embed_text function.

Change-Id: I2ad37c9965e7a58e288711f0fa5bb1858f121c05
---
M src/mem/ruby/SConscript
1 file changed, 0 insertions(+), 30 deletions(-)



diff --git a/src/mem/ruby/SConscript b/src/mem/ruby/SConscript
index c3f8365..b3ea716 100644
--- a/src/mem/ruby/SConscript
+++ b/src/mem/ruby/SConscript
@@ -61,36 +61,6 @@
     'RubyDma', 'RubyPort', 'RubySequencer', 'RubyCacheTrace',
     'RubyPrefetcher'])

-def do_embed_text(target, source, env):
-    """convert a text file into a file that can be embedded in C
-    using an #include statement, that defines a \"const char *\" pointing
-    to the same text.
-
- This is useful to embed scripts and configuration files in object files.
-    """
-
-    escape = [ "\'", "\"", "\\", "\?" ]
-
-    # reads the text file in, line by line, converting it to a C string
-    fin = open(str(source[0]), 'r')
-    fout = open(str(target[0]), 'w' )
-    fout.write("static const char *%s =\n" % source[1].get_contents());
-    for l in fin:
-        # add escape sequences for the characters in escape
-        fout.write("\"")
-        for char in l:
-            if char == "\n":
-                break
-            if char in escape:
-                fout.write("\\")
-                fout.write(char)
-            else:
-                fout.write(char)
-        fout.write("\\n\"\n");
-    fout.write(";\n");
-    fin.close()
-    fout.close()
-
 #
 # Link includes
 #

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48968
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I2ad37c9965e7a58e288711f0fa5bb1858f121c05
Gerrit-Change-Number: 48968
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to