Copyright: "Copyright (C) 1995 Skimrest Ltd."


Match For Windows

Contents

Overview

Display

Selecting Files

Options

 	Match Options

 	Display Options

Editor Options

Comments

 	Predefined Comments

 	User Defined Comments

Temporary Comments

The ToolBar

Printing

Refining the Match

Installation\Deinstallation

Registration


Overview
Match For Windows

Overview

Match for Windows is a highly customisable program for comparing any two text based files.

It is most useful for finding changes that may have caused problems in program source code, batch or INI files.  It improves considerably on basic DOS based file match commands in the degree of control you have over which parts of the file are matched.

Any line can be designated a comment, and (if so wished) excluded from the match process.

Standard programming and batch file comments such as // REM  ;  are pre-defined, but you can also classify any required string as a comment (up to 7 per match).

Both files are displayed  with differences highlighted in colour, and in addition there is also a summary listing of differences.

The files to be matched must be normal ASCII or ANSI  text files; to compare Visual Basic forms and modules, ensure that they were saved in VB with Use Save As Text checked.  The maximum line length is 255 characters and any lines longer than this will be truncated.


Match for Windows - Display
Match For Windows

Display

File display

The typical match layout has the two files displayed side by side, with each line displayed in one of four colours.

A line can be

•	Unmatched - default colour grey.
Lines are unmatched if a file has been replaced and a new match not done, or if  no match was found within the current Look Ahead

•	Matching - default colour is the current windows text colour.
Line matches line on the other file.

•	Difference - default colour blue.
Line is either different or additional.

•	Comment - default colour green.
Line has been specified as a comment  and the ignore comments when matching box in the Match Options  dialog has been selected (this is selected by default).

Match Summary

The match summary, initially displayed below the file layouts, gives matching line numbers and lists different or additional lines in both files.   This text can be printed (using Print from the file menu, or the print button on the toolbar) or saved as an Ascii text file (using Save Text from the file menu or the save button on the toolbar}.


Selecting Files
Match For Windows

Selecting Files

Files to be matched can be selected in several ways.

When initially loading Match for Windows, dialog boxes normally request the files to be matched.  Alternatively one or two files can be specified on the Command Line, and these will be initially loaded instead.  If either of the files mentioned does not exist then match will request a file as normat.

Either of both of the files can be replaced using File/Replace menu options or the replace buttons on the Toolbar

Alternatively files can be dropped from File Manager directly into Match for Windows.  Only two files can be dropped at any one time - any additional files will be ignored.

To replace the second file the dragged file must be dropped directly onto the open second file window, dropping anywhere else will result in the first file being replaced.


Options
Match For Windows

Options

Options for Match for Windows, can be divided into groups:

Match Options which affect the way the match is carried out, and which lines will actually be tested to see if there are matching lines in the other file.  These are changed by the Match Options dialog  - use Options/Match from the menu, or [image] from the toolbar.
On pressing OK to return from the Options dialog, the match will be re-processed.

Display options  which affect the way the results are presented on the screen; the colours used for highlighting, whether or not line-nos and tabs are displayed, and  the fonts used.  They do not alter the match results, and are not available in the Shareware version.  Display options are changed by the Display Options Dialog -use Options/Display from the menu, or [image] from the toolbar.

Editor options sets your preferred text editor, and whether or not both files are loaded for editing

.


Comments
Match For Windows

Comments

Match for Windows uses comments as the means of controlling the match process.  Any line that is deemed to be a comment (shown in a different colour in the file display) can be ignored while a search for matching lines is being made.

This can be used, not just to omit standard program comments, set up as Predefined comments  but also to declare any line as a User defined comment, perhaps  to refine the match to prevent  false matches.

Defining and activating comments is  done in the Match Options dialog.

In addition, you can temporarily exclude lines from the match process, by using the mouse to desginate required lines as comments.  Use [image] from the Toolbar  or Set Comments from the Perform menu to start the process.

.


Temporary Comments
Match For Windows

Temporary Comments

To  temporarily exclude lines from the match process, enter Set Comments mode via [image] from the Toolbar or Set Comments from the Perform menu.

In comment setting mode () use a left mouse click on required lines to set comments, and a right mouse click to unset. (Line will be displayed as unmatched).  Use click and then shift click to select a block of lines.

Comment setting mode is indicated by a changed mouse cursor,  most of the normal match functions are disabled and the setting tool is replaced by the end setting tool [image] or  End Set Comments on the perform menu. (Only one of the set comments buttons is displayed at any one time).  When you end comment setting mode the files are automatically rematched.

Manually set comments are not permanent - loading the match options dialog (unless you exit it with cancel) will cause them to be reset to their normal status.

If you enter coment setting mode wihen differences only are displayed, designated comments will still be shown, but in the appropriate comment colour, until you exit comment setting mode.


