重命名为 xy_use_utf8()

This commit is contained in:
Aoran Zeng 2025-08-20 18:19:58 +08:00
parent 81b9c2911a
commit 63b3832ce9
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
2 changed files with 9 additions and 10 deletions

View File

@ -2,7 +2,6 @@
* Copyright © 2023-2025 Aoran Zeng, Heng Guo
* SPDX-License-Identifier: MIT
* -------------------------------------------------------------
* Lib Name : xy.h
* Lib Authors : <ccmywish@qq.com>
* | <2085471348@qq.com>
* Contributors : juzeon <skyjuzheng@gmail.com>
@ -23,7 +22,7 @@
#ifndef XY_H
#define XY_H
#define _XY_Version "v0.1.6.0-2025/08/18"
#define _XY_Version "v0.1.7.0-2025/08/20"
#define _XY_Maintain_URL "https://github.com/RubyMetric/chsrc/blob/dev/lib/xy.h"
#define _XY_Maintain_URL2 "https://gitee.com/RubyMetric/chsrc/blob/dev/lib/xy.h"
@ -71,7 +70,7 @@ bool xy_enable_color = true;
#define xy_os_devnull "nul"
#include <windows.h>
#include <shlobj.h>
#define xy_useutf8() SetConsoleOutputCP (65001)
#define xy_use_utf8() SetConsoleOutputCP (65001)
#elif defined(__linux__) || defined(__linux)
#define XY_On_Linux 1
@ -80,7 +79,7 @@ bool xy_enable_color = true;
#define xy_on_macos false
#define xy_on_bsd false
#define xy_os_devnull "/dev/null"
#define xy_useutf8()
#define xy_use_utf8()
#elif defined(__APPLE__)
#define XY_On_macOS 1
@ -89,7 +88,7 @@ bool xy_enable_color = true;
#define xy_on_macos true
#define xy_on_bsd false
#define xy_os_devnull "/dev/null"
#define xy_useutf8()
#define xy_use_utf8()
#elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
#define XY_On_BSD 1
@ -98,7 +97,7 @@ bool xy_enable_color = true;
#define xy_on_macos false
#define xy_on_bsd true
#define xy_os_devnull "/dev/null"
#define xy_useutf8()
#define xy_use_utf8()
#endif
#define assert_str(a, b) assert (xy_streql ((a), (b)))

View File

@ -2,14 +2,14 @@
* SPDX-License-Identifier: GPL-3.0-or-later
* -------------------------------------------------------------
* File Name : core.c
* File Authors : Aoran Zeng <ccmywish@qq.com>
* | Heng Guo <2085471348@qq.com>
* File Authors : <ccmywish@qq.com>
* | <2085471348@qq.com>
* Contributors : Peng Gao <gn3po4g@outlook.com>
* | Happy Game <happygame10124@gmail.com>
* | Yangmoooo <yangmoooo@outlook.com>
* |
* Created On : <2023-08-29>
* Last Modified : <2025-08-10>
* Last Modified : <2025-08-20>
*
* chsrc framework
* ------------------------------------------------------------*/
@ -212,7 +212,7 @@ chsrc_alert2 (const char *str)
void
chsrc_framework_prelude ()
{
xy_useutf8 ();
xy_use_utf8 ();
ProgStatus.contributors = xy_map_new ();
}