#ifndef DISPATCH←H
#define DISPATCH←H


#define LEGAL←CLIENT(id, c) (\
    (c == CLIENT←ID(id)) && (clientUsed[CLIENT←ID(id)].used)) 

#define REQUEST←AT←LEAST←SIZE(req) \
    if ((sizeof(req) >> 2) > stuff->length )\
         return(BadLength)

#define REQUEST←SIZE←MATCH(req)\
    if ((sizeof(req) >> 2) != stuff->length)\
         return(BadLength)

extern int ProcBell();
extern int ProcChangeActivePointerGrab();
extern int ProcChangeKeyboardControl();
extern int ProcChangePointerControl();
extern int ProcGetDeviceMapping();
extern int ProcGetInputFocus();
extern int ProcGetKeyboardControl();
extern int ProcGetMotionEvents();
extern int ProcGetPointerControl();
extern int ProcGrabKey();
extern int ProcGrabKeyboard();
extern int ProcGrabPointer();
extern int ProcQueryKeymap();
extern int ProcQueryPointer();
extern int ProcSetDeviceMapping();
extern int ProcSetInputFocus();
extern int ProcSendEvent();
extern int ProcUngrabKey();
extern int ProcUngrabKeyboard();
extern int ProcUngrabPointer();
extern int ProcWarpPointer();

#endif /* DISPATCH←H */

extern int curclient;
extern int ErrorResID;
extern int *RequestSequenceNumber;