Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
aee03175
Commit
aee03175
authored
Aug 15, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
utf8_open: make third parameter optional
parent
71f36d43
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
include/vlc_charset.h
include/vlc_charset.h
+1
-1
src/text/filesystem.c
src/text/filesystem.c
+11
-2
No files found.
include/vlc_charset.h
View file @
aee03175
...
...
@@ -41,7 +41,7 @@ VLC_EXPORT( char *, ToLocale, ( const char * ) LIBVLC_USED );
VLC_EXPORT
(
char
*
,
ToLocaleDup
,
(
const
char
*
)
LIBVLC_USED
);
/* TODO: move all of this to "vlc_fs.h" or something like that */
VLC_EXPORT
(
int
,
utf8_open
,
(
const
char
*
filename
,
int
flags
,
mode_t
mode
)
LIBVLC_USED
);
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
(
DIR
*
,
utf8_opendir
,
(
const
char
*
dirname
)
LIBVLC_USED
);
VLC_EXPORT
(
char
*
,
utf8_readdir
,
(
DIR
*
dir
)
LIBVLC_USED
);
...
...
src/text/filesystem.c
View file @
aee03175
...
...
@@ -85,11 +85,20 @@ static int convert_path (const char *restrict path, wchar_t *restrict wpath)
*
* @param filename file path to open (with UTF-8 encoding)
* @param flags open() flags, see the C library open() documentation
* @param mode file permissions if creating a new file
* @return a file handle on success, -1 on error (see errno).
* @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
,
mode_t
mode
)
int
utf8_open
(
const
char
*
filename
,
int
flags
,
...
)
{
mode_t
mode
=
0
;
va_list
ap
;
va_start
(
ap
,
flags
);
if
(
flags
&
O_CREAT
)
mode
=
va_arg
(
ap
,
mode_t
);
va_end
(
ap
);
#ifdef UNDER_CE
/*_open translates to wchar internally on WinCE*/
return
_open
(
filename
,
flags
,
mode
);
...
...
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