From 9e63fb59e7b8506183172869ea44b68cdec29be5 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Fri, 4 Oct 2024 13:36:54 -0400 Subject: Tons of changes Mainly for things that came up in other projects. Signed-off-by: Andrew Opalach --- test/test.c | 79 ------------------------------------------------------------- 1 file changed, 79 deletions(-) delete mode 100644 test/test.c (limited to 'test') 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 -#include -#include -#include -//#include -//#include - -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; -} -- cgit v1.2.3-101-g0448