octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: isascii/toascii with MSVC


From: Michael Goffioul
Subject: Re: isascii/toascii with MSVC
Date: Mon, 25 Feb 2008 10:44:48 +0100

On Mon, Feb 25, 2008 at 10:27 AM, John W. Eaton <address@hidden> wrote:
> So maybe we should replace all
>
>  #include <cctype>
>
> lines in Octave with
>
>  #include "lo-ctype.h"
>
> and create liboctave/lo-cctype.h that does the right thing (undefines
> the macros)?
>
> Maybe we should also add a corresponding lo-ctype.c file that provides
> xisacii and xtoascii functions, and then use those everywhere in place
> of isascii/toascii?  Would that fix the problem for you?  If it does,
> then I think this would be a good solution as it would hide these
> details in just two files.

Using an alternate name would definitely fix the problem, as long as you
also use xisascii/xtoascii in the class definitions (that is for instance using
MAPPERS_FORWARD(xisascii) instead of MAPPERS_FORWARD(isascii)
in ov.h). If you do that, you don't really need lo-cctype.h with undef's; the
only things you need are something like:

#include <cctype>

int
xisascii (int c)
{
  return isascii (c);
}

int
xtoascii (int c)
{
  return toascii (c);
}

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]