This article provides a simple C++ WIN32 tool to perform diffs on arbitrary files. It also features a nice and workable HTML output.
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- diff html gen, (c) Stephane Rodriguez - feb 2003 -->
<HTML>
<HEAD>
<TITLE> File Diff </TITLE>
<style type='text/css'>
<!--
.N { background-color:white; }
.C { background-color:#FFFFBB; }
.A { background-color:#BBFFBB; }
.D { background-color:#FFBBBB; }
-->
</style>
</HEAD>
<BODY BGCOLOR='#FFFFFF'>
<table border=0 bgcolor=0 cellpadding=1 cellspacing=1 width=100%><tr><td>
<table width=100% bgcolor=white border=0 cellpadding=0 cellspacing=0>
<tr bgColor='#EEEEEE' style='color:0'><td width=50%>old version</td><td width=50%>new version (<b style='background-color:#FFFFBB;width:20'> </b>changed <b style='background-color:#BBFFBB;width:20'> </b>added <b style='background-color:#FFBBBB;width:20'> </b>deleted) </td></tr>
<tr bgColor='#EEEEEE' style='color:0'><td width=50%><code>C:\tmp\diff\BOOKSHOP.XML</code></td><td width=50%><code>C:\tmp\diff\BOOKSHOP2.XML</code></td></tr></table>
</td></tr>
</table>
<br>
<table border=0 bgcolor=0 cellpadding=1 cellspacing=1 width=100%><tr><td><table width=100% bgcolor='#EEEEEE' border=0 style='color:#888888;font-family: Arial, Helvetica, sans-serif; font-size: 9pt'>
<tr><td width=50%><?xml version="1.0" encoding="UTF8"?></td><td width=50%><?xml version="1.0" encoding="UTF8"?></td></tr><tr><td width=50% class='D'><!DOCTYPE Bookstore SYSTEM "bookshop.dtd"></td><td width=50%> </td></tr><tr><td width=50%><Bookstore></td><td width=50%><Bookstore></td></tr><tr><td width=50%> <!--J&R Booksellers Database--></td><td width=50%> <!--J&R Booksellers Database--></td></tr><tr><td width=50%> <Book Genre="" In_Stock="Yes"></td><td width=50%> <Book Genre="" In_Stock="Yes"></td></tr><tr><td width=50%> <Title>The Round Stephane Door</Title></td><td width=50%> <Title>The Round Stephane Door</Title></td></tr><tr><td width=50%> <Author>Tom Evans</Author></td><td width=50%> <Author>Tom Evans</Author></td></tr><tr><td width=50%> <Year_Published>1996</Year_Published></td><td width=50%> <Year_Published>1996</Year_Published></td></tr><tr><td width=50%> <ISBN>0-9546-0274-3</ISBN></td><td width=50%> <ISBN>0-9546-0274-3</ISBN></td></tr><tr><td width=50%> <Price>$23.00</Price></td><td width=50%> <Price>$23.00</Price></td></tr><tr><td width=50%> <Review>An Intriguing Tale Of A Round Door In A Wall</Review></td><td width=50%> <Review>An Intriguing Tale Of A Round Door In A Wall</Review></td></tr><tr><td width=50%> </Book></td><td width=50%> </Book></td></tr><tr><td width=50%> </td><td width=50% class='A'> <Book Genre="" In_Stock="Yes"></td></tr><tr><td width=50%> </td><td width=50% class='A'> <Title>The Round Stephane Door</Title></td></tr><tr><td width=50%> </td><td width=50% class='A'> <Author>Tom Evans</Author></td></tr><tr><td width=50%> </td><td width=50% class='A'> <Year_Published>1996</Year_Published></td></tr><tr><td width=50%> </td><td width=50% class='A'> <ISBN>0-9546-0274-3</ISBN></td></tr><tr><td width=50%> </td><td width=50% class='A'> <Price>$23.00</Price></td></tr><tr><td width=50%> </td><td width=50% class='A'> <Review>An Intriguing Tale Of A Round Door In A Wall</Review></td></tr><tr><td width=50%> </td><td width=50% class='A'> </Book></td></tr><tr><td width=50%> <Book Genre="Non-Fiction" In_Stock="Yes"></td><td width=50%> <Book Genre="Non-Fiction" In_Stock="Yes"></td></tr><tr><td width=50%> <Title>Creating Real Xml Applications</Title></td><td width=50%> <Title>Creating Real Xml Applications</Title></td></tr><tr><td width=50%> <Author>Bill Eaton</Author></td><td width=50%> <Author>Bill Eaton</Author></td></tr><tr><td width=50%> <Year_Published>1998</Year_Published></td><td width=50%> <Year_Published>1998</Year_Published></td></tr><tr><td width=50%> <ISBN>7-4562-0167-8</ISBN></td><td width=50%> <ISBN>7-4562-0167-8</ISBN></td></tr><tr><td width=50%> <Price>$35.00</Price></td><td width=50%> <Price>$35.00</Price></td></tr><tr><td width=50%> <Review>A Look At How To Build Real Xml Applications</Review></td><td width=50%> <Review>A Look At How To Build Real Xml Applications</Review></td></tr><tr><td width=50%> </Book></td><td width=50%> </Book></td></tr><tr><td width=50%> <Book Genre="Fiction" In_Stock="No"></td><td width=50%> <Book Genre="Fiction" In_Stock="No"></td></tr><tr><td width=50% class='C'> <Title>Over The Hills Of Yukon2</Title></td><td width=50% class='C'> <Title>Over The Hills Of Yukon</Title></td></tr><tr><td width=50%> <Author>Bert Colewell</Author></td><td width=50%> <Author>Bert Colewell</Author></td></tr><tr><td width=50%> <Year_Published>1993</Year_Published></td><td width=50%> <Year_Published>1993</Year_Published></td></tr><tr><td width=50%> <ISBN>5-6524-3054-1</ISBN></td><td width=50%> <ISBN>5-6524-3054-1</ISBN></td></tr><tr><td width=50% class='D'> <Price>$22.00</Price></td><td width=50%> </td></tr><tr><td width=50%> <Review>A Warm Story About A Man And A Moose In Yukon</Review></td><td width=50%> <Review>A Warm Story About A Man And A Moose In Yukon</Review></td></tr><tr><td width=50%> </Book></td><td width=50%> </Book></td></tr><tr><td width=50%> <Book Genre="Fiction" In_Stock="Yes"></td><td width=50%> <Book Genre="Fiction" In_Stock="Yes"></td></tr><tr><td width=50%> <Title>The Lion's Gold</Title></td><td width=50%> <Title>The Lion's Gold</Title></td></tr><tr><td width=50%> <Author>Daphne Griswald</Author></td><td width=50%> <Author>Daphne Griswald</Author></td></tr><tr><td width=50%> <Year_Published>1989</Year_Published></td><td width=50%> <Year_Published>1989</Year_Published></td></tr><tr><td width=50%> <ISBN>6-7896-2498-2</ISBN></td><td width=50%> <ISBN>6-7896-2498-2</ISBN></td></tr><tr><td width=50%> <Price>$15.00</Price></td><td width=50%> <Price>$15.00</Price></td></tr><tr><td width=50%> <Review>One Of The Most Compelling Books Since "The Tiger's Silver".</Review></td><td width=50%> <Review>One Of The Most Compelling Books Since "The Tiger's Silver".</Review></td></tr><tr><td width=50%> </Book></td><td width=50%> </Book></td></tr><tr><td width=50%></Bookstore></td><td width=50%></Bookstore></td></tr></table></td></tr></table>
<br><font size='-2' color='#BBBBBB'>S.Rodriguez, Feb 2003</font></BODY>
</HTML>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.