aboutsummaryrefslogtreecommitdiff
path: root/src/time.c
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2015-08-28 17:55:26 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2015-08-28 17:55:26 +0000
commit739a8290a8b05645a2d055aed8e5eb76ba2e24e6 (patch)
tree13713efb9e01a6f2912ce4fe0a12af4869a7593b /src/time.c
parent863ac0a263247d43d48c06ed942ddd470f811507 (diff)
one-true indentation
svn path=/trunk/externals/zexy/; revision=17537
Diffstat (limited to 'src/time.c')
-rw-r--r--src/time.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/time.c b/src/time.c
index 9db6195..680d7fc 100644
--- a/src/time.c
+++ b/src/time.c
@@ -1,4 +1,4 @@
-/*
+/*
* time:: gets the current time from the system
*
* (c) 1999-2011 IOhannes m zmölnig, forum::für::umläute, institute of electronic music and acoustics (iem)
@@ -7,18 +7,18 @@
* 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 <http://www.gnu.org/licenses/>.
*/
-/*
- * 1506:forum::für::umläute:2003: use timeb only if needed (like on windoze)
+/*
+ * 1506:forum::für::umläute:2003: use timeb only if needed (like on windoze)
*/
#include "zexy.h"
@@ -45,12 +45,11 @@
static t_class *time_class;
-typedef struct _time
-{
+typedef struct _time {
t_object x_obj;
-
+
int GMT;
-
+
t_outlet *x_outlet1;
t_outlet *x_outlet2;
t_outlet *x_outlet3;
@@ -61,19 +60,20 @@ static void *time_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_time *x = (t_time *)pd_new(time_class);
char buf[5];
-
+
x->GMT=0;
if (argc) {
atom_string(argv, buf, 5);
- if (buf[0]=='G' && buf[1]=='M' && buf[2]=='T')
+ if (buf[0]=='G' && buf[1]=='M' && buf[2]=='T') {
x->GMT = 1;
+ }
}
-
+
x->x_outlet1 = outlet_new(&x->x_obj, gensym("float"));
x->x_outlet2 = outlet_new(&x->x_obj, gensym("float"));
x->x_outlet3 = outlet_new(&x->x_obj, gensym("float"));
x->x_outlet4 = outlet_new(&x->x_obj, gensym("float"));
-
+
return (x);
}
@@ -94,7 +94,7 @@ static void time_bang(t_time *x)
#endif
outlet_float(x->x_outlet4, (t_float)(ms));
outlet_float(x->x_outlet3, (t_float)resolvetime->tm_sec);
- outlet_float(x->x_outlet2, (t_float)resolvetime->tm_min);
+ outlet_float(x->x_outlet2, (t_float)resolvetime->tm_min);
outlet_float(x->x_outlet1, (t_float)resolvetime->tm_hour);
}
@@ -108,11 +108,11 @@ static void help_time(t_time* UNUSED(x))
void time_setup(void)
{
time_class = class_new(gensym("time"),
- (t_newmethod)time_new, 0,
- sizeof(t_time), 0, A_GIMME, 0);
-
+ (t_newmethod)time_new, 0,
+ sizeof(t_time), 0, A_GIMME, 0);
+
class_addbang(time_class, time_bang);
-
+
class_addmethod(time_class, (t_method)help_time, gensym("help"), 0);
zexy_register("time");
}