From 6600099283ec33e2de24c818e9a639bca0573be8 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Fri, 22 Aug 2025 14:34:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=20contributors=20?= =?UTF-8?q?=E4=B8=BA=20sauciers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/chsrc-main.c | 14 ++++++-------- src/framework/chef.c | 10 +++++----- src/framework/struct.h | 15 +++++++-------- 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/src/chsrc-main.c b/src/chsrc-main.c index 3063aea..a6574f8 100644 --- a/src/chsrc-main.c +++ b/src/chsrc-main.c @@ -383,22 +383,20 @@ cli_print_target_maintain_info (Target_t *target, const char *input_target_name) } { - char *msg = ENGLISH ? "Contributors: " : "调味: "; - if (target->contributors && target->contributors_n > 0) + char *msg = ENGLISH ? "Sauciers: " : "调味: "; + if (target->sauciers && target->sauciers_n > 0) { printf ("%s", bdblue(msg)); - for (size_t i = 0; i < target->contributors_n; i++) + for (size_t i = 0; i < target->sauciers_n; i++) { 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"); + printf ("%s <%s>", target->sauciers[i]->name, target->sauciers[i]->email ); } - printf ("\n"); + br(); } else { - char *msg1 = CHINESE ? "暂空缺, 欢迎参与贡献!" : "Vacant, Welcome to contribute!"; + char *msg1 = CHINESE ? "暂空缺, 欢迎参与贡献" : "Vacant, Welcome to contribute!"; printf ("%s%s\n", bdblue(msg), bdgreen(msg1)); } } diff --git a/src/framework/chef.c b/src/framework/chef.c index b191797..2ba5b21 100644 --- a/src/framework/chef.c +++ b/src/framework/chef.c @@ -261,21 +261,21 @@ chef_set_contributors (Target_t *target, uint32_t count, ...) if (count == 0) { - target->contributors = NULL; - target->contributors_n = 0; + target->sauciers = NULL; + target->sauciers_n = 0; return; } va_list args; va_start (args, count); - target->contributors = xy_malloc0 (count * sizeof (Contributor_t*)); - target->contributors_n = count; + target->sauciers = xy_malloc0 (count * sizeof (Contributor_t*)); + target->sauciers_n = count; for (uint32_t i = 0; i < count; i++) { char *id = va_arg (args, char*); - target->contributors[i] = chef_verify_contributor (id); + target->sauciers[i] = chef_verify_contributor (id); } } diff --git a/src/framework/struct.h b/src/framework/struct.h index ab9d123..e984893 100644 --- a/src/framework/struct.h +++ b/src/framework/struct.h @@ -2,12 +2,12 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------- * File Name : struct.h - * File Authors : Aoran Zeng - * | Heng Guo <2085471348@qq.com> + * File Authors : 曾奥然 + * | 郭恒 <2085471348@qq.com> * Contributors : Shengwei Chen <414685209@qq.com> * | * Created On : <2023-08-29> - * Last Modified : <2025-08-20> + * Last Modified : <2025-08-22> * * chsrc struct * ------------------------------------------------------------*/ @@ -151,12 +151,11 @@ typedef struct Target_t char *last_updated; char *sources_last_updated; - Contributor_t *chef; /* 该 recipe 的负责人 */ - Contributor_t **cooks; /* 该 recipe 的核心作者 */ + Contributor_t *chef; /* 该 recipe *当前*的总负责人 (可以任职也可以休职) */ + Contributor_t **cooks; /* 该 recipe 的主要作者 */ size_t cooks_n; - - Contributor_t **contributors; /* 该 recipe 的所有贡献者(除核心作者外的其他人) */ - size_t contributors_n; + Contributor_t **sauciers; /* 该 recipe 的次要贡献者 (除主要作者外的其他人) */ + size_t sauciers_n; } Target_t;