From fe1b22723868b038c4d0b84d9582edcdd888af97 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 7 Feb 2023 11:43:04 +0100 Subject: Add function to interface to allow enabling/disabling error/debug output for the format parses This makes the `-d` option work in plistutil that wasn't doing anything --- src/plist.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/plist.c') diff --git a/src/plist.c b/src/plist.c index 689fc79..8d57416 100644 --- a/src/plist.c +++ b/src/plist.c @@ -1497,6 +1497,19 @@ PLIST_API int plist_data_val_contains(plist_t datanode, const uint8_t* cmpval, s return (memmem(data->buff, data->length, cmpval, n) != NULL); } +extern void plist_xml_set_debug(int debug); +extern void plist_bin_set_debug(int debug); +extern void plist_json_set_debug(int debug); +extern void plist_ostep_set_debug(int debug); + +PLIST_API void plist_set_debug(int debug) +{ + plist_xml_set_debug(debug); + plist_bin_set_debug(debug); + plist_json_set_debug(debug); + plist_ostep_set_debug(debug); +} + PLIST_API void plist_sort(plist_t plist) { if (!plist) { -- cgit v1.1-32-gdbae