Update of /cvsroot/pure-data/externals/grill/pool/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29640/source
Modified Files: pool.cpp Log Message: more symbol escaping better method for discriminating numbers and symbols - by Frank Barknecht
Index: pool.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/pool/source/pool.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** pool.cpp 19 Apr 2005 13:28:13 -0000 1.16 --- pool.cpp 19 Apr 2005 20:55:56 -0000 1.17 *************** *** 515,519 **** --- 515,526 ---- float fres; // first try float + #if 0 if(!issymbol && sscanf(tmp,"%f",&fres) == 1) { + #else + char *endp; + // see if it's a float - thanks to Frank Barknecht + fres = (float)strtod(tmp,&endp); + if(!issymbol && !*endp && endp != tmp) { + #endif if(a) { int ires = (int)fres; // try a cast