remove SP15 code

sane_open acturally opens the device you request
merge-requests/1/head
Oliver Schirrmeister 2003-06-06 09:47:24 +00:00
rodzic 4526a711f4
commit f9bec2f06c
4 zmienionych plików z 35 dodań i 28 usunięć

Wyświetl plik

@ -1,3 +1,10 @@
2003-06-06 Oliver Schirrmeister <oschirr@abm.de>
* backend/fujitsu.h backend/fujitsu.c doc/descriptions/fujitsu.desc
path from anoah@pfeiffer.edu:
remove SP15 code
sane_open actually opens the device you request
2003-06-05 Henning Meier-Geinitz <henning@meier-geinitz.de>
* backend/gt68xx.c doc/descriptions/gt68xx.desc

Wyświetl plik

@ -55,7 +55,7 @@
Section 4 - generic private routines with a lot of model-specific code
Section 5 - private routines for the M3091
Section 6 - private routines for the M3096
Section 7 - private routines for the SP15C
Section 7 - private routines for the EVPD-capable scanners
Section 8 - private routines for the M3092
...
@ -98,6 +98,9 @@
V 1.9 04-Jun-2003
- separated the 4120 and 4220 into another model (anoah@pfeiffer.edu)
- color support for the 4x20 (anoah@pfeiffer.edu)
V 1.10 04-Jun-2003
- removed SP15 code (anoah@pfeiffer.edu)
- sane_open actually opens the device you request (anoah@pfeiffer.edu)
SANE FLOW DIAGRAM
@ -572,15 +575,32 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
SANE_Status
sane_open (SANE_String_Const name, SANE_Handle * handle)
{
/** this is too simple to be right - FIXME */
struct fujitsu *scanner = (struct fujitsu *) first_dev;
*handle = scanner;
DBG (10, "sane_open %s\n", name);
struct fujitsu *dev = NULL;
struct fujitsu *scanner = NULL;
if(name[0] == 0){
DBG (10, "sane_open: no device requested, using default\n");
scanner = (struct fujitsu *) first_dev;
DBG (10, "sane_open: device %s found\n", first_dev->sane.name);
}
else{
DBG (10, "sane_open: device %s requested\n", name);
for (dev = first_dev; dev; dev = dev->next)
{
if (strcmp (dev->sane.name, name) == 0)
{
DBG (10, "sane_open: device %s found\n", name);
scanner = (struct fujitsu *) dev;
}
}
}
if (!scanner)
return SANE_STATUS_INVAL;
*handle = scanner;
/*
* Determine which SANE options are available with this scanner.
* Since many options are identical for all models, handle them
@ -7403,24 +7423,10 @@ setMode3096 (struct fujitsu *scanner, int mode)
return (SANE_STATUS_INVAL);
}
/*
* @@ Section 7 - SP15C specific internal routines
* @@ Section 7 - EVPD specific internal routines
*/
static void
setDefaultsSP15 (struct fujitsu *scanner)
{
setDefaults3096 (scanner); /* todo: add real sp15 defaults */
}
static SANE_Status
setModeSP15 (struct fujitsu *scanner, int mode)
{
return setMode3096 (scanner, mode); /* todo: what is different in the sp15? */
}
/*
* @@ Section 8 - M3092 specific internal routines
*/

Wyświetl plik

@ -359,8 +359,6 @@ struct fujitsu
#define MODEL_3091 1
/** Fujitsu M3096 (400x400dpi grayscale, simplex, FB and optional ADF) */
#define MODEL_3096 2
/** Fujitsu ScanPartner 15C (....) */
#define MODEL_SP15 3
/** 3093 */
#define MODEL_3093 4
/** 4097 */
@ -577,12 +575,10 @@ static int modelMatch (const char *product);
static void setDefaults3091 (struct fujitsu *scanner);
static void setDefaults3092 (struct fujitsu *scanner);
static void setDefaults3096 (struct fujitsu *scanner);
static void setDefaultsSP15 (struct fujitsu *scanner);
static SANE_Status setMode3091 (struct fujitsu *scanner, int mode);
static SANE_Status setMode3092 (struct fujitsu *scanner, int mode);
static SANE_Status setMode3096 (struct fujitsu *scanner, int mode);
static SANE_Status setModeSP15 (struct fujitsu *scanner, int mode);
static void calculateDerivedValues (struct fujitsu *scanner);

Wyświetl plik

@ -38,9 +38,7 @@
:model "M4097"
:interface "SCSI"
:model "fi-4120C"
:interface "USB SCSI"
:status :untested
:comment "Probably similar to fi-4220C?"
:interface "SCSI USB"
:model "fi-4220C"
:interface "SCSI USB"
:model "fi-4340C"