On Sun, Jul 26, 2009 at 12:27:05PM -0400, Jorge Arellano Cid wrote:
On Sat, Jul 25, 2009 at 08:02:02PM +0000, corvid wrote:
When are we supposed to use isspace() and when are we supposed to use dIsspace()? It appears that one is now used in the C++ code and the other in the C code, but I don't know the reason for this distinction.
C and C++ have different conventions for data types. dIsspace() avoids problems in C code on platforms with a signed char default. C++ is inmune.
The results for C++ are not different as far as ctype(3) are concerned.
OTOH, it looks weird to have both calls in the code. I'd happily use dIsspace() all over if the compiler optimizes the extra cast away.
The cast is a nop on every architecture that matters. That is not the answer you might get from comp.lang.c though :) Joerg