diff options
author | N.N. <krzyszcz@users.sourceforge.net> | 2005-11-21 22:16:37 +0000 |
---|---|---|
committer | N.N. <krzyszcz@users.sourceforge.net> | 2005-11-21 22:16:37 +0000 |
commit | c2014a0a771e621cec552c6ee88daddcb46d13fe (patch) | |
tree | 183540090b25920599d86cddfa03e37cefe45dec /shared/common/loud.c | |
parent | a1ef2f36df1754e1146a8ed50c9ac6a1b0f33697 (diff) |
cyclone alpha55 (see notes.txt for cyclone and shared)
svn path=/trunk/externals/miXed/; revision=4011
Diffstat (limited to 'shared/common/loud.c')
-rw-r--r-- | shared/common/loud.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/shared/common/loud.c b/shared/common/loud.c index e1e921d..7129962 100644 --- a/shared/common/loud.c +++ b/shared/common/loud.c @@ -88,12 +88,18 @@ void loud_errand(t_pd *x, char *fmt, ...) va_end(ap); } -void loud_syserror(t_pd *x, char *msg) +void loud_syserror(t_pd *x, char *fmt, ...) { - if (msg) - loud_error(x, "%s (%s)", msg, strerror(errno)); - else - loud_error(x, strerror(errno)); + if (fmt) + { + char buf[MAXPDSTRING]; + va_list ap; + va_start(ap, fmt); + vsprintf(buf, fmt, ap); + loud_error(x, "%s (%s)", buf, strerror(errno)); + va_end(ap); + } + else loud_error(x, strerror(errno)); } void loud_nomethod(t_pd *x, t_symbol *s) |