SOURCES = compat.c database.c dbmodify.c dump.c ehandle.c fields.c \
lock.c mlib.c myopt.c nfmalloc.c parse.c parsehelp.c \
- showcright.c tarfn.c varbuf.c vercmp.c md5.c
+ showcright.c showpkg.c tarfn.c varbuf.c vercmp.c md5.c
OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
GENFILES = $(OBJECTS) libdpkg.a
for (fip=fieldinfos; fip->name; fip++)
if (strcasecmp(head->data, fip->name)==0) {
- size_t len;
- char* i;
-
- fip->wcall(&wb,pkg,&pkg->installed,fip);
+ fip->wcall(&wb,pkg,&pkg->installed,0,fip);
if (!wb.used)
break;
- /* Bugger, wcall adds the fieldname and a trailing newline we
- * do not need. We should probably improve wcall to only do that
- * optionally, but this will do for now (ie this is a TODO)
- */
- wb.buf[wb.used-1]='\0';
- i=strchr(wb.buf, ':')+2;
- len=strlen(i)+1;
- memmove(wb.buf, i, len);
+ varbufaddc(&wb, '\0');
varbufprintf(&fb, fmt, wb.buf);
varbufreset(&wb);
ok=1;
OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
GENFILES = $(OBJECTS) archtable.h dpkg dpkg-static
-QUERY_SOURCES = query.c showpkg.c filesdb.c errors.c
+QUERY_SOURCES = query.c filesdb.c errors.c
QUERY_OBJECTS = $(patsubst %.c, %.o, $(QUERY_SOURCES))
QUERY_GENFILES = $(QUERY_OBJECTS) dpkg-query