diff options
author | Peter D'Hoye <peter.dhoye@gmail.com> | 2009-05-24 21:28:16 +0000 |
---|---|---|
committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2009-05-24 21:28:16 +0000 |
commit | 526b5580dabbfed7cfe5439dc3a90ec727f563c2 (patch) | |
tree | 22b1af92348785daad16714ee5e2b633017e0e48 /apps/plugins/pdbox/PDa/src/x_interface.c | |
parent | 4f2dfcc01b260d946044ef2b6af5fe36cb772c8d (diff) | |
download | rockbox-526b5580dabbfed7cfe5439dc3a90ec727f563c2.tar.gz rockbox-526b5580dabbfed7cfe5439dc3a90ec727f563c2.zip |
Cut the files in half and it might work better (note to self: check your tree is really clean before patching)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21070 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pdbox/PDa/src/x_interface.c')
-rw-r--r-- | apps/plugins/pdbox/PDa/src/x_interface.c | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/apps/plugins/pdbox/PDa/src/x_interface.c b/apps/plugins/pdbox/PDa/src/x_interface.c index f6ab350a91..227ca0f4fd 100644 --- a/apps/plugins/pdbox/PDa/src/x_interface.c +++ b/apps/plugins/pdbox/PDa/src/x_interface.c | |||
@@ -76,81 +76,4 @@ void x_interface_setup(void) | |||
76 | { | 76 | { |
77 | print_setup(); | 77 | print_setup(); |
78 | } | 78 | } |
79 | /* Copyright (c) 1997-1999 Miller Puckette. | ||
80 | * For information on usage and redistribution, and for a DISCLAIMER OF ALL | ||
81 | * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ | ||
82 | |||
83 | /* interface objects */ | ||
84 | |||
85 | #include "m_pd.h" | ||
86 | |||
87 | /* -------------------------- print ------------------------------ */ | ||
88 | static t_class *print_class; | ||
89 | |||
90 | typedef struct _print | ||
91 | { | ||
92 | t_object x_obj; | ||
93 | t_symbol *x_sym; | ||
94 | } t_print; | ||
95 | |||
96 | static void *print_new(t_symbol *s) | ||
97 | { | ||
98 | t_print *x = (t_print *)pd_new(print_class); | ||
99 | if (*s->s_name) x->x_sym = s; | ||
100 | else x->x_sym = gensym(""); | ||
101 | return (x); | ||
102 | } | ||
103 | |||
104 | static void print_bang(t_print *x) | ||
105 | { | ||
106 | post("%sbang", x->x_sym->s_name); | ||
107 | } | ||
108 | |||
109 | static void print_pointer(t_print *x, t_gpointer *gp) | ||
110 | { | ||
111 | post("%s(gpointer)", x->x_sym->s_name); | ||
112 | } | ||
113 | |||
114 | static void print_float(t_print *x, t_float f) | ||
115 | { | ||
116 | post("%s%g", x->x_sym->s_name, f); | ||
117 | } | ||
118 | 79 | ||
119 | static void print_list(t_print *x, t_symbol *s, int argc, t_atom *argv) | ||
120 | { | ||
121 | int i; | ||
122 | char buf[80]; | ||
123 | if (argc && argv->a_type != A_SYMBOL) startpost("%s:", x->x_sym->s_name); | ||
124 | else startpost("%s%s", x->x_sym->s_name, | ||
125 | (argc > 1 ? s_list.s_name : (argc == 1 ? s_symbol.s_name : | ||
126 | s_bang.s_name))); | ||
127 | postatom(argc, argv); | ||
128 | endpost(); | ||
129 | } | ||
130 | |||
131 | static void print_anything(t_print *x, t_symbol *s, int argc, t_atom *argv) | ||
132 | { | ||
133 | int i; | ||
134 | char buf[80]; | ||
135 | startpost("%s%s", x->x_sym->s_name, s->s_name); | ||
136 | postatom(argc, argv); | ||
137 | endpost(); | ||
138 | } | ||
139 | |||
140 | static void print_setup(void) | ||
141 | { | ||
142 | print_class = class_new(gensym("print"), (t_newmethod)print_new, 0, | ||
143 | sizeof(t_print), 0, A_DEFSYM, 0); | ||
144 | class_addbang(print_class, print_bang); | ||
145 | class_addfloat(print_class, print_float); | ||
146 | class_addpointer(print_class, print_pointer); | ||
147 | class_addlist(print_class, print_list); | ||
148 | class_addanything(print_class, print_anything); | ||
149 | } | ||
150 | |||
151 | |||
152 | |||
153 | void x_interface_setup(void) | ||
154 | { | ||
155 | print_setup(); | ||
156 | } | ||