diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-08-26 17:20:29 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-08-26 17:20:29 +0000 |
commit | 982c5460f0eb521ce4f9526535e9d122fe8755bd (patch) | |
tree | fd0a68cad53523ba47817aa4c7764d288ee00f3d /src | |
parent | 2a3a8848f35e6cb561fdb8d9303819e327029b81 (diff) |
Andrew Francis removed the need for/use of MSVC pragmas
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c index 956cb861a..36d28ca7c 100644 --- a/src/main.c +++ b/src/main.c @@ -2011,32 +2011,32 @@ int myprogress (void *clientp, char line[256]; char outline[256]; char format[40]; - float frac; - float percent; + double frac; + double percent; int barwidth; int num; int i; struct ProgressData *bar = (struct ProgressData *)clientp; - size_t total = dltotal + ultotal; + double total = dltotal + ultotal; bar->point = dlnow + ulnow; /* we've come this far */ bar->calls++; /* simply count invokes */ if(0 == total) { - int prevblock = bar->prev / 1024; - int thisblock = bar->point / 1024; + int prevblock = (int)bar->prev / 1024; + int thisblock = (int)bar->point / 1024; while ( thisblock > prevblock ) { fprintf( bar->out, "#" ); prevblock++; } } else { - frac = (float) bar->point / (float) total; + frac = bar->point / total; percent = frac * 100.0f; barwidth = bar->width - 7; - num = (int) (((float)barwidth) * frac); + num = (int) (((double)barwidth) * frac); i = 0; for ( i = 0; i < num; i++ ) { line[i] = '#'; |