--- nrg2iso.c.orig 2004-05-05 22:38:35.056108024 -0400 +++ nrg2iso.c 2004-05-05 22:41:46.129060520 -0400 @@ -78,8 +78,8 @@ FILE *nrgFile, *isoFile; char buffer[1048576]; int i=0,j=0; - int size=0,k=0,l; - int nrgSize=0; + off_t size=0,k=0,l, stepsize; + off_t nrgSize=0; float pourcent=0.0; struct stat buf; @@ -96,6 +96,8 @@ nrgFile=fopen(argv[1],"r"); fseek (nrgFile, 307200, SEEK_SET); + stepsize = nrgSize / 70; + isoFile=fopen(argv[2],"w+"); while((i= fread( buffer, 1, 1048576, nrgFile ))>0){ @@ -104,17 +106,13 @@ size+=i; pourcent = (100.0*size)/nrgSize; - if(j==10){ - j=0; - k++; - printf("\r"); - printf("|"); - for(l=0;l[%d\%]",(int)pourcent); - fflush(stdout); - } - j++; + printf(">[%d\%]", (int)pourcent); + fflush(stdout); } printf("\r"); @@ -126,7 +124,7 @@ fclose(nrgFile); fclose(isoFile); - printf("\n%s written : %d bytes\n",argv[2],size); + printf("\n%s written : %.2f MB\n",argv[2],(float)size/1024/1024); } } else