From 739a8290a8b05645a2d055aed8e5eb76ba2e24e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Fri, 28 Aug 2015 17:55:26 +0000 Subject: one-true indentation svn path=/trunk/externals/zexy/; revision=17537 --- src/niagara.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'src/niagara.c') diff --git a/src/niagara.c b/src/niagara.c index ae2c9bb..ccedb42 100644 --- a/src/niagara.c +++ b/src/niagara.c @@ -1,4 +1,4 @@ -/* +/* * niagara: split a list into 2 (use [list split] instead) * * (c) 1999-2011 IOhannes m zmölnig, forum::für::umläute, institute of electronic music and acoustics (iem) @@ -7,12 +7,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -30,8 +30,7 @@ static t_class *niagara_class; -typedef struct _niagara -{ +typedef struct _niagara { t_object x_obj; t_float rock; t_outlet *left, *right; @@ -50,8 +49,12 @@ static void niagara_list(t_niagara *x, t_symbol *s, int argc, t_atom *argv) n_r = argc - n_l; ap_r = &argv[n_l]; - if (n_r) outlet_list(x->right, s, n_r, ap_r); - if (n_l) outlet_list(x->left, s, n_l, ap_l); + if (n_r) { + outlet_list(x->right, s, n_r, ap_r); + } + if (n_l) { + outlet_list(x->left, s, n_l, ap_l); + } } static void niagara_any(t_niagara *x, t_symbol *s, int argc, t_atom *argv) @@ -71,8 +74,9 @@ static void niagara_any(t_niagara *x, t_symbol *s, int argc, t_atom *argv) if (n_r) { s_r = 0; - if (ap_r->a_type == A_FLOAT) s_r = gensym("list"); - else { + if (ap_r->a_type == A_FLOAT) { + s_r = gensym("list"); + } else { s_r = atom_getsymbol(ap_r); ap_r++; n_r--; @@ -80,7 +84,9 @@ static void niagara_any(t_niagara *x, t_symbol *s, int argc, t_atom *argv) outlet_anything(x->right, s_r, n_r, ap_r); } - if (n_l+1 ) outlet_anything(x->left, s_l, n_l, ap_l); + if (n_l+1 ) { + outlet_anything(x->left, s_l, n_l, ap_l); + } } static void *niagara_new(t_floatarg f) @@ -99,9 +105,9 @@ static void *niagara_new(t_floatarg f) void niagara_setup(void) { - niagara_class = class_new(gensym("niagara"), (t_newmethod)niagara_new, - 0, sizeof(t_niagara), 0, A_DEFFLOAT, 0); - + niagara_class = class_new(gensym("niagara"), (t_newmethod)niagara_new, + 0, sizeof(t_niagara), 0, A_DEFFLOAT, 0); + class_addlist (niagara_class, niagara_list); class_addanything(niagara_class, niagara_any); -- cgit v1.2.1