Main Page   Compound List   File List   Compound Members   File Members  

utility.cc File Reference

#include "copyright.h"
#include "utility.h"
#include "/usr/include/stdarg.h"

Go to the source code of this file.

Functions

void DebugInit (char *flagList)
bool DebugIsEnabled (char flag)
void DEBUG (char flag, char *format,...)

Variables

char * enableFlags = NULL


Function Documentation

void DEBUG char    flag,
char *    format,
...   
 

Definition at line 65 of file utility.cc.

References DebugIsEnabled.

00066 {
00067     if (DebugIsEnabled(flag)) {
00068         va_list ap;
00069         // You will get an unused variable message here -- ignore it.
00070         va_start(ap, format);
00071         vfprintf(stdout, format, ap);
00072         va_end(ap);
00073         fflush(stdout);
00074     }
00075 }

void DebugInit char *    flagList
 

Definition at line 38 of file utility.cc.

References enableFlags.

00039 {
00040     enableFlags = flagList;
00041 }

bool DebugIsEnabled char    flag
 

Definition at line 49 of file utility.cc.

References enableFlags, FALSE, and NULL.

00050 {
00051     if (enableFlags != NULL)
00052        return (strchr(enableFlags, flag) != 0) 
00053                 || (strchr(enableFlags, '+') != 0);
00054     else
00055       return FALSE;
00056 }


Variable Documentation

char* enableFlags = NULL [static]
 

Definition at line 24 of file utility.cc.

Referenced by DebugInit, and DebugIsEnabled.


Generated on Mon Feb 10 09:54:53 2003 for nachos by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002
The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees