From 2156dbacad925727c6ed918e04e120df4304c1ed Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Thu, 21 Aug 2025 18:12:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/chsrc-main.c | 27 ++++++--------------------- src/framework/chef.c | 2 +- src/recipe/lang/Go.c | 2 +- src/recipe/lang/NuGet.c | 2 +- src/recipe/os/APT/Linux-Lite.c | 2 +- src/recipe/ware/Homebrew/Homebrew.c | 2 +- 6 files changed, 11 insertions(+), 26 deletions(-) diff --git a/src/chsrc-main.c b/src/chsrc-main.c index 328aa50..bee138b 100644 --- a/src/chsrc-main.c +++ b/src/chsrc-main.c @@ -333,27 +333,12 @@ cli_print_target_features (Target_t *target, const char *input_target_name) void cli_print_target_maintain_info (Target_t *target, const char *input_target_name) { - if (target->authors && target->authors_n > 0) - { - char *msg = ENGLISH ? "Recipe Original Authors: " : "食谱原始作者: "; - printf ("%s", bdblue(msg)); - for (size_t i = 0; i < target->authors_n; i++) - { - if (i > 0) printf (", "); - printf ("%s <%s>", - target->authors[i].name ? target->authors[i].name : "Unknown", - target->authors[i].email ? target->authors[i].email : "unknown@example.com"); - } - printf ("\n"); - } - if (target->created_on) { - char *msg = ENGLISH ? "Recipe Created On: " : "食谱创建时间: "; + char *msg = ENGLISH ? "Recipe Created On: " : "食谱诞生时间: "; printf ("%s%s\n", bdblue(msg), target->created_on); } - { char *msg = ENGLISH ? "Current Chef: " : "当前主厨: "; if (target->chef) @@ -371,7 +356,7 @@ cli_print_target_maintain_info (Target_t *target, const char *input_target_name) { - char *msg = ENGLISH ? "Current Cooks: " : "当前副厨: "; + char *msg = ENGLISH ? "Current Cooks: " : "主要厨师: "; if (target->cooks && target->cooks_n > 0) { printf ("%s", bdblue(msg)); @@ -379,8 +364,8 @@ cli_print_target_maintain_info (Target_t *target, const char *input_target_name) { if (i > 0) printf (", "); printf ("%s <%s>", - target->cooks[i].name ? target->cooks[i].name : "Unknown", - target->cooks[i].email ? target->cooks[i].email : "unknown@example.com"); + target->cooks[i]->name ? target->cooks[i]->name : "Unknown", + target->cooks[i]->email ? target->cooks[i]->email : "unknown@example.com"); } printf ("\n"); } @@ -400,8 +385,8 @@ cli_print_target_maintain_info (Target_t *target, const char *input_target_name) { if (i > 0) printf (", "); printf ("%s <%s>", - target->contributors[i].name ? target->contributors[i].name : "Unknown", - target->contributors[i].email ? target->contributors[i].email : "unknown@example.com"); + target->contributors[i]->name ? target->contributors[i]->name : "Unknown", + target->contributors[i]->email ? target->contributors[i]->email : "unknown@example.com"); } printf ("\n"); } diff --git a/src/framework/chef.c b/src/framework/chef.c index 2f4c89d..0c2c0b8 100644 --- a/src/framework/chef.c +++ b/src/framework/chef.c @@ -191,7 +191,7 @@ chef_verify_contributor (const char *id) if (!c) { char error[256]; - snprintf (error, sizeof (error), "贡献者不存在: %s", id); + snprintf (error, sizeof (error), "贡献者不存在: %s, 是否写错?或者请在 chsrc-main.c 中登记该贡献者", id); chsrc_panic (error); } return c; diff --git a/src/recipe/lang/Go.c b/src/recipe/lang/Go.c index 1019ff7..d717052 100644 --- a/src/recipe/lang/Go.c +++ b/src/recipe/lang/Go.c @@ -28,7 +28,7 @@ pl_go_prelude () chef_set_last_updated (this, "2025-08-10"); chef_set_sources_last_updated (this, "2025-07-12"); - chef_set_chef (this, NULL, NULL); + chef_set_chef (this, NULL); chef_set_cooks (this, 1, "@ccmywish"); chef_set_contributors (this, 2, "@czyt", "@RuiYang"); diff --git a/src/recipe/lang/NuGet.c b/src/recipe/lang/NuGet.c index f1d438d..68b574c 100644 --- a/src/recipe/lang/NuGet.c +++ b/src/recipe/lang/NuGet.c @@ -14,7 +14,7 @@ pl_nuget_prelude () chef_set_last_updated (this, "2025-08-10"); chef_set_sources_last_updated (this, "2024-04-18"); - chef_set_chef (this, NULL, NULL); + chef_set_chef (this, NULL); chef_set_cooks (this, 1, "@ccmywish"); chef_set_contributors (this, 0); diff --git a/src/recipe/os/APT/Linux-Lite.c b/src/recipe/os/APT/Linux-Lite.c index 44aa657..857cfa8 100644 --- a/src/recipe/os/APT/Linux-Lite.c +++ b/src/recipe/os/APT/Linux-Lite.c @@ -14,7 +14,7 @@ os_linuxlite_prelude () chef_set_last_updated (this, "2025-08-10"); chef_set_sources_last_updated (this, "2024-11-21"); - chef_set_chef (this, NULL, NULL); + chef_set_chef (this, NULL); chef_set_cooks (this, 1, "@ccmywish"); chef_set_contributors (this, 1, "@Yangmoooo"); diff --git a/src/recipe/ware/Homebrew/Homebrew.c b/src/recipe/ware/Homebrew/Homebrew.c index f033a73..9e206ad 100644 --- a/src/recipe/ware/Homebrew/Homebrew.c +++ b/src/recipe/ware/Homebrew/Homebrew.c @@ -18,7 +18,7 @@ wr_homebrew_prelude () chef_set_chef (this, NULL); chef_set_cooks (this, 1, "@ccmywish"); - chef_set_contributors (this, 1, "@Word2VecT"; + chef_set_contributors (this, 1, "@Word2VecT"); chef_allow_local_mode (this, CanNot, NULL, NULL); chef_allow_english(this);