Skip to content

Commit

Permalink
replaced post with object_post in o.print
Browse files Browse the repository at this point in the history
  • Loading branch information
maccallum committed Nov 29, 2021
1 parent a7f634b commit 1a43a8f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/o.print/o.print.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ void oprint_fullPacket(t_oprint *x, t_symbol *msg, int argc, t_atom *argv)
long buflen = osc_bundle_s_nformat(NULL, 0, len, (char *)ptr, 0);
char *buf = osc_mem_alloc(buflen + 1);
osc_bundle_s_nformat(buf, buflen + 1, len, (char *)ptr, 0);
post("%s: {", x->myname->s_name);
object_post((t_object *)x, "{");
if(buflen == 0){
post("<empty bundle>");
object_post((t_object *)x, "<empty bundle>");
}else{
// the Max window doesn't respect newlines, so we have to do them manually
char *start = buf;
Expand All @@ -101,7 +101,7 @@ void oprint_fullPacket(t_oprint *x, t_symbol *msg, int argc, t_atom *argv)
char line[n + 1];
memcpy(line, start, n);
line[n] = '\0';
post("%s: %s", x->myname->s_name, line);
object_post((t_object *)x, "%s\n", line);
start = buf + i + 1;
}
}
Expand All @@ -110,10 +110,10 @@ void oprint_fullPacket(t_oprint *x, t_symbol *msg, int argc, t_atom *argv)
char line[n + 1];
memcpy(line, start, n);
line[n] = '\0';
post("%s: %s", x->myname->s_name, line);
object_post((t_object *)x, "%s", line);
}
}
post("%s: }", x->myname->s_name);
object_post((t_object *)x, "}");
if(buf){
osc_mem_free(buf);
}
Expand Down

0 comments on commit 1a43a8f

Please sign in to comment.