swarp-0.1/0000755000014400001440000000000010513654267011203 5ustar argusersswarp-0.1/Makefile0000644000014400001440000000207310513654267012645 0ustar argusers# swarp - simple pointer warp # (C)opyright MMVI Anselm R. Garbe include config.mk SRC = swarp.c OBJ = ${SRC:.c=.o} all: options swarp options: @echo swarp build options: @echo "CFLAGS = ${CFLAGS}" @echo "LDFLAGS = ${LDFLAGS}" @echo "CC = ${CC}" @echo "LD = ${LD}" .c.o: @echo CC $< @${CC} -c ${CFLAGS} $< ${OBJ}: config.mk swarp: ${OBJ} @echo LD $@ @${LD} -o $@ ${OBJ} ${LDFLAGS} @strip $@ clean: @echo cleaning @rm -f swarp ${OBJ} swarp-${VERSION}.tar.gz dist: clean @echo creating dist tarball @mkdir -p swarp-${VERSION} @cp -R LICENSE Makefile README config.mk ${SRC} swarp-${VERSION} @tar -cf swarp-${VERSION}.tar swarp-${VERSION} @gzip swarp-${VERSION}.tar @rm -rf swarp-${VERSION} install: all @echo installing executable file to ${DESTDIR}${PREFIX}/bin @mkdir -p ${DESTDIR}${PREFIX}/bin @cp -f swarp ${DESTDIR}${PREFIX}/bin @chmod 755 ${DESTDIR}${PREFIX}/bin/swarp uninstall: @echo removing executable file from ${DESTDIR}${PREFIX}/bin @rm -f ${DESTDIR}${PREFIX}/bin/swarp .PHONY: all options clean dist install uninstall swarp-0.1/LICENSE0000644000014400001440000000225010513654267012207 0ustar argusersMIT/X Consortium License (C)opyright MMVI Anselm R. Garbe (C)opyright MMVI Sander van Dijk Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. swarp-0.1/README0000644000014400001440000000104110513654267012057 0ustar argusersswarp - simple pointer warp =========================== simple pointer warp is a generic pointer warping utility for X. Requirements ------------ In order to build swarp you need the Xlib header files. Installation ------------ Edit config.mk to match your local setup (swarp is installed into the /usr/local namespace by default). Afterwards enter the following command to build and install swarp (if necessary as root): make clean install Running swarp ------------- Simply invoke the 'swarp' command with the required arguments. swarp-0.1/config.mk0000644000014400001440000000073210513654267013003 0ustar argusers# swarp version VERSION = 0.1 # Customize below to fit your system # paths PREFIX = /usr/local MANPREFIX = ${PREFIX}/share/man X11INC = /usr/X11R6/include X11LIB = /usr/X11R6/lib # includes and libs INCS = -I. -I/usr/include -I${X11INC} LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 # flags CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" LDFLAGS = ${LIBS} #CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" #LDFLAGS = -g ${LIBS} # compiler and linker CC = cc LD = ${CC} swarp-0.1/swarp.c0000644000014400001440000000160010513654267012500 0ustar argusers/* (C)opyright MMIV-MMV Anselm R. Garbe * See LICENSE file for license details. */ #include #include #include #include #include int main(int argc, char **argv) { int x, y; Display *dpy; if((argc == 2) && !strncmp(argv[1], "-v", 3)) { fputs("swarp-"VERSION", (C)opyright MMVI Anselm R. Garbe\n", stdout); exit(EXIT_SUCCESS); } if(argc != 3) goto Usage; if(!(dpy = XOpenDisplay(0))) { fputs("swarp: cannot open display\n", stderr); exit(EXIT_FAILURE); } if((sscanf(argv[1], "%d", &x) != 1) || (sscanf(argv[2], "%d", &y) != 1)) { Usage: fputs("usage: swarp [-v]\n", stderr); exit(EXIT_FAILURE); } XWarpPointer(dpy, None, RootWindow(dpy, DefaultScreen(dpy)), 0, 0, 0, 0, x, y); XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); XCloseDisplay(dpy); return 0; }