[PD-cvs] pd/src desire.c, 1.1.2.217.2.175, 1.1.2.217.2.176 desire.h, 1.1.2.49.2.36, 1.1.2.49.2.37 s_inter.c, 1.5.4.10.2.25.2.22, 1.5.4.10.2.25.2.23
Mathieu Bouchard
matju at users.sourceforge.net
Mon Jul 30 18:33:45 CEST 2007
- Previous message: [PD-cvs] pd/src kernel.c, 1.1.2.70, 1.1.2.71 desire.h, 1.1.2.49.2.35, 1.1.2.49.2.36
- Next message: [PD-cvs] externals/hcs/usbhid Makefile, 1.1, 1.2 usbhid-help.pd, 1.2, 1.3 usbhid.c, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31195
Modified Files:
Tag: desiredata
desire.c desire.h s_inter.c
Log Message:
fixed lost console posts at startup
Index: s_inter.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v
retrieving revision 1.5.4.10.2.25.2.22
retrieving revision 1.5.4.10.2.25.2.23
diff -C2 -d -r1.5.4.10.2.25.2.22 -r1.5.4.10.2.25.2.23
*** s_inter.c 14 Jul 2007 00:53:29 -0000 1.5.4.10.2.25.2.22
--- s_inter.c 30 Jul 2007 16:33:43 -0000 1.5.4.10.2.25.2.23
***************
*** 11,14 ****
--- 11,15 ----
#include "desire.h"
#include "pthread.h"
+ #include <sstream>
#ifdef UNISTD
#include <unistd.h>
***************
*** 455,463 ****
int max(int a, int b) { return ((a)>(b)?(a):(b)); }
void sys_vgui(char *fmt, ...) {
t_socketreceiver *self = sys_socketreceiver;
va_list ap;
va_start(ap, fmt);
! if (!self) {fprintf(stderr,"sys_vgui: lost message: "); vfprintf(stderr,fmt,ap); va_end(ap); return;}
if (!self->obuf) {
self->obuf = (char *)malloc(GUI_ALLOCCHUNK);
--- 456,466 ----
int max(int a, int b) { return ((a)>(b)?(a):(b)); }
+ std::ostringstream lost_posts;
+
void sys_vgui(char *fmt, ...) {
t_socketreceiver *self = sys_socketreceiver;
va_list ap;
va_start(ap, fmt);
! if (!self) {voprintf(lost_posts,fmt,ap); va_end(ap); return;}
if (!self->obuf) {
self->obuf = (char *)malloc(GUI_ALLOCCHUNK);
***************
*** 469,476 ****
int msglen = vsnprintf(self->obuf+self->ohead, self->osize-self->ohead, fmt, ap);
va_end(ap);
! if(msglen < 0) {
! fprintf(stderr, "Pd: buffer space wasn't sufficient for long GUI string\n");
! return;
! }
if (msglen >= self->osize - self->ohead) {
int msglen2, newsize = self->osize+1+max(msglen,GUI_ALLOCCHUNK);
--- 472,476 ----
int msglen = vsnprintf(self->obuf+self->ohead, self->osize-self->ohead, fmt, ap);
va_end(ap);
! if(msglen < 0) {fprintf(stderr, "Pd: buffer space wasn't sufficient for long GUI string\n"); return;}
if (msglen >= self->osize - self->ohead) {
int msglen2, newsize = self->osize+1+max(msglen,GUI_ALLOCCHUNK);
Index: desire.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.h,v
retrieving revision 1.1.2.49.2.36
retrieving revision 1.1.2.49.2.37
diff -C2 -d -r1.1.2.49.2.36 -r1.1.2.49.2.37
*** desire.h 30 Jul 2007 16:23:07 -0000 1.1.2.49.2.36
--- desire.h 30 Jul 2007 16:33:43 -0000 1.1.2.49.2.37
***************
*** 332,335 ****
--- 332,336 ----
void oprintf(std::ostream &buf, const char *s, ...);
void voprintf(std::ostream &buf, const char *s, va_list args);
+ EXTERN std::ostringstream lost_posts;
#endif
Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.217.2.175
retrieving revision 1.1.2.217.2.176
diff -C2 -d -r1.1.2.217.2.175 -r1.1.2.217.2.176
*** desire.c 30 Jul 2007 16:00:17 -0000 1.1.2.217.2.175
--- desire.c 30 Jul 2007 16:33:40 -0000 1.1.2.217.2.176
***************
*** 1026,1032 ****
canvas_each(g,x) {
t_object *ob = pd_checkobject(g);
- t_atom *argv;
if (!ob || /* ob->type != T_OBJECT || */ binbuf_getnatom(ob->binbuf) < 2) continue;
! argv = binbuf_getvec(ob->binbuf);
if (argv[0].a_type != A_SYMBOL || argv[1].a_type != A_SYMBOL || argv[0].a_symbol != s1)
continue;
--- 1026,1031 ----
canvas_each(g,x) {
t_object *ob = pd_checkobject(g);
if (!ob || /* ob->type != T_OBJECT || */ binbuf_getnatom(ob->binbuf) < 2) continue;
! t_atom *argv = binbuf_getvec(ob->binbuf);
if (argv[0].a_type != A_SYMBOL || argv[1].a_type != A_SYMBOL || argv[0].a_symbol != s1)
continue;
***************
*** 7195,7199 ****
getcwd(cwd,665);
sys_socketreceiver=netreceive_newest_receiver(sys_netreceive);
! //fprintf(stderr,"sys_socketreceiver=%p\n",sys_socketreceiver);
/* load dynamic libraries specified with "-lib" args */
for (t_namelist *nl=sys_externlist; nl; nl = nl->nl_next)
--- 7194,7198 ----
getcwd(cwd,665);
sys_socketreceiver=netreceive_newest_receiver(sys_netreceive);
! sys_vgui("%s",lost_posts.str().data());
/* load dynamic libraries specified with "-lib" args */
for (t_namelist *nl=sys_externlist; nl; nl = nl->nl_next)
- Previous message: [PD-cvs] pd/src kernel.c, 1.1.2.70, 1.1.2.71 desire.h, 1.1.2.49.2.35, 1.1.2.49.2.36
- Next message: [PD-cvs] externals/hcs/usbhid Makefile, 1.1, 1.2 usbhid-help.pd, 1.2, 1.3 usbhid.c, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Pd-cvs
mailing list