Home | History | Annotate | Download | only in cups

Lines Matching defs:bytes

53 			               int bytes);
687 int /* O - Bytes written or -1 on error */
690 ssize_t bytes; /* Bytes written */
703 bytes = http_write_chunk(http, http->wbuffer, (size_t)http->wused);
705 bytes
709 DEBUG_printf(("1httpFlushWrite: Returning %d, errno=%d.", (int)bytes, errno));
711 return ((int)bytes);
1098 * 'httpGetPending()' - Get the number of bytes that are buffered for writing.
1103 size_t /* O - Number of bytes buffered */
1111 * 'httpGetReady()' - Get the number of bytes that can be read without blocking.
1116 size_t /* O - Number of bytes available */
1133 * 'httpGetRemaining()' - Get the number of remaining bytes in the message
1142 size_t /* O - Remaining bytes */
1162 ssize_t bytes; /* Number of bytes read */
1212 bytes = http_read(http, http->buffer + http->used, (size_t)(HTTP_MAX_BUFFER - http->used));
1214 DEBUG_printf(("4httpGets: read " CUPS_LLFMT " bytes.", CUPS_LLCAST bytes));
1216 if (bytes < 0)
1263 else if (bytes == 0)
1274 http->used += (int)bytes;
1626 ssize_t /* O - Number of bytes copied */
1629 size_t length) /* I - Maximum number of bytes */
1631 ssize_t bytes; /* Bytes read */
1743 DEBUG_printf(("2httpPeek: Reading %d bytes into buffer.", (int)buflen));
1744 bytes = http_read(http, http->buffer, (size_t)buflen);
1746 DEBUG_printf(("2httpPeek: Read " CUPS_LLFMT " bytes into buffer.",
1747 CUPS_LLCAST bytes));
1748 if (bytes > 0)
1751 http_debug_hex("httpPeek", http->buffer, (int)bytes);
1754 http->used = (int)bytes;
1768 /* Number of bytes to copy */
1782 DEBUG_printf(("1httpPeek: Copying %d more bytes of data into "
1821 bytes = (ssize_t)(length - http->stream.avail_out);
1836 bytes = (ssize_t)length;
1838 DEBUG_printf(("2httpPeek: grabbing %d bytes from input buffer...",
1839 (int)bytes));
1844 bytes = 0;
1846 if (bytes < 0)
1850 bytes = 0;
1855 bytes = 0;
1860 else if (bytes == 0)
1866 return (bytes);
1888 int /* O - Number of bytes written */
1893 ssize_t bytes; /* Number of bytes to write */
1901 bytes = vsnprintf(buf, sizeof(buf), format, ap);
1904 DEBUG_printf(("3httpPrintf: (" CUPS_LLFMT " bytes) %s", CUPS_LLCAST bytes, buf));
1907 return ((int)httpWrite2(http, buf, (size_t)bytes));
1918 return ((int)http_write(http, buf, (size_t)bytes));
1945 int /* O - Number of bytes read */
1948 int length) /* I - Maximum number of bytes */
1960 ssize_t /* O - Number of bytes read */
1963 size_t length) /* I - Maximum number of bytes */
1965 ssize_t bytes; /* Bytes read */
2009 bytes = (ssize_t)(length - http->stream.avail_out);
2011 DEBUG_printf(("2httpRead2: avail_in=%d, avail_out=%d, bytes=%d",
2013 (int)bytes));
2016 bytes = 0;
2018 if (bytes == 0)
2021 /* Additional bytes for buffer */
2031 DEBUG_printf(("1httpRead2: Reading up to %d more bytes of data into "
2039 bytes = http_read_buffered(http, (char *)http->sbuffer + http->stream.avail_in, (size_t)buflen);
2042 bytes = http_read_chunk(http, (char *)http->sbuffer + http->stream.avail_in, (size_t)buflen);
2044 bytes = 0;
2046 if (bytes < 0)
2047 return (bytes);
2048 else if (bytes == 0)
2051 DEBUG_printf(("1httpRead2: Adding " CUPS_LLFMT " bytes to "
2052 "decompression buffer.", CUPS_LLCAST bytes));
2054 http->data_remaining -= bytes;
2055 http->stream.avail_in += (uInt)bytes;
2069 bytes = 0;
2075 while (bytes == 0);
2081 if ((bytes = http_read_chunk(http, buffer, length)) > 0)
2083 http->data_remaining -= bytes;
2107 bytes into buffer.",
2113 if ((bytes = http_read_buffered(http, buffer, length)) > 0)
2115 http->data_remaining -= bytes;
2138 (http->data_encoding == HTTP_ENCODING_CHUNKED && bytes == 0)))
2157 return (bytes);
3265 int /* O - Number of bytes written */
3268 int length) /* I - Number of bytes to write */
3280 ssize_t /* O - Number of bytes written */
3283 size_t length) /* I - Number of bytes to write */
3285 ssize_t bytes; /* Bytes written */
3318 bytes = 0;
3322 size_t slen; /* Bytes to write */
3323 ssize_t sret; /* Bytes written */
3356 bytes = (ssize_t)length;
3377 DEBUG_printf(("2httpWrite2: Copying " CUPS_LLFMT " bytes to wbuffer...",
3382 bytes = (ssize_t)length;
3390 DEBUG_printf(("2httpWrite2: Writing " CUPS_LLFMT " bytes to socket...",
3394 bytes = (ssize_t)http_write_chunk(http, buffer, length);
3396 bytes = (ssize_t)http_write(http, buffer, length);
3398 DEBUG_printf(("2httpWrite2: Wrote " CUPS_LLFMT " bytes...",
3399 CUPS_LLCAST bytes));
3403 http->data_remaining -= bytes;
3406 bytes = 0;
3459 DEBUG_printf(("1httpWrite2: Returning " CUPS_LLFMT ".", CUPS_LLCAST bytes));
3461 return (bytes);
3700 size_t bytes; /* Number of bytes to write */
3716 bytes = _HTTP_MAX_SBUFFER - http->stream.avail_out;
3718 if (bytes > 0)
3720 DEBUG_printf(("1http_content_coding_finish: Writing trailing chunk, len=%d", (int)bytes));
3723 http_write_chunk(http, (char *)http->sbuffer, bytes);
3725 http_write(http, (char *)http->sbuffer, bytes);
3990 int bytes) /* I - Bytes to dump */
4002 DEBUG_printf(("6%s: %d bytes:", prefix, bytes));
4007 for (i = 0; i < bytes; i += 16)
4009 for (j = 0, ptr = start; j < 16 && (i + j) < bytes; j ++, ptr += 2)
4022 for (j = 0; j < 16 && (i + j) < bytes; j ++)
4046 static ssize_t /* O - Number of bytes read or -1 on error */
4049 size_t length) /* I - Maximum bytes to read */
4051 ssize_t bytes; /* Bytes read */
4068 DEBUG_printf(("2http_read: Reading %d bytes into buffer.", (int)length));
4074 bytes = _httpTLSRead(http, buffer, (int)length);
4077 bytes = recv(http->fd, buffer, length, 0);
4079 if (bytes < 0)
4120 while (bytes < 0);
4122 DEBUG_printf(("2http_read: Read " CUPS_LLFMT " bytes into buffer.",
4123 CUPS_LLCAST bytes));
4125 if (bytes > 0)
4126 http_debug_hex("http_read", buffer, (int)bytes);
4129 if (bytes < 0)
4133 bytes = 0;
4138 bytes = 0;
4143 else if (bytes == 0)
4149 return (bytes);
4159 static ssize_t /* O - Number of bytes read or -1 on error */
4162 size_t length) /* I - Maximum bytes to read */
4164 ssize_t bytes; /* Bytes read */
4172 bytes = (ssize_t)http->used;
4174 bytes = (ssize_t)length;
4176 DEBUG_printf(("2http_read: Grabbing %d bytes from input buffer.",
4177 (int)bytes));
4179 memcpy(buffer, http->buffer, (size_t)bytes);
4180 http->used -= (int)bytes;
4183 memmove(http->buffer, http->buffer + bytes, (size_t)http->used);
4186 bytes = http_read(http, buffer, length);
4188 return (bytes);
4196 * returning the number of bytes placed in the buffer.
4199 static ssize_t /* O - Number of bytes read or -1 on error */
4202 size_t length) /* I - Maximum bytes to read */
4634 static ssize_t /* O - Number of bytes written */
4637 size_t length) /* I - Number of bytes to write */
4639 ssize_t tbytes, /* Total bytes sent */
4640 bytes; /* Bytes sent */
4649 DEBUG_printf(("3http_write: About to write %d bytes.", (int)length));
4710 bytes = _httpTLSWrite(http, buffer, (int)length);
4713 bytes = send(http->fd, buffer, length, 0);
4715 DEBUG_printf(("3http_write: Write of " CUPS_LLFMT " bytes returned "
4716 CUPS_LLFMT ".", CUPS_LLCAST length, CUPS_LLCAST bytes));
4718 if (bytes < 0)
4762 buffer += bytes;
4763 tbytes += bytes;
4764 length -= (size_t)bytes;
4781 static ssize_t /* O - Number bytes written */
4787 ssize_t bytes; /* Bytes written */
4803 if ((bytes = http_write(http, buffer, length)) < 0)
4815 return (bytes);