aboutsummaryrefslogtreecommitdiff
path: root/src/dillo.cc
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2009-08-12 00:06:16 +0000
committercorvid <corvid@lavabit.com>2009-08-12 00:06:16 +0000
commit236da13db1c40d44ca4a326818eedb1561dfb1ad (patch)
treebb19123e68f801ebc9c0440cf0b4645c051b31ec /src/dillo.cc
parentb4885050a417b18a3a0185fc1f44b7cb75c35069 (diff)
return 2 for bad cmdline arg
bash regarded -1 as out of range. When a command's exit status is out of range, bash uses 255. This could be a confusing surprise if someone needs to care about dillo's exit status in a script someday.
Diffstat (limited to 'src/dillo.cc')
-rw-r--r--src/dillo.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dillo.cc b/src/dillo.cc
index 45a98de6..5e1bbd3e 100644
--- a/src/dillo.cc
+++ b/src/dillo.cc
@@ -234,7 +234,7 @@ int main(int argc, char **argv)
xid = strtol(opt_argv[0], &end, 0);
if (*end) {
fprintf(stderr, "XID argument \"%s\" not valid.\n",opt_argv[0]);
- return -1;
+ return 2;
}
break;
}
@@ -242,7 +242,7 @@ int main(int argc, char **argv)
if (!a_Misc_parse_geometry(opt_argv[0],&xpos,&ypos,&width,&height)){
fprintf(stderr, "geometry argument \"%s\" not valid. Must be of "
"the form WxH[{+-}X{+-}Y].\n", opt_argv[0]);
- return -1;
+ return 2;
}
break;
case DILLO_CLI_VERSION:
@@ -253,7 +253,7 @@ int main(int argc, char **argv)
return 0;
default:
printHelp(argv[0], Options);
- return -1;
+ return 2;
}
}
dFree(opt_argv);