speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 02/10] Do not exit on localization init fail


From: Boris Dušek
Subject: [PATCH 02/10] Do not exit on localization init fail
Date: Mon, 23 Jul 2012 15:24:13 +0200

From: Boris Dus?ek <address@hidden>
To: address@hidden

Localization is not critical to the function of Speech Dispatcher.  So
it should start even if initializing localization fails (better start
unlocalized than not start at all).
---
 src/common/i18n.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/common/i18n.c b/src/common/i18n.c
index 908ab8e..306780f 100644
--- a/src/common/i18n.c
+++ b/src/common/i18n.c
@@ -33,16 +33,9 @@ void i18n_init(void)
 {
        if (setlocale(LC_ALL, "") == NULL) {
                perror("setlocale");
-               exit(1);
-       }
-
-       if (bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR) == NULL) {
+       } else if (bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR) == NULL) {
                perror("bindtextdomain");
-               exit(1);
-       }
-
-       if (textdomain(GETTEXT_PACKAGE) == NULL) {
+       } else if (textdomain(GETTEXT_PACKAGE) == NULL) {
                perror("textdomain");
-               exit(1);
        }
 }
-- 
1.7.7.5 (Apple Git-26)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]