Index: /issm/trunk-jpl/src/c/Container/DataSet.cpp
===================================================================
--- /issm/trunk-jpl/src/c/Container/DataSet.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/Container/DataSet.cpp	(revision 12515)
@@ -135,5 +135,5 @@
 	if(this==NULL)_error2_("trying to echo a NULL dataset");
 
-	_printf_(true,"DataSet echo: %i objects\n",objects.size());
+	if(true) _pprintLine_("DataSet echo: " << objects.size() << " objects");
 
 	for ( object=objects.begin() ; object < objects.end(); object++ ){
@@ -152,5 +152,5 @@
 	if(this==NULL)_error2_("trying to echo a NULL dataset");
 
-	_printf_(true,"DataSet echo: %i objects\n",objects.size());
+	if(true) _pprintLine_("DataSet echo: " << objects.size() << " objects");
 
 	for ( object=objects.begin() ; object < objects.end(); object++ ){
Index: /issm/trunk-jpl/src/c/Container/Observations.cpp
===================================================================
--- /issm/trunk-jpl/src/c/Container/Observations.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/Container/Observations.cpp	(revision 12515)
@@ -73,5 +73,5 @@
 
 	/*Initialize Quadtree*/
-	_printf_(true,"Generating quadtree with a maximum box size %g (depth=%i)... ",minlength,maxdepth);
+	if(true) _pprintString_("Generating quadtree with a maximum box size " << minlength << " (depth=" << maxdepth << ")... ");
 	this->quadtree = new Quadtree(xmin,xmax,ymin,ymax,maxdepth);
 
@@ -103,7 +103,7 @@
 		}
 	}
-	_printf_(true,"done\n");
-	_printf_(true,"Initial number of observations: %i\n",n);
-	_printf_(true,"  Final number of observations: %i\n",this->quadtree->NbObs);
+	if(true) _pprintLine_("done");
+	if(true) _pprintLine_("Initial number of observations: " << n);
+	if(true) _pprintLine_("  Final number of observations: " << this->quadtree->NbObs);
 }
 /*}}}*/
Index: /issm/trunk-jpl/src/c/matlab/io/OptionParse.cpp
===================================================================
--- /issm/trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 12515)
@@ -176,5 +176,5 @@
 	else if(mxIsClass(prhs[0],"cell"))    option=(Option*)OptionCellParse(name,prhs);
 	else {
-		_printf_(true,"  Converting value of option \"%s\" from unrecognized class \"%s\" to class \"%s\".\n",name,mxGetClassName(prhs[0]),"struct");
+		if(true) _pprintLine_("  Converting value of option \"" << name << "\" from unrecognized class \"" << mxGetClassName(prhs[0]) << "\" to class \"" << "struct" << "\".");
 		if (!mexCallMATLAB(1,lhs,1,(mxArray**)prhs,"struct")) {
 			option=(Option*)OptionStructParse(name,(const mxArray**)lhs);
Index: /issm/trunk-jpl/src/c/modules/ConfigureObjectsx/ConfigureObjectsx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ConfigureObjectsx/ConfigureObjectsx.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/ConfigureObjectsx/ConfigureObjectsx.cpp	(revision 12515)
@@ -25,10 +25,10 @@
 	parameters->FindParam(&configuration_type,ConfigurationTypeEnum);
 	
-	_printf_(VerboseMProcessor(),"      Configuring elements...\n");
+	if(VerboseMProcessor()) _pprintLine_("      Configuring elements...");
 	for (i=0;i<elements->Size();i++){
 		element=(Element*)elements->GetObjectByOffset(i);
 		element->Configure(elements,loads,nodes,materials,parameters);
 	}
-	_printf_(VerboseMProcessor(),"      Configuring loads...\n");
+	if(VerboseMProcessor()) _pprintLine_("      Configuring loads...");
 	for (i=0;i<loads->Size();i++){
 		load=(Load*)loads->GetObjectByOffset(i);
@@ -37,5 +37,5 @@
 		}
 	}
-	_printf_(VerboseMProcessor(),"      Configuring nodes...\n");
+	if(VerboseMProcessor()) _pprintLine_("      Configuring nodes...");
 	for (i=0;i<nodes->Size();i++){
 		node=(Node*)nodes->GetObjectByOffset(i);
@@ -45,5 +45,5 @@
 	}
 	
-	_printf_(VerboseMProcessor(),"      Configuring materials...\n");
+	if(VerboseMProcessor()) _pprintLine_("      Configuring materials...");
 	for (i=0;i<materials->Size();i++){
 		material=(Material*)materials->GetObjectByOffset(i);
Index: /issm/trunk-jpl/src/c/modules/ConstraintsStatex/ConstraintsStatex.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ConstraintsStatex/ConstraintsStatex.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/ConstraintsStatex/ConstraintsStatex.cpp	(revision 12515)
@@ -25,5 +25,5 @@
 
 	/*Display message*/
-	_printf_(VerboseModule(),"   Constraining penalties\n");
+	if(VerboseModule()) _pprintLine_("   Constraining penalties");
 
 	/*recover parameters: */
Index: /issm/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp	(revision 12515)
@@ -56,5 +56,5 @@
 	}
 	else if(num_unstable_constraints<=min_mechanical_constraints){
-		_printf_(VerboseModule(),"   freezing constraints\n");
+		if(VerboseModule()) _pprintLine_("   freezing constraints");
 		RiftFreezeConstraints(loads,configuration_type);
 	}
Index: /issm/trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp	(revision 12515)
@@ -53,5 +53,5 @@
 	/*synchronize all cpus, as CPU 0 is probably late (it is starting the entire dakota strategy!) : */
 	MPI_Barrier(MPI_COMM_WORLD);
-	_printf_(VerboseQmu(),"qmu iteration: %i\n",counter);
+	if(VerboseQmu()) _pprintLine_("qmu iteration: " << counter);
 	
 	/*retrieve parameters: */
@@ -67,5 +67,5 @@
 
 	/*Determine solution sequence: */
-	_printf_(VerboseQmu(),"%s%s%s\n","Starting ",EnumToStringx(solution_type)," core:");
+	if(VerboseQmu()) _pprintLine_("" << "Starting " << EnumToStringx(solution_type) << " core:");
 	CorePointerFromSolutionEnum(&solutioncore,femmodel->parameters,solution_type);
 	#ifdef _HAVE_CONTROL_
@@ -79,5 +79,5 @@
 
 	/*compute responses: */
-	_printf_(VerboseQmu(),"compute dakota responses:\n");
+	if(VerboseQmu()) _pprintLine_("compute dakota responses:");
 	DakotaResponsesx(d_responses,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,responses_descriptors,numresponsedescriptors,d_numresponses);
 	
Index: /issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 12515)
@@ -50,5 +50,5 @@
 	clock0=clock();
 	time0 =time(NULL);
-	_printf_(true,"\nExp2Kmlx Module -- %s",ctime(&time0));
+	if(true) _pprintString_("\nExp2Kmlx Module -- " << ctime(&time0));
 
 	/*read exp file  */
@@ -56,5 +56,5 @@
 	if (!DomainOutlineRead(&nprof,&pnvert,&pprofx,&pprofy,&closed,filexp))
 		_error2_("Error reading exp file.");
-	_printf_(true,"Exp2Kmlx -- Reading %d exp profiles from file \"%s\".\n",nprof,filexp);
+	if(true) _pprintLine_("Exp2Kmlx -- Reading " << nprof << " exp profiles from file \"" << filexp << "\".");
 //	for (i=0; i<nprof; i++)
 //		_printLine_("i=" << i << "; nvert=" << pnvert[i] << ", closed=" << closed[i]);
@@ -121,5 +121,5 @@
 
 	if (holes && nprof && (pnvert[0] <= 1 || pprofx[0][pnvert[0]-1] != pprofx[0][0] || pprofy[0][pnvert[0]-1] != pprofy[0][0])) {
-		_printf_(true,"Warning -- Outer profile is not closed, so \"holes\" option will be ignored.\n");
+		if(true) _pprintLine_("Warning -- Outer profile is not closed, so \"holes\" option will be ignored.");
 		holes=false;
 	}
@@ -153,5 +153,5 @@
 		for (i=1; i<nprof; i++) {
 			if (pnvert[i] <= 1 || pprofx[i][pnvert[i]-1] != pprofx[i][0] || pprofy[i][pnvert[i]-1] != pprofy[i][0]) {
-				_printf_(true,"Warning -- Inner profile %d is not closed with \"holes\" specified, so it will be ignored.\n",i+1);
+				if(true) _pprintLine_("Warning -- Inner profile " << i+1 << " is not closed with \"holes\" specified, so it will be ignored.");
 				continue;
 			}
@@ -275,5 +275,5 @@
 /*  write kml file  */
 
-	_printf_(true,"Exp2Kmlx -- Writing kml document to file \"%s\".\n",filkml);
+	if(true) _pprintLine_("Exp2Kmlx -- Writing kml document to file \"" << filkml << "\".");
 	fid=fopen(filkml,"w");
 	fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
Index: /issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 12515)
@@ -20,5 +20,5 @@
 	Element* element                          = NULL;
 	
-	_printf_(VerboseModule(),"   Migrating grounding line\n");
+	if(VerboseModule()) _pprintLine_("   Migrating grounding line");
 	
 	/*retrieve parameters: */
@@ -158,5 +158,5 @@
 		#ifdef _HAVE_MPI_
 		MPI_Allreduce(&local_nflipped,&nflipped,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
-		_printf_(VerboseConvergence(),"   Additional number of vertices allowed to unground: %i\n",nflipped);
+		if(VerboseConvergence()) _pprintLine_("   Additional number of vertices allowed to unground: " << nflipped);
 		#else
 		nflipped=local_nflipped;
Index: /issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 12515)
@@ -34,5 +34,5 @@
 	num_notconverged=total_notconverged;
 	#endif
-	_printf_(VerboseConvergence(),"      #elements above convergence criterion = %i\n",num_notconverged);
+	if(VerboseConvergence()) _pprintLine_("      #elements above convergence criterion = " << num_notconverged);
 
 	/*Free ressources:*/
Index: /issm/trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp	(revision 12515)
@@ -21,5 +21,5 @@
 	clock0=clock();
 	time0 =time(NULL);
-	_printf_(true,"\nKMLFileReadx Module -- %s",ctime(&time0));
+	if(true) _pprintString_("\nKMLFileReadx Module -- " << ctime(&time0));
 
 /*  read kml file  */
@@ -43,15 +43,15 @@
 		}
 
