Added abandoned KDE3 version of kdiff3

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdiff3@1088041 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 15 years ago
commit 76718abdb2

@ -0,0 +1 @@
Joachim Eibl <joachim.eibl@gmx.de>

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

@ -0,0 +1,460 @@
Version 0.9.92 - 2007/04/15
===========================
- Windows installer now allows to install KDiff3 as Clearcase Diff and Merge Tool
- Windows installer "SVN Merge tool" corrected: Not creating $AppData\Subversion\config subdir anymore.
- KDE-Konqueror plugin: Launch KDiff3 from Konqueror. (Similar to Diff-Ext on Windows.)
- Qt4-version
- Printing crash fixed
- Compilation issue for Mac fixed
- Dir Rescan keeps settings for Show identical files etc.
- Bugfix: Empty file and not existing file were detected as binary equal.
- Temp file names use the process id in file name to allow several instances.
- Suppress flicker during startup. (Don't show status info window on creation.)
- New File comparison mode: Trust the size and date, but use binary comparison if date doesn't match (unsafe)
- After explicitely selecting files any file of the selected may be right clicked for context menu.
- Open dialog also shows current directories in directory comparison mode.
- Writing a file via --auto option didn't work for relative files. (Reported by Guilhem Bichot)
- New option for history merge: Max number of history entries
- New option "Auto save and quit on merge without conflicts"
- Directory Merge with Case sensitivity disabled: Correct destination filename chosen for merge.
Version 0.9.91 - 2006/10/29
===========================
- Encoding auto detection
- Fix for crash after double click below last line
- Saving of maximized window-state (Patch by Robert Vock)
- Separated Merge-options in own tab because "Diff and Merge"-options tab got too big.
- When pasting multiple lines into openfile dialog only first line is kept
- Drawing in directory view fixed.
- When specifying a separate output dir then for equal files a copy operation will also be offered.
- Windows specific:
- Windows installer problems fixed for users without admin-rights
- Fix for slow startup problem on Windows (Patch by Manfred Koehler)
- New: diff-ext-for-kdiff3 - Shell extension (originally by Sergey Zorin)
- Qt4-version:
- Saving of merge-result didn't work.
- Start external processes directly without cmd.exe-window
- Rewrote everything requiring Qt3-support
Version 0.9.90 - 2006/05/14
===========================
- Fixed KIO-problems of type "File exists" with tempfiles (introduced in 0.9.89)
- Fix for manual alignment with 3 files which caused crash (new feature in 0.9.89)
- Fix for Alt-Left caused crash for leftmost window on windows (due to changed compiler)
- Use of WResizeNoErase|WRepaintNoErase instead of WNoAutoErase (fix for compiler error with Qt3.1)
- Removed #include <konq_popupmenu.h> which is (currently) unneeded and required extra dependencies.
- Removed "Save/Load Directory Merge State ..." in directory menu. (These aren't working yet.)
- Fixed crash when used as Diff-part with KDevelop.
- Preserve executable bit when overwriting an existing file.
Version 0.9.89 - 2006/04/09
===========================
New features:
- Version control history auto merge plus sorting
- Auto merge regular expression
- Splitting and joining differences for merging
- Manual Diff Alignment tool
- Printing of differences
- Colorsettings for Dir-Colors
- Dir-show identical/different/A-only/B-only/C-only files with immediate effect (instead of option "List only deltas")
- Filename-edit above DiffInputWindows
- Windows-Context Menu in A/B/C-columns for dir-comparison (Windows only)
- Edit Menu: Select All (Ctrl-A)
- New commandline options:
--config filename: Select an individual config file. (Now also available for Windows and Qt-only version.)
--cs config: Change one specific setting via the command line. (For settings that were previously adjustable via GUI only.)
--confighelp: Show available config items and their current values.
- Dircomp: "Compare/Merge explicitly selected files" (Select files/dirs by clicking icons in columns A/B/C)
- User definable ignored command line options.
- Ability to swap pathnames in open dialog
- "Ignore"-button in error dialog when option not understood (Windows only)
- Quadratical scroll speedup during selection when mouse moves out of the diff input window.
Bugfixes, redesign:
- Preparations for Qt4-Port + some redesign
- GNU-Diff algorithm improved to be independent of line endings (needed for manual diff alignment)
- Avoid restoring a window where it is almost invisible (if moved almost out of the screen area)
- Go to next delta honors special "A vs. B", "A vs. C" or "B vs. C" overview when active. (Patch by Vladan Bato)
- DirectoryMergeWindow: File/Antifile and DirPattern changes will update immediately without rescan.
- Blue toolbar icons (for better visibility of disabled state)
- Bugfix: Crash when merging and selecting "Choose A/B/C for all unsolved conflicts"
and one of the solved conflicts contained no lines in chosen input.
- Fix: With --auto option, GUI stays invisible if not necessary
- Fixed odd ProgressDialog-behaviour when continuing after an error or abort.
- Directory merge: Fixed FollowFileLinks. (Didn't work when copying a file.)
- Initial position now (x=0,y=22). This solves a problem on some Macs.
- Better alignment of B and C in 3-file comparison
- Correctly updating the selection when scrolling via keys and mouse is pressed
- Horizontal scrolling in right-to-left language caused vertical lines - fixed.
Version 0.9.88 - 2005/25/02
===========================
- Fixed crash that occurred in Directory Comparison mode "Full-Analysis".
- Fix for Windows: Didn't save encoding correctly.
- Many translations updated.
Version 0.9.87 - 2005/30/01
===========================
- Unicode16 and UTF8 support (Internal data format is now QString (Unicode16). Conversion during save and load.)
- Directory "Full Analysis": Equality-Coloring for files with only whitespace differences. (Michael Denio)
- Support for right to left languages.
- In MergeResultWindow show "<Merge Conflict (Whitespace only)>" for whitespace-only conflicts
- Statusbar shows the number of remaining conflicts and whitespace conflicts.
- Go Next/Prev Difference/Conflict now have improved tooltips informing about "Show White Space"-disabled-behaviour.
Version 0.9.86 - 2004/06/14
===========================
- Double click on any file in directory merge would close the directory merge window. (Regression in 0.9.85)
Version 0.9.85 - 2004/06/14
===========================
- When solving a conflict KDiff3 reports the number of remaining unsolved conflicts in the status bar.
Bugfixes:
- Fix for MergeResultWindow-contextmenu: All items were disabled always. (new in 0.9.84)
- Fix for problem when opening files specified relative to current directory. (new in 0.9.84, qt-only-version)
- Fix for compilation with older gcc (2.9x)
- Several Word-wrap problems fixed:
- Find string with word wrap active didn't work if found text was not in first wrap-line.
- overview-position was not updated when toggling word wrap
- horizontal scrollbar was not updated when toggling word wrap
- current selection was lost when toggling word wrap
- selecting a conflict in the diff-text-window didn't work right with word wrap.
- Qt-only: Bold attribute for fonts was not persistent
- Qt-only: Toolbar position was not persistent
- Qt-only: Language-choice shows also the full language name.
- Cursor and windows-boundary-lines were always black instead of having the foreground color
- Starting KDiff3 with two not existing files showed a dialog saying that files are binary equal.
- Errors while starting a directory comparison now also reopens the open-dialog.
- Speedup during directory comparison by avoiding unnecessary redraws. (These always creep in again :-()
- On KDE: When resetting to default options (or first start) now the default KDE-fixed font will be used.
- Mergeresultwindow: Improved behaviour after automatic merge operation.
Version 0.9.84 - 2004/05/29
============================
New Features:
- Word Wrap for DiffTextWindow
- Directory-Comparison: Option "Full Analysis" allows to show the number of solved vs. unsolved
conflicts or deltas vs. whitespace-changes in the directory tree.
- Diff-Menu for Diff-view specific entries
- Docs now contain a new chapter for uses of preprocessor and line-matching-preprocessor.
- Added several credits which now are also visible in the Qt-only version.
- The Qt-only version now also shows all command-line options. Under windows a dialog shows them.
- Command line options -u and -L for Subversion-support.
- Command line options --L1/2/3 for specifying alias names.
- In the Qt-only-version the user-interface-language can be set via the regional-settings
(only effective after a restart).
- ProgressDialog redesign for recursive use.
- Overview now allows to show the delta between two other files in triplediff-mode.
- Option to ignore case which treats case-changes like white space (instead of conversion to upcase).
Bugfixes:
- Dir-Comp: When one file exists, but the other doesn't then instead the latest used other file was displayed.
- Open dialog: When previously a file C was used, but should be empty now, it reappeared unbidden.
- Several bugs for 64-bit systems fixed.
- Fixed crash when one file ended with a newline and the other did not.
- Windows: Case insensitive filename-pattern matching.
- Corrected behaviour for files with size 0.
- Fix for crash due to a race-condition (Patch by Eike Sauer)
- Windows: Scrolling didn't work right when another window was in front.
- Mergeresultwindow didn't show correct position when starting a second or later merge.
- Fix for problem where sometimes the A/B/C-buttons were in wrong state.
- Pasting from selection via the middle mousebutton.
Version 0.9.83 - 2004/03/06
===========================
- Reading directorys fixed for Win95/98
- Caseinsensitive filename matching for windows.
- Autocopy to selection for systems that support this. (Patch by Stefan Partheymueller)
- Drawing during recalc suppressed in merge result editor.
- Cursor could go beyond last line in merge result editor. (Corrected NrOfLine-counting.)
- Windows: Start with invalid cmd-line-options brings up a messagebox with the list of options.
- Corrected encoding when copying to or pasting from clipboard.
- Corrected char-by-char-diff at beginning of line. ("012345 12345 xyz" <-> "012345 xyz")
- Warning when merging with preprocessor or upcase-conversion enabled.
- Rewrite of preprocessing code should fix several problems. E.g.:
- Ignore C/C++-comments only worked with a preprocessor active.
- Preprocessor output now is input of line-matching preprocessor.
- Paste to diff-window, didn't work if LMPP or Ignore C/C++-Comments was set.
Version 0.9.82 - 2004/02/02
===========================
- DirectoryMerge: Running merge op for last item in a folder, performed the
merge op for all following items in following folders. (Possible data loss!)
- Fix: Preprocessors and "Ignore Comments" didn't work at the same time.
- Fix: Preprocessors crashed with remote files.
- Open-Dialog: When either input is changed, then reset the output to be empty.
(To avoid accidental overwrites.)
- Icon for "Highlight white space differences."
- Editor-Option: Line End Style for saving: Dos/Windows "\r\n" vs. Unix "\n"
- Merge output editor: Corrected wrong encoding for output-filename and
user-typed characters.
- Speedup for reading directories under Windows.
- Enhanced progress dialog responsiveness during local file copy.
- Fix for non-KDE-version: No URL-encoding when dropping files in open dialog.
Version 0.9.81 - 2004/01/08
===========================
- Allow to compile with --enable-final
- Bugfix for 3 file-compare (and A or B don't exist, crashed)
- Bugfix for crash when second directory is merged
- Some keyboard-shortcuts for selection of merge-operation didn't work correctly.
- Shortcuts Ctrl-1/2/3 are possible in textmergewindow and in dirmergewindow,
depending on the focus.
- First steps towards internationalisation
- Manpage doc/en/kdiff3.1 by Eike Sauer (for Debian)
- Directory rescan shortcut SHIFT-F5
Version 0.9.80 - 2003/12/08
===========================
New Text Diff/Merge Features:
- Now using GNU-diff algorithms internally. (Option "External Diff" removed.)
- Option for treating C/C++ comments as whitespace during diff.
- Bugfix for locale character encoding (+ new option "Use string encoding")
- Option for suppressing highlighting in white-space changes.
(Also suppresses highlighting in comments and numbers when the
respective options are active.)
- Merge-menu: Choose A/B/C for all unsolved conflicts.
Choose A/B/C for all unsolved whitespace conflicts.
- Options to automatically choose a certain source for whitespace conflicts.
- Shorcut F5 now used to reload the current file.
New Directory-Comparison/Merge Features:
- Option to trust filesize. (Some directory services don't copy the date/time correctly.)
- Shortcut F7 now starts complete directory merge (previously F5).
- Do the selected merge operation for the selected file/dir only
"Run Operation For Current Item" (F6).
- Shortcuts for selecting the merge operation for the selected item.
Ctrl-1/2/3/4/Del select A/B/C/Merge/Delete respectively.
Other Improvements:
- Several i18n-corrections (by Stephan Binner)
- Bugfix for option CVS-ignore: Didn't work correctly in subdirectories.
- Bugfix for remote operations: Operation can now be aborted, when KIO-slaves doesn't respond.
- Cancel-Button in progress bar.
- Default diff-view now again side by side instead of one above the other.
Version 0.9.71 - 2003/10/17
===========================
- Windows-Installer by Sebastien Fricker.
- Bugfixes for Windows. (Problems with setFont() in paintEvent().)
- Default font for Windows now "Courier New" (instead of Courier)
- Fix for compilation with gcc 2.95
- Support for Ctrl-Tab under Windows.
- Fix for finding documentation.
- Fix for problem with directory-sync-mode (new in 0.9.70).
- Fix for several subsequent CR-characters in input file.
Version 0.9.70 - 2003/09/28
===========================
- Transparent access to URLs via KIO (KDE only):
Compare files and directories on ftp, fish, smb, tar etc. ressources.
- Workaround for a Win32-bug (Crashed sometimes during selections)
- When the merge flag is selected in the open dialog, the directory-tool
always starts a merge by default for each file. Without the flag only a
diff will be started by default.
- Immediately showing progress bar in dir scan.
- Showing progress bar for file comparison too.
- Directory-menu: Fold/Unfold all subdirs
- Bugfix for 3-way auto-merge: A line deleted from the base in B and C
resulted in a empty line instead of being completely removed.
- Improved locale support
- KDiff3 is now a KPart
- in KDevelop3 it can be used to compare the current text with the
last saved version, or the current version on disk with the last cvs version.
- in Konqueror it can be used to look at a unified *.patch-file if one complete
version is available too.
- Documentation is now in docbook-format.
- "Toggle Split Orientation" for Diff-Input windows. (Good for long lines.)
- When "Dir and Text Split-Screen-View" is off: Now "Focus Next/Prev Window"
also toggles between dir and text-windows. Selecting a file via double click
switches to text-screen.
- KDiff3 displays a warning when trying to read a dir without the permission.
- Directory-Diff-Option "Use CVS-Ignore" to ignore files like CVS does.
- Displaying a status message at the end of the directory-comparison.
- Cursor in MergeResultWindow is automatically placed at current difference when a jump occurred.
(But not when something was selected.)
- Fix for cursor blinking in the topline of the MergeResultWindow.
Version 0.9.61 - 2003/06/07
===========================
- Compilation problem fixed.
- Directory merge: Preserving file attributes and times during copy. (now also for Win32)
- Crash fixed, when directory comparison from the command-line was started.
Version 0.9.60 - 2003/06/01
===========================
New features:
- New ways to select input for the diff window:
- Pasting clipboard text into a diff window.
- Drag and drop a file from a filemanager (e.g. konqueror) onto a diff window.
- Drag and drop text from an editor (e.g. kate) onto a diff window.
Reanalysis starts immediately if no merge is in progress.
(This should help you to compare similar parts in the same file.)
- New/Deleted white lines are now also considered as white deltas.
- Configurable keyboard shortcuts for most actions (KDE version only).
- The overview now also distinguishes whitespace deltas.
New preprocessor options:
- You can now define your own external Preprocessor and LineMatchingPreprocessor:
- "Convert to upper case",
- "Ignore numbers"
Fixed bugs:
- Directory merge: Preserving file attributes and times during copy.
(not for Win32 yet)
Source-tree-structure:
- Switch to KDevelop3 (Gideon): Renamed subdir "kdiff3" to "src".
- xpm-files in xpm-subdirectory.
Version 0.9.51 - 2003/04/14
===========================
- Compilation fix for gcc 2.95.
Version 0.9.50 - 2003/03/30
===========================
Fixed bugs:
- Auto-Advance setting was lost when entering the settings-dialog.
- Windows specific: Keys with AltGr-Combination didn't work.
- Windows 95/98/ME: Fixed crash when KDiff3 is called used without parameters,
and corrected support for external diff.
New Features:
- Search-function: Search for a string in all open text windows.
- Special background colors for current region.
- Button to toggle showing of whitespace in differences.
- Buttons to go to next/prev unsolved (!) conflict.
- While auto-advance waits, no more choices are allowed.
- New setting: Auto-advance-delay.
(Note that with delay 0 fast clicks might be detected as double clicks and the second
click does nothing. My advice: Prefer the keyboard-shortcuts Ctrl-1/2/3)
- Functions to Show/Hide Diff Window A, B or C. The other windows then have more space.
- Merge editor: The right mouse button selects the current region and lets you choose
A, B or C via a popup menu.
- Commandline option --auto: No GUI if all conflicts are auto-solvable.
- When equal files are compared, then a message box informs you.
- Merge current file: When comparing two or three files, the merge can be started with a single click.
- Option dialog: Warning for "Defaults" added, because it resets all options.
- A warning is given, when the user tries to merge binary files. (i.e. files that contain '\0'-bytes)
Changed behaviour:
- 3 file automerge: When for a line B==C (and A!=B) then C will be selected.
(In older versions this was a conflict. I was convinced that this is no problem.)
- Auto-Advance now jumps to next unsolved (!) conflict.
- On 256-color-displays KDiff3 uses them. (Previously KDiff3 only used 16 colors.)
- On 16-color-displays the Defaults-button in the options dialog selects special colors.
Version 0.941 - 2003/02/09
==========================
Fixed bugs:
- Qt-only-version: Compile problem corrected.
- Documentation: Formatting for tables corrected.
Version 0.94 - 2003/02/09
=========================
New features:
- Option to use external GNU-diff for line matching.
(Sometimes GNU-diff is better, sometimes not: You may choose now.)
- In diff-windows a tooltip shows the full path if you move the mouse on the filename.
- Speedup of directory-merge operations without user interaction.
(Not every item in the tree is made visible anymore. This took too long.)
- When opening a file for comparison or merge KDiff3 immediately shows the first difference.
- "Go To Top/Bottom"-action have been changed to "Go To First/Last Delta".
- Font-Option "Italic For Deltas" added.
- Many icons and actions will only be enabled, when the operation is possible.
- Icon for merge of current file in directory merge mode added.
- New action "Go to Current Delta".
- Conflicts where some lines contained only-white-space-changes are now separated from
other non-white-space-conflicts.
- Experimental: Use as replacement for ClearCase-cleardiffmrg.exe (under Windows only).
See main.cpp for details.
Fixed bugs:
- If files were different, but had the same dates, the "not existant"-icon was
shown for one file. Now a error message will be shown if the option
"Copy newer instead of merging" is used.
- Documentation: Section "The Operation Column" corrected.
- Qt-only-version: Fontsize wasn't correctly restored.
- Keyboard accelerators didn't work for ToggleActions.
Version 0.931 - 2003/01/19
==========================
Fix for compilation problems with gcc version < 3.
Version 0.93 - 2003/01/16
=========================
New features:
- Directory comparison and merge. (More than 3000 new lines of code only here!!!)
- Open-Dialog: Filename specification: If no previous filename is there then start
directory is taken from another file.
- Message about number of found and automatically solved conflicts.
- Support for wheelmouse based scrolling.
- New option in Diff-tab: Preserve Carriage Return Characters
Fixed bugs:
- Save button disabled until all conflicts are solved.
- Copy-operation conserves conflict messages "<Merge Conflict>".
- Paste operation created pseudo conflicts when the clipboard contained empty lines.
- W95/98/ME specific program crash removed.
Version 0.92 - 2002/11/04
=========================
Severe bug corrected:
- Merge menu: Choose A/B/C Everywhere sometimes lost data. (introduced in 0.9)
Version 0.91 - 2002/11/03
=========================
Speed improvements for very big/complicated files:
- Faster analysis because of limited search range (can be adjusted).
- Faster scrolling and editor behaviour.
Fixed bugs:
- Compilation problem with gcc 3.2 fixed.
- When comparing two lines, matching spaces often were undetected.
- Merge editor appended extra empty line when saving.
- Sometimes the next diff/conflict wasn't made visible.
- The Auto-Advance setting is saved now.
- When doing a merge the application now has modified-state,
even without further input. (The old method wasn't safe.)
- File selection now always in directory of respective file.
Version 0.9 - 2002/10/16
========================
New features:
- Qt-only support. Allows compilation under KDE2, Gnome, Mac, Windows, ...
Note that KDE3 still gets special treatment.
- For Mergers: Auto-Advance after selection, Choose A/B/C everwhere, ...
- Commandline: If files with same name in different directories
are compared, only the first parameter needs the filename.
- Shift-Del, Ctrl-Ins, Shift-Ins supported for Cut/Copy/Paste
Fixed bugs:
- Make failed on some systems because of missing "minmax.h".
- Files where opened for reading, but not closed afterwards.
- Vertical scrollbar sometimes didn't work correctly.
Version 0.81 - 2002/08/18
=========================
New features:
- Now KDE3 is also supported. Previously only KDE2 was supported.
- Navigation via click into the overview column now supported.
Fixed bugs:
- Some input files caused a crash in the diff-algorithm.
- The meaning of option "Ignore trivial matches" was inverted.
- When selecting a text in one window, this deselects any previously
active selection in the same or another window.
Version 0.8 - 2002/07/28
========================
This is the first version to be released.

@ -0,0 +1,236 @@
# Doxyfile 1.3.7-KDevelop
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = kdiff3
PROJECT_NUMBER = 0.9.85
OUTPUT_DIRECTORY =
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF =
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = /home/joachim/kdiff3
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.idl \
*.odl \
*.C \
*.H \
*.tlh \
*.diff \
*.patch \
*.moc \
*.xpm
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
MAX_DOT_GRAPH_DEPTH = 0
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO

@ -0,0 +1,168 @@
Basic Installation
==================
These are generic installation instructions.
Please read the README-file for most needed steps first.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes a while. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Type `make install' to install the programs and any data files and
documentation.
4. You can remove the program binaries and object files from the
source code directory by typing `make clean'.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.

@ -0,0 +1,22 @@
SUBDIRS = $(TOPSUBDIRS)
$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
$(top_srcdir)/subdirs:
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in
@cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4
MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files
package-messages:
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common package-messages
$(MAKE) -C po merge
EXTRA_DIST = admin COPYING configure.in.in
dist-hook:
cd $(top_distdir) && perl admin/am_edit -padmin
cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs

@ -0,0 +1,10 @@
all:
@echo "This Makefile is only for the CVS repository"
@echo "This will be deleted before making the distribution"
@echo ""
$(MAKE) -f admin/Makefile.common cvs
dist:
$(MAKE) -f admin/Makefile.common dist
.SILENT:

@ -0,0 +1 @@
See the ChangeLog

280
README

@ -0,0 +1,280 @@
KDiff3-Readme
=============
Author: Joachim Eibl (joachim.eibl at gmx.de)
Copyright: (C) 2002-2006 by Joachim Eibl
KDiff3-Version: 0.9.92
KDiff3 is a program that
- compares and merges two or three input files or directories,
- shows the differences line by line and character by character (!),
- provides an automatic merge-facility and
- an integrated editor for comfortable solving of merge-conflicts
- has support for KDE-KIO (ftp, sftp, http, fish, smb)
- and has an intuitive graphical user interface,
- also supports 64 bit systems. (Some build issues are discussed in here.)
Do you want help translating? Read the README in the po-subdirectory!
License:
GNU GENERAL PUBLIC LICENSE, Version 2, June 1991
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301 USA
For details see file "COPYING".
Exception from the GPL:
As a special exception, the copyright holder Joachim Eibl gives permission
to link this program with the Qt-library (commercial or non-commercial edition)
from Trolltech (www.trolltech.com), and he permits to distribute the resulting
executable, without including the source code for the Qt-library in the
source distribution.
Requirements & Installation:
Version 0.9.91 provides special support for KDE3, but it can also be
built without KDE3 if the Qt-libraries are available.
(I also test and use the program under Windows.)
It is now also possible to build with Qt4 (See further below).
You always need
- kdiff3-0.9.91.tar.gz
For building the KDE3-version
- KDE>=3.3 and QT>=3.3-libraries. (but not with KDE4)
- gcc, g++ with version >=3.2
For building the Qt-only-version
- QT-libraries (version >=3.3.0, but <4.0 or >=4.2.0).
(www.trolltech.com)
- for Un*x: gcc, g++ with version >=3.2
- for Windows: VC6 / VC7.1
On some distributions it will be necessary to install developer
packages (RPMs) that contain include files for compilation:
- xorg-x11-devel (or x11-devel)
- qt-devel
- kdelibs-devel
Installation for KDE3:
- Make sure your shell-variable QTDIR is correct. (echo $QTDIR).
If it doesn't contain the correct path, type
export QTDIR=your_path_to_qt (e.g. /usr/lib/qt3)
- cd into the directory kdiff3-0.9.91 and type
- ./configure --prefix=/opt/kde3 (your KDE3 directory here)
- (make clean) (Required if you already compiled once.)
- make (Run compilation)
- make install (You must have root-rights for this step.)
For details also see the generic instructions in file "INSTALL".
If some icons are not visible or don't seem right, probably the prefix
was wrong. Check where your KDE3 installation is located and
use that directory with the prefix-option of configure.
This command should tell you: kde-config --prefix
For SuSE and most distributions the prefix usually is /opt/kde3.
For Redhat/Fedora and Mandrake the prefix usually is /usr.
For a local installation, that doesn't need root rights try
- ./configure --prefix=$KDEHOME ($KDEHOME probably is the same as $HOME/.kde)
- make
- make install (Installs everything in $KDEHOME. No root rights required.)
- Run $KDEHOME/bin/kdiff3. ($KDEHOME/bin is probably not in your path.)
Warning: If a local installation and a global installation exist, the local
menu, toolbar, help etc. will be used, even if you start the global
executable. To avoid confusion, better remove the local version then.
(rm -R `find $KDEHOME -name "*kdiff3*" -not -name "kdiff3*rc"`)
On Fedora-64-bit systems the following configure-line was reported to work:
./configure --prefix=`kde-config --prefix` --enable-libsuffix=64 --with-qt-libraries=/usr/lib64/qt-3.3/lib/
Both --enable-libsuffix=64 and -with-qt-libraries=/usr/lib64/qt-3.3/lib/ are needed;
without the first one it fails to find the KDE libraries,
and without the second one it fails to find libqt-mt
(strangely enough: libqt-mt is in /usr/lib64/qt-3.3/lib,
and "configure" tries /usr/lib64/qt-3.3/lib64)
If your qt-libraries are elsewhere please adapt the path accordingly.
Some secondary dependencies aren't correctly discovered by configure.
If e.g the a linker error appears telling you something like
"Can't find -lacl" this probably means that you have to install
libacl-devel-*.rpm etc.
If you run an older version of KDE and the make-process fails in the
doc- or po-directory, cd to the src-directory and run "make" there. Also run
"make install" there. This hopefully will create a working kdiff3-binary,
although without doc and language support.
Upgrading KDiff3 for KDE:
If you already installed an older version or KDiff3 and you have the
impression, that the new version doesn't work as described, you should try to
remove all files belonging to KDiff3 before reinstalling.
Try this search command to locate KDiff3-related files:
find $HOME/.kde /usr /opt -iname "*kdiff3*"
(Will take a few minutes.)
Building an RPM for Fedora Core (by Vadim Likhota)
Copy kdiff3-0.9.91.tar.gz into /usr/src/redhat/SOURCE
Copy kdiff3.spec into /usr/src/redhat/SPEC
Run rpmbuild -bb --target i686 kdiff3.spec
Find kdiff3-0.9.91-fc.i686.rpm in /usr/src/redhat/RPMS/I386
Installation for the Qt-only-platforms for Un*x:
(for Qt >=3.3.0 but <4.0)
- Make sure your shell-variable QTDIR is correct. (echo $QTDIR).
If it doesn't contain the correct path, type
export QTDIR=your_path_to_qt (e.g. /usr/lib/qt)
- cd into the directory kdiff3-0.9.91/src and type
- make -f Makefile.qt
- make -f Makefile.qt install (You must have root-rights for this step.)
(copies the files into /usr/local/bin and /usr/local/share/doc/kdiff3)
- Note: The file kdiff3.pro was used to generate the Makefile.qt:
qmake kdiff3.pro -o Makefile.qt
If you want to build the Qt-only version _and_ the KDE-version, do this
in separate directories, otherwise there will be errors.
- A user reported that on his 64-bit machine running FC4 he had to edit his Makefile.qt
LIBS = $(SUBLIBS) -L/usr/lib64/ -L$(QTDIR)/lib64/ -L/usr/lib -L$(QTDIR)/lib/ -L/usr/X11R6/lib/ -L/usr/X11R6/lib64/ -lqt-mt -lXext -lX11 -lm -lpthread
Build for Windows:
Use qmake and kdiff3.pro to generate
an appropriate Makefile.
qmake kdiff3.pro -o Makefile
Building KDiff3 (Qt3) for Mac OSX 10.3.8 (by Mark Teel)
-------------------------------------------------------
1) Install Qt/Mac with thread support and static libraries.
2) cd .../kdiff3-0.9.91/src
3) Create a makefile for kdiff3 by executing:
qmake kdiff3.pro -o Makefile.qt
4) Edit Makefile.qt and change the include path like so:
(old) INCPATH = -I/Library/qt3/mkspecs/default -Isrc ...
(new) INCPATH = -I/Library/qt3/mkspecs/macx-g++ -Isrc ...
5) Execute:
make -f Makefile.qt
6) After the build completes copy kdiff3 from the kdiff3-0.9.91/src directory to
/Applications
Building KDiff3 (Qt4) for Mac OSX (with Intel processor) as a universal binary (by Michael Schmidt)
---------------------------------------------------------------------------------------------------
1) Install Qt/Mac 4.x with thread support, static libraries and universal flag.
2) cd .../kdiff3-0.9.91/src-QT4
3a) Create a makefile for kdiff3 by executing:
qmake kdiff3.pro
3b) optionally generate XCode-Project (for debugging purposes only) by executing:
qmake -spec macx-xcode kdiff3.pro
4) Execute:
make
5) After the build completes copy kdiff3 from the kdiff3-0.9.91/src-QT4 directory to
/Applications
----------------------------------------------------------------
Building KDiff3 with Qt4:
Requirements & Installation:
The version 0.9.91 requires Qt 4.2.0 (from www.trolltech.com) for compilation.
You always need
- kdiff3-0.9.91.tar.gz
- for Un*x: gcc, g++ with version >=3.4.2
Qt-X11-libraries
- for Windows: Qt-win-libs
If you have the Qt4 commercial edition, then compile with Visual Studio.
If you use the Qt4 open source edition, then you'll need MinGW.
I verified that compilation and debugging works with these packages (probably newer ones will also work):
- gcc-core-3.4.2-20040916-1.tar.gz
- binutils-2.15.91-20040904-1.tar.gz
- gcc-g++-3.4.2-20040916-1.tar.gz
- mingw-runtime-3.9.tar.gz
- mingw32-make-3.80.0-3.tar.gz
- w32api-3.6.tar.gz (see also the note below)
- gdb-5.2.1-1.exe (for debugging)
(Note: At the time of writing this README, the MinGW-package that was part
of qt-win-opensource-4.1.2-mingw.exe lacked the latest w32api needed for
KDiff3-compilation. You will need to unpack w32api-3.6.tar.gz or newer
from www.mingw.org into your MinGW-directory.)
- for Mac: gcc, g++ with version >=3.4.2
Qt-Mac-libraries
Note for KDE-users:
The version 0.9.91-Qt4 doesn't provide support for KDE-3.x
because KDE-3.x.y requires Qt3.
If you need KDE-specific features like KIO-support stick to the
normal version 0.9.91.
Build-instructions (Unix or Mac):
- Make sure your shell-variable QTDIR is correct and that
your path contains the Qt4-bin-directory.
- cd into the directory kdiff3-0.9.91/src-QT4 and type
- qmake kdiff3.pro
- make (or "gmake" for GNU-Make)
Build-instructions (Windows):
- Run your qtvars.bat in the Qt4-bin directory.
(This should set your QTDIR, QMAKESPEC and PATH-environment-variables.)
- cd into the directory kdiff3-0.9.91/src-Qt4 and type
- qmake kdiff3.pro
- make (which calls either "mingw32-make" or "nmake")
Debugging with MinGW under Windows:
- The qt-win-opensource-4.2.0-mingw.exe only installs release dlls. You will have to compile the
debug dlls yourself. Enter the qt-4.2.0-directory and run "configure -debug" and then "make".
- cd into the directory kdiff3-0.9.91/src-Qt4
- edit the file "Makefile.Debug" and in the LFLAGS replace "-Wl,-subsystem,windows" with "-Wl,-subsystem,console"
(this is necessary so that gdb can send a break signal to the running program)
- make debug (create a debuggable executable)
- gdb debug\kdiff3.exe
- At the "(gdb)"-prompt type "run" and enter to start.
- While the program runs you can't set breakpoints, first interrupt it with Ctrl-C.
- Use "help" to find out about how to use gdb. (Important commands: run, break, backtrace, print, quit)
Using break with c++-methods requires to specify the parameter types too. Breakpoints in constructors might not work.
- I've tested graphical gdb-frontends too:
1. Insight (also from mingw.org) worked until I wanted to interrupt the program for setting breakpoints.
2. Dev-Cpp: The debugger said that the app crashed before even launching it.
Result: For Windows I recommend gdb on the console. Please tell me when things have improved!
(End of KDiff3 with Qt4-instructions)
------------------------------------------------------------------------
Start from commandline:
- Comparing 2 files: kdiff3 file1 file2
- Merging 2 files: kdiff3 file1 file2 -o outputfile
- Comparing 3 files: kdiff3 file1 file2 file3
- Merging 3 files: kdiff3 file1 file2 file3 -o outputfile
Note that file1 will be treated as base of file2 and file3.
If all files have the same name but are in different directories, you can
reduce typework by specifying the filename only for the first file. E.g.:
- Comparing 3 files: kdiff3 dir1/filename dir2 dir3
(This also works in the open-dialog.)
If you start without arguments, then a dialog will appear where you can
select your files via a filebrowser.
For more documentation, see the help-menu or the subdirectory doc.
Have fun!

119
TODO

@ -0,0 +1,119 @@
This file contains some feature-wishes for future KDiff3-versions.
TODO
====
- Fix drawing in columns A/B/C-directory window
- Qt4-translation files
- Double clicking into empty area causes crash
- Option window is too big (within KDE). (Scrollable?)
- Windows issues:
- Diff-Ext-For-KDiff3 included in the installer
- language selection from within KDiff3
- Export to html-format file
- Export to diff-format output (and import?)
- Export to diff3-format output (and import?)
- Use diff-output as input
- Variable width fonts.
- Use regular expression to ignore certain patterns
- Start without visible compare widgets. (? what did I mean by that)
- Hardlinks -performance support
- Manual alignment during merge should tell user his data will be lost
- Installer for windows for users.
- "List Only Deltas" causes directory merge to delete files
(https://sourceforge.net/tracker/index.php?func=detail&aid=1004853&group_id=58666&atid=488548)
- Diff-view for binary files
- Diff-view for pictures
> > What I find weird is that KDiff3 first creates the 3-way merge view (so
> > the window splits in 4 parts), then closes that and reopens in 2-way
> > diff view. I've never seen the binary package do that. Can this be fixed?
- Only show different lines.
- ftp: Abbruch beim Einlesen von Verzeichnis stoppt nicht vollständig
- Projekt-Verwaltung: Die ganze Config-Datei (=Projektdatei) an einen benutzerdefinierten Ort zu legen. (Keine Angabe->Default)
- Bei Combobox-History alle Elemente von (A/B/C/Out) anzeigen.
- Test on empty floppy drive.
-I suppose this has been asked before, but are there any plans to use
colors for change/insert/delete (i.e. blue = change, green = insert, red
= delete)?
> I want to compare two revisions of a file (eventually I wanna do this on
> two directory hierarchies of files) and have an output of how many lines
> of code were added, modified, and deleted for each file and overall.
> Also, for "Send To" from Windows, it would be nice if I could pick one
> file via Send To, find the second file (if it's in a different
> directory), and click "Send To" again to compare. I.e., when user does
> "Send To", if one instance is already open and waiting for a second
> file, the first instance is used.
- kdiff3 does not preserve the permissions of files it overwrites during a 'save' operation.
- Insbesondere Ausführbarkeit "x" und Schreibschutz "w" sollten erhalten bleiben.
- Under Windows: Shortcut Ctrl-Shift-2 (for select B everywhere doesn't work.)
- Paste from Clipboard doesn't work.
- Bug: Comment section isn't recognized as nonwhite difference if several lines are between /* and */ on one side.
- Overview-option to show only remaining conflicts.
- Overview bar for merge-window and for directory-window.
- ??? The gutters (kdiff3 have 2 "gutters") fonts and background-foreground colors sholud be configured other
than the "general" foreground-background colors. Otherwise they are confused with the main dialog.
- Try to autodetect the line-end-style
- Ignore cvs-keywords like $Revision: x.y$
- Undo function in the merge-editor.
- More viewing options for directory widget.
- And one observation. When select Cyrillic charset - it looks like it was
not saved. When open this dialog again - Latin charset is selected anyway.
- Add options to specify charset.
- Ask before saving to a file that already exists (optionally).
- Don't overwrite existing .orig-file, when saving the second time.
- File Menu: Close (Ctrl-F4): Close current file (check if saved and forget the data)
- Dirview:
- Multiselections: Changing Operations or applying ops for all selected items.
- Optionally show size/date for A/B/C
- Choose what to see (all or only different items)
- If only different items are visible: copy the others nevertheless to destdir.
- Warnung wenn Datum in B oder C älter als A ist.
- Zielverzeichnis nachträglich änderbar
- Bei Kopie von Remote nach lokal: Auf jeden Fall das modification Datum setzen.
- Ctrl-Space doesn't work when a file comparison takes place.
- Option to allow case-insensitive filename-matching.
- Options to show/suppress annoying messages
- What's this-Help.
- Tip of the day.
More Statistics before the merge begins:
- How many files are there?
- How many files are equal/different?
- How many files would be copies/merged/ignored?
- Allow to view and merge CVS-conflict files (and diff3-output) and allow to save output
with conflicts in diff3 output-format.
- Provide configure-rules for systems without KDE. (I need help here.)
- Allow different comment-styles (e.g. via a regexp for comments)
- Possibility to jump to next difference in the same line (for very long lines).
- Allow analysis of unified directory-diff/patch-file.
- LineEdit for Save-Filename

File diff suppressed because it is too large Load Diff

863
aclocal.m4 vendored

@ -0,0 +1,863 @@
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.9.6])])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
# therefore $ac_aux_dir as well) can be either absolute or relative,
# depending on how configure is run. This is pretty annoying, since
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
# source directory, any form will work fine, but in subdirectories a
# relative path needs to be adjusted first.
#
# $ac_aux_dir/missing
# fails when called from a subdirectory if $ac_aux_dir is relative
# $top_srcdir/$ac_aux_dir/missing
# fails if $ac_aux_dir is absolute,
# fails when called from a subdirectory in a VPATH build with
# a relative $ac_aux_dir
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
# harmless because $srcdir is `.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
# and then we would define $MISSING as
# MISSING="\${SHELL} $am_aux_dir/missing"
# This will work as long as MISSING is not called from configure, because
# unfortunately $(top_srcdir) has no meaning in configure.
# However there are other variables, like CC, which are often used in
# configure, and could therefore not use this "fixed" $ac_aux_dir.
#
# Another solution, used here, is to always expand $ac_aux_dir to an
# absolute PATH. The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
[dnl Rely on autoconf to set up CDPATH properly.
AC_PREREQ([2.50])dnl
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 7
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
[AC_PREREQ(2.52)dnl
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])
AC_SUBST([$1_FALSE])
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([[conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 8
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
# NAME is "CC", "CXX", "GCJ", or "OBJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
# dependency, and given that the user is not expected to run this macro,
# just rely on AC_PROG_CC.
AC_DEFUN([_AM_DEPENDENCIES],
[AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
[$1], CXX, [depcc="$CXX" am_compiler_list=],
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
none) break ;;
esac
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_$1_dependencies_compiler_type=none
fi
])
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
AM_CONDITIONAL([am__fastdep$1], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR],
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
[AC_ARG_ENABLE(dependency-tracking,
[ --disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
#serial 3
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[for mf in $CONFIG_FILES; do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# So let's grep whole file.
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
# AM_OUTPUT_DEPENDENCY_COMMANDS
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking
# is enabled. FIXME. This creates each `.P' file that we will
# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 8
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 12
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
# The call with PACKAGE and VERSION arguments is the old style
# call (pre autoconf-2.50), which is being phased out. PACKAGE
# and VERSION should now be passed to AC_INIT and removed from
# the call to AM_INIT_AUTOMAKE.
# We support both call styles for the transition. After
# the next Automake release, Autoconf can make the AC_INIT
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.58])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
# test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
# test whether we have cygpath
if test -z "$CYGPATH_W"; then
if (cygpath --version) >/dev/null 2>/dev/null; then
CYGPATH_W='cygpath -w'
else
CYGPATH_W=echo
fi
fi
AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
AM_PROG_INSTALL_SH
AM_PROG_INSTALL_STRIP
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES(CC)],
[define([AC_PROG_CC],
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES(CXX)],
[define([AC_PROG_CXX],
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
])
])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
# loop where config.status creates the headers, so we can generate
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
$1 | $1:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
AC_DEFUN([AM_SET_LEADING_DOT],
[rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
am__leading_dot=.
else
am__leading_dot=_
fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 3
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
@echo done
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# We grep out `Entering directory' and `Leaving directory'
# messages which can occur if `w' ends up in MAKEFLAGS.
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
fi
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
am__include=.include
am__quote="\""
_am_result=BSD
fi
fi
AC_SUBST([am__include])
AC_SUBST([am__quote])
AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
[AC_REQUIRE([AM_MISSING_HAS_RUN])
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
# AM_MISSING_HAS_RUN
# ------------------
# Define MISSING if not defined so far and test if it supports --run.
# If it does, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
AC_MSG_WARN([`missing' script is too old or missing])
fi
])
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_MKDIR_P
# ---------------
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
#
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
# created by `make install' are always world readable, even if the
# installer happens to have an overly restrictive umask (e.g. 077).
# This was a mistake. There are at least two reasons why we must not
# use `-m 0755':
# - it causes special bits like SGID to be ignored,
# - it may be too restrictive (some setups expect 775 directories).
#
# Do not use -m 0755 and let people choose whatever they expect by
# setting umask.
#
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
# Some implementations (such as Solaris 8's) are not thread-safe: if a
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
# concurrently, both version can detect that a/ is missing, but only
# one can create it and the other will error out. Consequently we
# restrict ourselves to GNU make (using the --version option ensures
# this.)
AC_DEFUN([AM_PROG_MKDIR_P],
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
# We used to keeping the `.' as first argument, in order to
# allow $(mkdir_p) to be used without argument. As in
# $(mkdir_p) $(somedir)
# where $(somedir) is conditionally defined. However this is wrong
# for two reasons:
# 1. if the package is installed by a user who cannot write `.'
# make install will fail,
# 2. the above comment should most certainly read
# $(mkdir_p) $(DESTDIR)$(somedir)
# so it does not work when $(somedir) is undefined and
# $(DESTDIR) is not.
# To support the latter case, we have to write
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
# so the `.' trick is pointless.
mkdir_p='mkdir -p --'
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
for d in ./-p ./--version;
do
test -d $d && rmdir $d
done
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
if test -f "$ac_aux_dir/mkinstalldirs"; then
mkdir_p='$(mkinstalldirs)'
else
mkdir_p='$(install_sh) -d'
fi
fi
AC_SUBST([mkdir_p])])
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 3
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
# ------------------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
# ----------------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftest.file`
fi
rm -f conftest.file
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
test "$[2]" = conftest.file
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
AC_MSG_RESULT(yes)])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
# always use install-sh in `make install-strip', and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the `STRIP' environment variable to overrule this program.
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
# FORMAT should be one of `v7', `ustar', or `pax'.
#
# Substitute a variable $(am__tar) that is a command
# writing to stdout a FORMAT-tarball containing the directory
# $tardir.
# tardir=directory && $(am__tar) > result.tar
#
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility.
AM_MISSING_PROG([AMTAR], [tar])
m4_if([$1], [v7],
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
# Loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
# Do not fold the above two line into one, because Tru64 sh and
# Solaris sh will not grok spaces in the rhs of `-'.
for _am_tool in $_am_tools
do
case $_am_tool in
gnutar)
for _am_tar in tar gnutar gtar;
do
AM_RUN_LOG([$_am_tar --version]) && break
done
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
am__untar="$_am_tar -xf -"
;;
plaintar)
# Must skip GNU tar: if it does not support --format= it doesn't create
# ustar tarball either.
(tar --version) >/dev/null 2>&1 && continue
am__tar='tar chf - "$$tardir"'
am__tar_='tar chf - "$tardir"'
am__untar='tar xf -'
;;
pax)
am__tar='pax -L -x $1 -w "$$tardir"'
am__tar_='pax -L -x $1 -w "$tardir"'
am__untar='pax -r'
;;
cpio)
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
am__untar='cpio -i -H $1 -d'
;;
none)
am__tar=false
am__tar_=false
am__untar=false
;;
esac
# If the value was cached, stop now. We just wanted to have am__tar
# and am__untar set.
test -n "${am_cv_prog_tar_$1}" && break
# tar/untar a dummy directory, and stop if the command works
rm -rf conftest.dir
mkdir conftest.dir
echo GrepMe > conftest.dir/file
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
rm -rf conftest.dir
if test -s conftest.tar; then
AM_RUN_LOG([$am__untar <conftest.tar])
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
fi
done
rm -rf conftest.dir
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([acinclude.m4])

1686
config.guess vendored

File diff suppressed because it is too large Load Diff

@ -0,0 +1,244 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the <Carbon/Carbon.h> header file. */
#undef HAVE_CARBON_CARBON_H
/* Define if you have the CoreAudio API */
#undef HAVE_COREAUDIO
/* Define to 1 if you have the <crt_externs.h> header file. */
#undef HAVE_CRT_EXTERNS_H
/* Defines if your system has the crypt function */
#undef HAVE_CRYPT
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define if you have libjpeg */
#undef HAVE_LIBJPEG
/* Define if you have libpng */
#undef HAVE_LIBPNG
/* Define if you have a working libpthread (will enable threaded code) */
#undef HAVE_LIBPTHREAD
/* Define if you have libz */
#undef HAVE_LIBZ
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define if your system needs _NSGetEnviron to set up the environment */
#undef HAVE_NSGETENVIRON
/* Define if you have res_init */
#undef HAVE_RES_INIT
/* Define if you have the res_init prototype */
#undef HAVE_RES_INIT_PROTO
/* Define if you have a STL implementation by SGI */
#undef HAVE_SGI_STL
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have strlcat */
#undef HAVE_STRLCAT
/* Define if you have the strlcat prototype */
#undef HAVE_STRLCAT_PROTO
/* Define if you have strlcpy */
#undef HAVE_STRLCPY
/* Define if you have the strlcpy prototype */
#undef HAVE_STRLCPY_PROTO
/* Define to 1 if you have the <sys/bitypes.h> header file. */
#undef HAVE_SYS_BITYPES_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `vsnprintf' function. */
#undef HAVE_VSNPRINTF
/* Suffix for lib directories */
#undef KDELIBSUFF
/* Define a safe value for MAXPATHLEN */
#undef KDEMAXPATHLEN
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* The size of `char *', as computed by sizeof. */
#undef SIZEOF_CHAR_P
/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of `short', as computed by sizeof. */
#undef SIZEOF_SHORT
/* The size of `size_t', as computed by sizeof. */
#undef SIZEOF_SIZE_T
/* The size of `unsigned long', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_LONG
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
/* Defined if compiling without arts */
#undef WITHOUT_ARTS
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/*
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
* headers and I'm too lazy to write a configure test as long as only
* unixware is related
*/
#ifdef _UNIXWARE
#define HAVE_BOOLEAN
#endif
/*
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
* that defines bzero.
*/
#if defined(_AIX)
#include <strings.h>
#endif
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
# include <sys/time.h>
# include <crt_externs.h>
# define environ (*_NSGetEnviron())
#endif
#if !defined(HAVE_RES_INIT_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
int res_init(void);
#ifdef __cplusplus
}
#endif
#endif
#if !defined(HAVE_STRLCAT_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
unsigned long strlcat(char*, const char*, unsigned long);
#ifdef __cplusplus
}
#endif
#endif
#if !defined(HAVE_STRLCPY_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
unsigned long strlcpy(char*, const char*, unsigned long);
#ifdef __cplusplus
}
#endif
#endif
/*
* On HP-UX, the declaration of vsnprintf() is needed every time !
*/
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
#if __STDC__
#include <stdarg.h>
#include <stdlib.h>
#else
#include <varargs.h>
#endif
#ifdef __cplusplus
extern "C"
#endif
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
#ifdef __cplusplus
extern "C"
#endif
int snprintf(char *str, size_t n, char const *fmt, ...);
#endif
#if defined(__SVR4) && !defined(__svr4__)
#define __svr4__ 1
#endif
/* type to use in place of socklen_t if not defined */
#undef kde_socklen_t
/* type to use in place of socklen_t if not defined (deprecated, use
kde_socklen_t) */
#undef ksize_t

@ -0,0 +1,363 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ ./configure --disable-rpath --prefix=/opt/kde3 --with-qt-includes=/usr/include/qt3 --host=x86_64-linux-gnu --build=x86_64-linux-gnu --mandir=/opt/kde3/share/man --infodir=/opt/kde3/share/info --with-extra-libs=/opt/kde3/lib --with-extra-includes=/opt/kde3/include/kde
## --------- ##
## Platform. ##
## --------- ##
hostname = argus4
uname -m = x86_64
uname -r = 2.6.31-16-generic
uname -s = Linux
uname -v = #53-Ubuntu SMP Tue Dec 8 04:02:15 UTC 2009
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /opt/kde3/bin
PATH: /opt/kde3/games
PATH: /opt/kde3/bin
PATH: /home/eldarion/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2140: checking build system type
configure:2158: result: x86_64-pc-linux-gnu
configure:2180: checking host system type
configure:2195: result: x86_64-pc-linux-gnu
configure:2217: checking target system type
configure:2232: result: x86_64-pc-linux-gnu
configure:2293: checking for a BSD-compatible install
configure:2349: result: /usr/bin/install -c
configure:2364: checking for -p flag to install
configure:2377: result: yes
configure:2388: checking whether build environment is sane
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-pc-linux-gnu
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-Wall -g -O2'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-g -O2'
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FFLAGS_set=set
ac_cv_env_FFLAGS_value='-g -O2'
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=-Wl,-Bsymbolic-functions
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_XMKMF_set=
ac_cv_env_XMKMF_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=x86_64-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=x86_64-linux-gnu
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-pc-linux-gnu
ac_cv_path_install='/usr/bin/install -c'
ac_cv_target=x86_64-pc-linux-gnu
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR=''
AR=''
ARTSCCONFIG=''
AUTOCONF=''
AUTODIRS=''
AUTOHEADER=''
AUTOMAKE=''
AWK=''
CC=''
CCDEPMODE=''
CFLAGS='-Wall -g -O2'
CONF_FILES=''
CPP=''
CPPFLAGS=''
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS='-g -O2'
CYGPATH_W=''
DCOPIDL2CPP=''
DCOPIDL=''
DCOPIDLNG=''
DCOP_DEPENDENCIES=''
DEFS=''
DEPDIR=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_PERMISSIVE_FLAG=''
EXEEXT=''
F77=''
FFLAGS='-g -O2'
FRAMEWORK_COREAUDIO=''
GMSGFMT=''
GREP=''
HAVE_GCC_VISIBILITY=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM=''
KCFG_DEPENDENCIES=''
KCONFIG_COMPILER=''
KDECONFIG=''
KDE_CHECK_PLUGIN=''
KDE_EXTRA_RPATH=''
KDE_INCLUDES=''
KDE_LDFLAGS=''
KDE_MT_LDFLAGS=''
KDE_MT_LIBS=''
KDE_NO_UNDEFINED=''
KDE_PLUGIN=''
KDE_RPATH=''
KDE_USE_CLOSURE_FALSE=''
KDE_USE_CLOSURE_TRUE=''
KDE_USE_FINAL_FALSE=''
KDE_USE_FINAL_TRUE=''
KDE_USE_FPIE=''
KDE_USE_NMCHECK_FALSE=''
KDE_USE_NMCHECK_TRUE=''
KDE_USE_PIE=''
KDE_XSL_STYLESHEET=''
LDFLAGS='-Wl,-Bsymbolic-functions'
LDFLAGS_AS_NEEDED=''
LDFLAGS_NEW_DTAGS=''
LIBCOMPAT=''
LIBCRYPT=''
LIBDL=''
LIBJPEG=''
LIBOBJS=''
LIBPNG=''
LIBPTHREAD=''
LIBRESOLV=''
LIBS=''
LIBSM=''
LIBSOCKET=''
LIBTOOL=''
LIBUCB=''
LIBUTIL=''
LIBZ=''
LIB_KAB=''
LIB_KABC=''
LIB_KDECORE=''
LIB_KDED=''
LIB_KDEPIM=''
LIB_KDEPRINT=''
LIB_KDEUI=''
LIB_KDNSSD=''
LIB_KFILE=''
LIB_KFM=''
LIB_KHTML=''
LIB_KIMPROXY=''
LIB_KIO=''
LIB_KJS=''
LIB_KNEWSTUFF=''
LIB_KPARTS=''
LIB_KSPELL=''
LIB_KSYCOCA=''
LIB_KUNITTEST=''
LIB_KUTILS=''
LIB_POLL=''
LIB_QPE=''
LIB_QT=''
LIB_SMB=''
LIB_X11=''
LIB_XEXT=''
LIB_XRENDER=''
LN_S=''
LTLIBOBJS=''
MAKEINFO=''
MAKEKDEWIDGETS=''
MCOPIDL=''
MEINPROC=''
MOC=''
MSGFMT=''
NOOPT_CFLAGS=''
NOOPT_CXXFLAGS=''
OBJEXT=''
PACKAGE=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PERL=''
QTE_NORTTI=''
QT_INCLUDES=''
QT_LDFLAGS=''
RANLIB=''
SET_MAKE=''
SHELL='/bin/bash'
STRIP=''
TOPSUBDIRS=''
UIC=''
UIC_TR=''
USER_INCLUDES=''
USER_LDFLAGS=''
USE_EXCEPTIONS=''
USE_RTTI=''
USE_THREADS=''
VERSION=''
WOVERLOADED_VIRTUAL=''
XGETTEXT=''
XMKMF=''
XMLLINT=''
X_EXTRA_LIBS=''
X_INCLUDES=''
X_LDFLAGS=''
X_PRE_LIBS=''
X_RPATH=''
ac_ct_CC=''
ac_ct_CXX=''
ac_ct_F77=''
all_includes=''
all_libraries=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__leading_dot=''
am__quote=''
am__tar=''
am__untar=''
bindir='${exec_prefix}/bin'
build='x86_64-pc-linux-gnu'
build_alias='x86_64-linux-gnu'
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-pc-linux-gnu'
host_alias='x86_64-linux-gnu'
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='pc'
htmldir='${docdir}'
include_ARTS_FALSE=''
include_ARTS_TRUE=''
include_libkonq_FALSE=''
include_libkonq_TRUE=''
include_x11_FALSE=''
include_x11_TRUE=''
includedir='${prefix}/include'
infodir='/opt/kde3/share/info'
install_sh=''
kde_appsdir=''
kde_bindir=''
kde_confdir=''
kde_datadir=''
kde_htmldir=''
kde_icondir=''
kde_includes=''
kde_kcfgdir=''
kde_libraries=''
kde_libs_htmldir=''
kde_libs_prefix=''
kde_locale=''
kde_mimedir=''
kde_moduledir=''
kde_qtver=''
kde_servicesdir=''
kde_servicetypesdir=''
kde_sounddir=''
kde_styledir=''
kde_templatesdir=''
kde_wallpaperdir=''
kde_widgetdir=''
kdeinitdir=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='/opt/kde3/share/man'
mkdir_p=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/opt/kde3'
program_transform_name='s,x,x,'
psdir='${docdir}'
qt_includes=''
qt_libraries=''
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='x86_64-pc-linux-gnu'
target_alias=''
target_cpu='x86_64'
target_os='linux-gnu'
target_vendor='pc'
unsermake_enable_pch_FALSE=''
unsermake_enable_pch_TRUE=''
x_includes='NONE'
x_libraries='NONE'
xdg_appsdir=''
xdg_directorydir=''
xdg_menudir=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
configure: caught signal 2
configure: exit 1

1686
config.sub vendored

File diff suppressed because it is too large Load Diff

@ -0,0 +1,2 @@
./admin/configure.in.min
configure.in.in

@ -0,0 +1,166 @@
dnl =======================================================
dnl FILE: ./admin/configure.in.min
dnl =======================================================
dnl This file is part of the KDE libraries/packages
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
dnl This file is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
dnl License as published by the Free Software Foundation; either
dnl version 2 of the License, or (at your option) any later version.
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Library General Public License for more details.
dnl You should have received a copy of the GNU Library General Public License
dnl along with this library; see the file COPYING.LIB. If not, write to
dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
dnl Boston, MA 02110-1301, USA.
# Original Author was Kalle@kde.org
# I lifted it in some mater. (Stephan Kulow)
# I used much code from Janos Farkas
dnl Process this file with autoconf to produce a configure script.
AC_INIT(acinclude.m4) dnl a source file from your sub dir
dnl This is so we can use kde-common
AC_CONFIG_AUX_DIR(admin)
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
unset CDPATH
dnl Checking host/target/build systems, for make, install etc.
AC_CANONICAL_SYSTEM
dnl Perform program name transformation
AC_ARG_PROGRAM
dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(kdiff3, 0.9.92) dnl searches for some needed programs
KDE_SET_PREFIX
dnl generate the config header
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
dnl Checks for programs.
AC_CHECK_COMPILERS
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
KDE_PROG_LIBTOOL
dnl for NLS support. Call them in this order!
dnl WITH_NLS is for the po files
AM_KDE_WITH_NLS
KDE_USE_QT(3.2)
AC_PATH_KDE
dnl =======================================================
dnl FILE: configure.in.in
dnl =======================================================
#MIN_CONFIG(3.2)
###################################################
# Check for Konqueror (copied from krusader-1.70)
###################################################
AC_ARG_WITH(konqueror,
AC_HELP_STRING([--without-konqueror],[build KDiff3 without support Konqueror's servicemenus [default=with]]),
[with_konq=$withval],
[with_konq=yes]
)
if test "$with_konq" != "no"; then
# check for the headers
have_libkonq=yes
KDE_CHECK_HEADER(konq_popupmenu.h, ,[have_libkonq=no] )
if test "$have_libkonq" = "no"; then
# if this var is 'yes', the configure-suppery drops a warning.
# see admin/configure.in.bot.end
warn_konq=yes
fi
fi
if test "$have_libkonq" != "yes"; then
DO_NOT_COMPILE="$DO_NOT_COMPILE kdiff3plugin"
fi
AM_CONDITIONAL(include_libkonq, test "$have_libkonq" = yes)
dnl PACKAGE set before
AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN
KDE_CREATE_SUBDIRSLIST
AC_CONFIG_FILES([ Makefile ])
AC_CONFIG_FILES([ doc/Makefile ])
AC_CONFIG_FILES([ doc/da/Makefile ])
AC_CONFIG_FILES([ doc/de/Makefile ])
AC_CONFIG_FILES([ doc/en/Makefile ])
AC_CONFIG_FILES([ doc/es/Makefile ])
AC_CONFIG_FILES([ doc/et/Makefile ])
AC_CONFIG_FILES([ doc/fr/Makefile ])
AC_CONFIG_FILES([ doc/it/Makefile ])
AC_CONFIG_FILES([ doc/nl/Makefile ])
AC_CONFIG_FILES([ doc/pt/Makefile ])
AC_CONFIG_FILES([ doc/sv/Makefile ])
AC_CONFIG_FILES([ kdiff3plugin/Makefile ])
AC_CONFIG_FILES([ kdiff3plugin/po/Makefile ])
AC_CONFIG_FILES([ po/Makefile ])
AC_CONFIG_FILES([ src/Makefile ])
AC_OUTPUT
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
# And if so, warn when they don't match
if test "$kde_libs_prefix" != "$given_prefix"; then
# And if kde doesn't know about the prefix yet
echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
if test $? -ne 0; then
echo ""
echo "Warning: you chose to install this package in $given_prefix,"
echo "but KDE was found in $kde_libs_prefix."
echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
echo "Then restart KDE."
echo ""
fi
fi
fi
if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then
echo ""
echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility"
echo "was not included. Therefore, GCC symbol visibility support remains disabled."
echo ""
echo "For better performance, consider including the Qt visibility supporting patch"
echo "located at:"
echo ""
echo "http://bugs.kde.org/show_bug.cgi?id=109386"
echo ""
echo "and recompile all of Qt and KDE. Note, this is entirely optional and"
echo "everything will continue to work just fine without it."
echo ""
fi
if (test $warn_konq);
then echo "NOTICE: Since the Konqueror-headers were not found KDiff3 will be built without support for its service-menus and the KDiff3-service menu will not be built. (Install the package containing konq_popupmenu.h. Possibly kdebase-devel or on Debian libkonq4-dev etc.)"
fi
if test "$all_tests" = "bad"; then
if test ! "$cache_file" = "/dev/null"; then
echo ""
echo "Please remove the file $cache_file after changing your setup"
echo "so that configure will find the changes next time."
echo ""
fi
else
echo ""
echo "Good - your configure finished. Start make now"
echo ""
fi

@ -0,0 +1,34 @@
#MIN_CONFIG(3.2)
###################################################
# Check for Konqueror (copied from krusader-1.70)
###################################################
AC_ARG_WITH(konqueror,
AC_HELP_STRING([--without-konqueror],[build KDiff3 without support Konqueror's servicemenus [default=with]]),
[with_konq=$withval],
[with_konq=yes]
)
if test "$with_konq" != "no"; then
# check for the headers
have_libkonq=yes
KDE_CHECK_HEADER(konq_popupmenu.h, ,[have_libkonq=no] )
if test "$have_libkonq" = "no"; then
# if this var is 'yes', the configure-suppery drops a warning.
# see admin/configure.in.bot.end
warn_konq=yes
fi
fi
if test "$have_libkonq" != "yes"; then
DO_NOT_COMPILE="$DO_NOT_COMPILE kdiff3plugin"
fi
AM_CONDITIONAL(include_libkonq, test "$have_libkonq" = yes)
AM_INIT_AUTOMAKE(kdiff3, 0.9.92)
AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN

@ -0,0 +1,385 @@
class_factory.o: class_factory.cpp class_factory.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shlobj.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ole2.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winerror.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objbase.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpc.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windows.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/include/stdarg.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windef.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnt.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/string.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/_mingw.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/include/stddef.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/basetsd.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/pshpack4.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/poppack.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wincon.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winbase.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wingdi.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winuser.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnls.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winver.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnetwk.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winreg.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winsvc.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/cderr.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dde.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ddeml.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dlgs.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/imm.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/lzexpand.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/mmsystem.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/nb30.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcdce.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/basetyps.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcdcep.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnsi.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnterr.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shellapi.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/pshpack2.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winperf.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/commdlg.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winspool.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winsock2.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcndr.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnsip.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objfwd.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdlib.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wtypes.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/unknwn.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objidl.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/cguid.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/olectlid.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oleauto.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oaidl.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oleidl.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shlguid.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/commctrl.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/prsht.h \
diff_ext.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windowsx.h \
server.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/list \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/functexcept.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/exception_defines.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_algobase.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++config.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/os_defines.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstring \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstddef \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/climits \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/limits.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstdlib \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/new \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/exception \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/iosfwd \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++locale.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/clocale \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/locale.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstdio \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++io.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/gthr.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/gthr-default.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/errno.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cctype \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ctype.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stringfwd.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/postypes.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cwchar \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/ctime \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/time.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wchar.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wctype.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdint.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_pair.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/type_traits.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator_base_types.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator_base_funcs.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/concept_check.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/debug/debug.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cassert \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/assert.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/allocator.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++allocator.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/ext/new_allocator.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_construct.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_uninitialized.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_list.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/list.tcc \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/string \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/char_traits.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/memory \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_raw_storage_iter.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_function.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/basic_string.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/atomicity.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/atomic_word.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/algorithm \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_algo.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_heap.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_tempbuf.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/basic_string.tcc
diff_ext.o: diff_ext.cpp \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/assert.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/_mingw.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/include/stddef.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/include/stdarg.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/tchar.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wchar.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wctype.h \
diff_ext.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windows.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windef.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnt.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winerror.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/string.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/basetsd.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/pshpack4.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/poppack.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wincon.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winbase.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wingdi.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winuser.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnls.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winver.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnetwk.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winreg.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winsvc.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/cderr.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dde.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ddeml.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dlgs.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/imm.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/lzexpand.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/mmsystem.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/nb30.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpc.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcdce.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/basetyps.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcdcep.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnsi.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnterr.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shellapi.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/pshpack2.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winperf.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/commdlg.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winspool.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winsock2.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ole2.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objbase.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcndr.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnsip.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objfwd.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdlib.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wtypes.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/unknwn.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objidl.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/cguid.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/olectlid.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oleauto.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oaidl.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oleidl.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windowsx.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shlobj.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shlguid.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/commctrl.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/prsht.h \
server.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/list \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/functexcept.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/exception_defines.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_algobase.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++config.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/os_defines.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstring \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstddef \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/climits \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/limits.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstdlib \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/new \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/exception \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/iosfwd \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++locale.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/clocale \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/locale.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstdio \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++io.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/gthr.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/gthr-default.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/errno.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cctype \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ctype.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stringfwd.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/postypes.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cwchar \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/ctime \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/time.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdint.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_pair.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/type_traits.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator_base_types.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator_base_funcs.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/concept_check.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/debug/debug.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cassert \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/allocator.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++allocator.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/ext/new_allocator.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_construct.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_uninitialized.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_list.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/list.tcc \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/string \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/char_traits.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/memory \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_raw_storage_iter.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_function.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/basic_string.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/atomicity.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/atomic_word.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/algorithm \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_algo.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_heap.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_tempbuf.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/basic_string.tcc \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/map \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_tree.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/cpp_type_traits.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_map.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_multimap.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/vector \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_vector.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bvector.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/vector.tcc
server.o: server.cpp \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/_mingw.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/include/stddef.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/include/stdarg.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windows.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windef.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnt.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winerror.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/string.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/basetsd.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/pshpack4.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/poppack.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wincon.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winbase.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wingdi.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winuser.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnls.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winver.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnetwk.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winreg.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winsvc.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/cderr.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dde.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ddeml.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dlgs.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/imm.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/lzexpand.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/mmsystem.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/nb30.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpc.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcdce.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/basetyps.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcdcep.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnsi.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnterr.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shellapi.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/pshpack2.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winperf.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/commdlg.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winspool.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winsock2.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ole2.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objbase.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcndr.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnsip.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objfwd.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdlib.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wtypes.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/unknwn.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objidl.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/cguid.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/olectlid.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oleauto.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oaidl.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oleidl.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/tchar.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wchar.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wctype.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shlguid.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/olectl.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ocidl.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/initguid.h \
server.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/list \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/functexcept.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/exception_defines.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_algobase.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++config.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/os_defines.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstring \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstddef \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/climits \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/limits.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstdlib \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/new \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/exception \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/iosfwd \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++locale.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/clocale \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/locale.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstdio \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++io.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/gthr.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/gthr-default.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/errno.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cctype \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ctype.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stringfwd.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/postypes.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cwchar \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/ctime \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/time.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdint.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_pair.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/type_traits.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator_base_types.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator_base_funcs.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/concept_check.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/debug/debug.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cassert \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/assert.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/allocator.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++allocator.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/ext/new_allocator.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_construct.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_uninitialized.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_list.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/list.tcc \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/string \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/char_traits.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/memory \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_raw_storage_iter.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_function.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/basic_string.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/atomicity.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/atomic_word.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/algorithm \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_algo.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_heap.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_tempbuf.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/basic_string.tcc \
class_factory.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shlobj.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/commctrl.h \
c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/prsht.h

@ -0,0 +1,25 @@
Diff-Ext: Copyright (c) 2003-2006, Sergey Zorin
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above
copyright notice, this list of conditions and the following
disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

@ -0,0 +1,64 @@
# Project: diff_ext
# Generates diff_ext_for_kdiff3.dll with gcc.
# Can be used for Cygwin and MingW (MingW ignores -mno-cygwin)
#
PROJ := diff_ext_for_kdiff3
CXX ?= g++.exe
ifdef DEBUG
CXXFLAGS ?= -g
else
CXXFLAGS ?= -Os
LDFLAGS += -s
endif
CXXFLAGS += -ansi -pedantic -Wall -W -D_UNICODE -DUNICODE
LIBS := -luuid -lole32
DEFFILE = $(PROJ).def
STATICLIB = $(PROJ).a
EXPLIB = $(PROJ).exp
SRC-CXX = $(wildcard *.cpp)
SRC-RC = $(wildcard *.rc)
OBJ := $(SRC-CXX:.cpp=.o)
RES := $(SRC-RC:.rc=.res)
OBJ += $(RES)
DLL := $(PROJ).dll
.PHONY: all clean
.SUFFIXES: .rc .res
all: .depend $(DLL)
debug:
$(MAKE) DEBUG=YES UNICODE=YES
release:
$(MAKE)
.depend: Makefile $(SRC-RC) $(SRC-CXX)
$(CXX) -M $(CXXFLAGS) $(SRC-RC) $(SRC-CXX) > .depend
include .depend
clean: clean-custom
${RM} $(OBJ) $(DLL) ${EXPLIB} $(STATICLIB)
$(DLL): $(OBJ)
dllwrap.exe \
--mno-cygwin \
--def $(DEFFILE) \
--output-exp ${EXPLIB} \
--driver-name c++ -L/usr/local/lib -L/usr/lib/mingw \
--implib $(STATICLIB) \
$(OBJ) $(LDFLAGS) $(LIBS) \
-o $@
.cpp.o:
$(CXX) $(CXXFLAGS) -c $< -o $@
.rc.res:
windres.exe $< -J rc -o $@ -O coff -DMING

@ -0,0 +1,41 @@
Diff-Ext for KDiff3 - Readme
============================
Authors:
Sergey Zorin (Author of diff-ext, see http://diff-ext.sourceforge.net)
Joachim Eibl (KDiff3-specific extensions and integration, see http://kdiff3.sourceforge.net)
Copyright (c):
Original Diff-Ext: Copyright (c) 2003-2006, Sergey Zorin, All rights reserved.
Extensions for KDiff3: Copyright (c) 2006, Joachim Eibl
License: See file LICENSE in this subdirectory
Building:
Via MinGW-compiler package (http://www.mingw.org/): Compile via gnu-make (Makefile)
Via MSVC2005: Use vcproj-file.
Installation:
For basic testing you can run "regsvr32 diff_ext_for_kdiff3.dll".
To use all features the installation that comes with the KDiff3-setup*.exe is recommended.
See also the nsi-file available on the KDiff3-subversion-repository:
http://svn.sourceforge.net/viewvc/*checkout*/kdiff3/trunk/kdiff3/windows_installer/kdiff3.nsi
Translation:
If you would like help translating diff-ext-for-kdiff3 please copy the diff_ext.pot to
diff_ext_xx.po (where xx is the language-shortcut).
Then edit that file and fill in the msgstr-string for each respective msgid-string.
Then place the for in the KDiff3-translations subdirectory.
Use the language selection within KDiff3 to switch the language or set the language shortcut
in the registry HKEY_CURRENT_USER\Software\KDiff3\diff-ext: Language
If everything works, please send me the created file.
Have fun,
Joachim

@ -0,0 +1,77 @@
/*
* Copyright (c) 2003, Sergey Zorin. All rights reserved.
*
* This software is distributable under the BSD license. See the terms
* of the BSD license in the LICENSE file provided with this software.
*
*/
#include "class_factory.h"
#include "diff_ext.h"
#include "server.h"
CLASS_FACTORY::CLASS_FACTORY() {
_ref_count = 0L;
SERVER::instance()->lock();
}
CLASS_FACTORY::~CLASS_FACTORY() {
SERVER::instance()->release();
}
STDMETHODIMP
CLASS_FACTORY::QueryInterface(REFIID riid, void** ppv) {
HRESULT ret = E_NOINTERFACE;
*ppv = 0;
if(IsEqualIID(riid, IID_IUnknown) || IsEqualIID(riid, IID_IClassFactory)) {
*ppv = static_cast<CLASS_FACTORY*>(this);
AddRef();
ret = NOERROR;
}
return ret;
}
STDMETHODIMP_(ULONG)
CLASS_FACTORY::AddRef() {
return InterlockedIncrement((LPLONG)&_ref_count);
}
STDMETHODIMP_(ULONG)
CLASS_FACTORY::Release() {
ULONG ret = 0L;
if(InterlockedDecrement((LPLONG)&_ref_count) != 0)
ret = _ref_count;
else
delete this;
return ret;
}
STDMETHODIMP
CLASS_FACTORY::CreateInstance(IUnknown* outer, REFIID refiid, void** obj) {
HRESULT ret = CLASS_E_NOAGGREGATION;
*obj = 0;
// Shell extensions typically don't support aggregation (inheritance)
if(outer == 0) {
DIFF_EXT* ext = new DIFF_EXT();
if(ext == 0)
ret = E_OUTOFMEMORY;
else
ret = ext->QueryInterface(refiid, obj);
}
return ret;
}
STDMETHODIMP
CLASS_FACTORY::LockServer(BOOL) {
return NOERROR;
}

@ -0,0 +1,33 @@
/*
* Copyright (c) 2003, Sergey Zorin. All rights reserved.
*
* This software is distributable under the BSD license. See the terms
* of the BSD license in the LICENSE file provided with this software.
*
*/
#ifndef __class_factory_h__
#define __class_factory_h__
#include <shlobj.h>
#include <shlguid.h>
class CLASS_FACTORY : public IClassFactory {
public:
CLASS_FACTORY();
virtual ~CLASS_FACTORY();
//IUnknown members
STDMETHODIMP QueryInterface(REFIID, void**);
STDMETHODIMP_(ULONG) AddRef();
STDMETHODIMP_(ULONG) Release();
//ICLASS_FACTORY members
STDMETHODIMP CreateInstance(IUnknown*, REFIID, void**);
STDMETHODIMP LockServer(BOOL);
private:
ULONG _ref_count;
};
#endif //__class_factory_h__

@ -0,0 +1,624 @@
/*
* Copyright (c) 2003-2006, Sergey Zorin. All rights reserved.
*
* This software is distributable under the BSD license. See the terms
* of the BSD license in the LICENSE file provided with this software.
*
*/
#define _CRT_SECURE_NO_DEPRECATE
#include <assert.h>
#include <stdio.h>
#include <tchar.h>
#include "diff_ext.h"
#include <map>
#include <vector>
#ifdef UNICODE
static void parseString( const std::wstring& s, size_t& i /*pos*/, std::wstring& r /*result*/ )
{
size_t size = s.size();
++i; // Skip initial '"'
for( ; i<size; ++i )
{
if ( s[i]=='"' )
{
++i;
break;
}
else if ( s[i]==L'\\' && i+1<size )
{
++i;
switch( s[i] ) {
case L'n': r+=L'\n'; break;
case L'r': r+=L'\r'; break;
case L'\\': r+=L'\\'; break;
case L'"': r+=L'"'; break;
case L't': r+=L'\t'; break;
default: r+=L'\\'; r+=s[i]; break;
}
}
else
r+=s[i];
}
}
static std::map< std::wstring, std::wstring > s_translationMap;
static tstring s_translationFileName;
void readTranslationFile()
{
s_translationMap.clear();
FILE* pFile = _tfopen( s_translationFileName.c_str(), TEXT("rb") );
if ( pFile )
{
MESSAGELOG( TEXT( "Reading translations: " ) + s_translationFileName );
std::vector<char> buffer;
try {
if ( fseek(pFile, 0, SEEK_END)==0 )
{
size_t length = ftell(pFile); // Get the file length
buffer.resize(length);
fseek(pFile, 0, SEEK_SET );
fread(&buffer[0], 1, length, pFile );
}
}
catch(...)
{
}
fclose(pFile);
if (buffer.size()>0)
{
size_t bufferSize = buffer.size();
int offset = 0;
if ( buffer[0]=='\xEF' && buffer[1]=='\xBB' && buffer[2]=='\xBF' )
{
offset += 3;
bufferSize -= 3;
}
size_t sLength = MultiByteToWideChar(CP_UTF8,0,&buffer[offset], (int)bufferSize, 0, 0 );
std::wstring s( sLength, L' ' );
MultiByteToWideChar(CP_UTF8,0,&buffer[offset], (int)bufferSize, &s[0], (int)s.size() );
// Now analyse the file and extract translation strings
std::wstring msgid;
std::wstring msgstr;
msgid.reserve( 1000 );
msgstr.reserve( 1000 );
bool bExpectingId = true;
for( size_t i=0; i<sLength; ++i )
{
wchar_t c = s[i];
if( c == L'\n' || c == L'\r' || c==L' ' || c==L'\t' )
continue;
else if ( s[i]==L'#' ) // Comment
while( s[i]!='\n' && s[i]!=L'\r' && i<sLength )
++i;
else if ( s[i]==L'"' )
{
if ( bExpectingId ) parseString(s,i,msgid);
else parseString(s,i,msgstr);
}
else if ( sLength-i>5 && wcsncmp( &s[i], L"msgid", 5 )==0 )
{
if ( !msgid.empty() && !msgstr.empty() )
{
s_translationMap[msgid] = msgstr;
}
bExpectingId = true;
msgid.clear();
i+=4;
}
else if ( sLength-i>6 && wcsncmp( &s[i], L"msgstr", 6 )==0 )
{
bExpectingId = false;
msgstr.clear();
i+=5;
}
else
{
// Unexpected ?
}
}
}
}
else
{
ERRORLOG( TEXT( "Reading translations failed: " ) + s_translationFileName );
}
}
static tstring getTranslation( const tstring& fallback )
{
std::map< std::wstring, std::wstring >::iterator i = s_translationMap.find( fallback );
if (i!=s_translationMap.end())
return i->second;
return fallback;
}
#else
static tstring getTranslation( const tstring& fallback )
{
return fallback;
}
#endif
static void replaceArgs( tstring& s, const tstring& r1, const tstring& r2=TEXT(""), const tstring& r3=TEXT("") )
{
tstring arg1 = TEXT("%1");
size_t pos1 = s.find( arg1 );
tstring arg2 = TEXT("%2");
size_t pos2 = s.find( arg2 );
tstring arg3 = TEXT("%3");
size_t pos3 = s.find( arg3 );
if ( pos1 != size_t(-1) )
{
s.replace( pos1, arg1.length(), r1 );
if ( pos2 != size_t(-1) && pos1<pos2 )
pos2 += r1.length() - arg1.length();
if ( pos3 != size_t(-1) && pos1<pos3 )
pos3 += r1.length() - arg1.length();
}
if ( pos2 != size_t(-1) )
{
s.replace( pos2, arg2.length(), r2 );
if ( pos3 != size_t(-1) && pos2<pos3 )
pos3 += r2.length() - arg2.length();
}
if ( pos3 != size_t(-1) )
{
s.replace( pos3, arg3.length(), r3 );
}
}
DIFF_EXT::DIFF_EXT()
: m_nrOfSelectedFiles(0), _ref_count(0L),
m_recentFiles( SERVER::instance()->recent_files() )
{
LOG();
_resource = SERVER::instance()->handle();
SERVER::instance()->lock();
}
DIFF_EXT::~DIFF_EXT()
{
LOG();
if(_resource != SERVER::instance()->handle()) {
FreeLibrary(_resource);
}
SERVER::instance()->release();
}
STDMETHODIMP
DIFF_EXT::QueryInterface(REFIID refiid, void** ppv)
{
HRESULT ret = E_NOINTERFACE;
*ppv = 0;
if(IsEqualIID(refiid, IID_IShellExtInit) || IsEqualIID(refiid, IID_IUnknown)) {
*ppv = static_cast<IShellExtInit*>(this);
} else if (IsEqualIID(refiid, IID_IContextMenu)) {
*ppv = static_cast<IContextMenu*>(this);
}
if(*ppv != 0) {
AddRef();
ret = NOERROR;
}
return ret;
}
STDMETHODIMP_(ULONG)
DIFF_EXT::AddRef()
{
return InterlockedIncrement((LPLONG)&_ref_count);
}
STDMETHODIMP_(ULONG)
DIFF_EXT::Release()
{
ULONG ret = 0L;
if(InterlockedDecrement((LPLONG)&_ref_count) != 0) {
ret = _ref_count;
} else {
delete this;
}
return ret;
}
STDMETHODIMP
DIFF_EXT::Initialize(LPCITEMIDLIST /*folder not used*/, IDataObject* data, HKEY /*key not used*/)
{
LOG();
#ifdef UNICODE
tstring installDir = SERVER::instance()->getRegistryKeyString( TEXT(""), TEXT("InstallDir") );
tstring language = SERVER::instance()->getRegistryKeyString( TEXT(""), TEXT("Language") );
tstring translationFileName = installDir + TEXT("\\translations\\diff_ext_") + language + TEXT(".po");
if ( s_translationFileName != translationFileName )
{
s_translationFileName = translationFileName;
readTranslationFile();
}
#endif
FORMATETC format = {CF_HDROP, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};
STGMEDIUM medium;
medium.tymed = TYMED_HGLOBAL;
HRESULT ret = E_INVALIDARG;
if(data->GetData(&format, &medium) == S_OK)
{
HDROP drop = (HDROP)medium.hGlobal;
m_nrOfSelectedFiles = DragQueryFile(drop, 0xFFFFFFFF, 0, 0);
TCHAR tmp[MAX_PATH];
//initialize_language();
if (m_nrOfSelectedFiles >= 1 && m_nrOfSelectedFiles <= 3)
{
DragQueryFile(drop, 0, tmp, MAX_PATH);
_file_name1 = tmp;
if(m_nrOfSelectedFiles >= 2)
{
DragQueryFile(drop, 1, tmp, MAX_PATH);
_file_name2 = tmp;
}
if( m_nrOfSelectedFiles == 3)
{
DragQueryFile(drop, 2, tmp, MAX_PATH);
_file_name3 = tmp;
}
ret = S_OK;
}
}
else
{
SYSERRORLOG(TEXT("GetData"));
}
return ret;
}
static int insertMenuItemHelper( HMENU menu, UINT id, UINT position, const tstring& text,
UINT fState = MFS_ENABLED, HMENU hSubMenu=0 )
{
MENUITEMINFO item_info;
ZeroMemory(&item_info, sizeof(item_info));
item_info.cbSize = sizeof(MENUITEMINFO);
item_info.wID = id;
if (text.empty())
{ // Separator
item_info.fMask = MIIM_TYPE;
item_info.fType = MFT_SEPARATOR;
item_info.dwTypeData = 0;
}
else
{
item_info.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE | (hSubMenu!=0 ? MIIM_SUBMENU : 0);
item_info.fType = MFT_STRING;
item_info.fState = fState;
item_info.dwTypeData = (LPTSTR)text.c_str();
item_info.hSubMenu = hSubMenu;
}
if ( 0 == InsertMenuItem(menu, position, TRUE, &item_info) )
SYSERRORLOG(TEXT("InsertMenuItem"));
return id;
}
STDMETHODIMP
DIFF_EXT::QueryContextMenu(HMENU menu, UINT position, UINT first_cmd, UINT /*last_cmd not used*/, UINT flags)
{
LOG();
m_id_Diff = UINT(-1);
m_id_DiffWith = UINT(-1);
m_id_DiffLater = UINT(-1);
m_id_MergeWith = UINT(-1);
m_id_Merge3 = UINT(-1);
m_id_Diff3 = UINT(-1);
m_id_DiffWith_Base = UINT(-1);
m_id_ClearList = UINT(-1);
m_id_About = UINT(-1);
HRESULT ret = MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, 0);
if(!(flags & CMF_DEFAULTONLY))
{
/* Menu structure:
KDiff3 -> (1 File selected): Save 'selection' for later comparison (push onto history stack)
Compare 'selection' with first file on history stack.
Compare 'selection' with -> choice from history stack
Merge 'selection' with first file on history stack.
Merge 'selection' with last two files on history stack.
(2 Files selected): Compare 's1' with 's2'
Merge 's1' with 's2'
(3 Files selected): Compare 's1', 's2' and 's3'
*/
HMENU subMenu = CreateMenu();
UINT id = first_cmd;
m_id_FirstCmd = first_cmd;
insertMenuItemHelper( menu, id++, position++, TEXT("") ); // begin separator
tstring menuString;
UINT pos2=0;
if(m_nrOfSelectedFiles == 1)
{
size_t nrOfRecentFiles = m_recentFiles.size();
tstring menuStringCompare = i18n("Compare with %1");
tstring menuStringMerge = i18n("Merge with %1");
tstring firstFileName;
if( nrOfRecentFiles>=1 )
{
tstring firstFileName = TEXT("'") + cut_to_length( m_recentFiles.front() ) + TEXT("'");
}
replaceArgs( menuStringCompare, firstFileName );
replaceArgs( menuStringMerge, firstFileName );
m_id_DiffWith = insertMenuItemHelper( subMenu, id++, pos2++, menuStringCompare, nrOfRecentFiles >=1 ? MFS_ENABLED : MFS_DISABLED );
m_id_MergeWith = insertMenuItemHelper( subMenu, id++, pos2++, menuStringMerge, nrOfRecentFiles >=1 ? MFS_ENABLED : MFS_DISABLED );
//if( nrOfRecentFiles>=2 )
//{
// tstring firstFileName = cut_to_length( m_recentFiles.front() );
// tstring secondFileName = cut_to_length( *(++m_recentFiles.begin()) );
//}
m_id_Merge3 = insertMenuItemHelper( subMenu, id++, pos2++, i18n("3-way merge with base"),
nrOfRecentFiles >=2 ? MFS_ENABLED : MFS_DISABLED );
menuString = i18n("Save '%1' for later");
replaceArgs( menuString, _file_name1 );
m_id_DiffLater = insertMenuItemHelper( subMenu, id++, pos2++, menuString );
HMENU file_list = CreateMenu();
std::list<tstring>::iterator i;
m_id_DiffWith_Base = id;
int n = 0;
for( i = m_recentFiles.begin(); i!=m_recentFiles.end(); ++i )
{
tstring s = cut_to_length( *i );
insertMenuItemHelper( file_list, id++, n, s );
++n;
}
insertMenuItemHelper( subMenu, id++, pos2++, i18n("Compare with ..."),
nrOfRecentFiles > 0 ? MFS_ENABLED : MFS_DISABLED, file_list );
m_id_ClearList = insertMenuItemHelper( subMenu, id++, pos2++, i18n("Clear list"), nrOfRecentFiles >=1 ? MFS_ENABLED : MFS_DISABLED );
}
else if(m_nrOfSelectedFiles == 2)
{
//= "Diff " + cut_to_length(_file_name1, 20)+" and "+cut_to_length(_file_name2, 20);
m_id_Diff = insertMenuItemHelper( subMenu, id++, pos2++, i18n("Compare") );
}
else if ( m_nrOfSelectedFiles == 3 )
{
m_id_Diff3 = insertMenuItemHelper( subMenu, id++, pos2++, i18n("3 way comparison") );
}
else
{
// More than 3 files selected?
}
m_id_About = insertMenuItemHelper( subMenu, id++, pos2++, i18n("About Diff-Ext ...") );
insertMenuItemHelper( menu, id++, position++, TEXT("KDiff3"), MFS_ENABLED, subMenu );
insertMenuItemHelper( menu, id++, position++, TEXT("") ); // final separator
ret = MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, id-first_cmd);
}
return ret;
}
STDMETHODIMP
DIFF_EXT::InvokeCommand(LPCMINVOKECOMMANDINFO ici)
{
HRESULT ret = NOERROR;
_hwnd = ici->hwnd;
if(HIWORD(ici->lpVerb) == 0)
{
UINT id = m_id_FirstCmd + LOWORD(ici->lpVerb);
if(id == m_id_Diff)
{
LOG();
diff( TEXT("\"") + _file_name1 + TEXT("\" \"") + _file_name2 + TEXT("\"") );
}
else if(id == m_id_Diff3)
{
LOG();
diff( TEXT("\"") + _file_name1 + TEXT("\" \"") + _file_name2 + TEXT("\" \"") + _file_name3 + TEXT("\"") );
}
else if(id == m_id_Merge3)
{
LOG();
std::list< tstring >::iterator iFrom = m_recentFiles.begin();
std::list< tstring >::iterator iBase = iFrom;
++iBase;
diff( TEXT("-m \"") + *iBase + TEXT("\" \"") + *iFrom + TEXT("\" \"") + _file_name1 + TEXT("\"") );
}
else if(id == m_id_DiffWith)
{
LOG();
diff_with(0, false);
}
else if(id == m_id_MergeWith)
{
LOG();
diff_with(0, true);
}
else if(id == m_id_ClearList)
{
LOG();
m_recentFiles.clear();
}
else if(id == m_id_DiffLater)
{
MESSAGELOG(TEXT("Diff Later: ")+_file_name1);
m_recentFiles.remove( _file_name1 );
m_recentFiles.push_front( _file_name1 );
}
else if(id >= m_id_DiffWith_Base && id < m_id_DiffWith_Base+m_recentFiles.size())
{
LOG();
diff_with(id-m_id_DiffWith_Base, false);
}
else if(id == m_id_About)
{
LOG();
MessageBox( _hwnd, (i18n("Diff-Ext Copyright (c) 2003-2006, Sergey Zorin. All rights reserved.\n")
+ i18n("This software is distributable under the BSD license.\n")
+ i18n("Some extensions for KDiff3 by Joachim Eibl.\n")
+ i18n("Homepage for Diff-Ext: http://diff-ext.sourceforge.net\n")
+ i18n("Homepage for KDiff3: http://kdiff3.sourceforge.net")).c_str()
, i18n("About Diff-Ext for KDiff3").c_str(), MB_OK );
}
else
{
ret = E_INVALIDARG;
TCHAR verb[80];
_sntprintf(verb, 79, TEXT("Command id: %d"), LOWORD(ici->lpVerb));
verb[79]=0;
ERRORLOG(verb);
}
}
return ret;
}
STDMETHODIMP
DIFF_EXT::GetCommandString(UINT idCmd, UINT uFlags, UINT*, LPSTR pszName, UINT cchMax)
{
// LOG(); // Gets called very often
HRESULT ret = NOERROR;
if(uFlags == GCS_HELPTEXT) {
tstring helpString;
if( idCmd == m_id_Diff )
{
helpString = i18n("Compare selected files");
}
else if( idCmd == m_id_DiffWith )
{
if(!m_recentFiles.empty())
{
helpString = i18n("Compare '%1' with '%2'");
replaceArgs( helpString, _file_name1, m_recentFiles.front() );
}
}
else if(idCmd == m_id_DiffLater)
{
helpString = i18n("Save '%1' for later operation");
replaceArgs( helpString, _file_name1 );
}
else if((idCmd >= m_id_DiffWith_Base) && (idCmd < m_id_DiffWith_Base+m_recentFiles.size()))
{
if( !m_recentFiles.empty() )
{
unsigned int num = idCmd - m_id_DiffWith_Base;
std::list<tstring>::iterator i = m_recentFiles.begin();
for(unsigned int j = 0; j < num && i != m_recentFiles.end(); j++)
i++;
if ( i!=m_recentFiles.end() )
{
helpString = i18n("Compare '%1' with '%2'");
replaceArgs( helpString, _file_name1, *i );
}
}
}
lstrcpyn( (LPTSTR)pszName, helpString.c_str(), cchMax );
}
return ret;
}
void
DIFF_EXT::diff( const tstring& arguments )
{
LOG();
STARTUPINFO si;
PROCESS_INFORMATION pi;
bool bError = true;
tstring command = SERVER::instance()->getRegistryKeyString( TEXT(""), TEXT("diffcommand") );
tstring commandLine = TEXT("\"") + command + TEXT("\" ") + arguments;
if ( ! command.empty() )
{
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
if (CreateProcess(command.c_str(), (LPTSTR)commandLine.c_str(), 0, 0, FALSE, 0, 0, 0, &si, &pi) == 0)
{
SYSERRORLOG(TEXT("CreateProcess") + command);
}
else
{
bError = false;
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
}
}
if (bError)
{
tstring message = i18n("Could not start KDiff3. Please rerun KDiff3 installation.");
message += TEXT("\n") + i18n("Command") + TEXT(": ") + command;
message += TEXT("\n") + i18n("CommandLine") + TEXT(": ") + commandLine;
MessageBox(_hwnd, message.c_str(), i18n("Diff-Ext For KDiff3").c_str(), MB_OK);
}
}
void
DIFF_EXT::diff_with(unsigned int num, bool bMerge)
{
LOG();
std::list<tstring>::iterator i = m_recentFiles.begin();
for(unsigned int j = 0; j < num && i!=m_recentFiles.end(); j++) {
i++;
}
if ( i!=m_recentFiles.end() )
_file_name2 = *i;
diff( (bMerge ? TEXT("-m \"") : TEXT("\"") ) + _file_name2 + TEXT("\" \"") + _file_name1 + TEXT("\"") );
}
tstring
DIFF_EXT::cut_to_length(const tstring& in, size_t max_len)
{
tstring ret;
if( in.length() > max_len)
{
ret = in.substr(0, (max_len-3)/2);
ret += TEXT("...");
ret += in.substr( in.length()-(max_len-3)/2 );
}
else
{
ret = in;
}
return ret;
}

@ -0,0 +1,67 @@
/*
* Copyright (c) 2003-2004, Sergey Zorin. All rights reserved.
*
* This software is distributable under the BSD license. See the terms
* of the BSD license in the LICENSE file provided with this software.
*
*/
#ifndef __diff_ext_h__
#define __diff_ext_h__
#include <windows.h>
#include <windowsx.h>
#include <shlobj.h>
#include "server.h"
// this is the actual OLE Shell context menu handler
class DIFF_EXT : public IContextMenu, IShellExtInit {
public:
DIFF_EXT();
virtual ~DIFF_EXT();
//IUnknown members
STDMETHODIMP QueryInterface(REFIID interface_id, void** result);
STDMETHODIMP_(ULONG) AddRef();
STDMETHODIMP_(ULONG) Release();
//IShell members
STDMETHODIMP QueryContextMenu(HMENU menu, UINT index, UINT cmd_first, UINT cmd_last, UINT flags);
STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO info);
STDMETHODIMP GetCommandString(UINT cmd, UINT flags, UINT* reserved, LPSTR name, UINT name_length);
//IShellExtInit methods
STDMETHODIMP Initialize(LPCITEMIDLIST folder, IDataObject* subj, HKEY key);
private:
void diff( const tstring& arguments );
void diff_with(unsigned int num, bool bMerge);
tstring cut_to_length(const tstring&, size_t length = 64);
void initialize_language();
private:
UINT m_nrOfSelectedFiles;
tstring _file_name1;
tstring _file_name2;
tstring _file_name3;
HINSTANCE _resource;
HWND _hwnd;
ULONG _ref_count;
std::list< tstring >& m_recentFiles;
UINT m_id_FirstCmd;
UINT m_id_Diff;
UINT m_id_DiffWith;
UINT m_id_DiffLater;
UINT m_id_MergeWith;
UINT m_id_Merge3;
UINT m_id_Diff3;
UINT m_id_DiffWith_Base;
UINT m_id_About;
UINT m_id_ClearList;
};
#endif // __diff_ext_h__

@ -0,0 +1,96 @@
# Diff-ext-for-KDiff3
# Copyright (C) 2006 Joachim Eibl
# This file is distributed under the same license as the diff-ext-for-KDiff3 package.
# PO-Template created by Joachim Eibl <Joachim dot Eibl at gmx dot de>, 2006.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-03 06:05+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: diff_ext.cpp:368 diff_ext.cpp:402
msgid "Compare with"
msgstr ""
#: diff_ext.cpp:369
msgid "Merge with"
msgstr ""
#: diff_ext.cpp:384
msgid "3-way merge with base"
msgstr ""
#: diff_ext.cpp:387
msgid "Save '%1' for later comparison or merge"
msgstr ""
#: diff_ext.cpp:408
msgid "Compare"
msgstr ""
#: diff_ext.cpp:412
msgid "3 way comparison"
msgstr ""
#: diff_ext.cpp:418
msgid "About Diff-Ext ..."
msgstr ""
#: diff_ext.cpp:482
msgid "Diff-Ext Copyright (c) 2003-2006, Sergey Zorin. All rights reserved.\n"
msgstr ""
#: diff_ext.cpp:483
msgid "This software is distributable under the BSD license.\n"
msgstr ""
#: diff_ext.cpp:484
msgid "Some extensions for KDiff3 by Joachim Eibl.\n"
msgstr ""
#: diff_ext.cpp:485
msgid "Homepage for Diff-Ext: http://diff-ext.sourceforge.net\n"
msgstr ""
#: diff_ext.cpp:486
msgid "Homepage for KDiff3: http://kdiff3.sourceforge.net"
msgstr ""
#: diff_ext.cpp:487
msgid "About Diff-Ext for KDiff3"
msgstr ""
#: diff_ext.cpp:512
msgid "Compare selected files"
msgstr ""
#: diff_ext.cpp:518 diff_ext.cpp:538
msgid "Compare '%1' with '%2'"
msgstr ""
#: diff_ext.cpp:524
msgid "Save '%1' for later operation"
msgstr ""
#: diff_ext.cpp:576
msgid "Could not start KDiff3. Please rerun KDiff3 installation."
msgstr ""
#: diff_ext.cpp:577
msgid "Command"
msgstr ""
#: diff_ext.cpp:578
msgid "CommandLine"
msgstr ""
#: diff_ext.cpp:579
msgid "Diff-Ext For KDiff3"
msgstr ""

@ -0,0 +1,102 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-09-04 15:35+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: diff_ext.cpp:363
msgid "Compare with %1"
msgstr "Vergleichen mit %1"
#: diff_ext.cpp:364
msgid "Merge with %1"
msgstr "Zusammenführen mit %1"
#: diff_ext.cpp:379
msgid "3-way merge with base"
msgstr "3-Wege Zusammenführung mit Basis"
#: diff_ext.cpp:382
msgid "Save '%1' for later"
msgstr "Speichere '%1' für später"
#: diff_ext.cpp:404
msgid "Compare with ..."
msgstr "Vergleichen mit ..."
#: diff_ext.cpp:403
msgid "Compare"
msgstr "Vergleichen"
#: diff_ext.cpp:403
msgid "Clear list"
msgstr "Liste löschen"
#: diff_ext.cpp:407
msgid "3 way comparison"
msgstr "Vergleiche 3 Dateien"
#: diff_ext.cpp:413
msgid "About Diff-Ext ..."
msgstr "Über Diff-Ext ..."
#: diff_ext.cpp:474
msgid "Diff-Ext Copyright (c) 2003-2006, Sergey Zorin. All rights reserved.\n"
msgstr "Diff-Ext Copyright (c) 2003-2006, Sergey Zorin. Alle Rechte vorbehalten.\n"
#: diff_ext.cpp:475
msgid "This software is distributable under the BSD license.\n"
msgstr "Weitergabe dieses Programms unter den Bedingungen der BSD Lizenz.\n"
#: diff_ext.cpp:476
msgid "Some extensions for KDiff3 by Joachim Eibl.\n"
msgstr "Einige Erweiterungen für KDiff3 von Joachim Eibl.\n"
#: diff_ext.cpp:477
msgid "See the homepage http://diff-ext.sourceforge.net"
msgstr "Siehe die Homepage http://diff-ext.sourceforge.net"
#: diff_ext.cpp:478
msgid "About Diff-Ext for KDiff3"
msgstr "Über Diff-Ext für KDiff3"
#: diff_ext.cpp:503
msgid "Compare selected files"
msgstr "Vergleiche markierte Dateien"
#: diff_ext.cpp:509 diff_ext.cpp:529
msgid "Compare '%1' with '%2'"
msgstr "Vergleiche '%1' mit '%2'"
#: diff_ext.cpp:515
msgid "Merke '%1' für spätere Aktion"
msgstr ""
#: diff_ext.cpp:567
msgid "Could not start KDiff3. Please rerun KDiff3 installation."
msgstr "Konnte KDiff3 nicht starten. Bitte wiederholen Sie die KDiff3 Installation."
#: diff_ext.cpp:568
msgid "Command"
msgstr "Kommando"
#: diff_ext.cpp:569
msgid "CommandLine"
msgstr "Kommandozeile"
#: diff_ext.cpp:570
msgid "Diff-Ext For KDiff3"
msgstr "Diff-Ext für KDiff3"

@ -0,0 +1,6 @@
LIBRARY "diff_ext_for_kdiff3"
EXPORTS
DllCanUnloadNow=DllCanUnloadNow@0
DllGetClassObject=DllGetClassObject@12
DllRegisterServer=DllRegisterServer@0
DllUnregisterServer=DllUnregisterServer@0

@ -0,0 +1,47 @@
/*
* Copyright (c) 2003-2006, Sergey Zorin. All rights reserved.
*
* This software is distributable under the BSD license. See the terms
* of the BSD license in the LICENSE file provided with this software.
*
*/
#include <windows.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,6,1,145
PRODUCTVERSION 1,6,1,145
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0L
#endif
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT_UNKNOWN
{
BLOCK "StringFileInfo"
{
BLOCK "040904b0"
{
VALUE "Comments", ""
VALUE "CompanyName", ""
VALUE "FileDescription", "diff shell extension"
VALUE "FileVersion", "Release 1.6.1"
VALUE "InternalName", "diff shell extension"
VALUE "LegalCopyright", "Copyright © 2003-2005 Sergey Zorin"
VALUE "LegalTrademarks", ""
VALUE "OriginalFilename", "diff_ext.dll"
VALUE "PrivateBuild", ""
VALUE "ProductName", "Diff Context Menu Extension"
VALUE "ProductVersion", "Release 1.6.1"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x409, 1200
}
}

@ -0,0 +1,230 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="diff_ext_for_kdiff3"
ProjectGUID="{9734C087-C745-4DCE-9076-73BD15145F83}"
RootNamespace="diff_ext_for_kdiff3"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DIFF_EXT_FOR_KDIFF3_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
RegisterOutput="false"
LinkIncremental="2"
ModuleDefinitionFile="diff_ext_for_kdiff3_msvc.def"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DIFF_EXT_FOR_KDIFF3_EXPORTS"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
RegisterOutput="false"
LinkIncremental="1"
ModuleDefinitionFile="diff_ext_for_kdiff3_msvc.def"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="class_factory.cpp"
>
</File>
<File
RelativePath="diff_ext.cpp"
>
</File>
<File
RelativePath=".\diff_ext_for_kdiff3_msvc.def"
>
</File>
<File
RelativePath="server.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="class_factory.h"
>
</File>
<File
RelativePath="diff_ext.h"
>
</File>
<File
RelativePath=".\diffextstring.h"
>
</File>
<File
RelativePath="server.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

@ -0,0 +1,6 @@
LIBRARY "diff_ext_for_kdiff3"
EXPORTS
DllCanUnloadNow PRIVATE
DllGetClassObject PRIVATE
DllRegisterServer PRIVATE
DllUnregisterServer PRIVATE

@ -0,0 +1,157 @@
/*
* Copyright (c) 2003, Sergey Zorin. All rights reserved.
*
* This software is distributable under the BSD license. See the terms of the
* BSD license in the LICENSE file provided with this software.
*
*/
#ifndef __string_h__
#define __string_h__
#include <windows.h>
#include <tchar.h>
#include <string.h>
#include <stdlib.h>
class STRING;
inline STRING operator+( const STRING& s1, const STRING& s2);
class STRING {
public:
static const int begin = 0;
static const int end = -1;
public:
STRING(const STRING& s) {
_str = new TCHAR[s.length()+1];
lstrcpy(_str, s);
}
STRING(const TCHAR* str = TEXT("")) {
_str = new TCHAR[lstrlen(str)+1];
lstrcpy(_str, str);
}
~STRING() {
delete[] _str;
}
void resize( size_t newLength )
{
size_t oldLength = length();
if ( newLength < oldLength ) {
_str[newLength] = 0; // Just truncate the string
} else if( newLength>oldLength) {
TCHAR* p = new TCHAR[ newLength + 1 ];
lstrcpy(p, _str);
for( size_t i=oldLength; i<newLength; ++i)
p[i]=TEXT(' ');
p[newLength]=0;
}
}
STRING& operator=(const STRING& s) {
delete[] _str;
_str = new TCHAR[s.length()+1];
lstrcpy(_str, s);
return *this;
}
operator TCHAR*() {
return _str;
}
operator const TCHAR*() const {
return _str;
}
const TCHAR* c_str() const {
return _str;
}
size_t length() const {
return _tcslen(_str);
}
// Also returns the length. Behaviour like std::basic_string::size.
// See also sizeInBytes() below.
size_t size() const {
return length();
}
// String length in bytes. May differ from length() for Unicode or MBCS
size_t sizeInBytes() const {
return length()*sizeof(TCHAR);
}
bool empty() const
{
return length()==0;
}
STRING substr(size_t from, size_t len=size_t(-1)) const {
STRING tmp;
size_t to = len==size_t(-1) ? length() : from + len;
if(from < to && (to <= length())) {
size_t new_len = to - from + 1;
TCHAR* new_str = new TCHAR[new_len+1];
lstrcpyn(new_str, &_str[from], int(new_len) );
new_str[new_len] = 0;
tmp = new_str;
delete[] new_str;
}
return tmp;
}
STRING& replace( size_t pos, size_t num, const STRING& s )
{
*this = substr( 0, pos ) + s + substr( pos+num );
return *this;
}
bool operator ==(const STRING& s) const {
return (lstrcmp(_str, s) == 0);
}
size_t find(const STRING& s) const
{
const TCHAR* p = _tcsstr( _str, s._str );
if (p)
return p - _str;
else
return size_t(-1);
}
STRING& operator +=(const STRING& s) {
TCHAR* str = new TCHAR[lstrlen(_str)+s.length()+1];
lstrcpy(str, _str);
lstrcat(str, s);
delete[] _str;
_str = str;
return *this;
}
private:
TCHAR* _str;
};
inline STRING operator+( const STRING& s1, const STRING& s2) {
STRING tmp(s1);
tmp+=s2;
return tmp;
}
#endif // __string_h__

@ -0,0 +1,452 @@
/*
* Copyright (c) 2003-2005, Sergey Zorin. All rights reserved.
*
* This software is distributable under the BSD license. See the terms
* of the BSD license in the LICENSE file provided with this software.
*
*/
#define _CRT_NON_CONFORMING_SWPRINTFS
#define _CRT_SECURE_NO_DEPRECATE
#include <stdio.h>
#include <windows.h>
#include <tchar.h>
#include <shlguid.h>
#include <olectl.h>
#include <objidl.h>
#include <objbase.h>
#include <initguid.h>
//#include <log/log.h>
//#include <log/log_message.h>
//#include <log/file_sink.h>
//#include <debug/trace.h>
#include "server.h"
#include "class_factory.h"
#define DllExport __declspec( dllexport )
// registry key util struct
struct REGSTRUCT {
LPTSTR subkey;
LPTSTR name;
LPTSTR value;
};
SERVER* SERVER::_instance = 0;
static HINSTANCE server_instance; // Handle to this DLL itself.
//DEFINE_GUID(CLSID_DIFF_EXT, 0xA0482097, 0xC69D, 0x4DEC, 0x8A, 0xB6, 0xD3, 0xA2, 0x59, 0xAC, 0xC1, 0x51);
// New class id for DIFF_EXT for KDiff3
DEFINE_GUID( CLSID_DIFF_EXT, 0x9f8528e4, 0xab20, 0x456e, 0x84, 0xe5, 0x3c, 0xe6, 0x9d, 0x87, 0x20, 0xf3 );
tstring SERVER::getRegistryKeyString( const tstring& subKey, const tstring& value )
{
tstring keyName = m_registryBaseName;
if (!subKey.empty())
keyName += TEXT("\\")+subKey;
HKEY key;
HKEY baseKey = HKEY_CURRENT_USER;
tstring result;
for(;;)
{
if( RegOpenKeyEx( baseKey, keyName.c_str(), 0, KEY_READ, &key ) == ERROR_SUCCESS )
{
DWORD neededSizeInBytes = 0;
if (RegQueryValueEx(key, value.c_str(), 0, 0, 0, &neededSizeInBytes) == ERROR_SUCCESS)
{
DWORD length = neededSizeInBytes / sizeof( TCHAR );
result.resize( length );
if ( RegQueryValueEx( key, value.c_str(), 0, 0, (LPBYTE)&result[0], &neededSizeInBytes ) == ERROR_SUCCESS)
{
//Everything is ok, but we want to cut off the terminating 0-character
result.resize( length - 1 );
RegCloseKey(key);
return result;
}
else
{
result.resize(0);
}
}
RegCloseKey(key);
}
if (baseKey==HKEY_LOCAL_MACHINE)
break;
baseKey = HKEY_LOCAL_MACHINE;
}
// Error
{
LPTSTR message;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, 0,
GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &message, 0, 0);
ERRORLOG( (tstring(TEXT("RegOpenKeyEx: ")+keyName+TEXT("->")+value) + TEXT(": ")) + message ); \
LocalFree(message);
}
return result;
}
STDAPI
DllCanUnloadNow(void) {
HRESULT ret = S_FALSE;
if(SERVER::instance()->reference_count() == 0) {
ret = S_OK;
}
return ret;
}
extern "C" int APIENTRY
DllMain(HINSTANCE instance, DWORD reason, LPVOID /* reserved */) {
// char str[1024];
// char* reason_string[] = {"DLL_PROCESS_DETACH", "DLL_PROCESS_ATTACH", "DLL_THREAD_ATTACH", "DLL_THREAD_DETACH"};
// sprintf(str, "instance: %x; reason: '%s'", instance, reason_string[reason]);
// MessageBox(0, str, TEXT("Info"), MB_OK);
switch (reason) {
case DLL_PROCESS_ATTACH:
server_instance = instance;
SERVER::instance()->save_history();
MESSAGELOG(TEXT("DLL_PROCESS_ATTACH"));
break;
case DLL_PROCESS_DETACH:
MESSAGELOG(TEXT("DLL_PROCESS_DETACH"));
SERVER::instance()->save_history();
break;
}
return 1;
}
STDAPI
DllGetClassObject(REFCLSID rclsid, REFIID riid, void** class_object) {
HRESULT ret = CLASS_E_CLASSNOTAVAILABLE;
*class_object = 0;
if (IsEqualIID(rclsid, CLSID_DIFF_EXT)) {
CLASS_FACTORY* pcf = new CLASS_FACTORY();
ret = pcf->QueryInterface(riid, class_object);
}
return ret;
}
/*extern "C" HRESULT STDAPICALLTYPE*/ STDAPI
DllRegisterServer() {
return SERVER::instance()->do_register();
}
STDAPI
DllUnregisterServer() {
return SERVER::instance()->do_unregister();
}
SERVER* SERVER::instance()
{
if(_instance == 0)
{
_instance = new SERVER();
_instance->initLogging();
MESSAGELOG(TEXT("New Server instance"));
}
return _instance;
}
SERVER::SERVER() : _reference_count(0)
{
m_registryBaseName = TEXT("Software\\KDiff3\\diff-ext");
m_pRecentFiles = 0;
m_pLogFile = 0;
}
void SERVER::initLogging()
{
tstring logFileName = getRegistryKeyString( TEXT(""), TEXT("LogFile") );
if ( !logFileName.empty() )
{
m_pLogFile = _tfopen( logFileName.c_str(), TEXT("a+, ccs=UTF-8") );
if (m_pLogFile)
{
_ftprintf( m_pLogFile, TEXT("\nSERVER::SERVER()\n") );
}
}
}
SERVER::~SERVER()
{
if ( m_pLogFile )
{
_ftprintf( m_pLogFile, TEXT("SERVER::~SERVER()\n\n") );
fclose( m_pLogFile );
}
delete m_pRecentFiles;
}
HINSTANCE
SERVER::handle() const
{
return server_instance;
}
void
SERVER::lock() {
InterlockedIncrement(&_reference_count);
}
void
SERVER::release() {
InterlockedDecrement(&_reference_count);
//if(InterlockedDecrement((LPLONG)&_reference_count) == 0)
// delete this;
}
void SERVER::logMessage( const char* function, const char* file, int line, const tstring& msg )
{
SERVER* pServer = SERVER::instance();
if ( pServer && pServer->m_pLogFile )
{
SYSTEMTIME st;
GetSystemTime( &st );
_ftprintf( pServer->m_pLogFile, TEXT("%04d/%02d/%02d %02d:%02d:%02d ")
#ifdef UNICODE
TEXT("%S (%S:%d) %s\n"), // integrate char-string into wchar_t string
#else
TEXT("%s (%s:%d) %s\n"),
#endif
st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond, function, file, line, msg.c_str() );
fflush(pServer->m_pLogFile);
}
}
std::list<tstring>&
SERVER::recent_files()
{
LOG();
if ( m_pRecentFiles==0 )
{
MESSAGELOG(TEXT("Reading history from registry..."));
m_pRecentFiles = new std::list<tstring>;
for( int i=0; i<32; ++i ) // Max history size
{
TCHAR numAsString[10];
_sntprintf( numAsString, 10, TEXT("%d"), i );
tstring historyItem = getRegistryKeyString( TEXT("history"), numAsString );
if ( ! historyItem.empty() )
m_pRecentFiles->push_back( historyItem );
}
}
return *m_pRecentFiles;
}
void
SERVER::save_history() const
{
if( m_pRecentFiles && !m_pRecentFiles->empty() )
{
HKEY key;
if( RegCreateKeyEx(HKEY_CURRENT_USER, (m_registryBaseName + TEXT("\\history")).c_str(), 0, 0,
REG_OPTION_NON_VOLATILE, KEY_WRITE, 0, &key, 0) == ERROR_SUCCESS )
{
LOG();
//DWORD len = MAX_PATH;
int n = 0;
std::list<tstring>::const_iterator i;
for(i = m_pRecentFiles->begin(); i!=m_pRecentFiles->end(); ++i, ++n )
{
tstring str = *i;
TCHAR numAsString[10];
_sntprintf( numAsString, 10, TEXT("%d"), n );
if(RegSetValueEx(key, numAsString, 0, REG_SZ, (const BYTE*)str.c_str(), (DWORD)(str.size()+1)*sizeof(TCHAR) ) != ERROR_SUCCESS)
{
LPTSTR message;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, 0,
GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &message, 0, 0);
MessageBox(0, message, TEXT("Save history failed"), MB_OK | MB_ICONINFORMATION);
LocalFree(message);
}
}
RegCloseKey(key);
}
else
{
SYSERRORLOG(TEXT("RegOpenKeyEx"));
}
}
}
HRESULT
SERVER::do_register() {
LOG();
TCHAR class_id[MAX_PATH];
LPWSTR tmp_guid;
HRESULT ret = SELFREG_E_CLASS;
if (StringFromIID(CLSID_DIFF_EXT, &tmp_guid) == S_OK) {
#ifdef UNICODE
_tcsncpy(class_id, tmp_guid, MAX_PATH);
#else
wcstombs(class_id, tmp_guid, MAX_PATH);
#endif
CoTaskMemFree((void*)tmp_guid);
TCHAR subkey[MAX_PATH];
TCHAR server_path[MAX_PATH];
HKEY key;
LRESULT result = NOERROR;
DWORD dwDisp;
GetModuleFileName(SERVER::instance()->handle(), server_path, MAX_PATH);
REGSTRUCT entry[] = {
{TEXT("Software\\Classes\\CLSID\\%s"), 0, TEXT("diff-ext-for-kdiff3")},
{TEXT("Software\\Classes\\CLSID\\%s\\InProcServer32"), 0, TEXT("%s")},
{TEXT("Software\\Classes\\CLSID\\%s\\InProcServer32"), TEXT("ThreadingModel"), TEXT("Apartment")}
};
for(unsigned int i = 0; (i < sizeof(entry)/sizeof(entry[0])) && (result == NOERROR); i++) {
_sntprintf(subkey, MAX_PATH, entry[i].subkey, class_id);
result = RegCreateKeyEx(HKEY_CURRENT_USER, subkey, 0, 0, REG_OPTION_NON_VOLATILE, KEY_WRITE, 0, &key, &dwDisp);
if(result == NOERROR) {
TCHAR szData[MAX_PATH];
_sntprintf(szData, MAX_PATH, entry[i].value, server_path);
szData[MAX_PATH-1]=0;
result = RegSetValueEx(key, entry[i].name, 0, REG_SZ, (LPBYTE)szData, DWORD(_tcslen(szData)*sizeof(TCHAR)));
}
RegCloseKey(key);
}
if(result == NOERROR) {
result = RegCreateKeyEx(HKEY_CURRENT_USER, TEXT("Software\\Classes\\*\\shellex\\ContextMenuHandlers\\diff-ext-for-kdiff3"), 0, 0, REG_OPTION_NON_VOLATILE, KEY_WRITE, 0, &key, &dwDisp);
if(result == NOERROR) {
result = RegSetValueEx(key, 0, 0, REG_SZ, (LPBYTE)class_id, DWORD(_tcslen(class_id)*sizeof(TCHAR)));
RegCloseKey(key);
//If running on NT, register the extension as approved.
OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof(osvi);
GetVersionEx(&osvi);
// NT needs to have shell extensions "approved".
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT) {
result = RegCreateKeyEx(HKEY_CURRENT_USER,
TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved"),
0, 0, REG_OPTION_NON_VOLATILE, KEY_WRITE, 0, &key, &dwDisp);
if(result == NOERROR) {
TCHAR szData[MAX_PATH];
lstrcpy(szData, TEXT("diff-ext"));
result = RegSetValueEx(key, class_id, 0, REG_SZ, (LPBYTE)szData, DWORD(_tcslen(szData)*sizeof(TCHAR)));
RegCloseKey(key);
ret = S_OK;
} else if (result == ERROR_ACCESS_DENIED) {
TCHAR msg[] = TEXT("Warning! You have unsufficient rights to write to a specific registry key.\n")
TEXT("The application may work anyway, but it is advised to register this module ")
TEXT("again while having administrator rights.");
MessageBox(0, msg, TEXT("Warning"), MB_ICONEXCLAMATION);
ret = S_OK;
}
}
else {
ret = S_OK;
}
}
}
}
return ret;
}
HRESULT
SERVER::do_unregister() {
LOG();
TCHAR class_id[MAX_PATH];
LPWSTR tmp_guid;
HRESULT ret = SELFREG_E_CLASS;
if (StringFromIID(CLSID_DIFF_EXT, &tmp_guid) == S_OK) {
#ifdef UNICODE
_tcsncpy(class_id, tmp_guid, MAX_PATH);
#else
wcstombs(class_id, tmp_guid, MAX_PATH);
#endif
CoTaskMemFree((void*)tmp_guid);
LRESULT result = NOERROR;
TCHAR subkey[MAX_PATH];
REGSTRUCT entry[] = {
{TEXT("Software\\Classes\\CLSID\\%s\\InProcServer32"), 0, 0},
{TEXT("Software\\Classes\\CLSID\\%s"), 0, 0}
};
for(unsigned int i = 0; (i < sizeof(entry)/sizeof(entry[0])) && (result == NOERROR); i++) {
_stprintf(subkey, entry[i].subkey, class_id);
result = RegDeleteKey(HKEY_CURRENT_USER, subkey);
}
if(result == NOERROR) {
result = RegDeleteKey(HKEY_CURRENT_USER, TEXT("Software\\Classes\\*\\shellex\\ContextMenuHandlers\\diff-ext-for-kdiff3"));
if(result == NOERROR) {
//If running on NT, register the extension as approved.
OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof(osvi);
GetVersionEx(&osvi);
// NT needs to have shell extensions "approved".
if(osvi.dwPlatformId == VER_PLATFORM_WIN32_NT) {
HKEY key;
RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved"), 0, KEY_ALL_ACCESS, &key);
result = RegDeleteValue(key, class_id);
RegCloseKey(key);
if(result == ERROR_SUCCESS) {
ret = S_OK;
}
}
else {
ret = S_OK;
}
}
}
}
return ret;
}

@ -0,0 +1,81 @@
/*
* Copyright (c) 2003-2005, Sergey Zorin. All rights reserved.
*
* This software is distributable under the BSD license. See the terms
* of the BSD license in the LICENSE file provided with this software.
*
*/
#ifndef __server_h__
#define __server_h__
#include <list> // std::list
//#include <log/file_sink.h>
#include <windows.h>
#if 1
#include <string> // std::wstring
#ifdef UNICODE
typedef std::wstring tstring;
#else
typedef std::string tstring;
#endif
#define i18n(x) getTranslation( TEXT(x) )
#else
#include "diffextstring.h"
typedef STRING tstring;
#define i18n(x) TEXT(x)
#endif
#define MESSAGELOG( msg ) SERVER::logMessage( __FUNCTION__, __FILE__, __LINE__, msg )
#define LOG() MESSAGELOG( TEXT("") )
#define ERRORLOG( msg ) MESSAGELOG( TEXT("Error: ")+tstring(msg) )
#define SYSERRORLOG( msg ) \
{ \
LPTSTR message; \
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, 0, \
GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &message, 0, 0); \
ERRORLOG( (tstring(msg) + TEXT(": ")) + message ); \
LocalFree(message); \
}
class SERVER {
public:
static SERVER* instance();
void initLogging();
public:
virtual ~SERVER();
tstring getRegistryKeyString( const tstring& subKey, const tstring& value );
HINSTANCE handle() const;
HRESULT do_register();
HRESULT do_unregister();
void lock();
void release();
ULONG reference_count() const {
return _reference_count;
}
std::list< tstring >& recent_files();
void save_history() const;
static void logMessage( const char* function, const char* file, int line, const tstring& msg );
private:
SERVER();
SERVER(const SERVER&) {}
private:
LONG _reference_count;
std::list<tstring>* m_pRecentFiles;
static SERVER* _instance;
tstring m_registryBaseName;
FILE* m_pLogFile;
};
#endif // __server_h__

@ -0,0 +1,6 @@
# the SUBDIRS is filled automatically by am_edit. If files are
# in this directory they are installed into the english dir
KDE_LANG = en da de es et fr it nl pt sv
KDE_DOCS = kdiff3
SUBDIRS = $(AUTODIRS)

@ -0,0 +1,80 @@
README for the Documentation
============================
Author: Joachim Eibl, 2004-02-22
The following text contains some info about how the docs are created.
It helps me remember certain details. Most users probably aren't
interested in these things.
Docbook references:
http://i18n.kde.org/doc/markup/index.html
http://opensource.bureau-cornavin.com/crash-course/index.html
Each directory contains the documentation for a different translation.
The textual information is in the index.docbook of every subdirectory.
I wrote the English version in en/index.docbook. The other translations
were done by the KDE-Internationalization-Team. They are doing a great
job!
The command meinproc (which is part of KDE) can be used to convert this
file into HTML.
meinproc index.docbook
If you prefer everything in one big HTML/Postscript/PDF-file:
LANG=de_DE meinproc --check index.docbook --stylesheet /opt/kde3/share/apps/ksgmltools2/customization/kde-nochunk.xsl
(The LANG=de_DE prevents that meinproc writes the file in UTF-8 encoding, which isn't understood by html2ps.)
Create ps-file:
html2ps -D -u -n index.html >index.ps
(For the -D to work add the line "Ghostscript: 1;" in the "package"-section of file /usr/lib/html2ps/html2psrc.)
Create pdf-file:
ps2pdf index.ps index.pdf
The script createpdfdoc does these steps for all subdirectories.
During normal installation on KDE a compressed file is generated:
meinproc --check --cache index.cache.bz2 index.docbook
As a service for non-KDE-users the en-directory also contains the
HTML-version of the English documentation.
After running meinproc the HTML-files contain some references to files
in help:/common/ which contains stylesheets and KDE-graphics which make
the result look much prettier. Because on non-KDE-systems this is not
available, I placed a copy of these files in doc/en/common.
To correct the references, I run the following command, which removes
the "help:/"-part of the references, and only the "common/"-part remains.
for i in *.html; do sed -i "s/help:\///g" $i; done
(sed-option "-i" means in-place, "s/orig/repl/" is the replacement-command,
"g" replaces every occurance in the line, not only the first.)
The screenshots were made with the English KDE-version and therefore are
placed in the en-directory. But since for the other translations no new
screenshots were made yet, they only contain links to the English
screenshots. These links are created en-bloc with this command. (But
first you must cd into each subdirectory.)
for i in `ls ../en | grep png`; do ln -s ../en/$i $i; done
Command to retrieve other translations from cvs:
cvs co kde-i18n/subdirs
#for i in `cat kde-i18n/subdirs`; do cvs co kde-i18n/$i/docs/kdeextragear-1/kdiff3/index.docbook; done
for i in `cat subdirs`; do wget http://websvn.kde.org/*checkout*/trunk/l10n/$i/docs/extragear-utils/kdiff3/index.docbook -O $i.docbook; done
If a new translation is available,
- create a new directory,
- copy the index.docbook file there,
- copy a Makefile.am there and correct it,
- edit the doc/Makefile.am to include the new subdir,
- create the links for the graphics,
- and don't forget to run make -f Makefile.cvs in the top directory.

@ -0,0 +1,8 @@
for i in `find * -maxdepth 0 -type d`; do
cd $i
echo $i
LANG=de_DE meinproc --check index.docbook --stylesheet /opt/kde3/share/apps/ksgmltools2/customization/kde-nochunk.xsl
html2ps -D -u -n index.html >index.ps
ps2pdf index.ps ../kdiff3_$i.pdf
cd ..
done

@ -0,0 +1,4 @@
KDE_DOCS = kdiff3
KDE_LANG = da

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,4 @@
KDE_DOCS = kdiff3
KDE_LANG = de

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,5 @@
KDE_DOCS = kdiff3
KDE_LANG = en
man1_MANS=kdiff3.1

@ -0,0 +1,36 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>$title ($projectname)</title>
<link href="../../common/doxygen.css" rel="stylesheet" type="text/css">
</head>
<div class="header">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td rowspan="2" width="92">
<a href="../../index.html" title="The API documentation main page"><img src="../../common/docheadergears.png" style="border:0px;" alt=""></a>
</td>
<td width="95%">
<h1>$projectname API Documentation</h1>
</td>
</tr>
<tr>
<td valign="bottom">
<table class="links" border=0 cellspacing=0>
<tr>
<td><a href="index.html">Overview</a></td>
<td><a href="architecture.html" title="Software architecture and components">Architecture</a></td>
<td><a href="hierarchy.html" title="Inheritance list, sorted roughly alphabetically">Class&nbsp;Hierarchy</a></td>
<td><a href="classes.html" title="Alphabetical list of classes">Classes</a></td>
<td><a href="annotated.html" title="Classes, structs, unions and interfaces with brief descriptions">Classes&nbsp;(annotated)</a></td>
<td><a href="functions.html" title="Documented class members with links to the classes they belong to">Members</a></td>
<td><a href="namespaces.html" title="All documented namespaces with brief descriptions">Namespaces</a></td>
<td><a href="files.html" title="A list of all documented files with brief descriptions">Source&nbsp;Files</a></td>
<td><form action="search.php" method="get"><a title="Search for keywords in the entire documentation">Search&nbsp;for&nbsp;<input type="text" name="query" value="" size="20" accesskey="s"/></a></form></td>
</tr>
</table>
</td></tr></table>
</div>
<div id="hgrad"></div>
<div class="text">

@ -0,0 +1,165 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html40/strict.dtd">
<HTML LANG="en-US">
<HEAD>
<TITLE>The "Artistic License"</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META HTTP-EQUIV="Content-Language" CONTENT="en-US">
<META NAME="description" CONTENT="Artistic License">
<META NAME="keywords" CONTENT="Artistic, artistic, Artistic License, Artistic license, Artisticlicense, artistic license, artisticlicense, Artistic Licence, Artistic licence, Artisticlicence, artistic licence, artisticlicence, license, licence, software, softwarelicense">
<META NAME="robots" CONTENT="none">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="stylesheet" HREF="kde-default.css" TYPE="text/css">
</HEAD>
<BODY CLASS="license">
<H1>The "Artistic License"</H1>
<H2>Preamble</H2>
<P>The intent of this document is to state the conditions under
which a Package may be copied, such that the Copyright Holder
maintains some semblance of artistic control over the
development of the package, while giving the users of the
package the right to use and distribute the Package in a
more-or-less customary fashion, plus the right to make
reasonable modifications.</P>
<H2>Definitions</H2>
<P>"Package" refers to the collection of files distributed by the
Copyright Holder, and derivatives of that collection of files
created through textual modification.</P>
<P>"Standard Version" refers to such a Package if it has not been
modified, or has been modified in accordance with the wishes of
the Copyright Holder as specified below.</P>
<P>"Copyright Holder" is whoever is named in the copyright or
copyrights for the package.</P>
<P>"You" is you, if you're thinking about copying or distributing
this Package.</P>
<P>"Reasonable copying fee" is whatever you can justify on the
basis of media cost, duplication charges, time of people
involved, and so on. (You will not be required to justify it to
the Copyright Holder, but only to the computing community at
large as a market that must bear the fee.)</P>
<P>"Freely Available" means that no fee is charged for the item
itself, though there may be fees involved in handling the
item. It also means that recipients of the item may redistribute
it under the same conditions they received it.</P>
<OL STYLE="list-style-type: decimal;">
<LI><DIV CLASS="li">You may make and give away verbatim copies of the source
form of the Standard Version of this Package without
restriction, provided that you duplicate all of the original
copyright notices and associated disclaimers.</DIV></LI>
<LI>You may apply bug fixes, portability fixes and other
modifications derived from the Public Domain or from the
Copyright Holder. A Package modified in such a way shall still
be considered the Standard Version.</LI>
<LI>You may otherwise modify your copy of this Package in any
way, provided that you insert a prominent notice in each
changed file stating how and when you changed that file, and
provided that you do at least ONE of the following:
<OL STYLE="list-style-type: lower-alpha;">
<LI>place your modifications in the Public Domain or
otherwise make them Freely Available, such as by posting
said modifications to Usenet or an equivalent medium, or
placing the modifications on a major archive site such as
uunet.uu.net, or by allowing the Copyright Holder to
include your modifications in the Standard Version of the
Package.</LI>
<LI>use the modified Package only within your corporation or
organization.</LI>
<LI>rename any non-standard executables so the names do not
conflict with standard executables, which must also be
provided, and provide a separate manual page for each
non-standard executable that clearly documents how it
differs from the Standard Version. d. make other
distribution arrangements with the Copyright Holder.</LI>
</OL>
</LI>
</OL>
<P>You may distribute the programs of this Package in object code
or executable form, provided that you do at least ONE of the
following:</P>
<OL STYLE="list-style-type: lower-alpha;">
<LI>distribute a Standard Version of the executables and library
files, together with instructions (in the manual page or
equivalent) on where to get the Standard Version.</LI>
<LI>accompany the distribution with the machine-readable source
of the Package with your modifications.</LI>
<LI>give non-standard executables non-standard names, and
clearly document the differences in manual pages (or
equivalent), together with instructions on where to get the
Standard Version.</LI>
<LI>make other distribution arrangements with the Copyright
Holder.</LI>
</OL>
<P>You may charge a reasonable copying fee for any distribution of
this Package. You may charge any fee you choose for support of
this Package. You may not charge a fee for this Package
itself. However, you may distribute this Package in aggregate
with other (possibly commercial) programs as part of a larger
(possibly commercial) software distribution provided that you do
not advertise this Package as a product of your own. You may
embed this Package's interpreter within an executable of yours
(by linking); this shall be construed as a mere form of
aggregation, provided that the complete Standard Version of the
interpreter is so embedded.</P>
<P>The scripts and library files supplied as input to or produced
as output from the programs of this Package do not automatically
fall under the copyright of this Package, but belong to whomever
generated them, and may be sold commercially, and may be
aggregated with this Package. If such scripts or library files
are aggregated with this Package via the so-called "undump" or
"unexec" methods of producing a binary executable image, then
distribution of such an image shall neither be construed as a
distribution of this Package nor shall it fall under the
restrictions of Paragraphs 3 and 4, provided that you do not
represent such an executable image as a Standard Version of this
Package.</P>
<P>C subroutines (or comparably compiled subroutines in other
languages) supplied by you and linked into this Package in order
to emulate subroutines and variables of the language defined by
this Package shall not be considered part of this Package, but
are the equivalent of input as in Paragraph 6, provided these
subroutines do not change the language in any way that would
cause it to fail the regression tests for the language.</P>
<P>Aggregation of this Package with a commercial distribution is
always permitted provided that the use of this Package is
embedded; that is, when no overt attempt is made to make this
Package's interfaces visible to the end user of the commercial
distribution. Such use shall not be construed as a distribution
of this Package.</P>
<P>The name of the Copyright Holder may not be used to endorse or
promote products derived from this software without specific
prior written permission.</P>
<P>THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
PURPOSE.</P>
<DIV STYLE="text-align: center;">The End</DIV>
</BODY>
</HTML>

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,353 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html40/strict.dtd">
<HTML LANG="en-US">
<HEAD>
<TITLE>GNU Free Documentation License - version 1.1</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META HTTP-EQUIV="Content-Language" CONTENT="en-US">
<META NAME="description" CONTENT="GNU free documentation license (for inclusion in documentation files)">
<META NAME="keywords" CONTENT="gnu, Gnu, GNU, license, licence, software, free software, software license, software licence, GNU general public license, GNU General Public License, documentation licence, documentation license, documentation, GNU free documentation license, GNU Free Documentation License">
<META NAME="robots" CONTENT="none">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="stylesheet" HREF="kde-default.css" TYPE="text/css">
</HEAD>
<BODY CLASS="license">
<H1>GNU Free Documentation License</H1>
Version 1.1, March 2000
<P>Copyright (C) 2000 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA<BR>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.</P>
<H2>0. Preamble</H2>
<P>The purpose of this License is to make a manual, textbook, or other
written document "free" in the sense of freedom: to assure everyone
the effective freedom to copy and redistribute it, with or without
modifying it, either commercially or noncommercially. Secondarily,
this License preserves for the author and publisher a way to get
credit for their work, while not being considered responsible for
modifications made by others.</P>
<P>This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft
license designed for free software.</P>
<P>We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.</P>
<H2>1. Applicability And Definitions</H2>
<P>This License applies to any manual or other work that contains a
notice placed by the copyright holder saying it can be distributed
under the terms of this License. The "Document", below, refers to any
such manual or work. Any member of the public is a licensee, and is
addressed as "you".</P>
<P>A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.</P>
<P>A "Secondary Section" is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly
within that overall subject. (For example, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any
mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.</P>
<P>The "Invariant Sections" are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License.</P>
<P>The "Cover Texts" are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License.</P>
<P>A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, whose contents can be viewed and edited directly and
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
format whose markup has been designed to thwart or discourage
subsequent modification by readers is not Transparent. A copy that is
not "Transparent" is called "Opaque".</P>
<P>Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
HTML designed for human modification. Opaque formats include
PostScript, PDF, proprietary formats that can be read and edited only
by proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
machine-generated HTML produced by some word processors for output
purposes only.</P>
<P>The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
formats which do not have any title page as such, "Title Page" means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.</P>
<H2>2. Verbatim Copying</H2>
<P>You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.</P>
<P>You may also lend copies, under the same conditions stated above, and
you may publicly display copies.</P>
<H2>3. Copying In Quantity</H2>
<P>If you publish printed copies of the Document numbering more than 100,
and the Document's license notice requires Cover Texts, you must enclose
the copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
the full title with all words of the title equally prominent and
visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.</P>
<P>If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.</P>
<P>If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a publicly-accessible computer-network location containing a complete
Transparent copy of the Document, free of added material, which the
general network-using public has access to download anonymously at no
charge using public-standard network protocols. If you use the latter
option, you must take reasonably prudent steps, when you begin
distribution of Opaque copies in quantity, to ensure that this
Transparent copy will remain thus accessible at the stated location
until at least one year after the last time you distribute an Opaque
copy (directly or through your agents or retailers) of that edition to
the public.</P>
<P>It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.</P>
<H2>4. Modifications</H2>
<P>You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:</P>
<OL STYLE="list-style-type: upper-alpha;">
<LI>Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous
version if the original publisher of that version gives
permission.</LI>
<LI>List on the Title Page, as authors, one or more persons or
entities responsible for authorship of the modifications in the
Modified Version, together with at least five of the principal
authors of the Document (all of its principal authors, if it has
less than five).</LI>
<LI>State on the Title page the name of the publisher of the Modified
Version, as the publisher.</LI>
<LI>Preserve all the copyright notices of the Document.</LI>
<LI>Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.</LI>
<LI>Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum
below.</LI>
<LI>Preserve in that license notice the full lists of Invariant
Sections and required Cover Texts given in the Document's license
notice.</LI>
<LI>Include an unaltered copy of this License.</LI>
<LI>Preserve the section entitled "History", and its title, and add to
it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section entitled "History" in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.</LI>
<LI>Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on. These may be placed in the "History" section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.</LI>
<LI>In any section entitled "Acknowledgements" or "Dedications",
preserve the section's title, and preserve in the section all the
substance and tone of each of the contributor acknowledgements
and/or dedications given therein.</LI>
<LI>Preserve all the Invariant Sections of the Document, unaltered in
their text and in their titles. Section numbers or the equivalent
are not considered part of the section titles.</LI>
<LI>Delete any section entitled "Endorsements". Such a section may
not be included in the Modified Version.</LI>
<LI>Do not retitle any existing section as "Endorsements" or to
conflict in title with any Invariant Section.</LI>
</OL>
<P>If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.</P>
<P>You may add a section entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.</P>
<P>You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.</P>
<P>The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.</P>
<H2>5. Combining Documents</H2>
<P>You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice.</P>
<P>The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.</P>
<P>In the combination, you must combine any sections entitled "History"
in the various original documents, forming one section entitled
"History"; likewise combine any sections entitled "Acknowledgements",
and any sections entitled "Dedications". You must delete all sections
entitled "Endorsements."</P>
<H2>6. Collections Of Documents</H2>
<P>You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.</P>
<P>You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.</P>
<H2>7. Aggregation With Independent Works</H2>
<P>A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, does not as a whole count as a Modified Version
of the Document, provided no compilation copyright is claimed for the
compilation. Such a compilation is called an "aggregate", and this
License does not apply to the other self-contained works thus compiled
with the Document, on account of their being thus compiled, if they
are not themselves derivative works of the Document.</P>
<P>If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one quarter
of the entire aggregate, the Document's Cover Texts may be placed on
covers that surround only the Document within the aggregate.
Otherwise they must appear on covers around the whole aggregate.</P>
<H2>8. Translation</H2>
<P>Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License provided that you also include the
original English version of this License. In case of a disagreement
between the translation and the original English version of this
License, the original English version will prevail.</P>
<H2>9. Termination</H2>
<P>You may not copy, modify, sublicense, or distribute the Document except
as expressly provided for under this License. Any other attempt to
copy, modify, sublicense or distribute the Document is void, and will
automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.</P>
<H2>10. Future Revisions Of This License</H2>
<P>The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
<A HREF="http:///www.gnu.org/copyleft/">http:///www.gnu.org/copyleft/</A>.</P>
<P>Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License "or any later version" applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.</P>
</BODY>
</HTML>

@ -0,0 +1,15 @@
<html>
<head>
<title>FDL Notice</title>
</head>
<body>
<p>Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or any
later version published by the Free Software Foundation; with no Invariant
Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy
of the license is included <a href="fdl-license.html">here</a>.</p>
</body>
</html>

@ -0,0 +1,65 @@
</div></div>
</td>
</tr>
<tr>
<td valign="top" id="leftmenu" width="25%">
<a name="navigation"></a>
<div class="menu_box"><h2>$projectname</h2>
<div class="nav_list">
<!-- menu -->
<!-- cmenu.begin -->
<h2>Class Picker</h2>
<div style="text-align: center;">
<form name="guideform">
<select name="guidelinks" style="width:100%;" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value">
<option value="annotated.html">-- Choose --</option>
<!-- cmenu -->
</select>
</form>
</div>
<!-- cmenu.end -->
</div></div>
<div class="menu_box"><h2>API Dox</h2>
<div class="nav_list">
<ul>
<!-- gmenu -->
</ul></div></div>
</td>
</tr>
</table>
<span class="doNotDisplay">
<a href="http://www.kde.org/" accesskey="8">KDE Home</a> |
<a href="http://accessibility.kde.org/" accesskey="9">KDE Accessibility Home</a> |
<a href="http://www.kde.org/media/accesskeys.php" accesskey="0">Description of Access Keys</a>
</span>
<div style="height: 8px"></div>
<div id="footer">
<div id="footer_left">
Maintained by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;groo&#116;&#64;kde&#46;or&#x67;">Adriaan de Groot</a>
and
<a href="&#109;a&#105;&#108;&#116;&#111;&#58;w&#105;nter&#116;&#64;kde&#46;or&#x67">Allen Winter</a>.
<br/>
KDE and K Desktop Environment are trademarks of <a href="http://www.kde.org/areas/kde-ev/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
<a href="http://www.kde.org/contact/impressum.php">Legal</a>
</div>
<div id="footer_right"><img src="/media/images/footer_right.png" style="margin: 0px" alt="" /></div>
</div>
<!--
WARNING: DO NOT SEND MAIL TO THE FOLLOWING EMAIL ADDRESS! YOU WILL
BE BLOCKED INSTANTLY AND PERMANENTLY!
<a href="mailto:aaaatrap-425acc3b5374943f@kde.org">Block me</a>
WARNING END
-->
</body>
</html>

@ -0,0 +1,381 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html40/strict.dtd">
<HTML LANG="en-US">
<HEAD>
<TITLE>GNU General Public License</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META HTTP-EQUIV="Content-Language" CONTENT="en-US">
<META NAME="description" CONTENT="GNU general public license (for inclusion in distributions)">
<META NAME="keywords" CONTENT="gnu, Gnu, GNU, license, licence, software, free software, software license, software licence, GNU general public license, GNU General Public License">
<META NAME="robots" CONTENT="none">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="stylesheet" HREF="kde-default.css" TYPE="text/css">
</HEAD>
<BODY CLASS="license">
<H1>GNU General Public License</H1>
<P>Version 2, June 1991</P>
<P>Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA<BR>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.</P>
<H2>Preamble</H2>
<P>The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.</P>
<P>When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.</P>
<P>To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.</P>
<P>For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.</P>
<P>We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.</P>
<P>Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.</P>
<P>Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.</P>
<P>The precise terms and conditions for copying, distribution and
modification follow.</P>
<H2><A NAME="show-c">GNU General Public License<BR>
Terms And Conditions For Copying, Distribution And Modification</A></H2>
<P>0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".</P>
<P>Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.</P>
<P>1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.</P>
<P>You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.</P>
<P>2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:</P>
<OL STYLE="list-style-type: lower-alpha;">
<LI>
<P>You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.</P>
</LI>
<LI>
<P>You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.</P>
</LI>
<LI>
<P>If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)</P>
</LI>
</OL>
<P>These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.</P>
<P>Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.</P>
<P>In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.</P>
<P>3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:</P>
<OL STYLE="list-style-type: lower-alpha;">
<LI>
<P>Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,</P>
</LI>
<LI>
<P>Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,</P>
</LI>
<LI>
<P>Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)</P>
</LI>
</OL>
<P>The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.</P>
<P>If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.</P>
<P>4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.</P>
<P>5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.</P>
<P>6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.</P>
<P>7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.</P>
<P>If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.</P>
<P>It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.</P>
<P>This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.</P>
<P>8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.</P>
<P>9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.</P>
<P>Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.</P>
<P>10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.</P>
<H2><A NAME="show-w">No Warranty</A></H2>
<P>11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.</P>
<P>12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.</P>
<DIV STYLE="text-align: center;">END OF TERMS AND CONDITIONS</DIV>
<hr>
<h2>How to Apply These Terms to Your New Programs</h2>
<p>If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.</p>
<p>To do so, attach the following notices to the program. It is
safest to attach them to the start of each source file to most
effectively convey the exclusion of warranty; and each file should
have at least the "copyright" line and a pointer to where the full
notice is found.</p>
<pre> &lt;one line to give the program's name and a brief idea of what it does.&gt;
Copyright (C) 19yy &lt;name of author&gt;
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</pre>
<p>Also add information on how to contact you by electronic and paper
mail.</p>
<p>If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:</p>
<pre> Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.</pre>
<p>The hypothetical commands &quot;show w&quot; and &quot;show c&quot; should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than &quot;show w&quot; and &quot;show c&quot;; they could even be
mouse-clicks or menu items--whatever suits your program.</p>
<p>You should also get your employer (if you work as a programmer) or your
school, if any, to sign a &quot;copyright disclaimer&quot; for the program, if
necessary. Here is a sample; alter the names:</p>
<pre> Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
&lt;signature of Ty Coon&gt;, 1 April 1989
Ty Coon, President of Vice</pre>
<p>This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.</p>
</BODY>
</HTML>

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US">
<head>
<title>$title ($projectname)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org" r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org" r (n 0 s 0 v 0 l 0))' />
<meta name="trademark" content="KDE e.V." />
<meta name="description" content="K Desktop Environment Homepage, KDE.org" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<meta name="robots" content="all" />
<link rel="shortcut icon" href="@topdir@/favicon.ico" />
<link rel="stylesheet" media="screen" type="text/css" title="APIDOX" href="doxygen.css" />
</head>
<body>
<div id="nav_header_top" align="right">
<a href="#content" class="doNotDisplay" accesskey="2">Skip to main content ::</a>
<a href="@topdir@"><img id="nav_header_logo" alt="Home" align="left" src="@topdir@/kde_gear_64.png" border="0" /></a>
<span class="doNotDisplay">::</span>
<div id="nav_header_title" align="left">KDE API Reference</div>
</div>
<div id="nav_header_bottom" align="right">
<span class="doNotDisplay">:: <a href="#navigation" accesskey="5">Skip to Link Menu</a><br/></span>
<div id="nav_header_bottom_right" style="text-align: left;">
/ <a href="@topdir@">API Reference</a>
<!-- pmenu $projectname -->
</div>
</div>
<table id="main" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top" class="menuheader" height="0"></td>
<td id="contentcolumn" valign="top" rowspan="2" >
<div id="content" style="padding-top: 0px;"><div style="width:100%; margin: 0px; padding: 0px;">
<a name="content"></a>

Binary file not shown.

@ -0,0 +1,327 @@
/*
KDE-wide default CSS for HTML documentation (all media types).
Copyright (C) 2000 Frederik Fouvry
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Send comments, suggestions, etc. to Frederik Fouvry
<fouvry@sfs.nphil.uni-tuebingen.de>. */
/*
Important note: these setting may be overridden by localised CSS. Do not
add here any localization-sensitive style declarations.
Any updates should be validated, e.g. http://jigsaw.w3.org/css-validator/ */
/* Note: "should be inherit" means that in a proper browser inherit should work.
Somehow Netscape manages to interpret "inherit" as bright green.
Yuck. */
body {
background: white none;
color: black;
font-family: sans-serif;
padding: 0;
margin: 0;
}
.legalnotice, .copyright {
padding: 0;
margin: 0;
}
.abstract {
font-weight: bolder;
padding-right: 1em;
}
.toc, .list-of-tables {
padding-left: 1em;
}
.sect1, .chapter, .synopsis, .appendix, .preface, .article, .refsect1, .index, .glossary, .section {
padding: 1em;
}
.toc .chapter {
padding: 0em 0em 0em 1em;
}
.author {
color: rgb(82,80,82);
font-weight: bolder;
padding: 0;
margin: 0;
}
.othercredit {
line-height: 1em;
}
.chapter .sect1, .chapter .titlepage, .sect1 .titlepage, .article .titlepage {
padding: 0em;
}
.titlepage {
padding-left: 1em;
padding-right: 1em;
}
/* Links in Navigation */
.navLeft a:link, .navCenter a:link, .navRight a:link, .header a:link, .header a:visited, .bottom-nav a:link, .bottom-nav a:visited {
color: #41597A;
font-weight: bold;
}
/* Nice link colors for the main text */
:link {
color: #41597A;
}
:visited {
color: #597ba8;
}
.navLeft {
position: absolute;
left: 20px;
}
.navRight {
position: absolute;
right: 20px;
}
.navCenter {
text-align: center;
align: center;
}
.bannerBottomLeft {
position: absolute; left: 0px;
}
.bannerBottomRight {
position: absolute; right: 0px;
}
.header {
background: #3E91EB none;
border-bottom: 1px solid #206dcd;
border-top: 1px solid white;
color: white;
font-size: small;
height: 1.7em;
line-height: 1em;
margin: 0px;
padding-bottom: 0px;
padding-left: 1em;
padding-right: 0px;
padding-top: 0px;
vertical-align: middle;
}
.bottom-nav {
background-color: #3E91EB;
border-bottom: 1px solid #206dcd;
border-top: 1px solid white;
color: white;
font-size: small;
height: 1.7em;
line-height: 1em;
margin: 0px;
padding-bottom: 0px;
padding-left: 1em;
padding-right: 0px;
padding-top: 10px;
vertical-align: middle;
}
#logo {
background: url('kde_logo_bg.png') transparent repeat;
}
/* A little bit of padding makes the tables for keybindings etc much easier to read */
table {
padding: 5px;
}
dl {
margin-top: 0em;
margin-bottom: 0.5em;
}
dt {
margin-top: 1em;
}
div.toc dt {
margin-top: 0px;
}
div.screenshot {
margin-bottom: 1em;
margin-top: 1em;
}
div.informalexample {
border-style: dotted;
padding: 10px;
}
/* But no padding for navigation elements */
.toplogo, .navbackground {
padding: 0px;
}
table.programlisting
table.screen {
border-style: none;
background-color: rgb(224,224,224);
table-layout: auto; /* 100%? */
color: rgb(0,0,0); /* should be inherit */
}
/* Same as previous block, but more general (previous is HTML only)
Not all browsers understand this yet.
TABLE[class~=programlisting]
TABLE[class~=screen] { border-style: none;
background-color: rgb(224,224,224);
table-layout: auto;
color: inherit;
}
*/
p {
text-align: justify;
}
/* More specific settings */
/* Temporary patch: browsers break on bad HTML */
/* P, H1, H2, H3, H4, H5, TD, TH { font-family: Helvetica, Arial, sans-serif;
} */
p, h1, h2, h3, h4, h5, h6, td, th {
font-family: sans-serif;
}
/* Visual cues for GUI elements etc in the text */
.guimenu, .guimenuitem, .guisubmenu {
background-color: rgb(250,250,250);
color: rgb(0,0,0); /* should be inherit */
}
.guilabel, .interface, .guibutton {
background-color: rgb(250,250,250);
color: rgb(0,0,0); /* should be inherit */
}
.shortcut {
background-color: rgb(250,250,250);
color: rgb(0,0,0); /* should be inherit */
}
.shortcut .keycap {
background-color: rgb(250,250,250);
color: rgb(0,0,0); /* should be inherit */
}
.question {
font-weight: bolder;
}
.accel {
background-color: rgb(250,250,250);
color: rgb(0,0,0);
text-decoration: underline;
}
.option, .command {
background-color: rgb(255,255,255);
color: rgb(0,96,160);
font-weight: bold;
}
h1, h2, h3, h4, h5, h6 {
color: rgb(82,80,82);
background-color: transparent;
}
.arg, .parameter, .replaceable {
background-color: rgb(255,255,255);
color: rgb(0,128,64);
font-style: italic;
}
.screen, .programlisting {
background-color: rgb(250,250,250);
color: rgb(0,0,0); /* should be inherit */
border-style: dotted;
border-color: rgb(0,0,0);
border-width: thin;
padding: 5px;
}
/* This one is set in inches because the admonitions are set in inches
and they're more difficult to change. We can live with it in here,
for the meantime, it gives consistent margins */
.example {
margin-left: 0.5in;
margin-right: 0.5in;
}
div.mediaobject {
/* float: right; */
/* might make it much nicer. although someone has to
understand the rules ;-) You also don't want it to be
surrounded by text it doesn't refer to ... But that
may be among others a question of writing style. */
text-align: center; /* a bit of a hack: it should
position _images_ */
}
.caption {
margin: 0em 2em 3em 2em;
text-align: center;
}
.inlinemediaobject {
vertical-align: baseline;
padding-right: 1em;
padding-left: 1em;
}
/* An idea that could be nice: a search engine looking for specific
classes could display them in some conspicuous color. All that is
needed is an on the fly generated style element/style sheet. */
/* Only used in the hand-made HTML license texts */
body.license {
background-color: rgb(255,255,255);
text-align: justify;
color: rgb(0,0,0);
}
pre.license {
background-color: rgb(255,255,255);
font-family: monospace;
color: rgb(0,0,0);
}

@ -0,0 +1,32 @@
/*
KDE CSS for <**languagecountry**> HTML documentation (all media types).
Copyright (C) 2000 <**authorname**>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Send comments, suggestions, etc. to <**authorcontactdetails**>.
*/
/*
These settings will override kde-default.css.
Any updates should be validated, e.g. http://jigsaw.w3.org/css-validator/
Check out http://www.richinstyle.com/ where many of the declarations and
setup in the KDE CSS are obtained from. In fact, do not change anything
without checking so on those pages whether it is wise to do.
*/
:lg(**language**) { }

Binary file not shown.

Binary file not shown.

@ -0,0 +1,68 @@
</div></div>
</td>
</tr>
<tr>
<td valign="top" id="leftmenu" width="25%">
<a name="navigation"></a>
<div class="menu_box"><h2>API Dox</h2>
<div class="nav_list">
<ul>
<!-- gmenu -->
</ul></div></div>
</td>
</tr>
</table>
<div class="copyrights">
This file is part of the documentation for $projectname $projectnumber.<br/>
Documentation copyright &copy; 1996-2005 the KDE developers.<br/>
Generated on $datetime by
<a href="http://www.doxygen.org/index.html">doxygen</a> $doxygenversion written
by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, &copy;&nbsp;1997-2003
<p>
KDE's <a href="http://developer.kde.org/policies/documentationpolicy.html">Doxygen guidelines</a> are available online.
Questions about the reference manuals should be sent to
<a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;groot&#64;kde&#46;or&#x67">Adriaan de Groot</a>
or
<a href="&#109;a&#105;&#108;&#116;&#111;&#58;w&#105;nter&#116;&#64;kde&#46;or&#x67">Allen Winter</a>.
</p>
</div>
<div style="clear:both; height: 1px;">&nbsp;</div>
<span class="doNotDisplay">
<a href="http://www.kde.org/" accesskey="8">KDE Home</a> |
<a href="http://accessibility.kde.org/" accesskey="9">KDE Accessibility Home</a> |
<a href="http://www.kde.org/media/accesskeys.php" accesskey="0">Description of Access Keys</a>
</span>
<div style="height: 8px"></div>
<div id="footer">
<div id="footer_left">
Maintained by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;groot&#116;&#64;kde&#46;or&#x67>Adriaan de Groot</a>
and
<a href="&#109;a&#105;&#108;&#116;&#111;&#58;w&#105;nter&#116;&#64;kde&#46;or&#x67">Allen Winter</a>.
<br/>
KDE and K Desktop Environment are trademarks of <a href="http://www.kde.org/areas/kde-ev/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
<a href="http://www.kde.org/contact/impressum.php">Legal</a>
</div>
<div id="footer_right"><img src="/media/images/footer_right.png" style="margin: 0px" alt="" /></div>
</div>
<!--
WARNING: DO NOT SEND MAIL TO THE FOLLOWING EMAIL ADDRESS! YOU WILL
BE BLOCKED INSTANTLY AND PERMANENTLY!
<a href="mailto:aaaatrap-425acc3b5374943f@kde.org">Block me</a>
WARNING END
-->
</body>
</html>

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US">
<head>
<title>$projectname</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org" r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org" r (n 0 s 0 v 0 l 0))' />
<meta name="trademark" content="KDE e.V." />
<meta name="description" content="K Desktop Environment Homepage, KDE.org" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<meta name="robots" content="all" />
<link rel="shortcut icon" href="@topdir@/favicon.ico" />
<link rel="stylesheet" media="screen" type="text/css" title="APIDOX" href="doxygen.css" />
<style type="text/css">
<!--
hr { display: none; }
#content h2 { margin-left: 0px; }
table.mdTable { background-color: #f8f8f8; border: .2em solid #d7d7d7; }
td.mdRow { padding: 8px 20px; }
td.md { font-weight: bold; }
td.mdname1 { font-weight: bold; color: #602020; }
td.mdname { font-weight: bold; color: #602020; }
.copyrights { width: 80%; margin: 1ex 10%; color:#BCBCBC; }
.copyrights a { color: #9A9A9A; }
-->
</style>
</head>
<body>
<div id="nav_header_top" align="right">
<a href="#content" class="doNotDisplay" accesskey="2">Skip to main content ::</a>
<a href="@topdir@"><img id="nav_header_logo" alt="Home" align="left" src="@topdir@/kde_gear_64.png" border="0" /></a>
<span class="doNotDisplay">::</span>
<div id="nav_header_title" align="left">KDE API Reference</div>
</div>
<div id="nav_header_bottom" align="right">
<span class="doNotDisplay">:: <a href="#navigation" accesskey="5">Skip to Link Menu</a><br/></span>
<div id="nav_header_bottom_right" style="text-align: left;">
/ <a href="@topdir@">API Reference</a>
</div>
</div>
<table id="main" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top" class="menuheader" height="0"></td>
<td id="contentcolumn" valign="top" rowspan="2" >
<div id="content"><div style="width:100%;">
<a name="content"></a>

Binary file not shown.

Binary file not shown.

@ -0,0 +1,11 @@
<html><head><title>Compilation and Installation</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="installation.html" title="Appendix A. Installation"><link rel="prev" href="requirements.html" title="Requirements"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Compilation and Installation</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="requirements.html">Prev</a></div><div style="position: absolute; right: 20px;"></div><div class="navCenter">Installation</div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="compilation"></a>Compilation and Installation</h2></div></div></div><p>In order to compile and install <span class="application">KDiff3</span> on a system with KDE, type the
following in the base directory of the <span class="application">KDiff3</span> distribution:</p><pre class="screen"><code class="prompt">%</code> <strong class="userinput"><code><span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">./configure --prefix=<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>kde-dir</code></em></span></strong></span></span></code></strong>
<code class="prompt">%</code> <strong class="userinput"><code><span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">make</strong></span></span></code></strong>
<code class="prompt">%</code> <strong class="userinput"><code><span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">make</strong></span></span> install</code></strong>
</pre><p>
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>kde-dir</code></em></span> specifies the directory
containing KDE on your system. If you are not sure, read the README-file for details.
</p><p>If you don't use KDE don't use <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">configure</strong></span></span> but follow the instructions for Qt-only systems in the README file.</p><p>Since <span class="application">KDiff3</span> uses <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">autoconf</strong></span></span> and
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">automake</strong></span></span> you should have no trouble compiling it. Should you
run into problems please report them to the <span class="acronym">KDE</span> mailing lists.</p></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="requirements.html">Prev</a></div><div style="position: absolute; right: 20px;"></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Requirements </div><div class="navRight"> </div><div class="navCenter"><a accesskey="u" href="installation.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,11 @@
<html><head><title>Chapter 6. Credits and License</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="index.html" title="The KDiff3 Handbook"><link rel="prev" href="faq.html" title="Chapter 5. Questions and Answers"><link rel="next" href="installation.html" title="Appendix A. Installation"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Credits and License</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="faq.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="installation.html">Next</a></div><div class="navCenter"> </div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="credits"></a>Chapter 6. Credits and License</h2></div></div></div><p>
<span class="application">KDiff3</span> - File and Directory Comparison and Merge Tool
</p><p>
Program copyright 2002-2007 Joachim Eibl <code class="email">(joachim.eibl at gmx.de)</code>
</p><p>
Several cool ideas and bugreports came from colleagues and many people out in the Wild Wild Web. Thank you!
</p><p>
Documentation Copyright (c) 2002-2007 Joachim Eibl <code class="email">(joachim.eibl at gmx.de)</code>
</p><p><a name="gnu-fdl"></a>This documentation is licensed under the terms of the <a href="common/fdl-license.html" target="_top">GNU Free Documentation
License</a>.</p><p>This program is licensed under the terms of the <a href="common/gpl-license.html" target="_top">GNU General Public License</a>.</p></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="faq.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="installation.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Questions and Answers </div><div class="navRight"> Installation</div><div class="navCenter"><a accesskey="u" href="index.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

Binary file not shown.

@ -0,0 +1,25 @@
<html><head><title>Chapter 3. Directory Comparison and Merge with KDiff3</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="index.html" title="The KDiff3 Handbook"><link rel="prev" href="preprocessors.html" title="Preprocessor Commands"><link rel="next" href="startingdirmerge.html" title="Starting Directory Comparison Or Merge"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Directory Comparison and Merge with <span class="application">KDiff3</span></div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="preprocessors.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="startingdirmerge.html">Next</a></div><div class="navCenter"> </div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="dirmerge"></a>Chapter 3. Directory Comparison and Merge with <span class="application">KDiff3</span></h2></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dirmergeintro"></a>Introduction into Directory Comparison and Merge</h2></div></div></div><p>
Often programmers must modify many files in a directory to achieve their
purpose. For this <span class="application">KDiff3</span> also lets you compare and merge complete directories
recursively!
</p><p>
Even though comparing and merging directories seems to be quite obvious,
there are several details that you should know about. Most important is of
course the fact that now many files might be affected by each operation.
If you don't have backups of your original data, then it can be very hard
or even impossible to return to the original state. So before starting a merge,
make sure that your data is safe, and going back is possible. If you make
an archive or use some version control system is your decision, but even
experienced programmers and integrators need the old sources now and then.
And note that even though I (the author of <span class="application">KDiff3</span>) try to do my best, I can't
guarantee that there are no bugs. According to the GNU-GPL there is NO WARRANTY
whatsoever for this program. So be humble and always keep in mind:
</p><div class="blockquote"><blockquote class="blockquote"><p>
<span class="emphasis"><em>To err is human, but to really mess things up you need a computer.</em></span>
</p></blockquote></div><p>
So this is what this program can do for you: <span class="application">KDiff3</span> ...
</p><div class="itemizedlist"><ul type="disc"><li><p>... reads and compares two or three directories recursively,</p></li><li><p>... takes special care of symbolic links,</p></li><li><p>... lets you browse files on mouse double click,</p></li><li><p>... for each item proposes a merge operation, which you can change
before starting the directory merge,</p></li><li><p>... lets you simulate the merge and lists the actions that would
take place, without actually doing them,</p></li><li><p>... lets you really do the merge, and lets you interact whenever
manual interaction is needed,</p></li><li><p>... lets you run the selected operation for all items (key F7) or the selected item (key F6),</p></li><li><p>... lets you continue the merge after manual interaction with key F7,</p></li><li><p>... optionally creates backups, with the ".orig" extension,</p></li><li><p>...</p></li></ul></div></div></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="preprocessors.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="startingdirmerge.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Preprocessor Commands </div><div class="navRight"> Starting Directory Comparison Or Merge</div><div class="navCenter"><a accesskey="u" href="index.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

Binary file not shown.

@ -0,0 +1,58 @@
<html><head><title>Options for Comparing and Merging Directories</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="dirmerge.html" title="Chapter 3. Directory Comparison and Merge with KDiff3"><link rel="prev" href="dothemerge.html" title="Doing A Directory Merge"><link rel="next" href="other.html" title="Other Functions in Directory Merge Window"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Options for Comparing and Merging Directories</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="dothemerge.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="other.html">Next</a></div><div class="navCenter">Directory Comparison and Merge with <span class="application">KDiff3</span></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dirmergeoptions"></a>Options for Comparing and Merging Directories</h2></div></div></div><p>
The <span class="application">KDiff3</span>-preferences (menu "Settings"-&gt;"Configure <span class="application">KDiff3</span>") has
a section called "Directory Merge" with these options:
</p><div class="variablelist"><dl><dt><span class="term"><span class="emphasis"><em>Recursive Directories:</em></span></span></dt><dd><p> Select whether to search directories
recursively.</p></dd><dt><span class="term"><span class="emphasis"><em>File Pattern(s):</em></span></span></dt><dd><p> Only files that match any pattern here will
be put in the tree. More than one pattern may be specified here by using
the semicolon ";" as separator. Valid wildcards: '*' and '?'. (e.g. "*.cpp;*.h").
Default is "*". This pattern is not used on directories.</p></dd><dt><span class="term"><span class="emphasis"><em>File Anti-Pattern(s):</em></span></span></dt><dd><p> Files that match this pattern
will be excluded from the tree. More than one pattern may be specified here
via using the semicolon ";" as separator. Valid wildcards: '*' and '?'. Default
is "*.orig;*.o;*.obj".</p></dd><dt><span class="term"><span class="emphasis"><em>Directory Anti-Pattern(s):</em></span></span></dt><dd><p> Directories that match this pattern
will be excluded from the tree. More than one pattern may be specified here
via using the semicolon ";" as separator. Valid wildcards: '*' and '?'. Default
is "CVS;deps;.svn".</p></dd><dt><span class="term"><span class="emphasis"><em>Use CVS-Ignore:</em></span></span></dt><dd><p>
Ignore files and directories that would also be ignored by CVS.
Many automatically generated files are ignored by CVS.
The big advantage is that this can be directory specific via a local ".cvsignore"-file.
(See <a href="info:/cvs/cvsignore" target="_top">info:/cvs/cvsignore</a>.)</p></dd><dt><span class="term"><span class="emphasis"><em>Find Hidden Files and Directories:</em></span></span></dt><dd><p> On some file systems files
have an "Hidden"-attribute. On other systems a filename starting with a dot
"." causes it to be hidden. This option allows you to decide whether to
include these files in the tree or not. Default is on.</p></dd><dt><span class="term"><span class="emphasis"><em>Follow File Links:</em></span></span></dt><dd><p> For links to files: When disabled, then
the symbolic links are compared. When enabled, then the files behind the
links are compared. Default is off.</p></dd><dt><span class="term"><span class="emphasis"><em>Follow Directory Links:</em></span></span></dt><dd><p> For links to directories: When disabled,
then the symbolic links will be compared. When enabled then the link will
be treated like a directory and it will be scanned recursively. (Note that
the program doesn't check if the link is "recursive". So for example a directory
that contains a link to the directory would cause an infinite loop, and after
some time when the stack overflows or all memory is used up, crash the program.)
Default is off.</p></dd><dt><span class="term"><span class="emphasis"><em>Case Sensitive Filename Comparison:</em></span></span></dt><dd><p>
Default is false on Windows, true for other operating systems.</p></dd><dt><span class="term"><span class="emphasis"><em>File Comparison Mode:</em></span></span></dt><dd><p>
<div class="variablelist"><dl><dt><span class="term"><span class="emphasis"><em>Binary Comparison:</em></span></span></dt><dd><p>
This is the default file comparison mode.
</p></dd><dt><span class="term"><span class="emphasis"><em>Full Analysis:</em></span></span></dt><dd><p>
Do a full analysis of each file and show the statistics information columns.
(Number of solved, unsolved, nonwhite and white conflicts.)
The full analysis is slower than a simple binary analysis, and much
slower when used on files that don't contain text.
(Specify the appropriate file-antipatterns.)
</p></dd><dt><span class="term"><span class="emphasis"><em>Trust the modification date:</em></span></span></dt><dd><p> If you compare big directories
over a slow network, it might be faster to compare the modification dates
and file length alone. But this speed improvement comes with the price of
a little uncertainty. Use this option with care. Default is off.</p></dd><dt><span class="term"><span class="emphasis"><em>Trust the size:</em></span></span></dt><dd><p>
Similar to trusting the modification date. No real comparison happens. Two
files are considered equal if their file-sizes are equal. This is useful
when the file-copy operation didn't preserve the modification date.
Use this option with care. Default is off.</p></dd></dl></div></p></dd><dt><span class="term"><span class="emphasis"><em>Synchronize Directories:</em></span></span></dt><dd><p> Activates "Sync-Mode" when two directories
are compared and no explicit destination directory was specified. In this
mode the proposed operations will be chosen so that both source directories
are equal afterwards. Also the merge result will be written to both directories.
Default is off.</p></dd><dt><span class="term"><span class="emphasis"><em>Copy newer instead of merging:</em></span></span></dt><dd><p> Instead of merging the proposed
operation will copy the newer source if changes happened. (Considered unsafe,
because it implies that you know, that the other file hasn't been edited
too. Check to make sure in every case.) Default is off.</p></dd><dt><span class="term"><span class="emphasis"><em>Backup files:</em></span></span></dt><dd><p> If a file or complete directory is replaced
by another or is deleted then the original version will be renamed with an
".orig" extension. If an old backup file with ".orig" extension already exists
then this will be deleted without backup. This also affects the normal merging
of single files, not only in directory-merge mode. Default is on.</p></dd></dl></div></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="dothemerge.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="other.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Doing A Directory Merge </div><div class="navRight"> Other Functions in Directory Merge Window</div><div class="navCenter"><a accesskey="u" href="dirmerge.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,105 @@
<html><head><title>Directory Merge Visible Information</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="dirmerge.html" title="Chapter 3. Directory Comparison and Merge with KDiff3"><link rel="prev" href="startingdirmerge.html" title="Starting Directory Comparison Or Merge"><link rel="next" href="dothemerge.html" title="Doing A Directory Merge"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Directory Merge Visible Information</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="startingdirmerge.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="dothemerge.html">Next</a></div><div class="navCenter">Directory Comparison and Merge with <span class="application">KDiff3</span></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dirmergevisible"></a>Directory Merge Visible Information</h2></div></div></div><p>
While reading the directories a message-box appears that informs you of
the progress. If you abort the directory scan, then only files that have
been compared until then will be listed.
</p><p>
When the directory scan is complete then <span class="application">KDiff3</span> will show a listbox with
the results left, ...
</p><div class="screenshot"><div xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="mediaobject"><hr><img src="dirbrowser.png"><hr></div></div><p>
... and details about the currently selected item on the right:
</p><div class="screenshot"><div xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="mediaobject"><hr><img src="iteminfo.png"><hr></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="name"></a>The Name Column</h3></div></div></div><p>
Each file and directory that was found during the scan is shown here in
a tree. You can select an item by clicking it with the mouse once.
</p><p>
The directories are collapsed by default. You can expand and collapse
them by clicking on the "+"/"-" or by double-clicking the item or
by using the left/right-arrow-keys. The "Directory"-menu also contains two
actions "Fold all subdirs" and "Unfold all subdirs" with which you can
collapse or expand all directories at once.
</p><p>
If you double-click a file item then the file comparison starts and the
file-diff-window will appear.
</p><p>
The image in the name column reflects the file type in the first
directory ("A"). It can be one of these:
</p><div class="itemizedlist"><ul type="disc"><li><p>Normal file</p></li><li><p>Normal directory (directory-image)</p></li><li><p>Link to a file (file-image with a link arrow)</p></li><li><p>Link to a directory (directory-image with a link arrow)</p></li></ul></div><p>
If the file type is different in the other directories, then this is visible
in the columns A/B/C and in the window that shows the details about the selected
item. Note that for such a case no merge operation can be selected automatically.
When starting the merge, then the user will be informed of problems of that
kind.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="coloring"></a>The Columns A/B/C and the Coloring Scheme</h3></div></div></div><p>
As can be seen in the image above the colors red, green, yellow and black
are used in the columns A/B/C.
</p><div class="itemizedlist"><ul type="disc"><li><p>Black: This item doesn't exist in this directory.</p></li><li><p>Green: Newest item.</p></li><li><p>Yellow: Older than green, newer than red.</p></li><li><p>Red: Oldest item.</p></li></ul></div><p>
But for items that were identical in the comparison their color also is
identical even if the age is not.
</p><p>
Directories are considered equal if all items they contain are identical.
Then they also will have the same color. But the age of a directory is not
considered for its color.
</p><p>
The idea for this coloring scheme I came upon in
<a href="http://samba.org/cgi-bin/cvsweb/dirdiff" target="_top">dirdiff</a>. The colors
resemble the colors of a leaf that is green when new, turns yellow later and red
when old.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="operation"></a>The Operation Column</h3></div></div></div><p>
After comparing the directories <span class="application">KDiff3</span> also evaluates a proposal for a
merge operation. This is shown in the "Operation" column. You can modify
the operation by clicking on the operation you want to change. A small menu
will popup and allows you to select an operation for that item. (You can also
select the most needed operations via keyboard.
Ctrl+1/2/3/4/Del will select A/B/C/Merge/Delete respectively if available.)
This operation will be executed during the merge. It depends on the item and
on the merge-mode you are in, what operations are available. The merge-mode is one of
</p><div class="itemizedlist"><ul type="disc"><li><p>Three directory-merge ("A" is treated as older base of both).</p></li><li><p>Two directory-merge.</p></li><li><p>Two directory-sync-mode (activate via option "Synchronize Directories").</p></li></ul></div><p>
In three directory merge the operation proposal will be: If for an item ...
</p><div class="itemizedlist"><ul type="disc"><li><p>... all three directories are equal: Copy from C</p></li><li><p>... A and C are equal but B is not: Copy from B (or if B does not
exist, delete the destination if exists)</p></li><li><p>... A and B are equal but C is not: Copy from C (or if C does not
exist, delete the destination if exists)</p></li><li><p>... B and C are equal but A is not: Copy from C (or if C does not
exist, delete the destination if exists)</p></li><li><p>... only A exists: Delete the destination (if exists)</p></li><li><p>... only B exists: Copy from B</p></li><li><p>... only C exists: Copy from C</p></li><li><p>... A, B and C are not equal: Merge</p></li><li><p>... A, B and C don't have the same file type (e.g. A is a directory,
B is a file): "Error: Conflicting File Types". While such items exist the
directory merge cannot start.</p></li></ul></div><p>
In two directory merge the operation proposal will be: If for an item ...
</p><div class="itemizedlist"><ul type="disc"><li><p>... both directories are equal: Copy from B</p></li><li><p>... A exists, but not B: Copy from A</p></li><li><p>... B exists, but not A: Copy from B</p></li><li><p>... A and B exist but are not equal: Merge</p></li><li><p>... A and B don't have the same file type (e.g. A is a directory,
B is a file): "Error: Conflicting File Types". While such items exist the
directory merge cannot start.</p></li></ul></div><p>
Sync-mode is active if only two directories and no explicit destination
were specified and if the option "Synchronize directories" is active. <span class="application">KDiff3</span>
then selects a default operation so that both directories are the same afterwards.
If for an item ...
</p><div class="itemizedlist"><ul type="disc"><li><p>... both directories are equal: Nothing will be done.</p></li><li><p>... A exists, but not B: Copy A to B</p></li><li><p>... B exists, but not A: Copy B to A</p></li><li><p>... A and B exist, but are not equal: Merge and store the result
in both directories. (For the user the visible save-filename is B,
but then <span class="application">KDiff3</span> copies B also to A.)</p></li><li><p>... A and B don't have the same file type (e.g. A is a directory,
B is a file): "Error: Conflicting File Types". While such items exist the
directory merge cannot start.</p></li></ul></div><p>
When two directories are merged and the option "Copy newer instead of merging" is selected,
then <span class="application">KDiff3</span> looks at the dates and proposes to choose the newer file. If the files are not
equal but have equal dates, then the operation will contain
"Error: Dates are equal but files are not." While such items exist the
directory merge cannot start.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="status"></a>The Status Column</h3></div></div></div><p>
During the merge one file after the other will be processed. The status
column will show "Done" for items where the merge operation has succeeded,
and other texts if something unexpected happened. When a merge is complete,
then you should make a last check to see if the status for all items is
agreeable.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="statisticscolulmns"></a>Statistics Columns</h3></div></div></div><p>
When the file comparison mode "Full Analysis" is enabled in the options, then
<span class="application">KDiff3</span> will show extra columns containing the numbers of unsolved, solved, nonwhite and whitespace
conflicts. (The solved-column will only show when comparing or merging three directories.)
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="selectingvisiblefiles"></a>Selecting Listed Files</h3></div></div></div><p>
Several options influence which files are listed here. Some are accessible in the
<a href="dirmergeoptions.html" title="Options for Comparing and Merging Directories">settings dialog</a>. The Directory-menu contains the entries:
</p><p><div class="itemizedlist"><ul type="disc"><li><p>"Show Identical Files": Files that have been detected equal in all input directories.</p></li><li><p>"Show Different Files": Files that exist in two or more directories but are not equal.</p></li><li><p>"Show Files only in A": Files that exist only in A, but not in B or C.</p></li><li><p>"Show Files only in B": Files that exist only in B, but not in A or B.</p></li><li><p>"Show Files only in C": Files that exist only in C, but not in A or B.</p></li></ul></div></p><p>
Activate only the "Show"-options for the items you want listed. If for example you only want to list all items that
exist either in A or in B but not in both, you'll have to activate "Show Files only in A" and "Show Files only in B"
and deactivate all others ("Show Identical Files", "Show Different Files", "Show Files only in C").
The list will be updated immediately to reflect the change.
</p><p>
These options also apply for directories with one exception: Disabling "Show Different Files" will not hide
any complete directories. This will work only for files within.
</p><p>
Note that of these only the "Show Identical Files"-option is persistant. The others are enabled when starting <span class="application">KDiff3</span>.
</p></div></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="startingdirmerge.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="dothemerge.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Starting Directory Comparison Or Merge </div><div class="navRight"> Doing A Directory Merge</div><div class="navCenter"><a accesskey="u" href="dirmerge.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,54 @@
<html><head><title>Chapter 2. File Comparison And Merge</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="index.html" title="The KDiff3 Handbook"><link rel="prev" href="features.html" title="More Features"><link rel="next" href="opendialog.html" title="Open-Dialog"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">File Comparison And Merge</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="features.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="opendialog.html">Next</a></div><div class="navCenter"> </div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="documentation"></a>Chapter 2. File Comparison And Merge</h2></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="commandline"></a>Command-Line Options</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2488302"></a>Comparing 2 files: </h3></div></div></div><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>file1 file2</code></em></span>
</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2488321"></a>Merging 2 files: </h3></div></div></div><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>file1 file2</code></em></span> -m
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>file1 file2</code></em></span> -o <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>outputfile</code></em></span>
</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2488352"></a>Comparing 3 files: </h3></div></div></div><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>file1 file2 file3</code></em></span>
</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2488370"></a>Merging 3 files: </h3></div></div></div><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>file1 file2 file3</code></em></span> -m
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>file1 file2 file3</code></em></span> -o <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>outputfile</code></em></span>
</pre><p>
Note that <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>file1</code></em></span> will be treated as
base of <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>file2</code></em></span> and
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>file3</code></em></span>.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2488418"></a>Special case: Files with the same name </h3></div></div></div><p>
If all files have the same name but are in different directories, you can
reduce typework by specifying the filename only for the first file. E.g.:
</p><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>dir1/filename dir2 dir3</code></em></span>
</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2488444"></a>Commandline for starting a directory comparison or merge: </h3></div></div></div><p>This is very similar, but now it's about directories.</p><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>dir1 dir2</code></em></span>
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>dir1 dir2</code></em></span> -o <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>destdir</code></em></span>
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>dir1 dir2 dir3</code></em></span>
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>dir1 dir2 dir3</code></em></span> -o <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>destdir</code></em></span>
</pre><p>For directory comparison and merge you can continue to read <a href="dirmerge.html" title="Chapter 3. Directory Comparison and Merge with KDiff3">here</a>.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2488514"></a>Other command line options</h3></div></div></div><p>To see all available command line options type</p><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> --help
</pre><p>Example output:</p><pre class="screen">
Options:
-m, --merge Merge the input.
-b, --base file Explicit base file. For compatibility with certain tools.
-o, --output file Output file. Implies -m. E.g.: -o newfile.txt
--out file Output file, again. (For compatibility with certain tools.)
--auto No GUI if all conflicts are auto-solvable. (Needs -o file)
--qall Don't solve conflicts automatically. (For compatibility...)
--L1 alias1 Visible name replacement for input file 1 (base).
--L2 alias2 Visible name replacement for input file 2.
--L3 alias3 Visible name replacement for input file 3.
-L, --fname alias Alternative visible name replacement. Supply this once for every input.
--cs string Override a config setting. Use once for every setting. E.g.: --cs "AutoAdvance=1"
--confighelp Show list of config settings and current values.
--config file Use a different config file.
</pre><p>The option <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="option"><code class="option">--cs</code></span> allows you to adjust a configuration value that is otherwise only adjustable via the configure dialogs.
But be aware that when <span class="application">KDiff3</span> then terminates the changed value will be stored along with the other settings.
With <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="option"><code class="option">--confighelp</code></span> you can find out the names of the available items and current values.</p><p>Via <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="option"><code class="option">--config</code></span> you can specify a different config file. When you often use <span class="application">KDiff3</span>
with completely different setups this allows you to easily switch between them.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2488593"></a>Ignorable command line options</h3></div></div></div><p>Many people want to use <span class="application">KDiff3</span> with some version control system.
But when that version control system calls <span class="application">KDiff3</span> using command line parameters that <span class="application">KDiff3</span> doesn't recognise, then <span class="application">KDiff3</span> terminates with an error.
The integration settings allow to specify command line parameters that should be ignored by <span class="application">KDiff3</span>.
They will appear in the usage help like in this example:</p><pre class="screen">
--<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>foo</code></em></span> Ignored. (User defined.)
</pre><div class="variablelist"><dl><dt><span class="term"><span class="emphasis"><em>Command line options to ignore:</em></span></span></dt><dd><p>
A list of options, separated via semicolon ';'. When one of these options appears on the commandline,
then <span class="application">KDiff3</span> will ignore it and run without reporting an error.
(Default is "u;query;html;abort").</p></dd></dl></div><p>When this isn't enough, then it is recommended to write a shell script that does the option translation.</p></div></div></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="features.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="opendialog.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">More Features </div><div class="navRight"> Open-Dialog</div><div class="navCenter"><a accesskey="u" href="index.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,65 @@
<html><head><title>Doing A Directory Merge</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="dirmerge.html" title="Chapter 3. Directory Comparison and Merge with KDiff3"><link rel="prev" href="dirmergevisible.html" title="Directory Merge Visible Information"><link rel="next" href="dirmergeoptions.html" title="Options for Comparing and Merging Directories"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Doing A Directory Merge</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="dirmergevisible.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="dirmergeoptions.html">Next</a></div><div class="navCenter">Directory Comparison and Merge with <span class="application">KDiff3</span></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dothemerge"></a>Doing A Directory Merge</h2></div></div></div><p>
You can either merge the currently selected item (file or directory), or all items.
When you have made all your operation choices (in all subdirectories too)
then you can start the merge.
</p><p>
Be aware that if you didn't specify a destination directory explicitely,
then the destination will be "C" in three directory mode, "B" in two directory
merge mode, and in sync-mode it will be "A" or/and "B".
</p><p>
If you have specified a destination directory also check that all items
that should be in the output, are in the tree. There are some options that
cause certain items to be omitted from the directory comparison and merge.
Check these options to avoid unpleasant surprises:
</p><div class="itemizedlist"><ul type="disc"><li><p>"Recursive Directories": If this is off, then items in subdirectories
will not be found.</p></li><li><p>"Pattern"/"Anti-Pattern": Include/exclude items that match</p></li><li><p>"Exclude Hidden Files"</p></li><li><p><a href="dirmergevisible.html#selectingvisiblefiles" title="Selecting Listed Files">"Show"-options</a> (Show Identical/Different Files, Files only in A/B/C)</p></li></ul></div><p>
If you change the settings in order to list more files, you must do a rescan via menu "Directory"-&gt;"Rescan" yourself.
(The reason for this is that for faster comparison-speed <span class="application">KDiff3</span> omits the comparison for files suppressed by these criteria.)
If you changed your file and dir patterns to exclude files, then the file-list will immediately be updated on closing
the options-dialog.
</p><p>
Note that when you write to a completely new directory then you usually also want to copy the identical files.
In that case enable the "Show Identical Files"-option. If your destination-directory is one of the inputs,
then this isn't necessary because the file is already there.
</p><p>
If you are satisfied so far, the rest is easy.
</p><p>
To merge all items: Select "Start/Continue directory merge" in the "Directory"-menu
or press F7 (which is the default shortcut).
To merge only the current item: Select "Run Operation For Current Item"
or press F6.
</p><p>
If due to conflicting filetypes still some items with invalid operations
exist, then a messagebox will appear and these items will be pointed out,
so you can select a valid operation for the item.
</p><p>
If you merge all items a dialog will appear giving you the options "Do it", "Simulate
it" and "Cancel".
</p><div class="itemizedlist"><ul type="disc"><li><p>Select "Simulate it" if you want to see what would be done without
actually doing it. A verbose list of all operations will be shown.</p></li><li><p>Otherwise select "Do it" to really start merging.</p></li></ul></div><p>
Then <span class="application">KDiff3</span> will run the specified operation for all items. If manual
interaction is required (single file merge), then a merge window will open
(<a href="screenshots.html#dirmergebigscreenshot">see the big screenshot</a>).
</p><p>
When you have finished with manually merging a file, again select "Start/Continue directory
merge" or the key F7. If you haven't saved it yet, a dialog will ask you to
do so. Then <span class="application">KDiff3</span> will continue with the next item.
</p><p>
When <span class="application">KDiff3</span> encounters an error, it will tell you so and will show the
verbose-status-information. At the bottom of this list, there will be some
error messages which should help you to understand the cause of the problem.
When you continue merging (F7 key) <span class="application">KDiff3</span> will give you the choice to retry
or skip the item that caused the problem. This means that before continuing
you can choose another operation or solve the problem by other means.
</p><p>
When the merge is complete, then <span class="application">KDiff3</span> will inform you via a message
box.
</p><p>
If some items were merged individually before running the directorymerge then
<span class="application">KDiff3</span> remembers this (while this
merge-session goes on), and doesn't merge them again when later the merge for
all items is run. Even when the merge was skipped or nothing was saved these
items count as completed. Only when you change the merge operation the
"Done"-status of the item will be removed and it can be merged again.
</p></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="dirmergevisible.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="dirmergeoptions.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Directory Merge Visible Information </div><div class="navRight"> Options for Comparing and Merging Directories</div><div class="navCenter"><a accesskey="u" href="dirmerge.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,132 @@
<html><head><title>Chapter 5. Questions and Answers</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="index.html" title="The KDiff3 Handbook"><link rel="prev" href="kpart.html" title="Using KDiff3 as a KPart"><link rel="next" href="credits.html" title="Chapter 6. Credits and License"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Questions and Answers</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="kpart.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="credits.html">Next</a></div><div class="navCenter"> </div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="faq"></a>Chapter 5. Questions and Answers</h2></div></div></div><p>This document may have been updated since your installation.
You can find the latest version at <a href="http://docs.kde.org/development/en/extragear-utils/" target="_top">http://docs.kde.org/development/en/extragear-utils/</a>.</p><div class="qandaset"><dl><dt>5.1. <a href="faq.html#id2570336">
Why is it called "KDiff3"?
</a></dt><dt>5.2. <a href="faq.html#id2569721">
Why did I release it under GPL?
</a></dt><dt>5.3. <a href="faq.html#id2569735">
Some buttons and functions are missing. What's wrong?
</a></dt><dt>5.4. <a href="faq.html#id2569763">
Often lines that are similar but not identical appear next to each other
but sometimes not. Why?
</a></dt><dt>5.5. <a href="faq.html#id2569787">
Why must all conflicts be solved before the merge result can be saved?
</a></dt><dt>5.6. <a href="faq.html#id2569806">
How can I synchronise the diff and merge views, so that all views show the same text position?
</a></dt><dt>5.7. <a href="faq.html#id2569826">
Why does the editor in the merge result window not have an "undo"-function?
</a></dt><dt>5.8. <a href="faq.html#id2569841">
When I removed some text, then suddenly "&lt;No src line&gt;" appeared
and cannot be deleted. What does that mean and how can one remove this?
</a></dt><dt>5.9. <a href="faq.html#id2569879">
Why doesn't KDiff3 support syntax-highlighting?
</a></dt><dt>5.10. <a href="faq.html#id2569900">
Can I use KDiff3 to compare OpenOffice.Org, Word, Excel, PDF-, etc. files?
</a></dt><dt>5.11. <a href="faq.html#id2569967">
Where has the the directory option "List only deltas" gone?
</a></dt><dt>5.12. <a href="faq.html#id2569988">
How can I make a big selection in the diff input window
because scrolling takes so long?
</a></dt><dt>5.13. <a href="faq.html#id2570009">
There is so much information here, but your question is still not answered?
</a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="question"><td align="left" valign="top"><a name="id2570336"></a><a name="id2570338"></a><b>5.1.</b></td><td align="left" valign="top"><p>
Why is it called "<span class="application">KDiff3</span>"?
</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
Tools named "KDiff" and "KDiff2" (now called "Kompare") already exist. Also "KDiff3" should suggest
that it can merge like the "diff3"-tool in the Diff-Tool collection.
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2569721"></a><a name="id2569723"></a><b>5.2.</b></td><td align="left" valign="top"><p>
Why did I release it under GPL?
</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
I'm using GPL programs for a very long time now and learned very much
by having a look at many of the sources. Hence this is my "Thank You"
to all programmers that also did so or will do the same.
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2569735"></a><a name="id2569748"></a><b>5.3.</b></td><td align="left" valign="top"><p>
Some buttons and functions are missing. What's wrong?
</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
You compiled from source but you probably didn't specify the correct KDE-prefix
with configure. By default configure wants to install in /usr/local but then KDE can't
find the user-interface ressource file (i.e. kdiff3ui.rc). The README-file contains
more information about the correct prefix.
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2569763"></a><a name="id2569764"></a><b>5.4.</b></td><td align="left" valign="top"><p>
Often lines that are similar but not identical appear next to each other
but sometimes not. Why?
</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
Lines where only the amount of white space characters is different
are treated as "equal" at first, while just one different non-white character
causes the lines to be "different". If similar lines appear next to each
other, this actually is coincidence but this fortunately is often the case.
See also <a href="interpretinginformation.html#manualdiffhelp" title="Manually Aligning Lines">Manual Diff Help</a>.
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2569787"></a><a name="id2569789"></a><b>5.5.</b></td><td align="left" valign="top"><p>
Why must all conflicts be solved before the merge result can be saved?
</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
For each equal or different section the editor in the merge result
window remembers where it begins or ends. This is needed so that conflicts
can be solved manually by simply selecting the source button (A, B or C).
This information is lost while saving as text and it is too much effort to
create a special file format that supports saving and restoring all necessary
information.
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2569806"></a><a name="id2569807"></a><b>5.6.</b></td><td align="left" valign="top"><p>
How can I synchronise the diff and merge views, so that all views show the same text position?
</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
Click into the summary column left of the text. (<a href="merging.html#synchronise_views" title="Setting The Current Group And Synchronising Merge And Diff View Position">See also here.</a>)
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2569826"></a><a name="id2569827"></a><b>5.7.</b></td><td align="left" valign="top"><p>
Why does the editor in the merge result window not have an "undo"-function?
</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
This was too much effort until now. You can always
restore a version from one source (A, B or C) by clicking the respective
button. For big editing the use of another editor is recommended anyway.
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2569841"></a><a name="id2569843"></a><b>5.8.</b></td><td align="left" valign="top"><p>
When I removed some text, then suddenly "&lt;No src line&gt;" appeared
and cannot be deleted. What does that mean and how can one remove this?
</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
For each equal or different section the editor in the merge result
window remembers where it begins or ends. "&lt;No src line&gt;" means
that there is nothing left in a section, not even a new line character.
This can happen either while merging automatically or by editing. This is
no problem, since this hint won't appear in the saved file. If you want
the orignal source back just select the section (click on the left summary
column) and then click the source button with the needed contents (A/B or
C).
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2569879"></a><a name="id2569881"></a><b>5.9.</b></td><td align="left" valign="top"><p>
Why doesn't <span class="application">KDiff3</span> support syntax-highlighting?
</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
<span class="application">KDiff3</span> already uses many colors for difference highlighting. More
highlighting would be confusing. Use another editor for this.
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2569900"></a><a name="id2569901"></a><b>5.10.</b></td><td align="left" valign="top"><p>
Can I use <span class="application">KDiff3</span> to compare OpenOffice.Org, Word, Excel, PDF-, <span class="abbrev">etc.</span> files?
</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
Although <span class="application">KDiff3</span> will analyse any kind of file the result will probably
not be very satisfactory for you.
</p><p>
<span class="application">KDiff3</span> was made to compare pure text files. OpenOffice, Word, Excel etc.
store much more information in the files (about fonts, pictures, pages,
colors etc.) which <span class="application">KDiff3</span> doesn't know about. So <span class="application">KDiff3</span> will
show you the contents of the file interpreted as pure text, but
this might be unreadable or at least it will look very odd.
</p><p>
Since most programs nowadays store their contents in XML-format, you might
be able to read it as pure text. So if the change was only small,
<span class="application">KDiff3</span> still might help you.
</p><p>
The best solution if you only want to compare the text (without embedded
objects like pictures) is to use "Select All" and "Copy" in your program
to copy the interesting text to the clipoard and then in <span class="application">KDiff3</span> paste the
text into either diff input window.
(See also <a href="selections.html" title="Select, Copy And Paste">Select, Copy And Paste</a>.)
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2569967"></a><a name="id2569969"></a><b>5.11.</b></td><td align="left" valign="top"><p>
Where has the the directory option "List only deltas" gone?
</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
There are now several <a href="dirmergevisible.html#selectingvisiblefiles" title="Selecting Listed Files">"Show"-options</a> in the directory menu.
Disabling "Show identical files" will achieve what enabling "List only deltas" used to do.
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2569988"></a><a name="id2569989"></a><b>5.12.</b></td><td align="left" valign="top"><p>
How can I make a big selection in the diff input window
because scrolling takes so long?
</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
Start the selection as usual (click and hold the left mouse button).
Then use the navigation keys (e.g. page up, page down) while holding the left mouse button down.
(See also <a href="selections.html" title="Select, Copy And Paste">Select, Copy And Paste</a>.)
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2570009"></a><a name="id2570011"></a><b>5.13.</b></td><td align="left" valign="top"><p>
There is so much information here, but your question is still not answered?
</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
Please send me your question. I appreciate every comment.
</p></td></tr></tbody></table></div></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="kpart.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="credits.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Using <span class="application">KDiff3</span> as a KPart </div><div class="navRight"> Credits and License</div><div class="navCenter"><a accesskey="u" href="index.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,22 @@
<html><head><title>More Features</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="introduction.html" title="Chapter 1. Introduction"><link rel="prev" href="screenshots.html" title="Screenshots and Features"><link rel="next" href="documentation.html" title="Chapter 2. File Comparison And Merge"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">More Features</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="screenshots.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="documentation.html">Next</a></div><div class="navCenter">Introduction</div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="features"></a>More Features</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2490911"></a> Line-By-Line And Char-By-Char Diff-Viewer</h3></div></div></div><p>By using the possiblities of a graphical color display <span class="application">KDiff3</span> shows
exactly what the difference is. When you have to do many code-reviews, you will like this.
</p><div class="screenshot"><div xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="mediaobject"><hr><img src="letter_by_letter.png"><hr></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2490942"></a> See White-Space Differences At One Glance</h3></div></div></div><p>Spaces and tabs that differ appear visibly. When lines differ only
in the amount of white space this can be seen at one look in the summary
column on the left side. (No more worries when people change the indentation.)
</p><div class="screenshot"><div xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="mediaobject"><hr><img src="white_space.png"><hr></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2490972"></a> Triple-Diff</h3></div></div></div><p> Analyze three files and see where they differ.
</p><p>
The left/middle/right windows are named A/B/C and have the blue/green/magenta
color respectively.
</p><p>
If one file is the same and one file is different on a line then the
color shows which file is different. The red color means that both other
files are different.
</p><div class="screenshot"><div xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="mediaobject"><hr><img src="triple_diff.png"><hr></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2491007"></a> Comfortable Merge Of Two Or Three Input Files</h3></div></div></div><p> <span class="application">KDiff3</span> can be used to merge two or three input files and automatically
merges as much as possible. The result is presented in an editable window
where most conflicts can be solved with a single mouseclick: Select the
buttons A/B/C from the button-bar to select the source that should be used.
You can also select more than one source. Since this output window is an
editor even conflicts which need further corrections can be solved here without
requiring another tool.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2491031"></a>And ...</h3></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>Fast navigation via buttons.</p></li><li><p>A mouse-click into a summary column sync's all windows to show the same position.</p></li><li><p>Select and copy from any window and paste into the merge result window.</p></li><li><p>Overview column that shows where the changes and conflicts are.</p></li><li><p>The colors are adjustable to your specific preferences.</p></li><li><p>Adjustable Tab size.</p></li><li><p>Option to insert spaces instead of tabs.</p></li><li><p>Open files comfortably via dialog or specify files on the command line.</p></li><li><p>Search for strings in all text windows. Find (Ctrl-F) and Find Next (F3)</p></li><li><p>Show the line numbers for each line. </p></li><li><p>Paste clipboard or drag text into a diff input window.</p></li><li><p>Networktransparency via KIO.</p></li><li><p>Can be used as diff-viewer in KDevelop 3.</p></li><li><p>Word-wrap for long lines.</p></li><li><p>Support for Unicode, UTF-8 and other codecs.</p></li><li><p>Support for right to left languages.</p></li><li><p>...</p></li></ul></div></div></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="screenshots.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="documentation.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Screenshots and Features </div><div class="navRight"> File Comparison And Merge</div><div class="navCenter"><a accesskey="u" href="introduction.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,10 @@
<html><head><title>Finding Strings</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="documentation.html" title="Chapter 2. File Comparison And Merge"><link rel="prev" href="saving.html" title="Saving"><link rel="next" href="printing.html" title="Printing"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Finding Strings</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="saving.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="printing.html">Next</a></div><div class="navCenter">File Comparison And Merge</div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="find"></a>Finding Strings</h2></div></div></div><p>
You can search for a string in any text-window of <span class="application">KDiff3</span>. The "Find ..."-command
(Ctrl-F) in the Edit-menu opens a dialog that lets you specify the string
to search for. You can also select the windows which should be searched.
Searching will always start at the top. Use the "Find Next"-command (F3)
to proceed to the next occurrence. If you select to search several windows then the first
window will be searched from top to bottom before the search starts in the next
window at the top again, etc.
</p></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="saving.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="printing.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Saving </div><div class="navRight"> Printing</div><div class="navCenter"><a accesskey="u" href="documentation.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -0,0 +1,6 @@
<html><head><title>Appendix A. Installation</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="index.html" title="The KDiff3 Handbook"><link rel="prev" href="credits.html" title="Chapter 6. Credits and License"><link rel="next" href="requirements.html" title="Requirements"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Installation</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="credits.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="requirements.html">Next</a></div><div class="navCenter"> </div></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="installation"></a>Appendix A. Installation</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="installation.html#getting-kdiff3">How to obtain <span class="application">KDiff3</span></a></span></dt><dt><span class="sect1"><a href="requirements.html">Requirements</a></span></dt><dt><span class="sect1"><a href="compilation.html">Compilation and Installation</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="getting-kdiff3"></a>How to obtain <span class="application">KDiff3</span></h2></div></div></div><p>
You can download the latest version of <span class="application">KDiff3</span> from its homepage <a href="http://kdiff3.sourceforge.net" target="_top">http://kdiff3.sourceforge.net</a>.
</p><p>
<span class="application">KDiff3</span> is also available for other platforms. See the homepage for details.
</p></div></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="credits.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="requirements.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Credits and License </div><div class="navRight"> Requirements</div><div class="navCenter"><a accesskey="u" href="index.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,68 @@
<html><head><title>Comparing Files And Interpreting The Information In The Input Windows</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="documentation.html" title="Chapter 2. File Comparison And Merge"><link rel="prev" href="pasteinput.html" title="Paste and Drop Input"><link rel="next" href="merging.html" title="Merging And The Merge Output Editor Window"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Comparing Files And Interpreting The Information In The Input Windows</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="pasteinput.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="merging.html">Next</a></div><div class="navCenter">File Comparison And Merge</div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="interpretinginformation"></a>Comparing Files And Interpreting The Information In The Input Windows</h2></div></div></div><div class="screenshot"><div xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="mediaobject"><hr><img src="screenshot_diff.png"><hr></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2564410"></a>Info Line</h3></div></div></div><p>
At the top of each text window is its "info line". The info lines of
the input windows contain a letter "A", "B" or "C", the editable filename,
a button for browsing, and the line number of the first visible line in the window.
(Note that window "C" is optional.) Each info line appears in a different color.
</p><p>
When you selected another file via browsing or finished editing the filename here
by pressing enter, the new file will be loaded and
compared with the already loaded file(s).
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2564428"></a>Coloring</h3></div></div></div><p>
The three input windows are assigned the letters "A", "B" and "C".
"A" has color blue, "B" has green and "C" has magenta. (These are the
defaults, but can be changed in the Settings-Menu.)
</p><p>
When a difference is detected then the color shows which input file
differs. When both other input files differ then the color used to express
this is red by default ("Conflict color" in the Settings).
This colorscheme is especially useful in the case of three input files, which will be
seen in the next section (<a href="merging.html" title="Merging And The Merge Output Editor Window">Merging</a>).
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2564454"></a>Summary Column</h3></div></div></div><p>
Left of each text is the "summary column". If differences occurred on a
line then the summary column shows the respective color. For a white-space-only
difference the summary is chequered. For programming languages where white
space is not so important this is useful to see at one glance if anything
of importance was modified. (In C/C++ white space is only interesting within
strings, comments, for the preprocessor, and some only very esoteric situations.)
</p><p>
The vertical line separating the summary column and the text is interrupted
if the input file had no lines there. When word-wrap is enabled then this vertical
line appears dotted for wrapped lines.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2564475"></a>Overview Column</h3></div></div></div><p>
On the right side a "overview"-column is visible left of the vertical scrollbar.
It shows the compressed summary column of input "A". All the differences
and conflicts are visible at one glance. When only two input windows are
used, then all differences appear red here because every difference is
also a conflict. A black rectangle frames the visible part of the inputs.
For very long input files, when the number of input lines is bigger than
the height of the overview column in pixels, then several input lines share
one overview line. A conflict then has top priority over simple differences,
which have priority over no change, so that no difference or conflict is
lost here. By clicking into this overview column the corresponding text
will be shown.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="manualdiffhelp"></a>Manually Aligning Lines</h3></div></div></div><p>
Sometimes the algorithm places the wrong lines next to each other. Or you want to compare
one piece of text with text at a completely different position in the other file.
For these situations you can manually instruct <span class="application">KDiff3</span> to align certain lines.
Mark the text for which you want to improve the alignment with the mouse as you would
for copy and paste in the first diff view and then choose "Add Manual Diff Alignment"
in the "Diffview"-menu (keyboard shortcut "Ctrl-Y") . An orange bar will appear in
the summary column next to the chosen text. Repeat this for the second and
(if available) third diff view. <span class="application">KDiff3</span> will immediately recalculate the differences everytime you do this.
and will align the chosen lines. Of course some of the previously matching lines in between
might not match anymore.
</p><p>
Currently merging doesn't support the use of manual diff help.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="joinsplitsections"></a>Manually Joining and Splitting Diff Sections</h3></div></div></div><p>
In some cases <span class="application">KDiff3</span> will see too many or too few diff sections for merging. In such a
case you can join or split existing sections.
</p><p>
Add new sections by first selecting text in the lines that belong together in either input window (as for copying to the clipboard).
Then choose "Split Diff At Selection" in the "Merge" menu.
Splits will be added above the first line and below the last line of the selected text.
If you only want to add one section, then select text beginning at another section-split.
</p><p>
For joining sections in either input window select something in the lines from the sections to join.
(You can join several sections in one step too.) Then choose "Join selected Diffs" in the "Merge"-menu.
</p></div></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="pasteinput.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="merging.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Paste and Drop Input </div><div class="navRight"> Merging And The Merge Output Editor Window</div><div class="navCenter"><a accesskey="u" href="documentation.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,32 @@
<html><head><title>Chapter 1. Introduction</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="index.html" title="The KDiff3 Handbook"><link rel="prev" href="index.html" title="The KDiff3 Handbook"><link rel="next" href="screenshots.html" title="Screenshots and Features"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Introduction</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="index.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="screenshots.html">Next</a></div><div class="navCenter"> </div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="introduction"></a>Chapter 1. Introduction</h2></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="why"></a>Yet Another Diff Frontend?</h2></div></div></div><p>
Several graphical diff tools exist. Why choose <span class="application">KDiff3</span>? Let me say, why I wrote it.
</p><p>
<span class="application">KDiff3</span> started because I had to do a difficult merge. Merging is necessary when several
people work on the same files in a project. A merge can be somewhat automated, when the
merge-tool not only has the new modified files (called "branches"), but also the original file
(called "base"). The merge tool will automatically choose any modification that was only
done in one branch. When several contributors change the same lines, then the merge tool
detects a conflict which must be solved manually.
</p><p>
The merge then was difficult because one contributor had changed many things and corrected
the indentation in many places. Another contributor also had changed much text in the same file,
which resulted in several merge conflicts.
</p><p>
The tool I used then, only showed the changed lines, but not what had changed within these
lines. And there was no information about where only the indentation was changed. The merge
was a little nightmare.
</p><p>
So this was the start. The first version could show differences within a line and showed white space differences.
Later many other features were added to increase the usefulness.
</p><p>
For example if you want to compare some text quickly, then you can copy it to the clipboard and
paste it into either diff window.
</p><p>
A feature that required a big effort was the directory comparison and merge facility, which turned
the program almost into a full file browser.
</p><p>
I hope <span class="application">KDiff3</span> works for you too. Have fun!
</p><p>
Joachim Eibl (2003)
</p></div></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="index.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="screenshots.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">The <span class="application">KDiff3</span> Handbook </div><div class="navRight"> Screenshots and Features</div><div class="navCenter"><a accesskey="u" href="index.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

Binary file not shown.

@ -0,0 +1,89 @@
.TH "KDIFF3" "1"
.SH "NAME"
KDiff3 \(em compares two or three input files or directories
.SH "SYNOPSIS"
.PP
\fBKDiff3\fR [\fBQT options\fP] [\fBKDE options\fP] [\fBKDiff3 options\fP] [\fB\fIFile1/base\fR\fP] [\fB\fIFile2\fR\fP] [\fB\fIFile3\fR\fP]
.SH "DESCRIPTION"
.PP
This manual page documents briefly the
\fBKDiff3\fR tool.
.PP
This manual page was written for the \fBDebian\fP distribution
because the original program does not have a manual page.
For comprehensive help, please see \fBkhelpcenter help:/kdiff3\fR.
.PP
\fBKDiff3\fR is a program that
.IP " \(bu" 6
compares or merges two or three text input files or directories
.IP " \(bu" 6
shows the differences line by line and character by character
.IP " \(bu" 6
provides an automatic merge-facility and
.IP " \(bu" 6
an integrated editor for comfortable solving of merge-conflicts
.IP " \(bu" 6
supports Unicode, UTF-8 and other codecs
.IP " \(bu" 6
supports KIO on KDE (allows accessing ftp, sftp, fish, smb etc.)
.IP " \(bu" 6
Printing of differences
.IP " \(bu" 6
Manual alignment of lines
.IP " \(bu" 6
Automatic merging of version control history ($Log$)
.SH "OPTIONS"
.PP
This program follows the usual GNU command line syntax,
with long options starting with two dashes (`\-'). A summary of
options is included below. For a full summary of options, run
\fBKDiff3 \-\-help\fR.
.IP "\fB-m, \-\-merge\fP " 10
Merge the input.
.IP "\fB-b, \-\-base file\fP " 10
Explicit base file. For compatibility with certain tools.
.IP "\fB-o, \-\-output file\fP " 10
Output file. Implies \-m. E.g.: \-o newfile.txt
.IP "\fB\-\-out file\fP " 10
Output file, again. (For compatibility with certain tools.)
.IP "\fB\-\-auto\fP " 10
No GUI if all conflicts are auto-solvable. (Needs \-o file)
.IP "\fB\-\-qall\fP " 10
Don't solve conflicts automatically. (For compatibility...)
.IP "\fB-L1 alias\fP " 10
Visible name replacement for first file/base file.
.IP "\fB-L2 alias\fP " 10
Visible name replacement for second file.
.IP "\fB-L3 alias\fP " 10
Visible name replacement for third file.
.IP "\fB-L, \-\-fname alias\fP " 10
Visible name replacement. May by supplied for each input.
.IP "\fB\-\-cs string\fP " 10
Change a setting, e. g. \-\-cs "AutoAdvance=1".
.IP "\fB\-\-confighelp\fP " 10
Show a list of all settings and their values.
.IP "\fB\-\-config file \fP " 10
Use a different settings file.
.IP "\fB\-\-author\fP " 10
Show author of program.
.IP "\fB-v, \-\-version\fP " 10
Show version of program.
.IP "\fB\-\-license\fP " 10
Show license of program.
.SH "AUTHOR"
.PP
This manual page was written by Eike Sauer <eikes@cs.tu-berlin.de> for
the \fBDebian\fP system (but may be used by others). Permission is
granted to copy, distribute and/or modify this document under
the terms of the GNU General Public License, Version 2
(or, at your option, any later version published by the Free
Software Foundation).
.PP
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL.
.\" created by instant / docbook-to-man, Tue 13 Nov 2007, 15:25

@ -0,0 +1,22 @@
<html><head><title>Using KDiff3 as a KPart</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="misc.html" title="Chapter 4. Miscellaneous Topics"><link rel="prev" href="misc.html" title="Chapter 4. Miscellaneous Topics"><link rel="next" href="faq.html" title="Chapter 5. Questions and Answers"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Using <span class="application">KDiff3</span> as a KPart</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="misc.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="faq.html">Next</a></div><div class="navCenter">Miscellaneous Topics</div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="kpart"></a>Using <span class="application">KDiff3</span> as a KPart</h2></div></div></div><p>
<span class="application">KDiff3</span> is a KPart. Currently it implements the KParts::ReadOnlyPart-interface.
</p><p>
It's main use is as difference-viewer in KDevelop. KDevelop always starts the
internal difference viewer first. To invoke <span class="application">KDiff3</span> press the right mouse button
on the difference viewer window and select "Show in KDiff3Part" from the contextmenu.
</p><p>
<span class="application">KDiff3</span> normally requires two complete files as input. When used as part <span class="application">KDiff3</span>
will assume that the inputfile is a patch-file in the unified format. <span class="application">KDiff3</span>
then retrieves the original filenames from the patch-file. At least one of
the two files must be available. <span class="application">KDiff3</span> will then invoke <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">patch</strong></span></span> to
recreate the second file.
</p><p>
In Konqueror you can select a patch-file and select "Preview in"-"KDiff3Part" from
the contextmenu. Be aware that this won't work if none of the original files are
available, and it is not reliable if the original file(s) have changed since the
patch-file was generated.
</p><p>
When run as a part <span class="application">KDiff3</span> only provides the a two-file-diff, a very small toolbar
and menu. Merging or directory-comparison are not supported then.
</p></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="misc.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="faq.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Miscellaneous Topics </div><div class="navRight"> Questions and Answers</div><div class="navCenter"><a accesskey="u" href="misc.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

Binary file not shown.

Binary file not shown.

@ -0,0 +1,195 @@
<html><head><title>Merging And The Merge Output Editor Window</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="documentation.html" title="Chapter 2. File Comparison And Merge"><link rel="prev" href="interpretinginformation.html" title="Comparing Files And Interpreting The Information In The Input Windows"><link rel="next" href="navigation.html" title="Navigation And Editing"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Merging And The Merge Output Editor Window</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="interpretinginformation.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="navigation.html">Next</a></div><div class="navCenter">File Comparison And Merge</div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="merging"></a>Merging And The Merge Output Editor Window</h2></div></div></div><div class="screenshot"><div xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="mediaobject"><hr><img src="screenshot_merge.png"><hr></div></div><p>
The merge output editor window (below the diff input windows) also has an info line at the top showing "Output:", the
filename and "[Modified]" if you edited something. Usually it will contain
some text through the automatic merge facilities, but often it will also
contain conflicts.
</p><p>
!!! Saving is disabled until all conflicts are resolved !!! (Use the "Go
to prev/next unsolved conflicts"-buttons to find the remaining conflicts.)
</p><p>
With only two input files every difference is also a conflict that must
be solved manually.
</p><p>
With three input files the first file is treated as base, while the
second and third input files contain modifications. When at any line only
either input B or input C have changed but not both then the changed source
will automatically be selected. Only when B and C have changed on the same
lines, then the tool detects a conflict that must be solved manually.
When B and C are the same, but not the same as A, then C is selected.
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2564630"></a>The Summary Column</h3></div></div></div><p>
The merge output editor window also has a summary column on the left. It shows the
letter of the input from which a line was selected or nothing if all three
sources where equal on a line. For conflicts it shows a questionmark "?"
and the line shows "&lt;Merge Conflict&gt;", all in red. Because solving
conflicts line by line would take very long, the lines are grouped into
groups that have the same difference and conflict characteristics.
But only-white-space-conflicts are separated from non-white-space-conflicts
in order to ease the merging of files were the indentation changed for many
lines.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="synchronise_views"></a>Setting The Current Group And Synchronising Merge And Diff View Position</h3></div></div></div><p>
When clicking into the summary column with the left mouse button in either
window then the beginning of the group belonging to that line will shown in all windows.
This group then becomes the "current group". It is highlighted with the
"Current range (diff) background color" and
a black bar appears on the left side of the text.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2564684"></a>Choosing Inputs A, B or C For Current Conflict And Editing</h3></div></div></div><p>
The button bar below the menubar contains three input selector buttons
containing the letters "A", "B" and "C". Click the input selector
button to insert (or remove if already inserted) the lines from the respective source.
To choose the lines from several inputs click the respective buttons in the
needed order. For example if you want that the lines from "B" appear before
the lines from "A" in the output, first click "B", then "A".
</p><p>
If you use the auto-advance option
(<a href="navigation.html#autoadvance" title="Auto-Advance">"Automatically go to next unsolved conflict after source selection"</a>),
you should disable this before choosing lines from several inputs or if you want to
edit the lines after your choice. Otherwise <span class="application">KDiff3</span> will jump to the next
conflict after choosing the first input.
</p><p>
It is often helpful directly edit the merge output.
The summary column will show "m" for every line that was manually modified.
When for instance the differences are aligned in a way that simply choosing
the inputs won't be satisfactory, then you can mark the needed text and use
normal <a href="selections.html" title="Select, Copy And Paste">copy and paste</a> to put it into the merge output.
</p><p>
Sometimes, when a line is removed either by automatic merge or by editing
and no other lines remain in that group, then the text &lt;No src line&gt;
will appear in that line. This is just a placeholder for the group for
when you might change your mind and select some source again. This text won't
appear in the saved file or in any selections you want to copy and paste.
</p><p>
The text "&lt;Merge Conflict&gt;" will appear in the clipboard if you
copy and paste some text containing such a line. But still be careful to
do so.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2564761"></a>Choosing Input A, B, or C for All Conflicts</h3></div></div></div><p>
The normal merge will start by solving simple conflicts automatically.
But the "Merge"-menu provides some actions for other common needs.
If you have to select the same source for most conflicts, then you can
choose "A", "B" or "C" everywhere, or only for the remaining unsolved
conflicts, or for unsolved white space conflicts. If you want to decide every
single delta yourself, you can "Set deltas to conflicts". Or if you want to
return to the automatic choices of <span class="application">KDiff3</span> then select
"Automatically solve simple conflicts". <span class="application">KDiff3</span> then restarts the merge.
For actions that change your previous modifications <span class="application">KDiff3</span> will ask for your
confirmation before proceeding.
</p><p>
Note: When choosing either source for unsolved white space conflicts and
the options "Ignore Numbers" or "Ignore C/C++ Comments" are used then changes in
numbers or comments will be treated like white space too.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="vcskeywordsmergesupport"></a>Automatic Merge of Version Control Keywords and History (Log)</h3></div></div></div><p>
Many version control systems support special keywords in the file. (e.g. "$Date$",
"$Header$", "$Author$", "$Log$" etc.) During the
check-in the version control system (VCS) changes these lines. For instance
"$Date$" will turn into "$Date: 2005/03/22 18:45:01 $". Since this line will
be different in every version of the file, it would require manual interaction
during the merge.
</p><p>
<span class="application">KDiff3</span> offers automatic merge for these items. For simple lines that match the
"Auto merge regular expression"-option in all input-files <span class="application">KDiff3</span> will choose
the line from B or - if available - from C. (Additionally it is necessary that the lines
in question line up in the comparison and the previous line contains no conflict.)
This auto merge can either be run immediately after a merge starts (activate the option
"Run regular expression auto merge on merge start") or later via the merge
menu "Run Regular Expression Auto Merge".
</p><p>
Automatic merge for version control history (also called "log") is also supported.
The history automerge can either run immediately when the merge starts by activating the
option "Merge version control history on merge start" or later via the merge menu
"Automatically Solve History Conflicts".
</p><p>
Usually the version control history begins with a line containing the keyword "$Log$".
This must be matched by the "History start regular expression"-option.
<span class="application">KDiff3</span> detects which subsequent lines are in the history by analysing the leading characters
that came before the "$Log$"-keyword. If the same "leading comment"-characters also appears in the following
lines, then they are also included in the history.
</p><p>
During each check-in the VCS writes a unique line specifying version-, date- and time-information
followed by lines with user comments.
These lines form one history-entry. This history section grows with every check-in and the
most recent entries appear at the top (after the history start line).
</p><p>
When for parallel development two or more developers check-in a branch of the file then
the merge history will contain several entries that appear as conflicts during the merge
of the branches. Since merging these can become very tedious, <span class="application">KDiff3</span> offers support with two
possible strategies: Just insert the history information from both contributors at the top
or sort the history information by a user defined key.
</p><p>
The just-insert-all-entries-method is easier to configure. <span class="application">KDiff3</span> just needs a method to
detect, which lines belong to one history entry. Most VCS insert an empty line after each
history entry. If there are no other empty lines, this is a sufficient criterion for <span class="application">KDiff3</span>.
Just set an empty "History entry start regular expression". If the empty line criterion
isn't sufficient, you can specify a regular expression to detect the history entry start.
</p><p>
Note that <span class="application">KDiff3</span> will remove duplicate history entrys. If a history entry appeared several times
in the history of a input file, only one entry will remain in the output.
</p><p>
If you want to sort the history, then you have to specify how the sort key should be built.
Use parentheses in the "History entry start regular expression" to group parts of the regular
expression that should later be used for the sort key.
Then specify the "History entry start sort key order" specifying a comma "," separated list of
numbers referring to the position of the group in the regular expression.
</p><p>
Because this is not so easy to get right immediately, you are able to test and improve
the regular expressions and key-generation in a dedicated dialog by pressing the
"Test your regular expressions"-button.
</p><p>Example: Assume a history that looks like this:
<pre class="screen">
/**************************************************************************
** HISTORY: $Log: \toms_merge_main_view\MyApplication\src\complexalgorithm.cpp $
**
** \main\integration_branch_12 2 Apr 2001 10:45:41 tom
** Merged branch simon_branch_15.
**
** \main\henry_bugfix_branch_7\1 30 Mar 2001 19:22:05 henry
** Improved the speed for subroutine convertToMesh().
** Fixed crash.
**************************************************************************/
</pre>
The history start line matches the regular expression ".*\$Log.*\$.*". Then follow
the history entries.
</p><p>
The line with the "$Log$"-keyword begins with two "*" after which follows a space.
<span class="application">KDiff3</span> uses the first non-white-space string as "leading comment" and assumes that
the history ends in the first line without this leading comment. In this example the
last line ends with a string that also starts with two "*", but instead of a space
character more "*" follow. Hence this line ends the history.
</p><p>
If history sorting isn't required then the history entry start line regular expression
could look like this. (This line is split in two because it wouldn't fit otherwise.)
<pre class="screen">
\s*\\main\\\S+\s+[0-9]+ (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)
[0-9][0-9][0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\s+.*
</pre>
For details about regular expressions please see the
<a href="http://doc.trolltech.com/3.3/qregexp.html#details" target="_top">regular expression documentation by Trolltech</a>.
Note that "\s" (with lowercase "s") matches any white space and "\S" (with uppercase "S") matches any non-white-space.
In our example the history entry start contains first the version info with reg. exp. "\\main\\\S+", the date consisting of day "[0-9]+", month "(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)" and year "[0-9][0-9][0-9][0-9]", the time "[0-9][0-9]:[0-9][0-9]:[0-9][0-9]" and finally the developers login name ".*".
</p><p>
Note that the "leading comment"-characters (in the example "**") will already be removed by <span class="application">KDiff3</span>
before trying to match, hence the regular expression begins with a match for none or more white-space characters "\s*".
Because comment characters can differ in each file (e.g. C/C++ uses other comment characters than a Perl script)
<span class="application">KDiff3</span> takes care of the leading comment characters and you should not specify them in the regular expression.
</p><p>
If you require a sorted history. Then the sortkey must be calculated. For this the
relevant parts in the regular expression must be grouped by parentheses.
(The extra parentheses can also stay in if history sorting is disabled.)
<pre class="screen">
\s*\\main\\(\S+)\s+([0-9]+) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)
([0-9][0-9][0-9][0-9]) ([0-9][0-9]:[0-9][0-9]:[0-9][0-9])\s+(.*)
</pre>
The parentheses now contain 1. version info, 2. day, 3. month, 4. year, 5. time, 6. name.
But if we want to sort by date and time, we need to construct a key with the elements in a different order of appearance:
First the year, followed by month, day, time, version info and name. Hence the sortkey order to specify is "4,3,2,5,1,6".
</p><p>
Because month names aren't good for sorting ("Apr" would be first) <span class="application">KDiff3</span> detects in which order
the month names were given and uses that number instead ("Apr"-&gt;"04").
And if a pure number is found it will be transformed to a 4-digit value with leading zeros for sorting.
Finally the resulting sort key for the first history entry start line will be:
<pre class="screen">
2001 04 0002 10:45:41 integration_branch_12 tom
</pre>
</p><p>
For more information also see <a href="options.html#mergeoptions" title="Merge Settings">Merge Settings</a>.
</p></div></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="interpretinginformation.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="navigation.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Comparing Files And Interpreting The Information In The Input Windows </div><div class="navRight"> Navigation And Editing</div><div class="navCenter"><a accesskey="u" href="documentation.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,49 @@
<html><head><title>Chapter 4. Miscellaneous Topics</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="index.html" title="The KDiff3 Handbook"><link rel="prev" href="other.html" title="Other Functions in Directory Merge Window"><link rel="next" href="kpart.html" title="Using KDiff3 as a KPart"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Miscellaneous Topics</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="other.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="kpart.html">Next</a></div><div class="navCenter"> </div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="misc"></a>Chapter 4. Miscellaneous Topics</h2></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="networktransparency"></a>Networktransparency via KIO</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2569419"></a>KIO-Slaves</h3></div></div></div><p>
KDE supports networktransparency via KIO-slaves. <span class="application">KDiff3</span> uses this
for reading input files and for scanning directories.
This means that you can specify files and directories on local and
remote resources via URLs.
</p><p>
Example:
</p><p>
<pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> test.cpp ftp://ftp.faraway.org/test.cpp
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> tar:/home/hacker/archive.tar.gz/dir ./dir
</pre>
</p><p>The first line compares a local file with a file on an FTP-server. The second line
compares a directory within an compressed archive with a local directory.
</p><p>
Other KIO-slaves that are interesting are:
</p><div class="itemizedlist"><ul type="disc"><li><p>Files from the WWW (http:),</p></li><li><p>Files from the FTP (ftp:),</p></li><li><p>Encrypted file transfer (fish:, sftp:),</p></li><li><p>Windows-ressources (smb:),</p></li><li><p>Local files (file:),</p></li></ul></div><p>
Other things that are possible, but probably less useful are:
</p><div class="itemizedlist"><ul type="disc"><li><p>Man-pages (man:),</p></li><li><p>Info-pages (info:),</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2569517"></a>How To Write URLs</h3></div></div></div><p>
An URL has a different syntax compared with paths for local files and directories.
Some things should be considered:
</p><div class="itemizedlist"><ul type="disc"><li><p>
A path can be relative and can contain "." or "..". This is not possible for URLs
which are always absolute.
</p></li><li><p>
Special characters must be written with "escaping". ("#"-&gt;"%23", space-&gt;"%20", etc.)
E.g. A file with the name "/#foo#" would have the URL "file:/%23foo%23".
</p></li><li><p>
When URLs don't work as expected, try to open them in Konqueror first.
</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2569553"></a>Capabilities of KIO-Slaves</h3></div></div></div><p>
Networktransparency has one drawback: Not all ressources have the same cababilities.
</p><p>
Sometimes this is due to the file system of the server, sometimes due to the protocol.
Here is a short list of restrictions:
</p><div class="itemizedlist"><ul type="disc"><li><p>
Sometimes there is no support for links.
</p></li><li><p>
Or there is no way to distinguish if a link points to a file or a directory; always
assuming a file. (ftp:, sftp:).
</p></li><li><p>
Can't always determine the filesize.
</p></li><li><p>
Limited support for permissions.
</p></li><li><p>
No possibility to modify permissions or modification time, so permissions or time
of a copy will differ from the original. (See the option "Trust the size".)
(To modify permissions or modification time is only possible for local files.)
</p></li></ul></div></div></div></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="other.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="kpart.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Other Functions in Directory Merge Window </div><div class="navRight"> Using <span class="application">KDiff3</span> as a KPart</div><div class="navCenter"><a accesskey="u" href="index.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,38 @@
<html><head><title>Navigation And Editing</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="documentation.html" title="Chapter 2. File Comparison And Merge"><link rel="prev" href="merging.html" title="Merging And The Merge Output Editor Window"><link rel="next" href="selections.html" title="Select, Copy And Paste"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Navigation And Editing</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="merging.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="selections.html">Next</a></div><div class="navCenter">File Comparison And Merge</div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="navigation"></a>Navigation And Editing</h2></div></div></div><p>
Much navigation will be done with the scroll bars and the mouse but
you can also navigate with the keys. If you click into either window then
you can use the cursor buttons left, right, up, down, page up, page down,
home, end, ctrl-home, ctrl-end as you would in other programs. The overview-column
next to the vertical scroll bar of the input files can also be used for
navigating by clicking into it.
</p><p>
You can also use the wheel mouse to scroll up and down.
</p><p>
In the merge output editor you can also use the other keys for editing.
You can toggle between insert and overwrite mode with the insert key. (Default
is insert-mode.)
</p><p>
A left-mouse-button-click into any summary column will synchronise all
windows to show the beginning of the same group of lines (as explained
in section <a href="merging.html#synchronise_views" title="Setting The Current Group And Synchronising Merge And Diff View Position">"Setting The Current Group And Synchronising Merge And Diff View Position"</a>).
</p><p>
The button bar also contains nine navigation buttons with which you can
jump to the current/first/last difference, to the next/previous difference
(ctrl-down/ctrl-up), to the next/previous conflict (ctrl-pgdown/ctrl-pgup),
or to the next/previous unsolved conflict. Note that for <span class="application">KDiff3</span> a "conflict"
that was not automatically solved at the start of the merge stays a "conflict"
even if it is solved. Hence the necessity to distinguish "unsolved conflicts".
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="autoadvance"></a>Auto-Advance</h3></div></div></div><p>
There also is a button "Automatically go to next unsolved conflict after
source selection" (Auto-Advance). If you enable this, then, when one source
is selected, <span class="application">KDiff3</span> will jump to and select the next unsolved conflict
automatically. This can help when you always want to choose one source only.
When you need both sources, or you want to edit after selecting, then you
probably want to switch this off. Before proceeding to the next unsolved conflict
<span class="application">KDiff3</span> shows you the effect of your choice for a short time. This delay is
adjustable in the Diff- &amp; Merge-Settings: You can
specify the "Auto-Advance delay" in milli seconds between 0 and 2000. Hint:
Tired of many clicks? - Use a small Auto-Advance-delay and the shortcuts
Ctrl-1/2/3 to select A/B/C for many conflicts.
</p></div></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="merging.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="selections.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Merging And The Merge Output Editor Window </div><div class="navRight"> Select, Copy And Paste</div><div class="navCenter"><a accesskey="u" href="documentation.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

Binary file not shown.

Binary file not shown.

@ -0,0 +1,23 @@
<html><head><title>Open-Dialog</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="documentation.html" title="Chapter 2. File Comparison And Merge"><link rel="prev" href="documentation.html" title="Chapter 2. File Comparison And Merge"><link rel="next" href="pasteinput.html" title="Paste and Drop Input"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Open-Dialog</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="documentation.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="pasteinput.html">Next</a></div><div class="navCenter">File Comparison And Merge</div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="opendialog"></a>Open-Dialog</h2></div></div></div><p>
Since many input files must be selectable, the program has a special open dialog:
</p><div class="screenshot"><div xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="mediaobject"><hr><img src="open_dialog.png"><hr></div></div><p>
The open dialog allows to edit the filenames by hand, selecting a file
via the file-browser ("File...") or allows to choose recent files from
the drop-down lists. If you open the dialog again, then the current names
still remain there. The third input file is not required. If the
entry for "C" remains empty, then only a two file diff analysis will be
done.
</p><p>
You can also select a directory via "Dir...". If for A a directory is specified
then a directory-comparison/merge starts. If A specifies a file but B, C or
the output specify a directory, then <span class="application">KDiff3</span> uses the filename from A in the
specified directories.
</p><p>
If "Merge" is selected, then the "Output"-line becomes editable. But it
is not required to specify the output filename immediately. You can also
postpone this until saving.
</p><p>
The "Configure..."-button opens the options-dialog, so that you can set
the options before running the analysis.
</p></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="documentation.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="pasteinput.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">File Comparison And Merge </div><div class="navRight"> Paste and Drop Input</div><div class="navCenter"><a accesskey="u" href="documentation.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,138 @@
<html><head><title>Options</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="documentation.html" title="Chapter 2. File Comparison And Merge"><link rel="prev" href="printing.html" title="Printing"><link rel="next" href="preprocessors.html" title="Preprocessor Commands"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Options</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="printing.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="preprocessors.html">Next</a></div><div class="navCenter">File Comparison And Merge</div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="options"></a>Options</h2></div></div></div><p>
Options and the recent-file-list will be saved when you exit the program,
and reloaded when you start it. (Menu Settings-&gt;Configure <span class="application">KDiff3</span> ...)
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2566321"></a>Font</h3></div></div></div><p>
Select a fixed width font. (On some systems this dialog will also
present variable width fonts, but you should not use them.)
</p><div class="variablelist"><dl><dt><span class="term"><span class="emphasis"><em>Italic Font for Deltas:</em></span></span></dt><dd><p> If you select this, then text differences
will be drawn with the italic version of the selected font. If the font
doesn't support italic, then this does nothing.</p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2566353"></a>Colors</h3></div></div></div><div class="variablelist"><dl><dt><span class="term"><span class="emphasis"><em>Foreground color:</em></span></span></dt><dd><p> Usually black. </p></dd><dt><span class="term"><span class="emphasis"><em>Background color:</em></span></span></dt><dd><p> Usually white. </p></dd><dt><span class="term"><span class="emphasis"><em>Diff Background color:</em></span></span></dt><dd><p> Usually light gray. </p></dd><dt><span class="term"><span class="emphasis"><em>Color A:</em></span></span></dt><dd><p> Usually dark blue. </p></dd><dt><span class="term"><span class="emphasis"><em>Color B:</em></span></span></dt><dd><p> Usually dark green. </p></dd><dt><span class="term"><span class="emphasis"><em>Color C:</em></span></span></dt><dd><p> Usually dark magenta. </p></dd><dt><span class="term"><span class="emphasis"><em>Conflict Color:</em></span></span></dt><dd><p> Usually red.</p></dd><dt><span class="term"><span class="emphasis"><em>Current range background color:</em></span></span></dt><dd><p> Usually light yellow.</p></dd><dt><span class="term"><span class="emphasis"><em>Current range diff background color:</em></span></span></dt><dd><p> Usually dark yellow.</p></dd><dt><span class="term"><span class="emphasis"><em>Color for manually selected diff ranges:</em></span></span></dt><dd><p> Usually orange.</p></dd><dt><span class="term"><span class="emphasis"><em>Newest file color in directory comparison:</em></span></span></dt><dd><p> Usually green.</p></dd><dt><span class="term"><span class="emphasis"><em>Oldest file color in directory comparison:</em></span></span></dt><dd><p> Usually red.</p></dd><dt><span class="term"><span class="emphasis"><em>Middle age file color in directory comparison:</em></span></span></dt><dd><p> Usually dark yellow.</p></dd><dt><span class="term"><span class="emphasis"><em>Color for missing files in directory comparison:</em></span></span></dt><dd><p> Usually black.</p></dd></dl></div><p>
Changing the colors for directory comparison will be effective only when starting the next directory comparison.
</p><p>
On systems with only 16 or 256 colors some colors are not available in pure
form. On such systems the "Defaults"-button will choose a pure color.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2566534"></a>Editor Settings</h3></div></div></div><div class="variablelist"><dl><dt><span class="term"><span class="emphasis"><em>Tab inserts spaces:</em></span></span></dt><dd><p> If this is disabled and you press the
tabulator key, a tab-character is inserted, otherwise the appropriate
amount of characters is inserted.</p></dd><dt><span class="term"><span class="emphasis"><em> Tab size:</em></span></span></dt><dd><p> Can be adjusted for your specific needs. Default is 8. </p></dd><dt><span class="term"><span class="emphasis"><em> Auto indentation:</em></span></span></dt><dd><p> When pressing Enter or Return the indentation
of the previous line is used for the new line. </p></dd><dt><span class="term"><span class="emphasis"><em> Auto copy selection:</em></span></span></dt><dd><p> Every selection is immediately copied
to the clipboard when active and you needn't explicitely copy it. </p></dd><dt><span class="term"><span class="emphasis"><em> Line end style:</em></span></span></dt><dd><p> When saving you can select what line
end style you prefer. The default setting is the common choice for the used operating system. </p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="diffoptions"></a>Diff Settings</h3></div></div></div><p>
When comparing files, <span class="application">KDiff3</span> first it tries to match lines that are equal
in all input files. Only during this step it might ignore white space. The
second step compares each line. In this step white space will not be ignored.
Also during the merge white space will not be ignored.
</p><div class="variablelist"><dl><dt><span class="term"><span class="emphasis"><em>Preserve Carriage Return:</em></span></span></dt><dd><p> Some editors (on some systems) save
carriage return '\r' and linefeed '\n'-characters at the end of line, while
others will only save the linefeed '\n'. Usually <span class="application">KDiff3</span> ignores the carriage
return, but then files that don't have equal sizes, look equal in side by
side comparison. When this option is on, then the carriage return characters
are made visible but are treated as white space. This option must be off
during a merge. Default is off.</p></dd><dt><span class="term"><span class="emphasis"><em>Ignore numbers:</em></span></span></dt><dd><p> Default is off. Number characters ('0'-'9', '.', '-')
will be ignored in the first part of the analysis in which the line matching is
done. In the result the differences will be shown nevertheless, but they are treated
as white space.
</p></dd><dt><span class="term"><span class="emphasis"><em>Ignore C/C++ comments:</em></span></span></dt><dd><p> Default is off.
Changes in comments will be treated like changes in white space.
</p></dd><dt><span class="term"><span class="emphasis"><em>Ignore case:</em></span></span></dt><dd><p> Default is off.
Case-differences of characters (like 'A' vs. 'a') will be treated like changes in white space.
</p></dd><dt><span class="term"><span class="emphasis"><em>Preprocessor-Command:</em></span></span></dt><dd><p>
See <a href="preprocessors.html" title="Preprocessor Commands">next section</a>.
</p></dd><dt><span class="term"><span class="emphasis"><em>Line-Matching Preprocessor-Command:</em></span></span></dt><dd><p>
See <a href="preprocessors.html" title="Preprocessor Commands">next section</a>.
</p></dd><dt><span class="term"><span class="emphasis"><em>Try Hard:</em></span></span></dt><dd><p>
Try hard to find an even smaller delta. (Default is on.) This will probably
be effective for complicated and big files. And slow for very big files.
</p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mergeoptions"></a>Merge Settings</h3></div></div></div><div class="variablelist"><dl><dt><span class="term"><span class="emphasis"><em>Auto Advance Delay (ms):</em></span></span></dt><dd><p> When in auto-advance-mode this setting specifies
how long to show the result of the selection before jumping to the next unsolved
conflict.
</p></dd><dt><span class="term"><span class="emphasis"><em>White space 2/3-file merge default:</em></span></span></dt><dd><p>
Automatically solve all white-space conflict by choosing the specified file.
(Default is manual choice.) Useful if white space really isn't important in many files.
If you need this only occasionally better use "Choose A/B/C For All Unsolved Whitespace Conflicts"
in the merge menu. Note that if you enable either "Ignore numbers" or "Ignore C/C++ comments"
then this auto-choice also applies for conflicts in numbers or comments.
</p></dd><dt><span class="term"><span class="emphasis"><em>Auto merge regular expression:</em></span></span></dt><dd><p>
Regular expression for lines where <span class="application">KDiff3</span> should automatically choose one source. See also <a href="merging.html#vcskeywordsmergesupport" title="Automatic Merge of Version Control Keywords and History (Log)">Automatic Merge ...</a>
</p></dd><dt><span class="term"><span class="emphasis"><em>Run regular expression auto merge on merge start:</em></span></span></dt><dd><p>
If activated <span class="application">KDiff3</span> runs the automatic merge using the "Auto merge regular expression" when a merge is started.
</p></dd><dt><span class="term"><span class="emphasis"><em>History start regular expression:</em></span></span></dt><dd><p>
Regular expression for the start of the merge history entry.
Usually this line contains the "$Log$"-keyword.
Default value: ".*\$Log.*\$.*"
</p></dd><dt><span class="term"><span class="emphasis"><em>History entry start regular expression:</em></span></span></dt><dd><p>
A merge history entry consists of several lines.
Specify the regular expression to detect the first line (without the leading comment).
Use parentheses to group the keys you want to use for sorting.
If left empty, then <span class="application">KDiff3</span> assumes that empty lines separate history entries.
See also <a href="merging.html#vcskeywordsmergesupport" title="Automatic Merge of Version Control Keywords and History (Log)">Automatic Merge ...</a>
</p></dd><dt><span class="term"><span class="emphasis"><em>History merge sorting:</em></span></span></dt><dd><p>
Enable version control history sorting.
</p></dd><dt><span class="term"><span class="emphasis"><em>History entry start sort key order:</em></span></span></dt><dd><p>
Each parentheses used in the regular expression for the history start entry
groups a key that can be used for sorting.
Specify the list of keys (that are numbered in order of occurrence
starting with 1) using ',' as separator (e.g. "4,5,6,1,2,3,7").
If left empty, then no sorting will be done.
See also <a href="merging.html#vcskeywordsmergesupport" title="Automatic Merge of Version Control Keywords and History (Log)">Automatic Merge ...</a>
</p></dd><dt><span class="term"><span class="emphasis"><em>Merge version control history on merge start:</em></span></span></dt><dd><p>
If activated <span class="application">KDiff3</span> runs the automatic history merging using aforementioned options when a merge is started.
</p></dd><dt><span class="term"><span class="emphasis"><em>Max number of history entries:</em></span></span></dt><dd><p>
<span class="application">KDiff3</span> truncates the history list after the specified number of entries. Use -1 to avoid truncation. (Default is -1).
</p></dd><dt><span class="term"><span class="emphasis"><em>Test your regular expressions</em></span></span></dt><dd><p>
This button shows a dialog that allows you to improve and test the regular expressions above.
Just copy the respective data from your files into the example lines. The "Match results"
will immediately show whether the match succeeds or not.
The "Sort key result" will display the key used for history merge sorting.
</p></dd><dt><span class="term"><span class="emphasis"><em>Irrelevant merge command:</em></span></span></dt><dd><p>
Specify a command of your own that should be called when <span class="application">KDiff3</span> detects
that for a three file merge the file from B doesn't contribute any
relevant data that isn't already contained in the file from C.
The command is called with the three filenames as parameters.
Data matched by the "Auto merge regular expression" or in the
history isn't considered relevant.
</p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2566994"></a>Directory Merge</h3></div></div></div><p>
These options are concerned with scanning the directory and handling the
merge: See the <a href="dirmergeoptions.html" title="Options for Comparing and Merging Directories">Directory Comparison/Merge
Docs</a> for details.
</p><p>
Yet there is one option here that is also relevant for saving single files:
</p><div class="variablelist"><dl><dt><span class="term"><span class="emphasis"><em>Backup files:</em></span></span></dt><dd><p> When a file is saved and an older version already
exists, then the original version will be renamed with an ".orig" extension.
If an old backup file with ".orig" extension already exists then this will
be deleted without backup.
</p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2567038"></a>Regional and Language Options</h3></div></div></div><div class="variablelist"><dl><dt><span class="term"><span class="emphasis"><em>Language:</em></span></span></dt><dd><p>Adjust the language of the user interface. Changing this option doesn't affect the running program. You have to exit and restart <span class="application">KDiff3</span> so that the language is changed. (This option is not available in the KDE version of <span class="application">KDiff3</span> because the language is adjustable in the global KDE settings.)
</p></dd><dt><span class="term"><span class="emphasis"><em>Use the same encoding for everything:</em></span></span></dt><dd><p> The following encoding options can be adjusted separately for each item or if this option is true, all values will take the first value.
</p></dd><dt><span class="term"><span class="emphasis"><em>Local Encoding:</em></span></span></dt><dd><p>Above the codec-selectors appears a note that tells you what the local encoding is. (This is not adjustable but for your information just in case you don't know your local encoding, but need to select it.)
</p></dd><dt><span class="term"><span class="emphasis"><em>File Encoding for A/B/C:</em></span></span></dt><dd><p> Adjust the file encoding for input files. This has an effect on how the special characters are interpreted. Since you can adjust each codec separately you can even compare and merge files that were saved using different codecs.
</p></dd><dt><span class="term"><span class="emphasis"><em>File Encoding for Merge Output and Saving:</em></span></span></dt><dd><p> When you have edited a file, then you can adjust which encoding will be used when saving to disk.
</p></dd><dt><span class="term"><span class="emphasis"><em>File Encoding for Preprocessor Files:</em></span></span></dt><dd><p>When you define preprocessors then they might not be able to operate on your codec. (e.g.: Your files are 16-bit-unicode and your preprocessor can only take 8-bit-ascii.) With this option you can define the encoding of preprocessor output.
</p></dd><dt><span class="term"><span class="emphasis"><em>Right To Left Language:</em></span></span></dt><dd><p>Some languages are written right to left. When this option is enabled, <span class="application">KDiff3</span> draws the text from right to left in the diff input windows and in the merge output window. Note that if you start <span class="application">KDiff3</span> with the command line option "--reverse" then all layouting will be done right to left too. (This is a feature provided by Qt.) This documentation was written assuming that "Right To Left Language" or reverse layout are disabled. So some references to "left" or "right" must be replaced by their respective counterpart if you use these options.
</p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2567171"></a>Miscellaneous</h3></div></div></div><p>(These options and actions are available in menus or the buttonbar.)</p><div class="variablelist"><dl><dt><span class="term"><span class="emphasis"><em>Show line numbers:</em></span></span></dt><dd><p> You can select if line numbers should be
shown for the input files.</p></dd><dt><span class="term"><span class="emphasis"><em>Show space and tabulator characters for differences:</em></span></span></dt><dd><p> Sometimes
the visible spaces and tabs are disturbing. You can turn this off.</p></dd><dt><span class="term"><span class="emphasis"><em>Show white space:</em></span></span></dt><dd><p> Turn this off to suppress
any highlighting of white-space-only changes in the text or overview-columns.
(Note that this also applies to changes in numbers or comments if the options "Ignore numbers"
or "Ignore C/C++ comments" are active.)</p></dd><dt><span class="term"><span class="emphasis"><em>Overview options:</em></span></span></dt><dd><p>
These choices are only available when you compare three files. In normal mode all
differences are shown in one color-coded overview-column. But sometimes you are
especially interested in the differences between only two of these three files.
Selecting "A vs. B", "A vs. C" or "B vs. C"-overview will show a second overview
column with the required information next to the normal overview.
</p></dd><dt><span class="term"><span class="emphasis"><em>Word wrap diff windows:</em></span></span></dt><dd><p>
Wrap lines when their length would exceed the width of a window.
</p></dd><dt><span class="term"><span class="emphasis"><em>Show Window A/B/C:</em></span></span></dt><dd><p> Sometimes you want to use the space on
the screen better for long lines. Hide the windows that are not important.
(In the Windows-menu.)</p></dd><dt><span class="term"><span class="emphasis"><em>Toggle Split Orientation:</em></span></span></dt><dd><p>
Switch between diff windows shown next to each other (A left of B left of C) or above
each other (A above B above C). This should also help for long lines. (In the Windows-menu.)
</p></dd><dt><span class="term"><span class="emphasis"><em>Start a merge quickly:</em></span></span></dt><dd><p>
Sometimes you are viewing the deltas and decide to merge.
<span class="inlinemediaobject"><img src="merge_current.png"></span>
"Merge current file" in the Directory-menu also works if you only compare
two files. A single click starts the merge and uses the filename of the last
input-file as the default output filename. (When this is used to restart
a merge, then the output filename will be preserved.)</p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="shortcuts"></a>Configuring Keyboard-Shortcuts</h3></div></div></div><p>
Currently only the KDE-version supports user-configurable keyboard-shortcuts.
(Menu Settings-&gt;Configure Shortcuts...)
</p></div></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="printing.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="preprocessors.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Printing </div><div class="navRight"> Preprocessor Commands</div><div class="navCenter"><a accesskey="u" href="documentation.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,33 @@
<html><head><title>Other Functions in Directory Merge Window</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="dirmerge.html" title="Chapter 3. Directory Comparison and Merge with KDiff3"><link rel="prev" href="dirmergeoptions.html" title="Options for Comparing and Merging Directories"><link rel="next" href="misc.html" title="Chapter 4. Miscellaneous Topics"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Other Functions in Directory Merge Window</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="dirmergeoptions.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="misc.html">Next</a></div><div class="navCenter">Directory Comparison and Merge with <span class="application">KDiff3</span></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="other"></a>Other Functions in Directory Merge Window</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2569323"></a>Split/Full Screen Mode</h3></div></div></div><p>
Usually the directory merge list view remains visible while a single file
is compared or merged. With the mouse you can move the the splitter bar that
separates the file list from the text-diff windows. If you don't want this,
you can disable "Split Screen View" in the "Directory"-menu. Then you can
use "Toggle View" in the "Directory"-menu to switch between the file list
and the text-diff view that then occupy the full screen.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2569341"></a>Comparing or Merging a Single File</h3></div></div></div><p>
Probably you will prefer a simple double mouse click on a file in order
to compare it. Nevertheless there also exists an entry in the "Directory"-menu.
You can also directly merge a single file by selecting it and
choosing "Merge current file" in the "Merge"-Menu. On saving the
result, the status will be set to done, and the file will not be merged again
if a directory merge is started.
</p><p>
But note that this status information will be lost when you rerun a directory
scan: "Directory"-menu: "Rescan"
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2569364"></a>Comparing or Merging Files with Different Names</h3></div></div></div><p>
Sometimes you need to compare or merge files with different names (e.g. the current
file and the backup in the same folder).
</p><p>
Select the exact file by clicking onto the icon in the column A, B or C. The first
file selected thus will be marked with an "A", the second and third with "B" and "C"
regardless on what column they are in. Only up to three files can be chosen like this.
</p><p>
Proceed by choosing "Compare Explicitely Selected Files" or "Merge Explicitely
Selected Files" from the "Directory"-menu. For your convenience these menu entries
also appear as context menu when you right-click the last selected file.
</p><p>
The comparison or merge of a file will happen in the same window.
If this method is used for directories a new window will be opened.
</p></div></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="dirmergeoptions.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="misc.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Options for Comparing and Merging Directories </div><div class="navRight"> Miscellaneous Topics</div><div class="navCenter"><a accesskey="u" href="dirmerge.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,20 @@
<html><head><title>Paste and Drop Input</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="documentation.html" title="Chapter 2. File Comparison And Merge"><link rel="prev" href="opendialog.html" title="Open-Dialog"><link rel="next" href="interpretinginformation.html" title="Comparing Files And Interpreting The Information In The Input Windows"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Paste and Drop Input</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="opendialog.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="interpretinginformation.html">Next</a></div><div class="navCenter">File Comparison And Merge</div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="pasteinput"></a>Paste and Drop Input</h2></div></div></div><p>
Sometimes you want to compare parts of a text that is not an own file. <span class="application">KDiff3</span> also
allows you to paste text from the clipboard into the diff input window that has the focus.
The diff analysis happens immediately then.
In the open dialog you need not specify files then, but just close it via "Cancel".
</p><p>
You can also use drag and drop: Drag a file from a file manager
or selected text from an editor and drop it onto a diff input window.
</p><p>
What's the idea? Sometimes a file contains two similar functions, but checking how similar
they really are is a big effort if you first must create two files and then load them. Now
you can simply copy, paste and compare the relevant sections.
</p><p>
Note: Currently you cannot drag anything from <span class="application">KDiff3</span>. Only dropping in the diff input
is supported.
</p><p>
Warning: Some editors still interpret the drag and drop into another program like cut
(instead of copy) and paste. Your original data might be lost then.
</p></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="opendialog.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="interpretinginformation.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Open-Dialog </div><div class="navRight"> Comparing Files And Interpreting The Information In The Input Windows</div><div class="navCenter"><a accesskey="u" href="documentation.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,202 @@
<html><head><title>Preprocessor Commands</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="documentation.html" title="Chapter 2. File Comparison And Merge"><link rel="prev" href="options.html" title="Options"><link rel="next" href="dirmerge.html" title="Chapter 3. Directory Comparison and Merge with KDiff3"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Preprocessor Commands</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="options.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="dirmerge.html">Next</a></div><div class="navCenter">File Comparison And Merge</div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="preprocessors"></a>Preprocessor Commands</h2></div></div></div><p>
<span class="application">KDiff3</span> supports two preprocessor options.
</p><p>
<div class="variablelist"><dl><dt><span class="term"><span class="emphasis"><em>Preprocessor-Command:</em></span></span></dt><dd><p>
When any file is read, it will be piped through this external command.
The output of this command will be visible instead of the original file.
You can write your own preprocessor that fulfills your specific needs.
Use this to cut away disturbing parts of the file, or to automatically
correct the indentation etc.
</p></dd><dt><span class="term"><span class="emphasis"><em>Line-Matching Preprocessor-Command:</em></span></span></dt><dd><p>
When any file is read, it will be piped through this external command. If
a preprocessor-command (see above) is also specified, then the output of the
preprocessor is the input of the line-matching preprocessor.
The output will only be used during the line matching phase of the analysis.
You can write your own preprocessor that fulfills your specific needs.
Each input line must have a corresponding output line.
</p></dd></dl></div>
</p><p>
The idea is to allow the user greater flexibility while configuring the diff-result.
But this requires an external program, and many users don't want to write one themselves.
The good news is that very often <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> or <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">perl</strong></span></span>
will do the job.
</p><p>Example: Simple testcase: Consider file a.txt (6 lines):
<pre class="screen">
aa
ba
ca
da
ea
fa
</pre>
And file b.txt (3 lines):
<pre class="screen">
cg
dg
eg
</pre>
Without a preprocessor the following lines would be placed next to each other:
<pre class="screen">
aa - cg
ba - dg
ca - eg
da
ea
fa
</pre>
This is probably not wanted since the first letter contains the actually interesting information.
To help the matching algorithm to ignore the second letter we can use a line matching preprocessor
command, that replaces 'g' with 'a':
<pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> 's/g/a/'
</pre>
With this command the result of the comparison would be:
<pre class="screen">
aa
ba
ca - cg
da - dg
ea - eg
fa
</pre>
Internally the matching algorithm sees the files after running the line matching preprocessor,
but on the screen the file is unchanged. (The normal preprocessor would change the data also on
the screen.)
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sedbasics"></a><span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> Basics</h3></div></div></div><p>
This section only introduces some very basic features of <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span>. For more
information see <a href="info:/sed" target="_top">info:/sed</a> or
<a href="http://www.gnu.org/software/sed/manual/html_mono/sed.html" target="_top">
http://www.gnu.org/software/sed/manual/html_mono/sed.html</a>.
A precompiled version for Windows can be found at <a href="http://unxutils.sourceforge.net" target="_top">
http://unxutils.sourceforge.net</a>.
Note that the following examples assume that the <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span>-command is in some
directory in the PATH-environment variable. If this is not the case, you have to specify the full absolute
path for the command.
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Also note that the following examples use the single quotation mark (') which won't work for Windows.
On Windows you should use the double quotation marks (") instead.</p></div><p>
In this context only the <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span>-substitute-command is used:
<pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> 's/<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>REGEXP</code></em></span>/<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>REPLACEMENT</code></em></span>/<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>FLAGS</code></em></span>'
</pre>
Before you use a new command within <span class="application">KDiff3</span>, you should first test it in a console.
Here the <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">echo</strong></span></span>-command is useful. Example:
<pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">echo</strong></span></span> abrakadabra | <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> 's/a/o/'
-&gt; obrakadabra
</pre>
This example shows a very simple sed-command that replaces the first occurance
of "a" with "o". If you want to replace all occurances then you need the "g"-flag:
<pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">echo</strong></span></span> abrakadabra | <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> 's/a/o/g'
-&gt; obrokodobro
</pre>
The "|"-symbol is the pipe-command that transfers the output of the previous
command to the input of the following command. If you want to test with a longer file
then you can use <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">cat</strong></span></span> on Unix-like systems or <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">type</strong></span></span>
on Windows-like systems. <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> will do the substitution for each line.
<pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">cat</strong></span></span> <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>filename</code></em></span> | <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>options</code></em></span>
</pre>
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sedforkdiff3"></a>Examples For <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span>-Use In <span class="application">KDiff3</span></h3></div></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2567628"></a>Ignoring Other Types Of Comments</h4></div></div></div><p>
Currently <span class="application">KDiff3</span> understands only C/C++ comments. Using the
Line-Matching-Preprocessor-Command you can also ignore
other types of comments, by converting them into C/C++-comments.
Example: To ignore comments starting with "#", you would like to convert them
to "//". Note that you also must enable the "Ignore C/C++-Comments" option to get
an effect. An appropriate Line-Matching-Preprocessor-Command would be:
<pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> 's/#/\/\//'
</pre>
Since for <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> the "/"-character has a special meaning, it is necessary to place the
"\"-character before each "/" in the replacement-string. Sometimes the "\" is required
to add or remove a special meaning of certain characters. The single quotation marks (') before
and after the substitution-command are important now, because otherwise the shell will
try to interpret some special characters like '#', '$' or '\' before passing them to
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span>. <span class="emphasis"><em>Note that on Windows you will need the double quotation marks (") here. Windows
substitutes other characters like '%', so you might have to experiment a little bit.</em></span>
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2567680"></a>Caseinsensitive Diff</h4></div></div></div><p>
Use the following Line-Matching-Preprocessor-Command to convert all input to uppercase:
<pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> 's/\(.*\)/\U\1/'
</pre>
Here the ".*" is a regular expression that matches any string and in this context matches
all characters in the line.
The "\1" in the replacement string refers to the matched text within the first pair of "\(" and "\)".
The "\U" converts the inserted text to uppercase.
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2567704"></a>Ignoring Version Control Keywords</h4></div></div></div><p>
CVS and other version control systems use several keywords to insert automatically
generated strings (<a href="info:/cvs/Keyword%20substitution" target="_top">info:/cvs/Keyword substitution</a>).
All of them follow the pattern "$KEYWORD generated text$". We now need a
Line-Matching-Preprocessor-Command that removes only the generated text:
<pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> 's/\$\(Revision\|Author\|Log\|Header\|Date\).*\$/\$\1\$/'
</pre>
The "\|" separates the possible keywords. You might want to modify this list
according to your needs.
The "\" before the "$" is necessary because otherwise the "$" matches the end of the line.
</p><p>
While experimenting with <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> you might come to understand and even like
these regular expressions. They are useful because there are many other programs that also
support similar things.
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2567750"></a>Ignoring Numbers</h4></div></div></div><p>
Ignoring numbers actually is a built-in option. But as another example, this is how
it would look as a Line-Matching-Preprocessor-command.
<pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> 's/[0123456789.-]//g'
</pre>
Any character within '[' and ']' is a match and will be replaced with nothing.
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2567772"></a>Ignoring Certain Columns</h4></div></div></div><p>
Sometimes a text is very strictly formatted, and contains columns that you always want to ignore, while there are
other columns you want to preserve for analysis. In the following example the first five columns (characters) are
ignored, the next ten columns are preserved, then again five columns are ignored and the rest of the line is preserved.
<pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> 's/.....\(..........\).....\(.*\)/\1\2/'
</pre>
Each dot '.' matches any single character. The "\1" and "\2" in the replacement string refer to the matched text within the first
and second pair of "\(" and "\)" denoting the text to be preserved.
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2567800"></a>Combining Several Substitutions</h4></div></div></div><p>
Sometimes you want to apply several substitutions at once. You can then use the
semicolon ';' to separate these from each other. Example:
<pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">echo</strong></span></span> abrakadabra | <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> 's/a/o/g;s/\(.*\)/\U\1/'
-&gt; OBROKODOBRO
</pre>
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2567827"></a>Using <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">perl</strong></span></span> instead of <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span></h4></div></div></div><p>
Instead of <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> you might want to use something else like
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">perl</strong></span></span>.
<pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">perl</strong></span></span> -p -e 's/<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>REGEXP</code></em></span>/<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>REPLACEMENT</code></em></span>/<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>FLAGS</code></em></span>'
</pre>
But some details are different in <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">perl</strong></span></span>. Note that where
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> needed "\(" and "\)" <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">perl</strong></span></span>
requires the simpler "(" and ")" without preceding '\'. Example:
<pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">sed</strong></span></span> 's/\(.*\)/\U\1/'
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">perl</strong></span></span> -p -e 's/(.*)/\U\1/'
</pre>
</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2567900"></a>Order Of Preprocessor Execution</h3></div></div></div><p>
The data is piped through all internal and external preprocessors in the
following order:
</p><div class="itemizedlist"><ul type="disc"><li><p>Normal preprocessor,</p></li><li><p>Line-Matching-Preprocessor,</p></li><li><p>Ignore case (conversion to uppercase),</p></li><li><p>Detection of C/C++ comments,</p></li><li><p>Ignore numbers,</p></li><li><p>Ignore white space</p></li></ul></div><p>
The data after the normal preprocessor will be preserved for display and merging. The
other operations only modify the data that the line-matching-diff-algorithm sees.
</p><p>
In the rare cases where you use a normal preprocessor note that
the line-matching-preprocessor sees the output of the normal preprocessor as input.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2567963"></a>Warning</h3></div></div></div><p>
The preprocessor-commands are often very useful, but as with any option that modifies
your texts or hides away certain differences automatically, you might accidentally overlook
certain differences and in the worst case destroy important data.
</p><p>
For this reason during a merge if a normal preprocessor-command is being used <span class="application">KDiff3</span>
will tell you so and ask you if it should be disabled or not.
But it won't warn you if a Line-Matching-Preprocessor-command is active. The merge will not complete until
all conflicts are solved. If you disabled "Show White Space" then the differences that
were removed with the Line-Matching-Preprocessor-command will also be invisible. If the
Save-button remains disabled during a merge (because of remaining conflicts), make sure to enable
"Show White Space". If you don't wan't to merge these less important differences manually
you can select "Choose [A|B|C] For All Unsolved White space Conflicts" in the Merge-menu.
</p></div></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="options.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="dirmerge.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Options </div><div class="navRight"> Directory Comparison and Merge with <span class="application">KDiff3</span></div><div class="navCenter"><a accesskey="u" href="documentation.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,20 @@
<html><head><title>Printing</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="documentation.html" title="Chapter 2. File Comparison And Merge"><link rel="prev" href="find.html" title="Finding Strings"><link rel="next" href="options.html" title="Options"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Printing</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="find.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="options.html">Next</a></div><div class="navCenter">File Comparison And Merge</div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="printing"></a>Printing</h2></div></div></div><p>
<span class="application">KDiff3</span> supports printing for textfile differences. The "Print..."-command (Ctrl-P)
in the File-menu opens a dialog that allows you to select the printer and to adjust
other options.
</p><p>
There are several possibilities to adjust the range. Due to different printing
dialogs on different operating systems, the method to achieve certain range selections varies.
</p><div class="variablelist"><dl><dt><span class="term">All:</span></dt><dd><p>Print everything.</p></dd><dt><span class="term">Current:</span></dt><dd><p>Print a page starting at the first visible line in the window.
(On systems without this option this can be achived by specifying page number 10000 for printing.)</p></dd><dt><span class="term">Selection:</span></dt><dd><p>
Before choosing to print select text with the mouse (like for copy and paste)
in one of the diff input windows to define the start and end line. If no text
in one of the diff input windows was selected, then this won't be an available
choice. (On systems without this option this can be achived by specifying page
number 9999 for printing.)</p></dd><dt><span class="term">Range:</span></dt><dd><p>Specify the first and last page.
</p></dd></dl></div><p>
Other important options for printing will be taken from the normal options:
</p><div class="itemizedlist"><ul type="disc"><li><p>Font, font size</p></li><li><p>Show line numbers</p></li><li><p>Word wrap</p></li><li><p>Colors</p></li><li><p>etc.</p></li></ul></div><p>
Landscape formatting is also recommended for printing.
</p></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="find.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="options.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Finding Strings </div><div class="navRight"> Options</div><div class="navCenter"><a accesskey="u" href="documentation.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,10 @@
<html><head><title>Requirements</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="installation.html" title="Appendix A. Installation"><link rel="prev" href="installation.html" title="Appendix A. Installation"><link rel="next" href="compilation.html" title="Compilation and Installation"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Requirements</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="installation.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="compilation.html">Next</a></div><div class="navCenter">Installation</div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="requirements"></a>Requirements</h2></div></div></div><p>
In order to successfully use all features of <span class="application">KDiff3</span>, you need <span class="acronym">KDE</span> &gt;3.1.
</p><p>
For information about how to run <span class="application">KDiff3</span> on other platforms without KDE please see the
<a href="http://kdiff3.sourceforge.net" target="_top">homepage</a>.
</p><p>
You can find a list of changes at <a href="http://kdiff3.sourceforge.net/ChangeLog" target="_top">http://kdiff3.sourceforge.net/ChangeLog</a>
or in the "ChangeLog"-file of the source package.
</p></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="installation.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="compilation.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Installation </div><div class="navRight"> Compilation and Installation</div><div class="navCenter"><a accesskey="u" href="installation.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,16 @@
<html><head><title>Saving</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="documentation.html" title="Chapter 2. File Comparison And Merge"><link rel="prev" href="selections.html" title="Select, Copy And Paste"><link rel="next" href="find.html" title="Finding Strings"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Saving</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="selections.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="find.html">Next</a></div><div class="navCenter">File Comparison And Merge</div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="saving"></a>Saving</h2></div></div></div><p>
Saving will only be allowed, when all conflicts were solved. If the file
already exists and the "Backup files"-option is enabled then the existing
file will be renamed with an ".orig"-extension, but if such a file exists
it will be deleted. When you exit or start another diff-analysis and data
wasn't saved yet, then <span class="application">KDiff3</span> will ask if you want to save, cancel or proceed
without saving. (<span class="application">KDiff3</span> does not catch any signals. So if you "kill" <span class="application">KDiff3</span>
then your data will be lost.)
</p><p>
Line endings are saved according to the normal method on the underlying
operating system. For Unices each line ends with an linefeed-character "\n",
while for Win32-based systems each line ends with a carriage-return + a linefeed
"\r\n". <span class="application">KDiff3</span> does not preserve the line-endings of the input files, which
also means that you shouldn't use <span class="application">KDiff3</span> with binary files.
</p></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="selections.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="find.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Select, Copy And Paste </div><div class="navRight"> Finding Strings</div><div class="navCenter"><a accesskey="u" href="documentation.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

Binary file not shown.

Binary file not shown.

@ -0,0 +1,15 @@
<html><head><title>Screenshots and Features</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="introduction.html" title="Chapter 1. Introduction"><link rel="prev" href="introduction.html" title="Chapter 1. Introduction"><link rel="next" href="features.html" title="More Features"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Screenshots and Features</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="introduction.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="features.html">Next</a></div><div class="navCenter">Introduction</div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="screenshots"></a>Screenshots and Features</h2></div></div></div><p>This screenshot shows the difference between two text files</p><p>(Using an early version of <span class="application">KDiff3</span>):</p><div class="screenshot"><div xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="mediaobject"><hr><img src="screenshot_diff.png"><hr></div></div><p>
3-way-merging is fully supported. This is useful if two people change code independently.
The original file (the base) is used to help <span class="application">KDiff3</span> to automatically select the correct
changes.
The merge-editor below the diff-windows allows you to solve conflicts, while showing you the output you will get.
You can even edit the output.
This screenshot shows three input files being merged:
</p><p>
<div class="screenshot"><div xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="mediaobject"><hr><img src="screenshot_merge.png"><hr></div></div>
</p><p><a name="dirmergebigscreenshot"></a><span class="application">KDiff3</span> also helps you to compare and merge complete directories.
This screenshot shows <span class="application">KDiff3</span> during a directory merge:
</p><p>
<div class="screenshot"><div xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="mediaobject"><hr><img src="dirmergebig.png"><hr></div></div>
</p></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="introduction.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="features.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Introduction </div><div class="navRight"> More Features</div><div class="navCenter"><a accesskey="u" href="introduction.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,34 @@
<html><head><title>Select, Copy And Paste</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="documentation.html" title="Chapter 2. File Comparison And Merge"><link rel="prev" href="navigation.html" title="Navigation And Editing"><link rel="next" href="saving.html" title="Saving"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Select, Copy And Paste</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="navigation.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="saving.html">Next</a></div><div class="navCenter">File Comparison And Merge</div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="selections"></a>Select, Copy And Paste</h2></div></div></div><p>
The input windows don't show a cursor, so selections must be made
with the mouse by clicking with the left mouse button at the start, holding
down the mousebutton and moving to the end, where you release the mouse
button again. You can also select a word by double clicking it. In the merge
output editor you can also select via the keyboard by holding the "shift"-button
and navigation with the cursor keys.
</p><p>
If the selection exceeds the visible range you can move the mouse over the
window borders which causes <span class="application">KDiff3</span> to scroll in that direction.
</p><p>
For very large selections you can also use the navigation keys while holding down
the mouse. E.g. use page up and page down to quickly go to a certain position. At the
end position release the mouse button.
</p><p>
In order to select everything in the current window use menu "Edit"-&gt;"Select All" (Ctrl-A).
</p><p>
To copy to the clipboard you must press the "Copy"-button (Ctrl-C or Ctrl-Insert).
But there exists an option "Auto Copy Selection". If this is enabled,
then whatever you select is copied immediately and you don't need to explicitely
copy. But pay attention when using this because the contents of the clipboard
might then be destroyed accidentally.
</p><p>
"Cut" (Ctrl-X or Shift-Delete) copies to the clipboard and deletes the
selected text.
</p><p>
"Paste" (Ctrl-V or Shift-Insert) inserts the text in the clipboard at the
cursorposition or over the current selection.
If you paste to either diff input window the contents of the clipboard will
be shown in that window and the comparison will restart immediately. This is
useful if you want to quickly grab a piece of text from somewhere and
compare it with something else without first creating files.
</p></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="navigation.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="saving.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Navigation And Editing </div><div class="navRight"> Saving</div><div class="navCenter"><a accesskey="u" href="documentation.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

@ -0,0 +1,22 @@
<html><head><title>Starting Directory Comparison Or Merge</title><link rel="stylesheet" href="help:/common/kde-default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.67.2"><meta name="keywords" content="KDE, kdeextragear, kdiff3, diff, merge, CVS, triplediff, compare, files, directories, version control, three-way-merge, in-line-differences, synchronise, kpart, kio, networktransparent, editor, white space, comments"><link rel="start" href="index.html" title="The KDiff3 Handbook"><link rel="up" href="dirmerge.html" title="Chapter 3. Directory Comparison and Merge with KDiff3"><link rel="prev" href="dirmerge.html" title="Chapter 3. Directory Comparison and Merge with KDiff3"><link rel="next" href="dirmergevisible.html" title="Directory Merge Visible Information"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.13 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div style="background-image: url(help:/common/top-middle.png); width: 100%; height: 131px;"><div style="position: absolute; right: 0px;"><img src="help:/common/top-right-konqueror.png" style="margin: 0px" alt=""></div><div style="position: absolute; top: 25px; right: 100px; text-align: right; font-size: xx-large; font-weight: bold; text-shadow: #fff 0px 0px 5px; color: #444">Starting Directory Comparison Or Merge</div></div><div style="margin-top: 20px; background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="dirmerge.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="dirmergevisible.html">Next</a></div><div class="navCenter">Directory Comparison and Merge with <span class="application">KDiff3</span></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="startingdirmerge"></a>Starting Directory Comparison Or Merge</h2></div></div></div><p>
This is very similar to the single file merge and comparison. You just
have to specify directories on the command line or in the file-open
dialog.
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2568158"></a>Compare/Merge two directories: </h3></div></div></div><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>dir1 dir2</code></em></span>
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>dir1 dir2</code></em></span> -o <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>destdir</code></em></span>
</pre><p>
If no destination directory is specified, then <span class="application">KDiff3</span> will use <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>dir2</code></em></span>.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2568202"></a>Compare/Merge three directories: </h3></div></div></div><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>dir1 dir2 dir3</code></em></span>
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span><strong class="command">kdiff3</strong></span></span> <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>dir1 dir2 dir3</code></em></span> -o <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>destdir</code></em></span>
</pre><p>
When three directories are merged then <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>dir1</code></em></span>
is used as the base for the merge.
If no destination directory is specified, then <span class="application">KDiff3</span> will use <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"><em class="replaceable"><code>dir3</code></em></span>
as the destination directory for the merge.
</p><p>
Note that only the comparison starts automatically, not the merge. For this you first must
select a menu entry or the key F7. (More details later.)
</p></div></div><div style="background-color: #white; color: black; margin-top: 20px; margin-left: 20px; margin-right: 20px;"><div style="position: absolute; left: 20px;"><a accesskey="p" href="dirmerge.html">Prev</a></div><div style="position: absolute; right: 20px;"><a accesskey="n" href="dirmergevisible.html">Next</a></div><div align="center"><a accesskey="h" href="index.html">Home</a></div></div><div style="background-color: #white; color: black; margin-left: 20px; margin-right: 20px;"><div class="navLeft">Directory Comparison and Merge with <span class="application">KDiff3</span> </div><div class="navRight"> Directory Merge Visible Information</div><div class="navCenter"><a accesskey="u" href="dirmerge.html">Up</a></div></div><br><br><div class="bannerBottom" style="background-image: url(help:/common/bottom-middle.png); background-repeat: x-repeat; width: 100%; height: 100px; bottom:0px;"><div class="BannerBottomRight"><img src="help:/common/bottom-right.png" style="margin: 0px" alt=""></div><div class="bannerBottomLeft"><img src="help:/common/bottom-left.png" style="margin: 0px;" alt=""></div><div id="comments" style="position:relative; top: 5px; left: 1em; height:85px; width: 50%; color: #cfe1f6"><p>Would you like to make a comment or contribute an update to this page?<br>
Send feedback to the <a href="mailto:kde-docs@kdemail.net" style="background:transparent; color:#cfe1f6; text-decoration: underline;">KDE Docs Team</a></p></div></div></body></html>

Binary file not shown.

Binary file not shown.

@ -0,0 +1,4 @@
KDE_DOCS = kdiff3
KDE_LANG = es

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,4 @@
KDE_DOCS = kdiff3
KDE_LANG = et

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,4 @@
KDE_DOCS = kdiff3
KDE_LANG = fr

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,4 @@
KDE_DOCS = kdiff3
KDE_LANG = it

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,4 @@
KDE_DOCS = kdiff3
KDE_LANG = nl

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,4 @@
KDE_DOCS = kdiff3
KDE_LANG = pt

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,4 @@
KDE_DOCS = kdiff3
KDE_LANG = sv

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,191 @@
<?xml version = '1.0'?>
<kdevelop>
<general>
<author>Joachim Eibl</author>
<email>joachim dot eibl at gmx dot de</email>
<version>0.9.92</version>
<projectmanagement>KDevKDEAutoProject</projectmanagement>
<primarylanguage>C++</primarylanguage>
<keywords>
<keyword>C++</keyword>
<keyword>Code</keyword>
<keyword>Qt</keyword>
<keyword>KDE</keyword>
</keywords>
<projectdirectory>.</projectdirectory>
<absoluteprojectpath>false</absoluteprojectpath>
<description/>
<ignoreparts/>
<secondaryLanguages/>
</general>
<kdevautoproject>
<general>
<activetarget>src/kdiff3</activetarget>
<useconfiguration>debug</useconfiguration>
</general>
<run>
<mainprogram>/daten/home/joachim/kdiff3-0.9.92a/debug/src/kdiff3</mainprogram>
<directoryradio>custom</directoryradio>
<customdirectory>/daten/home/joachim/kdiff3_testdir/</customdirectory>
<programargs/>
<terminal>true</terminal>
<autocompile>true</autocompile>
<envvars>
<envvar value="/home/joachim/kdiff3-0.9.92a/debug/src/.libs/libkdiff3part.so" name="LD_PRELOAD" />
</envvars>
</run>
<configurations>
<optimized>
<builddir>optimized</builddir>
<ccompiler>GccOptions</ccompiler>
<cxxcompiler>GppOptions</cxxcompiler>
<f77compiler>G77Options</f77compiler>
<cxxflags>-O2 -g0</cxxflags>
</optimized>
<debug>
<configargs>--enable-debug=full --prefix=/opt/kde3</configargs>
<builddir>debug</builddir>
<ccompiler>kdevgccoptions</ccompiler>
<cxxcompiler>kdevgppoptions</cxxcompiler>
<f77compiler>kdevpgf77options</f77compiler>
<cxxflags>-O0</cxxflags>
<topsourcedir/>
<cppflags/>
<ldflags/>
<ccompilerbinary/>
<cxxcompilerbinary/>
<f77compilerbinary/>
<cflags/>
<f77flags/>
<envvars/>
</debug>
</configurations>
<make>
<envvars>
<envvar value="1" name="WANT_AUTOCONF_2_5" />
<envvar value="1" name="WANT_AUTOMAKE_1_6" />
</envvars>
<abortonerror>true</abortonerror>
<numberofjobs>1</numberofjobs>
<dontact>false</dontact>
<makebin/>
<prio>0</prio>
<runmultiplejobs>false</runmultiplejobs>
</make>
</kdevautoproject>
<kdevfileview>
<groups>
<group pattern="*.cpp;*.cxx;*.h" name="Sources" />
<group pattern="*.ui" name="User Interface" />
<group pattern="*.png" name="Icons" />
<group pattern="*.po;*.ts" name="Translations" />
<group pattern="*" name="Others" />
<hidenonprojectfiles>false</hidenonprojectfiles>
<hidenonlocation>false</hidenonlocation>
</groups>
<tree>
<hidepatterns></hidepatterns>
<hidenonprojectfiles>false</hidenonprojectfiles>
<showvcsfields>true</showvcsfields>
</tree>
</kdevfileview>
<kdevdoctreeview>
<ignoretocs>
<toc>gtk</toc>
<toc>gnustep</toc>
<toc>python</toc>
<toc>php</toc>
<toc>perl</toc>
</ignoretocs>
<projectdoc>
<userdocDir>doc/en/</userdocDir>
<apidocDir>debug/</apidocDir>
</projectdoc>
<ignoreqt_xml/>
<ignoredoxygen/>
<ignorekdocs/>
<ignoredevhelp/>
</kdevdoctreeview>
<kdevdebugger>
<general>
<dbgshell>libtool</dbgshell>
<programargs/>
<gdbpath/>
<configGdbScript/>
<runShellScript/>
<runGdbScript/>
<breakonloadinglibs>true</breakonloadinglibs>
<separatetty>false</separatetty>
<floatingtoolbar>false</floatingtoolbar>
</general>
<display>
<staticmembers>false</staticmembers>
<demanglenames>true</demanglenames>
<outputradix>10</outputradix>
</display>
</kdevdebugger>
<kdevfilecreate>
<filetypes/>
<useglobaltypes>
<type ext="ui" />
<type ext="cpp" />
<type ext="h" />
</useglobaltypes>
</kdevfilecreate>
<kdevcvs>
<cvsoptions>-f</cvsoptions>
<commitoptions/>
<addoptions/>
<logoptions/>
<updateoptions>-dP</updateoptions>
<removeoptions>-f</removeoptions>
<revertoptions>-C -d -P</revertoptions>
<diffoptions>-u3 -p</diffoptions>
<rshoptions/>
</kdevcvs>
<kdevcppsupport>
<codecompletion>
<includeGlobalFunctions>true</includeGlobalFunctions>
<includeTypes>true</includeTypes>
<includeEnums>true</includeEnums>
<includeTypedefs>false</includeTypedefs>
<automaticCodeCompletion>true</automaticCodeCompletion>
<automaticArgumentsHint>true</automaticArgumentsHint>
<codeCompletionDelay>250</codeCompletionDelay>
<argumentsHintDelay>400</argumentsHintDelay>
<automaticHeaderCompletion>true</automaticHeaderCompletion>
<headerCompletionDelay>250</headerCompletionDelay>
</codecompletion>
<references/>
<creategettersetter>
<prefixGet/>
<prefixSet>set</prefixSet>
<prefixVariable>m_,_</prefixVariable>
<parameterName>theValue</parameterName>
<inlineGet>true</inlineGet>
<inlineSet>true</inlineSet>
</creategettersetter>
<qt>
<used>true</used>
<version>3</version>
<root>/usr/lib/qt3</root>
</qt>
</kdevcppsupport>
<cppsupportpart>
<filetemplates>
<interfacesuffix>.h</interfacesuffix>
<implementationsuffix>.cpp</implementationsuffix>
</filetemplates>
</cppsupportpart>
<kdevdocumentation>
<projectdoc>
<docsystem/>
<docurl/>
<usermanualurl/>
</projectdoc>
</kdevdocumentation>
<ctagspart>
<customArguments/>
<customTagfilePath/>
</ctagspart>
</kdevelop>

@ -0,0 +1,61 @@
Name: kdiff3
Version: 0.9.91
Release: 1.fc
URL: http://www.kde-apps.org/content/show.php?content=9807
License: GPL
Summary: Tool for Comparison and Merge of Files and Directories
Group: Development/Tools
Source: http://heanet.dl.sourceforge.net/sourceforge/kdiff3/kdiff3-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: kdelibs > 3.3
BuildRequires: gcc-c++ >= 3.2
BuildRequires: xorg-x11-devel
BuildRequires: qt-devel >= 3.3
BuildRequires: kdelibs-devel >= 3.3
%description
Shows the differences line by line and character by character (!).
Provides an automatic merge-facility and
an integrated editor for comfortable solving of merge-conflicts.
Supports KIO on KDE (allows accessing ftp, sftp, fish, smb etc.).
Unicode & UTF-8 support
%prep
%setup
%build
[ -n "$QTDIR" ] || . %{_sysconfdir}/profile.d/qt.sh
export KDEDIR=%{_prefix}
%configure --prefix=/usr
%{__make} %{?_smp_mflags}
%install
%{__rm} -rf %{buildroot}
source /etc/profile.d/qt.sh
%makeinstall
%clean
%{__rm} -rf %{buildroot}
%files
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_bindir}/kdiff3
%{_datadir}/applnk/*
%{_datadir}/apps/kdiff3/*
%{_datadir}/apps/kdiff3part/*
%{_datadir}/doc/HTML/*
%{_datadir}/icons/*
%{_datadir}/locale/*
%{_datadir}/man/man1/kdiff3*
%{_datadir}/services/kdiff3*
%{_libdir}/kde3/libkdiff3*
%changelog
* Mon May 15 2006 Vadim Likhota <vadim-lvv@yandex.ru> - 0.9.90-1.fc
- write spec for fc/rhel/centos/asp for kdiff3

@ -0,0 +1,20 @@
INCLUDES = $(all_includes)
METASOURCES = AUTO
# Install this plugin in the KDE modules directory
kde_module_LTLIBRARIES = libkdiff3plugin.la
libkdiff3plugin_la_SOURCES = kdiff3plugin.cpp
libkdiff3plugin_la_LIBADD = -lkonq
libkdiff3plugin_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN)
#KDE_ICON = KDiff3
pluginsdir = $(kde_servicesdir)
plugins_DATA = kdiff3_plugin.desktop
appsdir = $(kde_appsdir)/.hidden
apps_DATA = kdiff3plugin.desktop
messages: rc.cpp
$(XGETTEXT) *.cpp *.h -o $(podir)/kdiff3_plugin.pot

@ -0,0 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
Name=Compare/Merge Files/Directories
X-KDE-Library=libkdiff3plugin
ServiceTypes=KonqPopupMenu/Plugin,all/all

@ -0,0 +1,263 @@
/* This file is part of the KDiff3 project
Copyright (C) 2006 Joachim Eibl <joachim dot eibl at gmx dot de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; version 2
of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "kdiff3plugin.h"
#include <kapplication.h>
#include <kstandarddirs.h>
#include <kaction.h>
#include <klocale.h>
#include <kgenericfactory.h>
#include <kurl.h>
#include <ksimpleconfig.h>
#include <kmessagebox.h>
//#include <iostream>
static QStringList* s_pHistory=0;
class KDiff3PluginFactory : public KGenericFactory < KDiff3Plugin, KonqPopupMenu >
{
KSimpleConfig* m_pConfig;
public:
KDiff3PluginFactory( const char* instanceName = 0 )
: KGenericFactory< KDiff3Plugin, KonqPopupMenu >( instanceName )
{
m_pConfig = 0;
if (s_pHistory==0)
{
//std::cout << "New History: " << instanceName << std::endl;
s_pHistory = new QStringList;
m_pConfig = new KSimpleConfig( "kdiff3pluginrc", false );
*s_pHistory = m_pConfig->readListEntry("HistoryStack");
}
}
~KDiff3PluginFactory()
{
//std::cout << "Delete History" << std::endl;
if ( s_pHistory && m_pConfig )
m_pConfig->writeEntry("HistoryStack",*s_pHistory);
delete s_pHistory;
delete m_pConfig;
s_pHistory = 0;
m_pConfig = 0;
}
};
K_EXPORT_COMPONENT_FACTORY (libkdiff3plugin, KDiff3PluginFactory ("kdiff3plugin"))
KDiff3Plugin::KDiff3Plugin( KonqPopupMenu* pPopupmenu, const char *name, const QStringList & /* list */ )
:KonqPopupMenuPlugin (pPopupmenu, name)
{
if (KStandardDirs::findExe ("kdiff3").isNull ())
return;
m_pParentWidget = pPopupmenu->parentWidget();
KGlobal::locale()->insertCatalogue("kdiff3_plugin");
// remember currently selected files (copy to a QStringList)
KFileItemList itemList = pPopupmenu->fileItemList();
for ( KFileItem *item = itemList.first(); item; item = itemList.next() )
{
//m_urlList.append( item->url() );
m_list.append( item->url().url() );
}
/* Menu structure:
KDiff3 -> (1 File selected): Save 'selection' for later comparison (push onto history stack)
Compare 'selection' with first file on history stack.
Compare 'selection' with -> choice from history stack
Merge 'selection' with first file on history stack.
Merge 'selection' with last two files on history stack.
(2 Files selected): Compare 's1' with 's2'
Merge 's1' with 's2'
(3 Files selected): Compare 's1', 's2' and 's3'
*/
KActionMenu* pActionMenu = new KActionMenu (i18n ("KDiff3"), "kdiff3", actionCollection (), "kdiff3_menu" );
KAction* pAction = 0;
QString s;
if(m_list.count() == 1)
{
int historyCount = s_pHistory ? s_pHistory->count() : 0;
s = i18n("Compare with %1").arg( historyCount>0 ? s_pHistory->front() : QString() );
pAction = new KAction ( s,0, this, SLOT(slotCompareWith()), actionCollection());
pAction->setEnabled( m_list.count()>0 && historyCount>0 );
pActionMenu->insert (pAction);
s = i18n("Merge with %1").arg( historyCount>0 ? s_pHistory->front() : QString() );
pAction = new KAction( s, 0, this, SLOT(slotMergeWith()), actionCollection());
pAction->setEnabled( m_list.count()>0 && historyCount>0 );
pActionMenu->insert (pAction);
s = i18n("Save '%1' for later").arg( ( m_list.front() ) );
pAction = new KAction ( s, 0, this, SLOT(slotSaveForLater()), actionCollection());
pAction->setEnabled( m_list.count()>0 );
pActionMenu->insert(pAction);
pAction = new KAction (i18n("3-way merge with base"), 0, this, SLOT(slotMergeThreeWay()), actionCollection());
pAction->setEnabled( m_list.count()>0 && historyCount>=2 );
pActionMenu->insert (pAction);
if ( s_pHistory && !s_pHistory->empty() )
{
KActionMenu* pHistoryMenu = new KActionMenu( i18n("Compare with ..."), "CompareWith", actionCollection (), "kdiff3_history_menu");
pHistoryMenu->setEnabled( m_list.count()>0 && historyCount>0 );
pActionMenu->insert(pHistoryMenu);
for (QStringList::iterator i = s_pHistory->begin(); i!=s_pHistory->end(); ++i)
{
pAction = new KAction( *i, "History", 0, this, SLOT(slotCompareWithHistoryItem()), actionCollection());
pHistoryMenu->insert (pAction);
}
pAction = new KAction (i18n("Clear list"), 0, this, SLOT(slotClearList()), actionCollection());
pActionMenu->insert (pAction);
pAction->setEnabled( historyCount>0 );
}
}
else if(m_list.count() == 2)
{
pAction = new KAction (i18n("Compare"), 0, this, SLOT(slotCompareTwoFiles()), actionCollection());
pActionMenu->insert (pAction);
}
else if ( m_list.count() == 3 )
{
pAction = new KAction (i18n("3 way comparison"), 0, this, SLOT(slotCompareThreeFiles()), actionCollection());
pActionMenu->insert (pAction);
}
pAction = new KAction (i18n("About KDiff3 menu plugin ..."), 0, this, SLOT(slotAbout()), actionCollection());
pActionMenu->insert (pAction);
addSeparator();
addAction( pActionMenu );
addSeparator();
}
KDiff3Plugin::~KDiff3Plugin ()
{
}
void KDiff3Plugin::slotCompareWith()
{
if ( m_list.count() > 0 && s_pHistory && ! s_pHistory->empty() )
{
QStringList args;
args << s_pHistory->front();
args << m_list.front();
kapp->kdeinitExec ("kdiff3", args);
}
}
void KDiff3Plugin::slotCompareWithHistoryItem()
{
const KAction* pAction = dynamic_cast<const KAction*>( sender() );
if ( m_list.count() > 0 && pAction )
{
QStringList args;
args << pAction->text();
args << m_list.front();
kapp->kdeinitExec ("kdiff3", args);
}
}
void KDiff3Plugin::slotCompareTwoFiles()
{
if ( m_list.count() == 2 )
{
QStringList args;
args << m_list.front();
args << m_list.back();
kapp->kdeinitExec ("kdiff3", args);
}
}
void KDiff3Plugin::slotCompareThreeFiles()
{
if ( m_list.count() == 3 )
{
QStringList args;
args << m_list[0];
args << m_list[1];
args << m_list[2];
kapp->kdeinitExec ("kdiff3", args);
}
}
void KDiff3Plugin::slotMergeWith()
{
if ( m_list.count() > 0 && s_pHistory && ! s_pHistory->empty() )
{
QStringList args;
args << s_pHistory->front();
args << m_list.front();
args << ( "-o" + m_list.front() );
kapp->kdeinitExec ("kdiff3", args);
}
}
void KDiff3Plugin::slotMergeThreeWay()
{
if ( m_list.count() > 0 && s_pHistory && s_pHistory->count()>=2 )
{
QStringList args;
args << (*s_pHistory)[1];
args << (*s_pHistory)[0];
args << m_list.front();
args << ("-o" + m_list.front());
kapp->kdeinitExec ("kdiff3", args);
}
}
void KDiff3Plugin::slotSaveForLater()
{
if ( !m_list.isEmpty() && s_pHistory )
{
while ( s_pHistory->count()>=10 )
s_pHistory->pop_back();
s_pHistory->push_front( m_list.front() );
}
}
void KDiff3Plugin::slotClearList()
{
if ( s_pHistory )
s_pHistory->clear();
}
void KDiff3Plugin::slotAbout()
{
QString s = i18n("KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n\n");
s += i18n("Using the contextmenu extension:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"
"If the other file is somewhere else \"Save\" the first file for later. "
"It will appear in the \"Compare With ...\" submenu. "
"Then use \"Compare With\" on second file.\n"
"For a 3-way merge first \"Save\" the base file, then the branch to merge and "
"choose \"3-way merge with base\" on the other branch which will be used as destination.\n"
"Same also applies to directory comparison and merge.");
KMessageBox::information(m_pParentWidget, s, tr("About KDiff3 Menu Plugin") );
}
#include "kdiff3plugin.moc"

@ -0,0 +1,7 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
Name=Compare/Merge Files/Directories with KDiff3
Icon=kdiff3
X-KDE-ParentApp=konqueror
#DocPath=konq-plugins/kdiff3plugin/index.html

@ -0,0 +1,50 @@
/* This file is part of the KDiff3 project
Copyright (C) 2006 Joachim Eibl <Joachim dot Eibl at gmx dot de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; version 2
of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _KDIFF3PLUGIN_H_
#define _KDIFF3PLUGIN_H_
#include <konq_popupmenu.h>
class QStringList;
class KDiff3Plugin : public KonqPopupMenuPlugin
{
Q_OBJECT
public:
KDiff3Plugin (KonqPopupMenu *, const char *name, const QStringList & list);
virtual ~KDiff3Plugin();
private slots:
void slotCompareWith();
void slotCompareTwoFiles();
void slotCompareThreeFiles();
void slotMergeWith();
void slotMergeThreeWay();
void slotSaveForLater();
void slotClearList();
void slotCompareWithHistoryItem();
void slotAbout();
private:
QStringList m_list;
QWidget* m_pParentWidget;
};
#endif

@ -0,0 +1,661 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# KDE tags expanded automatically by am_edit - $Revision: 483858 $
# kdiff3plugin/po/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
srcdir = .
top_srcdir = ../..
pkgdatadir = $(datadir)/kdiff3
pkglibdir = $(libdir)/kdiff3
pkgincludedir = $(includedir)/kdiff3
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = /usr/bin/install -c -p
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = i486-pc-linux-gnu
host_triplet = i486-pc-linux-gnu
target_triplet = i486-pc-linux-gnu
subdir = kdiff3plugin/po
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
#>+ 1
#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
#>+ 1
DISTFILES = $(GMOFILES) $(POFILES) $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST)
ACLOCAL = ${SHELL} /home/eike/devel/debian/kdiff3/kdiff3-0.9.92/admin/missing --run aclocal-1.9
AMDEP_FALSE = #
AMDEP_TRUE =
AMTAR = ${SHELL} /home/eike/devel/debian/kdiff3/kdiff3-0.9.92/admin/missing --run tar
AR = ar
ARTSCCONFIG = /usr/bin/artsc-config
AUTOCONF = $(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure
AUTODIRS =
AUTOHEADER = ${SHELL} /home/eike/devel/debian/kdiff3/kdiff3-0.9.92/admin/missing --run autoheader
AUTOMAKE = ${SHELL} /home/eike/devel/debian/kdiff3/kdiff3-0.9.92/admin/missing --run automake-1.9
AWK = gawk
CC = i486-linux-gnu-gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -O2 -Wall -g -O2 -Wformat-security -Wmissing-format-attribute
CONF_FILES = $(top_srcdir)/./admin/configure.in.min $(top_srcdir)/configure.in.in
CPP = i486-linux-gnu-gcc -E
CPPFLAGS = -DQT_THREAD_SUPPORT -D_REENTRANT
CXX = i486-linux-gnu-g++
CXXCPP = i486-linux-gnu-g++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common
CYGPATH_W = echo
DCOPIDL = /usr/bin/dcopidl
DCOPIDL2CPP = /usr/bin/dcopidl2cpp
DCOPIDLNG = /usr/bin/dcopidlng
DCOP_DEPENDENCIES = $(DCOPIDL) $(DCOPIDLNG)
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
ECHO = echo
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = /bin/grep -E
ENABLE_PERMISSIVE_FLAG = -fpermissive
EXEEXT =
F77 =
FFLAGS =
FRAMEWORK_COREAUDIO =
GMSGFMT = /usr/bin/msgfmt
GREP = /bin/grep
HAVE_GCC_VISIBILITY = 0
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL} $(INSTALL_STRIP_FLAG)
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
KCFG_DEPENDENCIES = $(KCONFIG_COMPILER)
KCONFIG_COMPILER = /usr/bin/kconfig_compiler
KDECONFIG = /usr/bin/kde-config
KDE_CHECK_PLUGIN = $(KDE_PLUGIN) -rpath $(libdir)
KDE_EXTRA_RPATH =
KDE_INCLUDES = -I/usr/include/kde
KDE_LDFLAGS = -L/usr/lib
KDE_MT_LDFLAGS =
KDE_MT_LIBS = -lpthread
KDE_NO_UNDEFINED = -Wl,--no-undefined -Wl,--allow-shlib-undefined
KDE_PLUGIN = -avoid-version -module -no-undefined $(KDE_NO_UNDEFINED) $(KDE_RPATH) $(KDE_MT_LDFLAGS)
KDE_RPATH =
KDE_USE_CLOSURE_FALSE =
KDE_USE_CLOSURE_TRUE = #
KDE_USE_FINAL_FALSE =
KDE_USE_FINAL_TRUE = #
KDE_USE_FPIE = -fPIE
KDE_USE_NMCHECK_FALSE =
KDE_USE_NMCHECK_TRUE = #
KDE_USE_PIE = -pie
KDE_XSL_STYLESHEET = /usr/share/apps/ksgmltools2/customization/kde-chunk.xsl
LDFLAGS =
LDFLAGS_AS_NEEDED =
LDFLAGS_NEW_DTAGS =
LIBCOMPAT =
LIBCRYPT = -lcrypt
LIBDL = -ldl
LIBJPEG = -ljpeg
LIBOBJS =
LIBPNG = -lpng -lz -lm
LIBPTHREAD = -lpthread
LIBRESOLV = -lresolv
LIBS =
LIBSM = -lSM -lICE
LIBSOCKET =
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIBUCB =
LIBUTIL = -lutil
LIBZ = -lz
LIB_KAB = -lkab
LIB_KABC = -lkabc
LIB_KDECORE = -lkdecore
LIB_KDED =
LIB_KDEPIM = -lkdepim
LIB_KDEPRINT = -lkdeprint
LIB_KDEUI = -lkdeui
LIB_KDNSSD = -lkdnssd
LIB_KFILE = -lkio
LIB_KFM =
LIB_KHTML = -lkhtml
LIB_KIMPROXY = -lkimproxy
LIB_KIO = -lkio
LIB_KJS = -lkjs
LIB_KNEWSTUFF = -lknewstuff
LIB_KPARTS = -lkparts
LIB_KSPELL = -lkspell
LIB_KSYCOCA = -lkio
LIB_KUNITTEST = -lkunittest
LIB_KUTILS = -lkutils
LIB_POLL =
LIB_QPE =
LIB_QT = -lqt-mt $(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM) -lpthread
LIB_SMB = -lsmb
LIB_X11 = -lX11 $(LIBSOCKET)
LIB_XEXT = -lXext
LIB_XRENDER =
LN_S = ln -s
LTLIBOBJS =
MAKEINFO = ${SHELL} /home/eike/devel/debian/kdiff3/kdiff3-0.9.92/admin/missing --run makeinfo
MAKEKDEWIDGETS =
MCOPIDL = /usr/bin/mcopidl
MEINPROC = /usr/bin/meinproc
MOC = /usr/share/qt3/bin/moc
MSGFMT = /usr/bin/msgfmt
NOOPT_CFLAGS = -O0
NOOPT_CXXFLAGS = -O0
OBJEXT = o
PACKAGE = kdiff3_plugin
PACKAGE_BUGREPORT =
PACKAGE_NAME =
PACKAGE_STRING =
PACKAGE_TARNAME =
PACKAGE_VERSION =
PATH_SEPARATOR = :
PERL = /usr/bin/perl
QTE_NORTTI =
QT_INCLUDES = -I/usr/include/qt3
QT_LDFLAGS = -L/usr/share/qt3/lib
RANLIB = ranlib
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
TOPSUBDIRS = doc kdiff3plugin po src
UIC = /usr/share/qt3/bin/uic -L $(kde_widgetdir) -nounload
UIC_TR = tr2i18n
USER_INCLUDES =
USER_LDFLAGS =
USE_EXCEPTIONS = -fexceptions
USE_RTTI =
USE_THREADS =
VERSION = 0.9.92
WOVERLOADED_VIRTUAL =
XGETTEXT = /usr/bin/xgettext
XMKMF =
XMLLINT = /usr/bin/xmllint
X_EXTRA_LIBS =
X_INCLUDES = -I.
X_LDFLAGS = -L/usr/lib
X_PRE_LIBS =
X_RPATH =
ac_ct_CC =
ac_ct_CXX =
ac_ct_F77 =
all_includes = -I/usr/include/kde -I/usr/include/qt3 -I.
all_libraries = -L/usr/share/qt3/lib -L/usr/lib
am__fastdepCC_FALSE = #
am__fastdepCC_TRUE =
am__fastdepCXX_FALSE = #
am__fastdepCXX_TRUE =
am__include = include
am__leading_dot = .
am__quote =
am__tar = ${AMTAR} chof - "$$tardir"
am__untar = ${AMTAR} xf -
bindir = ${exec_prefix}/bin
build = i486-pc-linux-gnu
build_alias = i486-linux-gnu
build_cpu = i486
build_os = linux-gnu
build_vendor = pc
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE}
dvidir = ${docdir}
exec_prefix = ${prefix}
host = i486-pc-linux-gnu
host_alias = i486-linux-gnu
host_cpu = i486
host_os = linux-gnu
host_vendor = pc
htmldir = ${docdir}
include_ARTS_FALSE = #
include_ARTS_TRUE =
include_libkonq_FALSE = #
include_libkonq_TRUE =
include_x11_FALSE = #
include_x11_TRUE =
includedir = ${prefix}/include
infodir = ${prefix}/share/info
install_sh = /home/eike/devel/debian/kdiff3/kdiff3-0.9.92/admin/install-sh
kde_appsdir = ${datadir}/applnk
kde_bindir = ${exec_prefix}/bin
kde_confdir = ${datadir}/config
kde_datadir = ${datadir}/apps
kde_htmldir = ${datadir}/doc/HTML
kde_icondir = ${datadir}/icons
kde_includes = /usr/include/kde
kde_kcfgdir = ${datadir}/config.kcfg
kde_libraries = /usr/lib
kde_libs_htmldir = /usr/share/doc/kde/HTML
kde_libs_prefix = /usr
kde_locale = ${datadir}/locale
kde_mimedir = ${datadir}/mimelnk
kde_moduledir = ${libdir}/kde3
kde_qtver = 3
kde_servicesdir = ${datadir}/services
kde_servicetypesdir = ${datadir}/servicetypes
kde_sounddir = ${datadir}/sounds
kde_styledir = ${libdir}/kde3/plugins/styles
kde_templatesdir = ${datadir}/templates
kde_wallpaperdir = ${datadir}/wallpapers
kde_widgetdir = /usr/lib/kde3/plugins/designer
kdeinitdir = $(kde_moduledir)
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${prefix}/share/man
mkdir_p = mkdir -p --
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /usr
program_transform_name = s,x,x,
psdir = ${docdir}
qt_includes = /usr/include/qt3
qt_libraries = /usr/share/qt3/lib
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
sysconfdir = ${prefix}/etc
target = i486-pc-linux-gnu
target_alias =
target_cpu = i486
target_os = linux-gnu
target_vendor = pc
unsermake_enable_pch_FALSE =
unsermake_enable_pch_TRUE = #
x_includes = .
x_libraries = /usr/lib
xdg_appsdir = ${datadir}/applications/kde
xdg_directorydir = ${datadir}/desktop-directories
xdg_menudir = ${sysconfdir}/xdg/menus
#>- POFILES = AUTO
#>+ 2
POFILES = pt.po it.po br.po cs.po sv.po pt_BR.po tr.po et.po bg.po sk.po da.po de.po ga.po nl.po el.po
GMOFILES = pt.gmo it.gmo br.gmo cs.gmo sv.gmo pt_BR.gmo tr.gmo et.gmo bg.gmo sk.gmo da.gmo de.gmo ga.gmo nl.gmo el.gmo
#>- all: all-am
#>+ 1
all: all-nls docs-am all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
#>- @for dep in $?; do \
#>- case '$(am__configure_deps)' in \
#>- *$$dep*) \
#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
#>- && exit 0; \
#>- exit 1;; \
#>- esac; \
#>- done; \
#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu kdiff3plugin/po/Makefile'; \
#>- cd $(top_srcdir) && \
#>- $(AUTOMAKE) --gnu kdiff3plugin/po/Makefile
#>+ 12
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu kdiff3plugin/po/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu kdiff3plugin/po/Makefile
cd $(top_srcdir) && perl admin/am_edit kdiff3plugin/po/Makefile.in
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
#>- distdir: $(DISTFILES)
#>+ 1
distdir: distdir-nls $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
#>- uninstall: uninstall-am
#>+ 1
uninstall: uninstall-nls uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
#>- clean: clean-am
#>+ 1
clean: kde-rpo-clean clean-am
#>- clean-am: clean-generic clean-libtool mostlyclean-am
#>+ 1
clean-am: clean-bcheck clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
#>- install-data-am:
#>+ 1
install-data-am: install-nls
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
#>- maintainer-clean: maintainer-clean-am
#>+ 1
maintainer-clean: clean-nls maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
#>+ 2
KDE_DIST=nl.po pt.po da.po de.po et.po el.po cs.po tr.po Makefile.in bg.po pt_BR.po sv.po br.po sk.po it.po ga.po Makefile.am
#>+ 46
pt.gmo: pt.po
rm -f pt.gmo; $(GMSGFMT) -o pt.gmo $(srcdir)/pt.po
test ! -f pt.gmo || touch pt.gmo
it.gmo: it.po
rm -f it.gmo; $(GMSGFMT) -o it.gmo $(srcdir)/it.po
test ! -f it.gmo || touch it.gmo
br.gmo: br.po
rm -f br.gmo; $(GMSGFMT) -o br.gmo $(srcdir)/br.po
test ! -f br.gmo || touch br.gmo
cs.gmo: cs.po
rm -f cs.gmo; $(GMSGFMT) -o cs.gmo $(srcdir)/cs.po
test ! -f cs.gmo || touch cs.gmo
sv.gmo: sv.po
rm -f sv.gmo; $(GMSGFMT) -o sv.gmo $(srcdir)/sv.po
test ! -f sv.gmo || touch sv.gmo
pt_BR.gmo: pt_BR.po
rm -f pt_BR.gmo; $(GMSGFMT) -o pt_BR.gmo $(srcdir)/pt_BR.po
test ! -f pt_BR.gmo || touch pt_BR.gmo
tr.gmo: tr.po
rm -f tr.gmo; $(GMSGFMT) -o tr.gmo $(srcdir)/tr.po
test ! -f tr.gmo || touch tr.gmo
et.gmo: et.po
rm -f et.gmo; $(GMSGFMT) -o et.gmo $(srcdir)/et.po
test ! -f et.gmo || touch et.gmo
bg.gmo: bg.po
rm -f bg.gmo; $(GMSGFMT) -o bg.gmo $(srcdir)/bg.po
test ! -f bg.gmo || touch bg.gmo
sk.gmo: sk.po
rm -f sk.gmo; $(GMSGFMT) -o sk.gmo $(srcdir)/sk.po
test ! -f sk.gmo || touch sk.gmo
da.gmo: da.po
rm -f da.gmo; $(GMSGFMT) -o da.gmo $(srcdir)/da.po
test ! -f da.gmo || touch da.gmo
de.gmo: de.po
rm -f de.gmo; $(GMSGFMT) -o de.gmo $(srcdir)/de.po
test ! -f de.gmo || touch de.gmo
ga.gmo: ga.po
rm -f ga.gmo; $(GMSGFMT) -o ga.gmo $(srcdir)/ga.po
test ! -f ga.gmo || touch ga.gmo
nl.gmo: nl.po
rm -f nl.gmo; $(GMSGFMT) -o nl.gmo $(srcdir)/nl.po
test ! -f nl.gmo || touch nl.gmo
el.gmo: el.po
rm -f el.gmo; $(GMSGFMT) -o el.gmo $(srcdir)/el.po
test ! -f el.gmo || touch el.gmo
#>+ 3
clean-nls:
-rm -f pt.gmo it.gmo br.gmo cs.gmo sv.gmo pt_BR.gmo tr.gmo et.gmo bg.gmo sk.gmo da.gmo de.gmo ga.gmo nl.gmo el.gmo
#>+ 10
install-nls:
@for base in pt it br cs sv pt_BR tr et bg sk da de ga nl el ; do \
echo $(INSTALL_DATA) $$base.gmo $(DESTDIR)$(kde_locale)/$$base/LC_MESSAGES/$(PACKAGE).mo ;\
$(mkinstalldirs) $(DESTDIR)$(kde_locale)/$$base/LC_MESSAGES ; \
if test -f $$base.gmo; then $(INSTALL_DATA) $$base.gmo $(DESTDIR)$(kde_locale)/$$base/LC_MESSAGES/$(PACKAGE).mo ;\
elif test -f $(srcdir)/$$base.gmo; then $(INSTALL_DATA) $(srcdir)/$$base.gmo $(DESTDIR)$(kde_locale)/$$base/LC_MESSAGES/$(PACKAGE).mo ;\
fi ;\
done
#>+ 17
uninstall-nls:
rm -f $(DESTDIR)$(kde_locale)/pt/LC_MESSAGES/$(PACKAGE).mo
rm -f $(DESTDIR)$(kde_locale)/it/LC_MESSAGES/$(PACKAGE).mo
rm -f $(DESTDIR)$(kde_locale)/br/LC_MESSAGES/$(PACKAGE).mo
rm -f $(DESTDIR)$(kde_locale)/cs/LC_MESSAGES/$(PACKAGE).mo
rm -f $(DESTDIR)$(kde_locale)/sv/LC_MESSAGES/$(PACKAGE).mo
rm -f $(DESTDIR)$(kde_locale)/pt_BR/LC_MESSAGES/$(PACKAGE).mo
rm -f $(DESTDIR)$(kde_locale)/tr/LC_MESSAGES/$(PACKAGE).mo
rm -f $(DESTDIR)$(kde_locale)/et/LC_MESSAGES/$(PACKAGE).mo
rm -f $(DESTDIR)$(kde_locale)/bg/LC_MESSAGES/$(PACKAGE).mo
rm -f $(DESTDIR)$(kde_locale)/sk/LC_MESSAGES/$(PACKAGE).mo
rm -f $(DESTDIR)$(kde_locale)/da/LC_MESSAGES/$(PACKAGE).mo
rm -f $(DESTDIR)$(kde_locale)/de/LC_MESSAGES/$(PACKAGE).mo
rm -f $(DESTDIR)$(kde_locale)/ga/LC_MESSAGES/$(PACKAGE).mo
rm -f $(DESTDIR)$(kde_locale)/nl/LC_MESSAGES/$(PACKAGE).mo
rm -f $(DESTDIR)$(kde_locale)/el/LC_MESSAGES/$(PACKAGE).mo
#>+ 2
all-nls: $(GMOFILES)
#>+ 8
distdir-nls:$(GMOFILES)
for file in $(POFILES); do \
cp $(srcdir)/$$file $(distdir); \
done
for file in $(GMOFILES); do \
cp $(srcdir)/$$file $(distdir); \
done
#>+ 4
merge:
$(MAKE) -f $(top_srcdir)/admin/Makefile.common package-merge POFILES="${POFILES}" PACKAGE=${PACKAGE}
#>+ 2
docs-am:
#>+ 15
force-reedit:
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu kdiff3plugin/po/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu kdiff3plugin/po/Makefile
cd $(top_srcdir) && perl admin/am_edit kdiff3plugin/po/Makefile.in
#>+ 21
clean-bcheck:
rm -f *.bchecktest.cc *.bchecktest.cc.class a.out
bcheck: bcheck-am
bcheck-am:
@for i in ; do \
if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \
echo "int main() {return 0;}" > $$i.bchecktest.cc ; \
echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \
echo "$$i"; \
if ! $(CXX) $(DEFS) -I. -I$(srcdir) -I$(top_builddir) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) --dump-class-hierarchy -c $$i.bchecktest.cc; then \
rm -f $$i.bchecktest.cc; exit 1; \
fi ; \
echo "" >> $$i.bchecktest.cc.class; \
perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \
rm -f a.out; \
fi ; \
done
#>+ 3
final:
$(MAKE) all-am
#>+ 3
final-install:
$(MAKE) install-am
#>+ 3
no-final:
$(MAKE) all-am
#>+ 3
no-final-install:
$(MAKE) install-am
#>+ 3
kde-rpo-clean:
-rm -f *.rpo
#>+ 3
nmcheck:
nmcheck-am: nmcheck

@ -0,0 +1,2 @@
PACKAGE=kdiff3_plugin
POFILES = AUTO

@ -0,0 +1,83 @@
# translation of kdiff3_plugin.po to Bulgarian
#
# Zlatko Popov <zlatkopopov@fsa-bg.org>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: kdiff3_plugin\n"
"POT-Creation-Date: 2006-11-19 08:46+0100\n"
"PO-Revision-Date: 2007-01-17 11:52+0200\n"
"Last-Translator: Zlatko Popov <zlatkopopov@fsa-bg.org>\n"
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
#: kdiff3plugin.cpp:97
msgid "KDiff3"
msgstr "KDiff3"
#: kdiff3plugin.cpp:104
#, c-format
msgid "Compare with %1"
msgstr "Сравняване с %1"
#: kdiff3plugin.cpp:109
#, c-format
msgid "Merge with %1"
msgstr "Сливане с %1"
#: kdiff3plugin.cpp:114
msgid "Save '%1' for later"
msgstr "Запазване на \"%1\" за по-късно"
#: kdiff3plugin.cpp:119
msgid "3-way merge with base"
msgstr "Тройно сливане с основата"
#: kdiff3plugin.cpp:125
msgid "Compare with ..."
msgstr "Сравняване с ..."
#: kdiff3plugin.cpp:137
msgid "Compare"
msgstr "Сравняване"
#: kdiff3plugin.cpp:142
msgid "3 way comparison"
msgstr "Тройно сравняване"
#: kdiff3plugin.cpp:145
msgid "About KDiff3 menu plugin ..."
msgstr "Относно приставката за KDiff3 ..."
#: kdiff3plugin.cpp:240
msgid ""
"KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n"
"\n"
msgstr ""
"Приставка за KDiff3: Copyright (C) 2006 Joachim Eibl\n"
"Страница в Интернет: http://kdiff3.sourceforge.net\n"
"\n"
#: kdiff3plugin.cpp:242
msgid ""
"Using the contextmenu extension:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"
"If the other file is somewhere else \"Save\" the first file for later. It will "
"appear in the \"Compare With ...\" submenu. Then use \"Compare With\" on second "
"file.\n"
"For a 3-way merge first \"Save\" the base file, then the branch to merge and "
"choose \"3-way merge with base\" on the other branch which will be used as "
"destination.\n"
"Same also applies to directory comparison and merge."
msgstr ""
"Използване на разширението на контекстното меню:\n"
"За нормално сравняване на два файла, натиснете \"Сравняване\".\n"
"Ако другият файл е някъде другаде, запазете първият за по-късно. Ще се появи в "
"подменюто \"Сравняване с...\". Тогава използвайте \"Сравняване с\" за втория "
"файл.\n"
"За тройно сливане първо запишете основния файл, после това, което трябва да се "
"слее и натиснете \"Тройно сливане с основата\" на третия файл.\n"
"Същото важи и за сливането и сравняването на директории."

@ -0,0 +1,68 @@
msgid ""
msgstr ""
"Project-Id-Version: all2.po\n"
"POT-Creation-Date: 2006-11-19 08:46+0100\n"
"PO-Revision-Date: 2004-09-20 15:44+0200\n"
"Last-Translator: Thierry Vignaud <tvignaud@mandrakesoft.com>\n"
"Language-Team: br <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: kdiff3plugin.cpp:97
msgid "KDiff3"
msgstr "KDiff3"
#: kdiff3plugin.cpp:104
#, c-format
msgid "Compare with %1"
msgstr ""
#: kdiff3plugin.cpp:109
#, c-format
msgid "Merge with %1"
msgstr ""
#: kdiff3plugin.cpp:114
msgid "Save '%1' for later"
msgstr ""
#: kdiff3plugin.cpp:119
msgid "3-way merge with base"
msgstr ""
#: kdiff3plugin.cpp:125
msgid "Compare with ..."
msgstr ""
#: kdiff3plugin.cpp:137
msgid "Compare"
msgstr ""
#: kdiff3plugin.cpp:142
msgid "3 way comparison"
msgstr ""
#: kdiff3plugin.cpp:145
msgid "About KDiff3 menu plugin ..."
msgstr ""
#: kdiff3plugin.cpp:240
msgid ""
"KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n"
"\n"
msgstr ""
#: kdiff3plugin.cpp:242
msgid ""
"Using the contextmenu extension:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"
"If the other file is somewhere else \"Save\" the first file for later. It will "
"appear in the \"Compare With ...\" submenu. Then use \"Compare With\" on second "
"file.\n"
"For a 3-way merge first \"Save\" the base file, then the branch to merge and "
"choose \"3-way merge with base\" on the other branch which will be used as "
"destination.\n"
"Same also applies to directory comparison and merge."
msgstr ""

@ -0,0 +1,73 @@
# translation of kdiff3_plugin.po to Czech
#
# Klára Cihlářová <koty@seznam.cz>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: kdiff3_plugin\n"
"POT-Creation-Date: 2006-11-19 08:46+0100\n"
"PO-Revision-Date: 2007-01-25 19:57+0100\n"
"Last-Translator: Klára Cihlářová <koty@seznam.cz>\n"
"Language-Team: Czech <cs@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
#: kdiff3plugin.cpp:97
msgid "KDiff3"
msgstr "KDiff3"
#: kdiff3plugin.cpp:104
#, c-format
msgid "Compare with %1"
msgstr "Porovnat s %1"
#: kdiff3plugin.cpp:109
#, c-format
msgid "Merge with %1"
msgstr "Sloučit s %1"
#: kdiff3plugin.cpp:114
msgid "Save '%1' for later"
msgstr ""
#: kdiff3plugin.cpp:119
msgid "3-way merge with base"
msgstr ""
#: kdiff3plugin.cpp:125
msgid "Compare with ..."
msgstr "Porovnat s..."
#: kdiff3plugin.cpp:137
msgid "Compare"
msgstr "Porovnat"
#: kdiff3plugin.cpp:142
msgid "3 way comparison"
msgstr ""
#: kdiff3plugin.cpp:145
msgid "About KDiff3 menu plugin ..."
msgstr ""
#: kdiff3plugin.cpp:240
msgid ""
"KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n"
"\n"
msgstr ""
#: kdiff3plugin.cpp:242
msgid ""
"Using the contextmenu extension:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"
"If the other file is somewhere else \"Save\" the first file for later. It will "
"appear in the \"Compare With ...\" submenu. Then use \"Compare With\" on second "
"file.\n"
"For a 3-way merge first \"Save\" the base file, then the branch to merge and "
"choose \"3-way merge with base\" on the other branch which will be used as "
"destination.\n"
"Same also applies to directory comparison and merge."
msgstr ""

@ -0,0 +1,84 @@
# Danish translation of kdiff3_plugin
#
# Erik Kjær Pedersen <erik@binghamton.edu>, 2006.
msgid ""
msgstr ""
"Project-Id-Version: kdiff3_plugin\n"
"POT-Creation-Date: 2006-11-19 08:46+0100\n"
"PO-Revision-Date: 2006-11-19 16:31-0500\n"
"Last-Translator: Erik Kjær Pedersen <erik@binghamton.edu>\n"
"Language-Team: Danish <dansk@klid.dk>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
#: kdiff3plugin.cpp:97
msgid "KDiff3"
msgstr "KDiff3"
#: kdiff3plugin.cpp:104
#, c-format
msgid "Compare with %1"
msgstr "Sammenlign med %1"
#: kdiff3plugin.cpp:109
#, c-format
msgid "Merge with %1"
msgstr "Flet sammen med %1"
#: kdiff3plugin.cpp:114
msgid "Save '%1' for later"
msgstr "Gem '%1' til senere"
#: kdiff3plugin.cpp:119
msgid "3-way merge with base"
msgstr "Trevejs sammenfletning med basis"
#: kdiff3plugin.cpp:125
msgid "Compare with ..."
msgstr "Sammenlign med..."
#: kdiff3plugin.cpp:137
msgid "Compare"
msgstr "Sammenlign"
#: kdiff3plugin.cpp:142
msgid "3 way comparison"
msgstr "Trevejs sammenligning"
#: kdiff3plugin.cpp:145
msgid "About KDiff3 menu plugin ..."
msgstr "Om Kdiff3-menuplugin..."
#: kdiff3plugin.cpp:240
msgid ""
"KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n"
"\n"
msgstr ""
"Kdiff3 menuplugin: Ophavsret © 2006 Joachim Eibl\n"
"Kdiff3 hjemmeside: http://kdiff3.sourceforge.net\n"
"\n"
#: kdiff3plugin.cpp:242
msgid ""
"Using the contextmenu extension:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"
"If the other file is somewhere else \"Save\" the first file for later. It will "
"appear in the \"Compare With ...\" submenu. Then use \"Compare With\" on second "
"file.\n"
"For a 3-way merge first \"Save\" the base file, then the branch to merge and "
"choose \"3-way merge with base\" on the other branch which will be used as "
"destination.\n"
"Same also applies to directory comparison and merge."
msgstr ""
"Brug af udvidelsen med sammenhængsafhængig menu:\n"
"For nem sammenligning af to markerede filer, vælg \"Sammenlign\".\n"
"Hvis den andre fil findes et andet sted, \"Gem\" den første fil til senere. Den "
"ses i undermenuen \"Sammenlign med...\". Brug derefter \"Sammenlign med\" for "
"den anden fil.\n"
"For en trevejs sammenfletning, \"Gem\" først basisfilen, derefter grenen at "
"sammenflette, og vælg \"Trevejs sammenfletning med basis\" for den anden gren "
"som bruges som mål.\n"
"Det samme gælder også for mappesammenligning og sammenfletning."

@ -0,0 +1,91 @@
# translation of kdiff3_plugin.po to German
# translation of kdiff3_plugin.po to
#
# Mark Volkert <mark.volkert@rakekniven.de>, 2006.
# Thomas Reitelbach <tr@erdfunkstelle.de>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: kdiff3_plugin\n"
"POT-Creation-Date: 2006-11-19 08:46+0100\n"
"PO-Revision-Date: 2007-01-29 22:54+0100\n"
"Last-Translator: Thomas Reitelbach <tr@erdfunkstelle.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: kdiff3plugin.cpp:97
msgid "KDiff3"
msgstr "KDiff3"
#: kdiff3plugin.cpp:104
#, c-format
msgid "Compare with %1"
msgstr "Mit %1 vergleichen"
#: kdiff3plugin.cpp:109
#, c-format
msgid "Merge with %1"
msgstr "Mit %1 zusammenführen"
#: kdiff3plugin.cpp:114
msgid "Save '%1' for later"
msgstr "'%1' für später speichern"
#: kdiff3plugin.cpp:119
msgid "3-way merge with base"
msgstr "3-Wege-Vergleich mit Base"
#: kdiff3plugin.cpp:125
msgid "Compare with ..."
msgstr "Vergleichen mit ..."
#: kdiff3plugin.cpp:137
msgid "Compare"
msgstr "Vergleich"
#: kdiff3plugin.cpp:142
msgid "3 way comparison"
msgstr "3-Wege-Vergleich"
#: kdiff3plugin.cpp:145
msgid "About KDiff3 menu plugin ..."
msgstr "Über das KDiff3 Menü-Modul ..."
#: kdiff3plugin.cpp:240
msgid ""
"KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n"
"\n"
msgstr ""
"KDiff3 Menü-Modul: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 Internetseite: http://kdiff3.sourceforge.net\n"
"\n"
#: kdiff3plugin.cpp:242
msgid ""
"Using the contextmenu extension:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"
"If the other file is somewhere else \"Save\" the first file for later. It will "
"appear in the \"Compare With ...\" submenu. Then use \"Compare With\" on second "
"file.\n"
"For a 3-way merge first \"Save\" the base file, then the branch to merge and "
"choose \"3-way merge with base\" on the other branch which will be used as "
"destination.\n"
"Same also applies to directory comparison and merge."
msgstr ""
"Verwendung der Kontextmenü-Erweiterung:\n"
"Für einen einfachen Vergleich zweier ausgewählter Dateien wählen Sie "
"\"Vergleichen\".\n"
"Wenn sich die andere Datei woanders befindet, \"Speichern\" Sie die erste Datei "
"zur späteren Verwendung. Sie wird im Untermenü \"Vergleichen mit ...\" "
"erscheinen. Anschließend verwenden Sie mit der zweiten Datei die Funktion "
"\"Vergleichen mit\".\n"
"Um eine 3-Wege-Zusammenführung durchzuführen, \"Speichern\" Sie die "
"Basis-Datei, dann die zusammenzuführende Verzweigung und dann wählen Sie mit "
"der zweiten Verzweigung die Funktion \"3-Wege-Zusammenführung mit Basis\". Das "
"Ziel der Zusammenführung ist die zuletzt gewählte Verzweigung.\n"
"Auf die gleiche Weise funktioniert auch das Vergleichen und Zusammenführen von "
"Ordnern."

@ -0,0 +1,84 @@
# translation of kdiff3_plugin.po to Greek
#
# Spiros Georgaras <sngeorgaras@otenet.gr>, 2006.
msgid ""
msgstr ""
"Project-Id-Version: kdiff3_plugin\n"
"POT-Creation-Date: 2006-11-19 08:46+0100\n"
"PO-Revision-Date: 2006-11-19 17:37+0200\n"
"Last-Translator: Spiros Georgaras <sngeorgaras@otenet.gr>\n"
"Language-Team: Greek <i18ngr@lists.hellug.gr>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
#: kdiff3plugin.cpp:97
msgid "KDiff3"
msgstr "KDiff3"
#: kdiff3plugin.cpp:104
#, c-format
msgid "Compare with %1"
msgstr "Σύγκριση με το %1"
#: kdiff3plugin.cpp:109
#, c-format
msgid "Merge with %1"
msgstr "Συγχώνευση με το %1"
#: kdiff3plugin.cpp:114
msgid "Save '%1' for later"
msgstr "Αποθήκευση του %1 για αργότερα"
#: kdiff3plugin.cpp:119
msgid "3-way merge with base"
msgstr "Τριπλή συγχώνευση με βάση"
#: kdiff3plugin.cpp:125
msgid "Compare with ..."
msgstr "Σύγκριση με..."
#: kdiff3plugin.cpp:137
msgid "Compare"
msgstr "Σύγκριση"
#: kdiff3plugin.cpp:142
msgid "3 way comparison"
msgstr "τριπλή σύγκριση"
#: kdiff3plugin.cpp:145
msgid "About KDiff3 menu plugin ..."
msgstr "Σχετικά με το πρόσθετο μενού του KDiff3..."
#: kdiff3plugin.cpp:240
msgid ""
"KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n"
"\n"
msgstr ""
"Πρόσθετο μενού του KDiff3: Copyright (C) 2006 Joachim Eibl\n"
"Ιστοσελίδα του KDiff3: http://kdiff3.sourceforge.net\n"
"\n"
#: kdiff3plugin.cpp:242
msgid ""
"Using the contextmenu extension:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"
"If the other file is somewhere else \"Save\" the first file for later. It will "
"appear in the \"Compare With ...\" submenu. Then use \"Compare With\" on second "
"file.\n"
"For a 3-way merge first \"Save\" the base file, then the branch to merge and "
"choose \"3-way merge with base\" on the other branch which will be used as "
"destination.\n"
"Same also applies to directory comparison and merge."
msgstr ""
"Χρήση της επέκτασης μενού:\n"
"Για απλή σύγκριση 3 επιλεγμένων αρχείων επιλέξτε το \"Σύγκριση\".\n"
"Αν το δεύτερο αρχείο βρίσκεται κάπου αλλού, \"Αποθηκεύστε\" το πρώτο αρχείο για "
"αργότερα. Θα εμφανιστεί στο υπομενού \"Σύγκριση με...\". Στη συνέχεια "
"χρησιμοποιήστε το \"Σύγκριση με\" στο δεύτερο αρχείο.\n"
"Για να κάνετε τριπλή συγχώνευση \"Αποθηκεύστε\" το αρχείο βάσης, και τον προς "
"συγχώνευση κλάδο και επιλέξτε \"Τριπλή συγχώνευση με βάση\" στον άλλο κλάδο, ο "
"οποίος θα χρησιμοποιηθεί ως προορισμός.\n"
"Τα παραπάνω ισχύουν για για τη σύγκριση και συγχώνευση καταλόγων."

@ -0,0 +1,83 @@
# translation of kdiff3_plugin.po to Estonian
#
# Marek Laane <bald@starman.ee>, 2006.
msgid ""
msgstr ""
"Project-Id-Version: kdiff3_plugin\n"
"POT-Creation-Date: 2006-11-19 08:46+0100\n"
"PO-Revision-Date: 2006-12-07 02:19+0200\n"
"Last-Translator: Marek Laane <bald@starman.ee>\n"
"Language-Team: Estonian <kde-et@linux.ee>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
#: kdiff3plugin.cpp:97
msgid "KDiff3"
msgstr "KDiff3"
#: kdiff3plugin.cpp:104
#, c-format
msgid "Compare with %1"
msgstr "Võrdle failiga %1"
#: kdiff3plugin.cpp:109
#, c-format
msgid "Merge with %1"
msgstr "Ühenda failiga %1"
#: kdiff3plugin.cpp:114
msgid "Save '%1' for later"
msgstr "Salvesta '%1' hilisemaks"
#: kdiff3plugin.cpp:119
msgid "3-way merge with base"
msgstr "Kolme faili ühendamine baasiga"
#: kdiff3plugin.cpp:125
msgid "Compare with ..."
msgstr "Võrdle failiga..."
#: kdiff3plugin.cpp:137
msgid "Compare"
msgstr "Võrdle"
#: kdiff3plugin.cpp:142
msgid "3 way comparison"
msgstr "Kolme faili võrdlemine"
#: kdiff3plugin.cpp:145
msgid "About KDiff3 menu plugin ..."
msgstr "KDiff3 menüüplugina info..."
#: kdiff3plugin.cpp:240
msgid ""
"KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n"
"\n"
msgstr ""
"KDiff3 menüüplugin: autoriõigus (C) 2006 Joachim Eibl\n"
"KDiff3 kodulehekülg: http://kdiff3.sourceforge.net\n"
#: kdiff3plugin.cpp:242
msgid ""
"Using the contextmenu extension:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"
"If the other file is somewhere else \"Save\" the first file for later. It will "
"appear in the \"Compare With ...\" submenu. Then use \"Compare With\" on second "
"file.\n"
"For a 3-way merge first \"Save\" the base file, then the branch to merge and "
"choose \"3-way merge with base\" on the other branch which will be used as "
"destination.\n"
"Same also applies to directory comparison and merge."
msgstr ""
"Kontekstimenüü laienduse kasutamine:\n"
"Kahe valitud faili lihtsaks võrldemiseks vali \"Võrdle\".\n"
"Kui teine fail asub kuskil mujal, \"salvesta\" esimene fail hilisemaks "
"kasutamiseks. See ilmub alammenüüsse \"Võrdle failiga...\" Seejärel kasuta "
"teise faili jaoks käsku \"Võrdle failiga\".\n"
"Kolme faili ühendamiseks \"salvesta\" kõigepealt baasfail, seejärel ühendatav "
"variant ja vali \"Kolme faili ühendamine baasiga\" variandiga, mida kasutatakse "
"sihtfailina.\n"
"Sama käib kataloogide võrdlemise ja ühendamise kohta."

@ -0,0 +1,71 @@
msgid ""
msgstr ""
"Project-Id-Version: extragear-utils/kdiff3_plugin.po\n"
"POT-Creation-Date: 2006-11-19 08:46+0100\n"
"PO-Revision-Date: 2006-11-19 07:45-0500\n"
"Last-Translator: Kevin Patrick Scannell <kscanne@gmail.com>\n"
"Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: kdiff3plugin.cpp:97
msgid "KDiff3"
msgstr "KDiff3"
#: kdiff3plugin.cpp:104
#, c-format
msgid "Compare with %1"
msgstr "Cuir i gcomparáid le %1"
#: kdiff3plugin.cpp:109
#, c-format
msgid "Merge with %1"
msgstr "Cumaisc le %1"
#: kdiff3plugin.cpp:114
msgid "Save '%1' for later"
msgstr ""
#: kdiff3plugin.cpp:119
msgid "3-way merge with base"
msgstr ""
#: kdiff3plugin.cpp:125
msgid "Compare with ..."
msgstr "Cuir i gcomparáid le ..."
#: kdiff3plugin.cpp:137
msgid "Compare"
msgstr "Cuir i gComparáid"
#: kdiff3plugin.cpp:142
msgid "3 way comparison"
msgstr "Comparáid trí bhealach"
#: kdiff3plugin.cpp:145
msgid "About KDiff3 menu plugin ..."
msgstr ""
#: kdiff3plugin.cpp:240
msgid ""
"KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n"
"\n"
msgstr ""
"Breiseán Roghchláir KDiff3: Copyright © 2006 Joachim Eibl\n"
"Leathanach Baile KDiff3: http://kdiff3.sourceforge.net/\n"
"\n"
#: kdiff3plugin.cpp:242
msgid ""
"Using the contextmenu extension:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"
"If the other file is somewhere else \"Save\" the first file for later. It will "
"appear in the \"Compare With ...\" submenu. Then use \"Compare With\" on second "
"file.\n"
"For a 3-way merge first \"Save\" the base file, then the branch to merge and "
"choose \"3-way merge with base\" on the other branch which will be used as "
"destination.\n"
"Same also applies to directory comparison and merge."
msgstr ""

@ -0,0 +1,84 @@
# translation of kdiff3_plugin.po to Italian
#
# Federico Zenith <zenith@chemeng.ntnu.no>, 2006.
msgid ""
msgstr ""
"Project-Id-Version: kdiff3_plugin\n"
"POT-Creation-Date: 2006-11-19 08:46+0100\n"
"PO-Revision-Date: 2006-11-22 07:28+0100\n"
"Last-Translator: Federico Zenith <zenith@chemeng.ntnu.no>\n"
"Language-Team: Italian <kde-i18n-it@kde.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: kdiff3plugin.cpp:97
msgid "KDiff3"
msgstr "KDiff3"
#: kdiff3plugin.cpp:104
#, c-format
msgid "Compare with %1"
msgstr "Confronta con %1"
#: kdiff3plugin.cpp:109
#, c-format
msgid "Merge with %1"
msgstr "Fondi con %1"
#: kdiff3plugin.cpp:114
msgid "Save '%1' for later"
msgstr "Memorizza '%1'"
#: kdiff3plugin.cpp:119
msgid "3-way merge with base"
msgstr "Fusione a tre con base"
#: kdiff3plugin.cpp:125
msgid "Compare with ..."
msgstr "Confronta con..."
#: kdiff3plugin.cpp:137
msgid "Compare"
msgstr "Confronta"
#: kdiff3plugin.cpp:142
msgid "3 way comparison"
msgstr "Confronto a tre"
#: kdiff3plugin.cpp:145
msgid "About KDiff3 menu plugin ..."
msgstr "Informazioni sul plugin KDiff3 per menu..."
#: kdiff3plugin.cpp:240
msgid ""
"KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n"
"\n"
msgstr ""
"Plugin KDiff3 per menu: Copyright 2006 Joachim Eibl\n"
"Pagina Web di KDiff3: <a href=\"http://kdiff3.sourceforge.net\">"
"kdiff3.sourceforge.net</a>\n"
"\n"
#: kdiff3plugin.cpp:242
msgid ""
"Using the contextmenu extension:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"
"If the other file is somewhere else \"Save\" the first file for later. It will "
"appear in the \"Compare With ...\" submenu. Then use \"Compare With\" on second "
"file.\n"
"For a 3-way merge first \"Save\" the base file, then the branch to merge and "
"choose \"3-way merge with base\" on the other branch which will be used as "
"destination.\n"
"Same also applies to directory comparison and merge."
msgstr ""
"Usare l'estensione del menu contestuale:\n"
"Per un semplice confronto di due file selezionati scegli \"Confronta\".\n"
"Se l'altro file è da qualche altra parte, \"Memorizza\" il primo. Apparirà nel "
"sottomenu \"Confronta con...\". Poi usa \"Confronta con\" sul secondo file.\n"
"Per una fusione a tre, prima \"Memorizza\" il file di base, poi il ramo da "
"fondere, e scegli \"Fusione a tre con base\" sul ramo di destinazione.\n"
"Lo stesso vale per il confronto e la fusione tra cartelle."

@ -0,0 +1,87 @@
# translation of kdiff3_plugin.po to Dutch
#
# Rinse de Vries <rinsedevries@kde.nl>, 2006.
msgid ""
msgstr ""
"Project-Id-Version: kdiff3_plugin\n"
"POT-Creation-Date: 2006-11-19 08:46+0100\n"
"PO-Revision-Date: 2006-11-27 00:11+0100\n"
"Last-Translator: Rinse de Vries <rinsedevries@kde.nl>\n"
"Language-Team: Dutch <kde-i18n-nl@kde.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: kdiff3plugin.cpp:97
msgid "KDiff3"
msgstr "KDiff3"
#: kdiff3plugin.cpp:104
#, c-format
msgid "Compare with %1"
msgstr "Vergelijken met %1"
#: kdiff3plugin.cpp:109
#, c-format
msgid "Merge with %1"
msgstr "Samenvoegen met %1"
#: kdiff3plugin.cpp:114
msgid "Save '%1' for later"
msgstr "'%1' voor later gebruik opslaan"
#: kdiff3plugin.cpp:119
msgid "3-way merge with base"
msgstr "3-weg samenvoeging met basis"
#: kdiff3plugin.cpp:125
msgid "Compare with ..."
msgstr "Vergelijken met..."
#: kdiff3plugin.cpp:137
msgid "Compare"
msgstr "Vergelijken"
#: kdiff3plugin.cpp:142
msgid "3 way comparison"
msgstr "3-weg vergelijking"
#: kdiff3plugin.cpp:145
msgid "About KDiff3 menu plugin ..."
msgstr "Info over KDiff3-menuplugin..."
#: kdiff3plugin.cpp:240
msgid ""
"KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n"
"\n"
msgstr ""
"KDif3-menuplugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3-website: http://kdiff3.sourceforge.net\n"
"\n"
#: kdiff3plugin.cpp:242
msgid ""
"Using the contextmenu extension:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"
"If the other file is somewhere else \"Save\" the first file for later. It will "
"appear in the \"Compare With ...\" submenu. Then use \"Compare With\" on second "
"file.\n"
"For a 3-way merge first \"Save\" the base file, then the branch to merge and "
"choose \"3-way merge with base\" on the other branch which will be used as "
"destination.\n"
"Same also applies to directory comparison and merge."
msgstr ""
"De contextmenu-extensie gebruiken:\n"
"Voor eenvoudige vergelijking van 2 geselecteerde bestanden, kies "
"\"Vergelijken\".\n"
"Als het bestand ergens anders staat, sla dan het eerste bestand voor later "
"gebruik op. Het zal verschijnen in het submenu \"Vergelijken met...\". Gebruik "
"daarna \"Vergelijken met\" voor het tweede bestand.\n"
"Voor een 3-weg samenvoeging, sla eerst het basisbestand op, daarna de tak om "
"mee samen te voegen en kies daarna \"3-weg samenvoeging met basis\" op de tak "
"die gebruikt zal worden als bestemming.\n"
"Bovenstaande is ook van toepassing op het vergelijken en samenvoegen van "
"directories."

@ -0,0 +1,82 @@
msgid ""
msgstr ""
"Project-Id-Version: kdiff3_plugin\n"
"POT-Creation-Date: 2006-11-19 08:46+0100\n"
"PO-Revision-Date: 2006-11-19 14:49+0000\n"
"Last-Translator: José Nuno Coelho Pires <jncp@netcabo.pt>\n"
"Language-Team: pt <kde-i18n-pt@kde.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POFile-SpellExtra: Eibl Joachim KDiff\n"
#: kdiff3plugin.cpp:97
msgid "KDiff3"
msgstr "KDiff3"
#: kdiff3plugin.cpp:104
#, c-format
msgid "Compare with %1"
msgstr "Comparar com o %1"
#: kdiff3plugin.cpp:109
#, c-format
msgid "Merge with %1"
msgstr "Juntar com o %1"
#: kdiff3plugin.cpp:114
msgid "Save '%1' for later"
msgstr "Gravar o '%1' para mais tarde"
#: kdiff3plugin.cpp:119
msgid "3-way merge with base"
msgstr "Junção de 3-vias com a base"
#: kdiff3plugin.cpp:125
msgid "Compare with ..."
msgstr "Comparar com ..."
#: kdiff3plugin.cpp:137
msgid "Compare"
msgstr "Comparar"
#: kdiff3plugin.cpp:142
msgid "3 way comparison"
msgstr "Comparação de 3 vias"
#: kdiff3plugin.cpp:145
msgid "About KDiff3 menu plugin ..."
msgstr "Acerca do 'plugin' do menu do KDiff3 ..."
#: kdiff3plugin.cpp:240
msgid ""
"KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n"
"\n"
msgstr ""
"'Plugin' do Menu do KDiff3: Copyright (C) 2006 Joachim Eibl\n"
"Página Web do KDiff3: http://kdiff3.sourceforge.net\n"
"\n"
#: kdiff3plugin.cpp:242
msgid ""
"Using the contextmenu extension:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"
"If the other file is somewhere else \"Save\" the first file for later. It will "
"appear in the \"Compare With ...\" submenu. Then use \"Compare With\" on second "
"file.\n"
"For a 3-way merge first \"Save\" the base file, then the branch to merge and "
"choose \"3-way merge with base\" on the other branch which will be used as "
"destination.\n"
"Same also applies to directory comparison and merge."
msgstr ""
"Usar a extensão do menu de contexto:\n"
"Para uma comparação simples de dois ficheiros seleccionados, escolha "
"\"Comparar\".\n"
"Se o outro ficheiro estiver noutro local, opte por \"Gravar\" o primeiro "
"ficheiro para mais tarde. Este irá aparecer no submenu \"Comparar Com ...\". "
"Depois, use o \"Comparar Com\" no segundo ficheiro.\n"
"Para uma junção de 3 vias, primeiro escolha \"Gravar\" o ficheiro de base, "
"depois a ramificação a juntar e finalmente \"junção de 3 vias com a base\" na "
"outra ramificação que será usada como destino.\n"
"O mesmo se aplica também à comparação e junção de pastas."

@ -0,0 +1,85 @@
# translation of kdiff3_plugin.po to Brazilian Portuguese
#
# Diniz Bortolotto <diniz.bb@gmail.com>, 2006.
msgid ""
msgstr ""
"Project-Id-Version: kdiff3_plugin\n"
"POT-Creation-Date: 2006-11-19 08:46+0100\n"
"PO-Revision-Date: 2006-11-26 22:39-0200\n"
"Last-Translator: Diniz Bortolotto <diniz.bb@gmail.com>\n"
"Language-Team: Brazilian Portuguese <kde-i18n-pt_br@kde.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: kdiff3plugin.cpp:97
msgid "KDiff3"
msgstr "KDiff3"
#: kdiff3plugin.cpp:104
#, c-format
msgid "Compare with %1"
msgstr "Comparar com %1"
#: kdiff3plugin.cpp:109
#, c-format
msgid "Merge with %1"
msgstr "Mesclar com %1"
#: kdiff3plugin.cpp:114
msgid "Save '%1' for later"
msgstr "Salvar '%1' para mais tarde"
#: kdiff3plugin.cpp:119
msgid "3-way merge with base"
msgstr "Mesclagem de 3-vias com a base"
#: kdiff3plugin.cpp:125
msgid "Compare with ..."
msgstr "Comparar com ..."
#: kdiff3plugin.cpp:137
msgid "Compare"
msgstr "Comparar"
#: kdiff3plugin.cpp:142
msgid "3 way comparison"
msgstr "Comparação de 3 vias"
#: kdiff3plugin.cpp:145
msgid "About KDiff3 menu plugin ..."
msgstr "Sobre KDiff3 menu plugin ..."
#: kdiff3plugin.cpp:240
msgid ""
"KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n"
"\n"
msgstr ""
"KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n"
"\n"
#: kdiff3plugin.cpp:242
msgid ""
"Using the contextmenu extension:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"
"If the other file is somewhere else \"Save\" the first file for later. It will "
"appear in the \"Compare With ...\" submenu. Then use \"Compare With\" on second "
"file.\n"
"For a 3-way merge first \"Save\" the base file, then the branch to merge and "
"choose \"3-way merge with base\" on the other branch which will be used as "
"destination.\n"
"Same also applies to directory comparison and merge."
msgstr ""
"Usando a extensão menu de contexto:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"
"If the other file is somewhere else \"Save\" the first file for later. It will "
"appear in the \"Compare With ...\" submenu. Then use \"Compare With\" on second "
"file.\n"
"For a 3-way merge first \"Save\" the base file, then the branch to merge and "
"choose \"3-way merge with base\" on the other branch which will be used as "
"destination.\n"
"Same also applies to directory comparison and merge."

@ -0,0 +1,73 @@
# translation of kdiff3_plugin.po to Slovak
#
# Richard Fric <Richard.Fric@kdemail.net>, 2006.
msgid ""
msgstr ""
"Project-Id-Version: kdiff3_plugin\n"
"POT-Creation-Date: 2006-11-19 08:46+0100\n"
"PO-Revision-Date: 2006-11-19 16:30+0100\n"
"Last-Translator: Richard Fric <Richard.Fric@kdemail.net>\n"
"Language-Team: Slovak <sk@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
#: kdiff3plugin.cpp:97
msgid "KDiff3"
msgstr "KDiff3"
#: kdiff3plugin.cpp:104
#, c-format
msgid "Compare with %1"
msgstr ""
#: kdiff3plugin.cpp:109
#, c-format
msgid "Merge with %1"
msgstr ""
#: kdiff3plugin.cpp:114
msgid "Save '%1' for later"
msgstr ""
#: kdiff3plugin.cpp:119
msgid "3-way merge with base"
msgstr ""
#: kdiff3plugin.cpp:125
msgid "Compare with ..."
msgstr ""
#: kdiff3plugin.cpp:137
msgid "Compare"
msgstr ""
#: kdiff3plugin.cpp:142
msgid "3 way comparison"
msgstr ""
#: kdiff3plugin.cpp:145
msgid "About KDiff3 menu plugin ..."
msgstr ""
#: kdiff3plugin.cpp:240
msgid ""
"KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n"
"\n"
msgstr ""
#: kdiff3plugin.cpp:242
msgid ""
"Using the contextmenu extension:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"
"If the other file is somewhere else \"Save\" the first file for later. It will "
"appear in the \"Compare With ...\" submenu. Then use \"Compare With\" on second "
"file.\n"
"For a 3-way merge first \"Save\" the base file, then the branch to merge and "
"choose \"3-way merge with base\" on the other branch which will be used as "
"destination.\n"
"Same also applies to directory comparison and merge."
msgstr ""

@ -0,0 +1,84 @@
# translation of kdiff3_plugin.po to Swedish
#
# Stefan Asserhäll <stefan.asserhall@comhem.se>, 2006.
msgid ""
msgstr ""
"Project-Id-Version: kdiff3_plugin\n"
"POT-Creation-Date: 2006-11-19 08:46+0100\n"
"PO-Revision-Date: 2006-11-19 20:10+0100\n"
"Last-Translator: Stefan Asserhäll <stefan.asserhall@comhem.se>\n"
"Language-Team: Swedish <sv@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
#: kdiff3plugin.cpp:97
msgid "KDiff3"
msgstr "Kdiff3"
#: kdiff3plugin.cpp:104
#, c-format
msgid "Compare with %1"
msgstr "Jämför med %1"
#: kdiff3plugin.cpp:109
#, c-format
msgid "Merge with %1"
msgstr "Sammanfoga med %1"
#: kdiff3plugin.cpp:114
msgid "Save '%1' for later"
msgstr "Spara '%1' till senare"
#: kdiff3plugin.cpp:119
msgid "3-way merge with base"
msgstr "Trevägs sammanfogning med bas"
#: kdiff3plugin.cpp:125
msgid "Compare with ..."
msgstr "Jämför med..."
#: kdiff3plugin.cpp:137
msgid "Compare"
msgstr "Jämför"
#: kdiff3plugin.cpp:142
msgid "3 way comparison"
msgstr "Trevägs jämförelse"
#: kdiff3plugin.cpp:145
msgid "About KDiff3 menu plugin ..."
msgstr "Om Kdiff3-menyinsticksprogram..."
#: kdiff3plugin.cpp:240
msgid ""
"KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n"
"\n"
msgstr ""
"Kdiff3 menyinsticksprogram: Copyright © 2006 Joachim Eibl\n"
"Kdiff3 hemsida: http://kdiff3.sourceforge.net\n"
"\n"
#: kdiff3plugin.cpp:242
msgid ""
"Using the contextmenu extension:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"
"If the other file is somewhere else \"Save\" the first file for later. It will "
"appear in the \"Compare With ...\" submenu. Then use \"Compare With\" on second "
"file.\n"
"For a 3-way merge first \"Save\" the base file, then the branch to merge and "
"choose \"3-way merge with base\" on the other branch which will be used as "
"destination.\n"
"Same also applies to directory comparison and merge."
msgstr ""
"Användning av utökningen med sammanhangsberoende meny:\n"
"För enkel jämförelse av två markerade filer, välj \"Jämför\".\n"
"Om den andra filen finns någon annanstans, \"Spara\" den först filen till "
"senare. Den syns i undermenyn \"Jämför med...\". Använd därefter \"Jämför med\" "
"för den andra filen.\n"
"För en trevägs sammanfogning, \"Spara\" först basfilen, därefter grenen att "
"sammanfoga, och välj \"Trevägs sammanfogning med bas\" för den andra grenen som "
"används som mål.\n"
"Detsamma gäller också för katalogjämförelse och sammanfogning."

@ -0,0 +1,75 @@
# translation of kdiff3_plugin.po to Türkçe
#
# Engin Çağatay <engincagatay@yahoo.com>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: kdiff3_plugin\n"
"POT-Creation-Date: 2006-11-19 08:46+0100\n"
"PO-Revision-Date: 2007-01-21 21:58+0200\n"
"Last-Translator: Engin Çağatay <engincagatay@yahoo.com>\n"
"Language-Team: Türkçe <yerellestirme@kde.org.tr>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
#: kdiff3plugin.cpp:97
msgid "KDiff3"
msgstr "KDiff3"
#: kdiff3plugin.cpp:104
#, c-format
msgid "Compare with %1"
msgstr "%1 ile karşılaştır"
#: kdiff3plugin.cpp:109
#, c-format
msgid "Merge with %1"
msgstr "%1 ile birleştir"
#: kdiff3plugin.cpp:114
msgid "Save '%1' for later"
msgstr ""
#: kdiff3plugin.cpp:119
msgid "3-way merge with base"
msgstr "Temel ile 3-yollu birleştirme"
#: kdiff3plugin.cpp:125
msgid "Compare with ..."
msgstr "Karşılaştır..."
#: kdiff3plugin.cpp:137
msgid "Compare"
msgstr "Karşılaştır"
#: kdiff3plugin.cpp:142
msgid "3 way comparison"
msgstr "3 yollu karşılaştırma"
#: kdiff3plugin.cpp:145
msgid "About KDiff3 menu plugin ..."
msgstr "KDiff3 menü eklentisi hakkında ..."
#: kdiff3plugin.cpp:240
msgid ""
"KDiff3 Menu Plugin: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 homepage: http://kdiff3.sourceforge.net\n"
"\n"
msgstr ""
"KDiff3 Menü Eklentisi: Copyright (C) 2006 Joachim Eibl\n"
"KDiff3 ana sayfası: http://kdiff3.sourceforge.net\n"
"\n"
#: kdiff3plugin.cpp:242
msgid ""
"Using the contextmenu extension:\n"
"For simple comparison of two selected 2 files choose \"Compare\".\n"
"If the other file is somewhere else \"Save\" the first file for later. It will "
"appear in the \"Compare With ...\" submenu. Then use \"Compare With\" on second "
"file.\n"
"For a 3-way merge first \"Save\" the base file, then the branch to merge and "
"choose \"3-way merge with base\" on the other branch which will be used as "
"destination.\n"
"Same also applies to directory comparison and merge."
msgstr ""

@ -0,0 +1 @@
POFILES = AUTO

@ -0,0 +1,133 @@
README for KDiff3-Internationalisation (i18n)
=============================================
Author: Joachim Eibl 2004
This text is for you, if you might want to help translating KDiff3 or just want
to learn how this i18n-thing works.
grep "Language-Team" *.po
az Azerbaijani <translation-team-az@lists.sourceforge.net>
ca LANGUAGE <LL@li.org>
da Danish <dansk@klid.dk>
de Deutsch <kde-i18n-de@kde.org>
en_GB British English <kde-en-gb@kde.me.uk>
es espaniol <kde-es@kybs.de>
et Estonian <kde-et@linux.ee>
fr French <kde-francophone@kde.org>
hu Hungarian <kde-lista@sophia.jpte.hu>
it Italian <kde-i18n-it@kde.org>
nl Nederlands <kde-i18n-nl@kde.org>
pl Polish
pt_BR Brazilian Portuguese <kde-i18n-pt_BR@mail.kde.org>
pt Portuguese <kde-i18n-pt@kde.org>
ro Romanian <ro-kde@egroups.com>
ru Russian <ru@li.org>
sr Serbian
sv Svenska <sv@li.org>
ta <tamilpc@ambalam.com>
tr Türkçe <tr@li.org>
zh_CN zh_CN <i18n-translation@lists.linux.net.cn>
Thanks to all translators!
The program was written with English as main language. But to allow automatic
translation of messages, every translatable text in the program was written as
i18n("translatable").
i18n() is a translator-function. If a translation table exists, at runtime the
function looks for the given string in that table and returns the translation.
The translation-table is created in 3 steps:
1. First a template-translation table kdiff3.pot should be created: Usually via
xgettext --keyword=i18n --keyword=I18N_NOOP -C -o ../po/kdiff3.pot *.cpp *.h
It contains all translatable strings of the program, but no translations.
(xgettext is usually part of package gettext-devel)
2. Translators create a translation for a specific language. Because we don't want
to modify the template now, we'll create a copy for each language.
e.g.: cp kdiff3.pot de.po
Using KBabel we can comfortably edit the translated strings.
e.g.: kbabel de.po
3. The last step is to create a fast lookup-table (*.gmo) from the po-file via
msgfmt, but this happens automatically during the build process.
(If a new po-file was added: make -f Makefile.cvs; configure; make)
Before starting to translate make sure nobody else is already doing it. It would
be a pity, if your precious time is wasted. Look at http://i18n.kde.org/, send a
message to the translation team coordinator for your language, and tell them that
you want to translate KDiff3. He'll inform you if you should proceed. Also read
the other docs on that site.
============
The following is for my own memory and for those who really want to learn dirty tricks and details:
The KDE-i18n team stores their results in SVN. But I would like to have an independent
copy of all translations in the po-directory of the source package. Actually it's just
copying and renaming, but simplified with these commands:
First fetch all available translations from the SVN-repository (access via websvn and wget)
wget http://websvn.kde.org/*checkout*/trunk/l10n/subdirs
for i in `cat subdirs`; do wget http://websvn.kde.org/*checkout*/trunk/l10n/$i/messages/extragear-utils/kdiff3.po -O $i.po; done
This was the explanation for translations within KDE.
But KDiff3 can also be compiled and run without KDE:
Since Qt was used for KDiff3, the first part is quite the same: Only the fast lookup-table
(*.qm-files) must be created with $QTDIR/bin/msg2qm (instead of msgfmt). ($QTDIR/tools/msg2qm)
Still one detail isn't right: Some strings are not translated, because under KDE their
translation is within KDE-libs or within Qt. But the translations are available:
For Qt-strings in $QTDIR/translations (already as .qm-files)
For KDE-libs in the SVN-repository, where we can reuse the previous trick to get
all kdelibs*.po-files:
for i in `cat subdirs`; do wget http://websvn.kde.org/*checkout*/trunk/l10n/$i/messages/kdelibs/kdelibs.po -O kdelibs_$i.po; done
Finally the program must only read the correct translation tables:
QTranslator kdiff3Translator( 0 );
kdiff3Translator.load( QString("kdiff3_")+QTextCodec::locale(), translationDir );
app.installTranslator( &kdiff3Translator );
QTranslator qtTranslator( 0 );
qtTranslator.load( QString("qt_")+QTextCodec::locale(), translationDir );
app.installTranslator( &qtTranslator );
QTranslator kdelibsTranslator( 0 );
kdelibsTranslator.load( QString("kdelibs_")+QTextCodec::locale(), translationDir );
app.installTranslator( &kdelibsTranslator );
This should do the job, if the translation-tables can be found.
The difficult part is: Where to search for the files, because this depends on
where the program was installed. (I didn't solve this puzzle yet.)
Because it's too much effort to copy all kdelibs*.po-files along: Here is a little info
about how to extract only the needed strings and to create the qm-files.
1. Only src/kreplacements/kreplacements.cpp contains strings, that were not covered by
the normal translations. Hence a special pot-file is needed.
xgettext --keyword=i18n --keyword=I18N_NOOP -C ../src/kreplacements/kreplacements.cpp -o kreplacements.pot
(xgettext is usually part of package gettext-devel)
2. Take only needed strings and translations from kdelibs*.po:
msgmerge --no-fuzzy-matching kdelibs_de.po kreplacements.pot >kreplacements_de.po
3. Concatenate the normal de.po and kreplacements_de.po:
msgcat --use-first de.po kreplacements_de.po >kdiff3_de.po
4. Finally create the fast lookup table:
$QTDIR/bin/msg2qm kdiff3_de.po kdiff3_de.qm
5. The intermediate files can then be deleted.
The script createqm does steps 2-5 for languages where a kdiff3.po-translation exists.

2318
po/ar.po

File diff suppressed because it is too large Load Diff

2312
po/az.po

File diff suppressed because it is too large Load Diff

2547
po/bg.po

File diff suppressed because it is too large Load Diff

2329
po/br.po

File diff suppressed because it is too large Load Diff

2304
po/ca.po

File diff suppressed because it is too large Load Diff

@ -0,0 +1,9 @@
for i in `cat subdirs` ; do
if [ -a $i.po ]; then
echo $i
msgmerge --no-fuzzy-matching kdelibspo/kdelibs_$i.po kreplacements.pot >kreplacements_$i.po
msgcat --use-first $i.po kreplacements_$i.po >kdiff3_$i.po
/usr/lib/qt3/bin/msg2qm kdiff3_$i.po kdiff3_$i.qm
rm kdiff3_$i.po kreplacements_$i.po
fi
done

2324
po/cs.po

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
cvs co kde-i18n/subdirs
for i in `cat kde-i18n/subdirs`; do cvs co kde-i18n/$i/messages/kdeextragear-1/kdiff3.po; done
for i in `cat kde-i18n/subdirs`; do cp -p kde-i18n/$i/messages/kdeextragear-1/kdiff3.po $i.po; done

2320
po/cy.po

File diff suppressed because it is too large Load Diff

2572
po/da.po

File diff suppressed because it is too large Load Diff

2570
po/de.po

File diff suppressed because it is too large Load Diff

2567
po/el.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2568
po/es.po

File diff suppressed because it is too large Load Diff

2519
po/et.po

File diff suppressed because it is too large Load Diff

2578
po/fr.po

File diff suppressed because it is too large Load Diff

2314
po/ga.po

File diff suppressed because it is too large Load Diff

2309
po/gl.po

File diff suppressed because it is too large Load Diff

2427
po/hi.po

File diff suppressed because it is too large Load Diff

2620
po/hu.po

File diff suppressed because it is too large Load Diff

2304
po/is.po

File diff suppressed because it is too large Load Diff

2544
po/it.po

File diff suppressed because it is too large Load Diff

2445
po/ja.po

File diff suppressed because it is too large Load Diff

2526
po/ka.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2604
po/lt.po

File diff suppressed because it is too large Load Diff

2511
po/nb.po

File diff suppressed because it is too large Load Diff

2572
po/nl.po

File diff suppressed because it is too large Load Diff

2560
po/pl.po

File diff suppressed because it is too large Load Diff

2546
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2309
po/ro.po

File diff suppressed because it is too large Load Diff

2430
po/ru.po

File diff suppressed because it is too large Load Diff

2875
po/rw.po

File diff suppressed because it is too large Load Diff

2309
po/sk.po

File diff suppressed because it is too large Load Diff

2586
po/sr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2523
po/sv.po

File diff suppressed because it is too large Load Diff

2586
po/ta.po

File diff suppressed because it is too large Load Diff

2450
po/tg.po

File diff suppressed because it is too large Load Diff

2473
po/tr.po

File diff suppressed because it is too large Load Diff

2541
po/uk.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,58 @@
# set the include path for X, qt and KDE
INCLUDES = $(all_includes)
# these are the headers for your project
noinst_HEADERS = kdiff3_part.h kdiff3_shell.h kdiff3.h common.h diff.h \
directorymergewindow.h merger.h optiondialog.h fileaccess.h version.h \
smalldialogs.h difftextwindow.h mergeresultwindow.h
# let automoc handle all of the meta source files (moc)
METASOURCES = AUTO
messages: rc.cpp
$(XGETTEXT) *.cpp -o $(podir)/kdiff3.pot
KDE_ICON = kdiff3
# this Makefile creates both a KPart application and a KPart
#########################################################################
# APPLICATION SECTION
#########################################################################
# this is the program that gets installed. it's name is used for all
# of the other Makefile.am variables
bin_PROGRAMS = kdiff3
# the application source, library search path, and link libraries
kdiff3_SOURCES = main.cpp kdiff3_shell.cpp
kdiff3_LDFLAGS = $(KDE_RPATH) $(all_libraries)
kdiff3_LDADD = $(LIB_KPARTS)
# this is where the desktop file will go
shelldesktopdir = $(kde_appsdir)/Development
shelldesktop_DATA = kdiff3.desktop
# this is where the shell's XML-GUI resource file goes
shellrcdir = $(kde_datadir)/kdiff3
shellrc_DATA = kdiff3_shell.rc
#########################################################################
# KPART SECTION
#########################################################################
kde_module_LTLIBRARIES = libkdiff3part.la
# the Part's source, library search path, and link libraries
libkdiff3part_la_SOURCES = kdiff3_part.cpp kdiff3.cpp directorymergewindow.cpp \
merger.cpp pdiff.cpp difftextwindow.cpp diff.cpp optiondialog.cpp \
mergeresultwindow.cpp fileaccess.cpp gnudiff_analyze.cpp gnudiff_io.cpp gnudiff_xmalloc.cpp \
common.cpp smalldialogs.cpp
libkdiff3part_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
libkdiff3part_la_LIBADD = $(LIB_KDEPRINT) $(LIB_KPARTS) $(LIB_KFILE)
# this is where the desktop file will go
partdesktopdir = $(kde_servicesdir)
partdesktop_DATA = kdiff3part.desktop
# this is where the part's XML-GUI resource file goes
partrcdir = $(kde_datadir)/kdiff3part
partrc_DATA = kdiff3_part.rc

@ -0,0 +1,425 @@
#############################################################################
# Makefile for building: kdiff3
# Generated by qmake (1.07a) (Qt 3.3.5) on: Sat Apr 8 20:11:51 2006
# Project: kdiff3.pro
# Template: app
# Command: $(QMAKE) -o Makefile kdiff3.pro
#############################################################################
####### Compiler, tools and options
CC = gcc
CXX = g++
LEX = flex
YACC = yacc
CFLAGS = -pipe -O2 -Wall -W -fPIC -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -D__USE_STD_IOSTREAM
CXXFLAGS = -pipe -O2 -Wall -W -fPIC -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -D__USE_STD_IOSTREAM
LEXFLAGS =
YACCFLAGS= -d
INCPATH = -I$(QTDIR)/mkspecs/default -I. -Ikreplacements -I/usr/include -I$(QTDIR)/include
LINK = g++
LFLAGS =
LIBS = $(SUBLIBS) -L/usr/lib/ -L$(QTDIR)/lib/ -L/usr/X11R6/lib/ -lqt-mt -lXext -lX11 -lm -lpthread
AR = ar cqs
RANLIB =
MOC = $(QTDIR)/bin/moc
UIC = $(QTDIR)/bin/uic
QMAKE = qmake
TAR = tar -cf
GZIP = gzip -9f
COPY = cp -f
COPY_FILE= $(COPY)
COPY_DIR = $(COPY) -r
INSTALL_FILE= $(COPY_FILE)
INSTALL_DIR = $(COPY_DIR)
DEL_FILE = rm -f
SYMLINK = ln -sf
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
####### Output directory
OBJECTS_DIR = ./
####### Files
HEADERS = version.h \
diff.h \
difftextwindow.h \
mergeresultwindow.h \
kdiff3.h \
merger.h \
optiondialog.h \
kreplacements/kreplacements.h \
directorymergewindow.h \
fileaccess.h \
kdiff3_shell.h \
kdiff3_part.h \
smalldialogs.h
SOURCES = main.cpp \
diff.cpp \
difftextwindow.cpp \
kdiff3.cpp \
merger.cpp \
mergeresultwindow.cpp \
optiondialog.cpp \
pdiff.cpp \
directorymergewindow.cpp \
fileaccess.cpp \
smalldialogs.cpp \
kdiff3_shell.cpp \
kdiff3_part.cpp \
gnudiff_analyze.cpp \
gnudiff_io.cpp \
gnudiff_xmalloc.cpp \
common.cpp \
kreplacements/kreplacements.cpp \
kreplacements/ShellContextMenu.cpp
OBJECTS = main.o \
diff.o \
difftextwindow.o \
kdiff3.o \
merger.o \
mergeresultwindow.o \
optiondialog.o \
pdiff.o \
directorymergewindow.o \
fileaccess.o \
smalldialogs.o \
kdiff3_shell.o \
kdiff3_part.o \
gnudiff_analyze.o \
gnudiff_io.o \
gnudiff_xmalloc.o \
common.o \
kreplacements.o \
ShellContextMenu.o
FORMS =
UICDECLS =
UICIMPLS =
SRCMOC = moc_difftextwindow.cpp \
moc_mergeresultwindow.cpp \
moc_kdiff3.cpp \
moc_optiondialog.cpp \
kreplacements/moc_kreplacements.cpp \
moc_directorymergewindow.cpp \
moc_fileaccess.cpp \
moc_kdiff3_shell.cpp \
moc_kdiff3_part.cpp \
moc_smalldialogs.cpp
OBJMOC = moc_difftextwindow.o \
moc_mergeresultwindow.o \
moc_kdiff3.o \
moc_optiondialog.o \
moc_kreplacements.o \
moc_directorymergewindow.o \
moc_fileaccess.o \
moc_kdiff3_shell.o \
moc_kdiff3_part.o \
moc_smalldialogs.o
DIST = kdiff3.pro
QMAKE_TARGET = kdiff3
DESTDIR =
TARGET = kdiff3
first: all
####### Implicit rules
.SUFFIXES: .c .o .cpp .cc .cxx .C
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
####### Build rules
all: $(TARGET)
$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(OBJCOMP) $(LIBS)
mocables: $(SRCMOC)
uicables: $(UICDECLS) $(UICIMPLS)
$(MOC):
( cd $(QTDIR)/src/moc && $(MAKE) )
dist:
@mkdir -p .tmp/kdiff3 && $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) .tmp/kdiff3/ && ( cd `dirname .tmp/kdiff3` && $(TAR) kdiff3.tar kdiff3 && $(GZIP) kdiff3.tar ) && $(MOVE) `dirname .tmp/kdiff3`/kdiff3.tar.gz . && $(DEL_FILE) -r .tmp/kdiff3
mocclean:
-$(DEL_FILE) $(OBJMOC)
-$(DEL_FILE) $(SRCMOC)
uiclean:
yaccclean:
lexclean:
clean: mocclean
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) *~ core *.core
####### Sub-libraries
distclean: clean
-$(DEL_FILE) $(TARGET) $(TARGET)
FORCE:
####### Compile
main.o: main.cpp kdiff3_shell.h \
version.h \
optiondialog.h \
common.h
diff.o: diff.cpp diff.h \
fileaccess.h \
optiondialog.h \
common.h
difftextwindow.o: difftextwindow.cpp difftextwindow.h \
merger.h \
optiondialog.h \
diff.h \
common.h \
fileaccess.h
kdiff3.o: kdiff3.cpp difftextwindow.h \
mergeresultwindow.h \
kdiff3.h \
optiondialog.h \
fileaccess.h \
kdiff3_part.h \
directorymergewindow.h \
smalldialogs.h \
xpm/downend.xpm \
xpm/currentpos.xpm \
xpm/down1arrow.xpm \
xpm/down2arrow.xpm \
xpm/upend.xpm \
xpm/up1arrow.xpm \
xpm/up2arrow.xpm \
xpm/prevunsolved.xpm \
xpm/nextunsolved.xpm \
xpm/iconA.xpm \
xpm/iconB.xpm \
xpm/iconC.xpm \
xpm/autoadvance.xpm \
xpm/showwhitespace.xpm \
xpm/showwhitespacechars.xpm \
xpm/showlinenumbers.xpm \
diff.h \
common.h
merger.o: merger.cpp merger.h \
diff.h \
common.h \
fileaccess.h \
optiondialog.h
mergeresultwindow.o: mergeresultwindow.cpp mergeresultwindow.h \
optiondialog.h \
diff.h \
common.h \
fileaccess.h
optiondialog.o: optiondialog.cpp optiondialog.h \
diff.h \
smalldialogs.h \
common.h \
fileaccess.h
pdiff.o: pdiff.cpp difftextwindow.h \
mergeresultwindow.h \
directorymergewindow.h \
smalldialogs.h \
kdiff3.h \
optiondialog.h \
fileaccess.h \
gnudiff_diff.h \
diff.h \
common.h \
gnudiff_system.h
directorymergewindow.o: directorymergewindow.cpp directorymergewindow.h \
optiondialog.h \
xpm/link_arrow.xpm \
xpm/file.xpm \
xpm/folder.xpm \
xpm/startmerge.xpm \
xpm/showequalfiles.xpm \
xpm/showfilesonlyina.xpm \
xpm/showfilesonlyinb.xpm \
xpm/showfilesonlyinc.xpm \
common.h \
fileaccess.h \
diff.h
fileaccess.o: fileaccess.cpp fileaccess.h \
optiondialog.h \
common.h
smalldialogs.o: smalldialogs.cpp smalldialogs.h \
optiondialog.h \
diff.h \
common.h \
fileaccess.h
kdiff3_shell.o: kdiff3_shell.cpp kdiff3_shell.h \
kdiff3.h \
diff.h \
common.h \
fileaccess.h \
optiondialog.h
kdiff3_part.o: kdiff3_part.cpp kdiff3_part.h \
kdiff3.h \
fileaccess.h \
version.h \
diff.h \
common.h \
optiondialog.h
gnudiff_analyze.o: gnudiff_analyze.cpp gnudiff_diff.h \
gnudiff_system.h
gnudiff_io.o: gnudiff_io.cpp gnudiff_diff.h \
gnudiff_system.h
gnudiff_xmalloc.o: gnudiff_xmalloc.cpp gnudiff_diff.h \
gnudiff_system.h
common.o: common.cpp common.h
kreplacements.o: kreplacements/kreplacements.cpp kreplacements/kreplacements.h \
common.h \
xpm/fileopen.xpm \
xpm/filesave.xpm \
xpm/fileprint.xpm \
kreplacements/kreplacements.moc
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o kreplacements.o kreplacements/kreplacements.cpp
ShellContextMenu.o: kreplacements/ShellContextMenu.cpp kreplacements/ShellContextMenu.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ShellContextMenu.o kreplacements/ShellContextMenu.cpp
moc_difftextwindow.o: moc_difftextwindow.cpp difftextwindow.h diff.h \
common.h \
fileaccess.h \
optiondialog.h
moc_mergeresultwindow.o: moc_mergeresultwindow.cpp mergeresultwindow.h diff.h \
common.h \
fileaccess.h \
optiondialog.h
moc_kdiff3.o: moc_kdiff3.cpp kdiff3.h diff.h \
common.h \
fileaccess.h \
optiondialog.h
moc_optiondialog.o: moc_optiondialog.cpp optiondialog.h
moc_kreplacements.o: kreplacements/moc_kreplacements.cpp kreplacements/kreplacements.h common.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_kreplacements.o kreplacements/moc_kreplacements.cpp
moc_directorymergewindow.o: moc_directorymergewindow.cpp directorymergewindow.h common.h \
fileaccess.h \
diff.h \
optiondialog.h
moc_fileaccess.o: moc_fileaccess.cpp fileaccess.h
moc_kdiff3_shell.o: moc_kdiff3_shell.cpp kdiff3_shell.h
moc_kdiff3_part.o: moc_kdiff3_part.cpp kdiff3_part.h
moc_smalldialogs.o: moc_smalldialogs.cpp smalldialogs.h diff.h \
common.h \
fileaccess.h \
optiondialog.h
moc_difftextwindow.cpp: $(MOC) difftextwindow.h
$(MOC) difftextwindow.h -o moc_difftextwindow.cpp
moc_mergeresultwindow.cpp: $(MOC) mergeresultwindow.h
$(MOC) mergeresultwindow.h -o moc_mergeresultwindow.cpp
moc_kdiff3.cpp: $(MOC) kdiff3.h
$(MOC) kdiff3.h -o moc_kdiff3.cpp
moc_optiondialog.cpp: $(MOC) optiondialog.h
$(MOC) optiondialog.h -o moc_optiondialog.cpp
kreplacements/moc_kreplacements.cpp: $(MOC) kreplacements/kreplacements.h
$(MOC) kreplacements/kreplacements.h -o kreplacements/moc_kreplacements.cpp
moc_directorymergewindow.cpp: $(MOC) directorymergewindow.h
$(MOC) directorymergewindow.h -o moc_directorymergewindow.cpp
moc_fileaccess.cpp: $(MOC) fileaccess.h
$(MOC) fileaccess.h -o moc_fileaccess.cpp
moc_kdiff3_shell.cpp: $(MOC) kdiff3_shell.h
$(MOC) kdiff3_shell.h -o moc_kdiff3_shell.cpp
moc_kdiff3_part.cpp: $(MOC) kdiff3_part.h
$(MOC) kdiff3_part.h -o moc_kdiff3_part.cpp
moc_smalldialogs.cpp: $(MOC) smalldialogs.h
$(MOC) smalldialogs.h -o moc_smalldialogs.cpp
####### Install
install_documentation: all
@$(CHK_DIR_EXISTS) "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/" || $(MKDIR) "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
-$(INSTALL_DIR) "../doc/da" "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
-$(INSTALL_DIR) "../doc/de" "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
-$(INSTALL_DIR) "../doc/en" "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
-$(INSTALL_DIR) "../doc/et" "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
-$(INSTALL_DIR) "../doc/fr" "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
-$(INSTALL_DIR) "../doc/it" "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
-$(INSTALL_DIR) "../doc/pt" "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
-$(INSTALL_DIR) "../doc/sv" "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
uninstall_documentation:
-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/da"
-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/de"
-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/en"
-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/et"
-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/fr"
-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/it"
-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/pt"
-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/sv"
-$(DEL_DIR) "$(INSTALL_ROOT)/usr/local/share/doc/kdiff3/"
install_target: all
@$(CHK_DIR_EXISTS) "$(INSTALL_ROOT)/usr/local/bin/" || $(MKDIR) "$(INSTALL_ROOT)/usr/local/bin/"
-$(INSTALL_FILE) "$(QMAKE_TARGET)" "$(INSTALL_ROOT)/usr/local/bin/$(QMAKE_TARGET)"
uninstall_target:
-$(DEL_FILE) "$(INSTALL_ROOT)/usr/local/bin/$(QMAKE_TARGET)"
-$(DEL_DIR) "$(INSTALL_ROOT)/usr/local/bin/"
install: install_documentation install_target
uninstall: uninstall_documentation uninstall_target

@ -0,0 +1,334 @@
// uninstallHelper.cpp : Defines the entry point for the console application.
//
#include <iostream>
#include <string>
#include <vector>
#include <list>
#include <windows.h>
#include <string.h>
#include <io.h>
//#define __stdcall
#ifndef KREPLACEMENTS_H
// For compilation download the NSIS source package and modify the following
// line to point to the exdll.h-file
#include "C:/Programme/NSIS/Contrib/ExDll/exdll.h"
#endif
struct ReplacementItem
{ char* fileType; char* operationType; };
ReplacementItem g_replacementTable[] = {
"text_file_delta", "xcompare",
"text_file_delta", "xmerge",
"whole_copy", "xcompare",
"whole_copy", "xmerge",
"z_text_file_delta", "xcompare",
"z_text_file_delta", "xmerge",
"z_whole_copy", "xcompare",
"z_whole_copy", "xmerge",
"_xml", "xcompare",
"_xml", "xmerge",
"_xml2", "xcompare",
"_xml2", "xmerge",
"_rftdef", "xcompare",
"_rftmap", "xcompare",
"_rftvp", "xcompare",
"_xtools", "xcompare",
0,0
};
struct LineItem
{
std::string fileType;
std::string opType;
std::string command;
std::string fileOpPart;
};
// Return true if successful, else false
bool readAndParseMapFile( const std::string& filename, std::list<LineItem>& lineItemList )
{
// Read file
FILE* pFile = fopen( filename.c_str(), "r" );
if (pFile)
{
fseek(pFile,0,SEEK_END);
int size = ftell(pFile);
fseek(pFile,0,SEEK_SET);
std::vector<char> buf( size );
fread( &buf[0], 1, size, pFile );
fclose( pFile );
// Replace strings
int lineStartPos=0;
int wordInLine = 0;
LineItem lineItem;
for( int i=0; i<size; )
{
if( buf[i] == '\n' || buf[i] == '\r' )
{
++i;
wordInLine = 0;
lineStartPos = i;
continue;
}
if( buf[i] == ' ' || buf[i] == '\t' )
{
++i;
continue;
}
else
{
int wordStartPos = i;
if (wordInLine<2)
{
while ( i<size && !( buf[i] == ' ' || buf[i] == '\t' ) )
++i;
std::string word( &buf[wordStartPos], i-wordStartPos );
if (wordInLine==0)
lineItem.fileType = word;
else
lineItem.opType = word;
++wordInLine;
}
else
{
lineItem.fileOpPart = std::string( &buf[lineStartPos], i-lineStartPos );
while ( i<size && !( buf[i] == '\n' || buf[i] == '\r' ) )
++i;
std::string word( &buf[wordStartPos], i-wordStartPos );
lineItem.command = word;
lineItemList.push_back( lineItem );
}
}
}
}
else
{
return false;
}
return true;
}
bool writeMapFile( const std::string& filename, const std::list<LineItem>& lineItemList )
{
FILE* pFile = fopen( filename.c_str(), "w" );
if (pFile)
{
std::list<LineItem>::const_iterator i = lineItemList.begin();
for( ; i!=lineItemList.end(); ++i )
{
const LineItem& li = *i;
fprintf( pFile, "%s%s\n", li.fileOpPart.c_str(), li.command.c_str() );
}
fclose( pFile );
}
else
{
return false;
}
return true;
}
std::string toUpper( const std::string& s )
{
std::string s2 = s;
for( unsigned int i=0; i<s.length(); ++i )
{
s2[i] = toupper( s2[i] );
}
return s2;
}
int integrateWithClearCase( const char* subCommand, const char* kdiff3CommandPath )
{
std::string installCommand = subCommand; // "install" or "uninstall" or "existsClearCase"
std::string kdiff3Command = kdiff3CommandPath;
/*
std::wstring installCommand = subCommand; // "install" or "uninstall"
std::wstring wKDiff3Command = kdiff3CommandPath;
std::string kdiff3Command;
kdiff3Command.reserve( wKDiff3Command.length()+1 );
kdiff3Command.resize( wKDiff3Command.length() );
BOOL bUsedDefaultChar = FALSE;
int successLen = WideCharToMultiByte( CP_ACP, 0,
wKDiff3Command.c_str(), int(wKDiff3Command.length()),
&kdiff3Command[0], int(kdiff3Command.length()), 0, &bUsedDefaultChar );
if ( successLen != kdiff3Command.length() || bUsedDefaultChar )
{
std::cerr << "KDiff3 command contains characters that don't map to ansi code page.\n"
"Aborting clearcase installation.\n"
"Try to install KDiff3 in another path that doesn't require special characters.\n";
return -1;
}
*/
// Try to locate cleartool, the clearcase tool in the path
char buffer[1000];
char* pLastPart = 0;
int len = SearchPathA(0, "cleartool.exe", 0, sizeof(buffer)/sizeof(buffer[0]),
buffer, &pLastPart );
if ( len>0 && len+1<int(sizeof(buffer)/sizeof(buffer[0])) && pLastPart )
{
pLastPart[-1] = 0;
pLastPart = strrchr( buffer, '\\' ); // cd up (because cleartool.exe is in bin subdir)
if ( pLastPart )
pLastPart[1]=0;
std::string path( buffer );
path += "lib\\mgrs\\map";
std::string bakName = path + ".preKDiff3Install";
if ( installCommand == "existsClearCase")
{
return 1;
}
else if ( installCommand == "install")
{
std::list<LineItem> lineItemList;
bool bSuccess = readAndParseMapFile( path, lineItemList );
if ( !bSuccess )
{
std::cerr << "Error reading original map file.\n";
return -1;
}
// Create backup
if ( access( bakName.c_str(), 0 )!=0 ) // Create backup only if not exists yet
{
if ( rename( path.c_str(), bakName.c_str() ) )
{
std::cerr << "Error renaming original map file.\n";
return -1;
}
}
std::list<LineItem>::iterator i = lineItemList.begin();
for( ; i!=lineItemList.end(); ++i )
{
LineItem& li = *i;
for (int j=0;;++j)
{
ReplacementItem& ri = g_replacementTable[j];
if ( ri.fileType==0 || ri.operationType==0 )
break;
if ( li.fileType == ri.fileType && li.opType == ri.operationType )
{
li.command = kdiff3Command.c_str();
break;
}
}
}
bSuccess = writeMapFile( path, lineItemList );
if ( !bSuccess )
{
if ( rename( bakName.c_str(), path.c_str() ) )
std::cerr << "Error writing new map file, restoring old file also failed.\n";
else
std::cerr << "Error writing new map file, old file restored.\n";
return -1;
}
}
else if ( installCommand == "uninstall" )
{
std::list<LineItem> lineItemList;
bool bSuccess = readAndParseMapFile( path, lineItemList );
if ( !bSuccess )
{
std::cerr << "Error reading original map file\n.";
return -1;
}
std::list<LineItem> lineItemListBak;
bSuccess = readAndParseMapFile( bakName, lineItemListBak );
if ( !bSuccess )
{
std::cerr << "Error reading backup map file.\n";
return -1;
}
std::list<LineItem>::iterator i = lineItemList.begin();
for( ; i!=lineItemList.end(); ++i )
{
LineItem& li = *i;
if ((int)toUpper(li.command).find("KDIFF3")>=0)
{
std::list<LineItem>::const_iterator j = lineItemListBak.begin();
for (;j!=lineItemListBak.end();++j)
{
const LineItem& bi = *j; // backup iterator
if ( li.fileType == bi.fileType && li.opType == bi.opType )
{
li.command = bi.command;
break;
}
}
}
}
bSuccess = writeMapFile( path, lineItemList );
if ( !bSuccess )
{
std::cerr << "Error writing map file.";
return -1;
}
}
}
return 0;
}
#ifndef KREPLACEMENTS_H
extern "C"
void __declspec(dllexport) nsisPlugin(HWND hwndParent, int string_size,
char *variables, stack_t **stacktop,
extra_parameters *extra)
{
//g_hwndParent=hwndParent;
EXDLL_INIT();
{
std::string param1( g_stringsize, ' ' );
int retVal = popstring( &param1[0] );
if ( retVal == 0 )
{
std::string param2( g_stringsize, ' ' );
retVal = popstring( &param2[0] );
if ( retVal == 0 )
install( param1.c_str(), param2.c_str() );
return;
}
std::cerr << "Not enough parameters." << std::endl;
}
}
#endif
/*
int _tmain(int argc, _TCHAR* argv[])
{
if ( argc<3 )
{
std::cout << "This program is needed to install/uninstall KDiff3 for clearcase.\n"
"It tries to patch the map file (clearcase-subdir\\lib\\mgrs\\map)\n"
"Usage 1: ccInstHelper install pathToKdiff3.exe\n"
"Usage 2: ccInstHelper uninstall pathToKdiff3.exe\n"
"Backups of the original map files are created in the dir of the map file.\n";
}
else
{
return install( argv[1], argv[2] );
}
return 0;
}
*/

@ -0,0 +1,341 @@
/***************************************************************************
* Copyright (C) 2004-2007 by Joachim Eibl *
* joachim.eibl at gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "common.h"
#include <map>
#include <qfont.h>
#include <qcolor.h>
#include <qsize.h>
#include <qpoint.h>
#include <qstringlist.h>
#include <qtextstream.h>
ValueMap::ValueMap()
{
}
ValueMap::~ValueMap()
{
}
void ValueMap::save( QTextStream& ts )
{
std::map<QString,QString>::iterator i;
for( i=m_map.begin(); i!=m_map.end(); ++i)
{
QString key = i->first;
QString val = i->second;
ts << key << "=" << val << "\n";
}
}
QString ValueMap::getAsString()
{
QString result;
std::map<QString,QString>::iterator i;
for( i=m_map.begin(); i!=m_map.end(); ++i)
{
QString key = i->first;
QString val = i->second;
result += key + "=" + val + "\n";
}
return result;
}
void ValueMap::load( QTextStream& ts )
{
while ( !ts.eof() )
{ // until end of file...
QString s = ts.readLine(); // line of text excluding '\n'
int pos = s.find('=');
if( pos > 0 ) // seems not to have a tag
{
QString key = s.left(pos);
QString val = s.mid(pos+1);
m_map[key] = val;
}
}
}
/*
void ValueMap::load( const QString& s )
{
int pos=0;
while ( pos<(int)s.length() )
{ // until end of file...
int pos2 = s.find('=', pos);
int pos3 = s.find('\n', pos2 );
if (pos3<0)
pos3=s.length();
if( pos2 > 0 ) // seems not to have a tag
{
QString key = s.mid(pos, pos2-pos);
QString val = s.mid(pos2+1, pos3-pos2-1);
m_map[key] = val;
}
pos = pos3;
}
}
*/
// safeStringJoin and safeStringSplit allow to convert a stringlist into a string and back
// safely, even if the individual strings in the list contain the separator character.
QString safeStringJoin(const QStringList& sl, char sepChar, char metaChar )
{
// Join the strings in the list, using the separator ','
// If a string contains the separator character, it will be replaced with "\,".
// Any occurances of "\" (one backslash) will be replaced with "\\" (2 backslashes)
assert(sepChar!=metaChar);
QString sep;
sep += sepChar;
QString meta;
meta += metaChar;
QString safeString;
QStringList::const_iterator i;
for (i=sl.begin(); i!=sl.end(); ++i)
{
QString s = *i;
s.replace(meta, meta+meta); // "\" -> "\\"
s.replace(sep, meta+sep); // "," -> "\,"
if ( i==sl.begin() )
safeString = s;
else
safeString += sep + s;
}
return safeString;
}
// Split a string that was joined with safeStringJoin
QStringList safeStringSplit(const QString& s, char sepChar, char metaChar )
{
assert(sepChar!=metaChar);
QStringList sl;
// Miniparser
int i=0;
int len=s.length();
QString b;
for(i=0;i<len;++i)
{
if ( i+1<len && s[i]==metaChar && s[i+1]==metaChar ){ b+=metaChar; ++i; }
else if ( i+1<len && s[i]==metaChar && s[i+1]==sepChar ){ b+=sepChar; ++i; }
else if ( s[i]==sepChar ) // real separator
{
sl.push_back(b);
b="";
}
else { b+=s[i]; }
}
if ( !b.isEmpty() )
sl.push_back(b);
return sl;
}
static QString numStr(int n)
{
QString s;
s.setNum( n );
return s;
}
static QString subSection( const QString& s, int idx, char sep )
{
int pos=0;
while( idx>0 )
{
pos = s.find( sep, pos );
--idx;
if (pos<0) break;
++pos;
}
if ( pos>=0 )
{
int pos2 = s.find( sep, pos );
if ( pos2>0 )
return s.mid(pos, pos2-pos);
else
return s.mid(pos);
}
return "";
}
static int num( QString& s, int idx )
{
return subSection( s, idx, ',').toInt();
}
void ValueMap::writeEntry(const QString& k, const QFont& v )
{
m_map[k] = v.family() + "," + QString::number(v.pointSize()) + "," + (v.bold() ? "bold" : "normal");
}
void ValueMap::writeEntry(const QString& k, const QColor& v )
{
m_map[k] = numStr(v.red()) + "," + numStr(v.green()) + "," + numStr(v.blue());
}
void ValueMap::writeEntry(const QString& k, const QSize& v )
{
m_map[k] = numStr(v.width()) + "," + numStr(v.height());
}
void ValueMap::writeEntry(const QString& k, const QPoint& v )
{
m_map[k] = numStr(v.x()) + "," + numStr(v.y());
}
void ValueMap::writeEntry(const QString& k, int v )
{
m_map[k] = numStr(v);
}
void ValueMap::writeEntry(const QString& k, bool v )
{
m_map[k] = numStr(v);
}
void ValueMap::writeEntry(const QString& k, const QString& v )
{
m_map[k] = v;
}
void ValueMap::writeEntry(const QString& k, const char* v )
{
m_map[k] = v;
}
void ValueMap::writeEntry(const QString& k, const QStringList& v, char separator )
{
m_map[k] = safeStringJoin(v, separator);
}
QFont ValueMap::readFontEntry(const QString& k, QFont* defaultVal )
{
QFont f = *defaultVal;
std::map<QString,QString>::iterator i = m_map.find( k );
if ( i!=m_map.end() )
{
f.setFamily( subSection( i->second, 0, ',' ) );
f.setPointSize( subSection( i->second, 1, ',' ).toInt() );
f.setBold( subSection( i->second, 2, ',' )=="bold" );
//f.fromString(i->second);
}
return f;
}
QColor ValueMap::readColorEntry(const QString& k, QColor* defaultVal )
{
QColor c= *defaultVal;
std::map<QString,QString>::iterator i = m_map.find( k );
if ( i!=m_map.end() )
{
QString s = i->second;
c = QColor( num(s,0),num(s,1),num(s,2) );
}
return c;
}
QSize ValueMap::readSizeEntry(const QString& k, QSize* defaultVal )
{
QSize size = defaultVal ? *defaultVal : QSize(600,400);
std::map<QString,QString>::iterator i = m_map.find( k );
if ( i!=m_map.end() )
{
QString s = i->second;
size = QSize( num(s,0),num(s,1) );
}
return size;
}
QPoint ValueMap::readPointEntry(const QString& k, QPoint* defaultVal)
{
QPoint point = defaultVal ? *defaultVal : QPoint(0,0);
std::map<QString,QString>::iterator i = m_map.find( k );
if ( i!=m_map.end() )
{
QString s = i->second;
point = QPoint( num(s,0),num(s,1) );
}
return point;
}
bool ValueMap::readBoolEntry(const QString& k, bool bDefault )
{
bool b = bDefault;
std::map<QString,QString>::iterator i = m_map.find( k );
if ( i!=m_map.end() )
{
QString s = i->second;
b = (bool)num(s,0);
}
return b;
}
int ValueMap::readNumEntry(const QString& k, int iDefault )
{
int ival = iDefault;
std::map<QString,QString>::iterator i = m_map.find( k );
if ( i!=m_map.end() )
{
QString s = i->second;
ival = num(s,0);
}
return ival;
}
QString ValueMap::readEntry(const QString& k, const QString& sDefault )
{
QString sval = sDefault;
std::map<QString,QString>::iterator i = m_map.find( k );
if ( i!=m_map.end() )
{
sval = i->second;
}
return sval;
}
QStringList ValueMap::readListEntry(const QString& k, const QStringList& defaultVal, char separator )
{
QStringList strList;
std::map<QString,QString>::iterator i = m_map.find( k );
if ( i!=m_map.end() )
{
strList = safeStringSplit( i->second, separator );
return strList;
}
else
return defaultVal;
}

@ -0,0 +1,113 @@
/***************************************************************************
common.h - Things that are needed often
-------------------
begin : Mon Mar 18 2002
copyright : (C) 2002-2007 by Joachim Eibl
email : joachim.eibl at gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef _COMMON_H
#define _COMMON_H
#include <assert.h>
template< class T >
T min2( T x, T y )
{
return x<y ? x : y;
}
template< class T >
T max2( T x, T y )
{
return x>y ? x : y;
}
typedef unsigned char UINT8;
typedef unsigned short UINT16;
typedef unsigned int UINT32;
template <class T>
T min3( T d1, T d2, T d3 )
{
if ( d1 < d2 && d1 < d3 ) return d1;
if ( d2 < d3 ) return d2;
return d3;
}
template <class T>
T max3( T d1, T d2, T d3 )
{
if ( d1 > d2 && d1 > d3 ) return d1;
if ( d2 > d3 ) return d2;
return d3;
}
template <class T>
T minMaxLimiter( T d, T minimum, T maximum )
{
assert(minimum<=maximum);
if ( d < minimum ) return minimum;
if ( d > maximum ) return maximum;
return d;
}
#include <map>
#include <qstring.h>
class QFont;
class QColor;
class QSize;
class QPoint;
class QStringList;
class QTextStream;
class ValueMap
{
private:
std::map<QString,QString> m_map;
public:
ValueMap();
virtual ~ValueMap();
void save( QTextStream& ts );
void load( QTextStream& ts );
QString getAsString();
// void load( const QString& s );
virtual void writeEntry(const QString&, const QFont& );
virtual void writeEntry(const QString&, const QColor& );
virtual void writeEntry(const QString&, const QSize& );
virtual void writeEntry(const QString&, const QPoint& );
virtual void writeEntry(const QString&, int );
virtual void writeEntry(const QString&, bool );
virtual void writeEntry(const QString&, const QStringList&, char separator );
virtual void writeEntry(const QString&, const QString& );
virtual void writeEntry(const QString&, const char* );
virtual QFont readFontEntry (const QString&, QFont* defaultVal );
virtual QColor readColorEntry(const QString&, QColor* defaultVal );
virtual QSize readSizeEntry (const QString&, QSize* defaultVal );
virtual QPoint readPointEntry(const QString&, QPoint* defaultVal );
virtual bool readBoolEntry (const QString&, bool bDefault );
virtual int readNumEntry (const QString&, int iDefault );
virtual QStringList readListEntry (const QString&, const QStringList& defaultVal, char separator );
virtual QString readEntry (const QString&, const QString& );
};
QStringList safeStringSplit(const QString& s, char sepChar=',', char metaChar='\\' );
QString safeStringJoin(const QStringList& sl, char sepChar=',', char metaChar='\\' );
#endif

File diff suppressed because it is too large Load Diff

@ -0,0 +1,462 @@
/***************************************************************************
diff.h - description
-------------------
begin : Mon Mar 18 2002
copyright : (C) 2002-2007 by Joachim Eibl
email : joachim.eibl at gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef DIFF_H
#define DIFF_H
#include <qwidget.h>
#include <qpixmap.h>
#include <qtimer.h>
#include <qframe.h>
#include <qtextstream.h>
#include <qpainter.h>
#include <list>
#include <vector>
#include <assert.h>
#include "common.h"
#include "fileaccess.h"
class OptionDialog;
// Each range with matching elements is followed by a range with differences on either side.
// Then again range of matching elements should follow.
struct Diff
{
int nofEquals;
int diff1;
int diff2;
Diff(int eq, int d1, int d2){nofEquals=eq; diff1=d1; diff2=d2; }
};
typedef std::list<Diff> DiffList;
struct LineData
{
const QChar* pLine;
const QChar* pFirstNonWhiteChar;
int size;
LineData(){ pLine=0; pFirstNonWhiteChar=0; size=0; /*occurances=0;*/ bContainsPureComment=false; }
int width(int tabSize) const; // Calcs width considering tabs.
//int occurances;
bool whiteLine() const { return pFirstNonWhiteChar-pLine == size; }
bool bContainsPureComment;
};
class Diff3LineList;
class Diff3LineVector;
struct DiffBufferInfo
{
const LineData* m_pLineDataA;
const LineData* m_pLineDataB;
const LineData* m_pLineDataC;
int m_sizeA;
int m_sizeB;
int m_sizeC;
const Diff3LineList* m_pDiff3LineList;
const Diff3LineVector* m_pDiff3LineVector;
void init( Diff3LineList* d3ll, const Diff3LineVector* d3lv,
const LineData* pldA, int sizeA, const LineData* pldB, int sizeB, const LineData* pldC, int sizeC );
};
struct Diff3Line
{
int lineA;
int lineB;
int lineC;
bool bAEqC : 1; // These are true if equal or only white-space changes exist.
bool bBEqC : 1;
bool bAEqB : 1;
bool bWhiteLineA : 1;
bool bWhiteLineB : 1;
bool bWhiteLineC : 1;
DiffList* pFineAB; // These are 0 only if completely equal or if either source doesn't exist.
DiffList* pFineBC;
DiffList* pFineCA;
int linesNeededForDisplay; // Due to wordwrap
int sumLinesNeededForDisplay; // For fast conversion to m_diff3WrapLineVector
DiffBufferInfo* m_pDiffBufferInfo; // For convenience
Diff3Line()
{
lineA=-1; lineB=-1; lineC=-1;
bAEqC=false; bAEqB=false; bBEqC=false;
pFineAB=0; pFineBC=0; pFineCA=0;
linesNeededForDisplay=1;
sumLinesNeededForDisplay=0;
bWhiteLineA=false; bWhiteLineB=false; bWhiteLineC=false;
m_pDiffBufferInfo=0;
}
~Diff3Line()
{
if (pFineAB!=0) delete pFineAB;
if (pFineBC!=0) delete pFineBC;
if (pFineCA!=0) delete pFineCA;
pFineAB=0; pFineBC=0; pFineCA=0;
}
bool operator==( const Diff3Line& d3l )
{
return lineA == d3l.lineA && lineB == d3l.lineB && lineC == d3l.lineC
&& bAEqB == d3l.bAEqB && bAEqC == d3l.bAEqC && bBEqC == d3l.bBEqC;
}
const LineData* getLineData( int src ) const
{
assert( m_pDiffBufferInfo!=0 );
if ( src == 1 && lineA >= 0 ) return &m_pDiffBufferInfo->m_pLineDataA[lineA];
if ( src == 2 && lineB >= 0 ) return &m_pDiffBufferInfo->m_pLineDataB[lineB];
if ( src == 3 && lineC >= 0 ) return &m_pDiffBufferInfo->m_pLineDataC[lineC];
return 0;
}
QString getString( int src ) const
{
const LineData* pld = getLineData(src);
if ( pld )
return QString( pld->pLine, pld->size);
else
return QString();
}
int getLineInFile( int src ) const
{
if ( src == 1 ) return lineA;
if ( src == 2 ) return lineB;
if ( src == 3 ) return lineC;
return -1;
}
};
class Diff3LineList : public std::list<Diff3Line>
{
};
class Diff3LineVector : public std::vector<Diff3Line*>
{
};
class Diff3WrapLine
{
public:
Diff3Line* pD3L;
int diff3LineIndex;
int wrapLineOffset;
int wrapLineLength;
};
typedef std::vector<Diff3WrapLine> Diff3WrapLineVector;
class TotalDiffStatus
{
public:
TotalDiffStatus(){ reset(); }
void reset() {bBinaryAEqC=false; bBinaryBEqC=false; bBinaryAEqB=false;
bTextAEqC=false; bTextBEqC=false; bTextAEqB=false;
nofUnsolvedConflicts=0; nofSolvedConflicts=0;
nofWhitespaceConflicts=0;
}
bool bBinaryAEqC;
bool bBinaryBEqC;
bool bBinaryAEqB;
bool bTextAEqC;
bool bTextBEqC;
bool bTextAEqB;
int nofUnsolvedConflicts;
int nofSolvedConflicts;
int nofWhitespaceConflicts;
};
// Three corresponding ranges. (Minimum size of a valid range is one line.)
class ManualDiffHelpEntry
{
public:
ManualDiffHelpEntry() { lineA1=-1; lineA2=-1;
lineB1=-1; lineB2=-1;
lineC1=-1; lineC2=-1; }
int lineA1;
int lineA2;
int lineB1;
int lineB2;
int lineC1;
int lineC2;
int& firstLine( int winIdx )
{
return winIdx==1 ? lineA1 : (winIdx==2 ? lineB1 : lineC1 );
}
int& lastLine( int winIdx )
{
return winIdx==1 ? lineA2 : (winIdx==2 ? lineB2 : lineC2 );
}
bool isLineInRange( int line, int winIdx )
{
return line>=0 && line>=firstLine(winIdx) && line<=lastLine(winIdx);
}
bool operator==(const ManualDiffHelpEntry& r) const
{
return lineA1 == r.lineA1 && lineB1 == r.lineB1 && lineC1 == r.lineC1 &&
lineA2 == r.lineA2 && lineB2 == r.lineB2 && lineC2 == r.lineC2;
}
};
// A list of corresponding ranges
typedef std::list<ManualDiffHelpEntry> ManualDiffHelpList;
void calcDiff3LineListUsingAB(
const DiffList* pDiffListAB,
Diff3LineList& d3ll
);
void calcDiff3LineListUsingAC(
const DiffList* pDiffListBC,
Diff3LineList& d3ll
);
void calcDiff3LineListUsingBC(
const DiffList* pDiffListBC,
Diff3LineList& d3ll
);
void correctManualDiffAlignment( Diff3LineList& d3ll, ManualDiffHelpList* pManualDiffHelpList );
class SourceData
{
public:
SourceData();
~SourceData();
void setOptionDialog( OptionDialog* pOptionDialog );
int getSizeLines() const;
int getSizeBytes() const;
const char* getBuf() const;
const LineData* getLineDataForDisplay() const;
const LineData* getLineDataForDiff() const;
void setFilename(const QString& filename);
void setFileAccess( const FileAccess& fa );
//FileAccess& getFileAccess();
QString getFilename();
void setAliasName(const QString& a);
QString getAliasName();
bool isEmpty(); // File was set
bool hasData(); // Data was readable
bool isText(); // is it pure text (vs. binary data)
bool isFromBuffer(); // was it set via setData() (vs. setFileAccess() or setFilename())
void setData( const QString& data );
bool isValid(); // Either no file is specified or reading was successful
void readAndPreprocess(QTextCodec* pEncoding, bool bAutoDetectUnicode );
bool saveNormalDataAs( const QString& fileName );
bool isBinaryEqualWith( const SourceData& other ) const;
void reset();
QTextCodec* getEncoding() const { return m_pEncoding; }
private:
QTextCodec* detectEncoding( const QString& fileName, QTextCodec* pFallbackCodec );
QString m_aliasName;
FileAccess m_fileAccess;
OptionDialog* m_pOptionDialog;
QString m_tempInputFileName;
struct FileData
{
FileData(){ m_pBuf=0; m_size=0; m_vSize=0; m_bIsText=false; }
~FileData(){ reset(); }
const char* m_pBuf;
int m_size;
int m_vSize; // Nr of lines in m_pBuf1 and size of m_v1, m_dv12 and m_dv13
QString m_unicodeBuf;
std::vector<LineData> m_v;
bool m_bIsText;
bool readFile( const QString& filename );
bool writeFile( const QString& filename );
void preprocess(bool bPreserveCR, QTextCodec* pEncoding );
void reset();
void removeComments();
void copyBufFrom( const FileData& src );
};
FileData m_normalData;
FileData m_lmppData;
QTextCodec* m_pEncoding;
};
void calcDiff3LineListTrim( Diff3LineList& d3ll, const LineData* pldA, const LineData* pldB, const LineData* pldC, ManualDiffHelpList* pManualDiffHelpList );
void calcWhiteDiff3Lines( Diff3LineList& d3ll, const LineData* pldA, const LineData* pldB, const LineData* pldC );
void calcDiff3LineVector( Diff3LineList& d3ll, Diff3LineVector& d3lv );
void debugLineCheck( Diff3LineList& d3ll, int size, int idx );
class QStatusBar;
class Selection
{
public:
Selection(){ reset(); oldLastLine=-1; lastLine=-1; oldFirstLine=-1; }
int firstLine;
int firstPos;
int lastLine;
int lastPos;
int oldLastLine;
int oldFirstLine;
bool bSelectionContainsData;
bool isEmpty() { return firstLine==-1 || (firstLine==lastLine && firstPos==lastPos) || bSelectionContainsData==false;}
void reset(){
oldFirstLine=firstLine;
oldLastLine =lastLine;
firstLine=-1;
lastLine=-1;
bSelectionContainsData = false;
}
void start( int l, int p ) { firstLine = l; firstPos = p; }
void end( int l, int p ) {
if ( oldLastLine == -1 )
oldLastLine = lastLine;
lastLine = l;
lastPos = p;
}
bool within( int l, int p );
bool lineWithin( int l );
int firstPosInLine(int l);
int lastPosInLine(int l);
int beginLine(){
if (firstLine<0 && lastLine<0) return -1;
return max2(0,min2(firstLine,lastLine));
}
int endLine(){
if (firstLine<0 && lastLine<0) return -1;
return max2(firstLine,lastLine);
}
int beginPos() { return firstLine==lastLine ? min2(firstPos,lastPos) :
firstLine<lastLine ? (firstLine<0?0:firstPos) : (lastLine<0?0:lastPos); }
int endPos() { return firstLine==lastLine ? max2(firstPos,lastPos) :
firstLine<lastLine ? lastPos : firstPos; }
};
class OptionDialog;
QCString encodeString( const QString& s );
// Helper class that swaps left and right for some commands.
class MyPainter : public QPainter
{
int m_factor;
int m_xOffset;
int m_fontWidth;
public:
MyPainter(const QPaintDevice* pd, bool bRTL, int width, int fontWidth)
: QPainter(pd)
{
if (bRTL)
{
m_fontWidth = fontWidth;
m_factor = -1;
m_xOffset = width-1;
}
else
{
m_fontWidth = 0;
m_factor = 1;
m_xOffset = 0;
}
}
void fillRect( int x, int y, int w, int h, const QBrush& b )
{
if (m_factor==1)
QPainter::fillRect( m_xOffset + x , y, w, h, b );
else
QPainter::fillRect( m_xOffset - x - w, y, w, h, b );
}
void drawText( int x, int y, const QString& s, bool bAdapt=false )
{
TextDirection td = (m_factor==1 || bAdapt == false) ? LTR : RTL;
QPainter::drawText( m_xOffset-m_fontWidth*s.length() + m_factor*x, y, s, -1, td );
}
void drawLine( int x1, int y1, int x2, int y2 )
{
QPainter::drawLine( m_xOffset + m_factor*x1, y1, m_xOffset + m_factor*x2, y2 );
}
};
void fineDiff(
Diff3LineList& diff3LineList,
int selector,
const LineData* v1,
const LineData* v2,
bool& bTextsTotalEqual
);
bool equal( const LineData& l1, const LineData& l2, bool bStrict );
inline bool isWhite( QChar c )
{
return c==' ' || c=='\t' || c=='\r';
}
/** Returns the number of equivalent spaces at position outPos.
*/
inline int tabber( int outPos, int tabSize )
{
return tabSize - ( outPos % tabSize );
}
/** Returns a line number where the linerange [line, line+nofLines] can
be displayed best. If it fits into the currently visible range then
the returned value is the current firstLine.
*/
int getBestFirstLine( int line, int nofLines, int firstLine, int visibleLines );
extern bool g_bIgnoreWhiteSpace;
extern bool g_bIgnoreTrivialMatches;
extern int g_bAutoSolve;
// Cursor conversions that consider g_tabSize.
int convertToPosInText( const QString& s, int posOnScreen, int tabSize );
int convertToPosOnScreen( const QString& s, int posInText, int tabSize );
enum e_CoordType { eFileCoords, eD3LLineCoords, eWrapCoords };
void calcTokenPos( const QString&, int posOnScreen, int& pos1, int& pos2, int tabSize );
QString calcHistorySortKey( const QString& keyOrder, QRegExp& matchedRegExpr, const QStringList& parenthesesGroupList );
bool findParenthesesGroups( const QString& s, QStringList& sl );
#endif

File diff suppressed because it is too large Load Diff

@ -0,0 +1,135 @@
/***************************************************************************
difftextwindow.h - description
-------------------
begin : Mon Mar 18 2002
copyright : (C) 2002-2007 by Joachim Eibl
email : joachim.eibl at gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef DIFFTEXTWINDOW_H
#define DIFFTEXTWINDOW_H
#include "diff.h"
#include <qwidget.h>
class QStatusBar;
class OptionDialog;
class DiffTextWindowData;
class DiffTextWindowFrame;
class DiffTextWindow : public QWidget
{
Q_OBJECT
public:
DiffTextWindow(
DiffTextWindowFrame* pParent,
QStatusBar* pStatusBar,
OptionDialog* pOptionDialog,
int winIdx
);
~DiffTextWindow();
void init(
const QString& fileName,
const LineData* pLineData,
int size,
const Diff3LineVector* pDiff3LineVector,
const ManualDiffHelpList* pManualDiffHelpList,
bool bTriple
);
void reset();
void convertToLinePos( int x, int y, int& line, int& pos );
QString getSelection();
int getFirstLine();
int calcTopLineInFile( int firstLine );
int getNofColumns();
int getNofLines();
int getNofVisibleLines();
int getNofVisibleColumns();
int convertLineToDiff3LineIdx( int line );
int convertDiff3LineIdxToLine( int d3lIdx );
void convertD3LCoordsToLineCoords( int d3LIdx, int d3LPos, int& line, int& pos );
void convertLineCoordsToD3LCoords( int line, int pos, int& d3LIdx, int& d3LPos );
void convertSelectionToD3LCoords();
bool findString( const QString& s, int& d3vLine, int& posInLine, bool bDirDown, bool bCaseSensitive );
void setSelection( int firstLine, int startPos, int lastLine, int endPos, int& l, int& p );
void getSelectionRange( int* firstLine, int* lastLine, e_CoordType coordType );
void setPaintingAllowed( bool bAllowPainting );
void recalcWordWrap( bool bWordWrap, int wrapLineVectorSize, int nofVisibleColumns );
void print( MyPainter& painter, const QRect& r, int firstLine, int nofLinesPerPage );
signals:
void resizeSignal( int nofVisibleColumns, int nofVisibleLines );
void scroll( int deltaX, int deltaY );
void newSelection();
void selectionEnd();
void setFastSelectorLine( int line );
void gotFocus();
void lineClicked( int winIdx, int line );
public slots:
void setFirstLine( int line );
void setFirstColumn( int col );
void resetSelection();
void setFastSelectorRange( int line1, int nofLines );
protected:
virtual void mousePressEvent ( QMouseEvent * );
virtual void mouseReleaseEvent ( QMouseEvent * );
virtual void mouseMoveEvent ( QMouseEvent * );
virtual void mouseDoubleClickEvent ( QMouseEvent * e );
virtual void paintEvent( QPaintEvent* );
virtual void dragEnterEvent( QDragEnterEvent* e );
virtual void focusInEvent( QFocusEvent* e );
virtual void resizeEvent( QResizeEvent* );
virtual void timerEvent(QTimerEvent*);
private:
DiffTextWindowData* d;
void showStatusLine( int line );
friend class DiffTextWindowFrame;
};
class DiffTextWindowFrameData;
class DiffTextWindowFrame : public QWidget
{
Q_OBJECT
public:
DiffTextWindowFrame( QWidget* pParent, QStatusBar* pStatusBar, OptionDialog* pOptionDialog, int winIdx );
~DiffTextWindowFrame();
DiffTextWindow* getDiffTextWindow();
void init();
void setFirstLine(int firstLine);
signals:
void fileNameChanged(const QString&, int);
protected:
bool eventFilter( QObject*, QEvent* );
private slots:
void slotReturnPressed();
void slotBrowseButtonClicked();
private:
DiffTextWindowFrameData* d;
};
#endif

File diff suppressed because it is too large Load Diff

@ -0,0 +1,362 @@
/***************************************************************************
directorymergewindow.h
-------------------
begin : Sat Oct 19 2002
copyright : (C) 2002-2007 by Joachim Eibl
email : joachim.eibl at gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef DIRECTORY_MERGE_WINDOW_H
#define DIRECTORY_MERGE_WINDOW_H
#include <qfileinfo.h>
#include <qlistview.h>
#include <qtimer.h>
#include <qdir.h>
#include <list>
#include <map>
#include "common.h"
#include "fileaccess.h"
#include "diff.h" //TotalDiffStatus
class OptionDialog;
class KIconLoader;
class StatusInfo;
class DirectoryMergeInfo;
class OneDirectoryInfo;
class QLabel;
class KAction;
class KToggleAction;
class KActionCollection;
class TotalDiffStatus;
enum e_MergeOperation
{
eTitleId,
eNoOperation,
// Operations in sync mode (with only two directories):
eCopyAToB, eCopyBToA, eDeleteA, eDeleteB, eDeleteAB, eMergeToA, eMergeToB, eMergeToAB,
// Operations in merge mode (with two or three directories)
eCopyAToDest, eCopyBToDest, eCopyCToDest, eDeleteFromDest, eMergeABCToDest,
eMergeABToDest,
eConflictingFileTypes, // Error
eConflictingAges // Equal age but files are not!
};
class DirMergeItem;
enum e_Age { eNew, eMiddle, eOld, eNotThere, eAgeEnd };
class MergeFileInfos
{
public:
MergeFileInfos(){ m_bEqualAB=false; m_bEqualAC=false; m_bEqualBC=false;
m_pDMI=0; m_pParent=0;
m_bExistsInA=false;m_bExistsInB=false;m_bExistsInC=false;
m_bDirA=false; m_bDirB=false; m_bDirC=false;
m_bLinkA=false; m_bLinkB=false; m_bLinkC=false;
m_bOperationComplete=false; m_bSimOpComplete = false;
m_eMergeOperation=eNoOperation;
m_ageA = eNotThere; m_ageB=eNotThere; m_ageC=eNotThere;
m_bConflictingAges=false; }
bool operator>( const MergeFileInfos& );
QString m_subPath;
bool m_bExistsInA;
bool m_bExistsInB;
bool m_bExistsInC;
bool m_bEqualAB;
bool m_bEqualAC;
bool m_bEqualBC;
DirMergeItem* m_pDMI;
MergeFileInfos* m_pParent;
e_MergeOperation m_eMergeOperation;
void setMergeOperation( e_MergeOperation eMOp, bool bRecursive=true );
bool m_bDirA;
bool m_bDirB;
bool m_bDirC;
bool m_bLinkA;
bool m_bLinkB;
bool m_bLinkC;
bool m_bOperationComplete;
bool m_bSimOpComplete;
e_Age m_ageA;
e_Age m_ageB;
e_Age m_ageC;
bool m_bConflictingAges; // Equal age but files are not!
FileAccess m_fileInfoA;
FileAccess m_fileInfoB;
FileAccess m_fileInfoC;
TotalDiffStatus m_totalDiffStatus;
};
class DirMergeItem : public QListViewItem
{
public:
DirMergeItem( QListView* pParent, const QString&, MergeFileInfos*);
DirMergeItem( DirMergeItem* pParent, const QString&, MergeFileInfos*);
~DirMergeItem();
MergeFileInfos* m_pMFI;
virtual int compare(QListViewItem *i, int col, bool ascending) const;
virtual void paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align );
void init(MergeFileInfos* pMFI);
};
class DirectoryMergeWindow : public QListView
{
Q_OBJECT
public:
DirectoryMergeWindow( QWidget* pParent, OptionDialog* pOptions, KIconLoader* pIconLoader );
~DirectoryMergeWindow();
void setDirectoryMergeInfo(DirectoryMergeInfo* p){ m_pDirectoryMergeInfo=p; }
bool init(
FileAccess& dirA,
FileAccess& dirB,
FileAccess& dirC,
FileAccess& dirDest,
bool bDirectoryMerge,
bool bReload = false
);
bool isFileSelected();
void allowResizeEvents(bool bAllowResizeEvents);
bool isDirectoryMergeInProgress() { return m_bRealMergeStarted; }
int totalColumnWidth();
bool isSyncMode() { return m_bSyncMode; }
bool isScanning() { return m_bScanning; }
void initDirectoryMergeActions( QObject* pKDiff3App, KActionCollection* ac );
void updateAvailabilities( bool bDirCompare, bool bDiffWindowVisible,
KToggleAction* chooseA, KToggleAction* chooseB, KToggleAction* chooseC );
void updateFileVisibilities();
virtual void keyPressEvent( QKeyEvent* e );
virtual void focusInEvent( QFocusEvent* e );
virtual void focusOutEvent( QFocusEvent* e );
QString getDirNameA(){ return m_dirA.prettyAbsPath(); }
QString getDirNameB(){ return m_dirB.prettyAbsPath(); }
QString getDirNameC(){ return m_dirC.prettyAbsPath(); }
QString getDirNameDest(){ return m_dirDest.prettyAbsPath(); }
public slots:
void reload();
void mergeCurrentFile();
void compareCurrentFile();
void slotRunOperationForAllItems();
void slotRunOperationForCurrentItem();
void mergeResultSaved(const QString& fileName);
void slotChooseAEverywhere();
void slotChooseBEverywhere();
void slotChooseCEverywhere();
void slotAutoChooseEverywhere();
void slotNoOpEverywhere();
void slotFoldAllSubdirs();
void slotUnfoldAllSubdirs();
void slotShowIdenticalFiles();
void slotShowDifferentFiles();
void slotShowFilesOnlyInA();
void slotShowFilesOnlyInB();
void slotShowFilesOnlyInC();
void slotSynchronizeDirectories();
void slotChooseNewerFiles();
void slotCompareExplicitlySelectedFiles();
void slotMergeExplicitlySelectedFiles();
// Merge current item (merge mode)
void slotCurrentDoNothing();
void slotCurrentChooseA();
void slotCurrentChooseB();
void slotCurrentChooseC();
void slotCurrentMerge();
void slotCurrentDelete();
// Sync current item
void slotCurrentCopyAToB();
void slotCurrentCopyBToA();
void slotCurrentDeleteA();
void slotCurrentDeleteB();
void slotCurrentDeleteAAndB();
void slotCurrentMergeToA();
void slotCurrentMergeToB();
void slotCurrentMergeToAAndB();
void slotSaveMergeState();
void slotLoadMergeState();
protected:
void mergeContinue( bool bStart, bool bVerbose );
void resizeEvent(QResizeEvent* e);
bool m_bAllowResizeEvents;
void prepareListView(ProgressProxy& pp);
void calcSuggestedOperation( MergeFileInfos& mfi, e_MergeOperation eDefaultOperation );
void setAllMergeOperations( e_MergeOperation eDefaultOperation );
friend class MergeFileInfos;
bool canContinue();
void prepareMergeStart( QListViewItem* pBegin, QListViewItem* pEnd, bool bVerbose );
bool executeMergeOperation( MergeFileInfos& mfi, bool& bSingleFileMerge );
void scanDirectory( const QString& dirName, t_DirectoryList& dirList );
void scanLocalDirectory( const QString& dirName, t_DirectoryList& dirList );
void fastFileComparison( FileAccess& fi1, FileAccess& fi2,
bool& bEqual, bool& bError, QString& status );
void compareFilesAndCalcAges( MergeFileInfos& mfi );
QString fullNameA( const MergeFileInfos& mfi )
{ return mfi.m_bExistsInA ? mfi.m_fileInfoA.absFilePath() : m_dirA.absFilePath() + "/" + mfi.m_subPath; }
QString fullNameB( const MergeFileInfos& mfi )
{ return mfi.m_bExistsInB ? mfi.m_fileInfoB.absFilePath() : m_dirB.absFilePath() + "/" + mfi.m_subPath; }
QString fullNameC( const MergeFileInfos& mfi )
{ return mfi.m_bExistsInC ? mfi.m_fileInfoC.absFilePath() : m_dirC.absFilePath() + "/" + mfi.m_subPath; }
QString fullNameDest( const MergeFileInfos& mfi )
{ if ( m_dirDestInternal.prettyAbsPath() == m_dirC.prettyAbsPath() ) return fullNameC(mfi);
else if ( m_dirDestInternal.prettyAbsPath() == m_dirB.prettyAbsPath() ) return fullNameB(mfi);
else return m_dirDestInternal.absFilePath() + "/" + mfi.m_subPath;
}
bool copyFLD( const QString& srcName, const QString& destName );
bool deleteFLD( const QString& name, bool bCreateBackup );
bool makeDir( const QString& name, bool bQuiet=false );
bool renameFLD( const QString& srcName, const QString& destName );
bool mergeFLD( const QString& nameA,const QString& nameB,const QString& nameC,
const QString& nameDest, bool& bSingleFileMerge );
FileAccess m_dirA;
FileAccess m_dirB;
FileAccess m_dirC;
FileAccess m_dirDest;
FileAccess m_dirDestInternal;
QString m_dirMergeStateFilename;
std::map<QString, MergeFileInfos> m_fileMergeMap;
bool m_bFollowDirLinks;
bool m_bFollowFileLinks;
bool m_bSimulatedMergeStarted;
bool m_bRealMergeStarted;
bool m_bError;
bool m_bSyncMode;
bool m_bDirectoryMerge; // if true, then merge is the default operation, otherwise it's diff.
bool m_bCaseSensitive;
bool m_bScanning; // true while in init()
OptionDialog* m_pOptions;
KIconLoader* m_pIconLoader;
DirectoryMergeInfo* m_pDirectoryMergeInfo;
StatusInfo* m_pStatusInfo;
typedef std::list<DirMergeItem*> MergeItemList;
MergeItemList m_mergeItemList;
MergeItemList::iterator m_currentItemForOperation;
DirMergeItem* m_pSelection1Item;
int m_selection1Column;
DirMergeItem* m_pSelection2Item;
int m_selection2Column;
DirMergeItem* m_pSelection3Item;
int m_selection3Column;
void selectItemAndColumn(DirMergeItem* pDMI, int c, bool bContextMenu);
friend class DirMergeItem;
KAction* m_pDirStartOperation;
KAction* m_pDirRunOperationForCurrentItem;
KAction* m_pDirCompareCurrent;
KAction* m_pDirMergeCurrent;
KAction* m_pDirRescan;
KAction* m_pDirChooseAEverywhere;
KAction* m_pDirChooseBEverywhere;
KAction* m_pDirChooseCEverywhere;
KAction* m_pDirAutoChoiceEverywhere;
KAction* m_pDirDoNothingEverywhere;
KAction* m_pDirFoldAll;
KAction* m_pDirUnfoldAll;
KToggleAction* m_pDirShowIdenticalFiles;
KToggleAction* m_pDirShowDifferentFiles;
KToggleAction* m_pDirShowFilesOnlyInA;
KToggleAction* m_pDirShowFilesOnlyInB;
KToggleAction* m_pDirShowFilesOnlyInC;
KToggleAction* m_pDirSynchronizeDirectories;
KToggleAction* m_pDirChooseNewerFiles;
KAction* m_pDirCompareExplicit;
KAction* m_pDirMergeExplicit;
KAction* m_pDirCurrentDoNothing;
KAction* m_pDirCurrentChooseA;
KAction* m_pDirCurrentChooseB;
KAction* m_pDirCurrentChooseC;
KAction* m_pDirCurrentMerge;
KAction* m_pDirCurrentDelete;
KAction* m_pDirCurrentSyncDoNothing;
KAction* m_pDirCurrentSyncCopyAToB;
KAction* m_pDirCurrentSyncCopyBToA;
KAction* m_pDirCurrentSyncDeleteA;
KAction* m_pDirCurrentSyncDeleteB;
KAction* m_pDirCurrentSyncDeleteAAndB;
KAction* m_pDirCurrentSyncMergeToA;
KAction* m_pDirCurrentSyncMergeToB;
KAction* m_pDirCurrentSyncMergeToAAndB;
KAction* m_pDirSaveMergeState;
KAction* m_pDirLoadMergeState;
signals:
void startDiffMerge(QString fn1,QString fn2, QString fn3, QString ofn, QString,QString,QString,TotalDiffStatus*);
void checkIfCanContinue( bool* pbContinue );
void updateAvailabilities();
void statusBarMessage( const QString& msg );
protected slots:
void onDoubleClick( QListViewItem* lvi );
void onClick( int button, QListViewItem* lvi, const QPoint&, int c );
void slotShowContextMenu(QListViewItem* lvi,const QPoint &,int c);
void onSelectionChanged(QListViewItem* lvi);
};
class DirectoryMergeInfo : public QFrame
{
Q_OBJECT
public:
DirectoryMergeInfo( QWidget* pParent );
void setInfo(
const FileAccess& APath,
const FileAccess& BPath,
const FileAccess& CPath,
const FileAccess& DestPath,
MergeFileInfos& mfi );
QListView* getInfoList() {return m_pInfoList;}
virtual bool eventFilter( QObject* o, QEvent* e );
signals:
void gotFocus();
private:
QLabel* m_pInfoA;
QLabel* m_pInfoB;
QLabel* m_pInfoC;
QLabel* m_pInfoDest;
QLabel* m_pA;
QLabel* m_pB;
QLabel* m_pC;
QLabel* m_pDest;
QListView* m_pInfoList;
};
#endif

File diff suppressed because it is too large Load Diff

@ -0,0 +1,265 @@
/***************************************************************************
* Copyright (C) 2003-2007 by Joachim Eibl *
* joachim.eibl at gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#ifndef FILEACCESS_H
#define FILEACCESS_H
#include <qdialog.h>
#include <qfileinfo.h>
#include <kprogress.h>
#include <kio/job.h>
#include <kio/jobclasses.h>
#include <kurldrag.h>
#include <list>
#include <qstring.h>
#include <qdatetime.h>
bool wildcardMultiMatch( const QString& wildcard, const QString& testString, bool bCaseSensitive );
class t_DirectoryList;
class FileAccess
{
public:
FileAccess();
~FileAccess();
FileAccess( const QString& name, bool bWantToWrite=false ); // name: local file or dirname or url (when supported)
void setFile( const QString& name, bool bWantToWrite=false );
bool isValid() const;
bool isFile() const;
bool isDir() const;
bool isSymLink() const;
bool exists() const;
long size() const; // Size as returned by stat().
long sizeForReading(); // If the size can't be determined by stat() then the file is copied to a local temp file.
bool isReadable() const;
bool isWritable() const;
bool isExecutable() const;
bool isHidden() const;
QString readLink() const;
QDateTime created() const;
QDateTime lastModified() const;
QDateTime lastRead() const;
QString fileName() const; // Just the name-part of the path, without parent directories
QString filePath() const; // The path-string that was used during construction
QString prettyAbsPath() const;
KURL url() const;
QString absFilePath() const;
bool isLocal() const;
bool readFile(void* pDestBuffer, unsigned long maxLength );
bool writeFile(const void* pSrcBuffer, unsigned long length );
bool listDir( t_DirectoryList* pDirList, bool bRecursive, bool bFindHidden,
const QString& filePattern, const QString& fileAntiPattern,
const QString& dirAntiPattern, bool bFollowDirLinks, bool bUseCvsIgnore );
bool copyFile( const QString& destUrl );
bool createBackup( const QString& bakExtension );
static QString tempFileName();
static bool removeTempFile( const QString& );
bool removeFile();
static bool removeFile( const QString& );
static bool makeDir( const QString& );
static bool removeDir( const QString& );
static bool exists( const QString& );
static QString cleanDirPath( const QString& );
//bool chmod( const QString& );
bool rename( const QString& );
static bool symLink( const QString& linkTarget, const QString& linkLocation );
void addPath( const QString& txt );
QString getStatusText();
private:
void setUdsEntry( const KIO::UDSEntry& e );
KURL m_url;
bool m_bLocal;
bool m_bValidData;
unsigned long m_size;
QDateTime m_modificationTime;
QDateTime m_accessTime;
QDateTime m_creationTime;
bool m_bReadable;
bool m_bWritable;
bool m_bExecutable;
bool m_bExists;
bool m_bFile;
bool m_bDir;
bool m_bSymLink;
bool m_bHidden;
long m_fileType; // for testing only
QString m_linkTarget;
QString m_user;
QString m_group;
QString m_name;
QString m_path;
QString m_absFilePath;
QString m_localCopy;
QString m_statusText; // Might contain an error string, when the last operation didn't succeed.
friend class FileAccessJobHandler;
};
class t_DirectoryList : public std::list<FileAccess>
{};
class FileAccessJobHandler : public QObject
{
Q_OBJECT
public:
FileAccessJobHandler( FileAccess* pFileAccess );
bool get( void* pDestBuffer, long maxLength );
bool put( const void* pSrcBuffer, long maxLength, bool bOverwrite, bool bResume=false, int permissions=-1 );
bool stat(int detailLevel=2, bool bWantToWrite=false );
bool copyFile( const QString& dest );
bool rename( const QString& dest );
bool listDir( t_DirectoryList* pDirList, bool bRecursive, bool bFindHidden,
const QString& filePattern, const QString& fileAntiPattern,
const QString& dirAntiPattern, bool bFollowDirLinks, bool bUseCvsIgnore );
bool mkDir( const QString& dirName );
bool rmDir( const QString& dirName );
bool removeFile( const QString& dirName );
bool symLink( const QString& linkTarget, const QString& linkLocation );
private:
FileAccess* m_pFileAccess;
bool m_bSuccess;
// Data needed during Job
long m_transferredBytes;
char* m_pTransferBuffer; // Needed during get or put
long m_maxLength;
QString m_filePattern;
QString m_fileAntiPattern;
QString m_dirAntiPattern;
t_DirectoryList* m_pDirList;
bool m_bFindHidden;
bool m_bRecursive;
bool m_bFollowDirLinks;
bool scanLocalDirectory( const QString& dirName, t_DirectoryList* dirList );
private slots:
void slotStatResult( KIO::Job* );
void slotSimpleJobResult( KIO::Job* pJob );
void slotPutJobResult( KIO::Job* pJob );
void slotGetData(KIO::Job*,const QByteArray&);
void slotPutData(KIO::Job*, QByteArray&);
void slotListDirInfoMessage( KIO::Job*, const QString& msg );
void slotListDirProcessNewEntries( KIO::Job *, const KIO::UDSEntryList& l );
void slotPercent( KIO::Job* pJob, unsigned long percent );
};
class ProgressDialog : public QDialog
{
Q_OBJECT
public:
ProgressDialog( QWidget* pParent );
void setStayHidden( bool bStayHidden );
void setInformation( const QString& info, bool bRedrawUpdate=true );
void setInformation( const QString& info, double dCurrent, bool bRedrawUpdate=true );
void setCurrent( double dCurrent, bool bRedrawUpdate=true );
void step( bool bRedrawUpdate=true );
void setMaxNofSteps( int dMaxNofSteps );
void push();
void pop(bool bRedrawUpdate=true);
// The progressbar goes from 0 to 1 usually.
// By supplying a subrange transformation the subCurrent-values
// 0 to 1 will be transformed to dMin to dMax instead.
// Requirement: 0 < dMin < dMax < 1
void setRangeTransformation( double dMin, double dMax );
void setSubRangeTransformation( double dMin, double dMax );
void exitEventLoop();
void enterEventLoop( KIO::Job* pJob, const QString& jobInfo );
bool wasCancelled();
void show();
void hide();
virtual void timerEvent(QTimerEvent*);
private:
struct ProgressLevelData
{
ProgressLevelData()
{
m_dCurrent=0; m_maxNofSteps=1; m_dRangeMin=0; m_dRangeMax=1;
m_dSubRangeMin = 0; m_dSubRangeMax = 1;
}
double m_dCurrent;
int m_maxNofSteps; // when step() is used.
double m_dRangeMax;
double m_dRangeMin;
double m_dSubRangeMax;
double m_dSubRangeMin;
};
std::list<ProgressLevelData> m_progressStack;
int m_progressDelayTimer;
KProgress* m_pProgressBar;
KProgress* m_pSubProgressBar;
QLabel* m_pInformation;
QLabel* m_pSubInformation;
QLabel* m_pSlowJobInfo;
QPushButton* m_pAbortButton;
void recalc(bool bRedrawUpdate);
QTime m_t1;
QTime m_t2;
bool m_bWasCancelled;
KIO::Job* m_pJob;
QString m_currentJobInfo; // Needed if the job doesn't stop after a reasonable time.
bool m_bStayHidden;
protected:
virtual void reject();
private slots:
void delayedHide();
void slotAbort();
};
// When using the ProgressProxy you need not take care of the push and pop, except when explicit.
class ProgressProxy
{
public:
ProgressProxy();
~ProgressProxy();
void setInformation( const QString& info, bool bRedrawUpdate=true );
void setInformation( const QString& info, double dCurrent, bool bRedrawUpdate=true );
void setCurrent( double dCurrent, bool bRedrawUpdate=true );
void step( bool bRedrawUpdate=true );
void setMaxNofSteps( int dMaxNofSteps );
bool wasCancelled();
void setRangeTransformation( double dMin, double dMax );
void setSubRangeTransformation( double dMin, double dMax );
private:
};
extern ProgressDialog* g_pProgressDialog;
#endif

@ -0,0 +1,873 @@
/* Analyze file differences for GNU DIFF.
Modified for KDiff3 by Joachim Eibl 2003.
The original file was part of GNU DIFF.
Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1998, 2001, 2002
Free Software Foundation, Inc.
GNU DIFF is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU DIFF is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation,
51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. */
/* The basic algorithm is described in:
"An O(ND) Difference Algorithm and its Variations", Eugene Myers,
Algorithmica Vol. 1 No. 2, 1986, pp. 251-266;
see especially section 4.2, which describes the variation used below.
Unless the --minimal option is specified, this code uses the TOO_EXPENSIVE
heuristic, by Paul Eggert, to limit the cost to O(N**1.5 log N)
at the price of producing suboptimal output for large inputs with
many differences.
The basic algorithm was independently discovered as described in:
"Algorithms for Approximate String Matching", E. Ukkonen,
Information and Control Vol. 64, 1985, pp. 100-118. */
#define GDIFF_MAIN
#include "gnudiff_diff.h"
//#include <error.h>
#include <stdlib.h>
static lin *xvec, *yvec; /* Vectors being compared. */
static lin *fdiag; /* Vector, indexed by diagonal, containing
1 + the X coordinate of the point furthest
along the given diagonal in the forward
search of the edit matrix. */
static lin *bdiag; /* Vector, indexed by diagonal, containing
the X coordinate of the point furthest
along the given diagonal in the backward
search of the edit matrix. */
static lin too_expensive; /* Edit scripts longer than this are too
expensive to compute. */
#define SNAKE_LIMIT 20 /* Snakes bigger than this are considered `big'. */
struct partition
{
lin xmid, ymid; /* Midpoints of this partition. */
bool lo_minimal; /* Nonzero if low half will be analyzed minimally. */
bool hi_minimal; /* Likewise for high half. */
};
/* Find the midpoint of the shortest edit script for a specified
portion of the two files.
Scan from the beginnings of the files, and simultaneously from the ends,
doing a breadth-first search through the space of edit-sequence.
When the two searches meet, we have found the midpoint of the shortest
edit sequence.
If FIND_MINIMAL is nonzero, find the minimal edit script regardless
of expense. Otherwise, if the search is too expensive, use
heuristics to stop the search and report a suboptimal answer.
Set PART->(xmid,ymid) to the midpoint (XMID,YMID). The diagonal number
XMID - YMID equals the number of inserted lines minus the number
of deleted lines (counting only lines before the midpoint).
Return the approximate edit cost; this is the total number of
lines inserted or deleted (counting only lines before the midpoint),
unless a heuristic is used to terminate the search prematurely.
Set PART->lo_minimal to true iff the minimal edit script for the
left half of the partition is known; similarly for PART->hi_minimal.
This function assumes that the first lines of the specified portions
of the two files do not match, and likewise that the last lines do not
match. The caller must trim matching lines from the beginning and end
of the portions it is going to specify.
If we return the "wrong" partitions,
the worst this can do is cause suboptimal diff output.
It cannot cause incorrect diff output. */
lin
GnuDiff::diag (lin xoff, lin xlim, lin yoff, lin ylim, bool find_minimal,
struct partition *part)
{
lin *const fd = fdiag; /* Give the compiler a chance. */
lin *const bd = bdiag; /* Additional help for the compiler. */
lin const *const xv = xvec; /* Still more help for the compiler. */
lin const *const yv = yvec; /* And more and more . . . */
lin const dmin = xoff - ylim; /* Minimum valid diagonal. */
lin const dmax = xlim - yoff; /* Maximum valid diagonal. */
lin const fmid = xoff - yoff; /* Center diagonal of top-down search. */
lin const bmid = xlim - ylim; /* Center diagonal of bottom-up search. */
lin fmin = fmid, fmax = fmid; /* Limits of top-down search. */
lin bmin = bmid, bmax = bmid; /* Limits of bottom-up search. */
lin c; /* Cost. */
bool odd = (fmid - bmid) & 1; /* True if southeast corner is on an odd
diagonal with respect to the northwest. */
fd[fmid] = xoff;
bd[bmid] = xlim;
for (c = 1;; ++c)
{
lin d; /* Active diagonal. */
bool big_snake = 0;
/* Extend the top-down search by an edit step in each diagonal. */
fmin > dmin ? fd[--fmin - 1] = -1 : ++fmin;
fmax < dmax ? fd[++fmax + 1] = -1 : --fmax;
for (d = fmax; d >= fmin; d -= 2)
{
lin x, y, oldx, tlo = fd[d - 1], thi = fd[d + 1];
if (tlo >= thi)
x = tlo + 1;
else
x = thi;
oldx = x;
y = x - d;
while (x < xlim && y < ylim && xv[x] == yv[y])
++x, ++y;
if (x - oldx > SNAKE_LIMIT)
big_snake = 1;
fd[d] = x;
if (odd && bmin <= d && d <= bmax && bd[d] <= x)
{
part->xmid = x;
part->ymid = y;
part->lo_minimal = part->hi_minimal = 1;
return 2 * c - 1;
}
}
/* Similarly extend the bottom-up search. */
bmin > dmin ? bd[--bmin - 1] = LIN_MAX : ++bmin;
bmax < dmax ? bd[++bmax + 1] = LIN_MAX : --bmax;
for (d = bmax; d >= bmin; d -= 2)
{
lin x, y, oldx, tlo = bd[d - 1], thi = bd[d + 1];
if (tlo < thi)
x = tlo;
else
x = thi - 1;
oldx = x;
y = x - d;
while (x > xoff && y > yoff && xv[x - 1] == yv[y - 1])
--x, --y;
if (oldx - x > SNAKE_LIMIT)
big_snake = 1;
bd[d] = x;
if (!odd && fmin <= d && d <= fmax && x <= fd[d])
{
part->xmid = x;
part->ymid = y;
part->lo_minimal = part->hi_minimal = 1;
return 2 * c;
}
}
if (find_minimal)
continue;
/* Heuristic: check occasionally for a diagonal that has made
lots of progress compared with the edit distance.
If we have any such, find the one that has made the most
progress and return it as if it had succeeded.
With this heuristic, for files with a constant small density
of changes, the algorithm is linear in the file size. */
if (200 < c && big_snake && speed_large_files)
{
lin best;
best = 0;
for (d = fmax; d >= fmin; d -= 2)
{
lin dd = d - fmid;
lin x = fd[d];
lin y = x - d;
lin v = (x - xoff) * 2 - dd;
if (v > 12 * (c + (dd < 0 ? -dd : dd)))
{
if (v > best
&& xoff + SNAKE_LIMIT <= x && x < xlim
&& yoff + SNAKE_LIMIT <= y && y < ylim)
{
/* We have a good enough best diagonal;
now insist that it end with a significant snake. */
int k;
for (k = 1; xv[x - k] == yv[y - k]; k++)
if (k == SNAKE_LIMIT)
{
best = v;
part->xmid = x;
part->ymid = y;
break;
}
}
}
}
if (best > 0)
{
part->lo_minimal = 1;
part->hi_minimal = 0;
return 2 * c - 1;
}
best = 0;
for (d = bmax; d >= bmin; d -= 2)
{
lin dd = d - bmid;
lin x = bd[d];
lin y = x - d;
lin v = (xlim - x) * 2 + dd;
if (v > 12 * (c + (dd < 0 ? -dd : dd)))
{
if (v > best
&& xoff < x && x <= xlim - SNAKE_LIMIT
&& yoff < y && y <= ylim - SNAKE_LIMIT)
{
/* We have a good enough best diagonal;
now insist that it end with a significant snake. */
int k;
for (k = 0; xv[x + k] == yv[y + k]; k++)
if (k == SNAKE_LIMIT - 1)
{
best = v;
part->xmid = x;
part->ymid = y;
break;
}
}
}
}
if (best > 0)
{
part->lo_minimal = 0;
part->hi_minimal = 1;
return 2 * c - 1;
}
}
/* Heuristic: if we've gone well beyond the call of duty,
give up and report halfway between our best results so far. */
if (c >= too_expensive)
{
lin fxybest, fxbest;
lin bxybest, bxbest;
fxbest = bxbest = 0; /* Pacify `gcc -Wall'. */
/* Find forward diagonal that maximizes X + Y. */
fxybest = -1;
for (d = fmax; d >= fmin; d -= 2)
{
lin x = MIN (fd[d], xlim);
lin y = x - d;
if (ylim < y)
x = ylim + d, y = ylim;
if (fxybest < x + y)
{
fxybest = x + y;
fxbest = x;
}
}
/* Find backward diagonal that minimizes X + Y. */
bxybest = LIN_MAX;
for (d = bmax; d >= bmin; d -= 2)
{
lin x = MAX (xoff, bd[d]);
lin y = x - d;
if (y < yoff)
x = yoff + d, y = yoff;
if (x + y < bxybest)
{
bxybest = x + y;
bxbest = x;
}
}
/* Use the better of the two diagonals. */
if ((xlim + ylim) - bxybest < fxybest - (xoff + yoff))
{
part->xmid = fxbest;
part->ymid = fxybest - fxbest;
part->lo_minimal = 1;
part->hi_minimal = 0;
}
else
{
part->xmid = bxbest;
part->ymid = bxybest - bxbest;
part->lo_minimal = 0;
part->hi_minimal = 1;
}
return 2 * c - 1;
}
}
}
/* Compare in detail contiguous subsequences of the two files
which are known, as a whole, to match each other.
The results are recorded in the vectors files[N].changed, by
storing 1 in the element for each line that is an insertion or deletion.
The subsequence of file 0 is [XOFF, XLIM) and likewise for file 1.
Note that XLIM, YLIM are exclusive bounds.
All line numbers are origin-0 and discarded lines are not counted.
If FIND_MINIMAL, find a minimal difference no matter how
expensive it is. */
void GnuDiff::compareseq (lin xoff, lin xlim, lin yoff, lin ylim, bool find_minimal)
{
lin * const xv = xvec; /* Help the compiler. */
lin * const yv = yvec;
/* Slide down the bottom initial diagonal. */
while (xoff < xlim && yoff < ylim && xv[xoff] == yv[yoff])
++xoff, ++yoff;
/* Slide up the top initial diagonal. */
while (xlim > xoff && ylim > yoff && xv[xlim - 1] == yv[ylim - 1])
--xlim, --ylim;
/* Handle simple cases. */
if (xoff == xlim)
while (yoff < ylim)
files[1].changed[files[1].realindexes[yoff++]] = 1;
else if (yoff == ylim)
while (xoff < xlim)
files[0].changed[files[0].realindexes[xoff++]] = 1;
else
{
lin c;
struct partition part;
/* Find a point of correspondence in the middle of the files. */
c = diag (xoff, xlim, yoff, ylim, find_minimal, &part);
if (c == 1)
{
/* This should be impossible, because it implies that
one of the two subsequences is empty,
and that case was handled above without calling `diag'.
Let's verify that this is true. */
abort ();
#if 0
/* The two subsequences differ by a single insert or delete;
record it and we are done. */
if (part.xmid - part.ymid < xoff - yoff)
files[1].changed[files[1].realindexes[part.ymid - 1]] = 1;
else
files[0].changed[files[0].realindexes[part.xmid]] = 1;
#endif
}
else
{
/* Use the partitions to split this problem into subproblems. */
compareseq (xoff, part.xmid, yoff, part.ymid, part.lo_minimal);
compareseq (part.xmid, xlim, part.ymid, ylim, part.hi_minimal);
}
}
}
/* Discard lines from one file that have no matches in the other file.
A line which is discarded will not be considered by the actual
comparison algorithm; it will be as if that line were not in the file.
The file's `realindexes' table maps virtual line numbers
(which don't count the discarded lines) into real line numbers;
this is how the actual comparison algorithm produces results
that are comprehensible when the discarded lines are counted.
When we discard a line, we also mark it as a deletion or insertion
so that it will be printed in the output. */
void GnuDiff::discard_confusing_lines (struct file_data filevec[])
{
int f;
lin i;
char *discarded[2];
lin *equiv_count[2];
lin *p;
/* Allocate our results. */
p = (lin*)xmalloc ((filevec[0].buffered_lines + filevec[1].buffered_lines)
* (2 * sizeof *p));
for (f = 0; f < 2; f++)
{
filevec[f].undiscarded = p; p += filevec[f].buffered_lines;
filevec[f].realindexes = p; p += filevec[f].buffered_lines;
}
/* Set up equiv_count[F][I] as the number of lines in file F
that fall in equivalence class I. */
p = (lin*)zalloc (filevec[0].equiv_max * (2 * sizeof *p));
equiv_count[0] = p;
equiv_count[1] = p + filevec[0].equiv_max;
for (i = 0; i < filevec[0].buffered_lines; ++i)
++equiv_count[0][filevec[0].equivs[i]];
for (i = 0; i < filevec[1].buffered_lines; ++i)
++equiv_count[1][filevec[1].equivs[i]];
/* Set up tables of which lines are going to be discarded. */
discarded[0] = (char*)zalloc (filevec[0].buffered_lines
+ filevec[1].buffered_lines);
discarded[1] = discarded[0] + filevec[0].buffered_lines;
/* Mark to be discarded each line that matches no line of the other file.
If a line matches many lines, mark it as provisionally discardable. */
for (f = 0; f < 2; f++)
{
size_t end = filevec[f].buffered_lines;
char *discards = discarded[f];
lin *counts = equiv_count[1 - f];
lin *equivs = filevec[f].equivs;
size_t many = 5;
size_t tem = end / 64;
/* Multiply MANY by approximate square root of number of lines.
That is the threshold for provisionally discardable lines. */
while ((tem = tem >> 2) > 0)
many *= 2;
for (i = 0; i < (lin)end; i++)
{
lin nmatch;
if (equivs[i] == 0)
continue;
nmatch = counts[equivs[i]];
if (nmatch == 0)
discards[i] = 1;
else if (nmatch > (lin)many)
discards[i] = 2;
}
}
/* Don't really discard the provisional lines except when they occur
in a run of discardables, with nonprovisionals at the beginning
and end. */
for (f = 0; f < 2; f++)
{
lin end = filevec[f].buffered_lines;
register char *discards = discarded[f];
for (i = 0; i < end; i++)
{
/* Cancel provisional discards not in middle of run of discards. */
if (discards[i] == 2)
discards[i] = 0;
else if (discards[i] != 0)
{
/* We have found a nonprovisional discard. */
register lin j;
lin length;
lin provisional = 0;
/* Find end of this run of discardable lines.
Count how many are provisionally discardable. */
for (j = i; j < end; j++)
{
if (discards[j] == 0)
break;
if (discards[j] == 2)
++provisional;
}
/* Cancel provisional discards at end, and shrink the run. */
while (j > i && discards[j - 1] == 2)
discards[--j] = 0, --provisional;
/* Now we have the length of a run of discardable lines
whose first and last are not provisional. */
length = j - i;
/* If 1/4 of the lines in the run are provisional,
cancel discarding of all provisional lines in the run. */
if (provisional * 4 > length)
{
while (j > i)
if (discards[--j] == 2)
discards[j] = 0;
}
else
{
register lin consec;
lin minimum = 1;
lin tem = length >> 2;
/* MINIMUM is approximate square root of LENGTH/4.
A subrun of two or more provisionals can stand
when LENGTH is at least 16.
A subrun of 4 or more can stand when LENGTH >= 64. */
while (0 < (tem >>= 2))
minimum <<= 1;
minimum++;
/* Cancel any subrun of MINIMUM or more provisionals
within the larger run. */
for (j = 0, consec = 0; j < length; j++)
if (discards[i + j] != 2)
consec = 0;
else if (minimum == ++consec)
/* Back up to start of subrun, to cancel it all. */
j -= consec;
else if (minimum < consec)
discards[i + j] = 0;
/* Scan from beginning of run
until we find 3 or more nonprovisionals in a row
or until the first nonprovisional at least 8 lines in.
Until that point, cancel any provisionals. */
for (j = 0, consec = 0; j < length; j++)
{
if (j >= 8 && discards[i + j] == 1)
break;
if (discards[i + j] == 2)
consec = 0, discards[i + j] = 0;
else if (discards[i + j] == 0)
consec = 0;
else
consec++;
if (consec == 3)
break;
}
/* I advances to the last line of the run. */
i += length - 1;
/* Same thing, from end. */
for (j = 0, consec = 0; j < length; j++)
{
if (j >= 8 && discards[i - j] == 1)
break;
if (discards[i - j] == 2)
consec = 0, discards[i - j] = 0;
else if (discards[i - j] == 0)
consec = 0;
else
consec++;
if (consec == 3)
break;
}
}
}
}
}
/* Actually discard the lines. */
for (f = 0; f < 2; f++)
{
char *discards = discarded[f];
lin end = filevec[f].buffered_lines;
lin j = 0;
for (i = 0; i < end; ++i)
if (minimal || discards[i] == 0)
{
filevec[f].undiscarded[j] = filevec[f].equivs[i];
filevec[f].realindexes[j++] = i;
}
else
filevec[f].changed[i] = 1;
filevec[f].nondiscarded_lines = j;
}
free (discarded[0]);
free (equiv_count[0]);
}
/* Adjust inserts/deletes of identical lines to join changes
as much as possible.
We do something when a run of changed lines include a
line at one end and have an excluded, identical line at the other.
We are free to choose which identical line is included.
`compareseq' usually chooses the one at the beginning,
but usually it is cleaner to consider the following identical line
to be the "change". */
void GnuDiff::shift_boundaries (struct file_data filevec[])
{
int f;
for (f = 0; f < 2; f++)
{
bool *changed = filevec[f].changed;
bool const *other_changed = filevec[1 - f].changed;
lin const *equivs = filevec[f].equivs;
lin i = 0;
lin j = 0;
lin i_end = filevec[f].buffered_lines;
while (1)
{
lin runlength, start, corresponding;
/* Scan forwards to find beginning of another run of changes.
Also keep track of the corresponding point in the other file. */
while (i < i_end && !changed[i])
{
while (other_changed[j++])
continue;
i++;
}
if (i == i_end)
break;
start = i;
/* Find the end of this run of changes. */
while (changed[++i])
continue;
while (other_changed[j])
j++;
do
{
/* Record the length of this run of changes, so that
we can later determine whether the run has grown. */
runlength = i - start;
/* Move the changed region back, so long as the
previous unchanged line matches the last changed one.
This merges with previous changed regions. */
while (start && equivs[start - 1] == equivs[i - 1])
{
changed[--start] = 1;
changed[--i] = 0;
while (changed[start - 1])
start--;
while (other_changed[--j])
continue;
}
/* Set CORRESPONDING to the end of the changed run, at the last
point where it corresponds to a changed run in the other file.
CORRESPONDING == I_END means no such point has been found. */
corresponding = other_changed[j - 1] ? i : i_end;
/* Move the changed region forward, so long as the
first changed line matches the following unchanged one.
This merges with following changed regions.
Do this second, so that if there are no merges,
the changed region is moved forward as far as possible. */
while (i != i_end && equivs[start] == equivs[i])
{
changed[start++] = 0;
changed[i++] = 1;
while (changed[i])
i++;
while (other_changed[++j])
corresponding = i;
}
}
while (runlength != i - start);
/* If possible, move the fully-merged run of changes
back to a corresponding run in the other file. */
while (corresponding < i)
{
changed[--start] = 1;
changed[--i] = 0;
while (other_changed[--j])
continue;
}
}
}
}
/* Cons an additional entry onto the front of an edit script OLD.
LINE0 and LINE1 are the first affected lines in the two files (origin 0).
DELETED is the number of lines deleted here from file 0.
INSERTED is the number of lines inserted here in file 1.
If DELETED is 0 then LINE0 is the number of the line before
which the insertion was done; vice versa for INSERTED and LINE1. */
GnuDiff::change* GnuDiff::add_change (lin line0, lin line1, lin deleted, lin inserted, struct change *old)
{
struct change *newChange = (change*) xmalloc (sizeof *newChange);
newChange->line0 = line0;
newChange->line1 = line1;
newChange->inserted = inserted;
newChange->deleted = deleted;
newChange->link = old;
return newChange;
}
/* Scan the tables of which lines are inserted and deleted,
producing an edit script in reverse order. */
GnuDiff::change* GnuDiff::build_reverse_script (struct file_data const filevec[])
{
struct change *script = 0;
bool *changed0 = filevec[0].changed;
bool *changed1 = filevec[1].changed;
lin len0 = filevec[0].buffered_lines;
lin len1 = filevec[1].buffered_lines;
/* Note that changedN[len0] does exist, and is 0. */
lin i0 = 0, i1 = 0;
while (i0 < len0 || i1 < len1)
{
if (changed0[i0] | changed1[i1])
{
lin line0 = i0, line1 = i1;
/* Find # lines changed here in each file. */
while (changed0[i0]) ++i0;
while (changed1[i1]) ++i1;
/* Record this change. */
script = add_change (line0, line1, i0 - line0, i1 - line1, script);
}
/* We have reached lines in the two files that match each other. */
i0++, i1++;
}
return script;
}
/* Scan the tables of which lines are inserted and deleted,
producing an edit script in forward order. */
GnuDiff::change* GnuDiff::build_script (struct file_data const filevec[])
{
struct change *script = 0;
bool *changed0 = filevec[0].changed;
bool *changed1 = filevec[1].changed;
lin i0 = filevec[0].buffered_lines, i1 = filevec[1].buffered_lines;
/* Note that changedN[-1] does exist, and is 0. */
while (i0 >= 0 || i1 >= 0)
{
if (changed0[i0 - 1] | changed1[i1 - 1])
{
lin line0 = i0, line1 = i1;
/* Find # lines changed here in each file. */
while (changed0[i0 - 1]) --i0;
while (changed1[i1 - 1]) --i1;
/* Record this change. */
script = add_change (i0, i1, line0 - i0, line1 - i1, script);
}
/* We have reached lines in the two files that match each other. */
i0--, i1--;
}
return script;
}
/* Report the differences of two files. */
GnuDiff::change* GnuDiff::diff_2_files (struct comparison *cmp)
{
lin diags;
int f;
//struct change *e, *p;
struct change *script;
int changes;
read_files (cmp->file, files_can_be_treated_as_binary);
{
/* Allocate vectors for the results of comparison:
a flag for each line of each file, saying whether that line
is an insertion or deletion.
Allocate an extra element, always 0, at each end of each vector. */
size_t s = cmp->file[0].buffered_lines + cmp->file[1].buffered_lines + 4;
bool *flag_space = (bool*)zalloc (s * sizeof(*flag_space));
cmp->file[0].changed = flag_space + 1;
cmp->file[1].changed = flag_space + cmp->file[0].buffered_lines + 3;
/* Some lines are obviously insertions or deletions
because they don't match anything. Detect them now, and
avoid even thinking about them in the main comparison algorithm. */
discard_confusing_lines (cmp->file);
/* Now do the main comparison algorithm, considering just the
undiscarded lines. */
xvec = cmp->file[0].undiscarded;
yvec = cmp->file[1].undiscarded;
diags = (cmp->file[0].nondiscarded_lines
+ cmp->file[1].nondiscarded_lines + 3);
fdiag = (lin*)xmalloc (diags * (2 * sizeof *fdiag));
bdiag = fdiag + diags;
fdiag += cmp->file[1].nondiscarded_lines + 1;
bdiag += cmp->file[1].nondiscarded_lines + 1;
/* Set TOO_EXPENSIVE to be approximate square root of input size,
bounded below by 256. */
too_expensive = 1;
for (; diags != 0; diags >>= 2)
too_expensive <<= 1;
too_expensive = MAX (256, too_expensive);
files[0] = cmp->file[0];
files[1] = cmp->file[1];
compareseq (0, cmp->file[0].nondiscarded_lines,
0, cmp->file[1].nondiscarded_lines, minimal);
free (fdiag - (cmp->file[1].nondiscarded_lines + 1));
/* Modify the results slightly to make them prettier
in cases where that can validly be done. */
shift_boundaries (cmp->file);
/* Get the results of comparison in the form of a chain
of `struct change's -- an edit script. */
script = build_script (cmp->file);
changes = (script != 0);
free (cmp->file[0].undiscarded);
free (flag_space);
for (f = 0; f < 2; f++)
{
free (cmp->file[f].equivs);
free (cmp->file[f].linbuf + cmp->file[f].linbuf_base);
}
}
return script;
}

@ -0,0 +1,355 @@
/* Shared definitions for GNU DIFF
Modified for KDiff3 by Joachim Eibl 2003, 2004, 2005.
The original file was part of GNU DIFF.
Copyright (C) 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1998, 2001,
2002 Free Software Foundation, Inc.
GNU DIFF is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU DIFF is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation,
51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef GNUDIFF_DIFF_H
#define GNUDIFF_DIFF_H
#include "gnudiff_system.h"
#include <stdio.h>
#include <qstring.h>
#define TAB_WIDTH 8
class GnuDiff
{
public:
/* What kind of changes a hunk contains. */
enum changes
{
/* No changes: lines common to both files. */
UNCHANGED,
/* Deletes only: lines taken from just the first file. */
OLD,
/* Inserts only: lines taken from just the second file. */
NEW,
/* Both deletes and inserts: a hunk containing both old and new lines. */
CHANGED
};
/* Variables for command line options */
/* Nonzero if output cannot be generated for identical files. */
bool no_diff_means_no_output;
/* Number of lines of context to show in each set of diffs.
This is zero when context is not to be shown. */
lin context;
/* Consider all files as text files (-a).
Don't interpret codes over 0177 as implying a "binary file". */
bool text;
/* The significance of white space during comparisons. */
enum
{
/* All white space is significant (the default). */
IGNORE_NO_WHITE_SPACE,
/* Ignore changes due to tab expansion (-E). */
IGNORE_TAB_EXPANSION,
/* Ignore changes in horizontal white space (-b). */
IGNORE_SPACE_CHANGE,
/* Ignore all horizontal white space (-w). */
IGNORE_ALL_SPACE
} ignore_white_space;
/* Ignore changes that affect only blank lines (-B). */
bool ignore_blank_lines;
/* Ignore changes that affect only numbers. (J. Eibl) */
bool bIgnoreNumbers;
bool bIgnoreWhiteSpace;
/* Files can be compared byte-by-byte, as if they were binary.
This depends on various options. */
bool files_can_be_treated_as_binary;
/* Ignore differences in case of letters (-i). */
bool ignore_case;
/* Ignore differences in case of letters in file names. */
bool ignore_file_name_case;
/* Regexp to identify function-header lines (-F). */
//struct re_pattern_buffer function_regexp;
/* Ignore changes that affect only lines matching this regexp (-I). */
//struct re_pattern_buffer ignore_regexp;
/* Say only whether files differ, not how (-q). */
bool brief;
/* Expand tabs in the output so the text lines up properly
despite the characters added to the front of each line (-t). */
bool expand_tabs;
/* Use a tab in the output, rather than a space, before the text of an
input line, so as to keep the proper alignment in the input line
without changing the characters in it (-T). */
bool initial_tab;
/* In directory comparison, specify file to start with (-S).
This is used for resuming an aborted comparison.
All file names less than this name are ignored. */
const QChar *starting_file;
/* Pipe each file's output through pr (-l). */
bool paginate;
/* Line group formats for unchanged, old, new, and changed groups. */
const QChar *group_format[CHANGED + 1];
/* Line formats for unchanged, old, and new lines. */
const QChar *line_format[NEW + 1];
/* If using OUTPUT_SDIFF print extra information to help the sdiff filter. */
bool sdiff_merge_assist;
/* Tell OUTPUT_SDIFF to show only the left version of common lines. */
bool left_column;
/* Tell OUTPUT_SDIFF to not show common lines. */
bool suppress_common_lines;
/* The half line width and column 2 offset for OUTPUT_SDIFF. */
unsigned int sdiff_half_width;
unsigned int sdiff_column2_offset;
/* Use heuristics for better speed with large files with a small
density of changes. */
bool speed_large_files;
/* Patterns that match file names to be excluded. */
struct exclude *excluded;
/* Don't discard lines. This makes things slower (sometimes much
slower) but will find a guaranteed minimal set of changes. */
bool minimal;
/* The result of comparison is an "edit script": a chain of `struct change'.
Each `struct change' represents one place where some lines are deleted
and some are inserted.
LINE0 and LINE1 are the first affected lines in the two files (origin 0).
DELETED is the number of lines deleted here from file 0.
INSERTED is the number of lines inserted here in file 1.
If DELETED is 0 then LINE0 is the number of the line before
which the insertion was done; vice versa for INSERTED and LINE1. */
struct change
{
struct change *link; /* Previous or next edit command */
lin inserted; /* # lines of file 1 changed here. */
lin deleted; /* # lines of file 0 changed here. */
lin line0; /* Line number of 1st deleted line. */
lin line1; /* Line number of 1st inserted line. */
bool ignore; /* Flag used in context.c. */
};
/* Structures that describe the input files. */
/* Data on one input file being compared. */
struct file_data {
/* Buffer in which text of file is read. */
const QChar* buffer;
/* Allocated size of buffer, in QChars. Always a multiple of
sizeof *buffer. */
size_t bufsize;
/* Number of valid bytes now in the buffer. */
size_t buffered;
/* Array of pointers to lines in the file. */
const QChar **linbuf;
/* linbuf_base <= buffered_lines <= valid_lines <= alloc_lines.
linebuf[linbuf_base ... buffered_lines - 1] are possibly differing.
linebuf[linbuf_base ... valid_lines - 1] contain valid data.
linebuf[linbuf_base ... alloc_lines - 1] are allocated. */
lin linbuf_base, buffered_lines, valid_lines, alloc_lines;
/* Pointer to end of prefix of this file to ignore when hashing. */
const QChar *prefix_end;
/* Count of lines in the prefix.
There are this many lines in the file before linbuf[0]. */
lin prefix_lines;
/* Pointer to start of suffix of this file to ignore when hashing. */
const QChar *suffix_begin;
/* Vector, indexed by line number, containing an equivalence code for
each line. It is this vector that is actually compared with that
of another file to generate differences. */
lin *equivs;
/* Vector, like the previous one except that
the elements for discarded lines have been squeezed out. */
lin *undiscarded;
/* Vector mapping virtual line numbers (not counting discarded lines)
to real ones (counting those lines). Both are origin-0. */
lin *realindexes;
/* Total number of nondiscarded lines. */
lin nondiscarded_lines;
/* Vector, indexed by real origin-0 line number,
containing TRUE for a line that is an insertion or a deletion.
The results of comparison are stored here. */
bool *changed;
/* 1 if at end of file. */
bool eof;
/* 1 more than the maximum equivalence value used for this or its
sibling file. */
lin equiv_max;
};
/* Data on two input files being compared. */
struct comparison
{
struct file_data file[2];
struct comparison const *parent; /* parent, if a recursive comparison */
};
/* Describe the two files currently being compared. */
struct file_data files[2];
/* Stdio stream to output diffs to. */
FILE *outfile;
/* Declare various functions. */
/* analyze.c */
struct change* diff_2_files (struct comparison *);
/* context.c */
void print_context_header (struct file_data[], bool);
void print_context_script (struct change *, bool);
/* dir.c */
int diff_dirs (struct comparison const *, int (*) (struct comparison const *, const QChar *, const QChar *));
/* ed.c */
void print_ed_script (struct change *);
void pr_forward_ed_script (struct change *);
/* ifdef.c */
void print_ifdef_script (struct change *);
/* io.c */
void file_block_read (struct file_data *, size_t);
bool read_files (struct file_data[], bool);
/* normal.c */
void print_normal_script (struct change *);
/* rcs.c */
void print_rcs_script (struct change *);
/* side.c */
void print_sdiff_script (struct change *);
/* util.c */
QChar *concat (const QChar *, const QChar *, const QChar *);
bool lines_differ ( const QChar *, size_t, const QChar *, size_t );
lin translate_line_number (struct file_data const *, lin);
struct change *find_change (struct change *);
struct change *find_reverse_change (struct change *);
void *zalloc (size_t);
enum changes analyze_hunk (struct change *, lin *, lin *, lin *, lin *);
void begin_output (void);
void debug_script (struct change *);
void finish_output (void);
void message (const QChar *, const QChar *, const QChar *);
void message5 (const QChar *, const QChar *, const QChar *, const QChar *, const QChar *);
void output_1_line (const QChar *, const QChar *, const QChar *, const QChar *);
void perror_with_name (const QChar *);
void setup_output (const QChar *, const QChar *, bool);
void translate_range (struct file_data const *, lin, lin, long *, long *);
/* version.c */
//extern const QChar version_string[];
private:
// gnudiff_analyze.cpp
lin diag (lin xoff, lin xlim, lin yoff, lin ylim, bool find_minimal, struct partition *part);
void compareseq (lin xoff, lin xlim, lin yoff, lin ylim, bool find_minimal);
void discard_confusing_lines (struct file_data filevec[]);
void shift_boundaries (struct file_data filevec[]);
struct change * add_change (lin line0, lin line1, lin deleted, lin inserted, struct change *old);
struct change * build_reverse_script (struct file_data const filevec[]);
struct change* build_script (struct file_data const filevec[]);
// gnudiff_io.cpp
void find_and_hash_each_line (struct file_data *current);
void find_identical_ends (struct file_data filevec[]);
// gnudiff_xmalloc.cpp
void *xmalloc (size_t n);
void *xrealloc(void *p, size_t n);
void xalloc_die (void);
inline bool isWhite( QChar c )
{
return c==' ' || c=='\t' || c=='\r';
}
}; // class GnuDiff
# define XMALLOC(Type, N_items) ((Type *) xmalloc (sizeof (Type) * (N_items)))
# define XREALLOC(Ptr, Type, N_items) \
((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_items)))
/* Declare and alloc memory for VAR of type TYPE. */
# define NEW(Type, Var) Type *(Var) = XMALLOC (Type, 1)
/* Free VAR only if non NULL. */
# define XFREE(Var) \
do { \
if (Var) \
free (Var); \
} while (0)
/* Return a pointer to a malloc'ed copy of the array SRC of NUM elements. */
# define CCLONE(Src, Num) \
(memcpy (xmalloc (sizeof (*Src) * (Num)), (Src), sizeof (*Src) * (Num)))
/* Return a malloc'ed copy of SRC. */
# define CLONE(Src) CCLONE (Src, 1)
#endif

@ -0,0 +1,559 @@
/* File I/O for GNU DIFF.
Modified for KDiff3 by Joachim Eibl 2003, 2004, 2005.
The original file was part of GNU DIFF.
Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1998, 2001, 2002
Free Software Foundation, Inc.
GNU DIFF is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU DIFF is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation,
51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. */
#include "gnudiff_diff.h"
#include <stdlib.h>
/* Rotate an unsigned value to the left. */
#define ROL(v, n) ((v) << (n) | (v) >> (sizeof (v) * CHAR_BIT - (n)))
/* Given a hash value and a new character, return a new hash value. */
#define HASH(h, c) ((c) + ROL (h, 7))
/* The type of a hash value. */
typedef size_t hash_value;
verify (hash_value_is_unsigned, ! TYPE_SIGNED (hash_value));
/* Lines are put into equivalence classes of lines that match in lines_differ.
Each equivalence class is represented by one of these structures,
but only while the classes are being computed.
Afterward, each class is represented by a number. */
struct equivclass
{
lin next; /* Next item in this bucket. */
hash_value hash; /* Hash of lines in this class. */
const QChar *line; /* A line that fits this class. */
size_t length; /* That line's length, not counting its newline. */
};
/* Hash-table: array of buckets, each being a chain of equivalence classes.
buckets[-1] is reserved for incomplete lines. */
static lin *buckets;
/* Number of buckets in the hash table array, not counting buckets[-1]. */
static size_t nbuckets;
/* Array in which the equivalence classes are allocated.
The bucket-chains go through the elements in this array.
The number of an equivalence class is its index in this array. */
static struct equivclass *equivs;
/* Index of first free element in the array `equivs'. */
static lin equivs_index;
/* Number of elements allocated in the array `equivs'. */
static lin equivs_alloc;
/* Check for binary files and compare them for exact identity. */
/* Return 1 if BUF contains a non text character.
SIZE is the number of characters in BUF. */
#define binary_file_p(buf, size) (memchr (buf, 0, size) != 0)
/* Compare two lines (typically one from each input file)
according to the command line options.
For efficiency, this is invoked only when the lines do not match exactly
but an option like -i might cause us to ignore the difference.
Return nonzero if the lines differ. */
bool GnuDiff::lines_differ (const QChar *s1, size_t len1, const QChar *s2, size_t len2 )
{
const QChar *t1 = s1;
const QChar *t2 = s2;
const QChar *s1end = s1+len1;
const QChar *s2end = s2+len2;
for ( ; ; ++t1, ++t2 )
{
/* Test for exact char equality first, since it's a common case. */
if ( t1!=s1end && t2!=s2end && *t1==*t2 )
continue;
else
{
while ( t1!=s1end &&
( bIgnoreWhiteSpace && isWhite( *t1 ) ||
bIgnoreNumbers && (t1->isDigit() || *t1=='-' || *t1=='.' )))
{
++t1;
}
while ( t2 != s2end &&
( bIgnoreWhiteSpace && isWhite( *t2 ) ||
bIgnoreNumbers && (t2->isDigit() || *t2=='-' || *t2=='.' )))
{
++t2;
}
if ( t1!=s1end && t2!=s2end )
{
if (ignore_case)
{ /* Lowercase comparison. */
if ( t1->lower() == t2->lower() )
continue;
}
else if ( *t1 == *t2 )
continue;
else
return true;
}
else if ( t1==s1end && t2==s2end )
return false;
else
return true;
}
}
return false;
}
/* Split the file into lines, simultaneously computing the equivalence
class for each line. */
void GnuDiff::find_and_hash_each_line (struct file_data *current)
{
hash_value h;
const QChar *p = current->prefix_end;
QChar c;
lin i, *bucket;
size_t length;
/* Cache often-used quantities in local variables to help the compiler. */
const QChar **linbuf = current->linbuf;
lin alloc_lines = current->alloc_lines;
lin line = 0;
lin linbuf_base = current->linbuf_base;
lin *cureqs = (lin*)xmalloc (alloc_lines * sizeof *cureqs);
struct equivclass *eqs = equivs;
lin eqs_index = equivs_index;
lin eqs_alloc = equivs_alloc;
const QChar *suffix_begin = current->suffix_begin;
const QChar *bufend = current->buffer + current->buffered;
bool diff_length_compare_anyway =
ignore_white_space != IGNORE_NO_WHITE_SPACE || bIgnoreNumbers;
bool same_length_diff_contents_compare_anyway =
diff_length_compare_anyway | ignore_case;
while ( p < suffix_begin)
{
const QChar *ip = p;
h = 0;
/* Hash this line until we find a newline or bufend is reached. */
if (ignore_case)
switch (ignore_white_space)
{
case IGNORE_ALL_SPACE:
while ( p<bufend && (c = *p) != '\n' )
{
if (! (isWhite(c) || bIgnoreNumbers && (c.isDigit() || c=='-' || c=='.' ) ))
h = HASH (h, c.lower().unicode());
++p;
}
break;
default:
while ( p<bufend && (c = *p) != '\n' )
{
h = HASH (h, c.lower().unicode());
++p;
}
break;
}
else
switch (ignore_white_space)
{
case IGNORE_ALL_SPACE:
while ( p<bufend && (c = *p) != '\n')
{
if (! (isWhite(c)|| bIgnoreNumbers && (c.isDigit() || c=='-' || c=='.' ) ))
h = HASH (h, c.unicode());
++p;
}
break;
default:
while ( p<bufend && (c = *p) != '\n')
{
h = HASH (h, c.unicode());
++p;
}
break;
}
bucket = &buckets[h % nbuckets];
length = p - ip;
++p;
for (i = *bucket; ; i = eqs[i].next)
if (!i)
{
/* Create a new equivalence class in this bucket. */
i = eqs_index++;
if (i == eqs_alloc)
{
if ((lin)(PTRDIFF_MAX / (2 * sizeof *eqs)) <= eqs_alloc)
xalloc_die ();
eqs_alloc *= 2;
eqs = (equivclass*)xrealloc (eqs, eqs_alloc * sizeof *eqs);
}
eqs[i].next = *bucket;
eqs[i].hash = h;
eqs[i].line = ip;
eqs[i].length = length;
*bucket = i;
break;
}
else if (eqs[i].hash == h)
{
const QChar *eqline = eqs[i].line;
/* Reuse existing class if lines_differ reports the lines
equal. */
if (eqs[i].length == length)
{
/* Reuse existing equivalence class if the lines are identical.
This detects the common case of exact identity
faster than lines_differ would. */
if (memcmp (eqline, ip, length*sizeof(QChar)) == 0)
break;
if (!same_length_diff_contents_compare_anyway)
continue;
}
else if (!diff_length_compare_anyway)
continue;
if (! lines_differ (eqline, eqs[i].length, ip, length))
break;
}
/* Maybe increase the size of the line table. */
if (line == alloc_lines)
{
/* Double (alloc_lines - linbuf_base) by adding to alloc_lines. */
if ((lin)(PTRDIFF_MAX / 3) <= alloc_lines
|| (lin)(PTRDIFF_MAX / sizeof *cureqs) <= 2 * alloc_lines - linbuf_base
|| (lin)(PTRDIFF_MAX / sizeof *linbuf) <= alloc_lines - linbuf_base)
xalloc_die ();
alloc_lines = 2 * alloc_lines - linbuf_base;
cureqs =(lin*) xrealloc (cureqs, alloc_lines * sizeof *cureqs);
linbuf += linbuf_base;
linbuf = (const QChar**) xrealloc (linbuf,
(alloc_lines - linbuf_base) * sizeof *linbuf);
linbuf -= linbuf_base;
}
linbuf[line] = ip;
cureqs[line] = i;
++line;
}
current->buffered_lines = line;
for (i = 0; ; i++)
{
/* Record the line start for lines in the suffix that we care about.
Record one more line start than lines,
so that we can compute the length of any buffered line. */
if (line == alloc_lines)
{
/* Double (alloc_lines - linbuf_base) by adding to alloc_lines. */
if ((lin)(PTRDIFF_MAX / 3) <= alloc_lines
|| (lin)(PTRDIFF_MAX / sizeof *cureqs) <= 2 * alloc_lines - linbuf_base
|| (lin)(PTRDIFF_MAX / sizeof *linbuf) <= alloc_lines - linbuf_base)
xalloc_die ();
alloc_lines = 2 * alloc_lines - linbuf_base;
linbuf += linbuf_base;
linbuf = (const QChar**)xrealloc (linbuf,
(alloc_lines - linbuf_base) * sizeof *linbuf);
linbuf -= linbuf_base;
}
linbuf[line] = p;
if ( p >= bufend)
break;
if (context <= i && no_diff_means_no_output)
break;
line++;
while (p<bufend && *p++ != '\n')
continue;
}
/* Done with cache in local variables. */
current->linbuf = linbuf;
current->valid_lines = line;
current->alloc_lines = alloc_lines;
current->equivs = cureqs;
equivs = eqs;
equivs_alloc = eqs_alloc;
equivs_index = eqs_index;
}
/* We have found N lines in a buffer of size S; guess the
proportionate number of lines that will be found in a buffer of
size T. However, do not guess a number of lines so large that the
resulting line table might cause overflow in size calculations. */
static lin
guess_lines (lin n, size_t s, size_t t)
{
size_t guessed_bytes_per_line = n < 10 ? 32 : s / (n - 1);
lin guessed_lines = MAX (1, t / guessed_bytes_per_line);
return MIN (guessed_lines, (lin)(PTRDIFF_MAX / (2 * sizeof (QChar *) + 1) - 5)) + 5;
}
/* Given a vector of two file_data objects, find the identical
prefixes and suffixes of each object. */
void GnuDiff::find_identical_ends (struct file_data filevec[])
{
/* Find identical prefix. */
const QChar *p0, *p1, *buffer0, *buffer1;
p0 = buffer0 = filevec[0].buffer;
p1 = buffer1 = filevec[1].buffer;
size_t n0, n1;
n0 = filevec[0].buffered;
n1 = filevec[1].buffered;
const QChar* const pEnd0 = p0 + n0;
const QChar* const pEnd1 = p1 + n1;
if (p0 == p1)
/* The buffers are the same; sentinels won't work. */
p0 = p1 += n1;
else
{
/* Loop until first mismatch, or end. */
while ( p0!=pEnd0 && p1!=pEnd1 && *p0 == *p1 )
{
p0++;
p1++;
}
}
/* Now P0 and P1 point at the first nonmatching characters. */
/* Skip back to last line-beginning in the prefix. */
while (p0 != buffer0 && (p0[-1] != '\n' ))
p0--, p1--;
/* Record the prefix. */
filevec[0].prefix_end = p0;
filevec[1].prefix_end = p1;
/* Find identical suffix. */
/* P0 and P1 point beyond the last chars not yet compared. */
p0 = buffer0 + n0;
p1 = buffer1 + n1;
const QChar *end0, *beg0;
end0 = p0; /* Addr of last char in file 0. */
/* Get value of P0 at which we should stop scanning backward:
this is when either P0 or P1 points just past the last char
of the identical prefix. */
beg0 = filevec[0].prefix_end + (n0 < n1 ? 0 : n0 - n1);
/* Scan back until chars don't match or we reach that point. */
for (; p0 != beg0; p0--, p1--)
{
if (*p0 != *p1)
{
/* Point at the first char of the matching suffix. */
beg0 = p0;
break;
}
}
// Go to the next line (skip last line with a difference)
if ( p0 != end0 )
{
if (*p0 != *p1)
++p0;
while ( p0<pEnd0 && *p0++ != '\n')
continue;
}
p1 += p0 - beg0;
/* Record the suffix. */
filevec[0].suffix_begin = p0;
filevec[1].suffix_begin = p1;
/* Calculate number of lines of prefix to save.
prefix_count == 0 means save the whole prefix;
we need this for options like -D that output the whole file,
or for enormous contexts (to avoid worrying about arithmetic overflow).
We also need it for options like -F that output some preceding line;
at least we will need to find the last few lines,
but since we don't know how many, it's easiest to find them all.
Otherwise, prefix_count != 0. Save just prefix_count lines at start
of the line buffer; they'll be moved to the proper location later.
Handle 1 more line than the context says (because we count 1 too many),
rounded up to the next power of 2 to speed index computation. */
const QChar **linbuf0, **linbuf1;
lin alloc_lines0, alloc_lines1;
lin buffered_prefix, prefix_count, prefix_mask;
lin middle_guess, suffix_guess;
if (no_diff_means_no_output
&& context < (lin)(LIN_MAX / 4) && context < (lin)(n0))
{
middle_guess = guess_lines (0, 0, p0 - filevec[0].prefix_end);
suffix_guess = guess_lines (0, 0, buffer0 + n0 - p0);
for (prefix_count = 1; prefix_count <= context; prefix_count *= 2)
continue;
alloc_lines0 = (prefix_count + middle_guess
+ MIN (context, suffix_guess));
}
else
{
prefix_count = 0;
alloc_lines0 = guess_lines (0, 0, n0);
}
prefix_mask = prefix_count - 1;
lin lines = 0;
linbuf0 = (const QChar**) xmalloc (alloc_lines0 * sizeof(*linbuf0));
p0 = buffer0;
/* If the prefix is needed, find the prefix lines. */
if (! (no_diff_means_no_output
&& filevec[0].prefix_end == p0
&& filevec[1].prefix_end == p1))
{
end0 = filevec[0].prefix_end;
while (p0 != end0)
{
lin l = lines++ & prefix_mask;
if (l == alloc_lines0)
{
if ((lin)(PTRDIFF_MAX / (2 * sizeof *linbuf0)) <= alloc_lines0)
xalloc_die ();
alloc_lines0 *= 2;
linbuf0 = (const QChar**) xrealloc (linbuf0, alloc_lines0 * sizeof(*linbuf0));
}
linbuf0[l] = p0;
while ( p0<pEnd0 && *p0++ != '\n' )
continue;
}
}
buffered_prefix = prefix_count && context < lines ? context : lines;
/* Allocate line buffer 1. */
middle_guess = guess_lines (lines, p0 - buffer0, p1 - filevec[1].prefix_end);
suffix_guess = guess_lines (lines, p0 - buffer0, buffer1 + n1 - p1);
alloc_lines1 = buffered_prefix + middle_guess + MIN (context, suffix_guess);
if (alloc_lines1 < buffered_prefix
|| (lin)(PTRDIFF_MAX / sizeof *linbuf1) <= alloc_lines1)
xalloc_die ();
linbuf1 = (const QChar**)xmalloc (alloc_lines1 * sizeof(*linbuf1));
lin i;
if (buffered_prefix != lines)
{
/* Rotate prefix lines to proper location. */
for (i = 0; i < buffered_prefix; i++)
linbuf1[i] = linbuf0[(lines - context + i) & prefix_mask];
for (i = 0; i < buffered_prefix; i++)
linbuf0[i] = linbuf1[i];
}
/* Initialize line buffer 1 from line buffer 0. */
for (i = 0; i < buffered_prefix; i++)
linbuf1[i] = linbuf0[i] - buffer0 + buffer1;
/* Record the line buffer, adjusted so that
linbuf[0] points at the first differing line. */
filevec[0].linbuf = linbuf0 + buffered_prefix;
filevec[1].linbuf = linbuf1 + buffered_prefix;
filevec[0].linbuf_base = filevec[1].linbuf_base = - buffered_prefix;
filevec[0].alloc_lines = alloc_lines0 - buffered_prefix;
filevec[1].alloc_lines = alloc_lines1 - buffered_prefix;
filevec[0].prefix_lines = filevec[1].prefix_lines = lines;
}
/* If 1 < k, then (2**k - prime_offset[k]) is the largest prime less
than 2**k. This table is derived from Chris K. Caldwell's list
<http://www.utm.edu/research/primes/lists/2small/>. */
static unsigned char const prime_offset[] =
{
0, 0, 1, 1, 3, 1, 3, 1, 5, 3, 3, 9, 3, 1, 3, 19, 15, 1, 5, 1, 3, 9, 3,
15, 3, 39, 5, 39, 57, 3, 35, 1, 5, 9, 41, 31, 5, 25, 45, 7, 87, 21,
11, 57, 17, 55, 21, 115, 59, 81, 27, 129, 47, 111, 33, 55, 5, 13, 27,
55, 93, 1, 57, 25
};
/* Verify that this host's size_t is not too wide for the above table. */
verify (enough_prime_offsets,
sizeof (size_t) * CHAR_BIT <= sizeof prime_offset);
/* Given a vector of two file_data objects, read the file associated
with each one, and build the table of equivalence classes.
Return nonzero if either file appears to be a binary file.
If PRETEND_BINARY is nonzero, pretend they are binary regardless. */
bool
GnuDiff::read_files (struct file_data filevec[], bool /*pretend_binary*/)
{
int i;
find_identical_ends (filevec);
equivs_alloc = filevec[0].alloc_lines + filevec[1].alloc_lines + 1;
if ((lin)(PTRDIFF_MAX / sizeof *equivs) <= equivs_alloc)
xalloc_die ();
equivs = (equivclass*)xmalloc (equivs_alloc * sizeof *equivs);
/* Equivalence class 0 is permanently safe for lines that were not
hashed. Real equivalence classes start at 1. */
equivs_index = 1;
/* Allocate (one plus) a prime number of hash buckets. Use a prime
number between 1/3 and 2/3 of the value of equiv_allocs,
approximately. */
for (i = 9; 1 << i < equivs_alloc / 3; i++)
continue;
nbuckets = ((size_t) 1 << i) - prime_offset[i];
if (PTRDIFF_MAX / sizeof *buckets <= nbuckets)
xalloc_die ();
buckets = (lin*)zalloc ((nbuckets + 1) * sizeof *buckets);
buckets++;
for (i = 0; i < 2; i++)
find_and_hash_each_line (&filevec[i]);
filevec[0].equiv_max = filevec[1].equiv_max = equivs_index;
free (equivs);
free (buckets - 1);
return 0;
}

@ -0,0 +1,123 @@
/* System dependent declarations.
Modified for KDiff3 by Joachim Eibl 2003.
The original file was part of GNU DIFF.
Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1998, 2001, 2002
Free Software Foundation, Inc.
GNU DIFF is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU DIFF is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation,
51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef GNUDIFF_SYSTEM_H
#define GNUDIFF_SYSTEM_H
//#include <config.h>
/* Don't bother to support K&R C compilers any more; it's not worth
the trouble. These macros prevent some library modules from being
compiled in K&R C mode. */
#define PARAMS(Args) Args
#define PROTOTYPES 1
/* Verify a requirement at compile-time (unlike assert, which is runtime). */
#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; }
/* Determine whether an integer type is signed, and its bounds.
This code assumes two's (or one's!) complement with no holes. */
/* The extra casts work around common compiler bugs,
e.g. Cray C 5.0.3.0 when t == time_t. */
#ifndef TYPE_SIGNED
# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
#endif
#ifndef TYPE_MINIMUM
# define TYPE_MINIMUM(t) ((t) (TYPE_SIGNED (t) \
? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) \
: (t) 0))
#endif
#ifndef TYPE_MAXIMUM
# define TYPE_MAXIMUM(t) ((t) (~ (t) 0 - TYPE_MINIMUM (t)))
#endif
#include <sys/types.h>
#include <sys/stat.h>
# include <stdlib.h>
#ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
#endif
#if !EXIT_FAILURE
# undef EXIT_FAILURE /* Sony NEWS-OS 4.0C defines EXIT_FAILURE to 0. */
# define EXIT_FAILURE 1
#endif
#define EXIT_TROUBLE 2
#include <limits.h>
#ifndef SSIZE_MAX
# define SSIZE_MAX TYPE_MAXIMUM (ssize_t)
#endif
#ifndef PTRDIFF_MAX
# define PTRDIFF_MAX TYPE_MAXIMUM (ptrdiff_t)
#endif
#ifndef SIZE_MAX
# define SIZE_MAX TYPE_MAXIMUM (size_t)
#endif
#ifndef UINTMAX_MAX
# define UINTMAX_MAX TYPE_MAXIMUM (uintmax_t)
#endif
#include <stddef.h>
#include <string.h>
#include <ctype.h>
/* CTYPE_DOMAIN (C) is nonzero if the unsigned char C can safely be given
as an argument to <ctype.h> macros like `isspace'. */
# define CTYPE_DOMAIN(c) 1
#define ISPRINT(c) (CTYPE_DOMAIN (c) && isprint (c))
#define ISSPACE(c) (CTYPE_DOMAIN (c) && isspace (c))
# define TOLOWER(c) tolower (c)
/* ISDIGIT differs from isdigit, as follows:
- Its arg may be any int or unsigned int; it need not be an unsigned char.
- It's guaranteed to evaluate its argument exactly once.
- It's typically faster.
POSIX 1003.1-2001 says that only '0' through '9' are digits.
Prefer ISDIGIT to isdigit unless it's important to use the locale's
definition of `digit' even when the host does not conform to POSIX. */
#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
#undef MIN
#undef MAX
#define MIN(a, b) ((a) <= (b) ? (a) : (b))
#define MAX(a, b) ((a) >= (b) ? (a) : (b))
/* The integer type of a line number. Since files are read into main
memory, ptrdiff_t should be wide enough. */
typedef ptrdiff_t lin;
#define LIN_MAX PTRDIFF_MAX
verify (lin_is_signed, TYPE_SIGNED (lin));
verify (lin_is_wide_enough, sizeof (ptrdiff_t) <= sizeof (lin));
verify (lin_is_printable_as_long, sizeof (lin) <= sizeof (long));
#endif

@ -0,0 +1,88 @@
/* xmalloc.c -- malloc with out of memory checking
Modified for KDiff3 by Joachim Eibl 2003.
The original file was part of GNU DIFF.
Copyright (C) 1990-1999, 2000, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#ifndef EXIT_FAILURE
# define EXIT_FAILURE 1
#endif
#include "gnudiff_diff.h"
/* If non NULL, call this function when memory is exhausted. */
//void (*xalloc_fail_func) PARAMS ((void)) = 0;
void (*xalloc_fail_func)(void) = 0;
void GnuDiff::xalloc_die (void)
{
if (xalloc_fail_func)
(*xalloc_fail_func) ();
//error (exit_failure, 0, "%s", _(xalloc_msg_memory_exhausted));
/* The `noreturn' cannot be given to error, since it may return if
its first argument is 0. To help compilers understand the
xalloc_die does terminate, call exit. */
exit (EXIT_FAILURE);
}
/* Allocate N bytes of memory dynamically, with error checking. */
void *
GnuDiff::xmalloc (size_t n)
{
void *p;
p = malloc (n == 0 ? 1 : n); // There are systems where malloc returns 0 for n==0.
if (p == 0)
xalloc_die ();
return p;
}
/* Change the size of an allocated block of memory P to N bytes,
with error checking. */
void *
GnuDiff::xrealloc (void *p, size_t n)
{
p = realloc (p, n==0 ? 1 : n);
if (p == 0)
xalloc_die ();
return p;
}
/* Yield a new block of SIZE bytes, initialized to zero. */
void *
GnuDiff::zalloc (size_t size)
{
void *p = xmalloc (size);
memset (p, 0, size);
return p;
}

Binary file not shown.

Binary file not shown.

@ -0,0 +1,992 @@
/***************************************************************************
kdiff3.cpp - description
-------------------
begin : Don Jul 11 12:31:29 CEST 2002
copyright : (C) 2002-2007 by Joachim Eibl
email : joachim.eibl at gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "difftextwindow.h"
#include "mergeresultwindow.h"
#include <iostream>
// include files for QT
#include <qdir.h>
#include <qprinter.h>
#include <qpainter.h>
#include <qsplitter.h>
#include <qlineedit.h>
#include <qcheckbox.h>
#include <qpushbutton.h>
#include <qpopupmenu.h>
#include <qlabel.h>
#include <qtextedit.h>
#include <qlayout.h>
#include <qpaintdevicemetrics.h>
// include files for KDE
#include <kiconloader.h>
#include <kmessagebox.h>
#include <kfiledialog.h>
#include <kmenubar.h>
#include <kstatusbar.h>
#include <klocale.h>
#include <kconfig.h>
#include <kstdaction.h>
#include <kcmdlineargs.h>
#include <kprinter.h>
//#include <kkeydialog.h>
// application specific includes
#include "kdiff3.h"
#include "optiondialog.h"
#include "fileaccess.h"
#include "kdiff3_part.h"
#include "directorymergewindow.h"
#include "smalldialogs.h"
#define ID_STATUS_MSG 1
KActionCollection* KDiff3App::actionCollection()
{
if ( m_pKDiff3Shell==0 )
return m_pKDiff3Part->actionCollection();
else
return m_pKDiff3Shell->actionCollection();
}
KStatusBar* KDiff3App::statusBar()
{
if ( m_pKDiff3Shell==0 )
return 0;
else
return m_pKDiff3Shell->statusBar();
}
KToolBar* KDiff3App::toolBar(const char* toolBarId )
{
if ( m_pKDiff3Shell==0 )
return 0;
else
return m_pKDiff3Shell->toolBar( toolBarId );
}
bool KDiff3App::isPart()
{
return m_pKDiff3Shell==0;
}
bool KDiff3App::isFileSaved()
{
return m_bFileSaved;
}
KDiff3App::KDiff3App(QWidget* pParent, const char* name, KDiff3Part* pKDiff3Part )
:QSplitter(pParent, name) //previously KMainWindow
{
m_pKDiff3Part = pKDiff3Part;
m_pKDiff3Shell = dynamic_cast<KParts::MainWindow*>(pParent);
setCaption( "KDiff3" );
m_pMainSplitter = 0;
m_pDirectoryMergeWindow = 0;
m_pCornerWidget = 0;
m_pMainWidget = 0;
m_pDiffTextWindow1 = 0;
m_pDiffTextWindow2 = 0;
m_pDiffTextWindow3 = 0;
m_pDiffTextWindowFrame1 = 0;
m_pDiffTextWindowFrame2 = 0;
m_pDiffTextWindowFrame3 = 0;
m_pDiffWindowSplitter = 0;
m_pOverview = 0;
m_bTripleDiff = false;
m_pMergeResultWindow = 0;
m_pMergeWindowFrame = 0;
m_bOutputModified = false;
m_bFileSaved = false;
m_bTimerBlock = false;
m_pHScrollBar = 0;
// Needed before any file operations via FileAccess happen.
if (!g_pProgressDialog)
{
g_pProgressDialog = new ProgressDialog(0);
g_pProgressDialog->setStayHidden( true );
}
// All default values must be set before calling readOptions().
m_pOptionDialog = new OptionDialog( m_pKDiff3Shell!=0, this );
connect( m_pOptionDialog, SIGNAL(applyClicked()), this, SLOT(slotRefresh()) );
m_pOptionDialog->readOptions( isPart() ? m_pKDiff3Part->instance()->config() : kapp->config() );
// Option handling: Only when pParent==0 (no parent)
KCmdLineArgs *args = isPart() ? 0 : KCmdLineArgs::parsedArgs();
if (args)
{
QString s;
QString title;
if ( args->isSet("confighelp") )
{
s = m_pOptionDialog->calcOptionHelp();
title = i18n("Current Configuration:");
}
else
{
s = m_pOptionDialog->parseOptions( args->getOptionList("cs") );
title = i18n("Config Option Error:");
}
if (!s.isEmpty())
{
#ifdef _WIN32
// A windows program has no console
//KMessageBox::information(0, s,i18n("KDiff3-Usage"));
QDialog* pDialog = new QDialog(this,"",true,Qt::WDestructiveClose);
pDialog->setCaption(title);
QVBoxLayout* pVBoxLayout = new QVBoxLayout( pDialog );
QTextEdit* pTextEdit = new QTextEdit(pDialog);
pTextEdit->setText(s);
pTextEdit->setReadOnly(true);
pTextEdit->setWordWrap(QTextEdit::NoWrap);
pVBoxLayout->addWidget(pTextEdit);
pDialog->resize(600,400);
pDialog->exec();
#else
std::cerr << title.latin1() << std::endl;
std::cerr << s.latin1() << std::endl;
#endif
exit(1);
}
}
m_sd1.setOptionDialog(m_pOptionDialog);
m_sd2.setOptionDialog(m_pOptionDialog);
m_sd3.setOptionDialog(m_pOptionDialog);
if (args!=0)
{
m_outputFilename = args->getOption("output");
if ( m_outputFilename.isEmpty() )
m_outputFilename = args->getOption("out");
}
m_bAutoFlag = args!=0 && args->isSet("auto");
m_bAutoMode = m_bAutoFlag || m_pOptionDialog->m_bAutoSaveAndQuitOnMergeWithoutConflicts;
if ( m_bAutoMode && m_outputFilename.isEmpty() )
{
if ( m_bAutoFlag )
{
//KMessageBox::information(this, i18n("Option --auto used, but no output file specified."));
std::cerr << i18n("Option --auto used, but no output file specified.").ascii()<<std::endl;
}
m_bAutoMode = false;
}
g_pProgressDialog->setStayHidden( m_bAutoMode );
if ( m_outputFilename.isEmpty() && args!=0 && args->isSet("merge") )
{
m_outputFilename = "unnamed.txt";
m_bDefaultFilename = true;
}
else
m_bDefaultFilename = false;
g_bAutoSolve = args!=0 && !args->isSet("qall"); // Note that this is effective only once.
if ( args!=0 )
{
m_sd1.setFilename( args->getOption("base") );
if ( m_sd1.isEmpty() )
{
if ( args->count() > 0 ) m_sd1.setFilename( args->url(0).url() ); // args->arg(0)
if ( args->count() > 1 ) m_sd2.setFilename( args->url(1).url() );
if ( args->count() > 2 ) m_sd3.setFilename( args->url(2).url() );
}
else
{
if ( args->count() > 0 ) m_sd2.setFilename( args->url(0).url() );
if ( args->count() > 1 ) m_sd3.setFilename( args->url(1).url() );
}
QCStringList aliasList = args->getOptionList("fname");
QCStringList::Iterator ali = aliasList.begin();
QString an1 = args->getOption("L1");
if ( !an1.isEmpty() ) { m_sd1.setAliasName(an1); }
else if ( ali != aliasList.end() ) { m_sd1.setAliasName(*ali); ++ali; }
QString an2 = args->getOption("L2");
if ( !an2.isEmpty() ) { m_sd2.setAliasName(an2); }
else if ( ali != aliasList.end() ) { m_sd2.setAliasName(*ali); ++ali; }
QString an3 = args->getOption("L3");
if ( !an3.isEmpty() ) { m_sd3.setAliasName(an3); }
else if ( ali != aliasList.end() ) { m_sd3.setAliasName(*ali); ++ali; }
}
///////////////////////////////////////////////////////////////////
// call inits to invoke all other construction parts
initActions(actionCollection());
initStatusBar();
m_pFindDialog = new FindDialog( this );
connect( m_pFindDialog, SIGNAL(findNext()), this, SLOT(slotEditFindNext()));
autoAdvance->setChecked( m_pOptionDialog->m_bAutoAdvance );
showWhiteSpaceCharacters->setChecked( m_pOptionDialog->m_bShowWhiteSpaceCharacters );
showWhiteSpace->setChecked( m_pOptionDialog->m_bShowWhiteSpace );
showWhiteSpaceCharacters->setEnabled( m_pOptionDialog->m_bShowWhiteSpace );
showLineNumbers->setChecked( m_pOptionDialog->m_bShowLineNumbers );
wordWrap->setChecked( m_pOptionDialog->m_bWordWrap );
if ( ! isPart() )
{
viewToolBar->setChecked( m_pOptionDialog->m_bShowToolBar );
viewStatusBar->setChecked( m_pOptionDialog->m_bShowStatusBar );
slotViewToolBar();
slotViewStatusBar();
if( toolBar("mainToolBar")!=0 )
toolBar("mainToolBar")->setBarPos( (KToolBar::BarPosition) m_pOptionDialog->m_toolBarPos );
/* QSize size = m_pOptionDialog->m_geometry;
QPoint pos = m_pOptionDialog->m_position;
if(!size.isEmpty())
{
m_pKDiff3Shell->resize( size );
QRect visibleRect = QRect( pos, size ) & QApplication::desktop()->rect();
if ( visibleRect.width()>100 && visibleRect.height()>100 )
m_pKDiff3Shell->move( pos );
}*/
}
slotRefresh();
m_pMainSplitter = this; //new QSplitter(this);
m_pMainSplitter->setOrientation( Vertical );
// setCentralWidget( m_pMainSplitter );
m_pDirectoryMergeSplitter = new QSplitter( m_pMainSplitter );
m_pDirectoryMergeSplitter->setOrientation( Horizontal );
m_pDirectoryMergeWindow = new DirectoryMergeWindow( m_pDirectoryMergeSplitter, m_pOptionDialog,
KApplication::kApplication()->iconLoader() );
m_pDirectoryMergeInfo = new DirectoryMergeInfo( m_pDirectoryMergeSplitter );
m_pDirectoryMergeWindow->setDirectoryMergeInfo( m_pDirectoryMergeInfo );
connect( m_pDirectoryMergeWindow, SIGNAL(startDiffMerge(QString,QString,QString,QString,QString,QString,QString,TotalDiffStatus*)),
this, SLOT( slotFileOpen2(QString,QString,QString,QString,QString,QString,QString,TotalDiffStatus*)));
connect( m_pDirectoryMergeWindow, SIGNAL(selectionChanged()), this, SLOT(slotUpdateAvailabilities()));
connect( m_pDirectoryMergeWindow, SIGNAL(currentChanged(QListViewItem*)), this, SLOT(slotUpdateAvailabilities()));
connect( m_pDirectoryMergeWindow, SIGNAL(checkIfCanContinue(bool*)), this, SLOT(slotCheckIfCanContinue(bool*)));
connect( m_pDirectoryMergeWindow, SIGNAL(updateAvailabilities()), this, SLOT(slotUpdateAvailabilities()));
connect( m_pDirectoryMergeWindow, SIGNAL(statusBarMessage(const QString&)), this, SLOT(slotStatusMsg(const QString&)));
m_pDirectoryMergeWindow->initDirectoryMergeActions( this, actionCollection() );
if ( args!=0 ) args->clear(); // Free up some memory.
if (m_pKDiff3Shell==0)
{
completeInit();
}
}
void KDiff3App::completeInit( const QString& fn1, const QString& fn2, const QString& fn3 )
{
if (m_pKDiff3Shell!=0)
{
QSize size=m_pOptionDialog->m_geometry;
QPoint pos=m_pOptionDialog->m_position;
if(!size.isEmpty())
{
m_pKDiff3Shell->resize( size );
QRect visibleRect = QRect( pos, size ) & QApplication::desktop()->rect();
if ( visibleRect.width()>100 && visibleRect.height()>100 )
m_pKDiff3Shell->move( pos );
if (!m_bAutoMode)
{
if ( m_pOptionDialog->m_bMaximised )
m_pKDiff3Shell->showMaximized();
else
m_pKDiff3Shell->show();
}
}
}
if ( ! fn1.isEmpty() ) { m_sd1.setFilename(fn1); }
if ( ! fn2.isEmpty() ) { m_sd2.setFilename(fn2); }
if ( ! fn3.isEmpty() ) { m_sd3.setFilename(fn3); }
bool bSuccess = improveFilenames(false);
if ( m_bAutoFlag && m_bAutoMode && m_bDirCompare )
{
std::cerr << i18n("Option --auto ignored for directory comparison.").ascii()<<std::endl;
m_bAutoMode = false;
}
if (!m_bDirCompare)
{
m_pDirectoryMergeSplitter->hide();
init( m_bAutoMode );
if ( m_bAutoMode )
{
SourceData* pSD=0;
if ( m_sd3.isEmpty() )
{
if ( m_totalDiffStatus.bBinaryAEqB ){ pSD = &m_sd1; }
}
else
{
if ( m_totalDiffStatus.bBinaryBEqC ){ pSD = &m_sd3; } // B==C (assume A is old)
else if ( m_totalDiffStatus.bBinaryAEqB ){ pSD = &m_sd3; } // assuming C has changed
else if ( m_totalDiffStatus.bBinaryAEqC ){ pSD = &m_sd2; } // assuming B has changed
}
if ( pSD!=0 )
{
// Save this file directly, not via the merge result window.
bool bSuccess = false;
FileAccess fa( m_outputFilename );
if ( m_pOptionDialog->m_bDmCreateBakFiles && fa.exists() )
{
QString newName = m_outputFilename + ".orig";
if ( FileAccess::exists( newName ) ) FileAccess::removeFile( newName );
if ( !FileAccess::exists( newName ) ) fa.rename( newName );
}
bSuccess = pSD->saveNormalDataAs( m_outputFilename );
if ( bSuccess ) ::exit(0);
else KMessageBox::error( this, i18n("Saving failed.") );
}
else if ( m_pMergeResultWindow->getNrOfUnsolvedConflicts() == 0 )
{
bool bSuccess = m_pMergeResultWindow->saveDocument( m_pMergeResultWindowTitle->getFileName(), m_pMergeResultWindowTitle->getEncoding() );
if ( bSuccess ) ::exit(0);
}
}
}
m_bAutoMode = false;
if (m_pKDiff3Shell)
{
if ( m_pOptionDialog->m_bMaximised )
m_pKDiff3Shell->showMaximized();
else
m_pKDiff3Shell->show();
}
g_pProgressDialog->setStayHidden( false );
if (statusBar() !=0 )
statusBar()->setSizeGripEnabled(true);
slotClipboardChanged(); // For initialisation.
slotUpdateAvailabilities();
if ( ! m_bDirCompare && m_pKDiff3Shell!=0 )
{
bool bFileOpenError = false;
if ( ! m_sd1.isEmpty() && !m_sd1.hasData() ||
! m_sd2.isEmpty() && !m_sd2.hasData() ||
! m_sd3.isEmpty() && !m_sd3.hasData() )
{
QString text( i18n("Opening of these files failed:") );
text += "\n\n";
if ( ! m_sd1.isEmpty() && !m_sd1.hasData() )
text += " - " + m_sd1.getAliasName() + "\n";
if ( ! m_sd2.isEmpty() && !m_sd2.hasData() )
text += " - " + m_sd2.getAliasName() + "\n";
if ( ! m_sd3.isEmpty() && !m_sd3.hasData() )
text += " - " + m_sd3.getAliasName() + "\n";
KMessageBox::sorry( this, text, i18n("File Open Error") );
bFileOpenError = true;
}
if ( m_sd1.isEmpty() || m_sd2.isEmpty() || bFileOpenError )
slotFileOpen();
}
else if ( !bSuccess ) // Directory open failed
{
slotFileOpen();
}
}
KDiff3App::~KDiff3App()
{
}
void KDiff3App::initActions( KActionCollection* ac )
{
if (ac==0) KMessageBox::error(0, "actionCollection==0");
fileOpen = KStdAction::open(this, SLOT(slotFileOpen()), ac);
fileOpen->setStatusText(i18n("Opens documents for comparison..."));
fileReload = new KAction(i18n("Reload"), /*QIconSet(QPixmap(reloadIcon)),*/ Key_F5, this, SLOT(slotReload()), ac, "file_reload");
fileSave = KStdAction::save(this, SLOT(slotFileSave()), ac);
fileSave->setStatusText(i18n("Saves the merge result. All conflicts must be solved!"));
fileSaveAs = KStdAction::saveAs(this, SLOT(slotFileSaveAs()), ac);
fileSaveAs->setStatusText(i18n("Saves the current document as..."));
filePrint = KStdAction::print(this, SLOT(slotFilePrint()), ac);
filePrint->setStatusText(i18n("Print the differences"));
fileQuit = KStdAction::quit(this, SLOT(slotFileQuit()), ac);
fileQuit->setStatusText(i18n("Quits the application"));
editCut = KStdAction::cut(this, SLOT(slotEditCut()), ac);
editCut->setStatusText(i18n("Cuts the selected section and puts it to the clipboard"));
editCopy = KStdAction::copy(this, SLOT(slotEditCopy()), ac);
editCopy->setStatusText(i18n("Copies the selected section to the clipboard"));
editPaste = KStdAction::paste(this, SLOT(slotEditPaste()), ac);
editPaste->setStatusText(i18n("Pastes the clipboard contents to actual position"));
editSelectAll = KStdAction::selectAll(this, SLOT(slotEditSelectAll()), ac);
editSelectAll->setStatusText(i18n("Select everything in current window"));
editFind = KStdAction::find(this, SLOT(slotEditFind()), ac);
editFind->setStatusText(i18n("Search for a string"));
editFindNext = KStdAction::findNext(this, SLOT(slotEditFindNext()), ac);
editFindNext->setStatusText(i18n("Search again for the string"));
viewToolBar = KStdAction::showToolbar(this, SLOT(slotViewToolBar()), ac);
viewToolBar->setStatusText(i18n("Enables/disables the toolbar"));
viewStatusBar = KStdAction::showStatusbar(this, SLOT(slotViewStatusBar()), ac);
viewStatusBar->setStatusText(i18n("Enables/disables the statusbar"));
KStdAction::keyBindings(this, SLOT(slotConfigureKeys()), ac);
KAction* pAction = KStdAction::preferences(this, SLOT(slotConfigure()), ac );
if ( isPart() )
pAction->setText(i18n("Configure KDiff3..."));
#include "xpm/downend.xpm"
#include "xpm/currentpos.xpm"
#include "xpm/down1arrow.xpm"
#include "xpm/down2arrow.xpm"
#include "xpm/upend.xpm"
#include "xpm/up1arrow.xpm"
#include "xpm/up2arrow.xpm"
#include "xpm/prevunsolved.xpm"
#include "xpm/nextunsolved.xpm"
#include "xpm/iconA.xpm"
#include "xpm/iconB.xpm"
#include "xpm/iconC.xpm"
#include "xpm/autoadvance.xpm"
#include "xpm/showwhitespace.xpm"
#include "xpm/showwhitespacechars.xpm"
#include "xpm/showlinenumbers.xpm"
//#include "reload.xpm"
goCurrent = new KAction(i18n("Go to Current Delta"), QIconSet(QPixmap(currentpos)), CTRL+Key_Space, this, SLOT(slotGoCurrent()), ac, "go_current");
goTop = new KAction(i18n("Go to First Delta"), QIconSet(QPixmap(upend)), 0, this, SLOT(slotGoTop()), ac, "go_top");
goBottom = new KAction(i18n("Go to Last Delta"), QIconSet(QPixmap(downend)), 0, this, SLOT(slotGoBottom()), ac, "go_bottom");
QString omitsWhitespace = ".\n" + i18n("(Skips white space differences when \"Show White Space\" is disabled.)");
QString includeWhitespace = ".\n" + i18n("(Does not skip white space differences even when \"Show White Space\" is disabled.)");
goPrevDelta = new KAction(i18n("Go to Previous Delta"), QIconSet(QPixmap(up1arrow)), CTRL+Key_Up, this, SLOT(slotGoPrevDelta()), ac, "go_prev_delta");
goPrevDelta->setToolTip( goPrevDelta->text() + omitsWhitespace );
goNextDelta = new KAction(i18n("Go to Next Delta"), QIconSet(QPixmap(down1arrow)), CTRL+Key_Down, this, SLOT(slotGoNextDelta()), ac, "go_next_delta");
goNextDelta->setToolTip( goNextDelta->text() + omitsWhitespace );
goPrevConflict = new KAction(i18n("Go to Previous Conflict"), QIconSet(QPixmap(up2arrow)), CTRL+Key_PageUp, this, SLOT(slotGoPrevConflict()), ac, "go_prev_conflict");
goPrevConflict->setToolTip( goPrevConflict->text() + omitsWhitespace );
goNextConflict = new KAction(i18n("Go to Next Conflict"), QIconSet(QPixmap(down2arrow)), CTRL+Key_PageDown, this, SLOT(slotGoNextConflict()), ac, "go_next_conflict");
goNextConflict->setToolTip( goNextConflict->text() + omitsWhitespace );
goPrevUnsolvedConflict = new KAction(i18n("Go to Previous Unsolved Conflict"), QIconSet(QPixmap(prevunsolved)), 0, this, SLOT(slotGoPrevUnsolvedConflict()), ac, "go_prev_unsolved_conflict");
goPrevUnsolvedConflict->setToolTip( goPrevUnsolvedConflict->text() + includeWhitespace );
goNextUnsolvedConflict = new KAction(i18n("Go to Next Unsolved Conflict"), QIconSet(QPixmap(nextunsolved)), 0, this, SLOT(slotGoNextUnsolvedConflict()), ac, "go_next_unsolved_conflict");
goNextUnsolvedConflict->setToolTip( goNextUnsolvedConflict->text() + includeWhitespace );
chooseA = new KToggleAction(i18n("Select Line(s) From A"), QIconSet(QPixmap(iconA)), CTRL+Key_1, this, SLOT(slotChooseA()), ac, "merge_choose_a");
chooseB = new KToggleAction(i18n("Select Line(s) From B"), QIconSet(QPixmap(iconB)), CTRL+Key_2, this, SLOT(slotChooseB()), ac, "merge_choose_b");
chooseC = new KToggleAction(i18n("Select Line(s) From C"), QIconSet(QPixmap(iconC)), CTRL+Key_3, this, SLOT(slotChooseC()), ac, "merge_choose_c");
autoAdvance = new KToggleAction(i18n("Automatically Go to Next Unsolved Conflict After Source Selection"), QIconSet(QPixmap(autoadvance)), 0, this, SLOT(slotAutoAdvanceToggled()), ac, "merge_autoadvance");
showWhiteSpaceCharacters = new KToggleAction(i18n("Show Space && Tabulator Characters for Differences"), QIconSet(QPixmap(showwhitespacechars)), 0, this, SLOT(slotShowWhiteSpaceToggled()), ac, "diff_show_whitespace_characters");
showWhiteSpace = new KToggleAction(i18n("Show White Space"), QIconSet(QPixmap(showwhitespace)), 0, this, SLOT(slotShowWhiteSpaceToggled()), ac, "diff_show_whitespace");
showLineNumbers = new KToggleAction(i18n("Show Line Numbers"), QIconSet(QPixmap(showlinenumbers)), 0, this, SLOT(slotShowLineNumbersToggled()), ac, "diff_showlinenumbers");
chooseAEverywhere = new KAction(i18n("Choose A Everywhere"), CTRL+SHIFT+Key_1, this, SLOT(slotChooseAEverywhere()), ac, "merge_choose_a_everywhere");
chooseBEverywhere = new KAction(i18n("Choose B Everywhere"), CTRL+SHIFT+Key_2, this, SLOT(slotChooseBEverywhere()), ac, "merge_choose_b_everywhere");
chooseCEverywhere = new KAction(i18n("Choose C Everywhere"), CTRL+SHIFT+Key_3, this, SLOT(slotChooseCEverywhere()), ac, "merge_choose_c_everywhere");
chooseAForUnsolvedConflicts = new KAction(i18n("Choose A for All Unsolved Conflicts"), 0, this, SLOT(slotChooseAForUnsolvedConflicts()), ac, "merge_choose_a_for_unsolved_conflicts");
chooseBForUnsolvedConflicts = new KAction(i18n("Choose B for All Unsolved Conflicts"), 0, this, SLOT(slotChooseBForUnsolvedConflicts()), ac, "merge_choose_b_for_unsolved_conflicts");
chooseCForUnsolvedConflicts = new KAction(i18n("Choose C for All Unsolved Conflicts"), 0, this, SLOT(slotChooseCForUnsolvedConflicts()), ac, "merge_choose_c_for_unsolved_conflicts");
chooseAForUnsolvedWhiteSpaceConflicts = new KAction(i18n("Choose A for All Unsolved Whitespace Conflicts"), 0, this, SLOT(slotChooseAForUnsolvedWhiteSpaceConflicts()), ac, "merge_choose_a_for_unsolved_whitespace_conflicts");
chooseBForUnsolvedWhiteSpaceConflicts = new KAction(i18n("Choose B for All Unsolved Whitespace Conflicts"), 0, this, SLOT(slotChooseBForUnsolvedWhiteSpaceConflicts()), ac, "merge_choose_b_for_unsolved_whitespace_conflicts");
chooseCForUnsolvedWhiteSpaceConflicts = new KAction(i18n("Choose C for All Unsolved Whitespace Conflicts"), 0, this, SLOT(slotChooseCForUnsolvedWhiteSpaceConflicts()), ac, "merge_choose_c_for_unsolved_whitespace_conflicts");
autoSolve = new KAction(i18n("Automatically Solve Simple Conflicts"), 0, this, SLOT(slotAutoSolve()), ac, "merge_autosolve");
unsolve = new KAction(i18n("Set Deltas to Conflicts"), 0, this, SLOT(slotUnsolve()), ac, "merge_autounsolve");
mergeRegExp = new KAction(i18n("Run Regular Expression Auto Merge"), 0, this, SLOT(slotRegExpAutoMerge()),ac, "merge_regexp_automerge" );
mergeHistory = new KAction(i18n("Automatically Solve History Conflicts"), 0, this, SLOT(slotMergeHistory()), ac, "merge_versioncontrol_history" );
splitDiff = new KAction(i18n("Split Diff At Selection"), 0, this, SLOT(slotSplitDiff()), ac, "merge_splitdiff");
joinDiffs = new KAction(i18n("Join Selected Diffs"), 0, this, SLOT(slotJoinDiffs()), ac, "merge_joindiffs");
showWindowA = new KToggleAction(i18n("Show Window A"), 0, this, SLOT(slotShowWindowAToggled()), ac, "win_show_a");
showWindowB = new KToggleAction(i18n("Show Window B"), 0, this, SLOT(slotShowWindowBToggled()), ac, "win_show_b");
showWindowC = new KToggleAction(i18n("Show Window C"), 0, this, SLOT(slotShowWindowCToggled()), ac, "win_show_c");
winFocusNext = new KAction(i18n("Focus Next Window"), ALT+Key_Right, this, SLOT(slotWinFocusNext()), ac, "win_focus_next");
overviewModeNormal = new KToggleAction(i18n("Normal Overview"), 0, this, SLOT(slotOverviewNormal()), ac, "diff_overview_normal");
overviewModeAB = new KToggleAction(i18n("A vs. B Overview"), 0, this, SLOT(slotOverviewAB()), ac, "diff_overview_ab");
overviewModeAC = new KToggleAction(i18n("A vs. C Overview"), 0, this, SLOT(slotOverviewAC()), ac, "diff_overview_ac");
overviewModeBC = new KToggleAction(i18n("B vs. C Overview"), 0, this, SLOT(slotOverviewBC()), ac, "diff_overview_bc");
wordWrap = new KToggleAction(i18n("Word Wrap Diff Windows"), 0, this, SLOT(slotWordWrapToggled()), ac, "diff_wordwrap");
addManualDiffHelp = new KAction(i18n("Add Manual Diff Alignment"), Qt::CTRL+Qt::Key_Y, this, SLOT(slotAddManualDiffHelp()), ac, "diff_add_manual_diff_help");
clearManualDiffHelpList = new KAction(i18n("Clear All Manual Diff Alignments"), Qt::CTRL+Qt::SHIFT+Qt::Key_Y, this, SLOT(slotClearManualDiffHelpList()), ac, "diff_clear_manual_diff_help_list");
#ifdef _WIN32
new KAction(i18n("Focus Next Window"), Qt::CTRL+Qt::Key_Tab, this, SLOT(slotWinFocusNext()), ac, "win_focus_next", false, false);
#endif
winFocusPrev = new KAction(i18n("Focus Prev Window"), Qt::ALT+Qt::Key_Left, this, SLOT(slotWinFocusPrev()), ac, "win_focus_prev");
winToggleSplitOrientation = new KAction(i18n("Toggle Split Orientation"), 0, this, SLOT(slotWinToggleSplitterOrientation()), ac, "win_toggle_split_orientation");
dirShowBoth = new KToggleAction(i18n("Dir && Text Split Screen View"), 0, this, SLOT(slotDirShowBoth()), ac, "win_dir_show_both");
dirShowBoth->setChecked( true );
dirViewToggle = new KAction(i18n("Toggle Between Dir && Text View"), 0, this, SLOT(slotDirViewToggle()), actionCollection(), "win_dir_view_toggle");
m_pMergeEditorPopupMenu = new QPopupMenu( this );
chooseA->plug( m_pMergeEditorPopupMenu );
chooseB->plug( m_pMergeEditorPopupMenu );
chooseC->plug( m_pMergeEditorPopupMenu );
}
void KDiff3App::showPopupMenu( const QPoint& point )
{
m_pMergeEditorPopupMenu->popup( point );
}
void KDiff3App::initStatusBar()
{
///////////////////////////////////////////////////////////////////
// STATUSBAR
if (statusBar() !=0 )
statusBar()->message( i18n("Ready.") );
}
void KDiff3App::saveOptions( KConfig* config )
{
if ( !m_bAutoMode )
{
if (!isPart())
{
m_pOptionDialog->m_bMaximised = m_pKDiff3Shell->isMaximized();
if( ! m_pKDiff3Shell->isMaximized() && m_pKDiff3Shell->isVisible() )
{
m_pOptionDialog->m_geometry = m_pKDiff3Shell->size();
m_pOptionDialog->m_position = m_pKDiff3Shell->pos();
}
if ( toolBar("mainToolBar")!=0 )
m_pOptionDialog->m_toolBarPos = (int) toolBar("mainToolBar")->barPos();
}
m_pOptionDialog->saveOptions( config );
}
}
bool KDiff3App::queryClose()
{
saveOptions( isPart() ? m_pKDiff3Part->instance()->config() : kapp->config() );
if(m_bOutputModified)
{
int result = KMessageBox::warningYesNoCancel(this,
i18n("The merge result hasn't been saved."),
i18n("Warning"), i18n("Save && Quit"), i18n("Quit Without Saving") );
if ( result==KMessageBox::Cancel )
return false;
else if ( result==KMessageBox::Yes )
{
slotFileSave();
if ( m_bOutputModified )
{
KMessageBox::sorry(this, i18n("Saving the merge result failed."), i18n("Warning") );
return false;
}
}
}
m_bOutputModified = false;
if ( m_pDirectoryMergeWindow->isDirectoryMergeInProgress() )
{
int result = KMessageBox::warningYesNo(this,
i18n("You are currently doing a directory merge. Are you sure, you want to abort?"),
i18n("Warning"), i18n("Quit"), i18n("Continue Merging") );
if ( result!=KMessageBox::Yes )
return false;
}
return true;
}
/////////////////////////////////////////////////////////////////////
// SLOT IMPLEMENTATION
/////////////////////////////////////////////////////////////////////
void KDiff3App::slotFileSave()
{
if ( m_bDefaultFilename )
{
slotFileSaveAs();
}
else
{
slotStatusMsg(i18n("Saving file..."));
bool bSuccess = m_pMergeResultWindow->saveDocument( m_outputFilename, m_pMergeResultWindowTitle->getEncoding() );
if ( bSuccess )
{
m_bFileSaved = true;
m_bOutputModified = false;
if ( m_bDirCompare )
m_pDirectoryMergeWindow->mergeResultSaved(m_outputFilename);
}
slotStatusMsg(i18n("Ready."));
}
}
void KDiff3App::slotFileSaveAs()
{
slotStatusMsg(i18n("Saving file with a new filename..."));
QString s = KFileDialog::getSaveURL( QDir::currentDirPath(), 0, this, i18n("Save As...") ).url();
if(!s.isEmpty())
{
m_outputFilename = s;
m_pMergeResultWindowTitle->setFileName( m_outputFilename );
bool bSuccess = m_pMergeResultWindow->saveDocument( m_outputFilename, m_pMergeResultWindowTitle->getEncoding() );
if ( bSuccess )
{
m_bOutputModified = false;
if ( m_bDirCompare )
m_pDirectoryMergeWindow->mergeResultSaved(m_outputFilename);
}
//setCaption(url.fileName(),doc->isModified());
m_bDefaultFilename = false;
}
slotStatusMsg(i18n("Ready."));
}
void printDiffTextWindow( MyPainter& painter, const QRect& view, const QString& headerText, DiffTextWindow* pDiffTextWindow, int line, int linesPerPage, QColor fgColor )
{
QRect clipRect = view;
clipRect.setTop(0);
painter.setClipRect( clipRect );
painter.translate( view.left() , 0 );
QFontMetrics fm = painter.fontMetrics();
//if ( fm.width(headerText) > view.width() )
{
// A simple wrapline algorithm
int l=0;
for (unsigned int p=0; p<headerText.length(); )
{
QString s = headerText.mid(p);
unsigned int i;
for(i=2;i<s.length();++i)
if (fm.width(s,i)>view.width())
{
--i;
break;
}
//QString s2 = s.left(i);
painter.drawText( 0, l*fm.height() + fm.ascent(), s.left(i) );
p+=i;
++l;
}
painter.setPen( fgColor );
painter.drawLine( 0, view.top()-2, view.width(), view.top()-2 );
}
painter.translate( 0, view.top() );
pDiffTextWindow->print( painter, view, line, linesPerPage );
painter.resetXForm();
}
void KDiff3App::slotFilePrint()
{
if ( !m_pDiffTextWindow1 )
return;
KPrinter printer;
int firstSelectionD3LIdx = -1;
int lastSelectionD3LIdx = -1;
if ( m_pDiffTextWindow1 ) { m_pDiffTextWindow1->getSelectionRange(&firstSelectionD3LIdx, &lastSelectionD3LIdx, eD3LLineCoords); }
if ( firstSelectionD3LIdx<0 && m_pDiffTextWindow2 ) { m_pDiffTextWindow2->getSelectionRange(&firstSelectionD3LIdx, &lastSelectionD3LIdx, eD3LLineCoords); }
if ( firstSelectionD3LIdx<0 && m_pDiffTextWindow3 ) { m_pDiffTextWindow3->getSelectionRange(&firstSelectionD3LIdx, &lastSelectionD3LIdx, eD3LLineCoords); }
#ifdef KREPLACEMENTS_H // Currently PrintSelection is not supported in KDEs print dialog.
if ( firstSelectionD3LIdx>=0 )
{
printer.setOptionEnabled(KPrinter::PrintSelection,true);
}
#endif
printer.setPageSelection(KPrinter::ApplicationSide);
printer.setMinMax(1,10000);
printer.setCurrentPage(10000);
int currentFirstLine = m_pDiffTextWindow1->getFirstLine();
int currentFirstD3LIdx = m_pDiffTextWindow1->convertLineToDiff3LineIdx( currentFirstLine );
// do some printer initialization
printer.setFullPage( false );
// initialize the printer using the print dialog
if ( printer.setup( this ) )
{
slotStatusMsg( i18n( "Printing..." ) );
// create a painter to paint on the printer object
MyPainter painter( 0, m_pOptionDialog->m_bRightToLeftLanguage, width(), fontMetrics().width('W') );
// start painting
if( !painter.begin( &printer ) ) { // paint on printer
slotStatusMsg( i18n( "Printing aborted." ) );
return;
}
QPaintDeviceMetrics metrics( painter.device() );
int dpiy = metrics.logicalDpiY();
int columnDistance = (int) ( (0.5/2.54)*dpiy ); // 0.5 cm between the columns
int columns = m_bTripleDiff ? 3 : 2;
int columnWidth = ( metrics.width() - (columns-1)*columnDistance ) / columns;
QFont f = m_pOptionDialog->m_font;
f.setPointSizeFloat(f.pointSizeFloat()-1); // Print with slightly smaller font.
painter.setFont( f );
QFontMetrics fm = painter.fontMetrics();
QString topLineText = i18n("Top line");
//int headerWidth = fm.width( m_sd1.getAliasName() + ", "+topLineText+": 01234567" );
int headerLines = fm.width( m_sd1.getAliasName() + ", "+topLineText+": 01234567" )/columnWidth+1;
int headerMargin = headerLines * fm.height() + 3; // Text + one horizontal line
int footerMargin = fm.height() + 3;
QRect view ( 0, headerMargin, metrics.width(), metrics.height() - (headerMargin + footerMargin) );
QRect view1( 0*(columnWidth + columnDistance), view.top(), columnWidth, view.height() );
QRect view2( 1*(columnWidth + columnDistance), view.top(), columnWidth, view.height() );
QRect view3( 2*(columnWidth + columnDistance), view.top(), columnWidth, view.height() );
int linesPerPage = view.height() / fm.height();
int charactersPerLine = columnWidth / fm.width("W");
if ( m_pOptionDialog->m_bWordWrap )
{
// For printing the lines are wrapped differently (this invalidates the first line)
recalcWordWrap( charactersPerLine );
}
int totalNofLines = max2(m_pDiffTextWindow1->getNofLines(), m_pDiffTextWindow2->getNofLines());
if ( m_bTripleDiff && m_pDiffTextWindow3)
totalNofLines = max2(totalNofLines, m_pDiffTextWindow3->getNofLines());
QValueList<int> pageList = printer.pageList();
bool bPrintCurrentPage=false;
bool bFirstPrintedPage = false;
bool bPrintSelection = false;
int totalNofPages = (totalNofLines+linesPerPage-1) / linesPerPage;
int line=-1;
int selectionEndLine = -1;
#ifdef KREPLACEMENTS_H
if ( printer.printRange()==KPrinter::AllPages )
{
pageList.clear();
for(int i=0; i<totalNofPages; ++i)
{
pageList.push_back(i+1);
}
}
if ( printer.printRange()==KPrinter::Selection )
#else
if ( !pageList.empty() && pageList.front()==9999 )
#endif
{
bPrintSelection = true;
if ( firstSelectionD3LIdx >=0 )
{
line = m_pDiffTextWindow1->convertDiff3LineIdxToLine( firstSelectionD3LIdx );
selectionEndLine = m_pDiffTextWindow1->convertDiff3LineIdxToLine( lastSelectionD3LIdx+1 );
totalNofPages = (selectionEndLine-line+linesPerPage-1) / linesPerPage;
}
}
int page = 1;
QValueList<int>::iterator pageListIt = pageList.begin();
for(;;)
{
if (!bPrintSelection)
{
if (pageListIt==pageList.end())
break;
page = *pageListIt;
line = (page - 1) * linesPerPage;
if (page==10000) // This means "Print the current page"
{
bPrintCurrentPage=true;
// Detect the first visible line in the window.
line = m_pDiffTextWindow1->convertDiff3LineIdxToLine( currentFirstD3LIdx );
}
}
else
{
if ( line>=selectionEndLine )
{
break;
}
else
{
if ( selectionEndLine-line < linesPerPage )
linesPerPage=selectionEndLine-line;
}
}
if (line>=0 && line<totalNofLines )
{
if (bFirstPrintedPage)
printer.newPage();
painter.setClipping(true);
painter.setPen( m_pOptionDialog->m_colorA );
QString headerText1 = m_sd1.getAliasName() + ", "+topLineText+": " + QString::number(m_pDiffTextWindow1->calcTopLineInFile(line)+1);
printDiffTextWindow( painter, view1, headerText1, m_pDiffTextWindow1, line, linesPerPage, m_pOptionDialog->m_fgColor );
painter.setPen( m_pOptionDialog->m_colorB );
QString headerText2 = m_sd2.getAliasName() + ", "+topLineText+": " + QString::number(m_pDiffTextWindow2->calcTopLineInFile(line)+1);
printDiffTextWindow( painter, view2, headerText2, m_pDiffTextWindow2, line, linesPerPage, m_pOptionDialog->m_fgColor );
if ( m_bTripleDiff && m_pDiffTextWindow3 )
{
painter.setPen( m_pOptionDialog->m_colorC );
QString headerText3 = m_sd3.getAliasName() + ", "+topLineText+": " + QString::number(m_pDiffTextWindow3->calcTopLineInFile(line)+1);
printDiffTextWindow( painter, view3, headerText3, m_pDiffTextWindow3, line, linesPerPage, m_pOptionDialog->m_fgColor );
}
painter.setClipping(false);
painter.setPen( m_pOptionDialog->m_fgColor );
painter.drawLine( 0, view.bottom()+3, view.width(), view.bottom()+3 );
QString s = bPrintCurrentPage ? QString("")
: QString::number( page ) + "/" + QString::number(totalNofPages);
if ( bPrintSelection ) s+=" (" + i18n("Selection") + ")";
painter.drawText( (view.right() - painter.fontMetrics().width( s ))/2,
view.bottom() + painter.fontMetrics().ascent() + 5, s );
bFirstPrintedPage = true;
}
if ( bPrintSelection )
{
line+=linesPerPage;
++page;
}
else
{
++pageListIt;
}
}
painter.end();
if ( m_pOptionDialog->m_bWordWrap )
{
recalcWordWrap();
m_pDiffVScrollBar->setValue( m_pDiffTextWindow1->convertDiff3LineIdxToLine( currentFirstD3LIdx ) );
}
slotStatusMsg( i18n( "Printing completed." ) );
}
else
{
slotStatusMsg( i18n( "Printing aborted." ) );
}
}
void KDiff3App::slotFileQuit()
{
slotStatusMsg(i18n("Exiting..."));
if( !queryClose() )
return; // Don't quit
KApplication::exit( isFileSaved() ? 0 : 1 );
}
void KDiff3App::slotViewToolBar()
{
slotStatusMsg(i18n("Toggling toolbar..."));
m_pOptionDialog->m_bShowToolBar = viewToolBar->isChecked();
///////////////////////////////////////////////////////////////////
// turn Toolbar on or off
if ( toolBar("mainToolBar") !=0 )
{
if(!m_pOptionDialog->m_bShowToolBar)
{
toolBar("mainToolBar")->hide();
}
else
{
toolBar("mainToolBar")->show();
}
}
slotStatusMsg(i18n("Ready."));
}
void KDiff3App::slotViewStatusBar()
{
slotStatusMsg(i18n("Toggle the statusbar..."));
m_pOptionDialog->m_bShowStatusBar = viewStatusBar->isChecked();
///////////////////////////////////////////////////////////////////
//turn Statusbar on or off
if (statusBar() !=0 )
{
if(!viewStatusBar->isChecked())
{
statusBar()->hide();
}
else
{
statusBar()->show();
}
}
slotStatusMsg(i18n("Ready."));
}
void KDiff3App::slotStatusMsg(const QString &text)
{
///////////////////////////////////////////////////////////////////
// change status message permanently
if (statusBar() !=0 )
{
statusBar()->clear();
statusBar()->message( text );
}
}
#include "kdiff3.moc"

@ -0,0 +1,91 @@
[Desktop Entry]
Encoding=UTF-8
Name=KDiff3
Name[hi]=के-डिफ3
Name[sv]=Kdiff3
Name[ta]=கேடிஃப்3
Name[xx]=xxKDiff3xx
GenericName=Diff/Patch Frontend
GenericName[ar]=واجهة أمامية لبرامج Diff/Patch
GenericName[bg]=Интерфейс на Diff/Patch
GenericName[bs]=Interfejs za Diff/Patch
GenericName[ca]=Interfície per a diff/patch
GenericName[cs]=Rozhraní pro Diff/Patch
GenericName[cy]=Blaen Gwahaniaethau/Clytiau
GenericName[da]=Forende for diff/patch
GenericName[de]=Graphische Oberfläche zu Diff/Patch
GenericName[el]=Σύστημα υποστήριξης χρήστη για τα Diff/Patch
GenericName[es]=Interfaz Diff/Patch
GenericName[et]=Võrdlemise ja liitmise rakendus
GenericName[fr]=Interface graphique à diff / patch
GenericName[ga]=Comhéadan Diff/Patch
GenericName[gl]=Interface para Diff/Patch
GenericName[hi]=डिफ/पैच फ्रन्टएण्ड
GenericName[hu]=Grafikus diff/patch
GenericName[is]=Diff/Patch viðmót
GenericName[it]=Interfaccia per diff/patch
GenericName[ja]=Diff/Patch フロントエンド
GenericName[lt]=Diff/Patch naudotojo sąsaja
GenericName[ms]=Bahagian Depan Beza/Tampal
GenericName[nb]=Endrings-/lappeprogram
GenericName[nl]=Een schil voor Diff/Patch
GenericName[pa]=Diff/Patch ਮੁੱਖ
GenericName[pl]=Interfejs do programów Diff/Patch
GenericName[pt]=Interface do Diff/Patch
GenericName[pt_BR]=Interface do Diff/Patch
GenericName[ru]=Графический интерфейс к Diff и Patch
GenericName[sk]=Rozhranie pre diff/patch
GenericName[sr]=Интерфејс за diff и patch
GenericName[sr@Latn]=Interfejs za diff i patch
GenericName[sv]=Jämförelse- och programfixgränssnitt
GenericName[ta]= Diff/Patch Frontend
GenericName[tg]=Интерфейси графикӣ ба Diff ва Patch
GenericName[tr]=Diff/Patch Arayüzü
GenericName[uk]=Інтерфейс до diff/patch
GenericName[xx]=xxDiff/Patch Frontendxx
GenericName[zh_CN]=Diff/Patch 前端
GenericName[zu]=Diff/PatchIsiqalo sokugcina
Exec=kdiff3 %i %m -caption "%c"
Icon=kdiff3
Type=Application
Categories=Qt;KDE;Development;
DocPath=kdiff3/index.html
Comment=A File And Directory Comparison And Merge Tool
Comment[ar]=أداة مقارنة و دمج ملفات و دلائل (مجلًدات )
Comment[bg]=Инструмент за сравняване и сливане на файлове и директории
Comment[bs]=Alat za upoređivanje i spajanje datoteka i direktorija
Comment[ca]=Una eina per a comparar i fusionar fitxers o directoris
Comment[cs]=Nástroj pro porovnávání a slučování souborů a adresářů
Comment[da]=Et indfletningsværktøj for filer og mapper
Comment[de]=Programm zum Vergleichen und Zusammenführen von Dateien und Ordnern
Comment[el]=Ένα εργαλείο σύγκρισης και συγχώνευσης αρχείων και καταλόγων
Comment[es]=Una herramienta para mezclar y comparar archivos y directorios
Comment[et]=Failide ja kataloogide võrdlemise ja liitmise tööriist
Comment[fr]=Un outil de comparaison et de fusion de fichiers et dossiers
Comment[ga]=Uirlis a chuireann comhaid agus comhadlanna i gcomparáid agus a chumascann iad más gá
Comment[gl]=Comparazón e Unificazón de Ficheiros e Cartafoles
Comment[hi]=एक फाइल तथा डिरेक्ट्री तुलना तथा विलीन उपकरण
Comment[hu]=Segédprogram fájlok, könyvtárak összehasonlításához
Comment[is]=Skráa og möppu samanburðar og sameiningartól
Comment[it]=Uno strumento di confronto e unione di file e directory
Comment[ja]=ファイル/ディレクトリの比較/統合ツール
Comment[ka]=ფაილთა და საქაღალდეთა შედარების და შერწყმის ხელსაწყო
Comment[ms]=Perbandingan Fail Dan Direktori Dan Alatan Gabungan
Comment[nb]=Et verktøy for å sammenlikne og slå sammen filer og mapper
Comment[nl]=Hulpmiddel voor het vergelijken en samenvoegen van bestanden en mappen
Comment[pa]=ਇੱਕ ਫਾਇਲ ਅਤੇ ਡਾਇਰੈਕਟਰੀ ਤੁਲਨਾ ਅਤੇ ਮਿਲਾਨ ਸੰਦ ਹੈ
Comment[pl]=Narzędzie do porównywania oraz łączenia plików i katalogów
Comment[pt]=Uma Ferramenta de Comparação e Junção de Ficheiros e Pastas
Comment[pt_BR]=Uma Ferramenta de Comparação e Junção de Arquivos e Diretórios
Comment[ru]=Утилита сравнения и объединения файлов и каталогов
Comment[sk]=Nástroj pre porovnanie a spájanie súborov a priečinkov
Comment[sr]=Алат за поређење и стапање фајлова и директоријума
Comment[sr@Latn]=Alat za poređenje i stapanje fajlova i direktorijuma
Comment[sv]=Ett jämförelseverktyg för fil- och katalogjämförelser
Comment[tg]=Асбоби баробаркунӣ ва пайванди файлҳо ва каталогҳо
Comment[tr]=Bir Dosya Ve Klasör Karşılaştırma Ve Birleştirme Aracı
Comment[uk]=Засіб-утиліта для порівняння і поєднання файлів та каталогів
Comment[xx]=xxA File And Directory Comparison And Merge Toolxx
Comment[zh_CN]=一个文件和目录的比较及合并工具
Terminal=false

@ -0,0 +1,410 @@
/***************************************************************************
kdiff3.h - description
-------------------
begin : Don Jul 11 12:31:29 CEST 2002
copyright : (C) 2002-2007 by Joachim Eibl
email : joachim.eibl at gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef KDIFF3_H
#define KDIFF3_H
#include "diff.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
// include files for Qt
#include <qdialog.h>
#include <qsplitter.h>
#include <qscrollbar.h>
// include files for KDE
#include <kapplication.h>
#include <kmainwindow.h>
#include <kaccel.h>
#include <kaction.h>
#include <kurl.h>
#include <kparts/mainwindow.h>
// forward declaration of the KDiff3 classes
class OptionDialog;
class FindDialog;
class ManualDiffHelpDialog;
class DiffTextWindow;
class DiffTextWindowFrame;
class MergeResultWindow;
class WindowTitleWidget;
class Overview;
class QScrollBar;
class QComboBox;
class QLineEdit;
class QCheckBox;
class QSplitter;
class KDiff3Part;
class DirectoryMergeWindow;
class DirectoryMergeInfo;
class ReversibleScrollBar : public QScrollBar
{
Q_OBJECT
bool* m_pbRightToLeftLanguage;
int m_realVal;
public:
ReversibleScrollBar( Orientation o, QWidget* pParent, bool* pbRightToLeftLanguage )
: QScrollBar( o, pParent )
{
m_pbRightToLeftLanguage=pbRightToLeftLanguage;
m_realVal=0;
connect( this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged(int)));
}
void setAgain(){ setValue(m_realVal); }
public slots:
void slotValueChanged(int i)
{
m_realVal = i;
if(m_pbRightToLeftLanguage && *m_pbRightToLeftLanguage)
m_realVal = maxValue()-(i-minValue());
emit valueChanged2(m_realVal);
}
void setValue(int i)
{
if(m_pbRightToLeftLanguage && *m_pbRightToLeftLanguage)
QScrollBar::setValue( maxValue()-(i-minValue()) );
else
QScrollBar::setValue( i );
}
signals:
void valueChanged2(int);
};
class KDiff3App : public QSplitter
{
Q_OBJECT
public:
/** constructor of KDiff3App, calls all init functions to create the application.
*/
KDiff3App( QWidget* parent, const char* name, KDiff3Part* pKDiff3Part );
~KDiff3App();
bool isPart();
/** initializes the KActions of the application */
void initActions( KActionCollection* );
/** save general Options like all bar positions and status as well as the geometry
and the recent file list to the configuration file */
void saveOptions( KConfig* );
/** read general Options again and initialize all variables like the recent file list */
void readOptions( KConfig* );
// Finish initialisation (virtual, so that it can be called from the shell too.)
virtual void completeInit(const QString& fn1="", const QString& fn2="", const QString& fn3="");
/** queryClose is called by KMainWindow on each closeEvent of a window. Against the
* default implementation (only returns true), this calles saveModified() on the document object to ask if the document shall
* be saved if Modified; on cancel the closeEvent is rejected.
* @see KMainWindow#queryClose
* @see KMainWindow#closeEvent
*/
virtual bool queryClose();
virtual bool isFileSaved();
signals:
void createNewInstance( const QString& fn1, const QString& fn2, const QString& fn3 );
protected:
void initDirectoryMergeActions();
/** sets up the statusbar for the main window by initialzing a statuslabel. */
void initStatusBar();
/** creates the centerwidget of the KMainWindow instance and sets it as the view */
void initView();
public slots:
/** open a file and load it into the document*/
void slotFileOpen();
void slotFileOpen2( QString fn1, QString fn2, QString fn3, QString ofn,
QString an1, QString an2, QString an3, TotalDiffStatus* pTotalDiffStatus );
void slotFileNameChanged(const QString& fileName, int winIdx);
/** save a document */
void slotFileSave();
/** save a document by a new filename*/
void slotFileSaveAs();
void slotFilePrint();
/** closes all open windows by calling close() on each memberList item until the list is empty, then quits the application.
* If queryClose() returns false because the user canceled the saveModified() dialog, the closing breaks.
*/
void slotFileQuit();
/** put the marked text/object into the clipboard and remove
* it from the document
*/
void slotEditCut();
/** put the marked text/object into the clipboard
*/
void slotEditCopy();
/** paste the clipboard into the document
*/
void slotEditPaste();
/** toggles the toolbar
*/
void slotViewToolBar();
/** toggles the statusbar
*/
void slotViewStatusBar();
/** changes the statusbar contents for the standard label permanently, used to indicate current actions.
* @param text the text that is displayed in the statusbar
*/
void slotStatusMsg(const QString &text);
private:
/** the configuration object of the application */
//KConfig *config;
// KAction pointers to enable/disable actions
KAction* fileOpen;
KAction* fileSave;
KAction* fileSaveAs;
KAction* filePrint;
KAction* fileQuit;
KAction* fileReload;
KAction* editCut;
KAction* editCopy;
KAction* editPaste;
KAction* editSelectAll;
KToggleAction* viewToolBar;
KToggleAction* viewStatusBar;
////////////////////////////////////////////////////////////////////////
// Special KDiff3 specific stuff starts here
KAction *editFind;
KAction *editFindNext;
KAction *goCurrent;
KAction *goTop;
KAction *goBottom;
KAction *goPrevUnsolvedConflict;
KAction *goNextUnsolvedConflict;
KAction *goPrevConflict;
KAction *goNextConflict;
KAction *goPrevDelta;
KAction *goNextDelta;
KToggleAction *chooseA;
KToggleAction *chooseB;
KToggleAction *chooseC;
KToggleAction *autoAdvance;
KToggleAction *wordWrap;
KAction* splitDiff;
KAction* joinDiffs;
KAction* addManualDiffHelp;
KAction* clearManualDiffHelpList;
KToggleAction *showWhiteSpaceCharacters;
KToggleAction *showWhiteSpace;
KToggleAction *showLineNumbers;
KAction* chooseAEverywhere;
KAction* chooseBEverywhere;
KAction* chooseCEverywhere;
KAction* chooseAForUnsolvedConflicts;
KAction* chooseBForUnsolvedConflicts;
KAction* chooseCForUnsolvedConflicts;
KAction* chooseAForUnsolvedWhiteSpaceConflicts;
KAction* chooseBForUnsolvedWhiteSpaceConflicts;
KAction* chooseCForUnsolvedWhiteSpaceConflicts;
KAction* autoSolve;
KAction* unsolve;
KAction* mergeHistory;
KAction* mergeRegExp;
KToggleAction *showWindowA;
KToggleAction *showWindowB;
KToggleAction *showWindowC;
KAction *winFocusNext;
KAction *winFocusPrev;
KAction* winToggleSplitOrientation;
KToggleAction *dirShowBoth;
KAction *dirViewToggle;
KToggleAction *overviewModeNormal;
KToggleAction *overviewModeAB;
KToggleAction *overviewModeAC;
KToggleAction *overviewModeBC;
QPopupMenu* m_pMergeEditorPopupMenu;
QSplitter* m_pMainSplitter;
QWidget* m_pMainWidget;
QWidget* m_pMergeWindowFrame;
ReversibleScrollBar* m_pHScrollBar;
QScrollBar* m_pDiffVScrollBar;
QScrollBar* m_pMergeVScrollBar;
DiffTextWindow* m_pDiffTextWindow1;
DiffTextWindow* m_pDiffTextWindow2;
DiffTextWindow* m_pDiffTextWindow3;
DiffTextWindowFrame* m_pDiffTextWindowFrame1;
DiffTextWindowFrame* m_pDiffTextWindowFrame2;
DiffTextWindowFrame* m_pDiffTextWindowFrame3;
QSplitter* m_pDiffWindowSplitter;
MergeResultWindow* m_pMergeResultWindow;
WindowTitleWidget* m_pMergeResultWindowTitle;
bool m_bTripleDiff;
QSplitter* m_pDirectoryMergeSplitter;
DirectoryMergeWindow* m_pDirectoryMergeWindow;
DirectoryMergeInfo* m_pDirectoryMergeInfo;
bool m_bDirCompare;
Overview* m_pOverview;
QWidget* m_pCornerWidget;
TotalDiffStatus m_totalDiffStatus;
SourceData m_sd1;
SourceData m_sd2;
SourceData m_sd3;
QString m_outputFilename;
bool m_bDefaultFilename;
DiffList m_diffList12;
DiffList m_diffList23;
DiffList m_diffList13;
DiffBufferInfo m_diffBufferInfo;
Diff3LineList m_diff3LineList;
Diff3LineVector m_diff3LineVector;
//ManualDiffHelpDialog* m_pManualDiffHelpDialog;
ManualDiffHelpList m_manualDiffHelpList;
int m_neededLines;
int m_maxWidth;
int m_DTWHeight;
bool m_bOutputModified;
bool m_bFileSaved;
bool m_bTimerBlock; // Synchronisation
OptionDialog* m_pOptionDialog;
FindDialog* m_pFindDialog;
void init( bool bAuto=false, TotalDiffStatus* pTotalDiffStatus=0, bool bLoadFiles=true );
virtual bool eventFilter( QObject* o, QEvent* e );
virtual void resizeEvent(QResizeEvent*);
bool improveFilenames(bool bCreateNewInstance);
bool runDiff( const LineData* p1, int size1, const LineData* p2, int size2, DiffList& diffList, int winIdx1, int winIdx2 );
bool runDiff( const LineData* p1, int size1, const LineData* p2, int size2, DiffList& diffList );
bool canContinue();
void choose(int choice);
KActionCollection* actionCollection();
KStatusBar* statusBar();
KToolBar* toolBar(const char*);
KDiff3Part* m_pKDiff3Part;
KParts::MainWindow* m_pKDiff3Shell;
bool m_bAutoFlag;
bool m_bAutoMode;
void recalcWordWrap(int nofVisibleColumns=-1);
public slots:
void resizeDiffTextWindow(int newWidth, int newHeight);
void resizeMergeResultWindow();
void slotRecalcWordWrap();
void showPopupMenu( const QPoint& point );
void scrollDiffTextWindow( int deltaX, int deltaY );
void scrollMergeResultWindow( int deltaX, int deltaY );
void setDiff3Line( int line );
void sourceMask( int srcMask, int enabledMask );
void slotDirShowBoth();
void slotDirViewToggle();
void slotUpdateAvailabilities();
void slotEditSelectAll();
void slotEditFind();
void slotEditFindNext();
void slotGoCurrent();
void slotGoTop();
void slotGoBottom();
void slotGoPrevUnsolvedConflict();
void slotGoNextUnsolvedConflict();
void slotGoPrevConflict();
void slotGoNextConflict();
void slotGoPrevDelta();
void slotGoNextDelta();
void slotChooseA();
void slotChooseB();
void slotChooseC();
void slotAutoSolve();
void slotUnsolve();
void slotMergeHistory();
void slotRegExpAutoMerge();
void slotChooseAEverywhere();
void slotChooseBEverywhere();
void slotChooseCEverywhere();
void slotChooseAForUnsolvedConflicts();
void slotChooseBForUnsolvedConflicts();
void slotChooseCForUnsolvedConflicts();
void slotChooseAForUnsolvedWhiteSpaceConflicts();
void slotChooseBForUnsolvedWhiteSpaceConflicts();
void slotChooseCForUnsolvedWhiteSpaceConflicts();
void slotConfigure();
void slotConfigureKeys();
void slotRefresh();
void slotSelectionEnd();
void slotSelectionStart();
void slotClipboardChanged();
void slotOutputModified(bool);
void slotAfterFirstPaint();
void slotMergeCurrentFile();
void slotReload();
void slotCheckIfCanContinue( bool* pbContinue );
void slotShowWhiteSpaceToggled();
void slotShowLineNumbersToggled();
void slotAutoAdvanceToggled();
void slotWordWrapToggled();
void slotShowWindowAToggled();
void slotShowWindowBToggled();
void slotShowWindowCToggled();
void slotWinFocusNext();
void slotWinFocusPrev();
void slotWinToggleSplitterOrientation();
void slotOverviewNormal();
void slotOverviewAB();
void slotOverviewAC();
void slotOverviewBC();
void slotSplitDiff();
void slotJoinDiffs();
void slotAddManualDiffHelp();
void slotClearManualDiffHelpList();
void slotNoRelevantChangesDetected();
};
#endif // KDIFF3_H

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,16 @@
Begin3
Title: kdiff3 -- Comparison and Merge of Files and Directories
Version: 0.9.89
Entered-date:
Description: Tool for comparison and merge of two or three files or directories
Keywords: KDE Qt
Author: Joachim Eibl <joachim at gmx.de>
Maintained-by: Joachim Eibl <joachim at gmx.de>
Home-page: http://kdiff3.sourceforge.net
Alternate-site: http://extragear.kde.org/apps/kdiff3
Primary-site: http://sourceforge.net/project/showfiles.php?group_id=58666
xxxxxx kdiff3-0.9.89.tar.gz
xxx kdiff3-0.9.89.lsm
Platform: Linux. Needs Qt, runs even better on KDE
Copying-policy: GPL
End

@ -0,0 +1,57 @@
TEMPLATE = app
# When unresolved items remain during linking: Try adding "shared" in the CONFIG.
CONFIG += qt warn_on thread release
HEADERS = version.h \
diff.h \
difftextwindow.h \
mergeresultwindow.h \
kdiff3.h \
merger.h \
optiondialog.h \
kreplacements/kreplacements.h \
directorymergewindow.h \
fileaccess.h \
kdiff3_shell.h \
kdiff3_part.h \
smalldialogs.h
SOURCES = main.cpp \
diff.cpp \
difftextwindow.cpp \
kdiff3.cpp \
merger.cpp \
mergeresultwindow.cpp \
optiondialog.cpp \
pdiff.cpp \
directorymergewindow.cpp \
fileaccess.cpp \
smalldialogs.cpp \
kdiff3_shell.cpp \
kdiff3_part.cpp \
gnudiff_analyze.cpp \
gnudiff_io.cpp \
gnudiff_xmalloc.cpp \
common.cpp \
kreplacements/kreplacements.cpp \
kreplacements/ShellContextMenu.cpp
TARGET = kdiff3
INCLUDEPATH += . ./kreplacements
win32 {
# QMAKE_CXXFLAGS_DEBUG -= -Zi
# QMAKE_CXXFLAGS_DEBUG += -GX -GR -Z7 /FR -DQT_NO_ASCII_CAST
# QMAKE_LFLAGS_DEBUG += /PDB:NONE
# QMAKE_CXXFLAGS_RELEASE += -GX -GR -DNDEBUG -DQT_NO_ASCII_CAST
QMAKE_CXXFLAGS_DEBUG += -DQT_NO_ASCII_CAST
QMAKE_CXXFLAGS_RELEASE += -DNDEBUG -DQT_NO_ASCII_CAST
RC_FILE = kdiff3.rc
}
unix {
documentation.path = /usr/local/share/doc/kdiff3
documentation.files = ../doc/*
INSTALLS += documentation
target.path = /usr/local/bin
INSTALLS += target
}

@ -0,0 +1 @@
IDI_ICON1 ICON DISCARDABLE "kdiff3.ico"

@ -0,0 +1,309 @@
/***************************************************************************
* Copyright (C) 2003-2007 Joachim Eibl <joachim.eibl at gmx.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "kdiff3_part.h"
#include <kinstance.h>
#include <kaction.h>
#include <kstdaction.h>
#include <kfiledialog.h>
#include <qfile.h>
#include <qtextstream.h>
#include "kdiff3.h"
#include "fileaccess.h"
#include <kmessagebox.h>
#include <klocale.h>
#include <iostream>
#include "version.h"
KDiff3Part::KDiff3Part( QWidget *parentWidget, const char *widgetName,
QObject *parent, const char *name )
: KParts::ReadOnlyPart(parent, name)
{
// we need an instance
setInstance( KDiff3PartFactory::instance() );
// this should be your custom internal widget
m_widget = new KDiff3App( parentWidget, widgetName, this );
// This hack is necessary to avoid a crash when the program terminates.
m_bIsShell = dynamic_cast<KParts::MainWindow*>(parentWidget)!=0;
// notify the part that this is our internal widget
setWidget(m_widget);
// create our actions
//KStdAction::open(this, SLOT(fileOpen()), actionCollection());
//KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
//KStdAction::save(this, SLOT(save()), actionCollection());
setXMLFile("kdiff3_part.rc");
// we are read-write by default
setReadWrite(true);
// we are not modified since we haven't done anything yet
setModified(false);
}
KDiff3Part::~KDiff3Part()
{
if ( m_widget!=0 && ! m_bIsShell )
{
m_widget->saveOptions( m_widget->isPart() ? instance()->config() : kapp->config() );
}
}
void KDiff3Part::setReadWrite(bool /*rw*/)
{
// ReadWritePart::setReadWrite(rw);
}
void KDiff3Part::setModified(bool /*modified*/)
{
/*
// get a handle on our Save action and make sure it is valid
KAction *save = actionCollection()->action(KStdAction::stdName(KStdAction::Save));
if (!save)
return;
// if so, we either enable or disable it based on the current
// state
if (modified)
save->setEnabled(true);
else
save->setEnabled(false);
// in any event, we want our parent to do it's thing
ReadWritePart::setModified(modified);
*/
}
static void getNameAndVersion( const QString& str, const QString& lineStart, QString& fileName, QString& version )
{
if ( str.left( lineStart.length() )==lineStart && fileName.isEmpty() )
{
unsigned int pos = lineStart.length();
while ( pos<str.length() && (str[pos]==' ' || str[pos]=='\t') ) ++pos;
unsigned int pos2 = str.length()-1;
while ( pos2>pos )
{
while (pos2>pos && str[pos2]!=' ' && str[pos2]!='\t') --pos2;
fileName = str.mid( pos, pos2-pos );
std::cerr << "KDiff3: " << fileName.latin1() << std::endl;
if ( FileAccess(fileName).exists() ) break;
--pos2;
}
int vpos = str.findRev("\t", -1);
if ( vpos>0 && vpos>(int)pos2 )
{
version = str.mid( vpos+1 );
while( !version.right(1)[0].isLetterOrNumber() )
version.truncate( version.length()-1 );
}
}
}
bool KDiff3Part::openFile()
{
// m_file is always local so we can use QFile on it
std::cerr << "KDiff3: " << m_file.latin1() << std::endl;
QFile file(m_file);
if (file.open(IO_ReadOnly) == false)
return false;
// our example widget is text-based, so we use QTextStream instead
// of a raw QDataStream
QTextStream stream(&file);
QString str;
QString fileName1;
QString fileName2;
QString version1;
QString version2;
while (!stream.eof() && (fileName1.isEmpty() || fileName2.isEmpty()) )
{
str = stream.readLine() + "\n";
getNameAndVersion( str, "---", fileName1, version1 );
getNameAndVersion( str, "+++", fileName2, version2 );
}
file.close();
if ( fileName1.isEmpty() && fileName2.isEmpty() )
{
KMessageBox::sorry(m_widget, i18n("Couldn't find files for comparison."));
return false;
}
FileAccess f1(fileName1);
FileAccess f2(fileName2);
if ( f1.exists() && f2.exists() && fileName1!=fileName2 )
{
m_widget->slotFileOpen2( fileName1, fileName2, "", "", "", "", "", 0 );
return true;
}
else if ( version1.isEmpty() && f1.exists() )
{
// Normal patch
// patch -f -u --ignore-whitespace -i [inputfile] -o [outfile] [patchfile]
QString tempFileName = FileAccess::tempFileName();
QString cmd = "patch -f -u --ignore-whitespace -i \"" + m_file +
"\" -o \""+tempFileName + "\" \"" + fileName1+ "\"";
::system( cmd.ascii() );
m_widget->slotFileOpen2( fileName1, tempFileName, "", "",
"", version2.isEmpty() ? fileName2 : "REV:"+version2+":"+fileName2, "", 0 ); // alias names
// std::cerr << "KDiff3: f1:" << fileName1.latin1() <<"<->"<<tempFileName.latin1()<< std::endl;
FileAccess::removeTempFile( tempFileName );
}
else if ( version2.isEmpty() && f2.exists() )
{
// Reverse patch
// patch -f -u -R --ignore-whitespace -i [inputfile] -o [outfile] [patchfile]
QString tempFileName = FileAccess::tempFileName();
QString cmd = "patch -f -u -R --ignore-whitespace -i \"" + m_file +
"\" -o \""+tempFileName + "\" \"" + fileName2+"\"";
::system( cmd.ascii() );
m_widget->slotFileOpen2( tempFileName, fileName2, "", "",
version1.isEmpty() ? fileName1 : "REV:"+version1+":"+fileName1, "", "", 0 ); // alias name
// std::cerr << "KDiff3: f2:" << fileName2.latin1() <<"<->"<<tempFileName.latin1()<< std::endl;
FileAccess::removeTempFile( tempFileName );
}
else if ( !version1.isEmpty() && !version2.isEmpty() )
{
std::cerr << "KDiff3: f1/2:" << fileName1.latin1() <<"<->"<<fileName2.latin1()<< std::endl;
// Assuming that files are on CVS: Try to get them
// cvs update -p -r [REV] [FILE] > [OUTPUTFILE]
QString tempFileName1 = FileAccess::tempFileName();
QString cmd1 = "cvs update -p -r " + version1 + " \"" + fileName1 + "\" >\""+tempFileName1+"\"";
::system( cmd1.ascii() );
QString tempFileName2 = FileAccess::tempFileName();
QString cmd2 = "cvs update -p -r " + version2 + " \"" + fileName2 + "\" >\""+tempFileName2+"\"";
::system( cmd2.ascii() );
m_widget->slotFileOpen2( tempFileName1, tempFileName2, "", "",
"REV:"+version1+":"+fileName1,
"REV:"+version2+":"+fileName2,
"", 0
);
// std::cerr << "KDiff3: f1/2:" << tempFileName1.latin1() <<"<->"<<tempFileName2.latin1()<< std::endl;
FileAccess::removeTempFile( tempFileName1 );
FileAccess::removeTempFile( tempFileName2 );
return true;
}
else
{
KMessageBox::sorry(m_widget, i18n("Couldn't find files for comparison."));
}
return true;
}
bool KDiff3Part::saveFile()
{
/* // if we aren't read-write, return immediately
if (isReadWrite() == false)
return false;
// m_file is always local, so we use QFile
QFile file(m_file);
if (file.open(IO_WriteOnly) == false)
return false;
// use QTextStream to dump the text to the file
QTextStream stream(&file);
//stream << m_widget->text();
file.close();
return true;
*/
return false; // Not implemented
}
// It's usually safe to leave the factory code alone.. with the
// notable exception of the KAboutData data
#include <kaboutdata.h>
#include <klocale.h>
KInstance* KDiff3PartFactory::s_instance = 0L;
KAboutData* KDiff3PartFactory::s_about = 0L;
KDiff3PartFactory::KDiff3PartFactory()
: KParts::Factory()
{
}
KDiff3PartFactory::~KDiff3PartFactory()
{
delete s_instance;
delete s_about;
s_instance = 0L;
}
KParts::Part* KDiff3PartFactory::createPartObject( QWidget *parentWidget, const char *widgetName,
QObject *parent, const char *name,
const char *classname, const QStringList&/*args*/ )
{
// Create an instance of our Part
KDiff3Part* obj = new KDiff3Part( parentWidget, widgetName, parent, name );
// See if we are to be read-write or not
if (QCString(classname) == "KParts::ReadOnlyPart")
obj->setReadWrite(false);
return obj;
}
KInstance* KDiff3PartFactory::instance()
{
if( !s_instance )
{
s_about = new KAboutData("kdiff3part", I18N_NOOP("KDiff3Part"), VERSION);
s_about->addAuthor("Joachim Eibl", 0, "joachim.eibl at gmx.de");
s_instance = new KInstance(s_about);
}
return s_instance;
}
extern "C"
{
void* init_libkdiff3part()
{
return new KDiff3PartFactory;
}
}
// Suppress warning with --enable-final
#undef VERSION
#include "kdiff3_part.moc"

@ -0,0 +1,100 @@
/***************************************************************************
* Copyright (C) 2003-2007 Joachim Eibl <joachim.eibl at gmx.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef _KDIFF3PART_H_
#define _KDIFF3PART_H_
#include <kparts/part.h>
#include <kparts/factory.h>
class QWidget;
class QPainter;
class KURL;
class KDiff3App;
/**
* This is a "Part". It that does all the real work in a KPart
* application.
*
* @short Main Part
* @author Joachim Eibl <joachim.eibl at gmx.de>
*/
class KDiff3Part : public KParts::ReadOnlyPart
{
Q_OBJECT
public:
/**
* Default constructor
*/
KDiff3Part(QWidget *parentWidget, const char *widgetName,
QObject *parent, const char *name);
/**
* Destructor
*/
virtual ~KDiff3Part();
/**
* This is a virtual function inherited from KParts::ReadWritePart.
* A shell will use this to inform this Part if it should act
* read-only
*/
virtual void setReadWrite(bool rw);
/**
* Reimplemented to disable and enable Save action
*/
virtual void setModified(bool modified);
protected:
/**
* This must be implemented by each part
*/
virtual bool openFile();
/**
* This must be implemented by each read-write part
*/
virtual bool saveFile();
private:
KDiff3App* m_widget;
bool m_bIsShell;
};
class KInstance;
class KAboutData;
class KDiff3PartFactory : public KParts::Factory
{
Q_OBJECT
public:
KDiff3PartFactory();
virtual ~KDiff3PartFactory();
virtual KParts::Part* createPartObject( QWidget *parentWidget, const char *widgetName,
QObject *parent, const char *name,
const char *classname, const QStringList &args );
static KInstance* instance();
private:
static KInstance* s_instance;
static KAboutData* s_about;
};
#endif // _KDIFF3PART_H_

@ -0,0 +1,24 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="kdiff3_part" version="9">
<MenuBar>
<Menu name="movement"><text>&amp;KDiff3</text>
<Action name="go_top"/>
<Action name="go_bottom"/>
<Action name="go_prev_delta"/>
<Action name="go_next_delta"/>
<Action name="diff_showwhitespace"/>
<Action name="diff_showlinenumbers"/>
<Action name="diff_wordwrap"/>
<Action name="win_toggle_split_orientation"/>
<Action name="options_configure"><text>Configure KDiff3</text></Action>
</Menu>
</MenuBar>
<ToolBar name="mainToolBar"><text>KDiff3</text>
<Action name="go_top"/>
<Action name="go_bottom"/>
<Action name="go_prev_delta"/>
<Action name="go_next_delta"/>
<Action name="diff_showwhitespace"/>
<Action name="diff_showlinenumbers"/>
</ToolBar>
</kpartgui>

@ -0,0 +1,191 @@
/***************************************************************************
* Copyright (C) 2003-2007 Joachim Eibl <joachim.eibl at gmx.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "kdiff3_shell.h"
#include "kdiff3.h"
#include <kkeydialog.h>
#include <kfiledialog.h>
#include <kconfig.h>
#include <kurl.h>
#include <kedittoolbar.h>
#include <kaction.h>
#include <kstdaction.h>
#include <klibloader.h>
#include <kmessagebox.h>
#include <kstatusbar.h>
#include <klocale.h>
#include <iostream>
KDiff3Shell::KDiff3Shell(bool bCompleteInit)
: KParts::MainWindow( 0L, "kdiff3" )
{
m_bUnderConstruction = true;
// set the shell's ui resource file
setXMLFile("kdiff3_shell.rc");
// and a status bar
statusBar()->show();
// this routine will find and load our Part. it finds the Part by
// name which is a bad idea usually.. but it's alright in this
// case since our Part is made for this Shell
KLibFactory *factory = KLibLoader::self()->factory("libkdiff3part");
if (factory)
{
// now that the Part is loaded, we cast it to a Part to get
// our hands on it
m_part = static_cast<KParts::ReadWritePart *>(factory->create(this,
"kdiff3_part", "KParts::ReadWritePart" ));
if (m_part)
{
// and integrate the part's GUI with the shell's
createGUI(m_part);
// tell the KParts::MainWindow that this is indeed the main widget
setCentralWidget(m_part->widget());
if (bCompleteInit)
((KDiff3App*)m_part->widget())->completeInit();
connect(((KDiff3App*)m_part->widget()), SIGNAL(createNewInstance(const QString&, const QString&, const QString&)), this, SLOT(slotNewInstance(const QString&, const QString&, const QString&)));
}
}
else
{
// if we couldn't find our Part, we exit since the Shell by
// itself can't do anything useful
KMessageBox::error(this, i18n("Could not find our part!\n"
"This usually happens due to an installation problem. "
"Please read the README-file in the source package for details.")
);
//kapp->quit();
::exit(-1); //kapp->quit() doesn't work here yet.
// we return here, cause kapp->quit() only means "exit the
// next time we enter the event loop...
return;
}
// apply the saved mainwindow settings, if any, and ask the mainwindow
// to automatically save settings if changed: window size, toolbar
// position, icon size, etc.
setAutoSaveSettings();
m_bUnderConstruction = false;
}
KDiff3Shell::~KDiff3Shell()
{
}
bool KDiff3Shell::queryClose()
{
if (m_part)
return ((KDiff3App*)m_part->widget())->queryClose();
else
return true;
}
bool KDiff3Shell::queryExit()
{
return true;
}
void KDiff3Shell::closeEvent(QCloseEvent*e)
{
if ( queryClose() )
{
e->accept();
bool bFileSaved = ((KDiff3App*)m_part->widget())->isFileSaved();
KApplication::exit( bFileSaved ? 0 : 1 );
}
else
e->ignore();
}
void KDiff3Shell::optionsShowToolbar()
{
// this is all very cut and paste code for showing/hiding the
// toolbar
if (m_toolbarAction->isChecked())
toolBar()->show();
else
toolBar()->hide();
}
void KDiff3Shell::optionsShowStatusbar()
{
// this is all very cut and paste code for showing/hiding the
// statusbar
if (m_statusbarAction->isChecked())
statusBar()->show();
else
statusBar()->hide();
}
void KDiff3Shell::optionsConfigureKeys()
{
KKeyDialog::configure(actionCollection(), "kdiff3_shell.rc");
}
void KDiff3Shell::optionsConfigureToolbars()
{
#if defined(KDE_MAKE_VERSION)
# if KDE_VERSION >= KDE_MAKE_VERSION(3,1,0)
saveMainWindowSettings(KGlobal::config(), autoSaveGroup());
# else
saveMainWindowSettings(KGlobal::config() );
# endif
#else
saveMainWindowSettings(KGlobal::config() );
#endif
// use the standard toolbar editor
KEditToolbar dlg(factory());
connect(&dlg, SIGNAL(newToolbarConfig()),
this, SLOT(applyNewToolbarConfig()));
dlg.exec();
}
void KDiff3Shell::applyNewToolbarConfig()
{
#if defined(KDE_MAKE_VERSION)
# if KDE_VERSION >= KDE_MAKE_VERSION(3,1,0)
applyMainWindowSettings(KGlobal::config(), autoSaveGroup());
# else
applyMainWindowSettings(KGlobal::config());
# endif
#else
applyMainWindowSettings(KGlobal::config());
#endif
}
void KDiff3Shell::slotNewInstance( const QString& fn1, const QString& fn2, const QString& fn3 )
{
KDiff3Shell* pKDiff3Shell = new KDiff3Shell(false);
((KDiff3App*)pKDiff3Shell->m_part->widget())->completeInit(fn1,fn2,fn3);
}
#include "kdiff3_shell.moc"

@ -0,0 +1,74 @@
/***************************************************************************
* Copyright (C) 2003-2007 Joachim Eibl <joachim.eibl at gmx.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef _KDIFF3SHELL_H_
#define _KDIFF3SHELL_H_
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <kapplication.h>
#include <kparts/mainwindow.h>
class KToggleAction;
/**
* This is the application "Shell". It has a menubar, toolbar, and
* statusbar but relies on the "Part" to do all the real work.
*
* @short Application Shell
* @author Joachim Eibl <joachim.eibl at gmx.de>
*/
class KDiff3Shell : public KParts::MainWindow
{
Q_OBJECT
public:
/**
* Default Constructor
*/
KDiff3Shell(bool bCompleteInit=true);
/**
* Default Destructor
*/
virtual ~KDiff3Shell();
bool queryClose();
bool queryExit();
virtual void closeEvent(QCloseEvent*e);
private slots:
void optionsShowToolbar();
void optionsShowStatusbar();
void optionsConfigureKeys();
void optionsConfigureToolbars();
void applyNewToolbarConfig();
void slotNewInstance( const QString& fn1, const QString& fn2, const QString& fn3 );
private:
KParts::ReadWritePart *m_part;
KToggleAction *m_toolbarAction;
KToggleAction *m_statusbarAction;
bool m_bUnderConstruction;
};
#endif // _KDIFF3_H_

@ -0,0 +1,128 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="kdiff3_shell" version="9">
<MenuBar>
<Menu name="file"><text>&amp;File</text>
<Action name="file_reload"/>
</Menu>
<Menu name="directory"><text>&amp;Directory</text>
<Action name="dir_start_operation"/>
<Action name="dir_run_operation_for_current_item"/>
<Action name="dir_compare_current"/>
<Action name="dir_rescan"/>
<!-- <Action name="dir_save_merge_state"/>
<Action name="dir_load_merge_state"/> -->
<Action name="dir_fold_all"/>
<Action name="dir_unfold_all"/>
<Action name="dir_show_identical_files"/>
<Action name="dir_show_different_files"/>
<Action name="dir_show_files_only_in_a"/>
<Action name="dir_show_files_only_in_b"/>
<Action name="dir_show_files_only_in_c"/>
<Action name="dir_choose_a_everywhere"/>
<Action name="dir_choose_b_everywhere"/>
<Action name="dir_choose_c_everywhere"/>
<Action name="dir_autochoose_everywhere"/>
<Action name="dir_nothing_everywhere"/>
<Action name="dir_synchronize_directories"/>
<Action name="dir_choose_newer_files"/>
<Action name="dir_compare_explicitly_selected_files"/>
<Action name="dir_merge_explicitly_selected_files"/>
<Menu name="dir_current_merge_menu"><text>Current Item Merge Operation</text>
<Action name="dir_current_do_nothing"/>
<Action name="dir_current_choose_a"/>
<Action name="dir_current_choose_b"/>
<Action name="dir_current_choose_c"/>
<Action name="dir_current_merge"/>
<Action name="dir_current_delete"/>
</Menu>
<Menu name="dir_current_sync_menu"><text>Current Item Sync Operation</text>
<Action name="dir_current_sync_do_nothing"/>
<Action name="dir_current_sync_copy_a_to_b"/>
<Action name="dir_current_sync_copy_b_to_a"/>
<Action name="dir_current_sync_delete_a"/>
<Action name="dir_current_sync_delete_b"/>
<Action name="dir_current_sync_delete_a_and_b"/>
<Action name="dir_current_sync_merge_to_a"/>
<Action name="dir_current_sync_merge_to_b"/>
<Action name="dir_current_sync_merge_to_a_and_b"/>
</Menu>
</Menu>
<Menu name="movement"><text>&amp;Movement</text>
<Action name="go_current"/>
<Action name="go_top"/>
<Action name="go_bottom"/>
<Action name="go_prev_delta"/>
<Action name="go_next_delta"/>
<Action name="go_prev_conflict"/>
<Action name="go_next_conflict"/>
<Action name="go_prev_unsolved_conflict"/>
<Action name="go_next_unsolved_conflict"/>
</Menu>
<Menu name="diff"><text>D&amp;iffview</text>
<Action name="diff_showlinenumbers"/>
<Action name="diff_show_whitespace_characters"/>
<Action name="diff_show_whitespace"/>
<Action name="diff_overview_normal"/>
<Action name="diff_overview_ab"/>
<Action name="diff_overview_ac"/>
<Action name="diff_overview_bc"/>
<Action name="diff_wordwrap"/>
<Action name="diff_add_manual_diff_help"/>
<Action name="diff_clear_manual_diff_help_list"/>
</Menu>
<Menu name="merge"><text>&amp;Merge</text>
<Action name="merge_current"/>
<Action name="merge_choose_a"/>
<Action name="merge_choose_b"/>
<Action name="merge_choose_c"/>
<Action name="merge_autoadvance"/>
<Action name="merge_choose_a_everywhere"/>
<Action name="merge_choose_b_everywhere"/>
<Action name="merge_choose_c_everywhere"/>
<Action name="merge_choose_a_for_unsolved_conflicts"/>
<Action name="merge_choose_b_for_unsolved_conflicts"/>
<Action name="merge_choose_c_for_unsolved_conflicts"/>
<Action name="merge_choose_a_for_unsolved_whitespace_conflicts"/>
<Action name="merge_choose_b_for_unsolved_whitespace_conflicts"/>
<Action name="merge_choose_c_for_unsolved_whitespace_conflicts"/>
<Action name="merge_autosolve"/>
<Action name="merge_autounsolve"/>
<Action name="merge_splitdiff"/>
<Action name="merge_joindiffs"/>
<Action name="merge_regexp_automerge"/>
<Action name="merge_versioncontrol_history"/>
</Menu>
<Menu name="window"><text>&amp;Window</text>
<Action name="win_focus_prev"/>
<Action name="win_focus_next"/>
<Action name="win_show_a"/>
<Action name="win_show_b"/>
<Action name="win_show_c"/>
<Action name="win_dir_show_both"/>
<Action name="win_dir_view_toggle"/>
<Action name="win_toggle_split_orientation"/>
</Menu>
</MenuBar>
<ToolBar name="mainToolBar"><text>Main Toolbar</text>
<Action name="merge_current"/>
<Action name="go_current"/>
<Action name="go_top"/>
<Action name="go_bottom"/>
<Action name="go_prev_delta"/>
<Action name="go_next_delta"/>
<Action name="go_prev_conflict"/>
<Action name="go_next_conflict"/>
<Action name="go_prev_unsolved_conflict"/>
<Action name="go_next_unsolved_conflict"/>
<Action name="merge_choose_a"/>
<Action name="merge_choose_b"/>
<Action name="merge_choose_c"/>
<Action name="merge_autoadvance"/>
<Action name="diff_show_whitespace"/>
<Action name="diff_show_whitespace_characters"/>
<Action name="diff_showlinenumbers"/>
<Action name="dir_show_identical_files"/>
<Action name="dir_show_files_only_in_a"/>
<Action name="dir_show_files_only_in_b"/>
</ToolBar>
</kpartgui>

@ -0,0 +1,18 @@
[Desktop Entry]
Encoding=UTF-8
Name=KDiff3Part
Name[cs]=Komponenta KDiff3
Name[fr]=Composant KDiff3
Name[hi]=के-डिफ3पार्ट
Name[nb]=KDiff3-del
Name[pt_BR]=Componente KDiff3
Name[sv]=Kdiff3-del
Name[ta]=கேடிஃப்3 பகுதி
Name[tg]=ҚисмиKDiff3
Name[uk]=Комопнент KDiff3
Name[xx]=xxKDiff3Partxx
Name[zh_CN]=KDiff3 组件
MimeType=text/x-diff
ServiceTypes=KParts/ReadOnlyPart,KParts/ReadWritePart
X-KDE-Library=libkdiff3part
Type=Service

@ -0,0 +1,30 @@
About the "kreplacements"-directory:
====================================
I want to be able to compile and use KDiff3 without KDE too.
Since KDiff3 is a KDE program, which uses many KDE-classes and
functions there must be some replacement.
In many cases this is just the corresponding Qt-class, but often
I wrote something myself. For several very KDE-specific functions
there is no real replacement, but only stub functions that allow
the program to compile and link.
This stuff is not intended to be used for anything else but KDiff3.
Think of it rather as a big hack, that only has the advantage
that I need not mess up the normal program with many ugly
#ifdef/#endif-clauses.
Most include files in this directory only include kreplacements.h
where the actual declarations are. The implementions are in
kreplacements.cpp.
The *.moc-files are dummies. The new KDE-philosophy seems to be
that *.moc-files are directly included into the sources.
The Qt-philosophy still is to generate moc*.cpp files which will
be compiled seperately. With these dummy-moc-files both versions
can be compiled.
Joachim
(2003-10-02)

@ -0,0 +1,492 @@
/***************************************************************************
ShellContextMenu.cpp - description
-------------------
begin : Sat Mar 4 2006
copyright : (C) 2005-2007 by Joachim Eibl
email : joachim dot eibl at gmx dot de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
// ShellContextMenu.cpp: Implementierung der Klasse CShellContextMenu.
//
//////////////////////////////////////////////////////////////////////
#ifdef _WIN32
#include <windows.h>
#include <shlobj.h>
#include <malloc.h>
#include <qstring.h>
#include <qstringlist.h>
#include <qwidget.h>
#include <qdir.h>
#include <qpopupmenu.h>
#include "ShellContextMenu.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Konstruktion/Destruktion
//////////////////////////////////////////////////////////////////////
#define MIN_ID 100
#define MAX_ID 10000
void showShellContextMenu( const QString& itemPath, QPoint pt, QWidget* pParentWidget, QPopupMenu* pMenu )
{
CShellContextMenu scm;
scm.SetObjects(QDir::convertSeparators(itemPath));
int id = scm.ShowContextMenu (pParentWidget, pt, pMenu);
if (id>=1)
pMenu->activateItemAt(id-1);
}
IContextMenu2 * g_IContext2 = NULL;
IContextMenu3 * g_IContext3 = NULL;
CShellContextMenu::CShellContextMenu()
{
m_psfFolder = NULL;
m_pidlArray = NULL;
m_hMenu = NULL;
}
CShellContextMenu::~CShellContextMenu()
{
// free all allocated datas
if (m_psfFolder && bDelete)
m_psfFolder->Release ();
m_psfFolder = NULL;
FreePIDLArray (m_pidlArray);
m_pidlArray = NULL;
if (m_hMenu)
DestroyMenu( m_hMenu );
}
// this functions determines which version of IContextMenu is avaibale for those objects (always the highest one)
// and returns that interface
BOOL CShellContextMenu::GetContextMenu (void ** ppContextMenu, int & iMenuType)
{
*ppContextMenu = NULL;
LPCONTEXTMENU icm1 = NULL;
if ( m_psfFolder==0 )
return FALSE;
// first we retrieve the normal IContextMenu interface (every object should have it)
m_psfFolder->GetUIObjectOf (NULL, nItems, (LPCITEMIDLIST *) m_pidlArray, IID_IContextMenu, NULL, (void**) &icm1);
if (icm1)
{ // since we got an IContextMenu interface we can now obtain the higher version interfaces via that
if (icm1->QueryInterface (IID_IContextMenu3, ppContextMenu) == NOERROR)
iMenuType = 3;
else if (icm1->QueryInterface (IID_IContextMenu2, ppContextMenu) == NOERROR)
iMenuType = 2;
if (*ppContextMenu)
icm1->Release(); // we can now release version 1 interface, cause we got a higher one
else
{
iMenuType = 1;
*ppContextMenu = icm1; // since no higher versions were found
} // redirect ppContextMenu to version 1 interface
}
else
return (FALSE); // something went wrong
return (TRUE); // success
}
LRESULT CALLBACK CShellContextMenu::HookWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_MENUCHAR: // only supported by IContextMenu3
if (g_IContext3)
{
LRESULT lResult = 0;
g_IContext3->HandleMenuMsg2 (message, wParam, lParam, &lResult);
return (lResult);
}
break;
case WM_DRAWITEM:
case WM_MEASUREITEM:
if (wParam)
break; // if wParam != 0 then the message is not menu-related
case WM_INITMENUPOPUP:
if (g_IContext2)
g_IContext2->HandleMenuMsg (message, wParam, lParam);
else // version 3
g_IContext3->HandleMenuMsg (message, wParam, lParam);
return (message == WM_INITMENUPOPUP ? 0 : TRUE); // inform caller that we handled WM_INITPOPUPMENU by ourself
break;
default:
break;
}
// call original WndProc of window to prevent undefined bevhaviour of window
return ::CallWindowProc ((WNDPROC) GetProp ( hWnd, TEXT ("OldWndProc")), hWnd, message, wParam, lParam);
}
UINT CShellContextMenu::ShowContextMenu(QWidget * pParentWidget, QPoint pt, QPopupMenu* pMenu )
{
HWND hWnd = pParentWidget->winId();
int iMenuType = 0; // to know which version of IContextMenu is supported
LPCONTEXTMENU pContextMenu; // common pointer to IContextMenu and higher version interface
if (!GetContextMenu ((void**) &pContextMenu, iMenuType))
return (0); // something went wrong
if (!m_hMenu)
{
DestroyMenu( m_hMenu );
m_hMenu = CreatePopupMenu ();
}
UINT_PTR i;
for( i=0; i<pMenu->count(); ++i )
{
QString s = pMenu->text(pMenu->idAt(i));
if (!s.isEmpty())
AppendMenuW( m_hMenu, MF_STRING, i+1, (LPCWSTR)s.ucs2() );
}
AppendMenuW( m_hMenu, MF_SEPARATOR, i+1, L"" );
// lets fill the our popupmenu
pContextMenu->QueryContextMenu (m_hMenu, GetMenuItemCount (m_hMenu), MIN_ID, MAX_ID, CMF_NORMAL | CMF_EXPLORE);
// subclass window to handle menurelated messages in CShellContextMenu
WNDPROC OldWndProc;
if (iMenuType > 1) // only subclass if its version 2 or 3
{
OldWndProc = (WNDPROC) SetWindowLong (hWnd, GWL_WNDPROC, (DWORD) HookWndProc);
if (iMenuType == 2)
g_IContext2 = (LPCONTEXTMENU2) pContextMenu;
else // version 3
g_IContext3 = (LPCONTEXTMENU3) pContextMenu;
}
else
OldWndProc = NULL;
UINT idCommand = TrackPopupMenu (m_hMenu,TPM_RETURNCMD | TPM_LEFTALIGN, pt.x(), pt.y(), 0, pParentWidget->winId(), 0);
if (OldWndProc) // unsubclass
SetWindowLong (hWnd, GWL_WNDPROC, (DWORD) OldWndProc);
if (idCommand >= MIN_ID && idCommand <= MAX_ID) // see if returned idCommand belongs to shell menu entries
{
InvokeCommand (pContextMenu, idCommand - MIN_ID); // execute related command
idCommand = 0;
}
pContextMenu->Release();
g_IContext2 = NULL;
g_IContext3 = NULL;
return (idCommand);
}
void CShellContextMenu::InvokeCommand (LPCONTEXTMENU pContextMenu, UINT idCommand)
{
CMINVOKECOMMANDINFO cmi = {0};
cmi.cbSize = sizeof (CMINVOKECOMMANDINFO);
cmi.lpVerb = (LPSTR) MAKEINTRESOURCE (idCommand);
cmi.nShow = SW_SHOWNORMAL;
pContextMenu->InvokeCommand (&cmi);
}
void CShellContextMenu::SetObjects(const QString& strObject)
{
// only one object is passed
QStringList strArray;
strArray << strObject; // create a CStringArray with one element
SetObjects (strArray); // and pass it to SetObjects (CStringArray &strArray)
// for further processing
}
void CShellContextMenu::SetObjects(const QStringList &strList)
{
// free all allocated datas
if (m_psfFolder && bDelete)
m_psfFolder->Release ();
m_psfFolder = NULL;
FreePIDLArray (m_pidlArray);
m_pidlArray = NULL;
// get IShellFolder interface of Desktop (root of shell namespace)
IShellFolder * psfDesktop = NULL;
SHGetDesktopFolder (&psfDesktop); // needed to obtain full qualified pidl
// ParseDisplayName creates a PIDL from a file system path relative to the IShellFolder interface
// but since we use the Desktop as our interface and the Desktop is the namespace root
// that means that it's a fully qualified PIDL, which is what we need
LPITEMIDLIST pidl = NULL;
psfDesktop->ParseDisplayName (NULL, 0, (LPOLESTR)strList[0].ucs2(), NULL, &pidl, NULL);
// now we need the parent IShellFolder interface of pidl, and the relative PIDL to that interface
LPITEMIDLIST pidlItem = NULL; // relative pidl
SHBindToParentEx (pidl, IID_IShellFolder, (void **) &m_psfFolder, NULL);
free (pidlItem);
// get interface to IMalloc (need to free the PIDLs allocated by the shell functions)
LPMALLOC lpMalloc = NULL;
SHGetMalloc (&lpMalloc);
lpMalloc->Free (pidl);
// now we have the IShellFolder interface to the parent folder specified in the first element in strArray
// since we assume that all objects are in the same folder (as it's stated in the MSDN)
// we now have the IShellFolder interface to every objects parent folder
IShellFolder * psfFolder = NULL;
nItems = strList.size ();
for (int i = 0; i < nItems; i++)
{
pidl=0;
psfDesktop->ParseDisplayName (NULL, 0, (LPOLESTR)strList[i].ucs2(), NULL, &pidl, NULL);
if (pidl)
{
m_pidlArray = (LPITEMIDLIST *) realloc (m_pidlArray, (i + 1) * sizeof (LPITEMIDLIST));
// get relative pidl via SHBindToParent
SHBindToParentEx (pidl, IID_IShellFolder, (void **) &psfFolder, (LPCITEMIDLIST *) &pidlItem);
m_pidlArray[i] = CopyPIDL (pidlItem); // copy relative pidl to pidlArray
free (pidlItem);
lpMalloc->Free (pidl); // free pidl allocated by ParseDisplayName
psfFolder->Release ();
}
}
lpMalloc->Release ();
psfDesktop->Release ();
bDelete = TRUE; // indicates that m_psfFolder should be deleted by CShellContextMenu
}
// only one full qualified PIDL has been passed
void CShellContextMenu::SetObjects(LPITEMIDLIST /*pidl*/)
{
/*
// free all allocated datas
if (m_psfFolder && bDelete)
m_psfFolder->Release ();
m_psfFolder = NULL;
FreePIDLArray (m_pidlArray);
m_pidlArray = NULL;
// full qualified PIDL is passed so we need
// its parent IShellFolder interface and its relative PIDL to that
LPITEMIDLIST pidlItem = NULL;
SHBindToParent ((LPCITEMIDLIST) pidl, IID_IShellFolder, (void **) &m_psfFolder, (LPCITEMIDLIST *) &pidlItem);
m_pidlArray = (LPITEMIDLIST *) malloc (sizeof (LPITEMIDLIST)); // allocate ony for one elemnt
m_pidlArray[0] = CopyPIDL (pidlItem);
// now free pidlItem via IMalloc interface (but not m_psfFolder, that we need later
LPMALLOC lpMalloc = NULL;
SHGetMalloc (&lpMalloc);
lpMalloc->Free (pidlItem);
lpMalloc->Release();
nItems = 1;
bDelete = TRUE; // indicates that m_psfFolder should be deleted by CShellContextMenu
*/
}
// IShellFolder interface with a relative pidl has been passed
void CShellContextMenu::SetObjects(IShellFolder *psfFolder, LPITEMIDLIST pidlItem)
{
// free all allocated datas
if (m_psfFolder && bDelete)
m_psfFolder->Release ();
m_psfFolder = NULL;
FreePIDLArray (m_pidlArray);
m_pidlArray = NULL;
m_psfFolder = psfFolder;
m_pidlArray = (LPITEMIDLIST *) malloc (sizeof (LPITEMIDLIST));
m_pidlArray[0] = CopyPIDL (pidlItem);
nItems = 1;
bDelete = FALSE; // indicates wheter m_psfFolder should be deleted by CShellContextMenu
}
void CShellContextMenu::SetObjects(IShellFolder * psfFolder, LPITEMIDLIST *pidlArray, int nItemCount)
{
// free all allocated datas
if (m_psfFolder && bDelete)
m_psfFolder->Release ();
m_psfFolder = NULL;
FreePIDLArray (m_pidlArray);
m_pidlArray = NULL;
m_psfFolder = psfFolder;
m_pidlArray = (LPITEMIDLIST *) malloc (nItemCount * sizeof (LPITEMIDLIST));
for (int i = 0; i < nItemCount; i++)
m_pidlArray[i] = CopyPIDL (pidlArray[i]);
nItems = nItemCount;
bDelete = FALSE; // indicates wheter m_psfFolder should be deleted by CShellContextMenu
}
void CShellContextMenu::FreePIDLArray(LPITEMIDLIST *pidlArray)
{
if (!pidlArray)
return;
int iSize = _msize (pidlArray) / sizeof (LPITEMIDLIST);
for (int i = 0; i < iSize; i++)
free (pidlArray[i]);
free (pidlArray);
}
LPITEMIDLIST CShellContextMenu::CopyPIDL (LPCITEMIDLIST pidl, int cb)
{
if (cb == -1)
cb = GetPIDLSize (pidl); // Calculate size of list.
LPITEMIDLIST pidlRet = (LPITEMIDLIST) calloc (cb + sizeof (USHORT), sizeof (BYTE));
if (pidlRet)
CopyMemory(pidlRet, pidl, cb);
return (pidlRet);
}
UINT CShellContextMenu::GetPIDLSize (LPCITEMIDLIST pidl)
{
if (!pidl)
return 0;
int nSize = 0;
LPITEMIDLIST pidlTemp = (LPITEMIDLIST) pidl;
while (pidlTemp->mkid.cb)
{
nSize += pidlTemp->mkid.cb;
pidlTemp = (LPITEMIDLIST) (((LPBYTE) pidlTemp) + pidlTemp->mkid.cb);
}
return nSize;
}
HMENU CShellContextMenu::GetMenu()
{
if (!m_hMenu)
{
m_hMenu = CreatePopupMenu(); // create the popupmenu (its empty)
}
return (m_hMenu);
}
// this is workaround function for the Shell API Function SHBindToParent
// SHBindToParent is not available under Win95/98
HRESULT CShellContextMenu::SHBindToParentEx (LPCITEMIDLIST pidl, REFIID riid, VOID **ppv, LPCITEMIDLIST *ppidlLast)
{
HRESULT hr = 0;
if (!pidl || !ppv)
return E_POINTER;
int nCount = GetPIDLCount (pidl);
if (nCount == 0) // desktop pidl of invalid pidl
return E_POINTER;
IShellFolder * psfDesktop = NULL;
SHGetDesktopFolder (&psfDesktop);
if (nCount == 1) // desktop pidl
{
if ((hr = psfDesktop->QueryInterface(riid, ppv)) == S_OK)
{
if (ppidlLast)
*ppidlLast = CopyPIDL (pidl);
}
psfDesktop->Release ();
return hr;
}
LPBYTE pRel = GetPIDLPos (pidl, nCount - 1);
LPITEMIDLIST pidlParent = NULL;
pidlParent = CopyPIDL (pidl, pRel - (LPBYTE) pidl);
IShellFolder * psfFolder = NULL;
if ((hr = psfDesktop->BindToObject (pidlParent, NULL, IID_IShellFolder, (void **) &psfFolder)) != S_OK)
{
free (pidlParent);
psfDesktop->Release ();
return hr;
}
if ((hr = psfFolder->QueryInterface (riid, ppv)) == S_OK)
{
if (ppidlLast)
*ppidlLast = CopyPIDL ((LPCITEMIDLIST) pRel);
}
free (pidlParent);
psfFolder->Release ();
psfDesktop->Release ();
return hr;
}
LPBYTE CShellContextMenu::GetPIDLPos (LPCITEMIDLIST pidl, int nPos)
{
if (!pidl)
return 0;
int nCount = 0;
BYTE * pCur = (BYTE *) pidl;
while (((LPCITEMIDLIST) pCur)->mkid.cb)
{
if (nCount == nPos)
return pCur;
nCount++;
pCur += ((LPCITEMIDLIST) pCur)->mkid.cb; // + sizeof(pidl->mkid.cb);
}
if (nCount == nPos)
return pCur;
return NULL;
}
int CShellContextMenu::GetPIDLCount (LPCITEMIDLIST pidl)
{
if (!pidl)
return 0;
int nCount = 0;
BYTE* pCur = (BYTE *) pidl;
while (((LPCITEMIDLIST) pCur)->mkid.cb)
{
nCount++;
pCur += ((LPCITEMIDLIST) pCur)->mkid.cb;
}
return nCount;
}
#endif

@ -0,0 +1,60 @@
/***************************************************************************
ShellContextMenu.h - description
-------------------
begin : Sat Mar 4 2006
copyright : (C) 2005-2007 by Joachim Eibl
email : joachim dot eibl at gmx dot de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
// ShellContextMenu.h: Schnittstelle fr die Klasse CShellContextMenu.
//
//////////////////////////////////////////////////////////////////////
#ifndef SHELLCONTEXTMENU_H
#define SHELLCONTEXTMENU_H
/////////////////////////////////////////////////////////////////////
// class to show shell contextmenu of files/folders/shell objects
// developed by R. Engels 2003
/////////////////////////////////////////////////////////////////////
class CShellContextMenu
{
public:
HMENU GetMenu ();
void SetObjects (IShellFolder * psfFolder, LPITEMIDLIST pidlItem);
void SetObjects (IShellFolder * psfFolder, LPITEMIDLIST * pidlArray, int nItemCount);
void SetObjects (LPITEMIDLIST pidl);
void SetObjects (const QString& strObject);
void SetObjects (const QStringList& strList);
UINT ShowContextMenu (QWidget* pParent, QPoint pt, QPopupMenu* pMenu);
CShellContextMenu();
virtual ~CShellContextMenu();
private:
int nItems;
BOOL bDelete;
HMENU m_hMenu;
IShellFolder * m_psfFolder;
LPITEMIDLIST * m_pidlArray;
void InvokeCommand (LPCONTEXTMENU pContextMenu, UINT idCommand);
BOOL GetContextMenu (void ** ppContextMenu, int & iMenuType);
HRESULT SHBindToParentEx (LPCITEMIDLIST pidl, REFIID riid, VOID **ppv, LPCITEMIDLIST *ppidlLast);
static LRESULT CALLBACK HookWndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
void FreePIDLArray (LPITEMIDLIST * pidlArray);
LPITEMIDLIST CopyPIDL (LPCITEMIDLIST pidl, int cb = -1);
UINT GetPIDLSize (LPCITEMIDLIST pidl);
LPBYTE GetPIDLPos (LPCITEMIDLIST pidl, int nPos);
int GetPIDLCount (LPCITEMIDLIST pidl);
};
#endif

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

File diff suppressed because it is too large Load Diff

@ -0,0 +1,505 @@
/***************************************************************************
kreplacements.h - description
-------------------
begin : Sat Aug 3 2002
copyright : (C) 2002-2007 by Joachim Eibl
email : joachim.eibl at gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef KREPLACEMENTS_H
#define KREPLACEMENTS_H
#include "common.h"
#include <qobject.h>
#include <qtabdialog.h>
#include <qmainwindow.h>
#include <qaction.h>
#include <qfiledialog.h>
#include <qapplication.h>
#include <qvbox.h>
#include <qpushbutton.h>
#include <qstatusbar.h>
#include <qtoolbar.h>
#include <qprogressbar.h>
#include <qpopupmenu.h>
#include <qstringlist.h>
#include <qprinter.h>
#include <map>
#include <list>
QString getTranslationDir();
class KMainWindow;
class KURL
{
public:
KURL(){}
KURL(const QString& s){ m_s = s; }
static KURL fromPathOrURL( const QString& s ){ return KURL(s); }
QString url() const { return m_s; }
bool isEmpty() const { return m_s.isEmpty(); }
QString prettyURL() const { return m_s; }
bool isLocalFile() const { return true; }
bool isValid() const { return true; }
QString path() const { return m_s; }
void setPath( const QString& s ){ m_s=s; }
QString fileName() const { return m_s; } // not really needed
void addPath( const QString& s ){ m_s += "/" + s; }
private:
QString m_s;
};
class KMessageBox
{
public:
static void error( QWidget* parent, const QString& text, const QString& caption=QString() );
static int warningContinueCancel( QWidget* parent, const QString& text, const QString& caption=QString(),
const QString& button1=QString("Continue") );
static void sorry( QWidget* parent, const QString& text, const QString& caption=QString() );
static void information( QWidget* parent, const QString& text, const QString& caption=QString() );
static int warningYesNo( QWidget* parent, const QString& text, const QString& caption,
const QString& button1, const QString& button2 );
static int warningYesNoCancel(
QWidget* parent, const QString& text, const QString& caption,
const QString& button1, const QString& button2 );
enum {Cancel=-1, No=0, Yes=1, Continue=1};
};
#define i18n(x) QObject::tr(x)
#define I18N_NOOP(x) x
#define RESTORE(x)
#define _UNLOAD(x)
typedef QPopupMenu KPopupMenu;
class KDialogBase : public QTabDialog
{
Q_OBJECT
public:
KDialogBase( int, const QString& caption, int, int, QWidget* parent, const char* name,
bool /*modal*/, bool );
~KDialogBase();
void incInitialSize ( const QSize& );
void setHelp(const QString& helpfilename, const QString& );
enum {IconList, Help, Default, Apply, Ok, Cancel };
int BarIcon(const QString& iconName, int );
QVBox* addVBoxPage( const QString& name, const QString& info, int );
QFrame* addPage( const QString& name, const QString& info, int );
int spacingHint();
virtual void accept();
signals:
void applyClicked();
protected slots:
virtual void slotOk( void );
virtual void slotApply( void );
virtual void slotHelp( void );
virtual void slotCancel( void );
virtual void slotDefault( void );
};
class KFileDialog : public QFileDialog
{
public:
static KURL getSaveURL( const QString &startDir=QString::null,
const QString &filter=QString::null,
QWidget *parent=0, const QString &caption=QString::null);
static KURL getOpenURL( const QString & startDir = QString::null,
const QString & filter = QString::null,
QWidget * parent = 0,
const QString & caption = QString::null );
static KURL getExistingURL( const QString & startDir = QString::null,
QWidget * parent = 0,
const QString & caption = QString::null );
static QString getSaveFileName (const QString &startDir=QString::null,
const QString &filter=QString::null,
QWidget *parent=0,
const QString &caption=QString::null);
};
typedef QStatusBar KStatusBar;
class KToolBar : public QToolBar
{
public:
KToolBar(QMainWindow* parent);
enum BarPosition {Top, Bottom, Left, Right};
BarPosition barPos();
void setBarPos(BarPosition);
private:
QMainWindow* m_pMainWindow;
};
class KActionCollection
{
public:
KMainWindow* m_pMainWindow;
KActionCollection( KMainWindow* p){ m_pMainWindow=p; }
};
class KKeyDialog
{
public:
static void configure(void*, QWidget*){}
static void configureKeys(KActionCollection*, const QString&){}
static void configure(KActionCollection*, const QString&){}
};
namespace KParts
{
class ReadWritePart;
}
class KMainWindow : public QMainWindow
{
Q_OBJECT
private:
KStatusBar m_statusBar;
KActionCollection m_actionCollection;
protected:
virtual bool queryClose() = 0;
virtual bool queryExit() = 0;
public:
QPopupMenu* fileMenu;
QPopupMenu* editMenu;
QPopupMenu* directoryMenu;
QPopupMenu* dirCurrentItemMenu;
QPopupMenu* dirCurrentSyncItemMenu;
QPopupMenu* movementMenu;
QPopupMenu* mergeMenu;
QPopupMenu* diffMenu;
QPopupMenu* windowsMenu;
QPopupMenu* settingsMenu;
QPopupMenu* helpMenu;
KToolBar* m_pToolBar;
KMainWindow( QWidget* parent, const char* name );
KToolBar* toolBar(const QString& s = QString::null);
KActionCollection* actionCollection();
void createGUI();
void createGUI(KParts::ReadWritePart*){createGUI();}
QList<KMainWindow>* memberList;
public slots:
void slotHelp();
void slotAbout();
};
class KConfig : public ValueMap
{
QString m_fileName;
public:
KConfig();
~KConfig();
void readConfigFile(const QString& configFileName);
void setGroup(const QString&);
};
class KAction : public QAction
{
Q_OBJECT
public:
KAction(const QString& text, const QIconSet& icon, int accel, QObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bToggle=false, bool bMenu=true);
KAction(const QString& text, int accel, QObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bToggle=false, bool bMenu=true);
void init(QObject* receiver, const char* slot, KActionCollection* actionCollection,
const char* name, bool bToggle, bool bMenu);
void setStatusText(const QString&);
void plug(QPopupMenu*);
};
class KToggleAction : public KAction
{
public:
KToggleAction(const QString& text, const QIconSet& icon, int accel, QObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bMenu=true);
KToggleAction(const QString& text, int accel, QObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bMenu=true);
KToggleAction(const QString& text, const QIconSet& icon, int accel, KActionCollection* actionCollection, const char* name, bool bMenu=true);
void setChecked(bool);
bool isChecked();
};
class KStdAction
{
public:
static KAction* open( QWidget* parent, const char* slot, KActionCollection* );
static KAction* save( QWidget* parent, const char* slot, KActionCollection* );
static KAction* saveAs( QWidget* parent, const char* slot, KActionCollection* );
static KAction* print( QWidget* parent, const char* slot, KActionCollection* );
static KAction* quit( QWidget* parent, const char* slot, KActionCollection* );
static KAction* cut( QWidget* parent, const char* slot, KActionCollection* );
static KAction* copy( QWidget* parent, const char* slot, KActionCollection* );
static KAction* paste( QWidget* parent, const char* slot, KActionCollection* );
static KAction* selectAll( QWidget* parent, const char* slot, KActionCollection* );
static KToggleAction* showToolbar( QWidget* parent, const char* slot, KActionCollection* );
static KToggleAction* showStatusbar( QWidget* parent, const char* slot, KActionCollection* );
static KAction* preferences( QWidget* parent, const char* slot, KActionCollection* );
static KAction* about( QWidget* parent, const char* slot, KActionCollection* );
static KAction* aboutQt( KActionCollection* );
static KAction* help( QWidget* parent, const char* slot, KActionCollection* );
static KAction* find( QWidget* parent, const char* slot, KActionCollection* );
static KAction* findNext( QWidget* parent, const char* slot, KActionCollection* );
static KAction* keyBindings( QWidget* parent, const char* slot, KActionCollection* );
};
class KIcon
{
public:
enum {SizeMedium,Small};
};
class KFontChooser : public QWidget
{
Q_OBJECT
QFont m_font;
QPushButton* m_pSelectFont;
QLabel* m_pLabel;
QWidget* m_pParent;
public:
KFontChooser( QWidget* pParent, const QString& name, bool, const QStringList&, bool, int );
QFont font();
void setFont( const QFont&, bool );
private slots:
void slotSelectFont();
};
class KColorButton : public QPushButton
{
Q_OBJECT
QColor m_color;
public:
KColorButton(QWidget* parent);
QColor color();
void setColor(const QColor&);
virtual void paintEvent(QPaintEvent* e);
public slots:
void slotClicked();
};
class KPrinter : public QPrinter
{
public:
KPrinter();
enum e_PageSelection {ApplicationSide};
QValueList<int> pageList();
void setCurrentPage(int);
void setPageSelection(e_PageSelection);
};
class KStandardDirs
{
public:
QString findResource(const QString& resource, const QString& appName);
};
struct KCmdLineOptions
{
const char* name;
const char* description;
int def;
};
#define KCmdLineLastOption {0,0,0}
class KAboutData
{
public:
KAboutData( const QString& name, const QString& appName, const QString& version,
const QString& description, int licence,
const QString& copyright, int w, const QString& homepage, const QString& email);
KAboutData( const QString& name, const QString& appName, const QString& version );
void addAuthor(const char* name=0, const char* task=0, const char* email=0, const char* weblink=0);
void addCredit(const char* name=0, const char* task=0, const char* email=0, const char* weblink=0);
enum { License_GPL };
struct AboutDataEntry
{
AboutDataEntry(const QString& name, const QString& task, const QString& email, const QString& weblink)
: m_name(name), m_task(task), m_email(email), m_weblink(weblink)
{}
QString m_name;
QString m_task;
QString m_email;
QString m_weblink;
};
std::list<AboutDataEntry> m_authorList;
std::list<AboutDataEntry> m_creditList;
};
typedef QValueList<QCString> QCStringList;
class KCmdLineArgs
{
public:
static KCmdLineArgs* parsedArgs();
static void init( int argc, char**argv, KAboutData* );
static void addCmdLineOptions( KCmdLineOptions* options ); // Add our own options.
int count();
QString arg(int);
KURL url(int i){ return KURL(arg(i)); }
void clear();
QString getOption(const QString&);
QCStringList getOptionList( const QString& );
bool isSet(const QString&);
};
class KIconLoader
{
public:
QPixmap loadIcon(const QString& name, int);
};
class KApplication : public QApplication
{
KConfig m_config;
KIconLoader m_iconLoader;
public:
KApplication();
static KApplication* kApplication();
KIconLoader* iconLoader();
KConfig* config();
bool isRestored();
};
extern KApplication* kapp;
class KLibFactory : public QObject
{
Q_OBJECT
public:
QObject* create(QObject*,const QString&,const QString&);
};
class KLibLoader
{
public:
static KLibLoader* self();
KLibFactory* factory(const QString&);
};
class KEditToolbar : public QDialog
{
public:
KEditToolbar( int ){}
};
class KGlobal
{
public:
static KConfig* config() { return 0; }
};
namespace KIO
{
enum UDSEntry {};
typedef QValueList<UDSEntry> UDSEntryList;
class Job : public QObject
{
public:
void kill(bool){}
bool error() {return false;}
void showErrorDialog( QWidget* ) {}
};
class SimpleJob : public Job {};
SimpleJob* mkdir( KURL );
SimpleJob* rmdir( KURL );
SimpleJob* file_delete( KURL, bool );
class FileCopyJob : public Job {};
FileCopyJob* file_move( KURL, KURL, int, bool, bool, bool );
FileCopyJob* file_copy( KURL, KURL, int, bool, bool, bool );
class CopyJob : public Job {};
CopyJob* link( KURL, KURL, bool );
class ListJob : public Job {};
ListJob* listRecursive( KURL, bool, bool );
ListJob* listDir( KURL, bool, bool );
class StatJob : public Job {
public: UDSEntry statResult(){ return (UDSEntry)0; }
};
StatJob* stat( KURL, bool, int, bool );
class TransferJob : public Job {};
TransferJob* get( KURL, bool, bool );
TransferJob* put( KURL, int, bool, bool, bool );
};
typedef QProgressBar KProgress;
class KInstance : public QObject
{
public:
KInstance(KAboutData*){}
};
namespace KParts
{
class MainWindow : public KMainWindow
{
public:
MainWindow( QWidget* parent, const char* name ) : KMainWindow(parent,name) {}
void setXMLFile(const QString&){}
void setAutoSaveSettings(){}
void saveMainWindowSettings(KConfig*){}
void applyMainWindowSettings(KConfig*){}
int factory(){return 0;}
};
class Part : public QObject
{
public:
KActionCollection* actionCollection();
KApplication* instance();
void setWidget( QWidget* w ){ m_pWidget=w; }
QWidget* widget(){return m_pWidget;}
void setXMLFile(const QString&){}
private:
QWidget* m_pWidget;
};
class ReadOnlyPart : public Part
{
public:
ReadOnlyPart(){}
ReadOnlyPart(QObject*,const QCString&){}
void setInstance( KInstance* ){}
QString m_file;
};
class ReadWritePart : public ReadOnlyPart
{
public:
ReadWritePart(QObject*,const QCString&){}
void setReadWrite(bool){}
};
class Factory : public KLibFactory
{
Q_OBJECT
public:
virtual KParts::Part* createPartObject( QWidget *parentWidget, const char *widgetName,
QObject *parent, const char *name,
const char *classname, const QStringList &args )=0;
};
};
#endif

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

@ -0,0 +1,2 @@
#include "kreplacements.h"

Binary file not shown.

Binary file not shown.

@ -0,0 +1,236 @@
/***************************************************************************
main.cpp - Where everything starts.
-------------------
begin : Don Jul 11 12:31:29 CEST 2002
copyright : (C) 2002-2007 by Joachim Eibl
email : joachim.eibl at gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include <kcmdlineargs.h>
#include <kaboutdata.h>
#include <klocale.h>
#include "kdiff3_shell.h"
#include <kstandarddirs.h>
#include "version.h"
#include <qtextcodec.h>
#include <qfile.h>
#include <qtextstream.h>
#include <vector>
#ifdef KREPLACEMENTS_H
#include "optiondialog.h"
#endif
#include "common.h"
static const char *description =
I18N_NOOP("Tool for Comparison and Merge of Files and Directories");
static KCmdLineOptions options[] =
{
{ "m", 0, 0 },
{ "merge", I18N_NOOP("Merge the input."), 0 },
{ "b", 0, 0 },
{ "base file", I18N_NOOP("Explicit base file. For compatibility with certain tools."), 0 },
{ "o", 0, 0 },
{ "output file", I18N_NOOP("Output file. Implies -m. E.g.: -o newfile.txt"), 0 },
{ "out file", I18N_NOOP("Output file, again. (For compatibility with certain tools.)"), 0 },
{ "auto", I18N_NOOP("No GUI if all conflicts are auto-solvable. (Needs -o file)"), 0 },
{ "qall", I18N_NOOP("Don't solve conflicts automatically. (For compatibility...)"), 0 },
{ "L1 alias1", I18N_NOOP("Visible name replacement for input file 1 (base)."), 0 },
{ "L2 alias2", I18N_NOOP("Visible name replacement for input file 2."), 0 },
{ "L3 alias3", I18N_NOOP("Visible name replacement for input file 3."), 0 },
{ "L", 0, 0 },
{ "fname alias", I18N_NOOP("Alternative visible name replacement. Supply this once for every input."), 0 },
{ "cs string", I18N_NOOP("Override a config setting. Use once for every setting. E.g.: --cs \"AutoAdvance=1\""), 0 },
{ "confighelp", I18N_NOOP("Show list of config settings and current values."), 0 },
{ "config file", I18N_NOOP("Use a different config file."), 0 }
};
static KCmdLineOptions options2[] =
{
{ "+[File1]", I18N_NOOP("file1 to open (base, if not specified via --base)"), 0 },
{ "+[File2]", I18N_NOOP("file2 to open"), 0 },
{ "+[File3]", I18N_NOOP("file3 to open"), 0 }
};
void initialiseCmdLineArgs(std::vector<KCmdLineOptions>& vOptions, QStringList& ignorableOptions)
{
vOptions.insert( vOptions.end(), options, (KCmdLineOptions*)((char*)options+sizeof(options)));
QString configFileName = KStandardDirs().findResource("config","kdiff3rc");
QFile configFile( configFileName );
if ( configFile.open( IO_ReadOnly ) )
{
QTextStream ts( &configFile );
while(!ts.atEnd())
{
QString line = ts.readLine();
if ( line.startsWith("IgnorableCmdLineOptions=") )
{
int pos = line.find('=');
if (pos>=0)
{
QString s = line.mid(pos+1);
QStringList sl = QStringList::split( '|', s );
if (!sl.isEmpty())
{
ignorableOptions = QStringList::split( ';', sl.front() );
for (QStringList::iterator i=ignorableOptions.begin(); i!=ignorableOptions.end(); ++i)
{
KCmdLineOptions ignoreOption;
(*i).remove('-');
if (!(*i).isEmpty())
{
ignoreOption.name = (*i).latin1();
ignoreOption.description = I18N_NOOP("Ignored. (User defined.)");
ignoreOption.def = 0;
vOptions.push_back(ignoreOption);
}
}
}
}
break;
}
}
}
vOptions.insert(vOptions.end(),options2,(KCmdLineOptions*)((char*)options2+sizeof(options2)));
KCmdLineOptions last = KCmdLineLastOption;
vOptions.push_back(last);
KCmdLineArgs::addCmdLineOptions( &vOptions[0] ); // Add our own options.
}
#ifdef _WIN32
#include <process.h>
// This command checks the comm
static bool isOptionUsed(const QString& s, int argc, char* argv[])
{
for(int j=0; j<argc; ++j )
{
if( "-"+s == argv[j] || "--"+s==argv[j] )
{
return true;
}
}
return false;
}
#endif
int main(int argc, char *argv[])
{
#ifdef _WIN32
/* KDiff3 can be used as replacement for the text-diff and merge tool provided by
Clearcase. This is experimental and so far has only been tested under Windows.
There are two ways to use KDiff3 with clearcase
- The file lib/mgrs/map contains the list of compare/merge tasks on one side and
the tool on the other. Originally this contains only clearcase tools, but you can
edit this file and put kdiff3 there instead. (Recommended method)
- Exchange the original program with KDiff3: (Hackish, no fine control)
1. In the Clearcase "bin"-directory rename "cleardiffmrg.exe" to "cleardiffmrg_orig.exe".
2. Copy kdiff3.exe into that "bin"-directory and rename it to "cleardiffmrg.exe".
(Also copy the other files that are needed by KDiff3 there.)
Now when a file comparison or merge is done by Clearcase then of course KDiff3 will be
run instead.
If the commandline contains the option "-directory" then KDiff3 can't do it but will
run "cleardiffmrg_orig.exe" instead.
*/
// Write all args into a temporary file. Uncomment this for debugging purposes.
/*
FILE* f = fopen("c:\\t.txt","w");
for(int i=0; i< argc; ++i)
fprintf(f,"Arg %d: %s\n", i, argv[i]);
// Call orig cleardiffmrg.exe to see what result it returns.
int result=0;
result = ::_spawnvp(_P_WAIT , "C:\\Programme\\Rational\\ClearCase\\bin\\cleardiffmrg.exe", argv );
fprintf(f,"Result: %d\n", result );
fclose(f);
return result;
*/
// KDiff3 can replace cleardiffmrg from clearcase. But not all functions.
if ( isOptionUsed( "directory", argc,argv ) )
{
return ::_spawnvp(_P_WAIT , "cleardiffmrg_orig", argv );
}
#endif
//QApplication::setColorSpec( QApplication::ManyColor ); // Grab all 216 colors
KAboutData aboutData( "kdiff3", I18N_NOOP("KDiff3"),
VERSION, description, KAboutData::License_GPL,
"(c) 2002-2007 Joachim Eibl", 0, "http://kdiff3.sourceforge.net/", "joachim.eibl" "@" "gmx.de");
aboutData.addAuthor("Joachim Eibl",0, "joachim.eibl" "@" "gmx.de");
aboutData.addCredit("Eike Sauer", "Bugfixes, Debian package maintainer" );
aboutData.addCredit("Sebastien Fricker", "Windows installer" );
aboutData.addCredit("Stephan Binner", "i18n-help", "binner" "@" "kde.org" );
aboutData.addCredit("Stefan Partheymueller", "Clipboard-patch" );
aboutData.addCredit("David Faure", "KIO-Help", "faure" "@" "kde.org" );
aboutData.addCredit("Bernd Gehrmann", "Class CvsIgnoreList from Cervisia" );
aboutData.addCredit("Andre Woebbeking", "Class StringMatcher" );
aboutData.addCredit("Michael Denio", "Directory Equality-Coloring patch");
aboutData.addCredit("Manfred Koehler", "Fix for slow startup on Windows");
aboutData.addCredit("Sergey Zorin", "Diff Ext for Windows");
aboutData.addCredit("Paul Eggert, Mike Haertel, David Hayes, Richard Stallman, Len Tower", "GNU-Diffutils");
aboutData.addCredit("Tino Boellsterling, Timothy Mee", "Intensive test, use and feedback");
aboutData.addCredit("Michael Schmidt", "Mac support");
aboutData.addCredit(I18N_NOOP("+ Many thanks to those who reported bugs and contributed ideas!"));
KCmdLineArgs::init( argc, argv, &aboutData );
std::vector<KCmdLineOptions> vOptions;
QStringList ignorableOptions;
initialiseCmdLineArgs(vOptions, ignorableOptions);
KApplication app;
#ifdef KREPLACEMENTS_H
QString locale;
locale = app.config()->readEntry("Language", "Auto");
int spacePos = locale.find(' ');
if (spacePos>0) locale = locale.left(spacePos);
QTranslator kdiff3Translator( 0 );
QTranslator qtTranslator( 0 );
if (locale != "en_orig")
{
if ( locale == "Auto" || locale.isEmpty() )
locale = QTextCodec::locale();
QString translationDir = getTranslationDir();
kdiff3Translator.load( QString("kdiff3_")+locale, translationDir );
app.installTranslator( &kdiff3Translator );
qtTranslator.load( QString("qt_")+locale, translationDir );
app.installTranslator( &qtTranslator );
}
#endif
if (app.isRestored())
{
RESTORE(KDiff3Shell);
}
else
{
new KDiff3Shell();
}
int retVal = app.exec();
return retVal;
}
// Suppress warning with --enable-final
#undef VERSION

@ -0,0 +1,87 @@
/***************************************************************************
merger.cpp - description
-------------------
begin : Sun Mar 24 2002
copyright : (C) 2002-2007 by Joachim Eibl
email : joachim.eibl at gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "merger.h"
#include <assert.h>
#include <iostream>
#include <iomanip>
Merger::Merger( const DiffList* pDiffListAB, const DiffList* pDiffListCA )
: md1( pDiffListAB, 0 ), md2( pDiffListCA, 1 )
{
}
Merger::MergeData::MergeData( const DiffList* p, int i )
: d(0,0,0)
{
idx=i;
pDiffList = p;
if ( p!=0 )
{
it=p->begin();
update();
}
}
bool Merger::MergeData::eq()
{
return pDiffList==0 || d.nofEquals > 0;
}
bool Merger::MergeData::isEnd()
{
return ( pDiffList==0 || ( it==pDiffList->end() && d.nofEquals==0 &&
( idx == 0 ? d.diff1==0 : d.diff2==0 )
) );
}
void Merger::MergeData::update()
{
if ( d.nofEquals > 0 )
--d.nofEquals;
else if ( idx==0 && d.diff1 > 0 )
--d.diff1;
else if ( idx==1 && d.diff2 > 0 )
--d.diff2;
while( d.nofEquals == 0 && (idx==0 && d.diff1 == 0 || idx==1 && d.diff2 == 0)
&& pDiffList!=0 && it != pDiffList->end() )
{
d = *it;
++it;
}
}
void Merger::next()
{
md1.update();
md2.update();
}
int Merger::whatChanged()
{
int changed = 0;
changed |= md1.eq() ? 0 : 1;
changed |= md2.eq() ? 0 : 2;
return changed;
}
bool Merger::isEndReached()
{
return md1.isEnd() && md2.isEnd();
}

@ -0,0 +1,61 @@
/***************************************************************************
merger.h - description
-------------------
begin : Sun Mar 24 2002
copyright : (C) 2002-2007 by Joachim Eibl
email : joachim.eibl at gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef MERGER_H
#define MERGER_H
#include "diff.h"
class Merger
{
public:
Merger( const DiffList* pDiffList1, const DiffList* pDiffList2 );
/** Go one step. */
void next();
/** Information about what changed. Can be used for coloring.
The return value is 0 if nothing changed here,
bit 1 is set if a difference from pDiffList1 was detected,
bit 2 is set if a difference from pDiffList2 was detected.
*/
int whatChanged();
/** End of both diff lists reached. */
bool isEndReached();
private:
struct MergeData
{
DiffList::const_iterator it;
const DiffList* pDiffList;
Diff d;
int idx;
MergeData( const DiffList* p, int i );
bool eq();
void update();
bool isEnd();
};
MergeData md1;
MergeData md2;
};
#endif

File diff suppressed because it is too large Load Diff

@ -0,0 +1,454 @@
/***************************************************************************
mergeresultwindow.h - description
-------------------
begin : Mon Mar 18 2002
copyright : (C) 2002-2007 by Joachim Eibl
email : joachim.eibl at gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef MERGERESULTWINDOW_H
#define MERGERESULTWINDOW_H
#include "diff.h"
#include <qwidget.h>
#include <qpixmap.h>
#include <qtimer.h>
class QPainter;
class Overview : public QWidget
{
Q_OBJECT
public:
Overview( QWidget* pParent, OptionDialog* pOptions );
void init( Diff3LineList* pDiff3LineList, bool bTripleDiff );
void reset();
void setRange( int firstLine, int pageHeight );
void setPaintingAllowed( bool bAllowPainting );
enum e_OverviewMode { eOMNormal, eOMAvsB, eOMAvsC, eOMBvsC };
void setOverviewMode( e_OverviewMode eOverviewMode );
e_OverviewMode getOverviewMode();
public slots:
void setFirstLine(int firstLine);
void slotRedraw();
signals:
void setLine(int);
private:
const Diff3LineList* m_pDiff3LineList;
OptionDialog* m_pOptions;
bool m_bTripleDiff;
int m_firstLine;
int m_pageHeight;
QPixmap m_pixmap;
bool m_bPaintingAllowed;
e_OverviewMode m_eOverviewMode;
int m_nofLines;
virtual void paintEvent( QPaintEvent* e );
virtual void mousePressEvent( QMouseEvent* e );
virtual void mouseMoveEvent( QMouseEvent* e );
void drawColumn( QPainter& p, e_OverviewMode eOverviewMode, int x, int w, int h, int nofLines );
};
enum e_MergeDetails
{
eDefault,
eNoChange,
eBChanged,
eCChanged,
eBCChanged, // conflict
eBCChangedAndEqual, // possible conflict
eBDeleted,
eCDeleted,
eBCDeleted, // possible conflict
eBChanged_CDeleted, // conflict
eCChanged_BDeleted, // conflict
eBAdded,
eCAdded,
eBCAdded, // conflict
eBCAddedAndEqual // possible conflict
};
void mergeOneLine( const Diff3Line& d, e_MergeDetails& mergeDetails, bool& bConflict, bool& bLineRemoved, int& src, bool bTwoInputs );
enum e_MergeSrcSelector
{
A=1,
B=2,
C=3
};
class MergeResultWindow : public QWidget
{
Q_OBJECT
public:
MergeResultWindow(
QWidget* pParent,
OptionDialog* pOptionDialog,
QStatusBar* pStatusBar
);
void init(
const LineData* pLineDataA, int sizeA,
const LineData* pLineDataB, int sizeB,
const LineData* pLineDataC, int sizeC,
const Diff3LineList* pDiff3LineList,
TotalDiffStatus* pTotalDiffStatus
);
void reset();
bool saveDocument( const QString& fileName, QTextCodec* pEncoding );
int getNrOfUnsolvedConflicts(int* pNrOfWhiteSpaceConflicts=0);
void choose(int selector);
void chooseGlobal(int selector, bool bConflictsOnly, bool bWhiteSpaceOnly );
int getNofColumns();
int getNofLines();
int getNofVisibleColumns();
int getNofVisibleLines();
QString getSelection();
void resetSelection();
void showNrOfConflicts();
bool isDeltaAboveCurrent();
bool isDeltaBelowCurrent();
bool isConflictAboveCurrent();
bool isConflictBelowCurrent();
bool isUnsolvedConflictAtCurrent();
bool isUnsolvedConflictAboveCurrent();
bool isUnsolvedConflictBelowCurrent();
bool findString( const QString& s, int& d3vLine, int& posInLine, bool bDirDown, bool bCaseSensitive );
void setSelection( int firstLine, int startPos, int lastLine, int endPos );
void setOverviewMode( Overview::e_OverviewMode eOverviewMode );
Overview::e_OverviewMode getOverviewMode();
public slots:
void setFirstLine(int firstLine);
void setFirstColumn(int firstCol);
void slotGoCurrent();
void slotGoTop();
void slotGoBottom();
void slotGoPrevDelta();
void slotGoNextDelta();
void slotGoPrevUnsolvedConflict();
void slotGoNextUnsolvedConflict();
void slotGoPrevConflict();
void slotGoNextConflict();
void slotAutoSolve();
void slotUnsolve();
void slotMergeHistory();
void slotRegExpAutoMerge();
void slotSplitDiff( int firstD3lLineIdx, int lastD3lLineIdx );
void slotJoinDiffs( int firstD3lLineIdx, int lastD3lLineIdx );
void slotSetFastSelectorLine(int);
void setPaintingAllowed(bool);
void updateSourceMask();
signals:
void scroll( int deltaX, int deltaY );
void modifiedChanged(bool bModified);
void setFastSelectorRange( int line1, int nofLines );
void sourceMask( int srcMask, int enabledMask );
void resizeSignal();
void selectionEnd();
void newSelection();
void updateAvailabilities();
void showPopupMenu( const QPoint& point );
void noRelevantChangesDetected();
private:
void merge(bool bAutoSolve, int defaultSelector, bool bConflictsOnly=false, bool bWhiteSpaceOnly=false );
QString getString( int lineIdx );
OptionDialog* m_pOptionDialog;
const LineData* m_pldA;
const LineData* m_pldB;
const LineData* m_pldC;
int m_sizeA;
int m_sizeB;
int m_sizeC;
const Diff3LineList* m_pDiff3LineList;
TotalDiffStatus* m_pTotalDiffStatus;
bool m_bPaintingAllowed;
int m_delayedDrawTimer;
Overview::e_OverviewMode m_eOverviewMode;
private:
class MergeEditLine
{
public:
MergeEditLine(Diff3LineList::const_iterator i, int src=0){m_id3l=i; m_src=src; m_bLineRemoved=false; }
void setConflict() { m_src=0; m_bLineRemoved=false; m_str=QString(); }
bool isConflict() { return m_src==0 && !m_bLineRemoved && m_str.isNull(); }
void setRemoved(int src=0) { m_src=src; m_bLineRemoved=true; m_str=QString(); }
bool isRemoved() { return m_bLineRemoved; }
bool isEditableText() { return !isConflict() && !isRemoved(); }
void setString( const QString& s ){ m_str=s; m_bLineRemoved=false; m_src=0; }
QString getString( const MergeResultWindow* );
bool isModified() { return ! m_str.isNull() || (m_bLineRemoved && m_src==0); }
void setSource( int src, bool bLineRemoved ) { m_src=src; m_bLineRemoved =bLineRemoved; }
int src() { return m_src; }
Diff3LineList::const_iterator id3l(){return m_id3l;}
// getString() is implemented as MergeResultWindow::getString()
private:
Diff3LineList::const_iterator m_id3l;
int m_src; // 1, 2 or 3 for A, B or C respectively, or 0 when line is from neither source.
QString m_str; // String when modified by user or null-string when orig data is used.
bool m_bLineRemoved;
};
class MergeEditLineList : private std::list<MergeEditLine>
{ // I want to know the size immediately!
private:
typedef std::list<MergeEditLine> BASE;
int m_size;
int* m_pTotalSize;
public:
typedef std::list<MergeEditLine>::iterator iterator;
typedef std::list<MergeEditLine>::reverse_iterator reverse_iterator;
typedef std::list<MergeEditLine>::const_iterator const_iterator;
MergeEditLineList(){m_size=0; m_pTotalSize=0; }
void clear() { ds(-m_size); BASE::clear(); }
void push_back( const MergeEditLine& m) { ds(+1); BASE::push_back(m); }
void push_front( const MergeEditLine& m) { ds(+1); BASE::push_front(m); }
iterator erase( iterator i ) { ds(-1); return BASE::erase(i); }
iterator insert( iterator i, const MergeEditLine& m ) { ds(+1); return BASE::insert(i,m); }
int size(){ if (!m_pTotalSize) m_size = BASE::size(); return m_size; }
iterator begin(){return BASE::begin();}
iterator end(){return BASE::end();}
reverse_iterator rbegin(){return BASE::rbegin();}
reverse_iterator rend(){return BASE::rend();}
MergeEditLine& front(){return BASE::front();}
MergeEditLine& back(){return BASE::back();}
bool empty() { return m_size==0; }
void splice(iterator destPos, MergeEditLineList& srcList, iterator srcFirst, iterator srcLast)
{
int* pTotalSize = getTotalSizePtr() ? getTotalSizePtr() : srcList.getTotalSizePtr();
srcList.setTotalSizePtr(0); // Force size-recalc after splice, because splice doesn't handle size-tracking
setTotalSizePtr(0);
BASE::splice( destPos, srcList, srcFirst, srcLast );
srcList.setTotalSizePtr( pTotalSize );
setTotalSizePtr( pTotalSize );
}
void setTotalSizePtr(int* pTotalSize)
{
if ( pTotalSize==0 && m_pTotalSize!=0 ) { *m_pTotalSize -= size(); }
else if ( pTotalSize!=0 && m_pTotalSize==0 ) { *pTotalSize += size(); }
m_pTotalSize = pTotalSize;
}
int* getTotalSizePtr()
{
return m_pTotalSize;
}
private:
void ds(int deltaSize)
{
m_size+=deltaSize;
if (m_pTotalSize!=0) *m_pTotalSize+=deltaSize;
}
};
friend class MergeEditLine;
struct MergeLine
{
MergeLine()
{
srcSelect=0; mergeDetails=eDefault; d3lLineIdx = -1; srcRangeLength=0;
bConflict=false; bDelta=false; bWhiteSpaceConflict=false;
}
Diff3LineList::const_iterator id3l;
int d3lLineIdx; // Needed to show the correct window pos.
int srcRangeLength; // how many src-lines have this properties
e_MergeDetails mergeDetails;
bool bConflict;
bool bWhiteSpaceConflict;
bool bDelta;
int srcSelect;
MergeEditLineList mergeEditLineList;
void split( MergeLine& ml2, int d3lLineIdx2 ) // The caller must insert the ml2 after this ml in the m_mergeLineList
{
if ( d3lLineIdx2<d3lLineIdx || d3lLineIdx2 >= d3lLineIdx + srcRangeLength )
return; //Error
ml2.mergeDetails = mergeDetails;
ml2.bConflict = bConflict;
ml2.bWhiteSpaceConflict = bWhiteSpaceConflict;
ml2.bDelta = bDelta;
ml2.srcSelect = srcSelect;
ml2.d3lLineIdx = d3lLineIdx2;
ml2.srcRangeLength = srcRangeLength - (d3lLineIdx2-d3lLineIdx);
srcRangeLength = d3lLineIdx2-d3lLineIdx; // current MergeLine controls fewer lines
ml2.id3l = id3l;
for(int i=0; i<srcRangeLength; ++i)
++ml2.id3l;
ml2.mergeEditLineList.clear();
// Search for best place to splice
for(MergeEditLineList::iterator i=mergeEditLineList.begin(); i!=mergeEditLineList.end();++i)
{
if (i->id3l()==ml2.id3l)
{
ml2.mergeEditLineList.splice( ml2.mergeEditLineList.begin(), mergeEditLineList, i, mergeEditLineList.end() );
return;
}
}
ml2.mergeEditLineList.setTotalSizePtr( mergeEditLineList.getTotalSizePtr() );
ml2.mergeEditLineList.push_back(MergeEditLine(ml2.id3l));
}
void join( MergeLine& ml2 ) // The caller must remove the ml2 from the m_mergeLineList after this call
{
srcRangeLength += ml2.srcRangeLength;
ml2.mergeEditLineList.clear();
mergeEditLineList.clear();
mergeEditLineList.push_back(MergeEditLine(id3l)); // Create a simple conflict
if ( ml2.bConflict ) bConflict = true;
if ( !ml2.bWhiteSpaceConflict ) bWhiteSpaceConflict = false;
if ( ml2.bDelta ) bDelta = true;
}
};
private:
static bool sameKindCheck( const MergeLine& ml1, const MergeLine& ml2 );
struct HistoryMapEntry
{
MergeEditLineList mellA;
MergeEditLineList mellB;
MergeEditLineList mellC;
MergeEditLineList& choice( bool bThreeInputs );
bool staysInPlace( bool bThreeInputs, Diff3LineList::const_iterator& iHistoryEnd );
};
typedef std::map<QString,HistoryMapEntry> HistoryMap;
void collectHistoryInformation( int src, Diff3LineList::const_iterator iHistoryBegin, Diff3LineList::const_iterator iHistoryEnd, HistoryMap& historyMap, std::list< HistoryMap::iterator >& hitList );
typedef std::list<MergeLine> MergeLineList;
MergeLineList m_mergeLineList;
MergeLineList::iterator m_currentMergeLineIt;
bool isItAtEnd( bool bIncrement, MergeLineList::iterator i )
{
if ( bIncrement ) return i!=m_mergeLineList.end();
else return i!=m_mergeLineList.begin();
}
int m_currentPos;
bool checkOverviewIgnore(MergeLineList::iterator &i);
enum e_Direction { eUp, eDown };
enum e_EndPoint { eDelta, eConflict, eUnsolvedConflict, eLine, eEnd };
void go( e_Direction eDir, e_EndPoint eEndPoint );
void calcIteratorFromLineNr(
int line,
MergeLineList::iterator& mlIt,
MergeEditLineList::iterator& melIt
);
MergeLineList::iterator splitAtDiff3LineIdx( int d3lLineIdx );
virtual void paintEvent( QPaintEvent* e );
void myUpdate(int afterMilliSecs);
virtual void timerEvent(QTimerEvent*);
void writeLine(
MyPainter& p, int line, const QString& str,
int srcSelect, e_MergeDetails mergeDetails, int rangeMark, bool bUserModified, bool bLineRemoved, bool bWhiteSpaceConflict
);
void setFastSelector(MergeLineList::iterator i);
void convertToLinePos( int x, int y, int& line, int& pos );
virtual void mousePressEvent ( QMouseEvent* e );
virtual void mouseDoubleClickEvent ( QMouseEvent* e );
virtual void mouseReleaseEvent ( QMouseEvent * );
virtual void mouseMoveEvent ( QMouseEvent * );
virtual void resizeEvent( QResizeEvent* e );
virtual void keyPressEvent( QKeyEvent* e );
virtual void wheelEvent( QWheelEvent* e );
virtual void focusInEvent( QFocusEvent* e );
virtual bool focusNextPrevChild(bool){return false;}
QPixmap m_pixmap;
int m_firstLine;
int m_firstColumn;
int m_nofColumns;
int m_nofLines;
int m_totalSize; //Same as m_nofLines, but calculated differently
bool m_bMyUpdate;
bool m_bInsertMode;
bool m_bModified;
void setModified(bool bModified=true);
int m_scrollDeltaX;
int m_scrollDeltaY;
int m_cursorXPos;
int m_cursorYPos;
int m_cursorOldXPos;
bool m_bCursorOn; // blinking on and off each second
QTimer m_cursorTimer;
bool m_bCursorUpdate;
QStatusBar* m_pStatusBar;
Selection m_selection;
bool deleteSelection2( QString& str, int& x, int& y,
MergeLineList::iterator& mlIt, MergeEditLineList::iterator& melIt );
bool doRelevantChangesExist();
public slots:
void deleteSelection();
void pasteClipboard(bool bFromSelection);
private slots:
void slotCursorUpdate();
};
class QLineEdit;
class QTextCodec;
class QComboBox;
class QLabel;
class WindowTitleWidget : public QWidget
{
Q_OBJECT
private:
QLabel* m_pLabel;
QLineEdit* m_pFileNameLineEdit;
//QPushButton* m_pBrowseButton;
QLabel* m_pModifiedLabel;
QLabel* m_pEncodingLabel;
QComboBox* m_pEncodingSelector;
OptionDialog* m_pOptionDialog;
std::map<int, QTextCodec*> m_codecMap;
public:
WindowTitleWidget(OptionDialog* pOptionDialog, QWidget* pParent );
QTextCodec* getEncoding();
void setFileName(const QString& fileName );
QString getFileName();
void setEncodings( QTextCodec* pCodecForA, QTextCodec* pCodecForB, QTextCodec* pCodecForC );
void setEncoding( QTextCodec* pCodec );
bool eventFilter( QObject* o, QEvent* e );
public slots:
void slotSetModified( bool bModified );
//private slots:
// void slotBrowseButtonClicked();
};
#endif

File diff suppressed because it is too large Load Diff

@ -0,0 +1,229 @@
/*
* kdiff3 - Text Diff And Merge Tool
* Copyright (C) 2002-2007 Joachim Eibl, joachim.eibl at gmx.de
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef OPTION_DIALOG_H
#define OPTION_DIALOG_H
class QCheckBox;
class QLabel;
class QLineEdit;
class KColorButton;
class KFontChooser;
class KConfig;
#include <kdialogbase.h>
#include <qstringlist.h>
#include <list>
#include <kcmdlineargs.h>
class OptionItem;
class OptionCheckBox;
class OptionEncodingComboBox;
class OptionLineEdit;
class KKeyDialog;
enum e_LineEndStyle
{
eLineEndUnix=0,
eLineEndDos
};
class OptionDialog : public KDialogBase
{
Q_OBJECT
public:
OptionDialog( bool bShowDirMergeSettings, QWidget *parent = 0, char *name = 0 );
~OptionDialog( void );
QString parseOptions( const QCStringList& optionList );
QString calcOptionHelp();
// Some settings are not available in the option dialog:
QSize m_geometry;
QPoint m_position;
bool m_bMaximised;
bool m_bShowToolBar;
bool m_bShowStatusBar;
int m_toolBarPos;
// These are the results of the option dialog.
QFont m_font;
bool m_bItalicForDeltas;
QColor m_fgColor;
QColor m_bgColor;
QColor m_diffBgColor;
QColor m_colorA;
QColor m_colorB;
QColor m_colorC;
QColor m_colorForConflict;
QColor m_currentRangeBgColor;
QColor m_currentRangeDiffBgColor;
QColor m_oldestFileColor;
QColor m_midAgeFileColor;
QColor m_newestFileColor;
QColor m_missingFileColor;
QColor m_manualHelpRangeColor;
bool m_bWordWrap;
bool m_bReplaceTabs;
bool m_bAutoIndentation;
int m_tabSize;
bool m_bAutoCopySelection;
bool m_bSameEncoding;
QTextCodec* m_pEncodingA;
bool m_bAutoDetectUnicodeA;
QTextCodec* m_pEncodingB;
bool m_bAutoDetectUnicodeB;
QTextCodec* m_pEncodingC;
bool m_bAutoDetectUnicodeC;
QTextCodec* m_pEncodingOut;
bool m_bAutoSelectOutEncoding;
QTextCodec* m_pEncodingPP;
int m_lineEndStyle;
bool m_bPreserveCarriageReturn;
bool m_bTryHard;
bool m_bShowWhiteSpaceCharacters;
bool m_bShowWhiteSpace;
bool m_bShowLineNumbers;
bool m_bHorizDiffWindowSplitting;
int m_whiteSpace2FileMergeDefault;
int m_whiteSpace3FileMergeDefault;
bool m_bIgnoreCase;
bool m_bIgnoreNumbers;
bool m_bIgnoreComments;
QString m_PreProcessorCmd;
QString m_LineMatchingPreProcessorCmd;
bool m_bRunRegExpAutoMergeOnMergeStart;
QString m_autoMergeRegExp;
bool m_bRunHistoryAutoMergeOnMergeStart;
QString m_historyStartRegExp;
QString m_historyEntryStartRegExp;
bool m_bHistoryMergeSorting;
QString m_historyEntryStartSortKeyOrder;
int m_maxNofHistoryEntries;
QString m_IrrelevantMergeCmd;
bool m_bAutoSaveAndQuitOnMergeWithoutConflicts;
bool m_bAutoAdvance;
int m_autoAdvanceDelay;
QStringList m_recentAFiles;
QStringList m_recentBFiles;
QStringList m_recentCFiles;
QStringList m_recentOutputFiles;
// Directory Merge options
bool m_bDmSyncMode;
bool m_bDmRecursiveDirs;
bool m_bDmFollowFileLinks;
bool m_bDmFollowDirLinks;
bool m_bDmFindHidden;
bool m_bDmCreateBakFiles;
bool m_bDmBinaryComparison;
bool m_bDmFullAnalysis;
bool m_bDmTrustDate;
bool m_bDmTrustDateFallbackToBinary;
bool m_bDmTrustSize;
bool m_bDmCopyNewer;
//bool m_bDmShowOnlyDeltas;
bool m_bDmShowIdenticalFiles;
bool m_bDmUseCvsIgnore;
bool m_bDmWhiteSpaceEqual;
bool m_bDmCaseSensitiveFilenameComparison;
QString m_DmFilePattern;
QString m_DmFileAntiPattern;
QString m_DmDirAntiPattern;
QString m_language;
bool m_bRightToLeftLanguage;
QString m_ignorableCmdLineOptions;
bool m_bIntegrateWithClearCase;
void saveOptions(KConfig* config);
void readOptions(KConfig* config);
void setState(); // Must be called before calling exec();
void addOptionItem(OptionItem*);
KKeyDialog* m_pKeyDialog;
protected slots:
virtual void slotDefault( void );
virtual void slotOk( void );
virtual void slotApply( void );
virtual void slotHelp( void );
void slotEncodingChanged();
void slotHistoryMergeRegExpTester();
void slotIntegrateWithClearCase();
void slotRemoveClearCaseIntegration();
private:
void resetToDefaults();
std::list<OptionItem*> m_optionItemList;
OptionCheckBox* m_pSameEncoding;
OptionEncodingComboBox* m_pEncodingAComboBox;
OptionCheckBox* m_pAutoDetectUnicodeA;
OptionEncodingComboBox* m_pEncodingBComboBox;
OptionCheckBox* m_pAutoDetectUnicodeB;
OptionEncodingComboBox* m_pEncodingCComboBox;
OptionCheckBox* m_pAutoDetectUnicodeC;
OptionEncodingComboBox* m_pEncodingOutComboBox;
OptionCheckBox* m_pAutoSelectOutEncoding;
OptionEncodingComboBox* m_pEncodingPPComboBox;
OptionCheckBox* m_pHistoryAutoMerge;
OptionLineEdit* m_pAutoMergeRegExpLineEdit;
OptionLineEdit* m_pHistoryStartRegExpLineEdit;
OptionLineEdit* m_pHistoryEntryStartRegExpLineEdit;
OptionCheckBox* m_pHistoryMergeSorting;
OptionLineEdit* m_pHistorySortKeyOrderLineEdit;
private:
void setupFontPage();
void setupColorPage();
void setupEditPage();
void setupDiffPage();
void setupMergePage();
void setupDirectoryMergePage();
void setupKeysPage();
void setupRegionalPage();
void setupIntegrationPage();
void setupOtherOptions();
};
#endif

File diff suppressed because it is too large Load Diff

@ -0,0 +1,579 @@
/***************************************************************************
* Copyright (C) 2005-2007 by Joachim Eibl *
* joachim.eibl at gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "smalldialogs.h"
#include "optiondialog.h"
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qdragobject.h>
#include <qregexp.h>
#include <qtooltip.h>
#include <qpopupmenu.h>
#include <qcursor.h>
#include <kfiledialog.h>
#include <klocale.h>
// OpenDialog **************************************************************
OpenDialog::OpenDialog(
QWidget* pParent, const QString& n1, const QString& n2, const QString& n3,
bool bMerge, const QString& outputName, const char* slotConfigure, OptionDialog* pOptions )
: QDialog( pParent, "OpenDialog", true /*modal*/ )
{
m_pOptions = pOptions;
QVBoxLayout* v = new QVBoxLayout( this, 5 );
QGridLayout* h = new QGridLayout( v, 5, 4, 5 );
h->setColStretch( 1, 10 );
QLabel* label = new QLabel( i18n("A (Base):"), this );
m_pLineA = new QComboBox( true, this );
m_pLineA->insertStringList( m_pOptions->m_recentAFiles );
m_pLineA->setEditText( KURL(n1).prettyURL() );
m_pLineA->setMinimumSize( 200, m_pLineA->size().height() );
QPushButton * button = new QPushButton( i18n("File..."), this );
connect( button, SIGNAL(clicked()), this, SLOT( selectFileA() ) );
QPushButton * button2 = new QPushButton( i18n("Dir..."), this );
connect( button2, SIGNAL(clicked()), this, SLOT( selectDirA() ) );
connect( m_pLineA, SIGNAL(textChanged(const QString&)), this, SLOT(inputFilenameChanged() ) );
h->addWidget( label, 0, 0 );
h->addWidget( m_pLineA, 0, 1 );
h->addWidget( button, 0, 2 );
h->addWidget( button2, 0, 3 );
label = new QLabel( "B:", this );
m_pLineB = new QComboBox( true, this );
m_pLineB->insertStringList( m_pOptions->m_recentBFiles );
m_pLineB->setEditText( KURL(n2).prettyURL() );
m_pLineB->setMinimumSize( 200, m_pLineB->size().height() );
button = new QPushButton( i18n("File..."), this );
connect( button, SIGNAL(clicked()), this, SLOT( selectFileB() ) );
button2 = new QPushButton( i18n("Dir..."), this );
connect( button2, SIGNAL(clicked()), this, SLOT( selectDirB() ) );
connect( m_pLineB, SIGNAL(textChanged(const QString&)), this, SLOT(inputFilenameChanged() ) );
h->addWidget( label, 1, 0 );
h->addWidget( m_pLineB, 1, 1 );
h->addWidget( button, 1, 2 );
h->addWidget( button2, 1, 3 );
label = new QLabel( i18n("C (Optional):"), this );
m_pLineC= new QComboBox( true, this );
m_pLineC->insertStringList( m_pOptions->m_recentCFiles );
m_pLineC->setEditText( KURL(n3).prettyURL() );
m_pLineC->setMinimumSize( 200, m_pLineC->size().height() );
button = new QPushButton( i18n("File..."), this );
connect( button, SIGNAL(clicked()), this, SLOT( selectFileC() ) );
button2 = new QPushButton( i18n("Dir..."), this );
connect( button2, SIGNAL(clicked()), this, SLOT( selectDirC() ) );
connect( m_pLineC, SIGNAL(textChanged(const QString&)), this, SLOT(inputFilenameChanged() ) );
h->addWidget( label, 2, 0 );
h->addWidget( m_pLineC, 2, 1 );
h->addWidget( button, 2, 2 );
h->addWidget( button2, 2, 3 );
m_pMerge = new QCheckBox( i18n("Merge"), this );
h->addWidget( m_pMerge, 3, 0 );
QHBoxLayout* hl = new QHBoxLayout();
h->addLayout( hl, 3, 1 );
hl->addStretch(2);
button = new QPushButton(i18n("Swap/Copy Names ..."), this);
//button->setToggleButton(false);
hl->addWidget( button );
QPopupMenu* m = new QPopupMenu(this);
int id=0;
m->insertItem( i18n("Swap %1<->%2").arg("A").arg("B"), id++ );
m->insertItem( i18n("Swap %1<->%2").arg("B").arg("C"), id++ );
m->insertItem( i18n("Swap %1<->%2").arg("C").arg("A"), id++ );
m->insertItem( i18n("Copy %1->Output").arg("A"), id++ );
m->insertItem( i18n("Copy %1->Output").arg("B"), id++ );
m->insertItem( i18n("Copy %1->Output").arg("C"), id++ );
m->insertItem( i18n("Swap %1<->Output").arg("A"), id++ );
m->insertItem( i18n("Swap %1<->Output").arg("B"), id++ );
m->insertItem( i18n("Swap %1<->Output").arg("C"), id++ );
connect( m, SIGNAL(activated(int)), this, SLOT(slotSwapCopyNames(int)));
button->setPopup(m);
hl->addStretch(2);
label = new QLabel( i18n("Output (optional):"), this );
m_pLineOut = new QComboBox( true, this );
m_pLineOut->insertStringList( m_pOptions->m_recentOutputFiles );
m_pLineOut->setEditText( KURL(outputName).prettyURL() );
m_pLineOut->setMinimumSize( 200, m_pLineOut->size().height() );
button = new QPushButton( i18n("File..."), this );
connect( button, SIGNAL(clicked()), this, SLOT( selectOutputName() ) );
button2 = new QPushButton( i18n("Dir..."), this );
connect( button2, SIGNAL(clicked()), this, SLOT( selectOutputDir() ) );
connect( m_pMerge, SIGNAL(stateChanged(int)), this, SLOT(internalSlot(int)) );
connect( this, SIGNAL(internalSignal(bool)), m_pLineOut, SLOT(setEnabled(bool)) );
connect( this, SIGNAL(internalSignal(bool)), button, SLOT(setEnabled(bool)) );
connect( this, SIGNAL(internalSignal(bool)), button2, SLOT(setEnabled(bool)) );
m_pMerge->setChecked( !bMerge );
m_pMerge->setChecked( bMerge );
// m_pLineOutput->setEnabled( bMerge );
// button->setEnabled( bMerge );
h->addWidget( label, 4, 0 );
h->addWidget( m_pLineOut, 4, 1 );
h->addWidget( button, 4, 2 );
h->addWidget( button2, 4, 3 );
h->addColSpacing( 1, 200 );
QHBoxLayout* l = new QHBoxLayout( v, 5 );
button = new QPushButton( i18n("Configure..."), this );
connect( button, SIGNAL(clicked()), pParent, slotConfigure );
l->addWidget( button, 1 );
l->addStretch(1);
button = new QPushButton( i18n("&OK"), this );
button->setDefault( true );
connect( button, SIGNAL(clicked()), this, SLOT( accept() ) );
l->addWidget( button, 1 );
button = new QPushButton( i18n("&Cancel"), this );
connect( button, SIGNAL(clicked()), this, SLOT( reject() ) );
l->addWidget( button,1 );
QSize sh = sizeHint();
setFixedHeight( sh.height() );
m_bInputFileNameChanged = false;
#ifdef KREPLACEMENTS_H
m_pLineA->lineEdit()->installEventFilter( this );
m_pLineB->lineEdit()->installEventFilter( this );
m_pLineC->lineEdit()->installEventFilter( this );
m_pLineOut->lineEdit()->installEventFilter( this );
#endif
}
// Eventfilter: Only needed under Windows.
// Without this, files dropped in the line edit have URL-encoding.
// This eventfilter decodes the filenames as needed by KDiff3.
bool OpenDialog::eventFilter(QObject* o, QEvent* e)
{
if (e->type()==QEvent::Drop)
{
QDropEvent* d = static_cast<QDropEvent*>(e);
if ( !QUriDrag::canDecode( d ) ) {
return false;
}
QStringList lst;
QUriDrag::decodeLocalFiles( d, lst );
if ( lst.count() > 0 )
{
static_cast<QLineEdit*>(o)->setText( lst[0] );
static_cast<QLineEdit*>(o)->setFocus();
}
return true;
}
return false;
}
void OpenDialog::selectURL( QComboBox* pLine, bool bDir, int i, bool bSave )
{
QString current = pLine->currentText();
if (current.isEmpty() && i>3 ){ current = m_pLineC->currentText(); }
if (current.isEmpty() ){ current = m_pLineB->currentText(); }
if (current.isEmpty() ){ current = m_pLineA->currentText(); }
KURL newURL = bDir ? KFileDialog::getExistingURL( current, this)
: bSave ? KFileDialog::getSaveURL( current, 0, this)
: KFileDialog::getOpenURL( current, 0, this);
if ( !newURL.isEmpty() )
{
pLine->setEditText( newURL.url() );
}
// newURL won't be modified if nothing was selected.
}
void OpenDialog::selectFileA() { selectURL( m_pLineA, false, 1, false ); }
void OpenDialog::selectFileB() { selectURL( m_pLineB, false, 2, false ); }
void OpenDialog::selectFileC() { selectURL( m_pLineC, false, 3, false ); }
void OpenDialog::selectOutputName(){ selectURL( m_pLineOut, false, 4, true ); }
void OpenDialog::selectDirA() { selectURL( m_pLineA, true, 1, false ); }
void OpenDialog::selectDirB() { selectURL( m_pLineB, true, 2, false ); }
void OpenDialog::selectDirC() { selectURL( m_pLineC, true, 3, false ); }
void OpenDialog::selectOutputDir() { selectURL( m_pLineOut, true, 4, true ); }
void OpenDialog::internalSlot(int i)
{
emit internalSignal(i!=0);
}
// Clear the output-filename when any input-filename changed,
// because users forgot to change the output and accidently overwrote it with
// wrong data during a merge.
void OpenDialog::inputFilenameChanged()
{
if(!m_bInputFileNameChanged)
{
m_bInputFileNameChanged=true;
m_pLineOut->clearEdit();
}
}
static void fixCurrentText( QComboBox* pCB )
{
QString s = pCB->currentText();
int pos = s.find( '\n' );
if ( pos>=0 )
s=s.left(pos);
pos = s.find( '\r' );
if ( pos>=0 )
s=s.left(pos);
pCB->setCurrentText( s );
}
void OpenDialog::accept()
{
unsigned int maxNofRecentFiles = 10;
fixCurrentText( m_pLineA );
QString s = m_pLineA->currentText();
s = KURL::fromPathOrURL(s).prettyURL();
QStringList* sl = &m_pOptions->m_recentAFiles;
// If an item exist, remove it from the list and reinsert it at the beginning.
sl->remove(s);
if ( !s.isEmpty() ) sl->prepend( s );
if (sl->count()>maxNofRecentFiles) sl->erase( sl->at(maxNofRecentFiles), sl->end() );
fixCurrentText( m_pLineB );
s = m_pLineB->currentText();
s = KURL::fromPathOrURL(s).prettyURL();
sl = &m_pOptions->m_recentBFiles;
sl->remove(s);
if ( !s.isEmpty() ) sl->prepend( s );
if (sl->count()>maxNofRecentFiles) sl->erase( sl->at(maxNofRecentFiles), sl->end() );
fixCurrentText( m_pLineC );
s = m_pLineC->currentText();
s = KURL::fromPathOrURL(s).prettyURL();
sl = &m_pOptions->m_recentCFiles;
sl->remove(s);
if ( !s.isEmpty() ) sl->prepend( s );
if (sl->count()>maxNofRecentFiles) sl->erase( sl->at(maxNofRecentFiles), sl->end() );
fixCurrentText( m_pLineOut );
s = m_pLineOut->currentText();
s = KURL::fromPathOrURL(s).prettyURL();
sl = &m_pOptions->m_recentOutputFiles;
sl->remove(s);
if ( !s.isEmpty() ) sl->prepend( s );
if (sl->count()>maxNofRecentFiles) sl->erase( sl->at(maxNofRecentFiles), sl->end() );
QDialog::accept();
}
void OpenDialog::slotSwapCopyNames( int id ) // id selected in the popup menu
{
QComboBox* cb1=0;
QComboBox* cb2=0;
switch(id)
{
case 0: cb1=m_pLineA; cb2=m_pLineB; break;
case 1: cb1=m_pLineB; cb2=m_pLineC; break;
case 2: cb1=m_pLineC; cb2=m_pLineA; break;
case 3: cb1=m_pLineA; cb2=m_pLineOut; break;
case 4: cb1=m_pLineB; cb2=m_pLineOut; break;
case 5: cb1=m_pLineC; cb2=m_pLineOut; break;
case 6: cb1=m_pLineA; cb2=m_pLineOut; break;
case 7: cb1=m_pLineB; cb2=m_pLineOut; break;
case 8: cb1=m_pLineC; cb2=m_pLineOut; break;
}
if ( cb1 && cb2 )
{
QString t1 = cb1->currentText();
QString t2 = cb2->currentText();
cb2->setCurrentText(t1);
if ( id<=2 || id>=6 )
{
cb1->setCurrentText( t2 );
}
}
}
// FindDialog *********************************************
FindDialog::FindDialog(QWidget* pParent)
: QDialog( pParent )
{
QGridLayout* layout = new QGridLayout( this );
layout->setMargin(5);
layout->setSpacing(5);
int line=0;
layout->addMultiCellWidget( new QLabel(i18n("Search text:"),this), line,line,0,1 );
++line;
m_pSearchString = new QLineEdit( this );
layout->addMultiCellWidget( m_pSearchString, line,line,0,1 );
++line;
m_pCaseSensitive = new QCheckBox(i18n("Case sensitive"),this);
layout->addWidget( m_pCaseSensitive, line, 1 );
m_pSearchInA = new QCheckBox(i18n("Search A"),this);
layout->addWidget( m_pSearchInA, line, 0 );
m_pSearchInA->setChecked( true );
++line;
m_pSearchInB = new QCheckBox(i18n("Search B"),this);
layout->addWidget( m_pSearchInB, line, 0 );
m_pSearchInB->setChecked( true );
++line;
m_pSearchInC = new QCheckBox(i18n("Search C"),this);
layout->addWidget( m_pSearchInC, line, 0 );
m_pSearchInC->setChecked( true );
++line;
m_pSearchInOutput = new QCheckBox(i18n("Search output"),this);
layout->addWidget( m_pSearchInOutput, line, 0 );
m_pSearchInOutput->setChecked( true );
++line;
QPushButton* pButton = new QPushButton( i18n("&Search"), this );
layout->addWidget( pButton, line, 0 );
connect( pButton, SIGNAL(clicked()), this, SLOT(accept()));
pButton = new QPushButton( i18n("&Cancel"), this );
layout->addWidget( pButton, line, 1 );
connect( pButton, SIGNAL(clicked()), this, SLOT(reject()));
hide();
}
RegExpTester::RegExpTester( QWidget* pParent, const QString& autoMergeRegExpToolTip,
const QString& historyStartRegExpToolTip, const QString& historyEntryStartRegExpToolTip, const QString& historySortKeyOrderToolTip )
: QDialog( pParent)
{
int line=0;
setCaption(i18n("Regular Expression Tester"));
QGridLayout* pGrid = new QGridLayout( this, 11, 2, 5, 5 );
QLabel* l = new QLabel(i18n("Auto merge regular expression:"), this);
pGrid->addWidget(l,line,0);
QToolTip::add( l, autoMergeRegExpToolTip );
m_pAutoMergeRegExpEdit = new QLineEdit(this);
pGrid->addWidget(m_pAutoMergeRegExpEdit,line,1);
connect( m_pAutoMergeRegExpEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotRecalc()));
++line;
l = new QLabel(i18n("Example auto merge line:"), this);
pGrid->addMultiCellWidget(l,line,line,0,1);
QToolTip::add( l, i18n("For auto merge test copy a line as used in your files.") );
m_pAutoMergeExampleEdit = new QLineEdit(this);
pGrid->addWidget(m_pAutoMergeExampleEdit,line,1);
connect( m_pAutoMergeExampleEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotRecalc()));
++line;
l = new QLabel(i18n("Match result:"), this);
pGrid->addWidget(l,line,0);
m_pAutoMergeMatchResult = new QLineEdit(this);
m_pAutoMergeMatchResult->setReadOnly(true);
pGrid->addWidget(m_pAutoMergeMatchResult,line,1);
++line;
pGrid->addItem( new QSpacerItem(100,20), line, 0 );
pGrid->setRowStretch( line, 5);
++line;
l = new QLabel(i18n("History start regular expression:"), this);
pGrid->addWidget(l,line,0);
QToolTip::add( l, historyStartRegExpToolTip );
m_pHistoryStartRegExpEdit = new QLineEdit(this);
pGrid->addWidget(m_pHistoryStartRegExpEdit,line,1);
connect( m_pHistoryStartRegExpEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotRecalc()));
++line;
l = new QLabel(i18n("Example history start line (with leading comment):"), this);
pGrid->addMultiCellWidget(l,line,line,0,1);
++line;
QToolTip::add( l, i18n("Copy a history start line as used in your files,\n"
"including the leading comment.") );
m_pHistoryStartExampleEdit = new QLineEdit(this);
pGrid->addWidget(m_pHistoryStartExampleEdit,line,1);
connect( m_pHistoryStartExampleEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotRecalc()));
++line;
l = new QLabel(i18n("Match result:"), this);
pGrid->addWidget(l,line,0);
m_pHistoryStartMatchResult = new QLineEdit(this);
m_pHistoryStartMatchResult->setReadOnly(true);
pGrid->addWidget(m_pHistoryStartMatchResult,line,1);
++line;
pGrid->addItem( new QSpacerItem(100,20), line, 0 );
pGrid->setRowStretch( line, 5);
++line;
l = new QLabel(i18n("History entry start regular expression:"), this);
pGrid->addWidget(l,line,0);
QToolTip::add( l, historyEntryStartRegExpToolTip );
m_pHistoryEntryStartRegExpEdit = new QLineEdit(this);
pGrid->addWidget(m_pHistoryEntryStartRegExpEdit,line,1);
connect( m_pHistoryEntryStartRegExpEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotRecalc()));
++line;
l = new QLabel(i18n("History sort key order:"), this);
pGrid->addWidget(l,line,0);
QToolTip::add( l, historySortKeyOrderToolTip );
m_pHistorySortKeyOrderEdit = new QLineEdit(this);
pGrid->addWidget(m_pHistorySortKeyOrderEdit,line,1);
connect( m_pHistorySortKeyOrderEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotRecalc()));
++line;
l = new QLabel(i18n("Example history entry start line (without leading comment):"), this);
pGrid->addMultiCellWidget(l,line,line,0,1);
QToolTip::add( l, i18n("Copy a history entry start line as used in your files,\n"
"but omit the leading comment.") );
++line;
m_pHistoryEntryStartExampleEdit = new QLineEdit(this);
pGrid->addWidget(m_pHistoryEntryStartExampleEdit,line,1);
connect( m_pHistoryEntryStartExampleEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotRecalc()));
++line;
l = new QLabel(i18n("Match result:"), this);
pGrid->addWidget(l,line,0);
m_pHistoryEntryStartMatchResult = new QLineEdit(this);
m_pHistoryEntryStartMatchResult->setReadOnly(true);
pGrid->addWidget(m_pHistoryEntryStartMatchResult,line,1);
++line;
l = new QLabel(i18n("Sort key result:"), this);
pGrid->addWidget(l,line,0);
m_pHistorySortKeyResult = new QLineEdit(this);
m_pHistorySortKeyResult->setReadOnly(true);
pGrid->addWidget(m_pHistorySortKeyResult,line,1);
++line;
QPushButton* pButton = new QPushButton(i18n("OK"), this);
pGrid->addWidget(pButton,line,0);
connect( pButton, SIGNAL(clicked()), this, SLOT(accept()));
pButton = new QPushButton(i18n("Cancel"), this);
pGrid->addWidget(pButton,line,1);
connect( pButton, SIGNAL(clicked()), this, SLOT(reject()));
resize( 800, sizeHint().height() );
}
void RegExpTester::init( const QString& autoMergeRegExp, const QString& historyStartRegExp, const QString& historyEntryStartRegExp, const QString historySortKeyOrder )
{
m_pAutoMergeRegExpEdit->setText( autoMergeRegExp );
m_pHistoryStartRegExpEdit->setText( historyStartRegExp );
m_pHistoryEntryStartRegExpEdit->setText( historyEntryStartRegExp );
m_pHistorySortKeyOrderEdit->setText( historySortKeyOrder );
}
QString RegExpTester::autoMergeRegExp()
{
return m_pAutoMergeRegExpEdit->text();
}
QString RegExpTester::historyStartRegExp()
{
return m_pHistoryStartRegExpEdit->text();
}
QString RegExpTester::historyEntryStartRegExp()
{
return m_pHistoryEntryStartRegExpEdit->text();
}
QString RegExpTester::historySortKeyOrder()
{
return m_pHistorySortKeyOrderEdit->text();
}
void RegExpTester::slotRecalc()
{
QRegExp autoMergeRegExp = m_pAutoMergeRegExpEdit->text();
if ( autoMergeRegExp.exactMatch( m_pAutoMergeExampleEdit->text() ) )
{
m_pAutoMergeMatchResult->setText( i18n("Match success.") );
}
else
{
m_pAutoMergeMatchResult->setText( i18n("Match failed.") );
}
QRegExp historyStartRegExp = m_pHistoryStartRegExpEdit->text();
if ( historyStartRegExp.exactMatch( m_pHistoryStartExampleEdit->text() ) )
{
m_pHistoryStartMatchResult->setText( i18n("Match success.") );
}
else
{
m_pHistoryStartMatchResult->setText( i18n("Match failed.") );
}
QStringList parenthesesGroups;
bool bSuccess = findParenthesesGroups( m_pHistoryEntryStartRegExpEdit->text(), parenthesesGroups );
if ( ! bSuccess )
{
m_pHistoryEntryStartMatchResult->setText( i18n("Opening and closing parentheses don't match in regular expression.") );
m_pHistorySortKeyResult->setText( i18n("") );
return;
}
QRegExp historyEntryStartRegExp = m_pHistoryEntryStartRegExpEdit->text();
QString s = m_pHistoryEntryStartExampleEdit->text();
if ( historyEntryStartRegExp.exactMatch( s ) )
{
m_pHistoryEntryStartMatchResult->setText( i18n("Match success.") );
QString key = calcHistorySortKey( m_pHistorySortKeyOrderEdit->text(),historyEntryStartRegExp,parenthesesGroups);
m_pHistorySortKeyResult->setText(key);
}
else
{
m_pHistoryEntryStartMatchResult->setText( i18n("Match failed.") );
m_pHistorySortKeyResult->setText( i18n("") );
}
}
#include "smalldialogs.moc"

@ -0,0 +1,120 @@
/***************************************************************************
* Copyright (C) 2005 by Joachim Eibl *
* joachim.eibl at gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef SMALLDIALOGS_H
#define SMALLDIALOGS_H
#include <qdialog.h>
#include "diff.h"
class OptionDialog;
class QComboBox;
class QCheckBox;
class QLineEdit;
class QLabel;
class OpenDialog : public QDialog
{
Q_OBJECT
public:
OpenDialog(
QWidget* pParent, const QString& n1, const QString& n2, const QString& n3,
bool bMerge, const QString& outputName, const char* slotConfigure, OptionDialog* pOptions );
QComboBox* m_pLineA;
QComboBox* m_pLineB;
QComboBox* m_pLineC;
QComboBox* m_pLineOut;
QCheckBox* m_pMerge;
virtual void accept();
virtual bool eventFilter(QObject* o, QEvent* e);
private:
OptionDialog* m_pOptions;
void selectURL( QComboBox* pLine, bool bDir, int i, bool bSave );
bool m_bInputFileNameChanged;
private slots:
void selectFileA();
void selectFileB();
void selectFileC();
void selectDirA();
void selectDirB();
void selectDirC();
void selectOutputName();
void selectOutputDir();
void internalSlot(int);
void inputFilenameChanged();
void slotSwapCopyNames(int);
signals:
void internalSignal(bool);
};
class FindDialog : public QDialog
{
Q_OBJECT
public:
FindDialog(QWidget* pParent);
signals:
void findNext();
public:
QLineEdit* m_pSearchString;
QCheckBox* m_pSearchInA;
QCheckBox* m_pSearchInB;
QCheckBox* m_pSearchInC;
QCheckBox* m_pSearchInOutput;
QCheckBox* m_pCaseSensitive;
int currentLine;
int currentPos;
int currentWindow;
};
class RegExpTester : public QDialog
{
Q_OBJECT
private:
QLineEdit* m_pAutoMergeRegExpEdit;
QLineEdit* m_pAutoMergeMatchResult;
QLineEdit* m_pAutoMergeExampleEdit;
QLineEdit* m_pHistoryStartRegExpEdit;
QLineEdit* m_pHistoryStartMatchResult;
QLineEdit* m_pHistoryStartExampleEdit;
QLineEdit* m_pHistoryEntryStartRegExpEdit;
QLineEdit* m_pHistorySortKeyOrderEdit;
QLineEdit* m_pHistoryEntryStartExampleEdit;
QLineEdit* m_pHistoryEntryStartMatchResult;
QLineEdit* m_pHistorySortKeyResult;
OptionDialog* m_pOptionDialog;
public:
RegExpTester( QWidget* pParent, const QString& autoMergeRegExpToolTip, const QString& historyStartRegExpToolTip,
const QString& historyEntryStartRegExpToolTip, const QString& historySortKeyOrderToolTip );
void init( const QString& autoMergeRegExp, const QString& historyStartRegExp, const QString& historyEntryStartRegExp, const QString sortKeyOrder );
QString autoMergeRegExp();
QString historyStartRegExp();
QString historyEntryStartRegExp();
QString historySortKeyOrder();
public slots:
void slotRecalc();
};
#endif

@ -0,0 +1,2 @@
#undef VERSION
#define VERSION "0.9.92"

@ -0,0 +1,25 @@
/* XPM */
static const char *autoadvance[] = {
/* columns rows colors chars-per-pixel */
"16 16 3 1",
". c #0080FF",
"# c #000000",
" c None",
/* pixels */
" ## # # ### # ",
"# # # # # # #",
"# # # # # # #",
"#### # # # # #",
"# # ### # # ",
" ",
" ",
" ######## ",
" #....# ",
" #..# ",
" ## ",
" ######## ",
" #....# ",
" #..# ",
" ## ",
" "
};

@ -0,0 +1,22 @@
/* XPM */
static const char *currentpos[]={
"16 16 3 1",
" c #0080FF",
"# c #000000",
". c None",
"................",
"................",
"................",
".#............#.",
".##..........##.",
".# #........# #.",
".# #..##..# #.",
".# ## ## #.",
".# # # #.",
".# ## ## #.",
".# #..##..# #.",
".# #........# #.",
".##..........##.",
".#............#.",
"................",
"................"};

@ -0,0 +1,25 @@
/* XPM */
static const char *down1arrow[] = {
/* columns rows colors chars-per-pixel */
"16 16 3 1",
" c #0080ff",
"# c #000000",
". c None",
/* pixels */
"................",
"................",
"................",
"................",
"................",
"..############..",
"...# #...",
"....# #....",
".....# #.....",
"......# #......",
".......##.......",
"................",
"................",
"................",
"................",
"................"
};

@ -0,0 +1,25 @@
/* XPM */
static const char *down2arrow[] = {
/* columns rows colors chars-per-pixel */
"16 16 3 1",
" c #0080ff",
"# c #000000",
". c None",
/* pixels */
"................",
"................",
"..############..",
"...# #...",
"....# #....",
".....# #.....",
"......# #......",
".......##.......",
"..############..",
"...# #...",
"....# #....",
".....# #.....",
"......# #......",
".......##.......",
"................",
"................"
};

@ -0,0 +1,22 @@
/* XPM */
static const char *downend[]={
"16 16 3 1",
" c #0080ff",
"# c #000000",
". c None",
"................",
"................",
"................",
"................",
"................",
"..############..",
"...# #...",
"....# #....",
".....# #.....",
"......# #......",
".......##.......",
"..############..",
"................",
"................",
"................",
"................"};

@ -0,0 +1,24 @@
/* XPM */
static const char *file_pm[]={
"16 16 5 1",
". c None",
"# c #000000",
"c c #c0c0c0",
"b c #dcdcdc",
"a c #ffffff",
"..#########.....",
"..#aaaaaabb#....",
"..#aaaaaacab#...",
"..#aaaaaacaab#..",
"..#aaaaaac####..",
"..#aaaaaaaccc#..",
"..#aaaaaaaaaa#..",
"..#aaaaaaaaaa#..",
"..#aaaaaaaaaa#..",
"..#aaaaaaaaaa#..",
"..#aaaaaaaaaa#..",
"..#aaaaaaaaaa#..",
"..#aaaaaaaaaa#..",
"..#aaaaaaaaaa#..",
"..#aaaaaaaaaa#..",
"..############.."};

@ -0,0 +1,22 @@
/* XPM */
static const char * filenew[] = {
"10 14 5 1",
" c None",
". c #000000",
"+ c #FFFFFF",
"@ c #DCDCDC",
"# c #C0C0C0",
"....... ",
".++++@@. ",
".++++#+@. ",
".++++#++@.",
".++++#....",
".+++++###.",
".++++++++.",
".++++++++.",
".++++++++.",
".++++++++.",
".++++++++.",
".++++++++.",
".++++++++.",
".........."};

@ -0,0 +1,22 @@
/* XPM */
static const char *fileopen[] = {
" 16 13 5 1",
". c #040404",
"# c #808304",
"a c None",
"b c #f3f704",
"c c #f3f7f3",
"aaaaaaaaa...aaaa",
"aaaaaaaa.aaa.a.a",
"aaaaaaaaaaaaa..a",
"a...aaaaaaaa...a",
".bcb.......aaaaa",
".cbcbcbcbc.aaaaa",
".bcbcbcbcb.aaaaa",
".cbcb...........",
".bcb.#########.a",
".cb.#########.aa",
".b.#########.aaa",
"..#########.aaaa",
"...........aaaaa"
};

@ -0,0 +1,24 @@
/* XPM */
static const char *fileprint[] = {
" 16 14 6 1",
". c #000000",
"# c #848284",
"a c #c6c3c6",
"b c #ffff00",
"c c #ffffff",
"d c None",
"ddddd.........dd",
"dddd.cccccccc.dd",
"dddd.c.....c.ddd",
"ddd.cccccccc.ddd",
"ddd.c.....c....d",
"dd.cccccccc.a.a.",
"d..........a.a..",
".aaaaaaaaaa.a.a.",
".............aa.",
".aaaaaa###aa.a.d",
".aaaaaabbbaa...d",
".............a.d",
"d.aaaaaaaaa.a.dd",
"dd...........ddd"
};

@ -0,0 +1,21 @@
/* XPM */
static const char *filesave[] = {
" 14 14 3 1",
". c #040404",
"# c #808304",
"a c #bfc2bf",
"..............",
".#.aaaaaaaa.a.",
".#.aaaaaaaa...",
".#.aaaaaaaa.#.",
".#.aaaaaaaa.#.",
".#.aaaaaaaa.#.",
".#.aaaaaaaa.#.",
".##........##.",
".############.",
".##.........#.",
".##......aa.#.",
".##......aa.#.",
".##......aa.#.",
"a............."
};

@ -0,0 +1,24 @@
/* XPM */
static const char *folder_pm[]={
"16 16 5 1",
". c None",
"# c #040404",
"c c #808304",
"a c #f3f704",
"b c #f3f7f3",
"................",
"................",
"................",
".###............",
"#aba#######.....",
"#babababab#.....",
"#ababababa#.....",
"#baba###########",
"#aba#ccccccccc#.",
"#ba#ccccccccc#..",
"#a#ccccccccc#...",
"##ccccccccc#....",
"###########.....",
"................",
"................",
"................"};

@ -0,0 +1,22 @@
/* XPM */
static const char *iconA[]={
"16 16 3 1",
" c #0080FF",
"# c #000000",
". c None",
"................",
"................",
"......###.......",
".....# #......",
"....# # #.....",
"...# #.# #....",
"...# #...# #....",
"...# #...# #....",
"...# ##### #....",
"...# #....",
"...# ##### #....",
"...# #...# #....",
"...###...###....",
"................",
"................",
"................"};

@ -0,0 +1,22 @@
/* XPM */
static const char *iconB[]={
"16 16 3 1",
" c #0080FF",
"# c #000000",
". c None",
"................",
"................",
"...#######......",
"...# #.....",
"...# #### #....",
"...# #...# #....",
"...# #### #....",
"...# #.....",
"...# #### #....",
"...# #...# #....",
"...# #### #....",
"...# #.....",
"...#######......",
"................",
"................",
"................"};

@ -0,0 +1,22 @@
/* XPM */
static const char *iconC[]={
"16 16 3 1",
" c #0080FF",
"# c #000000",
". c None",
"................",
"................",
"......####......",
".....# #.....",
"....# ### #....",
"...# #...##....",
"...# #..........",
"...# #..........",
"...# #..........",
"...# #..........",
"...# #...##....",
"....# ### #....",
".....# #.....",
"......####......",
"................",
"................"};

@ -0,0 +1,24 @@
/* XPM */
static const char *link_arrow[]={
"16 16 5 1",
". c None",
"b c #000000",
"# c #585858",
"c c #dcdcdc",
"a c #ffffff",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"########........",
"#aaaaaab........",
"#aabbbab........",
"#aac#bab........",
"#acbcbab........",
"#abcaaab........",
"#aaaaaab........",
"#bbbbbbb........"};

@ -0,0 +1,23 @@
/* XPM */
static const char *nextunsolved[]={
"16 16 4 1",
". c None",
" c #0080ff",
"# c #000000",
"a c #ff0000",
"..############..",
"...# #...",
"....# #....",
".....# #.....",
"......# #......",
"..############..",
"...# #...",
"....# #....",
".....# #.....",
"......# #......",
"..############..",
"...#aaaaaaaa#...",
"....#aaaaaa#....",
".....#aaaa#.....",
"......#aa#......",
".......##......."};

@ -0,0 +1,23 @@
/* XPM */
static const char *prevunsolved[]={
"16 16 4 1",
" c #0080ff",
"# c #000000",
"a c #ff0000",
". c None",
".......##.......",
"......#aa#......",
".....#aaaa#.....",
"....#aaaaaa#....",
"...#aaaaaaaa#...",
"..############..",
"......# #......",
".....# #.....",
"....# #....",
"...# #...",
"..############..",
"......# #......",
".....# #.....",
"....# #....",
"...# #...",
"..############.."};

@ -0,0 +1,74 @@
/* XPM */
static const char *reloadIcon[]={
"16 16 55 1",
". c None",
"e c #25502a",
"# c #25512b",
"d c #25522b",
"g c #26552c",
"c c #27562e",
"n c #27582f",
"b c #28592e",
"M c #285930",
"a c #295a2f",
"q c #295a30",
"G c #295c31",
"t c #2a5e31",
"y c #2b6635",
"U c #2b6636",
"Q c #2f703a",
"H c #327b3d",
"0 c #36843f",
"W c #388943",
"u c #3f7046",
"r c #42764a",
"f c #44754b",
"A c #488653",
"N c #50995b",
"K c #529d5f",
"J c #529f60",
"m c #53885c",
"l c #55a161",
"B c #57a863",
"R c #5aaa66",
"I c #5aad69",
"v c #5baa67",
"X c #5cb16b",
"o c #5db469",
"k c #5eb56c",
"z c #5eb66b",
"s c #5fb26d",
"V c #64b171",
"Y c #64c274",
"j c #69c779",
"Z c #6dc97d",
"p c #729a77",
"O c #73c782",
"i c #7ace89",
"w c #7bce89",
"C c #7ecb8b",
"L c #80d191",
"h c #80d193",
"S c #8dd49b",
"P c #95d8a1",
"D c #a7ddb1",
"x c #bde3c2",
"T c #c0e5c5",
"E c #daf0de",
"F c #f9fdf9",
"................",
"..#abcde#df.....",
"..ghhhijklm.....",
"..nhoooooop.....",
"..qho....rso....",
"..tho...uvwxo...",
"..yhz..ABCDEFo..",
"gGHhIJJAAKLooo..",
"MNOPEFo..Qho....",
".eRSTo...Uho....",
"..eV.....Uho....",
"...W.....Qho....",
"....nXYZihho....",
"....0ooooooo....",
"................",
"................"};

@ -0,0 +1,23 @@
/* XPM */
static const char *showequalfiles[]={
"16 16 4 1",
"# c None",
"a c None",
". c #000000",
"b c #00ff00",
"...........##aaa",
".bbbb.bbbb.##aaa",
".bbbb.bbbb.##aaa",
".bbbb.bbbb.##aaa",
".bbbb.bbbb.##aaa",
"...........##aaa",
"aaaaaaaaaaaaaaaa",
"................",
"aaaaaaaaaaaaaaaa",
"................",
".bbbb.bbbb.bbbb.",
".bbbb.bbbb.bbbb.",
".bbbb.bbbb.bbbb.",
".bbbb.bbbb.bbbb.",
"................",
"aaaaaaaaaaaaaaaa"};

@ -0,0 +1,23 @@
/* XPM */
static const char *showfilesonlyina[]={
"16 16 4 1",
"# c None",
"a c None",
". c #000000",
"b c #00ff00",
"...........##aaa",
".bbbb......##aaa",
".bbbb......##aaa",
".bbbb......##aaa",
".bbbb......##aaa",
"...........##aaa",
"aaaaaaaaaaaaaaaa",
"................",
"aaaaaaaaaaaaaaaa",
"................",
".bbbb...........",
".bbbb...........",
".bbbb...........",
".bbbb...........",
"................",
"aaaaaaaaaaaaaaaa"};

@ -0,0 +1,23 @@
/* XPM */
static const char *showfilesonlyinb[]={
"16 16 4 1",
"# c None",
"a c None",
". c #000000",
"b c #00ff00",
"...........##aaa",
"......bbbb.##aaa",
"......bbbb.##aaa",
"......bbbb.##aaa",
"......bbbb.##aaa",
"...........##aaa",
"aaaaaaaaaaaaaaaa",
"................",
"aaaaaaaaaaaaaaaa",
"................",
"......bbbb......",
"......bbbb......",
"......bbbb......",
"......bbbb......",
"................",
"aaaaaaaaaaaaaaaa"};

@ -0,0 +1,22 @@
/* XPM */
static const char *showfilesonlyinc[]={
"16 16 3 1",
". c None",
"# c #000000",
"a c #00ff00",
"................",
"................",
"................",
"................",
"................",
"################",
"###########aaaa#",
"###########aaaa#",
"###########aaaa#",
"###########aaaa#",
"################",
"................",
"................",
"................",
"................",
"................"};

@ -0,0 +1,21 @@
/* XPM */
static const char *showlinenumbers[]={
"16 16 2 1",
". c None",
"# c #000040",
"................",
"................",
"................",
"................",
"...#...##..###..",
"..##..#..#....#.",
"...#.....#....#.",
"...#....#...##..",
"...#...#......#.",
"...#..#.......#.",
"..###.####.###..",
"................",
"................",
"................",
"................",
"................"};

@ -0,0 +1,22 @@
/* XPM */
static const char *showwhitespace[]={
"16 16 3 1",
". c None",
"# c #000000",
"a c #ffffff",
"................",
"................",
"..############..",
"..#aaaaaaaaaa#..",
"..#aaaaaaaaaa#..",
"..#aaaaaaaaaa#..",
"..#aaaaaaaaaa#..",
"..#aaaaaaaaaa#..",
"..#aaaaaaaaaa#..",
"..#aaaaaaaaaa#..",
"..#aaaaaaaaaa#..",
"..#aaaaaaaaaa#..",
"..#aaaaaaaaaa#..",
"..############..",
"................",
"................"};

@ -0,0 +1,21 @@
/* XPM */
static const char *showwhitespacechars[]={
"16 16 2 1",
". c None",
"# c #000040",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
"................",
".####.####.####.",
".####.####.####.",
"................",
"................",
"................",
"................"};

@ -0,0 +1,25 @@
/* XPM */
static const char *startmerge[]={
"16 16 6 1",
". c None",
"# c #000000",
"b c #0000ff",
"c c #00ffff",
"d c #ff0000",
"a c #ffff00",
".......##.......",
"......#aa#......",
"......#aa#......",
"...b.b.##.b.b...",
"...bb......bb...",
"...bbb....bbb...",
".##..........##.",
"#cc#........#cc#",
"#cc#........#cc#",
".##.b.b..b.b.##.",
".....bb..bb.....",
"....bbb..bbb....",
".......##.......",
"......#dd#......",
"......#dd#......",
".......##......."};

@ -0,0 +1,22 @@
/* XPM */
static const char *up1arrow[]={
"16 16 3 1",
". c None",
"# c #000000",
"a c #0080ff",
"................",
"................",
"................",
"................",
"................",
".......##.......",
"......#aa#......",
".....#aaaa#.....",
"....#aaaaaa#....",
"...#aaaaaaaa#...",
"..############..",
"................",
"................",
"................",
"................",
"................"};

@ -0,0 +1,25 @@
/* XPM */
static const char *up2arrow[] = {
/* columns rows colors chars-per-pixel */
"16 16 3 1",
" c #0080ff",
"# c #000000",
". c None",
/* pixels */
"................",
"................",
".......##.......",
"......# #......",
".....# #.....",
"....# #....",
"...# #...",
"..############..",
".......##.......",
"......# #......",
".....# #.....",
"....# #....",
"...# #...",
"..############..",
"................",
"................"
};

@ -0,0 +1,22 @@
/* XPM */
static const char *upend[]={
"16 16 3 1",
" c #0080ff",
"# c #000000",
". c None",
"................",
"................",
"................",
"................",
"..############..",
".......##.......",
"......# #......",
".....# #.....",
"....# #....",
"...# #...",
"..############..",
"................",
"................",
"................",
"................",
"................"};

@ -0,0 +1,4 @@
doc
kdiff3plugin
po
src

@ -0,0 +1,19 @@
/***************************************************************************
* Copyright (C) 2005 by Joachim Eibl *
* joachim.eibl@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/

@ -0,0 +1,24 @@
/***************************************************************************
* Copyright (C) 2005 by Joachim Eibl *
* joachim.eibl@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef
#define
#endif
Loading…
Cancel
Save