Lines Matching defs:line

1160 /* data_pixels is per line.
1323 int i, line, lines;
1329 for (line=0; line < lines; ++line) {
1331 buf[line * s->params.bytes_per_line + i] = s->background[0]; /*red */
1332 buf[line * s->params.bytes_per_line + s->params.pixels_per_line + i] = s->background[1]; /*green */
1333 buf[line * s->params.bytes_per_line + 2 * s->params.pixels_per_line + i] = s->background[2]; /*blue */
1390 for (line=0; line < lines; ++line) {
1392 s->background[0] += buf[line * s->params.bytes_per_line + i]; /*red */
1393 s->background[1] += buf[line * s->params.bytes_per_line + s->params.pixels_per_line + i]; /*green */
1394 s->background[2] += buf[line * s->params.bytes_per_line + 2 * s->params.pixels_per_line + i]; /*blue */
1541 DBG(1, "out of memory (line %d)\n", __LINE__);
1636 /* Calculate how many bytes are really used per line */
1641 /* Calculate how many bytes per line will be returned by the scanner.
1642 magicolor needed this because it uses padding so scan bytes per line != image bytes per line.
1698 uncompressed data is RRRR...GGGG...BBBB per line */
1703 DBG (min(18,DBG_READ), "%s: bytes_read in line: %d\n", __func__, s->bytes_read_in_line);
1711 /* First, fill the line buffer for the current line: */
1723 /* We have filled as much as possible of the current line
1724 * with data from the scanner. If we have a complete line,
1726 line points to the current byte in the input s->line_buffer
1732 SANE_Byte *line = s->line_buffer;
1740 *data++ = 255-line[0]; /*red */
1741 *data++ = 255-line[s->params.pixels_per_line]; /*green */
1742 *data++ = 255-line[2 * s->params.pixels_per_line]; /*blue */
1750 if (line[0] < threshold || line[s->params.pixels_per_line] < threshold || line[2 * s->params.pixels_per_line] < threshold)
1756 data++; /* move on a byte if the byte is full or the line is complete */
1760 *data++ = (255-line[0]
1761 +255-line[s->params.pixels_per_line]
1762 +255-line[2 * s->params.pixels_per_line])
1765 line++;
2514 attach_one_config(SANEI_Config __sane_unused__ *config, const char *line,
2519 int len = strlen(line);
2521 DBG(7, "%s: len = %d, line = %s\n", __func__, len, line);
2523 if (sscanf(line, "usb %i %i", &vendor, &product) == 2) {
2536 sanei_usb_attach_matching_devices(line, attach_one_usb);
2538 } else if (strncmp(line, "usb", 3) == 0 && len == 3) {
2550 } else if (strncmp(line, "net", 3) == 0) {
2555 sanei_config_skip_whitespace(line + 3);
2577 } else if (sscanf(line, "snmp-timeout %i\n", &timeout)) {
2582 } else if (sscanf(line, "scan-data-timeout %i\n", &timeout)) {
2587 } else if (sscanf(line, "request-timeout %i\n", &timeout)) {
2593 /* TODO: Warning about unparsable line! */
2704 DBG(1, "out of memory (line %d)\n", __LINE__);