diff options
| author | 2023-02-07 11:43:04 +0100 | |
|---|---|---|
| committer | 2023-02-07 11:43:04 +0100 | |
| commit | fe1b22723868b038c4d0b84d9582edcdd888af97 (patch) | |
| tree | 7db408f97a23c3283eebf1e02caec03bfab9c614 /src/plist.c | |
| parent | 6390abcd1c94f4c29291c81322726d6946fd345f (diff) | |
| download | libplist-fe1b22723868b038c4d0b84d9582edcdd888af97.tar.gz libplist-fe1b22723868b038c4d0b84d9582edcdd888af97.tar.bz2 | |
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
Diffstat (limited to 'src/plist.c')
| -rw-r--r-- | src/plist.c | 13 |
1 files changed, 13 insertions, 0 deletions
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 | |||
| 1497 | return (memmem(data->buff, data->length, cmpval, n) != NULL); | 1497 | return (memmem(data->buff, data->length, cmpval, n) != NULL); |
| 1498 | } | 1498 | } |
| 1499 | 1499 | ||
| 1500 | extern void plist_xml_set_debug(int debug); | ||
| 1501 | extern void plist_bin_set_debug(int debug); | ||
| 1502 | extern void plist_json_set_debug(int debug); | ||
| 1503 | extern void plist_ostep_set_debug(int debug); | ||
| 1504 | |||
| 1505 | PLIST_API void plist_set_debug(int debug) | ||
| 1506 | { | ||
| 1507 | plist_xml_set_debug(debug); | ||
| 1508 | plist_bin_set_debug(debug); | ||
| 1509 | plist_json_set_debug(debug); | ||
| 1510 | plist_ostep_set_debug(debug); | ||
| 1511 | } | ||
| 1512 | |||
| 1500 | PLIST_API void plist_sort(plist_t plist) | 1513 | PLIST_API void plist_sort(plist_t plist) |
| 1501 | { | 1514 | { |
| 1502 | if (!plist) { | 1515 | if (!plist) { |
