mirror of
https://github.com/simon987/libscan.git
synced 2025-12-14 06:59:02 +00:00
arc component
This commit is contained in:
22
test/main.c
Normal file
22
test/main.c
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "../libscan/text/text.h"
|
||||
#include <fcntl.h>
|
||||
#include "../libscan/arc/arc.h"
|
||||
|
||||
int main() {
|
||||
|
||||
scan_text_ctx_t ctx;
|
||||
|
||||
ctx.content_size = 100;
|
||||
vfile_t file;
|
||||
file.is_fs_file = TRUE;
|
||||
file.filepath = "/home/simon/Downloads/libscan/CMakeLists.txt";
|
||||
file.fd = open("/home/simon/Downloads/libscan/CMakeLists.txt", O_RDONLY);
|
||||
file.read = fs_read;
|
||||
|
||||
document_t doc;
|
||||
doc.meta_head = NULL;
|
||||
doc.meta_tail = NULL;
|
||||
|
||||
doc.size = 200;
|
||||
parse_text(&ctx, &file, &doc);
|
||||
}
|
||||
Reference in New Issue
Block a user