Fixes to x86 error and interrupt handling
[tpg/acess2.git] / Kernel / debug.c
index 7168b3a..12adc22 100644 (file)
@@ -85,7 +85,7 @@ static void Debug_Puts(char *Str)
 void Debug_Fmt(const char *format, va_list *args)
 {
        char    c, pad = ' ';
-        int    minSize = 0;
+        int    minSize = 0, len;
        char    tmpBuf[34];     // For Integers
        char    *p = NULL;
         int    isLongLong = 0;
@@ -182,6 +182,9 @@ void Debug_Fmt(const char *format, va_list *args)
 
                case 's':
                        p = (char*)(Uint)arg;
+                       if(!p)          p = "(null)";
+                       len = strlen(p);
+                       while(len++ < minSize)  Debug_Putchar(pad);
                printString:
                        if(!p)          p = "(null)";
                        while(*p)       Debug_Putchar(*p++);
@@ -261,7 +264,7 @@ void Debug_SetKTerminal(char *File)
        if(giDebug_KTerm != -1)
                VFS_Close(giDebug_KTerm);
        giDebug_KTerm = VFS_Open(File, VFS_OPENFLAG_WRITE);
-       Log("Opened '%s' as 0x%x", File, giDebug_KTerm);
+       Log_Log("Debug", "Opened '%s' as 0x%x", File, giDebug_KTerm);
 }
 
 void Debug_Enter(char *FuncName, char *ArgTypes, ...)

UCC git Repository :: git.ucc.asn.au