From: Huang Peng Date: Thu, 16 Oct 2008 02:15:18 +0000 (+0800) Subject: Fix coding style. X-Git-Tag: 0.1.1.20081023~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c72c9235e37bad755174b6eeed0cf96a42d9b94;p=platform%2Fupstream%2Fibus.git Fix coding style. --- diff --git a/util/IMdkit/Xi18n.h b/util/IMdkit/Xi18n.h index e673f54..484cc62 100644 --- a/util/IMdkit/Xi18n.h +++ b/util/IMdkit/Xi18n.h @@ -41,8 +41,8 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #define XIM_EXTENSION 128 #define XIM_EXT_SET_EVENT_MASK (0x30) -#define XIM_EXT_FORWARD_KEYEVENT (0x32) -#define XIM_EXT_MOVE (0x33) +#define XIM_EXT_FORWARD_KEYEVENT (0x32) +#define XIM_EXT_MOVE (0x33) #define COMMON_EXTENSIONS_NUM 3 #include @@ -56,7 +56,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* * Padding macro */ -#define IMPAD(length) ((4 - ((length)%4))%4) +#define IMPAD(length) ((4 - ((length)%4))%4) /* * Target Atom for Transport Connection diff --git a/util/IMdkit/i18nX.c b/util/IMdkit/i18nX.c index df0edec..a55dc6d 100644 --- a/util/IMdkit/i18nX.c +++ b/util/IMdkit/i18nX.c @@ -100,7 +100,7 @@ static unsigned char *ReadXIMMessage (XIMS ims, if (client->byte_order == '?') { if (hdr->major_opcode != XIM_CONNECT) - return (unsigned char *) NULL; /* can do nothing */ + return (unsigned char *) NULL; /* can do nothing */ client->byte_order = (CARD8) rec[0]; } @@ -129,24 +129,24 @@ static unsigned char *ReadXIMMessage (XIMS ims, else if (ev->format == 32) { /* ClientMessage and WindowProperty */ unsigned long length = (unsigned long) ev->data.l[0]; - unsigned long get_length; + unsigned long get_length; Atom atom = (Atom) ev->data.l[1]; - int return_code; - Atom actual_type_ret; - int actual_format_ret; + int return_code; + Atom actual_type_ret; + int actual_format_ret; unsigned long bytes_after_ret; unsigned char *prop; unsigned long nitems; - /* Round up length to next 4 byte value. */ - get_length = length + 3; - if (get_length > LONG_MAX) - get_length = LONG_MAX; - get_length /= 4; - if (get_length == 0) { - fprintf(stderr, "%s: invalid length 0\n", __FUNCTION__); - return NULL; - } + /* Round up length to next 4 byte value. */ + get_length = length + 3; + if (get_length > LONG_MAX) + get_length = LONG_MAX; + get_length /= 4; + if (get_length == 0) { + fprintf(stderr, "%s: invalid length 0\n", __FUNCTION__); + return NULL; + } return_code = XGetWindowProperty (i18n_core->address.dpy, x_client->accept_win, atom, @@ -162,27 +162,27 @@ static unsigned char *ReadXIMMessage (XIMS ims, if (return_code != Success || actual_format_ret == 0 || nitems == 0) { if (return_code == Success) XFree (prop); - client->property_offset = 0; + client->property_offset = 0; return (unsigned char *) NULL; } - /* Update the offset to read next time as needed */ - if (bytes_after_ret > 0) - client->property_offset += length; - else - client->property_offset = 0; - switch (actual_format_ret) { - case 8: - case 16: - case 32: - length = nitems * actual_format_ret / 8; - break; - default: - fprintf(stderr, "%s: unknown property return format: %d\n", - __FUNCTION__, actual_format_ret); - XFree(prop); - client->property_offset = 0; - return NULL; - } + /* Update the offset to read next time as needed */ + if (bytes_after_ret > 0) + client->property_offset += length; + else + client->property_offset = 0; + switch (actual_format_ret) { + case 8: + case 16: + case 32: + length = nitems * actual_format_ret / 8; + break; + default: + fprintf(stderr, "%s: unknown property return format: %d\n", + __FUNCTION__, actual_format_ret); + XFree(prop); + client->property_offset = 0; + return NULL; + } /* if hit, it might be an error */ if ((p = (unsigned char *) malloc (length)) == NULL) return (unsigned char *) NULL; @@ -205,7 +205,7 @@ static void ReadXConnectMessage (XIMS ims, XClientMessageEvent *ev) XClient *x_client = NewXClient (i18n_core, new_client); if (ev->window != i18n_core->address.im_window) - return; /* incorrect connection request */ + return; /* incorrect connection request */ /*endif*/ if (major_version != 0 || minor_version != 0) { @@ -439,9 +439,9 @@ static Bool Xi18nXDisconnect (XIMS ims, CARD16 connect_id) XDestroyWindow (dpy, x_client->accept_win); _XUnregisterFilter (dpy, - x_client->accept_win, + x_client->accept_win, WaitXIMProtocol, - (XPointer)ims); + (XPointer)ims); XFree (x_client); _Xi18nDeleteClient (i18n_core, connect_id); return True;