File: index.html

package info (click to toggle)
fldiff 1.1%2B0-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 524 kB
  • sloc: cpp: 3,002; makefile: 134; sh: 27
file content (136 lines) | stat: -rw-r--r-- 6,356 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<html>
<head>
	<title>fldiff - graphical diff program</title>
	<style><!--
		BODY {
			background: #f0f0ff;
			color: #000000;
		}

		A:link, A:visited {
			text-decoration: none;
			font-weight: bold;
			color: #cc0000;
		}

		A:link:hover {
			text-decoration: underline;
			color: #0000ff;
			font-weight: bold;
		}

		PRE, KBD, TT {
			font-size: 90%;
		}
		PRE {
			margin-left: 3em;
		}
	--></style>
</head>
<body>

<h1 align='center'>fldiff - graphical diff program</h1>

<p align='center'>Last Updated: Nov 13, 2006</p>

<p><tt>fldiff</tt> (<a href='#screenshot'>screenshot</a>) is a graphical diff program that shows the differences between two files/directories, or a file/directory and a CVS or Subversion repository. It is inspired by <a href='http://reality.sgiweb.org/rudy/xdiff/' target='_blank'>xdiff</a> (Motif-based) and <a href='http://xxdiff.sourceforge.net/' target='_blank'>xxdiff</a> (Qt-based), whose choice of GUI toolkit has hampered their portability to many of the systems I work with.</p>

<p><tt>fldiff</tt> uses the <a href='http://www.fltk.org/'>Fast Light Toolkit (FLTK)</a> and has been tested on AIX, IRIX, Linux, MacOS X, and Solaris, and should also run on Windows.</p>

<p><tt>fldiff</tt> is copyright 2005-2006 by Michael Sweet and is free software provided under the terms of the GNU General Public License v2. Please report any problems and suggestions on the <a href='http://www.fltk.org/newsgroups.php?gfltk.general'>fltk.general</a> newsgroup.</p>


<h2>News</h2>

<h3>fldiff 1.1 - Nov 13, 2006</h3>

<p>A couple new features and a minor bug fix since the 1.0.1 release:</p>

<ul>

	<li>Now use the GTK+ scheme, when available.</li>
	<li>Added support for running fldiff on Windows.</li>
	<li>Added "ignore whitespace" option for diffs.</li>
	<li>Clicking on the scrollbar's down arrow would cause fldiff to crash if the diff fit in the window.</li>

</ul>

<h2>Downloading fldiff</h2>

<p>The current release of <tt>fldiff</tt> is available here:</p>

<pre>
<a href='fldiff-1.1-source.tar.gz'>fldiff-1.1-source.tar.gz</a>
</pre>

<p>The <tt>fldiff</tt> source code is available via Subversion from the following URL:</p>

<pre>
<a href='http://svn.easysw.com/public/fltk/applications/trunk/fldiff/'>http://svn.easysw.com/public/fltk/applications/trunk/fldiff/</a>
</pre>

<p>You can keep up-to-date by using Subversion to download the source code:</p>

<pre>
<kbd>svn co http://svn.easysw.com/public/fltk/applications/trunk/fldiff/ fldiff</kbd>
</pre>


<h2>Compiling fldiff</h2>

<p>Run the following commands after downloading the tarball:</p>

<pre>
<kbd>./configure
make</kbd>
</pre>

<p>Alternately, you can create an RPM using the following command:</p>

<pre>
<kbd>rpmbuild -ta fldiff-1.1-source.tar.gz</kbd>
</pre>

<h2>Using fldiff</h2>

<p>The current version is very simple. Run <tt>fldiff</tt> with two filenames to show the differences between them, or with one filename to show the changes against the current CVS or Subversion repos:</p>

<pre>
<kbd>fldiff old new

fldiff file
fldiff file :revision

fldiff directory
fldiff directory :revision</kbd>
</pre>

<p>After doing the diff, a window will appear with the diff:</p>

<p align='center'><a name='screenshot'><img src='fldiff.jpg' width='639' height='407' alt='The fldiff Window'></a><br>The <tt>fldiff</tt> Window</p>

<p>The bar in the center of the window shows the changes in the entire file in yellow - the darkened box is the part of the diff you are viewing. If the diff is larger than can be represented in the change bar, a small zoom overlay will appear showing a full window's worth of changes centered at the mouse position.</p>

<p>Click in the change bar to immediately move to that position in the file or the up/down arrow button to move up or down in the diff. You can also use the <kbd>PageUp</kbd>, <kbd>PageDown</kbd>, <kbd>Up</kbd>, <kbd>Down</kbd>, <kbd>BackSpace</kbd>, <kbd>Space</kbd>, <kbd>Home</kbd>, <kbd>End</kbd>, <kbd>N</kbd>, and <kbd>P</kbd> keys to move up and down within the diff. The <kbd>N</kbd> and <kbd>P</kbd> keys show the next and previous changes in the diff, respectively.</p>

<p>Use the scrollbars to scroll within the diff; the scrollbars are linked so scrolling one side also scrolls the other side.</p>

<p>You can search both sides of the diff by pressing <kbd>CTRL+f</kbd> or choosing <var>Find...</var> from the <var>Search</var> menu. Repeat the search by pressing <kbd>CTRL+g</kbd> or choosing <var>Find Next</var> from the <var>Search</var> menu.</p>

<p>Drag the mouse to select the text on either side. Press <kbd>CTRL+a</kbd> to select all of the text on the left or <kbd>SHIFT+CTRL+a</kbd> to select all of the text on the right. Press <kbd>CTRL+c</kbd> to copy the corresponding lines of text to the clipboard.</p>

<p>The <var>File</var> menu allows you to open new diffs and close the current diff. You can also drop files in the diff window to open new diffs or double-click on filenames when comparing directories.</p>

<p>Choose <var>Preferences</var> from the <var>Edit</var> menu to show the preferences dialog which allows you to customize the display. These preferences and the current window size are remembered each time you run the program or open a new file.</p>


<h2>Design Details</h2>

<p>The diff display is implemented in the <tt>DiffView</tt> widget class derived from <tt>Fl_Group</tt>. The <tt>load()</tt> method uses the <tt>diff</tt>, <tt>cvs</tt>, or <tt>svn</tt> commands to obtain a unified diff and then builds an array of lines w/changes that are displayed by the <tt>draw()</tt> method. A custom <tt>handle()</tt> method intercepts mouse clicks and drags in the change bar.</p>

<p>The application window is implemented in the <tt>DiffWindow</tt> widget class derived from <tt>Fl_Overlay_Window</tt>. Inline methods are provided which map to the <tt>DiffView</tt> widget methods, and static callbacks handle the higher-level ops.</p>

<p>The open/compare window is implemented in the <tt>DiffOpenWindow</tt> widget class derived from <tt>Fl_Double_Window</tt>. The file/directory choosers are implemented using the <tt>DiffChooser</tt> widget class, which in turn uses the <tt>Fl_File_Input</tt>, <tt>Fl_File_Browser</tt>, and <tt>FavoritesMenu</tt> classes. Favorite management is handled by the <tt>FavoritesWindow</tt> class.</p>

</body>
</html>