Datasheet
API in C
228
return stBlock;
}
/********************************************************************
* Initialize a new block
* Set iLength to 0.
********************************************************************/
void initializeBlock(struct Block *stBlock)
{
DEBUG ? printf("initializeBlock\n") : 0;
stBlock->iLength = 0;
}
/********************************************************************
* Clear an existing block
* Free all sentences in the Block struct and set iLength to 0.
********************************************************************/
void clearBlock(struct Block *stBlock)
{
DEBUG ? printf("clearBlock\n") : 0;
free(stBlock->stSentence);
initializeBlock(stBlock);
}
/********************************************************************
* Print a block.
* Output a Block with printf.
********************************************************************/
void printBlock(struct Block *stBlock)
{
int i;
DEBUG ? printf("printBlock\n") : 0;
DEBUG ? printf("block iLength = %d\n", stBlock->iLength) : 0;
for (i=0; i<stBlock->iLength; i++)
{
printSentence(stBlock->stSentence[i]);
}










