From 0d1f396f3ae989f9a6ceac923be0c5ba45ef035f Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 6 Dec 2012 10:01:16 -0800 Subject: Move 'plot_info' into 'struct graphics_context' .. and then allocate just the plot-info entry array dynamically. We want to have a longer lifetime for the basic plot_info data structure, because we want to do computer selection and maximum time/depth/temperature computations *before* we start plotting anything, and before we allocate the plot entry array. Signed-off-by: Linus Torvalds Signed-off-by: Dirk Hohndel --- display.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'display.h') diff --git a/display.h b/display.h index 6eea822aa..6f9f6854c 100644 --- a/display.h +++ b/display.h @@ -10,6 +10,19 @@ extern void repaint_dive(void); extern void do_print(void); +/* Plot info with smoothing, velocity indication + * and one-, two- and three-minute minimums and maximums */ +struct plot_info { + int nr; + int maxtime; + int meandepth, maxdepth; + int endpressure, maxpressure; + int mintemp, maxtemp, endtemp; + double endtempcoord; + gboolean has_ndl; + struct plot_data *entry; +}; + /* * Cairo scaling really is horribly horribly mis-designed. * @@ -26,7 +39,7 @@ struct graphics_context { double leftx, rightx; double topy, bottomy; unsigned int maxtime; - void *plot_info; + struct plot_info pi; }; typedef enum { SC_SCREEN, SC_PRINT } scale_mode_t; -- cgit v1.2.3-70-g09d2