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
a5fded6e
Commit
a5fded6e
authored
Mar 22, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Win32: add FromANSI / ToANSI and use them
parent
2f457682
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
18 deletions
+19
-18
include/vlc_charset.h
include/vlc_charset.h
+19
-18
No files found.
include/vlc_charset.h
View file @
a5fded6e
...
@@ -56,22 +56,6 @@ VLC_API void * ToCharset( const char *charset, const char *in, size_t *outsize )
...
@@ -56,22 +56,6 @@ VLC_API void * ToCharset( const char *charset, const char *in, size_t *outsize )
# define ToLocaleDup strdup
# define ToLocaleDup strdup
#else
#else
VLC_USED
static
inline
char
*
FromLocale
(
const
char
*
locale
)
{
return
locale
?
FromCharset
(
""
,
locale
,
strlen
(
locale
))
:
NULL
;
}
VLC_USED
static
inline
char
*
ToLocale
(
const
char
*
utf8
)
{
size_t
outsize
;
return
utf8
?
(
char
*
)
ToCharset
(
""
,
utf8
,
&
outsize
)
:
(
char
*
)
NULL
;
}
# define LocaleFree(s) free((char *)(s))
# define FromLocaleDup FromLocale
# define ToLocaleDup ToLocale
VLC_USED
VLC_USED
static
inline
char
*
FromWide
(
const
wchar_t
*
wide
)
static
inline
char
*
FromWide
(
const
wchar_t
*
wide
)
{
{
...
@@ -135,13 +119,30 @@ static inline char *FromCodePage (unsigned cp, const char *mb)
...
@@ -135,13 +119,30 @@ static inline char *FromCodePage (unsigned cp, const char *mb)
return
utf8
;
return
utf8
;
}
}
VLC_USED
VLC_MALLOC
static
inline
char
*
FromANSI
(
const
char
*
ansi
)
{
return
FromCodePage
(
GetACP
(),
ansi
);
}
VLC_USED
VLC_MALLOC
static
inline
char
*
ToANSI
(
const
char
*
utf8
)
{
return
ToCodePage
(
GetACP
(),
utf8
);
}
# ifdef UNICODE
# ifdef UNICODE
# define FromT FromWide
# define FromT FromWide
# define ToT ToWide
# define ToT ToWide
# else
# else
# define FromT From
LocaleDup
# define FromT From
ANSI
# define ToT To
LocaleDup
# define ToT To
ANSI
# endif
# endif
# define FromLocale FromANSI
# define ToLocale ToAnsi
# define LocaleFree(s) free((char *)(s))
# define FromLocaleDup FromANSI
# define ToLocaleDup ToANSI
#endif
#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