From 18dbae9c9ffe5baa09e220c9f74af2dd7c0aa3f5 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Fri, 1 Aug 2003 02:32:50 +0000 Subject: "" svn path=/trunk/; revision=810 --- externals/grill/flext/source/flatom_pr.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'externals/grill/flext/source/flatom_pr.cpp') diff --git a/externals/grill/flext/source/flatom_pr.cpp b/externals/grill/flext/source/flatom_pr.cpp index e4989320..639bca63 100644 --- a/externals/grill/flext/source/flatom_pr.cpp +++ b/externals/grill/flext/source/flatom_pr.cpp @@ -18,9 +18,23 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include #include +// \TODO take bufsz into account! void flext::PrintAtom(const t_atom &a,char *buf,int bufsz) { - GetAString(a,buf,bufsz?bufsz:100000); + if(IsFloat(a)) { + sprintf(buf,"%g",GetFloat(a)); + } + else if(IsInt(a)) { + sprintf(buf,"%i",GetInt(a)); + } + else if(IsSymbol(a)) { + strcpy(buf,GetString(a)); + } + else if(IsPointer(a)) { + sprintf(buf,"%p",GetPointer(a)); + } + else + ERRINTERNAL(); } bool flext::ScanAtom(t_atom &a,const char *buf) -- cgit v1.2.1