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
b17eb18e
Commit
b17eb18e
authored
Aug 20, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move msg_Copy() and msg_Free() to ncurses
parent
195940ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
21 deletions
+19
-21
include/vlc_messages.h
include/vlc_messages.h
+0
-21
modules/gui/ncurses.c
modules/gui/ncurses.c
+19
-0
No files found.
include/vlc_messages.h
View file @
b17eb18e
...
...
@@ -64,27 +64,6 @@ typedef struct
char
*
psz_msg
;
/**< Message text */
}
msg_item_t
;
VLC_MALLOC
VLC_USED
static
inline
msg_item_t
*
msg_Copy
(
const
msg_item_t
*
msg
)
{
msg_item_t
*
copy
=
(
msg_item_t
*
)
xmalloc
(
sizeof
(
*
copy
));
copy
->
i_type
=
msg
->
i_type
;
copy
->
i_object_id
=
msg
->
i_object_id
;
copy
->
psz_object_type
=
msg
->
psz_object_type
;
copy
->
psz_module
=
strdup
(
msg
->
psz_module
);
copy
->
psz_msg
=
strdup
(
msg
->
psz_msg
);
copy
->
psz_header
=
msg
->
psz_header
?
strdup
(
msg
->
psz_header
)
:
NULL
;
return
copy
;
}
static
inline
void
msg_Free
(
msg_item_t
*
msg
)
{
free
((
char
*
)
msg
->
psz_module
);
free
((
char
*
)
msg
->
psz_header
);
free
(
msg
->
psz_msg
);
free
(
msg
);
}
/**
* Used by interface plugins which subscribe to the message bank.
*/
...
...
modules/gui/ncurses.c
View file @
b17eb18e
...
...
@@ -1810,6 +1810,25 @@ static void HandleKey(intf_thread_t *p_intf)
/*
*
*/
static
msg_item_t
*
msg_Copy
(
const
msg_item_t
*
msg
)
{
msg_item_t
*
copy
=
(
msg_item_t
*
)
xmalloc
(
sizeof
(
*
copy
));
copy
->
i_type
=
msg
->
i_type
;
copy
->
i_object_id
=
msg
->
i_object_id
;
copy
->
psz_object_type
=
msg
->
psz_object_type
;
copy
->
psz_module
=
strdup
(
msg
->
psz_module
);
copy
->
psz_msg
=
strdup
(
msg
->
psz_msg
);
copy
->
psz_header
=
msg
->
psz_header
?
strdup
(
msg
->
psz_header
)
:
NULL
;
return
copy
;
}
static
void
msg_Free
(
msg_item_t
*
msg
)
{
free
((
char
*
)
msg
->
psz_module
);
free
((
char
*
)
msg
->
psz_header
);
free
(
msg
->
psz_msg
);
free
(
msg
);
}
static
void
MsgCallback
(
void
*
data
,
const
msg_item_t
*
msg
)
{
...
...
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