Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
320fb45f
Commit
320fb45f
authored
Oct 01, 2007
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ncurses: adds some (size_t) casting
parent
91994ef8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
modules/gui/ncurses.c
modules/gui/ncurses.c
+4
-5
No files found.
modules/gui/ncurses.c
View file @
320fb45f
...
...
@@ -1152,20 +1152,19 @@ static void mvnprintw( int y, int x, int w, const char *p_fmt, ... )
i_char_len
=
mbstowcs
(
psz_wide
,
p_buf
,
i_len
);
if
(
i_char_len
==
-
1
)
/* an invalid character was encountered */
if
(
i_char_len
==
(
size_t
)
-
1
)
/* an invalid character was encountered */
i_width
=
i_len
;
else
{
i_width
=
wcswidth
(
psz_wide
,
i_char_len
);
if
(
i_width
==
-
1
)
/* a non printable character was encountered */
if
(
i_width
==
(
size_t
)
-
1
)
/* a non printable character was encountered */
i_width
=
i_len
;
}
if
(
i_width
>
w
)
if
(
i_width
>
(
size_t
)
w
)
#else
if
(
i_len
>
w
)
#endif
{
/* FIXME: ncursesw: ellipsize psz_wide while keeping the width in mind */
char
*
psz_local
;
int
i_cut
=
i_len
-
w
;
int
x1
=
i_len
/
2
-
i_cut
/
2
;
int
x2
=
x1
+
i_cut
;
...
...
@@ -1184,7 +1183,7 @@ static void mvnprintw( int y, int x, int w, const char *p_fmt, ... )
#ifdef HAVE_NCURSESW_CURSES_H
mvprintw
(
y
,
x
,
"%s"
,
p_buf
);
#else
psz_local
=
ToLocale
(
p_buf
);
char
*
psz_local
=
ToLocale
(
p_buf
);
mvprintw
(
y
,
x
,
"%s"
,
psz_local
);
LocaleFree
(
p_buf
);
#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