From 388f7a1df37afeed0dd120f8091614a7f6dd91ab Mon Sep 17 00:00:00 2001 From: Miller Puckette Date: Wed, 18 May 2005 04:28:51 +0000 Subject: Damn, edited this before and lost the update. More data features. Took about 12 patches. svn path=/trunk/; revision=3006 --- pd/src/s_print.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'pd/src/s_print.c') diff --git a/pd/src/s_print.c b/pd/src/s_print.c index aefd89ba..1d7695d1 100644 --- a/pd/src/s_print.c +++ b/pd/src/s_print.c @@ -110,6 +110,24 @@ void error(const char *fmt, ...) dopost(buf); } +void verbose(int level, const char *fmt, ...) +{ + char buf[MAXPDSTRING]; + va_list ap; + t_int arg[8]; + int i; + if(level>sys_verbose)return; + dopost("verbose("); + postfloat((float)level); + dopost("):"); + + va_start(ap, fmt); + vsnprintf(buf, MAXPDSTRING-1, fmt, ap); + va_end(ap); + strcat(buf, "\n"); + dopost(buf); +} + /* here's the good way to log errors -- keep a pointer to the offending or offended object around so the user can search for it later. */ -- cgit v1.2.1