]> sigrok.org Git - libsigrok.git/commit - src/input/csv.c
input/csv: fixup input file line number handling
authorGerhard Sittig <redacted>
Tue, 15 Oct 2019 19:43:55 +0000 (21:43 +0200)
committerGerhard Sittig <redacted>
Sat, 21 Dec 2019 17:20:04 +0000 (18:20 +0100)
commitef0b9935cf1b133910d9b02e1ee3b798804716c6
tree33b1b1804544099ed5ab6dfe3ac1a770558a4ee3
parent836fac9cf6622112f6c167aa5826a68d20f4977f
input/csv: fixup input file line number handling

The previous implementation allowed CSV input files to use any line
termination in either CR only, LF only, or CR/LF format. The first EOL
was searched for and was recorded, but then was not used. Instead any of
CR or LF were considered a line termination. "Raw data processing" still
was correct, but line numbers in diagnostics were way off, and optional
features like skipping first N lines were not effective. Fix that.

Source code inspection suggests the "startline" feature did not work at
all. The user provided number was used in the initial optional search
for the header line (to get signal names) or auto-determination of the
number of columns. But then was not used when the file actually got
processed.
src/input/csv.c