Annotation of ntddk/src/video/displays/framebuf/debug.c, revision 1.1.1.1

1.1       root        1: /******************************Module*Header*******************************\
                      2: * Module Name: debug.c
                      3: *
                      4: * debug helpers routine
                      5: *
                      6: * Copyright (c) 1992 Microsoft Corporation
                      7: *
                      8: \**************************************************************************/
                      9: 
                     10: #include <stdio.h>
                     11: #include <stdarg.h>
                     12: 
                     13: #include "driver.h"
                     14: 
                     15: #if DBG
                     16: 
                     17: ULONG DebugLevel = 0;
                     18: 
                     19: #endif // DBG
                     20: 
                     21: /*****************************************************************************
                     22:  *
                     23:  *   Routine Description:
                     24:  *
                     25:  *      This function is variable-argument, level-sensitive debug print
                     26:  *      routine.
                     27:  *      If the specified debug level for the print statement is lower or equal
                     28:  *      to the current debug level, the message will be printed.
                     29:  *
                     30:  *   Arguments:
                     31:  *
                     32:  *      DebugPrintLevel - Specifies at which debugging level the string should
                     33:  *          be printed
                     34:  *
                     35:  *      DebugMessage - Variable argument ascii c string
                     36:  *
                     37:  *   Return Value:
                     38:  *
                     39:  *      None.
                     40:  *
                     41:  ***************************************************************************/
                     42: 
                     43: VOID
                     44: DebugPrint(
                     45:     ULONG DebugPrintLevel,
                     46:     PCHAR DebugMessage,
                     47:     ...
                     48:     )
                     49: 
                     50: {
                     51: 
                     52: #if DBG
                     53: 
                     54:     va_list ap;
                     55: 
                     56:     va_start(ap, DebugMessage);
                     57: 
                     58:     if (DebugPrintLevel <= DebugLevel) {
                     59: 
                     60:         char buffer[128];
                     61: 
                     62:         vsprintf(buffer, DebugMessage, ap);
                     63: 
                     64:        OutputDebugStringA(buffer);
                     65:     }
                     66: 
                     67:     va_end(ap);
                     68: 
                     69: #endif // DBG
                     70: 
                     71: } // DebugPrint()

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.