<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<refentry xml:id="function.xdiff-file-merge3" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>xdiff_file_merge3</refname>
  <refpurpose>Merge 3 files into one</refpurpose>
 </refnamediv>
 
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>mixed</type><methodname>xdiff_file_merge3</methodname>
   <methodparam><type>string</type><parameter>old_file</parameter></methodparam>
   <methodparam><type>string</type><parameter>new_file1</parameter></methodparam>
   <methodparam><type>string</type><parameter>new_file2</parameter></methodparam>
   <methodparam><type>string</type><parameter>dest</parameter></methodparam>
  </methodsynopsis>
  <para>
   Merges three files into one and stores the result in a file <parameter>dest</parameter>. 
   The <parameter>old_file</parameter> is an original version while <parameter>new_file1</parameter>
   and <parameter>new_file2</parameter> are modified versions of an original.   
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>old_file</parameter></term>
     <listitem>
      <para>
       Path to the first file. It acts as "old" file.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>new_file1</parameter></term>
     <listitem>
      <para>
       Path to the second file. It acts as modified version of <parameter>old_file</parameter>.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>new_file2</parameter></term>
     <listitem>
      <para>
       Path to the third file. It acts as modified version of <parameter>old_file</parameter>.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>dest</parameter></term>
     <listitem>
      <para>
       Path of the resulting file, containing merged changed from both <parameter>new_file1</parameter> and
       <parameter>new_file2</parameter>.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns &true; if merge was successful, string with rejected chunks if
   it was not or &false; if an internal error happened.
  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title><function>xdiff_file_merge3</function> example</title>
    <para>
     The following code merges three files into one.
    </para>
    <programlisting role="php">
<![CDATA[
<?php
$old_version = 'original_script.php';
$fix1 = 'script_with_fix1.php';
$fix2 = 'script_with_fix2.php';

$errors = xdiff_file_merge3($old_version, $fix1, $fix2, 'fixed_script.php');
if (is_string($errors)) {
    echo "Rejects:\n";
    echo $errors;
}
?>
]]>
    </programlisting>
   </example>
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>xdiff_string_merge3</function></member>
   </simplelist>
  </para>
 </refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
