home *** CD-ROM | disk | FTP | other *** search
- ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ =========================
- ZeriRegister 1.00 user guide This module is FREEWARE
- ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ =========================
-
- ----------------
- - Introduction -
- ----------------
-
- ZeriRegister is a module that enables clean and automatic disposal of modules
- that are no longer in use by the system, so they do not needlessly clog up
- the RMA. It not only enables new applications to exit cleanly, but can also
- be used to tidy up existing applications that leave their modules behind
- after quitting. This may usually be achieved by simply editing the 'naughty'
- application's !Run file.
-
- To do its work, ZeriRegister maintains a small database of modules and their
- use counts. It allows modules to be 'registered' or 'unregistered' for use by
- a caller, using either a *-command or an SWI. After the last user of a given
- module unregisters, the module is automatically killed.
-
- This module has an Acorn registered SWI chunk number.
-
-
- ---------------
- - The package -
- ---------------
-
- There are two files in the ZeriRegister package :
-
- 'ZRegister'
- ~~~~~~~~~~~
- Is the ZeriRegister module.
-
- 'Guide'
- ~~~~~~~
- Is what you're reading now, the 'user guide'.
-
-
- ---------------
- - Quick start -
- ---------------
-
- If you want to tidy up your 'naughty' applications right away, without
- reading the rest of this guide, simply do the following :
-
- - Ensure ZRegister is loaded in your boot sequence.
- - Then, for all the modules used by the application, bracket the ...!RunImage
- line in your apps' !Run files with *RegisterModule <module name> and
- *UnregisterModule <module name>, i.e. place these before and behind the
- ...!RunImage line, respectively.
-
- If you need more detailed usage information, read the rest of this guide.
-
-
- ---------
- - Usage -
- ---------
-
- Simply *RMLoad ZRegister in your system's boot sequence. It is possible to
- indicate the amount of memory that is to be used for the module database by
- using
-
- *RMLoad ZRegister <K's>
-
- where <K's> indicates the number of Kbytes to use for the database. <K's> may
- be from 1-9, else it defaults to 1. 1k is sufficient for roughly 50 entries,
- which should be enough in normal use.
-
-
- ------------
- - Commands -
- ------------
-
- *RegisterModule <module name> registers the given module for use by the
- caller. If this is the first registration for the module, a new entry for it
- is created in the database and its use count is set to 1. If the module is
- already registered, its use count is incremented.
-
- *UnregisterModule <module name> unregisters the given module for use by the
- caller. Its use count in the database is decremented. If the use count
- becomes 0, the module is deleted using SWI OS_Module 4. If the deletion
- fails, the module's entry in the database remains, with a use count of 0.
-
- *RegisteredModules will list all the registered modules and their use counts.
-
- The SWIs "ZeriRegister_RegisterModule" and "ZeriRegister_UnregisterModule",
- with r0 pointing to the module name, are fully equivalent to their
- corresponding *-command.
-
- Module names may be terminated by a CTRL-character or a space, and any
- matches against the database are case insensitive. The exact name given
- during the first registration is the one stored in the database, and
- therefore the one listed by *RegisteredModules.
-
-
- --------------
- - Tidying up -
- --------------
-
- To 'tidy' an application (e.g. an existing one which leaves its modules
- lingering behind), simply 'bracket' the ...!RunImage command line in its !Run
- file (assuming it is an Obey file) by a *RegisterModule and *UnregisterModule
- command. E.g. if an existing !Run file would look like :
-
- ...
- RMEnsure Blah 1.23 RMLoad <Blah$Dir>.Blah
- ...
- Run <App$Dir>.!RunImage
- ...
-
- it would become :
-
- ...
- RMEnsure Blah 1.23 RMLoad <Blah$Dir>.Blah
- ...
- RegisterModule Blah
- Run <App$Dir>.!RunImage
- UnregisterModule Blah
- ...
-
- Simply add these lines for every module that is used by the application.
-
- Note that for the above to work properly, the applications you run must be
- 'well-behaved' in the desktop, i.e. specifically they must never use *Close
- or CLOSE#0, or anything like that, because such a command will also close any
- open !Run files, so the *Unregister commands of any running applications will
- never be executed. There shouldn't be any of these 'misbehaving' applications
- around, but be aware of this if module tidying doesn't seem to work.
-
- To 'tidy' a new application, you may do the same as described above, or issue
- the register and unregister commands inside the application code (using the
- equivalent SWI would possibly be more convenient in this case).
-
-
- -----------------
- - Final remarks -
- -----------------
-
- This software is Freeware. It may be copied freely, as long as it is not
- charged for beyond coverage of incurred media and moderate handling costs, and
- is copied completely and unchanged. All rights to this software remain the
- author's at all times. You may not change this software or use any part of it
- in other products without the author's approval.
-
- Implicit approval is given for use of the software in non-commercial products,
- provided the software is issued completely (i.e. including documentation) and
- unchanged, a proper credit to the author is given in the documentation of the
- product, and the author is notified of the use.
-
- This software is provided 'as is'. It is not guaranteed to be useful for any
- particular purpose. I cannot be held responsible for any damages, either
- direct or consequential, arising out of the use or the inability to use this
- software.
-
- If you want to contact the author, e.g. for any comments or bug reports you
- might like to make, or to obtain the latest version of the software, you are
- welcome to do so. Details are included below, please read them carefully.
-
- Snail mail
- ~~~~~~~~~~
- John Kortink
- Nutterbrink 31
- 7544 WJ Enschede
- The Netherlands
-
- Please include an SAE, coverage of return postage, and, if you want a new
- version of the software, a floppy disc. If any of these are missing, I may
- choose not to reply. Examples of postage coverage : sufficient Dutch stamps,
- IRC's, or small cash (e.g. £1). Never send any type of cheque. If you send a
- floppy disc, send a DD one, as I cannot yet handle HD discs on my Archimedes.
-
- Please note I cannot hold on to floppy discs awaiting new versions of the
- software, i.e. always first check with me that there is a new version.
-
- Email
- ~~~~~
- J.Kortink@inter.NL.net
- john@dialis.xs4all.nl
- FIDO 2:283/307.7
-
- Email is preferred over snail mail.
-
-
-