CH_READ2(3)

EXPERIMENTAL_FUNC
ch_read2 - Read from a channel.

SYNOPSIS
#include <karma_ch.h>

uaddr ch_read2

(Channel channel, char *buffer, CONST char **newbuf, unsigned char alignment, uaddr length)

DESCRIPTION
This routine will read a number of bytes from a channel and places them into a buffer.

channel
    The channel object.

buffer
    A suggested buffer to write the data into.

newbuf
    The buffer pointer used is written here. This may be a read-only buffer. If this is NULL, the suggested <<buffer>> is always used.

alignment
    The number of bytes the buffer must be aligned to.

length
    The number of bytes to write into the buffer.

RETURN VALUE
The number of bytes read.

Multi-threading Level
Unsafe.

NOTE
If the channel is a connection and the number of bytes readable from the connection is equal to or more than <<length>> the routine will NOT block.

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/