apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: apr CHANGES
Date Fri, 03 Jan 2003 09:05:29 GMT
brane       2003/01/03 01:05:29

  Modified:    include  apr_file_info.h
               file_io/win32 filepath.c
               file_io/unix filepath.c
               .        CHANGES
  Log:
  Added a new function, apr_filepath_encoding, to determine the character
  encoding used internally by the file_io and file_info functions. In most
  cases, the encoding is locale-dependent; on Windows, though, it's usually
  (but not always!) UTF-8.
  
  Revision  Changes    Path
  1.38      +26 -0     apr/include/apr_file_info.h
  
  Index: apr_file_info.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_file_info.h,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- apr_file_info.h	1 Jan 2003 00:01:45 -0000	1.37
  +++ apr_file_info.h	3 Jan 2003 09:05:28 -0000	1.38
  @@ -406,6 +406,32 @@
    */
   APR_DECLARE(apr_status_t) apr_filepath_set(const char *path, apr_pool_t *p);
   
  +/**
  + * @defgroup apr_filepath_encoding FilePath Character encoding
  + * @{
  + */
  +
  +/** The FilePath character encoding is unknown */
  +#define APR_FILEPATH_ENCODING_UNKNOWN  0
  +
  +/** The FilePath character encoding is locale-dependent */
  +#define APR_FILEPATH_ENCODING_LOCALE   1
  +
  +/** The FilePath character encoding is UTF-8 */
  +#define APR_FILEPATH_ENCODING_UTF8     2
  +/** @} */
  +/**
  + * Determine the encoding used internally by the FilePath functions
  + * @ingroup apr_filepath_encoding
  + * @param style points to a variable which receives the encoding style flag
  + * @param p the pool to allocate any working storage
  + * @deffunc apr_status_t apr_filepath_encoding(int *style, apr_pool_t *p)
  + * @remark Use @c apr_os_locale_encoding and/or @c apr_os_default_encoding
  + * to get the name of the path encoding if it's not UTF-8.
  + */
  +APR_DECLARE(apr_status_t) apr_filepath_encoding(int *style, apr_pool_t *p);
  +
  +
   /** @} */
   
   #ifdef __cplusplus
  
  
  
  1.34      +15 -0     apr/file_io/win32/filepath.c
  
  Index: filepath.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/win32/filepath.c,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- filepath.c	1 Jan 2003 00:01:44 -0000	1.33
  +++ filepath.c	3 Jan 2003 09:05:28 -0000	1.34
  @@ -977,3 +977,18 @@
       (*newpath)[pathlen] = '\0';
       return APR_SUCCESS;
   }
  +
  +
  +APR_DECLARE(apr_status_t) apr_filepath_encoding(int *style, apr_pool_t *p)
  +{
  +#if APR_HAS_UNICODE_FS
  +    IF_WIN_OS_IS_UNICODE
  +    {
  +        *style = APR_FILEPATH_ENCODING_UTF8;
  +        return APR_SUCCESS;
  +    }
  +#endif
  +
  +    *style = APR_FILEPATH_ENCODING_LOCALE;
  +    return APR_SUCCESS;
  +}
  
  
  
  1.18      +7 -0      apr/file_io/unix/filepath.c
  
  Index: filepath.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/unix/filepath.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- filepath.c	1 Jan 2003 00:01:43 -0000	1.17
  +++ filepath.c	3 Jan 2003 09:05:28 -0000	1.18
  @@ -324,3 +324,10 @@
       *newpath = path;
       return APR_SUCCESS;
   }
  +
  +
  +APR_DECLARE(apr_status_t) apr_filepath_encoding(int *style, apr_pool_t *p)
  +{
  +    *style = APR_FILEPATH_ENCODING_LOCALE;
  +    return APR_SUCCESS;
  +}
  
  
  
  1.366     +3 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.365
  retrieving revision 1.366
  diff -u -r1.365 -r1.366
  --- CHANGES	23 Dec 2002 20:41:16 -0000	1.365
  +++ CHANGES	3 Jan 2003 09:05:28 -0000	1.366
  @@ -1,5 +1,8 @@
   Changes with APR 0.9.2
   
  +  *) Add function apr_filepath_encoding and associated constants.
  +     [Branko Cibej]
  +
     *) Allow apr_hash to have greater than int number of elements.
        [Justin Erenkrantz]
   
  
  
  

Mime
View raw message