X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Flibrary%2Fnodes%2Fpackable_tree.cpp;h=168e3500429e80d68dd91b7a156c20b29d0c3e92;hb=46db3e069f6346301f8d55a1d155a4904f18ec1e;hp=a38f88ad86837f98d7fd8b6879636daa0e067e7b;hpb=457b128b77b5b4a0b7dd3094de543de2ce1477ad;p=feisty_meow.git diff --git a/nucleus/library/nodes/packable_tree.cpp b/nucleus/library/nodes/packable_tree.cpp index a38f88ad..168e3500 100644 --- a/nucleus/library/nodes/packable_tree.cpp +++ b/nucleus/library/nodes/packable_tree.cpp @@ -23,7 +23,7 @@ using namespace basis; using namespace structures; -//#define DEBUG_PACKABLE_TREE +#define DEBUG_PACKABLE_TREE // uncomment for noisy debugging. #undef LOG @@ -92,8 +92,8 @@ LOG(a_sprintf("len A %d", size_accumulator)); void packable_tree::packit(byte_array &packed_form, const packable_tree *current_node) { -LOG(a_sprintf("packing node %x", current_node)); -LOG(a_sprintf("size A %d", packed_form.length())); +//LOG(a_sprintf("packing node %x", current_node)); +//LOG(a_sprintf("size A %d", packed_form.length())); FUNCDEF("packit"); if (!current_node) throw_error(static_class_name(), func, "current node is nil"); @@ -119,9 +119,9 @@ throw_error(current_node->class_name(), func, "failure calculating size"); } // stuff the command unit. command.pack(packed_form); -LOG(a_sprintf("size B %d", packed_form.length())); +//LOG(a_sprintf("size B %d", packed_form.length())); packed_form += temp_store; // main chunk is not packed, just added. -LOG(a_sprintf("size C %d", packed_form.length())); +//LOG(a_sprintf("size C %d", packed_form.length())); } int packable_tree::recursive_packed_size() const @@ -157,7 +157,7 @@ packable_tree *packable_tree::recursive_unpack(byte_array &packed_form, // get the first command out of the package. if (!cmd.unpack(packed_form)) { //complain. - return false; + return NIL; } packable_tree *new_branch = NIL;