Clustal Omega  1.2.3
Macros | Functions
progress.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include "util.h"
#include "log.h"
#include "progress.h"
Include dependency graph for progress.c:

Macros

#define LOGLEVEL_THRESHOLD   LOG_INFO
 

Functions

void NewProgress (progress_t **pprProgress, FILE *prFile, char *pcPrefix, bool bPrintCR)
 Allocates a new progress structure and initialises its members. Free with FreeProgress() More...
 
void FreeProgress (progress_t **pprProgress)
 Frees progress structure and its members. More...
 
void ProgressLog (progress_t *prProgress, unsigned long int iStep, unsigned long int iTotalSteps, bool bForceOutput)
 Prints a progress update (and a carriage return) More...
 
void ProgressDone (progress_t *prProgress)
 Finishes progress output by printing the elapsed time. More...
 

Macro Definition Documentation

#define LOGLEVEL_THRESHOLD   LOG_INFO

Function Documentation

void FreeProgress ( progress_t **  pprProgress)

Frees progress structure and its members.

Parameters
[out]pprProgressPointer pointer to progress structure
See also
NewProgress()
void NewProgress ( progress_t **  pprProgress,
FILE *  prFile,
char *  pcPrefix,
bool  bPrintCR 
)

Allocates a new progress structure and initialises its members. Free with FreeProgress()

Note
Starts the internal stopwatch immediatly!
See also
FreeProgress()
Parameters
[out]pprProgressPointer pointer to progress structure. Progress structure will be allocated here.
[in]prFileWhere to log messages to
[in]pcPrefixWhat prefix to use for messages
[in]bPrintCRIf TRUE carriage return instead of newline will be printed between log messages
void ProgressDone ( progress_t prProgress)

Finishes progress output by printing the elapsed time.

Parameters
[in]prProgressPointer to the progress structure
void ProgressLog ( progress_t prProgress,
unsigned long int  iStep,
unsigned long int  iTotalSteps,
bool  bForceOutput 
)

Prints a progress update (and a carriage return)

Parameters
[in]prProgressPointer to the progress structure
[in]iStepCurrent step number
[in]iTotalStepsTotal step number
[in]bForceOutputIf percentage hasn't changed output is normally supressed normally. Output can be forced with this flag.