diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2019-07-14 16:19:32 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2019-07-14 16:19:32 -0400 |
commit | c32e6431de07c2c6314b710c0a9e446b7a62f831 (patch) | |
tree | 117a76523112487a2983cd368a9047b6ff10af6e /src | |
parent | 91e5f17c9c7251a001d98613d8399045e6f47377 (diff) |
indent'd like "x-indent.sh", but with a more complete set of typedefs - see
https://github.com/ThomasDickey/cindent-snapshots/blob/master/scripts/xxx-profile
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/GetActKey.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/src/GetActKey.c b/src/GetActKey.c index cf1278e..d680bb6 100644 --- a/src/GetActKey.c +++ b/src/GetActKey.c @@ -1,5 +1,3 @@ -/*LINTLIBRARY*/ - /*********************************************************** Copyright (c) 1993, Oracle and/or its affiliates. All rights reserved. @@ -75,36 +73,36 @@ in this Software without prior written authorization from The Open Group. #endif #include "IntrinsicI.h" -KeySym XtGetActionKeysym( - XEvent *event, - Modifiers *modifiers_return) +KeySym +XtGetActionKeysym(XEvent *event, Modifiers * modifiers_return) { TMKeyContext tm_context; Modifiers modifiers; KeySym keysym, retval; LOCK_PROCESS; - tm_context= _XtGetPerDisplay(event->xany.display)->tm_context; + tm_context = _XtGetPerDisplay(event->xany.display)->tm_context; + if (event->xany.type != KeyPress && event->xany.type != KeyRelease) { - UNLOCK_PROCESS; - return NoSymbol; + UNLOCK_PROCESS; + return NoSymbol; } if (tm_context != NULL - && event == tm_context->event - && event->xany.serial == tm_context->serial ) { - - if (modifiers_return != NULL) - *modifiers_return = tm_context->modifiers; - retval = tm_context->keysym; - UNLOCK_PROCESS; - return retval; + && event == tm_context->event + && event->xany.serial == tm_context->serial) { + + if (modifiers_return != NULL) + *modifiers_return = tm_context->modifiers; + retval = tm_context->keysym; + UNLOCK_PROCESS; + return retval; } - XtTranslateKeycode( event->xany.display, (KeyCode)event->xkey.keycode, - event->xkey.state, &modifiers, &keysym ); + XtTranslateKeycode(event->xany.display, (KeyCode)event->xkey.keycode, + event->xkey.state, &modifiers, &keysym); if (modifiers_return != NULL) - *modifiers_return = event->xkey.state & modifiers; + *modifiers_return = event->xkey.state & modifiers; UNLOCK_PROCESS; return keysym; |