diff --git a/src/chsrc-main.c b/src/chsrc-main.c index bee138b..fd5724b 100644 --- a/src/chsrc-main.c +++ b/src/chsrc-main.c @@ -529,6 +529,8 @@ typedef enum { bool get_target (const char *input, TargetOp code, char *option) { + chsrc_register_contributors (); + Target_t *target = NULL; bool matched = iterate_menu (chsrc_pl_menu, input, &target); @@ -537,8 +539,6 @@ get_target (const char *input, TargetOp code, char *option) if (!matched) return false; - chsrc_register_contributors (); - if (TargetOp_Set_Source==code) { if (target->setfn) diff --git a/src/framework/chef.c b/src/framework/chef.c index 0c2c0b8..4e10ad3 100644 --- a/src/framework/chef.c +++ b/src/framework/chef.c @@ -305,19 +305,17 @@ chef_debug_target (Target_t *target) #ifdef XY_DEBUG if (!target) { - chsrc_debug2 ("t", "Target is NULL"); + chsrc_debug2 ("target", "Target is NULL"); return; } - say ("Debug Target Information:"); + say ("DEBUG Target Information:"); printf (" Get Function: %p\n", target->getfn); printf (" Set Function: %p\n", target->setfn); printf (" Reset Function: %p\n", target->resetfn); printf (" Sources: %p\n", target->sources); printf (" Sources Count: %lld\n", target->sources_n); - printf (" Authors: %p\n", target->authors); - printf (" Authors Count: %lld\n", target->authors_n); printf (" Chef: %p\n", target->chef); printf (" Cooks: %p\n", target->cooks); printf (" Cooks Count: %lld\n", target->cooks_n); @@ -325,3 +323,22 @@ chef_debug_target (Target_t *target) printf (" Contributors Count: %lld\n", target->contributors_n); #endif } + + +void +chef_debug_contributor (Contributor_t *contributor) +{ +#ifdef XY_DEBUG + if (!contributor) + { + chsrc_debug2 ("contrib", "Contributor is NULL"); + return; + } + + say ("DEBUG Contributor Information:"); + printf (" ID: %s\n", contributor->id); + printf (" Name: %s\n", contributor->name); + printf (" Email: %s\n", contributor->email); + printf (" DisplayName: %s\n", contributor->display_name); +#endif +}