32 #include <apr_pools.h>
34 #include <apr_tables.h>
35 #include <apr_file_io.h>
46 #define SVN_KEYLINE_MAXLEN 100
66 #define SVN_HASH_TERMINATOR "END"
82 const char *terminator,
96 const char *terminator,
109 const char *terminator,
124 const char *terminator,
150 apr_file_t *destfile,
166 svn_hash_diff_key_both,
178 (
const void *key, apr_ssize_t klen,
204 void *diff_func_baton,
239 const apr_array_header_t *keys,
246 #define svn_hash_gets(ht, key) \
247 apr_hash_get(ht, key, APR_HASH_KEY_STRING)
253 #define svn_hash_sets(ht, key, val) \
254 apr_hash_set(ht, key, APR_HASH_KEY_STRING, val)
svn_error_t * svn_hash_keys(apr_array_header_t **array, apr_hash_t *hash, apr_pool_t *pool)
Return the keys to hash in *array.
svn_error_t * svn_hash_read_incremental(apr_hash_t *hash, svn_stream_t *stream, const char *terminator, apr_pool_t *pool)
Similar to svn_hash_read2(), but allows stream to contain deletion lines which remove entries from ha...
svn_error_t * svn_hash_read(apr_hash_t *hash, apr_file_t *srcfile, apr_pool_t *pool)
This function behaves like svn_hash_read2(), but it only works on an apr_file_t input, empty files are accepted, and the hash is expected to be terminated with a line containing "END" or "PROPS-END".
General file I/O for Subversion.
svn_error_t *(* svn_hash_diff_func_t)(const void *key, apr_ssize_t klen, enum svn_hash_diff_key_status status, void *baton)
Function type for expressing a key's status between two hash tables.
svn_hash_diff_key_status
Hash key status indicator for svn_hash_diff_func_t.
struct svn_stream_t svn_stream_t
An abstract stream of bytes–either incoming or outgoing or both.
Subversion's data types.
svn_error_t * svn_hash_from_cstring_keys(apr_hash_t **hash, const apr_array_header_t *keys, apr_pool_t *pool)
Set *hash to a new hash whose keys come from the items in keys (an array of const char * items)...
#define SVN_DEPRECATED
Macro used to mark deprecated functions.
svn_error_t * svn_hash_write(apr_hash_t *hash, apr_file_t *destfile, apr_pool_t *pool)
This function behaves like svn_hash_write2(), but it only works on an apr_file_t output, and the terminator is always "END".
svn_error_t * svn_hash_read2(apr_hash_t *hash, svn_stream_t *stream, const char *terminator, apr_pool_t *pool)
Read a hash table from stream, storing the resultants names and values in hash.
svn_error_t * svn_hash_write2(apr_hash_t *hash, svn_stream_t *stream, const char *terminator, apr_pool_t *pool)
Dump hash to stream.
svn_error_t * svn_hash_diff(apr_hash_t *hash_a, apr_hash_t *hash_b, svn_hash_diff_func_t diff_func, void *diff_func_baton, apr_pool_t *pool)
Take the diff of two hashtables.
svn_error_t * svn_hash_write_incremental(apr_hash_t *hash, apr_hash_t *oldhash, svn_stream_t *stream, const char *terminator, apr_pool_t *pool)
Similar to svn_hash_write2(), but only writes out entries for keys which differ between hash and oldh...