aboutsummaryrefslogtreecommitdiff
path: root/src/arraycopy.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2004-03-09 03:51:28 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2004-03-09 03:51:28 +0000
commit50a389bea35a91ddae1394c5d35a6f1c703f5bdd (patch)
tree345af9da1a2432cdde199637af884d0cb744cf40 /src/arraycopy.c
parent6f58df1602bc981858c874a55c73dab0e76258cc (diff)
Checked in Olaf's 1.5.2 sources. Here are the changes:
v 1.5.2 (17. december 2003): - modified netclient for not to drop received data: use of syspollfn instead of clock to poll for incoming data, circular recv buffer v 1.5 (18. october 2003): - added some usefull features to arraycopy (i.e. copying just parts of an array and copying to specified position in destination array) - new object: nchange - IRIX 6.5 port (for GCC 3.3) - OS X binary (Jaguar 10.2.6) v 1.4 (22. may 2003): - updated sources to compile with Pd0.37-test4 - new object: arraycopy v 1.3 (12. april 2003): - new objects: sync listfifo - all setup routines renamed to maxlib_<object>_setup() to avoid name clashes, old names still work via class_addcreator() - some improvements for the help files svn path=/trunk/externals/maxlib/; revision=1394
Diffstat (limited to 'src/arraycopy.c')
-rw-r--r--src/arraycopy.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/arraycopy.c b/src/arraycopy.c
index cc36913..b71f7f3 100644
--- a/src/arraycopy.c
+++ b/src/arraycopy.c
@@ -27,9 +27,9 @@
static char *version = "arraycopy v0.2, written by Olaf Matthes <olaf.matthes@gmx.de>";
-typedef struct arraycopy
-{
- t_object x_obj;
+typedef struct arraycopy
+{
+ t_object x_obj;
t_symbol *x_destarray;
t_symbol *x_sourcearray;
t_garray *x_destbuf;
@@ -78,7 +78,7 @@ static void arraycopy_setsourcearray(t_arraycopy *x, t_symbol *s)
/* this is the routine that actually does the copying */
/* get's called directly when we get a 'bang' */
-static void arraycopy_docopy(t_arraycopy *x)
+static void arraycopy_docopy(t_arraycopy *x)
{
t_garray *b; /* make local copy of array */
t_float *tab; /* the content itselfe */
@@ -147,8 +147,8 @@ static void arraycopy_docopy(t_arraycopy *x)
if(x->x_print)post("arraycopy: copied %d values from array \"%s\" to array \"%s\"",
x->x_end-x->x_start, x->x_sourcearray->s_name, x->x_destarray->s_name);
}
-}
-
+}
+
static void arraycopy_list(t_arraycopy *x, t_symbol *s, int argc, t_atom *argv)
{
if(argc > 1) {
@@ -242,19 +242,19 @@ static void arraycopy_copy(t_arraycopy *x, t_symbol *s, int argc, t_atom *argv)
static t_class *arraycopy_class;
static void *arraycopy_new(t_symbol *s, int argc, t_atom *argv)
-{
+{
t_arraycopy *x = (t_arraycopy *)pd_new(arraycopy_class);
- if (argc > 0) {
+ if (argc > 0) {
x->x_destarray = atom_getsymbolarg(0, argc, argv);
- arraycopy_setdestarray(x, x->x_destarray);
+ arraycopy_setdestarray(x, x->x_destarray);
}
inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("symbol"), gensym("dest"));
- x->x_start = x->x_end = x->x_pos = x->x_print = 0;
- return (x);
+ x->x_start = x->x_end = x->x_pos = x->x_print = 0;
+ return (x);
}
-#ifndef MAXLIB
+#ifndef MAXLIB
void arraycopy_setup(void)
{
/* the object's class: */
@@ -280,4 +280,4 @@ void maxlib_arraycopy_setup(void)
#else
class_sethelpsymbol(arraycopy_class, gensym("maxlib/help-arraycopy.pd"));
#endif
-} \ No newline at end of file
+}