-//		_printf_(true,"%s\n",kstr);
+//		if(true) _pprintLine_("" << kstr);
 		xDelete<char>(kstr);
 	}
 
 	if (kxml) {
-		_printf_(true,"XML declaration:\n");
+		if(true) _pprintLine_("XML declaration:");
 		kxml->DeepEcho("  ");
 		delete kxml;
 	}
 	if (kdtd) {
-		_printf_(true,"DTD declaration (not yet implemented):\n");
+		if(true) _pprintLine_("DTD declaration (not yet implemented):");
 		kdtd->DeepEcho("  ");
 		delete kdtd;
Index: /issm/trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp	(revision 12515)
@@ -29,5 +29,5 @@
 	clock0=clock();
 	time0 =time(NULL);
-	_printf_(true,"\nKMLMeshWritex Module -- %s",ctime(&time0));
+	if(true) _pprintString_("\nKMLMeshWritex Module -- " << ctime(&time0));
 
 /*  construct kml document  */
@@ -83,5 +83,5 @@
 
 	if (cmap) {
-		_printf_(true,"Writing %d Matlab colors as KML style templates.\n",mcmap);
+		if(true) _pprintLine_("Writing " << mcmap << " Matlab colors as KML style templates.");
 		ipt=0;
 		for (i=0; i<mcmap; i++) {
@@ -118,5 +118,5 @@
 
 	if (!nodecon) {
-		_printf_(true,"Creating the node connectivity table.\n");
+		if(true) _pprintLine_("Creating the node connectivity table.");
 		nncon=mxepg+1;
 		nodecon=xNewZeroInit<int>(mncon*nncon);
@@ -149,5 +149,5 @@
 
 		else if (mdata == mncon) {
-			_printf_(true,"Averaging nodal data to element data.\n");
+			if(true) _pprintLine_("Averaging nodal data to element data.");
 			edata=xNewZeroInit<double>(melem*ndata);
 			edfree=true;
@@ -193,5 +193,5 @@
 /*  write kml file  */
 
-	_printf_(true,"Writing kml document to file.\n");
+	if(true) _pprintLine_("Writing kml document to file.");
 	fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
 	fprintf(fid,"<kml xmlns=\"http://www.opengis.net/kml/2.2\">\n");
@@ -203,5 +203,5 @@
 			 ((double)(clock0b-clock0a))/CLOCKS_PER_SEC,difftime(time0b,time0a));
 
-	_printf_(true,"Deleting kml document.\n");
+	if(true) _pprintLine_("Deleting kml document.");
 	delete kdoc;
 	clock0c=clock();
@@ -304,5 +304,5 @@
 /*  write each element as a polygon placemark  */
 
-	_printf_(true,"Writing %d tria elements as KML polygons.\n",melem);
+	if(true) _pprintLine_("Writing " << melem << " tria elements as KML polygons.");
 
 	for (i=0; i<melem; i++) {
@@ -356,7 +356,7 @@
 
 //		if (!(int)fmod((double)(i+1),1000))
-//			_printf_(true,"  %d tria elements written.\n",(i+1));
+//			if(true) _pprintLine_("  " << (i+1) << " tria elements written.");
 	}
-	_printf_(true,"  %d tria elements written.\n",melem);
+	if(true) _pprintLine_("  " << melem << " tria elements written.");
 
 	return(kfold);
Index: /issm/trunk-jpl/src/c/modules/KMLOverlayx/KMLOverlayx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/KMLOverlayx/KMLOverlayx.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/KMLOverlayx/KMLOverlayx.cpp	(revision 12515)
@@ -28,5 +28,5 @@
 	clock0=clock();
 	time0 =time(NULL);
-	_printf_(true,"\nKMLOverlayx Module -- %s",ctime(&time0));
+	if(true) _pprintString_("\nKMLOverlayx Module -- " << ctime(&time0));
 
 /*  construct kml file  */
@@ -82,5 +82,5 @@
 /*  write kml file  */
 
-	_printf_(true,"Writing kml document to file.\n");
+	if(true) _pprintLine_("Writing kml document to file.");
 	fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
 	kfile->Write(fid,indent);
Index: /issm/trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp	(revision 12515)
@@ -38,5 +38,5 @@
 	clock0=clock();
 	time0 =time(NULL);
-	_printf_(true,"\nKml2Expx Module -- %s",ctime(&time0));
+	if(true) _pprintString_("\nKml2Expx Module -- " << ctime(&time0));
 
 /*  read kml file  */
@@ -49,5 +49,5 @@
 /*  open exp file  */
 
-	_printf_(true,"Writing exp profiles to file.\n");
+	if(true) _pprintLine_("Writing exp profiles to file.");
 	fido=fopen(filexp,"w");
 
Index: /issm/trunk-jpl/src/c/modules/Ll2xyx/Ll2xyx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/Ll2xyx/Ll2xyx.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/Ll2xyx/Ll2xyx.cpp	(revision 12515)
@@ -116,10 +116,10 @@
 		*pdelta= 45;
 		*pslat = 70;
-		_printf_(flag,"Info: creating coordinates in polar stereographic (Std Latitude: 70N Meridian: 45).\n");
+		if(flag) _pprintLine_("Info: creating coordinates in polar stereographic (Std Latitude: 70N Meridian: 45).");
 	}
 	else if (sgn == -1) {
 		*pdelta= 0;
 		*pslat = 71;
-		_printf_(flag,"Info: creating coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).\n");
+		if(flag) _pprintLine_("Info: creating coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).");
 	}
 	else _error2_("Sign should be either +1 or -1.\n");
Index: /issm/trunk-jpl/src/c/modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp	(revision 12515)
@@ -17,5 +17,5 @@
 
 	/*Display message*/
-	_printf_(VerboseModule(),"   Merging solution vector from fset to gset\n");
+	if(VerboseModule()) _pprintLine_("   Merging solution vector from fset to gset");
 
 	/*first, get gsize, fsize and ssize: */
Index: /issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp	(revision 12515)
@@ -68,5 +68,5 @@
 		if(solution_type==SteadystateSolutionEnum && analysis_type==EnthalpyAnalysisEnum && isenthalpy==false) continue;
 	
-		_printf_(VerboseMProcessor(),"   creating datasets for analysis %s\n",EnumToStringx(analysis_type));
+		if(VerboseMProcessor()) _pprintLine_("   creating datasets for analysis " << EnumToStringx(analysis_type));
 		CreateDataSets(&elements,&nodes,&vertices,&materials,&constraints,&loads,&parameters,iomodel,solution_type,analysis_type,nummodels,i);
 	}
Index: /issm/trunk-jpl/src/c/modules/Reduceloadx/Reduceloadx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/Reduceloadx/Reduceloadx.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/Reduceloadx/Reduceloadx.cpp	(revision 12515)
@@ -22,5 +22,5 @@
 	int         verbose;
 
-	_printf_(VerboseModule(),"   Dirichlet lifting applied to load vector\n");
+	if(VerboseModule()) _pprintLine_("   Dirichlet lifting applied to load vector");
 
 	Kfs->GetSize(&global_m,&global_n);
Index: /issm/trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp	(revision 12515)
@@ -22,5 +22,5 @@
 
 	/*Display message*/
-	_printf_(VerboseModule(),"   Resetting penalties\n");
+	if(VerboseModule()) _pprintLine_("   Resetting penalties");
 
 	/*recover parameters: */
Index: /issm/trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp	(revision 12515)
@@ -68,5 +68,5 @@
 	clock0=clock();
 	time0 =time(NULL);
-	_printf_(true,"\nShp2Kmlx Module -- %s",ctime(&time0));
+	if(true) _pprintString_("\nShp2Kmlx Module -- " << ctime(&time0));
 
 /*  note that much of the following code is taken from shpdump.c in shapelib.  */
@@ -573,5 +573,5 @@
 /*  write kml file  */
 
-	_printf_(true,"Writing kml document to file.\n");
+	if(true) _pprintLine_("Writing kml document to file.");
 	fid=fopen(filkml,"w");
 	fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
Index: /issm/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 12515)
@@ -44,5 +44,5 @@
 
 	/*Display message*/
-	_printf_(VerboseModule(),"   Solving\n");
+	if(VerboseModule()) _pprintLine_("   Solving");
 	#if _PETSC_MAJOR_ < 3 || (_PETSC_MAJOR_ == 3 && _PETSC_MINOR_ < 2)
 	if(VerboseSolver())PetscOptionsPrint(stdout);
Index: /issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp	(revision 12515)
@@ -28,5 +28,5 @@
 
 	/*Display message*/
-	_printf_(VerboseModule(),"   Generating matrices\n");
+	if(VerboseModule()) _pprintLine_("   Generating matrices");
 
 	/*retrive parameters: */
Index: /issm/trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp	(revision 12515)
@@ -22,5 +22,5 @@
 
 	/*start module: */
-	_printf_(VerboseModule(),"%s%g\n","   Updating constraints for time: ",time);
+	if(VerboseModule()) _pprintLine_("" << "   Updating constraints for time: " << time);
 	
 	/*First, update dof constraints in nodes, using constraints: */
Index: /issm/trunk-jpl/src/c/modules/Xy2llx/Xy2llx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/Xy2llx/Xy2llx.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/modules/Xy2llx/Xy2llx.cpp	(revision 12515)
@@ -124,10 +124,10 @@
 		*pdelta= 45;
 		*pslat = 70;
-		_printf_(flag,"Warning: expecting coordinates in polar stereographic (Std Latitude: 70N Meridian: 45).\n");
+		if(flag) _pprintLine_("Warning: expecting coordinates in polar stereographic (Std Latitude: 70N Meridian: 45).");
 	}
 	else if (sgn == -1) {
 		*pdelta= 0;
 		*pslat = 71;
-		_printf_(flag,"Warning: expecting coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).\n");
+		if(flag) _pprintLine_("Warning: expecting coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).");
 	}
 	else _error2_("Sign should be either +1 or -1.\n");
Index: /issm/trunk-jpl/src/c/objects/FemModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/FemModel.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/FemModel.cpp	(revision 12515)
@@ -50,20 +50,20 @@
 	for(i=0;i<nummodels;i++){
 
-		_printf_(VerboseMProcessor(),"   Processing finite element model of analysis %s:\n",EnumToStringx(analysis_type_list[i]));
+		if(VerboseMProcessor()) _pprintLine_("   Processing finite element model of analysis " << EnumToStringx(analysis_type_list[i]) << ":");
 		analysis_type=analysis_type_list[i];
 		this->SetCurrentConfiguration(analysis_type);
 	
 		if(i==0){
-			_printf_(VerboseMProcessor(),"      creating vertex degrees of freedom\n");
+			if(VerboseMProcessor()) _pprintLine_("      creating vertex degrees of freedom");
 			VerticesDofx(vertices,parameters); //only call once, we only have one set of vertices
 		}
 
-		_printf_(VerboseMProcessor(),"      resolving node constraints\n");
+		if(VerboseMProcessor()) _pprintLine_("      resolving node constraints");
 		SpcNodesx(nodes,constraints,parameters,analysis_type); 
 
-		_printf_(VerboseMProcessor(),"      creating nodal degrees of freedom\n");
+		if(VerboseMProcessor()) _pprintLine_("      creating nodal degrees of freedom");
 		NodesDofx(nodes,parameters,analysis_type);
 	
-		_printf_(VerboseMProcessor(),"      configuring element and loads\n");
+		if(VerboseMProcessor()) _pprintLine_("      configuring element and loads");
 		ConfigureObjectsx(elements, loads, nodes, vertices, materials,parameters);
 	}
@@ -145,5 +145,5 @@
 	if(this->parameters->Exist(PetscOptionsStringsEnum)){
 		PetscOptionsFromAnalysis(this->parameters,analysis_type);
-		_printf_(VerboseSolver(),"      petsc Options set for analysis type: %s\n",EnumToStringx(analysis_type));
+		if(VerboseSolver()) _pprintLine_("      petsc Options set for analysis type: " << EnumToStringx(analysis_type));
 	}
 	#endif
Index: /issm/trunk-jpl/src/c/objects/IoModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/IoModel.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/IoModel.cpp	(revision 12515)
@@ -78,5 +78,5 @@
 		for(int i=0;i<MaximumNumberOfEnums;i++){
 			if(this->data[i]){
-				_printf_("Info: previous pointer of %s has not been freed (DeleteData has not been called)",EnumToStringx(i));
+				if(true) _pprintLine_("Info: previous pointer of " << EnumToStringx(i) << " has not been freed (DeleteData has not been called)");
 			}
 		}
Index: /issm/trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp	(revision 12515)
@@ -127,8 +127,8 @@
 
 //	if      (itag)
-//		_printf_(true,"tag buffer (length=%d):\n",ibuf);
+//		if(true) _pprintLine_("tag buffer (length=" << ibuf << "):");
 //	else if (ifield)
-//		_printf_(true,"field buffer (length=%d):\n",ibuf);
-//	_printf_(true,"%s\n",buffer);
+//		if(true) _pprintLine_("field buffer (length=" << ibuf << "):");
+//	if(true) _pprintLine_("" << buffer);
 
 	if (!ibuf)
@@ -193,6 +193,6 @@
 		}
 
-//	_printf_(true,"comment buffer (length=%d):\n",ibuf);
-//	_printf_(true,"%s\n",buffer);
+//	if(true) _pprintLine_("comment buffer (length=" << ibuf << "):");
+//	if(true) _pprintLine_("" << buffer);
 
 	if (!ibuf)
@@ -254,5 +254,5 @@
 
 	ktokn=strtok(ktagi,"< >");
-//	_printf_(true,"KMLFileTagName -- initial token=\"%s\".\n",ktokn);
+//	if(true) _pprintLine_("KMLFileTagName -- initial token=\"" << ktokn << "\".");
 
 	if (!pname) {
@@ -264,6 +264,6 @@
 
 	if (maxlen && (maxlen < strlen(ktokn))) {
-		_printf_(true,"KMLFileTagName -- string field too short for %s.\n",ktag);
-		_printf_(true,"KMLFileTagName -- \"%s\" truncated to %d characters.\n",ktokn,maxlen);
+		if(true) _pprintLine_("KMLFileTagName -- string field too short for " << ktag << ".");
+		if(true) _pprintLine_("KMLFileTagName -- \"" << ktokn << "\" truncated to " << maxlen << " characters.");
 		strncpy(pname,ktokn,maxlen);
 	}
@@ -300,5 +300,5 @@
 	/*  return first non blank and move past subsequent blank  */
 	ktokn=strtok(ktagi," ");
-//	_printf_(true,"KMLFileTagAttrib -- initial token=\"%s\".\n",ktokn);
+//	if(true) _pprintLine_("KMLFileTagAttrib -- initial token=\"" << ktokn << "\".");
 
 	/*  return next non " =?/>" and move past subsequent " =?/>"  */
@@ -307,5 +307,5 @@
 		/*  return next non quote and move past subsequent quote  */
 		ktokv=strtok(NULL,quote);
-//		_printf_(true,"KMLFileTagAttrib -- attribute %s=\"%s\".\n",ktokn,ktokv);
+//		if(true) _pprintLine_("KMLFileTagAttrib -- attribute " << ktokn << "=\"" << ktokv << "\".");
 
 /*  add the attribute to the dataset  */
@@ -323,5 +323,5 @@
 		(!strncmp(&ktag[0],"<"        ,1) && !strncmp(&ktag[strlen(ktag)-2],"/>",2)))
 		isolo=1;
-//	_printf_(true,"KMLFileTagAttrib -- isolo=%d.\n",isolo);
+//	if(true) _pprintLine_("KMLFileTagAttrib -- isolo=" << isolo << ".");
 
 	return(isolo);
@@ -357,5 +357,5 @@
 			xfree((void**)&kstr);
 
-//	_printf_(true,"KMLFileTokenParse -- %s=%d.\n",ktag,*pival);
+//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pival << ".");
 
 	return(0);
@@ -391,5 +391,5 @@
 			xfree((void**)&kstr);
 
-//	_printf_(true,"KMLFileTokenParse -- %s=%s.\n",ktag,(*pbval ? "true" : "false"));
+//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << (*pbval ? "true" : "false") << ".");
 
 	return(0);
@@ -428,6 +428,6 @@
 
 	if (maxlen && (maxlen < strlen(kstr))) {
-		_printf_(true,"KMLFileTokenParse -- string field too short for %s.\n",ktag);
-		_printf_(true,"KMLFileTokenParse -- \"%s\" truncated to %d characters.\n",kstr,maxlen);
+		if(true) _pprintLine_("KMLFileTokenParse -- string field too short for " << ktag << ".");
+		if(true) _pprintLine_("KMLFileTokenParse -- \"" << kstr << "\" truncated to " << maxlen << " characters.");
 		strncpy(pstr,kstr,maxlen);
 	}
@@ -452,5 +452,5 @@
 			xfree((void**)&kstr);
 
-//	_printf_(true,"KMLFileTokenParse -- %s=\"%s\".\n",ktag,pstr);
+//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=\"" << pstr << "\".");
 
 	return(pstr);
@@ -486,5 +486,5 @@
 			xfree((void**)&kstr);
 
-//	_printf_(true,"KMLFileTokenParse -- %s=%g.\n",ktag,*pfval);
+//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pfval << ".");
 
 	return(0);
@@ -520,5 +520,5 @@
 			xfree((void**)&kstr);
 
-//	_printf_(true,"KMLFileTokenParse -- %s=%g.\n",ktag,*pdval);
+//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pdval << ".");
 
 	return(0);
@@ -578,7 +578,7 @@
 			xfree((void**)&kstr);
 
-//	_printf_(true,"KMLFileTokenParse -- %s=...\n",ktag);
+//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=...");
 //	for (j=0; j<=i; j++)
-//		_printf_(true,"   [%d]: %lg\n",j,(*pdval)[j]);
+//		if(true) _pprintLine_("   [" << j << "]: " << (*pdval)[j] << "g");
 
 	return(0);
@@ -631,5 +631,5 @@
 
 	if (j != 2)
-		_printf_(true,"KMLFileTokenParse -- Double [m x 3] field for %s does not have multiple of 3 values.\n",ktag);
+		if(true) _pprintLine_("KMLFileTokenParse -- Double [m x 3] field for " << ktag << " does not have multiple of 3 values.");
 
 /*  get additional token and compare to closing tag  */
@@ -645,7 +645,7 @@
 			xfree((void**)&kstr);
 
-//	_printf_(true,"KMLFileTokenParse -- %s=...\n",ktag);
+//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=...");
 //	for (j=0; j<=i; j++)
-//		_printf_(true,"   [%d][0-2]: %lg,%lg,%lg\n",j,(*pdval3)[j][0],(*pdval3)[j][1],(*pdval3)[j][2]);
+//		if(true) _pprintLine_("   [" << j << "][0-2]: " << (*pdval3)[j][0] << "g," << (*pdval3)[j][1] << "g," << (*pdval3)[j][2] << "g");
 
 	return(0);
@@ -661,5 +661,5 @@
 	opening tag, must find corresponding closing tag  */
 
-	_printf_(true,"KMLFileTagSkip -- input tag %s.\n",ktag);
+	if(true) _pprintLine_("KMLFileTagSkip -- input tag " << ktag << ".");
 
 /*  if next token is a closing tag, compare to input  */
