====================================================================== $VER: ZPCheckZC.doc 36.4 (22.2.94) Copyright (c) 1994 Ralph Seichter ====================================================================== PURPOSE: ZPCheckZC ist a tool to check ZCONNECT(tm) data buffers for consistency. A return value of 0 (RETURN_OK) signals a puffer which looks ok, a value of 5 (RETURN_WARN) will be returned when there are detectable errors. This behaviour makes embedding ZPCheckZC in OS scripts an easy task. ZPCheckZC can also recover valid segments of erroneous files. REQUIREMENTS: ZPCheckZC requires dos.library V36+ and the utility.library, both are part of the OS 2.04 distribution set. This tool was designed to run on any Amiga platform with Kick 37.175 or better. COMMAND TEMPLATE: ZPCheckZC FILE/A,BUFFERS/K/N,PATH/K,PICKY/S Of course FILE is the name of the file which is to be checked. The PICKY switch will determine which errors are considered fatal. Being picky, any error will treated as a fatal one and the scan immediately aborts. Without the PICKY switch (which is off by default), ZPCheckZC will try to scan the buffer file as far as possible. The scan will currently only abort if the message size header info "LEN:" is not found for a message or if the size is considered invalid. BUFFERS determines how many buffers of 1024 Bytes each will be reserved in memory (default = 32). If you specify an output PATH, ZPCheckZC will attempt to recover parts of the input file and write defective messages to a seperate file (note that you shouldn't use PATH and PICKY together as the scan would stop after the first error detected). USAGE EXAMPLE: [1] Shell $ ZPCheckZC dh2:data/foo PATH t: ZPCheckZC 36.4 (22.2.94) Copyright © Ralph Seichter 19904-20083: missing "BET:" 21201-21472: missing header data 29857-30278: missing "ABS:" "MID:" 41468-42005: invalid "EDA:" 42234-42383: warning, no message body 42743-42997: invalid length, exiting File "dh2:data/foo" has errors. As you can see, ZPCheckZC was invoked without the PICKY option which would have aborted the scan after the first error. In each report line, you are first presented the byte offset range of the header in which the error was found (-), then the error description is stated. The first error of this example reports that in the message header found between offset 19904 and offset 20083 of file "foo", the header "BET:" is missing (this header is a vital one). The second error is given when some vital header wasn't followed by any data. Error number three is similar to number one, error number four states an invalid entry for header "EDA:", which is the message date. The following warning message is displayed when there's no message body (message size equals 0, this is no error). The last error reports an invalid entry for the message size "LEN:", which is currently the only situation from which ZPCheckZC can't recover. Note that, for this example, ZPCheckZC will create the files "t:foo.good" and "t:foo.bad" (empty output files will be deleted when processing ends). If you want to use the current directory as the output path, just specify PATH="" (the empty string). COPYRIGHT NOTICE: ZPCheckZC is Copyright (c) 1994 Ralph Seichter. You may however make any number of copies for personal use and you may give copies to your friends, as long as you don't charge them a fee for doing so. You may *NOT* include ZPCheckZC in any software package whatsoever without my written permission! You can contact me via the following addresses (e-mail preferred): Ralph Seichter zodiac@darkness.gun.de Deutscher Ring 6 50354 Huerth, GERMANY ZCONNECT(tm) is a registered trademark of ZERBERUS GmbH. ZERBERUS(tm) is a registered trademark of Wolfgang Mexner. DISCLAIMER: YOU USE THIS SOFTWARE ENTIRELY AT YOUR OWN RISK !!! I'm not responsible for any damage, whatsoever, which might possibly result from using this program. Don't come running to me if ZPCheckZC causes your neighborhood to go up in flames... :) HISTORY: V36.1 (02.02.94): First public release. V36.2 (09.02.94): BUFFERS and message recovery via PATH added. V36.3 (16.02.94): Bug fix. V36.2 reported empty ROT-Strings as an error, which of course was an incorrect behaviour. V36.4 (22.02.94): Bug fix. V36.3 treated a message size of 0 as an error and aborted. New V36.4 will continue after printing a warning message. Empty output files will be deleted.