libopkg: remove default progress bar
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 15 Dec 2008 05:11:23 +0000 (05:11 +0000)
committerticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Mon, 15 Dec 2008 05:11:23 +0000 (05:11 +0000)
git-svn-id: http://opkg.googlecode.com/svn/trunk@81 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

libopkg/opkg_download.c

index ebbde51d3e8fbe9196e2135f08470929689c0f2f..8bf6b8dffe4c8361c101930f1f78c1a558094942 100644 (file)
@@ -58,23 +58,6 @@ curl_progress_func (char* url,
        opkg_cb_download_progress (p, url);
        return 0;
     }
        opkg_cb_download_progress (p, url);
        return 0;
     }
-
-    /* skip progress bar if we haven't done started yet
-     * this prevents drawing the progress bar if we receive an error such as
-     * file not found */
-    if (t == 0)
-       return 0;
-
-    printf ("\r%3d%% |", p);
-    for (i = 1; i < 73; i++)
-    {
-       if (i <= p * 0.73)
-           printf ("=");
-       else
-           printf ("-");
-    }
-    printf ("|");
-    fflush(stdout);
     return 0;
 }
 
     return 0;
 }
 
@@ -88,8 +71,6 @@ int opkg_download(opkg_conf_t *conf, const char *src, const char *dest_file_name
 
     opkg_message(conf,OPKG_NOTICE,"Downloading %s\n", src);
        
 
     opkg_message(conf,OPKG_NOTICE,"Downloading %s\n", src);
        
-    fflush(stdout);
-    
     if (str_starts_with(src, "file:")) {
        int ret;
        const char *file_src = src + 5;
     if (str_starts_with(src, "file:")) {
        int ret;
        const char *file_src = src + 5;
@@ -157,10 +138,6 @@ int opkg_download(opkg_conf_t *conf, const char *src, const char *dest_file_name
     else
        return -1;
 
     else
        return -1;
 
-    /* if no custom progress handler was set, we need to clear the default progress bar */
-    if (!opkg_cb_download_progress)
-        printf ("\n");
-
     err = file_move(tmp_file_location, dest_file_name);
 
     free(tmp_file_location);
     err = file_move(tmp_file_location, dest_file_name);
 
     free(tmp_file_location);