VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Boot/Windows/BootConsoleIo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Boot/Windows/BootConsoleIo.cpp')
-rw-r--r--src/Boot/Windows/BootConsoleIo.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/Boot/Windows/BootConsoleIo.cpp b/src/Boot/Windows/BootConsoleIo.cpp
index 706e36f6..e1dea4ed 100644
--- a/src/Boot/Windows/BootConsoleIo.cpp
+++ b/src/Boot/Windows/BootConsoleIo.cpp
@@ -2,11 +2,11 @@
Derived from source code of TrueCrypt 7.1a, which is
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2017 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
@@ -99,21 +99,21 @@ void Print (const uint64 &number)
else
PrintHex (number);
}
-void PrintHex (byte b)
+void PrintHex (uint8 b)
{
PrintChar (((b >> 4) >= 0xA ? 'A' - 0xA : '0') + (b >> 4));
PrintChar (((b & 0xF) >= 0xA ? 'A' - 0xA : '0') + (b & 0xF));
}
void PrintHex (uint16 data)
{
- PrintHex (byte (data >> 8));
- PrintHex (byte (data));
+ PrintHex (uint8 (data >> 8));
+ PrintHex (uint8 (data));
}
void PrintHex (uint32 data)
{
@@ -217,13 +217,13 @@ void PrintErrorNoEndl (const char *message)
Print (message);
Beep();
}
-byte GetShiftFlags ()
+uint8 GetShiftFlags ()
{
- byte flags;
+ uint8 flags;
__asm
{
mov ah, 2
int 0x16
mov flags, al
@@ -231,11 +231,11 @@ byte GetShiftFlags ()
return flags;
}
-byte GetKeyboardChar ()
+uint8 GetKeyboardChar ()
{
return GetKeyboardChar (nullptr);
}
/*
@@ -251,11 +251,11 @@ inline void Sleep ()
int 0x15
}
}
*/
-byte GetKeyboardChar (byte *scanCode)
+uint8 GetKeyboardChar (uint8 *scanCode)
{
// Work around potential BIOS bugs (Windows boot manager polls the keystroke buffer)
while (!IsKeyboardCharAvailable())
{
// reduce CPU usage by halting CPU until the next external interrupt is fired
@@ -263,12 +263,12 @@ byte GetKeyboardChar (byte *scanCode)
{
hlt
}
}
- byte asciiCode;
- byte scan;
+ uint8 asciiCode;
+ uint8 scan;
__asm
{
mov ah, 0
int 0x16
mov asciiCode, al
@@ -300,11 +300,11 @@ bool IsKeyboardCharAvailable ()
bool EscKeyPressed ()
{
if (IsKeyboardCharAvailable ())
{
- byte keyScanCode;
+ uint8 keyScanCode;
GetKeyboardChar (&keyScanCode);
return keyScanCode == TC_BIOS_KEY_ESC;
}
return false;
@@ -344,12 +344,12 @@ bool IsDigit (char c)
}
int GetString (char *buffer, size_t bufferSize)
{
- byte c;
- byte scanCode;
+ uint8 c;
+ uint8 scanCode;
size_t pos = 0;
while (pos < bufferSize)
{
c = GetKeyboardChar (&scanCode);