[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/3] Do not exit on localization init fail
From: |
Boris Dušek |
Subject: |
[PATCH 1/3] Do not exit on localization init fail |
Date: |
Tue, 24 Jul 2012 22:13:03 +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 files 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.7.5 (Apple Git-26)
- [PATCH 1/3] Do not exit on localization init fail,
Boris Dušek <=
- [PATCH 2/3] Cleanup execution of commands in dummy, Boris Dušek, 2012/07/24
- [PATCH 2/3] Cleanup execution of commands in dummy, Trevor Saunders, 2012/07/24
- [PATCH 2/3] Cleanup execution of commands in dummy, Boris Dušek, 2012/07/25
- [PATCH 2/3] Cleanup execution of commands in dummy, Trevor Saunders, 2012/07/25
- [PATCH 2/3] Cleanup execution of commands in dummy, Boris Dušek, 2012/07/25
- [PATCH 2/3] Cleanup execution of commands in dummy, Andrei Kholodnyi, 2012/07/25
- [PATCH 2/3] Cleanup execution of commands in dummy, Boris Dušek, 2012/07/25
- [PATCH 2/3] Cleanup execution of commands in dummy, Andrei Kholodnyi, 2012/07/25
- [PATCH 2/3] Cleanup execution of commands in dummy, Trevor Saunders, 2012/07/25
[PATCH 3/3] Connect to socket if SPEECHD_ADDRESS begins with /, Boris Dušek, 2012/07/24