添加 xy_noop()

This commit is contained in:
Aoran Zeng 2025-08-20 11:32:37 +08:00
parent b6a910143d
commit 34fa12edde
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
3 changed files with 3 additions and 2 deletions

View File

@ -102,6 +102,7 @@ bool xy_enable_color = true;
#define xy_unsupported() assert(!"Unsuppoted")
#define xy_unimplemented() assert(!"Unimplemented temporarily")
#define xy_unreached() assert(!"This code shouldn't be reached")
#define xy_noop() (void)0
static void _xy_print_int (int n) {printf ("%d", n);}
static void _xy_print_long (long n) {printf ("%ld", n);}

View File

@ -1509,7 +1509,7 @@ chsrc_view_env (const char *var1, ...)
*/
// chsrc_run (cmd, RunOpt_Dont_Notify_On_Success|RunOpt_No_Last_New_Line|RunOpt_Dont_Abort_On_Failure);
int status = system (cmd);
if (status!=0) {/* NOOP */}
if (status!=0) { xy_noop(); }
}
else
{

View File

@ -43,7 +43,7 @@ void
wr_homebrew_getsrc (char *option)
{
int status = system (RAWSTR_wr_homebrew_read_config_cmd);
if (status != 0) { /* NOOP */ }
if (status != 0) { xy_noop(); }
}
/**