Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
af1f7cee
Commit
af1f7cee
authored
Aug 27, 2016
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lift XKB*.c to libX11 1.3.4
parent
3e75c816
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
326 additions
and
288 deletions
+326
-288
XKB.c
nx-X11/lib/X11/XKB.c
+12
-12
XKBAlloc.c
nx-X11/lib/X11/XKBAlloc.c
+14
-14
XKBBell.c
nx-X11/lib/X11/XKBBell.c
+9
-10
XKBBind.c
nx-X11/lib/X11/XKBBind.c
+14
-16
XKBCompat.c
nx-X11/lib/X11/XKBCompat.c
+10
-11
XKBCtrls.c
nx-X11/lib/X11/XKBCtrls.c
+18
-18
XKBCvt.c
nx-X11/lib/X11/XKBCvt.c
+14
-14
XKBExtDev.c
nx-X11/lib/X11/XKBExtDev.c
+16
-16
XKBGAlloc.c
nx-X11/lib/X11/XKBGAlloc.c
+21
-21
XKBGeom.c
nx-X11/lib/X11/XKBGeom.c
+48
-22
XKBGetByName.c
nx-X11/lib/X11/XKBGetByName.c
+8
-9
XKBGetMap.c
nx-X11/lib/X11/XKBGetMap.c
+25
-15
XKBList.c
nx-X11/lib/X11/XKBList.c
+9
-10
XKBMAlloc.c
nx-X11/lib/X11/XKBMAlloc.c
+17
-15
XKBMisc.c
nx-X11/lib/X11/XKBMisc.c
+20
-17
XKBNames.c
nx-X11/lib/X11/XKBNames.c
+14
-14
XKBRdBuf.c
nx-X11/lib/X11/XKBRdBuf.c
+11
-11
XKBSetGeom.c
nx-X11/lib/X11/XKBSetGeom.c
+13
-12
XKBSetMap.c
nx-X11/lib/X11/XKBSetMap.c
+9
-9
XKBUse.c
nx-X11/lib/X11/XKBUse.c
+10
-10
XKBleds.c
nx-X11/lib/X11/XKBleds.c
+14
-12
No files found.
nx-X11/lib/X11/XKB.c
View file @
af1f7cee
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -35,7 +35,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -35,7 +35,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
XkbInternAtomFunc
_XkbInternAtomFunc
=
XInternAtom
;
XkbInternAtomFunc
_XkbInternAtomFunc
=
XInternAtom
;
XkbGetAtomNameFunc
_XkbGetAtomNameFunc
=
XGetAtomName
;
XkbGetAtomNameFunc
_XkbGetAtomNameFunc
=
XGetAtomName
;
Bool
Bool
XkbQueryExtension
(
Display
*
dpy
,
XkbQueryExtension
(
Display
*
dpy
,
int
*
opcodeReturn
,
int
*
opcodeReturn
,
int
*
eventBaseReturn
,
int
*
eventBaseReturn
,
...
@@ -58,7 +58,7 @@ XkbQueryExtension( Display *dpy,
...
@@ -58,7 +58,7 @@ XkbQueryExtension( Display *dpy,
return
True
;
return
True
;
}
}
Bool
Bool
XkbLibraryVersion
(
int
*
libMajorRtrn
,
int
*
libMinorRtrn
)
XkbLibraryVersion
(
int
*
libMajorRtrn
,
int
*
libMinorRtrn
)
{
{
int
supported
;
int
supported
;
...
@@ -69,7 +69,7 @@ int supported;
...
@@ -69,7 +69,7 @@ int supported;
supported
=
True
;
supported
=
True
;
else
supported
=
False
;
else
supported
=
False
;
}
}
else
{
else
{
supported
=
True
;
supported
=
True
;
}
}
...
@@ -113,7 +113,7 @@ XkbSelectEvents( Display * dpy,
...
@@ -113,7 +113,7 @@ XkbSelectEvents( Display * dpy,
else
xkbi
->
selected_map_details
=
0
;
else
xkbi
->
selected_map_details
=
0
;
}
}
if
(
affect
&
XkbNewKeyboardNotifyMask
)
{
if
(
affect
&
XkbNewKeyboardNotifyMask
)
{
if
(
selectAll
&
XkbNewKeyboardNotifyMask
)
if
(
selectAll
&
XkbNewKeyboardNotifyMask
)
xkbi
->
selected_nkn_details
=
XkbAllNewKeyboardEventsMask
;
xkbi
->
selected_nkn_details
=
XkbAllNewKeyboardEventsMask
;
else
xkbi
->
selected_nkn_details
=
0
;
else
xkbi
->
selected_nkn_details
=
0
;
if
(
!
(
xkbi
->
xlib_ctrls
&
XkbLC_IgnoreNewKeyboards
))
{
if
(
!
(
xkbi
->
xlib_ctrls
&
XkbLC_IgnoreNewKeyboards
))
{
...
...
nx-X11/lib/X11/XKBAlloc.c
View file @
af1f7cee
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -39,7 +39,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -39,7 +39,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <nx-X11/extensions/XKBproto.h>
#include <nx-X11/extensions/XKBproto.h>
#include "XKBlibint.h"
#include "XKBlibint.h"
#else
#else
#include <stdio.h>
#include <stdio.h>
#include <nx-X11/X.h>
#include <nx-X11/X.h>
...
@@ -157,7 +157,7 @@ XkbNamesPtr names;
...
@@ -157,7 +157,7 @@ XkbNamesPtr names;
if
((
which
&
XkbKeyNamesMask
)
&&
(
names
->
keys
==
NULL
))
{
if
((
which
&
XkbKeyNamesMask
)
&&
(
names
->
keys
==
NULL
))
{
if
((
!
XkbIsLegalKeycode
(
xkb
->
min_key_code
))
||
if
((
!
XkbIsLegalKeycode
(
xkb
->
min_key_code
))
||
(
!
XkbIsLegalKeycode
(
xkb
->
max_key_code
))
||
(
!
XkbIsLegalKeycode
(
xkb
->
max_key_code
))
||
(
xkb
->
max_key_code
<
xkb
->
min_key_code
))
(
xkb
->
max_key_code
<
xkb
->
min_key_code
))
return
BadValue
;
return
BadValue
;
names
->
keys
=
_XkbTypedCalloc
((
xkb
->
max_key_code
+
1
),
XkbKeyNameRec
);
names
->
keys
=
_XkbTypedCalloc
((
xkb
->
max_key_code
+
1
),
XkbKeyNameRec
);
if
(
names
->
keys
==
NULL
)
if
(
names
->
keys
==
NULL
)
...
@@ -217,7 +217,7 @@ XkbNamesPtr names;
...
@@ -217,7 +217,7 @@ XkbNamesPtr names;
return
;
return
;
names
=
xkb
->
names
;
names
=
xkb
->
names
;
if
(
freeMap
)
if
(
freeMap
)
which
=
XkbAllNamesMask
;
which
=
XkbAllNamesMask
;
if
(
which
&
XkbKTLevelNamesMask
)
{
if
(
which
&
XkbKTLevelNamesMask
)
{
XkbClientMapPtr
map
=
xkb
->
map
;
XkbClientMapPtr
map
=
xkb
->
map
;
if
((
map
!=
NULL
)
&&
(
map
->
types
!=
NULL
))
{
if
((
map
!=
NULL
)
&&
(
map
->
types
!=
NULL
))
{
...
@@ -284,7 +284,7 @@ XkbFreeControls(XkbDescPtr xkb,unsigned which,Bool freeMap)
...
@@ -284,7 +284,7 @@ XkbFreeControls(XkbDescPtr xkb,unsigned which,Bool freeMap)
/***===================================================================***/
/***===================================================================***/
Status
Status
XkbAllocIndicatorMaps
(
XkbDescPtr
xkb
)
XkbAllocIndicatorMaps
(
XkbDescPtr
xkb
)
{
{
if
(
xkb
==
NULL
)
if
(
xkb
==
NULL
)
...
@@ -362,7 +362,7 @@ register int i;
...
@@ -362,7 +362,7 @@ register int i;
}
}
if
(
devi
->
num_leds
>=
devi
->
sz_leds
)
{
if
(
devi
->
num_leds
>=
devi
->
sz_leds
)
{
XkbDeviceLedInfoRec
*
prev_leds
=
devi
->
leds
;
XkbDeviceLedInfoRec
*
prev_leds
=
devi
->
leds
;
if
(
devi
->
sz_leds
>
0
)
devi
->
sz_leds
*=
2
;
if
(
devi
->
sz_leds
>
0
)
devi
->
sz_leds
*=
2
;
else
devi
->
sz_leds
=
1
;
else
devi
->
sz_leds
=
1
;
devi
->
leds
=
_XkbTypedRealloc
(
devi
->
leds
,
devi
->
sz_leds
,
devi
->
leds
=
_XkbTypedRealloc
(
devi
->
leds
,
devi
->
sz_leds
,
...
@@ -459,7 +459,7 @@ XkbDeviceInfoPtr devi;
...
@@ -459,7 +459,7 @@ XkbDeviceInfoPtr devi;
}
}
void
void
XkbFreeDeviceInfo
(
XkbDeviceInfoPtr
devi
,
unsigned
which
,
Bool
freeDevI
)
XkbFreeDeviceInfo
(
XkbDeviceInfoPtr
devi
,
unsigned
which
,
Bool
freeDevI
)
{
{
if
(
devi
)
{
if
(
devi
)
{
...
...
nx-X11/lib/X11/XKBBell.c
View file @
af1f7cee
...
@@ -6,24 +6,23 @@ software and its documentation for any purpose and without
...
@@ -6,24 +6,23 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
********************************************************/
/* $XFree86$ */
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#include <config.h>
...
@@ -39,7 +38,7 @@ XkbDeviceBell( Display * dpy,
...
@@ -39,7 +38,7 @@ XkbDeviceBell( Display * dpy,
Window
window
,
Window
window
,
int
deviceID
,
int
deviceID
,
int
bellClass
,
int
bellClass
,
int
bellID
,
int
bellID
,
int
percent
,
int
percent
,
Atom
name
)
Atom
name
)
{
{
...
...
nx-X11/lib/X11/XKBBind.c
View file @
af1f7cee
...
@@ -74,7 +74,7 @@ XkbKeycodeToKeysym(Display *dpy,
...
@@ -74,7 +74,7 @@ XkbKeycodeToKeysym(Display *dpy,
int
level
)
int
level
)
{
{
XkbDescRec
*
xkb
;
XkbDescRec
*
xkb
;
if
(
_XkbUnavailable
(
dpy
))
if
(
_XkbUnavailable
(
dpy
))
return
NoSymbol
;
return
NoSymbol
;
...
@@ -109,7 +109,7 @@ XKeycodeToKeysym(Display *dpy,
...
@@ -109,7 +109,7 @@ XKeycodeToKeysym(Display *dpy,
int
col
)
int
col
)
{
{
XkbDescRec
*
xkb
;
XkbDescRec
*
xkb
;
if
(
_XkbUnavailable
(
dpy
))
if
(
_XkbUnavailable
(
dpy
))
return
_XKeycodeToKeysym
(
dpy
,
kc
,
col
);
return
_XKeycodeToKeysym
(
dpy
,
kc
,
col
);
...
@@ -118,7 +118,7 @@ XKeycodeToKeysym(Display *dpy,
...
@@ -118,7 +118,7 @@ XKeycodeToKeysym(Display *dpy,
xkb
=
dpy
->
xkb_info
->
desc
;
xkb
=
dpy
->
xkb_info
->
desc
;
if
((
kc
<
xkb
->
min_key_code
)
||
(
kc
>
xkb
->
max_key_code
))
if
((
kc
<
xkb
->
min_key_code
)
||
(
kc
>
xkb
->
max_key_code
))
return
NoSymbol
;
return
NoSymbol
;
if
(
col
>
3
)
{
if
(
col
>
3
)
{
int
lastSym
,
tmp
,
nGrp
;
int
lastSym
,
tmp
,
nGrp
;
...
@@ -226,8 +226,8 @@ XLookupKeysym(register XKeyEvent *event, int col)
...
@@ -226,8 +226,8 @@ XLookupKeysym(register XKeyEvent *event, int col)
}
}
/*
/*
* Not a public entry point -- XkbTranslateKey is an obsolete name
* Not a public entry point -- XkbTranslateKey is an obsolete name
* that is preserved here so that functions linked against the old
* that is preserved here so that functions linked against the old
* version will continue to work in a shared library environment.
* version will continue to work in a shared library environment.
*/
*/
int
int
...
@@ -325,10 +325,10 @@ XkbTranslateKeyCode( register XkbDescPtr xkb,
...
@@ -325,10 +325,10 @@ XkbTranslateKeyCode( register XkbDescPtr xkb,
if
(
mods_rtrn
)
{
if
(
mods_rtrn
)
{
*
mods_rtrn
=
type
->
mods
.
mask
&
(
~
preserve
);
*
mods_rtrn
=
type
->
mods
.
mask
&
(
~
preserve
);
/* The Motif VTS doesn't get the help callback called if help
/* The Motif VTS doesn't get the help callback called if help
* is bound to Shift+<whatever>, and it appears as though it
* is bound to Shift+<whatever>, and it appears as though it
* is XkbTranslateKeyCode that is causing the problem. The
* is XkbTranslateKeyCode that is causing the problem. The
* core X version of XTranslateKey always OR's in ShiftMask
* core X version of XTranslateKey always OR's in ShiftMask
* and LockMask for mods_rtrn, so this "fix" keeps this behavior
* and LockMask for mods_rtrn, so this "fix" keeps this behavior
* and solves the VTS problem.
* and solves the VTS problem.
*/
*/
if
((
xkb
->
dpy
)
&&
(
xkb
->
dpy
->
xkb_info
)
&&
if
((
xkb
->
dpy
)
&&
(
xkb
->
dpy
->
xkb_info
)
&&
...
@@ -365,7 +365,6 @@ XkbRefreshKeyboardMapping(register XkbMapNotifyEvent *event)
...
@@ -365,7 +365,6 @@ XkbRefreshKeyboardMapping(register XkbMapNotifyEvent *event)
changes
=
xkbi
->
changes
;
changes
=
xkbi
->
changes
;
else
bzero
(
&
changes
,
sizeof
(
changes
));
else
bzero
(
&
changes
,
sizeof
(
changes
));
XkbNoteMapChanges
(
&
changes
,
event
,
XKB_XLIB_MAP_MASK
);
XkbNoteMapChanges
(
&
changes
,
event
,
XKB_XLIB_MAP_MASK
);
LockDisplay
(
dpy
);
if
((
rtrn
=
XkbGetMapChanges
(
dpy
,
xkbi
->
desc
,
&
changes
))
!=
Success
)
{
if
((
rtrn
=
XkbGetMapChanges
(
dpy
,
xkbi
->
desc
,
&
changes
))
!=
Success
)
{
#ifdef DEBUG
#ifdef DEBUG
fprintf
(
stderr
,
"Internal Error! XkbGetMapChanges failed:
\n
"
);
fprintf
(
stderr
,
"Internal Error! XkbGetMapChanges failed:
\n
"
);
...
@@ -376,7 +375,6 @@ XkbRefreshKeyboardMapping(register XkbMapNotifyEvent *event)
...
@@ -376,7 +375,6 @@ XkbRefreshKeyboardMapping(register XkbMapNotifyEvent *event)
xkbi
->
flags
&=
~
XkbMapPending
;
xkbi
->
flags
&=
~
XkbMapPending
;
bzero
(
&
xkbi
->
changes
,
sizeof
(
XkbMapChangesRec
));
bzero
(
&
xkbi
->
changes
,
sizeof
(
XkbMapChangesRec
));
}
}
UnlockDisplay
(
dpy
);
return
rtrn
;
return
rtrn
;
}
}
return
BadMatch
;
return
BadMatch
;
...
@@ -631,7 +629,7 @@ XkbTranslateKeySym( register Display * dpy,
...
@@ -631,7 +629,7 @@ XkbTranslateKeySym( register Display * dpy,
}
}
if
(
change
)
{
if
(
change
)
{
if
(
n
==
1
)
if
(
n
==
1
)
*
sym_rtrn
=
(
*
xkb
->
cvt
.
MBToKS
)(
xkb
->
cvt
.
MBToKSPriv
,
buffer
,
n
,
0
);
*
sym_rtrn
=
(
*
xkb
->
cvt
.
MBToKS
)(
xkb
->
cvt
.
MBToKSPriv
,
buffer
,
n
,
NULL
);
else
*
sym_rtrn
=
NoSymbol
;
else
*
sym_rtrn
=
NoSymbol
;
}
}
}
}
...
@@ -697,7 +695,7 @@ XLookupString ( register XKeyEvent * event,
...
@@ -697,7 +695,7 @@ XLookupString ( register XKeyEvent * event,
}
}
}
}
}
}
}
}
#ifdef USE_OWN_COMPOSE
#ifdef USE_OWN_COMPOSE
if
(
status
)
{
if
(
status
)
{
...
@@ -710,7 +708,7 @@ XLookupString ( register XKeyEvent * event,
...
@@ -710,7 +708,7 @@ XLookupString ( register XKeyEvent * event,
status
->
compose_ptr
=
NULL
;
status
->
compose_ptr
=
NULL
;
status
->
chars_matched
=
0
;
status
->
chars_matched
=
0
;
}
}
if
(
((
status
->
chars_matched
>
0
)
&&
(
status
->
compose_ptr
!=
NULL
))
||
if
(
((
status
->
chars_matched
>
0
)
&&
(
status
->
compose_ptr
!=
NULL
))
||
XimCompIsComposeKey
(
*
keysym
,
event
->
keycode
,
status
)
)
{
XimCompIsComposeKey
(
*
keysym
,
event
->
keycode
,
status
)
)
{
XimCompRtrn
rtrn
;
XimCompRtrn
rtrn
;
...
@@ -816,7 +814,7 @@ XkbLookupKeyBinding( Display * dpy,
...
@@ -816,7 +814,7 @@ XkbLookupKeyBinding( Display * dpy,
int
nbytes
,
int
nbytes
,
int
*
extra_rtrn
)
int
*
extra_rtrn
)
{
{
register
struct
_XKeytrans
*
p
;
register
struct
_XKeytrans
*
p
;
if
(
extra_rtrn
)
if
(
extra_rtrn
)
*
extra_rtrn
=
0
;
*
extra_rtrn
=
0
;
...
@@ -840,7 +838,7 @@ char
...
@@ -840,7 +838,7 @@ char
XkbToControl
(
char
ch
)
XkbToControl
(
char
ch
)
{
{
register
char
c
=
ch
;
register
char
c
=
ch
;
if
((
c
>=
'@'
&&
c
<
'\177'
)
||
c
==
' '
)
c
&=
0x1F
;
if
((
c
>=
'@'
&&
c
<
'\177'
)
||
c
==
' '
)
c
&=
0x1F
;
else
if
(
c
==
'2'
)
c
=
'\000'
;
else
if
(
c
==
'2'
)
c
=
'\000'
;
else
if
(
c
>=
'3'
&&
c
<=
'7'
)
c
-=
(
'3'
-
'\033'
);
else
if
(
c
>=
'3'
&&
c
<=
'7'
)
c
-=
(
'3'
-
'\033'
);
...
...
nx-X11/lib/X11/XKBCompat.c
View file @
af1f7cee
...
@@ -6,24 +6,23 @@ software and its documentation for any purpose and without
...
@@ -6,24 +6,23 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
********************************************************/
/* $XFree86$ */
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#include <config.h>
...
@@ -43,7 +42,7 @@ _XkbReadGetCompatMapReply( Display * dpy,
...
@@ -43,7 +42,7 @@ _XkbReadGetCompatMapReply( Display * dpy,
register
int
i
;
register
int
i
;
XkbReadBufferRec
buf
;
XkbReadBufferRec
buf
;
if
(
!
_XkbInitReadBuffer
(
dpy
,
&
buf
,(
int
)
rep
->
length
*
4
))
if
(
!
_XkbInitReadBuffer
(
dpy
,
&
buf
,(
int
)
rep
->
length
*
4
))
return
BadAlloc
;
return
BadAlloc
;
if
(
nread_rtrn
)
if
(
nread_rtrn
)
...
@@ -96,7 +95,7 @@ XkbReadBufferRec buf;
...
@@ -96,7 +95,7 @@ XkbReadBufferRec buf;
}
}
}
}
i
=
_XkbFreeReadBuffer
(
&
buf
);
i
=
_XkbFreeReadBuffer
(
&
buf
);
if
(
i
)
if
(
i
)
fprintf
(
stderr
,
"CompatMapReply! Bad length (%d extra bytes)
\n
"
,
i
);
fprintf
(
stderr
,
"CompatMapReply! Bad length (%d extra bytes)
\n
"
,
i
);
if
(
i
||
buf
.
error
)
if
(
i
||
buf
.
error
)
return
BadLength
;
return
BadLength
;
...
...
nx-X11/lib/X11/XKBCtrls.c
View file @
af1f7cee
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -47,10 +47,10 @@ xkbSetControlsReq *req;
...
@@ -47,10 +47,10 @@ xkbSetControlsReq *req;
return
req
;
return
req
;
}
}
Bool
Bool
XkbSetAutoRepeatRate
(
Display
*
dpy
,
XkbSetAutoRepeatRate
(
Display
*
dpy
,
unsigned
int
deviceSpec
,
unsigned
int
deviceSpec
,
unsigned
int
timeout
,
unsigned
int
timeout
,
unsigned
int
interval
)
unsigned
int
interval
)
{
{
register
xkbSetControlsReq
*
req
;
register
xkbSetControlsReq
*
req
;
...
@@ -68,7 +68,7 @@ XkbSetAutoRepeatRate( Display *dpy,
...
@@ -68,7 +68,7 @@ XkbSetAutoRepeatRate( Display *dpy,
return
True
;
return
True
;
}
}
Bool
Bool
XkbGetAutoRepeatRate
(
Display
*
dpy
,
XkbGetAutoRepeatRate
(
Display
*
dpy
,
unsigned
int
deviceSpec
,
unsigned
int
deviceSpec
,
unsigned
int
*
timeoutp
,
unsigned
int
*
timeoutp
,
...
@@ -87,7 +87,7 @@ XkbGetAutoRepeatRate( Display * dpy,
...
@@ -87,7 +87,7 @@ XkbGetAutoRepeatRate( Display * dpy,
req
->
reqType
=
xkbi
->
codes
->
major_opcode
;
req
->
reqType
=
xkbi
->
codes
->
major_opcode
;
req
->
xkbReqType
=
X_kbGetControls
;
req
->
xkbReqType
=
X_kbGetControls
;
req
->
deviceSpec
=
deviceSpec
;
req
->
deviceSpec
=
deviceSpec
;
if
(
!
_XReply
(
dpy
,
(
xReply
*
)
&
rep
,
if
(
!
_XReply
(
dpy
,
(
xReply
*
)
&
rep
,
(
SIZEOF
(
xkbGetControlsReply
)
-
SIZEOF
(
xReply
))
>>
2
,
xFalse
))
{
(
SIZEOF
(
xkbGetControlsReply
)
-
SIZEOF
(
xReply
))
>>
2
,
xFalse
))
{
UnlockDisplay
(
dpy
);
UnlockDisplay
(
dpy
);
SyncHandle
();
SyncHandle
();
...
@@ -171,7 +171,7 @@ XkbChangeEnabledControls( Display * dpy,
...
@@ -171,7 +171,7 @@ XkbChangeEnabledControls( Display * dpy,
return
True
;
return
True
;
}
}
Status
Status
XkbGetControls
(
Display
*
dpy
,
unsigned
long
which
,
XkbDescPtr
xkb
)
XkbGetControls
(
Display
*
dpy
,
unsigned
long
which
,
XkbDescPtr
xkb
)
{
{
register
xkbGetControlsReq
*
req
;
register
xkbGetControlsReq
*
req
;
...
@@ -194,12 +194,12 @@ XkbGetControls(Display *dpy, unsigned long which, XkbDescPtr xkb)
...
@@ -194,12 +194,12 @@ XkbGetControls(Display *dpy, unsigned long which, XkbDescPtr xkb)
UnlockDisplay
(
dpy
);
UnlockDisplay
(
dpy
);
SyncHandle
();
SyncHandle
();
return
BadAlloc
;
return
BadAlloc
;
}
}
}
}
req
->
reqType
=
xkbi
->
codes
->
major_opcode
;
req
->
reqType
=
xkbi
->
codes
->
major_opcode
;
req
->
xkbReqType
=
X_kbGetControls
;
req
->
xkbReqType
=
X_kbGetControls
;
req
->
deviceSpec
=
xkb
->
device_spec
;
req
->
deviceSpec
=
xkb
->
device_spec
;
if
(
!
_XReply
(
dpy
,
(
xReply
*
)
&
rep
,
if
(
!
_XReply
(
dpy
,
(
xReply
*
)
&
rep
,
(
SIZEOF
(
xkbGetControlsReply
)
-
SIZEOF
(
xReply
))
>>
2
,
xFalse
))
{
(
SIZEOF
(
xkbGetControlsReply
)
-
SIZEOF
(
xReply
))
>>
2
,
xFalse
))
{
UnlockDisplay
(
dpy
);
UnlockDisplay
(
dpy
);
SyncHandle
();
SyncHandle
();
...
@@ -260,14 +260,14 @@ XkbGetControls(Display *dpy, unsigned long which, XkbDescPtr xkb)
...
@@ -260,14 +260,14 @@ XkbGetControls(Display *dpy, unsigned long which, XkbDescPtr xkb)
}
}
if
(
which
&
XkbPerKeyRepeatMask
)
{
if
(
which
&
XkbPerKeyRepeatMask
)
{
memcpy
(
ctrls
->
per_key_repeat
,
rep
.
perKeyRepeat
,
memcpy
(
ctrls
->
per_key_repeat
,
rep
.
perKeyRepeat
,
XkbPerKeyBitArraySize
);
XkbPerKeyBitArraySize
);
}
}
UnlockDisplay
(
dpy
);
UnlockDisplay
(
dpy
);
SyncHandle
();
SyncHandle
();
return
Success
;
return
Success
;
}
}
Bool
Bool
XkbSetControls
(
Display
*
dpy
,
unsigned
long
which
,
XkbDescPtr
xkb
)
XkbSetControls
(
Display
*
dpy
,
unsigned
long
which
,
XkbDescPtr
xkb
)
{
{
register
xkbSetControlsReq
*
req
;
register
xkbSetControlsReq
*
req
;
...
...
nx-X11/lib/X11/XKBCvt.c
View file @
af1f7cee
...
@@ -54,7 +54,7 @@ from The Open Group.
...
@@ -54,7 +54,7 @@ from The Open Group.
#define XKB_EXTEND_LOOKUP_STRING
#define XKB_EXTEND_LOOKUP_STRING
#endif
#endif
static
int
static
int
_XkbHandleSpecialSym
(
KeySym
keysym
,
char
*
buffer
,
int
nbytes
,
int
*
extra_rtrn
)
_XkbHandleSpecialSym
(
KeySym
keysym
,
char
*
buffer
,
int
nbytes
,
int
*
extra_rtrn
)
{
{
...
@@ -62,14 +62,14 @@ _XkbHandleSpecialSym(KeySym keysym, char *buffer, int nbytes, int *extra_rtrn)
...
@@ -62,14 +62,14 @@ _XkbHandleSpecialSym(KeySym keysym, char *buffer, int nbytes, int *extra_rtrn)
if
(
!
(((
keysym
>=
XK_BackSpace
)
&&
(
keysym
<=
XK_Clear
))
||
if
(
!
(((
keysym
>=
XK_BackSpace
)
&&
(
keysym
<=
XK_Clear
))
||
(
keysym
==
XK_Return
)
||
(
keysym
==
XK_Escape
)
||
(
keysym
==
XK_Return
)
||
(
keysym
==
XK_Escape
)
||
(
keysym
==
XK_KP_Space
)
||
(
keysym
==
XK_KP_Tab
)
||
(
keysym
==
XK_KP_Space
)
||
(
keysym
==
XK_KP_Tab
)
||
(
keysym
==
XK_KP_Enter
)
||
(
keysym
==
XK_KP_Enter
)
||
((
keysym
>=
XK_KP_Multiply
)
&&
(
keysym
<=
XK_KP_9
))
||
((
keysym
>=
XK_KP_Multiply
)
&&
(
keysym
<=
XK_KP_9
))
||
(
keysym
==
XK_KP_Equal
)
||
(
keysym
==
XK_KP_Equal
)
||
(
keysym
==
XK_Delete
)))
(
keysym
==
XK_Delete
)))
return
0
;
return
0
;
if
(
nbytes
<
1
)
{
if
(
nbytes
<
1
)
{
if
(
extra_rtrn
)
if
(
extra_rtrn
)
*
extra_rtrn
=
1
;
*
extra_rtrn
=
1
;
return
0
;
return
0
;
}
}
...
@@ -83,7 +83,7 @@ _XkbHandleSpecialSym(KeySym keysym, char *buffer, int nbytes, int *extra_rtrn)
...
@@ -83,7 +83,7 @@ _XkbHandleSpecialSym(KeySym keysym, char *buffer, int nbytes, int *extra_rtrn)
}
}
/*ARGSUSED*/
/*ARGSUSED*/
static
int
static
int
_XkbKSToKnownSet
(
XPointer
priv
,
_XkbKSToKnownSet
(
XPointer
priv
,
KeySym
keysym
,
KeySym
keysym
,
char
*
buffer
,
char
*
buffer
,
...
@@ -141,7 +141,7 @@ _XkbKnownSetToKS(XPointer priv,char *buffer,int nbytes,Status *status)
...
@@ -141,7 +141,7 @@ _XkbKnownSetToKS(XPointer priv,char *buffer,int nbytes,Status *status)
return
NoSymbol
;
return
NoSymbol
;
if
(((
buffer
[
0
]
&
0x80
)
==
0
)
&&
(
buffer
[
0
]
>=
32
))
if
(((
buffer
[
0
]
&
0x80
)
==
0
)
&&
(
buffer
[
0
]
>=
32
))
return
buffer
[
0
];
return
buffer
[
0
];
else
if
((
buffer
[
0
]
&
0x7f
)
>=
32
)
{
else
if
((
buffer
[
0
]
&
0x7f
)
>=
32
)
{
XkbToKS
*
map
=
(
XkbToKS
*
)
priv
;
XkbToKS
*
map
=
(
XkbToKS
*
)
priv
;
if
(
map
)
{
if
(
map
)
{
if
(
map
->
map
)
return
map
->
prefix
|
map
->
map
[
buffer
[
0
]
&
0x7f
];
if
(
map
->
map
)
return
map
->
prefix
|
map
->
map
[
buffer
[
0
]
&
0x7f
];
...
@@ -185,8 +185,8 @@ Strcmp(char *str1, char *str2)
...
@@ -185,8 +185,8 @@ Strcmp(char *str1, char *str2)
}
}
#endif
#endif
int
int
_XkbGetConverters
(
char
*
encoding_name
,
XkbConverters
*
cvt_rtrn
)
_XkbGetConverters
(
c
onst
c
har
*
encoding_name
,
XkbConverters
*
cvt_rtrn
)
{
{
if
(
!
cvt_rtrn
)
return
0
;
if
(
!
cvt_rtrn
)
return
0
;
...
@@ -200,14 +200,14 @@ _XkbGetConverters(char *encoding_name, XkbConverters *cvt_rtrn)
...
@@ -200,14 +200,14 @@ _XkbGetConverters(char *encoding_name, XkbConverters *cvt_rtrn)
/***====================================================================***/
/***====================================================================***/
/*
/*
* The function _XkbGetCharset seems to be missnamed as what it seems to
* The function _XkbGetCharset seems to be missnamed as what it seems to
* be used for is to determine the encoding-name for the locale. ???
* be used for is to determine the encoding-name for the locale. ???
*/
*/
#ifdef XKB_EXTEND_LOOKUP_STRING
#ifdef XKB_EXTEND_LOOKUP_STRING
/*
/*
* XKB_EXTEND_LOOKUP_STRING is not used by the SI. It is used by various
* XKB_EXTEND_LOOKUP_STRING is not used by the SI. It is used by various
* X Consortium/X Project Team members, so we leave it in the source as
* X Consortium/X Project Team members, so we leave it in the source as
* an simplify integration by these companies.
* an simplify integration by these companies.
...
@@ -217,7 +217,7 @@ _XkbGetConverters(char *encoding_name, XkbConverters *cvt_rtrn)
...
@@ -217,7 +217,7 @@ _XkbGetConverters(char *encoding_name, XkbConverters *cvt_rtrn)
static
char
*
_XkbKnownLanguages
=
"c=ascii:da,de,en,es,fr,is,it,nl,no,pt,sv=iso8859-1:hu,pl,cs=iso8859-2:eo=iso8859-3:sp=iso8859-5:ar,ara=iso8859-6:el=iso8859-7:he=iso8859-8:tr=iso8859-9:lt,lv=iso8859-13:et,fi=iso8859-15:ru=koi8-r:uk=koi8-u:th,th_TH,th_TH.iso8859-11=iso8859-11:th_TH.TIS620=tis620:hy=armscii-8:vi=tcvn-5712:ka=georgian-academy:be,bg=microsoft-cp1251"
;
static
char
*
_XkbKnownLanguages
=
"c=ascii:da,de,en,es,fr,is,it,nl,no,pt,sv=iso8859-1:hu,pl,cs=iso8859-2:eo=iso8859-3:sp=iso8859-5:ar,ara=iso8859-6:el=iso8859-7:he=iso8859-8:tr=iso8859-9:lt,lv=iso8859-13:et,fi=iso8859-15:ru=koi8-r:uk=koi8-u:th,th_TH,th_TH.iso8859-11=iso8859-11:th_TH.TIS620=tis620:hy=armscii-8:vi=tcvn-5712:ka=georgian-academy:be,bg=microsoft-cp1251"
;
char
*
char
*
_XkbGetCharset
()
_XkbGetCharset
(
void
)
{
{
/*
/*
* PAGE USAGE TUNING: explicitly initialize to move these to data
* PAGE USAGE TUNING: explicitly initialize to move these to data
...
@@ -255,7 +255,7 @@ _XkbGetCharset()
...
@@ -255,7 +255,7 @@ _XkbGetCharset()
return
buf
;
return
buf
;
}
}
}
}
else
{
else
{
charset
=
NULL
;
charset
=
NULL
;
}
}
...
@@ -275,7 +275,7 @@ _XkbGetCharset()
...
@@ -275,7 +275,7 @@ _XkbGetCharset()
#ifndef S_ISREG
#ifndef S_ISREG
# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
#endif
#endif
if
(
(
stat
(
cf
,
&
sbuf
)
==
0
)
&&
S_ISREG
(
sbuf
.
st_mode
)
&&
if
(
(
stat
(
cf
,
&
sbuf
)
==
0
)
&&
S_ISREG
(
sbuf
.
st_mode
)
&&
(
file
=
fopen
(
cf
,
"r"
))
)
{
(
file
=
fopen
(
cf
,
"r"
))
)
{
tmp
=
_XkbAlloc
(
sbuf
.
st_size
+
1
);
tmp
=
_XkbAlloc
(
sbuf
.
st_size
+
1
);
...
@@ -298,7 +298,7 @@ _XkbGetCharset()
...
@@ -298,7 +298,7 @@ _XkbGetCharset()
if
(
(
set
=
strchr
(
tmp
,
'='
))
==
NULL
)
if
(
(
set
=
strchr
(
tmp
,
'='
))
==
NULL
)
break
;
break
;
*
set
++
=
'\0'
;
*
set
++
=
'\0'
;
if
(
(
next
=
strchr
(
set
,
':'
))
!=
NULL
)
if
(
(
next
=
strchr
(
set
,
':'
))
!=
NULL
)
*
next
++
=
'\0'
;
*
next
++
=
'\0'
;
while
(
tmp
&&
*
tmp
)
{
while
(
tmp
&&
*
tmp
)
{
if
(
(
end
=
strchr
(
tmp
,
','
))
!=
NULL
)
if
(
(
end
=
strchr
(
tmp
,
','
))
!=
NULL
)
...
@@ -318,7 +318,7 @@ _XkbGetCharset()
...
@@ -318,7 +318,7 @@ _XkbGetCharset()
}
}
#else
#else
char
*
char
*
_XkbGetCharset
()
_XkbGetCharset
(
void
)
{
{
char
*
tmp
;
char
*
tmp
;
XLCd
lcd
;
XLCd
lcd
;
...
...
nx-X11/lib/X11/XKBExtDev.c
View file @
af1f7cee
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -36,7 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -36,7 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/***====================================================================***/
/***====================================================================***/
extern
void
extern
void
XkbNoteDeviceChanges
(
XkbDeviceChangesPtr
old
,
XkbNoteDeviceChanges
(
XkbDeviceChangesPtr
old
,
XkbExtensionDeviceNotifyEvent
*
new
,
XkbExtensionDeviceNotifyEvent
*
new
,
unsigned
int
wanted
)
unsigned
int
wanted
)
...
@@ -172,7 +172,7 @@ XkbReadBufferRec buf;
...
@@ -172,7 +172,7 @@ XkbReadBufferRec buf;
XkbAction
*
act
;
XkbAction
*
act
;
int
tmp
;
int
tmp
;
if
(
!
_XkbInitReadBuffer
(
dpy
,
&
buf
,(
int
)
rep
->
length
*
4
))
if
(
!
_XkbInitReadBuffer
(
dpy
,
&
buf
,(
int
)
rep
->
length
*
4
))
return
BadAlloc
;
return
BadAlloc
;
if
((
rep
->
totalBtns
>
0
)
&&
(
rep
->
totalBtns
!=
devi
->
num_btns
))
{
if
((
rep
->
totalBtns
>
0
)
&&
(
rep
->
totalBtns
!=
devi
->
num_btns
))
{
...
@@ -203,7 +203,7 @@ int tmp;
...
@@ -203,7 +203,7 @@ int tmp;
}
}
}
}
tmp
=
_XkbFreeReadBuffer
(
&
buf
);
tmp
=
_XkbFreeReadBuffer
(
&
buf
);
if
(
tmp
)
if
(
tmp
)
fprintf
(
stderr
,
"GetDeviceInfo! Bad length (%d extra bytes)
\n
"
,
tmp
);
fprintf
(
stderr
,
"GetDeviceInfo! Bad length (%d extra bytes)
\n
"
,
tmp
);
if
(
tmp
||
buf
.
error
)
if
(
tmp
||
buf
.
error
)
return
BadLength
;
return
BadLength
;
...
@@ -333,7 +333,7 @@ XkbGetDeviceButtonActions( Display * dpy,
...
@@ -333,7 +333,7 @@ XkbGetDeviceButtonActions( Display * dpy,
xkbGetDeviceInfoReply
rep
;
xkbGetDeviceInfoReply
rep
;
Status
status
;
Status
status
;
if
((
dpy
->
flags
&
XlibDisplayNoXkb
)
||
if
((
dpy
->
flags
&
XlibDisplayNoXkb
)
||
(
!
dpy
->
xkb_info
&&
!
XkbUseExtension
(
dpy
,
NULL
,
NULL
)))
(
!
dpy
->
xkb_info
&&
!
XkbUseExtension
(
dpy
,
NULL
,
NULL
)))
return
BadMatch
;
return
BadMatch
;
if
(
!
devi
)
if
(
!
devi
)
...
@@ -374,7 +374,7 @@ XkbGetDeviceLedInfo( Display * dpy,
...
@@ -374,7 +374,7 @@ XkbGetDeviceLedInfo( Display * dpy,
xkbGetDeviceInfoReply
rep
;
xkbGetDeviceInfoReply
rep
;
Status
status
;
Status
status
;
if
((
dpy
->
flags
&
XlibDisplayNoXkb
)
||
if
((
dpy
->
flags
&
XlibDisplayNoXkb
)
||
(
!
dpy
->
xkb_info
&&
!
XkbUseExtension
(
dpy
,
NULL
,
NULL
)))
(
!
dpy
->
xkb_info
&&
!
XkbUseExtension
(
dpy
,
NULL
,
NULL
)))
return
BadMatch
;
return
BadMatch
;
if
(((
which
&
XkbXI_IndicatorsMask
)
==
0
)
||
(
which
&
(
~
XkbXI_IndicatorsMask
)))
if
(((
which
&
XkbXI_IndicatorsMask
)
==
0
)
||
(
which
&
(
~
XkbXI_IndicatorsMask
)))
...
@@ -395,7 +395,7 @@ XkbGetDeviceLedInfo( Display * dpy,
...
@@ -395,7 +395,7 @@ XkbGetDeviceLedInfo( Display * dpy,
UnlockDisplay
(
dpy
);
UnlockDisplay
(
dpy
);
SyncHandle
();
SyncHandle
();
return
BadLength
;
return
BadLength
;
}
}
devi
->
type
=
rep
.
devType
;
devi
->
type
=
rep
.
devType
;
devi
->
supported
=
rep
.
supported
;
devi
->
supported
=
rep
.
supported
;
devi
->
unsupported
=
rep
.
unsupported
;
devi
->
unsupported
=
rep
.
unsupported
;
...
@@ -755,7 +755,7 @@ XkbChangeDeviceInfo( Display * dpy,
...
@@ -755,7 +755,7 @@ XkbChangeDeviceInfo( Display * dpy,
return
ok
;
return
ok
;
}
}
Bool
Bool
XkbSetDeviceLedInfo
(
Display
*
dpy
,
XkbSetDeviceLedInfo
(
Display
*
dpy
,
XkbDeviceInfoPtr
devi
,
XkbDeviceInfoPtr
devi
,
unsigned
ledClass
,
unsigned
ledClass
,
...
@@ -765,7 +765,7 @@ XkbSetDeviceLedInfo( Display * dpy,
...
@@ -765,7 +765,7 @@ XkbSetDeviceLedInfo( Display * dpy,
return
False
;
return
False
;
}
}
Bool
Bool
XkbSetDeviceButtonActions
(
Display
*
dpy
,
XkbSetDeviceButtonActions
(
Display
*
dpy
,
XkbDeviceInfoPtr
devi
,
XkbDeviceInfoPtr
devi
,
unsigned
int
first
,
unsigned
int
first
,
...
...
nx-X11/lib/X11/XKBGAlloc.c
View file @
af1f7cee
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -38,7 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -38,7 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <nx-X11/extensions/XKBgeom.h>
#include <nx-X11/extensions/XKBgeom.h>
#include <nx-X11/extensions/XKBproto.h>
#include <nx-X11/extensions/XKBproto.h>
#else
#else
#include <stdio.h>
#include <stdio.h>
#include <nx-X11/X.h>
#include <nx-X11/X.h>
...
@@ -58,7 +58,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -58,7 +58,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/***====================================================================***/
/***====================================================================***/
static
void
static
void
_XkbFreeGeomLeafElems
(
Bool
freeAll
,
_XkbFreeGeomLeafElems
(
Bool
freeAll
,
int
first
,
int
first
,
int
count
,
int
count
,
...
@@ -72,14 +72,14 @@ _XkbFreeGeomLeafElems( Bool freeAll,
...
@@ -72,14 +72,14 @@ _XkbFreeGeomLeafElems( Bool freeAll,
if
(
*
elems
!=
NULL
)
{
if
(
*
elems
!=
NULL
)
{
_XkbFree
(
*
elems
);
_XkbFree
(
*
elems
);
*
elems
=
NULL
;
*
elems
=
NULL
;
}
}
return
;
return
;
}
}
if
((
first
>=
(
*
num_inout
))
||
(
first
<
0
)
||
(
count
<
1
))
if
((
first
>=
(
*
num_inout
))
||
(
first
<
0
)
||
(
count
<
1
))
return
;
return
;
if
(
first
+
count
>=
(
*
num_inout
))
{
if
(
first
+
count
>=
(
*
num_inout
))
{
/* truncating the array is easy */
/* truncating the array is easy */
(
*
num_inout
)
=
first
;
(
*
num_inout
)
=
first
;
}
}
...
@@ -99,7 +99,7 @@ typedef void (*ContentsClearFunc)(
...
@@ -99,7 +99,7 @@ typedef void (*ContentsClearFunc)(
char
*
/* priv */
char
*
/* priv */
);
);
static
void
static
void
_XkbFreeGeomNonLeafElems
(
Bool
freeAll
,
_XkbFreeGeomNonLeafElems
(
Bool
freeAll
,
int
first
,
int
first
,
int
count
,
int
count
,
...
@@ -187,7 +187,7 @@ XkbFreeGeomKeyAliases( XkbGeometryPtr geom,
...
@@ -187,7 +187,7 @@ XkbFreeGeomKeyAliases( XkbGeometryPtr geom,
int
first
,
int
first
,
int
count
,
int
count
,
Bool
freeAll
)
Bool
freeAll
)
{
{
_XkbFreeGeomLeafElems
(
freeAll
,
first
,
count
,
_XkbFreeGeomLeafElems
(
freeAll
,
first
,
count
,
&
geom
->
num_key_aliases
,
&
geom
->
sz_key_aliases
,
&
geom
->
num_key_aliases
,
&
geom
->
sz_key_aliases
,
(
char
**
)
&
geom
->
key_aliases
,
(
char
**
)
&
geom
->
key_aliases
,
...
@@ -248,7 +248,7 @@ XkbFreeGeomOutlines(XkbShapePtr shape,int first,int count,Bool freeAll)
...
@@ -248,7 +248,7 @@ XkbFreeGeomOutlines(XkbShapePtr shape,int first,int count,Bool freeAll)
&
shape
->
num_outlines
,
&
shape
->
sz_outlines
,
&
shape
->
num_outlines
,
&
shape
->
sz_outlines
,
(
char
**
)
&
shape
->
outlines
,
(
char
**
)
&
shape
->
outlines
,
sizeof
(
XkbOutlineRec
),
_XkbClearOutline
);
sizeof
(
XkbOutlineRec
),
_XkbClearOutline
);
return
;
return
;
}
}
...
@@ -276,7 +276,7 @@ XkbFreeGeomShapes(XkbGeometryPtr geom,int first,int count,Bool freeAll)
...
@@ -276,7 +276,7 @@ XkbFreeGeomShapes(XkbGeometryPtr geom,int first,int count,Bool freeAll)
/***====================================================================***/
/***====================================================================***/
void
void
XkbFreeGeomOverlayKeys
(
XkbOverlayRowPtr
row
,
int
first
,
int
count
,
Bool
freeAll
)
XkbFreeGeomOverlayKeys
(
XkbOverlayRowPtr
row
,
int
first
,
int
count
,
Bool
freeAll
)
{
{
_XkbFreeGeomLeafElems
(
freeAll
,
first
,
count
,
_XkbFreeGeomLeafElems
(
freeAll
,
first
,
count
,
...
@@ -397,7 +397,7 @@ _XkbClearDoodad(char *doodad_in)
...
@@ -397,7 +397,7 @@ _XkbClearDoodad(char *doodad_in)
XkbDoodadPtr
doodad
=
(
XkbDoodadPtr
)
doodad_in
;
XkbDoodadPtr
doodad
=
(
XkbDoodadPtr
)
doodad_in
;
switch
(
doodad
->
any
.
type
)
{
switch
(
doodad
->
any
.
type
)
{
case
XkbTextDoodad
:
case
XkbTextDoodad
:
{
{
if
(
doodad
->
text
.
text
!=
NULL
)
{
if
(
doodad
->
text
.
text
!=
NULL
)
{
_XkbFree
(
doodad
->
text
.
text
);
_XkbFree
(
doodad
->
text
.
text
);
...
@@ -409,7 +409,7 @@ XkbDoodadPtr doodad= (XkbDoodadPtr)doodad_in;
...
@@ -409,7 +409,7 @@ XkbDoodadPtr doodad= (XkbDoodadPtr)doodad_in;
}
}
}
}
break
;
break
;
case
XkbLogoDoodad
:
case
XkbLogoDoodad
:
{
{
if
(
doodad
->
logo
.
logo_name
!=
NULL
)
{
if
(
doodad
->
logo
.
logo_name
!=
NULL
)
{
_XkbFree
(
doodad
->
logo
.
logo_name
);
_XkbFree
(
doodad
->
logo
.
logo_name
);
...
@@ -542,7 +542,7 @@ _XkbGeomAlloc( XPointer * old,
...
@@ -542,7 +542,7 @@ _XkbGeomAlloc( XPointer * old,
#define _XkbAllocOverlayKeys(r,n) _XkbGeomAlloc((XPointer *)&(r)->keys,\
#define _XkbAllocOverlayKeys(r,n) _XkbGeomAlloc((XPointer *)&(r)->keys,\
&(r)->num_keys,&(r)->sz_keys,\
&(r)->num_keys,&(r)->sz_keys,\
(n),sizeof(XkbOverlayKeyRec))
(n),sizeof(XkbOverlayKeyRec))
Status
Status
XkbAllocGeomProps
(
XkbGeometryPtr
geom
,
int
nProps
)
XkbAllocGeomProps
(
XkbGeometryPtr
geom
,
int
nProps
)
{
{
...
@@ -688,7 +688,7 @@ register XkbPropertyPtr prop;
...
@@ -688,7 +688,7 @@ register XkbPropertyPtr prop;
if
(
prop
->
value
)
if
(
prop
->
value
)
strcpy
(
prop
->
value
,
value
);
strcpy
(
prop
->
value
,
value
);
return
prop
;
return
prop
;
}
}
}
}
if
((
geom
->
num_properties
>=
geom
->
sz_properties
)
&&
if
((
geom
->
num_properties
>=
geom
->
sz_properties
)
&&
(
_XkbAllocProps
(
geom
,
1
)
!=
Success
))
{
(
_XkbAllocProps
(
geom
,
1
)
!=
Success
))
{
...
@@ -945,7 +945,7 @@ Bool found;
...
@@ -945,7 +945,7 @@ Bool found;
}
}
}
}
if
(
!
found
)
if
(
!
found
)
return
NULL
;
return
NULL
;
if
((
row
->
num_keys
>=
row
->
sz_keys
)
&&
(
_XkbAllocOverlayKeys
(
row
,
1
)
!=
Success
))
if
((
row
->
num_keys
>=
row
->
sz_keys
)
&&
(
_XkbAllocOverlayKeys
(
row
,
1
)
!=
Success
))
return
NULL
;
return
NULL
;
key
=
&
row
->
keys
[
row
->
num_keys
];
key
=
&
row
->
keys
[
row
->
num_keys
];
...
...
nx-X11/lib/X11/XKBGeom.c
View file @
af1f7cee
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -71,6 +71,9 @@ XkbPointPtr pt;
...
@@ -71,6 +71,9 @@ XkbPointPtr pt;
for
(
pt
=
outline
->
points
,
p
=
0
;
p
<
outline
->
num_points
;
p
++
,
pt
++
)
{
for
(
pt
=
outline
->
points
,
p
=
0
;
p
<
outline
->
num_points
;
p
++
,
pt
++
)
{
_XkbCheckBounds
(
&
shape
->
bounds
,
pt
->
x
,
pt
->
y
);
_XkbCheckBounds
(
&
shape
->
bounds
,
pt
->
x
,
pt
->
y
);
}
}
if
(
outline
->
num_points
<
2
)
{
_XkbCheckBounds
(
&
shape
->
bounds
,
0
,
0
);
}
}
}
return
True
;
return
True
;
}
}
...
@@ -248,9 +251,15 @@ Status rtrn;
...
@@ -248,9 +251,15 @@ Status rtrn;
char
*
name
,
*
value
;
char
*
name
,
*
value
;
ok
=
True
;
ok
=
True
;
for
(
i
=
0
;(
i
<
rep
->
nProperties
)
&&
ok
;
i
++
)
{
for
(
i
=
0
;(
i
<
rep
->
nProperties
)
&&
ok
;
i
++
)
{
name
=
NULL
;
value
=
NULL
;
ok
=
_XkbGetReadBufferCountedString
(
buf
,
&
name
)
&&
ok
;
ok
=
_XkbGetReadBufferCountedString
(
buf
,
&
name
)
&&
ok
;
ok
=
_XkbGetReadBufferCountedString
(
buf
,
&
value
)
&&
ok
;
ok
=
_XkbGetReadBufferCountedString
(
buf
,
&
value
)
&&
ok
;
ok
=
ok
&&
(
XkbAddGeomProperty
(
geom
,
name
,
value
)
!=
NULL
);
ok
=
ok
&&
(
XkbAddGeomProperty
(
geom
,
name
,
value
)
!=
NULL
);
if
(
name
)
_XkbFree
(
name
);
if
(
value
)
_XkbFree
(
value
);
}
}
if
(
ok
)
rtrn
=
Success
;
if
(
ok
)
rtrn
=
Success
;
else
rtrn
=
BadLength
;
else
rtrn
=
BadLength
;
...
@@ -293,10 +302,15 @@ Status rtrn;
...
@@ -293,10 +302,15 @@ Status rtrn;
register
int
i
;
register
int
i
;
char
*
spec
;
char
*
spec
;
for
(
i
=
0
;
i
<
rep
->
nColors
;
i
++
)
{
for
(
i
=
0
;
i
<
rep
->
nColors
;
i
++
)
{
spec
=
NULL
;
if
(
!
_XkbGetReadBufferCountedString
(
buf
,
&
spec
))
if
(
!
_XkbGetReadBufferCountedString
(
buf
,
&
spec
))
return
BadLength
;
rtrn
=
BadLength
;
if
(
XkbAddGeomColor
(
geom
,
spec
,
geom
->
num_colors
)
==
NULL
)
else
if
(
XkbAddGeomColor
(
geom
,
spec
,
geom
->
num_colors
)
==
NULL
)
return
BadAlloc
;
rtrn
=
BadAlloc
;
if
(
spec
)
_XkbFree
(
spec
);
if
(
rtrn
!=
Success
)
return
rtrn
;
}
}
return
Success
;
return
Success
;
}
}
...
@@ -602,7 +616,7 @@ XkbGeometryPtr geom;
...
@@ -602,7 +616,7 @@ XkbGeometryPtr geom;
status
=
_XkbReadGeomKeyAliases
(
&
buf
,
geom
,
rep
);
status
=
_XkbReadGeomKeyAliases
(
&
buf
,
geom
,
rep
);
left
=
_XkbFreeReadBuffer
(
&
buf
);
left
=
_XkbFreeReadBuffer
(
&
buf
);
if
((
status
!=
Success
)
||
left
||
buf
.
error
)
{
if
((
status
!=
Success
)
||
left
||
buf
.
error
)
{
if
(
status
==
Success
)
if
(
status
==
Success
)
status
=
BadLength
;
status
=
BadLength
;
XkbFreeGeometry
(
geom
,
XkbGeomAllMask
,
True
);
XkbFreeGeometry
(
geom
,
XkbGeomAllMask
,
True
);
xkb
->
geom
=
NULL
;
xkb
->
geom
=
NULL
;
...
@@ -625,21 +639,27 @@ XkbGetGeometry(Display *dpy,XkbDescPtr xkb)
...
@@ -625,21 +639,27 @@ XkbGetGeometry(Display *dpy,XkbDescPtr xkb)
{
{
xkbGetGeometryReq
*
req
;
xkbGetGeometryReq
*
req
;
xkbGetGeometryReply
rep
;
xkbGetGeometryReply
rep
;
Status
status
;
if
(
(
!
xkb
)
||
(
dpy
->
flags
&
XlibDisplayNoXkb
)
||
if
(
(
!
xkb
)
||
(
dpy
->
flags
&
XlibDisplayNoXkb
)
||
(
!
dpy
->
xkb_info
&&
!
XkbUseExtension
(
dpy
,
NULL
,
NULL
)))
(
!
dpy
->
xkb_info
&&
!
XkbUseExtension
(
dpy
,
NULL
,
NULL
)))
return
BadAccess
;
return
BadAccess
;
LockDisplay
(
dpy
);
GetReq
(
kbGetGeometry
,
req
);
GetReq
(
kbGetGeometry
,
req
);
req
->
reqType
=
dpy
->
xkb_info
->
codes
->
major_opcode
;
req
->
reqType
=
dpy
->
xkb_info
->
codes
->
major_opcode
;
req
->
xkbReqType
=
X_kbGetGeometry
;
req
->
xkbReqType
=
X_kbGetGeometry
;
req
->
deviceSpec
=
xkb
->
device_spec
;
req
->
deviceSpec
=
xkb
->
device_spec
;
req
->
name
=
None
;
req
->
name
=
None
;
if
(
!
_XReply
(
dpy
,
(
xReply
*
)
&
rep
,
0
,
xFalse
))
if
(
!
_XReply
(
dpy
,
(
xReply
*
)
&
rep
,
0
,
xFalse
))
return
BadImplementation
;
status
=
BadImplementation
;
if
(
!
rep
.
found
)
else
if
(
!
rep
.
found
)
return
BadName
;
status
=
BadName
;
return
_XkbReadGetGeometryReply
(
dpy
,
&
rep
,
xkb
,
NULL
);
else
status
=
_XkbReadGetGeometryReply
(
dpy
,
&
rep
,
xkb
,
NULL
);
UnlockDisplay
(
dpy
);
SyncHandle
();
return
status
;
}
}
Status
Status
...
@@ -647,20 +667,26 @@ XkbGetNamedGeometry(Display *dpy,XkbDescPtr xkb,Atom name)
...
@@ -647,20 +667,26 @@ XkbGetNamedGeometry(Display *dpy,XkbDescPtr xkb,Atom name)
{
{
xkbGetGeometryReq
*
req
;
xkbGetGeometryReq
*
req
;
xkbGetGeometryReply
rep
;
xkbGetGeometryReply
rep
;
Status
status
;
if
(
(
name
==
None
)
||
(
dpy
->
flags
&
XlibDisplayNoXkb
)
||
if
(
(
name
==
None
)
||
(
dpy
->
flags
&
XlibDisplayNoXkb
)
||
(
!
dpy
->
xkb_info
&&
!
XkbUseExtension
(
dpy
,
NULL
,
NULL
))
)
(
!
dpy
->
xkb_info
&&
!
XkbUseExtension
(
dpy
,
NULL
,
NULL
))
)
return
BadAccess
;
return
BadAccess
;
LockDisplay
(
dpy
);
GetReq
(
kbGetGeometry
,
req
);
GetReq
(
kbGetGeometry
,
req
);
req
->
reqType
=
dpy
->
xkb_info
->
codes
->
major_opcode
;
req
->
reqType
=
dpy
->
xkb_info
->
codes
->
major_opcode
;
req
->
xkbReqType
=
X_kbGetGeometry
;
req
->
xkbReqType
=
X_kbGetGeometry
;
req
->
deviceSpec
=
xkb
->
device_spec
;
req
->
deviceSpec
=
xkb
->
device_spec
;
req
->
name
=
(
CARD32
)
name
;
req
->
name
=
(
CARD32
)
name
;
if
((
!
_XReply
(
dpy
,
(
xReply
*
)
&
rep
,
0
,
xFalse
))
||
(
!
rep
.
found
))
if
((
!
_XReply
(
dpy
,
(
xReply
*
)
&
rep
,
0
,
xFalse
))
||
(
!
rep
.
found
))
return
BadImplementation
;
status
=
BadImplementation
;
if
(
!
rep
.
found
)
else
if
(
!
rep
.
found
)
return
BadName
;
status
=
BadName
;
return
_XkbReadGetGeometryReply
(
dpy
,
&
rep
,
xkb
,
NULL
);
else
status
=
_XkbReadGetGeometryReply
(
dpy
,
&
rep
,
xkb
,
NULL
);
UnlockDisplay
(
dpy
);
SyncHandle
();
return
status
;
}
}
nx-X11/lib/X11/XKBGetByName.c
View file @
af1f7cee
...
@@ -6,24 +6,23 @@ software and its documentation for any purpose and without
...
@@ -6,24 +6,23 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
********************************************************/
/* $XFree86$ */
#define NEED_MAP_READERS
#define NEED_MAP_READERS
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
...
...
nx-X11/lib/X11/XKBGetMap.c
View file @
af1f7cee
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -104,7 +104,7 @@ XkbKeyTypePtr type;
...
@@ -104,7 +104,7 @@ XkbKeyTypePtr type;
type
->
num_levels
=
desc
->
numLevels
;
type
->
num_levels
=
desc
->
numLevels
;
type
->
map_count
=
desc
->
nMapEntries
;
type
->
map_count
=
desc
->
nMapEntries
;
if
(
desc
->
nMapEntries
>
0
)
{
if
(
desc
->
nMapEntries
>
0
)
{
register
xkbKTMapEntryWireDesc
*
wire
;
register
xkbKTMapEntryWireDesc
*
wire
;
register
XkbKTMapEntryPtr
entry
;
register
XkbKTMapEntryPtr
entry
;
register
int
size
;
register
int
size
;
...
@@ -122,7 +122,7 @@ XkbKeyTypePtr type;
...
@@ -122,7 +122,7 @@ XkbKeyTypePtr type;
}
}
if
(
desc
->
preserve
)
{
if
(
desc
->
preserve
)
{
register
xkbModsWireDesc
*
pwire
;
register
xkbModsWireDesc
*
pwire
;
register
XkbModsPtr
preserve
;
register
XkbModsPtr
preserve
;
register
int
sz
;
register
int
sz
;
...
@@ -515,7 +515,7 @@ _XkbHandleGetMapReply(Display *dpy,XkbDescPtr xkb)
...
@@ -515,7 +515,7 @@ _XkbHandleGetMapReply(Display *dpy,XkbDescPtr xkb)
xkbGetMapReply
rep
;
xkbGetMapReply
rep
;
if
(
!
_XReply
(
dpy
,
(
xReply
*
)
&
rep
,
if
(
!
_XReply
(
dpy
,
(
xReply
*
)
&
rep
,
(
(
SIZEOF
(
xkbGetMapReply
)
-
SIZEOF
(
xGenericReply
))
>>
2
),
(
(
SIZEOF
(
xkbGetMapReply
)
-
SIZEOF
(
xGenericReply
))
>>
2
),
xFalse
))
{
xFalse
))
{
return
BadImplementation
;
return
BadImplementation
;
}
}
...
@@ -714,7 +714,10 @@ XkbGetKeyExplicitComponents( Display * dpy,
...
@@ -714,7 +714,10 @@ XkbGetKeyExplicitComponents( Display * dpy,
if
((
num
>
0
)
&&
(
first
>=
xkb
->
min_key_code
)
&&
(
first
+
num
<=
xkb
->
max_key_code
))
if
((
num
>
0
)
&&
(
first
>=
xkb
->
min_key_code
)
&&
(
first
+
num
<=
xkb
->
max_key_code
))
bzero
(
&
xkb
->
server
->
explicit
[
first
],
num
);
bzero
(
&
xkb
->
server
->
explicit
[
first
],
num
);
}
}
status
=
_XkbHandleGetMapReply
(
dpy
,
xkb
);
if
(
xkb
)
status
=
_XkbHandleGetMapReply
(
dpy
,
xkb
);
else
status
=
BadMatch
;
UnlockDisplay
(
dpy
);
UnlockDisplay
(
dpy
);
SyncHandle
();
SyncHandle
();
...
@@ -743,7 +746,10 @@ XkbGetKeyModifierMap(Display *dpy,unsigned first,unsigned num,XkbDescPtr xkb)
...
@@ -743,7 +746,10 @@ XkbGetKeyModifierMap(Display *dpy,unsigned first,unsigned num,XkbDescPtr xkb)
if
((
num
>
0
)
&&
(
first
>=
xkb
->
min_key_code
)
&&
(
first
+
num
<=
xkb
->
max_key_code
))
if
((
num
>
0
)
&&
(
first
>=
xkb
->
min_key_code
)
&&
(
first
+
num
<=
xkb
->
max_key_code
))
bzero
(
&
xkb
->
map
->
modmap
[
first
],
num
);
bzero
(
&
xkb
->
map
->
modmap
[
first
],
num
);
}
}
status
=
_XkbHandleGetMapReply
(
dpy
,
xkb
);
if
(
xkb
)
status
=
_XkbHandleGetMapReply
(
dpy
,
xkb
);
else
status
=
BadMatch
;
UnlockDisplay
(
dpy
);
UnlockDisplay
(
dpy
);
SyncHandle
();
SyncHandle
();
...
@@ -772,7 +778,11 @@ XkbGetKeyVirtualModMap(Display *dpy,unsigned first,unsigned num,XkbDescPtr xkb)
...
@@ -772,7 +778,11 @@ XkbGetKeyVirtualModMap(Display *dpy,unsigned first,unsigned num,XkbDescPtr xkb)
if
((
num
>
0
)
&&
(
first
>=
xkb
->
min_key_code
)
&&
(
first
+
num
<=
xkb
->
max_key_code
))
if
((
num
>
0
)
&&
(
first
>=
xkb
->
min_key_code
)
&&
(
first
+
num
<=
xkb
->
max_key_code
))
bzero
(
&
xkb
->
server
->
vmodmap
[
first
],
num
*
sizeof
(
unsigned
short
));
bzero
(
&
xkb
->
server
->
vmodmap
[
first
],
num
*
sizeof
(
unsigned
short
));
}
}
status
=
_XkbHandleGetMapReply
(
dpy
,
xkb
);
if
(
xkb
)
status
=
_XkbHandleGetMapReply
(
dpy
,
xkb
);
else
status
=
BadMatch
;
UnlockDisplay
(
dpy
);
UnlockDisplay
(
dpy
);
SyncHandle
();
SyncHandle
();
...
@@ -809,8 +819,8 @@ XkbGetMapChanges(Display *dpy,XkbDescPtr xkb,XkbMapChangesPtr changes)
...
@@ -809,8 +819,8 @@ XkbGetMapChanges(Display *dpy,XkbDescPtr xkb,XkbMapChangesPtr changes)
req
->
firstVModMapKey
=
changes
->
first_vmodmap_key
;
req
->
firstVModMapKey
=
changes
->
first_vmodmap_key
;
req
->
nVModMapKeys
=
changes
->
num_vmodmap_keys
;
req
->
nVModMapKeys
=
changes
->
num_vmodmap_keys
;
status
=
_XkbHandleGetMapReply
(
dpy
,
xkb
);
status
=
_XkbHandleGetMapReply
(
dpy
,
xkb
);
SyncHandle
();
UnlockDisplay
(
dpy
);
UnlockDisplay
(
dpy
);
SyncHandle
();
return
status
;
return
status
;
}
}
UnlockDisplay
(
dpy
);
UnlockDisplay
(
dpy
);
...
...
nx-X11/lib/X11/XKBList.c
View file @
af1f7cee
...
@@ -6,24 +6,23 @@ software and its documentation for any purpose and without
...
@@ -6,24 +6,23 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
********************************************************/
/* $XFree86$ */
#define NEED_MAP_READERS
#define NEED_MAP_READERS
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
...
@@ -185,7 +184,7 @@ int extraLen,len,mapLen,codesLen,typesLen,compatLen,symsLen,geomLen;
...
@@ -185,7 +184,7 @@ int extraLen,len,mapLen,codesLen,typesLen,compatLen,symsLen,geomLen;
}
}
if
(
_XkbInitReadBuffer
(
dpy
,
&
buf
,
extraLen
))
{
if
(
_XkbInitReadBuffer
(
dpy
,
&
buf
,
extraLen
))
{
Status
status
;
Status
status
;
status
=
Success
;
status
=
Success
;
list
=
_XkbTypedCalloc
(
1
,
XkbComponentListRec
);
list
=
_XkbTypedCalloc
(
1
,
XkbComponentListRec
);
if
(
!
list
)
{
if
(
!
list
)
{
...
...
nx-X11/lib/X11/XKBMAlloc.c
View file @
af1f7cee
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -38,7 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -38,7 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <nx-X11/keysym.h>
#include <nx-X11/keysym.h>
#include "XKBlibint.h"
#include "XKBlibint.h"
#else
#else
#include <stdio.h>
#include <stdio.h>
#include <nx-X11/X.h>
#include <nx-X11/X.h>
...
@@ -98,7 +98,7 @@ fprintf(stderr,"bad keycode (%d,%d) in XkbAllocClientMap\n",
...
@@ -98,7 +98,7 @@ fprintf(stderr,"bad keycode (%d,%d) in XkbAllocClientMap\n",
return
BadAlloc
;
return
BadAlloc
;
}
}
map
->
size_types
=
nTotalTypes
;
map
->
size_types
=
nTotalTypes
;
bzero
(
&
map
->
types
[
map
->
num_types
],
bzero
(
&
map
->
types
[
map
->
num_types
],
((
map
->
size_types
-
map
->
num_types
)
*
sizeof
(
XkbKeyTypeRec
)));
((
map
->
size_types
-
map
->
num_types
)
*
sizeof
(
XkbKeyTypeRec
)));
}
}
}
}
...
@@ -191,7 +191,7 @@ XkbServerMapPtr map;
...
@@ -191,7 +191,7 @@ XkbServerMapPtr map;
return
BadAlloc
;
return
BadAlloc
;
}
}
map
->
size_acts
=
need
;
map
->
size_acts
=
need
;
bzero
(
&
map
->
acts
[
map
->
num_acts
],
bzero
(
&
map
->
acts
[
map
->
num_acts
],
((
map
->
size_acts
-
map
->
num_acts
)
*
sizeof
(
XkbAction
)));
((
map
->
size_acts
-
map
->
num_acts
)
*
sizeof
(
XkbAction
)));
}
}
if
(
map
->
key_acts
==
NULL
)
{
if
(
map
->
key_acts
==
NULL
)
{
...
@@ -313,6 +313,8 @@ XkbClientMapPtr map;
...
@@ -313,6 +313,8 @@ XkbClientMapPtr map;
tmp
=
XkbNumRequiredTypes
+
1
;
tmp
=
XkbNumRequiredTypes
+
1
;
if
(
XkbAllocClientMap
(
xkb
,
XkbKeyTypesMask
,
tmp
)
!=
Success
)
if
(
XkbAllocClientMap
(
xkb
,
XkbKeyTypesMask
,
tmp
)
!=
Success
)
return
NULL
;
return
NULL
;
if
(
!
map
)
map
=
xkb
->
map
;
tmp
=
0
;
tmp
=
0
;
if
(
map
->
num_types
<=
XkbKeypadIndex
)
if
(
map
->
num_types
<=
XkbKeypadIndex
)
tmp
|=
XkbKeypadMask
;
tmp
|=
XkbKeypadMask
;
...
@@ -401,7 +403,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys;
...
@@ -401,7 +403,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys;
if
((
map_count
>
type
->
map_count
)
||
(
type
->
map
==
NULL
))
if
((
map_count
>
type
->
map_count
)
||
(
type
->
map
==
NULL
))
type
->
map
=
_XkbTypedRealloc
(
type
->
map
,
map_count
,
XkbKTMapEntryRec
);
type
->
map
=
_XkbTypedRealloc
(
type
->
map
,
map_count
,
XkbKTMapEntryRec
);
if
(
!
type
->
map
)
{
if
(
!
type
->
map
)
{
if
(
prev_map
)
if
(
prev_map
)
_XkbFree
(
prev_map
);
_XkbFree
(
prev_map
);
return
BadAlloc
;
return
BadAlloc
;
}
}
...
@@ -413,7 +415,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys;
...
@@ -413,7 +415,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys;
XkbModsRec
);
XkbModsRec
);
}
}
if
(
!
type
->
preserve
)
{
if
(
!
type
->
preserve
)
{
if
(
prev_preserve
)
if
(
prev_preserve
)
_XkbFree
(
prev_preserve
);
_XkbFree
(
prev_preserve
);
return
BadAlloc
;
return
BadAlloc
;
}
}
...
@@ -430,7 +432,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys;
...
@@ -430,7 +432,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys;
type
->
level_names
=
_XkbTypedRealloc
(
type
->
level_names
,
new_num_lvls
,
Atom
);
type
->
level_names
=
_XkbTypedRealloc
(
type
->
level_names
,
new_num_lvls
,
Atom
);
if
(
!
type
->
level_names
)
{
if
(
!
type
->
level_names
)
{
if
(
prev_level_names
)
if
(
prev_level_names
)
_XkbFree
(
prev_level_names
);
_XkbFree
(
prev_level_names
);
return
BadAlloc
;
return
BadAlloc
;
}
}
...
@@ -449,7 +451,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys;
...
@@ -449,7 +451,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys;
* might have to be enlarged.
* might have to be enlarged.
* If the key type decreased in size:
* If the key type decreased in size:
* - keys that have a group width > the old width don't have to be
* - keys that have a group width > the old width don't have to be
* resized (because they must have some other wider type associated
* resized (because they must have some other wider type associated
* with some group).
* with some group).
* + keys that have a group width == the old width might have to be
* + keys that have a group width == the old width might have to be
* shrunk.
* shrunk.
...
...
nx-X11/lib/X11/XKBMisc.c
View file @
af1f7cee
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -38,7 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -38,7 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <nx-X11/keysym.h>
#include <nx-X11/keysym.h>
#include "XKBlibint.h"
#include "XKBlibint.h"
#else
#else
#include <stdio.h>
#include <stdio.h>
#include <nx-X11/X.h>
#include <nx-X11/X.h>
...
@@ -54,11 +54,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -54,11 +54,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/***====================================================================***/
/***====================================================================***/
#define mapSize(m) (sizeof(m)/sizeof(XkbKTMapEntryRec))
#define mapSize(m) (sizeof(m)/sizeof(XkbKTMapEntryRec))
static
XkbKTMapEntryRec
map2Level
[]
=
{
static
XkbKTMapEntryRec
map2Level
[]
=
{
{
True
,
ShiftMask
,
{
1
,
ShiftMask
,
0
}
}
{
True
,
ShiftMask
,
{
1
,
ShiftMask
,
0
}
}
};
};
static
XkbKTMapEntryRec
mapAlpha
[]
=
{
static
XkbKTMapEntryRec
mapAlpha
[]
=
{
{
True
,
ShiftMask
,
{
1
,
ShiftMask
,
0
}
},
{
True
,
ShiftMask
,
{
1
,
ShiftMask
,
0
}
},
{
True
,
LockMask
,
{
0
,
LockMask
,
0
}
}
{
True
,
LockMask
,
{
0
,
LockMask
,
0
}
}
};
};
...
@@ -69,25 +69,25 @@ static XkbModsRec preAlpha[]= {
...
@@ -69,25 +69,25 @@ static XkbModsRec preAlpha[]= {
};
};
#define NL_VMOD_MASK 0
#define NL_VMOD_MASK 0
static
XkbKTMapEntryRec
mapKeypad
[]
=
{
static
XkbKTMapEntryRec
mapKeypad
[]
=
{
{
True
,
ShiftMask
,
{
1
,
ShiftMask
,
0
}
},
{
True
,
ShiftMask
,
{
1
,
ShiftMask
,
0
}
},
{
False
,
0
,
{
1
,
0
,
NL_VMOD_MASK
}
}
{
False
,
0
,
{
1
,
0
,
NL_VMOD_MASK
}
}
};
};
static
XkbKeyTypeRec
canonicalTypes
[
XkbNumRequiredTypes
]
=
{
static
XkbKeyTypeRec
canonicalTypes
[
XkbNumRequiredTypes
]
=
{
{
{
0
,
0
,
0
},
{
{
0
,
0
,
0
},
1
,
/* num_levels */
1
,
/* num_levels */
0
,
/* map_count */
0
,
/* map_count */
NULL
,
NULL
,
NULL
,
NULL
,
None
,
NULL
None
,
NULL
},
},
{
{
ShiftMask
,
ShiftMask
,
0
},
{
{
ShiftMask
,
ShiftMask
,
0
},
2
,
/* num_levels */
2
,
/* num_levels */
mapSize
(
map2Level
),
/* map_count */
mapSize
(
map2Level
),
/* map_count */
map2Level
,
NULL
,
map2Level
,
NULL
,
None
,
NULL
None
,
NULL
},
},
{
{
ShiftMask
|
LockMask
,
ShiftMask
|
LockMask
,
0
},
{
{
ShiftMask
|
LockMask
,
ShiftMask
|
LockMask
,
0
},
2
,
/* num_levels */
2
,
/* num_levels */
mapSize
(
mapAlpha
),
/* map_count */
mapSize
(
mapAlpha
),
/* map_count */
mapAlpha
,
preAlpha
,
mapAlpha
,
preAlpha
,
...
@@ -421,7 +421,7 @@ XkbApplyCompatMapToKey(XkbDescPtr xkb,KeyCode key,XkbChangesPtr changes)
...
@@ -421,7 +421,7 @@ XkbApplyCompatMapToKey(XkbDescPtr xkb,KeyCode key,XkbChangesPtr changes)
{
{
KeySym
*
syms
;
KeySym
*
syms
;
unsigned
char
explicit
,
mods
;
unsigned
char
explicit
,
mods
;
XkbSymInterpretPtr
*
interps
,
ibuf
[
IBUF_SIZE
];
XkbSymInterpretPtr
*
interps
,
ibuf
[
IBUF_SIZE
];
int
n
,
nSyms
,
found
;
int
n
,
nSyms
,
found
;
unsigned
changed
,
tmp
;
unsigned
changed
,
tmp
;
...
@@ -474,8 +474,11 @@ unsigned changed,tmp;
...
@@ -474,8 +474,11 @@ unsigned changed,tmp;
unsigned
int
new_vmodmask
;
unsigned
int
new_vmodmask
;
changed
|=
XkbKeyActionsMask
;
changed
|=
XkbKeyActionsMask
;
pActs
=
XkbResizeKeyActions
(
xkb
,
key
,
nSyms
);
pActs
=
XkbResizeKeyActions
(
xkb
,
key
,
nSyms
);
if
(
!
pActs
)
if
(
!
pActs
)
{
if
(
nSyms
>
IBUF_SIZE
)
Xfree
(
interps
);
return
False
;
return
False
;
}
new_vmodmask
=
0
;
new_vmodmask
=
0
;
for
(
n
=
0
;
n
<
nSyms
;
n
++
)
{
for
(
n
=
0
;
n
<
nSyms
;
n
++
)
{
if
(
interps
[
n
])
{
if
(
interps
[
n
])
{
...
...
nx-X11/lib/X11/XKBNames.c
View file @
af1f7cee
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -358,7 +358,7 @@ XkbSetNames( Display * dpy,
...
@@ -358,7 +358,7 @@ XkbSetNames( Display * dpy,
}
}
}
}
}
}
nVMods
=
nLEDs
=
nRG
=
nKA
=
nAtoms
=
nGroups
=
0
;
nVMods
=
nLEDs
=
nRG
=
nKA
=
nAtoms
=
nGroups
=
0
;
LockDisplay
(
dpy
);
LockDisplay
(
dpy
);
xkbi
=
dpy
->
xkb_info
;
xkbi
=
dpy
->
xkb_info
;
...
@@ -403,7 +403,7 @@ XkbSetNames( Display * dpy,
...
@@ -403,7 +403,7 @@ XkbSetNames( Display * dpy,
else
req
->
indicators
=
leds
=
0
;
else
req
->
indicators
=
leds
=
0
;
if
(
which
&
XkbVirtualModNamesMask
)
{
if
(
which
&
XkbVirtualModNamesMask
)
{
vmods
=
req
->
virtualMods
=
(
CARD16
)
vmods
=
req
->
virtualMods
=
(
CARD16
)
_XkbCountAtoms
(
names
->
vmods
,
XkbNumVirtualMods
,
&
nVMods
);
_XkbCountAtoms
(
names
->
vmods
,
XkbNumVirtualMods
,
&
nVMods
);
if
(
nVMods
>
0
)
if
(
nVMods
>
0
)
nAtoms
+=
nVMods
;
nAtoms
+=
nVMods
;
...
@@ -531,7 +531,7 @@ XkbChangeNames(Display *dpy,XkbDescPtr xkb,XkbNameChangesPtr changes)
...
@@ -531,7 +531,7 @@ XkbChangeNames(Display *dpy,XkbDescPtr xkb,XkbNameChangesPtr changes)
firstLvlType
=
changes
->
first_lvl
;;
firstLvlType
=
changes
->
first_lvl
;;
nLvlTypes
=
changes
->
num_lvls
;
nLvlTypes
=
changes
->
num_lvls
;
if
(
which
&
XkbKeyTypeNamesMask
)
{
if
(
which
&
XkbKeyTypeNamesMask
)
{
if
(
nTypes
<
1
)
if
(
nTypes
<
1
)
which
&=
~
XkbKeyTypeNamesMask
;
which
&=
~
XkbKeyTypeNamesMask
;
else
if
(
firstType
<=
XkbLastRequiredType
)
{
else
if
(
firstType
<=
XkbLastRequiredType
)
{
int
adjust
;
int
adjust
;
...
@@ -590,7 +590,7 @@ XkbChangeNames(Display *dpy,XkbDescPtr xkb,XkbNameChangesPtr changes)
...
@@ -590,7 +590,7 @@ XkbChangeNames(Display *dpy,XkbDescPtr xkb,XkbNameChangesPtr changes)
changes
->
changed_groups
=
0
;
changes
->
changed_groups
=
0
;
else
if
(
changes
->
changed_groups
==
0
)
else
if
(
changes
->
changed_groups
==
0
)
which
&=
~
XkbGroupNamesMask
;
which
&=
~
XkbGroupNamesMask
;
nVMods
=
nLEDs
=
nRG
=
nKA
=
nAtoms
=
nGroups
=
0
;
nVMods
=
nLEDs
=
nRG
=
nKA
=
nAtoms
=
nGroups
=
0
;
LockDisplay
(
dpy
);
LockDisplay
(
dpy
);
xkbi
=
dpy
->
xkb_info
;
xkbi
=
dpy
->
xkb_info
;
...
@@ -822,9 +822,9 @@ int first,last,old_last,new_last;
...
@@ -822,9 +822,9 @@ int first,last,old_last,new_last;
old
->
changed_groups
|=
new
->
changed_groups
;
old
->
changed_groups
|=
new
->
changed_groups
;
else
old
->
changed_groups
=
new
->
changed_groups
;
else
old
->
changed_groups
=
new
->
changed_groups
;
}
}
if
(
wanted
&
XkbRGNamesMask
)
if
(
wanted
&
XkbRGNamesMask
)
old
->
num_rg
=
new
->
num_radio_groups
;
old
->
num_rg
=
new
->
num_radio_groups
;
if
(
wanted
&
XkbKeyAliasesMask
)
if
(
wanted
&
XkbKeyAliasesMask
)
old
->
num_aliases
=
new
->
num_aliases
;
old
->
num_aliases
=
new
->
num_aliases
;
old
->
changed
|=
wanted
;
old
->
changed
|=
wanted
;
return
;
return
;
...
...
nx-X11/lib/X11/XKBRdBuf.c
View file @
af1f7cee
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -34,7 +34,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -34,7 +34,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/***====================================================================***/
/***====================================================================***/
int
int
_XkbInitReadBuffer
(
Display
*
dpy
,
XkbReadBufferPtr
buf
,
int
size
)
_XkbInitReadBuffer
(
Display
*
dpy
,
XkbReadBufferPtr
buf
,
int
size
)
{
{
if
((
dpy
!=
NULL
)
&&
(
buf
!=
NULL
)
&&
(
size
>
0
))
{
if
((
dpy
!=
NULL
)
&&
(
buf
!=
NULL
)
&&
(
size
>
0
))
{
...
@@ -147,7 +147,7 @@ _XkbPeekAtReadBuffer(XkbReadBufferPtr from,int size)
...
@@ -147,7 +147,7 @@ _XkbPeekAtReadBuffer(XkbReadBufferPtr from,int size)
{
{
if
((
from
==
NULL
)
||
(
from
->
error
)
||
(
size
<
1
)
||
if
((
from
==
NULL
)
||
(
from
->
error
)
||
(
size
<
1
)
||
(
_XkbReadBufferDataLeft
(
from
)
<
size
))
(
_XkbReadBufferDataLeft
(
from
)
<
size
))
return
0
;
return
NULL
;
return
from
->
data
;
return
from
->
data
;
}
}
...
@@ -157,7 +157,7 @@ _XkbGetReadBufferPtr(XkbReadBufferPtr from,int size)
...
@@ -157,7 +157,7 @@ _XkbGetReadBufferPtr(XkbReadBufferPtr from,int size)
char
*
ptr
;
char
*
ptr
;
if
((
from
==
NULL
)
||
(
from
->
error
)
||
(
size
<
1
)
||
if
((
from
==
NULL
)
||
(
from
->
error
)
||
(
size
<
1
)
||
(
_XkbReadBufferDataLeft
(
from
)
<
size
))
(
_XkbReadBufferDataLeft
(
from
)
<
size
))
return
0
;
return
NULL
;
ptr
=
from
->
data
;
ptr
=
from
->
data
;
from
->
data
+=
size
;
from
->
data
+=
size
;
return
ptr
;
return
ptr
;
...
...
nx-X11/lib/X11/XKBSetGeom.c
View file @
af1f7cee
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -66,7 +66,7 @@ _SizeGeomProperties(XkbGeometryPtr geom)
...
@@ -66,7 +66,7 @@ _SizeGeomProperties(XkbGeometryPtr geom)
{
{
register
int
i
,
size
;
register
int
i
,
size
;
XkbPropertyPtr
prop
;
XkbPropertyPtr
prop
;
for
(
size
=
i
=
0
,
prop
=
geom
->
properties
;
i
<
geom
->
num_properties
;
i
++
,
prop
++
)
{
for
(
size
=
i
=
0
,
prop
=
geom
->
properties
;
i
<
geom
->
num_properties
;
i
++
,
prop
++
)
{
size
+=
_SizeCountedString
(
prop
->
name
);
size
+=
_SizeCountedString
(
prop
->
name
);
size
+=
_SizeCountedString
(
prop
->
value
);
size
+=
_SizeCountedString
(
prop
->
value
);
...
@@ -170,7 +170,7 @@ _WriteGeomProperties(char *wire,XkbGeometryPtr geom)
...
@@ -170,7 +170,7 @@ _WriteGeomProperties(char *wire,XkbGeometryPtr geom)
{
{
register
int
i
;
register
int
i
;
register
XkbPropertyPtr
prop
;
register
XkbPropertyPtr
prop
;
for
(
i
=
0
,
prop
=
geom
->
properties
;
i
<
geom
->
num_properties
;
i
++
,
prop
++
)
{
for
(
i
=
0
,
prop
=
geom
->
properties
;
i
<
geom
->
num_properties
;
i
++
,
prop
++
)
{
wire
=
_WriteCountedString
(
wire
,
prop
->
name
);
wire
=
_WriteCountedString
(
wire
,
prop
->
name
);
wire
=
_WriteCountedString
(
wire
,
prop
->
value
);
wire
=
_WriteCountedString
(
wire
,
prop
->
value
);
...
@@ -373,7 +373,7 @@ static char *
...
@@ -373,7 +373,7 @@ static char *
_WriteGeomKeyAliases
(
char
*
wire
,
XkbGeometryPtr
geom
)
_WriteGeomKeyAliases
(
char
*
wire
,
XkbGeometryPtr
geom
)
{
{
register
int
sz
;
register
int
sz
;
sz
=
geom
->
num_key_aliases
*
(
XkbKeyNameLength
*
2
);
sz
=
geom
->
num_key_aliases
*
(
XkbKeyNameLength
*
2
);
if
(
sz
>
0
)
{
if
(
sz
>
0
)
{
memcpy
(
wire
,(
char
*
)
geom
->
key_aliases
,
sz
);
memcpy
(
wire
,(
char
*
)
geom
->
key_aliases
,
sz
);
...
@@ -440,7 +440,8 @@ Status ret;
...
@@ -440,7 +440,8 @@ Status ret;
if
(
(
!
geom
)
||
(
dpy
->
flags
&
XlibDisplayNoXkb
)
||
if
(
(
!
geom
)
||
(
dpy
->
flags
&
XlibDisplayNoXkb
)
||
(
!
dpy
->
xkb_info
&&
!
XkbUseExtension
(
dpy
,
NULL
,
NULL
)))
(
!
dpy
->
xkb_info
&&
!
XkbUseExtension
(
dpy
,
NULL
,
NULL
)))
return
BadAccess
;
return
BadAccess
;
LockDisplay
(
dpy
);
GetReq
(
kbSetGeometry
,
req
);
GetReq
(
kbSetGeometry
,
req
);
req
->
reqType
=
dpy
->
xkb_info
->
codes
->
major_opcode
;
req
->
reqType
=
dpy
->
xkb_info
->
codes
->
major_opcode
;
req
->
xkbReqType
=
X_kbSetGeometry
;
req
->
xkbReqType
=
X_kbSetGeometry
;
...
...
nx-X11/lib/X11/XKBSetMap.c
View file @
af1f7cee
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -320,7 +320,7 @@ CARD8 * wire;
...
@@ -320,7 +320,7 @@ CARD8 * wire;
if
((
req
->
present
&
XkbExplicitComponentsMask
)
==
0
)
if
((
req
->
present
&
XkbExplicitComponentsMask
)
==
0
)
return
;
return
;
first
=
req
->
firstKeyExplicit
;
first
=
req
->
firstKeyExplicit
;
last
=
first
+
req
->
nKeyExplicit
;
last
=
first
+
req
->
nKeyExplicit
-
1
;
i
=
XkbPaddedSize
((
req
->
totalKeyExplicit
*
2
));
i
=
XkbPaddedSize
((
req
->
totalKeyExplicit
*
2
));
BufAlloc
(
CARD8
*
,
wire
,
i
);
BufAlloc
(
CARD8
*
,
wire
,
i
);
for
(
i
=
first
;
i
<=
last
;
i
++
)
{
for
(
i
=
first
;
i
<=
last
;
i
++
)
{
...
...
nx-X11/lib/X11/XKBUse.c
View file @
af1f7cee
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -228,7 +228,7 @@ wire_to_event(Display *dpy,XEvent *re,xEvent *event)
...
@@ -228,7 +228,7 @@ wire_to_event(Display *dpy,XEvent *re,xEvent *event)
(
xGenericReply
*
)
event
);
(
xGenericReply
*
)
event
);
sev
->
send_event
=
((
event
->
u
.
u
.
type
&
0x80
)
!=
0
);
sev
->
send_event
=
((
event
->
u
.
u
.
type
&
0x80
)
!=
0
);
sev
->
display
=
dpy
;
sev
->
display
=
dpy
;
sev
->
time
=
sn
->
time
;
sev
->
time
=
sn
->
time
;
sev
->
device
=
sn
->
deviceID
;
sev
->
device
=
sn
->
deviceID
;
sev
->
keycode
=
sn
->
keycode
;
sev
->
keycode
=
sn
->
keycode
;
sev
->
event_type
=
sn
->
eventType
;
sev
->
event_type
=
sn
->
eventType
;
...
@@ -745,7 +745,7 @@ XkbUseExtension(Display *dpy,int *major_rtrn,int *minor_rtrn)
...
@@ -745,7 +745,7 @@ XkbUseExtension(Display *dpy,int *major_rtrn,int *minor_rtrn)
fail
=
True
;
fail
=
True
;
if
(
debugMsg
)
if
(
debugMsg
)
fprintf
(
stderr
,
fprintf
(
stderr
,
"XKEYBOARD version mismatch (want %d.%02d, got %d.%02d)
\n
"
,
"XKEYBOARD version mismatch (want %d.%02d, got %d.%02d)
\n
"
,
XkbMajorVersion
,
XkbMinorVersion
,
XkbMajorVersion
,
XkbMinorVersion
,
rep
.
serverMajor
,
rep
.
serverMinor
);
rep
.
serverMajor
,
rep
.
serverMinor
);
...
...
nx-X11/lib/X11/XKBleds.c
View file @
af1f7cee
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
...
@@ -6,19 +6,19 @@ software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
notice and this permission notice appear in supporting
documentation, and that the name of Silicon Graphics not be
documentation, and that the name of Silicon Graphics not be
used in advertising or publicity pertaining to distribution
used in advertising or publicity pertaining to distribution
of the software without specific prior written permission.
of the software without specific prior written permission.
Silicon Graphics makes no representation about the suitability
Silicon Graphics makes no representation about the suitability
of this software for any purpose. It is provided "as is"
of this software for any purpose. It is provided "as is"
without any express or implied warranty.
without any express or implied warranty.
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -39,7 +39,7 @@ XkbGetIndicatorState(Display *dpy,unsigned deviceSpec,unsigned *pStateRtrn)
...
@@ -39,7 +39,7 @@ XkbGetIndicatorState(Display *dpy,unsigned deviceSpec,unsigned *pStateRtrn)
xkbGetIndicatorStateReply
rep
;
xkbGetIndicatorStateReply
rep
;
XkbInfoPtr
xkbi
;
XkbInfoPtr
xkbi
;
Bool
ok
;
Bool
ok
;
if
((
dpy
->
flags
&
XlibDisplayNoXkb
)
||
if
((
dpy
->
flags
&
XlibDisplayNoXkb
)
||
(
!
dpy
->
xkb_info
&&
!
XkbUseExtension
(
dpy
,
NULL
,
NULL
)))
(
!
dpy
->
xkb_info
&&
!
XkbUseExtension
(
dpy
,
NULL
,
NULL
)))
return
BadAccess
;
return
BadAccess
;
...
@@ -57,7 +57,7 @@ XkbGetIndicatorState(Display *dpy,unsigned deviceSpec,unsigned *pStateRtrn)
...
@@ -57,7 +57,7 @@ XkbGetIndicatorState(Display *dpy,unsigned deviceSpec,unsigned *pStateRtrn)
return
(
ok
?
Success
:
BadImplementation
);
return
(
ok
?
Success
:
BadImplementation
);
}
}
Status
Status
_XkbReadGetIndicatorMapReply
(
Display
*
dpy
,
_XkbReadGetIndicatorMapReply
(
Display
*
dpy
,
xkbGetIndicatorMapReply
*
rep
,
xkbGetIndicatorMapReply
*
rep
,
XkbDescPtr
xkb
,
XkbDescPtr
xkb
,
...
@@ -206,7 +206,7 @@ XkbGetNamedDeviceIndicator( Display * dpy,
...
@@ -206,7 +206,7 @@ XkbGetNamedDeviceIndicator( Display * dpy,
register
xkbGetNamedIndicatorReq
*
req
;
register
xkbGetNamedIndicatorReq
*
req
;
xkbGetNamedIndicatorReply
rep
;
xkbGetNamedIndicatorReply
rep
;
XkbInfoPtr
xkbi
;
XkbInfoPtr
xkbi
;
if
((
dpy
->
flags
&
XlibDisplayNoXkb
)
||
(
name
==
None
)
||
if
((
dpy
->
flags
&
XlibDisplayNoXkb
)
||
(
name
==
None
)
||
(
!
dpy
->
xkb_info
&&
!
XkbUseExtension
(
dpy
,
NULL
,
NULL
)))
(
!
dpy
->
xkb_info
&&
!
XkbUseExtension
(
dpy
,
NULL
,
NULL
)))
return
False
;
return
False
;
...
@@ -224,6 +224,8 @@ XkbGetNamedDeviceIndicator( Display * dpy,
...
@@ -224,6 +224,8 @@ XkbGetNamedDeviceIndicator( Display * dpy,
SyncHandle
();
SyncHandle
();
return
False
;
return
False
;
}
}
UnlockDisplay
(
dpy
);
SyncHandle
();
if
((
!
rep
.
found
)
||
(
!
rep
.
supported
))
if
((
!
rep
.
found
)
||
(
!
rep
.
supported
))
return
False
;
return
False
;
if
(
pNdxRtrn
!=
NULL
)
if
(
pNdxRtrn
!=
NULL
)
...
@@ -240,7 +242,7 @@ XkbGetNamedDeviceIndicator( Display * dpy,
...
@@ -240,7 +242,7 @@ XkbGetNamedDeviceIndicator( Display * dpy,
pMapRtrn
->
mods
.
vmods
=
rep
.
virtualMods
;
pMapRtrn
->
mods
.
vmods
=
rep
.
virtualMods
;
pMapRtrn
->
ctrls
=
rep
.
ctrls
;
pMapRtrn
->
ctrls
=
rep
.
ctrls
;
}
}
if
(
pRealRtrn
!=
NULL
)
if
(
pRealRtrn
!=
NULL
)
*
pRealRtrn
=
rep
.
realIndicator
;
*
pRealRtrn
=
rep
.
realIndicator
;
return
True
;
return
True
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment