Mercurial > hg > octave-lojdl > gnulib-hg
changeset 9924:01ca1a0b2ebe
Fix use of isspace() function.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Wed, 16 Apr 2008 03:26:46 +0200 |
parents | 810b08d769f8 |
children | e5667160faa8 |
files | ChangeLog lib/trim.c |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-04-15 Bruno Haible <bruno@clisp.org> + + * lib/trim.c (trim2): Fix argument of isspace() macro. + 2008-04-15 Paolo Bonzini <bonzini@gnu.org> * lib/tanl.c (kernel_tanl): Rename flag to invert, initialize it
--- a/lib/trim.c +++ b/lib/trim.c @@ -113,7 +113,7 @@ /* Trim leading whitespaces. */ if (how != TRIM_TRAILING) { - for (p = d; *p && isspace (*p); p++) + for (p = d; *p && isspace ((unsigned char) *p); p++) ; memmove (d, p, strlen (p) + 1); @@ -121,7 +121,7 @@ /* Trim trailing whitespaces. */ if (how != TRIM_LEADING) { - for (p = d + strlen (d) - 1; p >= d && isspace (*p); p--) + for (p = d + strlen (d) - 1; p >= d && isspace ((unsigned char) *p); p--) *p = '\0'; } }