pike.git/
src/
stralloc.c
Branch:
Tag:
Non-build tags
All tags
No tags
2016-12-17
2016-12-17 01:53:25 by Martin Nilsson <nilsson@fastmail.com>
c054541c97c611057fa8bdab4863b5f75bc8011e (
20
lines) (+
16
/-
4
)
[
Show
|
Annotate
]
Branch:
8.1
Corrected WIDE_ISSPACE to actually work on all Unicode white spaces.
18:
#include "pike_float.h" #include "pike_types.h" #include "block_allocator.h"
+
#include "whitespace.h"
#include <errno.h> #include <ctype.h>
3261:
if (base < 0 || base > MBASE) return 0; if (!WIDE_ISALNUM(c = EXTRACT_PCHARP(str))) {
-
while (
WIDE
_
ISSPACE
(c))
+
while (
wide
_
isspace
(c))
{ INC_PCHARP(str,1); c=EXTRACT_PCHARP(str);
3406:
if(!WIDE_ISALNUM(c = EXTRACT_PCHARP(str))) {
-
while(
WIDE
_
ISSPACE
(c))
+
while(
wide
_
isspace
(c))
{ INC_PCHARP(str,1); c = EXTRACT_PCHARP(str);
3549:
s = nptr; /* Eat whitespace. */
-
while (EXTRACT_PCHARP(s) <256 &&
WIDE
_
ISSPACE
(EXTRACT_PCHARP(s))) INC_PCHARP(s,1);
+
while (EXTRACT_PCHARP(s) <256 &&
wide
_
isspace
(EXTRACT_PCHARP(s))) INC_PCHARP(s,1);
/* Get the sign. */ sign = EXTRACT_PCHARP(s) == '-' ? -1 : 1;
3614:
* We need to find the sign of the exponent by hand. */ p_wchar2 c;
-
while(
WIDE
_
ISSPACE
(c = EXTRACT_PCHARP(s))) {
+
while(
wide
_
isspace
(c = EXTRACT_PCHARP(s))) {
INC_PCHARP(s, 1); } if (endptr != NULL)
3736:
} UNREACHABLE(return 0); }
+
+
PMOD_EXPORT int wide_isspace(int c)
+
{
+
switch(c)
+
{
+
SPACECASE16;
+
return 1;
+
}
+
return 0;
+
}