/*
 * -- $Header: /cec/src/nestor/servers/R3/shXlib/XQuKeybd.c,v 1.1.1.1
 * 90/04/23 10:04:10 spanachi Exp $
 */
#include "copyright.h"

/* $XConsortium: XQuKeybd.c,v 11.10 88/09/06 16:09:57 jim Exp $ */
/* Copyright    Massachusetts Institute of Technology    1986	 */
/* -- MULTIPLEX Extension -- */

#define NEED_REPLIES
#include "Xlibint.h"

/* -- additional includes -- */
#include "utils.h"

struct kmap {
  char map[32];
};

XQueryKeymap (dpy, keys)
  register Display *dpy;
  char keys[32];

{
  xQueryKeymapReply rep;
  register xReq *req;

  /* -- flush default dpy's queue to keep buffers aligned -- */
  XmuXFlushDefault (dpy);
  /* -- switch to the chalk holder display -- */
  dpy = XmuXChalkDisplay (dpy);

  LockDisplay (dpy);
  GetEmptyReq (QueryKeymap, req);
  (void) _XReply (dpy, (xReply *) & rep,
		(SIZEOF (xQueryKeymapReply) - SIZEOF (xReply)) >> 2, xTrue);
  *(struct kmap *) keys = *(struct kmap *) rep.map;	/* faster than bcopy */
  UnlockDisplay (dpy);
  SyncHandle ();
}
