CH_GETL(3)

FUNCTION
ch_getl - Read a line from a channel.

SYNOPSIS
#include <karma_ch.h>

flag ch_getl

(Channel channel, char *buffer, unsigned int length)

DESCRIPTION
This routine will read a character string from a channel into a buffer.

channel
    The channel object.

buffer
    The buffer to write the data into. The routine will write a NULL terminator character at the end of the string.

length
    The length of the buffer. If the buffer is not large enough to contain the string, then the remainder of the string (including the newline character) is read in and discarded and a warning message is displayed. See also the <-ch_gets-> routine.

RETURN VALUE
TRUE on success, else FALSE (indicating end-of-file was encountered). Data is still written to the buffer and NULL terminated on EOF.

Multi-threading Level
Unsafe.

NOTE
The newline chanacter ' is NOT copied into the buffer.

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/