diff options
Diffstat (limited to 'src/pacman/util.h')
-rw-r--r-- | src/pacman/util.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/pacman/util.h b/src/pacman/util.h index 5ccd480a..0dfdc851 100644 --- a/src/pacman/util.h +++ b/src/pacman/util.h @@ -36,9 +36,6 @@ #define _n(str1, str2, ct) (ct == 1 ? str1 : str2) #endif -/* update speed for the fill_progress based functions */ -#define UPDATE_SPEED_SEC 0.2f - typedef struct _pm_target_t { alpm_pkg_t *remove; alpm_pkg_t *install; @@ -50,21 +47,23 @@ int trans_init(alpm_transflag_t flags, int check_valid); int trans_release(void); int needs_root(void); int check_syncdbs(size_t need_repos, int check_valid); -unsigned short getcols(void); +unsigned short getcols(int fd); int rmrf(const char *path); const char *mbasename(const char *path); char *mdirname(const char *path); -void indentprint(const char *str, size_t indent); -char *strtrim(char *str); +void indentprint(const char *str, unsigned short indent, unsigned short cols); +size_t strtrim(char *str); char *strreplace(const char *str, const char *needle, const char *replace); alpm_list_t *strsplit(const char *str, const char splitchar); -void string_display(const char *title, const char *string); +void string_display(const char *title, const char *string, unsigned short cols); double humanize_size(off_t bytes, const char target_unit, int precision, const char **label); -int table_display(const char *title, const alpm_list_t *header, const alpm_list_t *rows); -void list_display(const char *title, const alpm_list_t *list); -void list_display_linebreak(const char *title, const alpm_list_t *list); -void signature_display(const char *title, alpm_siglist_t *siglist); +void list_display(const char *title, const alpm_list_t *list, + unsigned short maxcols); +void list_display_linebreak(const char *title, const alpm_list_t *list, + unsigned short maxcols); +void signature_display(const char *title, alpm_siglist_t *siglist, + unsigned short maxcols); void display_targets(void); int str_cmp(const void *s1, const void *s2); void display_new_optdepends(alpm_pkg_t *oldpkg, alpm_pkg_t *newpkg); |