Table of Contents

NAME

QccChannelAddSymbolToChannel - add a symbol to channel

SYNOPSIS

#include "libQccPack.h"

int QccChannelAddSymbolToChannel(QccChannel *channel, int symbol);

DESCRIPTION

QccChannelAddSymbolToChannel() adds a symbol to the channel by incrementing its length and inserting the new symbol at the end of the channel.

QccChannelAddSymbolToChannel() does not work of channels being accesed in blocks; consequently, channel->access_block_size must be QCCCHANNEL_ACCESSWHOLEFILE. channel->channel_length must give the current length of the channel. QccChannelSymbolAddToChannel() increments channel->channel_length and channel->channel_symbols is adjusted to account for this increased length. If the channel originally had zero length (i.e., channel->channel_symbols equaled NULL), then channel->channel_symbols is allocated to a length-1 channel; otherwise, channel->channel_symbols is reallocated to the new channel length. The new symbol, symbol, is placed at the end of the channel, channel->channel_symbols[channel->channel_length - 1].

RETURN VALUE

On successful completion, 0 is returned. On error, 1 is returned.

SEE ALSO

QccChannel(3) , QccPack(3)

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads