Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31641
Modified Files: Tag: desiredata kernel.c Log Message: atom_string and atom_ostream do proper quoting of {}"$;, and space
Index: kernel.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/kernel.c,v retrieving revision 1.1.2.60 retrieving revision 1.1.2.61 diff -C2 -d -r1.1.2.60 -r1.1.2.61 *** kernel.c 18 Jul 2007 07:11:40 -0000 1.1.2.60 --- kernel.c 18 Jul 2007 07:37:56 -0000 1.1.2.61 *************** *** 236,240 **** */
! static int should_quote(char *s) {return *s==';' || *s==',' || *s=='\' || (*s=='$' && isdigit(s[1]));}
void atom_ostream(t_atom *a, ostream &buf) { --- 236,241 ---- */
! //static int should_quote(char *s) {return strchr(";,\{}"",*s) || isspace(*s) || (*s=='$' && isdigit(s[1]));} ! static int should_quote(char *s) {return strchr(";,\{}" ",*s) || (*s=='$' && isdigit(s[1]));}
void atom_ostream(t_atom *a, ostream &buf) { *************** *** 246,250 **** case A_SYMBOL: { bool quote=0; ! for (char *sp = a->a_symbol->name; *sp; sp++) if (should_quote(sp)) quote = 1; if (quote) { for (char *sp = a->a_symbol->name; *sp; sp++) { --- 247,251 ---- case A_SYMBOL: { bool quote=0; ! for (char *sp = a->a_symbol->name; *sp; sp++) if (should_quote(sp)) {quote = 1; break;} if (quote) { for (char *sp = a->a_symbol->name; *sp; sp++) {