-Mon Jan 1 02:04:26 CST 2001 Wichert Akkerman <wakkerma@debian.org>
+Mon Jan 1 02:07:47 CST 2001 Adam Heath <doogie@debian.org>
+
+ * lib/varbuf.c, include/dpkg-db.h: Add varbufdupc().
+
+Mon Jan 1 02:04:26 CST 2001 Adam Heath <doogie@debian.org>
* lib/parse.c: Use of PKGIOFF macro was checked in prematurely.
struct varbuf;
extern void varbufaddc(struct varbuf *v, int c);
+extern void varbufdupc(struct varbuf *v, int c, ssize_t s);
void varbufinit(struct varbuf *v);
void varbufreset(struct varbuf *v);
void varbufextend(struct varbuf *v);
v->buf[v->used++]= c;
}
+void varbufdupc(struct varbuf *v, int c, ssize_t n) {
+ char *b = v->buf + v->used;
+ v->used += n;
+ if (v->used >= v->size) varbufextend(v);
+
+ while(n) {
+ *b= c;
+ b++; n--;
+ }
+}
+
void varbufprintf(struct varbuf *v, const char *fmt, ...) {
int ou, r;
va_list al;