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_data.h b/src/printer_data.h
index 6ff1e41..c06c631 100644
--- a/src/printer_data.h
+++ b/src/printer_data.h
@@ -36,23 +36,23 @@
*
* @{
*/
-#define LYD_PRINT_WITHSIBLINGS 0x01 /**< Flag for printing also the (following) sibling nodes of the data node. */
-#define LYD_PRINT_FORMAT 0x02 /**< Flag for formatted output. */
-#define LYD_PRINT_KEEPEMPTYCONT 0x04 /**< Preserve empty non-presence containers */
-#define LYD_PRINT_WD_MASK 0xF0 /**< Mask for with-defaults modes */
-#define LYD_PRINT_WD_EXPLICIT 0x00 /**< Explicit mode - print only data explicitly being present in the data tree.
- Note that this is the default value when no WD option is specified. */
-#define LYD_PRINT_WD_TRIM 0x10 /**< Do not print the nodes with the value equal to their default value */
-#define LYD_PRINT_WD_ALL 0x20 /**< Include implicit default nodes */
-#define LYD_PRINT_WD_ALL_TAG 0x40 /**< Same as #LYDP_WD_ALL but also adds attribute 'default' with value 'true' to
- all nodes that has its default value. The 'default' attribute has namespace:
- urn:ietf:params:xml:ns:netconf:default:1.0 and thus the attributes are
- printed only when the ietf-netconf-with-defaults module is present in libyang
- context (but in that case this namespace is always printed). */
-#define LYD_PRINT_WD_IMPL_TAG 0x80 /**< Same as LYDP_WD_ALL_TAG but the attributes are added only to the nodes that
- are not explicitly present in the original data tree despite their
- value is equal to their default value. There is the same limitation regarding
- the presence of ietf-netconf-with-defaults module in libyang context. */
+#define LYD_PRINT_WITHSIBLINGS 0x01 /**< Flag for printing also the (following) sibling nodes of the data node. */
+#define LYD_PRINT_SHRINK LY_PRINT_SHRINK /**< Flag for output without indentation and formatting new lines. */
+#define LYD_PRINT_KEEPEMPTYCONT 0x04 /**< Preserve empty non-presence containers */
+#define LYD_PRINT_WD_MASK 0xF0 /**< Mask for with-defaults modes */
+#define LYD_PRINT_WD_EXPLICIT 0x00 /**< Explicit mode - print only data explicitly being present in the data tree.
+ Note that this is the default value when no WD option is specified. */
+#define LYD_PRINT_WD_TRIM 0x10 /**< Do not print the nodes with the value equal to their default value */
+#define LYD_PRINT_WD_ALL 0x20 /**< Include implicit default nodes */
+#define LYD_PRINT_WD_ALL_TAG 0x40 /**< Same as #LYDP_WD_ALL but also adds attribute 'default' with value 'true' to
+ all nodes that has its default value. The 'default' attribute has namespace:
+ urn:ietf:params:xml:ns:netconf:default:1.0 and thus the attributes are
+ printed only when the ietf-netconf-with-defaults module is present in libyang
+ context (but in that case this namespace is always printed). */
+#define LYD_PRINT_WD_IMPL_TAG 0x80 /**< Same as LYDP_WD_ALL_TAG but the attributes are added only to the nodes that
+ are not explicitly present in the original data tree despite their
+ value is equal to their default value. There is the same limitation regarding
+ the presence of ietf-netconf-with-defaults module in libyang context. */
/**
* @}
*/