From c6c4f41abdf52aad6cbafca5990a34de10610401 Mon Sep 17 00:00:00 2001
From: Arnaud Blanchard <arnaud.blanchard@ensea.fr>
Date: Tue, 7 Nov 2017 10:33:00 +0100
Subject: [PATCH] Reintroduce blc_command_interpret_thread which automatically
 launch a thread managing the text IHM

---
 src/blc_command.cpp | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/blc_command.cpp b/src/blc_command.cpp
index 2cbd62b..801e33b 100644
--- a/src/blc_command.cpp
+++ b/src/blc_command.cpp
@@ -231,7 +231,16 @@ int blc_command_try_to_interpret(){
     return 1;
 }
 
-/*
+
+/// if the parameter is not null we should display the help at each command.
+static void *command_thread_interpret_loop(void *){
+    while(blc_status==BLC_RUN){
+        blc_command_interpret();
+    }
+    return NULL;
+}
+
+
 void blc_command_interpret_thread(char const *option, void (*ask_quit_funcion)()){
     pthread_t thread;
     
@@ -240,7 +249,7 @@ void blc_command_interpret_thread(char const *option, void (*ask_quit_funcion)()
     if (strchr(option, 'h')) blc_command_add("h",  (type_blc_command_cb)blc_command_display_help, NULL, "display this help", NULL);
     if (strchr(option, 'q')) blc_command_add("q",  (type_blc_command_cb)ask_quit_funcion, NULL, "quit the application", NULL);
     SYSTEM_ERROR_CHECK(pthread_create(&thread, NULL, command_thread_interpret_loop, NULL), -1, NULL);
-}*/
+}
 
 void blc_command_update_int_cb(char const *argument, void *int_pt){
     char *endptr;
-- 
GitLab