From 7c1400c8524a99103ae7a4e68c0bdcab4aa9bd70 Mon Sep 17 00:00:00 2001 From: akva Date: Tue, 7 Jun 2011 17:56:46 +0000 Subject: [PATCH] added: use the given extension for multi-vtf(x) output git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@1041 e10b68d5-8a6e-419e-a041-bce267b0401d --- Apps/HDF5toVTF/HDF5toVTF.C | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Apps/HDF5toVTF/HDF5toVTF.C b/Apps/HDF5toVTF/HDF5toVTF.C index 57433c13..ec811c73 100644 --- a/Apps/HDF5toVTF/HDF5toVTF.C +++ b/Apps/HDF5toVTF/HDF5toVTF.C @@ -169,16 +169,15 @@ int main (int argc, char** argv) <<"\t"<< it->basis << std::endl; } } - ProcessList::const_iterator pit = processlist.begin(); for (int j = 1; pit != processlist.end(); ++pit, ++j) { std::string vtf = vtffile; if (processlist.size() > 1) { - std::string temp(strtok(vtffile,".")); + std::string temp(vtf.substr(0,vtf.find_last_of('.'))); std::stringstream str; str <<"-"<< j; temp.append(str.str()); - vtf = temp+".vtf"; + vtf = temp+vtf.substr(vtf.find_last_of('.'));; } // This is broken with time dependent geometries.