Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

208 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. regboot.c
  5. Abstract:
  6. Provides a minimal registry implementation designed to be used by the
  7. osloader at boot time. This includes loading the system hive
  8. ( <SystemRoot>\config\SYSTEM ) into memory, and computing the driver
  9. load list from it.
  10. Author:
  11. John Vert (jvert) 10-Mar-1992
  12. Revision History:
  13. --*/
  14. #include "bldr.h"
  15. #include "msg.h"
  16. #include "cmp.h"
  17. #include "stdio.h"
  18. #include "string.h"
  19. ULONG ScreenWidth=80;
  20. ULONG ScreenHeight=25;
  21. //
  22. // defines for doing console I/O
  23. //
  24. #define ASCII_CR 0x0d
  25. #define ASCII_LF 0x0a
  26. #define ESC 0x1B
  27. #define SGR_INVERSE 7
  28. #define SGR_INTENSE 1
  29. #define SGR_NORMAL 0
  30. //
  31. // prototypes for console I/O routines
  32. //
  33. VOID
  34. BlpClearScreen(
  35. VOID
  36. );
  37. VOID
  38. BlpClearToEndOfLine(
  39. VOID
  40. );
  41. VOID
  42. BlpPositionCursor(
  43. IN ULONG Column,
  44. IN ULONG Row
  45. );
  46. VOID
  47. BlpSetInverseMode(
  48. IN BOOLEAN InverseOn
  49. );
  50. VOID
  51. BlpClearScreen(
  52. VOID
  53. )
  54. /*++
  55. Routine Description:
  56. Clears the screen.
  57. Arguments:
  58. None
  59. Return Value:
  60. None.
  61. --*/
  62. {
  63. #if 0
  64. CHAR Buffer[16];
  65. ULONG Count;
  66. sprintf(Buffer, ASCI_CSI_OUT "2J");
  67. ArcWrite(BlConsoleOutDeviceId,
  68. Buffer,
  69. strlen(Buffer),
  70. &Count);
  71. #else
  72. BlClearScreen();
  73. #endif
  74. }
  75. VOID
  76. BlpClearToEndOfLine(
  77. VOID
  78. )
  79. {
  80. #if 0
  81. CHAR Buffer[16];
  82. ULONG Count;
  83. sprintf(Buffer, ASCI_CSI_OUT "K");
  84. ArcWrite(BlConsoleOutDeviceId,
  85. Buffer,
  86. strlen(Buffer),
  87. &Count);
  88. #else
  89. BlClearToEndOfLine();
  90. #endif
  91. }
  92. VOID
  93. BlpPositionCursor(
  94. IN ULONG Column,
  95. IN ULONG Row
  96. )
  97. /*++
  98. Routine Description:
  99. Sets the position of the cursor on the screen.
  100. Arguments:
  101. Column - supplies new Column for the cursor position.
  102. Row - supplies new Row for the cursor position.
  103. Return Value:
  104. None.
  105. --*/
  106. {
  107. #if 0
  108. CHAR Buffer[16];
  109. ULONG Count;
  110. sprintf(Buffer, ASCI_CSI_OUT "%d;%dH", Row, Column);
  111. ArcWrite(BlConsoleOutDeviceId,
  112. Buffer,
  113. strlen(Buffer),
  114. &Count);
  115. #else
  116. BlPositionCursor( Column, Row );
  117. #endif
  118. }
  119. VOID
  120. BlpSetInverseMode(
  121. IN BOOLEAN InverseOn
  122. )
  123. /*++
  124. Routine Description:
  125. Sets inverse console output mode on or off.
  126. Arguments:
  127. InverseOn - supplies whether inverse mode should be turned on (TRUE)
  128. or off (FALSE)
  129. Return Value:
  130. None.
  131. --*/
  132. {
  133. #if 0
  134. CHAR Buffer[16];
  135. ULONG Count;
  136. sprintf(Buffer, ASCI_CSI_OUT "%dm", InverseOn ? SGR_INVERSE : SGR_NORMAL);
  137. ArcWrite(BlConsoleOutDeviceId,
  138. Buffer,
  139. strlen(Buffer),
  140. &Count);
  141. #else
  142. BlSetInverseMode( InverseOn );
  143. #endif
  144. }