#ifndef _DIAG_DIAG_H_ #define _DIAG_DIAG_H_ #include #include struct ivy_diag_msg; enum diag_component_type { DIAG_COMPONENT_NONE = 0, DIAG_COMPONENT_MSG, DIAG_COMPONENT_SNIPPET, }; struct diag_component { enum diag_component_type c_type; b_queue_entry c_entry; }; struct diag_c_msg { struct diag_component msg_base; char *msg_content; }; struct diag_c_snippet { struct diag_component s_base; unsigned long s_first_line, s_last_line; struct ivy_diag_amendment *s_amendments; size_t s_nr_amendments; struct ivy_diag_highlight *s_highlights; size_t s_nr_highlights; }; struct ivy_diag { struct ivy_diag_ctx *diag_parent; unsigned long diag_class; unsigned long diag_row, diag_col; b_queue_entry diag_entry; b_queue diag_components; }; extern struct diag_c_msg *diag_msg_create(const struct ivy_diag_msg *content); extern struct diag_c_snippet *diag_snippet_create( unsigned long first_line, unsigned long last_line, const struct ivy_diag_amendment *amendmends, size_t nr_amendments, const struct ivy_diag_highlight *highlights, size_t nr_highlights); #endif