aboutsummaryrefslogtreecommitdiffstats
path: root/text.py
diff options
context:
space:
mode:
Diffstat (limited to 'text.py')
-rw-r--r--text.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/text.py b/text.py
index ed4d460..43bf81f 100644
--- a/text.py
+++ b/text.py
@@ -8,11 +8,15 @@ class text():
pre_header_guard = "\n// first line intentionally left blank\n"
header_guard_begin = "#ifndef _AUTO_XXX_H\n#define _AUTO_XXX_H\n"
pragma_endif = "#endif\n"
- autogen_warning = "// this file has been automatically generated by faultreiber\n"
+ autogen_warning = "// automatically generated by faultreiber\n"
last_comment = "// last line intentionally left blank\n\n"
read_func_sig = "int read_structured_file(char* path)"
- c_read_elem_sig = "XXX ft_read_YYY(int _fd) {\n"
+ #c_read_elem_sig = "XXX ft_read_YYY(int _fd) {\n"
+ #c_read_elem_sig = "void ft_read_YYY(int _fd, XXX* dummyZZZ) {\n"
+ c_read_elem_sig = "void ft_read_YYY(int _fd, XXX* dummy) {\n"
c_read_elem_sig_1 = "ft_read_XXX(_fd)"
+ c_read_elem_sig_2 = "ft_read_XXX(_fd, YYY)"
+ #c_read_elem_sig_2 = "ft_read_XXX(_fd, &YYY)"
c_open_file = "int ft_read_file = open(_ft_file_path, RDONLY);\n"
c_function_close = "}\n"
c_function_dummy_dec = "XXX dummy;\n"
@@ -62,11 +66,11 @@ int64_t read_leb_128_s(int _fd, int max_size) {
}"""
c_read_leb_macro_defs = """
-#define READ_VAR_UINT_1(FD) read_leb128_u(FD, 1, XXX)
-#define READ_VAR_UINT_7(FD) read_leb128_u(FD, 1, XXX)
-#define READ_VAR_UINT_32(FD) read_leb128_u(FD, 5, XXX)
-#define READ_VAR_INT_1(FD) read_leb128_s(FD, 1, XXX)
-#define READ_VAR_INT_7(FD) read_leb128_s(FD, 1, XXX)
+#define READ_VAR_UINT_1(FD) read_leb128_u(FD, 1)
+#define READ_VAR_UINT_7(FD) read_leb128_u(FD, 1)
+#define READ_VAR_UINT_32(FD) read_leb128_u(FD, 5)
+#define READ_VAR_INT_1(FD) read_leb128_s(FD, 1)
+#define READ_VAR_INT_7(FD) read_leb128_s(FD, 1)
"""
c_read_leb_macro_varuin1 = "READ_VAR_UINT_1(XXX)"