[Genabel-commits] r1466 - pkg/GenABEL/src/GAlib

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Dec 13 20:21:07 CET 2013


Author: maartenk
Date: 2013-12-13 20:21:07 +0100 (Fri, 13 Dec 2013)
New Revision: 1466

Modified:
   pkg/GenABEL/src/GAlib/chinv2.cpp
   pkg/GenABEL/src/GAlib/chsolve2.cpp
   pkg/GenABEL/src/GAlib/convert_snp_merlin.cpp
   pkg/GenABEL/src/GAlib/convert_snp_merlin_wslash.cpp
   pkg/GenABEL/src/GAlib/convert_snp_tped.cpp
   pkg/GenABEL/src/GAlib/dmatrix.cpp
Log:
fixes to run with clan + -std=c++11 -stdlib=libc++ \n -remove keyword register since this produce warning and not functional anymore due to impoved compilers /n - check if a stream is open with is_open() (was the cryptic : stream == NULL)

Modified: pkg/GenABEL/src/GAlib/chinv2.cpp
===================================================================
--- pkg/GenABEL/src/GAlib/chinv2.cpp	2013-12-13 00:30:21 UTC (rev 1465)
+++ pkg/GenABEL/src/GAlib/chinv2.cpp	2013-12-13 19:21:07 UTC (rev 1466)
@@ -14,8 +14,8 @@
 
 void chinv2(double **matrix , int n)
      {
-     register double temp;
-     register int i,j,k;
+     double temp;
+     int i,j,k;
 
      /*
      ** invert the cholesky in the lower triangle

Modified: pkg/GenABEL/src/GAlib/chsolve2.cpp
===================================================================
--- pkg/GenABEL/src/GAlib/chsolve2.cpp	2013-12-13 00:30:21 UTC (rev 1465)
+++ pkg/GenABEL/src/GAlib/chsolve2.cpp	2013-12-13 19:21:07 UTC (rev 1466)
@@ -15,8 +15,8 @@
 
 void chsolve2(double **matrix, int n, double *y)
      {
-     register int i,j;
-     register double temp;
+     int i,j;
+     double temp;
 
      /*
      ** solve Fb =y

Modified: pkg/GenABEL/src/GAlib/convert_snp_merlin.cpp
===================================================================
--- pkg/GenABEL/src/GAlib/convert_snp_merlin.cpp	2013-12-13 00:30:21 UTC (rev 1465)
+++ pkg/GenABEL/src/GAlib/convert_snp_merlin.cpp	2013-12-13 19:21:07 UTC (rev 1466)
@@ -78,7 +78,8 @@
 	///////////////////////
 
 	ifstream mapfile (mapfilename[0]);
-	if (mapfile == NULL) {
+	if( !mapfile.is_open()) {
+
 		error ("could not open file '%s' !",mapfilename[0]);
 	}
 
@@ -143,7 +144,8 @@
 	char* chgt[2*MAXIDS];
 
 	ifstream pedfile (pedfilename[0]);
-	if (pedfile == NULL) {
+	if( !pedfile.is_open()) {
+
 		error ("could not open file '%s' !",pedfilename[0]);
 	}
 
@@ -359,7 +361,7 @@
 	const ios_base::fmtflags hex = ios_base::hex;
 
 	ofstream outfile (outfilename[0]);
-	if (outfile == NULL) {
+	if( !outfile.is_open()) {
 		error ("could not open file '%s' !",outfilename[0]);
 	}
 

Modified: pkg/GenABEL/src/GAlib/convert_snp_merlin_wslash.cpp
===================================================================
--- pkg/GenABEL/src/GAlib/convert_snp_merlin_wslash.cpp	2013-12-13 00:30:21 UTC (rev 1465)
+++ pkg/GenABEL/src/GAlib/convert_snp_merlin_wslash.cpp	2013-12-13 19:21:07 UTC (rev 1466)
@@ -76,7 +76,7 @@
 	///////////////////////
 
 	ifstream mapfile (mapfilename[0]);
-	if (mapfile == NULL) {
+	if( !mapfile.is_open()) {
 		error ("could not open file '%s' !",mapfilename[0]);
 	}
 
@@ -137,7 +137,7 @@
 	char* chgt[2*MAXIDS];
 
 	ifstream pedfile (pedfilename[0]);
-	if (pedfile == NULL) {
+	if( !pedfile.is_open()) {
 		error ("could not open file '%s' !",pedfilename[0]);
 	}
 
@@ -385,7 +385,7 @@
 	const ios_base::fmtflags hex = ios_base::hex;
 
 	ofstream outfile (outfilename[0]);
-	if (outfile == NULL) {
+	if( !outfile.is_open()) {
 		error ("could not open file '%s' !",outfilename[0]);
 	}
 

Modified: pkg/GenABEL/src/GAlib/convert_snp_tped.cpp
===================================================================
--- pkg/GenABEL/src/GAlib/convert_snp_tped.cpp	2013-12-13 00:30:21 UTC (rev 1465)
+++ pkg/GenABEL/src/GAlib/convert_snp_tped.cpp	2013-12-13 19:21:07 UTC (rev 1466)
@@ -60,7 +60,7 @@
 	///////////////////////
 
 	ifstream tfamfile (tfamfilename[0]);
-	if (tfamfile == NULL) {
+	if (!tfamfile.is_open()) {
 		error ("could not open file '%s' !",tfamfilename[0]);
 	}
 
@@ -98,7 +98,7 @@
 
 
 	ifstream tpedfile (tpedfilename[0]);
-	if (tpedfile == NULL) {
+	if( !tpedfile.is_open()) {
 		error ("could not open file '%s' !",tpedfilename[0]);
 	}
 
@@ -240,7 +240,7 @@
 	const ios_base::fmtflags hex = ios_base::hex;
 
 	ofstream outfile (outfilename[0]);
-	if (outfile == NULL) {
+	if( !outfile.is_open()) {
 		error ("could not open file '%s' !",outfilename[0]);
 	}
 

Modified: pkg/GenABEL/src/GAlib/dmatrix.cpp
===================================================================
--- pkg/GenABEL/src/GAlib/dmatrix.cpp	2013-12-13 00:30:21 UTC (rev 1465)
+++ pkg/GenABEL/src/GAlib/dmatrix.cpp	2013-12-13 19:21:07 UTC (rev 1466)
@@ -6,8 +6,8 @@
 
 double **dmatrix(double *array, int ncol, int nrow)
     {
-    register int i;
-    register double **pointer;
+    int i;
+    double **pointer;
 
 //    pointer = (double **) ALLOC(nrow, sizeof(double *));
     pointer = (double **) malloc(nrow*sizeof(double *));



More information about the Genabel-commits mailing list