+ * comment_leader: Specifies the sequence which starts comments that run
+ * up to the end of the current text line. Can be empty to disable
+ * comment support. Defaults to semicolon.
+ *
+ * Typical examples of using these options:
+ * - ... -I csv:column_formats=*l ...
+ * All columns are single-bit logic data. Identical to the previous
+ * multi-column mode (the default when no options were given at all).
+ * - ... -I csv:column_formats=3-,*l ...
+ * Ignore the first three columns, get single-bit logic data from all
+ * remaining lines (multi-column mode with first-column above 1).
+ * - ... -I csv:column_formats=3-,4l,x8 ...
+ * Ignore the first three columns, get single-bit logic data from the
+ * next four columns, then eight-bit data in hex format from the next
+ * column. More columns may follow in the input text but won't get
+ * processed. (Mix of previous multi-column as well as single-column
+ * modes.)
+ * - ... -I csv:column_formats=4x8,b16,5l ...
+ * Get eight-bit data in hex format from the first four columns, then
+ * sixteen-bit data in binary format, then five times single-bit data.
+ * - ... -I csv:single_column=2:single_format=bin:logic_channels=8 ...
+ * Get eight logic bits in binary format from column 2. (Simple
+ * single-column mode, corresponds to the "-,b8" format.)
+ * - ... -I csv:first_column=6:logic_channels=4 ...
+ * Get four single-bit logic channels from columns 6 to 9 respectively.
+ * (Simple multi-column mode, corresponds to the "5-,4b" format.)
+ * - ... -I csv:start_line=20:header=yes:...
+ * Skip the first 19 text lines. Use line 20 to derive channel names.
+ * Data starts at line 21.
+ * - ... -I csv:column_formats=*a6 ...
+ * Each column contains an analog value with six significant digits
+ * after the decimal period.
+ * - ... -I csv:column_formats=t,2a ...
+ * The first column contains timestamps, the next two columns contain
+ * analog values. The capture's samplerate could get determined from
+ * the timestamp values if not provided by the user by means of the
+ * 'samplerate' option. This assumes a mere number in units of seconds,
+ * and equidistant rows, there is no fancy support for textual unit
+ * suffixes nor gaps in the stream of samples nor other non-linearity,
+ * just '-' ignore the column if the format is not supported).
+ */
+
+/*
+ * TODO
+ *
+ * - Extend support for analog input data.
+ * - Determine why analog samples of 'double' data type get scrambled
+ * in sigrok-cli screen output. Is analog.encoding->unitsize not
+ * handled properly? A sigrok-cli or libsigrok (src/output) issue?
+ * - Reconsider the channel creation after format processing. Current
+ * logic may "bleed" channel names into the analog group when logic
+ * channels' columns follow analog columns (seen with "-,2a,x8").
+ * Trying to sort it out, a naive change used to map logic channels'
+ * data to incorrect bitmap positions. The whole channel numbering
+ * needs reconsideration. Probably it's easiest to first create _all_
+ * logic channels so that they have adjacent numbers starting at 0
+ * (addressing logic bits), then all analog channels (again adjacent)
+ * to simplify the calculation of their index in the sample set as
+ * well as their sdi channel index from the "analog column index".
+ * - Optionally get sample rate from timestamp column. Just best-effort
+ * approach, not necessarily reliable. Users can always specify rates.
+ * - Add a test suite for input modules in general, and CSV in specific?
+ * Becomes more important with the multitude of options and their
+ * interaction. Could cover edge cases (BOM presence, line termination
+ * absence, etc) and auto-stuff as well (channel names, channel counts,
+ * samplerates, etc).