summaryrefslogtreecommitdiffstats
path: root/libhb/batch.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2013-09-22 17:19:38 +0000
committerjstebbins <[email protected]>2013-09-22 17:19:38 +0000
commit5e712218d8eb3f71a06356ed6f952b86ca947fca (patch)
treecd20ec0c7f22a94c11594deb195c7ec939dee4d1 /libhb/batch.c
parent10fda25f44d362349694a42127e8ba4974a4a6ad (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/batch.c')
-rw-r--r--libhb/batch.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libhb/batch.c b/libhb/batch.c
index 420ac6489..f2a015baa 100644
--- a/libhb/batch.c
+++ b/libhb/batch.c
@@ -24,28 +24,28 @@ struct hb_batch_s
hb_batch_t * hb_batch_init( char * path )
{
hb_batch_t * d;
- struct stat sb;
- DIR * dir;
+ hb_stat_t sb;
+ HB_DIR * dir;
struct dirent * entry;
char * filename;
- if ( stat( path, &sb ) )
+ if ( hb_stat( path, &sb ) )
return NULL;
if ( !S_ISDIR( sb.st_mode ) )
return NULL;
- dir = opendir( path );
+ dir = hb_opendir(path);
if ( dir == NULL )
return NULL;
d = calloc( sizeof( hb_batch_t ), 1 );
d->list_file = hb_list_init();
- while ( (entry = readdir( dir ) ) )
+ while ( (entry = hb_readdir( dir ) ) )
{
filename = hb_strdup_printf( "%s" DIR_SEP_STR "%s", path, entry->d_name );
- if ( stat( filename, &sb ) )
+ if ( hb_stat( filename, &sb ) )
{
free( filename );
continue;
@@ -60,7 +60,7 @@ hb_batch_t * hb_batch_init( char * path )
hb_list_add( d->list_file, filename );
}
- closedir( dir );
+ hb_closedir( dir );
if ( hb_list_count( d->list_file ) == 0 )
{
hb_list_close( &d->list_file );