From 0b19477ee90a4c4f6d563dce46c3c2817c8263a8 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Tue, 29 Jun 2004 20:49:31 +0000 Subject: support for $0 values svn path=/trunk/externals/k_cext/; revision=1839 --- k_cext.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'k_cext.c') diff --git a/k_cext.c b/k_cext.c index a414562..4333aee 100644 --- a/k_cext.c +++ b/k_cext.c @@ -32,7 +32,6 @@ int instancenumber=0; // Can not be static because of the win-port. static t_class *k_cext_class; static t_class *k_cfunc_class; - int k_cext_intcompare(const void *p1, const void *p2) { int i = *((int *)p1); @@ -333,3 +332,22 @@ void k_cext_setup(void) void k_cfunc_setup(void){ k_cext_setup(); } + +/* TB: for accessing $0 values */ +t_float k_cext_getvalue(char c[]) +{ + while ( isspace(c[0]) ) + { + c++; + } + return (*(value_get(gensym(c)))); +} + +int k_cext_setvalue(char c[],float f) +{ + while ( isspace(c[0]) ) + { + c++; + } + return value_setfloat(gensym(c),f); +} -- cgit v1.2.1