aboutsummaryrefslogtreecommitdiff
path: root/pd/src/m_binbuf.c
diff options
context:
space:
mode:
authorGuenter Geiger <ggeiger@users.sourceforge.net>2002-11-25 10:47:53 +0000
committerGuenter Geiger <ggeiger@users.sourceforge.net>2002-11-25 10:47:53 +0000
commit5aef03b3a165b309622f6d051bd4d53c42b4532d (patch)
tree808a2924e736f3327c968f0868fd1efdbc3a1aec /pd/src/m_binbuf.c
parentb09bea965d034a8e092b35d369f2ef6591ef0e65 (diff)
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
Diffstat (limited to 'pd/src/m_binbuf.c')
-rw-r--r--pd/src/m_binbuf.c11
1 files changed, 10 insertions, 1 deletions
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;