Update of /cvsroot/pure-data/externals/zexy/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30605/src
Modified Files: msgfile.c Log Message: added a new writing mode: '$$' which converts occurences of "$$" to "$", in order to be able to write pd-patches which make use of arguments
Index: msgfile.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/msgfile.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** msgfile.c 8 Jun 2006 10:45:04 -0000 1.12 --- msgfile.c 27 Jun 2006 16:44:42 -0000 1.13 *************** *** 654,657 **** --- 654,659 ---- int mode = x->mode;
+ int dollarmode = 0; + FILE *f=0;
*************** *** 668,671 **** --- 670,674 ---- buf, MAXPDSTRING);
+ #if 0 if (!strcmp(format->s_name, "cr")) { mode = CR_MODE; *************** *** 676,679 **** --- 679,698 ---- } 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) { + mode = PD_MODE; + } else if(gensym("$$")==format) { + mode = PD_MODE; + dollarmode=1; + } else if(format&&format->s_name) { + error("msgfile_write: ignoring unknown flag: %s", format->s_name); + } + + + #endif
switch (mode) { *************** *** 697,705 ****
while(i--) { ! if (*dumtext==' ') *dumtext=separator; ! if ((*dumtext==';') && (dumtext[1]=='\n')) *dumtext = eol; dumtext++; } ! /* open */ sys_bashfilename(filename->s_name, filnam); --- 716,728 ----
while(i--) { ! if (*dumtext==' ') ! *dumtext=separator; ! else if ((*dumtext==';') && (dumtext[1]=='\n')) ! *dumtext = eol; ! else if(dollarmode && (*dumtext=='$') && (dumtext[1]=='$')) ! *dumtext='\'; dumtext++; } ! /* open */ sys_bashfilename(filename->s_name, filnam); *************** *** 788,791 **** --- 811,815 ---- x->eol=' '; x->separator=','; + return (x); }