From: Michael Stapelberg Date: Sun, 27 Sep 2009 15:02:05 +0000 (+0200) Subject: retab! cfgparse.y X-Git-Tag: 3.d~72 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=051caf571d12000b278348861a8953e69757a50c;p=i3%2Fi3 retab! cfgparse.y --- diff --git a/src/cfgparse.y b/src/cfgparse.y index 3705e9b7..3fba5057 100644 --- a/src/cfgparse.y +++ b/src/cfgparse.y @@ -263,16 +263,16 @@ workspace: workspace_set_name(&(workspaces[ws_num - 1]), $8); } } - | TOKWORKSPACE WHITESPACE NUMBER workspace_name - { + | TOKWORKSPACE WHITESPACE NUMBER workspace_name + { int ws_num = $3; if (ws_num < 1 || ws_num > 10) { LOG("Invalid workspace assignment, workspace number %d out of range\n", ws_num); } else { - if ($4 != NULL) - workspace_set_name(&(workspaces[ws_num - 1]), $4); - } - } + if ($4 != NULL) + workspace_set_name(&(workspaces[ws_num - 1]), $4); + } + } ; workspace_name: @@ -293,34 +293,34 @@ assign: { printf("assignment of %s to %d\n", $3, $6); - struct Assignment *new = $6; - new->windowclass_title = strdup($3); - TAILQ_INSERT_TAIL(&assignments, new, assignments); + struct Assignment *new = $6; + new->windowclass_title = strdup($3); + TAILQ_INSERT_TAIL(&assignments, new, assignments); } ; assign_target: - NUMBER - { - struct Assignment *new = scalloc(sizeof(struct Assignment)); - new->workspace = $1; - new->floating = ASSIGN_FLOATING_NO; - $$ = new; - } - | '~' - { - struct Assignment *new = scalloc(sizeof(struct Assignment)); - new->floating = ASSIGN_FLOATING_ONLY; - $$ = new; - } - | '~' NUMBER - { - struct Assignment *new = scalloc(sizeof(struct Assignment)); - new->workspace = $2; - new->floating = ASSIGN_FLOATING; - $$ = new; - } - ; + NUMBER + { + struct Assignment *new = scalloc(sizeof(struct Assignment)); + new->workspace = $1; + new->floating = ASSIGN_FLOATING_NO; + $$ = new; + } + | '~' + { + struct Assignment *new = scalloc(sizeof(struct Assignment)); + new->floating = ASSIGN_FLOATING_ONLY; + $$ = new; + } + | '~' NUMBER + { + struct Assignment *new = scalloc(sizeof(struct Assignment)); + new->workspace = $2; + new->floating = ASSIGN_FLOATING; + $$ = new; + } + ; window_class: QUOTEDSTRING