]> sigrok.org Git - sigrok-cli.git/blobdiff - anykey.c
Use a non-recursive automake setup.
[sigrok-cli.git] / anykey.c
index 478e644c31edb156678bc36a6c73f76081442581..f11b0d7b031a4a3f94deefad037c861f828cdfc7 100644 (file)
--- a/anykey.c
+++ b/anykey.c
@@ -1,5 +1,5 @@
 /*
- * This file is part of the sigrok project.
+ * This file is part of the sigrok-cli project.
  *
  * Copyright (C) 2011 Bert Vermeulen <bert@biot.com>
  *
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "sigrok-cli.h"
 #include <stdio.h>
 #ifdef _WIN32
 #include <windows.h>
@@ -26,8 +27,6 @@
 #include <unistd.h>
 #include <string.h>
 #include <glib.h>
-#include <sigrok.h>
-#include "sigrok-cli.h"
 
 #ifdef _WIN32
 static HANDLE stdin_handle;
@@ -38,11 +37,11 @@ static struct termios term_orig;
 
 static int received_anykey(int fd, int revents, void *cb_data)
 {
-       /* Avoid compiler warnings. */
        (void)fd;
        (void)revents;
        (void)cb_data;
 
+       sr_session_source_remove(STDIN_FILENO);
        sr_session_stop();
 
        return TRUE;