csv

csv reading library
git clone git://bvnf.space/csv.git
Log | Files | Refs

csv.h (286B)


      1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
#ifndef _CSV_H
#define _CSV_H

struct csv {
	int cols, rows;
	char **headers; /* array of strings */
	float **data;   /* array of arrays of floats */
};

struct csv *
csv_create(void);

void
csv_destroy(struct csv *c);

int
csv_read_file(FILE *stream, struct csv *c, char hdr);

#endif