Update of /cvsroot/pure-data/externals/zexy/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14551
Modified Files: msgfile.c Log Message: added the "$$" method also for reading (though not strictly necessary); removed (#if 0) clauses
Index: msgfile.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/msgfile.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** msgfile.c 27 Jun 2006 16:44:42 -0000 1.13 --- msgfile.c 5 Jul 2006 15:14:50 -0000 1.14 *************** *** 535,538 **** --- 535,539 ----
t_binbuf *bbuf = binbuf_new(); + int dollarmode = 0;
*************** *** 556,559 **** --- 557,563 ---- } else if (gensym("pd")==format) { mode = PD_MODE; + } else if(gensym("$$")==format) { + mode = PD_MODE; + dollarmode=1; } else if (*format->s_name) error("msgfile_read: unknown flag: %s", format->s_name); *************** *** 614,617 **** --- 618,623 ---- *cbb++=';';pos++; *cbb='\n'; + } else if (dollarmode && (bufptr[0]=='\' && bufptr[1]=='$')) { + *cbb='$'; } else { *************** *** 623,634 **** pos++; } ! #if 0 ! // if(';'==cbb[-1])cbb[-1]=0; ! pos--; ! while(pos>0&&('\n'==charbinbuf[pos]||';'==charbinbuf[pos]||' '==charbinbuf[pos])){ ! charbinbuf[pos]=0; ! pos--; ! } ! #endif /* convert to binbuf */ binbuf_text(bbuf, charbinbuf, length+MSGFILE_HEADROOM); --- 629,633 ---- pos++; } ! /* convert to binbuf */ binbuf_text(bbuf, charbinbuf, length+MSGFILE_HEADROOM); *************** *** 670,686 **** buf, MAXPDSTRING);
- #if 0 - if (!strcmp(format->s_name, "cr")) { - mode = CR_MODE; - } else if (!strcmp(format->s_name, "csv")) { - mode = CSV_MODE; - } else if (!strcmp(format->s_name, "pd")) { - mode = PD_MODE; - } else if (*format->s_name) - error("msgfile_write: unknown flag: %s", format->s_name); - #else if(gensym("cr")==format) { mode = CR_MODE; ! } else if(gensym("cvs")==format) { mode = CSV_MODE; } else if(gensym("pd")==format) { --- 669,675 ---- buf, MAXPDSTRING);
if(gensym("cr")==format) { mode = CR_MODE; ! } else if(gensym("csv")==format) { mode = CSV_MODE; } else if(gensym("pd")==format) { *************** *** 693,699 **** }
- - #endif - switch (mode) { case CR_MODE: --- 682,685 ----