diff options
author | Branko Čibej <brane@apache.org> | 2003-02-12 20:20:56 +0000 |
---|---|---|
committer | Branko Čibej <brane@apache.org> | 2003-02-12 20:20:56 +0000 |
commit | 8dc33467727dfa3e6484b19637a6b97447ffb2e0 (patch) | |
tree | 716428703f123dc6bf5507b8d5e8dd778487696b /file_io/unix/filepath.c | |
parent | 80bbefa0f622a8e0c1081b9d5a66aed89fb017df (diff) | |
download | apr-8dc33467727dfa3e6484b19637a6b97447ffb2e0.tar.gz apr-8dc33467727dfa3e6484b19637a6b97447ffb2e0.zip |
Added two new functions, apr_filepath_list_split and apr_filepath_list_merge,
for managing search paths. The common implementation is in a new file,
file_io/unix/filepath_util.c.
Also added tests for these functions a new file in the test suite, testpath.c.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64349 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/unix/filepath.c')
-rw-r--r-- | file_io/unix/filepath.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/file_io/unix/filepath.c b/file_io/unix/filepath.c index f273621aa..91321ba07 100644 --- a/file_io/unix/filepath.c +++ b/file_io/unix/filepath.c @@ -326,6 +326,29 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath, } +apr_status_t apr_filepath_list_split_impl(apr_array_header_t **pathelts, + const char *liststr, + char separator, + apr_pool_t *p); +apr_status_t apr_filepath_list_merge_impl(char **liststr, + apr_array_header_t *pathelts, + char separator, + apr_pool_t *p); + +APR_DECLARE(apr_status_t) apr_filepath_list_split(apr_array_header_t **pathelts, + const char *liststr, + apr_pool_t *p) +{ + return apr_filepath_list_split_impl(pathelts, liststr, ':', p); +} +APR_DECLARE(apr_status_t) apr_filepath_list_merge(char **liststr, + apr_array_header_t *pathelts, + apr_pool_t *p) +{ + return apr_filepath_list_merge_impl(liststr, pathelts, ':', p); +} + + APR_DECLARE(apr_status_t) apr_filepath_encoding(int *style, apr_pool_t *p) { *style = APR_FILEPATH_ENCODING_LOCALE; |