summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/syscons/scmouse.c20
-rw-r--r--sys/dev/vinum/vinumparser.c8
2 files changed, 14 insertions, 14 deletions
diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c
index 1c576cd..bc4d93a 100644
--- a/sys/dev/syscons/scmouse.c
+++ b/sys/dev/syscons/scmouse.c
@@ -280,7 +280,7 @@ sc_remove_all_mouse(sc_softc_t *sc)
}
}
-#define isspace(c) (((c) & 0xff) == ' ')
+#define IS_SPACE_CHAR(c) (((c) & 0xff) == ' ')
/* skip spaces to right */
static int
@@ -291,7 +291,7 @@ skip_spc_right(scr_stat *scp, int p)
for (i = p % scp->xsize; i < scp->xsize; ++i) {
c = sc_vtb_getc(&scp->vtb, p);
- if (!isspace(c))
+ if (!IS_SPACE_CHAR(c))
break;
++p;
}
@@ -307,7 +307,7 @@ skip_spc_left(scr_stat *scp, int p)
for (i = p-- % scp->xsize - 1; i >= 0; --i) {
c = sc_vtb_getc(&scp->vtb, p);
- if (!isspace(c))
+ if (!IS_SPACE_CHAR(c))
break;
--p;
}
@@ -340,7 +340,7 @@ mouse_cut(scr_stat *scp)
for (p = from, i = blank = 0; p <= to; ++p) {
cut_buffer[i] = sc_vtb_getc(&scp->vtb, p);
/* remember the position of the last non-space char */
- if (!isspace(cut_buffer[i++]))
+ if (!IS_SPACE_CHAR(cut_buffer[i++]))
blank = i; /* the first space after the last non-space */
/* trim trailing blank when crossing lines */
if ((p % scp->xsize) == (scp->xsize - 1)) {
@@ -354,7 +354,7 @@ mouse_cut(scr_stat *scp)
--p;
for (i = p % scp->xsize; i < scp->xsize; ++i) {
c = sc_vtb_getc(&scp->vtb, p);
- if (!isspace(c))
+ if (!IS_SPACE_CHAR(c))
break;
++p;
}
@@ -468,17 +468,17 @@ mouse_cut_word(scr_stat *scp)
sol = (scp->mouse_pos / scp->xsize) * scp->xsize;
eol = sol + scp->xsize;
c = sc_vtb_getc(&scp->vtb, scp->mouse_pos);
- if (isspace(c)) {
+ if (IS_SPACE_CHAR(c)) {
/* blank space */
for (j = scp->mouse_pos; j >= sol; --j) {
c = sc_vtb_getc(&scp->vtb, j);
- if (!isspace(c))
+ if (!IS_SPACE_CHAR(c))
break;
}
start = ++j;
for (j = scp->mouse_pos; j < eol; ++j) {
c = sc_vtb_getc(&scp->vtb, j);
- if (!isspace(c))
+ if (!IS_SPACE_CHAR(c))
break;
}
end = j - 1;
@@ -486,13 +486,13 @@ mouse_cut_word(scr_stat *scp)
/* non-space word */
for (j = scp->mouse_pos; j >= sol; --j) {
c = sc_vtb_getc(&scp->vtb, j);
- if (isspace(c))
+ if (IS_SPACE_CHAR(c))
break;
}
start = ++j;
for (j = scp->mouse_pos; j < eol; ++j) {
c = sc_vtb_getc(&scp->vtb, j);
- if (isspace(c))
+ if (IS_SPACE_CHAR(c))
break;
}
end = j - 1;
diff --git a/sys/dev/vinum/vinumparser.c b/sys/dev/vinum/vinumparser.c
index 9487ce7..60e5f74 100644
--- a/sys/dev/vinum/vinumparser.c
+++ b/sys/dev/vinum/vinumparser.c
@@ -79,7 +79,7 @@
#include <dev/vinum/vinumext.h>
#ifdef KERNEL
-#define isspace(c) ((c == ' ') || (c == '\t')) /* check for white space */
+#define SPACETAB(c) ((c == ' ') || (c == '\t')) /* check for white space */
#else /* get it from the headers */
#include <ctype.h>
#endif
@@ -184,7 +184,7 @@ tokenize(char *cptr, char *token[])
tokennr = 0; /* none found yet */
for (;;) {
- while (isspace(*cptr))
+ while (SPACETAB(*cptr))
cptr++; /* skip initial white space */
if ((*cptr == '\0') || (*cptr == '\n') || (*cptr == '#')) /* end of line */
return tokennr; /* return number of tokens found */
@@ -197,14 +197,14 @@ tokenize(char *cptr, char *token[])
cptr++;
if ((*cptr == delim) && (cptr[-1] != '\\')) { /* found the partner */
cptr++; /* move on past */
- if (!isspace(*cptr)) /* error, no space after closing quote */
+ if (!SPACETAB(*cptr)) /* error, no space after closing quote */
return -1;
*cptr++ = '\0'; /* delimit */
} else if ((*cptr == '\0') || (*cptr == '\n')) /* end of line */
return -1;
}
} else { /* not quoted */
- while ((*cptr != '\0') && (!isspace(*cptr)) && (*cptr != '\n'))
+ while ((*cptr != '\0') && (!SPACETAB(*cptr)) && (*cptr != '\n'))
cptr++;
if (*cptr != '\0') /* not end of the line, */
*cptr++ = '\0'; /* delimit and move to the next */
OpenPOWER on IntegriCloud