Index: src/Parser/libinc/ParserBase.hh
===================================================================
--- src/Parser/libinc/ParserBase.hh	(revision 8604083132573125a42d1234cd5480f2f20e749a)
+++ src/Parser/libinc/ParserBase.hh	(revision 82039336ff14f8866185d62f4b2416d737ac9639)
@@ -47,5 +47,5 @@
 
     //search for next valid package. Slow, use with care.
-    virtual bool findNextPackage(const uint8_t*& start, const uint8_t * const stop, const uint8_t*& pkgend, uint64_t &offset) const ;
+    virtual bool findNextPackageStartEnd(const uint8_t * const stream_end, const uint8_t*& okgstart,  const uint8_t*& pkgend, uint64_t &offset) const ;
 
   public:
Index: src/Parser/libsrc/PackageHe3.cc
===================================================================
--- src/Parser/libsrc/PackageHe3.cc	(revision aa3a29b338977947b817bbb2486ca1c791f9f306)
+++ src/Parser/libsrc/PackageHe3.cc	(revision 82039336ff14f8866185d62f4b2416d737ac9639)
@@ -29,5 +29,5 @@
   const uint8_t *package_end;
   uint64_t offset = 0;
-  if(!findNextPackage(pt, stream_end, package_end, offset))
+  if(!findNextPackageStartEnd(stream_end, pt, package_end, offset))
     return false;
 
@@ -71,5 +71,5 @@
   uint64_t offset=0;
 
-  if(!findNextPackage(pt, stream_end, package_end, offset))
+  if(!findNextPackageStartEnd(stream_end, pt, package_end, offset))
     return false;
 
Index: src/Parser/libsrc/PackageHe3PosCorr.cc
===================================================================
--- src/Parser/libsrc/PackageHe3PosCorr.cc	(revision ae84d718acb177fded3975ceeae888faafdee509)
+++ src/Parser/libsrc/PackageHe3PosCorr.cc	(revision 82039336ff14f8866185d62f4b2416d737ac9639)
@@ -16,5 +16,5 @@
   uint64_t offset=0;
 
-  if(!findNextPackage(pt, stream_end, package_end, offset))
+  if(!findNextPackageStartEnd(stream_end, pt, package_end, offset))
     return false;
 
Index: src/Parser/libsrc/PackageMWPC.cc
===================================================================
--- src/Parser/libsrc/PackageMWPC.cc	(revision 860253589809f300086f0244aaecbecc08d12808)
+++ src/Parser/libsrc/PackageMWPC.cc	(revision 82039336ff14f8866185d62f4b2416d737ac9639)
@@ -108,5 +108,5 @@
   const uint8_t *package_end;
   uint64_t offset=0;
-  if(!findNextPackage(pt, stream_end, package_end, offset))
+  if(!findNextPackageStartEnd(stream_end, pt, package_end, offset))
     return false;
 
@@ -142,5 +142,5 @@
   {
     error_assert(*pt == 0xAA);
-    
+
     if(pt >= stream_end-8)//fix breakpoint
       break;
@@ -187,5 +187,5 @@
   const uint8_t *package_end;
   uint64_t offset=0;
-  if(!findNextPackage(pt, stream_end, package_end, offset))
+  if(!findNextPackageStartEnd(stream_end, pt , package_end, offset))
     return false;
 
Index: src/Parser/libsrc/PackageMWPC_v2.cc
===================================================================
--- src/Parser/libsrc/PackageMWPC_v2.cc	(revision fc084232d6413c4b11f3eacfb04122fc6421183d)
+++ src/Parser/libsrc/PackageMWPC_v2.cc	(revision 82039336ff14f8866185d62f4b2416d737ac9639)
@@ -29,5 +29,5 @@
   const uint8_t *package_end;
   uint64_t offset=0;
-  if(!findNextPackage(pt, stream_end, package_end, offset))
+  if(!findNextPackageStartEnd(stream_end, pt, package_end, offset))
     return false;
 
@@ -118,5 +118,5 @@
   const uint8_t *package_end;
   uint64_t offset=0;
-  if(!findNextPackage(pt, stream_end, package_end, offset))
+  if(!findNextPackageStartEnd(stream_end, pt, package_end, offset))
     return false;
 
Index: src/Parser/libsrc/ParserBase.cc
===================================================================
--- src/Parser/libsrc/ParserBase.cc	(revision 8604083132573125a42d1234cd5480f2f20e749a)
+++ src/Parser/libsrc/ParserBase.cc	(revision 82039336ff14f8866185d62f4b2416d737ac9639)
@@ -1,5 +1,5 @@
 #include "ParserBase.hh"
 #include "UtilsException.hh"
-
+#include "ctypes_api.hh"
 #include <cstdio>
 Parser::ParserBase::ParserBase()
@@ -14,5 +14,5 @@
 
 
-void Parser::ParserBase::read_uint32_many(const uint8_t*& pt, std::vector<uint32_t> &u32_vec, unsigned num) const
+void Parser::ParserBase::read_uint32_many(const uint8_t*& pos, std::vector<uint32_t> &u32_vec, unsigned num) const
 {
   if(u32_vec.size()!=num)
@@ -20,14 +20,14 @@
 
   for(unsigned i=0;i<num;i++) {
-    read_uint32(pt, u32_vec[i]);
+    read_uint32(pos, u32_vec[i]);
   }
 }
 
-bool Parser::ParserBase::blankData(const uint8_t* const pt, const uint8_t * const stream_end) const
+bool Parser::ParserBase::blankData(const uint8_t* const pos, const uint8_t * const stream_end) const
 {
-  unsigned dsize = stream_end-pt > 112? 112:stream_end-pt;
+  unsigned dsize = stream_end-pos > 112? 112:stream_end-pos;
   for(unsigned i=0;i<dsize;i++)
   {
-    if(pt[i])
+    if(pos[i])
      return false;
   }
@@ -36,5 +36,5 @@
 
 
-bool Parser::ParserBase::findNextPackage(const uint8_t*& start, const uint8_t * const stream_end, const uint8_t*& pkgend, uint64_t &offset) const
+bool Parser::ParserBase::findNextPackageStartEnd(const uint8_t * const stream_end, const uint8_t*& start, const uint8_t*& pkgend, uint64_t &offset) const
 {
   //fixme: detect zero padding data
