summaryrefslogtreecommitdiffstats
path: root/idlc/source/idlcmain.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'idlc/source/idlcmain.cxx')
-rw-r--r--idlc/source/idlcmain.cxx19
1 files changed, 14 insertions, 5 deletions
diff --git a/idlc/source/idlcmain.cxx b/idlc/source/idlcmain.cxx
index 4a7cdbbb7f2b..2df142fdbf91 100644
--- a/idlc/source/idlcmain.cxx
+++ b/idlc/source/idlcmain.cxx
@@ -28,26 +28,35 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_idlc.hxx"
-#include <idlc/idlc.hxx>
+
+#include "idlc/idlc.hxx"
#include "sal/main.h"
+#include <string.h>
+
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);