summaryrefslogtreecommitdiff
path: root/backend/mustek_usb2_high.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-02-12 17:35:53 +0100
committerJörg Frings-Fürst <debian@jff.email>2023-02-12 17:35:53 +0100
commit84357741a6a6e6430f199b2c3f7498e0e97da9ad (patch)
tree23e8d66ede9506b94c76fb36910ca3c7dd15c74e /backend/mustek_usb2_high.c
parent302276dc1b90cfc972fb726ca94a23b18f4b0088 (diff)
New upstream version 1.2.1upstream/1.2.1
Diffstat (limited to 'backend/mustek_usb2_high.c')
-rw-r--r--backend/mustek_usb2_high.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/backend/mustek_usb2_high.c b/backend/mustek_usb2_high.c
index 5119d55..e8b067f 100644
--- a/backend/mustek_usb2_high.c
+++ b/backend/mustek_usb2_high.c
@@ -204,13 +204,13 @@ MustScanner_Init ()
DBG (DBG_FUNC, "MustScanner_Init: Call in\n");
g_chip.firmwarestate = FS_NULL;
- if (STATUS_GOOD != Asic_Open (&g_chip, g_pDeviceFile))
+ if (SANE_STATUS_GOOD != Asic_Open (&g_chip, g_pDeviceFile))
{
DBG (DBG_FUNC, "MustScanner_Init: Asic_Open return error\n");
return FALSE;
}
- if (STATUS_GOOD != Asic_Initialize (&g_chip))
+ if (SANE_STATUS_GOOD != Asic_Initialize (&g_chip))
{
DBG (DBG_FUNC, "MustScanner_Init: Asic_Initialize return error\n");
return FALSE;
@@ -263,7 +263,7 @@ static SANE_Bool
MustScanner_GetScannerState ()
{
- if (STATUS_GOOD != Asic_Open (&g_chip, g_pDeviceFile))
+ if (SANE_STATUS_GOOD != Asic_Open (&g_chip, g_pDeviceFile))
{
DBG (DBG_FUNC, "MustScanner_GetScannerState: Asic_Open return error\n");
return FALSE;
@@ -293,20 +293,20 @@ MustScanner_PowerControl (SANE_Bool isLampOn, SANE_Bool isTALampOn)
{
SANE_Bool hasTA;
DBG (DBG_FUNC, "MustScanner_PowerControl: Call in\n");
- if (STATUS_GOOD != Asic_Open (&g_chip, g_pDeviceFile))
+ if (SANE_STATUS_GOOD != Asic_Open (&g_chip, g_pDeviceFile))
{
DBG (DBG_FUNC, "MustScanner_PowerControl: Asic_Open return error\n");
return FALSE;
}
- if (STATUS_GOOD != Asic_TurnLamp (&g_chip, isLampOn))
+ if (SANE_STATUS_GOOD != Asic_TurnLamp (&g_chip, isLampOn))
{
DBG (DBG_FUNC,
"MustScanner_PowerControl: Asic_TurnLamp return error\n");
return FALSE;
}
- if (STATUS_GOOD != Asic_IsTAConnected (&g_chip, &hasTA))
+ if (SANE_STATUS_GOOD != Asic_IsTAConnected (&g_chip, &hasTA))
{
DBG (DBG_FUNC,
"MustScanner_PowerControl: Asic_IsTAConnected return error\n");
@@ -315,7 +315,7 @@ MustScanner_PowerControl (SANE_Bool isLampOn, SANE_Bool isTALampOn)
if (hasTA)
{
- if (STATUS_GOOD != Asic_TurnTA (&g_chip, isTALampOn))
+ if (SANE_STATUS_GOOD != Asic_TurnTA (&g_chip, isTALampOn))
{
DBG (DBG_FUNC,
"MustScanner_PowerControl: Asic_TurnTA return error\n");
@@ -347,20 +347,20 @@ MustScanner_BackHome ()
{
DBG (DBG_FUNC, "MustScanner_BackHome: call in \n");
- if (STATUS_GOOD != Asic_Open (&g_chip, g_pDeviceFile))
+ if (SANE_STATUS_GOOD != Asic_Open (&g_chip, g_pDeviceFile))
{
DBG (DBG_FUNC, "MustScanner_BackHome: Asic_Open return error\n");
return FALSE;
}
- if (STATUS_GOOD != Asic_CarriageHome (&g_chip, FALSE))
+ if (SANE_STATUS_GOOD != Asic_CarriageHome (&g_chip, FALSE))
{
DBG (DBG_FUNC,
"MustScanner_BackHome: Asic_CarriageHome return error\n");
return FALSE;
}
- if (STATUS_GOOD != Asic_WaitUnitReady (&g_chip))
+ if (SANE_STATUS_GOOD != Asic_WaitUnitReady (&g_chip))
{
DBG (DBG_FUNC,
"MustScanner_BackHome: Asic_WaitUnitReady return error\n");
@@ -390,14 +390,14 @@ MustScanner_Prepare (SANE_Byte bScanSource)
{
DBG (DBG_FUNC, "MustScanner_Prepare: call in\n");
- if (STATUS_GOOD != Asic_Open (&g_chip, g_pDeviceFile))
+ if (SANE_STATUS_GOOD != Asic_Open (&g_chip, g_pDeviceFile))
{
DBG (DBG_FUNC, "MustScanner_Prepare: Asic_Open return error\n");
return FALSE;
}
- if (STATUS_GOOD != Asic_WaitUnitReady (&g_chip))
+ if (SANE_STATUS_GOOD != Asic_WaitUnitReady (&g_chip))
{
DBG (DBG_FUNC,
"MustScanner_Prepare: Asic_WaitUnitReady return error\n");
@@ -407,13 +407,13 @@ MustScanner_Prepare (SANE_Byte bScanSource)
if (SS_Reflective == bScanSource)
{
DBG (DBG_FUNC, "MustScanner_Prepare:ScanSource is SS_Reflective\n");
- if (STATUS_GOOD != Asic_TurnLamp (&g_chip, TRUE))
+ if (SANE_STATUS_GOOD != Asic_TurnLamp (&g_chip, TRUE))
{
DBG (DBG_FUNC, "MustScanner_Prepare: Asic_TurnLamp return error\n");
return FALSE;
}
- if (STATUS_GOOD != Asic_SetSource (&g_chip, LS_REFLECTIVE))
+ if (SANE_STATUS_GOOD != Asic_SetSource (&g_chip, LS_REFLECTIVE))
{
DBG (DBG_FUNC,
"MustScanner_Prepare: Asic_SetSource return error\n");
@@ -423,12 +423,12 @@ MustScanner_Prepare (SANE_Byte bScanSource)
else if (SS_Positive == bScanSource)
{
DBG (DBG_FUNC, "MustScanner_Prepare:ScanSource is SS_Positive\n");
- if (STATUS_GOOD != Asic_TurnTA (&g_chip, TRUE))
+ if (SANE_STATUS_GOOD != Asic_TurnTA (&g_chip, TRUE))
{
DBG (DBG_FUNC, "MustScanner_Prepare: Asic_TurnTA return error\n");
return FALSE;
}
- if (STATUS_GOOD != Asic_SetSource (&g_chip, LS_POSITIVE))
+ if (SANE_STATUS_GOOD != Asic_SetSource (&g_chip, LS_POSITIVE))
{
DBG (DBG_FUNC,
"MustScanner_Prepare: Asic_SetSource return error\n");
@@ -439,13 +439,13 @@ MustScanner_Prepare (SANE_Byte bScanSource)
{
DBG (DBG_FUNC, "MustScanner_Prepare:ScanSource is SS_Negative\n");
- if (STATUS_GOOD != Asic_TurnTA (&g_chip, TRUE))
+ if (SANE_STATUS_GOOD != Asic_TurnTA (&g_chip, TRUE))
{
DBG (DBG_FUNC, "MustScanner_Prepare: Asic_TurnTA return error\n");
return FALSE;
}
- if (STATUS_GOOD != Asic_SetSource (&g_chip, LS_NEGATIVE))
+ if (SANE_STATUS_GOOD != Asic_SetSource (&g_chip, LS_NEGATIVE))
{
DBG (DBG_FUNC,
"MustScanner_Prepare: Asic_SetSource return error\n");
@@ -2132,7 +2132,7 @@ MustScanner_GetMono16BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
unsigned short wLinePos = 0;
unsigned short i;
- isOrderInvert = isOrderInvert;
+ (void) isOrderInvert;
DBG (DBG_FUNC, "MustScanner_GetMono16BitLine: call in\n");
@@ -2228,7 +2228,7 @@ MustScanner_GetMono16BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert
unsigned short i;
SANE_Byte * lpTemp = lpLine;
- isOrderInvert = isOrderInvert;
+ (void) isOrderInvert;
DBG (DBG_FUNC, "MustScanner_GetMono16BitLine1200DPI: call in\n");
TotalXferLines = 0;
@@ -2407,7 +2407,7 @@ MustScanner_GetMono8BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
unsigned short i;
unsigned short wLinePos = 0;
- isOrderInvert = isOrderInvert;
+ (void) isOrderInvert;
DBG (DBG_FUNC, "MustScanner_GetMono8BitLine: call in\n");
TotalXferLines = 0;
@@ -2502,7 +2502,7 @@ MustScanner_GetMono8BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
unsigned short i;
SANE_Byte bNextPixel = 0;
- isOrderInvert = isOrderInvert;
+ (void) isOrderInvert;
DBG (DBG_FUNC, "MustScanner_GetMono8BitLine1200DPI: call in\n");
TotalXferLines = 0;
@@ -2660,7 +2660,7 @@ MustScanner_GetMono1BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
unsigned short wLinePos;
unsigned short i;
- isOrderInvert = isOrderInvert;
+ (void) isOrderInvert;
DBG (DBG_FUNC, "MustScanner_GetMono1BitLine: call in\n");
@@ -2752,7 +2752,7 @@ MustScanner_GetMono1BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
unsigned short wLinePosOdd;
unsigned short wLinePosEven;
- isOrderInvert = isOrderInvert;
+ (void) isOrderInvert;
DBG (DBG_FUNC, "MustScanner_GetMono1BitLine1200DPI: call in\n");
@@ -2919,7 +2919,7 @@ MustScanner_CalculateMaxMin (SANE_Byte * pBuffer, unsigned short * lpMaxValue,
unsigned short *wSecData = NULL, *wDarkSecData = NULL;
int i, j;
- wResolution = wResolution;
+ (void) wResolution;
wSecData = (unsigned short *) malloc (sizeof (unsigned short) * g_nSecNum);
if (wSecData == NULL)
@@ -3001,7 +3001,7 @@ MustScanner_ReadDataFromScanner (void * dummy)
unsigned short wScanLinesThisBlock;
unsigned short wBufferLines = g_wLineDistance * 2 + g_wPixelDistance;
- dummy = dummy;
+ (void) dummy;
DBG (DBG_FUNC,
"MustScanner_ReadDataFromScanner: call in, and in new thread\n");
@@ -3023,7 +3023,7 @@ MustScanner_ReadDataFromScanner (void * dummy)
"MustScanner_ReadDataFromScanner: wScanLinesThisBlock=%d\n",
wScanLinesThisBlock);
- if (STATUS_GOOD !=
+ if (SANE_STATUS_GOOD !=
Asic_ReadImage (&g_chip, lpReadImage, wScanLinesThisBlock))
{
DBG (DBG_FUNC,