mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 23:51:29 -07:00
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.
This commit is contained in:
4
ps.c
4
ps.c
@ -232,7 +232,7 @@ static void ps_line_width(void *handle, float width)
|
||||
ps_printf(ps, "%g setlinewidth\n", width);
|
||||
}
|
||||
|
||||
static void ps_line_dotted(void *handle, int dotted)
|
||||
static void ps_line_dotted(void *handle, bool dotted)
|
||||
{
|
||||
psdata *ps = (psdata *)handle;
|
||||
|
||||
@ -408,7 +408,7 @@ static const struct drawing_api ps_drawing = {
|
||||
ps_text_fallback,
|
||||
};
|
||||
|
||||
psdata *ps_init(FILE *outfile, int colour)
|
||||
psdata *ps_init(FILE *outfile, bool colour)
|
||||
{
|
||||
psdata *ps = snew(psdata);
|
||||
|
||||
|
Reference in New Issue
Block a user