diff --git a/src/chsrc-main.c b/src/chsrc-main.c index 1bcab95..1430dd0 100644 --- a/src/chsrc-main.c +++ b/src/chsrc-main.c @@ -559,8 +559,8 @@ get_target (const char *input, TargetOp code, char *option) if (target->featfn) { - FeatInfo fi = target->featfn(""); - cli_print_target_features (fi, input); + FeatInfo f = target->featfn(""); + cli_print_target_features (f, input); } } else if (TargetOp_Measure_Source==code) diff --git a/src/recipe/lang/Dart/Flutter.c b/src/recipe/lang/Dart/Flutter.c index ce14c7c..1aa8023 100644 --- a/src/recipe/lang/Dart/Flutter.c +++ b/src/recipe/lang/Dart/Flutter.c @@ -92,19 +92,19 @@ pl_dart_flutter_setsrc (char *option) FeatInfo pl_dart_flutter_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = false; + f.can_get = true; + f.can_reset = false; - fi.cap_locally = CanNot; - fi.locally = NULL; - fi.can_english = true; + f.cap_locally = CanNot; + f.locally = NULL; + f.can_english = true; - fi.can_user_define = true; + f.can_user_define = true; - fi.note = "该换源通过写入环境变量实现,若多次换源,请手动清理profile文件"; - return fi; + f.note = "该换源通过写入环境变量实现,若多次换源,请手动清理profile文件"; + return f; } def_target_gsf(pl_dart_flutter); diff --git a/src/recipe/lang/Dart/Pub.c b/src/recipe/lang/Dart/Pub.c index da05590..eca1015 100644 --- a/src/recipe/lang/Dart/Pub.c +++ b/src/recipe/lang/Dart/Pub.c @@ -85,19 +85,19 @@ pl_dart_setsrc (char *option) FeatInfo pl_dart_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = false; + f.can_get = true; + f.can_reset = false; - fi.cap_locally = CanNot; - fi.locally = NULL; - fi.can_english = true; + f.cap_locally = CanNot; + f.locally = NULL; + f.can_english = true; - fi.can_user_define = true; + f.can_user_define = true; - fi.note = "该换源通过写入环境变量实现,若多次换源,请手动清理profile文件"; - return fi; + f.note = "该换源通过写入环境变量实现,若多次换源,请手动清理profile文件"; + return f; } def_target_gsf(pl_dart); diff --git a/src/recipe/lang/Node.js/Bun.c b/src/recipe/lang/Node.js/Bun.c index 20e84ac..7265643 100644 --- a/src/recipe/lang/Node.js/Bun.c +++ b/src/recipe/lang/Node.js/Bun.c @@ -65,18 +65,18 @@ pl_nodejs_bun_resetsrc (char *option) FeatInfo pl_nodejs_bun_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = true; + f.can_get = true; + f.can_reset = true; - fi.cap_locally = FullyCan; - fi.locally = NULL; - fi.can_english = true; - fi.can_user_define = true; + f.cap_locally = FullyCan; + f.locally = NULL; + f.can_english = true; + f.can_user_define = true; - fi.note = NULL; - return fi; + f.note = NULL; + return f; } // def_target_gsrf(pl_nodejs_bun); diff --git a/src/recipe/lang/Node.js/Node.js.c b/src/recipe/lang/Node.js/Node.js.c index 6589af3..96834cb 100644 --- a/src/recipe/lang/Node.js/Node.js.c +++ b/src/recipe/lang/Node.js/Node.js.c @@ -113,17 +113,17 @@ pl_nodejs_resetsrc (char *option) FeatInfo pl_nodejs_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = true; + f.can_get = true; + f.can_reset = true; - fi.cap_locally = FullyCan; - fi.locally = "Support npm (chsrc v0.1.7)\nSupport yarn v2 (chsrc v0.1.8.1)\nSupport pnpm (chsrc v0.1.8.2)"; - fi.can_english = true; - fi.can_user_define = true; + f.cap_locally = FullyCan; + f.locally = "Support npm (chsrc v0.1.7)\nSupport yarn v2 (chsrc v0.1.8.1)\nSupport pnpm (chsrc v0.1.8.2)"; + f.can_english = true; + f.can_user_define = true; - return fi; + return f; } def_target_gsrf (pl_nodejs); diff --git a/src/recipe/lang/Node.js/Yarn.c b/src/recipe/lang/Node.js/Yarn.c index 4d848aa..bb50b01 100644 --- a/src/recipe/lang/Node.js/Yarn.c +++ b/src/recipe/lang/Node.js/Yarn.c @@ -92,18 +92,18 @@ pl_nodejs_yarn_resetsrc (char *option) FeatInfo pl_nodejs_yarn_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = true; + f.can_get = true; + f.can_reset = true; - fi.cap_locally = FullyCan; - fi.locally = NULL; - fi.can_english = true; - fi.can_user_define = true; + f.cap_locally = FullyCan; + f.locally = NULL; + f.can_english = true; + f.can_user_define = true; - fi.note = NULL; - return fi; + f.note = NULL; + return f; } // def_target_gsrf(pl_nodejs_yarn); diff --git a/src/recipe/lang/Node.js/npm.c b/src/recipe/lang/Node.js/npm.c index 79325f1..96b66f0 100644 --- a/src/recipe/lang/Node.js/npm.c +++ b/src/recipe/lang/Node.js/npm.c @@ -61,18 +61,18 @@ pl_nodejs_npm_resetsrc (char *option) FeatInfo pl_nodejs_npm_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = true; + f.can_get = true; + f.can_reset = true; - fi.cap_locally = FullyCan; - fi.locally = NULL; - fi.can_english = true; - fi.can_user_define = true; + f.cap_locally = FullyCan; + f.locally = NULL; + f.can_english = true; + f.can_user_define = true; - fi.note = NULL; - return fi; + f.note = NULL; + return f; } // def_target_gsrf(pl_nodejs_npm); diff --git a/src/recipe/lang/Node.js/nvm.c b/src/recipe/lang/Node.js/nvm.c index a57f17a..56b733e 100644 --- a/src/recipe/lang/Node.js/nvm.c +++ b/src/recipe/lang/Node.js/nvm.c @@ -64,18 +64,18 @@ pl_nodejs_nvm_resetsrc (char *option) FeatInfo pl_nodejs_nvm_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = false; + f.can_get = true; + f.can_reset = false; - fi.cap_locally = CanNot; - fi.locally = ""; - fi.can_english = false; - fi.can_user_define = true; + f.cap_locally = CanNot; + f.locally = ""; + f.can_english = false; + f.can_user_define = true; - fi.note = NULL; - return fi; + f.note = NULL; + return f; } // def_target_gsrf(pl_nodejs_nvm); diff --git a/src/recipe/lang/Node.js/pnpm.c b/src/recipe/lang/Node.js/pnpm.c index f5ac031..925386a 100644 --- a/src/recipe/lang/Node.js/pnpm.c +++ b/src/recipe/lang/Node.js/pnpm.c @@ -62,18 +62,18 @@ pl_nodejs_pnpm_resetsrc (char *option) FeatInfo pl_nodejs_pnpm_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = true; + f.can_get = true; + f.can_reset = true; - fi.cap_locally = FullyCan; - fi.locally = NULL; - fi.can_english = true; - fi.can_user_define = true; + f.cap_locally = FullyCan; + f.locally = NULL; + f.can_english = true; + f.can_user_define = true; - fi.note = NULL; - return fi; + f.note = NULL; + return f; } diff --git a/src/recipe/lang/PHP.c b/src/recipe/lang/PHP.c index f00825c..2e807b0 100644 --- a/src/recipe/lang/PHP.c +++ b/src/recipe/lang/PHP.c @@ -64,17 +64,17 @@ pl_php_setsrc (char *option) FeatInfo pl_php_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = false; + f.can_get = true; + f.can_reset = false; - fi.cap_locally = FullyCan; - fi.locally = "composer 支持 (From v0.1.7)"; - fi.can_english = false; - fi.can_user_define = true; + f.cap_locally = FullyCan; + f.locally = "composer 支持 (From v0.1.7)"; + f.can_english = false; + f.can_user_define = true; - return fi; + return f; } def_target_gsf (pl_php); diff --git a/src/recipe/lang/Python/PDM.c b/src/recipe/lang/Python/PDM.c index bcac2c9..70183df 100644 --- a/src/recipe/lang/Python/PDM.c +++ b/src/recipe/lang/Python/PDM.c @@ -63,20 +63,20 @@ pl_python_pdm_resetsrc (char *option) FeatInfo pl_python_pdm_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = true; + f.can_get = true; + f.can_reset = true; // PDM 完全支持项目级换源 - fi.cap_locally = FullyCan; - fi.locally = NULL; + f.cap_locally = FullyCan; + f.locally = NULL; - fi.can_english = true; - fi.can_user_define = true; + f.can_english = true; + f.can_user_define = true; - fi.note = NULL; - return fi; + f.note = NULL; + return f; } // def_target_gsrf(pl_python_pdm); diff --git a/src/recipe/lang/Python/Poetry.c b/src/recipe/lang/Python/Poetry.c index eb7ce99..08d3864 100644 --- a/src/recipe/lang/Python/Poetry.c +++ b/src/recipe/lang/Python/Poetry.c @@ -61,18 +61,18 @@ pl_python_poetry_resetsrc (char *option) FeatInfo pl_python_poetry_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = true; + f.can_get = true; + f.can_reset = true; - fi.cap_locally = FullyCan; - fi.locally = NULL; - fi.can_english = false; - fi.can_user_define = true; + f.cap_locally = FullyCan; + f.locally = NULL; + f.can_english = false; + f.can_user_define = true; - fi.note = NULL; - return fi; + f.note = NULL; + return f; } // def_target_gsrf(pl_python_poetry); diff --git a/src/recipe/lang/Python/Python.c b/src/recipe/lang/Python/Python.c index 4bba6d7..9ed76c8 100644 --- a/src/recipe/lang/Python/Python.c +++ b/src/recipe/lang/Python/Python.c @@ -84,17 +84,17 @@ pl_python_resetsrc (char *option) FeatInfo pl_python_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = true; + f.can_get = true; + f.can_reset = true; - fi.cap_locally = PartiallyCan; - fi.locally = "pip 不支持,其他支持"; - fi.can_english = false; - fi.can_user_define = true; + f.cap_locally = PartiallyCan; + f.locally = "pip 不支持,其他支持"; + f.can_english = false; + f.can_user_define = true; - return fi; + return f; } def_target_gsrf(pl_python); diff --git a/src/recipe/lang/Python/pip.c b/src/recipe/lang/Python/pip.c index f711f9d..73d07ba 100644 --- a/src/recipe/lang/Python/pip.c +++ b/src/recipe/lang/Python/pip.c @@ -73,19 +73,19 @@ pl_python_pip_resetsrc (char *option) FeatInfo pl_python_pip_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = true; + f.can_get = true; + f.can_reset = true; // pip 不支持项目级换源 - fi.cap_locally = CanNot; - fi.locally = NULL; - fi.can_english = true; - fi.can_user_define = true; + f.cap_locally = CanNot; + f.locally = NULL; + f.can_english = true; + f.can_user_define = true; - fi.note = NULL; - return fi; + f.note = NULL; + return f; } // def_target_gsrf(pl_python_pip); diff --git a/src/recipe/lang/Ruby.c b/src/recipe/lang/Ruby.c index ca1a137..ab7edbb 100644 --- a/src/recipe/lang/Ruby.c +++ b/src/recipe/lang/Ruby.c @@ -98,18 +98,18 @@ pl_ruby_resetsrc (char *option) FeatInfo pl_ruby_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = true; + f.can_get = true; + f.can_reset = true; - fi.cap_locally = PartiallyCan; - fi.locally = "gem 不支持; bundler 支持 (From v0.1.6)"; - fi.can_english = false; - fi.can_user_define = true; + f.cap_locally = PartiallyCan; + f.locally = "gem 不支持; bundler 支持 (From v0.1.6)"; + f.can_english = false; + f.can_user_define = true; - fi.note = NULL; - return fi; + f.note = NULL; + return f; } diff --git a/src/recipe/lang/Rust/Cargo.c b/src/recipe/lang/Rust/Cargo.c index 57f7e37..3b63432 100644 --- a/src/recipe/lang/Rust/Cargo.c +++ b/src/recipe/lang/Rust/Cargo.c @@ -73,18 +73,18 @@ pl_rust_cargo_resetsrc (char *option) FeatInfo pl_rust_cargo_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = true; + f.can_get = true; + f.can_reset = true; - fi.cap_locally = PartiallyCan; - fi.locally = "可以基于本项目换源吗?请帮助确认"; - fi.can_english = false; - fi.can_user_define = true; + f.cap_locally = PartiallyCan; + f.locally = "可以基于本项目换源吗?请帮助确认"; + f.can_english = false; + f.can_user_define = true; - fi.note = NULL; - return fi; + f.note = NULL; + return f; } diff --git a/src/recipe/lang/Rust/rustup.c b/src/recipe/lang/Rust/rustup.c index ff2c510..ca135a9 100644 --- a/src/recipe/lang/Rust/rustup.c +++ b/src/recipe/lang/Rust/rustup.c @@ -100,18 +100,18 @@ pl_rust_rustup_resetsrc (char *option) FeatInfo pl_rust_rustup_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = false; + f.can_get = true; + f.can_reset = false; - fi.cap_locally = CanNot; - fi.locally = ""; - fi.can_english = false; - fi.can_user_define = true; + f.cap_locally = CanNot; + f.locally = ""; + f.can_english = false; + f.can_user_define = true; - fi.note = NULL; - return fi; + f.note = NULL; + return f; } diff --git a/src/recipe/os/APT/Armbian.c b/src/recipe/os/APT/Armbian.c index 93f59f7..702c8f3 100644 --- a/src/recipe/os/APT/Armbian.c +++ b/src/recipe/os/APT/Armbian.c @@ -61,16 +61,16 @@ os_armbian_setsrc (char *option) FeatInfo os_armbian_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = false; + f.can_get = true; + f.can_reset = false; - fi.cap_locally = CanNot; - fi.can_english = true; - fi.can_user_define = true; + f.cap_locally = CanNot; + f.can_english = true; + f.can_user_define = true; - return fi; + return f; } def_target_gsf(os_armbian); diff --git a/src/recipe/os/pacman/Arch-Linux.c b/src/recipe/os/pacman/Arch-Linux.c index dd5df26..62d081f 100644 --- a/src/recipe/os/pacman/Arch-Linux.c +++ b/src/recipe/os/pacman/Arch-Linux.c @@ -132,34 +132,34 @@ os_archlinuxcn_setsrc (char *option) FeatInfo os_arch_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = false; + f.can_get = true; + f.can_reset = false; - fi.cap_locally = CanNot; - fi.can_english = true; - fi.can_user_define = true; + f.cap_locally = CanNot; + f.can_english = true; + f.can_user_define = true; - fi.note = "可额外使用 chsrc set archlinuxcn 来更换 Arch Linux CN Repository 源"; - return fi; + f.note = "可额外使用 chsrc set archlinuxcn 来更换 Arch Linux CN Repository 源"; + return f; } FeatInfo os_archlinuxcn_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = false; + f.can_get = true; + f.can_reset = false; - fi.cap_locally = CanNot; - fi.can_english = true; - fi.can_user_define = true; + f.cap_locally = CanNot; + f.can_english = true; + f.can_user_define = true; - fi.note = "可额外使用 chsrc set arch 来更换 Arch Linux 源"; - return fi; + f.note = "可额外使用 chsrc set arch 来更换 Arch Linux 源"; + return f; } diff --git a/src/recipe/template.c b/src/recipe/template.c index db88c53..eabc223 100644 --- a/src/recipe/template.c +++ b/src/recipe/template.c @@ -4,7 +4,7 @@ * File Authors : Aoran Zeng * Contributors : Nil Null * Created On : <2024-08-09> - * Last Modified : <2024-09-13> + * Last Modified : <2024-10-04> * ------------------------------------------------------------- * 本文件作为一个通用模板: * @@ -24,8 +24,8 @@ * ------------------------------------------------------------- * File Authors : Nil Null 尼尔闹先生 * Contributors : Nul None 怒了馕女士 - * Created On : <202x-01-01> https://www.yuque.com/ccmywish/blog/nil-null-and-nul-none - * Last Modified : <202x-01-01> 请更新文件标头 + * Created On : <2024-01-01> https://www.yuque.com/ccmywish/blog/nil-null-and-nul-none + * Last Modified : <2024-01-01> 请更新文件标头 * ------------------------------------------------------------*/ /** @@ -106,18 +106,19 @@ void FeatInfo __feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = false; + f.can_get = true; + f.can_reset = false; - fi.cap_locally = PartiallyCan; - fi.locally = "具体说明是否支持项目级换源..."; - fi.can_english = false; - fi.can_user_define = false; + f.cap_locally = PartiallyCan; + f.locally = "具体说明是否支持项目级换源..."; - fi.note = "备注说明..."; - return fi; + f.can_english = false; + f.can_user_define = false; + + f.note = "备注说明..."; + return f; } diff --git a/src/recipe/ware/Homebrew.c b/src/recipe/ware/Homebrew.c index f6572c8..f72faf0 100644 --- a/src/recipe/ware/Homebrew.c +++ b/src/recipe/ware/Homebrew.c @@ -97,20 +97,20 @@ wr_homebrew_setsrc (char *option) FeatInfo wr_homebrew_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = false; + f.can_get = true; + f.can_reset = false; - fi.cap_locally = CanNot; - fi.locally = NULL; - fi.can_english = true; + f.cap_locally = CanNot; + f.locally = NULL; + f.can_english = true; /* 该换源方案中,URL存在拼凑,因此不能让用户手动使用某URL来换源 */ - fi.can_user_define = false; + f.can_user_define = false; - fi.note = "该换源通过写入环境变量实现,若多次换源,请手动清理profile文件"; - return fi; + f.note = "该换源通过写入环境变量实现,若多次换源,请手动清理profile文件"; + return f; } diff --git a/src/recipe/ware/WinGet.c b/src/recipe/ware/WinGet.c index 5c65068..038693f 100644 --- a/src/recipe/ware/WinGet.c +++ b/src/recipe/ware/WinGet.c @@ -48,15 +48,15 @@ wr_winget_resetsrc (char *option) FeatInfo wr_winget_feat (char *option) { - FeatInfo fi = {0}; + FeatInfo f = {0}; - fi.can_get = true; - fi.can_reset = true; + f.can_get = true; + f.can_reset = true; - fi.can_english = false; - fi.can_user_define = true; + f.can_english = false; + f.can_user_define = true; - return fi; + return f; } def_target_gsrf(wr_winget);