Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13024
Modified Files: Tag: desiredata s_inter.c s_main.c Log Message: option -d removed (will be replaced by client-side option)
Index: s_inter.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v retrieving revision 1.5.4.10.2.25.2.7 retrieving revision 1.5.4.10.2.25.2.8 diff -C2 -d -r1.5.4.10.2.25.2.7 -r1.5.4.10.2.25.2.8 *** s_inter.c 3 Dec 2006 00:20:33 -0000 1.5.4.10.2.25.2.7 --- s_inter.c 3 Dec 2006 03:02:25 -0000 1.5.4.10.2.25.2.8 *************** *** 422,427 **** /* this is in a separately called subroutine so that the buffer isn't sitting on the stack while the messages are getting passed. */ ! static int socketreceiver_doread(t_socketreceiver *x) ! { char messbuf[INBUFSIZE], *bp = messbuf; int indx; --- 422,426 ---- /* this is in a separately called subroutine so that the buffer isn't sitting on the stack while the messages are getting passed. */ ! static int socketreceiver_doread(t_socketreceiver *x) { char messbuf[INBUFSIZE], *bp = messbuf; int indx; *************** *** 430,454 **** char *inbuf = x->inbuf; if (intail == inhead) return 0; ! for (indx = intail; indx != inhead; indx = (indx+1)&(INBUFSIZE-1)) ! { ! /* if we hit a semi that isn't preceeded by a , it's a message ! boundary. LATER we should deal with the possibility that the ! preceding \ might itself be escaped! */ char c = *bp++ = inbuf[indx]; ! if (c == ';' && (!indx || inbuf[indx-1] != '\')) ! { intail = (indx+1)&(INBUFSIZE-1); binbuf_text(inbinbuf, messbuf, bp - messbuf); - if (sys_debuglevel & DEBUG_MESSDOWN) - { - write(2, messbuf, bp - messbuf); - write(2, "\n", 1); - } x->inhead = inhead; x->intail = intail; ! return (1); } } ! return (0); }
--- 429,445 ---- char *inbuf = x->inbuf; if (intail == inhead) return 0; ! for (indx = intail; indx != inhead; indx = (indx+1)&(INBUFSIZE-1)) { ! /* ";" not preceded by "" is a message boundary in current syntax. ! in future syntax it might become more complex. */ char c = *bp++ = inbuf[indx]; ! if (c == ';' && (!indx || inbuf[indx-1] != '\')) { intail = (indx+1)&(INBUFSIZE-1); binbuf_text(inbinbuf, messbuf, bp - messbuf); x->inhead = inhead; x->intail = intail; ! return 1; } } ! return 0; }
*************** *** 553,557 **** if (msglen >= self->osize-self->ohead) msglen = self->osize-self->ohead; } - if (sys_debuglevel & DEBUG_MESSUP) fprintf(stderr, "%s", self->obuf+self->ohead); self->ohead += msglen; self->bytessincelastping += msglen; --- 544,547 ----
Index: s_main.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_main.c,v retrieving revision 1.7.4.17.2.22.2.9 retrieving revision 1.7.4.17.2.22.2.10 diff -C2 -d -r1.7.4.17.2.22.2.9 -r1.7.4.17.2.22.2.10 *** s_main.c 3 Dec 2006 02:09:01 -0000 1.7.4.17.2.22.2.9 --- s_main.c 3 Dec 2006 03:02:25 -0000 1.7.4.17.2.22.2.10 *************** *** 54,58 **** #endif /* THREDED_SF */
- int sys_debuglevel; int sys_verbose; int sys_noloadbang; --- 54,57 ---- *************** *** 643,650 **** if (ARG("-verbose",1)) {sys_verbose++; NEXT(1);} if (ARG("-version",1)) {sys_version = 1; NEXT(1);} - if (ARG("-d",2)) { - if (sscanf(argv[1], "%d", &sys_debuglevel)<1) goto usage; - NEXT(2); - } if (ARG("-noloadbang",1)) {sys_noloadbang = 1; NEXT(1);} if (ARG("-nogui",1)) { --- 642,645 ---- *************** *** 700,703 **** --- 695,699 ---- } usage: + if (argc) fprintf(stderr, "Can't handle option '%s'.\n",*argv); for (i = 0; i < sizeof(usagemessage)/sizeof(*usagemessage); i++) fprintf(stderr, "%s", usagemessage[i]);