aboutsummaryrefslogtreecommitdiff
path: root/src/date.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/date.c')
-rw-r--r--src/date.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/date.c b/src/date.c
index 3e2a5f5..0e92a7e 100644
--- a/src/date.c
+++ b/src/date.c
@@ -1,4 +1,4 @@
-/*
+/*
* date: gets the current date from the system
*
* (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 <http://www.gnu.org/licenses/>.
*/
@@ -33,9 +33,9 @@
*
******************************************************/
-/*
+/*
(c) 1202:forum::für::umläute:2000
- 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"
@@ -63,12 +63,11 @@
static t_class *date_class;
-typedef struct _date
-{
+typedef struct _date {
t_object x_obj;
-
+
int GMT;
-
+
t_outlet *x_outlet1;
t_outlet *x_outlet2;
t_outlet *x_outlet3;
@@ -81,21 +80,22 @@ static void *date_new(t_symbol* UNUSED(s), int argc, t_atom *argv)
{
t_date *x = (t_date *)pd_new(date_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"));
x->x_outlet5 = outlet_new(&x->x_obj, gensym("float"));
x->x_outlet6 = outlet_new(&x->x_obj, gensym("float"));
-
+
return (x);
}
@@ -129,11 +129,11 @@ static void help_date(t_date* UNUSED(x))
void date_setup(void)
{
date_class = class_new(gensym("date"),
- (t_newmethod)date_new, 0,
- sizeof(t_date), 0, A_GIMME, 0);
-
+ (t_newmethod)date_new, 0,
+ sizeof(t_date), 0, A_GIMME, 0);
+
class_addbang(date_class, date_bang);
-
+
class_addmethod(date_class, (t_method)help_date, gensym("help"), 0);
zexy_register("date");
}