summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/plistutil.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/plistutil.c b/tools/plistutil.c
index 4b83df3..e339b8b 100644
--- a/tools/plistutil.c
+++ b/tools/plistutil.c
@@ -115,13 +115,13 @@ static options_t *parse_arguments(int argc, char *argv[])
115 return NULL; 115 return NULL;
116 } 116 }
117 if (!strncmp(argv[i+1], "bin", 3)) { 117 if (!strncmp(argv[i+1], "bin", 3)) {
118 options->out_fmt = 1; 118 options->out_fmt = PLIST_FORMAT_BINARY;
119 } else if (!strncmp(argv[i+1], "xml", 3)) { 119 } else if (!strncmp(argv[i+1], "xml", 3)) {
120 options->out_fmt = 2; 120 options->out_fmt = PLIST_FORMAT_XML;
121 } else if (!strncmp(argv[i+1], "json", 4)) { 121 } else if (!strncmp(argv[i+1], "json", 4)) {
122 options->out_fmt = 3; 122 options->out_fmt = PLIST_FORMAT_JSON;
123 } else if (!strncmp(argv[i+1], "openstep", 8) || !strncmp(argv[i+1], "ostep", 5)) { 123 } else if (!strncmp(argv[i+1], "openstep", 8) || !strncmp(argv[i+1], "ostep", 5)) {
124 options->out_fmt = 4; 124 options->out_fmt = PLIST_FORMAT_OSTEP;
125 } else { 125 } else {
126 fprintf(stderr, "ERROR: Unsupported output format\n"); 126 fprintf(stderr, "ERROR: Unsupported output format\n");
127 free(options); 127 free(options);
@@ -289,13 +289,13 @@ int main(int argc, char *argv[])
289 if (options->flags & OPT_SORT) { 289 if (options->flags & OPT_SORT) {
290 plist_sort(root_node); 290 plist_sort(root_node);
291 } 291 }
292 if (options->out_fmt == 1) { 292 if (options->out_fmt == PLIST_FORMAT_BINARY) {
293 output_res = plist_to_bin(root_node, &plist_out, &size); 293 output_res = plist_to_bin(root_node, &plist_out, &size);
294 } else if (options->out_fmt == 2) { 294 } else if (options->out_fmt == PLIST_FORMAT_XML) {
295 output_res = plist_to_xml(root_node, &plist_out, &size); 295 output_res = plist_to_xml(root_node, &plist_out, &size);
296 } else if (options->out_fmt == 3) { 296 } else if (options->out_fmt == PLIST_FORMAT_JSON) {
297 output_res = plist_to_json(root_node, &plist_out, &size, !(options->flags & OPT_COMPACT)); 297 output_res = plist_to_json(root_node, &plist_out, &size, !(options->flags & OPT_COMPACT));
298 } else if (options->out_fmt == 4) { 298 } else if (options->out_fmt == PLIST_FORMAT_OSTEP) {
299 output_res = plist_to_openstep(root_node, &plist_out, &size, !(options->flags & OPT_COMPACT)); 299 output_res = plist_to_openstep(root_node, &plist_out, &size, !(options->flags & OPT_COMPACT));
300 } 300 }
301 } 301 }