aboutsummaryrefslogtreecommitdiff
path: root/libX11/modules
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-11-07 07:53:41 +0100
committermarha <marha@users.sourceforge.net>2012-11-07 07:53:41 +0100
commit1738a6973deb03f33a71c9527594727cb8bb64b4 (patch)
tree813603d381b5536ef7a1e2ffd3a137c4bc0623f7 /libX11/modules
parent1cc98f5a48924d750fbef7ea6b05a1ba49c28589 (diff)
downloadvcxsrv-1738a6973deb03f33a71c9527594727cb8bb64b4.tar.gz
vcxsrv-1738a6973deb03f33a71c9527594727cb8bb64b4.tar.bz2
vcxsrv-1738a6973deb03f33a71c9527594727cb8bb64b4.zip
xserver mesa xkbcomp git update 7 nov 2012
xserver: 011f8458805e443ac9130865d2840a929a00cabf xkbcomp: bd1103ef3cfef9cfed645566f944a69e7ca568b4 mesa: f42518962a08ce927e4ddd233d19d2661e135834
Diffstat (limited to 'libX11/modules')
-rw-r--r--libX11/modules/im/ximcp/imCallbk.c54
-rw-r--r--libX11/modules/im/ximcp/imDefFlt.c40
-rw-r--r--libX11/modules/im/ximcp/imDefIc.c60
-rw-r--r--libX11/modules/im/ximcp/imDefIm.c96
-rw-r--r--libX11/modules/im/ximcp/imDefLkup.c74
-rw-r--r--libX11/modules/im/ximcp/imDispch.c208
-rw-r--r--libX11/modules/im/ximcp/imExten.c34
-rw-r--r--libX11/modules/im/ximcp/imImSw.c110
-rw-r--r--libX11/modules/im/ximcp/imInsClbk.c576
-rw-r--r--libX11/modules/im/ximcp/imInt.c20
-rw-r--r--libX11/modules/im/ximcp/imLcGIc.c94
-rw-r--r--libX11/modules/im/ximcp/imLcIc.c16
-rw-r--r--libX11/modules/im/ximcp/imLcIm.c34
-rw-r--r--libX11/modules/im/ximcp/imLcLkup.c14
-rw-r--r--libX11/modules/im/ximcp/imLcSIc.c108
-rw-r--r--libX11/modules/im/ximcp/imRm.c220
-rw-r--r--libX11/modules/im/ximcp/imRmAttr.c48
-rw-r--r--libX11/modules/im/ximcp/imThaiFlt.c98
-rw-r--r--libX11/modules/im/ximcp/imThaiIc.c14
-rw-r--r--libX11/modules/im/ximcp/imThaiIm.c470
-rw-r--r--libX11/modules/im/ximcp/imTrX.c28
-rw-r--r--libX11/modules/im/ximcp/imTrans.c22
-rw-r--r--libX11/modules/im/ximcp/imTransR.c624
23 files changed, 1531 insertions, 1531 deletions
diff --git a/libX11/modules/im/ximcp/imCallbk.c b/libX11/modules/im/ximcp/imCallbk.c
index 6275bbf00..f57a8de31 100644
--- a/libX11/modules/im/ximcp/imCallbk.c
+++ b/libX11/modules/im/ximcp/imCallbk.c
@@ -92,17 +92,17 @@ typedef XimCbStatus (*XimCb)(
(im->private.proto.read((im),(XPointer)(buf),(buf_len),&(len)))
#define _XimFlushData(im) im->private.proto.flush((im))
-Private XimCbStatus _XimGeometryCallback(Xim, Xic, char*, int);
-Private XimCbStatus _XimStrConversionCallback(Xim, Xic, char*, int);
-Private XimCbStatus _XimPreeditStartCallback(Xim, Xic, char*, int);
-Private XimCbStatus _XimPreeditDoneCallback(Xim, Xic, char*, int);
-Private void _free_memory_for_text(XIMText*);
-Private XimCbStatus _XimPreeditDrawCallback(Xim, Xic, char*, int);
-Private XimCbStatus _XimPreeditCaretCallback(Xim, Xic, char*, int);
-Private XimCbStatus _XimStatusStartCallback(Xim, Xic, char*, int);
-Private XimCbStatus _XimStatusDoneCallback(Xim, Xic, char*, int);
-Private XimCbStatus _XimStatusDrawCallback(Xim, Xic, char*, int);
-Private XimCbStatus _XimPreeditStateNotifyCallback(Xim, Xic, char *, int);
+static XimCbStatus _XimGeometryCallback(Xim, Xic, char*, int);
+static XimCbStatus _XimStrConversionCallback(Xim, Xic, char*, int);
+static XimCbStatus _XimPreeditStartCallback(Xim, Xic, char*, int);
+static XimCbStatus _XimPreeditDoneCallback(Xim, Xic, char*, int);
+static void _free_memory_for_text(XIMText*);
+static XimCbStatus _XimPreeditDrawCallback(Xim, Xic, char*, int);
+static XimCbStatus _XimPreeditCaretCallback(Xim, Xic, char*, int);
+static XimCbStatus _XimStatusStartCallback(Xim, Xic, char*, int);
+static XimCbStatus _XimStatusDoneCallback(Xim, Xic, char*, int);
+static XimCbStatus _XimStatusDrawCallback(Xim, Xic, char*, int);
+static XimCbStatus _XimPreeditStateNotifyCallback(Xim, Xic, char *, int);
#if defined(__STDC__) && ((defined(sun) && defined(SVR4)) || defined(WIN32))
#define RConst /**/
@@ -138,13 +138,13 @@ static RConst XimCb callback_table[] = {
};
-Private Bool
+static Bool
_XimIsReadyForProcess(Xic ic)
{
return(!ic->private.proto.waitCallback); /* check HM */
}
-Private void
+static void
_XimProcessPendingCallbacks(Xic ic)
{
XimPendingCallback pcbq;
@@ -161,7 +161,7 @@ _XimProcessPendingCallbacks(Xic ic)
}
}
-Private void
+static void
_XimPutCbIntoQueue(Xic ic, XimPendingCallback call_data)
{
XimPendingCallback pcbq = ic->private.proto.pend_cb_que;
@@ -182,7 +182,7 @@ _XimPutCbIntoQueue(Xic ic, XimPendingCallback call_data)
}
}
-Public Bool
+Bool
_XimCbDispatch(Xim xim,
INT16 len,
XPointer data,
@@ -261,7 +261,7 @@ _XimCbDispatch(Xim xim,
return True;
}
-Private XimCbStatus
+static XimCbStatus
_XimGeometryCallback(Xim im,
Xic ic,
char* proto,
@@ -284,7 +284,7 @@ _XimGeometryCallback(Xim im,
return XimCbSuccess;
}
-Private XimCbStatus
+static XimCbStatus
_XimStrConversionCallback(Xim im,
Xic ic,
char* proto,
@@ -367,7 +367,7 @@ _XimStrConversionCallback(Xim im,
return XimCbSuccess;
}
-Private XimCbStatus
+static XimCbStatus
_XimPreeditStartCallback(Xim im,
Xic ic,
char* proto,
@@ -416,7 +416,7 @@ _XimPreeditStartCallback(Xim im,
return XimCbSuccess;
}
-Private XimCbStatus
+static XimCbStatus
_XimPreeditDoneCallback(Xim im,
Xic ic,
char* proto,
@@ -439,7 +439,7 @@ _XimPreeditDoneCallback(Xim im,
return XimCbSuccess;
}
-Private void
+static void
_read_text_from_packet(Xim im,
char* buf,
XIMText** text_ptr)
@@ -554,7 +554,7 @@ _read_text_from_packet(Xim im,
}
}
-Private void
+static void
_free_memory_for_text(XIMText* text)
{
if (text) {
@@ -566,7 +566,7 @@ _free_memory_for_text(XIMText* text)
}
}
-Private XimCbStatus
+static XimCbStatus
_XimPreeditDrawCallback(Xim im,
Xic ic,
char* proto,
@@ -597,7 +597,7 @@ _XimPreeditDrawCallback(Xim im,
return XimCbSuccess;
}
-Private XimCbStatus
+static XimCbStatus
_XimPreeditCaretCallback(Xim im,
Xic ic,
char* proto,
@@ -649,7 +649,7 @@ _XimPreeditCaretCallback(Xim im,
return XimCbSuccess;
}
-Private XimCbStatus
+static XimCbStatus
_XimStatusStartCallback(Xim im,
Xic ic,
char* proto,
@@ -672,7 +672,7 @@ _XimStatusStartCallback(Xim im,
return XimCbSuccess;
}
-Private XimCbStatus
+static XimCbStatus
_XimStatusDoneCallback(Xim im,
Xic ic,
char* proto,
@@ -695,7 +695,7 @@ _XimStatusDoneCallback(Xim im,
return XimCbSuccess;
}
-Private XimCbStatus
+static XimCbStatus
_XimStatusDrawCallback(Xim im,
Xic ic,
char* proto,
@@ -730,7 +730,7 @@ _XimStatusDrawCallback(Xim im,
return XimCbSuccess;
}
-Private XimCbStatus
+static XimCbStatus
_XimPreeditStateNotifyCallback( Xim im, Xic ic, char* proto, int len )
{
XICCallback *cb = &ic->core.preedit_attr.state_notify_callback;
diff --git a/libX11/modules/im/ximcp/imDefFlt.c b/libX11/modules/im/ximcp/imDefFlt.c
index 1e4f3895b..44cc68847 100644
--- a/libX11/modules/im/ximcp/imDefFlt.c
+++ b/libX11/modules/im/ximcp/imDefFlt.c
@@ -35,7 +35,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include "Xlcint.h"
#include "Ximint.h"
-Private long
+static long
_XimTriggerCheck(
Xim im,
XKeyEvent *ev,
@@ -66,7 +66,7 @@ _XimTriggerCheck(
return -1;
}
-Private long
+static long
_XimTriggerOnCheck(
Xim im,
XKeyEvent *ev)
@@ -75,7 +75,7 @@ _XimTriggerOnCheck(
&im->private.proto.im_onkeylist[1]);
}
-Private long
+static long
_XimTriggerOffCheck(
Xim im,
XKeyEvent *ev)
@@ -84,7 +84,7 @@ _XimTriggerOffCheck(
&im->private.proto.im_offkeylist[1]);
}
-Private Bool
+static Bool
_XimOnKeysCheck(
Xic ic,
XKeyEvent *ev)
@@ -103,7 +103,7 @@ _XimOnKeysCheck(
return False;
}
-Private Bool
+static Bool
_XimOffKeysCheck(
Xic ic,
XKeyEvent *ev)
@@ -122,7 +122,7 @@ _XimOffKeysCheck(
return False;
}
-Private void
+static void
_XimPendingFilter(
Xic ic)
{
@@ -135,7 +135,7 @@ _XimPendingFilter(
return;
}
-Private Bool
+static Bool
_XimProtoKeypressFilter(
Xic ic,
XKeyEvent *ev)
@@ -186,7 +186,7 @@ _XimProtoKeypressFilter(
return NOTFILTERD;
}
-Private Bool
+static Bool
_XimFilterKeypress(
Display *d,
Window w,
@@ -196,7 +196,7 @@ _XimFilterKeypress(
return _XimProtoKeypressFilter((Xic)client_data, (XKeyEvent *)ev );
}
-Private Bool
+static Bool
_XimProtoKeyreleaseFilter(
Xic ic,
XKeyEvent *ev)
@@ -247,7 +247,7 @@ _XimProtoKeyreleaseFilter(
return NOTFILTERD;
}
-Private Bool
+static Bool
_XimFilterKeyrelease(
Display *d,
Window w,
@@ -257,7 +257,7 @@ _XimFilterKeyrelease(
return _XimProtoKeyreleaseFilter((Xic)client_data, (XKeyEvent *)ev);
}
-Private void
+static void
_XimRegisterKeyPressFilter(
Xic ic)
{
@@ -274,7 +274,7 @@ _XimRegisterKeyPressFilter(
return;
}
-Private void
+static void
_XimRegisterKeyReleaseFilter(
Xic ic)
{
@@ -291,7 +291,7 @@ _XimRegisterKeyReleaseFilter(
return;
}
-Private void
+static void
_XimUnregisterKeyPressFilter(
Xic ic)
{
@@ -307,7 +307,7 @@ _XimUnregisterKeyPressFilter(
return;
}
-Private void
+static void
_XimUnregisterKeyReleaseFilter(
Xic ic)
{
@@ -323,7 +323,7 @@ _XimUnregisterKeyReleaseFilter(
return;
}
-Public void
+void
_XimRegisterFilter(
Xic ic)
{
@@ -333,7 +333,7 @@ _XimRegisterFilter(
return;
}
-Public void
+void
_XimUnregisterFilter(
Xic ic)
{
@@ -342,7 +342,7 @@ _XimUnregisterFilter(
return;
}
-Public void
+void
_XimReregisterFilter(
Xic ic)
{
@@ -354,7 +354,7 @@ _XimReregisterFilter(
return;
}
-Private Bool
+static Bool
_XimFilterServerDestroy(
Display *d,
Window w,
@@ -376,7 +376,7 @@ _XimFilterServerDestroy(
return True;
}
-Public void
+void
_XimRegisterServerFilter(
Xim im)
{
@@ -395,7 +395,7 @@ _XimRegisterServerFilter(
return;
}
-Public void
+void
_XimUnregisterServerFilter(
Xim im)
{
diff --git a/libX11/modules/im/ximcp/imDefIc.c b/libX11/modules/im/ximcp/imDefIc.c
index a06f6a73d..3b5fa4147 100644
--- a/libX11/modules/im/ximcp/imDefIc.c
+++ b/libX11/modules/im/ximcp/imDefIc.c
@@ -56,7 +56,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include "Xlcint.h"
#include "Ximint.h"
-Private Bool
+static Bool
_XimCreateICCheck(
Xim im,
INT16 len,
@@ -81,7 +81,7 @@ _XimCreateICCheck(
}
#ifdef XIM_CONNECTABLE
-Public Bool
+Bool
_XimReCreateIC(ic)
Xic ic;
{
@@ -244,7 +244,7 @@ ErrorOnReCreateIC:
return False;
}
-Private char *
+static char *
_XimDelayModeGetICValues(ic, arg)
Xic ic;
XIMArg *arg;
@@ -259,7 +259,7 @@ _XimDelayModeGetICValues(ic, arg)
}
#endif /* XIM_CONNECTABLE */
-Private Bool
+static Bool
_XimGetICValuesCheck(
Xim im,
INT16 len,
@@ -288,7 +288,7 @@ _XimGetICValuesCheck(
return False;
}
-Private char *
+static char *
_XimProtoGetICValues(
XIC xic,
XIMArg *arg)
@@ -424,7 +424,7 @@ _XimProtoGetICValues(
}
#ifdef XIM_CONNECTABLE
-Private Bool
+static Bool
_XimCheckNestQuarkList(quark_list, num_quark, quark, separator)
XrmQuark *quark_list;
int num_quark;
@@ -444,7 +444,7 @@ _XimCheckNestQuarkList(quark_list, num_quark, quark, separator)
return False;
}
-Private Bool
+static Bool
_XimCheckNestedQuarkList(quark_list, idx, num_quark, arg, separator)
XrmQuark **quark_list;
int idx;
@@ -485,7 +485,7 @@ _XimCheckNestedQuarkList(quark_list, idx, num_quark, arg, separator)
return True;
}
-Private Bool
+static Bool
_XimCheckICQuarkList(quark_list, num_quark, quark, idx)
XrmQuark *quark_list;
int num_quark;
@@ -503,7 +503,7 @@ _XimCheckICQuarkList(quark_list, num_quark, quark, idx)
return False;
}
-Private Bool
+static Bool
_XimSaveICValues(ic, arg)
Xic ic;
XIMArg *arg;
@@ -610,7 +610,7 @@ _XimSaveICValues(ic, arg)
return True;
}
-Private char *
+static char *
_XimDelayModeSetICValues(ic, arg)
Xic ic;
XIMArg *arg;
@@ -628,7 +628,7 @@ _XimDelayModeSetICValues(ic, arg)
}
#endif /* XIM_CONNECTABLE */
-Private Bool
+static Bool
_XimSetICValuesCheck(
Xim im,
INT16 len,
@@ -657,7 +657,7 @@ _XimSetICValuesCheck(
return False;
}
-Private char *
+static char *
_XimProtoSetICValues(
XIC xic,
XIMArg *arg)
@@ -807,7 +807,7 @@ _XimProtoSetICValues(
return name;
}
-Private Bool
+static Bool
_XimDestroyICCheck(
Xim im,
INT16 len,
@@ -837,7 +837,7 @@ _XimDestroyICCheck(
return ret;
}
-Private void
+static void
_XimProtoICFree(
Xic ic)
{
@@ -884,7 +884,7 @@ _XimProtoICFree(
return;
}
-Private void
+static void
_XimProtoDestroyIC(
XIC xic)
{
@@ -927,7 +927,7 @@ _XimProtoDestroyIC(
return;
}
-Private void
+static void
_XimProtoSetFocus(
XIC xic)
{
@@ -972,7 +972,7 @@ _XimProtoSetFocus(
return;
}
-Private void
+static void
_XimProtoUnsetFocus(
XIC xic)
{
@@ -1017,7 +1017,7 @@ _XimProtoUnsetFocus(
return;
}
-Private Bool
+static Bool
_XimResetICCheck(
Xim im,
INT16 len,
@@ -1046,7 +1046,7 @@ _XimResetICCheck(
return False;
}
-Private char *
+static char *
_XimProtoReset(
XIC xic,
char * (*retfunc) (Xim im, Xic ic, XPointer buf) )
@@ -1117,7 +1117,7 @@ _XimProtoReset(
return commit;
}
-Private char *
+static char *
_XimCommitedMbString(
Xim im,
Xic ic,
@@ -1167,14 +1167,14 @@ Error_On_Reset:
return new_commit;
}
-Private char *
+static char *
_XimProtoMbReset(
XIC xic)
{
return _XimProtoReset(xic, _XimCommitedMbString);
}
-Private wchar_t *
+static wchar_t *
_XimCommitedWcString(
Xim im,
Xic ic,
@@ -1225,7 +1225,7 @@ Error_On_Reset:
return new_commit;
}
-Private wchar_t *
+static wchar_t *
_XimProtoWcReset(
XIC xic)
{
@@ -1233,7 +1233,7 @@ _XimProtoWcReset(
(char * (*) (Xim, Xic, XPointer)) _XimCommitedWcString);
}
-Private char *
+static char *
_XimCommitedUtf8String(
Xim im,
Xic ic,
@@ -1283,14 +1283,14 @@ Error_On_Reset:
return new_commit;
}
-Private char *
+static char *
_XimProtoUtf8Reset(
XIC xic)
{
return _XimProtoReset(xic, _XimCommitedUtf8String);
}
-Private XICMethodsRec ic_methods = {
+static XICMethodsRec ic_methods = {
_XimProtoDestroyIC, /* destroy */
_XimProtoSetFocus, /* set_focus */
_XimProtoUnsetFocus, /* unset_focus */
@@ -1304,7 +1304,7 @@ Private XICMethodsRec ic_methods = {
_XimProtoUtf8LookupString /* utf8_lookup_string */
};
-Private Bool
+static Bool
_XimGetInputStyle(
XIMArg *arg,
XIMStyle *input_style)
@@ -1321,7 +1321,7 @@ _XimGetInputStyle(
}
#ifdef XIM_CONNECTABLE
-Private Bool
+static Bool
_XimDelayModeCreateIC(
Xic ic,
XIMArg *values,
@@ -1356,7 +1356,7 @@ _XimDelayModeCreateIC(
return True;
}
-Public Bool
+Bool
_XimReconnectModeCreateIC(ic)
Xic ic;
{
@@ -1382,7 +1382,7 @@ _XimReconnectModeCreateIC(ic)
}
#endif /* XIM_CONNECTABLE */
-Public XIC
+XIC
_XimProtoCreateIC(
XIM xim,
XIMArg *arg)
diff --git a/libX11/modules/im/ximcp/imDefIm.c b/libX11/modules/im/ximcp/imDefIm.c
index 18a3cc85f..7cac1d300 100644
--- a/libX11/modules/im/ximcp/imDefIm.c
+++ b/libX11/modules/im/ximcp/imDefIm.c
@@ -63,7 +63,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include "Ximint.h"
-Public int
+int
_XimCheckDataSize(
XPointer buf,
int len)
@@ -75,7 +75,7 @@ _XimCheckDataSize(
return buf_s[1];
}
-Public void
+void
_XimSetHeader(
XPointer buf,
CARD8 major_opcode,
@@ -93,7 +93,7 @@ _XimSetHeader(
return;
}
-Public char
+char
_XimGetMyEndian(void)
{
CARD16 test_card = 1;
@@ -104,7 +104,7 @@ _XimGetMyEndian(void)
return BIGENDIAN;
}
-Private Bool
+static Bool
_XimCheckServerName(
Xim im,
char *str)
@@ -142,7 +142,7 @@ _XimCheckServerName(
return True;
}
-Private char *
+static char *
_XimCheckLocaleName(
Xim im,
char *address,
@@ -182,7 +182,7 @@ _XimCheckLocaleName(
return (char *)NULL;
}
-Private Bool
+static Bool
_XimCheckTransport(
char *address,
int address_len,
@@ -226,7 +226,7 @@ _XimCheckTransport(
return True;
}
-Private Bool
+static Bool
_CheckSNEvent(
Display *display,
XEvent *xevent,
@@ -240,7 +240,7 @@ _CheckSNEvent(
return False;
}
-Private Bool
+static Bool
_XimGetSelectionNotify(
Display *display,
Window window,
@@ -269,7 +269,7 @@ _XimGetSelectionNotify(
return True;
}
-Private Bool
+static Bool
_XimPreConnectionIM(
Xim im,
Atom selection)
@@ -387,7 +387,7 @@ Error:
return False;
}
-Private Bool
+static Bool
_XimPreConnect(
Xim im)
{
@@ -434,7 +434,7 @@ _XimPreConnect(
return True;
}
-Private Bool
+static Bool
_XimGetAuthProtocolNames(
Xim im,
CARD16 *buf,
@@ -452,7 +452,7 @@ _XimGetAuthProtocolNames(
return True;
}
-Private Bool
+static Bool
_XimSetAuthReplyData(
Xim im,
XPointer buf,
@@ -465,7 +465,7 @@ _XimSetAuthReplyData(
return True;
}
-Private Bool
+static Bool
_XimSetAuthNextData(
Xim im,
XPointer buf,
@@ -478,7 +478,7 @@ _XimSetAuthNextData(
return True;
}
-Private Bool
+static Bool
_XimSetAuthRequiredData(
Xim im,
XPointer buf,
@@ -491,7 +491,7 @@ _XimSetAuthRequiredData(
return True;
}
-Private Bool
+static Bool
_XimCheckAuthSetupData(
Xim im,
XPointer buf)
@@ -502,7 +502,7 @@ _XimCheckAuthSetupData(
return True;
}
-Private Bool
+static Bool
_XimCheckAuthNextData(
Xim im,
XPointer buf)
@@ -517,7 +517,7 @@ _XimCheckAuthNextData(
#define GOOD_AUTH 1
#define BAD_AUTH 0
-Private int
+static int
_XimClientAuthCheck(
Xim im,
XPointer buf)
@@ -528,7 +528,7 @@ _XimClientAuthCheck(
return NO_MORE_AUTH;
}
-Private void
+static void
_XimAuthNG(
Xim im)
{
@@ -542,7 +542,7 @@ _XimAuthNG(
return;
}
-Private Bool
+static Bool
_XimAllRecv(
Xim im,
INT16 len,
@@ -555,7 +555,7 @@ _XimAllRecv(
#define CLIENT_WAIT1 1
#define CLIENT_WAIT2 2
-Private Bool
+static Bool
_XimConnection(
Xim im)
{
@@ -716,7 +716,7 @@ _XimConnection(
return True;
}
-Private Bool
+static Bool
_XimDisconnectCheck(
Xim im,
INT16 len,
@@ -735,7 +735,7 @@ _XimDisconnectCheck(
return False;
}
-Private Bool
+static Bool
_XimDisconnect(
Xim im)
{
@@ -775,7 +775,7 @@ _XimDisconnect(
return True;
}
-Private Bool
+static Bool
_XimOpenCheck(
Xim im,
INT16 len,
@@ -794,7 +794,7 @@ _XimOpenCheck(
return False;
}
-Private Bool
+static Bool
_XimOpen(
Xim im)
{
@@ -890,7 +890,7 @@ _XimOpen(
return True;
}
-Private Bool
+static Bool
_XimCloseCheck(
Xim im,
INT16 len,
@@ -914,7 +914,7 @@ _XimCloseCheck(
return False;
}
-Private Bool
+static Bool
_XimClose(
Xim im)
{
@@ -972,7 +972,7 @@ _XimClose(
return True;
}
-Public void
+void
_XimProtoIMFree(
Xim im)
{
@@ -1090,7 +1090,7 @@ _XimProtoIMFree(
return;
}
-Private Status
+static Status
_XimProtoCloseIM(
XIM xim)
{
@@ -1138,7 +1138,7 @@ _XimProtoCloseIM(
}
#ifdef XIM_CONNECTABLE
-Private Bool
+static Bool
_XimCheckIMQuarkList(
XrmQuark *quark_list,
int num_quark,
@@ -1154,7 +1154,7 @@ _XimCheckIMQuarkList(
return False;
}
-Private Bool
+static Bool
_XimSaveIMValues(
Xim im,
XIMArg *arg)
@@ -1203,7 +1203,7 @@ _XimSaveIMValues(
return True;
}
-Private char *
+static char *
_XimDelayModeSetIMValues(
Xim im,
XIMArg *arg)
@@ -1221,7 +1221,7 @@ _XimDelayModeSetIMValues(
}
#endif /* XIM_CONNECTABLE */
-Private Bool
+static Bool
_XimSetIMValuesCheck(
Xim im,
INT16 len,
@@ -1245,7 +1245,7 @@ _XimSetIMValuesCheck(
return False;
}
-Private char *
+static char *
_XimProtoSetIMValues(
XIM xim,
XIMArg *arg)
@@ -1377,7 +1377,7 @@ _XimProtoSetIMValues(
}
#ifdef XIM_CONNECTABLE
-Private char *
+static char *
_XimDelayModeGetIMValues(
Xim im,
XIMArg *arg)
@@ -1390,7 +1390,7 @@ _XimDelayModeGetIMValues(
}
#endif /* XIM_CONNECTABLE */
-Private Bool
+static Bool
_XimGetIMValuesCheck(
Xim im,
INT16 len,
@@ -1414,7 +1414,7 @@ _XimGetIMValuesCheck(
return False;
}
-Private char *
+static char *
_XimProtoGetIMValues(
XIM xim,
XIMArg *arg)
@@ -1526,7 +1526,7 @@ _XimProtoGetIMValues(
return makeid_name;
}
-Private XIMMethodsRec im_methods = {
+static XIMMethodsRec im_methods = {
_XimProtoCloseIM, /* close */
_XimProtoSetIMValues, /* set_values */
_XimProtoGetIMValues, /* get_values */
@@ -1536,7 +1536,7 @@ Private XIMMethodsRec im_methods = {
_Ximctstoutf8 /* ctstoutf8 */
};
-Private Bool
+static Bool
_XimSetEncodingByName(
Xim im,
char **buf,
@@ -1569,7 +1569,7 @@ _XimSetEncodingByName(
return True;
}
-Private Bool
+static Bool
_XimSetEncodingByDetail(
Xim im,
char **buf,
@@ -1580,7 +1580,7 @@ _XimSetEncodingByDetail(
return True;
}
-Private Bool
+static Bool
_XimGetEncoding(
Xim im,
CARD16 *buf,
@@ -1669,7 +1669,7 @@ _XimGetEncoding(
return True;
}
-Private Bool
+static Bool
_XimEncodingNegoCheck(
Xim im,
INT16 len,
@@ -1693,7 +1693,7 @@ _XimEncodingNegoCheck(
return False;
}
-Private Bool
+static Bool
_XimEncodingNegotiation(
Xim im)
{
@@ -1799,7 +1799,7 @@ free_name_ptr:
}
#ifdef XIM_CONNECTABLE
-Private Bool
+static Bool
_XimSendSavedIMValues(
Xim im)
{
@@ -1909,7 +1909,7 @@ _XimSendSavedIMValues(
return True;
}
-Private void
+static void
_XimDelayModeIMFree(
Xim im)
{
@@ -1932,7 +1932,7 @@ _XimDelayModeIMFree(
return;
}
-Public Bool
+Bool
_XimConnectServer(
Xim im)
{
@@ -1956,7 +1956,7 @@ _XimConnectServer(
return False;
}
-Public Bool
+Bool
_XimDelayModeSetAttr(
Xim im)
{
@@ -1988,7 +1988,7 @@ _XimDelayModeSetAttr(
return True;
}
-Private Bool
+static Bool
_XimReconnectModeSetAttr(
Xim im)
{
@@ -2015,7 +2015,7 @@ _XimReconnectModeSetAttr(
}
#endif /* XIM_CONNECTABLE */
-Public Bool
+Bool
_XimProtoOpenIM(
Xim im)
{
diff --git a/libX11/modules/im/ximcp/imDefLkup.c b/libX11/modules/im/ximcp/imDefLkup.c
index cf7591909..0a9553a41 100644
--- a/libX11/modules/im/ximcp/imDefLkup.c
+++ b/libX11/modules/im/ximcp/imDefLkup.c
@@ -34,7 +34,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include "Xlcint.h"
#include "Ximint.h"
-Public Xic
+Xic
_XimICOfXICID(
Xim im,
XICID icid)
@@ -48,7 +48,7 @@ _XimICOfXICID(
return (Xic)0;
}
-Private void
+static void
_XimProcIMSetEventMask(
Xim im,
XPointer buf)
@@ -60,7 +60,7 @@ _XimProcIMSetEventMask(
return;
}
-Private void
+static void
_XimProcICSetEventMask(
Xic ic,
XPointer buf)
@@ -73,7 +73,7 @@ _XimProcICSetEventMask(
return;
}
-Public Bool
+Bool
_XimSetEventMaskCallback(
Xim xim,
INT16 len,
@@ -98,7 +98,7 @@ _XimSetEventMaskCallback(
return False;
}
-Private Bool
+static Bool
_XimSyncCheck(
Xim im,
INT16 len,
@@ -127,7 +127,7 @@ _XimSyncCheck(
return False;
}
-Public Bool
+Bool
_XimSync(
Xim im,
Xic ic)
@@ -185,7 +185,7 @@ _XimSync(
return True;
}
-Public Bool
+Bool
_XimProcSyncReply(
Xim im,
Xic ic)
@@ -208,7 +208,7 @@ _XimProcSyncReply(
return True;
}
-Public Bool
+Bool
_XimRespSyncReply(
Xic ic,
BITMASK16 mode)
@@ -219,7 +219,7 @@ _XimRespSyncReply(
return True;
}
-Public Bool
+Bool
_XimSyncCallback(
Xim xim,
INT16 len,
@@ -240,7 +240,7 @@ _XimSyncCallback(
return False;
}
-Private INT16
+static INT16
_XimSetEventToWire(
XEvent *ev,
xEvent *event)
@@ -252,7 +252,7 @@ _XimSetEventToWire(
return sz_xEvent;
}
-Private Bool
+static Bool
_XimForwardEventCore(
Xic ic,
XEvent *ev,
@@ -324,7 +324,7 @@ _XimForwardEventCore(
return True;
}
-Public Bool
+Bool
_XimForwardEvent(
Xic ic,
XEvent *ev,
@@ -338,7 +338,7 @@ _XimForwardEvent(
return _XimForwardEventCore(ic, ev, sync);
}
-Private void
+static void
_XimProcEvent(
Display *d,
Xic ic,
@@ -356,7 +356,7 @@ _XimProcEvent(
return;
}
-Private Bool
+static Bool
_XimForwardEventRecv(
Xim im,
Xic ic,
@@ -375,7 +375,7 @@ _XimForwardEventRecv(
return True;
}
-Public Bool
+Bool
_XimForwardEventCallback(
Xim xim,
INT16 len,
@@ -396,7 +396,7 @@ _XimForwardEventCallback(
return False;
}
-Private Bool
+static Bool
_XimRegisterTriggerkey(
Xim im,
XPointer buf)
@@ -443,7 +443,7 @@ _XimRegisterTriggerkey(
return True;
}
-Public Bool
+Bool
_XimRegisterTriggerKeysCallback(
Xim xim,
INT16 len,
@@ -457,7 +457,7 @@ _XimRegisterTriggerKeysCallback(
return True;
}
-Public EVENTMASK
+EVENTMASK
_XimGetWindowEventmask(
Xic ic)
{
@@ -470,7 +470,7 @@ _XimGetWindowEventmask(
}
-Private Bool
+static Bool
_XimTriggerNotifyCheck(
Xim im,
INT16 len,
@@ -499,7 +499,7 @@ _XimTriggerNotifyCheck(
return False;
}
-Public Bool
+Bool
_XimTriggerNotify(
Xim im,
Xic ic,
@@ -567,7 +567,7 @@ _XimTriggerNotify(
return True;
}
-Private Bool
+static Bool
_XimRegCommitInfo(
Xic ic,
char *string,
@@ -588,7 +588,7 @@ _XimRegCommitInfo(
return True;
}
-Private void
+static void
_XimUnregCommitInfo(
Xic ic)
{
@@ -606,7 +606,7 @@ _XimUnregCommitInfo(
return;
}
-Public void
+void
_XimFreeCommitInfo(
Xic ic)
{
@@ -615,7 +615,7 @@ _XimFreeCommitInfo(
return;
}
-Private Bool
+static Bool
_XimProcKeySym(
Xic ic,
CARD32 sym,
@@ -635,7 +635,7 @@ _XimProcKeySym(
return True;
}
-Private Bool
+static Bool
_XimProcCommit(
Xic ic,
BYTE *buf,
@@ -659,7 +659,7 @@ _XimProcCommit(
return True;
}
-Private Bool
+static Bool
_XimCommitRecv(
Xim im,
Xic ic,
@@ -718,7 +718,7 @@ _XimCommitRecv(
return True;
}
-Public Bool
+Bool
_XimCommitCallback(
Xim xim,
INT16 len,
@@ -739,7 +739,7 @@ _XimCommitCallback(
return False;
}
-Public void
+void
_XimProcError(
Xim im,
Xic ic,
@@ -748,7 +748,7 @@ _XimProcError(
return;
}
-Public Bool
+Bool
_XimErrorCallback(
Xim xim,
INT16 len,
@@ -777,7 +777,7 @@ _XimErrorCallback(
return True;
}
-Public Bool
+Bool
_XimError(
Xim im,
Xic ic,
@@ -821,7 +821,7 @@ _XimError(
return True;
}
-Private int
+static int
_Ximctsconvert(
XlcConv conv,
char *from,
@@ -887,7 +887,7 @@ _Ximctsconvert(
return to_cnvlen;
}
-Public int
+int
_Ximctstombs(XIM xim, char *from, int from_len,
char *to, int to_len, Status *state)
{
@@ -895,7 +895,7 @@ _Ximctstombs(XIM xim, char *from, int from_len,
from, from_len, to, to_len, state);
}
-Public int
+int
_Ximctstowcs(
XIM xim,
char *from,
@@ -963,7 +963,7 @@ _Ximctstowcs(
return to_cnvlen;
}
-Public int
+int
_Ximctstoutf8(
XIM xim,
char *from,
@@ -976,7 +976,7 @@ _Ximctstoutf8(
from, from_len, to, to_len, state);
}
-Public int
+int
_XimProtoMbLookupString(
XIC xic,
XKeyEvent *ev,
@@ -1039,7 +1039,7 @@ _XimProtoMbLookupString(
return ret;
}
-Public int
+int
_XimProtoWcLookupString(
XIC xic,
XKeyEvent *ev,
@@ -1102,7 +1102,7 @@ _XimProtoWcLookupString(
return ret;
}
-Public int
+int
_XimProtoUtf8LookupString(
XIC xic,
XKeyEvent *ev,
diff --git a/libX11/modules/im/ximcp/imDispch.c b/libX11/modules/im/ximcp/imDispch.c
index 3d67909ee..10c73ac0f 100644
--- a/libX11/modules/im/ximcp/imDispch.c
+++ b/libX11/modules/im/ximcp/imDispch.c
@@ -1,104 +1,104 @@
-/******************************************************************
-
- Copyright 1993, 1994 by FUJITSU LIMITED
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and
-that both that copyright notice and this permission notice appear
-in supporting documentation, and that the name of FUJITSU LIMITED
-not be used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-FUJITSU LIMITED makes no representations about the suitability of
-this software for any purpose.
-It is provided "as is" without express or implied warranty.
-
-FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
-USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
- Author: Takashi Fujiwara FUJITSU LIMITED
- fujiwara@a80.tech.yk.fujitsu.co.jp
-
-******************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <X11/Xlib.h>
-#include "Xlibint.h"
-#include "Xutil.h"
-#include "Xlcint.h"
-#include "Ximint.h"
-
-
-Public Bool
-_XimRegProtoIntrCallback(
- Xim im,
- CARD16 major_code,
- CARD16 minor_code,
- Bool (*proc)(
- Xim, INT16, XPointer, XPointer
- ),
-
- XPointer call_data)
-{
- XimProtoIntrRec *rec;
-
- if (!(rec = (XimProtoIntrRec *)Xmalloc(sizeof(XimProtoIntrRec))))
- return False;
- rec->func = proc;
- rec->major_code = major_code;
- rec->minor_code = minor_code;
- rec->call_data = call_data;
- rec->next = im->private.proto.intrproto;
- im->private.proto.intrproto = rec;
- return True;
-}
-
-Public void
-_XimFreeProtoIntrCallback(Xim im)
-{
- register XimProtoIntrRec *rec, *next;
-
- for (rec = im->private.proto.intrproto; rec;) {
- next = rec->next;
- Xfree(rec);
- rec = next;
- }
- im->private.proto.intrproto = NULL;
- return;
-}
-
-Private Bool
-_XimTransportIntr(
- Xim im,
- INT16 len,
- XPointer data,
- XPointer call_data)
-{
- Xim call_im = (Xim)call_data;
- XimProtoIntrRec *rec = call_im->private.proto.intrproto;
- CARD8 major_opcode = *((CARD8 *)data);
- CARD8 minor_opcode = *((CARD8 *)data + 1);
-
- for (; rec; rec = rec->next) {
- if ((major_opcode == (CARD8)rec->major_code)
- && (minor_opcode == (CARD8)rec->minor_code))
- if ((*rec->func)(call_im, len, data, rec->call_data))
- return True;
- }
- return False;
-}
-
-Public Bool
-_XimDispatchInit(Xim im)
-{
- if (_XimRegisterDispatcher(im, _XimTransportIntr, (XPointer)im))
- return True;
- return False;
-}
+/******************************************************************
+
+ Copyright 1993, 1994 by FUJITSU LIMITED
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and
+that both that copyright notice and this permission notice appear
+in supporting documentation, and that the name of FUJITSU LIMITED
+not be used in advertising or publicity pertaining to distribution
+of the software without specific, written prior permission.
+FUJITSU LIMITED makes no representations about the suitability of
+this software for any purpose.
+It is provided "as is" without express or implied warranty.
+
+FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+ Author: Takashi Fujiwara FUJITSU LIMITED
+ fujiwara@a80.tech.yk.fujitsu.co.jp
+
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <X11/Xlib.h>
+#include "Xlibint.h"
+#include "Xutil.h"
+#include "Xlcint.h"
+#include "Ximint.h"
+
+
+Bool
+_XimRegProtoIntrCallback(
+ Xim im,
+ CARD16 major_code,
+ CARD16 minor_code,
+ Bool (*proc)(
+ Xim, INT16, XPointer, XPointer
+ ),
+
+ XPointer call_data)
+{
+ XimProtoIntrRec *rec;
+
+ if (!(rec = (XimProtoIntrRec *)Xmalloc(sizeof(XimProtoIntrRec))))
+ return False;
+ rec->func = proc;
+ rec->major_code = major_code;
+ rec->minor_code = minor_code;
+ rec->call_data = call_data;
+ rec->next = im->private.proto.intrproto;
+ im->private.proto.intrproto = rec;
+ return True;
+}
+
+void
+_XimFreeProtoIntrCallback(Xim im)
+{
+ register XimProtoIntrRec *rec, *next;
+
+ for (rec = im->private.proto.intrproto; rec;) {
+ next = rec->next;
+ Xfree(rec);
+ rec = next;
+ }
+ im->private.proto.intrproto = NULL;
+ return;
+}
+
+static Bool
+_XimTransportIntr(
+ Xim im,
+ INT16 len,
+ XPointer data,
+ XPointer call_data)
+{
+ Xim call_im = (Xim)call_data;
+ XimProtoIntrRec *rec = call_im->private.proto.intrproto;
+ CARD8 major_opcode = *((CARD8 *)data);
+ CARD8 minor_opcode = *((CARD8 *)data + 1);
+
+ for (; rec; rec = rec->next) {
+ if ((major_opcode == (CARD8)rec->major_code)
+ && (minor_opcode == (CARD8)rec->minor_code))
+ if ((*rec->func)(call_im, len, data, rec->call_data))
+ return True;
+ }
+ return False;
+}
+
+Bool
+_XimDispatchInit(Xim im)
+{
+ if (_XimRegisterDispatcher(im, _XimTransportIntr, (XPointer)im))
+ return True;
+ return False;
+}
diff --git a/libX11/modules/im/ximcp/imExten.c b/libX11/modules/im/ximcp/imExten.c
index 65e59bcb4..e5a0b2723 100644
--- a/libX11/modules/im/ximcp/imExten.c
+++ b/libX11/modules/im/ximcp/imExten.c
@@ -55,7 +55,7 @@ typedef struct _XIM_QueryExtRec {
int idx;
} XIM_QueryExtRec;
-Private XIM_QueryExtRec extensions[] = {
+static XIM_QueryExtRec extensions[] = {
{False, "XIM_EXT_SET_EVENT_MASK", 0, 0, 0,
XIM_EXT_SET_EVENT_MASK_IDX},
#ifdef EXT_FORWARD
@@ -68,7 +68,7 @@ Private XIM_QueryExtRec extensions[] = {
{False, NULL, 0, 0, 0, 0} /* dummy */
};
-Private int
+static int
_XimIsSupportExt(
int idx)
{
@@ -86,7 +86,7 @@ _XimIsSupportExt(
return -1;
}
-Private Bool
+static Bool
_XimProcExtSetEventMask(
Xim im,
Xic ic,
@@ -113,7 +113,7 @@ _XimProcExtSetEventMask(
return True;
}
-Private Bool
+static Bool
_XimExtSetEventMaskCallback(
Xim xim,
INT16 len,
@@ -135,7 +135,7 @@ _XimExtSetEventMaskCallback(
}
#ifdef EXT_FORWARD
-Private Bool
+static Bool
_XimProcExtForwardKeyEvent(
Xim im,
Xic ic,
@@ -164,7 +164,7 @@ _XimProcExtForwardKeyEvent(
return True;
}
-Private Bool
+static Bool
_XimExtForwardKeyEventCallback(
Xim xim,
INT16 len,
@@ -185,7 +185,7 @@ _XimExtForwardKeyEventCallback(
return False;
}
-Private Bool
+static Bool
_XimExtForwardKeyEventCheck(
Xim im,
INT16 len,
@@ -213,7 +213,7 @@ _XimExtForwardKeyEventCheck(
return False;
}
-Public Bool
+Bool
_XimExtForwardKeyEvent(
Xic ic,
XKeyEvent *ev,
@@ -295,7 +295,7 @@ _XimExtForwardKeyEvent(
}
#endif /* EXT_FORWARD */
-Private int
+static int
_XimCheckExtensionListSize(void)
{
register int i;
@@ -312,7 +312,7 @@ _XimCheckExtensionListSize(void)
return total;
}
-Private void
+static void
_XimSetExtensionList(
CARD8 *buf)
{
@@ -330,7 +330,7 @@ _XimSetExtensionList(
return;
}
-Private unsigned int
+static unsigned int
_XimCountNumberOfExtension(
INT16 total,
CARD8 *ext)
@@ -352,7 +352,7 @@ _XimCountNumberOfExtension(
return n;
}
-Private Bool
+static Bool
_XimParseExtensionList(
Xim im,
CARD16 *data)
@@ -388,7 +388,7 @@ _XimParseExtensionList(
return True;
}
-Private Bool
+static Bool
_XimQueryExtensionCheck(
Xim im,
INT16 len,
@@ -412,7 +412,7 @@ _XimQueryExtensionCheck(
return False;
}
-Public Bool
+Bool
_XimExtension(
Xim im)
{
@@ -518,7 +518,7 @@ _XimExtension(
/* length of XPoint attribute */
#define XIM_Xpoint_length 12
-Private Bool
+static Bool
_XimExtMove(
Xim im,
Xic ic,
@@ -551,7 +551,7 @@ _XimExtMove(
return True;
}
-Public BITMASK32
+BITMASK32
_XimExtenArgCheck(
XIMArg *arg)
{
@@ -561,7 +561,7 @@ _XimExtenArgCheck(
return flag;
}
-Public Bool
+Bool
_XimExtenMove(
Xim im,
Xic ic,
diff --git a/libX11/modules/im/ximcp/imImSw.c b/libX11/modules/im/ximcp/imImSw.c
index dfa6d6699..28b1725a6 100644
--- a/libX11/modules/im/ximcp/imImSw.c
+++ b/libX11/modules/im/ximcp/imImSw.c
@@ -1,55 +1,55 @@
-/******************************************************************
-
- Copyright 1992, 1993 by FUJITSU LIMITED
- Copyright 1993 by Digital Equipment Corporation
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of FUJITSU LIMITED and
-Digital Equipment Corporation not be used in advertising or publicity
-pertaining to distribution of the software without specific, written
-prior permission. FUJITSU LIMITED and Digital Equipment Corporation
-makes no representations about the suitability of this software for
-any purpose. It is provided "as is" without express or implied
-warranty.
-
-FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION DISCLAIM ALL
-WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR
-ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
- Author: Takashi Fujiwara FUJITSU LIMITED
- fujiwara@a80.tech.yk.fujitsu.co.jp
- Modifier: Franky Ling Digital Equipment Corporation
- frankyling@hgrd01.enet.dec.com
-
-******************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "Xlibint.h"
-#include "Xlcint.h"
-#include "Ximint.h"
-#include "XimImSw.h"
-
-Private Bool
-_XimCheckIfDefault(
- Xim im)
-{
- return(True);
-}
-
-XimImsportSW _XimImSportRec[] = {
- { _XimCheckIfLocalProcessing, _XimLocalOpenIM, _XimLocalIMFree },
- { _XimCheckIfThaiProcessing, _XimThaiOpenIM, _XimThaiIMFree },
- { _XimCheckIfDefault, _XimProtoOpenIM, _XimProtoIMFree },
- { NULL, NULL, NULL },
-};
+/******************************************************************
+
+ Copyright 1992, 1993 by FUJITSU LIMITED
+ Copyright 1993 by Digital Equipment Corporation
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of FUJITSU LIMITED and
+Digital Equipment Corporation not be used in advertising or publicity
+pertaining to distribution of the software without specific, written
+prior permission. FUJITSU LIMITED and Digital Equipment Corporation
+makes no representations about the suitability of this software for
+any purpose. It is provided "as is" without express or implied
+warranty.
+
+FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION DISCLAIM ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+
+ Author: Takashi Fujiwara FUJITSU LIMITED
+ fujiwara@a80.tech.yk.fujitsu.co.jp
+ Modifier: Franky Ling Digital Equipment Corporation
+ frankyling@hgrd01.enet.dec.com
+
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include "Xlibint.h"
+#include "Xlcint.h"
+#include "Ximint.h"
+#include "XimImSw.h"
+
+static Bool
+_XimCheckIfDefault(
+ Xim im)
+{
+ return(True);
+}
+
+XimImsportSW _XimImSportRec[] = {
+ { _XimCheckIfLocalProcessing, _XimLocalOpenIM, _XimLocalIMFree },
+ { _XimCheckIfThaiProcessing, _XimThaiOpenIM, _XimThaiIMFree },
+ { _XimCheckIfDefault, _XimProtoOpenIM, _XimProtoIMFree },
+ { NULL, NULL, NULL },
+};
diff --git a/libX11/modules/im/ximcp/imInsClbk.c b/libX11/modules/im/ximcp/imInsClbk.c
index 263dec6d9..b867d2f6f 100644
--- a/libX11/modules/im/ximcp/imInsClbk.c
+++ b/libX11/modules/im/ximcp/imInsClbk.c
@@ -1,288 +1,288 @@
-/******************************************************************
-
- Copyright 1993, 1994 by Sony Corporation
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and
-that both that copyright notice and this permission notice appear
-in supporting documentation, and that the name of Sony Corporation
- not be used in advertising or publicity pertaining to distribution
- of the software without specific, written prior permission.
-Sony Corporation makes no representations about the suitability of
- this software for any purpose. It is provided "as is" without
- express or implied warranty.
-
-SONY CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL SONY CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
-USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
- Author: Makoto Wakamatsu Sony Corporation
- makoto@sm.sony.co.jp
-
-******************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <X11/Xatom.h>
-#include "Xlibint.h"
-#include "Xlcint.h"
-#include "XlcPublic.h"
-#include "Ximint.h"
-
-
-typedef struct _XimInstCallback {
- Bool call;
- Bool destroy;
- Display *display;
- XLCd lcd;
- char name[XIM_MAXLCNAMELEN];
- char *modifiers;
- XrmDatabase rdb;
- char *res_name;
- char *res_class;
- XIDProc callback;
- XPointer client_data;
- struct _XimInstCallback *next;
-} XimInstCallbackRec, *XimInstCallback;
-
-
-Private XimInstCallback callback_list = NULL;
-Private Bool lock = False;
-
-
-Private void
-MakeLocale( XLCd lcd, char locale[] )
-{
- char *language, *territory, *codeset;
-
- _XGetLCValues( lcd, XlcNLanguage, &language, XlcNTerritory, &territory,
- XlcNCodeset, &codeset, NULL );
-
- strcpy( locale, language );
- if( territory && *territory ) {
- strcat( locale, "_" );
- strcat( locale, territory );
- }
- if( codeset && *codeset ) {
- strcat( locale, "." );
- strcat( locale, codeset );
- }
-}
-
-
-Private Bool
-_XimFilterPropertyNotify(
- Display *display,
- Window window,
- XEvent *event,
- XPointer client_data)
-{
- Atom ims, actual_type, *atoms;
- int actual_format;
- unsigned long nitems, bytes_after;
- int ii;
- XIM xim;
- Bool flag = False;
- XimInstCallback icb, picb, tmp;
-
- if( (ims = XInternAtom( display, XIM_SERVERS, True )) == None ||
- event->xproperty.atom != ims ||
- event->xproperty.state == PropertyDelete )
- return( False );
-
- if( XGetWindowProperty( display, RootWindow(display, 0), ims, 0L, 1000000L,
- False, XA_ATOM, &actual_type, &actual_format,
- &nitems, &bytes_after, (unsigned char **)&atoms )
- != Success ) {
- return( False );
- }
- if( actual_type != XA_ATOM || actual_format != 32 ) {
- XFree( atoms );
- return( False );
- }
-
- lock = True;
- for( ii = 0; ii < nitems; ii++, atoms ) {
- if(XGetSelectionOwner (display, atoms[ii])) {
- for( icb = callback_list; icb; icb = icb->next ) {
- if( !icb->call && !icb->destroy ) {
- xim = (*icb->lcd->methods->open_im)( icb->lcd, display,
- icb->rdb,
- icb->res_name,
- icb->res_class );
- if( xim ) {
- xim->methods->close( (XIM)xim );
- flag = True;
- icb->call = True;
- icb->callback( icb->display, icb->client_data, NULL );
- }
- }
- }
- break;
- }
- }
- XFree( atoms );
-
- for( icb = callback_list, picb = NULL; icb; ) {
- if( icb->destroy ) {
- if( picb )
- picb->next = icb->next;
- else
- callback_list = icb->next;
- tmp = icb;
- icb = icb->next;
- XFree( tmp );
- }
- else {
- picb = icb;
- icb = icb->next;
- }
- }
- lock = False;
-
- return( flag );
-}
-
-
-Public Bool
-_XimRegisterIMInstantiateCallback(
- XLCd lcd,
- Display *display,
- XrmDatabase rdb,
- char *res_name,
- char *res_class,
- XIDProc callback,
- XPointer client_data)
-{
- XimInstCallback icb, tmp;
- XIM xim;
- Window root;
- XWindowAttributes attr;
-
- if( lock )
- return( False );
-
- icb = (XimInstCallback)Xmalloc(sizeof(XimInstCallbackRec));
- if( !icb )
- return( False );
- icb->call = icb->destroy = False;
- icb->display = display;
- icb->lcd = lcd;
- MakeLocale( lcd, icb->name );
- icb->modifiers = lcd->core->modifiers; /* XXXXX */
- icb->rdb = rdb;
- icb->res_name = res_name;
- icb->res_class = res_class;
- icb->callback = callback;
- icb->client_data = client_data;
- icb->next = NULL;
-
- if( !callback_list )
- callback_list = icb;
- else {
- for( tmp = callback_list; tmp->next; tmp = tmp->next );
- tmp->next = icb;
- }
-
- xim = (*lcd->methods->open_im)( lcd, display, rdb, res_name, res_class );
-
- if( icb == callback_list ) {
- root = RootWindow( display, 0 );
- XGetWindowAttributes( display, root, &attr );
- _XRegisterFilterByType( display, root, PropertyNotify, PropertyNotify,
- _XimFilterPropertyNotify, (XPointer)NULL );
- XSelectInput( display, root,
- attr.your_event_mask | PropertyChangeMask );
- }
-
- if( xim ) {
- lock = True;
- xim->methods->close( (XIM)xim );
- lock = False;
- icb->call = True;
- callback( display, client_data, NULL );
- }
-
- return( True );
-}
-
-
-Public Bool
-_XimUnRegisterIMInstantiateCallback(
- XLCd lcd,
- Display *display,
- XrmDatabase rdb,
- char *res_name,
- char *res_class,
- XIDProc callback,
- XPointer client_data)
-{
- char locale[XIM_MAXLCNAMELEN];
- XimInstCallback icb, picb;
-
- if( !callback_list )
- return( False );
-
- MakeLocale( lcd, locale );
-
- for( icb = callback_list, picb = NULL; icb; picb = icb, icb = icb->next ) {
- if( !strcmp( locale, icb->name ) &&
- (lcd->core->modifiers == icb->modifiers || /* XXXXX */
- (lcd->core->modifiers && icb->modifiers &&
- !strcmp( lcd->core->modifiers, icb->modifiers ))) &&
- rdb == icb->rdb && /* XXXXX */
- ((res_name == NULL && icb->res_name == NULL) ||
- (res_name != NULL && icb->res_name != NULL &&
- !strcmp( res_name, icb->res_name ))) &&
- ((res_class == NULL && icb->res_class == NULL) ||
- (res_class != NULL && icb->res_class != NULL &&
- !strcmp( res_class, icb->res_class ))) &&
- (callback == icb->callback) &&
- (client_data == icb->client_data) && /* XXXXX */
- !icb->destroy ) {
- if( lock )
- icb->destroy = True;
- else {
- if( !picb ) {
- callback_list = icb->next;
- _XUnregisterFilter( display, RootWindow(display, 0),
- _XimFilterPropertyNotify,
- (XPointer)NULL );
- }
- else
- picb->next = icb->next;
- _XCloseLC( icb->lcd );
- XFree( icb );
- }
- return( True );
- }
- }
- return( False );
-}
-
-
-Public void
-_XimResetIMInstantiateCallback(Xim xim)
-{
- char locale[XIM_MAXLCNAMELEN];
- XimInstCallback icb;
- XLCd lcd = xim->core.lcd;
-
- if( !callback_list && lock )
- return;
-
- MakeLocale( lcd, locale );
-
- for( icb = callback_list; icb; icb = icb->next )
- if( !strcmp( locale, icb->name ) &&
- (lcd->core->modifiers == icb->modifiers ||
- (lcd->core->modifiers && icb->modifiers &&
- !strcmp( lcd->core->modifiers, icb->modifiers ))) )
- icb->call = False;
-}
+/******************************************************************
+
+ Copyright 1993, 1994 by Sony Corporation
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and
+that both that copyright notice and this permission notice appear
+in supporting documentation, and that the name of Sony Corporation
+ not be used in advertising or publicity pertaining to distribution
+ of the software without specific, written prior permission.
+Sony Corporation makes no representations about the suitability of
+ this software for any purpose. It is provided "as is" without
+ express or implied warranty.
+
+SONY CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL SONY CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+ Author: Makoto Wakamatsu Sony Corporation
+ makoto@sm.sony.co.jp
+
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <X11/Xatom.h>
+#include "Xlibint.h"
+#include "Xlcint.h"
+#include "XlcPublic.h"
+#include "Ximint.h"
+
+
+typedef struct _XimInstCallback {
+ Bool call;
+ Bool destroy;
+ Display *display;
+ XLCd lcd;
+ char name[XIM_MAXLCNAMELEN];
+ char *modifiers;
+ XrmDatabase rdb;
+ char *res_name;
+ char *res_class;
+ XIDProc callback;
+ XPointer client_data;
+ struct _XimInstCallback *next;
+} XimInstCallbackRec, *XimInstCallback;
+
+
+static XimInstCallback callback_list = NULL;
+static Bool lock = False;
+
+
+static void
+MakeLocale( XLCd lcd, char locale[] )
+{
+ char *language, *territory, *codeset;
+
+ _XGetLCValues( lcd, XlcNLanguage, &language, XlcNTerritory, &territory,
+ XlcNCodeset, &codeset, NULL );
+
+ strcpy( locale, language );
+ if( territory && *territory ) {
+ strcat( locale, "_" );
+ strcat( locale, territory );
+ }
+ if( codeset && *codeset ) {
+ strcat( locale, "." );
+ strcat( locale, codeset );
+ }
+}
+
+
+static Bool
+_XimFilterPropertyNotify(
+ Display *display,
+ Window window,
+ XEvent *event,
+ XPointer client_data)
+{
+ Atom ims, actual_type, *atoms;
+ int actual_format;
+ unsigned long nitems, bytes_after;
+ int ii;
+ XIM xim;
+ Bool flag = False;
+ XimInstCallback icb, picb, tmp;
+
+ if( (ims = XInternAtom( display, XIM_SERVERS, True )) == None ||
+ event->xproperty.atom != ims ||
+ event->xproperty.state == PropertyDelete )
+ return( False );
+
+ if( XGetWindowProperty( display, RootWindow(display, 0), ims, 0L, 1000000L,
+ False, XA_ATOM, &actual_type, &actual_format,
+ &nitems, &bytes_after, (unsigned char **)&atoms )
+ != Success ) {
+ return( False );
+ }
+ if( actual_type != XA_ATOM || actual_format != 32 ) {
+ XFree( atoms );
+ return( False );
+ }
+
+ lock = True;
+ for( ii = 0; ii < nitems; ii++, atoms ) {
+ if(XGetSelectionOwner (display, atoms[ii])) {
+ for( icb = callback_list; icb; icb = icb->next ) {
+ if( !icb->call && !icb->destroy ) {
+ xim = (*icb->lcd->methods->open_im)( icb->lcd, display,
+ icb->rdb,
+ icb->res_name,
+ icb->res_class );
+ if( xim ) {
+ xim->methods->close( (XIM)xim );
+ flag = True;
+ icb->call = True;
+ icb->callback( icb->display, icb->client_data, NULL );
+ }
+ }
+ }
+ break;
+ }
+ }
+ XFree( atoms );
+
+ for( icb = callback_list, picb = NULL; icb; ) {
+ if( icb->destroy ) {
+ if( picb )
+ picb->next = icb->next;
+ else
+ callback_list = icb->next;
+ tmp = icb;
+ icb = icb->next;
+ XFree( tmp );
+ }
+ else {
+ picb = icb;
+ icb = icb->next;
+ }
+ }
+ lock = False;
+
+ return( flag );
+}
+
+
+Bool
+_XimRegisterIMInstantiateCallback(
+ XLCd lcd,
+ Display *display,
+ XrmDatabase rdb,
+ char *res_name,
+ char *res_class,
+ XIDProc callback,
+ XPointer client_data)
+{
+ XimInstCallback icb, tmp;
+ XIM xim;
+ Window root;
+ XWindowAttributes attr;
+
+ if( lock )
+ return( False );
+
+ icb = (XimInstCallback)Xmalloc(sizeof(XimInstCallbackRec));
+ if( !icb )
+ return( False );
+ icb->call = icb->destroy = False;
+ icb->display = display;
+ icb->lcd = lcd;
+ MakeLocale( lcd, icb->name );
+ icb->modifiers = lcd->core->modifiers; /* XXXXX */
+ icb->rdb = rdb;
+ icb->res_name = res_name;
+ icb->res_class = res_class;
+ icb->callback = callback;
+ icb->client_data = client_data;
+ icb->next = NULL;
+
+ if( !callback_list )
+ callback_list = icb;
+ else {
+ for( tmp = callback_list; tmp->next; tmp = tmp->next );
+ tmp->next = icb;
+ }
+
+ xim = (*lcd->methods->open_im)( lcd, display, rdb, res_name, res_class );
+
+ if( icb == callback_list ) {
+ root = RootWindow( display, 0 );
+ XGetWindowAttributes( display, root, &attr );
+ _XRegisterFilterByType( display, root, PropertyNotify, PropertyNotify,
+ _XimFilterPropertyNotify, (XPointer)NULL );
+ XSelectInput( display, root,
+ attr.your_event_mask | PropertyChangeMask );
+ }
+
+ if( xim ) {
+ lock = True;
+ xim->methods->close( (XIM)xim );
+ lock = False;
+ icb->call = True;
+ callback( display, client_data, NULL );
+ }
+
+ return( True );
+}
+
+
+Bool
+_XimUnRegisterIMInstantiateCallback(
+ XLCd lcd,
+ Display *display,
+ XrmDatabase rdb,
+ char *res_name,
+ char *res_class,
+ XIDProc callback,
+ XPointer client_data)
+{
+ char locale[XIM_MAXLCNAMELEN];
+ XimInstCallback icb, picb;
+
+ if( !callback_list )
+ return( False );
+
+ MakeLocale( lcd, locale );
+
+ for( icb = callback_list, picb = NULL; icb; picb = icb, icb = icb->next ) {
+ if( !strcmp( locale, icb->name ) &&
+ (lcd->core->modifiers == icb->modifiers || /* XXXXX */
+ (lcd->core->modifiers && icb->modifiers &&
+ !strcmp( lcd->core->modifiers, icb->modifiers ))) &&
+ rdb == icb->rdb && /* XXXXX */
+ ((res_name == NULL && icb->res_name == NULL) ||
+ (res_name != NULL && icb->res_name != NULL &&
+ !strcmp( res_name, icb->res_name ))) &&
+ ((res_class == NULL && icb->res_class == NULL) ||
+ (res_class != NULL && icb->res_class != NULL &&
+ !strcmp( res_class, icb->res_class ))) &&
+ (callback == icb->callback) &&
+ (client_data == icb->client_data) && /* XXXXX */
+ !icb->destroy ) {
+ if( lock )
+ icb->destroy = True;
+ else {
+ if( !picb ) {
+ callback_list = icb->next;
+ _XUnregisterFilter( display, RootWindow(display, 0),
+ _XimFilterPropertyNotify,
+ (XPointer)NULL );
+ }
+ else
+ picb->next = icb->next;
+ _XCloseLC( icb->lcd );
+ XFree( icb );
+ }
+ return( True );
+ }
+ }
+ return( False );
+}
+
+
+void
+_XimResetIMInstantiateCallback(Xim xim)
+{
+ char locale[XIM_MAXLCNAMELEN];
+ XimInstCallback icb;
+ XLCd lcd = xim->core.lcd;
+
+ if( !callback_list && lock )
+ return;
+
+ MakeLocale( lcd, locale );
+
+ for( icb = callback_list; icb; icb = icb->next )
+ if( !strcmp( locale, icb->name ) &&
+ (lcd->core->modifiers == icb->modifiers ||
+ (lcd->core->modifiers && icb->modifiers &&
+ !strcmp( lcd->core->modifiers, icb->modifiers ))) )
+ icb->call = False;
+}
diff --git a/libX11/modules/im/ximcp/imInt.c b/libX11/modules/im/ximcp/imInt.c
index 26f4991a2..addae0abc 100644
--- a/libX11/modules/im/ximcp/imInt.c
+++ b/libX11/modules/im/ximcp/imInt.c
@@ -37,10 +37,10 @@ PERFORMANCE OF THIS SOFTWARE.
#include "Ximint.h"
#include "XimImSw.h"
-Private Xim *_XimCurrentIMlist = (Xim *)NULL;
-Private int _XimCurrentIMcount = 0;
+static Xim *_XimCurrentIMlist = (Xim *)NULL;
+static int _XimCurrentIMcount = 0;
-Private Bool
+static Bool
_XimSetIMStructureList(
Xim im)
{
@@ -72,7 +72,7 @@ _XimSetIMStructureList(
return True;
}
-Public void
+void
_XimDestroyIMStructureList(Xim im)
{
register int i;
@@ -86,7 +86,7 @@ _XimDestroyIMStructureList(Xim im)
return;
}
-Public void
+void
_XimServerDestroy(Xim im_2_destroy)
{
register int i;
@@ -120,7 +120,7 @@ _XimServerDestroy(Xim im_2_destroy)
}
#ifdef XIM_CONNECTABLE
-Public void
+void
_XimServerReconectableDestroy(void)
{
register int i;
@@ -147,7 +147,7 @@ _XimServerReconectableDestroy(void)
}
#endif /* XIM_CONNECTABLE */
-Private const char *
+static const char *
_XimStrstr(
register const char *src,
register const char *dest)
@@ -163,7 +163,7 @@ _XimStrstr(
return NULL;
}
-Private char *
+static char *
_XimMakeImName(
XLCd lcd)
{
@@ -193,7 +193,7 @@ _XimMakeImName(
return ret;
}
-Public XIM
+XIM
_XimOpenIM(
XLCd lcd,
Display *dpy,
@@ -251,7 +251,7 @@ Error1:
return NULL;
}
-Public Bool
+Bool
_XInitIM(XLCd lcd)
{
if(lcd == (XLCd)NULL)
diff --git a/libX11/modules/im/ximcp/imLcGIc.c b/libX11/modules/im/ximcp/imLcGIc.c
index 2ee5adbc2..003b3897a 100644
--- a/libX11/modules/im/ximcp/imLcGIc.c
+++ b/libX11/modules/im/ximcp/imLcGIc.c
@@ -1,47 +1,47 @@
-/******************************************************************
-
- Copyright 1992,1993, 1994 by FUJITSU LIMITED
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and
-that both that copyright notice and this permission notice appear
-in supporting documentation, and that the name of FUJITSU LIMITED
-not be used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-FUJITSU LIMITED makes no representations about the suitability of
-this software for any purpose.
-It is provided "as is" without express or implied warranty.
-
-FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
-USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
- Author: Takashi Fujiwara FUJITSU LIMITED
- fujiwara@a80.tech.yk.fujitsu.co.jp
-
-******************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "Xlibint.h"
-#include "Xlcint.h"
-#include "Ximint.h"
-
-Public char *
-_XimLocalGetICValues(XIC xic, XIMArg *values)
-{
- Xic ic = (Xic)xic;
- XimDefICValues ic_values;
-
- _XimGetCurrentICValues(ic, &ic_values);
- return(_XimGetICValueData(ic, (XPointer)&ic_values,
- ic->private.local.ic_resources,
- ic->private.local.ic_num_resources,
- values, XIM_GETICVALUES));
-}
+/******************************************************************
+
+ Copyright 1992,1993, 1994 by FUJITSU LIMITED
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and
+that both that copyright notice and this permission notice appear
+in supporting documentation, and that the name of FUJITSU LIMITED
+not be used in advertising or publicity pertaining to distribution
+of the software without specific, written prior permission.
+FUJITSU LIMITED makes no representations about the suitability of
+this software for any purpose.
+It is provided "as is" without express or implied warranty.
+
+FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+ Author: Takashi Fujiwara FUJITSU LIMITED
+ fujiwara@a80.tech.yk.fujitsu.co.jp
+
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include "Xlibint.h"
+#include "Xlcint.h"
+#include "Ximint.h"
+
+char *
+_XimLocalGetICValues(XIC xic, XIMArg *values)
+{
+ Xic ic = (Xic)xic;
+ XimDefICValues ic_values;
+
+ _XimGetCurrentICValues(ic, &ic_values);
+ return(_XimGetICValueData(ic, (XPointer)&ic_values,
+ ic->private.local.ic_resources,
+ ic->private.local.ic_num_resources,
+ values, XIM_GETICVALUES));
+}
diff --git a/libX11/modules/im/ximcp/imLcIc.c b/libX11/modules/im/ximcp/imLcIc.c
index 49338853c..ef18453ae 100644
--- a/libX11/modules/im/ximcp/imLcIc.c
+++ b/libX11/modules/im/ximcp/imLcIc.c
@@ -36,7 +36,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include "Xlcint.h"
#include "Ximint.h"
-Private void
+static void
_XimLocalUnSetFocus(
XIC xic)
{
@@ -49,7 +49,7 @@ _XimLocalUnSetFocus(
return;
}
-Private void
+static void
_XimLocalDestroyIC(
XIC xic)
{
@@ -68,7 +68,7 @@ _XimLocalDestroyIC(
return;
}
-Private void
+static void
_XimLocalSetFocus(
XIC xic)
{
@@ -90,7 +90,7 @@ _XimLocalSetFocus(
return;
}
-Private void
+static void
_XimLocalReset(
XIC xic)
{
@@ -102,7 +102,7 @@ _XimLocalReset(
ic->private.local.brl_committed = 0;
}
-Private char *
+static char *
_XimLocalMbReset(
XIC xic)
{
@@ -110,7 +110,7 @@ _XimLocalMbReset(
return (char *)NULL;
}
-Private wchar_t *
+static wchar_t *
_XimLocalWcReset(
XIC xic)
{
@@ -118,7 +118,7 @@ _XimLocalWcReset(
return (wchar_t *)NULL;
}
-Private XICMethodsRec Local_ic_methods = {
+static XICMethodsRec Local_ic_methods = {
_XimLocalDestroyIC, /* destroy */
_XimLocalSetFocus, /* set_focus */
_XimLocalUnSetFocus, /* unset_focus */
@@ -132,7 +132,7 @@ Private XICMethodsRec Local_ic_methods = {
_XimLocalUtf8LookupString /* utf8_lookup_string */
};
-Public XIC
+XIC
_XimLocalCreateIC(
XIM im,
XIMArg *values)
diff --git a/libX11/modules/im/ximcp/imLcIm.c b/libX11/modules/im/ximcp/imLcIm.c
index 904169830..6456d7b31 100644
--- a/libX11/modules/im/ximcp/imLcIm.c
+++ b/libX11/modules/im/ximcp/imLcIm.c
@@ -86,14 +86,14 @@ struct _XimCacheStruct {
/* char encoding[1] */
};
-Private struct _XimCacheStruct* _XimCache_mmap = NULL;
-Private DefTreeBase _XimCachedDefaultTreeBase;
-Private int _XimCachedDefaultTreeRefcount = 0;
+static struct _XimCacheStruct* _XimCache_mmap = NULL;
+static DefTreeBase _XimCachedDefaultTreeBase;
+static int _XimCachedDefaultTreeRefcount = 0;
#endif
-Public Bool
+Bool
_XimCheckIfLocalProcessing(Xim im)
{
FILE *fp;
@@ -117,7 +117,7 @@ _XimCheckIfLocalProcessing(Xim im)
return(False);
}
-Private void
+static void
XimFreeDefaultTree(
DefTreeBase *b)
{
@@ -144,7 +144,7 @@ XimFreeDefaultTree(
b->utf8used = b->utf8size = 0;
}
-Public void
+void
_XimLocalIMFree(
Xim im)
{
@@ -218,7 +218,7 @@ _XimLocalIMFree(
return;
}
-Private Status
+static Status
_XimLocalCloseIM(
XIM xim)
{
@@ -239,7 +239,7 @@ _XimLocalCloseIM(
return(True);
}
-Public char *
+char *
_XimLocalGetIMValues(
XIM xim,
XIMArg *values)
@@ -252,7 +252,7 @@ _XimLocalGetIMValues(
im->core.im_resources, im->core.im_num_resources));
}
-Public char *
+char *
_XimLocalSetIMValues(
XIM xim,
XIMArg *values)
@@ -271,7 +271,7 @@ _XimLocalSetIMValues(
#ifdef COMPOSECACHE
-Private Bool
+static Bool
_XimReadCachedDefaultTree(
int fd_cache,
const char *name,
@@ -322,7 +322,7 @@ _XimReadCachedDefaultTree(
return True;
}
-Private unsigned int strToHash (
+static unsigned int strToHash (
const char *name)
{
unsigned int hash = 0;
@@ -334,7 +334,7 @@ Private unsigned int strToHash (
/* Returns read-only fd of cache file, -1 if none.
* Sets *res to cache filename if safe. Sets *size to file size of cache. */
-Private int _XimCachedFileName (
+static int _XimCachedFileName (
const char *dir, const char *name,
const char *intname, const char *encoding,
uid_t uid, int isglobal, char **res, off_t *size)
@@ -419,7 +419,7 @@ Private int _XimCachedFileName (
}
-Private Bool _XimLoadCache (
+static Bool _XimLoadCache (
int fd,
const char *name,
const char *encoding,
@@ -439,7 +439,7 @@ Private Bool _XimLoadCache (
}
-Private void
+static void
_XimWriteCachedDefaultTree(
const char *name,
const char *encoding,
@@ -514,7 +514,7 @@ _XimWriteCachedDefaultTree(
#endif
-Private void
+static void
_XimCreateDefaultTree(
Xim im)
{
@@ -644,7 +644,7 @@ _XimCreateDefaultTree(
Xfree (cachename);
}
-Private XIMMethodsRec Xim_im_local_methods = {
+static XIMMethodsRec Xim_im_local_methods = {
_XimLocalCloseIM, /* close */
_XimLocalSetIMValues, /* set_values */
_XimLocalGetIMValues, /* get_values */
@@ -654,7 +654,7 @@ Private XIMMethodsRec Xim_im_local_methods = {
_XimLcctstoutf8 /* ctstoutf8 */
};
-Public Bool
+Bool
_XimLocalOpenIM(
Xim im)
{
diff --git a/libX11/modules/im/ximcp/imLcLkup.c b/libX11/modules/im/ximcp/imLcLkup.c
index 8e4111a6a..9e4aec319 100644
--- a/libX11/modules/im/ximcp/imLcLkup.c
+++ b/libX11/modules/im/ximcp/imLcLkup.c
@@ -43,7 +43,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include "XlcPubI.h"
#include "Ximint.h"
-Public int
+int
_XimLocalMbLookupString(XIC xic, XKeyEvent *ev, char *buffer, int bytes,
KeySym *keysym, Status *status)
{
@@ -126,7 +126,7 @@ _XimLocalMbLookupString(XIC xic, XKeyEvent *ev, char *buffer, int bytes,
return (ret);
}
-Public int
+int
_XimLocalWcLookupString(XIC xic, XKeyEvent *ev, wchar_t *buffer, int wlen,
KeySym *keysym, Status *status)
{
@@ -198,7 +198,7 @@ _XimLocalWcLookupString(XIC xic, XKeyEvent *ev, wchar_t *buffer, int wlen,
return (ret);
}
-Public int
+int
_XimLocalUtf8LookupString(XIC xic, XKeyEvent *ev, char *buffer, int bytes,
KeySym *keysym, Status *status)
{
@@ -271,7 +271,7 @@ _XimLocalUtf8LookupString(XIC xic, XKeyEvent *ev, char *buffer, int bytes,
return (ret);
}
-Private int
+static int
_XimLcctsconvert(
XlcConv conv,
char *from,
@@ -337,7 +337,7 @@ _XimLcctsconvert(
return to_cnvlen;
}
-Public int
+int
_XimLcctstombs(XIM xim, char *from, int from_len,
char *to, int to_len, Status *state)
{
@@ -345,7 +345,7 @@ _XimLcctstombs(XIM xim, char *from, int from_len,
from, from_len, to, to_len, state);
}
-Public int
+int
_XimLcctstowcs(XIM xim, char *from, int from_len,
wchar_t *to, int to_len, Status *state)
{
@@ -408,7 +408,7 @@ _XimLcctstowcs(XIM xim, char *from, int from_len,
return to_cnvlen;
}
-Public int
+int
_XimLcctstoutf8(XIM xim, char *from, int from_len,
char *to, int to_len, Status *state)
{
diff --git a/libX11/modules/im/ximcp/imLcSIc.c b/libX11/modules/im/ximcp/imLcSIc.c
index 3fce5fdc7..40937b054 100644
--- a/libX11/modules/im/ximcp/imLcSIc.c
+++ b/libX11/modules/im/ximcp/imLcSIc.c
@@ -1,54 +1,54 @@
-/******************************************************************
-
- Copyright 1990, 1991, 1992, 1993, 1994 by FUJITSU LIMITED
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and
-that both that copyright notice and this permission notice appear
-in supporting documentation, and that the name of FUJITSU LIMITED
-not be used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-FUJITSU LIMITED makes no representations about the suitability of
-this software for any purpose.
-It is provided "as is" without express or implied warranty.
-
-FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
-USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
- Author: Takashi Fujiwara FUJITSU LIMITED
- fujiwara@a80.tech.yk.fujitsu.co.jp
-
-******************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <stdio.h>
-#include <X11/Xlib.h>
-#include <X11/Xmd.h>
-#include <X11/Xutil.h>
-#include "Xlibint.h"
-#include "Xlcint.h"
-#include "Ximint.h"
-
-Public char *
-_XimLocalSetICValues(XIC xic, XIMArg *values)
-{
- XimDefICValues ic_values;
- Xic ic = (Xic)xic;
- char *name;
-
- _XimGetCurrentICValues(ic, &ic_values);
- name = _XimSetICValueData(ic, (XPointer)&ic_values,
- ic->private.local.ic_resources,
- ic->private.local.ic_num_resources,
- values, XIM_SETICVALUES, True);
- _XimSetCurrentICValues(ic, &ic_values);
- return(name);
-}
+/******************************************************************
+
+ Copyright 1990, 1991, 1992, 1993, 1994 by FUJITSU LIMITED
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and
+that both that copyright notice and this permission notice appear
+in supporting documentation, and that the name of FUJITSU LIMITED
+not be used in advertising or publicity pertaining to distribution
+of the software without specific, written prior permission.
+FUJITSU LIMITED makes no representations about the suitability of
+this software for any purpose.
+It is provided "as is" without express or implied warranty.
+
+FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+ Author: Takashi Fujiwara FUJITSU LIMITED
+ fujiwara@a80.tech.yk.fujitsu.co.jp
+
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <stdio.h>
+#include <X11/Xlib.h>
+#include <X11/Xmd.h>
+#include <X11/Xutil.h>
+#include "Xlibint.h"
+#include "Xlcint.h"
+#include "Ximint.h"
+
+char *
+_XimLocalSetICValues(XIC xic, XIMArg *values)
+{
+ XimDefICValues ic_values;
+ Xic ic = (Xic)xic;
+ char *name;
+
+ _XimGetCurrentICValues(ic, &ic_values);
+ name = _XimSetICValueData(ic, (XPointer)&ic_values,
+ ic->private.local.ic_resources,
+ ic->private.local.ic_num_resources,
+ values, XIM_SETICVALUES, True);
+ _XimSetCurrentICValues(ic, &ic_values);
+ return(name);
+}
diff --git a/libX11/modules/im/ximcp/imRm.c b/libX11/modules/im/ximcp/imRm.c
index 01e74c2d1..dd0b99ee2 100644
--- a/libX11/modules/im/ximcp/imRm.c
+++ b/libX11/modules/im/ximcp/imRm.c
@@ -58,7 +58,7 @@ typedef struct _XimValueOffsetInfo {
} XimValueOffsetInfoRec, *XimValueOffsetInfo;
#ifdef XIM_CONNECTABLE
-Private Bool
+static Bool
_XimCheckBool(str)
char *str;
{
@@ -69,7 +69,7 @@ _XimCheckBool(str)
return False;
}
-Public void
+void
_XimSetProtoResource(im)
Xim im;
{
@@ -344,7 +344,7 @@ static XIMStyle const supported_local_styles[] = {
0 /* dummy */
};
-Private Bool
+static Bool
_XimDefaultStyles(
XimValueOffsetInfo info,
XPointer top,
@@ -379,7 +379,7 @@ _XimDefaultStyles(
return True;
}
-Private Bool
+static Bool
_XimDefaultIMValues(
XimValueOffsetInfo info,
XPointer top,
@@ -415,7 +415,7 @@ _XimDefaultIMValues(
return True;
}
-Private Bool
+static Bool
_XimDefaultICValues(
XimValueOffsetInfo info,
XPointer top,
@@ -451,7 +451,7 @@ _XimDefaultICValues(
return True;
}
-Private Bool
+static Bool
_XimDefaultVisiblePos(
XimValueOffsetInfo info,
XPointer top,
@@ -465,7 +465,7 @@ _XimDefaultVisiblePos(
return True;
}
-Private Bool
+static Bool
_XimDefaultFocusWindow(
XimValueOffsetInfo info,
XPointer top,
@@ -484,7 +484,7 @@ _XimDefaultFocusWindow(
return True;
}
-Private Bool
+static Bool
_XimDefaultResName(
XimValueOffsetInfo info,
XPointer top,
@@ -504,7 +504,7 @@ _XimDefaultResName(
return True;
}
-Private Bool
+static Bool
_XimDefaultResClass(
XimValueOffsetInfo info,
XPointer top,
@@ -524,7 +524,7 @@ _XimDefaultResClass(
return True;
}
-Private Bool
+static Bool
_XimDefaultDestroyCB(
XimValueOffsetInfo info,
XPointer top,
@@ -540,7 +540,7 @@ _XimDefaultDestroyCB(
return True;
}
-Private Bool
+static Bool
_XimDefaultResetState(
XimValueOffsetInfo info,
XPointer top,
@@ -554,7 +554,7 @@ _XimDefaultResetState(
return True;
}
-Private Bool
+static Bool
_XimDefaultHotKeyState(
XimValueOffsetInfo info,
XPointer top,
@@ -568,7 +568,7 @@ _XimDefaultHotKeyState(
return True;
}
-Private Bool
+static Bool
_XimDefaultArea(
XimValueOffsetInfo info,
XPointer top,
@@ -604,7 +604,7 @@ _XimDefaultArea(
return True;
}
-Private Bool
+static Bool
_XimDefaultColormap(
XimValueOffsetInfo info,
XPointer top,
@@ -629,7 +629,7 @@ _XimDefaultColormap(
return True;
}
-Private Bool
+static Bool
_XimDefaultStdColormap(
XimValueOffsetInfo info,
XPointer top,
@@ -643,7 +643,7 @@ _XimDefaultStdColormap(
return True;
}
-Private Bool
+static Bool
_XimDefaultFg(
XimValueOffsetInfo info,
XPointer top,
@@ -661,7 +661,7 @@ _XimDefaultFg(
return True;
}
-Private Bool
+static Bool
_XimDefaultBg(
XimValueOffsetInfo info,
XPointer top,
@@ -679,7 +679,7 @@ _XimDefaultBg(
return True;
}
-Private Bool
+static Bool
_XimDefaultBgPixmap(
XimValueOffsetInfo info,
XPointer top,
@@ -693,7 +693,7 @@ _XimDefaultBgPixmap(
return True;
}
-Private Bool
+static Bool
_XimDefaultFontSet(
XimValueOffsetInfo info,
XPointer top,
@@ -707,7 +707,7 @@ _XimDefaultFontSet(
return True;
}
-Private Bool
+static Bool
_XimDefaultLineSpace(
XimValueOffsetInfo info,
XPointer top,
@@ -736,7 +736,7 @@ _XimDefaultLineSpace(
return True;
}
-Private Bool
+static Bool
_XimDefaultCursor(
XimValueOffsetInfo info,
XPointer top,
@@ -750,7 +750,7 @@ _XimDefaultCursor(
return True;
}
-Private Bool
+static Bool
_XimDefaultPreeditState(
XimValueOffsetInfo info,
XPointer top,
@@ -764,7 +764,7 @@ _XimDefaultPreeditState(
return True;
}
-Private Bool
+static Bool
_XimDefaultNest(
XimValueOffsetInfo info,
XPointer top,
@@ -774,7 +774,7 @@ _XimDefaultNest(
return True;
}
-Private Bool
+static Bool
_XimEncodeCallback(
XimValueOffsetInfo info,
XPointer top,
@@ -787,7 +787,7 @@ _XimEncodeCallback(
return True;
}
-Private Bool
+static Bool
_XimEncodeString(
XimValueOffsetInfo info,
XPointer top,
@@ -811,7 +811,7 @@ _XimEncodeString(
return True;
}
-Private Bool
+static Bool
_XimEncodeStyle(
XimValueOffsetInfo info,
XPointer top,
@@ -824,7 +824,7 @@ _XimEncodeStyle(
return True;
}
-Private Bool
+static Bool
_XimEncodeWindow(
XimValueOffsetInfo info,
XPointer top,
@@ -837,7 +837,7 @@ _XimEncodeWindow(
return True;
}
-Private Bool
+static Bool
_XimEncodeStringConv(
XimValueOffsetInfo info,
XPointer top,
@@ -849,7 +849,7 @@ _XimEncodeStringConv(
return True;
}
-Private Bool
+static Bool
_XimEncodeResetState(
XimValueOffsetInfo info,
XPointer top,
@@ -862,7 +862,7 @@ _XimEncodeResetState(
return True;
}
-Private Bool
+static Bool
_XimEncodeHotKey(
XimValueOffsetInfo info,
XPointer top,
@@ -905,7 +905,7 @@ _XimEncodeHotKey(
return True;
}
-Private Bool
+static Bool
_XimEncodeHotKetState(
XimValueOffsetInfo info,
XPointer top,
@@ -918,7 +918,7 @@ _XimEncodeHotKetState(
return True;
}
-Private Bool
+static Bool
_XimEncodeRectangle(
XimValueOffsetInfo info,
XPointer top,
@@ -931,7 +931,7 @@ _XimEncodeRectangle(
return True;
}
-Private Bool
+static Bool
_XimEncodeSpot(
XimValueOffsetInfo info,
XPointer top,
@@ -944,7 +944,7 @@ _XimEncodeSpot(
return True;
}
-Private Bool
+static Bool
_XimEncodeColormap(
XimValueOffsetInfo info,
XPointer top,
@@ -957,7 +957,7 @@ _XimEncodeColormap(
return True;
}
-Private Bool
+static Bool
_XimEncodeStdColormap(
XimValueOffsetInfo info,
XPointer top,
@@ -970,7 +970,7 @@ _XimEncodeStdColormap(
return True;
}
-Private Bool
+static Bool
_XimEncodeLong(
XimValueOffsetInfo info,
XPointer top,
@@ -983,7 +983,7 @@ _XimEncodeLong(
return True;
}
-Private Bool
+static Bool
_XimEncodeBgPixmap(
XimValueOffsetInfo info,
XPointer top,
@@ -996,7 +996,7 @@ _XimEncodeBgPixmap(
return True;
}
-Private Bool
+static Bool
_XimEncodeFontSet(
XimValueOffsetInfo info,
XPointer top,
@@ -1009,7 +1009,7 @@ _XimEncodeFontSet(
return True;
}
-Private Bool
+static Bool
_XimEncodeLineSpace(
XimValueOffsetInfo info,
XPointer top,
@@ -1022,7 +1022,7 @@ _XimEncodeLineSpace(
return True;
}
-Private Bool
+static Bool
_XimEncodeCursor(
XimValueOffsetInfo info,
XPointer top,
@@ -1035,7 +1035,7 @@ _XimEncodeCursor(
return True;
}
-Private Bool
+static Bool
_XimEncodePreeditState(
XimValueOffsetInfo info,
XPointer top,
@@ -1048,7 +1048,7 @@ _XimEncodePreeditState(
return True;
}
-Private Bool
+static Bool
_XimEncodeNest(
XimValueOffsetInfo info,
XPointer top,
@@ -1057,7 +1057,7 @@ _XimEncodeNest(
return True;
}
-Private Bool
+static Bool
_XimDecodeStyles(
XimValueOffsetInfo info,
XPointer top,
@@ -1095,7 +1095,7 @@ _XimDecodeStyles(
return True;
}
-Private Bool
+static Bool
_XimDecodeValues(
XimValueOffsetInfo info,
XPointer top,
@@ -1133,7 +1133,7 @@ _XimDecodeValues(
return True;
}
-Private Bool
+static Bool
_XimDecodeCallback(
XimValueOffsetInfo info,
XPointer top,
@@ -1153,7 +1153,7 @@ _XimDecodeCallback(
return True;
}
-Private Bool
+static Bool
_XimDecodeString(
XimValueOffsetInfo info,
XPointer top,
@@ -1175,7 +1175,7 @@ _XimDecodeString(
return True;
}
-Private Bool
+static Bool
_XimDecodeBool(
XimValueOffsetInfo info,
XPointer top,
@@ -1188,7 +1188,7 @@ _XimDecodeBool(
return True;
}
-Private Bool
+static Bool
_XimDecodeStyle(
XimValueOffsetInfo info,
XPointer top,
@@ -1201,7 +1201,7 @@ _XimDecodeStyle(
return True;
}
-Private Bool
+static Bool
_XimDecodeWindow(
XimValueOffsetInfo info,
XPointer top,
@@ -1214,7 +1214,7 @@ _XimDecodeWindow(
return True;
}
-Private Bool
+static Bool
_XimDecodeStringConv(
XimValueOffsetInfo info,
XPointer top,
@@ -1226,7 +1226,7 @@ _XimDecodeStringConv(
return True;
}
-Private Bool
+static Bool
_XimDecodeResetState(
XimValueOffsetInfo info,
XPointer top,
@@ -1239,7 +1239,7 @@ _XimDecodeResetState(
return True;
}
-Private Bool
+static Bool
_XimDecodeHotKey(
XimValueOffsetInfo info,
XPointer top,
@@ -1273,7 +1273,7 @@ _XimDecodeHotKey(
return True;
}
-Private Bool
+static Bool
_XimDecodeHotKetState(
XimValueOffsetInfo info,
XPointer top,
@@ -1286,7 +1286,7 @@ _XimDecodeHotKetState(
return True;
}
-Private Bool
+static Bool
_XimDecodeRectangle(
XimValueOffsetInfo info,
XPointer top,
@@ -1304,7 +1304,7 @@ _XimDecodeRectangle(
return True;
}
-Private Bool
+static Bool
_XimDecodeSpot(
XimValueOffsetInfo info,
XPointer top,
@@ -1322,7 +1322,7 @@ _XimDecodeSpot(
return True;
}
-Private Bool
+static Bool
_XimDecodeColormap(
XimValueOffsetInfo info,
XPointer top,
@@ -1335,7 +1335,7 @@ _XimDecodeColormap(
return True;
}
-Private Bool
+static Bool
_XimDecodeStdColormap(
XimValueOffsetInfo info,
XPointer top,
@@ -1348,7 +1348,7 @@ _XimDecodeStdColormap(
return True;
}
-Private Bool
+static Bool
_XimDecodeLong(
XimValueOffsetInfo info,
XPointer top,
@@ -1361,7 +1361,7 @@ _XimDecodeLong(
return True;
}
-Private Bool
+static Bool
_XimDecodeBgPixmap(
XimValueOffsetInfo info,
XPointer top,
@@ -1374,7 +1374,7 @@ _XimDecodeBgPixmap(
return True;
}
-Private Bool
+static Bool
_XimDecodeFontSet(
XimValueOffsetInfo info,
XPointer top,
@@ -1387,7 +1387,7 @@ _XimDecodeFontSet(
return True;
}
-Private Bool
+static Bool
_XimDecodeLineSpace(
XimValueOffsetInfo info,
XPointer top,
@@ -1400,7 +1400,7 @@ _XimDecodeLineSpace(
return True;
}
-Private Bool
+static Bool
_XimDecodeCursor(
XimValueOffsetInfo info,
XPointer top,
@@ -1413,7 +1413,7 @@ _XimDecodeCursor(
return True;
}
-Private Bool
+static Bool
_XimDecodePreeditState(
XimValueOffsetInfo info,
XPointer top,
@@ -1426,7 +1426,7 @@ _XimDecodePreeditState(
return True;
}
-Private Bool
+static Bool
_XimDecodeNest(
XimValueOffsetInfo info,
XPointer top,
@@ -2118,7 +2118,7 @@ static const XimICMode ic_mode[] = {
static XrmQuark im_mode_quark[sizeof(im_mode) / sizeof(im_mode[0])];
static XrmQuark ic_mode_quark[sizeof(ic_mode) / sizeof(ic_mode[0])];
-Private Bool
+static Bool
_XimSetResourceList(
XIMResourceList *res_list,
unsigned int *list_num,
@@ -2146,7 +2146,7 @@ _XimSetResourceList(
return True;
}
-Public Bool
+Bool
_XimSetIMResourceList(
XIMResourceList *res_list,
unsigned int *list_num)
@@ -2155,7 +2155,7 @@ _XimSetIMResourceList(
im_resources, XIMNumber(im_resources), 100);
}
-Public Bool
+Bool
_XimSetICResourceList(
XIMResourceList *res_list,
unsigned int *list_num)
@@ -2164,7 +2164,7 @@ _XimSetICResourceList(
ic_resources, XIMNumber(ic_resources), 200);
}
-Public Bool
+Bool
_XimSetInnerIMResourceList(
XIMResourceList *res_list,
unsigned int *list_num)
@@ -2173,7 +2173,7 @@ _XimSetInnerIMResourceList(
im_inner_resources, XIMNumber(im_inner_resources), 100);
}
-Public Bool
+Bool
_XimSetInnerICResourceList(
XIMResourceList *res_list,
unsigned int *list_num)
@@ -2182,7 +2182,7 @@ _XimSetInnerICResourceList(
ic_inner_resources, XIMNumber(ic_inner_resources), 200);
}
-Private XIMResourceList
+static XIMResourceList
_XimGetResourceListRecByMode(
XIMResourceList res_list,
unsigned int list_num,
@@ -2198,7 +2198,7 @@ _XimGetResourceListRecByMode(
return (XIMResourceList)NULL;
}
-Public Bool
+Bool
_XimCheckCreateICValues(
XIMResourceList res_list,
unsigned int list_num)
@@ -2209,7 +2209,7 @@ _XimCheckCreateICValues(
return False;
}
-Public XIMResourceList
+XIMResourceList
_XimGetResourceListRecByQuark(
XIMResourceList res_list,
unsigned int list_num,
@@ -2225,7 +2225,7 @@ _XimGetResourceListRecByQuark(
return (XIMResourceList)NULL;
}
-Public XIMResourceList
+XIMResourceList
_XimGetResourceListRec(
XIMResourceList res_list,
unsigned int list_num,
@@ -2236,7 +2236,7 @@ _XimGetResourceListRec(
return _XimGetResourceListRecByQuark(res_list, list_num, quark);
}
-Public char *
+char *
_XimSetIMValueData(
Xim im,
XPointer top,
@@ -2266,7 +2266,7 @@ _XimSetIMValueData(
return NULL;
}
-Public char *
+char *
_XimGetIMValueData(
Xim im,
XPointer top,
@@ -2296,7 +2296,7 @@ _XimGetIMValueData(
return NULL;
}
-Public void
+void
_XimSetIMMode(
XIMResourceList res_list,
unsigned int list_num)
@@ -2315,7 +2315,7 @@ _XimSetIMMode(
return;
}
-Private int
+static int
_XimCheckSetIMDefaultsMode(
XIMResourceList res)
{
@@ -2325,7 +2325,7 @@ _XimCheckSetIMDefaultsMode(
return XIM_CHECK_INVALID;
}
-Private int
+static int
_XimCheckSetIMValuesMode(
XIMResourceList res)
{
@@ -2335,7 +2335,7 @@ _XimCheckSetIMValuesMode(
return XIM_CHECK_INVALID;
}
-Private int
+static int
_XimCheckGetIMValuesMode(
XIMResourceList res)
{
@@ -2345,7 +2345,7 @@ Private int
return XIM_CHECK_INVALID;
}
-Public int
+int
_XimCheckIMMode(
XIMResourceList res,
unsigned long mode)
@@ -2364,7 +2364,7 @@ Public int
}
}
-Public void
+void
_XimSetICMode(XIMResourceList res_list, unsigned int list_num, XIMStyle style)
{
XIMResourceList res;
@@ -2406,7 +2406,7 @@ _XimSetICMode(XIMResourceList res_list, unsigned int list_num, XIMStyle style)
return;
}
-Private int
+static int
_XimCheckSetICDefaultsMode(
XIMResourceList res,
unsigned long mode)
@@ -2449,7 +2449,7 @@ _XimCheckSetICDefaultsMode(
return XIM_CHECK_VALID;
}
-Private int
+static int
_XimCheckCreateICMode(
XIMResourceList res,
unsigned long mode)
@@ -2502,7 +2502,7 @@ _XimCheckCreateICMode(
return XIM_CHECK_VALID;
}
-Private int
+static int
_XimCheckSetICValuesMode(
XIMResourceList res,
unsigned long mode)
@@ -2543,7 +2543,7 @@ _XimCheckSetICValuesMode(
return XIM_CHECK_VALID;
}
-Private int
+static int
_XimCheckGetICValuesMode(
XIMResourceList res,
unsigned long mode)
@@ -2578,7 +2578,7 @@ _XimCheckGetICValuesMode(
return XIM_CHECK_VALID;
}
-Public int
+int
_XimCheckICMode(
XIMResourceList res,
unsigned long mode)
@@ -2596,7 +2596,7 @@ Public int
}
}
-Public Bool
+Bool
_XimSetLocalIMDefaults(
Xim im,
XPointer top,
@@ -2635,7 +2635,7 @@ _XimSetLocalIMDefaults(
return True;
}
-Public Bool
+Bool
_XimSetICDefaults(
Xic ic,
XPointer top,
@@ -2700,7 +2700,7 @@ _XimSetICDefaults(
return True;
}
-Private Bool
+static Bool
_XimEncodeAttr(
XimValueOffsetInfo info,
unsigned int num,
@@ -2721,7 +2721,7 @@ _XimEncodeAttr(
return False;
}
-Public Bool
+Bool
_XimEncodeLocalIMAttr(
XIMResourceList res,
XPointer top,
@@ -2731,7 +2731,7 @@ _XimEncodeLocalIMAttr(
res, top, val);
}
-Public Bool
+Bool
_XimEncodeLocalICAttr(
Xic ic,
XIMResourceList res,
@@ -2756,7 +2756,7 @@ _XimEncodeLocalICAttr(
return _XimEncodeAttr(info, num, res, top, arg->value);
}
-Private Bool
+static Bool
_XimEncodeLocalTopValue(
Xic ic,
XIMResourceList res,
@@ -2792,7 +2792,7 @@ _XimEncodeLocalTopValue(
return True;
}
-Private Bool
+static Bool
_XimEncodeLocalPreeditValue(
Xic ic,
XIMResourceList res,
@@ -2814,7 +2814,7 @@ _XimEncodeLocalPreeditValue(
return True;
}
-Private Bool
+static Bool
_XimEncodeLocalStatusValue(
Xic ic,
XIMResourceList res,
@@ -2836,7 +2836,7 @@ _XimEncodeLocalStatusValue(
return True;
}
-Public char *
+char *
_XimSetICValueData(
Xic ic,
XPointer top,
@@ -2901,7 +2901,7 @@ _XimSetICValueData(
return NULL;
}
-Private Bool
+static Bool
_XimCheckInputStyle(
XIMStyles *styles,
XIMStyle style)
@@ -2917,7 +2917,7 @@ _XimCheckInputStyle(
return False;
}
-Public Bool
+Bool
_XimCheckLocalInputStyle(
Xic ic,
XPointer top,
@@ -2948,7 +2948,7 @@ _XimCheckLocalInputStyle(
return False;
}
-Private Bool
+static Bool
_XimDecodeAttr(
XimValueOffsetInfo info,
unsigned int num,
@@ -2969,7 +2969,7 @@ _XimDecodeAttr(
return False;
}
-Public Bool
+Bool
_XimDecodeLocalIMAttr(
XIMResourceList res,
XPointer top,
@@ -2979,7 +2979,7 @@ _XimDecodeLocalIMAttr(
res, top, val);
}
-Public Bool
+Bool
_XimDecodeLocalICAttr(
XIMResourceList res,
XPointer top,
@@ -3003,7 +3003,7 @@ _XimDecodeLocalICAttr(
return _XimDecodeAttr(info, num, res, top, val);
}
-Public char *
+char *
_XimGetICValueData(Xic ic, XPointer top, XIMResourceList res_list,
unsigned int list_num, XIMArg *values, unsigned long mode)
{
@@ -3052,7 +3052,7 @@ _XimGetICValueData(Xic ic, XPointer top, XIMResourceList res_list,
return NULL;
}
-Public void
+void
_XimGetCurrentIMValues(Xim im, XimDefIMValues *im_values)
{
bzero((char *)im_values, sizeof(XimDefIMValues));
@@ -3066,7 +3066,7 @@ _XimGetCurrentIMValues(Xim im, XimDefIMValues *im_values)
im_values->visible_position = im->core.visible_position;
}
-Public void
+void
_XimSetCurrentIMValues(Xim im, XimDefIMValues *im_values)
{
im->core.styles = im_values->styles;
@@ -3078,7 +3078,7 @@ _XimSetCurrentIMValues(Xim im, XimDefIMValues *im_values)
im->core.visible_position = im_values->visible_position;
}
-Public void
+void
_XimGetCurrentICValues(Xic ic, XimDefICValues *ic_values)
{
bzero((char *)ic_values, sizeof(XimDefICValues));
@@ -3101,7 +3101,7 @@ _XimGetCurrentICValues(Xic ic, XimDefICValues *ic_values)
ic_values->status_attr = ic->core.status_attr;
}
-Public void
+void
_XimSetCurrentICValues(
Xic ic,
XimDefICValues *ic_values)
@@ -3125,7 +3125,7 @@ _XimSetCurrentICValues(
ic->core.status_attr = ic_values->status_attr;
}
-Private void
+static void
_XimInitialIMOffsetInfo(void)
{
unsigned int n = XIMNumber(im_attr_info);
@@ -3136,7 +3136,7 @@ _XimInitialIMOffsetInfo(void)
}
}
-Private void
+static void
_XimInitialICOffsetInfo(void)
{
unsigned int n;
@@ -3158,7 +3158,7 @@ _XimInitialICOffsetInfo(void)
}
}
-Private void
+static void
_XimInitialIMMode(void)
{
unsigned int n = XIMNumber(im_mode);
@@ -3169,7 +3169,7 @@ _XimInitialIMMode(void)
}
}
-Private void
+static void
_XimInitialICMode(void)
{
unsigned int n = XIMNumber(ic_mode);
@@ -3180,7 +3180,7 @@ _XimInitialICMode(void)
}
}
-Public void
+void
_XimInitialResourceInfo(void)
{
static Bool init_flag = False;
diff --git a/libX11/modules/im/ximcp/imRmAttr.c b/libX11/modules/im/ximcp/imRmAttr.c
index c047715f6..ef3ac2ca7 100644
--- a/libX11/modules/im/ximcp/imRmAttr.c
+++ b/libX11/modules/im/ximcp/imRmAttr.c
@@ -34,7 +34,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include "Ximint.h"
-Private XIMResourceList
+static XIMResourceList
_XimGetNestedListSeparator(
XIMResourceList res_list, /* LISTofIMATTR or IMATTR */
unsigned int res_num)
@@ -42,7 +42,7 @@ _XimGetNestedListSeparator(
return _XimGetResourceListRec(res_list, res_num, XNSeparatorofNestedList);
}
-Private Bool
+static Bool
_XimCheckInnerIMAttributes(
Xim im,
XIMArg *arg,
@@ -64,7 +64,7 @@ _XimCheckInnerIMAttributes(
return True;
}
-Public char *
+char *
_XimMakeIMAttrIDList(
Xim im,
XIMResourceList res_list,
@@ -102,7 +102,7 @@ _XimMakeIMAttrIDList(
return (char *)NULL;
}
-Private Bool
+static Bool
_XimCheckInnerICAttributes(
Xic ic,
XIMArg *arg,
@@ -124,7 +124,7 @@ _XimCheckInnerICAttributes(
return True;
}
-Public char *
+char *
_XimMakeICAttrIDList(
Xic ic,
XIMResourceList res_list,
@@ -209,7 +209,7 @@ _XimMakeICAttrIDList(
return (char *)NULL;
}
-Private Bool
+static Bool
_XimAttributeToValue(
Xic ic,
XIMResourceList res,
@@ -399,7 +399,7 @@ _XimAttributeToValue(
return True;
}
-Private Bool
+static Bool
_XimDecodeInnerIMATTRIBUTE(
Xim im,
XIMArg *arg)
@@ -415,7 +415,7 @@ _XimDecodeInnerIMATTRIBUTE(
return _XimDecodeLocalIMAttr(res, (XPointer)&im_values, arg->value);
}
-Public char *
+char *
_XimDecodeIMATTRIBUTE(
Xim im,
XIMResourceList res_list,
@@ -468,7 +468,7 @@ _XimDecodeIMATTRIBUTE(
return (char *)NULL;
}
-Private Bool
+static Bool
_XimDecodeInnerICATTRIBUTE(
Xic ic,
XIMArg *arg,
@@ -488,7 +488,7 @@ _XimDecodeInnerICATTRIBUTE(
return True;
}
-Public char *
+char *
_XimDecodeICATTRIBUTE(
Xic ic,
XIMResourceList res_list,
@@ -564,7 +564,7 @@ _XimDecodeICATTRIBUTE(
return (char *)NULL;
}
-Private Bool
+static Bool
_XimValueToAttribute(
XIMResourceList res,
XPointer buf,
@@ -772,7 +772,7 @@ _XimValueToAttribute(
return True;
}
-Private Bool
+static Bool
_XimSetInnerIMAttributes(
Xim im,
XPointer top,
@@ -795,7 +795,7 @@ _XimSetInnerIMAttributes(
return _XimEncodeLocalIMAttr(res, top, arg->value);
}
-Public char *
+char *
_XimEncodeIMATTRIBUTE(
Xim im,
XIMResourceList res_list,
@@ -859,7 +859,7 @@ _XimEncodeIMATTRIBUTE(
}
#ifdef XIM_CONNECTABLE
-Public Bool
+Bool
_XimEncodeSavedIMATTRIBUTE(
Xim im,
XIMResourceList res_list,
@@ -922,7 +922,7 @@ _XimEncodeSavedIMATTRIBUTE(
}
#endif /* XIM_CONNECTABLE */
-Private Bool
+static Bool
_XimEncodeTopValue(
Xic ic,
XIMResourceList res,
@@ -945,7 +945,7 @@ _XimEncodeTopValue(
return True;
}
-Private Bool
+static Bool
_XimEncodePreeditValue(
Xic ic,
XIMResourceList res,
@@ -997,7 +997,7 @@ _XimEncodePreeditValue(
return True;
}
-Private Bool
+static Bool
_XimEncodeStatusValue(
Xic ic,
XIMResourceList res,
@@ -1049,7 +1049,7 @@ _XimEncodeStatusValue(
return True;
}
-Private Bool
+static Bool
_XimSetInnerICAttributes(
Xic ic,
XPointer top,
@@ -1072,7 +1072,7 @@ _XimSetInnerICAttributes(
return _XimEncodeLocalICAttr(ic, res, top, arg, mode);
}
-Public char *
+char *
_XimEncodeICATTRIBUTE(
Xic ic,
XIMResourceList res_list,
@@ -1184,7 +1184,7 @@ _XimEncodeICATTRIBUTE(
}
#ifdef XIM_CONNECTABLE
-Private Bool
+static Bool
_XimEncodeSavedPreeditValue(
Xic ic,
XIMResourceList res,
@@ -1226,7 +1226,7 @@ _XimEncodeSavedPreeditValue(
return True;
}
-Private Bool
+static Bool
_XimEncodeSavedStatusValue(
Xic ic,
XIMResourceList res,
@@ -1268,7 +1268,7 @@ _XimEncodeSavedStatusValue(
return True;
}
-Public Bool
+Bool
_XimEncodeSavedICATTRIBUTE(
Xic ic,
XIMResourceList res_list,
@@ -1379,7 +1379,7 @@ _XimEncodeSavedICATTRIBUTE(
}
#endif /* XIM_CONNECTABLE */
-Private unsigned int
+static unsigned int
_XimCountNumberOfAttr(
INT16 total,
CARD16 *attr,
@@ -1404,7 +1404,7 @@ _XimCountNumberOfAttr(
return n;
}
-Public Bool
+Bool
_XimGetAttributeID(
Xim im,
CARD16 *buf)
diff --git a/libX11/modules/im/ximcp/imThaiFlt.c b/libX11/modules/im/ximcp/imThaiFlt.c
index 12e3de265..f134e842e 100644
--- a/libX11/modules/im/ximcp/imThaiFlt.c
+++ b/libX11/modules/im/ximcp/imThaiFlt.c
@@ -81,7 +81,7 @@ SOFTWARE.
/* character classification table */
#define TACTIS_CHARS 256
-Private
+static
char const tactis_chtype[TACTIS_CHARS] = {
CTRL, CTRL, CTRL, CTRL, CTRL, CTRL, CTRL, CTRL, /* 0 - 7 */
CTRL, CTRL, CTRL, CTRL, CTRL, CTRL, CTRL, CTRL, /* 8 - 15 */
@@ -127,7 +127,7 @@ char const tactis_chtype[TACTIS_CHARS] = {
#define CH_CLASSES 17 /* 17 classes of chars */
-Private
+static
char const write_rules_lookup[CH_CLASSES][CH_CLASSES] = {
/* Table 0: writing/outputing rules */
/* row: leading char, column: following char */
@@ -151,7 +151,7 @@ char const write_rules_lookup[CH_CLASSES][CH_CLASSES] = {
,{XC, NC, NC, NC, NC, NC, NC, NC, NC, NC, CP, NC, CP, NC, NC, NC, NC}/*AV3*/
};
-Private
+static
char const wtt_isc1_lookup[CH_CLASSES][CH_CLASSES] = {
/* Table 1: WTT default input sequence check rules */
/* row: leading char, column: following char */
@@ -175,7 +175,7 @@ char const wtt_isc1_lookup[CH_CLASSES][CH_CLASSES] = {
,{XC, AC, AC, AC, AC, AC, AC, RJ, RJ, RJ, CP, RJ, CP, RJ, RJ, RJ, RJ}/*AV3*/
};
-Private
+static
char const wtt_isc2_lookup[CH_CLASSES][CH_CLASSES] = {
/* Table 2: WTT strict input sequence check rules */
/* row: leading char, column: following char */
@@ -199,7 +199,7 @@ char const wtt_isc2_lookup[CH_CLASSES][CH_CLASSES] = {
,{XC, AC, AC, AC, RJ, RJ, AC, RJ, RJ, RJ, CP, RJ, CP, RJ, RJ, RJ, RJ}/*AV3*/
};
-Private
+static
char const thaicat_isc_lookup[CH_CLASSES][CH_CLASSES] = {
/* Table 3: Thaicat input sequence check rules */
/* row: leading char, column: following char */
@@ -225,7 +225,7 @@ char const thaicat_isc_lookup[CH_CLASSES][CH_CLASSES] = {
/* returns classification of a char */
-Private int
+static int
THAI_chtype (unsigned char ch)
{
return tactis_chtype[ch];
@@ -233,7 +233,7 @@ THAI_chtype (unsigned char ch)
#ifdef UNUSED
/* returns the display level */
-Private int
+static int
THAI_chlevel (unsigned char ch)
{
int chlevel;
@@ -274,7 +274,7 @@ THAI_chlevel (unsigned char ch)
/* return True if char is non-spacing */
-Private Bool
+static Bool
THAI_isdead (unsigned char ch)
{
return ((tactis_chtype[ch] == CTRL) || (tactis_chtype[ch] == BV1) ||
@@ -287,7 +287,7 @@ THAI_isdead (unsigned char ch)
/* return True if char is consonant */
-Private Bool
+static Bool
THAI_iscons (unsigned char ch)
{
return (tactis_chtype[ch] == CONS);
@@ -295,7 +295,7 @@ THAI_iscons (unsigned char ch)
/* return True if char is vowel */
-Private Bool
+static Bool
THAI_isvowel (unsigned char ch)
{
return ((tactis_chtype[ch] == LV) || (tactis_chtype[ch] == FV1) ||
@@ -307,14 +307,14 @@ THAI_isvowel (unsigned char ch)
/* return True if char is tonemark */
-Private Bool
+static Bool
THAI_istone (unsigned char ch)
{
return (tactis_chtype[ch] == TONE);
}
#endif
-Private Bool
+static Bool
THAI_iscomposible (
unsigned char follow_ch,
unsigned char lead_ch)
@@ -324,7 +324,7 @@ THAI_iscomposible (
== CP);
}
-Private Bool
+static Bool
THAI_isaccepted (
unsigned char follow_ch,
unsigned char lead_ch,
@@ -355,7 +355,7 @@ THAI_isaccepted (
}
#ifdef UNUSED
-Private void
+static void
THAI_apply_write_rules(
unsigned char *instr,
unsigned char *outstr,
@@ -401,7 +401,7 @@ Output parameters:
}
}
-Private int
+static int
THAI_find_chtype (
unsigned char *instr,
int chtype)
@@ -430,7 +430,7 @@ Output parameters:
}
-Private int
+static int
THAI_apply_scm(
unsigned char *instr,
unsigned char *outstr,
@@ -466,33 +466,33 @@ THAI_apply_scm(
/* The following functions are copied from XKeyBind.c */
-Private void ComputeMaskFromKeytrans();
-Private int IsCancelComposeKey(KeySym *symbol, XKeyEvent *event);
-Private void SetLed(Display *dpy, int num, int state);
-Private CARD8 FindKeyCode();
+static void ComputeMaskFromKeytrans();
+static int IsCancelComposeKey(KeySym *symbol, XKeyEvent *event);
+static void SetLed(Display *dpy, int num, int state);
+static CARD8 FindKeyCode();
/* The following functions are specific to this module */
-Private int XThaiTranslateKey();
-Private int XThaiTranslateKeySym();
+static int XThaiTranslateKey();
+static int XThaiTranslateKeySym();
-Private KeySym HexIMNormalKey(
+static KeySym HexIMNormalKey(
XicThaiPart *thai_part,
KeySym symbol,
XKeyEvent *event);
-Private KeySym HexIMFirstComposeKey(
+static KeySym HexIMFirstComposeKey(
XicThaiPart *thai_part,
KeySym symbol,
XKeyEvent *event);
-Private KeySym HexIMSecondComposeKey(
+static KeySym HexIMSecondComposeKey(
XicThaiPart *thai_part,
KeySym symbol
XKeyEvent *event);
-Private KeySym HexIMComposeSequence(KeySym ks1, KeySym ks2);
-Private void InitIscMode(Xic ic);
-Private Bool ThaiComposeConvert(
+static KeySym HexIMComposeSequence(KeySym ks1, KeySym ks2);
+static void InitIscMode(Xic ic);
+static Bool ThaiComposeConvert(
Display *dpy,
KeySym insym,
KeySym *outsym, KeySym *lower, KeySym *upper);
@@ -530,7 +530,7 @@ Private Bool ThaiComposeConvert(
#define IC_DeletePreviousChar(ic) \
(IC_RealDeletePreviousChar(ic))
-Private unsigned char
+static unsigned char
IC_RealGetPreviousChar(Xic ic, unsigned short pos)
{
XICCallback* cb = &ic->core.string_conversion_callback;
@@ -597,7 +597,7 @@ IC_RealGetPreviousChar(Xic ic, unsigned short pos)
}
}
-Private unsigned char
+static unsigned char
IC_RealDeletePreviousChar(Xic ic)
{
XICCallback* cb = &ic->core.string_conversion_callback;
@@ -701,8 +701,8 @@ typedef KeySym (*StateProc)(
* State handler to implement the Thai hex input method.
*/
-Private int const nstate_handlers = 3;
-Private StateProc state_handler[] = {
+static int const nstate_handlers = 3;
+static StateProc state_handler[] = {
HexIMNormalKey,
HexIMFirstComposeKey,
HexIMSecondComposeKey
@@ -718,7 +718,7 @@ struct _XMapThaiKey {
KeySym to;
};
-Private struct _XMapThaiKey const ThaiComposeTable[] = {
+static struct _XMapThaiKey const ThaiComposeTable[] = {
{ /* 0xa4 */ XK_currency, /* 0xa5 */ XK_yen },
{ /* 0xa2 */ XK_cent, /* 0xa3 */ XK_sterling },
{ /* 0xe6 */ XK_ae, /* 0xef */ XK_idiaeresis },
@@ -742,7 +742,7 @@ struct _XKeytrans {
/* Convert keysym to 'Thai Compose' keysym */
/* The current implementation use latin-1 keysyms */
-Private Bool
+static Bool
ThaiComposeConvert(
Display *dpy,
KeySym insym,
@@ -762,7 +762,7 @@ ThaiComposeConvert(
return False;
}
-Private int
+static int
XThaiTranslateKey(
register Display *dpy,
KeyCode keycode,
@@ -847,7 +847,7 @@ XThaiTranslateKey(
* Should be changed to TACTIS keysyms when they are defined by the
* standard.
*/
-Private int
+static int
XThaiTranslateKeySym(
Display *dpy,
register KeySym symbol,
@@ -956,7 +956,7 @@ XThaiTranslateKeySym(
/*
* given a KeySym, returns the first keycode containing it, if any.
*/
-Private CARD8
+static CARD8
FindKeyCode(
register Display *dpy,
register KeySym code)
@@ -980,7 +980,7 @@ FindKeyCode(
* what modifier it is bound to, if any. Sets the AnyModifier bit if it
* can't map some keysym to a modifier.
*/
-Private void
+static void
ComputeMaskFromKeytrans(
Display *dpy,
register struct _XKeytrans *p)
@@ -1020,7 +1020,7 @@ ComputeMaskFromKeytrans(
#define FIRST_COMPOSE_KEY_STATE 1
#define SECOND_COMPOSE_KEY_STATE 2
-Private
+static
KeySym HexIMNormalKey(
XicThaiPart *thai_part,
KeySym symbol,
@@ -1036,7 +1036,7 @@ KeySym HexIMNormalKey(
}
-Private
+static
KeySym HexIMFirstComposeKey(
XicThaiPart *thai_part,
KeySym symbol,
@@ -1059,7 +1059,7 @@ KeySym HexIMFirstComposeKey(
return NoSymbol;
}
-Private
+static
KeySym HexIMSecondComposeKey(
XicThaiPart *thai_part,
KeySym symbol,
@@ -1094,7 +1094,7 @@ KeySym HexIMSecondComposeKey(
* The current implementation of this routine returns ISO Latin Keysyms.
*/
-Private
+static
KeySym HexIMComposeSequence(KeySym ks1, KeySym ks2)
{
int hi_digit;
@@ -1131,7 +1131,7 @@ int tactis_code;
* 2) whether cancelling key event should be processed or ignored
*/
-Private
+static
int IsCancelComposeKey(
KeySym *symbol,
XKeyEvent *event)
@@ -1163,7 +1163,7 @@ int IsCancelComposeKey(
* set specified keyboard LED on or off
*/
-Private
+static
void SetLed(
Display *dpy,
int num,
@@ -1180,7 +1180,7 @@ void SetLed(
/*
* Initialize ISC mode from im modifier
*/
-Private void InitIscMode(Xic ic)
+static void InitIscMode(Xic ic)
{
Xim im;
char *im_modifier_name;
@@ -1213,7 +1213,7 @@ Private void InitIscMode(Xic ic)
/*
* Helper functions for _XimThaiFilter()
*/
-Private Bool
+static Bool
ThaiFltAcceptInput(Xic ic, unsigned char new_char, KeySym symbol)
{
DefTreeBase *b = &ic->private.local.base;
@@ -1228,7 +1228,7 @@ ThaiFltAcceptInput(Xic ic, unsigned char new_char, KeySym symbol)
return True;
}
-Private Bool
+static Bool
ThaiFltReorderInput(Xic ic, unsigned char previous_char, unsigned char new_char)
{
DefTreeBase *b = &ic->private.local.base;
@@ -1242,7 +1242,7 @@ ThaiFltReorderInput(Xic ic, unsigned char previous_char, unsigned char new_char)
return True;
}
-Private Bool
+static Bool
ThaiFltReplaceInput(Xic ic, unsigned char new_char, KeySym symbol)
{
DefTreeBase *b = &ic->private.local.base;
@@ -1258,7 +1258,7 @@ ThaiFltReplaceInput(Xic ic, unsigned char new_char, KeySym symbol)
return True;
}
-Private unsigned
+static unsigned
NumLockMask(Display *d)
{
int i;
diff --git a/libX11/modules/im/ximcp/imThaiIc.c b/libX11/modules/im/ximcp/imThaiIc.c
index 95433f3d7..a21fa2cb4 100644
--- a/libX11/modules/im/ximcp/imThaiIc.c
+++ b/libX11/modules/im/ximcp/imThaiIc.c
@@ -42,7 +42,7 @@ THIS SOFTWARE.
#include "Xlcint.h"
#include "Ximint.h"
-Private void
+static void
_XimThaiUnSetFocus(
XIC xic)
{
@@ -55,7 +55,7 @@ _XimThaiUnSetFocus(
return;
}
-Private void
+static void
_XimThaiDestroyIC(
XIC xic)
{
@@ -81,7 +81,7 @@ _XimThaiDestroyIC(
return;
}
-Private void
+static void
_XimThaiSetFocus(
XIC xic)
{
@@ -102,7 +102,7 @@ _XimThaiSetFocus(
return;
}
-Private void
+static void
_XimThaiReset(
XIC xic)
{
@@ -115,7 +115,7 @@ _XimThaiReset(
b->utf8[b->tree[ic->private.local.composed].utf8] = '\0';
}
-Private char *
+static char *
_XimThaiMbReset(
XIC xic)
{
@@ -123,7 +123,7 @@ _XimThaiMbReset(
return (char *)NULL;
}
-Private wchar_t *
+static wchar_t *
_XimThaiWcReset(
XIC xic)
{
@@ -131,7 +131,7 @@ _XimThaiWcReset(
return (wchar_t *)NULL;
}
-Private XICMethodsRec Thai_ic_methods = {
+static XICMethodsRec Thai_ic_methods = {
_XimThaiDestroyIC, /* destroy */
_XimThaiSetFocus, /* set_focus */
_XimThaiUnSetFocus, /* unset_focus */
diff --git a/libX11/modules/im/ximcp/imThaiIm.c b/libX11/modules/im/ximcp/imThaiIm.c
index 45c690bbc..793ed36e0 100644
--- a/libX11/modules/im/ximcp/imThaiIm.c
+++ b/libX11/modules/im/ximcp/imThaiIm.c
@@ -1,235 +1,235 @@
-/******************************************************************
-
- Copyright 1992, 1993, 1994 by FUJITSU LIMITED
- Copyright 1993 by Digital Equipment Corporation
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of FUJITSU LIMITED and
-Digital Equipment Corporation not be used in advertising or publicity
-pertaining to distribution of the software without specific, written
-prior permission. FUJITSU LIMITED and Digital Equipment Corporation
-makes no representations about the suitability of this software for
-any purpose. It is provided "as is" without express or implied
-warranty.
-
-FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION DISCLAIM ALL
-WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR
-ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
- Author: Takashi Fujiwara FUJITSU LIMITED
- fujiwara@a80.tech.yk.fujitsu.co.jp
- Modifier: Franky Ling Digital Equipment Corporation
- frankyling@hgrd01.enet.dec.com
-
-******************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <stdio.h>
-#include <X11/Xlib.h>
-#include <X11/Xmd.h>
-#include <X11/Xatom.h>
-#include <X11/Xos.h>
-#include "Xlibint.h"
-#include "Xlcint.h"
-#include "XlcPublic.h"
-#include "XlcPubI.h"
-#include "Ximint.h"
-
-Private XIMMethodsRec Xim_im_thai_methods = {
- _XimThaiCloseIM, /* close */
- _XimLocalSetIMValues, /* set_values */
- _XimLocalGetIMValues, /* get_values */
- _XimThaiCreateIC, /* create_ic */
- _XimLcctstombs, /* ctstombs */
- _XimLcctstowcs, /* ctstowcs */
- _XimLcctstoutf8 /* ctstoutf8 */
-};
-
-#define THAI_LANGUAGE_NAME "th"
-
-Bool
-_XimCheckIfThaiProcessing(Xim im)
-{
- char *language;
-
- _XGetLCValues(im->core.lcd, XlcNLanguage, &language, NULL);
- if(strcmp(language, THAI_LANGUAGE_NAME) == 0 &&
- (strcmp(im->core.im_name, "") == 0 ||
- strcmp(im->core.im_name, "BasicCheck") == 0 ||
- strcmp(im->core.im_name, "Strict") == 0 ||
- strcmp(im->core.im_name, "Thaicat") == 0 ||
- strcmp(im->core.im_name, "Passthrough") == 0))
- {
- return(True);
- }
- return(False);
-}
-
-Public Bool
-_XimThaiOpenIM(Xim im)
-{
- XLCd lcd = im->core.lcd;
- XlcConv conv;
- XimDefIMValues im_values;
- XimLocalPrivateRec* private = &im->private.local;
-
- _XimInitialResourceInfo();
- if(_XimSetIMResourceList(&im->core.im_resources,
- &im->core.im_num_resources) == False) {
- goto Open_Error;
- }
- if(_XimSetICResourceList(&im->core.ic_resources,
- &im->core.ic_num_resources) == False) {
- goto Open_Error;
- }
-
- _XimSetIMMode(im->core.im_resources, im->core.im_num_resources);
-
- _XimGetCurrentIMValues(im, &im_values);
- if(_XimSetLocalIMDefaults(im, (XPointer)&im_values,
- im->core.im_resources, im->core.im_num_resources) == False) {
- goto Open_Error;
- }
- _XimSetCurrentIMValues(im, &im_values);
-
- if (!(conv = _XlcOpenConverter(lcd, XlcNCompoundText, lcd, XlcNMultiByte)))
- goto Open_Error;
- private->ctom_conv = conv;
-
- if (!(conv = _XlcOpenConverter(lcd, XlcNCompoundText, lcd, XlcNWideChar)))
- goto Open_Error;
- private->ctow_conv = conv;
-
- if (!(conv = _XlcOpenConverter(lcd, XlcNCompoundText, lcd, XlcNUtf8String)))
- goto Open_Error;
- private->ctoutf8_conv = conv;
-
- if (!(conv = _XlcOpenConverter(lcd, XlcNCharSet, lcd, XlcNMultiByte)))
- goto Open_Error;
- private->cstomb_conv = conv;
-
- if (!(conv = _XlcOpenConverter(lcd, XlcNCharSet, lcd, XlcNWideChar)))
- goto Open_Error;
- private->cstowc_conv = conv;
-
- if (!(conv = _XlcOpenConverter(lcd, XlcNCharSet, lcd, XlcNUtf8String)))
- goto Open_Error;
- private->cstoutf8_conv = conv;
-
- if (!(conv = _XlcOpenConverter(lcd, XlcNUcsChar, lcd, XlcNChar)))
- goto Open_Error;
- private->ucstoc_conv = conv;
-
- if (!(conv = _XlcOpenConverter(lcd, XlcNUcsChar, lcd, XlcNUtf8String)))
- goto Open_Error;
- private->ucstoutf8_conv = conv;
-
- im->methods = &Xim_im_thai_methods;
- private->current_ic = (XIC)NULL;
-
- return(True);
-
-Open_Error :
- _XimThaiIMFree(im);
- return(False);
-}
-
-Public void
-_XimThaiIMFree(Xim im)
-{
- if(im->core.im_resources) {
- Xfree(im->core.im_resources);
- im->core.im_resources = NULL;
- }
- if(im->core.ic_resources) {
- Xfree(im->core.ic_resources);
- im->core.ic_resources = NULL;
- }
- if(im->core.im_values_list) {
- Xfree(im->core.im_values_list);
- im->core.im_values_list = NULL;
- }
- if(im->core.ic_values_list) {
- Xfree(im->core.ic_values_list);
- im->core.ic_values_list = NULL;
- }
- if(im->core.styles) {
- Xfree(im->core.styles);
- im->core.styles = NULL;
- }
- if(im->core.res_name) {
- Xfree(im->core.res_name);
- im->core.res_name = NULL;
- }
- if(im->core.res_class) {
- Xfree(im->core.res_class);
- im->core.res_class = NULL;
- }
- if(im->core.im_name) {
- Xfree(im->core.im_name);
- im->core.im_name = NULL;
- }
- if (im->private.local.ctom_conv) {
- _XlcCloseConverter(im->private.local.ctom_conv);
- im->private.local.ctom_conv = NULL;
- }
- if (im->private.local.ctow_conv) {
- _XlcCloseConverter(im->private.local.ctow_conv);
- im->private.local.ctow_conv = NULL;
- }
- if (im->private.local.ctoutf8_conv) {
- _XlcCloseConverter(im->private.local.ctoutf8_conv);
- im->private.local.ctoutf8_conv = NULL;
- }
- if (im->private.local.cstomb_conv) {
- _XlcCloseConverter(im->private.local.cstomb_conv);
- im->private.local.cstomb_conv = NULL;
- }
- if (im->private.local.cstowc_conv) {
- _XlcCloseConverter(im->private.local.cstowc_conv);
- im->private.local.cstowc_conv = NULL;
- }
- if (im->private.local.cstoutf8_conv) {
- _XlcCloseConverter(im->private.local.cstoutf8_conv);
- im->private.local.cstoutf8_conv = NULL;
- }
- if (im->private.local.ucstoc_conv) {
- _XlcCloseConverter(im->private.local.ucstoc_conv);
- im->private.local.ucstoc_conv = NULL;
- }
- if (im->private.local.ucstoutf8_conv) {
- _XlcCloseConverter(im->private.local.ucstoutf8_conv);
- im->private.local.ucstoutf8_conv = NULL;
- }
- return;
-}
-
-Public Status
-_XimThaiCloseIM(XIM xim)
-{
- Xim im = (Xim)xim;
- XIC ic;
- XIC next;
-
- ic = im->core.ic_chain;
- im->core.ic_chain = NULL;
- while (ic) {
- (*ic->methods->destroy) (ic);
- next = ic->core.next;
- Xfree ((char *) ic);
- ic = next;
- }
- _XimThaiIMFree(im);
- return(True);
-}
+/******************************************************************
+
+ Copyright 1992, 1993, 1994 by FUJITSU LIMITED
+ Copyright 1993 by Digital Equipment Corporation
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of FUJITSU LIMITED and
+Digital Equipment Corporation not be used in advertising or publicity
+pertaining to distribution of the software without specific, written
+prior permission. FUJITSU LIMITED and Digital Equipment Corporation
+makes no representations about the suitability of this software for
+any purpose. It is provided "as is" without express or implied
+warranty.
+
+FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION DISCLAIM ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR
+ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+
+ Author: Takashi Fujiwara FUJITSU LIMITED
+ fujiwara@a80.tech.yk.fujitsu.co.jp
+ Modifier: Franky Ling Digital Equipment Corporation
+ frankyling@hgrd01.enet.dec.com
+
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <stdio.h>
+#include <X11/Xlib.h>
+#include <X11/Xmd.h>
+#include <X11/Xatom.h>
+#include <X11/Xos.h>
+#include "Xlibint.h"
+#include "Xlcint.h"
+#include "XlcPublic.h"
+#include "XlcPubI.h"
+#include "Ximint.h"
+
+static XIMMethodsRec Xim_im_thai_methods = {
+ _XimThaiCloseIM, /* close */
+ _XimLocalSetIMValues, /* set_values */
+ _XimLocalGetIMValues, /* get_values */
+ _XimThaiCreateIC, /* create_ic */
+ _XimLcctstombs, /* ctstombs */
+ _XimLcctstowcs, /* ctstowcs */
+ _XimLcctstoutf8 /* ctstoutf8 */
+};
+
+#define THAI_LANGUAGE_NAME "th"
+
+Bool
+_XimCheckIfThaiProcessing(Xim im)
+{
+ char *language;
+
+ _XGetLCValues(im->core.lcd, XlcNLanguage, &language, NULL);
+ if(strcmp(language, THAI_LANGUAGE_NAME) == 0 &&
+ (strcmp(im->core.im_name, "") == 0 ||
+ strcmp(im->core.im_name, "BasicCheck") == 0 ||
+ strcmp(im->core.im_name, "Strict") == 0 ||
+ strcmp(im->core.im_name, "Thaicat") == 0 ||
+ strcmp(im->core.im_name, "Passthrough") == 0))
+ {
+ return(True);
+ }
+ return(False);
+}
+
+Bool
+_XimThaiOpenIM(Xim im)
+{
+ XLCd lcd = im->core.lcd;
+ XlcConv conv;
+ XimDefIMValues im_values;
+ XimLocalPrivateRec* private = &im->private.local;
+
+ _XimInitialResourceInfo();
+ if(_XimSetIMResourceList(&im->core.im_resources,
+ &im->core.im_num_resources) == False) {
+ goto Open_Error;
+ }
+ if(_XimSetICResourceList(&im->core.ic_resources,
+ &im->core.ic_num_resources) == False) {
+ goto Open_Error;
+ }
+
+ _XimSetIMMode(im->core.im_resources, im->core.im_num_resources);
+
+ _XimGetCurrentIMValues(im, &im_values);
+ if(_XimSetLocalIMDefaults(im, (XPointer)&im_values,
+ im->core.im_resources, im->core.im_num_resources) == False) {
+ goto Open_Error;
+ }
+ _XimSetCurrentIMValues(im, &im_values);
+
+ if (!(conv = _XlcOpenConverter(lcd, XlcNCompoundText, lcd, XlcNMultiByte)))
+ goto Open_Error;
+ private->ctom_conv = conv;
+
+ if (!(conv = _XlcOpenConverter(lcd, XlcNCompoundText, lcd, XlcNWideChar)))
+ goto Open_Error;
+ private->ctow_conv = conv;
+
+ if (!(conv = _XlcOpenConverter(lcd, XlcNCompoundText, lcd, XlcNUtf8String)))
+ goto Open_Error;
+ private->ctoutf8_conv = conv;
+
+ if (!(conv = _XlcOpenConverter(lcd, XlcNCharSet, lcd, XlcNMultiByte)))
+ goto Open_Error;
+ private->cstomb_conv = conv;
+
+ if (!(conv = _XlcOpenConverter(lcd, XlcNCharSet, lcd, XlcNWideChar)))
+ goto Open_Error;
+ private->cstowc_conv = conv;
+
+ if (!(conv = _XlcOpenConverter(lcd, XlcNCharSet, lcd, XlcNUtf8String)))
+ goto Open_Error;
+ private->cstoutf8_conv = conv;
+
+ if (!(conv = _XlcOpenConverter(lcd, XlcNUcsChar, lcd, XlcNChar)))
+ goto Open_Error;
+ private->ucstoc_conv = conv;
+
+ if (!(conv = _XlcOpenConverter(lcd, XlcNUcsChar, lcd, XlcNUtf8String)))
+ goto Open_Error;
+ private->ucstoutf8_conv = conv;
+
+ im->methods = &Xim_im_thai_methods;
+ private->current_ic = (XIC)NULL;
+
+ return(True);
+
+Open_Error :
+ _XimThaiIMFree(im);
+ return(False);
+}
+
+void
+_XimThaiIMFree(Xim im)
+{
+ if(im->core.im_resources) {
+ Xfree(im->core.im_resources);
+ im->core.im_resources = NULL;
+ }
+ if(im->core.ic_resources) {
+ Xfree(im->core.ic_resources);
+ im->core.ic_resources = NULL;
+ }
+ if(im->core.im_values_list) {
+ Xfree(im->core.im_values_list);
+ im->core.im_values_list = NULL;
+ }
+ if(im->core.ic_values_list) {
+ Xfree(im->core.ic_values_list);
+ im->core.ic_values_list = NULL;
+ }
+ if(im->core.styles) {
+ Xfree(im->core.styles);
+ im->core.styles = NULL;
+ }
+ if(im->core.res_name) {
+ Xfree(im->core.res_name);
+ im->core.res_name = NULL;
+ }
+ if(im->core.res_class) {
+ Xfree(im->core.res_class);
+ im->core.res_class = NULL;
+ }
+ if(im->core.im_name) {
+ Xfree(im->core.im_name);
+ im->core.im_name = NULL;
+ }
+ if (im->private.local.ctom_conv) {
+ _XlcCloseConverter(im->private.local.ctom_conv);
+ im->private.local.ctom_conv = NULL;
+ }
+ if (im->private.local.ctow_conv) {
+ _XlcCloseConverter(im->private.local.ctow_conv);
+ im->private.local.ctow_conv = NULL;
+ }
+ if (im->private.local.ctoutf8_conv) {
+ _XlcCloseConverter(im->private.local.ctoutf8_conv);
+ im->private.local.ctoutf8_conv = NULL;
+ }
+ if (im->private.local.cstomb_conv) {
+ _XlcCloseConverter(im->private.local.cstomb_conv);
+ im->private.local.cstomb_conv = NULL;
+ }
+ if (im->private.local.cstowc_conv) {
+ _XlcCloseConverter(im->private.local.cstowc_conv);
+ im->private.local.cstowc_conv = NULL;
+ }
+ if (im->private.local.cstoutf8_conv) {
+ _XlcCloseConverter(im->private.local.cstoutf8_conv);
+ im->private.local.cstoutf8_conv = NULL;
+ }
+ if (im->private.local.ucstoc_conv) {
+ _XlcCloseConverter(im->private.local.ucstoc_conv);
+ im->private.local.ucstoc_conv = NULL;
+ }
+ if (im->private.local.ucstoutf8_conv) {
+ _XlcCloseConverter(im->private.local.ucstoutf8_conv);
+ im->private.local.ucstoutf8_conv = NULL;
+ }
+ return;
+}
+
+Status
+_XimThaiCloseIM(XIM xim)
+{
+ Xim im = (Xim)xim;
+ XIC ic;
+ XIC next;
+
+ ic = im->core.ic_chain;
+ im->core.ic_chain = NULL;
+ while (ic) {
+ (*ic->methods->destroy) (ic);
+ next = ic->core.next;
+ Xfree ((char *) ic);
+ ic = next;
+ }
+ _XimThaiIMFree(im);
+ return(True);
+}
diff --git a/libX11/modules/im/ximcp/imTrX.c b/libX11/modules/im/ximcp/imTrX.c
index d85d1d114..1412d7046 100644
--- a/libX11/modules/im/ximcp/imTrX.c
+++ b/libX11/modules/im/ximcp/imTrX.c
@@ -60,7 +60,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include "XimTrInt.h"
#include "XimTrX.h"
-Private Bool
+static Bool
_XimXRegisterDispatcher(
Xim im,
Bool (*callback)(
@@ -81,7 +81,7 @@ _XimXRegisterDispatcher(
return True;
}
-Private void
+static void
_XimXFreeIntrCallback(
Xim im)
{
@@ -96,7 +96,7 @@ _XimXFreeIntrCallback(
return;
}
-Private Bool
+static Bool
_XimXCallDispatcher(Xim im, INT16 len, XPointer data)
{
register XIntrCallbackRec *rec;
@@ -109,7 +109,7 @@ _XimXCallDispatcher(Xim im, INT16 len, XPointer data)
return False;
}
-Private Bool
+static Bool
_XimXFilterWaitEvent(
Display *d,
Window w,
@@ -137,7 +137,7 @@ _XimXFilterWaitEvent(
return ret;
}
-Private Bool
+static Bool
_CheckConnect(
Display *display,
XEvent *event,
@@ -153,7 +153,7 @@ _CheckConnect(
return False;
}
-Private Bool
+static Bool
_XimXConnect(Xim im)
{
XEvent event;
@@ -224,7 +224,7 @@ _XimXConnect(Xim im)
return True;
}
-Private Bool
+static Bool
_XimXShutdown(Xim im)
{
XSpecRec *spec = (XSpecRec *)im->private.proto.spec;
@@ -244,7 +244,7 @@ _XimXShutdown(Xim im)
return True;
}
-Private char *
+static char *
_NewAtom(
char *atomName)
{
@@ -255,7 +255,7 @@ _NewAtom(
return atomName;
}
-Private Bool
+static Bool
_XimXWrite(Xim im, INT16 len, XPointer data)
{
Atom atom;
@@ -316,7 +316,7 @@ _XimXWrite(Xim im, INT16 len, XPointer data)
return True;
}
-Private Bool
+static Bool
_XimXGetReadData(
Xim im,
char *buf,
@@ -440,7 +440,7 @@ _XimXGetReadData(
return True;
}
-Private Bool
+static Bool
_CheckCMEvent(
Display *display,
XEvent *event,
@@ -461,7 +461,7 @@ _CheckCMEvent(
return False;
}
-Private Bool
+static Bool
_XimXRead(Xim im, XPointer recv_buf, int buf_len, int *ret_len)
{
XEvent *ev;
@@ -484,14 +484,14 @@ _XimXRead(Xim im, XPointer recv_buf, int buf_len, int *ret_len)
return True;
}
-Private void
+static void
_XimXFlush(Xim im)
{
XFlush(im->core.display);
return;
}
-Public Bool
+Bool
_XimXConf(Xim im, char *address)
{
XSpecRec *spec;
diff --git a/libX11/modules/im/ximcp/imTrans.c b/libX11/modules/im/ximcp/imTrans.c
index 0ac08aa60..4bdecb2ef 100644
--- a/libX11/modules/im/ximcp/imTrans.c
+++ b/libX11/modules/im/ximcp/imTrans.c
@@ -72,7 +72,7 @@ PERFORMANCE OF THIS SOFTWARE.
#endif
-Private Bool
+static Bool
_XimTransConnect(
Xim im)
{
@@ -122,7 +122,7 @@ _XimTransConnect(
}
-Private Bool
+static Bool
_XimTransShutdown(
Xim im)
{
@@ -142,7 +142,7 @@ _XimTransShutdown(
-Public Bool
+Bool
_XimTransRegisterDispatcher(
Xim im,
Bool (*callback)(
@@ -164,7 +164,7 @@ _XimTransRegisterDispatcher(
}
-Public void
+void
_XimFreeTransIntrCallback(
Xim im)
{
@@ -180,7 +180,7 @@ _XimFreeTransIntrCallback(
}
-Public Bool
+Bool
_XimTransCallDispatcher(Xim im, INT16 len, XPointer data)
{
TransSpecRec *spec = (TransSpecRec *)im->private.proto.spec;
@@ -194,7 +194,7 @@ _XimTransCallDispatcher(Xim im, INT16 len, XPointer data)
}
-Public Bool
+Bool
_XimTransFilterWaitEvent(
Display *d,
Window w,
@@ -209,7 +209,7 @@ _XimTransFilterWaitEvent(
}
-Public void
+void
_XimTransInternalConnection(
Display *d,
int fd,
@@ -235,7 +235,7 @@ _XimTransInternalConnection(
}
-Public Bool
+Bool
_XimTransWrite(Xim im, INT16 len, XPointer data)
{
TransSpecRec *spec = (TransSpecRec *)im->private.proto.spec;
@@ -252,7 +252,7 @@ _XimTransWrite(Xim im, INT16 len, XPointer data)
}
-Public Bool
+Bool
_XimTransRead(
Xim im,
XPointer recv_buf,
@@ -273,7 +273,7 @@ _XimTransRead(
}
-Public void
+void
_XimTransFlush(
Xim im)
{
@@ -282,7 +282,7 @@ _XimTransFlush(
-Public Bool
+Bool
_XimTransConf(
Xim im,
char *address)
diff --git a/libX11/modules/im/ximcp/imTransR.c b/libX11/modules/im/ximcp/imTransR.c
index b8bad59a4..1fd008870 100644
--- a/libX11/modules/im/ximcp/imTransR.c
+++ b/libX11/modules/im/ximcp/imTransR.c
@@ -1,312 +1,312 @@
-/*
- * Copyright 1992 Oracle and/or its affiliates. All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-/******************************************************************
-
- Copyright 1992, 1993, 1994 by FUJITSU LIMITED
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and
-that both that copyright notice and this permission notice appear
-in supporting documentation, and that the name of FUJITSU LIMITED
-not be used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-FUJITSU LIMITED makes no representations about the suitability of
-this software for any purpose.
-It is provided "as is" without express or implied warranty.
-
-FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
-USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
- Author: Hideki Hiura (hhiura@Sun.COM) Sun Microsystems, Inc.
- Takashi Fujiwara FUJITSU LIMITED
- fujiwara@a80.tech.yk.fujitsu.co.jp
-
-******************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "Xlibint.h"
-#include "Xlcint.h"
-#include "XimTrInt.h"
-#include "Ximint.h"
-
-Public TransportSW _XimTransportRec[] = {
- { "X", _XimXConf }, /* 1st entry must be X.
- This will be a fallback */
-#ifdef TCPCONN
- { "tcp", _XimTransConf }, /* use X transport lib */
-#endif /* TCPCONN */
-#if defined(UNIXCONN) || defined(LOCALCONN)
- { "local", _XimTransConf }, /* use X transport lib */
-#endif /* UNIXCONN */
-#ifdef DNETCONN
- { "dnet", _XimTransConf }, /* use X transport lib */
-#endif /* DNETCONN */
-#ifdef STREAMSCONN
- { "streams", _XimTransConf }, /* use X transport lib */
-#endif /* STREAMSCONN */
- { (char *)NULL, (Bool (*)(Xim, char *))NULL },
-};
-
-Public Bool
-_XimConnect(Xim im)
-{
- return im->private.proto.connect(im);
-}
-
-Public Bool
-_XimShutdown(Xim im)
-{
- return im->private.proto.shutdown(im);
-}
-
-Public Bool
-_XimWrite(Xim im, INT16 len, XPointer data)
-{
- return im->private.proto.write(im, len, data);
-}
-
-Private int
-_CheckProtocolData(
- Xim im,
- char *recv_buf)
-{
- int data_len;
-
- data_len = (int)(((*((CARD16 *)recv_buf + 1)) * 4) + XIM_HEADER_SIZE);
- return data_len;
-}
-
-Private int
-_XimReadData(
- Xim im,
- INT16 *len,
- XPointer buf,
- int buf_size)
-{
- char *hold_buf;
- char *tmp;
- int data_len;
- int packet_size;
- int ret_len;
- register int i;
-
- if (buf_size < XIM_HEADER_SIZE) {
- *len = (INT16)XIM_HEADER_SIZE;
- return XIM_OVERFLOW;
- }
-
- bzero(buf, buf_size);
- packet_size = 0;
- data_len = 0;
-
- if ((hold_buf = im->private.proto.hold_data)) {
- data_len = im->private.proto.hold_data_len;
- if (data_len >= XIM_HEADER_SIZE) {
- packet_size = _CheckProtocolData(im, hold_buf);
- if (packet_size > buf_size) {
- *len = (INT16)packet_size;
- return XIM_OVERFLOW;
- }
- if (packet_size <= data_len) {
- memcpy(buf, hold_buf, packet_size);
- for (i = packet_size; i < data_len; i++) {
- if (hold_buf[i])
- break;
- }
- data_len -= i;
-
- if (data_len) {
- if (!(tmp = (char *)Xmalloc(data_len))) {
- return XIM_FALSE;
- }
- memcpy(tmp, &hold_buf[i], data_len);
- im->private.proto.hold_data = tmp;
- im->private.proto.hold_data_len = data_len;
- } else {
- im->private.proto.hold_data = 0;
- im->private.proto.hold_data_len = 0;
- }
- Xfree(hold_buf);
- *len = (INT16)packet_size;
- return XIM_TRUE;
- }
- }
- memcpy(buf, hold_buf, data_len);
- buf_size -= data_len;
- Xfree(hold_buf);
- im->private.proto.hold_data = 0;
- im->private.proto.hold_data_len = 0;
- }
-
- if (!packet_size) {
- while (data_len < XIM_HEADER_SIZE) {
- if (!(im->private.proto.read(im,
- (XPointer)&buf[data_len], buf_size, &ret_len))) {
- return XIM_FALSE;
- }
- data_len += ret_len;
- buf_size -= ret_len;
- }
- packet_size = _CheckProtocolData(im, buf);
- }
-
- if (packet_size > buf_size) {
- if (!(tmp = (char *)Xmalloc(data_len))) {
- return XIM_FALSE;
- }
- memcpy(tmp, buf, data_len);
- bzero(buf, data_len);
- im->private.proto.hold_data = tmp;
- im->private.proto.hold_data_len = data_len;
- *len = (INT16)packet_size;
- return XIM_OVERFLOW;
- }
-
- while (data_len < packet_size) {
- if (!(im->private.proto.read(im,
- (XPointer)&buf[data_len], buf_size, &ret_len))) {
- return XIM_FALSE;
- }
- data_len += ret_len;
- buf_size -= ret_len;
- }
-
- for (i = packet_size; i < data_len; i++) {
- if (buf[i])
- break;
- }
- data_len -= i;
-
- if (data_len) {
- if (!(tmp = (char *)Xmalloc(data_len))) {
- return XIM_FALSE;
- }
- memcpy(tmp, &buf[i], data_len);
- bzero(&buf[i], data_len);
- im->private.proto.hold_data = tmp;
- im->private.proto.hold_data_len = data_len;
- } else {
- im->private.proto.hold_data = 0;
- im->private.proto.hold_data_len = 0;
- }
- *len = (INT16)packet_size;
- return XIM_TRUE;
-}
-
-Private Bool
-_XimCallDispatcher(
- Xim im,
- INT16 len,
- XPointer data)
-{
- return im->private.proto.call_dispatcher(im, len, data);
-}
-
-Public int
-_XimRead(Xim im, INT16 *len, XPointer buf, int buf_size,
- Bool (*predicate)(Xim, INT16, XPointer, XPointer), XPointer arg)
-{
- INT16 read_len;
- int ret_code;
-
- for (;;) {
- ret_code = _XimReadData(im, &read_len, buf, buf_size);
- if(ret_code != XIM_TRUE) {
- return ret_code;
- }
- if ((*predicate)(im, read_len, buf, arg))
- break;
- if (_XimCallDispatcher(im, read_len, buf))
- continue;
- _XimError(im, 0, XIM_BadProtocol, (INT16)0, (CARD16)0, (char *)NULL);
- }
- *len = read_len;
- return True;
-}
-
-Public Bool
-_XimRegisterDispatcher(
- Xim im,
- Bool (*callback)(
- Xim, INT16, XPointer, XPointer
- ),
- XPointer call_data)
-{
- return im->private.proto.register_dispatcher(im, callback, call_data);
-}
-
-Public void
-_XimFlush(Xim im)
-{
- im->private.proto.flush(im);
- return;
-}
-
-Public Bool
-_XimFilterWaitEvent(Xim im)
-{
- INT16 read_len;
- CARD32 reply32[BUFSIZE/4];
- char *reply = (char *)reply32;
- XPointer preply;
- int buf_size;
- int ret_code;
-
- buf_size = BUFSIZE;
- ret_code = _XimReadData(im, &read_len, (XPointer)reply, buf_size);
- if(ret_code == XIM_TRUE) {
- preply = reply;
- } else if(ret_code == XIM_OVERFLOW) {
- if(read_len <= 0) {
- preply = reply;
- } else {
- buf_size = (int)read_len;
- preply = (XPointer)Xmalloc(buf_size);
- ret_code = _XimReadData(im, &read_len, preply, buf_size);
- if(ret_code != XIM_TRUE) {
- if (preply != reply)
- Xfree(preply);
- return False;
- }
- }
- } else {
- return False;
- }
- if (_XimCallDispatcher(im, read_len, preply)) {
- if(reply != preply)
- Xfree(preply);
- return True;
- }
- _XimError(im, 0, XIM_BadProtocol, (INT16)0, (CARD16)0, (char *)NULL);
- if(reply != preply)
- Xfree(preply);
- return True;
-}
+/*
+ * Copyright 1992 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+/******************************************************************
+
+ Copyright 1992, 1993, 1994 by FUJITSU LIMITED
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appear in all copies and
+that both that copyright notice and this permission notice appear
+in supporting documentation, and that the name of FUJITSU LIMITED
+not be used in advertising or publicity pertaining to distribution
+of the software without specific, written prior permission.
+FUJITSU LIMITED makes no representations about the suitability of
+this software for any purpose.
+It is provided "as is" without express or implied warranty.
+
+FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+ Author: Hideki Hiura (hhiura@Sun.COM) Sun Microsystems, Inc.
+ Takashi Fujiwara FUJITSU LIMITED
+ fujiwara@a80.tech.yk.fujitsu.co.jp
+
+******************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include "Xlibint.h"
+#include "Xlcint.h"
+#include "XimTrInt.h"
+#include "Ximint.h"
+
+TransportSW _XimTransportRec[] = {
+ { "X", _XimXConf }, /* 1st entry must be X.
+ This will be a fallback */
+#ifdef TCPCONN
+ { "tcp", _XimTransConf }, /* use X transport lib */
+#endif /* TCPCONN */
+#if defined(UNIXCONN) || defined(LOCALCONN)
+ { "local", _XimTransConf }, /* use X transport lib */
+#endif /* UNIXCONN */
+#ifdef DNETCONN
+ { "dnet", _XimTransConf }, /* use X transport lib */
+#endif /* DNETCONN */
+#ifdef STREAMSCONN
+ { "streams", _XimTransConf }, /* use X transport lib */
+#endif /* STREAMSCONN */
+ { (char *)NULL, (Bool (*)(Xim, char *))NULL },
+};
+
+Bool
+_XimConnect(Xim im)
+{
+ return im->private.proto.connect(im);
+}
+
+Bool
+_XimShutdown(Xim im)
+{
+ return im->private.proto.shutdown(im);
+}
+
+Bool
+_XimWrite(Xim im, INT16 len, XPointer data)
+{
+ return im->private.proto.write(im, len, data);
+}
+
+static int
+_CheckProtocolData(
+ Xim im,
+ char *recv_buf)
+{
+ int data_len;
+
+ data_len = (int)(((*((CARD16 *)recv_buf + 1)) * 4) + XIM_HEADER_SIZE);
+ return data_len;
+}
+
+static int
+_XimReadData(
+ Xim im,
+ INT16 *len,
+ XPointer buf,
+ int buf_size)
+{
+ char *hold_buf;
+ char *tmp;
+ int data_len;
+ int packet_size;
+ int ret_len;
+ register int i;
+
+ if (buf_size < XIM_HEADER_SIZE) {
+ *len = (INT16)XIM_HEADER_SIZE;
+ return XIM_OVERFLOW;
+ }
+
+ bzero(buf, buf_size);
+ packet_size = 0;
+ data_len = 0;
+
+ if ((hold_buf = im->private.proto.hold_data)) {
+ data_len = im->private.proto.hold_data_len;
+ if (data_len >= XIM_HEADER_SIZE) {
+ packet_size = _CheckProtocolData(im, hold_buf);
+ if (packet_size > buf_size) {
+ *len = (INT16)packet_size;
+ return XIM_OVERFLOW;
+ }
+ if (packet_size <= data_len) {
+ memcpy(buf, hold_buf, packet_size);
+ for (i = packet_size; i < data_len; i++) {
+ if (hold_buf[i])
+ break;
+ }
+ data_len -= i;
+
+ if (data_len) {
+ if (!(tmp = (char *)Xmalloc(data_len))) {
+ return XIM_FALSE;
+ }
+ memcpy(tmp, &hold_buf[i], data_len);
+ im->private.proto.hold_data = tmp;
+ im->private.proto.hold_data_len = data_len;
+ } else {
+ im->private.proto.hold_data = 0;
+ im->private.proto.hold_data_len = 0;
+ }
+ Xfree(hold_buf);
+ *len = (INT16)packet_size;
+ return XIM_TRUE;
+ }
+ }
+ memcpy(buf, hold_buf, data_len);
+ buf_size -= data_len;
+ Xfree(hold_buf);
+ im->private.proto.hold_data = 0;
+ im->private.proto.hold_data_len = 0;
+ }
+
+ if (!packet_size) {
+ while (data_len < XIM_HEADER_SIZE) {
+ if (!(im->private.proto.read(im,
+ (XPointer)&buf[data_len], buf_size, &ret_len))) {
+ return XIM_FALSE;
+ }
+ data_len += ret_len;
+ buf_size -= ret_len;
+ }
+ packet_size = _CheckProtocolData(im, buf);
+ }
+
+ if (packet_size > buf_size) {
+ if (!(tmp = (char *)Xmalloc(data_len))) {
+ return XIM_FALSE;
+ }
+ memcpy(tmp, buf, data_len);
+ bzero(buf, data_len);
+ im->private.proto.hold_data = tmp;
+ im->private.proto.hold_data_len = data_len;
+ *len = (INT16)packet_size;
+ return XIM_OVERFLOW;
+ }
+
+ while (data_len < packet_size) {
+ if (!(im->private.proto.read(im,
+ (XPointer)&buf[data_len], buf_size, &ret_len))) {
+ return XIM_FALSE;
+ }
+ data_len += ret_len;
+ buf_size -= ret_len;
+ }
+
+ for (i = packet_size; i < data_len; i++) {
+ if (buf[i])
+ break;
+ }
+ data_len -= i;
+
+ if (data_len) {
+ if (!(tmp = (char *)Xmalloc(data_len))) {
+ return XIM_FALSE;
+ }
+ memcpy(tmp, &buf[i], data_len);
+ bzero(&buf[i], data_len);
+ im->private.proto.hold_data = tmp;
+ im->private.proto.hold_data_len = data_len;
+ } else {
+ im->private.proto.hold_data = 0;
+ im->private.proto.hold_data_len = 0;
+ }
+ *len = (INT16)packet_size;
+ return XIM_TRUE;
+}
+
+static Bool
+_XimCallDispatcher(
+ Xim im,
+ INT16 len,
+ XPointer data)
+{
+ return im->private.proto.call_dispatcher(im, len, data);
+}
+
+int
+_XimRead(Xim im, INT16 *len, XPointer buf, int buf_size,
+ Bool (*predicate)(Xim, INT16, XPointer, XPointer), XPointer arg)
+{
+ INT16 read_len;
+ int ret_code;
+
+ for (;;) {
+ ret_code = _XimReadData(im, &read_len, buf, buf_size);
+ if(ret_code != XIM_TRUE) {
+ return ret_code;
+ }
+ if ((*predicate)(im, read_len, buf, arg))
+ break;
+ if (_XimCallDispatcher(im, read_len, buf))
+ continue;
+ _XimError(im, 0, XIM_BadProtocol, (INT16)0, (CARD16)0, (char *)NULL);
+ }
+ *len = read_len;
+ return True;
+}
+
+Bool
+_XimRegisterDispatcher(
+ Xim im,
+ Bool (*callback)(
+ Xim, INT16, XPointer, XPointer
+ ),
+ XPointer call_data)
+{
+ return im->private.proto.register_dispatcher(im, callback, call_data);
+}
+
+void
+_XimFlush(Xim im)
+{
+ im->private.proto.flush(im);
+ return;
+}
+
+Bool
+_XimFilterWaitEvent(Xim im)
+{
+ INT16 read_len;
+ CARD32 reply32[BUFSIZE/4];
+ char *reply = (char *)reply32;
+ XPointer preply;
+ int buf_size;
+ int ret_code;
+
+ buf_size = BUFSIZE;
+ ret_code = _XimReadData(im, &read_len, (XPointer)reply, buf_size);
+ if(ret_code == XIM_TRUE) {
+ preply = reply;
+ } else if(ret_code == XIM_OVERFLOW) {
+ if(read_len <= 0) {
+ preply = reply;
+ } else {
+ buf_size = (int)read_len;
+ preply = (XPointer)Xmalloc(buf_size);
+ ret_code = _XimReadData(im, &read_len, preply, buf_size);
+ if(ret_code != XIM_TRUE) {
+ if (preply != reply)
+ Xfree(preply);
+ return False;
+ }
+ }
+ } else {
+ return False;
+ }
+ if (_XimCallDispatcher(im, read_len, preply)) {
+ if(reply != preply)
+ Xfree(preply);
+ return True;
+ }
+ _XimError(im, 0, XIM_BadProtocol, (INT16)0, (CARD16)0, (char *)NULL);
+ if(reply != preply)
+ Xfree(preply);
+ return True;
+}