diff options
author | Vincent Sanders <vince@kyllikki.org> | 2017-09-06 18:28:12 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2017-09-06 18:45:27 +0100 |
commit | 75018632a9b953aafeae6f4e8aea607fd1d89dca (patch) | |
tree | d661d2fded2ad4b80c4cf019dee2954c052ab090 /frontends/atari/bitmap.c | |
parent | 8d9b2efc11529da8cb5870b39ff15249c648b10a (diff) | |
download | netsurf-75018632a9b953aafeae6f4e8aea607fd1d89dca.tar.gz netsurf-75018632a9b953aafeae6f4e8aea607fd1d89dca.tar.bz2 |
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
Diffstat (limited to 'frontends/atari/bitmap.c')
-rw-r--r-- | frontends/atari/bitmap.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/frontends/atari/bitmap.c b/frontends/atari/bitmap.c index cbb719586..ae42da837 100644 --- a/frontends/atari/bitmap.c +++ b/frontends/atari/bitmap.c @@ -81,7 +81,9 @@ static void *atari_bitmap_create_ex( int w, int h, short bpp, int rowstride, uns { struct bitmap * bitmap; - LOG("width %d (rowstride: %d, bpp: %d), height %d, state %u", w, rowstride, bpp, h, state); + NSLOG(netsurf, INFO, + "width %d (rowstride: %d, bpp: %d), height %d, state %u", w, + rowstride, bpp, h, state); if( rowstride == 0) { rowstride = bpp * w; @@ -107,10 +109,10 @@ static void *atari_bitmap_create_ex( int w, int h, short bpp, int rowstride, uns } else { free(bitmap); bitmap=NULL; - LOG("Out of memory!"); + NSLOG(netsurf, INFO, "Out of memory!"); } } - LOG("bitmap %p", bitmap); + NSLOG(netsurf, INFO, "bitmap %p", bitmap); return bitmap; } @@ -194,7 +196,7 @@ static unsigned char *bitmap_get_buffer(void *bitmap) struct bitmap *bm = bitmap; if (bitmap == NULL) { - LOG("NULL bitmap!"); + NSLOG(netsurf, INFO, "NULL bitmap!"); return NULL; } @@ -218,7 +220,7 @@ size_t atari_bitmap_get_rowstride(void *bitmap) struct bitmap *bm = bitmap; if (bitmap == NULL) { - LOG("NULL bitmap!"); + NSLOG(netsurf, INFO, "NULL bitmap!"); return 0; } return bm->rowstride; @@ -231,7 +233,7 @@ void atari_bitmap_destroy(void *bitmap) struct bitmap *bm = bitmap; if (bitmap == NULL) { - LOG("NULL bitmap!"); + NSLOG(netsurf, INFO, "NULL bitmap!"); return; } @@ -272,11 +274,12 @@ static void bitmap_set_opaque(void *bitmap, bool opaque) struct bitmap *bm = bitmap; if (bitmap == NULL) { - LOG("NULL bitmap!"); + NSLOG(netsurf, INFO, "NULL bitmap!"); return; } - LOG("setting bitmap %p to %s", bm, opaque ? "opaque" : "transparent"); + NSLOG(netsurf, INFO, "setting bitmap %p to %s", bm, + opaque ? "opaque" : "transparent"); bm->opaque = opaque; } @@ -293,7 +296,7 @@ static bool bitmap_test_opaque(void *bitmap) struct bitmap *bm = bitmap; if (bitmap == NULL) { - LOG("NULL bitmap!"); + NSLOG(netsurf, INFO, "NULL bitmap!"); return false; } @@ -305,11 +308,12 @@ static bool bitmap_test_opaque(void *bitmap) while (tst-- > 0) { if (bm->pixdata[(tst << 2) + 3] != 0xff) { - LOG("bitmap %p has transparency", bm); + NSLOG(netsurf, INFO, + "bitmap %p has transparency", bm); return false; } } - LOG("bitmap %p is opaque", bm); + NSLOG(netsurf, INFO, "bitmap %p is opaque", bm); return true; } @@ -320,7 +324,7 @@ bool atari_bitmap_get_opaque(void *bitmap) struct bitmap *bm = bitmap; if (bitmap == NULL) { - LOG("NULL bitmap!"); + NSLOG(netsurf, INFO, "NULL bitmap!"); return false; } @@ -334,7 +338,7 @@ int atari_bitmap_get_width(void *bitmap) struct bitmap *bm = bitmap; if (bitmap == NULL) { - LOG("NULL bitmap!"); + NSLOG(netsurf, INFO, "NULL bitmap!"); return 0; } @@ -348,7 +352,7 @@ int atari_bitmap_get_height(void *bitmap) struct bitmap *bm = bitmap; if (bitmap == NULL) { - LOG("NULL bitmap!"); + NSLOG(netsurf, INFO, "NULL bitmap!"); return 0; } return(bm->height); |