aboutsummaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-08-18 08:39:26 -0400
committerDrew DeVault <sir@cmpwn.com>2015-08-18 08:39:26 -0400
commit85a573dab73654fb4462dd8fe48ef16400770f04 (patch)
tree6679fc01b257f177d3693144566cee83b379e9e4 /sway/commands.c
parenta64b10df83f84e7ee8933ac139f10c59bfd76466 (diff)
Revert "enhanced whitespace remover"
This reverts commit abd0afb03a2929931cb684e5aaeac312affe6e5f.
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 51de7a50..ae0bdbe4 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -506,7 +506,7 @@ static char **split_directive(char *line, int *argc) {
if (!*line) return parts;
int in_string = 0, in_character = 0;
- int i, j;
+ int i, j, _;
for (i = 0, j = 0; line[i]; ++i) {
if (line[i] == '\\') {
++i;
@@ -519,7 +519,7 @@ static char **split_directive(char *line, int *argc) {
char *item = malloc(i - j + 1);
strncpy(item, line + j, i - j);
item[i - j] = '\0';
- strip_whitespace(item);
+ item = strip_whitespace(item, &_);
if (item[0] == '\0') {
free(item);
} else {
@@ -537,7 +537,7 @@ static char **split_directive(char *line, int *argc) {
char *item = malloc(i - j + 1);
strncpy(item, line + j, i - j);
item[i - j] = '\0';
- strip_whitespace(item);
+ item = strip_whitespace(item, &_);
if (*argc == capacity) {
capacity++;
parts = realloc(parts, sizeof(char *) * capacity);