• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/cups-372.4/cups/filter/

Lines Matching refs:bytes

39  *   cups_read_fd()            - Read bytes from a file.
40 * cups_swap() - Swap bytes in raster data...
41 * cups_write_fd() - Write bytes to a file.
84 static int cups_raster_io(cups_raster_t *r, unsigned char *buf, int bytes);
87 int bytes);
91 static ssize_t cups_read_fd(void *ctx, unsigned char *buf, size_t bytes);
92 static void cups_swap(unsigned char *buf, int bytes);
93 static ssize_t cups_write_fd(void *ctx, unsigned char *buf, size_t bytes);
330 * the line buffer and as the number of bytes to read.
333 unsigned /* O - Number of bytes read */
336 unsigned len) /* I - Number of bytes to read */
338 int bytes; /* Bytes read */
363 * Swap bytes as needed...
412 bytes = cupsBytesPerLine;
414 while (bytes > 0)
431 if (count > bytes)
432 count = bytes;
438 bytes -= count;
443 * Repeat the next N bytes...
447 if (count > bytes)
448 count = bytes;
453 bytes -= count;
471 * Swap bytes as needed...
478 cups_swap(ptr, bytes);
486 bytes = cupsBytesPerLine;
493 bytes = remaining;
494 r->pcurrent = r->pixels + bytes;
502 memcpy(p, ptr, bytes);
510 if ((unsigned)(bytes = (int)(r->pend - r->pcurrent)) > remaining)
511 bytes = remaining;
513 memcpy(p, r->pcurrent, bytes);
514 r->pcurrent += bytes;
524 remaining -= bytes;
525 p += bytes;
750 * the line buffer and as the number of bytes to write.
753 unsigned /* O - Number of bytes written */
756 unsigned len)/* I - Number of bytes to write */
758 int bytes; /* Bytes read */
830 for (remaining = len; remaining > 0; remaining -= bytes, p += bytes)
833 * Figure out the number of remaining bytes on the current line...
836 if ((bytes = remaining) > (int)(r->pend - r->pcurrent))
837 bytes = (int)(r->pend - r->pcurrent);
845 if (memcmp(p, r->pcurrent, bytes))
855 * Mark more bytes as the same...
858 r->pcurrent += bytes;
896 memcpy(r->pcurrent, p, bytes);
898 r->pcurrent += bytes;
958 * Swap bytes as needed...
967 DEBUG_puts("Swapping header bytes...");
996 * 'cups_raster_io()' - Read/write bytes from a context, handling interruptions.
1002 int bytes) /* I - Number of bytes to read/write */
1004 ssize_t count; /* Number of bytes read/written */
1005 size_t total; /* Total bytes read/written */
1008 DEBUG_printf(("4cups_raster_io(r=%p, buf=%p, bytes=%d)", r, buf, bytes));
1010 for (total = 0; total < (size_t)bytes; total += count, buf += count)
1012 count = (*r->iocb)(r->ctx, buf, bytes - total);
1030 static int /* O - Number of bytes read */
1033 int bytes) /* I - Number of bytes to read */
1035 int count, /* Number of bytes read */
1036 remaining, /* Remaining bytes in buffer */
1037 total; /* Total bytes read */
1040 DEBUG_printf(("cups_raster_read(r=%p, buf=%p, bytes=%d)\n", r, buf, bytes));
1043 return (cups_raster_io(r, buf, bytes));
1078 total < bytes;
1081 count = bytes - total;
1117 * Copy bytes from raster buffer to "buf"...
1135 * Copy up to 127 bytes without using memcpy(); this is
1255 * Set the number of bytes per pixel/color...
1293 static int /* O - Number of bytes written */
1400 * 'cups_read_fd()' - Read bytes from a file.
1406 size_t bytes) /* I - Maximum number of bytes to read */
1410 ssize_t count; /* Number of bytes read */
1414 while ((count = read(fd, buf, (unsigned)bytes)) < 0)
1416 while ((count = read(fd, buf, bytes)) < 0)
1426 * 'cups_swap()' - Swap bytes in raster data...
1431 int bytes) /* I - Number of bytes to swap */
1436 bytes /= 2;
1438 while (bytes > 0)
1446 bytes --;
1452 * 'cups_write_fd()' - Write bytes to a file.
1458 size_t bytes) /* I - Number of bytes to write */
1462 ssize_t count; /* Number of bytes written */
1466 while ((count = write(fd, buf, (unsigned)bytes)) < 0)
1468 while ((count = write(fd, buf, bytes)) < 0)