summaryrefslogtreecommitdiff
path: root/sanei
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2021-02-16 18:25:42 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2021-02-16 18:25:42 +0100
commit64ddd1a4dfcefd11f662f5cf4bb05b590d901a97 (patch)
tree4303648095deff998ae20c2393b56db527742ac9 /sanei
parent5793a221e112fa49073de0137d6bfa750a61b0a1 (diff)
parentecaaf250cb33ff61f37a7b441f2337584a655350 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'sanei')
-rw-r--r--sanei/linux_sg3_err.h4
-rw-r--r--sanei/sanei_DomainOS.c6
-rw-r--r--sanei/sanei_DomainOS.h2
-rw-r--r--sanei/sanei_ab306.c4
-rw-r--r--sanei/sanei_access.c4
-rw-r--r--sanei/sanei_auth.c4
-rw-r--r--sanei/sanei_codec_ascii.c4
-rw-r--r--sanei/sanei_codec_bin.c4
-rw-r--r--sanei/sanei_config.c9
-rw-r--r--sanei/sanei_config2.c4
-rw-r--r--sanei/sanei_constrain_value.c4
-rw-r--r--sanei/sanei_init_debug.c4
-rw-r--r--sanei/sanei_ir.c4
-rw-r--r--sanei/sanei_lm983x.c4
-rw-r--r--sanei/sanei_magic.c32
-rw-r--r--sanei/sanei_net.c4
-rw-r--r--sanei/sanei_pa4s2.c18
-rw-r--r--sanei/sanei_pio.c6
-rw-r--r--sanei/sanei_pp.c14
-rw-r--r--sanei/sanei_pv8630.c4
-rw-r--r--sanei/sanei_scsi.c22
-rw-r--r--sanei/sanei_tcp.c4
-rw-r--r--sanei/sanei_thread.c6
-rw-r--r--sanei/sanei_udp.c4
-rw-r--r--sanei/sanei_usb.c27
-rw-r--r--sanei/sanei_wire.c4
26 files changed, 86 insertions, 120 deletions
diff --git a/sanei/linux_sg3_err.h b/sanei/linux_sg3_err.h
index 53198c0..80d731c 100644
--- a/sanei/linux_sg3_err.h
+++ b/sanei/linux_sg3_err.h
@@ -13,8 +13,8 @@
for more details.
You should have received a copy of the GNU General Public License
- along with sane; see the file COPYING. If not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with sane; see the file COPYING.
+ 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.
diff --git a/sanei/sanei_DomainOS.c b/sanei/sanei_DomainOS.c
index 7b851a8..18d902e 100644
--- a/sanei/sanei_DomainOS.c
+++ b/sanei/sanei_DomainOS.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.
@@ -112,7 +110,7 @@ static struct
scsi_$operation_id_t op_id; /* op_id of current request */
} *DomainFdInfo;
-/* This function is called error might have occured, but it would be one that I
+/* This function is called error might have occurred, but it would be one that I
don't know how to handle, or never expect to happen. */
static void DomainErrorCheck(status_$t status, const char *message)
{
diff --git a/sanei/sanei_DomainOS.h b/sanei/sanei_DomainOS.h
index 8f88e5f..0d3315f 100644
--- a/sanei/sanei_DomainOS.h
+++ b/sanei/sanei_DomainOS.h
@@ -37,7 +37,7 @@ To send an enter command to the server, follow these steps:
/* Amount of data in a sense request */
#define DomainSenseSize 18
-/* Maximum amound of data in a transfer, per Domain/OS SCSI spec */
+/* Maximum amount of data in a transfer, per Domain/OS SCSI spec */
#define DomainMaxDataSize (32 * 1024)
/* Timeout for ec2_$wait calls, in 1/4 second intervals */
diff --git a/sanei/sanei_ab306.c b/sanei/sanei_ab306.c
index 4483fec..aa642c9 100644
--- a/sanei/sanei_ab306.c
+++ b/sanei/sanei_ab306.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.
diff --git a/sanei/sanei_access.c b/sanei/sanei_access.c
index cb19c5c..b46e8b5 100644
--- a/sanei/sanei_access.c
+++ b/sanei/sanei_access.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.
diff --git a/sanei/sanei_auth.c b/sanei/sanei_auth.c
index 9039187..f6402da 100644
--- a/sanei/sanei_auth.c
+++ b/sanei/sanei_auth.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.
diff --git a/sanei/sanei_codec_ascii.c b/sanei/sanei_codec_ascii.c
index dc9d4af..0d420fc 100644
--- a/sanei/sanei_codec_ascii.c
+++ b/sanei/sanei_codec_ascii.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.
diff --git a/sanei/sanei_codec_bin.c b/sanei/sanei_codec_bin.c
index 48cdead..24db3ea 100644
--- a/sanei/sanei_codec_bin.c
+++ b/sanei/sanei_codec_bin.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.
diff --git a/sanei/sanei_config.c b/sanei/sanei_config.c
index 0eaee9a..07c85c9 100644
--- a/sanei/sanei_config.c
+++ b/sanei/sanei_config.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.
@@ -239,7 +237,8 @@ sanei_config_read (char *str, int n, FILE *stream)
SANE_Status
sanei_configure_attach (const char *config_file, SANEI_Config * config,
SANE_Status (*attach) (SANEI_Config * config,
- const char *devname))
+ const char *devname, void *data),
+ void *data)
{
SANE_Char line[PATH_MAX];
SANE_Char *token, *string;
@@ -443,7 +442,7 @@ sanei_configure_attach (const char *config_file, SANEI_Config * config,
DBG (3, "sanei_configure_attach: trying to attach with '%s'\n",
lp2);
if(attach!=NULL)
- attach (config, lp2);
+ attach (config, lp2, data);
}
}
diff --git a/sanei/sanei_config2.c b/sanei/sanei_config2.c
index cd9484d..0a7c95e 100644
--- a/sanei/sanei_config2.c
+++ b/sanei/sanei_config2.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.
diff --git a/sanei/sanei_constrain_value.c b/sanei/sanei_constrain_value.c
index 8f601cc..ed56b85 100644
--- a/sanei/sanei_constrain_value.c
+++ b/sanei/sanei_constrain_value.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.
diff --git a/sanei/sanei_init_debug.c b/sanei/sanei_init_debug.c
index d5d64f2..690cc2e 100644
--- a/sanei/sanei_init_debug.c
+++ b/sanei/sanei_init_debug.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.
diff --git a/sanei/sanei_ir.c b/sanei/sanei_ir.c
index 47e1e6e..9c7d9d3 100644
--- a/sanei/sanei_ir.c
+++ b/sanei/sanei_ir.c
@@ -17,9 +17,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/>.
*
* The threshold yen, otsu and max_entropy routines have been
* adapted from the FOURIER 0.8 library by M. Emre Celebi,
diff --git a/sanei/sanei_lm983x.c b/sanei/sanei_lm983x.c
index 62dfad9..7b6f72e 100644
--- a/sanei/sanei_lm983x.c
+++ b/sanei/sanei_lm983x.c
@@ -16,9 +16,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.
diff --git a/sanei/sanei_magic.c b/sanei/sanei_magic.c
index 3e71946..f5d1ac0 100644
--- a/sanei/sanei_magic.c
+++ b/sanei/sanei_magic.c
@@ -16,9 +16,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.
@@ -130,7 +128,7 @@ sanei_magic_despeck (SANE_Parameters * params, SANE_Byte * buffer,
int tmp[3];
- /* dont count pixels in the window */
+ /* don't count pixels in the window */
if(k != -1 && k != diam && l != -1 && l != diam)
continue;
@@ -189,7 +187,7 @@ sanei_magic_despeck (SANE_Parameters * params, SANE_Byte * buffer,
int tmp = 0;
- /* dont count pixels in the window */
+ /* don't count pixels in the window */
if(k != -1 && k != diam && l != -1 && l != diam)
continue;
@@ -239,7 +237,7 @@ sanei_magic_despeck (SANE_Parameters * params, SANE_Byte * buffer,
for(k=-1; k<diam+1; k++){
for(l=-1; l<diam+1; l++){
- /* dont count pixels in the window */
+ /* don't count pixels in the window */
if(k != -1 && k != diam && l != -1 && l != diam)
continue;
@@ -366,7 +364,7 @@ sanei_magic_findEdges(SANE_Parameters * params, SANE_Byte * buffer,
}
/* loop thru top and bottom lists, look for l and r extremes
- * NOTE: We dont look above the top or below the bottom found previously.
+ * NOTE: We don't look above the top or below the bottom found previously.
* This prevents issues with adf scanners that pad the image after the
* paper runs out (usually with white) */
DBG (5, "sanei_magic_findEdges: bb0:%d tb0:%d b:%d t:%d\n",
@@ -534,14 +532,14 @@ sanei_magic_findSkew(SANE_Parameters * params, SANE_Byte * buffer,
/* get buffers for edge detection */
topBuf = sanei_magic_getTransY(params,dpiY,buffer,1);
if(!topBuf){
- DBG (5, "sanei_magic_findSkew: cant gTY\n");
+ DBG (5, "sanei_magic_findSkew: can't gTY\n");
ret = SANE_STATUS_NO_MEM;
goto cleanup;
}
botBuf = sanei_magic_getTransY(params,dpiY,buffer,0);
if(!botBuf){
- DBG (5, "sanei_magic_findSkew: cant gTY\n");
+ DBG (5, "sanei_magic_findSkew: can't gTY\n");
ret = SANE_STATUS_NO_MEM;
goto cleanup;
}
@@ -1419,7 +1417,7 @@ getLine (int height, int width, int * buff,
/* build an array of pretty-print values for slope */
slopeCenter = calloc(slopes,sizeof(double));
if(!slopeCenter){
- DBG(5,"getLine: cant load slopeCenter\n");
+ DBG(5,"getLine: can't load slopeCenter\n");
ret = SANE_STATUS_NO_MEM;
goto cleanup;
}
@@ -1427,7 +1425,7 @@ getLine (int height, int width, int * buff,
/* build an array of scaling factors for slope */
slopeScale = calloc(slopes,sizeof(int));
if(!slopeScale){
- DBG(5,"getLine: cant load slopeScale\n");
+ DBG(5,"getLine: can't load slopeScale\n");
ret = SANE_STATUS_NO_MEM;
goto cleanup;
}
@@ -1448,7 +1446,7 @@ getLine (int height, int width, int * buff,
/* build an array of pretty-print values for offset */
offsetCenter = calloc(offsets,sizeof(double));
if(!offsetCenter){
- DBG(5,"getLine: cant load offsetCenter\n");
+ DBG(5,"getLine: can't load offsetCenter\n");
ret = SANE_STATUS_NO_MEM;
goto cleanup;
}
@@ -1456,7 +1454,7 @@ getLine (int height, int width, int * buff,
/* build an array of scaling factors for offset */
offsetScale = calloc(offsets,sizeof(int));
if(!offsetScale){
- DBG(5,"getLine: cant load offsetScale\n");
+ DBG(5,"getLine: can't load offsetScale\n");
ret = SANE_STATUS_NO_MEM;
goto cleanup;
}
@@ -1477,14 +1475,14 @@ getLine (int height, int width, int * buff,
/* build 2-d array of 'density', divided into slope and offset ranges */
lines = calloc(slopes, sizeof(int *));
if(!lines){
- DBG(5,"getLine: cant load lines\n");
+ DBG(5,"getLine: can't load lines\n");
ret = SANE_STATUS_NO_MEM;
goto cleanup;
}
for(i=0;i<slopes;i++){
if(!(lines[i] = calloc(offsets, sizeof(int)))){
- DBG(5,"getLine: cant load lines %d\n",i);
+ DBG(5,"getLine: can't load lines %d\n",i);
ret = SANE_STATUS_NO_MEM;
goto cleanup;
}
@@ -1533,7 +1531,7 @@ getLine (int height, int width, int * buff,
*finDensity = 0;
/* go thru array, and scale densities to % of maximum, plus adjust for
- * prefered (smaller absolute value) slope and offset */
+ * preferred (smaller absolute value) slope and offset */
for(i=0;i<slopes;i++){
for(j=0;j<offsets;j++){
lines[i][j] = (float)lines[i][j] / maxDensity * slopeScale[i] * offsetScale[j];
@@ -1567,7 +1565,7 @@ getLine (int height, int width, int * buff,
}
}
- /* dont forget to cleanup */
+ /* don't forget to cleanup */
cleanup:
for(i=0;i<slopes;i++){
if(lines[i])
diff --git a/sanei/sanei_net.c b/sanei/sanei_net.c
index b46da70..29e23de 100644
--- a/sanei/sanei_net.c
+++ b/sanei/sanei_net.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.
diff --git a/sanei/sanei_pa4s2.c b/sanei/sanei_pa4s2.c
index 282e6fd..5e59743 100644
--- a/sanei/sanei_pa4s2.c
+++ b/sanei/sanei_pa4s2.c
@@ -14,9 +14,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.
@@ -150,11 +148,9 @@ static int sanei_pa4s2_dbg_init_called = SANE_FALSE;
#endif /* NDEBUG */
-#if defined(STDC_HEADERS)
-# include <errno.h>
-# include <stdio.h>
-# include <stdlib.h>
-#endif
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
#if defined(HAVE_STRING_H)
# include <string.h>
#elif defined(HAVE_STRINGS_H)
@@ -202,7 +198,7 @@ typedef struct
#endif
u_int in_use; /* port in use? */
u_int enabled; /* port enabled? */
- u_int mode; /* protocoll */
+ u_int mode; /* protocol */
u_char prelock[3]; /* state of port */
#ifdef HAVE_LIBIEEE1284
int caps;
@@ -750,7 +746,7 @@ pa4s2_writebyte_any (int fd, u_char reg, u_char val)
/* somebody from Mustek asked me once, why I was writing the same
value repeatedly to a port. Well, actually I don't know, it just
works. Maybe the repeated writes could be replaced by appropriate
- delays or even left out completly.
+ delays or even left out completely.
*/
#if defined(HAVE_LIBIEEE1284)
DBG (6, "pa4s2_writebyte_any: writing value 0x%02x"
@@ -1922,7 +1918,7 @@ sanei_pa4s2_open (const char *dev, int *fd)
DBG (6, "sanei_pa4s2_open: basically, this backend does only compile\n");
DBG (6, "sanei_pa4s2_open: on x86 architectures. Furthermore it\n");
DBG (6, "sanei_pa4s2_open: needs ioperm() and inb()/outb() calls.\n");
- DBG (6, "sanei_pa4s2_open: alternativly it makes use of libieee1284\n");
+ DBG (6, "sanei_pa4s2_open: alternatively it makes use of libieee1284\n");
DBG (6, "sanei_pa4s2_open: (which isn't present either)\n");
DBG (5, "sanei_pa4s2_open: returning SANE_STATUS_INVAL\n");
diff --git a/sanei/sanei_pio.c b/sanei/sanei_pio.c
index 8b67093..ee27267 100644
--- a/sanei/sanei_pio.c
+++ b/sanei/sanei_pio.c
@@ -14,9 +14,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.
@@ -45,7 +43,7 @@
/*
RESTRICTIONS:
- - This interface is very timing sensitive, be carefull with setting
+ - This interface is very timing sensitive, be careful with setting
debug levels.
*/
diff --git a/sanei/sanei_pp.c b/sanei/sanei_pp.c
index 89f3232..5150313 100644
--- a/sanei/sanei_pp.c
+++ b/sanei/sanei_pp.c
@@ -15,9 +15,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.
@@ -135,11 +133,9 @@ inb( u_long port )
#include "../include/sane/sanei_debug.h"
#include "../include/sane/sanei_pp.h"
-#if defined(STDC_HEADERS)
-# include <errno.h>
-# include <stdio.h>
-# include <stdlib.h>
-#endif
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
#if defined(HAVE_STRING_H)
# include <string.h>
#elif defined(HAVE_STRINGS_H)
@@ -1333,7 +1329,7 @@ sanei_pp_open( const char *dev, int *fd )
DBG( 6, "sanei_pp_open: basically, this backend does only compile\n" );
DBG( 6, "sanei_pp_open: on x86 architectures. Furthermore it\n" );
DBG( 6, "sanei_pp_open: needs ioperm() and inb()/outb() calls.\n" );
- DBG( 6, "sanei_pp_open: alternativly it makes use of libieee1284\n" );
+ DBG( 6, "sanei_pp_open: alternatively it makes use of libieee1284\n" );
DBG( 6, "sanei_pp_open: (which isn't present either)\n");
return SANE_STATUS_INVAL;
}
diff --git a/sanei/sanei_pv8630.c b/sanei/sanei_pv8630.c
index c9bafce..5f3c2af 100644
--- a/sanei/sanei_pv8630.c
+++ b/sanei/sanei_pv8630.c
@@ -17,9 +17,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.
diff --git a/sanei/sanei_scsi.c b/sanei/sanei_scsi.c
index b69f78f..53736ca 100644
--- a/sanei/sanei_scsi.c
+++ b/sanei/sanei_scsi.c
@@ -14,9 +14,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.
@@ -173,7 +171,7 @@
# include <sys/scsi/targets/scgio.h>
#elif defined (HAVE_SYS_SCSI_SCSI_H)
/*
- * the "offical" solaris uscsi(7I) interface; comes last, so that users
+ * the "official" solaris uscsi(7I) interface; comes last, so that users
* installing the SCG/SG driver can still use these generic scsi interfaces
*/
# define USE SOLARIS_USCSI_INTERFACE
@@ -347,7 +345,7 @@ int sanei_scsi_max_request_size = MAX_DATA;
#endif
/* the struct returned by the SG ioctl call SG_GET_SCSI_ID changed
- from version 2.1.34 to 2.1.35, and we need the informations from
+ from version 2.1.34 to 2.1.35, and we need the information from
the field s_queue_depth, which was introduced in 2.1.35.
To get this file compiling also with older versions of sg.h, the
struct is re-defined here.
@@ -383,7 +381,7 @@ typedef struct req
{
struct sg_header hdr;
/* Make sure this is the last element, the real size is
- SG_BIG_BUFF and machine dependant */
+ SG_BIG_BUFF and machine dependent */
u_int8_t data[1];
}
cdb;
@@ -2298,7 +2296,7 @@ issue (struct req *req)
/* this is messy... Sometimes it happens that we have
a valid looking sense buffer, but the DRIVER_SENSE
bit is not set. Moreover, we can check this only for
- not tooo old SG drivers
+ not too old SG drivers
*/
&& (req->sgdata.cdb.hdr.driver_status & DRIVER_SENSE)
#endif
@@ -2347,7 +2345,7 @@ issue (struct req *req)
status = SANE_STATUS_DEVICE_BUSY;
else if (handler)
/* sense handler should return SANE_STATUS_GOOD if it
- decided all was ok afterall */
+ decided all was ok after all */
status =
(*handler) (req->fd, req->sgdata.cdb.hdr.sense_buffer,
arg);
@@ -2415,7 +2413,7 @@ issue (struct req *req)
status = SANE_STATUS_DEVICE_BUSY;
else if (handler && req->sgdata.sg3.hdr.sb_len_wr)
/* sense handler should return SANE_STATUS_GOOD if it
- decided all was ok afterall */
+ decided all was ok after all */
status =
(*handler) (req->fd, req->sgdata.sg3.sense_buffer,
arg);
@@ -3833,12 +3831,12 @@ sanei_scsi_find_devices (const char *findvendor, const char *findmodel,
* (c) R=I+S Rapp Informatik System Germany
* Email: wolfgang@rapp-informatik.de
*
- * The driver version should run with other scsi componets like disk
+ * The driver version should run with other scsi components like disk
* attached to the same controller at the same time.
*
* Attention : This port needs a sane kernel driver for Unixware 2.x
* The driver is available in binary pkgadd format
- * Plese mail me.
+ * Please mail me.
*
*/
SANE_Status
@@ -3978,7 +3976,7 @@ sanei_scsi_find_devices (const char *findvendor, const char *findmodel,
#ifdef UWSUPPORTED /* at this time not supported by driver */
if (sb_ptr->SCB.sc_comp_code != SDI_ASW)
{
- DBG (1, "sanei_scsi_cmd: scsi_cmd failture %x\n",
+ DBG (1, "sanei_scsi_cmd: scsi_cmd failure %x\n",
sb_ptr->SCB.sc_comp_code);
if (sb_ptr->SCB.sc_comp_code == SDI_CKSTAT
&& sb_ptr->SCB.sc_status == S_CKCON)
diff --git a/sanei/sanei_tcp.c b/sanei/sanei_tcp.c
index d6f8efe..79c59ab 100644
--- a/sanei/sanei_tcp.c
+++ b/sanei/sanei_tcp.c
@@ -14,9 +14,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.
diff --git a/sanei/sanei_thread.c b/sanei/sanei_thread.c
index f701423..a5dcae1 100644
--- a/sanei/sanei_thread.c
+++ b/sanei/sanei_thread.c
@@ -14,9 +14,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.
@@ -113,7 +111,7 @@ sanei_thread_is_forked( void )
#endif
}
-/* Use this to mark a SANE_Pid as invaild instead of marking with -1.
+/* Use this to mark a SANE_Pid as invalid instead of marking with -1.
*/
#ifdef USE_PTHREAD
static void
diff --git a/sanei/sanei_udp.c b/sanei/sanei_udp.c
index b5bb8cc..57e595a 100644
--- a/sanei/sanei_udp.c
+++ b/sanei/sanei_udp.c
@@ -14,9 +14,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.
diff --git a/sanei/sanei_usb.c b/sanei/sanei_usb.c
index 4b49b11..022f6fa 100644
--- a/sanei/sanei_usb.c
+++ b/sanei/sanei_usb.c
@@ -19,9 +19,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.
@@ -506,7 +504,7 @@ SANE_Status sanei_usb_testing_enable_replay(SANE_String_Const path,
testing_mode = sanei_usb_testing_mode_replay;
testing_development_mode = development_mode;
- // TODO: we'll leak if noone ever inits sane_usb properly
+ // TODO: we'll leak if no one ever inits sane_usb properly
testing_xml_path = strdup(path);
testing_xml_doc = xmlReadFile(testing_xml_path, NULL, 0);
if (!testing_xml_doc)
@@ -1124,6 +1122,19 @@ static void sanei_usb_replay_debug_msg(SANE_String_Const message)
}
}
+extern void sanei_usb_testing_record_clear()
+{
+ if (testing_mode != sanei_usb_testing_mode_record)
+ return;
+
+ // we only need to indicate that we never opened a device and sanei_usb_record_open() will
+ // reinitialize everything for us.
+ testing_already_opened = 0;
+ testing_known_commands_input_failed = 0;
+ testing_last_known_seq = 0;
+ testing_append_commands_node = NULL;
+}
+
extern void sanei_usb_testing_record_message(SANE_String_Const message)
{
if (testing_mode == sanei_usb_testing_mode_record)
@@ -1356,6 +1367,10 @@ SANE_Bool sanei_usb_is_replay_mode_enabled()
return SANE_FALSE;
}
+void sanei_usb_testing_record_clear()
+{
+}
+
void sanei_usb_testing_record_message(SANE_String_Const message)
{
(void) message;
@@ -1443,7 +1458,7 @@ sanei_usb_init (void)
/* sanei_usb is now initialized */
initialized++;
- /* do a first scan of USB busses to fill device list */
+ /* do a first scan of USB buses to fill device list */
sanei_usb_scan_devices();
}
@@ -2221,7 +2236,7 @@ static const char* sanei_usb_transfer_type_desc(SANE_Int transfer_type)
return NULL;
}
-// Similar sanei_usb_set_endpoint, but ignors duplicate endpoints
+// Similar sanei_usb_set_endpoint, but ignores duplicate endpoints
static void sanei_usb_add_endpoint(device_list_type* device,
SANE_Int transfer_type,
SANE_Int ep_address,
diff --git a/sanei/sanei_wire.c b/sanei/sanei_wire.c
index 85021d1..53bf6ba 100644
--- a/sanei/sanei_wire.c
+++ b/sanei/sanei_wire.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.