From 5e712218d8eb3f71a06356ed6f952b86ca947fca Mon Sep 17 00:00:00 2001 From: jstebbins Date: Sun, 22 Sep 2013 17:19:38 +0000 Subject: 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 --- libhb/ports.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'libhb/ports.h') 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 -- cgit v1.2.3