From b0275aa9b3a9f085425a47a93c1f7c59a1d835f6 Mon Sep 17 00:00:00 2001 From: "N.N." Date: Wed, 3 Jun 2009 20:05:09 +0000 Subject: using namespace desire; svn path=/trunk/; revision=11660 --- desiredata/src/builtins.c | 1 + desiredata/src/builtins_dsp.c | 1 + desiredata/src/desire.c | 13 ++++--------- desiredata/src/kernel.c | 3 +++ desiredata/src/s_inter.c | 1 + desiredata/src/s_loader.c | 1 + 6 files changed, 11 insertions(+), 9 deletions(-) (limited to 'desiredata') diff --git a/desiredata/src/builtins.c b/desiredata/src/builtins.c index 3f20ba6c..47709aed 100644 --- a/desiredata/src/builtins.c +++ b/desiredata/src/builtins.c @@ -6,6 +6,7 @@ #define PD_PLUSPLUS_FACE #include "desire.h" +using namespace desire; #include #include #include diff --git a/desiredata/src/builtins_dsp.c b/desiredata/src/builtins_dsp.c index 66573877..2f0aec63 100644 --- a/desiredata/src/builtins_dsp.c +++ b/desiredata/src/builtins_dsp.c @@ -14,6 +14,7 @@ to reset the value. #define PD_PLUSPLUS_FACE #include "desire.h" +using namespace desire; #include "m_simd.h" #include #include diff --git a/desiredata/src/desire.c b/desiredata/src/desire.c index 4149eb69..dfad2e1e 100644 --- a/desiredata/src/desire.c +++ b/desiredata/src/desire.c @@ -10,8 +10,8 @@ */ #define PD_PLUSPLUS_FACE -#include "m_pd.h" #include "desire.h" +using namespace desire; #include #include #include @@ -1335,14 +1335,11 @@ t_array *garray_getarray(t_garray *x) { t_scalar *sc = x->scalar; t_template *t = template_findbyname(sc->t); TEMPLATE_CHECK(sc->t,0) - if (!template_find_field(t, gensym("z"), &zonset, &ztype, &zarraytype)) { + if (!template_find_field(t,gensym("z"),&zonset,&ztype,&zarraytype)) { error("template %s has no 'z' field", sc->t->name); return 0; } - if (ztype != DT_ARRAY) { - error("template %s, 'z' field is not an array", sc->t->name); - return 0; - } + if (ztype != DT_ARRAY) {error("template %s, 'z' field is not an array", sc->t->name); return 0;} return sc->v[zonset].w_array; } @@ -1352,8 +1349,7 @@ static t_array *garray_getarray_floatonly(t_garray *x, int *yonsetp, int *elemsi int yonset, type; t_symbol *arraytype; t_template *t = template_findbyname(a->tsym); - if (!template_find_field(t,&s_y,&yonset,&type,&arraytype) || type != DT_FLOAT) - return 0; + if (!template_find_field(t,&s_y,&yonset,&type,&arraytype) || type != DT_FLOAT) return 0; *yonsetp = yonset; *elemsizep = a->elemsize; return a; @@ -1366,7 +1362,6 @@ int garray_getname(t_garray *x, t_symbol **namep) { return x->hidename; } - /* if there is one garray in a graph, reset the graph's coordinates to fit a new size and style for the garray */ static void garray_fittograph(t_garray *x, int n, int style) { t_array *array = garray_getarray(x); diff --git a/desiredata/src/kernel.c b/desiredata/src/kernel.c index cb2efc5b..27e9636f 100644 --- a/desiredata/src/kernel.c +++ b/desiredata/src/kernel.c @@ -13,6 +13,7 @@ #define PD_PLUSPLUS_FACE #include "desire.h" +using namespace desire; #include "m_simd.h" #include "config.h" #include @@ -1585,6 +1586,7 @@ void pd_eval_text(const char *t, size_t size) { binbuf_free(x); } +namespace desire { void voprintf(ostream &buf, const char *s, va_list args) { char *b; vasprintf(&b,s,args); @@ -1597,6 +1599,7 @@ void oprintf(ostream &buf, const char *s, ...) { voprintf(buf,s,args); va_end(args); } +};//end namespace desire /* convert a binbuf to text; no null termination. */ void binbuf_gettext(t_binbuf *x, char **bufp, int *lengthp) { diff --git a/desiredata/src/s_inter.c b/desiredata/src/s_inter.c index 73635fc8..7c9919ef 100644 --- a/desiredata/src/s_inter.c +++ b/desiredata/src/s_inter.c @@ -9,6 +9,7 @@ that didn't really belong anywhere. */ #define PD_PLUSPLUS_FACE #include "desire.h" +using namespace desire; #include "pthread.h" #include #ifdef UNISTD diff --git a/desiredata/src/s_loader.c b/desiredata/src/s_loader.c index 5273f04b..2754069b 100644 --- a/desiredata/src/s_loader.c +++ b/desiredata/src/s_loader.c @@ -19,6 +19,7 @@ #include #define PD_PLUSPLUS_FACE #include "desire.h" +using namespace desire; #include #include using namespace std; -- cgit v1.2.1