Compare commits

...

1 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult 47fa09f728 kdrive: drop #define of Status to int
The status return values always have been int (directly corresponding
to X11 protocol reply status values, as defined in X.h).

Seems that back about 2 decades ago, somebody started converting them
to their own type, unfortunately just very inconsequently in a few places,
which isn't very helpful. It would have been different if done everywhere
in the whole Xserver, but doing so would be a bigger task.

Therefore, for consistency, just dropping this here and just use 'int',
what all the rest of the Xserver code, as well as X11 protocol headers
and Xlib are doing.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-02-26 17:21:44 +01:00
2 changed files with 6 additions and 8 deletions

View File

@ -1261,7 +1261,7 @@ ephyrPutColors(ScreenPtr pScreen, int n, xColorItem * pdefs)
/* Mouse calls */
static Status
static int
MouseInit(KdPointerInfo * pi)
{
pi->driverPrivate = (EphyrPointerPrivate *)
@ -1283,7 +1283,7 @@ MouseInit(KdPointerInfo * pi)
return Success;
}
static Status
static int
MouseEnable(KdPointerInfo * pi)
{
((EphyrPointerPrivate *) pi->driverPrivate)->enabled = TRUE;
@ -1318,7 +1318,7 @@ KdPointerDriver EphyrMouseDriver = {
/* Keyboard */
static Status
static int
EphyrKeyboardInit(KdKeyboardInfo * ki)
{
KeySymsRec keySyms;
@ -1349,7 +1349,7 @@ EphyrKeyboardInit(KdKeyboardInfo * ki)
return Success;
}
static Status
static int
EphyrKeyboardEnable(KdKeyboardInfo * ki)
{
((EphyrKbdPrivate *) ki->driverPrivate)->enabled = TRUE;

View File

@ -52,8 +52,6 @@
#define KD_DPMS_POWERDOWN 3
#define KD_DPMS_MAX KD_DPMS_POWERDOWN
#define Status int
typedef struct _KdCardInfo {
struct _KdCardFuncs *cfuncs;
void *closure;
@ -169,8 +167,8 @@ typedef struct _KdPointerInfo KdPointerInfo;
typedef struct _KdPointerDriver {
const char *name;
Status(*Init) (KdPointerInfo *);
Status(*Enable) (KdPointerInfo *);
int (*Init) (KdPointerInfo *);
int (*Enable) (KdPointerInfo *);
void (*Disable) (KdPointerInfo *);
void (*Fini) (KdPointerInfo *);
struct _KdPointerDriver *next;