Commit 23103f47 authored by Miller Puckette's avatar Miller Puckette
Browse files

0.42 test 3

parent a0108733
......@@ -5,6 +5,9 @@ include ../makefile
pd_linux: pdsched.pd_linux
d_fat: pdsched.d_fat
d_ppc: pdsched.d_ppc
pdsched.pd_linux: pdsched.c
$(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
$(CC) -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm
......
#N canvas 315 103 450 300 10;
#N canvas 349 97 450 300 10;
#X msg 52 86 foo bar baz;
#X obj 209 52 osc~ 440;
#X obj 74 211 env~ 8192;
#X floatatom 77 243 5 0 0 0 - - -;
#X obj 285 204 r a;
#X obj 281 232 print a;
#X obj 70 166 pd~ -pddir /home/msp/pd z.pd;
#X connect 0 0 6 0;
#X connect 1 0 6 0;
#X msg 315 81 \; pd dsp 1;
#X obj 70 166 pd~ test.pd;
#X connect 0 0 7 0;
#X connect 1 0 7 0;
#X connect 2 0 3 0;
#X connect 4 0 5 0;
#X connect 6 0 2 0;
#X connect 7 0 2 0;
......@@ -55,7 +55,7 @@ static char pd_tilde_dllextent[] = ".l_i386",
#endif
#endif
#ifdef __APPLE__
static char pd_tilde_dllextent[] = ".d_ppc",
static char pd_tilde_dllextent[] = ".d_fat",
pd_tilde_dllextent2[] = ".pd_darwin";
#endif
......@@ -171,8 +171,12 @@ static void pd_tilde_donew(t_pd_tilde *x, char *pddir, char *schedlibdir,
snprintf(pdexecbuf, MAXPDSTRING, "%s/bin/pd", pddir);
if (stat(pdexecbuf, &statbuf) < 0)
{
ERROR "pd~: can't stat %s", pdexecbuf);
goto fail1;
snprintf(pdexecbuf, MAXPDSTRING, "%s/pd", pddir);
if (stat(pdexecbuf, &statbuf) < 0)
{
ERROR "pd~: can't stat %s", pdexecbuf);
goto fail1;
}
}
snprintf(schedbuf, MAXPDSTRING, "%s/pdsched%s", schedlibdir,
pd_tilde_dllextent);
......@@ -423,9 +427,10 @@ static void *pd_tilde_new(t_symbol *s, int argc, t_atom *argv)
int ninsig = 2, noutsig = 2, j, fifo = 5;
float sr = sys_getsr();
t_sample **g;
t_symbol *pddir = gensym("."),
t_symbol *pddir = sys_guidir,
*scheddir = gensym(class_gethelpdir(pd_tilde_class));
char pdargstring[MAXPDSTRING];
fprintf(stderr, "pd %s, sched %s\n", pddir->s_name, scheddir->s_name);
while (argc > 0)
{
t_symbol *firstarg = atom_getsymbolarg(0, argc, argv);
......@@ -646,16 +651,25 @@ static void *pd_tilde_new(t_symbol *s, long ac, t_atom *av)
}
else break;
}
if (scheddir == gensym(".") && pddir != gensym("."))
{
char *pds = pddir->s_name;
int l = strlen(pds);
if (l >= 4 && (!strcmp(pds+l-3, "bin") || !strcmp(pds+l-4, "bin/")))
snprintf(pdargstring, MAXPDSTRING, "%s/../extra/pd~");
else snprintf(pdargstring, MAXPDSTRING, "%s/extra/pd~");
scheddir = gensym(pdargstring);
}
pdargstring[0] = 0;
while (ac--)
{
char buf[80];
if (av->a_type == A_SYM)
strcat(pdargstring, av->a_w.w_sym->s_name);
strncat(pdargstring, MAXPDSTRING - strlen(pdargstring)-3, av->a_w.w_sym->s_name);
else if (av->a_type == A_LONG)
sprintf(buf+strlen(buf), "%ld", av->a_w.w_long);
snprintf(buf+strlen(buf), MAXPDSTRING - strlen(pdargstring)-3, "%ld", av->a_w.w_long);
else if (av->a_type == A_FLOAT)
sprintf(buf+strlen(buf), "%f", av->a_w.w_float);
snprintf(buf+strlen(buf), MAXPDSTRING - strlen(pdargstring)-3, "%f", av->a_w.w_float);
strcat(buf, " ");
av++;
}
......
#N canvas 643 132 450 300 10;
#X obj 65 58 r foo;
#X obj 62 100 print foo;
#X obj 244 59 adc~;
#X obj 238 102 env~ 8192;
#X floatatom 236 140 5 0 0 0 - - -;
#X obj 145 130 osc~ 440;
#X obj 287 204 stdout;
#X msg 307 153 a b c;
#X msg 307 42 \; pd dsp 1;
#X floatatom 238 173 5 0 0 0 - - -;
#X msg 149 34 a b c;
#X obj 62 157 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 44 187 del 1000;
#X obj 26 249 print bang;
#X obj 59 219 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 155 234 dac~ 1 2 3 4;
#X obj 168 189 sig~ 0.5;
#X connect 0 0 1 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 9 0;
#X connect 7 0 6 0;
#X connect 10 0 1 0;
#X connect 11 0 12 0;
#X connect 12 0 13 0;
#X connect 12 0 14 0;
......@@ -11,7 +11,7 @@ extern "C" {
#define PD_MAJOR_VERSION 0
#define PD_MINOR_VERSION 42
#define PD_BUGFIX_VERSION 0
#define PD_TEST_VERSION "test2"
#define PD_TEST_VERSION "test3"
/* old name for "MSW" flag -- we have to take it for the sake of many old
"nmakefiles" for externs, which will define NT and not MSW */
......
......@@ -50,7 +50,7 @@ int sys_nosleep = 0; /* skip all "sleep" calls and spin instead */
char *sys_guicmd;
t_symbol *sys_libdir;
static t_symbol *sys_guidir;
t_symbol *sys_guidir;
static t_namelist *sys_openlist;
static t_namelist *sys_messagelist;
static int sys_version;
......
......@@ -49,6 +49,7 @@ EXTERN int sys_hostfontsize(int fontsize);
extern int sys_defaultfont;
extern t_symbol *sys_libdir; /* library directory for auxilliary files */
extern t_symbol *sys_guidir; /* directory holding pd_gui (also pd, u_pdsend, etc) */
/* s_loader.c */
int sys_load_lib(t_canvas *canvas, char *filename);
......
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