diff options
Diffstat (limited to 'src/mtx_matrix.c')
-rw-r--r-- | src/mtx_matrix.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mtx_matrix.c b/src/mtx_matrix.c index f92a877..58556e8 100644 --- a/src/mtx_matrix.c +++ b/src/mtx_matrix.c @@ -442,7 +442,7 @@ static void matrix_read(t_matrix *x, t_symbol *filename) int n; if (binbuf_read_via_path(bbuf, filename->s_name, canvas_getdir(x->x_canvas)->s_name, 0)) - error("matrix: failed to read %s", filename->s_name); + pd_error(x,"matrix: failed to read %s", filename->s_name); ap=binbuf_getvec(bbuf); n =binbuf_getnatom(bbuf)-1; @@ -465,7 +465,7 @@ static void matrix_write(t_matrix *x, t_symbol *filename) /* open file */ if (!(f = fopen(filnam, "w"))) { - error("matrix : failed to open %s", filnam); + pd_error(x,"matrix : failed to open %s", filnam); } else { char *text=(char *)getbytes(sizeof(char)*MAXPDSTRING); int textlen; @@ -478,7 +478,7 @@ static void matrix_write(t_matrix *x, t_symbol *filename) sprintf(text, "#matrix %d %d\n", rows, cols); textlen = strlen(text); if (fwrite(text, textlen*sizeof(char), 1, f) < 1) { - error("matrix : failed to write %s", filnam); goto end; + pd_error(x,"matrix : failed to write %s", filnam); goto end; } while(rows--) { @@ -488,11 +488,11 @@ static void matrix_write(t_matrix *x, t_symbol *filename) sprintf(text, "%.15f ", val); textlen=strlen(text); if (fwrite(text, textlen*sizeof(char), 1, f) < 1) { - error("matrix : failed to write %s", filnam); goto end; + pd_error(x,"matrix : failed to write %s", filnam); goto end; } } if (fwrite("\n", sizeof(char), 1, f) < 1) { - error("matrix : failed to write %s", filnam); goto end; + pd_error(x, "matrix : failed to write %s", filnam); goto end; } } freebytes(text, sizeof(char)*MAXPDSTRING); |