summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-cdr/nrg2iso/files/0.2-lfs.patch')
-rw-r--r--app-cdr/nrg2iso/files/0.2-lfs.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/app-cdr/nrg2iso/files/0.2-lfs.patch b/app-cdr/nrg2iso/files/0.2-lfs.patch
new file mode 100644
index 000000000000..cbf11e76c5f4
--- /dev/null
+++ b/app-cdr/nrg2iso/files/0.2-lfs.patch
@@ -0,0 +1,55 @@
+--- 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<k;l++)
++ k = size / stepsize;
++ printf("\r");
++ printf("|");
++ for(l=0;l<k;l++)
+ printf("=");
+- printf(">[%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