From 1edb02101a9306fc711cd422ed507d18165b1691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 15 Jul 2017 11:25:39 +0200 Subject: move from support/1.0.27 to feature/1.0.27 --- backend/cardscan.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'backend/cardscan.c') diff --git a/backend/cardscan.c b/backend/cardscan.c index 6442458..eab6500 100644 --- a/backend/cardscan.c +++ b/backend/cardscan.c @@ -3,7 +3,9 @@ This file is part of the SANE package, and implements a SANE backend for various Corex Cardscan scanners. - Copyright (C) 2007-2010 m. allan noah + Copyright (C) 2007-2015 m. allan noah + + -------------------------------------------------------------------------- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -43,8 +45,6 @@ -------------------------------------------------------------------------- - This file implements a SANE backend for the Corex Cardscan 800C - The source code is divided in sections which you can easily find by searching for the tag "@@". @@ -65,6 +65,8 @@ - add has_cal_buffer config option - basic support for 600c - clean #include lines + v3, 2015-11-04, MAN + - add USB IDs for newer model 800c ################################################## DATA FROM TRACE OF WINDOWS DRIVER: @@ -224,7 +226,7 @@ four times { #include "cardscan.h" #define DEBUG 1 -#define BUILD 2 +#define BUILD 3 /* values for SANE_DEBUG_CARDSCAN env var: - errors 5 @@ -490,6 +492,16 @@ attach_one (const char *device_name) s->product_name = "Unknown"; } } + else if(vid == 0x0451){ + s->vendor_name = "Sanford"; + if(pid == 0x6250){ + s->product_name = "800c"; + } + else{ + DBG (5, "Unknown product, using default settings\n"); + s->product_name = "Unknown"; + } + } else{ DBG (5, "Unknown vendor/product, using default settings\n"); s->vendor_name = "Unknown"; @@ -862,7 +874,6 @@ sane_control_option (SANE_Handle handle, SANE_Int option, } else if (action == SANE_ACTION_SET_VALUE) { int tmp; - SANE_Word val_c; SANE_Status status; DBG (20, "sane_control_option: set value for '%s' (%d)\n", s->opt[option].name,option); @@ -883,9 +894,6 @@ sane_control_option (SANE_Handle handle, SANE_Int option, return status; } - /* may have been changed by constrain, so dont copy until now */ - val_c = *(SANE_Word *)val; - /* * Note - for those options which can assume one of a list of * valid values, we can safely assume that they will have -- cgit v1.2.3