Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
b130680e
Commit
b130680e
authored
Nov 18, 2013
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print(Color)Msg: align pointers on the right
Pad with 0s, remove 0x prefix
parent
27de05c9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/misc/messages.c
src/misc/messages.c
+5
-2
No files found.
src/misc/messages.c
View file @
b130680e
...
...
@@ -204,6 +204,9 @@ static const char msg_type[4][9] = { "", " error", " warning", " debug" };
#define GRAY "\033[0m"
static
const
char
msg_color
[
4
][
8
]
=
{
WHITE
,
RED
,
YELLOW
,
GRAY
};
/* Display size of a pointer */
static
const
int
ptr_width
=
2
*
/* hex digits */
sizeof
(
uintptr_t
);
static
void
PrintColorMsg
(
void
*
d
,
int
type
,
const
vlc_log_t
*
p_item
,
const
char
*
format
,
va_list
ap
)
{
...
...
@@ -216,7 +219,7 @@ static void PrintColorMsg (void *d, int type, const vlc_log_t *p_item,
int
canc
=
vlc_savecancel
();
flockfile
(
stream
);
fprintf
(
stream
,
"["
GREEN
"%
p"
GRAY
"] "
,
(
void
*
)
p_item
->
i_object_id
);
fprintf
(
stream
,
"["
GREEN
"%
0*"
PRIxPTR
""
GRAY
"] "
,
ptr_width
,
p_item
->
i_object_id
);
if
(
p_item
->
psz_header
!=
NULL
)
utf8_fprintf
(
stream
,
"[%s] "
,
p_item
->
psz_header
);
utf8_fprintf
(
stream
,
"%s %s%s: %s"
,
p_item
->
psz_module
,
...
...
@@ -242,7 +245,7 @@ static void PrintMsg (void *d, int type, const vlc_log_t *p_item,
int
canc
=
vlc_savecancel
();
flockfile
(
stream
);
fprintf
(
stream
,
"[%
p] "
,
(
void
*
)
p_item
->
i_object_id
);
fprintf
(
stream
,
"[%
0*"
PRIxPTR
"] "
,
ptr_width
,
p_item
->
i_object_id
);
if
(
p_item
->
psz_header
!=
NULL
)
utf8_fprintf
(
stream
,
"[%s] "
,
p_item
->
psz_header
);
utf8_fprintf
(
stream
,
"%s %s%s: "
,
p_item
->
psz_module
,
...
...
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