aboutsummaryrefslogtreecommitdiffstats
path: root/src/redshift.c
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2010-02-10 22:52:11 +0100
committerJon Lund Steffensen <jonlst@gmail.com>2010-02-10 22:52:11 +0100
commitda622908b0102d34118c182b804698e21a88307d (patch)
tree9fc3c2b2f278c1a2357a557c15b58a633dfaadfe /src/redshift.c
parentUpdate help strings: --help does not actually work, change to -h. (diff)
downloadredshift-ng-da622908b0102d34118c182b804698e21a88307d.tar.gz
redshift-ng-da622908b0102d34118c182b804698e21a88307d.tar.bz2
redshift-ng-da622908b0102d34118c182b804698e21a88307d.tar.xz
redshift.c: Handle -? parameter. This is also used when a parameter is
not recognized. Update translations.
Diffstat (limited to 'src/redshift.c')
-rw-r--r--src/redshift.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/redshift.c b/src/redshift.c
index 12390d3..9c3f404 100644
--- a/src/redshift.c
+++ b/src/redshift.c
@@ -296,8 +296,8 @@ main(int argc, char *argv[])
if (s == NULL) {
fputs(_("Malformed location argument.\n"),
stderr);
- fputs(_("Try `-h' for more"
- " information.\n"), stderr);
+ fputs(_("Try `-h' for more information.\n"),
+ stderr);
exit(EXIT_FAILURE);
}
*(s++) = '\0';
@@ -347,8 +347,8 @@ main(int argc, char *argv[])
if (s == NULL) {
fputs(_("Malformed temperature argument.\n"),
stderr);
- fputs(_("Try `-h' for more"
- " information.\n"), stderr);
+ fputs(_("Try `-h' for more information.\n"),
+ stderr);
exit(EXIT_FAILURE);
}
*(s++) = '\0';
@@ -358,10 +358,8 @@ main(int argc, char *argv[])
case 'v':
verbose = 1;
break;
- default:
- fprintf(stderr, _("Unknown parameter `%c'.\n"), opt);
- fputs(_("Try `-h' for more"
- " information.\n"), stderr);
+ case '?':
+ fputs(_("Try `-h' for more information.\n"), stderr);
exit(EXIT_FAILURE);
break;
}
@@ -370,8 +368,7 @@ main(int argc, char *argv[])
/* Latitude and longitude must be set */
if (isnan(lat) || isnan(lon)) {
fputs(_("Latitude and longitude must be set.\n"), stderr);
- fputs(_("Try `-h' for more"
- " information.\n"), stderr);
+ fputs(_("Try `-h' for more information.\n"), stderr);
exit(EXIT_FAILURE);
}