toolchain: xpcg: update libfx usage

This commit is contained in:
2026-05-30 10:12:28 +01:00
parent c87e094d7d
commit 87fe2d20ec
13 changed files with 66 additions and 51 deletions
+12 -4
View File
@@ -6,7 +6,7 @@
#include "msg.h"
#include "parse.h"
#include <fx/cmd.h>
#include <fx/cmdline/cmd.h>
#include <fx/io/file.h>
#include <fx/io/path.h>
@@ -70,7 +70,12 @@ static int xpcg(
const fx_array *args)
{
const char *path = NULL;
fx_arglist_get_string(opt, FX_COMMAND_INVALID_ID, ARG_SRCPATH, 0, &path);
fx_arglist_get_string(
opt,
FX_COMMAND_INVALID_ID,
ARG_SRCPATH,
0,
&path);
if (!path) {
fx_arglist_report_missing_args(
opt,
@@ -81,8 +86,11 @@ static int xpcg(
}
fx_file *file = NULL;
fx_result result
= fx_file_open(NULL, FX_RV_PATH(path), FX_FILE_READ_ONLY, &file);
fx_result result = fx_file_open(
NULL,
FX_RV_PATH(path),
FX_FILE_READ_ONLY,
&file);
if (fx_result_is_error(result)) {
fx_throw(result);
return -1;