From 9e9ecf218344cea86d6b8c6cf7cd246bcfcca98b Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 21 Oct 2011 10:44:19 -0500 Subject: Remove pm_fprintf() in favor of pm_printf() Now that pm_printf() always prints to stderr, we don't need this second function that was always used with stderr as the first argument. Thus, this patch removes the function and makes the following sed replacement: sed -i -e 's#pm_fprintf(stderr, #pm_printf(#g' src/pacman/*.c Signed-off-by: Dan McGee --- src/pacman/package.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pacman/package.c') diff --git a/src/pacman/package.c b/src/pacman/package.c index 6a312f9a..e5558df3 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -186,7 +186,7 @@ static const char *get_backup_file_status(const char *root, char *md5sum = alpm_compute_md5sum(path); if(md5sum == NULL) { - pm_fprintf(stderr, ALPM_LOG_ERROR, + pm_printf(ALPM_LOG_ERROR, _("could not calculate checksums for %s\n"), path); return NULL; } @@ -268,7 +268,7 @@ void dump_pkg_changelog(alpm_pkg_t *pkg) void *fp = NULL; if((fp = alpm_pkg_changelog_open(pkg)) == NULL) { - pm_fprintf(stderr, ALPM_LOG_ERROR, _("no changelog available for '%s'.\n"), + pm_printf(ALPM_LOG_ERROR, _("no changelog available for '%s'.\n"), alpm_pkg_get_name(pkg)); return; } else { -- cgit v1.2.3-24-g4f1b From 20a47aba8ec859e920bf965ab7da74c26a44339d Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 21 Oct 2011 10:51:49 -0500 Subject: Remove remaining usages of fprintf() from frontend These can either be replaced with pm_printf() if they are error related, or in the fprintf(stdout, ...) case a bare printf() will do. Signed-off-by: Dan McGee --- src/pacman/package.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pacman/package.c') diff --git a/src/pacman/package.c b/src/pacman/package.c index e5558df3..12f555a1 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -252,9 +252,9 @@ void dump_pkg_files(alpm_pkg_t *pkg, int quiet) for(i = 0; i < pkgfiles->count; i++) { const alpm_file_t *file = pkgfiles->files + i; if(!quiet) { - fprintf(stdout, "%s %s%s\n", pkgname, root, file->name); + printf("%s %s%s\n", pkgname, root, file->name); } else { - fprintf(stdout, "%s%s\n", root, file->name); + printf("%s%s\n", root, file->name); } } -- cgit v1.2.3-24-g4f1b