Blame isl-0.16.1/isl_printer_private.h
|
Packit |
fb9d21 |
#ifndef ISL_PRINTER_PRIVATE_H
|
|
Packit |
fb9d21 |
#define ISL_PRINTER_PRIVATE_H
|
|
Packit |
fb9d21 |
|
|
Packit |
fb9d21 |
#include <isl/printer.h>
|
|
Packit |
fb9d21 |
#include <isl_yaml.h>
|
|
Packit |
fb9d21 |
|
|
Packit |
fb9d21 |
struct isl_printer_ops;
|
|
Packit |
fb9d21 |
|
|
Packit |
fb9d21 |
/* A printer to a file or a string.
|
|
Packit |
fb9d21 |
*
|
|
Packit |
fb9d21 |
* "dump" is set if the printing is performed from an isl_*_dump function.
|
|
Packit |
fb9d21 |
*
|
|
Packit |
fb9d21 |
* yaml_style is the YAML style in which the next elements should
|
|
Packit |
fb9d21 |
* be printed and may be either ISL_YAML_STYLE_BLOCK or ISL_YAML_STYLE_FLOW,
|
|
Packit |
fb9d21 |
* with ISL_YAML_STYLE_FLOW being the default.
|
|
Packit |
fb9d21 |
* yaml_state keeps track of the currently active YAML elements.
|
|
Packit |
fb9d21 |
* yaml_size is the size of this arrays, while yaml_depth
|
|
Packit |
fb9d21 |
* is the number of elements currently in use.
|
|
Packit |
fb9d21 |
* yaml_state may be NULL if no YAML printing is being performed.
|
|
Packit |
fb9d21 |
*/
|
|
Packit |
fb9d21 |
struct isl_printer {
|
|
Packit |
fb9d21 |
struct isl_ctx *ctx;
|
|
Packit |
fb9d21 |
struct isl_printer_ops *ops;
|
|
Packit |
fb9d21 |
FILE *file;
|
|
Packit |
fb9d21 |
int buf_n;
|
|
Packit |
fb9d21 |
int buf_size;
|
|
Packit |
fb9d21 |
char *buf;
|
|
Packit |
fb9d21 |
int indent;
|
|
Packit |
fb9d21 |
int output_format;
|
|
Packit |
fb9d21 |
int dump;
|
|
Packit |
fb9d21 |
char *indent_prefix;
|
|
Packit |
fb9d21 |
char *prefix;
|
|
Packit |
fb9d21 |
char *suffix;
|
|
Packit |
fb9d21 |
int width;
|
|
Packit |
fb9d21 |
|
|
Packit |
fb9d21 |
int yaml_style;
|
|
Packit |
fb9d21 |
int yaml_depth;
|
|
Packit |
fb9d21 |
int yaml_size;
|
|
Packit |
fb9d21 |
enum isl_yaml_state *yaml_state;
|
|
Packit |
fb9d21 |
};
|
|
Packit |
fb9d21 |
|
|
Packit |
fb9d21 |
__isl_give isl_printer *isl_printer_set_dump(__isl_take isl_printer *p,
|
|
Packit |
fb9d21 |
int dump);
|
|
Packit |
fb9d21 |
|
|
Packit |
fb9d21 |
#endif
|