Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
543574fd
Commit
543574fd
authored
Feb 13, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another bunch of Unicode file names fixes (refs #528)
parent
19ae2576
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
42 additions
and
33 deletions
+42
-33
modules/access/file.c
modules/access/file.c
+9
-12
modules/access/vcd/cdrom.c
modules/access/vcd/cdrom.c
+1
-1
modules/access_filter/record.c
modules/access_filter/record.c
+1
-1
modules/access_filter/timeshift.c
modules/access_filter/timeshift.c
+1
-1
modules/audio_output/file.c
modules/audio_output/file.c
+1
-1
modules/control/corba/corba.c
modules/control/corba/corba.c
+3
-1
modules/control/http/http.c
modules/control/http/http.c
+3
-2
modules/control/http/macro.c
modules/control/http/macro.c
+2
-0
modules/control/http/util.c
modules/control/http/util.c
+10
-8
modules/demux/mp4/drms.c
modules/demux/mp4/drms.c
+10
-5
modules/video_filter/motiondetect.c
modules/video_filter/motiondetect.c
+1
-1
No files found.
modules/access/file.c
View file @
543574fd
...
...
@@ -164,11 +164,9 @@ static int Open( vlc_object_t *p_this )
{
if
(
psz_name
[
0
]
==
'~'
&&
psz_name
[
1
]
==
'/'
)
{
psz
=
malloc
(
strlen
(
p_access
->
p_vlc
->
psz_homedir
)
+
strlen
(
psz_name
)
);
/* This is incomplete : we should also support the ~cmassiot/
* syntax. */
sprintf
(
psz
,
"%s/%s"
,
p_access
->
p_vlc
->
psz_homedir
,
psz_name
+
2
);
asprintf
(
&
psz
,
"%s/%s"
,
p_access
->
p_vlc
->
psz_homedir
,
psz_name
+
2
);
free
(
psz_name
);
psz_name
=
psz
;
}
...
...
@@ -186,15 +184,12 @@ static int Open( vlc_object_t *p_this )
#endif
#ifdef HAVE_SYS_STAT_H
psz
=
ToLocale
(
psz_name
);
if
(
stat
(
psz
,
&
stat_info
)
)
if
(
utf8_stat
(
psz_name
,
&
stat_info
)
)
{
msg_Warn
(
p_access
,
"%s: %s"
,
psz_name
,
strerror
(
errno
)
);
LocaleFree
(
psz
);
free
(
psz_name
);
return
VLC_EGENERIC
;
}
LocaleFree
(
psz
);
#endif
}
...
...
@@ -607,13 +602,9 @@ static int Control( access_t *p_access, int i_query, va_list args )
static
int
_OpenFile
(
access_t
*
p_access
,
const
char
*
psz_name
)
{
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
const
char
*
psz_localname
;
psz_localname
=
ToLocale
(
psz_name
);
#ifdef UNDER_CE
p_sys
->
fd
=
fopen
(
psz_localname
,
"rb"
);
LocaleFree
(
psz_localname
);
p_sys
->
fd
=
utf8_fopen
(
psz_name
,
"rb"
);
if
(
!
p_sys
->
fd
)
{
msg_Err
(
p_access
,
"cannot open file %s"
,
psz_name
);
...
...
@@ -625,6 +616,12 @@ static int _OpenFile( access_t * p_access, const char * psz_name )
p_access
->
info
.
i_update
|=
INPUT_UPDATE_SIZE
;
fseek
(
p_sys
->
fd
,
0
,
SEEK_SET
);
#else
const
char
*
psz_localname
=
ToLocale
(
psz_name
);
if
(
psz_localname
==
NULL
)
{
msg_Err
(
p_access
,
"incorrect file name %s"
,
psz_name
);
return
VLC_EGENERIC
;
}
p_sys
->
fd
=
open
(
psz_localname
,
O_NONBLOCK
/*| O_LARGEFILE*/
);
LocaleFree
(
psz_localname
);
...
...
modules/access/vcd/cdrom.c
View file @
543574fd
...
...
@@ -858,7 +858,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
=
fopen
(
psz_cuefile
,
"rt"
);
cuefile
=
utf8_
fopen
(
psz_cuefile
,
"rt"
);
if
(
cuefile
&&
fscanf
(
cuefile
,
"FILE %c"
,
line
)
&&
fgets
(
line
,
1024
,
cuefile
)
)
{
...
...
modules/access_filter/record.c
View file @
543574fd
...
...
@@ -405,7 +405,7 @@ static void Dump( access_t *p_access, uint8_t *p_buffer, int i_buffer )
msg_Dbg
(
p_access
,
"dump in file '%s'"
,
p_sys
->
psz_file
);
p_sys
->
f
=
fopen
(
p_sys
->
psz_file
,
"wb"
);
p_sys
->
f
=
utf8_
fopen
(
p_sys
->
psz_file
,
"wb"
);
if
(
p_sys
->
f
==
NULL
)
{
msg_Err
(
p_access
,
"cannot open file '%s' (%s)"
,
...
...
modules/access_filter/timeshift.c
View file @
543574fd
...
...
@@ -375,7 +375,7 @@ static int WriteBlockToFile( access_t *p_access, block_t *p_block )
sprintf
(
p_sys
->
psz_filename
,
"%s%i.dat"
,
p_sys
->
psz_filename_base
,
p_sys
->
i_files
);
file
=
fopen
(
p_sys
->
psz_filename
,
"w+b"
);
file
=
utf8_
fopen
(
p_sys
->
psz_filename
,
"w+b"
);
if
(
!
file
&&
p_sys
->
i_files
<
2
)
{
...
...
modules/audio_output/file.c
View file @
543574fd
...
...
@@ -156,7 +156,7 @@ static int Open( vlc_object_t * p_this )
return
VLC_EGENERIC
;
}
p_aout
->
output
.
p_sys
->
p_file
=
fopen
(
psz_name
,
"wb"
);
p_aout
->
output
.
p_sys
->
p_file
=
utf8_
fopen
(
psz_name
,
"wb"
);
free
(
psz_name
);
if
(
p_aout
->
output
.
p_sys
->
p_file
==
NULL
)
{
...
...
modules/control/corba/corba.c
View file @
543574fd
...
...
@@ -831,6 +831,8 @@ static void Run( intf_thread_t *p_intf )
/* We write the IOR in a file. */
{
FILE
*
fp
;
/* no need for Unicode transliteration as long as VLC_IOR_FILE
is pure ASCII */
fp
=
fopen
(
VLC_IOR_FILE
,
"w"
);
if
(
fp
==
NULL
)
{
...
...
modules/control/http/http.c
View file @
543574fd
...
...
@@ -91,13 +91,13 @@ static int DirectoryCheck( char *psz_dir )
#ifdef HAVE_SYS_STAT_H
struct
stat
stat_info
;
if
(
stat
(
psz_dir
,
&
stat_info
)
==
-
1
||
!
S_ISDIR
(
stat_info
.
st_mode
)
)
if
(
utf8_
stat
(
psz_dir
,
&
stat_info
)
==
-
1
||
!
S_ISDIR
(
stat_info
.
st_mode
)
)
{
return
VLC_EGENERIC
;
}
#endif
if
(
(
p_dir
=
opendir
(
psz_dir
)
)
==
NULL
)
if
(
(
p_dir
=
utf8_
opendir
(
psz_dir
)
)
==
NULL
)
{
return
VLC_EGENERIC
;
}
...
...
@@ -571,6 +571,7 @@ int E_(HttpCallback)( httpd_file_sys_t *p_args,
char
**
pp_data
=
(
char
**
)
_pp_data
;
FILE
*
f
;
/* FIXME: do we need character encoding translation here ? */
if
(
(
f
=
fopen
(
p_args
->
file
,
"r"
)
)
==
NULL
)
{
Callback404
(
p_args
,
pp_data
,
pi_data
);
...
...
modules/control/http/macro.c
View file @
543574fd
...
...
@@ -883,6 +883,8 @@ void E_(Execute)( httpd_file_sys_t *p_args,
strcpy
(
psz_file
,
m
.
param1
);
}
/* We hereby assume that psz_file is in the
* local character encoding */
if
(
(
f
=
fopen
(
psz_file
,
"r"
)
)
==
NULL
)
{
msg_Warn
(
p_args
->
p_intf
,
...
...
modules/control/http/util.c
View file @
543574fd
...
...
@@ -109,7 +109,6 @@ int E_(ParseDirectory)( intf_thread_t *p_intf, char *psz_root,
struct
stat
stat_info
;
#endif
DIR
*
p_dir
;
struct
dirent
*
p_dir_content
;
vlc_acl_t
*
p_acl
;
FILE
*
file
;
...
...
@@ -127,13 +126,13 @@ int E_(ParseDirectory)( intf_thread_t *p_intf, char *psz_root,
#endif
#ifdef HAVE_SYS_STAT_H
if
(
stat
(
psz_dir
,
&
stat_info
)
==
-
1
||
!
S_ISDIR
(
stat_info
.
st_mode
)
)
if
(
utf8_
stat
(
psz_dir
,
&
stat_info
)
==
-
1
||
!
S_ISDIR
(
stat_info
.
st_mode
)
)
{
return
VLC_EGENERIC
;
}
#endif
if
(
(
p_dir
=
opendir
(
psz_dir
)
)
==
NULL
)
if
(
(
p_dir
=
utf8_
opendir
(
psz_dir
)
)
==
NULL
)
{
msg_Err
(
p_intf
,
"cannot open dir (%s)"
,
psz_dir
);
return
VLC_EGENERIC
;
...
...
@@ -149,7 +148,7 @@ int E_(ParseDirectory)( intf_thread_t *p_intf, char *psz_root,
msg_Dbg
(
p_intf
,
"dir=%s"
,
psz_dir
);
sprintf
(
dir
,
"%s%c.access"
,
psz_dir
,
sep
);
if
(
(
file
=
fopen
(
dir
,
"r"
)
)
!=
NULL
)
if
(
(
file
=
utf8_
fopen
(
dir
,
"r"
)
)
!=
NULL
)
{
char
line
[
1024
];
int
i_size
;
...
...
@@ -192,17 +191,20 @@ int E_(ParseDirectory)( intf_thread_t *p_intf, char *psz_root,
for
(
;;
)
{
char
*
psz_filename
;
/* parse psz_src dir */
if
(
(
p
_dir_content
=
readdir
(
p_dir
)
)
==
NULL
)
if
(
(
p
sz_filename
=
utf8_
readdir
(
p_dir
)
)
==
NULL
)
{
break
;
}
if
(
(
p
_dir_content
->
d_
name
[
0
]
==
'.'
)
||
(
i_dirlen
+
strlen
(
p
_dir_content
->
d_
name
)
>
MAX_DIR_SIZE
)
)
if
(
(
p
sz_file
name
[
0
]
==
'.'
)
||
(
i_dirlen
+
strlen
(
p
sz_file
name
)
>
MAX_DIR_SIZE
)
)
continue
;
sprintf
(
dir
,
"%s%c%s"
,
psz_dir
,
sep
,
p_dir_content
->
d_name
);
sprintf
(
dir
,
"%s%c%s"
,
psz_dir
,
sep
,
psz_filename
);
LocaleFree
(
psz_filename
);
if
(
E_
(
ParseDirectory
)(
p_intf
,
psz_root
,
dir
)
)
{
httpd_file_sys_t
*
f
=
NULL
;
...
...
modules/demux/mp4/drms.c
View file @
543574fd
...
...
@@ -1580,7 +1580,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
=
fopen
(
psz_path
,
"wb"
);
file
=
utf8_
fopen
(
psz_path
,
"wb"
);
if
(
file
!=
NULL
)
{
i_ret
=
fwrite
(
p_user_key
,
sizeof
(
uint32_t
),
...
...
@@ -1608,7 +1608,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
=
fopen
(
psz_path
,
"rb"
);
file
=
utf8_
fopen
(
psz_path
,
"rb"
);
if
(
file
!=
NULL
)
{
i_ret
=
fread
(
p_user_key
,
sizeof
(
uint32_t
),
...
...
@@ -1773,7 +1773,7 @@ static int GetSCIData( char *psz_ipod, uint32_t **pp_sci,
{
FILE
*
file
;
char
*
psz_path
=
NULL
;
char
p_tmp
[
PATH_MAX
];
char
p_tmp
[
4
*
PATH_MAX
];
int
i_ret
=
-
1
;
if
(
psz_ipod
==
NULL
)
...
...
@@ -1799,7 +1799,12 @@ static int GetSCIData( char *psz_ipod, uint32_t **pp_sci,
strncat
(
p_tmp
,
p_filename
,
min
(
strlen
(
p_filename
),
(
sizeof
(
p_tmp
)
/
sizeof
(
p_tmp
[
0
])
-
1
)
-
strlen
(
p_tmp
)
)
);
psz_path
=
p_tmp
;
psz_path
=
FromLocale
(
p_tmp
);
strncpy
(
psz_tmp
,
sizeof
(
psz_tmp
)
-
1
,
psz_path
);
psz_tmp
[
sizeof
(
psz_tmp
)
-
1
]
=
'\0'
;
LocaleFree
(
psz_path
);
psz_path
=
psz_tmp
;
}
if
(
shfolder_dll
!=
NULL
)
...
...
@@ -1828,7 +1833,7 @@ static int GetSCIData( char *psz_ipod, uint32_t **pp_sci,
return
-
1
;
}
file
=
fopen
(
psz_path
,
"rb"
);
file
=
utf8_
fopen
(
psz_path
,
"rb"
);
if
(
file
!=
NULL
)
{
struct
stat
st
;
...
...
modules/video_filter/motiondetect.c
View file @
543574fd
...
...
@@ -158,7 +158,7 @@ static int Create( vlc_object_t *p_this )
}
/* Parse description file and allocate areas */
p_file
=
fopen
(
psz_descfilename
,
"r"
);
p_file
=
utf8_
fopen
(
psz_descfilename
,
"r"
);
if
(
!
p_file
)
{
msg_Err
(
p_this
,
"Failed to open descritpion file %s"
,
...
...
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