PANTHER(1)            PAnTHer File Divertor             PANTHER(1)

NAME
     PAnTHer

MONEYWARE
     This program is moneyware.  This means that is you enjoy this 
     program and make use of it,  you should donate some money  to 
     the  programmer.  There  are ways  of  enforcing  this,  like 
     removing different options.  However, there is always someone 
     who  spreads his own registered versions,  and even  so,  the 
     registering cost goes up,  or there will be less money to the 
     programmer  because  of  the  distribution  costs.   I   have 
     therefore  decided NOT to enforce it.  It might mean  that  I 
     won't  actually  receive  anything  for  this  program,   but 
     remember  that the best way to enourage someone  to  continue 
     the  development  and continue create useful software  is  to 
     somehow say "hey,  I like what you're doing, keep up the good 
     work!" and even "you know what? This is worth something." and 
     then actually do something about it.  So.  If you enjoy  this 
     program and make use of it,  make a donation,  ok? Please use 
     make use of these addresses:

        Internet email: ga@158.38.66.10
              (Should be valid at least till the end of June 1995)
              (I do not enter the computer name here because it
               is due to change pretty soon...)
        Snailmail:  Gard Eggesb Abrahamsen
                    PO Box 5061, Larsgrden
                    6021 lesund, Norway
              (Also valid at least till the end of June 1995)
        Snailmail:  Gard Eggesb Abrahamsen
                    PO Box 71
                    6092 Eggesbnes, Norway
              (Should be valid a few more decades as long as my
               parents are alive)
        Postal giro: 0825 0488697

DESCRIPTION
     PAnTHer  is  a resident (TSR) program which hooks up  to  the 
     GEMDOS  and  GEMAES  trap  vector  and  alters  the  filespec 
     parameter of most calls that deal with file  operations.  The 
     purpose  of  this is to allow the user to  have  a  'cleaner' 
     setup   on  his  harddisk,   putting  all   information   and 
     configuration  files  in  a  single  folder,  data  files  in 
     another, etc.

REQUIREMENTS
     PAnTHer should work on all TOS compatible machines. ;-)

DISCLAIMER
     There  really shouldn't be any bugs,  and the program  hasn't 
     failed  us at Scriba Soft yet,  and we've kind of been  beta-
     testing PAnTHer for seven months now, but as usual, let it be 
     known  that  all usage of this software is totally  your  own 
     responsability.  Thereof, risks of damage or loss of data are 
     completely your own and can not be blamed on Scriba Soft. But 
     is sure helps to have the latest version...  8^)=

INSTALLATION
     Put  PAnTHer.prg in the auto folder,  as early  as  possible, 
     allowing  auto-folder  programs  to  make  use  of   PAnTHer. 
     Preferably, you should put it right before GBell, which again 
     should be placed before MiNT. ;-)

     Next,  you need to create a PAnTHer.inf file. This one should 
     be on the root directory of your boot  device.  Actually,  it 
     should be on the root directory of drive C on this version of 
     PAnTHer.  Usually,  C IS the boot drive.  If not,  then tough 
     luck.  I'll  have to include some code in a late version  for 
     that case.

     A demo version of the PAnTHer.inf file with comments has been 
     included  in  the  package.  It  might,  however,  need  some 
     adjustments to fit the system set up on _your_ harddisk.

CONFIGURATION
     PAnTHer is configured via the PAnTHer.inf file,  which should 
     be  placed at the root directory of your  boot  device.  This 
     configuration  file MUST be there,  or PAnTHer will _not_  be 
     installed.  You shouldn't worry too much about how messed  up 
     your root directory is,  however. Using PAnTHer, you can have 
     a completely new setup on your harddisk.  The only two  files 
     on  the root directory of _my_ harddisk are SHDRIVER.SYS  and 
     PAnTHer.inf.

     The  PAnTHer.inf tells PAnTHer how to react on the  different 
     files.  Basically,  it's  a table of two  columns,  having  a 
     single space or a TAB (ASCII 9) as a field delimiter. PAnTHer 
     does, of course, support both MS-DOS and UNIX ASCII.

     The first field of the table tells PAnTHer which file pattern 
     the line is defining.  This pattern is always compared to the 
     _end_ of the filespec given through the GEMDOS/GEM functions, 
     so .inf means all files that end with .inf,  and wordplus.rsc 
     means all filespecs that end with wordplus.rsc.  Notice  that 
     PAnTHer searches through the info file from the top and stops 
     at the first match, so the most unique specs should be at the 
     top.  I.e.  PAnTHer.inf should be before the .inf  line.  The 
     matching  is also always case insensitive due to  the  MS-DOS 
     files system used on most STs nowadays.

     The  second field of the table tells PAnTHer what to do  with 
     the given filespec.  If the parameter ends with a \, it means 
     that you want the path name replaced.  If the parameter  does 
     _not_  end with a \,  the entire filespec will  be  replaced, 
     allowing you to automatically rename a specific file, or even 
     create  some  sort of symbolic link,  as  will  be  explained 
     below.

     In the principle, all empty lines will be ignored. If a line, 
     however,  begins with a space or a TAB,  i.e. the first field 
     is  a 'blank',  telling PAnTHer that this line is  about  ALL 
     OTHER FILESPECS!  Since this always gives a  match,  anything 
     below this line will be ignored.

     If the second field is blank,  the filespec will be  replaced 
     with a NULL termination, so take care about what you do!

     All  lines  beginning  with a '#' are comments  and  will  be 
     ignored,  except  the lines beginning with  '#!'.  These  are 
     command  lines.  The commands themselves are four  characters 
     long,  and the remaining part of the line is usually open for 
     comments. Available commands are:

        #!SAVE The following files should be diverted at f_create
        #!LOAD The following files should _not_ be diverted
        #      at f_create
        #!SOFT Divert file only if current spec gives file not
        #      found (loading only)
        #!HARD Divert file even if current spec is valid.
        #!LOUD Write all exec/open/find/rsrc_load requests at line
        #      25 of the screen. Nice for DBugging. ;-)
        #!XPOS followed by a number tells PAnTHer which X position
        #      the text should be outputted at.
        #!YPOS followed by a number tells PAnTHer which Y position
        #      the text should be outputted at.
        #!STOP parsing of the PAnTHer.inf file. The rest of the
        #      file will be ignored.
        

