aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/ao_read_source_files.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/ao_read_source_files.org')
-rw-r--r--org/ao_read_source_files.org20
1 files changed, 13 insertions, 7 deletions
diff --git a/org/ao_read_source_files.org b/org/ao_read_source_files.org
index 05e15eb..819f1ff 100644
--- a/org/ao_read_source_files.org
+++ b/org/ao_read_source_files.org
@@ -158,10 +158,13 @@ WORK AREA
#+name: ao_config_file_in
#+BEGIN_SRC d
final private string readInConfigFile(string conf_sdl) {
+ string dot_pwd = chainPath(to!string(environment["PWD"]), ".sisu").array;
+ string underscore_pwd = chainPath(to!string(environment["PWD"]), "_sisu").array;
+ string dot_home = chainPath(to!string(environment["HOME"]), ".sisu").array;
string[] possible_config_path_locations = [
- environment["PWD"] ~ "/.sisu",
- environment["PWD"] ~ "/_sisu",
- environment["HOME"] ~ "/.sisu",
+ dot_pwd,
+ underscore_pwd,
+ dot_home,
"/etc/sisu"
];
string config_file_str;
@@ -232,7 +235,7 @@ final private auto configSDLang(string conf_sdl) {
#+name: ao_markup_source_raw_read_file_source_string
#+BEGIN_SRC d
-final private string readInMarkupSource(in string fn_src) {
+final private string readInMarkupSource(in char[] fn_src) {
enforce(
exists(fn_src)!=0,
"file not found"
@@ -334,7 +337,10 @@ auto markupSourceHeaderContentRawLineTupleArray(in string source_txt_str) {
#+name: ao_markup_source_raw_get_insert_source_line_array
#+BEGIN_SRC d
-final char[][] getInsertMarkupSourceContentRawLineArray(in string fn_src, Regex!(char) rgx_file) {
+final char[][] getInsertMarkupSourceContentRawLineArray(
+ in char[] fn_src,
+ Regex!(char) rgx_file
+) {
enforce(
match(fn_src, rgx_file),
"not a sisu markup filename"
@@ -405,7 +411,7 @@ if (type1["curly_code"] == 1) {
auto insert_fn = m.captures[2];
auto insert_sub_pth = m.captures[1];
auto fn_src_insert =
- to!string(markup_src_file_path ~ insert_sub_pth ~ insert_fn);
+ chainPath(markup_src_file_path, insert_sub_pth ~ insert_fn).array;
auto raw = MarkupRawUnit();
auto markup_sourcesubfile_insert_content =
raw.getInsertMarkupSourceContentRawLineArray(fn_src_insert, rgx.src_fn_find_inserts);
@@ -477,7 +483,7 @@ if (type["curly_code"] == 1) {
auto insert_fn = m.captures[2];
auto insert_sub_pth = m.captures[1];
auto fn_src_insert =
- to!string(markup_src_file_path ~ insert_sub_pth ~ insert_fn);
+ chainPath(markup_src_file_path, insert_sub_pth ~ insert_fn).array;
auto raw = MarkupRawUnit();
/+ TODO +/
if (auto ma = match(line, rgx.src_fn_text)) {