Previous: Reading /rdb File Headers, Up: Reading /rdb File Headers


A.1.1 rdb_rd_hdr

Parse an /rdb file header prior to reading.

Synopsis

     #include <mst_rdb/mst_rdb.h>
     
     
     
rdbHeader *rdb_rd_hdr(FILE *fin);

Parameters

FILE *fin
the stream to parse

Description

Rdb_rd_hdr extracts column names from a stream connected to an rdb data file. It leaves the file pointer set to the first line after the header. Lines preceding the header which are empty or begin with '#' are ignored.

Returns

This routine returns a pointer to a dynamically allocated rdbHeader structure (filled in with appropriate values). It returns NULL if there are no header records. Upon error it prints a message to stderr and exits. When the user is finished with these data structures, their memory should be freed with the rdb_free_hdr() function.

Author

Diab Jerius