Match Options
Match For Windows

Match Options

Ignore blank lines when matching

If  blank lines are compared it is easy for the match to get out of sync.   For most purposes it is safer to ignore blank lines.

Ignore comments while matching

This is an 'override' on/off switch for the comments set in the remainder of the dialog.  It allows you to see the effect of matching all lines, without changing your comment settings.

Expand tabs

Tabs will be expanded prior to matching - this can avoid problems which arise when lines appear identical, but in one of the  files spaces have been used instead of a tab character.  However it is slow in execution and should be used with caution.

This does not affect the display - tabs are always expanded in the file and summary displays, unless you request otherwise in the display option dialog, in which case a marker will be output instead.

Tab size

The tab size is used both in expanding tabs and in the file and summary displays.

Look Ahead

The look ahead determines how far the files will be searched for  matching lines, once a disparity has been found.  The default is 100 lines, after which a message will be placed in the summary text stating that no further match can be found.

If you are matching files with lengthy blocks of inserted code, then this value can be increased, however too high a value may slow down the program if you are trying to compare completely non-matching files.

Restrict Columns

For ease of matching tabular-style data files, the match can be restricted to a limited number of columns, specifed as start column and end column.  These must both lie in the range 0-255 but will only be used if the restrict columns box is checked.  It is recommended that a fixed font is used for the file display for this type of match.  Lines shorter than the start column  will be classified as comments and ignored.

Specify Comments

The remainder of the match options dialog relates to setting and activating comments.

This is divided into sections for predefined and user defined comments.:

Predefined Comments cannot be changed, but only those selected as being appropriate for the current file will take part in the match process.

User defined comments allows you to specify up to 7 strings whose presence at the beginning of a line will be treated as a comment.  A string must be both present and active to be used in the match settings.


Predefined Comments
Match For Windows

Predefined Comments

There are two types of predefined comments -

single line comments
A  line is declared a comment if any of these are found at the beginning (ignoring space and tab characters) of the line.

block comments
If the first character(s)  of the pair is found at the beginning of a line, all lines up to and including the line in which the terminating character is found are classified as  comments.
Note, however that 'C' style inline comments are ignored  - any line containing an inline comment will be matched unless meeting some other criteria.

For a predefined comment  to be ignored in the matching process it is essential that both the comment itself is selected, and that the ignore comments box while matching is not checked.


User Defined Comments
Match For Windows

User Defined Comments

Specifying the comment

You can specify any required string to be treated as a comment if encountered at the beginning of a line.

For a line to be treated as a comment, enter the required string into the Text String box.

If you want any line starting with these characters to be a comment, check the Leading substring box.  If  the leading substring box  is not checked then the line will only be treated as a comment if the entire line matches the text string.

You also have the option of ignoring the case of the string.

Using the Comment

A specified comment is only  treated as such if  the Active box is checked and the ignore comments while matching box is also checked.

As the defined strings are preserved, this allows you to define several different strings suitable for different types of  files, and only make the most appropriate ones active at any time.


Display Options
Match For Windows

Display options

Note that it is not possible to change the display settings in the unregistered version.

Show Tabs

Sometimes lines are classified as different, when they appear on inspection to be the same, this can usually be caused by tabs in one lfile being replaced by the appropriate number of spaces in the other.  To help identify these situations, the show tabs option will print the tab marker.  Without this option the text is expanded, using default tab settings.

Display only non-matching lines

Only lines that do not match will be shown in the file display.  Blocks of matching lines will be replaced with a single dashed line.

Hide Line Nums

Hides the line numbers in the file display.    It does not remove them from the match summary.

Hide Comments

Removes comments from the file display ( the Ignore Comments when Matching  Match Option must be checked).
Becuase the comments are still present, merely hidden, this causes a slight decrease in scrolling speed.  Additionally scrolling, particularly a single line scroll, may not appear to take effect as you scroll down by one 'comment', just  rescroll until you reach the next displayed line.

Do not Show Filenames in Summary

The summary listing can be quite wide, making it quite wide, and making the printed output difficult to follow unless printed in landscape mode.  This width can be reduced by replacing the filenames with 'File1' and 'File2'.   In the printed output, the filename associated with each will be printed as a header.

Set Colour

Any of the highlight colours can be changed individually, and the potential effect seen in the adjacent display box.  Default Colours returns all four settings to the Match for Windows default settings.

Set Fonts

The font for the file display and the match summary display can be set individually , and the potential effect seen in the adjacent display box.  Default Fonts returns both settings to the Match for Windows default settings.  Note that the summary font does not affect the printed output.


Editor Options
Match For Windows

Editor Options

This option dialog allows you to select your preferred text editor.   Note that a word processor should not normally be used for editing text files as it will save formatting attributes with the file.

