Thread overview
SysError.msg()
Jan 30, 2005
Benjamin Herr
Jan 30, 2005
Benjamin Herr
Jan 30, 2005
pragma
Jan 31, 2005
Regan Heath
January 30, 2005
Hell, brave D world,

why is SysError.msg() (from std.syserror) not implemented like this?

#extern (C) char* strerror(int errnum);
#
#...
#    static char[] msg(uint errcode = getErrno())
#    {
#        char* msg = strerror(errcode);
#        return msg[0 .. strlen(msg)].dup;
#    }

As far as I know, strerror() is supposed to be portable enough.

-ben
January 30, 2005
Benjamin Herr wrote:
> Hell, brave D world,

Needs more o. Sorry.
January 30, 2005
In article <ctjgvp$196f$4@digitaldaemon.com>, Benjamin Herr says...
>
>Benjamin Herr wrote:
>> Hell, brave D world,
>
>Needs more o. Sorry.

Actually, its more accurate the way it was.  We're still Beta.

- EricAnderton at yahoo
January 31, 2005
On Sun, 30 Jan 2005 21:36:44 +0100, Benjamin Herr <ben@0x539.de> wrote:
> Hell, brave D world,
>
> why is SysError.msg() (from std.syserror) not implemented like this?
>
> #extern (C) char* strerror(int errnum);
> #
> #...
> #    static char[] msg(uint errcode = getErrno())
> #    {
> #        char* msg = strerror(errcode);
> #        return msg[0 .. strlen(msg)].dup;
> #    }
>
> As far as I know, strerror() is supposed to be portable enough.

Try this one.
Regan