Lines Matching refs:size

62 static size_t mime_subparts_read(char *buffer, size_t size, size_t nitems,
66 static size_t encoder_nop_read(char *buffer, size_t size, bool ateof,
69 static size_t encoder_7bit_read(char *buffer, size_t size, bool ateof,
71 static size_t encoder_base64_read(char *buffer, size_t size, bool ateof,
74 static size_t encoder_qp_read(char *buffer, size_t size, bool ateof,
141 * get_vms_file_size does what it takes to get the real size of the file
143 * For fixed files, find out the size of the EOF block and adjust.
177 * if not to call a routine to get the correct size.
381 static size_t encoder_nop_read(char *buffer, size_t size, bool ateof,
389 if(!size)
392 if(size > insize)
393 size = insize;
395 if(size)
396 memcpy(buffer, st->buf + st->bufbeg, size);
398 st->bufbeg += size;
399 return size;
409 static size_t encoder_7bit_read(char *buffer, size_t size, bool ateof,
417 if(!size)
420 if(size > cursize)
421 size = cursize;
423 for(cursize = 0; cursize < size; cursize++) {
435 static size_t encoder_base64_read(char *buffer, size_t size, bool ateof,
447 if(size < 2) {
456 size -= 2;
460 if(size < 4) {
478 size -= 4;
483 if(size < 4) {
488 /* Buffered data size can only be 0, 1 or 2. */
516 curl_off_t size = part->datasize;
518 if(size <= 0)
519 return size; /* Unknown size or no data. */
522 size = 4 * (1 + (size - 1) / 3);
525 return size + 2 * ((size - 1) / MAX_ENCODED_LINE_LENGTH);
548 static size_t encoder_qp_read(char *buffer, size_t size, bool ateof,
629 if(len > size) {
639 size -= len;
651 /* Determining the size can only be done by reading the data: unless the
652 data size is 0, we return it as unknown (-1). */
659 static size_t mime_mem_read(char *buffer, size_t size, size_t nitems,
664 (void) size; /* Always 1.*/
716 static size_t mime_file_read(char *buffer, size_t size, size_t nitems,
727 return fread(buffer, size, nitems, part->fp);
988 /* Bump buffer and counters according to read size. */
998 static size_t mime_subparts_read(char *buffer, size_t size, size_t nitems,
1003 (void) size; /* Always 1. */
1057 /* Bump buffer and counters according to read size. */
1136 part->datasize = (curl_off_t) 0; /* No size yet. */
1582 size_t Curl_mime_read(char *buffer, size_t size, size_t nitems, void *instream)
1588 (void) size; /* Always 1. */
1611 /* Compute header list size. */
1615 size_t size = 0;
1619 size += strlen(s->data) + overhead;
1620 return size;
1623 /* Get/compute multipart size. */
1626 curl_off_t size;
1634 size = boundarysize; /* Final boundary - CRLF after headers. */
1640 size = sz;
1642 if(size >= 0)
1643 size += boundarysize + sz;
1646 return size;
1649 /* Get/compute mime size. */
1652 curl_off_t size;
1657 size = part->datasize;
1660 size = part->encoder->sizefunc(part);
1662 if(size >= 0 && !(part->flags & MIME_BODY_ONLY)) {
1663 /* Compute total part size. */
1664 size += slist_size(part->curlheaders, 2, NULL, 0);
1665 size += slist_size(part->userheaders, 2, STRCONST("Content-Type"));
1666 size += 2; /* CRLF after headers. */
1668 return size;