Update of /cvsroot/pure-data/externals/grill/flext/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28401/source
Modified Files: flatom_pr.cpp Log Message: ""
Index: flatom_pr.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flatom_pr.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** flatom_pr.cpp 21 Jun 2004 13:58:19 -0000 1.18 --- flatom_pr.cpp 18 Sep 2004 04:00:29 -0000 1.19 *************** *** 28,54 **** bool ok = true; if(IsFloat(a)) { ! STD::snprintf(buf,bufsz,"%g",GetFloat(a)); } else if(IsInt(a)) { ! STD::snprintf(buf,bufsz,"%i",GetInt(a)); } else if(IsSymbol(a)) { ! if(!FLEXT_ASSERT(GetSymbol(a))) *buf = 0; ! else ! STD::strncpy(buf,GetString(a),bufsz); } else if(IsPointer(a)) { ! STD::snprintf(buf,bufsz,"%p",GetPointer(a)); } #if FLEXT_SYS == FLEXT_SYS_PD else if(a.a_type == A_DOLLAR) { ! STD::snprintf(buf,bufsz,"$%d",a.a_w.w_index); } else if(a.a_type == A_DOLLSYM) { ! STD::snprintf(buf,bufsz,"$%s",GetString(a)); } #elif FLEXT_SYS == FLEXT_SYS_MAX else if(a.a_type == A_DOLLAR) { ! STD::snprintf(buf,bufsz,"$%d",a.a_w.w_long); } #else --- 28,63 ---- bool ok = true; if(IsFloat(a)) { ! ok = STD::snprintf(buf,bufsz,"%g",GetFloat(a)) > 0; } else if(IsInt(a)) { ! ok = STD::snprintf(buf,bufsz,"%i",GetInt(a)) > 0; } else if(IsSymbol(a)) { ! if(!FLEXT_ASSERT(GetSymbol(a))) ! *buf = 0; ! else { ! const char *c = GetString(a); ! int len = strlen(c); ! if(len < bufsz) { ! memcpy(buf,c,len); buf[len] = 0; ! ok = true; ! } ! else ! ok = false; ! } } else if(IsPointer(a)) { ! ok = STD::snprintf(buf,bufsz,"%p",GetPointer(a)) > 0; } #if FLEXT_SYS == FLEXT_SYS_PD else if(a.a_type == A_DOLLAR) { ! ok = STD::snprintf(buf,bufsz,"$%d",a.a_w.w_index) > 0; } else if(a.a_type == A_DOLLSYM) { ! ok = STD::snprintf(buf,bufsz,"$%s",GetString(a)) > 0; } #elif FLEXT_SYS == FLEXT_SYS_MAX else if(a.a_type == A_DOLLAR) { ! ok = STD::snprintf(buf,bufsz,"$%d",a.a_w.w_long) > 0; } #else