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

Update the result with title

parent 5ddeb016
......@@ -212,8 +212,6 @@ static void blc_program_option_interpret(int *argc, char **argv[])
type_program_option *program_option;
char pipe_name[PATH_MAX+1];
blc_program_name = basename(*argv[0]);
//We store enough room for all the optional letters + ':' + terminating null char
optstring = MANY_ALLOCATIONS(blc_program_options_nb*2+1, char);
......@@ -364,13 +362,18 @@ static void blc_program_interpret_parameters(int *argc, char **argv[]){
}
void blc_program_parse_args(int *argc, char ***argv){
if (blc_program_name==NULL) blc_program_name = basename((*argv)[0]);
blc_program_option_interpret(argc, argv);
blc_program_interpret_parameters(argc, argv);
}
void blc_program_parse_args_and_print_title(int *argc, char ***argv){
if (blc_program_name==NULL) blc_program_name = basename((*argv)[0]);
underline_fprintf('=', stderr, blc_program_name);
blc_program_parse_args(argc, argv);
}
/*Display format as python argparse*/
......
t_parse_args
============
Display help:
usage: t_parse_args [-f] [-s string] string [string]
......@@ -7,7 +7,9 @@ usage: t_parse_args [-f] [-s string] string [string]
Program to show how to parse arguments.
positional arguments:
string Required parameter string Show how to accept simple text as option
string Required parameter
string Show how to accept simple text as option
optional arguments:
-f, --flag Show how to read a flag
-s, --simple string Simple text as option (default: Default text)
......
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