diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2021-02-16 18:24:19 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2021-02-16 18:24:19 +0100 |
commit | 351b7328520c16730ceb46e5acae16038c42185e (patch) | |
tree | fae21fd5c94f3c3ed0202a95c9ada705482e647b /backend/hpsj5s.c | |
parent | ad38bc6ecb80ddeb562841b33258dd53659b1da6 (diff) |
New upstream version 1.0.32upstream/1.0.32
Diffstat (limited to 'backend/hpsj5s.c')
-rw-r--r-- | backend/hpsj5s.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/backend/hpsj5s.c b/backend/hpsj5s.c index 77fcc46..ea58433 100644 --- a/backend/hpsj5s.c +++ b/backend/hpsj5s.c @@ -13,9 +13,7 @@ General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA. + along with this program. If not, see <https://www.gnu.org/licenses/>. As a special exception, the authors of SANE give permission for additional uses of the libraries contained in this release of SANE. @@ -106,7 +104,7 @@ static SANE_Option_Descriptor sod[] = { {NULL} /*No constraints required */ } , - { /*Width of scaned area */ + { /*Width of scanned area */ "width", "Width", "Width of area to scan", @@ -115,7 +113,7 @@ static SANE_Option_Descriptor sod[] = { sizeof (SANE_Word), SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, SANE_CONSTRAINT_RANGE, - {NULL} /*Range constrain setted in sane_init */ + {NULL} /*Range constraint set in sane_init */ } , { /*Resolution for scan */ @@ -127,13 +125,13 @@ static SANE_Option_Descriptor sod[] = { sizeof (SANE_Word), SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT, SANE_CONSTRAINT_WORD_LIST, - {NULL} /*Word list constrain setted in sane_init */ + {NULL} /*Word list constraint set in sane_init */ } }; static SANE_Parameters parms; -/*Recalculate Lenght in dependace of resolution*/ +/*Recalculate Length in dependence of resolution*/ static SANE_Word LengthForRes (SANE_Word Resolution, SANE_Word Length) { @@ -223,7 +221,7 @@ sane_exit (void) scanner_d = -1; } - /*Free alocated ports information: */ + /*Free allocated ports information: */ ieee1284_free_ports (&pl); DBG (2, "sane_exit\n"); @@ -386,7 +384,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option, case SANE_ACTION_GET_VALUE: *((SANE_Word *) value) = wWidth; return SANE_STATUS_GOOD; - case SANE_ACTION_SET_VALUE: /*info should be setted */ + case SANE_ACTION_SET_VALUE: /*info should be set */ wWidth = *((SANE_Word *) value); if (info != NULL) *info = SANE_INFO_RELOAD_PARAMS; @@ -400,7 +398,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option, case SANE_ACTION_GET_VALUE: *((SANE_Word *) value) = wResolution; return SANE_STATUS_GOOD; - case SANE_ACTION_SET_VALUE: /*info should be setted */ + case SANE_ACTION_SET_VALUE: /*info should be set */ wResolution = *((SANE_Word *) value); if (info != NULL) *info = 0; @@ -455,7 +453,7 @@ sane_start (SANE_Handle handle) bCalibration = GetCalibration (); if (bLastCalibration - bCalibration > 16) - { /*Lamp is not warm enouth */ + { /*Lamp is not warm enough */ DBG (1, "sane_start: warming lamp for 30 sec.\n"); for (i = 0; i < 30; i++) sleep (1); @@ -472,7 +470,7 @@ sane_start (SANE_Handle handle) /*Turn on indicator and prepare engine. */ SwitchHardwareState (FLAGS_HW_INDICATOR_OFF | FLAGS_HW_MOTOR_READY, 1); /*Feed paper */ - if (PaperFeed (LINES_TO_FEED) == 0) /*Feed only for fixel lenght. Change it */ + if (PaperFeed (LINES_TO_FEED) == 0) /*Feed only for fixel length. Change it */ { DBG (1, "sane_start: paper feed failed."); SwitchHardwareState (FLAGS_HW_INDICATOR_OFF | FLAGS_HW_MOTOR_READY, 0); @@ -512,7 +510,7 @@ sane_read (SANE_Handle handle, SANE_Byte * data, } /*While end of paper sheet was not reached */ - /*Wait for scaned line ready */ + /*Wait for scanned line ready */ timeout = 0; while (((bFuncResult = CallFunctionWithRetVal (0xB2)) & 0x20) == 0) { @@ -794,7 +792,7 @@ TransferScanParameters (enumColorDepth enColor, SANE_Word wResolution, break; case GrayScale: case TrueColor: - CallFunctionWithParameter (0x90, 0); /*Not suppoted correctly. FIX ME!!! */ + CallFunctionWithParameter (0x90, 0); /*Not supported correctly. FIX ME!!! */ break; }; CallFunctionWithParameter (0xA1, 2); @@ -882,7 +880,7 @@ TurnOffPaperPulling () } /* - Returns avarage value of scaned row. + Returns average value of scanned row. While paper not loaded this is base "white point". */ static SANE_Byte @@ -1140,7 +1138,7 @@ CalibrateScanElements () CallFunctionWithParameter (0x91, arSpeeds[Index]); - /*waiting for scaned line... */ + /*waiting for scanned line... */ timeout = 0; do { @@ -1205,7 +1203,7 @@ CalibrateScanElements () CallFunctionWithParameter (0x91, CurrentSpeed2); usleep(10); - /*waiting for scaned line... */ + /*waiting for scanned line... */ for(j = 0; j < 5; j++) { timeout = 0; |