diff --git a/backend/mustek_usb2.c b/backend/mustek_usb2.c index e2292ff9b..81965ebf0 100644 --- a/backend/mustek_usb2.c +++ b/backend/mustek_usb2.c @@ -149,8 +149,6 @@ static Scanner_Model mustek_A2nu2_model = { }; -/* Forward declarations */ - static SANE_Bool SetParameters (LPSETPARAMETERS pSetParameters); static SANE_Bool GetParameters (LPGETPARAMETERS pGetParameters); static SANE_Bool StartScan (void); @@ -195,7 +193,7 @@ calc_parameters (Mustek_Scanner * s) s->params.last_frame = SANE_TRUE; - if (strcmp (val, "Color48") == 0) /* Color48 */ + if (strcmp (val, "Color48") == 0) { s->params.format = SANE_FRAME_RGB; s->params.depth = 16; @@ -207,7 +205,7 @@ calc_parameters (Mustek_Scanner * s) s->setpara.smScanMode = SM_RGB24; } } - else if (strcmp (val, "Color24") == 0) /* Color24 */ + else if (strcmp (val, "Color24") == 0) { s->params.format = SANE_FRAME_RGB; s->params.depth = 8; @@ -516,7 +514,6 @@ init_options (Mustek_Scanner * s) return SANE_STATUS_GOOD; } -/***************************** Code from spicall.c *****************************/ static SANE_Byte * g_lpNegImageData = NULL; static SANE_Bool g_bIsFirstGetNegData = TRUE; @@ -525,16 +522,11 @@ static unsigned int g_dwAlreadyGetNegLines = 0; #ifdef SANE_UNUSED /********************************************************************** -Author: Jack Date: 2005/05/13 -Routine Description: Get gamma input/output bit count Parameters: pGammaInfo: the gamma information Return value: - if the operation success - return TRUE - else - return FALSE + TRUE if the operation success, FALSE otherwise ***********************************************************************/ static SANE_Bool GetGammaInfo (LPGAMMAINFO pGammaInfo) @@ -570,16 +562,11 @@ GetGammaInfo (LPGAMMAINFO pGammaInfo) } #endif /********************************************************************** -Author: Jack Date: 2005/05/13 -Routine Description: set scan parameters Parameters: pSetParameters: the information of scaning Return value: - if the operation success - return TRUE - else - return FALSE + TRUE if the operation success, FALSE otherwise ***********************************************************************/ static SANE_Bool SetParameters (LPSETPARAMETERS pSetParameters) @@ -799,16 +786,11 @@ SetParameters (LPSETPARAMETERS pSetParameters) } /********************************************************************** -Author: Jack Date: 2005/05/13 -Routine Description: get the optical dpi and scan area Parameters: pGetParameters: the information of scan Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool GetParameters (LPGETPARAMETERS pGetParameters) @@ -842,17 +824,9 @@ GetParameters (LPGETPARAMETERS pGetParameters) } /********************************************************************** -Author: Jack Date: 2005/05/13 - -Routine Description: start scan image -Parameters: - none Return value: - if operation is success - return TRUE - else - return FALSE + TRUE if operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool StartScan () @@ -887,17 +861,11 @@ StartScan () } /********************************************************************** -Author: Jack Date: 2005/05/14 -Routine Description: Read the scanner data Parameters: - pImageRows: the information of the data Return value: - if the operation is seccuss - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool ReadScannedData (LPIMAGEROWS pImageRows) @@ -1028,16 +996,9 @@ ReadScannedData (LPIMAGEROWS pImageRows) } /********************************************************************** -Author: Jack Date: 2005/05/14 -Routine Description: Stop scan -Parameters: - none Return value: - if operation is success - return TRUE - else - return FALSE + TRUE if operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool StopScan () @@ -1088,16 +1049,9 @@ StopScan () } /********************************************************************** -Author: Jack Date: 2005/05/14 -Routine Description: Check the status of TA -Parameters: - none Return value: - if operation is success - return TRUE - else - return FALSE + TRUE if TA is connected, FALSE otherwise ***********************************************************************/ static SANE_Bool IsTAConnected () @@ -1125,16 +1079,11 @@ IsTAConnected () #ifdef SANE_UNUSED /********************************************************************** -Author: Jack Date: 2005/05/14 -Routine Description: Get the status of the HK Parameters: pKey: the status of key Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool GetKeyStatus (SANE_Byte * pKey) @@ -1188,16 +1137,12 @@ GetKeyStatus (SANE_Byte * pKey) } #endif /********************************************************************** -Author: Jack Date: 2005/05/14 -Routine Description: Deal with the image with auto level Parameters: lpSource: the data of image scanMode: the scan mode ScanLines: the rows of image BytesPerLine: the bytes of per line -Return value: - none ***********************************************************************/ static void AutoLevel (SANE_Byte *lpSource, SCANMODE scanMode, unsigned short ScanLines, @@ -1446,15 +1391,11 @@ AutoLevel (SANE_Byte *lpSource, SCANMODE scanMode, unsigned short ScanLines, #ifdef SANE_UNUSED /********************************************************************** -Author: Jack Date: 2005/05/14 -Routine Description: Deal with image with auto level Parameters: pDIB: the data of image ImageWidth: the width of image ImageHeight: the height of image -Return value: - none ***********************************************************************/ static void QBETDetectAutoLevel (void *pDIB, unsigned int ImageWidth, unsigned int ImageHeight) @@ -1741,16 +1682,12 @@ QBETDetectAutoLevel (void *pDIB, unsigned int ImageWidth, unsigned int ImageHeig #ifdef SANE_UNUSED /********************************************************************** -Author: Jack Date: 2005/05/14 -Routine Description: Change the image data and deal with auto level Parameters: lpSource: the data of image scanMode: the scan mode ScanLines: the rows of image BytesPerLine: the bytes of per line -Return value: - none ***********************************************************************/ static void QBetChange (SANE_Byte *lpSource, SCANMODE scanMode, unsigned short ScanLines, diff --git a/backend/mustek_usb2_asic.h b/backend/mustek_usb2_asic.h index 3f3ac3a3f..3f1ce406e 100644 --- a/backend/mustek_usb2_asic.h +++ b/backend/mustek_usb2_asic.h @@ -1212,7 +1212,6 @@ RGBColor; #define ES01_2CE_VALID_PIXEL_PARAMETER_OF_SEGMENT15 0x2CE #define ES01_2CF_VALID_PIXEL_PARAMETER_OF_SEGMENT16 0x2CF -/* forward declarations */ static STATUS OpenScanChip (PAsic chip); static STATUS CloseScanChip (PAsic chip); static STATUS SafeInitialChip (PAsic chip); @@ -1237,8 +1236,6 @@ static STATUS SetExtraSetting (PAsic chip, unsigned short wXResolution, unsigned short wCCD_PixelNumber, SANE_Bool isCaribrate); -/* Forward declarations */ - static STATUS Mustek_SendData (PAsic chip, unsigned short reg, SANE_Byte data); static STATUS Mustek_SendData2Byte (PAsic chip, unsigned short reg, SANE_Byte data); static STATUS Mustek_ReceiveData (PAsic chip, SANE_Byte * reg); diff --git a/backend/mustek_usb2_high.c b/backend/mustek_usb2_high.c index 6982dca44..29d2ec02b 100644 --- a/backend/mustek_usb2_high.c +++ b/backend/mustek_usb2_high.c @@ -53,8 +53,6 @@ #include "mustek_usb2_high.h" -/* ******************++ spuicall_g.h ****************************/ - /*global variable HOLD: these should go to scanner structure */ /*base type*/ @@ -128,7 +126,6 @@ static SANE_Byte * g_lpBefLineImageData = NULL; static SANE_Bool g_bIsFirstReadBefData = TRUE; static unsigned int g_dwAlreadyGetLines = 0; -/* forward declarations */ static SANE_Bool MustScanner_Init (void); static SANE_Bool MustScanner_GetScannerState (void); static SANE_Bool MustScanner_PowerControl (SANE_Bool isLampOn, SANE_Bool isTALampOn); @@ -189,15 +186,8 @@ static void ModifyLinePoint (SANE_Byte * lpImageData, #include "mustek_usb2_transparent.c" /********************************************************************** -Author: Jack Date: 2005/05/13 - Routine Description: -Parameters: - none Return value: - if initialize the scanner success - return TRUE - else - return FALSE + TRUE if initialize the scanner success, FALSE otherwise ***********************************************************************/ static SANE_Bool MustScanner_Init () @@ -243,16 +233,9 @@ MustScanner_Init () } /********************************************************************** -Author: Jack Date: 2005/05/13 -Routine Description: check the scanner connect status -Parameters: - none Return value: - if scanner's status is OK - return TRUE - else - return FASLE + TRUE if scanner's status is OK, FALSE otherwise ***********************************************************************/ static SANE_Bool MustScanner_GetScannerState () @@ -271,17 +254,12 @@ MustScanner_GetScannerState () } /********************************************************************** -Author: Jack Date: 2005/05/13 -Routine Description: Turn the lamp on or off Parameters: isLampOn: turn the lamp on or off isTALampOn: turn the TA lamp on or off Return value: - if operation success - return TRUE - else - return FALSE + TRUE if operation success, FALSE otherwise ***********************************************************************/ static SANE_Bool MustScanner_PowerControl (SANE_Bool isLampOn, SANE_Bool isTALampOn) @@ -326,16 +304,9 @@ MustScanner_PowerControl (SANE_Bool isLampOn, SANE_Bool isTALampOn) } /********************************************************************** -Author: Jack Date: 2005/05/13 -Routine Description: Turn the carriage home -Parameters: - none Return value: - if the operation success - return TRUE - else - return FALSE + TRUE if the operation success, FALSE otherwise ***********************************************************************/ static SANE_Bool MustScanner_BackHome () @@ -369,16 +340,11 @@ MustScanner_BackHome () } /********************************************************************** -Author: Jack Date: 2005/05/13 -Routine Description: prepare the scan image Parameters: bScanSource: the scan source Return value: - if operation is success - return TRUE - else - return FALSE + TRUE if operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool MustScanner_Prepare (SANE_Byte bScanSource) @@ -458,11 +424,9 @@ MustScanner_Prepare (SANE_Byte bScanSource) #ifdef SANE_UNUSED /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: - Adjuest the offset + Adjust the offset Parameters: - nTimes: Adjuest offset the times + nTimes: Adjust offset the times bDirection: whether direction bOffset: the data of offset bLastMin: the last min data @@ -473,10 +437,7 @@ Parameters: wStdMinLevel: the min level of offset wStdMaxLevel: the max level of offset Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool MustScanner_AdjustOffset (int nTimes, SANE_Bool * bDirection, SANE_Byte * bOffset, @@ -615,12 +576,9 @@ MustScanner_AdjustOffset (int nTimes, SANE_Bool * bDirection, SANE_Byte * bOffse #ifdef SANE_UNUSED /********************************************************************** - -Author: Jack Date: 2005/05/15 -Routine Description: - Adjuest the offset second times + Adjust the offset second times Parameters: - nTimes: Adjuest offset the times + nTimes: Adjust offset the times bDirection: whether direction bOffset: the data of offset bLastMin: the last min data @@ -631,10 +589,7 @@ Parameters: wStdMinLevel: the min level of offset wStdMaxLevel: the max level of offset Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool MustScanner_SecondAdjustOffset (int nTimes, SANE_Bool * bDirection, SANE_Byte * bOffset, @@ -737,8 +692,6 @@ MustScanner_SecondAdjustOffset (int nTimes, SANE_Bool * bDirection, SANE_Byte * #endif /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: Filter the data Parameters: pSort: the sort data @@ -778,18 +731,13 @@ MustScanner_FiltLower (unsigned short * pSort, unsigned short TotalCount, unsign } /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: Repair line when single CCD and color is 48bit Parameters: lpLine: point to image be repaired isOrderInvert: RGB or BGR wLinesCount: how many line be repaired Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool MustScanner_GetRgb48BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert, @@ -974,18 +922,13 @@ MustScanner_GetRgb48BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert, } /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: Repair line when double CCD and color is 48bit Parameters: lpLine: point to image be repaired isOrderInvert: RGB or BGR wLinesCount: how many line be repaired Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool MustScanner_GetRgb48BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert, @@ -1419,18 +1362,13 @@ MustScanner_GetRgb48BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert, } /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: Repair line when single CCD and color is 24bit Parameters: lpLine: point to image be repaired isOrderInvert: RGB or BGR wLinesCount: how many line be repaired Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool MustScanner_GetRgb24BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert, @@ -1672,18 +1610,13 @@ MustScanner_GetRgb24BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert, } /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: Repair line when double CCD and color is 24bit Parameters: lpLine: point to image be repaired isOrderInvert: RGB or BGR wLinesCount: how many line be repaired Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool MustScanner_GetRgb24BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert, @@ -2105,18 +2038,13 @@ MustScanner_GetRgb24BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert, } /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: Repair line when single CCD and color is 16bit Parameters: lpLine: point to image be repaired isOrderInvert: RGB or BGR wLinesCount: how many line be repaired Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool MustScanner_GetMono16BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert, @@ -2200,18 +2128,13 @@ MustScanner_GetMono16BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert, } /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: Repair line when double CCD and color is 16bit Parameters: lpLine: point to image be repaired isOrderInvert: RGB or BGR wLinesCount: how many line be repaired Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool MustScanner_GetMono16BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert, @@ -2381,18 +2304,13 @@ MustScanner_GetMono16BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert } /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: Repair line when single CCD and color is 8bit Parameters: lpLine: point to image be repaired isOrderInvert: RGB or BGR wLinesCount: how many line be repaired Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool MustScanner_GetMono8BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert, @@ -2472,18 +2390,13 @@ MustScanner_GetMono8BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert, } /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: Repair line when double CCD and color is 8bit Parameters: lpLine: point to image be repaired isOrderInvert: RGB or BGR wLinesCount: how many line be repaired Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool MustScanner_GetMono8BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert, @@ -2635,18 +2548,13 @@ MustScanner_GetMono8BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert, } /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: Repair line when single CCD and color is 1bit Parameters: lpLine: point to image be repaired isOrderInvert: RGB or BGR wLinesCount: how many line be repaired Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool MustScanner_GetMono1BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert, @@ -2726,18 +2634,13 @@ MustScanner_GetMono1BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert, } /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: Repair line when double CCD and color is 1bit Parameters: lpLine: point to image be repaired isOrderInvert: RGB or BGR wLinesCount: how many line be repaired Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool MustScanner_GetMono1BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert, @@ -2843,13 +2746,9 @@ MustScanner_GetMono1BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert, } /********************************************************************** -Author: Jack Date: 2005/05/21 -Routine Description: prepare calculate Max and Min value Parameters: wResolution: the scan resolution -Return value: - none ***********************************************************************/ static void MustScanner_PrepareCalculateMaxMin (unsigned short wResolution) @@ -2898,16 +2797,12 @@ MustScanner_PrepareCalculateMaxMin (unsigned short wResolution) } /********************************************************************** -Author: Jack Date: 2005/05/21 -Routine Description: calculate the Max and Min value Parameters: pBuffer: the image data lpMaxValue: the max value lpMinValue: the min value wResolution: the scan resolution -Return value: - none ***********************************************************************/ static void MustScanner_CalculateMaxMin (SANE_Byte * pBuffer, unsigned short * lpMaxValue, @@ -2975,16 +2870,7 @@ MustScanner_CalculateMaxMin (SANE_Byte * pBuffer, unsigned short * lpMaxValue, /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: Read the data from scanner -Parameters: - none -Return value: - if operation is success - return TRUE - else - return FALSE ***********************************************************************/ static void * MustScanner_ReadDataFromScanner (void * dummy) @@ -3069,13 +2955,7 @@ MustScanner_ReadDataFromScanner (void * dummy) } /********************************************************************** -Author: Jack Date: 2005/05/26 -Routine Description: get the lines of scanned -Parameters: - none -Return value: - the lines of scanned ***********************************************************************/ static unsigned int GetScannedLines () @@ -3090,14 +2970,7 @@ GetScannedLines () } /********************************************************************** -Author: Jack Date: 2005/05/26 - -Routine Description: get lines which pass to superstratum -Parameters: - none -Return value: - the lines which pass to superstratum ***********************************************************************/ static unsigned int GetReadyLines () @@ -3112,13 +2985,9 @@ GetReadyLines () } /********************************************************************** -Author: Jack Date: 2005/05/26 -Routine Description: add the scanned total lines Parameters: wAddLines: add the lines -Return value: - none ***********************************************************************/ static void AddScannedLines (unsigned short wAddLines) @@ -3131,13 +3000,7 @@ AddScannedLines (unsigned short wAddLines) } /********************************************************************** -Author: Jack Date: 2005/05/26 -Routine Description: add the ready lines -Parameters: - none -Return value: - none ***********************************************************************/ static void AddReadyLines () @@ -3148,18 +3011,14 @@ AddReadyLines () } /********************************************************************** -Author: Jack Date: 2005/05/26 -Routine Description: modify the point Parameters: lpImageData: the data of image - lpImageDataBefore: the data of before line image - dwBytesPerLine: the bytes of per line - dwLinesCount: the line count - wPixDistance: the pixel distance - wModPtCount: the modify point count -Return value: - none + lpImageDataBefore: the data of before line image + dwBytesPerLine: the bytes of per line + dwLinesCount: the line count + wPixDistance: the pixel distance + wModPtCount: the modify point count ***********************************************************************/ static void ModifyLinePoint (SANE_Byte * lpImageData, @@ -3196,8 +3055,6 @@ ModifyLinePoint (SANE_Byte * lpImageData, } /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: Modifiy the image data Parameters: A: the input the image data @@ -3230,4 +3087,4 @@ QBET4 (SANE_Byte A, SANE_Byte B) A = A & 0x0f; B = B & 0x0f; return bQBET[A][B]; -} /* end of the file MustScanner.c */ +} diff --git a/backend/mustek_usb2_reflective.c b/backend/mustek_usb2_reflective.c index 365f21260..403858641 100644 --- a/backend/mustek_usb2_reflective.c +++ b/backend/mustek_usb2_reflective.c @@ -45,8 +45,6 @@ This file implements a SANE backend for the Mustek BearPaw 2448 TA Pro and similar USB2 scanners. */ -/* forward declarations */ - static SANE_Bool Reflective_Reset (void); static SANE_Bool Reflective_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest); static SANE_Bool Reflective_SetupScan (COLORMODE ColorMode, unsigned short XDpi, unsigned short YDpi, @@ -59,19 +57,10 @@ static SANE_Bool Reflective_FindTopLeft (unsigned short * lpwStartX, unsigned sh static SANE_Bool Reflective_LineCalibration16Bits (void); static SANE_Bool Reflective_PrepareScan (void); -/*function description*/ - /********************************************************************** -Author: Jack Date: 2005/05/13 -Routine Description: reset the scanner status -Parameters: - none Return value: - if operation is success - return TRUE - els - return FALSE + TRUE if operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Reflective_Reset () @@ -133,17 +122,12 @@ Reflective_Reset () } /********************************************************************** -Author: Jack Date: 2005/05/13 -Routine Description: get the suggest parameter of scaning Parameters: pTarget: the information of scaning pSuggest: suggest parameter of scaning Return value: - if the operation is success - return TRUE - els - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Reflective_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest) @@ -193,13 +177,6 @@ Reflective_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest) pTarget->wDpi); DBG (DBG_FUNC, "Reflective_ScanSuggest: pSuggest->wXDpi = %d\n", pSuggest->wXDpi); - - - - - - - DBG (DBG_FUNC, "Reflective_ScanSuggest: pSuggest->wYDpi = %d\n", pSuggest->wYDpi); @@ -334,8 +311,6 @@ Reflective_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest) } /********************************************************************** -Author: Jack Date: 2005/05/13 -Routine Description: setup scanning process Parameters: ColorMode: ScanMode of Scanning, CM_RGB48, CM_GRAY and so on @@ -347,10 +322,7 @@ Parameters: Width: Width of Scan Image Height: Height of Scan Image Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Reflective_SetupScan (COLORMODE ColorMode, @@ -560,16 +532,9 @@ Reflective_SetupScan (COLORMODE ColorMode, } /********************************************************************** -Author: Jack Date: 2005/05/13 -Routine Description: To adjust the value of offset gain of R/G/B -Parameters: - none Return value: - if operation is success - return TRUE - else - return FALSE + TRUE if operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Reflective_AdjustAD () @@ -1095,17 +1060,12 @@ Reflective_AdjustAD () } /********************************************************************** -Author: Jack Date: 2005/05/14 -Routine Description: Find top and left side Parameters: lpwStartX: the left side lpwStartY: the top side Return value: - if operation is success - return TRUE - else - return FALSE + TRUE if operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Reflective_FindTopLeft (unsigned short * lpwStartX, unsigned short * lpwStartY) @@ -1277,16 +1237,9 @@ Reflective_FindTopLeft (unsigned short * lpwStartX, unsigned short * lpwStartY) } /********************************************************************** -Author: Jack Date: 2005/05/14 -Routine Description: Stop scan -Parameters: - none Return value: - if operation is success - return TRUE - else - return FALSE + TRUE if operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Reflective_StopScan () @@ -1322,16 +1275,9 @@ Reflective_StopScan () } /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: Get the calibration data -Parameters: - none Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Reflective_LineCalibration16Bits () @@ -1742,16 +1688,9 @@ Reflective_LineCalibration16Bits () } /********************************************************************** -Author: Jack Date: 2005/05/14 -Routine Description: Prepare scan image -Parameters: - none Return value: - if operation is success - return TRUE - else - return FALSE + TRUE if operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Reflective_PrepareScan () @@ -1863,19 +1802,13 @@ Reflective_PrepareScan () } /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: Get the data of image Parameters: lpBlock: the data of image Rows: the rows of image - isOrderInvert: the RGB order Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Reflective_GetRows (SANE_Byte * lpBlock, unsigned short * Rows, SANE_Bool isOrderInvert) @@ -1934,4 +1867,4 @@ Reflective_GetRows (SANE_Byte * lpBlock, unsigned short * Rows, SANE_Bool isOrde DBG (DBG_FUNC, "Reflective_GetRows: leave Reflective_GetRows \n"); return FALSE; -} /* end of the file ScannerReflective.c */ +} diff --git a/backend/mustek_usb2_transparent.c b/backend/mustek_usb2_transparent.c index e2cf071f6..48d39943b 100644 --- a/backend/mustek_usb2_transparent.c +++ b/backend/mustek_usb2_transparent.c @@ -46,7 +46,6 @@ and similar USB2 scanners. */ -/* forward declarations */ static SANE_Bool Transparent_Reset (void); static SANE_Bool Transparent_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest); static SANE_Bool Transparent_SetupScan (COLORMODE ColorMode, unsigned short XDpi, unsigned short YDpi, @@ -60,19 +59,10 @@ static SANE_Bool Transparent_LineCalibration16Bits (unsigned short wTAShadingMin static SANE_Bool Transparent_PrepareScan (void); -/*function description*/ - /********************************************************************** -Author: Jack Date: 2005/05/13 -Routine Description: reset the scanner -Parameters: - none Return value: - if operation is success - return TRUE - else - return FALSE + TRUE if operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Transparent_Reset () @@ -131,17 +121,12 @@ Transparent_Reset () } /********************************************************************** -Author: Jack Date: 2005/05/13 -Routine Description: get suggest parameter of scaning Parameters: pTarget: the information of scaning pSuggest: the suggest parameter of scaning Return value: - if operation is success - return TRUE - else - return FALSE + TRUE if operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Transparent_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest) @@ -282,8 +267,6 @@ Transparent_ScanSuggest (PTARGETIMAGE pTarget, PSUGGESTSETTING pSuggest) } /********************************************************************** -Author: Jack Date: 2005/05/13 -Routine Description: setup scanning process Parameters: ColorMode: ScanMode of Scanning, CM_RGB48, CM_GRAY and so on @@ -295,10 +278,7 @@ Parameters: Width: Width of Scan Image Height: Height of Scan Image Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Transparent_SetupScan (COLORMODE ColorMode, unsigned short XDpi, unsigned short YDpi, @@ -492,16 +472,9 @@ Transparent_SetupScan (COLORMODE ColorMode, unsigned short XDpi, unsigned short } /********************************************************************** -Author: Jack Date: 2005/05/14 -Routine Description: Stop scan -Parameters: - none Return value: - if operation is success - return TRUE - else - return FALSE + TRUE if operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Transparent_StopScan () @@ -533,18 +506,13 @@ Transparent_StopScan () } /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: Get the data of image Parameters: lpBlock: the data of image Rows: the rows of image isOrderInvert: the RGB order Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Transparent_GetRows (SANE_Byte * lpBlock, unsigned short * Rows, SANE_Bool isOrderInvert) @@ -603,16 +571,9 @@ Transparent_GetRows (SANE_Byte * lpBlock, unsigned short * Rows, SANE_Bool isOrd } /********************************************************************** -Author: Jack Date: 2005/05/13 -Routine Description: To adjust the value of offset gain of R/G/B -Parameters: - none Return value: - if operation is success - return TRUE - else - return FALSE + TRUE if operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Transparent_AdjustAD () @@ -1113,17 +1074,12 @@ Transparent_AdjustAD () } /********************************************************************** -Author: Jack Date: 2005/05/14 -Routine Description: Find top and left side Parameters: lpwStartX: the left side lpwStartY: the top side Return value: - if operation is success - return TRUE - else - return FALSE + TRUE if operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Transparent_FindTopLeft (unsigned short * lpwStartX, unsigned short * lpwStartY) @@ -1265,16 +1221,9 @@ Transparent_FindTopLeft (unsigned short * lpwStartX, unsigned short * lpwStartY) } /********************************************************************** -Author: Jack Date: 2005/05/15 -Routine Description: Get the calibration data -Parameters: - none Return value: - if the operation is success - return TRUE - else - return FALSE + TRUE if the operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Transparent_LineCalibration16Bits (unsigned short wTAShadingMinus) @@ -1649,16 +1598,9 @@ Transparent_LineCalibration16Bits (unsigned short wTAShadingMinus) } /********************************************************************** -Author: Jack Date: 2005/05/14 -Routine Description: Prepare scan image -Parameters: - none Return value: - if operation is success - return TRUE - else - return FALSE + TRUE if operation is success, FALSE otherwise ***********************************************************************/ static SANE_Bool Transparent_PrepareScan () @@ -1742,4 +1684,4 @@ Transparent_PrepareScan () DBG (DBG_FUNC, "Transparent_PrepareScan: leave Transparent_PrepareScan\n"); return TRUE; -} /* end of the file ScannerTransparent.c */ +}