]> git.tuebingen.mpg.de Git - paraslash.git/commit
daemon: Make daemon_init_colors_or_die() independent of gengetopt.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 21 Jun 2016 07:19:57 +0000 (09:19 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 7 Aug 2016 12:03:44 +0000 (14:03 +0200)
commitcf47da359caca907d8f0fd8fe9f5f4ddb398b67d
tree0b4628d763b80db29b3748d79026aadb3cdc866f
parent67cb641c126769af98289539ff3425dfbf5e12e2
daemon: Make daemon_init_colors_or_die() independent of gengetopt.

The function receives the values given to the --log-color option as
a char * array, which is the type that gengetopt provides for the
arguments to string options which may be given multiple times.

This patch gets get rid of this implementation detail. The function no
longer takes the arguments to --log-color at all and applications now
must call daemon_set_log_color_or_die() themselves to set user-defined
per-loglevel colors.

To make this work, we let daemon_init_colors_or_die() return a
boolean which indicates whether color mode should be enabled, and
daemon_set_log_color_or_die() is made public. The two users of this
API, para_server and para_audiod, are adjusted accordingly.
audiod.c
daemon.c
daemon.h
server.c