diff --git a/src/controller.cpp b/src/controller.cpp index cfd404c..fa5c9c7 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -2,10 +2,14 @@ #include "controller.hpp" #include "thread.hpp" #include +#include void Controller::run(std::vector &threads) { + boost::progress_display *progress=0; + if (m_config->progress) + progress=new boost::progress_display(m_parser.get_max_lines()); m_lineno=1; std::vector::iterator it; @@ -40,11 +44,16 @@ Controller::run(std::vector &threads) compare_records(threads); } - m_lineno++; + ++m_lineno; + if (progress) + ++(*progress); } for (it=threads.begin(); it!=threads.end(); it++) (*it)->wakeup(); + + if (progress) + delete progress; } void diff --git a/src/main.cpp b/src/main.cpp index 67ee2aa..da13ddf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -451,6 +451,8 @@ main(int argc, char **argv) delete threads[i]; threads.clear(); + if (c.progress) + printf("\n"); if (ok) printf("[OK] %s\n", c.filename); else