Commit ed5ededa authored by Arnaud Blanchard's avatar Arnaud Blanchard
Browse files

blc_init does not set atexit(blc_quit) automatically. You are supposed to pass...

blc_init does not set atexit(blc_quit) automatically. You are supposed to pass blc_quit in parameter of blc_quit
parent cad56c38
......@@ -81,7 +81,7 @@ void blc_program_args_display_help();
* - Parse the arguments of the programs
* - display the title
* - check the color possibility of the terminal stderr
* - associate the blc_quit function at exit and eventually your 'exit_cb' if it not NULL.
* - eventually your 'exit_cb' if it not NULL.
* - set internal variables setting if the input and output terminal are tty*/
void blc_program_init(int *argc, char ***argv, void(*exit_cb)(void));
......@@ -91,7 +91,6 @@ void blc_program_check_full_parsing(int argc, char **argv);
/** Stop a textual program
* - Send a quitting message with the name of the app on stderr.
* - Send 'q' and flush on stdout if it is a piped output
* - quit with no error (0).
*/
void blc_quit();
......
......@@ -494,8 +494,6 @@ void blc_program_init(int *argc, char ***argv, void (*exit_cb)(void))
}
blc_program_check_full_parsing(*argc, *argv);
atexit(blc_quit);
if (exit_cb) atexit(exit_cb); //This will be called first
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment