printers CHANGE unify formatting options for data and schema printers
Replaces LYD_PRINT_FORMAT by the LYD_PRINT_SHRINK with the inverse
meaning. This way the default formating (do format output) is unified
between data and schema printers. The commit also introduces
LYS_PRINT_SHRINK with the same value to have the option explicitely also
for the schema printers and to allow to print schemas without
unnecessary indentations and new lines.
diff --git a/src/printer_xml.c b/src/printer_xml.c
index 3b92a9f..1fc29e4 100644
--- a/src/printer_xml.c
+++ b/src/printer_xml.c
@@ -545,7 +545,7 @@
}
ctx.out = out;
- ctx.level = (options & LYD_PRINT_FORMAT ? 1 : 0);
+ ctx.level = (options & LYD_PRINT_SHRINK ? 0 : 1);
ctx.options = options;
ctx.ctx = LYD_CTX(root);