重命名 contributors 为 sauciers

This commit is contained in:
Aoran Zeng 2025-08-22 14:34:58 +08:00
parent 8130f11cd1
commit 6600099283
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
3 changed files with 18 additions and 21 deletions

View File

@ -383,22 +383,20 @@ cli_print_target_maintain_info (Target_t *target, const char *input_target_name)
} }
{ {
char *msg = ENGLISH ? "Contributors: " : "调味: "; char *msg = ENGLISH ? "Sauciers: " : "调味: ";
if (target->contributors && target->contributors_n > 0) if (target->sauciers && target->sauciers_n > 0)
{ {
printf ("%s", bdblue(msg)); 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 (", "); if (i > 0) printf (", ");
printf ("%s <%s>", printf ("%s <%s>", target->sauciers[i]->name, target->sauciers[i]->email );
target->contributors[i]->name ? target->contributors[i]->name : "Unknown",
target->contributors[i]->email ? target->contributors[i]->email : "unknown@example.com");
} }
printf ("\n"); br();
} }
else else
{ {
char *msg1 = CHINESE ? "暂空缺, 欢迎参与贡献!" : "Vacant, Welcome to contribute!"; char *msg1 = CHINESE ? "暂空缺, 欢迎参与贡献" : "Vacant, Welcome to contribute!";
printf ("%s%s\n", bdblue(msg), bdgreen(msg1)); printf ("%s%s\n", bdblue(msg), bdgreen(msg1));
} }
} }

View File

@ -261,21 +261,21 @@ chef_set_contributors (Target_t *target, uint32_t count, ...)
if (count == 0) if (count == 0)
{ {
target->contributors = NULL; target->sauciers = NULL;
target->contributors_n = 0; target->sauciers_n = 0;
return; return;
} }
va_list args; va_list args;
va_start (args, count); va_start (args, count);
target->contributors = xy_malloc0 (count * sizeof (Contributor_t*)); target->sauciers = xy_malloc0 (count * sizeof (Contributor_t*));
target->contributors_n = count; target->sauciers_n = count;
for (uint32_t i = 0; i < count; i++) for (uint32_t i = 0; i < count; i++)
{ {
char *id = va_arg (args, char*); char *id = va_arg (args, char*);
target->contributors[i] = chef_verify_contributor (id); target->sauciers[i] = chef_verify_contributor (id);
} }
} }

View File

@ -2,12 +2,12 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
* ------------------------------------------------------------- * -------------------------------------------------------------
* File Name : struct.h * File Name : struct.h
* File Authors : Aoran Zeng <ccmywish@qq.com> * File Authors : <ccmywish@qq.com>
* | Heng Guo <2085471348@qq.com> * | <2085471348@qq.com>
* Contributors : Shengwei Chen <414685209@qq.com> * Contributors : Shengwei Chen <414685209@qq.com>
* | * |
* Created On : <2023-08-29> * Created On : <2023-08-29>
* Last Modified : <2025-08-20> * Last Modified : <2025-08-22>
* *
* chsrc struct * chsrc struct
* ------------------------------------------------------------*/ * ------------------------------------------------------------*/
@ -151,12 +151,11 @@ typedef struct Target_t
char *last_updated; char *last_updated;
char *sources_last_updated; char *sources_last_updated;
Contributor_t *chef; /* 该 recipe 的负责人 */ Contributor_t *chef; /* 该 recipe *当前*负责人 (可以任职也可以休职) */
Contributor_t **cooks; /* 该 recipe 的核心作者 */ Contributor_t **cooks; /* 该 recipe 的主要作者 */
size_t cooks_n; size_t cooks_n;
Contributor_t **sauciers; /* 该 recipe 的次要贡献者 (除主要作者外的其他人) */
Contributor_t **contributors; /* 该 recipe 的所有贡献者(除核心作者外的其他人) */ size_t sauciers_n;
size_t contributors_n;
} }
Target_t; Target_t;