/*
* GeekOS text screen output
* Copyright (c) 2001,2003,2004 David H. Hovemeyer <daveho@cs.umd.edu>
- * $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".
#include <geekos/ktypes.h>
#include <geekos/io.h>
#include <geekos/int.h>
-#include <geekos/fmtout.h>
#include <geekos/screen.h>
+#include <geekos/debug.h>
/*
* Information sources for VT100 and ANSI escape sequences:
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");
}
* 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);
+}