colget - get a row from a table
SYNOPSIS
#include "rdb.h"
int colget (buffer, columns_ptr, separator, file)
char *buffer[];
char **columns_ptr;
char separator;
FILE *file;
DESCRIPTION
colget
reads a row from
file
into
buffer
and assigns a pointer
*columns_ptr
to each column in the row.
Columns are delimited by
separator
characters and newlines
which are replaced by
colget
with the null character.
RETURN VALUE
colget
returns the maximum number of bytes read
or -1 if the end of file is reached or the length of the row
exceeds BUFSIZE or the number of columns
in the row exceeds MAXCOL.
In the latter two cases, an error message
is printed on the standard error.
SEE ALSO