File curl-7.11.0-lfs.patch of Package compat-libcurl2

--- lib/progress.c	2004-01-18 23:54:08.000000000 +0100
+++ lib/progress.c	2004-02-09 16:43:41.000000000 +0100
@@ -48,15 +48,16 @@
   int h = (t/3600);
   int m = (t-(h*3600))/60;
   int s = (t-(h*3600)-(m*60));
-  sprintf(r,"%2d:%02d:%02d",h,m,s);
+  sprintf(r,"%3d:%02d:%02d",h,m,s);
 }
 
 /* The point of this function would be to return a string of the input data,
    but never longer than 5 columns. Add suffix k, M, G when suitable... */
 static char *max5data(double bytes, char *max5)
 {
-#define ONE_KILOBYTE 1024
-#define ONE_MEGABYTE (1024*1024)
+#define ONE_KILOBYTE 1024LL
+#define ONE_MEGABYTE (ONE_KILOBYTE*ONE_KILOBYTE)
+#define ONE_GIGABYTE (ONE_MEGABYTE*ONE_KILOBYTE)
 
   if(bytes < 100000) {
     sprintf(max5, "%5d", (int)bytes);
@@ -71,7 +72,20 @@
     sprintf(max5, "%4.1fM", bytes/ONE_MEGABYTE);
     return max5;
   }
-  sprintf(max5, "%4dM", (int)bytes/ONE_MEGABYTE);
+  if(bytes < (1000*ONE_MEGABYTE)) {
+    /* 'XXXM' is good as long as we're less than 1000 megs */
+    sprintf(max5, "%4ldM", (long)bytes/ONE_MEGABYTE);
+    return max5;
+  }
+  if(bytes < (100*ONE_GIGABYTE)) {
+    sprintf(max5, "%4.1fG", bytes/ONE_GIGABYTE);
+    return max5;
+  }
+  if(bytes < (10000*ONE_GIGABYTE)) {
+    sprintf(max5, "%4OdG", (off_t)bytes/ONE_GIGABYTE);
+    return max5;
+  }
+  sprintf(max5, ">=10T");
   return max5;
 }
 
@@ -232,8 +246,8 @@
 		"** Resuming transfer from byte position %Od\n",
                 conn->resume_from);
       fprintf(data->set.err,
-              "  %% Total    %% Received %% Xferd  Average Speed          Time             Curr.\n"
-              "                                 Dload  Upload Total    Current  Left    Speed\n");
+              "  %% Total   %% Received %% Xferd  Average Speed             Time             Curr.\n"
+              "                                Dload  Upload   Total    Current    Left   Speed\n");
     }
     data->progress.flags |= PGRS_HEADERS_OUT; /* headers are shown */
   }
@@ -367,7 +381,7 @@
     total_percen=(double)(total_transfer/total_expected_transfer)*100;
 
   fprintf(data->set.err,
-          "\r%3d %s  %3d %s  %3d %s  %s  %s %s %s %s %s",
+          "\r%3d %s %3d  %s %3d %s  %s  %s %s %s %s %s",
           (int)total_percen,                            /* total % */
           max5data(total_expected_transfer, max5[2]),   /* total size */
           (int)dlpercen,                                /* rcvd % */
--- lib/urldata.h	2004-01-11 23:56:37.000000000 +0100
+++ lib/urldata.h	2004-02-10 12:15:53.000000000 +0100
@@ -306,7 +306,7 @@
 
 struct Curl_transfer_keeper {
   off_t bytecount;                /* total number of bytes read */
-  int writebytecount;           /* number of bytes written */
+  off_t writebytecount;           /* number of bytes written */
   struct timeval start;         /* transfer started at this time */
   struct timeval now;           /* current time */
   bool header;	                /* incoming data has HTTP header */
--- lib/transfer.c	2004-01-21 17:50:05.000000000 +0100
+++ lib/transfer.c	2004-03-16 14:43:00.000000000 +0100
@@ -207,7 +207,7 @@
 
   fd_set *readfdp = k->readfdp;
   fd_set *writefdp = k->writefdp;
-  long contentlength;
+  off_t contentlength;
   
   if((k->keepon & KEEP_READ) && !readfdp) {
     /* reading is requested, but no socket descriptor pointer was set */