X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fintl.c;h=121946c10d2e8dd682da1396289155e786129403;hb=bb129a869df2db8d68964d8ad1cbc1553f95f7fe;hp=da4ac180bdf6e4c1902244bd2063e524d33c8659;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910;p=chise%2Fxemacs-chise.git.1 diff --git a/src/intl.c b/src/intl.c index da4ac18..121946c 100644 --- a/src/intl.c +++ b/src/intl.c @@ -45,7 +45,7 @@ Atom wc_atom; /* init_input -- Set things up for i18n level 4 input. */ void -init_input (CONST char *res_name, CONST char *res_class, Display *display) +init_input (const char *res_name, const char *res_class, Display *display) { XIMStyles *styles; unsigned short i; @@ -123,7 +123,7 @@ Window main_window; /* Convenient way to refer to main Era window. */ insertion into the buffer of the whole string. It might require some care, though, to avoid fragmenting memory through the allocation and freeing of many small chunks. Maybe the existing system for - (single-byte) string allocation can be used, multipling the length by + (single-byte) string allocation can be used, multiplying the length by sizeof (wchar_t) to get the right size. */ void @@ -136,18 +136,18 @@ x_get_composed_input (XKeyPressedEvent *x_key_event, XIC context, int i; XClientMessageEvent new_event; - try_again: + retry: len = XwcLookupString (context, x_key_event, composed_input_buf.data, composed_input_buf.size, &keysym, &status); switch (status) { case XBufferOverflow: /* GROW_WC_STRING (&composed_input_buf, 32); mrb */ - goto try_again; + goto retry; case XLookupChars: break; default: - abort (); + ABORT (); } new_event.type = ClientMessage; @@ -165,20 +165,21 @@ x_get_composed_input (XKeyPressedEvent *x_key_event, XIC context, #endif /* I18N4 */ -Lisp_Object Qdomain; Lisp_Object Qdefer_gettext; DEFUN ("ignore-defer-gettext", Fignore_defer_gettext, 1, 1, 0, /* -If OBJ is of the form (defer-gettext "string"), return the string. +If OBJECT is of the form (defer-gettext "string"), return the string. The purpose of the defer-gettext symbol is to identify strings which are translated when they are referenced instead of when they are defined. */ - (obj)) + (object)) { - if (CONSP (obj) && SYMBOLP (Fcar (obj)) && EQ (Fcar (obj), Qdefer_gettext)) - return Fcar (Fcdr (obj)); + if (CONSP (object) + && SYMBOLP (Fcar (object)) + && EQ (Fcar (object), Qdefer_gettext)) + return Fcar (Fcdr (object)); else - return obj; + return object; } DEFUN ("gettext", Fgettext, 1, 1, 0, /* @@ -274,14 +275,7 @@ Bug: it has no effect on source (.el) files, only compiled (.elc) files. { CHECK_STRING (domain_name); if (load_in_progress) - { -#ifdef I18N3 - Vfile_domain = Fpurecopy (domain_name); - return Vfile_domain; -#else - return (domain_name); -#endif - } + return (domain_name); else return Qnil; } @@ -307,8 +301,6 @@ init_intl_very_early (void) void syms_of_intl (void) { - defsymbol (&Qdomain, "domain"); - /* defer-gettext is defined as a symbol because when it is used in menu specification strings, it is not evaluated as a function by menu_item_descriptor_to_widget_value(). */