diff --git a/backend/pixma.conf.in b/backend/pixma.conf.in index d6184b493..dcf88d3b9 100644 --- a/backend/pixma.conf.in +++ b/backend/pixma.conf.in @@ -6,7 +6,7 @@ # networking=no # # bjnp-timeout=5000 -# Specify the timeout (in ms) to be used for all the folllowing +# Specify the timeout (in ms) to be used for all the following # scanners. # May be specified multiple times. # The last value (if any) will be used for auto-detection diff --git a/backend/pixma/pixma.c b/backend/pixma/pixma.c index 75617e209..19e82614a 100644 --- a/backend/pixma/pixma.c +++ b/backend/pixma/pixma.c @@ -2256,7 +2256,7 @@ type int adf-wait default 0 constraint (0,3600,1) title ADF Waiting Time - desc When set, the scanner waits upto the specified time in seconds for a new document inserted into the automatic document feeder. + desc When set, the scanner waits up to the specified time in seconds for a new document inserted into the automatic document feeder. cap soft_select soft_detect automatic inactive rem ------------------------------------------- diff --git a/backend/pixma/pixma.h b/backend/pixma/pixma.h index eb4bf8e9b..4999d3c8a 100644 --- a/backend/pixma/pixma.h +++ b/backend/pixma/pixma.h @@ -306,7 +306,7 @@ struct pixma_scan_param_t * 1 = 1 bit B/W lineart (flatbed) * 8 = 8 bit grayscale, * 24 bit color (both flatbed) - * 16 = 16 bit grayscale (TPU, flatbed not implemeted), + * 16 = 16 bit grayscale (TPU, flatbed not implemented), * 48 bit color (TPU, flatbed not implemented) */ unsigned depth; diff --git a/backend/pixma/pixma_bjnp.c b/backend/pixma/pixma_bjnp.c index 4e837147b..5a2c04870 100644 --- a/backend/pixma/pixma_bjnp.c +++ b/backend/pixma/pixma_bjnp.c @@ -661,8 +661,8 @@ udp_command (const int dev_no, char *command, int cmd_len, char *response, int resp_len) { /* - * send udp command to given device and recieve the response` - * returns: the legth of the response or -1 + * send udp command to given device and receive the response` + * returns: the length of the response or -1 */ int sockfd; struct timeval timeout; @@ -958,7 +958,7 @@ prepare_socket(const char *if_name, const bjnp_sockaddr_t *local_sa, * local_sa: local address to use * broadcast_sa: broadcast address to use, if NULL we use all hosts * dest_sa: (write) where to return destination address of broadcast - * retuns: open socket or -1 + * returns: open socket or -1 */ int socket = -1; @@ -1831,7 +1831,7 @@ bjnp_allocate_device (SANE_String_Const devname, /* Check if found the scanner before, if so we use the best address * but still make sure the scanner is listed only once. * We check for matching addresses as wel as matching mac_addresses as - * an IPv6 host can have multiple adresses */ + * an IPv6 host can have multiple addresses */ if ( strcmp( device[i].mac_address, device[bjnp_no_devices].mac_address ) == 0 ) { @@ -2392,9 +2392,9 @@ sanei_bjnp_set_timeout (SANE_Int devno, SANE_Int timeout) * @param size size of the data * * @return - * - SANE_STATUS_GOOD - on succes + * - SANE_STATUS_GOOD - on success * - SANE_STATUS_EOF - if zero bytes have been read - * - SANE_STATUS_IO_ERROR - if an error occured during the read + * - SANE_STATUS_IO_ERROR - if an error occurred during the read * - SANE_STATUS_INVAL - on every other error * */ @@ -2456,7 +2456,7 @@ sanei_bjnp_read_bulk (SANE_Int dn, SANE_Byte * buffer, size_t * size) if ( device[dn].scanner_data_left < device[dn].blocksize) { /* the scanner will not react at all to a read request, when no more data is available */ - /* we now determine end of data by comparing the payload size to the maximun blocksize */ + /* we now determine end of data by comparing the payload size to the maximum blocksize */ /* this block is shorter than blocksize, so after this block we are done */ device[dn].last_block = 1; @@ -2493,7 +2493,7 @@ sanei_bjnp_read_bulk (SANE_Int dn, SANE_Byte * buffer, size_t * size) recvd = recvd + read_size; } - PDBG (bjnp_dbg (LOG_DEBUG, "bjnp_read_bulk: %s: Returning %ld bytes, backend expexts %ld\n", + PDBG (bjnp_dbg (LOG_DEBUG, "bjnp_read_bulk: %s: Returning %ld bytes, backend expects %ld\n", (recvd == *size)? "OK": "NOTICE",recvd, *size ) ); *size = recvd; if ( *size == 0 ) @@ -2511,8 +2511,8 @@ sanei_bjnp_read_bulk (SANE_Int dn, SANE_Byte * buffer, size_t * size) * @param size size of the data * * @return - * - SANE_STATUS_GOOD - on succes - * - SANE_STATUS_IO_ERROR - if an error occured during the write + * - SANE_STATUS_GOOD - on success + * - SANE_STATUS_IO_ERROR - if an error occurred during the write * - SANE_STATUS_INVAL - on every other error */ @@ -2584,9 +2584,9 @@ sanei_bjnp_write_bulk (SANE_Int dn, const SANE_Byte * buffer, size_t * size) * @param size size of the data * * @return - * - SANE_STATUS_GOOD - on succes + * - SANE_STATUS_GOOD - on success * - SANE_STATUS_EOF - if zero bytes have been read - * - SANE_STATUS_IO_ERROR - if an error occured during the read + * - SANE_STATUS_IO_ERROR - if an error occurred during the read * - SANE_STATUS_INVAL - on every other error * */ diff --git a/backend/pixma/pixma_bjnp.h b/backend/pixma/pixma_bjnp.h index 79e084eb9..36f3d764e 100644 --- a/backend/pixma/pixma_bjnp.h +++ b/backend/pixma/pixma_bjnp.h @@ -151,9 +151,9 @@ extern void sanei_bjnp_set_timeout (SANE_Int devno, SANE_Int timeout); * @param size size of the data * * @return - * - SANE_STATUS_GOOD - on succes + * - SANE_STATUS_GOOD - on success * - SANE_STATUS_EOF - if zero bytes have been read - * - SANE_STATUS_IO_ERROR - if an error occured during the read + * - SANE_STATUS_IO_ERROR - if an error occurred during the read * - SANE_STATUS_INVAL - on every other error * */ @@ -170,8 +170,8 @@ sanei_bjnp_read_bulk (SANE_Int dn, SANE_Byte * buffer, size_t * size); * @param size size of the data * * @return - * - SANE_STATUS_GOOD - on succes - * - SANE_STATUS_IO_ERROR - if an error occured during the write + * - SANE_STATUS_GOOD - on success + * - SANE_STATUS_IO_ERROR - if an error occurred during the write * - SANE_STATUS_INVAL - on every other error */ extern SANE_Status @@ -187,9 +187,9 @@ sanei_bjnp_write_bulk (SANE_Int dn, const SANE_Byte * buffer, size_t * size); * @param size size of the data * * @return - * - SANE_STATUS_GOOD - on succes + * - SANE_STATUS_GOOD - on success * - SANE_STATUS_EOF - if zero bytes have been read - * - SANE_STATUS_IO_ERROR - if an error occured during the read + * - SANE_STATUS_IO_ERROR - if an error occurred during the read * - SANE_STATUS_INVAL - on every other error * */ diff --git a/backend/pixma/pixma_bjnp_private.h b/backend/pixma/pixma_bjnp_private.h index 19ba4968c..c666ead50 100644 --- a/backend/pixma/pixma_bjnp_private.h +++ b/backend/pixma/pixma_bjnp_private.h @@ -80,7 +80,7 @@ /* timers */ #define BJNP_BROADCAST_INTERVAL 10 /* ms between broadcasts */ #define BJNP_BC_RESPONSE_TIMEOUT 500 /* waiting time for broadc. responses */ -#define BJNP_TIMEOUT_DEFAULT 10000 /* minimum tiemout value for network operations */ +#define BJNP_TIMEOUT_DEFAULT 10000 /* minimum timeout value for network operations */ #define BJNP_TIMEOUT_TCP_CONNECT 2000 /* timeout for tcp connect attempts in ms */ #define BJNP_USLEEP_MS 1000 /* sleep for 1 msec */ #define BJNP_TCP_CONNECT_INTERVAL 100 /* TCP retry interval in ms */ @@ -187,7 +187,7 @@ struct __attribute__ ((__packed__)) BJNP_command struct __attribute__ ((__packed__)) DISCOVER_RESPONSE { - struct BJNP_command response; /* reponse header */ + struct BJNP_command response; /* response header */ char unknown1[4]; /* 00 01 08 00 */ char mac_len; /* length of mac address */ char addr_len; /* length of address field */ @@ -354,7 +354,7 @@ typedef struct device_s /* sockets */ - int tcp_socket; /* open tcp socket for communcation to scannner */ + int tcp_socket; /* open tcp socket for communication to scannner */ int16_t serial; /* sequence number of command */ /* communication state */ diff --git a/backend/pixma/pixma_common.c b/backend/pixma/pixma_common.c index 436311a7b..ff3bd487d 100644 --- a/backend/pixma/pixma_common.c +++ b/backend/pixma/pixma_common.c @@ -682,7 +682,7 @@ pixma_cmd_transaction (pixma_t * s, const void *cmd, unsigned cmdlen, going back to the home position after the last scan session has been cancelled, you won't get the response before it arrives home. This takes about 5 seconds. If the last session was succeeded, the scanner will - immediatly answer with PIXMA_STATUS_BUSY. + immediately answer with PIXMA_STATUS_BUSY. Is 8 seconds timeout enough? This affects ALL commands that use pixma_cmd_transaction(). Default value set in pixma_open(). */ diff --git a/backend/pixma/pixma_common.h b/backend/pixma/pixma_common.h index 3e4e5bd18..bee839c2c 100644 --- a/backend/pixma/pixma_common.h +++ b/backend/pixma/pixma_common.h @@ -162,7 +162,7 @@ struct pixma_scan_ops_t void (*finish_scan) (pixma_t *); /** [Optional] Wait for a user's event, e.g. button event. \a timeout is - * in milliseconds. If an event occured before it's timed out, flags in + * in milliseconds. If an event occurred before it's timed out, flags in * \a s->events should be set accordingly. * \see PIXMA_EV_* */ void (*wait_event) (pixma_t * s, int timeout); @@ -176,7 +176,7 @@ struct pixma_scan_ops_t }; -/** \name Funtions for read and write big-endian integer values */ +/** \name Functions for read and write big-endian integer values */ /**@{*/ void pixma_set_be16 (uint16_t x, uint8_t * buf); void pixma_set_be32 (uint32_t x, uint8_t * buf); diff --git a/backend/pixma/pixma_imageclass.c b/backend/pixma/pixma_imageclass.c index e93018b73..7b773db48 100644 --- a/backend/pixma/pixma_imageclass.c +++ b/backend/pixma/pixma_imageclass.c @@ -461,7 +461,7 @@ step1 (pixma_t * s) iclass_t *mf = (iclass_t *) s->subdriver; /* don't wait full timeout for 1st command */ - rec_tmo = s->rec_tmo; /* save globel timeout */ + rec_tmo = s->rec_tmo; /* save global timeout */ s->rec_tmo = 2; /* set timeout to 2 seconds */ error = query_status (s); s->rec_tmo = rec_tmo; /* restore global timeout */ diff --git a/backend/pixma/pixma_io.h b/backend/pixma/pixma_io.h index 715bab565..c05d22831 100644 --- a/backend/pixma/pixma_io.h +++ b/backend/pixma/pixma_io.h @@ -128,7 +128,7 @@ int pixma_reset_device (pixma_io_t *); /** Write data to the device. This function may not be interrupted by signals. * It will return iff * - \a len bytes have been successfully written or - * - an error (inclusive timeout) occured. + * - an error (inclusive timeout) occurred. * . * \note Calling pixma_write(io, buf, n1) and pixma(io, buf+n1, n2) may * not be the same as pixma_write(io, buf, n1+n2) if n1 is not @@ -146,7 +146,7 @@ int pixma_write (pixma_io_t *, const void *cmd, unsigned len); * It will return iff * - \a size bytes have been successfully read, * - a short packet has been read or - * - an error (inclusive timeout) occured. + * - an error (inclusive timeout) occurred. * . * \param[out] buf * \param[in] size of the buffer diff --git a/backend/pixma/pixma_mp150.c b/backend/pixma/pixma_mp150.c index b438c1bf6..cd6cd3ddf 100644 --- a/backend/pixma/pixma_mp150.c +++ b/backend/pixma/pixma_mp150.c @@ -614,7 +614,7 @@ static unsigned calc_raw_width (const mp150_t * mp, const pixma_scan_param_t * param) { unsigned raw_width; - /* NOTE: Actually, we can send arbitary width to MP150. Lines returned + /* NOTE: Actually, we can send arbitrary width to MP150. Lines returned are always padded to multiple of 4 or 12 pixels. Is this valid for other models, too? */ if (mp->generation >= 2) @@ -1029,7 +1029,7 @@ reorder_pixels (uint8_t * linebuf, uint8_t * sptr, unsigned c, unsigned n, memcpy (sptr, linebuf, line_size); } -/* the scanned image must be shrinked by factor "scale" +/* the scanned image must be shrunk by factor "scale" * the image can be formatted as rgb (c=3) or gray (c=1) * we need to crop the left side (xs) * we ignore more pixels inside scanned line (wx), behind needed line (w) @@ -1069,7 +1069,7 @@ shrink_image (uint8_t * dptr, uint8_t * sptr, unsigned xs, unsigned w, pixel = 0; /* sum shrink pixels */ - for (unsigned m = 0; m < scale; m++) /* get pixels from shrinked lines */ + for (unsigned m = 0; m < scale; m++) /* get pixels from shrunk lines */ { for (unsigned n = 0; n < scale; n++) /* get pixels from same line */ { @@ -1080,7 +1080,7 @@ shrink_image (uint8_t * dptr, uint8_t * sptr, unsigned xs, unsigned w, #endif } - /* jump over shrinked data */ + /* jump over shrunk data */ src += c * scale; /* next pixel */ dst += c; diff --git a/backend/pixma/pixma_mp750.c b/backend/pixma/pixma_mp750.c index cc1c3ad63..c869ee589 100644 --- a/backend/pixma/pixma_mp750.c +++ b/backend/pixma/pixma_mp750.c @@ -827,7 +827,7 @@ mp750_fill_buffer (pixma_t * s, pixma_imagebuf_t * ib) n = mp->rawimg_left / 3; /* n = number of pixels in the buffer? */ - /* Color to Grayscale converion for CCD sensor */ + /* Color to Grayscale conversion for CCD sensor */ if (is_ccd_grayscale (s)) { shift_rgb (mp->rawimg, n, shift[0], shift[1], shift[2], mp->stripe_shift, mp->line_size, mp->imgcol + mp->imgbuf_ofs); diff --git a/backend/pixma/pixma_mp800.c b/backend/pixma/pixma_mp800.c index 905c246fb..8b7b232fd 100644 --- a/backend/pixma/pixma_mp800.c +++ b/backend/pixma/pixma_mp800.c @@ -483,7 +483,7 @@ static unsigned calc_raw_width (const mp810_t * mp, const pixma_scan_param_t * param) { unsigned raw_width; - /* NOTE: Actually, we can send arbitary width to MP810. Lines returned + /* NOTE: Actually, we can send arbitrary width to MP810. Lines returned are always padded to multiple of 4 or 12 pixels. Is this valid for other models, too? */ if (mp->generation >= 2) diff --git a/doc/descriptions/pixma.desc b/doc/descriptions/pixma.desc index 3b7ac6c92..dc666eb79 100644 --- a/doc/descriptions/pixma.desc +++ b/doc/descriptions/pixma.desc @@ -13,7 +13,7 @@ :backend "pixma" ; name of backend :version "0.28.5" ; version of backend (or "unmaintained") :manpage "sane-pixma" ; name of manpage (if it exists) -;:comment "Devices marked as experimantal are disabled by default. See the manual page for how to enable them." +;:comment "Devices marked as experimental are disabled by default. See the manual page for how to enable them." :devicetype :scanner ; start of a list of devices.... ; other types: :stillcam, :vidcam, diff --git a/doc/sane-pixma.man b/doc/sane-pixma.man index 87aadd424..930e74b2b 100644 --- a/doc/sane-pixma.man +++ b/doc/sane-pixma.man @@ -228,7 +228,7 @@ as target. .TP .I original (read only) Returns the value of the type or size of original to be scanned -if the scanner provides that data. Known values of type: 1 = document, 2 = foto, +if the scanner provides that data. Known values of type: 1 = document, 2 = photo, 5 = film. Known values of size: 1 = A4, 2 = Letter, 8 = 10x15, 9 = 13x18, b = auto. Not all scanners can provide this data. .TP @@ -310,7 +310,7 @@ More globally applicable timeouts can be set using the bjnp-timeout parameter as .PP A timeout defined using bjnp-timeout will apply to the following scanner definitions in the file. If required the bjnp-timeout setting -can be defined multiple times, where each settng will apply only to the scanners that +can be defined multiple times, where each setting will apply only to the scanners that follow the setting. The last setting is used for the auto discovered scanners. If not explicitly set, the default 1000ms setting will apply. .PP @@ -318,7 +318,7 @@ Setting timeouts should only be required in exceptional cases. .PP .RE .PP -If so desired networking can be disbled as follows: +If so desired networking can be disabled as follows: .RS .IP - If the first non-commented line contains @@ -328,7 +328,7 @@ This will cause all further statements in the configuration file to be ignored. .IP - A line that contains .B auto_detection=no -will cause auto-detection to be skipped. Explicitely defined network scanners will still be probed. +will cause auto-detection to be skipped. Explicitly defined network scanners will still be probed. .SH USB SUPPORT USB scanners will be auto-detected and require no configuration. .SH NETWORKING SUPPORT @@ -358,7 +358,7 @@ common subnet for scanning. .PP Scanner detection is slightly more complicated. The pixma backend sends a broadcast on all direct connected subnets it can find (provided your OS -allows for enumeration of all netowrk interfaces). The broadcast is sent FROM +allows for enumeration of all network interfaces). The broadcast is sent FROM port 8612 TO port 8610 or 8612 on the broadcast address of each interface. The outgoing packets will be allowed by the rule described above. .PP