X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fgeekos%2Fscreen.c;h=c952b42e8da6089e7ca4625e23a1d90a8de5f91a;hb=c7e3f043b6458083162e23e1a8adb7703fd06559;hp=9c78dde07b7c8d3a7d557c211f804f974c145ab5;hpb=626595465a2c6987606a6bc697df65130ad8c2d3;p=palacios.releases.git diff --git a/palacios/src/geekos/screen.c b/palacios/src/geekos/screen.c index 9c78dde..c952b42 100644 --- a/palacios/src/geekos/screen.c +++ b/palacios/src/geekos/screen.c @@ -1,7 +1,7 @@ /* * GeekOS text screen output * Copyright (c) 2001,2003,2004 David H. Hovemeyer - * $Revision: 1.1 $ + * $Revision: 1.3 $ * * This is free software. You are permitted to use, * redistribute, and modify it as specified in the file "COPYING". @@ -12,8 +12,8 @@ #include #include #include -#include #include +#include /* * Information sources for VT100 and ANSI escape sequences: @@ -398,6 +398,34 @@ void Init_Screen(void) s_cons.currentAttr = DEFAULT_ATTRIBUTE; Clear_Screen(); +#if 0 + { + unsigned int z = (unsigned int)&Print_Emit; + int i; + Put_Char(' '); + Put_Char('0'); + Put_Char('x'); + + for (i = 0; i < 8; i++) { + int j = z & 0xf0000000; + + j = j >> 28; + j &= 0x0000000f; + + if (j > 9) { + j += 55; + } else { + j += 48; + } + + Put_Char(j); + + z = z << 4; + } + } + +#endif + End_Int_Atomic(iflag); Print("Screen Inited\n"); } @@ -518,16 +546,26 @@ static struct Output_Sink s_outputSink = { &Print_Emit, &Print_Finish }; * Print to console using printf()-style formatting. * Calls into Format_Output in common library. */ + +static __inline__ void PrintInternal(const char * format, va_list ap) { + Format_Output(&s_outputSink, format, ap); +} + void Print(const char *fmt, ...) { va_list args; - bool iflag = Begin_Int_Atomic(); va_start(args, fmt); - Format_Output(&s_outputSink, fmt, args); + PrintInternal(fmt, args); va_end(args); End_Int_Atomic(iflag); } + +void PrintList(const char * fmt, va_list ap) { + bool iflag = Begin_Int_Atomic(); + PrintInternal(fmt, ap); + End_Int_Atomic(iflag); +}