VirtualBox

Changeset 28903 in vbox for trunk/src/VBox/Runtime/include


Ignore:
Timestamp:
Apr 29, 2010 2:58:12 PM (15 years ago)
Author:
vboxsync
Message:

IPRT: iconv cache.

Location:
trunk/src/VBox/Runtime/include/internal
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/include/internal/path.h

    r28877 r28903  
    3737# define HAVE_DRIVE 1
    3838#endif
     39
     40/** The name of the environment variable that is used to override the default
     41 * codeset used when talking to the file systems.  This is only available on
     42 * Mac OS X and UNIX systems. */
     43#define RTPATH_CODESET_ENV_VAR          "IPRT_PATH_CODESET"
    3944
    4045
  • trunk/src/VBox/Runtime/include/internal/string.h

    r28800 r28903  
    4848#endif
    4949
    50 size_t rtstrFormatRt(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, const char **ppszFormat, va_list *pArgs, int cchWidth, int cchPrecision, unsigned fFlags, char chArgSize);
    51 size_t rtstrFormatType(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, const char **ppszFormat, va_list *pArgs, int cchWidth, int cchPrecision, unsigned fFlags, char chArgSize);
     50size_t rtstrFormatRt(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, const char **ppszFormat, va_list *pArgs,
     51                     int cchWidth, int cchPrecision, unsigned fFlags, char chArgSize);
     52size_t rtstrFormatType(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, const char **ppszFormat, va_list *pArgs,
     53                       int cchWidth, int cchPrecision, unsigned fFlags, char chArgSize);
     54
     55#ifdef RT_WITH_ICONV_CACHE
     56void rtStrIconvCacheInit(struct RTTHREADINT *pThread);
     57void rtStrIconvCacheDestroy(struct RTTHREADINT *pThread);
     58#endif
     59
     60/**
     61 * Indexes into RTTHREADINT::ahIconvs
     62 */
     63typedef enum RTSTRICONV
     64{
     65    /** UTF-8 to the locale codeset (LC_CTYPE). */
     66    RTSTRICONV_UTF8_TO_LOCALE = 0,
     67    /** The locale codeset (LC_CTYPE) to UTF-8. */
     68    RTSTRICONV_LOCALE_TO_UTF8,
     69    /** UTF-8 to the filesystem codeset - if different from the locale codeset. */
     70    RTSTRICONV_UTF8_TO_FS,
     71    /** The filesystem codeset to UTF-8. */
     72    RTSTRICONV_FS_TO_UTF8,
     73    /** The end of the valid indexes. */
     74    RTSTRICONV_END
     75} RTSTRICONV;
     76
     77int rtStrConvert(const char *pchInput, size_t cchInput, const char *pszInputCS,
     78                 char **ppszOutput, size_t cbOutput, const char *pszOutputCS,
     79                 unsigned cFactor, RTSTRICONV enmCacheIdx);
     80const char *rtStrGetLocaleCodeset(void);
     81int rtUtf8Length(const char *psz, size_t cch, size_t *pcuc, size_t *pcchActual);
    5282
    5383RT_C_DECLS_END
  • trunk/src/VBox/Runtime/include/internal/thread.h

    r28800 r28903  
    3737#include "internal/lockvalidator.h"
    3838#include "internal/magics.h"
     39#ifdef RT_WITH_ICONV_CACHE
     40# include "internal/string.h"
     41#endif
    3942
    4043RT_C_DECLS_BEGIN
    41 
    42 
    4344
    4445
     
    9798    RTLOCKVALPERTHREAD      LockValidator;
    9899#endif /* IN_RING3 */
     100#ifdef RT_WITH_ICONV_CACHE
     101    /** Handle cache for iconv.
     102     * @remarks ASSUMES sizeof(void *) >= sizeof(iconv_t). */
     103    void *ahIconvs[RTSTRICONV_END];
     104#endif
    99105#ifdef IPRT_WITH_GENERIC_TLS
    100106    /** The TLS entries for this thread. */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette