Commit c7e380ab authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

manual merge of aggraef: Reduce console clutter

parent 94761c76
......@@ -933,15 +933,26 @@ void gui_end_array(void)
/* Old GUI command interface... */
void sys_vguid(const char *file, int line, const char *fmt, ...) {
void sys_vguid(const char *file, int line, const char *fmt, ...)
va_list ap;
char buf[MAXPDSTRING];
char buf[MAXPDSTRING], *bufp, *endp;
va_start(ap, fmt);
vsnprintf(buf, MAXPDSTRING-1, fmt, ap);
/* For old commands, we're just posting them to the pd console */
/* Just display the first non-empty line, to remove console clutter. -ag */
for (bufp = buf; *bufp && isspace(*bufp); bufp++) ;
if ((endp = strchr(bufp, '\n')))
*endp = 0;
if (endp[1])
/* Indicate that more stuff follows with an ellipsis. */
strncat(bufp, "...", MAXPDSTRING);
gui_vmess("gui_legacy_tcl_command", "sis",
file, line, buf);
file, line, bufp);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment