diff options
| author | 2024-10-04 13:36:54 -0400 | |
|---|---|---|
| committer | 2024-10-04 13:36:54 -0400 | |
| commit | 9e63fb59e7b8506183172869ea44b68cdec29be5 (patch) | |
| tree | a47f51121275477b3ce93b1d2b82ea1f342d68ed /test | |
| parent | a320ee672ccf52297dc509b25ed263f165709b31 (diff) | |
| download | libnaunet-9e63fb59e7b8506183172869ea44b68cdec29be5.tar.gz libnaunet-9e63fb59e7b8506183172869ea44b68cdec29be5.tar.bz2 libnaunet-9e63fb59e7b8506183172869ea44b68cdec29be5.zip | |
Tons of changes
Mainly for things that came up in other projects.
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'test')
| -rw-r--r-- | test/test.c | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/test/test.c b/test/test.c deleted file mode 100644 index 60799e6..0000000 --- a/test/test.c +++ /dev/null @@ -1,79 +0,0 @@ -#include <aki/common.h> -#include <aki/thread.h> -#include <aki/event_loop.h> -#include <aki/fs_event.h> -//#include <aki/line_processor.h> -//#include <aki/timer.h> - -aki_thread_result AKI_THREADCALL test_thread(void *userdata) -{ - (void)userdata; - for (u32 i = 0; i < 10; i++) { - printf("Yo\n"); - aki_thread_sleep(1.0); - } - return 0; -} - -static struct aki_event_loop loop; - -/* -static u8 line_callback(void *userdata, str *line) -{ - (void)userdata; - al_printf("%.*s\n", AL_STR_PRINTF(line)); - if (al_str_eq(line, al_str_c("quit"))) return AKI_LINE_PROCESSOR_STOP; - return AKI_LINE_PROCESSOR_CONTINUE; -} - -static void timer_callback(void *userdata, struct aki_timer *timer) -{ - printf("Yo\n"); - aki_timer_again(timer); -} -*/ - -static void fs_event_callback(void *userdata, struct inotify_event *event) -{ - al_printf("%i\n", event->mask); -} - -s32 main(void) -{ - aki_common_init(); - - aki_event_loop_init(&loop); - - struct aki_fs_event fs_event; - aki_fs_event_init(&fs_event, al_str_c("/home/andrew/.config/taro/DP-3/selection"), IN_CLOSE_WRITE, - fs_event_callback, NULL); - aki_fs_event_start(&fs_event, &loop); - - /* - struct aki_timer timer; - aki_timer_init(&timer, &loop, 1.0, timer_callback, NULL); - aki_timer_again(&timer); - */ - - //struct aki_thread thread; - //aki_thread_create(&thread, test_thread, NULL); - //aki_thread_join(&thread); - -/* -#ifndef _WIN32 - struct aki_line_processor pro; - pro.callback = line_callback; - pro.userdata = NULL; - aki_line_processor_init(&pro, al_str_c("\n")); - aki_line_processor_open_fd(&pro, STDIN_FILENO); - aki_line_processor_run(&pro, &loop); -#endif -*/ - - aki_event_loop_run(&loop); - aki_event_loop_destroy(&loop); - - aki_common_close(); - - return 0; -} |