Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 289547
Collapse All | Expand All

(-)client/x11/main.c.old (-3 / +5 lines)
Lines 19-24 Link Here
19
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
 * Boston, MA 02111-1307, USA.
20
 * Boston, MA 02111-1307, USA.
21
 */
21
 */
22
#define _GNU_SOURCE
22
#include <X11/Xproto.h>
23
#include <X11/Xproto.h>
23
#include <X11/Xlib.h>
24
#include <X11/Xlib.h>
24
#include <X11/keysym.h>
25
#include <X11/keysym.h>
Lines 36-42 Link Here
36
#include <signal.h>
37
#include <signal.h>
37
#include <stdlib.h>
38
#include <stdlib.h>
38
39
39
#define _GNU_SOURCES
40
#include <getopt.h>
40
#include <getopt.h>
41
41
42
#define LOG(level, fmt_args...) \
42
#define LOG(level, fmt_args...) \
Lines 103-109 Link Here
103
static GHashTable     *_connections = NULL;
103
static GHashTable     *_connections = NULL;
104
static XIMS _xims = NULL;
104
static XIMS _xims = NULL;
105
static gchar _server_name[128] = "ibus";
105
static gchar _server_name[128] = "ibus";
106
static gchar _locale[1024] = LOCALES_STRING;
106
static gchar* _locale = NULL;
107
107
108
static gboolean _kill_daemon = FALSE;
108
static gboolean _kill_daemon = FALSE;
109
static gint     g_debug_level = 0;
109
static gint     g_debug_level = 0;
Lines 1015-1020 Link Here
1015
{
1015
{
1016
    gint option_index = 0;
1016
    gint option_index = 0;
1017
    gint c;
1017
    gint c;
1018
    _locale = g_new0(char, 1024);
1019
    strcpy(_locale, LOCALES_STRING);
1018
1020
1019
    gtk_init (&argc, &argv);
1021
    gtk_init (&argc, &argv);
1020
    XSetErrorHandler (_xerror_handler);
1022
    XSetErrorHandler (_xerror_handler);
Lines 1047-1053 Link Here
1047
                strncpy (_locale, optarg, sizeof (_locale));
1049
                strncpy (_locale, optarg, sizeof (_locale));
1048
            }
1050
            }
1049
            else if (g_strcmp0 (long_options[option_index].name, "locale-append") == 0) {
1051
            else if (g_strcmp0 (long_options[option_index].name, "locale-append") == 0) {
1050
                strncat (_locale, optarg, sizeof (_locale));
1052
                strncat (_locale, optarg, 1023-strlen(_locale));
1051
            }
1053
            }
1052
            else if (g_strcmp0 (long_options[option_index].name, "help") == 0) {
1054
            else if (g_strcmp0 (long_options[option_index].name, "help") == 0) {
1053
                _print_usage (stdout, argv[0]);
1055
                _print_usage (stdout, argv[0]);

Return to bug 289547