/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 1990-2011 AT&T Intellectual Property *4* and is licensed under the *5* Eclipse Public License, Version 1.0 *6* by AT&T Intellectual Property *7* *8* A copy of the License is available at *9* http://www.eclipse.org/org/documents/epl-v10.html *10* (with md5 checksum b35adb5213ca9657e911e9befb180842) *11* *12* Information and Software Systems Research *13* AT&T Research *14* Florham Park NJ *15* *16* Glenn Fowler <[email protected]> *17* *18***********************************************************************/19#pragma prototyped2021#include "vcs_rscs.h"2223extern int debug;2425static void tracev(int level, va_list ap)26{27char* format;2829if (!level || debug && level <= debug)30{31if (level)32sfprintf(sfstdout, "[%d] ", level);33format = va_arg(ap, char*);34sfvprintf(sfstdout, format, ap);35sfprintf(sfstdout, "\n");36}37}3839void trace(int level, ...)40{41va_list ap;4243va_start(ap, level);44tracev(level, ap);45va_end(ap);46}474849