diff options
author | IOhannes m zmölnig <zmoelnig@umlautT.umlaeute.mur.at> | 2023-07-03 09:19:12 +0200 |
---|---|---|
committer | IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> | 2023-07-05 15:17:12 +0200 |
commit | 45887ac48544e21ac295aab8388da7f47665181d (patch) | |
tree | 69c73639c42dc94a0f1e9e54ca8e912b5987a721 | |
parent | 8ce1c4b918518b5f1e367ee7a1ddc0be7ffb3e32 (diff) |
use pd_error() instead of error()
Forwarded: https://github.com/electrickery/pd-maxlib/pull/2
Last-Update: 2023-07-03
Gbp-Pq: Name pd_error.patch
-rw-r--r-- | src/arraycopy.c | 4 | ||||
-rw-r--r-- | src/mlife.c | 4 | ||||
-rw-r--r-- | src/nroute.c | 4 | ||||
-rw-r--r-- | src/subst.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/arraycopy.c b/src/arraycopy.c index f57097e..6feb21c 100644 --- a/src/arraycopy.c +++ b/src/arraycopy.c @@ -130,9 +130,9 @@ static void arraycopy_docopy(t_arraycopy *x) } if (!(A = (t_garray *)pd_findbyclass(x->x_destarray, garray_class))) - error("arraycopy: %s: no such array", x->x_destarray->s_name); + pd_error(x, "arraycopy: %s: no such array", x->x_destarray->s_name); else if (!array_getarray(A, &destsize, &vec)) - error("arraycopy: %s: bad template ", x->x_destarray->s_name); + pd_error(x, "arraycopy: %s: bad template ", x->x_destarray->s_name); else { if(x->x_start > sourcesize) diff --git a/src/mlife.c b/src/mlife.c index 4e69d8f..7b60d95 100644 --- a/src/mlife.c +++ b/src/mlife.c @@ -250,7 +250,7 @@ static void ml_int(t_maxlife *mlp, t_floatarg dummy) else if(mlp->universe[i] == 0) outlet_float(mlp->out[i-view_start+1], 0); else - error("mlife: corrupted data in universe[] array!"); + pd_error(mlp, "mlife: corrupted data in universe[] array!"); } ml_nextgeneration(mlp); @@ -387,7 +387,7 @@ static void ml_randseed(t_maxlife *mlp, t_floatarg start) //if((start < 1) || (start > mlp->size-(long)INTSIZE)) if(start < 1) { - error("Randseed start parameter must be between 1 and %ld", mlp->size); + pd_error(mlp, "Randseed start parameter must be between 1 and %ld", mlp->size); return; } diff --git a/src/nroute.c b/src/nroute.c index 022e389..82d16ee 100644 --- a/src/nroute.c +++ b/src/nroute.c @@ -128,10 +128,10 @@ static void *nroute_new(t_symbol *s, int argc, t_atom *argv) x->pos = 1; x->match.a_type = A_NULL; - if (argc > 2) { error ("nroute: extra arguments"); return 0; } + if (argc > 2) { pd_error (0, "nroute: extra arguments"); return 0; } if (argc > 1) { if (argv[1].a_type == A_FLOAT) x->pos = argv[1].a_w.w_float; - else { post ("nroute: second argument must be (int) position"); return 0; } + else { pd_error (0, "nroute: second argument must be (int) position"); return 0; } } if (argc > 0) { x->match.a_type = argv[0].a_type; diff --git a/src/subst.c b/src/subst.c index 3da0092..5183955 100644 --- a/src/subst.c +++ b/src/subst.c @@ -228,9 +228,9 @@ static int subst_calc(t_subst *x, int n) // write to array if(x->x_array)if (!(A = (t_garray *)pd_findbyclass(x->x_array, garray_class))) - error("subst: %s: no such array", x->x_array->s_name); + pd_error(x, "subst: %s: no such array", x->x_array->s_name); else if (!garray_getfloatwords(A, &npoints, &vec)) - error("subst: %s: bad template ", x->x_array->s_name); + pd_error(x, "subst: %s: bad template ", x->x_array->s_name); else { i = 0; |