Amiga-Request@cs.odu.edu (Amiga Sources/Binaries Moderator) (03/04/90)
Submitted-by: davids@ucscb.UCSC.EDU (60116000) Posting-number: Volume 90, Issue 099 Archive-name: examples/yafr-1.15 [ uuencoded object module included. ...tad ] #!/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 WdwDefs.h YAFR.c YAFR.o.uu yafrHead.h # Wrapped by tadguy@xanth on Sat Mar 3 22:31:13 1990 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'\" \(1104 characters\) sed "s/^X//" >'README' <<'END_OF_FILE' X YAFR V1.15 X by Dave Schreiber X XYAFR V1.15 Copyright (c)1989,1990 by Dave Schreiber. All rights reserved. XYAFR is freely distributable, and may be sold as part of a commercial Xprogram. This copyright message must be included in the documentation Xfor any program, commercial or otherwise, that uses YAFR. Use of YAFR Xin a rogram does not detract in any way from the ownership of YAFR by Xits author, Dave Schreiber, nor does it change its status as a freely Xdistributable program. Dave Schreiber reserves the right to forbid any Xperson or company from incorporating YAFR as part of a program owned by Xthat person or company. X XWhew! Now, enough of legalize. I'd appreciate hearing from you if you Xuse YAFR in a program that you write, but it isn't a requirement. XInstructions for compiling YAFR and using it in other programs is in Xthe source code, YAFR.c. Enjoy. X X-Dave Schreiber Xdavids@slugmail.ucsc.edu (prefered, but flakey. If it doesn't work, try Xdavids@ucscb.ucsc.edu (during the school year) or Xdavids@cup.portal.com (all other times).) X END_OF_FILE if test 1104 -ne `wc -c <'README'`; then echo shar: \"'README'\" unpacked with wrong size! fi # end of 'README' fi if test -f 'WdwDefs.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'WdwDefs.h'\" else echo shar: Extracting \"'WdwDefs.h'\" \(9877 characters\) sed "s/^X//" >'WdwDefs.h' <<'END_OF_FILE' X Xstruct Window *FNWindow; X#define Rp FNWindow->RPort XUBYTE DIRUNDOBUFFER[150]; XUBYTE FNUNDOBUFFER[33]; XUBYTE EXTUNDOBUFFER[18]; X Xstruct PropInfo SliderSInfo = { X AUTOKNOB+FREEVERT, X -1,661, X 655,655 X}; X Xstruct Image Image1 = { X 0,1, X 15,4, X 0, X NULL, X 0x0000,0x0000, X NULL X}; X Xstruct Gadget Slider = { X NULL, X 217,35, X 23,110, X NULL, X FOLLOWMOUSE, X PROPGADGET, X (APTR)&Image1, X NULL, X NULL, X NULL, X (APTR)&SliderSInfo, X 16, X NULL X}; X XUSHORT chip ImageData2[] = { X 0xFFFF,0xFFFF,0xFFFE,0xC000,0x0000,0x0006,0xC006,0x0007, X 0x0006,0xC000,0x000D,0x8006,0xC00E,0x1F0C,0x0F06,0xC006, X 0x199E,0x1986,0xC006,0x198C,0x1986,0xC606,0x198C,0x1986, X 0xC60F,0x199E,0x0F06,0xC000,0x0000,0x0006,0xFFFF,0xFFFF, X 0xFFFE X}; X Xstruct Image Image2 = { X 0,0, X 47,11, X 2, X ImageData2, X 0x0001,0x0000, X NULL X}; X XUSHORT chip ImageData3[] = { X 0x1FFF,0xFFFF,0xFFF0,0xC000,0x0000,0x0006,0xC006,0x0007, X 0x0006,0xC000,0x000C,0x0006,0xC00E,0x0700,0x0F06,0xC006, X 0x181E,0x1986,0xC006,0x0180,0x1986,0xC600,0x198C,0x1986, X 0xC60F,0x199E,0x0006,0xC000,0x0000,0x0006,0x1FFF,0xFFFF, X 0xFFF0,0xE000,0x0000,0x000E,0x1E00,0x0000,0x00F0,0x01F0, X 0x0000,0x1F00,0x000F,0x8003,0xE000,0x0000,0x783C,0x0000, X 0x0000,0x07C0,0x0000,0x0000,0x783C,0x0000,0x000F,0x8003, X 0xE000,0x01F0,0x0000,0x1F00,0x1E00,0x0000,0x00F0,0xE000, X 0x0000,0x000E X}; X Xstruct Image Image3 = { X 0,0, X 47,11, X 2, X ImageData3, X 0x0003,0x0000, X NULL X}; X Xstruct Gadget Info = { X &Slider, X 165,11, X 47,11, X GADGHIMAGE+GADGIMAGE, X GADGIMMEDIATE+TOGGLESELECT, X BOOLGADGET, X (APTR)&Image2, X (APTR)&Image3, X NULL, X NULL, X NULL, X 18, X NULL X}; X XUBYTE filenameSIBuff[33]; Xstruct StringInfo filenameSInfo = { X filenameSIBuff, X FNUNDOBUFFER, X 0, X 33, X 0, X 0,0,0,0,0, X 0, X 0, X NULL X}; X XSHORT BorderVectors1[] = { X 0,0, X 217,0, X 217,10, X 0,10, X 0,0 X}; Xstruct Border Border1 = { X -2,-1, X 1,0,JAM1, X 5, X BorderVectors1, X NULL X}; X Xstruct Gadget filename = { X &Info, X 86,159, X 214,9, X NULL, X RELVERIFY, X STRGADGET, X (APTR)&Border1, X NULL, X NULL, X NULL, X (APTR)&filenameSInfo, X 12, X NULL X}; X XUBYTE ExtNameSIBuff[18]; Xstruct StringInfo ExtNameSInfo = { X ExtNameSIBuff, X EXTUNDOBUFFER, X 0, X 18, X 0, X 0,0,0,0,0, X 0, X 0, X NULL X}; X XSHORT BorderVectors2[] = { X 0,0, X 155,0, X 155,10, X 0,10, X 0,0 X}; Xstruct Border Border2 = { X -2,-1, X 1,0,JAM1, X 5, X BorderVectors2, X NULL X}; X Xstruct Gadget ExtName = { X &filename, X 86,147, X 152,9, X NULL, X RELVERIFY, X STRGADGET, X (APTR)&Border2, X NULL, X NULL, X NULL, X (APTR)&ExtNameSInfo, X 18, X NULL X}; X XSHORT BorderVectors3[] = { X 0,0, X 89,0, X 89,12, X 0,12, X 0,1 X}; Xstruct Border Border3 = { X -1,-1, X 1,0,JAM1, X 5, X BorderVectors3, X NULL X}; X Xstruct IntuiText IText23 = { X 1,0,JAM1, X 37,2, X NULL, X "Ok", X NULL X}; X Xstruct Gadget ok = { X &ExtName, X 6,172, X 88,11, X NULL, X RELVERIFY, X BOOLGADGET, X (APTR)&Border3, X NULL, X &IText23, X NULL, X NULL, X 13, X NULL X}; X XSHORT BorderVectors4[] = { X 0,0, X 84,0, X 84,10, X 0,10, X 0,1 X}; Xstruct Border Border4 = { X -1,-1, X 1,0,JAM1, X 5, X BorderVectors4, X NULL X}; X Xstruct IntuiText IText24 = { X 1,0,JAM1, X 19,1, X NULL, X "Parent", X NULL X}; X Xstruct Gadget parent = { X &ok, X 218,12, X 83,9, X NULL, X RELVERIFY, X BOOLGADGET, X (APTR)&Border4, X NULL, X &IText24, X NULL, X NULL, X 15, X NULL X}; X XSHORT BorderVectors5[] = { X 0,0, X 89,0, X 89,12, X 0,12, X 0,1 X}; Xstruct Border Border5 = { X -1,-1, X 1,0,JAM1, X 5, X BorderVectors5, X NULL X}; X Xstruct IntuiText IText25 = { X 1,0,JAM1, X 21,2, X NULL, X "Cancel", X NULL X}; X Xstruct Gadget cancel = { X &parent, X 213,172, X 88,11, X NULL, X RELVERIFY, X BOOLGADGET, X (APTR)&Border5, X NULL, X &IText25, X NULL, X NULL, X 14, X NULL X}; X XSHORT BorderVectors6[] = { X 0,0, X 57,0, X 57,10, X 0,10, X 0,1 X}; Xstruct Border Border6 = { X -1,-1, X 1,0,JAM1, X 5, X BorderVectors6, X NULL X}; X Xstruct IntuiText IText26 = { X 1,0,JAM1, X 10,1, X NULL, X "pipe:", X NULL X}; X Xstruct Gadget pipe = { X &cancel, X 245,147, X 56,9, X NULL, X RELVERIFY, X BOOLGADGET, X (APTR)&Border6, X NULL, X &IText26, X NULL, X NULL, X 10, X NULL X}; X XSHORT BorderVectors7[] = { X 0,0, X 57,0, X 57,10, X 0,10, X 0,1 X}; Xstruct Border Border7 = { X -1,-1, X 1,0,JAM1, X 5, X BorderVectors7, X NULL X}; X Xstruct IntuiText IText27 = { X 1,0,JAM1, X 13,1, X NULL, X "RAD:", X NULL X}; X Xstruct Gadget rad = { X &pipe, X 245,135, X 56,9, X NULL, X RELVERIFY, X BOOLGADGET, X (APTR)&Border7, X NULL, X &IText27, X NULL, X NULL, X 9, X NULL X}; X XSHORT BorderVectors8[] = { X 0,0, X 57,0, X 57,10, X 0,10, X 0,1 X}; Xstruct Border Border8 = { X -1,-1, X 1,0,JAM1, X 5, X BorderVectors8, X NULL X}; X Xstruct IntuiText IText28 = { X 1,0,JAM1, X 13,1, X NULL, X "RAM:", X NULL X}; X Xstruct Gadget Ram = { X &rad, X 245,124, X 56,9, X NULL, X RELVERIFY, X BOOLGADGET, X (APTR)&Border8, X NULL, X &IText28, X NULL, X NULL, X 8, X NULL X}; X XSHORT BorderVectors9[] = { X 0,0, X 57,0, X 57,10, X 0,10, X 0,1 X}; Xstruct Border Border9 = { X -1,-1, X 1,0,JAM1, X 5, X BorderVectors9, X NULL X}; X Xstruct IntuiText IText29 = { X 1,0,JAM1, X 13,1, X NULL, X "VDK:", X NULL X}; X Xstruct Gadget vdk = { X &Ram, X 245,113, X 56,9, X NULL, X RELVERIFY, X BOOLGADGET, X (APTR)&Border9, X NULL, X &IText29, X NULL, X NULL, X 7, X NULL X}; X XSHORT BorderVectors10[] = { X 0,0, X 57,0, X 57,10, X 0,10, X 0,1 X}; Xstruct Border Border10 = { X -1,-1, X 1,0,JAM1, X 5, X BorderVectors10, X NULL X}; X Xstruct IntuiText IText30 = { X 1,0,JAM1, X 13,1, X NULL, X "VD0:", X NULL X}; X Xstruct Gadget vd0 = { X &vdk, X 245,102, X 56,9, X NULL, X RELVERIFY, X BOOLGADGET, X (APTR)&Border10, X NULL, X &IText30, X NULL, X NULL, X 6, X NULL X}; X XSHORT BorderVectors11[] = { X 0,0, X 57,0, X 57,10, X 0,10, X 0,1 X}; Xstruct Border Border11 = { X -1,-1, X 1,0,JAM1, X 5, X BorderVectors11, X NULL X}; X Xstruct IntuiText IText31 = { X 1,0,JAM1, X 13,1, X NULL, X "DH2:", X NULL X}; X Xstruct Gadget dh2 = { X &vd0, X 245,91, X 56,9, X NULL, X RELVERIFY, X BOOLGADGET, X (APTR)&Border11, X NULL, X &IText31, X NULL, X NULL, X 5, X NULL X}; X XSHORT BorderVectors12[] = { X 0,0, X 57,0, X 57,10, X 0,10, X 0,1 X}; Xstruct Border Border12 = { X -1,-1, X 1,0,JAM1, X 5, X BorderVectors12, X NULL X}; X Xstruct IntuiText IText32 = { X 1,0,JAM1, X 13,1, X NULL, X "DH1:", X NULL X}; X Xstruct Gadget dh1 = { X &dh2, X 245,80, X 56,9, X NULL, X RELVERIFY, X BOOLGADGET, X (APTR)&Border12, X NULL, X &IText32, X NULL, X NULL, X 4, X NULL X}; X XSHORT BorderVectors13[] = { X 0,0, X 57,0, X 57,10, X 0,10, X 0,1 X}; Xstruct Border Border13 = { X -1,-1, X 1,0,JAM1, X 5, X BorderVectors13, X NULL X}; X Xstruct IntuiText IText33 = { X 1,0,JAM1, X 13,1, X NULL, X "DF2:", X NULL X}; X Xstruct Gadget df2 = { X &dh1, X 245,58, X 56,9, X NULL, X RELVERIFY, X BOOLGADGET, X (APTR)&Border13, X NULL, X &IText33, X NULL, X NULL, X 2, X NULL X}; X XSHORT BorderVectors14[] = { X 0,0, X 57,0, X 57,10, X 0,10, X 0,1 X}; Xstruct Border Border14 = { X -1,-1, X 1,0,JAM1, X 5, X BorderVectors14, X NULL X}; X Xstruct IntuiText IText34 = { X 1,0,JAM1, X 13,1, X NULL, X "DH0:", X NULL X}; X Xstruct Gadget dh0 = { X &df2, X 245,69, X 56,9, X NULL, X RELVERIFY, X BOOLGADGET, X (APTR)&Border14, X NULL, X &IText34, X NULL, X NULL, X 3, X NULL X}; X XSHORT BorderVectors15[] = { X 0,0, X 57,0, X 57,10, X 0,10, X 0,1 X}; Xstruct Border Border15 = { X -1,-1, X 1,0,JAM1, X 5, X BorderVectors15, X NULL X}; X Xstruct IntuiText IText35 = { X 1,0,JAM1, X 13,1, X NULL, X "DF1:", X NULL X}; X Xstruct Gadget df1 = { X &dh0, X 245,47, X 56,9, X NULL, X RELVERIFY, X BOOLGADGET, X (APTR)&Border15, X NULL, X &IText35, X NULL, X NULL, X 1, X NULL X}; X XSHORT BorderVectors16[] = { X 0,0, X 57,0, X 57,10, X 0,10, X 0,1 X}; Xstruct Border Border16 = { X -1,-1, X 1,0,JAM1, X 5, X BorderVectors16, X NULL X}; X Xstruct IntuiText IText36 = { X 1,0,JAM1, X 13,1, X NULL, X "DF0:", X NULL X}; X Xstruct Gadget df0 = { X &df1, X 245,36, X 56,9, X NULL, X RELVERIFY, X BOOLGADGET, X (APTR)&Border16, X NULL, X &IText36, X NULL, X NULL, X 0, X NULL X}; X XSHORT BorderVectors17[] = { X 0,0, X 207,0, X 207,109, X 0,109, X 0,0 X}; Xstruct Border Border17 = { X -2,-1, X 1,0,JAM1, X 5, X BorderVectors17, X NULL X}; X Xstruct Gadget filenamebox = { X &df0, X 6,36, X 204,108, X GADGHBOX+GADGHIMAGE, X GADGIMMEDIATE, X BOOLGADGET, X (APTR)&Border17, X NULL, X NULL, X NULL, X NULL, X 17, X NULL X}; X XUBYTE DirNameSIBuff[150]; Xstruct StringInfo DirNameSInfo = { X DirNameSIBuff, X DIRUNDOBUFFER, X 0, X 150, X 0, X 0,0,0,0,0, X 0, X 0, X NULL X}; X XSHORT BorderVectors18[] = { X 0,0, X 297,0, X 297,10, X 0,10, X 0,0 X}; Xstruct Border Border18 = { X -2,-1, X 1,0,JAM1, X 5, X BorderVectors18, X NULL X}; X Xstruct Gadget DirName = { X &filenamebox, X 6,24, X 294,9, X NULL, X RELVERIFY, X STRGADGET, X (APTR)&Border18, X NULL, X NULL, X NULL, X (APTR)&DirNameSInfo, X 11, X NULL X}; X X#define GadgetList2 DirName X Xstruct IntuiText IText39 = { X 1,0,JAM1, X 6,148, X NULL, X "Extension", X NULL X}; X Xstruct IntuiText IText38 = { X 1,0,JAM1, X 6,159, X NULL, X "Filename", X &IText39 X}; X Xstruct IntuiText IText37 = { X 1,0,JAM1, X 5,13, X NULL, X "Directory", X &IText38 X}; X X#define IntuiTextList2 IText37 X Xstruct NewWindow NewFNWindow = { X 6,9, X 307,187, X 0,1, X MOUSEMOVE+GADGETDOWN+GADGETUP, X WINDOWDRAG+ACTIVATE, X &DirName, X NULL, X "Enter filename", X NULL, X NULL, X 5,5, X 640,200, X WBENCHSCREEN X}; END_OF_FILE if test 9877 -ne `wc -c <'WdwDefs.h'`; then echo shar: \"'WdwDefs.h'\" unpacked with wrong size! fi # end of 'WdwDefs.h' fi if test -f 'YAFR.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'YAFR.c'\" else echo shar: Extracting \"'YAFR.c'\" \(22101 characters\) sed "s/^X//" >'YAFR.c' <<'END_OF_FILE' X/*- - - - - - - - - - YAFR - Yet Another File Requester - - - - - - - - -*/ X/*- - - - - - - - - - - - - - Version 1.15 - - - - - - - - - - - - - - -*/ X X/*YAFR V1.15 Copyright (c)1989,1990 by Dave Schreiber. All rights reserved.*/ X/*YAFR is freely distributable, and may be sold as part of a commercial */ X/*program. This copyright message must be included in the documentation */ X/*for any program, commercial or otherwise, that uses YAFR. Use of YAFR */ X/*in a rogram does not detract in any way from the ownership of YAFR by */ X/*its author, Dave Schreiber, nor does it change its status as a freely */ X/*distributable program. Dave Schreiber reserves the right to forbid any*/ X/*person or company from incorporating YAFR as part of a program owned by*/ X/*that person or company. */ X X/*Compiled under Lattice C V5.04 */ X/*Command line: 1> lc -cw -j30 yafr */ X/*Generates YAFR.o which is linked into the host program */ X X/*If you have any comments, suggestions, etc. I can be reached at: */ X/*Dave Schreiber */ X/*1234 Collins Lane */ X/*San Jose, CA 95129-4208 */ X/*Usenet: davids@ucscb.ucsc.edu (during the school year) */ X/* davids@cup.portal.com (other times) */ X X#include "yafrHead.h" X /*^^^^system includes, structure definitions, etc.*/ X#define CRNT header.current->fib X X/*Parameters are: fn-string for filename (33 characters) */ X/*dn-string for directory name (150 characters) */ X/*en-string for filename extension (.c, .pic, etc. 18 characters) */ X/*cn-string for combined directory and filename (183 characters) */ X/*(NULL if you don't want the combined filename) */ X/*X,Y-YAFR's window's X,Y location (relative to the screen */ X/*wn-text for YAFR's window's title bar */ X/*scr-Pointer to screen that window should appear on (NULL for */ X/*Workbench) filepen-Pen color that filenames should be displayed in */ X/*dirpen-Pen color that directory names should be displayed in */ X/*DisableInfo-Boolean; TRUE-files ending in .info aren't displayed */ X/* FALSE-.info files are displayed */ X X/*Note! IntuitionBase, GfxBase, and DOSBase must be opened by the */ X/*calling program before YAFR is called. DOSBase is usually opened by */ X/*the C startup code, but the other aren't. If they aren't, YAFR will */ X/*crash! Be warned. */ X X/*Version 1.1, completed October 30, 1989*/ X/*Directory and filename string gadgets now auto-activate and appropriate*/ X/*times. A bug that caused an incorrect filename to be returned when the*/ X/*user pressed CANCEL has been fixed */ X X/*Version 1.15 completed January 23, 1990*/ X/*A bug that could cause the name of a directory to run outside the */ X/*filename box has been eliminated. Also, device names are now converted*/ X/*into volume names when selected from the device name buttons on the */ X/*right (ex. on my system, when DH2: is pressed, Data: is the name that */ X/*appears in the directory box. The source code has had many more */ X/*comments added to it and there are new distribution requirements. */ X X/*Thanks to Bruce Rogers for his FindRoot program which has been */ X/*incorporated in YAFR. */ X X/*-----------------------------------------------------------------------*/ X X/*Main function. This is what is called by the host program:*/ XGetFilename(fn,dn,en,cn,X,Y,wn,scr,filepen,dirpen,DisableInfo) Xchar *fn,*dn,*en,*cn,*wn; /*See above for parameter definitions*/ XUSHORT X,Y,filepen,dirpen; XBYTE DisableInfo; Xstruct Screen *scr; X{ X int status=GN_NEWDIR; X struct FileLock *DirLock; X X if(DisableInfo) X Info.Flags|=SELECTED; X else X Info.Flags=GADGHIMAGE|GADGIMAGE; X X yafr_e_FilenamePenColor = filepen; X yafr_e_DirnamePenColor = dirpen; X DirLock=(struct FileLock *)Lock(dn,ACCESS_READ); X /*Get lock on first directory*/ X X strcpy(DirNameSIBuff,dn); /*Copy some parameters to this modules*/ X strcpy(ExtNameSIBuff,en); /*variables*/ X strcpy(filenameSIBuff,fn); X NewFNWindow.LeftEdge=X; X NewFNWindow.TopEdge=Y; X NewFNWindow.Title=(char *)wn; X NewFNWindow.Screen=(struct Screen *) scr; X X /*If there's a screen, open on it. Workbench screen otherwise*/ X NewFNWindow.Type= (scr) ? CUSTOMSCREEN : WBENCHSCREEN; X X /*Open the window*/ X if((FNWindow=(struct Window *)OpenWindow(&NewFNWindow))==NULL) X { /*If it failed...*/ X UnLock(DirLock); /*Unlock the directory*/ X return(FALSE); /*and return*/ X } X X /*Write some important text into the title bar: */ X SetWindowTitles(FNWindow,-1,"YAFR V1.15 (c)1989 by Dave Schreiber"); X X SetAPen(FNWindow->RPort,1); X Move(FNWindow->RPort,6,19); X Text(FNWindow->RPort,"Directory",9); X Move(FNWindow->RPort,6,154); X Text(FNWindow->RPort,"Extension",9); X Move(FNWindow->RPort,6,165); X Text(FNWindow->RPort,"Filename",8); X X /*Activate the directory string gadget, for user's convenience*/ X /*Note! Window must be active for ActivateGadget to work on a*/ X /*string window! Take this into account in writing your own code.*/ X /*I had to learn the hard way...:-( */ X ActivateGadget(&DirName,FNWindow,NULL); X X /*Main loop: While requests for reading a new directory keep coming in...*/ X while((status = GetName(DirLock)) == GN_NEWDIR) X { /*keep doing it...*/ X UnLock(DirLock); /*Transfer lock to new directory*/ X RefreshGadget(&DirName,FNWindow,NULL); X DirLock=(struct FileLock *)Lock(DirNameSIBuff,ACCESS_READ); X ActivateGadget(&filename,FNWindow,NULL); /*Activate filename gadget*/ X } /*Loop back, read the new directory, and wait for input again*/ X X UnLock(DirLock); /*Or we could be finished*/ X if(status) /*If OK pressed...*/ X { X strcpy(fn,filenameSIBuff); /*Setup the return parameters*/ X strcpy(dn,DirNameSIBuff); X strcpy(en,ExtNameSIBuff); X if(cn) /*If cn isn't NULL, there's space for a string, so...*/ X { /*construct the full filename for the host*/ X strcpy(cn,DirNameSIBuff); X if( (dn[strlen(dn)-1] != ':') && strlen(dn) ) X strcat(cn,"/"); X strcat(cn,filenameSIBuff); X } X } X X CloseWindow(FNWindow); /*Close the window*/ X return(status); /*and return*/ X} X XGetName(Lock) /*Gets filenames in the directory associated with the*/ Xstruct FileLock *Lock; /*lock, and also gets user input*/ X{ X struct fibHeader header; X int status3,status2,status; X USHORT FNNumber=0; X X header.first=header.directory=NULL; X if(GetFib(&header)==FALSE) X return(FALSE); X SliderSInfo.VertPot=0; X UpdateSlider(1,&SliderSInfo,&Slider); X ClearFileBox(); X if(!ispipedevice(DirNameSIBuff)) /*Check for pipe: device*/ X if(Lock!=NULL) /*If the lock (& the directory) exist...*/ X { X Examine(Lock,&(CRNT)); /*Get the first entry*/ X if(GetFib(&header)==FALSE) /*Get next node*/ X return(NULL); X while((status3=ExNext(Lock,&(CRNT)))) /*Loop while there are files*/ X { X if((status2=((CheckExt(CRNT.fib_FileName,ExtNameSIBuff) || X CRNT.fib_DirEntryType > 0) && /*If the specified extension*/ X CheckInfo(CRNT.fib_FileName)) )) /*(if any) matches and*/ X { /*it isn't a .info file (if masked)*/ X if(FNNumber<10) /*display it...*/ X PrintFileName(&(CRNT),Rp,XBorder,YBorder+(10*FNNumber++)); X else /*or update the slider (if the filename box is full)*/ X UpdateSlider(++FNNumber,&SliderSInfo,&Slider); X } X while((status=CheckIntuiMessages(FNNumber,&header))!=GN_DONE) X { /*After getting a name, checked for IDCMP messages*/ X if(status==GN_PARENT) /*If PARENT was pressed*/ X { X Parentize(DirNameSIBuff); /*Setup the parent dir*/ X RefreshGadget(&DirName,FNWindow,NULL); X FreeFuncMemory(header.directory); /*Free the filename*/ X return(GN_NEWDIR); /*list and return*/ X } X if(status < GN_PARENT) X { X FreeFuncMemory(header.directory); X return(status); /*For OK,NEWDIR, & CANCEL*/ X } X } X if(status2) /*If the filename was valid, append another Fib*/ X if(GetFib(&header)==FALSE) /*structure for the next filename*/ X return(NULL); X /*If not valid, let the next filename info overwrite the current*/ X /*Fib*/ X } X header.current->prev->next=NULL; /*Delete the last (unused) Fib*/ X if(header.directory->next == header.current) /*If no files*/ X header.directory->next=header.first=header.last= X header.top=NULL; /*NULL certain pointers*/ X FreeMem(header.current,sizeof(struct fibNode)); X } X for(;;) /*Loop until the users says 'Change something!'*/ X { X Wait(1<<FNWindow->UserPort->mp_SigBit); X while((status=CheckIntuiMessages(FNNumber,&header))!=GN_DONE) X { X if(status==GN_PARENT) /*PARENT pushed*/ X if(Parentize(DirNameSIBuff)) X { X RefreshGadget(&DirName,FNWindow,NULL); X FreeFuncMemory(header.directory); X return(GN_NEWDIR); X } X if(status < GN_PARENT) /*Something else pushed*/ X { X FreeFuncMemory(header.directory); X return(status); /*For OK,NEWDIR, & CANCEL*/ X } X } X } X} X XCheckInfo(name) /*Check to see if .info's should be printed*/ Xchar *name; X{ X if(!(Info.Flags & SELECTED)) X return(TRUE); X X return(!(strcmp(&name[strlen(name)-5],".info")==0)); X} X XClearFileBox() /*Clear the box with the filenames in it*/ X{ X SetAPen(Rp,0); X RectFill(Rp,XBorder,YBorder-6,(25*8)+XBorder,YBorder+(100)-4); X SetAPen(Rp,1); X} X XParentize(str) /*Convert a directory identifier string into the one*/ Xchar *str; /*for its parent directory*/ X{ X int c; X X if(str[strlen(str)-1]==':') /*If ':' is the last character*/ X return(FALSE); /*We're at the root, and cannot back up*/ X for(c=strlen(str)-1;c >= 0;c--) X if(str[c]=='/') /*Delete last '/' & everything after that*/ X { X str[c]=NULL; X c=0; X } X else X if(str[c]==':') /*Or delete everything after the ':'*/ X { /*(which leaves the root)*/ X str[c+1]=NULL; X c=0; X } X return(TRUE); X} X XUpdateSlider(Amt,Info,Gadgt) /*Update the slider bar to reflect*/ XUSHORT Amt; /*the number of file/dir names available for selection*/ Xstruct PropInfo *Info; Xstruct Gadget *Gadgt; X{ X Info->VertBody=((0xFFFF*10)/Amt); X RefreshGadgets(Gadgt,FNWindow,NULL); X} X XCheckIntuiMessages(Max,header) /*Check and respond to the window's IDCMP*/ XUSHORT Max; /*messages*/ Xstruct fibHeader *header; X{ X struct fibNode *cur; X UBYTE c,line; X struct IntuiMessage *mesg; X struct Gadget *InUse; X ULONG Class; X USHORT Code; X SHORT X,Y; X X /*Assumes that the calling function has either Wait()ed or wants to*/ X /*handle any IDCMP messages that have piled up*/ X X while((mesg=(struct IntuiMessage *)GetMsg(FNWindow->UserPort))!=NULL) X { X InUse=(struct Gadget *)mesg->IAddress; X X=mesg->MouseX; X Y=mesg->MouseY; X Class=mesg->Class; X Code=mesg->Code; X ReplyMsg(mesg); /*Reply to the message*/ X switch(Class) /*Decide what happened*/ X { X case MOUSEMOVE: /*If the mouse moved, then the silder is down, so*/ X if(Max > 10) /*update the filenames in the box to reflect the*/ X UpdateList(SliderSInfo.VertPot,Max,header); /*slider's*/ X break; /*position*/ X case GADGETUP: X if(InUse->GadgetID <= 10) X { /*One of the device gadgets was pushed*/ X if(!ispipedevice(InUse->GadgetText->IText)) X { /*Find the volume name if it isn't the PIPE:*/ X MakeAbsName(InUse->GadgetText->IText); X strcpy(DirNameSIBuff,absDirName); X strcat(DirNameSIBuff,":"); X } X else X strcpy(DirNameSIBuff,InUse->GadgetText->IText); X RefreshGadget(&DirName,FNWindow,NULL); X return(GN_NEWDIR); X } X switch(InUse->GadgetID) X { X case 14: /*CANCEL was pushed*/ X return(GN_CANCEL); X case 12: X case 13: /*OK was pushed or return was pressed in the*/ X return(GN_OK); /*filename's box*/ X case 15: X return(GN_PARENT); /*PARENT was pushed*/ X case 11: /*Return was pushed while the extension or dirname*/ X case 18: /*box was active, so reread the old directory or read*/ X return(GN_NEWDIR); /*a new one*/ X } X return(GN_RIEN); /*Nothing important*/ X break; X case GADGETDOWN: /*The .info gadget was pressed?*/ X if(InUse->GadgetID == 18) X return(GN_NEWDIR); X X /*A file/dir name in the box was clicked on*/ X if(!ispipedevice(DirNameSIBuff)) /*If the pipe:*/ X { /*don't try & get a filename*/ X line=(Y-YBorder+7)/10; /*Get line clicked on*/ X for(c=0,cur=(struct fibNode *)header->top;c!=line && cur!=NULL;c++) X cur=(struct fibNode *)cur->next; /*Find the file's Fib*/ X if(cur != NULL) /*If the file exists*/ X if(cur->fib.fib_DirEntryType > 0) X { /*It's a directory, so read that directory*/ X if(DirNameSIBuff[strlen(DirNameSIBuff)-1] != ':') X strcat(DirNameSIBuff,"/"); X strcat(DirNameSIBuff,cur->fib.fib_FileName); X RefreshGadget(&DirName,FNWindow,NULL); X return(GN_NEWDIR); X } X else /*otherwise, return the filename clicked upon*/ X { X strcpy(filenameSIBuff,cur->fib.fib_FileName); X RefreshGadget(&filename,FNWindow,NULL); X } X } X } X } X return(GN_DONE); /*All done...*/ X} X XUpdateList(Pos,Num,header) /*Update filenames in the filename box*/ XUSHORT Pos; /*According to the slider's position*/ XUSHORT Num; Xstruct fibHeader *header; X{ X static USHORT LastFirstItem=30000; X ULONG FirstItem; X FirstItem=(((Pos+1)*(Num-10)) >> 16); X X if( FirstItem != LastFirstItem) X RewriteList(FirstItem,header); X LastFirstItem=FirstItem; X} X XRewriteList(First,header) /*Rewrite the list of filenames in the*/ XUSHORT First; /*filename box...*/ Xstruct fibHeader *header; X{ X register struct fibNode *node; X register USHORT c,Y; X X if(First) /*If we're not starting at the start...*/ X for(c=0,node=(struct fibNode *)header->first;c < First;c++) X node=(struct fibNode *)node->next; /*Get the first filename*/ X else /*Otherwise, start at the top*/ X node=(struct fibNode *)header->first; X header->top=(struct fibNode *)node; X X /*Print the filenames (up to 10)*/ X for(c=0,Y=YBorder;(c < 10) && (node!=NULL); X c++,Y+=10,node=(struct fibNode *)node->next) X PrintFileName(&(node->fib),Rp,XBorder,Y); X} X XCheckExt(name,ext) /*Check to see if 'name' has the extension '.ext'*/ Xchar *name,*ext; X{ X if(strlen(name) >= strlen(ext)) X if(strcmp(&name[strlen(name)-strlen(ext)],ext)==0) X return(TRUE); X return(FALSE); X} X XGetFib(header) Xstruct fibHeader *header; X{ X header->last=(struct fibNode *)header->current; X if((header->current=(struct fibNode *) /*Allocate a FIB structure*/ X AllocMem(sizeof(struct fibNode),MEMF_PUBLIC|MEMF_CLEAR))==NULL) X { X FreeFuncMemory(header->current); /*Whoops, it didn't work...*/ X return(FALSE); X } X if(header->directory==NULL) /*Must want it for a directory...*/ X header->directory=(struct fibNode *)header->current; X else /*Append to the current FIB list*/ X { X if(header->first==NULL) X { X header->directory->next=header->first=header->last=header->top= X (struct fibNode *)header->current; X CopyFIB(&(header->directory->fib),&(header->current->fib)); X } X else X { X CopyFIB(&(header->last->fib),&(header->current->fib)); X header->last->next=(struct fibNode *)header->current; X header->current->prev=(struct fibNode *)header->last; X } X } X return(TRUE); X} X XCopyFIB(from,to) /*Copy a fileinfoblock from 'from' to 'to'*/ Xstruct FileInfoBlock *from,*to; X{ X to->fib_DiskKey=from->fib_DiskKey; X to->fib_DirEntryType=from->fib_DirEntryType; X to->fib_Protection=from->fib_Protection; X to->fib_EntryType=from->fib_EntryType; X to->fib_Size=from->fib_Size; X to->fib_NumBlocks=from->fib_NumBlocks; X strcpy(to->fib_FileName,from->fib_FileName); X strcpy(to->fib_Comment,from->fib_Comment); X to->fib_Date.ds_Days=from->fib_Date.ds_Days; X to->fib_Date.ds_Minute=from->fib_Date.ds_Minute; X to->fib_Date.ds_Tick=from->fib_Date.ds_Tick; X X return(TRUE); X} X XPrintFileName(fib,RPrt,X,Y) /*Print a filename in the filename box*/ Xstruct FileInfoBlock *fib; Xstruct RPort *RPrt; XUSHORT X,Y; X{ X UWORD len; X char name[40]; X X strcpy(name,fib->fib_FileName); X if(fib->fib_DirEntryType > 0) /*Set the pen color, according to whether*/ X { /*we're printing a filename or a directory name*/ X SetAPen(RPrt,yafr_e_DirnamePenColor); X strcat(name," (dir)"); /*Append ' (dir)' if it's a directory*/ X } X else X SetAPen(RPrt,yafr_e_FilenamePenColor); X Move(RPrt,X,Y); X Text(RPrt," ",25); /*Blank out the space*/ X Move(RPrt,X,Y); X len = (strlen(fib->fib_FileName)<=25) ? strlen(fib->fib_FileName) : 25; X Text(RPrt,fib->fib_FileName,len); /*Trundicate the filename at 25 chars*/ X /*and print it.*/ X} X XRefreshGadget(Gadg,Wdw,Req) /*Refresh a specific gadget*/ Xstruct Gadget *Gadg; /*(keeps RefreshGadgets() from refreshing*/ Xstruct Window *Wdw; /*the entire gadget list*/ Xstruct Req *Req; X{ X struct Gadget *next; X next=(struct Gadget *)Gadg->NextGadget; X Gadg->NextGadget=NULL; X RefreshGadgets(Gadg,Wdw,Req); X Gadg->NextGadget=(struct Gadget *)next; X return(TRUE); X} X XFreeFuncMemory(first) /*Free the memory taken up by a fib list*/ Xregister struct fibNode *first; X{ X register struct fibNode *next,*current; X next=(struct fibNode *)first->next; X FreeMem(first,sizeof(struct fibNode)); X while((current=(struct fibNode *)next)!=NULL) X { X next=(struct fibNode *)current->next; X FreeMem(current,sizeof(struct fibNode)); X } X} X Xispipedevice(device) /*Checks to see if the device is the PIPE:*/ Xchar *device; X{ X char temp[6]; X int c; X for(c=0;c<5;c++) /*Convert weird capitalization (pIPe:) to pipe:*/ X temp[c]=tolower(device[c]); /*So as to make it easy to check*/ X temp[5]=NULL; X if(strcmp(device,"pipe:")==0) X return(TRUE); X else X return(FALSE); X} X X/*!******************************************************************* X * FindRoot by Bruce Rogers 1/20/90 X *********************************************************************/ X X/*!******************************************************************* X * Kludges disk:name/directory with filename so we can just read it. X *********************************************************************/ Xvoid DosConcatenate(string1,string2,result) Xchar string1[],string2[],result[]; X{ Xshort i,j; X X for(i=0; string1[i] != '\0'; i++) X result[i]=string1[i]; X if ((result[i-1] != ':') && (result[i-1] != '/') && (i!=0) && string2[0]!=0) X { X result[i]='/'; X ++i; X } X for(j=0; string2[j] != '\0'; j++) X result[i+j] = string2[j]; X result[i+j] = '\0'; X} X X/*!******************************************************************* X * Recursively go up parent chain, looking for oldest parent. X * Create the absolute path string as we go. X *********************************************************************/ XSeekRoot(oldlock) XULONG oldlock; X{ Xshort i; Xstruct FileInfoBlock fileInfo; XULONG newlock; X X Examine(oldlock,&fileInfo); X DosConcatenate(fileInfo.fib_FileName,absDirName,absDir); X for(i=0;i<MAXPATHSTRING;i++) absDirName[i]=absDir[i]; X newlock=ParentDir(oldlock); X UnLock(oldlock); X oldlock=newlock; X if (oldlock!=NULL) SeekRoot(oldlock); X} X X/*!******************************************************************* X * Given a path, sets absDirName equal to the absolute path X *********************************************************************/ X MakeAbsName(dirName) Xchar *dirName; X{ Xshort i; XULONG lock; X X for(i=0;i<MAXPATHSTRING;i++) absDirName[i]=absDir[i]=0; X lock=Lock(dirName,ACCESS_READ); X if (lock==NULL) return; X SeekRoot(lock); X for(i=0;i<MAXPATHSTRING;i++) X { X if (absDirName[i]=='/') X { X absDirName[i]=':'; X break; X } X } X} X X/*End of YAFR.c*/ END_OF_FILE if test 22101 -ne `wc -c <'YAFR.c'`; then echo shar: \"'YAFR.c'\" unpacked with wrong size! fi # end of 'YAFR.c' fi if test -f 'YAFR.o.uu' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'YAFR.o.uu'\" else echo shar: Extracting \"'YAFR.o.uu'\" \(14257 characters\) sed "s/^X//" >'YAFR.o.uu' <<'END_OF_FILE' Xbegin 664 YAFR.o XM```#YP````)90492+F,``````^D```-=3E7_^+_L``!E````2.<',"9M``@D* XM;0`,/BT`&CPM`!XZ+0`J<`$K0/_\2BT`,V<.,"P`B@!``(`Y0`"*8`8Y?``&6 XM`(HY10&6.6T`+@&82'C__B\*3KH``"Z*2&P!`"M`__A.N@``+JT`$$AL`.Y.\ XMN@``+HM(;`#-3KH``$_O`!0@!SE`"(X@!CE`")`I;0`@"*@@;0`D*4@(K"`(? XM9P1P#V`"<`$Y0`B\2&P(CDZZ``!83RE```!*@&8.+RW_^$ZZ``!P`&```89(4 XM;`B^2'C__R\L``!.N@``2'@``2!L```O*``R3KH``$AX`!-(>``&(&P``"\HM XM`#).N@``2'@`"4AL".(@;```+R@`,DZZ``!(>`":2'@`!B!L```O*``R3KH`[ XM`$AX``E(;`CL(&P``"\H`#).N@``3^\`1$AX`*5(>``&(&P``"\H`#).N@``8 XM2'@`"$AL"/8@;```+R@`,DZZ``!"ER\L``!(;`?X3KH``$_O`"`O+?_X80``8 XMVEA/*T#__%.`9CHO+?_X3KH``$*7+RP``$AL!_AA``F*2'C__DAL`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``'``,`=R`#(&+H$O`"\*3KH``$'K``@NB$ZZ``!/[P`@<AFP@6X.0>L`L XM""\(3KH``%A/8`)P&2H`0>L`"'``,`4O`"\(+PI.N@``3.T,X/_`3EU.=4Y5X XM__R_[```90```$CG`#`F;0`()&T`#"M3__Q"DR\M`!`O"B\+3KH``":M__QP5 XM`4SM#`#_]$Y=3G5.5?_XO^P``&4```!(YP`P)FT`""1K`01(>`$,+PM.N@``N XM4$\@2BM(__@@"&<2)&@!!$AX`0PO"$ZZ``!03V#D3-\,`$Y=3G5.5?_TO^P`Z XM`&4```!(YP$0)FT`"'X`<`6^@&P8$#-X`$B`2,`O`$ZZ``!83QN`>/I2AV#B& XM0BW__TAL"3`O"TZZ``!03TJ`9@1P`6`"<`!,WPB`3EU.=4Y5__R_[```90``! XM`$CG`S`F;0`()&T`#'X`2C-P`&<.(&T`$!&S<`!P`%)'8.P@!TC`<CH@;0`08 XMLC`(_V<:(`=(P'(OLC`(_V<.2D=G"DH29P81@7``4D=\`$HR8`!G&"`'2,`BF XM!DC!T($@;0`0$;)@``@`4D9@XB`'2,`B!DC!T($@;0`00C`(`$S?#,!.74YUO XM3E7^]+_L``!E````2.<'`"XM``A(;?[Z+P=.N@``2&P!FDAL`B9(;?\"80#_J XM0D_O`!1\``Q&`(QL$D'L`9I#[`(F$[!@`&``4D9@Z"\'3KH``"H`+H=.N@``3 XM6$\N!4J'9P8O!V&:6$],WP#@3EU.=;_L``!E````2.<#$"9O`!!^``Q'`(QLI XM%G``0>P!FA&`<`!![`(F$8!P`%)'8.1(>/_^+PM.N@``4$\L`$J&9RPO!F$`% XM_TQ83WX`#$<`C&P<<"]![`(FL#!P`&8,0>P")A&\`#IP`&`$4D=@WDS?",!.5 XM=0`````#^````"4````!```+X@``"LH```J2```(6@``"$8```?X```'V```! XM![0```;<```&K@``!EP```32```$N```!'P```.J```#<````VP```*4```"L XMD````HP```(F```!L@```9@```%L```!5@```2H```$"````R@```*H```"F> XM````F````)````"*````A````$(````Z````,@```#T````"```-7@``#50`O XM``TD```-'```#-````S,```,M```#+````JF```*A@``"*X```?T```'Z@``L XM!]0```?*```'N```!ZH```>>```'2```!M@```;,```&L@``!J8```:B```%1 XM^@``!<X```4D```%%```!/@```1X```$:```!#````.F```#G````U(```+\" XM```"I````D(```(T```!_@```>@```'>```!U````:X```&D```!E````6@`. XM``%:```!1@```2X```$:```!!@```/(```#>````T@```+0```!V````;```K XM`%P```!,````1@````````/OA@```E]?8F%S90``````$P``#0(```R6```,1 XM!```"ZX```MF```++```"E````G:```).@``"-8```AD```(%```!>8```6:5 XM```%-@``!.X```2J```"7`````:#```"7U]X8V]V9@`````3```-!@``#)H`T XM``P(```+L@``"VH```LP```*5```"=X```D^```(V@``"&@```@8```%Z@``N XM!9X```4Z```$\@``!*X```)@````"H,```)?3&]C:P````````,```TV```!J XMJ````%:#```"7W-T<F-P>0`````-```*=@``"BH```H:```'[@``!M````:JG XM```"!@```?````'D```!V@```'H```!P````9(,```-?3W!E;E=I;F1O=P``V XM```!````KH,```)?56Y,;V-K``````0```SH```!R````8X```#`@P``!%]3H XM9717:6YD;W=4:71L97,````!````UH,```)?4V5T05!E;@````4```JN```*8 XMC@``!2P```4`````YH,```)?36]V90````````4```KB```*P@```4X```$B4 XM````^H,```)?5&5X=`````````4```L:```*T````6(```$V```!#H,```1?6 XM06-T:79A=&5'861G970``````@```;H```%P@P```E]S=')L96X`````#```S XM"P````KL```)$```"08```CV```([```!Z(```5<```%2```!,@```(<```"> XM#(,```)?<W1R8V%T``````8```J:```'S@``![P```:V```"/````BZ#```#S XM7T-L;W-E5VEN9&]W`````0```D:#```"7T5X86UI;F4````"```,K````L2#$ XM```"7T5X3F5X=``````!```"YH,```)?1G)E94UE;0````,```N:```+@```> XM!"J#```"7U=A:70````````!```$1(,```)?<W1R8VUP``````,```OH```)L XM(@``!-B#```#7U)E8W1&:6QL`````````0``!1R#```"7U]#6$0S,P`````"D XM```'9```!<2#```$7U)E9G)E<VA'861G971S``````(```M.```%U(,```)?` XM1V5T37-G``````$```8"@P```U]297!L>4US9P````````$```8T@P```E]?F XM0UA-,S,``````0``"#J#```#7T%L;&]C365M`````````0``"5B#```"7W1OI XM;&]W97(````!```+T(,```-?4&%R96YT1&ER```````!```,X`$```-?1V5TC XM1FEL96YA;64``````0```E]'971.86UE```"5@$```-?0VAE8VM);F9O````) XM``2H`0``!%]#;&5A<D9I;&5";W@```````3L`0```U]087)E;G1I>F4`````E XM!30!```$7U5P9&%T95-L:61E<@``````!90!```%7T-H96-K26YT=6E-97-S@ XM86=E<P````7@`0```U]5<&1A=&5,:7-T````"!(!```#7U)E=W)I=&5,:7-TB XM```(8@$```-?0VAE8VM%>'0```````C0`0```E]'971&:6(````).`$```)?J XM0V]P>49)0@``"=@!```$7U!R:6YT1FEL94YA;64`````"DH!```$7U)E9G)EK XM<VA'861G970`````"R8!```$7T9R965&=6YC365M;W)Y````"V`!```$7VESN XM<&EP961E=FEC90``````"Z@!```$7T1O<T-O;F-A=&5N871E````"_X!```#- XM7U-E96M2;V]T```````,D`$```-?36%K94%B<TYA;64```T``````````_(`A XM``/H`````E]?34521T5$```#Z@```DX`!?__`I4"CP*/````````````````8 XM`````0`/``0``````````````````````-D`(P`7`&X````(``,````6````V XM```````````````````0````````````+P`+``(``````0`````````````O\ XM``L``@```$(#```````````J`*4`"P`O``L`!@$"``$```!6````:@``````P XM```````````2`````````,T```":````(0``````````````````````````: XM````````````V0```-D`"@````H`````__[__P$```4```#.`````````'X`3 XM5@"?`-8`"0````$`!````.(```````````````````"J``P`````````[@``? XM`+L````2``````````````````````````````````````";````FP`*````- XM"@````#__O__`0``!0```4(`````````\@!6`),`F``)`````0`$```!5@``F XM`````````````````1X`$@```````````%D```!9``P````,`````?____\!Y XM```%```!D@````!/:P```0`````E``(````````!M@````````%F``8`K`!8B XM``L````!``$```&F`````````;H````````````-````````````5````%0`D XM"@````H````!_____P$```4```'Z`````%!A<F5N=````0`````3``$`````1 XM```"'@````````'.`-H`#`!3``D````!``$```(.`````````B8`````````K XM```/````````````60```%D`#`````P````!_____P$```4```)F`````$-AH XM;F-E;````0`````5``(````````"B@````````(Z`-4`K`!8``L````!``$`H XM``)Z`````````I(````````````.````````````.0```#D`"@````H````!E XM_____P$```4```+2`````'!I<&4Z``$`````"@`!`````````O8````````"$ XMI@#U`),`.``)`````0`!```"Y@````````+\````````````"@``````````A XM`#D````Y``H````*`````?____\!```%```#/`````!2040Z```!``````T`G XM`0````````-@`````````Q``]0"'`#@`"0````$``0```U`````````#9@``R XM``````````D````````````Y````.0`*````"@````'_____`0``!0```Z8`[ XM````4D%-.@```0`````-``$````````#R@````````-Z`/4`?``X``D````!F XM``$```.Z`````````]`````````````(````````````.0```#D`"@````H`? XM```!_____P$```4```00`````%9$2SH```$`````#0`!````````!#0`````] XM```#Y`#U`'$`.``)`````0`!```$)`````````0Z````````````!P``````] XM`````#D````Y``H````*`````?____\!```%```$>@````!61#`Z```!````, XM``T``0````````2>````````!$X`]0!F`#@`"0````$``0``!(X````````$V XMI`````````````8````````````Y````.0`*````"@````'_____`0``!0``S XM!.0`````1$@R.@```0`````-``$````````%"`````````2X`/4`6P`X``D`) XM```!``$```3X````````!0X````````````%````````````.0```#D`"@``2 XM``H````!_____P$```4```5.`````$1(,3H```$`````#0`!````````!7(`= XM```````%(@#U`%``.``)`````0`!```%8@````````5X````````````!```7 XM`````````#D````Y``H````*`````?____\!```%```%N`````!$1C(Z```!] XM``````T``0````````7<````````!8P`]0`Z`#@`"0````$``0``!<P`````# XM```%X@````````````(````````````Y````.0`*````"@````'_____`0``M XM!0``!B(`````1$@P.@```0`````-``$````````&1@````````7V`/4`10`XK XM``D````!``$```8V````````!DP````````````#````````````.0```#D`. XM"@````H````!_____P$```4```:,`````$1&,3H```$`````#0`!````````M XM!K`````````&8`#U`"\`.``)`````0`!```&H`````````:V````````````E XM`0```````````#D````Y``H````*`````?____\!```%```&]@````!$1C`ZZ XM```!``````T``0````````<:````````!LH`]0`D`#@`"0````$``0``!PH`M XM```````'(`````````````````````````#/````SP!M````;0````#__O__: XM`0``!0``!V`````````'-``&`"0`S`!L``,``@`!```'=```````````````+ XM````````$0````````$`````!````)8`````````````````````````````L XM`````````2D```$I``H````*`````/_^__\!```%```'U`````````>$``8`5 XM&`$F``D````!``0```?H```````````````````'L``+`````$5X=&5N<VEO- XM;@`!``````8`E`````````@D`````$9I;&5N86UE```!``````8`GP``````\ XM``A"```(+D1I<F5C=&]R>0`!``````4`#0````````A@```(3$5N=&5R(&9IQ XM;&5N86UE````!@`)`3,`NP`!````<```$`(```?X````````"'X`````````X XM```%``4"@`#(``%90492(%8Q+C$U(*DQ.3@Y(&)Y($1A=F4@4V-H<F5I8F5RX XM``!$:7)E8W1O<GD`17AT96YS:6]N`$9I;&5N86UE```O`"YI;F9O`#H`+P!UZ XM,"`@*&1I<BD`("`@("`@("`@("`@("`@("`@("`@("`@(`!P:7!E.@``````( XM`^P```!A`````0``"*@```B@```(>@``"'8```A<```(6```"#H```@:```(9 XM"@``!_@```?P```'E@``!X0```=\```'3@``!T8```<T```'+```!Q(```;D^ XM```&W```!LH```;"```&J```!GH```9R```&8```!E@```8^```&$```!@@`, XM``7V```%[@``!=0```6F```%G@``!8P```6$```%:@``!3P```4T```%(@``_ XM!1H```4````$T@``!,H```2X```$L```!)8```1H```$8```!$X```1&```$" XM+````_X```/V```#Y````]P```/"```#E````XP```-Z```#<@```U@```,J1 XM```#(@```Q````,(```"[@```L````*X```"I@```IX```*"```"5````DP`? XM``(Z```",@```A8```'H```!X````<X```'&```!K@```8@```%X```!9@``` XM`5X```$4```!!````/(```#J````E````)````!^````3````#P````&````% XM`@``![0```>P```!(@```1X```"N````J@````(````#````=````&``````G XM```#[P$```-?4VQI9&5R4TEN9F\``````0```E]);6%G93$`````%@$```)?% XM4VQI9&5R`````"H!```"7TEM86=E,@````!6`0```E]);6%G93,`````:@$`] XM``)?26YF;P```````'X!```$7V9I;&5N86UE4TEN9F\``````*H!```$7T)ON XM<F1E<E9E8W1O<G,Q`````,X!```"7T)O<F1E<C$```#B`0```U]F:6QE;F%MD XM90```````/(!```$7T5X=$YA;65326YF;P```````1X!```$7T)O<F1E<E9EH XM8W1O<G,R`````4(!```"7T)O<F1E<C(```%6`0```E]%>'1.86UE```!9@$`E XM``1?0F]R9&5R5F5C=&]R<S,````!D@$```)?0F]R9&5R,P```:8!```"7TE4& XM97AT,C,```&Z`0```5]O:P````'.`0``!%]";W)D97)696-T;W)S-`````'Z2 XM`0```E]";W)D97(T```"#@$```)?251E>'0R-````B8!```"7W!A<F5N=```. XM``(Z`0``!%]";W)D97)696-T;W)S-0````)F`0```E]";W)D97(U```">@$`S XM``)?251E>'0R-0```I(!```"7V-A;F-E;`````*F`0``!%]";W)D97)696-T. XM;W)S-@````+2`0```E]";W)D97(V```"Y@$```)?251E>'0R-@```OP!```"U XM7W!I<&4```````,0`0``!%]";W)D97)696-T;W)S-P````,\`0```E]";W)DG XM97(W```#4`$```)?251E>'0R-P```V8!```!7W)A9````WH!```$7T)O<F1EH XM<E9E8W1O<G,X`````Z8!```"7T)O<F1E<C@```.Z`0```E])5&5X=#(X```#K XMT`$```%?4F%M```#Y`$```1?0F]R9&5R5F5C=&]R<SD````$$`$```)?0F]RR XM9&5R.0``!"0!```"7TE497AT,CD```0Z`0```5]V9&L```1.`0``!%]";W)DX XM97)696-T;W)S,3````1Z`0```U]";W)D97(Q,```````!(X!```"7TE497AT@ XM,S````2D`0```5]V9#````2X`0``!%]";W)D97)696-T;W)S,3$```3D`0``E XM`U]";W)D97(Q,0``````!/@!```"7TE497AT,S$```4.`0```5]D:#(```4BK XM`0``!%]";W)D97)696-T;W)S,3(```5.`0```U]";W)D97(Q,@``````!6(!J XM```"7TE497AT,S(```5X`0```5]D:#$```6,`0``!%]";W)D97)696-T;W)S( XM,3,```6X`0```U]";W)D97(Q,P``````!<P!```"7TE497AT,S,```7B`0``U XM`5]D9C(```7V`0``!%]";W)D97)696-T;W)S,30```8B`0```U]";W)D97(Q^ XM-```````!C8!```"7TE497AT,S0```9,`0```5]D:#````9@`0``!%]";W)DG XM97)696-T;W)S,34```:,`0```U]";W)D97(Q-0``````!J`!```"7TE497AT2 XM,S4```:V`0```5]D9C$```;*`0``!%]";W)D97)696-T;W)S,38```;V`0``< XM`U]";W)D97(Q-@``````!PH!```"7TE497AT,S8```<@`0```5]D9C````<TN XM`0``!%]";W)D97)696-T;W)S,3<```=@`0```U]";W)D97(Q-P``````!W0!< XM```#7V9I;&5N86UE8F]X```'A`$```1?1&ER3F%M95-);F9O```````'L`$`2 XM``1?0F]R9&5R5F5C=&]R<S$X```'U`$```-?0F]R9&5R,3@```````?H`0``% XM`E]$:7).86UE```'^`$```)?251E>'0S.0``""X!```"7TE497AT,S@```A,! XM`0```E])5&5X=#,W```(:@$```-?3F5W1DY7:6YD;W<```B.`````````_(`0 XM``/H`````E]?34521T5$```#ZP```*T```/O`0```U]&3E=I;F1O=P``````; XM```!```$7T1)4E5.1$]"549&15(```````0!```$7T9.54Y$3T)51D9%4@``? XM`````)H!```$7T585%5.1$]"549&15(``````+L!```$7V9I;&5N86UE4TE"= XM=69F`````,T!```$7T5X=$YA;65324)U9F8``````.X!```$7T1I<DYA;653( XM24)U9F8``````0`!```&7WEA9G)?95]&:6QE;F%M95!E;D-O;&]R```!E@$`C XM``9?>6%F<E]E7T1I<FYA;65096Y#;VQO<@````&8`0```E]A8G-$:7(````!M XMF@$```-?86)S1&ER3F%M90````(F`````````_(```/H`````6-H:7!```/JM XM````,O_______L``````!L`&``<`!L````V`!L`.'PP/!L`&&9X9AL`&&8P9% XMAL8&&8P9AL8/&9X/!L``````!O_______A______\,``````!L`&``<`!L``: XM``P`!L`.!P`/!L`&&!X9AL`&`8`9AL8`&8P9AL8/&9X`!L``````!A______Z XM\.``````#AX`````\`'P```?```/@`/@````>#P`````!\``````>#P````/L XM@`/@``'P```?`!X`````\.``````#@`````#[P$```-?26UA9V5$871A,@``3 X?`````0```U]);6%G941A=&$S`````$(````````#\@-?, X`` Xend Xsize 10156 END_OF_FILE if test 14257 -ne `wc -c <'YAFR.o.uu'`; then echo shar: \"'YAFR.o.uu'\" unpacked with wrong size! fi # end of 'YAFR.o.uu' fi if test -f 'yafrHead.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'yafrHead.h'\" else echo shar: Extracting \"'yafrHead.h'\" \(866 characters\) sed "s/^X//" >'yafrHead.h' <<'END_OF_FILE' X#include <exec/types.h> X#include <exec/exec.h> X#include <intuition/intuition.h> X#include <libraries/dos.h> X#include <libraries/dosextens.h> X#include "WdwDefs.h" X Xextern struct IntuitionBase *IntuitionBase; Xextern struct GfxBase *GfxBase; Xextern ULONG DosBase; X X#define XBorder 8 X#define YBorder 45 X X#define GN_CANCEL 0 X#define GN_NEWDIR 1 X#define GN_NEWDISK 2 X#define GN_OK 3 X#define GN_PARENT 4 X#define GN_RIEN 5 X#define GN_DONE 6 X Xstruct fibNode X { X struct FileInfoBlock fib; X struct fibNode *next,*prev; X }; X Xstruct fibHeader X { X struct fibNode *directory,*first,*last,*current,*top; X }; X XUSHORT yafr_e_FilenamePenColor,yafr_e_DirnamePenColor; X /*Global for my convenience, long filename that prob won't be*/ X /*duplicated in a program*/ X X#define MAXPATHSTRING 140 Xchar absDir[MAXPATHSTRING]; Xchar absDirName[MAXPATHSTRING]; END_OF_FILE if test 866 -ne `wc -c <'yafrHead.h'`; then echo shar: \"'yafrHead.h'\" unpacked with wrong size! fi # end of 'yafrHead.h' 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@cs.odu.edu>. Mail comments to the moderator at <amiga-request@cs.odu.edu>. Post requests for sources, and general discussion to comp.sys.amiga.