\begindata{text,17907684}
\textdsversion{12}
\template{help}
\define{global
}


\chapter{Ezdiff: An interactive diff package for EZ

}
\section{What Ezdiff is

}\leftindent{\section{
}Ezdiff is an interactive \italic{diff} package for \helptopic{EZ}. It can 
compare two similar text buffers, and find any differences between them. 
You can then highlight the lines containing the differences, one at a time.


Ezdiff uses the stardard Unix \italic{diff} command, which doesn't 
understand styles and insets. Therefore, if there is a difference in the 
styles but not in the text, Ezdiff will not notice it. Similarly, if there 
is a difference in the contents of an inset, Ezdiff will not notice that. 
(It \italic{will} notice if there is an inset in one file which is missing 
entirely in the other.)


If you have your text organized in automatically-wrapped paragraphs with a 
newline at the end of each paragraph, Ezdiff will be less specific. It will 
only be able to locate differences by paragraph; each entire paragraph 
which contains one or more differences will be marked. This is, again, 
because Unix \italic{diff} treats such paragraphs as one long line, and 
cannot locate differences more precisely than by line.


To enable Ezdiff, add the following lines to your ezinit file:


addmenu ezdiff-start "Diff,Start~40" textview

addmenu ezdiff-current "Diff,Current~20" textview

addmenu ezdiff-next "Diff,Next~21" textview

addmenu ezdiff-last "Diff,Last~22" textview

addmenu ezdiff-change "Diff,Change~30" textview


These lines create a new \italic{Diff} menu card containing five options: 
\bold{Start}, \bold{Current}, \bold{Next}, \bold{Last}, and \bold{Change}. 
  If you wish, you can also bind the functions listed above to keybindings. 
For example:


addkey ezdiff-next ^X^Z textview

addkey ezdiff-start ^X^A textview


If you want to learn more about keybindings, or initfiles in general, see 
the \italic{ \helptopic{initfiles} } help document.

}
\section{Starting Ezdiff}

\leftindent{
Before using Ezdiff, you must start an EZ window with one file, split the 
window, and visit the file that you want to diff in the new window.  To 
start Ezdiff on the two files, click inside the first file, expose the 
menus, and choose "Start."  Then click in the second window and choose 
"Start" from the menus in that window.  You will see the following prompt 
before the diff begins:


Ignore blanks ? [n]  


To ignore the blanks in the file, type "y" and press Enter.  To include 
blanks in the diff, just press Enter. When the diff is finished, the 
message "Diff completed" appears in the message area.  


There is one ezdiff preference. Placing the following line in your 
preference file will tell ezdiff to always ignore blanks, and will prevent 
you from seeing the above \italic{ignore blanks} prompt:

*.AlwaysIgnoreBlanks:yes


Ezdiff works by moving the selection in each file to highlight the first 
difference.   To move on to the next difference, choose Next.  To see the 
previous difference, choose "Last."  The "Next" and "Last" operations are 
relative to the current selection, so to find the differences in a 
particular section of a file, just move the selection to that area and use 
these operations.  To redisplay the current difference again, choose 
"Current" from the menus. Editing operations are not affected by the diff, 
nor will editing cause the marked differences to get out of sync.


Restarting Ezdiff on a file that has already been diffed causes the 
following message to appear:


Diff exists.  Reinitialize ? [n]  


To restart Ezdiff, type "y" and press Enter.  To continue working with the 
current diff, just press Enter.

}
\section{Pop-up Menu Meanings}


If you put the addmenu lines shown above into your ezinit file, you will 
receive the following menu options, in addition to the regular EZ menus. 
 Next and Last are always relative to the currently-selected difference:

\leftindent{
\bold{Start:} If this option is chosen inside two different files, Ezdiff 
starts. (See above).


\bold{Current:} Reselects the current difference in both of the files.


\bold{Next:} Moves the diff forward and selects the next difference between 
the two files.


\bold{Last:} Moves the diff backwards and selects the previous difference 
between the two files.


\bold{Change:} This changes the text of the currently-selected difference 
in the current window to be identical that in the other window.

}
\section{Related tools}  


Select (put a box around) one of the italicized names and choose "Get Help 
on Selected Word" from the pop-up menu to see the help file for:


\leftindent{\italic{\helptopic{ez}

\helptopic{ctext}

\helptopic{diff}          

\helptopic{initfiles}}}


\begindata{bp,17958800}
\enddata{bp,17958800}
\view{bpv,17958800,0,0,0}
Copyright 1992 Carnegie Mellon University and IBM.  All rights reserved.

\smaller{\smaller{$Disclaimer: 

Permission to use, copy, modify, and distribute this software and its 

documentation for any purpose is hereby granted without fee, 

provided that the above copyright notice appear in all copies and that 

both that copyright notice, this permission notice, and the following 

disclaimer appear in supporting documentation, and that the names of 

IBM, Carnegie Mellon University, and other copyright holders, not be 

used in advertising or publicity pertaining to distribution of the software 

without specific, written prior permission.



IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 

DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 

ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 

SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 

BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 

DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 

WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 

ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 

OF THIS SOFTWARE.

 $

}}\enddata{text,17907684}