@@ -670,5 +670,5 @@
 				 (kstr[1] == '/') &&
 				 (!strncmp(&(kstr[2]),&(ktag[1]),(strcspn(ktag," >")-1)/sizeof(char)))) {
-			_printf_(true,"KMLFileTagSkip -- closing tag %s.\n",kstr);
+			if(true) _pprintLine_("KMLFileTagSkip -- closing tag " << kstr << ".");
 			xfree((void**)&kstr);
 			return(0);
@@ -679,5 +679,5 @@
 		else if ((kstr[0] == '<') &&
 				 (kstr[1] != '/')) {
-			_printf_(true,"KMLFileTagSkip -- opening tag %s.\n",kstr);
+			if(true) _pprintLine_("KMLFileTagSkip -- opening tag " << kstr << ".");
 			KMLFileTagSkip(kstr,
 						   fid);
Index: /issm/trunk-jpl/src/c/objects/KML/KML_Attribute.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_Attribute.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_Attribute.cpp	(revision 12515)
@@ -45,8 +45,8 @@
 	bool  flag=true;
 
-	_printf_(flag,"    ");
+	if(flag) _pprintString_("    ");
 	for (i=0;i<10-strlen(name);i++)
-		_printf_(flag," ");
-	_printf_(flag,"%s: \"%s\"\n",name,value);
+		if(flag) _pprintString_(" ");
+	if(flag) _pprintLine_("" << name << ": \"" << value << "\"");
 
 	return;
@@ -69,8 +69,8 @@
 	bool  flag=true;
 
-	_printf_(flag,"%s    ",indent);
+	if(flag) _pprintString_("" << indent << "    ");
 	for (i=0;i<10-strlen(name);i++)
-		_printf_(flag," ");
-	_printf_(flag,"%s: \"%s\"\n",name,value);
+		if(flag) _pprintString_(" ");
+	if(flag) _pprintLine_("" << name << ": \"" << value << "\"");
 
 	return;
Index: /issm/trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp	(revision 12515)
@@ -45,6 +45,6 @@
 	KML_SubStyle::Echo();
 
-	_printf_(flag,"         color: %s\n"          ,color);
-	_printf_(flag,"     colormode: %s\n"          ,colormode);
+	if(flag) _pprintLine_("         color: " << color);
+	if(flag) _pprintLine_("     colormode: " << colormode);
 
 	return;
@@ -68,8 +68,6 @@
 	KML_SubStyle::DeepEcho(indent);
 
-	_printf_(flag,"%s         color: %s\n"          ,indent,color);
-	_printf_(flag,"%s     colormode: %s\n"          ,indent,colormode);
-
-	return;
+	if(flag) _pprintLine_("" << indent << "         color: " << color);
+	if(flag) _pprintLine_("" << indent << "     colormode: " << colormode);
 }
 /*}}}*/
Index: /issm/trunk-jpl/src/c/objects/KML/KML_Comment.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_Comment.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_Comment.cpp	(revision 12515)
@@ -42,6 +42,6 @@
 	bool  flag=true;
 
-	_printf_(flag,"    ");
-	_printf_(flag,"%s\n",value);
+	if(flag) _pprintString_("    ");
+	if(flag) _pprintLine_("" << value);
 
 	return;
@@ -63,6 +63,6 @@
 	bool  flag=true;
 
-	_printf_(flag,"%s    ",indent);
-	_printf_(flag,"%s\n",value);
+	if(flag) _pprintString_("" << indent << "    ");
+	if(flag) _pprintLine_("" << value);
 
 	return;
Index: /issm/trunk-jpl/src/c/objects/KML/KML_Container.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_Container.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_Container.cpp	(revision 12515)
@@ -47,5 +47,5 @@
 	KML_Feature::Echo();
 
-	_printf_(flag,"       feature: (size=%d)\n" ,feature->Size());
+	if(flag) _pprintLine_("       feature: (size=" << feature->Size() << ")");
 
 	return;
@@ -78,10 +78,10 @@
 	if (feature->Size())
 		for (i=0; i<feature->Size(); i++) {
-			_printf_(flag,"%s       feature: -------- begin [%d] --------\n" ,indent,i);
+			if(flag) _pprintLine_("" << indent << "       feature: -------- begin [" << i << "] --------");
 			((KML_Feature *)feature->GetObjectByOffset(i))->DeepEcho(indent2);
-			_printf_(flag,"%s       feature: --------  end  [%d] --------\n" ,indent,i);
+			if(flag) _pprintLine_("" << indent << "       feature: --------  end  [" << i << "] --------");
 		}
 	else
-		_printf_(flag,"%s       feature: [empty]\n"    ,indent);
+		if(flag) _pprintLine_("" << indent << "       feature: [empty]");
 
 	return;
Index: /issm/trunk-jpl/src/c/objects/KML/KML_Document.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_Document.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_Document.cpp	(revision 12515)
@@ -42,5 +42,5 @@
 	bool  flag=true;
 
-	_printf_(flag,"KML_Document:\n");
+	if(flag) _pprintLine_("KML_Document:");
 	KML_Container::Echo();
 
@@ -65,5 +65,5 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sKML_Document:\n",indent);
+	if(flag) _pprintLine_("" << indent << "KML_Document:");
 	KML_Container::DeepEcho(indent);
 
Index: /issm/trunk-jpl/src/c/objects/KML/KML_Feature.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_Feature.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_Feature.cpp	(revision 12515)
@@ -54,16 +54,15 @@
 	KML_Object::Echo();
 
-	_printf_(flag,"          name: \"%s\"\n"    ,name);
-	_printf_(flag,"    visibility: %s\n"        ,(visibility ? "true" : "false"));
-	_printf_(flag,"          open: %s\n"        ,(open ? "true" : "false"));
-	_printf_(flag,"       snippet: \"%s\"\n"    ,snippet);
-	_printf_(flag,"      descript: \"%s\"\n"    ,descript);
-	_printf_(flag,"      styleurl: \"%s\"\n"    ,styleurl);
-	_printf_(flag,"         style: (size=%d)\n" ,style->Size());
+	if(flag) _pprintLine_("          name: \"" << name << "\"");
+	if(flag) _pprintLine_("    visibility: " << (visibility ? "true" : "false"));
+	if(flag) _pprintLine_("          open: " << (open ? "true" : "false"));
+	if(flag) _pprintLine_("       snippet: \"" << snippet << "\"");
+	if(flag) _pprintLine_("      descript: \"" << descript << "\"");
+	if(flag) _pprintLine_("      styleurl: \"" << styleurl << "\"");
+	if(flag) _pprintLine_("         style: (size=" << style->Size() << ")");
 
 	return;
 }
 /*}}}*/
-
 /*FUNCTION KML_Feature::DeepEcho {{{*/
 void  KML_Feature::DeepEcho(){
@@ -76,5 +75,4 @@
 }
 /*}}}*/
-
 /*FUNCTION KML_Feature::DeepEcho {{{*/
 void  KML_Feature::DeepEcho(const char* indent){
@@ -86,10 +84,10 @@
 	KML_Object::DeepEcho(indent);
 
-	_printf_(flag,"%s          name: \"%s\"\n"      ,indent,name);
-	_printf_(flag,"%s    visibility: %s\n"          ,indent,(visibility ? "true" : "false"));
-	_printf_(flag,"%s          open: %s\n"          ,indent,(open ? "true" : "false"));
-	_printf_(flag,"%s       snippet: \"%s\"\n"      ,indent,snippet);
-	_printf_(flag,"%s      descript: \"%s\"\n"      ,indent,descript);
-	_printf_(flag,"%s      styleurl: \"%s\"\n"      ,indent,styleurl);
+	if(flag) _pprintLine_("" << indent << "          name: \"" << name << "\"");
+	if(flag) _pprintLine_("" << indent << "    visibility: " << (visibility ? "true" : "false"));
+	if(flag) _pprintLine_("" << indent << "          open: " << (open ? "true" : "false"));
+	if(flag) _pprintLine_("" << indent << "       snippet: \"" << snippet << "\"");
+	if(flag) _pprintLine_("" << indent << "      descript: \"" << descript << "\"");
+	if(flag) _pprintLine_("" << indent << "      styleurl: \"" << styleurl << "\"");
 
 /*  loop over any styles for the feature  */
@@ -100,15 +98,14 @@
 	if (style->Size())
 		for (i=0; i<style->Size(); i++) {
-			_printf_(flag,"%s         style: -------- begin [%d] --------\n" ,indent,i);
+			if(flag) _pprintLine_("" << indent << "         style: -------- begin [" << i << "] --------");
 			((KML_Style *)style->GetObjectByOffset(i))->DeepEcho(indent2);
-			_printf_(flag,"%s         style: --------  end  [%d] --------\n" ,indent,i);
+			if(flag) _pprintLine_("" << indent << "         style: --------  end  [" << i << "] --------");
 		}
 	else
-		_printf_(flag,"%s         style: [empty]\n"    ,indent);
+		if(flag) _pprintLine_("" << indent << "         style: [empty]");
 
 	return;
 }
 /*}}}*/
-
 /*FUNCTION KML_Feature::Write {{{*/
 void  KML_Feature::Write(FILE* filout,const char* indent){
@@ -142,5 +139,4 @@
 }
 /*}}}*/
-
 /*FUNCTION KML_Feature::Read {{{*/
 void  KML_Feature::Read(FILE* fid,char* kstr){
@@ -182,3 +178,2 @@
 }
 /*}}}*/
-
Index: /issm/trunk-jpl/src/c/objects/KML/KML_File.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_File.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_File.cpp	(revision 12515)
@@ -42,5 +42,5 @@
 	bool  flag=true;
 
-	_printf_(flag,"KML_File:\n");
+	if(flag) _pprintLine_("KML_File:");
 	KML_Object::Echo();
 
@@ -63,5 +63,5 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sKML_File:\n",indent);
+	if(flag) _pprintLine_("" << indent << "KML_File:");
 	KML_Object::DeepEcho(indent);
 
Index: /issm/trunk-jpl/src/c/objects/KML/KML_Folder.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_Folder.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_Folder.cpp	(revision 12515)
@@ -42,5 +42,5 @@
 	bool  flag=true;
 
-	_printf_(flag,"KML_Folder:\n");
+	if(flag) _pprintLine_("KML_Folder:");
 	KML_Container::Echo();
 
@@ -65,5 +65,5 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sKML_Folder:\n",indent);
+	if(flag) _pprintLine_("" << indent << "KML_Folder:");
 	KML_Container::DeepEcho(indent);
 
Index: /issm/trunk-jpl/src/c/objects/KML/KML_Icon.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_Icon.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_Icon.cpp	(revision 12515)
@@ -49,20 +49,19 @@
 	bool  flag=true;
 
-	_printf_(flag,"KML_Icon:\n");
+	if(flag) _pprintLine_("KML_Icon:");
 	KML_Object::Echo();
 
-	_printf_(flag,"          href: \"%s\"\n"    ,href);
-	_printf_(flag,"       refmode: \"%s\"\n"    ,refmode);
-	_printf_(flag,"        refint: %g\n"        ,refint);
-	_printf_(flag,"      vrefmode: \"%s\"\n"    ,vrefmode);
-	_printf_(flag,"      vreftime: %g\n"        ,vreftime);
-	_printf_(flag,"      vboundsc: %g\n"        ,vboundsc);
-	_printf_(flag,"       vformat: \"%s\"\n"    ,vformat);
-	_printf_(flag,"        hquery: \"%s\"\n"    ,hquery);
+	if(flag) _pprintLine_("          href: \"" << href << "\"");
+	if(flag) _pprintLine_("       refmode: \"" << refmode << "\"");
+	if(flag) _pprintLine_("        refint: " << refint);
+	if(flag) _pprintLine_("      vrefmode: \"" << vrefmode << "\"");
+	if(flag) _pprintLine_("      vreftime: " << vreftime);
+	if(flag) _pprintLine_("      vboundsc: " << vboundsc);
+	if(flag) _pprintLine_("       vformat: \"" << vformat << "\"");
+	if(flag) _pprintLine_("        hquery: \"" << hquery << "\"");
 
 	return;
 }
 /*}}}*/
-
 /*FUNCTION KML_Icon::DeepEcho {{{*/
 void  KML_Icon::DeepEcho(){
@@ -75,5 +74,4 @@
 }
 /*}}}*/
-
 /*FUNCTION KML_Icon::DeepEcho {{{*/
 void  KML_Icon::DeepEcho(const char* indent){
@@ -81,20 +79,19 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sKML_Icon:\n",indent);
+	if(flag) _pprintLine_("" << indent << "KML_Icon:");
 	KML_Object::DeepEcho(indent);
 
-	_printf_(flag,"%s          href: \"%s\"\n"    ,indent,href);
-	_printf_(flag,"%s       refmode: \"%s\"\n"    ,indent,refmode);
-	_printf_(flag,"%s        refint: %g\n"        ,indent,refint);
-	_printf_(flag,"%s      vrefmode: \"%s\"\n"    ,indent,vrefmode);
-	_printf_(flag,"%s      vreftime: %g\n"        ,indent,vreftime);
-	_printf_(flag,"%s      vboundsc: %g\n"        ,indent,vboundsc);
-	_printf_(flag,"%s       vformat: \"%s\"\n"    ,indent,vformat);
-	_printf_(flag,"%s        hquery: \"%s\"\n"    ,indent,hquery);
+	if(flag) _pprintLine_("" << indent << "          href: \"" << href << "\"");
+	if(flag) _pprintLine_("" << indent << "       refmode: \"" << refmode << "\"");
+	if(flag) _pprintLine_("" << indent << "        refint: " << refint);
+	if(flag) _pprintLine_("" << indent << "      vrefmode: \"" << vrefmode << "\"");
+	if(flag) _pprintLine_("" << indent << "      vreftime: " << vreftime);
+	if(flag) _pprintLine_("" << indent << "      vboundsc: " << vboundsc);
+	if(flag) _pprintLine_("" << indent << "       vformat: \"" << vformat << "\"");
+	if(flag) _pprintLine_("" << indent << "        hquery: \"" << hquery << "\"");
 
 	return;
 }
 /*}}}*/
-
 /*FUNCTION KML_Icon::Write {{{*/
 void  KML_Icon::Write(FILE* filout,const char* indent){
@@ -126,5 +123,4 @@
 }
 /*}}}*/
-
 /*FUNCTION KML_Icon::Read {{{*/
 void  KML_Icon::Read(FILE* fid,char* kstr){
@@ -185,3 +181,2 @@
 }
 /*}}}*/
-
Index: /issm/trunk-jpl/src/c/objects/KML/KML_LineString.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_LineString.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_LineString.cpp	(revision 12515)
@@ -51,11 +51,11 @@
 	bool  flag=true;
 
-	_printf_(flag,"KML_LineString:\n");
+	if(flag) _pprintLine_("KML_LineString:");
 	KML_Geometry::Echo();
 
-	_printf_(flag,"       extrude: %s\n"          ,(extrude ? "true" : "false"));
-	_printf_(flag,"    tessellate: %s\n"          ,(tessellate ? "true" : "false"));
-	_printf_(flag,"       altmode: \"%s\"\n"      ,altmode);
-	_printf_(flag,"        coords: (ncoord=%d)\n" ,ncoord);
+	if(flag) _pprintLine_("       extrude: " << (extrude ? "true" : "false"));
+	if(flag) _pprintLine_("    tessellate: " << (tessellate ? "true" : "false"));
+	if(flag) _pprintLine_("       altmode: \"" << altmode << "\"");
+	if(flag) _pprintLine_("        coords: (ncoord=" << ncoord << ")");
 
 	return;
@@ -78,13 +78,13 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sKML_LineString:\n",indent);
+	if(flag) _pprintLine_("" << indent << "KML_LineString:");
 	KML_Geometry::DeepEcho(indent);
 
-	_printf_(flag,"%s       extrude: %s\n"          ,indent,(extrude ? "true" : "false"));
-	_printf_(flag,"%s    tessellate: %s\n"          ,indent,(tessellate ? "true" : "false"));
-	_printf_(flag,"%s       altmode: \"%s\"\n"      ,indent,altmode);
-	_printf_(flag,"%s        coords: (ncoord=%d)\n" ,indent,ncoord);
+	if(flag) _pprintLine_("" << indent << "       extrude: " << (extrude ? "true" : "false"));
+	if(flag) _pprintLine_("" << indent << "    tessellate: " << (tessellate ? "true" : "false"));
+	if(flag) _pprintLine_("" << indent << "       altmode: \"" << altmode << "\"");
+	if(flag) _pprintLine_("" << indent << "        coords: (ncoord=" << ncoord << ")");
 	for (i=0; i<ncoord; i++)
