amiga-request@ab20.larc.nasa.gov (Amiga Sources/Binaries Moderator) (03/14/91)
Submitted-by: hclausen@adspdk.UUCP (Henrik Clausen) Posting-number: Volume 91, Issue 057 Archive-name: utilities/star/part01 [ includes uuencoded executable ...tad ] This simply sets the RN_WILDSTAR in the RootNode, executing practically instantly. After this, the * character can be used for wildcard if mixed with other characters. If used alone, two stars must be used ("**") to avoid confusion with the CON: use of *. This makes sense, as CON: will open a separate window unlike *. #!/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: ReadMe Star.c Star.uu # Wrapped by tadguy@ab20 on Wed Mar 13 19:53:46 1991 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'ReadMe' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'ReadMe'\" else echo shar: Extracting \"'ReadMe'\" \(914 characters\) sed "s/^X//" >'ReadMe' <<'END_OF_FILE' X Modelled after Doug Walker's Hello.c, here comes my smallest useful Xprogram ever - 88 bytes executable, no Asm code! Might still be possible to Xshave some bytes off, but this would damage the source's readability. X X This simply sets the RN_WILDSTAR in the RootNode, executing practically Xinstantly. X X To remove, change the line: X X Root->rn_Flags |= 1 << 24; X X into: X X Root->rn_Flags &= ~(1 << 24); X X and recompile. Feel free to implement removal as an option. X X After this, the * character can be used for wildcard if mixed with other Xcharacters. If used alone, two stars must be used ("**") to avoid confusion Xwith the CON: use of *. This makes sense, as CON: will open a separate Xwindow unlike *. X X Permission granted for C= to include this in C:, or to Fred Fish and Xeveryone else to distribute as much as you want. X X Comments to: Henrik Clausen ...!rutgers!cbmvax!cbmehq!adspdk!hclausen END_OF_FILE if test 914 -ne `wc -c <'ReadMe'`; then echo shar: \"'ReadMe'\" unpacked with wrong size! fi # end of 'ReadMe' fi if test -f 'Star.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Star.c'\" else echo shar: Extracting \"'Star.c'\" \(569 characters\) sed "s/^X//" >'Star.c' <<'END_OF_FILE' X; /* Star.c - set '*' for wildcard character (for "#?") under DOS 2.0 X;Execute this file as a Shell script, and it will compile and link itself. X Xlc -cwus -O -v -j73 Star Xblink from Star.o to Star SmallData SmallCode Xquit X*/ X X#include <exec/types.h> X#include <dos/dosextens.h> X#include <proto/exec.h> X#include <proto/dos.h> X Xvoid star(void) X{ X struct DosLibrary *DOSBase; X struct RootNode *Root; X X if (DOSBase = (struct DOSBase *)OpenLibrary("dos.library", 36)) { X Root = DOSBase->dl_Root; X Root->rn_Flags |= 1 << 24; X CloseLibrary((struct Library *)DOSBase); X } X} END_OF_FILE if test 569 -ne `wc -c <'Star.c'`; then echo shar: \"'Star.c'\" unpacked with wrong size! fi # end of 'Star.c' fi if test -f 'Star.uu' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Star.uu'\" else echo shar: Extracting \"'Star.uu'\" \(156 characters\) sed "s/^X//" >'Star.uu' <<'END_OF_FILE' Xbegin 777 Star XM```#\P`````````!```````````````-```#Z0````TO#D/Z`"1P)"QX``1.E XKKOW82H!G$")`(&D`(@CH````-$ZN_F(L7TYU9&]S+FQI8G)A<GD````#\@1./ X`` Xend Xsize 88 END_OF_FILE if test 156 -ne `wc -c <'Star.uu'`; then echo shar: \"'Star.uu'\" unpacked with wrong size! fi # end of 'Star.uu' 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.misc.