home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Share Gallery 1
/
share_gal_1.zip
/
share_gal_1
/
UT
/
UT135.ZIP
/
MATCH.DOC
next >
Wrap
Text File
|
1990-11-30
|
21KB
|
529 lines
MATCH (Ver. 2.01)
Copyright (C) 1990 SOFTWEST
All Rights Reserved.
_______
____|__ | (tm)
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___| MEMBER
5120 Campbell Ave. Suite 216
San Jose, CA 95130
(408) 370-7095
(408) 370-7096 (FAX)
CIS: 70205,533 (Tom Crosley)
Packing List
------------
The complete MATCH 2.0 evaluation package (typically compressed
into a .ZIP or self-extracting .EXE file) should contain the
following files. Please be sure that each file is present. If
any of these files are missing then the package is not complete
and is not suitable for distribution to others.
File Name: Purpose of File:
------------ -----------------------------------------
MATCH.DOC This text file. User manual, warranty
disclaimer, plus information on registering
your copy of MATCH.
MATCH.EXE The executable program for IBM PC/XT/AT/PS2
and 100% compatible computers running
MS-DOS/PC-DOS 2.10 or later with a minimum
of 256K RAM (and any compatible display).
MATCHDEM.OLD Sample file
MATCHDEM.NEW Sample file with minor differences
ORDER.DOC Self-contained order form/mailer
SYSOP.DOC Information for Bulletin Board System
distribution.
VENDOR.DOC Information and restrictions for disk vendors,
distributors, user groups, and more.
- 1 -
Disclaimer of Warranty
----------------------
Users of MATCH must accept this disclaimer of warranty:
"MATCH 2.0 is supplied as is. SOFTWEST disclaims all
warranties, expressed or implied, including, without
limitation, any warranties of merchantability or
fitness for any purpose.
SOFTWEST does not assume any liability for the use of
this software beyond the original purchase price of
this software.
In no event will SOFTWEST be liable to you for any
additional damages, including any lost profits, lost
savings or other incidental or consequential damages
arising from the use of, or inability to use, this
software, even if SOFTWEST has been advised of the
possibility of such damages."
This program is produced by a member of the Association of
Shareware Professionals (ASP). ASP wants to make sure that the
shareware principle works for you. If you are unable to resolve a
shareware-related problem with an ASP member by contacting the
member directly, ASP may be able to help. The ASP Ombudsman can
help you resolve a dispute or problem with an ASP member, but
does not provide technical support for members' products. Please
write to the ASP Ombudsman at P.O. Box 5786, Bellevue, WA 98006
or send a Compuserve message via easyplex to ASP Ombudsman
70007,3536.
Overview
--------
MATCH is a program designed to compare documents line by line.
For a summary of program usage and options, simply run MATCH with
no parameters. To compare two files run MATCH from the DOS
command line with the following parameters:
C>MATCH old_file_name new_file_name
MATCH will process each file and display the old file's line
numbers on the left and the new file's line numbers on the
right. Each lines contents will be appropriately displayed to
the right of each file's line numbers. If there is a mismatch,
the incompatible lines will be displayed as a deletion from the
old file and/or an addition to the new file. Enter:
C>MATCH MATCHDEM.OLD MATCHDEM.NEW
and the following is displayed:
- 2 -
MATCHDEM.OLD
MATCHDEM.NEW
1 1 Line 111
| |
3 3 Line 333
+------------------------------------------------------
| 4 /DELETED/ Line 555
| 5 /DELETED/ Line 444
|
| 4 **ADDED** Line 444
| 5 **ADDED** Line 555
+------------------------------------------------------
6 6 Line 666
| |
8 8 Line 888
In the above example, the author of the two files had two lines
reversed in his old version. In the newer version of his
document, the lines were in numerical order. Try this example
yourself; the two files are included in the package.
MATCH takes wildcards such as: *.BAT or FILE??.D* For
example, to match two versions of C language source files
contained in directories VER1 and VER2, you could type:
C>MATCH VER1\*.C VER2
and MATCH would compare each file with a .C extension in
directory VER1 with its counterpart in directory VER2.
If a list of specific files needs to be matched on a repetitive
basis, use @files. @Files contain just filenames, with or
without wildcards. For example:
where: @L1 @L2
--- ---
C>MATCH @L1 @L2 THIS.C D:*.C
TEST3 \T\TEST?
TEST5
TEST7
If the above is executed, MATCH will attempt to compare the
following pairs of files:
.\THIS.C D:.\THIS.C
.\TEST3. \T\TEST3.
.\TEST5. \T\TEST5.
.\TEST7. \T\TEST7.
MATCH uses the same algorithm with respect to wildcards that the
DOS 'COMP' command uses. This method assumes that the set of
files represented by the second file name (using wildcards and/or
an @file), is a subset of the set of files represented by the
first file name (also using wildcards and/or an @file).
- 3 -
Options
-------
The options must be preceded by one of these symbols: -, +, or /.
Options may be typed in upper or lower case. Each option must be
entered separately (surrounded by spaces):
-A Ask user for confirmation before displaying more
lines to the screen when it fills up.
This option controls output to console (screen)
allowing the user to display the next line of the
match session (by pressing Enter), the next page
(by pressing the Space bar), or to skip the rest
of the current file comparison and start the next
one (by pressing the Esc key). The latter works
only with filenames containing wildcards or '@'
(response) files.
-Bnnnnn With this option, increase the maximum number of
lines that MATCH can handle at a given time.
nnnnn is the maximum number of lines and must be
less than 65536. The corresponding buffer size
can be determined by:
size = (#lines * 2files * 4bytes)
Since the default number of lines is 20,000 (same
as -B20000), the default buffer size is:
(20,000 * 2 * 4) = 160,000 bytes
This number (160 KBytes) can be added to the
program length plus about 20 KBytes to find the
total amount of memory needed to run MATCH.
-C[n[,n]] Use this option to send codes (condensed, etc.) to
the printer. -C alone sends a condensed code for
Epson printers (15 decimal, 0F hex). To send
several codes, just separate them by commas:
'-C1,2,3,4,5'.
-Dnnn Increase the comparison depth with this option.
MATCH defaults to comparing 150 (same as -D150)
lines before assuming there is no match for the
current line compared in the other file. If
your files have deleted or added text larger than
150 lines use this option.
-F Ignore any existing form feeds. Only applies when
-S is used also.
-H Displays a help screen. This option is useful
when you have typed a long line of filenames and
options, and then need some help. Type -h Enter,
and the help screen is displayed. To continue
where you left off, press F3 and backspace twice.
- 4 -
-I Ignores case during file comparison.
-J With this option, MATCH will not display any
information about files that match exactly. This
is a contrast to the -L option which displays all
lines, no matter what.
-L Display all lines, not just those not found in the
other file.
-Mnnn Number of consecutive lines that must match or
they will be rejected as an addition/deletion.
Used to avoid falsely matching up on common
sequences of lines that might be found several
times in the same document (such as blank lines)
or language files (such as end of functions).
MATCH defaults to 4 lines (same as -M4) that must
match. Consider the case where the following was
produced by MATCH:
FILE.OLD
FILE.NEW
1 1 1111
+---------------------------------------
| 2 /DELETED/ 2222
| 3 /DELETED/ 3333
| 4 /DELETED/ 4444
| 5 /DELETED/ 5555
|
| 2 **ADDED** AAAA
| 3 **ADDED** 3333
| 4 **ADDED** 4444
| 5 **ADDED** BBBB
+---------------------------------------
6 6 6666
| |
8 8 8888
If MATCH was rerun with the -M2 OR -M1 option,
MATCH would then display the following:
FILE.OLD
FILE.NEW
1 1 1111
+---------------------------------------
| 2 /DELETED/ 2222
|
| 2 **ADDED** AAAA
+---------------------------------------
3 3 3333
| |
- 5 -
4 4 4444
+---------------------------------------
| 5 /DELETED/ 5555
|
| 5 **ADDED** BBBB
+---------------------------------------
6 6 6666
| |
8 8 8888
-P Paginate MATCH's output. With this option only,
MATCH displays the files' date and time of last
modification. MATCH will also put the current
date and page number at the top of each page,
and in the case of wildcards, start each pair
of files on a new page.
-R Displays registration information and an order
form. To print a copy of the order form, type:
C>MATCH -R > PRN,
and the instructions will remain on the screen
while the form will be sent to the printer.
-S Ignore spaces and tabs when matching.
-T Change tab size. The default is 8 spaces per tab.
Use this option when the input files were created
in an environment having a different tab size.
-Vnnn Vertical spacing, or lines per page. This only
applies with the -P option, and defaults to 54
lines per page (same as -V54). This of course is
for 6 lines per vertical inch. For 8 lines/inch
use -V76.
-W Disallow wrapping of long lines (i.e., truncate
the lines longer than the screen is wide).
The following line will print, in condensed mode and paginated,
just the differences between all files in directories ONE and
TWO:
C>MATCH -c -j -p ONE TWO >prn
Or, you could redirect the output to a file first, and then print
the file using DOS's background PRINT command.
- 6 -
Error Codes and Messages
------------------------
MATCH returns a status code upon program termination, which can
be tested with the DOS IF ERRORLEVEL command. The status code
for MATCH is the number of file comparisons with mismatches that
occurred. This means that if ten file pairs were matched, and
two pairs mismatched at least once the DOS status code will be
2.
However, there is one exception. If there is some type of
error, such as not being able to find the files, or lacking
sufficient memory for the comparison, the DOS status code is
255.
To efficiently match very large files, up to 65535 lines
(not bytes) each, MATCH does its comparisons using a 32-bit hash
code of each line. It is possible, but unlikely, for two
different lines to have the same hash code. In this case, the
difference is not noticed until the second pass when the files
are listed, and is output as a "jackpot".
History
-------
An early version of MATCH was written in SNOBOL4 by Tom Crosley
on an IBM mainframe around 1970. It was rewritten in PL/M ten
years later when Tom started his consulting company (SOFTWEST),
and was used on several micros. This latest version, written in
C, was done by Devon Sumner who also works for SOFTWEST.
Shareware
---------
Shareware distribution gives users a chance to try software
before buying it. If you try a Shareware program and continue
using it, you are expected to register.
Copyright laws apply to both Shareware and commercial
software, and the copyright holder retains all rights, with a few
specific exceptions as stated below. Shareware authors are
accomplished programmers, just like commercial authors, and the
programs are of comparable quality. (In both cases, there are
good programs and bad ones!) The main difference is in the method
of distribution. The author specifically grants the right to
copy and distribute the software, either to all or to a specific
group.
Shareware is a distribution method, not a type of software.
You should find software that suits your needs and pocketbook,
whether it's commercial or Shareware. The Shareware system makes
fitting your needs easier, because you can try before you buy.
And because the overhead is low, prices are low also. Shareware
has the ultimate money-back guarantee -- if you don't use the
product, you don't pay for it.
- 7 -
MATCH 2.0 is a "shareware program" and is provided at no
charge to the user for evaluation. Feel free to share it with
your friends, but please do not give it away altered or as part
of another system. The essence of "user-supported" software is
to provide personal computer users with quality software without
high prices, and yet to provide incentive for programmers to
continue to develop new products.
Registration
------------
If you find this program useful and find that you are using MATCH
and continue to use MATCH after a 21-day trial period, you must
register it by sending a payment of $25.00 to SOFTWEST. To print
out a registration form, either run the program with the -R
option, e.g.
MATCH -R >PRN
or print the file ORDER.DOC (which is a combination order form
and self-contained mailer):
PRINT ORDER.DOC
When you register, you will be entitled to technical support.
You will also receive a disk containing the latest version of the
program, including the source code for MATCH set up to compile
under both Microsoft C 5.1/6.0 and Turbo C 2.0.
The $25.00 registration fee will license one copy for use on
any one computer at any one time. You must treat this software
just like a book. An example is that this software may be used
by any number of people and may be freely moved from one computer
location to another, so long as there is no possibility of it
being used at one location while it's being used at another.
Anyone distributing MATCH 2.0 for any kind of remuneration
must first contact SOFTWEST (see VENDOR.DOC for more
information). This authorization will be automatically granted
to distributors recognized by the Association of Shareware
Professionals (ASP) as adhering to its guidelines for shareware
distributors, and such distributors may begin offering MATCH 2.0
immediately.
You are encouraged to pass a copy the shareware version of
MATCH 2.0 along to your friends for evaluation. Please encourage
them to register their copy if they find that they can use it.
By registering your copy of MATCH 2.0, you will be
encouraging future versions of the program. I hope you enjoy
using MATCH, and let me know what you would like to see in the
next version.
-- Tom Crosley
November, 1990
- 8 -