-		_printf_(flag,"%s                (%g,%g,%g)\n" ,indent,coords[3*i+0],coords[3*i+1],coords[3*i+2]);
+		if(flag) _pprintLine_("" << indent << "                (" << coords[3*i+0] << "," << coords[3*i+1] << "," << coords[3*i+2] << ")");
 
 	return;
Index: /issm/trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp	(revision 12515)
@@ -42,8 +42,8 @@
 	bool  flag=true;
 
-	_printf_(flag,"KML_LineStyle:\n");
+	if(flag) _pprintLine_("KML_LineStyle:");
 	KML_ColorStyle::Echo();
 
-	_printf_(flag,"         width: %g\n"          ,width);
+	if(flag) _pprintLine_("         width: " << width);
 
 	return;
@@ -66,8 +66,8 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sKML_LineStyle:\n",indent);
+	if(flag) _pprintLine_("" << indent << "KML_LineStyle:");
 	KML_ColorStyle::DeepEcho(indent);
 
-	_printf_(flag,"%s         width: %g\n"          ,indent,width);
+	if(flag) _pprintLine_("" << indent << "         width: " << width);
 
 	return;
@@ -137,3 +137,2 @@
 }
 /*}}}*/
-
Index: /issm/trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp	(revision 12515)
@@ -51,11 +51,11 @@
 	bool  flag=true;
 
-	_printf_(flag,"KML_LinearRing:\n");
+	if(flag) _pprintLine_("KML_LinearRing:");
 	KML_Geometry::Echo();
 
-	_printf_(flag,"       extrude: %s\n"          ,(extrude ? "true" : "false"));
-	_printf_(flag,"    tessellate: %s\n"          ,(tessellate ? "true" : "false"));
-	_printf_(flag,"       altmode: \"%s\"\n"      ,altmode);
-	_printf_(flag,"        coords: (ncoord=%d)\n" ,ncoord);
+	if(flag) _pprintLine_("       extrude: " << (extrude ? "true" : "false"));
+	if(flag) _pprintLine_("    tessellate: " << (tessellate ? "true" : "false"));
+	if(flag) _pprintLine_("       altmode: \"" << altmode << "\"");
+	if(flag) _pprintLine_("        coords: (ncoord=" << ncoord << ")");
 
 	return;
@@ -78,13 +78,13 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sKML_LinearRing:\n",indent);
+	if(flag) _pprintLine_("" << indent << "KML_LinearRing:");
 	KML_Geometry::DeepEcho(indent);
 
-	_printf_(flag,"%s       extrude: %s\n"          ,indent,(extrude ? "true" : "false"));
-	_printf_(flag,"%s    tessellate: %s\n"          ,indent,(tessellate ? "true" : "false"));
-	_printf_(flag,"%s       altmode: \"%s\"\n"      ,indent,altmode);
-	_printf_(flag,"%s        coords: (ncoord=%d)\n" ,indent,ncoord);
+	if(flag) _pprintLine_("" << indent << "       extrude: " << (extrude ? "true" : "false"));
+	if(flag) _pprintLine_("" << indent << "    tessellate: " << (tessellate ? "true" : "false"));
+	if(flag) _pprintLine_("" << indent << "       altmode: \"" << altmode << "\"");
+	if(flag) _pprintLine_("" << indent << "        coords: (ncoord=" << ncoord << ")");
 	for (i=0; i<ncoord; i++)
-		_printf_(flag,"%s                (%g,%g,%g)\n" ,indent,
+		_printf_(flag,"%s                (%g,%g,%g)\n",indent,
 				coords[3*i+0],coords[3*i+1],coords[3*i+2]);
 
Index: /issm/trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp	(revision 12515)
@@ -45,13 +45,12 @@
 	bool  flag=true;
 
-	_printf_(flag,"KML_Multigeometry:\n");
+	if(flag) _pprintLine_("KML_Multigeometry:");
 	KML_Geometry::Echo();
 
-	_printf_(flag,"      geometry: (size=%d)\n" ,geometry->Size());
-
-	return;
-}
-/*}}}*/
-
+	if(flag) _pprintLine_("      geometry: (size=" << geometry->Size() << ")");
+
+	return;
+}
+/*}}}*/
 /*FUNCTION KML_MultiGeometry::DeepEcho {{{*/
 void  KML_MultiGeometry::DeepEcho(){
@@ -64,5 +63,4 @@
 }
 /*}}}*/
-
 /*FUNCTION KML_MultiGeometry::DeepEcho {{{*/
 void  KML_MultiGeometry::DeepEcho(const char* indent){
@@ -72,5 +70,5 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sKML_Multigeometry:\n",indent);
+	if(flag) _pprintLine_("" << indent << "KML_Multigeometry:");
 	KML_Geometry::DeepEcho(indent);
 
@@ -82,15 +80,14 @@
 	if (geometry->Size())
 		for (i=0; i<geometry->Size(); i++) {
-			_printf_(flag,"%s      geometry: -------- begin [%d] --------\n" ,indent,i);
+			if(flag) _pprintLine_("" << indent << "      geometry: -------- begin [" << i << "] --------");
 			((KML_Geometry *)geometry->GetObjectByOffset(i))->DeepEcho(indent2);
-			_printf_(flag,"%s      geometry: --------  end  [%d] --------\n" ,indent,i);
+			if(flag) _pprintLine_("" << indent << "      geometry: --------  end  [" << i << "] --------");
 		}
 	else
-		_printf_(flag,"%s      geometry: [empty]\n"    ,indent);
-
-	return;
-}
-/*}}}*/
-
+		if(flag) _pprintLine_("" << indent << "      geometry: [empty]");
+
+	return;
+}
+/*}}}*/
 /*FUNCTION KML_MultiGeometry::Write {{{*/
 void  KML_MultiGeometry::Write(FILE* filout,const char* indent){
@@ -120,5 +117,4 @@
 }
 /*}}}*/
-
 /*FUNCTION KML_MultiGeometry::Read {{{*/
 void  KML_MultiGeometry::Read(FILE* fid,char* kstr){
@@ -193,5 +189,4 @@
 }
 /*}}}*/
-
 /*FUNCTION KML_MultiGeometry::WriteExp {{{*/
 void  KML_MultiGeometry::WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp){
@@ -207,3 +202,2 @@
 }
 /*}}}*/
-
Index: /issm/trunk-jpl/src/c/objects/KML/KML_Object.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_Object.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_Object.cpp	(revision 12515)
@@ -55,7 +55,7 @@
 	bool  flag=true;
 
-	_printf_(flag,"        attrib: (size=%d)\n" ,attrib->Size());
-	_printf_(flag,"        commnt: (size=%d)\n" ,commnt->Size());
-	_printf_(flag,"        kmlobj: (size=%d)\n" ,kmlobj->Size());
+	if(flag) _pprintLine_("        attrib: (size=" << attrib->Size() << ")");
+	if(flag) _pprintLine_("        commnt: (size=" << commnt->Size() << ")");
+	if(flag) _pprintLine_("        kmlobj: (size=" << kmlobj->Size() << ")");
 
 	return;
@@ -86,5 +86,5 @@
 		}
 	else
-		_printf_(flag,"%s        attrib: [empty]\n"    ,indent);
+		if(flag) _pprintLine_("" << indent << "        attrib: [empty]");
 
 /*  loop over the comments for the object  */
@@ -95,5 +95,5 @@
 		}
 	else
-		_printf_(flag,"%s        commnt: [empty]\n"    ,indent);
+		if(flag) _pprintLine_("" << indent << "        commnt: [empty]");
 
 /*  loop over the unknown objects for the object  */
@@ -104,10 +104,10 @@
 	if (kmlobj->Size())
 		for (i=0; i<kmlobj->Size(); i++) {
-            _printf_(flag,"%s        kmlobj: -------- begin [%d] --------\n" ,indent,i);
+            if(flag) _pprintLine_("" << indent << "        kmlobj: -------- begin [" << i << "] --------");
 			((KML_Unknown *)kmlobj->GetObjectByOffset(i))->DeepEcho(indent2);
-            _printf_(flag,"%s        kmlobj: --------  end  [%d] --------\n" ,indent,i);
+            if(flag) _pprintLine_("" << indent << "        kmlobj: --------  end  [" << i << "] --------");
 		}
 	else
-		_printf_(flag,"%s        kmlobj: [empty]\n"    ,indent);
+		if(flag) _pprintLine_("" << indent << "        kmlobj: [empty]");
 
 	return;
@@ -253,5 +253,5 @@
 
 	else if (!strncmp(kstr,"<",1)) {
-		_printf_(true,"KML_Object::Read -- Unrecognized opening tag %s.\n",kstr);
+		if(true) _pprintLine_("KML_Object::Read -- Unrecognized opening tag " << kstr << ".");
 //		KMLFileTagSkip(kstr,
 //					   fid);
Index: /issm/trunk-jpl/src/c/objects/KML/KML_Overlay.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_Overlay.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_Overlay.cpp	(revision 12515)
@@ -47,16 +47,10 @@
 void  KML_Overlay::Echo(){
 
-	bool  flag=true;
-
 	KML_Feature::Echo();
-
-	_printf_(flag,"         color: \"%s\"\n" ,color);
-	_printf_(flag,"       draword: %d\n"     ,draword);
-	_printf_(flag,"          icon: %p\n"     ,icon);
-
-	return;
+	_pprintLine_("         color: \"" << color << "\"");
+	_pprintLine_("       draword: " << draword);
+	_pprintLine_("          icon: " << icon);
 }
 /*}}}*/
-
 /*FUNCTION KML_Overlay::DeepEcho {{{*/
 void  KML_Overlay::DeepEcho(){
@@ -69,11 +63,8 @@
 }
 /*}}}*/
-
 /*FUNCTION KML_Overlay::DeepEcho {{{*/
 void  KML_Overlay::DeepEcho(const char* indent){
 
 	char  indent2[81];
-	bool  flag=true;
-
 	KML_Feature::DeepEcho(indent);
 
@@ -81,15 +72,12 @@
 	strcat(indent2,"  ");
 
-	_printf_(flag,"%s         color: %s\n"          ,indent,color);
-	_printf_(flag,"%s       draword: %d\n"          ,indent,draword);
+	_pprintLine_("" << indent << "         color: " << color);
+	_pprintLine_("" << indent << "       draword: " << draword);
 	if (icon)
 		icon->DeepEcho(indent2);
 	else
-		_printf_(flag,"%s          icon: %p\n"          ,indent,icon);
-
-	return;
+		_pprintLine_("" << indent << "          icon: " << icon);
 }
 /*}}}*/
-
 /*FUNCTION KML_Overlay::Write {{{*/
 void  KML_Overlay::Write(FILE* filout,const char* indent){
@@ -112,5 +100,4 @@
 }
 /*}}}*/
-
 /*FUNCTION KML_Overlay::Read {{{*/
 void  KML_Overlay::Read(FILE* fid,char* kstr){
@@ -147,3 +134,2 @@
 }
 /*}}}*/
-
Index: /issm/trunk-jpl/src/c/objects/KML/KML_Placemark.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_Placemark.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_Placemark.cpp	(revision 12515)
@@ -45,8 +45,8 @@
 	bool  flag=true;
 
-	_printf_(flag,"KML_Placemark:\n");
+	if(flag) _pprintLine_("KML_Placemark:");
 	KML_Feature::Echo();
 
-	_printf_(flag,"      geometry: (size=%d)\n" ,geometry->Size());
+	if(flag) _pprintLine_("      geometry: (size=" << geometry->Size() << ")");
 
 	return;
@@ -70,5 +70,5 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sKML_Placemark:\n",indent);
+	if(flag) _pprintLine_("" << indent << "KML_Placemark:");
 	KML_Feature::DeepEcho(indent);
 
@@ -80,10 +80,10 @@
 	if (geometry->Size())
 		for (i=0; i<geometry->Size(); i++) {
-			_printf_(flag,"%s      geometry: -------- begin [%d] --------\n" ,indent,i);
+			if(flag) _pprintLine_("" << indent << "      geometry: -------- begin [" << i << "] --------");
 			((KML_Geometry *)geometry->GetObjectByOffset(i))->DeepEcho(indent2);
-			_printf_(flag,"%s      geometry: --------  end  [%d] --------\n" ,indent,i);
+			if(flag) _pprintLine_("" << indent << "      geometry: --------  end  [" << i << "] --------");
 		}
 	else
-		_printf_(flag,"%s      geometry: [empty]\n"    ,indent);
+		if(flag) _pprintLine_("" << indent << "      geometry: [empty]");
 
 	return;
Index: /issm/trunk-jpl/src/c/objects/KML/KML_Point.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_Point.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_Point.cpp	(revision 12515)
@@ -48,10 +48,10 @@
 	bool  flag=true;
 
-	_printf_(flag,"KML_Point:\n");
+	if(flag) _pprintLine_("KML_Point:");
 	KML_Geometry::Echo();
 
-	_printf_(flag,"       extrude: %s\n"         ,(extrude ? "true" : "false"));
-	_printf_(flag,"       altmode: \"%s\"\n"     ,altmode);
-	_printf_(flag,"        coords: (%g,%g,%g)\n" ,coords[0],coords[1],coords[2]);
+	if(flag) _pprintLine_("       extrude: " << (extrude ? "true" : "false"));
+	if(flag) _pprintLine_("       altmode: \"" << altmode << "\"");
+	if(flag) _pprintLine_("        coords: (" << coords[0] << "," << coords[1] << "," << coords[2] << ")");
 
 	return;
@@ -73,10 +73,10 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sKML_Point:\n",indent);
+	if(flag) _pprintLine_("" << indent << "KML_Point:");
 	KML_Geometry::DeepEcho(indent);
 
-	_printf_(flag,"%s       extrude: %s\n"         ,indent,(extrude ? "true" : "false"));
-	_printf_(flag,"%s       altmode: \"%s\"\n"     ,indent,altmode);
-	_printf_(flag,"%s        coords: (%g,%g,%g)\n" ,indent,coords[0],coords[1],coords[2]);
+	if(flag) _pprintLine_("" << indent << "       extrude: " << (extrude ? "true" : "false"));
+	if(flag) _pprintLine_("" << indent << "       altmode: \"" << altmode << "\"");
+	if(flag) _pprintLine_("" << indent << "        coords: (" << coords[0] << "," << coords[1] << "," << coords[2] << ")");
 
 	return;
Index: /issm/trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp	(revision 12515)
@@ -43,14 +43,13 @@
 	bool  flag=true;
 
-	_printf_(flag,"KML_PolyStyle:\n");
+	if(flag) _pprintLine_("KML_PolyStyle:");
 	KML_ColorStyle::Echo();
 
-	_printf_(flag,"          fill: %d\n"          ,fill);
-	_printf_(flag,"       outline: %d\n"          ,outline);
+	if(flag) _pprintLine_("          fill: " << fill);
+	if(flag) _pprintLine_("       outline: " << outline);
 
 	return;
 }
 /*}}}*/
