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
89f83434
Commit
89f83434
authored
Nov 29, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Export vlc_towc()
parent
1b68edb9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
12 deletions
+26
-12
include/vlc_charset.h
include/vlc_charset.h
+23
-1
src/config/help.c
src/config/help.c
+1
-0
src/config/keys.c
src/config/keys.c
+1
-0
src/libvlc.h
src/libvlc.h
+0
-2
src/libvlccore.sym
src/libvlccore.sym
+1
-0
src/text/unicode.c
src/text/unicode.c
+0
-9
No files found.
include/vlc_charset.h
View file @
89f83434
...
...
@@ -27,9 +27,29 @@
/**
* \file
* This files handles locale conversions in vlc
* Characters sets handling
*
* \ingroup strings
* @{
*/
/**
* Decodes a code point from UTF-8.
*
* Converts the first character in a UTF-8 sequence into a Unicode code point.
*
* \param str an UTF-8 bytes sequence [IN]
* \param pwc address of a location to store the code point [OUT]
*
* \return the number of bytes occupied by the decoded code point
*
* \retval (size_t)-1 not a valid UTF-8 sequence
* \retval 0 null character (i.e. str points to an empty string)
* \retval 1 (non-null) ASCII character
* \retval 2-4 non-ASCII character
*/
VLC_API
size_t
vlc_towc
(
const
char
*
str
,
uint32_t
*
restrict
pwc
);
/* iconv wrappers (defined in src/extras/libc.c) */
typedef
void
*
vlc_iconv_t
;
VLC_API
vlc_iconv_t
vlc_iconv_open
(
const
char
*
,
const
char
*
)
VLC_USED
;
...
...
@@ -204,6 +224,8 @@ static inline char *FromLatin1 (const char *latin)
return
utf8
?
utf8
:
str
;
}
/** @} */
VLC_API
double
us_strtod
(
const
char
*
,
char
**
)
VLC_USED
;
VLC_API
float
us_strtof
(
const
char
*
,
char
**
)
VLC_USED
;
VLC_API
double
us_atof
(
const
char
*
)
VLC_USED
;
...
...
src/config/help.c
View file @
89f83434
...
...
@@ -31,6 +31,7 @@
#include <vlc_common.h>
#include <vlc_modules.h>
#include <vlc_plugin.h>
#include <vlc_charset.h>
#include "modules/modules.h"
#include "config/configuration.h"
#include "libvlc.h"
...
...
src/config/keys.c
View file @
89f83434
...
...
@@ -42,6 +42,7 @@
#include <vlc_common.h>
#include <vlc_keys.h>
#include <vlc_charset.h>
#include "configuration.h"
#include "libvlc.h"
...
...
src/libvlc.h
View file @
89f83434
...
...
@@ -34,8 +34,6 @@ struct vlc_actions;
struct
vlc_actions
*
vlc_InitActions
(
libvlc_int_t
*
);
extern
void
vlc_DeinitActions
(
libvlc_int_t
*
,
struct
vlc_actions
*
);
size_t
vlc_towc
(
const
char
*
str
,
uint32_t
*
restrict
pwc
);
/*
* OS-specific initialization
*/
...
...
src/libvlccore.sym
View file @
89f83434
...
...
@@ -628,6 +628,7 @@ vlc_timer_create
vlc_timer_destroy
vlc_timer_getoverrun
vlc_timer_schedule
vlc_towc
vlc_ureduce
vlc_epg_Init
vlc_epg_Clean
...
...
src/text/unicode.c
View file @
89f83434
...
...
@@ -110,15 +110,6 @@ int utf8_fprintf( FILE *stream, const char *fmt, ... )
return
res
;
}
/**
* Converts the first character from a UTF-8 sequence into a code point.
*
* @param str an UTF-8 bytes sequence
* @return 0 if str points to an empty string, i.e. the first character is NUL;
* number of bytes that the first character occupies (from 1 to 4) otherwise;
* -1 if the byte sequence was not a valid UTF-8 sequence.
*/
size_t
vlc_towc
(
const
char
*
str
,
uint32_t
*
restrict
pwc
)
{
uint8_t
*
ptr
=
(
uint8_t
*
)
str
,
c
;
...
...
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