mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
Fixed some compiler warnings.
svn path=/trunk/; revision=515
This commit is contained in:
parent
5f710be5ef
commit
b887962d1d
1 changed files with 31 additions and 29 deletions
|
@ -346,6 +346,7 @@ static BYTE VirtualToAscii(WORD keyCode,BOOL isDown)
|
|||
}
|
||||
|
||||
if ((keyCode>=VK_A)&&(keyCode<=VK_Z))
|
||||
{
|
||||
if (ctrlKeyState & CAPSLOCK_ON)
|
||||
if (ctrlKeyState & SHIFT_PRESSED)
|
||||
return keyCode-VK_A+'a';
|
||||
|
@ -356,21 +357,26 @@ static BYTE VirtualToAscii(WORD keyCode,BOOL isDown)
|
|||
return keyCode-VK_A+'A';
|
||||
else
|
||||
return keyCode-VK_A+'a';
|
||||
}
|
||||
|
||||
if ((keyCode>=VK_0)&&(keyCode<=VK_9))
|
||||
{
|
||||
if (ctrlKeyState & SHIFT_PRESSED)
|
||||
return asciiTable1[keyCode-VK_0];
|
||||
else
|
||||
return keyCode-VK_0+'0';
|
||||
}
|
||||
|
||||
if ((keyCode>=VK_NUMPAD0)&&(keyCode<=VK_DIVIDE))
|
||||
return asciiTable2[keyCode-VK_NUMPAD0];
|
||||
|
||||
if ((keyCode>=186)&&(keyCode<=222))
|
||||
{
|
||||
if (ctrlKeyState & SHIFT_PRESSED)
|
||||
return asciiTable4[keyCode-186];
|
||||
else
|
||||
return asciiTable3[keyCode-186];
|
||||
}
|
||||
|
||||
switch(keyCode)
|
||||
{
|
||||
|
@ -425,9 +431,9 @@ static VOID KbdDpcRoutine(PKDPC Dpc,
|
|||
IoStartNextPacket(DeviceObject,FALSE);
|
||||
}
|
||||
|
||||
static unsigned int KeyboardHandler(unsigned int irq)
|
||||
static BOOLEAN KeyboardHandler(PKINTERRUPT Interrupt, PVOID Context)
|
||||
{
|
||||
BYTE resp,thisKey;
|
||||
BYTE thisKey;
|
||||
BOOL isDown;
|
||||
static BYTE lastKey;
|
||||
|
||||
|
@ -439,7 +445,7 @@ static unsigned int KeyboardHandler(unsigned int irq)
|
|||
{
|
||||
extKey=1; // Wait for next byte
|
||||
lastKey=thisKey;
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
isDown=!(thisKey & 0x80);
|
||||
|
@ -455,7 +461,7 @@ static unsigned int KeyboardHandler(unsigned int irq)
|
|||
if (extKey & ((thisKey==0x2A)||(thisKey==0x36)))
|
||||
{
|
||||
extKey=0;
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Check for PAUSE sequence
|
||||
|
@ -465,14 +471,14 @@ static unsigned int KeyboardHandler(unsigned int irq)
|
|||
lastKey=0xFF; // Sequence is OK
|
||||
else
|
||||
extKey=0;
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
if (extKey && (lastKey==0xFF))
|
||||
{
|
||||
if (thisKey!=0x45)
|
||||
{
|
||||
extKey=0; // Bad sequence
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
thisKey=0x7F; // Pseudo-code for PAUSE
|
||||
}
|
||||
|
@ -512,14 +518,14 @@ static unsigned int KeyboardHandler(unsigned int irq)
|
|||
CurrentIrp=NULL;
|
||||
}
|
||||
CHECKPOINT;
|
||||
return(TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Buffer is full ?
|
||||
if (keysInBuffer==KBD_BUFFER_SIZE) // Buffer is full
|
||||
{
|
||||
extKey=0;
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
kbdBuffer[bufHead].bKeyDown=isDown;
|
||||
kbdBuffer[bufHead].wRepeatCount=1;
|
||||
|
@ -535,6 +541,8 @@ static unsigned int KeyboardHandler(unsigned int irq)
|
|||
bufHead&=KBD_WRAP_MASK; // Modulo KBD_BUFFER_SIZE
|
||||
keysInBuffer++;
|
||||
extKey=0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -590,10 +598,6 @@ static int InitializeKeyboard(void)
|
|||
* Read data from keyboard buffer
|
||||
*/
|
||||
|
||||
static void dummy(void)
|
||||
{
|
||||
}
|
||||
|
||||
BOOLEAN KbdSynchronizeRoutine(PVOID Context)
|
||||
{
|
||||
PIRP Irp = (PIRP)Context;
|
||||
|
@ -719,5 +723,3 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
|||
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue