1
0
mirror of https://github.com/irssi/irssi.git synced 2025-02-02 15:08:01 -05:00

Changed some checks i_isspace() -> ' ' so that TAB isn't included in checks.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3130 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2003-10-11 00:19:34 +00:00 committed by cras
parent 9ae4779c87
commit 1826812c9d
4 changed files with 11 additions and 11 deletions

View File

@ -574,17 +574,17 @@ static int get_cmd_options(char **data, int ignore_unknown,
} }
(*data)++; (*data)++;
if (**data == '-' && i_isspace((*data)[1])) { if (**data == '-' && (*data)[1] == ' ') {
/* -- option means end of options even /* -- option means end of options even
if next word starts with - */ if next word starts with - */
(*data)++; (*data)++;
while (i_isspace(**data)) (*data)++; while (**data == ' ') (*data)++;
break; break;
} }
if (**data == '\0') if (**data == '\0')
option = "-"; option = "-";
else if (!i_isspace(**data)) else if (**data != ' ')
option = cmd_get_param(data); option = cmd_get_param(data);
else { else {
option = "-"; option = "-";
@ -629,7 +629,7 @@ static int get_cmd_options(char **data, int ignore_unknown,
*optlist[pos] == '!') *optlist[pos] == '!')
option = NULL; option = NULL;
while (i_isspace(**data)) (*data)++; while (**data == ' ') (*data)++;
continue; continue;
} }
@ -647,7 +647,7 @@ static int get_cmd_options(char **data, int ignore_unknown,
} }
option = NULL; option = NULL;
while (i_isspace(**data)) (*data)++; while (**data == ' ') (*data)++;
} }
return 0; return 0;

View File

@ -38,7 +38,7 @@ static int last_want_space, last_line_pos;
((c) == ',') ((c) == ',')
#define isseparator(c) \ #define isseparator(c) \
(i_isspace(c) || isseparator_notspace(c)) ((c) == ' ' || isseparator_notspace(c))
void chat_completion_init(void); void chat_completion_init(void);
void chat_completion_deinit(void); void chat_completion_deinit(void);
@ -530,7 +530,7 @@ static char *line_get_command(const char *line, char **args, int aliases)
} else { } else {
checkcmd = g_strndup(line, (int) (ptr-line)); checkcmd = g_strndup(line, (int) (ptr-line));
while (i_isspace(*ptr)) ptr++; while (*ptr == ' ') ptr++;
cmdargs = ptr; cmdargs = ptr;
} }

View File

@ -67,7 +67,7 @@ char *expand_emphasis(WI_ITEM_REC *item, const char *text)
/* check that the beginning marker starts a word, and /* check that the beginning marker starts a word, and
that the matching end marker ends a word */ that the matching end marker ends a word */
if ((pos > 0 && !i_isspace(bgn[-1])) || !ishighalnum(bgn[1])) if ((pos > 0 && bgn[-1] != ' ') || !ishighalnum(bgn[1]))
continue; continue;
if ((end = strchr(bgn+1, *bgn)) == NULL) if ((end = strchr(bgn+1, *bgn)) == NULL)
continue; continue;

View File

@ -146,19 +146,19 @@ static char *split_nicks(const char *cmd, char **pre, char **nicks, char **post,
*pre = g_strdup(cmd); *pre = g_strdup(cmd);
*post = *nicks = NULL; *post = *nicks = NULL;
for (p = *pre; *p != '\0'; p++) { for (p = *pre; *p != '\0'; p++) {
if (!i_isspace(*p)) if (*p != ' ')
continue; continue;
if (arg == 1) { if (arg == 1) {
/* text after nicks */ /* text after nicks */
*p++ = '\0'; *p++ = '\0';
while (i_isspace(*p)) p++; while (*p == ' ') p++;
*post = p; *post = p;
break; break;
} }
/* find nicks */ /* find nicks */
while (i_isspace(p[1])) p++; while (p[1] == ' ') p++;
if (--arg == 1) { if (--arg == 1) {
*p = '\0'; *p = '\0';
*nicks = p+1; *nicks = p+1;