// general utilities #include namespace dhrg { struct progressbar : indenter_finish { string name; static constexpr int PBSIZE = 64; int step = -1, total, drawat = 0, count = -1; void operator ++ (int) { step++; while(step >= drawat && total) { count++; drawat = (total * (count+1)) / PBSIZE; fprintf(stderr, "%s [", get_stamp().c_str()); for(int k=0; k