Lines Matching defs:result

1492 parse_inquiry(Microtek_Info *mi, unsigned char *result)
1495 unsigned char result[0x60] = {
1505 snprintf(mi->vendor_id, 8 + 1, "%.*s", 8, (char *)&result[8]);
1506 snprintf(mi->model_name, 16 + 1, "%.*s", 16, (char *)&result[16]);
1507 snprintf(mi->revision_num, 4 + 1, "%.*s", 4, (char *)&result[32]);
1508 snprintf(mi->vendor_string, 20 + 1, "%.*s", 20, (char *)&result[36]);
1510 mi->device_type = (SANE_Byte)(result[0] & 0x1f);
1511 mi->SCSI_firmware_ver_major = (SANE_Byte)((result[1] & 0xf0) >> 4);
1512 mi->SCSI_firmware_ver_minor = (SANE_Byte)(result[1] & 0x0f);
1513 mi->scanner_firmware_ver_major = (SANE_Byte)((result[2] & 0xf0) >> 4);
1514 mi->scanner_firmware_ver_minor = (SANE_Byte)(result[2] & 0x0f);
1515 mi->response_data_format = (SANE_Byte)(result[3]);
1517 mi->res_step = (SANE_Byte)(result[56] & 0x03);
1518 mi->modes = (SANE_Byte)(result[57]);
1519 mi->pattern_count = (SANE_Int)(result[58] & 0x7f);
1520 mi->pattern_dwnld = (SANE_Byte)(result[58] & 0x80) > 0;
1521 mi->feed_type = (SANE_Byte)(result[59] & 0x0F);
1522 mi->compress_type = (SANE_Byte)(result[59] & 0x30);
1523 mi->unit_type = (SANE_Byte)(result[59] & 0xC0);
1525 mi->doc_size_code = (SANE_Byte)result[60];
1529 mi->cont_settings = (SANE_Int)((result[61] & 0xf0) >> 4);
1530 if ((SANE_Int)(result[72]))
1531 mi->cont_settings = (SANE_Int)(result[72]);
1535 mi->exp_settings = (SANE_Int)(result[61] & 0x0f);
1536 if ((SANE_Int)(result[73]))
1537 mi->exp_settings = (SANE_Int)(result[73]);
1541 mi->contrast_vals = (SANE_Int)(result[72]);
1547 mi->exposure_vals = (SANE_Int)(result[73]);
1554 mi->model_code = (SANE_Byte)(result[62]);
1665 mi->source_options = (SANE_Byte)(result[63]);
1667 mi->expanded_resolution = (result[64] & 0x01);
1681 mi->enhance_cap = (result[65] & 0x03);
1684 switch (result[66] & 0x0F) {
1693 result[66]);
1707 if (result[66] & 0x08)
1709 else if (result[66] & 0x04)
1711 else if (result[66] & 0x02)
1713 else if (result[66] & 0x01)
1725 switch (result[66] >> 5) {
1733 result[66]);
1736 switch (result[66] >> 5) {
1744 result[66]);
1747 mi->fast_color_preview = (SANE_Byte)(result[67] & 0x01);
1748 mi->xfer_format_select = (SANE_Byte)(result[68] & 0x01);
1749 mi->color_sequence = (SANE_Byte)(result[69] & 0x7f);
1750 mi->does_3pass = (SANE_Byte)(!(result[69] & 0x80));
1751 mi->does_mode1 = (SANE_Byte)(result[71] & 0x01);
1753 mi->bit_formats = (SANE_Byte)(result[74] & 0x0F);
1754 mi->extra_cap = (SANE_Byte)(result[75] & 0x07);
1779 dump_inquiry(Microtek_Info *mi, unsigned char *result)
1789 MDBG_ADD("%02x ", (int)result[i++]);
1921 dump_suspect_inquiry(unsigned char *result)
1936 MDBG_ADD("%02x ", (int)result[i++]);
1942 fprintf(stderr, "%02x ", (int)result[i]);
1946 snprintf(vendor_id, 8 + 1, "%.*s", 8, (char *)&result[8]);
1947 snprintf(model_name, 16 + 1, "%.*s", 16, (char *)&result[16]);
1948 snprintf(revision_num, 4 + 1, "%.*s", 4, (char *)&result[32]);
1949 device_type = (SANE_Byte)(result[0] & 0x1f);
1950 SCSI_firmware_ver_major = (SANE_Byte)((result[1] & 0xf0) >> 4);
1951 SCSI_firmware_ver_minor = (SANE_Byte)(result[1] & 0x0f);
1952 scanner_firmware_ver_major = (SANE_Byte)((result[2] & 0xf0) >> 4);
1953 scanner_firmware_ver_minor = (SANE_Byte)(result[2] & 0x0f);
1954 response_data_format = (SANE_Byte)(result[3]);
1955 model_code = (SANE_Byte)(result[62]);
1978 id_microtek(uint8_t *result, char **model_string)
1985 device_type = (SANE_Byte)(result[0] & 0x1f);
1991 if (!(strncmp("MICROTEK", (char *)&(result[8]), 8)) ||
1992 !(strncmp("MII SC31", (char *)&(result[8]), 8)) || /* the IISP */
1993 !(strncmp("MII SC21", (char *)&(result[8]), 8)) || /* the 600ZS */
1994 !(strncmp("MII SC23", (char *)&(result[8]), 8)) || /* the other 600ZS */
1995 !(strncmp("MII SC25", (char *)&(result[8]), 8)) || /* some other 600GS */
1996 !(strncmp("AGFA ", (char *)&(result[8]), 8)) || /* Arcus II */
1997 !(strncmp("Microtek", (char *)&(result[8]), 8)) || /* some 35t+'s */
1998 !(strncmp("Polaroid", (char *)&(result[8]), 8)) || /* SprintScan 35LE */
1999 !(strncmp(" ", (char *)&(result[8]), 8)) ) {
2000 switch (result[62]) {
2030 if (!(strncmp("Polaroid", (char *)&(result[8]), 8)))
2058 response_data_format = (SANE_Byte)(result[3]);
2107 strncmp("MICROTEK", (char *)&(result[8]), 8),
2108 strncmp(" ", (char *)&(result[8]), 8),
2109 result[62]);
2124 unsigned char result[0x60];
2147 size = sizeof(result);
2148 status = sanei_scsi_cmd(sfd, inquiry, sizeof(inquiry), result, &size);
2155 if (id_microtek(result, &model_string) != SANE_STATUS_GOOD) {
2157 if (DBG_LEVEL >= 5) dump_suspect_inquiry(result);
2165 parse_inquiry(&(dev->info), result);
2166 if (DBG_LEVEL > 0) dump_inquiry(&(dev->info), result);
2260 static void sort_values(int *result, uint8_t *scanline[], int pix)
2263 for (i=0; i<STRIPS; i++) result[i] = (scanline[i])[pix];
2264 qsort(result, STRIPS, sizeof(result[0]), comparo);