[Seqinr-commits] r1833 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Dec 2 18:01:04 CET 2014


Author: simonpenel
Date: 2014-12-02 18:01:03 +0100 (Tue, 02 Dec 2014)
New Revision: 1833

Modified:
   pkg/R/read.abif.R
Log:
Adding little endian setting to pass Solaris tests


Modified: pkg/R/read.abif.R
===================================================================
--- pkg/R/read.abif.R	2014-12-02 16:35:05 UTC (rev 1832)
+++ pkg/R/read.abif.R	2014-12-02 17:01:03 UTC (rev 1833)
@@ -13,13 +13,13 @@
   UInt32 <- function(f, ...) readBin(f, what = "integer", signed = FALSE, endian = "big", size = 4, ...)
   UInt16 <- function(f, ...) readBin(f, what = "integer", signed = FALSE, endian = "big", size = 2, ...)
   UInt8 <- function(f, ...) readBin(f, what = "integer", signed = FALSE, endian = "big", size = 1, ...)
-  f32 <- function(f, ...) readBin(f, what = "numeric", size = 4, ...)
-  f64 <- function(f, ...) readBin(f, what = "numeric", size = 8, ...)
+  f32 <- function(f, ...) readBin(f, what = "numeric", size = 4,endian="little", ...)
+  f64 <- function(f, ...) readBin(f, what = "numeric", size = 8, endian="little",...)
   #
   # Load raw data in memory:
   #
   fc <- file(filename, open = "rb")
-  rawdata <- readBin(fc, what = "raw", n = pied.de.pilote*max.bytes.in.file)
+  rawdata <- readBin(fc, what = "raw", n = pied.de.pilote*max.bytes.in.file,endian="little")
   if(verbose) print(paste("number of bytes in file", filename, "is", length(rawdata)))
   close(fc)
   #



More information about the Seqinr-commits mailing list