Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
b298ce46
Commit
b298ce46
authored
Oct 26, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace vlc_fix_readdir() with FromCharset()
parent
e50e29c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
35 deletions
+5
-35
src/libvlc.h
src/libvlc.h
+0
-5
src/text/charset.c
src/text/charset.c
+0
-29
src/text/filesystem.c
src/text/filesystem.c
+5
-1
No files found.
src/libvlc.h
View file @
b298ce46
...
...
@@ -90,11 +90,6 @@ void msg_StackSet ( int, const char*, ... );
void
msg_StackAdd
(
const
char
*
,
...
);
const
char
*
msg_StackMsg
(
void
);
/*
* Unicode stuff
*/
char
*
vlc_fix_readdir
(
const
char
*
);
/*
* LibVLC exit event handling
*/
...
...
src/text/charset.c
View file @
b298ce46
...
...
@@ -43,35 +43,6 @@
#include "libvlc.h"
#include <vlc_charset.h>
char
*
vlc_fix_readdir
(
const
char
*
psz_string
)
{
#ifdef __APPLE__
vlc_iconv_t
hd
=
vlc_iconv_open
(
"UTF-8"
,
"UTF-8-MAC"
);
if
(
hd
!=
(
vlc_iconv_t
)(
-
1
))
{
const
char
*
psz_in
=
psz_string
;
size_t
i_in
=
strlen
(
psz_in
);
size_t
i_out
=
i_in
*
2
;
char
*
psz_utf8
=
malloc
(
i_out
+
1
);
char
*
psz_out
=
psz_utf8
;
size_t
i_ret
=
vlc_iconv
(
hd
,
&
psz_in
,
&
i_in
,
&
psz_out
,
&
i_out
);
vlc_iconv_close
(
hd
);
if
(
i_ret
==
(
size_t
)(
-
1
)
||
i_in
)
{
free
(
psz_utf8
);
return
strdup
(
psz_string
);
}
*
psz_out
=
'\0'
;
return
psz_utf8
;
}
#endif
return
strdup
(
psz_string
);
}
/**
* us_strtod() has the same prototype as ANSI C strtod() but it uses the
* POSIX/C decimal format, regardless of the current numeric locale.
...
...
src/text/filesystem.c
View file @
b298ce46
...
...
@@ -347,7 +347,11 @@ char *vlc_readdir( DIR *dir )
if
(
val
!=
0
)
errno
=
val
;
else
if
(
ent
!=
NULL
)
path
=
vlc_fix_readdir
(
ent
->
d_name
);
#ifndef __APPLE__
path
=
strdup
(
ent
->
d_name
);
#else
path
=
FromCharset
(
"UTF-8-MAC"
,
ent
->
d_name
,
strlen
(
ent
->
d_name
));
#endif
free
(
buf
);
return
path
;
#endif
...
...
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