kopia lustrzana https://gitlab.com/sane-project/backends
- added protection against configuration tools that put
several 'port' option in umax_pp.conf file - fixed y origin shift bug for 610Pmerge-requests/1/head
rodzic
94e5c585fb
commit
aa7f92c063
|
@ -1,3 +1,9 @@
|
|||
2004-05-15 Stéphane Voltz <svoltz@wanadoo.fr>
|
||||
|
||||
* backend/umax_pp_low.c backend/umax_pp.c tools/umax_pp.c: fixed
|
||||
origin shift bug for 610P. Added on guard against configuration
|
||||
that can put several 'port' option in conf file.
|
||||
|
||||
2004-05-13 Stéphane Voltz <svoltz@wanadoo.fr>
|
||||
|
||||
* backend/umax_pp_low.c backend/umax_pp.c tools/umax_pp.c: fixed
|
||||
|
|
|
@ -755,6 +755,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
|
|||
size_t len;
|
||||
FILE *fp;
|
||||
SANE_Status ret;
|
||||
int portdone = 0;
|
||||
|
||||
DBG_INIT ();
|
||||
|
||||
|
@ -1003,9 +1004,18 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
|
|||
}
|
||||
else if ((strncmp (cp, "port", 4) == 0) && isspace (cp[4]))
|
||||
{
|
||||
/* protect ourself from buggy configuration tool such as
|
||||
* mandrake's 9.2 control panel */
|
||||
if (portdone)
|
||||
{
|
||||
DBG (2,
|
||||
"'port' option given more than once, check your umax_pp.conf file!!\n");
|
||||
return SANE_STATUS_INVAL;
|
||||
}
|
||||
|
||||
cp += 5;
|
||||
cp = sanei_config_skip_whitespace (cp);
|
||||
portdone = 1;
|
||||
|
||||
if (*cp)
|
||||
{
|
||||
|
@ -2241,7 +2251,8 @@ sane_start (SANE_Handle handle)
|
|||
|
||||
/* leading lines for 610P aren't complete in color mode */
|
||||
/* and should be discarded */
|
||||
if((sanei_umax_pp_getastra()<1210)&&(dev->color == UMAX_PP_MODE_COLOR))
|
||||
if ((sanei_umax_pp_getastra () < 1210)
|
||||
&& (dev->color == UMAX_PP_MODE_COLOR))
|
||||
{
|
||||
rc =
|
||||
sanei_umax_pp_read (2 * delta * dev->tw * dev->bpp, dev->tw, dev->dpi,
|
||||
|
|
|
@ -3614,10 +3614,12 @@ putByte610p (int data)
|
|||
int status, control, j;
|
||||
|
||||
j = 0;
|
||||
do {
|
||||
do
|
||||
{
|
||||
status = Inb (STATUS) & 0xF8;
|
||||
j++;
|
||||
} while((j<20)&&(status & 0x08));
|
||||
}
|
||||
while ((j < 20) && (status & 0x08));
|
||||
|
||||
if ((status != 0xC8) && (status != 0xC0))
|
||||
{
|
||||
|
@ -10562,8 +10564,7 @@ sanei_umax_pp_scan (int x, int y, int width, int height, int dpi, int color,
|
|||
len = offset;
|
||||
else
|
||||
len = offset - read;
|
||||
len =
|
||||
sanei_umax_pp_readBlock (len, tw, dpi, 0, buffer+read);
|
||||
len = sanei_umax_pp_readBlock (len, tw, dpi, 0, buffer + read);
|
||||
if (len == 0)
|
||||
{
|
||||
DBG (0,
|
||||
|
@ -11065,7 +11066,7 @@ sanei_umax_pp_startScan (int x, int y, int width, int height, int dpi,
|
|||
vgaGreen = brightness / 256;
|
||||
}
|
||||
|
||||
/* correct y to match exact scan area start
|
||||
/* corrects y to match exact scan area start
|
||||
* and lets room for a leading zone so that
|
||||
* we can reorder data */
|
||||
switch (sanei_umax_pp_getastra ())
|
||||
|
@ -11075,34 +11076,20 @@ sanei_umax_pp_startScan (int x, int y, int width, int height, int dpi,
|
|||
switch (dpi)
|
||||
{
|
||||
case 600:
|
||||
y += 0;
|
||||
y += 64;
|
||||
break;
|
||||
case 300:
|
||||
y += 0;
|
||||
y += 32;
|
||||
break;
|
||||
case 150:
|
||||
y += 0;
|
||||
y += 16;
|
||||
break;
|
||||
case 75:
|
||||
y += 0;
|
||||
y += 8;
|
||||
break;
|
||||
}
|
||||
else
|
||||
switch (dpi)
|
||||
{
|
||||
case 600:
|
||||
y += 0;
|
||||
break;
|
||||
case 300:
|
||||
y += 0;
|
||||
break;
|
||||
case 150:
|
||||
y += 0;
|
||||
break;
|
||||
case 75:
|
||||
y += 0;
|
||||
break;
|
||||
}
|
||||
y += 80;
|
||||
default:
|
||||
y += 8;
|
||||
break;
|
||||
|
|
|
@ -336,7 +336,8 @@ main (int argc, char **argv)
|
|||
}
|
||||
if (trace)
|
||||
{
|
||||
printf ("UMAX 610P/1220P/2000P scanning program version 6.1 starting ...\n");
|
||||
printf
|
||||
("UMAX 610P/1220P/2000P scanning program version 6.1 starting ...\n");
|
||||
#ifdef HAVE_LINUX_PPDEV_H
|
||||
printf ("ppdev character device built-in.\n");
|
||||
#endif
|
||||
|
|
Ładowanie…
Reference in New Issue