summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-09-20 16:43:24 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-09-20 16:43:24 +0000
commit1b42f89ccbdfb7603012c677b742290c7c3f3c6f (patch)
treec96ee00083db59d33aab2d681a4ca3bff68aaa22 /src
parent7814192f037b38245f3b48d122aff809e91bdd30 (diff)
downloadirssi-1b42f89ccbdfb7603012c677b742290c7c3f3c6f.zip
$*, $~ and $-n should still work with PARAM_FLAG_ONLY_PARAMS.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1803 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/core/special-vars.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/special-vars.c b/src/core/special-vars.c
index c1523319..ffb57267 100644
--- a/src/core/special-vars.c
+++ b/src/core/special-vars.c
@@ -32,6 +32,9 @@
#define isvarchar(c) \
(isalnum(c) || (c) == '_')
+#define isarg(c) \
+ (isdigit(c) || (c) == '*' || (c) == '~' || (c) == '-')
+
static SPECIAL_HISTORY_FUNC history_func = NULL;
static char *get_argument(char **cmd, char **arglist)
@@ -152,7 +155,7 @@ static char *get_variable(char **cmd, SERVER_REC *server, void *item,
{
EXPANDO_FUNC func;
- if (isdigit(**cmd) || **cmd == '*' || **cmd == '-' || **cmd == '~') {
+ if (isarg(**cmd)) {
/* argument */
*free_ret = TRUE;
if (arg_used != NULL) *arg_used = TRUE;
@@ -202,7 +205,7 @@ static char *get_special_value(char **cmd, SERVER_REC *server, void *item,
char command, *value, *p;
int len;
- if ((flags & PARSE_FLAG_ONLY_PARAMS) && !isdigit(**cmd)) {
+ if ((flags & PARSE_FLAG_ONLY_PARAMS) && !isarg(**cmd)) {
*free_ret = TRUE;
return g_strdup_printf("$%c", **cmd);
}