mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-01-22 08:46:15 +08:00
Rename enum can status
This commit is contained in:
parent
be4f11b1d8
commit
d9e6840399
|
@ -6,9 +6,10 @@
|
|||
* Contributors : Shengwei Chen <414685209@qq.com>
|
||||
* |
|
||||
* Created On : <2023-08-29>
|
||||
* Last Modified : <2024-10-04>
|
||||
* Last Modified : <2024-10-09>
|
||||
*
|
||||
* 镜像站与换源信息
|
||||
* 通用镜像站与换源信息
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
typedef struct MirrorSite_t {
|
||||
|
@ -159,10 +160,10 @@ typedef struct SourceInfo_t {
|
|||
|
||||
#define def_sources_n(t) const size_t t##_sources_n = xy_arylen(t##_sources)
|
||||
|
||||
enum StatusCan {
|
||||
enum Capability {
|
||||
CanNot,
|
||||
CanFully,
|
||||
CanSemi
|
||||
FullyCan,
|
||||
PartiallyCan
|
||||
};
|
||||
|
||||
/* Target Feature Info */
|
||||
|
@ -174,7 +175,7 @@ typedef struct FeatInfo_t {
|
|||
|
||||
bool can_user_define; // 用户自定义换源URL
|
||||
|
||||
enum StatusCan stcan_locally;
|
||||
enum Capability cap_locally;
|
||||
char *locally;
|
||||
|
||||
char *note;
|
||||
|
|
|
@ -351,15 +351,15 @@ cli_print_target_features (FeatInfo f, const char *input_target_name)
|
|||
char *msg = CliOpt_InEnglish ? " Locally: Change source only for this project " : " Locally: 仅对本项目换源 ";
|
||||
char *locally_msg = xy_strjoin (3, msg, "| chsrc set -local ", input_target_name);
|
||||
|
||||
switch (f.stcan_locally)
|
||||
switch (f.cap_locally)
|
||||
{
|
||||
case CanNot:
|
||||
printf (" %s%s\n", bdred(NoMark), locally_msg);br();
|
||||
break;
|
||||
case CanFully:
|
||||
case FullyCan:
|
||||
printf (" %s%s\n", bdgreen(YesMark), purple(locally_msg));br();
|
||||
break;
|
||||
case CanSemi:
|
||||
case PartiallyCan:
|
||||
printf (" %s%s\n\n %s\n", bdgreen(SemiYesMark), purple(locally_msg), f.locally);br();
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -97,7 +97,7 @@ pl_dart_flutter_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = false;
|
||||
|
||||
fi.stcan_locally = CanNot;
|
||||
fi.cap_locally = CanNot;
|
||||
fi.locally = NULL;
|
||||
fi.can_english = true;
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ pl_dart_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = false;
|
||||
|
||||
fi.stcan_locally = CanNot;
|
||||
fi.cap_locally = CanNot;
|
||||
fi.locally = NULL;
|
||||
fi.can_english = true;
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ pl_nodejs_bun_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = true;
|
||||
|
||||
fi.stcan_locally = CanFully;
|
||||
fi.cap_locally = FullyCan;
|
||||
fi.locally = NULL;
|
||||
fi.can_english = true;
|
||||
fi.can_user_define = true;
|
||||
|
|
|
@ -118,7 +118,7 @@ pl_nodejs_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = true;
|
||||
|
||||
fi.stcan_locally = CanFully;
|
||||
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;
|
||||
|
|
|
@ -97,7 +97,7 @@ pl_nodejs_yarn_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = true;
|
||||
|
||||
fi.stcan_locally = CanFully;
|
||||
fi.cap_locally = FullyCan;
|
||||
fi.locally = NULL;
|
||||
fi.can_english = true;
|
||||
fi.can_user_define = true;
|
||||
|
|
|
@ -66,7 +66,7 @@ pl_nodejs_npm_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = true;
|
||||
|
||||
fi.stcan_locally = CanFully;
|
||||
fi.cap_locally = FullyCan;
|
||||
fi.locally = NULL;
|
||||
fi.can_english = true;
|
||||
fi.can_user_define = true;
|
||||
|
|
|
@ -69,7 +69,7 @@ pl_nodejs_nvm_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = false;
|
||||
|
||||
fi.stcan_locally = CanNot;
|
||||
fi.cap_locally = CanNot;
|
||||
fi.locally = "";
|
||||
fi.can_english = false;
|
||||
fi.can_user_define = true;
|
||||
|
|
|
@ -67,7 +67,7 @@ pl_nodejs_pnpm_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = true;
|
||||
|
||||
fi.stcan_locally = CanFully;
|
||||
fi.cap_locally = FullyCan;
|
||||
fi.locally = NULL;
|
||||
fi.can_english = true;
|
||||
fi.can_user_define = true;
|
||||
|
|
|
@ -69,7 +69,7 @@ pl_php_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = false;
|
||||
|
||||
fi.stcan_locally = CanFully;
|
||||
fi.cap_locally = FullyCan;
|
||||
fi.locally = "composer 支持 (From v0.1.7)";
|
||||
fi.can_english = false;
|
||||
fi.can_user_define = true;
|
||||
|
|
|
@ -69,7 +69,7 @@ pl_python_pdm_feat (char *option)
|
|||
fi.can_reset = true;
|
||||
|
||||
// PDM 完全支持项目级换源
|
||||
fi.stcan_locally = CanFully;
|
||||
fi.cap_locally = FullyCan;
|
||||
fi.locally = NULL;
|
||||
|
||||
fi.can_english = true;
|
||||
|
|
|
@ -66,7 +66,7 @@ pl_python_poetry_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = true;
|
||||
|
||||
fi.stcan_locally = CanFully;
|
||||
fi.cap_locally = FullyCan;
|
||||
fi.locally = NULL;
|
||||
fi.can_english = false;
|
||||
fi.can_user_define = true;
|
||||
|
|
|
@ -89,7 +89,7 @@ pl_python_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = true;
|
||||
|
||||
fi.stcan_locally = CanSemi;
|
||||
fi.cap_locally = PartiallyCan;
|
||||
fi.locally = "pip 不支持,其他支持";
|
||||
fi.can_english = false;
|
||||
fi.can_user_define = true;
|
||||
|
|
|
@ -79,7 +79,7 @@ pl_python_pip_feat (char *option)
|
|||
fi.can_reset = true;
|
||||
|
||||
// pip 不支持项目级换源
|
||||
fi.stcan_locally = CanNot;
|
||||
fi.cap_locally = CanNot;
|
||||
fi.locally = NULL;
|
||||
fi.can_english = true;
|
||||
fi.can_user_define = true;
|
||||
|
|
|
@ -103,7 +103,7 @@ pl_ruby_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = true;
|
||||
|
||||
fi.stcan_locally = CanSemi;
|
||||
fi.cap_locally = PartiallyCan;
|
||||
fi.locally = "gem 不支持; bundler 支持 (From v0.1.6)";
|
||||
fi.can_english = false;
|
||||
fi.can_user_define = true;
|
||||
|
|
|
@ -78,7 +78,7 @@ pl_rust_cargo_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = true;
|
||||
|
||||
fi.stcan_locally = CanSemi;
|
||||
fi.cap_locally = PartiallyCan;
|
||||
fi.locally = "可以基于本项目换源吗?请帮助确认";
|
||||
fi.can_english = false;
|
||||
fi.can_user_define = true;
|
||||
|
|
|
@ -105,7 +105,7 @@ pl_rust_rustup_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = false;
|
||||
|
||||
fi.stcan_locally = CanNot;
|
||||
fi.cap_locally = CanNot;
|
||||
fi.locally = "";
|
||||
fi.can_english = false;
|
||||
fi.can_user_define = true;
|
||||
|
|
|
@ -66,7 +66,7 @@ os_armbian_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = false;
|
||||
|
||||
fi.stcan_locally = CanNot;
|
||||
fi.cap_locally = CanNot;
|
||||
fi.can_english = true;
|
||||
fi.can_user_define = true;
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ os_arch_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = false;
|
||||
|
||||
fi.stcan_locally = CanNot;
|
||||
fi.cap_locally = CanNot;
|
||||
fi.can_english = true;
|
||||
fi.can_user_define = true;
|
||||
|
||||
|
@ -154,7 +154,7 @@ os_archlinuxcn_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = false;
|
||||
|
||||
fi.stcan_locally = CanNot;
|
||||
fi.cap_locally = CanNot;
|
||||
fi.can_english = true;
|
||||
fi.can_user_define = true;
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ FeatInfo
|
|||
fi.can_get = true;
|
||||
fi.can_reset = false;
|
||||
|
||||
fi.stcan_locally = CanSemi;
|
||||
fi.cap_locally = PartiallyCan;
|
||||
fi.locally = "具体说明是否支持项目级换源...";
|
||||
fi.can_english = false;
|
||||
fi.can_user_define = false;
|
||||
|
|
|
@ -102,7 +102,7 @@ wr_homebrew_feat (char *option)
|
|||
fi.can_get = true;
|
||||
fi.can_reset = false;
|
||||
|
||||
fi.stcan_locally = CanNot;
|
||||
fi.cap_locally = CanNot;
|
||||
fi.locally = NULL;
|
||||
fi.can_english = true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user