From a6bc46eea9d7dec6a2b93f85bac2e3737e0c6725 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 21 Jan 2018 12:21:57 -0500 Subject: Remove sway/old/ --- sway/old/commands/default_border.c | 44 -------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 sway/old/commands/default_border.c (limited to 'sway/old/commands/default_border.c') diff --git a/sway/old/commands/default_border.c b/sway/old/commands/default_border.c deleted file mode 100644 index 8fbe8d19..00000000 --- a/sway/old/commands/default_border.c +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include -#include -#include "sway/commands.h" -#include "sway/container.h" - -struct cmd_results *cmd_default_border(int argc, char **argv) { - struct cmd_results *error = NULL; - if ((error = checkarg(argc, "default_border", EXPECTED_AT_LEAST, 1))) { - return error; - } - - if (argc > 2) { - return cmd_results_new(CMD_INVALID, "default_border", - "Expected 'default_border []"); - } - - enum swayc_border_types border = config->border; - int thickness = config->border_thickness; - - if (strcasecmp(argv[0], "none") == 0) { - border = B_NONE; - } else if (strcasecmp(argv[0], "normal") == 0) { - border = B_NORMAL; - } else if (strcasecmp(argv[0], "pixel") == 0) { - border = B_PIXEL; - } else { - return cmd_results_new(CMD_INVALID, "default_border", - "Expected 'default_border []"); - } - - if (argc == 2 && (border == B_NORMAL || border == B_PIXEL)) { - thickness = (int)strtol(argv[1], NULL, 10); - if (errno == ERANGE || thickness < 0) { - errno = 0; - return cmd_results_new(CMD_INVALID, "default_border", "Number is out out of range."); - } - } - - config->border = border; - config->border_thickness = thickness; - - return cmd_results_new(CMD_SUCCESS, NULL, NULL); -} -- cgit v1.2.3