Path: utzoo!attcan!uunet!abcfd20.larc.nasa.gov!amiga-request From: amiga-request@abcfd20.larc.nasa.gov (Amiga Sources/Binaries Moderator) Newsgroups: comp.sources.amiga Subject: v90i271: NewNoClick - set NoClick bit in WB2.0 trackdisk.device, Part01/01 Message-ID: Date: 10 Oct 90 01:13:22 GMT Reply-To: stefanb@cip-s02.informatik.rwth-aachen.de (Stefan Becker) Lines: 372 Approved: tadguy@uunet.UU.NET (Tad Guy) X-Mail-Submissions-To: amiga@uunet.uu.net X-Post-Discussions-To: comp.sys.amiga Submitted-by: stefanb@cip-s02.informatik.rwth-aachen.de (Stefan Becker) Posting-number: Volume 90, Issue 271 Archive-name: util/newnoclick/part01 [ uuencoded executable enclosed ...tad ] This is yet another NoClick program. It uses the new NoClick bit in the WB2.0 version of the trackdisk.device. #!/bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'Makefile' <<'END_OF_FILE' XCFLAGS=-pc X Xall: NoClick.o X ln NoClick.o -lc X XNoClick.o: Makefile X cc $(CFLAGS) NoClick.c END_OF_FILE if test 106 -ne `wc -c <'Makefile'`; then echo shar: \"'Makefile'\" unpacked with wrong size! fi # end of 'Makefile' fi if test -f 'NoClick.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'NoClick.c'\" else echo shar: Extracting \"'NoClick.c'\" \(1849 characters\) sed "s/^X//" >'NoClick.c' <<'END_OF_FILE' X#include X#include X#include X#include X#include X Xvoid DoStuff(int, const char *); Xstruct MsgPort *CreatePort(char *, LONG); Xvoid DeletePort(struct MsgPort *); Xstruct IOStdReq *CreateExtIO(struct MsgPort *, ULONG); Xvoid DeleteExtIO(struct IOStdReq *); Xlong OpenDevice(char *, ULONG, struct IOStdReq *, ULONG); Xvoid CloseDevice(struct IOStdReq *); X Xvoid main(int argc, char **argv) X{ X if (argc<2) X { X printf("Usage: %s [-]<0..%1d>\n",argv[0],NUMUNITS-1); X exit(20); X } X X while (--argc) X { X argv++; X if (**argv=='-') DoStuff(0,*argv+1); X else DoStuff(1,*argv); X } X X exit(0); X} X Xvoid DoStuff(int doit, const char *arg) X{ X ULONG unit; X struct MsgPort *iop; X struct IOStdReq *ior; X X if (!isdigit(*arg)) X { X printf("Bad argument '%c'!\n",*arg); X return; X } X X unit=atol(arg); X X if ((unit<0) || (unit>NUMUNITS-1)) X { X printf("Bad drive number '%ld'!\n",unit); X return; X } X X if (iop=CreatePort("",0)) X { X if (ior=CreateExtIO(iop,sizeof(struct IOStdReq))) X { X if (!OpenDevice(TD_NAME,unit,ior,0)) X { X if (ior->io_Device->dd_Library.lib_Version>=36) X { X printf("NoClick unit %ld ",unit); X X if (doit) X { X ((struct TDU_PublicUnit *) (ior->io_Unit))->tdu_PubFlags|=TDPF_NOCLICK; X printf("ON\n"); X } X else X { X ((struct TDU_PublicUnit *) (ior->io_Unit))->tdu_PubFlags&=~TDPF_NOCLICK; X printf("OFF\n"); X } X } X else X printf("'" TD_NAME "' version 36 or better required!\n"); X X CloseDevice(ior); X } X else X printf("Can't open '" TD_NAME "' for unit %ld!\n",unit); X X DeleteExtIO(ior); X } X else X printf("Can't create IORequest!\n"); X X DeletePort(iop); X } X else X printf("Can't create port!\n"); X} X END_OF_FILE if test 1849 -ne `wc -c <'NoClick.c'`; then echo shar: \"'NoClick.c'\" unpacked with wrong size! fi # end of 'NoClick.c' fi if test -f 'NoClick.uu' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'NoClick.uu'\" else echo shar: Extracting \"'NoClick.uu'\" \(10233 characters\) sed "s/^X//" >'NoClick.uu' <<'END_OF_FILE' Xbegin 666 NoClick XM```#\P`````````#``````````(```96````R`````$```/I```&5D[Z`\1.% XM50``2.<```RM`````@`(;```(DAX``,@;0`,+Q!(>@!F3KH"^$_O``Q(>``4X XM3KH6[EA/4ZT`"&<``#Q8K0`,(&T`#"!0#!``+68``!@@;0`,(%!2B"\(0J=.0 XMN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+N9S1(YP`"("R"ZB)L@NXL;(+*3J[_+DS?E XM0`!(YP`"("R"YN6`6(`B;(+B+&R"RDZN_RY,WT``8"1(YP`"+&R"RDZN_WQ,H XMWT``2.<``B)L@MXL;(+*3J[^ADS?0`!(YP`"(FR"SBQL@LI.KOYB3-]``"`#J XM+FR"QDYU3-\`#$YU2.<@("0O``QR!B`"3KH`2B1`U>R"TDJ";0PP;(*\L<)O3 XM!$J29A`I?`````.#`G#_3-\$!$YU,"H`!`)`@`!F$DCG``(B$BQL@LY.KO_'readme' <<'END_OF_FILE' XNoClick for WB2.0 10-Aug-90 X XThis is yet another NoClick program. It uses the new NoClick bit in the WB2.0 Xversion of the trackdisk.device. X XSYNTAX: X X NoClick [-] [-] .... X X drive: 0..3 - number of disk drive X XEXAMPLES: X X NoClick 0 - Disable "clicking" on disk drive 0 X NoClick -1 - Ensable "clicking" on disk drive 1 X XThis program is FreeWare. Bugs, comments send to: X X(Snail)Mail : Stefan Becker, Holsteinstrasse 9, 5100 Aachen, West Germany XPhone : +49-241-505705 XInterNet : stefanb@cip-s02.informatik.rwth-aachen.de XUUCP : ..mcvax!unido!rwthinf!cip-s02!stefanb XFIDO : 2:242/7.6 END_OF_FILE if test 681 -ne `wc -c <'readme'`; then echo shar: \"'readme'\" unpacked with wrong size! fi # end of 'readme' fi echo shar: End of archive 1 \(of 1\). cp /dev/null ark1isdone MISSING="" for I in 1 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have the archive. rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0 -- Mail submissions (sources or binaries) to . Mail comments to the moderator at . Post requests for sources, and general discussion to comp.sys.amiga.