From: Jens Steinhauser Date: Sun, 19 Oct 2014 17:53:08 +0000 (+0200) Subject: input/csv: Skip header line. X-Git-Tag: libsigrok-0.4.0~833 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=160691b9008b2e13f981f6b8876cbbeb247c773d;p=libsigrok.git input/csv: Skip header line. --- diff --git a/src/input/csv.c b/src/input/csv.c index 180ff3df..49bd73c8 100644 --- a/src/input/csv.c +++ b/src/input/csv.c @@ -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;