[uim-commit] r1054 - trunk/xim
ekato at freedesktop.org
ekato at freedesktop.org
Fri Jul 29 03:22:15 EST 2005
Author: ekato
Date: 2005-07-28 10:21:59 -0700 (Thu, 28 Jul 2005)
New Revision: 1054
Modified:
trunk/xim/ximic.cpp
trunk/xim/ximtrans.cpp
Log:
* xim/ximic.cpp : Cosmetic changes.
* xim/ximtrans.cpp : Ditto.
(Connection::xim_error) : Suppress error message upon receiving
XIM_BadSomething.
Modified: trunk/xim/ximic.cpp
===================================================================
--- trunk/xim/ximic.cpp 2005-07-28 06:25:36 UTC (rev 1053)
+++ trunk/xim/ximic.cpp 2005-07-28 17:21:59 UTC (rev 1054)
@@ -254,7 +254,7 @@
void icxatr::unset_change_mask(int id)
{
- change_mask &=(~(1 << id));
+ change_mask &= (~(1 << id));
}
void icxatr::print()
@@ -506,7 +506,7 @@
void XimIC::setICAttrs(void *val, int len)
{
- unsigned char *p=(unsigned char *)val;
+ unsigned char *p = (unsigned char *)val;
int byte_order = mConn->byte_order();
int i;
for (i = 0; i < len;) {
Modified: trunk/xim/ximtrans.cpp
===================================================================
--- trunk/xim/ximtrans.cpp 2005-07-28 06:25:36 UTC (rev 1053)
+++ trunk/xim/ximtrans.cpp 2005-07-28 17:21:59 UTC (rev 1054)
@@ -46,7 +46,7 @@
# include <alloca.h>
#endif
-/* XIM Error Code */
+// XIM Error Code
#define XIM_BadSomething 999
const char *xim_packet_name[] = {
@@ -90,13 +90,13 @@
"XIM_STATUS_DRAW", "XIM_STATUS_DONE", "XIM_PREEDITSTATE"
};
-static struct XIMATTRIBUTE{
+static struct XIMATTRIBUTE {
XIMATTRIBUTE(const char *n, int t);
static void write_imattr_to_packet(TxPacket *p);
const char *name;
int type;
-}xim_attributes[]={
+} xim_attributes[] = {
XIMATTRIBUTE(XNQueryInputStyle, TYPE_XIMSTYLE),
};
@@ -130,12 +130,12 @@
}
}
-static struct XICATTRIBUTE{
+static struct XICATTRIBUTE {
XICATTRIBUTE(const char *n, int t);
static void write_icattr_to_packet(TxPacket *p);
const char *name;
int type;
-}xic_attributes[]={
+} xic_attributes[] = {
// the sequence is required to be same as the order of
// ICATTTRIBUTE defined in ximpn.h
XICATTRIBUTE(XNInputStyle, TYPE_LONG),
@@ -313,7 +313,7 @@
xim_error(p);
break;
default:
- printf("Unknown(or not implemented.) packet from xim connection.\n");
+ printf("Unknown (or not implemented) packet from xim connection.\n");
(*i)->dump();
break;
}
@@ -760,21 +760,19 @@
buf[len] = 0;
p->getStr(buf);
- fprintf(stderr, "XIM_ERROR received.\n");
- if (mask & 1)
- fprintf(stderr, " imid = %d\n", imid);
- if (mask & 2)
- fprintf(stderr, " icid = %d\n", icid);
-
- fprintf(stderr, " error_code = %d\n", ecode);
- fprintf(stderr, " message=(%s)\n", buf);
-
switch (ecode) {
case XIM_BadSomething:
unsetPreeditStartSyncFlag();
unsetPreeditCaretSyncFlag();
break;
default:
+ fprintf(stderr, "XIM_ERROR received.\n");
+ if (mask & 1)
+ fprintf(stderr, " imid = %d\n", imid);
+ if (mask & 2)
+ fprintf(stderr, " icid = %d\n", icid);
+ fprintf(stderr, " error_code = %d\n", ecode);
+ fprintf(stderr, " message = (%s)\n", buf);
break;
}
}
More information about the uim-commit
mailing list