diff options
author | Kjetil S. Matheussen <ksvalast@users.sourceforge.net> | 2004-08-09 14:19:06 +0000 |
---|---|---|
committer | Kjetil S. Matheussen <ksvalast@users.sourceforge.net> | 2004-08-09 14:19:06 +0000 |
commit | 437f26f3708a8c9f40b6569f18b8f0efb628a1d0 (patch) | |
tree | f6675c7ee2cc4860f2de92551f6e0de06b6ceb71 | |
parent | 71508f42ae949b46066c0676424507f2cf6268c6 (diff) |
Made the SEND macro a bit more convenient to use with the new string handling. The new SEN macro works like the old SEND macro.
svn path=/trunk/externals/k_cext/; revision=1929
-rw-r--r-- | k_cext.h | 4 | ||||
-rw-r--r-- | k_cext_generatecode.c | 11 |
2 files changed, 14 insertions, 1 deletions
@@ -106,7 +106,7 @@ do{ \ if(k_cext_internal_symbol->s_thing) pd_float(k_cext_internal_symbol->s_thing, val); \ }while(0) - +#define SEN(symname,val) SEND(symname,val) #define INTARRAY(name,len) int name[len]={0} #define FLOATARRAY(name,len) t_float name[len]={0.0f} @@ -151,7 +151,9 @@ int k_cext_setvalue(char c[],float f); #define NL "\n" #define SP " " + //#define STRING(a) " " ## a ## " " + //#define gakk system("echo"); typedef int (*k_cext_f_int_callback)(t_k_cext *x,...); typedef float (*k_cext_f_float_callback)(t_k_cext *x,...); diff --git a/k_cext_generatecode.c b/k_cext_generatecode.c index 3ab2fa9..bd7304b 100644 --- a/k_cext_generatecode.c +++ b/k_cext_generatecode.c @@ -205,6 +205,17 @@ static void k_cext_gen_mainfunccode(t_k_cext *x,int argc, t_atom* argv,int i, st pos[0]='\"'; pos[1]=' '; } + + if(strstr(string,"SEND(")!=NULL){ + char *pos=strstr(string,"SEND(")+3; + int len; + pos[0]='('; + pos[1]='\"'; + + len=strlen(string); + string[len]='\"'; + string[len+1]=0; + } if(!strcmp(".",string)){ sprintf(string," "); |