+/**\r
+ * @copyright\r
+ * ====================================================================\r
+ * Copyright (c) 2000-2008 CollabNet. All rights reserved.\r
+ *\r
+ * This software is licensed as described in the file COPYING, which\r
+ * you should have received as part of this distribution. The terms\r
+ * are also available at http://subversion.tigris.org/license-1.html.\r
+ * If newer versions of this license are posted there, you may use a\r
+ * newer version instead, at your option.\r
+ *\r
+ * This software consists of voluntary contributions made by many\r
+ * individuals. For exact contribution history, see the revision\r
+ * history and logs, available at http://subversion.tigris.org/.\r
+ * ====================================================================\r
+ * @endcopyright\r
+ *\r
+ * @file svn_diff.h\r
+ * @brief Contextual diffing.\r
+ *\r
+ * This is an internalized library for performing contextual diffs\r
+ * between sources of data.\r
+ *\r
+ * @note This is different than Subversion's binary-diffing engine.\r
+ * That API lives in @c svn_delta.h -- see the "text deltas" section. A\r
+ * "text delta" is way of representing precise binary diffs between\r
+ * strings of data. The Subversion client and server send text deltas\r
+ * to one another during updates and commits.\r
+ *\r
+ * This API, however, is (or will be) used for performing *contextual*\r
+ * merges between files in the working copy. During an update or\r
+ * merge, 3-way file merging is needed. And 'svn diff' needs to show\r
+ * the differences between 2 files.\r
+ *\r
+ * The nice thing about this API is that it's very general. It\r
+ * operates on any source of data (a "datasource") and calculates\r
+ * contextual differences on "tokens" within the data. In our\r
+ * particular usage, the datasources are files and the tokens are\r
+ * lines. But the possibilities are endless.\r
+ */\r
+\r
+\r
+#ifndef SVN_DIFF_H\r
+#define SVN_DIFF_H\r
+\r
+#include <apr.h>\r
+#include <apr_pools.h>\r
+#include <apr_file_io.h>\r
+\r
+#include "svn_types.h"\r
+#include "svn_error.h"\r
+#include "svn_pools.h"\r
+//#include "svn_version.h"\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif /* __cplusplus */\r
+\r
+\r
+\r
+/**\r
+ * Get libsvn_diff version information.\r
+ *\r
+ * @since New in 1.1.\r
+ */\r
+const svn_version_t *\r
+svn_diff_version(void);\r
+\r
+\r
+/* Diffs. */\r
+\r
+/** An opaque type that represents a difference between either two or\r
+ * three datasources. This object is returned by svn_diff_diff(),\r
+ * svn_diff_diff3() and svn_diff_diff4(), and consumed by a number of\r
+ * other routines.\r
+ */\r
+typedef struct svn_diff_t svn_diff_t;\r
+\r
+/**\r
+ * There are four types of datasources. In GNU diff3 terminology,\r
+ * the first three types correspond to the phrases "older", "mine",\r
+ * and "yours".\r
+ */\r
+typedef enum svn_diff_datasource_e\r
+{\r
+ /** The oldest form of the data. */\r
+ svn_diff_datasource_original,\r
+\r
+ /** The same data, but potentially changed by the user. */\r
+ svn_diff_datasource_modified,\r
+\r
+ /** The latest version of the data, possibly different than the\r
+ * user's modified version.\r
+ */\r
+ svn_diff_datasource_latest,\r
+\r
+ /** The common ancestor of original and modified. */\r
+ svn_diff_datasource_ancestor\r
+\r
+} svn_diff_datasource_e;\r
+\r
+\r
+/** A vtable for reading data from the three datasources. */\r
+typedef struct svn_diff_fns_t\r
+{\r
+ /** Open the datasource of type @a datasource. */\r
+ svn_error_t *(*datasource_open)(void *diff_baton,\r
+ svn_diff_datasource_e datasource);\r
+\r
+ /** Close the datasource of type @a datasource. */\r
+ svn_error_t *(*datasource_close)(void *diff_baton,\r
+ svn_diff_datasource_e datasource);\r
+\r
+ /** Get the next "token" from the datasource of type @a datasource.\r
+ * Return a "token" in @a *token. Return a hash of "token" in @a *hash.\r
+ * Leave @a token and @a hash untouched when the datasource is exhausted.\r
+ */\r
+ svn_error_t *(*datasource_get_next_token)(apr_uint32_t *hash, void **token,\r
+ void *diff_baton,\r
+ svn_diff_datasource_e datasource);\r
+\r
+ /** A function for ordering the tokens, resembling 'strcmp' in functionality.\r
+ * @a compare should contain the return value of the comparison:\r
+ * If @a ltoken and @a rtoken are "equal", return 0. If @a ltoken is\r
+ * "less than" @a rtoken, return a number < 0. If @a ltoken is\r
+ * "greater than" @a rtoken, return a number > 0.\r
+ */\r
+ svn_error_t *(*token_compare)(void *diff_baton,\r
+ void *ltoken,\r
+ void *rtoken,\r
+ int *compare);\r
+\r
+ /** Free @a token from memory, the diff algorithm is done with it. */\r
+ void (*token_discard)(void *diff_baton,\r
+ void *token);\r
+\r
+ /** Free *all* tokens from memory, they're no longer needed. */\r
+ void (*token_discard_all)(void *diff_baton);\r
+} svn_diff_fns_t;\r
+\r
+\r
+/* The Main Events */\r
+\r
+/** Given a vtable of @a diff_fns/@a diff_baton for reading datasources,\r
+ * return a diff object in @a *diff that represents a difference between\r
+ * an "original" and "modified" datasource. Do all allocation in @a pool.\r
+ */\r
+svn_error_t *\r
+svn_diff_diff(svn_diff_t **diff,\r
+ void *diff_baton,\r
+ const svn_diff_fns_t *diff_fns,\r
+ apr_pool_t *pool);\r
+\r
+/** Given a vtable of @a diff_fns/@a diff_baton for reading datasources,\r
+ * return a diff object in @a *diff that represents a difference between\r
+ * three datasources: "original", "modified", and "latest". Do all\r
+ * allocation in @a pool.\r
+ */\r
+svn_error_t *\r
+svn_diff_diff3(svn_diff_t **diff,\r
+ void *diff_baton,\r
+ const svn_diff_fns_t *diff_fns,\r
+ apr_pool_t *pool);\r
+\r
+/** Given a vtable of @a diff_fns/@a diff_baton for reading datasources,\r
+ * return a diff object in @a *diff that represents a difference between\r
+ * two datasources: "original" and "latest", adjusted to become a full\r
+ * difference between "original", "modified" and "latest" using "ancestor".\r
+ * Do all allocation in @a pool.\r
+ */\r
+svn_error_t *\r
+svn_diff_diff4(svn_diff_t **diff,\r
+ void *diff_baton,\r
+ const svn_diff_fns_t *diff_fns,\r
+ apr_pool_t *pool);\r
+\r
+\f\r
+/* Utility functions */\r
+\r
+/** Determine if a diff object contains conflicts. If it does, return\r
+ * @c TRUE, else return @c FALSE.\r
+ */\r
+svn_boolean_t\r
+svn_diff_contains_conflicts(svn_diff_t *diff);\r
+\r
+\r
+/** Determine if a diff object contains actual differences between the\r
+ * datasources. If so, return @c TRUE, else return @c FALSE.\r
+ */\r
+svn_boolean_t\r
+svn_diff_contains_diffs(svn_diff_t *diff);\r
+\r
+\r
+\r
+\f\r
+/* Displaying Diffs */\r
+\r
+/** A vtable for displaying (or consuming) differences between datasources.\r
+ *\r
+ * Differences, similarities, and conflicts are described by lining up\r
+ * "ranges" of data.\r
+ *\r
+ * @note These callbacks describe data ranges in units of "tokens".\r
+ * A "token" is whatever you've defined it to be in your datasource\r
+ * @c svn_diff_fns_t vtable.\r
+ */\r
+typedef struct svn_diff_output_fns_t\r
+{\r
+ /* Two-way and three-way diffs both call the first two output functions: */\r
+\r
+ /**\r
+ * If doing a two-way diff, then an *identical* data range was found\r
+ * between the "original" and "modified" datasources. Specifically,\r
+ * the match starts at @a original_start and goes for @a original_length\r
+ * tokens in the original data, and at @a modified_start for\r
+ * @a modified_length tokens in the modified data.\r
+ *\r
+ * If doing a three-way diff, then all three datasources have\r
+ * matching data ranges. The range @a latest_start, @a latest_length in\r
+ * the "latest" datasource is identical to the range @a original_start,\r
+ * @a original_length in the original data, and is also identical to\r
+ * the range @a modified_start, @a modified_length in the modified data.\r
+ */\r
+ svn_error_t *(*output_common)(void *output_baton,\r
+ apr_off_t original_start,\r
+ apr_off_t original_length,\r
+ apr_off_t modified_start,\r
+ apr_off_t modified_length,\r
+ apr_off_t latest_start,\r
+ apr_off_t latest_length);\r
+\r
+ /**\r
+ * If doing a two-way diff, then an *conflicting* data range was found\r
+ * between the "original" and "modified" datasources. Specifically,\r
+ * the conflict starts at @a original_start and goes for @a original_length\r
+ * tokens in the original data, and at @a modified_start for\r
+ * @a modified_length tokens in the modified data.\r
+ *\r
+ * If doing a three-way diff, then an identical data range was discovered\r
+ * between the "original" and "latest" datasources, but this conflicts with\r
+ * a range in the "modified" datasource.\r
+ */\r
+ svn_error_t *(*output_diff_modified)(void *output_baton,\r
+ apr_off_t original_start,\r
+ apr_off_t original_length,\r
+ apr_off_t modified_start,\r
+ apr_off_t modified_length,\r
+ apr_off_t latest_start,\r
+ apr_off_t latest_length);\r
+\r
+ /* ------ The following callbacks are used by three-way diffs only --- */\r
+\r
+ /** An identical data range was discovered between the "original" and\r
+ * "modified" datasources, but this conflicts with a range in the\r
+ * "latest" datasource.\r
+ */\r
+ svn_error_t *(*output_diff_latest)(void *output_baton,\r
+ apr_off_t original_start,\r
+ apr_off_t original_length,\r
+ apr_off_t modified_start,\r
+ apr_off_t modified_length,\r
+ apr_off_t latest_start,\r
+ apr_off_t latest_length);\r
+\r
+ /** An identical data range was discovered between the "modified" and\r
+ * "latest" datasources, but this conflicts with a range in the\r
+ * "original" datasource.\r
+ */\r
+ svn_error_t *(*output_diff_common)(void *output_baton,\r
+ apr_off_t original_start,\r
+ apr_off_t original_length,\r
+ apr_off_t modified_start,\r
+ apr_off_t modified_length,\r
+ apr_off_t latest_start,\r
+ apr_off_t latest_length);\r
+\r
+ /** All three datasources have conflicting data ranges. The range\r
+ * @a latest_start, @a latest_length in the "latest" datasource conflicts\r
+ * with the range @a original_start, @a original_length in the "original"\r
+ * datasource, and also conflicts with the range @a modified_start,\r
+ * @a modified_length in the "modified" datasource.\r
+ * If there are common ranges in the "modified" and "latest" datasources\r
+ * in this conflicting range, @a resolved_diff will contain a diff\r
+ * which can be used to retrieve the common and conflicting ranges.\r
+ */\r
+ svn_error_t *(*output_conflict)(void *output_baton,\r
+ apr_off_t original_start,\r
+ apr_off_t original_length,\r
+ apr_off_t modified_start,\r
+ apr_off_t modified_length,\r
+ apr_off_t latest_start,\r
+ apr_off_t latest_length,\r
+ svn_diff_t *resolved_diff);\r
+} svn_diff_output_fns_t;\r
+\r
+/** Style for displaying conflicts during diff3 output.\r
+ *\r
+ * @since New in 1.6.\r
+ */\r
+typedef enum svn_diff_conflict_display_style_t\r
+{\r
+ /** Display modified and latest, with conflict markers. */\r
+ svn_diff_conflict_display_modified_latest,\r
+\r
+ /** Like svn_diff_conflict_display_modified_latest, but with an\r
+ extra effort to identify common sequences between modified and\r
+ latest. */\r
+ svn_diff_conflict_display_resolved_modified_latest,\r
+\r
+ /** Display modified, original, and latest, with conflict\r
+ markers. */\r
+ svn_diff_conflict_display_modified_original_latest,\r
+\r
+ /** Just display modified, with no markers. */\r
+ svn_diff_conflict_display_modified,\r
+\r
+ /** Just display latest, with no markers. */\r
+ svn_diff_conflict_display_latest,\r
+\r
+ /** Like svn_diff_conflict_display_modified_original_latest, but\r
+ *only* showing conflicts. */\r
+ svn_diff_conflict_display_only_conflicts\r
+} svn_diff_conflict_display_style_t;\r
+\r
+\r
+/** Given a vtable of @a output_fns/@a output_baton for consuming\r
+ * differences, output the differences in @a diff.\r
+ */\r
+svn_error_t *\r
+svn_diff_output(svn_diff_t *diff,\r
+ void *output_baton,\r
+ const svn_diff_output_fns_t *output_fns);\r
+\r
+\r
+\f\r
+/* Diffs on files */\r
+\r
+/** To what extent whitespace should be ignored when comparing lines.\r
+ *\r
+ * @since New in 1.4.\r
+ */\r
+typedef enum svn_diff_file_ignore_space_t\r
+{\r
+ /** Ignore no whitespace. */\r
+ svn_diff_file_ignore_space_none,\r
+\r
+ /** Ignore changes in sequences of whitespace characters, treating each\r
+ * sequence of whitespace characters as a single space. */\r
+ svn_diff_file_ignore_space_change,\r
+\r
+ /** Ignore all whitespace characters. */\r
+ svn_diff_file_ignore_space_all\r
+} svn_diff_file_ignore_space_t;\r
+\r
+/** Options to control the behaviour of the file diff routines.\r
+ *\r
+ * @since New in 1.4.\r
+ *\r
+ * @note This structure may be extended in the future, so to preserve binary\r
+ * compatibility, users must not allocate structs of this type themselves.\r
+ * @see svn_diff_file_options_create().\r
+ *\r
+ * @note Although its name suggests otherwise, this structure is used to\r
+ * pass options to file as well as in-memory diff functions.\r
+ */\r
+typedef struct svn_diff_file_options_t\r
+{\r
+ /** To what extent whitespace should be ignored when comparing lines.\r
+ * The default is @c svn_diff_file_ignore_space_none. */\r
+ svn_diff_file_ignore_space_t ignore_space;\r
+ /** Whether to treat all end-of-line markers the same when comparing lines.\r
+ * The default is @c FALSE. */\r
+ svn_boolean_t ignore_eol_style;\r
+ /** Whether the '@@' lines of the unified diff output should include a prefix\r
+ * of the nearest preceding line that starts with a character that might be\r
+ * the initial character of a C language identifier. The default is\r
+ * @c FALSE.\r
+ */\r
+ svn_boolean_t show_c_function;\r
+} svn_diff_file_options_t;\r
+\r
+/** Allocate a @c svn_diff_file_options_t structure in @a pool, initializing\r
+ * it with default values.\r
+ *\r
+ * @since New in 1.4.\r
+ */\r
+svn_diff_file_options_t *\r
+svn_diff_file_options_create(apr_pool_t *pool);\r
+\r
+/**\r
+ * Parse @a args, an array of <tt>const char *</tt> command line switches\r
+ * and adjust @a options accordingly. @a options is assumed to be initialized\r
+ * with default values. @a pool is used for temporary allocation.\r
+ *\r
+ * @since New in 1.4.\r
+ *\r
+ * The following options are supported:\r
+ * - --ignore-space-change, -b\r
+ * - --ignore-all-space, -w\r
+ * - --ignore-eol-style\r
+ * - --unified, -u (for compatibility, does nothing).\r
+ */\r
+#if 0\r
+svn_error_t *\r
+svn_diff_file_options_parse(svn_diff_file_options_t *options,\r
+ const apr_array_header_t *args,\r
+ apr_pool_t *pool);\r
+#endif\r
+\r
+/** A convenience function to produce a diff between two files.\r
+ *\r
+ * @since New in 1.4.\r
+ *\r
+ * Return a diff object in @a *diff (allocated from @a pool) that represents\r
+ * the difference between an @a original file and @a modified file.\r
+ * (The file arguments must be full paths to the files.)\r
+ *\r
+ * Compare lines according to the relevant fields of @a options.\r
+ */\r
+svn_error_t *\r
+svn_diff_file_diff_2(svn_diff_t **diff,\r
+ const char *original,\r
+ const char *modified,\r
+ const svn_diff_file_options_t *options,\r
+ apr_pool_t *pool);\r
+\r
+/** Similar to svn_file_diff_2(), but with @a options set to a struct with\r
+ * default options.\r
+ *\r
+ * @deprecated Provided for backwards compatibility with the 1.3 API.\r
+ */\r
+SVN_DEPRECATED\r
+svn_error_t *\r
+svn_diff_file_diff(svn_diff_t **diff,\r
+ const char *original,\r
+ const char *modified,\r
+ apr_pool_t *pool);\r
+\r
+/** A convenience function to produce a diff between three files.\r
+ *\r
+ * @since New in 1.4.\r
+ *\r
+ * Return a diff object in @a *diff (allocated from @a pool) that represents\r
+ * the difference between an @a original file, @a modified file, and @a latest\r
+ * file.\r
+ *\r
+ * Compare lines according to the relevant fields of @a options.\r
+ */\r
+svn_error_t *\r
+svn_diff_file_diff3_2(svn_diff_t **diff,\r
+ const char *original,\r
+ const char *modified,\r
+ const char *latest,\r
+ const svn_diff_file_options_t *options,\r
+ apr_pool_t *pool);\r
+\r
+/** Similar to svn_diff_file_diff3_2(), but with @a options set to a struct\r
+ * with default options.\r
+ *\r
+ * @deprecated Provided for backwards compatibility with the 1.3 API.\r
+ */\r
+SVN_DEPRECATED\r
+svn_error_t *\r
+svn_diff_file_diff3(svn_diff_t **diff,\r
+ const char *original,\r
+ const char *modified,\r
+ const char *latest,\r
+ apr_pool_t *pool);\r
+\r
+/** A convenience function to produce a diff between four files.\r
+ *\r
+ * @since New in 1.4.\r
+ *\r
+ * Return a diff object in @a *diff (allocated from @a pool) that represents\r
+ * the difference between an @a original file, @a modified file, @a latest\r
+ * and @a ancestor file. (The file arguments must be full paths to the files.)\r
+ *\r
+ * Compare lines according to the relevant fields of @a options.\r
+ */\r
+svn_error_t *\r
+svn_diff_file_diff4_2(svn_diff_t **diff,\r
+ const char *original,\r
+ const char *modified,\r
+ const char *latest,\r
+ const char *ancestor,\r
+ const svn_diff_file_options_t *options,\r
+ apr_pool_t *pool);\r
+\r
+/** Simliar to svn_file_diff4_2(), but with @a options set to a struct with\r
+ * default options.\r
+ *\r
+ * @deprecated Provided for backwards compatibility with the 1.3 API.\r
+ */\r
+SVN_DEPRECATED\r
+svn_error_t *\r
+svn_diff_file_diff4(svn_diff_t **diff,\r
+ const char *original,\r
+ const char *modified,\r
+ const char *latest,\r
+ const char *ancestor,\r
+ apr_pool_t *pool);\r
+\r
+/** A convenience function to produce unified diff output from the\r
+ * diff generated by svn_diff_file_diff().\r
+ *\r
+ * @since New in 1.5.\r
+ *\r
+ * Output a @a diff between @a original_path and @a modified_path in unified\r
+ * context diff format to @a output_stream. Optionally supply\r
+ * @a original_header and/or @a modified_header to be displayed in the header\r
+ * of the output. If @a original_header or @a modified_header is @c NULL, a\r
+ * default header will be displayed, consisting of path and last modified time.\r
+ * Output all headers and markers in @a header_encoding. If @a relative_to_dir\r
+ * is not @c NULL, the @a original_path and @a modified_path will have the\r
+ * @a relative_to_dir stripped from the front of the respective paths. If\r
+ * @a relative_to_dir is @c NULL, paths will be not be modified. If\r
+ * @a relative_to_dir is not @c NULL but @a relative_to_dir is not a parent\r
+ * path of the target, an error is returned. Finally, if @a relative_to_dir\r
+ * is a URL, an error will be returned.\r
+ */\r
+svn_error_t *\r
+svn_diff_file_output_unified3(svn_stream_t *output_stream,\r
+ svn_diff_t *diff,\r
+ const char *original_path,\r
+ const char *modified_path,\r
+ const char *original_header,\r
+ const char *modified_header,\r
+ const char *header_encoding,\r
+ const char *relative_to_dir,\r
+ svn_boolean_t show_c_function,\r
+ apr_pool_t *pool);\r
+\r
+/** Similar to svn_diff_file_output_unified3(), but with @a relative_to_dir\r
+ * set to NULL and @a show_c_function to false.\r
+ *\r
+ * @deprecated Provided for backwards compatibility with the 1.3 API.\r
+ */\r
+SVN_DEPRECATED\r
+svn_error_t *\r
+svn_diff_file_output_unified2(svn_stream_t *output_stream,\r
+ svn_diff_t *diff,\r
+ const char *original_path,\r
+ const char *modified_path,\r
+ const char *original_header,\r
+ const char *modified_header,\r
+ const char *header_encoding,\r
+ apr_pool_t *pool);\r
+\r
+/** Similar to svn_diff_file_output_unified2(), but with @a header_encoding\r
+ * set to @c APR_LOCALE_CHARSET.\r
+ *\r
+ * @deprecated Provided for backward compatibility with the 1.2 API.\r
+ */\r
+SVN_DEPRECATED\r
+svn_error_t *\r
+svn_diff_file_output_unified(svn_stream_t *output_stream,\r
+ svn_diff_t *diff,\r
+ const char *original_path,\r
+ const char *modified_path,\r
+ const char *original_header,\r
+ const char *modified_header,\r
+ apr_pool_t *pool);\r
+\r
+\r
+/** A convenience function to produce diff3 output from the\r
+ * diff generated by svn_diff_file_diff3().\r
+ *\r
+ * Output a @a diff between @a original_path, @a modified_path and\r
+ * @a latest_path in merged format to @a output_stream. Optionally supply\r
+ * @a conflict_modified, @a conflict_original, @a conflict_separator and/or\r
+ * @a conflict_latest to be displayed as conflict markers in the output.\r
+ * If @a conflict_original, @a conflict_modified, @a conflict_latest and/or\r
+ * @a conflict_separator is @c NULL, a default marker will be displayed.\r
+ * @a conflict_style dictates how conflicts are displayed.\r
+ *\r
+ * @since New in 1.6.\r
+ */\r
+svn_error_t *\r
+svn_diff_file_output_merge2(svn_stream_t *output_stream,\r
+ svn_diff_t *diff,\r
+ const char *original_path,\r
+ const char *modified_path,\r
+ const char *latest_path,\r
+ const char *conflict_original,\r
+ const char *conflict_modified,\r
+ const char *conflict_latest,\r
+ const char *conflict_separator,\r
+ svn_diff_conflict_display_style_t conflict_style,\r
+ apr_pool_t *pool);\r
+\r
+\r
+/** Similar to svn_diff_file_output_merge2, but with @a\r
+ * display_original_in_conflict and @a display_resolved_conflicts\r
+ * booleans instead of the @a conflict_style enum.\r
+ *\r
+ * If both booleans are false, acts like\r
+ * svn_diff_conflict_display_modified_latest; if @a\r
+ * display_original_in_conflict is true, acts like\r
+ * svn_diff_conflict_display_modified_original_latest; if @a\r
+ * display_resolved_conflicts is true, acts like\r
+ * svn_diff_conflict_display_resolved_modified_latest. The booleans\r
+ * may not both be true.\r
+ *\r
+ * @deprecated Provided for backward compatibility with the 1.5 API.\r
+ */\r
+SVN_DEPRECATED\r
+svn_error_t *\r
+svn_diff_file_output_merge(svn_stream_t *output_stream,\r
+ svn_diff_t *diff,\r
+ const char *original_path,\r
+ const char *modified_path,\r
+ const char *latest_path,\r
+ const char *conflict_original,\r
+ const char *conflict_modified,\r
+ const char *conflict_latest,\r
+ const char *conflict_separator,\r
+ svn_boolean_t display_original_in_conflict,\r
+ svn_boolean_t display_resolved_conflicts,\r
+ apr_pool_t *pool);\r
+\r
+\r
+\f\r
+/* Diffs on in-memory structures */\r
+\r
+/** Generate @a diff output from the @a original and @a modified\r
+ * in-memory strings. @a diff will be allocated from @a pool.\r
+ *\r
+ * @since New in 1.5.\r
+ */\r
+#if 0\r
+svn_error_t *\r
+svn_diff_mem_string_diff(svn_diff_t **diff,\r
+ const svn_string_t *original,\r
+ const svn_string_t *modified,\r
+ const svn_diff_file_options_t *options,\r
+ apr_pool_t *pool);\r
+\r
+#endif\r
+/** Generate @a diff output from the @a orginal, @a modified and @a latest\r
+ * in-memory strings. @a diff will be allocated in @a pool.\r
+ *\r
+ * @since New in 1.5.\r
+ */\r
+#if 0\r
+svn_error_t *\r
+svn_diff_mem_string_diff3(svn_diff_t **diff,\r
+ const svn_string_t *original,\r
+ const svn_string_t *modified,\r
+ const svn_string_t *latest,\r
+ const svn_diff_file_options_t *options,\r
+ apr_pool_t *pool);\r
+#endif\r
+\r
+/** Generate @a diff output from the @a original, @a modified and @a latest\r
+ * in-memory strings, using @a ancestor. @a diff will be allocated in @a pool.\r
+ *\r
+ * @since New in 1.5.\r
+ */\r
+#if 0\r
+svn_error_t *\r
+svn_diff_mem_string_diff4(svn_diff_t **diff,\r
+ const svn_string_t *original,\r
+ const svn_string_t *modified,\r
+ const svn_string_t *latest,\r
+ const svn_string_t *ancestor,\r
+ const svn_diff_file_options_t *options,\r
+ apr_pool_t *pool);\r
+#endif\r
+\r
+/** Outputs the @a diff object generated by svn_diff_mem_string_diff()\r
+ * in unified diff format on @a output_stream, using @a original\r
+ * and @a modified for the text in the output.\r
+ * Outputs the header and markers in @a header_encoding.\r
+ *\r
+ * @a original_header and @a modified header are\r
+ * used to fill the field after the "---" and "+++" header markers.\r
+ *\r
+ * @since New in 1.5.\r
+ */\r
+#if 0\r
+svn_error_t *\r
+svn_diff_mem_string_output_unified(svn_stream_t *output_stream,\r
+ svn_diff_t *diff,\r
+ const char *original_header,\r
+ const char *modified_header,\r
+ const char *header_encoding,\r
+ const svn_string_t *original,\r
+ const svn_string_t *modified,\r
+ apr_pool_t *pool);\r
+#endif\r
+/** Output the @a diff generated by svn_diff_mem_string_diff3() in diff3\r
+ * format on @a output_stream, using @a original, @a modified and @a latest\r
+ * for content changes.\r
+ *\r
+ * Use the conflict markers @a conflict_original, @a conflict_modified,\r
+ * @a conflict_latest and @a conflict_separator or the default one for\r
+ * each of these if @c NULL is passed.\r
+ *\r
+ * @a conflict_style dictates how conflicts are displayed.\r
+ *\r
+ * @since New in 1.6.\r
+ */\r
+#if 0\r
+svn_error_t *\r
+svn_diff_mem_string_output_merge2(svn_stream_t *output_stream,\r
+ svn_diff_t *diff,\r
+ const svn_string_t *original,\r
+ const svn_string_t *modified,\r
+ const svn_string_t *latest,\r
+ const char *conflict_original,\r
+ const char *conflict_modified,\r
+ const char *conflict_latest,\r
+ const char *conflict_separator,\r
+ svn_diff_conflict_display_style_t style,\r
+ apr_pool_t *pool);\r
+#endif\r
+/** Similar to svn_diff_mem_string_output_merge2, but with @a\r
+ * display_original_in_conflict and @a display_resolved_conflicts\r
+ * booleans instead of the @a conflict_style enum.\r
+ *\r
+ * If both booleans are false, acts like\r
+ * svn_diff_conflict_display_modified_latest; if @a\r
+ * display_original_in_conflict is true, acts like\r
+ * svn_diff_conflict_display_modified_original_latest; if @a\r
+ * display_resolved_conflicts is true, acts like\r
+ * svn_diff_conflict_display_resolved_modified_latest. The booleans\r
+ * may not both be true.\r
+ *\r
+ * @deprecated Provided for backward compatibility with the 1.5 API.\r
+ */\r
+#if 0\r
+SVN_DEPRECATED\r
+svn_error_t *\r
+svn_diff_mem_string_output_merge(svn_stream_t *output_stream,\r
+ svn_diff_t *diff,\r
+ const svn_string_t *original,\r
+ const svn_string_t *modified,\r
+ const svn_string_t *latest,\r
+ const char *conflict_original,\r
+ const char *conflict_modified,\r
+ const char *conflict_latest,\r
+ const char *conflict_separator,\r
+ svn_boolean_t display_original_in_conflict,\r
+ svn_boolean_t display_resolved_conflicts,\r
+ apr_pool_t *pool);\r
+\r
+#endif\r
+#ifdef __cplusplus\r
+}\r
+#endif /* __cplusplus */\r
+\r
+#endif /* SVN_DIFF_H */\r