diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2005-10-24 17:06:37 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2005-10-24 17:06:37 +0000 |
commit | 21ae6d6baaefe9a1d4e7a9189b6f8d9ef8cc091c (patch) | |
tree | 7410bd5530f8386ed5e9935c83be3542a1164ed6 /src/mtx_matrix.c | |
parent | 3841ef753439cdf3bfcb37e54d39174cb0426f69 (diff) |
make errors findable with "last error"
svn path=/trunk/externals/iem/iemmatrix/; revision=3764
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); |