diff options
author | LemonBoy <thatlemon@gmail.com> | 2015-11-09 23:02:41 +0100 |
---|---|---|
committer | LemonBoy <thatlemon@gmail.com> | 2015-11-09 23:02:41 +0100 |
commit | d4676c985553dc957e863e814097beba9bcc279e (patch) | |
tree | ea2e1b2adc9422bb9aa25c25da2a46fb1e1f1c32 /src/fe-common/core | |
parent | 3d9b9d473fdd2ec6af367df27cfc26a90a3f4375 (diff) | |
download | irssi-d4676c985553dc957e863e814097beba9bcc279e.zip |
Use the PARAM_FLAG_STRIP_TRAILING_WS flag wherever possible.
Diffstat (limited to 'src/fe-common/core')
-rw-r--r-- | src/fe-common/core/completion.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/fe-ignore.c | 3 | ||||
-rw-r--r-- | src/fe-common/core/fe-log.c | 5 | ||||
-rw-r--r-- | src/fe-common/core/fe-settings.c | 5 |
4 files changed, 9 insertions, 6 deletions
diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c index 4461de92..a4715d23 100644 --- a/src/fe-common/core/completion.c +++ b/src/fe-common/core/completion.c @@ -757,7 +757,7 @@ static void cmd_completion(const char *data) int len; if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_OPTIONS | - PARAM_FLAG_GETREST, + PARAM_FLAG_GETREST | PARAM_FLAG_STRIP_TRAILING_WS, "completion", &optlist, &key, &value)) return; diff --git a/src/fe-common/core/fe-ignore.c b/src/fe-common/core/fe-ignore.c index 533cda31..d2f9de27 100644 --- a/src/fe-common/core/fe-ignore.c +++ b/src/fe-common/core/fe-ignore.c @@ -127,7 +127,8 @@ static void cmd_ignore(const char *data) return; } - if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_OPTIONS | PARAM_FLAG_GETREST, + if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_OPTIONS | + PARAM_FLAG_GETREST | PARAM_FLAG_STRIP_TRAILING_WS, "ignore", &optlist, &mask, &levels)) return; diff --git a/src/fe-common/core/fe-log.c b/src/fe-common/core/fe-log.c index a39623d2..476abaab 100644 --- a/src/fe-common/core/fe-log.c +++ b/src/fe-common/core/fe-log.c @@ -87,8 +87,9 @@ static void cmd_log_open(const char *data) int level; if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST | - PARAM_FLAG_UNKNOWN_OPTIONS | PARAM_FLAG_OPTIONS, - "log open", &optlist, &fname, &levels)) + PARAM_FLAG_UNKNOWN_OPTIONS | PARAM_FLAG_OPTIONS | + PARAM_FLAG_STRIP_TRAILING_WS, "log open", &optlist, + &fname, &levels)) return; if (*fname == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS); diff --git a/src/fe-common/core/fe-settings.c b/src/fe-common/core/fe-settings.c index 2627989d..3bb43bf7 100644 --- a/src/fe-common/core/fe-settings.c +++ b/src/fe-common/core/fe-settings.c @@ -108,7 +108,8 @@ static void cmd_set(char *data) int clear, set_default; SETTINGS_REC *rec; - if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST | PARAM_FLAG_OPTIONS, + if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST | + PARAM_FLAG_OPTIONS | PARAM_FLAG_STRIP_TRAILING_WS, "set", &optlist, &key, &value)) return; @@ -182,7 +183,7 @@ static void cmd_toggle(const char *data) void *free_arg; int type; - if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST, &key, &value)) + if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST | PARAM_FLAG_STRIP_TRAILING_WS, &key, &value)) return; if (*key == '\0') |