From 4f8c7c28f8ece71d15ed28ae30f253725f1efa39 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Sat, 20 Oct 2012 18:32:25 +0000 Subject: update code format to pd-style: astyle --style=ansi --align-pointer=name *.c svn path=/trunk/externals/moonlib/; revision=16427 --- tabreadl.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'tabreadl.c') diff --git a/tabreadl.c b/tabreadl.c index e669bd8..ef660ac 100644 --- a/tabreadl.c +++ b/tabreadl.c @@ -1,5 +1,5 @@ /* -Copyright (C) 2002 Antoine Rousseau +Copyright (C) 2002 Antoine Rousseau This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -13,7 +13,7 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -37,24 +37,25 @@ static void tabreadl_float(t_tabreadl *x, t_float f) t_float *vec; if (!(a = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) - error("%s: no such array", x->x_arrayname->s_name); + error("%s: no such array", x->x_arrayname->s_name); else if (!garray_getfloatarray(a, &npoints, &vec)) - error("%s: bad template for tabreadl", x->x_arrayname->s_name); + error("%s: bad template for tabreadl", x->x_arrayname->s_name); else { - int n ; - float r,v; - - if (f < 0) f = 0; - else if (f >= npoints) f = npoints - 1; - n=f; - if(npoints>1){ - r=f-n; - v=vec[n]*(1-r)+vec[n+1]*r; - outlet_float(x->x_obj.ob_outlet, v ); - } - else - outlet_float(x->x_obj.ob_outlet, (npoints ? vec[n] : 0)); + int n ; + float r,v; + + if (f < 0) f = 0; + else if (f >= npoints) f = npoints - 1; + n=f; + if(npoints>1) + { + r=f-n; + v=vec[n]*(1-r)+vec[n+1]*r; + outlet_float(x->x_obj.ob_outlet, v ); + } + else + outlet_float(x->x_obj.ob_outlet, (npoints ? vec[n] : 0)); } } @@ -74,10 +75,10 @@ static void *tabreadl_new(t_symbol *s) void tabreadl_setup(void) { tabreadl_class = class_new(gensym("tabreadl"), (t_newmethod)tabreadl_new, - 0, sizeof(t_tabreadl), 0, A_DEFSYM, 0); + 0, sizeof(t_tabreadl), 0, A_DEFSYM, 0); class_addfloat(tabreadl_class, (t_method)tabreadl_float); class_addmethod(tabreadl_class, (t_method)tabreadl_set, gensym("set"), - A_SYMBOL, 0); + A_SYMBOL, 0); } -- cgit v1.2.1