添加 echo() 并使用 @flavor 标注API参考依据

This commit is contained in:
Aoran Zeng 2025-08-20 11:42:45 +08:00
parent 34fa12edde
commit 6178b212a0
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98

View File

@ -2,18 +2,22 @@
* Copyright © 2023-2025 Aoran Zeng, Heng Guo
* SPDX-License-Identifier: MIT
* -------------------------------------------------------------
* Lib Name : xy.h
* Lib Authors : Aoran Zeng <ccmywish@qq.com>
* | Heng Guo <2085471348@qq.com>
* Contributors : juzeon <skyjuzheng@gmail.com>
* Lib Name : xy.h
* Lib Authors : <ccmywish@qq.com>
* | <2085471348@qq.com>
* Contributors : juzeon <skyjuzheng@gmail.com>
* | Mikachu2333 <mikachu.23333@zohomail.com>
* |
* 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); }