Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/include/svn_subst.h view on Meta::CPAN
* Inconsistent line endings in the file will be automatically repaired
* (made consistent) for some eol styles. For all others, an error is
* returned. By setting @a always_repair_eols to @c TRUE, eols will be
* made consistent even for those styles which don't have it by default.
*
* @note To translate a file FROM normal form, use
* svn_subst_copy_and_translate3().
*
* @since New in 1.4
* @deprecated Provided for backward compatibility with the 1.5 API
*/
SVN_DEPRECATED
svn_error_t *
svn_subst_translate_to_normal_form(const char *src,
const char *dst,
svn_subst_eol_style_t eol_style,
const char *eol_str,
svn_boolean_t always_repair_eols,
apr_hash_t *keywords,
svn_boolean_t special,
apr_pool_t *pool);
/**
* Set @a *stream_p to a stream that detranslates the file @a src from
* working copy form to normal form, allocated in @a pool.
*
* The values specified for @a eol_style, @a *eol_str, @a keywords and
* @a special, should be the ones used to translate the file to its
* working copy form. Usually, these are the values specified by the
* user in the files' properties.
*
* Inconsistent line endings in the file will be automatically repaired
* (made consistent) for some eol styles. For all others, an error is
* returned. By setting @a always_repair_eols to @c TRUE, eols will be
* made consistent even for those styles which don't have it by default.
*
* @since New in 1.4.
*
* @deprecated Provided for backward compatibility with the 1.5 API.
* Use svn_subst_stream_from_specialfile if the source is special;
* otherwise, use svn_subst_stream_translated_to_normal_form.
*/
SVN_DEPRECATED
svn_error_t *
svn_subst_stream_detranslated(svn_stream_t **stream_p,
const char *src,
svn_subst_eol_style_t eol_style,
const char *eol_str,
svn_boolean_t always_repair_eols,
apr_hash_t *keywords,
svn_boolean_t special,
apr_pool_t *pool);
/* EOL conversion and character encodings */
/** Translate the string @a value from character encoding @a encoding to
* UTF8, and also from its current line-ending style to LF line-endings. If
* @a encoding is @c NULL, translate from the system-default encoding.
*
* If @a translated_to_utf8 is not @c NULL, then set @a *translated_to_utf8
* to @c TRUE if at least one character of @a value in the source character
* encoding was translated to UTF-8, or to @c FALSE otherwise.
*
* If @a translated_line_endings is not @c NULL, then set @a
* *translated_line_endings to @c TRUE if at least one line ending was
* changed to LF, or to @c FALSE otherwise.
*
* If @a value has an inconsistent line ending style, then: if @a repair
* is @c FALSE, return @c SVN_ERR_IO_INCONSISTENT_EOL, else if @a repair is
* @c TRUE, convert any line ending in @a value to "\n" in
* @a *new_value. Recognized line endings are: "\n", "\r", and "\r\n".
*
* Set @a *new_value to the translated string, allocated in @a result_pool.
*
* @a scratch_pool is used for temporary allocations.
*
* @since New in 1.7.
*/
svn_error_t *
svn_subst_translate_string2(svn_string_t **new_value,
svn_boolean_t *translated_to_utf8,
svn_boolean_t *translated_line_endings,
const svn_string_t *value,
const char *encoding,
svn_boolean_t repair,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Similar to svn_subst_translate_string2(), except that the information about
* whether re-encoding or line ending translation were performed is discarded.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *svn_subst_translate_string(svn_string_t **new_value,
const svn_string_t *value,
const char *encoding,
apr_pool_t *pool);
/** Translate the string @a value from UTF8 and LF line-endings into native
* character encoding and native line-endings. If @a for_output is TRUE,
* translate to the character encoding of the output locale, else to that of
* the default locale.
*
* Set @a *new_value to the translated string, allocated in @a pool.
*/
svn_error_t *svn_subst_detranslate_string(svn_string_t **new_value,
const svn_string_t *value,
svn_boolean_t for_output,
apr_pool_t *pool);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SVN_SUBST_H */
( run in 0.883 second using v1.01-cache-2.11-cpan-e93a5daba3e )