diff options
author | Tim Blechmann <timblech@users.sourceforge.net> | 2004-09-18 18:26:02 +0000 |
---|---|---|
committer | Tim Blechmann <timblech@users.sourceforge.net> | 2004-09-18 18:26:02 +0000 |
commit | 335ee67f7313c76457f8d28cd7c8938fbcd14a10 (patch) | |
tree | 830fc50f4ab7feab9308c6e195fdd1c65ba4f4f2 /k_cext.c | |
parent | 47b1f340799a9025f46a30a4ed2533c40608b512 (diff) |
$0-aware send macros for float and symbol
svn path=/trunk/externals/k_cext/; revision=2046
Diffstat (limited to 'k_cext.c')
-rw-r--r-- | k_cext.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -353,3 +353,28 @@ int k_cext_setvalue(char c[],float f) } return value_setfloat(gensym(c),f); } + +void k_cext_sendfloat (char c[],float f) +{ + static t_symbol *k_cext_internal_symbol=NULL; + while ( isspace(c[0]) ) + { + c++; + } + if(k_cext_internal_symbol==NULL) k_cext_internal_symbol=gensym(c); + if(k_cext_internal_symbol->s_thing) + pd_float(k_cext_internal_symbol->s_thing, f); +} + +void k_cext_sendsymbol (char c[],char s[]) +{ + static t_symbol *k_cext_internal_symbol=NULL; + while ( isspace(c[0]) ) + { + c++; + } + if(k_cext_internal_symbol==NULL) + k_cext_internal_symbol=gensym(c); + if(k_cext_internal_symbol->s_thing) + pd_symbol(k_cext_internal_symbol->s_thing, gensym(s)); +} |