home *** CD-ROM | disk | FTP | other *** search
- /* stubs for ANSI library
- 94/01/06 aih removed THINK C console stubs
- 93/12/01 aih created */
-
- #include <stdio.h>
-
- #if ! PROFILE
- int _profile, _trace;
- short _profile_depth;
- #endif /* PROFILE */
-
- /* the following is hacked out of the THINK C <math.c> source file */
-
- #define _NOINTRINSICS_
- #define _NOSYNONYMS_
- #include "math.h"
- #include <SANE.h>
-
- #if __option(native_fp)
-
- #define addr(p) p
- #define univ(p) p
-
- #else
-
- #pragma parameter A0 addr(A0)
- static extended80 *addr(_double *) = {
- 0x5488, // addq.l #2,a0
- };
-
- #pragma parameter A0 univ(A0)
- static _double *univ(_double *) = {
- 0x30A8, 0x0002 // move.w 2(a0),(a0)
- };
-
- #endif
-
- #define SQRT(p) (fp68k(addr(p), FSQRTX), univ(p))
- double sqrt(double x) { return(*SQRT(&x)); }
-