[Top][All Lists]

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

Re: UTF-8 output via "echo_wchar" resulting in errno=1 on Mac OS X

From: Clemens Ladisch
Subject: Re: UTF-8 output via "echo_wchar" resulting in errno=1 on Mac OS X
Date: Tue, 19 Apr 2011 15:32:10 +0200
User-agent: Thunderbird (Windows/20100228)

Christoph Ender wrote:
> I've noticed that output of non-ASCII chars using a self-compiled ncurses 5.9 
> (the only
> compile-option being --enable-widec) or the MacPorts binary package of 
> ncurses, also in
> version 5.9, results in an errno=1.

>   echo_wchar(&wcval);
>   e2 = errno;

> e2: 1

> does anyone by chance have an idea what might be the cause?

| The value of errno shall be defined only after a call to a function
| for which it is explicitly stated to be set [...].  The value of
| errno should only be examined when it is indicated to be valid by
| a function's return value.

|     Upon successful completion, these functions return OK. Otherwise,
|     they return ERR. 
|     No errors are defined. 

So, to detect errors, you should check for echo_wchar() itself returning
ERR, and even then, the value of errno is not defined.


reply via email to

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