mirror of
https://github.com/RubyMetric/chsrc.git
synced 2024-11-25 09:41:46 +08:00
Use br
This commit is contained in:
parent
e167331c01
commit
07c722bd36
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
15
include/xy.h
15
include/xy.h
|
@ -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)))
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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,
|
||||||
|
|
11
test/xy.c
11
test/xy.c
|
@ -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 ("成功", "输出成功内容");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user