From 62679726220479d17fa1b23d3547c03e75b9ed75 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Fri, 22 Aug 2025 17:33:13 +0800 Subject: [PATCH] Misc --- doc/10-如何编写recipe.md | 2 +- doc/README.md | 8 ++++---- src/chsrc-main.c | 6 +++--- src/framework/chef.c | 4 ++-- src/framework/struct.h | 7 ------- src/rawstr4c.md | 4 ++-- 6 files changed, 12 insertions(+), 19 deletions(-) diff --git a/doc/10-如何编写recipe.md b/doc/10-如何编写recipe.md index c4f457f..af88c70 100644 --- a/doc/10-如何编写recipe.md +++ b/doc/10-如何编写recipe.md @@ -18,7 +18,7 @@
-我鼓励你为新的软件添加换源支持,因为通过 `chsrc` 框架,这将比写 shell 脚本更加轻松,你的贡献也将非常有价值。理论上每一个 `recipe` 都需要有专人长时间维护 ([招募](https://github.com/RubyMetric/chsrc/issues/130))。 +我鼓励你为新的软件添加换源支持,因为通过 `chsrc` 框架,这将比写 shell 脚本更加轻松,你的贡献也将非常有价值。理论上每一个 `recipe` 都需要有专人长时间维护 ([招募](https://github.com/RubyMetric/chsrc/issues/275))。 - 本项目采用 `GPLv3+` 协议,是真正的**自由软件**,而非仅仅是开源软件 - 代码规范灵活遵循 `GNU` 标准(若标准干扰了可维护性,则并不采纳) diff --git a/doc/README.md b/doc/README.md index c9f0fda..d1af190 100644 --- a/doc/README.md +++ b/doc/README.md @@ -3,11 +3,11 @@ ! ------------------------------------------------------------- ! Doc Type : Markdown ! Doc Name : (Document Introduction.md) - ! Doc Authors : Aoran Zeng - ! Contributors : Nul None + ! Doc Authors : 曾奥然 + ! Contributors : Nul None ! | ! Created On : <2024-12-27> - ! Last Modified : <2025-08-11> + ! Last Modified : <2025-08-22> ! ---------------------------------------------------------- --> # 文档说明 @@ -23,7 +23,7 @@ E2E (End-to-End) 开发文档: 具体 recipe 相关: - 如何编写一个具体的 recipe,请参考 [10-如何编写recipe.md](./10-如何编写recipe.md) -- 如何修改换源URL、模糊/精准测速URL,请参考 [11-如何设置换源链接与测速链接.md](./11-如何设置换源链接与测速链接.md) +- 如何修改换源链接、模糊/精准测速链接,请参考 [11-如何设置换源链接与测速链接.md](./11-如何设置换源链接与测速链接.md)
diff --git a/src/chsrc-main.c b/src/chsrc-main.c index 29c16b5..86a05d7 100644 --- a/src/chsrc-main.c +++ b/src/chsrc-main.c @@ -294,7 +294,7 @@ cli_print_target_features (Target_t *target, const char *input_target_name) } { - char *msg = ENGLISH ? " UserDefine: using user-defined source URL " : " UserDefine: 用户自定义换源URL "; + char *msg = ENGLISH ? " UserDefine: using user-defined source link " : " UserDefine: 用户自定义换源链接 "; char *user_define_msg = xy_strcat (5, msg, "| chsrc set ", input_target_name, " https://user-define-url.org/", input_target_name); if (target->can_user_define) printf (" %s%s\n", bdgreen(YesMark), purple(user_define_msg)); else printf (" %s%s\n", bdred(NoMark), user_define_msg);br(); @@ -426,7 +426,7 @@ cli_print_version () void cli_print_help () { - char *version_string = purple("v" Chsrc_Version "-" Chsrc_Release_Date); + char *version_string = "v" Chsrc_Version "-" Chsrc_Release_Date; const char *raw = CHINESE ? RAWSTR_chsrc_USAGE_CHINESE : RAWSTR_chsrc_USAGE_ENGLISH; @@ -615,7 +615,7 @@ get_target (const char *input, TargetOp code, char *option) { char *msg1 = ENGLISH ? "Mirror abbr" : "镜像站简写"; - char *msg2 = ENGLISH ? "Source URL" : "换源URL"; + char *msg2 = ENGLISH ? "Source URL" : "换源链接"; char *msg3 = ENGLISH ? "Mirror Name" : "镜像站"; char *format = ENGLISH ? " %-13s%-33s%-38s%s\n" : " %-13s%-36s%-46s%s\n"; printf (format, "code", msg1, msg2, msg3); diff --git a/src/framework/chef.c b/src/framework/chef.c index ad4bcf4..1cb94a8 100644 --- a/src/framework/chef.c +++ b/src/framework/chef.c @@ -113,7 +113,7 @@ chef_set_provider_speed_measure_accuracy (SourceProvider_t *provider, bool accur /** - * @brief 提供一个函数,这个函数基于 "换源 URL" 和用户提供的数据来构造和填充精准测速链接 + * @brief 提供一个函数,这个函数基于 "换源链接" 和用户提供的数据来构造和填充精准测速链接 */ void chef_set_sources_speed_measure_url_with_func ( @@ -143,7 +143,7 @@ chef_set_sources_speed_measure_url_with_func ( /** - * @brief 给 "换源 URL" 增加一个后缀来构造和填充专用测速链接 + * @brief 给 "换源链接" 增加一个后缀来构造和填充专用测速链接 */ void chef_set_sources_speed_measure_url_with_postfix (Target_t *target, char *postfix) diff --git a/src/framework/struct.h b/src/framework/struct.h index d8daa3c..ef3bbdc 100644 --- a/src/framework/struct.h +++ b/src/framework/struct.h @@ -158,13 +158,6 @@ typedef struct Target_t Target_t; -typedef struct TargetRegisterInfo_t -{ - Target_t *target; /* target 本身 */ - void (*prelude) (void); /* 填充 target 信息等预置操作 */ -} -TargetRegisterInfo_t; - #define def_target(t, aliases) void t##_getsrc(char *option);void t##_setsrc(char *option);void t##_resetsrc(char *option); Target_t t##_target={aliases}; diff --git a/src/rawstr4c.md b/src/rawstr4c.md index 0447e3f..9fad98a 100644 --- a/src/rawstr4c.md +++ b/src/rawstr4c.md @@ -72,7 +72,7 @@ 邀请您担任 Chef, 为用户把关您熟悉的 recipe 源代码地址: https://github.com/RubyMetric/chsrc - 成为维护者: https://github.com/RubyMetric/chsrc/issues/130 + 成为维护者: https://github.com/RubyMetric/chsrc/issues/275 ```
@@ -123,7 +123,7 @@ MAINTAIN: We invite you to become a Chef to ensure the quality of recipes you are familiar with for users: Source Code: @url@ - Become a Maintainer: https://github.com/RubyMetric/chsrc/issues/130 + Become a Maintainer: https://github.com/RubyMetric/chsrc/issues/275 ```