[comp.sources.amiga] v90i265: stickmouse 1.0 - change port and device of internal input.device , Part01/01

amiga-request@abcfd20.larc.nasa.gov (Amiga Sources/Binaries Moderator) (10/09/90)

Submitted-by: hgschmie@faui41.informatik.uni-erlangen.de (Henning Schmiedehausen)
Posting-number: Volume 90, Issue 265
Archive-name: util/stickmouse-1.0/part01

[ uuencoded executable enclosed  ...tad ]

This program changes the port and the device used by the
internal input.device to control the Mouse-Pointer.

#!/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 <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 1 (of 1)."
# Contents:  MakeFile StickMouse.doc StickMouse.uu Stickmouse.c
# Wrapped by tadguy@abcfd20 on Mon Oct  8 17:22:52 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'MakeFile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MakeFile'\"
else
echo shar: Extracting \"'MakeFile'\" \(268 characters\)
sed "s/^X//" >'MakeFile' <<'END_OF_FILE'
X# Makefile for
X# Stickmouse
X# will work with Manx C V 3.6
X#
X
XCFLAGS =  +l -n -s
X# remove -n after your finished Debugging
X
XStickmouse: Stickmouse.o
X	ln -t -g -o StickMouse Stickmouse.o -lc32
X# remove -t and -g after you finished Debugging
X
XStickmouse.o: Stickmouse.c
X
END_OF_FILE
if test 268 -ne `wc -c <'MakeFile'`; then
    echo shar: \"'MakeFile'\" unpacked with wrong size!
fi
# end of 'MakeFile'
fi
if test -f 'StickMouse.doc' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'StickMouse.doc'\"
else
echo shar: Extracting \"'StickMouse.doc'\" \(2168 characters\)
sed "s/^X//" >'StickMouse.doc' <<'END_OF_FILE'
X/***************************************************\
X *                                                 *
X *              S T I C K M O U S E                *
X *                                                 *
X * 901002 V 1.0 written and released by Dr. Music  *
X *                                                 *
X * Dr. Music is:                                   *
X * Henning Schmiedehausen                          *
X * Glueckstrasse 3                                 *
X * D-8520 Erlangen                                 *
X * GERMANY                                         *
X * hgschmie@faui41.informatik.uni-erlangen.de      *
X *                                                 *
X * This program is placed in the public domain     *
X * It may be distributed freely as long as this    *
X * message is left unchanged.                      *
X * You may add it to any PD-Disk you want, as long *
X * as you don't charge more money than necessary   *
X * to distribute the Disk.                         *
X *                                                 *
X\***************************************************/
X
X
XThis program changes the port and the device used by the
Xinternal input.device to control the Mouse-Pointer.
X
XThe useage of this little program is
X
XSTICKMOUSE <port> <device>, where
X
X<port> is either 0 or 1 for the Gameports.
X<device> is either JOY or MOUSE for the device.
X
XJust STICKMOUSE and Return will reset to Mouse and Port 0.
X
XThe C-Code is included in this package, it should contain:
X
XMakefile:       268  Bytes
XStickmouse.c:   3949 Bytes
XStickmouse:     6708 Bytes
XStickmouse.doc: 2168 Bytes
X
XThis is PD. Use it or discard it.
X
X
X                                     Henning
X
X        ___ _________________________________________________________________
X ONLY  //// |Henning Schmiedehausen    | You can call me       | Opinions are
X___   ////  |Glueckstr. 3 8520 Erlangen| Dr. Music, 'cause     | mine, Typos
X\\\\ ////   |Germany                   | Music is my name - BOC| and Grammars
X \\\X///    +--------------------------+---------------+-------+------+ are
X  \XXX/AMIGA|hgschmie@faui41.informatik.uni-erlangen.de| HACK IS BACK!| yours
END_OF_FILE
if test 2168 -ne `wc -c <'StickMouse.doc'`; then
    echo shar: \"'StickMouse.doc'\" unpacked with wrong size!
