From e3b876252840ce415c9998ca8f421515013c97b5 Mon Sep 17 00:00:00 2001 From: Jason Filby Date: Sun, 18 Jun 2000 12:29:32 +0000 Subject: [PATCH] Small change and removed unnecessary files svn path=/trunk/; revision=1200 --- reactos/subsys/win32k/eng/mem.c | 6 +- reactos/subsys/win32k/float/chgsign.c | 13 --- reactos/subsys/win32k/float/clearfp.c | 13 --- reactos/subsys/win32k/float/cntrlfp.c | 38 ------- reactos/subsys/win32k/float/copysign.c | 13 --- reactos/subsys/win32k/float/fpclass.c | 65 ------------ reactos/subsys/win32k/float/fpreset.c | 8 -- reactos/subsys/win32k/float/isnan.c | 77 -------------- reactos/subsys/win32k/float/logb.c | 31 ------ reactos/subsys/win32k/float/nafter.c | 12 --- reactos/subsys/win32k/float/nextaf.c | 48 --------- reactos/subsys/win32k/float/scalb.c | 12 --- reactos/subsys/win32k/float/statfp.c | 14 --- reactos/subsys/win32k/math/acos.c | 26 ----- reactos/subsys/win32k/math/acosh.c | 8 -- reactos/subsys/win32k/math/asin.c | 26 ----- reactos/subsys/win32k/math/asinh.c | 9 -- reactos/subsys/win32k/math/atan.c | 32 ------ reactos/subsys/win32k/math/atan2.c | 12 --- reactos/subsys/win32k/math/atanh.c | 8 -- reactos/subsys/win32k/math/cabs.c | 11 -- reactos/subsys/win32k/math/ceil.c | 23 ---- reactos/subsys/win32k/math/cos.c | 11 -- reactos/subsys/win32k/math/cosh.c | 8 -- reactos/subsys/win32k/math/exp.c | 42 -------- reactos/subsys/win32k/math/fabs.c | 32 ------ reactos/subsys/win32k/math/floor.c | 50 --------- reactos/subsys/win32k/math/fmod.c | 35 ------ reactos/subsys/win32k/math/frexp.c | 20 ---- reactos/subsys/win32k/math/ftol.c | 5 - reactos/subsys/win32k/math/huge_val.c | 7 -- reactos/subsys/win32k/math/hypot.c | 98 ----------------- reactos/subsys/win32k/math/j0_y0.c | 11 -- reactos/subsys/win32k/math/j1_y1.c | 11 -- reactos/subsys/win32k/math/jn_yn.c | 11 -- reactos/subsys/win32k/math/ldexp.c | 31 ------ reactos/subsys/win32k/math/log.c | 33 ------ reactos/subsys/win32k/math/log10.c | 34 ------ reactos/subsys/win32k/math/modf.c | 141 ------------------------- reactos/subsys/win32k/math/pow.c | 85 --------------- reactos/subsys/win32k/math/sin.c | 32 ------ reactos/subsys/win32k/math/sinh.c | 16 --- reactos/subsys/win32k/math/sqrt.c | 32 ------ reactos/subsys/win32k/math/stubs.c | 84 --------------- reactos/subsys/win32k/math/tan.c | 33 ------ reactos/subsys/win32k/math/tanh.c | 17 --- 46 files changed, 4 insertions(+), 1380 deletions(-) delete mode 100644 reactos/subsys/win32k/float/chgsign.c delete mode 100644 reactos/subsys/win32k/float/clearfp.c delete mode 100644 reactos/subsys/win32k/float/cntrlfp.c delete mode 100644 reactos/subsys/win32k/float/copysign.c delete mode 100644 reactos/subsys/win32k/float/fpclass.c delete mode 100644 reactos/subsys/win32k/float/fpreset.c delete mode 100644 reactos/subsys/win32k/float/isnan.c delete mode 100644 reactos/subsys/win32k/float/logb.c delete mode 100644 reactos/subsys/win32k/float/nafter.c delete mode 100644 reactos/subsys/win32k/float/nextaf.c delete mode 100644 reactos/subsys/win32k/float/scalb.c delete mode 100644 reactos/subsys/win32k/float/statfp.c delete mode 100644 reactos/subsys/win32k/math/acos.c delete mode 100644 reactos/subsys/win32k/math/acosh.c delete mode 100644 reactos/subsys/win32k/math/asin.c delete mode 100644 reactos/subsys/win32k/math/asinh.c delete mode 100644 reactos/subsys/win32k/math/atan.c delete mode 100644 reactos/subsys/win32k/math/atan2.c delete mode 100644 reactos/subsys/win32k/math/atanh.c delete mode 100644 reactos/subsys/win32k/math/cabs.c delete mode 100644 reactos/subsys/win32k/math/ceil.c delete mode 100644 reactos/subsys/win32k/math/cos.c delete mode 100644 reactos/subsys/win32k/math/cosh.c delete mode 100644 reactos/subsys/win32k/math/exp.c delete mode 100644 reactos/subsys/win32k/math/fabs.c delete mode 100644 reactos/subsys/win32k/math/floor.c delete mode 100644 reactos/subsys/win32k/math/fmod.c delete mode 100644 reactos/subsys/win32k/math/frexp.c delete mode 100644 reactos/subsys/win32k/math/ftol.c delete mode 100644 reactos/subsys/win32k/math/huge_val.c delete mode 100644 reactos/subsys/win32k/math/hypot.c delete mode 100644 reactos/subsys/win32k/math/j0_y0.c delete mode 100644 reactos/subsys/win32k/math/j1_y1.c delete mode 100644 reactos/subsys/win32k/math/jn_yn.c delete mode 100644 reactos/subsys/win32k/math/ldexp.c delete mode 100644 reactos/subsys/win32k/math/log.c delete mode 100644 reactos/subsys/win32k/math/log10.c delete mode 100644 reactos/subsys/win32k/math/modf.c delete mode 100644 reactos/subsys/win32k/math/pow.c delete mode 100644 reactos/subsys/win32k/math/sin.c delete mode 100644 reactos/subsys/win32k/math/sinh.c delete mode 100644 reactos/subsys/win32k/math/sqrt.c delete mode 100644 reactos/subsys/win32k/math/stubs.c delete mode 100644 reactos/subsys/win32k/math/tan.c delete mode 100644 reactos/subsys/win32k/math/tanh.c diff --git a/reactos/subsys/win32k/eng/mem.c b/reactos/subsys/win32k/eng/mem.c index ffa241048f2..29f483a4be7 100644 --- a/reactos/subsys/win32k/eng/mem.c +++ b/reactos/subsys/win32k/eng/mem.c @@ -32,10 +32,12 @@ VOID STDCALL EngFreeMem(PVOID Mem) PVOID STDCALL EngAllocUserMem(ULONG cj, ULONG tag) { - PVOID newMem; +/* PVOID newMem; -/* return ZwAllocateVirtualMemory(mycurrentprocess, newMem, 0, cj, + return ZwAllocateVirtualMemory(mycurrentprocess, newMem, 0, cj, MEM_COMMIT, PAGE_READWRITE); */ + + return NULL; } VOID STDCALL EngFreeUserMem(PVOID pv) diff --git a/reactos/subsys/win32k/float/chgsign.c b/reactos/subsys/win32k/float/chgsign.c deleted file mode 100644 index 589cc40bfbe..00000000000 --- a/reactos/subsys/win32k/float/chgsign.c +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include - -double _chgsign( double __x ) -{ - double_t *x = (double_t *)&x; - if ( x->sign == 1 ) - x->sign = 0; - else - x->sign = 1; - - return __x; -} diff --git a/reactos/subsys/win32k/float/clearfp.c b/reactos/subsys/win32k/float/clearfp.c deleted file mode 100644 index e824752e4c6..00000000000 --- a/reactos/subsys/win32k/float/clearfp.c +++ /dev/null @@ -1,13 +0,0 @@ -#include - -unsigned int _clearfp (void) -{ - -unsigned short __res = _statusfp(); - -__asm__ __volatile__ ( - "fclex \n\t" - ); - return __res; -} - diff --git a/reactos/subsys/win32k/float/cntrlfp.c b/reactos/subsys/win32k/float/cntrlfp.c deleted file mode 100644 index 2ebdb0ad212..00000000000 --- a/reactos/subsys/win32k/float/cntrlfp.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include - -unsigned int _controlfp (unsigned int unNew, unsigned int unMask) -{ - return _control87(unNew,unMask); -} - -unsigned int _control87 (unsigned int unNew, unsigned int unMask) -{ - -register unsigned int __res; -__asm__ __volatile__ ( - "pushl %%eax \n\t" /* make room on stack */ - "fstcw (%%esp) \n\t" - "fwait \n\t" - "popl %%eax \n\t" - "andl $0xffff, %%eax \n\t" /* OK; we have the old value ready */ - - "movl %1, %%ecx \n\t" - "notl %%ecx \n\t" - "andl %%eax, %%ecx \n\t" /* the bits we want to keep */ - - "movl %2, %%edx \n\t" - "andl %1, %%edx \n\t" /* the bits we want to change */ - - "orl %%ecx, %%edx\n\t" /* the new value */ - "pushl %%edx \n\t" - "fldcw (%%esp) \n\t" - "popl %%edx \n\t" - - - :"=r" (__res):"r" (unNew),"r" (unMask): "ax", "dx", "cx"); -/* :"=a" (__res):"c" (unNew),"d" (unMask):"ax", "dx", "cx"); */ - - return __res; -} diff --git a/reactos/subsys/win32k/float/copysign.c b/reactos/subsys/win32k/float/copysign.c deleted file mode 100644 index 4d02b38601f..00000000000 --- a/reactos/subsys/win32k/float/copysign.c +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include - -double _copysign (double __d, double __s) -{ - double_t *d = (double_t *)&__d; - double_t *s = (double_t *)&__s; - - d->sign = s->sign; - - return __d; -} - \ No newline at end of file diff --git a/reactos/subsys/win32k/float/fpclass.c b/reactos/subsys/win32k/float/fpclass.c deleted file mode 100644 index 06c404f5ead..00000000000 --- a/reactos/subsys/win32k/float/fpclass.c +++ /dev/null @@ -1,65 +0,0 @@ -#include -#include -#include - -#define _FPCLASS_SNAN 0x0001 /* signaling NaN */ -#define _FPCLASS_QNAN 0x0002 /* quiet NaN */ -#define _FPCLASS_NINF 0x0004 /* negative infinity */ -#define _FPCLASS_NN 0x0008 /* negative normal */ -#define _FPCLASS_ND 0x0010 /* negative denormal */ -#define _FPCLASS_NZ 0x0020 /* -0 */ -#define _FPCLASS_PZ 0x0040 /* +0 */ -#define _FPCLASS_PD 0x0080 /* positive denormal */ -#define _FPCLASS_PN 0x0100 /* positive normal */ -#define _FPCLASS_PINF 0x0200 /* positive infinity */ - -#define FP_SNAN 0x0001 // signaling NaN -#define FP_QNAN 0x0002 // quiet NaN -#define FP_NINF 0x0004 // negative infinity -#define FP_PINF 0x0200 // positive infinity -#define FP_NDENORM 0x0008 // negative denormalized non-zero -#define FP_PDENORM 0x0010 // positive denormalized non-zero -#define FP_NZERO 0x0020 // negative zero -#define FP_PZERO 0x0040 // positive zero -#define FP_NNORM 0x0080 // negative normalized non-zero -#define FP_PNORM 0x0100 // positive normalized non-zero - -typedef int fpclass_t; - -fpclass_t _fpclass(double __d) -{ - double_t *d = (double_t *)&__d; - - if ( d->exponent == 0 ) { - if ( d->mantissah == 0 && d->mantissal == 0 ) { - if ( d->sign ==0 ) - return FP_NZERO; - else - return FP_PZERO; - } else { - if ( d->sign ==0 ) - return FP_NDENORM; - else - return FP_PDENORM; - } - } - if (d->exponent == 0x7ff ) { - if ( d->mantissah == 0 && d->mantissal == 0 ) { - if ( d->sign ==0 ) - return FP_NINF; - else - return FP_PINF; - } - else if ( d->mantissah == 0 && d->mantissal != 0 ) { - return FP_QNAN; - } - else if ( d->mantissah == 0 && d->mantissal != 0 ) { - return FP_SNAN; - } - - } - - return 0; -} - - diff --git a/reactos/subsys/win32k/float/fpreset.c b/reactos/subsys/win32k/float/fpreset.c deleted file mode 100644 index 6e8dd3d24ca..00000000000 --- a/reactos/subsys/win32k/float/fpreset.c +++ /dev/null @@ -1,8 +0,0 @@ -#include - -void _fpreset (void) -{ - /* FIXME: This causes an exception */ -// __asm__ __volatile__("fninit\n\t"); - return; -} diff --git a/reactos/subsys/win32k/float/isnan.c b/reactos/subsys/win32k/float/isnan.c deleted file mode 100644 index d6f4ac04e1a..00000000000 --- a/reactos/subsys/win32k/float/isnan.c +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include - -int _isnan(double __x) -{ - double_t * x = (double_t *)&__x; - return ( x->exponent == 0x7ff && ( x->mantissah != 0 || x->mantissal != 0 )); -} - -int _isnanl(long double __x) -{ - - /* Intel's extended format has the normally implicit 1 explicit - present. Sigh! */ - - long_double_t * x = (long_double_t *)&__x; - - - /* IEEE 854 NaN's have the maximum possible - exponent and a nonzero mantissa. */ - - return (( x->exponent == 0x7fff) - && ( (x->mantissah & 0x80000000) != 0) - && ( (x->mantissah & (unsigned int)0x7fffffff) != 0 || x->mantissal != 0 )); -} - - -int _isinf(double __x) -{ - double_t * x = (double_t *)&__x; - return ( x->exponent == 0x7ff && ( x->mantissah == 0 && x->mantissal == 0 )); -} - - - -int _finite( double x ) -{ - return !_isinf(x); -} - -int _isinfl(long double __x) -{ - /* Intel's extended format has the normally implicit 1 explicit - present. Sigh! */ - - long_double_t * x = (long_double_t *)&__x; - - - /* An IEEE 854 infinity has an exponent with the - maximum possible value and a zero mantissa. */ - - - if ( x->exponent == 0x7fff && ( (x->mantissah == 0x80000000 ) && x->mantissal == 0 )) - return x->sign ? -1 : 1; - return 0; -} - - diff --git a/reactos/subsys/win32k/float/logb.c b/reactos/subsys/win32k/float/logb.c deleted file mode 100644 index db8eff6381a..00000000000 --- a/reactos/subsys/win32k/float/logb.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -double _logb (double __x); - -double _logb (double __x) -{ - register double __value, __junk; - __asm __volatile__ - ("fxtract\n\t" - : "=t" (__junk), "=u" (__value) : "0" (__x)); - - return __value; -} \ No newline at end of file diff --git a/reactos/subsys/win32k/float/nafter.c b/reactos/subsys/win32k/float/nafter.c deleted file mode 100644 index 5e2a2ad317f..00000000000 --- a/reactos/subsys/win32k/float/nafter.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - -double _nextafter( double x, double y ) -{ - if ( x == y) - return x; - - if ( isnan(x) || isnan(y) ) - return x; - - return x; -} diff --git a/reactos/subsys/win32k/float/nextaf.c b/reactos/subsys/win32k/float/nextaf.c deleted file mode 100644 index d97d2dd2a71..00000000000 --- a/reactos/subsys/win32k/float/nextaf.c +++ /dev/null @@ -1,48 +0,0 @@ -#define MAX_DOUBLE 1.7976931348623158e+308 -#define MIN_DOUBLE 2.2250738585072014e-308 - -double _xnextafter( double __x, double __y ) -{ - double_t *x = ( double_t *)&__x; - - double __e; - double_t *e = (double_t *)&__e; - - - if ( _isnan(__x) || _isinf(__x) ) - return __x; - - if ( _isnan(__y) ) - return __y; - - - // don't go to infinity just by adding - - if ( _isinf(__y) && fabs(__x) >= MAX_DOUBLE ) - return __x; - - if ( !_isinf(__y) && fabs(__x - __y) <= MIN_DOUBLE ) - return __y; - - - - - e->mantissal = 1; - e->mantissah = 0; - if ( x->exponent >= 53 ) - e->exponent = x->exponent - 52; - else - e->exponent = 1; - - if ( fabs(__x) < fabs(__y) ) - e->sign = 0; - else - e->sign = 1; - - - - return __x+__e; - - - -} diff --git a/reactos/subsys/win32k/float/scalb.c b/reactos/subsys/win32k/float/scalb.c deleted file mode 100644 index e035584cb93..00000000000 --- a/reactos/subsys/win32k/float/scalb.c +++ /dev/null @@ -1,12 +0,0 @@ -#include -#include - -double _scalb( double __x, long e ) -{ - double_t *x = (double_t *)&__x; - - x->exponent += e; - - return __x; - -} diff --git a/reactos/subsys/win32k/float/statfp.c b/reactos/subsys/win32k/float/statfp.c deleted file mode 100644 index 5cfeabfe51c..00000000000 --- a/reactos/subsys/win32k/float/statfp.c +++ /dev/null @@ -1,14 +0,0 @@ -#include - -unsigned int _statusfp (void) -{ - -register unsigned short __res; - -__asm__ __volatile__ ( - "fstsw %0 \n\t" -// "movzwl %ax, %eax" - :"=a" (__res) - ); - return __res; -} diff --git a/reactos/subsys/win32k/math/acos.c b/reactos/subsys/win32k/math/acos.c deleted file mode 100644 index 34707822aaf..00000000000 --- a/reactos/subsys/win32k/math/acos.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double acos (double __x) -{ - return atan2 (sqrt (1.0 - __x * __x), __x); -} \ No newline at end of file diff --git a/reactos/subsys/win32k/math/acosh.c b/reactos/subsys/win32k/math/acosh.c deleted file mode 100644 index 15f556cbc96..00000000000 --- a/reactos/subsys/win32k/math/acosh.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -double -acosh(double x) -{ - return log(x + sqrt(x*x - 1)); -} diff --git a/reactos/subsys/win32k/math/asin.c b/reactos/subsys/win32k/math/asin.c deleted file mode 100644 index 6aeba7d9e26..00000000000 --- a/reactos/subsys/win32k/math/asin.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double asin (double __x) -{ - return atan2 (__x, sqrt (1.0 - __x * __x)); -} \ No newline at end of file diff --git a/reactos/subsys/win32k/math/asinh.c b/reactos/subsys/win32k/math/asinh.c deleted file mode 100644 index 7089ebcf64a..00000000000 --- a/reactos/subsys/win32k/math/asinh.c +++ /dev/null @@ -1,9 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -double -asinh(double x) -{ - return x>0 ? log(x + sqrt(x*x + 1)) : -log(sqrt(x*x+1)-x); -} - diff --git a/reactos/subsys/win32k/math/atan.c b/reactos/subsys/win32k/math/atan.c deleted file mode 100644 index 20ef6724d7c..00000000000 --- a/reactos/subsys/win32k/math/atan.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -double atan (double __x); - -double atan (double __x) -{ - register double __value; - __asm __volatile__ - ("fld1\n\t" - "fpatan" - : "=t" (__value) : "0" (__x)); - - return __value; -} \ No newline at end of file diff --git a/reactos/subsys/win32k/math/atan2.c b/reactos/subsys/win32k/math/atan2.c deleted file mode 100644 index 30b800167a6..00000000000 --- a/reactos/subsys/win32k/math/atan2.c +++ /dev/null @@ -1,12 +0,0 @@ -double atan2 (double __y, double __x); - -double atan2 (double __y, double __x) -{ - register double __value; - __asm __volatile__ - ("fpatan\n\t" - "fld %%st(0)" - : "=t" (__value) : "0" (__x), "u" (__y)); - - return __value; -} \ No newline at end of file diff --git a/reactos/subsys/win32k/math/atanh.c b/reactos/subsys/win32k/math/atanh.c deleted file mode 100644 index fdfb3194cf9..00000000000 --- a/reactos/subsys/win32k/math/atanh.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -double -atanh(double x) -{ - return log((1+x)/(1-x)) / 2.0; -} diff --git a/reactos/subsys/win32k/math/cabs.c b/reactos/subsys/win32k/math/cabs.c deleted file mode 100644 index 2c3ada9608c..00000000000 --- a/reactos/subsys/win32k/math/cabs.c +++ /dev/null @@ -1,11 +0,0 @@ -#include - -double _cabs( struct _complex z ) -{ - return sqrt( z.x*z.x + z.y*z.y ); -// return hypot(z.x,z.y); -} - - - - diff --git a/reactos/subsys/win32k/math/ceil.c b/reactos/subsys/win32k/math/ceil.c deleted file mode 100644 index 56cf8569c17..00000000000 --- a/reactos/subsys/win32k/math/ceil.c +++ /dev/null @@ -1,23 +0,0 @@ -#include - -double ceil (double __x); - -double ceil (double __x) -{ - register double __value; - __volatile unsigned short int __cw, __cwtmp; - - __asm __volatile ("fnstcw %0" : "=m" (__cw)); - __cwtmp = (__cw & 0xf3ff) | 0x0800; /* rounding up */ - __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); - __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); - __asm __volatile ("fldcw %0" : : "m" (__cw)); - - return __value; -} - - -long double ceill (long double __x) -{ - return floor(__x)+1; -} \ No newline at end of file diff --git a/reactos/subsys/win32k/math/cos.c b/reactos/subsys/win32k/math/cos.c deleted file mode 100644 index 07edd8b0a3e..00000000000 --- a/reactos/subsys/win32k/math/cos.c +++ /dev/null @@ -1,11 +0,0 @@ -double cos (double __x); - -double cos (double __x) -{ - register double __value; - __asm __volatile__ - ("fcos" - : "=t" (__value): "0" (__x)); - - return __value; -} diff --git a/reactos/subsys/win32k/math/cosh.c b/reactos/subsys/win32k/math/cosh.c deleted file mode 100644 index 85e95f088ac..00000000000 --- a/reactos/subsys/win32k/math/cosh.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -double cosh(double x) -{ - const double ebig = exp(fabs(x)); - return (ebig + 1.0/ebig) / 2.0; -} diff --git a/reactos/subsys/win32k/math/exp.c b/reactos/subsys/win32k/math/exp.c deleted file mode 100644 index 71df0e0e309..00000000000 --- a/reactos/subsys/win32k/math/exp.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - -double exp (double __x); - -double exp (double __x) -{ - register double __value, __exponent; - __asm __volatile__ - ("fldl2e # e^x = 2^(x * log2(e))\n\t" - "fmul %%st(1) # x * log2(e)\n\t" - "fst %%st(1)\n\t" - "frndint # int(x * log2(e))\n\t" - "fxch\n\t" - "fsub %%st(1) # fract(x * log2(e))\n\t" - "f2xm1 # 2^(fract(x * log2(e))) - 1\n\t" - : "=t" (__value), "=u" (__exponent) : "0" (__x)); - __value += 1.0; - __asm __volatile__ - ("fscale" - : "=t" (__value) : "0" (__value), "u" (__exponent)); - - return __value; -} diff --git a/reactos/subsys/win32k/math/fabs.c b/reactos/subsys/win32k/math/fabs.c deleted file mode 100644 index f56c2682528..00000000000 --- a/reactos/subsys/win32k/math/fabs.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - -double fabs (double __x); - -double fabs (double __x) -{ - register double __value; - __asm __volatile__ - ("fabs" - : "=t" (__value) : "0" (__x)); - - return __value; -} \ No newline at end of file diff --git a/reactos/subsys/win32k/math/floor.c b/reactos/subsys/win32k/math/floor.c deleted file mode 100644 index 7403a52aa16..00000000000 --- a/reactos/subsys/win32k/math/floor.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - -double floor (double __x); - -double floor (double __x) -{ - register double __value; - __volatile unsigned short int __cw, __cwtmp; - - __asm __volatile ("fnstcw %0" : "=m" (__cw)); - __cwtmp = (__cw & 0xf3ff) | 0x0400; /* rounding down */ - __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); - __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); - __asm __volatile ("fldcw %0" : : "m" (__cw)); - - return __value; -} - -typedef struct IEEExp { - unsigned manl:32; - unsigned manh:32; - unsigned exp:15; - unsigned sign:1; - } long_double_t; - -long double floorl(long double x ) -{ - - return (long double)(long long int)x; -} - diff --git a/reactos/subsys/win32k/math/fmod.c b/reactos/subsys/win32k/math/fmod.c deleted file mode 100644 index 8e178d9ef77..00000000000 --- a/reactos/subsys/win32k/math/fmod.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - -double fmod (double __x, double __y); - -double fmod (double __x, double __y) -{ - register double __value; - __asm __volatile__ - ("1: fprem\n\t" - "fstsw %%ax\n\t" - "sahf\n\t" - "jp 1b" - : "=t" (__value) : "0" (__x), "u" (__y) : "ax", "cc"); - - return __value; -} \ No newline at end of file diff --git a/reactos/subsys/win32k/math/frexp.c b/reactos/subsys/win32k/math/frexp.c deleted file mode 100644 index 8b3390de34c..00000000000 --- a/reactos/subsys/win32k/math/frexp.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include -#include - -double -frexp(double __x, int *exptr) -{ - double_t *x = (double_t *)&__x; - - if ( exptr != NULL ) - *exptr = x->exponent - 0x3FE; - - - x->exponent = 0x3FE; - - return __x; -} - - - diff --git a/reactos/subsys/win32k/math/ftol.c b/reactos/subsys/win32k/math/ftol.c deleted file mode 100644 index b20aef46aca..00000000000 --- a/reactos/subsys/win32k/math/ftol.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -long _ftol(double fl) { - return (long)fl; -} diff --git a/reactos/subsys/win32k/math/huge_val.c b/reactos/subsys/win32k/math/huge_val.c deleted file mode 100644 index 91eefa00fed..00000000000 --- a/reactos/subsys/win32k/math/huge_val.c +++ /dev/null @@ -1,7 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include - -#undef _HUGE -double_t _HUGE = { 0x00000, 0x00000, 0x7ff, 0x0 }; -double *_HUGE_dll = (double *)&_HUGE; diff --git a/reactos/subsys/win32k/math/hypot.c b/reactos/subsys/win32k/math/hypot.c deleted file mode 100644 index 08e34923f04..00000000000 --- a/reactos/subsys/win32k/math/hypot.c +++ /dev/null @@ -1,98 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -/* - * hypot() function for DJGPP. - * - * hypot() computes sqrt(x^2 + y^2). The problem with the obvious - * naive implementation is that it might fail for very large or - * very small arguments. For instance, for large x or y the result - * might overflow even if the value of the function should not, - * because squaring a large number might trigger an overflow. For - * very small numbers, their square might underflow and will be - * silently replaced by zero; this won't cause an exception, but might - * have an adverse effect on the accuracy of the result. - * - * This implementation tries to avoid the above pitfals, without - * inflicting too much of a performance hit. - * - */ - -#include -#include -#include - -/* Approximate square roots of DBL_MAX and DBL_MIN. Numbers - between these two shouldn't neither overflow nor underflow - when squared. */ -#define __SQRT_DBL_MAX 1.3e+154 -#define __SQRT_DBL_MIN 2.3e-162 - -double -_hypot(double x, double y) -{ - double abig = fabs(x), asmall = fabs(y); - double ratio; - - /* Make abig = max(|x|, |y|), asmall = min(|x|, |y|). */ - if (abig < asmall) - { - double temp = abig; - - abig = asmall; - asmall = temp; - } - - /* Trivial case. */ - if (asmall == 0.) - return abig; - - /* Scale the numbers as much as possible by using its ratio. - For example, if both ABIG and ASMALL are VERY small, then - X^2 + Y^2 might be VERY inaccurate due to loss of - significant digits. Dividing ASMALL by ABIG scales them - to a certain degree, so that accuracy is better. */ - - if ((ratio = asmall / abig) > __SQRT_DBL_MIN && abig < __SQRT_DBL_MAX) - return abig * sqrt(1.0 + ratio*ratio); - else - { - /* Slower but safer algorithm due to Moler and Morrison. Never - produces any intermediate result greater than roughly the - larger of X and Y. Should converge to machine-precision - accuracy in 3 iterations. */ - - double r = ratio*ratio, t, s, p = abig, q = asmall; - - do { - t = 4. + r; - if (t == 4.) - break; - s = r / t; - p += 2. * s * p; - q *= s; - r = (q / p) * (q / p); - } while (1); - - return p; - } -} - -#ifdef TEST - -#include - -int -main(void) -{ - printf("hypot(3, 4) =\t\t\t %25.17e\n", _hypot(3., 4.)); - printf("hypot(3*10^150, 4*10^150) =\t %25.17g\n", _hypot(3.e+150, 4.e+150)); - printf("hypot(3*10^306, 4*10^306) =\t %25.17g\n", _hypot(3.e+306, 4.e+306)); - printf("hypot(3*10^-320, 4*10^-320) =\t %25.17g\n",_hypot(3.e-320, 4.e-320)); - printf("hypot(0.7*DBL_MAX, 0.7*DBL_MAX) =%25.17g\n",_hypot(0.7*DBL_MAX, 0.7*DBL_MAX)); - printf("hypot(DBL_MAX, 1.0) =\t\t %25.17g\n", _hypot(DBL_MAX, 1.0)); - printf("hypot(1.0, DBL_MAX) =\t\t %25.17g\n", _hypot(1.0, DBL_MAX)); - printf("hypot(0.0, DBL_MAX) =\t\t %25.17g\n", _hypot(0.0, DBL_MAX)); - - return 0; -} - -#endif diff --git a/reactos/subsys/win32k/math/j0_y0.c b/reactos/subsys/win32k/math/j0_y0.c deleted file mode 100644 index fe3c422f3bc..00000000000 --- a/reactos/subsys/win32k/math/j0_y0.c +++ /dev/null @@ -1,11 +0,0 @@ -#include - -double _j0(double x) -{ - return x; -} - -double _y0(double x) -{ - return x; -} \ No newline at end of file diff --git a/reactos/subsys/win32k/math/j1_y1.c b/reactos/subsys/win32k/math/j1_y1.c deleted file mode 100644 index 76432b9f67b..00000000000 --- a/reactos/subsys/win32k/math/j1_y1.c +++ /dev/null @@ -1,11 +0,0 @@ -#include - -double _j1(double x) -{ - return x; -} - -double _y1(double x) -{ - return x; -} \ No newline at end of file diff --git a/reactos/subsys/win32k/math/jn_yn.c b/reactos/subsys/win32k/math/jn_yn.c deleted file mode 100644 index b3a718163d4..00000000000 --- a/reactos/subsys/win32k/math/jn_yn.c +++ /dev/null @@ -1,11 +0,0 @@ -#include - -double _jn(int n, double x) -{ - return x; -} - -double _yn(int n, double x) -{ - return x; -} \ No newline at end of file diff --git a/reactos/subsys/win32k/math/ldexp.c b/reactos/subsys/win32k/math/ldexp.c deleted file mode 100644 index f96c3c35aa4..00000000000 --- a/reactos/subsys/win32k/math/ldexp.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -double ldexp (double __x, int __y); - -double ldexp (double __x, int __y) -{ - register double __value; - __asm __volatile__ - ("fscale" - : "=t" (__value) : "0" (__x), "u" ((double) __y)); - - return __value; -} \ No newline at end of file diff --git a/reactos/subsys/win32k/math/log.c b/reactos/subsys/win32k/math/log.c deleted file mode 100644 index b8cf142f50c..00000000000 --- a/reactos/subsys/win32k/math/log.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -double log (double __x); - -double log (double __x) -{ - register double __value; - __asm __volatile__ - ("fldln2\n\t" - "fxch\n\t" - "fyl2x" - : "=t" (__value) : "0" (__x)); - - return __value; -} \ No newline at end of file diff --git a/reactos/subsys/win32k/math/log10.c b/reactos/subsys/win32k/math/log10.c deleted file mode 100644 index 64a6b1708e4..00000000000 --- a/reactos/subsys/win32k/math/log10.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - -double log10 (double __x); - -double log10 (double __x) -{ - register double __value; - __asm __volatile__ - ("fldlg2\n\t" - "fxch\n\t" - "fyl2x" - : "=t" (__value) : "0" (__x)); - - return __value; -} \ No newline at end of file diff --git a/reactos/subsys/win32k/math/modf.c b/reactos/subsys/win32k/math/modf.c deleted file mode 100644 index 6864e52e044..00000000000 --- a/reactos/subsys/win32k/math/modf.c +++ /dev/null @@ -1,141 +0,0 @@ -/* @(#)s_modf.c 1.3 95/01/18 */ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunSoft, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -#include -#include -#include - - - -//static const double one = 1.0; - -double modf(double __x, double *__i) -{ - - double_t * x = (double_t *)&__x; - double_t * iptr = ( double_t *)__i; - - int j0; - unsigned int i; - j0 = x->exponent - 0x3ff; /* exponent of x */ - if(j0<20) { /* integer part in high x */ - if(j0<0) { /* |x|<1 */ - *__i = 0.0; - iptr->sign = x->sign; - return __x; - } else { - - if ( x->mantissah == 0 && x->mantissal == 0 ) { - *__i = __x; - return 0.0; - } - - i = (0x000fffff)>>j0; - iptr->sign = x->sign; - iptr->exponent = x->exponent; - iptr->mantissah = x->mantissah&(~i); - iptr->mantissal = 0; - if ( __x == *__i ) { - __x = 0.0; - x->sign = iptr->sign; - return __x; - } - return __x - *__i; - } - } else if (j0>51) { /* no fraction part */ - *__i = __x; - if ( _isnan(__x) || _isinf(__x) ) - return __x; - - - __x = 0.0; - x->sign = iptr->sign; - return __x; - } else { /* fraction part in low x */ - - - i = ((unsigned)(0xffffffff))>>(j0-20); - iptr->sign = x->sign; - iptr->exponent = x->exponent; - iptr->mantissah = x->mantissah; - iptr->mantissal = x->mantissal&(~i); - if ( __x == *__i ) { - __x = 0.0; - x->sign = iptr->sign; - return __x; - } - return __x - *__i; - } -} - - -long double modfl(long double __x, long double *__i) -{ - - - long_double_t * x = (long_double_t *)&__x; - long_double_t * iptr = (long_double_t *)__i; - - int j0; - unsigned int i; - j0 = x->exponent - 0x3fff; /* exponent of x */ - - - if(j0<32) { /* integer part in high x */ - if(j0<0) { /* |x|<1 */ - *__i = 0.0L; - iptr->sign = x->sign; - return __x; - } else { - - i = ((unsigned int)(0xffffffff))>>(j0+1); - if ( x->mantissal == 0 && (x->mantissal & i) == 0 ) { - *__i = __x; - __x = 0.0L; - x->sign = iptr->sign; - return __x; - } - iptr->sign = x->sign; - iptr->exponent = x->exponent; - iptr->mantissah = x->mantissah&((~i)); - iptr->mantissal = 0; - - - return __x - *__i; - } - } else if (j0>63) { /* no fraction part */ - *__i = __x; - if ( _isnanl(__x) || _isinfl(__x) ) - return __x; - - __x = 0.0L; - x->sign = iptr->sign; - return __x; - } else { /* fraction part in low x */ - - i = ((unsigned int)(0xffffffff))>>(j0-32); - if ( x->mantissal == 0 ) { - *__i = __x; - __x = 0.0L; - x->sign = iptr->sign; - return __x; - } - iptr->sign = x->sign; - iptr->exponent = x->exponent; - iptr->mantissah = x->mantissah; - iptr->mantissal = x->mantissal&(~i); - - return __x - *__i; - - - } -} diff --git a/reactos/subsys/win32k/math/pow.c b/reactos/subsys/win32k/math/pow.c deleted file mode 100644 index 37810ac5362..00000000000 --- a/reactos/subsys/win32k/math/pow.c +++ /dev/null @@ -1,85 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -double pow (double __x, double __y); - -double __log2 (double __x); - -double __log2 (double __x) -{ - register double __value; - __asm __volatile__ - ("fld1\n\t" - "fxch\n\t" - "fyl2x" - : "=t" (__value) : "0" (__x)); - - return __value; -} - -double pow (double __x, double __y) -{ - register double __value, __exponent; - long __p = (long) __y; - - if (__x == 0.0 && __y > 0.0) - return 0.0; - if (__y == (double) __p) - { - double __r = 1.0; - if (__p == 0) - return 1.0; - if (__p < 0) - { - __p = -__p; - __x = 1.0 / __x; - } - while (1) - { - if (__p & 1) - __r *= __x; - __p >>= 1; - if (__p == 0) - return __r; - __x *= __x; - } - /* NOTREACHED */ - } - __asm __volatile__ - ("fmul %%st(1) # y * log2(x)\n\t" - "fst %%st(1)\n\t" - "frndint # int(y * log2(x))\n\t" - "fxch\n\t" - "fsub %%st(1) # fract(y * log2(x))\n\t" - "f2xm1 # 2^(fract(y * log2(x))) - 1\n\t" - : "=t" (__value), "=u" (__exponent) : "0" (__log2 (__x)), "1" (__y)); - __value += 1.0; - __asm __volatile__ - ("fscale" - : "=t" (__value) : "0" (__value), "u" (__exponent)); - - return __value; -} - -long double powl (long double __x,long double __y) -{ - return pow(__x,__y/2)*pow(__x,__y/2); -} - diff --git a/reactos/subsys/win32k/math/sin.c b/reactos/subsys/win32k/math/sin.c deleted file mode 100644 index be9e0b34fa4..00000000000 --- a/reactos/subsys/win32k/math/sin.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - -double sin (double __x); - -double sin (double __x) -{ - register double __value; - __asm __volatile__ - ("fsin" - : "=t" (__value) : "0" (__x)); - - return __value; -} \ No newline at end of file diff --git a/reactos/subsys/win32k/math/sinh.c b/reactos/subsys/win32k/math/sinh.c deleted file mode 100644 index 7acb21f05d4..00000000000 --- a/reactos/subsys/win32k/math/sinh.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -double sinh(double x) -{ - if(x >= 0.0) - { - const double epos = exp(x); - return (epos - 1.0/epos) / 2.0; - } - else - { - const double eneg = exp(-x); - return (1.0/eneg - eneg) / 2.0; - } -} diff --git a/reactos/subsys/win32k/math/sqrt.c b/reactos/subsys/win32k/math/sqrt.c deleted file mode 100644 index f157eab5723..00000000000 --- a/reactos/subsys/win32k/math/sqrt.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - -double sqrt (double __x); - -double sqrt (double __x) -{ - register double __value; - __asm __volatile__ - ("fsqrt" - : "=t" (__value) : "0" (__x)); - - return __value; -} \ No newline at end of file diff --git a/reactos/subsys/win32k/math/stubs.c b/reactos/subsys/win32k/math/stubs.c deleted file mode 100644 index 5c7686d2693..00000000000 --- a/reactos/subsys/win32k/math/stubs.c +++ /dev/null @@ -1,84 +0,0 @@ -#include - -double _CIsin (double x); -double _CIcos (double x); -double _CItan (double x); -double _CIsinh (double x); -double _CIcosh (double x); -double _CItanh (double x); -double _CIasin (double x); -double _CIacos (double x); -double _CIatan (double x); -double _CIatan2 (double y, double x); -double _CIexp (double x); -double _CIlog (double x); -double _CIlog10 (double x); -double _CIpow (double x, double y); -double _CIsqrt (double x); -double _CIfmod (double x, double y); - - -double _CIsin (double x) -{ - return sin(x); -} -double _CIcos (double x) -{ - return cos(x); -} -double _CItan (double x) -{ - return tan(x); -} -double _CIsinh (double x) -{ - return sinh(x); -} -double _CIcosh (double x) -{ - return cosh(x); -} -double _CItanh (double x) -{ - return tanh(x); -} -double _CIasin (double x) -{ - return asin(x); -} -double _CIacos (double x) -{ - return acos(x); -} -double _CIatan (double x) -{ - return atan(x); -} -double _CIatan2 (double y, double x) -{ - return atan2(y,x); -} -double _CIexp (double x) -{ - return exp(x); -} -double _CIlog (double x) -{ - return log(x); -} -double _CIlog10 (double x) -{ - return log10(x); -} -double _CIpow (double x, double y) -{ - return pow(x,y); -} -double _CIsqrt (double x) -{ - return sqrt(x); -} -double _CIfmod (double x, double y) -{ - return fmod(x,y); -} \ No newline at end of file diff --git a/reactos/subsys/win32k/math/tan.c b/reactos/subsys/win32k/math/tan.c deleted file mode 100644 index 2a460a9032a..00000000000 --- a/reactos/subsys/win32k/math/tan.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - -double tan (double __x); - -double tan (double __x) -{ - register double __value; - register double __value2 __attribute__ ((unused)); - __asm __volatile__ - ("fptan" - : "=t" (__value2), "=u" (__value) : "0" (__x)); - - return __value; -} diff --git a/reactos/subsys/win32k/math/tanh.c b/reactos/subsys/win32k/math/tanh.c deleted file mode 100644 index 12b00128104..00000000000 --- a/reactos/subsys/win32k/math/tanh.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -double tanh(double x) -{ - if (x > 50) - return 1; - else if (x < -50) - return -1; - else - { - const double ebig = exp(x); - const double esmall = 1.0/ebig; - return (ebig - esmall) / (ebig + esmall); - } -} -