summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2004-03-14 04:59:17 +0000
committerimp <imp@FreeBSD.org>2004-03-14 04:59:17 +0000
commitf6d28bfe48a8cde8081b6179e775f0de932628e7 (patch)
tree62a0950997d4a1f4592fb2a4330dabe1ef2632be
parent0fa322f62a42d0649ed326b1faa82f30bb3248de (diff)
downloadFreeBSD-src-f6d28bfe48a8cde8081b6179e775f0de932628e7.zip
FreeBSD-src-f6d28bfe48a8cde8081b6179e775f0de932628e7.tar.gz
With the passing of the asc driver, the sasc prograqm is no longer
necessary.
-rw-r--r--usr.bin/Makefile2
-rw-r--r--usr.bin/sasc/INSTALL88
-rw-r--r--usr.bin/sasc/Makefile6
-rw-r--r--usr.bin/sasc/README9
-rw-r--r--usr.bin/sasc/sasc.1104
-rw-r--r--usr.bin/sasc/sasc.c165
6 files changed, 0 insertions, 374 deletions
diff --git a/usr.bin/Makefile b/usr.bin/Makefile
index 9c94fbb..229f788 100644
--- a/usr.bin/Makefile
+++ b/usr.bin/Makefile
@@ -155,7 +155,6 @@ SUBDIR= alias \
rusers \
rwall \
rwho \
- ${_sasc} \
script \
sed \
shar \
@@ -271,7 +270,6 @@ _bluetooth= bluetooth
_doscmd= doscmd
_ncplist= ncplist
_ncplogin= ncplogin
-_sasc= sasc
_smbutil= smbutil
.endif
diff --git a/usr.bin/sasc/INSTALL b/usr.bin/sasc/INSTALL
deleted file mode 100644
index 24234f7..0000000
--- a/usr.bin/sasc/INSTALL
+++ /dev/null
@@ -1,88 +0,0 @@
-$FreeBSD$
-
-To install the device driver, please do the following steps:
-
-1. Install the files by copying them as listed in the following table:
-
- asc.c /usr/sys/i386/isa/
- ascreg.h /usr/sys/i386/isa/
- asc_ioctl.h /usr/sys/i386/include/
-
- Note that if you have copies of the system header directories
- in /usr/include/ instead of symbolic links, you have to copy
- `asc.h' to /usr/include/machine/ also. I recommend to replace
- the copies by links though.
-
-[the following steps, 2..5, can be achieved by moving to
- /sys/i386 and doing "patch < diffs.asc"]
-
-2. Make the driver source known to config(8) by editing the file
- /usr/src/sys/i386/conf/files.i386. Just append the following line:
-
- i386/isa/asc.c optional asc device-driver
-
-3. Include a driver access record in /usr/src/sys/i386/i386/conf.c
- Append the following structure at the end of the array that
- contains the *character* device drivers. Remember the major number
- that will be used for the driver, i.e. the number following the
- number af the preceding record.
-
- { ascopen, ascclose, ascread, nowrite, /*<major>*/
- ascioctl, nostop, nullreset, nodevtotty, /* asc */
- ascselect, nommap, NULL },
-
-4. Insert the definitions for the base port addresses of the device
- into the file /usr/src/sys/i386/isa/isa.h:
-
-#define IO_ASC1 0x3EB /* AmiScan addr.grp. 1 */
-#define IO_ASC2 0x22B /* AmiScan addr.grp. 2 */
-#define IO_ASC3 0x26B /* AmiScan addr.grp. 3 */
-#define IO_ASC4 0x2AB /* AmiScan addr.grp. 4 */
-#define IO_ASC5 0x2EB /* AmiScan addr.grp. 5 */
-#define IO_ASC6 0x32B /* AmiScan addr.grp. 6 */
-#define IO_ASC7 0x36B /* AmiScan addr.grp. 7 */
-#define IO_ASC8 0x3AB /* AmiScan addr.grp. 8 */
-
-5. Patch /dev/MAKEDEV by adding the following lines in the switch to
- create the device entries:
-
- asc*)
- rm -f asc0
- mknod asc0 c 68 0
- mknod asc0p c 68 8
- chmod 666 asc0 asc0p
- chown root.wheel asc0 asc0p
- ;;
-
-
-
-6. Edit your kernel configuration file (in /usr/src/sys/i386/conf/)
- by inserting the following line:
-
- device asc0 at isa? port 0x2ab tty drq 3 irq 10
-
- This should usually work for you as it reflects the factory
- settings of the AMI scanner. However, if this conflicts with
- any other device on your system, you have the option to change
- `drq 3' into `drq 1' or `drq 5' and the actual port value to
- "IO_ASC1".. "IO_ASC8" as defined in isa.h
-
-7. Rebuild the kernel, don't forget to config(8) and `make depend' first.
-
-8. Make the following device nodes:
-
- mknod /dev/asc0 c <major> 0
- mknod /dev/asc0p c <major> 8
-
- (or, cd /dev and do ./MAKEDEV asc0).
-
- If you plan to modify the and debug the driver, add these (you
- won't need these though, unless you know how to get this
- information from elsewhere.
-
- mknod /dev/asc0d c <major> 32
- mknod /dev/asc0pd c <major> 40
-
-9. Install the new kernel and reboot. You can try the driver by
- doing a simple "cat /dev/asc0p > myfile.pbm" and then trying
- to display the PBM image with xv or some other tool.
diff --git a/usr.bin/sasc/Makefile b/usr.bin/sasc/Makefile
deleted file mode 100644
index cf7790d..0000000
--- a/usr.bin/sasc/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# @(#)Makefile 8.1 (Berkeley) 6/6/93
-# $FreeBSD$
-
-PROG= sasc
-
-.include <bsd.prog.mk>
diff --git a/usr.bin/sasc/README b/usr.bin/sasc/README
deleted file mode 100644
index 5436bd2..0000000
--- a/usr.bin/sasc/README
+++ /dev/null
@@ -1,9 +0,0 @@
-ASC - A device driver for a handy scanner
-
-This is a device driver for GI1904-based hand scanners, e.g. the Trust
-Amiscan Grey and possibly others. The driver is based on the "gsc"
-driver and, partly, on a Linux driver.
-
-The driver has a working select().
-
--Luigi Rizzo (luigi@iet.unipi.it)
diff --git a/usr.bin/sasc/sasc.1 b/usr.bin/sasc/sasc.1
deleted file mode 100644
index b8671ef..0000000
--- a/usr.bin/sasc/sasc.1
+++ /dev/null
@@ -1,104 +0,0 @@
-.\" sasc(1) - manual page for the `asc' scanner device driver utility
-.\"
-.\"
-.\" Copyright (c) 1995 Gunther Schadow. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Gunther Schadow.
-.\" 4. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd January 6, 1995
-.Dt SASC 1
-.Os
-.Sh NAME
-.Nm sasc
-.Nd set the options of the asc scanner device
-.Sh SYNOPSIS
-.Nm
-.Op Fl sq
-.Op Fl b Ar len
-.Op Fl f Ar file
-.Op Fl h Ar height
-.Op Fl r Ar resolution
-.Op Fl t Ar timeout
-.Op Fl w Ar width
-.Sh DESCRIPTION
-The
-.Nm
-utility provides shell level access to the ioctl
-requests served by the handy scanner device driver asc.
-Please see
-.Xr asc 4
-for the exact meaning of the requests. Generally they modify
-the output and behavior of the asc scanner device.
-When
-.Nm
-is called with no option only the current settings are reported.
-.Pp
-The following options are available:
-.Bl -tag -width indent
-.It Fl s Bq ASC_SRESSW
-Set the scanner with the values of the resolution selector switch.
-.It Fl q
-Operate in quiet mode, i.e. do not report any of the current settings.
-Normally the parameters are shown after the modifications have been
-performed.
-.It Fl f Ar file
-Operate on a different scanner device node given by filename.
-Note
-that even though there may exist more than one node of scanner device
-several of them will refer the same device unit.
-The modifications are
-performed od the unit regardless of the device node by which it is
-accessed.
-.It Fl r Ar resolution Bq ASC_SRES
-Set the resolution in dpi.
-.It Fl w Ar width Bq ASC_SWIDHT
-Set the width of the bitmap in pixels.
-.It Fl h Ar height Bq ASC_SHEIGHT
-Set the height of the bitmap in lines of pixels.
-.It Fl b Ar len Bq ASC_SBLEN
-Set the internal dma buffer to be
-.Ar len
-lines in size.
-.It Fl t Ar timeout Bq ASC_SBTIME
-Set the timeout time for reading one dma buffer.
-.El
-.Sh FILES
-.Bl -tag -width /var/rwho/whod.* -compact
-.It Pa /dev/asc0
-device node for
-.Em raw
-output.
-.It Pa /dev/asc0p
-device node for output in
-.Em pbm
-file format.
-.El
-.Sh SEE ALSO
-.Xr asc 4
-.Sh AUTHORS
-.An Gunther Schadow Aq gusw@fub46.zedat.fu-berlin.de
diff --git a/usr.bin/sasc/sasc.c b/usr.bin/sasc/sasc.c
deleted file mode 100644
index 367fe29..0000000
--- a/usr.bin/sasc/sasc.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/* sasc(1) - utility for the `asc' scanner device driver
- *
- *
- * Copyright (c) 1995 Gunther Schadow. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Gunther Schadow.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef lint
-static const char rcsid[] =
- "$FreeBSD$";
-#endif /* not lint */
-
-#include <err.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/file.h>
-#include <sys/ioctl.h>
-#include <machine/asc_ioctl.h>
-
-#ifndef DEFAULT_FILE
-#define DEFAULT_FILE "/dev/asc0"
-#endif
-#ifdef FAIL
-#undef FAIL
-#endif
-#define FAIL -1
-
-static void usage(void);
-
-static void
-usage()
-{
- fprintf(stderr,
-"usage: sasc [-sq] [-f file] [-r dpi] [-w width] [-h height] \
-[-b len] [-t time]\n");
- exit(1);
-}
-
-int
-main(int argc, char **argv)
-{
- char c;
- int fd;
-
- const char *file = DEFAULT_FILE;
-
- int show_dpi = 0;
- int show_width = 0;
- int show_height = 0;
- int show_blen = 0;
- int show_btime = 0;
- int show_all = 1;
-
- int set_blen = 0;
- int set_dpi = 0;
- int set_width = 0;
- int set_height = 0;
- int set_btime = 0;
- int set_switch = 0;
-
- if (argc == 0) usage();
-
- while( (c = getopt(argc, argv, "sqf:b:r:w:h:t:")) != -1)
- {
- switch(c) {
- case 'f': file = optarg; break;
- case 'r': set_dpi = atoi(optarg); break;
- case 'w': set_width = atoi(optarg); break;
- case 'h': set_height = atoi(optarg); break;
- case 'b': set_blen = atoi(optarg); break;
- case 't': set_btime = atoi(optarg); break;
- case 's': set_switch = 1; break;
- case 'q': show_all = 0; break;
- default: usage();
- }
- }
-
- fd = open(file, O_RDONLY);
- if ( fd == FAIL )
- err(1, "%s", file);
-
- if (set_switch != 0)
- {
- if(ioctl(fd, ASC_SRESSW) == FAIL)
- err(1, "ASC_SRESSW");
- }
-
- if (set_dpi != 0)
- {
- if(ioctl(fd, ASC_SRES, &set_dpi) == FAIL)
- err(1, "ASC_SRES");
- }
-
- if (set_width != 0)
- {
- if(ioctl(fd, ASC_SWIDTH, &set_width) == FAIL)
- err(1, "ASC_SWIDTH");
- }
-
- if (set_height != 0)
- {
- if(ioctl(fd, ASC_SHEIGHT, &set_height) == FAIL)
- err(1, "ASC_SHEIGHT");
- }
-
- if (set_blen != 0)
- {
- if(ioctl(fd, ASC_SBLEN, &set_blen) == FAIL)
- err(1, "ASC_SBLEN");
- }
-
- if (set_btime != 0)
- {
- if(ioctl(fd, ASC_SBTIME, &set_btime) == FAIL)
- err(1, "ASC_SBTIME");
- }
-
- if (show_all != 0)
- {
- if(ioctl(fd, ASC_GRES, &show_dpi) == FAIL)
- err(1, "ASC_GRES");
- if(ioctl(fd, ASC_GWIDTH, &show_width) == FAIL)
- err(1, "ASC_GWIDTH");
- if(ioctl(fd, ASC_GHEIGHT, &show_height) == FAIL)
- err(1, "ASC_GHEIGHT");
- if(ioctl(fd, ASC_GBLEN, &show_blen) == FAIL)
- err(1, "ASC_GBLEN");
- if(ioctl(fd, ASC_GBTIME, &show_btime) == FAIL)
- err(1, "ASC_GBTIME");
-
- printf("%s:\n", file);
- printf("resolution\t %d dpi\n", show_dpi);
- printf("width\t\t %d\n", show_width);
- printf("height\t\t %d\n",show_height);
- printf("buffer length\t %d\n", show_blen);
- printf("buffer timeout\t %d\n", show_btime);
- }
-
- return 0;
-}
OpenPOWER on IntegriCloud