mirror of
https://github.com/RubyMetric/chsrc
synced 2025-09-10 04:16:41 +08:00
添加 chef_debug_contributor()
This commit is contained in:
parent
2156dbacad
commit
46083f03ec
@ -529,6 +529,8 @@ typedef enum {
|
|||||||
bool
|
bool
|
||||||
get_target (const char *input, TargetOp code, char *option)
|
get_target (const char *input, TargetOp code, char *option)
|
||||||
{
|
{
|
||||||
|
chsrc_register_contributors ();
|
||||||
|
|
||||||
Target_t *target = NULL;
|
Target_t *target = NULL;
|
||||||
|
|
||||||
bool matched = iterate_menu (chsrc_pl_menu, input, &target);
|
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;
|
if (!matched) return false;
|
||||||
|
|
||||||
chsrc_register_contributors ();
|
|
||||||
|
|
||||||
if (TargetOp_Set_Source==code)
|
if (TargetOp_Set_Source==code)
|
||||||
{
|
{
|
||||||
if (target->setfn)
|
if (target->setfn)
|
||||||
|
@ -305,19 +305,17 @@ chef_debug_target (Target_t *target)
|
|||||||
#ifdef XY_DEBUG
|
#ifdef XY_DEBUG
|
||||||
if (!target)
|
if (!target)
|
||||||
{
|
{
|
||||||
chsrc_debug2 ("t", "Target is NULL");
|
chsrc_debug2 ("target", "Target is NULL");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
say ("Debug Target Information:");
|
say ("DEBUG Target Information:");
|
||||||
printf (" Get Function: %p\n", target->getfn);
|
printf (" Get Function: %p\n", target->getfn);
|
||||||
printf (" Set Function: %p\n", target->setfn);
|
printf (" Set Function: %p\n", target->setfn);
|
||||||
printf (" Reset Function: %p\n", target->resetfn);
|
printf (" Reset Function: %p\n", target->resetfn);
|
||||||
printf (" Sources: %p\n", target->sources);
|
printf (" Sources: %p\n", target->sources);
|
||||||
printf (" Sources Count: %lld\n", target->sources_n);
|
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 (" Chef: %p\n", target->chef);
|
||||||
printf (" Cooks: %p\n", target->cooks);
|
printf (" Cooks: %p\n", target->cooks);
|
||||||
printf (" Cooks Count: %lld\n", target->cooks_n);
|
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);
|
printf (" Contributors Count: %lld\n", target->contributors_n);
|
||||||
#endif
|
#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
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user