@DATABASE "M-Support emergency bug fix"
@wordwrap
@NODE MAIN " M-Support documentation"

                              @{"M - S u p p o r t" Link What_is_ite}

                                    @{"v2.6" Link Historym}

                          (c) P. Eastham 1993 - 1995

                             @{"What is it?       " Link What_is_ite}
                             @{"Setting up        " Link Setting_upe}
                             @{"History           " Link Historym}
                             @{"Special thanks    " Link John}

@ENDNODE

@NODE What_is_ite

M-Support is a support program to the M-Tag package. It plays a crucial role
in the execution of the package.

       o Updates the #?.fd files.
       o Creates the area list used by M-TagFS and M-Scan.
       o Tags a single file (Replaces DLG's '.' command).
       o Correctly checks area security where required.
       o Correctly searches global filepaths where required.

@ENDNODE

@NODE Setting_upe " Installing M-Support"

You need to set up M-Support in 4 ways:

       @{"Area list       " Link M-Area}
       @{"Update #?.fd    " Link M-Update}
       @{"Single file tag " Link M-Dot}
       @{"Cleanup         " Link clean}
Each of these three different set-ups are important.

@ENDNODE

@NODE M-Area " Setting up for Area list"

See @{"Fast running" link frun} to see how to run M-Support very fast.

Simply add to your login.(dlg)batch file.

There are 2 ways to run M-Support here:

   RUN DLGConfig:Master/M-Support AREA [TIME]

Use this method if the program takes a while to run.

   DLGConfig:Master/M-Support AREA [TIME]

If it runs quickly.  M-Scan uses the created area list for its login
function, so you may run into problems by RUNning M-Support.

The 'AREA' parameter is a word, and not a DLG switch of any description! If
you change file area security, simply delete all the 'T:{port}.MTArea' files.

The TIME parameter will print a short message: 'Running time: <time>'. This
could be handy in testing how long it takes to run this mode.

When the resulting file is accessed by another program in the M-Tag package,
it is first checked that the file exists, and if it doesn't, M-Support will be
run.

You will also need to edit/create the '@{"Special.Flags" Link Special}' file.

@ENDNODE

@NODE frun "Fast Running"

If you don't use special access flags in any areas, you can do away with
running M-Support each time a user logs in.  This method requires a bit of
legwork each time you change access levels to file areas, or add/delete
areas.

By running M-Support for each level you give users, and then adding the
following commands to your login.(dlg)batch as follows:

copy <path>/MTArea.%LEVEL T:%PORT.MTArea
Filenote T:%PORT.MTArea "%NAME"

You will get the same result as running M-Support.

The drawback here is that if you have lots of levels set, or change file
areas often, this could mean lots of work. However, if you have LOTS of file
areas, this may be a good work-around.

@ENDNODE
@NODE Special " How to handle special access flags"

In order to speed processing up, special access flags are only checked when
required.  To do this, a file called 'DLGConfig:Master/Special.Flags' is
used.  This file contains users names, and the areas they have special access
in.  The format is:

Phillip_Eastham 1 2 5 20 200

Ie the underscored username followed by a list of areas with special access
for that user.

Note that M-Support is only interested in special access flags for download
ability. Do not place a line here for users who have upgraded upload
ability etc.

  *** IMPORTANT ***

       Each line MUST be LF terminated. This means that when editing this
file, the cursor should be on a row of its own in column 1. If this is not
the case, an 'End of file' error will be produced in the M-Tag error log
(LOGS:M-Error.LOG)

@ENDNODE

@NODE M-Dot " Single file tag set-up"

Edit your single file tag command (usually '.') to:

       DLGConfig:Master/M-Support -A%File_AreaNumber -F%File_FileNumber

If either are missing, or the corresponding #?.fd file doesn't exist, the
program will exit gracefully.

M-Support will read in the config file 'M-Tag.cfg' to use the keywords
MAXTAG= and RATIOBLOCK=.  See @{"M-TagFS.Guide" link M-TagFS.Guide/config} for more details.


@ENDNODE

@NODE M-Update " #?.fd file update set-up"

There are no special set-up requirements needed other than to use the
'File_DnLd.BAT' file when downloading.

Call M-Support thus:

       DLGConfig:Master/M-Support UPDATE [INFORM] [NOWRITE] [KILLXPRD]

The optional INFORM switch will send a message to the user similar to what
they get as DLG updates after a batch transfer.

The NOWRITE switch DISABLES writing to the logfile each file that has been
downloaded.  This was included as some programs weren't writing the files
downloaded to the log correctly.

KILLXPRD is used if the user is using DLGXPRD as their transfer handler.
M-Support will read in their transfer protocol, and if they are using DLGXPRD
('DLGXPRD' looked for in call string), or they have no default protocol, AND
there is only 1 file left in their batch list, they are prompted as to wether
they wish to kill it automatically.

@ENDNODE
@NODE clean " Cleaning up"

If you wish to remove the ZZDESC.BCH file from the user's batch list and
directory, run M-Support thus:

       DLGConfig:Master/M-Support KILLDESC

This will cleanup the description file and remove it from the batch list.
This parameter is mainly for use in the logout.(dlg)batch file for when the
user wants to logout after a download.

NOTE: You DO NOT specify this parameter when you do an update. This happens
      automatically in the update process.
@ENDNODE
@NODE Historym " Program history"

Version 1.0  - First release.

Version 1.0a - Fixed a bug which caused enforcer hits, and perhaps crashed
               some machines.

Version 1.0b - Fixed a small display error.
             - Added option to tag a non-existant file anyway.

Version 1.0c - Fixed a severe bug when more than 255 files tagged.
             - Fixed even more severe bug when more than 127 files tagged.
               This bug appears to be in DLG itself.
             - Changed the way the files are processed. Should be faster now.

Version 1.0d - Now allows Sysop into ALL areas regardless of level.
             - Added 'INFORM' switch.

Version 1.0e - Fixed forced 'INFORM' switch. Now works as it should.
             - Fixed a severe bug which caused massive fragmentation of fast
               RAM introduced in v1.0c.

Version 1.0f - Added an error message to the errors logfile when a problem
               with the special areas access file occurs.
             - Fixed a bug in update mode which wasn't printing to the BBS
               log files. Now correctly updates the logs.
             - Removed the 127 tagged file limit due to a bug fix in FILE.

Version 1.1  - Changed the way update mode runs. Now runs much quicker.

Version 1.2  - Hopefully fixed the locked file problem.

Version 2.0  - Some optimisations made. Very slight speed increase.

Version 2.1  - Now checks for a 0 byte batch file and kills it if it exists.
               Previously this would only happen if an M-Tag.CDL file existed.
             - Re-worked UPDATE command. Should work better now.
             - Added twirling bar when updating files and INFORM in use.
             - Automatically turns off INFORM function if less than 10 files
               need to be updated.
             - Now correctly handles non-Auto-Access areas.

Version 2.1a - Fixed up a small bug that would display 'Done!' in the wrong
               place.

Version 2.2  - Now uses the config file to set 2 values.
             - Now includes invalid keyfile detection.
             - Added NOWRITE option when run in UPDATE mode.

Version 2.2a - Fixed a bug that would make the responce ALWAYS 'NO' when
               tagging a non-existant file.
             - Fixed a bug in which free files would get trapped by RATIOBLOCK
               keyword.
             - Fixed a severe bug which was causing some machines to crash.

Version 2.2b - Optimised generation of area list.
             - Added TIME parameter for AREA mode.

Version 2.3  - A few speed enhancements.

Version 2.3a - Fixed a severe problem which caused some machines to crash.

Version 2.4  - Added KILLXPRD option for those using DLGXPRD.
             - Now only loads in the batch file during tagging if you have
               ratio blocking enabled.
             - Removed log file output.

Version 2.5  - Fixed a bug which could leave the DESCRIP.BCH file in the
               users batch list.

Version 2.6  - Fixed a small bug in the update routine, giving marginal speed
               increase.
             - Optimised the production of the area list. Now takes .36 seconds
               on my machine. The old version took .48!
             - Added KILLDESC parameter.
             - Fixed a long-standing bug in the UPDATE code which caused
               enforcer hits, and may have caused spurious crashes on some
               machines.

@ENDNODE

@NODE john " Special thanks"

Special thanks to John Veldthuis of Virus Checker fame.

There are lots of sysops out there who's system memory will be eternally
gratefull. See @{"GFA's problem" link M-TagP.guide/GFA} for an overview of the problem.

@ENDNODE
