Table of Contents

NAME

SYNOPSIS

#include "libQccPack.h"

int QccChannelGetNumNullSymbols(const QccChannel *channel);
int QccChannelRemoveNullSymbols(QccChannel *channel);

DESCRIPTION

The normal symbols in a QccChannel structure are nonnegative integers. However, QccPack allows a special symbol, QCCCHANNEL_NULLSYMBOL, defined as -1, to denote a null symbol. Such a null symbol would indicate the absence of a symbol at that particular location in the channel.

QccChannelGetNumNullSymbols() counts the number of null symbols occurring in the current block of symbols channel->channel_symbols.

QccChannelRemoveNullSymbols() removes null symbols from channel. The channel symbols are scanned, and only the non-null symbols are retained. channel->channel_length is reduced by the number of null symbols originally in the channel, and channel->channel_symbols is reallocated to reflect this new channel length. Note: block-access channels are not allowed; QccChannelRemoveNullSymbols() requires that channel->access_block_size be QCCCHANNEL_ACCESSWHOLEFILE.

RETURN VALUE

These routines return 0 on successful completion, 1 if an error occurs while reading the file.

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