From 58912f68c2489bcee787599837447e0d64dfd61a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 24 May 2017 21:03:56 +0200 Subject: New upstream version 1.0.27 --- backend/hpsj5s.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'backend/hpsj5s.c') diff --git a/backend/hpsj5s.c b/backend/hpsj5s.c index 75f3526..9c6ad79 100644 --- a/backend/hpsj5s.c +++ b/backend/hpsj5s.c @@ -161,7 +161,6 @@ SANE_Status sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize) { char line[PATH_MAX]; /*Line from config file */ - int len; /*Length of string from config file */ FILE *config_file; /*Handle to config file of this backend */ DBG_INIT (); @@ -189,7 +188,6 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize) { if ((line[0] == '#') || (line[0] == '\0')) /*comment line or empty line */ continue; - len = strlen (line); /*sanei_config_read guaranty, it's not more then PATH_MAX-1 */ strcpy (scanner_path, line); /*so, we choose last in file (uncommented) */ } -- cgit v1.2.3 From 1687222e1b9e74c89cafbb5910e72d8ec7bfd40f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 31 Jul 2019 16:59:49 +0200 Subject: New upstream version 1.0.28 --- backend/hpsj5s.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'backend/hpsj5s.c') diff --git a/backend/hpsj5s.c b/backend/hpsj5s.c index 9c6ad79..786a8d6 100644 --- a/backend/hpsj5s.c +++ b/backend/hpsj5s.c @@ -1065,7 +1065,7 @@ CalibrateScanElements () SANE_Byte CurrentLowTransferBorder; SANE_Byte CurrentUpSaveBorder; SANE_Byte CurrentLowSaveBorder; - SANE_Byte CurrentSpeed1, CurrentSpeed2; + SANE_Byte CurrentSpeed1, CurrentSpeed2; SANE_Byte CorrectionValue; SANE_Byte FilteredBuffer[2570]; @@ -1167,14 +1167,14 @@ CalibrateScanElements () CallFunctionWithParameter (0x91, 0); /*Stop engine. */ /*Note: if first read failed, junk would be calculated, but if previous - read was succeded, but last one failed, previous data'ld be used. + read was succeeded, but last one failed, previous data'ld be used. */ for(Temp = 0, j = 0; j < 2570; j++) Temp += FilteredBuffer[j]; Temp /= 2570; if((Average == 0)||(Average > Temp)) - Average = Temp; + Average = Temp; } for(Index = 0; Index < 3; Index++) /*Three color components*/ @@ -1190,7 +1190,7 @@ CalibrateScanElements () CallFunctionWithParameter (0x92, CurrentLowTransferBorder|0x80); for(j=2999; j>0; j--) CallFunctionWithParameter (0xC6, 0); - + CurrentUpSaveBorder = arUpSaveBorders[Index]; CallFunctionWithParameter (CurrentUpSaveBorder, 0xFF); @@ -1199,9 +1199,9 @@ CalibrateScanElements () CallFunctionWithParameter (0x90,0); Calibration = 0x80; CallFunctionWithParameter (CurrentUpSaveBorder, 0x80); - + CurrentSpeed1 = CurrentSpeed2 = arSpeeds[Index]; - + for(CorrectionValue = 0x40; CorrectionValue != 0;CorrectionValue >>= 2) { CallFunctionWithParameter (0x91, CurrentSpeed2); @@ -1235,11 +1235,11 @@ CalibrateScanElements () Perhaps, we can optimize it in future.*/ WriteScannerRegister (0x91, 0); usleep(10); - + for(Temp = 0,j = 0; j < 16;j++) Temp += FilteredBuffer[509+j]; /*At this offset calcalates HP's driver.*/ Temp /= 16; - + if(Average > Temp) { Calibration += CorrectionValue; @@ -1247,7 +1247,7 @@ CalibrateScanElements () } else Calibration -= CorrectionValue; - + WriteScannerRegister (CurrentUpSaveBorder, Calibration); }/*By CorrectionValue we tune UpSaveBorder*/ -- cgit v1.2.3 From ffa8801644a7d53cc1c785e3450f794c07a14eb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 2 Feb 2020 17:13:01 +0100 Subject: New upstream version 1.0.29 --- backend/hpsj5s.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'backend/hpsj5s.c') diff --git a/backend/hpsj5s.c b/backend/hpsj5s.c index 786a8d6..77fcc46 100644 --- a/backend/hpsj5s.c +++ b/backend/hpsj5s.c @@ -961,8 +961,7 @@ GetCalibration () { /*WARNING!!! Deadlock possible! */ bTest = CallFunctionWithRetVal (0xB5); } - while ((((bTest & 0x80) == 1) && ((bTest & 0x3F) <= 2)) || - (((bTest & 0x80) == 0) && ((bTest & 0x3F) >= 5))); + while ((bTest & 0x80) ? (bTest & 0x3F) <= 2 : (bTest & 0x3F) >= 5); CallFunctionWithParameter (0xCD, 0); /*Skip this line for ECP: */ @@ -1150,8 +1149,7 @@ CalibrateScanElements () usleep (1); } while ((timeout < 1000) && - ((((bTest & 0x80) == 1) && ((bTest & 0x3F) <= 2)) || - (((bTest & 0x80) == 0) && ((bTest & 0x3F) >= 5)))); + ((bTest & 0x80) ? (bTest & 0x3F) <= 2 : (bTest & 0x3F) >= 5)); /*Let's read it... */ if(timeout < 1000) @@ -1218,8 +1216,7 @@ CalibrateScanElements () usleep (1); } while ((timeout < 1000) && - ((((bTest & 0x80) == 1) && ((bTest & 0x3F) <= 2)) || - (((bTest & 0x80) == 0) && ((bTest & 0x3F) >= 5)))); + ((bTest & 0x80) ? (bTest & 0x3F) <= 2 : (bTest & 0x3F) >= 5)); /*Let's read it... */ if(timeout < 1000) -- cgit v1.2.3