X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=blobdiff_plain;f=anykey.c;h=cc40bedb7947a68d4bfde261106fdfc6d28e98f7;hp=f0ab52efe6548a9654822781670acd4ab80d046d;hb=60ea8937c54f5a8a36b4e4f91de03ff545e2bcd9;hpb=1999ae06a4d06ea323218707f8e8a3c59ed404e7 diff --git a/anykey.c b/anykey.c index f0ab52e..cc40bed 100644 --- a/anykey.c +++ b/anykey.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include "sigrok-cli.h" #ifdef _WIN32 @@ -36,12 +36,12 @@ static DWORD stdin_mode; static struct termios term_orig; #endif -static int received_anykey(int fd, int revents, void *user_data) +static int received_anykey(int fd, int revents, void *cb_data) { /* Avoid compiler warnings. */ (void)fd; (void)revents; - (void)user_data; + (void)cb_data; sr_session_stop(); @@ -70,7 +70,7 @@ void add_anykey(void) sr_session_source_add(STDIN_FILENO, G_IO_IN, -1, received_anykey, NULL); - printf("Press any key to stop acquisition.\n"); + g_message("Press any key to stop acquisition."); } /* Restore stdin attributes. */