Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libbluray
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
libbluray
Commits
fba8d177
Commit
fba8d177
authored
Oct 19, 2009
by
cRTrn13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed logging.c
parent
edb6d0cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
37 deletions
+34
-37
src/util/logging.c
src/util/logging.c
+0
-37
src/util/logging.h
src/util/logging.h
+34
-0
No files found.
src/util/logging.c
deleted
100644 → 0
View file @
edb6d0cb
#include <string.h>
#include "logging.h"
const
uint32_t
master_mask
=
0xffff
;
// this is only temporary
char
out
[
512
];
#define HEX_PRINT(X,Y) { int zz; for(zz = 0; zz < Y; zz++) fprintf(stderr, "%02X", X[zz]); fprintf(stderr, "\n"); }
char
*
print_hex
(
uint8_t
*
buf
,
int
count
)
{
memset
(
out
,
0
,
count
);
int
zz
;
for
(
zz
=
0
;
zz
<
count
;
zz
++
)
{
sprintf
(
out
+
(
zz
*
2
),
"%02X"
,
buf
[
zz
]);
}
return
out
;
}
void
debug
(
char
*
file
,
int
line
,
uint32_t
mask
,
const
char
*
format
,
...)
{
uint32_t
type
=
(
mask
&
master_mask
)
&
0xfffe
,
verbose
=
!
((
!
(
master_mask
&
1
))
&
(
mask
&
1
));
if
(
type
&&
verbose
)
{
char
buffer
[
512
];
va_list
args
;
va_start
(
args
,
format
);
vsprintf
(
buffer
,
format
,
args
);
va_end
(
args
);
fprintf
(
stderr
,
"%s:%d: %s"
,
file
,
line
,
buffer
);
}
}
src/util/logging.h
View file @
fba8d177
...
...
@@ -5,6 +5,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <stdint.h>
#include <string.h>
#define DEBUG(X,Y,...) debug(__FILE__,__LINE__,X,Y,##__VA_ARGS__)
...
...
@@ -17,7 +18,40 @@ enum {
DBG_BLURAY
=
64
}
debug_mask
;
const
uint32_t
master_mask
=
0xffff
;
// this is only temporary
char
out
[
512
];
char
*
print_hex
(
uint8_t
*
str
,
int
count
);
void
debug
(
char
*
file
,
int
line
,
uint32_t
mask
,
const
char
*
format
,
...);
char
*
print_hex
(
uint8_t
*
buf
,
int
count
)
{
memset
(
out
,
0
,
count
);
int
zz
;
for
(
zz
=
0
;
zz
<
count
;
zz
++
)
{
sprintf
(
out
+
(
zz
*
2
),
"%02X"
,
buf
[
zz
]);
}
return
out
;
}
void
debug
(
char
*
file
,
int
line
,
uint32_t
mask
,
const
char
*
format
,
...)
{
uint32_t
type
=
(
mask
&
master_mask
)
&
0xfffe
,
verbose
=
!
((
!
(
master_mask
&
1
))
&
(
mask
&
1
));
if
(
type
&&
verbose
)
{
char
buffer
[
512
];
va_list
args
;
va_start
(
args
,
format
);
vsprintf
(
buffer
,
format
,
args
);
va_end
(
args
);
fprintf
(
stderr
,
"%s:%d: %s"
,
file
,
line
,
buffer
);
}
}
#endif
/* LOGGING_H_ */
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