refactor commands.c

This commit is contained in:
Zandr Martin 2016-09-01 21:39:08 -05:00
parent 050704ab23
commit b374c35758
No known key found for this signature in database
GPG key ID: AA2BB8EF77F7BBDC
77 changed files with 3567 additions and 3217 deletions

15
sway/commands/include.c Normal file
View file

@ -0,0 +1,15 @@
#include "commands.h"
#include "config.h"
struct cmd_results *cmd_include(int argc, char **argv) {
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "include", EXPECTED_EQUAL_TO, 1))) {
return error;
}
if (!load_include_configs(argv[0], config)) {
return cmd_results_new(CMD_INVALID, "include", "Failed to include sub configuration file: %s", argv[0]);
}
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}