trunk preprocessor:
* added "notmpterms" to usage notice * fail when unknown option is given git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2227 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
342f32b59c
commit
23b2ac039c
|
@ -34,14 +34,20 @@ using namespace std;
|
||||||
*/
|
*/
|
||||||
void main2(stringstream &in, string &basename, bool debug, bool clear_all, bool no_tmp_terms);
|
void main2(stringstream &in, string &basename, bool debug, bool clear_all, bool no_tmp_terms);
|
||||||
|
|
||||||
|
void
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
cerr << "Dynare usage: dynare mod_file [debug] [noclearall] [savemacro] [notmpterms]" << endl;
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char** argv)
|
main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
{
|
{
|
||||||
cerr << "Missing model file!" << endl;
|
cerr << "Missing model file!" << endl;
|
||||||
cerr << "Dynare usage: dynare mod_file [debug] [noclearall] [savemacro]" << endl;
|
usage();
|
||||||
exit(-1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool clear_all = true;
|
bool clear_all = true;
|
||||||
|
@ -60,6 +66,11 @@ main(int argc, char** argv)
|
||||||
save_macro = true;
|
save_macro = true;
|
||||||
else if (string(argv[arg]) == string("notmpterms"))
|
else if (string(argv[arg]) == string("notmpterms"))
|
||||||
no_tmp_terms = true;
|
no_tmp_terms = true;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cerr << "Unknown option: " << argv[arg] << endl;
|
||||||
|
usage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "Starting Dynare ..." << endl
|
cout << "Starting Dynare ..." << endl
|
||||||
|
|
Loading…
Reference in New Issue