From 5aef03b3a165b309622f6d051bd4d53c42b4532d Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Mon, 25 Nov 2002 10:47:53 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r232, which included commits to RCS files with non-trunk default branches. svn path=/trunk/; revision=233 --- pd/src/m_binbuf.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'pd/src/m_binbuf.c') diff --git a/pd/src/m_binbuf.c b/pd/src/m_binbuf.c index 6ff79e93..1398ad84 100644 --- a/pd/src/m_binbuf.c +++ b/pd/src/m_binbuf.c @@ -43,6 +43,15 @@ void binbuf_free(t_binbuf *x) t_freebytes(x, sizeof(*x)); } +t_binbuf *binbuf_duplicate(t_binbuf *y) +{ + t_binbuf *x = (t_binbuf *)t_getbytes(sizeof(*x)); + x->b_n = y->b_n; + x->b_vec = t_getbytes(x->b_n * sizeof(*x->b_vec)); + memcpy(x->b_vec, y->b_vec, x->b_n * sizeof(*x->b_vec)); + return (x); +} + void binbuf_clear(t_binbuf *x) { x->b_vec = t_resizebytes(x->b_vec, x->b_n * sizeof(*x->b_vec), 0); @@ -729,7 +738,7 @@ int binbuf_write(t_binbuf *x, char *filename, char *dir, int crflag) bp += length; ncolumn += length; } - if (ap->a_type == A_SEMI || ncolumn > 65) + if (ap->a_type == A_SEMI || (!crflag && ncolumn > 65)) { *bp++ = '\n'; ncolumn = 0; -- cgit v1.2.1