data/test/cpp/18be3e01098e71245b061b98bf6b2982d9b4cb0dAssemblyChunk.cpp
void printChunk(FILE * target, AssemblyChunk * aChunk)
{
    /* ensure we have a chunk and stream */
    if(aChunk && target)
    {
        /* print the preamble, if any */
        if (aChunk->preamble && aChunk->preamble->size())
            fprintf(target, "%s\n", aChunk->preamble->data());
        
        /* print the instructions, if any */
        if (aChunk->iList) printInstructionList(target, aChunk->iList);
        
        /* print the postamble, if any */
        if (aChunk->postamble && aChunk->postamble->size())
            fprintf(target, "%s\n", aChunk->postamble->data());
    }
    
    /* complain if a null chunk was passed */
    else if (target)
        fprintf(error, "Cannot print null chunk\n");
    
    /* complain if a null stram was passed */
    
    else if (aChunk)
        fprintf(error, "Cannot print to null stream.\n");
}
/**
* Function to print out a code chunk to a stream
*/
Function to print out a code chunk to a stream
Function to print out a code chunk to a stream
void printChunk(FILE * target, AssemblyChunk * aChunk)
{
    if(aChunk && target)
    {
        if (aChunk->preamble && aChunk->preamble->size())
            fprintf(target, "%s\n", aChunk->preamble->data());
        if (aChunk->iList) printInstructionList(target, aChunk->iList);
        if (aChunk->postamble && aChunk->postamble->size())
            fprintf(target, "%s\n", aChunk->postamble->data());
    }
    else if (target)
        fprintf(error, "Cannot print null chunk\n");
    else if (aChunk)
        fprintf(error, "Cannot print to null stream.\n");
}
void printChunk ( FILE * target , AssemblyChunk * aChunk ) { if ( aChunk && target ) { if ( aChunk -> preamble && aChunk -> preamble -> size ( ) ) fprintf ( target , " \n " , aChunk -> preamble -> data ( ) ) ; if ( aChunk -> iList ) printInstructionList ( target , aChunk -> iList ) ; if ( aChunk -> postamble && aChunk -> postamble -> size ( ) ) fprintf ( target , " \n " , aChunk -> postamble -> data ( ) ) ; } else if ( target ) fprintf ( error , " \n " ) ; else if ( aChunk ) fprintf ( error , " \n " ) ; }
Function to print out a code chunk to a stream
Function to print out a code chunk to a stream
/* ensure we have a chunk and stream */ /* print the preamble, if any */ /* print the instructions, if any */ /* print the postamble, if any */ /* complain if a null chunk was passed */ /* complain if a null stram was passed */