- print_header = json_print_header;
- print_footer = json_print_footer;
- print_array_header = json_print_array_header;
- print_array_footer = json_print_array_footer;
- print_object_header = json_print_object_header;
- print_object_footer = json_print_object_footer;
-
- print_integer = json_print_integer;
- print_string = json_print_string;
- } else
- if (!strcmp(arg, "ini")) {
- print_header = ini_print_header;
- print_footer = ini_print_footer;
- print_array_header = ini_print_array_header;
- print_object_header = ini_print_object_header;
-
- print_integer = ini_print_integer;
- print_string = ini_print_string;
+ octx.print_header = json_print_header;
+ octx.print_footer = json_print_footer;
+ octx.print_array_header = json_print_array_header;
+ octx.print_array_footer = json_print_array_footer;
+ octx.print_object_header = json_print_object_header;
+ octx.print_object_footer = json_print_object_footer;
+
+ octx.print_integer = json_print_integer;
+ octx.print_string = json_print_string;
+ } else if (!strcmp(arg, "ini")) {
+ octx.print_header = ini_print_header;
+ octx.print_footer = ini_print_footer;
+ octx.print_array_header = ini_print_array_header;
+ octx.print_object_header = ini_print_object_header;
+
+ octx.print_integer = ini_print_integer;
+ octx.print_string = ini_print_string;
+ } else if (!strcmp(arg, "old")) {
+ octx.print_header = NULL;
+ octx.print_object_header = old_print_object_header;
+ octx.print_object_footer = old_print_object_footer;
+
+ octx.print_string = old_print_string;