colgetr - get a row from a table or list file
SYNOPSIS
DESCRIPTION
colgetr
gets one row from a table or list file
which has been previously opened on the channel
pointed to by
row->p_filein,
and updates the
row
structure with new row information.
If
row
has not yet been accessed,
colgetr
calls
colinit
to initialize it.
The value of
row->list
is restored after initialization.
Pointers in the array
row->p_columns
are set to each column and in
the case of list files, pointers in the array
row->p_heads
is updated
are set to each column header.
row->collengths
are updated to reflect each columns' length;
row->rowlength
is updated to reflect the length of the entire row.
row->columns
is set to the number of columns in the row.
RETURN VALUE
colgetr
returns the number of columns read.
or -1 if the end of file is encountered.
NOTES
row->fs,
which defines the input field separation character
and the input file stream
row->p_filein,
if
not
the standard input,
must be set and/or opened prior to invocation of
colgetr.
SEE ALSO