Make our VG_(isspace)() match libc's isspace(). And remove ISSPACE and
VG_ISSPACE, replacing them with calls to VG_(isspace)().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3439 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_errcontext.c b/coregrind/vg_errcontext.c
index 1f360b8..26ef33c 100644
--- a/coregrind/vg_errcontext.c
+++ b/coregrind/vg_errcontext.c
@@ -713,9 +713,6 @@
/* Get a non-blank, non-comment line of at most nBuf chars from fd.
Skips leading spaces on the line. Return True if EOF was hit instead.
*/
-
-#define VG_ISSPACE(ch) (((ch)==' ') || ((ch)=='\n') || ((ch)=='\t'))
-
Bool VG_(get_line) ( Int fd, Char* buf, Int nBuf )
{
Char ch;
@@ -724,7 +721,7 @@
/* First, read until a non-blank char appears. */
while (True) {
n = VG_(read)(fd, &ch, 1);
- if (n == 1 && !VG_ISSPACE(ch)) break;
+ if (n == 1 && !VG_(isspace)(ch)) break;
if (n == 0) return True;
}
@@ -738,7 +735,7 @@
if (i > 0 && i == nBuf-1) i--;
buf[i++] = ch; buf[i] = 0;
}
- while (i > 1 && VG_ISSPACE(buf[i-1])) {
+ while (i > 1 && VG_(isspace)(buf[i-1])) {
i--; buf[i] = 0;
};