Previously the code missed the critical part actually filtering the
duplicate CSV column names. Now this is addressed by keeping a use count
for each csv label, and allowing only unused entries go through.
In addition, there was an issue of overwriting the variable/argument
num_fields, resulting in too few columns being handled. This is now
fixed by using the variable num_unique_fields to store the number of,
well, unique fields, and still keeping access to the original variable
num_fields to allwo iterating through -all- the original arguments.
Signed-off-by: Erkki Seppälä <flux@modeemi.fi>
Adds a new interface for constructing, printing and releasing data_t*
structures. The data structure describes typed hierarchical data (much like
json) and then provides a function for dumping it to a file descriptor.
It comes with a small test.