meta: rename to fx

This commit is contained in:
2026-03-16 10:35:43 +00:00
parent 84df46489a
commit e9d0e323f0
233 changed files with 12875 additions and 12869 deletions

View File

@@ -1,6 +1,6 @@
#include <blue/io/file.h>
#include <blue/io/path.h>
#include <blue/serial.h>
#include <fx/io/file.h>
#include <fx/io/path.h>
#include <fx/serial.h>
#include <stdio.h>
int main(int argc, const char **argv)
@@ -10,31 +10,31 @@ int main(int argc, const char **argv)
}
const char *path_cstr = argv[1];
b_path *path = b_path_create_from_cstr(path_cstr);
fx_path *path = fx_path_create_from_cstr(path_cstr);
b_file *src = NULL;
b_result result = b_file_open(NULL, path, B_FILE_READ_ONLY, &src);
if (b_result_is_error(result)) {
b_throw(result);
fx_file *src = NULL;
fx_result result = fx_file_open(NULL, path, FX_FILE_READ_ONLY, &src);
if (fx_result_is_error(result)) {
fx_throw(result);
return -1;
}
/* TODO re-implement json support */
b_serial_ctx *ctx = NULL;
fx_serial_ctx *ctx = NULL;
b_object *data;
b_status status = b_serial_ctx_deserialise(ctx, src, &data, 0);
if (!B_OK(status)) {
fx_object *data;
fx_status status = fx_serial_ctx_deserialise(ctx, src, &data, 0);
if (!FX_OK(status)) {
fprintf(stderr, "cannot read data\n");
return -1;
}
b_object_to_string(data, b_stdout);
b_stream_write_char(b_stdout, '\n');
fx_object_to_string(data, fx_stdout);
fx_stream_write_char(fx_stdout, '\n');
b_object_unref(data);
b_object_unref(src);
b_serial_ctx_unref(ctx);
fx_object_unref(data);
fx_object_unref(src);
fx_serial_ctx_unref(ctx);
return 0;
}