NAME
count_data_lines_until_next_header - Counts the number of data lines until the next data block header.
SYNOPSIS
#include "l/l_io.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-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);
DESCRIPTION
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
is '!').
For example:
If comment_char = '#' and header_char = '!'
then:
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
search started.
RETURNS
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.
RELATED
count_real_lines
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard, Lindsay Martin
DOCUMENTER
Lindsay Martin
SEE ALSO
set_program_prompt
,
kjb_query
,
print_blanks
,
rep_print
,
count_real_lines
,
count_tokens_in_file
,
get_real_line
,
string_count_real_lines
,
string_get_real_line
,
get_command_text
,
add_line_to_input_stream
,
read_int_from_file
,
read_dbl_from_file
,
push_no_overwrite
,
pop_no_overwrite
,
set_no_overwrite
,
get_no_overwrite