📄 svn_diff.h
字号:
*/ svn_error_t *(*output_diff_common)(void *output_baton, apr_off_t original_start, apr_off_t original_length, apr_off_t modified_start, apr_off_t modified_length, apr_off_t latest_start, apr_off_t latest_length); /** All three datasources have conflicting data ranges. The range * @a latest_start, @a latest_length in the "latest" datasource conflicts * with the range @a original_start, @a original_length in the "original" * datasource, and also conflicts with the range @a modified_start, * @a modified_length in the "modified" datasource. * If there are common ranges in the "modified" and "latest" datasources * in this conflicting range, @a resolved_diff will contain a diff * which can be used to retrieve the common and conflicting ranges. */ svn_error_t *(*output_conflict)(void *output_baton, apr_off_t original_start, apr_off_t original_length, apr_off_t modified_start, apr_off_t modified_length, apr_off_t latest_start, apr_off_t latest_length, svn_diff_t *resolved_diff);} svn_diff_output_fns_t;/** Given a vtable of @a output_fns/@a output_baton for consuming * differences, output the differences in @a diff. */svn_error_t *svn_diff_output(svn_diff_t *diff, void *output_baton, const svn_diff_output_fns_t *output_fns);/* Diffs on files *//** To what extent whitespace should be ignored when comparing lines. * * @since New in 1.4. */typedef enum svn_diff_file_ignore_space_t{ /** Ignore no whitespace. */ svn_diff_file_ignore_space_none, /** Ignore changes in sequences of whitespace characters, treating each * sequence of whitespace characters as a single space. */ svn_diff_file_ignore_space_change, /** Ignore all whitespace characters. */ svn_diff_file_ignore_space_all} svn_diff_file_ignore_space_t;/** Options to control the behaviour of the file diff routines. * * @since New in 1.4. * * @note This structure may be extended in the future, so to preserve binary * compatibility, users must not allocate structs of this type themselves. * @see svn_diff_file_options_create(). */typedef struct svn_diff_file_options_t{ /** To what extent whitespace should be ignored when comparing lines. * The default is @c svn_diff_file_ignore_space_none. */ svn_diff_file_ignore_space_t ignore_space; /** Whether to treat all end-of-line markers the same when comparing lines. * The default is @c FALSE. */ svn_boolean_t ignore_eol_style;} svn_diff_file_options_t;/** Allocate a @c svn_diff_file_options_t structure in @a pool, initializing * it with default values. * * @since New in 1.4. */svn_diff_file_options_t *svn_diff_file_options_create(apr_pool_t *pool);/** * Parse @a args, an array of <tt>const char *</tt> command line switches * and adjust @a options accordingly. @a options is assumed to be initialized * with default values. @a pool is used for temporary allocation. * * @since New in 1.4. * * The following options are supported: * - --ignore-space-change, -b * - --ignore-all-space, -w * - --ignore-eol-style * - --unified, -u (for compatibility, does nothing). */svn_error_t *svn_diff_file_options_parse(svn_diff_file_options_t *options, const apr_array_header_t *args, apr_pool_t *pool); /** A convenience function to produce a diff between two files. * * @since New in 1.4. * * Return a diff object in @a *diff (allocated from @a pool) that represents * the difference between an @a original file and @a modified file. * (The file arguments must be full paths to the files.) * * Compare lines according to the relevant fields of @a options. */svn_error_t *svn_diff_file_diff_2(svn_diff_t **diff, const char *original, const char *modified, const svn_diff_file_options_t *options, apr_pool_t *pool);/** Similar to svn_file_diff_2(), but with @a options set to a struct with * default options. * * @deprecated Provided for backwards compatibility with the 1.3 API. */svn_error_t *svn_diff_file_diff(svn_diff_t **diff, const char *original, const char *modified, apr_pool_t *pool);/** A convenience function to produce a diff between three files. * * @since New in 1.4. * * Return a diff object in @a *diff (allocated from @a pool) that represents * the difference between an @a original file, @a modified file, and @a latest * file. (The file arguments must be full paths to the files.) * * Compare lines according to the relevant fields of @a options. */svn_error_t *svn_diff_file_diff3_2(svn_diff_t **diff, const char *original, const char *modified, const char *latest, const svn_diff_file_options_t *options, apr_pool_t *pool);/** Similar to svn_diff_file_diff3_2(), but with @a options set to a struct * with default options. * * @deprecated Provided for backwards compatibility with the 1.3 API. */svn_error_t *svn_diff_file_diff3(svn_diff_t **diff, const char *original, const char *modified, const char *latest, apr_pool_t *pool);/** A convenience function to produce a diff between four files. * * @since New in 1.4. * * Return a diff object in @a *diff (allocated from @a pool) that represents * the difference between an @a original file, @a modified file, @a latest * and @a ancestor file. (The file arguments must be full paths to the files.) * * Compare lines according to the relevant fields of @a options. */svn_error_t *svn_diff_file_diff4_2(svn_diff_t **diff, const char *original, const char *modified, const char *latest, const char *ancestor, const svn_diff_file_options_t *options, apr_pool_t *pool);/** Simliar to svn_file_diff4_2(), but with @a options set to a struct with * default options. * * @deprecated Provided for backwards compatibility with the 1.3 API. */svn_error_t *svn_diff_file_diff4(svn_diff_t **diff, const char *original, const char *modified, const char *latest, const char *ancestor, apr_pool_t *pool);/** A convenience function to produce unified diff output from the * diff generated by svn_diff_file_diff(). * * @since New in 1.3. * * Output a @a diff between @a original_path and @a modified_path in unified * context diff format to @a output_file. Optionally supply @a original_header * and/or @a modified_header to be displayed in the header of the output. * If @a original_header or @a modified_header is @c NULL, a default header * will be displayed, consisting of path and last modified time. Output * all headers and markers in @a header_encoding. */svn_error_t *svn_diff_file_output_unified2(svn_stream_t *output_stream, svn_diff_t *diff, const char *original_path, const char *modified_path, const char *original_header, const char *modified_header, const char *header_encoding, apr_pool_t *pool);/** Similar to svn_diff_file_output_unified2(), but with @a header_encoding * set to @c APR_LOCALE_CHARSET. * * @deprecated Provided for backward compatibility with the 1.2 API. */svn_error_t *svn_diff_file_output_unified(svn_stream_t *output_stream, svn_diff_t *diff, const char *original_path, const char *modified_path, const char *original_header, const char *modified_header, apr_pool_t *pool);/** A convenience function to produce diff3 output from the * diff generated by svn_diff_file_diff3(). * * Output a @a diff between @a original_path, @a modified_path and * @a latest_path in merged format to @a output_file. Optionally supply * @a conflict_modified, @a conflict_original, @a conflict_separator and/or * @a conflict_latest to be displayed as conflict markers in the output. * If @a conflict_original, @a conflict_modified, @a conflict_latest and/or * @a conflict_separator is @c NULL, a default marker will be displayed. * Set @a display_original_in_conflict and @a display_resolved_conflicts * as desired. Note that these options are mutually exclusive. */svn_error_t *svn_diff_file_output_merge(svn_stream_t *output_stream, svn_diff_t *diff, const char *original_path, const char *modified_path, const char *latest_path, const char *conflict_original, const char *conflict_modified, const char *conflict_latest, const char *conflict_separator, svn_boolean_t display_original_in_conflict, svn_boolean_t display_resolved_conflicts, apr_pool_t *pool);#ifdef __cplusplus}#endif /* __cplusplus */#endif /* SVN_DIFF_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -