使用 xy.

This commit is contained in:
Aoran Zeng
2025-08-27 11:58:43 +08:00
parent 28d913c58b
commit 55865d6a7b
11 changed files with 41 additions and 47 deletions

View File

@@ -56,7 +56,7 @@ main (int argc, char const *argv[])
chsrc_ensure_dir ("test");
chsrc_append_to_file ("append", bkup);
if (!xy_on_windows)
if (!xy.on_windows)
{
chsrc_prepend_to_file ("prepend", bkup);
}
@@ -67,7 +67,7 @@ main (int argc, char const *argv[])
print ("chsrc: CPU cores = ");
println (chsrc_get_cpucore ());
if (xy_on_windows)
if (xy.on_windows)
{
chsrc_run ("del " bkup, RunOpt_No_Last_New_Line);
}
@@ -83,7 +83,7 @@ main (int argc, char const *argv[])
// chsrc_run_in_inline_pwsh_shell ("Write-Host \"Hello from inline PowerShell\"");
if (xy_on_windows)
if (xy.on_windows)
{
chsrc_run_as_pwsh_file ("Write-Host \"Hello from PowerShell file\"");
}

View File

@@ -110,7 +110,7 @@ main (int argc, char const *argv[])
assert (xy_file_exist ("./doc/image/chsrc.png"));
assert (xy_dir_exist ("~"));
if (xy_on_windows)
if (xy.on_windows)
{
say (xy_normalize_path ("~"));
say (xy_normalize_path ("~/"));