summaryrefslogtreecommitdiff
path: root/backend/cardscan.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-05-24 21:03:56 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-05-24 21:03:56 +0200
commit58912f68c2489bcee787599837447e0d64dfd61a (patch)
treedda50aadde35fe152da1a8d50769987ace0f1496 /backend/cardscan.c
parentcfd27ef2ad8b005fd47ab41ef29b71d9e3d48201 (diff)
New upstream version 1.0.27upstream/1.0.27
Diffstat (limited to 'backend/cardscan.c')
-rw-r--r--backend/cardscan.c24
1 files changed, 16 insertions, 8 deletions
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