isl_printer_yaml_start_sequence: handle NULL input
[isl.git] / isl_printer_private.h
blob7af8aae65da09cd14b130e3f42fd681b9ea3dbe7
1 #ifndef ISL_PRINTER_PRIVATE_H
2 #define ISL_PRINTER_PRIVATE_H
4 #include <isl/printer.h>
5 #include <isl_yaml.h>
7 struct isl_printer_ops;
9 /* A printer to a file or a string.
11 * "dump" is set if the printing is performed from an isl_*_dump function.
13 * yaml_style is the YAML style in which the next elements should
14 * be printed and may be either ISL_YAML_STYLE_BLOCK or ISL_YAML_STYLE_FLOW,
15 * with ISL_YAML_STYLE_FLOW being the default.
16 * yaml_state keeps track of the currently active YAML elements.
17 * yaml_size is the size of this arrays, while yaml_depth
18 * is the number of elements currently in use.
19 * yaml_state may be NULL if no YAML printing is being performed.
21 struct isl_printer {
22 struct isl_ctx *ctx;
23 struct isl_printer_ops *ops;
24 FILE *file;
25 int buf_n;
26 int buf_size;
27 char *buf;
28 int indent;
29 int output_format;
30 int dump;
31 char *indent_prefix;
32 char *prefix;
33 char *suffix;
34 int width;
36 int yaml_style;
37 int yaml_depth;
38 int yaml_size;
39 enum isl_yaml_state *yaml_state;
42 __isl_give isl_printer *isl_printer_set_dump(__isl_take isl_printer *p,
43 int dump);
45 #endif