xbps-query: use get_maxcols() from xbps-install.

This commit is contained in:
Juan RP 2013-06-14 09:33:27 +02:00
parent 5f2bba7f4e
commit 89ded69bed
3 changed files with 3 additions and 13 deletions

View File

@ -3,7 +3,7 @@ TOPDIR = ../..
BIN = xbps-query
OBJS = main.o list.o show-deps.o show-info-files.o
OBJS += ownedby.o search.o
OBJS += ownedby.o search.o ../xbps-install/util.o
MAN = $(BIN).8
include $(TOPDIR)/mk/prog.mk

View File

@ -28,6 +28,8 @@
#include <xbps_api.h>
#include "../xbps-install/defs.h"
#ifndef __UNCONST
#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a))
#endif
@ -55,7 +57,6 @@ int ownedby(struct xbps_handle *, int, char **);
int repo_ownedby(struct xbps_handle *, int, char **);
/* From list.c */
int get_maxcols(void);
unsigned int find_longest_pkgver(struct xbps_handle *, prop_object_t);
int list_pkgs_in_dict(struct xbps_handle *, prop_object_t, void *, bool *);

View File

@ -38,17 +38,6 @@ struct list_pkgver_cb {
int maxcols;
};
int
get_maxcols(void)
{
struct winsize ws;
if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) == 0)
return ws.ws_col;
return 80;
}
int
list_pkgs_in_dict(struct xbps_handle *xhp,
prop_object_t obj,