Re: Page fault with isspace(*p)

2002-11-23 Thread John K. Hohm
On Fri, 22 Nov 2002, John K. Hohm wrote:
 static int getc_skipws(char const **p)
 {
 while (isspace(*p))
 ++*p;
 return **p;
 }

Sometimes you just need to ask a question in order for the answer to
become obvious.  **p == '[', but *p == a char const*, duh.





Page fault with isspace(*p)

2002-11-22 Thread John K. Hohm
I am rewriting the regsvr stuff in dlls/comcat to make it practical to
extend to ole32 and all the other COM DLLs.  I have a nice simple function
to skip whitespace and return the next character:

static int getc_skipws(char const **p)
{
while (isspace(*p))
++*p;
return **p;
}

This gets called with **p == '['.  I get a page fault in the
implementation of isspace(), where the macro is testing 0x20 against the
value for '[' in the __ctype_b array.  What gives?