GME
13
|
00001 00028 00029 #ifndef SVN_SUBST_H 00030 #define SVN_SUBST_H 00031 00032 #include <apr_pools.h> 00033 #include <apr_hash.h> 00034 #include <apr_time.h> 00035 00036 #include "svn_types.h" 00037 #include "svn_string.h" 00038 #include "svn_io.h" 00039 00040 #ifdef __cplusplus 00041 extern "C" { 00042 #endif /* __cplusplus */ 00043 00044 /* EOL conversion and keyword expansion. */ 00045 00047 #define SVN_SUBST_NATIVE_EOL_STR "\n" 00048 00053 typedef enum svn_subst_eol_style 00054 { 00056 svn_subst_eol_style_unknown, 00057 00059 svn_subst_eol_style_none, 00060 00062 svn_subst_eol_style_native, 00063 00065 svn_subst_eol_style_fixed 00066 00067 } svn_subst_eol_style_t; 00068 00084 void 00085 svn_subst_eol_style_from_value(svn_subst_eol_style_t *style, 00086 const char **eol, 00087 const char *value); 00088 00097 svn_boolean_t 00098 svn_subst_translation_required(svn_subst_eol_style_t style, 00099 const char *eol, 00100 apr_hash_t *keywords, 00101 svn_boolean_t special, 00102 svn_boolean_t force_eol_check); 00103 00104 00109 typedef struct svn_subst_keywords_t 00110 { 00117 const svn_string_t *revision; 00118 const svn_string_t *date; 00119 const svn_string_t *author; 00120 const svn_string_t *url; 00121 const svn_string_t *id; 00123 } svn_subst_keywords_t; 00124 00125 00166 svn_error_t * 00167 svn_subst_build_keywords3(apr_hash_t **kw, 00168 const char *keywords_string, 00169 const char *rev, 00170 const char *url, 00171 const char *repos_root_url, 00172 apr_time_t date, 00173 const char *author, 00174 apr_pool_t *pool); 00175 00183 SVN_DEPRECATED 00184 svn_error_t * 00185 svn_subst_build_keywords2(apr_hash_t **kw, 00186 const char *keywords_string, 00187 const char *rev, 00188 const char *url, 00189 apr_time_t date, 00190 const char *author, 00191 apr_pool_t *pool); 00192 00198 SVN_DEPRECATED 00199 svn_error_t * 00200 svn_subst_build_keywords(svn_subst_keywords_t *kw, 00201 const char *keywords_string, 00202 const char *rev, 00203 const char *url, 00204 apr_time_t date, 00205 const char *author, 00206 apr_pool_t *pool); 00207 00208 00225 svn_boolean_t 00226 svn_subst_keywords_differ2(apr_hash_t *a, 00227 apr_hash_t *b, 00228 svn_boolean_t compare_values, 00229 apr_pool_t *pool); 00230 00236 SVN_DEPRECATED 00237 svn_boolean_t 00238 svn_subst_keywords_differ(const svn_subst_keywords_t *a, 00239 const svn_subst_keywords_t *b, 00240 svn_boolean_t compare_values); 00241 00242 00271 SVN_DEPRECATED 00272 svn_error_t * 00273 svn_subst_translate_stream3(svn_stream_t *src_stream, 00274 svn_stream_t *dst_stream, 00275 const char *eol_str, 00276 svn_boolean_t repair, 00277 apr_hash_t *keywords, 00278 svn_boolean_t expand, 00279 apr_pool_t *scratch_pool); 00280 00281 00287 SVN_DEPRECATED 00288 svn_error_t * 00289 svn_subst_translate_stream2(svn_stream_t *src_stream, 00290 svn_stream_t *dst_stream, 00291 const char *eol_str, 00292 svn_boolean_t repair, 00293 const svn_subst_keywords_t *keywords, 00294 svn_boolean_t expand, 00295 apr_pool_t *scratch_pool); 00296 00297 00305 SVN_DEPRECATED 00306 svn_error_t * 00307 svn_subst_translate_stream(svn_stream_t *src_stream, 00308 svn_stream_t *dst_stream, 00309 const char *eol_str, 00310 svn_boolean_t repair, 00311 const svn_subst_keywords_t *keywords, 00312 svn_boolean_t expand); 00313 00314 00358 svn_stream_t * 00359 svn_subst_stream_translated(svn_stream_t *stream, 00360 const char *eol_str, 00361 svn_boolean_t repair, 00362 apr_hash_t *keywords, 00363 svn_boolean_t expand, 00364 apr_pool_t *result_pool); 00365 00366 00383 SVN_DEPRECATED 00384 svn_error_t * 00385 svn_subst_stream_translated_to_normal_form(svn_stream_t **stream, 00386 svn_stream_t *source, 00387 svn_subst_eol_style_t eol_style, 00388 const char *eol_str, 00389 svn_boolean_t always_repair_eols, 00390 apr_hash_t *keywords, 00391 apr_pool_t *pool); 00392 00393 00406 svn_error_t * 00407 svn_subst_read_specialfile(svn_stream_t **stream, 00408 const char *path, 00409 apr_pool_t *result_pool, 00410 apr_pool_t *scratch_pool); 00411 00412 00429 svn_error_t * 00430 svn_subst_create_specialfile(svn_stream_t **stream, 00431 const char *path, 00432 apr_pool_t *result_pool, 00433 apr_pool_t *scratch_pool); 00434 00435 00447 SVN_DEPRECATED 00448 svn_error_t * 00449 svn_subst_stream_from_specialfile(svn_stream_t **stream, 00450 const char *path, 00451 apr_pool_t *pool); 00452 00453 00476 svn_error_t * 00477 svn_subst_copy_and_translate4(const char *src, 00478 const char *dst, 00479 const char *eol_str, 00480 svn_boolean_t repair, 00481 apr_hash_t *keywords, 00482 svn_boolean_t expand, 00483 svn_boolean_t special, 00484 svn_cancel_func_t cancel_func, 00485 void *cancel_baton, 00486 apr_pool_t *pool); 00487 00488 00496 SVN_DEPRECATED 00497 svn_error_t * 00498 svn_subst_copy_and_translate3(const char *src, 00499 const char *dst, 00500 const char *eol_str, 00501 svn_boolean_t repair, 00502 apr_hash_t *keywords, 00503 svn_boolean_t expand, 00504 svn_boolean_t special, 00505 apr_pool_t *pool); 00506 00507 00515 SVN_DEPRECATED 00516 svn_error_t * 00517 svn_subst_copy_and_translate2(const char *src, 00518 const char *dst, 00519 const char *eol_str, 00520 svn_boolean_t repair, 00521 const svn_subst_keywords_t *keywords, 00522 svn_boolean_t expand, 00523 svn_boolean_t special, 00524 apr_pool_t *pool); 00525 00532 SVN_DEPRECATED 00533 svn_error_t * 00534 svn_subst_copy_and_translate(const char *src, 00535 const char *dst, 00536 const char *eol_str, 00537 svn_boolean_t repair, 00538 const svn_subst_keywords_t *keywords, 00539 svn_boolean_t expand, 00540 apr_pool_t *pool); 00541 00542 00558 svn_error_t * 00559 svn_subst_translate_cstring2(const char *src, 00560 const char **dst, 00561 const char *eol_str, 00562 svn_boolean_t repair, 00563 apr_hash_t *keywords, 00564 svn_boolean_t expand, 00565 apr_pool_t *pool); 00566 00573 SVN_DEPRECATED 00574 svn_error_t * 00575 svn_subst_translate_cstring(const char *src, 00576 const char **dst, 00577 const char *eol_str, 00578 svn_boolean_t repair, 00579 const svn_subst_keywords_t *keywords, 00580 svn_boolean_t expand, 00581 apr_pool_t *pool); 00582 00603 SVN_DEPRECATED 00604 svn_error_t * 00605 svn_subst_translate_to_normal_form(const char *src, 00606 const char *dst, 00607 svn_subst_eol_style_t eol_style, 00608 const char *eol_str, 00609 svn_boolean_t always_repair_eols, 00610 apr_hash_t *keywords, 00611 svn_boolean_t special, 00612 apr_pool_t *pool); 00613 00634 SVN_DEPRECATED 00635 svn_error_t * 00636 svn_subst_stream_detranslated(svn_stream_t **stream_p, 00637 const char *src, 00638 svn_subst_eol_style_t eol_style, 00639 const char *eol_str, 00640 svn_boolean_t always_repair_eols, 00641 apr_hash_t *keywords, 00642 svn_boolean_t special, 00643 apr_pool_t *pool); 00644 00645 00646 /* EOL conversion and character encodings */ 00647 00671 svn_error_t * 00672 svn_subst_translate_string2(svn_string_t **new_value, 00673 svn_boolean_t *translated_to_utf8, 00674 svn_boolean_t *translated_line_endings, 00675 const svn_string_t *value, 00676 const char *encoding, 00677 svn_boolean_t repair, 00678 apr_pool_t *result_pool, 00679 apr_pool_t *scratch_pool); 00680 00686 SVN_DEPRECATED 00687 svn_error_t *svn_subst_translate_string(svn_string_t **new_value, 00688 const svn_string_t *value, 00689 const char *encoding, 00690 apr_pool_t *pool); 00691 00699 svn_error_t *svn_subst_detranslate_string(svn_string_t **new_value, 00700 const svn_string_t *value, 00701 svn_boolean_t for_output, 00702 apr_pool_t *pool); 00703 00704 #ifdef __cplusplus 00705 } 00706 #endif /* __cplusplus */ 00707 00708 #endif /* SVN_SUBST_H */