Clean up config loading and launch wayland

master
Drew DeVault 10 years ago
parent e7a8868514
commit 47b28bd335

@ -139,7 +139,8 @@ int handle_command(struct sway_config *config, char *exec) {
}
struct cmd_handler *handler = find_handler(handlers, sizeof(handlers) / sizeof(struct cmd_handler), cmd);
if (handler == NULL) {
return 1;
fprintf(stderr, "Unknown command '%s'\n", cmd);
return 0; // TODO: return error, probably
}
int argc;
char **argv = split_directive(exec + strlen(handler->command), &argc);

@ -33,7 +33,7 @@ struct sway_config *read_config(FILE *file) {
goto _continue;
}
if (!handle_command(config, line)) {
if (handle_command(config, line) != 0) {
success = false;
}

@ -26,7 +26,6 @@ void load_config() {
int main(int argc, char **argv) {
load_config();
return 0;
static struct wlc_interface interface = { };
if (!wlc_init(&interface, argc, argv)) {

Loading…
Cancel
Save