fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
- documentation, and that the name of Silicon Graphics not be
- used in advertising or publicity pertaining to distribution
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
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"
without any express or implied warranty.
-
- SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
#include "xkbcomp.h"
+#include "xkballoc.h"
+#include "xkbgeom.h"
+#include "xkbmisc.h"
#include "misc.h"
#include "alias.h"
#include "keycodes.h"
-#include <X11/extensions/XKBgeomcommon.h>
-
static void
HandleCollision(AliasInfo * old, AliasInfo * new)
{
if (((new->def.fileID == old->def.fileID) && (warningLevel > 0)) ||
(warningLevel > 9))
{
- WARN2("Alias of %s for %s declared more than once\n",
- XkbKeyNameText(new->alias, XkbMessage),
- XkbKeyNameText(new->real, XkbMessage));
+ WARN("Alias of %s for %s declared more than once\n",
+ XkbcKeyNameText(new->alias), XkbcKeyNameText(new->real));
ACTION("First definition ignored\n");
}
}
if (((old->def.fileID == new->def.fileID) && (warningLevel > 0)) ||
(warningLevel > 9))
{
- WARN1("Multiple definitions for alias %s\n",
- XkbKeyNameText(old->alias, XkbMessage));
- ACTION2("Using %s, ignoring %s\n",
- XkbKeyNameText(use, XkbMessage),
- XkbKeyNameText(ignore, XkbMessage));
+ WARN("Multiple definitions for alias %s\n",
+ XkbcKeyNameText(old->alias));
+ ACTION("Using %s, ignoring %s\n",
+ XkbcKeyNameText(use), XkbcKeyNameText(ignore));
}
if (use != old->real)
memcpy(old->real, use, XkbKeyNameLength);
XkbKeyAliasPtr old, a;
AliasInfo *info;
int nNew, nOld;
- Status status;
+ int status;
if (*info_in == NULL)
return True;
{
if (warningLevel > 4)
{
- WARN2("Attempt to alias %s to non-existent key %s\n",
- XkbKeyNameText(info->alias, XkbMessage),
- XkbKeyNameText(info->real, XkbMessage));
+ WARN("Attempt to alias %s to non-existent key %s\n",
+ XkbcKeyNameText(info->alias), XkbcKeyNameText(info->real));
ACTION("Ignored\n");
}
info->alias[0] = '\0';
if (warningLevel > 4)
{
WARN("Attempt to create alias with the name of a real key\n");
- ACTION2("Alias \"%s = %s\" ignored\n",
- XkbKeyNameText(info->alias, XkbMessage),
- XkbKeyNameText(info->real, XkbMessage));
+ ACTION("Alias \"%s = %s\" ignored\n",
+ XkbcKeyNameText(info->alias),
+ XkbcKeyNameText(info->real));
}
info->alias[0] = '\0';
continue;
{
if (!xkb->geom)
{
- XkbGeometrySizesRec sizes;
- bzero((char *) &sizes, sizeof(XkbGeometrySizesRec));
+ XkbcGeometrySizesRec sizes;
+ bzero((char *) &sizes, sizeof(XkbcGeometrySizesRec));
sizes.which = XkbGeomKeyAliasesMask;
sizes.num_key_aliases = nOld + nNew;
- status = XkbAllocGeometry(xkb, &sizes);
+ status = XkbcAllocGeometry(xkb, &sizes);
}
else
{
- status = XkbAllocGeomKeyAliases(xkb->geom, nOld + nNew);
+ status = XkbcAllocGeomKeyAliases(xkb->geom, nOld + nNew);
}
if (xkb->geom)
old = xkb->geom->key_aliases;
}
else
{
- status = XkbAllocNames(xkb, XkbKeyAliasesMask, 0, nOld + nNew);
+ status = XkbcAllocNames(xkb, XkbKeyAliasesMask, 0, nOld + nNew);
if (xkb->names)
old = xkb->names->key_aliases;
}
#ifdef DEBUG
if ((a - old) != (nOld + nNew))
{
- WSGO2("Expected %d aliases total but created %d\n", nOld + nNew,
+ WSGO("Expected %d aliases total but created %d\n", nOld + nNew,
a - old);
}
#endif