Skip to content
Snippets Groups Projects
Commit 498aae67 authored by sebastien's avatar sebastien
Browse files

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-bf33cf982152
parent fad44096
No related branches found
No related tags found
No related merge requests found
......@@ -34,14 +34,20 @@ using namespace std;
*/
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
main(int argc, char** argv)
{
if (argc < 2)
{
cerr << "Missing model file!" << endl;
cerr << "Dynare usage: dynare mod_file [debug] [noclearall] [savemacro]" << endl;
exit(-1);
usage();
}
bool clear_all = true;
......@@ -60,6 +66,11 @@ main(int argc, char** argv)
save_macro = true;
else if (string(argv[arg]) == string("notmpterms"))
no_tmp_terms = true;
else
{
cerr << "Unknown option: " << argv[arg] << endl;
usage();
}
}
cout << "Starting Dynare ..." << endl
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment