aboutsummaryrefslogtreecommitdiff
path: root/ascwave.c
diff options
context:
space:
mode:
Diffstat (limited to 'ascwave.c')
-rw-r--r--ascwave.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/ascwave.c b/ascwave.c
index 662f8e7..9b2031b 100644
--- a/ascwave.c
+++ b/ascwave.c
@@ -3,6 +3,9 @@
#include "m_pd.h"
#include <stdio.h>
#include <stdlib.h>
+#ifdef _WIN32
+#include <malloc.h>
+#endif
#ifndef RAND_MAX
#define RAND_MAX 21
@@ -59,16 +62,11 @@ void ascwave_ft1(t_ascwave *x, t_floatarg g)
int sz = x->x_julp;
int lchr = x->x_chr;
int schr = 32;
- int i = 0;
-#ifndef NT
- char xip[sz+1];
- char xap[sz+1];
-#else
- char* xip;
- char* xap;
- xip = (char*)malloc((sz+1)*sizeof(char));
- xap = (char*)malloc((sz+1)*sizeof(char));
-#endif
+ int i = 0;
+ char* xip;
+ char* xap;
+ xip = (char*)malloc((sz+1)*sizeof(char));
+ xap = (char*)malloc((sz+1)*sizeof(char));
for (i = 0;i <= sz; ++i) {
if (i == sz-1) {
@@ -99,12 +97,10 @@ void ascwave_ft1(t_ascwave *x, t_floatarg g)
outlet_symbol(x->t_ob.ob_outlet, gensym(xap));
if (g > 1)
outlet_symbol(x->t_ob.ob_outlet, gensym(xip));
- x->x_jodel = g;
-
-#ifdef NT
- free(xip);
- free(xap);
-#endif
+ x->x_jodel = g;
+
+ free(xip);
+ free(xap);
}
static void ascwave_width(t_ascwave *x, t_floatarg g)