src/inc/common.h 1.146
1.146 2009/02/24 03:29:11 kent
Adding byte-swapping routines for floating point items. Using them in the bigWig read routines.
Index: src/inc/common.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/inc/common.h,v
retrieving revision 1.145
retrieving revision 1.146
diff -b -B -U 4 -r1.145 -r1.146
--- src/inc/common.h 9 Feb 2009 02:39:31 -0000 1.145
+++ src/inc/common.h 24 Feb 2009 03:29:11 -0000 1.146
@@ -1025,8 +1025,28 @@
bits16 memReadBits16(char **pPt, boolean isSwapped);
/* Read and optionally byte-swap 32 bit entity from memory buffer pointed to by
* *pPt, and advance *pPt past read area. */
+double byteSwapDouble(double a);
+/* Return byte-swapped version of a */
+
+double readDouble(FILE *f, boolean isSwapped);
+/* Read and optionally byte-swap double-precision floating point entity. */
+
+double memReadDouble(char **pPt, boolean isSwapped);
+/* Read and optionally byte-swap double-precision floating point entity
+ * from memory buffer pointed to by *pPt, and advance *pPt past read area. */
+
+float byteSwapFloat(float a);
+/* Return byte-swapped version of a */
+
+float readFloat(FILE *f, boolean isSwapped);
+/* Read and optionally byte-swap single-precision floating point entity. */
+
+float memReadFloat(char **pPt, boolean isSwapped);
+/* Read and optionally byte-swap single-precision floating point entity
+ * from memory buffer pointed to by *pPt, and advance *pPt past read area. */
+
void removeReturns(char* dest, char* src);
/* Removes the '\r' character from a string.
* the source and destination strings can be the same,
* if there are no threads */