Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
7e45ab1b
Commit
7e45ab1b
authored
Feb 07, 2010
by
Rémi Denis-Courmont
Browse files
utf8_* -> vlc_* (sed roxxors)
parent
d601e4ed
Changes
68
Hide whitespace changes
Inline
Side-by-side
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
...
...
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
...
...
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
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
++
)
{
...
...
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
);
...
...
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
;
...
...
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
;
...
...
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 */
}
...
...
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
);
...
...
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
)
{
...
...
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
);
...
...
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
)
{
...
...
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)."
);
...
...
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
...
...
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
/*****************************************************************************
...
...
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
...
...
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
;
...
...
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
);
}
...
...
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
)
...
...
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
);
...
...
Prev
1
2
3
4
Next
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