| 2107 | } |
| 2108 | |
| 2109 | static void ShowPresets(hb_value_array_t *presets, int indent, int descriptions) |
| 2110 | { |
| 2111 | if (presets == NULL) |
| 2112 | presets = hb_presets_get(); |
| 2113 | |
| 2114 | int count = hb_value_array_len(presets); |
| 2115 | int ii; |
| 2116 | for (ii = 0; ii < count; ii++) |
| 2117 | { |
| 2118 | const char *name; |
| 2119 | hb_dict_t *preset_dict = hb_value_array_get(presets, ii); |
| 2120 | name = hb_value_get_string(hb_dict_get(preset_dict, "PresetName")); |
| 2121 | Indent(stderr, " ", indent); |
| 2122 | if (hb_value_get_bool(hb_dict_get(preset_dict, "Folder"))) |
| 2123 | { |
| 2124 | indent++; |
| 2125 | fprintf(stderr, "%s/\n", name); |
| 2126 | hb_value_array_t *children; |
| 2127 | children = hb_dict_get(preset_dict, "ChildrenArray"); |
| 2128 | if (children == NULL) |
| 2129 | continue; |
| 2130 | ShowPresets(children, indent, descriptions); |
| 2131 | indent--; |
| 2132 | } |
| 2133 | else |
| 2134 | { |
| 2135 | fprintf(stderr, "%s\n", name); |
| 2136 | if (descriptions) |
| 2137 | { |
| 2138 | const char *desc; |
| 2139 | desc = hb_value_get_string(hb_dict_get(preset_dict, |
| 2140 | "PresetDescription")); |
| 2141 | if (desc != NULL && desc[0] != 0) |
| 2142 | { |
| 2143 | int ii; |
| 2144 | char **split = str_width_split(desc, 60); |
| 2145 | for (ii = 0; split[ii] != NULL; ii++) |
| 2146 | { |
| 2147 | Indent(stderr, " ", indent+1); |
| 2148 | fprintf(stderr, "%s\n", split[ii]); |
| 2149 | } |
| 2150 | hb_str_vfree(split); |
| 2151 | } |
| 2152 | } |
| 2153 | } |
| 2154 | } |
| 2155 | } |
| 2156 | |
| 2157 | static double parse_hhmmss_strtok(void) |
| 2158 | { |
no test coverage detected