From 07c722bd369f5d19c68c9f0f92edd38a71a31031 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Sat, 17 Aug 2024 07:21:47 +0800 Subject: [PATCH] Use br --- include/chsrc.h | 2 +- include/xy.h | 15 ++++++++------- src/chsrc.c | 8 ++++---- src/recipe/lang/haskell.c | 2 +- src/recipe/lang/java.c | 2 +- src/recipe/os/BSD/FreeBSD.c | 2 +- test/xy.c | 11 +++++------ 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/chsrc.h b/include/chsrc.h index 7472d6f..88a5e65 100644 --- a/include/chsrc.h +++ b/include/chsrc.h @@ -676,7 +676,7 @@ chsrc_run (const char *cmd, int run_option) if (! (RunOpt_No_Last_New_Line & run_option)) { - puts (""); + br(); } } diff --git a/include/xy.h b/include/xy.h index fafde69..1b14f46 100644 --- a/include/xy.h +++ b/include/xy.h @@ -2,13 +2,13 @@ * SPDX-License-Identifier: MIT * Copyright © 2023-2024 Aoran Zeng, Heng Guo * ------------------------------------------------------------- - * File : xy.h - * Authors : Aoran Zeng - * | Heng Guo <2085471348@qq.com> - * Contributors : Null Nil + * Lib Name : xy.h + * Lib Authors : Aoran Zeng + * | Heng Guo <2085471348@qq.com> + * Contributors : Nil Null * | - * Created on : <2023-08-28> - * Last modified : <2024-08-08> + * Created On : <2023-08-28> + * Last Modified : <2024-08-17> * * xy: 襄阳、咸阳 * Corss-Platform C utilities for CLI applications in Ruby flavor @@ -17,7 +17,7 @@ #ifndef 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" #include @@ -75,6 +75,7 @@ void putb (bool n) { if (n) puts ("true"); else puts ("false"); } void print (const char *s) { printf ("%s", s); } void println (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))) diff --git a/src/chsrc.c b/src/chsrc.c index 5fb1af9..017457f 100644 --- a/src/chsrc.c +++ b/src/chsrc.c @@ -151,9 +151,9 @@ cli_print_supported_targets_ (const char ***array, size_t size) printf ("%s\t", alias); alias = target[k]; } - puts (""); + br(); } - puts (""); + br(); } void @@ -271,7 +271,7 @@ cli_print_version () void cli_print_help () { - puts (""); + br(); for (int i=0; i - * Created on : <2023-08-30> - * Last modified : <2024-08-08> + * File Name : xy.c + * File Authors : Aoran Zeng + * Created On : <2023-08-30> + * Last Modified : <2024-08-17> * * 测试 xy.h * ------------------------------------------------------------*/ @@ -39,7 +38,7 @@ main (int argc, char const *argv[]) print (xy_str_to_magenta ("紫色")); print (xy_str_to_purple ("紫色")); print (xy_str_to_cyan ("青色")); - puts (""); + br(); xy_log ("普通", "输出普通内容"); xy_succ ("成功", "输出成功内容");