aboutsummaryrefslogtreecommitdiff
path: root/src/viewerpercent.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-08-18 17:21:02 +0000
committerMike Buland <eichlan@xagasoft.com>2006-08-18 17:21:02 +0000
commitdf5286fe3bca619beb4771da1ffa8ace9613e9e5 (patch)
tree0ad268267325c586527b8d36461ab0040e9ae8ec /src/viewerpercent.cpp
parent4f94dfde7cbe043dfeb11a8712636bac348d3177 (diff)
downloadbuild-df5286fe3bca619beb4771da1ffa8ace9613e9e5.tar.gz
build-df5286fe3bca619beb4771da1ffa8ace9613e9e5.tar.bz2
build-df5286fe3bca619beb4771da1ffa8ace9613e9e5.tar.xz
build-df5286fe3bca619beb4771da1ffa8ace9613e9e5.zip
Gutted, deleted almost all the source, too many changes to keep it around, we'll
see what happens next.
Diffstat (limited to 'src/viewerpercent.cpp')
-rw-r--r--src/viewerpercent.cpp58
1 files changed, 0 insertions, 58 deletions
diff --git a/src/viewerpercent.cpp b/src/viewerpercent.cpp
deleted file mode 100644
index 0b0344b..0000000
--- a/src/viewerpercent.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
1#include "viewerpercent.h"
2#include "perform.h"
3
4ViewerPercent::ViewerPercent() :
5 nWidth( 25 )
6{
7}
8
9ViewerPercent::~ViewerPercent()
10{
11}
12
13void ViewerPercent::beginTarget( const char *sName, const char *sType, const char *sOperation, int nPerforms )
14{
15 printf("--- %s ---\n", sName );
16 nMax = nPerforms;
17 nCount = 0;
18 nLastLen = 0;
19}
20
21void ViewerPercent::endTarget()
22{
23 printf("\n\n");
24}
25
26void ViewerPercent::beginPerform( Perform *pPerf )
27{
28 sTarget = pPerf->getTarget();
29}
30
31void ViewerPercent::beginExecute()
32{
33}
34
35void ViewerPercent::endPerform()
36{
37 nCount++;
38
39 int nPer = (nCount*nWidth)/nMax;
40 fputc( '[', stdout );
41 for( int j = 0; j < nPer; j++ )
42 fputc('=', stdout );
43 for( int j = nPer; j < nWidth; j++ )
44 fputc(' ', stdout );
45 //fputc(']', stdout );
46
47 printf("] %s", sTarget.getString() );
48
49 int diff = nLastLen-sTarget;
50 for( int j = 0; j < diff; j++ )
51 fputc(' ', stdout );
52
53 nLastLen = sTarget;
54
55 fputc('\r', stdout );
56 fflush( stdout );
57}
58