FC (c) 1998 Jeremiah Gowdy

Thank you for downloading FC for FreeDOS !

	My name is Jeremiah Gowdy, aka Data, founder of Cold Fusion Elite, a 
programming group for beginner to advanced computer programmers and computer 
Science students.  This is a simple documentation file for FC for FreeDOS, a 
Replacement for FC (file compare) for MSDOS.  FreeDOS is a public project to
develop a totally free, fully functional version of DOS.  FC is one of many 
components written by independent programmers wishing to contribute something
to this excellent project.  To find out more about FreeDOS go to 
http://www.freedos.org  

	Before continuing I would like to thank Pat Villani for writing the 
DOS-C kernel, the heart of FreeDOS.  I know he spent alot more time coding that
than I did writing this simple utility.  FYI: It took 5 hours of straight 
coding to write FC for FreeDOS.

	FC is an excellent mimic of FC for MSDOS.  It uses 99% identical 
strings and symbols.  Basically, I could replace your copy of FC with 
FC for FreeDOS and you wouldn't notice.

	What IS different about FC for FreeDOS ?  Well, a few things.  First,
I have no idea how Microsoft implements FC, except that it was written
in C.  I would guess they used basic file handling, as I did.  No doubt they
implemented it differently, and most likely better than I did.  This will soon
change once I reoptimize my code, but for now, I'll take second place.  Second,
because I implemented it differently than they did, a couple of the switches
they use, are not really used by FC for FreeDOS.  The first switch is /LBn, 
which Microsoft documents as 

	"Sets the number of lines for the internal line buffer.  The
	 default length of the line buffer is 100 lines.  If the 
	 files being compared have more than this number of 
	 consecutive differing lines, fc cancels the comparison"

	The difference with FC for FreeDOS is, we don't use a line buffer, 
therefore there's no need to set a maximum.  What we do use this for, however,
is to set the maximum number of differing lines printed to the screen.  Hence,
although we do not implement the line buffer, FC for FreeDOS works in the same
manner as MS's FC, and even returns the same response when that maximum is 
passed.  The other difference is the /nnnn switch which Microsoft documents as 
follows

	"Specifies the number of consecutive lines that must match 
	 before fc considers the files to be resynchronized.  If 
	 the number of matching lines in the files is less than this
	 number, fc displays the matching lines as differences.  The 
	 default value is 2."

	First, this is one of the most confusing lines I've ever read.  
Basically, they're setting a limit for how long their "resync" engine attempts
to look for a match. Example:

File 1:

Hi bob !
How are you !

File 2:

Hi bob !
Hi ted !
How are you !
	
	As you can see a linear engine would compare the two second lines, then
compare the third to nothing as the first file is exhausted.  The second and
third lines would be reported as different.  Microsoft's engine would "resync"
line 2 from the first file and line 3 from the second file and those lines 
would not be reported as differing.  The only thing reported would be line 2
of file 2.  This is useful in some situations but imposes a limitation.  If
the files are too different MS's FC will return the following message.  
"Resynch failed. Files are too different."  It is then necessary to rerun 
FC with the /LBn option set to a higher number.  I believe that it is foolish
to require the user to set the allocation of memory for a program to properly
operate and for a program to fail rather than simply reallocate it's memory and
restart the operation.  FC for FreeDOS uses a linear comparison algorithm and
therefore has no line buffer.  It does not "resync" line 2 to line 3, as in the
example above.  Although a resync algorithm may be added in the next version,
it will most certainly not allow it's buffers to be or need to be set by the 
user via the /LBn switch.  

	The final differences between FC for FreeDOS and Microsoft's FC are that
Microsoft's FC defaults to binary mode for .EXE, .COM, .SYS, .OBJ, .LIB, or 
.BIN and Microsoft's FC supports wildcards in the file specifications.  Both 
of these will be added in the next version.

	FC is 100% original code.  The code in Microsoft's FC is copyrighted
and no code was copied, removed, viewed, disassembled, or stolen from that
program.  FC was coded from scratch using Borland C++.

        FC is free for private use only.  It may not be modified and
redistributed without the express written consent of Jeremiah Gowdy.  You
may modify and recompile FC's source code, but may not distribute modified
versions.

	Thanks again for downloading FC for FreeDOS.  If you are interested
in programming please check out Cold Fusion Elite, my programmers support and
projects group, where you can ask questions and join people in projects to
further your knowledge of computer science. All who apply are accepted ! 
http://irevolution.ncsdi.net/data/

Please feel free to contact me with your questions/comments.

Jeremiah Gowdy/Data
coldfusion1@geocities.com
http://irevolution.ncsdi.net/data/

All copyrights and trademarks mentioned herein belong to their respected owners.
FC for FreeDOS is in no way associated with or approved by Microsoft Corp.
There are no guarantees of any kind that FC for FreeDOS will work or is safe
to use.  By executing the program you are accepting all liability for all
damages caused directly or indirectly by this program.
