home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 500.lha / nodelete_v1.5a / nodelete.doc < prev    next >
Text File  |  1991-04-08  |  11KB  |  253 lines

  1.  *************************************************************************
  2.  *              NoDelete V1.5A  (C) HooverSoft  Oct 30th, 1990            *
  3.  *************************************************************************
  4.  
  5. USAGE:    1> run NoDelete [patterns] [-p priority] [-y ypos] <ENTER>
  6.             from CLI only.
  7.  
  8.                                   HISTORY
  9.  
  10.                      CHANGES TO VERSION 1.4: MAR 1991
  11. Switched  to  ARP  (finally).   This  great  bunch  of routines should have
  12. experienced  a  wide  enough  distribution  by now to make this acceptable.
  13. Cheers to everyone involved in this project!  ARP is used to do the pattern
  14. matching  on filenames.  No more restriction is made on the patterns.  They
  15. can  be  complete  filenames  or  just  patterns,  with  every ARP wildcard
  16. allowed.   I forgot the name of the guy who suggested this one, and answers
  17. by  UUCP  is not a favourite of math4.unibi.de.  Anyway, as soon as this is
  18. implemented, you'll get a "thank you", mate!
  19.  
  20.                      CHANGES TO VERSION 1.35: OCT 1990
  21. Programmed  two  new options -O and -S (Cheers, John!).  These options sort
  22. of  "fix"  a  bug  with NoDelete which used to override the file protection
  23. bit.
  24.  
  25.                      CHANGES TO VERSION 1.3: SEP 1990
  26. Lots  of  changes.   Thinking  of  writing  a  new  documentation.  Anyway,
  27. introduced  command line options -p and -y for run-time setting of priority
  28. of NoDelete and of vertical position of titlebar.
  29.  
  30.                      CHANGES TO VERSION 1.2: AUG 1990
  31. Introduced  the  possibilty  to  give  multiple patterns on startup.  Lists
  32. patterns when pressing a key while Nodelete's titlebar is active.
  33.  
  34.                      CHANGES TO VERSION 1.1: Aug 1990
  35. NoDelete now automatically centers the Dragbar on Screen and calculates the
  36. correct width for the window if a pattern is specified.
  37.  
  38. Now  works  fine  with  AmiOmega.   System won't crash if "Yes, Delete!" is
  39. selected.
  40.  
  41. Now  supports  the  use  of  patterns to ask confirmations only for special
  42. files  ending  in  defined  pattern.   Will  show  the  selected pattern in
  43. window's titlebar.
  44.  
  45. NoDelete  now  checks  if  another  NoDelete is already active and exits if
  46. true.
  47.  
  48.                      CHANGES TO VERSION 1.01: Jul 1990
  49. Now handles protected Files correctly.  Previous version didn't complain if
  50. file was delete protected.
  51.  
  52. NoDelete sets its priority to a value of -5 directly after startup.
  53.  
  54.                     CHANGES TO VERSION 1.00: June 1990
  55. Version  1.01  now  restores  the  Dos Vector relative to _DosBase, so this
  56. program  should  work under Kickstart 1.3 as well.  If someone already uses
  57. Kick 2.0, he or she should let me know if NoDelete works with that.  I have
  58. heard  that  the  funny  instructions  in DosBase have been replaced with a
  59. regular jump table.
  60.  
  61.  
  62.                            WHY USE NODELETE?
  63. I  wrote  this  program  mainly  to  make  the fantastic public domain game
  64. "Omega"  more  enjoyable  to  play.   The author of this program thought it
  65. reasonable to have the system unlink the save-file after having reloaded it
  66. to  somehow  "simulate the continuity of character".  Too bad that NoDelete
  67. does not work correctly with this program...
  68. Footnote: It works now!
  69.  
  70.                               WHAT IT DOES
  71. NoDelete  enables  you  erraneous  humans  to  once  again  reflect  on the
  72. righteousness  of  your  decisions  concerning  the  deleting  of  files on
  73. AmigaDos devices.  If you try to delete a file or a program tries to remove
  74. it,  this  is  mostly  done  via  DeleteFile()  of  the  dos.library.  When
  75. executed,  NoDelete  bends  this  vector to its own routine which brings up
  76. this  cute  little requester on the active window.  This requester contains
  77. the  name  of  the file that the system is trying to delete.  If you really
  78. want  to  delete  this  file,  click to the "Yes, Delete!" gadget.  If not,
  79. click  to the "Oops, no way!"-Gadget of the requester.  NoDelete works just
  80. fine   with   aliases,   wildcards   etc.   For  problems  see  the  "known
  81. bugs"-section of this text.
  82.  
  83.                                  PATTERNS
  84. Lots  of programs, programmers and normal people use patterns in their file
  85. system  to  be  able  to  immediately make out the contents of a file.  For
  86. example,  ".c"  specifies  the file to be a C source code and ".bas" should
  87. contain  a  basic  program's  source.   There  are  tons of frequently used
  88. extensions,  from  ".asm"  up to ".cfg".  If you use NoDelete and you don't
  89. want  the  system to get on your nerves by confirming EVERY rm command, you
  90. should  use a certain extension on NoDelete's command line to tell NoDelete
  91. that  it  should  only  ask  confirmation for those precious ".c" or ".iff"
  92. files and let all others alone.
  93.  
  94. The  new  version  of  NoDelete also supports complete filenames as pattern
  95. matching is done via PatternMatch() of ARP.  The command line
  96.  
  97.         1> run nodelete *.c
  98.  
  99. would  tell NoDelete to only intercept the removing of files ending in ".c"
  100. and not to worry about any other files that are removed from the device.
  101.  
  102. You can specifiy up to ten patterns when running NoDelete. The command
  103.  
  104.         1> run NoDelete *.c *.iff *.tex *.asm
  105.  
  106. will  make  NoDelete  complain  about  any  file  which  ends in one of the
  107. specified patterns and leave all others alone.  If you have forgotten which
  108. patterns  you  specified  at startup, just activate NoDelete's titlebar and
  109. press  any key.  NoDelete will then give a list of patterns in the titlebar
  110. until another key is pressed.
  111.  
  112. Another one:
  113.  
  114.         1> run NoDelete Peter Pecker picked a pepper
  115.  
  116. would  intercept  any attempt to remove the files peter, pecker, picked, a,
  117. and pepper.  NoDelete does discriminate between upper or lower case letters
  118. in  filenames.   If the extensions get too long to fit into the titlebar...
  119. well, you won't see them!
  120.  
  121. To make things totally clear, let me cite the ARP programmer's manual:
  122.  
  123. CITE
  124. arp.doc/PatternMatch (V31)
  125.  
  126.      NAME
  127.         PatternMatch - perform a wildcard match on a string
  128.  
  129.      SYNOPSIS
  130.         result = PatternMatch(pat,str)
  131.           D0                 A0   A1
  132.  
  133.      FUNCTION
  134.         This function compares a string to the given pattern and determines
  135.            if it is a valid match.  If so it returns a true result.
  136.            The pattern must be constructed with special preparsed tokens and
  137.            supports the following patterns:
  138.             (p1|p2|p3)  One of the patterns p1, p2 or p3
  139.             ?           Any single character
  140.             #<pat>      Pattern repeated 0 or more times
  141.             [class]     Character class
  142.             [^class]    Negated character class
  143.             {pat}       Structure tag for replacement
  144.             *           0 or more occurances of any character
  145.  
  146.      INPUTS
  147.        char *pat     The pattern string to match against
  148.           char *str     The string to be matched
  149.  
  150.      RESULT
  151.        result - a boolean value indicating success/failure.  The condition
  152.             codes are guarenteed to reflect the status of the result
  153.      
  154.      BUGS
  155.        None known.
  156.  
  157.      SEE ALSO
  158.  
  159.      Author:    JAT
  160. END CITE
  161.  
  162. Right?  So far for all the wildcards you can use with ARP.  IMPORTANT NOTE:
  163. if  you  work  with  Csh  or  WB  1.3  shell,  you  will have to escape the
  164. characters special to these shells, respectively.  To protect all C sources
  165. while in Csh, you would use the syntax
  166.  
  167.         $ run nodelete \*.c
  168.  
  169. to have the special shell wildcard "*" survive on its way to NoDelete.
  170.  
  171.  
  172.  
  173.                            COMMAND LINE OPTIONS
  174. Finally,  HooverSoft  is  proud  to have introduced command line options in
  175. NoDelete.  So far, four options are supported:
  176.  
  177. -p    number    where number is an integer between -20 and 9. If given on
  178.                 the command line, NoDelete will set its priority to this
  179.                 value.  If you type rubbish or use values not allowed, the
  180.                 default priority of -5 is set.
  181.  
  182. -y ypos        where ypos is an integer ranging from zero to 245 (sorry,
  183.                 all you NTSC users...).  This number will determine the ver-
  184.                 tical position of NoDelete's titlebar.  if you try to fool
  185.                 NoDelete or do not give this option, the default value zero
  186.                 (top of screen) is used.
  187.  
  188. -O                Override file protection bit. If this option is given,
  189.                 NoDelete will NOT care about the file's protection status.
  190.                 This option is sort of dangerous, but I think if you are
  191.                 explicitly asked wether you want to delete a file this
  192.                 should be presto! wiped off the disk without return or
  193.                 any other chance of survival..., Anyway, the default now
  194.                 is to consider and respect the file protection.
  195.  
  196. -S                if given, this option tells NoDelete to shut up. No screams,
  197.                 no comments!
  198.  
  199.                                KNOWN BUGS
  200. NoDelete  cannot  take  care of the AmigaDos command Delete.  God knows how
  201. this command erases a disk file...
  202.  
  203. The  Shell  won't complain if you try to delete any non-existent file while
  204. NoDelete  has  its  grip  on  the system.  This is not really a bug because
  205. NoDelete  works  on  this  basis  of  cheating  the  calling  function  and
  206. pretending that everything is just fine and deleted. This also is the cause
  207. that the calling program will not be informed if the file in question
  208. is delete protected.
  209.  
  210.                             THE LEGAL STUFF
  211. NoDelete  is  FreeWare  and  may  be  copied  freely by everyone except for
  212. purposes  listed below as long as this notice is left intact.  This program
  213. is  copyright  (C)  by  HooverSoft.   It  may  NOT  be  copied  or sold for
  214. commercial  purposes  without  written  permssion  by the author (Get lost,
  215. Carsten  Wolf and all you other sharks!).  It may be distributed and copied
  216. freely for non-commercial purposes only.
  217.  
  218. When  distributed,  this program should always be accompanied by this file,
  219. the documentation.
  220.  
  221.                     FURTHER PLANS & HOPELESS DREAMS
  222. I  would  like  to use CreateTask() to launch a separate Task for Nodelete.
  223. This would unlink NoDelete's memory requirements from the current stacksize
  224. of  the  system.  It would be nice if "delete" could also be disabled but I
  225. am not sure how to do this. 
  226.  
  227.                                   CREDITS
  228. I'm very thankful to all those people who have continued to make their
  229. sources available through FreeWare, especially Fred Fish, Udo K Schuermann
  230. (The walrus and maintainer of Akvarium Data Files) and Matt Dillon.
  231.  
  232.                             PUBLIC FEEDBACK
  233. Bug  reports  (cheers, Jensi & John!), criticism, comments and approvements
  234. should be sent to
  235.                         
  236.                 SNAIL:
  237.                               HooverSoft Inc.
  238.                             Joellenbecker Weg 4
  239.                               D-4900 Herford
  240.                                   Germany
  241.  
  242.                 BITNET:            
  243.                           hoover@math4.uni-bielefeld.de
  244.  
  245.                                 DISCLAIMER
  246. Do  whatever you like with this program, but listen:  you can't blaim it on
  247. me if anything goes down the drain!
  248. Have fun,
  249. Hoover
  250.  
  251. --
  252. "It's impossible to make things foolproof because fools are so ingenious..."
  253.