[PD-cvs] pd/src m_sched.c, 1.5.4.35.2.21.2.13, 1.5.4.35.2.21.2.14 s_loader.c, 1.4.4.5.2.10.2.7, 1.4.4.5.2.10.2.8 s_path.c, 1.3.4.6.2.8.2.9, 1.3.4.6.2.8.2.10
Mathieu Bouchard
matju at users.sourceforge.net
Thu Jul 19 23:08:48 CEST 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15351
Modified Files:
Tag: desiredata
m_sched.c s_loader.c s_path.c
Log Message:
cleanup
Index: s_loader.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v
retrieving revision 1.4.4.5.2.10.2.7
retrieving revision 1.4.4.5.2.10.2.8
diff -C2 -d -r1.4.4.5.2.10.2.7 -r1.4.4.5.2.10.2.8
*** s_loader.c 19 Jul 2007 01:30:16 -0000 1.4.4.5.2.10.2.7
--- s_loader.c 19 Jul 2007 21:08:45 -0000 1.4.4.5.2.10.2.8
***************
*** 15,19 ****
#endif
#ifdef __APPLE__
! #include <mach-o/dyld.h>
#endif
#include <string.h>
--- 15,19 ----
#endif
#ifdef __APPLE__
! #include <mach-o/dyld.h>
#endif
#include <string.h>
***************
*** 56,60 ****
#endif
! /* maintain list of loaded modules to avoid repeating loads */
struct t_loadlist {
t_loadlist *ll_next;
--- 56,60 ----
#endif
! /* maintain list of loaded modules to avoid repeating loads */
struct t_loadlist {
t_loadlist *ll_next;
***************
*** 172,192 ****
/* callback type definition */
typedef int (*t_loader)(t_canvas *canvas, char *classname);
- typedef t_loader loader_t;
/* linked list of loaders */
typedef struct t_loader_queue {
! loader_t loader;
t_loader_queue *next;
! } loader_queue_t;
! static loader_queue_t loaders = {sys_do_load_lib, NULL};
/* register class loader function */
! void sys_register_loader(loader_t loader) {
! loader_queue_t *q = &loaders;
while (1) {
if (q->next) q = q->next;
else {
! q->next = (loader_queue_t *)getbytes(sizeof(loader_queue_t));
q->next->loader = loader;
q->next->next = NULL;
--- 172,191 ----
/* callback type definition */
typedef int (*t_loader)(t_canvas *canvas, char *classname);
/* linked list of loaders */
typedef struct t_loader_queue {
! t_loader loader;
t_loader_queue *next;
! };
! static t_loader_queue loaders = {sys_do_load_lib, NULL};
/* register class loader function */
! void sys_register_loader(t_loader loader) {
! t_loader_queue *q = &loaders;
while (1) {
if (q->next) q = q->next;
else {
! q->next = (t_loader_queue *)getbytes(sizeof(t_loader_queue));
q->next->loader = loader;
q->next->next = NULL;
***************
*** 199,204 ****
int dspstate = canvas_suspend_dsp();
int ok = 0;
! loader_queue_t *q;
! for(q = &loaders; q; q = q->next) if ((ok = q->loader(canvas, classname))) break;
canvas_resume_dsp(dspstate);
return ok;
--- 198,202 ----
int dspstate = canvas_suspend_dsp();
int ok = 0;
! for(t_loader_queue *q = &loaders; q; q = q->next) if ((ok = q->loader(canvas, classname))) break;
canvas_resume_dsp(dspstate);
return ok;
Index: m_sched.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_sched.c,v
retrieving revision 1.5.4.35.2.21.2.13
retrieving revision 1.5.4.35.2.21.2.14
diff -C2 -d -r1.5.4.35.2.21.2.13 -r1.5.4.35.2.21.2.14
*** m_sched.c 10 Jul 2007 06:12:55 -0000 1.5.4.35.2.21.2.13
--- m_sched.c 19 Jul 2007 21:08:45 -0000 1.5.4.35.2.21.2.14
***************
*** 360,367 ****
if (!(idlecount & 31)) {
static double idletime;
! /* on 32nd idle, start a clock watch; every
! 32 ensuing idles, check it */
! if (idlecount == 32)
! idletime = sys_getrealtime();
else if (sys_getrealtime() - idletime > 1.) {
post("audio I/O stuck... closing audio\n");
--- 360,365 ----
if (!(idlecount & 31)) {
static double idletime;
! /* on 32nd idle, start a clock watch; every 32 ensuing idles, check it */
! if (idlecount == 32) idletime = sys_getrealtime();
else if (sys_getrealtime() - idletime > 1.) {
post("audio I/O stuck... closing audio\n");
***************
*** 374,386 ****
}
} else {
! if (1000. * (sys_getrealtime() - sched_referencerealtime)
! > clock_gettimesince(sched_referencelogicaltime))
timeforward = SENDDACS_YES;
else timeforward = SENDDACS_NO;
}
sys_setmiditimediff(0, 1e-6 * sys_schedadvance);
! if (timeforward != SENDDACS_NO) {
! sched_tick(sys_time + sys_time_per_dsp_tick);
! }
if (timeforward == SENDDACS_YES) didsomething = 1;
sys_pollmidiqueue();
--- 372,381 ----
}
} else {
! if (1000. * (sys_getrealtime() - sched_referencerealtime) > clock_gettimesince(sched_referencelogicaltime))
timeforward = SENDDACS_YES;
else timeforward = SENDDACS_NO;
}
sys_setmiditimediff(0, 1e-6 * sys_schedadvance);
! if (timeforward != SENDDACS_NO) sched_tick(sys_time + sys_time_per_dsp_tick);
if (timeforward == SENDDACS_YES) didsomething = 1;
sys_pollmidiqueue();
Index: s_path.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_path.c,v
retrieving revision 1.3.4.6.2.8.2.9
retrieving revision 1.3.4.6.2.8.2.10
diff -C2 -d -r1.3.4.6.2.8.2.9 -r1.3.4.6.2.8.2.10
*** s_path.c 18 Jul 2007 23:55:27 -0000 1.3.4.6.2.8.2.9
--- s_path.c 19 Jul 2007 21:08:46 -0000 1.3.4.6.2.8.2.10
***************
*** 3,14 ****
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
! /*
! * This file implements the loader for linux, which includes
! * a little bit of path handling.
! *
! * Generalized by MSP to provide an open_via_path function
! * and lists of files for all purposes.
! */
!
/* #define DEBUG(x) x */
#define DEBUG(x)
--- 3,8 ----
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
! /* This file implements the loader for linux, which includes a little bit of path handling.
! * Generalized by MSP to provide an open_via_path function and lists of files for all purposes. */
/* #define DEBUG(x) x */
#define DEBUG(x)
***************
*** 267,271 ****
char buf[1000];
char c[MAXPDSTRING];
! int retval = 1; /* that's what we will return at the end; for now, let's think it'll be an error */
/* initialize rc-arg-array so we can safely clean up at the end */
for (i = 1; i < NUMARGS-1; i++) rcargv[i]=0;
--- 261,265 ----
char buf[1000];
char c[MAXPDSTRING];
! int retval = 1; /* that's what we will return at the end; for now, let's think it'll be an error */
/* initialize rc-arg-array so we can safely clean up at the end */
for (i = 1; i < NUMARGS-1; i++) rcargv[i]=0;
***************
*** 322,330 ****
char fname[MAXPDSTRING], *home = getenv("HOME");
// parse a startup file */
! *fname = '\0';
strncat(fname, home? home : ".", MAXPDSTRING-10);
strcat(fname, "/");
strcat(fname, STARTUPNAME);
! return sys_parsercfile(fname);
}
#endif /* MSW */
--- 316,324 ----
char fname[MAXPDSTRING], *home = getenv("HOME");
// parse a startup file */
! *fname = '\0';
strncat(fname, home? home : ".", MAXPDSTRING-10);
strcat(fname, "/");
strcat(fname, STARTUPNAME);
! return sys_parsercfile(fname);
}
#endif /* MSW */
More information about the Pd-cvs
mailing list