From 24c9ed3645178a6ee2abbd9201fa4643dba068e2 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 14 May 2019 11:35:24 -0400 Subject: review, reduce use of auto --- org/output_xmls.org | 68 ++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 37 deletions(-) (limited to 'org/output_xmls.org') diff --git a/org/output_xmls.org b/org/output_xmls.org index 14d4f24..2eb0e48 100644 --- a/org/output_xmls.org +++ b/org/output_xmls.org @@ -58,8 +58,8 @@ import #+name: xhtml_format_objects #+BEGIN_SRC d string div_delimit( - string part, - return ref string previous_part + string part, + return ref string previous_part ){ string delimit = ""; string delimit_ = ""; @@ -163,7 +163,7 @@ string _xhtml_anchor_tags(O)(O obj) { #+name: xhtml_format_objects #+BEGIN_SRC d -auto header_metadata(M)( +string header_metadata(M)( M doc_matters, ) { string _publisher="Publisher"; // TODO @@ -206,7 +206,7 @@ auto header_metadata(M)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto site_info_button(M)( +string site_info_button(M)( M doc_matters, ) { string _locations; @@ -236,7 +236,7 @@ auto site_info_button(M)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto inline_search_form(M)( +string inline_search_form(M)( M doc_matters, ) { string _action="http://www.sisudoc.org/cgi-bin/search.cgi"; @@ -277,7 +277,7 @@ auto inline_search_form(M)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto html_head(M)( +string html_head(M)( M doc_matters, string type, ) { @@ -338,7 +338,7 @@ if (doc_matters.opt.action.workon) { #+name: xhtml_format_objects #+BEGIN_SRC d -auto epub3_seg_head(M)( +string epub3_seg_head(M)( M doc_matters, ) { string html_base = format(q"┃ @@ -412,7 +412,7 @@ auto epub3_seg_head(M)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto tail() { +string tail() { string o; o = format(q"┃ @@ -428,7 +428,7 @@ auto tail() { #+name: xhtml_format_objects #+BEGIN_SRC d -auto inline_images(O,M)( +string inline_images(O,M)( string _txt, const O obj, M doc_matters, @@ -462,7 +462,7 @@ auto inline_images(O,M)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto inline_links(O,M)( +string inline_links(O,M)( string _txt, const O obj, M doc_matters, @@ -560,7 +560,7 @@ auto inline_links(O,M)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto inline_notes_scroll(O,M)( +string inline_notes_scroll(O,M)( string _txt, const O obj, M doc_matters, @@ -637,7 +637,7 @@ auto inline_notes_seg(O,M)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto inline_markup_scroll(O,M)( +string inline_markup_scroll(O,M)( string _txt, const O obj, M doc_matters, @@ -804,7 +804,7 @@ auto nav_pre_next_svg(O,M)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto heading(O)( +string heading(O)( string _txt, const O obj, string _xml_type = "html", @@ -813,7 +813,7 @@ auto heading(O)( assert(obj.metainfo.is_of_section == "body" || "toc" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb"); assert(obj.metainfo.is_of_type == "para"); assert(obj.metainfo.is_a == "heading"); - auto tags = _xhtml_anchor_tags(obj); + string tags = _xhtml_anchor_tags(obj); string heading_lev_anchor_tag; string _horizontal_rule = "
"; if ((_xml_type != "html") @@ -874,13 +874,12 @@ auto heading(O)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto heading_scroll(O,M)( +string heading_scroll(O,M)( string _txt, const O obj, M doc_matters, string _suffix = ".html", ) { - auto tags = _xhtml_anchor_tags(obj); _txt = inline_markup_scroll(_txt, obj, doc_matters, _suffix); string o = heading(_txt, obj); return o; @@ -915,7 +914,7 @@ auto heading_seg(O,M)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto para(O)( +string para(O)( string _txt, const O obj, ) { @@ -923,7 +922,7 @@ auto para(O)( assert(obj.metainfo.is_of_section == "body" || "toc" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb"); assert(obj.metainfo.is_of_type == "para"); assert(obj.metainfo.is_a == "para" || "toc" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb"); - auto tags = _xhtml_anchor_tags(obj); + string tags = _xhtml_anchor_tags(obj); _txt = font_face(_txt); string o; _txt = (obj.attrib.bullet) ? ("●  " ~ _txt) : _txt; @@ -966,13 +965,12 @@ auto para(O)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto para_scroll(O,M)( +string para_scroll(O,M)( string _txt, const O obj, M doc_matters, string _suffix = ".html", ) { - auto tags = _xhtml_anchor_tags(obj); _txt = inline_markup_scroll(_txt, obj, doc_matters, _suffix); string o = para(_txt, obj); return o; @@ -1007,7 +1005,7 @@ auto para_seg(O,M)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto quote(O)( +string quote(O)( string _txt, const O obj, ) { @@ -1048,13 +1046,12 @@ auto quote(O)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto quote_scroll(O,M)( +string quote_scroll(O,M)( string _txt, const O obj, M doc_matters, string _suffix = ".html", ) { - auto tags = _xhtml_anchor_tags(obj); _txt = inline_markup_scroll(_txt, obj, doc_matters, _suffix); string o = quote(_txt, obj); return o; @@ -1089,7 +1086,7 @@ auto quote_seg(O,M)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto group(O)( +string group(O)( string _txt, const O obj, ) { @@ -1130,14 +1127,13 @@ auto group(O)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto group_scroll(O,M)( +string group_scroll(O,M)( string _txt, const O obj, M doc_matters, string _suffix = ".html", string _xml_type = "html", ) { - auto tags = _xhtml_anchor_tags(obj); _txt = inline_markup_scroll(_txt, obj, doc_matters, _suffix); string o = group(_txt, obj); return o; @@ -1172,7 +1168,7 @@ auto group_seg(O,M)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto block(O)( +string block(O)( string _txt, const O obj, ) { @@ -1209,14 +1205,13 @@ auto block(O)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto block_scroll(O,M)( +string block_scroll(O,M)( string _txt, const O obj, M doc_matters, string _suffix = ".html", string _xml_type = "html", ) { - auto tags = _xhtml_anchor_tags(obj); _txt = inline_markup_scroll(_txt, obj, doc_matters, _suffix); string o = block(_txt, obj); return o; @@ -1251,7 +1246,7 @@ auto block_seg(O,M)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto verse(O)( +string verse(O)( string _txt, const O obj, ) { @@ -1288,14 +1283,13 @@ auto verse(O)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto verse_scroll(O,M)( +string verse_scroll(O,M)( string _txt, const O obj, M doc_matters, string _suffix = ".html", string _xml_type = "html", ) { - auto tags = _xhtml_anchor_tags(obj); _txt = inline_markup_scroll(_txt, obj, doc_matters, _suffix); string o = verse(_txt, obj); return o; @@ -1329,7 +1323,7 @@ auto verse_seg(O,M)( #+name: xhtml_format_objects_code #+BEGIN_SRC d -auto code(O)( +string code(O)( string _txt, const O obj, ) { @@ -1413,7 +1407,7 @@ auto tablarize(O)( #+name: xhtml_format_objects #+BEGIN_SRC d -auto table(O)( +string table(O)( string _txt, const O obj, ) { @@ -1421,7 +1415,7 @@ auto table(O)( assert(obj.metainfo.is_of_section == "body"); assert(obj.metainfo.is_of_type == "block"); assert(obj.metainfo.is_a == "table"); - auto tags = _xhtml_anchor_tags(obj); + string tags = _xhtml_anchor_tags(obj); _txt = font_face(_txt); auto t = tablarize(_txt, obj); _txt = t[0]; @@ -2046,7 +2040,7 @@ void seg_write_output(M,D,E)( #+name: output_html_css #+BEGIN_SRC d void css(M)( - auto ref M doc_matters, + M doc_matters, ) { auto css = DocReformCss(); auto pth_html = DocReformPathsHTML!()(doc_matters.output_path, doc_matters.src.language); @@ -2073,7 +2067,7 @@ void css(M)( #+name: copy_html_images #+BEGIN_SRC d void images_cp(M)( - auto ref M doc_matters, + M doc_matters, ) { { /+ (copy html images) +/ -- cgit v1.2.3