|
libdsproc3
2.0
|
CSV File Parsing Functions and Utilities. More...
#include "dsproc3.h"Go to the source code of this file.
Functions | |
| void | dsproc_free_csv_parser (CSVParser *csv) |
| Free all memory used by a CSVParser structure. | |
| time_t | dsproc_get_csv_file_name_time (CSVParser *csv, const char *name, RETimeRes *result) |
| Get the time from a CSV file name. | |
| char ** | dsproc_get_csv_column_headers (CSVParser *csv, int *nfields) |
| Get the array of string pointers to the column headers in a CSV file. | |
| char ** | dsproc_get_csv_field_strvals (CSVParser *csv, const char *name) |
| Get the array of string pointers for a field in a CSV file. | |
| timeval_t * | dsproc_get_csv_timevals (CSVParser *csv, int *nrecs) |
| Get the array of record times after parsing a CSV file. | |
| char * | dsproc_get_next_csv_line (CSVParser *csv) |
| Get the next line from the file loaded into the CSVParser structure. | |
| CSVParser * | dsproc_init_csv_parser (CSVParser *csv) |
| Initialize a CSVParser structure. | |
| int | dsproc_load_csv_file (CSVParser *csv, const char *path, const char *name) |
| Load a CSV data file into a CSVParser structure. | |
| int | dsproc_parse_csv_header (CSVParser *csv, const char *linep) |
| Parse a header line. | |
| int | dsproc_parse_csv_record (CSVParser *csv, char *linep, int flags) |
| Parse a record line. | |
| void | dsproc_set_csv_delimiter (CSVParser *csv, char delim) |
| Set the column delimiter. | |
| int | dsproc_set_csv_column_name (CSVParser *csv, int index, const char *name) |
| Set or change a column name in the header. | |
| int | dsproc_set_csv_base_time (CSVParser *csv, time_t base_time) |
| Set the base time to use for record times. | |
| int | dsproc_set_csv_file_time_patterns (CSVParser *csv, int npatterns, const char **patterns) |
| Specify the pattern to use to parse the date/time from the file name. | |
| void | dsproc_set_csv_time_offset (CSVParser *csv, time_t time_offset) |
| Set the time offset to apply to record times. | |
| int | dsproc_set_csv_time_patterns (CSVParser *csv, const char *name, int npatterns, const char **patterns) |
| Specify the pattern to use to parse a date/time column. | |
| int | dsproc_count_csv_delims (const char *strp, char delim) |
| Count the number of delimiters in a string. | |
| char * | dsproc_find_csv_delim (const char *strp, char delim) |
| Find the next delimiter in a string. | |
| char * | dsproc_skip_csv_whitespace (const char *strp, char delim) |
| Skip white-space characters that do not match the delimiter. | |
| int | dsproc_split_csv_string (char *strp, char delim, int length, char **list) |
| Split a delimited string into list of strings. | |
| int | dsproc_print_csv (FILE *fp, CSVParser *csv) |
| Print CSV header and records. | |
| int | dsproc_print_csv_header (FILE *fp, CSVParser *csv) |
| Print CSV header data. | |
| int | dsproc_print_csv_record (FILE *fp, CSVParser *csv) |
| Print CSV record data. | |
CSV File Parsing Functions and Utilities.
Definition in file dsproc_csv_parser.c.