summaryrefslogtreecommitdiff
path: root/windows/plot.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-05-28 16:08:46 +0100
committerVincent Sanders <vince@kyllikki.org>2015-05-28 16:08:46 +0100
commitc105738fa36bb2400adc47399c5b878d252d1c86 (patch)
tree138eeb449e1bf51ee1726b5f820740aada0ccd0b /windows/plot.c
parent20f2c86a511f7913cf858e7bd3668b0b59663ba0 (diff)
downloadnetsurf-c105738fa36bb2400adc47399c5b878d252d1c86.tar.gz
netsurf-c105738fa36bb2400adc47399c5b878d252d1c86.tar.bz2
Change LOG() macro to be varadic
This changes the LOG macro to be varadic removing the need for all callsites to have double bracketing and allows for future improvement on how we use the logging macros. The callsites were changed with coccinelle and the changes checked by hand. Compile tested for several frontends but not all. A formatting annotation has also been added which allows the compiler to check the parameters and types passed to the logging.
Diffstat (limited to 'windows/plot.c')
-rw-r--r--windows/plot.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/windows/plot.c b/windows/plot.c
index 6c3e2e0ce..4b281162a 100644
--- a/windows/plot.c
+++ b/windows/plot.c
@@ -69,7 +69,7 @@ static bool line(int x0, int y0, int x1, int y1, const plot_style_t *style)
/* ensure the plot HDC is set */
if (plot_hdc == NULL) {
- LOG(("HDC not set on call to plotters"));
+ LOG("HDC not set on call to plotters");
return false;
}
@@ -124,7 +124,7 @@ static bool rectangle(int x0, int y0, int x1, int y1, const plot_style_t *style)
/* ensure the plot HDC is set */
if (plot_hdc == NULL) {
- LOG(("HDC not set on call to plotters"));
+ LOG("HDC not set on call to plotters");
return false;
}
@@ -191,7 +191,7 @@ static bool polygon(const int *p, unsigned int n, const plot_style_t *style)
/* ensure the plot HDC is set */
if (plot_hdc == NULL) {
- LOG(("HDC not set on call to plotters"));
+ LOG("HDC not set on call to plotters");
return false;
}
@@ -262,7 +262,7 @@ static bool text(int x, int y, const char *text, size_t length,
/* ensure the plot HDC is set */
if (plot_hdc == NULL) {
- LOG(("HDC not set on call to plotters"));
+ LOG("HDC not set on call to plotters");
return false;
}
@@ -321,7 +321,7 @@ static bool disc(int x, int y, int radius, const plot_style_t *style)
/* ensure the plot HDC is set */
if (plot_hdc == NULL) {
- LOG(("HDC not set on call to plotters"));
+ LOG("HDC not set on call to plotters");
return false;
}
@@ -392,7 +392,7 @@ static bool arc(int x, int y, int radius, int angle1, int angle2,
/* ensure the plot HDC is set */
if (plot_hdc == NULL) {
- LOG(("HDC not set on call to plotters"));
+ LOG("HDC not set on call to plotters");
return false;
}
@@ -505,7 +505,7 @@ plot_block(COLORREF col, int x, int y, int width, int height)
/* ensure the plot HDC is set */
if (plot_hdc == NULL) {
- LOG(("HDC not set on call to plotters"));
+ LOG("HDC not set on call to plotters");
return false;
}
@@ -690,7 +690,7 @@ plot_bitmap(struct bitmap *bitmap, int x, int y, int width, int height)
/* ensure the plot HDC is set */
if (plot_hdc == NULL) {
- LOG(("HDC not set on call to plotters"));
+ LOG("HDC not set on call to plotters");
return false;
}
@@ -758,7 +758,7 @@ windows_plot_bitmap(int x, int y,
PLOT_LOG(("Plotting %p at %d,%d by %d,%d",bitmap, x,y,width,height));
if (bitmap == NULL) {
- LOG(("Passed null bitmap!"));
+ LOG("Passed null bitmap!");
return true;
}