This commit is contained in:
Aoran Zeng 2024-08-17 07:21:47 +08:00
parent e167331c01
commit 07c722bd36
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
7 changed files with 21 additions and 21 deletions

View File

@ -676,7 +676,7 @@ chsrc_run (const char *cmd, int run_option)
if (! (RunOpt_No_Last_New_Line & run_option)) if (! (RunOpt_No_Last_New_Line & run_option))
{ {
puts (""); br();
} }
} }

View File

@ -2,13 +2,13 @@
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* Copyright © 2023-2024 Aoran Zeng, Heng Guo * Copyright © 2023-2024 Aoran Zeng, Heng Guo
* ------------------------------------------------------------- * -------------------------------------------------------------
* File : xy.h * Lib Name : xy.h
* Authors : Aoran Zeng <ccmywish@qq.com> * Lib Authors : Aoran Zeng <ccmywish@qq.com>
* | Heng Guo <2085471348@qq.com> * | Heng Guo <2085471348@qq.com>
* Contributors : Null Nil <null@nil.com> * Contributors : Nil Null <nil@null.org>
* | * |
* Created on : <2023-08-28> * Created On : <2023-08-28>
* Last modified : <2024-08-08> * Last Modified : <2024-08-17>
* *
* xy: * xy:
* Corss-Platform C utilities for CLI applications in Ruby flavor * Corss-Platform C utilities for CLI applications in Ruby flavor
@ -17,7 +17,7 @@
#ifndef XY_H #ifndef XY_H
#define XY_H #define XY_H
#define _XY_Version "v0.1.4.0-2024/08/08" #define _XY_Version "v0.1.4.1-2024/08/17"
#define _XY_Maintain_URL "https://gitee.com/RubyMetric/chsrc/blob/main/include/xy.h" #define _XY_Maintain_URL "https://gitee.com/RubyMetric/chsrc/blob/main/include/xy.h"
#include <assert.h> #include <assert.h>
@ -75,6 +75,7 @@ void putb (bool n) { if (n) puts ("true"); else puts ("false"); }
void print (const char *s) { printf ("%s", s); } void print (const char *s) { printf ("%s", s); }
void println (const char *s) { printf ("%s\n", s);} void println (const char *s) { printf ("%s\n", s);}
void say (const char *s) { printf ("%s\n", s);} void say (const char *s) { printf ("%s\n", s);}
void br () { puts ("");}
#define assert_str(a, b) assert (xy_streql ((a), (b))) #define assert_str(a, b) assert (xy_streql ((a), (b)))

View File

@ -151,9 +151,9 @@ cli_print_supported_targets_ (const char ***array, size_t size)
printf ("%s\t", alias); printf ("%s\t", alias);
alias = target[k]; alias = target[k];
} }
puts (""); br();
} }
puts (""); br();
} }
void void
@ -271,7 +271,7 @@ cli_print_version ()
void void
cli_print_help () cli_print_help ()
{ {
puts (""); br();
for (int i=0; i<xy_arylen (Chsrc_Usage); i++) for (int i=0; i<xy_arylen (Chsrc_Usage); i++)
{ {
puts (Chsrc_Usage[i]); puts (Chsrc_Usage[i]);
@ -503,7 +503,7 @@ main (int argc, char const *argv[])
if (argc < cli_arg_Target_pos) if (argc < cli_arg_Target_pos)
{ {
cli_print_available_mirrors (); cli_print_available_mirrors ();
puts (""); br();
cli_print_supported_targets (); cli_print_supported_targets ();
} }
else else

View File

@ -43,7 +43,7 @@ pl_haskell_setsrc (char *option)
} }
chsrc_note2 (xy_strjoin (3, "请向 ", config, " 中手动添加:")); chsrc_note2 (xy_strjoin (3, "请向 ", config, " 中手动添加:"));
puts (file); puts (""); puts (file); br();
config = xy_uniform_path ("~/.stack/config.yaml"); config = xy_uniform_path ("~/.stack/config.yaml");
file = xy_strjoin (3, "package-indices:\n" file = xy_strjoin (3, "package-indices:\n"

View File

@ -84,7 +84,7 @@ pl_java_setsrc (char *option)
if (gradle_exist) if (gradle_exist)
{ {
if (maven_exist) puts (""); if (maven_exist) br();
const char* file = xy_strjoin (3, const char* file = xy_strjoin (3,
"allprojects {\n" "allprojects {\n"
" repositories {\n" " repositories {\n"

View File

@ -61,7 +61,7 @@ os_freebsd_setsrc (char *option)
xy_strjoin (3, "若要使用季度分支,请在", conf ,"中将latest改为quarterly")); xy_strjoin (3, "若要使用季度分支,请在", conf ,"中将latest改为quarterly"));
chsrc_note2 ("若要使用HTTPS源请先安装securtiy/ca_root_ns并将'http'改成'https',最后使用'pkg update -f'刷新缓存即可\n"); chsrc_note2 ("若要使用HTTPS源请先安装securtiy/ca_root_ns并将'http'改成'https',最后使用'pkg update -f'刷新缓存即可\n");
puts (""); br();
chsrc_log2 ("2. 修改 freebsd-ports 源"); chsrc_log2 ("2. 修改 freebsd-ports 源");
// @ccmywish: [2023-09-27] 据 @ykla , NJU的freebsd-ports源没有设置 Git // @ccmywish: [2023-09-27] 据 @ykla , NJU的freebsd-ports源没有设置 Git

View File

@ -1,11 +1,10 @@
/** ------------------------------------------------------------ /** ------------------------------------------------------------
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* ------------------------------------------------------------- * -------------------------------------------------------------
* File : xy.c * File Name : xy.c
* License : MIT * File Authors : Aoran Zeng <ccmywish@qq.com>
* Authors : Aoran Zeng <ccmywish@qq.com> * Created On : <2023-08-30>
* Created on : <2023-08-30> * Last Modified : <2024-08-17>
* Last modified : <2024-08-08>
* *
* xy.h * xy.h
* ------------------------------------------------------------*/ * ------------------------------------------------------------*/
@ -39,7 +38,7 @@ main (int argc, char const *argv[])
print (xy_str_to_magenta ("紫色")); print (xy_str_to_magenta ("紫色"));
print (xy_str_to_purple ("紫色")); print (xy_str_to_purple ("紫色"));
print (xy_str_to_cyan ("青色")); print (xy_str_to_cyan ("青色"));
puts (""); br();
xy_log ("普通", "输出普通内容"); xy_log ("普通", "输出普通内容");
xy_succ ("成功", "输出成功内容"); xy_succ ("成功", "输出成功内容");