Debian Codegraph @

index.html

raw symbols SCIP
1 <html>
2 <head>
3 <title>fldiff - graphical diff program</title>
4 <style><!--
5 BODY {
6 background: #f0f0ff;
7 color: #000000;
8 }
9
10 A:link, A:visited {
11 text-decoration: none;
12 font-weight: bold;
13 color: #cc0000;
14 }
15
16 A:link:hover {
17 text-decoration: underline;
18 color: #0000ff;
19 font-weight: bold;
20 }
21
22 PRE, KBD, TT {
23 font-size: 90%;
24 }
25 PRE {
26 margin-left: 3em;
27 }
28 --></style>
29 </head>
30 <body>
31
32 <h1 align='center'>fldiff - graphical diff program</h1>
33
34 <p align='center'>Last Updated: Nov 13, 2006</p>
35
36 <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>
37
38 <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>
39
40 <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>
41
42
43 <h2>News</h2>
44
45 <h3>fldiff 1.1 - Nov 13, 2006</h3>
46
47 <p>A couple new features and a minor bug fix since the 1.0.1 release:</p>
48
49 <ul>
50
51 <li>Now use the GTK+ scheme, when available.</li>
52 <li>Added support for running fldiff on Windows.</li>
53 <li>Added "ignore whitespace" option for diffs.</li>
54 <li>Clicking on the scrollbar's down arrow would cause fldiff to crash if the diff fit in the window.</li>
55
56 </ul>
57
58 <h2>Downloading fldiff</h2>
59
60 <p>The current release of <tt>fldiff</tt> is available here:</p>
61
62 <pre>
63 <a href='fldiff-1.1-source.tar.gz'>fldiff-1.1-source.tar.gz</a>
64 </pre>
65
66 <p>The <tt>fldiff</tt> source code is available via Subversion from the following URL:</p>
67
68 <pre>
69 <a href='http://svn.easysw.com/public/fltk/applications/trunk/fldiff/'>http://svn.easysw.com/public/fltk/applications/trunk/fldiff/</a>
70 </pre>
71
72 <p>You can keep up-to-date by using Subversion to download the source code:</p>
73
74 <pre>
75 <kbd>svn co http://svn.easysw.com/public/fltk/applications/trunk/fldiff/ fldiff</kbd>
76 </pre>
77
78
79 <h2>Compiling fldiff</h2>
80
81 <p>Run the following commands after downloading the tarball:</p>
82
83 <pre>
84 <kbd>./configure
85 make</kbd>
86 </pre>
87
88 <p>Alternately, you can create an RPM using the following command:</p>
89
90 <pre>
91 <kbd>rpmbuild -ta fldiff-1.1-source.tar.gz</kbd>
92 </pre>
93
94 <h2>Using fldiff</h2>
95
96 <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>
97
98 <pre>
99 <kbd>fldiff old new
100
101 fldiff file
102 fldiff file :revision
103
104 fldiff directory
105 fldiff directory :revision</kbd>
106 </pre>
107
108 <p>After doing the diff, a window will appear with the diff:</p>
109
110 <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>
111
112 <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>
113
114 <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>
115
116 <p>Use the scrollbars to scroll within the diff; the scrollbars are linked so scrolling one side also scrolls the other side.</p>
117
118 <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>
119
120 <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>
121
122 <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>
123
124 <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>
125
126
127 <h2>Design Details</h2>
128
129 <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>
130
131 <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>
132
133 <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>
134
135 </body>
136 </html>