2005-04-21 16:53:53 +02:00
|
|
|
/*
|
|
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
|
*/
|
|
|
|
/* $Header$ */
|
|
|
|
|
|
|
|
#if __STDC__
|
|
|
|
#include <stdarg.h>
|
|
|
|
#else
|
|
|
|
#include <varargs.h>
|
|
|
|
#endif
|
|
|
|
#include <system.h>
|
|
|
|
#include "param.h"
|
2010-07-05 01:01:32 +02:00
|
|
|
#include "format.h"
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
/*VARARGS*/
|
|
|
|
/*FORMAT1v $
|
|
|
|
%s = char *
|
|
|
|
%l = long
|
|
|
|
%c = int
|
|
|
|
%[uxbo] = unsigned int
|
|
|
|
%d = int
|
|
|
|
$ */
|
|
|
|
char *
|
|
|
|
#if __STDC__
|
|
|
|
sprint(char *buf, char *fmt, ...)
|
|
|
|
#else
|
|
|
|
sprint(buf, fmt, va_alist)
|
|
|
|
char *buf, *fmt;
|
|
|
|
va_dcl
|
|
|
|
#endif
|
|
|
|
{
|
|
|
|
va_list args;
|
|
|
|
|
|
|
|
#if __STDC__
|
|
|
|
va_start(args, fmt);
|
|
|
|
#else
|
|
|
|
va_start(args);
|
|
|
|
#endif
|
|
|
|
buf[_format(buf, fmt, args)] = '\0';
|
|
|
|
va_end(args);
|
|
|
|
return buf;
|
|
|
|
}
|