xdiff(1) — USER COMMANDS
NAME
xdiff - an X file comparator and merger
SYNOPSIS
xdiff [options] [file1 [file2]]
DESCRIPTION
xdiff is an X11 client that displays two text windows side by side. You can read text from an existing file or create new text in either or both windows. The contents of the windows can be edited and saved separately. xdiff is useful for viewing or editing any two files that you would like to manage in the same application.
The primary use of xdiff is to find and display differences between files, using a diff program and the X selection mechanism. You can create a merged file from two original versions by copying or deleting the selections.
OPTIONS
xdiff accepts all of the standard X Toolkit command-line options along with the additional options listed below. All xdiff resources can be set as command-line options also. See the “RESOURCES” section for detailed descriptions of the following options. All of the options may be abbreviated to a unique spelling.
−autoSave
specifies that modified text should be automatically saved to the disk file before an action that would delete or overwrite the text.
−base side
sets the side to be used as the base for a merged version of a file.
−bellVolume number
sets the volume of the audible bell.
−coCommand command
specifies the RCS command to be executed in place of co.
−columns number
specifies the initial number of text columns displayed in each text window.
−noDiffAtStartup
specifies that if two filenames are given on the xdiff command line, they should not be compared at the time xdiff is started. The filenames may be given either as arguments to the -leftFile and -rightFile options or as the last two arguments on the command line.
−compareCommand command
specifies the command to be used to perform a fast comparison of disk files when using the Next Item button. This comparison occurs before the files are read into the text windows.
−diffCommand command
specifies the command to be used to compare the current contents of the text windows.
−noDiffNextItem
specifies that the two new files read into the left and right windows by the NextItem button should not be compared automatically.
−getCommand command
specifies the SCCS command to be executed in place of get.
−help prints the usage message.
−helpFile filename
specifies the pathname of the xdiff help file.
−listCommand command
specifies the command to be used by the Custom Dialog to create a list of filenames.
−leftFile filename
specifies the name of a file to be read into the left text window at startup.
−leftVerticalScroll side
sets the location of the vertical scrollbar for the left text window.
−printCommand command
specifies the command to be used to print a file.
−prsCommand command
specifies the SCCS command to be executed in place of prs.
−rightFile filename
specifies the name of a file to be read into the right text window at startup.
−rightVerticalScroll side
sets the location of the vertical scrollbar for the right text window.
−rlogCommand command
specifies the RCS command to be executed in place of rlog.
−rows number
specifies the initial number of text rows displayed in each text window.
−version
prints the version number of xdiff.
−wordWrap
specifies whether long text lines should be folded to fit the width of the text window.
WINDOW LAYOUT
xdiff has three main functional regions: the menu bar, a work area that contains two text windows, and a message area.
Menu Bar
The menu bar has pulldown menus whose command buttons control the contents of both text windows and activate the comparisons. The buttons available on the menu bar include: File, List, Search, Edit, Merge, Diff, and Help.
Text Windows
Each of the text windows has a title bar, a vertical scrollbar, and (by default) a horizontal scrollbar. The horizontal scrollbar does not appear if you specify wordWrap mode. The vertical scroll bars are placed between the two text canvases by default so that you can scroll the text in both windows more easily at the same time. You can specify −leftVerticalScroll or −rightVerticalScroll values that position each vertical scrollbar to the left or right of its text window. For example, by setting −leftVerticalScroll to left and −rightVerticalScroll to right, the text windows will be adjacent to each other for easier comparison of text.
Message Area
This region displays information about the current status of the comparison. When in diffed mode (see next section), this region displays the total number of nonmatching text blocks present in the text windows and the number of the currently active block. The total number decrements with most selections of a button from the Merge menu. Also watch this region for warning and error messages.
COMPARING AND MERGING TEXT
xdiff operates in two basic modes: diffed and nondiffed. Initially, xdiff is in nondiffed mode. When text is first read into the left and right windows from a dialog, xdiff has no knowledge of their contents in relation to each other. In nondiffed mode, you can edit in either text window (refer to the “EDITING COMMANDS” section).
When you select the Compare button from the Diff menu, xdiff compares the current contents of the left and right windows and enters diffed mode. At this point, the distinction between the base (left, by default) and export (right, by default) windows becomes significant. The base side is the text window to be used as the base for a merged version of a file. The other text window is the export side, which exports changes into the base. When in diffed mode, editing the contents of the export window is disabled; all editing must take place in the base window.
When the comparison is complete, blocks of contiguous text lines in the export window that differ from the corresponding lines in the base window are selected (i.e., become the PRIMARY selection) and displayed in inverse video. xdiff jumps automatically to the first block of nonmatching text after the first comparison, scrolling both windows if necessary. You can jump to each successive block of differing text or back to the previous block. xdiff selects and highlights only one text block at a time, according to these rules:
Added text
Text that has been added to the version in the export window and has no corresponding block in the base window is selected in the export window.
Changed text
Text that exists in both the base and export windows, but which is different, is selected in the export window. The corresponding block of text in the base window is underlined.
Deleted text
Text that exists only in the base window (as if deleted from the export window) is selected in the base window.
By default, the diff program (found by your shell environment’s search PATH variable) is executed to find differences between the text window contents. The command line to be invoked is settable with the diffCommand resource. For xdiff to work correctly, the diff command must produce output similar to the following example:
diff base_file export_file
1d0
< This line in base_file only
11c10
< This line has changed
---
> This LINE has changed
27a27
> This line in export_file only
The Merge and Diff functions of the menu bar keep track of differences between the windows. Using the Diff menu, you can go to the next differing block or back to the previous block. Using the Merge menu, you can insert, append, or replace a selected text block from the export window into the base window or delete text from the base window. As long as you use these two menus, xdiff remains in diffed mode. When you modify the text of the base window by directly editing from the keyboard, pasting selected text with the mouse, or reading in a new file, xdiff loses track of the beginning and ending points of the differing text blocks and returns to nondiffed mode. In nondiffed mode all the buttons of the Merge menu and all but the Compare button of the Diff menu are disabled. You must reselect the Compare button to return to diffed mode. It is common to intersperse use of the Merge button with manual editing. So, after recomparing the window contents, xdiff selects the differing text block that is closest to the block selected before the manual editing began.
MENUS
All xdiff functions can be invoked by using command buttons that are made available by pulling down a menu. Keyboard users can use mnemonics or accelerator keys instead of mouse actions to invoke the functions. When the xdiff window appears on your X display, the mnemonic letter assigned to a button is the underlined letter (on your terminal screen) in the button’s name. Default accelerator keys are shown next to the button’s name. Refer to the “MNEMONICS AND ACCELERATORS” section for details about using these keyboard equivalents.
The menu bar contains the following menus: File, List, Search, Edit, Merge, Diff, and Help.
File
Load
Pops up a dialog that contains two text-entry windows; one for the left text window and one for the right. Each window prompts you to enter the name of a file. If the filename you enter already exists, when you click on the OK button, the contents of that file are read into the text window. When you no longer need the Load Dialog window, click on the Popdown button. You can pop the dialog back up when desired by selecting the Load button again. If you change your mind and no longer wish to use the Load Dialog window, click on Cancel.
Rename
Pops up a dialog that contains two text-entry windows; one for the left text window and one for the right. Each window prompts you to enter the name of a file. The name of the current file in that window (if any) is changed to the one you entered. The Save button will then use this new name. When you no longer need the Rename Dialog window, click on the Popdown button. You can pop the dialog back up when desired by selecting the Rename button again. If you change your mind and no longer wish to use the Rename Dialog window, click on Cancel.
Print
This button pops down a menu with two buttons: left window and right window. You must choose whether you want to print the contents of the left or right window. If you click on the left window or right window button, the current contents of the window are written to a temporary file, which is then printed. If a shell command is specified by the printCommand resource, it is used to print the window contents. Otherwise the text is printed by the command lp. If you change your mind and no longer wish to print the text in either window, move the mouse pointer out of the menu without releasing the mouse button.
Close
This button pops down a menu with two buttons: left window and right window. You must choose whether you want to delete the contents of the left or right window. If you click on the left window or right window button, the text is cleared from that window. If the contents of the window have changed since the last time you saved it to disk, a dialog box pops up before clearing the text. The dialog warns you that the file has changed and prompts whether to save the current text, discard the changes, or cancel the close. After the text is cleared from the window, xdiff does not exit, but remains running so that you can read in or create another file in the window. If you change your mind and no longer wish to delete the text in either window, move the mouse pointer out of the menu without releasing the mouse button.
Save
This button pops down a menu with two buttons: left window and right window. You must choose whether you want to save the contents of the left or right window. If you click on the left window or right window button, the text is saved in the name displayed in the text window’s label bar. If you change your mind and no longer wish to save the text in either window, move the mouse pointer out of the menu without releasing the mouse button.
Save as ...
Pops up a dialog box that contains two text dialogs; one for the left text window and one for the right. You enter a new filename or modify the name displayed for the side you want to save. When you click on the OK button, the current contents of the text window are written to the filename you specified. If the named file does not exist, it will be created with the current contents of the text window. When you no longer need the Save As dialog, click on the Popdown button. You can pop the dialog back up when desired by selecting the Open button. If you change your mind and no longer wish to use the Save As dialog, click on Cancel.
Swap
Swaps the contents of the two text windows so that the version in the export window before the swap can be edited in the base window.
Exit
Exits the xdiff program. If the contents of the window have changed since the last time you saved it to disk, a dialog box pops up before xdiff exits. The dialog warns you that the file has changed and prompts whether to save the current text, discard the changes, or cancel the exit.
List The List menu has several buttons you can use to read a file into the left and right text windows. These buttons are: Open, Custom, SCCS, and RCS. Each of these buttons pops up a dialog window containing two separate areas: the dialog boxes and the window buttons area. The dialog boxes are especially useful when comparing a list of files or file revisions. Each of the two dialog boxes contains four or five regions:
filter
You enter a filename or regular expression (called a filter). This text is used as the argument for a command that is executed when you either press the list button in the button area or type a carriage return while the text cursor is in this box.
directories
A list of directories that match the regular expression shown in the filter ... window. This region appears only in the Open Dialog. Refer to the description of the Open menu button for details.
files or revisions
A list of filenames or SCCS/RCS revisions that is generated when you press the list button (see buttons, below). You can scroll through this list to find and click on the filename or revision you want to read into a text window. Your selection is displayed in inverse video in the list.
filename or revision number
This box contains a filename or revision that you selected from the list. You can also type the filename directly into this box; it does not have to be an item from the list. This filename or revision is read into the left or right dialog box when you either click on the load button (see buttons, below) in the button area, or type a carriage return while the text cursor is in this box.
buttons
The labels on these buttons indicate the command that will be executed or the action that will be taken. We will refer to the right-hand button as the list button because it produces a list of items. We will call the left-hand button the load button because it loads a file into the left or right dialog box.
The window buttons area at the bottom of the dialog window has three buttons: Popdown, Next Item, and Cancel. When you no longer need the dialog window, click on the Popdown button. You can pop the dialog window back up when desired by selecting the File menu button again. If you change your mind and no longer wish to use the dialog window, click on Cancel. The Next Item button combines several actions. It selects the next item in both the left and right file or revision windows and does a fast comparison of the disk files, using the command specified by the compareCommand resource. If the current pair of files is identical, xdiff goes to the next item on the list. This process is repeated until the first pair of nonidentical files is found. xdiff uses only the exit value of the compareCommand; it does not interpret any output. If the command exits with value 0, the files are assumed to be the same are not read into the text windows. If the command exits with value 1, the files are assumed to be different and are read into the text windows. If the command exits with any other value, it is assumed that an error has occurred, an error message is printed, and the files are not read into the text windows. When the first pair of different files is found, those files are read into the left and right windows. The two new files will be compared automatically, using the command specified by the diffCommand resource, unless you have set the ∗noDiffNextItem resource to True. You should take care to ensure that the compareCommand does not produce a different exit status from the diffCommand. For example, assume that the compareCommand is cmp -s, the diffCommand is diff -b (-b ignores white space), the only difference between the files is white space. The exit value from compareCommand will be 1 and the files will be read into the text window, then compared with the diffCommand, which will find no differences. Specific information about each File menu button follows:
Open
In the filter window, enter a regular expression specifying a directory pathname in the same form you would give as an argument to the ls(1) command. For example, the following are valid directory specifications arguments:
/project/src/commands
/project/src/commands/∗
/project/src/commands/
/project/src/comm∗/
Directories identified by the expression in the filter window (including subdirectories as well as . and ..) appear in the directories window when you click on the filter button. You can change the directory portions of the pathname in the filter either by editing it directly or by using the mouse to select an item in the in the directories window. The filename portion (if any) is unmodified by the selection. The names of any files that match the regular expression appear in the files window when you click on the filter button. The filename window is used to specify the name of a file to be read into the left or right text window. You can add or modify this filename either by editing in the window directly, or by using the mouse to select an item from the files window. The file is loaded into the appropriate text window when you click on the Read file button.
Custom
In the filter window, enter a shell command line that will produce a single-column list of files. Following are examples of valid commands:
find <dirname> -type f \
! -name ’∗.o’ ! -name ’∗.a’ \
! -perm -111 -print
/bin/ls ∗.[ch] ∗akefile
cat List1
sort List2
You may specify a frequently used command as the value of the listCommand resource. To execute the shell command click on the list button. The resulting list is read into the file or revision window,
SCCS
This dialog allows you to compare two revisions of an SCCS file or compare a delta’d revision with a version checked out for editing. In the filter window, enter the name of an SCCS archive file. The form of the entry is the same as you would give as an argument to the SCCS prs command (see prs(1)). To invoke prs, click on the prs button. Check for error messages from prs on standard error output. The list of revisions found in the named SCCS file appears here if the prs command was successful. You can scroll through the list and click on the name of the revision you want to load into the text window. The name of the revision you selected appears in the filename or revision number window. You can modify the selection by typing directly into this window. The entry must be a valid SCCS revision number that is terminated by a colon, optionally followed by descriptive text. When you are ready to get the revision from the SCCS file and load it into the text window, click on the get button.
RCS
This dialog allows you to compare two revisions of an RCS file or compare a checked-in revision with a version checked out for editing. In the filter window, enter the name of an RCS archive file. The form of the entry is the same as you would give as an argument to the RCS rlog command (see rlog(1)). To invoke rlog, click on the rlog button. Check for error messages from rlog on standard error output. The list of revisions found in the named RCS file appears here if the rlog command was successful. You can scroll through the list and click on the name of the revision you want to load into the text window. The name of the revision you selected appears in the filename or revision number window. You can modify the selection by typing directly into this window. The entry must be a valid RCS revision number that is terminated by a colon, optionally followed by descriptive text. When you are ready to check out the revision from the RCS file and load it into the text window, click on the co button.
Search
Pops up a dialog box that prompts for a string to search for in one or both text windows. The search string is a regular expression similar to that used by grep(1). If a matching string is found, the text cursor is positioned at the beginning of the next matching pattern and the matching text is displayed in inverse video. All searches are forward from the current cursor position. The text window scrolls, if necessary, to display the matching text. You can make repeated searches for the same string in either or both text windows by clicking on the Search Left, Search Right, or Search Both buttons.
Edit
All the buttons in the Edit menu act on the current selection. The selection can be one made automatically by the Diff menu or one you make manually with the mouse. See “EDITING WITH SELECTIONS” for a description of how to make and transfer selections directly with mouse button presses.
Cut
Copies the selected text from the window into the clipboard, then deletes the selection from the window.
Copy
Copies the selected text from the window into the clipboard.
Paste
Copies the selected text from the clipboard into the text window, beginning at the position of the text cursor.
Clear
Deletes the selection from the window without copying it to the clipboard.
Merge
The buttons in this menu operate on text that was selected by using buttons in the Diff menu.
Replace
Replaces the current nonmatching text block in the base window with the selected text from the export window.
Insert
Adds the selected text from the export window in front of the corresponding text block in the base window.
Append
Adds the selected text from the export window at the end of the corresponding text block in the base window.
Delete
Removes the selected text from the base window.
Undo
Restores text in the base window to the string just prior to the last action from the Merge menu. Only the last change can be undone.
Diff
The buttons in this menu perform the comparison between the contents of the text windows and allow you to move from one selection to another.
Compare
Compares the current contents of the base and export windows and selects the first block of differing text.
Previous
Positions the text cursor at the previous block of nonmatching text and selects the block. For example, if you are at the fifth differing block, this button will position the cursor at the fourth. If you are at the first differing block, this button will position the cursor at the last difference in the files.
Next
Positions the text cursor at the next block of nonmatching text and selects the block. For example, if you are at the fifth differing block, this button will position the cursor at the sixth. If you are at the last differing block, this button will position the cursor at the first difference in the files.
First
Positions the text cursor at the first occurrence of nonmatching text.
Last
Positions the text cursor at the last occurrence of nonmatching text.
Closest
This button pops down a menu with two buttons: left window and right window. You must choose whether you want to find the differing block that is closest to the cursor position in the left or right window. Use this button if you have moved the text cursor by scrolling or searching and want to reset the current selection to the nonmatching text block that is closest to the cursor.
Alternate windows
Switches the current selection (inverse video) and the underlining to the corresponding text block in the other window. Use this feature to identify text whose underlining is difficult to see or to make underlined text the PRIMARY selection so you can cut, copy, clear, delete, or paste it.
Reselect
Reselects the current difference if the selection has been lost for any reason.
Help
This button pops down a menu with two buttons: Help Text and Version. The Help Text button pops up a separate text window containing instructions for using xdiff. You can scroll through the text or search for keywords and xdiff button names to find descriptions of how to use xdiff dialogs and features. The Version button pops up a dialog window that displays the version number of the xdiff release you are running.
MNEMONICS AND ACCELERATORS
All menu and command buttons have mnemonics, and several have default accelerator keys that perform the same action as selecting the command button with the mouse.
A mnemonic is an underlined letter in the button’s name in the menu. Typing the Alt key and the underlined letter while the mouse pointer is anywhere in the xdiff window pops up the button’s menu. Then you can type the mnemonic of one of the command buttons in the menu (without the Alt key) to invoke that function.
Accelerator keys are assigned to many of the command buttons. The default accelerators are function keys, but they can be any key. Accelerators are listed in the menu next to the command-button name. Unlike mnemonics, the menu that contains the command button you want to use does not have to be displayed. The accelerator keys are most useful on the frequently used functions of the Merge and Diff menus.
You can add or change accelerators to buttons using resources in your .Xdefaults or .Xrm file. The following example shows how you can add accelerators to the Open and Custom buttons of the List menu.
XDiff∗Open∗accelerator: SHIFT<Key>F1
XDiff∗Open∗acceleratorText: SHIFT+F1
XDiff∗Custom∗accelerator: SHIFT<Key>F2
XDiff∗Custom∗acceleratorText: SHIFT+F2
To delete a default accelerator, assign an empty string to the button:
XDiff∗Compare∗accelerator:
XDiff∗Compare∗acceleratorText:
The ∗accelerator resource assigns the key; the ∗acceleratorText resource is a string that appears in the command button as a reminder.
EDITING COMMANDS
By default, you may add text in the xdiff text windows without typing any commands. The xdiff text windows support the following commands for moving the text pointer and scrolling in the window:
TEXT MOVEMENT
| Ctrl-b | backward one char | Ctrl-f | forward one char |
| Meta-b | backward one word | Meta-f | forward one word |
| Ctrl-p | up one line | Ctrl-n | down one line |
| Ctrl-a | beginning of line | Ctrl-e | end of line |
| Meta-< | top of file | Meta-> | end of file |
| Ctrl-v | scroll next screen | Meta-v | scroll previous screen |
The xdiff text windows support the following commands for deleting text:
TEXT EDITING
| Delete | delete next char |
| Ctrl-w | delete selected text |
If you have not already done so, you must use the xmodmap command to map a keyboard key to be your Meta key.
EDITING WITH SELECTIONS
The X selection mechanism offers an efficient way to move text within the base window or from the export window to the base window. The Diff menu buttons set the selection automatically for differing text blocks. The Merge menu buttons copy the selection from the export window to the base window. But these buttons operate only on the active (i.e., selected) text block found by the Compare button. You can make your own selections with the mouse in either the export or base windows:
To select a word
double-click the first button.
To select a line
triple-click the first button.
To select a passage
hold down the first button, move the pointer, release the button,
or
click the first button, move the pointer to the end of the passage, click and release the third button.
To select the entire text
Click the first button four times in rapid succession.
You can paste (copy) a selection in several ways:
To paste to a different position in the same window
move the mouse pointer to the location where you want the text to begin and click the second (middle) button.
To paste to a different position in the other window
move the mouse pointer to the location where you want the text to begin, click the first button to position the cursor, then click the middle button.
To paste text that was saved in the clipboard
move the mouse pointer to the location where you want the text to begin, click the first button to position the cursor, then select the Paste button from the Edit menu.
You can delete a selection in several ways:
enter CTRL-W
select Cut or Clear from the Edit menu
enter the BACKSPACE or DELETE keys.
WIDGET TREE
The xdiff widget hierarchy to use for specifying resources is shown below. Each widget’s class name is listed first and is separated by a dash from its instance name.
XDiff - xdiff
XmMainWindow - main
# Text window Widgets
XmForm - big_form
XmForm - main_text_form
XmForm - left_text_form
XmLabel - file_label
XmScrolledWindow - left_text
XmForm - right_text_form
XmLabel - file_label
XmScrolledWindow - right_text
XmForm - message_form
XmLabel - error_label
# Menu bar widgets and their dialogs
XmRowColumn - menubar
XmCascadeButton - file_cascade
XmPulldownMenu - file_menu
XmPushButton - load_button
TopLevelShell - load_dialog
XmForm - big_form
XmForm - dual_form
XmForm - left_form
XmSelectionBox - left_dialog
XmForm - right_form
XmSelectionBox - right_dialog
XmForm - button_form
XmPushButton - popdown_button
XmPushButton - cancel_button
XmPushButton - rename_button
TopLevelShell - rename_dialog
<children same as load_dialog>
XmCascadeButton - print_button
XmPulldownMenu - submenu
XmPushButton - left_button
XmPushButton - right_button
XmCascadeButton - close_button
XmPulldownMenu - submenu
XmPushButton - left_button
XmPushButton - right_button
XmCascadeButton - save_button
XmPulldownMenu - submenu
XmPushButton - left_button
XmPushButton - right_button
XmPushButton - save_as_button
TopLevelShell - saveas_dialog
<children same as load_dialog>
XmPushButton - swap_button
XmPushButton - exit_button
XmSelectionBox - exit_warning
XmCascadeButton - list_cascade
XmPulldownMenu - list_menu
XmCascadeButton - open_button
XmPulldownMenu - submenu
XmPushButton - view_dialog
XmPushButton - next_item
TopLevelShell - open_dialog
XmForm - big_form
XmForm - dual_form
XmForm - left_form
XmFileSelectionBox - left_dialog
XmForm - right_form
XmFileSelectionBox - right_dialog
XmForm - button_form
XmPushButton - popdown_button
XmPushButton - next_button
XmPushButton - cancel_button
XmCascadeButton - custom_button
XmPulldownMenu - submenu
XmPushButton - view_dialog
XmPushButton - next_item
TopLevelShell - custom_dialog
XmForm - big_form
XmForm - dual_form
XmForm - left_form
XmLabel - left_filter_label
XmText - selection_box_filter
XmSelectionBox - left_dialog
XmForm - right_form
XmLabel - right_filter_label
XmText - selection_box_filter
XmSelectionBox - right_dialog
XmForm - button_form
XmPushButton - popdown_button
XmPushButton - next_button
XmPushButton - cancel_button
XmCascadeButton - sccs_button
.
.
.
TopLevelShell - sccs_dialog
.
.
.
<other children and submenu same as custom_button>
XmCascadeButton - rcs_button
.
.
.
TopLevelShell - rcs_dialog
.
.
.
<other children and submenu same as custom_button>
XmCascadeButton - search_cascade
TopLevelShell - search_dialog
XmFrame - frame
XmSelectionBox - xdiff_search
XmSelectionBox - search_dialog
XmCascadeButton - edit_cascade
XmRowColumn - edit_menu
XmPushButton - cut_button
XmPushButton - copy_button
XmPushButton - paste_button
XmPushButton - clear_button
XmCascadeButton - merge_cascade
XmRowColumn - merge_menu
XmPushButton - replace_button
XmPushButton - insert_button
XmPushButton - append_button
XmPushButton - delete_button
XmPushButton - undo_button
XmCascadeButton - diff_cascade
XmRowColumn - diff_menu
XmPushButton - compare_button
XmPushButton - previous_button
XmPushButton - next_button
XmPushButton - first_button
XmPushButton - last_button
XmCascadeButton - closest_button
XmPulldownMenu - submenu
XmPushButton - left_button
XmPushButton - right_button
XmPushButton - alternate_button
XmCascadeButton - help_cascade
XmPulldownMenu - help_menu
XmPushButton - help_button
XmPushButton - version_button
TopLevelShell - help_shell
XmMainWindow - main_help
XmRowColumn - help_menubar
XmCascadeButton - file_cascade
XmPulldownMenu - file_menu
XmPushButton - print_button
XmPushButton - close_button
XmText - textw
XmCascadeButton - search_button
TopLevelShell - help_search_shell
XmFrame - frame
XmSelectionBox - search_dialog
XmSelectionBox - search_string_dialog
XmSelectionBox - search_dialog
TopLevelShell - close_warning
XmRowColumn - big_rc
XmRowColumn - warning image
XmLabel - pixmap_label
XmLabel - close_warning_label
XmRowColumn - button_rc
XmPushButton - save_button
XmPushButton - discard_button
XmPushButton - cancel_button
RESOURCES
Class names follow resource instance names and are shown in parentheses:
autoSave (Boolean)
specifies whether to automatically attempt to save modified text before a new file is read in. True and False are valid values. The default is False.
base (Side)
specifies whether the base version for creating a merged file will be in the left or right text window. The base window will import differences you select from the other window, which is referred to as the export window. The default base side is left.
bellVolume (Percentage)
specifies the volume of the display’s audible bell that rings to call attention to an error message printed in the message bar. The value of this resource is a number in the range 0 to 100, which represents the percent of the maximum bell volume set for your X server. The default volume percent is 50. A value of 0 turns the bell off.
coCommand (Command)
specifies the shell command to use to check out the selected revision of an RCS’d file from the RCS dialog. The default is co.
columns (Integer)
sets the initial width, in characters, of each text window. The default is 72 columns. The geometry of the surrounding xdiff window is set to the corresponding width. If height and width values of the −geometry option are given, they will override the geometry requested by the columns resource.
noDiffAtStartup (Boolean)
specifies two files whose names are given on the command line should not be compared when xdiff is started. By default, xdiff automatically performs a comparison if two initial file names are given. True and False are valid values. The −noDiffAtStartup option sets the value to True. The default is False.
compareCommand (Command)
specifies the command to be used to perform a fast comparison of disk files when using the Next Item button. This comparison occurs before the files are read into the text windows. The default command is cmp -s.
diffCommand (Command)
specifies the pathname of the comparison program to execute. The program pointed to by this resource must produce the same output format as /bin/diff. The default command is diff.
noDiffNextItem (Boolean)
specifies that two files selected from a dialog list by the Next Item button should not be compared automatically. By default, xdiff automatically performs a comparison if two the files. True and False are valid values. The −noDiffNextItem option sets the value to True. The default is False.
getCommand (Command)
specifies the shell command to use to check out the selected revision of an SCCS’d file from the SCCS dialog. The default is get.
helpFile (File)
specifies the pathname of the help text displayed by the Help button. The default is /usr/lib/X11/xdiff.help.
leftVerticalScroll (Side)
sets the location of the vertical scrollbar for the left text window (the base window) to left or right. The default is right.
listCommand (Command)
specifies the shell command to use to read a file that contains a list of pathnames into the Custom dialog. There is no default.
noVisualBell (Boolean)
calls attention to a new error message by instructing the message bar to flash (when set to True). True and False are valid values. The −noVisualBell option sets the value to True (the default).
printCommand (Command)
prints the current contents of a text window. This shell command will receive the text from standard input. The default command is lp.
prsCommand (Command)
obtains revision information from an SCCS archive file (s.∗ file) from the SCCS dialog. This shell command must produce output in a format similar to the SCCS prs command. The default command is prs.
rightVerticalScroll (Side)
sets the location of the vertical scrollbar for the right text window (the export window) to left or right. The default is left.
rlogCommand (Command)
obtains revision information from an RCS archive file (∗,v file) from the RCS dialog. This shell command must produce output in a format similar to the RCS rlog command. The default command is rlog.
rows (Integer)
sets the initial height, in characters, of each text window. The default is 24 lines. The geometry of the surrounding xdiff window is set to the corresponding height. If height and width values of the −geometry option are given, they will override the geometry requested by the rows resource.
wordWrap (Boolean)
sets word-wrap mode for text in the two main windows. In word-wrap mode, no horizontal scrollbars are displayed. Lines that are too long to fit in the width of the text window are broken between words and wrapped to the next visible line. The default is False.
EXAMPLE RESOURCES
xdiff has default settings for all resources it needs to operate. You can modify these settings or customize the behavior and appearance of an xdiff session with resources. For examples of xdiff resource specifications and suggested values, copy the file /usr/lib/X11/app-defaults/XDiff and the desired resources to to your .Xdefaults or .Xrm file.
SEE ALSO
cmp (1) diff (1) XmList (3X) XmFileSelectionBox (3X) XmScrollbar (3X) XmScrolledWindow (3X) XmSelectionBox (3X) XmText (3X)