aboutsummaryrefslogtreecommitdiff
path: root/shared/common/loud.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared/common/loud.c')
-rw-r--r--shared/common/loud.c16
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)