Skip to content

Commit e86afb5

Browse files
committed
Using Cook
1 parent d6f2d65 commit e86afb5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+101
-99
lines changed

doc/03-CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@
3535
(1)
3636

3737
1. **如果你是 recipe Chef,则你完全负责这个 recipe,如果你拥有写权限,你可以直接推送代码到 `dev` 分支**
38-
2. 如果你是 recipe Sous Chef,则你需要参考 [04-MAINTAINERS.md](./04-MAINTAINERS.md),如果只有你一个人,且你拥有写权限,你可以直接推送代码。如果有多人,则需要提一个 issue,介绍方案,然后 @ 所有 Sous Chef 来 review
38+
2. 如果你是 recipe Cook,则你需要参考 [04-MAINTAINERS.md](./04-MAINTAINERS.md),如果只有你一个人,且你拥有写权限,你可以直接推送代码。如果有多人,则需要提一个 issue,介绍方案,然后 @ 所有 Cook 来 review
3939

4040
---
4141

4242
(2)
4343

44-
1. 需要先搜索你修改的部分涉及到的 recipe,然后提 issue @ 所有相关的 recipe Sous Chef 来 review
45-
2. 如果涉及了所有 recipe,则 @ framework Sous Chef,而无需把所有 recipe 的 Sous Chef 都喊过来,但是如果觉得有必要,可以 @ 任意你觉得有能力 review 和能给出建议的人来 review
44+
1. 需要先搜索你修改的部分涉及到的 recipe,然后提 issue @ 所有相关的 recipe Cook 来 review
45+
2. 如果涉及了所有 recipe,则 @ framework Cook,而无需把所有 recipe 的 Cook 都喊过来,但是如果觉得有必要,可以 @ 任意你觉得有能力 review 和能给出建议的人来 review
4646

4747
<br>
4848

src/chsrc-main.c

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -392,11 +392,6 @@ cli_print_target_features (Target_t *target, const char *input_target_name)
392392
void
393393
cli_print_target_maintain_info (Target_t *target, const char *input_target_name)
394394
{
395-
{
396-
char *msg = ENGLISH ? "Maintainer Information:\n" : "维护信息:\n";
397-
say (bdgreen(msg));
398-
}
399-
400395
if (target->authors && target->authors_n > 0)
401396
{
402397
char *msg = ENGLISH ? "Recipe Original Authors: " : "食谱原始作者: ";
@@ -429,16 +424,16 @@ cli_print_target_maintain_info (Target_t *target, const char *input_target_name)
429424

430425

431426
{
432-
char *msg = ENGLISH ? "Current Sous Chefs: " : "当前副厨: ";
433-
if (target->sous_chefs && target->sous_chefs_n > 0)
427+
char *msg = ENGLISH ? "Current Cooks: " : "当前副厨: ";
428+
if (target->cooks && target->cooks_n > 0)
434429
{
435430
printf ("%s", bdblue(msg));
436-
for (size_t i = 0; i < target->sous_chefs_n; i++)
431+
for (size_t i = 0; i < target->cooks_n; i++)
437432
{
438433
if (i > 0) printf (", ");
439434
printf ("%s <%s>",
440-
target->sous_chefs[i].name ? target->sous_chefs[i].name : "Unknown",
441-
target->sous_chefs[i].email ? target->sous_chefs[i].email : "[email protected]");
435+
target->cooks[i].name ? target->cooks[i].name : "Unknown",
436+
target->cooks[i].email ? target->cooks[i].email : "[email protected]");
442437
}
443438
printf ("\n");
444439
}
@@ -622,7 +617,6 @@ get_target (const char *input, TargetOp code, char *option)
622617
if (target->setfn)
623618
{
624619
target->setfn(option);
625-
cli_print_target_maintain_info (target, input);
626620
}
627621
else chsrc_error (xy_strjoin (3, "暂未对 ", input, " 实现 set 功能,邀您帮助: chsrc issue"));
628622
}
@@ -631,7 +625,6 @@ get_target (const char *input, TargetOp code, char *option)
631625
if (target->resetfn)
632626
{
633627
target->resetfn(option);
634-
cli_print_target_maintain_info (target, input);
635628
}
636629
else chsrc_error (xy_strjoin (3, "暂未对 ", input, " 实现 reset 功能,邀您帮助: chsrc issue"));
637630
}
@@ -640,7 +633,6 @@ get_target (const char *input, TargetOp code, char *option)
640633
if (target->getfn)
641634
{
642635
target->getfn("");
643-
cli_print_target_maintain_info (target, input);
644636
}
645637
else chsrc_error (xy_strjoin (3, "暂未对 ", input, " 实现 get 功能,邀您帮助: chsrc issue"));
646638
}
@@ -667,14 +659,25 @@ get_target (const char *input, TargetOp code, char *option)
667659

668660
cli_print_target_available_sources (target->sources, target->sources_n);
669661
cli_print_target_features (target, input);
662+
663+
{
664+
char *msg = ENGLISH ? "Maintainer Information:\n" : "维护信息:\n";
665+
say (bdgreen(msg));
670666
cli_print_target_maintain_info (target, input);
667+
}
671668
}
672669
else if (TargetOp_Measure_Source==code)
673670
{
674671
auto_select_mirror (target->sources, target->sources_n, input);
675672
return true;
676673
}
677674

