Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
787c6f5e
Commit
787c6f5e
authored
Nov 05, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log: use bool
Use the bool data type for flags.
parent
4c967a6b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
log.c
src/log.c
+5
-5
log.h
src/log.h
+5
-3
No files found.
src/log.c
View file @
787c6f5e
...
...
@@ -40,7 +40,7 @@
static
unsigned
int
log_threshold
=
G_LOG_LEVEL_INFO
;
static
int
stdout_mode
=
1
;
static
bool
stdout_mode
=
true
;
static
int
out_fd
=
-
1
;
static
int
err_fd
=
-
1
;
static
const
char
*
out_filename
;
...
...
@@ -77,7 +77,7 @@ mpd_log_func(G_GNUC_UNUSED const gchar *log_domain,
message
);
}
void
initLog
(
const
int
verbose
)
void
initLog
(
bool
verbose
)
{
ConfigParam
*
param
;
...
...
@@ -104,7 +104,7 @@ void initLog(const int verbose)
}
}
void
open_log_files
(
const
int
use_stdout
)
void
open_log_files
(
bool
use_stdout
)
{
mode_t
prev
;
ConfigParam
*
param
;
...
...
@@ -130,12 +130,12 @@ void open_log_files(const int use_stdout)
umask
(
prev
);
}
void
setup_log_output
(
const
int
use_stdout
)
void
setup_log_output
(
bool
use_stdout
)
{
fflush
(
NULL
);
if
(
!
use_stdout
)
{
redirect_logs
();
stdout_mode
=
0
;
stdout_mode
=
false
;
}
}
...
...
src/log.h
View file @
787c6f5e
...
...
@@ -21,6 +21,8 @@
#include "gcc.h"
#include <stdbool.h>
mpd_printf
void
ERROR
(
const
char
*
fmt
,
...);
mpd_printf
void
LOG
(
const
char
*
fmt
,
...);
mpd_printf
void
SECURE
(
const
char
*
fmt
,
...);
...
...
@@ -28,11 +30,11 @@ mpd_printf void DEBUG(const char *fmt, ...);
mpd_printf
void
WARNING
(
const
char
*
fmt
,
...);
mpd_printf
mpd_noreturn
void
FATAL
(
const
char
*
fmt
,
...);
void
initLog
(
const
int
verbose
);
void
initLog
(
bool
verbose
);
void
setup_log_output
(
const
int
use_stdout
);
void
setup_log_output
(
bool
use_stdout
);
void
open_log_files
(
const
int
use_stdout
);
void
open_log_files
(
bool
use_stdout
);
int
cycle_log_files
(
void
);
...
...
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