]> sigrok.org Git - libsigrok.git/commitdiff
input/csv: Skip header line.
authorJens Steinhauser <redacted>
Sun, 19 Oct 2014 17:53:08 +0000 (19:53 +0200)
committerBert Vermeulen <redacted>
Sun, 19 Oct 2014 21:23:58 +0000 (23:23 +0200)
src/input/csv.c

index 180ff3df264c6aaac50f43c69d1f710748e78115..49bd73c8739623eaa3cedb93622666aa1bb6f861 100644 (file)
@@ -667,6 +667,13 @@ static int process_buffer(struct sr_input *in)
                        continue;
                }
 
+               /* Skip the header line, its content was used as the channel names. */
+               if (inc->header) {
+                       sr_spew("Header line %zu skipped.", inc->line_number);
+                       inc->header = FALSE;
+                       continue;
+               }
+
                if (!(columns = parse_line(lines[l], inc, max_columns))) {
                        sr_err("Error while parsing line %zu.", inc->line_number);
                        return SR_ERR;