return -1;
}
for(p = grp->packages; p; p = alpm_list_next(p)) {
- pkg = alpm_list_getdata(p);
+ pkg = p->data;
if(alpm_remove_pkg(config->handle, pkg) == -1) {
- pm_fprintf(stderr, ALPM_LOG_ERROR, "'%s': %s\n", target,
+ pm_printf(ALPM_LOG_ERROR, "'%s': %s\n", target,
alpm_strerror(alpm_errno(config->handle)));
return -1;
}
}
totalcols = alpm_list_count(header);
- totalwidth = table_calc_widths(header, rows, totalcols, &widths);
+ totalwidth = table_calc_widths(header, rows, padding, totalcols,
+ &widths, &has_data);
/* return -1 if terminal is not wide enough */
if(totalwidth > getcols()) {
- fprintf(stderr, _("insufficient columns available for table display\n"));
+ pm_printf(ALPM_LOG_WARNING,
+ _("insufficient columns available for table display\n"));
return -1;
}
- if(!totalwidth || !widths) {
+ if(!totalwidth || !widths || !has_data) {
return -1;
}