[master] 5002303 Remove unsed VLU_Data() and VLU_File() functions.
Poul-Henning Kamp
phk at FreeBSD.org
Tue Feb 24 21:19:31 CET 2015
commit 5002303d2c3a0c9a03f5c5ad4b05f4afecd7ac39
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Feb 24 20:18:38 2015 +0000
Remove unsed VLU_Data() and VLU_File() functions.
diff --git a/include/vlu.h b/include/vlu.h
index a9fe074..b7023cb 100644
--- a/include/vlu.h
+++ b/include/vlu.h
@@ -33,8 +33,6 @@
typedef int (vlu_f)(void *, const char *);
struct vlu *VLU_New(void *priv, vlu_f *func, unsigned bufsize);
int VLU_Fd(int fd, struct vlu *l);
-int VLU_File(FILE *f, struct vlu *l);
-int VLU_Data(const void *ptr, int len, struct vlu *l);
void VLU_Destroy(struct vlu *l);
void VLU_SetTelnet(struct vlu *l, int fd);
diff --git a/lib/libvarnish/vlu.c b/lib/libvarnish/vlu.c
index c983442..1aabc65 100644
--- a/lib/libvarnish/vlu.c
+++ b/lib/libvarnish/vlu.c
@@ -182,41 +182,3 @@ VLU_Fd(int fd, struct vlu *l)
l->bufp += i;
return (LineUpProcess(l));
}
-
-int
-VLU_File(FILE *f, struct vlu *l)
-{
- char *p;
-
- CHECK_OBJ_NOTNULL(l, LINEUP_MAGIC);
- p = fgets(l->buf + l->bufp, l->bufl - l->bufp, f);
- if (p == NULL)
- return (-1);
- l->bufp = strlen(l->buf);
- return (LineUpProcess(l));
-}
-
-int
-VLU_Data(const void *ptr, int len, struct vlu *l)
-{
- const char *p;
- int i = 0;
-
- p = ptr;
- CHECK_OBJ_NOTNULL(l, LINEUP_MAGIC);
- if (len < 0)
- len = strlen(p);
- while (len > 0) {
- i = len;
- if (i > l->bufl - l->bufp)
- i = l->bufl - l->bufp;
- memcpy(l->buf + l->bufp, p, i);
- l->bufp += i;
- p += i;
- len -= i;
- i = LineUpProcess(l);
- if (i)
- break;
- }
- return (i);
-}
More information about the varnish-commit
mailing list