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
1a4ae567
Commit
1a4ae567
authored
Aug 06, 2005
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* charset.c: don't return a pointer to a buffer allocated on the stack!
* all: removed some warnings
parent
9bcabfda
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
14 deletions
+25
-14
modules/gui/skins2/controls/ctrl_list.cpp
modules/gui/skins2/controls/ctrl_list.cpp
+1
-1
modules/gui/skins2/controls/ctrl_slider.cpp
modules/gui/skins2/controls/ctrl_slider.cpp
+1
-1
modules/gui/skins2/src/skin_common.hpp
modules/gui/skins2/src/skin_common.hpp
+5
-0
src/extras/getopt.c
src/extras/getopt.c
+0
-2
src/libvlc.c
src/libvlc.c
+3
-0
src/misc/charset.c
src/misc/charset.c
+15
-10
No files found.
modules/gui/skins2/controls/ctrl_list.cpp
View file @
1a4ae567
...
...
@@ -39,7 +39,7 @@
# include "solaris_specific.h" // for lrint
#endif
#define SCROLL_STEP 0.05
#define SCROLL_STEP 0.05
f
#define LINE_INTERVAL 1 // Number of pixels inserted between 2 lines
...
...
modules/gui/skins2/controls/ctrl_slider.cpp
View file @
1a4ae567
...
...
@@ -35,7 +35,7 @@
#define RANGE 40
#define SCROLL_STEP 0.05
#define SCROLL_STEP 0.05
f
CtrlSliderCursor
::
CtrlSliderCursor
(
intf_thread_t
*
pIntf
,
...
...
modules/gui/skins2/src/skin_common.hpp
View file @
1a4ae567
...
...
@@ -46,6 +46,11 @@ class ThemeRepository;
# define M_PI 3.14159265358979323846
#endif
#ifdef _MSC_VER
// turn off 'warning C4355: 'this' : used in base member initializer list'
#pragma warning ( disable:4355 )
#endif
// Useful macros
#define SKINS_DELETE( p ) \
if( p ) \
...
...
src/extras/getopt.c
View file @
1a4ae567
...
...
@@ -216,8 +216,6 @@ static char *posixly_correct;
/* Avoid depending on library functions or files
whose names are inconsistent. */
char
*
getenv
();
static
char
*
my_index
(
str
,
chr
)
const
char
*
str
;
...
...
src/libvlc.c
View file @
1a4ae567
...
...
@@ -258,7 +258,10 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
module_t
*
p_help_module
;
playlist_t
*
p_playlist
;
vlc_value_t
val
;
#if defined( ENABLE_NLS ) \
&& ( defined( HAVE_GETTEXT ) || defined( HAVE_INCLUDED_GETTEXT ) )
char
*
psz_language
;
#endif
if
(
!
p_vlc
)
{
...
...
src/misc/charset.c
View file @
1a4ae567
...
...
@@ -203,14 +203,13 @@ static const char* vlc_charset_aliases( const char *psz_name )
/* Returns charset from "language_COUNTRY.charset@modifier" string */
#if defined WIN32 || defined OS2 || !HAVE_LANGINFO_CODESET
static
const
char
*
vlc_encoding_from_locale
(
char
*
psz_locale
)
static
void
vlc_encoding_from_locale
(
char
*
psz_locale
,
char
*
psz_charset
)
{
char
*
psz_dot
=
strchr
(
psz_locale
,
'.'
);
if
(
psz_dot
!=
NULL
)
{
const
char
*
psz_modifier
;
char
buf
[
2
+
10
+
1
];
psz_dot
++
;
...
...
@@ -218,17 +217,20 @@ static const char *vlc_encoding_from_locale( char *psz_locale )
psz_modifier
=
strchr
(
psz_dot
,
'@'
);
if
(
psz_modifier
==
NULL
)
return
psz_dot
;
{
strcpy
(
psz_charset
,
psz_dot
);
return
;
}
if
(
0
<
(
psz_modifier
-
psz_dot
)
&&
(
psz_modifier
-
psz_dot
)
<
sizeof
(
buf
)
)
&&
(
psz_modifier
-
psz_dot
)
<
2
+
10
+
1
)
{
memcpy
(
buf
,
psz_dot
,
psz_modifier
-
psz_dot
);
buf
[
psz_modifier
-
psz_dot
]
=
'\0'
;
return
buf
;
memcpy
(
psz_charset
,
psz_dot
,
psz_modifier
-
psz_dot
);
psz_charset
[
psz_modifier
-
psz_dot
]
=
'\0'
;
return
;
}
}
/* try language mapping */
return
vlc_encoding_from_language
(
psz_locale
);
strcpy
(
psz_charset
,
vlc_encoding_from_language
(
psz_locale
)
);
}
#endif
...
...
@@ -244,6 +246,7 @@ vlc_bool_t vlc_current_charset( char **psz_charset )
# else
/* On old systems which lack it, use setlocale or getenv. */
const
char
*
psz_locale
=
NULL
;
char
buf
[
2
+
10
+
1
];
/* But most old systems don't have a complete set of locales. Some
* (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
...
...
@@ -265,7 +268,8 @@ vlc_bool_t vlc_current_charset( char **psz_charset )
/* On some old systems, one used to set locale = "iso8859_1". On others,
* you set it to "language_COUNTRY.charset". Darwin only has LANG :( */
psz_codeset
=
vlc_encoding_from_locale
(
(
char
*
)
psz_locale
);
vlc_encoding_from_locale
(
(
char
*
)
psz_locale
,
buf
);
psz_codeset
=
buf
;
# endif
/* HAVE_LANGINFO_CODESET */
#elif defined SYS_DARWIN
...
...
@@ -298,7 +302,8 @@ vlc_bool_t vlc_current_charset( char **psz_charset )
locale
=
getenv
(
"LANG"
);
}
if
(
psz_locale
!=
NULL
&&
psz_locale
[
0
]
!=
'\0'
)
psz_codeset
=
vlc_encoding_from_locale
(
psz_locale
);
vlc_encoding_from_locale
(
psz_locale
,
buf
);
psz_codeset
=
buf
;
else
{
/* OS/2 has a function returning the locale's codepage as a number. */
...
...
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