mirror of
https://github.com/Interlisp/maiko.git
synced 2026-02-04 15:43:04 +00:00
Reformat all C source files with Clang-format in Google style w/ 100 col width.
This commit is contained in:
124
src/mouseif.c
Executable file → Normal file
124
src/mouseif.c
Executable file → Normal file
@@ -1,29 +1,24 @@
|
||||
/* $Id: mouseif.c,v 1.2 1999/01/03 02:07:26 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved */
|
||||
static char *id = "$Id: mouseif.c,v 1.2 1999/01/03 02:07:26 sybalsky Exp $ Copyright (C) Venue";
|
||||
|
||||
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* (C) Copyright 1989, 1990, 1990, 1991, 1992, 1993, 1994, 1995 Venue. */
|
||||
/* All Rights Reserved. */
|
||||
/* Manufactured in the United States of America. */
|
||||
/* */
|
||||
/* The contents of this file are proprietary information */
|
||||
/* belonging to Venue, and are provided to you under license. */
|
||||
/* They may not be further distributed or disclosed to third */
|
||||
/* parties without the specific permission of Venue. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
/* * * * D O S M O U S E I N T E R F A C E * * * */
|
||||
|
||||
|
||||
#include "version.h"
|
||||
|
||||
|
||||
|
||||
/* $Id: mouseif.c,v 1.2 1999/01/03 02:07:26 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved
|
||||
*/
|
||||
static char *id = "$Id: mouseif.c,v 1.2 1999/01/03 02:07:26 sybalsky Exp $ Copyright (C) Venue";
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* (C) Copyright 1989, 1990, 1990, 1991, 1992, 1993, 1994, 1995 Venue. */
|
||||
/* All Rights Reserved. */
|
||||
/* Manufactured in the United States of America. */
|
||||
/* */
|
||||
/* The contents of this file are proprietary information */
|
||||
/* belonging to Venue, and are provided to you under license. */
|
||||
/* They may not be further distributed or disclosed to third */
|
||||
/* parties without the specific permission of Venue. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
/* * * * D O S M O U S E I N T E R F A C E * * * */
|
||||
|
||||
#include "version.h"
|
||||
|
||||
#include "lispemul.h"
|
||||
#include "dbprint.h"
|
||||
#include "devif.h"
|
||||
@@ -53,28 +48,25 @@ extern void TwoButtonHandler();
|
||||
/* */
|
||||
/* Probe for mouse and return the number of buttons available. */
|
||||
/*****************************************************************/
|
||||
int probemouse()
|
||||
{
|
||||
int probemouse() {
|
||||
union REGS regs;
|
||||
char c;
|
||||
/***************************************************************************
|
||||
* Reset mouse driver, exit if no mouse driver present
|
||||
***************************************************************************/
|
||||
/* int 33h, case 0000, ax = drive installed, bx = # of buttons. */
|
||||
if (nomouseflag) {
|
||||
return(666); /* return something, why not 666? */
|
||||
}
|
||||
else {
|
||||
regs.w.eax = 0; /* Func 0 = Reset mouse, ret. button info */
|
||||
if (nomouseflag) {
|
||||
return (666); /* return something, why not 666? */
|
||||
} else {
|
||||
regs.w.eax = 0; /* Func 0 = Reset mouse, ret. button info */
|
||||
int86(0x33, ®s, ®s);
|
||||
|
||||
if(regs.x.ax == 0x0000) VESA_errorexit("No mouse driver found.", -1);
|
||||
return(regs.x.bx);
|
||||
|
||||
if (regs.x.ax == 0x0000) VESA_errorexit("No mouse driver found.", -1);
|
||||
return (regs.x.bx);
|
||||
}
|
||||
}
|
||||
|
||||
make_mouse_instance( mouse )
|
||||
MouseInterface mouse;
|
||||
make_mouse_instance(mouse) MouseInterface mouse;
|
||||
{
|
||||
#ifdef DOS
|
||||
|
||||
@@ -86,8 +78,7 @@ MouseInterface mouse;
|
||||
mouse->device.after_raid = &GenericReturnT;
|
||||
mouse->device.active = FALSE;
|
||||
NumberOfButtons = 3;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
mouse->device.enter = &EnterDosMouse;
|
||||
mouse->device.exit = &ExitDosMouse;
|
||||
mouse->device.before_raid = &DosMouseBeforeRaid;
|
||||
@@ -100,38 +91,35 @@ MouseInterface mouse;
|
||||
mouse->Cursor.Last.width = 16;
|
||||
mouse->Cursor.Last.height = 16;
|
||||
|
||||
|
||||
|
||||
if (nomouseflag == FALSE) {
|
||||
if(twobuttonflag) { /* We force two button handling. */
|
||||
if (twobuttonflag) { /* We force two button handling. */
|
||||
mouse->Handler = &TwoButtonHandler;
|
||||
mouse->Button.TwoButtonP = TRUE;
|
||||
}
|
||||
else /* Determine how many buttons we have. */
|
||||
switch(NumberOfButtons) {
|
||||
case 0x0000: /* Other than 2 buttons, assume three */
|
||||
mouse->Button.TwoButtonP = FALSE;
|
||||
mouse->Handler = &ThreeButtonHandler;
|
||||
break;
|
||||
case 0x0002: /* Two buttons. */
|
||||
mouse->Button.TwoButtonP = TRUE;
|
||||
mouse->Handler = &TwoButtonHandler;
|
||||
break;
|
||||
case 0x0003: /* Three buttons. */
|
||||
mouse->Button.TwoButtonP = FALSE;
|
||||
mouse->Handler = &ThreeButtonHandler;
|
||||
break;
|
||||
case 0xffff: /* Two buttons. */
|
||||
mouse->Button.TwoButtonP = TRUE;
|
||||
mouse->Handler = &TwoButtonHandler;
|
||||
break;
|
||||
default: /* Strange case, assume three. */
|
||||
mouse->Button.TwoButtonP = FALSE;
|
||||
mouse->Handler = &ThreeButtonHandler;
|
||||
break;
|
||||
} else /* Determine how many buttons we have. */
|
||||
switch (NumberOfButtons) {
|
||||
case 0x0000: /* Other than 2 buttons, assume three */
|
||||
mouse->Button.TwoButtonP = FALSE;
|
||||
mouse->Handler = &ThreeButtonHandler;
|
||||
break;
|
||||
case 0x0002: /* Two buttons. */
|
||||
mouse->Button.TwoButtonP = TRUE;
|
||||
mouse->Handler = &TwoButtonHandler;
|
||||
break;
|
||||
case 0x0003: /* Three buttons. */
|
||||
mouse->Button.TwoButtonP = FALSE;
|
||||
mouse->Handler = &ThreeButtonHandler;
|
||||
break;
|
||||
case 0xffff: /* Two buttons. */
|
||||
mouse->Button.TwoButtonP = TRUE;
|
||||
mouse->Handler = &TwoButtonHandler;
|
||||
break;
|
||||
default: /* Strange case, assume three. */
|
||||
mouse->Button.TwoButtonP = FALSE;
|
||||
mouse->Handler = &ThreeButtonHandler;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* mouse->timestamp = ((*LASTUSERACTION68k& 0xffffff) + Lisp_world); */
|
||||
/* mouse->timestamp = ((*LASTUSERACTION68k& 0xffffff) + Lisp_world); */
|
||||
#elif XWINDOW
|
||||
#endif /* DOS or XWINDOW */
|
||||
#endif /* DOS or XWINDOW */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user