fi
# end of 'StickMouse.doc'
fi
if test -f 'StickMouse.uu' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'StickMouse.uu'\"
else
echo shar: Extracting \"'StickMouse.uu'\" \(9432 characters\)
sed "s/^X//" >'StickMouse.uu' <<'END_OF_FILE'
Xbegin 644 StickMouse
XM```#\P`````````#``````````(```7A````K@````$```/I```%X4[Z!%Q.8
XM5?_^&VT`#___(&T`"#%\``X`'$'M__\B;0`((T@`*"!M``@A?`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7P`!``(0BH`#A5$``]"ITZZ`50E0``02JT`"%A/9PHO"DZZ`%I83V`*2&H`O
XM%$ZZ`7I83R`*8)).50``+PHD;0`(2JH`"F<(+PI.N@&66$\5?`#_``@E?/__R
XM__\`%'``$"H`#R\`3KH!*DAX`"(O"DZZ`0Q/[P`,)%].74YU(F\`!"QL@FI._
XM[OZ>("\`!"QL@FI.[OZV3E4``$AX`#`O+0`(3KH`&E!/3EU.=4Y5```O+0`(^
XM3KH`3%A/3EU.=4Y5```O"DJM``AF"'``)%].74YU2'D``0`!+RT`#$ZZ`&`D*
XM0$J`4$]F!'``8.`5?``%``@U;0`.`!(E;0`(``X@"F#*3E4``"\*)&T`""`*^
XM9@8D7TY=3G45?`#_``@E?/____\`%"5\_____P`8<``P*@`2+P`O"DZZ`$90]
XM3V#23OH``DSO``,`!"QL@FI.[O\Z2.<#`")O``PL;()J3J[^.$S?`,!.=4[Z!
XM``(B;P`$+&R":D[N_MHL;()J3N[_?$[Z``(B;P`$("\`""QL@FI.[O\N("\`<
XM!"QL@FI.[OZP(&\`!"QL@FI.[OZ,(&\`!""(6)!"J``$(4@`"$YU(&\`!$SOB
XM`@$`""(O`!`L;()J3N[^1"QL@FHB;P`$("\`"$[N_=@B;P`$+&R":D[N_I@B\
XM;P`$+&R":D[N_H9,[P`#``0L;()J3N[^SB!O``0L;()J3N[^@$SO`P``!"QLP
XM@I).[O^@(&\`!"QL@I).[O^F(&\`!"QL@I).[O^R```#[`````$````!```$P
XMT@````````/R```#Z@```)8P,3(S-#4V-S@Y86)C9&5F````("`@("`@("`@,
XM,#`P,#`@("`@("`@("`@("`@("`@(""00$!`0$!`0$!`0$!`0$!`#`P,#`P,(
XM#`P,#$!`0$!`0$`)"0D)"0D!`0$!`0$!`0$!`0$!`0$!`0$!`4!`0$!`0`H*.
XM"@H*"@("`@("`@("`@("`@("`@("`@("0$!`0"```````````````````0``Q
XM```!``````````````````````$!`````0`````````````````````!`@``'
XM``$`````````````````````````````````````````````````````````!
XM`````````````````````````````````````````````````````````````
XM`````````````````````````````````````````````````````````````
XM`````````````````````````````````````````````````````````````
XM`````````````````````````````````````````````````````````````
XM`````````````````````````````````````````````````````````````
XM`````````````````````````````````````````````````````````````
XM`````````````````````````````````````````````````````````````
XM````````````````````````````%`````````````````/R```#ZP````$`X
X#``/RU
X``
Xend
Xsize 6708
END_OF_FILE
if test 9432 -ne `wc -c <'StickMouse.uu'`; then
    echo shar: \"'StickMouse.uu'\" unpacked with wrong size!
fi
# end of 'StickMouse.uu'
fi
if test -f 'Stickmouse.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Stickmouse.c'\"
else
echo shar: Extracting \"'Stickmouse.c'\" \(3949 characters\)
sed "s/^X//" >'Stickmouse.c' <<'END_OF_FILE'
X/***************************************************\
X *                                                 *
X *              S T I C K M O U S E                *
X *                                                 *
X * 901002 V 1.0 written and released by Dr. Music  *
X *                                                 *
X * Dr. Music is:                                   *
X * Henning Schmiedehausen                          *
X * Glueckstrasse 3                                 *
X * D-8520 Erlangen                                 *
X * GERMANY                                         *
X * hgschmie@faui41.informatik.uni-erlangen.de      *
X *                                                 *
X * This program is placed in the public domain     *
X * It may be distributed freely as long as this    *
X * message is left unchanged.                      *
X * You may add it to any PD-Disk you want, as long *
X * as you don't charge more money than necessary   *
X * to distribute the Disk.                         *
X *                                                 *
X\***************************************************/
X
X/* This program will switch the intuition-input.device
X   to use different ports and Devices at the external ports to
X   control the mouse-pointer. The trigger button will simulate
X   the left mouse button, the right button must be simulated via
X   Right-Amiga and ALT
X*/
X
X/* Usage of this program: STICKMOUSE <port> <device> */
X/* 					just  STICKMOUSE
X   will set the port to 0 and the device to MOUSE (default) */
X
X#include <ctype.h>
X#include <exec/types.h>
X#include <devices/input.h>
X#include <devices/gameport.h>
X
Xvoid SetMousePort(request,port)
Xstruct	IOStdReq	*request;
XUBYTE	port;
X	{
XUBYTE	MyPort;
X	MyPort              = port;
X	request->io_Command = (UWORD)IND_SETMPORT;
X	request->io_Data    = (APTR)&MyPort;
X	request->io_Length  = 1L;
X	DoIO(request);
X	}
X
Xvoid SetMouseDev(request,dev)
Xstruct	IOStdReq	*request;
XUBYTE	dev;
X	{
XUBYTE	MyDev;
X	MyDev               = dev;
X	request->io_Command = (UWORD)IND_SETMTYPE;
X	request->io_Data    = (APTR)&MyDev;
X	request->io_Length  = 1L;
X	DoIO(request);
X	}
X
Xstatic	struct		IOStdReq	*StickMouseReq;
Xstatic	struct		MsgPort		*StickMousePort;
X
Xmain(argc,argv)
Xint argc;
XSTRPTR argv[];
X	{
X
Xregister COUNT	i;				/* for our loops */
X
XUBYTE		Stick_Port,		/* This will keep the Port-Number */
X			Stick_Dev;		/* and this one the Device-Type */
X
X	if((argc<3))
X		{
X		if(argc==1)
X			{
X			Stick_Port = 0;
X			Stick_Dev  = GPCT_MOUSE; /* Default-Settings for MOUSE */
X			}
X		else
X			if((argc==2) && (argv[1][0] == '?'))
X				{
X				printf("\n\n STICKMOUSE: switches the Mouse-Pointer-Device\n");
X				printf(" USAGE: STICKMOUSE <port> <device>\n");
X				printf(" <port> = 0/1 for the Joyports\n");
X				printf(" <device> = MOUSE/JOY for the Device\n");
X				printf(" STICKMOUSE without params will set to default\n");
X				printf(" written by Dr. Music 1990\n");
X				exit(10);
X				}
X			else
X				{
X				printf("Useage: StickMouse <port> <dev> or StickMouse ? for help\n");
X				exit(10);
X				}
X		}
X	else
X		{
X		Stick_Port = (short)((char)argv[1][0] - '0');
X		if((Stick_Port < 0) || (Stick_Port > 1))
X			{
X			printf("Port-Number must be 0 or 1\n");
X			exit(10);
X			}
X		for(i=0;i<strlen(argv[2]);i++)
X			argv[2][i] = toupper((char)argv[2][i]);
X		if(!strcmp(argv[2],"JOY"))
X			Stick_Dev = GPCT_RELJOYSTICK;
X		else
X			if(!strcmp(argv[2],"MOUSE"))
X				Stick_Dev = GPCT_MOUSE;
X			else
X				{
X				printf("Device must be either MOUSE or JOY\n");
X				exit(10);
X				}
X		}
X/* ok, end of parsing: 0 / 1 is port-number, GPCT_MOUSE / RELJOYSTICK is type
X*/
X		StickMousePort		=	(struct MsgPort *)CreatePort("StickMouse_is_here",NULL);
X		StickMouseReq		=	(struct IOStdReq *)CreateStdIO(StickMousePort);
X		OpenDevice("input.device",0,StickMouseReq,0);
X
X
X		SetMousePort(StickMouseReq,Stick_Port);
X		SetMouseDev(StickMouseReq,Stick_Dev);
X
X		CloseDevice(StickMouseReq);
X		DeleteStdIO(StickMouseReq);
X		DeletePort(StickMousePort);
X
X	}
X
X
END_OF_FILE
if test 3949 -ne `wc -c <'Stickmouse.c'`; then
    echo shar: \"'Stickmouse.c'\" unpacked with wrong size!
fi
# end of 'Stickmouse.c'
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 <amiga@uunet.uu.net>.
Mail comments to the moderator at <amiga-request@uunet.uu.net>.
Post requests for sources, and general discussion to comp.sys.amiga.