Lines Matching defs:pbuf
104 DAV_DECLARE(void) dav_check_bufsize(apr_pool_t * p, dav_buffer *pbuf,
108 if (pbuf->cur_len + extra_needed > pbuf->alloc_len) {
111 pbuf->alloc_len += extra_needed + DAV_BUFFER_PAD;
112 newbuf = apr_palloc(p, pbuf->alloc_len);
113 memcpy(newbuf, pbuf->buf, pbuf->cur_len);
114 pbuf->buf = newbuf;
118 DAV_DECLARE(void) dav_set_bufsize(apr_pool_t * p, dav_buffer *pbuf,
127 if (size + DAV_BUFFER_PAD > pbuf->alloc_len) {
129 pbuf->alloc_len = size + DAV_BUFFER_PAD;
130 if (pbuf->alloc_len < DAV_BUFFER_MINSIZE)
131 pbuf->alloc_len = DAV_BUFFER_MINSIZE;
133 pbuf->buf = apr_palloc(p, pbuf->alloc_len);
135 pbuf->cur_len = size;
140 DAV_DECLARE(void) dav_buffer_init(apr_pool_t *p, dav_buffer *pbuf,
143 dav_set_bufsize(p, pbuf, strlen(str));
144 memcpy(pbuf->buf, str, pbuf->cur_len + 1);
148 DAV_DECLARE(void) dav_buffer_append(apr_pool_t *p, dav_buffer *pbuf,
153 dav_check_bufsize(p, pbuf, len + 1);
154 memcpy(pbuf->buf + pbuf->cur_len, str, len + 1);
155 pbuf->cur_len += len;
159 DAV_DECLARE(void) dav_buffer_place(apr_pool_t *p, dav_buffer *pbuf,
164 dav_check_bufsize(p, pbuf, len + 1);
165 memcpy(pbuf->buf + pbuf->cur_len, str, len + 1);
169 DAV_DECLARE(void) dav_buffer_place_mem(apr_pool_t *p, dav_buffer *pbuf,
173 dav_check_bufsize(p, pbuf, amt + pad);
174 memcpy(pbuf->buf + pbuf->cur_len, mem, amt);
843 dav_buffer *pbuf,
1029 dav_set_bufsize(p, pbuf, uri_len);
1030 memcpy(pbuf->buf, uri, uri_len);
1031 pbuf->buf[--uri_len] = '\0';
1032 uri = pbuf->buf;