diff options
Diffstat (limited to 'src/pacman/util.c')
-rw-r--r-- | src/pacman/util.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c index 1ca9b4d6..1b0625ea 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -66,7 +66,7 @@ int trans_init(alpm_transflag_t flags, int check_valid) void trans_init_error(void) { enum _alpm_errno_t err = alpm_errno(config->handle); - pm_fprintf(stderr, ALPM_LOG_ERROR, _("failed to init transaction (%s)\n"), + pm_printf(ALPM_LOG_ERROR, _("failed to init transaction (%s)\n"), alpm_strerror(err)); if(err == ALPM_ERR_HANDLE_LOCK) { fprintf(stderr, _(" if you're sure a package manager is not already\n" @@ -78,7 +78,7 @@ void trans_init_error(void) int trans_release(void) { if(alpm_trans_release(config->handle) == -1) { - pm_fprintf(stderr, ALPM_LOG_ERROR, _("failed to release transaction (%s)\n"), + pm_printf(ALPM_LOG_ERROR, _("failed to release transaction (%s)\n"), alpm_strerror(alpm_errno(config->handle))); return -1; } @@ -585,7 +585,7 @@ int table_display(const char *title, const alpm_list_t *header, totalwidth = table_calc_widths(header, rows, totalcols, &widths); /* return -1 if terminal is not wide enough */ if(totalwidth > getcols()) { - pm_fprintf(stderr, ALPM_LOG_WARNING, + pm_printf(ALPM_LOG_WARNING, _("insufficient columns available for table display\n")); return -1; } @@ -743,7 +743,7 @@ void signature_display(const char *title, alpm_siglist_t *siglist) ret = pm_asprintf(&sigline, _("%s, %s from \"%s\""), status, validity, name); if(ret == -1) { - pm_fprintf(stderr, ALPM_LOG_ERROR, _("failed to allocate string\n")); + pm_printf(ALPM_LOG_ERROR, _("failed to allocate string\n")); continue; } indentprint(sigline, len); @@ -1423,19 +1423,6 @@ int pm_printf(alpm_loglevel_t level, const char *format, ...) return ret; } -int pm_fprintf(FILE *stream, alpm_loglevel_t level, const char *format, ...) -{ - int ret; - va_list args; - - /* print the message using va_arg list */ - va_start(args, format); - ret = pm_vfprintf(stream, level, format, args); - va_end(args); - - return ret; -} - int pm_asprintf(char **string, const char *format, ...) { int ret = 0; @@ -1444,7 +1431,7 @@ int pm_asprintf(char **string, const char *format, ...) /* print the message using va_arg list */ va_start(args, format); if(vasprintf(string, format, args) == -1) { - pm_fprintf(stderr, ALPM_LOG_ERROR, _("failed to allocate string\n")); + pm_printf(ALPM_LOG_ERROR, _("failed to allocate string\n")); ret = -1; } va_end(args); |