mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
$*, $~ 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
This commit is contained in:
parent
7814192f03
commit
1b42f89ccb
@ -32,6 +32,9 @@
|
|||||||
#define isvarchar(c) \
|
#define isvarchar(c) \
|
||||||
(isalnum(c) || (c) == '_')
|
(isalnum(c) || (c) == '_')
|
||||||
|
|
||||||
|
#define isarg(c) \
|
||||||
|
(isdigit(c) || (c) == '*' || (c) == '~' || (c) == '-')
|
||||||
|
|
||||||
static SPECIAL_HISTORY_FUNC history_func = NULL;
|
static SPECIAL_HISTORY_FUNC history_func = NULL;
|
||||||
|
|
||||||
static char *get_argument(char **cmd, char **arglist)
|
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;
|
EXPANDO_FUNC func;
|
||||||
|
|
||||||
if (isdigit(**cmd) || **cmd == '*' || **cmd == '-' || **cmd == '~') {
|
if (isarg(**cmd)) {
|
||||||
/* argument */
|
/* argument */
|
||||||
*free_ret = TRUE;
|
*free_ret = TRUE;
|
||||||
if (arg_used != NULL) *arg_used = 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;
|
char command, *value, *p;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
if ((flags & PARSE_FLAG_ONLY_PARAMS) && !isdigit(**cmd)) {
|
if ((flags & PARSE_FLAG_ONLY_PARAMS) && !isarg(**cmd)) {
|
||||||
*free_ret = TRUE;
|
*free_ret = TRUE;
|
||||||
return g_strdup_printf("$%c", **cmd);
|
return g_strdup_printf("$%c", **cmd);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user