-
 /*FUNCTION KML_PolyStyle::DeepEcho {{{*/
 void  KML_PolyStyle::DeepEcho(){
@@ -63,5 +62,4 @@
 }
 /*}}}*/
-
 /*FUNCTION KML_PolyStyle::DeepEcho {{{*/
 void  KML_PolyStyle::DeepEcho(const char* indent){
@@ -70,14 +68,13 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sKML_PolyStyle:\n",indent);
+	if(flag) _pprintLine_("" << indent << "KML_PolyStyle:");
 	KML_ColorStyle::DeepEcho(indent);
 
-	_printf_(flag,"%s          fill: %d\n"          ,indent,fill);
-	_printf_(flag,"%s       outline: %d\n"          ,indent,outline);
+	if(flag) _pprintLine_("" << indent << "          fill: " << fill);
+	if(flag) _pprintLine_("" << indent << "       outline: " << outline);
 
 	return;
 }
 /*}}}*/
-
 /*FUNCTION KML_PolyStyle::Write {{{*/
 void  KML_PolyStyle::Write(FILE* filout,const char* indent){
@@ -98,5 +95,4 @@
 }
 /*}}}*/
-
 /*FUNCTION KML_PolyStyle::Read {{{*/
 void  KML_PolyStyle::Read(FILE* fid,char* kstr){
@@ -149,3 +145,2 @@
 }
 /*}}}*/
-
Index: /issm/trunk-jpl/src/c/objects/KML/KML_Polygon.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_Polygon.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_Polygon.cpp	(revision 12515)
@@ -55,12 +55,12 @@
 	bool  flag=true;
 
-	_printf_(flag,"KML_Polygon:\n");
+	if(flag) _pprintLine_("KML_Polygon:");
 	KML_Geometry::Echo();
 
-	_printf_(flag,"       extrude: %s\n"          ,(extrude ? "true" : "false"));
-	_printf_(flag,"    tessellate: %s\n"          ,(tessellate ? "true" : "false"));
-	_printf_(flag,"       altmode: \"%s\"\n"      ,altmode);
-	_printf_(flag,"         outer: (size=%d)\n"   ,outer->Size());
-	_printf_(flag,"         inner: (size=%d)\n"   ,inner->Size());
+	if(flag) _pprintLine_("       extrude: " << (extrude ? "true" : "false"));
+	if(flag) _pprintLine_("    tessellate: " << (tessellate ? "true" : "false"));
+	if(flag) _pprintLine_("       altmode: \"" << altmode << "\"");
+	if(flag) _pprintLine_("         outer: (size=" << outer->Size() << ")");
+	if(flag) _pprintLine_("         inner: (size=" << inner->Size() << ")");
 
 	return;
@@ -84,10 +84,10 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sKML_Polygon:\n",indent);
+	if(flag) _pprintLine_("" << indent << "KML_Polygon:");
 	KML_Geometry::DeepEcho(indent);
 
-	_printf_(flag,"%s       extrude: %s\n"          ,indent,(extrude ? "true" : "false"));
-	_printf_(flag,"%s    tessellate: %s\n"          ,indent,(tessellate ? "true" : "false"));
-	_printf_(flag,"%s       altmode: \"%s\"\n"      ,indent,altmode);
+	if(flag) _pprintLine_("" << indent << "       extrude: " << (extrude ? "true" : "false"));
+	if(flag) _pprintLine_("" << indent << "    tessellate: " << (tessellate ? "true" : "false"));
+	if(flag) _pprintLine_("" << indent << "       altmode: \"" << altmode << "\"");
 
 	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
@@ -96,19 +96,19 @@
 	if (outer->Size())
 		for (i=0; i<outer->Size(); i++) {
-			_printf_(flag,"%s         outer: -------- begin [%d] --------\n" ,indent,i);
+			if(flag) _pprintLine_("" << indent << "         outer: -------- begin [" << i << "] --------");
 			((KML_LinearRing *)outer->GetObjectByOffset(i))->DeepEcho(indent2);
-			_printf_(flag,"%s         outer: --------  end  [%d] --------\n" ,indent,i);
+			if(flag) _pprintLine_("" << indent << "         outer: --------  end  [" << i << "] --------");
 		}
 	else
-		_printf_(flag,"%s         outer: [empty]\n"    ,indent);
+		if(flag) _pprintLine_("" << indent << "         outer: [empty]");
 
 	if (inner->Size())
 		for (i=0; i<inner->Size(); i++) {
-			_printf_(flag,"%s         inner: -------- begin [%d] --------\n" ,indent,i);
+			if(flag) _pprintLine_("" << indent << "         inner: -------- begin [" << i << "] --------");
 			((KML_LinearRing *)inner->GetObjectByOffset(i))->DeepEcho(indent2);
-			_printf_(flag,"%s         inner: --------  end  [%d] --------\n" ,indent,i);
+			if(flag) _pprintLine_("" << indent << "         inner: --------  end  [" << i << "] --------");
 		}
 	else
-		_printf_(flag,"%s         inner: [empty]\n"    ,indent);
+		if(flag) _pprintLine_("" << indent << "         inner: [empty]");
 
 	return;
Index: /issm/trunk-jpl/src/c/objects/KML/KML_Style.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_Style.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_Style.cpp	(revision 12515)
@@ -74,18 +74,17 @@
 	bool  flag=true;
 
-	_printf_(flag,"KML_Style:\n");
+	if(flag) _pprintLine_("KML_Style:");
 	KML_StyleSelector::Echo();
 
-	_printf_(flag,"          icon: %p\n"          ,icon);
-	_printf_(flag,"         label: %p\n"          ,label);
-	_printf_(flag,"          line: %p\n"          ,line);
-	_printf_(flag,"          poly: %p\n"          ,poly);
-	_printf_(flag,"       balloon: %p\n"          ,balloon);
-	_printf_(flag,"          list: %p\n"          ,list);
-
-	return;
-}
-/*}}}*/
-
+	if(flag) _pprintLine_("          icon: " << icon);
+	if(flag) _pprintLine_("         label: " << label);
+	if(flag) _pprintLine_("          line: " << line);
+	if(flag) _pprintLine_("          poly: " << poly);
+	if(flag) _pprintLine_("       balloon: " << balloon);
+	if(flag) _pprintLine_("          list: " << list);
+
+	return;
+}
+/*}}}*/
 /*FUNCTION KML_Style::DeepEcho {{{*/
 void  KML_Style::DeepEcho(){
@@ -98,5 +97,4 @@
 }
 /*}}}*/
-
 /*FUNCTION KML_Style::DeepEcho {{{*/
 void  KML_Style::DeepEcho(const char* indent){
@@ -105,5 +103,5 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sKML_Style:\n",indent);
+	if(flag) _pprintLine_("" << indent << "KML_Style:");
 	KML_StyleSelector::DeepEcho(indent);
 
@@ -114,30 +112,29 @@
 //		icon->DeepEcho(indent2);
 //	else
-		_printf_(flag,"%s          icon: %p\n"          ,indent,icon);
+		if(flag) _pprintLine_("" << indent << "          icon: " << icon);
 //	if (label)
 //		label->DeepEcho(indent2);
 //	else
-		_printf_(flag,"%s         label: %p\n"          ,indent,label);
+		if(flag) _pprintLine_("" << indent << "         label: " << label);
 	if (line)
 		line->DeepEcho(indent2);
 	else
-		_printf_(flag,"%s          line: %p\n"          ,indent,line);
+		if(flag) _pprintLine_("" << indent << "          line: " << line);
 	if (poly)
 		poly->DeepEcho(indent2);
 	else
-		_printf_(flag,"%s          poly: %p\n"          ,indent,poly);
+		if(flag) _pprintLine_("" << indent << "          poly: " << poly);
 //	if (balloon)
 //		balloon->DeepEcho(indent2);
 //	else
-		_printf_(flag,"%s       balloon: %p\n"          ,indent,balloon);
+		if(flag) _pprintLine_("" << indent << "       balloon: " << balloon);
 //	if (list)
 //		list->DeepEcho(indent2);
 //	else
-		_printf_(flag,"%s          list: %p\n"          ,indent,list);
-
-	return;
-}
-/*}}}*/
-
+		if(flag) _pprintLine_("" << indent << "          list: " << list);
+
+	return;
+}
+/*}}}*/
 /*FUNCTION KML_Style::Write {{{*/
 void  KML_Style::Write(FILE* filout,const char* indent){
@@ -174,5 +171,4 @@
 }
 /*}}}*/
-
 /*FUNCTION KML_Style::Read {{{*/
 void  KML_Style::Read(FILE* fid,char* kstr){
@@ -246,3 +242,2 @@
 }
 /*}}}*/
-
Index: /issm/trunk-jpl/src/c/objects/KML/KML_Unknown.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/KML/KML_Unknown.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/KML/KML_Unknown.cpp	(revision 12515)
@@ -44,11 +44,11 @@
 	bool  flag=true;
 
-	_printf_(flag,"KML_Unknown %s:\n",name);
+	if(flag) _pprintLine_("KML_Unknown " << name << ":");
 	KML_Object::Echo();
 
 	if (value     )
-		_printf_(flag,"         value: \"%s\"\n"     ,value);
+		if(flag) _pprintLine_("         value: \"" << value << "\"");
     else
-        _printf_(flag,"         value: [none]\n"     );
+        if(flag) _pprintLine_("         value: [none]");
 
 	return;
@@ -73,5 +73,5 @@
 	bool         flag=true;
 
-	_printf_(flag,"%sKML_Unknown %s:\n",indent,name);
+	if(flag) _pprintLine_("" << indent << "KML_Unknown " << name << ":");
 	KML_Object::DeepEcho(indent);
 
@@ -81,14 +81,14 @@
         
 		vtoken=strtok(valuei,nl);
-		_printf_(flag,"%s         value: \"%s"     ,indent,vtoken);
+		if(flag) _pprintString_("" << indent << "         value: \"" << vtoken);
     
 		while (vtoken=strtok(NULL,nl))
-			_printf_(flag,"\n%s                 %s"     ,indent,vtoken);
-		_printf_(flag,"\"\n");
+			if(flag) _pprintString_("\n" << indent << "                 " << vtoken);
+		if(flag) _pprintLine_("\"");
 
 		xfree((void**)&valuei);
 	}
     else
-        _printf_(flag,"%s         value: [none]\n"     ,indent);
+        if(flag) _pprintLine_("" << indent << "         value: [none]");
 
 	return;
@@ -139,5 +139,5 @@
 	name=KMLFileTagName(NULL,
 						kstr);
-//	_printf_(true,"KML_Unknown::Read -- opening name=%s.\n",name);
+//	if(true) _pprintLine_("KML_Unknown::Read -- opening name=" << name << ".");
 
 /*  get object attributes and check for solo tag  */
@@ -151,8 +151,8 @@
 	while (kstri=KMLFileToken(fid,
 							  &ncom,&pcom)) {
-//		_printf_(true,"KML_Unknown::Read -- kstri=%s.\n",kstri);
+//		if(true) _pprintLine_("KML_Unknown::Read -- kstri=" << kstri << ".");
 		if      (!strncmp(&kstri[0],"</", 2) &&
 				 !strncmp(&kstri[2],name,strlen(name))) {
-//			_printf_(true,"KML_Unknown::Read -- closing name=%s.\n",name);
+//			if(true) _pprintLine_("KML_Unknown::Read -- closing name=" << name << ".");
 			xfree((void**)&kstri);
 			break;
Index: /issm/trunk-jpl/src/c/objects/Options/Option.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/Option.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/Options/Option.cpp	(revision 12515)
@@ -47,12 +47,12 @@
 	bool  flag=true;
 
-	_printf_(flag,"          name: \"%s\"\n" ,name);
-	_printf_(flag,"         numel: %d\n"     ,numel);
-	_printf_(flag,"         ndims: %d\n"     ,ndims);
+	if(flag) _pprintLine_("          name: \"" << name << "\"");
+	if(flag) _pprintLine_("         numel: " << numel);
+	if(flag) _pprintLine_("         ndims: " << ndims);
 	if(size){
 		StringFromSize(cstr,size,ndims);
-		_printf_(flag,"          size: %s\n" ,cstr);
+		if(flag) _pprintLine_("          size: " << cstr);
 	}
-	else _printf_(flag,"          size: [empty]\n" );
+	else if(flag) _pprintLine_("          size: [empty]");
 }
 /*}}}*/
@@ -73,12 +73,12 @@
 	bool  flag=true;
 
-	_printf_(flag,"%s          name: \"%s\"\n" ,indent,name);
-	_printf_(flag,"%s         numel: %d\n"     ,indent,numel);
-	_printf_(flag,"%s         ndims: %d\n"     ,indent,ndims);
+	if(flag) _pprintLine_("" << indent << "          name: \"" << name << "\"");
+	if(flag) _pprintLine_("" << indent << "         numel: " << numel);
+	if(flag) _pprintLine_("" << indent << "         ndims: " << ndims);
 	if(size){
 		StringFromSize(cstr,size,ndims);
-		_printf_(flag,"%s          size: %s\n" ,indent,cstr);
+		if(flag) _pprintLine_("" << indent << "          size: " << cstr);
 	}
-	else _printf_(flag,"%s          size: [empty]\n" ,indent);
+	else if(flag) _pprintLine_("" << indent << "          size: [empty]");
 }
 /*}}}*/
Index: /issm/trunk-jpl/src/c/objects/Options/OptionCell.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/OptionCell.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/Options/OptionCell.cpp	(revision 12515)
@@ -46,12 +46,12 @@
 	bool flag     = true;
 
-	_printf_(flag,"OptionCell Echo:\n");
+	if(flag) _pprintLine_("OptionCell Echo:");
 	Option::Echo();
 
 	if (values && size) {
 		StringFromSize(cstr,size,ndims);
-		_printf_(flag,"        values: %s %s\n" ,cstr,"cell");
+		if(flag) _pprintLine_("        values: " << cstr << " " << "cell");
 	}
-	else _printf_(flag,"        values: [empty]\n" );
+	else if(flag) _pprintLine_("        values: [empty]");
 }
 /*}}}*/
@@ -75,5 +75,5 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sOptionCell DeepEcho:\n",indent);
+	if(flag) _pprintLine_("" << indent << "OptionCell DeepEcho:");
 	Option::DeepEcho(indent);
 
@@ -86,11 +86,11 @@
 			ColumnWiseDimsFromIndex(dims,i,size,ndims);
 			StringFromDims(cstr,dims,ndims);
-			_printf_(flag,"%s        values: -------- begin %s --------\n" ,indent,cstr);
+			if(flag) _pprintLine_("" << indent << "        values: -------- begin " << cstr << " --------");
 			((Option *)values->GetObjectByOffset(i))->DeepEcho(indent2);
-			_printf_(flag,"%s        values: --------  end  %s --------\n" ,indent,cstr);
+			if(flag) _pprintLine_("" << indent << "        values: --------  end  " << cstr << " --------");
 		}
 		xDelete<int>(dims);
 	}
-	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+	else if(flag) _pprintLine_("" << indent << "        values: [empty]");
 }
 /*}}}*/
Index: /issm/trunk-jpl/src/c/objects/Options/OptionChar.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/OptionChar.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/Options/OptionChar.cpp	(revision 12515)
@@ -43,5 +43,5 @@
 	bool  flag=true;
 
-	_printf_(flag,"OptionChar Echo:\n");
+	if(flag) _pprintLine_("OptionChar Echo:");
 	Option::Echo();
 
