diff options
author | Matthias Huetsch [mhu] <matthias.huetsch@oracle.com> | 2011-01-27 18:55:41 +0100 |
---|---|---|
committer | Matthias Huetsch [mhu] <matthias.huetsch@oracle.com> | 2011-01-27 18:55:41 +0100 |
commit | 96b31d46e1f210bc45658a9e02acef18ef634356 (patch) | |
tree | 7b220107805a297f7f66cbbeb35666e704454f89 /idlc/source/idlcmain.cxx | |
parent | 9c0d8576ec2e822eba1b346bbfee7892c3ed1574 (diff) | |
parent | 3859e8f28b464409015d8a2a3c6facb1d56b7632 (diff) |
Update from sibling repository.
Diffstat (limited to 'idlc/source/idlcmain.cxx')
-rw-r--r-- | idlc/source/idlcmain.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/idlc/source/idlcmain.cxx b/idlc/source/idlcmain.cxx index 006131f727df..6e3af1baca73 100644 --- a/idlc/source/idlcmain.cxx +++ b/idlc/source/idlcmain.cxx @@ -34,19 +34,25 @@ using namespace ::rtl; SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) { - Options options; + std::vector< std::string > args; + for (int i = 1; i < argc; i++) + { + if (!Options::checkArgument (args, argv[i], strlen(argv[i]))) + return (1); + } + Options options(argv[0]); try { - if (!options.initOptions(argc, argv)) - exit(1); + if (!options.initOptions(args)) + return (0); } catch( IllegalArgument& e) { fprintf(stderr, "Illegal argument: %s\n%s", e.m_message.getStr(), options.prepareVersion().getStr()); - exit(99); + return (99); } setIdlc(&options); |