diff options
Diffstat (limited to 'org/ocda_functions.org')
-rw-r--r-- | org/ocda_functions.org | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/org/ocda_functions.org b/org/ocda_functions.org index ecc8b2f..070b842 100644 --- a/org/ocda_functions.org +++ b/org/ocda_functions.org @@ -3197,16 +3197,39 @@ pure ObjGenericComposite obj_dom_set_collapsed_tags()( #+NAME: ocdaFunc_obj_digest #+HEADER: :noweb yes #+BEGIN_SRC d +<<ocdaFunc_obj_digest_return>> +#+END_SRC + +****** return object digest + +#+NAME: ocdaFunc_obj_digest_return +#+HEADER: :noweb yes +#+BEGIN_SRC d // ↓ - object digest pure ubyte[32] obj_digest()( ObjGenericComposite obj, ) { obj.metainfo.sha256 = obj.text.sha256Of; - // if (obj.metainfo.is_a == "heading") { - // writeln(obj.metainfo.sha256.toHexString, " ", obj.metainfo.ocn, " ", obj.metainfo.is_a, " ", obj.metainfo.heading_lev_markup); - // } else { - // writeln(obj.metainfo.sha256.toHexString, " ", obj.metainfo.ocn, " ", obj.metainfo.is_a); - // } + return obj.metainfo.sha256; +} +// ↑ - object digest +#+END_SRC + +****** screen show/debug object digest + +#+NAME: ocdaFunc_obj_digest_debug +#+HEADER: :noweb yes +#+BEGIN_SRC d +// ↓ - object digest +ubyte[32] obj_digest()( + ObjGenericComposite obj, +) { + obj.metainfo.sha256 = obj.text.sha256Of; + if (obj.metainfo.is_a == "heading") { + writeln(obj.metainfo.sha256.toHexString, " ", obj.metainfo.ocn, " ", obj.metainfo.is_a, " ", obj.metainfo.heading_lev_markup); + } else { + writeln(obj.metainfo.sha256.toHexString, " ", obj.metainfo.ocn, " ", obj.metainfo.is_a); + } return obj.metainfo.sha256; } // ↑ - object digest |