diff options
author | Aaron Griffin <aaron@archlinux.org> | 2007-02-04 01:36:45 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-02-04 01:36:45 +0000 |
commit | e3c7e92f1090204ba945c063b7aba3b3b1d8095b (patch) | |
tree | 08d49f36264059a878c7c40c80d99ec5bbcdcdc0 /src/pacman/util.h | |
parent | d18259b532a09de8025881532bc9ef6152a31891 (diff) |
* unified the progress bars (fill_progress function)
* fixed progress output (needs an fflush to move cursor properly)
* broke display_targets function out, to display a list of syncpkgs in
preparation for a -Qu option
* added get_update_time function to deal with progress functions that shouldn't
update too fast due to output redraw speeds
Diffstat (limited to 'src/pacman/util.h')
-rw-r--r-- | src/pacman/util.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pacman/util.h b/src/pacman/util.h index 37509788..61bf09ee 100644 --- a/src/pacman/util.h +++ b/src/pacman/util.h @@ -47,6 +47,9 @@ s1[(len)-1] = 0; \ } while(0) +/* update speed for the fill_progress based functions */ +#define UPDATE_SPEED_SEC 0.2f + #define _(str) gettext(str) unsigned int getcols(); int makepath(char *path); @@ -56,6 +59,9 @@ char *strtoupper(char *str); char *strtrim(char *str); int reg_match(char *string, char *pattern); void list_display(const char *title, alpm_list_t *list); +void display_targets(alpm_list_t *pkgs); +float get_update_timediff(int first_call); +void fill_progress(const int percent, const int proglen); #endif /* _PM_UTIL_H */ |