more compact progress display
[git/mingw.git] / progress.h
blob07b56bdbb5abc70fbd9d4080ccb219716a5297f1
1 #ifndef PROGRESS_H
2 #define PROGRESS_H
4 struct progress {
5 const char *title;
6 int last_value;
7 unsigned total;
8 unsigned last_percent;
9 unsigned delay;
10 unsigned delayed_percent_treshold;
13 int display_progress(struct progress *progress, unsigned n);
14 void start_progress(struct progress *progress, const char *title,
15 unsigned total);
16 void start_progress_delay(struct progress *progress, const char *title,
17 unsigned total, unsigned percent_treshold, unsigned delay);
18 void stop_progress(struct progress *progress);
20 #endif