summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-10-21 17:51:49 +0200
committerDan McGee <dan@archlinux.org>2011-10-21 17:51:49 +0200
commit20a47aba8ec859e920bf965ab7da74c26a44339d (patch)
tree109497a06017b86defe8a812be29e42ed543651c
parent9e9ecf218344cea86d6b8c6cf7cd246bcfcca98b (diff)
downloadpacman-20a47aba8ec859e920bf965ab7da74c26a44339d.tar.gz
pacman-20a47aba8ec859e920bf965ab7da74c26a44339d.tar.xz
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 <dan@archlinux.org>
-rw-r--r--src/pacman/package.c4
-rw-r--r--src/pacman/util.c5
2 files changed, 5 insertions, 4 deletions
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);
}
}
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 1b0625ea..b9ee8c9c 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -1158,14 +1158,15 @@ static int parseindex(char *s, int *val, int min, int max)
int n = strtol(s, &endptr, 10);
if(*endptr == '\0') {
if(n < min || n > max) {
- fprintf(stderr, _("Invalid value: %d is not between %d and %d\n"),
+ pm_printf(ALPM_LOG_ERROR,
+ _("invalid value: %d is not between %d and %d\n"),
n, min, max);
return -1;
}
*val = n;
return 0;
} else {
- fprintf(stderr, _("Invalid number: %s\n"), s);
+ pm_printf(ALPM_LOG_ERROR, _("invalid number: %s\n"), s);
return -1;
}
}