PDA

View Full Version : progress bar help please !


cyrilic
04-18-2005, 03:19 PM
k so i got some code off of this board trying to get this working and i have a prob. It all works, but when i complete a release, the dir has 10 or so incomplete bars left behind and i have to delete them. the dir has a complete bar as well. i am using the newest version of project-zs and newest verison of ioFTPD

convert.h
void buffer_progress_bar(struct VARS *raceI)
{
int n;

if(raceI->total.files_missing == 0 && raceI->total.files ==0)
{
for(n=0; n < 14; n++)
raceI->misc.progress_bar[n] = progressmeter_filled_char;
}
else
{
raceI->misc.progress_bar[14] = 0;
for ( n = 0 ; n < (raceI->total.files - raceI->total.files_missing) * 14 / raceI->total.files ; n++) raceI->misc.progress_bar[n] = '#';
for ( ; n < 14 ; n++) raceI->misc.progress_bar[n] = '_';
}
}

config.h
#define progressmeter "[%V] - %3.0p%% Complete - [PLS]"
#define del_progressmeter "\\[..............] - ...% Complete - \\[PLS]"

help please thanks !

esmandil
04-20-2005, 02:40 PM
Which compiler did you use? I have seen similar problems when compiled with MinGW.

Try using Borland or Microsoft... both can be downloaded for free, even if it is a little tricky to find them :)

cyrilic
04-22-2005, 11:17 AM
yeah i used borland compiler ..

esmandil
04-24-2005, 09:09 AM
Then it is strange... Try running in debug mode and take a look at .ioFTPD.debug file -- are there any signs of problems there? Any error messages?