[PD-cvs] pd/src s_audio.c, 1.5.4.16.2.20.2.7, 1.5.4.16.2.20.2.8 s_inter.c, 1.5.4.10.2.25.2.17, 1.5.4.10.2.25.2.18 s_midi.c, 1.4.4.1.2.12.2.6, 1.4.4.1.2.12.2.7
Mathieu Bouchard
matju at users.sourceforge.net
Thu Jun 28 08:21:25 CEST 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18573
Modified Files:
Tag: desiredata
s_audio.c s_inter.c s_midi.c
Log Message:
cleanup
Index: s_inter.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v
retrieving revision 1.5.4.10.2.25.2.17
retrieving revision 1.5.4.10.2.25.2.18
diff -C2 -d -r1.5.4.10.2.25.2.17 -r1.5.4.10.2.25.2.18
*** s_inter.c 28 Jun 2007 05:53:58 -0000 1.5.4.10.2.25.2.17
--- s_inter.c 28 Jun 2007 06:21:23 -0000 1.5.4.10.2.25.2.18
***************
*** 30,36 ****
#include <winsock.h>
#include <windows.h>
! # ifdef _MSC_VER
typedef int pid_t;
! # endif
typedef int socklen_t;
#define EADDRINUSE WSAEADDRINUSE
--- 30,36 ----
#include <winsock.h>
#include <windows.h>
! #ifdef _MSC_VER
typedef int pid_t;
! #endif
typedef int socklen_t;
#define EADDRINUSE WSAEADDRINUSE
***************
*** 129,138 ****
gettimeofday(&now, 0);
if (then.tv_sec == 0 && then.tv_usec == 0) then = now;
! return ((now.tv_sec - then.tv_sec) + (1./1000000.) * (now.tv_usec - then.tv_usec));
#else
LARGE_INTEGER now;
QueryPerformanceCounter(&now);
if (nt_freq == 0) sys_initntclock();
! return (((double)(now.QuadPart - nt_inittime.QuadPart)) / nt_freq);
#endif
}
--- 129,138 ----
gettimeofday(&now, 0);
if (then.tv_sec == 0 && then.tv_usec == 0) then = now;
! return (now.tv_sec - then.tv_sec) + (1./1000000.) * (now.tv_usec - then.tv_usec);
#else
LARGE_INTEGER now;
QueryPerformanceCounter(&now);
if (nt_freq == 0) sys_initntclock();
! return double(now.QuadPart - nt_inittime.QuadPart) / nt_freq;
#endif
}
***************
*** 141,146 ****
struct timeval timout;
int didsomething = 0;
- int i;
- t_fdpoll *fp;
fd_set readset, writeset, exceptset;
timout.tv_sec = 0;
--- 141,144 ----
***************
*** 149,155 ****
FD_ZERO(&readset);
FD_ZERO(&exceptset);
! for (fp = sys_fdpoll, i = sys_nfdpoll; i--; fp++) FD_SET(fp->fdp_fd, &readset);
select(sys_maxfd+1, &readset, &writeset, &exceptset, &timout);
! for (i = 0; i < sys_nfdpoll; i++) if (FD_ISSET(sys_fdpoll[i].fdp_fd, &readset)) {
sys_fdpoll[i].fdp_fn(sys_fdpoll[i].fdp_ptr, sys_fdpoll[i].fdp_fd);
didsomething = 1;
--- 147,154 ----
FD_ZERO(&readset);
FD_ZERO(&exceptset);
! t_fdpoll *fp = sys_fdpoll;
! for (int i=sys_nfdpoll; i--; fp++) FD_SET(fp->fdp_fd, &readset);
select(sys_maxfd+1, &readset, &writeset, &exceptset, &timout);
! for (int i=0; i<sys_nfdpoll; i++) if (FD_ISSET(sys_fdpoll[i].fdp_fd, &readset)) {
sys_fdpoll[i].fdp_fn(sys_fdpoll[i].fdp_ptr, sys_fdpoll[i].fdp_fd);
didsomething = 1;
***************
*** 202,207 ****
action.sa_restorer = 0;
#endif
! if (sigaction(signo, &action, 0) < 0)
! perror("sigaction");
}
--- 201,205 ----
action.sa_restorer = 0;
#endif
! if (sigaction(signo, &action, 0) < 0) perror("sigaction");
}
***************
*** 237,242 ****
gonzo.it_value.tv_sec = 0;
gonzo.it_value.tv_usec = microsec;
! if (microsec)
! sys_signal(SIGALRM, sys_alarmhandler);
else sys_signal(SIGALRM, SIG_IGN);
setitimer(ITIMER_REAL, &gonzo, 0);
--- 235,239 ----
gonzo.it_value.tv_sec = 0;
gonzo.it_value.tv_usec = microsec;
! if (microsec) sys_signal(SIGALRM, sys_alarmhandler);
else sys_signal(SIGALRM, SIG_IGN);
setitimer(ITIMER_REAL, &gonzo, 0);
***************
*** 272,288 ****
#if (_POSIX_MEMLOCK - 0) >= 200112L
! /* tb: force memlock to physical memory { */
! struct rlimit mlock_limit;
! mlock_limit.rlim_cur=0;
! /* tb: only if we are really root we can set the hard limit */
! if (getuid())
! mlock_limit.rlim_max=100;
! else
! mlock_limit.rlim_max=0;
! setrlimit(RLIMIT_MEMLOCK,&mlock_limit);
! /* } tb */
!
! if (mlockall(MCL_FUTURE) != -1)
! fprintf(stderr, "memory locking enabled.\n");
#endif
--- 269,280 ----
#if (_POSIX_MEMLOCK - 0) >= 200112L
! /* tb: force memlock to physical memory { */
! struct rlimit mlock_limit;
! mlock_limit.rlim_cur=0;
! /* tb: only if we are really root we can set the hard limit */
! mlock_limit.rlim_max = getuid() ? 100 : 0;
! setrlimit(RLIMIT_MEMLOCK,&mlock_limit);
! /* } tb */
! if (mlockall(MCL_FUTURE) != -1) fprintf(stderr, "memory locking enabled.\n");
#endif
Index: s_audio.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_audio.c,v
retrieving revision 1.5.4.16.2.20.2.7
retrieving revision 1.5.4.16.2.20.2.8
diff -C2 -d -r1.5.4.16.2.20.2.7 -r1.5.4.16.2.20.2.8
*** s_audio.c 28 Jun 2007 05:26:48 -0000 1.5.4.16.2.20.2.7
--- s_audio.c 28 Jun 2007 06:21:23 -0000 1.5.4.16.2.20.2.8
***************
*** 889,893 ****
if (f < 0) {
int i;
! for (i = 0; i != noutdevs ;++i) SETSYMBOL(argv+i, outdevlist + i * DEVDESCSIZE);
typedmess(pd->s_thing, selector, noutdevs, argv);
} else if (f < noutdevs) {
--- 889,893 ----
if (f < 0) {
int i;
! for (i = 0; i != noutdevs ;++i) SETSYMBOL(argv+i, gensym(outdevlist + i * DEVDESCSIZE));
typedmess(pd->s_thing, selector, noutdevs, argv);
} else if (f < noutdevs) {
Index: s_midi.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_midi.c,v
retrieving revision 1.4.4.1.2.12.2.6
retrieving revision 1.4.4.1.2.12.2.7
diff -C2 -d -r1.4.4.1.2.12.2.6 -r1.4.4.1.2.12.2.7
*** s_midi.c 3 Jan 2007 07:31:58 -0000 1.4.4.1.2.12.2.6
--- s_midi.c 28 Jun 2007 06:21:23 -0000 1.4.4.1.2.12.2.7
***************
*** 535,539 ****
/* start an midi settings dialog window */
void glob_midi_properties(t_pd *dummy, t_floatarg flongform) {
- char buf[1024 + 2 * MAXNDEV*(DEVDESCSIZE+4)];
/* these are the devices you're using: */
int nindev, midiindev[MAXMIDIINDEV];
--- 535,538 ----
More information about the Pd-cvs
mailing list