Commit 28067916 authored by thomas's avatar thomas
Browse files

no message


git-svn-id: https://svn.grrrr.org/ext/trunk@190 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent d6a15713
/*
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001,2002 Thomas Grill (xovo@gmx.net)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
*/
// This is the prefix file for CodeWarrior projects - threaded version
#ifndef _FLEXT_CW_MAX_THR_H
#define _FLEXT_CW_MAX_THR_H
#define FLEXT_THREADS
#include "flcwmax.h"
#endif
/*
flext - C++ layer for Max/MSP and pd (pure data) externals
Copyright (c) 2001,2002 Thomas Grill (xovo@gmx.net)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
*/
#include <flext.h>
#include <flinternal.h>
#include <string.h>
#include <stdarg.h>
flext_base::xlet::xlet(type t,const char *d):
tp(t),nxt(NULL)
{
if(d) {
int ln = strlen(d);
desc = new char[ln];
strncpy(desc,d,ln);
}
else desc = NULL;
}
flext_base::xlet::~xlet()
{
if(desc) delete[] desc;
if(nxt) delete nxt;
}
void flext_base::AddXlet(xlet::type tp,int mult,const char *desc,xlet *&root)
{
if(!root && mult) { root = new xlet(tp,desc); --mult; }
if(mult) {
xlet *xi = root;
while(xi->nxt) xi = xi->nxt;
while(mult--) xi = xi->nxt = new xlet(tp,desc);
}
}
unsigned long flext_base::XletCode(xlet::type tp,...)
{
unsigned long code = 0;
va_list marker;
va_start(marker,tp);
int cnt = 0;
xlet::type *args = NULL,arg = tp;
for(; arg; ++cnt) {
#ifdef _DEBUG
if(cnt > 9) {
error("%s - Too many in/outlets defined - truncated to 9",thisName());
break;
}
#endif
code = code*10+(int)arg;
arg = (xlet::type)va_arg(marker,int);
}
va_end(marker);
return code;
}
void flext_base::AddInlets(unsigned long code)
{
for(; code; code /= 10) AddInlet((xlet::type)(code%10));
}
void flext_base::AddOutlets(unsigned long code)
{
for(; code; code /= 10) AddOutlet((xlet::type)(code%10));
}
max v2;
#N vpatcher 348 125 705 420;
#P number 154 89 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 77 195 183 196617 1sef;
#P newex 78 169 60 196617 prepend set;
#P message 94 87 17 196617 2.;
#P message 76 87 14 196617 1;
#P message 56 87 17 196617 jo;
#P message 194 88 28 196617 hann;
#P comment 57 70 56 196617 triggering;
#P flonum 228 88 38 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 78 143 45 196617 adv1 sef;
#P comment 151 70 70 196617 not triggering;
#P connect 8 0 9 0;
#P connect 5 0 1 0;
#P connect 6 0 1 0;
#P connect 7 0 1 0;
#P connect 1 0 8 0;
#P connect 4 0 1 1;
#P connect 2 0 1 1;
#P connect 10 0 1 1;
#P pop;
max v2;
#N vpatcher 206 339 600 609;
#P comment 101 59 188 196617 int message - there's no method for int: float method is called;
#P message 28 33 17 196617 1.;
#P flonum 57 33 56 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 73 93 17 196617 0.;
#P message 73 62 14 196617 2;
#P newex 29 137 43 196617 simple1;
#P flonum 29 166 50 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 129 33 100 196617 float messages;
#P comment 100 94 59 196617 special case;
#P connect 4 0 3 0;
#P connect 5 0 3 0;
#P connect 6 0 3 0;
#P connect 7 0 3 0;
#P connect 3 0 2 0;
#P pop;
max v2;
#N vpatcher 106 210 442 455;
#P comment 24 37 56 196617 triggering;
#P flonum 119 55 38 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 31 55 38 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 41 110 52 196617 simple2 0;
#P flonum 41 139 50 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 114 37 70 196617 not triggering;
#P comment 104 112 100 196617 0 is default argument;
#P connect 4 0 3 0;
#P connect 3 0 2 0;
#P connect 5 0 3 1;
#P pop;
max v2;
#N vpatcher 40 55 440 355;
#P number 196 179 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 62 181 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 185 29 33 196617 stop;
#P button 184 46 26 0;
#P button 109 46 26 0;
#P message 239 125 27 196617 stop;
#P message 89 124 27 196617 stop;
#P message 196 125 26 196617 100;
#P message 62 124 14 196617 0;
#P newex 196 149 82 196617 thread2 100 bbb;
#P newex 62 149 75 196617 thread2 10 aaa;
#P comment 107 29 33 196617 start;
#P connect 7 0 3 0;
#P connect 3 0 1 0;
#P connect 5 0 1 0;
#P connect 1 0 10 0;
#P connect 8 0 5 0;
#P connect 7 0 4 0;
#P connect 4 0 2 0;
#P connect 6 0 2 0;
#P connect 2 0 11 0;
#P connect 8 0 6 0;
#P pop;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment