diff options
Diffstat (limited to 'rootston/config.c')
-rw-r--r-- | rootston/config.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/rootston/config.c b/rootston/config.c index 7ef5e629..0c0ad055 100644 --- a/rootston/config.c +++ b/rootston/config.c @@ -35,7 +35,7 @@ static void usage(const char *name, int ret) { static struct wlr_box *parse_geometry(const char *str) { // format: {width}x{height}+{x}+{y} if (strlen(str) > 255) { - wlr_log(L_ERROR, "cannot parse geometry string, too long"); + wlr_log(WLR_ERROR, "cannot parse geometry string, too long"); return NULL; } @@ -88,7 +88,7 @@ static struct wlr_box *parse_geometry(const char *str) { return box; invalid_input: - wlr_log(L_ERROR, "could not parse geometry string: %s", str); + wlr_log(WLR_ERROR, "could not parse geometry string: %s", str); free(buf); free(box); return NULL; @@ -177,7 +177,7 @@ void add_binding_config(struct wl_list *bindings, const char* combination, xkb_keysym_t sym = xkb_keysym_from_name(symname, XKB_KEYSYM_NO_FLAGS); if (sym == XKB_KEY_NoSymbol) { - wlr_log(L_ERROR, "got unknown key binding symbol: %s", + wlr_log(WLR_ERROR, "got unknown key binding symbol: %s", symname); free(bc); bc = NULL; @@ -228,7 +228,7 @@ static void config_handle_cursor(struct roots_config *config, free(cc->default_image); cc->default_image = strdup(value); } else { - wlr_log(L_ERROR, "got unknown cursor config: %s", name); + wlr_log(WLR_ERROR, "got unknown cursor config: %s", name); } } @@ -252,7 +252,7 @@ static void config_handle_keyboard(struct roots_config *config, if (strcmp(name, "meta-key") == 0) { kc->meta_key = parse_modifier(value); if (kc->meta_key == 0) { - wlr_log(L_ERROR, "got unknown meta key: %s", name); + wlr_log(WLR_ERROR, "got unknown meta key: %s", name); } } else if (strcmp(name, "rules") == 0) { kc->rules = strdup(value); @@ -269,7 +269,7 @@ static void config_handle_keyboard(struct roots_config *config, } else if (strcmp(name, "repeat-delay") == 0) { kc->repeat_delay = strtol(value, NULL, 10); } else { - wlr_log(L_ERROR, "got unknown keyboard config: %s", name); + wlr_log(WLR_ERROR, "got unknown keyboard config: %s", name); } } @@ -291,10 +291,10 @@ static int config_ini_handler(void *user, const char *section, const char *name, } else if (strcasecmp(value, "false") == 0) { config->xwayland = false; } else { - wlr_log(L_ERROR, "got unknown xwayland value: %s", value); + wlr_log(WLR_ERROR, "got unknown xwayland value: %s", value); } } else { - wlr_log(L_ERROR, "got unknown core config: %s", name); + wlr_log(WLR_ERROR, "got unknown core config: %s", name); } } else if (strncmp(output_prefix, section, strlen(output_prefix)) == 0) { const char *output_name = section + strlen(output_prefix); @@ -324,7 +324,7 @@ static int config_ini_handler(void *user, const char *section, const char *name, } else if (strcasecmp(value, "false") == 0) { oc->enable = false; } else { - wlr_log(L_ERROR, "got invalid output enable value: %s", value); + wlr_log(WLR_ERROR, "got invalid output enable value: %s", value); } } else if (strcmp(name, "x") == 0) { oc->x = strtol(value, NULL, 10); @@ -351,7 +351,7 @@ static int config_ini_handler(void *user, const char *section, const char *name, } else if (strcmp(value, "flipped-270") == 0) { oc->transform = WL_OUTPUT_TRANSFORM_FLIPPED_270; } else { - wlr_log(L_ERROR, "got unknown transform value: %s", value); + wlr_log(WLR_ERROR, "got unknown transform value: %s", value); } } else if (strcmp(name, "mode") == 0) { char *end; @@ -365,7 +365,7 @@ static int config_ini_handler(void *user, const char *section, const char *name, oc->mode.refresh_rate = strtof(end, &end); assert(strcmp("Hz", end) == 0); } - wlr_log(L_DEBUG, "Configured output %s with mode %dx%d@%f", + wlr_log(WLR_DEBUG, "Configured output %s with mode %dx%d@%f", oc->name, oc->mode.width, oc->mode.height, oc->mode.refresh_rate); } else if (strcmp(name, "modeline") == 0) { @@ -375,7 +375,7 @@ static int config_ini_handler(void *user, const char *section, const char *name, wl_list_insert(&oc->modes, &mode->link); } else { free(mode); - wlr_log(L_ERROR, "Invalid modeline: %s", value); + wlr_log(WLR_ERROR, "Invalid modeline: %s", value); } } } else if (strncmp(cursor_prefix, section, strlen(cursor_prefix)) == 0) { @@ -418,12 +418,12 @@ static int config_ini_handler(void *user, const char *section, const char *name, } else if (strcasecmp(value, "false") == 0) { dc->tap_enabled = false; } else { - wlr_log(L_ERROR, + wlr_log(WLR_ERROR, "got unknown tap_enabled value: %s", value); } } else { - wlr_log(L_ERROR, "got unknown device config: %s", name); + wlr_log(WLR_ERROR, "got unknown device config: %s", name); } } else if (strcmp(section, "keyboard") == 0) { config_handle_keyboard(config, "", name, value); @@ -434,7 +434,7 @@ static int config_ini_handler(void *user, const char *section, const char *name, } else if (strcmp(section, "bindings") == 0) { add_binding_config(&config->bindings, name, value); } else { - wlr_log(L_ERROR, "got unknown config section: %s", section); + wlr_log(WLR_ERROR, "got unknown config section: %s", section); } return 1; @@ -478,12 +478,12 @@ struct roots_config *roots_config_create_from_args(int argc, char *argv[]) { if (getcwd(cwd, sizeof(cwd)) != NULL) { char buf[MAXPATHLEN]; if (snprintf(buf, MAXPATHLEN, "%s/%s", cwd, "rootston.ini") >= MAXPATHLEN) { - wlr_log(L_ERROR, "config path too long"); + wlr_log(WLR_ERROR, "config path too long"); exit(1); } config->config_path = strdup(buf); } else { - wlr_log(L_ERROR, "could not get cwd"); + wlr_log(WLR_ERROR, "could not get cwd"); exit(1); } } @@ -491,7 +491,7 @@ struct roots_config *roots_config_create_from_args(int argc, char *argv[]) { int result = ini_parse(config->config_path, config_ini_handler, config); if (result == -1) { - wlr_log(L_DEBUG, "No config file found. Using sensible defaults."); + wlr_log(WLR_DEBUG, "No config file found. Using sensible defaults."); add_binding_config(&config->bindings, "Logo+Shift+E", "exit"); add_binding_config(&config->bindings, "Ctrl+q", "close"); add_binding_config(&config->bindings, "Alt+Tab", "next_window"); @@ -501,10 +501,10 @@ struct roots_config *roots_config_create_from_args(int argc, char *argv[]) { kc->name = strdup(""); wl_list_insert(&config->keyboards, &kc->link); } else if (result == -2) { - wlr_log(L_ERROR, "Could not allocate memory to parse config file"); + wlr_log(WLR_ERROR, "Could not allocate memory to parse config file"); exit(1); } else if (result != 0) { - wlr_log(L_ERROR, "Could not parse config file"); + wlr_log(WLR_ERROR, "Could not parse config file"); exit(1); } |