Update of /cvsroot/pure-data/externals/maxlib/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3876/src
Modified Files: allow.c arbran.c arraycopy.c beta.c chord.c deny.c expo.c fifo.c gestalt.c lifo.c linear.c listfifo.c mlife.c nchange.c netclient.c netrec.c netserver.c nroute.c pitch.c plus.c poisson.c pong.c pulse.c remote.c rewrap.c rhythm.c score.c step.c subst.c sync.c temperature.c tilt.c triang.c unroute.c urn.c Log Message:
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
Index: allow.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/allow.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** allow.c 29 Aug 2003 13:53:50 -0000 1.1 --- allow.c 9 Mar 2004 03:51:28 -0000 1.2 *************** *** 28,37 **** static char *version = "allow v0.1, written by Olaf Matthes olaf.matthes@gmx.de";
! typedef struct allow ! { t_object x_obj; t_outlet *x_out; t_atom *x_elem; // list of elemets that are allowed to pass ! t_int x_numelem; // the number of elemetns in our allow-list } t_allow;
--- 28,37 ---- static char *version = "allow v0.1, written by Olaf Matthes olaf.matthes@gmx.de";
! typedef struct allow ! { t_object x_obj; t_outlet *x_out; t_atom *x_elem; // list of elemets that are allowed to pass ! t_int x_numelem; // the number of elemetns in our allow-list } t_allow;
*************** *** 74,78 ****
static void *allow_new(t_symbol *s, int argc, t_atom *argv) ! { t_allow *x = (t_allow *)pd_new(allow_class);
--- 74,78 ----
static void *allow_new(t_symbol *s, int argc, t_atom *argv) ! { t_allow *x = (t_allow *)pd_new(allow_class);
*************** *** 85,92 **** // post("allow: got %d elements", x->x_numelem);
! return (x); }
! #ifndef MAXLIB void allow_setup(void) { --- 85,92 ---- // post("allow: got %d elements", x->x_numelem);
! return (x); }
! #ifndef MAXLIB void allow_setup(void) { *************** *** 110,112 **** class_sethelpsymbol(allow_class, gensym("maxlib/help-allow.pd")); #endif ! } \ No newline at end of file --- 110,112 ---- class_sethelpsymbol(allow_class, gensym("maxlib/help-allow.pd")); #endif ! }
Index: arbran.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/arbran.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** arbran.c 26 Jan 2004 20:14:47 -0000 1.4 --- arbran.c 9 Mar 2004 03:51:28 -0000 1.5 *************** *** 59,70 **** t_float *tx, *tp; t_int ix, ip; ! ! if(!bx || !bp) ! { ! post("arbran: no arrays: pdfscale!"); ! return; ! } ! ! if (!garray_getfloatarray(bx, &ix, &tx)) { post("arbran: couldn't read from array!"); --- 59,63 ---- t_float *tx, *tp; t_int ix, ip; ! if (!garray_getfloatarray(bx, &ix, &tx)) { post("arbran: couldn't read from array!"); *************** *** 95,111 **** t_float *tx, *tp; t_int ix, ip; ! ! if(!bx || !bp) ! { ! post("arbran: no arrays: bang!"); ! return; ! } ! ! if (!garray_getfloatarray(bx, &ix, &tx)) { post("arbran: couldn't read from array!"); return; } - if (!garray_getfloatarray(bp, &ip, &tp)) { --- 88,96 ---- t_float *tx, *tp; t_int ix, ip; ! if (!garray_getfloatarray(bx, &ix, &tx)) { post("arbran: couldn't read from array!"); return; } if (!garray_getfloatarray(bp, &ip, &tp)) { *************** *** 115,118 **** --- 100,104 ----
a = 0; + a0 = 0; u = fran(); while(u > a) *************** *** 174,181 **** srand( (unsigned)time( NULL ) ); outlet_new(&x->x_obj, &s_float); ! rand_arbran_setarrays(x, s1, s2); ! /* x->x_x = s1; ! x->x_p = s2; ! rand_arbran_set(x); */ return (x); } --- 160,166 ---- srand( (unsigned)time( NULL ) ); outlet_new(&x->x_obj, &s_float); ! x->x_x = s1; ! x->x_p = s2; ! rand_arbran_set(x); return (x); }
Index: arraycopy.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/arraycopy.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** arraycopy.c 29 Aug 2003 13:53:50 -0000 1.1 --- arraycopy.c 9 Mar 2004 03:51:28 -0000 1.2 *************** *** 28,34 **** static char *version = "arraycopy v0.2, written by Olaf Matthes olaf.matthes@gmx.de";
! typedef struct arraycopy ! { ! t_object x_obj; t_symbol *x_destarray; t_symbol *x_sourcearray; --- 28,34 ---- static char *version = "arraycopy v0.2, written by Olaf Matthes olaf.matthes@gmx.de";
! typedef struct arraycopy ! { ! t_object x_obj; t_symbol *x_destarray; t_symbol *x_sourcearray; *************** *** 79,83 **** /* 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) { t_garray *b; /* make local copy of array */ --- 79,83 ---- /* 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) { t_garray *b; /* make local copy of array */ *************** *** 148,153 **** 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) { --- 148,153 ---- 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) { *************** *** 243,259 ****
static void *arraycopy_new(t_symbol *s, int argc, t_atom *argv) ! { t_arraycopy *x = (t_arraycopy *)pd_new(arraycopy_class);
! if (argc > 0) { x->x_destarray = atom_getsymbolarg(0, argc, argv); ! 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); }
! #ifndef MAXLIB void arraycopy_setup(void) { --- 243,259 ----
static void *arraycopy_new(t_symbol *s, int argc, t_atom *argv) ! { t_arraycopy *x = (t_arraycopy *)pd_new(arraycopy_class);
! if (argc > 0) { x->x_destarray = atom_getsymbolarg(0, argc, argv); ! 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); }
! #ifndef MAXLIB void arraycopy_setup(void) { *************** *** 281,283 **** class_sethelpsymbol(arraycopy_class, gensym("maxlib/help-arraycopy.pd")); #endif ! } \ No newline at end of file --- 281,283 ---- class_sethelpsymbol(arraycopy_class, gensym("maxlib/help-arraycopy.pd")); #endif ! }
Index: beta.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/beta.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** beta.c 29 Aug 2003 13:53:50 -0000 1.3 --- beta.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 23,28 **** /* */ /* ---------------------------------------------------------------------------- */ ! ! #include "m_pd.h" #include <stdlib.h> #include <time.h> --- 23,28 ---- /* */ /* ---------------------------------------------------------------------------- */ ! ! #include "m_pd.h" #include <stdlib.h> #include <time.h> *************** *** 33,40 **** #define M_PI 3.1415927 #endif ! static char *version = "beta v0.1, generates a beta distributed random variable\n" " written by Olaf Matthes olaf.matthes@gmx.de"; ! /* -------------------------- rand_beta ------------------------------ */
--- 33,40 ---- #define M_PI 3.1415927 #endif ! static char *version = "beta v0.1, generates a beta distributed random variable\n" " written by Olaf Matthes olaf.matthes@gmx.de"; ! /* -------------------------- rand_beta ------------------------------ */
*************** *** 62,66 **** static void rand_beta_bang(t_rand_beta *x) { ! t_float u1, u2, y1, y2, sum, a, b, ainv, binv; a = (x->x_a <= 0 ? 0.0001 : x->x_a); b = (x->x_b <= 0 ? 0.0001 : x->x_b); --- 62,66 ---- static void rand_beta_bang(t_rand_beta *x) { ! t_float u1, u2, y01, y2, sum, a, b, ainv, binv; a = (x->x_a <= 0 ? 0.0001 : x->x_a); b = (x->x_b <= 0 ? 0.0001 : x->x_b); *************** *** 79,88 **** } while(u2 == 0); ! y1 = pow(u1, ainv); y2 = pow(u2, binv); ! sum = y1 + y2; } while(sum > 1); ! outlet_float(x->x_obj.ob_outlet, y1/sum); }
--- 79,88 ---- } while(u2 == 0); ! y01 = pow(u1, ainv); y2 = pow(u2, binv); ! sum = y01 + y2; } while(sum > 1); ! outlet_float(x->x_obj.ob_outlet, y01/sum); }
*************** *** 105,107 **** class_sethelpsymbol(rand_beta_class, gensym("maxlib/help-beta.pd")); } ! #endif \ No newline at end of file --- 105,107 ---- class_sethelpsymbol(rand_beta_class, gensym("maxlib/help-beta.pd")); } ! #endif
Index: chord.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/chord.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** chord.c 29 Aug 2003 13:53:50 -0000 1.3 --- chord.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 26,29 **** --- 26,33 ---- #include <stdio.h> #include <string.h> + #ifdef UNIX + #include <stdlib.h> + #endif +
#define MAX_POLY 32 /* maximum number of notes played at a time */
Index: deny.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/deny.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** deny.c 29 Aug 2003 13:53:50 -0000 1.1 --- deny.c 9 Mar 2004 03:51:28 -0000 1.2 *************** *** 28,37 **** static char *version = "deny v0.1, written by Olaf Matthes olaf.matthes@gmx.de";
! typedef struct deny ! { t_object x_obj; t_outlet *x_out; t_atom *x_elem; // list of elemets that are denyed to pass ! t_int x_numelem; // the number of elemetns in our deny-list } t_deny;
--- 28,37 ---- static char *version = "deny v0.1, written by Olaf Matthes olaf.matthes@gmx.de";
! typedef struct deny ! { t_object x_obj; t_outlet *x_out; t_atom *x_elem; // list of elemets that are denyed to pass ! t_int x_numelem; // the number of elemetns in our deny-list } t_deny;
*************** *** 76,80 ****
static void *deny_new(t_symbol *s, int argc, t_atom *argv) ! { t_deny *x = (t_deny *)pd_new(deny_class);
--- 76,80 ----
static void *deny_new(t_symbol *s, int argc, t_atom *argv) ! { t_deny *x = (t_deny *)pd_new(deny_class);
*************** *** 87,94 **** // post("deny: got %d elements", x->x_numelem);
! return (x); }
! #ifndef MAXLIB void deny_setup(void) { --- 87,94 ---- // post("deny: got %d elements", x->x_numelem);
! return (x); }
! #ifndef MAXLIB void deny_setup(void) { *************** *** 112,114 **** class_sethelpsymbol(deny_class, gensym("maxlib/help-deny.pd")); #endif ! } \ No newline at end of file --- 112,114 ---- class_sethelpsymbol(deny_class, gensym("maxlib/help-deny.pd")); #endif ! }
Index: expo.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/expo.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** expo.c 29 Aug 2003 13:53:50 -0000 1.3 --- expo.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 23,28 **** /* */ /* ---------------------------------------------------------------------------- */ ! ! #include "m_pd.h" #include <stdlib.h> #include <time.h> --- 23,28 ---- /* */ /* ---------------------------------------------------------------------------- */ ! ! #include "m_pd.h" #include <stdlib.h> #include <time.h> *************** *** 30,37 ****
#define fran() (t_float)rand()/(t_float)RAND_MAX ! static char *version = "expo v0.1, generates exponentially distributed random variable\n" " written by Olaf Matthes olaf.matthes@gmx.de"; ! /* -------------------------- rand_expo ------------------------------ */
--- 30,37 ----
#define fran() (t_float)rand()/(t_float)RAND_MAX ! static char *version = "expo v0.1, generates exponentially distributed random variable\n" " written by Olaf Matthes olaf.matthes@gmx.de"; ! /* -------------------------- rand_expo ------------------------------ */
*************** *** 84,86 **** class_sethelpsymbol(rand_expo_class, gensym("maxlib/help-expo.pd")); } ! #endif \ No newline at end of file --- 84,86 ---- class_sethelpsymbol(rand_expo_class, gensym("maxlib/help-expo.pd")); } ! #endif
Index: fifo.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/fifo.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** fifo.c 29 Aug 2003 13:53:50 -0000 1.3 --- fifo.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 94,96 **** class_sethelpsymbol(fifo_class, gensym("maxlib/help-fifo.pd")); } ! #endif \ No newline at end of file --- 94,96 ---- class_sethelpsymbol(fifo_class, gensym("maxlib/help-fifo.pd")); } ! #endif
Index: gestalt.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/gestalt.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gestalt.c 29 Aug 2003 13:53:50 -0000 1.3 --- gestalt.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 26,29 **** --- 26,32 ---- #include <math.h> #include <stdio.h> + #ifdef UNIX + #include <stdlib.h> + #endif
static char *version = "gestalt v0.1, written by Olaf Matthes olaf.matthes@gmx.de";
Index: lifo.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/lifo.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lifo.c 29 Aug 2003 13:53:50 -0000 1.3 --- lifo.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 105,107 **** class_sethelpsymbol(lifo_class, gensym("maxlib/help-lifo.pd")); } ! #endif \ No newline at end of file --- 105,107 ---- class_sethelpsymbol(lifo_class, gensym("maxlib/help-lifo.pd")); } ! #endif
Index: linear.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/linear.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** linear.c 29 Aug 2003 13:53:50 -0000 1.3 --- linear.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 23,28 **** /* */ /* ---------------------------------------------------------------------------- */ ! ! #include "m_pd.h" #include <stdlib.h> #include <time.h> --- 23,28 ---- /* */ /* ---------------------------------------------------------------------------- */ ! ! #include "m_pd.h" #include <stdlib.h> #include <time.h> *************** *** 30,37 ****
#define fran() (t_float)rand()/(t_float)RAND_MAX ! static char *version = "linear v0.1, generates linearly distributed random variable\n" " written by Olaf Matthes olaf.matthes@gmx.de"; ! /* -------------------------- rand_linear ------------------------------ */
--- 30,37 ----
#define fran() (t_float)rand()/(t_float)RAND_MAX ! static char *version = "linear v0.1, generates linearly distributed random variable\n" " written by Olaf Matthes olaf.matthes@gmx.de"; ! /* -------------------------- rand_linear ------------------------------ */
*************** *** 79,81 **** class_sethelpsymbol(rand_linear_class, gensym("maxlib/help-linear.pd")); } ! #endif \ No newline at end of file --- 79,81 ---- class_sethelpsymbol(rand_linear_class, gensym("maxlib/help-linear.pd")); } ! #endif
Index: listfifo.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/listfifo.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** listfifo.c 29 Aug 2003 13:53:50 -0000 1.1 --- listfifo.c 9 Mar 2004 03:51:28 -0000 1.2 *************** *** 107,109 **** class_sethelpsymbol(listfifo_class, gensym("maxlib/help-listfifo.pd")); } ! #endif \ No newline at end of file --- 107,109 ---- class_sethelpsymbol(listfifo_class, gensym("maxlib/help-listfifo.pd")); } ! #endif
Index: mlife.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/mlife.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mlife.c 29 Aug 2003 13:53:50 -0000 1.3 --- mlife.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 513,515 **** class_sethelpsymbol(mlife_class, gensym("maxlib/help-mlife.pd")); } ! #endif \ No newline at end of file --- 513,515 ---- class_sethelpsymbol(mlife_class, gensym("maxlib/help-mlife.pd")); } ! #endif
Index: nchange.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/nchange.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** nchange.c 29 Aug 2003 13:53:50 -0000 1.1 --- nchange.c 9 Mar 2004 03:51:28 -0000 1.2 *************** *** 203,205 **** class_sethelpsymbol(nchange_class, gensym("maxlib/help-nchange.pd")); } ! #endif \ No newline at end of file --- 203,205 ---- class_sethelpsymbol(nchange_class, gensym("maxlib/help-nchange.pd")); } ! #endif
Index: netclient.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/netclient.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** netclient.c 29 Aug 2003 13:53:50 -0000 1.6 --- netclient.c 9 Mar 2004 03:51:28 -0000 1.7 *************** *** 23,29 **** /* */ /* ---------------------------------------------------------------------------- */
! #include "m_pd.h"
#include <sys/types.h> --- 23,34 ---- /* */ /* ---------------------------------------------------------------------------- */ + /* Changes: use circular message buffer for receive */ + /* using pollfunction instead of clock (suggested by HCS) */
! #ifdef PD_0_37 #include "m_pd.h" + #include "s_stuff.h" + #endif + #include "m_imp.h"
#include <sys/types.h> *************** *** 31,34 **** --- 36,40 ---- #include <pthread.h> #ifdef UNIX + #include <sys/time.h> #include <sys/socket.h> #include <sys/errno.h> *************** *** 42,51 **** #endif
! #define STRBUF_SIZE 32 /* maximum numbers of characters to read */ ! #define DEFPOLLTIME 20 /* check for input every 20 ms */
! static char *version = "netclient v0.1, written by Olaf Matthes olaf.matthes@gmx.de";
static t_class *netclient_class;
typedef struct _netclient --- 48,57 ---- #endif
! #define INBUFSIZE 4096 /* maximum numbers of characters to read */
! static char *version = "netclient v0.3, written by Olaf Matthes olaf.matthes@gmx.de";
static t_class *netclient_class; + static t_binbuf *inbinbuf;
typedef struct _netclient *************** *** 53,57 **** t_object x_obj; t_clock *x_clock; - t_clock *x_poll; t_outlet *x_outdata; t_outlet *x_outconnect; --- 59,62 ---- *************** *** 61,64 **** --- 66,72 ---- int x_port; int x_protocol; + char x_inbuf[INBUFSIZE]; /* circular message buffer for received data */ + int x_intail; + int x_inhead; /* multithread stuff */ pthread_t x_threadid; /* id of child thread */ *************** *** 66,95 **** } t_netclient;
! static void sys_sockerror(char *s) ! { ! #ifdef NT ! int err = WSAGetLastError(); ! if (err == 10054) return; ! #endif ! #ifdef UNIX ! int err = errno; #endif - post("%s: %s (%d)\n", s, strerror(err), err); - } - - static void sys_closesocket(int fd) {
! #ifdef UNIX ! close(fd); ! #endif ! #ifdef NT ! closesocket(fd); ! #endif ! }
static void netclient_tick(t_netclient *x) { outlet_float(x->x_outconnect, 1); }
--- 74,91 ---- } t_netclient;
! #ifdef USE_CIRCULAR ! static t_binbuf *inbinbuf; #endif
! /* one lonlely prototype */ ! static void netclient_rcv(t_netclient *x);
+ /* get's called when connection has been made */ static void netclient_tick(t_netclient *x) { outlet_float(x->x_outconnect, 1); + /* add pollfunction for checking for input */ + sys_addpollfn(x->x_fd, (t_fdpollfn)netclient_rcv, x); }
*************** *** 164,167 **** --- 160,164 ---- if (x->x_fd >= 0) { + sys_rmpollfn(x->x_fd); sys_closesocket(x->x_fd); x->x_fd = -1; *************** *** 220,231 **** }
static void netclient_rcv(t_netclient *x) { ! int sockfd = x->x_fd; int ret; ! char resp[STRBUF_SIZE]; fd_set readset; fd_set exceptset; ! struct timeval ztout; /* output data */ t_binbuf *binbuf; --- 217,253 ---- }
+ /* this is in a separately called subroutine so that the buffer isn't + sitting on the stack while the messages are getting passed. */ + static int netclient_doread(t_netclient *x) + { + char messbuf[INBUFSIZE], *bp = messbuf; + int indx; + int inhead = x->x_inhead; + int intail = x->x_intail; + char *inbuf = x->x_inbuf; + if (intail == inhead) return (0); + for (indx = intail; indx != inhead; indx = (indx+1)&(INBUFSIZE-1)) + { + char c = *bp++ = inbuf[indx]; + if (c == ';' && (!indx || inbuf[indx-1] != '\')) + { + intail = (indx+1)&(INBUFSIZE-1); + binbuf_text(inbinbuf, messbuf, bp - messbuf); + x->x_inhead = inhead; + x->x_intail = intail; + return (1); + } + } + return (0); + } + static void netclient_rcv(t_netclient *x) { ! int fd = x->x_fd; int ret; ! char resp[INBUFSIZE]; fd_set readset; fd_set exceptset; ! struct timeval ztout; /* output data */ t_binbuf *binbuf; *************** *** 240,301 **** FD_ZERO(&readset); FD_ZERO(&exceptset); ! FD_SET(x->x_fd, &readset ); ! FD_SET(x->x_fd, &exceptset );
ztout.tv_sec = 0; ztout.tv_usec = 0; ! ! ret = select(sockfd+1, &readset, NULL, &exceptset, &ztout); if(ret < 0) { error("netclient: can not read from socket"); ! sys_closesocket(sockfd); return; } ! if(FD_ISSET(sockfd, &readset) || FD_ISSET(sockfd, &exceptset)) { ! /* read from server */ ! ret = recv(sockfd, resp, STRBUF_SIZE, 0); ! if(ret > 0) { ! // post("netclient: received: %s, %d bytes, %d stringlen", resp, ret, strlen(resp)); ! /* convert string into atoms using a binbuf */ ! binbuf = binbuf_new(); ! binbuf_text(binbuf, resp, ret); //strlen(resp)); ! natom = binbuf_getnatom(binbuf); /* get number of atoms */ ! at = binbuf_getvec(binbuf); /* get the atoms */ ! /* now split it into several parts at every A_SEMI because ! we probably received more than one message at a time */ ! for (msg = 0; msg < natom;) { ! int emsg; ! for (emsg = msg; emsg < natom && at[emsg].a_type != A_COMMA ! && at[emsg].a_type != A_SEMI; emsg++); ! ! if (emsg > msg) { ! int ii; ! for (ii = msg; ii < emsg; ii++) ! if (at[ii].a_type == A_DOLLAR || at[ii].a_type == A_DOLLSYM) { ! pd_error(x, "netserver: -- got dollar sign in message"); ! goto nodice; } ! if (at[msg].a_type == A_FLOAT) ! { ! if (emsg > msg + 1) ! outlet_list(x->x_outdata, 0, emsg-msg, at + msg); ! else outlet_float(x->x_outdata, at[msg].a_w.w_float); } ! else if (at[msg].a_type == A_SYMBOL) ! outlet_anything(x->x_outdata, at[msg].a_w.w_symbol, ! emsg-msg-1, at + msg + 1); } ! nodice: ! msg = emsg + 1; ! } ! binbuf_free(binbuf); } - else post("netclient: read() did not return any data"); } } --- 262,335 ---- FD_ZERO(&readset); FD_ZERO(&exceptset); ! FD_SET(fd, &readset ); ! FD_SET(fd, &exceptset );
ztout.tv_sec = 0; ztout.tv_usec = 0; ! ret = select(fd+1, &readset, NULL, &exceptset, &ztout); if(ret < 0) { error("netclient: can not read from socket"); ! sys_closesocket(fd); return; } ! if(FD_ISSET(fd, &readset) || FD_ISSET(fd, &exceptset)) { ! int readto = (x->x_inhead >= x->x_intail ? INBUFSIZE : x->x_intail-1); ! ! ret = recv(fd, x->x_inbuf + x->x_inhead, readto - x->x_inhead, 0); ! if (ret < 0) { ! sys_sockerror("recv"); ! sys_rmpollfn(fd); ! sys_closesocket(fd); ! } ! else if (ret == 0) ! { ! post("netclient: connection closed on socket %d", fd); ! sys_rmpollfn(fd); ! sys_closesocket(fd); ! } ! else ! { ! x->x_inhead += ret; ! if (x->x_inhead >= INBUFSIZE) x->x_inhead = 0; ! while (netclient_doread(x)) { ! /* output binbuf */ ! natom = binbuf_getnatom(inbinbuf); /* get number of atoms */ ! at = binbuf_getvec(inbinbuf); /* get the atoms */ ! /* now split it into several parts at every A_SEMI because ! we probably received more than one message at a time */ ! for (msg = 0; msg < natom;) { ! int emsg; ! for (emsg = msg; emsg < natom && at[emsg].a_type != A_COMMA ! && at[emsg].a_type != A_SEMI; emsg++); ! ! if (emsg > msg) ! { ! int ii; ! for (ii = msg; ii < emsg; ii++) ! if (at[ii].a_type == A_DOLLAR || at[ii].a_type == A_DOLLSYM) ! { ! pd_error(x, "netserver: -- got dollar sign in message"); ! goto nodice; ! } ! if (at[msg].a_type == A_FLOAT) { ! if (emsg > msg + 1) ! outlet_list(x->x_outdata, 0, emsg-msg, at + msg); ! else outlet_float(x->x_outdata, at[msg].a_w.w_float); } ! else if (at[msg].a_type == A_SYMBOL) ! outlet_anything(x->x_outdata, at[msg].a_w.w_symbol, ! emsg-msg-1, at + msg + 1); } ! nodice: ! msg = emsg + 1; } ! } } } } *************** *** 303,313 **** }
- static void netclient_poll(t_netclient *x) - { - if(x->x_connectstate) - netclient_rcv(x); /* try to read in case we're connected */ - clock_delay(x->x_poll, DEFPOLLTIME); /* see you later */ - } - static void *netclient_new(t_floatarg udpflag) { --- 337,340 ---- *************** *** 316,320 **** x->x_outconnect = outlet_new(&x->x_obj, &s_float); /* connection state */ x->x_clock = clock_new(x, (t_method)netclient_tick); ! x->x_poll = clock_new(x, (t_method)netclient_poll); x->x_fd = -1; x->x_protocol = (udpflag != 0 ? SOCK_DGRAM : SOCK_STREAM); --- 343,347 ---- x->x_outconnect = outlet_new(&x->x_obj, &s_float); /* connection state */ x->x_clock = clock_new(x, (t_method)netclient_tick); ! inbinbuf = binbuf_new(); x->x_fd = -1; x->x_protocol = (udpflag != 0 ? SOCK_DGRAM : SOCK_STREAM); *************** *** 324,328 **** if(pthread_attr_setdetachstate(&x->x_threadattr, PTHREAD_CREATE_DETACHED) < 0) post("netclient: warning: could not prepare child thread" ); - clock_delay(x->x_poll, 0); /* start polling the input */ return (x); } --- 351,354 ---- *************** *** 331,336 **** { netclient_disconnect(x); - clock_free(x->x_poll); clock_free(x->x_clock); }
--- 357,362 ---- { netclient_disconnect(x); clock_free(x->x_clock); + binbuf_free(inbinbuf); }
*************** *** 363,365 **** class_sethelpsymbol(netclient_class, gensym("maxlib/help-netclient.pd")); } ! #endif \ No newline at end of file --- 389,391 ---- class_sethelpsymbol(netclient_class, gensym("maxlib/help-netclient.pd")); } ! #endif
Index: netrec.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/netrec.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** netrec.c 29 Aug 2003 13:53:50 -0000 1.7 --- netrec.c 9 Mar 2004 03:51:28 -0000 1.8 *************** *** 23,27 **** /* ---------------------------------------------------------------------------- */
! #ifndef PD_0_36 #include "m_pd.h" #include "s_stuff.h" --- 23,27 ---- /* ---------------------------------------------------------------------------- */
! #ifdef PD_0_37 #include "m_pd.h" #include "s_stuff.h" *************** *** 447,449 **** class_sethelpsymbol(netrec_class, gensym("maxlib/help-netrec.pd")); } ! #endif \ No newline at end of file --- 447,449 ---- class_sethelpsymbol(netrec_class, gensym("maxlib/help-netrec.pd")); } ! #endif
Index: netserver.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/netserver.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** netserver.c 29 Aug 2003 13:53:50 -0000 1.7 --- netserver.c 9 Mar 2004 03:51:28 -0000 1.8 *************** *** 24,28 **** /* ---------------------------------------------------------------------------- */
! #ifndef PD_0_36 #include "m_pd.h" #include "s_stuff.h" --- 24,28 ---- /* ---------------------------------------------------------------------------- */
! #ifdef PD_0_37 #include "m_pd.h" #include "s_stuff.h" *************** *** 583,585 **** class_sethelpsymbol(netserver_class, gensym("maxlib/help-netserver.pd")); } ! #endif \ No newline at end of file --- 583,585 ---- class_sethelpsymbol(netserver_class, gensym("maxlib/help-netserver.pd")); } ! #endif
Index: nroute.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/nroute.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** nroute.c 29 Aug 2003 13:53:50 -0000 1.3 --- nroute.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 36,45 **** static char *version = "nroute v0.1, written by Olaf Matthes olaf.matthes@gmx.de";
! typedef struct nroute ! { ! t_object x_obj; ! t_outlet *out1; t_outlet *out2; ! t_int pos; t_atom match; } t_nroute; --- 36,45 ---- static char *version = "nroute v0.1, written by Olaf Matthes olaf.matthes@gmx.de";
! typedef struct nroute ! { ! t_object x_obj; ! t_outlet *out1; t_outlet *out2; ! t_int pos; t_atom match; } t_nroute; *************** *** 55,88 **** /* this is the routine that actually does the routing / matching */ /* it get's called by all other routines that get any input and */ ! /* even handles the second (proxy) inlet ! */ ! static void nroute_any(t_nroute *x, t_symbol *s, int argc, t_atom *argv) { if(s) { ! if (x->pos == 1 && x->match.a_type == A_SYMBOL && x->match.a_w.w_symbol == s) ! outlet_anything (x->out1,s,argc,argv); ! else if (x->pos > 1 && x->pos <= argc + 1 && ! argv[x->pos-2].a_type == x->match.a_type && ! argv[x->pos-2].a_w.w_float == x->match.a_w.w_float) ! outlet_anything (x->out1,s,argc,argv); ! else outlet_anything (x->out2,s,argc,argv); ! } else ! { ! if (x->pos > 0 && x->pos <= argc && ! argv[x->pos-1].a_type == x->match.a_type && ! argv[x->pos-1].a_w.w_float == x->match.a_w.w_float) ! outlet_list (x->out1,0,argc,argv); ! else outlet_list (x->out2,0,argc,argv); ! } ! } ! ! static void nroute_float(t_nroute *x, float f) ! { ! t_atom a; ! SETFLOAT (&a,f); ! nroute_any(x,0,1,&a); ! }
static void nroute_list(t_nroute *x, t_symbol *s, int argc, t_atom *argv) --- 55,88 ---- /* this is the routine that actually does the routing / matching */ /* it get's called by all other routines that get any input and */ ! /* even handles the second (proxy) inlet ! */ ! static void nroute_any(t_nroute *x, t_symbol *s, int argc, t_atom *argv) { if(s) { ! if (x->pos == 1 && x->match.a_type == A_SYMBOL && x->match.a_w.w_symbol == s) ! outlet_anything (x->out1,s,argc,argv); ! else if (x->pos > 1 && x->pos <= argc + 1 && ! argv[x->pos-2].a_type == x->match.a_type && ! argv[x->pos-2].a_w.w_float == x->match.a_w.w_float) ! outlet_anything (x->out1,s,argc,argv); ! else outlet_anything (x->out2,s,argc,argv); ! } else ! { ! if (x->pos > 0 && x->pos <= argc && ! argv[x->pos-1].a_type == x->match.a_type && ! argv[x->pos-1].a_w.w_float == x->match.a_w.w_float) ! outlet_list (x->out1,0,argc,argv); ! else outlet_list (x->out2,0,argc,argv); ! } ! } ! ! static void nroute_float(t_nroute *x, float f) ! { ! t_atom a; ! SETFLOAT (&a,f); ! nroute_any(x,0,1,&a); ! }
static void nroute_list(t_nroute *x, t_symbol *s, int argc, t_atom *argv) *************** *** 121,125 ****
static void *nroute_new(t_symbol *s, int argc, t_atom *argv) ! { t_nroute *x = (t_nroute *)pd_new(nroute_class); t_proxy *inlet = (t_proxy *)pd_new(proxy_class); /* for the proxy inlet */ --- 121,125 ----
static void *nroute_new(t_symbol *s, int argc, t_atom *argv) ! { t_nroute *x = (t_nroute *)pd_new(nroute_class); t_proxy *inlet = (t_proxy *)pd_new(proxy_class); /* for the proxy inlet */ *************** *** 127,141 **** inlet->x = x; /* make x visible to the proxy inlets */
! x->pos = 1; ! x->match.a_type = A_NULL; ! if (argc > 2) { error ("nroute: extra arguments"); return 0; } ! if (argc > 1) { ! if (argv[1].a_type == A_FLOAT) x->pos = argv[1].a_w.w_float; ! else { post ("nroute: second argument must be (int) position"); return 0; } ! } ! if (argc > 0) { ! x->match.a_type = argv[0].a_type; ! x->match.a_w.w_float = argv[0].a_w.w_float; ! } inlet->index = 0; /* we are going to create a proxy inlet no. 0 */ /* it belongs to the object t_nroute but the destination is t_proxy */ --- 127,141 ---- inlet->x = x; /* make x visible to the proxy inlets */
! x->pos = 1; ! x->match.a_type = A_NULL; ! if (argc > 2) { error ("nroute: extra arguments"); return 0; } ! if (argc > 1) { ! if (argv[1].a_type == A_FLOAT) x->pos = argv[1].a_w.w_float; ! else { post ("nroute: second argument must be (int) position"); return 0; } ! } ! if (argc > 0) { ! x->match.a_type = argv[0].a_type; ! x->match.a_w.w_float = argv[0].a_w.w_float; ! } inlet->index = 0; /* we are going to create a proxy inlet no. 0 */ /* it belongs to the object t_nroute but the destination is t_proxy */ *************** *** 143,152 **** /* and now a 'normal' third inlet */ inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("right")); ! x->out1 = outlet_new(&x->x_obj, gensym("list")); x->out2 = outlet_new(&x->x_obj, gensym("list")); ! return (x); }
! #ifndef MAXLIB void nroute_setup(void) { --- 143,152 ---- /* and now a 'normal' third inlet */ inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("right")); ! x->out1 = outlet_new(&x->x_obj, gensym("list")); x->out2 = outlet_new(&x->x_obj, gensym("list")); ! return (x); }
! #ifndef MAXLIB void nroute_setup(void) { *************** *** 177,179 **** class_sethelpsymbol(nroute_class, gensym("maxlib/help-nroute.pd")); #endif ! } \ No newline at end of file --- 177,179 ---- class_sethelpsymbol(nroute_class, gensym("maxlib/help-nroute.pd")); #endif ! }
Index: pitch.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/pitch.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pitch.c 29 Aug 2003 13:53:50 -0000 1.3 --- pitch.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 112,114 **** class_sethelpsymbol(pitch_class, gensym("maxlib/help-pitch.pd")); } ! #endif \ No newline at end of file --- 112,114 ---- class_sethelpsymbol(pitch_class, gensym("maxlib/help-pitch.pd")); } ! #endif
Index: plus.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/plus.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** plus.c 29 Aug 2003 13:53:50 -0000 1.3 --- plus.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 108,110 **** class_sethelpsymbol(plus_class, gensym("maxlib/help-plus.pd")); } ! #endif \ No newline at end of file --- 108,110 ---- class_sethelpsymbol(plus_class, gensym("maxlib/help-plus.pd")); } ! #endif
Index: poisson.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/poisson.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** poisson.c 29 Aug 2003 13:53:50 -0000 1.3 --- poisson.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 23,28 **** /* */ /* ---------------------------------------------------------------------------- */ ! ! #include "m_pd.h" #include <stdlib.h> #include <time.h> --- 23,28 ---- /* */ /* ---------------------------------------------------------------------------- */ ! ! #include "m_pd.h" #include <stdlib.h> #include <time.h> *************** *** 33,40 **** #define M_PI 3.1415927 #endif ! static char *version = "poisson v0.1, generates a poisson distributed random variable\n" " written by Olaf Matthes olaf.matthes@gmx.de"; ! /* -------------------------- rand_poisson ------------------------------ */
--- 33,40 ---- #define M_PI 3.1415927 #endif ! static char *version = "poisson v0.1, generates a poisson distributed random variable\n" " written by Olaf Matthes olaf.matthes@gmx.de"; ! /* -------------------------- rand_poisson ------------------------------ */
*************** *** 89,91 **** class_sethelpsymbol(rand_poisson_class, gensym("maxlib/help-poisson.pd")); } ! #endif \ No newline at end of file --- 89,91 ---- class_sethelpsymbol(rand_poisson_class, gensym("maxlib/help-poisson.pd")); } ! #endif
Index: pong.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/pong.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pong.c 29 Aug 2003 13:53:50 -0000 1.3 --- pong.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 29,35 **** " written for Max by Richard Dudas";
! typedef struct pong ! { ! t_object x_obj; t_outlet *p_bounceout; t_outlet *p_handout; --- 29,35 ---- " written for Max by Richard Dudas";
! typedef struct pong ! { ! t_object x_obj; t_outlet *p_bounceout; t_outlet *p_handout; *************** *** 251,255 ****
static void *pong_new(t_floatarg n) ! { t_pong *x = (t_pong *)pd_new(pong_class);
--- 251,255 ----
static void *pong_new(t_floatarg n) ! { t_pong *x = (t_pong *)pd_new(pong_class);
*************** *** 294,301 **** x->p_heightout = outlet_new(&x->x_obj, gensym("float"));
! return (x); }
! #ifndef MAXLIB void pong_setup(void) { --- 294,301 ---- x->p_heightout = outlet_new(&x->x_obj, gensym("float"));
! return (x); }
! #ifndef MAXLIB void pong_setup(void) { *************** *** 330,332 **** class_sethelpsymbol(pong_class, gensym("maxlib/help-pong.pd")); #endif ! } \ No newline at end of file --- 330,332 ---- class_sethelpsymbol(pong_class, gensym("maxlib/help-pong.pd")); #endif ! }
Index: pulse.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/pulse.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pulse.c 29 Aug 2003 13:53:50 -0000 1.3 --- pulse.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 299,301 **** class_sethelpsymbol(pulse_class, gensym("maxlib/help-pulse.pd")); } ! #endif \ No newline at end of file --- 299,301 ---- class_sethelpsymbol(pulse_class, gensym("maxlib/help-pulse.pd")); } ! #endif
Index: remote.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/remote.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** remote.c 29 Aug 2003 13:53:50 -0000 1.4 --- remote.c 9 Mar 2004 03:51:28 -0000 1.5 *************** *** 106,108 **** class_sethelpsymbol(remote_class, gensym("maxlib/help-remote.pd")); } ! #endif \ No newline at end of file --- 106,108 ---- class_sethelpsymbol(remote_class, gensym("maxlib/help-remote.pd")); } ! #endif
Index: rewrap.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/rewrap.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** rewrap.c 29 Aug 2003 13:53:50 -0000 1.3 --- rewrap.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 153,155 **** class_sethelpsymbol(rewrap_class, gensym("maxlib/help-rewrap.pd")); } ! #endif \ No newline at end of file --- 153,155 ---- class_sethelpsymbol(rewrap_class, gensym("maxlib/help-rewrap.pd")); } ! #endif
Index: rhythm.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/rhythm.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** rhythm.c 29 Aug 2003 13:53:50 -0000 1.3 --- rhythm.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 27,30 **** --- 27,33 ---- #include <stdio.h> #include <math.h> + #ifdef UNIX + #include <stdlib.h> + #endif
#define ALPHA 10
Index: score.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/score.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** score.c 29 Aug 2003 13:53:50 -0000 1.3 --- score.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 307,309 **** class_sethelpsymbol(score_class, gensym("maxlib/help-score.pd")); } ! #endif \ No newline at end of file --- 307,309 ---- class_sethelpsymbol(score_class, gensym("maxlib/help-score.pd")); } ! #endif
Index: step.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/step.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** step.c 29 Aug 2003 13:53:50 -0000 1.3 --- step.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 177,179 **** class_sethelpsymbol(step_class, gensym("maxlib/help-step.pd")); } ! #endif \ No newline at end of file --- 177,179 ---- class_sethelpsymbol(step_class, gensym("maxlib/help-step.pd")); } ! #endif
Index: subst.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/subst.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** subst.c 29 Aug 2003 13:53:50 -0000 1.3 --- subst.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 422,424 **** class_sethelpsymbol(subst_class, gensym("maxlib/help-subst.pd")); } ! #endif \ No newline at end of file --- 422,424 ---- class_sethelpsymbol(subst_class, gensym("maxlib/help-subst.pd")); } ! #endif
Index: sync.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/sync.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sync.c 29 Aug 2003 13:53:50 -0000 1.1 --- sync.c 9 Mar 2004 03:51:28 -0000 1.2 *************** *** 28,32 **** #include <math.h>
! #define SYNC_MAX_SIZE (sizeof(unsigned int) * 8)
static char *version = "sync v0.1, written by Olaf Matthes olaf.matthes@gmx.de\n" --- 28,32 ---- #include <math.h>
! #define SYNC_MAX_SIZE (int)(sizeof(unsigned int) * 8)
static char *version = "sync v0.1, written by Olaf Matthes olaf.matthes@gmx.de\n"
Index: temperature.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/temperature.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** temperature.c 29 Aug 2003 13:53:51 -0000 1.3 --- temperature.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 118,120 **** class_sethelpsymbol(temperature_class, gensym("maxlib/help-temperature.pd")); } ! #endif \ No newline at end of file --- 118,120 ---- class_sethelpsymbol(temperature_class, gensym("maxlib/help-temperature.pd")); } ! #endif
Index: tilt.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/tilt.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tilt.c 29 Aug 2003 13:53:51 -0000 1.3 --- tilt.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 187,189 **** class_sethelpsymbol(tilt_class, gensym("maxlib/help-tilt.pd")); } ! #endif \ No newline at end of file --- 187,189 ---- class_sethelpsymbol(tilt_class, gensym("maxlib/help-tilt.pd")); } ! #endif
Index: triang.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/triang.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** triang.c 29 Aug 2003 13:53:51 -0000 1.3 --- triang.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 23,28 **** /* */ /* ---------------------------------------------------------------------------- */ ! ! #include "m_pd.h" #include <stdlib.h> #include <time.h> --- 23,28 ---- /* */ /* ---------------------------------------------------------------------------- */ ! ! #include "m_pd.h" #include <stdlib.h> #include <time.h> *************** *** 30,37 ****
#define fran() (t_float)rand()/(t_float)RAND_MAX ! static char *version = "triang v0.1, generates triangularly distributed random variable\n" " written by Olaf Matthes olaf.matthes@gmx.de"; ! /* -------------------------- rand_triang ------------------------------ */
--- 30,37 ----
#define fran() (t_float)rand()/(t_float)RAND_MAX ! static char *version = "triang v0.1, generates triangularly distributed random variable\n" " written by Olaf Matthes olaf.matthes@gmx.de"; ! /* -------------------------- rand_triang ------------------------------ */
*************** *** 78,80 **** class_sethelpsymbol(rand_triang_class, gensym("maxlib/help-triang.pd")); #endif ! } \ No newline at end of file --- 78,80 ---- class_sethelpsymbol(rand_triang_class, gensym("maxlib/help-triang.pd")); #endif ! }
Index: unroute.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/unroute.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** unroute.c 29 Aug 2003 13:53:51 -0000 1.3 --- unroute.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 173,175 **** class_sethelpsymbol(unroute_class, gensym("maxlib/help-unroute.pd")); #endif ! } \ No newline at end of file --- 173,175 ---- class_sethelpsymbol(unroute_class, gensym("maxlib/help-unroute.pd")); #endif ! }
Index: urn.c =================================================================== RCS file: /cvsroot/pure-data/externals/maxlib/src/urn.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** urn.c 29 Aug 2003 13:53:51 -0000 1.3 --- urn.c 9 Mar 2004 03:51:28 -0000 1.4 *************** *** 23,28 **** /* */ /* ---------------------------------------------------------------------------- */ ! ! #include "m_pd.h" #include <stdlib.h> #include <time.h> --- 23,28 ---- /* */ /* ---------------------------------------------------------------------------- */ ! ! #include "m_pd.h" #include <stdlib.h> #include <time.h> *************** *** 31,35 **** static char *version = "urn v0.1, urn selection model\n" " written by Olaf Matthes olaf.matthes@gmx.de"; ! /* -------------------------- urn ------------------------------ */
--- 31,35 ---- static char *version = "urn v0.1, urn selection model\n" " written by Olaf Matthes olaf.matthes@gmx.de"; ! /* -------------------------- urn ------------------------------ */
*************** *** 150,152 **** class_sethelpsymbol(urn_class, gensym("maxlib/help-urn.pd")); #endif ! } \ No newline at end of file --- 150,152 ---- class_sethelpsymbol(urn_class, gensym("maxlib/help-urn.pd")); #endif ! }