diff options
author | Daniel Stone <daniel@fooishbar.org> | 2008-02-16 20:01:18 +0200 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2008-02-17 22:52:08 +0200 |
commit | fbd776894658e7afb2c55dc8582b2a3efab78a3c (patch) | |
tree | 0879ce2f27f34ff86aea76647ea1556724658da7 /xkb/ddxLoad.c | |
parent | e5f002eddef1abe324033a3155f01d048536a48d (diff) |
XKB: Ditch XkbFileInfo
Sorry about the megacommit, but this touches on a lot of stuff.
Get rid of XkbFileInfo, which was pretty seriously redundant, and move the
only useful thing it had (defined) into XkbDescRec. defined will be removed
pretty soon anyway. Is the compat map pointer non-NULL? Then you have a
compat map, congratulations! Anyhow, I digress.
All functions that took an XkbFileInfoPtr now take an XkbDescPtr, _except_
XkmReadFile, which returns an XkbDescPtr *, because people want to deal in
XkbDescPtrs, not XkbDescRecs.
Diffstat (limited to 'xkb/ddxLoad.c')
-rw-r--r-- | xkb/ddxLoad.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c index 760119dc9..d80ce62b8 100644 --- a/xkb/ddxLoad.c +++ b/xkb/ddxLoad.c @@ -334,16 +334,16 @@ XkbDDXLoadKeymapByNames( DeviceIntPtr keybd, XkbComponentNamesPtr names, unsigned want, unsigned need, - XkbFileInfo * finfoRtrn, + XkbDescPtr * xkbRtrn, char * nameRtrn, int nameRtrnLen) { -XkbDescPtr xkb; +XkbDescPtr xkb; FILE * file; char fileName[PATH_MAX]; unsigned missing; - bzero(finfoRtrn,sizeof(XkbFileInfo)); + *xkbRtrn = NULL; if ((keybd==NULL)||(keybd->key==NULL)||(keybd->key->xkbInfo==NULL)) xkb= NULL; else xkb= keybd->key->xkbInfo->desc; @@ -353,7 +353,7 @@ unsigned missing; return 0; } else if (!XkbDDXCompileKeymapByNames(xkb,names,want,need, - nameRtrn,nameRtrnLen)){ + nameRtrn,nameRtrnLen)){ DebugF("Couldn't compile keymap file\n"); return 0; } @@ -362,15 +362,15 @@ unsigned missing; LogMessage(X_ERROR, "Couldn't open compiled keymap file %s\n",fileName); return 0; } - missing= XkmReadFile(file,need,want,finfoRtrn); - if (finfoRtrn->xkb==NULL) { + missing= XkmReadFile(file,need,want,xkbRtrn); + if (*xkbRtrn==NULL) { LogMessage(X_ERROR, "Error loading keymap %s\n",fileName); fclose(file); (void) unlink (fileName); return 0; } else if (xkbDebugFlags) { - DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,finfoRtrn->defined); + DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined); } fclose(file); (void) unlink (fileName); |