Commit 8a749798 by Francois Gygi

Merge branch 'develop'

parents cbc544e2 2fdf0564
......@@ -179,14 +179,19 @@ void Function3d::write(string filename) const
void Function3d::print(ostream& os) const
{
Base64Transcoder xcdr;
#if PLT_BIG_ENDIAN
xcdr.byteswap_double(val.size(),&val[0]);
#endif
// transform val to base64 encoding
int nbytes = val.size() * sizeof(double);
int nchars = xcdr.nchars(nbytes);
char *wbuf = new char[nchars];
#if PLT_BIG_ENDIAN
// make copy of val for byte swapping without affecting original array
vector<double> tmpval(val);
xcdr.byteswap_double(tmpval.size(),&tmpval[0]);
// transform tmpval to base64 encoding
xcdr.encode(nbytes, (byte *) &tmpval[0], wbuf);
#else
// transform val to base64 encoding
xcdr.encode(nbytes, (byte *) &val[0], wbuf);
#endif
os <<"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
<<"<fpmd:function3d xmlns:fpmd=\""
......
......@@ -37,7 +37,7 @@ class Vext : public Var
int set ( int argc, char **argv )
{
if ( argc > 3 )
if ( argc > 2 )
{
if ( ui->onpe0() )
cout << " vext takes only one value" << endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment