This is a small C program to compare text files side-by-side.
build.bat
is a short batch/bash script to build the program.
It has no dependencies except C99 and POSIX extensions; simply gcc comparer.c
will build the executable.
comparer.c
and vector.h
are the only source files needed to build comparer
.
This should work with no extra incantations on Mac, Linux, Windows Linux Subsystem, and MinGW/Cygwin.
Give the comparer
executable two filenames as command-line arguments.
The output is colored with ANSI colors and should work on most terminals, but probably shouldn't be saved to a file.
Like the standard diff
tool, it finds a longest-common-subsequence between the two input files' lines, and
considers any lines not part of that common subsequence to be deletions/insertions.