meta: rename to fx
This commit is contained in:
26
test/cat.c
26
test/cat.c
@@ -1,8 +1,8 @@
|
||||
#include <blue/core/stream.h>
|
||||
#include <blue/core/stringstream.h>
|
||||
#include <blue/ds/string.h>
|
||||
#include <blue/io/file.h>
|
||||
#include <blue/io/path.h>
|
||||
#include <fx/core/stream.h>
|
||||
#include <fx/core/stringstream.h>
|
||||
#include <fx/ds/string.h>
|
||||
#include <fx/io/file.h>
|
||||
#include <fx/io/path.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, const char **argv)
|
||||
@@ -12,21 +12,21 @@ 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;
|
||||
}
|
||||
|
||||
b_stream_buffer *buf = b_stream_buffer_create_dynamic(1024);
|
||||
fx_stream_buffer *buf = fx_stream_buffer_create_dynamic(1024);
|
||||
|
||||
size_t nr_read;
|
||||
b_stream_read_all_bytes_s(src, b_stdout, buf, &nr_read);
|
||||
fx_stream_read_all_bytes_s(src, fx_stdout, buf, &nr_read);
|
||||
|
||||
b_stream_buffer_unref(buf);
|
||||
fx_stream_buffer_unref(buf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user