diff options
| -rw-r--r-- | include/plist/plist.h | 1 | ||||
| -rw-r--r-- | src/bplist.c | 2 | ||||
| -rw-r--r-- | src/jplist.c | 2 | ||||
| -rw-r--r-- | src/oplist.c | 2 | ||||
| -rw-r--r-- | src/xplist.c | 2 |
5 files changed, 9 insertions, 0 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h index f955d5e..2e04b1d 100644 --- a/include/plist/plist.h +++ b/include/plist/plist.h | |||
| @@ -1096,6 +1096,7 @@ extern "C" | |||
| 1096 | 1096 | ||
| 1097 | /** | 1097 | /** |
| 1098 | * Set debug level for the format parsers. | 1098 | * Set debug level for the format parsers. |
| 1099 | * @note This function does nothing if libplist was not configured with --enable-debug . | ||
| 1099 | * | 1100 | * |
| 1100 | * @param debug Debug level. Currently, only 0 (off) and 1 (enabled) are supported. | 1101 | * @param debug Debug level. Currently, only 0 (off) and 1 (enabled) are supported. |
| 1101 | */ | 1102 | */ |
diff --git a/src/bplist.c b/src/bplist.c index 72040cc..d29d499 100644 --- a/src/bplist.c +++ b/src/bplist.c | |||
| @@ -229,7 +229,9 @@ void plist_bin_deinit(void) | |||
| 229 | 229 | ||
| 230 | void plist_bin_set_debug(int debug) | 230 | void plist_bin_set_debug(int debug) |
| 231 | { | 231 | { |
| 232 | #if DEBUG | ||
| 232 | plist_bin_debug = debug; | 233 | plist_bin_debug = debug; |
| 234 | #endif | ||
| 233 | } | 235 | } |
| 234 | 236 | ||
| 235 | static plist_t parse_bin_node_at_index(struct bplist_data *bplist, uint32_t node_index); | 237 | static plist_t parse_bin_node_at_index(struct bplist_data *bplist, uint32_t node_index); |
diff --git a/src/jplist.c b/src/jplist.c index 8ed7398..047b423 100644 --- a/src/jplist.c +++ b/src/jplist.c | |||
| @@ -66,7 +66,9 @@ void plist_json_deinit(void) | |||
| 66 | 66 | ||
| 67 | void plist_json_set_debug(int debug) | 67 | void plist_json_set_debug(int debug) |
| 68 | { | 68 | { |
| 69 | #ifdef DEBUG | ||
| 69 | plist_json_debug = debug; | 70 | plist_json_debug = debug; |
| 71 | #endif | ||
| 70 | } | 72 | } |
| 71 | 73 | ||
| 72 | #ifndef HAVE_STRNDUP | 74 | #ifndef HAVE_STRNDUP |
diff --git a/src/oplist.c b/src/oplist.c index 1781962..a750767 100644 --- a/src/oplist.c +++ b/src/oplist.c | |||
| @@ -65,7 +65,9 @@ void plist_ostep_deinit(void) | |||
| 65 | 65 | ||
| 66 | void plist_ostep_set_debug(int debug) | 66 | void plist_ostep_set_debug(int debug) |
| 67 | { | 67 | { |
| 68 | #if DEBUG | ||
| 68 | plist_ostep_debug = debug; | 69 | plist_ostep_debug = debug; |
| 70 | #endif | ||
| 69 | } | 71 | } |
| 70 | 72 | ||
| 71 | #ifndef HAVE_STRNDUP | 73 | #ifndef HAVE_STRNDUP |
diff --git a/src/xplist.c b/src/xplist.c index bd506fb..a0ab6d3 100644 --- a/src/xplist.c +++ b/src/xplist.c | |||
| @@ -104,7 +104,9 @@ void plist_xml_deinit(void) | |||
| 104 | 104 | ||
| 105 | void plist_xml_set_debug(int debug) | 105 | void plist_xml_set_debug(int debug) |
| 106 | { | 106 | { |
| 107 | #if DEBUG | ||
| 107 | plist_xml_debug = debug; | 108 | plist_xml_debug = debug; |
| 109 | #endif | ||
| 108 | } | 110 | } |
| 109 | 111 | ||
| 110 | static size_t dtostr(char *buf, size_t bufsize, double realval) | 112 | static size_t dtostr(char *buf, size_t bufsize, double realval) |
