From 6178b212a0ddc0bec547b914b3b33221031f1a00 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Wed, 20 Aug 2025 11:42:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20`echo()`=20=E5=B9=B6?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20`@flavor`=20=E6=A0=87=E6=B3=A8API=E5=8F=82?= =?UTF-8?q?=E8=80=83=E4=BE=9D=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/xy.h | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/lib/xy.h b/lib/xy.h index e81d492..60b888b 100644 --- a/lib/xy.h +++ b/lib/xy.h @@ -2,18 +2,22 @@ * Copyright © 2023-2025 Aoran Zeng, Heng Guo * SPDX-License-Identifier: MIT * ------------------------------------------------------------- - * Lib Name : xy.h - * Lib Authors : Aoran Zeng - * | Heng Guo <2085471348@qq.com> - * Contributors : juzeon + * Lib Name : xy.h + * Lib Authors : 曾奥然 + * | 郭恒 <2085471348@qq.com> + * Contributors : juzeon * | Mikachu2333 * | * Created On : <2023-08-28> - * Last Modified : <2025-08-18> + * Last Modified : <2025-08-20> * - * xy: 襄阳、咸阳 - * Corss-Platform C11 utilities for CLI applications in mixed - * flavor (mostly Ruby) + * + * xy: 襄阳、咸阳 + * + * 为跨平台命令行应用程序准备的 C11 实用函数和宏 (utilities) + * + * 该库的特点是混合多种编程语言风味 (绝大多数为 Ruby),每个 API + * 均使用 @flavor 标注其参考依据 * ------------------------------------------------------------*/ #ifndef XY_H @@ -145,8 +149,11 @@ static void _xy_println_const_str (const char *str) {printf ("%s\n", str);} const char *: _xy_println_const_str, \ default: assert(!"Unsupported type for println()/say()!") \ )(x) +/* @flavor Perl/Raku */ #define say println - +/* @flavor PHP */ +#define echo println +/* @flavor HTML */ void br () { puts (""); } void p (const char *s) { printf ("%s\n", s); }