From 615e9a6a7a89533894cc3be0b199f75fc9cb8f39 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Tue, 5 Sep 2023 20:56:24 +0800 Subject: [PATCH] Add license info to headers --- Makefile | 8 ++++++++ chsrc.c | 3 +++ chsrc.h | 1 + test_xy.c | 1 + xy.h | 7 +++++-- 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2a247d1..0274830 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,11 @@ +# --------------------------------------------------------------- +# File : Makefile +# License : GPLv3 +# Authors : Aoran Zeng +# Created on : <2023-08-28> +# Last modified : <2023-09-05> +# --------------------------------------------------------------- + CFLAGS = TARGET = chsrc diff --git a/chsrc.c b/chsrc.c index ea535cd..b625333 100644 --- a/chsrc.c +++ b/chsrc.c @@ -1,5 +1,6 @@ /* -------------------------------------------------------------- * File : chsrc.c +* License : GPLv3 * Authors : Aoran Zeng * Created on : <2023-08-28> * Last modified : <2023-09-05> @@ -7,6 +8,8 @@ * chsrc: * * Change Source —— 命令行换源工具 +* +* 该软件为自由软件,采用 GPLv3 许可证,请查阅 LICENSE.txt 文件 * -------------------------------------------------------------*/ #include "chsrc.h" diff --git a/chsrc.h b/chsrc.h index 290460e..07a879e 100644 --- a/chsrc.h +++ b/chsrc.h @@ -1,5 +1,6 @@ /* -------------------------------------------------------------- * File : chsrc.h +* License : GPLv3 * Authors : Aoran Zeng * Created on : <2023-08-29> * Last modified : <2023-09-05> diff --git a/test_xy.c b/test_xy.c index b25eaff..2bf7536 100644 --- a/test_xy.c +++ b/test_xy.c @@ -1,5 +1,6 @@ /* -------------------------------------------------------------- * File : test_xy.c +* License : MIT * Authors : Aoran Zeng * Created on : <2023-08-30> * Last modified : <2023-09-05> diff --git a/xy.h b/xy.h index 702397e..4fbb0da 100644 --- a/xy.h +++ b/xy.h @@ -1,14 +1,17 @@ /* -------------------------------------------------------------- * File : xy.h +* License : MIT * Authors : Aoran Zeng * Created on : <2023-08-28> * Last modified : <2023-09-05> * * xy: * -* y = f(x) +* Xiangyang (襄阳) or Xianyang (咸阳) * * Corss-Platform C utilities in Ruby flavor +* +* 该文件采用 MIT 许可证,可闭源使用,请查阅 LICENSE.txt 文件 * -------------------------------------------------------------*/ #ifndef XY_H @@ -444,7 +447,7 @@ xy_str_strip (const char* str) * 执行cmd后拿到cmd的执行结果 注意从外部free掉这段内存 * 注意:执行结果后面有回车换行 */ -char * +char * xy_getcmd(const char * cmd) { const int BUFSIZE = 1024;