aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/ocda.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2023-11-15 22:31:08 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2023-11-16 12:40:24 -0500
commit245b9a3ba9917ee148726aa41a7c3397caf97895 (patch)
tree54713c485fcd0fd3e7caded51cb9cf655d02d878 /org/ocda.org
parentocda, single out, use more structs (diff)
ocda, arrange structs, continue
Diffstat (limited to 'org/ocda.org')
-rw-r--r--org/ocda.org269
1 files changed, 127 insertions, 142 deletions
diff --git a/org/ocda.org b/org/ocda.org
index 44a184a..b484299 100644
--- a/org/ocda.org
+++ b/org/ocda.org
@@ -429,6 +429,88 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
return tag_assoc;
}
+struct retStruct_txt_by_line_common_reset {
+ int[string] line_occur;
+ string[string] this_object;
+ uint[string] pith;
+}
+struct retStruct_txt_by_line_block_start {
+ uint[string] pith;
+ uint[string] dochas;
+ string[string] object_number_poem;
+}
+struct retStruct_txt_by_line_block_generic {
+ uint[string] pith;
+ string[string] this_object;
+}
+struct retStruct_txt_by_line_block_poem {
+ int cntr;
+ uint[string] pith;
+ string[string] this_object;
+}
+struct retStruct_txt_by_line_block_biblio {
+ uint[string] pith;
+ int bib_entry;
+ string biblio_entry_str_json;
+ string[] biblio_arr_json;
+}
+struct retStruct_flow_book_index {
+ string[string] this_object;
+ uint[string] pith;
+ string book_idx_tmp;
+}
+struct retStruct_flow_heading_found {
+ string[string] heading_match_str;
+ Regex!(char)[string] heading_match_rgx;
+ uint[string] pith;
+}
+struct retStruct_flow_heading_make_set {
+ char[] line;
+ uint[string] pith;
+ string[string] this_object;
+}
+struct retStruct_flow_para_match {
+ uint[string] pith;
+ string[string] this_object;
+ string this_object_key;
+ int[string] indent;
+ bool bullet;
+ int[string] line_occur;
+}
+struct retStruct_flow_table_array_munge {
+ ObjGenericComposite table_object;
+ string[][] table_array;
+}
+struct retStruct_flow_table_of_contents_gather_headings {
+ ObjGenericComposite[] the_document_toc_section;
+ string[][string] lev4_subtoc;
+}
+struct retStruct_flow_bibliography {
+ JSONValue[] biblio_sorted;
+ JSONValue[] bib_arr_json;
+ string[] biblio_unsorted_incomplete;
+}
+struct retStruct_flow_table_closed_make_special_notation_table {
+ string[string] this_object;
+ ObjGenericComposite[] the_document_body_section;
+ OCNset obj_cite_digits;
+ ObjGenericComposite _comp_obj_heading;
+ int cntr;
+ uint[string] pith;
+}
+struct retStruct_flow_block_flag_line_empty {
+ string[string] this_object;
+ ObjGenericComposite[] the_document_body_section;
+ string[][string][string] bookindex_unordered_hashes;
+ OCNset obj_cite_digits;
+ ObjGenericComposite comp_obj_heading;
+ int cntr;
+ uint[string] pith;
+}
+struct retStruct_flow_table_substantive_munge {
+ ObjGenericComposite table_object;
+ string table_substantive;
+}
#+END_SRC
** docAbstraction
@@ -2761,11 +2843,11 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
@safe auto doc_has() {
return DocHas_();
}
- struct retStruct {
+ struct retStruct_docAbstraction {
ObjGenericComposite[][string] document_the;
DocHas_ doc_has;
}
- retStruct ret;
+ retStruct_docAbstraction ret;
{
ret.document_the = document_the;
ret.doc_has = doc_has;
@@ -2779,7 +2861,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
#+NAME: docSortOut
#+HEADER: :noweb yes
#+BEGIN_SRC d
-@system auto txt_by_line_common_reset_()(
+@system retStruct_txt_by_line_common_reset txt_by_line_common_reset_()(
int[string] line_occur,
string[string] an_object,
uint[string] pith,
@@ -2788,12 +2870,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
line_occur["para"] = eN.bi.off;
pith["txt_is"] = eN.txt_is.off;
an_object = an_object.object_reset;
- struct retStruct {
- int[string] line_occur;
- string[string] this_object;
- uint[string] pith;
- }
- retStruct ret;
+ retStruct_txt_by_line_common_reset ret;
{
ret.line_occur = line_occur;
ret.this_object = an_object;
@@ -2801,7 +2878,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
return ret;
}
-@safe auto txt_by_line_block_start()(
+@safe retStruct_txt_by_line_block_start txt_by_line_block_start()(
char[] line,
uint[string] pith,
uint[string] dochas,
@@ -2986,12 +3063,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
pith["block_state"] = eN.blk_state.on;
pith["block_delim"] = eN.blk_delim.tic;
}
- struct retStruct {
- uint[string] pith;
- uint[string] dochas;
- string[string] object_number_poem;
- }
- retStruct ret;
+ retStruct_txt_by_line_block_start ret;
{
ret.pith = pith;
ret.dochas = dochas;
@@ -2999,7 +3071,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
return ret;
}
-@safe auto txt_by_line_block_quote()(
+@safe retStruct_txt_by_line_block_generic txt_by_line_block_quote()(
char[] line,
string[string] an_object,
uint[string] pith,
@@ -3038,18 +3110,14 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
}
}
- struct retStruct {
- uint[string] pith;
- string[string] this_object;
- }
- retStruct ret;
+ retStruct_txt_by_line_block_generic ret;
{
ret.pith = pith;
ret.this_object = an_object;
}
return ret;
}
-@safe auto txt_by_line_block_group()(
+@safe retStruct_txt_by_line_block_generic txt_by_line_block_group()(
char[] line,
string[string] an_object,
uint[string] pith,
@@ -3088,18 +3156,14 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
}
}
- struct retStruct {
- uint[string] pith;
- string[string] this_object;
- }
- retStruct ret;
+ retStruct_txt_by_line_block_generic ret;
{
ret.pith = pith;
ret.this_object = an_object;
}
return ret;
}
-@safe auto txt_by_line_block_block()(
+@safe retStruct_txt_by_line_block_generic txt_by_line_block_block()(
char[] line,
string[string] an_object,
uint[string] pith,
@@ -3138,18 +3202,14 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
}
}
- struct retStruct {
- uint[string] pith;
- string[string] this_object;
- }
- retStruct ret;
+ retStruct_txt_by_line_block_generic ret;
{
ret.pith = pith;
ret.this_object = an_object;
}
return ret;
}
-@safe auto txt_by_line_block_poem(CMM)(
+@safe retStruct_txt_by_line_block_poem txt_by_line_block_poem(CMM)(
char[] line,
string[string] an_object,
uint[string] pith,
@@ -3391,12 +3451,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
}
}
- struct retStruct {
- int cntr;
- uint[string] pith;
- string[string] this_object;
- }
- retStruct ret;
+ retStruct_txt_by_line_block_poem ret;
{
ret.cntr = cntr;
ret.pith = pith;
@@ -3404,7 +3459,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
return ret;
}
-@safe auto txt_by_line_block_code()(
+@safe retStruct_txt_by_line_block_generic txt_by_line_block_code()(
char[] line,
string[string] an_object,
uint[string] pith,
@@ -3447,11 +3502,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
}
}
- struct retStruct {
- uint[string] pith;
- string[string] this_object;
- }
- retStruct ret;
+ retStruct_txt_by_line_block_generic ret;
{
ret.pith = pith;
ret.this_object = an_object;
@@ -3526,12 +3577,12 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
}
}
- struct retStruct {
+ struct retStruct_txt_by_line_block_table {
CMM conf_make_meta;
uint[string] pith;
string[string] this_object;
}
- retStruct ret;
+ retStruct_txt_by_line_block_table ret;
{
ret.conf_make_meta = conf_make_meta,
ret.pith = pith;
@@ -3539,7 +3590,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
return ret;
}
-@system auto txt_by_line_block_biblio(
+@system retStruct_txt_by_line_block_biblio txt_by_line_block_biblio(
char[] line,
uint[string] pith,
int bib_entry,
@@ -3677,13 +3728,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
header_tag_value = "";
}
- struct retStruct {
- uint[string] pith;
- int bib_entry;
- string biblio_entry_str_json;
- string[] biblio_arr_json;
- }
- retStruct ret;
+ retStruct_txt_by_line_block_biblio ret;
{
ret.pith = pith;
ret.bib_entry = bib_entry;
@@ -3795,7 +3840,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
return line;
}
-@system auto flow_table_closed_make_special_notation_table_(CMM)(
+@system retStruct_flow_table_closed_make_special_notation_table flow_table_closed_make_special_notation_table_(CMM)(
char[] line,
string[string] an_object,
ObjGenericComposite[] the_document_body_section,
@@ -3840,15 +3885,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
object_reset(an_object);
processing.remove("verse");
++cntr;
- struct retStruct {
- string[string] this_object;
- ObjGenericComposite[] the_document_body_section;
- OCNset obj_cite_digits;
- ObjGenericComposite _comp_obj_heading;
- int cntr;
- uint[string] pith;
- }
- retStruct ret;
+ retStruct_flow_table_closed_make_special_notation_table ret;
{
ret.this_object = an_object;
ret.the_document_body_section = the_document_body_section;
@@ -3859,7 +3896,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
return ret;
}
-@system auto flow_block_flag_line_empty_(B,CMM,Ts)(
+@system retStruct_flow_block_flag_line_empty flow_block_flag_line_empty_(B,CMM,Ts)(
char[] line,
string[string] an_object,
B bookindex_extract_hash,
@@ -4180,16 +4217,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
++cntr;
}
}
- struct retStruct {
- string[string] this_object;
- ObjGenericComposite[] the_document_body_section;
- string[][string][string] bookindex_unordered_hashes;
- OCNset obj_cite_digits;
- ObjGenericComposite comp_obj_heading;
- int cntr;
- uint[string] pith;
- }
- retStruct ret;
+ retStruct_flow_block_flag_line_empty ret;
{
ret.this_object = an_object;
ret.the_document_body_section = the_document_body_section;
@@ -4201,7 +4229,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
return ret;
}
-@system auto flow_book_index_(B)(
+@system retStruct_flow_book_index flow_book_index_(B)(
char[] line,
string[string] an_object,
string book_idx_tmp,
@@ -4249,12 +4277,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
}
}
- struct retStruct {
- string[string] this_object;
- uint[string] pith;
- string book_idx_tmp;
- }
- retStruct ret;
+ retStruct_flow_book_index ret;
{
ret.this_object = an_object;
ret.pith = pith;
@@ -4262,7 +4285,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
return ret;
}
-@safe auto flow_heading_found_()(
+@safe retStruct_flow_heading_found flow_heading_found_()(
char[] line,
string[string] heading_match_str,
string[] _make_unmarked_headings,
@@ -4341,12 +4364,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
pith["make_headings"] = eN.bi.on;
}
- struct retStruct {
- string[string] heading_match_str;
- Regex!(char)[string] heading_match_rgx;
- uint[string] pith;
- }
- retStruct ret;
+ retStruct_flow_heading_found ret;
{
ret.heading_match_str = heading_match_str;
ret.heading_match_rgx = heading_match_rgx;
@@ -4354,7 +4372,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
return ret;
}
-@safe auto flow_heading_make_set_()(
+@safe retStruct_flow_heading_make_set flow_heading_make_set_()(
char[] line,
int[string] line_occur,
return ref Regex!(char)[string] heading_match_rgx,
@@ -4408,12 +4426,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
}
}
- struct retStruct {
- char[] line;
- uint[string] pith;
- string[string] this_object;
- }
- retStruct ret;
+ retStruct_flow_heading_make_set ret;
{
ret.line = line;
ret.pith = pith;
@@ -4591,7 +4604,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
writeln(line.strip);
}
}
- struct retStruct {
+ struct retStruct_flow_heading_matched {
string[string] this_object;
int[string] line_occur;
string an_object_key;
@@ -4600,7 +4613,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
uint[string] pith;
CMM conf_make_meta;
}
- retStruct ret;
+ retStruct_flow_heading_matched ret;
{
ret.this_object = an_object;
ret.line_occur = line_occur;
@@ -4612,7 +4625,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
return ret;
}
-@safe auto flow_para_match_()(
+@safe retStruct_flow_para_match flow_para_match_()(
char[] line,
string[string] an_object,
string an_object_key,
@@ -4663,15 +4676,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
++line_occur["para"];
}
- struct retStruct {
- uint[string] pith;
- string[string] this_object;
- string this_object_key;
- int[string] indent;
- bool bullet;
- int[string] line_occur;
- }
- retStruct ret;
+ retStruct_flow_para_match ret;
{
ret.pith = pith;
ret.this_object = an_object;
@@ -4729,7 +4734,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
}
return table_object;
}
-@safe auto flow_table_array_munge()(
+@safe retStruct_flow_table_array_munge flow_table_array_munge()(
ObjGenericComposite table_object,
string[][] table_array,
) {
@@ -4849,18 +4854,14 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
_table_substantive);
}
table_object.text = _table_substantive;
- struct retStruct {
- ObjGenericComposite table_object;
- string[][] table_array;
- }
- retStruct ret;
+ retStruct_flow_table_array_munge ret;
{
ret.table_object = table_object;
ret.table_array = table_array;
}
return ret;
}
-@system auto flow_table_substantive_munge()(
+@system retStruct_flow_table_substantive_munge flow_table_substantive_munge()(
ObjGenericComposite table_object,
string table_substantive,
) {
@@ -4880,18 +4881,14 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
_table_array = _get.table_array; // what do you do with this? how is this passed down?
}
}
- struct retStruct {
- ObjGenericComposite table_object;
- string table_substantive;
- }
- retStruct ret;
+ retStruct_flow_table_substantive_munge ret;
{
ret.table_object = table_object;
ret.table_substantive = table_substantive; // has anything been changed here?
}
return ret;
}
-@system auto flow_table_substantive_munge_special()(
+@system retStruct_flow_table_substantive_munge flow_table_substantive_munge_special()(
ObjGenericComposite table_object,
string table_substantive,
) {
@@ -4911,11 +4908,7 @@ enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensio
_table_array = _get.table_array;
}
}
- struct retStruct {
- ObjGenericComposite table_object;
- string table_substantive;
- }
- retStruct ret;
+ retStruct_flow_table_substantive_munge ret;
{
ret.table_object = table_object;
ret.table_substantive = table_substantive;
@@ -5335,7 +5328,7 @@ static struct ObjInlineMarkup {
heading_toc_ = (m.post).replaceAll(rgx.inline_notes_curly_gen, "");
return heading_toc_;
};
- @safe auto flow_table_of_contents_gather_headings(CMM)( //
+ @safe retStruct_flow_table_of_contents_gather_headings flow_table_of_contents_gather_headings(CMM)( //
string[string] obj_,
CMM conf_make_meta,
string[string] tag_in_seg,
@@ -5418,11 +5411,7 @@ static struct ObjInlineMarkup {
default:
break;
}
- struct retStruct {
- ObjGenericComposite[] the_document_toc_section;
- string[][string] lev4_subtoc;
- }
- retStruct ret;
+ retStruct_flow_table_of_contents_gather_headings ret;
{
ret.the_document_toc_section = the_document_toc_section;
ret.lev4_subtoc = lev4_subtoc;
@@ -6300,7 +6289,7 @@ struct NotesSection {
}
/+ +/
struct Bibliography {
- @system public auto flow_bibliography_()(
+ @system public retStruct_flow_bibliography flow_bibliography_()(
string[] biblio_unsorted_incomplete,
JSONValue[] bib_arr_json
) {
@@ -6323,12 +6312,7 @@ struct Bibliography {
cntr++;
}
}
- struct retStruct {
- JSONValue[] biblio_sorted;
- JSONValue[] bib_arr_json;
- string[] biblio_unsorted_incomplete;
- }
- retStruct ret;
+ retStruct_flow_bibliography ret;
{
ret.biblio_sorted = biblio_sorted__;
ret.bib_arr_json = bib_arr_json;
@@ -7218,6 +7202,7 @@ struct NodeStructureMetadata {
break;
}
}
+/+ abstraction functions assertions ↑ +/
#+END_SRC
* template docSectKeysSeq