Update of /cvsroot/pure-data/externals/iem/pdoctave In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4433
Modified Files: write_shared_mem.cc Log Message: fix to send/receive symbols
Index: write_shared_mem.cc =================================================================== RCS file: /cvsroot/pure-data/externals/iem/pdoctave/write_shared_mem.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** write_shared_mem.cc 22 Feb 2006 12:48:15 -0000 1.1 --- write_shared_mem.cc 24 Mar 2006 21:44:48 -0000 1.2 *************** *** 37,43 **** *f = (float) d; } ! void writeOctStringIntoString (char *s, char *c) { ! strcpy (s,c); }
--- 37,43 ---- *f = (float) d; } ! void writeOctStringIntoString (char *dst, char *src) { ! strcpy (dst, src); }
*************** *** 66,69 **** --- 66,80 ---- if (args(0).is_string()) { pdtype = SYMBOL; + size = args(0).string_value().size(); + if (data = newSharedData (sdf, size, sizeof(char),pdtype)) { + writeOctStringIntoString( (char*)data, (char*)args(0).string_value().c_str() ); + } + else { + error("failed to get new data memory!"); + unBlockForWriting (sdf); + freeSharedDataFrame (&sdf); + return octave_value(); + } + } else if (args(0).is_real_matrix()) {