From 55fef42029a36d48d55d7028cc75b2d486f3873c Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 12 Dec 1999 00:20:29 +0000 Subject: [PATCH] Added abs() and labs() svn path=/trunk/; revision=859 --- reactos/lib/ntdll/def/ntdll.def | 6 +++--- reactos/lib/ntdll/def/ntdll.edf | 4 +++- reactos/lib/ntdll/makefile | 6 +++--- reactos/lib/ntdll/stdlib/abs.c | 8 ++++++++ reactos/lib/ntdll/stdlib/labs.c | 8 ++++++++ reactos/lib/ntdll/stubs/stubs.c | 2 -- 6 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 reactos/lib/ntdll/stdlib/abs.c create mode 100644 reactos/lib/ntdll/stdlib/labs.c diff --git a/reactos/lib/ntdll/def/ntdll.def b/reactos/lib/ntdll/def/ntdll.def index 34baa8c13e8..91fa0129ed6 100644 --- a/reactos/lib/ntdll/def/ntdll.def +++ b/reactos/lib/ntdll/def/ntdll.def @@ -1,4 +1,4 @@ -; $Id: ntdll.def,v 1.28 1999/12/06 00:22:00 ekohl Exp $ +; $Id: ntdll.def,v 1.29 1999/12/12 00:17:25 ekohl Exp $ ; ; ReactOS Operating System ; @@ -570,7 +570,7 @@ _wcsupr ;_wtoi ;_wtoi64 ;_wtol -;abs +abs ;atan atoi atol @@ -591,7 +591,7 @@ isupper ;iswalpha ;iswctype isxdigit -;labs +labs ;log ;mbstowcs memchr diff --git a/reactos/lib/ntdll/def/ntdll.edf b/reactos/lib/ntdll/def/ntdll.edf index cab8686c19c..134110f54b1 100644 --- a/reactos/lib/ntdll/def/ntdll.edf +++ b/reactos/lib/ntdll/def/ntdll.edf @@ -1,4 +1,4 @@ -; $Id: ntdll.edf,v 1.18 1999/12/06 00:22:00 ekohl Exp $ +; $Id: ntdll.edf,v 1.19 1999/12/12 00:17:25 ekohl Exp $ ; ; ReactOS Operating System ; @@ -533,6 +533,7 @@ _wcsicmp _wcslwr _wcsnicmp _wcsupr +abs atoi atol isalpha @@ -546,6 +547,7 @@ ispunct isspace isupper isxdigit +labs memchr memcmp memcpy diff --git a/reactos/lib/ntdll/makefile b/reactos/lib/ntdll/makefile index cdb548171d7..baec8b96a00 100644 --- a/reactos/lib/ntdll/makefile +++ b/reactos/lib/ntdll/makefile @@ -1,4 +1,4 @@ -# $Id: makefile,v 1.28 1999/12/01 15:15:27 ekohl Exp $ +# $Id: makefile,v 1.29 1999/12/12 00:20:29 ekohl Exp $ # # ReactOS Operating System # @@ -27,8 +27,8 @@ RTL_OBJECTS = rtl/critical.o rtl/error.o rtl/heap.o rtl/largeint.o \ rtl/mem.o rtl/nls.o rtl/process.o rtl/security.o \ rtl/thread.o rtl/unicode.o rtl/env.o -STDLIB_OBJECTS = stdlib/atoi.o stdlib/atol.o stdlib/splitp.o \ - stdlib/strtol.o stdlib/strtoul.o +STDLIB_OBJECTS = stdlib/abs.o stdlib/atoi.o stdlib/atol.o stdlib/labs.o \ + stdlib/splitp.o stdlib/strtol.o stdlib/strtoul.o STRING_OBJECTS = string/ctype.o string/memccpy.o string/memchr.o \ string/memcmp.o string/memcpy.o string/memicmp.o\ diff --git a/reactos/lib/ntdll/stdlib/abs.c b/reactos/lib/ntdll/stdlib/abs.c new file mode 100644 index 00000000000..286388803de --- /dev/null +++ b/reactos/lib/ntdll/stdlib/abs.c @@ -0,0 +1,8 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include + +int +abs(int j) +{ + return j<0 ? -j : j; +} diff --git a/reactos/lib/ntdll/stdlib/labs.c b/reactos/lib/ntdll/stdlib/labs.c new file mode 100644 index 00000000000..b1c4fa255e6 --- /dev/null +++ b/reactos/lib/ntdll/stdlib/labs.c @@ -0,0 +1,8 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include + +long +labs(long j) +{ + return j<0 ? -j : j; +} diff --git a/reactos/lib/ntdll/stubs/stubs.c b/reactos/lib/ntdll/stubs/stubs.c index 49a40648014..e32340d26a8 100644 --- a/reactos/lib/ntdll/stubs/stubs.c +++ b/reactos/lib/ntdll/stubs/stubs.c @@ -214,7 +214,6 @@ STUB(_vsnprintf) STUB(_wtoi) STUB(_wtoi64) STUB(_wtol) -STUB(abs) STUB(atan) STUB(ceil) STUB(cos) @@ -222,7 +221,6 @@ STUB(fabs) STUB(floor) STUB(iswalpha) STUB(iswctype) -STUB(labs) STUB(log) STUB(mbstowcs) STUB(pow)