From da622908b0102d34118c182b804698e21a88307d Mon Sep 17 00:00:00 2001
From: Jon Lund Steffensen <jonlst@gmail.com>
Date: Wed, 10 Feb 2010 22:52:11 +0100
Subject: redshift.c: Handle -? parameter. This is also used when a parameter
 is  not recognized. Update translations.

---
 src/redshift.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

(limited to 'src/redshift.c')

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);
 	}
 
-- 
cgit v1.2.3-70-g09d2