aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/in_source_files.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-12-17 13:22:51 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2020-01-13 16:06:43 -0500
commit9c42b4567f35aceacce1298a6d4789d6789e5bfe (patch)
tree90d698066a2f895a152bb942ecdeed5faeff50af /org/in_source_files.org
parentpresent per document metadata (diff)
specify Tuple content for read in files, remove traits.std
Diffstat (limited to 'org/in_source_files.org')
-rw-r--r--org/in_source_files.org24
1 files changed, 11 insertions, 13 deletions
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
<<meta_inserts_scan_post>>
}
- 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