kopia lustrzana https://gitlab.com/sane-project/backends
cleanup work.
rodzic
4a8bf3059c
commit
c3f2e4b7a6
|
@ -165,10 +165,12 @@ typedef const struct mode_param
|
|||
#define _SCANNER_PAPEROUT 0x4000000
|
||||
|
||||
/* for GetLensInformation */
|
||||
#if 0
|
||||
#define SOURCE_Reflection 0
|
||||
#define SOURCE_Transparency 1
|
||||
#define SOURCE_Negative 2
|
||||
#define SOURCE_ADF 3
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* Section 6 - additional definitions
|
||||
|
|
|
@ -736,7 +736,7 @@ typedef struct _SCANDEF
|
|||
ULong dwScanOrigin; /* where to start the scan */
|
||||
Bool fRefreshState; /* refresh ? */
|
||||
Bool fMotorBackward;
|
||||
UChar motorPower; /* how to driver the motor */
|
||||
UChar motorPower; /* how to drive the motor */
|
||||
|
||||
ULong dwMinReadFifo;
|
||||
ULong dwMaxReadFifo;
|
||||
|
|
|
@ -556,7 +556,7 @@ static int ioP98ReadWriteTest( pScanData ps )
|
|||
IODataToRegister( ps, ps->RegMemoryHigh, 0 );
|
||||
|
||||
/* fill to buffer */
|
||||
IOMoveDataToScanner( ps, buffer, 1280 );
|
||||
IOMoveDataToScanner( ps, buffer, _MEMTEST_SIZE );
|
||||
|
||||
IODataToRegister( ps, ps->RegModeControl, _ModeMappingMem );
|
||||
IODataToRegister( ps, ps->RegMemoryLow, 0 );
|
||||
|
|
|
@ -69,8 +69,7 @@ static RegDef p12CcdStop[] = {
|
|||
|
||||
/*************************** local functions *********************************/
|
||||
|
||||
/*.............................................................................
|
||||
* init the stuff according to the buttons
|
||||
/** init the stuff according to the buttons
|
||||
*/
|
||||
static void p12ButtonSetup( pScanData ps, Byte nrOfButtons )
|
||||
{
|
||||
|
@ -84,12 +83,11 @@ static void p12ButtonSetup( pScanData ps, Byte nrOfButtons )
|
|||
ps->sCaps.dwFlag |= (SFLAG_MULTIFUNC | SFLAG_BUTTONOPT);
|
||||
}
|
||||
|
||||
/*.............................................................................
|
||||
* According to what we have detected, set the other stuff
|
||||
/** According to what we have detected, set the other stuff
|
||||
*/
|
||||
static void p12InitiateComponentModel( pScanData ps )
|
||||
{
|
||||
/* preset some stuff and do te differences later */
|
||||
/* preset some stuff and do the differences later */
|
||||
ps->Device.buttons = 0;
|
||||
ps->Device.Model1Mono = _BUTTON_MODE + _CCD_SHIFT_GATE + _SCAN_GRAYTYPE;
|
||||
ps->Device.Model1Color = _BUTTON_MODE + _CCD_SHIFT_GATE;
|
||||
|
|
|
@ -1203,10 +1203,10 @@ static int ptdrvIoctl( pScanData ps, UInt cmd, pVoid arg )
|
|||
ps->DataInf.dwVxdFlag |= _VF_FIRSTSCANLINE;
|
||||
ps->DataInf.dwScanFlag&=~(_SCANNER_SCANNING|_SCANNER_PAPEROUT);
|
||||
|
||||
copy_to_user((pStartScan)arg, pstart, sizeof(StartScan));
|
||||
copy_to_user((pStartScan)arg, pstart, sizeof(StartScan));
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
/* stop scan */
|
||||
case _PTDRV_STOP_SCAN:
|
||||
|
|
|
@ -163,13 +163,7 @@ typedef long long TimerDef, *pTimerDef;
|
|||
* timer topics
|
||||
*/
|
||||
#ifndef __KERNEL__
|
||||
#if 0
|
||||
# warning "outb as delay!!!!"
|
||||
# define _DO_UDELAY(usecs) { int i; for( i = usecs; i--; ) outb(0, 0x80); }
|
||||
#else
|
||||
# define _DO_UDELAY(usecs) sanei_pp_udelay(usecs)
|
||||
#endif
|
||||
|
||||
# define _DODELAY(msecs) { int i; for( i = msecs; i--; ) _DO_UDELAY(1000); }
|
||||
#else
|
||||
# define _DO_UDELAY(usecs) udelay(usecs)
|
||||
|
|
|
@ -103,34 +103,6 @@ typedef struct {
|
|||
/*
|
||||
* here we have some structs internally used
|
||||
*/
|
||||
/* CHECK: replace current stuff by this - looks much better !!! */
|
||||
#if 0
|
||||
|
||||
typedef struct _IMAGESIZE
|
||||
{
|
||||
DWORD dwPixels;
|
||||
DWORD dwBytes;
|
||||
DWORD dwLines;
|
||||
DWORD dwBytesCh;
|
||||
} IMAGESIZE, *PIMAGESIZE;
|
||||
|
||||
|
||||
typedef struct _IMAGEDEF
|
||||
{
|
||||
IMAGESIZE Image;
|
||||
DWORD dwVxDFlag;
|
||||
DWORD dwScanFlag;
|
||||
CROPRECT Area;
|
||||
XY Dpi;
|
||||
WORD wDataType;
|
||||
WORD wBrightness;
|
||||
WORD wPhyDpiY;
|
||||
WORD wResult;
|
||||
WORD Reserved;
|
||||
} IMAGEDEF, *PIMAGEDEF;
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
ULong dwVxdFlag;
|
||||
ULong dwScanFlag;
|
||||
|
|
|
@ -324,9 +324,7 @@ static int ppDev_setMap( Plustek_Device *dev, SANE_Word *map,
|
|||
ioctl( dev->fd, _PTDRV_SETMAP, &m );
|
||||
|
||||
/* we ignore the return values */
|
||||
|
||||
free( buf );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1971,7 +1971,7 @@ SANE_Status sane_start( SANE_Handle handle )
|
|||
return SANE_STATUS_IO_ERROR;
|
||||
}
|
||||
|
||||
/* download gamma correction tables... */
|
||||
/* download gamma correction tables... */
|
||||
if( scanmode <= COLOR_256GRAY || scanmode == COLOR_GRAY16 ) {
|
||||
s->hw->setMap( s->hw, s->gamma_table[0], s->gamma_length, _MAP_MASTER);
|
||||
} else {
|
||||
|
|
Ładowanie…
Reference in New Issue