From f6965b92e1915c9f49fafbadf603b4fd0da735bd Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 13 Nov 2018 21:38:53 +0000 Subject: Adopt C99 bool in the printing API. Not many changes here: the 'dotted' flag passed to print_line_dotted is bool, and so is the printing_in_colour flag passed to print_get_colour. Also ps_init() takes a bool. line_dotted is also a method in the drawing API structure, but it's not actually filled in for any non-print-oriented implementation of that API. So only front ends that do platform-specific _printing_ should need to make a corresponding change. In-tree, for example, windows.c needed a fix because it prints via Windows GDI, but gtk.c didn't have to do anything, because its CLI-based printing facility just delegates to ps.c. --- drawing.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drawing.c') diff --git a/drawing.c b/drawing.c index caf0b4b..a8eb8cf 100644 --- a/drawing.c +++ b/drawing.c @@ -264,7 +264,7 @@ void print_end_doc(drawing *dr) dr->api->end_doc(dr->handle); } -void print_get_colour(drawing *dr, int colour, int printing_in_colour, +void print_get_colour(drawing *dr, int colour, bool printing_in_colour, int *hatch, float *r, float *g, float *b) { assert(colour >= 0 && colour < dr->ncolours); @@ -347,7 +347,7 @@ void print_line_width(drawing *dr, int width) dr->api->line_width(dr->handle, (float)sqrt(dr->scale) * width); } -void print_line_dotted(drawing *dr, int dotted) +void print_line_dotted(drawing *dr, bool dotted) { dr->api->line_dotted(dr->handle, dotted); } -- cgit v1.1