aboutsummaryrefslogtreecommitdiff
path: root/k_cext.c
diff options
context:
space:
mode:
authorTim Blechmann <timblech@users.sourceforge.net>2004-06-29 20:49:31 +0000
committerTim Blechmann <timblech@users.sourceforge.net>2004-06-29 20:49:31 +0000
commit0b19477ee90a4c4f6d563dce46c3c2817c8263a8 (patch)
tree4013e83cd9bfbbf30707282142d39f0605ca60f6 /k_cext.c
parentfccbe2b4b829460a905a675e41119e90da8a4c44 (diff)
support for $0 values
svn path=/trunk/externals/k_cext/; revision=1839
Diffstat (limited to 'k_cext.c')
-rw-r--r--k_cext.c20
1 files changed, 19 insertions, 1 deletions
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);
+}