CH_READ_AND_SWAP_BLOCKS(3)

EXPERIMENTAL_FUNC
ch_read_and_swap_blocks - Read blocks from a channel and swap bytes.

SYNOPSIS
#include <karma_ch.h>

uaddr ch_read_and_swap_blocks

(Channel channel, char *buffer, uaddr num_blocks, uaddr block_size)

DESCRIPTION
This routine will read a number of blocks from a channel and places them into a buffer after swapping (reversing the order).

channel
    The channel object.

buffer
    The buffer to write the data into.

num_blocks
    The number of blocks to read.

block_size
    The size (in bytes) of each block.

RETURN VALUE
The number of bytes read. Errors may cause partial blocks to be 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 <<num_blocks * block_size>> 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/