From 9c42b4567f35aceacce1298a6d4789d6789e5bfe Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 17 Dec 2019 13:22:51 -0500 Subject: specify Tuple content for read in files, remove traits.std --- org/in_source_files.org | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'org/in_source_files.org') diff --git a/org/in_source_files.org b/org/in_source_files.org index 20d8d0a..cb95fda 100644 --- a/org/in_source_files.org +++ b/org/in_source_files.org @@ -296,23 +296,21 @@ static template spineRawMarkupContent() { auto raw = MarkupRawUnit(); string[] insert_file_list; string[] images_list; - auto t + Tuple!(char[], char[][], string[], string[]) t = raw.markupSourceHeaderContentRawLineTupleArray(source_txt_str); auto header_raw = t[0]; auto sourcefile_body_content = t[1]; if (fn_src.match(rgx.src_fn_master)) { // filename with path needed if master file (.ssm) not otherwise auto ins = Inserts(); - auto tu + Tuple!(char[][], string[], string[]) tu = ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src); - static assert(!isTypeTuple!(tu)); sourcefile_body_content = tu[0]; insert_file_list = tu[1].dup; images_list = tu[2].dup; } else if (_opt_action.source || _opt_action.pod) { auto ins = Inserts(); - auto tu + Tuple!(char[][], string[], string[]) tu = ins.scan_master_src_for_insert_files_and_import_content(_opt_action, sourcefile_body_content, fn_src); - static assert(!isTypeTuple!(tu)); images_list = tu[2].dup; } string header_type = ""; @@ -348,7 +346,7 @@ static template spineRawMarkupContent() { } // end src subdoc (inserts) loop <> } - auto scan_master_src_for_insert_files_and_import_content(O)( + Tuple!(char[][], string[], string[]) scan_master_src_for_insert_files_and_import_content(O)( O _opt_action, char[][] sourcefile_body_content, string fn_src @@ -457,14 +455,14 @@ auto markupSourceReadIn(in string fn_src) { #+name: meta_markup_source_raw_tuple_of_header_and_body #+BEGIN_SRC d -auto markupSourceHeaderContentRawLineTupleArray(in string source_txt_str) @safe { +Tuple!(char[], char[][], string[], string[]) markupSourceHeaderContentRawLineTupleArray(in string source_txt_str) @safe { string[] file_insert_list = []; string[] images_list = []; char[][] hc = header0Content1(source_txt_str); char[] header = hc[0]; char[] source_txt = hc[1]; - auto source_line_arr = markupSourceLineArray(source_txt); - auto t = tuple( + char[][] source_line_arr = markupSourceLineArray(source_txt); + Tuple!(char[], char[][], string[], string[]) t = tuple( header, source_line_arr, file_insert_list, @@ -487,8 +485,8 @@ final char[][] getInsertMarkupSourceContentRawLineArray( "not a dr markup filename: «" ~ fn_src_insert ~ "»" ); - auto source_txt_str = readInMarkupSource(fn_src_insert); - auto source_line_arr = markupSourceLineArray(source_txt_str); + string source_txt_str = readInMarkupSource(fn_src_insert); + char[][] source_line_arr = markupSourceLineArray(source_txt_str); return source_line_arr; } #+END_SRC @@ -584,7 +582,7 @@ if (type1["curly_code"] == 1) { #+name: meta_inserts_scan_post #+BEGIN_SRC d -auto t = tuple( +Tuple!(char[][], string[]) t = tuple( contents_insert, _images ); @@ -689,7 +687,7 @@ debug(insert_file) { writeln(__LINE__); writeln(contents.length); } -auto t = tuple( +Tuple!(char[][], string[], string[]) t = tuple( contents, insert_file_list, images -- cgit v1.2.3