speechd-discuss
[Top][All Lists]
Advanced

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

[PATCH v2 1/3] Do not exit on localization init fail


From: Boris Dušek
Subject: [PATCH v2 1/3] Do not exit on localization init fail
Date: Sat, 28 Jul 2012 19:50:36 +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 |   13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/src/common/i18n.c b/src/common/i18n.c
index 908ab8e..c0d810b 100644
--- a/src/common/i18n.c
+++ b/src/common/i18n.c
@@ -1,7 +1,7 @@
 /*
  * i18n.c - internationalization support for Speech-dispatcher
  *
- * Copyright (C) 2010 Brailcom, o.p.s.
+ * Copyright (C) 2010, 2012 Brailcom, o.p.s.
  *
  * This is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by
@@ -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.9.6 (Apple Git-31.1)




reply via email to

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