Previous: Counting Lines in the /rdb File, Up: Counting Lines in the /rdb File


A.3.1 rdb_count

Grab columns of data from an rdb data file.

Synopsis

     #include <mst_rdb/mst_rdb.h>
     
     
     
long rdb_count( FILE *fin, rdbHeader *hdr );

Parameters

FILE *fin
the stream to parse
rdbHeader *hdr
the rdb file description

Description

rdb_count counts the lines in an /rdb-format table file which has previously been opened, had its header read, and had columns mapped (using functions elsewhere in this library). On exit, the file is left ready to read the first data element.

Returns

The routine returns the number of data records in the file. If the file cannot be rewound, it returns -1.

Author

Diab Jerius