Mail Archives: djgpp-workers/2003/11/08/12:37:52
--part1_a.380a1f62.2cde83a6_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Rich Dawe:
In a message dated 11/8/2003 7:09:46 AM Eastern Standard Time,
rich AT phekda DOT freeserve DOT co DOT uk writes:
> Do the maths functions use get_math_errhandling, to get the value of
> math_errhandling? Or do they just read math_errhandling? If they look at
> math_errhandling, then get_math_errhandling is useless. The library user
> could
> modify math_errhandling, making the value returned by get_math_errhandling
> completely bogus.
>
Functions get_math_errhandling() and set_math_errhandling() are meant to be
used by external programs. For example, the test programs in the cygnus
subdirectory will probably call set_math_errhandling() with MATH_ERRNO as a
parameter.
The only way to retrieve the original value of math_errhandling is through
get_math_errhandling(). The global variable math_errhandling can be set exactly
once during the life of the program. Thereafter, it cannot be reset; any
attempt to do so at runtime either by resetting the global variable or by calling
set_math_errhandling() again will fail.
The math functions use the other two functions, raise_except() and
set_errno(). Each call to these functions will freshen the original value of
math_errhandling.
The code tells the story. It should have been attached to your email.
KB Williams
--part1_a.380a1f62.2cde83a6_boundary
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
<HTML><FONT FACE=3Darial,helvetica><FONT SIZE=3D3 FAMILY=3D"SERIF" FACE=3D"=
Georgia" LANG=3D"0">Rich Dawe:<BR>
<BR>
In a message dated 11/8/2003 7:09:46 AM Eastern Standard Time, rich AT phekda DOT f=
reeserve.co.uk writes:<BR>
<BR>
<BLOCKQUOTE TYPE=3DCITE style=3D"BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT=
: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px"></FONT><FONT COLOR=3D"#000000"=
style=3D"BACKGROUND-COLOR: #ffffff" SIZE=3D2 FAMILY=3D"SANSSERIF" FACE=3D"A=
rial" LANG=3D"0">Do the maths functions use get_math_errhandling, to get the=
value of<BR>
math_errhandling? Or do they just read math_errhandling? If they look at<BR>
math_errhandling, then get_math_errhandling is useless. The library user cou=
ld<BR>
modify math_errhandling, making the value returned by get_math_errhandling<B=
R>
completely bogus.<BR>
</BLOCKQUOTE><BR>
</FONT><FONT COLOR=3D"#000000" style=3D"BACKGROUND-COLOR: #ffffff" SIZE=3D3=
FAMILY=3D"SERIF" FACE=3D"Georgia" LANG=3D"0"><BR>
Functions get_math_errhandling() and set_math_errhandling() are meant to be=20=
used by external programs. For example, the test programs in the cygnu=
s subdirectory will probably call set_math_errhandling() with MATH_ERRNO as=20=
a parameter.<BR>
<BR>
The only way to retrieve the original value of math_errhandling is through g=
et_math_errhandling(). The global variable math_errhandling can be set=
exactly once during the life of the program. Thereafter, it cannot be=
reset; any attempt to do so at runtime either by resetting the global varia=
ble or by calling set_math_errhandling() again will fail. <BR>
<BR>
The math functions use the other two functions, raise_except() and set_errno=
(). Each call to these functions will freshen the original value of ma=
th_errhandling.<BR>
<BR>
The code tells the story. It should have been attached to your email.<=
BR>
<BR>
KB Williams</FONT></HTML>
--part1_a.380a1f62.2cde83a6_boundary--
- Raw text -