@@ -49,13 +49,13 @@
 //		if (numel == 1) {
 		if (1) {
-//			_printf_(flag,"        values: \"%s\"\n" ,values[0]);
-			_printf_(flag,"        values: \"%s\"\n" ,values);
+//			if(flag) _pprintLine_("        values: \"" << values[0] << "\"");
+			if(flag) _pprintLine_("        values: \"" << values << "\"");
 		}
 		else {
 			StringFromSize(cstr,size,ndims);
-			_printf_(flag,"        values: %s %s\n" ,cstr,"char");
+			if(flag) _pprintLine_("        values: " << cstr << " " << "char");
 		}
 	}
-	else _printf_(flag,"        values: [empty]\n" );
+	else if(flag) _pprintLine_("        values: [empty]");
 }
 /*}}}*/
@@ -79,5 +79,5 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sOptionChar DeepEcho:\n",indent);
+	if(flag) _pprintLine_("" << indent << "OptionChar DeepEcho:");
 	Option::DeepEcho(indent);
 
@@ -87,5 +87,5 @@
 	if (values) {
 		if (ndims == 2 && size[0] == 1) {
-			_printf_(flag,"%s        values: \"%s\"\n" ,indent,values);
+			if(flag) _pprintLine_("" << indent << "        values: \"" << values << "\"");
 		}
 		else {
@@ -97,5 +97,5 @@
 				RowWiseDimsFromIndex(dims,ipt,size,ndims);
 				StringFromDims(cstr,dims,ndims);
-				_printf_(flag,"%s        values%s: \"%.*s\"\n" ,indent,cstr,size[1],&(values[ipt]));
+				if(flag) _pprintLine_("" << indent << "        values" << cstr << ": \"" << size[1] << "*s\"");
 				ipt+=size[1];
 			}
@@ -103,5 +103,5 @@
 		}
 	}
-	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+	else if(flag) _pprintLine_("" << indent << "        values: [empty]");
 }
 /*}}}*/
Index: /issm/trunk-jpl/src/c/objects/Options/OptionDouble.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12515)
@@ -43,15 +43,15 @@
 	bool  flag=true;
 
-	_printf_(flag,"OptionDouble Echo:\n");
+	if(flag) _pprintLine_("OptionDouble Echo:");
 	Option::Echo();
 
 	if (values && size) {
-		if(numel == 1) _printf_(flag,"        values: %g\n" ,values[0]);
+		if(numel == 1) if(flag) _pprintLine_("        values: " << values[0]);
 		else {
 			StringFromSize(cstr,size,ndims);
-			_printf_(flag,"        values: %s %s\n" ,cstr,"IssmPDouble");
+			if(flag) _pprintLine_("        values: " << cstr << " " << "IssmPDouble");
 		}
 	}
-	else _printf_(flag,"        values: [empty]\n" );
+	else if(flag) _pprintLine_("        values: [empty]");
 }
 /*}}}*/
@@ -75,5 +75,5 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sOptionDouble DeepEcho:\n",indent);
+	if(flag) _pprintLine_("" << indent << "OptionDouble DeepEcho:");
 	Option::DeepEcho(indent);
 
@@ -83,15 +83,15 @@
 	if (values) {
 		dims=xNew<int>(ndims);
-		if(numel==1) _printf_(flag,"%s        values: %g\n" ,indent,values[0]);
+		if(numel==1) if(flag) _pprintLine_("" << indent << "        values: " << values[0]);
 		else{
 			for (i=0; i<numel; i++) {
 				RowWiseDimsFromIndex(dims,i,size,ndims);
 				StringFromDims(cstr,dims,ndims);
-				_printf_(flag,"%s        values%s: %g\n" ,indent,cstr,values[i]);
+				if(flag) _pprintLine_("" << indent << "        values" << cstr << ": " << values[i]);
 			}
 		}
 		xDelete<int>(dims);
 	}
-	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+	else if(flag) _pprintLine_("" << indent << "        values: [empty]");
 }
 /*}}}*/
Index: /issm/trunk-jpl/src/c/objects/Options/OptionLogical.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/OptionLogical.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/Options/OptionLogical.cpp	(revision 12515)
@@ -43,15 +43,15 @@
 	bool  flag=true;
 
-	_printf_(flag,"OptionLogical Echo:\n");
+	if(flag) _pprintLine_("OptionLogical Echo:");
 	Option::Echo();
 
 	if (values && size) {
-		if(numel == 1) _printf_(flag,"        values: %s\n" ,(values[0] ? "true" : "false"));
+		if(numel == 1) if(flag) _pprintLine_("        values: " << (values[0] ? "true" : "false"));
 		else{
 			StringFromSize(cstr,size,ndims);
-			_printf_(flag,"        values: %s %s\n" ,cstr,"logical");
+			if(flag) _pprintLine_("        values: " << cstr << " " << "logical");
 		}
 	}
-	else _printf_(flag,"        values: [empty]\n" );
+	else if(flag) _pprintLine_("        values: [empty]");
 }
 /*}}}*/
@@ -75,5 +75,5 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sOptionLogical DeepEcho:\n",indent);
+	if(flag) _pprintLine_("" << indent << "OptionLogical DeepEcho:");
 	Option::DeepEcho(indent);
 
@@ -82,5 +82,5 @@
 
 	if (values) {
-		if(numel==1) _printf_(flag,"%s        values: %s\n" ,indent,(values[0] ? "true" : "false"));
+		if(numel==1) if(flag) _pprintLine_("" << indent << "        values: " << (values[0] ? "true" : "false"));
 		else{
 			dims=xNew<int>(ndims);
@@ -88,10 +88,10 @@
 				RowWiseDimsFromIndex(dims,i,size,ndims);
 				StringFromDims(cstr,dims,ndims);
-				_printf_(flag,"%s        values%s: %s\n" ,indent,cstr,(values[i] ? "true" : "false"));
+				if(flag) _pprintLine_("" << indent << "        values" << cstr << ": " << (values[i] ? "true" : "false"));
 			}
 			xDelete<int>(dims);
 		}
 	}
-	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+	else if(flag) _pprintLine_("" << indent << "        values: [empty]");
 }
 /*}}}*/
Index: /issm/trunk-jpl/src/c/objects/Options/OptionStruct.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/OptionStruct.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/objects/Options/OptionStruct.cpp	(revision 12515)
@@ -51,12 +51,12 @@
 	bool  flag=true;
 
-	_printf_(flag,"OptionStruct Echo:\n");
+	if(flag) _pprintLine_("OptionStruct Echo:");
 	Option::Echo();
 
 	if (values && size) {
 		StringFromSize(cstr,size,ndims);
-		_printf_(flag,"        values: %s %s\n" ,cstr,"struct");
+		if(flag) _pprintLine_("        values: " << cstr << " " << "struct");
 	}
-	else _printf_(flag,"        values: [empty]\n" );
+	else if(flag) _pprintLine_("        values: [empty]");
 }
 /*}}}*/
@@ -80,5 +80,5 @@
 	bool  flag=true;
 
-	_printf_(flag,"%sOptionStruct DeepEcho:\n",indent);
+	if(flag) _pprintLine_("" << indent << "OptionStruct DeepEcho:");
 	Option::DeepEcho(indent);
 
@@ -92,13 +92,13 @@
 			StringFromDims(cstr,dims,ndims);
 			if (values[i]->Size()){
-				_printf_(flag,"%s        values: -------- begin %s --------\n" ,indent,cstr);
+				if(flag) _pprintLine_("" << indent << "        values: -------- begin " << cstr << " --------");
 				for (j=0; j<values[i]->Size(); j++) ((Option *)values[i]->GetObjectByOffset(j))->DeepEcho(indent2);
-				_printf_(flag,"%s        values: --------  end  %s --------\n" ,indent,cstr);
+				if(flag) _pprintLine_("" << indent << "        values: --------  end  " << cstr << " --------");
 			}
-			else _printf_(flag,"%s        values: %s [empty]\n" ,indent,cstr);
+			else if(flag) _pprintLine_("" << indent << "        values: " << cstr << " [empty]");
 		}
 		xDelete<int>(dims);
 	}
-	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+	else if(flag) _pprintLine_("" << indent << "        values: [empty]");
 }
 /*}}}*/
Index: /issm/trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp	(revision 12515)
@@ -91,5 +91,5 @@
 	 _pprintLine_("         "<<setw(5)<<iter<<"    "<<setw(12)<<xbest<<"  "<<setw(12)<<fxbest<<"  "<<setw(12)<<pow(pow(xbest-xm,2),0.5)<<"         initial");
 	if (!isnan(cm_jump) && (xmin==0) && ((fxbest/fxmin)<cm_jump)){
-		_printf_(VerboseControl(),"      optimization terminated: current x satisfies criteria 'cm_jump'=%g\n",cm_jump);
+		if(VerboseControl()) _pprintLine_("      optimization terminated: current x satisfies criteria 'cm_jump'=" << cm_jump);
 		loop=false;
 	}
@@ -190,13 +190,13 @@
 		/*Stop the optimization?*/
 		if (sqrt(pow(xbest-xm,2)) < (tol2-0.5*(xmax-xmin))){
-			_printf_(VerboseControl(),"      optimization terminated: current x satisfies criteria 'tolx'=%g\n",tolerance);
+			if(VerboseControl()) _pprintLine_("      optimization terminated: current x satisfies criteria 'tolx'=" << tolerance);
 			loop=false;
 		}
 		else if (iter>=maxiter){
-			_printf_(VerboseControl(),"      exiting: Maximum number of iterations has been exceeded  ('maxiter'=%i)\n",maxiter);
+			if(VerboseControl()) _pprintLine_("      exiting: Maximum number of iterations has been exceeded  ('maxiter'=" << maxiter << ")");
 			loop=false;
 		}
 		else if (!isnan(cm_jump) && (xmin==0) && ((fxbest/fxmin)<cm_jump)){
-			_printf_(VerboseControl(),"      optimization terminated: current x satisfies criteria 'cm_jump'=%g\n",cm_jump);
+			if(VerboseControl()) _pprintLine_("      optimization terminated: current x satisfies criteria 'cm_jump'=" << cm_jump);
 			loop=false;
 		}
Index: /issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12515)
@@ -51,5 +51,5 @@
 		sizeof(wgt4 )/sizeof(IssmPDouble)};
 
-	//	_printf_(true,"Gauss-Legendre recurrence coefficients ngaus=%d\n",ngaus);
+	//	if(true) _pprintLine_("Gauss-Legendre recurrence coefficients ngaus=" << ngaus);
 	*pxgaus =xNew<IssmPDouble>(ngaus);
 	*pxwgt  =xNew<IssmPDouble>(ngaus);
@@ -1139,5 +1139,5 @@
 		sizeof(wgt20)/sizeof(IssmPDouble)};
 
-	//	_printf_(true,"GaussLegendreTria: iord=%d\n",iord);
+	//	if(true) _pprintLine_("GaussLegendreTria: iord=" << iord);
 
 	/*  check to see if Gauss points need to be calculated  */
@@ -1199,5 +1199,5 @@
 	}
 
-	//	_printf_(true,"GaussLegendreTria - ngaus=%d\n",*pngaus);
+	//	if(true) _pprintLine_("GaussLegendreTria - ngaus=" << *pngaus);
 	//	for (i=0; i<*pngaus; i++)
 	//		_printf_(true,"i=%d: l1gaus=%f,l2gaus=%f,l3gaus=%f,wgt=%f\n",
@@ -1398,5 +1398,5 @@
 		sizeof(wgt6 )/sizeof(IssmPDouble)};
 
-	//	_printf_(true,"GaussLegendreTetra: iord=%d\n",iord);
+	//	if(true) _pprintLine_("GaussLegendreTetra: iord=" << iord);
 
 	/*  check to see if Gauss points need to be calculated  */
@@ -1521,5 +1521,5 @@
 		sizeof(wgt5 )/sizeof(IssmPDouble)};
 
-	//	_printf_(true,"Gauss-Lobatto recurrence coefficients ngaus=%d\n",ngaus);
+	//	if(true) _pprintLine_("Gauss-Lobatto recurrence coefficients ngaus=" << ngaus);
 	*pxgaus =xNew<IssmPDouble>(ngaus);
 	*pxwgt  =xNew<IssmPDouble>(ngaus);
Index: /issm/trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp	(revision 12515)
@@ -63,9 +63,9 @@
 		//Stop the optimization?
 		if ((fabs(x2-x1)+seps)<tolerance || (fabs(fx2-fx1)+seps)<tolerance){
-			_printf_(VerboseControl(),"      %s%g\n","optimization terminated: the current x satisfies the termination criteria using 'tolx' of " ,tolerance);
+			if(VerboseControl()) _pprintLine_("      " << "optimization terminated: the current x satisfies the termination criteria using 'tolx' of "  << tolerance);
 			loop=false;
 		}
 		else if (iter>=maxiter){
-			_printf_(VerboseControl(),"      %s\n","exiting: Maximum number of iterations has been exceeded  - increase 'maxiter'\n");
+			if(VerboseControl()) _pprintLine_("      " << "exiting: Maximum number of iterations has been exceeded  - increase 'maxiter'");
 			loop=false;
 		}
Index: /issm/trunk-jpl/src/c/solutions/ResetBoundaryConditions.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/ResetBoundaryConditions.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/ResetBoundaryConditions.cpp	(revision 12515)
@@ -15,5 +15,5 @@
 	int    i;
 
-	_printf_(VerboseSolution(),"%s\n","   updating boundary conditions...");
+	if(VerboseSolution()) _pprintLine_("" << "   updating boundary conditions...");
 			
 	/*set current analysis: */
Index: /issm/trunk-jpl/src/c/solutions/adjointbalancethickness_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/adjointbalancethickness_core.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/adjointbalancethickness_core.cpp	(revision 12515)
@@ -22,5 +22,5 @@
 
 	/*compute thickness */
-	_printf_(VerboseSolution(),"%s\n","   computing thickness");
+	if(VerboseSolution()) _pprintLine_("" << "   computing thickness");
 	femmodel->SetCurrentConfiguration(BalancethicknessAnalysisEnum);
 	solver_linear(femmodel);
@@ -30,5 +30,5 @@
 
 	/*compute adjoint*/
-	_printf_(VerboseSolution(),"%s\n","   computing adjoint");
+	if(VerboseSolution()) _pprintLine_("" << "   computing adjoint");
 	femmodel->SetCurrentConfiguration(BalancethicknessAnalysisEnum,AdjointBalancethicknessAnalysisEnum);
 	solver_adjoint_linear(femmodel);
@@ -36,5 +36,5 @@
 	/*Save results*/
 	if(save_results){
-		_printf_(VerboseSolution(),"   saving results\n");
+		if(VerboseSolution()) _pprintLine_("   saving results");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointEnum);
 	}
Index: /issm/trunk-jpl/src/c/solutions/adjointdiagnostic_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/adjointdiagnostic_core.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/adjointdiagnostic_core.cpp	(revision 12515)
@@ -25,5 +25,5 @@
 
 	/*Compute velocities*/
-	_printf_(VerboseSolution(),"%s\n","   computing velocities");
+	if(VerboseSolution()) _pprintLine_("" << "   computing velocities");
 	femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum);
 	solver_nonlinear(femmodel,conserve_loads); 
@@ -33,5 +33,5 @@
 
 	/*Compute adjoint*/