675+
if (TargetOp_Get_Source==code || TargetOp_Set_Source==code || TargetOp_Reset_Source==code)
676+
{
677+
br();
678+
cli_print_target_maintain_info (target, input);
679+
}
680+
678681
if (TargetOp_Set_Source==code || TargetOp_Measure_Source==code)
679682
{
680683
cli_notify_lastly_for_users();

src/framework/chef.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,31 +161,31 @@ chef_set_chef (Target_t *target, char *name, char *email)
161161

162162

163163
void
164-
chef_set_sous_chefs (Target_t *target, size_t count, ...)
164+
chef_set_cooks (Target_t *target, size_t count, ...)
165165
{
166166
if (!target)
167167
return;
168168

169169
if (count == 0)
170170
{
171-
target->sous_chefs = NULL;
172-
target->sous_chefs_n = 0;
171+
target->cooks = NULL;
172+
target->cooks_n = 0;
173173
return;
174174
}
175175

176176
va_list args;
177177
va_start(args, count);
178178

179-
target->sous_chefs = xy_malloc0 (count * sizeof(Contributor_t));
180-
target->sous_chefs_n = count;
179+
target->cooks = xy_malloc0 (count * sizeof(Contributor_t));
180+
target->cooks_n = count;
181181

182182
for (size_t i = 0; i < count; i++)
183183
{
184184
char *name = va_arg(args, char*);
185185
char *email = va_arg(args, char*);
186186

187-
target->sous_chefs[i].name = xy_strdup(name);
188-
target->sous_chefs[i].email = xy_strdup(email);
187+
target->cooks[i].name = xy_strdup(name);
188+
target->cooks[i].email = xy_strdup(email);
189189
}
190190

191191
va_end(args);

src/framework/struct.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ typedef struct Target_t
151151
Contributor_t *contributors;
152152
size_t contributors_n;
153153

154-
Contributor_t *chef; /* Chef 仅有一个 */
155-
Contributor_t *sous_chefs; /* Sous Chef 可以有多个 */
156-
size_t sous_chefs_n;
154+
Contributor_t *chef; /* Chef 仅有一个 */
155+
Contributor_t *cooks; /* Cook 可以有多个 */
156+
size_t cooks_n;
157157
}
158158
Target_t;
159159

src/recipe/lang/Clojure.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pl_clojure_prelude ()
1616

1717
chef_set_authors (this, 1, "Aoran Zeng", "[email protected]");
1818
chef_set_chef (this, NULL, NULL);
19-
chef_set_sous_chefs (this, 0);
19+
chef_set_cooks (this, 0);
2020
chef_set_contributors (this, 0);
2121

2222
chef_allow_local_mode (this, FullyCan, NULL, NULL);

src/recipe/lang/Dart/Flutter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pl_dart_flutter_prelude (void)
1616

1717
chef_set_authors (this, 1, "Aoran Zeng", "[email protected]");
1818
chef_set_chef (this, NULL, NULL);
19-
chef_set_sous_chefs (this, 0);
19+
chef_set_cooks (this, 0);
2020
chef_set_contributors (this, 2,
2121
"czyt", "[email protected]",
2222
"MadDogOwner", "[email protected]");

src/recipe/lang/Dart/Pub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pl_dart_prelude (void)
1616

1717
chef_set_authors (this, 1, "Aoran Zeng", "[email protected]");
1818
chef_set_chef (this, NULL, NULL);
19-
chef_set_sous_chefs (this, 0);
19+
chef_set_cooks (this, 0);
2020
chef_set_contributors (this, 2,
2121
"czyt", "[email protected]",
2222
"MadDogOwner", "[email protected]");

src/recipe/lang/Go.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pl_go_prelude ()
3030

3131
chef_set_authors (this, 1, "Aoran Zeng", "[email protected]");
3232
chef_set_chef (this, NULL, NULL);
33-
chef_set_sous_chefs (this, 0);
33+
chef_set_cooks (this, 0);
3434
chef_set_contributors (this, 2,
3535
"czyt", "[email protected]",
3636
"Rui Yang", "[email protected]");

src/recipe/lang/Haskell.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pl_haskell_prelude ()
1616

1717
chef_set_authors (this, 1, "Aoran Zeng", "[email protected]");
1818
chef_set_chef (this, NULL, NULL);
19-
chef_set_sous_chefs (this, 0);
19+
chef_set_cooks (this, 0);
2020
chef_set_contributors (this, 0);
2121

2222
chef_allow_local_mode (this, CanNot, NULL, NULL);

src/recipe/lang/Java.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pl_java_prelude ()
1616

1717
chef_set_authors (this, 1, "Aoran Zeng", "[email protected]");
1818
chef_set_chef (this, NULL, NULL);
19-
chef_set_sous_chefs (this, 0);
19+
chef_set_cooks (this, 0);
2020
chef_set_contributors (this, 1,
2121
"BingChunMoLi", "[email protected]");
2222

0 commit comments

Comments
 (0)