ReactOS  0.4.15-dev-1392-g3014417
hardware.c
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) 1998-2001 Klaus P. Gerlicher
4 
5 Module Name:
6 
7  hardware.c
8 
9 Abstract:
10 
11  output to console
12 
13 Environment:
14 
15  Kernel mode only
16 
17 Author:
18 
19  Klaus P. Gerlicher
20 
21 Revision History:
22 
23  04-Aug-1998: created
24  15-Nov-2000: general cleanup of source files
25 
26 Copyright notice:
27 
28  This file may be distributed under the terms of the GNU Public License.
29 
30 --*/
31 
33 // INCLUDES
35 #include "remods.h"
36 #include "precomp.h"
37 
39 // PROTOTYPES
41 
43 // DEFINES
45 
47 // GLOBALS
49 
50 // flagging stuff
53 
54 
55 // terminal emulation
57 
58 // window stuff
60 
61 // screen parameter
63 
64 // jump table to real output functions
67 
68 // ring buffer stuff
72 
74 
75 // output lock
77 
78 // color of windows pane separation bars
84 
86 // FUNCTIONS
88 
89 //*************************************************************************
90 // SuspendPrintRingBuffer()
91 //
92 //*************************************************************************
94 {
95  ENTER_FUNC();
96  bSuspendPrintRingBuffer = bSuspend;
97  LEAVE_FUNC();
98 }
99 
100 //*************************************************************************
101 // EmptyRingBuffer()
102 //
103 //*************************************************************************
104 void EmptyRingBuffer(void)
105 {
106  //ENTER_FUNC();
108  PICE_memset(aBuffers,0,sizeof(aBuffers));
109  //LEAVE_FUNC();
110 }
111 
112 //*************************************************************************
113 // LinesInRingBuffer()
114 //
115 //*************************************************************************
117 {
118  ULONG ulResult;
119 
120 // ENTER_FUNC();
121 
122  ulResult = (ulInPos-ulLastPos)%LINES_IN_BUFFER;
123 
124 // LEAVE_FUNC();
125 
126  return ulResult;
127 }
128 
129 //*************************************************************************
130 // CheckRingBuffer()
131 //
132 //*************************************************************************
133 void CheckRingBuffer(void)
134 {
135 // ENTER_FUNC();
136 
138 
139  if(ulInPos != ulOldInPos )
140  {
143  }
144 
146 
147 // LEAVE_FUNC();
148 }
149 
150 //*************************************************************************
151 // AddToRingBuffer()
152 //
153 //*************************************************************************
155 {
156  ULONG i,j,len;
157  BOOLEAN bHadReturn = FALSE;
158  char temp[sizeof(aBuffers[0])];
159 
160 // ENTER_FUNC();
161 
162  // size of current string
164 
165  // start with ':' and current has ':' in front
166  if(aBuffers[ulInPos][0]==':' && *p==':')
167  {
168  if(j==1)
169  {
170  //LEAVE_FUNC();
171  return FALSE;
172  }
173  aBuffers[ulInPos][j++]='\n';
174  aBuffers[ulInPos][j]=0;
176  // wrap around
177  if(ulInPos == ulLastPos)
178  {
180  PICE_memset(aBuffers[ulInPos],0,sizeof(aBuffers[0]));
181  }
182  // reset to start of buffer
183  j = 0;
184  }
185  // it's an internal print ("pICE: ...")
186  else if(aBuffers[ulInPos][0]==':' && PICE_strncmpi(p,"pICE:",5)==0)
187  {
188  if(j==1)
189  {
190  PICE_memset(aBuffers[ulInPos],0,sizeof(aBuffers[0]));
191  }
192  else
193  {
194  aBuffers[ulInPos][j++]='\n';
195  aBuffers[ulInPos][j]=0;
197  // wrap around
198  if(ulInPos == ulLastPos)
199  {
201  PICE_memset(aBuffers[ulInPos],0,sizeof(aBuffers[0]));
202  }
203  }
204  // reset to start of buffer
205  j = 0;
206  }
207  // it's a debug print and the current line is starting with ':'
208  else if(aBuffers[ulInPos][0]==':' &&
209  ( (*p=='<' && PICE_isdigit(*(p+1)) && *(p+2)=='>') || bIsDebugPrint) )
210  {
211  if(j==1)
212  {
213  PICE_memset(aBuffers[ulInPos],0,sizeof(aBuffers[0]));
214  }
215  else
216  {
217  aBuffers[ulInPos][j++]='\n';
218  aBuffers[ulInPos][j]=0;
220  // wrap around
221  if(ulInPos == ulLastPos)
222  {
224  PICE_memset(aBuffers[ulInPos],0,sizeof(aBuffers[0]));
225  }
226  }
227  // reset to start of buffer
228  j = 0;
229  }
230  // it's a debug print
231  else if(( (*p=='<' && PICE_isdigit(*(p+1)) && *(p+2)=='>') || bIsDebugPrint) )
232  {
233  p += 3;
234  }
235 
236  // size of new string
237  len=PICE_strlen(p);
238 
239  // if combined string length too big
240  // reduce to maximum
241  if( (len+j) > sizeof(aBuffers[0])-2 )
242  {
243  PICE_memcpy(temp,p,sizeof(aBuffers[0])-2);
244  p = temp;
245  // assume we end in NEWLINE
246  p[sizeof(aBuffers[0])-2]='\n';
247  p[sizeof(aBuffers[0])-1]=0;
248  }
249 
250  for(i=0;p[i]!=0;i++)
251  {
252  // newline
253  if(p[i]=='\n')
254  {
255  aBuffers[ulInPos][j++]='\n';
256  aBuffers[ulInPos][j]=0;
258  // wrap around
259  if(ulInPos == ulLastPos)
260  {
262  PICE_memset(aBuffers[ulInPos],0,sizeof(aBuffers[0]));
263  }
264  // reset to start of buffer
265  j = 0;
266  // notify that we had a NEWLINE
267  bHadReturn = TRUE;
268  }
269  // backspace
270  else if(p[i]=='\b')
271  {
272  if(j!=0)
273  {
274  j--;
275  aBuffers[ulInPos][j] = 0;
276  }
277  }
278  // TAB
279  else if(p[i]=='\t')
280  {
281  // copy TAB
282  aBuffers[ulInPos][j++] = p[i];
283  }
284  else
285  {
286  if((UCHAR)p[i]<0x20 || (UCHAR)p[i]>0x7f)
287  p[i]=0x20;
288 
289  aBuffers[ulInPos][j++] = p[i];
290  }
291  }
292 // LEAVE_FUNC();
293 
294  return bHadReturn;
295 }
296 
297 //*************************************************************************
298 // ReplaceRingBufferCurrent()
299 //
300 //*************************************************************************
302 {
303 // ENTER_FUNC();
304 
305  PICE_memset(aBuffers[ulInPos],0,sizeof(aBuffers[0]));
307 
308 // LEAVE_FUNC();
309 }
310 
311 //*************************************************************************
312 // PrintRingBuffer()
313 //
314 //*************************************************************************
315 void PrintRingBuffer(ULONG ulLines)
316 {
317  ULONG ulDelta = LinesInRingBuffer();
318  ULONG ulOutPos,i=0;
319 
320 // ENTER_FUNC();
321 
323  {
324  DPRINT((0,"PrintRingBuffer(): suspended\n"));
325  LEAVE_FUNC();
326  return;
327  }
328 
329  if(!ulDelta)
330  {
331  DPRINT((0,"PrintRingBuffer(): no lines in ring buffer\n"));
332  LEAVE_FUNC();
333  return;
334  }
335 
336  if(ulDelta<ulOldDelta)
337  {
338  DPRINT((0,"PrintRingBuffer(): lines already output\n"));
339  LEAVE_FUNC();
340  return;
341  }
342 
343  ulOldDelta = ulDelta;
344 
345  if(ulDelta < ulLines)
346  {
347  DPRINT((0,"PrintRingBuffer(): less lines than requested: ulDelta: %x, ulLines: %x\n", ulDelta, ulLines));
348  ulLines = ulDelta;
349  }
350 
351  ulOutPos = (ulInPos-ulLines)%LINES_IN_BUFFER;
352  DPRINT((0,"PrintRingBuffer(): ulOutPos = %u\n",ulOutPos));
353 
355 
356  while(ulLines--)
357  {
360  i++;
361  ulOutPos = (ulOutPos+1)%LINES_IN_BUFFER;
362  }
363 
364  if(aBuffers[ulOutPos][0]==':')
365  {
369  }
370 
371 // LEAVE_FUNC();
372 }
373 
374 //*************************************************************************
375 // PrintRingBufferOffset()
376 //
377 //*************************************************************************
379 {
380  ULONG ulLinesInRingBuffer = LinesInRingBuffer();
381  ULONG ulOutPos,i=0;
382 
383 // ENTER_FUNC();
384 
385  // no lines in ring buffer
386  if(!ulLinesInRingBuffer)
387  {
388  DPRINT((0,"PrintRingBufferOffset(): ulLinesInRingBuffer is 0\n"));
389  LEAVE_FUNC();
390  return FALSE;
391  }
392 
393  // more lines inc. offset to display than in ring buffer
394  if(ulLinesInRingBuffer < ulLines)
395  {
396  ulLines = ulLinesInRingBuffer;
397  }
398 
399  if(ulLinesInRingBuffer < ulOffset+ulLines)
400  {
401  DPRINT((0,"PrintRingBufferOffset(): ulLinesInRingBuffer < ulOffset+ulLines\n"));
402  LEAVE_FUNC();
403  return FALSE;
404  }
405 
406  DPRINT((0,"PrintRingBufferOffset(): ulLinesInRingBuffer %u ulLines %u ulOffset %u\n",ulLinesInRingBuffer,ulLines,ulOffset));
407 
408  ulOutPos = (ulInPos-ulOffset-ulLines)%LINES_IN_BUFFER;
409 
410  DPRINT((0,"PrintRingBufferOffset(): ulOutPos = %u\n",ulOutPos));
411 
412  if(ulOutPos == ulInPos)
413  {
414  DPRINT((0,"PrintRingBufferOffset(): ulOutPos == ulInPos\n"));
415  LEAVE_FUNC();
416  return FALSE;
417  }
418 
419  // start to output upper left corner of window
421 
422  // while not end reached...
423  while(ulLines--)
424  {
427  i++;
428  ulOutPos = (ulOutPos+1)%LINES_IN_BUFFER;
429  }
430 
431  if(aBuffers[ulInPos][0]==':')
432  {
437  }
438 
439 // LEAVE_FUNC();
440  return TRUE;
441 }
442 
443 //*************************************************************************
444 // PrintRingBufferHome()
445 //
446 //*************************************************************************
448 {
449  ULONG ulDelta = LinesInRingBuffer();
450  ULONG ulOutPos,i=0;
451 
452 // ENTER_FUNC();
453 
454  // no lines in ring buffer
455  if(!ulDelta)
456  {
457  DPRINT((0,"PrintRingBufferHome(): no lines in ring buffer\n"));
458  LEAVE_FUNC();
459  return FALSE;
460  }
461 
462  // more lines inc. offset to display than in ring buffer
463  if(ulDelta < ulLines)
464  {
465  ulLines = ulDelta;
466  }
467 
468  // calc the start out position
469  ulOutPos = ulLastPos;
470 
471  // start to output upper left corner of window
473 
474  // while not end reached...
475  while(ulLines--)
476  {
479  i++;
480  ulOutPos = (ulOutPos+1)%LINES_IN_BUFFER;
481  }
482 
483  if(aBuffers[ulInPos][0]==':')
484  {
489  }
490 
491 // LEAVE_FUNC();
492 
493  return TRUE;
494 }
495 
496 //*************************************************************************
497 // ResetColor()
498 //
499 //*************************************************************************
500 void ResetColor(void)
501 {
504 }
505 
506 // OUTPUT handlers
507 
508 //*************************************************************************
509 // PrintGraf()
510 //
511 //*************************************************************************
513 {
515 }
516 
517 //*************************************************************************
518 // Flush()
519 //
520 // Flush the stream of chars to PrintGraf()
521 //*************************************************************************
522 void Flush(void)
523 {
524  if(ohandlers.Flush)
525  ohandlers.Flush();
526 }
527 
528 //*************************************************************************
529 // EnableScroll()
530 //
531 //*************************************************************************
533 {
534  ENTER_FUNC();
536  LEAVE_FUNC();
537 }
538 
539 //*************************************************************************
540 // DisableScroll()
541 //
542 //*************************************************************************
544 {
545  ENTER_FUNC();
547  LEAVE_FUNC();
548 }
549 
550 
551 //*************************************************************************
552 // ShowCursor()
553 //
554 // show hardware cursor
555 //*************************************************************************
556 void ShowCursor(void)
557 {
559 }
560 
561 //*************************************************************************
562 // HideCursor()
563 //
564 // hide hardware cursor
565 //*************************************************************************
566 void HideCursor(void)
567 {
569 }
570 
571 //*************************************************************************
572 // SetForegroundColor()
573 //
574 // set foreground color
575 //*************************************************************************
577 {
578 // ENTER_FUNC();
579 
581 
582 // LEAVE_FUNC();
583 }
584 
585 //*************************************************************************
586 // SetBackgroundColor()
587 //
588 // set background color
589 //*************************************************************************
591 {
592 // ENTER_FUNC();
593 
595 
596 // LEAVE_FUNC();
597 }
598 
599 //*************************************************************************
600 // PutChar()
601 //
602 // put a zero terminated string at position (x,y)
603 //*************************************************************************
605 {
606  ULONG i;
607 
608 // ENTER_FUNC();
609 
611 
612  for(i=0;p[i]!=0;i++)
613  {
614  if((UCHAR)p[i]>=0x20 && (UCHAR)p[i]<0x80)
615  {
616  PrintGraf(x+i,y,p[i]);
617  }
618  }
619 
620  Flush();
621 
623 
624 // LEAVE_FUNC();
625 }
626 
627 //*************************************************************************
628 // CopyLineTo()
629 //
630 // copy a line from src to dest
631 //*************************************************************************
633 {
635 }
636 
637 //*************************************************************************
638 // InvertLine()
639 //
640 // invert a line on the screen
641 //*************************************************************************
643 {
645 }
646 
647 //*************************************************************************
648 // HatchLine()
649 //
650 // hatches a line on the screen
651 //*************************************************************************
653 {
655 }
656 
657 //*************************************************************************
658 // ClrLine()
659 //
660 // clear a line on the screen
661 //*************************************************************************
663 {
665 }
666 
667 //*************************************************************************
668 // Home()
669 //
670 // cursor to home position
671 //*************************************************************************
673 {
674  wWindow[Window].usCurX=0;
675  wWindow[Window].usCurY=0;
676 
677 }
678 
679 //*************************************************************************
680 // Clear()
681 //
682 // clear a specific window
683 //*************************************************************************
685 {
686  ULONG j;
687 
688  for(j=0;j<wWindow[Window].cy;j++)
689  {
691  }
692 
693  Home(Window);
694 }
695 
696 //*************************************************************************
697 // PrintCaption()
698 //
699 //*************************************************************************
700 void PrintCaption(void)
701 {
702  const char title[]=" PrivateICE system level debugger (REACTOS) ";
703 
706 
707  ClrLine(0);
709  (GLOBAL_SCREEN_WIDTH-sizeof(title))/2,
710  0);
711 
712  ResetColor();
713 }
714 
715 //*************************************************************************
716 // PrintTemplate()
717 //
718 // print the screen template
719 //*************************************************************************
720 void PrintTemplate(void)
721 {
722  USHORT i,j;
723 
724  ENTER_FUNC();
725 
726  ResetColor();
727 
728  for(j=0;j<4;j++)
729  {
730  for(i=wWindow[j].y;i<(wWindow[j].y+wWindow[j].cy);i++)
731  {
732  ClrLine(i);
733  }
734  }
735 
736  PrintCaption();
737 
740 
744 
745  ResetColor();
746 
747  ShowRunningMsg();
748  PrintLogo(TRUE);
749 
750  LEAVE_FUNC();
751 }
752 
753 //*************************************************************************
754 // PrintLogo()
755 //
756 //*************************************************************************
757 void PrintLogo(BOOLEAN bShow)
758 {
759  ohandlers.PrintLogo(bShow);
760 }
761 
762 //*************************************************************************
763 // PrintCursor()
764 //
765 // emulate a blinking cursor block
766 //*************************************************************************
767 void PrintCursor(BOOLEAN bForce)
768 {
769  ohandlers.PrintCursor(bForce);
770 }
771 
772 //*************************************************************************
773 // Print()
774 //
775 //*************************************************************************
777 {
778  ULONG i;
779 
780  DPRINT((11,"%s",p));
781 
782  //ENTER_FUNC();
784  {
785  DPRINT((0,"Print(): console is not initialized!\n"));
786  //LEAVE_FUNC();
787  return;
788  }
789 
790 
791  // the OUTPUT_WINDOW is specially handled
792  if(Window == OUTPUT_WINDOW)
793  {
794  DPRINT((0,"Print(): OUTPUT_WINDOW\n"));
795  if(AddToRingBuffer(p))
796  {
797  DPRINT((0,"Print(): checking ring buffer\n"));
798  CheckRingBuffer();
799  }
800  else
801  {
802  DPRINT((0,"Print(): outputting a line from ring buffer\n"));
806  }
807  }
808  else
809  {
810  BOOLEAN bOutput = TRUE;
811 
813  {
815  }
816 
817  for(i=0;p[i]!=0;i++)
818  {
819  if(wWindow[Window].usCurX > (GLOBAL_SCREEN_WIDTH-1))
820  bOutput = FALSE;
821 
822  // newline
823  if(p[i]=='\n')
824  {
825  wWindow[Window].usCurX = 0;
826  wWindow[Window].usCurY++;
827  if(wWindow[Window].usCurY>=wWindow[Window].cy)
828  {
830  }
831  if(wWindow[Window].bScrollDisabled==TRUE)break;
832  }
833  // backspace
834  else if(p[i]=='\b')
835  {
836  if(wWindow[Window].usCurX>0)
837  {
838  wWindow[Window].usCurX--;
839  if(bOutput)
840  PrintGraf(wWindow[Window].usCurX,wWindow[Window].y+wWindow[Window].usCurY,0x20);
841  }
842 
843  }
844  // TAB
845  else if(p[i]=='\t')
846  {
847  if((wWindow[Window].usCurX + 4) < (GLOBAL_SCREEN_WIDTH-1))
848  {
849  wWindow[Window].usCurX += 4;
850  }
851  }
852  else
853  {
854  if((UCHAR)p[i]<0x20 || (UCHAR)p[i]>0x7f)
855  p[i]=0x20;
856 
857  if(bOutput)
858  PrintGraf(wWindow[Window].usCurX,wWindow[Window].y+wWindow[Window].usCurY,p[i]);
859 
860  wWindow[Window].usCurX++;
861  }
862  }
863 
864  // flush
865  Flush();
866  }
867  //LEAVE_FUNC();
868 }
869 
870 
871 //*************************************************************************
872 // SaveGraphicsState()
873 //
874 //*************************************************************************
876 {
878 }
879 
880 //*************************************************************************
881 // RestoreGraphicsState()
882 //
883 //*************************************************************************
885 {
887 }
888 
889 //*************************************************************************
890 // SetWindowGeometry()
891 //
892 //*************************************************************************
894 {
895  PICE_memcpy(wWindow,pWindow,sizeof(wWindow));
896 }
897 
898 // INPUT handlers
899 
900 //*************************************************************************
901 // GetKeyPolled()
902 //
903 //*************************************************************************
905 {
906  return ihandlers.GetKeyPolled();
907 }
908 
909 //*************************************************************************
910 // FlushKeyboardQueue()
911 //
912 //*************************************************************************
914 {
916 }
917 
918 
919 //*************************************************************************
920 // ConsoleInit()
921 //
922 // init terminal screen
923 //*************************************************************************
925 {
926  BOOLEAN bResult = FALSE;
927 
928  ENTER_FUNC();
929 
930  // preset ohandlers and ihandler to NULL
931  PICE_memset((void*)&ohandlers,0,sizeof(ohandlers));
932  PICE_memset((void*)&ihandlers,0,sizeof(ihandlers));
933 
934  switch(eTerminalMode)
935  {
937  bResult = ConsoleInitHercules();
938  break;
940  break;
942  bResult = ConsoleInitVga();
943  break;
945  bResult = ConsoleInitSerial();
946  break;
947  case TERMINAL_MODE_NONE:
948  default:
949  // fail
950  break;
951  }
952 
953  // check that outputhandlers have all been set
954  // ohandlers.Flush may be zero on return
955  if( !ohandlers.ClrLine ||
957  !ohandlers.HatchLine ||
961  !ohandlers.PrintGraf ||
962  !ohandlers.PrintLogo ||
968  {
969  bResult = FALSE;
970  }
971 
972  // check that inputhandlers were installed
973  if( !ihandlers.GetKeyPolled ||
975  {
976  bResult = FALSE;
977  }
978 
979  LEAVE_FUNC();
980 
981  bConsoleIsInitialized = bResult;
982 
983  return bResult;
984 }
985 
986 //*************************************************************************
987 // ConsoleShutdown()
988 //
989 // exit terminal screen
990 //*************************************************************************
991 void ConsoleShutdown(void)
992 {
993  ENTER_FUNC();
994 
995  // sleep for a few seconds
996  KeStallExecutionProcessor(1000*5000);
997 
998  switch(eTerminalMode)
999  {
1002  break;
1004  break;
1007  break;
1008  case TERMINAL_MODE_SERIAL:
1010  break;
1011  case TERMINAL_MODE_NONE:
1012  default:
1013  // fail
1014  break;
1015  }
1016 
1017  LEAVE_FUNC();
1018 }
1019 
1020 // EOF
void(* PrintLogo)(BOOLEAN bShow)
Definition: hardware.h:47
BOOLEAN bCursorEnabled
Definition: hardware.c:51
#define LINES_IN_BUFFER
Definition: precomp.h:32
void SetForegroundColor(ECOLORS c)
Definition: hardware.c:576
void ConsoleShutdownVga(void)
Definition: vga.c:557
ULONG LinesInRingBuffer(void)
Definition: hardware.c:116
void HideCursor(void)
Definition: hardware.c:566
void EnableScroll(USHORT Window)
Definition: hardware.c:532
void SetWindowGeometry(PVOID pWindow)
Definition: hardware.c:893
void EmptyRingBuffer(void)
Definition: hardware.c:104
BOOLEAN ConsoleInit(void)
Definition: hardware.c:924
BOOLEAN PrintRingBufferHome(ULONG ulLines)
Definition: hardware.c:447
void PrintTemplate(void)
Definition: hardware.c:720
#define TRUE
Definition: types.h:120
void(* FlushKeyboardQueue)(void)
Definition: hardware.h:61
ULONG GLOBAL_SCREEN_WIDTH
Definition: hardware.c:62
enum _ETERMINALMODE ETERMINALMODE
ULONG GLOBAL_SCREEN_HEIGHT
Definition: hardware.c:62
USHORT PICE_strlen(const char *s)
Definition: utils.c:547
void(* HideCursor)(void)
Definition: hardware.h:52
USHORT cy
Definition: hardware.h:33
USHORT usCaptionColor
Definition: hardware.c:79
ULONG ulOldDelta
Definition: hardware.c:70
BOOLEAN PrintRingBufferOffset(ULONG ulLines, ULONG ulOffset)
Definition: hardware.c:378
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define LEAVE_FUNC()
Definition: debug.h:43
ULONG PICE_strncmpi(char *s1, char *s2, ULONG len)
Definition: utils.c:362
void ShowCursor(void)
Definition: hardware.c:556
BOOLEAN ConsoleInitSerial(void)
Definition: serial.c:582
USHORT usForegroundColor
Definition: hardware.c:81
char * LPSTR
Definition: xmlstorage.h:182
void HatchLine(ULONG line)
Definition: hardware.c:652
BOOLEAN ConsoleInitVga(void)
Definition: vga.c:479
Definition: shared.h:137
int PICE_isdigit(int c)
Definition: utils.c:337
void Print(USHORT Window, LPSTR p)
Definition: hardware.c:776
USHORT usBackgroundColor
Definition: hardware.c:82
ULONG ulInPos
Definition: hardware.c:69
BOOLEAN bSuspendPrintRingBuffer
Definition: hardware.c:71
char * PICE_strcpy(char *s1, char *s2)
Definition: utils.c:302
void(* SetBackgroundColor)(ECOLORS)
Definition: hardware.h:54
void(* SetForegroundColor)(ECOLORS)
Definition: hardware.h:53
Definition: window.c:28
void Flush(void)
Definition: hardware.c:522
BOOLEAN bScrollDisabled
Definition: hardware.h:35
#define FALSE
Definition: types.h:117
#define Acquire_Output_Lock()
Definition: hardware.h:144
USHORT usCaptionText
Definition: hardware.c:80
void PrintCaption(void)
Definition: hardware.c:700
void Home(USHORT Window)
Definition: hardware.c:672
void(* ClrLine)(ULONG line)
Definition: hardware.h:44
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:581
void(* RestoreGraphicsState)(void)
Definition: hardware.h:50
unsigned char BOOLEAN
#define COLOR_TEXT
Definition: hardware.h:158
void ClrLine(ULONG line)
Definition: hardware.c:662
Definition: parser.c:48
void DPRINT(...)
Definition: polytest.cpp:61
WINDOW wWindow[4]
Definition: hardware.c:59
OUTPUT_HANDLERS ohandlers
Definition: hardware.c:65
void ConsoleShutdownSerial(void)
Definition: serial.c:641
void ShowRunningMsg(void)
Definition: utils.c:843
ETERMINALMODE eTerminalMode
Definition: hardware.c:56
UCHAR(* GetKeyPolled)(void)
Definition: hardware.h:60
#define COLOR_FOREGROUND
Definition: hardware.h:160
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
void(* PrintGraf)(ULONG x, ULONG y, UCHAR c)
Definition: hardware.h:42
INPUT_HANDLERS ihandlers
Definition: hardware.c:66
#define BLUE
Definition: seh0053.c:11
#define BLACK
void RestoreGraphicsState(void)
Definition: hardware.c:884
void(* PrintCursor)(BOOLEAN bForce)
Definition: hardware.h:48
const GLubyte * c
Definition: glext.h:8905
void(* ShowCursor)(void)
Definition: hardware.h:51
enum _ECOLORS ECOLORS
ULONG ulOutputLock
Definition: hardware.c:76
void ReplaceRingBufferCurrent(LPSTR s)
Definition: hardware.c:301
void PICE_memcpy(void *t, void *s, int sz)
Definition: utils.c:239
int Window
Definition: x11stubs.h:26
BOOLEAN bConsoleIsInitialized
Definition: hardware.c:52
void PrintGraf(ULONG x, ULONG y, UCHAR c)
Definition: hardware.c:512
unsigned char UCHAR
Definition: xmlstorage.h:181
BOOLEAN bIsDebugPrint
Definition: output.c:55
#define WHITE
USHORT y
Definition: hardware.h:33
GLenum GLsizei len
Definition: glext.h:6722
GLdouble s
Definition: gl.h:2039
void FlushKeyboardQueue(void)
Definition: hardware.c:913
void(* Flush)(void)
Definition: hardware.h:43
void(* SaveGraphicsState)(void)
Definition: hardware.h:49
GLenum src
Definition: glext.h:6340
void PrintRingBuffer(ULONG ulLines)
Definition: hardware.c:315
void(* HatchLine)(ULONG line)
Definition: hardware.h:46
void ConsoleShutdownHercules(void)
Definition: hercules.c:474
void SaveGraphicsState(void)
Definition: hardware.c:875
ULONG ulOldInPos
Definition: hardware.c:70
UCHAR GetKeyPolled(void)
Definition: hardware.c:904
void PutChar(LPSTR p, ULONG x, ULONG y)
Definition: hardware.c:604
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void DisableScroll(USHORT Window)
Definition: hardware.c:543
unsigned short USHORT
Definition: pedump.c:61
USHORT usCurX
Definition: hardware.h:34
static calc_node_t temp
Definition: rpn_ieee.c:38
USHORT usHiLiteColor
Definition: hardware.c:83
#define Release_Output_Lock()
Definition: hardware.h:150
void CopyLineTo(USHORT dest, USHORT src)
Definition: hardware.c:632
USHORT usCurY
Definition: hardware.h:34
void(* CopyLineTo)(USHORT dest, USHORT src)
Definition: hardware.h:41
void CheckRingBuffer(void)
Definition: hardware.c:133
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
void(* InvertLine)(ULONG line)
Definition: hardware.h:45
void SetBackgroundColor(ECOLORS c)
Definition: hardware.c:590
void ConsoleShutdown(void)
Definition: hardware.c:991
void SuspendPrintRingBuffer(BOOLEAN bSuspend)
Definition: hardware.c:93
unsigned int ULONG
Definition: retypes.h:1
void InvertLine(ULONG line)
Definition: hardware.c:642
#define ENTER_FUNC()
Definition: debug.h:42
static char * dest
Definition: rtl.c:135
#define COLOR_BACKGROUND
Definition: hardware.h:164
void ResetColor(void)
Definition: hardware.c:500
void Clear(USHORT Window)
Definition: hardware.c:684
char aBuffers[LINES_IN_BUFFER][1024]
Definition: hardware.c:73
GLfloat GLfloat p
Definition: glext.h:8902
#define COLOR_CAPTION
Definition: hardware.h:156
BOOLEAN AddToRingBuffer(LPSTR p)
Definition: hardware.c:154
void PrintLogo(BOOLEAN bShow)
Definition: hardware.c:757
static char title[]
Definition: ps.c:92
VOID NTAPI KeStallExecutionProcessor(IN ULONG MicroSeconds)
Definition: ntoskrnl.c:95
void PICE_memset(void *p, unsigned char c, int sz)
Definition: utils.c:228
void PrintCursor(BOOLEAN bForce)
Definition: hardware.c:767
ULONG ulLastPos
Definition: hardware.c:69
BOOLEAN ConsoleInitHercules(void)
Definition: hercules.c:398