]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/progress.cc
create the partial dirs also automatic if only Dir::Cache::archives or
[apt.git] / apt-pkg / contrib / progress.cc
index cb272e3898a2b415960c9fa68f4cd8281e9c01d3..cffdddc4fe0d70a9f45e3fc5fadd3c73c7944168 100644 (file)
@@ -8,9 +8,6 @@
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
-#ifdef __GNUG__
-#pragma implementation "apt-pkg/progress.h"
-#endif 
 #include <apt-pkg/progress.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/progress.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/configuration.h>
@@ -19,6 +16,7 @@
 
 #include <iostream>
 #include <stdio.h>
 
 #include <iostream>
 #include <stdio.h>
+#include <cstring>
                                                                        /*}}}*/
 
 using namespace std;
                                                                        /*}}}*/
 
 using namespace std;
@@ -115,6 +113,8 @@ bool OpProgress::CheckChange(float Interval)
    
    if ((int)LastPercent == (int)Percent)
       return false;
    
    if ((int)LastPercent == (int)Percent)
       return false;
+
+   LastPercent = Percent;
    
    if (Interval == 0)
       return false;
    
    if (Interval == 0)
       return false;
@@ -126,7 +126,6 @@ bool OpProgress::CheckChange(float Interval)
    if (Diff < Interval)
       return false;
    LastTime = Now;   
    if (Diff < Interval)
       return false;
    LastTime = Now;   
-   LastPercent = Percent;
    return true;
 }
                                                                        /*}}}*/
    return true;
 }
                                                                        /*}}}*/