Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10464
Modified Files: Tag: impd_0_37 s_inter.c Log Message: print arrows when using -d option, and such
Index: s_inter.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v retrieving revision 1.1.1.3.2.9.2.1 retrieving revision 1.1.1.3.2.9.2.2 diff -C2 -d -r1.1.1.3.2.9.2.1 -r1.1.1.3.2.9.2.2 *** s_inter.c 28 Mar 2004 15:07:12 -0000 1.1.1.3.2.9.2.1 --- s_inter.c 30 Mar 2004 01:46:27 -0000 1.1.1.3.2.9.2.2 *************** *** 272,277 **** if (sys_debuglevel & DEBUG_MESSDOWN) { ! write(2, messbuf, bp - messbuf); ! write(2, "\n", 1); } x->sr_inhead = inhead; --- 272,276 ---- if (sys_debuglevel & DEBUG_MESSDOWN) { ! fprintf(stderr, "<- %.*s\n", bp - messbuf, messbuf); } x->sr_inhead = inhead; *************** *** 394,397 **** --- 393,409 ---- }
+ /* + static long long cumul=0; + static long count=0; + static struct timeval t0,t1; + gettimeofday(&t0,0); + */ + /* + gettimeofday(&t1,0); + long long delay = (t1.tv_sec-t0.tv_sec)*1000000+(t1.tv_usec-t0.tv_usec); + cumul += delay; + count += 1; + fprintf(stderr,"send() count=%ld, cumul=%lld, delay=%lld\n",count,cumul,delay); + */
void sys_gui(char *s) *************** *** 399,409 **** int length = strlen(s), written = 0, res, histwas = sys_addhist(4); if (sys_debuglevel & DEBUG_MESSUP) ! fprintf(stderr, "%s", s); if (sys_nogui) return; while (1) { ! res = send(sys_guisock, s + written, length, 0); ! if (res < 0) { perror("pd output pipe"); --- 411,427 ---- int length = strlen(s), written = 0, res, histwas = sys_addhist(4); if (sys_debuglevel & DEBUG_MESSUP) ! fprintf(stderr, "-> %s", s); if (sys_nogui) return; while (1) { ! //res = send(sys_guisock, s + written, length, 0); ! ! //fcntl(sys_guisock,F_SETFL,fcntl(sys_guisock,F_GETFL)| O_NONBLOCK); ! res = send(sys_guisock, s + written, length, 0); ! //fcntl(sys_guisock,F_SETFL,fcntl(sys_guisock,F_GETFL)&~O_NONBLOCK); ! if (res<0 && errno==EAGAIN) res=0; ! ! if (res < 0) { perror("pd output pipe"); *************** *** 425,434 **** void sys_vgui(char *fmt, ...) { ! int result, i; char buf[2048]; va_list ap; - va_start(ap, fmt); ! vsprintf(buf, fmt, ap); sys_gui(buf); va_end(ap); --- 443,456 ---- void sys_vgui(char *fmt, ...) { ! int result; ! unsigned n; char buf[2048]; va_list ap; va_start(ap, fmt); ! n = vsnprintf(buf, sizeof(buf), fmt, ap); ! if (n>=sizeof(buf)) { ! fprintf(stderr,"sys_vgui: buffer overflow\n"); ! abort(); ! } sys_gui(buf); va_end(ap); *************** *** 540,545 ****
static int defaultfontshit[] = { ! 8, 5, 9, 10, 6, 10, 12, 7, 13, 14, 9, 17, 16, 10, 19, 24, 15, 28, ! 24, 15, 28};
int sys_startgui(const char *guidir) --- 562,568 ----
static int defaultfontshit[] = { ! 8, 5, 9, 10, 6, 10, 12, 7, 13, 14, 9, 17, ! 16, 10, 19, 24, 15, 28, 24, 15, 28 ! };
int sys_startgui(const char *guidir) *************** *** 602,607 **** #endif SETSYMBOL(zz, gensym(cmdbuf)); ! for (i = 1; i < 22; i++) ! SETFLOAT(zz + i, defaultfontshit[i-1]); SETFLOAT(zz+22,0); glob_initfromgui(0, 0, 23, zz); --- 625,631 ---- #endif SETSYMBOL(zz, gensym(cmdbuf)); ! { ! for (i=1; i<21; i++) SETFLOAT(zz+i+1, defaultfontshit[i]); ! } SETFLOAT(zz+22,0); glob_initfromgui(0, 0, 23, zz); *************** *** 926,931 **** { sys_vgui("exit\n"); ! if (!sys_nogui) close(sys_guisock); sys_bail(0); } --- 950,956 ---- { sys_vgui("exit\n"); ! if (!sys_nogui) { close(sys_guisock); + } sys_bail(0); }