PANTHER BABY
     The  easies thing to do with PAnTHer is to divert files of  a 
     specified type to a specified directory.  This  means,  like, 
     having all resource files in one specific directory, allowing 
     you  to  start most GEM programs from any  directory  without 
     worrying  about  wether the resource file is  found  or  not. 
     Notice  that when using the #!SOFT option will  make  PAnTHer 
     _first_ check if the given filespec can be used.  Then it  is 
     not  before  a file is not found that it will  use  the  path 
     given in the PAnTHer.inf.

        # PAnTHer.inf to be on root, NEWDESK is a temporary file
        # and the rest are found in the library of info files.
        PAnTHer.inf c:\
        newdesk.inf c:\tmp\
        .inf c:\lib\inf\

     PAnTHer  patches  f_open,   f_create,  f_rename,  p_exec  and 
     rsrc_load,  which pretty much covers most of the disk access. 
     This  means  that you can divert accessories to  a  different 
     directory as well.

        # Our own accessory directory
        .acc c:\sys\acc\

PAPA PANTHER
     PAnTHer  can also be used for more  advanced  divertion.  You 
     _could_ for example make sure that noone copied your precious 
     source files off your disk...

        #!SAVE my source files _HERE_ and _ONLY_ _HERE_
        .s c:\usr\source\
        .gfa c:\usr\gfa\

     You  can  also  use it for some kind  of  symbolic  link.  An 
     example  of this is when you have an application that can  be 
     used both as accessory and a normal program,  like AntiDote. 
     In the accessory folder,  you have AntiDote.ACC which  should 
     be  a file which is 0 bytes long.  AntiDote.APP,  the  actual 
     program,  you put in your binaries directory.  Now,  add  the 
     following lines to your PAnTHer.inf file:

        # Saving bytes with symbolic links... ;-)
        antidote.acc c:\bin\antidote.app # Only one large file needed
        .acc c:\sys\acc\                 # Accessories diverted

ALTERING THE CONFIGURATION AFTER BOOT
     PAnTHer  actually  allocates $400 bytes more than  it  really 
     needs.  This  allows  PAnTHer  to  automatically  reload  the 
     PAnTHer.inf file as soon as you create a new one,  as long as 
     it isn't more than $400 bytes larger than the one it read  at 
     boot time.

THE GOODIE BAG
     PAnTHer  has a Goodie Bag,  as described in the  Scriba  Soft 
     cookie bag expansion plan. The Cookie Jar entry is "PATH" and 
     the   Goodie  Bag  contains  the  following   variables   and 
     constants:

        MAGI   *) 24892
        NAME   *) Application name
        T#01   *) GEMDOS bending routine
        T#02   *) GEMAES/VDI bending routine
        T#13   *) BIOS bending routine
        PROG   *) Beginning of program block
        PSIZ   *) Length of resident program block
        XTRA   How much extra memory has been allocated on top of
               the actualt PAnTHer.inf file size.
        _VER   *) PAnTHer version number+
        INFO   Pointer to PAnTHer.inf file block
        ISIZ   Size of loaded PAnTHer.inf file
        LOCK   *) Execution semaphor
        BUFF   Internal working buffer
        ITBL   Pointer to case insensitivity table
        SHOW   Flag: "TRUE" if PAnTHer is in #!SHOUT mode,
                     0 if not.
        SPOS   Most significant byte: x position of output
               Next significant byte: y position of output
        FORC   "TRUE" if last filespec was forced (#!HARD)

     These variable are also found at the beginning of the program 
     file.  Actually,  it  is found at text+10,  or absolute  file 
     position 32.  Altering the values held by XTRA and SPOS  will 
     in  fact alter the properties of the  program.  Eg.  you  can 
     configure PAnTHer's output position directly without  putting 
     it in the PAnTHer.inf file,  and you can alter how much extra 
     memory  PAnTHer  is  to allocate for future  loading  of  the 
     PAnTHer.inf file.

     The variables INFO and ISIZ can also be altered after PAnTHer 
     has  been loaded,  if you wish to change to a bigger  buffer. 
     Just   remember  to  allocate  it  before  you  alter   these 
     variables.  Once PAnTHer has been told to use your new  space 
     instead,  you  can free the space the old PAnTHer file  takes 
     up.  It  is also possible to use these variables  to  include 
     your own local PAnTHer file when running a specific program.

BUGS
     At  the  moment "Boot drive" means drive  C.  You  can  still 
     include  PAnTHer on any drive,  as long as PAnTHer.inf is  on 
     the root directory of drive C.

LOOK OUT FOR
     LHArc  Driver - Bind a virtual drive to your favourite  LHArc 
     file to get rid of them RSC and INF files that you only  read 
     anyway!

     NewT - The future operating system for the MC680x0?