-	_printf_(VerboseSolution(),"%s\n","   computing adjoint");
+	if(VerboseSolution()) _pprintLine_("" << "   computing adjoint");
 	femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum,AdjointHorizAnalysisEnum);
 	solver_adjoint_linear(femmodel);
@@ -39,5 +39,5 @@
 	/*Save results*/
 	if(save_results){
-		_printf_(VerboseSolution(),"   saving results\n");
+		if(VerboseSolution()) _pprintLine_("   saving results");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointxEnum);
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointyEnum);
Index: /issm/trunk-jpl/src/c/solutions/balancethickness_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/balancethickness_core.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/balancethickness_core.cpp	(revision 12515)
@@ -24,9 +24,9 @@
 	femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
 
-	_printf_(VerboseSolution(),"call computational core:\n");
+	if(VerboseSolution()) _pprintLine_("call computational core:");
 	solver_linear(femmodel);
 
 	if(save_results){
-		_printf_(VerboseSolution(),"   saving results\n");
+		if(VerboseSolution()) _pprintLine_("   saving results");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,ThicknessEnum);
 	}
Index: /issm/trunk-jpl/src/c/solutions/bedslope_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/bedslope_core.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/bedslope_core.cpp	(revision 12515)
@@ -19,5 +19,5 @@
 	femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
 
-	_printf_(VerboseSolution(),"%s\n","   computing slope");
+	if(VerboseSolution()) _pprintLine_("" << "   computing slope");
 
 	/*Call on core computations: */
@@ -28,5 +28,5 @@
 	
 	if(save_results){
-		_printf_(VerboseSolution(),"   saving results\n");
+		if(VerboseSolution()) _pprintLine_("   saving results");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BedSlopeXEnum);
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BedSlopeYEnum);
Index: /issm/trunk-jpl/src/c/solutions/control_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/control_core.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/control_core.cpp	(revision 12515)
@@ -66,5 +66,5 @@
 
 	/*Launch once a complete solution to set up all inputs*/
-	_printf_(VerboseControl(),"%s\n","   preparing initial solution");
+	if(VerboseControl()) _pprintLine_("" << "   preparing initial solution");
 	if(isstokes) solutioncore(femmodel);
 
@@ -81,5 +81,5 @@
 
 		/*Display info*/
-		_printf_(VerboseControl(),"\n%s%i%s%i\n","   control method step ",n+1,"/",nsteps);
+		if(VerboseControl()) _pprintLine_("\n" << "   control method step " << n+1 << "/" << nsteps);
 		for(i=0;i<num_responses;i++) step_responses[i]=(int)responses[n*num_responses+i];
 		femmodel->parameters->SetParam(step_responses,1,num_responses,StepResponsesEnum);
@@ -88,5 +88,5 @@
 		if(solution_type==SteadystateSolutionEnum) solutioncore(femmodel);
 
-		_printf_(VerboseControl(),"%s\n","   compute adjoint state:");
+		if(VerboseControl()) _pprintLine_("" << "   compute adjoint state:");
 		adjointcore(femmodel);
 		gradient_core(femmodel,n,search_scalar==0);
@@ -98,9 +98,9 @@
 		}
 
-		_printf_(VerboseControl(),"%s\n","   optimizing along gradient direction");
+		if(VerboseControl()) _pprintLine_("" << "   optimizing along gradient direction");
 		optpars.maxiter=(int)maxiter[n]; optpars.cm_jump=cm_jump[n];
 		BrentSearch(&search_scalar,J+n,&optpars,&objectivefunction,&optargs);
 
-		_printf_(VerboseControl(),"%s\n","   updating parameter using optimized search scalar"); //true means update save controls
+		if(VerboseControl()) _pprintLine_("" << "   updating parameter using optimized search scalar"); //true means update save controls
 		InputControlUpdatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,search_scalar,true);
 		
@@ -108,5 +108,5 @@
 	}
 
-	_printf_(VerboseControl(),"%s\n","   preparing final solution");
+	if(VerboseControl()) _pprintLine_("" << "   preparing final solution");
 	femmodel->parameters->SetParam(true,SaveResultsEnum);
 	solutioncore(femmodel);
Index: /issm/trunk-jpl/src/c/solutions/controlconvergence.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/controlconvergence.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/controlconvergence.cpp	(revision 12515)
@@ -25,5 +25,5 @@
 	if (!isnan(tol_cm) && J<tol_cm){
 		converged=true;
-		_printf_(VerboseConvergence(),"      Convergence criterion reached: J = %g < %g",J,tol_cm);
+		if(VerboseConvergence()) _pprintString_("      Convergence criterion reached: J = " << J << " < " << tol_cm);
 	}
 
Index: /issm/trunk-jpl/src/c/solutions/controltao_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 12515)
@@ -54,5 +54,5 @@
 	/*Initialize TAO*/
 	TaoCreate(PETSC_COMM_WORLD,&tao);
-	_printf_(VerboseControl(),"%s\n","   Initializing the Toolkit for Advanced Optimization (TAO)");
+	if(VerboseControl()) _pprintLine_("" << "   Initializing the Toolkit for Advanced Optimization (TAO)");
 	TaoSetFromOptions(tao);
 	TaoSetType(tao,"tao_blmvm");
@@ -78,5 +78,5 @@
 
 	/*Solver optimization problem*/
-	_printf_(VerboseControl(),"%s\n","   Starting optimization");
+	if(VerboseControl()) _pprintLine_("" << "   Starting optimization");
 	TaoSolve(tao);
 	TaoView(tao,PETSC_VIEWER_STDOUT_WORLD);
@@ -88,5 +88,5 @@
 
 	/*Finalize*/
-	_printf_(VerboseControl(),"%s\n","   preparing final solution");
+	if(VerboseControl()) _pprintLine_("" << "   preparing final solution");
 	femmodel->parameters->SetParam(true,SaveResultsEnum);
 	void (*solutioncore)(FemModel*)=NULL;
@@ -163,6 +163,6 @@
 
 	TaoGetSolutionStatus(tao, &its, &f, &gnorm, &cnorm, &xdiff, NULL);
-	if(its==0) _printf_(true,"Iter       Function      Residual  |  List of contributions\n");
-	if(its==0) _printf_(true,"-----------------------------------+-----------------------\n");
+	if(its==0) if(true) _pprintLine_("Iter       Function      Residual  |  List of contributions");
+	if(its==0) if(true) _pprintLine_("-----------------------------------+-----------------------");
 	_pprintString_(setw(4)<<its<<"   "<<setw(12)<<setprecision(7)<<f<<"  "<<setw(12)<<setprecision(7)<<gnorm<<"  | ");
 
Index: /issm/trunk-jpl/src/c/solutions/convergence.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/convergence.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/convergence.cpp	(revision 12515)
@@ -55,5 +55,5 @@
 		nF=pf->Norm(NORM_TWO);
 		solver_residue=nKUF/nF;
-		_printf_(true,"\n%s%g\n","   solver residue: norm(KU-F)/norm(F)=",solver_residue);
+		if(true) _pprintLine_("\n" << "   solver residue: norm(KU-F)/norm(F)=" << solver_residue);
 
 		//clean up
@@ -71,5 +71,5 @@
 	res=nKUoldF/nF;
 	if (isnan(res)){
-		_printf_(true,"norm nf = %lf and norm kuold = %lf\n",nF,nKUoldF);
+		if(true) _pprintLine_("norm nf = " << nF << "f and norm kuold = " << nKUoldF << "f");
 		_error2_("mechanical equilibrium convergence criterion is NaN!");
 	}
@@ -81,9 +81,9 @@
 	//print
 	if(res<eps_res){
-		_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   mechanical equilibrium convergence criterion",res*100," < ",eps_res*100," %");
+		if(VerboseConvergence()) _pprintLine_("" << "   mechanical equilibrium convergence criterion" << "50s" << res*100 << " < " << eps_res*100 << " %");
 		converged=true;
 	}
 	else{ 
-		_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   mechanical equilibrium convergence criterion",res*100," > ",eps_res*100," %");
+		if(VerboseConvergence()) _pprintLine_("" << "   mechanical equilibrium convergence criterion" << "50s" << res*100 << " > " << eps_res*100 << " %");
 		converged=false;
 	}
@@ -104,12 +104,12 @@
 		if (!isnan(eps_rel)){
 			if((ndu/nu)<eps_rel){
-				_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   Convergence criterion: norm(du)/norm(u)",ndu/nu*100," < ",eps_rel*100," %");
+				if(VerboseConvergence()) _pprintLine_("" << "   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " < " << eps_rel*100 << " %");
 			}
 			else{ 
-				_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   Convergence criterion: norm(du)/norm(u)",ndu/nu*100," > ",eps_rel*100," %");
+				if(VerboseConvergence()) _pprintLine_("" << "   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " > " << eps_rel*100 << " %");
 				converged=false;
 			}
 		}
-		else _printf_(true,"%-50s%g%s\n","   Convergence criterion: norm(du)/norm(u)",ndu/nu*100," %");
+		else if(true) _pprintLine_("" << "   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " %");
 
 	}
@@ -129,12 +129,12 @@
 		if (!isnan(eps_abs)){
 			if ((nduinf*yts)<eps_abs){
-				_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   Convergence criterion: max(du)",nduinf*yts," < ",eps_abs," m/yr");
+				if(VerboseConvergence()) _pprintLine_("" << "   Convergence criterion: max(du)" << "50s" << nduinf*yts << " < " << eps_abs << " m/yr");
 			}
 			else{
-				_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   Convergence criterion: max(du)",nduinf*yts," > ",eps_abs," m/yr");
+				if(VerboseConvergence()) _pprintLine_("" << "   Convergence criterion: max(du)" << "50s" << nduinf*yts << " > " << eps_abs << " m/yr");
 				converged=false;
 			}
 		}
-		else  _printf_(true,"%-50s%g%s\n","   Convergence criterion: max(du)",nduinf*yts," m/yr");
+		else  if(true) _pprintLine_("" << "   Convergence criterion: max(du)" << "50s" << nduinf*yts << " m/yr");
 
 	}
Index: /issm/trunk-jpl/src/c/solutions/diagnostic_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/diagnostic_core.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/diagnostic_core.cpp	(revision 12515)
@@ -59,5 +59,5 @@
 	if(ishutter){
 			
-		_printf_(VerboseSolution(),"%s\n","   computing hutter velocities");
+		if(VerboseSolution()) _pprintLine_("" << "   computing hutter velocities");
 
 		//Take the last velocity into account so that the velocity on the MacAyeal domain is not zero
@@ -72,5 +72,5 @@
 	if (ismacayealpattyn ^ isstokes){ // ^ = xor
 		
-		_printf_(VerboseSolution(),"%s\n","   computing velocities");
+		if(VerboseSolution()) _pprintLine_("" << "   computing velocities");
 		femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum);
 		if(isnewton)
@@ -82,5 +82,5 @@
 	if (ismacayealpattyn && isstokes){
 
-		_printf_(VerboseSolution(),"%s\n","   computing coupling macayealpattyn and stokes velocities and pressure ");
+		if(VerboseSolution()) _pprintLine_("" << "   computing coupling macayealpattyn and stokes velocities and pressure ");
 		solver_stokescoupling_nonlinear(femmodel,conserve_loads);
 	}
@@ -88,5 +88,5 @@
 	if (dim==3 & (ishutter || ismacayealpattyn)){
 
-		_printf_(VerboseSolution(),"%s\n","   computing vertical velocities");
+		if(VerboseSolution()) _pprintLine_("" << "   computing vertical velocities");
 		femmodel->SetCurrentConfiguration(DiagnosticVertAnalysisEnum);
 		solver_linear(femmodel);
@@ -95,5 +95,5 @@
 
 	if(save_results){
-		_printf_(VerboseSolution(),"   saving results\n");
+		if(VerboseSolution()) _pprintLine_("   saving results");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum);
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum);
Index: /issm/trunk-jpl/src/c/solutions/enthalpy_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/enthalpy_core.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/enthalpy_core.cpp	(revision 12515)
@@ -21,5 +21,5 @@
 	femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
 
-	_printf_(VerboseSolution(),"   computing enthalpy\n");
+	if(VerboseSolution()) _pprintLine_("   computing enthalpy");
 	femmodel->SetCurrentConfiguration(EnthalpyAnalysisEnum);
 	solver_nonlinear(femmodel,true);
@@ -29,5 +29,5 @@
 
 	if(save_results){
-		_printf_(VerboseSolution(),"   saving results\n");
+		if(VerboseSolution()) _pprintLine_("   saving results");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,TemperatureEnum);
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,EnthalpyEnum);
Index: /issm/trunk-jpl/src/c/solutions/gradient_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/gradient_core.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/gradient_core.cpp	(revision 12515)
@@ -23,9 +23,9 @@
 
 	/*Compute gradient*/
-	_printf_(VerboseControl(),"   compute cost function gradient\n");
+	if(VerboseControl()) _pprintLine_("   compute cost function gradient");
 	Gradjx(&gradient,&norm_list,femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters);
 
 	if (orthogonalize){
-		_printf_(VerboseControl(),"   orthogonalization\n");
+		if(VerboseControl()) _pprintLine_("   orthogonalization");
 		ControlInputGetGradientx(&old_gradient,femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters);
 		Orthx(&new_gradient,gradient,old_gradient); xdelete(&old_gradient); xdelete(&gradient);
Index: /issm/trunk-jpl/src/c/solutions/hydrology_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/hydrology_core.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/hydrology_core.cpp	(revision 12515)
@@ -45,5 +45,5 @@
 	for(i=0;i<nsteps;i++){
 		
-		if(nsteps)_printf_(VerboseSolution(),"time step:%i/%i\n",i+1,nsteps);
+		if(nsteps)if(VerboseSolution()) _pprintLine_("time step:" << i+1 << "/" << nsteps);
 		time+=dt;
 		femmodel->parameters->SetParam(time,TimeEnum);
@@ -53,5 +53,5 @@
 
 		if(save_results && ((i+1)%output_frequency==0 || (i+1)==nsteps)){
-			_printf_(VerboseSolution(),"   saving results \n");
+			if(VerboseSolution()) _pprintLine_("   saving results ");
 			//InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,WatercolumnEnum,i+1,time);
 			//InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,HydrologyWaterVxEnum,i+1,time);
@@ -59,5 +59,5 @@
 			
 			/*unload results*/
-			_printf_(VerboseSolution(),"   saving temporary results\n");
+			if(VerboseSolution()) _pprintLine_("   saving temporary results");
 			OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results);
 		}
Index: /issm/trunk-jpl/src/c/solutions/hydrology_core_step.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/hydrology_core_step.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/hydrology_core_step.cpp	(revision 12515)
@@ -17,5 +17,5 @@
 	bool modify_loads=true;
 
-	_printf_(VerboseSolution(),"   computing water column\n");
+	if(VerboseSolution()) _pprintLine_("   computing water column");
 	femmodel->SetCurrentConfiguration(HydrologyAnalysisEnum);
 	solver_nonlinear(femmodel,modify_loads);
Index: /issm/trunk-jpl/src/c/solutions/issm.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/issm.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/issm.cpp	(revision 12515)
@@ -60,8 +60,8 @@
 
 	/*First process inputs*/
-	_printf_(true,"\n");
-	_printf_(true,"Ice Sheet System Model (%s) version %s\n",PACKAGE_NAME,PACKAGE_VERSION);
-	_printf_(true,"(website: %s contact: %s)\n",PACKAGE_URL,PACKAGE_BUGREPORT);
-	_printf_(true,"\n");
+	if(true) _pprintLine_("");
+	if(true) _pprintLine_("Ice Sheet System Model (" << PACKAGE_NAME << ") version " << PACKAGE_VERSION);
+	if(true) _pprintLine_("(website: " << PACKAGE_URL << " contact: " << PACKAGE_BUGREPORT << ")");
+	if(true) _pprintLine_("");
 	ProcessArguments(&solution_type,&binfilename,&outbinfilename,&petscfilename,&lockfilename,argc,argv);
 
@@ -100,5 +100,5 @@
 	#endif
 
-	_printf_(true,"call computational core:\n");
+	if(true) _pprintLine_("call computational core:");
 	#ifdef _HAVE_MPI_
 	MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
@@ -133,5 +133,5 @@
 	#endif
 	
-	_printf_(true,"write results to disk:\n");
+	if(true) _pprintLine_("write results to disk:");
 	OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results);
 
@@ -139,5 +139,5 @@
 	pfclose(output_fid,lockfilename);
 	if (waitonlock>0){
-		_printf_(true,"write lock file:\n");
+		if(true) _pprintLine_("write lock file:");
 		WriteLockFile(lockfilename);
 	}
@@ -174,9 +174,9 @@
 	
 	#ifdef _HAVE_PETSC_
-	_printf_(true,"closing MPI and Petsc\n");
+	if(true) _pprintLine_("closing MPI and Petsc");
 	PetscFinalize(); 
 	#else
 	#ifdef _HAVE_MPI_
-	_printf_(true,"closing MPI and Petsc\n");
+	if(true) _pprintLine_("closing MPI and Petsc");
 	MPI_Finalize();
 	#endif
Index: /issm/trunk-jpl/src/c/solutions/kriging.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/kriging.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/kriging.cpp	(revision 12515)
@@ -54,8 +54,8 @@
 
 	/*First process inputs*/
-	_printf_(true,"\n");
-	_printf_(true,"Ice Sheet System Model (%s) version %s\n",PACKAGE_NAME,PACKAGE_VERSION);
-	_printf_(true,"(website: %s contact: %s)\n",PACKAGE_URL,PACKAGE_BUGREPORT);
-	_printf_(true,"\n");
+	if(true) _pprintLine_("");
+	if(true) _pprintLine_("Ice Sheet System Model (" << PACKAGE_NAME << ") version " << PACKAGE_VERSION);
+	if(true) _pprintLine_("(website: " << PACKAGE_URL << " contact: " << PACKAGE_BUGREPORT << ")");
+	if(true) _pprintLine_("");
 	ProcessArguments2(&binfilename,&outbinfilename,&lockfilename,argc,argv);
 
@@ -65,8 +65,8 @@
 	pfclose(input_fid,binfilename);
 
-	_printf_(true,"call computational core:\n");
+	if(true) _pprintLine_("call computational core:");
 	pKrigingx(&predictions,&error,x,y,data,nobs,x_interp,y_interp,ninterp,options);
 
-	_printf_(true,"write results to disk:\n");
+	if(true) _pprintLine_("write results to disk:");
 	Results *results = new Results();
 	if(my_rank==0){
@@ -82,5 +82,5 @@
 
 	/*Close output and petsc options file and write lock file if requested*/
-	_printf_(true,"write lock file:\n");
+	if(true) _pprintLine_("write lock file:");
 	WriteLockFile(lockfilename);
 
@@ -100,9 +100,9 @@
 
 #ifdef _HAVE_PETSC_
-	_printf_(true,"closing MPI and Petsc\n");
+	if(true) _pprintLine_("closing MPI and Petsc");
 	PetscFinalize(); 
 #else
 #ifdef _HAVE_MPI_
-	_printf_(true,"closing MPI and Petsc\n");
+	if(true) _pprintLine_("closing MPI and Petsc");
 	MPI_Finalize();
 #endif
Index: /issm/trunk-jpl/src/c/solutions/prognostic_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/prognostic_core.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/prognostic_core.cpp	(revision 12515)
@@ -26,13 +26,13 @@
 
 	if(ispdd){
-	  _printf_(VerboseSolution(),"   call positive degree day module\n");
+	  if(VerboseSolution()) _pprintLine_("   call positive degree day module");
 	  PositiveDegreeDayx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
 	}	
 
-	_printf_(VerboseSolution(),"   call computational core\n");
+	if(VerboseSolution()) _pprintLine_("   call computational core");
 	solver_linear(femmodel);
 	
 	if(save_results){
-		_printf_(VerboseSolution(),"   saving results\n");
+		if(VerboseSolution()) _pprintLine_("   saving results");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,ThicknessEnum);
 	}
Index: /issm/trunk-jpl/src/c/solutions/steadystate_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/steadystate_core.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/steadystate_core.cpp	(revision 12515)
@@ -9,4 +9,5 @@
 #endif
 
+#include "../include/include.h"
 #include "../toolkits/toolkits.h"
 #include "../objects/objects.h"
@@ -16,5 +17,4 @@
 #include "./solutions.h"
 #include "../modules/modules.h"
-#include "../include/include.h"
 #include "../solvers/solvers.h"
 
@@ -43,5 +43,5 @@
 	for(;;){
 	
-		_printf_(VerboseSolution(),"%s%i\n","   computing temperature and velocity for step: ",step);
+		if(VerboseSolution()) _pprintLine_("   computing temperature and velocity for step: " << step);
 		#ifdef _HAVE_THERMAL_
 		if(isenthalpy==0){
@@ -55,17 +55,17 @@
 		#endif
 
-		_printf_(VerboseSolution(),"%s\n","   computing new velocity");
+		if(VerboseSolution()) _pprintLine_("" << "   computing new velocity");
 		diagnostic_core(femmodel);
 
 		if (step>1){
-			_printf_(VerboseSolution(),"%s\n","   checking velocity, temperature and pressure convergence");
+			if(VerboseSolution()) _pprintLine_("" << "   checking velocity, temperature and pressure convergence");
 			if(steadystateconvergence(femmodel)) break;
 		}
 		if(step>maxiter){
-			_printf_(VerboseSolution(),"%s%i%s\n","   maximum number steadystate iterations ",maxiter," reached");
+			if(VerboseSolution()) _pprintLine_("" << "   maximum number steadystate iterations " << maxiter << " reached");
 			break;
 		}
 		
-		_printf_(VerboseSolution(),"%s\n","   saving velocity, temperature and pressure to check for convergence at next step");
+		if(VerboseSolution()) _pprintLine_("" << "   saving velocity, temperature and pressure to check for convergence at next step");
 		InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum,VxPicardEnum);
 		InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum,VyPicardEnum);
@@ -79,5 +79,5 @@
 	
 	if(save_results){
-		_printf_(VerboseSolution(),"   saving results\n");
+		if(VerboseSolution()) _pprintLine_("   saving results");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum);
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum);
Index: /issm/trunk-jpl/src/c/solutions/surfaceslope_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/surfaceslope_core.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/surfaceslope_core.cpp	(revision 12515)
@@ -19,5 +19,5 @@
 	femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
 
