~ubuntu-branches/ubuntu/natty/pd-zexy/natty

« back to all changes in this revision

Viewing changes to src/operating_system.c

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard, IOhannes m zmölnig, Jonas Smedegaard
  • Date: 2010-08-20 12:17:41 UTC
  • mfrom: (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100820121741-4kxozn8b9rhee9fr
Tags: 2.2.3-1
* New upstream version

[ IOhannes m zmölnig ]
* Adopt package, on behalf of Multimedia Team.
  Closes: #546964
* Simply debian/rules with CDBS, and don't unconditionally strip
  binaries.
  Closes: #437763
* Install into /usr/lib/pd/extra/zexy/. Document usage in REAME.Debian
  and warn about change in NEWS.
* git'ify package. Add Vcs-* stanzas to control file.
* Use dpkg source format 3.0 (quilt). Drop build-dependency on quilt.

[ Jonas Smedegaard ]
* Enable CDBS copyright-check routine.
* Add copyright and licensing header to debian/rules.
* Add myself as uploader.
* Rewrite debian/copyright using rev. 135 of draft DEP5 format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************
 
2
 *
 
3
 * zexy - implementation file
 
4
 *
 
5
 * copyleft (c) IOhannes m zm�lnig
 
6
 *
 
7
 *   1999:forum::f�r::uml�ute:2004
 
8
 *
 
9
 *   institute of electronic music and acoustics (iem)
 
10
 *
 
11
 ******************************************************
 
12
 *
 
13
 * license: GNU General Public License v.2
 
14
 *
 
15
 ******************************************************/
 
16
 
 
17
/*
 
18
  operating_system :  operating_system-code for message-objects
 
19
*/
 
20
 
 
21
#include "zexy.h"
 
22
 
 
23
/* ------------------------- operating_system ------------------------------- */
 
24
 
 
25
/*
 
26
MESSAGE OPERATING_SYSTEM: simple and easy
 
27
*/
 
28
 
 
29
static t_class *operating_system_class;
 
30
 
 
31
typedef struct _operating_system
 
32
{
 
33
  t_object x_obj;
 
34
 
 
35
} t_operating_system;
 
36
 
 
37
 
 
38
static void operating_system_bang(t_operating_system *x)
 
39
{
 
40
  /* LATER think about querying the version of the system at runtime! */
 
41
  t_symbol *s=gensym("unknown");
 
42
#ifdef __linux__
 
43
  s=gensym("linux");
 
44
#elif defined __APPLE__
 
45
  s=gensym("macos");
 
46
#elif defined __WIN32__
 
47
  s=gensym("windows");
 
48
#endif
 
49
  outlet_symbol(x->x_obj.ob_outlet, s);
 
50
}
 
51
 
 
52
static void *operating_system_new(void)
 
53
{
 
54
  t_operating_system *x = (t_operating_system *)pd_new(operating_system_class);
 
55
  outlet_new(&x->x_obj, 0);
 
56
  return (x);
 
57
}
 
58
 
 
59
static void operating_system_help(t_operating_system*x)
 
60
{
 
61
  post("\n%c operating_system\t:: get the current operating system", HEARTSYMBOL);
 
62
}
 
63
 
 
64
void operating_system_setup(void)
 
65
{
 
66
  operating_system_class = class_new(gensym("operating_system"), (t_newmethod)operating_system_new, 
 
67
                                     0, sizeof(t_operating_system), 0, A_NULL);
 
68
  
 
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");
 
72
}