[Semsdev] r1397 - trunk/apps/dsm

sayer at mail.berlios.de sayer at mail.berlios.de
Wed May 20 17:45:28 CEST 2009


Author: sayer
Date: 2009-05-20 17:45:27 +0200 (Wed, 20 May 2009)
New Revision: 1397

Modified:
   trunk/apps/dsm/DSM.cpp
Log:
avoid extra '' for array members from printf

Modified: trunk/apps/dsm/DSM.cpp
===================================================================
--- trunk/apps/dsm/DSM.cpp	2009-05-20 00:24:29 UTC (rev 1396)
+++ trunk/apps/dsm/DSM.cpp	2009-05-20 15:45:27 UTC (rev 1397)
@@ -181,7 +181,7 @@
       }
     }
   }
-  // TODO: pass preloaded mods to chart reader
+  // todo: pass preloaded mods to chart reader
 
   string LoadDiags = cfg.getParameter("load_diags");
   vector<string> diags_names = explode(LoadDiags, ",");
@@ -272,7 +272,10 @@
     else if (it->second.getType() == AmArg::Array) {
       vars[it->first+"_size"] = int2str(it->second.size());
       for (size_t i=0;i<it->second.size();i++) {
-	vars[it->first+"_"+int2str(i)] = AmArg::print(it->second.get(i));
+	if (it->second.get(i).getType() == AmArg::CStr)
+	  vars[it->first+"_"+int2str(i)] = it->second.get(i).asCStr();
+	else
+	  vars[it->first+"_"+int2str(i)] = AmArg::print(it->second.get(i));
       }
     } else {
       vars[it->first] = AmArg::print(it->second);	



More information about the Semsdev mailing list