1
/******************************************************
3
* zexy - implementation file
5
* copyleft (c) IOhannes m zm�lnig
7
* 1999:forum::f�r::uml�ute:2004
9
* institute of electronic music and acoustics (iem)
11
******************************************************
13
* license: GNU General Public License v.2
15
******************************************************/
18
operating_system : operating_system-code for message-objects
23
/* ------------------------- operating_system ------------------------------- */
26
MESSAGE OPERATING_SYSTEM: simple and easy
29
static t_class *operating_system_class;
31
typedef struct _operating_system
38
static void operating_system_bang(t_operating_system *x)
40
/* LATER think about querying the version of the system at runtime! */
41
t_symbol *s=gensym("unknown");
44
#elif defined __APPLE__
46
#elif defined __WIN32__
49
outlet_symbol(x->x_obj.ob_outlet, s);
52
static void *operating_system_new(void)
54
t_operating_system *x = (t_operating_system *)pd_new(operating_system_class);
55
outlet_new(&x->x_obj, 0);
59
static void operating_system_help(t_operating_system*x)
61
post("\n%c operating_system\t:: get the current operating system", HEARTSYMBOL);
64
void operating_system_setup(void)
66
operating_system_class = class_new(gensym("operating_system"), (t_newmethod)operating_system_new,
67
0, sizeof(t_operating_system), 0, A_NULL);
69
class_addbang (operating_system_class, operating_system_bang);
70
class_addmethod(operating_system_class, (t_method)operating_system_help, gensym("help"), A_NULL);
71
zexy_register("operating_system");