Cthulhu  0.2.10
Cthulhu compiler collection
notify2.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: LGPL-3.0-only
2 
3 #pragma once
4 
5 #include <ctu_format_api.h>
6 
7 #include "format/format.h"
8 #include "core/analyze.h"
9 
10 #include <stdbool.h>
11 
13 
14 typedef struct event_t event_t;
15 typedef struct typevec_t typevec_t;
16 
21 
23 typedef enum notify_style_t
24 {
28 
32 
35 
37 typedef struct print_notify_t
38 {
41 
44 
47 
51 
56 CT_FORMAT_API void print_notify(print_notify_t config, IN_NOTNULL const event_t *event);
57 
62 CT_FORMAT_API void print_notify_many(print_notify_t config, IN_NOTNULL const typevec_t *events);
63 
65 
#define IN_NOTNULL
annotate a parameter as not being null
#define CT_BEGIN_API
Definition: compiler.h:129
#define CT_END_API
Definition: compiler.h:130
notify_style_t
notification style
Definition: notify2.h:24
CT_FORMAT_API void print_notify(print_notify_t config, const event_t *event)
format a single event for printing
Definition: notify.c:99
CT_FORMAT_API void print_notify_many(print_notify_t config, const typevec_t *events)
format many events for printing
Definition: notify.c:111
@ eNotifyCount
Definition: notify2.h:33
@ eNotifyBrief
print a single line for each event just the location and the message
Definition: notify2.h:27
@ eNotifyFull
print a more full event includes source text if as well as the location and message
Definition: notify2.h:31
fmt_heading_t
line heading style
Definition: format.h:18
@ eHeadingCount
Definition: format.h:22
an event handle TODO: make this and segment_t opaque
Definition: notify.h:36
generic print options
Definition: format.h:35
notification formatting options
Definition: notify2.h:38
print_options_t options
base print options
Definition: notify2.h:40
bool zero_indexed_lines
is the first line in a file 0 or 1
Definition: notify2.h:49
STA_FIELD_RANGE(0, eHeadingCount) heading_style_t heading
the style of heading to use
notify_style_t style
the style of notification to use
Definition: notify2.h:46
A vector with a fixed type size.
Definition: vector.h:24