home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / fileutils / imageprot / !Help next >
Encoding:
Text File  |  1995-03-27  |  9.5 KB  |  201 lines

  1.  ____________________                                  ____________________
  2.  ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ##| ##|  ######|  ##|     #####| ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  3.                       ##| ##|  ##|¯¯¯   ##|     ##|¯##|
  4.                       ##| ##|  ##|      ##|     ##| ##|
  5.                       ######|  #####|   ##|     #####|
  6.                       ##|¯##|  ##|¯¯    ##|     ##|¯¯
  7.                       ##| ##|  ##|      ##|     ##|
  8.  ____________________ ##| ##|  ######|  #####|  ##| _______________________
  9.  ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¯¯  ¯¯   ¯¯¯¯¯¯   ¯¯¯¯¯   ¯¯  ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
  10.  ——————————————————————————————————————————————————————————————————————————
  11.    ImageProtect                                Version 1.01 (27 Jan 1995)
  12.  ——————————————————————————————————————————————————————————————————————————
  13.          This program is © 1995 James Freeman. All Rights Reserved.
  14.  
  15.                 It is FREEWARE.  Use is at the owner’s risk.
  16.               (For details, please read the conditions below.)
  17.  
  18.  −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
  19.   G E N E R A L   I N F O R M A T I O N
  20.  ——————————————————————————————————————————————————————————————————————————
  21.              Sattinger’s Law: It works better if you plug it in.
  22.  ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– Arthur Bloch
  23.  
  24.  Program:  ImageProtect
  25.  
  26.  Purpose:  Prevents the accidental deletion of non-empty image files.
  27.  
  28.  Requires: RISC OS 3.1x or later.
  29.  
  30.  Features: * Module takes up only 476 bytes.
  31.            * Hand-written in ARM code.
  32.  
  33.  
  34.  −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
  35.   W H O ?   W H A T ?   W H E N ?   H O W ?
  36.  ——————————————————————————————————————————————————————————————————————————
  37.            It ain’t what a man don’t know that makes him a fool,
  38.                     but what he does know that ain’t so.
  39.  –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– Josh Billings
  40.  
  41.  This program was written in ARM using Zap 1·20 and SAsm 1·45.  This text
  42.  reader was created by ViewHelp 1·15.  My thanks to Dominic Symes and
  43.  David Radford for putting these programs into the public domain.  SAsm
  44.  is shareware and written by David Holden.
  45.  
  46.  If you use any of this code in an application of your own (PD or Freeware
  47.  only, mind), please give me credit.  I’ll email you the source if you
  48.  *really* want it.  (Don’t know why anyone would :-)
  49.  
  50.  Apologies if you use a territory other than UK on your Arc - text within
  51.  the program is in English only.
  52.  
  53.  I give no guarantee that this program will work correctly on all machines
  54.  and all configurations - but it works for me.  Take it or leave it.
  55.  
  56.  
  57.  −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
  58.   S U M M A R Y
  59.  ——————————————————————————————————————————————————————————————————————————
  60.                   Nothing is so useless as a general maxim.
  61.  –––––––––––––––––––––––––––––––––––––––––––––––––––––––––– Thomas Macaulay
  62.  
  63.  This directory contains:
  64.  
  65.  !Help.*                               Help text and reader.
  66.  ImageProt                             The module.
  67.  
  68.  With RISC OS 3 came image files; and what a difference they made :-)  If
  69.  you don’t know what an image file is, examples are archives and PC
  70.  partitions.  They may look like directories, but are actually files and
  71.  are still treated as such in one important respect: they can be very
  72.  easily deleted.
  73.  
  74.  To illustrate this difference, here are a couple of examples.
  75.  
  76.   * You delete a directory from the Filer menu on the desktop.
  77.     The Filer Action Window recursively deletes each unlocked file within
  78.     the directory; locked files are safe.
  79.  
  80.   * You delete an image from the Filer menu on the desktop.
  81.     If the image is unlocked, it will be immediately deleted, whether or
  82.     not there are any locked files inside.  Very worrying.  And not very
  83.     nice if you accidentally lose a 4Mb PC partition (for example).
  84.  
  85.  “OK,” you might say, “the solution is simple - I’ll just lock the image
  86.  file against deletion.”  Well, that’s what I thought, but trying this with
  87.  my archives showed up a problem - write accesses to a locked file fail
  88.  even if the file has write access (‘LWR/’ for example).
  89.  
  90.  In other words, I can either have safe archives which I can’t write to, or
  91.  archives that I can write to but that I can also very easily delete by
  92.  accident.  And why did I write this program?  Because I learnt first hand
  93.  how easy it was to accidentally delete an archive.
  94.  
  95.  Loading the module activates the protection.  Now trying to delete an
  96.  image file which contains other files will generate an error.
  97.  
  98.  If you like this program, please drop me a quick line.  I’m not asking for
  99.  money, but I normally spend a lot of time getting my programs ‘just right’
  100.  - just one line of email would be nice :-)
  101.  
  102.  
  103.  FURTHER DETAILS
  104.  ———————————————
  105.  
  106.  The module only concerns itself with whether or not the image file is
  107.  empty (ie. does not contain other files; this has nothing to do with the
  108.  image file length since an archive may be empty but still have a nominal
  109.  file length for the header information etc).  Whether any files within the
  110.  image are locked or not is immaterial.
  111.  
  112.  But what happens when you *do* want to delete an image file?  Well, there
  113.  are two alternatives.
  114.  
  115.   * Choose ‘Options ⇨ Force’ from the Filer menu.  When enabled, this sets
  116.     a bit in CMOS RAM.  This bit is checked for by ImageProtect; if it is
  117.     set, the module disables its protection.  To enable it .. yep, you’ve
  118.     guessed it, just untick the option on the Filer menu.  Note that the
  119.     options menu provided by Filer Action Window does not set the CMOS RAM
  120.     options and so will have no effect on ImageProtect.
  121.  
  122.   * Change the image’s filetype to (say) text, and then delete it.
  123.  
  124.  TECHNICAL DETAILS
  125.  —————————————————
  126.  
  127.  Note that the module only claims FileV (the vector for OS_File).  This
  128.  means that it can intercept deletes from the desktop and also prevent
  129.  *Delete and *Remove from the command line.
  130.  
  131.  Most importantly, it does not claim FSCV (the vector for OS_FSControl)
  132.  which is used (amongst other things) for *Wipe.  In other words, *Wipe may
  133.  still be used to get rid of those now hard-to-delete archives :-)
  134.  
  135.  
  136.  −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
  137.   P R O G R A M   H I S T O R Y
  138.  ——————————————————————————————————————————————————————————————————————————
  139.              The World Record holder for blowing a bugle whilst
  140.               riding a bike uphill dragging four hundredweight
  141.              of pig iron and holding his breath is buried at...
  142.  ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– Spike Milligan
  143.  
  144.  1.00 First version for RISC OS 3·10.
  145.  1.01 Check on CMOS ‘force’ bit.
  146.       FIRST RELEASE VERSION, uploaded to Hensa, sent to APDL.
  147.  
  148.  
  149.  −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
  150.   L A S T   W O R D S
  151.  ——————————————————————————————————————————————————————————————————————————
  152.            Die, my dear doctor? That’s the last thing I shall do.
  153.  ––––––––––––––––––––––––––––––––––––––––––––––––– Lord Palmerston (Attrib)
  154.  
  155.   * Distribution - terms and conditions:
  156.     —−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—
  157.     This program is “freeware”; this means ‘freely distributable’.  You
  158.     may give a copy to anyone but there must be no charge.  For PD and
  159.     shareware libraries, a small fee for the costs of discs, postage and
  160.     administration is allowed, provided that the cost of the disc upon
  161.     which this software is included is NOT MORE THAN UK£1·75 for an 800K
  162.     disc, or £2·50 for a 1600K disc.  All files connected with this
  163.     application must be distributed in an UNALTERED state.
  164.     —−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—
  165.  
  166.   * PLEASE NOTE THAT THIS PROGRAM IS NOT PUBLIC DOMAIN.
  167.  
  168.   * If you have any queries, praises or bug reports (please be specific)
  169.     you may contact me at the address below.  I may be contacted via
  170.     Pasture Hill Cottage, Stobarts Lane, Low Worsall, Yarm, Cleveland,
  171.     TS15 9PJ, (England).  Even better, email me at my JANET address:
  172.     ‘j.freeman@uea.ac.uk’.
  173.  
  174.   * Legal note:
  175.     —−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—
  176.     The expression ‘the author’ means Mr James P Freeman.  The text
  177.     following applies to files within this package written by the author;
  178.     any other files are subject to different conditions.  The author
  179.     retains full copyright of this software.  Distribution is subject to
  180.     the conditions above.  This software is supplied ‘as is.’  USE IS
  181.     ENTIRELY AT THE USER’S OWN RISK.  It carries NO WARRANTY, express or
  182.     implied, and NO GUARANTEE is given of its MERCHANTABILITY, SUITABILITY
  183.     or FITNESS FOR ANY PURPOSE.  The author accepts no responsibility
  184.     whatsoever and under no circumstances will be liable for any damage,
  185.     whether physical or economic, or any direct, indirect or consequential
  186.     loss arising through, or in any way connected with, the use or misuse
  187.     of this software or any files or routines contained herein - even if
  188.     the author has been advised of the possibility of such loss.  The
  189.     author reserves the right to amend this notice and/or alter the
  190.     distribution conditions of this software package at any time.
  191.     —−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—−—
  192.  
  193.   * What..?  You still reading?
  194.  
  195.  
  196.  −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
  197.   E R R A T U M
  198.  ——————————————————————————————————————————————————————————————————————————
  199.                   This slip has been inserted by mistake.
  200.  –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– Alisdair Gray
  201.