Relax memory requirements on 64bit platforms; fix two memleaks.
This commit is contained in:
@@ -37,8 +37,8 @@ struct xferstat {
|
||||
/* from transaction.c */
|
||||
int install_new_pkg(struct xbps_handle *, const char *, bool);
|
||||
int update_pkg(struct xbps_handle *, const char *);
|
||||
int dist_upgrade(struct xbps_handle *, size_t, bool, bool);
|
||||
int exec_transaction(struct xbps_handle *, size_t, bool, bool);
|
||||
int dist_upgrade(struct xbps_handle *, int, bool, bool);
|
||||
int exec_transaction(struct xbps_handle *, int, bool, bool);
|
||||
|
||||
/* from question.c */
|
||||
bool yesno(const char *, ...);
|
||||
@@ -51,7 +51,7 @@ void fetch_file_progress_cb(struct xbps_fetch_cb_data *, void *);
|
||||
void state_cb(struct xbps_state_cb_data *, void *);
|
||||
|
||||
/* From util.c */
|
||||
void print_package_line(const char *, size_t, bool);
|
||||
size_t get_maxcols(void);
|
||||
void print_package_line(const char *, int, bool);
|
||||
int get_maxcols(void);
|
||||
|
||||
#endif /* !_XBPS_INSTALL_DEFS_H_ */
|
||||
|
@@ -102,7 +102,7 @@ main(int argc, char **argv)
|
||||
const char *rootdir, *cachedir, *conffile, *defrepo;
|
||||
int i, c, flags, rv, fflag = 0;
|
||||
bool sync, yes, reinstall, drun, update;
|
||||
size_t maxcols;
|
||||
int maxcols;
|
||||
|
||||
rootdir = cachedir = conffile = defrepo = NULL;
|
||||
flags = rv = 0;
|
||||
|
@@ -48,7 +48,7 @@ struct transaction {
|
||||
static void
|
||||
show_missing_deps(prop_array_t a)
|
||||
{
|
||||
size_t i;
|
||||
unsigned int i;
|
||||
const char *str;
|
||||
|
||||
fprintf(stderr, "Unable to locate some required packages:\n");
|
||||
@@ -61,7 +61,7 @@ show_missing_deps(prop_array_t a)
|
||||
static void
|
||||
show_conflicts(prop_array_t a)
|
||||
{
|
||||
size_t i;
|
||||
unsigned int i;
|
||||
const char *str;
|
||||
|
||||
fprintf(stderr, "Conflicting packages were found:\n");
|
||||
@@ -93,7 +93,7 @@ show_actions(prop_object_iterator_t iter)
|
||||
}
|
||||
|
||||
static void
|
||||
show_package_list(prop_object_iterator_t iter, const char *match, size_t cols)
|
||||
show_package_list(prop_object_iterator_t iter, const char *match, int cols)
|
||||
{
|
||||
prop_object_t obj;
|
||||
const char *pkgver, *tract;
|
||||
@@ -110,7 +110,7 @@ show_package_list(prop_object_iterator_t iter, const char *match, size_t cols)
|
||||
}
|
||||
|
||||
static int
|
||||
show_transaction_sizes(struct transaction *trans, size_t cols)
|
||||
show_transaction_sizes(struct transaction *trans, int cols)
|
||||
{
|
||||
uint64_t dlsize = 0, instsize = 0, rmsize = 0;
|
||||
char size[8];
|
||||
@@ -186,7 +186,7 @@ show_transaction_sizes(struct transaction *trans, size_t cols)
|
||||
}
|
||||
|
||||
int
|
||||
dist_upgrade(struct xbps_handle *xhp, size_t cols, bool yes, bool drun)
|
||||
dist_upgrade(struct xbps_handle *xhp, int cols, bool yes, bool drun)
|
||||
{
|
||||
int rv = 0;
|
||||
|
||||
@@ -256,7 +256,7 @@ update_pkg(struct xbps_handle *xhp, const char *pkgname)
|
||||
}
|
||||
|
||||
int
|
||||
exec_transaction(struct xbps_handle *xhp, size_t maxcols, bool yes, bool drun)
|
||||
exec_transaction(struct xbps_handle *xhp, int maxcols, bool yes, bool drun)
|
||||
{
|
||||
prop_array_t mdeps, cflicts;
|
||||
struct transaction *trans;
|
||||
|
@@ -35,7 +35,7 @@
|
||||
#include <xbps_api.h>
|
||||
#include "defs.h"
|
||||
|
||||
size_t
|
||||
int
|
||||
get_maxcols(void)
|
||||
{
|
||||
struct winsize ws;
|
||||
@@ -47,9 +47,9 @@ get_maxcols(void)
|
||||
}
|
||||
|
||||
void
|
||||
print_package_line(const char *str, size_t maxcols, bool reset)
|
||||
print_package_line(const char *str, int maxcols, bool reset)
|
||||
{
|
||||
static size_t cols;
|
||||
static int cols;
|
||||
static bool first;
|
||||
|
||||
if (reset) {
|
||||
|
Reference in New Issue
Block a user