Re: [PATCH] Include device/input.h in console-client
Hi Samuel On Tue, Jan 10, 2023 at 10:20:19PM +0100, Samuel Thibault wrote: I was expecting it :) I'll wait a bit for the updated gnumach to get uploaded etc. before commiting it. Is it possible to merge this patch given that a new version of gnumach was released recently? Thanks Flavio Cruz, le lun. 09 janv. 2023 22:37:47 -0500, a ecrit: We avoid using repeated definitions and also update kd_event with the new 64bit compatible fields (rpc_time_value). --- console-client/mach-inputdev.h | 56 +- 1 file changed, 1 insertion(+), 55 deletions(-) diff --git a/console-client/mach-inputdev.h b/console-client/mach-inputdev.h index 985e1e1d..08119ad6 100644 --- a/console-client/mach-inputdev.h +++ b/console-client/mach-inputdev.h @@ -51,61 +51,7 @@ #define _INPUTDEV_H_ 1 #include - -typedef u_short kev_type; /* kd event type */ - -/* (used for event records) */ -struct mouse_motion { - short mm_deltaX;/* units? */ - short mm_deltaY; -}; -typedef u_char Scancode; - -typedef struct { - kev_type type; /* see below */ - struct timeval time;/* timestamp */ - union { /* value associated with event */ -boolean_t up; /* MOUSE_LEFT .. MOUSE_RIGHT */ -Scancode sc;/* KEYBD_EVENT */ -struct mouse_motion mmotion;/* MOUSE_MOTION */ - } value; -} kd_event; -#define m_deltaXmmotion.mm_deltaX -#define m_deltaYmmotion.mm_deltaY - -/* - * kd_event ID's. - */ -#define MOUSE_LEFT 1 /* mouse left button up/down */ -#define MOUSE_MIDDLE2 -#define MOUSE_RIGHT 3 -#define MOUSE_MOTION4 /* mouse motion */ -#define KEYBD_EVENT 5 /* key up/down */ - - -#define IOCPARM_MASK0x1fff /* parameter length, at most 13 bits */ -#define IOC_OUT 0x4000 /* copy out parameters */ -#define IOC_IN 0x8000U /* copy in parameters */ - -#ifndef _IOC -#define _IOC(inout,group,num,len) \ -(inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num)) -#endif -#ifndef _IOR -#define _IOR(g,n,t) _IOC(IOC_OUT, (g), (n), sizeof(t)) -#endif -#ifndef _IOW -#define _IOW(g,n,t) _IOC(IOC_IN,(g), (n), sizeof(t)) -#endif - -#define KDSKBDMODE _IOW('K', 1, int) /* set keyboard mode */ -#define KB_EVENT1 -#define KB_ASCII2 - -#define KDGKBDTYPE _IOR('K', 2, int) /* get keyboard type */ -#define KB_VANILLAKB0 - -#define KDSETLEDS _IOW('K', 5, int)/* set keyboard leds */ +#include /* * Low 3 bits of minor are the com port #. -- 2.39.0 -- Samuel --- Pour une évaluation indépendante, transparente et rigoureuse ! Je soutiens la Commission d'Évaluation de l'Inria.
Re: [PATCH] Include device/input.h in console-client
I was expecting it :) I'll wait a bit for the updated gnumach to get uploaded etc. before commiting it. Flavio Cruz, le lun. 09 janv. 2023 22:37:47 -0500, a ecrit: > We avoid using repeated definitions and also update kd_event with the > new 64bit compatible fields (rpc_time_value). > --- > console-client/mach-inputdev.h | 56 +- > 1 file changed, 1 insertion(+), 55 deletions(-) > > diff --git a/console-client/mach-inputdev.h b/console-client/mach-inputdev.h > index 985e1e1d..08119ad6 100644 > --- a/console-client/mach-inputdev.h > +++ b/console-client/mach-inputdev.h > @@ -51,61 +51,7 @@ > #define _INPUTDEV_H_ 1 > > #include > - > -typedef u_short kev_type; /* kd event type */ > - > -/* (used for event records) */ > -struct mouse_motion { > - short mm_deltaX;/* units? */ > - short mm_deltaY; > -}; > -typedef u_char Scancode; > - > -typedef struct { > - kev_type type; /* see below */ > - struct timeval time;/* timestamp */ > - union { /* value associated with event */ > -boolean_t up; /* MOUSE_LEFT .. MOUSE_RIGHT */ > -Scancode sc;/* KEYBD_EVENT */ > -struct mouse_motion mmotion;/* MOUSE_MOTION */ > - } value; > -} kd_event; > -#define m_deltaXmmotion.mm_deltaX > -#define m_deltaYmmotion.mm_deltaY > - > -/* > - * kd_event ID's. > - */ > -#define MOUSE_LEFT 1 /* mouse left button up/down */ > -#define MOUSE_MIDDLE2 > -#define MOUSE_RIGHT 3 > -#define MOUSE_MOTION4 /* mouse motion */ > -#define KEYBD_EVENT 5 /* key up/down */ > - > - > -#define IOCPARM_MASK0x1fff /* parameter length, at most 13 bits > */ > -#define IOC_OUT 0x4000 /* copy out parameters */ > -#define IOC_IN 0x8000U /* copy in parameters */ > - > -#ifndef _IOC > -#define _IOC(inout,group,num,len) \ > -(inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num)) > -#endif > -#ifndef _IOR > -#define _IOR(g,n,t) _IOC(IOC_OUT, (g), (n), sizeof(t)) > -#endif > -#ifndef _IOW > -#define _IOW(g,n,t) _IOC(IOC_IN,(g), (n), sizeof(t)) > -#endif > - > -#define KDSKBDMODE _IOW('K', 1, int) /* set keyboard mode */ > -#define KB_EVENT1 > -#define KB_ASCII2 > - > -#define KDGKBDTYPE _IOR('K', 2, int) /* get keyboard type */ > -#define KB_VANILLAKB0 > - > -#define KDSETLEDS _IOW('K', 5, int)/* set keyboard leds */ > +#include > > /* > * Low 3 bits of minor are the com port #. > -- > 2.39.0 > > -- Samuel --- Pour une évaluation indépendante, transparente et rigoureuse ! Je soutiens la Commission d'Évaluation de l'Inria.
[PATCH] Include device/input.h in console-client
We avoid using repeated definitions and also update kd_event with the new 64bit compatible fields (rpc_time_value). --- console-client/mach-inputdev.h | 56 +- 1 file changed, 1 insertion(+), 55 deletions(-) diff --git a/console-client/mach-inputdev.h b/console-client/mach-inputdev.h index 985e1e1d..08119ad6 100644 --- a/console-client/mach-inputdev.h +++ b/console-client/mach-inputdev.h @@ -51,61 +51,7 @@ #define _INPUTDEV_H_ 1 #include - -typedef u_short kev_type; /* kd event type */ - -/* (used for event records) */ -struct mouse_motion { - short mm_deltaX;/* units? */ - short mm_deltaY; -}; -typedef u_char Scancode; - -typedef struct { - kev_type type; /* see below */ - struct timeval time;/* timestamp */ - union { /* value associated with event */ -boolean_t up; /* MOUSE_LEFT .. MOUSE_RIGHT */ -Scancode sc;/* KEYBD_EVENT */ -struct mouse_motion mmotion;/* MOUSE_MOTION */ - } value; -} kd_event; -#define m_deltaXmmotion.mm_deltaX -#define m_deltaYmmotion.mm_deltaY - -/* - * kd_event ID's. - */ -#define MOUSE_LEFT 1 /* mouse left button up/down */ -#define MOUSE_MIDDLE2 -#define MOUSE_RIGHT 3 -#define MOUSE_MOTION4 /* mouse motion */ -#define KEYBD_EVENT 5 /* key up/down */ - - -#define IOCPARM_MASK0x1fff /* parameter length, at most 13 bits */ -#define IOC_OUT 0x4000 /* copy out parameters */ -#define IOC_IN 0x8000U /* copy in parameters */ - -#ifndef _IOC -#define _IOC(inout,group,num,len) \ -(inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num)) -#endif -#ifndef _IOR -#define _IOR(g,n,t) _IOC(IOC_OUT, (g), (n), sizeof(t)) -#endif -#ifndef _IOW -#define _IOW(g,n,t) _IOC(IOC_IN,(g), (n), sizeof(t)) -#endif - -#define KDSKBDMODE _IOW('K', 1, int) /* set keyboard mode */ -#define KB_EVENT1 -#define KB_ASCII2 - -#define KDGKBDTYPE _IOR('K', 2, int) /* get keyboard type */ -#define KB_VANILLAKB0 - -#define KDSETLEDS _IOW('K', 5, int)/* set keyboard leds */ +#include /* * Low 3 bits of minor are the com port #. -- 2.39.0