clustal-omega-1.2.4/src/clustal/progress.c
/**
 * @brief Allocates a new progress structure and initialises its members.
 * Free with FreeProgress()
 *
 * @note Starts the internal stopwatch immediatly!
 *
 * @see FreeProgress()
 *
 * @param[out] pprProgress
 * Pointer pointer to progress structure. Progress structure will be
 * allocated here. 
 * @param[in] prFile
 * Where to log messages to
 * @param[in] pcPrefix
 * What prefix to use for messages
 * @param[in] bPrintCR
 * If TRUE carriage return instead of newline will be printed between log messages
 */
@brief Allocates a new progress structure and initialises its members.

@note Starts the internal stopwatch immediatly!



@param[out] pprProgress
Pointer pointer to progress structure. Progress structure will be
allocated here.
@param[in] prFile
Where to log messages to
@param[in] pcPrefix
What prefix to use for messages
@param[in] bPrintCR
If TRUE carriage return instead of newline will be printed between log messages
@brief Allocates a new progress structure and initialises its members . @note Starts the internal stopwatch immediatly! @param [ out ] pprProgress Pointer pointer to progress structure . Progress structure will be allocated here . @param [ in ] prFile Where to log messages to @param [ in ] pcPrefix What prefix to use for messages @param [ in ] bPrintCR If TRUE carriage return instead of newline will be printed between log messages
void
NewProgress(progress_t **pprProgress, FILE *prFile,
            char *pcPrefix, bool bPrintCR)
{
    assert(NULL!=pprProgress);
    assert(NULL!=prFile);
    assert(NULL!=pcPrefix);
    (*pprProgress) = (progress_t *) CKMALLOC(1*sizeof(progress_t));
    (*pprProgress)->prFile = prFile;
    (*pprProgress)->bPrintCR = bPrintCR;    
    (*pprProgress)->pcPrefix = CkStrdup(pcPrefix);
    strcpy((*pprProgress)->pcLastLogMsg, "\0");
    (*pprProgress)->prStopwatch = StopwatchCreate();
    StopwatchZero((*pprProgress)->prStopwatch);
    StopwatchStart((*pprProgress)->prStopwatch);
    return; 
}
void NewProgress ( progress_t * * pprProgress , FILE * prFile , char * pcPrefix , bool bPrintCR ) { assert ( NULL != pprProgress ) ; assert ( NULL != prFile ) ; assert ( NULL != pcPrefix ) ; ( * pprProgress ) = ( progress_t * ) CKMALLOC ( 1 * sizeof ( progress_t ) ) ; ( * pprProgress ) -> prFile = prFile ; ( * pprProgress ) -> bPrintCR = bPrintCR ; ( * pprProgress ) -> pcPrefix = CkStrdup ( pcPrefix ) ; strcpy ( ( * pprProgress ) -> pcLastLogMsg , " \0 " ) ; ( * pprProgress ) -> prStopwatch = StopwatchCreate ( ) ; StopwatchZero ( ( * pprProgress ) -> prStopwatch ) ; StopwatchStart ( ( * pprProgress ) -> prStopwatch ) ; return ; }
@brief Allocates a new progress structure and initialises its members.
@brief Allocates a new progress structure and initialises its members .