sxhkd-rc

[fork] simple X hotkey daemon (but for the rc shell)
Log | Files | Refs | README | LICENSE

commit 0996be85a93e2712cc0c7e289f4477f1a276f197
parent 9bbb2dbda3e2b868731f5d9632ee4fd26abb7033
Author: Bastien Dejean <nihilhill@gmail.com>
Date:   Wed,  2 Oct 2013 10:33:46 +0200

Increase maximum line length

Diffstat:
Mparse.c | 6+++---
Mparse.h | 4++--
Msxhkd.c | 2+-
Msxhkd.h | 2+-
Mtypes.h | 2+-
5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/parse.c b/parse.c @@ -2368,9 +2368,9 @@ void load_config(char *config_file) if (cfg == NULL) err("Can't open configuration file: '%s'.\n", config_file); - char buf[MAXLEN]; + char buf[3 * MAXLEN]; char chain[MAXLEN] = {0}; - char command[MAXLEN] = {0}; + char command[2 * MAXLEN] = {0}; int offset = 0; char first; @@ -2437,7 +2437,7 @@ void parse_event(xcb_generic_event_t *evt, uint8_t event_type, xcb_keysym_t *key void process_hotkey(char *hotkey_string, char *command_string) { char hotkey[MAXLEN] = {0}; - char command[MAXLEN] = {0}; + char command[2 * MAXLEN] = {0}; char last_hotkey[MAXLEN] = {0}; unsigned char num_same = 0; chunk_t *hk_chunks = extract_chunks(hotkey_string); diff --git a/parse.h b/parse.h @@ -43,8 +43,8 @@ typedef struct chunk_t chunk_t; struct chunk_t { - char text[MAXLEN]; - char item[MAXLEN]; + char text[2 * MAXLEN]; + char item[2 * MAXLEN]; char *advance; bool sequence; char range_cur; diff --git a/sxhkd.c b/sxhkd.c @@ -231,7 +231,7 @@ void motion_notify(xcb_generic_event_t *evt, uint8_t event_type) } hotkey_t *hk = find_hotkey(XCB_NO_SYMBOL, button, modfield, event_type, NULL); if (hk != NULL) { - char command[MAXLEN]; + char command[2 * MAXLEN]; snprintf(command, sizeof(command), hk->command, e->root_x, e->root_y); run(command); } diff --git a/sxhkd.h b/sxhkd.h @@ -51,7 +51,7 @@ char **extra_confs; int num_extra_confs; int redir_fd; FILE *status_fifo; -char progress[MAXLEN]; +char progress[3 * MAXLEN]; bool ignore_mapping; int timeout; diff --git a/types.h b/types.h @@ -60,7 +60,7 @@ typedef struct { typedef struct hotkey_t hotkey_t; struct hotkey_t { chain_t *chain; - char command[MAXLEN]; + char command[2 * MAXLEN]; cycle_t *cycle; hotkey_t *next; hotkey_t *prev;