+static void conf_load_global_settings(void) {
+ JSONValue *settings = json_obj_get(uwp_config, "settings");
+ if(!settings) {
+ return;
+ }
+
+ if(settings->type != JSON_OBJECT) {
+ fprintf(stderr, "Warning: 'settings' not an object\n");
+ return;
+ }
+
+ JSONObject *s = &settings->value.object;
+
+ for(size_t i=0;i<s->size;i++) {
+ JSONObjValue *gs = &s->values[i];
+ if(gs->value->type == JSON_STRING) {
+ cxMapPut(uwp_settings, cx_hash_key_str(gs->name), strdup(gs->value->value.string.string));
+ }
+ }
+}
+
+static char* get_which_output(FILE *f, CxBuffer *buf) {