-	_printf_(VerboseSolution(),"%s\n","computing slope...");
+	if(VerboseSolution()) _pprintLine_("" << "computing slope...");
 
 	/*Call on core computations: */
@@ -28,5 +28,5 @@
 	
 	if(save_results){
-		_printf_(VerboseSolution(),"saving results:\n");
+		if(VerboseSolution()) _pprintLine_("saving results:");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceSlopeXEnum);
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceSlopeYEnum);
Index: /issm/trunk-jpl/src/c/solutions/thermal_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/thermal_core.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/thermal_core.cpp	(revision 12515)
@@ -29,14 +29,14 @@
 	}
 
-	_printf_(VerboseSolution(),"   computing temperatures\n");
+	if(VerboseSolution()) _pprintLine_("   computing temperatures");
 	femmodel->SetCurrentConfiguration(ThermalAnalysisEnum);
 	solver_thermal_nonlinear(femmodel);
 
-	_printf_(VerboseSolution(),"   computing melting\n");
+	if(VerboseSolution()) _pprintLine_("   computing melting");
 	femmodel->SetCurrentConfiguration(MeltingAnalysisEnum);
 	solver_linear(femmodel);
 
 	if(save_results){
-		_printf_(VerboseSolution(),"   saving results\n");
+		if(VerboseSolution()) _pprintLine_("   saving results");
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,TemperatureEnum);
 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BasalforcingsMeltingRateEnum);
Index: /issm/trunk-jpl/src/c/solutions/transient_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/transient_core.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solutions/transient_core.cpp	(revision 12515)
@@ -86,5 +86,5 @@
 		femmodel->parameters->SetParam(step,StepEnum);
 
-		_printf_(VerboseSolution(),"iteration %i/%g  time [yr]: %-7.3g (time step: %.2g)\n",step,floor((finaltime-time)/dt)+step,time/yts,dt/yts);
+		if(VerboseSolution()) _pprintLine_("iteration " << step << "/" << floor((finaltime-time)/dt)+step << "  time [yr]: " << time/yts << "7.3g (time step: " << dt/yts << "2g)");
 		if(step%output_frequency==0 || time==finaltime)
 		 save_results=true;
@@ -94,5 +94,5 @@
 
 		if(isthermal && dim==3){
-			_printf_(VerboseSolution(),"   computing temperatures\n");
+			if(VerboseSolution()) _pprintLine_("   computing temperatures");
 			#ifdef _HAVE_THERMAL_
 			if(isenthalpy==0){
@@ -108,5 +108,5 @@
 
 		if(isdiagnostic){
-			_printf_(VerboseSolution(),"   computing new velocity\n");
+			if(VerboseSolution()) _pprintLine_("   computing new velocity");
 			#ifdef _HAVE_DIAGNOSTIC_
 			diagnostic_core(femmodel);
@@ -117,12 +117,12 @@
 
 		if(isprognostic){
-			_printf_(VerboseSolution(),"   computing new thickness\n");
+			if(VerboseSolution()) _pprintLine_("   computing new thickness");
 			prognostic_core(femmodel);
-			_printf_(VerboseSolution(),"   updating vertices positions\n");
+			if(VerboseSolution()) _pprintLine_("   updating vertices positions");
 			UpdateVertexPositionsx(femmodel->elements, femmodel->nodes,femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters); 
 		}
 
 		if(isgroundingline){
-			_printf_(VerboseSolution(),"   computing new grounding line position\n");
+			if(VerboseSolution()) _pprintLine_("   computing new grounding line position");
 			#ifdef _HAVE_GROUNDINGLINE_
 			GroundinglineMigrationx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
@@ -134,5 +134,5 @@
 		/*unload results*/
 		if(save_results){
-			_printf_(VerboseSolution(),"   saving transient results\n");
+			if(VerboseSolution()) _pprintLine_("   saving transient results");
 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceEnum);
 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BedEnum);
@@ -141,5 +141,5 @@
 			RequestedOutputsx(femmodel->results,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,requested_outputs,numoutputs);
 
-			_printf_(VerboseSolution(),"   saving temporary results\n");
+			if(VerboseSolution()) _pprintLine_("   saving temporary results");
 			OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results);
 		}
Index: /issm/trunk-jpl/src/c/solvers/solver_newton.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solvers/solver_newton.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solvers/solver_newton.cpp	(revision 12515)
@@ -75,5 +75,5 @@
 		}
 		if(count>=max_nonlinear_iterations){
-			_printf_(true,"   maximum number of Newton iterations (%i) exceeded\n",max_nonlinear_iterations); 
+			if(true) _pprintLine_("   maximum number of Newton iterations (" << max_nonlinear_iterations << ") exceeded"); 
 			bool max_iteration_state=true;
 			int tempStep=1;
@@ -100,5 +100,5 @@
 	}
 
-	_printf_(VerboseConvergence(),"\n   total number of iterations: %i\n",count-1);
+	if(VerboseConvergence()) _pprintLine_("\n   total number of iterations: " << count-1);
 
 	/*clean-up*/
Index: /issm/trunk-jpl/src/c/solvers/solver_nonlinear.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solvers/solver_nonlinear.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solvers/solver_nonlinear.cpp	(revision 12515)
@@ -73,5 +73,5 @@
 
 		ConstraintsStatex(&constraints_converged, &num_unstable_constraints, femmodel->elements,femmodel->nodes,femmodel->vertices,loads,femmodel->materials,femmodel->parameters);
-		_printf_(VerboseConvergence(),"   number of unstable constraints: %i\n",num_unstable_constraints);
+		if(VerboseConvergence()) _pprintLine_("   number of unstable constraints: " << num_unstable_constraints);
 
 		//rift convergence
@@ -93,5 +93,5 @@
 		}
 		if(count>=max_nonlinear_iterations){
-			_printf_(true,"   maximum number of nonlinear iterations (%i) exceeded\n",max_nonlinear_iterations); 
+			if(true) _pprintLine_("   maximum number of nonlinear iterations (" << max_nonlinear_iterations << ") exceeded"); 
 			converged=true;
 			InputUpdateFromConstantx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,converged,ConvergedEnum);
@@ -105,5 +105,5 @@
 	}
 
-	_printf_(VerboseConvergence(),"\n   total number of iterations: %i\n",count-1);
+	if(VerboseConvergence()) _pprintLine_("\n   total number of iterations: " << count-1);
 
 	/*clean-up*/
Index: /issm/trunk-jpl/src/c/solvers/solver_stokescoupling_nonlinear.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solvers/solver_stokescoupling_nonlinear.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solvers/solver_stokescoupling_nonlinear.cpp	(revision 12515)
@@ -91,5 +91,5 @@
 		if(converged==true)break;
 		if(count>=max_nonlinear_iterations){
-			_printf_(true,"   maximum number of iterations (%i) exceeded\n",max_nonlinear_iterations); 
+			if(true) _pprintLine_("   maximum number of iterations (" << max_nonlinear_iterations << ") exceeded"); 
 			break;
 		}
Index: /issm/trunk-jpl/src/c/solvers/solver_thermal_nonlinear.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solvers/solver_thermal_nonlinear.cpp	(revision 12514)
+++ /issm/trunk-jpl/src/c/solvers/solver_thermal_nonlinear.cpp	(revision 12515)
@@ -47,5 +47,5 @@
 	converged=false;
 
-	_printf_(VerboseSolution(),"%s\n","starting direct shooting method");
+	if(VerboseSolution()) _pprintLine_("" << "starting direct shooting method");
 	InputUpdateFromConstantx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,true,ResetPenaltiesEnum);
 	InputUpdateFromConstantx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,false,ConvergedEnum);
@@ -66,9 +66,9 @@
 
 		if (!converged){
-			_printf_(VerboseConvergence(),"%s%i\n","   #unstable constraints = ",num_unstable_constraints);
+			if(VerboseConvergence()) _pprintLine_("" << "   #unstable constraints = " << num_unstable_constraints);
 			if (num_unstable_constraints <= thermal_penalty_threshold)converged=true;
 			if (count>=thermal_maxiter){
 				converged=true;
-				_printf_(true,"   maximum number of iterations (%i) exceeded\n",thermal_maxiter); 
+				if(true) _pprintLine_("   maximum number of iterations (" << thermal_maxiter << ") exceeded"); 
 			}
 		}
