diff --git a/reactos/lib/sdk/crt/math/i386/atan_asm.s b/reactos/lib/sdk/crt/math/i386/atan_asm.s
index 06cb7b850df..6b21e2d49da 100644
--- a/reactos/lib/sdk/crt/math/i386/atan_asm.s
+++ b/reactos/lib/sdk/crt/math/i386/atan_asm.s
@@ -14,6 +14,9 @@
/* FUNCTIONS ***************************************************************/
_atan:
- fld qword ptr [esp+4]
- fpatan
+ push ebp
+ mov ebp,esp
+ fld qword ptr [ebp+8]
+ fpatan
+ pop ebp
ret
diff --git a/reactos/lib/sdk/crt/math/i386/log10_asm.s b/reactos/lib/sdk/crt/math/i386/log10_asm.s
index 624f1a12e61..6179f6221a2 100644
--- a/reactos/lib/sdk/crt/math/i386/log10_asm.s
+++ b/reactos/lib/sdk/crt/math/i386/log10_asm.s
@@ -15,8 +15,11 @@
/* FUNCTIONS ***************************************************************/
_log10:
- fld qword ptr [esp+4]
- fldlg2
- fyl2x
+ push ebp
+ mov ebp,esp
+ fld qword ptr [ebp+8]
+ fldlg2
+ fyl2x
+ pop ebp
ret
diff --git a/reactos/lib/sdk/libcntpr/libcntpr.rbuild b/reactos/lib/sdk/libcntpr/libcntpr.rbuild
index b8f79ea2d0d..5a1296f6efd 100644
--- a/reactos/lib/sdk/libcntpr/libcntpr.rbuild
+++ b/reactos/lib/sdk/libcntpr/libcntpr.rbuild
@@ -26,18 +26,21 @@
allrem_asm.s
allshl_asm.s
allshr_asm.s
+ atan_asm.s
aulldiv_asm.s
aulldvrm_asm.s
aullrem_asm.s
aullshr_asm.s
ceil_asm.s
+ cos_asm.s
fabs_asm.s
floor_asm.s
ftol_asm.s
log_asm.s
pow_asm.s
+ sin_asm.s
sqrt_asm.s
- trig_asm.s
+ tan_asm.s
abs.c
diff --git a/reactos/lib/sdk/libcntpr/math/i386/atan_asm.s b/reactos/lib/sdk/libcntpr/math/i386/atan_asm.s
new file mode 100644
index 00000000000..37554c940ae
--- /dev/null
+++ b/reactos/lib/sdk/libcntpr/math/i386/atan_asm.s
@@ -0,0 +1,50 @@
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * PURPOSE: Run-Time Library
+ * FILE: lib/rtl/i386/atan.S
+ * PROGRAMER: Alex Ionescu (alex@relsoft.net)
+ *
+ * Copyright (C) 2002 Michael Ringgaard.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES// LOSS OF USE, DATA, OR PROFITS// OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+.globl _atan
+
+.intel_syntax noprefix
+
+/* FUNCTIONS ***************************************************************/
+
+_atan:
+ push ebp
+ mov ebp,esp
+ fld qword ptr [ebp+8] // Load real from stack
+ fld1 // Load constant 1
+ fpatan // Take the arctangent
+ pop ebp
+ ret
diff --git a/reactos/lib/sdk/libcntpr/math/i386/cos_asm.s b/reactos/lib/sdk/libcntpr/math/i386/cos_asm.s
new file mode 100644
index 00000000000..b1c6ada49b2
--- /dev/null
+++ b/reactos/lib/sdk/libcntpr/math/i386/cos_asm.s
@@ -0,0 +1,49 @@
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * PURPOSE: Run-Time Library
+ * FILE: lib/rtl/i386/cos.S
+ * PROGRAMER: Alex Ionescu (alex@relsoft.net)
+ *
+ * Copyright (C) 2002 Michael Ringgaard.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES// LOSS OF USE, DATA, OR PROFITS// OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+.globl _cos
+
+.intel_syntax noprefix
+
+/* FUNCTIONS ***************************************************************/
+
+_cos:
+ push ebp
+ mov ebp,esp // Point to the stack frame
+ fld qword ptr [ebp+8] // Load real from stack
+ fcos // Take the cosine
+ pop ebp
+ ret
diff --git a/reactos/lib/sdk/libcntpr/math/i386/sin_asm.s b/reactos/lib/sdk/libcntpr/math/i386/sin_asm.s
new file mode 100644
index 00000000000..39791a3e989
--- /dev/null
+++ b/reactos/lib/sdk/libcntpr/math/i386/sin_asm.s
@@ -0,0 +1,49 @@
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * PURPOSE: Run-Time Library
+ * FILE: lib/rtl/i386/sin.S
+ * PROGRAMER: Alex Ionescu (alex@relsoft.net)
+ *
+ * Copyright (C) 2002 Michael Ringgaard.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES// LOSS OF USE, DATA, OR PROFITS// OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+.globl _sin
+
+.intel_syntax noprefix
+
+/* FUNCTIONS ***************************************************************/
+
+_sin:
+ push ebp // Save register bp
+ mov ebp,esp // Point to the stack frame
+ fld qword ptr [ebp+8] // Load real from stack
+ fsin // Take the sine
+ pop ebp // Restore register bp
+ ret
diff --git a/reactos/lib/sdk/libcntpr/math/i386/tan_asm.s b/reactos/lib/sdk/libcntpr/math/i386/tan_asm.s
new file mode 100644
index 00000000000..34af2614f89
--- /dev/null
+++ b/reactos/lib/sdk/libcntpr/math/i386/tan_asm.s
@@ -0,0 +1,52 @@
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * PURPOSE: Run-Time Library
+ * FILE: lib/rtl/i386/tan.S
+ * PROGRAMER: Alex Ionescu (alex@relsoft.net)
+ *
+ * Copyright (C) 2002 Michael Ringgaard.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES// LOSS OF USE, DATA, OR PROFITS// OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+.globl _tan
+
+.intel_syntax noprefix
+
+/* FUNCTIONS ***************************************************************/
+
+_tan:
+ push ebp
+ mov ebp,esp
+ sub esp,4 // Allocate temporary space
+ fld qword ptr [ebp+8] // Load real from stack
+ fptan // Take the tangent
+ fstp dword ptr [ebp-4] // Throw away the constant 1
+ mov esp,ebp // Deallocate temporary space
+ pop ebp
+ ret
diff --git a/reactos/lib/sdk/libcntpr/math/i386/trig_asm.s b/reactos/lib/sdk/libcntpr/math/i386/trig_asm.s
deleted file mode 100644
index 734377d84f9..00000000000
--- a/reactos/lib/sdk/libcntpr/math/i386/trig_asm.s
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * PURPOSE: Run-Time Library
- * FILE: lib/rtl/i386/trig_asm.s
- * PROGRAMER: Aleksey Bragin (aleksey reactos org)
- *
- */
-.globl _atan
-.globl _cos
-.globl _sin
-.globl _tan
-
-.intel_syntax noprefix
-
-/* FUNCTIONS ***************************************************************/
-
-_atan:
- push ebp
- mov ebp,esp
- fld qword ptr [ebp+8]
- fld1
- fpatan
- pop ebp
- ret
-
-_cos:
- push ebp
- mov ebp,esp
- fld qword ptr [ebp+8]
- fcos
- pop ebp
- ret
-
-_sin:
- push ebp
- mov ebp,esp
- fld qword ptr [ebp+8]
- fsin
- pop ebp
- ret
-
-_tan:
- push ebp
- mov ebp,esp
- sub esp,4
- fld qword ptr [ebp+8]
- fptan
- fstp dword ptr [ebp-4]
- mov esp,ebp
- pop ebp
- ret
-
diff --git a/reactos/lib/sdk/libcntpr/string/strtoul.c b/reactos/lib/sdk/libcntpr/string/strtoul.c
index fcd735485e2..e777b09978c 100644
--- a/reactos/lib/sdk/libcntpr/string/strtoul.c
+++ b/reactos/lib/sdk/libcntpr/string/strtoul.c
@@ -4,7 +4,6 @@
#include
#include
-
/*
* Convert a string to an unsigned long integer.
*
@@ -67,7 +66,6 @@ strtoul(const char *nptr, char **endptr, int base)
if (any < 0)
{
acc = ULONG_MAX;
-
}
else if (neg)
acc = -acc;
diff --git a/reactos/lib/sdk/libcntpr/string/strtoull.c b/reactos/lib/sdk/libcntpr/string/strtoull.c
index 893e4a64bcf..07470204f88 100644
--- a/reactos/lib/sdk/libcntpr/string/strtoull.c
+++ b/reactos/lib/sdk/libcntpr/string/strtoull.c
@@ -4,7 +4,6 @@
#include
#include
-
unsigned long long
strtoull(const char *nptr, char **endptr, int base)
{
@@ -59,7 +58,6 @@ strtoull(const char *nptr, char **endptr, int base)
if (any < 0)
{
acc = ULLONG_MAX;
-
}
else if (neg)
acc = -acc;
@@ -67,5 +65,3 @@ strtoull(const char *nptr, char **endptr, int base)
*endptr = any ? (char *)((size_t)(s - 1)) : (char *)((size_t)nptr);
return acc;
}
-
-