Clustal Omega  1.2.4
progress.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Clustal Omega - Multiple sequence alignment
3  *
4  * Copyright (C) 2010 University College Dublin
5  *
6  * Clustal-Omega is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  *
11  * This file is part of Clustal-Omega.
12  *
13  ********************************************************************/
14 
15 /*
16  * RCS $Id: progress.h 193 2011-02-07 15:45:21Z andreas $
17  */
18 
19 
20 #ifndef CLUSTALO_PROGRESS_H
21 #define CLUSTALO_PROGRESS_H
22 
23 #include "squid/stopwatch.h"
24 
25 typedef struct {
26  /* where to write to */
27  FILE *prFile;
28  /* prefix printed before each step */
29  char *pcPrefix;
30  bool bPrintCR;
31  char pcLastLogMsg[1024];
32  Stopwatch_t *prStopwatch;
33 } progress_t;
34 
35 
36 extern void
37 NewProgress(progress_t **pprProgress, FILE *prFile, char *pcPrefix, bool bPrintCR);
38 
39 extern void
40 FreeProgress(progress_t **pprProgress);
41 
42 extern void
43 ProgressLog(progress_t *prProgress,
44  unsigned long int iStep, unsigned long int iTotalSteps,
45  bool bForceOutput);
46 
47 extern void
48 ProgressDone(progress_t *pprProgress);
49 
50 #endif
progress_t
Definition: progress.h:24
ProgressLog
void ProgressLog(progress_t *prProgress, unsigned long int iStep, unsigned long int iTotalSteps, bool bForceOutput)
Prints a progress update (and a carriage return)
Definition: progress.c:114
ProgressDone
void ProgressDone(progress_t *pprProgress)
Finishes progress output by printing the elapsed time.
Definition: progress.c:160
FreeProgress
void FreeProgress(progress_t **pprProgress)
Frees progress structure and its members.
Definition: progress.c:85
NewProgress
void NewProgress(progress_t **pprProgress, FILE *prFile, char *pcPrefix, bool bPrintCR)
Allocates a new progress structure and initialises its members. Free with FreeProgress()
Definition: progress.c:53