DLINE/DLINE 286 v1.2 by Lee Jackson Copyright 1992 Lee Jackson All Rights Reserved. ========================================================================= WHAT IS DLINE? --------------- DLINE is a simple utility program that has but one aim: to take a sorted text file (line limit 256 characters) and delete any duplicate lines therein. The resulting "outputfile", with no duplicate lines, is then written to disk, preserving the original "inputfile" in case of errors. WHY DLINE? ----------- Although DLINE will work with any file that you want to kill duplicate lines in, it was inspired to be a utility for the GoldED message reader, written by Odinn Sorensen. GoldED v2.40 has a useful little feature that will allow you to create a list of all the users in a particular FidoNet (or other net) echo. I have found this to be very helpful in my duties as Co-Moderator of the FidoNet International Shareware Echo. However, there is one drawback to the "userlist" feature: it simply writes all of the names and origins found in your message base to your userlist, appending if a list already exists. GoldED does not look at your userlist first - if a name is in both your current list and in your message base, you will get a duplicate entry in your userlist. At first, I didn't mind deleting the duplicates by hand, but as my userlist grew, I started looking for a better way to handle this. The result was DLINE. HOW TO USE DLINE ----------------- First, you should note that DLINE comes in two flavors: a version that will run on 8086/8088 compatibles (DLINE.COM), and a version that requires an 80286 or better to run (DLINE286.COM). To install DLINE or DLINE 286, simply copy the appropriate .COM file into a directory that is included in the PATH statement of your AUTOEXEC.BAT file. The program is invoked as follows: DLINE inputfile outputfile The inputfile must exist in the current directory, or a full path and filename must be given to an existing file. The file should be sorted (using the DOS SORT command or another sorting program). The outputfile will be written to the current directory unless a full path and filename are given. NOTE - IF THE OUTPUTFILE ALREADY EXISTS, IT WILL BE OVERWRITTEN. Examples: DLINE foo.txt bar.txt This will take the sorted file foo.txt in the current directory, scan it for duplicate lines, and create the file bar.txt in the current directory (with no duplicate lines). DLINE foo.txt c:\fubar\bar.txt This will perform the same as above, but will write its output to the file bar.txt in the directory c:\fubar\. For batch file use, DLINE will exit with the following errorlevels upon completion: 0 = Success! 1 = Improper invocation (must have both an inputfile & an outputfile) 2 = Same file specified for input and output (they must be different) 3 = Error opening inputfile 4 = Error opening outputfile 5 = Error writing to outputfile 6 = Error closing inputfile 7 = Error closing outputfile FILES IN THE ARCHIVE -------------------- First, you should note that DLINE comes in two flavors: a version that will run on 8086/8088 compatibles, and a version that requires an 80286 or better to run. With that in mind, here are the files in this archive: README.TXT (This File) DLINE.COM (DLINE - The 8086/8088 version) DLINE286.COM (DLINE 286 - The 80286+ version) If you have an 80286 or better, I recommend that you use DLINE 286. Of course, you may rename DLINE286 to DLINE for the sake of simplicity: the program will let you know at startup which version you are using (either DLINE or DLINE 286). ========================================================================= Packages used to create these tidbits: Borland Turbo C++ v3.0 VEDIT PLUS v3.60 Tested under MS-DOS v5.0, using 4DOS v4.01 (Revision B), on a generic 80286 clone system. Your results may vary. Version History - v0.1 08/12/92 First Test Version - v1.0 08/12/92 Added comments & increased array length to 82 - v1.1 08/13/92 Added check for the same name on command line Added support for inequal length lines Added support for 256 characters per line Added a version compiled for 286 instruction set (DLINE 286) - v1.2 08/14/92 Fixed bug in "success" exit errorlevel Fixed bug in 256 character length line handling Squashed potential bug if the line after a duplicate was shorter than the dup line ========================================================================= TRADEMARKS MS-DOS is a registered trademark of Microsoft Corporation. 4DOS is a registered trademark of JP Software Inc. GoldED is a trademark of Odinn Sorensen. Turbo C++ is a registered trademark of Borland International, Inc. VEDIT is a trademark of Greenview Data, Inc. ========================================================================= DLINE and DLINE 286 are not in the public domain. You may use DLINE and/or DLINE 286 on your system, and you may distribute copies of the original archive (which must include all of the files listed above) to your friends and/or BBS systems, as long as you do not modify any of the files in the archive in any way. I am not (yet) a professional programmer, so technical support is extremely limited. Due to this, I do not expect much in the way of compensation from users. If you like DLINE/DLINE 286, a contribution of up to $10 U.S. from individual users would be appreciated and would encourage whatever future development possibilities exist. Corporate users must contact the author via mail for a site license prior to use, the details of which are negotiable. Contributions (check or money order in US funds only - no cash or credit cards), bug reports, post cards, and other correspondence may be sent to: Lee Jackson 130 Dove Lane Kyle, TX 78640 USA I can be reached electronically via the following methods: FidoNet - NetMail Address 1:382/95 (Private Node - Hub-Route all NetMail) Internet - ljackson@mdf.fidonet.org CompuServe - 78640,2743 There are no warranties whatsoever on DLINE or DLINE 286. If you install a copy of it, I guarantee only that it will take up disk space. I do not guarantee anything else, nor will I be held responsible for any damages, consequential or otherwise, resulting from its installation or use.