Commit Graph

11 Commits

Author SHA1 Message Date
Dan McGee
a14a8c83e0 Remove extra '\n' from red_printf() calls
red_printf() takes care of adding a newline to all messages; remove the
extra newline from all messages and macros that were doubling them up.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
2012-03-20 15:25:56 +01:00
Alon Levy
5846dec251 server: add prefix argument to red_printf_debug
printed before function name. No central location for prefixes.
Adding "WORKER", "ASYNC", "MAIN" since those were the current users.
2012-03-20 15:25:54 +01:00
Alon Levy
cc30c6d833 common/spice_common.h: red_printf_debug: fix wrong sign 2012-03-20 15:25:54 +01:00
Alon Levy
ed77ce6dbf common: introduce red_printf_debug 2012-03-20 15:25:54 +01:00
Alon Levy
cb4c660655 common: add backtrace via gstack or glibc backtrace
Add a backtrace printing function copied from xserver os/backtrace.c
that uses gstack, and if that isn't found then glibc's backtrace.
Used in ASSERT, tested on F15.
2012-03-20 15:25:53 +01:00
Christophe Fergeau
c04b58bf7a move get_time_stamp to main_channel.c
There is only one user of get_time_stamp from spice_common.h so
it's not really useful to keep it there.
2012-03-20 15:25:52 +01:00
Christophe Fergeau
62ef19f8c7 use standard do { } while (0) for spice_common.h macros 2012-03-20 15:25:52 +01:00
Christophe Fergeau
09453dcd43 move WARN and WARN_ONCE to spice_common.h 2012-03-20 15:25:52 +01:00
Christophe Fergeau
50fc5bc747 common,server: use ASSERT from spice_common.h
spice_common.h provides an ASSERT macro, no need to duplicate it
in many places. For now client/debug.h keeps its own copy since
debug.h and spice_common.h have clashes on other macros which are
trickier to unify.
2012-03-20 15:25:52 +01:00
Christophe Fergeau
57b6e08160 use foo(void) instead of foo() in prototypes
In C, the latter isn't a prototype for a function with no arg,
but declares a function with an undefined number of args.
2012-03-20 15:25:51 +01:00
Alon Levy
2890d418ee server/common: introduce common/spice_common.h
move all the ASSERT/PANIC/PANIC_ON/red_error/red_printf* macros
to a common file to be used with ring.h that is going to be used externally
(by spice-gtk).
2012-03-20 15:25:51 +01:00