/*****************************************************************************
* 	Project 	: Network Based Message Queue System		    **
*	Course		: CIS 650 - Software Engineering		    **
*	Location 	: /research/paraducks3/courses/cis650/proj/rt	    **
*	File		: rtutil.cc					    **
*	Description 	: General purpose utilities - functions 	    **
*****************************************************************************/

#include <rtincl.h>
/* Debug function */

void DEBUG(char *format, ...)
{
    if (debugFlag) 
    {
        va_list ap;
        // You will get an unused variable message here -- ignore it.
        va_start(ap, format);
        vfprintf(stdout, format, ap);
        va_end(ap);
        fflush(stdout);
    }
}


int ngetownid(void)
{
  return((gethostid() << 16) | ((getpid() << 16) >> 16));
}



