// thus on Sat, 16 Aug 1997 18:30:41 -0400, George virtually wrote:
> SP #17
> - sprintf()+log() enhancement.
> SP #18
> - sprintf()+mudlog() enhancement.
You mean a stdarg.h/varargs.h version of the log functions?
This is taken from my personal lib.
It shouldn't take too much to accomodate <varargs.h>
d.
--8<--
#include <stdio.h>
#include <stdarg.h>
#include <time.h>
// write a variable string to stderr
// writes a string to the log
void isyslog (const char *fmt, ...)
{
va_list va;
time_t t = time (0);
va_start (va, fmt);
fprintf (stderr, "%-19.19s :: ", ctime (&t));
vfprintf (stderr, fmt, va);
}
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST