[Earthmovdist-commits] r31 - pkg/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Apr 18 16:39:51 CEST 2012


Author: edd
Date: 2012-04-18 16:39:51 +0200 (Wed, 18 Apr 2012)
New Revision: 31

Modified:
   pkg/src/emdL1.cpp
Log:
use Rprintf() instead of printf()


Modified: pkg/src/emdL1.cpp
===================================================================
--- pkg/src/emdL1.cpp	2012-04-18 12:53:01 UTC (rev 30)
+++ pkg/src/emdL1.cpp	2012-04-18 14:39:51 UTC (rev 31)
@@ -74,6 +74,8 @@
 #include <math.h>
 #include "emdL1.h"
 
+#include <R.h>			// for Rprintf()
+
 /******************************************************************************
 	Construction and deconstruction
  ******************************************************************************/
@@ -112,7 +114,7 @@
 
 	// Initialization
 	if(!InitMemory(n1, n2, n3)) {	// Initialize memory (reallocate if necessary)
-		printf("Memory allocation failed!\n");
+		Rprintf("Memory allocation failed!\n");
 		return -1;
 	}
 	Initialize(H1,H2,n1,n2,n3);		// Initialize histgrams



More information about the Earthmovdist-commits mailing list