You can set Match for Windows to load just the current file, or both files into the editor;  by default two separate copies of the editor will be launched.  Some editors will automatically include the second file as a second child window in the first instance of the editor, but you can ensure that this happens, if your editor can support multiple files, by checking the 'supports multiple files' box.   Note that checking this box for an editor that does not support multiple files may lead to an error.


The Toolbar
Match For Windows

Toolbar

Replaces both match files.

Replaces the first match file.

Replaces the second match file.

Performs the match.  This is only necessary after replacing files, as the match is automatically performed  on initial load, or after changing match options.

Launches Notepad or your chosen editor to edit the file(s) being matched.  By default the currently selected file will be edited, but you can specify in the editor options dialog if you wish to edit both files.  After saving your edits use the match button (or match menu option) to rematch the files - they will be automatically reloaded from disk.  Note that if the files are changed, when you have not launced an editor from within match, you will be given the option not to reload the files.

  A Toggle tool which allows specific lines to be manually excluded from the match by  classifying them as comments.  See Comments.  On entering comment setting mode the button is replaced by [image]  which ends the mode.

Brings up the match options dialog.

Brings up the display options dialog.  This is not available in the unregistered version.

Brings up the editor options dialog.

Prints the match summary text. (If you wish to use a printer other than the default use Select Printer from the file menu.)

Saves the match summary text to an Ascii formatted text file.

Opens this help text.

Rearranges the display so the files being matched are side-by-side in the top two thirds of the current display with the match summary beneath,


Printing
Match For Windows

Printing

A printout of the summary text can be produced by selecting File/Print from the menus, or by using the print button on the toolbar.

As the print is normally quite wide it is recommended that landscape print is used where possible.  This can be set using the Options dialog on the print selection box, or by using the Select Printer command in the File menu.  This command also allows selection of the printer to be used.


Refining the Match
Match For Windows

Refining the Match

A major problem when matching program files is with characters which specify the start or end of a  block eg. {, } or EndIf.  If  these are the only characters in a line, they will frequently cause a false match across added blocks of code eg.

ok = .....	ok = .....
if(!ok)

{	while (....)
      	        //inserted  error handling 	{
}	    statements here
while (....)	}
 {
     statements here
}

The two while blocks should match, but do not because the { in the inserted error handling block produces  a false match with the  { in the while block.

This problem can be avoided by declaring { and } as comments (without specifying leading substring).

Of course you may  then miss errors caused by missing { or } characters! - You pays your money....

Another major cause of such problems is using <p> on a separate line in HTML files eg.

<p>
First paragraph
<p>

Inserted paragraph
<p>

This is the original second paragraph.

You could either declare all <p> as comments in the Match Options dialog or use Set Comments to manually declare the second <p> as a comment line.

.


Installing/Uninstalling
Match For Windows

Installation/Deinstallation

Installing

This version of Match For Windows does not come with an install program.  All files should be copied to a directory of your choice. A Program Manager icon can be created for MATCHWIN.EXE either by using File/New within Program Manager or by dragging from Fle Manager.

The following files should be present:

	MATCHWIN.EXE	The Match for Wndows executable
	MATCHWIN.HLP	This Help file
	REGISTER.TXT	Registration form - will be printed by Match for Windows on request.
	LICENSE.TXT	License details - not required for execution
	FILEID_DIZ	Summary description -  not required for execution
	README.TXT	Installation and other notes  -  not required for execution

Match for Windows also requires the following, widely available files to be present in your  WINDOWS\SYSTEM file:

	COMMDLG.DLL
	CNTL3DV2.DLL
Files marked not required for execution  must be included if the program is distributed, even when passing on to friends, but may be deleted from your system after they have been read and terms accepted.

Uninstalling

To uninstall Match For Windows delete the directory to which you installed the program and any Program manager icons.

In addition a file MATCHWIN.INI will normally have been created in your Windows directory.  This may also be deleted.  In fact, this file may be deleted at any time: Match will revert to all system defaults, and will create a new version.


Registration
Match For Windows

Registration

Match for Windows is SHAREWARE.  You may freely distribute the unregistered version, providing all registration and Readme files are included.  Please do not distribute the registered version without permission of the copyright owners.

If you have the unregistered version of the program you will be given the option of  printing a registration form from the About box.  This includes details of registration fees.

Alternatively CompuServe members can register via CompuServe.   Use the command GO SWREG and follow the menus.

Match for Windows registration id is 8940.

For further information please contact:

SKIMREST LTD.
15, Upton Avenue,
Heaton Mersey,
Stockport,
SK4 3PL

United Kingdom

0161-432-6226

or Email  100775.2007@Compuserve.com

Copyright ©Skimrest Ltd. 1995