Drop CARD32 and Opaque types
parent
2fb329c964
commit
47d3b3969b
|
@ -167,12 +167,12 @@ typedef struct _XkbcKeyType {
|
||||||
unsigned char map_count;
|
unsigned char map_count;
|
||||||
XkbcKTMapEntryPtr map;
|
XkbcKTMapEntryPtr map;
|
||||||
XkbcModsPtr preserve;
|
XkbcModsPtr preserve;
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
CARD32 *level_names;
|
uint32_t *level_names;
|
||||||
} XkbcKeyTypeRec, *XkbcKeyTypePtr;
|
} XkbcKeyTypeRec, *XkbcKeyTypePtr;
|
||||||
|
|
||||||
typedef struct _XkbcSymInterpretRec {
|
typedef struct _XkbcSymInterpretRec {
|
||||||
CARD32 sym;
|
uint32_t sym;
|
||||||
unsigned char flags;
|
unsigned char flags;
|
||||||
unsigned char match;
|
unsigned char match;
|
||||||
uint8_t mods; /* XXX real or virt? */
|
uint8_t mods; /* XXX real or virt? */
|
||||||
|
@ -220,18 +220,18 @@ typedef struct _XkbcServerMapRec {
|
||||||
} XkbcServerMapRec, *XkbcServerMapPtr;
|
} XkbcServerMapRec, *XkbcServerMapPtr;
|
||||||
|
|
||||||
typedef struct _XkbcNamesRec {
|
typedef struct _XkbcNamesRec {
|
||||||
CARD32 keycodes;
|
uint32_t keycodes;
|
||||||
CARD32 geometry;
|
uint32_t geometry;
|
||||||
CARD32 symbols;
|
uint32_t symbols;
|
||||||
CARD32 types;
|
uint32_t types;
|
||||||
CARD32 compat;
|
uint32_t compat;
|
||||||
CARD32 vmods[XkbNumVirtualMods];
|
uint32_t vmods[XkbNumVirtualMods];
|
||||||
CARD32 indicators[XkbNumIndicators];
|
uint32_t indicators[XkbNumIndicators];
|
||||||
CARD32 groups[XkbNumKbdGroups];
|
uint32_t groups[XkbNumKbdGroups];
|
||||||
XkbKeyNamePtr keys;
|
XkbKeyNamePtr keys;
|
||||||
XkbKeyAliasPtr key_aliases;
|
XkbKeyAliasPtr key_aliases;
|
||||||
CARD32 *radio_groups;
|
uint32_t *radio_groups;
|
||||||
CARD32 phys_symbols;
|
uint32_t phys_symbols;
|
||||||
|
|
||||||
unsigned char num_keys;
|
unsigned char num_keys;
|
||||||
unsigned char num_key_aliases;
|
unsigned char num_key_aliases;
|
||||||
|
@ -268,7 +268,7 @@ typedef struct _XkbcOutline {
|
||||||
} XkbcOutlineRec, *XkbcOutlinePtr;
|
} XkbcOutlineRec, *XkbcOutlinePtr;
|
||||||
|
|
||||||
typedef struct _XkbcShape {
|
typedef struct _XkbcShape {
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
unsigned short num_outlines;
|
unsigned short num_outlines;
|
||||||
unsigned short sz_outlines;
|
unsigned short sz_outlines;
|
||||||
XkbcOutlinePtr outlines;
|
XkbcOutlinePtr outlines;
|
||||||
|
@ -279,7 +279,7 @@ typedef struct _XkbcShape {
|
||||||
#define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0]))
|
#define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0]))
|
||||||
|
|
||||||
typedef struct _XkbcShapeDoodad {
|
typedef struct _XkbcShapeDoodad {
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char priority;
|
unsigned char priority;
|
||||||
short top;
|
short top;
|
||||||
|
@ -294,7 +294,7 @@ typedef struct _XkbcShapeDoodad {
|
||||||
#define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
|
#define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
|
||||||
|
|
||||||
typedef struct _XkbcTextDoodad {
|
typedef struct _XkbcTextDoodad {
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char priority;
|
unsigned char priority;
|
||||||
short top;
|
short top;
|
||||||
|
@ -310,7 +310,7 @@ typedef struct _XkbcTextDoodad {
|
||||||
#define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
|
#define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
|
||||||
|
|
||||||
typedef struct _XkbcIndicatorDoodad {
|
typedef struct _XkbcIndicatorDoodad {
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char priority;
|
unsigned char priority;
|
||||||
short top;
|
short top;
|
||||||
|
@ -331,7 +331,7 @@ typedef struct _XkbcIndicatorDoodad {
|
||||||
((d)->shape_ndx= (s)-&(g)->shapes[0])
|
((d)->shape_ndx= (s)-&(g)->shapes[0])
|
||||||
|
|
||||||
typedef struct _XkbcLogoDoodad {
|
typedef struct _XkbcLogoDoodad {
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char priority;
|
unsigned char priority;
|
||||||
short top;
|
short top;
|
||||||
|
@ -347,7 +347,7 @@ typedef struct _XkbcLogoDoodad {
|
||||||
#define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
|
#define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
|
||||||
|
|
||||||
typedef struct _XkbcAnyDoodad {
|
typedef struct _XkbcAnyDoodad {
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char priority;
|
unsigned char priority;
|
||||||
short top;
|
short top;
|
||||||
|
@ -392,7 +392,7 @@ typedef struct _XkbRow {
|
||||||
} XkbcRowRec, *XkbcRowPtr;
|
} XkbcRowRec, *XkbcRowPtr;
|
||||||
|
|
||||||
typedef struct _XkbcSection {
|
typedef struct _XkbcSection {
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
unsigned char priority;
|
unsigned char priority;
|
||||||
short top;
|
short top;
|
||||||
short left;
|
short left;
|
||||||
|
@ -424,7 +424,7 @@ typedef struct _XkbOverlayRow {
|
||||||
} XkbcOverlayRowRec, *XkbcOverlayRowPtr;
|
} XkbcOverlayRowRec, *XkbcOverlayRowPtr;
|
||||||
|
|
||||||
typedef struct _XkbOverlay {
|
typedef struct _XkbOverlay {
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
XkbcSectionPtr section_under;
|
XkbcSectionPtr section_under;
|
||||||
unsigned short num_rows;
|
unsigned short num_rows;
|
||||||
unsigned short sz_rows;
|
unsigned short sz_rows;
|
||||||
|
@ -433,7 +433,7 @@ typedef struct _XkbOverlay {
|
||||||
} XkbcOverlayRec, *XkbcOverlayPtr;
|
} XkbcOverlayRec, *XkbcOverlayPtr;
|
||||||
|
|
||||||
typedef struct _XkbcGeometry {
|
typedef struct _XkbcGeometry {
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
unsigned short width_mm;
|
unsigned short width_mm;
|
||||||
unsigned short height_mm;
|
unsigned short height_mm;
|
||||||
char * label_font;
|
char * label_font;
|
||||||
|
@ -541,17 +541,17 @@ XkbcCanonicaliseComponents(XkbComponentNamesPtr names,
|
||||||
* XkbcKeysymToString: if you need to preserve it, then you must
|
* XkbcKeysymToString: if you need to preserve it, then you must
|
||||||
* duplicate it.
|
* duplicate it.
|
||||||
*
|
*
|
||||||
* This is CARD32 rather than KeySym, as KeySym changes size between
|
* This is uint32_t rather than KeySym, as KeySym changes size between
|
||||||
* client and server (no, really).
|
* client and server (no, really).
|
||||||
*/
|
*/
|
||||||
extern char *
|
extern char *
|
||||||
XkbcKeysymToString(CARD32 ks);
|
XkbcKeysymToString(uint32_t ks);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See XkbcKeysymToString comments: this function will accept any string
|
* See XkbcKeysymToString comments: this function will accept any string
|
||||||
* from that function.
|
* from that function.
|
||||||
*/
|
*/
|
||||||
extern CARD32
|
extern uint32_t
|
||||||
XkbcStringToKeysym(const char *s);
|
XkbcStringToKeysym(const char *s);
|
||||||
|
|
||||||
_XFUNCPROTOEND
|
_XFUNCPROTOEND
|
||||||
|
|
10
src/alloc.c
10
src/alloc.c
|
@ -136,7 +136,7 @@ XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG, int nTotalAliases)
|
||||||
type = xkb->map->types;
|
type = xkb->map->types;
|
||||||
for (i = 0; i < xkb->map->num_types; i++, type++) {
|
for (i = 0; i < xkb->map->num_types; i++, type++) {
|
||||||
if (!type->level_names) {
|
if (!type->level_names) {
|
||||||
type->level_names = _XkbTypedCalloc(type->num_levels, CARD32);
|
type->level_names = _XkbTypedCalloc(type->num_levels, uint32_t);
|
||||||
if (!type->level_names)
|
if (!type->level_names)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
|
@ -181,15 +181,15 @@ XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG, int nTotalAliases)
|
||||||
|
|
||||||
if ((which & XkbRGNamesMask) && (nTotalRG > 0)) {
|
if ((which & XkbRGNamesMask) && (nTotalRG > 0)) {
|
||||||
if (!names->radio_groups)
|
if (!names->radio_groups)
|
||||||
names->radio_groups = _XkbTypedCalloc(nTotalRG, CARD32);
|
names->radio_groups = _XkbTypedCalloc(nTotalRG, uint32_t);
|
||||||
else if (nTotalRG > names->num_rg) {
|
else if (nTotalRG > names->num_rg) {
|
||||||
CARD32 *prev_radio_groups = names->radio_groups;
|
uint32_t *prev_radio_groups = names->radio_groups;
|
||||||
|
|
||||||
names->radio_groups = _XkbTypedRealloc(names->radio_groups,
|
names->radio_groups = _XkbTypedRealloc(names->radio_groups,
|
||||||
nTotalRG, CARD32);
|
nTotalRG, uint32_t);
|
||||||
if (names->radio_groups)
|
if (names->radio_groups)
|
||||||
_XkbClearElems(names->radio_groups, names->num_rg,
|
_XkbClearElems(names->radio_groups, names->num_rg,
|
||||||
nTotalRG - 1, CARD32);
|
nTotalRG - 1, uint32_t);
|
||||||
else
|
else
|
||||||
_XkbFree(prev_radio_groups);
|
_XkbFree(prev_radio_groups);
|
||||||
}
|
}
|
||||||
|
|
14
src/atom.c
14
src/atom.c
|
@ -81,14 +81,14 @@ SOFTWARE.
|
||||||
|
|
||||||
typedef struct _Node {
|
typedef struct _Node {
|
||||||
struct _Node *left, *right;
|
struct _Node *left, *right;
|
||||||
CARD32 a;
|
uint32_t a;
|
||||||
unsigned int fingerPrint;
|
unsigned int fingerPrint;
|
||||||
char *string;
|
char *string;
|
||||||
} NodeRec, *NodePtr;
|
} NodeRec, *NodePtr;
|
||||||
|
|
||||||
#define BAD_RESOURCE 0xe0000000
|
#define BAD_RESOURCE 0xe0000000
|
||||||
|
|
||||||
static CARD32 lastAtom = None;
|
static uint32_t lastAtom = None;
|
||||||
static NodePtr atomRoot = NULL;
|
static NodePtr atomRoot = NULL;
|
||||||
static unsigned long tableLength;
|
static unsigned long tableLength;
|
||||||
static NodePtr *nodeTable = NULL;
|
static NodePtr *nodeTable = NULL;
|
||||||
|
@ -115,7 +115,7 @@ XkbcInitAtoms(InternAtomFuncPtr intern, GetAtomValueFuncPtr get_atom_value)
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
_XkbcAtomGetString(CARD32 atom)
|
_XkbcAtomGetString(uint32_t atom)
|
||||||
{
|
{
|
||||||
NodePtr node;
|
NodePtr node;
|
||||||
|
|
||||||
|
@ -130,14 +130,14 @@ _XkbcAtomGetString(CARD32 atom)
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
XkbcAtomGetString(CARD32 atom)
|
XkbcAtomGetString(uint32_t atom)
|
||||||
{
|
{
|
||||||
const char *ret = _XkbcAtomGetString(atom);
|
const char *ret = _XkbcAtomGetString(atom);
|
||||||
return ret ? strdup(ret) : NULL;
|
return ret ? strdup(ret) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
XkbcAtomText(CARD32 atom)
|
XkbcAtomText(uint32_t atom)
|
||||||
{
|
{
|
||||||
const char *tmp;
|
const char *tmp;
|
||||||
char *ret;
|
char *ret;
|
||||||
|
@ -154,7 +154,7 @@ XkbcAtomText(CARD32 atom)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CARD32
|
static uint32_t
|
||||||
_XkbcMakeAtom(const char *string, unsigned len, Bool makeit)
|
_XkbcMakeAtom(const char *string, unsigned len, Bool makeit)
|
||||||
{
|
{
|
||||||
NodePtr *np;
|
NodePtr *np;
|
||||||
|
@ -228,7 +228,7 @@ _XkbcMakeAtom(const char *string, unsigned len, Bool makeit)
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
CARD32
|
uint32_t
|
||||||
XkbcInternAtom(const char *name, Bool onlyIfExists)
|
XkbcInternAtom(const char *name, Bool onlyIfExists)
|
||||||
{
|
{
|
||||||
if (!name)
|
if (!name)
|
||||||
|
|
|
@ -718,7 +718,7 @@ XkbcOutlinePtr outline;
|
||||||
}
|
}
|
||||||
|
|
||||||
XkbcShapePtr
|
XkbcShapePtr
|
||||||
XkbcAddGeomShape(XkbcGeometryPtr geom,CARD32 name,int sz_outlines)
|
XkbcAddGeomShape(XkbcGeometryPtr geom,uint32_t name,int sz_outlines)
|
||||||
{
|
{
|
||||||
XkbcShapePtr shape;
|
XkbcShapePtr shape;
|
||||||
register int i;
|
register int i;
|
||||||
|
@ -777,7 +777,7 @@ XkbcRowPtr row;
|
||||||
|
|
||||||
XkbcSectionPtr
|
XkbcSectionPtr
|
||||||
XkbcAddGeomSection( XkbcGeometryPtr geom,
|
XkbcAddGeomSection( XkbcGeometryPtr geom,
|
||||||
CARD32 name,
|
uint32_t name,
|
||||||
int sz_rows,
|
int sz_rows,
|
||||||
int sz_doodads,
|
int sz_doodads,
|
||||||
int sz_over)
|
int sz_over)
|
||||||
|
@ -816,7 +816,7 @@ XkbcSectionPtr section;
|
||||||
}
|
}
|
||||||
|
|
||||||
XkbcDoodadPtr
|
XkbcDoodadPtr
|
||||||
XkbcAddGeomDoodad(XkbcGeometryPtr geom,XkbcSectionPtr section,CARD32 name)
|
XkbcAddGeomDoodad(XkbcGeometryPtr geom,XkbcSectionPtr section,uint32_t name)
|
||||||
{
|
{
|
||||||
XkbcDoodadPtr old,doodad;
|
XkbcDoodadPtr old,doodad;
|
||||||
register int i,nDoodads;
|
register int i,nDoodads;
|
||||||
|
@ -921,7 +921,7 @@ XkbcOverlayRowPtr row;
|
||||||
}
|
}
|
||||||
|
|
||||||
XkbcOverlayPtr
|
XkbcOverlayPtr
|
||||||
XkbcAddGeomOverlay(XkbcSectionPtr section,CARD32 name,int sz_rows)
|
XkbcAddGeomOverlay(XkbcSectionPtr section,uint32_t name,int sz_rows)
|
||||||
{
|
{
|
||||||
register int i;
|
register int i;
|
||||||
XkbcOverlayPtr overlay;
|
XkbcOverlayPtr overlay;
|
||||||
|
|
|
@ -38,7 +38,7 @@ authorization from the authors.
|
||||||
#include "ks_tables.h"
|
#include "ks_tables.h"
|
||||||
|
|
||||||
char *
|
char *
|
||||||
XkbcKeysymToString(CARD32 ks)
|
XkbcKeysymToString(uint32_t ks)
|
||||||
{
|
{
|
||||||
int i, n, h, idx;
|
int i, n, h, idx;
|
||||||
const unsigned char *entry;
|
const unsigned char *entry;
|
||||||
|
@ -91,7 +91,7 @@ XkbcKeysymToString(CARD32 ks)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
CARD32
|
uint32_t
|
||||||
XkbcStringToKeysym(const char *s)
|
XkbcStringToKeysym(const char *s)
|
||||||
{
|
{
|
||||||
int i, n, h, c, idx;
|
int i, n, h, c, idx;
|
||||||
|
@ -99,7 +99,7 @@ XkbcStringToKeysym(const char *s)
|
||||||
const char *p = s;
|
const char *p = s;
|
||||||
const unsigned char *entry;
|
const unsigned char *entry;
|
||||||
unsigned char sig1, sig2;
|
unsigned char sig1, sig2;
|
||||||
CARD32 val;
|
uint32_t val;
|
||||||
|
|
||||||
while ((c = *p++))
|
while ((c = *p++))
|
||||||
sig = (sig << 1) + c;
|
sig = (sig << 1) + c;
|
||||||
|
|
36
src/malloc.c
36
src/malloc.c
|
@ -268,11 +268,11 @@ XkbcCopyKeyType(XkbcKeyTypePtr from, XkbcKeyTypePtr into)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (from->level_names && (into->num_levels > 0)) {
|
if (from->level_names && (into->num_levels > 0)) {
|
||||||
into->level_names = _XkbTypedCalloc(into->num_levels, CARD32);
|
into->level_names = _XkbTypedCalloc(into->num_levels, uint32_t);
|
||||||
if (!into->level_names)
|
if (!into->level_names)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
memcpy(into->level_names, from->level_names,
|
memcpy(into->level_names, from->level_names,
|
||||||
into->num_levels * sizeof(CARD32));
|
into->num_levels * sizeof(uint32_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
@ -362,10 +362,10 @@ XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((new_num_lvls > type->num_levels) || !type->level_names) {
|
if ((new_num_lvls > type->num_levels) || !type->level_names) {
|
||||||
CARD32 *prev_level_names = type->level_names;
|
uint32_t *prev_level_names = type->level_names;
|
||||||
|
|
||||||
type->level_names = _XkbTypedRealloc(type->level_names, new_num_lvls,
|
type->level_names = _XkbTypedRealloc(type->level_names, new_num_lvls,
|
||||||
CARD32);
|
uint32_t);
|
||||||
if (!type->level_names) {
|
if (!type->level_names) {
|
||||||
if (prev_level_names)
|
if (prev_level_names)
|
||||||
_XkbFree(prev_level_names);
|
_XkbFree(prev_level_names);
|
||||||
|
@ -398,7 +398,7 @@ XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
|
||||||
nMatchingKeys = 0;
|
nMatchingKeys = 0;
|
||||||
if (new_num_lvls > type->num_levels) {
|
if (new_num_lvls > type->num_levels) {
|
||||||
int nTotal;
|
int nTotal;
|
||||||
CARD32 *newSyms;
|
uint32_t *newSyms;
|
||||||
int width, match, nResize = 0;
|
int width, match, nResize = 0;
|
||||||
int i, g, nSyms;
|
int i, g, nSyms;
|
||||||
|
|
||||||
|
@ -427,7 +427,7 @@ XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
|
||||||
int nextMatch;
|
int nextMatch;
|
||||||
|
|
||||||
xkb->map->size_syms = (nTotal * 12) / 10;
|
xkb->map->size_syms = (nTotal * 12) / 10;
|
||||||
newSyms = _XkbTypedCalloc(xkb->map->size_syms, CARD32);
|
newSyms = _XkbTypedCalloc(xkb->map->size_syms, uint32_t);
|
||||||
if (!newSyms)
|
if (!newSyms)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
nextMatch = 0;
|
nextMatch = 0;
|
||||||
|
@ -435,20 +435,20 @@ XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
|
||||||
|
|
||||||
for (i = xkb->min_key_code; i <= xkb->max_key_code; i++) {
|
for (i = xkb->min_key_code; i <= xkb->max_key_code; i++) {
|
||||||
if (matchingKeys[nextMatch] == i) {
|
if (matchingKeys[nextMatch] == i) {
|
||||||
CARD32 *pOld;
|
uint32_t *pOld;
|
||||||
|
|
||||||
nextMatch++;
|
nextMatch++;
|
||||||
width = XkbKeyGroupsWidth(xkb, i);
|
width = XkbKeyGroupsWidth(xkb, i);
|
||||||
pOld = XkbKeySymsPtr(xkb, i);
|
pOld = XkbKeySymsPtr(xkb, i);
|
||||||
for (g = XkbKeyNumGroups(xkb, i) - 1; g >= 0; g--)
|
for (g = XkbKeyNumGroups(xkb, i) - 1; g >= 0; g--)
|
||||||
memcpy(&newSyms[nSyms+(new_num_lvls * g)],
|
memcpy(&newSyms[nSyms+(new_num_lvls * g)],
|
||||||
&pOld[width * g], width * sizeof(CARD32));
|
&pOld[width * g], width * sizeof(uint32_t));
|
||||||
xkb->map->key_sym_map[i].offset = nSyms;
|
xkb->map->key_sym_map[i].offset = nSyms;
|
||||||
nSyms += XkbKeyNumGroups(xkb, i) * new_num_lvls;
|
nSyms += XkbKeyNumGroups(xkb, i) * new_num_lvls;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
memcpy(&newSyms[nSyms], XkbKeySymsPtr(xkb, i),
|
memcpy(&newSyms[nSyms], XkbKeySymsPtr(xkb, i),
|
||||||
XkbKeyNumSyms(xkb, i) * sizeof(CARD32));
|
XkbKeyNumSyms(xkb, i) * sizeof(uint32_t));
|
||||||
xkb->map->key_sym_map[i].offset = nSyms;
|
xkb->map->key_sym_map[i].offset = nSyms;
|
||||||
nSyms += XkbKeyNumSyms(xkb,i);
|
nSyms += XkbKeyNumSyms(xkb,i);
|
||||||
}
|
}
|
||||||
|
@ -491,7 +491,7 @@ XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
|
||||||
firstClear = new_num_lvls;
|
firstClear = new_num_lvls;
|
||||||
|
|
||||||
for (i = 0; i < nMatchingKeys; i++) {
|
for (i = 0; i < nMatchingKeys; i++) {
|
||||||
CARD32 *pSyms;
|
uint32_t *pSyms;
|
||||||
int width, nClear;
|
int width, nClear;
|
||||||
|
|
||||||
key = matchingKeys[i];
|
key = matchingKeys[i];
|
||||||
|
@ -502,7 +502,7 @@ XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
|
||||||
if (XkbKeyKeyTypeIndex(xkb, key, g) == type_ndx) {
|
if (XkbKeyKeyTypeIndex(xkb, key, g) == type_ndx) {
|
||||||
if (nClear>0)
|
if (nClear>0)
|
||||||
bzero(&pSyms[g * width + firstClear],
|
bzero(&pSyms[g * width + firstClear],
|
||||||
nClear * sizeof(CARD32));
|
nClear * sizeof(uint32_t));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -513,12 +513,12 @@ XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
CARD32 *
|
uint32_t *
|
||||||
XkbcResizeKeySyms(XkbcDescPtr xkb, int key, int needed)
|
XkbcResizeKeySyms(XkbcDescPtr xkb, int key, int needed)
|
||||||
{
|
{
|
||||||
int i, nSyms, nKeySyms;
|
int i, nSyms, nKeySyms;
|
||||||
unsigned nOldSyms;
|
unsigned nOldSyms;
|
||||||
CARD32 *newSyms;
|
uint32_t *newSyms;
|
||||||
|
|
||||||
if (needed == 0) {
|
if (needed == 0) {
|
||||||
xkb->map->key_sym_map[key].offset = 0;
|
xkb->map->key_sym_map[key].offset = 0;
|
||||||
|
@ -532,11 +532,11 @@ XkbcResizeKeySyms(XkbcDescPtr xkb, int key, int needed)
|
||||||
if (xkb->map->size_syms - xkb->map->num_syms >= (unsigned)needed) {
|
if (xkb->map->size_syms - xkb->map->num_syms >= (unsigned)needed) {
|
||||||
if (nOldSyms > 0)
|
if (nOldSyms > 0)
|
||||||
memcpy(&xkb->map->syms[xkb->map->num_syms],
|
memcpy(&xkb->map->syms[xkb->map->num_syms],
|
||||||
XkbKeySymsPtr(xkb, key), nOldSyms * sizeof(CARD32));
|
XkbKeySymsPtr(xkb, key), nOldSyms * sizeof(uint32_t));
|
||||||
|
|
||||||
if ((needed - nOldSyms) > 0)
|
if ((needed - nOldSyms) > 0)
|
||||||
bzero(&xkb->map->syms[xkb->map->num_syms + XkbKeyNumSyms(xkb, key)],
|
bzero(&xkb->map->syms[xkb->map->num_syms + XkbKeyNumSyms(xkb, key)],
|
||||||
(needed - nOldSyms) * sizeof(CARD32));
|
(needed - nOldSyms) * sizeof(uint32_t));
|
||||||
|
|
||||||
xkb->map->key_sym_map[key].offset = xkb->map->num_syms;
|
xkb->map->key_sym_map[key].offset = xkb->map->num_syms;
|
||||||
xkb->map->num_syms += needed;
|
xkb->map->num_syms += needed;
|
||||||
|
@ -545,7 +545,7 @@ XkbcResizeKeySyms(XkbcDescPtr xkb, int key, int needed)
|
||||||
}
|
}
|
||||||
|
|
||||||
xkb->map->size_syms += (needed > 32 ? needed : 32);
|
xkb->map->size_syms += (needed > 32 ? needed : 32);
|
||||||
newSyms = _XkbTypedCalloc(xkb->map->size_syms, CARD32);
|
newSyms = _XkbTypedCalloc(xkb->map->size_syms, uint32_t);
|
||||||
if (!newSyms)
|
if (!newSyms)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -562,9 +562,9 @@ XkbcResizeKeySyms(XkbcDescPtr xkb, int key, int needed)
|
||||||
nKeySyms = needed;
|
nKeySyms = needed;
|
||||||
if (nCopy != 0)
|
if (nCopy != 0)
|
||||||
memcpy(&newSyms[nSyms], XkbKeySymsPtr(xkb, i),
|
memcpy(&newSyms[nSyms], XkbKeySymsPtr(xkb, i),
|
||||||
nCopy * sizeof(CARD32));
|
nCopy * sizeof(uint32_t));
|
||||||
if (nKeySyms > nCopy)
|
if (nKeySyms > nCopy)
|
||||||
bzero(&newSyms[nSyms+nCopy], (nKeySyms - nCopy) * sizeof(CARD32));
|
bzero(&newSyms[nSyms+nCopy], (nKeySyms - nCopy) * sizeof(uint32_t));
|
||||||
|
|
||||||
xkb->map->key_sym_map[i].offset = nSyms;
|
xkb->map->key_sym_map[i].offset = nSyms;
|
||||||
nSyms += nKeySyms;
|
nSyms += nKeySyms;
|
||||||
|
|
|
@ -190,7 +190,7 @@ XkbcEnsureSafeMapName(char *name)
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
_XkbcKSCheckCase(CARD32 ks)
|
_XkbcKSCheckCase(uint32_t ks)
|
||||||
{
|
{
|
||||||
unsigned set = (ks & (~0xff)) >> 8;
|
unsigned set = (ks & (~0xff)) >> 8;
|
||||||
unsigned rtrn = 0;
|
unsigned rtrn = 0;
|
||||||
|
|
|
@ -60,7 +60,7 @@ char *
|
||||||
XkbcVModIndexText(XkbcDescPtr xkb, unsigned ndx)
|
XkbcVModIndexText(XkbcDescPtr xkb, unsigned ndx)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
CARD32 *vmodNames;
|
uint32_t *vmodNames;
|
||||||
char *rtrn, *tmp = NULL;
|
char *rtrn, *tmp = NULL;
|
||||||
|
|
||||||
if (xkb && xkb->names)
|
if (xkb && xkb->names)
|
||||||
|
@ -280,7 +280,7 @@ XkbcActionTypeText(unsigned type)
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
XkbcKeysymText(CARD32 sym)
|
XkbcKeysymText(uint32_t sym)
|
||||||
{
|
{
|
||||||
return XkbcKeysymToString(sym);
|
return XkbcKeysymToString(sym);
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ extern int
|
||||||
XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
|
XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
|
||||||
Bool want_preserve, int new_num_lvls);
|
Bool want_preserve, int new_num_lvls);
|
||||||
|
|
||||||
extern CARD32 *
|
extern uint32_t *
|
||||||
XkbcResizeKeySyms(XkbcDescPtr xkb, int key, int needed);
|
XkbcResizeKeySyms(XkbcDescPtr xkb, int key, int needed);
|
||||||
|
|
||||||
extern int
|
extern int
|
||||||
|
|
|
@ -156,7 +156,7 @@ ExprResolveLhs(ExprDef * expr,
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
SimpleLookup(char * priv,
|
SimpleLookup(char * priv,
|
||||||
CARD32 elem, CARD32 field, unsigned type, ExprResult * val_rtrn)
|
uint32_t elem, uint32_t field, unsigned type, ExprResult * val_rtrn)
|
||||||
{
|
{
|
||||||
LookupEntry *entry;
|
LookupEntry *entry;
|
||||||
register char *str;
|
register char *str;
|
||||||
|
@ -184,7 +184,7 @@ SimpleLookup(char * priv,
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
RadioLookup(char * priv,
|
RadioLookup(char * priv,
|
||||||
CARD32 elem, CARD32 field, unsigned type, ExprResult * val_rtrn)
|
uint32_t elem, uint32_t field, unsigned type, ExprResult * val_rtrn)
|
||||||
{
|
{
|
||||||
register char *str;
|
register char *str;
|
||||||
int rg;
|
int rg;
|
||||||
|
@ -212,7 +212,7 @@ RadioLookup(char * priv,
|
||||||
|
|
||||||
int
|
int
|
||||||
TableLookup(char * priv,
|
TableLookup(char * priv,
|
||||||
CARD32 elem, CARD32 field, unsigned type, ExprResult * val_rtrn)
|
uint32_t elem, uint32_t field, unsigned type, ExprResult * val_rtrn)
|
||||||
{
|
{
|
||||||
LookupTable *tbl = (LookupTable *) priv;
|
LookupTable *tbl = (LookupTable *) priv;
|
||||||
register char *str;
|
register char *str;
|
||||||
|
@ -233,7 +233,7 @@ TableLookup(char * priv,
|
||||||
if (tbl == NULL) /* didn't find a matching element */
|
if (tbl == NULL) /* didn't find a matching element */
|
||||||
return False;
|
return False;
|
||||||
priv = (char *) tbl->entries;
|
priv = (char *) tbl->entries;
|
||||||
return SimpleLookup(priv, (CARD32) None, field, type, val_rtrn);
|
return SimpleLookup(priv, (uint32_t) None, field, type, val_rtrn);
|
||||||
}
|
}
|
||||||
|
|
||||||
static LookupEntry modIndexNames[] = {
|
static LookupEntry modIndexNames[] = {
|
||||||
|
@ -251,7 +251,7 @@ static LookupEntry modIndexNames[] = {
|
||||||
|
|
||||||
int
|
int
|
||||||
LookupModIndex(char * priv,
|
LookupModIndex(char * priv,
|
||||||
CARD32 elem, CARD32 field, unsigned type, ExprResult * val_rtrn)
|
uint32_t elem, uint32_t field, unsigned type, ExprResult * val_rtrn)
|
||||||
{
|
{
|
||||||
return SimpleLookup((char *) modIndexNames, elem, field, type,
|
return SimpleLookup((char *) modIndexNames, elem, field, type,
|
||||||
val_rtrn);
|
val_rtrn);
|
||||||
|
@ -259,7 +259,7 @@ LookupModIndex(char * priv,
|
||||||
|
|
||||||
int
|
int
|
||||||
LookupModMask(char * priv,
|
LookupModMask(char * priv,
|
||||||
CARD32 elem, CARD32 field, unsigned type, ExprResult * val_rtrn)
|
uint32_t elem, uint32_t field, unsigned type, ExprResult * val_rtrn)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
Bool ret = True;
|
Bool ret = True;
|
||||||
|
@ -317,7 +317,7 @@ ExprResolveModIndex(ExprDef * expr,
|
||||||
val_rtrn->ival = expr->value.ival;
|
val_rtrn->ival = expr->value.ival;
|
||||||
return True;
|
return True;
|
||||||
case ExprIdent:
|
case ExprIdent:
|
||||||
if (LookupModIndex(lookupPriv, (CARD32) None, expr->value.str,
|
if (LookupModIndex(lookupPriv, (uint32_t) None, expr->value.str,
|
||||||
(unsigned) TypeInt, val_rtrn))
|
(unsigned) TypeInt, val_rtrn))
|
||||||
{
|
{
|
||||||
return True;
|
return True;
|
||||||
|
@ -915,7 +915,7 @@ ExprResolveEnum(ExprDef * expr, ExprResult * val_rtrn, LookupEntry * values)
|
||||||
exprOpText(expr->op));
|
exprOpText(expr->op));
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
if (!SimpleLookup((char *) values, (CARD32) None, expr->value.str,
|
if (!SimpleLookup((char *) values, (uint32_t) None, expr->value.str,
|
||||||
(unsigned) TypeInt, val_rtrn))
|
(unsigned) TypeInt, val_rtrn))
|
||||||
{
|
{
|
||||||
int nOut = 0;
|
int nOut = 0;
|
||||||
|
@ -1049,7 +1049,7 @@ ExprResolveKeySym(ExprDef * expr,
|
||||||
IdentLookupFunc lookup, char * lookupPriv)
|
IdentLookupFunc lookup, char * lookupPriv)
|
||||||
{
|
{
|
||||||
int ok = 0;
|
int ok = 0;
|
||||||
CARD32 sym;
|
uint32_t sym;
|
||||||
|
|
||||||
if (expr->op == ExprIdent)
|
if (expr->op == ExprIdent)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,8 +36,8 @@ typedef union _ExprResult
|
||||||
} ExprResult;
|
} ExprResult;
|
||||||
|
|
||||||
typedef Bool(*IdentLookupFunc) (char * /* priv */ ,
|
typedef Bool(*IdentLookupFunc) (char * /* priv */ ,
|
||||||
CARD32 /* elem */ ,
|
uint32_t /* elem */ ,
|
||||||
CARD32 /* field */ ,
|
uint32_t /* field */ ,
|
||||||
unsigned /* type */ ,
|
unsigned /* type */ ,
|
||||||
ExprResult * /* val_rtrn */
|
ExprResult * /* val_rtrn */
|
||||||
);
|
);
|
||||||
|
@ -76,36 +76,36 @@ extern char *exprOpText(unsigned /* type */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int RadioLookup(char * /* priv */ ,
|
extern int RadioLookup(char * /* priv */ ,
|
||||||
CARD32 /* elem */ ,
|
uint32_t /* elem */ ,
|
||||||
CARD32 /* field */ ,
|
uint32_t /* field */ ,
|
||||||
unsigned /* type */ ,
|
unsigned /* type */ ,
|
||||||
ExprResult * /* val_rtrn */
|
ExprResult * /* val_rtrn */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int SimpleLookup(char * /* priv */ ,
|
extern int SimpleLookup(char * /* priv */ ,
|
||||||
CARD32 /* elem */ ,
|
uint32_t /* elem */ ,
|
||||||
CARD32 /* field */ ,
|
uint32_t /* field */ ,
|
||||||
unsigned /* type */ ,
|
unsigned /* type */ ,
|
||||||
ExprResult * /* val_rtrn */
|
ExprResult * /* val_rtrn */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int TableLookup(char * /* priv */ ,
|
extern int TableLookup(char * /* priv */ ,
|
||||||
CARD32 /* elem */ ,
|
uint32_t /* elem */ ,
|
||||||
CARD32 /* field */ ,
|
uint32_t /* field */ ,
|
||||||
unsigned /* type */ ,
|
unsigned /* type */ ,
|
||||||
ExprResult * /* val_rtrn */
|
ExprResult * /* val_rtrn */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int LookupModIndex(char * /* priv */ ,
|
extern int LookupModIndex(char * /* priv */ ,
|
||||||
CARD32 /* elem */ ,
|
uint32_t /* elem */ ,
|
||||||
CARD32 /* field */ ,
|
uint32_t /* field */ ,
|
||||||
unsigned /* type */ ,
|
unsigned /* type */ ,
|
||||||
ExprResult * /* val_rtrn */
|
ExprResult * /* val_rtrn */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int LookupModMask(char * /* priv */ ,
|
extern int LookupModMask(char * /* priv */ ,
|
||||||
CARD32 /* elem */ ,
|
uint32_t /* elem */ ,
|
||||||
CARD32 /* field */ ,
|
uint32_t /* field */ ,
|
||||||
unsigned /* type */ ,
|
unsigned /* type */ ,
|
||||||
ExprResult * /* val_rtrn */
|
ExprResult * /* val_rtrn */
|
||||||
);
|
);
|
||||||
|
|
|
@ -58,7 +58,7 @@ typedef struct _PropertyInfo
|
||||||
typedef struct _ShapeInfo
|
typedef struct _ShapeInfo
|
||||||
{
|
{
|
||||||
CommonInfo defs;
|
CommonInfo defs;
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
short index;
|
short index;
|
||||||
unsigned short nOutlines;
|
unsigned short nOutlines;
|
||||||
unsigned short szOutlines;
|
unsigned short szOutlines;
|
||||||
|
@ -97,7 +97,7 @@ typedef struct _ShapeInfo
|
||||||
typedef struct _DoodadInfo
|
typedef struct _DoodadInfo
|
||||||
{
|
{
|
||||||
CommonInfo defs;
|
CommonInfo defs;
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char priority;
|
unsigned char priority;
|
||||||
short top;
|
short top;
|
||||||
|
@ -106,18 +106,18 @@ typedef struct _DoodadInfo
|
||||||
unsigned short corner;
|
unsigned short corner;
|
||||||
unsigned short width;
|
unsigned short width;
|
||||||
unsigned short height;
|
unsigned short height;
|
||||||
CARD32 shape;
|
uint32_t shape;
|
||||||
CARD32 color;
|
uint32_t color;
|
||||||
CARD32 offColor;
|
uint32_t offColor;
|
||||||
CARD32 text;
|
uint32_t text;
|
||||||
CARD32 font;
|
uint32_t font;
|
||||||
CARD32 fontSlant;
|
uint32_t fontSlant;
|
||||||
CARD32 fontWeight;
|
uint32_t fontWeight;
|
||||||
CARD32 fontSetWidth;
|
uint32_t fontSetWidth;
|
||||||
CARD32 fontVariant;
|
uint32_t fontVariant;
|
||||||
unsigned short fontSize;
|
unsigned short fontSize;
|
||||||
CARD32 fontEncoding;
|
uint32_t fontEncoding;
|
||||||
CARD32 fontSpec;
|
uint32_t fontSpec;
|
||||||
char *logoName;
|
char *logoName;
|
||||||
struct _SectionInfo *section;
|
struct _SectionInfo *section;
|
||||||
} DoodadInfo;
|
} DoodadInfo;
|
||||||
|
@ -137,8 +137,8 @@ typedef struct _KeyInfo
|
||||||
char name[8];
|
char name[8];
|
||||||
short gap;
|
short gap;
|
||||||
short index;
|
short index;
|
||||||
CARD32 shape;
|
uint32_t shape;
|
||||||
CARD32 color;
|
uint32_t color;
|
||||||
struct _RowInfo *row;
|
struct _RowInfo *row;
|
||||||
} KeyInfo;
|
} KeyInfo;
|
||||||
#define keyText(k) ((k)&&(k)->name[0]?(k)->name:"default")
|
#define keyText(k) ((k)&&(k)->name[0]?(k)->name:"default")
|
||||||
|
@ -175,7 +175,7 @@ typedef struct _OverlayKeyInfo
|
||||||
typedef struct _OverlayInfo
|
typedef struct _OverlayInfo
|
||||||
{
|
{
|
||||||
CommonInfo defs;
|
CommonInfo defs;
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
unsigned short nRows;
|
unsigned short nRows;
|
||||||
unsigned short nKeys;
|
unsigned short nKeys;
|
||||||
OverlayKeyInfo *keys;
|
OverlayKeyInfo *keys;
|
||||||
|
@ -195,7 +195,7 @@ typedef struct _OverlayInfo
|
||||||
typedef struct _SectionInfo
|
typedef struct _SectionInfo
|
||||||
{
|
{
|
||||||
CommonInfo defs;
|
CommonInfo defs;
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
unsigned short top;
|
unsigned short top;
|
||||||
unsigned short left;
|
unsigned short left;
|
||||||
unsigned short width;
|
unsigned short width;
|
||||||
|
@ -233,16 +233,16 @@ typedef struct _GeometryInfo
|
||||||
DoodadInfo *doodads;
|
DoodadInfo *doodads;
|
||||||
int widthMM;
|
int widthMM;
|
||||||
int heightMM;
|
int heightMM;
|
||||||
CARD32 font;
|
uint32_t font;
|
||||||
CARD32 fontSlant;
|
uint32_t fontSlant;
|
||||||
CARD32 fontWeight;
|
uint32_t fontWeight;
|
||||||
CARD32 fontSetWidth;
|
uint32_t fontSetWidth;
|
||||||
CARD32 fontVariant;
|
uint32_t fontVariant;
|
||||||
unsigned fontSize;
|
unsigned fontSize;
|
||||||
CARD32 fontEncoding;
|
uint32_t fontEncoding;
|
||||||
CARD32 fontSpec;
|
uint32_t fontSpec;
|
||||||
CARD32 baseColor;
|
uint32_t baseColor;
|
||||||
CARD32 labelColor;
|
uint32_t labelColor;
|
||||||
int dfltCornerRadius;
|
int dfltCornerRadius;
|
||||||
SectionInfo dfltSection;
|
SectionInfo dfltSection;
|
||||||
DoodadInfo *dfltDoodads;
|
DoodadInfo *dfltDoodads;
|
||||||
|
@ -428,7 +428,7 @@ FindDoodadByType(DoodadInfo * di, unsigned type)
|
||||||
}
|
}
|
||||||
|
|
||||||
static DoodadInfo *
|
static DoodadInfo *
|
||||||
FindDoodadByName(DoodadInfo * di, CARD32 name)
|
FindDoodadByName(DoodadInfo * di, uint32_t name)
|
||||||
{
|
{
|
||||||
while (di)
|
while (di)
|
||||||
{
|
{
|
||||||
|
@ -794,7 +794,7 @@ NextShape(GeometryInfo * info)
|
||||||
}
|
}
|
||||||
|
|
||||||
static ShapeInfo *
|
static ShapeInfo *
|
||||||
FindShape(GeometryInfo * info, CARD32 name, const char *type, const char *which)
|
FindShape(GeometryInfo * info, uint32_t name, const char *type, const char *which)
|
||||||
{
|
{
|
||||||
ShapeInfo *old;
|
ShapeInfo *old;
|
||||||
|
|
||||||
|
@ -1510,7 +1510,7 @@ SetTextDoodadField(DoodadInfo * di,
|
||||||
char *typeName = "text doodad";
|
char *typeName = "text doodad";
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
CARD32 *str;
|
uint32_t *str;
|
||||||
short *ival;
|
short *ival;
|
||||||
unsigned short *uval;
|
unsigned short *uval;
|
||||||
} pField;
|
} pField;
|
||||||
|
@ -2118,7 +2118,7 @@ HandleGeometryVar(VarDef * stmt, XkbcDescPtr xkb, GeometryInfo * info)
|
||||||
ExprResult elem, field, tmp;
|
ExprResult elem, field, tmp;
|
||||||
ExprDef *ndx;
|
ExprDef *ndx;
|
||||||
DoodadInfo *di;
|
DoodadInfo *di;
|
||||||
CARD32 *pField = NULL;
|
uint32_t *pField = NULL;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (ExprResolveLhs(stmt->name, &elem, &field, &ndx) == 0)
|
if (ExprResolveLhs(stmt->name, &elem, &field, &ndx) == 0)
|
||||||
|
@ -2928,7 +2928,7 @@ CopyShapeDef(XkbcGeometryPtr geom, ShapeInfo * si)
|
||||||
register int i, n;
|
register int i, n;
|
||||||
XkbcShapePtr shape;
|
XkbcShapePtr shape;
|
||||||
XkbcOutlinePtr old_outline, outline;
|
XkbcOutlinePtr old_outline, outline;
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
|
|
||||||
si->index = geom->num_shapes;
|
si->index = geom->num_shapes;
|
||||||
name = si->name;
|
name = si->name;
|
||||||
|
@ -3255,10 +3255,10 @@ VerifyDoodadInfo(DoodadInfo * di, GeometryInfo * info)
|
||||||
#define FONT_TEMPLATE "-*-%s-%s-%s-%s-%s-*-%d-*-*-*-*-%s"
|
#define FONT_TEMPLATE "-*-%s-%s-%s-%s-%s-*-%d-*-*-*-*-%s"
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
FontFromParts(CARD32 fontTok,
|
FontFromParts(uint32_t fontTok,
|
||||||
CARD32 weightTok,
|
uint32_t weightTok,
|
||||||
CARD32 slantTok,
|
uint32_t slantTok,
|
||||||
CARD32 setWidthTok, CARD32 varTok, int size, CARD32 encodingTok)
|
uint32_t setWidthTok, uint32_t varTok, int size, uint32_t encodingTok)
|
||||||
{
|
{
|
||||||
int totalSize;
|
int totalSize;
|
||||||
char *font, *weight, *slant, *setWidth, *variant, *encoding;
|
char *font, *weight, *slant, *setWidth, *variant, *encoding;
|
||||||
|
@ -3288,7 +3288,7 @@ static Bool
|
||||||
CopyDoodadDef(XkbcGeometryPtr geom,
|
CopyDoodadDef(XkbcGeometryPtr geom,
|
||||||
XkbcSectionPtr section, DoodadInfo * di, GeometryInfo * info)
|
XkbcSectionPtr section, DoodadInfo * di, GeometryInfo * info)
|
||||||
{
|
{
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
XkbcDoodadPtr doodad;
|
XkbcDoodadPtr doodad;
|
||||||
XkbcColorPtr color;
|
XkbcColorPtr color;
|
||||||
XkbcShapePtr shape;
|
XkbcShapePtr shape;
|
||||||
|
@ -3473,7 +3473,7 @@ static Bool
|
||||||
CopyOverlayDef(XkbcGeometryPtr geom,
|
CopyOverlayDef(XkbcGeometryPtr geom,
|
||||||
XkbcSectionPtr section, OverlayInfo * oi, GeometryInfo * info)
|
XkbcSectionPtr section, OverlayInfo * oi, GeometryInfo * info)
|
||||||
{
|
{
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
XkbcOverlayPtr ol;
|
XkbcOverlayPtr ol;
|
||||||
XkbcOverlayRowPtr row;
|
XkbcOverlayRowPtr row;
|
||||||
XkbcOverlayKeyPtr key;
|
XkbcOverlayKeyPtr key;
|
||||||
|
|
|
@ -513,7 +513,7 @@ BindIndicators(XkbcDescPtr xkb, Bool force, LEDInfo *unbound,
|
||||||
if ((xkb->names != NULL) &&
|
if ((xkb->names != NULL) &&
|
||||||
(xkb->names->indicators[led->indicator - 1] != led->name))
|
(xkb->names->indicators[led->indicator - 1] != led->name))
|
||||||
{
|
{
|
||||||
CARD32 old = xkb->names->indicators[led->indicator - 1];
|
uint32_t old = xkb->names->indicators[led->indicator - 1];
|
||||||
ERROR("Multiple names bound to indicator %d\n",
|
ERROR("Multiple names bound to indicator %d\n",
|
||||||
(unsigned int) led->indicator);
|
(unsigned int) led->indicator);
|
||||||
ACTION("Using %s, ignoring %s\n",
|
ACTION("Using %s, ignoring %s\n",
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
typedef struct _LEDInfo
|
typedef struct _LEDInfo
|
||||||
{
|
{
|
||||||
CommonInfo defs;
|
CommonInfo defs;
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
unsigned char indicator;
|
unsigned char indicator;
|
||||||
unsigned char flags;
|
unsigned char flags;
|
||||||
unsigned char which_mods;
|
unsigned char which_mods;
|
||||||
|
|
|
@ -60,7 +60,7 @@ typedef struct _IndicatorNameInfo
|
||||||
{
|
{
|
||||||
CommonInfo defs;
|
CommonInfo defs;
|
||||||
int ndx;
|
int ndx;
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
Bool virtual;
|
Bool virtual;
|
||||||
} IndicatorNameInfo;
|
} IndicatorNameInfo;
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ FindIndicatorByIndex(KeyNamesInfo * info, int ndx)
|
||||||
}
|
}
|
||||||
|
|
||||||
static IndicatorNameInfo *
|
static IndicatorNameInfo *
|
||||||
FindIndicatorByName(KeyNamesInfo * info, CARD32 name)
|
FindIndicatorByName(KeyNamesInfo * info, uint32_t name)
|
||||||
{
|
{
|
||||||
IndicatorNameInfo *old;
|
IndicatorNameInfo *old;
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const char *oldType, *newType;
|
const char *oldType, *newType;
|
||||||
CARD32 using, ignoring;
|
uint32_t using, ignoring;
|
||||||
if (old->virtual)
|
if (old->virtual)
|
||||||
oldType = "virtual indicator";
|
oldType = "virtual indicator";
|
||||||
else
|
else
|
||||||
|
|
|
@ -52,7 +52,7 @@ typedef struct _PreserveInfo
|
||||||
typedef struct _KeyTypeInfo
|
typedef struct _KeyTypeInfo
|
||||||
{
|
{
|
||||||
CommonInfo defs;
|
CommonInfo defs;
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
int fileID;
|
int fileID;
|
||||||
unsigned mask;
|
unsigned mask;
|
||||||
unsigned vmask;
|
unsigned vmask;
|
||||||
|
@ -63,7 +63,7 @@ typedef struct _KeyTypeInfo
|
||||||
XkbcKTMapEntryPtr entries;
|
XkbcKTMapEntryPtr entries;
|
||||||
PreserveInfo *preserve;
|
PreserveInfo *preserve;
|
||||||
int szNames;
|
int szNames;
|
||||||
CARD32 *lvlNames;
|
uint32_t *lvlNames;
|
||||||
} KeyTypeInfo;
|
} KeyTypeInfo;
|
||||||
|
|
||||||
typedef struct _KeyTypesInfo
|
typedef struct _KeyTypesInfo
|
||||||
|
@ -78,10 +78,10 @@ typedef struct _KeyTypesInfo
|
||||||
VModInfo vmods;
|
VModInfo vmods;
|
||||||
} KeyTypesInfo;
|
} KeyTypesInfo;
|
||||||
|
|
||||||
CARD32 tok_ONE_LEVEL;
|
uint32_t tok_ONE_LEVEL;
|
||||||
CARD32 tok_TWO_LEVEL;
|
uint32_t tok_TWO_LEVEL;
|
||||||
CARD32 tok_ALPHABETIC;
|
uint32_t tok_ALPHABETIC;
|
||||||
CARD32 tok_KEYPAD;
|
uint32_t tok_KEYPAD;
|
||||||
|
|
||||||
/***====================================================================***/
|
/***====================================================================***/
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ extern Bool AddPreserve(XkbcDescPtr /* xkb */ ,
|
||||||
|
|
||||||
extern Bool AddLevelName(KeyTypeInfo * /* type */ ,
|
extern Bool AddLevelName(KeyTypeInfo * /* type */ ,
|
||||||
unsigned /* level */ ,
|
unsigned /* level */ ,
|
||||||
CARD32 /* name */ ,
|
uint32_t /* name */ ,
|
||||||
Bool /* clobber */ ,
|
Bool /* clobber */ ,
|
||||||
Bool /* report */
|
Bool /* report */
|
||||||
);
|
);
|
||||||
|
@ -168,10 +168,10 @@ InitKeyTypesInfo(KeyTypesInfo * info, XkbcDescPtr xkb, KeyTypesInfo * from)
|
||||||
}
|
}
|
||||||
if (from->dflt.lvlNames)
|
if (from->dflt.lvlNames)
|
||||||
{
|
{
|
||||||
info->dflt.lvlNames = uTypedCalloc(from->dflt.szNames, CARD32);
|
info->dflt.lvlNames = uTypedCalloc(from->dflt.szNames, uint32_t);
|
||||||
if (info->dflt.lvlNames)
|
if (info->dflt.lvlNames)
|
||||||
{
|
{
|
||||||
register unsigned sz = from->dflt.szNames * sizeof(CARD32);
|
register unsigned sz = from->dflt.szNames * sizeof(uint32_t);
|
||||||
memcpy(info->dflt.lvlNames, from->dflt.lvlNames, sz);
|
memcpy(info->dflt.lvlNames, from->dflt.lvlNames, sz);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -783,12 +783,12 @@ SetPreserve(KeyTypeInfo * type,
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
AddLevelName(KeyTypeInfo * type,
|
AddLevelName(KeyTypeInfo * type,
|
||||||
unsigned level, CARD32 name, Bool clobber, Bool report)
|
unsigned level, uint32_t name, Bool clobber, Bool report)
|
||||||
{
|
{
|
||||||
if ((type->lvlNames == NULL) || (type->szNames <= level))
|
if ((type->lvlNames == NULL) || (type->szNames <= level))
|
||||||
{
|
{
|
||||||
type->lvlNames =
|
type->lvlNames =
|
||||||
uTypedRecalloc(type->lvlNames, type->szNames, level + 1, CARD32);
|
uTypedRecalloc(type->lvlNames, type->szNames, level + 1, uint32_t);
|
||||||
if (type->lvlNames == NULL)
|
if (type->lvlNames == NULL)
|
||||||
{
|
{
|
||||||
ERROR("Couldn't allocate level names for type %s\n",
|
ERROR("Couldn't allocate level names for type %s\n",
|
||||||
|
@ -837,7 +837,7 @@ SetLevelName(KeyTypeInfo * type, ExprDef * arrayNdx, ExprDef * value)
|
||||||
{
|
{
|
||||||
ExprResult rtrn;
|
ExprResult rtrn;
|
||||||
unsigned level;
|
unsigned level;
|
||||||
CARD32 level_name;
|
uint32_t level_name;
|
||||||
|
|
||||||
if (arrayNdx == NULL)
|
if (arrayNdx == NULL)
|
||||||
return ReportTypeShouldBeArray(type, "level name");
|
return ReportTypeShouldBeArray(type, "level name");
|
||||||
|
@ -1177,15 +1177,15 @@ CopyDefToKeyType(XkbcDescPtr xkb, XkbcKeyTypePtr type, KeyTypeInfo * def)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
type->preserve = NULL;
|
type->preserve = NULL;
|
||||||
type->name = (CARD32) def->name;
|
type->name = (uint32_t) def->name;
|
||||||
if (def->szNames > 0)
|
if (def->szNames > 0)
|
||||||
{
|
{
|
||||||
type->level_names = uTypedCalloc(def->numLevels, CARD32);
|
type->level_names = uTypedCalloc(def->numLevels, uint32_t);
|
||||||
|
|
||||||
/* assert def->szNames<=def->numLevels */
|
/* assert def->szNames<=def->numLevels */
|
||||||
for (i = 0; i < def->szNames; i++)
|
for (i = 0; i < def->szNames; i++)
|
||||||
{
|
{
|
||||||
type->level_names[i] = (CARD32) def->lvlNames[i];
|
type->level_names[i] = (uint32_t) def->lvlNames[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -256,8 +256,8 @@ AddCommonInfo(CommonInfo * old, CommonInfo * new)
|
||||||
|
|
||||||
typedef struct _KeyNameDesc
|
typedef struct _KeyNameDesc
|
||||||
{
|
{
|
||||||
CARD32 level1;
|
uint32_t level1;
|
||||||
CARD32 level2;
|
uint32_t level2;
|
||||||
char name[5];
|
char name[5];
|
||||||
Bool used;
|
Bool used;
|
||||||
} KeyNameDesc;
|
} KeyNameDesc;
|
||||||
|
|
|
@ -166,7 +166,7 @@ KeyAliasCreate(char *alias, char *real)
|
||||||
}
|
}
|
||||||
|
|
||||||
VModDef *
|
VModDef *
|
||||||
VModCreate(CARD32 name, ExprDef * value)
|
VModCreate(uint32_t name, ExprDef * value)
|
||||||
{
|
{
|
||||||
VModDef *def;
|
VModDef *def;
|
||||||
def = uTypedAlloc(VModDef);
|
def = uTypedAlloc(VModDef);
|
||||||
|
@ -206,7 +206,7 @@ VarCreate(ExprDef * name, ExprDef * value)
|
||||||
}
|
}
|
||||||
|
|
||||||
VarDef *
|
VarDef *
|
||||||
BoolVarCreate(CARD32 nameToken, unsigned set)
|
BoolVarCreate(uint32_t nameToken, unsigned set)
|
||||||
{
|
{
|
||||||
ExprDef *name, *value;
|
ExprDef *name, *value;
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@ InterpCreate(char *sym, ExprDef * match)
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyTypeDef *
|
KeyTypeDef *
|
||||||
KeyTypeCreate(CARD32 name, VarDef * body)
|
KeyTypeCreate(uint32_t name, VarDef * body)
|
||||||
{
|
{
|
||||||
KeyTypeDef *def;
|
KeyTypeDef *def;
|
||||||
|
|
||||||
|
@ -306,7 +306,7 @@ GroupCompatCreate(int group, ExprDef * val)
|
||||||
}
|
}
|
||||||
|
|
||||||
ModMapDef *
|
ModMapDef *
|
||||||
ModMapCreate(CARD32 modifier, ExprDef * keys)
|
ModMapCreate(uint32_t modifier, ExprDef * keys)
|
||||||
{
|
{
|
||||||
ModMapDef *def;
|
ModMapDef *def;
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ ModMapCreate(CARD32 modifier, ExprDef * keys)
|
||||||
}
|
}
|
||||||
|
|
||||||
IndicatorMapDef *
|
IndicatorMapDef *
|
||||||
IndicatorMapCreate(CARD32 name, VarDef * body)
|
IndicatorMapCreate(uint32_t name, VarDef * body)
|
||||||
{
|
{
|
||||||
IndicatorMapDef *def;
|
IndicatorMapDef *def;
|
||||||
|
|
||||||
|
@ -373,7 +373,7 @@ IndicatorNameCreate(int ndx, ExprDef * name, Bool virtual)
|
||||||
}
|
}
|
||||||
|
|
||||||
ExprDef *
|
ExprDef *
|
||||||
ActionCreate(CARD32 name, ExprDef * args)
|
ActionCreate(uint32_t name, ExprDef * args)
|
||||||
{
|
{
|
||||||
ExprDef *act;
|
ExprDef *act;
|
||||||
|
|
||||||
|
@ -413,7 +413,7 @@ CreateKeysymList(char *sym)
|
||||||
}
|
}
|
||||||
|
|
||||||
ShapeDef *
|
ShapeDef *
|
||||||
ShapeDeclCreate(CARD32 name, OutlineDef * outlines)
|
ShapeDeclCreate(uint32_t name, OutlineDef * outlines)
|
||||||
{
|
{
|
||||||
ShapeDef *shape;
|
ShapeDef *shape;
|
||||||
OutlineDef *ol;
|
OutlineDef *ol;
|
||||||
|
@ -438,7 +438,7 @@ ShapeDeclCreate(CARD32 name, OutlineDef * outlines)
|
||||||
}
|
}
|
||||||
|
|
||||||
OutlineDef *
|
OutlineDef *
|
||||||
OutlineCreate(CARD32 field, ExprDef * points)
|
OutlineCreate(uint32_t field, ExprDef * points)
|
||||||
{
|
{
|
||||||
OutlineDef *outline;
|
OutlineDef *outline;
|
||||||
ExprDef *pt;
|
ExprDef *pt;
|
||||||
|
@ -516,7 +516,7 @@ RowDeclCreate(KeyDef * keys)
|
||||||
}
|
}
|
||||||
|
|
||||||
SectionDef *
|
SectionDef *
|
||||||
SectionDeclCreate(CARD32 name, RowDef * rows)
|
SectionDeclCreate(uint32_t name, RowDef * rows)
|
||||||
{
|
{
|
||||||
SectionDef *section;
|
SectionDef *section;
|
||||||
RowDef *row;
|
RowDef *row;
|
||||||
|
@ -560,7 +560,7 @@ OverlayKeyCreate(char *under, char *over)
|
||||||
}
|
}
|
||||||
|
|
||||||
OverlayDef *
|
OverlayDef *
|
||||||
OverlayDeclCreate(CARD32 name, OverlayKeyDef * keys)
|
OverlayDeclCreate(uint32_t name, OverlayKeyDef * keys)
|
||||||
{
|
{
|
||||||
OverlayDef *ol;
|
OverlayDef *ol;
|
||||||
OverlayKeyDef *key;
|
OverlayKeyDef *key;
|
||||||
|
@ -582,7 +582,7 @@ OverlayDeclCreate(CARD32 name, OverlayKeyDef * keys)
|
||||||
}
|
}
|
||||||
|
|
||||||
DoodadDef *
|
DoodadDef *
|
||||||
DoodadCreate(unsigned type, CARD32 name, VarDef * body)
|
DoodadCreate(unsigned type, uint32_t name, VarDef * body)
|
||||||
{
|
{
|
||||||
DoodadDef *doodad;
|
DoodadDef *doodad;
|
||||||
|
|
||||||
|
@ -620,9 +620,9 @@ AppendKeysymList(ExprDef * list, char *sym)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
LookupKeysym(char *str, CARD32 * sym_rtrn)
|
LookupKeysym(char *str, uint32_t * sym_rtrn)
|
||||||
{
|
{
|
||||||
CARD32 sym;
|
uint32_t sym;
|
||||||
|
|
||||||
if ((!str) || (uStrCaseCmp(str, "any") == 0)
|
if ((!str) || (uStrCaseCmp(str, "any") == 0)
|
||||||
|| (uStrCaseCmp(str, "nosymbol") == 0))
|
|| (uStrCaseCmp(str, "nosymbol") == 0))
|
||||||
|
|
|
@ -76,7 +76,7 @@ extern KeyAliasDef *KeyAliasCreate(char * /* alias */ ,
|
||||||
char * /* real */
|
char * /* real */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern VModDef *VModCreate(CARD32 /* name */ ,
|
extern VModDef *VModCreate(uint32_t /* name */ ,
|
||||||
ExprDef * /* value */
|
ExprDef * /* value */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ extern VarDef *VarCreate(ExprDef * /* name */ ,
|
||||||
ExprDef * /* value */
|
ExprDef * /* value */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern VarDef *BoolVarCreate(CARD32 /* nameToken */ ,
|
extern VarDef *BoolVarCreate(uint32_t /* nameToken */ ,
|
||||||
unsigned /* set */
|
unsigned /* set */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ extern InterpDef *InterpCreate(char * /* sym */ ,
|
||||||
ExprDef * /* match */
|
ExprDef * /* match */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern KeyTypeDef *KeyTypeCreate(CARD32 /* name */ ,
|
extern KeyTypeDef *KeyTypeCreate(uint32_t /* name */ ,
|
||||||
VarDef * /* body */
|
VarDef * /* body */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -104,11 +104,11 @@ extern GroupCompatDef *GroupCompatCreate(int /* group */ ,
|
||||||
ExprDef * /* def */
|
ExprDef * /* def */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern ModMapDef *ModMapCreate(CARD32 /* modifier */ ,
|
extern ModMapDef *ModMapCreate(uint32_t /* modifier */ ,
|
||||||
ExprDef * /* keys */
|
ExprDef * /* keys */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern IndicatorMapDef *IndicatorMapCreate(CARD32 /* name */ ,
|
extern IndicatorMapDef *IndicatorMapCreate(uint32_t /* name */ ,
|
||||||
VarDef * /* body */
|
VarDef * /* body */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -117,18 +117,18 @@ extern IndicatorNameDef *IndicatorNameCreate(int /* ndx */ ,
|
||||||
Bool /* virtual */
|
Bool /* virtual */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern ExprDef *ActionCreate(CARD32 /* name */ ,
|
extern ExprDef *ActionCreate(uint32_t /* name */ ,
|
||||||
ExprDef * /* args */
|
ExprDef * /* args */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern ExprDef *CreateKeysymList(char * /* sym */
|
extern ExprDef *CreateKeysymList(char * /* sym */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern ShapeDef *ShapeDeclCreate(CARD32 /* name */ ,
|
extern ShapeDef *ShapeDeclCreate(uint32_t /* name */ ,
|
||||||
OutlineDef * /* outlines */
|
OutlineDef * /* outlines */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern OutlineDef *OutlineCreate(CARD32 /* field */ ,
|
extern OutlineDef *OutlineCreate(uint32_t /* field */ ,
|
||||||
ExprDef * /* points */
|
ExprDef * /* points */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ extern KeyDef *KeyDeclMerge(KeyDef * /* into */ ,
|
||||||
extern RowDef *RowDeclCreate(KeyDef * /* keys */
|
extern RowDef *RowDeclCreate(KeyDef * /* keys */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern SectionDef *SectionDeclCreate(CARD32 /* name */ ,
|
extern SectionDef *SectionDeclCreate(uint32_t /* name */ ,
|
||||||
RowDef * /* rows */
|
RowDef * /* rows */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -151,12 +151,12 @@ extern OverlayKeyDef *OverlayKeyCreate(char * /* under */ ,
|
||||||
char * /* over */
|
char * /* over */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern OverlayDef *OverlayDeclCreate(CARD32 /* name */ ,
|
extern OverlayDef *OverlayDeclCreate(uint32_t /* name */ ,
|
||||||
OverlayKeyDef * /* rows */
|
OverlayKeyDef * /* rows */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern DoodadDef *DoodadCreate(unsigned /* type */ ,
|
extern DoodadDef *DoodadCreate(unsigned /* type */ ,
|
||||||
CARD32 /* name */ ,
|
uint32_t /* name */ ,
|
||||||
VarDef * /* body */
|
VarDef * /* body */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ extern ExprDef *AppendKeysymList(ExprDef * /* list */ ,
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int LookupKeysym(char * /* str */ ,
|
extern int LookupKeysym(char * /* str */ ,
|
||||||
CARD32 * /* sym_rtrn */
|
uint32_t * /* sym_rtrn */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern IncludeStmt *IncludeCreate(char * /* str */ ,
|
extern IncludeStmt *IncludeCreate(char * /* str */ ,
|
||||||
|
|
|
@ -42,9 +42,9 @@
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "alias.h"
|
#include "alias.h"
|
||||||
|
|
||||||
extern CARD32 tok_ONE_LEVEL;
|
extern uint32_t tok_ONE_LEVEL;
|
||||||
extern CARD32 tok_TWO_LEVEL;
|
extern uint32_t tok_TWO_LEVEL;
|
||||||
extern CARD32 tok_KEYPAD;
|
extern uint32_t tok_KEYPAD;
|
||||||
|
|
||||||
/***====================================================================***/
|
/***====================================================================***/
|
||||||
|
|
||||||
|
@ -70,15 +70,15 @@ typedef struct _KeyInfo
|
||||||
unsigned char symsDefined;
|
unsigned char symsDefined;
|
||||||
unsigned char actsDefined;
|
unsigned char actsDefined;
|
||||||
short numLevels[XkbNumKbdGroups];
|
short numLevels[XkbNumKbdGroups];
|
||||||
CARD32 *syms[XkbNumKbdGroups];
|
uint32_t *syms[XkbNumKbdGroups];
|
||||||
XkbcAction *acts[XkbNumKbdGroups];
|
XkbcAction *acts[XkbNumKbdGroups];
|
||||||
CARD32 types[XkbNumKbdGroups];
|
uint32_t types[XkbNumKbdGroups];
|
||||||
unsigned repeat;
|
unsigned repeat;
|
||||||
XkbBehavior behavior;
|
XkbBehavior behavior;
|
||||||
unsigned short vmodmap;
|
unsigned short vmodmap;
|
||||||
unsigned long nameForOverlayKey;
|
unsigned long nameForOverlayKey;
|
||||||
unsigned long allowNone;
|
unsigned long allowNone;
|
||||||
CARD32 dfltType;
|
uint32_t dfltType;
|
||||||
} KeyInfo;
|
} KeyInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -178,7 +178,7 @@ CopyKeyInfo(KeyInfo * old, KeyInfo * new, Bool clearOld)
|
||||||
width = new->numLevels[i];
|
width = new->numLevels[i];
|
||||||
if (old->syms[i] != NULL)
|
if (old->syms[i] != NULL)
|
||||||
{
|
{
|
||||||
new->syms[i] = uTypedCalloc(width, CARD32);
|
new->syms[i] = uTypedCalloc(width, uint32_t);
|
||||||
if (!new->syms[i])
|
if (!new->syms[i])
|
||||||
{
|
{
|
||||||
new->syms[i] = NULL;
|
new->syms[i] = NULL;
|
||||||
|
@ -186,7 +186,7 @@ CopyKeyInfo(KeyInfo * old, KeyInfo * new, Bool clearOld)
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
memcpy((char *) new->syms[i], (char *) old->syms[i],
|
memcpy((char *) new->syms[i], (char *) old->syms[i],
|
||||||
width * sizeof(CARD32));
|
width * sizeof(uint32_t));
|
||||||
}
|
}
|
||||||
if (old->acts[i] != NULL)
|
if (old->acts[i] != NULL)
|
||||||
{
|
{
|
||||||
|
@ -214,7 +214,7 @@ typedef struct _ModMapEntry
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
unsigned long keyName;
|
unsigned long keyName;
|
||||||
CARD32 keySym;
|
uint32_t keySym;
|
||||||
} u;
|
} u;
|
||||||
} ModMapEntry;
|
} ModMapEntry;
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ typedef struct _SymbolsInfo
|
||||||
KeyInfo dflt;
|
KeyInfo dflt;
|
||||||
VModInfo vmods;
|
VModInfo vmods;
|
||||||
ActionInfo *action;
|
ActionInfo *action;
|
||||||
CARD32 groupNames[XkbNumKbdGroups];
|
uint32_t groupNames[XkbNumKbdGroups];
|
||||||
|
|
||||||
ModMapEntry *modMap;
|
ModMapEntry *modMap;
|
||||||
AliasInfo *aliases;
|
AliasInfo *aliases;
|
||||||
|
@ -315,7 +315,7 @@ ResizeKeyGroup(KeyInfo * key,
|
||||||
{
|
{
|
||||||
key->syms[group] = uTypedRecalloc(key->syms[group],
|
key->syms[group] = uTypedRecalloc(key->syms[group],
|
||||||
key->numLevels[group], newWidth,
|
key->numLevels[group], newWidth,
|
||||||
CARD32);
|
uint32_t);
|
||||||
if (!key->syms[group])
|
if (!key->syms[group])
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
@ -336,7 +336,7 @@ static Bool
|
||||||
MergeKeyGroups(SymbolsInfo * info,
|
MergeKeyGroups(SymbolsInfo * info,
|
||||||
KeyInfo * into, KeyInfo * from, unsigned group)
|
KeyInfo * into, KeyInfo * from, unsigned group)
|
||||||
{
|
{
|
||||||
CARD32 *resultSyms;
|
uint32_t *resultSyms;
|
||||||
XkbcAction *resultActs;
|
XkbcAction *resultActs;
|
||||||
int resultWidth;
|
int resultWidth;
|
||||||
register int i;
|
register int i;
|
||||||
|
@ -359,7 +359,7 @@ MergeKeyGroups(SymbolsInfo * info,
|
||||||
}
|
}
|
||||||
if (resultSyms == NULL)
|
if (resultSyms == NULL)
|
||||||
{
|
{
|
||||||
resultSyms = uTypedCalloc(resultWidth, CARD32);
|
resultSyms = uTypedCalloc(resultWidth, uint32_t);
|
||||||
if (!resultSyms)
|
if (!resultSyms)
|
||||||
{
|
{
|
||||||
WSGO("Could not allocate symbols for group merge\n");
|
WSGO("Could not allocate symbols for group merge\n");
|
||||||
|
@ -381,7 +381,7 @@ MergeKeyGroups(SymbolsInfo * info,
|
||||||
}
|
}
|
||||||
for (i = 0; i < resultWidth; i++)
|
for (i = 0; i < resultWidth; i++)
|
||||||
{
|
{
|
||||||
CARD32 fromSym, toSym;
|
uint32_t fromSym, toSym;
|
||||||
if (from->syms[group] && (i < from->numLevels[group]))
|
if (from->syms[group] && (i < from->numLevels[group]))
|
||||||
fromSym = from->syms[group][i];
|
fromSym = from->syms[group][i];
|
||||||
else
|
else
|
||||||
|
@ -396,7 +396,7 @@ MergeKeyGroups(SymbolsInfo * info,
|
||||||
resultSyms[i] = fromSym;
|
resultSyms[i] = fromSym;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CARD32 use, ignore;
|
uint32_t use, ignore;
|
||||||
if (clobber)
|
if (clobber)
|
||||||
{
|
{
|
||||||
use = fromSym;
|
use = fromSym;
|
||||||
|
@ -540,7 +540,7 @@ MergeKeys(SymbolsInfo * info, KeyInfo * into, KeyInfo * from)
|
||||||
if ((into->types[i] != None) && (report) &&
|
if ((into->types[i] != None) && (report) &&
|
||||||
(into->types[i] != from->types[i]))
|
(into->types[i] != from->types[i]))
|
||||||
{
|
{
|
||||||
CARD32 use, ignore;
|
uint32_t use, ignore;
|
||||||
collide |= _Key_Types;
|
collide |= _Key_Types;
|
||||||
if (from->defs.merge != MergeAugment)
|
if (from->defs.merge != MergeAugment)
|
||||||
{
|
{
|
||||||
|
@ -1565,11 +1565,11 @@ SetExplicitGroup(SymbolsInfo * info, KeyInfo * key)
|
||||||
key->numLevels[i] = 0;
|
key->numLevels[i] = 0;
|
||||||
if (key->syms[i] != NULL)
|
if (key->syms[i] != NULL)
|
||||||
uFree(key->syms[i]);
|
uFree(key->syms[i]);
|
||||||
key->syms[i] = (CARD32 *) NULL;
|
key->syms[i] = (uint32_t *) NULL;
|
||||||
if (key->acts[i] != NULL)
|
if (key->acts[i] != NULL)
|
||||||
uFree(key->acts[i]);
|
uFree(key->acts[i]);
|
||||||
key->acts[i] = (XkbcAction *) NULL;
|
key->acts[i] = (XkbcAction *) NULL;
|
||||||
key->types[i] = (CARD32) 0;
|
key->types[i] = (uint32_t) 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
key->typesDefined = key->symsDefined = key->actsDefined = 1 << group;
|
key->typesDefined = key->symsDefined = key->actsDefined = 1 << group;
|
||||||
|
@ -1577,11 +1577,11 @@ SetExplicitGroup(SymbolsInfo * info, KeyInfo * key)
|
||||||
key->numLevels[group] = key->numLevels[0];
|
key->numLevels[group] = key->numLevels[0];
|
||||||
key->numLevels[0] = 0;
|
key->numLevels[0] = 0;
|
||||||
key->syms[group] = key->syms[0];
|
key->syms[group] = key->syms[0];
|
||||||
key->syms[0] = (CARD32 *) NULL;
|
key->syms[0] = (uint32_t *) NULL;
|
||||||
key->acts[group] = key->acts[0];
|
key->acts[group] = key->acts[0];
|
||||||
key->acts[0] = (XkbcAction *) NULL;
|
key->acts[0] = (XkbcAction *) NULL;
|
||||||
key->types[group] = key->types[0];
|
key->types[group] = key->types[0];
|
||||||
key->types[0] = (CARD32) 0;
|
key->types[0] = (uint32_t) 0;
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1720,7 +1720,7 @@ HandleSymbolsFile(XkbFile * file,
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
FindKeyForSymbol(XkbcDescPtr xkb, CARD32 sym, unsigned int *kc_rtrn)
|
FindKeyForSymbol(XkbcDescPtr xkb, uint32_t sym, unsigned int *kc_rtrn)
|
||||||
{
|
{
|
||||||
register int i, j;
|
register int i, j;
|
||||||
register Bool gotOne;
|
register Bool gotOne;
|
||||||
|
@ -1756,7 +1756,7 @@ FindKeyForSymbol(XkbcDescPtr xkb, CARD32 sym, unsigned int *kc_rtrn)
|
||||||
* @return True if found, False otherwise.
|
* @return True if found, False otherwise.
|
||||||
*/
|
*/
|
||||||
static Bool
|
static Bool
|
||||||
FindNamedType(XkbcDescPtr xkb, CARD32 name, unsigned *type_rtrn)
|
FindNamedType(XkbcDescPtr xkb, uint32_t name, unsigned *type_rtrn)
|
||||||
{
|
{
|
||||||
register unsigned n;
|
register unsigned n;
|
||||||
|
|
||||||
|
@ -1764,7 +1764,7 @@ FindNamedType(XkbcDescPtr xkb, CARD32 name, unsigned *type_rtrn)
|
||||||
{
|
{
|
||||||
for (n = 0; n < xkb->map->num_types; n++)
|
for (n = 0; n < xkb->map->num_types; n++)
|
||||||
{
|
{
|
||||||
if (xkb->map->types[n].name == (CARD32) name)
|
if (xkb->map->types[n].name == (uint32_t) name)
|
||||||
{
|
{
|
||||||
*type_rtrn = n;
|
*type_rtrn = n;
|
||||||
return True;
|
return True;
|
||||||
|
@ -1791,7 +1791,7 @@ FindNamedType(XkbcDescPtr xkb, CARD32 name, unsigned *type_rtrn)
|
||||||
* @returns True if a type could be found, False otherwise.
|
* @returns True if a type could be found, False otherwise.
|
||||||
*/
|
*/
|
||||||
static Bool
|
static Bool
|
||||||
FindAutomaticType(int width, CARD32 * syms, CARD32 * typeNameRtrn,
|
FindAutomaticType(int width, uint32_t * syms, uint32_t * typeNameRtrn,
|
||||||
Bool * autoType)
|
Bool * autoType)
|
||||||
{
|
{
|
||||||
*autoType = False;
|
*autoType = False;
|
||||||
|
@ -1885,11 +1885,11 @@ PrepareKeyDef(KeyInfo * key)
|
||||||
}
|
}
|
||||||
if ((key->symsDefined & 1) && key->syms[0])
|
if ((key->symsDefined & 1) && key->syms[0])
|
||||||
{
|
{
|
||||||
key->syms[i] = uTypedCalloc(width, CARD32);
|
key->syms[i] = uTypedCalloc(width, uint32_t);
|
||||||
if (key->syms[i] == NULL)
|
if (key->syms[i] == NULL)
|
||||||
continue;
|
continue;
|
||||||
memcpy((void *) key->syms[i], (void *) key->syms[0],
|
memcpy((void *) key->syms[i], (void *) key->syms[0],
|
||||||
width * sizeof(CARD32));
|
width * sizeof(uint32_t));
|
||||||
key->symsDefined |= 1 << i;
|
key->symsDefined |= 1 << i;
|
||||||
}
|
}
|
||||||
if (defined & 1)
|
if (defined & 1)
|
||||||
|
@ -1911,7 +1911,7 @@ PrepareKeyDef(KeyInfo * key)
|
||||||
if ((key->syms[i] != key->syms[0]) &&
|
if ((key->syms[i] != key->syms[0]) &&
|
||||||
(key->syms[i] == NULL || key->syms[0] == NULL ||
|
(key->syms[i] == NULL || key->syms[0] == NULL ||
|
||||||
memcmp((void *) key->syms[i], (void *) key->syms[0],
|
memcmp((void *) key->syms[i], (void *) key->syms[0],
|
||||||
sizeof(CARD32) * key->numLevels[0])))
|
sizeof(uint32_t) * key->numLevels[0])))
|
||||||
{
|
{
|
||||||
identical = False;
|
identical = False;
|
||||||
break;
|
break;
|
||||||
|
@ -1932,11 +1932,11 @@ PrepareKeyDef(KeyInfo * key)
|
||||||
key->numLevels[i] = 0;
|
key->numLevels[i] = 0;
|
||||||
if (key->syms[i] != NULL)
|
if (key->syms[i] != NULL)
|
||||||
uFree(key->syms[i]);
|
uFree(key->syms[i]);
|
||||||
key->syms[i] = (CARD32 *) NULL;
|
key->syms[i] = (uint32_t *) NULL;
|
||||||
if (key->acts[i] != NULL)
|
if (key->acts[i] != NULL)
|
||||||
uFree(key->acts[i]);
|
uFree(key->acts[i]);
|
||||||
key->acts[i] = (XkbcAction *) NULL;
|
key->acts[i] = (XkbcAction *) NULL;
|
||||||
key->types[i] = (CARD32) 0;
|
key->types[i] = (uint32_t) 0;
|
||||||
}
|
}
|
||||||
key->symsDefined &= 1;
|
key->symsDefined &= 1;
|
||||||
key->actsDefined &= 1;
|
key->actsDefined &= 1;
|
||||||
|
@ -1957,7 +1957,7 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
|
||||||
unsigned okc, kc, width, tmp, nGroups;
|
unsigned okc, kc, width, tmp, nGroups;
|
||||||
XkbcKeyTypePtr type;
|
XkbcKeyTypePtr type;
|
||||||
Bool haveActions, autoType, useAlias;
|
Bool haveActions, autoType, useAlias;
|
||||||
CARD32 *outSyms;
|
uint32_t *outSyms;
|
||||||
XkbcAction *outActs;
|
XkbcAction *outActs;
|
||||||
unsigned types[XkbNumKbdGroups];
|
unsigned types[XkbNumKbdGroups];
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,7 @@
|
||||||
#ifndef TOKENS_H
|
#ifndef TOKENS_H
|
||||||
#define TOKENS_H 1
|
#define TOKENS_H 1
|
||||||
|
|
||||||
#include <X11/Xdefs.h>
|
#include <stdint.h>
|
||||||
#include <X11/Xmd.h>
|
|
||||||
|
|
||||||
#define END_OF_FILE 0
|
#define END_OF_FILE 0
|
||||||
#define ERROR_TOK 255
|
#define ERROR_TOK 255
|
||||||
|
@ -99,9 +98,9 @@
|
||||||
#define FUNCTION_KEYS 76
|
#define FUNCTION_KEYS 76
|
||||||
#define ALTERNATE_GROUP 77
|
#define ALTERNATE_GROUP 77
|
||||||
|
|
||||||
extern CARD32 tok_ONE_LEVEL;
|
extern uint32_t tok_ONE_LEVEL;
|
||||||
extern CARD32 tok_TWO_LEVEL;
|
extern uint32_t tok_TWO_LEVEL;
|
||||||
extern CARD32 tok_ALPHABETIC;
|
extern uint32_t tok_ALPHABETIC;
|
||||||
extern CARD32 tok_KEYPAD;
|
extern uint32_t tok_KEYPAD;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -32,35 +32,35 @@
|
||||||
|
|
||||||
/***====================================================================***/
|
/***====================================================================***/
|
||||||
|
|
||||||
Opaque
|
void *
|
||||||
uAlloc(unsigned size)
|
uAlloc(unsigned size)
|
||||||
{
|
{
|
||||||
return ((Opaque) malloc(size));
|
return ((void *) malloc(size));
|
||||||
}
|
}
|
||||||
|
|
||||||
/***====================================================================***/
|
/***====================================================================***/
|
||||||
|
|
||||||
Opaque
|
void *
|
||||||
uCalloc(unsigned n, unsigned size)
|
uCalloc(unsigned n, unsigned size)
|
||||||
{
|
{
|
||||||
return ((Opaque) calloc(n, size));
|
return ((void *) calloc(n, size));
|
||||||
}
|
}
|
||||||
|
|
||||||
/***====================================================================***/
|
/***====================================================================***/
|
||||||
|
|
||||||
Opaque
|
void *
|
||||||
uRealloc(Opaque old, unsigned newSize)
|
uRealloc(void * old, unsigned newSize)
|
||||||
{
|
{
|
||||||
if (old == NULL)
|
if (old == NULL)
|
||||||
return ((Opaque) malloc(newSize));
|
return ((void *) malloc(newSize));
|
||||||
else
|
else
|
||||||
return ((Opaque) realloc((char *) old, newSize));
|
return ((void *) realloc((char *) old, newSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
/***====================================================================***/
|
/***====================================================================***/
|
||||||
|
|
||||||
Opaque
|
void *
|
||||||
uRecalloc(Opaque old, unsigned nOld, unsigned nNew, unsigned itemSize)
|
uRecalloc(void * old, unsigned nOld, unsigned nNew, unsigned itemSize)
|
||||||
{
|
{
|
||||||
char *rtrn;
|
char *rtrn;
|
||||||
|
|
||||||
|
@ -74,15 +74,15 @@ uRecalloc(Opaque old, unsigned nOld, unsigned nNew, unsigned itemSize)
|
||||||
bzero(&rtrn[nOld * itemSize], (nNew - nOld) * itemSize);
|
bzero(&rtrn[nOld * itemSize], (nNew - nOld) * itemSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (Opaque) rtrn;
|
return (void *) rtrn;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***====================================================================***/
|
/***====================================================================***/
|
||||||
|
|
||||||
void
|
void
|
||||||
uFree(Opaque ptr)
|
uFree(void * ptr)
|
||||||
{
|
{
|
||||||
if (ptr != (Opaque) NULL)
|
if (ptr != (void *) NULL)
|
||||||
free((char *) ptr);
|
free((char *) ptr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,13 +43,6 @@
|
||||||
|
|
||||||
/***====================================================================***/
|
/***====================================================================***/
|
||||||
|
|
||||||
#ifndef OPAQUE_DEFINED
|
|
||||||
typedef void *Opaque;
|
|
||||||
#endif
|
|
||||||
#ifndef NullOpaque
|
|
||||||
#define NullOpaque ((Opaque)NULL)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef BOOLEAN_DEFINED
|
#ifndef BOOLEAN_DEFINED
|
||||||
typedef char Boolean;
|
typedef char Boolean;
|
||||||
#endif
|
#endif
|
||||||
|
@ -72,27 +65,27 @@ typedef int Comparison;
|
||||||
|
|
||||||
/***====================================================================***/
|
/***====================================================================***/
|
||||||
|
|
||||||
extern Opaque
|
extern void *
|
||||||
uAlloc(unsigned size);
|
uAlloc(unsigned size);
|
||||||
|
|
||||||
extern Opaque
|
extern void *
|
||||||
uCalloc(unsigned n, unsigned size);
|
uCalloc(unsigned n, unsigned size);
|
||||||
|
|
||||||
extern Opaque
|
extern void *
|
||||||
uRealloc(Opaque old, unsigned newSize);
|
uRealloc(void * old, unsigned newSize);
|
||||||
|
|
||||||
extern Opaque
|
extern void *
|
||||||
uRecalloc(Opaque old, unsigned nOld, unsigned nNew, unsigned newSize);
|
uRecalloc(void * old, unsigned nOld, unsigned nNew, unsigned newSize);
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
uFree(Opaque ptr);
|
uFree(void * ptr);
|
||||||
|
|
||||||
#define uTypedAlloc(t) ((t *)uAlloc((unsigned)sizeof(t)))
|
#define uTypedAlloc(t) ((t *)uAlloc((unsigned)sizeof(t)))
|
||||||
#define uTypedCalloc(n,t) ((t *)uCalloc((unsigned)n,(unsigned)sizeof(t)))
|
#define uTypedCalloc(n,t) ((t *)uCalloc((unsigned)n,(unsigned)sizeof(t)))
|
||||||
#define uTypedRealloc(pO,n,t) ((t *)uRealloc((Opaque)pO,((unsigned)n)*sizeof(t)))
|
#define uTypedRealloc(pO,n,t) ((t *)uRealloc((void *)pO,((unsigned)n)*sizeof(t)))
|
||||||
#define uTypedRecalloc(pO,o,n,t) ((t *)uRecalloc((Opaque)pO,((unsigned)o),((unsigned)n),sizeof(t)))
|
#define uTypedRecalloc(pO,o,n,t) ((t *)uRecalloc((void *)pO,((unsigned)o),((unsigned)n),sizeof(t)))
|
||||||
#if (defined mdHasAlloca) && (mdHasAlloca)
|
#if (defined mdHasAlloca) && (mdHasAlloca)
|
||||||
#define uTmpAlloc(n) ((Opaque)alloca((unsigned)n))
|
#define uTmpAlloc(n) ((void *)alloca((unsigned)n))
|
||||||
#define uTmpFree(p)
|
#define uTmpFree(p)
|
||||||
#else
|
#else
|
||||||
#define uTmpAlloc(n) uAlloc(n)
|
#define uTmpAlloc(n) uAlloc(n)
|
||||||
|
|
|
@ -164,7 +164,7 @@ HandleVModDef(VModDef * stmt, unsigned mergeMode, VModInfo * info)
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
LookupVModIndex(char * priv,
|
LookupVModIndex(char * priv,
|
||||||
CARD32 elem, CARD32 field, unsigned type, ExprResult * val_rtrn)
|
uint32_t elem, uint32_t field, unsigned type, ExprResult * val_rtrn)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
XkbcDescPtr xkb;
|
XkbcDescPtr xkb;
|
||||||
|
@ -203,7 +203,7 @@ LookupVModIndex(char * priv,
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
LookupVModMask(char * priv,
|
LookupVModMask(char * priv,
|
||||||
CARD32 elem, CARD32 field, unsigned type, ExprResult * val_rtrn)
|
uint32_t elem, uint32_t field, unsigned type, ExprResult * val_rtrn)
|
||||||
{
|
{
|
||||||
if (LookupVModIndex(priv, elem, field, type, val_rtrn))
|
if (LookupVModIndex(priv, elem, field, type, val_rtrn))
|
||||||
{
|
{
|
||||||
|
@ -217,7 +217,7 @@ LookupVModMask(char * priv,
|
||||||
int
|
int
|
||||||
FindKeypadVMod(XkbcDescPtr xkb)
|
FindKeypadVMod(XkbcDescPtr xkb)
|
||||||
{
|
{
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
ExprResult rtrn;
|
ExprResult rtrn;
|
||||||
|
|
||||||
name = XkbcInternAtom("NumLock", False);
|
name = XkbcInternAtom("NumLock", False);
|
||||||
|
|
|
@ -54,15 +54,15 @@ extern Bool ApplyVModDefs(VModInfo * /* info */ ,
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int LookupVModIndex(char * /* priv */ ,
|
extern int LookupVModIndex(char * /* priv */ ,
|
||||||
CARD32 /* elem */ ,
|
uint32_t /* elem */ ,
|
||||||
CARD32 /* field */ ,
|
uint32_t /* field */ ,
|
||||||
unsigned /* type */ ,
|
unsigned /* type */ ,
|
||||||
ExprResult * /* val_rtrn */
|
ExprResult * /* val_rtrn */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern int LookupVModMask(char * /* priv */ ,
|
extern int LookupVModMask(char * /* priv */ ,
|
||||||
CARD32 /* elem */ ,
|
uint32_t /* elem */ ,
|
||||||
CARD32 /* field */ ,
|
uint32_t /* field */ ,
|
||||||
unsigned /* type */ ,
|
unsigned /* type */ ,
|
||||||
ExprResult * /* val_rtrn */
|
ExprResult * /* val_rtrn */
|
||||||
);
|
);
|
||||||
|
|
|
@ -140,18 +140,18 @@ typedef struct _Expr
|
||||||
} binary;
|
} binary;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
CARD32 element;
|
uint32_t element;
|
||||||
CARD32 field;
|
uint32_t field;
|
||||||
} field;
|
} field;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
CARD32 element;
|
uint32_t element;
|
||||||
CARD32 field;
|
uint32_t field;
|
||||||
struct _Expr *entry;
|
struct _Expr *entry;
|
||||||
} array;
|
} array;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
struct _Expr *args;
|
struct _Expr *args;
|
||||||
} action;
|
} action;
|
||||||
struct
|
struct
|
||||||
|
@ -166,11 +166,11 @@ typedef struct _Expr
|
||||||
int y;
|
int y;
|
||||||
} coord;
|
} coord;
|
||||||
struct _Expr *child;
|
struct _Expr *child;
|
||||||
CARD32 str;
|
uint32_t str;
|
||||||
unsigned uval;
|
unsigned uval;
|
||||||
int ival;
|
int ival;
|
||||||
char keyName[5];
|
char keyName[5];
|
||||||
Opaque ptr;
|
void * ptr;
|
||||||
} value;
|
} value;
|
||||||
} ExprDef;
|
} ExprDef;
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ typedef struct _VModDef
|
||||||
{
|
{
|
||||||
ParseCommon common;
|
ParseCommon common;
|
||||||
unsigned merge;
|
unsigned merge;
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
ExprDef *value;
|
ExprDef *value;
|
||||||
} VModDef;
|
} VModDef;
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ typedef struct _KeyTypeDef
|
||||||
{
|
{
|
||||||
ParseCommon common;
|
ParseCommon common;
|
||||||
unsigned merge;
|
unsigned merge;
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
VarDef *body;
|
VarDef *body;
|
||||||
} KeyTypeDef;
|
} KeyTypeDef;
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ typedef struct _ModMapDef
|
||||||
{
|
{
|
||||||
ParseCommon common;
|
ParseCommon common;
|
||||||
unsigned merge;
|
unsigned merge;
|
||||||
CARD32 modifier;
|
uint32_t modifier;
|
||||||
ExprDef *keys;
|
ExprDef *keys;
|
||||||
} ModMapDef;
|
} ModMapDef;
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ typedef struct _IndicatorNameDef
|
||||||
typedef struct _OutlineDef
|
typedef struct _OutlineDef
|
||||||
{
|
{
|
||||||
ParseCommon common;
|
ParseCommon common;
|
||||||
CARD32 field;
|
uint32_t field;
|
||||||
int nPoints;
|
int nPoints;
|
||||||
ExprDef *points;
|
ExprDef *points;
|
||||||
} OutlineDef;
|
} OutlineDef;
|
||||||
|
@ -268,7 +268,7 @@ typedef struct _ShapeDef
|
||||||
{
|
{
|
||||||
ParseCommon common;
|
ParseCommon common;
|
||||||
unsigned merge;
|
unsigned merge;
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
int nOutlines;
|
int nOutlines;
|
||||||
OutlineDef *outlines;
|
OutlineDef *outlines;
|
||||||
} ShapeDef;
|
} ShapeDef;
|
||||||
|
@ -292,7 +292,7 @@ typedef struct _SectionDef
|
||||||
{
|
{
|
||||||
ParseCommon common;
|
ParseCommon common;
|
||||||
unsigned merge;
|
unsigned merge;
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
int nRows;
|
int nRows;
|
||||||
RowDef *rows;
|
RowDef *rows;
|
||||||
} SectionDef;
|
} SectionDef;
|
||||||
|
@ -308,7 +308,7 @@ typedef struct _OverlayDef
|
||||||
{
|
{
|
||||||
ParseCommon common;
|
ParseCommon common;
|
||||||
unsigned merge;
|
unsigned merge;
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
int nKeys;
|
int nKeys;
|
||||||
OverlayKeyDef *keys;
|
OverlayKeyDef *keys;
|
||||||
} OverlayDef;
|
} OverlayDef;
|
||||||
|
@ -318,7 +318,7 @@ typedef struct _DoodadDef
|
||||||
ParseCommon common;
|
ParseCommon common;
|
||||||
unsigned merge;
|
unsigned merge;
|
||||||
unsigned type;
|
unsigned type;
|
||||||
CARD32 name;
|
uint32_t name;
|
||||||
VarDef *body;
|
VarDef *body;
|
||||||
} DoodadDef;
|
} DoodadDef;
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@ extern XkbcOutlinePtr
|
||||||
XkbcAddGeomOutline(XkbcShapePtr shape, int sz_points);
|
XkbcAddGeomOutline(XkbcShapePtr shape, int sz_points);
|
||||||
|
|
||||||
extern XkbcShapePtr
|
extern XkbcShapePtr
|
||||||
XkbcAddGeomShape(XkbcGeometryPtr geom, CARD32 name, int sz_outlines);
|
XkbcAddGeomShape(XkbcGeometryPtr geom, uint32_t name, int sz_outlines);
|
||||||
|
|
||||||
extern XkbcKeyPtr
|
extern XkbcKeyPtr
|
||||||
XkbcAddGeomKey(XkbcRowPtr row);
|
XkbcAddGeomKey(XkbcRowPtr row);
|
||||||
|
@ -144,11 +144,11 @@ extern XkbcRowPtr
|
||||||
XkbcAddGeomRow(XkbcSectionPtr section, int sz_keys);
|
XkbcAddGeomRow(XkbcSectionPtr section, int sz_keys);
|
||||||
|
|
||||||
extern XkbcSectionPtr
|
extern XkbcSectionPtr
|
||||||
XkbcAddGeomSection(XkbcGeometryPtr geom, CARD32 name,
|
XkbcAddGeomSection(XkbcGeometryPtr geom, uint32_t name,
|
||||||
int sz_rows, int sz_doodads, int sz_over);
|
int sz_rows, int sz_doodads, int sz_over);
|
||||||
|
|
||||||
extern XkbcDoodadPtr
|
extern XkbcDoodadPtr
|
||||||
XkbcAddGeomDoodad(XkbcGeometryPtr geom, XkbcSectionPtr section, CARD32 name);
|
XkbcAddGeomDoodad(XkbcGeometryPtr geom, XkbcSectionPtr section, uint32_t name);
|
||||||
|
|
||||||
extern XkbcOverlayKeyPtr
|
extern XkbcOverlayKeyPtr
|
||||||
XkbcAddGeomOverlayKey(XkbcOverlayPtr overlay, XkbcOverlayRowPtr row,
|
XkbcAddGeomOverlayKey(XkbcOverlayPtr overlay, XkbcOverlayRowPtr row,
|
||||||
|
@ -158,7 +158,7 @@ extern XkbcOverlayRowPtr
|
||||||
XkbcAddGeomOverlayRow(XkbcOverlayPtr overlay, int row_under, int sz_keys);
|
XkbcAddGeomOverlayRow(XkbcOverlayPtr overlay, int row_under, int sz_keys);
|
||||||
|
|
||||||
extern XkbcOverlayPtr
|
extern XkbcOverlayPtr
|
||||||
XkbcAddGeomOverlay(XkbcSectionPtr section, CARD32 name, int sz_rows);
|
XkbcAddGeomOverlay(XkbcSectionPtr section, uint32_t name, int sz_rows);
|
||||||
|
|
||||||
/***====================================================================***/
|
/***====================================================================***/
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ extern void
|
||||||
XkbcEnsureSafeMapName(char *name);
|
XkbcEnsureSafeMapName(char *name);
|
||||||
|
|
||||||
extern unsigned
|
extern unsigned
|
||||||
_XkbcKSCheckCase(CARD32 sym);
|
_XkbcKSCheckCase(uint32_t sym);
|
||||||
|
|
||||||
#define XkbcKSIsLower(k) (_XkbcKSCheckCase(k) & _XkbKSLower)
|
#define XkbcKSIsLower(k) (_XkbcKSCheckCase(k) & _XkbKSLower)
|
||||||
#define XkbcKSIsUpper(k) (_XkbcKSCheckCase(k) & _XkbKSUpper)
|
#define XkbcKSIsUpper(k) (_XkbcKSCheckCase(k) & _XkbKSUpper)
|
||||||
|
@ -95,7 +95,7 @@ extern char *
|
||||||
XkbcActionTypeText(unsigned type);
|
XkbcActionTypeText(unsigned type);
|
||||||
|
|
||||||
extern char *
|
extern char *
|
||||||
XkbcKeysymText(CARD32 sym);
|
XkbcKeysymText(uint32_t sym);
|
||||||
|
|
||||||
extern char *
|
extern char *
|
||||||
XkbcKeyNameText(char *name);
|
XkbcKeyNameText(char *name);
|
||||||
|
|
Loading…
Reference in New Issue