1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2
* filename: m-progress.c *
4
* UTIL C-source: Medical Image Conversion Utility *
6
* purpose : pointer hooks for progress functions *
8
* project : (X)MedCon by Erik Nolf *
10
* Functions : MdcSetProgress() - Set progress value *
11
* MdcIncrProgress() - Increment progress value *
12
* MdcBeginProgress() - Begin of progress *
13
* MdcEndProgress() - End of progress *
15
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
16
/* $Id: m-progress.c,v 1.2 2004/05/09 22:48:03 enlf Exp $
20
Copyright (C) 1997-2004 by Erik Nolf
22
This program is free software; you can redistribute it and/or modify it
23
under the terms of the GNU General Public License as published by the
24
Free Software Foundation; either version 2, or (at your option) any later
27
This program is distributed in the hope that it will be useful, but
28
WITHOUT ANY WARRANTY; without even the implied warranty of
29
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
30
Public License for more details.
32
You should have received a copy of the GNU General Public License along
33
with this program; if not, write to the Free Software Foundation, Inc.,
34
59 Place - Suite 330, Boston, MA 02111-1307, USA. */
36
/****************************************************************************
38
****************************************************************************/
44
#include "m-progress.h"
47
/****************************************************************************
49
****************************************************************************/
51
int MDC_PROGRESS = MDC_NO;
53
static void MdcProgressBar(int type, float value, char *label)
56
case MDC_PROGRESS_BEGIN: if (label != NULL) MdcPrntScrn("\n%35s ",label);
58
case MDC_PROGRESS_SET : MdcPrntScrn(".");
60
case MDC_PROGRESS_INCR : MdcPrntScrn(".");
62
case MDC_PROGRESS_END : MdcPrntScrn("\n");
67
void (*MdcProgress)(int type, float value, char *label) = MdcProgressBar;