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>
This commit is contained in:
parent
9e9ecf2183
commit
20a47aba8e
2 changed files with 5 additions and 4 deletions
|
@ -252,9 +252,9 @@ void dump_pkg_files(alpm_pkg_t *pkg, int quiet)
|
||||||
for(i = 0; i < pkgfiles->count; i++) {
|
for(i = 0; i < pkgfiles->count; i++) {
|
||||||
const alpm_file_t *file = pkgfiles->files + i;
|
const alpm_file_t *file = pkgfiles->files + i;
|
||||||
if(!quiet) {
|
if(!quiet) {
|
||||||
fprintf(stdout, "%s %s%s\n", pkgname, root, file->name);
|
printf("%s %s%s\n", pkgname, root, file->name);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stdout, "%s%s\n", root, file->name);
|
printf("%s%s\n", root, file->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1158,14 +1158,15 @@ static int parseindex(char *s, int *val, int min, int max)
|
||||||
int n = strtol(s, &endptr, 10);
|
int n = strtol(s, &endptr, 10);
|
||||||
if(*endptr == '\0') {
|
if(*endptr == '\0') {
|
||||||
if(n < min || n > max) {
|
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);
|
n, min, max);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
*val = n;
|
*val = n;
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, _("Invalid number: %s\n"), s);
|
pm_printf(ALPM_LOG_ERROR, _("invalid number: %s\n"), s);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue