bin: factor the calls to set_program_name().
* src/bin/common_setup.cc, src/bin/common_setup.hh: New files. * src/bin/Makefile.am: Add them. * src/bin/genltl.cc, src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc, src/bin/ltlfilt.cc, src/bin/randltl.cc: Adjust.
This commit is contained in:
parent
ecca4ba53e
commit
489f719dc1
8 changed files with 73 additions and 35 deletions
|
|
@ -27,9 +27,9 @@
|
|||
#include <fstream>
|
||||
#include <argp.h>
|
||||
#include <cstring>
|
||||
#include "progname.h"
|
||||
#include "error.h"
|
||||
|
||||
#include "common_setup.hh"
|
||||
#include "common_finput.hh"
|
||||
#include "common_output.hh"
|
||||
#include "common_cout.hh"
|
||||
|
|
@ -501,10 +501,7 @@ namespace
|
|||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
set_program_name(argv[0]);
|
||||
// Simplify the program name, because argp() uses it to report errors
|
||||
// and display help text.
|
||||
argv[0] = const_cast<char*>(program_name);
|
||||
setup(argv);
|
||||
|
||||
const argp ap = { options, parse_opt, "[FILENAME...]",
|
||||
argp_program_doc, children, 0, 0 };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue