aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sway/commands.c b/sway/commands.c
index ef477f38..6c5bea37 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -163,7 +163,7 @@ struct cmd_handler *find_handler(char *line, struct cmd_handler *cmd_handlers,
163 int handlers_size) { 163 int handlers_size) {
164 struct cmd_handler d = { .command=line }; 164 struct cmd_handler d = { .command=line };
165 struct cmd_handler *res = NULL; 165 struct cmd_handler *res = NULL;
166 wlr_log(L_DEBUG, "find_handler(%s)", line); 166 wlr_log(WLR_DEBUG, "find_handler(%s)", line);
167 167
168 bool config_loading = config->reading || !config->active; 168 bool config_loading = config->reading || !config->active;
169 169
@@ -248,10 +248,10 @@ struct cmd_results *execute_command(char *_exec, struct sway_seat *seat) {
248 cmd = argsep(&cmdlist, ","); 248 cmd = argsep(&cmdlist, ",");
249 cmd += strspn(cmd, whitespace); 249 cmd += strspn(cmd, whitespace);
250 if (strcmp(cmd, "") == 0) { 250 if (strcmp(cmd, "") == 0) {
251 wlr_log(L_INFO, "Ignoring empty command."); 251 wlr_log(WLR_INFO, "Ignoring empty command.");
252 continue; 252 continue;
253 } 253 }
254 wlr_log(L_INFO, "Handling command '%s'", cmd); 254 wlr_log(WLR_INFO, "Handling command '%s'", cmd);
255 //TODO better handling of argv 255 //TODO better handling of argv
256 int argc; 256 int argc;
257 char **argv = split_args(cmd, &argc); 257 char **argv = split_args(cmd, &argc);
@@ -355,7 +355,7 @@ struct cmd_results *config_command(char *exec) {
355 results = cmd_results_new(CMD_BLOCK_END, NULL, NULL); 355 results = cmd_results_new(CMD_BLOCK_END, NULL, NULL);
356 goto cleanup; 356 goto cleanup;
357 } 357 }
358 wlr_log(L_INFO, "handling config command '%s'", exec); 358 wlr_log(WLR_INFO, "handling config command '%s'", exec);
359 struct cmd_handler *handler = find_handler(argv[0], NULL, 0); 359 struct cmd_handler *handler = find_handler(argv[0], NULL, 0);
360 if (!handler) { 360 if (!handler) {
361 char *input = argv[0] ? argv[0] : "(empty)"; 361 char *input = argv[0] ? argv[0] : "(empty)";
@@ -388,7 +388,7 @@ cleanup:
388struct cmd_results *config_subcommand(char **argv, int argc, 388struct cmd_results *config_subcommand(char **argv, int argc,
389 struct cmd_handler *handlers, size_t handlers_size) { 389 struct cmd_handler *handlers, size_t handlers_size) {
390 char *command = join_args(argv, argc); 390 char *command = join_args(argv, argc);
391 wlr_log(L_DEBUG, "Subcommand: %s", command); 391 wlr_log(WLR_DEBUG, "Subcommand: %s", command);
392 free(command); 392 free(command);
393 393
394 struct cmd_handler *handler = find_handler(argv[0], handlers, 394 struct cmd_handler *handler = find_handler(argv[0], handlers,
@@ -479,7 +479,7 @@ struct cmd_results *config_commands_command(char *exec) {
479 } 479 }
480 policy->context = context; 480 policy->context = context;
481 481
482 wlr_log(L_INFO, "Set command policy for %s to %d", 482 wlr_log(WLR_INFO, "Set command policy for %s to %d",
483 policy->command, policy->context); 483 policy->command, policy->context);
484 484
485 results = cmd_results_new(CMD_SUCCESS, NULL, NULL); 485 results = cmd_results_new(CMD_SUCCESS, NULL, NULL);
@@ -493,7 +493,7 @@ struct cmd_results *cmd_results_new(enum cmd_status status,
493 const char *input, const char *format, ...) { 493 const char *input, const char *format, ...) {
494 struct cmd_results *results = malloc(sizeof(struct cmd_results)); 494 struct cmd_results *results = malloc(sizeof(struct cmd_results));
495 if (!results) { 495 if (!results) {
496 wlr_log(L_ERROR, "Unable to allocate command results"); 496 wlr_log(WLR_ERROR, "Unable to allocate command results");
497 return NULL; 497 return NULL;
498 } 498 }
499 results->status = status; 499 results->status = status;