count_data_lines_until_next_header - Counts the number of data lines until the next data block header.
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
long count_data_lines_until_next_header(FILE *fp);
Counts data lines from the current file position until the next data block
header line is encountered. Data lines are those that DO NOT begin with the
comment character which is a user settable option (default is '#'. Header
lines are lines that start with the comment character, and are immediately
followed by the header character which is also a user setable option (default
If comment_char = '#' and header_char = '!'
2345.0 is a data line (count is incremented)
# I am hungry is a comment line (ignored)
is a blank line (ignored)
#! rows=50 cols=3 is a data block header (function returns)
This function resets the file position to the position where the header
The number of data lines until the next data clock header on success, or
ERROR on failure, with "kjb_error" set to a descriptive message.
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
Kobus Barnard, Lindsay Martin