Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!news.larc.nasa.gov!amiga-request From: amiga-request@ab20.larc.nasa.gov (Amiga Sources/Binaries Moderator) Newsgroups: comp.sources.amiga Subject: v91i057: Star - change wildcard character to an asterisk, Part01/01 Message-ID: Date: 14 Mar 91 00:53:48 GMT Reply-To: hclausen@adspdk.UUCP (Henrik Clausen) Lines: 134 Approved: tadguy@uunet.UU.NET (Tad Guy) X-Mail-Submissions-To: amiga@uunet.uu.net X-Post-Discussions-To: comp.sys.amiga.misc 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 '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 X#include X#include X#include 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. Mail comments to the moderator at . Post requests for sources, and general discussion to comp.sys.amiga.misc.