diff options
Diffstat (limited to 'modules/im/ximcp/imInt.c')
-rw-r--r-- | modules/im/ximcp/imInt.c | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/modules/im/ximcp/imInt.c b/modules/im/ximcp/imInt.c index 05c4b2b0..b38abfb9 100644 --- a/modules/im/ximcp/imInt.c +++ b/modules/im/ximcp/imInt.c @@ -26,6 +26,7 @@ PERFORMANCE OF THIS SOFTWARE. fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ +/* $XFree86: xc/lib/X11/imInt.c,v 3.10 2001/11/16 00:52:27 dawes Exp $ */ #include <X11/Xatom.h> #include <X11/Xlib.h> @@ -39,8 +40,13 @@ Private Xim *_XimCurrentIMlist = (Xim *)NULL; Private int _XimCurrentIMcount = 0; Private Bool +#if NeedFunctionPrototypes +_XimSetIMStructureList( + Xim im) +#else _XimSetIMStructureList(im) Xim im; +#endif { register int i; Xim *xim; @@ -103,7 +109,7 @@ _XimServerDestroy(im_2_destroy) continue; if (im->core.destroy_callback.callback) - (*im->core.destroy_callback.callback)(im, + (*im->core.destroy_callback.callback)((XIM)im, im->core.destroy_callback.client_data, NULL); for (ic = im->core.ic_chain; ic; ic = ic->core.next) { if (ic->core.destroy_callback.callback) { @@ -148,8 +154,14 @@ _XimServerReconectableDestroy() #endif /* XIM_CONNECTABLE */ Private char * +#if NeedFunctionPrototypes +_XimStrstr( + register char *src, + register char *dest) +#else _XimStrstr(src, dest) register char *src, *dest; +#endif { int len; @@ -163,8 +175,13 @@ _XimStrstr(src, dest) } Private char * +#if NeedFunctionPrototypes +_XimMakeImName( + XLCd lcd) +#else _XimMakeImName(lcd) XLCd lcd; +#endif { char* begin = NULL; char* end = NULL; @@ -179,13 +196,12 @@ _XimMakeImName(lcd) end++; } } - ret = Xmalloc(end - begin + 1); if (ret != NULL) { - if (begin != NULL) { + if (begin != NULL && end != NULL) { (void)strncpy(ret, begin, end - begin); ret[end - begin] = '\0'; - } else { + } else { ret[0] = '\0'; } } @@ -194,11 +210,20 @@ _XimMakeImName(lcd) } Public XIM +#if NeedFunctionPrototypes +_XimOpenIM( + XLCd lcd, + Display *dpy, + XrmDatabase rdb, + char *res_name, + char *res_class) +#else _XimOpenIM(lcd, dpy, rdb, res_name, res_class) XLCd lcd; Display *dpy; XrmDatabase rdb; char *res_name, *res_class; +#endif { Xim im; register int i; |