TrimLog V1.02 ~~~~~~~~~~~~~~~ (c) David Dustin / ECLIPSE Software 28 January, 1993 Preface ~~~~~~~ The programs and files in this distribution are freely distributable, but are also Copyright (c) David Dustin. They may be freely distributed as long as no more than a minimum fee is charged to cover time and copying costs. Permission is given for this distribution archive to be placed into Public-Domain collections such as the Amiga Library run by Fred Fish. They may also be made freely available to any REGISTERED Excelsior! BBS sysops, and may be placed on any Support BBS's for the Excelsior! BBS. If you do decide to make use of TrimLog, you are suggested to send any form of donation or gift as payment. This will get you the latest version of TrimLog, and also any other programs I have released. Written in 100% pure assembly using Devpac 3.02. The source code is enclosed in this archive. If you make any changes, and decide to release a version to the general public, please at least send me a copy, so I know not to use the same revision number. If you do have any suggestions, bug notes or ideas about this program, or if you would like to donate something, please let me know. Write to me at the following address: David Dustin 30 Richmond Ave Palmerston North NEW ZEALAND Or I can be contacted via: dave@eclipse.acme.gen.nz Contents ~~~~~~~~ 1. An introduction 2. Requirments 3. Usage 4. History 5. Future 6. Credits / Copyrights 1. An Introduction ~~~~~~~~~~~~~~~~~~~ TrimLog was written after a request by Renze. He was working on a Who's Called program to go with our Excelsior! BBS's, and normal programs that cut back a file to a required number of lines don't work, seeing as Excelsor! logs are very strange :) Also, TrimLog now is a normal TrimFile program as well, thus allowing you to reduce a file to a certain number lines very quickly. 2. Requirments ~~~~~~~~~~~~~~~ TrimLog can only be used on machine with at least V37 of the DOS library (seeing as Excelsior only works with V37+ I decided not to provide support for < V35 ). 3. Usage ~~~~~~~~~ TrimLog can only be used from the CLI/SHELL. The arguments available are: NAME/A,ENTRIES/N,L=LINE/S NAME - This is the name and path of the logfile to trim. It is designed only to work with the CALLERS log, not any of the others (yet). ENTRIES - This is the number of entries you want left in the log. This defualts to 10. If you want more entries than there currently are available, then nothing will be changed. L=LINE - If either a L or LINE are present on their own in the command line, TrimLog will become a TrimFile program, reducing a text file to a certain number of lines from the bottom up. Each line can be as long as you like, as it uses the CR character as the terminator. If the LINE option is selected, the defualt for ENTRIES becomes 100. Eg. If you had a text-file which is 1000 lines long, and you went: TRIMLOG 500 LINE the file would now only contain the LAST 500 lines of the file. 4. History ~~~~~~~~~~~ V1.00 23 January 93 * First release. V1.01 25 January 93 * Corrected error with write to disk routine. Would add several nulls onto the end of the file. V1.02 28 January 93 * Added TrimFile routine to code. Nows acts like TrimFile and reduces a text file to a certain number of lines. 5. Future ~~~~~~~~~~ - Include a file requestor - Allow usage from WorkBench 6. Credits / Copyrights ~~~~~~~~~~~~~~~~~~~~~~~~ Main code - David Dustin Ideas/Bug testing - Renze de Ruiter TrimLog - (c) 1993 David Dustin Excelsior! BBS - (c) 1992 Sycom Devpac 3 - (c) 1985-92 HiSoft Kickstart/Workbench - (c) 1985-91 Commodore-Amiga, Inc.