Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
7e45ab1b
Commit
7e45ab1b
authored
15 years ago
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
utf8_* -> vlc_* (sed roxxors)
parent
d601e4ed
Changes
68
Hide whitespace changes
Inline
Side-by-side
Showing
68 changed files
with
190 additions
and
190 deletions
+190
-190
include/vlc_common.h
include/vlc_common.h
+1
-1
include/vlc_fixups.h
include/vlc_fixups.h
+2
-2
include/vlc_fs.h
include/vlc_fs.h
+11
-11
modules/access/bd/bd.c
modules/access/bd/bd.c
+4
-4
modules/access/dc1394.c
modules/access/dc1394.c
+1
-1
modules/access/directory.c
modules/access/directory.c
+3
-3
modules/access/dvb/linux_dvb.c
modules/access/dvb/linux_dvb.c
+4
-4
modules/access/dvdnav.c
modules/access/dvdnav.c
+1
-1
modules/access/file.c
modules/access/file.c
+1
-1
modules/access/mmap.c
modules/access/mmap.c
+1
-1
modules/access/mtp.c
modules/access/mtp.c
+2
-2
modules/access/oss.c
modules/access/oss.c
+2
-2
modules/access/pvr.c
modules/access/pvr.c
+2
-2
modules/access/smb.c
modules/access/smb.c
+1
-1
modules/access/v4l.c
modules/access/v4l.c
+1
-1
modules/access/v4l2.c
modules/access/v4l2.c
+2
-2
modules/access/vcd/cdrom.c
modules/access/vcd/cdrom.c
+5
-5
modules/access_output/file.c
modules/access_output/file.c
+1
-1
modules/audio_output/file.c
modules/audio_output/file.c
+1
-1
modules/audio_output/oss.c
modules/audio_output/oss.c
+1
-1
modules/control/http/http.c
modules/control/http/http.c
+2
-2
modules/control/http/mvar.c
modules/control/http/mvar.c
+2
-2
modules/control/http/util.c
modules/control/http/util.c
+4
-4
modules/demux/demuxdump.c
modules/demux/demuxdump.c
+1
-1
modules/demux/mkv/mkv.cpp
modules/demux/mkv/mkv.cpp
+2
-2
modules/demux/mp4/drms.c
modules/demux/mp4/drms.c
+3
-3
modules/demux/ts.c
modules/demux/ts.c
+1
-1
modules/gui/fbosd.c
modules/gui/fbosd.c
+1
-1
modules/gui/ncurses.c
modules/gui/ncurses.c
+3
-3
modules/gui/skins2/src/theme_loader.cpp
modules/gui/skins2/src/theme_loader.cpp
+4
-4
modules/gui/skins2/src/theme_repository.cpp
modules/gui/skins2/src/theme_repository.cpp
+2
-2
modules/meta_engine/folder.c
modules/meta_engine/folder.c
+1
-1
modules/misc/dummy/decoder.c
modules/misc/dummy/decoder.c
+1
-1
modules/misc/gnutls.c
modules/misc/gnutls.c
+5
-5
modules/misc/logger.c
modules/misc/logger.c
+1
-1
modules/misc/lua/libs/net.c
modules/misc/lua/libs/net.c
+3
-3
modules/misc/lua/vlc.c
modules/misc/lua/vlc.c
+4
-4
modules/misc/osd/simple.c
modules/misc/osd/simple.c
+1
-1
modules/misc/screensaver.c
modules/misc/screensaver.c
+1
-1
modules/misc/svg.c
modules/misc/svg.c
+1
-1
modules/services_discovery/mediadirs.c
modules/services_discovery/mediadirs.c
+1
-1
modules/stream_filter/record.c
modules/stream_filter/record.c
+1
-1
modules/stream_out/raop.c
modules/stream_out/raop.c
+1
-1
modules/stream_out/record.c
modules/stream_out/record.c
+2
-2
modules/stream_out/rtp.c
modules/stream_out/rtp.c
+1
-1
modules/stream_out/switcher.c
modules/stream_out/switcher.c
+1
-1
modules/video_filter/dynamicoverlay/dynamicoverlay.c
modules/video_filter/dynamicoverlay/dynamicoverlay.c
+2
-2
modules/video_output/fb.c
modules/video_output/fb.c
+1
-1
modules/video_output/omapfb.c
modules/video_output/omapfb.c
+2
-2
modules/video_output/yuv.c
modules/video_output/yuv.c
+1
-1
src/config/file.c
src/config/file.c
+11
-11
src/input/es_out_timeshift.c
src/input/es_out_timeshift.c
+5
-5
src/input/input.c
src/input/input.c
+3
-3
src/input/subtitles.c
src/input/subtitles.c
+2
-2
src/input/vlmshell.c
src/input/vlmshell.c
+1
-1
src/libvlc.c
src/libvlc.c
+1
-1
src/libvlccore.sym
src/libvlccore.sym
+10
-10
src/misc/image.c
src/misc/image.c
+1
-1
src/misc/rand.c
src/misc/rand.c
+1
-1
src/misc/update.c
src/misc/update.c
+8
-8
src/misc/update_crypto.c
src/misc/update_crypto.c
+1
-1
src/modules/cache.c
src/modules/cache.c
+7
-7
src/modules/modules.c
src/modules/modules.c
+3
-3
src/network/acl.c
src/network/acl.c
+1
-1
src/playlist/art.c
src/playlist/art.c
+6
-6
src/playlist/loadsave.c
src/playlist/loadsave.c
+2
-2
src/text/filesystem.c
src/text/filesystem.c
+21
-21
src/video_output/snapshot.c
src/video_output/snapshot.c
+3
-3
No files found.
include/vlc_common.h
View file @
7e45ab1b
...
...
@@ -402,7 +402,7 @@ struct _stati64;
#define fstat _fstati64
#endif
/* You should otherwise use
utf8
_stat and utf8_lstat. */
/* You should otherwise use
vlc
_stat and utf8_lstat. */
#else
struct
stat
;
#endif
...
...
This diff is collapsed.
Click to expand it.
include/vlc_fixups.h
View file @
7e45ab1b
...
...
@@ -191,8 +191,8 @@ static inline locale_t newlocale(int mask, const char * locale, locale_t base)
#ifdef WIN32
# include <dirent.h>
# define opendir Use_
utf8
_opendir_or_vlc_wopendir_instead!
# define readdir Use_
utf8
_readdir_or_vlc_wreaddir_instead!
# define opendir Use_
vlc
_opendir_or_vlc_wopendir_instead!
# define readdir Use_
vlc
_readdir_or_vlc_wreaddir_instead!
# define closedir vlc_wclosedir
#endif
...
...
This diff is collapsed.
Click to expand it.
include/vlc_fs.h
View file @
7e45ab1b
...
...
@@ -31,26 +31,26 @@
#include <sys/types.h>
#include <dirent.h>
VLC_EXPORT
(
int
,
utf8
_open
,
(
const
char
*
filename
,
int
flags
,
...
)
LIBVLC_USED
);
VLC_EXPORT
(
FILE
*
,
utf8
_fopen
,
(
const
char
*
filename
,
const
char
*
mode
)
LIBVLC_USED
);
VLC_EXPORT
(
int
,
vlc
_open
,
(
const
char
*
filename
,
int
flags
,
...
)
LIBVLC_USED
);
VLC_EXPORT
(
FILE
*
,
vlc
_fopen
,
(
const
char
*
filename
,
const
char
*
mode
)
LIBVLC_USED
);
VLC_EXPORT
(
DIR
*
,
utf8
_opendir
,
(
const
char
*
dirname
)
LIBVLC_USED
);
VLC_EXPORT
(
char
*
,
utf8
_readdir
,
(
DIR
*
dir
)
LIBVLC_USED
);
VLC_EXPORT
(
int
,
utf8
_loaddir
,
(
DIR
*
dir
,
char
***
namelist
,
int
(
*
select
)(
const
char
*
),
int
(
*
compar
)(
const
char
**
,
const
char
**
)
)
);
VLC_EXPORT
(
int
,
utf8
_scandir
,
(
const
char
*
dirname
,
char
***
namelist
,
int
(
*
select
)(
const
char
*
),
int
(
*
compar
)(
const
char
**
,
const
char
**
)
)
);
VLC_EXPORT
(
int
,
utf8
_mkdir
,
(
const
char
*
filename
,
mode_t
mode
)
);
VLC_EXPORT
(
DIR
*
,
vlc
_opendir
,
(
const
char
*
dirname
)
LIBVLC_USED
);
VLC_EXPORT
(
char
*
,
vlc
_readdir
,
(
DIR
*
dir
)
LIBVLC_USED
);
VLC_EXPORT
(
int
,
vlc
_loaddir
,
(
DIR
*
dir
,
char
***
namelist
,
int
(
*
select
)(
const
char
*
),
int
(
*
compar
)(
const
char
**
,
const
char
**
)
)
);
VLC_EXPORT
(
int
,
vlc
_scandir
,
(
const
char
*
dirname
,
char
***
namelist
,
int
(
*
select
)(
const
char
*
),
int
(
*
compar
)(
const
char
**
,
const
char
**
)
)
);
VLC_EXPORT
(
int
,
vlc
_mkdir
,
(
const
char
*
filename
,
mode_t
mode
)
);
VLC_EXPORT
(
int
,
utf8
_unlink
,
(
const
char
*
filename
)
);
VLC_EXPORT
(
int
,
vlc
_unlink
,
(
const
char
*
filename
)
);
/* Not exported */
int
utf8
_rename
(
const
char
*
,
const
char
*
);
int
vlc
_rename
(
const
char
*
,
const
char
*
);
#if defined( WIN32 ) && !defined( UNDER_CE )
# define stat _stati64
#endif
VLC_EXPORT
(
int
,
utf8
_stat
,
(
const
char
*
filename
,
struct
stat
*
buf
)
);
VLC_EXPORT
(
int
,
vlc
_stat
,
(
const
char
*
filename
,
struct
stat
*
buf
)
);
VLC_EXPORT
(
int
,
utf8_lstat
,
(
const
char
*
filename
,
struct
stat
*
buf
)
);
VLC_EXPORT
(
int
,
utf8
_mkstemp
,
(
char
*
)
);
VLC_EXPORT
(
int
,
vlc
_mkstemp
,
(
char
*
)
);
#endif
This diff is collapsed.
Click to expand it.
modules/access/bd/bd.c
View file @
7e45ab1b
...
...
@@ -944,7 +944,7 @@ static int CheckFileList( const char *psz_base, const char *ppsz_name[] )
if
(
asprintf
(
&
psz_tmp
,
"%s/%s"
,
psz_base
,
ppsz_name
[
i
]
)
<
0
)
return
VLC_EGENERIC
;
bool
b_ok
=
utf8
_stat
(
psz_tmp
,
&
s
)
==
0
&&
S_ISREG
(
s
.
st_mode
);
bool
b_ok
=
vlc
_stat
(
psz_tmp
,
&
s
)
==
0
&&
S_ISREG
(
s
.
st_mode
);
free
(
psz_tmp
);
if
(
!
b_ok
)
...
...
@@ -968,13 +968,13 @@ static char *FindPathBase( const char *psz_path, bool *pb_shortname )
psz_base
[
strlen
(
psz_base
)
-
1
]
=
'\0'
;
/* */
if
(
utf8
_stat
(
psz_base
,
&
s
)
||
!
S_ISDIR
(
s
.
st_mode
)
)
if
(
vlc
_stat
(
psz_base
,
&
s
)
||
!
S_ISDIR
(
s
.
st_mode
)
)
goto
error
;
/* Check BDMV */
if
(
asprintf
(
&
psz_tmp
,
"%s/BDMV"
,
psz_base
)
<
0
)
goto
error
;
if
(
!
utf8
_stat
(
psz_tmp
,
&
s
)
&&
S_ISDIR
(
s
.
st_mode
)
)
if
(
!
vlc
_stat
(
psz_tmp
,
&
s
)
&&
S_ISDIR
(
s
.
st_mode
)
)
{
free
(
psz_base
);
psz_base
=
psz_tmp
;
...
...
@@ -1212,7 +1212,7 @@ static int Load( demux_t *p_demux,
char
**
ppsz_list
;
int
i_list
=
utf8
_scandir
(
psz_playlist
,
&
ppsz_list
,
pf_filter
,
ScanSort
);
int
i_list
=
vlc
_scandir
(
psz_playlist
,
&
ppsz_list
,
pf_filter
,
ScanSort
);
for
(
int
i
=
0
;
i
<
i_list
;
i
++
)
{
...
...
This diff is collapsed.
Click to expand it.
modules/access/dc1394.c
View file @
7e45ab1b
...
...
@@ -442,7 +442,7 @@ static int OpenAudioDev( demux_t *p_demux )
int
i_format
=
AFMT_S16_LE
;
int
result
;
p_sys
->
fd_audio
=
utf8
_open
(
psz_device
,
O_RDONLY
|
O_NONBLOCK
);
p_sys
->
fd_audio
=
vlc
_open
(
psz_device
,
O_RDONLY
|
O_NONBLOCK
);
if
(
p_sys
->
fd_audio
<
0
)
{
msg_Err
(
p_demux
,
"Cannot open audio device (%s)"
,
psz_device
);
...
...
This diff is collapsed.
Click to expand it.
modules/access/directory.c
View file @
7e45ab1b
...
...
@@ -98,7 +98,7 @@ int DirOpen( vlc_object_t *p_this )
if
(
!
p_access
->
psz_path
)
return
VLC_EGENERIC
;
DIR
*
handle
=
utf8
_opendir
(
p_access
->
psz_path
);
DIR
*
handle
=
vlc
_opendir
(
p_access
->
psz_path
);
if
(
handle
==
NULL
)
return
VLC_EGENERIC
;
...
...
@@ -228,7 +228,7 @@ block_t *DirBlock (access_t *p_access)
return
block
;
}
char
*
entry
=
utf8
_readdir
(
current
->
handle
);
char
*
entry
=
vlc
_readdir
(
current
->
handle
);
if
(
entry
==
NULL
)
{
/* End of directory, go back to parent */
closedir
(
current
->
handle
);
...
...
@@ -289,7 +289,7 @@ block_t *DirBlock (access_t *p_access)
}
sprintf
(
sub
->
path
,
"%s/%s"
,
current
->
path
,
entry
);
DIR
*
handle
=
utf8
_opendir
(
sub
->
path
);
DIR
*
handle
=
vlc
_opendir
(
sub
->
path
);
if
(
handle
!=
NULL
)
{
sub
->
parent
=
current
;
...
...
This diff is collapsed.
Click to expand it.
modules/access/dvb/linux_dvb.c
View file @
7e45ab1b
...
...
@@ -117,7 +117,7 @@ int FrontendOpen( access_t *p_access )
return
VLC_ENOMEM
;
msg_Dbg
(
p_access
,
"Opening device %s"
,
frontend
);
if
(
(
p_sys
->
i_frontend_handle
=
utf8
_open
(
frontend
,
O_RDWR
|
O_NONBLOCK
))
<
0
)
if
(
(
p_sys
->
i_frontend_handle
=
vlc
_open
(
frontend
,
O_RDWR
|
O_NONBLOCK
))
<
0
)
{
msg_Err
(
p_access
,
"FrontEndOpen: opening device failed (%m)"
);
free
(
p_frontend
);
...
...
@@ -1332,7 +1332,7 @@ int DMXSetFilter( access_t * p_access, int i_pid, int * pi_fd, int i_type )
}
msg_Dbg
(
p_access
,
"Opening device %s"
,
dmx
);
if
(
(
*
pi_fd
=
utf8
_open
(
dmx
,
O_RDWR
))
<
0
)
if
(
(
*
pi_fd
=
vlc
_open
(
dmx
,
O_RDWR
))
<
0
)
{
msg_Err
(
p_access
,
"DMXSetFilter: opening device failed (%m)"
);
return
VLC_EGENERIC
;
...
...
@@ -1489,7 +1489,7 @@ int DVROpen( access_t * p_access )
}
msg_Dbg
(
p_access
,
"Opening device %s"
,
dvr
);
if
(
(
p_sys
->
i_handle
=
utf8
_open
(
dvr
,
O_RDONLY
))
<
0
)
if
(
(
p_sys
->
i_handle
=
vlc
_open
(
dvr
,
O_RDONLY
))
<
0
)
{
msg_Err
(
p_access
,
"DVROpen: opening device failed (%m)"
);
return
VLC_EGENERIC
;
...
...
@@ -1539,7 +1539,7 @@ int CAMOpen( access_t *p_access )
memset
(
&
caps
,
0
,
sizeof
(
ca_caps_t
));
msg_Dbg
(
p_access
,
"Opening device %s"
,
ca
);
if
(
(
p_sys
->
i_ca_handle
=
utf8
_open
(
ca
,
O_RDWR
|
O_NONBLOCK
))
<
0
)
if
(
(
p_sys
->
i_ca_handle
=
vlc
_open
(
ca
,
O_RDWR
|
O_NONBLOCK
))
<
0
)
{
msg_Warn
(
p_access
,
"CAMInit: opening CAM device failed (%m)"
);
p_sys
->
i_ca_handle
=
0
;
...
...
This diff is collapsed.
Click to expand it.
modules/access/dvdnav.c
View file @
7e45ab1b
...
...
@@ -1369,7 +1369,7 @@ static int ProbeDVD( demux_t *p_demux, char *psz_name )
return
VLC_SUCCESS
;
}
if
(
(
i_fd
=
utf8
_open
(
psz_name
,
O_RDONLY
|
O_NONBLOCK
))
==
-
1
)
if
(
(
i_fd
=
vlc
_open
(
psz_name
,
O_RDONLY
|
O_NONBLOCK
))
==
-
1
)
{
return
VLC_SUCCESS
;
/* Let dvdnav_open() do the probing */
}
...
...
This diff is collapsed.
Click to expand it.
modules/access/file.c
View file @
7e45ab1b
...
...
@@ -162,7 +162,7 @@ int Open( vlc_object_t *p_this )
else
{
msg_Dbg
(
p_access
,
"opening file `%s'"
,
path
);
fd
=
utf8
_open
(
path
,
O_RDONLY
|
O_NONBLOCK
);
fd
=
vlc
_open
(
path
,
O_RDONLY
|
O_NONBLOCK
);
if
(
fd
==
-
1
)
{
msg_Err
(
p_access
,
"cannot open file %s (%m)"
,
path
);
...
...
This diff is collapsed.
Click to expand it.
modules/access/mmap.c
View file @
7e45ab1b
...
...
@@ -94,7 +94,7 @@ static int Open (vlc_object_t *p_this)
STANDARD_BLOCK_ACCESS_INIT
;
msg_Dbg
(
p_access
,
"opening file %s"
,
path
);
fd
=
utf8
_open
(
path
,
O_RDONLY
|
O_NOCTTY
);
fd
=
vlc
_open
(
path
,
O_RDONLY
|
O_NOCTTY
);
if
(
fd
==
-
1
)
{
...
...
This diff is collapsed.
Click to expand it.
modules/access/mtp.c
View file @
7e45ab1b
...
...
@@ -187,7 +187,7 @@ static void Close( vlc_object_t * p_this )
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
close
(
p_sys
->
fd
);
if
(
utf8
_unlink
(
p_access
->
psz_path
)
!=
0
)
if
(
vlc
_unlink
(
p_access
->
psz_path
)
!=
0
)
msg_Err
(
p_access
,
"Error deleting file %s, %m"
,
p_access
->
psz_path
);
free
(
p_sys
);
}
...
...
@@ -297,7 +297,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
*****************************************************************************/
static
int
open_file
(
access_t
*
p_access
,
const
char
*
path
)
{
int
fd
=
utf8
_open
(
path
,
O_RDONLY
|
O_NONBLOCK
);
int
fd
=
vlc
_open
(
path
,
O_RDONLY
|
O_NONBLOCK
);
if
(
fd
==
-
1
)
{
msg_Err
(
p_access
,
"cannot open file %s (%m)"
,
path
);
...
...
This diff is collapsed.
Click to expand it.
modules/access/oss.c
View file @
7e45ab1b
...
...
@@ -340,7 +340,7 @@ static int OpenAudioDevOss( demux_t *p_demux )
int
i_fd
;
int
i_format
;
i_fd
=
utf8
_open
(
p_demux
->
p_sys
->
psz_device
,
O_RDONLY
|
O_NONBLOCK
);
i_fd
=
vlc
_open
(
p_demux
->
p_sys
->
psz_device
,
O_RDONLY
|
O_NONBLOCK
);
if
(
i_fd
<
0
)
{
...
...
@@ -416,7 +416,7 @@ static int OpenAudioDev( demux_t *p_demux )
static
bool
ProbeAudioDevOss
(
demux_t
*
p_demux
,
const
char
*
psz_device
)
{
int
i_caps
;
int
i_fd
=
utf8
_open
(
psz_device
,
O_RDONLY
|
O_NONBLOCK
);
int
i_fd
=
vlc
_open
(
psz_device
,
O_RDONLY
|
O_NONBLOCK
);
if
(
i_fd
<
0
)
{
...
...
This diff is collapsed.
Click to expand it.
modules/access/pvr.c
View file @
7e45ab1b
...
...
@@ -663,7 +663,7 @@ static int Open( vlc_object_t * p_this )
free
(
psz_tofree
);
/* open the device */
p_sys
->
i_fd
=
utf8
_open
(
p_sys
->
psz_videodev
,
O_RDWR
);
p_sys
->
i_fd
=
vlc
_open
(
p_sys
->
psz_videodev
,
O_RDWR
);
if
(
p_sys
->
i_fd
<
0
)
{
msg_Err
(
p_access
,
"Cannot open device %s (%m)."
,
...
...
@@ -773,7 +773,7 @@ static int Open( vlc_object_t * p_this )
if
(
(
p_sys
->
i_frequency
>=
pi_radio_range
[
0
])
&&
(
p_sys
->
i_frequency
<=
pi_radio_range
[
1
])
)
{
p_sys
->
i_radio_fd
=
utf8
_open
(
p_sys
->
psz_radiodev
,
O_RDWR
);
p_sys
->
i_radio_fd
=
vlc
_open
(
p_sys
->
psz_radiodev
,
O_RDWR
);
if
(
p_sys
->
i_radio_fd
<
0
)
{
msg_Err
(
p_access
,
"Cannot open radio device (%m)."
);
...
...
This diff is collapsed.
Click to expand it.
modules/access/smb.c
View file @
7e45ab1b
...
...
@@ -41,7 +41,7 @@
# include <sys/stat.h>
# endif
# include <io.h>
# define smbc_open(a,b,c)
utf8
_open(a,b,c)
# define smbc_open(a,b,c)
vlc
_open(a,b,c)
# define smbc_fstat(a,b) _fstati64(a,b)
# define smbc_read read
# define smbc_lseek _lseeki64
...
...
This diff is collapsed.
Click to expand it.
modules/access/v4l.c
View file @
7e45ab1b
...
...
@@ -288,7 +288,7 @@ struct demux_sys_t
# define v4l1_ioctl ioctl
# define v4l1_mmap mmap
# define v4l1_munmap munmap
# define v4l1_open
utf8
_open
# define v4l1_open
vlc
_open
#endif
/*****************************************************************************
...
...
This diff is collapsed.
Click to expand it.
modules/access/v4l2.c
View file @
7e45ab1b
...
...
@@ -593,7 +593,7 @@ struct demux_sys_t
#ifdef HAVE_LIBV4L2
static
void
use_kernel_v4l2
(
demux_sys_t
*
p_sys
)
{
p_sys
->
pf_open
=
utf8
_open
;
p_sys
->
pf_open
=
vlc
_open
;
p_sys
->
pf_close
=
close
;
p_sys
->
pf_dup
=
dup
;
p_sys
->
pf_ioctl
=
ioctl
;
...
...
@@ -623,7 +623,7 @@ static void use_libv4l2( demux_sys_t *p_sys )
# define v4l2_mmap (p_sys->pf_mmap)
# define v4l2_munmap (p_sys->pf_munmap)
#else
# define v4l2_open
utf8
_open
# define v4l2_open
vlc
_open
# define v4l2_close close
# define v4l2_dup dup
# define v4l2_ioctl ioctl
...
...
This diff is collapsed.
Click to expand it.
modules/access/vcd/cdrom.c
View file @
7e45ab1b
...
...
@@ -114,7 +114,7 @@ vcddev_t *ioctl_Open( vlc_object_t *p_this, const char *psz_dev )
}
#else
if
(
utf8
_stat
(
psz_dev
,
&
fileinfo
)
<
0
)
if
(
vlc
_stat
(
psz_dev
,
&
fileinfo
)
<
0
)
{
free
(
p_vcddev
);
return
NULL
;
...
...
@@ -139,7 +139,7 @@ vcddev_t *ioctl_Open( vlc_object_t *p_this, const char *psz_dev )
i_ret
=
win32_vcd_open
(
p_this
,
psz_dev
,
p_vcddev
);
#else
p_vcddev
->
i_device_handle
=
-
1
;
p_vcddev
->
i_device_handle
=
utf8
_open
(
psz_dev
,
O_RDONLY
|
O_NONBLOCK
);
p_vcddev
->
i_device_handle
=
vlc
_open
(
psz_dev
,
O_RDONLY
|
O_NONBLOCK
);
i_ret
=
(
p_vcddev
->
i_device_handle
==
-
1
)
?
-
1
:
0
;
#endif
}
...
...
@@ -669,7 +669,7 @@ static int OpenVCDImage( vlc_object_t * p_this, const char *psz_dev,
/* Open the cue file and try to parse it */
msg_Dbg
(
p_this
,
"trying .cue file: %s"
,
psz_cuefile
);
cuefile
=
utf8
_fopen
(
psz_cuefile
,
"rt"
);
cuefile
=
vlc
_fopen
(
psz_cuefile
,
"rt"
);
if
(
cuefile
==
NULL
)
{
msg_Dbg
(
p_this
,
"could not find .cue file"
);
...
...
@@ -677,7 +677,7 @@ static int OpenVCDImage( vlc_object_t * p_this, const char *psz_dev,
}
msg_Dbg
(
p_this
,
"guessing vcd image file: %s"
,
psz_vcdfile
);
p_vcddev
->
i_vcdimage_handle
=
utf8
_open
(
psz_vcdfile
,
p_vcddev
->
i_vcdimage_handle
=
vlc
_open
(
psz_vcdfile
,
O_RDONLY
|
O_NONBLOCK
|
O_BINARY
);
while
(
fgets
(
line
,
1024
,
cuefile
)
&&
!
b_found
)
...
...
@@ -707,7 +707,7 @@ static int OpenVCDImage( vlc_object_t * p_this, const char *psz_dev,
strcpy
(
psz_vcdfile
+
(
p_pos
-
psz_cuefile
+
1
),
filename
);
}
else
psz_vcdfile
=
strdup
(
filename
);
msg_Dbg
(
p_this
,
"using vcd image file: %s"
,
psz_vcdfile
);
p_vcddev
->
i_vcdimage_handle
=
utf8
_open
(
psz_vcdfile
,
p_vcddev
->
i_vcdimage_handle
=
vlc
_open
(
psz_vcdfile
,
O_RDONLY
|
O_NONBLOCK
|
O_BINARY
);
}
b_found
=
true
;
...
...
This diff is collapsed.
Click to expand it.
modules/access_output/file.c
View file @
7e45ab1b
...
...
@@ -131,7 +131,7 @@ static int Open( vlc_object_t *p_this )
char
*
psz_tmp
=
str_format
(
p_access
,
p_access
->
psz_path
);
path_sanitize
(
psz_tmp
);
fd
=
utf8
_open
(
psz_tmp
,
O_RDWR
|
O_CREAT
|
O_LARGEFILE
|
fd
=
vlc
_open
(
psz_tmp
,
O_RDWR
|
O_CREAT
|
O_LARGEFILE
|
(
append
?
0
:
O_TRUNC
),
0666
);
free
(
psz_tmp
);
}
...
...
This diff is collapsed.
Click to expand it.
modules/audio_output/file.c
View file @
7e45ab1b
...
...
@@ -154,7 +154,7 @@ static int Open( vlc_object_t * p_this )
if
(
!
strcmp
(
psz_name
,
"-"
)
)
p_aout
->
output
.
p_sys
->
p_file
=
stdout
;
else
p_aout
->
output
.
p_sys
->
p_file
=
utf8
_fopen
(
psz_name
,
"wb"
);
p_aout
->
output
.
p_sys
->
p_file
=
vlc
_fopen
(
psz_name
,
"wb"
);
free
(
psz_name
);
if
(
p_aout
->
output
.
p_sys
->
p_file
==
NULL
)
...
...
This diff is collapsed.
Click to expand it.
modules/audio_output/oss.c
View file @
7e45ab1b
...
...
@@ -290,7 +290,7 @@ static int Open( vlc_object_t *p_this )
* wait forever until the device is available. Since this breaks the
* OSS spec, we immediately put it back to blocking mode if the
* operation was successful. */
p_sys
->
i_fd
=
utf8
_open
(
psz_device
,
O_WRONLY
|
O_NDELAY
);
p_sys
->
i_fd
=
vlc
_open
(
psz_device
,
O_WRONLY
|
O_NDELAY
);
if
(
p_sys
->
i_fd
<
0
)
{
msg_Err
(
p_aout
,
"cannot open audio device (%s)"
,
psz_device
);
...
...
This diff is collapsed.
Click to expand it.
modules/control/http/http.c
View file @
7e45ab1b
...
...
@@ -506,7 +506,7 @@ int HttpCallback( httpd_file_sys_t *p_args,
char
**
pp_data
=
(
char
**
)
_pp_data
;
FILE
*
f
;
if
(
(
f
=
utf8
_fopen
(
p_args
->
file
,
"r"
)
)
==
NULL
)
if
(
(
f
=
vlc
_fopen
(
p_args
->
file
,
"r"
)
)
==
NULL
)
{
Callback404
(
p_args
,
pp_data
,
pi_data
);
return
VLC_SUCCESS
;
...
...
@@ -810,7 +810,7 @@ int ArtCallback( httpd_handler_sys_t *p_args,
char
*
p_data
=
NULL
;
int
i_header_size
,
i_data
;
if
(
(
f
=
utf8
_fopen
(
psz_art
+
strlen
(
"file://"
),
"r"
)
)
==
NULL
)
if
(
(
f
=
vlc
_fopen
(
psz_art
+
strlen
(
"file://"
),
"r"
)
)
==
NULL
)
{
msg_Dbg
(
p_intf
,
"Couldn't open album art file %s"
,
psz_art
+
strlen
(
"file://"
)
);
...
...
This diff is collapsed.
Click to expand it.
modules/control/http/mvar.c
View file @
7e45ab1b
...
...
@@ -511,7 +511,7 @@ mvar_t *mvar_FileSetNew( intf_thread_t *p_intf, char *name,
psz_dir
=
RealPath
(
psz_dir
);
/* parse psz_src dir */
if
(
(
i_dir_content
=
utf8
_scandir
(
psz_dir
,
&
ppsz_dir_content
,
Filter
,
if
(
(
i_dir_content
=
vlc
_scandir
(
psz_dir
,
&
ppsz_dir_content
,
Filter
,
InsensitiveAlphasort
)
)
==
-
1
)
{
if
(
errno
!=
ENOENT
&&
errno
!=
ENOTDIR
)
...
...
@@ -540,7 +540,7 @@ mvar_t *mvar_FileSetNew( intf_thread_t *p_intf, char *name,
sprintf
(
psz_tmp
,
"%s"
DIR_SEP
"%s"
,
psz_dir
,
psz_name
);
#ifdef HAVE_SYS_STAT_H
if
(
utf8
_stat
(
psz_tmp
,
&
stat_info
)
==
-
1
)
if
(
vlc
_stat
(
psz_tmp
,
&
stat_info
)
==
-
1
)
{
free
(
psz_name
);
continue
;
...
...
This diff is collapsed.
Click to expand it.
modules/control/http/util.c
View file @
7e45ab1b
...
...
@@ -125,7 +125,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
int
i_dirlen
;
if
(
(
p_dir
=
utf8
_opendir
(
psz_dir
)
)
==
NULL
)
if
(
(
p_dir
=
vlc
_opendir
(
psz_dir
)
)
==
NULL
)
{
if
(
errno
!=
ENOENT
&&
errno
!=
ENOTDIR
)
msg_Err
(
p_intf
,
"cannot open directory (%s)"
,
psz_dir
);
...
...
@@ -143,7 +143,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
msg_Dbg
(
p_intf
,
"dir=%s"
,
psz_dir
);
snprintf
(
dir
,
sizeof
(
dir
),
"%s"
DIR_SEP
".access"
,
psz_dir
);
if
(
(
file
=
utf8
_fopen
(
dir
,
"r"
)
)
!=
NULL
)
if
(
(
file
=
vlc
_fopen
(
dir
,
"r"
)
)
!=
NULL
)
{
char
line
[
1024
];
int
i_size
;
...
...
@@ -182,7 +182,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
ACL_Destroy
(
p_acl
);
struct
stat
st
;
if
(
utf8
_stat
(
dir
,
&
st
)
==
0
)
if
(
vlc
_stat
(
dir
,
&
st
)
==
0
)
{
free
(
user
);
free
(
password
);
...
...
@@ -196,7 +196,7 @@ int ParseDirectory( intf_thread_t *p_intf, char *psz_root,
{
char
*
psz_filename
;
/* parse psz_src dir */
if
(
(
psz_filename
=
utf8
_readdir
(
p_dir
)
)
==
NULL
)
if
(
(
psz_filename
=
vlc
_readdir
(
p_dir
)
)
==
NULL
)
{
break
;
}
...
...
This diff is collapsed.
Click to expand it.
modules/demux/demuxdump.c
View file @
7e45ab1b
...
...
@@ -126,7 +126,7 @@ static int Open( vlc_object_t * p_this )
msg_Info
(
p_demux
,
"dumping raw stream to standard output"
);
p_sys
->
p_file
=
stdout
;
}
else
if
(
(
p_sys
->
p_file
=
utf8
_fopen
(
p_sys
->
psz_file
,
psz_mode
)
)
==
NULL
)
else
if
(
(
p_sys
->
p_file
=
vlc
_fopen
(
p_sys
->
psz_file
,
psz_mode
)
)
==
NULL
)
{
msg_Err
(
p_demux
,
"cannot create `%s' for writing"
,
p_sys
->
psz_file
);
free
(
p_sys
->
psz_file
);
...
...
This diff is collapsed.
Click to expand it.
modules/demux/mkv/mkv.cpp
View file @
7e45ab1b
...
...
@@ -157,12 +157,12 @@ static int Open( vlc_object_t * p_this )
}
}
DIR
*
p_src_dir
=
utf8
_opendir
(
s_path
.
c_str
());
DIR
*
p_src_dir
=
vlc
_opendir
(
s_path
.
c_str
());
if
(
p_src_dir
!=
NULL
)
{
char
*
psz_file
;
while
((
psz_file
=
utf8
_readdir
(
p_src_dir
))
!=
NULL
)
while
((
psz_file
=
vlc
_readdir
(
p_src_dir
))
!=
NULL
)
{
if
(
strlen
(
psz_file
)
>
4
)
{
...
...
This diff is collapsed.
Click to expand it.
modules/demux/mp4/drms.c
View file @
7e45ab1b
...
...
@@ -1363,7 +1363,7 @@ static int WriteUserKey( void *_p_drms, uint32_t *p_user_key )
snprintf
(
psz_path
,
PATH_MAX
-
1
,
"%s/"
DRMS_DIRNAME
"/%08X.%03d"
,
p_drms
->
psz_homedir
,
p_drms
->
i_user
,
p_drms
->
i_key
);
file
=
utf8
_fopen
(
psz_path
,
"wb"
);
file
=
vlc
_fopen
(
psz_path
,
"wb"
);
if
(
file
!=
NULL
)
{
i_ret
=
fwrite
(
p_user_key
,
sizeof
(
uint32_t
),
...
...
@@ -1391,7 +1391,7 @@ static int ReadUserKey( void *_p_drms, uint32_t *p_user_key )
"%s/"
DRMS_DIRNAME
"/%08X.%03d"
,
p_drms
->
psz_homedir
,
p_drms
->
i_user
,
p_drms
->
i_key
);
file
=
utf8
_fopen
(
psz_path
,
"rb"
);
file
=
vlc
_fopen
(
psz_path
,
"rb"
);
if
(
file
!=
NULL
)
{
i_ret
=
fread
(
p_user_key
,
sizeof
(
uint32_t
),
...
...
@@ -1591,7 +1591,7 @@ static int GetSCIData( char *psz_ipod, uint32_t **pp_sci,
return
-
1
;
}
file
=
utf8
_fopen
(
psz_path
,
"rb"
);
file
=
vlc
_fopen
(
psz_path
,
"rb"
);
if
(
file
!=
NULL
)
{
struct
stat
st
;
...
...
This diff is collapsed.
Click to expand it.
modules/demux/ts.c
View file @
7e45ab1b
...
...
@@ -609,7 +609,7 @@ static int Open( vlc_object_t *p_this )
msg_Info
(
p_demux
,
"dumping raw stream to standard output"
);
p_sys
->
p_file
=
stdout
;
}
else
if
(
(
p_sys
->
p_file
=
utf8
_fopen
(
p_sys
->
psz_file
,
psz_mode
)
)
==
NULL
)
else
if
(
(
p_sys
->
p_file
=
vlc
_fopen
(
p_sys
->
psz_file
,
psz_mode
)
)
==
NULL
)
{
msg_Err
(
p_demux
,
"cannot create `%s' for writing"
,
p_sys
->
psz_file
);
p_sys
->
b_file_out
=
false
;
...
...
This diff is collapsed.
Click to expand it.
modules/gui/fbosd.c
View file @
7e45ab1b
...
...
@@ -1059,7 +1059,7 @@ static int OpenDisplay( intf_thread_t *p_intf )
return
VLC_EGENERIC
;
}
p_sys
->
i_fd
=
utf8
_open
(
psz_device
,
O_RDWR
);
p_sys
->
i_fd
=
vlc
_open
(
psz_device
,
O_RDWR
);
if
(
p_sys
->
i_fd
==
-
1
)
{
msg_Err
(
p_intf
,
"cannot open %s (%m)"
,
psz_device
);
...
...
This diff is collapsed.
Click to expand it.
modules/gui/ncurses.c
View file @
7e45ab1b
...
...
@@ -2489,7 +2489,7 @@ static void ReadDir( intf_thread_t *p_intf )
char
*
psz_entry
;
/* Open the dir */
p_current_dir
=
utf8
_opendir
(
p_sys
->
psz_current_dir
);
p_current_dir
=
vlc
_opendir
(
p_sys
->
psz_current_dir
);
if
(
p_current_dir
==
NULL
)
{
...
...
@@ -2511,7 +2511,7 @@ static void ReadDir( intf_thread_t *p_intf )
p_sys
->
i_dir_entries
=
0
;
/* while we still have entries in the directory */
while
(
(
psz_entry
=
utf8
_readdir
(
p_current_dir
)
)
!=
NULL
)
while
(
(
psz_entry
=
vlc
_readdir
(
p_current_dir
)
)
!=
NULL
)
{
#if defined( S_ISDIR )
struct
stat
stat_data
;
...
...
@@ -2542,7 +2542,7 @@ static void ReadDir( intf_thread_t *p_intf )
}
#if defined( S_ISDIR )
if
(
!
utf8
_stat
(
psz_uri
,
&
stat_data
)
if
(
!
vlc
_stat
(
psz_uri
,
&
stat_data
)
&&
S_ISDIR
(
stat_data
.
st_mode
)
)
/*#elif defined( DT_DIR )
if( p_dir_content->d_type & DT_DIR )*/
...
...
This diff is collapsed.
Click to expand it.
modules/gui/skins2/src/theme_loader.cpp
View file @
7e45ab1b
...
...
@@ -77,7 +77,7 @@ bool ThemeLoader::load( const string &fileName )
//Before all, let's see if the file is present
struct
stat
p_stat
;
if
(
utf8
_stat
(
path
.
c_str
(),
&
p_stat
)
)
if
(
vlc
_stat
(
path
.
c_str
(),
&
p_stat
)
)
return
false
;
// First, we try to un-targz the file, and if it fails we hope it's a XML
...
...
@@ -415,7 +415,7 @@ bool ThemeLoader::findFile( const string &rootDir, const string &rFileName,
char
*
pszDirContent
;
// Open the dir
pCurrDir
=
utf8
_opendir
(
rootDir
.
c_str
()
);
pCurrDir
=
vlc
_opendir
(
rootDir
.
c_str
()
);
if
(
pCurrDir
==
NULL
)
{
...
...
@@ -425,7 +425,7 @@ bool ThemeLoader::findFile( const string &rootDir, const string &rFileName,
}
// While we still have entries in the directory
while
(
(
pszDirContent
=
utf8
_readdir
(
pCurrDir
)
)
!=
NULL
)
while
(
(
pszDirContent
=
vlc
_readdir
(
pCurrDir
)
)
!=
NULL
)
{
string
newURI
=
rootDir
+
sep
+
pszDirContent
;
...
...
@@ -436,7 +436,7 @@ bool ThemeLoader::findFile( const string &rootDir, const string &rFileName,
#if defined( S_ISDIR )
struct
stat
stat_data
;
if
(
(
utf8
_stat
(
newURI
.
c_str
(),
&
stat_data
)
==
0
)
if
(
(
vlc
_stat
(
newURI
.
c_str
(),
&
stat_data
)
==
0
)
&&
S_ISDIR
(
stat_data
.
st_mode
)
)
#elif defined( DT_DIR )
if
(
pDirContent
->
d_type
&
DT_DIR
)
...
...
This diff is collapsed.
Click to expand it.
modules/gui/skins2/src/theme_repository.cpp
View file @
7e45ab1b
...
...
@@ -142,7 +142,7 @@ void ThemeRepository::parseDirectory( const string &rDir_locale )
// Open the dir
// FIXME: parseDirectory should be invoked with UTF-8 input instead!!
string
rDir
=
sFromLocale
(
rDir_locale
);
pDir
=
utf8
_opendir
(
rDir
.
c_str
()
);
pDir
=
vlc
_opendir
(
rDir
.
c_str
()
);
if
(
pDir
==
NULL
)
{
...
...
@@ -152,7 +152,7 @@ void ThemeRepository::parseDirectory( const string &rDir_locale )
}
// While we still have entries in the directory
while
(
(
pszDirContent
=
utf8
_readdir
(
pDir
)
)
!=
NULL
)
while
(
(
pszDirContent
=
vlc
_readdir
(
pDir
)
)
!=
NULL
)
{
string
name
=
pszDirContent
;
string
extension
;
...
...
This diff is collapsed.
Click to expand it.
modules/meta_engine/folder.c
View file @
7e45ab1b
...
...
@@ -122,7 +122,7 @@ static int FindMeta( vlc_object_t *p_this )
else
snprintf
(
psz_filename
,
MAX_PATH
,
"%s%s"
,
psz_path
,
cover_files
[
i
]
);
if
(
utf8
_stat
(
psz_filename
,
&
a
)
!=
-
1
)
if
(
vlc
_stat
(
psz_filename
,
&
a
)
!=
-
1
)
{
char
*
psz_uri
=
make_URI
(
psz_filename
);
if
(
psz_uri
)
...
...
This diff is collapsed.
Click to expand it.
modules/misc/dummy/decoder.c
View file @
7e45ab1b
...
...
@@ -85,7 +85,7 @@ static int OpenDecoderCommon( vlc_object_t *p_this, bool b_force_dump )
}
if
(
b_force_dump
)
{
p_sys
->
i_fd
=
utf8
_open
(
psz_file
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
,
00644
);
p_sys
->
i_fd
=
vlc
_open
(
psz_file
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
,
00644
);
if
(
p_sys
->
i_fd
==
-
1
)
{
...
...
This diff is collapsed.
Click to expand it.
modules/misc/gnutls.c
View file @
7e45ab1b
...
...
@@ -522,7 +522,7 @@ gnutls_Addx509Directory( vlc_object_t *p_this,
if
(
*
psz_dirname
==
'\0'
)
psz_dirname
=
"."
;
dir
=
utf8
_opendir
(
psz_dirname
);
dir
=
vlc
_opendir
(
psz_dirname
);
if
(
dir
==
NULL
)
{
if
(
errno
!=
ENOENT
)
...
...
@@ -533,7 +533,7 @@ gnutls_Addx509Directory( vlc_object_t *p_this,
msg_Dbg
(
p_this
,
"creating empty certificate directory: %s"
,
psz_dirname
);
utf8
_mkdir
(
psz_dirname
,
b_priv
?
0700
:
0755
);
vlc
_mkdir
(
psz_dirname
,
b_priv
?
0700
:
0755
);
return
VLC_SUCCESS
;
}
#ifdef S_ISLNK
...
...
@@ -559,7 +559,7 @@ gnutls_Addx509Directory( vlc_object_t *p_this,
for
(;;)
{
char
*
ent
=
utf8
_readdir
(
dir
);
char
*
ent
=
vlc
_readdir
(
dir
);
if
(
ent
==
NULL
)
break
;
...
...
@@ -588,7 +588,7 @@ gnutls_Addx509File( vlc_object_t *p_this,
{
struct
stat
st
;
int
fd
=
utf8
_open
(
psz_path
,
O_RDONLY
);
int
fd
=
vlc
_open
(
psz_path
,
O_RDONLY
);
if
(
fd
==
-
1
)
goto
error
;
...
...
@@ -681,7 +681,7 @@ static int OpenClient (vlc_object_t *obj)
{
char
path
[
strlen
(
userdir
)
+
sizeof
(
"/ssl/private"
)];
sprintf
(
path
,
"%s/ssl"
,
userdir
);
utf8
_mkdir
(
path
,
0755
);
vlc
_mkdir
(
path
,
0755
);
sprintf
(
path
,
"%s/ssl/certs"
,
userdir
);
gnutls_Addx509Directory
(
VLC_OBJECT
(
p_session
),
...
...
This diff is collapsed.
Click to expand it.
modules/misc/logger.c
View file @
7e45ab1b
...
...
@@ -261,7 +261,7 @@ static int Open( vlc_object_t *p_this )
/* Open the log file and remove any buffering for the stream */
msg_Dbg
(
p_intf
,
"opening logfile `%s'"
,
psz_file
);
p_sys
->
msg
.
p_file
=
utf8
_fopen
(
psz_file
,
"at"
);
p_sys
->
msg
.
p_file
=
vlc
_fopen
(
psz_file
,
"at"
);
if
(
p_sys
->
msg
.
p_file
==
NULL
)
{
msg_Err
(
p_intf
,
"error opening logfile `%s'"
,
psz_file
);
...
...
This diff is collapsed.
Click to expand it.
modules/misc/lua/libs/net.c
View file @
7e45ab1b
...
...
@@ -258,7 +258,7 @@ static int vlclua_stat( lua_State *L )
#ifdef HAVE_SYS_STAT_H
const
char
*
psz_path
=
luaL_checkstring
(
L
,
1
);
struct
stat
s
;
if
(
utf8
_stat
(
psz_path
,
&
s
)
)
if
(
vlc
_stat
(
psz_path
,
&
s
)
)
return
0
;
//return luaL_error( L, "Couldn't stat %s.", psz_path );
lua_newtable
(
L
);
...
...
@@ -316,13 +316,13 @@ static int vlclua_opendir( lua_State *L )
DIR
*
p_dir
;
int
i
=
0
;
if
(
(
p_dir
=
utf8
_opendir
(
psz_dir
)
)
==
NULL
)
if
(
(
p_dir
=
vlc
_opendir
(
psz_dir
)
)
==
NULL
)
return
luaL_error
(
L
,
"cannot open directory `%s'."
,
psz_dir
);
lua_newtable
(
L
);
for
(
;;
)
{
char
*
psz_filename
=
utf8
_readdir
(
p_dir
);
char
*
psz_filename
=
vlc
_readdir
(
p_dir
);
if
(
!
psz_filename
)
break
;
i
++
;
lua_pushstring
(
L
,
psz_filename
);
...
...
This diff is collapsed.
Click to expand it.
modules/misc/lua/vlc.c
View file @
7e45ab1b
...
...
@@ -219,7 +219,7 @@ int vlclua_scripts_batch_execute( vlc_object_t *p_this,
int
i_files
;
msg_Dbg
(
p_this
,
"Trying Lua scripts in %s"
,
*
ppsz_dir
);
i_files
=
utf8
_scandir
(
*
ppsz_dir
,
&
ppsz_filelist
,
file_select
,
i_files
=
vlc
_scandir
(
*
ppsz_dir
,
&
ppsz_filelist
,
file_select
,
file_compare
);
if
(
i_files
<
0
)
continue
;
...
...
@@ -277,7 +277,7 @@ char *vlclua_find_file( vlc_object_t *p_this, const char *psz_luadirname, const
return
NULL
;
}
if
(
utf8
_stat
(
psz_filename
,
&
st
)
==
0
if
(
vlc
_stat
(
psz_filename
,
&
st
)
==
0
&&
S_ISREG
(
st
.
st_mode
)
)
{
vlclua_dir_list_free
(
ppsz_dir_list
);
...
...
@@ -581,7 +581,7 @@ static int vlc_sd_probe_Open( vlc_object_t *obj )
free
(
ppsz_filelist
);
ppsz_filelist
=
NULL
;
}
i_files
=
utf8
_scandir
(
*
ppsz_dir
,
&
ppsz_filelist
,
file_select
,
i_files
=
vlc
_scandir
(
*
ppsz_dir
,
&
ppsz_filelist
,
file_select
,
file_compare
);
if
(
i_files
<
1
)
continue
;
ppsz_fileend
=
ppsz_filelist
+
i_files
;
...
...
@@ -593,7 +593,7 @@ static int vlc_sd_probe_Open( vlc_object_t *obj )
{
goto
error
;
}
FILE
*
fd
=
utf8
_fopen
(
psz_filename
,
"r"
);
FILE
*
fd
=
vlc
_fopen
(
psz_filename
,
"r"
);
if
(
fd
)
{
char
description
[
256
];
...
...
This diff is collapsed.
Click to expand it.
modules/misc/osd/simple.c
View file @
7e45ab1b
...
...
@@ -54,7 +54,7 @@ int osd_parser_simpleOpen( vlc_object_t *p_this )
if
(
!
p_menu
)
return
VLC_ENOOBJ
;
msg_Dbg
(
p_this
,
"opening osdmenu definition file %s"
,
p_menu
->
psz_file
);
fd
=
utf8
_fopen
(
p_menu
->
psz_file
,
"r"
);
fd
=
vlc
_fopen
(
p_menu
->
psz_file
,
"r"
);
if
(
!
fd
)
{
msg_Err
(
p_this
,
"failed to open osdmenu definition file %s"
,
...
...
This diff is collapsed.
Click to expand it.
modules/misc/screensaver.c
View file @
7e45ab1b
...
...
@@ -88,7 +88,7 @@ static int Activate( vlc_object_t *p_this )
}
p_ih
->
inhibit
=
Inhibit
;
int
fd
=
utf8
_open
(
"/dev/null"
,
O_WRONLY
);
int
fd
=
vlc
_open
(
"/dev/null"
,
O_WRONLY
);
posix_spawn_file_actions_init
(
&
p_sys
->
actions
);
if
(
fd
!=
-
1
)
{
...
...
This diff is collapsed.
Click to expand it.
modules/misc/svg.c
View file @
7e45ab1b
...
...
@@ -167,7 +167,7 @@ static char *svg_GetTemplate( vlc_object_t *p_this )
else
{
/* Read the template */
file
=
utf8
_fopen
(
psz_filename
,
"rt"
);
file
=
vlc
_fopen
(
psz_filename
,
"rt"
);
if
(
!
file
)
{
msg_Warn
(
p_this
,
"SVG template file %s does not exist."
,
...
...
This diff is collapsed.
Click to expand it.
modules/services_discovery/mediadirs.c
View file @
7e45ab1b
...
...
@@ -186,7 +186,7 @@ static void *Run( void *data )
/* make sure the directory exists */
struct
stat
st
;
if
(
psz_dir
==
NULL
||
utf8
_stat
(
psz_dir
,
&
st
)
||
vlc
_stat
(
psz_dir
,
&
st
)
||
!
S_ISDIR
(
st
.
st_mode
)
)
continue
;
...
...
This diff is collapsed.
Click to expand it.
modules/stream_filter/record.c
View file @
7e45ab1b
...
...
@@ -191,7 +191,7 @@ static int Start( stream_t *s, const char *psz_extension )
if
(
!
psz_file
)
return
VLC_ENOMEM
;
f
=
utf8
_fopen
(
psz_file
,
"wb"
);
f
=
vlc
_fopen
(
psz_file
,
"wb"
);
if
(
!
f
)
{
free
(
psz_file
);
...
...
This diff is collapsed.
Click to expand it.
modules/stream_out/raop.c
View file @
7e45ab1b
...
...
@@ -548,7 +548,7 @@ static char *ReadPasswordFile( vlc_object_t *p_this, const char *psz_path )
char
*
psz_newline
;
char
ps_buffer
[
256
];
p_file
=
utf8
_fopen
(
psz_path
,
"rt"
);
p_file
=
vlc
_fopen
(
psz_path
,
"rt"
);
if
(
p_file
==
NULL
)
{
msg_Err
(
p_this
,
"Unable to open password file '%s': %m"
,
psz_path
);
...
...
This diff is collapsed.
Click to expand it.
modules/stream_out/record.c
View file @
7e45ab1b
...
...
@@ -445,7 +445,7 @@ static void OutputStart( sout_stream_t *p_stream )
if
(
i_es
<
0
)
{
utf8
_unlink
(
psz_file
);
vlc
_unlink
(
psz_file
);
free
(
psz_file
);
continue
;
}
...
...
@@ -471,7 +471,7 @@ static void OutputStart( sout_stream_t *p_stream )
if
(
i_best_es
>=
p_sys
->
i_id
)
break
;
}
utf8
_unlink
(
psz_file
);
vlc
_unlink
(
psz_file
);
free
(
psz_file
);
}
...
...
This diff is collapsed.
Click to expand it.
modules/stream_out/rtp.c
View file @
7e45ab1b
...
...
@@ -1482,7 +1482,7 @@ static int FileSetup( sout_stream_t *p_stream )
if
(
p_sys
->
psz_sdp
==
NULL
)
return
VLC_EGENERIC
;
/* too early */
if
(
(
f
=
utf8
_fopen
(
p_sys
->
psz_sdp_file
,
"wt"
)
)
==
NULL
)
if
(
(
f
=
vlc
_fopen
(
p_sys
->
psz_sdp_file
,
"wt"
)
)
==
NULL
)
{
msg_Err
(
p_stream
,
"cannot open file '%s' (%m)"
,
p_sys
->
psz_sdp_file
);
...
...
This diff is collapsed.
Click to expand it.
modules/stream_out/switcher.c
View file @
7e45ab1b
...
...
@@ -602,7 +602,7 @@ static int UnpackFromFile( sout_stream_t *p_stream, const char *psz_file,
picture_t
*
p_pic
)
{
int
i
,
j
;
FILE
*
p_file
=
utf8
_fopen
(
psz_file
,
"r"
);
FILE
*
p_file
=
vlc
_fopen
(
psz_file
,
"r"
);
if
(
p_file
==
NULL
)
{
...
...
This diff is collapsed.
Click to expand it.
modules/video_filter/dynamicoverlay/dynamicoverlay.c
View file @
7e45ab1b
...
...
@@ -171,7 +171,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
vlc_mutex_lock
(
&
p_sys
->
lock
);
if
(
p_sys
->
i_inputfd
==
-
1
)
{
p_sys
->
i_inputfd
=
utf8
_open
(
p_sys
->
psz_inputfile
,
O_RDONLY
|
O_NONBLOCK
);
p_sys
->
i_inputfd
=
vlc
_open
(
p_sys
->
psz_inputfile
,
O_RDONLY
|
O_NONBLOCK
);
if
(
p_sys
->
i_inputfd
==
-
1
)
{
msg_Warn
(
p_filter
,
"Failed to grab input file: %s (%m)"
,
...
...
@@ -186,7 +186,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
if
(
p_sys
->
i_outputfd
==
-
1
)
{
p_sys
->
i_outputfd
=
utf8
_open
(
p_sys
->
psz_outputfile
,
p_sys
->
i_outputfd
=
vlc
_open
(
p_sys
->
psz_outputfile
,
O_WRONLY
|
O_NONBLOCK
);
if
(
p_sys
->
i_outputfd
==
-
1
)
{
...
...
This diff is collapsed.
Click to expand it.
modules/video_output/fb.c
View file @
7e45ab1b
...
...
@@ -524,7 +524,7 @@ static int OpenDisplay(vout_display_t *vd, bool force_resolution)
return
VLC_EGENERIC
;
}
sys
->
fd
=
utf8
_open
(
psz_device
,
O_RDWR
);
sys
->
fd
=
vlc
_open
(
psz_device
,
O_RDWR
);
if
(
sys
->
fd
==
-
1
)
{
msg_Err
(
vd
,
"cannot open %s (%m)"
,
psz_device
);
free
(
psz_device
);
...
...
This diff is collapsed.
Click to expand it.
modules/video_output/omapfb.c
View file @
7e45ab1b
...
...
@@ -455,7 +455,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
return
VLC_EGENERIC
;
}
p_sys
->
i_fd
=
utf8
_open
(
psz_device
,
O_RDWR
);
p_sys
->
i_fd
=
vlc
_open
(
psz_device
,
O_RDWR
);
if
(
p_sys
->
i_fd
==
-
1
)
{
msg_Err
(
p_vout
,
"cannot open %s (%m)"
,
psz_device
);
...
...
@@ -506,7 +506,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
p_sys
->
p_display
=
XOpenDisplay
(
NULL
);
/* Open /dev/null and map it */
p_sys
->
i_null_fd
=
utf8
_open
(
"/dev/zero"
,
O_RDWR
);
p_sys
->
i_null_fd
=
vlc
_open
(
"/dev/zero"
,
O_RDWR
);
if
(
p_sys
->
i_null_fd
==
-
1
)
{
msg_Err
(
p_vout
,
"cannot open /dev/zero (%m)"
);
...
...
This diff is collapsed.
Click to expand it.
modules/video_output/yuv.c
View file @
7e45ab1b
...
...
@@ -141,7 +141,7 @@ static int Open(vlc_object_t *object)
free
(
sys
);
return
VLC_EGENERIC
;
}
sys
->
f
=
utf8
_fopen
(
name
,
"wb"
);
sys
->
f
=
vlc
_fopen
(
name
,
"wb"
);
if
(
!
sys
->
f
)
{
msg_Err
(
vd
,
"Failed to open %s"
,
name
);
...
...
This diff is collapsed.
Click to expand it.
src/config/file.c
View file @
7e45ab1b
...
...
@@ -76,7 +76,7 @@ static FILE *config_OpenConfigFile( vlc_object_t *p_obj )
msg_Dbg
(
p_obj
,
"opening config file (%s)"
,
psz_filename
);
FILE
*
p_stream
=
utf8
_fopen
(
psz_filename
,
"rt"
);
FILE
*
p_stream
=
vlc
_fopen
(
psz_filename
,
"rt"
);
if
(
p_stream
==
NULL
&&
errno
!=
ENOENT
)
{
msg_Err
(
p_obj
,
"cannot open config file (%s): %m"
,
...
...
@@ -95,7 +95,7 @@ static FILE *config_OpenConfigFile( vlc_object_t *p_obj )
&&
asprintf
(
&
psz_old
,
"%s/.vlc/"
CONFIG_FILE
,
home
)
!=
-
1
)
{
p_stream
=
utf8
_fopen
(
psz_old
,
"rt"
);
p_stream
=
vlc
_fopen
(
psz_old
,
"rt"
);
if
(
p_stream
)
{
/* Old config file found. We want to write it at the
...
...
@@ -106,7 +106,7 @@ static FILE *config_OpenConfigFile( vlc_object_t *p_obj )
if
(
asprintf
(
&
psz_readme
,
"%s/.vlc/README"
,
home
)
!=
-
1
)
{
FILE
*
p_readme
=
utf8
_fopen
(
psz_readme
,
"wt"
);
FILE
*
p_readme
=
vlc
_fopen
(
psz_readme
,
"wt"
);
if
(
p_readme
)
{
fprintf
(
p_readme
,
"The VLC media player "
...
...
@@ -330,7 +330,7 @@ int config_CreateDir( vlc_object_t *p_this, const char *psz_dirname )
{
if
(
!
psz_dirname
||
!*
psz_dirname
)
return
-
1
;
if
(
utf8
_mkdir
(
psz_dirname
,
0700
)
==
0
)
if
(
vlc
_mkdir
(
psz_dirname
,
0700
)
==
0
)
return
0
;
switch
(
errno
)
...
...
@@ -350,7 +350,7 @@ int config_CreateDir( vlc_object_t *p_this, const char *psz_dirname )
*
psz_end
=
'\0'
;
if
(
config_CreateDir
(
p_this
,
psz_parent
)
==
0
)
{
if
(
!
utf8
_mkdir
(
psz_dirname
,
0700
)
)
if
(
!
vlc
_mkdir
(
psz_dirname
,
0700
)
)
return
0
;
}
}
...
...
@@ -541,7 +541,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
static
vlc_mutex_t
lock
=
VLC_STATIC_MUTEX
;
vlc_mutex_lock
(
&
lock
);
int
fd
=
utf8
_open
(
temporary
,
O_CREAT
|
O_WRONLY
|
O_TRUNC
,
S_IRUSR
|
S_IWUSR
);
int
fd
=
vlc
_open
(
temporary
,
O_CREAT
|
O_WRONLY
|
O_TRUNC
,
S_IRUSR
|
S_IWUSR
);
if
(
fd
==
-
1
)
{
vlc_rwlock_unlock
(
&
config_lock
);
...
...
@@ -699,8 +699,8 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
fdatasync
(
fd
);
/* Flush from OS */
#endif
/* Atomically replace the file... */
if
(
utf8
_rename
(
temporary
,
permanent
))
utf8
_unlink
(
temporary
);
if
(
vlc
_rename
(
temporary
,
permanent
))
vlc
_unlink
(
temporary
);
/* (...then synchronize the directory, err, TODO...) */
/* ...and finally close the file */
vlc_mutex_unlock
(
&
lock
);
...
...
@@ -708,9 +708,9 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
fclose
(
file
);
#ifdef WIN32
/* Windows cannot remove open files nor overwrite existing ones */
utf8
_unlink
(
permanent
);
if
(
utf8
_rename
(
temporary
,
permanent
))
utf8
_unlink
(
temporary
);
vlc
_unlink
(
permanent
);
if
(
vlc
_rename
(
temporary
,
permanent
))
vlc
_unlink
(
temporary
);
vlc_mutex_unlock
(
&
lock
);
#endif
...
...
This diff is collapsed.
Click to expand it.
src/input/es_out_timeshift.c
View file @
7e45ab1b
...
...
@@ -1067,7 +1067,7 @@ static ts_storage_t *TsStorageNew( const char *psz_tmp_path, int64_t i_tmp_size_
p_storage
->
i_file_size
=
0
;
p_storage
->
p_filew
=
GetTmpFile
(
&
p_storage
->
psz_file
,
psz_tmp_path
);
if
(
p_storage
->
psz_file
)
p_storage
->
p_filer
=
utf8
_fopen
(
p_storage
->
psz_file
,
"rb"
);
p_storage
->
p_filer
=
vlc
_fopen
(
p_storage
->
psz_file
,
"rb"
);
/* */
p_storage
->
i_cmd_w
=
0
;
...
...
@@ -1102,7 +1102,7 @@ static void TsStorageDelete( ts_storage_t *p_storage )
if
(
p_storage
->
psz_file
)
{
utf8
_unlink
(
p_storage
->
psz_file
);
vlc
_unlink
(
p_storage
->
psz_file
);
free
(
p_storage
->
psz_file
);
}
...
...
@@ -1536,9 +1536,9 @@ static char *GetTmpPath( char *psz_path )
{
/* Make sure that the path exists and is a directory */
struct
stat
s
;
const
int
i_ret
=
utf8
_stat
(
psz_path
,
&
s
);
const
int
i_ret
=
vlc
_stat
(
psz_path
,
&
s
);
if
(
i_ret
<
0
&&
!
utf8
_mkdir
(
psz_path
,
0600
)
)
if
(
i_ret
<
0
&&
!
vlc
_mkdir
(
psz_path
,
0600
)
)
return
psz_path
;
else
if
(
i_ret
==
0
&&
(
s
.
st_mode
&
S_IFDIR
)
)
return
psz_path
;
...
...
@@ -1593,7 +1593,7 @@ static FILE *GetTmpFile( char **ppsz_file, const char *psz_path )
return
NULL
;
/* */
fd
=
utf8
_mkstemp
(
psz_name
);
fd
=
vlc
_mkstemp
(
psz_name
);
*
ppsz_file
=
psz_name
;
if
(
fd
<
0
)
...
...
This diff is collapsed.
Click to expand it.
src/input/input.c
View file @
7e45ab1b
...
...
@@ -3009,7 +3009,7 @@ static void InputGetExtraFilesPattern( input_thread_t *p_input,
if
(
asprintf
(
&
psz_file
,
psz_format
,
psz_base
,
i
)
<
0
)
break
;
if
(
utf8
_stat
(
psz_file
,
&
st
)
||
!
S_ISREG
(
st
.
st_mode
)
||
!
st
.
st_size
)
if
(
vlc
_stat
(
psz_file
,
&
st
)
||
!
S_ISREG
(
st
.
st_mode
)
||
!
st
.
st_size
)
{
free
(
psz_file
);
break
;
...
...
@@ -3241,7 +3241,7 @@ static void SubtitleAdd( input_thread_t *p_input, char *psz_subtitle, bool b_for
strcpy
(
psz_extension
,
".idx"
);
if
(
!
utf8
_stat
(
psz_path
,
&
st
)
&&
S_ISREG
(
st
.
st_mode
)
)
if
(
!
vlc
_stat
(
psz_path
,
&
st
)
&&
S_ISREG
(
st
.
st_mode
)
)
{
msg_Dbg
(
p_input
,
"using %s subtitles file instead of %s"
,
psz_path
,
psz_subtitle
);
...
...
@@ -3326,7 +3326,7 @@ char *input_CreateFilename( vlc_object_t *p_obj, const char *psz_path, const cha
char
*
psz_file
;
DIR
*
path
;
path
=
utf8
_opendir
(
psz_path
);
path
=
vlc
_opendir
(
psz_path
);
if
(
path
)
{
closedir
(
path
);
...
...
This diff is collapsed.
Click to expand it.
src/input/subtitles.c
View file @
7e45ab1b
...
...
@@ -347,7 +347,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
continue
;
/* parse psz_src dir */
i_dir_content
=
utf8
_scandir
(
psz_dir
,
&
ppsz_dir_content
,
i_dir_content
=
vlc
_scandir
(
psz_dir
,
&
ppsz_dir_content
,
subtitles_Filter
,
NULL
);
if
(
i_dir_content
<
0
)
continue
;
...
...
@@ -408,7 +408,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
if
(
!
strcmp
(
psz_path
,
psz_fname
)
)
continue
;
if
(
!
utf8
_stat
(
psz_path
,
&
st
)
&&
S_ISREG
(
st
.
st_mode
)
&&
result
)
if
(
!
vlc
_stat
(
psz_path
,
&
st
)
&&
S_ISREG
(
st
.
st_mode
)
&&
result
)
{
msg_Dbg
(
p_this
,
"autodetected subtitle: %s with priority %d"
,
...
...
This diff is collapsed.
Click to expand it.
src/input/vlmshell.c
View file @
7e45ab1b
...
...
@@ -529,7 +529,7 @@ static int ExecuteExport( vlm_t *p_vlm, vlm_message_t **pp_status )
static
int
ExecuteSave
(
vlm_t
*
p_vlm
,
const
char
*
psz_file
,
vlm_message_t
**
pp_status
)
{
FILE
*
f
=
utf8
_fopen
(
psz_file
,
"wt"
);
FILE
*
f
=
vlc
_fopen
(
psz_file
,
"wt"
);
char
*
psz_save
=
NULL
;
if
(
!
f
)
...
...
This diff is collapsed.
Click to expand it.
src/libvlc.c
View file @
7e45ab1b
...
...
@@ -372,7 +372,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
pid_t
i_pid
=
getpid
();
msg_Dbg
(
p_libvlc
,
"PID is %d, writing it to %s"
,
i_pid
,
psz_pidfile
);
pidfile
=
utf8
_fopen
(
psz_pidfile
,
"w"
);
pidfile
=
vlc
_fopen
(
psz_pidfile
,
"w"
);
if
(
pidfile
!=
NULL
)
{
utf8_fprintf
(
pidfile
,
"%d"
,
(
int
)
i_pid
);
...
...
This diff is collapsed.
Click to expand it.
src/libvlccore.sym
View file @
7e45ab1b
...
...
@@ -428,18 +428,18 @@ us_asprintf
us_atof
us_strtod
us_strtof
utf8
_fopen
vlc
_fopen
utf8_fprintf
utf8
_loaddir
vlc
_loaddir
utf8_lstat
utf8
_mkdir
utf8
_mkstemp
utf8
_open
utf8
_opendir
utf8
_readdir
utf8
_scandir
utf8
_stat
utf8
_unlink
vlc
_mkdir
vlc
_mkstemp
vlc
_open
vlc
_opendir
vlc
_readdir
vlc
_scandir
vlc
_stat
vlc
_unlink
utf8_vfprintf
var_AddCallback
var_Change
...
...
This diff is collapsed.
Click to expand it.
src/misc/image.c
View file @
7e45ab1b
...
...
@@ -377,7 +377,7 @@ static int ImageWriteUrl( image_handler_t *p_image, picture_t *p_pic,
p_fmt_out
->
i_chroma
=
image_Ext2Fourcc
(
psz_url
);
}
file
=
utf8
_fopen
(
psz_url
,
"wb"
);
file
=
vlc
_fopen
(
psz_url
,
"wb"
);
if
(
!
file
)
{
msg_Err
(
p_image
->
p_parent
,
"%s: %m"
,
psz_url
);
...
...
This diff is collapsed.
Click to expand it.
src/misc/rand.c
View file @
7e45ab1b
...
...
@@ -58,7 +58,7 @@ static void vlc_rand_init (void)
uint8_t
key
[
BLOCK_SIZE
];
/* Get non-predictible value as key for HMAC */
int
fd
=
utf8
_open
(
randfile
,
O_RDONLY
);
int
fd
=
vlc
_open
(
randfile
,
O_RDONLY
);
if
(
fd
==
-
1
)
return
;
/* Uho! */
...
...
This diff is collapsed.
Click to expand it.
src/misc/update.c
View file @
7e45ab1b
...
...
@@ -577,7 +577,7 @@ static void* update_DownloadReal( vlc_object_t *p_this )
if
(
asprintf
(
&
psz_destfile
,
"%s%s"
,
psz_destdir
,
psz_tmpdestfile
)
==
-
1
)
goto
end
;
p_file
=
utf8
_fopen
(
psz_destfile
,
"w"
);
p_file
=
vlc
_fopen
(
psz_destfile
,
"w"
);
if
(
!
p_file
)
{
msg_Err
(
p_udt
,
"Failed to open %s for writing"
,
psz_destfile
);
...
...
@@ -647,7 +647,7 @@ static void* update_DownloadReal( vlc_object_t *p_this )
}
else
{
utf8
_unlink
(
psz_destfile
);
vlc
_unlink
(
psz_destfile
);
goto
end
;
}
...
...
@@ -655,7 +655,7 @@ static void* update_DownloadReal( vlc_object_t *p_this )
if
(
download_signature
(
VLC_OBJECT
(
p_udt
),
&
sign
,
p_update
->
release
.
psz_url
)
!=
VLC_SUCCESS
)
{
utf8
_unlink
(
psz_destfile
);
vlc
_unlink
(
psz_destfile
);
dialog_FatalWait
(
p_udt
,
_
(
"File could not be verified"
),
_
(
"It was not possible to download a cryptographic signature for "
...
...
@@ -667,7 +667,7 @@ static void* update_DownloadReal( vlc_object_t *p_this )
if
(
memcmp
(
sign
.
issuer_longid
,
p_update
->
p_pkey
->
longid
,
8
)
)
{
utf8
_unlink
(
psz_destfile
);
vlc
_unlink
(
psz_destfile
);
msg_Err
(
p_udt
,
"Invalid signature issuer"
);
dialog_FatalWait
(
p_udt
,
_
(
"Invalid signature"
),
_
(
"The cryptographic signature for the downloaded file
\"
%s
\"
was "
...
...
@@ -679,7 +679,7 @@ static void* update_DownloadReal( vlc_object_t *p_this )
if
(
sign
.
type
!=
BINARY_SIGNATURE
)
{
utf8
_unlink
(
psz_destfile
);
vlc
_unlink
(
psz_destfile
);
msg_Err
(
p_udt
,
"Invalid signature type"
);
dialog_FatalWait
(
p_udt
,
_
(
"Invalid signature"
),
_
(
"The cryptographic signature for the downloaded file
\"
%s
\"
was "
...
...
@@ -693,7 +693,7 @@ static void* update_DownloadReal( vlc_object_t *p_this )
if
(
!
p_hash
)
{
msg_Err
(
p_udt
,
"Unable to hash %s"
,
psz_destfile
);
utf8
_unlink
(
psz_destfile
);
vlc
_unlink
(
psz_destfile
);
dialog_FatalWait
(
p_udt
,
_
(
"File not verifiable"
),
_
(
"It was not possible to securely verify the downloaded file"
"
\"
%s
\"
. Thus, it was deleted."
),
...
...
@@ -705,7 +705,7 @@ static void* update_DownloadReal( vlc_object_t *p_this )
if
(
p_hash
[
0
]
!=
sign
.
hash_verification
[
0
]
||
p_hash
[
1
]
!=
sign
.
hash_verification
[
1
]
)
{
utf8
_unlink
(
psz_destfile
);
vlc
_unlink
(
psz_destfile
);
dialog_FatalWait
(
p_udt
,
_
(
"File corrupted"
),
_
(
"Downloaded file
\"
%s
\"
was corrupted. Thus, it was deleted."
),
psz_destfile
);
...
...
@@ -717,7 +717,7 @@ static void* update_DownloadReal( vlc_object_t *p_this )
if
(
verify_signature
(
sign
.
r
,
sign
.
s
,
&
p_update
->
p_pkey
->
key
,
p_hash
)
!=
VLC_SUCCESS
)
{
utf8
_unlink
(
psz_destfile
);
vlc
_unlink
(
psz_destfile
);
dialog_FatalWait
(
p_udt
,
_
(
"File corrupted"
),
_
(
"Downloaded file
\"
%s
\"
was corrupted. Thus, it was deleted."
),
psz_destfile
);
...
...
This diff is collapsed.
Click to expand it.
src/misc/update_crypto.c
View file @
7e45ab1b
...
...
@@ -659,7 +659,7 @@ static int hash_from_binary_file( const char *psz_file, gcry_md_hd_t hd )
uint8_t
buffer
[
4096
];
size_t
i_read
;
FILE
*
f
=
utf8
_fopen
(
psz_file
,
"r"
);
FILE
*
f
=
vlc
_fopen
(
psz_file
,
"r"
);
if
(
!
f
)
return
-
1
;
...
...
This diff is collapsed.
Click to expand it.
src/modules/cache.c
View file @
7e45ab1b
...
...
@@ -79,7 +79,7 @@ void CacheDelete( vlc_object_t *obj, const char *dir )
dir
,
CACHENAME_VALUES
)
==
-
1
)
return
;
msg_Dbg
(
obj
,
"removing plugins cache file %s"
,
path
);
utf8
_unlink
(
path
);
vlc
_unlink
(
path
);
free
(
path
);
}
...
...
@@ -112,7 +112,7 @@ void CacheLoad( vlc_object_t *p_this, module_bank_t *p_bank, const char *dir )
msg_Dbg
(
p_this
,
"loading plugins cache file %s"
,
psz_filename
);
file
=
utf8
_fopen
(
psz_filename
,
"rb"
);
file
=
vlc
_fopen
(
psz_filename
,
"rb"
);
if
(
!
file
)
{
msg_Warn
(
p_this
,
"cannot read %s (%m)"
,
...
...
@@ -455,7 +455,7 @@ void CacheSave (vlc_object_t *p_this, const char *dir,
}
msg_Dbg
(
p_this
,
"saving plugins cache %s"
,
filename
);
FILE
*
file
=
utf8
_fopen
(
tmpname
,
"wb"
);
FILE
*
file
=
vlc
_fopen
(
tmpname
,
"wb"
);
if
(
file
==
NULL
)
{
if
(
errno
!=
EACCES
&&
errno
!=
ENOENT
)
...
...
@@ -468,17 +468,17 @@ void CacheSave (vlc_object_t *p_this, const char *dir,
msg_Warn
(
p_this
,
"cannot write %s (%m)"
,
tmpname
);
clearerr
(
file
);
fclose
(
file
);
utf8
_unlink
(
tmpname
);
vlc
_unlink
(
tmpname
);
goto
out
;
}
#ifndef WIN32
utf8
_rename
(
tmpname
,
filename
);
/* atomically replace old cache */
vlc
_rename
(
tmpname
,
filename
);
/* atomically replace old cache */
fclose
(
file
);
#else
utf8
_unlink
(
filename
);
vlc
_unlink
(
filename
);
fclose
(
file
);
utf8
_rename
(
tmpname
,
filename
);
vlc
_rename
(
tmpname
,
filename
);
#endif
out:
free
(
filename
);
...
...
This diff is collapsed.
Click to expand it.
src/modules/modules.c
View file @
7e45ab1b
...
...
@@ -895,14 +895,14 @@ static void AllocatePluginDir( vlc_object_t *p_this, module_bank_t *p_bank,
if
(
i_maxdepth
==
0
)
return
;
DIR
*
dh
=
utf8
_opendir
(
psz_dir
);
DIR
*
dh
=
vlc
_opendir
(
psz_dir
);
if
(
dh
==
NULL
)
return
;
/* Parse the directory and try to load all files it contains. */
for
(;;)
{
char
*
file
=
utf8
_readdir
(
dh
),
*
path
;
char
*
file
=
vlc
_readdir
(
dh
),
*
path
;
struct
stat
st
;
if
(
file
==
NULL
)
...
...
@@ -919,7 +919,7 @@ static void AllocatePluginDir( vlc_object_t *p_this, module_bank_t *p_bank,
const
int
pathlen
=
asprintf
(
&
path
,
"%s"
DIR_SEP
"%s"
,
psz_dir
,
file
);
free
(
file
);
if
(
pathlen
==
-
1
||
utf8
_stat
(
path
,
&
st
))
if
(
pathlen
==
-
1
||
vlc
_stat
(
path
,
&
st
))
continue
;
if
(
S_ISDIR
(
st
.
st_mode
))
...
...
This diff is collapsed.
Click to expand it.
src/network/acl.c
View file @
7e45ab1b
...
...
@@ -300,7 +300,7 @@ int ACL_LoadFile( vlc_acl_t *p_acl, const char *psz_path )
if
(
p_acl
==
NULL
)
return
-
1
;
file
=
utf8
_fopen
(
psz_path
,
"r"
);
file
=
vlc
_fopen
(
psz_path
,
"r"
);
if
(
file
==
NULL
)
return
-
1
;
...
...
This diff is collapsed.
Click to expand it.
src/playlist/art.c
View file @
7e45ab1b
...
...
@@ -56,11 +56,11 @@ static void ArtCacheCreateDir( const char *psz_dir )
if
(
!*
psz
)
break
;
*
psz
=
0
;
if
(
!
EMPTY_STR
(
psz_newdir
)
)
utf8
_mkdir
(
psz_newdir
,
0700
);
vlc
_mkdir
(
psz_newdir
,
0700
);
*
psz
=
DIR_SEP_CHAR
;
psz
++
;
}
utf8
_mkdir
(
psz_dir
,
0700
);
vlc
_mkdir
(
psz_dir
,
0700
);
}
static
char
*
ArtCacheGetDirPath
(
const
char
*
psz_title
,
const
char
*
psz_artist
,
...
...
@@ -151,7 +151,7 @@ int playlist_FindArtInCache( input_item_t *p_item )
return
VLC_EGENERIC
;
/* Check if file exists */
DIR
*
p_dir
=
utf8
_opendir
(
psz_path
);
DIR
*
p_dir
=
vlc
_opendir
(
psz_path
);
if
(
!
p_dir
)
{
free
(
psz_path
);
...
...
@@ -160,7 +160,7 @@ int playlist_FindArtInCache( input_item_t *p_item )
bool
b_found
=
false
;
char
*
psz_filename
;
while
(
!
b_found
&&
(
psz_filename
=
utf8
_readdir
(
p_dir
))
)
while
(
!
b_found
&&
(
psz_filename
=
vlc
_readdir
(
p_dir
))
)
{
if
(
!
strncmp
(
psz_filename
,
"art"
,
3
)
)
{
...
...
@@ -207,7 +207,7 @@ int playlist_SaveArt( playlist_t *p_playlist, input_item_t *p_item,
/* Check if we already dumped it */
struct
stat
s
;
if
(
!
utf8
_stat
(
psz_filename
,
&
s
)
)
if
(
!
vlc
_stat
(
psz_filename
,
&
s
)
)
{
input_item_SetArtURL
(
p_item
,
psz_uri
);
free
(
psz_filename
);
...
...
@@ -216,7 +216,7 @@ int playlist_SaveArt( playlist_t *p_playlist, input_item_t *p_item,
}
/* Dump it otherwise */
FILE
*
f
=
utf8
_fopen
(
psz_filename
,
"wb"
);
FILE
*
f
=
vlc
_fopen
(
psz_filename
,
"wb"
);
if
(
f
)
{
if
(
fwrite
(
p_buffer
,
i_buffer
,
1
,
f
)
!=
1
)
...
...
This diff is collapsed.
Click to expand it.
src/playlist/loadsave.c
View file @
7e45ab1b
...
...
@@ -56,7 +56,7 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename,
/* Prepare the playlist_export_t structure */
p_export
->
p_root
=
p_export_root
;
p_export
->
psz_filename
=
psz_filename
;
p_export
->
p_file
=
utf8
_fopen
(
psz_filename
,
"wt"
);
p_export
->
p_file
=
vlc
_fopen
(
psz_filename
,
"wt"
);
if
(
p_export
->
p_file
==
NULL
)
msg_Err
(
p_export
,
"could not create playlist file %s (%m)"
,
psz_filename
);
...
...
@@ -133,7 +133,7 @@ int playlist_MLLoad( playlist_t *p_playlist )
if
(
asprintf
(
&
psz_uri
,
"%s"
DIR_SEP
"ml.xspf"
,
psz_datadir
)
!=
-
1
)
{
/* loosy check for media library file */
struct
stat
st
;
int
ret
=
utf8
_stat
(
psz_uri
,
&
st
);
int
ret
=
vlc
_stat
(
psz_uri
,
&
st
);
free
(
psz_uri
);
if
(
ret
)
{
...
...
This diff is collapsed.
Click to expand it.
src/text/filesystem.c
View file @
7e45ab1b
...
...
@@ -31,7 +31,7 @@
#include <vlc_common.h>
#include <vlc_charset.h>
#include <vlc_fs.h>
#include "libvlc.h"
/*
utf8
_mkdir */
#include "libvlc.h"
/*
vlc
_mkdir */
#include <vlc_rand.h>
#include <assert.h>
...
...
@@ -90,7 +90,7 @@ static int convert_path (const char *restrict path, wchar_t *restrict wpath)
* @note Contrary to standard open(), this function returns file handles
* with the close-on-exec flag enabled.
*/
int
utf8
_open
(
const
char
*
filename
,
int
flags
,
...)
int
vlc
_open
(
const
char
*
filename
,
int
flags
,
...)
{
unsigned
int
mode
=
0
;
va_list
ap
;
...
...
@@ -140,7 +140,7 @@ int utf8_open (const char *filename, int flags, ...)
* @param mode fopen file open mode
* @return NULL on error, an open FILE pointer on success.
*/
FILE
*
utf8
_fopen
(
const
char
*
filename
,
const
char
*
mode
)
FILE
*
vlc
_fopen
(
const
char
*
filename
,
const
char
*
mode
)
{
int
rwflags
=
0
,
oflags
=
0
;
bool
append
=
false
;
...
...
@@ -176,7 +176,7 @@ FILE *utf8_fopen (const char *filename, const char *mode)
}
}
int
fd
=
utf8
_open
(
filename
,
rwflags
|
oflags
,
0666
);
int
fd
=
vlc
_open
(
filename
,
rwflags
|
oflags
,
0666
);
if
(
fd
==
-
1
)
return
NULL
;
...
...
@@ -201,7 +201,7 @@ FILE *utf8_fopen (const char *filename, const char *mode)
* @param mode directory permissions
* @return 0 on success, -1 on error (see errno).
*/
int
utf8
_mkdir
(
const
char
*
dirname
,
mode_t
mode
)
int
vlc
_mkdir
(
const
char
*
dirname
,
mode_t
mode
)
{
#if defined (UNDER_CE)
(
void
)
mode
;
...
...
@@ -235,7 +235,7 @@ int utf8_mkdir( const char *dirname, mode_t mode )
* @return a pointer to the DIR struct, or NULL in case of error.
* Release with standard closedir().
*/
DIR
*
utf8
_opendir
(
const
char
*
dirname
)
DIR
*
vlc
_opendir
(
const
char
*
dirname
)
{
#ifdef WIN32
CONVERT_PATH
(
dirname
,
wpath
,
NULL
);
...
...
@@ -264,7 +264,7 @@ DIR *utf8_opendir( const char *dirname )
* @return a UTF-8 string of the directory entry.
* Use free() to free this memory.
*/
char
*
utf8
_readdir
(
DIR
*
dir
)
char
*
vlc
_readdir
(
DIR
*
dir
)
{
#ifdef WIN32
struct
_wdirent
*
ent
=
vlc_wreaddir
(
dir
);
...
...
@@ -290,10 +290,10 @@ static int dummy_select( const char *str )
}
/**
* Does the same as
utf8
_scandir(), but takes an open directory pointer
* Does the same as
vlc
_scandir(), but takes an open directory pointer
* instead of a directory path.
*/
int
utf8
_loaddir
(
DIR
*
dir
,
char
***
namelist
,
int
vlc
_loaddir
(
DIR
*
dir
,
char
***
namelist
,
int
(
*
select
)(
const
char
*
),
int
(
*
compar
)(
const
char
**
,
const
char
**
)
)
{
...
...
@@ -310,7 +310,7 @@ int utf8_loaddir( DIR *dir, char ***namelist,
rewinddir
(
dir
);
while
(
(
entry
=
utf8
_readdir
(
dir
)
)
!=
NULL
)
while
(
(
entry
=
vlc
_readdir
(
dir
)
)
!=
NULL
)
{
char
**
newtab
;
...
...
@@ -359,22 +359,22 @@ int utf8_loaddir( DIR *dir, char ***namelist,
* @return How many file names were selected (possibly 0),
* or -1 in case of error.
*/
int
utf8
_scandir
(
const
char
*
dirname
,
char
***
namelist
,
int
vlc
_scandir
(
const
char
*
dirname
,
char
***
namelist
,
int
(
*
select
)(
const
char
*
),
int
(
*
compar
)(
const
char
**
,
const
char
**
)
)
{
DIR
*
dir
=
utf8
_opendir
(
dirname
);
DIR
*
dir
=
vlc
_opendir
(
dirname
);
int
val
=
-
1
;
if
(
dir
!=
NULL
)
{
val
=
utf8
_loaddir
(
dir
,
namelist
,
select
,
compar
);
val
=
vlc
_loaddir
(
dir
,
namelist
,
select
,
compar
);
closedir
(
dir
);
}
return
val
;
}
static
int
utf8
_statEx
(
const
char
*
filename
,
struct
stat
*
buf
,
static
int
vlc
_statEx
(
const
char
*
filename
,
struct
stat
*
buf
,
bool
deref
)
{
#ifdef UNDER_CE
...
...
@@ -406,9 +406,9 @@ static int utf8_statEx( const char *filename, struct stat *buf,
*
* @param filename UTF-8 file path
*/
int
utf8
_stat
(
const
char
*
filename
,
struct
stat
*
buf
)
int
vlc
_stat
(
const
char
*
filename
,
struct
stat
*
buf
)
{
return
utf8
_statEx
(
filename
,
buf
,
true
);
return
vlc
_statEx
(
filename
,
buf
,
true
);
}
/**
...
...
@@ -419,7 +419,7 @@ int utf8_stat( const char *filename, struct stat *buf)
*/
int
utf8_lstat
(
const
char
*
filename
,
struct
stat
*
buf
)
{
return
utf8
_statEx
(
filename
,
buf
,
false
);
return
vlc
_statEx
(
filename
,
buf
,
false
);
}
/**
...
...
@@ -429,7 +429,7 @@ int utf8_lstat( const char *filename, struct stat *buf)
* @return A 0 return value indicates success. A -1 return value indicates an
* error, and an error code is stored in errno
*/
int
utf8
_unlink
(
const
char
*
filename
)
int
vlc
_unlink
(
const
char
*
filename
)
{
#ifdef UNDER_CE
/*_open translates to wchar internally on WinCE*/
...
...
@@ -460,7 +460,7 @@ int utf8_unlink( const char *filename )
* @return A 0 return value indicates success. A -1 return value indicates an
* error, and an error code is stored in errno
*/
int
utf8
_rename
(
const
char
*
oldpath
,
const
char
*
newpath
)
int
vlc
_rename
(
const
char
*
oldpath
,
const
char
*
newpath
)
{
#if defined (WIN32)
CONVERT_PATH
(
oldpath
,
wold
,
-
1
);
...
...
@@ -495,7 +495,7 @@ error:
return
ret
;
}
int
utf8
_mkstemp
(
char
*
template
)
int
vlc
_mkstemp
(
char
*
template
)
{
static
const
char
digits
[]
=
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
;
static
const
int
i_digits
=
sizeof
(
digits
)
/
sizeof
(
*
digits
)
-
1
;
...
...
@@ -524,7 +524,7 @@ int utf8_mkstemp( char *template )
psz_rand
[
j
]
=
digits
[
pi_rand
[
j
]
%
i_digits
];
/* */
int
fd
=
utf8
_open
(
template
,
O_CREAT
|
O_EXCL
|
O_RDWR
,
0600
);
int
fd
=
vlc
_open
(
template
,
O_CREAT
|
O_EXCL
|
O_RDWR
,
0600
);
if
(
fd
>=
0
)
return
fd
;
if
(
errno
!=
EEXIST
)
...
...
This diff is collapsed.
Click to expand it.
src/video_output/snapshot.c
View file @
7e45ab1b
...
...
@@ -141,7 +141,7 @@ int vout_snapshot_SaveImage(char **name, int *sequential,
{
/* */
char
*
filename
;
DIR
*
pathdir
=
utf8
_opendir
(
cfg
->
path
);
DIR
*
pathdir
=
vlc
_opendir
(
cfg
->
path
);
if
(
pathdir
!=
NULL
)
{
/* The use specified a directory path */
closedir
(
pathdir
);
...
...
@@ -165,7 +165,7 @@ int vout_snapshot_SaveImage(char **name, int *sequential,
free
(
prefix
);
goto
error
;
}
if
(
utf8
_stat
(
filename
,
&
st
))
{
if
(
vlc
_stat
(
filename
,
&
st
))
{
*
sequential
=
num
;
break
;
}
...
...
@@ -208,7 +208,7 @@ int vout_snapshot_SaveImage(char **name, int *sequential,
goto
error
;
/* Save the snapshot */
FILE
*
file
=
utf8
_fopen
(
filename
,
"wb"
);
FILE
*
file
=
vlc
_fopen
(
filename
,
"wb"
);
if
(
!
file
)
{
msg_Err
(
object
,
"Failed to open '%s'"
,
filename
);
free
(
filename
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment