aboutsummaryrefslogtreecommitdiff
path: root/puzzles.h
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2018-11-13 21:38:53 +0000
committerSimon Tatham <anakin@pobox.com>2018-11-13 21:48:24 +0000
commitf6965b92e1915c9f49fafbadf603b4fd0da735bd (patch)
treefe570455a0d94181f061e0cae2fd893e6b11f617 /puzzles.h
parentcd6cadbecf245b2916350939343db14e2978f782 (diff)
downloadpuzzles-f6965b92e1915c9f49fafbadf603b4fd0da735bd.zip
puzzles-f6965b92e1915c9f49fafbadf603b4fd0da735bd.tar.gz
puzzles-f6965b92e1915c9f49fafbadf603b4fd0da735bd.tar.bz2
puzzles-f6965b92e1915c9f49fafbadf603b4fd0da735bd.tar.xz
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.
Diffstat (limited to 'puzzles.h')
-rw-r--r--puzzles.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/puzzles.h b/puzzles.h
index 1ece2a6..379be15 100644
--- a/puzzles.h
+++ b/puzzles.h
@@ -292,7 +292,7 @@ void print_begin_puzzle(drawing *dr, float xm, float xc,
void print_end_puzzle(drawing *dr);
void print_end_page(drawing *dr, int number);
void print_end_doc(drawing *dr);
-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);
int print_mono_colour(drawing *dr, int grey); /* 0==black, 1==white */
int print_grey_colour(drawing *dr, float grey);
@@ -302,7 +302,7 @@ int print_rgb_grey_colour(drawing *dr, float r, float g, float b, float grey);
int print_rgb_hatched_colour(drawing *dr, float r, float g, float b,
int hatch);
void print_line_width(drawing *dr, int width);
-void print_line_dotted(drawing *dr, int dotted);
+void print_line_dotted(drawing *dr, bool dotted);
/*
* midend.c
@@ -538,7 +538,7 @@ void document_print(document *doc, drawing *dr);
/*
* ps.c
*/
-psdata *ps_init(FILE *outfile, int colour);
+psdata *ps_init(FILE *outfile, bool colour);
void ps_free(psdata *ps);
drawing *ps_drawing_api(psdata *ps);
@@ -699,7 +699,7 @@ struct drawing_api {
void (*end_page)(void *handle, int number);
void (*end_doc)(void *handle);
void (*line_width)(void *handle, float width);
- void (*line_dotted)(void *handle, int dotted);
+ void (*line_dotted)(void *handle, bool dotted);
char *(*text_fallback)(void *handle, const char *const *strings,
int nstrings);
void (*draw_thick_line)(void *handle, float thickness,