aboutsummaryrefslogtreecommitdiff
path: root/src/libmain
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmain')
-rw-r--r--src/libmain/shared.cc12
-rw-r--r--src/libmain/shared.hh3
2 files changed, 9 insertions, 6 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index f0035c358..8532cdaad 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -187,12 +187,11 @@ static void initAndRun(int argc, char * * argv)
ignore options for the ATerm library. */
for (Strings::iterator i = args.begin(); i != args.end(); ++i) {
string arg = *i;
- if (string(arg, 0, 4) == "-at-") ;
- else if (arg.length() > 2 && arg[0] == '-' && arg[1] != '-' && !isdigit(arg[1])) {
+ if (arg.length() > 2 && arg[0] == '-' && arg[1] != '-' && !isdigit(arg[1])) {
for (unsigned int j = 1; j < arg.length(); j++)
if (isalpha(arg[j]))
remaining.push_back((string) "-" + arg[j]);
- else {
+ else {
remaining.push_back(string(arg, j));
break;
}
@@ -332,6 +331,9 @@ static void * oomHandler(size_t requested)
}
+int exitCode = 0;
+
+
}
@@ -390,7 +392,5 @@ int main(int argc, char * * argv)
return 1;
}
- return 0;
+ return exitCode;
}
-
-
diff --git a/src/libmain/shared.hh b/src/libmain/shared.hh
index bd3d19531..1d6a6ec57 100644
--- a/src/libmain/shared.hh
+++ b/src/libmain/shared.hh
@@ -53,6 +53,9 @@ struct RemoveTempRoots
~RemoveTempRoots();
};
+/* Exit code of the program. */
+extern int exitCode;
+
}