diff options
author | Mike Buland <eichlan@xagasoft.com> | 2006-08-18 17:21:02 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2006-08-18 17:21:02 +0000 |
commit | df5286fe3bca619beb4771da1ffa8ace9613e9e5 (patch) | |
tree | 0ad268267325c586527b8d36461ab0040e9ae8ec /src/viewerpercent.cpp | |
parent | 4f94dfde7cbe043dfeb11a8712636bac348d3177 (diff) | |
download | build-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.cpp | 58 |
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 | |||
4 | ViewerPercent::ViewerPercent() : | ||
5 | nWidth( 25 ) | ||
6 | { | ||
7 | } | ||
8 | |||
9 | ViewerPercent::~ViewerPercent() | ||
10 | { | ||
11 | } | ||
12 | |||
13 | void 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 | |||
21 | void ViewerPercent::endTarget() | ||
22 | { | ||
23 | printf("\n\n"); | ||
24 | } | ||
25 | |||
26 | void ViewerPercent::beginPerform( Perform *pPerf ) | ||
27 | { | ||
28 | sTarget = pPerf->getTarget(); | ||
29 | } | ||
30 | |||
31 | void ViewerPercent::beginExecute() | ||
32 | { | ||
33 | } | ||
34 | |||
35 | void 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 | |||