From b2662d9ddb3320fb3ac295c4858efe285fc4168f Mon Sep 17 00:00:00 2001 From: Diego Nieto Cid Date: Tue, 12 Apr 2011 21:08:04 -0300 Subject: Use locale's compose file by default. * console-client/Makefile [HAVE_X11=yes](compose-CFLAGS): Define DATADIR. * console-client/pc-kbd.c (pc_kbd_init): Load compose file unconditionally. * console-client/xkb/compose.c: Include fcntl.h, unistd.h and locale.h (struct map_entry, enum callback_result, map_callback): New types. (map_iterate): New function. (struct matcher_context): New type. (match_left_set_right, match_right_set_left): New functions. (get_compose_file_for_locale): Likewise. (read_composefile): Use get_compose_file_for_locale result when argument composefn is NULL. --- console-client/pc-kbd.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'console-client/pc-kbd.c') diff --git a/console-client/pc-kbd.c b/console-client/pc-kbd.c index fdc749d7..9999654f 100644 --- a/console-client/pc-kbd.c +++ b/console-client/pc-kbd.c @@ -1329,12 +1329,9 @@ pc_kbd_init (void **handle, int no_exit, int argc, char *argv[], int *next) xkb_repeat_delay = arguments.repeat_delay; xkb_repeat_interval = arguments.repeat_interval; - if (arguments.composefile) - { - err = read_composefile (arguments.composefile); - if (err) - return err; - } + err = read_composefile (arguments.composefile); + if (err) + return err; xkb_data_init (); err = xkb_load_layout (arguments.xkbdir, arguments.keymapfile, -- cgit v1.2.3