[BOOTVID] Annotate some functions to avoid confusing (#2936)

Also fix some magic constants.
This commit is contained in:
Dmitry Borisov 2020-06-20 22:12:56 +06:00 committed by Stanislav Motylkov
parent 4d54b8ce69
commit da9384b918
No known key found for this signature in database
GPG key ID: AFE513258CBA9E92
6 changed files with 14 additions and 14 deletions

View file

@ -255,7 +255,7 @@ VidCleanUp(VOID)
VOID VOID
NTAPI NTAPI
VidScreenToBufferBlt( VidScreenToBufferBlt(
_Out_ PUCHAR Buffer, _Out_writes_bytes_(Delta * Height) PUCHAR Buffer,
_In_ ULONG Left, _In_ ULONG Left,
_In_ ULONG Top, _In_ ULONG Top,
_In_ ULONG Width, _In_ ULONG Width,

View file

@ -51,7 +51,7 @@ BitBlt(
_In_ ULONG Top, _In_ ULONG Top,
_In_ ULONG Width, _In_ ULONG Width,
_In_ ULONG Height, _In_ ULONG Height,
_In_ PUCHAR Buffer, _In_reads_bytes_(Delta * Height) PUCHAR Buffer,
_In_ ULONG BitsPerPixel, _In_ ULONG BitsPerPixel,
_In_ ULONG Delta) _In_ ULONG Delta)
{ {
@ -318,7 +318,7 @@ VidSetTextColor(
VOID VOID
NTAPI NTAPI
VidDisplayStringXY( VidDisplayStringXY(
_In_ PUCHAR String, _In_z_ PUCHAR String,
_In_ ULONG Left, _In_ ULONG Left,
_In_ ULONG Top, _In_ ULONG Top,
_In_ BOOLEAN Transparent) _In_ BOOLEAN Transparent)
@ -368,7 +368,7 @@ VidSetScrollRegion(
VOID VOID
NTAPI NTAPI
VidDisplayString( VidDisplayString(
_In_ PUCHAR String) _In_z_ PUCHAR String)
{ {
/* Start looping the string */ /* Start looping the string */
for (; *String; ++String) for (; *String; ++String)
@ -446,7 +446,7 @@ VidDisplayString(
VOID VOID
NTAPI NTAPI
VidBufferToScreenBlt( VidBufferToScreenBlt(
_In_ PUCHAR Buffer, _In_reads_bytes_(Delta * Height) PUCHAR Buffer,
_In_ ULONG Left, _In_ ULONG Left,
_In_ ULONG Top, _In_ ULONG Top,
_In_ ULONG Width, _In_ ULONG Width,

View file

@ -331,7 +331,7 @@ VidCleanUp(VOID)
VOID VOID
NTAPI NTAPI
VidScreenToBufferBlt( VidScreenToBufferBlt(
_Out_ PUCHAR Buffer, _Out_writes_bytes_(Delta * Height) PUCHAR Buffer,
_In_ ULONG Left, _In_ ULONG Left,
_In_ ULONG Top, _In_ ULONG Top,
_In_ ULONG Width, _In_ ULONG Width,

View file

@ -411,7 +411,7 @@ VidResetDisplay(
VOID VOID
NTAPI NTAPI
VidScreenToBufferBlt( VidScreenToBufferBlt(
_Out_ PUCHAR Buffer, _Out_writes_bytes_(Delta * Height) PUCHAR Buffer,
_In_ ULONG Left, _In_ ULONG Left,
_In_ ULONG Top, _In_ ULONG Top,
_In_ ULONG Width, _In_ ULONG Width,
@ -430,7 +430,7 @@ VidScreenToBufferBlt(
{ {
OutputBuffer = Buffer + Y * Delta; OutputBuffer = Buffer + Y * Delta;
for (X = 0; X < Width; X += 2) for (X = 0; X < Width; X += sizeof(USHORT))
{ {
Px = READ_REGISTER_USHORT(PixelsPosition++); Px = READ_REGISTER_USHORT(PixelsPosition++);
*OutputBuffer++ = (FIRSTBYTE(Px) << 4) | (SECONDBYTE(Px) & 0x0F); *OutputBuffer++ = (FIRSTBYTE(Px) << 4) | (SECONDBYTE(Px) & 0x0F);

View file

@ -412,7 +412,7 @@ VidSolidColorFill(
VOID VOID
NTAPI NTAPI
VidScreenToBufferBlt( VidScreenToBufferBlt(
_Out_ PUCHAR Buffer, _Out_writes_bytes_(Delta * Height) PUCHAR Buffer,
_In_ ULONG Left, _In_ ULONG Left,
_In_ ULONG Top, _In_ ULONG Top,
_In_ ULONG Width, _In_ ULONG Width,
@ -430,7 +430,7 @@ VidScreenToBufferBlt(
PUCHAR Buf = Buffer + y * Delta; PUCHAR Buf = Buffer + y * Delta;
/* Start the X inner loop */ /* Start the X inner loop */
for (ULONG x = 0; x < Width; x += 2) for (ULONG x = 0; x < Width; x += sizeof(USHORT))
{ {
/* Read the current value */ /* Read the current value */
*Buf = (*Back++ & 0xF) << 4; *Buf = (*Back++ & 0xF) << 4;

View file

@ -30,7 +30,7 @@ VidSetTextColor(
VOID VOID
NTAPI NTAPI
VidDisplayStringXY( VidDisplayStringXY(
_In_ PUCHAR String, _In_z_ PUCHAR String,
_In_ ULONG Left, _In_ ULONG Left,
_In_ ULONG Top, _In_ ULONG Top,
_In_ BOOLEAN Transparent); _In_ BOOLEAN Transparent);
@ -50,7 +50,7 @@ VidCleanUp(VOID);
VOID VOID
NTAPI NTAPI
VidBufferToScreenBlt( VidBufferToScreenBlt(
_In_ PUCHAR Buffer, _In_reads_bytes_(Delta * Height) PUCHAR Buffer,
_In_ ULONG Left, _In_ ULONG Left,
_In_ ULONG Top, _In_ ULONG Top,
_In_ ULONG Width, _In_ ULONG Width,
@ -60,7 +60,7 @@ VidBufferToScreenBlt(
VOID VOID
NTAPI NTAPI
VidDisplayString( VidDisplayString(
_In_ PUCHAR String); _In_z_ PUCHAR String);
VOID VOID
NTAPI NTAPI
@ -72,7 +72,7 @@ VidBitBlt(
VOID VOID
NTAPI NTAPI
VidScreenToBufferBlt( VidScreenToBufferBlt(
_Out_ PUCHAR Buffer, _Out_writes_bytes_(Delta * Height) PUCHAR Buffer,
_In_ ULONG Left, _In_ ULONG Left,
_In_ ULONG Top, _In_ ULONG Top,
_In_ ULONG Width, _In_ ULONG Width,