home *** CD-ROM | disk | FTP | other *** search
- -- $Source: /home/harp/1/proto/monoBANK/winnt/win32-floatpkg.adb,v $
- -- $Revision: 1.3 $ $Date: 95/02/02 15:53:36 $ $Author: mg $
- -------------------------------------------------------------------------------
- --
- -- THIS FILE AND ANY ASSOCIATED DOCUMENTATION IS FURNISHED "AS IS" WITHOUT
- -- WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
- -- TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
- -- PURPOSE. The user assumes the entire risk as to the accuracy and the
- -- use of this file.
- --
- -- Copyright (c) Intermetrics, Inc. 1995
- -- Royalty-free, unlimited, worldwide, non-exclusive use, modification,
- -- reproduction and further distribution of this file is permitted.
- --
- -------------------------------------------------------------------------------
-
-
- with Ada.Unchecked_Conversion;
- with System;
- with Win32.PerThread;
-
- package body Win32.FloatPkg is
-
- -- If necessary someone could look at this code, and write a
- -- procedure that gets the address and then *sets* the code
- -- instead of getting it. I don't know if this is useful.
-
- -- Global variable holding floating point error code
- function fpecode return Win32.INT is -- float.h:174
- function To_PINT is new Ada.Unchecked_Conversion (
- System.Address, Win32.PINT);
- begin
- return To_PINT(
- Win32.PerThread.Get_Address(Win32.PerThread.Fpecode)).all;
- end fpecode;
-
- end Win32.FloatPkg;
-