aboutsummaryrefslogtreecommitdiff
path: root/desiredata/src
diff options
context:
space:
mode:
authorN.N. <matju@users.sourceforge.net>2009-06-03 20:05:09 +0000
committerN.N. <matju@users.sourceforge.net>2009-06-03 20:05:09 +0000
commitb0275aa9b3a9f085425a47a93c1f7c59a1d835f6 (patch)
treedb3b5560f6a4346bf1413ccab66d4aad73accd93 /desiredata/src
parent12f31332d54505a28bd49086ce260f4d3e06fa2c (diff)
using namespace desire;
svn path=/trunk/; revision=11660
Diffstat (limited to 'desiredata/src')
-rw-r--r--desiredata/src/builtins.c1
-rw-r--r--desiredata/src/builtins_dsp.c1
-rw-r--r--desiredata/src/desire.c13
-rw-r--r--desiredata/src/kernel.c3
-rw-r--r--desiredata/src/s_inter.c1
-rw-r--r--desiredata/src/s_loader.c1
6 files changed, 11 insertions, 9 deletions
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 <stdlib.h>
#include <stdarg.h>
#include <math.h>
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 <math.h>
#include <stdio.h>
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 <ctype.h>
#include <math.h>
#include <stdarg.h>
@@ -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 <stdlib.h>
@@ -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 <sstream>
#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 <string.h>
#define PD_PLUSPLUS_FACE
#include "desire.h"
+using namespace desire;
#include <stdio.h>
#include <sstream>
using namespace std;