Update yelp call to match current yelp revisions.
authorAlexander Koenig <alex@lisas.de>
Sat, 1 Feb 2014 16:33:28 +0000 (17:33 +0100)
committerAlexander Koenig <alex@lisas.de>
Sat, 1 Feb 2014 16:33:28 +0000 (17:33 +0100)
src/tX_mastergui.cc
src/wav_read.c

index f14e9622967facc7f47f743e82614850ed45254d..aab78e8cd8939ce004480f03b62df2759288cb56 100644 (file)
@@ -1825,9 +1825,11 @@ gboolean help_checker()
                        g_source_remove(help_tag);
                        help_tag=-1;
                }
                        g_source_remove(help_tag);
                        help_tag=-1;
                }
-       } else {
-               /* We are still here and the child exited - that could mean trouble. */
-               tx_note("Couldn't run the gnome-help command (alias \"yelp\") to display the terminatorX manual. Please ensure that \"yelp\" is installed.", true);             
+       }  else {
+               //yelp waitpid status does not allow determining success
+               //printf("%i %i\n", WIFEXITED(status), WEXITSTATUS(status));
+               ///* We are still here and the child exited - that could mean trouble. */
+               //tx_note("Couldn't run the gnome-help command (alias \"yelp\") to display the terminatorX manual. Please ensure that \"yelp\" is installed.", true);           
                
                g_source_remove(help_tag);
                help_tag=-1;
                
                g_source_remove(help_tag);
                help_tag=-1;
@@ -1853,8 +1855,7 @@ void display_help()
        
        if (help_child==0) {
                // child
        
        if (help_child==0) {
                // child
-               // execlp("gnome-help","gnome-help","ghelp:/" INSTALL_PREFIX "/terminatorX/doc/terminatorX-manual/C/terminatorX-manual.xml", NULL);
-               execlp("gnome-help","gnome-help","ghelp://" XML_MANUAL, NULL);          
+               execlp("gnome-help","gnome-help","file://" XML_MANUAL, NULL);           
                _exit(-1);
        } else if (help_child==-1) {
                tx_note("System error: couldn't fork() to run the help process.", true);
                _exit(-1);
        } else if (help_child==-1) {
                tx_note("System error: couldn't fork() to run the help process.", true);
index 4223322d244874d0ea65b1c67c8c0b7ba7be3e78..e40455d89df11561521982f0af33c058056dda9a 100644 (file)
@@ -81,8 +81,11 @@ FILE* open_wav(char *header, char file_name[], int *mode){
        FILE* handle;
        handle = fopen(file_name, "r");
        if(handle)
        FILE* handle;
        handle = fopen(file_name, "r");
        if(handle)
-       fread((char *) header, 1, 44, handle); // TODO: What about res?
-       return(handle);
+       if (fread((char *) header, 1, 44, handle) != 44) {
+               fclose(handle);
+               handle = NULL;
+       }
+       return handle;
 }
 
 int16_t get_wav_format(wav_sig *info){
 }
 
 int16_t get_wav_format(wav_sig *info){