<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 6, 2015 at 11:20 AM, Lubomir I. Ivanov <span dir="ltr"><<a href="mailto:neolit123@gmail.com" target="_blank">neolit123@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: "Lubomir I. Ivanov" <<a href="mailto:neolit123@gmail.com">neolit123@gmail.com</a>><br>
<br>
ruleritem.cpp throws an error about incomplete type<br>
'struct gas_pressures'.<br>
<br>
'struct gas_pressures' is defined in dive.h, so every header<br>
that has usage of the type needs to include dive.h.<br>
<br>
Such a header is profile.h which has 'struct gas_pressures pressures'<br>
in 'struct plot_data', by including dive.h on top of profile.h<br>
every source file (e.g. ruleritem.cpp) that includes profile.h will<br>
now receive knowledge of a complete 'struct gas_pressures' type.<br>
<br>
Signed-off-by: Lubomir I. Ivanov <<a href="mailto:neolit123@gmail.com">neolit123@gmail.com</a>><br>
---<br>
dive.h is a pretty big header and it has a lot of stuff which has<br>
to go. files like ruleritem.cpp need not know about things like:<br>
<br>
extern int subsurface_zip_close(struct zip *zip);<br>
extern void subsurface_console_init(bool dedicated);<br>
extern void subsurface_console_exit(void);<br></blockquote><div><br></div><div>Completely agree - we really need to reestructure our sources.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
 subsurface-core/profile.h | 2 ++<br>
 1 file changed, 2 insertions(+)<br>
<br>
diff --git a/subsurface-core/profile.h b/subsurface-core/profile.h<br>
index a6dbfcf..71929f8 100644<br>
--- a/subsurface-core/profile.h<br>
+++ b/subsurface-core/profile.h<br>
@@ -5,6 +5,8 @@<br>
 extern "C" {<br>
 #endif<br>
<br>
+#include "dive.h"<br>
+<br>
 typedef enum {<br>
        STABLE,<br>
        SLOW,<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.11.msysgit.0<br>
<br>
_______________________________________________<br>
subsurface mailing list<br>
<a href="mailto:subsurface@subsurface-divelog.org">subsurface@subsurface-divelog.org</a><br>
<a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface" rel="noreferrer" target="_blank">http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface</a><br>
</font></span></blockquote></div><br></div></div>