Index: /branches/eam_branches/ipp-20150625/Ohana/src/opihi/cmd.data/read_vectors.c
===================================================================
--- /branches/eam_branches/ipp-20150625/Ohana/src/opihi/cmd.data/read_vectors.c	(revision 38983)
+++ /branches/eam_branches/ipp-20150625/Ohana/src/opihi/cmd.data/read_vectors.c	(revision 38984)
@@ -190,4 +190,6 @@
   ALLOCATE (buffer, char, 0x10001);
   bzero (buffer, 0x10001);
+
+  /* 
   for (i = 0; i < Nskip; i++) {
     if (scan_line_maxlen (f, buffer, 0x10000) == EOF) {
@@ -197,8 +199,13 @@
     }
   }
+  */
+
+  int Nline_read = 0; // track number of lines read so far (use to skip lines as well)
 
   // we have a working buffer read from the file. we parse the lines in the working buffer
   // until we reach the last chunk without an EOL char.  at that point, we shift the start
   // of the last (partial) line to the start of the buffer and re-fill.
+
+  // we treat \n\r pair as a single EOL char to handle mac files:
 
   Nstart = 0; // location of the last valid byte in the buffer (start filling here)
@@ -218,7 +225,7 @@
     c0 = buffer; // c0 always marks the start of a line
     while (bufferStatus) {
-      c1 = strchr (c0, '\n'); // find the end of this current line
+      c1 = strchr (c0, '\n'); // find the end of this current line (also valid for a Mac: \r\n)
       if (!c1) {
-	c1 = strchr (c0, '\r'); // try \r for non-UNIX files (what do we do about a Mac? \n\r?)
+	c1 = strchr (c0, '\r'); // try \r for non-UNIX files
       }
       if (c1 == (char *) NULL) {
@@ -229,4 +236,7 @@
       }
       *c1 = 0; // mark the end of the line 
+      Nline_read ++;
+
+      if (Nline_read <= Nskip) { c0 = c1 + 1; continue; }
 
       if (*c0 == '#') {	c0 = c1 + 1; continue; }
