Merge pull request #3275 from ianyfan/remove-readline

Rewrite strip_whitespace and remove readline.c
This commit is contained in:
emersion 2019-01-08 10:05:37 +01:00 committed by GitHub
commit 140bc2dd5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 161 additions and 274 deletions

View file

@ -237,15 +237,15 @@ list_t *execute_command(char *_exec, struct sway_seat *seat,
criteria_destroy(criteria);
config->handler_context.using_criteria = true;
// Skip leading whitespace
head += strspn(head, whitespace);
for (; isspace(*head); ++head) {}
}
// Split command list
cmdlist = argsep(&head, ";");
cmdlist += strspn(cmdlist, whitespace);
for (; isspace(*cmdlist); ++cmdlist) {}
do {
// Split commands
cmd = argsep(&cmdlist, ",");
cmd += strspn(cmd, whitespace);
for (; isspace(*cmd); ++cmd) {}
if (strcmp(cmd, "") == 0) {
wlr_log(WLR_INFO, "Ignoring empty command.");
continue;