home *** CD-ROM | disk | FTP | other *** search
- (**************************************************************************
-
- $RCSfile: MathTrans.mod $
- Description: Interface to mathtrans.library
-
- Created by: fjc (Frank Copeland)
- $Revision: 3.2 $
- $Author: fjc $
- $Date: 1994/08/08 00:50:12 $
-
- $VER: mathtrans_protos.h 1.2 (7.11.90)
- Includes Release 40.15
-
- (C) Copyright 1985-1993 Commodore-Amiga, Inc.
- All Rights Reserved
-
- Oberon-A interface Copyright © 1994, Frank Copeland.
- This file is part of the Oberon-A Interface.
- See Oberon-A.doc for conditions of use and distribution.
-
- ***************************************************************************)
-
- MODULE MathTrans;
-
- (*
- ** $C- CaseChk $I- IndexChk $L+ LongAdr $N- NilChk
- ** $P- PortableCode $R- RangeChk $S- StackChk $T- TypeChk
- ** $V- OvflChk $Z- ZeroVars
- *)
-
- IMPORT Exec, SYSTEM;
-
-
- (*-- Library Base variable --------------------------------------------*)
-
- TYPE
-
- MathTransBasePtr * = CPOINTER TO MathTransBase;
- MathTransBase * = RECORD (Exec.Library) END;
-
- CONST
-
- name * = "mathtrans.library";
-
- VAR
-
- base * : MathTransBasePtr;
-
-
- (*-- Library Functions ------------------------------------------------*)
-
-
- LIBCALL (base : MathTransBasePtr) Atan *
- ( parm [0] : REAL )
- : REAL;
- -30;
- LIBCALL (base : MathTransBasePtr) Sin *
- ( parm [0] : REAL )
- : REAL;
- -36;
- LIBCALL (base : MathTransBasePtr) Cos *
- ( parm [0] : REAL )
- : REAL;
- -42;
- LIBCALL (base : MathTransBasePtr) Tan *
- ( parm [0] : REAL )
- : REAL;
- -48;
- LIBCALL (base : MathTransBasePtr) Sincos *
- ( VAR cosResult [1] : REAL;
- parm [0] : REAL )
- : REAL;
- -54;
- LIBCALL (base : MathTransBasePtr) Sinh *
- ( parm [0] : REAL )
- : REAL;
- -60;
- LIBCALL (base : MathTransBasePtr) Cosh *
- ( parm [0] : REAL )
- : REAL;
- -66;
- LIBCALL (base : MathTransBasePtr) Tanh *
- ( parm [0] : REAL )
- : REAL;
- -72;
- LIBCALL (base : MathTransBasePtr) Exp *
- ( parm [0] : REAL )
- : REAL;
- -78;
- LIBCALL (base : MathTransBasePtr) Log *
- ( parm [0] : REAL )
- : REAL;
- -84;
- LIBCALL (base : MathTransBasePtr) Pow *
- ( power [1] : REAL;
- parm [0] : REAL )
- : REAL;
- -90;
- LIBCALL (base : MathTransBasePtr) Sqrt *
- ( parm [0] : REAL )
- : REAL;
- -96;
- LIBCALL (base : MathTransBasePtr) Tieee *
- ( parm [0] : REAL )
- : Exec.SINGLE;
- -102;
- LIBCALL (base : MathTransBasePtr) Fieee *
- ( parm [0] : Exec.SINGLE )
- : REAL;
- -108;
-
- (* --- functions in V31 or higher (distributed as Release 1.1) ---*)
-
- LIBCALL (base : MathTransBasePtr) Asin *
- ( parm [0] : REAL )
- : REAL;
- -114;
- LIBCALL (base : MathTransBasePtr) Acos *
- ( parm [0] : REAL )
- : REAL;
- -120;
- LIBCALL (base : MathTransBasePtr) Log10 *
- ( parm [0] : REAL )
- : REAL;
- -126;
-
-
- (*-- Library Base variable --------------------------------------------*)
- (* $L- Address globals through A4 *)
-
-
- (*-----------------------------------*)
- PROCEDURE* CloseLib ();
-
- BEGIN (* CloseLib *)
- IF base # NIL THEN Exec.base.CloseLibrary (base) END;
- END CloseLib;
-
- (*-----------------------------------*)
- PROCEDURE OpenLib * (mustOpen : BOOLEAN);
-
- BEGIN (* OpenLib *)
- IF base = NIL THEN
- base :=
- SYSTEM.VAL
- ( MathTransBasePtr,
- Exec.base.OpenLibrary (name, Exec.libraryMinimum));
- IF base # NIL THEN SYSTEM.SETCLEANUP (CloseLib)
- ELSIF mustOpen THEN HALT (100)
- END;
- END;
- END OpenLib;
-
-
- BEGIN
- base := NIL
- END MathTrans.
-