diff options
author | jstebbins <[email protected]> | 2013-09-22 17:19:38 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2013-09-22 17:19:38 +0000 |
commit | 5e712218d8eb3f71a06356ed6f952b86ca947fca (patch) | |
tree | cd20ec0c7f22a94c11594deb195c7ec939dee4d1 /libhb/ports.h | |
parent | 10fda25f44d362349694a42127e8ba4974a4a6ad (diff) |
libhb: make libhb internal character code utf8
This makes libhb expect all strings passed to it to be in utf8 format.
The cli converts the converts from the current code page to utf8. libhb
converts back to the current code page when necessary for libraries that
expect it.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5798 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/ports.h')
-rw-r--r-- | libhb/ports.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/libhb/ports.h b/libhb/ports.h index a87b7ebd6..5021a5176 100644 --- a/libhb/ports.h +++ b/libhb/ports.h @@ -47,8 +47,34 @@ int hb_platform_init(); char *strtok_r(char *s, const char *delim, char **save_ptr); #endif +#ifdef SYS_MINGW +typedef struct +{ + _WDIR *wdir; + struct dirent entry; +} HB_DIR; +#else +typedef DIR HB_DIR; +#endif + +#ifdef SYS_MINGW +typedef struct _stat64 hb_stat_t; +#else +typedef struct stat hb_stat_t; +#endif + +HB_DIR* hb_opendir(char *path); +int hb_closedir(HB_DIR *dir); +struct dirent * hb_readdir(HB_DIR *dir); +int hb_mkdir(char * name); +int hb_stat(const char *path, hb_stat_t *sb); +FILE * hb_fopen(const char *path, const char *mode); + #ifdef __LIBHB__ +// Convert utf8 string to current code page. +char * hb_utf8_to_cp(const char *src); + /* Everything from now is only used internally and hidden to the UI */ /************************************************************************ @@ -62,7 +88,6 @@ int hb_dvd_region(char *device, int *region_mask); void hb_get_temporary_directory( char path[512] ); void hb_get_tempory_filename( hb_handle_t *, char name[1024], char * fmt, ... ); -void hb_mkdir( char * name ); /************************************************************************ * Threads |