summaryrefslogtreecommitdiffstats
path: root/common/rop3.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2011-04-03 15:49:36 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-20 15:30:23 +0100
commitc1403ee6bf4dfdd8f614f84ef145083b06a9f23e (patch)
treea0f72aa7e4ca235d3017760891bebc964dd530d8 /common/rop3.c
parentbb133148d85e66349b34375dd849d5d8c422da67 (diff)
downloadspice-common-c1403ee6bf4dfdd8f614f84ef145083b06a9f23e.tar.gz
spice-common-c1403ee6bf4dfdd8f614f84ef145083b06a9f23e.tar.xz
spice-common-c1403ee6bf4dfdd8f614f84ef145083b06a9f23e.zip
Use a log handler to modify abort() behaviour
Be more library friendly, by not aborting in library errors. spice_common now includes a proper log handler that will abort by default when reaching a warning. SPICE_ABORT_LEVEL can be changed to modify run-time abort level. SPICE_DEBUG_LEVEL can be changed to be more verbose. By default, only log level more importants than WARNING. Only memory-related functions are allowed to abort(), since they are not recoverable errors in the library.
Diffstat (limited to 'common/rop3.c')
-rw-r--r--common/rop3.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/rop3.c b/common/rop3.c
index 12d9f11..d5b46db 100644
--- a/common/rop3.c
+++ b/common/rop3.c
@@ -47,13 +47,13 @@ static void default_rop3_with_pattern_handler(pixman_image_t *d, pixman_image_t
SpicePoint *src_pos, pixman_image_t *p,
SpicePoint *pat_pos)
{
- WARN("not implemented");
+ spice_critical("not implemented");
}
static void default_rop3_withe_color_handler(pixman_image_t *d, pixman_image_t *s, SpicePoint *src_pos,
uint32_t rgb)
{
- WARN("not implemented");
+ spice_critical("not implemented");
}
static void default_rop3_test_handler(void)
@@ -624,8 +624,8 @@ void do_rop3_with_pattern(uint8_t rop3, pixman_image_t *d, pixman_image_t *s, Sp
int bpp;
bpp = spice_pixman_image_get_bpp(d);
- ASSERT (bpp == spice_pixman_image_get_bpp(s));
- ASSERT (bpp == spice_pixman_image_get_bpp(p));
+ spice_assert(bpp == spice_pixman_image_get_bpp(s));
+ spice_assert(bpp == spice_pixman_image_get_bpp(p));
if (bpp == 32) {
rop3_with_pattern_handlers_32[rop3](d, s, src_pos, p, pat_pos);
@@ -640,7 +640,7 @@ void do_rop3_with_color(uint8_t rop3, pixman_image_t *d, pixman_image_t *s, Spic
int bpp;
bpp = spice_pixman_image_get_bpp(d);
- ASSERT (bpp == spice_pixman_image_get_bpp(s));
+ spice_assert(bpp == spice_pixman_image_get_bpp(s));
if (bpp == 32) {
rop3_with_color_handlers_32[rop3](d, s, src_pos, rgb);