]> git.tuebingen.mpg.de Git - paraslash.git/commit
Allow switching between different log methods at runtime.
authorAndre Noll <maan@systemlinux.org>
Mon, 29 Aug 2011 17:17:38 +0000 (19:17 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 20 Nov 2011 14:08:41 +0000 (15:08 +0100)
commit65453788515cd5f4c905b518745b4dd7f6f2da10
treef0ff93acd1c2ba0154229fc3a112e9d242b3f057
parentefc124e295a4df44dd4d60c856e3a3d87f645e96
Allow switching between different log methods at runtime.

Currently, para_client defines its para_log function via the
INIT_STDERR_LOGGING() macro which generates a log function that
writes to stderr. However, we will need to switch to a different,
curses-aware logging function when operating in interactive mode.

To support more than one log method the type of para_log is changed
from a function to a (public) pointer variable. This variable is
supposed to point to the log function currently in use so that the
application can simply set para_log differently in order to switch
between log functions.

The patch also changes the INIT_STDERR_LOGGING() macro to receive the
name of the log function to be defined and to let para_log point to
the newly defined function.
audiod.c
daemon.c
daemon.h
fade.c
gui.c
para.h
server.c